From 11b9e1aad8bfeba972654a4db22f9d8066deabca Mon Sep 17 00:00:00 2001 From: Alex Klimenkov Date: Wed, 22 May 2024 16:52:05 +0300 Subject: [PATCH] [update] version 7.0.4 --- README.md | 4 +- bower.json | 2 +- codebase/dhtmlxscheduler.d.ts | 31 +- codebase/dhtmlxscheduler.es.d.ts | 31 +- codebase/dhtmlxscheduler.es.js | 4547 ++++++++++---------- codebase/dhtmlxscheduler.es.js.map | 2 +- codebase/dhtmlxscheduler.js | 64 +- codebase/dhtmlxscheduler.js.map | 2 +- codebase/sources/dhtmlxscheduler.es.js | 221 +- codebase/sources/dhtmlxscheduler.es.js.map | 2 +- codebase/sources/dhtmlxscheduler.js | 221 +- codebase/sources/dhtmlxscheduler.js.map | 2 +- codebase/sources/less/package.json | 2 +- package.json | 2 +- whatsnew.md | 8 + 15 files changed, 2602 insertions(+), 2539 deletions(-) diff --git a/README.md b/README.md index 2648906..19c03fd 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # dhtmlxScheduler # [![dhtmlx.com](https://img.shields.io/badge/made%20by-DHTMLX-blue)](https://dhtmlx.com/) -[![npm: v.7.0.3](https://img.shields.io/badge/npm-v.7.0.3-blue.svg)](https://www.npmjs.com/package/dhtmlx-scheduler) +[![npm: v.7.0.4](https://img.shields.io/badge/npm-v.7.0.4-blue.svg)](https://www.npmjs.com/package/dhtmlx-scheduler) [![License: GPL v2](https://img.shields.io/badge/license-GPL%20v2-blue.svg)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html) [DHTMLX Scheduler](https://dhtmlx.com/docs/products/dhtmlxScheduler) is a JavaScript library that allows you to add a Google-like scheduler to your web app or website. @@ -87,7 +87,7 @@ scheduler.parse([ ## License ## -dhtmlxScheduler v.7.0.3 Standard +dhtmlxScheduler v.7.0.4 Standard To use dhtmlxScheduler in non-GPL projects (and get Pro version of the product), please obtain Commercial/Enterprise or Ultimate license on our site https://dhtmlx.com/docs/products/dhtmlxScheduler/#licensing or contact us at sales@dhtmlx.com diff --git a/bower.json b/bower.json index 937ff8a..9ec9dcb 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "scheduler", - "version": "7.0.3", + "version": "7.0.4", "homepage": "https://dhtmlx.com/docs/products/dhtmlxScheduler/", "description": "JavaScript event calendar. Allows to manage events and appointments in different views", "main": [ diff --git a/codebase/dhtmlxscheduler.d.ts b/codebase/dhtmlxscheduler.d.ts index 2bad85a..54ecb52 100644 --- a/codebase/dhtmlxscheduler.d.ts +++ b/codebase/dhtmlxscheduler.d.ts @@ -103,8 +103,9 @@ export interface SchedulerTemplates { /** * specifies the content of the day cell of the Agenda view + * @param date the date which needs formatting */ - agenda_day(): void; + agenda_day(date: Date): string; /** * specifies the text in the second column of the Agenda view @@ -170,7 +171,7 @@ export interface SchedulerTemplates { * @param end the date when an event is scheduled to be completed * @param ev the event's object */ - drag_marker_class(start: Date, end: Date, ev: any): void; + drag_marker_class(start: Date, end: Date, ev: any): string; /** * specifies the content of the highlighted block on the time scale @@ -178,7 +179,7 @@ export interface SchedulerTemplates { * @param end the date when an event is scheduled to be completed * @param ev the event's object */ - drag_marker_content(start: Date, end: Date, ev: any): void; + drag_marker_content(start: Date, end: Date, ev: any): string; /** * specifies the date of an event. Applied to one-day events only @@ -350,12 +351,12 @@ export interface SchedulerTemplates { time_picker(): string; /** - * specifies the css class of background cell in Day/Week views + * specifies the CSS class of the background cell in the Day/Week views */ time_slot_class(): void; /** - * specifies the content of background cell in Day/Week views + * specifies the content of the background cell in the Day/Week views */ time_slot_text(): void; @@ -1149,7 +1150,7 @@ export interface SchedulerConfigOptions { timeline_swap_resize: boolean; /** - * sets the length of time, in milliseconds, before the tooltip hides + * sets the length of time in milliseconds before the tooltip hides */ tooltip_hide_timeout: number; @@ -1598,9 +1599,9 @@ export interface SchedulerStatic { alert(config: any): HTMLElement; /** - * if the specified expression is false, an errorMessage is shown in the red popup at the top right corner of the screen + * if the specified expression is false, an errorMessage is shown in a red popup at the top right corner of the screen * @param expression true to assert the expression, false - if assertion fails - * @param errorMessage an error message that will be shown in the red popup + * @param errorMessage an error message that will be shown in a red popup */ assert(expression: boolean, errorMessage: string): void; @@ -1619,7 +1620,7 @@ export interface SchedulerStatic { backbone(events: any): void; /** - * creates a new function that, when called, has its this keyword set to the provided value + * creates a new function that when called has its this keyword set to the provided value * @param method the target function * @param thisArg the value to be passed as the this parameter to the target function when the bound function is called */ @@ -1700,14 +1701,14 @@ export interface SchedulerStatic { confirm(config: any): HTMLElement; /** - * creates a deep copy of provided object + * creates a deep copy of the provided object * @param event the object that needs to be copied */ copy(event: any): any; /** * creates a new dataProcessor instance and attaches it to scheduler - * @param config dataProcessor configuration object + * @param config a dataProcessor configuration object */ createDataProcessor(config: any): any; @@ -1765,7 +1766,7 @@ export interface SchedulerStatic { destroyCalendar(name?: any): void; /** - * destroys the scheduler instance + * destroys a scheduler instance */ destructor(): void; @@ -2021,7 +2022,7 @@ export interface SchedulerStatic { * adds properties of the 'source' object into the 'target' object * @param target the target object * @param source the source object - * @param force if true, properties of the 'source' will overwrite matching properties of the 'target', if there are any. If false, properties that already exist in the 'target' will be omitted + * @param force if true, properties of the 'source' will overwrite the matching properties of the 'target', if there are any. If false, the properties that already exist in the 'target' will be omitted */ mixin(target: any, source: any, force: boolean): void; @@ -2049,7 +2050,7 @@ export interface SchedulerStatic { parse(data: any): void; /** - * activates specified extensions + * activates the specified extensions * @param ext extensions that need to be activated */ plugins(ext: any): void; @@ -2158,7 +2159,7 @@ export interface SchedulerStatic { /** * sets the active skin - * @param skin name of the skin. Allowed values: "terrace", "dark", "material", "flat", "contrast-white", "contrast-black" + * @param skin the name of the skin. The allowed values are: "terrace", "dark", "material", "flat", "contrast-white", "contrast-black" */ setSkin(skin: string): void; diff --git a/codebase/dhtmlxscheduler.es.d.ts b/codebase/dhtmlxscheduler.es.d.ts index 2bad85a..54ecb52 100644 --- a/codebase/dhtmlxscheduler.es.d.ts +++ b/codebase/dhtmlxscheduler.es.d.ts @@ -103,8 +103,9 @@ export interface SchedulerTemplates { /** * specifies the content of the day cell of the Agenda view + * @param date the date which needs formatting */ - agenda_day(): void; + agenda_day(date: Date): string; /** * specifies the text in the second column of the Agenda view @@ -170,7 +171,7 @@ export interface SchedulerTemplates { * @param end the date when an event is scheduled to be completed * @param ev the event's object */ - drag_marker_class(start: Date, end: Date, ev: any): void; + drag_marker_class(start: Date, end: Date, ev: any): string; /** * specifies the content of the highlighted block on the time scale @@ -178,7 +179,7 @@ export interface SchedulerTemplates { * @param end the date when an event is scheduled to be completed * @param ev the event's object */ - drag_marker_content(start: Date, end: Date, ev: any): void; + drag_marker_content(start: Date, end: Date, ev: any): string; /** * specifies the date of an event. Applied to one-day events only @@ -350,12 +351,12 @@ export interface SchedulerTemplates { time_picker(): string; /** - * specifies the css class of background cell in Day/Week views + * specifies the CSS class of the background cell in the Day/Week views */ time_slot_class(): void; /** - * specifies the content of background cell in Day/Week views + * specifies the content of the background cell in the Day/Week views */ time_slot_text(): void; @@ -1149,7 +1150,7 @@ export interface SchedulerConfigOptions { timeline_swap_resize: boolean; /** - * sets the length of time, in milliseconds, before the tooltip hides + * sets the length of time in milliseconds before the tooltip hides */ tooltip_hide_timeout: number; @@ -1598,9 +1599,9 @@ export interface SchedulerStatic { alert(config: any): HTMLElement; /** - * if the specified expression is false, an errorMessage is shown in the red popup at the top right corner of the screen + * if the specified expression is false, an errorMessage is shown in a red popup at the top right corner of the screen * @param expression true to assert the expression, false - if assertion fails - * @param errorMessage an error message that will be shown in the red popup + * @param errorMessage an error message that will be shown in a red popup */ assert(expression: boolean, errorMessage: string): void; @@ -1619,7 +1620,7 @@ export interface SchedulerStatic { backbone(events: any): void; /** - * creates a new function that, when called, has its this keyword set to the provided value + * creates a new function that when called has its this keyword set to the provided value * @param method the target function * @param thisArg the value to be passed as the this parameter to the target function when the bound function is called */ @@ -1700,14 +1701,14 @@ export interface SchedulerStatic { confirm(config: any): HTMLElement; /** - * creates a deep copy of provided object + * creates a deep copy of the provided object * @param event the object that needs to be copied */ copy(event: any): any; /** * creates a new dataProcessor instance and attaches it to scheduler - * @param config dataProcessor configuration object + * @param config a dataProcessor configuration object */ createDataProcessor(config: any): any; @@ -1765,7 +1766,7 @@ export interface SchedulerStatic { destroyCalendar(name?: any): void; /** - * destroys the scheduler instance + * destroys a scheduler instance */ destructor(): void; @@ -2021,7 +2022,7 @@ export interface SchedulerStatic { * adds properties of the 'source' object into the 'target' object * @param target the target object * @param source the source object - * @param force if true, properties of the 'source' will overwrite matching properties of the 'target', if there are any. If false, properties that already exist in the 'target' will be omitted + * @param force if true, properties of the 'source' will overwrite the matching properties of the 'target', if there are any. If false, the properties that already exist in the 'target' will be omitted */ mixin(target: any, source: any, force: boolean): void; @@ -2049,7 +2050,7 @@ export interface SchedulerStatic { parse(data: any): void; /** - * activates specified extensions + * activates the specified extensions * @param ext extensions that need to be activated */ plugins(ext: any): void; @@ -2158,7 +2159,7 @@ export interface SchedulerStatic { /** * sets the active skin - * @param skin name of the skin. Allowed values: "terrace", "dark", "material", "flat", "contrast-white", "contrast-black" + * @param skin the name of the skin. The allowed values are: "terrace", "dark", "material", "flat", "contrast-white", "contrast-black" */ setSkin(skin: string): void; diff --git a/codebase/dhtmlxscheduler.es.js b/codebase/dhtmlxscheduler.es.js index 1243534..10a44b5 100644 --- a/codebase/dhtmlxscheduler.es.js +++ b/codebase/dhtmlxscheduler.es.js @@ -1,9 +1,9 @@ -const B = typeof window < "u" ? window : global; +const I = typeof window < "u" ? window : global; function de(e) { function h(o) { var t = document.createElement("div"); - return (o || "").split(" ").forEach(function(r) { - t.classList.add(r); + return (o || "").split(" ").forEach(function(n) { + t.classList.add(n); }), t; } var a = { rows_container: function() { @@ -24,14 +24,14 @@ function de(e) { }, minicalendarButton: function(o) { var t = h("dhx_minical_icon"); return o.click || t.$_eventAttached || e.event(t, "click", function() { - e.isCalendarVisible() ? e.destroyCalendar() : e.renderCalendar({ position: this, date: e.getState().date, navigation: !0, handler: function(r, s) { - e.setCurrentView(r), e.destroyCalendar(); + e.isCalendarVisible() ? e.destroyCalendar() : e.renderCalendar({ position: this, date: e.getState().date, navigation: !0, handler: function(n, s) { + e.setCurrentView(n), e.destroyCalendar(); } }); }), t; }, html_element: function(o) { return h("dhx_cal_nav_content"); } }; - function i(o) { + function r(o) { var t = function(c) { var u; if (c.view) @@ -61,27 +61,27 @@ function de(e) { return u; }(o); if (t) { - var r = t(o); - if (o.css && r.classList.add(o.css), o.width && ((s = o.width) === 1 * s && (s += "px"), r.style.width = s), o.height && ((s = o.height) === 1 * s && (s += "px"), r.style.height = s), o.click && e.event(r, "click", o.click), o.html && (r.innerHTML = o.html), o.align) { + var n = t(o); + if (o.css && n.classList.add(o.css), o.width && ((s = o.width) === 1 * s && (s += "px"), n.style.width = s), o.height && ((s = o.height) === 1 * s && (s += "px"), n.style.height = s), o.click && e.event(n, "click", o.click), o.html && (n.innerHTML = o.html), o.align) { var s = ""; - o.align == "right" ? s = "flex-end" : o.align == "left" && (s = "flex-start"), r.style.justifyContent = s; + o.align == "right" ? s = "flex-end" : o.align == "left" && (s = "flex-start"), n.style.justifyContent = s; } - return r; + return n; } } function d(o) { return typeof o == "string" && (o = { view: o }), o.view || o.rows || o.cols || (o.view = "button"), o; } - function n(o) { - var t, r = document.createDocumentFragment(); + function i(o) { + var t, n = document.createDocumentFragment(); t = Array.isArray(o) ? o : [o]; for (var s = 0; s < t.length; s++) { var c, u = d(t[s]); u.view === "day" && t[s + 1] && ((c = d(t[s + 1])).view !== "week" && c.view !== "month" || (u.$firstTab = !0, u.$segmentedTab = !0)), u.view === "week" && t[s - 1] && ((c = d(t[s + 1])).view !== "week" && c.view !== "month" || (u.$segmentedTab = !0)), u.view === "month" && t[s - 1] && ((c = d(t[s - 1])).view !== "week" && c.view !== "day" || (u.$lastTab = !0, u.$segmentedTab = !0)); - var v = i(u); - r.appendChild(v), (u.cols || u.rows) && v.appendChild(n(u.cols || u.rows)); + var v = r(u); + n.appendChild(v), (u.cols || u.rows) && v.appendChild(i(u.cols || u.rows)); } - return r; + return n; } e._init_nav_bar = function(o) { var t = this.$container.querySelector(".dhx_cal_navline"); @@ -90,44 +90,44 @@ function de(e) { var _ = null; e._update_nav_bar = function(o, t) { if (o) { - var r = !1, s = o.height || e.xy.nav_height; - _ !== null && _ === s || (r = !0), r && (e.xy.nav_height = s), t.innerHTML = "", t.appendChild(n(o)), e.unset_actions(), e._els = [], e.get_elements(), e.set_actions(), t.style.display = s === 0 ? "none" : "", _ = s; + var n = !1, s = o.height || e.xy.nav_height; + _ !== null && _ === s || (n = !0), n && (e.xy.nav_height = s), t.innerHTML = "", t.appendChild(i(o)), e.unset_actions(), e._els = [], e.get_elements(), e.set_actions(), t.style.display = s === 0 ? "none" : "", _ = s; } }; } function _e(e) { - function h(n) { - for (var _ = document.body; n && n != _; ) - n = n.parentNode; - return _ == n; + function h(i) { + for (var _ = document.body; i && i != _; ) + i = i.parentNode; + return _ == i; } - function a(n) { - return { w: n.innerWidth || document.documentElement.clientWidth, h: n.innerHeight || document.documentElement.clientHeight }; + function a(i) { + return { w: i.innerWidth || document.documentElement.clientWidth, h: i.innerHeight || document.documentElement.clientHeight }; } - function i(n, _) { + function r(i, _) { var o, t = a(_); - n.event(_, "resize", function() { + i.event(_, "resize", function() { clearTimeout(o), o = setTimeout(function() { - if (h(n.$container) && !n.$destroyed) { - var r, s, c = a(_); - s = c, ((r = t).w != s.w || r.h != s.h) && (t = c, d(n)); + if (h(i.$container) && !i.$destroyed) { + var n, s, c = a(_); + s = c, ((n = t).w != s.w || n.h != s.h) && (t = c, d(i)); } }, 150); }); } - function d(n) { - !n.$destroyed && n.$root && h(n.$root) && n.callEvent("onSchedulerResize", []) && (n.updateView(), n.callEvent("onAfterSchedulerResize", [])); + function d(i) { + !i.$destroyed && i.$root && h(i.$root) && i.callEvent("onSchedulerResize", []) && (i.updateView(), i.callEvent("onAfterSchedulerResize", [])); } - (function(n) { - var _ = n.$container; + (function(i) { + var _ = i.$container; window.getComputedStyle(_).getPropertyValue("position") == "static" && (_.style.position = "relative"); var o = document.createElement("iframe"); - o.className = "scheduler_container_resize_watcher", o.tabIndex = -1, n.config.wai_aria_attributes && (o.setAttribute("role", "none"), o.setAttribute("aria-hidden", !0)), window.Sfdc || window.$A || window.Aura ? function(t) { - var r = t.$root.offsetHeight, s = t.$root.offsetWidth; + o.className = "scheduler_container_resize_watcher", o.tabIndex = -1, i.config.wai_aria_attributes && (o.setAttribute("role", "none"), o.setAttribute("aria-hidden", !0)), window.Sfdc || window.$A || window.Aura ? function(t) { + var n = t.$root.offsetHeight, s = t.$root.offsetWidth; (function c() { - t.$destroyed || (t.$root && (t.$root.offsetHeight == r && t.$root.offsetWidth == s || d(t), r = t.$root.offsetHeight, s = t.$root.offsetWidth), setTimeout(c, 200)); + t.$destroyed || (t.$root && (t.$root.offsetHeight == n && t.$root.offsetWidth == s || d(t), n = t.$root.offsetHeight, s = t.$root.offsetWidth), setTimeout(c, 200)); })(); - }(n) : (_.appendChild(o), o.contentWindow ? i(n, o.contentWindow) : (_.removeChild(o), i(n, window))); + }(i) : (_.appendChild(o), o.contentWindow ? r(i, o.contentWindow) : (_.removeChild(o), r(i, window))); })(e); } class le { @@ -143,56 +143,56 @@ class le { } const ce = function(e) { let h = {}, a = 0; - const i = function() { + const r = function() { let d = !0; - for (const n in h) { - const _ = h[n].apply(e, arguments); + for (const i in h) { + const _ = h[i].apply(e, arguments); d = d && _; } return d; }; - return i.addEvent = function(d, n) { + return r.addEvent = function(d, i) { if (typeof d == "function") { let _; - if (n && n.id ? _ = n.id : (_ = a, a++), n && n.once) { + if (i && i.id ? _ = i.id : (_ = a, a++), i && i.once) { const o = d; d = function() { - o(), i.removeEvent(_); + o(), r.removeEvent(_); }; } return h[_] = d, _; } return !1; - }, i.removeEvent = function(d) { + }, r.removeEvent = function(d) { delete h[d]; - }, i.clear = function() { + }, r.clear = function() { h = {}; - }, i; + }, r; }; function Q(e) { const h = new le(); - e.attachEvent = function(a, i, d) { - a = "ev_" + a.toLowerCase(), h.listeners[a] || (h.listeners[a] = ce(this)), d && d.thisObject && (i = i.bind(d.thisObject)); - let n = a + ":" + h.listeners[a].addEvent(i, d); - return d && d.id && (n = d.id), n; + e.attachEvent = function(a, r, d) { + a = "ev_" + a.toLowerCase(), h.listeners[a] || (h.listeners[a] = ce(this)), d && d.thisObject && (r = r.bind(d.thisObject)); + let i = a + ":" + h.listeners[a].addEvent(r, d); + return d && d.id && (i = d.id), i; }, e.attachAll = function(a) { this.attachEvent("listen_all", a); - }, e.callEvent = function(a, i) { + }, e.callEvent = function(a, r) { if (h._silent_mode) return !0; - const d = "ev_" + a.toLowerCase(), n = h.listeners; - return n.ev_listen_all && n.ev_listen_all.apply(this, [a].concat(i)), !n[d] || n[d].apply(this, i); + const d = "ev_" + a.toLowerCase(), i = h.listeners; + return i.ev_listen_all && i.ev_listen_all.apply(this, [a].concat(r)), !i[d] || i[d].apply(this, r); }, e.checkEvent = function(a) { return !!h.listeners["ev_" + a.toLowerCase()]; }, e.detachEvent = function(a) { if (a) { - let i = h.listeners; - for (const n in i) - i[n].removeEvent(a); + let r = h.listeners; + for (const i in r) + r[i].removeEvent(a); const d = a.split(":"); - if (i = h.listeners, d.length === 2) { - const n = d[0], _ = d[1]; - i[n] && i[n].removeEvent(_); + if (r = h.listeners, d.length === 2) { + const i = d[0], _ = d[1]; + r[i] && r[i].removeEvent(_); } } }, e.detachAllEvents = function() { @@ -207,22 +207,22 @@ const ee = { event: function(e, h, a) { } }; function he(e) { var h = function() { - var a = function(i, d) { - i = i || ee.event, d = d || ee.eventRemove; - var n = [], _ = { attach: function(o, t, r, s) { - n.push({ element: o, event: t, callback: r, capture: s }), i(o, t, r, s); - }, detach: function(o, t, r, s) { - d(o, t, r, s); - for (var c = 0; c < n.length; c++) { - var u = n[c]; - u.element === o && u.event === t && u.callback === r && u.capture === s && (n.splice(c, 1), c--); + var a = function(r, d) { + r = r || ee.event, d = d || ee.eventRemove; + var i = [], _ = { attach: function(o, t, n, s) { + i.push({ element: o, event: t, callback: n, capture: s }), r(o, t, n, s); + }, detach: function(o, t, n, s) { + d(o, t, n, s); + for (var c = 0; c < i.length; c++) { + var u = i[c]; + u.element === o && u.event === t && u.callback === n && u.capture === s && (i.splice(c, 1), c--); } }, detachAll: function() { - for (var o = n.slice(), t = 0; t < o.length; t++) { - var r = o[t]; - _.detach(r.element, r.event, r.callback, r.capture), _.detach(r.element, r.event, r.callback, void 0), _.detach(r.element, r.event, r.callback, !1), _.detach(r.element, r.event, r.callback, !0); + for (var o = i.slice(), t = 0; t < o.length; t++) { + var n = o[t]; + _.detach(n.element, n.event, n.callback, n.capture), _.detach(n.element, n.event, n.callback, void 0), _.detach(n.element, n.event, n.callback, !1), _.detach(n.element, n.event, n.callback, !0); } - n.splice(0, n.length); + i.splice(0, i.length); }, extend: function() { return a(this.event, this.eventRemove); } }; @@ -244,61 +244,61 @@ var ue = Date.now(); function Y(e) { return !(!e || typeof e != "object") && !!(e.getFullYear && e.getMonth && e.getDate); } -const I = { uid: function() { +const V = { uid: function() { return ue++; }, mixin: function(e, h, a) { - for (var i in h) - (e[i] === void 0 || a) && (e[i] = h[i]); + for (var r in h) + (e[r] === void 0 || a) && (e[r] = h[r]); return e; }, copy: function e(h) { - var a, i, d; + var a, r, d; if (h && typeof h == "object") switch (!0) { case Y(h): - i = new Date(h); + r = new Date(h); break; case (d = h, Array.isArray ? Array.isArray(d) : d && d.length !== void 0 && d.pop && d.push): - for (i = new Array(h.length), a = 0; a < h.length; a++) - i[a] = e(h[a]); + for (r = new Array(h.length), a = 0; a < h.length; a++) + r[a] = e(h[a]); break; - case function(n) { - return n && typeof n == "object" && Function.prototype.toString.call(n.constructor) === "function String() { [native code] }"; + case function(i) { + return i && typeof i == "object" && Function.prototype.toString.call(i.constructor) === "function String() { [native code] }"; }(h): - i = new String(h); + r = new String(h); break; - case function(n) { - return n && typeof n == "object" && Function.prototype.toString.call(n.constructor) === "function Number() { [native code] }"; + case function(i) { + return i && typeof i == "object" && Function.prototype.toString.call(i.constructor) === "function Number() { [native code] }"; }(h): - i = new Number(h); + r = new Number(h); break; - case function(n) { - return n && typeof n == "object" && Function.prototype.toString.call(n.constructor) === "function Boolean() { [native code] }"; + case function(i) { + return i && typeof i == "object" && Function.prototype.toString.call(i.constructor) === "function Boolean() { [native code] }"; }(h): - i = new Boolean(h); + r = new Boolean(h); break; default: - for (a in i = {}, h) { - const n = typeof h[a]; - n === "string" || n === "number" || n === "boolean" ? i[a] = h[a] : Y(h[a]) ? i[a] = new Date(h[a]) : Object.prototype.hasOwnProperty.apply(h, [a]) && (i[a] = e(h[a])); + for (a in r = {}, h) { + const i = typeof h[a]; + i === "string" || i === "number" || i === "boolean" ? r[a] = h[a] : Y(h[a]) ? r[a] = new Date(h[a]) : Object.prototype.hasOwnProperty.apply(h, [a]) && (r[a] = e(h[a])); } } - return i || h; + return r || h; }, defined: function(e) { return e !== void 0; }, isDate: Y, delay: function(e, h) { - var a, i = function() { - i.$cancelTimeout(), i.$pending = !0; + var a, r = function() { + r.$cancelTimeout(), r.$pending = !0; var d = Array.prototype.slice.call(arguments); a = setTimeout(function() { - e.apply(this, d), i.$pending = !1; + e.apply(this, d), r.$pending = !1; }, h); }; - return i.$pending = !1, i.$cancelTimeout = function() { - clearTimeout(a), i.$pending = !1; - }, i.$execute = function() { + return r.$pending = !1, r.$cancelTimeout = function() { + clearTimeout(a), r.$pending = !1; + }, r.$execute = function() { var d = Array.prototype.slice.call(arguments); - e.apply(this, d), i.$cancelTimeout(); - }, i; + e.apply(this, d), r.$cancelTimeout(); + }, r; } }; function ne(e) { if (!e) @@ -308,30 +308,30 @@ function ne(e) { } function ie(e, h, a) { a === void 0 && (a = !0); - for (var i = e.target || e.srcElement, d = ""; i; ) { - if (d = ne(i)) { - var n = d.indexOf(h); - if (n >= 0) { + for (var r = e.target || e.srcElement, d = ""; r; ) { + if (d = ne(r)) { + var i = d.indexOf(h); + if (i >= 0) { if (!a) - return i; - var _ = n === 0 || !(d.charAt(n - 1) || "").trim(), o = n + h.length >= d.length || !d.charAt(n + h.length).trim(); + return r; + var _ = i === 0 || !(d.charAt(i - 1) || "").trim(), o = i + h.length >= d.length || !d.charAt(i + h.length).trim(); if (_ && o) - return i; + return r; } } - i = i.parentNode; + r = r.parentNode; } return null; } function fe(e) { var h = !1, a = !1; if (window.getComputedStyle) { - var i = window.getComputedStyle(e, null); - h = i.display, a = i.visibility; + var r = window.getComputedStyle(e, null); + h = r.display, a = r.visibility; } else e.currentStyle && (h = e.currentStyle.display, a = e.currentStyle.visibility); - var d = !1, n = ie({ target: e }, "dhx_form_repeat", !1); - return n && (d = n.style.height == "0px"), d = d || !e.offsetHeight, h != "none" && a != "hidden" && !d; + var d = !1, i = ie({ target: e }, "dhx_form_repeat", !1); + return i && (d = i.style.height == "0px"), d = d || !e.offsetHeight, h != "none" && a != "hidden" && !d; } function ve(e) { return !isNaN(e.getAttribute("tabindex")) && 1 * e.getAttribute("tabindex") >= 0; @@ -362,17 +362,17 @@ const q = { getAbsoluteLeft: function(e) { h += parseInt(e.offsetTop), a += parseInt(e.offsetLeft), e = e.offsetParent; return { top: h, left: a }; }, getOffsetRect: function(e) { - var h = e.getBoundingClientRect(), a = 0, i = 0; + var h = e.getBoundingClientRect(), a = 0, r = 0; if (/Mobi/.test(navigator.userAgent)) { var d = document.createElement("div"); d.style.position = "absolute", d.style.left = "0px", d.style.top = "0px", d.style.width = "1px", d.style.height = "1px", document.body.appendChild(d); - var n = d.getBoundingClientRect(); - a = h.top - n.top, i = h.left - n.left, d.parentNode.removeChild(d); + var i = d.getBoundingClientRect(); + a = h.top - i.top, r = h.left - i.left, d.parentNode.removeChild(d); } else { - var _ = document.body, o = document.documentElement, t = window.pageYOffset || o.scrollTop || _.scrollTop, r = window.pageXOffset || o.scrollLeft || _.scrollLeft, s = o.clientTop || _.clientTop || 0, c = o.clientLeft || _.clientLeft || 0; - a = h.top + t - s, i = h.left + r - c; + var _ = document.body, o = document.documentElement, t = window.pageYOffset || o.scrollTop || _.scrollTop, n = window.pageXOffset || o.scrollLeft || _.scrollLeft, s = o.clientTop || _.clientTop || 0, c = o.clientLeft || _.clientLeft || 0; + a = h.top + t - s, r = h.left + n - c; } - return { top: Math.round(a), left: Math.round(i) }; + return { top: Math.round(a), left: Math.round(r) }; }, getOffset: function(e) { return e.getBoundingClientRect ? this.getOffsetRect(e) : this.getOffsetSum(e); }, closest: function(e, h) { @@ -384,13 +384,13 @@ const q = { getAbsoluteLeft: function(e) { }, isChildOf: function(e, h) { return h.contains(e); }, getFocusableNodes: function(e) { - for (var h = e.querySelectorAll(["a[href]", "area[href]", "input", "select", "textarea", "button", "iframe", "object", "embed", "[tabindex]", "[contenteditable]"].join(", ")), a = Array.prototype.slice.call(h, 0), i = 0; i < a.length; i++) - a[i].$position = i; - for (a.sort(function(n, _) { - return n.tabIndex === 0 && _.tabIndex !== 0 ? 1 : n.tabIndex !== 0 && _.tabIndex === 0 ? -1 : n.tabIndex === _.tabIndex ? n.$position - _.$position : n.tabIndex < _.tabIndex ? -1 : 1; - }), i = 0; i < a.length; i++) { - var d = a[i]; - (ve(d) || me(d) || ge(d)) && fe(d) || (a.splice(i, 1), i--); + for (var h = e.querySelectorAll(["a[href]", "area[href]", "input", "select", "textarea", "button", "iframe", "object", "embed", "[tabindex]", "[contenteditable]"].join(", ")), a = Array.prototype.slice.call(h, 0), r = 0; r < a.length; r++) + a[r].$position = r; + for (a.sort(function(i, _) { + return i.tabIndex === 0 && _.tabIndex !== 0 ? 1 : i.tabIndex !== 0 && _.tabIndex === 0 ? -1 : i.tabIndex === _.tabIndex ? i.$position - _.$position : i.tabIndex < _.tabIndex ? -1 : 1; + }), r = 0; r < a.length; r++) { + var d = a[r]; + (ve(d) || me(d) || ge(d)) && fe(d) || (a.splice(r, 1), r--); } return a; }, getClassName: ne, locateCss: ie, getRootNode: te, hasShadowParent: function(e) { @@ -399,33 +399,33 @@ const q = { getAbsoluteLeft: function(e) { var e = document.activeElement; return e.shadowRoot && (e = e.shadowRoot.activeElement), e === document.body && document.getSelection && (e = document.getSelection().focusNode || document.body), e; }, getRelativeEventPosition: function(e, h) { - var a = document.documentElement, i = function(d) { - var n = 0, _ = 0, o = 0, t = 0; + var a = document.documentElement, r = function(d) { + var i = 0, _ = 0, o = 0, t = 0; if (d.getBoundingClientRect) { - var r = d.getBoundingClientRect(), s = document.body, c = document.documentElement || document.body.parentNode || document.body, u = window.pageYOffset || c.scrollTop || s.scrollTop, v = window.pageXOffset || c.scrollLeft || s.scrollLeft, m = c.clientTop || s.clientTop || 0, l = c.clientLeft || s.clientLeft || 0; - n = r.top + u - m, _ = r.left + v - l, o = document.body.offsetWidth - r.right, t = document.body.offsetHeight - r.bottom; + var n = d.getBoundingClientRect(), s = document.body, c = document.documentElement || document.body.parentNode || document.body, u = window.pageYOffset || c.scrollTop || s.scrollTop, v = window.pageXOffset || c.scrollLeft || s.scrollLeft, m = c.clientTop || s.clientTop || 0, l = c.clientLeft || s.clientLeft || 0; + i = n.top + u - m, _ = n.left + v - l, o = document.body.offsetWidth - n.right, t = document.body.offsetHeight - n.bottom; } else { for (; d; ) - n += parseInt(d.offsetTop, 10), _ += parseInt(d.offsetLeft, 10), d = d.offsetParent; - o = document.body.offsetWidth - d.offsetWidth - _, t = document.body.offsetHeight - d.offsetHeight - n; + i += parseInt(d.offsetTop, 10), _ += parseInt(d.offsetLeft, 10), d = d.offsetParent; + o = document.body.offsetWidth - d.offsetWidth - _, t = document.body.offsetHeight - d.offsetHeight - i; } - return { y: Math.round(n), x: Math.round(_), width: d.offsetWidth, height: d.offsetHeight, right: Math.round(o), bottom: Math.round(t) }; + return { y: Math.round(i), x: Math.round(_), width: d.offsetWidth, height: d.offsetHeight, right: Math.round(o), bottom: Math.round(t) }; }(h); - return { x: e.clientX + a.scrollLeft - a.clientLeft - i.x + h.scrollLeft, y: e.clientY + a.scrollTop - a.clientTop - i.y + h.scrollTop }; + return { x: e.clientX + a.scrollLeft - a.clientLeft - r.x + h.scrollLeft, y: e.clientY + a.scrollTop - a.clientTop - r.y + h.scrollTop }; }, getTargetNode: function(e) { var h; return e.tagName ? h = e : (h = (e = e || window.event).target || e.srcElement).shadowRoot && e.composedPath && (h = e.composedPath()[0]), h; }, getNodePosition: function(e) { - var h = 0, a = 0, i = 0, d = 0; + var h = 0, a = 0, r = 0, d = 0; if (e.getBoundingClientRect) { - var n = e.getBoundingClientRect(), _ = document.body, o = document.documentElement || document.body.parentNode || document.body, t = window.pageYOffset || o.scrollTop || _.scrollTop, r = window.pageXOffset || o.scrollLeft || _.scrollLeft, s = o.clientTop || _.clientTop || 0, c = o.clientLeft || _.clientLeft || 0; - h = n.top + t - s, a = n.left + r - c, i = document.body.offsetWidth - n.right, d = document.body.offsetHeight - n.bottom; + var i = e.getBoundingClientRect(), _ = document.body, o = document.documentElement || document.body.parentNode || document.body, t = window.pageYOffset || o.scrollTop || _.scrollTop, n = window.pageXOffset || o.scrollLeft || _.scrollLeft, s = o.clientTop || _.clientTop || 0, c = o.clientLeft || _.clientLeft || 0; + h = i.top + t - s, a = i.left + n - c, r = document.body.offsetWidth - i.right, d = document.body.offsetHeight - i.bottom; } else { for (; e; ) h += parseInt(e.offsetTop, 10), a += parseInt(e.offsetLeft, 10), e = e.offsetParent; - i = document.body.offsetWidth - e.offsetWidth - a, d = document.body.offsetHeight - e.offsetHeight - h; + r = document.body.offsetWidth - e.offsetWidth - a, d = document.body.offsetHeight - e.offsetHeight - h; } - return { y: Math.round(h), x: Math.round(a), width: e.offsetWidth, height: e.offsetHeight, right: Math.round(i), bottom: Math.round(d) }; + return { y: Math.round(h), x: Math.round(a), width: e.offsetWidth, height: e.offsetHeight, right: Math.round(r), bottom: Math.round(d) }; } }; var K; if (Element.prototype.closest) @@ -444,147 +444,147 @@ else { return null; }; } -var V = typeof window < "u"; -const ye = { isIE: V && (navigator.userAgent.indexOf("MSIE") >= 0 || navigator.userAgent.indexOf("Trident") >= 0), isIE6: V && !XMLHttpRequest && navigator.userAgent.indexOf("MSIE") >= 0, isIE7: V && navigator.userAgent.indexOf("MSIE 7.0") >= 0 && navigator.userAgent.indexOf("Trident") < 0, isIE8: V && navigator.userAgent.indexOf("MSIE 8.0") >= 0 && navigator.userAgent.indexOf("Trident") >= 0, isOpera: V && navigator.userAgent.indexOf("Opera") >= 0, isChrome: V && navigator.userAgent.indexOf("Chrome") >= 0, isKHTML: V && (navigator.userAgent.indexOf("Safari") >= 0 || navigator.userAgent.indexOf("Konqueror") >= 0), isFF: V && navigator.userAgent.indexOf("Firefox") >= 0, isIPad: V && navigator.userAgent.search(/iPad/gi) >= 0, isEdge: V && navigator.userAgent.indexOf("Edge") != -1, isNode: !V || typeof navigator > "u" }; +var B = typeof window < "u"; +const ye = { isIE: B && (navigator.userAgent.indexOf("MSIE") >= 0 || navigator.userAgent.indexOf("Trident") >= 0), isOpera: B && navigator.userAgent.indexOf("Opera") >= 0, isChrome: B && navigator.userAgent.indexOf("Chrome") >= 0, isKHTML: B && (navigator.userAgent.indexOf("Safari") >= 0 || navigator.userAgent.indexOf("Konqueror") >= 0), isFF: B && navigator.userAgent.indexOf("Firefox") >= 0, isIPad: B && navigator.userAgent.search(/iPad/gi) >= 0, isEdge: B && navigator.userAgent.indexOf("Edge") != -1, isNode: !B || typeof navigator > "u" }; function W(e) { if (typeof e == "string" || typeof e == "number") return e; var h = ""; for (var a in e) { - var i = ""; - e.hasOwnProperty(a) && (i = a + "=" + (i = typeof e[a] == "string" ? encodeURIComponent(e[a]) : typeof e[a] == "number" ? e[a] : encodeURIComponent(JSON.stringify(e[a]))), h.length && (i = "&" + i), h += i); + var r = ""; + e.hasOwnProperty(a) && (r = a + "=" + (r = typeof e[a] == "string" ? encodeURIComponent(e[a]) : typeof e[a] == "number" ? e[a] : encodeURIComponent(JSON.stringify(e[a]))), h.length && (r = "&" + r), h += r); } return h; } function be(e) { - var h = function(n, _) { - for (var o = "var temp=date.match(/[a-zA-Z]+|[0-9]+/g);", t = n.match(/%[a-zA-Z]/g), r = 0; r < t.length; r++) - switch (t[r]) { + var h = function(i, _) { + for (var o = "var temp=date.match(/[a-zA-Z]+|[0-9]+/g);", t = i.match(/%[a-zA-Z]/g), n = 0; n < t.length; n++) + switch (t[n]) { case "%j": case "%d": - o += "set[2]=temp[" + r + "]||1;"; + o += "set[2]=temp[" + n + "]||1;"; break; case "%n": case "%m": - o += "set[1]=(temp[" + r + "]||1)-1;"; + o += "set[1]=(temp[" + n + "]||1)-1;"; break; case "%y": - o += "set[0]=temp[" + r + "]*1+(temp[" + r + "]>50?1900:2000);"; + o += "set[0]=temp[" + n + "]*1+(temp[" + n + "]>50?1900:2000);"; break; case "%g": case "%G": case "%h": case "%H": - o += "set[3]=temp[" + r + "]||0;"; + o += "set[3]=temp[" + n + "]||0;"; break; case "%i": - o += "set[4]=temp[" + r + "]||0;"; + o += "set[4]=temp[" + n + "]||0;"; break; case "%Y": - o += "set[0]=temp[" + r + "]||0;"; + o += "set[0]=temp[" + n + "]||0;"; break; case "%a": case "%A": - o += "set[3]=set[3]%12+((temp[" + r + "]||'').toLowerCase()=='am'?0:12);"; + o += "set[3]=set[3]%12+((temp[" + n + "]||'').toLowerCase()=='am'?0:12);"; break; case "%s": - o += "set[5]=temp[" + r + "]||0;"; + o += "set[5]=temp[" + n + "]||0;"; break; case "%M": - o += "set[1]=this.locale.date.month_short_hash[temp[" + r + "]]||0;"; + o += "set[1]=this.locale.date.month_short_hash[temp[" + n + "]]||0;"; break; case "%F": - o += "set[1]=this.locale.date.month_full_hash[temp[" + r + "]]||0;"; + o += "set[1]=this.locale.date.month_full_hash[temp[" + n + "]]||0;"; } var s = "set[0],set[1],set[2],set[3],set[4],set[5]"; return _ && (s = " Date.UTC(" + s + ")"), new Function("date", "var set=[0,0,1,0,0,0]; " + o + " return new Date(" + s + ");"); - }, a = function(n, _) { - return function(o) { - for (var t = [0, 0, 1, 0, 0, 0], r = o.match(/[a-zA-Z]+|[0-9]+/g), s = n.match(/%[a-zA-Z]/g), c = 0; c < s.length; c++) - switch (s[c]) { + }, a = function(i, _) { + const o = i.match(/%[a-zA-Z]/g); + return function(t) { + for (var n = [0, 0, 1, 0, 0, 0], s = t.match(/[a-zA-Z]+|[0-9]+/g), c = 0; c < o.length; c++) + switch (o[c]) { case "%j": case "%d": - t[2] = r[c] || 1; + n[2] = s[c] || 1; break; case "%n": case "%m": - t[1] = (r[c] || 1) - 1; + n[1] = (s[c] || 1) - 1; break; case "%y": - t[0] = 1 * r[c] + (r[c] > 50 ? 1900 : 2e3); + n[0] = 1 * s[c] + (s[c] > 50 ? 1900 : 2e3); break; case "%g": case "%G": case "%h": case "%H": - t[3] = r[c] || 0; + n[3] = s[c] || 0; break; case "%i": - t[4] = r[c] || 0; + n[4] = s[c] || 0; break; case "%Y": - t[0] = r[c] || 0; + n[0] = s[c] || 0; break; case "%a": case "%A": - t[3] = t[3] % 12 + ((r[c] || "").toLowerCase() == "am" ? 0 : 12); + n[3] = n[3] % 12 + ((s[c] || "").toLowerCase() == "am" ? 0 : 12); break; case "%s": - t[5] = r[c] || 0; + n[5] = s[c] || 0; break; case "%M": - t[1] = e.locale.date.month_short_hash[r[c]] || 0; + n[1] = e.locale.date.month_short_hash[s[c]] || 0; break; case "%F": - t[1] = e.locale.date.month_full_hash[r[c]] || 0; + n[1] = e.locale.date.month_full_hash[s[c]] || 0; } - return _ ? new Date(Date.UTC(t[0], t[1], t[2], t[3], t[4], t[5])) : new Date(t[0], t[1], t[2], t[3], t[4], t[5]); + return _ ? new Date(Date.UTC(n[0], n[1], n[2], n[3], n[4], n[5])) : new Date(n[0], n[1], n[2], n[3], n[4], n[5]); }; - }, i = !1; + }; + let r; function d() { - return e.config.csp === "auto" ? i : e.config.csp; + var i = !1; + return e.config.csp === "auto" ? (r === void 0 && (r = function() { + try { + new Function("cspEnabled = false;"), r = !1; + } catch { + r = !0; + } + return r; + }()), i = r) : i = e.config.csp, i; } - (function() { - try { - new Function("canUseCsp = false;"); - } catch { - i = !0; - } - })(), e.date = { init: function() { - for (var n = e.locale.date.month_short, _ = e.locale.date.month_short_hash = {}, o = 0; o < n.length; o++) - _[n[o]] = o; - for (n = e.locale.date.month_full, _ = e.locale.date.month_full_hash = {}, o = 0; o < n.length; o++) - _[n[o]] = o; - }, _bind_host_object: function(n) { - return n.bind ? n.bind(e) : function() { - return n.apply(e, arguments); - }; - }, date_part: function(n) { - var _ = new Date(n); - return n.setHours(0), n.setMinutes(0), n.setSeconds(0), n.setMilliseconds(0), n.getHours() && (n.getDate() < _.getDate() || n.getMonth() < _.getMonth() || n.getFullYear() < _.getFullYear()) && n.setTime(n.getTime() + 36e5 * (24 - n.getHours())), n; - }, time_part: function(n) { - return (n.valueOf() / 1e3 - 60 * n.getTimezoneOffset()) % 86400; - }, week_start: function(n) { - var _ = n.getDay(); - return e.config.start_on_monday && (_ === 0 ? _ = 6 : _--), this.date_part(this.add(n, -1 * _, "day")); - }, month_start: function(n) { - return n.setDate(1), this.date_part(n); - }, year_start: function(n) { - return n.setMonth(0), this.month_start(n); - }, day_start: function(n) { - return this.date_part(n); - }, _add_days: function(n, _) { - var o = new Date(n.valueOf()); + e.date = { init: function() { + for (var i = e.locale.date.month_short, _ = e.locale.date.month_short_hash = {}, o = 0; o < i.length; o++) + _[i[o]] = o; + for (i = e.locale.date.month_full, _ = e.locale.date.month_full_hash = {}, o = 0; o < i.length; o++) + _[i[o]] = o; + }, date_part: function(i) { + var _ = new Date(i); + return i.setHours(0), i.setMinutes(0), i.setSeconds(0), i.setMilliseconds(0), i.getHours() && (i.getDate() < _.getDate() || i.getMonth() < _.getMonth() || i.getFullYear() < _.getFullYear()) && i.setTime(i.getTime() + 36e5 * (24 - i.getHours())), i; + }, time_part: function(i) { + return (i.valueOf() / 1e3 - 60 * i.getTimezoneOffset()) % 86400; + }, week_start: function(i) { + var _ = i.getDay(); + return e.config.start_on_monday && (_ === 0 ? _ = 6 : _--), this.date_part(this.add(i, -1 * _, "day")); + }, month_start: function(i) { + return i.setDate(1), this.date_part(i); + }, year_start: function(i) { + return i.setMonth(0), this.month_start(i); + }, day_start: function(i) { + return this.date_part(i); + }, _add_days: function(i, _) { + var o = new Date(i.valueOf()); if (o.setDate(o.getDate() + _), _ == Math.round(_) && _ > 0) { - var t = (+o - +n) % 864e5; - if (t && n.getTimezoneOffset() == o.getTimezoneOffset()) { - var r = t / 36e5; - o.setTime(o.getTime() + 60 * (24 - r) * 60 * 1e3); + var t = (+o - +i) % 864e5; + if (t && i.getTimezoneOffset() == o.getTimezoneOffset()) { + var n = t / 36e5; + o.setTime(o.getTime() + 60 * (24 - n) * 60 * 1e3); } } - return _ >= 0 && !n.getHours() && o.getHours() && (o.getDate() < n.getDate() || o.getMonth() < n.getMonth() || o.getFullYear() < n.getFullYear()) && o.setTime(o.getTime() + 36e5 * (24 - o.getHours())), o; - }, add: function(n, _, o) { - var t = new Date(n.valueOf()); + return _ >= 0 && !i.getHours() && o.getHours() && (o.getDate() < i.getDate() || o.getMonth() < i.getMonth() || o.getFullYear() < i.getFullYear()) && o.setTime(o.getTime() + 36e5 * (24 - o.getHours())), o; + }, add: function(i, _, o) { + var t = new Date(i.valueOf()); switch (o) { case "day": t = e.date._add_days(t, _); @@ -605,65 +605,63 @@ function be(e) { t.setTime(t.getTime() + 60 * _ * 1e3); break; default: - return e.date["add_" + o](n, _, o); + return e.date["add_" + o](i, _, o); } return t; - }, to_fixed: function(n) { - return n < 10 ? "0" + n : n; - }, copy: function(n) { - return new Date(n.valueOf()); - }, date_to_str: function(n, _) { - if (d()) - return function(t, r) { - return function(s) { - return t.replace(/%[a-zA-Z]/g, function(c) { - switch (c) { - case "%d": - return r ? e.date.to_fixed(s.getUTCDate()) : e.date.to_fixed(s.getDate()); - case "%m": - return r ? e.date.to_fixed(s.getUTCMonth() + 1) : e.date.to_fixed(s.getMonth() + 1); - case "%j": - return r ? s.getUTCDate() : s.getDate(); - case "%n": - return r ? s.getUTCMonth() + 1 : s.getMonth() + 1; - case "%y": - return r ? e.date.to_fixed(s.getUTCFullYear() % 100) : e.date.to_fixed(s.getFullYear() % 100); - case "%Y": - return r ? s.getUTCFullYear() : s.getFullYear(); - case "%D": - return r ? e.locale.date.day_short[s.getUTCDay()] : e.locale.date.day_short[s.getDay()]; - case "%l": - return r ? e.locale.date.day_full[s.getUTCDay()] : e.locale.date.day_full[s.getDay()]; - case "%M": - return r ? e.locale.date.month_short[s.getUTCMonth()] : e.locale.date.month_short[s.getMonth()]; - case "%F": - return r ? e.locale.date.month_full[s.getUTCMonth()] : e.locale.date.month_full[s.getMonth()]; - case "%h": - return r ? e.date.to_fixed((s.getUTCHours() + 11) % 12 + 1) : e.date.to_fixed((s.getHours() + 11) % 12 + 1); - case "%g": - return r ? (s.getUTCHours() + 11) % 12 + 1 : (s.getHours() + 11) % 12 + 1; - case "%G": - return r ? s.getUTCHours() : s.getHours(); - case "%H": - return r ? e.date.to_fixed(s.getUTCHours()) : e.date.to_fixed(s.getHours()); - case "%i": - return r ? e.date.to_fixed(s.getUTCMinutes()) : e.date.to_fixed(s.getMinutes()); - case "%a": - return r ? s.getUTCHours() > 11 ? "pm" : "am" : s.getHours() > 11 ? "pm" : "am"; - case "%A": - return r ? s.getUTCHours() > 11 ? "PM" : "AM" : s.getHours() > 11 ? "PM" : "AM"; - case "%s": - return r ? e.date.to_fixed(s.getUTCSeconds()) : e.date.to_fixed(s.getSeconds()); - case "%W": - return r ? e.date.to_fixed(e.date.getUTCISOWeek(s)) : e.date.to_fixed(e.date.getISOWeek(s)); - default: - return c; - } - }); - }; - }(n, _); - n = n.replace(/%[a-zA-Z]/g, function(t) { - switch (t) { + }, to_fixed: function(i) { + return i < 10 ? "0" + i : i; + }, copy: function(i) { + return new Date(i.valueOf()); + }, date_to_str: function(i, _) { + return d() ? function(o, t) { + return function(n) { + return o.replace(/%[a-zA-Z]/g, function(s) { + switch (s) { + case "%d": + return t ? e.date.to_fixed(n.getUTCDate()) : e.date.to_fixed(n.getDate()); + case "%m": + return t ? e.date.to_fixed(n.getUTCMonth() + 1) : e.date.to_fixed(n.getMonth() + 1); + case "%j": + return t ? n.getUTCDate() : n.getDate(); + case "%n": + return t ? n.getUTCMonth() + 1 : n.getMonth() + 1; + case "%y": + return t ? e.date.to_fixed(n.getUTCFullYear() % 100) : e.date.to_fixed(n.getFullYear() % 100); + case "%Y": + return t ? n.getUTCFullYear() : n.getFullYear(); + case "%D": + return t ? e.locale.date.day_short[n.getUTCDay()] : e.locale.date.day_short[n.getDay()]; + case "%l": + return t ? e.locale.date.day_full[n.getUTCDay()] : e.locale.date.day_full[n.getDay()]; + case "%M": + return t ? e.locale.date.month_short[n.getUTCMonth()] : e.locale.date.month_short[n.getMonth()]; + case "%F": + return t ? e.locale.date.month_full[n.getUTCMonth()] : e.locale.date.month_full[n.getMonth()]; + case "%h": + return t ? e.date.to_fixed((n.getUTCHours() + 11) % 12 + 1) : e.date.to_fixed((n.getHours() + 11) % 12 + 1); + case "%g": + return t ? (n.getUTCHours() + 11) % 12 + 1 : (n.getHours() + 11) % 12 + 1; + case "%G": + return t ? n.getUTCHours() : n.getHours(); + case "%H": + return t ? e.date.to_fixed(n.getUTCHours()) : e.date.to_fixed(n.getHours()); + case "%i": + return t ? e.date.to_fixed(n.getUTCMinutes()) : e.date.to_fixed(n.getMinutes()); + case "%a": + return t ? n.getUTCHours() > 11 ? "pm" : "am" : n.getHours() > 11 ? "pm" : "am"; + case "%A": + return t ? n.getUTCHours() > 11 ? "PM" : "AM" : n.getHours() > 11 ? "PM" : "AM"; + case "%s": + return t ? e.date.to_fixed(n.getUTCSeconds()) : e.date.to_fixed(n.getSeconds()); + case "%W": + return t ? e.date.to_fixed(e.date.getUTCISOWeek(n)) : e.date.to_fixed(e.date.getISOWeek(n)); + default: + return s; + } + }); + }; + }(i, _) : (i = i.replace(/%[a-zA-Z]/g, function(o) { + switch (o) { case "%d": return '"+this.date.to_fixed(date.getDate())+"'; case "%m": @@ -703,13 +701,11 @@ function be(e) { case "%W": return '"+this.date.to_fixed(this.date.getISOWeek(date))+"'; default: - return t; + return o; } - }), _ && (n = n.replace(/date\.get/g, "date.getUTC")); - var o = new Function("date", 'return "' + n + '";'); - return e.date._bind_host_object(o); - }, str_to_date: function(n, _, o) { - var t = d() ? a : h, r = t(n, _), s = /^[0-9]{4}(\-|\/)[0-9]{2}(\-|\/)[0-9]{2} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/, c = /^[0-9]{2}\/[0-9]{2}\/[0-9]{4} ?(([0-9]{1,2}:[0-9]{2})(:[0-9]{1,2})?)?$/, u = /^[0-9]{2}\-[0-9]{2}\-[0-9]{4} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/, v = /^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/, m = t("%Y-%m-%d %H:%i:%s", _), l = t("%m/%d/%Y %H:%i:%s", _), f = t("%d-%m-%Y %H:%i:%s", _); + }), _ && (i = i.replace(/date\.get/g, "date.getUTC")), new Function("date", 'return "' + i + '";').bind(e)); + }, str_to_date: function(i, _, o) { + var t = d() ? a : h, n = t(i, _), s = /^[0-9]{4}(\-|\/)[0-9]{2}(\-|\/)[0-9]{2} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/, c = /^[0-9]{2}\/[0-9]{2}\/[0-9]{4} ?(([0-9]{1,2}:[0-9]{2})(:[0-9]{1,2})?)?$/, u = /^[0-9]{2}\-[0-9]{2}\-[0-9]{4} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/, v = /^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/, m = t("%Y-%m-%d %H:%i:%s", _), l = t("%m/%d/%Y %H:%i:%s", _), f = t("%d-%m-%Y %H:%i:%s", _); return function(g) { if (!o && !e.config.parse_exact_format) { if (g && g.getISOWeek) @@ -732,121 +728,121 @@ function be(e) { return new Date(g); } var p; - return r.call(e, g); + return n.call(e, g); }; - }, getISOWeek: function(n) { - if (!n) + }, getISOWeek: function(i) { + if (!i) return !1; - var _ = (n = this.date_part(new Date(n))).getDay(); + var _ = (i = this.date_part(new Date(i))).getDay(); _ === 0 && (_ = 7); - var o = new Date(n.valueOf()); - o.setDate(n.getDate() + (4 - _)); - var t = o.getFullYear(), r = Math.round((o.getTime() - new Date(t, 0, 1).getTime()) / 864e5); - return 1 + Math.floor(r / 7); - }, getUTCISOWeek: function(n) { - return this.getISOWeek(this.convert_to_utc(n)); - }, convert_to_utc: function(n) { - return new Date(n.getUTCFullYear(), n.getUTCMonth(), n.getUTCDate(), n.getUTCHours(), n.getUTCMinutes(), n.getUTCSeconds()); + var o = new Date(i.valueOf()); + o.setDate(i.getDate() + (4 - _)); + var t = o.getFullYear(), n = Math.round((o.getTime() - new Date(t, 0, 1).getTime()) / 864e5); + return 1 + Math.floor(n / 7); + }, getUTCISOWeek: function(i) { + return this.getISOWeek(this.convert_to_utc(i)); + }, convert_to_utc: function(i) { + return new Date(i.getUTCFullYear(), i.getUTCMonth(), i.getUTCDate(), i.getUTCHours(), i.getUTCMinutes(), i.getUTCSeconds()); } }; } function oe(e) { return (function() { var h = {}; for (var a in this._events) { - var i = this._events[a]; - i.id.toString().indexOf("#") == -1 && (h[i.id] = i); + var r = this._events[a]; + r.id.toString().indexOf("#") == -1 && (h[r.id] = r); } return h; }).bind(e); } function xe(e) { - e._loaded = {}, e._load = function(a, i) { + e._loaded = {}, e._load = function(a, r) { if (a = a || this._load_url) { var d; - if (a += (a.indexOf("?") == -1 ? "?" : "&") + "timeshift=" + (/* @__PURE__ */ new Date()).getTimezoneOffset(), this.config.prevent_cache && (a += "&uid=" + this.uid()), i = i || this._date, this._load_mode) { - var n = this.templates.load_format; - for (i = this.date[this._load_mode + "_start"](new Date(i.valueOf())); i > this._min_date; ) - i = this.date.add(i, -1, this._load_mode); - d = i; + if (a += (a.indexOf("?") == -1 ? "?" : "&") + "timeshift=" + (/* @__PURE__ */ new Date()).getTimezoneOffset(), this.config.prevent_cache && (a += "&uid=" + this.uid()), r = r || this._date, this._load_mode) { + var i = this.templates.load_format; + for (r = this.date[this._load_mode + "_start"](new Date(r.valueOf())); r > this._min_date; ) + r = this.date.add(r, -1, this._load_mode); + d = r; for (var _ = !0; d < this._max_date; ) - d = this.date.add(d, 1, this._load_mode), this._loaded[n(i)] && _ ? i = this.date.add(i, 1, this._load_mode) : _ = !1; + d = this.date.add(d, 1, this._load_mode), this._loaded[i(r)] && _ ? r = this.date.add(r, 1, this._load_mode) : _ = !1; var o = d; do d = o, o = this.date.add(d, -1, this._load_mode); - while (o > i && this._loaded[n(o)]); - if (d <= i) + while (o > r && this._loaded[i(o)]); + if (d <= r) return !1; - for (e.ajax.get(a + "&from=" + n(i) + "&to=" + n(d), t); i < d; ) - this._loaded[n(i)] = !0, i = this.date.add(i, 1, this._load_mode); + for (e.ajax.get(a + "&from=" + i(r) + "&to=" + i(d), t); r < d; ) + this._loaded[i(r)] = !0, r = this.date.add(r, 1, this._load_mode); } else e.ajax.get(a, t); return this.callEvent("onXLS", []), this.callEvent("onLoadStart", []), !0; } - function t(r) { - e.on_load(r), e.callEvent("onLoadEnd", []); + function t(n) { + e.on_load(n), e.callEvent("onLoadEnd", []); } }, e._parsers = {}, function(a) { - a._parsers.xml = { canParse: function(i, d) { + a._parsers.xml = { canParse: function(r, d) { if (d.responseXML && d.responseXML.firstChild) return !0; try { - var n = a.ajax.parse(d.responseText), _ = a.ajax.xmltop("data", n); + var i = a.ajax.parse(d.responseText), _ = a.ajax.xmltop("data", i); if (_ && _.tagName === "data") return !0; } catch { } return !1; - }, parse: function(i) { + }, parse: function(r) { var d; - if (i.xmlDoc.responseXML || (i.xmlDoc.responseXML = a.ajax.parse(i.xmlDoc.responseText)), (d = a.ajax.xmltop("data", i.xmlDoc)).tagName != "data") + if (r.xmlDoc.responseXML || (r.xmlDoc.responseXML = a.ajax.parse(r.xmlDoc.responseText)), (d = a.ajax.xmltop("data", r.xmlDoc)).tagName != "data") return null; - var n = d.getAttribute("dhx_security"); - n && (window.dhtmlx && (window.dhtmlx.security_key = n), a.security_key = n); - for (var _ = a.ajax.xpath("//coll_options", i.xmlDoc), o = 0; o < _.length; o++) { - var t = _[o].getAttribute("for"), r = a.serverList[t]; - r || (a.serverList[t] = r = []), r.splice(0, r.length); + var i = d.getAttribute("dhx_security"); + i && (window.dhtmlx && (window.dhtmlx.security_key = i), a.security_key = i); + for (var _ = a.ajax.xpath("//coll_options", r.xmlDoc), o = 0; o < _.length; o++) { + var t = _[o].getAttribute("for"), n = a.serverList[t]; + n || (a.serverList[t] = n = []), n.splice(0, n.length); for (var s = a.ajax.xpath(".//item", _[o]), c = 0; c < s.length; c++) { for (var u = s[c].attributes, v = { key: s[c].getAttribute("value"), label: s[c].getAttribute("label") }, m = 0; m < u.length; m++) { var l = u[m]; l.nodeName != "value" && l.nodeName != "label" && (v[l.nodeName] = l.nodeValue); } - r.push(v); + n.push(v); } } _.length && a.callEvent("onOptionsLoad", []); - var f = a.ajax.xpath("//userdata", i.xmlDoc); + var f = a.ajax.xpath("//userdata", r.xmlDoc); for (o = 0; o < f.length; o++) { var g = a._xmlNodeToJSON(f[o]); a._userdata[g.name] = g.text; } var p = []; - for (d = a.ajax.xpath("//event", i.xmlDoc), o = 0; o < d.length; o++) { + for (d = a.ajax.xpath("//event", r.xmlDoc), o = 0; o < d.length; o++) { var y = p[o] = a._xmlNodeToJSON(d[o]); a._init_event(y); } return p; } }; }(e), function(a) { - a.json = a._parsers.json = { canParse: function(i) { - if (i && typeof i == "object") + a.json = a._parsers.json = { canParse: function(r) { + if (r && typeof r == "object") return !0; - if (typeof i == "string") + if (typeof r == "string") try { - var d = JSON.parse(i); + var d = JSON.parse(r); return Object.prototype.toString.call(d) === "[object Object]" || Object.prototype.toString.call(d) === "[object Array]"; } catch { return !1; } return !1; - }, parse: function(i) { + }, parse: function(r) { var d = []; - typeof i == "string" && (i = JSON.parse(i)), Object.prototype.toString.call(i) === "[object Array]" ? d = i : i && (i.events ? d = i.events : i.data && (d = i.data)), d = d || [], i.dhx_security && (window.dhtmlx && (window.dhtmlx.security_key = i.dhx_security), a.security_key = i.dhx_security); - var n = i && i.collections ? i.collections : {}, _ = !1; - for (var o in n) - if (n.hasOwnProperty(o)) { + typeof r == "string" && (r = JSON.parse(r)), Object.prototype.toString.call(r) === "[object Array]" ? d = r : r && (r.events ? d = r.events : r.data && (d = r.data)), d = d || [], r.dhx_security && (window.dhtmlx && (window.dhtmlx.security_key = r.dhx_security), a.security_key = r.dhx_security); + var i = r && r.collections ? r.collections : {}, _ = !1; + for (var o in i) + if (i.hasOwnProperty(o)) { _ = !0; - var t = n[o], r = a.serverList[o]; - r || (a.serverList[o] = r = []), r.splice(0, r.length); + var t = i[o], n = a.serverList[o]; + n || (a.serverList[o] = n = []), n.splice(0, n.length); for (var s = 0; s < t.length; s++) { var c = t[s], u = { key: c.value, label: c.label }; for (var v in c) @@ -855,7 +851,7 @@ function xe(e) { continue; u[v] = c[v]; } - r.push(u); + n.push(u); } } _ && a.callEvent("onOptionsLoad", []); @@ -866,62 +862,62 @@ function xe(e) { return m; } }; }(e), function(a) { - a.ical = a._parsers.ical = { canParse: function(i) { - return typeof i == "string" && new RegExp("^BEGIN:VCALENDAR").test(i); - }, parse: function(i) { - var d = i.match(RegExp(this.c_start + "[^\f]*" + this.c_end, "")); + a.ical = a._parsers.ical = { canParse: function(r) { + return typeof r == "string" && new RegExp("^BEGIN:VCALENDAR").test(r); + }, parse: function(r) { + var d = r.match(RegExp(this.c_start + "[^\f]*" + this.c_end, "")); if (d.length) { d[0] = d[0].replace(/[\r\n]+ /g, ""), d[0] = d[0].replace(/[\r\n]+(?=[a-z \t])/g, " "), d[0] = d[0].replace(/;[^:\r\n]*:/g, ":"); - for (var n, _ = [], o = RegExp("(?:" + this.e_start + ")([^\f]*?)(?:" + this.e_end + ")", "g"); (n = o.exec(d)) !== null; ) { - for (var t, r = {}, s = /[^\r\n]+[\r\n]+/g; (t = s.exec(n[1])) !== null; ) - this.parse_param(t.toString(), r); - r.uid && !r.id && (r.id = r.uid), _.push(r); + for (var i, _ = [], o = RegExp("(?:" + this.e_start + ")([^\f]*?)(?:" + this.e_end + ")", "g"); (i = o.exec(d)) !== null; ) { + for (var t, n = {}, s = /[^\r\n]+[\r\n]+/g; (t = s.exec(i[1])) !== null; ) + this.parse_param(t.toString(), n); + n.uid && !n.id && (n.id = n.uid), _.push(n); } return _; } - }, parse_param: function(i, d) { - var n = i.indexOf(":"); - if (n != -1) { - var _ = i.substr(0, n).toLowerCase(), o = i.substr(n + 1).replace(/\\,/g, ",").replace(/[\r\n]+$/, ""); + }, parse_param: function(r, d) { + var i = r.indexOf(":"); + if (i != -1) { + var _ = r.substr(0, i).toLowerCase(), o = r.substr(i + 1).replace(/\\,/g, ",").replace(/[\r\n]+$/, ""); _ == "summary" ? _ = "text" : _ == "dtstart" ? (_ = "start_date", o = this.parse_date(o, 0, 0)) : _ == "dtend" && (_ = "end_date", o = this.parse_date(o, 0, 0)), d[_] = o; } - }, parse_date: function(i, d, n) { - var _ = i.split("T"), o = !1; - _[1] && (d = _[1].substr(0, 2), n = _[1].substr(2, 2), o = _[1][6] == "Z"); - var t = _[0].substr(0, 4), r = parseInt(_[0].substr(4, 2), 10) - 1, s = _[0].substr(6, 2); - return a.config.server_utc || o ? new Date(Date.UTC(t, r, s, d, n)) : new Date(t, r, s, d, n); + }, parse_date: function(r, d, i) { + var _ = r.split("T"), o = !1; + _[1] && (d = _[1].substr(0, 2), i = _[1].substr(2, 2), o = _[1][6] == "Z"); + var t = _[0].substr(0, 4), n = parseInt(_[0].substr(4, 2), 10) - 1, s = _[0].substr(6, 2); + return a.config.server_utc || o ? new Date(Date.UTC(t, n, s, d, i)) : new Date(t, n, s, d, i); }, c_start: "BEGIN:VCALENDAR", e_start: "BEGIN:VEVENT", e_end: "END:VEVENT", c_end: "END:VCALENDAR" }; }(e), e.on_load = function(a) { - var i; + var r; this.callEvent("onBeforeParse", []); - var d = !1, n = !1; + var d = !1, i = !1; for (var _ in this._parsers) { var o = this._parsers[_]; if (o.canParse(a.xmlDoc.responseText, a.xmlDoc)) { try { var t = a.xmlDoc.responseText; - _ === "xml" && (t = a), (i = o.parse(t)) || (d = !0); + _ === "xml" && (t = a), (r = o.parse(t)) || (d = !0); } catch { d = !0; } - n = !0; + i = !0; break; } } - if (!n) + if (!i) if (this._process && this[this._process]) try { - i = this[this._process].parse(a.xmlDoc.responseText); + r = this[this._process].parse(a.xmlDoc.responseText); } catch { d = !0; } else d = !0; - (d || a.xmlDoc.status && a.xmlDoc.status >= 400) && (this.callEvent("onLoadError", [a.xmlDoc]), i = []), this._process_loading(i), this.callEvent("onXLE", []), this.callEvent("onParse", []); + (d || a.xmlDoc.status && a.xmlDoc.status >= 400) && (this.callEvent("onLoadError", [a.xmlDoc]), r = []), this._process_loading(r), this.callEvent("onXLE", []), this.callEvent("onParse", []); }, e._process_loading = function(a) { this._loading = !0, this._not_render = !0; - for (var i = 0; i < a.length; i++) - this.callEvent("onEventLoading", [a[i]]) && this.addEvent(a[i]); + for (var r = 0; r < a.length; r++) + this.callEvent("onEventLoading", [a[r]]) && this.addEvent(a[r]); this._not_render = !1, this._render_wait && this.render_view_data(), this._loading = !1, this._after_call && this._after_call(), this._after_call = null; }, e._init_event = function(a) { a.text = a.text || a._tagvalue || "", a.start_date = e._init_date(a.start_date), a.end_date = e._init_date(a.end_date); @@ -930,36 +926,36 @@ function xe(e) { }; const h = oe(e); e.serialize = function() { - const a = [], i = h(); - for (var d in i) { + const a = [], r = h(); + for (var d in r) { const o = {}; - var n = i[d]; - for (var _ in n) { + var i = r[d]; + for (var _ in i) { if (_.charAt(0) == "$" || _.charAt(0) == "_") continue; let t; - const r = n[_]; - t = e.utils.isDate(r) ? e.defined(e.templates.xml_format) ? e.templates.xml_format(r) : e.templates.format_date(r) : r, o[_] = t; + const n = i[_]; + t = e.utils.isDate(n) ? e.defined(e.templates.xml_format) ? e.templates.xml_format(n) : e.templates.format_date(n) : n, o[_] = t; } a.push(o); } return a; - }, e.parse = function(a, i) { - this._process = i, this.on_load({ xmlDoc: { responseText: a } }); - }, e.load = function(a, i) { - typeof i == "string" && (this._process = i, i = arguments[2]), this._load_url = a, this._after_call = i, this._load(a, this._date); + }, e.parse = function(a, r) { + this._process = r, this.on_load({ xmlDoc: { responseText: a } }); + }, e.load = function(a, r) { + typeof r == "string" && (this._process = r, r = arguments[2]), this._load_url = a, this._after_call = r, this._load(a, this._date); }, e.setLoadMode = function(a) { a == "all" && (a = ""), this._load_mode = a; - }, e.serverList = function(a, i) { - return i ? (this.serverList[a] = i.slice(0), this.serverList[a]) : (this.serverList[a] = this.serverList[a] || [], this.serverList[a]); + }, e.serverList = function(a, r) { + return r ? (this.serverList[a] = r.slice(0), this.serverList[a]) : (this.serverList[a] = this.serverList[a] || [], this.serverList[a]); }, e._userdata = {}, e._xmlNodeToJSON = function(a) { - for (var i = {}, d = 0; d < a.attributes.length; d++) - i[a.attributes[d].name] = a.attributes[d].value; + for (var r = {}, d = 0; d < a.attributes.length; d++) + r[a.attributes[d].name] = a.attributes[d].value; for (d = 0; d < a.childNodes.length; d++) { - var n = a.childNodes[d]; - n.nodeType == 1 && (i[n.tagName] = n.firstChild ? n.firstChild.nodeValue : ""); + var i = a.childNodes[d]; + i.nodeType == 1 && (r[i.tagName] = i.firstChild ? i.firstChild.nodeValue : ""); } - return i.text || (i.text = a.firstChild ? a.firstChild.nodeValue : ""), i; + return r.text || (r.text = a.firstChild ? a.firstChild.nodeValue : ""), r; }, e.attachEvent("onXLS", function() { var a; this.config.show_loading === !0 && ((a = this.config.show_loading = document.createElement("div")).className = "dhx_loading", a.style.left = Math.round((this._x - 128) / 2) + "px", a.style.top = Math.round((this._y - 15) / 2) + "px", this._obj.appendChild(a)); @@ -991,23 +987,23 @@ function we(e) { return !a || a.pointerType == a.MSPOINTER_TYPE_MOUSE; }); } - }, e._touch_events = function(h, a, i) { - var d, n, _, o, t, r, s = 0; + }, e._touch_events = function(h, a, r) { + var d, i, _, o, t, n, s = 0; function c(v, m, l) { e.event(v, m, function(f) { - return !!e._is_lightbox_open() || (i(f) ? void 0 : l(f)); + return !!e._is_lightbox_open() || (r(f) ? void 0 : l(f)); }, { passive: !1 }); } function u(v) { - i(v) || (e._hide_global_tip(), o && (e._on_mouse_up(a(v)), e._temp_touch_block = !1), e._drag_id = null, e._drag_mode = null, e._drag_pos = null, e._pointerDragId = null, clearTimeout(_), o = r = !1, t = !0); + r(v) || (e._hide_global_tip(), o && (e._on_mouse_up(a(v)), e._temp_touch_block = !1), e._drag_id = null, e._drag_mode = null, e._drag_pos = null, e._pointerDragId = null, clearTimeout(_), o = n = !1, t = !0); } c(document.body, h[0], function(v) { - if (!i(v)) { + if (!r(v)) { var m = a(v); if (m) { if (o) return function(l) { - if (!i(l)) { + if (!r(l)) { var f = e.getState().drag_mode, g = !!e.matrix && e.matrix[e._mode], p = e.render_view_data; f == "create" && g && (e.render_view_data = function() { for (var y = e.getState().drag_id, w = e.getEvent(y), b = g.y_property, k = e.getEvents(w.start_date, w.end_date), E = 0; E < k.length; E++) @@ -1016,16 +1012,16 @@ function we(e) { }), e._on_mouse_move(l), f == "create" && g && (e.render_view_data = p), l.preventDefault && l.preventDefault(), l.cancelBubble = !0; } }(m), v.preventDefault && v.preventDefault(), v.cancelBubble = !0, e._update_global_tip(), !1; - n = a(v), r && (n ? (d.target != n.target || Math.abs(d.pageX - n.pageX) > 5 || Math.abs(d.pageY - n.pageY) > 5) && (t = !0, clearTimeout(_)) : t = !0); + i = a(v), n && (i ? (d.target != i.target || Math.abs(d.pageX - i.pageX) > 5 || Math.abs(d.pageY - i.pageY) > 5) && (t = !0, clearTimeout(_)) : t = !0); } } }), c(this._els.dhx_cal_data[0], "touchcancel", u), c(this._els.dhx_cal_data[0], "contextmenu", function(v) { - if (!i(v)) - return r ? (v && v.preventDefault && v.preventDefault(), v.cancelBubble = !0, !1) : void 0; + if (!r(v)) + return n ? (v && v.preventDefault && v.preventDefault(), v.cancelBubble = !0, !1) : void 0; }), c(this._obj, h[1], function(v) { var m; - if (document && document.body && document.body.classList.add("dhx_cal_touch_active"), !i(v)) - if (e._pointerDragId = v.pointerId, o = t = !1, r = !0, m = n = a(v)) { + if (document && document.body && document.body.classList.add("dhx_cal_touch_active"), !r(v)) + if (e._pointerDragId = v.pointerId, o = t = !1, n = !0, m = i = a(v)) { var l = /* @__PURE__ */ new Date(); if (!t && !o && l - s < 250) return e._click.dhx_cal_data(m), window.setTimeout(function() { @@ -1048,7 +1044,7 @@ function we(e) { } else t = !0; }), c(this._els.dhx_cal_data[0], h[2], function(v) { - if (document && document.body && document.body.classList.remove("dhx_cal_touch_active"), !i(v)) + if (document && document.body && document.body.classList.remove("dhx_cal_touch_active"), !r(v)) return e.config.touch_swipe_dates && !o && function(m, l, f, g) { if (!m || !l) return !1; @@ -1058,7 +1054,7 @@ function we(e) { return !1; var y = Math.abs(m.pageY - l.pageY), w = Math.abs(m.pageX - l.pageX); return y < g && w > f && (!y || w / y > 3) && (m.pageX > l.pageX ? e._click.dhx_cal_next_button() : e._click.dhx_cal_prev_button(), !0); - }(d, n, 200, 100) && (e._block_next_stop = !0), o && (e._ignore_next_click = !0, setTimeout(function() { + }(d, i, 200, 100) && (e._block_next_stop = !0), o && (e._ignore_next_click = !0, setTimeout(function() { e._ignore_next_click = !1; }, 100)), u(v), e._block_next_stop ? (e._block_next_stop = !1, v.preventDefault && v.preventDefault(), v.cancelBubble = !0, !1) : void 0; }), e.event(document.body, h[2], u); @@ -1069,12 +1065,12 @@ function we(e) { }, e._update_global_tip = function(h) { var a = e._global_tip; if (a) { - var i = ""; + var r = ""; if (e._drag_id && !h) { var d = e.getEvent(e._drag_id); - d && (i = "
" + (d._timed ? e.templates.event_header(d.start_date, d.end_date, d) : e.templates.day_date(d.start_date, d.end_date, d)) + "
"); + d && (r = "
" + (d._timed ? e.templates.event_header(d.start_date, d.end_date, d) : e.templates.day_date(d.start_date, d.end_date, d)) + "
"); } - e._drag_mode == "create" || e._drag_mode == "new-size" ? a.innerHTML = (e.locale.labels.drag_to_create || "Drag to create") + i : a.innerHTML = (e.locale.labels.drag_to_move || "Drag to move") + i; + e._drag_mode == "create" || e._drag_mode == "new-size" ? a.innerHTML = (e.locale.labels.drag_to_create || "Drag to create") + r : a.innerHTML = (e.locale.labels.drag_to_move || "Drag to move") + r; } }, e._hide_global_tip = function() { var h = e._global_tip; @@ -1083,7 +1079,7 @@ function we(e) { } function ke(e) { var h, a; - function i() { + function r() { if (e._is_material_skin()) return !0; if (a !== void 0) @@ -1098,10 +1094,10 @@ function ke(e) { function d() { if (!e._is_material_skin() && !e._border_box_events()) { var o = a; - a = void 0, h = void 0, o !== i() && e.$container && e.getState().mode && e.setCurrentView(); + a = void 0, h = void 0, o !== r() && e.$container && e.getState().mode && e.setCurrentView(); } } - function n(o) { + function i(o) { var t = o.getMinutes(); return t = t < 10 ? "0" + t : t, "" + o.getHours() + " " + t + ""; } @@ -1128,30 +1124,30 @@ function ke(e) { }, 100)); })(); const o = getComputedStyle(this.$container), t = o.getPropertyValue("--dhx-scheduler-theme"); - let r, s = !!t, c = {}, u = !1; + let n, s = !!t, c = {}, u = !1; if (s) { - r = t; + n = t; for (let v in e.xy) c[v] = o.getPropertyValue(`--dhx-scheduler-xy-${v}`); c.hour_size_px = o.getPropertyValue("--dhx-scheduler-config-hour_size_px"), c.wide_form = o.getPropertyValue("--dhx-scheduler-config-form_wide"); } else - r = function() { + n = function() { for (var v = document.getElementsByTagName("link"), m = 0; m < v.length; m++) { var l = v[m].href.match("dhtmlxscheduler_([a-z]+).css"); if (l) return l[1]; } }(), u = e._is_material_skin(); - if (e._theme_info = { theme: r, cssVarTheme: s, oldMaterialTheme: u, values: c }, e._theme_info.cssVarTheme) { + if (e._theme_info = { theme: n, cssVarTheme: s, oldMaterialTheme: u, values: c }, e._theme_info.cssVarTheme) { const v = this._theme_info.values; for (let m in e.xy) isNaN(parseInt(v[m])) || (e.xy[m] = parseInt(v[m])); } }, e.event(window, "DOMContentLoaded", d), e.event(window, "load", d), e._border_box_events = function() { - return i(); - }, e._configure = function(o, t, r) { + return r(); + }, e._configure = function(o, t, n) { for (var s in t) - o[s] === void 0 && (o[s] = t[s][r]); + o[s] === void 0 && (o[s] = t[s][n]); }, e.setSkin = function(o) { this.skin = o, e._addThemeClass(), e.$container && (this._skin_init(), this.render()); }; @@ -1159,40 +1155,40 @@ function ke(e) { e.attachEvent("onDestroy", function() { clearInterval(_); }), e._skin_init = function() { - this._build_skin_info(), this.skin || (this.skin = this._theme_info.theme), e._addThemeClass(), e.skin === "flat" ? e.templates.hour_scale = n : e.templates.hour_scale === n && (e.templates.hour_scale = e.date.date_to_str(e.config.hour_date)), e.attachEvent("onTemplatesReady", function() { + this._build_skin_info(), this.skin || (this.skin = this._theme_info.theme), e._addThemeClass(), e.skin === "flat" ? e.templates.hour_scale = i : e.templates.hour_scale === i && (e.templates.hour_scale = e.date.date_to_str(e.config.hour_date)), e.attachEvent("onTemplatesReady", function() { var o = e.date.date_to_str("%d"); e.templates._old_month_day || (e.templates._old_month_day = e.templates.month_day); var t = e.templates._old_month_day; - e.templates.month_day = function(r) { + e.templates.month_day = function(n) { if (this._mode == "month") { - var s = o(r); - return r.getDate() == 1 && (s = e.locale.date.month_full[r.getMonth()] + " " + s), +r == +e.date.date_part(this._currentDate()) && (s = e.locale.labels.dhx_cal_today_button + " " + s), s; + var s = o(n); + return n.getDate() == 1 && (s = e.locale.date.month_full[n.getMonth()] + " " + s), +n == +e.date.date_part(this._currentDate()) && (s = e.locale.labels.dhx_cal_today_button + " " + s), s; } - return t.call(this, r); - }, e.config.fix_tab_position && (e._els.dhx_cal_navline[0].querySelectorAll("[data-tab]").forEach((r) => { - switch (r.getAttribute("data-tab") || r.getAttribute("name")) { + return t.call(this, n); + }, e.config.fix_tab_position && (e._els.dhx_cal_navline[0].querySelectorAll("[data-tab]").forEach((n) => { + switch (n.getAttribute("data-tab") || n.getAttribute("name")) { case "day": case "day_tab": - r.classList.add("dhx_cal_tab_first"), r.classList.add("dhx_cal_tab_segmented"); + n.classList.add("dhx_cal_tab_first"), n.classList.add("dhx_cal_tab_segmented"); break; case "week": case "week_tab": - r.classList.add("dhx_cal_tab_segmented"); + n.classList.add("dhx_cal_tab_segmented"); break; case "month": case "month_tab": - r.classList.add("dhx_cal_tab_last"), r.classList.add("dhx_cal_tab_segmented"); + n.classList.add("dhx_cal_tab_last"), n.classList.add("dhx_cal_tab_segmented"); break; default: - r.classList.add("dhx_cal_tab_standalone"); + n.classList.add("dhx_cal_tab_standalone"); } - }), function(r) { + }), function(n) { if (e.config.header) return; - const s = Array.from(r.querySelectorAll(".dhx_cal_tab")), c = ["day", "week", "month"].map((v) => s.find((m) => m.getAttribute("data-tab") === v)).filter((v) => v !== void 0); + const s = Array.from(n.querySelectorAll(".dhx_cal_tab")), c = ["day", "week", "month"].map((v) => s.find((m) => m.getAttribute("data-tab") === v)).filter((v) => v !== void 0); let u = s.length > 0 ? s[0] : null; c.reverse().forEach((v) => { - r.insertBefore(v, u), u = v; + n.insertBefore(v, u), u = v; }); }(e._els.dhx_cal_navline[0])); }, { once: !0 }); @@ -1200,25 +1196,25 @@ function ke(e) { } function Ee(e, h) { this.$scheduler = e, this.$dp = h, this._dataProcessorHandlers = [], this.attach = function() { - var a = this.$dp, i = this.$scheduler; - this._dataProcessorHandlers.push(i.attachEvent("onEventAdded", function(d) { + var a = this.$dp, r = this.$scheduler; + this._dataProcessorHandlers.push(r.attachEvent("onEventAdded", function(d) { !this._loading && this._validId(d) && a.setUpdated(d, !0, "inserted"); - })), this._dataProcessorHandlers.push(i.attachEvent("onConfirmedBeforeEventDelete", function(d) { + })), this._dataProcessorHandlers.push(r.attachEvent("onConfirmedBeforeEventDelete", function(d) { if (this._validId(d)) { - var n = a.getState(d); - return n == "inserted" || this._new_event ? (a.setUpdated(d, !1), !0) : n != "deleted" && (n == "true_deleted" || (a.setUpdated(d, !0, "deleted"), !1)); + var i = a.getState(d); + return i == "inserted" || this._new_event ? (a.setUpdated(d, !1), !0) : i != "deleted" && (i == "true_deleted" || (a.setUpdated(d, !0, "deleted"), !1)); } - })), this._dataProcessorHandlers.push(i.attachEvent("onEventChanged", function(d) { + })), this._dataProcessorHandlers.push(r.attachEvent("onEventChanged", function(d) { !this._loading && this._validId(d) && a.setUpdated(d, !0, "updated"); - })), this._dataProcessorHandlers.push(i.attachEvent("onClearAll", function() { + })), this._dataProcessorHandlers.push(r.attachEvent("onClearAll", function() { a._in_progress = {}, a._invalid = {}, a.updatedRows = [], a._waitMode = 0; - })), a.attachEvent("insertCallback", i._update_callback), a.attachEvent("updateCallback", i._update_callback), a.attachEvent("deleteCallback", function(d, n) { - i.getEvent(n) ? (i.setUserData(n, this.action_param, "true_deleted"), i.deleteEvent(n)) : i._add_rec_marker && i._update_callback(d, n); + })), a.attachEvent("insertCallback", r._update_callback), a.attachEvent("updateCallback", r._update_callback), a.attachEvent("deleteCallback", function(d, i) { + r.getEvent(i) ? (r.setUserData(i, this.action_param, "true_deleted"), r.deleteEvent(i)) : r._add_rec_marker && r._update_callback(d, i); }); }, this.detach = function() { for (var a in this._dataProcessorHandlers) { - var i = this._dataProcessorHandlers[a]; - this.$scheduler.detachEvent(i); + var r = this._dataProcessorHandlers[a]; + this.$scheduler.detachEvent(r); } this._dataProcessorHandlers = []; }; @@ -1228,7 +1224,7 @@ function G(e) { } function De(e) { var h = "data-dhxbox", a = null; - function i(g, p) { + function r(g, p) { var y = g.callback; m.hide(g.box), a = g.box = null, y && y(p); } @@ -1238,15 +1234,15 @@ function De(e) { if (l.keyboard) { if (p == 13 || p == 32) { var w = g.target || g.srcElement; - q.getClassName(w).indexOf("scheduler_popup_button") > -1 && w.click ? w.click() : (i(a, !0), y = !0); + q.getClassName(w).indexOf("scheduler_popup_button") > -1 && w.click ? w.click() : (r(a, !0), y = !0); } - p == 27 && (i(a, !1), y = !0); + p == 27 && (r(a, !1), y = !0); } return y ? (g.preventDefault && g.preventDefault(), !(g.cancelBubble = !0)) : void 0; } } - function n(g) { - n.cover || (n.cover = document.createElement("div"), e.event(n.cover, "keydown", d), n.cover.className = "dhx_modal_cover", document.body.appendChild(n.cover)), n.cover.style.display = g ? "inline-block" : "none"; + function i(g) { + i.cover || (i.cover = document.createElement("div"), e.event(i.cover, "keydown", d), i.cover.className = "dhx_modal_cover", document.body.appendChild(i.cover)), i.cover.style.display = g ? "inline-block" : "none"; } function _(g, p, y) { var w = e._waiAria.messageButtonAttrString(g), b = (p || "").toLowerCase().replace(/ /g, "_"); @@ -1259,7 +1255,7 @@ function De(e) { } function t(g, p, y) { var w = g.tagName ? g : function(E, D, x) { - var S = document.createElement("div"), N = I.uid(); + var S = document.createElement("div"), N = V.uid(); e._waiAria.messageModalAttr(S, N), S.className = " scheduler_modal_box dhtmlx_modal_box scheduler-" + E.type + " dhtmlx-" + E.type, S.setAttribute(h, 1); var M = ""; if (E.width && (S.style.width = E.width), E.height && (S.style.height = E.height), E.title && (M += '
' + E.title + "
"), M += '
' + (E.content ? "" : E.text) + '
', D && (M += _(o(E.ok, e.locale.labels.message_ok, "OK"), "ok", !0)), x && (M += _(o(E.cancel, e.locale.labels.message_cancel, "Cancel"), "cancel", !1)), E.buttons) @@ -1274,16 +1270,16 @@ function De(e) { return e.event(S, "click", function(O) { var L = O.target || O.srcElement; if (L.className || (L = L.parentNode), q.closest(L, ".scheduler_popup_button")) { - var $ = L.getAttribute("data-result"); - i(E, $ = $ == "true" || $ != "false" && $); + var H = L.getAttribute("data-result"); + r(E, H = H == "true" || H != "false" && H); } }), E.box = S, (D || x) && (a = E), S; }(g, p, y); - g.hidden || n(!0), document.body.appendChild(w); + g.hidden || i(!0), document.body.appendChild(w); var b = Math.abs(Math.floor(((window.innerWidth || document.documentElement.offsetWidth) - w.offsetWidth) / 2)), k = Math.abs(Math.floor(((window.innerHeight || document.documentElement.offsetHeight) - w.offsetHeight) / 2)); return g.position == "top" ? w.style.top = "-3px" : w.style.top = k + "px", w.style.left = b + "px", e.event(w, "keydown", d), m.focus(w), g.hidden && m.hide(w), e.callEvent("onMessagePopup", [w]), w; } - function r(g) { + function n(g) { return t(g, !0, !1); } function s(g) { @@ -1296,7 +1292,7 @@ function De(e) { return typeof g != "object" && (typeof p == "function" && (y = p, p = ""), g = { text: g, type: p, callback: y }), g; } function v(g, p, y, w) { - return typeof g != "object" && (g = { text: g, type: p, expire: y, id: w }), g.id = g.id || I.uid(), g.expire = g.expire || l.expire, g; + return typeof g != "object" && (g = { text: g, type: p, expire: y, id: w }), g.id = g.id || V.uid(), g.expire = g.expire || l.expire, g; } e.event(document, "keydown", d, !0); var m = function() { @@ -1306,7 +1302,7 @@ function De(e) { m.hide = function(g) { for (; g && g.getAttribute && !g.getAttribute(h); ) g = g.parentNode; - g && (g.parentNode.removeChild(g), n(!1), e.callEvent("onAfterMessagePopup", [g])); + g && (g.parentNode.removeChild(g), i(!1), e.callEvent("onAfterMessagePopup", [g])); }, m.focus = function(g) { setTimeout(function() { var p = q.getFocusableNodes(g); @@ -1316,7 +1312,7 @@ function De(e) { var l = function(g, p, y, w) { switch ((g = v.apply(this, arguments)).type = g.type || "info", g.type.split("-")[0]) { case "alert": - return r(g); + return n(g); case "confirm": return s(g); case "modalbox": @@ -1333,7 +1329,7 @@ function De(e) { }(g); } }; - l.seed = (/* @__PURE__ */ new Date()).valueOf(), l.uid = I.uid, l.expire = 4e3, l.keyboard = !0, l.position = "top", l.pull = {}, l.timers = {}, l.hideAll = function() { + l.seed = (/* @__PURE__ */ new Date()).valueOf(), l.uid = V.uid, l.expire = 4e3, l.keyboard = !0, l.position = "top", l.pull = {}, l.timers = {}, l.hideAll = function() { for (var g in l.pull) l.hide(g); }, l.hide = function(g) { @@ -1349,13 +1345,13 @@ function De(e) { for (var p = 0; p < f.length; p++) f[p] === g && (f.splice(p, 1), p--); }), e.attachEvent("onDestroy", function() { - n.cover && n.cover.parentNode && n.cover.parentNode.removeChild(n.cover); + i.cover && i.cover.parentNode && i.cover.parentNode.removeChild(i.cover); for (var g = 0; g < f.length; g++) f[g].parentNode && f[g].parentNode.removeChild(f[g]); f = null, l.area && l.area.parentNode && l.area.parentNode.removeChild(l.area), l = null; }), { alert: function() { var g = u.apply(this, arguments); - return g.type = g.type || "confirm", r(g); + return g.type = g.type || "confirm", n(g); }, confirm: function() { var g = u.apply(this, arguments); return g.type = g.type || "alert", s(g); @@ -1381,17 +1377,17 @@ G.prototype = { setTransactionMode: function(e, h) { this._silent_mode = !0, e.call(h || window), this._silent_mode = !1; }, setUpdated: function(e, h, a) { if (!this._silent_mode) { - var i = this.findRow(e); + var r = this.findRow(e); a = a || "updated"; var d = this.$scheduler.getUserData(e, this.action_param); - d && a == "updated" && (a = d), h ? (this.set_invalid(e, !1), this.updatedRows[i] = e, this.$scheduler.setUserData(e, this.action_param, a), this._in_progress[e] && (this._in_progress[e] = "wait")) : this.is_invalid(e) || (this.updatedRows.splice(i, 1), this.$scheduler.setUserData(e, this.action_param, "")), this.markRow(e, h, a), h && this.autoUpdate && this.sendData(e); + d && a == "updated" && (a = d), h ? (this.set_invalid(e, !1), this.updatedRows[r] = e, this.$scheduler.setUserData(e, this.action_param, a), this._in_progress[e] && (this._in_progress[e] = "wait")) : this.is_invalid(e) || (this.updatedRows.splice(r, 1), this.$scheduler.setUserData(e, this.action_param, "")), this.markRow(e, h, a), h && this.autoUpdate && this.sendData(e); } }, markRow: function(e, h, a) { - var i = "", d = this.is_invalid(e); - if (d && (i = this.styles[d], h = !0), this.callEvent("onRowMark", [e, h, a, d]) && (i = this.styles[h ? a : "clear"] + i, this.$scheduler[this._methods[0]](e, i), d && d.details)) { - i += this.styles[d + "_cell"]; - for (var n = 0; n < d.details.length; n++) - d.details[n] && this.$scheduler[this._methods[1]](e, n, i); + var r = "", d = this.is_invalid(e); + if (d && (r = this.styles[d], h = !0), this.callEvent("onRowMark", [e, h, a, d]) && (r = this.styles[h ? a : "clear"] + r, this.$scheduler[this._methods[0]](e, r), d && d.details)) { + r += this.styles[d + "_cell"]; + for (var i = 0; i < d.details.length; i++) + d.details[i] && this.$scheduler[this._methods[1]](e, i, r); } }, getActionByState: function(e) { return e === "inserted" ? "create" : e === "updated" ? "update" : e === "deleted" ? "delete" : "update"; @@ -1418,19 +1414,19 @@ G.prototype = { setTransactionMode: function(e, h) { return e; if (h !== void 0) return this.serialize_one(e, ""); - var a = [], i = []; + var a = [], r = []; for (var d in e) - e.hasOwnProperty(d) && (a.push(this.serialize_one(e[d], d + this.post_delim)), i.push(d)); - return a.push("ids=" + this.escape(i.join(","))), this.$scheduler.security_key && a.push("dhx_security=" + this.$scheduler.security_key), a.join("&"); + e.hasOwnProperty(d) && (a.push(this.serialize_one(e[d], d + this.post_delim)), r.push(d)); + return a.push("ids=" + this.escape(r.join(","))), this.$scheduler.security_key && a.push("dhx_security=" + this.$scheduler.security_key), a.join("&"); }, serialize_one: function(e, h) { if (typeof e == "string") return e; - var a = [], i = ""; + var a = [], r = ""; for (var d in e) if (e.hasOwnProperty(d)) { if ((d == "id" || d == this.action_param) && this._tMode == "REST") continue; - i = typeof e[d] == "string" || typeof e[d] == "number" ? e[d] : JSON.stringify(e[d]), a.push(this.escape((h || "") + d) + "=" + this.escape(i)); + r = typeof e[d] == "string" || typeof e[d] == "number" ? e[d] : JSON.stringify(e[d]), a.push(this.escape((h || "") + d) + "=" + this.escape(r)); } return a.join("&"); }, _applyPayload: function(e) { @@ -1444,9 +1440,9 @@ G.prototype = { setTransactionMode: function(e, h) { if (!this.callEvent("onBeforeDataSending", h ? [h, this.getState(h), e] : [null, null, e])) return !1; h && (this._in_progress[h] = (/* @__PURE__ */ new Date()).valueOf()); - var a = this, i = this.$scheduler.ajax; + var a = this, r = this.$scheduler.ajax; if (this._tMode !== "CUSTOM") { - var d, n = { callback: function(m) { + var d, i = { callback: function(m) { var l = []; if (h) l.push(h); @@ -1454,36 +1450,36 @@ G.prototype = { setTransactionMode: function(e, h) { for (var f in e) l.push(f); return a.afterUpdate(a, m, l); - }, headers: a._headers }, _ = this.serverProcessor + (this._user ? i.urlSeparator(this.serverProcessor) + ["dhx_user=" + this._user, "dhx_version=" + this.$scheduler.getUserData(0, "version")].join("&") : ""), o = this._applyPayload(_); + }, headers: a._headers }, _ = this.serverProcessor + (this._user ? r.urlSeparator(this.serverProcessor) + ["dhx_user=" + this._user, "dhx_version=" + this.$scheduler.getUserData(0, "version")].join("&") : ""), o = this._applyPayload(_); switch (this._tMode) { case "GET": - d = this._cleanupArgumentsBeforeSend(e), n.url = o + i.urlSeparator(o) + this.serialize(d, h), n.method = "GET"; + d = this._cleanupArgumentsBeforeSend(e), i.url = o + r.urlSeparator(o) + this.serialize(d, h), i.method = "GET"; break; case "POST": - d = this._cleanupArgumentsBeforeSend(e), n.url = o, n.method = "POST", n.data = this.serialize(d, h); + d = this._cleanupArgumentsBeforeSend(e), i.url = o, i.method = "POST", i.data = this.serialize(d, h); break; case "JSON": d = {}; var t = this._cleanupItemBeforeSend(e); - for (var r in t) - r !== this.action_param && r !== "id" && r !== "gr_id" && (d[r] = t[r]); - n.url = o, n.method = "POST", n.data = JSON.stringify({ id: h, action: e[this.action_param], data: d }); + for (var n in t) + n !== this.action_param && n !== "id" && n !== "gr_id" && (d[n] = t[n]); + i.url = o, i.method = "POST", i.data = JSON.stringify({ id: h, action: e[this.action_param], data: d }); break; case "REST": case "REST-JSON": switch (o = _.replace(/(&|\?)editing=true/, ""), d = "", this.getState(h)) { case "inserted": - n.method = "POST", n.data = this.serialize(e, h); + i.method = "POST", i.data = this.serialize(e, h); break; case "deleted": - n.method = "DELETE", o = o + (o.slice(-1) === "/" ? "" : "/") + h; + i.method = "DELETE", o = o + (o.slice(-1) === "/" ? "" : "/") + h; break; default: - n.method = "PUT", n.data = this.serialize(e, h), o = o + (o.slice(-1) === "/" ? "" : "/") + h; + i.method = "PUT", i.data = this.serialize(e, h), o = o + (o.slice(-1) === "/" ? "" : "/") + h; } - n.url = this._applyPayload(o); + i.url = this._applyPayload(o); } - return this._waitMode++, i.query(n); + return this._waitMode++, r.query(i); } { var s = this.getState(h), c = this.getActionByState(s), u = function(l) { @@ -1542,10 +1538,10 @@ G.prototype = { setTransactionMode: function(e, h) { } }, _getAllData: function(e) { var h = {}, a = !1; - return this._forEachUpdatedRow(function(i) { - if (!this._in_progress[i] && !this.is_invalid(i)) { - var d = this._getRowData(i); - this.callEvent("onBeforeUpdate", [i, this.getState(i), d]) && (h[i] = d, a = !0, this._in_progress[i] = (/* @__PURE__ */ new Date()).valueOf()); + return this._forEachUpdatedRow(function(r) { + if (!this._in_progress[r] && !this.is_invalid(r)) { + var d = this._getRowData(r); + this.callEvent("onBeforeUpdate", [r, this.getState(r), d]) && (h[r] = d, a = !0, this._in_progress[r] = (/* @__PURE__ */ new Date()).valueOf()); } }), a ? h : null; }, findRow: function(e) { @@ -1555,10 +1551,10 @@ G.prototype = { setTransactionMode: function(e, h) { return h; }, defineAction: function(e, h) { this._uActions || (this._uActions = {}), this._uActions[e] = h; -}, afterUpdateCallback: function(e, h, a, i) { +}, afterUpdateCallback: function(e, h, a, r) { if (this.$scheduler) { - var d = e, n = a !== "error" && a !== "invalid"; - if (n || this.set_invalid(e, a), this._uActions && this._uActions[a] && !this._uActions[a](i)) + var d = e, i = a !== "error" && a !== "invalid"; + if (i || this.set_invalid(e, a), this._uActions && this._uActions[a] && !this._uActions[a](r)) return delete this._in_progress[d]; this._in_progress[d] !== "wait" && this.setUpdated(e, !1); var _ = e; @@ -1569,16 +1565,16 @@ G.prototype = { setTransactionMode: function(e, h) { break; case "delete": case "deleted": - return this.$scheduler.setUserData(e, this.action_param, "true_deleted"), this.$scheduler[this._methods[3]](e, h), delete this._in_progress[d], this.callEvent("onAfterUpdate", [e, a, h, i]); + return this.$scheduler.setUserData(e, this.action_param, "true_deleted"), this.$scheduler[this._methods[3]](e, h), delete this._in_progress[d], this.callEvent("onAfterUpdate", [e, a, h, r]); } - this._in_progress[d] !== "wait" ? (n && this.$scheduler.setUserData(e, this.action_param, ""), delete this._in_progress[d]) : (delete this._in_progress[d], this.setUpdated(h, !0, this.$scheduler.getUserData(e, this.action_param))), this.callEvent("onAfterUpdate", [_, a, h, i]); + this._in_progress[d] !== "wait" ? (i && this.$scheduler.setUserData(e, this.action_param, ""), delete this._in_progress[d]) : (delete this._in_progress[d], this.setUpdated(h, !0, this.$scheduler.getUserData(e, this.action_param))), this.callEvent("onAfterUpdate", [_, a, h, r]); } }, _errorResponse: function(e, h) { return this.$scheduler && this.$scheduler.callEvent && this.$scheduler.callEvent("onSaveError", [h, e.xmlDoc]), this.cleanUpdate(h); }, _setDefaultTransactionMode: function() { this.serverProcessor && (this.setTransactionMode("POST", !0), this.serverProcessor += (this.serverProcessor.indexOf("?") !== -1 ? "&" : "?") + "editing=true", this._serverProcessor = this.serverProcessor); }, afterUpdate: function(e, h, a) { - var i = this.$scheduler.ajax; + var r = this.$scheduler.ajax; if (h.xmlDoc.status === 200) { var d; try { @@ -1587,18 +1583,18 @@ G.prototype = { setTransactionMode: function(e, h) { h.xmlDoc.responseText.length || (d = {}); } if (d) { - var n = d.action || this.getState(a) || "updated", _ = d.sid || a[0], o = d.tid || a[0]; - return e.afterUpdateCallback(_, o, n, d), void e.finalizeUpdate(); + var i = d.action || this.getState(a) || "updated", _ = d.sid || a[0], o = d.tid || a[0]; + return e.afterUpdateCallback(_, o, i, d), void e.finalizeUpdate(); } - var t = i.xmltop("data", h.xmlDoc); + var t = r.xmltop("data", h.xmlDoc); if (!t) return this._errorResponse(h, a); - var r = i.xpath("//data/action", t); - if (!r.length) + var n = r.xpath("//data/action", t); + if (!n.length) return this._errorResponse(h, a); - for (var s = 0; s < r.length; s++) { - var c = r[s]; - n = c.getAttribute("type"), _ = c.getAttribute("sid"), o = c.getAttribute("tid"), e.afterUpdateCallback(_, o, n, c); + for (var s = 0; s < n.length; s++) { + var c = n[s]; + i = c.getAttribute("type"), _ = c.getAttribute("sid"), o = c.getAttribute("tid"), e.afterUpdateCallback(_, o, i, c); } e.finalizeUpdate(); } else @@ -1611,39 +1607,39 @@ G.prototype = { setTransactionMode: function(e, h) { this._waitMode && this._waitMode--, this.callEvent("onAfterUpdateFinish", []), this.updatedRows.length || this.callEvent("onFullSync", []); }, init: function(e) { if (!this._initialized) { - this.$scheduler = e, this.$scheduler._dp_init && this.$scheduler._dp_init(this), this._setDefaultTransactionMode(), this._methods = this._methods || ["_set_event_text_style", "", "_dp_change_event_id", "_dp_hook_delete"], function(a, i) { + this.$scheduler = e, this.$scheduler._dp_init && this.$scheduler._dp_init(this), this._setDefaultTransactionMode(), this._methods = this._methods || ["_set_event_text_style", "", "_dp_change_event_id", "_dp_hook_delete"], function(a, r) { a._validId = function(d) { return !this._is_virtual_event || !this._is_virtual_event(d); - }, a.setUserData = function(d, n, _) { + }, a.setUserData = function(d, i, _) { if (d) { var o = this.getEvent(d); - o && (o[n] = _); + o && (o[i] = _); } else - this._userdata[n] = _; - }, a.getUserData = function(d, n) { + this._userdata[i] = _; + }, a.getUserData = function(d, i) { if (d) { var _ = this.getEvent(d); - return _ ? _[n] : null; + return _ ? _[i] : null; } - return this._userdata[n]; - }, a._set_event_text_style = function(d, n) { + return this._userdata[i]; + }, a._set_event_text_style = function(d, i) { if (a.getEvent(d)) { this.for_rendered(d, function(o) { - o.style.cssText += ";" + n; + o.style.cssText += ";" + i; }); var _ = this.getEvent(d); - _._text_style = n, this.event_updated(_); + _._text_style = i, this.event_updated(_); } - }, a._update_callback = function(d, n) { + }, a._update_callback = function(d, i) { var _ = a._xmlNodeToJSON(d.firstChild); _.rec_type == "none" && (_.rec_pattern = "none"), _.text = _.text || _._tagvalue, _.start_date = a._helpers.parseDate(_.start_date), _.end_date = a._helpers.parseDate(_.end_date), a.addEvent(_), a._add_rec_marker && a.setCurrentView(); - }, a._dp_change_event_id = function(d, n) { - a.getEvent(d) && a.changeEventId(d, n); - }, a._dp_hook_delete = function(d, n) { + }, a._dp_change_event_id = function(d, i) { + a.getEvent(d) && a.changeEventId(d, i); + }, a._dp_hook_delete = function(d, i) { if (a.getEvent(d)) - return n && d != n && (this.getUserData(d, i.action_param) == "true_deleted" && this.setUserData(d, i.action_param, "updated"), this.changeEventId(d, n)), this.deleteEvent(n, !0); + return i && d != i && (this.getUserData(d, r.action_param) == "true_deleted" && this.setUserData(d, r.action_param, "updated"), this.changeEventId(d, i)), this.deleteEvent(i, !0); }, a.setDp = function() { - this._dp = i; + this._dp = r; }, a.setDp(); }(this.$scheduler, this); var h = new Ee(this.$scheduler, this); @@ -1656,19 +1652,19 @@ G.prototype = { setTransactionMode: function(e, h) { }, setOnBeforeUpdateHandler: function(e) { this.attachEvent("onBeforeDataSending", e); }, setAutoUpdate: function(e, h) { - e = e || 2e3, this._user = h || (/* @__PURE__ */ new Date()).valueOf(), this._need_update = !1, this._update_busy = !1, this.attachEvent("onAfterUpdate", function(d, n, _, o) { - this.afterAutoUpdate(d, n, _, o); + e = e || 2e3, this._user = h || (/* @__PURE__ */ new Date()).valueOf(), this._need_update = !1, this._update_busy = !1, this.attachEvent("onAfterUpdate", function(d, i, _, o) { + this.afterAutoUpdate(d, i, _, o); }), this.attachEvent("onFullSync", function() { this.fullSync(); }); var a = this; - let i = B.setInterval(function() { + let r = I.setInterval(function() { a.loadUpdate(); }, e); this.attachEvent("onDestroy", function() { - clearInterval(i); + clearInterval(r); }); -}, afterAutoUpdate: function(e, h, a, i) { +}, afterAutoUpdate: function(e, h, a, r) { return h != "collision" || (this._need_update = !0, !1); }, fullSync: function() { return this._need_update && (this._need_update = !1, this.loadUpdate()), !0; @@ -1680,24 +1676,24 @@ G.prototype = { setTransactionMode: function(e, h) { }, _getXmlNodeValue: function(e) { return e.firstChild ? e.firstChild.nodeValue : ""; }, loadUpdate: function() { - var e = this, h = this.$scheduler.ajax, a = this.$scheduler.getUserData(0, "version"), i = this.serverProcessor + h.urlSeparator(this.serverProcessor) + ["dhx_user=" + this._user, "dhx_version=" + a].join("&"); - i = i.replace("editing=true&", ""), this.getUpdates(i, function(d) { - var n = h.xpath("//userdata", d); - e.$scheduler.setUserData(0, "version", e._getXmlNodeValue(n[0])); + var e = this, h = this.$scheduler.ajax, a = this.$scheduler.getUserData(0, "version"), r = this.serverProcessor + h.urlSeparator(this.serverProcessor) + ["dhx_user=" + this._user, "dhx_version=" + a].join("&"); + r = r.replace("editing=true&", ""), this.getUpdates(r, function(d) { + var i = h.xpath("//userdata", d); + e.$scheduler.setUserData(0, "version", e._getXmlNodeValue(i[0])); var _ = h.xpath("//update", d); if (_.length) { e._silent_mode = !0; for (var o = 0; o < _.length; o++) { - var t = _[o].getAttribute("status"), r = _[o].getAttribute("id"), s = _[o].getAttribute("parent"); + var t = _[o].getAttribute("status"), n = _[o].getAttribute("id"), s = _[o].getAttribute("parent"); switch (t) { case "inserted": - this.callEvent("insertCallback", [_[o], r, s]); + this.callEvent("insertCallback", [_[o], n, s]); break; case "updated": - this.callEvent("updateCallback", [_[o], r, s]); + this.callEvent("updateCallback", [_[o], n, s]); break; case "deleted": - this.callEvent("deleteCallback", [_[o], r, s]); + this.callEvent("deleteCallback", [_[o], n, s]); } } e._silent_mode = !1; @@ -1726,19 +1722,19 @@ G.prototype = { setTransactionMode: function(e, h) { return e && (e[this.action_param] === "deleted" ? ((h = {}).id = e.id, h[this.action_param] = e[this.action_param]) : h = e), h; }, _forEachUpdatedRow: function(e) { for (var h = this.updatedRows.slice(), a = 0; a < h.length; a++) { - var i = h[a]; - this.$scheduler.getUserData(i, this.action_param) && e.call(this, i); + var r = h[a]; + this.$scheduler.getUserData(r, this.action_param) && e.call(this, r); } }, _prepareDataItem: function(e) { - var h = {}, a = this.$scheduler, i = a.utils.copy(e); - for (var d in i) - d.indexOf("_") !== 0 && i[d] && (i[d].getUTCFullYear ? h[d] = a._helpers.formatDate(i[d]) : typeof i[d] == "object" ? h[d] = this._prepareDataItem(i[d]) : i[d] === null ? h[d] = "" : h[d] = i[d]); + var h = {}, a = this.$scheduler, r = a.utils.copy(e); + for (var d in r) + d.indexOf("_") !== 0 && r[d] && (r[d].getUTCFullYear ? h[d] = a._helpers.formatDate(r[d]) : typeof r[d] == "object" ? h[d] = this._prepareDataItem(r[d]) : r[d] === null ? h[d] = "" : h[d] = r[d]); return h[this.action_param] = a.getUserData(e.id, this.action_param), h; }, _getRowData: function(e) { var h = this.$scheduler.getEvent(e); return h || (h = { id: e }), this._prepareDataItem(h); } }; -const Se = { date: { month_full: ["كانون الثاني", "شباط", "آذار", "نيسان", "أيار", "حزيران", "تموز", "آب", "أيلول", "تشرين الأول", "تشرين الثاني", "كانون الأول"], month_short: ["يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"], day_full: ["الأحد", "الأثنين", "ألثلاثاء", "الأربعاء", "ألحميس", "ألجمعة", "السبت"], day_short: ["احد", "اثنين", "ثلاثاء", "اربعاء", "خميس", "جمعة", "سبت"] }, labels: { dhx_cal_today_button: "اليوم", day_tab: "يوم", week_tab: "أسبوع", month_tab: "شهر", new_event: "حدث جديد", icon_save: "اخزن", icon_cancel: "الغاء", icon_details: "تفاصيل", icon_edit: "تحرير", icon_delete: "حذف", confirm_closing: "التغييرات سوف تضيع, هل انت متأكد؟", confirm_deleting: "الحدث سيتم حذفها نهائيا ، هل أنت متأكد؟", section_description: "الوصف", section_time: "الفترة الزمنية", full_day: "طوال اليوم", confirm_recurring: "هل تريد تحرير مجموعة كاملة من الأحداث المتكررة؟", section_recurring: "تكرار الحدث", button_recurring: "تعطيل", button_recurring_open: "تمكين", button_edit_series: "تحرير سلسلة", button_edit_occurrence: "تعديل نسخة", grid_tab: "جدول", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute" } }, Ne = { date: { month_full: ["Студзень", "Люты", "Сакавік", "Красавік", "Maй", "Чэрвень", "Ліпень", "Жнівень", "Верасень", "Кастрычнік", "Лістапад", "Снежань"], month_short: ["Студз", "Лют", "Сак", "Крас", "Maй", "Чэр", "Ліп", "Жнів", "Вер", "Каст", "Ліст", "Снеж"], day_full: ["Нядзеля", "Панядзелак", "Аўторак", "Серада", "Чацвер", "Пятніца", "Субота"], day_short: ["Нд", "Пн", "Аўт", "Ср", "Чцв", "Пт", "Сб"] }, labels: { dhx_cal_today_button: "Сёння", day_tab: "Дзень", week_tab: "Тыдзень", month_tab: "Месяц", new_event: "Новая падзея", icon_save: "Захаваць", icon_cancel: "Адмяніць", icon_details: "Дэталі", icon_edit: "Змяніць", icon_delete: "Выдаліць", confirm_closing: "", confirm_deleting: "Падзея будзе выдалена незваротна, працягнуць?", section_description: "Апісанне", section_time: "Перыяд часу", full_day: "Увесь дзень", confirm_recurring: "Вы хочаце змяніць усю серыю паўтаральных падзей?", section_recurring: "Паўтарэнне", button_recurring: "Адключана", button_recurring_open: "Уключана", button_edit_series: "Рэдагаваць серыю", button_edit_occurrence: "Рэдагаваць асобнік", agenda_tab: "Спіс", date: "Дата", description: "Апісанне", year_tab: "Год", week_agenda_tab: "Спіс", grid_tab: "Спic", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute", repeat_radio_day: "Дзень", repeat_radio_week: "Тыдзень", repeat_radio_month: "Месяц", repeat_radio_year: "Год", repeat_radio_day_type: "Кожны", repeat_text_day_count: "дзень", repeat_radio_day_type2: "Кожны працоўны дзень", repeat_week: " Паўтараць кожны", repeat_text_week_count: "тыдзень", repeat_radio_month_type: "Паўтараць", repeat_radio_month_start: "", repeat_text_month_day: " чысла кожнага", repeat_text_month_count: "месяцу", repeat_text_month_count2_before: "кожны ", repeat_text_month_count2_after: "месяц", repeat_year_label: "", select_year_day2: "", repeat_text_year_day: "дзень", select_year_month: "", repeat_radio_end: "Без даты заканчэння", repeat_text_occurences_count: "паўтораў", repeat_radio_end2: "", repeat_radio_end3: "Да ", month_for_recurring: ["Студзеня", "Лютага", "Сакавіка", "Красавіка", "Мая", "Чэрвеня", "Ліпeня", "Жніўня", "Верасня", "Кастрычніка", "Лістапада", "Снежня"], day_for_recurring: ["Нядзелю", "Панядзелак", "Аўторак", "Сераду", "Чацвер", "Пятніцу", "Суботу"] } }, Me = { date: { month_full: ["Gener", "Febrer", "Març", "Abril", "Maig", "Juny", "Juliol", "Agost", "Setembre", "Octubre", "Novembre", "Desembre"], month_short: ["Gen", "Feb", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Oct", "Nov", "Des"], day_full: ["Diumenge", "Dilluns", "Dimarts", "Dimecres", "Dijous", "Divendres", "Dissabte"], day_short: ["Dg", "Dl", "Dm", "Dc", "Dj", "Dv", "Ds"] }, labels: { dhx_cal_today_button: "Hui", day_tab: "Dia", week_tab: "Setmana", month_tab: "Mes", new_event: "Nou esdeveniment", icon_save: "Guardar", icon_cancel: "Cancel·lar", icon_details: "Detalls", icon_edit: "Editar", icon_delete: "Esborrar", confirm_closing: "", confirm_deleting: "L'esdeveniment s'esborrarà definitivament, continuar ?", section_description: "Descripció", section_time: "Periode de temps", full_day: "Tot el dia", confirm_recurring: "¿Desitja modificar el conjunt d'esdeveniments repetits?", section_recurring: "Repeteixca l'esdeveniment", button_recurring: "Impedit", button_recurring_open: "Permés", button_edit_series: "Edit sèrie", button_edit_occurrence: "Edita Instància", agenda_tab: "Agenda", date: "Data", description: "Descripció", year_tab: "Any", week_agenda_tab: "Agenda", grid_tab: "Taula", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute" } }, Ae = { date: { month_full: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], month_short: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], day_full: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"], day_short: ["日", "一", "二", "三", "四", "五", "六"] }, labels: { dhx_cal_today_button: "今天", day_tab: "日", week_tab: "周", month_tab: "月", new_event: "新建日程", icon_save: "保存", icon_cancel: "关闭", icon_details: "详细", icon_edit: "编辑", icon_delete: "删除", confirm_closing: "请确认是否撤销修改!", confirm_deleting: "是否删除日程?", section_description: "描述", section_time: "时间范围", full_day: "整天", confirm_recurring: "请确认是否将日程设为重复模式?", section_recurring: "重复周期", button_recurring: "禁用", button_recurring_open: "启用", button_edit_series: "编辑系列", button_edit_occurrence: "编辑实例", agenda_tab: "议程", date: "日期", description: "说明", year_tab: "今年", week_agenda_tab: "议程", grid_tab: "电网", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute", repeat_radio_day: "按天", repeat_radio_week: "按周", repeat_radio_month: "按月", repeat_radio_year: "按年", repeat_radio_day_type: "每", repeat_text_day_count: "天", repeat_radio_day_type2: "每个工作日", repeat_week: " 重复 每", repeat_text_week_count: "星期的:", repeat_radio_month_type: "重复", repeat_radio_month_start: "在", repeat_text_month_day: "日 每", repeat_text_month_count: "月", repeat_text_month_count2_before: "每", repeat_text_month_count2_after: "月", repeat_year_label: "在", select_year_day2: "的", repeat_text_year_day: "日", select_year_month: "月", repeat_radio_end: "无结束日期", repeat_text_occurences_count: "次结束", repeat_radio_end2: "重复", repeat_radio_end3: "结束于", month_for_recurring: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], day_for_recurring: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"] } }, Ce = { date: { month_full: ["Leden", "Únor", "Březen", "Duben", "Květen", "Červen", "Červenec", "Srpen", "Září", "Říjen", "Listopad", "Prosinec"], month_short: ["Led", "Ún", "Bře", "Dub", "Kvě", "Čer", "Čec", "Srp", "Září", "Říj", "List", "Pro"], day_full: ["Neděle", "Pondělí", "Úterý", "Středa", "Čtvrtek", "Pátek", "Sobota"], day_short: ["Ne", "Po", "Út", "St", "Čt", "Pá", "So"] }, labels: { dhx_cal_today_button: "Dnes", day_tab: "Den", week_tab: "Týden", month_tab: "Měsíc", new_event: "Nová událost", icon_save: "Uložit", icon_cancel: "Zpět", icon_details: "Detail", icon_edit: "Edituj", icon_delete: "Smazat", confirm_closing: "", confirm_deleting: "Událost bude trvale smazána, opravdu?", section_description: "Poznámky", section_time: "Doba platnosti", confirm_recurring: "Přejete si upravit celou řadu opakovaných událostí?", section_recurring: "Opakování události", button_recurring: "Vypnuto", button_recurring_open: "Zapnuto", button_edit_series: "Edit series", button_edit_occurrence: "Upravit instance", agenda_tab: "Program", date: "Datum", description: "Poznámka", year_tab: "Rok", full_day: "Full day", week_agenda_tab: "Program", grid_tab: "Mřížka", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute", repeat_radio_day: "Denně", repeat_radio_week: "Týdně", repeat_radio_month: "Měsíčně", repeat_radio_year: "Ročně", repeat_radio_day_type: "každý", repeat_text_day_count: "Den", repeat_radio_day_type2: "pracovní dny", repeat_week: "Opakuje každých", repeat_text_week_count: "Týdnů na:", repeat_radio_month_type: "u každého", repeat_radio_month_start: "na", repeat_text_month_day: "Den každého", repeat_text_month_count: "Měsíc", repeat_text_month_count2_before: "každý", repeat_text_month_count2_after: "Měsíc", repeat_year_label: "na", select_year_day2: "v", repeat_text_year_day: "Den v", select_year_month: "", repeat_radio_end: "bez data ukončení", repeat_text_occurences_count: "Události", repeat_radio_end2: "po", repeat_radio_end3: "Konec", month_for_recurring: ["Leden", "Únor", "Březen", "Duben", "Květen", "Červen", "Červenec", "Srpen", "Září", "Říjen", "Listopad", "Prosinec"], day_for_recurring: ["Neděle ", "Pondělí", "Úterý", "Středa", "Čtvrtek", "Pátek", "Sobota"] } }, Te = { date: { month_full: ["Januar", "Februar", "Marts", "April", "Maj", "Juni", "Juli", "August", "September", "Oktober", "November", "December"], month_short: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"], day_full: ["Søndag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag"], day_short: ["Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør"] }, labels: { dhx_cal_today_button: "Idag", day_tab: "Dag", week_tab: "Uge", month_tab: "Måned", new_event: "Ny begivenhed", icon_save: "Gem", icon_cancel: "Fortryd", icon_details: "Detaljer", icon_edit: "Tilret", icon_delete: "Slet", confirm_closing: "Dine rettelser vil gå tabt.. Er dy sikker?", confirm_deleting: "Bigivenheden vil blive slettet permanent. Er du sikker?", section_description: "Beskrivelse", section_time: "Tidsperiode", confirm_recurring: "Vil du tilrette hele serien af gentagne begivenheder?", section_recurring: "Gentag begivenhed", button_recurring: "Frakoblet", button_recurring_open: "Tilkoblet", button_edit_series: "Rediger serien", button_edit_occurrence: "Rediger en kopi", agenda_tab: "Dagsorden", date: "Dato", description: "Beskrivelse", year_tab: "År", week_agenda_tab: "Dagsorden", grid_tab: "Grid", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute", repeat_radio_day: "Daglig", repeat_radio_week: "Ugenlig", repeat_radio_month: "Månedlig", repeat_radio_year: "Årlig", repeat_radio_day_type: "Hver", repeat_text_day_count: "dag", repeat_radio_day_type2: "På hver arbejdsdag", repeat_week: " Gentager sig hver", repeat_text_week_count: "uge på følgende dage:", repeat_radio_month_type: "Hver den", repeat_radio_month_start: "Den", repeat_text_month_day: " i hver", repeat_text_month_count: "måned", repeat_text_month_count2_before: "hver", repeat_text_month_count2_after: "måned", repeat_year_label: "Den", select_year_day2: "i", repeat_text_year_day: "dag i", select_year_month: "", repeat_radio_end: "Ingen slutdato", repeat_text_occurences_count: "gentagelse", repeat_radio_end2: "Efter", repeat_radio_end3: "Slut", month_for_recurring: ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"], day_for_recurring: ["Søndag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag"] } }, Oe = { date: { month_full: [" Januar", " Februar", " März ", " April", " Mai", " Juni", " Juli", " August", " September ", " Oktober", " November ", " Dezember"], month_short: ["Jan", "Feb", "Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"], day_full: ["Sonntag", "Montag", "Dienstag", " Mittwoch", " Donnerstag", "Freitag", "Samstag"], day_short: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"] }, labels: { dhx_cal_today_button: "Heute", day_tab: "Tag", week_tab: "Woche", month_tab: "Monat", new_event: "neuer Eintrag", icon_save: "Speichern", icon_cancel: "Abbrechen", icon_details: "Details", icon_edit: "Ändern", icon_delete: "Löschen", confirm_closing: "", confirm_deleting: "Der Eintrag wird gelöscht", section_description: "Beschreibung", section_time: "Zeitspanne", full_day: "Ganzer Tag", confirm_recurring: "Wollen Sie alle Einträge bearbeiten oder nur diesen einzelnen Eintrag?", section_recurring: "Wiederholung", button_recurring: "Aus", button_recurring_open: "An", button_edit_series: "Bearbeiten Sie die Serie", button_edit_occurrence: "Bearbeiten Sie eine Kopie", agenda_tab: "Agenda", date: "Datum", description: "Beschreibung", year_tab: "Jahre", week_agenda_tab: "Agenda", grid_tab: "Grid", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute", repeat_radio_day: "Täglich", repeat_radio_week: "Wöchentlich", repeat_radio_month: "Monatlich", repeat_radio_year: "Jährlich", repeat_radio_day_type: "jeden", repeat_text_day_count: "Tag", repeat_radio_day_type2: "an jedem Arbeitstag", repeat_week: " Wiederholt sich jede", repeat_text_week_count: "Woche am:", repeat_radio_month_type: "an jedem", repeat_radio_month_start: "am", repeat_text_month_day: "Tag eines jeden", repeat_text_month_count: "Monats", repeat_text_month_count2_before: "jeden", repeat_text_month_count2_after: "Monats", repeat_year_label: "am", select_year_day2: "im", repeat_text_year_day: "Tag im", select_year_month: "", repeat_radio_end: "kein Enddatum", repeat_text_occurences_count: "Ereignissen", repeat_radio_end3: "Schluß", repeat_radio_end2: "nach", month_for_recurring: ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"], day_for_recurring: ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"] } }, He = { date: { month_full: ["Ιανουάριος", "Φεβρουάριος", "Μάρτιος", "Απρίλιος", "Μάϊος", "Ιούνιος", "Ιούλιος", "Αύγουστος", "Σεπτέμβριος", "Οκτώβριος", "Νοέμβριος", "Δεκέμβριος"], month_short: ["ΙΑΝ", "ΦΕΒ", "ΜΑΡ", "ΑΠΡ", "ΜΑΙ", "ΙΟΥΝ", "ΙΟΥΛ", "ΑΥΓ", "ΣΕΠ", "ΟΚΤ", "ΝΟΕ", "ΔΕΚ"], day_full: ["Κυριακή", "Δευτέρα", "Τρίτη", "Τετάρτη", "Πέμπτη", "Παρασκευή", "Σάββατο"], day_short: ["ΚΥ", "ΔΕ", "ΤΡ", "ΤΕ", "ΠΕ", "ΠΑ", "ΣΑ"] }, labels: { dhx_cal_today_button: "Σήμερα", day_tab: "Ημέρα", week_tab: "Εβδομάδα", month_tab: "Μήνας", new_event: "Νέο έργο", icon_save: "Αποθήκευση", icon_cancel: "Άκυρο", icon_details: "Λεπτομέρειες", icon_edit: "Επεξεργασία", icon_delete: "Διαγραφή", confirm_closing: "", confirm_deleting: "Το έργο θα διαγραφεί οριστικά. Θέλετε να συνεχίσετε;", section_description: "Περιγραφή", section_time: "Χρονική περίοδος", full_day: "Πλήρης Ημέρα", confirm_recurring: "Θέλετε να επεξεργασθείτε ολόκληρη την ομάδα των επαναλαμβανόμενων έργων;", section_recurring: "Επαναλαμβανόμενο έργο", button_recurring: "Ανενεργό", button_recurring_open: "Ενεργό", button_edit_series: "Επεξεργαστείτε τη σειρά", button_edit_occurrence: "Επεξεργασία ένα αντίγραφο", agenda_tab: "Ημερήσια Διάταξη", date: "Ημερομηνία", description: "Περιγραφή", year_tab: "Έτος", week_agenda_tab: "Ημερήσια Διάταξη", grid_tab: "Πλέγμα", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute", repeat_radio_day: "Ημερησίως", repeat_radio_week: "Εβδομαδιαίως", repeat_radio_month: "Μηνιαίως", repeat_radio_year: "Ετησίως", repeat_radio_day_type: "Κάθε", repeat_text_day_count: "ημέρα", repeat_radio_day_type2: "Κάθε εργάσιμη", repeat_week: " Επανάληψη κάθε", repeat_text_week_count: "εβδομάδα τις επόμενες ημέρες:", repeat_radio_month_type: "Επανάληψη", repeat_radio_month_start: "Την", repeat_text_month_day: "ημέρα κάθε", repeat_text_month_count: "μήνα", repeat_text_month_count2_before: "κάθε", repeat_text_month_count2_after: "μήνα", repeat_year_label: "Την", select_year_day2: "του", repeat_text_year_day: "ημέρα", select_year_month: "μήνα", repeat_radio_end: "Χωρίς ημερομηνία λήξεως", repeat_text_occurences_count: "επαναλήψεις", repeat_radio_end3: "Λήγει την", repeat_radio_end2: "Μετά από", month_for_recurring: ["Ιανουάριος", "Φεβρουάριος", "Μάρτιος", "Απρίλιος", "Μάϊος", "Ιούνιος", "Ιούλιος", "Αύγουστος", "Σεπτέμβριος", "Οκτώβριος", "Νοέμβριος", "Δεκέμβριος"], day_for_recurring: ["Κυριακή", "Δευτέρα", "Τρίτη", "Τετάρτη", "Πέμπτη", "Παρασκευή", "Σάββατο"] } }, $e = { date: { month_full: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], month_short: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], day_full: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], day_short: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] }, labels: { dhx_cal_today_button: "Today", day_tab: "Day", week_tab: "Week", month_tab: "Month", new_event: "New event", icon_save: "Save", icon_cancel: "Cancel", icon_details: "Details", icon_edit: "Edit", icon_delete: "Delete", confirm_closing: "", confirm_deleting: "Event will be deleted permanently, are you sure?", section_description: "Description", section_time: "Time period", full_day: "Full day", confirm_recurring: "Do you want to edit the whole set of repeated events?", section_recurring: "Repeat event", button_recurring: "Disabled", button_recurring_open: "Enabled", button_edit_series: "Edit series", button_edit_occurrence: "Edit occurrence", agenda_tab: "Agenda", date: "Date", description: "Description", year_tab: "Year", week_agenda_tab: "Agenda", grid_tab: "Grid", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute", repeat_radio_day: "Daily", repeat_radio_week: "Weekly", repeat_radio_month: "Monthly", repeat_radio_year: "Yearly", repeat_radio_day_type: "Every", repeat_text_day_count: "day", repeat_radio_day_type2: "Every workday", repeat_week: " Repeat every", repeat_text_week_count: "week next days:", repeat_radio_month_type: "Repeat", repeat_radio_month_start: "On", repeat_text_month_day: "day every", repeat_text_month_count: "month", repeat_text_month_count2_before: "every", repeat_text_month_count2_after: "month", repeat_year_label: "On", select_year_day2: "of", repeat_text_year_day: "day", select_year_month: "month", repeat_radio_end: "No end date", repeat_text_occurences_count: "occurrences", repeat_radio_end2: "After", repeat_radio_end3: "End by", month_for_recurring: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], day_for_recurring: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"] } }, Le = { date: { month_full: ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"], month_short: ["Ene", "Feb", "Mar", "Abr", "May", "Jun", "Jul", "Ago", "Sep", "Oct", "Nov", "Dic"], day_full: ["Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"], day_short: ["Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb"] }, labels: { dhx_cal_today_button: "Hoy", day_tab: "Día", week_tab: "Semana", month_tab: "Mes", new_event: "Nuevo evento", icon_save: "Guardar", icon_cancel: "Cancelar", icon_details: "Detalles", icon_edit: "Editar", icon_delete: "Eliminar", confirm_closing: "", confirm_deleting: "El evento se borrará definitivamente, ¿continuar?", section_description: "Descripción", section_time: "Período", full_day: "Todo el día", confirm_recurring: "¿Desea modificar el conjunto de eventos repetidos?", section_recurring: "Repita el evento", button_recurring: "Impedido", button_recurring_open: "Permitido", button_edit_series: "Editar la serie", button_edit_occurrence: "Editar este evento", agenda_tab: "Día", date: "Fecha", description: "Descripción", year_tab: "Año", week_agenda_tab: "Día", grid_tab: "Reja", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute", repeat_radio_day: "Diariamente", repeat_radio_week: "Semanalmente", repeat_radio_month: "Mensualmente", repeat_radio_year: "Anualmente", repeat_radio_day_type: "Cada", repeat_text_day_count: "dia", repeat_radio_day_type2: "Cada jornada de trabajo", repeat_week: " Repetir cada", repeat_text_week_count: "semana:", repeat_radio_month_type: "Repita", repeat_radio_month_start: "El", repeat_text_month_day: "dia cada ", repeat_text_month_count: "mes", repeat_text_month_count2_before: "cada", repeat_text_month_count2_after: "mes", repeat_year_label: "El", select_year_day2: "del", repeat_text_year_day: "dia", select_year_month: "mes", repeat_radio_end: "Sin fecha de finalización", repeat_text_occurences_count: "ocurrencias", repeat_radio_end3: "Fin", repeat_radio_end2: "Después de", month_for_recurring: ["Enero", "Febrero", "Маrzo", "Аbril", "Mayo", "Junio", "Julio", "Аgosto", "Setiembre", "Octubre", "Noviembre", "Diciembre"], day_for_recurring: ["Domingo", "Lunes", "Martes", "Miércoles", "Jeuves", "Viernes", "Sabado"] } }, ze = { date: { month_full: ["Tammikuu", "Helmikuu", "Maaliskuu", "Huhtikuu", "Toukokuu", "Kesäkuu", "Heinäkuu", "Elokuu", "Syyskuu", "Lokakuu", "Marraskuu", "Joulukuu"], month_short: ["Tam", "Hel", "Maa", "Huh", "Tou", "Kes", "Hei", "Elo", "Syy", "Lok", "Mar", "Jou"], day_full: ["Sunnuntai", "Maanantai", "Tiistai", "Keskiviikko", "Torstai", "Perjantai", "Lauantai"], day_short: ["Su", "Ma", "Ti", "Ke", "To", "Pe", "La"] }, labels: { dhx_cal_today_button: "Tänään", day_tab: "Päivä", week_tab: "Viikko", month_tab: "Kuukausi", new_event: "Uusi tapahtuma", icon_save: "Tallenna", icon_cancel: "Peru", icon_details: "Tiedot", icon_edit: "Muokkaa", icon_delete: "Poista", confirm_closing: "", confirm_deleting: "Haluatko varmasti poistaa tapahtuman?", section_description: "Kuvaus", section_time: "Aikajakso", full_day: "Koko päivä", confirm_recurring: "Haluatko varmasti muokata toistuvan tapahtuman kaikkia jaksoja?", section_recurring: "Toista tapahtuma", button_recurring: "Ei käytössä", button_recurring_open: "Käytössä", button_edit_series: "Muokkaa sarja", button_edit_occurrence: "Muokkaa kopio", agenda_tab: "Esityslista", date: "Päivämäärä", description: "Kuvaus", year_tab: "Vuoden", week_agenda_tab: "Esityslista", grid_tab: "Ritilä", drag_to_create: "Luo uusi vetämällä", drag_to_move: "Siirrä vetämällä", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute", repeat_radio_day: "Päivittäin", repeat_radio_week: "Viikoittain", repeat_radio_month: "Kuukausittain", repeat_radio_year: "Vuosittain", repeat_radio_day_type: "Joka", repeat_text_day_count: "päivä", repeat_radio_day_type2: "Joka arkipäivä", repeat_week: "Toista joka", repeat_text_week_count: "viikko näinä päivinä:", repeat_radio_month_type: "Toista", repeat_radio_month_start: "", repeat_text_month_day: "päivänä joka", repeat_text_month_count: "kuukausi", repeat_text_month_count2_before: "joka", repeat_text_month_count2_after: "kuukausi", repeat_year_label: "", select_year_day2: "", repeat_text_year_day: "päivä", select_year_month: "kuukausi", repeat_radio_end: "Ei loppumisaikaa", repeat_text_occurences_count: "Toiston jälkeen", repeat_radio_end3: "Loppuu", repeat_radio_end2: "", month_for_recurring: ["Tammikuu", "Helmikuu", "Maaliskuu", "Huhtikuu", "Toukokuu", "Kesäkuu", "Heinäkuu", "Elokuu", "Syyskuu", "Lokakuu", "Marraskuu", "Joulukuu"], day_for_recurring: ["Sunnuntai", "Maanantai", "Tiistai", "Keskiviikko", "Torstai", "Perjantai", "Lauantai"] } }, je = { date: { month_full: ["Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"], month_short: ["Jan", "Fév", "Mar", "Avr", "Mai", "Juin", "Juil", "Aoû", "Sep", "Oct", "Nov", "Déc"], day_full: ["Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi"], day_short: ["Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam"] }, labels: { dhx_cal_today_button: "Aujourd'hui", day_tab: "Jour", week_tab: "Semaine", month_tab: "Mois", new_event: "Nouvel événement", icon_save: "Enregistrer", icon_cancel: "Annuler", icon_details: "Détails", icon_edit: "Modifier", icon_delete: "Effacer", confirm_closing: "", confirm_deleting: "L'événement sera effacé sans appel, êtes-vous sûr ?", section_description: "Description", section_time: "Période", full_day: "Journée complète", confirm_recurring: "Voulez-vous éditer toute une série d'évènements répétés?", section_recurring: "Périodicité", button_recurring: "Désactivé", button_recurring_open: "Activé", button_edit_series: "Modifier la série", button_edit_occurrence: "Modifier une copie", agenda_tab: "Jour", date: "Date", description: "Description", year_tab: "Année", week_agenda_tab: "Jour", grid_tab: "Grille", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute", repeat_radio_day: "Quotidienne", repeat_radio_week: "Hebdomadaire", repeat_radio_month: "Mensuelle", repeat_radio_year: "Annuelle", repeat_radio_day_type: "Chaque", repeat_text_day_count: "jour", repeat_radio_day_type2: "Chaque journée de travail", repeat_week: " Répéter toutes les", repeat_text_week_count: "semaine:", repeat_radio_month_type: "Répéter", repeat_radio_month_start: "Le", repeat_text_month_day: "jour chaque", repeat_text_month_count: "mois", repeat_text_month_count2_before: "chaque", repeat_text_month_count2_after: "mois", repeat_year_label: "Le", select_year_day2: "du", repeat_text_year_day: "jour", select_year_month: "mois", repeat_radio_end: "Pas de date d"achèvement", repeat_text_occurences_count: "occurrences", repeat_radio_end3: "Fin", repeat_radio_end2: "Après", month_for_recurring: ["Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"], day_for_recurring: ["Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi"] } }, Pe = { date: { month_full: ["ינואר", "פברואר", "מרץ", "אפריל", "מאי", "יוני", "יולי", "אוגוסט", "ספטמבר", "אוקטובר", "נובמבר", "דצמבר"], month_short: ["ינו", "פבר", "מרץ", "אפר", "מאי", "יונ", "יול", "אוג", "ספט", "אוק", "נוב", "דצמ"], day_full: ["ראשון", "שני", "שלישי", "רביעי", "חמישי", "שישי", "שבת"], day_short: ["א", "ב", "ג", "ד", "ה", "ו", "ש"] }, labels: { dhx_cal_today_button: "היום", day_tab: "יום", week_tab: "שבוע", month_tab: "חודש", new_event: "ארוע חדש", icon_save: "שמור", icon_cancel: "בטל", icon_details: "פרטים", icon_edit: "ערוך", icon_delete: "מחק", confirm_closing: "", confirm_deleting: "ארוע ימחק סופית.להמשיך?", section_description: "תיאור", section_time: "תקופה", confirm_recurring: "האם ברצונך לשנות כל סדרת ארועים מתמשכים?", section_recurring: "להעתיק ארוע", button_recurring: "לא פעיל", button_recurring_open: "פעיל", full_day: "יום שלם", button_edit_series: "ערוך את הסדרה", button_edit_occurrence: "עריכת עותק", agenda_tab: "סדר יום", date: "תאריך", description: "תיאור", year_tab: "לשנה", week_agenda_tab: "סדר יום", grid_tab: "סורג", drag_to_create: "Drag to create", drag_to_move: "גרור כדי להזיז", message_ok: "OK", message_cancel: "בטל", next: "הבא", prev: "הקודם", year: "שנה", month: "חודש", day: "יום", hour: "שעה", minute: "דקה", repeat_radio_day: "יומי", repeat_radio_week: "שבועי", repeat_radio_month: "חודשי", repeat_radio_year: "שנתי", repeat_radio_day_type: "חזור כל", repeat_text_day_count: "ימים", repeat_radio_day_type2: "חזור כל יום עבודה", repeat_week: " חזור כל", repeat_text_week_count: "שבוע לפי ימים:", repeat_radio_month_type: "חזור כל", repeat_radio_month_start: "כל", repeat_text_month_day: "ימים כל", repeat_text_month_count: "חודשים", repeat_text_month_count2_before: "חזור כל", repeat_text_month_count2_after: "חודש", repeat_year_label: "כל", select_year_day2: "בחודש", repeat_text_year_day: "ימים", select_year_month: "חודש", repeat_radio_end: "לעולם לא מסתיים", repeat_text_occurences_count: "אירועים", repeat_radio_end3: "מסתיים ב", repeat_radio_end2: "אחרי", month_for_recurring: ["ינואר", "פברואר", "מרץ", "אפריל", "מאי", "יוני", "יולי", "אוגוסט", "ספטמבר", "אוקטובר", "נובמבר", "דצמבר"], day_for_recurring: ["ראשון", "שני", "שלישי", "רביעי", "חמישי", "שישי", "שבת"] } }, Ve = { date: { month_full: ["Január", "Február", "Március", "Április", "Május", "Június", "Július", "Augusztus", "Szeptember", "Október", "November", "December"], month_short: ["Jan", "Feb", "Már", "Ápr", "Máj", "Jún", "Júl", "Aug", "Sep", "Okt", "Nov", "Dec"], day_full: ["Vasárnap", "Hétfõ", "Kedd", "Szerda", "Csütörtök", "Péntek", "szombat"], day_short: ["Va", "Hé", "Ke", "Sze", "Csü", "Pé", "Szo"] }, labels: { dhx_cal_today_button: "Ma", day_tab: "Nap", week_tab: "Hét", month_tab: "Hónap", new_event: "Új esemény", icon_save: "Mentés", icon_cancel: "Mégse", icon_details: "Részletek", icon_edit: "Szerkesztés", icon_delete: "Törlés", confirm_closing: "", confirm_deleting: "Az esemény törölve lesz, biztosan folytatja?", section_description: "Leírás", section_time: "Idõszak", full_day: "Egesz napos", confirm_recurring: "Biztosan szerkeszteni akarod az összes ismétlõdõ esemény beállítását?", section_recurring: "Esemény ismétlése", button_recurring: "Tiltás", button_recurring_open: "Engedélyezés", button_edit_series: "Edit series", button_edit_occurrence: "Szerkesztés bíróság", agenda_tab: "Napirend", date: "Dátum", description: "Leírás", year_tab: "Év", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute" } }, Ie = { date: { month_full: ["Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober", "November", "Desember"], month_short: ["Jan", "Feb", "Mar", "Apr", "Mei", "Jun", "Jul", "Ags", "Sep", "Okt", "Nov", "Des"], day_full: ["Minggu", "Senin", "Selasa", "Rabu", "Kamis", "Jumat", "Sabtu"], day_short: ["Ming", "Sen", "Sel", "Rab", "Kam", "Jum", "Sab"] }, labels: { dhx_cal_today_button: "Hari Ini", day_tab: "Hari", week_tab: "Minggu", month_tab: "Bulan", new_event: "Acara Baru", icon_save: "Simpan", icon_cancel: "Batal", icon_details: "Detail", icon_edit: "Edit", icon_delete: "Hapus", confirm_closing: "", confirm_deleting: "Acara akan dihapus", section_description: "Keterangan", section_time: "Periode", full_day: "Hari penuh", confirm_recurring: "Apakah acara ini akan berulang?", section_recurring: "Acara Rutin", button_recurring: "Tidak Difungsikan", button_recurring_open: "Difungsikan", button_edit_series: "Mengedit seri", button_edit_occurrence: "Mengedit salinan", agenda_tab: "Agenda", date: "Tanggal", description: "Keterangan", year_tab: "Tahun", week_agenda_tab: "Agenda", grid_tab: "Tabel", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute" } }, Be = { date: { month_full: ["Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"], month_short: ["Gen", "Feb", "Mar", "Apr", "Mag", "Giu", "Lug", "Ago", "Set", "Ott", "Nov", "Dic"], day_full: ["Domenica", "Lunedì", "Martedì", "Mercoledì", "Giovedì", "Venerdì", "Sabato"], day_short: ["Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab"] }, labels: { dhx_cal_today_button: "Oggi", day_tab: "Giorno", week_tab: "Settimana", month_tab: "Mese", new_event: "Nuovo evento", icon_save: "Salva", icon_cancel: "Chiudi", icon_details: "Dettagli", icon_edit: "Modifica", icon_delete: "Elimina", confirm_closing: "", confirm_deleting: "L'evento sarà eliminato, siete sicuri?", section_description: "Descrizione", section_time: "Periodo di tempo", full_day: "Intera giornata", confirm_recurring: "Vuoi modificare l'intera serie di eventi?", section_recurring: "Ripetere l'evento", button_recurring: "Disattivato", button_recurring_open: "Attivato", button_edit_series: "Modificare la serie", button_edit_occurrence: "Modificare una copia", agenda_tab: "Agenda", date: "Data", description: "Descrizione", year_tab: "Anno", week_agenda_tab: "Agenda", grid_tab: "Griglia", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute", repeat_radio_day: "Quotidiano", repeat_radio_week: "Settimanale", repeat_radio_month: "Mensile", repeat_radio_year: "Annuale", repeat_radio_day_type: "Ogni", repeat_text_day_count: "giorno", repeat_radio_day_type2: "Ogni giornata lavorativa", repeat_week: " Ripetere ogni", repeat_text_week_count: "settimana:", repeat_radio_month_type: "Ripetere", repeat_radio_month_start: "Il", repeat_text_month_day: "giorno ogni", repeat_text_month_count: "mese", repeat_text_month_count2_before: "ogni", repeat_text_month_count2_after: "mese", repeat_year_label: "Il", select_year_day2: "del", repeat_text_year_day: "giorno", select_year_month: "mese", repeat_radio_end: "Senza data finale", repeat_text_occurences_count: "occorenze", repeat_radio_end3: "Fine", repeat_radio_end2: "Dopo", month_for_recurring: ["Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Jiugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"], day_for_recurring: ["Domenica", "Lunedì", "Martedì", "Mercoledì", "Jovedì", "Venerdì", "Sabato"] } }, Re = { date: { month_full: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], month_short: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], day_full: ["日曜日", "月曜日", "火曜日", "水曜日", "木曜日", "金曜日", "土曜日"], day_short: ["日", "月", "火", "水", "木", "金", "土"] }, labels: { dhx_cal_today_button: "今日", day_tab: "日", week_tab: "週", month_tab: "月", new_event: "新イベント", icon_save: "保存", icon_cancel: "キャンセル", icon_details: "詳細", icon_edit: "編集", icon_delete: "削除", confirm_closing: "", confirm_deleting: "イベント完全に削除されます、宜しいですか?", section_description: "デスクリプション", section_time: "期間", confirm_recurring: "繰り返されているイベントを全て編集しますか?", section_recurring: "イベントを繰り返す", button_recurring: "無効", button_recurring_open: "有効", full_day: "終日", button_edit_series: "シリーズを編集します", button_edit_occurrence: "コピーを編集", agenda_tab: "議題は", date: "日付", description: "説明", year_tab: "今年", week_agenda_tab: "議題は", grid_tab: "グリッド", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute" } }; +const Se = { date: { month_full: ["كانون الثاني", "شباط", "آذار", "نيسان", "أيار", "حزيران", "تموز", "آب", "أيلول", "تشرين الأول", "تشرين الثاني", "كانون الأول"], month_short: ["يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"], day_full: ["الأحد", "الأثنين", "ألثلاثاء", "الأربعاء", "ألحميس", "ألجمعة", "السبت"], day_short: ["احد", "اثنين", "ثلاثاء", "اربعاء", "خميس", "جمعة", "سبت"] }, labels: { dhx_cal_today_button: "اليوم", day_tab: "يوم", week_tab: "أسبوع", month_tab: "شهر", new_event: "حدث جديد", icon_save: "اخزن", icon_cancel: "الغاء", icon_details: "تفاصيل", icon_edit: "تحرير", icon_delete: "حذف", confirm_closing: "التغييرات سوف تضيع, هل انت متأكد؟", confirm_deleting: "الحدث سيتم حذفها نهائيا ، هل أنت متأكد؟", section_description: "الوصف", section_time: "الفترة الزمنية", full_day: "طوال اليوم", confirm_recurring: "هل تريد تحرير مجموعة كاملة من الأحداث المتكررة؟", section_recurring: "تكرار الحدث", button_recurring: "تعطيل", button_recurring_open: "تمكين", button_edit_series: "تحرير سلسلة", button_edit_occurrence: "تعديل نسخة", grid_tab: "جدول", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute" } }, Ne = { date: { month_full: ["Студзень", "Люты", "Сакавік", "Красавік", "Maй", "Чэрвень", "Ліпень", "Жнівень", "Верасень", "Кастрычнік", "Лістапад", "Снежань"], month_short: ["Студз", "Лют", "Сак", "Крас", "Maй", "Чэр", "Ліп", "Жнів", "Вер", "Каст", "Ліст", "Снеж"], day_full: ["Нядзеля", "Панядзелак", "Аўторак", "Серада", "Чацвер", "Пятніца", "Субота"], day_short: ["Нд", "Пн", "Аўт", "Ср", "Чцв", "Пт", "Сб"] }, labels: { dhx_cal_today_button: "Сёння", day_tab: "Дзень", week_tab: "Тыдзень", month_tab: "Месяц", new_event: "Новая падзея", icon_save: "Захаваць", icon_cancel: "Адмяніць", icon_details: "Дэталі", icon_edit: "Змяніць", icon_delete: "Выдаліць", confirm_closing: "", confirm_deleting: "Падзея будзе выдалена незваротна, працягнуць?", section_description: "Апісанне", section_time: "Перыяд часу", full_day: "Увесь дзень", confirm_recurring: "Вы хочаце змяніць усю серыю паўтаральных падзей?", section_recurring: "Паўтарэнне", button_recurring: "Адключана", button_recurring_open: "Уключана", button_edit_series: "Рэдагаваць серыю", button_edit_occurrence: "Рэдагаваць асобнік", agenda_tab: "Спіс", date: "Дата", description: "Апісанне", year_tab: "Год", week_agenda_tab: "Спіс", grid_tab: "Спic", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute", repeat_radio_day: "Дзень", repeat_radio_week: "Тыдзень", repeat_radio_month: "Месяц", repeat_radio_year: "Год", repeat_radio_day_type: "Кожны", repeat_text_day_count: "дзень", repeat_radio_day_type2: "Кожны працоўны дзень", repeat_week: " Паўтараць кожны", repeat_text_week_count: "тыдзень", repeat_radio_month_type: "Паўтараць", repeat_radio_month_start: "", repeat_text_month_day: " чысла кожнага", repeat_text_month_count: "месяцу", repeat_text_month_count2_before: "кожны ", repeat_text_month_count2_after: "месяц", repeat_year_label: "", select_year_day2: "", repeat_text_year_day: "дзень", select_year_month: "", repeat_radio_end: "Без даты заканчэння", repeat_text_occurences_count: "паўтораў", repeat_radio_end2: "", repeat_radio_end3: "Да ", month_for_recurring: ["Студзеня", "Лютага", "Сакавіка", "Красавіка", "Мая", "Чэрвеня", "Ліпeня", "Жніўня", "Верасня", "Кастрычніка", "Лістапада", "Снежня"], day_for_recurring: ["Нядзелю", "Панядзелак", "Аўторак", "Сераду", "Чацвер", "Пятніцу", "Суботу"] } }, Me = { date: { month_full: ["Gener", "Febrer", "Març", "Abril", "Maig", "Juny", "Juliol", "Agost", "Setembre", "Octubre", "Novembre", "Desembre"], month_short: ["Gen", "Feb", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Oct", "Nov", "Des"], day_full: ["Diumenge", "Dilluns", "Dimarts", "Dimecres", "Dijous", "Divendres", "Dissabte"], day_short: ["Dg", "Dl", "Dm", "Dc", "Dj", "Dv", "Ds"] }, labels: { dhx_cal_today_button: "Hui", day_tab: "Dia", week_tab: "Setmana", month_tab: "Mes", new_event: "Nou esdeveniment", icon_save: "Guardar", icon_cancel: "Cancel·lar", icon_details: "Detalls", icon_edit: "Editar", icon_delete: "Esborrar", confirm_closing: "", confirm_deleting: "L'esdeveniment s'esborrarà definitivament, continuar ?", section_description: "Descripció", section_time: "Periode de temps", full_day: "Tot el dia", confirm_recurring: "¿Desitja modificar el conjunt d'esdeveniments repetits?", section_recurring: "Repeteixca l'esdeveniment", button_recurring: "Impedit", button_recurring_open: "Permés", button_edit_series: "Edit sèrie", button_edit_occurrence: "Edita Instància", agenda_tab: "Agenda", date: "Data", description: "Descripció", year_tab: "Any", week_agenda_tab: "Agenda", grid_tab: "Taula", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute" } }, Ae = { date: { month_full: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], month_short: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], day_full: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"], day_short: ["日", "一", "二", "三", "四", "五", "六"] }, labels: { dhx_cal_today_button: "今天", day_tab: "日", week_tab: "周", month_tab: "月", new_event: "新建日程", icon_save: "保存", icon_cancel: "关闭", icon_details: "详细", icon_edit: "编辑", icon_delete: "删除", confirm_closing: "请确认是否撤销修改!", confirm_deleting: "是否删除日程?", section_description: "描述", section_time: "时间范围", full_day: "整天", confirm_recurring: "请确认是否将日程设为重复模式?", section_recurring: "重复周期", button_recurring: "禁用", button_recurring_open: "启用", button_edit_series: "编辑系列", button_edit_occurrence: "编辑实例", agenda_tab: "议程", date: "日期", description: "说明", year_tab: "今年", week_agenda_tab: "议程", grid_tab: "电网", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute", repeat_radio_day: "按天", repeat_radio_week: "按周", repeat_radio_month: "按月", repeat_radio_year: "按年", repeat_radio_day_type: "每", repeat_text_day_count: "天", repeat_radio_day_type2: "每个工作日", repeat_week: " 重复 每", repeat_text_week_count: "星期的:", repeat_radio_month_type: "重复", repeat_radio_month_start: "在", repeat_text_month_day: "日 每", repeat_text_month_count: "月", repeat_text_month_count2_before: "每", repeat_text_month_count2_after: "月", repeat_year_label: "在", select_year_day2: "的", repeat_text_year_day: "日", select_year_month: "月", repeat_radio_end: "无结束日期", repeat_text_occurences_count: "次结束", repeat_radio_end2: "重复", repeat_radio_end3: "结束于", month_for_recurring: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], day_for_recurring: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"] } }, Ce = { date: { month_full: ["Leden", "Únor", "Březen", "Duben", "Květen", "Červen", "Červenec", "Srpen", "Září", "Říjen", "Listopad", "Prosinec"], month_short: ["Led", "Ún", "Bře", "Dub", "Kvě", "Čer", "Čec", "Srp", "Září", "Říj", "List", "Pro"], day_full: ["Neděle", "Pondělí", "Úterý", "Středa", "Čtvrtek", "Pátek", "Sobota"], day_short: ["Ne", "Po", "Út", "St", "Čt", "Pá", "So"] }, labels: { dhx_cal_today_button: "Dnes", day_tab: "Den", week_tab: "Týden", month_tab: "Měsíc", new_event: "Nová událost", icon_save: "Uložit", icon_cancel: "Zpět", icon_details: "Detail", icon_edit: "Edituj", icon_delete: "Smazat", confirm_closing: "", confirm_deleting: "Událost bude trvale smazána, opravdu?", section_description: "Poznámky", section_time: "Doba platnosti", confirm_recurring: "Přejete si upravit celou řadu opakovaných událostí?", section_recurring: "Opakování události", button_recurring: "Vypnuto", button_recurring_open: "Zapnuto", button_edit_series: "Edit series", button_edit_occurrence: "Upravit instance", agenda_tab: "Program", date: "Datum", description: "Poznámka", year_tab: "Rok", full_day: "Full day", week_agenda_tab: "Program", grid_tab: "Mřížka", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute", repeat_radio_day: "Denně", repeat_radio_week: "Týdně", repeat_radio_month: "Měsíčně", repeat_radio_year: "Ročně", repeat_radio_day_type: "každý", repeat_text_day_count: "Den", repeat_radio_day_type2: "pracovní dny", repeat_week: "Opakuje každých", repeat_text_week_count: "Týdnů na:", repeat_radio_month_type: "u každého", repeat_radio_month_start: "na", repeat_text_month_day: "Den každého", repeat_text_month_count: "Měsíc", repeat_text_month_count2_before: "každý", repeat_text_month_count2_after: "Měsíc", repeat_year_label: "na", select_year_day2: "v", repeat_text_year_day: "Den v", select_year_month: "", repeat_radio_end: "bez data ukončení", repeat_text_occurences_count: "Události", repeat_radio_end2: "po", repeat_radio_end3: "Konec", month_for_recurring: ["Leden", "Únor", "Březen", "Duben", "Květen", "Červen", "Červenec", "Srpen", "Září", "Říjen", "Listopad", "Prosinec"], day_for_recurring: ["Neděle ", "Pondělí", "Úterý", "Středa", "Čtvrtek", "Pátek", "Sobota"] } }, Te = { date: { month_full: ["Januar", "Februar", "Marts", "April", "Maj", "Juni", "Juli", "August", "September", "Oktober", "November", "December"], month_short: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"], day_full: ["Søndag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag"], day_short: ["Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør"] }, labels: { dhx_cal_today_button: "Idag", day_tab: "Dag", week_tab: "Uge", month_tab: "Måned", new_event: "Ny begivenhed", icon_save: "Gem", icon_cancel: "Fortryd", icon_details: "Detaljer", icon_edit: "Tilret", icon_delete: "Slet", confirm_closing: "Dine rettelser vil gå tabt.. Er dy sikker?", confirm_deleting: "Bigivenheden vil blive slettet permanent. Er du sikker?", section_description: "Beskrivelse", section_time: "Tidsperiode", confirm_recurring: "Vil du tilrette hele serien af gentagne begivenheder?", section_recurring: "Gentag begivenhed", button_recurring: "Frakoblet", button_recurring_open: "Tilkoblet", button_edit_series: "Rediger serien", button_edit_occurrence: "Rediger en kopi", agenda_tab: "Dagsorden", date: "Dato", description: "Beskrivelse", year_tab: "År", week_agenda_tab: "Dagsorden", grid_tab: "Grid", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute", repeat_radio_day: "Daglig", repeat_radio_week: "Ugenlig", repeat_radio_month: "Månedlig", repeat_radio_year: "Årlig", repeat_radio_day_type: "Hver", repeat_text_day_count: "dag", repeat_radio_day_type2: "På hver arbejdsdag", repeat_week: " Gentager sig hver", repeat_text_week_count: "uge på følgende dage:", repeat_radio_month_type: "Hver den", repeat_radio_month_start: "Den", repeat_text_month_day: " i hver", repeat_text_month_count: "måned", repeat_text_month_count2_before: "hver", repeat_text_month_count2_after: "måned", repeat_year_label: "Den", select_year_day2: "i", repeat_text_year_day: "dag i", select_year_month: "", repeat_radio_end: "Ingen slutdato", repeat_text_occurences_count: "gentagelse", repeat_radio_end2: "Efter", repeat_radio_end3: "Slut", month_for_recurring: ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"], day_for_recurring: ["Søndag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag"] } }, Oe = { date: { month_full: [" Januar", " Februar", " März ", " April", " Mai", " Juni", " Juli", " August", " September ", " Oktober", " November ", " Dezember"], month_short: ["Jan", "Feb", "Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"], day_full: ["Sonntag", "Montag", "Dienstag", " Mittwoch", " Donnerstag", "Freitag", "Samstag"], day_short: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"] }, labels: { dhx_cal_today_button: "Heute", day_tab: "Tag", week_tab: "Woche", month_tab: "Monat", new_event: "neuer Eintrag", icon_save: "Speichern", icon_cancel: "Abbrechen", icon_details: "Details", icon_edit: "Ändern", icon_delete: "Löschen", confirm_closing: "", confirm_deleting: "Der Eintrag wird gelöscht", section_description: "Beschreibung", section_time: "Zeitspanne", full_day: "Ganzer Tag", confirm_recurring: "Wollen Sie alle Einträge bearbeiten oder nur diesen einzelnen Eintrag?", section_recurring: "Wiederholung", button_recurring: "Aus", button_recurring_open: "An", button_edit_series: "Bearbeiten Sie die Serie", button_edit_occurrence: "Bearbeiten Sie eine Kopie", agenda_tab: "Agenda", date: "Datum", description: "Beschreibung", year_tab: "Jahre", week_agenda_tab: "Agenda", grid_tab: "Grid", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute", repeat_radio_day: "Täglich", repeat_radio_week: "Wöchentlich", repeat_radio_month: "Monatlich", repeat_radio_year: "Jährlich", repeat_radio_day_type: "jeden", repeat_text_day_count: "Tag", repeat_radio_day_type2: "an jedem Arbeitstag", repeat_week: " Wiederholt sich jede", repeat_text_week_count: "Woche am:", repeat_radio_month_type: "an jedem", repeat_radio_month_start: "am", repeat_text_month_day: "Tag eines jeden", repeat_text_month_count: "Monats", repeat_text_month_count2_before: "jeden", repeat_text_month_count2_after: "Monats", repeat_year_label: "am", select_year_day2: "im", repeat_text_year_day: "Tag im", select_year_month: "", repeat_radio_end: "kein Enddatum", repeat_text_occurences_count: "Ereignissen", repeat_radio_end3: "Schluß", repeat_radio_end2: "nach", month_for_recurring: ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"], day_for_recurring: ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"] } }, $e = { date: { month_full: ["Ιανουάριος", "Φεβρουάριος", "Μάρτιος", "Απρίλιος", "Μάϊος", "Ιούνιος", "Ιούλιος", "Αύγουστος", "Σεπτέμβριος", "Οκτώβριος", "Νοέμβριος", "Δεκέμβριος"], month_short: ["ΙΑΝ", "ΦΕΒ", "ΜΑΡ", "ΑΠΡ", "ΜΑΙ", "ΙΟΥΝ", "ΙΟΥΛ", "ΑΥΓ", "ΣΕΠ", "ΟΚΤ", "ΝΟΕ", "ΔΕΚ"], day_full: ["Κυριακή", "Δευτέρα", "Τρίτη", "Τετάρτη", "Πέμπτη", "Παρασκευή", "Σάββατο"], day_short: ["ΚΥ", "ΔΕ", "ΤΡ", "ΤΕ", "ΠΕ", "ΠΑ", "ΣΑ"] }, labels: { dhx_cal_today_button: "Σήμερα", day_tab: "Ημέρα", week_tab: "Εβδομάδα", month_tab: "Μήνας", new_event: "Νέο έργο", icon_save: "Αποθήκευση", icon_cancel: "Άκυρο", icon_details: "Λεπτομέρειες", icon_edit: "Επεξεργασία", icon_delete: "Διαγραφή", confirm_closing: "", confirm_deleting: "Το έργο θα διαγραφεί οριστικά. Θέλετε να συνεχίσετε;", section_description: "Περιγραφή", section_time: "Χρονική περίοδος", full_day: "Πλήρης Ημέρα", confirm_recurring: "Θέλετε να επεξεργασθείτε ολόκληρη την ομάδα των επαναλαμβανόμενων έργων;", section_recurring: "Επαναλαμβανόμενο έργο", button_recurring: "Ανενεργό", button_recurring_open: "Ενεργό", button_edit_series: "Επεξεργαστείτε τη σειρά", button_edit_occurrence: "Επεξεργασία ένα αντίγραφο", agenda_tab: "Ημερήσια Διάταξη", date: "Ημερομηνία", description: "Περιγραφή", year_tab: "Έτος", week_agenda_tab: "Ημερήσια Διάταξη", grid_tab: "Πλέγμα", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute", repeat_radio_day: "Ημερησίως", repeat_radio_week: "Εβδομαδιαίως", repeat_radio_month: "Μηνιαίως", repeat_radio_year: "Ετησίως", repeat_radio_day_type: "Κάθε", repeat_text_day_count: "ημέρα", repeat_radio_day_type2: "Κάθε εργάσιμη", repeat_week: " Επανάληψη κάθε", repeat_text_week_count: "εβδομάδα τις επόμενες ημέρες:", repeat_radio_month_type: "Επανάληψη", repeat_radio_month_start: "Την", repeat_text_month_day: "ημέρα κάθε", repeat_text_month_count: "μήνα", repeat_text_month_count2_before: "κάθε", repeat_text_month_count2_after: "μήνα", repeat_year_label: "Την", select_year_day2: "του", repeat_text_year_day: "ημέρα", select_year_month: "μήνα", repeat_radio_end: "Χωρίς ημερομηνία λήξεως", repeat_text_occurences_count: "επαναλήψεις", repeat_radio_end3: "Λήγει την", repeat_radio_end2: "Μετά από", month_for_recurring: ["Ιανουάριος", "Φεβρουάριος", "Μάρτιος", "Απρίλιος", "Μάϊος", "Ιούνιος", "Ιούλιος", "Αύγουστος", "Σεπτέμβριος", "Οκτώβριος", "Νοέμβριος", "Δεκέμβριος"], day_for_recurring: ["Κυριακή", "Δευτέρα", "Τρίτη", "Τετάρτη", "Πέμπτη", "Παρασκευή", "Σάββατο"] } }, He = { date: { month_full: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], month_short: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], day_full: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], day_short: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] }, labels: { dhx_cal_today_button: "Today", day_tab: "Day", week_tab: "Week", month_tab: "Month", new_event: "New event", icon_save: "Save", icon_cancel: "Cancel", icon_details: "Details", icon_edit: "Edit", icon_delete: "Delete", confirm_closing: "", confirm_deleting: "Event will be deleted permanently, are you sure?", section_description: "Description", section_time: "Time period", full_day: "Full day", confirm_recurring: "Do you want to edit the whole set of repeated events?", section_recurring: "Repeat event", button_recurring: "Disabled", button_recurring_open: "Enabled", button_edit_series: "Edit series", button_edit_occurrence: "Edit occurrence", agenda_tab: "Agenda", date: "Date", description: "Description", year_tab: "Year", week_agenda_tab: "Agenda", grid_tab: "Grid", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute", repeat_radio_day: "Daily", repeat_radio_week: "Weekly", repeat_radio_month: "Monthly", repeat_radio_year: "Yearly", repeat_radio_day_type: "Every", repeat_text_day_count: "day", repeat_radio_day_type2: "Every workday", repeat_week: " Repeat every", repeat_text_week_count: "week next days:", repeat_radio_month_type: "Repeat", repeat_radio_month_start: "On", repeat_text_month_day: "day every", repeat_text_month_count: "month", repeat_text_month_count2_before: "every", repeat_text_month_count2_after: "month", repeat_year_label: "On", select_year_day2: "of", repeat_text_year_day: "day", select_year_month: "month", repeat_radio_end: "No end date", repeat_text_occurences_count: "occurrences", repeat_radio_end2: "After", repeat_radio_end3: "End by", month_for_recurring: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], day_for_recurring: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"] } }, Le = { date: { month_full: ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"], month_short: ["Ene", "Feb", "Mar", "Abr", "May", "Jun", "Jul", "Ago", "Sep", "Oct", "Nov", "Dic"], day_full: ["Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"], day_short: ["Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb"] }, labels: { dhx_cal_today_button: "Hoy", day_tab: "Día", week_tab: "Semana", month_tab: "Mes", new_event: "Nuevo evento", icon_save: "Guardar", icon_cancel: "Cancelar", icon_details: "Detalles", icon_edit: "Editar", icon_delete: "Eliminar", confirm_closing: "", confirm_deleting: "El evento se borrará definitivamente, ¿continuar?", section_description: "Descripción", section_time: "Período", full_day: "Todo el día", confirm_recurring: "¿Desea modificar el conjunto de eventos repetidos?", section_recurring: "Repita el evento", button_recurring: "Impedido", button_recurring_open: "Permitido", button_edit_series: "Editar la serie", button_edit_occurrence: "Editar este evento", agenda_tab: "Día", date: "Fecha", description: "Descripción", year_tab: "Año", week_agenda_tab: "Día", grid_tab: "Reja", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute", repeat_radio_day: "Diariamente", repeat_radio_week: "Semanalmente", repeat_radio_month: "Mensualmente", repeat_radio_year: "Anualmente", repeat_radio_day_type: "Cada", repeat_text_day_count: "dia", repeat_radio_day_type2: "Cada jornada de trabajo", repeat_week: " Repetir cada", repeat_text_week_count: "semana:", repeat_radio_month_type: "Repita", repeat_radio_month_start: "El", repeat_text_month_day: "dia cada ", repeat_text_month_count: "mes", repeat_text_month_count2_before: "cada", repeat_text_month_count2_after: "mes", repeat_year_label: "El", select_year_day2: "del", repeat_text_year_day: "dia", select_year_month: "mes", repeat_radio_end: "Sin fecha de finalización", repeat_text_occurences_count: "ocurrencias", repeat_radio_end3: "Fin", repeat_radio_end2: "Después de", month_for_recurring: ["Enero", "Febrero", "Маrzo", "Аbril", "Mayo", "Junio", "Julio", "Аgosto", "Setiembre", "Octubre", "Noviembre", "Diciembre"], day_for_recurring: ["Domingo", "Lunes", "Martes", "Miércoles", "Jeuves", "Viernes", "Sabado"] } }, ze = { date: { month_full: ["Tammikuu", "Helmikuu", "Maaliskuu", "Huhtikuu", "Toukokuu", "Kesäkuu", "Heinäkuu", "Elokuu", "Syyskuu", "Lokakuu", "Marraskuu", "Joulukuu"], month_short: ["Tam", "Hel", "Maa", "Huh", "Tou", "Kes", "Hei", "Elo", "Syy", "Lok", "Mar", "Jou"], day_full: ["Sunnuntai", "Maanantai", "Tiistai", "Keskiviikko", "Torstai", "Perjantai", "Lauantai"], day_short: ["Su", "Ma", "Ti", "Ke", "To", "Pe", "La"] }, labels: { dhx_cal_today_button: "Tänään", day_tab: "Päivä", week_tab: "Viikko", month_tab: "Kuukausi", new_event: "Uusi tapahtuma", icon_save: "Tallenna", icon_cancel: "Peru", icon_details: "Tiedot", icon_edit: "Muokkaa", icon_delete: "Poista", confirm_closing: "", confirm_deleting: "Haluatko varmasti poistaa tapahtuman?", section_description: "Kuvaus", section_time: "Aikajakso", full_day: "Koko päivä", confirm_recurring: "Haluatko varmasti muokata toistuvan tapahtuman kaikkia jaksoja?", section_recurring: "Toista tapahtuma", button_recurring: "Ei käytössä", button_recurring_open: "Käytössä", button_edit_series: "Muokkaa sarja", button_edit_occurrence: "Muokkaa kopio", agenda_tab: "Esityslista", date: "Päivämäärä", description: "Kuvaus", year_tab: "Vuoden", week_agenda_tab: "Esityslista", grid_tab: "Ritilä", drag_to_create: "Luo uusi vetämällä", drag_to_move: "Siirrä vetämällä", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute", repeat_radio_day: "Päivittäin", repeat_radio_week: "Viikoittain", repeat_radio_month: "Kuukausittain", repeat_radio_year: "Vuosittain", repeat_radio_day_type: "Joka", repeat_text_day_count: "päivä", repeat_radio_day_type2: "Joka arkipäivä", repeat_week: "Toista joka", repeat_text_week_count: "viikko näinä päivinä:", repeat_radio_month_type: "Toista", repeat_radio_month_start: "", repeat_text_month_day: "päivänä joka", repeat_text_month_count: "kuukausi", repeat_text_month_count2_before: "joka", repeat_text_month_count2_after: "kuukausi", repeat_year_label: "", select_year_day2: "", repeat_text_year_day: "päivä", select_year_month: "kuukausi", repeat_radio_end: "Ei loppumisaikaa", repeat_text_occurences_count: "Toiston jälkeen", repeat_radio_end3: "Loppuu", repeat_radio_end2: "", month_for_recurring: ["Tammikuu", "Helmikuu", "Maaliskuu", "Huhtikuu", "Toukokuu", "Kesäkuu", "Heinäkuu", "Elokuu", "Syyskuu", "Lokakuu", "Marraskuu", "Joulukuu"], day_for_recurring: ["Sunnuntai", "Maanantai", "Tiistai", "Keskiviikko", "Torstai", "Perjantai", "Lauantai"] } }, je = { date: { month_full: ["Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"], month_short: ["Jan", "Fév", "Mar", "Avr", "Mai", "Juin", "Juil", "Aoû", "Sep", "Oct", "Nov", "Déc"], day_full: ["Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi"], day_short: ["Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam"] }, labels: { dhx_cal_today_button: "Aujourd'hui", day_tab: "Jour", week_tab: "Semaine", month_tab: "Mois", new_event: "Nouvel événement", icon_save: "Enregistrer", icon_cancel: "Annuler", icon_details: "Détails", icon_edit: "Modifier", icon_delete: "Effacer", confirm_closing: "", confirm_deleting: "L'événement sera effacé sans appel, êtes-vous sûr ?", section_description: "Description", section_time: "Période", full_day: "Journée complète", confirm_recurring: "Voulez-vous éditer toute une série d'évènements répétés?", section_recurring: "Périodicité", button_recurring: "Désactivé", button_recurring_open: "Activé", button_edit_series: "Modifier la série", button_edit_occurrence: "Modifier une copie", agenda_tab: "Jour", date: "Date", description: "Description", year_tab: "Année", week_agenda_tab: "Jour", grid_tab: "Grille", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute", repeat_radio_day: "Quotidienne", repeat_radio_week: "Hebdomadaire", repeat_radio_month: "Mensuelle", repeat_radio_year: "Annuelle", repeat_radio_day_type: "Chaque", repeat_text_day_count: "jour", repeat_radio_day_type2: "Chaque journée de travail", repeat_week: " Répéter toutes les", repeat_text_week_count: "semaine:", repeat_radio_month_type: "Répéter", repeat_radio_month_start: "Le", repeat_text_month_day: "jour chaque", repeat_text_month_count: "mois", repeat_text_month_count2_before: "chaque", repeat_text_month_count2_after: "mois", repeat_year_label: "Le", select_year_day2: "du", repeat_text_year_day: "jour", select_year_month: "mois", repeat_radio_end: "Pas de date d"achèvement", repeat_text_occurences_count: "occurrences", repeat_radio_end3: "Fin", repeat_radio_end2: "Après", month_for_recurring: ["Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"], day_for_recurring: ["Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi"] } }, Pe = { date: { month_full: ["ינואר", "פברואר", "מרץ", "אפריל", "מאי", "יוני", "יולי", "אוגוסט", "ספטמבר", "אוקטובר", "נובמבר", "דצמבר"], month_short: ["ינו", "פבר", "מרץ", "אפר", "מאי", "יונ", "יול", "אוג", "ספט", "אוק", "נוב", "דצמ"], day_full: ["ראשון", "שני", "שלישי", "רביעי", "חמישי", "שישי", "שבת"], day_short: ["א", "ב", "ג", "ד", "ה", "ו", "ש"] }, labels: { dhx_cal_today_button: "היום", day_tab: "יום", week_tab: "שבוע", month_tab: "חודש", new_event: "ארוע חדש", icon_save: "שמור", icon_cancel: "בטל", icon_details: "פרטים", icon_edit: "ערוך", icon_delete: "מחק", confirm_closing: "", confirm_deleting: "ארוע ימחק סופית.להמשיך?", section_description: "תיאור", section_time: "תקופה", confirm_recurring: "האם ברצונך לשנות כל סדרת ארועים מתמשכים?", section_recurring: "להעתיק ארוע", button_recurring: "לא פעיל", button_recurring_open: "פעיל", full_day: "יום שלם", button_edit_series: "ערוך את הסדרה", button_edit_occurrence: "עריכת עותק", agenda_tab: "סדר יום", date: "תאריך", description: "תיאור", year_tab: "לשנה", week_agenda_tab: "סדר יום", grid_tab: "סורג", drag_to_create: "Drag to create", drag_to_move: "גרור כדי להזיז", message_ok: "OK", message_cancel: "בטל", next: "הבא", prev: "הקודם", year: "שנה", month: "חודש", day: "יום", hour: "שעה", minute: "דקה", repeat_radio_day: "יומי", repeat_radio_week: "שבועי", repeat_radio_month: "חודשי", repeat_radio_year: "שנתי", repeat_radio_day_type: "חזור כל", repeat_text_day_count: "ימים", repeat_radio_day_type2: "חזור כל יום עבודה", repeat_week: " חזור כל", repeat_text_week_count: "שבוע לפי ימים:", repeat_radio_month_type: "חזור כל", repeat_radio_month_start: "כל", repeat_text_month_day: "ימים כל", repeat_text_month_count: "חודשים", repeat_text_month_count2_before: "חזור כל", repeat_text_month_count2_after: "חודש", repeat_year_label: "כל", select_year_day2: "בחודש", repeat_text_year_day: "ימים", select_year_month: "חודש", repeat_radio_end: "לעולם לא מסתיים", repeat_text_occurences_count: "אירועים", repeat_radio_end3: "מסתיים ב", repeat_radio_end2: "אחרי", month_for_recurring: ["ינואר", "פברואר", "מרץ", "אפריל", "מאי", "יוני", "יולי", "אוגוסט", "ספטמבר", "אוקטובר", "נובמבר", "דצמבר"], day_for_recurring: ["ראשון", "שני", "שלישי", "רביעי", "חמישי", "שישי", "שבת"] } }, Ve = { date: { month_full: ["Január", "Február", "Március", "Április", "Május", "Június", "Július", "Augusztus", "Szeptember", "Október", "November", "December"], month_short: ["Jan", "Feb", "Már", "Ápr", "Máj", "Jún", "Júl", "Aug", "Sep", "Okt", "Nov", "Dec"], day_full: ["Vasárnap", "Hétfõ", "Kedd", "Szerda", "Csütörtök", "Péntek", "szombat"], day_short: ["Va", "Hé", "Ke", "Sze", "Csü", "Pé", "Szo"] }, labels: { dhx_cal_today_button: "Ma", day_tab: "Nap", week_tab: "Hét", month_tab: "Hónap", new_event: "Új esemény", icon_save: "Mentés", icon_cancel: "Mégse", icon_details: "Részletek", icon_edit: "Szerkesztés", icon_delete: "Törlés", confirm_closing: "", confirm_deleting: "Az esemény törölve lesz, biztosan folytatja?", section_description: "Leírás", section_time: "Idõszak", full_day: "Egesz napos", confirm_recurring: "Biztosan szerkeszteni akarod az összes ismétlõdõ esemény beállítását?", section_recurring: "Esemény ismétlése", button_recurring: "Tiltás", button_recurring_open: "Engedélyezés", button_edit_series: "Edit series", button_edit_occurrence: "Szerkesztés bíróság", agenda_tab: "Napirend", date: "Dátum", description: "Leírás", year_tab: "Év", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute" } }, Ie = { date: { month_full: ["Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober", "November", "Desember"], month_short: ["Jan", "Feb", "Mar", "Apr", "Mei", "Jun", "Jul", "Ags", "Sep", "Okt", "Nov", "Des"], day_full: ["Minggu", "Senin", "Selasa", "Rabu", "Kamis", "Jumat", "Sabtu"], day_short: ["Ming", "Sen", "Sel", "Rab", "Kam", "Jum", "Sab"] }, labels: { dhx_cal_today_button: "Hari Ini", day_tab: "Hari", week_tab: "Minggu", month_tab: "Bulan", new_event: "Acara Baru", icon_save: "Simpan", icon_cancel: "Batal", icon_details: "Detail", icon_edit: "Edit", icon_delete: "Hapus", confirm_closing: "", confirm_deleting: "Acara akan dihapus", section_description: "Keterangan", section_time: "Periode", full_day: "Hari penuh", confirm_recurring: "Apakah acara ini akan berulang?", section_recurring: "Acara Rutin", button_recurring: "Tidak Difungsikan", button_recurring_open: "Difungsikan", button_edit_series: "Mengedit seri", button_edit_occurrence: "Mengedit salinan", agenda_tab: "Agenda", date: "Tanggal", description: "Keterangan", year_tab: "Tahun", week_agenda_tab: "Agenda", grid_tab: "Tabel", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute" } }, Be = { date: { month_full: ["Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"], month_short: ["Gen", "Feb", "Mar", "Apr", "Mag", "Giu", "Lug", "Ago", "Set", "Ott", "Nov", "Dic"], day_full: ["Domenica", "Lunedì", "Martedì", "Mercoledì", "Giovedì", "Venerdì", "Sabato"], day_short: ["Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab"] }, labels: { dhx_cal_today_button: "Oggi", day_tab: "Giorno", week_tab: "Settimana", month_tab: "Mese", new_event: "Nuovo evento", icon_save: "Salva", icon_cancel: "Chiudi", icon_details: "Dettagli", icon_edit: "Modifica", icon_delete: "Elimina", confirm_closing: "", confirm_deleting: "L'evento sarà eliminato, siete sicuri?", section_description: "Descrizione", section_time: "Periodo di tempo", full_day: "Intera giornata", confirm_recurring: "Vuoi modificare l'intera serie di eventi?", section_recurring: "Ripetere l'evento", button_recurring: "Disattivato", button_recurring_open: "Attivato", button_edit_series: "Modificare la serie", button_edit_occurrence: "Modificare una copia", agenda_tab: "Agenda", date: "Data", description: "Descrizione", year_tab: "Anno", week_agenda_tab: "Agenda", grid_tab: "Griglia", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute", repeat_radio_day: "Quotidiano", repeat_radio_week: "Settimanale", repeat_radio_month: "Mensile", repeat_radio_year: "Annuale", repeat_radio_day_type: "Ogni", repeat_text_day_count: "giorno", repeat_radio_day_type2: "Ogni giornata lavorativa", repeat_week: " Ripetere ogni", repeat_text_week_count: "settimana:", repeat_radio_month_type: "Ripetere", repeat_radio_month_start: "Il", repeat_text_month_day: "giorno ogni", repeat_text_month_count: "mese", repeat_text_month_count2_before: "ogni", repeat_text_month_count2_after: "mese", repeat_year_label: "Il", select_year_day2: "del", repeat_text_year_day: "giorno", select_year_month: "mese", repeat_radio_end: "Senza data finale", repeat_text_occurences_count: "occorenze", repeat_radio_end3: "Fine", repeat_radio_end2: "Dopo", month_for_recurring: ["Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Jiugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"], day_for_recurring: ["Domenica", "Lunedì", "Martedì", "Mercoledì", "Jovedì", "Venerdì", "Sabato"] } }, Re = { date: { month_full: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], month_short: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], day_full: ["日曜日", "月曜日", "火曜日", "水曜日", "木曜日", "金曜日", "土曜日"], day_short: ["日", "月", "火", "水", "木", "金", "土"] }, labels: { dhx_cal_today_button: "今日", day_tab: "日", week_tab: "週", month_tab: "月", new_event: "新イベント", icon_save: "保存", icon_cancel: "キャンセル", icon_details: "詳細", icon_edit: "編集", icon_delete: "削除", confirm_closing: "", confirm_deleting: "イベント完全に削除されます、宜しいですか?", section_description: "デスクリプション", section_time: "期間", confirm_recurring: "繰り返されているイベントを全て編集しますか?", section_recurring: "イベントを繰り返す", button_recurring: "無効", button_recurring_open: "有効", full_day: "終日", button_edit_series: "シリーズを編集します", button_edit_occurrence: "コピーを編集", agenda_tab: "議題は", date: "日付", description: "説明", year_tab: "今年", week_agenda_tab: "議題は", grid_tab: "グリッド", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute" } }; class qe { constructor(h) { this._locales = {}; @@ -1754,9 +1750,9 @@ class qe { } const Fe = { date: { month_full: ["Januar", "Februar", "Mars", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Desember"], month_short: ["Jan", "Feb", "Mar", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Des"], day_full: ["Søndag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag"], day_short: ["Søn", "Mon", "Tir", "Ons", "Tor", "Fre", "Lør"] }, labels: { dhx_cal_today_button: "I dag", day_tab: "Dag", week_tab: "Uke", month_tab: "Måned", new_event: "Ny hendelse", icon_save: "Lagre", icon_cancel: "Avbryt", icon_details: "Detaljer", icon_edit: "Rediger", icon_delete: "Slett", confirm_closing: "", confirm_deleting: "Hendelsen vil bli slettet permanent. Er du sikker?", section_description: "Beskrivelse", section_time: "Tidsperiode", confirm_recurring: "Vil du forandre hele dette settet av repeterende hendelser?", section_recurring: "Repeter hendelsen", button_recurring: "Av", button_recurring_open: "På", button_edit_series: "Rediger serien", button_edit_occurrence: "Redigere en kopi", agenda_tab: "Agenda", date: "Dato", description: "Beskrivelse", year_tab: "År", week_agenda_tab: "Agenda", grid_tab: "Grid", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute", repeat_radio_day: "Daglig", repeat_radio_week: "Ukentlig", repeat_radio_month: "Månedlig", repeat_radio_year: "Årlig", repeat_radio_day_type: "Hver", repeat_text_day_count: "dag", repeat_radio_day_type2: "Alle hverdager", repeat_week: " Gjentas hver", repeat_text_week_count: "uke på:", repeat_radio_month_type: "På hver", repeat_radio_month_start: "På", repeat_text_month_day: "dag hver", repeat_text_month_count: "måned", repeat_text_month_count2_before: "hver", repeat_text_month_count2_after: "måned", repeat_year_label: "på", select_year_day2: "i", repeat_text_year_day: "dag i", select_year_month: "", repeat_radio_end: "Ingen sluttdato", repeat_text_occurences_count: "forekomst", repeat_radio_end3: "Stop den", repeat_radio_end2: "Etter", month_for_recurring: ["Januar", "Februar", "Mars", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Desember"], day_for_recurring: ["Sondag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag"] } }, Je = { date: { month_full: ["Januari", "Februari", "Maart", "April", "Mei", "Juni", "Juli", "Augustus", "September", "Oktober", "November", "December"], month_short: ["Jan", "Feb", "mrt", "Apr", "Mei", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"], day_full: ["Zondag", "Maandag", "Dinsdag", "Woensdag", "Donderdag", "Vrijdag", "Zaterdag"], day_short: ["Zo", "Ma", "Di", "Wo", "Do", "Vr", "Za"] }, labels: { dhx_cal_today_button: "Vandaag", day_tab: "Dag", week_tab: "Week", month_tab: "Maand", new_event: "Nieuw item", icon_save: "Opslaan", icon_cancel: "Annuleren", icon_details: "Details", icon_edit: "Bewerken", icon_delete: "Verwijderen", confirm_closing: "", confirm_deleting: "Item zal permanent worden verwijderd, doorgaan?", section_description: "Beschrijving", section_time: "Tijd periode", full_day: "Hele dag", confirm_recurring: "Wilt u alle terugkerende items bijwerken?", section_recurring: "Item herhalen", button_recurring: "Uit", button_recurring_open: "Aan", button_edit_series: "Bewerk de serie", button_edit_occurrence: "Bewerk een kopie", agenda_tab: "Agenda", date: "Datum", description: "Omschrijving", year_tab: "Jaar", week_agenda_tab: "Agenda", grid_tab: "Tabel", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute", repeat_radio_day: "Dagelijks", repeat_radio_week: "Wekelijks", repeat_radio_month: "Maandelijks", repeat_radio_year: "Jaarlijks", repeat_radio_day_type: "Elke", repeat_text_day_count: "dag(en)", repeat_radio_day_type2: "Elke werkdag", repeat_week: " Herhaal elke", repeat_text_week_count: "week op de volgende dagen:", repeat_radio_month_type: "Herhaal", repeat_radio_month_start: "Op", repeat_text_month_day: "dag iedere", repeat_text_month_count: "maanden", repeat_text_month_count2_before: "iedere", repeat_text_month_count2_after: "maanden", repeat_year_label: "Op", select_year_day2: "van", repeat_text_year_day: "dag", select_year_month: "maand", repeat_radio_end: "Geen eind datum", repeat_text_occurences_count: "keren", repeat_radio_end3: "Eindigd per", repeat_radio_end2: "Na", month_for_recurring: ["Januari", "Februari", "Maart", "April", "Mei", "Juni", "Juli", "Augustus", "September", "Oktober", "November", "December"], day_for_recurring: ["Zondag", "Maandag", "Dinsdag", "Woensdag", "Donderdag", "Vrijdag", "Zaterdag"] } }, Ue = { date: { month_full: ["Januar", "Februar", "Mars", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Desember"], month_short: ["Jan", "Feb", "Mar", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Des"], day_full: ["Søndag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag"], day_short: ["Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør"] }, labels: { dhx_cal_today_button: "Idag", day_tab: "Dag", week_tab: "Uke", month_tab: "Måned", new_event: "Ny", icon_save: "Lagre", icon_cancel: "Avbryt", icon_details: "Detaljer", icon_edit: "Endre", icon_delete: "Slett", confirm_closing: "Endringer blir ikke lagret, er du sikker?", confirm_deleting: "Oppføringen vil bli slettet, er du sikker?", section_description: "Beskrivelse", section_time: "Tidsperiode", full_day: "Full dag", confirm_recurring: "Vil du endre hele settet med repeterende oppføringer?", section_recurring: "Repeterende oppføring", button_recurring: "Ikke aktiv", button_recurring_open: "Aktiv", button_edit_series: "Rediger serien", button_edit_occurrence: "Redigere en kopi", agenda_tab: "Agenda", date: "Dato", description: "Beskrivelse", year_tab: "År", week_agenda_tab: "Agenda", grid_tab: "Grid", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute" } }, Ye = { date: { month_full: ["Styczeń", "Luty", "Marzec", "Kwiecień", "Maj", "Czerwiec", "Lipiec", "Sierpień", "Wrzesień", "Październik", "Listopad", "Grudzień"], month_short: ["Sty", "Lut", "Mar", "Kwi", "Maj", "Cze", "Lip", "Sie", "Wrz", "Paź", "Lis", "Gru"], day_full: ["Niedziela", "Poniedziałek", "Wtorek", "Środa", "Czwartek", "Piątek", "Sobota"], day_short: ["Nie", "Pon", "Wto", "Śro", "Czw", "Pią", "Sob"] }, labels: { dhx_cal_today_button: "Dziś", day_tab: "Dzień", week_tab: "Tydzień", month_tab: "Miesiąc", new_event: "Nowe zdarzenie", icon_save: "Zapisz", icon_cancel: "Anuluj", icon_details: "Szczegóły", icon_edit: "Edytuj", icon_delete: "Usuń", confirm_closing: "", confirm_deleting: "Zdarzenie zostanie usunięte na zawsze, kontynuować?", section_description: "Opis", section_time: "Okres czasu", full_day: "Cały dzień", confirm_recurring: "Czy chcesz edytować cały zbiór powtarzających się zdarzeń?", section_recurring: "Powtórz zdarzenie", button_recurring: "Nieaktywne", button_recurring_open: "Aktywne", button_edit_series: "Edytuj serię", button_edit_occurrence: "Edytuj kopię", agenda_tab: "Agenda", date: "Data", description: "Opis", year_tab: "Rok", week_agenda_tab: "Agenda", grid_tab: "Tabela", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute", repeat_radio_day: "Codziennie", repeat_radio_week: "Co tydzie", repeat_radio_month: "Co miesic", repeat_radio_year: "Co rok", repeat_radio_day_type: "Kadego", repeat_text_day_count: "dnia", repeat_radio_day_type2: "Kadego dnia roboczego", repeat_week: " Powtarzaj kadego", repeat_text_week_count: "tygodnia w dni:", repeat_radio_month_type: "Powtrz", repeat_radio_month_start: "W", repeat_text_month_day: "dnia kadego", repeat_text_month_count: "miesica", repeat_text_month_count2_before: "kadego", repeat_text_month_count2_after: "miesica", repeat_year_label: "W", select_year_day2: "miesica", repeat_text_year_day: "dnia miesica", select_year_month: "", repeat_radio_end: "Bez daty kocowej", repeat_text_occurences_count: "wystpieniu/ach", repeat_radio_end3: "Zakocz w", repeat_radio_end2: "Po", month_for_recurring: ["Stycznia", "Lutego", "Marca", "Kwietnia", "Maja", "Czerwca", "Lipca", "Sierpnia", "Wrzenia", "Padziernka", "Listopada", "Grudnia"], day_for_recurring: ["Niedziela", "Poniedziaek", "Wtorek", "roda", "Czwartek", "Pitek", "Sobota"] } }, We = { date: { month_full: ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"], month_short: ["Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez"], day_full: ["Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado"], day_short: ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sab"] }, labels: { dhx_cal_today_button: "Hoje", day_tab: "Dia", week_tab: "Semana", month_tab: "Mês", new_event: "Novo evento", icon_save: "Salvar", icon_cancel: "Cancelar", icon_details: "Detalhes", icon_edit: "Editar", icon_delete: "Deletar", confirm_closing: "", confirm_deleting: "Tem certeza que deseja excluir?", section_description: "Descrição", section_time: "Período de tempo", full_day: "Dia inteiro", confirm_recurring: "Deseja editar todos esses eventos repetidos?", section_recurring: "Repetir evento", button_recurring: "Desabilitar", button_recurring_open: "Habilitar", button_edit_series: "Editar a série", button_edit_occurrence: "Editar uma cópia", agenda_tab: "Dia", date: "Data", description: "Descrição", year_tab: "Ano", week_agenda_tab: "Dia", grid_tab: "Grade", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute", repeat_radio_day: "Diário", repeat_radio_week: "Semanal", repeat_radio_month: "Mensal", repeat_radio_year: "Anual", repeat_radio_day_type: "Cada", repeat_text_day_count: "dia(s)", repeat_radio_day_type2: "Cada trabalho diário", repeat_week: " Repita cada", repeat_text_week_count: "semana:", repeat_radio_month_type: "Repetir", repeat_radio_month_start: "Em", repeat_text_month_day: "todo dia", repeat_text_month_count: "mês", repeat_text_month_count2_before: "todo", repeat_text_month_count2_after: "mês", repeat_year_label: "Em", select_year_day2: "of", repeat_text_year_day: "dia", select_year_month: "mês", repeat_radio_end: "Sem data final", repeat_text_occurences_count: "ocorrências", repeat_radio_end3: "Fim", repeat_radio_end2: "Depois", month_for_recurring: ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"], day_for_recurring: ["Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado"] } }, Ke = { date: { month_full: ["Ianuarie", "Februarie", "Martie", "Aprilie", "Mai", "Iunie", "Iulie", "August", "Septembrie", "Octombrie", "November", "December"], month_short: ["Ian", "Feb", "Mar", "Apr", "Mai", "Iun", "Iul", "Aug", "Sep", "Oct", "Nov", "Dec"], day_full: ["Duminica", "Luni", "Marti", "Miercuri", "Joi", "Vineri", "Sambata"], day_short: ["Du", "Lu", "Ma", "Mi", "Jo", "Vi", "Sa"] }, labels: { dhx_cal_today_button: "Astazi", day_tab: "Zi", week_tab: "Saptamana", month_tab: "Luna", new_event: "Eveniment nou", icon_save: "Salveaza", icon_cancel: "Anuleaza", icon_details: "Detalii", icon_edit: "Editeaza", icon_delete: "Sterge", confirm_closing: "Schimbarile nu vor fi salvate, esti sigur?", confirm_deleting: "Evenimentul va fi sters permanent, esti sigur?", section_description: "Descriere", section_time: "Interval", full_day: "Toata ziua", confirm_recurring: "Vrei sa editezi toata seria de evenimente repetate?", section_recurring: "Repetare", button_recurring: "Dezactivata", button_recurring_open: "Activata", button_edit_series: "Editeaza serie", button_edit_occurrence: "Editeaza doar intrare", agenda_tab: "Agenda", date: "Data", description: "Descriere", year_tab: "An", week_agenda_tab: "Agenda", grid_tab: "Lista", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute", repeat_radio_day: "Zilnic", repeat_radio_week: "Saptamanal", repeat_radio_month: "Lunar", repeat_radio_year: "Anual", repeat_radio_day_type: "La fiecare", repeat_text_day_count: "zi(le)", repeat_radio_day_type2: "Fiecare zi lucratoare", repeat_week: " Repeta la fiecare", repeat_text_week_count: "saptamana in urmatoarele zile:", repeat_radio_month_type: "Repeta in", repeat_radio_month_start: "In a", repeat_text_month_day: "zi la fiecare", repeat_text_month_count: "luni", repeat_text_month_count2_before: "la fiecare", repeat_text_month_count2_after: "luni", repeat_year_label: "In", select_year_day2: "a lunii", repeat_text_year_day: "zi a lunii", select_year_month: "", repeat_radio_end: "Fara data de sfarsit", repeat_text_occurences_count: "evenimente", repeat_radio_end3: "La data", repeat_radio_end2: "Dupa", month_for_recurring: ["Ianuarie", "Februarie", "Martie", "Aprilie", "Mai", "Iunie", "Iulie", "August", "Septembrie", "Octombrie", "Noiembrie", "Decembrie"], day_for_recurring: ["Duminica", "Luni", "Marti", "Miercuri", "Joi", "Vineri", "Sambata"] } }, Ge = { date: { month_full: ["Январь", "Февраль", "Март", "Апрель", "Maй", "Июнь", "Июль", "Август", "Сентябрь", "Oктябрь", "Ноябрь", "Декабрь"], month_short: ["Янв", "Фев", "Maр", "Aпр", "Maй", "Июн", "Июл", "Aвг", "Сен", "Окт", "Ноя", "Дек"], day_full: ["Воскресенье", "Понедельник", "Вторник", "Среда", "Четверг", "Пятница", "Суббота"], day_short: ["Вс", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"] }, labels: { dhx_cal_today_button: "Сегодня", day_tab: "День", week_tab: "Неделя", month_tab: "Месяц", new_event: "Новое событие", icon_save: "Сохранить", icon_cancel: "Отменить", icon_details: "Детали", icon_edit: "Изменить", icon_delete: "Удалить", confirm_closing: "", confirm_deleting: "Событие будет удалено безвозвратно, продолжить?", section_description: "Описание", section_time: "Период времени", full_day: "Весь день", confirm_recurring: "Вы хотите изменить всю серию повторяющихся событий?", section_recurring: "Повторение", button_recurring: "Отключено", button_recurring_open: "Включено", button_edit_series: "Редактировать серию", button_edit_occurrence: "Редактировать экземпляр", agenda_tab: "Список", date: "Дата", description: "Описание", year_tab: "Год", week_agenda_tab: "Список", grid_tab: "Таблица", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute", repeat_radio_day: "День", repeat_radio_week: "Неделя", repeat_radio_month: "Месяц", repeat_radio_year: "Год", repeat_radio_day_type: "Каждый", repeat_text_day_count: "день", repeat_radio_day_type2: "Каждый рабочий день", repeat_week: " Повторять каждую", repeat_text_week_count: "неделю , в:", repeat_radio_month_type: "Повторять", repeat_radio_month_start: "", repeat_text_month_day: " числа каждый ", repeat_text_month_count: "месяц", repeat_text_month_count2_before: "каждый ", repeat_text_month_count2_after: "месяц", repeat_year_label: "", select_year_day2: "", repeat_text_year_day: "день", select_year_month: "", repeat_radio_end: "Без даты окончания", repeat_text_occurences_count: "повторений", repeat_radio_end3: "До ", repeat_radio_end2: "", month_for_recurring: ["Января", "Февраля", "Марта", "Апреля", "Мая", "Июня", "Июля", "Августа", "Сентября", "Октября", "Ноября", "Декабря"], day_for_recurring: ["Воскресенье", "Понедельник", "Вторник", "Среду", "Четверг", "Пятницу", "Субботу"] } }, Xe = { date: { month_full: ["Januar", "Februar", "Marec", "April", "Maj", "Junij", "Julij", "Avgust", "September", "Oktober", "November", "December"], month_short: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"], day_full: ["Nedelja", "Ponedeljek", "Torek", "Sreda", "Četrtek", "Petek", "Sobota"], day_short: ["Ned", "Pon", "Tor", "Sre", "Čet", "Pet", "Sob"] }, labels: { dhx_cal_today_button: "Danes", day_tab: "Dan", week_tab: "Teden", month_tab: "Mesec", new_event: "Nov dogodek", icon_save: "Shrani", icon_cancel: "Prekliči", icon_details: "Podrobnosti", icon_edit: "Uredi", icon_delete: "Izbriši", confirm_closing: "", confirm_deleting: "Dogodek bo izbrisan. Želite nadaljevati?", section_description: "Opis", section_time: "Časovni okvir", full_day: "Ves dan", confirm_recurring: "Želite urediti celoten set ponavljajočih dogodkov?", section_recurring: "Ponovi dogodek", button_recurring: "Onemogočeno", button_recurring_open: "Omogočeno", button_edit_series: "Edit series", button_edit_occurrence: "Edit occurrence", agenda_tab: "Zadeva", date: "Datum", description: "Opis", year_tab: "Leto", week_agenda_tab: "Zadeva", grid_tab: "Miza", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute" } }, Ze = { date: { month_full: ["Január", "Február", "Marec", "Apríl", "Máj", "Jún", "Júl", "August", "September", "Október", "November", "December"], month_short: ["Jan", "Feb", "Mar", "Apr", "Máj", "Jún", "Júl", "Aug", "Sept", "Okt", "Nov", "Dec"], day_full: ["Nedeľa", "Pondelok", "Utorok", "Streda", "Štvrtok", "Piatok", "Sobota"], day_short: ["Ne", "Po", "Ut", "St", "Št", "Pi", "So"] }, labels: { dhx_cal_today_button: "Dnes", day_tab: "Deň", week_tab: "Týždeň", month_tab: "Mesiac", new_event: "Nová udalosť", icon_save: "Uložiť", icon_cancel: "Späť", icon_details: "Detail", icon_edit: "Edituj", icon_delete: "Zmazať", confirm_closing: "Vaše zmeny nebudú uložené. Skutočne?", confirm_deleting: "Udalosť bude natrvalo vymazaná. Skutočne?", section_description: "Poznámky", section_time: "Doba platnosti", confirm_recurring: "Prajete si upraviť celú radu opakovaných udalostí?", section_recurring: "Opakovanie udalosti", button_recurring: "Vypnuté", button_recurring_open: "Zapnuté", button_edit_series: "Upraviť opakovania", button_edit_occurrence: "Upraviť inštancie", agenda_tab: "Program", date: "Dátum", description: "Poznámka", year_tab: "Rok", full_day: "Celý deň", week_agenda_tab: "Program", grid_tab: "Mriežka", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute", repeat_radio_day: "Denne", repeat_radio_week: "Týždenne", repeat_radio_month: "Mesaène", repeat_radio_year: "Roène", repeat_radio_day_type: "Každý", repeat_text_day_count: "deò", repeat_radio_day_type2: "Každý prac. deò", repeat_week: "Opakova každý", repeat_text_week_count: "týždeò v dòoch:", repeat_radio_month_type: "Opakova", repeat_radio_month_start: "On", repeat_text_month_day: "deò každý", repeat_text_month_count: "mesiac", repeat_text_month_count2_before: "každý", repeat_text_month_count2_after: "mesiac", repeat_year_label: "On", select_year_day2: "poèas", repeat_text_year_day: "deò", select_year_month: "mesiac", repeat_radio_end: "Bez dátumu ukonèenia", repeat_text_occurences_count: "udalostiach", repeat_radio_end3: "Ukonèi", repeat_radio_end2: "Po", month_for_recurring: ["Január", "Február", "Marec", "Apríl", "Máj", "Jún", "Júl", "August", "September", "Október", "November", "December"], day_for_recurring: ["Nede¾a", "Pondelok", "Utorok", "Streda", "Štvrtok", "Piatok", "Sobota"] } }, Qe = { date: { month_full: ["Januari", "Februari", "Mars", "April", "Maj", "Juni", "Juli", "Augusti", "September", "Oktober", "November", "December"], month_short: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"], day_full: ["Söndag", "Måndag", "Tisdag", "Onsdag", "Torsdag", "Fredag", "Lördag"], day_short: ["Sön", "Mån", "Tis", "Ons", "Tor", "Fre", "Lör"] }, labels: { dhx_cal_today_button: "Idag", day_tab: "Dag", week_tab: "Vecka", month_tab: "Månad", new_event: "Ny händelse", icon_save: "Spara", icon_cancel: "Ångra", icon_details: "Detaljer", icon_edit: "Ändra", icon_delete: "Ta bort", confirm_closing: "", confirm_deleting: "Är du säker på att du vill ta bort händelsen permanent?", section_description: "Beskrivning", section_time: "Tid", full_day: "Hela dagen", confirm_recurring: "Vill du redigera hela serien med repeterande händelser?", section_recurring: "Upprepa händelse", button_recurring: "Inaktiverat", button_recurring_open: "Aktiverat", button_edit_series: "Redigera serien", button_edit_occurrence: "Redigera en kopia", agenda_tab: "Dagordning", date: "Datum", description: "Beskrivning", year_tab: "År", week_agenda_tab: "Dagordning", grid_tab: "Galler", drag_to_create: "Dra för att skapa ny", drag_to_move: "Dra för att flytta", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute", repeat_radio_day: "Dagligen", repeat_radio_week: "Veckovis", repeat_radio_month: "Månadsvis", repeat_radio_year: "Årligen", repeat_radio_day_type: "Var", repeat_text_day_count: "dag", repeat_radio_day_type2: "Varje arbetsdag", repeat_week: " Upprepa var", repeat_text_week_count: "vecka dessa dagar:", repeat_radio_month_type: "Upprepa", repeat_radio_month_start: "Den", repeat_text_month_day: "dagen var", repeat_text_month_count: "månad", repeat_text_month_count2_before: "var", repeat_text_month_count2_after: "månad", repeat_year_label: "Den", select_year_day2: "i", repeat_text_year_day: "dag i", select_year_month: "månad", repeat_radio_end: "Inget slutdatum", repeat_text_occurences_count: "upprepningar", repeat_radio_end3: "Sluta efter", repeat_radio_end2: "Efter", month_for_recurring: ["Januari", "Februari", "Mars", "April", "Maj", "Juni", "Juli", "Augusti", "September", "Oktober", "November", "December"], day_for_recurring: ["Söndag", "Måndag", "Tisdag", "Onsdag", "Torsdag", "Fredag", "Lördag"] } }, et = { date: { month_full: ["Ocak", "Þubat", "Mart", "Nisan", "Mayýs", "Haziran", "Temmuz", "Aðustos", "Eylül", "Ekim", "Kasým", "Aralýk"], month_short: ["Oca", "Þub", "Mar", "Nis", "May", "Haz", "Tem", "Aðu", "Eyl", "Eki", "Kas", "Ara"], day_full: ["Pazar", "Pazartes,", "Salý", "Çarþamba", "Perþembe", "Cuma", "Cumartesi"], day_short: ["Paz", "Pts", "Sal", "Çar", "Per", "Cum", "Cts"] }, labels: { dhx_cal_today_button: "Bugün", day_tab: "Gün", week_tab: "Hafta", month_tab: "Ay", new_event: "Uygun", icon_save: "Kaydet", icon_cancel: "Ýptal", icon_details: "Detaylar", icon_edit: "Düzenle", icon_delete: "Sil", confirm_closing: "", confirm_deleting: "Etkinlik silinecek, devam?", section_description: "Açýklama", section_time: "Zaman aralýðý", full_day: "Tam gün", confirm_recurring: "Tüm tekrar eden etkinlikler silinecek, devam?", section_recurring: "Etkinliði tekrarla", button_recurring: "Pasif", button_recurring_open: "Aktif", button_edit_series: "Dizi düzenleme", button_edit_occurrence: "Bir kopyasını düzenleyin", agenda_tab: "Ajanda", date: "Tarih", description: "Açýklama", year_tab: "Yýl", week_agenda_tab: "Ajanda", grid_tab: "Izgara", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute" } }, tt = { date: { month_full: ["Січень", "Лютий", "Березень", "Квітень", "Травень", "Червень", "Липень", "Серпень", "Вересень", "Жовтень", "Листопад", "Грудень"], month_short: ["Січ", "Лют", "Бер", "Кві", "Тра", "Чер", "Лип", "Сер", "Вер", "Жов", "Лис", "Гру"], day_full: ["Неділя", "Понеділок", "Вівторок", "Середа", "Четвер", "П'ятниця", "Субота"], day_short: ["Нед", "Пон", "Вів", "Сер", "Чет", "Птн", "Суб"] }, labels: { dhx_cal_today_button: "Сьогодні", day_tab: "День", week_tab: "Тиждень", month_tab: "Місяць", new_event: "Нова подія", icon_save: "Зберегти", icon_cancel: "Відміна", icon_details: "Деталі", icon_edit: "Редагувати", icon_delete: "Вилучити", confirm_closing: "", confirm_deleting: "Подія вилучиться назавжди. Ви впевнені?", section_description: "Опис", section_time: "Часовий проміжок", full_day: "Весь день", confirm_recurring: "Хочете редагувати весь перелік повторюваних подій?", section_recurring: "Повторювана подія", button_recurring: "Відключено", button_recurring_open: "Включено", button_edit_series: "Редагувати серію", button_edit_occurrence: "Редагувати примірник", agenda_tab: "Перелік", date: "Дата", description: "Опис", year_tab: "Рік", week_agenda_tab: "Перелік", grid_tab: "Таблиця", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute", repeat_radio_day: "День", repeat_radio_week: "Тиждень", repeat_radio_month: "Місяць", repeat_radio_year: "Рік", repeat_radio_day_type: "Кожний", repeat_text_day_count: "день", repeat_radio_day_type2: "Кожний робочий день", repeat_week: " Повторювати кожен", repeat_text_week_count: "тиждень , по:", repeat_radio_month_type: "Повторювати", repeat_radio_month_start: "", repeat_text_month_day: " числа кожний ", repeat_text_month_count: "місяць", repeat_text_month_count2_before: "кожен ", repeat_text_month_count2_after: "місяць", repeat_year_label: "", select_year_day2: "", repeat_text_year_day: "день", select_year_month: "", repeat_radio_end: "Без дати закінчення", repeat_text_occurences_count: "повторень", repeat_radio_end3: "До ", repeat_radio_end2: "", month_for_recurring: ["січня", "лютого", "березня", "квітня", "травня", "червня", "липня", "серпня", "вересня", "жовтня", "листопада", "грудня"], day_for_recurring: ["Неділям", "Понеділкам", "Вівторкам", "Середам", "Четвергам", "П'ятницям", "Суботам"] } }; class at { - constructor(h, a, i = {}) { - this.state = { date: /* @__PURE__ */ new Date(), modes: ["days", "months", "years"], currentRange: [], eventDates: [], currentModeIndex: 0, ...i }, this.container = null, this.element = null, this.onStateChangeHandlers = [], this.scheduler = h, this._domEvents = h._createDomEventScope(), this.state = this.getState(), Q(this), a && (this.container = a, this.render(this.container)), this.onStateChange((d, n) => { - this.callEvent("onStateChange", [n, d]); + constructor(h, a, r = {}) { + this.state = { date: /* @__PURE__ */ new Date(), modes: ["days", "months", "years"], currentRange: [], eventDates: [], currentModeIndex: 0, ...r }, this.container = null, this.element = null, this.onStateChangeHandlers = [], this.scheduler = h, this._domEvents = h._createDomEventScope(), this.state = this.getState(), Q(this), a && (this.container = a, this.render(this.container)), this.onStateChange((d, i) => { + this.callEvent("onStateChange", [i, d]); }); } getState() { @@ -1773,69 +1769,69 @@ class at { }; } _notifyStateChange(h, a) { - this.onStateChangeHandlers.forEach((i) => i(h, a)); + this.onStateChangeHandlers.forEach((r) => r(h, a)); } _adjustDate(h) { - const { mode: a, date: i } = this.getState(), d = new Date(i); - a === "days" ? d.setMonth(i.getMonth() + h) : a === "months" ? d.setFullYear(i.getFullYear() + h) : d.setFullYear(i.getFullYear() + 10 * h), this.setState({ date: d }); + const { mode: a, date: r } = this.getState(), d = new Date(r); + a === "days" ? d.setMonth(r.getMonth() + h) : a === "months" ? d.setFullYear(r.getFullYear() + h) : d.setFullYear(r.getFullYear() + 10 * h), this.setState({ date: d }); } _toggleMode() { const h = (this.state.currentModeIndex + 1) % this.state.modes.length; this.setState({ currentModeIndex: h }); } _renderCalendarHeader(h) { - const { mode: a, date: i } = this.getState(), d = document.createElement("div"); + const { mode: a, date: r } = this.getState(), d = document.createElement("div"); d.classList.add("dhx_cal_datepicker_header"); - const n = document.createElement("button"); - n.classList.add("dhx_cal_datepicker_arrow", "scheduler_icon", "arrow_left"), d.appendChild(n); + const i = document.createElement("button"); + i.classList.add("dhx_cal_datepicker_arrow", "scheduler_icon", "arrow_left"), d.appendChild(i); const _ = document.createElement("div"); if (_.classList.add("dhx_cal_datepicker_title"), a === "days") - _.innerText = i.toLocaleString("default", { month: "long" }) + " " + i.getFullYear(); + _.innerText = r.toLocaleString("default", { month: "long" }) + " " + r.getFullYear(); else if (a === "months") - _.innerText = i.getFullYear(); + _.innerText = r.getFullYear(); else { - const t = 10 * Math.floor(i.getFullYear() / 10); + const t = 10 * Math.floor(r.getFullYear() / 10); _.innerText = `${t} - ${t + 9}`; } this._domEvents.attach(_, "click", this._toggleMode.bind(this)), d.appendChild(_); const o = document.createElement("button"); - o.classList.add("dhx_cal_datepicker_arrow", "scheduler_icon", "arrow_right"), d.appendChild(o), h.appendChild(d), this._domEvents.attach(n, "click", this._adjustDate.bind(this, -1)), this._domEvents.attach(o, "click", this._adjustDate.bind(this, 1)); + o.classList.add("dhx_cal_datepicker_arrow", "scheduler_icon", "arrow_right"), d.appendChild(o), h.appendChild(d), this._domEvents.attach(i, "click", this._adjustDate.bind(this, -1)), this._domEvents.attach(o, "click", this._adjustDate.bind(this, 1)); } render(h) { this._domEvents.detachAll(), this.container = h || this.container, this.container.innerHTML = "", this.element || (this.element = document.createElement("div"), this.element.classList.add("dhx_cal_datepicker")), this.element.innerHTML = "", this.container.appendChild(this.element), this._renderCalendarHeader(this.element); const a = document.createElement("div"); a.classList.add("dhx_cal_datepicker_data"), this.element.appendChild(a); - const { mode: i } = this.getState(); - i === "days" ? this._renderDayGrid(a) : i === "months" ? this._renderMonthGrid(a) : this._renderYearGrid(a); + const { mode: r } = this.getState(); + r === "days" ? this._renderDayGrid(a) : r === "months" ? this._renderMonthGrid(a) : this._renderYearGrid(a); } _renderDayGridHeader(h) { - const { date: a } = this.getState(), i = this.scheduler; - let d = i.date.week_start(new Date(a)); - const n = i.date.add(i.date.week_start(new Date(a)), 1, "week"); + const { date: a } = this.getState(), r = this.scheduler; + let d = r.date.week_start(new Date(a)); + const i = r.date.add(r.date.week_start(new Date(a)), 1, "week"); h.classList.add("dhx_cal_datepicker_days"); - const _ = i.date.date_to_str("%D"); - for (; d.valueOf() < n.valueOf(); ) { + const _ = r.date.date_to_str("%D"); + for (; d.valueOf() < i.valueOf(); ) { const o = _(d), t = document.createElement("div"); - t.setAttribute("data-day", d.getDay()), t.classList.add("dhx_cal_datepicker_dayname"), t.innerText = o, h.appendChild(t), d = i.date.add(d, 1, "day"); + t.setAttribute("data-day", d.getDay()), t.classList.add("dhx_cal_datepicker_dayname"), t.innerText = o, h.appendChild(t), d = r.date.add(d, 1, "day"); } } _weeksBetween(h, a) { - const i = this.scheduler; - let d = 0, n = new Date(h); - for (; n.valueOf() < a.valueOf(); ) - d += 1, n = i.date.week_start(i.date.add(n, 1, "week")); + const r = this.scheduler; + let d = 0, i = new Date(h); + for (; i.valueOf() < a.valueOf(); ) + d += 1, i = r.date.week_start(r.date.add(i, 1, "week")); return d; } _renderDayGrid(h) { - const { date: a, currentRange: i, eventDates: d, minWeeks: n } = this.getState(); - let _ = i[0], o = i[1]; - const t = d.reduce((p, y) => (p[this.scheduler.date.day_start(new Date(y)).valueOf()] = !0, p), {}), r = document.createElement("div"); - this._renderDayGridHeader(r), h.appendChild(r); + const { date: a, currentRange: r, eventDates: d, minWeeks: i } = this.getState(); + let _ = r[0], o = r[1]; + const t = d.reduce((p, y) => (p[this.scheduler.date.day_start(new Date(y)).valueOf()] = !0, p), {}), n = document.createElement("div"); + this._renderDayGridHeader(n), h.appendChild(n); const s = this.scheduler, c = s.date.week_start(s.date.month_start(new Date(a))), u = s.date.month_start(new Date(a)), v = s.date.add(s.date.month_start(new Date(a)), 1, "month"); let m = s.date.add(s.date.month_start(new Date(a)), 1, "month"); m.getDay() !== 0 && (m = s.date.add(s.date.week_start(m), 1, "week")); let l = this._weeksBetween(c, m); - n && l < n && (m = s.date.add(m, n - l, "week")); + i && l < i && (m = s.date.add(m, i - l, "week")); let f = c; const g = document.createElement("div"); for (g.classList.add("dhx_cal_datepicker_days"), this._domEvents.attach(g, "click", (p) => { @@ -1848,19 +1844,19 @@ class at { h.appendChild(g); } _renderMonthGrid(h) { - const { date: a } = this.getState(), i = document.createElement("div"); - i.classList.add("dhx_cal_datepicker_months"); + const { date: a } = this.getState(), r = document.createElement("div"); + r.classList.add("dhx_cal_datepicker_months"); const d = []; for (let t = 0; t < 12; t++) d.push(new Date(a.getFullYear(), t, 1)); - const n = this.scheduler.date.date_to_str("%M"); + const i = this.scheduler.date.date_to_str("%M"); d.forEach((t) => { - const r = document.createElement("div"); - r.classList.add("dhx_cal_datepicker_month"), a.getMonth() === t.getMonth() && r.classList.add("dhx_cal_datepicker_current"), r.setAttribute("data-month", t.getMonth()), r.innerHTML = n(t), this._domEvents.attach(r, "click", () => { + const n = document.createElement("div"); + n.classList.add("dhx_cal_datepicker_month"), a.getMonth() === t.getMonth() && n.classList.add("dhx_cal_datepicker_current"), n.setAttribute("data-month", t.getMonth()), n.innerHTML = i(t), this._domEvents.attach(n, "click", () => { const s = new Date(t); this.setState({ date: s, mode: "days" }); - }), i.appendChild(r); - }), h.appendChild(i); + }), r.appendChild(n); + }), h.appendChild(r); const _ = document.createElement("div"); _.classList.add("dhx_cal_datepicker_done"); const o = document.createElement("button"); @@ -1869,33 +1865,33 @@ class at { }), _.appendChild(o), h.appendChild(_); } _renderYearGrid(h) { - const { date: a } = this.getState(), i = 10 * Math.floor(a.getFullYear() / 10), d = document.createElement("div"); + const { date: a } = this.getState(), r = 10 * Math.floor(a.getFullYear() / 10), d = document.createElement("div"); d.classList.add("dhx_cal_datepicker_years"); - for (let o = i - 1; o <= i + 10; o++) { + for (let o = r - 1; o <= r + 10; o++) { const t = document.createElement("div"); t.innerText = o, t.classList.add("dhx_cal_datepicker_year"), t.setAttribute("data-year", o), a.getFullYear() === o && t.classList.add("dhx_cal_datepicker_current"), this._domEvents.attach(t, "click", () => { this.setState({ date: new Date(o, a.getMonth(), 1), mode: "months" }); }), d.appendChild(t); } h.appendChild(d); - const n = document.createElement("div"); - n.classList.add("dhx_cal_datepicker_done"); + const i = document.createElement("div"); + i.classList.add("dhx_cal_datepicker_done"); const _ = document.createElement("button"); _.innerText = "Done", _.classList.add("dhx_cal_datepicker_done_btn"), this._domEvents.attach(_, "click", () => { this.setState({ mode: "months" }); - }), n.appendChild(_), h.appendChild(n); + }), i.appendChild(_), h.appendChild(i); } destructor() { this.onStateChangeHandlers = [], this.element && (this.element.innerHTML = "", this.element.remove()), this._domEvents.detachAll(), this.callEvent("onDestroy", []), this.detachAllEvents(), this.scheduler = null; } } function nt(e) { - const h = { version: "7.0.3" }; + const h = { version: "7.0.4" }; (function(t) { - var r = { agenda: "https://docs.dhtmlx.com/scheduler/agenda_view.html", grid: "https://docs.dhtmlx.com/scheduler/grid_view.html", map: "https://docs.dhtmlx.com/scheduler/map_view.html", unit: "https://docs.dhtmlx.com/scheduler/units_view.html", timeline: "https://docs.dhtmlx.com/scheduler/timeline_view.html", week_agenda: "https://docs.dhtmlx.com/scheduler/weekagenda_view.html", year: "https://docs.dhtmlx.com/scheduler/year_view.html", anythingElse: "https://docs.dhtmlx.com/scheduler/views.html" }, s = { agenda: "ext/dhtmlxscheduler_agenda_view.js", grid: "ext/dhtmlxscheduler_grid_view.js", map: "ext/dhtmlxscheduler_map_view.js", unit: "ext/dhtmlxscheduler_units.js", timeline: "ext/dhtmlxscheduler_timeline.js, ext/dhtmlxscheduler_treetimeline.js, ext/dhtmlxscheduler_daytimeline.js", week_agenda: "ext/dhtmlxscheduler_week_agenda.js", year: "ext/dhtmlxscheduler_year_view.js", limit: "ext/dhtmlxscheduler_limit.js" }; + var n = { agenda: "https://docs.dhtmlx.com/scheduler/agenda_view.html", grid: "https://docs.dhtmlx.com/scheduler/grid_view.html", map: "https://docs.dhtmlx.com/scheduler/map_view.html", unit: "https://docs.dhtmlx.com/scheduler/units_view.html", timeline: "https://docs.dhtmlx.com/scheduler/timeline_view.html", week_agenda: "https://docs.dhtmlx.com/scheduler/weekagenda_view.html", year: "https://docs.dhtmlx.com/scheduler/year_view.html", anythingElse: "https://docs.dhtmlx.com/scheduler/views.html" }, s = { agenda: "ext/dhtmlxscheduler_agenda_view.js", grid: "ext/dhtmlxscheduler_grid_view.js", map: "ext/dhtmlxscheduler_map_view.js", unit: "ext/dhtmlxscheduler_units.js", timeline: "ext/dhtmlxscheduler_timeline.js, ext/dhtmlxscheduler_treetimeline.js, ext/dhtmlxscheduler_daytimeline.js", week_agenda: "ext/dhtmlxscheduler_week_agenda.js", year: "ext/dhtmlxscheduler_year_view.js", limit: "ext/dhtmlxscheduler_limit.js" }; t._commonErrorMessages = { unknownView: function(c) { var u = s[c] ? "You're probably missing " + s[c] + "." : ""; - return "`" + c + "` view is not defined. \nPlease check parameters you pass to `scheduler.init` or `scheduler.setCurrentView` in your code and ensure you've imported appropriate extensions. \nRelated docs: " + (r[c] || r.anythingElse) + ` + return "`" + c + "` view is not defined. \nPlease check parameters you pass to `scheduler.init` or `scheduler.setCurrentView` in your code and ensure you've imported appropriate extensions. \nRelated docs: " + (n[c] || n.anythingElse) + ` ` + (u ? u + ` ` : ""); }, collapsedContainer: function(c) { @@ -1905,13 +1901,13 @@ Make sure that the container has some initial height or use different units. For `; } }, t.createTimelineView = function() { throw new Error("scheduler.createTimelineView is not implemented. Be sure to add the required extension: " + s.timeline + ` -Related docs: ` + r.timeline); +Related docs: ` + n.timeline); }, t.createUnitsView = function() { throw new Error("scheduler.createUnitsView is not implemented. Be sure to add the required extension: " + s.unit + ` -Related docs: ` + r.unit); +Related docs: ` + n.unit); }, t.createGridView = function() { throw new Error("scheduler.createGridView is not implemented. Be sure to add the required extension: " + s.grid + ` -Related docs: ` + r.grid); +Related docs: ` + n.grid); }, t.addMarkedTimespan = function() { throw new Error(`scheduler.addMarkedTimespan is not implemented. Be sure to add the required extension: ext/dhtmlxscheduler_limit.js Related docs: https://docs.dhtmlx.com/scheduler/limits.html`); @@ -1932,13 +1928,13 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); _e(t), t._init_once = function() { }; }; - var r = { render: function(l) { + const n = { render: function(l) { return t._init_nav_bar(l); } }, s = { render: function(l) { - var f = document.createElement("div"); + const f = document.createElement("div"); return f.className = "dhx_cal_header", f; } }, c = { render: function(l) { - var f = document.createElement("div"); + const f = document.createElement("div"); return f.className = "dhx_cal_data", f; } }; function u(l) { @@ -1947,22 +1943,22 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); t.init = function(l, f, g) { if (!this.$destroyed) { if (f = f || t._currentDate(), g = g || "week", this._obj && this.unset_actions(), this._obj = typeof l == "string" ? document.getElementById(l) : l, this.$container = this._obj, this.$root = this._obj, !this.$container.offsetHeight && this.$container.offsetWidth && this.$container.style.height === "100%" && window.console.error(t._commonErrorMessages.collapsedContainer(), this.$container), this.config.wai_aria_attributes && this.config.wai_aria_application_role && this.$container.setAttribute("role", "application"), this.config.header || u(this.$container) || (this.config.header = function(p) { - var y = ["day", "week", "month"]; + const y = ["day", "week", "month"]; if (p.matrix) - for (var w in p.matrix) + for (const w in p.matrix) y.push(w); if (p._props) - for (var w in p._props) + for (const w in p._props) y.push(w); if (p._grid && p._grid.names) - for (var w in p._grid.names) + for (const w in p._grid.names) y.push(w); - return ["map", "agenda", "week_agenda", "year"].forEach(function(b) { - p[b + "_view"] && y.push(b); + return ["map", "agenda", "week_agenda", "year"].forEach(function(w) { + p[w + "_view"] && y.push(w); }), y.concat(["date"]).concat(["prev", "today", "next"]); }(this), window.console.log(["Required DOM elements are missing from the scheduler container and **scheduler.config.header** is not specified.", "Using a default header configuration: ", "scheduler.config.header = " + JSON.stringify(this.config.header, null, 2), "Check this article for the details: https://docs.dhtmlx.com/scheduler/initialization.html"].join(` `))), this.config.header) - this.$container.innerHTML = "", this.$container.classList.add("dhx_cal_container"), this.config.header.height && (this.xy.nav_height = this.config.header.height), this.$container.appendChild(r.render(this.config.header)), this.$container.appendChild(s.render()), this.$container.appendChild(c.render()); + this.$container.innerHTML = "", this.$container.classList.add("dhx_cal_container"), this.config.header.height && (this.xy.nav_height = this.config.header.height), this.$container.appendChild(n.render(this.config.header)), this.$container.appendChild(s.render()), this.$container.appendChild(c.render()); else if (!u(this.$container)) throw new Error(["Required DOM elements are missing from the scheduler container.", "Be sure to either specify them manually in the markup: https://docs.dhtmlx.com/scheduler/initialization.html#initializingschedulerviamarkup", "Or to use **scheduler.config.header** setting so they could be created automatically: https://docs.dhtmlx.com/scheduler/initialization.html#initializingschedulerviaheaderconfig"].join(` `)); @@ -1985,14 +1981,16 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); var b = "left"; f !== void 0 && (l.style.width = w(f)), g !== void 0 && (l.style.height = w(g)), arguments.length > 3 && (p !== void 0 && (this.config.rtl && (b = "right"), l.style[b] = p + "px"), y !== void 0 && (l.style.top = y + "px")); }, t.get_elements = function() { - for (var l = this._obj.getElementsByTagName("DIV"), f = 0; f < l.length; f++) { - var g = t._getClassName(l[f]), p = l[f].getAttribute("data-tab") || l[f].getAttribute("name") || ""; + const l = this._obj.getElementsByTagName("DIV"); + for (let f = 0; f < l.length; f++) { + let g = t._getClassName(l[f]); + const p = l[f].getAttribute("data-tab") || l[f].getAttribute("name") || ""; g && (g = g.split(" ")[0]), this._els[g] || (this._els[g] = []), this._els[g].push(l[f]); - var y = t.locale.labels[p + "_tab"] || t.locale.labels[p || g]; + let y = t.locale.labels[p + "_tab"] || t.locale.labels[p || g]; typeof y != "string" && p && !l[f].innerHTML && (y = p.split("_")[0]), y && (this._waiAria.labelAttr(l[f], y), l[f].innerHTML = y); } }; - var v = t._createDomEventScope(); + const v = t._createDomEventScope(); function m(l, f) { const g = new Date(l), p = (new Date(f).getTime() - g.getTime()) / 864e5; return Math.abs(p); @@ -2000,64 +1998,61 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); t.unset_actions = function() { v.detachAll(); }, t.set_actions = function() { - for (var l in this._els) + for (const l in this._els) if (this._click[l]) - for (var f = 0; f < this._els[l].length; f++) { + for (let f = 0; f < this._els[l].length; f++) { const g = this._els[l][f], p = this._click[l].bind(g); v.attach(g, "click", p); } - v.attach(this._obj, "selectstart", function(g) { - return g.preventDefault(), !1; - }), v.attach(this._obj, "mousemove", function(g) { - t._temp_touch_block || t._on_mouse_move(g); - }), v.attach(this._obj, "mousedown", function(g) { - t._ignore_next_click || t._on_mouse_down(g); - }), v.attach(this._obj, "mouseup", function(g) { - t._ignore_next_click || t._on_mouse_up(g); - }), v.attach(this._obj, "dblclick", function(g) { - t._on_dbl_click(g); - }), v.attach(this._obj, "contextmenu", function(g) { - t.checkEvent("onContextMenu") && g.preventDefault(); - var p = g, y = p.target || p.srcElement; - return t.callEvent("onContextMenu", [t._locate_event(y), p]); + v.attach(this._obj, "selectstart", function(l) { + return l.preventDefault(), !1; + }), v.attach(this._obj, "mousemove", function(l) { + t._temp_touch_block || t._on_mouse_move(l); + }), v.attach(this._obj, "mousedown", function(l) { + t._ignore_next_click || t._on_mouse_down(l); + }), v.attach(this._obj, "mouseup", function(l) { + t._ignore_next_click || t._on_mouse_up(l); + }), v.attach(this._obj, "dblclick", function(l) { + t._on_dbl_click(l); + }), v.attach(this._obj, "contextmenu", function(l) { + return t.checkEvent("onContextMenu") && l.preventDefault(), t.callEvent("onContextMenu", [t._locate_event(l.target), l]); }); }, t.select = function(l) { this._select_id != l && (t._close_not_saved(), this.editStop(!1), this._select_id && this.unselect(), this._select_id = l, this.updateEvent(l), this.callEvent("onEventSelected", [l])); }, t.unselect = function(l) { - if (!l || l == this._select_id) { - var f = this._select_id; - this._select_id = null, f && this.getEvent(f) && this.updateEvent(f), this.callEvent("onEventUnselected", [f]); - } + if (l && l != this._select_id) + return; + const f = this._select_id; + this._select_id = null, f && this.getEvent(f) && this.updateEvent(f), this.callEvent("onEventUnselected", [f]); }, t.getState = function() { return { mode: this._mode, date: new Date(this._date), min_date: new Date(this._min_date), max_date: new Date(this._max_date), editor_id: this._edit_id, lightbox_id: this._lightbox_id, new_event: this._new_event, select_id: this._select_id, expanded: this.expanded, drag_id: this._drag_id, drag_mode: this._drag_mode }; }, t._click = { dhx_cal_data: function(l) { if (t._ignore_next_click) return l.preventDefault && l.preventDefault(), l.cancelBubble = !0, t._ignore_next_click = !1, !1; - var f = l.target, g = t._locate_event(f); - if (g) { - if (!t.callEvent("onClick", [g, l]) || t.config.readonly) + const f = t._locate_event(l.target); + if (f) { + if (!t.callEvent("onClick", [f, l]) || t.config.readonly) return; } else t.callEvent("onEmptyClick", [t.getActionData(l).date, l]); - if (g && t.config.select) { - t.select(g); - const y = f.closest(".dhx_menu_icon"); - var p = t._getClassName(y); - p.indexOf("_icon") != -1 && t._click.buttons[p.split(" ")[1].replace("icon_", "")](g); + if (f && t.config.select) { + t.select(f); + const g = l.target.closest(".dhx_menu_icon"), p = t._getClassName(g); + p.indexOf("_icon") != -1 && t._click.buttons[p.split(" ")[1].replace("icon_", "")](f); } else t._close_not_saved(), t.getState().select_id && (/* @__PURE__ */ new Date()).valueOf() - (t._new_event || 0) > 500 && t.unselect(); }, dhx_cal_prev_button: function() { t._click.dhx_cal_next_button(0, -1); }, dhx_cal_next_button: function(l, f) { - var g = 1; + let g = 1; t.config.rtl && (f = -f, g = -g), t.setCurrentView(t.date.add(t.date[t._mode + "_start"](new Date(t._date)), f || g, t._mode)); }, dhx_cal_today_button: function() { t.callEvent("onBeforeTodayDisplayed", []) && t.setCurrentView(t._currentDate()); }, dhx_cal_tab: function() { - var l = this.getAttribute("data-tab"), f = this.getAttribute("name"), g = l || f.substring(0, f.search("_tab")); + const l = this.getAttribute("data-tab"), f = this.getAttribute("name"), g = l || f.substring(0, f.search("_tab")); t.setCurrentView(t._date, g); }, buttons: { delete: function(l) { - var f = t.locale.labels.confirm_deleting; + const f = t.locale.labels.confirm_deleting; t._dhtmlx_confirm({ message: f, title: t.locale.labels.title_confirm_deleting, callback: function() { t.deleteEvent(l); }, config: { ok: t.locale.labels.icon_delete } }); @@ -2075,63 +2070,67 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); if (!l) return g(); p = p || {}; - var y = { ...p, text: l }; + const y = { ...p, text: l }; f && (y.title = f), g && (y.callback = function(w) { w && g(); }), t.confirm(y); }, t.addEventNow = function(l, f, g) { - var p = {}; + let p = {}; t._isObject(l) && !t._isDate(l) && (p = l, l = null); - var y = 6e4 * (this.config.event_duration || this.config.time_step); + const y = 6e4 * (this.config.event_duration || this.config.time_step); l || (l = p.start_date || Math.round(t._currentDate().valueOf() / y) * y); - var w = new Date(l); + let w = new Date(l); if (!f) { - var b = this.config.first_hour; - b > w.getHours() && (w.setHours(b), l = w.valueOf()), f = l.valueOf() + y; + let E = this.config.first_hour; + E > w.getHours() && (w.setHours(E), l = w.valueOf()), f = l.valueOf() + y; } - var k = new Date(f); - w.valueOf() == k.valueOf() && k.setTime(k.valueOf() + y), p.start_date = p.start_date || w, p.end_date = p.end_date || k, p.text = p.text || this.locale.labels.new_event, p.id = this._drag_id = p.id || this.uid(), this._drag_mode = "new-size", this._loading = !0; - var E = this.addEvent(p); - return this.callEvent("onEventCreated", [this._drag_id, g]), this._loading = !1, this._drag_event = {}, this._on_mouse_up(g), E; + let b = new Date(f); + w.valueOf() == b.valueOf() && b.setTime(b.valueOf() + y), p.start_date = p.start_date || w, p.end_date = p.end_date || b, p.text = p.text || this.locale.labels.new_event, p.id = this._drag_id = p.id || this.uid(), this._drag_mode = "new-size", this._loading = !0; + const k = this.addEvent(p); + return this.callEvent("onEventCreated", [this._drag_id, g]), this._loading = !1, this._drag_event = {}, this._on_mouse_up(g), k; }, t._on_dbl_click = function(l, f) { - if (f = f || l.target || l.srcElement, !this.config.readonly) { - var g = t._getClassName(f).split(" ")[0]; - switch (g) { - case "dhx_scale_holder": - case "dhx_scale_holder_now": - case "dhx_month_body": - case "dhx_wa_day_data": - if (!t.config.dblclick_create) - break; - this.addEventNow(this.getActionData(l).date, null, l); - break; - case "dhx_cal_event": - case "dhx_wa_ev_body": - case "dhx_agenda_line": - case "dhx_cal_agenda_event_line": - case "dhx_grid_event": - case "dhx_cal_event_line": - case "dhx_cal_event_clear": - var p = this._locate_event(f); - if (!this.callEvent("onDblClick", [p, l])) - return; - this.config.details_on_dblclick || this._table_view || !this.getEvent(p)._timed || !this.config.select ? this.showLightbox(p) : this.edit(p); + if (f = f || l.target, this.config.readonly) + return; + const g = t._getClassName(f).split(" ")[0]; + switch (g) { + case "dhx_scale_holder": + case "dhx_scale_holder_now": + case "dhx_month_body": + case "dhx_wa_day_data": + if (!t.config.dblclick_create) break; - case "dhx_time_block": - case "dhx_cal_container": + this.addEventNow(this.getActionData(l).date, null, l); + break; + case "dhx_cal_event": + case "dhx_wa_ev_body": + case "dhx_agenda_line": + case "dhx_cal_agenda_event_line": + case "dhx_grid_event": + case "dhx_cal_event_line": + case "dhx_cal_event_clear": { + const p = this._locate_event(f); + if (!this.callEvent("onDblClick", [p, l])) return; - default: - var y = this["dblclick_" + g]; - if (y) - y.call(this, l); - else if (f.parentNode && f != this) - return t._on_dbl_click(l, f.parentNode); + this.config.details_on_dblclick || this._table_view || !this.getEvent(p)._timed || !this.config.select ? this.showLightbox(p) : this.edit(p); + break; + } + case "dhx_time_block": + case "dhx_cal_container": + return; + default: { + const p = this["dblclick_" + g]; + if (p) + p.call(this, l); + else if (f.parentNode && f != this) + return t._on_dbl_click(l, f.parentNode); + break; } } }, t._get_column_index = function(l) { - var f = 0; + let f = 0; if (this._cols) { - for (var g = 0, p = 0; g + this._cols[p] < l && p < this._cols.length; ) + let g = 0, p = 0; + for (; g + this._cols[p] < l && p < this._cols.length; ) g += this._cols[p], p++; if (f = p + (this._cols[p] ? (l - g) / this._cols[p] : 0), this._ignores && f >= this._cols.length) for (; f >= 1 && this._ignores[Math.floor(f)]; ) @@ -2140,23 +2139,24 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); return f; }, t._week_indexes_from_pos = function(l) { if (this._cols) { - var f = this._get_column_index(l.x); + const f = this._get_column_index(l.x); return l.x = Math.min(this._cols.length - 1, Math.max(0, Math.ceil(f) - 1)), l.y = Math.max(0, Math.ceil(60 * l.y / (this.config.time_step * this.config.hour_size_px)) - 1) + this.config.first_hour * (60 / this.config.time_step), l; } return l; }, t._mouse_coords = function(l) { - var f, g = document.body, p = document.documentElement; + let f; + const g = document.body, p = document.documentElement; f = this.$env.isIE || !l.pageX && !l.pageY ? { x: l.clientX + (g.scrollLeft || p.scrollLeft || 0) - g.clientLeft, y: l.clientY + (g.scrollTop || p.scrollTop || 0) - g.clientTop } : { x: l.pageX, y: l.pageY }, this.config.rtl && this._colsS ? (f.x = this.$container.querySelector(".dhx_cal_data").offsetWidth - f.x, f.x += this.$domHelpers.getAbsoluteLeft(this._obj), this._mode !== "month" && (f.x -= this.xy.scale_width)) : f.x -= this.$domHelpers.getAbsoluteLeft(this._obj) + (this._table_view ? 0 : this.xy.scale_width); - var y = this.$container.querySelector(".dhx_cal_data"); + const y = this.$container.querySelector(".dhx_cal_data"); f.y -= this.$domHelpers.getAbsoluteTop(y) - this._els.dhx_cal_data[0].scrollTop, f.ev = l; - var w = this["mouse_" + this._mode]; + const w = this["mouse_" + this._mode]; if (w) f = w.call(this, f); else if (this._table_view) { - var b = this._get_column_index(f.x); + const b = this._get_column_index(f.x); if (!this._cols || !this._colsS) return f; - var k = 0; + let k = 0; for (k = 1; k < this._colsS.heights.length && !(this._colsS.heights[k] > f.y); k++) ; f.y = Math.ceil(24 * (Math.max(0, b) + 7 * Math.max(0, k - 1)) * 60 / this.config.time_step), (t._drag_mode || this._mode == "month") && (f.y = 24 * (Math.max(0, Math.ceil(b) - 1) + 7 * Math.max(0, k - 1)) * 60 / this.config.time_step), this._drag_mode == "move" && t._ignores_detected && t.config.preserve_length && (f._ignores = !0, this._drag_event._event_length || (this._drag_event._event_length = this._get_real_event_length(this._drag_event.start_date, this._drag_event.end_date, { x_step: 1, x_unit: "day" }))), f.x = 0; @@ -2165,7 +2165,7 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); return f.timestamp = +/* @__PURE__ */ new Date(), f; }, t._close_not_saved = function() { if ((/* @__PURE__ */ new Date()).valueOf() - (t._new_event || 0) > 500 && t._edit_id) { - var l = t.locale.labels.confirm_closing; + const l = t.locale.labels.confirm_closing; t._dhtmlx_confirm({ message: l, title: t.locale.labels.title_confirm_closing, callback: function() { t.editStop(t.config.positive_closing); } }), l && (this._drag_id = this._drag_pos = this._drag_mode = null); @@ -2178,14 +2178,14 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); } return !l || !this._drag_pos || !!(this._drag_pos.has_moved || !this._drag_pos.timestamp || f.timestamp - this._drag_pos.timestamp > 100 || g(l.ev.clientX, f.ev.clientX, 5) || g(l.ev.clientY, f.ev.clientY, 5)); }, t._correct_drag_start_date = function(l) { - var f; + let f; t.matrix && (f = t.matrix[t._mode]), f = f || { x_step: 1, x_unit: "day" }, l = new Date(l); - var g = 1; + let g = 1; return (f._start_correction || f._end_correction) && (g = 60 * (f.last_hour || 0) - (60 * l.getHours() + l.getMinutes()) || 1), 1 * l + (t._get_fictional_event_length(l, g, f) - g); }, t._correct_drag_end_date = function(l, f) { - var g; + let g; t.matrix && (g = t.matrix[t._mode]), g = g || { x_step: 1, x_unit: "day" }; - var p = 1 * l + t._get_fictional_event_length(l, f, g); + const p = 1 * l + t._get_fictional_event_length(l, f, g); return new Date(1 * p - (t._get_fictional_event_length(p, -1, g, -1) + 1)); }, t._on_mouse_move = function(l) { if (this._drag_mode) { @@ -2221,8 +2221,8 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); this.config.time_step = 1; var T = this._mouse_coords(l); this.config.time_step = E; - var O = f.y * E * 6e4, L = Math.min(f.y + 1, C) * E * 6e4, $ = 6e4 * T.y; - p = Math.abs(O - $) > Math.abs(L - $) ? N + L : N + O, p += 6e4 * (new Date(p).getTimezoneOffset() - M.getTimezoneOffset()), this._els.dhx_cal_data[0].style.cursor = "s-resize", this._mode != "week" && this._mode != "day" || (p = this._correct_shift(p)); + var O = f.y * E * 6e4, L = Math.min(f.y + 1, C) * E * 6e4, H = 6e4 * T.y; + p = Math.abs(O - H) > Math.abs(L - H) ? N + L : N + O, p += 6e4 * (new Date(p).getTimezoneOffset() - M.getTimezoneOffset()), this._els.dhx_cal_data[0].style.cursor = "s-resize", this._mode != "week" && this._mode != "day" || (p = this._correct_shift(p)); } if (this._drag_mode == "new-size") if (p <= this._drag_start) { @@ -2233,18 +2233,18 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); else p <= g && (p = g + 6e4 * E); } - var z = new Date(p - 1), H = new Date(g); - if (this._drag_mode == "move" && t.config.limit_drag_out && (+H < +t._min_date || +p > +t._max_date)) { + var z = new Date(p - 1), $ = new Date(g); + if (this._drag_mode == "move" && t.config.limit_drag_out && (+$ < +t._min_date || +p > +t._max_date)) { if (+D.start_date < +t._min_date || +D.end_date > +t._max_date) - H = new Date(D.start_date), p = new Date(D.end_date); + $ = new Date(D.start_date), p = new Date(D.end_date); else { - var j = p - H; - +H < +t._min_date ? (H = new Date(t._min_date), f._ignores && this.config.preserve_length && this._table_view ? (H = new Date(t._correct_drag_start_date(H)), k._start_correction && (H = new Date(H.valueOf() + k._start_correction)), p = new Date(1 * H + this._get_fictional_event_length(H, this._drag_event._event_length, k))) : p = new Date(+H + j)) : (p = new Date(t._max_date), f._ignores && this.config.preserve_length && this._table_view ? (k._end_correction && (p = new Date(p.valueOf() - k._end_correction)), p = new Date(1 * p - this._get_fictional_event_length(p, 0, k, !0)), H = new Date(1 * p - this._get_fictional_event_length(p, this._drag_event._event_length, k, !0)), this._ignores_detected && (H = t.date.add(H, k.x_step, k.x_unit), p = new Date(1 * p - this._get_fictional_event_length(p, 0, k, !0)), p = t.date.add(p, k.x_step, k.x_unit))) : H = new Date(+p - j)); + var j = p - $; + +$ < +t._min_date ? ($ = new Date(t._min_date), f._ignores && this.config.preserve_length && this._table_view ? ($ = new Date(t._correct_drag_start_date($)), k._start_correction && ($ = new Date($.valueOf() + k._start_correction)), p = new Date(1 * $ + this._get_fictional_event_length($, this._drag_event._event_length, k))) : p = new Date(+$ + j)) : (p = new Date(t._max_date), f._ignores && this.config.preserve_length && this._table_view ? (k._end_correction && (p = new Date(p.valueOf() - k._end_correction)), p = new Date(1 * p - this._get_fictional_event_length(p, 0, k, !0)), $ = new Date(1 * p - this._get_fictional_event_length(p, this._drag_event._event_length, k, !0)), this._ignores_detected && ($ = t.date.add($, k.x_step, k.x_unit), p = new Date(1 * p - this._get_fictional_event_length(p, 0, k, !0)), p = t.date.add(p, k.x_step, k.x_unit))) : $ = new Date(+p - j)); } z = new Date(p - 1); } - if (!this._table_view && this._dragEventBody && !t.config.all_timed && (!t._get_section_view() && f.x != this._get_event_sday({ start_date: new Date(g), end_date: new Date(g) }) || new Date(g).getHours() < this.config.first_hour) && (j = p - H, this._drag_mode == "move" && (S = this._min_date.valueOf() + 24 * f.x * 60 * 6e4, (H = new Date(S)).setHours(this.config.first_hour), p = new Date(H.valueOf() + j), z = new Date(p - 1))), this._table_view || t.config.all_timed || !(!t.getView() && f.x != this._get_event_sday({ start_date: new Date(p), end_date: new Date(p) }) || new Date(p).getHours() >= this.config.last_hour) || (j = p - H, S = this._min_date.valueOf() + 24 * f.x * 60 * 6e4, (p = t.date.date_part(new Date(S))).setHours(this.config.last_hour), z = new Date(p - 1), this._drag_mode == "move" && (H = new Date(+p - j))), this._table_view || z.getDate() == H.getDate() && z.getHours() < this.config.last_hour || t._allow_dnd) - if (D.start_date = H, D.end_date = new Date(p), this.config.update_render) { + if (!this._table_view && this._dragEventBody && !t.config.all_timed && (!t._get_section_view() && f.x != this._get_event_sday({ start_date: new Date(g), end_date: new Date(g) }) || new Date(g).getHours() < this.config.first_hour) && (j = p - $, this._drag_mode == "move" && (S = this._min_date.valueOf() + 24 * f.x * 60 * 6e4, ($ = new Date(S)).setHours(this.config.first_hour), p = new Date($.valueOf() + j), z = new Date(p - 1))), this._table_view || t.config.all_timed || !(!t.getView() && f.x != this._get_event_sday({ start_date: new Date(p), end_date: new Date(p) }) || new Date(p).getHours() >= this.config.last_hour) || (j = p - $, S = this._min_date.valueOf() + 24 * f.x * 60 * 6e4, (p = t.date.date_part(new Date(S))).setHours(this.config.last_hour), z = new Date(p - 1), this._drag_mode == "move" && ($ = new Date(+p - j))), this._table_view || z.getDate() == $.getDate() && z.getHours() < this.config.last_hour || t._allow_dnd) + if (D.start_date = $, D.end_date = new Date(p), this.config.update_render) { var F = t._els.dhx_cal_data[0].scrollTop; this.update_view(), t._els.dhx_cal_data[0].scrollTop = F; } else @@ -2481,9 +2481,9 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); var D = this._cols[E] || 0; isNaN(Number(D)) || (D += "px"), k[E] = D; } - function x(H) { + function x($) { var j = t._colsS.height; - return t._colsS.heights[H + 1] !== void 0 && (j = t._colsS.heights[H + 1] - (t._colsS.heights[H] || 0)), j; + return t._colsS.heights[$ + 1] !== void 0 && (j = t._colsS.heights[$ + 1] - (t._colsS.heights[$] || 0)), j; } var S = 0; const N = document.createElement("div"); @@ -2500,8 +2500,8 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); C.appendChild(document.createElement("div")), C.appendChild(document.createElement("div")); else { C.style.width = k[A], this._waiAria.monthCellAttr(C, g); - var $ = document.createElement("div"); - $.style.height = t.xy.month_head_height + "px", $.className = L, $.innerHTML = this.templates.month_day(g), C.appendChild($); + var H = document.createElement("div"); + H.style.height = t.xy.month_head_height + "px", H.className = L, H.innerHTML = this.templates.month_day(g), C.appendChild(H); var P = document.createElement("div"); P.className = O, C.appendChild(P); } @@ -2510,8 +2510,8 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); } t._colsS.heights[E] = S, S += x(E); } - return this._min_date = w, this._max_date = g, l.innerHTML = "", l.appendChild(N), this._scales = {}, l.querySelectorAll("[data-cell-date]").forEach((H) => { - const j = t.templates.parse_date(H.getAttribute("data-cell-date")), F = H.querySelector(".dhx_month_body"); + return this._min_date = w, this._max_date = g, l.innerHTML = "", l.appendChild(N), this._scales = {}, l.querySelectorAll("[data-cell-date]").forEach(($) => { + const j = t.templates.parse_date($.getAttribute("data-cell-date")), F = $.querySelector(".dhx_month_body"); this._scales[+j] = F, this.callEvent("onScaleAdd", [this._scales[+j], j]); }), this._max_date; }, t._reset_month_scale = function(l, f, g, p) { @@ -2574,7 +2574,7 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); y -= f - E; else { let D = 0; - const x = new Date(Math.max(E.valueOf(), l.valueOf())), S = f, N = new Date(x.getFullYear(), x.getMonth(), x.getDate(), g.first_hour), M = new Date(x.getFullYear(), x.getMonth(), x.getDate(), g.last_hour), A = new Date(f.getFullYear(), f.getMonth(), f.getDate(), g.first_hour), C = new Date(f.getFullYear(), f.getMonth(), f.getDate(), g.last_hour); + const x = new Date(Math.max(E.valueOf(), l.valueOf())), S = f, N = new Date(x.getFullYear(), x.getMonth(), x.getDate(), g.first_hour), M = new Date(x.getFullYear(), x.getMonth(), x.getDate(), g.last_hour || 24), A = new Date(f.getFullYear(), f.getMonth(), f.getDate(), g.first_hour), C = new Date(f.getFullYear(), f.getMonth(), f.getDate(), g.last_hour || 24); S.valueOf() > C.valueOf() && (D += S - C), S.valueOf() > A.valueOf() ? D += g._start_correction : D += 60 * S.getHours() * 60 * 1e3 + 60 * S.getMinutes() * 1e3, x.valueOf() < M.valueOf() && (D += g._end_correction), x.valueOf() < N.valueOf() && (D += N.valueOf() - x.valueOf()), y -= D, k = !1; } f = E, p--; @@ -2607,10 +2607,10 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); }; }(h), function(t) { (function() { - var r = new RegExp(`<(?:.| + var n = new RegExp(`<(?:.| )*?>`, "gm"), s = new RegExp(" +", "gm"); function c(l) { - return (l + "").replace(r, " ").replace(s, " "); + return (l + "").replace(n, " ").replace(s, " "); } var u = new RegExp("'", "gm"); function v(l) { @@ -2769,23 +2769,23 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); }; }(t._waiAria[m]); })(); - }(h), h.utils = I, h.$domHelpers = q, h.utils.dom = q, h.uid = I.uid, h.mixin = I.mixin, h.defined = I.defined, h.assert = function(t) { - return function(r, s) { - r || t.config.show_errors && t.callEvent("onError", [s]) !== !1 && (t.message ? t.message({ type: "error", text: s, expire: -1 }) : console.log(s)); + }(h), h.utils = V, h.$domHelpers = q, h.utils.dom = q, h.uid = V.uid, h.mixin = V.mixin, h.defined = V.defined, h.assert = function(t) { + return function(n, s) { + n || t.config.show_errors && t.callEvent("onError", [s]) !== !1 && (t.message ? t.message({ type: "error", text: s, expire: -1 }) : console.log(s)); }; - }(h), h.copy = I.copy, h._createDatePicker = function(t, r) { - return new at(h, t, r); + }(h), h.copy = V.copy, h._createDatePicker = function(t, n) { + return new at(h, t, n); }, h._getFocusableNodes = q.getFocusableNodes, h._getClassName = q.getClassName, h._locate_css = q.locateCss; const a = De(h); - var i, d, n; + var r, d, i; h.utils.mixin(h, a), h.env = h.$env = ye, h.Promise = window.Promise, function(t) { t.destructor = function() { - for (var r in t.callEvent("onDestroy", []), this.clearAll(), this.$container && (this.$container.innerHTML = ""), this._eventRemoveAll && this._eventRemoveAll(), this.resetLightbox && this.resetLightbox(), this._dp && this._dp.destructor && this._dp.destructor(), this.detachAllEvents(), this) - r.indexOf("$") === 0 && delete this[r]; + for (var n in t.callEvent("onDestroy", []), this.clearAll(), this.$container && (this.$container.innerHTML = ""), this._eventRemoveAll && this._eventRemoveAll(), this.resetLightbox && this.resetLightbox(), this._dp && this._dp.destructor && this._dp.destructor(), this.detachAllEvents(), this) + n.indexOf("$") === 0 && delete this[n]; t.$destroyed = !0; }; }(h), function(t) { - function r(s, c) { + function n(s, c) { var u = { method: s }; if (c.length === 0) throw new Error("Arguments list of query is wrong."); @@ -2821,24 +2821,24 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); }, query: function(s) { return this._call(s.method || "GET", s.url, s.data || "", s.async || !0, s.callback, s.headers); }, get: function(s, c, u) { - var v = r("GET", arguments); + var v = n("GET", arguments); return this.query(v); }, getSync: function(s, c) { - var u = r("GET", arguments); + var u = n("GET", arguments); return u.async = !1, this.query(u); }, put: function(s, c, u, v) { - var m = r("PUT", arguments); + var m = n("PUT", arguments); return this.query(m); }, del: function(s, c, u) { - var v = r("DELETE", arguments); + var v = n("DELETE", arguments); return this.query(v); }, post: function(s, c, u, v) { arguments.length == 1 ? c = "" : arguments.length == 2 && typeof c == "function" && (u = c, c = ""); - var m = r("POST", arguments); + var m = n("POST", arguments); return this.query(m); }, postSync: function(s, c, u) { c = c === null ? "" : String(c); - var v = r("POST", arguments); + var v = n("POST", arguments); return v.async = !1, this.query(v); }, _call: function(s, c, u, v, m, l) { return new t.Promise((function(f, g) { @@ -2863,22 +2863,22 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); return s.indexOf("?") != -1 ? "&" : "?"; } }, t.$ajax = t.ajax; }(h), be(h), function(t) { - t.config = { default_date: "%j %M %Y", month_date: "%F %Y", load_date: "%Y-%m-%d", week_date: "%l", day_date: "%D %j", hour_date: "%H:%i", month_day: "%d", date_format: "%Y-%m-%d %H:%i", api_date: "%d-%m-%Y %H:%i", parse_exact_format: !1, preserve_length: !0, time_step: 5, displayed_event_color: "#ff4a4a", displayed_event_text_color: "#ffef80", wide_form: 0, day_column_padding: 8, use_select_menu_space: !0, fix_tab_position: !0, start_on_monday: !0, first_hour: 0, last_hour: 24, readonly: !1, drag_resize: !0, drag_move: !0, drag_create: !0, drag_event_body: !0, dblclick_create: !0, details_on_dblclick: !0, edit_on_create: !0, details_on_create: !0, header: null, hour_size_px: 44, resize_month_events: !1, resize_month_timed: !1, responsive_lightbox: !1, separate_short_events: !0, rtl: !1, cascade_event_display: !1, cascade_event_count: 4, cascade_event_margin: 30, multi_day: !0, multi_day_height_limit: 200, drag_lightbox: !0, preserve_scroll: !0, select: !0, server_utc: !1, touch: !0, touch_tip: !0, touch_drag: 500, touch_swipe_dates: !1, quick_info_detached: !0, positive_closing: !1, drag_highlight: !0, limit_drag_out: !1, icons_edit: ["icon_save", "icon_cancel"], icons_select: ["icon_details", "icon_edit", "icon_delete"], buttons_left: ["dhx_save_btn", "dhx_cancel_btn"], buttons_right: ["dhx_delete_btn"], lightbox: { sections: [{ name: "description", map_to: "text", type: "textarea", focus: !0 }, { name: "time", height: 72, type: "time", map_to: "auto" }] }, highlight_displayed_event: !0, left_border: !1, ajax_error: "alert", delay_render: 0, timeline_swap_resize: !0, wai_aria_attributes: !0, wai_aria_application_role: !0, csp: "auto", event_attribute: "data-event-id", show_errors: !0 }, t.config.buttons_left.$initial = t.config.buttons_left.join(), t.config.buttons_right.$initial = t.config.buttons_right.join(), t._helpers = { parseDate: function(r) { - return (t.templates.xml_date || t.templates.parse_date)(r); - }, formatDate: function(r) { - return (t.templates.xml_format || t.templates.format_date)(r); + t.config = { default_date: "%j %M %Y", month_date: "%F %Y", load_date: "%Y-%m-%d", week_date: "%l", day_date: "%D %j", hour_date: "%H:%i", month_day: "%d", date_format: "%Y-%m-%d %H:%i", api_date: "%d-%m-%Y %H:%i", parse_exact_format: !1, preserve_length: !0, time_step: 5, displayed_event_color: "#ff4a4a", displayed_event_text_color: "#ffef80", wide_form: 0, day_column_padding: 8, use_select_menu_space: !0, fix_tab_position: !0, start_on_monday: !0, first_hour: 0, last_hour: 24, readonly: !1, drag_resize: !0, drag_move: !0, drag_create: !0, drag_event_body: !0, dblclick_create: !0, details_on_dblclick: !0, edit_on_create: !0, details_on_create: !0, header: null, hour_size_px: 44, resize_month_events: !1, resize_month_timed: !1, responsive_lightbox: !1, separate_short_events: !0, rtl: !1, cascade_event_display: !1, cascade_event_count: 4, cascade_event_margin: 30, multi_day: !0, multi_day_height_limit: 200, drag_lightbox: !0, preserve_scroll: !0, select: !0, server_utc: !1, touch: !0, touch_tip: !0, touch_drag: 500, touch_swipe_dates: !1, quick_info_detached: !0, positive_closing: !1, drag_highlight: !0, limit_drag_out: !1, icons_edit: ["icon_save", "icon_cancel"], icons_select: ["icon_details", "icon_edit", "icon_delete"], buttons_left: ["dhx_save_btn", "dhx_cancel_btn"], buttons_right: ["dhx_delete_btn"], lightbox: { sections: [{ name: "description", map_to: "text", type: "textarea", focus: !0 }, { name: "time", height: 72, type: "time", map_to: "auto" }] }, highlight_displayed_event: !0, left_border: !1, ajax_error: "alert", delay_render: 0, timeline_swap_resize: !0, wai_aria_attributes: !0, wai_aria_application_role: !0, csp: "auto", event_attribute: "data-event-id", show_errors: !0 }, t.config.buttons_left.$initial = t.config.buttons_left.join(), t.config.buttons_right.$initial = t.config.buttons_right.join(), t._helpers = { parseDate: function(n) { + return (t.templates.xml_date || t.templates.parse_date)(n); + }, formatDate: function(n) { + return (t.templates.xml_format || t.templates.format_date)(n); } }, t.templates = {}, t.init_templates = function() { - var r = t.date.date_to_str, s = t.config; + var n = t.date.date_to_str, s = t.config; (function(c, u) { for (var v in u) c[v] || (c[v] = u[v]); - })(t.templates, { day_date: r(s.default_date), month_date: r(s.month_date), week_date: function(c, u) { + })(t.templates, { day_date: n(s.default_date), month_date: n(s.month_date), week_date: function(c, u) { return s.rtl ? t.templates.day_date(t.date.add(u, -1, "day")) + " – " + t.templates.day_date(c) : t.templates.day_date(c) + " – " + t.templates.day_date(t.date.add(u, -1, "day")); - }, day_scale_date: r(s.default_date), time_slot_text: function(c) { + }, day_scale_date: n(s.default_date), time_slot_text: function(c) { return ""; }, time_slot_class: function(c) { return ""; - }, month_scale_date: r(s.week_date), week_scale_date: r(s.day_date), hour_scale: r(s.hour_date), time_picker: r(s.hour_date), event_date: r(s.hour_date), month_day: r(s.month_day), load_format: r(s.load_date), format_date: r(s.date_format, s.server_utc), parse_date: t.date.str_to_date(s.date_format, s.server_utc), api_date: t.date.str_to_date(s.api_date, !1, !1), event_header: function(c, u, v) { + }, month_scale_date: n(s.week_date), week_scale_date: n(s.day_date), hour_scale: n(s.hour_date), time_picker: n(s.hour_date), event_date: n(s.hour_date), month_day: n(s.month_day), load_format: n(s.load_date), format_date: n(s.date_format, s.server_utc), parse_date: t.date.str_to_date(s.date_format, s.server_utc), api_date: t.date.str_to_date(s.api_date, !1, !1), event_header: function(c, u, v) { return v._mode === "small" || v._mode === "smallest" ? t.templates.event_date(c) : t.templates.event_date(c) + " - " + t.templates.event_date(u); }, event_text: function(c, u, v) { return v.text; @@ -2900,39 +2900,39 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); return ""; }, tooltip_date_format: t.date.date_to_str("%Y-%m-%d %H:%i"), tooltip_text: function(c, u, v) { return "Event: " + v.text + "
Start date: " + t.templates.tooltip_date_format(c) + "
End date: " + t.templates.tooltip_date_format(u); - }, calendar_month: r("%F %Y"), calendar_scale_date: r("%D"), calendar_date: r("%d"), calendar_time: r("%d-%m-%Y") }), this.callEvent("onTemplatesReady", []); + }, calendar_month: n("%F %Y"), calendar_scale_date: n("%D"), calendar_date: n("%d"), calendar_time: n("%d-%m-%Y") }), this.callEvent("onTemplatesReady", []); }; }(h), function(t) { t._events = {}, t.clearAll = function() { this._events = {}, this._loaded = {}, this._edit_id = null, this._select_id = null, this._drag_id = null, this._drag_mode = null, this._drag_pos = null, this._new_event = null, this.clear_view(), this.callEvent("onClearAll", []); - }, t.addEvent = function(r, s, c, u, v) { + }, t.addEvent = function(n, s, c, u, v) { if (!arguments.length) return this.addEventNow(); - var m = r; - arguments.length != 1 && ((m = v || {}).start_date = r, m.end_date = s, m.text = c, m.id = u), m.id = m.id || t.uid(), m.text = m.text || "", typeof m.start_date == "string" && (m.start_date = this.templates.api_date(m.start_date)), typeof m.end_date == "string" && (m.end_date = this.templates.api_date(m.end_date)); + var m = n; + arguments.length != 1 && ((m = v || {}).start_date = n, m.end_date = s, m.text = c, m.id = u), m.id = m.id || t.uid(), m.text = m.text || "", typeof m.start_date == "string" && (m.start_date = this.templates.api_date(m.start_date)), typeof m.end_date == "string" && (m.end_date = this.templates.api_date(m.end_date)); var l = 6e4 * (this.config.event_duration || this.config.time_step); m.start_date.valueOf() == m.end_date.valueOf() && m.end_date.setTime(m.end_date.valueOf() + l), m.start_date.setMilliseconds(0), m.end_date.setMilliseconds(0), m._timed = this.isOneDayEvent(m); var f = !this._events[m.id]; return this._events[m.id] = m, this.event_updated(m), this._loading || this.callEvent(f ? "onEventAdded" : "onEventChanged", [m.id, m]), m.id; - }, t.deleteEvent = function(r, s) { - var c = this._events[r]; - (s || this.callEvent("onBeforeEventDelete", [r, c]) && this.callEvent("onConfirmedBeforeEventDelete", [r, c])) && (c && (t.getState().select_id == r && t.unselect(), delete this._events[r], this.event_updated(c), this._drag_id == c.id && (this._drag_id = null, this._drag_mode = null, this._drag_pos = null)), this.callEvent("onEventDeleted", [r, c])); - }, t.getEvent = function(r) { - return this._events[r]; - }, t.setEvent = function(r, s) { - s.id || (s.id = r), this._events[r] = s; - }, t.for_rendered = function(r, s) { + }, t.deleteEvent = function(n, s) { + var c = this._events[n]; + (s || this.callEvent("onBeforeEventDelete", [n, c]) && this.callEvent("onConfirmedBeforeEventDelete", [n, c])) && (c && (t.getState().select_id == n && t.unselect(), delete this._events[n], this.event_updated(c), this._drag_id == c.id && (this._drag_id = null, this._drag_mode = null, this._drag_pos = null)), this.callEvent("onEventDeleted", [n, c])); + }, t.getEvent = function(n) { + return this._events[n]; + }, t.setEvent = function(n, s) { + s.id || (s.id = n), this._events[n] = s; + }, t.for_rendered = function(n, s) { for (var c = this._rendered.length - 1; c >= 0; c--) - this._rendered[c].getAttribute(this.config.event_attribute) == r && s(this._rendered[c], c); - }, t.changeEventId = function(r, s) { - if (r != s) { - var c = this._events[r]; - c && (c.id = s, this._events[s] = c, delete this._events[r]), this.for_rendered(r, function(u) { + this._rendered[c].getAttribute(this.config.event_attribute) == n && s(this._rendered[c], c); + }, t.changeEventId = function(n, s) { + if (n != s) { + var c = this._events[n]; + c && (c.id = s, this._events[s] = c, delete this._events[n]), this.for_rendered(n, function(u) { u.setAttribute("event_id", s), u.setAttribute(t.config.event_attribute, s); - }), this._select_id == r && (this._select_id = s), this._edit_id == r && (this._edit_id = s), this.callEvent("onEventIdChange", [r, s]); + }), this._select_id == n && (this._select_id = s), this._edit_id == n && (this._edit_id = s), this.callEvent("onEventIdChange", [n, s]); } }, function() { - for (var r = ["text", "Text", "start_date", "StartDate", "end_date", "EndDate"], s = function(v) { + for (var n = ["text", "Text", "start_date", "StartDate", "end_date", "EndDate"], s = function(v) { return function(m) { return t.getEvent(m)[v]; }; @@ -2941,44 +2941,44 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); var f = t.getEvent(m); f[v] = l, f._changed = !0, f._timed = this.isOneDayEvent(f), t.event_updated(f, !0); }; - }, u = 0; u < r.length; u += 2) - t["getEvent" + r[u + 1]] = s(r[u]), t["setEvent" + r[u + 1]] = c(r[u]); - }(), t.event_updated = function(r, s) { - this.is_visible_events(r) ? this.render_view_data() : this.clear_event(r.id); - }, t.is_visible_events = function(r) { + }, u = 0; u < n.length; u += 2) + t["getEvent" + n[u + 1]] = s(n[u]), t["setEvent" + n[u + 1]] = c(n[u]); + }(), t.event_updated = function(n, s) { + this.is_visible_events(n) ? this.render_view_data() : this.clear_event(n.id); + }, t.is_visible_events = function(n) { if (!this._min_date || !this._max_date) return !1; - if (r.start_date.valueOf() < this._max_date.valueOf() && this._min_date.valueOf() < r.end_date.valueOf()) { - var s = r.start_date.getHours(), c = r.end_date.getHours() + r.end_date.getMinutes() / 60, u = this.config.last_hour, v = this.config.first_hour; - return !(!this._table_view && (c > u || c <= v) && (s >= u || s < v) && !((r.end_date.valueOf() - r.start_date.valueOf()) / 36e5 > 24 - (this.config.last_hour - this.config.first_hour) || s < u && c > v)); + if (n.start_date.valueOf() < this._max_date.valueOf() && this._min_date.valueOf() < n.end_date.valueOf()) { + var s = n.start_date.getHours(), c = n.end_date.getHours() + n.end_date.getMinutes() / 60, u = this.config.last_hour, v = this.config.first_hour; + return !(!this._table_view && (c > u || c <= v) && (s >= u || s < v) && !((n.end_date.valueOf() - n.start_date.valueOf()) / 36e5 > 24 - (this.config.last_hour - this.config.first_hour) || s < u && c > v)); } return !1; - }, t.isOneDayEvent = function(r) { - var s = new Date(r.end_date.valueOf() - 1); - return r.start_date.getFullYear() === s.getFullYear() && r.start_date.getMonth() === s.getMonth() && r.start_date.getDate() === s.getDate() && r.end_date.valueOf() - r.start_date.valueOf() < 864e5; - }, t.get_visible_events = function(r) { + }, t.isOneDayEvent = function(n) { + var s = new Date(n.end_date.valueOf() - 1); + return n.start_date.getFullYear() === s.getFullYear() && n.start_date.getMonth() === s.getMonth() && n.start_date.getDate() === s.getDate() && n.end_date.valueOf() - n.start_date.valueOf() < 864e5; + }, t.get_visible_events = function(n) { var s = []; for (var c in this._events) - this.is_visible_events(this._events[c]) && (r && !this._events[c]._timed || this.filter_event(c, this._events[c]) && s.push(this._events[c])); + this.is_visible_events(this._events[c]) && (n && !this._events[c]._timed || this.filter_event(c, this._events[c]) && s.push(this._events[c])); return s; - }, t.filter_event = function(r, s) { + }, t.filter_event = function(n, s) { var c = this["filter_" + this._mode]; - return !c || c(r, s); - }, t._is_main_area_event = function(r) { - return !!r._timed; - }, t.render_view_data = function(r, s) { + return !c || c(n, s); + }, t._is_main_area_event = function(n) { + return !!n._timed; + }, t.render_view_data = function(n, s) { var c = !1; - if (!r) { + if (!n) { if (c = !0, this._not_render) return void (this._render_wait = !0); - this._render_wait = !1, this.clear_view(), r = this.get_visible_events(!(this._table_view || this.config.multi_day)); + this._render_wait = !1, this.clear_view(), n = this.get_visible_events(!(this._table_view || this.config.multi_day)); } - for (var u = 0, v = r.length; u < v; u++) - this._recalculate_timed(r[u]); + for (var u = 0, v = n.length; u < v; u++) + this._recalculate_timed(n[u]); if (this.config.multi_day && !this._table_view) { var m = [], l = []; - for (u = 0; u < r.length; u++) - this._is_main_area_event(r[u]) ? m.push(r[u]) : l.push(r[u]); + for (u = 0; u < n.length; u++) + this._is_main_area_event(n[u]) ? m.push(n[u]) : l.push(n[u]); if (!this._els.dhx_multi_day) { var f = t._commonErrorMessages.unknownView(this._mode); throw new Error(f); @@ -2986,14 +2986,14 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); this._rendered_location = this._els.dhx_multi_day[0], this._table_view = !0, this.render_data(l, s), this._table_view = !1, this._rendered_location = this._els.dhx_cal_data[0], this._table_view = !1, this.render_data(m, s); } else { var g = document.createDocumentFragment(), p = this._els.dhx_cal_data[0]; - this._rendered_location = g, this.render_data(r, s), p.appendChild(g), this._rendered_location = p; + this._rendered_location = g, this.render_data(n, s), p.appendChild(g), this._rendered_location = p; } c && this.callEvent("onDataRender", []); - }, t._view_month_day = function(r) { - var s = t.getActionData(r).date; + }, t._view_month_day = function(n) { + var s = t.getActionData(n).date; t.callEvent("onViewMoreClick", [s]) && t.setCurrentView(s, "day"); - }, t._render_month_link = function(r) { - for (var s = this._rendered_location, c = this._lame_clone(r), u = r._sday; u < r._eday; u++) { + }, t._render_month_link = function(n) { + for (var s = this._rendered_location, c = this._lame_clone(n), u = n._sday; u < n._eday; u++) { c._sday = u, c._eday = u + 1; var v = t.date, m = t._min_date; m = v.add(m, c._sweek, "week"), m = v.add(m, c._sday, "day"); @@ -3002,21 +3002,21 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); t._view_month_day(y); }), p.className = "dhx_month_link", p.style.top = f.y + "px", p.style.left = f.x + "px", p.style.width = g + "px", p.innerHTML = t.templates.month_events_link(m, l), this._rendered.push(p), s.appendChild(p); } - }, t._recalculate_timed = function(r) { + }, t._recalculate_timed = function(n) { var s; - r && (s = typeof r != "object" ? this._events[r] : r) && (s._timed = t.isOneDayEvent(s)); - }, t.attachEvent("onEventChanged", t._recalculate_timed), t.attachEvent("onEventAdded", t._recalculate_timed), t.render_data = function(r, s) { - r = this._pre_render_events(r, s); - for (var c = {}, u = 0; u < r.length; u++) + n && (s = typeof n != "object" ? this._events[n] : n) && (s._timed = t.isOneDayEvent(s)); + }, t.attachEvent("onEventChanged", t._recalculate_timed), t.attachEvent("onEventAdded", t._recalculate_timed), t.render_data = function(n, s) { + n = this._pre_render_events(n, s); + for (var c = {}, u = 0; u < n.length; u++) if (this._table_view) if (t._mode != "month") - this.render_event_bar(r[u]); + this.render_event_bar(n[u]); else { var v = t.config.max_month_events; - v !== 1 * v || r[u]._sorder < v ? this.render_event_bar(r[u]) : v !== void 0 && r[u]._sorder == v && t._render_month_link(r[u]); + v !== 1 * v || n[u]._sorder < v ? this.render_event_bar(n[u]) : v !== void 0 && n[u]._sorder == v && t._render_month_link(n[u]); } else { - var m = r[u], l = t.locate_holder(m._sday); + var m = n[u], l = t.locate_holder(m._sday); if (!l) continue; c[m._sday] || (c[m._sday] = { real: l, buffer: document.createDocumentFragment(), width: l.clientWidth }); @@ -3025,14 +3025,14 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); } for (var u in c) (f = c[u]).real && f.buffer && f.real.appendChild(f.buffer); - }, t._get_first_visible_cell = function(r) { - for (var s = 0; s < r.length; s++) - if ((r[s].className || "").indexOf("dhx_scale_ignore") == -1) - return r[s]; - return r[0]; - }, t._pre_render_events = function(r, s) { + }, t._get_first_visible_cell = function(n) { + for (var s = 0; s < n.length; s++) + if ((n[s].className || "").indexOf("dhx_scale_ignore") == -1) + return n[s]; + return n[0]; + }, t._pre_render_events = function(n, s) { var c = this.xy.bar_height, u = this._colsS.heights, v = this._colsS.heights = [0, 0, 0, 0, 0, 0, 0], m = this._els.dhx_cal_data[0]; - if (r = this._table_view ? this._pre_render_events_table(r, s) : this._pre_render_events_line(r, s), this._table_view) + if (n = this._table_view ? this._pre_render_events_table(n, s) : this._pre_render_events_line(n, s), this._table_view) if (s) this._colsS.heights = u; else { @@ -3053,7 +3053,7 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); var w = t._colsS, b = w[w.col_length], k = w.heights.slice(); b -= t.xy.scroll_width || 0, this._calc_scale_sizes(b, this._min_date, this._max_date), t._colsS.heights = k, this.set_xy(this._els.dhx_cal_header[0], b), t._render_scales(this._els.dhx_cal_header[0]), t._render_month_scale(this._els.dhx_cal_data[0], this._get_timeunit_start(), this._min_date), w.scroll_fix = !0; } - } else if (r.length || this._els.dhx_multi_day[0].style.visibility != "visible" || (v[0] = -1), r.length || v[0] == -1) { + } else if (n.length || this._els.dhx_multi_day[0].style.visibility != "visible" || (v[0] = -1), n.length || v[0] == -1) { var E = (v[0] + 1) * c + 4, D = E, x = E + "px"; this.config.multi_day_height_limit && (x = (D = Math.min(E, this.config.multi_day_height_limit)) + "px"); var S = this._els.dhx_multi_day[0]; @@ -3062,27 +3062,27 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); N.style.height = x, N.style.visibility = v[0] == -1 ? "hidden" : "visible", N.style.display = v[0] == -1 ? "none" : "", N.className = v[0] ? "dhx_multi_day_icon" : "dhx_multi_day_icon_small", this._dy_shift = (v[0] + 1) * c, this.config.multi_day_height_limit && (this._dy_shift = Math.min(this.config.multi_day_height_limit, this._dy_shift)), v[0] = 0, D != E && (S.style.overflowY = "auto", N.style.position = "fixed", N.style.top = "", N.style.left = ""); } } - return r; - }, t._get_event_sday = function(r) { - var s = this.date.day_start(new Date(r.start_date)); + return n; + }, t._get_event_sday = function(n) { + var s = this.date.day_start(new Date(n.start_date)); return Math.round((s.valueOf() - this._min_date.valueOf()) / 864e5); - }, t._get_event_mapped_end_date = function(r) { - var s = r.end_date; + }, t._get_event_mapped_end_date = function(n) { + var s = n.end_date; if (this.config.separate_short_events) { - var c = (r.end_date - r.start_date) / 6e4; + var c = (n.end_date - n.start_date) / 6e4; c < this._min_mapped_duration && (s = this.date.add(s, this._min_mapped_duration - c, "minute")); } return s; - }, t._pre_render_events_line = function(r, s) { - r.sort(function(N, M) { + }, t._pre_render_events_line = function(n, s) { + n.sort(function(N, M) { return N.start_date.valueOf() == M.start_date.valueOf() ? N.id > M.id ? 1 : -1 : N.start_date > M.start_date ? 1 : -1; }); var c = [], u = []; this._min_mapped_duration = Math.floor(60 * this.xy.min_event_height / this.config.hour_size_px); - for (var v = 0; v < r.length; v++) { - var m = r[v], l = m.start_date, f = m.end_date, g = l.getHours(), p = f.getHours(); + for (var v = 0; v < n.length; v++) { + var m = n[v], l = m.start_date, f = m.end_date, g = l.getHours(), p = f.getHours(); if (m._sday = this._get_event_sday(m), this._ignores[m._sday]) - r.splice(v, 1), v--; + n.splice(v, 1), v--; else { if (c[m._sday] || (c[m._sday] = []), !s) { m._inner = !1; @@ -3125,22 +3125,22 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); m._sorder = 0; y.splice(b, b == y.length ? 0 : 1, m), y.length > (y.max_count || 0) ? (y.max_count = y.length, m._count = y.length) : m._count = m._count ? m._count : 1; } - (g < this.config.first_hour || p >= this.config.last_hour) && (u.push(m), r[v] = m = this._copy_event(m), g < this.config.first_hour && (m.start_date.setHours(this.config.first_hour), m.start_date.setMinutes(0)), p >= this.config.last_hour && (m.end_date.setMinutes(0), m.end_date.setHours(this.config.last_hour)), m.start_date > m.end_date || g == this.config.last_hour) && (r.splice(v, 1), v--); + (g < this.config.first_hour || p >= this.config.last_hour) && (u.push(m), n[v] = m = this._copy_event(m), g < this.config.first_hour && (m.start_date.setHours(this.config.first_hour), m.start_date.setMinutes(0)), p >= this.config.last_hour && (m.end_date.setMinutes(0), m.end_date.setHours(this.config.last_hour)), m.start_date > m.end_date || g == this.config.last_hour) && (n.splice(v, 1), v--); } } if (!s) { - for (v = 0; v < r.length; v++) - r[v]._count = c[r[v]._sday].max_count; + for (v = 0; v < n.length; v++) + n[v]._count = c[n[v]._sday].max_count; for (v = 0; v < u.length; v++) u[v]._count = c[u[v]._sday].max_count; } - return r; - }, t._time_order = function(r) { - r.sort(function(s, c) { + return n; + }, t._time_order = function(n) { + n.sort(function(s, c) { return s.start_date.valueOf() == c.start_date.valueOf() ? s._timed && !c._timed ? 1 : !s._timed && c._timed ? -1 : s.id > c.id ? 1 : -1 : s.start_date > c.start_date ? 1 : -1; }); - }, t._is_any_multiday_cell_visible = function(r, s, c) { - var u = this._cols.length, v = !1, m = r, l = !0, f = new Date(s); + }, t._is_any_multiday_cell_visible = function(n, s, c) { + var u = this._cols.length, v = !1, m = n, l = !0, f = new Date(s); for (t.date.day_start(new Date(s)).valueOf() != s.valueOf() && (f = t.date.day_start(f), f = t.date.add(f, 1, "day")); m < f; ) { l = !1; var g = this.locate_holder_day(m, !1, c) % u; @@ -3151,10 +3151,10 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); m = t.date.add(m, 1, "day"); } return l || v; - }, t._pre_render_events_table = function(r, s) { - this._time_order(r); - for (var c, u = [], v = [[], [], [], [], [], [], []], m = this._colsS.heights, l = this._cols.length, f = {}, g = 0; g < r.length; g++) { - var p = r[g], y = p.id; + }, t._pre_render_events_table = function(n, s) { + this._time_order(n); + for (var c, u = [], v = [[], [], [], [], [], [], []], m = this._colsS.heights, l = this._cols.length, f = {}, g = 0; g < n.length; g++) { + var p = n[g], y = p.id; f[y] || (f[y] = { first_chunk: !0, last_chunk: !0 }); var w = f[y], b = c || p.start_date, k = p.end_date; b < this._min_date && (w.first_chunk = !1, b = this._min_date), k > this._max_date && (w.last_chunk = !1, k = this._max_date); @@ -3171,159 +3171,160 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); var N = this._copy_event(p); N.id = p.id, N._length = l - p._sday, N._eday = l, N._sday = p._sday, N._sweek = p._sweek, N._sorder = p._sorder, N.end_date = this.date.add(b, N._length, "day"), N._first_chunk = w.first_chunk, w.first_chunk && (w.first_chunk = !1), u.push(N), S[x] = N, c = N.end_date, m[p._sweek] = S.length - 1, g--; } - } + } else + c = null; } } return u; }, t._copy_dummy = function() { - var r = new Date(this.start_date), s = new Date(this.end_date); - this.start_date = r, this.end_date = s; - }, t._copy_event = function(r) { - return this._copy_dummy.prototype = r, new this._copy_dummy(); + var n = new Date(this.start_date), s = new Date(this.end_date); + this.start_date = n, this.end_date = s; + }, t._copy_event = function(n) { + return this._copy_dummy.prototype = n, new this._copy_dummy(); }, t._rendered = [], t.clear_view = function() { - for (var r = 0; r < this._rendered.length; r++) { - var s = this._rendered[r]; + for (var n = 0; n < this._rendered.length; n++) { + var s = this._rendered[n]; s.parentNode && s.parentNode.removeChild(s); } this._rendered = []; - }, t.updateEvent = function(r) { - var s = this.getEvent(r); - this.clear_event(r), s && this.is_visible_events(s) && this.filter_event(r, s) && (this._table_view || this.config.multi_day || s._timed) && (this.config.update_render ? this.render_view_data() : this.getState().mode != "month" || this.getState().drag_id || this.isOneDayEvent(s) ? this.render_view_data([s], !0) : this.render_view_data()); - }, t.clear_event = function(r) { - this.for_rendered(r, function(s, c) { + }, t.updateEvent = function(n) { + var s = this.getEvent(n); + this.clear_event(n), s && this.is_visible_events(s) && this.filter_event(n, s) && (this._table_view || this.config.multi_day || s._timed) && (this.config.update_render ? this.render_view_data() : this.getState().mode != "month" || this.getState().drag_id || this.isOneDayEvent(s) ? this.render_view_data([s], !0) : this.render_view_data()); + }, t.clear_event = function(n) { + this.for_rendered(n, function(s, c) { s.parentNode && s.parentNode.removeChild(s), t._rendered.splice(c, 1); }); - }, t._y_from_date = function(r) { - var s = 60 * r.getHours() + r.getMinutes(); + }, t._y_from_date = function(n) { + var s = 60 * n.getHours() + n.getMinutes(); return Math.round((60 * s * 1e3 - 60 * this.config.first_hour * 60 * 1e3) * this.config.hour_size_px / 36e5) % (24 * this.config.hour_size_px); - }, t._calc_event_y = function(r, s) { + }, t._calc_event_y = function(n, s) { s = s || 0; - var c = 60 * r.start_date.getHours() + r.start_date.getMinutes(), u = 60 * r.end_date.getHours() + r.end_date.getMinutes() || 60 * t.config.last_hour; - return { top: this._y_from_date(r.start_date), height: Math.max(s, (u - c) * this.config.hour_size_px / 60) }; - }, t.render_event = function(r, s, c) { + var c = 60 * n.start_date.getHours() + n.start_date.getMinutes(), u = 60 * n.end_date.getHours() + n.end_date.getMinutes() || 60 * t.config.last_hour; + return { top: this._y_from_date(n.start_date), height: Math.max(s, (u - c) * this.config.hour_size_px / 60) }; + }, t.render_event = function(n, s, c) { var u = t.xy.menu_width, v = this.config.use_select_menu_space ? 0 : u; - if (!(r._sday < 0)) { - var m = t.locate_holder(r._sday); + if (!(n._sday < 0)) { + var m = t.locate_holder(n._sday); if (m) { s = s || m; - var l = this._calc_event_y(r, t.xy.min_event_height), f = l.top, g = l.height, p = r._count || 1, y = r._sorder || 0; + var l = this._calc_event_y(n, t.xy.min_event_height), f = l.top, g = l.height, p = n._count || 1, y = n._sorder || 0; c = c || m.clientWidth, this.config.day_column_padding && (c -= this.config.day_column_padding); var w = Math.floor((c - v) / p), b = y * w + (y > 0 ? 2 : 1); - if (r._inner || (w *= p - y), this.config.cascade_event_display) { + if (n._inner || (w *= p - y), this.config.cascade_event_display) { var k = this.config.cascade_event_count, E = this.config.cascade_event_margin; b = y % k * E; - var D = r._inner ? (p - y - 1) % k * E / 2 : 0; + var D = n._inner ? (p - y - 1) % k * E / 2 : 0; w = Math.floor(c - v - b - D); } - r._mode = g < 30 ? "smallest" : g < 42 ? "small" : null; - var x = this._render_v_bar(r, v + b, f, w, g, r._text_style, t.templates.event_header(r.start_date, r.end_date, r), t.templates.event_text(r.start_date, r.end_date, r)); - if (r._mode === "smallest" ? x.classList.add("dhx_cal_event--xsmall") : r._mode === "small" && x.classList.add("dhx_cal_event--small"), this._waiAria.eventAttr(r, x), this._rendered.push(x), s.appendChild(x), b = b + parseInt(this.config.rtl ? m.style.right : m.style.left, 10) + v, this._edit_id == r.id) { - x.style.zIndex = 1, w = Math.max(w, t.xy.editor_width), (x = document.createElement("div")).setAttribute("event_id", r.id), x.setAttribute(this.config.event_attribute, r.id), this._waiAria.eventAttr(r, x), x.className = "dhx_cal_event dhx_cal_editor", this.config.rtl && b++, this.set_xy(x, w, g, b, f), r.color && x.style.setProperty("--dhx-scheduler-event-background", r.color); - var S = t.templates.event_class(r.start_date, r.end_date, r); + n._mode = g < 30 ? "smallest" : g < 42 ? "small" : null; + var x = this._render_v_bar(n, v + b, f, w, g, n._text_style, t.templates.event_header(n.start_date, n.end_date, n), t.templates.event_text(n.start_date, n.end_date, n)); + if (n._mode === "smallest" ? x.classList.add("dhx_cal_event--xsmall") : n._mode === "small" && x.classList.add("dhx_cal_event--small"), this._waiAria.eventAttr(n, x), this._rendered.push(x), s.appendChild(x), b = b + parseInt(this.config.rtl ? m.style.right : m.style.left, 10) + v, this._edit_id == n.id) { + x.style.zIndex = 1, w = Math.max(w, t.xy.editor_width), (x = document.createElement("div")).setAttribute("event_id", n.id), x.setAttribute(this.config.event_attribute, n.id), this._waiAria.eventAttr(n, x), x.className = "dhx_cal_event dhx_cal_editor", this.config.rtl && b++, this.set_xy(x, w, g, b, f), n.color && x.style.setProperty("--dhx-scheduler-event-background", n.color); + var S = t.templates.event_class(n.start_date, n.end_date, n); S && (x.className += " " + S); var N = document.createElement("div"); - N.style.cssText += "overflow:hidden;height:100%", x.appendChild(N), this._els.dhx_cal_data[0].appendChild(x), this._rendered.push(x), N.innerHTML = "", this._editor = N.querySelector("textarea"), t.event(this._editor, "keydown", function(L) { + N.style.cssText += "overflow:hidden;height:100%", x.appendChild(N), this._els.dhx_cal_data[0].appendChild(x), this._rendered.push(x), N.innerHTML = "", this._editor = N.querySelector("textarea"), t.event(this._editor, "keydown", function(L) { if (L.shiftKey) return !0; - var $ = L.keyCode; - $ == t.keys.edit_save && t.editStop(!0), $ == t.keys.edit_cancel && t.editStop(!1), $ != t.keys.edit_save && $ != t.keys.edit_cancel || L.preventDefault && L.preventDefault(); + var H = L.keyCode; + H == t.keys.edit_save && t.editStop(!0), H == t.keys.edit_cancel && t.editStop(!1), H != t.keys.edit_save && H != t.keys.edit_cancel || L.preventDefault && L.preventDefault(); }), t.event(this._editor, "selectstart", function(L) { return L.cancelBubble = !0, !0; }), t._focus(this._editor, !0), this._els.dhx_cal_data[0].scrollLeft = 0; } - if (this.xy.menu_width !== 0 && this._select_id == r.id) { + if (this.xy.menu_width !== 0 && this._select_id == n.id) { this.config.cascade_event_display && this._drag_mode && (x.style.zIndex = 1); - for (var M, A = this.config["icons_" + (this._edit_id == r.id ? "edit" : "select")], C = "", T = 0; T < A.length; T++) { + for (var M, A = this.config["icons_" + (this._edit_id == n.id ? "edit" : "select")], C = "", T = 0; T < A.length; T++) { const L = A[T]; M = this._waiAria.eventMenuAttrString(L), C += `
`; } - var O = this._render_v_bar(r, b - u - 1, f, u, null, "", "
", C, !0); - r.color && O.style.setProperty("--dhx-scheduler-event-background", r.color), r.textColor && O.style.setProperty("--dhx-scheduler-event-color", r.textColor), this._els.dhx_cal_data[0].appendChild(O), this._rendered.push(O); + var O = this._render_v_bar(n, b - u - 1, f, u, null, "", "
", C, !0); + n.color && O.style.setProperty("--dhx-scheduler-event-background", n.color), n.textColor && O.style.setProperty("--dhx-scheduler-event-color", n.textColor), this._els.dhx_cal_data[0].appendChild(O), this._rendered.push(O); } - this.config.drag_highlight && this._drag_id == r.id && this.highlightEventPosition(r); + this.config.drag_highlight && this._drag_id == n.id && this.highlightEventPosition(n); } } - }, t._render_v_bar = function(r, s, c, u, v, m, l, f, g) { - var p = document.createElement("div"), y = r.id, w = g ? "dhx_cal_event dhx_cal_select_menu" : "dhx_cal_event", b = t.getState(); - b.drag_id == r.id && (w += " dhx_cal_event_drag"), b.select_id == r.id && (w += " dhx_cal_event_selected"); - var k = t.templates.event_class(r.start_date, r.end_date, r); + }, t._render_v_bar = function(n, s, c, u, v, m, l, f, g) { + var p = document.createElement("div"), y = n.id, w = g ? "dhx_cal_event dhx_cal_select_menu" : "dhx_cal_event", b = t.getState(); + b.drag_id == n.id && (w += " dhx_cal_event_drag"), b.select_id == n.id && (w += " dhx_cal_event_selected"); + var k = t.templates.event_class(n.start_date, n.end_date, n); k && (w = w + " " + k), this.config.cascade_event_display && (w += " dhx_cal_event_cascade"); var E = u, D = '
'; p.innerHTML = D; var x = p.cloneNode(!0).firstChild; - if (!g && t.renderEvent(x, r, u, v, l, f)) - return r.color && x.style.setProperty("--dhx-scheduler-event-background", r.color), r.textColor && x.style.setProperty("--dhx-scheduler-event-color", r.textColor), x; - x = p.firstChild, r.color && x.style.setProperty("--dhx-scheduler-event-background", r.color), r.textColor && x.style.setProperty("--dhx-scheduler-event-color", r.textColor); + if (!g && t.renderEvent(x, n, u, v, l, f)) + return n.color && x.style.setProperty("--dhx-scheduler-event-background", n.color), n.textColor && x.style.setProperty("--dhx-scheduler-event-color", n.textColor), x; + x = p.firstChild, n.color && x.style.setProperty("--dhx-scheduler-event-background", n.color), n.textColor && x.style.setProperty("--dhx-scheduler-event-color", n.textColor); var S = '
 
'; S += '
' + l + "
", S += '
' + f + "
"; var N = "dhx_event_resize dhx_footer"; - return (g || r._drag_resize === !1) && (N = "dhx_resize_denied " + N), S += '
', x.innerHTML = S, x; + return (g || n._drag_resize === !1) && (N = "dhx_resize_denied " + N), S += '
', x.innerHTML = S, x; }, t.renderEvent = function() { return !1; - }, t.locate_holder = function(r) { - return this._mode == "day" ? this._els.dhx_cal_data[0].firstChild : this._els.dhx_cal_data[0].childNodes[r]; - }, t.locate_holder_day = function(r, s) { - var c = Math.floor((this._correct_shift(r, 1) - this._min_date) / 864e5); - return s && this.date.time_part(r) && c++, c; - }, t._get_dnd_order = function(r, s, c) { + }, t.locate_holder = function(n) { + return this._mode == "day" ? this._els.dhx_cal_data[0].firstChild : this._els.dhx_cal_data[0].childNodes[n]; + }, t.locate_holder_day = function(n, s) { + var c = Math.floor((this._correct_shift(n, 1) - this._min_date) / 864e5); + return s && this.date.time_part(n) && c++, c; + }, t._get_dnd_order = function(n, s, c) { if (!this._drag_event) - return r; - this._drag_event._orig_sorder ? r = this._drag_event._orig_sorder : this._drag_event._orig_sorder = r; - for (var u = s * r; u + s > c; ) - r--, u -= s; - return Math.max(r, 0); - }, t._get_event_bar_pos = function(r) { - var s = this.config.rtl, c = this._colsS, u = c[r._sday], v = c[r._eday]; - s && (u = c[c.col_length] - c[r._eday] + c[0], v = c[c.col_length] - c[r._sday] + c[0]), v == u && (v = c[r._eday + 1]); - var m = this.xy.bar_height, l = r._sorder; - if (r.id == this._drag_id) { - var f = c.heights[r._sweek + 1] - c.heights[r._sweek] - this.xy.month_head_height; + return n; + this._drag_event._orig_sorder ? n = this._drag_event._orig_sorder : this._drag_event._orig_sorder = n; + for (var u = s * n; u + s > c; ) + n--, u -= s; + return Math.max(n, 0); + }, t._get_event_bar_pos = function(n) { + var s = this.config.rtl, c = this._colsS, u = c[n._sday], v = c[n._eday]; + s && (u = c[c.col_length] - c[n._eday] + c[0], v = c[c.col_length] - c[n._sday] + c[0]), v == u && (v = c[n._eday + 1]); + var m = this.xy.bar_height, l = n._sorder; + if (n.id == this._drag_id) { + var f = c.heights[n._sweek + 1] - c.heights[n._sweek] - this.xy.month_head_height; l = t._get_dnd_order(l, m, f); } var g = l * m; - return { x: u, x2: v, y: c.heights[r._sweek] + (c.height ? this.xy.month_scale_height + 2 : 2) + g }; - }, t.render_event_bar = function(r) { - var s = this._rendered_location, c = this._get_event_bar_pos(r), u = c.y, v = c.x, m = c.x2, l = ""; + return { x: u, x2: v, y: c.heights[n._sweek] + (c.height ? this.xy.month_scale_height + 2 : 2) + g }; + }, t.render_event_bar = function(n) { + var s = this._rendered_location, c = this._get_event_bar_pos(n), u = c.y, v = c.x, m = c.x2, l = ""; if (m) { - var f = t.config.resize_month_events && this._mode == "month" && (!r._timed || t.config.resize_month_timed), g = document.createElement("div"), p = r.hasOwnProperty("_first_chunk") && r._first_chunk, y = r.hasOwnProperty("_last_chunk") && r._last_chunk, w = f && (r._timed || p), b = f && (r._timed || y), k = !0, E = "dhx_cal_event_clear"; - r._timed && !f || (k = !1, E = "dhx_cal_event_line"), p && (E += " dhx_cal_event_line_start"), y && (E += " dhx_cal_event_line_end"), w && (l += "
"), b && (l += "
"); - var D = t.templates.event_class(r.start_date, r.end_date, r); + var f = t.config.resize_month_events && this._mode == "month" && (!n._timed || t.config.resize_month_timed), g = document.createElement("div"), p = n.hasOwnProperty("_first_chunk") && n._first_chunk, y = n.hasOwnProperty("_last_chunk") && n._last_chunk, w = f && (n._timed || p), b = f && (n._timed || y), k = !0, E = "dhx_cal_event_clear"; + n._timed && !f || (k = !1, E = "dhx_cal_event_line"), p && (E += " dhx_cal_event_line_start"), y && (E += " dhx_cal_event_line_end"), w && (l += "
"), b && (l += "
"); + var D = t.templates.event_class(n.start_date, n.end_date, n); D && (E += " " + D); - var x = r.color ? "--dhx-scheduler-event-background:" + r.color + ";" : "", S = r.textColor ? "--dhx-scheduler-event-color:" + r.textColor + ";" : "", N = ["position:absolute", "top:" + u + "px", "left:" + v + "px", "width:" + (m - v - (k ? 1 : 0)) + "px", "height:" + (this.xy.bar_height - 2) + "px", S, x, r._text_style || ""].join(";"), M = "
"; - f && (M += l), t.getState().mode == "month" && (r = t.getEvent(r.id)), r._timed && (M += `${t.templates.event_bar_date(r.start_date, r.end_date, r)}`), M += "
", M += t.templates.event_bar_text(r.start_date, r.end_date, r) + "
", M += "
", M += "
", g.innerHTML = M, this._rendered.push(g.firstChild), s.appendChild(g.firstChild); + var x = n.color ? "--dhx-scheduler-event-background:" + n.color + ";" : "", S = n.textColor ? "--dhx-scheduler-event-color:" + n.textColor + ";" : "", N = ["position:absolute", "top:" + u + "px", "left:" + v + "px", "width:" + (m - v - (k ? 1 : 0)) + "px", "height:" + (this.xy.bar_height - 2) + "px", S, x, n._text_style || ""].join(";"), M = "
"; + f && (M += l), t.getState().mode == "month" && (n = t.getEvent(n.id)), n._timed && (M += `${t.templates.event_bar_date(n.start_date, n.end_date, n)}`), M += "
", M += t.templates.event_bar_text(n.start_date, n.end_date, n) + "
", M += "
", M += "", g.innerHTML = M, this._rendered.push(g.firstChild), s.appendChild(g.firstChild); } - }, t._locate_event = function(r) { - for (var s = null; r && !s && r.getAttribute; ) - s = r.getAttribute(this.config.event_attribute), r = r.parentNode; + }, t._locate_event = function(n) { + for (var s = null; n && !s && n.getAttribute; ) + s = n.getAttribute(this.config.event_attribute), n = n.parentNode; return s; - }, t.edit = function(r) { - this._edit_id != r && (this.editStop(!1, r), this._edit_id = r, this.updateEvent(r)); - }, t.editStop = function(r, s) { + }, t.edit = function(n) { + this._edit_id != n && (this.editStop(!1, n), this._edit_id = n, this.updateEvent(n)); + }, t.editStop = function(n, s) { if (!s || this._edit_id != s) { var c = this.getEvent(this._edit_id); - c && (r && (c.text = this._editor.value), this._edit_id = null, this._editor = null, this.updateEvent(c.id), this._edit_stop_event(c, r)); + c && (n && (c.text = this._editor.value), this._edit_id = null, this._editor = null, this.updateEvent(c.id), this._edit_stop_event(c, n)); } - }, t._edit_stop_event = function(r, s) { - this._new_event ? (s ? this.callEvent("onEventAdded", [r.id, r]) : r && this.deleteEvent(r.id, !0), this._new_event = null) : s && this.callEvent("onEventChanged", [r.id, r]); - }, t.getEvents = function(r, s) { + }, t._edit_stop_event = function(n, s) { + this._new_event ? (s ? this.callEvent("onEventAdded", [n.id, n]) : n && this.deleteEvent(n.id, !0), this._new_event = null) : s && this.callEvent("onEventChanged", [n.id, n]); + }, t.getEvents = function(n, s) { var c = []; for (var u in this._events) { var v = this._events[u]; - v && (!r && !s || v.start_date < s && v.end_date > r) && c.push(v); + v && (!n && !s || v.start_date < s && v.end_date > n) && c.push(v); } return c; - }, t.getRenderedEvent = function(r) { - if (r) { + }, t.getRenderedEvent = function(n) { + if (n) { for (var s = t._rendered, c = 0; c < s.length; c++) { var u = s[c]; - if (u.getAttribute(t.config.event_attribute) == r) + if (u.getAttribute(t.config.event_attribute) == n) return u; } return null; } - }, t.showEvent = function(r, s) { - r && typeof r == "object" && (s = r.mode, y = r.section, r = r.section); - var c = typeof r == "number" || typeof r == "string" ? t.getEvent(r) : r; + }, t.showEvent = function(n, s) { + n && typeof n == "object" && (s = n.mode, y = n.section, n = n.section); + var c = typeof n == "number" || typeof n == "string" ? t.getEvent(n) : n; if (s = s || t._mode, c && (!this.checkEvent("onBeforeEventDisplay") || this.callEvent("onBeforeEventDisplay", [c, s]))) { var u = t.config.scroll_hour; t.config.scroll_hour = c.start_date.getHours(); @@ -3353,22 +3354,22 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); } }; }(h), function(t) { - t._append_drag_marker = function(r) { - if (!r.parentNode) { + t._append_drag_marker = function(n) { + if (!n.parentNode) { var s = t._els.dhx_cal_data[0].lastChild, c = t._getClassName(s); - c.indexOf("dhx_scale_holder") < 0 && s.previousSibling && (s = s.previousSibling), c = t._getClassName(s), s && c.indexOf("dhx_scale_holder") === 0 && s.appendChild(r); + c.indexOf("dhx_scale_holder") < 0 && s.previousSibling && (s = s.previousSibling), c = t._getClassName(s), s && c.indexOf("dhx_scale_holder") === 0 && s.appendChild(n); } - }, t._update_marker_position = function(r, s) { + }, t._update_marker_position = function(n, s) { var c = t._calc_event_y(s, 0); - r.style.top = c.top + "px", r.style.height = c.height + "px"; - }, t.highlightEventPosition = function(r) { + n.style.top = c.top + "px", n.style.height = c.height + "px"; + }, t.highlightEventPosition = function(n) { var s = document.createElement("div"); - s.setAttribute("event_id", r.id), s.setAttribute(this.config.event_attribute, r.id), this._rendered.push(s), this._update_marker_position(s, r); - var c = this.templates.drag_marker_class(r.start_date, r.end_date, r), u = this.templates.drag_marker_content(r.start_date, r.end_date, r); + s.setAttribute("event_id", n.id), s.setAttribute(this.config.event_attribute, n.id), this._rendered.push(s), this._update_marker_position(s, n); + var c = this.templates.drag_marker_class(n.start_date, n.end_date, n), u = this.templates.drag_marker_content(n.start_date, n.end_date, n); s.className = "dhx_drag_marker", c && (s.className += " " + c), u && (s.innerHTML = u), this._append_drag_marker(s); }; }(h), xe(h), function(t) { - function r() { + function n() { const s = t.config.csp === !0, c = !!window.Sfdc || !!window.$A || window.Aura || "$shadowResolver$" in document.body; return s || c ? t.$root : document.body; } @@ -3401,7 +3402,7 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); return s.innerHTML || ""; }, focus: function(s) { } }, textarea: { render: function(s) { - return "
"; + return `
`; }, set_value: function(s, c, u) { t.form_blocks.textarea._get_input(s).value = c || ""; }, get_value: function(s, c) { @@ -3504,9 +3505,9 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); }, focus: function(s) { t._focus(s.getElementsByTagName("select")[0]); } } }, t._setLbPosition = function(s) { - s && (s.style.top = Math.max(r().offsetHeight / 2 - s.offsetHeight / 2, 0) + "px", s.style.left = Math.max(r().offsetWidth / 2 - s.offsetWidth / 2, 0) + "px"); + s && (s.style.top = Math.max(n().offsetHeight / 2 - s.offsetHeight / 2, 0) + "px", s.style.left = Math.max(n().offsetWidth / 2 - s.offsetWidth / 2, 0) + "px"); }, t.showCover = function(s) { - s && (s.style.display = "block", this._setLbPosition(s)), t.config.responsive_lightbox && (document.documentElement.classList.add("dhx_cal_overflow_container"), r().classList.add("dhx_cal_overflow_container")), this.show_cover(), this._cover.style.display = ""; + s && (s.style.display = "block", this._setLbPosition(s)), t.config.responsive_lightbox && (document.documentElement.classList.add("dhx_cal_overflow_container"), n().classList.add("dhx_cal_overflow_container")), this.show_cover(), this._cover.style.display = ""; }, t.showLightbox = function(s) { if (s) if (this.callEvent("onBeforeLightbox", [s])) { @@ -3547,11 +3548,11 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); }, t.hide_lightbox = function(s) { t.endLightbox(!1, this.getLightbox()); }, t.hideCover = function(s) { - s && (s.style.display = "none"), this.hide_cover(), t.config.responsive_lightbox && (document.documentElement.classList.remove("dhx_cal_overflow_container"), r().classList.remove("dhx_cal_overflow_container")); + s && (s.style.display = "none"), this.hide_cover(), t.config.responsive_lightbox && (document.documentElement.classList.remove("dhx_cal_overflow_container"), n().classList.remove("dhx_cal_overflow_container")); }, t.hide_cover = function() { this._cover && this._cover.parentNode.removeChild(this._cover), this._cover = null; }, t.show_cover = function() { - this._cover || (this._cover = document.createElement("div"), this._cover.className = "dhx_cal_cover", this._cover.style.display = "none", t.event(this._cover, "mousemove", t._move_while_dnd), t.event(this._cover, "mouseup", t._finish_dnd), r().appendChild(this._cover)); + this._cover || (this._cover = document.createElement("div"), this._cover.className = "dhx_cal_cover", this._cover.style.display = "none", t.event(this._cover, "mousemove", t._move_while_dnd), t.event(this._cover, "mouseup", t._finish_dnd), n().appendChild(this._cover)); }, t.save_lightbox = function() { var s = this._lightbox_out({}, this._lame_copy(this.getEvent(this._lightbox_id))); this.checkEvent("onEventSave") && !this.callEvent("onEventSave", [this._lightbox_id, s, this._new_event]) || (this._empty_lightbox(s), this.hide_lightbox()); @@ -3629,11 +3630,11 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); }); }, t.setLightboxSize = function() { }, t._init_dnd_events = function() { - t.event(r(), "mousemove", t._move_while_dnd), t.event(r(), "mouseup", t._finish_dnd), t._init_dnd_events = function() { + t.event(n(), "mousemove", t._move_while_dnd), t.event(n(), "mouseup", t._finish_dnd), t._init_dnd_events = function() { }; }, t._move_while_dnd = function(s) { if (t._dnd_start_lb) { - document.dhx_unselectable || (r().classList.add("dhx_unselectable"), document.dhx_unselectable = !0); + document.dhx_unselectable || (n().classList.add("dhx_unselectable"), document.dhx_unselectable = !0); var c = t.getLightbox(), u = [s.pageX, s.pageY]; c.style.top = t._lb_start[1] + u[1] - t._dnd_start_lb[1] + "px", c.style.left = t._lb_start[0] + u[0] - t._dnd_start_lb[0] + "px"; } @@ -3641,7 +3642,7 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); var c = t.getLightbox(); t._lb_start = [c.offsetLeft, c.offsetTop], t._dnd_start_lb = [s.pageX, s.pageY]; }, t._finish_dnd = function() { - t._lb_start && (t._lb_start = t._dnd_start_lb = !1, r().classList.remove("dhx_unselectable"), document.dhx_unselectable = !1); + t._lb_start && (t._lb_start = t._dnd_start_lb = !1, n().classList.remove("dhx_unselectable"), document.dhx_unselectable = !1); }, t.getLightbox = function() { if (!this._lightbox) { var s = document.createElement("div"); @@ -3712,42 +3713,42 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); t.setCurrentView(); } }, body: [{ el: this.el, type: 1 }] }; }, init: function() { - var r = document.createElement("DIV"); - r.id = "scheduler_" + t.uid(), r.style.width = "100%", r.style.height = "100%", r.classList.add("dhx_cal_container"), r.cmp = "grid", r.innerHTML = '
', t.init(r), this.el = r; + var n = document.createElement("DIV"); + n.id = "scheduler_" + t.uid(), n.style.width = "100%", n.style.height = "100%", n.classList.add("dhx_cal_container"), n.cmp = "grid", n.innerHTML = '
', t.init(n), this.el = n; } }, type: 4 }; }; - }(h), ke(h), window.jQuery && (i = window.jQuery, d = 0, n = [], i.fn.dhx_scheduler = function(t) { + }(h), ke(h), window.jQuery && (r = window.jQuery, d = 0, i = [], r.fn.dhx_scheduler = function(t) { if (typeof t != "string") { - var r = []; + var n = []; return this.each(function() { if (this && this.getAttribute) if (this.getAttribute("dhxscheduler")) - r.push(window[this.getAttribute("dhxscheduler")]); + n.push(window[this.getAttribute("dhxscheduler")]); else { var s = "scheduler"; d && (s = "scheduler" + (d + 1), window[s] = Scheduler.getSchedulerInstance()); var c = window[s]; for (var u in this.setAttribute("dhxscheduler", s), t) u != "data" && (c.config[u] = t[u]); - this.getElementsByTagName("div").length || (this.innerHTML = '
', this.className += " dhx_cal_container"), c.init(this, c.config.date, c.config.mode), t.data && c.parse(t.data), r.push(c), d++; + this.getElementsByTagName("div").length || (this.innerHTML = '
', this.className += " dhx_cal_container"), c.init(this, c.config.date, c.config.mode), t.data && c.parse(t.data), n.push(c), d++; } - }), r.length === 1 ? r[0] : r; + }), n.length === 1 ? n[0] : n; } - if (n[t]) - return n[t].apply(this, []); - i.error("Method " + t + " does not exist on jQuery.dhx_scheduler"); + if (i[t]) + return i[t].apply(this, []); + r.error("Method " + t + " does not exist on jQuery.dhx_scheduler"); }), function(t) { (function() { - var r = t.setCurrentView, s = t.updateView, c = null, u = null, v = function(f, g) { + var n = t.setCurrentView, s = t.updateView, c = null, u = null, v = function(f, g) { var p = this; - B.clearTimeout(u), B.clearTimeout(c); + I.clearTimeout(u), I.clearTimeout(c); var y = p._date, w = p._mode; l(this, f, g), u = setTimeout(function() { - t.$destroyed || (p.callEvent("onBeforeViewChange", [w, y, g || p._mode, f || p._date]) ? (s.call(p, f, g), p.callEvent("onViewChange", [p._mode, p._date]), B.clearTimeout(c), u = 0) : l(p, y, w)); + t.$destroyed || (p.callEvent("onBeforeViewChange", [w, y, g || p._mode, f || p._date]) ? (s.call(p, f, g), p.callEvent("onViewChange", [p._mode, p._date]), I.clearTimeout(c), u = 0) : l(p, y, w)); }, t.config.delay_render); }, m = function(f, g) { var p = this, y = arguments; - l(this, f, g), B.clearTimeout(c), c = setTimeout(function() { + l(this, f, g), I.clearTimeout(c), c = setTimeout(function() { t.$destroyed || u || s.apply(p, y); }, t.config.delay_render); }; @@ -3755,35 +3756,35 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); g && (f._date = g), p && (f._mode = p); } t.attachEvent("onSchedulerReady", function() { - t.config.delay_render ? (t.setCurrentView = v, t.updateView = m) : (t.setCurrentView = r, t.updateView = s); + t.config.delay_render ? (t.setCurrentView = v, t.updateView = m) : (t.setCurrentView = n, t.updateView = s); }); })(); }(h), function(t) { - t.createDataProcessor = function(r) { + t.createDataProcessor = function(n) { var s, c; - r instanceof Function ? s = r : r.hasOwnProperty("router") ? s = r.router : r.hasOwnProperty("event") && (s = r), c = s ? "CUSTOM" : r.mode || "REST-JSON"; - var u = new G(r.url); - return u.init(t), u.setTransactionMode({ mode: c, router: s }, r.batchUpdate), u; + n instanceof Function ? s = n : n.hasOwnProperty("router") ? s = n.router : n.hasOwnProperty("event") && (s = n), c = s ? "CUSTOM" : n.mode || "REST-JSON"; + var u = new G(n.url); + return u.init(t), u.setTransactionMode({ mode: c, router: s }, n.batchUpdate), u; }, t.DataProcessor = G; }(h), function(t) { t.attachEvent("onSchedulerReady", function() { - typeof dhtmlxError < "u" && window.dhtmlxError.catchError("LoadXML", function(r, s, c) { + typeof dhtmlxError < "u" && window.dhtmlxError.catchError("LoadXML", function(n, s, c) { var u = c[0].responseText; switch (t.config.ajax_error) { case "alert": - B.alert(u); + I.alert(u); break; case "console": - B.console.log(u); + I.console.log(u); } }); }); }(h); - const _ = new qe({ en: $e, ar: Se, be: Ne, ca: Me, cn: Ae, cs: Ce, da: Te, de: Oe, el: He, es: Le, fi: ze, fr: je, he: Pe, hu: Ve, id: Ie, it: Be, jp: Re, nb: Fe, nl: Je, no: Ue, pl: Ye, pt: We, ro: Ke, ru: Ge, si: Xe, sk: Ze, sv: Qe, tr: et, ua: tt }); + const _ = new qe({ en: He, ar: Se, be: Ne, ca: Me, cn: Ae, cs: Ce, da: Te, de: Oe, el: $e, es: Le, fi: ze, fr: je, he: Pe, hu: Ve, id: Ie, it: Be, jp: Re, nb: Fe, nl: Je, no: Ue, pl: Ye, pt: We, ro: Ke, ru: Ge, si: Xe, sk: Ze, sv: Qe, tr: et, ua: tt }); h.i18n = { addLocale: _.addLocale, setLocale: function(t) { if (typeof t == "string") { - var r = _.getLocale(t); - r || (r = _.getLocale("en")), h.locale = r; + var n = _.getLocale(t); + n || (n = _.getLocale("en")), h.locale = n; } else if (t) if (h.locale) for (var s in t) @@ -3832,11 +3833,11 @@ class it { return this._extensions[h]; } } -typeof dhtmlx < "u" && dhtmlx.attaches && (dhtmlx.attaches.attachScheduler = function(e, h, a, i) { +typeof dhtmlx < "u" && dhtmlx.attaches && (dhtmlx.attaches.attachScheduler = function(e, h, a, r) { a = a || '
'; var d = document.createElement("DIV"); - return d.id = "dhxSchedObj_" + this._genStr(12), d.innerHTML = '
' + a + '
', document.body.appendChild(d.firstChild), this.attachObject(d.id, !1, !0), this.vs[this.av].sched = i, this.vs[this.av].schedId = d.id, i.setSizes = i.updateView, i.destructor = function() { - }, i.init(d.id, e, h), this.vs[this._viewRestore()].sched; + return d.id = "dhxSchedObj_" + this._genStr(12), d.innerHTML = '
' + a + '
', document.body.appendChild(d.firstChild), this.attachObject(d.id, !1, !0), this.vs[this.av].sched = r, this.vs[this.av].schedId = d.id, r.setSizes = r.updateView, r.destructor = function() { + }, r.init(d.id, e, h), this.vs[this._viewRestore()].sched; }); const R = (e, h) => { h(!1, `The ${e} extension is not included in this version of dhtmlxScheduler.
@@ -3849,14 +3850,14 @@ function rt(e) { function a() { return !!h.length; } - function i(o) { + function r(o) { setTimeout(function() { if (e.$destroyed) return !0; - a() || function(t, r) { - for (; t && t != r; ) + a() || function(t, n) { + for (; t && t != n; ) t = t.parentNode; - return t == r; + return t == n; }(document.activeElement, e.$container) || e.focus(); }, 1); } @@ -3869,15 +3870,15 @@ function rt(e) { o = e.getLightbox(), e.eventRemove(o, "keydown", d), e.event(o, "keydown", d), h.push(o); }), e.attachEvent("onAfterLightbox", function() { var o = h.pop(); - o && e.eventRemove(o, "keydown", d), i(); + o && e.eventRemove(o, "keydown", d), r(); }), e.attachEvent("onAfterQuickInfo", function() { - i(); + r(); }), !e._keyNavMessagePopup) { e._keyNavMessagePopup = !0; - var n = null, _ = null; + var i = null, _ = null; const o = []; e.attachEvent("onMessagePopup", function(t) { - for (n = document.activeElement, _ = n; _ && e._getClassName(_).indexOf("dhx_cal_data") < 0; ) + for (i = document.activeElement, _ = i; _ && e._getClassName(_).indexOf("dhx_cal_data") < 0; ) _ = _.parentNode; _ && (_ = _.parentNode), e.eventRemove(t, "keydown", d), e.event(t, "keydown", d), o.push(t); }), e.attachEvent("onAfterMessagePopup", function() { @@ -3885,9 +3886,9 @@ function rt(e) { t && e.eventRemove(t, "keydown", d), setTimeout(function() { if (e.$destroyed) return !0; - for (var r = document.activeElement; r && e._getClassName(r).indexOf("dhx_cal_light") < 0; ) - r = r.parentNode; - r || (n && n.parentNode ? n.focus() : _ && _.parentNode && _.focus(), n = null, _ = null); + for (var n = document.activeElement; n && e._getClassName(n).indexOf("dhx_cal_light") < 0; ) + n = n.parentNode; + n || (i && i.parentNode ? i.focus() : _ && _.parentNode && _.focus(), i = null, _ = null); }, 1); }); } @@ -3898,7 +3899,7 @@ function ot(e) { e._temp_key_scope = function() { e.config.key_nav = !0, e.$keyboardNavigation._pasteDate = null, e.$keyboardNavigation._pasteSection = null; var h = null, a = {}; - function i(_) { + function r(_) { _ = _ || window.event, a.x = _.clientX, a.y = _.clientY; } function d() { @@ -3906,22 +3907,22 @@ function ot(e) { t = t.parentNode; return _ = t == e._obj, o = e.$keyboardNavigation.dispatcher.isEnabled(), _ || o; } - function n(_) { + function i(_) { return e._lame_copy({}, _); } - document.body ? e.event(document.body, "mousemove", i) : e.event(window, "load", function() { - e.event(document.body, "mousemove", i); + document.body ? e.event(document.body, "mousemove", r) : e.event(window, "load", function() { + e.event(document.body, "mousemove", r); }), e.attachEvent("onMouseMove", function(_, o) { var t = e.getState(); if (t.mode && t.min_date) { - var r = e.getActionData(o); - e.$keyboardNavigation._pasteDate = r.date, e.$keyboardNavigation._pasteSection = r.section; + var n = e.getActionData(o); + e.$keyboardNavigation._pasteDate = n.date, e.$keyboardNavigation._pasteSection = n.section; } }), e._make_pasted_event = function(_) { - var o = e.$keyboardNavigation._pasteDate, t = e.$keyboardNavigation._pasteSection, r = _.end_date - _.start_date, s = n(_); + var o = e.$keyboardNavigation._pasteDate, t = e.$keyboardNavigation._pasteSection, n = _.end_date - _.start_date, s = i(_); if (function(u) { delete u.rec_type, delete u.rec_pattern, delete u.event_pid, delete u.event_length; - }(s), s.start_date = new Date(o), s.end_date = new Date(s.start_date.valueOf() + r), t) { + }(s), s.start_date = new Date(o), s.end_date = new Date(s.start_date.valueOf() + n), t) { var c = e._get_section_property(); e.config.multisection ? s[c] = _[c] : s[c] = t; } @@ -3940,12 +3941,12 @@ function ot(e) { var o = e.date.add(e._date, _.keyCode == 37 ? -1 : 1, e._mode); return e.setCurrentView(o), !0; } - var t, r = (t = e.$keyboardNavigation.dispatcher.getActiveNode()) && t.eventId ? t.eventId : e._select_id; + var t, n = (t = e.$keyboardNavigation.dispatcher.getActiveNode()) && t.eventId ? t.eventId : e._select_id; if ((_.ctrlKey || _.metaKey) && _.keyCode == 67) - return r && (e._buffer_event = n(e.getEvent(r)), h = !0, e.callEvent("onEventCopied", [e.getEvent(r)])), !0; - if ((_.ctrlKey || _.metaKey) && _.keyCode == 88 && r) { + return n && (e._buffer_event = i(e.getEvent(n)), h = !0, e.callEvent("onEventCopied", [e.getEvent(n)])), !0; + if ((_.ctrlKey || _.metaKey) && _.keyCode == 88 && n) { h = !1; - var s = e._buffer_event = n(e.getEvent(r)); + var s = e._buffer_event = i(e.getEvent(n)); e.updateEvent(s.id), e.callEvent("onEventCut", [s]); } if ((_.ctrlKey || _.metaKey) && _.keyCode == 86 && d()) { @@ -3960,7 +3961,7 @@ function ot(e) { } function st(e) { e.$keyboardNavigation.attachSchedulerHandlers = function() { - var h, a = e.$keyboardNavigation.dispatcher, i = function(t) { + var h, a = e.$keyboardNavigation.dispatcher, r = function(t) { if (e.config.key_nav) return a.keyDownHandler(t); }, d = function() { @@ -3972,10 +3973,10 @@ function st(e) { e.config.key_nav && a.isEnabled() && !e.getState().editor_id && (clearTimeout(h), h = setTimeout(function() { if (e.$destroyed) return !0; - a.isEnabled() || a.enable(), n(); + a.isEnabled() || a.enable(), i(); })); }); - var n = function() { + var i = function() { if (a.isEnabled()) { var t = a.getActiveNode(); t && (t.isValid() || (t = t.fallback()), !t || t instanceof e.$keyboardNavigation.MinicalButton || t instanceof e.$keyboardNavigation.MinicalCell || a.keepScrollPosition(function() { @@ -3986,18 +3987,28 @@ function st(e) { function _(t) { if (!e.config.key_nav) return !0; - var r, s = e.$keyboardNavigation.isChildOf(t.target || t.srcElement, e.$container.querySelector(".dhx_cal_data")), c = e.getActionData(t); - e._locate_event(t.target || t.srcElement) ? r = new e.$keyboardNavigation.Event(e._locate_event(t.target || t.srcElement)) : s && (r = new e.$keyboardNavigation.TimeSlot(), c.date && s && (r = r.nextSlot(new e.$keyboardNavigation.TimeSlot(c.date, null, c.section)))), r && (a.isEnabled() ? c.date && s && a.delay(function() { - a.setActiveNode(r); - }) : a.activeNode = r); + const n = e.getView(); + let s = !1; + if (e.getState().mode === "month") + s = e.$keyboardNavigation.isChildOf(t.target || t.srcElement, e.$container.querySelector(".dhx_cal_month_table")); + else if (n && n.layout === "timeline") + s = e.$keyboardNavigation.isChildOf(t.target || t.srcElement, e.$container.querySelector(".dhx_timeline_data_col")); + else { + const v = e.$container.querySelectorAll(".dhx_scale_holder"); + s = Array.from(v).some((m) => m === t.target.parentNode); + } + var c, u = e.getActionData(t); + e._locate_event(t.target || t.srcElement) ? c = new e.$keyboardNavigation.Event(e._locate_event(t.target || t.srcElement)) : s && (c = new e.$keyboardNavigation.TimeSlot(), u.date && s && (c = c.nextSlot(new e.$keyboardNavigation.TimeSlot(u.date, null, u.section)))), c && (a.isEnabled() ? u.date && s && a.delay(function() { + a.setActiveNode(c); + }) : a.activeNode = c); } e.attachEvent("onSchedulerReady", function() { var t = e.$container; - e.eventRemove(document, "keydown", i), e.eventRemove(t, "mousedown", _), e.eventRemove(t, "focus", d), e.config.key_nav ? (e.event(document, "keydown", i), e.event(t, "mousedown", _), e.event(t, "focus", d), t.setAttribute("tabindex", "0")) : t.removeAttribute("tabindex"); + e.eventRemove(document, "keydown", r), e.eventRemove(t, "mousedown", _), e.eventRemove(t, "focus", d), e.config.key_nav ? (e.event(document, "keydown", r), e.event(t, "mousedown", _), e.event(t, "focus", d), t.setAttribute("tabindex", "0")) : t.removeAttribute("tabindex"); }); var o = e.updateEvent; e.updateEvent = function(t) { - var r = o.apply(this, arguments); + var n = o.apply(this, arguments); if (e.config.key_nav && a.isEnabled() && e.getState().select_id == t) { var s = new e.$keyboardNavigation.Event(t); e.getState().lightbox_id || function(c) { @@ -4013,7 +4024,7 @@ function st(e) { } }(s); } - return r; + return n; }, e.attachEvent("onEventDeleted", function(t) { return e.config.key_nav && a.isEnabled() && a.getActiveNode().eventId == t && a.setActiveNode(new e.$keyboardNavigation.TimeSlot()), !0; }), e.attachEvent("onClearAll", function() { @@ -4035,12 +4046,12 @@ class dt { return this._root = h, this; } show(h, a) { - const i = this._scheduler, d = i.$domHelpers, n = document.body, _ = this.getNode(); - if (d.isChildOf(_, n) || (this.hide(), n.appendChild(_)), this._isLikeMouseEvent(h)) { + const r = this._scheduler, d = r.$domHelpers, i = document.body, _ = this.getNode(); + if (d.isChildOf(_, i) || (this.hide(), i.appendChild(_)), this._isLikeMouseEvent(h)) { const o = this._calculateTooltipPosition(h); a = o.top, h = o.left; } - return _.style.top = a + "px", _.style.left = h + "px", i._waiAria.tooltipVisibleAttr(_), this; + return _.style.top = a + "px", _.style.left = h + "px", r._waiAria.tooltipVisibleAttr(_), this; } hide() { const h = this._scheduler, a = this.getNode(); @@ -4056,15 +4067,15 @@ class dt { return this._root || document.body; } _calculateTooltipPosition(h) { - const a = this._scheduler, i = a.$domHelpers, d = this._getViewPortSize(), n = this.getNode(), _ = { top: 0, left: 0, width: n.offsetWidth, height: n.offsetHeight, bottom: 0, right: 0 }, o = a.config.tooltip_offset_x, t = a.config.tooltip_offset_y, r = document.body, s = i.getRelativeEventPosition(h, r), c = i.getNodePosition(r); + const a = this._scheduler, r = a.$domHelpers, d = this._getViewPortSize(), i = this.getNode(), _ = { top: 0, left: 0, width: i.offsetWidth, height: i.offsetHeight, bottom: 0, right: 0 }, o = a.config.tooltip_offset_x, t = a.config.tooltip_offset_y, n = document.body, s = r.getRelativeEventPosition(h, n), c = r.getNodePosition(n); s.y += c.y, _.top = s.y, _.left = s.x, _.top += t, _.left += o, _.bottom = _.top + _.height, _.right = _.left + _.width; - const u = window.scrollY + r.scrollTop; + const u = window.scrollY + n.scrollTop; return _.top < d.top - u ? (_.top = d.top, _.bottom = _.top + _.height) : _.bottom > d.bottom && (_.bottom = d.bottom, _.top = _.bottom - _.height), _.left < d.left ? (_.left = d.left, _.right = d.left + _.width) : _.right > d.right && (_.right = d.right, _.left = _.right - _.width), s.x >= _.left && s.x <= _.right && (_.left = s.x - _.width - o, _.right = _.left + _.width), s.y >= _.top && s.y <= _.bottom && (_.top = s.y - _.height - t, _.bottom = _.top + _.height), _; } _getViewPortSize() { - const h = this._scheduler, a = h.$domHelpers, i = this._getViewPort(); - let d, n = i, _ = window.scrollY + document.body.scrollTop, o = window.scrollX + document.body.scrollLeft; - return i === h.$event_data ? (n = h.$event, _ = 0, o = 0, d = a.getNodePosition(h.$event)) : d = a.getNodePosition(n), { left: d.x + o, top: d.y + _, width: d.width, height: d.height, bottom: d.y + d.height + _, right: d.x + d.width + o }; + const h = this._scheduler, a = h.$domHelpers, r = this._getViewPort(); + let d, i = r, _ = window.scrollY + document.body.scrollTop, o = window.scrollX + document.body.scrollLeft; + return r === h.$event_data ? (i = h.$event, _ = 0, o = 0, d = a.getNodePosition(h.$event)) : d = a.getNodePosition(i), { left: d.x + o, top: d.y + _, width: d.width, height: d.height, bottom: d.y + d.height + _, right: d.x + d.width + o }; } } class _t { @@ -4079,17 +4090,17 @@ class _t { } attach(h) { let a = document.body; - const i = this._scheduler, d = i.$domHelpers; - h.global || (a = i.$root); - let n = null; + const r = this._scheduler, d = r.$domHelpers; + h.global || (a = r.$root); + let i = null; const _ = (o) => { - const t = d.getTargetNode(o), r = d.closest(t, h.selector); + const t = d.getTargetNode(o), n = d.closest(t, h.selector); if (d.isChildOf(t, this.tooltip.getNode())) return; const s = () => { - n = r, h.onmouseenter(o, r); + i = n, h.onmouseenter(o, n); }; - n ? r && r === n ? h.onmousemove(o, r) : (h.onmouseleave(o, n), n = null, r && r !== n && s()) : r && s(); + i ? n && n === i ? h.onmousemove(o, n) : (h.onmouseleave(o, i), i = null, n && n !== i && s()) : n && s(); }; this.detach(h.selector), this._domEvents.attach(a, "mousemove", _), this._listeners[h.selector] = { node: a, handler: _ }; } @@ -4098,40 +4109,40 @@ class _t { a && this._domEvents.detach(a.node, "mousemove", a.handler); } tooltipFor(h) { - const a = (i) => { - let d = i; - return document.createEventObject && !document.createEvent && (d = document.createEventObject(i)), d; + const a = (r) => { + let d = r; + return document.createEventObject && !document.createEvent && (d = document.createEventObject(r)), d; }; - this._initDelayedFunctions(), this.attach({ selector: h.selector, global: h.global, onmouseenter: (i, d) => { - const n = h.html(i, d); - n && this.delayShow(a(i), n); - }, onmousemove: (i, d) => { - const n = h.html(i, d); - n ? this.delayShow(a(i), n) : (this.delayShow.$cancelTimeout(), this.delayHide()); + this._initDelayedFunctions(), this.attach({ selector: h.selector, global: h.global, onmouseenter: (r, d) => { + const i = h.html(r, d); + i && this.delayShow(a(r), i); + }, onmousemove: (r, d) => { + const i = h.html(r, d); + i ? this.delayShow(a(r), i) : (this.delayShow.$cancelTimeout(), this.delayHide()); }, onmouseleave: () => { this.delayShow.$cancelTimeout(), this.delayHide(); } }); } _initDelayedFunctions() { const h = this._scheduler; - this.delayShow && this.delayShow.$cancelTimeout(), this.delayHide && this.delayHide.$cancelTimeout(), this.tooltip.hide(), this.delayShow = I.delay((a, i) => { - h.callEvent("onBeforeTooltip", [a]) === !1 ? this.tooltip.hide() : (this.tooltip.setContent(i), this.tooltip.show(a)); - }, h.config.tooltip_timeout || 1), this.delayHide = I.delay(() => { + this.delayShow && this.delayShow.$cancelTimeout(), this.delayHide && this.delayHide.$cancelTimeout(), this.tooltip.hide(), this.delayShow = V.delay((a, r) => { + h.callEvent("onBeforeTooltip", [a]) === !1 ? this.tooltip.hide() : (this.tooltip.setContent(r), this.tooltip.show(a)); + }, h.config.tooltip_timeout || 1), this.delayHide = V.delay(() => { this.delayShow.$cancelTimeout(), this.tooltip.hide(); }, h.config.tooltip_hide_timeout || 1); } } const lt = { active_links: function(e) { e.config.active_link_view = "day", e._active_link_click = function(h) { - var a = h.target.getAttribute("data-link-date"), i = e.date.str_to_date(e.config.api_date, !1, !0); + var a = h.target.getAttribute("data-link-date"), r = e.date.str_to_date(e.config.api_date, !1, !0); if (a) - return e.setCurrentView(i(a), e.config.active_link_view), h && h.preventDefault && h.preventDefault(), !1; + return e.setCurrentView(r(a), e.config.active_link_view), h && h.preventDefault && h.preventDefault(), !1; }, e.attachEvent("onTemplatesReady", function() { - var h = function(i, d) { - d = d || i + "_scale_date", e.templates["_active_links_old_" + d] || (e.templates["_active_links_old_" + d] = e.templates[d]); - var n = e.templates["_active_links_old_" + d], _ = e.date.date_to_str(e.config.api_date); + var h = function(r, d) { + d = d || r + "_scale_date", e.templates["_active_links_old_" + d] || (e.templates["_active_links_old_" + d] = e.templates[d]); + var i = e.templates["_active_links_old_" + d], _ = e.date.date_to_str(e.config.api_date); e.templates[d] = function(o) { - return "" + n(o) + ""; + return "" + i(o) + ""; }; }; if (h("week"), h("", "month_day"), this.matrix) @@ -4142,10 +4153,10 @@ const lt = { active_links: function(e) { }, agenda_legacy: function(e) { e.date.add_agenda_legacy = function(h) { return e.date.add(h, 1, "year"); - }, e.templates.agenda_legacy_time = function(h, a, i) { - return i._timed ? this.day_date(i.start_date, i.end_date, i) + " " + this.event_date(h) : e.templates.day_date(h) + " – " + e.templates.day_date(a); - }, e.templates.agenda_legacy_text = function(h, a, i) { - return i.text; + }, e.templates.agenda_legacy_time = function(h, a, r) { + return r._timed ? this.day_date(r.start_date, r.end_date, r) + " " + this.event_date(h) : e.templates.day_date(h) + " – " + e.templates.day_date(a); + }, e.templates.agenda_legacy_text = function(h, a, r) { + return r.text; }, e.templates.agenda_legacy_date = function() { return ""; }, e.date.agenda_legacy_start = function() { @@ -4159,24 +4170,24 @@ const lt = { active_links: function(e) { return h.apply(this, arguments); }; var a = e.render_data; - e.render_data = function(n) { + e.render_data = function(i) { if (this._mode != "agenda_legacy") return a.apply(this, arguments); d(); }; - var i = e.render_view_data; + var r = e.render_view_data; function d() { - var n = e.get_visible_events(); - n.sort(function(g, p) { + var i = e.get_visible_events(); + i.sort(function(g, p) { return g.start_date > p.start_date ? 1 : -1; }); - for (var _, o = "
", t = 0; t < n.length; t++) { - var r = n[t], s = r.color ? "--dhx-scheduler-event-background:" + r.color + ";" : "", c = r.textColor ? "--dhx-scheduler-event-color:" + r.textColor + ";" : "", u = e.templates.event_class(r.start_date, r.end_date, r); - _ = e._waiAria.agendaEventAttrString(r); + for (var _, o = "
", t = 0; t < i.length; t++) { + var n = i[t], s = n.color ? "--dhx-scheduler-event-background:" + n.color + ";" : "", c = n.textColor ? "--dhx-scheduler-event-color:" + n.textColor + ";" : "", u = e.templates.event_class(n.start_date, n.end_date, n); + _ = e._waiAria.agendaEventAttrString(n); var v = e._waiAria.agendaDetailsBtnString(); - o += "
" + (e.config.rtl ? e.templates.agenda_time(r.end_date, r.start_date, r) : e.templates.agenda_time(r.start_date, r.end_date, r)) + "
", o += `
+ o += "
" + (e.config.rtl ? e.templates.agenda_time(n.end_date, n.start_date, n) : e.templates.agenda_time(n.start_date, n.end_date, n)) + "
", o += `
-
`, o += "" + e.templates.agenda_text(r.start_date, r.end_date, r) + "
"; +
`, o += "" + e.templates.agenda_text(n.start_date, n.end_date, n) + "
"; } o += "
", e._els.dhx_cal_data[0].innerHTML = o, e._els.dhx_cal_data[0].childNodes[0].scrollTop = e._agendaScrollTop || 0; var m = e._els.dhx_cal_data[0].childNodes[0]; @@ -4186,34 +4197,34 @@ const lt = { active_links: function(e) { e._rendered[t] = l[t]; } e.render_view_data = function() { - return this._mode == "agenda_legacy" && (e._agendaScrollTop = e._els.dhx_cal_data[0].childNodes[0].scrollTop, e._els.dhx_cal_data[0].childNodes[0].scrollTop = 0), i.apply(this, arguments); - }, e.agenda_legacy_view = function(n) { + return this._mode == "agenda_legacy" && (e._agendaScrollTop = e._els.dhx_cal_data[0].childNodes[0].scrollTop, e._els.dhx_cal_data[0].childNodes[0].scrollTop = 0), r.apply(this, arguments); + }, e.agenda_legacy_view = function(i) { e._min_date = e.config.agenda_start || e.date.agenda_legacy_start(e._date), e._max_date = e.config.agenda_end || e.date.add_agenda_legacy(e._min_date, 1), function(_) { if (_) { - var o = e.locale.labels, t = e._waiAria.agendaHeadAttrString(), r = e._waiAria.agendaHeadDateString(o.date), s = e._waiAria.agendaHeadDescriptionString(o.description); - e._els.dhx_cal_header[0].innerHTML = "
" + o.date + "
" + o.description + "
", e._table_view = !0, e.set_sizes(); + var o = e.locale.labels, t = e._waiAria.agendaHeadAttrString(), n = e._waiAria.agendaHeadDateString(o.date), s = e._waiAria.agendaHeadDescriptionString(o.description); + e._els.dhx_cal_header[0].innerHTML = "
" + o.date + "
" + o.description + "
", e._table_view = !0, e.set_sizes(); } - }(n), n ? (e._cols = null, e._colsS = null, e._table_view = !0, d()) : e._table_view = !1; + }(i), i ? (e._cols = null, e._colsS = null, e._table_view = !0, d()) : e._table_view = !1; }; }); }, agenda_view: function(e) { - e.date.add_agenda = function(d, n) { - return e.date.add(d, 1 * n, "month"); - }, e.templates.agenda_time = function(d, n, _) { - return _._timed ? `${this.event_date(d)} - ${this.event_date(n)}` : e.locale.labels.full_day; - }, e.templates.agenda_text = function(d, n, _) { + e.date.add_agenda = function(d, i) { + return e.date.add(d, 1 * i, "month"); + }, e.templates.agenda_time = function(d, i, _) { + return _._timed ? `${this.event_date(d)} - ${this.event_date(i)}` : e.locale.labels.full_day; + }, e.templates.agenda_text = function(d, i, _) { return _.text; }; const h = e.date.date_to_str("%F %j"), a = e.date.date_to_str("%l"); e.templates.agenda_day = function(d) { return `
${h(d)}
${a(d)}
`; - }, e.templates.agenda_date = function(d, n) { + }, e.templates.agenda_date = function(d, i) { return e.templates.month_date(e.getState().date); }, e.date.agenda_start = function(d) { return e.date.month_start(new Date(d)); }; - let i = 0; + let r = 0; e.attachEvent("onTemplatesReady", function() { var d = e.dblclick_dhx_cal_data; e.dblclick_dhx_cal_data = function() { @@ -4222,17 +4233,17 @@ const lt = { active_links: function(e) { else if (d) return d.apply(this, arguments); }; - var n = e.render_data; - e.render_data = function(r) { + var i = e.render_data; + e.render_data = function(n) { if (this._mode != "agenda") - return n.apply(this, arguments); + return i.apply(this, arguments); o(); }; var _ = e.render_view_data; function o() { - const r = e.get_visible_events(); - r.sort(function(m, l) { - return m.start_date > l.start_date ? 1 : -1; + const n = e.get_visible_events(); + n.sort(function(f, g) { + return f.start_date > g.start_date ? 1 : -1; }); const s = {}; let c = e.getState().min_date; @@ -4240,25 +4251,29 @@ const lt = { active_links: function(e) { for (; c.valueOf() < u.valueOf(); ) s[c.valueOf()] = [], c = e.date.add(c, 1, "day"); let v = !1; - if (r.forEach((m) => { - let l = e.date.day_start(new Date(m.start_date)); - for (; l.valueOf() < m.end_date.valueOf(); ) - s[l.valueOf()] && (s[l.valueOf()].push(m), v = !0), l = e.date.day_start(e.date.add(l, 1, "day")); + if (n.forEach((f) => { + let g = e.date.day_start(new Date(f.start_date)); + for (; g.valueOf() < f.end_date.valueOf(); ) + s[g.valueOf()] && (s[g.valueOf()].push(f), v = !0), g = e.date.day_start(e.date.add(g, 1, "day")); }), v) { - let m = ""; - for (let l in s) - m += t(new Date(1 * l), s[l]); - e._els.dhx_cal_data[0].innerHTML = m; + let f = ""; + for (let g in s) + f += t(new Date(1 * g), s[g]); + e._els.dhx_cal_data[0].innerHTML = f; } else e._els.dhx_cal_data[0].innerHTML = `
${e.locale.labels.agenda_tab}
`; - e._els.dhx_cal_data[0].scrollTop = i; + e._els.dhx_cal_data[0].scrollTop = r; + let m = e._els.dhx_cal_data[0].querySelectorAll(".dhx_cal_agenda_event_line"); + e._rendered = []; + for (var l = 0; l < m.length - 1; l++) + e._rendered[l] = m[l]; } - function t(r, s) { + function t(n, s) { if (!s.length) return ""; let c = `
-
${e.templates.agenda_day(r)}
+
${e.templates.agenda_day(n)}
`; return s.forEach((u) => { @@ -4274,9 +4289,9 @@ const lt = { active_links: function(e) { }), c += "
", c; } e.render_view_data = function() { - return this._mode == "agenda" && (i = e._els.dhx_cal_data[0].scrollTop, e._els.dhx_cal_data[0].scrollTop = 0), _.apply(this, arguments); - }, e.agenda_view = function(r) { - r ? (e._min_date = e.config.agenda_start || e.date.agenda_start(e._date), e._max_date = e.config.agenda_end || e.date.add_agenda(e._min_date, 1), e._cols = null, e._colsS = null, e._table_view = !0, e._getNavDateElement().innerHTML = e.templates.agenda_date(e._date), o()) : e._table_view = !1; + return this._mode == "agenda" && (r = e._els.dhx_cal_data[0].scrollTop, e._els.dhx_cal_data[0].scrollTop = 0), _.apply(this, arguments); + }, e.agenda_view = function(n) { + n ? (e._min_date = e.config.agenda_start || e.date.agenda_start(e._date), e._max_date = e.config.agenda_end || e.date.add_agenda(e._min_date, 1), e._cols = null, e._colsS = null, e._table_view = !0, e._getNavDateElement().innerHTML = e.templates.agenda_date(e._date), o()) : e._table_view = !1; }; }); }, all_timed: function(e) { @@ -4285,34 +4300,34 @@ const lt = { active_links: function(e) { return !((o.end_date - o.start_date) / 36e5 >= 24) || e._drag_mode == "resize" && e._drag_id == o.id; }; e._safe_copy = function(o) { - var t = null, r = e._copy_event(o); - return o.event_pid && (t = e.getEvent(o.event_pid)), t && t.isPrototypeOf(o) && (delete r.event_length, delete r.event_pid, delete r.rec_pattern, delete r.rec_type), r; + var t = null, n = e._copy_event(o); + return o.event_pid && (t = e.getEvent(o.event_pid)), t && t.isPrototypeOf(o) && (delete n.event_length, delete n.event_pid, delete n.rec_pattern, delete n.rec_type), n; }; - var a = e._pre_render_events_line, i = e._pre_render_events_table, d = function(o, t) { - return this._table_view ? i.call(this, o, t) : a.call(this, o, t); + var a = e._pre_render_events_line, r = e._pre_render_events_table, d = function(o, t) { + return this._table_view ? r.call(this, o, t) : a.call(this, o, t); }; e._pre_render_events_line = e._pre_render_events_table = function(o, t) { if (!this.config.all_timed || this._table_view && this._mode != "month" || this._mode == "month" && !this.config.all_timed_month) return d.call(this, o, t); - for (var r = 0; r < o.length; r++) { - var s = o[r]; + for (var n = 0; n < o.length; n++) { + var s = o[n]; if (!s._timed) if (this.config.all_timed != "short" || h(s)) { var c = this._safe_copy(s); s._virtual ? c._first_chunk = !1 : c._first_chunk = !0, c._drag_resize = !1, c._virtual = !0, c.start_date = new Date(c.start_date), l(s) ? (c.end_date = f(c.start_date), this.config.last_hour != 24 && (c.end_date = g(c.start_date, this.config.last_hour))) : c.end_date = new Date(s.end_date); var u = !1; - c.start_date < this._max_date && c.end_date > this._min_date && c.start_date < c.end_date && (o[r] = c, u = !0); + c.start_date < this._max_date && c.end_date > this._min_date && c.start_date < c.end_date && (o[n] = c, u = !0); var v = this._safe_copy(s); if (v._virtual = !0, v.end_date = new Date(v.end_date), v.start_date < this._min_date ? v.start_date = g(this._min_date, this.config.first_hour) : v.start_date = g(f(s.start_date), this.config.first_hour), v.start_date < this._max_date && v.start_date < v.end_date) { if (!u) { - o[r--] = v; + o[n--] = v; continue; } - o.splice(r + 1, 0, v), v._last_chunk = !1; + o.splice(n + 1, 0, v), v._last_chunk = !1; } else c._last_chunk = !0, c._drag_resize = !0; } else - this._mode != "month" && o.splice(r--, 1); + this._mode != "month" && o.splice(n--, 1); } var m = this._drag_mode != "move" && t; return d.call(this, o, m); @@ -4329,64 +4344,64 @@ const lt = { active_links: function(e) { return w.setHours(y), w; } }; - var n = e.get_visible_events; + var i = e.get_visible_events; e.get_visible_events = function(o) { - return this.config.all_timed && this.config.multi_day ? n.call(this, !1) : n.call(this, o); - }, e.attachEvent("onBeforeViewChange", function(o, t, r, s) { - return e._allow_dnd = r == "day" || r == "week" || e.getView(r), !0; + return this.config.all_timed && this.config.multi_day ? i.call(this, !1) : i.call(this, o); + }, e.attachEvent("onBeforeViewChange", function(o, t, n, s) { + return e._allow_dnd = n == "day" || n == "week" || e.getView(n), !0; }), e._is_main_area_event = function(o) { return !!(o._timed || this.config.all_timed === !0 || this.config.all_timed == "short" && h(o)); }; var _ = e.updateEvent; e.updateEvent = function(o) { - var t, r, s = e.getEvent(o); - s && (t = e.config.all_timed && !(e.isOneDayEvent(e._events[o]) || e.getState().drag_id)) && (r = e.config.update_render, e.config.update_render = !0), _.apply(e, arguments), s && t && (e.config.update_render = r); + var t, n, s = e.getEvent(o); + s && (t = e.config.all_timed && !(e.isOneDayEvent(e._events[o]) || e.getState().drag_id)) && (n = e.config.update_render, e.config.update_render = !0), _.apply(e, arguments), s && t && (e.config.update_render = n); }; }, collision: function(e) { var h, a; - function i(d) { + function r(d) { e._get_section_view() && d && (h = e.getEvent(d)[e._get_section_property()]); } e.config.collision_limit = 1, e.attachEvent("onBeforeDrag", function(d) { - return i(d), !0; + return r(d), !0; }), e.attachEvent("onBeforeLightbox", function(d) { - var n = e.getEvent(d); - return a = [n.start_date, n.end_date], i(d), !0; + var i = e.getEvent(d); + return a = [i.start_date, i.end_date], r(d), !0; }), e.attachEvent("onEventChanged", function(d) { if (!d || !e.getEvent(d)) return !0; - var n = e.getEvent(d); - if (!e.checkCollision(n)) { + var i = e.getEvent(d); + if (!e.checkCollision(i)) { if (!a) return !1; - n.start_date = a[0], n.end_date = a[1], n._timed = this.isOneDayEvent(n); + i.start_date = a[0], i.end_date = a[1], i._timed = this.isOneDayEvent(i); } return !0; - }), e.attachEvent("onBeforeEventChanged", function(d, n, _) { + }), e.attachEvent("onBeforeEventChanged", function(d, i, _) { return e.checkCollision(d); - }), e.attachEvent("onEventAdded", function(d, n) { - e.checkCollision(n) || e.deleteEvent(d); - }), e.attachEvent("onEventSave", function(d, n, _) { - if ((n = e._lame_clone(n)).id = d, !n.start_date || !n.end_date) { + }), e.attachEvent("onEventAdded", function(d, i) { + e.checkCollision(i) || e.deleteEvent(d); + }), e.attachEvent("onEventSave", function(d, i, _) { + if ((i = e._lame_clone(i)).id = d, !i.start_date || !i.end_date) { var o = e.getEvent(d); - n.start_date = new Date(o.start_date), n.end_date = new Date(o.end_date); + i.start_date = new Date(o.start_date), i.end_date = new Date(o.end_date); } - return n.rec_type && e._roll_back_dates(n), e.checkCollision(n); - }), e._check_sections_collision = function(d, n) { + return i.rec_type && e._roll_back_dates(i), e.checkCollision(i); + }), e._check_sections_collision = function(d, i) { var _ = e._get_section_property(); - return d[_] == n[_] && d.id != n.id; + return d[_] == i[_] && d.id != i.id; }, e.checkCollision = function(d) { - var n = [], _ = e.config.collision_limit; + var i = [], _ = e.config.collision_limit; if (d.rec_type) for (var o = e.getRecDates(d), t = 0; t < o.length; t++) - for (var r = e.getEvents(o[t].start_date, o[t].end_date), s = 0; s < r.length; s++) - (r[s].event_pid || r[s].id) != d.id && n.push(r[s]); + for (var n = e.getEvents(o[t].start_date, o[t].end_date), s = 0; s < n.length; s++) + (n[s].event_pid || n[s].id) != d.id && i.push(n[s]); else { - n = e.getEvents(d.start_date, d.end_date); - for (var c = 0; c < n.length; c++) { - var u = n[c]; + i = e.getEvents(d.start_date, d.end_date); + for (var c = 0; c < i.length; c++) { + var u = i[c]; if (u.id == d.id || u.event_length && [u.event_pid, u.event_length].join("#") == d.id) { - n.splice(c, 1); + i.splice(c, 1); break; } } @@ -4394,20 +4409,20 @@ const lt = { active_links: function(e) { var v = e._get_section_view(), m = e._get_section_property(), l = !0; if (v) { var f = 0; - for (c = 0; c < n.length; c++) - n[c].id != d.id && this._check_sections_collision(n[c], d) && f++; + for (c = 0; c < i.length; c++) + i[c].id != d.id && this._check_sections_collision(i[c], d) && f++; f >= _ && (l = !1); } else - n.length >= _ && (l = !1); + i.length >= _ && (l = !1); if (!l) { - var g = !e.callEvent("onEventCollision", [d, n]); + var g = !e.callEvent("onEventCollision", [d, i]); return g || (d[m] = h || d[m]), g; } return l; }; }, container_autoresize: function(e) { e.config.container_autoresize = !0, e.config.month_day_min_height = 90, e.config.min_grid_size = 25, e.config.min_map_size = 400; - var h = e._pre_render_events, a = !0, i = 0, d = 0; + var h = e._pre_render_events, a = !0, r = 0, d = 0; e._pre_render_events = function(s, c) { if (!e.config.container_autoresize || !a) return h.apply(this, arguments); @@ -4432,7 +4447,7 @@ const lt = { active_links: function(e) { m.unshift(0), f.parentNode.offsetHeight < f.parentNode.scrollHeight && f._h_fix; } else if (s.length || this._els.dhx_multi_day[0].style.visibility != "visible" || (m[0] = -1), s.length || m[0] == -1) { var b = (m[0] + 1) * u + 1; - d != b + 1 && (this._obj.style.height = i - d + b - 1 + "px"), b += "px"; + d != b + 1 && (this._obj.style.height = r - d + b - 1 + "px"), b += "px"; const D = this._els.dhx_cal_navline[0].offsetHeight, x = this._els.dhx_cal_header[0].offsetHeight; l.style.height = this._obj.offsetHeight - D - x - (this.xy.margin_top || 0) + "px"; var k = this._els.dhx_multi_day[0]; @@ -4441,10 +4456,10 @@ const lt = { active_links: function(e) { } return s; }; - var n = ["dhx_cal_navline", "dhx_cal_header", "dhx_multi_day", "dhx_cal_data"], _ = function(s) { - i = 0; - for (var c = 0; c < n.length; c++) { - var u = n[c], v = e._els[u] ? e._els[u][0] : null, m = 0; + var i = ["dhx_cal_navline", "dhx_cal_header", "dhx_multi_day", "dhx_cal_data"], _ = function(s) { + r = 0; + for (var c = 0; c < i.length; c++) { + var u = i[c], v = e._els[u] ? e._els[u][0] : null, m = 0; switch (u) { case "dhx_cal_navline": case "dhx_cal_header": @@ -4499,15 +4514,15 @@ const lt = { active_links: function(e) { m = 0; for (var x = e.matrix[l], S = x.y_unit, N = 0; N < S.length; N++) m += x.getSectionHeight(S[N].key); - e.$container.clientWidth != e.$container.scrollWidth && (m += r()); + e.$container.clientWidth != e.$container.scrollWidth && (m += n()); } m -= 1; } (l == "day" || l == "week" || e._props && e._props[l]) && (m += 2); } - i += m += 1; + r += m += 1; } - e._obj.style.height = i + "px", s || e.updateView(); + e._obj.style.height = r + "px", s || e.updateView(); }; function o() { a = !1, e.callEvent("onAfterSchedulerResize", []), a = !0; @@ -4525,7 +4540,7 @@ const lt = { active_links: function(e) { !e.$destroyed && e.$initialized && (_(!0), document.documentElement.scrollTop = u, o()); }, 1) : o(); }; - function r() { + function n() { var s = document.createElement("div"); s.style.cssText = "visibility:hidden;position:absolute;left:-1000px;width:100px;padding:0px;margin:0px;height:110px;min-height:100px;overflow-y:scroll;", document.body.appendChild(s); var c = s.offsetWidth - s.clientWidth; @@ -4549,12 +4564,12 @@ const lt = { active_links: function(e) { return (d._obj.id || "scheduler") + "_settings"; } var a = !0; - e.attachEvent("onBeforeViewChange", function(d, n, _, o) { + e.attachEvent("onBeforeViewChange", function(d, i, _, o) { if (a && e._get_url_nav) { var t = e._get_url_nav(); (t.date || t.mode || t.event) && (a = !1); } - var r = h(e); + var n = h(e); if (a) { a = !1; var s = function(u) { @@ -4568,7 +4583,7 @@ const lt = { active_links: function(e) { } } return ""; - }(r); + }(n); if (s) { e._min_date || (e._min_date = o), (s = unescape(s).split("@"))[0] = this._helpers.parseDate(s[0]); var c = this.isViewExists(s[1]) ? s[1] : _; @@ -4578,19 +4593,19 @@ const lt = { active_links: function(e) { } } return !0; - }), e.attachEvent("onViewChange", function(d, n) { - var _, o, t = h(e), r = escape(this._helpers.formatDate(n) + "@" + d); - o = t + "=" + r + ((_ = "expires=Sun, 31 Jan 9999 22:00:00 GMT") ? "; " + _ : ""), document.cookie = o; + }), e.attachEvent("onViewChange", function(d, i) { + var _, o, t = h(e), n = escape(this._helpers.formatDate(i) + "@" + d); + o = t + "=" + n + ((_ = "expires=Sun, 31 Jan 9999 22:00:00 GMT") ? "; " + _ : ""), document.cookie = o; }); - var i = e._load; + var r = e._load; e._load = function() { var d = arguments; if (e._date) - i.apply(this, d); + r.apply(this, d); else { - var n = this; + var i = this; window.setTimeout(function() { - i.apply(n, d); + r.apply(i, d); }, 1); } }; @@ -4603,7 +4618,7 @@ const lt = { active_links: function(e) { h.cached_options || (h.cached_options = {}); var a = ""; return a += "
"; - }, set_value: function(h, a, i, d) { + }, set_value: function(h, a, r, d) { (function() { v(); var u = e.attachEvent("onAfterLightbox", function() { @@ -4616,67 +4631,67 @@ const lt = { active_links: function(e) { } } })(), window.dhx_globalImgPath = d.image_path || "/", h._combo = new dhtmlXCombo(h, d.name, h.offsetWidth - 8), d.onchange && h._combo.attachEvent("onChange", d.onchange), d.options_height && h._combo.setOptionHeight(d.options_height); - var n = h._combo; - if (n.enableFilteringMode(d.filtering, d.script_path || null, !!d.cache), d.script_path) { - var _ = i[d.map_to]; - _ ? d.cached_options[_] ? (n.addOption(_, d.cached_options[_]), n.disable(1), n.selectOption(0), n.disable(0)) : e.ajax.get(d.script_path + "?id=" + _ + "&uid=" + e.uid(), function(u) { + var i = h._combo; + if (i.enableFilteringMode(d.filtering, d.script_path || null, !!d.cache), d.script_path) { + var _ = r[d.map_to]; + _ ? d.cached_options[_] ? (i.addOption(_, d.cached_options[_]), i.disable(1), i.selectOption(0), i.disable(0)) : e.ajax.get(d.script_path + "?id=" + _ + "&uid=" + e.uid(), function(u) { var v, m = u.xmlDoc.responseText; try { v = JSON.parse(m).options[0].text; } catch { v = e.ajax.xpath("//option", u.xmlDoc)[0].childNodes[0].nodeValue; } - d.cached_options[_] = v, n.addOption(_, v), n.disable(1), n.selectOption(0), n.disable(0); - }) : n.setComboValue(""); + d.cached_options[_] = v, i.addOption(_, v), i.disable(1), i.selectOption(0), i.disable(0); + }) : i.setComboValue(""); } else { for (var o = [], t = 0; t < d.options.length; t++) { - var r = d.options[t], s = [r.key, r.label, r.css]; + var n = d.options[t], s = [n.key, n.label, n.css]; o.push(s); } - if (n.addOption(o), i[d.map_to]) { - var c = n.getIndexByValue(i[d.map_to]); - n.selectOption(c); + if (i.addOption(o), r[d.map_to]) { + var c = i.getIndexByValue(r[d.map_to]); + i.selectOption(c); } } - }, get_value: function(h, a, i) { + }, get_value: function(h, a, r) { var d = h._combo.getSelectedValue(); - return i.script_path && (i.cached_options[d] = h._combo.getSelectedText()), d; + return r.script_path && (r.cached_options[d] = h._combo.getSelectedText()), d; }, focus: function(h) { } }, e.form_blocks.radio = { render: function(h) { var a = ""; a += `
`; - for (var i = 0; i < h.options.length; i++) { + for (var r = 0; r < h.options.length; r++) { var d = e.uid(); - a += ""; + a += ""; } return a += "
"; - }, set_value: function(h, a, i, d) { - for (var n = h.getElementsByTagName("input"), _ = 0; _ < n.length; _++) { - n[_].checked = !1; - var o = i[d.map_to] || a; - n[_].value == o && (n[_].checked = !0); - } - }, get_value: function(h, a, i) { - for (var d = h.getElementsByTagName("input"), n = 0; n < d.length; n++) - if (d[n].checked) - return d[n].value; + }, set_value: function(h, a, r, d) { + for (var i = h.getElementsByTagName("input"), _ = 0; _ < i.length; _++) { + i[_].checked = !1; + var o = r[d.map_to] || a; + i[_].value == o && (i[_].checked = !0); + } + }, get_value: function(h, a, r) { + for (var d = h.getElementsByTagName("input"), i = 0; i < d.length; i++) + if (d[i].checked) + return d[i].value; }, focus: function(h) { } }, e.form_blocks.checkbox = { render: function(h) { return e.config.wide_form ? '
' : ""; - }, set_value: function(h, a, i, d) { + }, set_value: function(h, a, r, d) { h = e._lightbox.querySelector(`#${d.id}`); - var n = e.uid(), _ = d.checked_value !== void 0 ? a == d.checked_value : !!a; + var i = e.uid(), _ = d.checked_value !== void 0 ? a == d.checked_value : !!a; h.className += " dhx_cal_checkbox"; - var o = "", t = ""; + var o = "", t = ""; if (e.config.wide_form ? (h.innerHTML = t, h.nextSibling.innerHTML = o) : h.innerHTML = o + t, d.handler) { - var r = h.getElementsByTagName("input")[0]; - if (r.$_eventAttached) + var n = h.getElementsByTagName("input")[0]; + if (n.$_eventAttached) return; - r.$_eventAttached = !0, e.event(r, "click", d.handler); + n.$_eventAttached = !0, e.event(n, "click", d.handler); } - }, get_value: function(h, a, i) { - var d = (h = e._lightbox.querySelector(`#${i.id}`)).getElementsByTagName("input")[0]; - return d || (d = h.nextSibling.getElementsByTagName("input")[0]), d.checked ? i.checked_value || !0 : i.unchecked_value || !1; + }, get_value: function(h, a, r) { + var d = (h = e._lightbox.querySelector(`#${r.id}`)).getElementsByTagName("input")[0]; + return d || (d = h.nextSibling.getElementsByTagName("input")[0]), d.checked ? r.checked_value || !0 : r.unchecked_value || !1; }, focus: function(h) { } }; }, expand: function(e) { @@ -4718,95 +4733,95 @@ const lt = { active_links: function(e) { }), e._maximize = function() { this.expanded = !this.expanded, this.expanded ? this.ext.fullscreen.toggleIcon.classList.add("dhx_expand_icon--expanded") : this.ext.fullscreen.toggleIcon.classList.remove("dhx_expand_icon--expanded"); for (var h = ["left", "top"], a = 0; a < h.length; a++) { - var i = e["_prev_margin_" + h[a]]; - e.xy["margin_" + h[a]] ? (e["_prev_margin_" + h[a]] = e.xy["margin_" + h[a]], e.xy["margin_" + h[a]] = 0) : i && (e.xy["margin_" + h[a]] = e["_prev_margin_" + h[a]], delete e["_prev_margin_" + h[a]]); + var r = e["_prev_margin_" + h[a]]; + e.xy["margin_" + h[a]] ? (e["_prev_margin_" + h[a]] = e.xy["margin_" + h[a]], e.xy["margin_" + h[a]] = 0) : r && (e.xy["margin_" + h[a]] = e["_prev_margin_" + h[a]], delete e["_prev_margin_" + h[a]]); } e.setCurrentView(); }; }, export_api: function(e) { (function() { - function h(i, d) { - for (var n in d) - i[n] || (i[n] = d[n]); - return i; + function h(r, d) { + for (var i in d) + r[i] || (r[i] = d[i]); + return r; } - function a(i, d) { - var n = {}; - return (i = d._els[i]) && i[0] ? (n.x = i[0].scrollWidth, n.y = i[0].scrollHeight) : (n.x = 0, n.y = 0), n; + function a(r, d) { + var i = {}; + return (r = d._els[r]) && r[0] ? (i.x = r[0].scrollWidth, i.y = r[0].scrollHeight) : (i.x = 0, i.y = 0), i; } - window.dhtmlxAjax || (window.dhtmlxAjax = { post: function(i, d, n) { - return window.dhx4.ajax.post(i, d, n); - }, get: function(i, d) { - return window.ajax.get(i, d); - } }), function(i) { + window.dhtmlxAjax || (window.dhtmlxAjax = { post: function(r, d, i) { + return window.dhx4.ajax.post(r, d, i); + }, get: function(r, d) { + return window.ajax.get(r, d); + } }), function(r) { function d() { - var n = i.getState().mode; - return i.matrix && i.matrix[n] ? i.matrix[n] : null; - } - i.exportToPDF = function(n) { - (n = h(n || {}, { name: "calendar.pdf", format: "A4", orientation: "landscape", dpi: 96, zoom: 1, rtl: i.config.rtl })).html = this._export_html(n), n.mode = this.getState().mode, this._send_to_export(n, "pdf"); - }, i.exportToPNG = function(n) { - (n = h(n || {}, { name: "calendar.png", format: "A4", orientation: "landscape", dpi: 96, zoom: 1, rtl: i.config.rtl })).html = this._export_html(n), n.mode = this.getState().mode, this._send_to_export(n, "png"); - }, i.exportToICal = function(n) { - n = h(n || {}, { name: "calendar.ical", data: this._serialize_plain(null, n) }), this._send_to_export(n, "ical"); - }, i.exportToExcel = function(n) { - n = h(n || {}, { name: "calendar.xlsx", title: "Events", data: this._serialize_plain(this.templates.xml_format, n), columns: this._serialize_columns() }), this._send_to_export(n, "excel"); - }, i._ajax_to_export = function(n, _, o) { - delete n.callback; - var t = n.server || "https://export.dhtmlx.com/scheduler"; - window.dhtmlxAjax.post(t, "type=" + _ + "&store=1&data=" + encodeURIComponent(JSON.stringify(n)), function(r) { + var i = r.getState().mode; + return r.matrix && r.matrix[i] ? r.matrix[i] : null; + } + r.exportToPDF = function(i) { + (i = h(i || {}, { name: "calendar.pdf", format: "A4", orientation: "landscape", dpi: 96, zoom: 1, rtl: r.config.rtl })).html = this._export_html(i), i.mode = this.getState().mode, this._send_to_export(i, "pdf"); + }, r.exportToPNG = function(i) { + (i = h(i || {}, { name: "calendar.png", format: "A4", orientation: "landscape", dpi: 96, zoom: 1, rtl: r.config.rtl })).html = this._export_html(i), i.mode = this.getState().mode, this._send_to_export(i, "png"); + }, r.exportToICal = function(i) { + i = h(i || {}, { name: "calendar.ical", data: this._serialize_plain(null, i) }), this._send_to_export(i, "ical"); + }, r.exportToExcel = function(i) { + i = h(i || {}, { name: "calendar.xlsx", title: "Events", data: this._serialize_plain(this.templates.xml_format, i), columns: this._serialize_columns() }), this._send_to_export(i, "excel"); + }, r._ajax_to_export = function(i, _, o) { + delete i.callback; + var t = i.server || "https://export.dhtmlx.com/scheduler"; + window.dhtmlxAjax.post(t, "type=" + _ + "&store=1&data=" + encodeURIComponent(JSON.stringify(i)), function(n) { var s = null; - if (!(r.xmlDoc.status > 400)) + if (!(n.xmlDoc.status > 400)) try { - s = JSON.parse(r.xmlDoc.responseText); + s = JSON.parse(n.xmlDoc.responseText); } catch { } o(s); }); - }, i._plain_export_copy = function(n, _) { + }, r._plain_export_copy = function(i, _) { var o = {}; - for (var t in n) - o[t] = n[t]; - return o.start_date = _(o.start_date), o.end_date = _(o.end_date), o.$text = this.templates.event_text(n.start_date, n.end_date, n), o; - }, i._serialize_plain = function(n, _) { + for (var t in i) + o[t] = i[t]; + return o.start_date = _(o.start_date), o.end_date = _(o.end_date), o.$text = this.templates.event_text(i.start_date, i.end_date, i), o; + }, r._serialize_plain = function(i, _) { var o; - n = n || i.date.date_to_str("%Y%m%dT%H%i%s", !0), o = _ && _.start && _.end ? i.getEvents(_.start, _.end) : i.getEvents(); - for (var t = [], r = 0; r < o.length; r++) - t[r] = this._plain_export_copy(o[r], n); + i = i || r.date.date_to_str("%Y%m%dT%H%i%s", !0), o = _ && _.start && _.end ? r.getEvents(_.start, _.end) : r.getEvents(); + for (var t = [], n = 0; n < o.length; n++) + t[n] = this._plain_export_copy(o[n], i); return t; - }, i._serialize_columns = function() { + }, r._serialize_columns = function() { return [{ id: "start_date", header: "Start Date", width: 30 }, { id: "end_date", header: "End Date", width: 30 }, { id: "$text", header: "Text", width: 100 }]; - }, i._send_to_export = function(n, _) { - if (n.version || (n.version = i.version), n.skin || (n.skin = i.skin), n.callback) - return i._ajax_to_export(n, _, n.callback); + }, r._send_to_export = function(i, _) { + if (i.version || (i.version = r.version), i.skin || (i.skin = r.skin), i.callback) + return r._ajax_to_export(i, _, i.callback); var o = this._create_hidden_form(); - o.firstChild.action = n.server || "https://export.dhtmlx.com/scheduler", o.firstChild.childNodes[0].value = JSON.stringify(n), o.firstChild.childNodes[1].value = _, o.firstChild.submit(); - }, i._create_hidden_form = function() { + o.firstChild.action = i.server || "https://export.dhtmlx.com/scheduler", o.firstChild.childNodes[0].value = JSON.stringify(i), o.firstChild.childNodes[1].value = _, o.firstChild.submit(); + }, r._create_hidden_form = function() { if (!this._hidden_export_form) { - var n = this._hidden_export_form = document.createElement("div"); - n.style.display = "none", n.innerHTML = "
", document.body.appendChild(n); + var i = this._hidden_export_form = document.createElement("div"); + i.style.display = "none", i.innerHTML = "
", document.body.appendChild(i); } return this._hidden_export_form; - }, i._get_export_size = function(n, _, o, t, r, s, c) { + }, r._get_export_size = function(i, _, o, t, n, s, c) { t = parseInt(t) / 25.4 || 4; var u = { A5: { x: 148, y: 210 }, A4: { x: 210, y: 297 }, A3: { x: 297, y: 420 }, A2: { x: 420, y: 594 }, A1: { x: 594, y: 841 }, A0: { x: 841, y: 1189 } }, v = a("dhx_cal_data", this).x, m = { y: a("dhx_cal_data", this).y + a("dhx_cal_header", this).y + a("dhx_multi_day", this).y }; - return m.x = n === "full" ? v : Math.floor((_ === "landscape" ? u[n].y : u[n].x) * t), c && (m.x *= parseFloat(c.x) || 1, m.y *= parseFloat(c.y) || 1), m; - }, i._export_html = function(n) { - var _, o, t, r = (_ = void 0, o = void 0, (t = d()) && (o = t.scrollable, _ = t.smart_rendering), { nav_height: i.xy.nav_height, scroll_width: i.xy.scroll_width, style_width: i._obj.style.width, style_height: i._obj.style.height, timeline_scrollable: o, timeline_smart_rendering: _ }), s = i._get_export_size(n.format, n.orientation, n.zoom, n.dpi, n.header, n.footer, n.scales), c = ""; + return m.x = i === "full" ? v : Math.floor((_ === "landscape" ? u[i].y : u[i].x) * t), c && (m.x *= parseFloat(c.x) || 1, m.y *= parseFloat(c.y) || 1), m; + }, r._export_html = function(i) { + var _, o, t, n = (_ = void 0, o = void 0, (t = d()) && (o = t.scrollable, _ = t.smart_rendering), { nav_height: r.xy.nav_height, scroll_width: r.xy.scroll_width, style_width: r._obj.style.width, style_height: r._obj.style.height, timeline_scrollable: o, timeline_smart_rendering: _ }), s = r._get_export_size(i.format, i.orientation, i.zoom, i.dpi, i.header, i.footer, i.scales), c = ""; try { (function(u, v) { - i._obj.style.width = u.x + "px", i._obj.style.height = u.y + "px", i.xy.nav_height = 0, i.xy.scroll_width = 0; + r._obj.style.width = u.x + "px", r._obj.style.height = u.y + "px", r.xy.nav_height = 0, r.xy.scroll_width = 0; var m = d(); (v.timeline_scrollable || v.timeline_smart_rendering) && (m.scrollable = !1, m.smart_rendering = !1); - })(s, r), i.setCurrentView(), c = i._obj.innerHTML; + })(s, n), r.setCurrentView(), c = r._obj.innerHTML; } catch (u) { console.error(u); } finally { (function(u) { - i.xy.scroll_width = u.scroll_width, i.xy.nav_height = u.nav_height, i._obj.style.width = u.style_width, i._obj.style.height = u.style_height; + r.xy.scroll_width = u.scroll_width, r.xy.nav_height = u.nav_height, r._obj.style.width = u.style_width, r._obj.style.height = u.style_height; var v = d(); (u.timeline_scrollable || u.timeline_smart_rendering) && (v.scrollable = u.timeline_scrollable, v.smart_rendering = u.timeline_smart_rendering); - })(r), i.setCurrentView(); + })(n), r.setCurrentView(); } return c; }; @@ -4817,162 +4832,162 @@ const lt = { active_links: function(e) { }, html_templates: function(e) { e.attachEvent("onTemplatesReady", function() { for (var h = document.body.getElementsByTagName("DIV"), a = 0; a < h.length; a++) { - var i = h[a].className || ""; - if ((i = i.split(":")).length == 2 && i[0] == "template") { + var r = h[a].className || ""; + if ((r = r.split(":")).length == 2 && r[0] == "template") { var d = 'return "' + (h[a].innerHTML || "").replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/[\n\r]+/g, "") + '";'; - d = unescape(d).replace(/\{event\.([a-z]+)\}/g, function(n, _) { + d = unescape(d).replace(/\{event\.([a-z]+)\}/g, function(i, _) { return '"+ev.' + _ + '+"'; - }), e.templates[i[1]] = Function("start", "end", "ev", d), h[a].style.display = "none"; + }), e.templates[r[1]] = Function("start", "end", "ev", d), h[a].style.display = "none"; } } }); }, key_nav: function(e) { function h(a) { - var i = { minicalButton: e.$keyboardNavigation.MinicalButton, minicalDate: e.$keyboardNavigation.MinicalCell, scheduler: e.$keyboardNavigation.SchedulerNode, dataArea: e.$keyboardNavigation.DataArea, timeSlot: e.$keyboardNavigation.TimeSlot, event: e.$keyboardNavigation.Event }, d = {}; - for (var n in i) - d[n.toLowerCase()] = i[n]; - return d[a = (a + "").toLowerCase()] || i.scheduler; + var r = { minicalButton: e.$keyboardNavigation.MinicalButton, minicalDate: e.$keyboardNavigation.MinicalCell, scheduler: e.$keyboardNavigation.SchedulerNode, dataArea: e.$keyboardNavigation.DataArea, timeSlot: e.$keyboardNavigation.TimeSlot, event: e.$keyboardNavigation.Event }, d = {}; + for (var i in r) + d[i.toLowerCase()] = r[i]; + return d[a = (a + "").toLowerCase()] || r.scheduler; } - e.config.key_nav = !0, e.config.key_nav_step = 30, e.addShortcut = function(a, i, d) { - var n = h(d); - n && n.prototype.bind(a, i); - }, e.getShortcutHandler = function(a, i) { - var d = h(i); + e.config.key_nav = !0, e.config.key_nav_step = 30, e.addShortcut = function(a, r, d) { + var i = h(d); + i && i.prototype.bind(a, r); + }, e.getShortcutHandler = function(a, r) { + var d = h(r); if (d) { - var n = e.$keyboardNavigation.shortcuts.parse(a); - if (n.length) - return d.prototype.findHandler(n[0]); + var i = e.$keyboardNavigation.shortcuts.parse(a); + if (i.length) + return d.prototype.findHandler(i[0]); } - }, e.removeShortcut = function(a, i) { - var d = h(i); + }, e.removeShortcut = function(a, r) { + var d = h(r); d && d.prototype.unbind(a); }, e.focus = function() { if (e.config.key_nav) { var a = e.$keyboardNavigation.dispatcher; a.enable(); - var i = a.getActiveNode(); - !i || i instanceof e.$keyboardNavigation.MinicalButton || i instanceof e.$keyboardNavigation.MinicalCell ? a.setDefaultNode() : a.focusNode(a.getActiveNode()); + var r = a.getActiveNode(); + !r || r instanceof e.$keyboardNavigation.MinicalButton || r instanceof e.$keyboardNavigation.MinicalCell ? a.setDefaultNode() : a.focusNode(a.getActiveNode()); } }, e.$keyboardNavigation = {}, e._compose = function() { - for (var a = Array.prototype.slice.call(arguments, 0), i = {}, d = 0; d < a.length; d++) { - var n = a[d]; - for (var _ in typeof n == "function" && (n = new n()), n) - i[_] = n[_]; + for (var a = Array.prototype.slice.call(arguments, 0), r = {}, d = 0; d < a.length; d++) { + var i = a[d]; + for (var _ in typeof i == "function" && (i = new i()), i) + r[_] = i[_]; } - return i; + return r; }, function(a) { a.$keyboardNavigation.shortcuts = { createCommand: function() { return { modifiers: { shift: !1, alt: !1, ctrl: !1, meta: !1 }, keyCode: null }; - }, parse: function(i) { - for (var d = [], n = this.getExpressions(this.trim(i)), _ = 0; _ < n.length; _++) { - for (var o = this.getWords(n[_]), t = this.createCommand(), r = 0; r < o.length; r++) - this.commandKeys[o[r]] ? t.modifiers[o[r]] = !0 : this.specialKeys[o[r]] ? t.keyCode = this.specialKeys[o[r]] : t.keyCode = o[r].charCodeAt(0); + }, parse: function(r) { + for (var d = [], i = this.getExpressions(this.trim(r)), _ = 0; _ < i.length; _++) { + for (var o = this.getWords(i[_]), t = this.createCommand(), n = 0; n < o.length; n++) + this.commandKeys[o[n]] ? t.modifiers[o[n]] = !0 : this.specialKeys[o[n]] ? t.keyCode = this.specialKeys[o[n]] : t.keyCode = o[n].charCodeAt(0); d.push(t); } return d; - }, getCommandFromEvent: function(i) { + }, getCommandFromEvent: function(r) { var d = this.createCommand(); - d.modifiers.shift = !!i.shiftKey, d.modifiers.alt = !!i.altKey, d.modifiers.ctrl = !!i.ctrlKey, d.modifiers.meta = !!i.metaKey, d.keyCode = i.which || i.keyCode, d.keyCode >= 96 && d.keyCode <= 105 && (d.keyCode -= 48); - var n = String.fromCharCode(d.keyCode); - return n && (d.keyCode = n.toLowerCase().charCodeAt(0)), d; - }, getHashFromEvent: function(i) { - return this.getHash(this.getCommandFromEvent(i)); - }, getHash: function(i) { + d.modifiers.shift = !!r.shiftKey, d.modifiers.alt = !!r.altKey, d.modifiers.ctrl = !!r.ctrlKey, d.modifiers.meta = !!r.metaKey, d.keyCode = r.which || r.keyCode, d.keyCode >= 96 && d.keyCode <= 105 && (d.keyCode -= 48); + var i = String.fromCharCode(d.keyCode); + return i && (d.keyCode = i.toLowerCase().charCodeAt(0)), d; + }, getHashFromEvent: function(r) { + return this.getHash(this.getCommandFromEvent(r)); + }, getHash: function(r) { var d = []; - for (var n in i.modifiers) - i.modifiers[n] && d.push(n); - return d.push(i.keyCode), d.join(this.junctionChar); - }, getExpressions: function(i) { - return i.split(this.junctionChar); - }, getWords: function(i) { - return i.split(this.combinationChar); - }, trim: function(i) { - return i.replace(/\s/g, ""); + for (var i in r.modifiers) + r.modifiers[i] && d.push(i); + return d.push(r.keyCode), d.join(this.junctionChar); + }, getExpressions: function(r) { + return r.split(this.junctionChar); + }, getWords: function(r) { + return r.split(this.combinationChar); + }, trim: function(r) { + return r.replace(/\s/g, ""); }, junctionChar: ",", combinationChar: "+", commandKeys: { shift: 16, alt: 18, ctrl: 17, meta: !0 }, specialKeys: { backspace: 8, tab: 9, enter: 13, esc: 27, space: 32, up: 38, down: 40, left: 37, right: 39, home: 36, end: 35, pageup: 33, pagedown: 34, delete: 46, insert: 45, plus: 107, f1: 112, f2: 113, f3: 114, f4: 115, f5: 116, f6: 117, f7: 118, f8: 119, f9: 120, f10: 121, f11: 122, f12: 123 } }; }(e), function(a) { - a.$keyboardNavigation.EventHandler = { _handlers: null, findHandler: function(i) { + a.$keyboardNavigation.EventHandler = { _handlers: null, findHandler: function(r) { this._handlers || (this._handlers = {}); - var d = a.$keyboardNavigation.shortcuts.getHash(i); + var d = a.$keyboardNavigation.shortcuts.getHash(r); return this._handlers[d]; - }, doAction: function(i, d) { - var n = this.findHandler(i); - n && (n.call(this, d), d.preventDefault ? d.preventDefault() : d.returnValue = !1); - }, bind: function(i, d) { + }, doAction: function(r, d) { + var i = this.findHandler(r); + i && (i.call(this, d), d.preventDefault ? d.preventDefault() : d.returnValue = !1); + }, bind: function(r, d) { this._handlers || (this._handlers = {}); - for (var n = a.$keyboardNavigation.shortcuts, _ = n.parse(i), o = 0; o < _.length; o++) - this._handlers[n.getHash(_[o])] = d; - }, unbind: function(i) { - for (var d = a.$keyboardNavigation.shortcuts, n = d.parse(i), _ = 0; _ < n.length; _++) - this._handlers[d.getHash(n[_])] && delete this._handlers[d.getHash(n[_])]; - }, bindAll: function(i) { - for (var d in i) - this.bind(d, i[d]); + for (var i = a.$keyboardNavigation.shortcuts, _ = i.parse(r), o = 0; o < _.length; o++) + this._handlers[i.getHash(_[o])] = d; + }, unbind: function(r) { + for (var d = a.$keyboardNavigation.shortcuts, i = d.parse(r), _ = 0; _ < i.length; _++) + this._handlers[d.getHash(i[_])] && delete this._handlers[d.getHash(i[_])]; + }, bindAll: function(r) { + for (var d in r) + this.bind(d, r[d]); }, initKeys: function() { this._handlers || (this._handlers = {}), this.keys && this.bindAll(this.keys); } }; }(e), function(a) { - a.$keyboardNavigation.getFocusableNodes = a._getFocusableNodes, a.$keyboardNavigation.trapFocus = function(i, d) { + a.$keyboardNavigation.getFocusableNodes = a._getFocusableNodes, a.$keyboardNavigation.trapFocus = function(r, d) { if (d.keyCode != 9) return !1; - for (var n, _ = a.$keyboardNavigation.getFocusableNodes(i), o = document.activeElement, t = -1, r = 0; r < _.length; r++) - if (_[r] == o) { - t = r; + for (var i, _ = a.$keyboardNavigation.getFocusableNodes(r), o = document.activeElement, t = -1, n = 0; n < _.length; n++) + if (_[n] == o) { + t = n; break; } if (d.shiftKey) { - if (n = _[t <= 0 ? _.length - 1 : t - 1]) - return n.focus(), d.preventDefault(), !0; - } else if (n = _[t >= _.length - 1 ? 0 : t + 1]) - return n.focus(), d.preventDefault(), !0; + if (i = _[t <= 0 ? _.length - 1 : t - 1]) + return i.focus(), d.preventDefault(), !0; + } else if (i = _[t >= _.length - 1 ? 0 : t + 1]) + return i.focus(), d.preventDefault(), !0; return !1; }; }(e), function(a) { a.$keyboardNavigation.marker = { clear: function() { - for (var i = a.$container.querySelectorAll(".dhx_focus_slot"), d = 0; d < i.length; d++) - i[d].parentNode.removeChild(i[d]); + for (var r = a.$container.querySelectorAll(".dhx_focus_slot"), d = 0; d < r.length; d++) + r[d].parentNode.removeChild(r[d]); }, createElement: function() { - var i = document.createElement("div"); - return i.setAttribute("tabindex", -1), i.className = "dhx_focus_slot", i; - }, renderMultiple: function(i, d, n) { - for (var _ = [], o = new Date(i), t = new Date(Math.min(d.valueOf(), a.date.add(a.date.day_start(new Date(i)), 1, "day").valueOf())); o.valueOf() < d.valueOf(); ) - _ = _.concat(n.call(this, o, new Date(Math.min(t.valueOf(), d.valueOf())))), o = a.date.day_start(a.date.add(o, 1, "day")), t = a.date.day_start(a.date.add(o, 1, "day")), t = new Date(Math.min(t.valueOf(), d.valueOf())); + var r = document.createElement("div"); + return r.setAttribute("tabindex", -1), r.className = "dhx_focus_slot", r; + }, renderMultiple: function(r, d, i) { + for (var _ = [], o = new Date(r), t = new Date(Math.min(d.valueOf(), a.date.add(a.date.day_start(new Date(r)), 1, "day").valueOf())); o.valueOf() < d.valueOf(); ) + _ = _.concat(i.call(this, o, new Date(Math.min(t.valueOf(), d.valueOf())))), o = a.date.day_start(a.date.add(o, 1, "day")), t = a.date.day_start(a.date.add(o, 1, "day")), t = new Date(Math.min(t.valueOf(), d.valueOf())); return _; - }, render: function(i, d, n) { + }, render: function(r, d, i) { this.clear(); var _ = [], o = a.$keyboardNavigation.TimeSlot.prototype._modes; switch (a.$keyboardNavigation.TimeSlot.prototype._getMode()) { case o.units: - _ = this.renderVerticalMarker(i, d, n); + _ = this.renderVerticalMarker(r, d, i); break; case o.timeline: - _ = this.renderTimelineMarker(i, d, n); + _ = this.renderTimelineMarker(r, d, i); break; case o.year: - _ = _.concat(this.renderMultiple(i, d, this.renderYearMarker)); + _ = _.concat(this.renderMultiple(r, d, this.renderYearMarker)); break; case o.month: - _ = this.renderMonthMarker(i, d); + _ = this.renderMonthMarker(r, d); break; case o.weekAgenda: - _ = _.concat(this.renderMultiple(i, d, this.renderWeekAgendaMarker)); + _ = _.concat(this.renderMultiple(r, d, this.renderWeekAgendaMarker)); break; case o.list: - _ = this.renderAgendaMarker(i, d); + _ = this.renderAgendaMarker(r, d); break; case o.dayColumns: - _ = _.concat(this.renderMultiple(i, d, this.renderVerticalMarker)); + _ = _.concat(this.renderMultiple(r, d, this.renderVerticalMarker)); } - this.addWaiAriaLabel(_, i, d, n), this.addDataAttributes(_, i, d, n); + this.addWaiAriaLabel(_, r, d, i), this.addDataAttributes(_, r, d, i); for (var t = _.length - 1; t >= 0; t--) if (_[t].offsetWidth) return _[t]; return null; - }, addDataAttributes: function(i, d, n, _) { - for (var o = a.date.date_to_str(a.config.api_date), t = o(d), r = o(n), s = 0; s < i.length; s++) - i[s].setAttribute("data-start-date", t), i[s].setAttribute("data-end-date", r), _ && i[s].setAttribute("data-section", _); - }, addWaiAriaLabel: function(i, d, n, _) { - var o = "", t = a.getState().mode, r = !1; - if (o += a.templates.day_date(d), a.date.day_start(new Date(d)).valueOf() != d.valueOf() && (o += " " + a.templates.hour_scale(d), r = !0), a.date.day_start(new Date(d)).valueOf() != a.date.day_start(new Date(n)).valueOf() && (o += " - " + a.templates.day_date(n), (r || a.date.day_start(new Date(n)).valueOf() != n.valueOf()) && (o += " " + a.templates.hour_scale(n))), _) { + }, addDataAttributes: function(r, d, i, _) { + for (var o = a.date.date_to_str(a.config.api_date), t = o(d), n = o(i), s = 0; s < r.length; s++) + r[s].setAttribute("data-start-date", t), r[s].setAttribute("data-end-date", n), _ && r[s].setAttribute("data-section", _); + }, addWaiAriaLabel: function(r, d, i, _) { + var o = "", t = a.getState().mode, n = !1; + if (o += a.templates.day_date(d), a.date.day_start(new Date(d)).valueOf() != d.valueOf() && (o += " " + a.templates.hour_scale(d), n = !0), a.date.day_start(new Date(d)).valueOf() != a.date.day_start(new Date(i)).valueOf() && (o += " - " + a.templates.day_date(i), (n || a.date.day_start(new Date(i)).valueOf() != i.valueOf()) && (o += " " + a.templates.hour_scale(i))), _) { if (a.matrix && a.matrix[t]) { const c = a.matrix[t], u = c.y_unit[c.order[_]]; o += ", " + a.templates[t + "_scale_label"](u.key, u.label, u); @@ -4981,35 +4996,35 @@ const lt = { active_links: function(e) { o += ", " + a.templates[t + "_scale_text"](u.key, u.label, u); } } - for (var s = 0; s < i.length; s++) - a._waiAria.setAttributes(i[s], { "aria-label": o, "aria-live": "polite" }); - }, renderWeekAgendaMarker: function(i, d) { - for (var n = a.$container.querySelectorAll(".dhx_wa_day_cont .dhx_wa_scale_bar"), _ = a.date.week_start(new Date(a.getState().min_date)), o = -1, t = a.date.day_start(new Date(i)), r = 0; r < n.length && (o++, a.date.day_start(new Date(_)).valueOf() != t.valueOf()); r++) + for (var s = 0; s < r.length; s++) + a._waiAria.setAttributes(r[s], { "aria-label": o, "aria-live": "polite" }); + }, renderWeekAgendaMarker: function(r, d) { + for (var i = a.$container.querySelectorAll(".dhx_wa_day_cont .dhx_wa_scale_bar"), _ = a.date.week_start(new Date(a.getState().min_date)), o = -1, t = a.date.day_start(new Date(r)), n = 0; n < i.length && (o++, a.date.day_start(new Date(_)).valueOf() != t.valueOf()); n++) _ = a.date.add(_, 1, "day"); - return o != -1 ? this._wrapDiv(n[o]) : []; - }, _wrapDiv: function(i) { + return o != -1 ? this._wrapDiv(i[o]) : []; + }, _wrapDiv: function(r) { var d = this.createElement(); - return d.style.top = i.offsetTop + "px", d.style.left = i.offsetLeft + "px", d.style.width = i.offsetWidth + "px", d.style.height = i.offsetHeight + "px", i.appendChild(d), [d]; - }, renderYearMarker: function(i, d) { - var n = a._get_year_cell(i); - n.style.position = "relative"; + return d.style.top = r.offsetTop + "px", d.style.left = r.offsetLeft + "px", d.style.width = r.offsetWidth + "px", d.style.height = r.offsetHeight + "px", r.appendChild(d), [d]; + }, renderYearMarker: function(r, d) { + var i = a._get_year_cell(r); + i.style.position = "relative"; var _ = this.createElement(); - return _.style.top = "0px", _.style.left = "0px", _.style.width = "100%", _.style.height = "100%", n.appendChild(_), [_]; - }, renderAgendaMarker: function(i, d) { - var n = this.createElement(); - return n.style.height = "1px", n.style.width = "100%", n.style.opacity = 1, n.style.top = "0px", n.style.left = "0px", a.$container.querySelector(".dhx_cal_data").appendChild(n), [n]; - }, renderTimelineMarker: function(i, d, n) { + return _.style.top = "0px", _.style.left = "0px", _.style.width = "100%", _.style.height = "100%", i.appendChild(_), [_]; + }, renderAgendaMarker: function(r, d) { + var i = this.createElement(); + return i.style.height = "1px", i.style.width = "100%", i.style.opacity = 1, i.style.top = "0px", i.style.left = "0px", a.$container.querySelector(".dhx_cal_data").appendChild(i), [i]; + }, renderTimelineMarker: function(r, d, i) { var _ = a._lame_copy({}, a.matrix[a._mode]), o = _._scales; _.round_position = !1; - var t = [], r = i ? new Date(i) : a._min_date, s = d ? new Date(d) : a._max_date; - if (r.valueOf() < a._min_date.valueOf() && (r = new Date(a._min_date)), s.valueOf() > a._max_date.valueOf() && (s = new Date(a._max_date)), !_._trace_x) + var t = [], n = r ? new Date(r) : a._min_date, s = d ? new Date(d) : a._max_date; + if (n.valueOf() < a._min_date.valueOf() && (n = new Date(a._min_date)), s.valueOf() > a._max_date.valueOf() && (s = new Date(a._max_date)), !_._trace_x) return t; for (var c = 0; c < _._trace_x.length && !a._is_column_visible(_._trace_x[c]); c++) ; if (c == _._trace_x.length) return t; - var u = o[n]; - if (!(r < d && s > i)) + var u = o[i]; + if (!(n < d && s > r)) return t; var v = this.createElement(); let m, l; @@ -5017,59 +5032,59 @@ const lt = { active_links: function(e) { k.setDate(1), k.setFullYear(b.getFullYear()), k.setMonth(b.getMonth()), k.setDate(b.getDate()); } if (a.getView().days) { - const b = new Date(i); + const b = new Date(r); f(a._min_date, b); const k = new Date(d); f(a._min_date, k), m = a._timeline_getX({ start_date: b }, !1, _), l = a._timeline_getX({ start_date: k }, !1, _); } else - m = a._timeline_getX({ start_date: i }, !1, _), l = a._timeline_getX({ start_date: d }, !1, _); - var g = _._section_height[n] - 1 || _.dy - 1, p = 0; + m = a._timeline_getX({ start_date: r }, !1, _), l = a._timeline_getX({ start_date: d }, !1, _); + var g = _._section_height[i] - 1 || _.dy - 1, p = 0; a._isRender("cell") && (p = u.offsetTop, m += _.dx, l += _.dx, u = a.$container.querySelector(".dhx_cal_data")); var y = Math.max(1, l - m - 1); let w = "left"; return a.config.rtl && (w = "right"), v.style.cssText = `height:${g}px; ${w}:${m}px; width:${y}px; top:${p}px;`, u && (u.appendChild(v), t.push(v)), t; - }, renderMonthCell: function(i) { - for (var d = a.$container.querySelectorAll(".dhx_month_head"), n = [], _ = 0; _ < d.length; _++) - n.push(d[_].parentNode); - var o = -1, t = 0, r = -1, s = a.date.week_start(new Date(a.getState().min_date)), c = a.date.day_start(new Date(i)); - for (_ = 0; _ < n.length && (o++, r == 6 ? (t++, r = 0) : r++, a.date.day_start(new Date(s)).valueOf() != c.valueOf()); _++) + }, renderMonthCell: function(r) { + for (var d = a.$container.querySelectorAll(".dhx_month_head"), i = [], _ = 0; _ < d.length; _++) + i.push(d[_].parentNode); + var o = -1, t = 0, n = -1, s = a.date.week_start(new Date(a.getState().min_date)), c = a.date.day_start(new Date(r)); + for (_ = 0; _ < i.length && (o++, n == 6 ? (t++, n = 0) : n++, a.date.day_start(new Date(s)).valueOf() != c.valueOf()); _++) s = a.date.add(s, 1, "day"); if (o == -1) return []; - var u = a._colsS[r], v = a._colsS.heights[t], m = this.createElement(); - m.style.top = v + "px", m.style.left = u + "px", m.style.width = a._cols[r] + "px", m.style.height = (a._colsS.heights[t + 1] - v || a._colsS.height) + "px"; - var l = a.$container.querySelector(".dhx_cal_data"), f = l.querySelector("table"); + var u = a._colsS[n], v = a._colsS.heights[t], m = this.createElement(); + m.style.top = v + "px", m.style.left = u + "px", m.style.width = a._cols[n] + "px", m.style.height = (a._colsS.heights[t + 1] - v || a._colsS.height) + "px"; + var l = a.$container.querySelector(".dhx_cal_data"), f = l.querySelector(".dhx_cal_month_table"); return f.nextSibling ? l.insertBefore(m, f.nextSibling) : l.appendChild(m), m; - }, renderMonthMarker: function(i, d) { - for (var n = [], _ = i; _.valueOf() < d.valueOf(); ) - n.push(this.renderMonthCell(_)), _ = a.date.add(_, 1, "day"); - return n; - }, renderVerticalMarker: function(i, d, n) { - var _ = a.locate_holder_day(i), o = [], t = null, r = a.config; + }, renderMonthMarker: function(r, d) { + for (var i = [], _ = r; _.valueOf() < d.valueOf(); ) + i.push(this.renderMonthCell(_)), _ = a.date.add(_, 1, "day"); + return i; + }, renderVerticalMarker: function(r, d, i) { + var _ = a.locate_holder_day(r), o = [], t = null, n = a.config; if (a._ignores[_]) return o; - if (a._props && a._props[a._mode] && n) { + if (a._props && a._props[a._mode] && i) { var s = a._props[a._mode]; - _ = s.order[n]; - var c = s.order[n]; - s.days > 1 ? _ = a.locate_holder_day(i) + c : (_ = c, s.size && _ > s.position + s.size && (_ = 0)); + _ = s.order[i]; + var c = s.order[i]; + s.days > 1 ? _ = a.locate_holder_day(r) + c : (_ = c, s.size && _ > s.position + s.size && (_ = 0)); } if (!(t = a.locate_holder(_)) || t.querySelector(".dhx_scale_hour")) return document.createElement("div"); - var u = Math.max(60 * i.getHours() + i.getMinutes(), 60 * r.first_hour), v = Math.min(60 * d.getHours() + d.getMinutes(), 60 * r.last_hour); - if (!v && a.date.day_start(new Date(d)).valueOf() > a.date.day_start(new Date(i)).valueOf() && (v = 60 * r.last_hour), v <= u) + var u = Math.max(60 * r.getHours() + r.getMinutes(), 60 * n.first_hour), v = Math.min(60 * d.getHours() + d.getMinutes(), 60 * n.last_hour); + if (!v && a.date.day_start(new Date(d)).valueOf() > a.date.day_start(new Date(r)).valueOf() && (v = 60 * n.last_hour), v <= u) return []; - var m = this.createElement(), l = a.config.hour_size_px * r.last_hour + 1, f = 36e5; + var m = this.createElement(), l = a.config.hour_size_px * n.last_hour + 1, f = 36e5; return m.style.top = Math.round((60 * u * 1e3 - a.config.first_hour * f) * a.config.hour_size_px / f) % l + "px", m.style.lineHeight = m.style.height = Math.max(Math.round(60 * (v - u) * 1e3 * a.config.hour_size_px / f) % l, 1) + "px", m.style.width = "100%", t.appendChild(m), o.push(m), o[0]; } }; }(e), function(a) { a.$keyboardNavigation.SchedulerNode = function() { }, a.$keyboardNavigation.SchedulerNode.prototype = a._compose(a.$keyboardNavigation.EventHandler, { getDefaultNode: function() { - var i = new a.$keyboardNavigation.TimeSlot(); - return i.isValid() || (i = i.fallback()), i; + var r = new a.$keyboardNavigation.TimeSlot(); + return r.isValid() || (r = r.fallback()), r; }, _modes: { month: "month", year: "year", dayColumns: "dayColumns", timeline: "timeline", units: "units", weekAgenda: "weekAgenda", list: "list" }, getMode: function() { - var i = a.getState().mode; - return a.matrix && a.matrix[i] ? this._modes.timeline : a._props && a._props[i] ? this._modes.units : i == "month" ? this._modes.month : i == "year" ? this._modes.year : i == "week_agenda" ? this._modes.weekAgenda : i == "map" || i == "agenda" || a._grid && a["grid_" + i] ? this._modes.list : this._modes.dayColumns; + var r = a.getState().mode; + return a.matrix && a.matrix[r] ? this._modes.timeline : a._props && a._props[r] ? this._modes.units : r == "month" ? this._modes.month : r == "year" ? this._modes.year : r == "week_agenda" ? this._modes.weekAgenda : r == "map" || r == "agenda" || a._grid && a["grid_" + r] ? this._modes.list : this._modes.dayColumns; }, focus: function() { a.focus(); }, blur: function() { @@ -5079,57 +5094,57 @@ const lt = { active_links: function(e) { a.$container && a.$container.removeAttribute("tabindex"); }, isEnabled: function() { return a.$container.hasAttribute("tabindex"); - }, _compareEvents: function(i, d) { - return i.start_date.valueOf() == d.start_date.valueOf() ? i.id > d.id ? 1 : -1 : i.start_date.valueOf() > d.start_date.valueOf() ? 1 : -1; - }, _pickEvent: function(i, d, n, _) { + }, _compareEvents: function(r, d) { + return r.start_date.valueOf() == d.start_date.valueOf() ? r.id > d.id ? 1 : -1 : r.start_date.valueOf() > d.start_date.valueOf() ? 1 : -1; + }, _pickEvent: function(r, d, i, _) { var o = a.getState(); - i = new Date(Math.max(o.min_date.valueOf(), i.valueOf())), d = new Date(Math.min(o.max_date.valueOf(), d.valueOf())); - var t = a.getEvents(i, d); + r = new Date(Math.max(o.min_date.valueOf(), r.valueOf())), d = new Date(Math.min(o.max_date.valueOf(), d.valueOf())); + var t = a.getEvents(r, d); t.sort(this._compareEvents), _ && (t = t.reverse()); - for (var r = !!n, s = 0; s < t.length && r; s++) - t[s].id == n && (r = !1), t.splice(s, 1), s--; + for (var n = !!i, s = 0; s < t.length && n; s++) + t[s].id == i && (n = !1), t.splice(s, 1), s--; for (s = 0; s < t.length; s++) if (new a.$keyboardNavigation.Event(t[s].id).getNode()) return t[s]; return null; - }, nextEventHandler: function(i) { - var d = a.$keyboardNavigation.dispatcher.activeNode, n = i || d && d.eventId, _ = null; - if (n && a.getEvent(n)) { - var o = a.getEvent(n); + }, nextEventHandler: function(r) { + var d = a.$keyboardNavigation.dispatcher.activeNode, i = r || d && d.eventId, _ = null; + if (i && a.getEvent(i)) { + var o = a.getEvent(i); _ = a.$keyboardNavigation.SchedulerNode.prototype._pickEvent(o.start_date, a.date.add(o.start_date, 1, "year"), o.id, !1); } - if (!_ && !i) { + if (!_ && !r) { var t = a.getState(); _ = a.$keyboardNavigation.SchedulerNode.prototype._pickEvent(t.min_date, a.date.add(t.min_date, 1, "year"), null, !1); } if (_) { - var r = new a.$keyboardNavigation.Event(_.id); - r.isValid() ? (d && d.blur(), a.$keyboardNavigation.dispatcher.setActiveNode(r)) : this.nextEventHandler(_.id); + var n = new a.$keyboardNavigation.Event(_.id); + n.isValid() ? (d && d.blur(), a.$keyboardNavigation.dispatcher.setActiveNode(n)) : this.nextEventHandler(_.id); } - }, prevEventHandler: function(i) { - var d = a.$keyboardNavigation.dispatcher.activeNode, n = i || d && d.eventId, _ = null; - if (n && a.getEvent(n)) { - var o = a.getEvent(n); + }, prevEventHandler: function(r) { + var d = a.$keyboardNavigation.dispatcher.activeNode, i = r || d && d.eventId, _ = null; + if (i && a.getEvent(i)) { + var o = a.getEvent(i); _ = a.$keyboardNavigation.SchedulerNode.prototype._pickEvent(a.date.add(o.end_date, -1, "year"), o.end_date, o.id, !0); } - if (!_ && !i) { + if (!_ && !r) { var t = a.getState(); _ = a.$keyboardNavigation.SchedulerNode.prototype._pickEvent(a.date.add(t.max_date, -1, "year"), t.max_date, null, !0); } if (_) { - var r = new a.$keyboardNavigation.Event(_.id); - r.isValid() ? (d && d.blur(), a.$keyboardNavigation.dispatcher.setActiveNode(r)) : this.prevEventHandler(_.id); + var n = new a.$keyboardNavigation.Event(_.id); + n.isValid() ? (d && d.blur(), a.$keyboardNavigation.dispatcher.setActiveNode(n)) : this.prevEventHandler(_.id); } - }, keys: { "alt+1, alt+2, alt+3, alt+4, alt+5, alt+6, alt+7, alt+8, alt+9": function(i) { - var d = a.$keyboardNavigation.HeaderCell.prototype.getNodes(".dhx_cal_navline .dhx_cal_tab"), n = i.key; - n === void 0 && (n = i.keyCode - 48), d[1 * n - 1] && d[1 * n - 1].click(); - }, "ctrl+left,meta+left": function(i) { + }, keys: { "alt+1, alt+2, alt+3, alt+4, alt+5, alt+6, alt+7, alt+8, alt+9": function(r) { + var d = a.$keyboardNavigation.HeaderCell.prototype.getNodes(".dhx_cal_navline .dhx_cal_tab"), i = r.key; + i === void 0 && (i = r.keyCode - 48), d[1 * i - 1] && d[1 * i - 1].click(); + }, "ctrl+left,meta+left": function(r) { a._click.dhx_cal_prev_button(); - }, "ctrl+right,meta+right": function(i) { + }, "ctrl+right,meta+right": function(r) { a._click.dhx_cal_next_button(); - }, "ctrl+up,meta+up": function(i) { + }, "ctrl+up,meta+up": function(r) { a.$container.querySelector(".dhx_cal_data").scrollTop -= 20; - }, "ctrl+down,meta+down": function(i) { + }, "ctrl+down,meta+down": function(r) { a.$container.querySelector(".dhx_cal_data").scrollTop += 20; }, e: function() { this.nextEventHandler(); @@ -5139,12 +5154,12 @@ const lt = { active_links: function(e) { this.prevEventHandler(); }, "ctrl+enter,meta+enter": function() { a.addEventNow({ start_date: new Date(a.getState().date) }); - }, "ctrl+c,meta+c": function(i) { - a._key_nav_copy_paste(i); - }, "ctrl+v,meta+v": function(i) { - a._key_nav_copy_paste(i); - }, "ctrl+x,meta+x": function(i) { - a._key_nav_copy_paste(i); + }, "ctrl+c,meta+c": function(r) { + a._key_nav_copy_paste(r); + }, "ctrl+v,meta+v": function(r) { + a._key_nav_copy_paste(r); + }, "ctrl+x,meta+x": function(r) { + a._key_nav_copy_paste(r); } } }), a.$keyboardNavigation.SchedulerNode.prototype.bindAll(a.$keyboardNavigation.SchedulerNode.prototype.keys); }(e), function(a) { a.$keyboardNavigation.KeyNavNode = function() { @@ -5152,112 +5167,112 @@ const lt = { active_links: function(e) { return !0; }, fallback: function() { return null; - }, moveTo: function(i) { - a.$keyboardNavigation.dispatcher.setActiveNode(i); - }, compareTo: function(i) { - if (!i) + }, moveTo: function(r) { + a.$keyboardNavigation.dispatcher.setActiveNode(r); + }, compareTo: function(r) { + if (!r) return !1; for (var d in this) { - if (!!this[d] != !!i[d]) + if (!!this[d] != !!r[d]) return !1; - var n = !(!this[d] || !this[d].toString), _ = !(!i[d] || !i[d].toString); - if (_ != n) + var i = !(!this[d] || !this[d].toString), _ = !(!r[d] || !r[d].toString); + if (_ != i) return !1; - if (_ && n) { - if (i[d].toString() != this[d].toString()) + if (_ && i) { + if (r[d].toString() != this[d].toString()) return !1; - } else if (i[d] != this[d]) + } else if (r[d] != this[d]) return !1; } return !0; }, getNode: function() { }, focus: function() { - var i = this.getNode(); - i && (i.setAttribute("tabindex", "-1"), i.focus && i.focus()); + var r = this.getNode(); + r && (r.setAttribute("tabindex", "-1"), r.focus && r.focus()); }, blur: function() { - var i = this.getNode(); - i && i.setAttribute("tabindex", "-1"); + var r = this.getNode(); + r && r.setAttribute("tabindex", "-1"); } }); }(e), function(a) { - a.$keyboardNavigation.HeaderCell = function(i) { - this.index = i || 0; - }, a.$keyboardNavigation.HeaderCell.prototype = a._compose(a.$keyboardNavigation.KeyNavNode, { getNode: function(i) { - i = i || this.index || 0; + a.$keyboardNavigation.HeaderCell = function(r) { + this.index = r || 0; + }, a.$keyboardNavigation.HeaderCell.prototype = a._compose(a.$keyboardNavigation.KeyNavNode, { getNode: function(r) { + r = r || this.index || 0; var d = this.getNodes(); - if (d[i]) - return d[i]; - }, getNodes: function(i) { - i = i || [".dhx_cal_navline .dhx_cal_prev_button", ".dhx_cal_navline .dhx_cal_next_button", ".dhx_cal_navline .dhx_cal_today_button", ".dhx_cal_navline .dhx_cal_tab"].join(", "); - var d = Array.prototype.slice.call(a.$container.querySelectorAll(i)); - return d.sort(function(n, _) { - return n.offsetLeft - _.offsetLeft; + if (d[r]) + return d[r]; + }, getNodes: function(r) { + r = r || [".dhx_cal_navline .dhx_cal_prev_button", ".dhx_cal_navline .dhx_cal_next_button", ".dhx_cal_navline .dhx_cal_today_button", ".dhx_cal_navline .dhx_cal_tab"].join(", "); + var d = Array.prototype.slice.call(a.$container.querySelectorAll(r)); + return d.sort(function(i, _) { + return i.offsetLeft - _.offsetLeft; }), d; }, _handlers: null, isValid: function() { return !!this.getNode(this.index); }, fallback: function() { - var i = this.getNode(0); - return i || (i = new a.$keyboardNavigation.TimeSlot()), i; + var r = this.getNode(0); + return r || (r = new a.$keyboardNavigation.TimeSlot()), r; }, keys: { left: function() { - var i = this.index - 1; - i < 0 && (i = this.getNodes().length - 1), this.moveTo(new a.$keyboardNavigation.HeaderCell(i)); + var r = this.index - 1; + r < 0 && (r = this.getNodes().length - 1), this.moveTo(new a.$keyboardNavigation.HeaderCell(r)); }, right: function() { - var i = this.index + 1; - i >= this.getNodes().length && (i = 0), this.moveTo(new a.$keyboardNavigation.HeaderCell(i)); + var r = this.index + 1; + r >= this.getNodes().length && (r = 0), this.moveTo(new a.$keyboardNavigation.HeaderCell(r)); }, down: function() { this.moveTo(new a.$keyboardNavigation.TimeSlot()); }, enter: function() { - var i = this.getNode(); - i && i.click(); + var r = this.getNode(); + r && r.click(); } } }), a.$keyboardNavigation.HeaderCell.prototype.bindAll(a.$keyboardNavigation.HeaderCell.prototype.keys); }(e), function(a) { - a.$keyboardNavigation.Event = function(i) { - if (this.eventId = null, a.getEvent(i)) { - var d = a.getEvent(i); - this.start = new Date(d.start_date), this.end = new Date(d.end_date), this.section = this._getSection(d), this.eventId = i; + a.$keyboardNavigation.Event = function(r) { + if (this.eventId = null, a.getEvent(r)) { + var d = a.getEvent(r); + this.start = new Date(d.start_date), this.end = new Date(d.end_date), this.section = this._getSection(d), this.eventId = r; } }, a.$keyboardNavigation.Event.prototype = a._compose(a.$keyboardNavigation.KeyNavNode, { _getNodes: function() { return Array.prototype.slice.call(a.$container.querySelectorAll("[" + a.config.event_attribute + "]")); }, _modes: a.$keyboardNavigation.SchedulerNode.prototype._modes, getMode: a.$keyboardNavigation.SchedulerNode.prototype.getMode, _handlers: null, isValid: function() { return !(!a.getEvent(this.eventId) || !this.getNode()); }, fallback: function() { - var i = this._getNodes()[0], d = null; - if (i && a._locate_event(i)) { - var n = a._locate_event(i); - d = new a.$keyboardNavigation.Event(n); + var r = this._getNodes()[0], d = null; + if (r && a._locate_event(r)) { + var i = a._locate_event(r); + d = new a.$keyboardNavigation.Event(i); } else d = new a.$keyboardNavigation.TimeSlot(); return d; - }, isScrolledIntoView: function(i) { - var d = i.getBoundingClientRect(), n = a.$container.querySelector(".dhx_cal_data").getBoundingClientRect(); - return !(d.bottom < n.top || d.top > n.bottom); + }, isScrolledIntoView: function(r) { + var d = r.getBoundingClientRect(), i = a.$container.querySelector(".dhx_cal_data").getBoundingClientRect(); + return !(d.bottom < i.top || d.top > i.bottom); }, getNode: function() { - var i = "[" + a.config.event_attribute + "='" + this.eventId + "']", d = a.$keyboardNavigation.dispatcher.getInlineEditor(this.eventId); + var r = "[" + a.config.event_attribute + "='" + this.eventId + "']", d = a.$keyboardNavigation.dispatcher.getInlineEditor(this.eventId); if (d) return d; if (a.isMultisectionEvent && a.isMultisectionEvent(a.getEvent(this.eventId))) { - for (var n = a.$container.querySelectorAll(i), _ = 0; _ < n.length; _++) - if (this.isScrolledIntoView(n[_])) - return n[_]; - return n[0]; + for (var i = a.$container.querySelectorAll(r), _ = 0; _ < i.length; _++) + if (this.isScrolledIntoView(i[_])) + return i[_]; + return i[0]; } - return a.$container.querySelector(i); + return a.$container.querySelector(r); }, focus: function() { - var i = a.getEvent(this.eventId), d = a.getState(); - (i.start_date.valueOf() > d.max_date.valueOf() || i.end_date.valueOf() <= d.min_date.valueOf()) && a.setCurrentView(i.start_date); - var n = this.getNode(); - this.isScrolledIntoView(n) ? a.$keyboardNavigation.dispatcher.keepScrollPosition((function() { + var r = a.getEvent(this.eventId), d = a.getState(); + (r.start_date.valueOf() > d.max_date.valueOf() || r.end_date.valueOf() <= d.min_date.valueOf()) && a.setCurrentView(r.start_date); + var i = this.getNode(); + this.isScrolledIntoView(i) ? a.$keyboardNavigation.dispatcher.keepScrollPosition((function() { a.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this); }).bind(this)) : a.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this); }, blur: function() { a.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this); - }, _getSection: function(i) { - var d = null, n = a.getState().mode; - return a.matrix && a.matrix[n] ? d = i[a.matrix[a.getState().mode].y_property] : a._props && a._props[n] && (d = i[a._props[n].map_to]), d; - }, _moveToSlot: function(i) { + }, _getSection: function(r) { + var d = null, i = a.getState().mode; + return a.matrix && a.matrix[i] ? d = r[a.matrix[a.getState().mode].y_property] : a._props && a._props[i] && (d = r[a._props[i].map_to]), d; + }, _moveToSlot: function(r) { var d = a.getEvent(this.eventId); if (d) { - var n = this._getSection(d), _ = new a.$keyboardNavigation.TimeSlot(d.start_date, null, n); - this.moveTo(_.nextSlot(_, i)); + var i = this._getSection(d), _ = new a.$keyboardNavigation.TimeSlot(d.start_date, null, i); + this.moveTo(_.nextSlot(_, r)); } else this.moveTo(new a.$keyboardNavigation.TimeSlot()); }, keys: { left: function() { @@ -5267,8 +5282,8 @@ const lt = { active_links: function(e) { }, down: function() { this.getMode() == this._modes.list ? a.$keyboardNavigation.SchedulerNode.prototype.nextEventHandler() : this._moveToSlot("down"); }, space: function() { - var i = this.getNode(); - i && i.click ? i.click() : this.moveTo(new a.$keyboardNavigation.TimeSlot()); + var r = this.getNode(); + r && r.click ? r.click() : this.moveTo(new a.$keyboardNavigation.TimeSlot()); }, up: function() { this.getMode() == this._modes.list ? a.$keyboardNavigation.SchedulerNode.prototype.prevEventHandler() : this._moveToSlot("up"); }, delete: function() { @@ -5277,44 +5292,44 @@ const lt = { active_links: function(e) { a.getEvent(this.eventId) ? a.showLightbox(this.eventId) : this.moveTo(new a.$keyboardNavigation.TimeSlot()); } } }), a.$keyboardNavigation.Event.prototype.bindAll(a.$keyboardNavigation.Event.prototype.keys); }(e), function(a) { - a.$keyboardNavigation.TimeSlot = function(i, d, n, _) { + a.$keyboardNavigation.TimeSlot = function(r, d, i, _) { var o = a.getState(), t = a.matrix && a.matrix[o.mode]; - i || (i = this.getDefaultDate()), d || (d = t ? a.date.add(i, t.x_step, t.x_unit) : a.date.add(i, a.config.key_nav_step, "minute")), this.section = n || this._getDefaultSection(), this.start_date = new Date(i), this.end_date = new Date(d), this.movingDate = _ || null; + r || (r = this.getDefaultDate()), d || (d = t ? a.date.add(r, t.x_step, t.x_unit) : a.date.add(r, a.config.key_nav_step, "minute")), this.section = i || this._getDefaultSection(), this.start_date = new Date(r), this.end_date = new Date(d), this.movingDate = _ || null; }, a.$keyboardNavigation.TimeSlot.prototype = a._compose(a.$keyboardNavigation.KeyNavNode, { _handlers: null, getDefaultDate: function() { - var i, d = a.getState(), n = new Date(d.date); - n.setSeconds(0), n.setMilliseconds(0); + var r, d = a.getState(), i = new Date(d.date); + i.setSeconds(0), i.setMilliseconds(0); var _ = /* @__PURE__ */ new Date(); _.setSeconds(0), _.setMilliseconds(0); var o = a.matrix && a.matrix[d.mode], t = !1; - if (n.valueOf() === _.valueOf() && (t = !0), o) - t ? (o.x_unit === "day" ? (_.setHours(0), _.setMinutes(0)) : o.x_unit === "hour" && _.setMinutes(0), i = _) : i = a.date[o.name + "_start"](new Date(d.date)), i = this.findVisibleColumn(i); - else if (i = new Date(a.getState().min_date), t && (i = _), i = this.findVisibleColumn(i), t || i.setHours(a.config.first_hour), !a._table_view) { - var r = a.$container.querySelector(".dhx_cal_data"); - r.scrollTop && i.setHours(a.config.first_hour + Math.ceil(r.scrollTop / a.config.hour_size_px)); + if (i.valueOf() === _.valueOf() && (t = !0), o) + t ? (o.x_unit === "day" ? (_.setHours(0), _.setMinutes(0)) : o.x_unit === "hour" && _.setMinutes(0), r = _) : r = a.date[o.name + "_start"](new Date(d.date)), r = this.findVisibleColumn(r); + else if (r = new Date(a.getState().min_date), t && (r = _), r = this.findVisibleColumn(r), t || r.setHours(a.config.first_hour), !a._table_view) { + var n = a.$container.querySelector(".dhx_cal_data"); + n.scrollTop && r.setHours(a.config.first_hour + Math.ceil(n.scrollTop / a.config.hour_size_px)); } - return i; - }, clone: function(i) { - return new a.$keyboardNavigation.TimeSlot(i.start_date, i.end_date, i.section, i.movingDate); + return r; + }, clone: function(r) { + return new a.$keyboardNavigation.TimeSlot(r.start_date, r.end_date, r.section, r.movingDate); }, _getMultisectionView: function() { - var i, d = a.getState(); - return a._props && a._props[d.mode] ? i = a._props[d.mode] : a.matrix && a.matrix[d.mode] && (i = a.matrix[d.mode]), i; + var r, d = a.getState(); + return a._props && a._props[d.mode] ? r = a._props[d.mode] : a.matrix && a.matrix[d.mode] && (r = a.matrix[d.mode]), r; }, _getDefaultSection: function() { - var i = null; - return this._getMultisectionView() && !i && (i = this._getNextSection()), i; - }, _getNextSection: function(i, d) { - var n = this._getMultisectionView(), _ = n.order[i], o = _; - (o = _ !== void 0 ? _ + d : n.size && n.position ? n.position : 0) < 0 && (o = 0); - var t = n.options || n.y_unit; + var r = null; + return this._getMultisectionView() && !r && (r = this._getNextSection()), r; + }, _getNextSection: function(r, d) { + var i = this._getMultisectionView(), _ = i.order[r], o = _; + (o = _ !== void 0 ? _ + d : i.size && i.position ? i.position : 0) < 0 && (o = 0); + var t = i.options || i.y_unit; return o >= t.length && (o = t.length - 1), t[o] ? t[o].key : null; }, isValid: function() { - var i = a.getState(); - if (this.start_date.valueOf() < i.min_date.valueOf() || this.start_date.valueOf() >= i.max_date.valueOf() || !this.isVisible(this.start_date, this.end_date)) + var r = a.getState(); + if (this.start_date.valueOf() < r.min_date.valueOf() || this.start_date.valueOf() >= r.max_date.valueOf() || !this.isVisible(this.start_date, this.end_date)) return !1; var d = this._getMultisectionView(); return !d || d.order[this.section] !== void 0; }, fallback: function() { - var i = new a.$keyboardNavigation.TimeSlot(); - return i.isValid() ? i : new a.$keyboardNavigation.DataArea(); + var r = new a.$keyboardNavigation.TimeSlot(); + return r.isValid() ? r : new a.$keyboardNavigation.DataArea(); }, getNodes: function() { return Array.prototype.slice.call(a.$container.querySelectorAll(".dhx_focus_slot")); }, getNode: function() { @@ -5323,43 +5338,43 @@ const lt = { active_links: function(e) { this.section && a.getView() && a.getView().smart_rendering && a.getView().scrollTo && !a.$container.querySelector(`[data-section-id="${this.section}"]`) && a.getView().scrollTo({ section: this.section }), a.$keyboardNavigation.marker.render(this.start_date, this.end_date, this.section), a.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this), a.$keyboardNavigation._pasteDate = this.start_date, a.$keyboardNavigation._pasteSection = this.section; }, blur: function() { a.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this), a.$keyboardNavigation.marker.clear(); - }, _modes: a.$keyboardNavigation.SchedulerNode.prototype._modes, _getMode: a.$keyboardNavigation.SchedulerNode.prototype.getMode, addMonthDate: function(i, d, n) { + }, _modes: a.$keyboardNavigation.SchedulerNode.prototype._modes, _getMode: a.$keyboardNavigation.SchedulerNode.prototype.getMode, addMonthDate: function(r, d, i) { var _; switch (d) { case "up": - _ = a.date.add(i, -1, "week"); + _ = a.date.add(r, -1, "week"); break; case "down": - _ = a.date.add(i, 1, "week"); + _ = a.date.add(r, 1, "week"); break; case "left": - _ = a.date.day_start(a.date.add(i, -1, "day")), _ = this.findVisibleColumn(_, -1); + _ = a.date.day_start(a.date.add(r, -1, "day")), _ = this.findVisibleColumn(_, -1); break; case "right": - _ = a.date.day_start(a.date.add(i, 1, "day")), _ = this.findVisibleColumn(_, 1); + _ = a.date.day_start(a.date.add(r, 1, "day")), _ = this.findVisibleColumn(_, 1); break; default: - _ = a.date.day_start(new Date(i)); + _ = a.date.day_start(new Date(r)); } var o = a.getState(); - return (i.valueOf() < o.min_date.valueOf() || !n && i.valueOf() >= o.max_date.valueOf()) && (_ = new Date(o.min_date)), _; - }, nextMonthSlot: function(i, d, n) { + return (r.valueOf() < o.min_date.valueOf() || !i && r.valueOf() >= o.max_date.valueOf()) && (_ = new Date(o.min_date)), _; + }, nextMonthSlot: function(r, d, i) { var _, o; - return (_ = this.addMonthDate(i.start_date, d, n)).setHours(a.config.first_hour), (o = new Date(_)).setHours(a.config.last_hour), { start_date: _, end_date: o }; - }, _alignTimeSlot: function(i, d, n, _) { - for (var o = new Date(d); o.valueOf() < i.valueOf(); ) - o = a.date.add(o, _, n); - return o.valueOf() > i.valueOf() && (o = a.date.add(o, -_, n)), o; - }, nextTimelineSlot: function(i, d, n) { - var _ = a.getState(), o = a.matrix[_.mode], t = this._alignTimeSlot(i.start_date, a.date[o.name + "_start"](new Date(i.start_date)), o.x_unit, o.x_step), r = this._alignTimeSlot(i.end_date, a.date[o.name + "_start"](new Date(i.end_date)), o.x_unit, o.x_step); - r.valueOf() <= t.valueOf() && (r = a.date.add(t, o.x_step, o.x_unit)); - var s = this.clone(i); - switch (s.start_date = t, s.end_date = r, s.section = i.section || this._getNextSection(), d) { + return (_ = this.addMonthDate(r.start_date, d, i)).setHours(a.config.first_hour), (o = new Date(_)).setHours(a.config.last_hour), { start_date: _, end_date: o }; + }, _alignTimeSlot: function(r, d, i, _) { + for (var o = new Date(d); o.valueOf() < r.valueOf(); ) + o = a.date.add(o, _, i); + return o.valueOf() > r.valueOf() && (o = a.date.add(o, -_, i)), o; + }, nextTimelineSlot: function(r, d, i) { + var _ = a.getState(), o = a.matrix[_.mode], t = this._alignTimeSlot(r.start_date, a.date[o.name + "_start"](new Date(r.start_date)), o.x_unit, o.x_step), n = this._alignTimeSlot(r.end_date, a.date[o.name + "_start"](new Date(r.end_date)), o.x_unit, o.x_step); + n.valueOf() <= t.valueOf() && (n = a.date.add(t, o.x_step, o.x_unit)); + var s = this.clone(r); + switch (s.start_date = t, s.end_date = n, s.section = r.section || this._getNextSection(), d) { case "up": - s.section = this._getNextSection(i.section, -1); + s.section = this._getNextSection(r.section, -1); break; case "down": - s.section = this._getNextSection(i.section, 1); + s.section = this._getNextSection(r.section, 1); break; case "left": s.start_date = this.findVisibleColumn(a.date.add(s.start_date, -o.x_step, o.x_unit), -1), s.end_date = a.date.add(s.start_date, o.x_step, o.x_unit); @@ -5367,106 +5382,106 @@ const lt = { active_links: function(e) { case "right": s.start_date = this.findVisibleColumn(a.date.add(s.start_date, o.x_step, o.x_unit), 1), s.end_date = a.date.add(s.start_date, o.x_step, o.x_unit); } - return (s.start_date.valueOf() < _.min_date.valueOf() || s.start_date.valueOf() >= _.max_date.valueOf()) && (n && s.start_date.valueOf() >= _.max_date.valueOf() ? s.start_date = new Date(_.max_date) : (s.start_date = a.date[_.mode + "_start"](a.date.add(_.date, d == "left" ? -1 : 1, _.mode)), s.end_date = a.date.add(s.start_date, o.x_step, o.x_unit))), s; - }, nextUnitsSlot: function(i, d, n) { - var _ = this.clone(i); - _.section = i.section || this._getNextSection(); - var o = i.section || this._getNextSection(), t = a.getState(), r = a._props[t.mode]; + return (s.start_date.valueOf() < _.min_date.valueOf() || s.start_date.valueOf() >= _.max_date.valueOf()) && (i && s.start_date.valueOf() >= _.max_date.valueOf() ? s.start_date = new Date(_.max_date) : (s.start_date = a.date[_.mode + "_start"](a.date.add(_.date, d == "left" ? -1 : 1, _.mode)), s.end_date = a.date.add(s.start_date, o.x_step, o.x_unit))), s; + }, nextUnitsSlot: function(r, d, i) { + var _ = this.clone(r); + _.section = r.section || this._getNextSection(); + var o = r.section || this._getNextSection(), t = a.getState(), n = a._props[t.mode]; switch (d) { case "left": - o = this._getNextSection(i.section, -1); - var s = r.size ? r.size - 1 : r.options.length; - r.days > 1 && r.order[o] == s - 1 && a.date.add(i.start_date, -1, "day").valueOf() >= t.min_date.valueOf() && (_ = this.nextDaySlot(i, d, n)); + o = this._getNextSection(r.section, -1); + var s = n.size ? n.size - 1 : n.options.length; + n.days > 1 && n.order[o] == s - 1 && a.date.add(r.start_date, -1, "day").valueOf() >= t.min_date.valueOf() && (_ = this.nextDaySlot(r, d, i)); break; case "right": - o = this._getNextSection(i.section, 1), r.days > 1 && !r.order[o] && a.date.add(i.start_date, 1, "day").valueOf() < t.max_date.valueOf() && (_ = this.nextDaySlot(i, d, n)); + o = this._getNextSection(r.section, 1), n.days > 1 && !n.order[o] && a.date.add(r.start_date, 1, "day").valueOf() < t.max_date.valueOf() && (_ = this.nextDaySlot(r, d, i)); break; default: - _ = this.nextDaySlot(i, d, n), o = i.section; + _ = this.nextDaySlot(r, d, i), o = r.section; } return _.section = o, _; - }, _moveDate: function(i, d) { - var n = this.findVisibleColumn(a.date.add(i, d, "day"), d); - return n.setHours(i.getHours()), n.setMinutes(i.getMinutes()), n; - }, isBeforeLastHour: function(i, d) { - var n = i.getMinutes(), _ = i.getHours(), o = a.config.last_hour; - return _ < o || !d && (o == 24 || _ == o) && !n; - }, isAfterFirstHour: function(i, d) { - var n = i.getMinutes(), _ = i.getHours(), o = a.config.first_hour, t = a.config.last_hour; - return _ >= o || !d && !n && (!_ && t == 24 || _ == t); - }, isInVisibleDayTime: function(i, d) { - return this.isBeforeLastHour(i, d) && this.isAfterFirstHour(i, d); - }, nextDaySlot: function(i, d, n) { - var _, o, t = a.config.key_nav_step, r = this._alignTimeSlot(i.start_date, a.date.day_start(new Date(i.start_date)), "minute", t), s = i.start_date; + }, _moveDate: function(r, d) { + var i = this.findVisibleColumn(a.date.add(r, d, "day"), d); + return i.setHours(r.getHours()), i.setMinutes(r.getMinutes()), i; + }, isBeforeLastHour: function(r, d) { + var i = r.getMinutes(), _ = r.getHours(), o = a.config.last_hour; + return _ < o || !d && (o == 24 || _ == o) && !i; + }, isAfterFirstHour: function(r, d) { + var i = r.getMinutes(), _ = r.getHours(), o = a.config.first_hour, t = a.config.last_hour; + return _ >= o || !d && !i && (!_ && t == 24 || _ == t); + }, isInVisibleDayTime: function(r, d) { + return this.isBeforeLastHour(r, d) && this.isAfterFirstHour(r, d); + }, nextDaySlot: function(r, d, i) { + var _, o, t = a.config.key_nav_step, n = this._alignTimeSlot(r.start_date, a.date.day_start(new Date(r.start_date)), "minute", t), s = r.start_date; switch (d) { case "up": - if (_ = a.date.add(r, -t, "minute"), !this.isInVisibleDayTime(_, !0) && (!n || this.isInVisibleDayTime(s, !0))) { + if (_ = a.date.add(n, -t, "minute"), !this.isInVisibleDayTime(_, !0) && (!i || this.isInVisibleDayTime(s, !0))) { var c = !0; - n && a.date.date_part(new Date(_)).valueOf() != a.date.date_part(new Date(s)).valueOf() && (c = !1), c && (_ = this.findVisibleColumn(a.date.add(i.start_date, -1, "day"), -1)), _.setHours(a.config.last_hour), _.setMinutes(0), _ = a.date.add(_, -t, "minute"); + i && a.date.date_part(new Date(_)).valueOf() != a.date.date_part(new Date(s)).valueOf() && (c = !1), c && (_ = this.findVisibleColumn(a.date.add(r.start_date, -1, "day"), -1)), _.setHours(a.config.last_hour), _.setMinutes(0), _ = a.date.add(_, -t, "minute"); } o = a.date.add(_, t, "minute"); break; case "down": - _ = a.date.add(r, t, "minute"); - var u = n ? _ : a.date.add(_, t, "minute"); - this.isInVisibleDayTime(u, !1) || n && !this.isInVisibleDayTime(s, !1) || (n ? (c = !0, a.date.date_part(new Date(s)).valueOf() == s.valueOf() && (c = !1), c && (_ = this.findVisibleColumn(a.date.add(i.start_date, 1, "day"), 1)), _.setHours(a.config.first_hour), _.setMinutes(0), _ = a.date.add(_, t, "minute")) : ((_ = this.findVisibleColumn(a.date.add(i.start_date, 1, "day"), 1)).setHours(a.config.first_hour), _.setMinutes(0))), o = a.date.add(_, t, "minute"); + _ = a.date.add(n, t, "minute"); + var u = i ? _ : a.date.add(_, t, "minute"); + this.isInVisibleDayTime(u, !1) || i && !this.isInVisibleDayTime(s, !1) || (i ? (c = !0, a.date.date_part(new Date(s)).valueOf() == s.valueOf() && (c = !1), c && (_ = this.findVisibleColumn(a.date.add(r.start_date, 1, "day"), 1)), _.setHours(a.config.first_hour), _.setMinutes(0), _ = a.date.add(_, t, "minute")) : ((_ = this.findVisibleColumn(a.date.add(r.start_date, 1, "day"), 1)).setHours(a.config.first_hour), _.setMinutes(0))), o = a.date.add(_, t, "minute"); break; case "left": - _ = this._moveDate(i.start_date, -1), o = this._moveDate(i.end_date, -1); + _ = this._moveDate(r.start_date, -1), o = this._moveDate(r.end_date, -1); break; case "right": - _ = this._moveDate(i.start_date, 1), o = this._moveDate(i.end_date, 1); + _ = this._moveDate(r.start_date, 1), o = this._moveDate(r.end_date, 1); break; default: - _ = r, o = a.date.add(_, t, "minute"); + _ = n, o = a.date.add(_, t, "minute"); } return { start_date: _, end_date: o }; - }, nextWeekAgendaSlot: function(i, d) { - var n, _, o = a.getState(); + }, nextWeekAgendaSlot: function(r, d) { + var i, _, o = a.getState(); switch (d) { case "down": case "left": - n = a.date.day_start(a.date.add(i.start_date, -1, "day")), n = this.findVisibleColumn(n, -1); + i = a.date.day_start(a.date.add(r.start_date, -1, "day")), i = this.findVisibleColumn(i, -1); break; case "up": case "right": - n = a.date.day_start(a.date.add(i.start_date, 1, "day")), n = this.findVisibleColumn(n, 1); + i = a.date.day_start(a.date.add(r.start_date, 1, "day")), i = this.findVisibleColumn(i, 1); break; default: - n = a.date.day_start(i.start_date); + i = a.date.day_start(r.start_date); } - return (i.start_date.valueOf() < o.min_date.valueOf() || i.start_date.valueOf() >= o.max_date.valueOf()) && (n = new Date(o.min_date)), (_ = new Date(n)).setHours(a.config.last_hour), { start_date: n, end_date: _ }; - }, nextAgendaSlot: function(i, d) { - return { start_date: i.start_date, end_date: i.end_date }; - }, isDateVisible: function(i) { + return (r.start_date.valueOf() < o.min_date.valueOf() || r.start_date.valueOf() >= o.max_date.valueOf()) && (i = new Date(o.min_date)), (_ = new Date(i)).setHours(a.config.last_hour), { start_date: i, end_date: _ }; + }, nextAgendaSlot: function(r, d) { + return { start_date: r.start_date, end_date: r.end_date }; + }, isDateVisible: function(r) { if (!a._ignores_detected) return !0; - var d, n = a.matrix && a.matrix[a.getState().mode]; - return d = n ? a._get_date_index(n, i) : a.locate_holder_day(i), !a._ignores[d]; - }, findVisibleColumn: function(i, d) { - var n = i; + var d, i = a.matrix && a.matrix[a.getState().mode]; + return d = i ? a._get_date_index(i, r) : a.locate_holder_day(r), !a._ignores[d]; + }, findVisibleColumn: function(r, d) { + var i = r; d = d || 1; - for (var _ = a.getState(); !this.isDateVisible(n) && (d > 0 && n.valueOf() <= _.max_date.valueOf() || d < 0 && n.valueOf() >= _.min_date.valueOf()); ) - n = this.nextDateColumn(n, d); - return n; - }, nextDateColumn: function(i, d) { + for (var _ = a.getState(); !this.isDateVisible(i) && (d > 0 && i.valueOf() <= _.max_date.valueOf() || d < 0 && i.valueOf() >= _.min_date.valueOf()); ) + i = this.nextDateColumn(i, d); + return i; + }, nextDateColumn: function(r, d) { d = d || 1; - var n = a.matrix && a.matrix[a.getState().mode]; - return n ? a.date.add(i, d * n.x_step, n.x_unit) : a.date.day_start(a.date.add(i, d, "day")); - }, isVisible: function(i, d) { + var i = a.matrix && a.matrix[a.getState().mode]; + return i ? a.date.add(r, d * i.x_step, i.x_unit) : a.date.day_start(a.date.add(r, d, "day")); + }, isVisible: function(r, d) { if (!a._ignores_detected) return !0; - for (var n = new Date(i); n.valueOf() < d.valueOf(); ) { - if (this.isDateVisible(n)) + for (var i = new Date(r); i.valueOf() < d.valueOf(); ) { + if (this.isDateVisible(i)) return !0; - n = this.nextDateColumn(n); + i = this.nextDateColumn(i); } return !1; - }, nextSlot: function(i, d, n, _) { + }, nextSlot: function(r, d, i, _) { var o; - n = n || this._getMode(); - var t = a.$keyboardNavigation.TimeSlot.prototype.clone(i); - switch (n) { + i = i || this._getMode(); + var t = a.$keyboardNavigation.TimeSlot.prototype.clone(r); + switch (i) { case this._modes.units: o = this.nextUnitsSlot(t, d, _); break; @@ -5486,65 +5501,65 @@ const lt = { active_links: function(e) { case this._modes.dayColumns: o = this.nextDaySlot(t, d, _); } - return o.start_date.valueOf() >= o.end_date.valueOf() && (o = this.nextSlot(o, d, n)), a.$keyboardNavigation.TimeSlot.prototype.clone(o); - }, extendSlot: function(i, d) { - var n; + return o.start_date.valueOf() >= o.end_date.valueOf() && (o = this.nextSlot(o, d, i)), a.$keyboardNavigation.TimeSlot.prototype.clone(o); + }, extendSlot: function(r, d) { + var i; switch (this._getMode()) { case this._modes.units: - n = d == "left" || d == "right" ? this.nextUnitsSlot(i, d) : this.extendUnitsSlot(i, d); + i = d == "left" || d == "right" ? this.nextUnitsSlot(r, d) : this.extendUnitsSlot(r, d); break; case this._modes.timeline: - n = d == "down" || d == "up" ? this.nextTimelineSlot(i, d) : this.extendTimelineSlot(i, d); + i = d == "down" || d == "up" ? this.nextTimelineSlot(r, d) : this.extendTimelineSlot(r, d); break; case this._modes.year: case this._modes.month: - n = this.extendMonthSlot(i, d); + i = this.extendMonthSlot(r, d); break; case this._modes.dayColumns: - n = this.extendDaySlot(i, d); + i = this.extendDaySlot(r, d); break; case this._modes.weekAgenda: - n = this.extendWeekAgendaSlot(i, d); + i = this.extendWeekAgendaSlot(r, d); break; default: - n = i; + i = r; } var _ = a.getState(); - return n.start_date.valueOf() < _.min_date.valueOf() && (n.start_date = this.findVisibleColumn(_.min_date), n.start_date.setHours(a.config.first_hour)), n.end_date.valueOf() > _.max_date.valueOf() && (n.end_date = this.findVisibleColumn(_.max_date, -1)), a.$keyboardNavigation.TimeSlot.prototype.clone(n); - }, extendTimelineSlot: function(i, d) { - return this.extendGenericSlot({ left: "start_date", right: "end_date" }, i, d, "timeline"); - }, extendWeekAgendaSlot: function(i, d) { - return this.extendGenericSlot({ left: "start_date", right: "end_date" }, i, d, "weekAgenda"); - }, extendGenericSlot: function(i, d, n, _) { + return i.start_date.valueOf() < _.min_date.valueOf() && (i.start_date = this.findVisibleColumn(_.min_date), i.start_date.setHours(a.config.first_hour)), i.end_date.valueOf() > _.max_date.valueOf() && (i.end_date = this.findVisibleColumn(_.max_date, -1)), a.$keyboardNavigation.TimeSlot.prototype.clone(i); + }, extendTimelineSlot: function(r, d) { + return this.extendGenericSlot({ left: "start_date", right: "end_date" }, r, d, "timeline"); + }, extendWeekAgendaSlot: function(r, d) { + return this.extendGenericSlot({ left: "start_date", right: "end_date" }, r, d, "weekAgenda"); + }, extendGenericSlot: function(r, d, i, _) { var o, t = d.movingDate; - if (t || (t = i[n]), !t || !i[n]) + if (t || (t = r[i]), !t || !r[i]) return d; - if (!n) + if (!i) return a.$keyboardNavigation.TimeSlot.prototype.clone(d); - (o = this.nextSlot({ start_date: d[t], section: d.section }, n, _, !0)).start_date.valueOf() == d.start_date.valueOf() && (o = this.nextSlot({ start_date: o.start_date, section: o.section }, n, _, !0)), o.movingDate = t; - var r = this.extendSlotDates(d, o, o.movingDate); - return r.end_date.valueOf() <= r.start_date.valueOf() && (o.movingDate = o.movingDate == "end_date" ? "start_date" : "end_date"), r = this.extendSlotDates(d, o, o.movingDate), o.start_date = r.start_date, o.end_date = r.end_date, o; - }, extendSlotDates: function(i, d, n) { + (o = this.nextSlot({ start_date: d[t], section: d.section }, i, _, !0)).start_date.valueOf() == d.start_date.valueOf() && (o = this.nextSlot({ start_date: o.start_date, section: o.section }, i, _, !0)), o.movingDate = t; + var n = this.extendSlotDates(d, o, o.movingDate); + return n.end_date.valueOf() <= n.start_date.valueOf() && (o.movingDate = o.movingDate == "end_date" ? "start_date" : "end_date"), n = this.extendSlotDates(d, o, o.movingDate), o.start_date = n.start_date, o.end_date = n.end_date, o; + }, extendSlotDates: function(r, d, i) { var _ = { start_date: null, end_date: null }; - return n == "start_date" ? (_.start_date = d.start_date, _.end_date = i.end_date) : (_.start_date = i.start_date, _.end_date = d.start_date), _; - }, extendMonthSlot: function(i, d) { - return (i = this.extendGenericSlot({ up: "start_date", down: "end_date", left: "start_date", right: "end_date" }, i, d, "month")).start_date.setHours(a.config.first_hour), i.end_date = a.date.add(i.end_date, -1, "day"), i.end_date.setHours(a.config.last_hour), i; - }, extendUnitsSlot: function(i, d) { - var n; + return i == "start_date" ? (_.start_date = d.start_date, _.end_date = r.end_date) : (_.start_date = r.start_date, _.end_date = d.start_date), _; + }, extendMonthSlot: function(r, d) { + return (r = this.extendGenericSlot({ up: "start_date", down: "end_date", left: "start_date", right: "end_date" }, r, d, "month")).start_date.setHours(a.config.first_hour), r.end_date = a.date.add(r.end_date, -1, "day"), r.end_date.setHours(a.config.last_hour), r; + }, extendUnitsSlot: function(r, d) { + var i; switch (d) { case "down": case "up": - n = this.extendDaySlot(i, d); + i = this.extendDaySlot(r, d); break; default: - n = i; - } - return n.section = i.section, n; - }, extendDaySlot: function(i, d) { - return this.extendGenericSlot({ up: "start_date", down: "end_date", left: "start_date", right: "end_date" }, i, d, "dayColumns"); - }, scrollSlot: function(i) { - var d = a.getState(), n = this.nextSlot(this, i); - (n.start_date.valueOf() < d.min_date.valueOf() || n.start_date.valueOf() >= d.max_date.valueOf()) && a.setCurrentView(new Date(n.start_date)), this.moveTo(n); + i = r; + } + return i.section = r.section, i; + }, extendDaySlot: function(r, d) { + return this.extendGenericSlot({ up: "start_date", down: "end_date", left: "start_date", right: "end_date" }, r, d, "dayColumns"); + }, scrollSlot: function(r) { + var d = a.getState(), i = this.nextSlot(this, r); + (i.start_date.valueOf() < d.min_date.valueOf() || i.start_date.valueOf() >= d.max_date.valueOf()) && a.setCurrentView(new Date(i.start_date)), this.moveTo(i); }, keys: { left: function() { this.scrollSlot("left"); }, right: function() { @@ -5562,104 +5577,104 @@ const lt = { active_links: function(e) { }, "shift+left": function() { this.moveTo(this.extendSlot(this, "left")); }, enter: function() { - var i = { start_date: new Date(this.start_date), end_date: new Date(this.end_date) }, d = a.getState().mode; - a.matrix && a.matrix[d] ? i[a.matrix[a.getState().mode].y_property] = this.section : a._props && a._props[d] && (i[a._props[d].map_to] = this.section), a.addEventNow(i); + var r = { start_date: new Date(this.start_date), end_date: new Date(this.end_date) }, d = a.getState().mode; + a.matrix && a.matrix[d] ? r[a.matrix[a.getState().mode].y_property] = this.section : a._props && a._props[d] && (r[a._props[d].map_to] = this.section), a.addEventNow(r); } } }), a.$keyboardNavigation.TimeSlot.prototype.bindAll(a.$keyboardNavigation.TimeSlot.prototype.keys); }(e), function(a) { - a.$keyboardNavigation.MinicalButton = function(i, d) { - this.container = i, this.index = d || 0; + a.$keyboardNavigation.MinicalButton = function(r, d) { + this.container = r, this.index = d || 0; }, a.$keyboardNavigation.MinicalButton.prototype = a._compose(a.$keyboardNavigation.KeyNavNode, { isValid: function() { return !!this.container.offsetWidth; }, fallback: function() { - var i = new a.$keyboardNavigation.TimeSlot(); - return i.isValid() ? i : new a.$keyboardNavigation.DataArea(); + var r = new a.$keyboardNavigation.TimeSlot(); + return r.isValid() ? r : new a.$keyboardNavigation.DataArea(); }, focus: function() { a.$keyboardNavigation.dispatcher.globalNode.disable(), this.container.removeAttribute("tabindex"), a.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this); }, blur: function() { this.container.setAttribute("tabindex", "0"), a.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this); }, getNode: function() { return this.index ? this.container.querySelector(".dhx_cal_next_button") : this.container.querySelector(".dhx_cal_prev_button"); - }, keys: { right: function(i) { + }, keys: { right: function(r) { this.moveTo(new a.$keyboardNavigation.MinicalButton(this.container, this.index ? 0 : 1)); - }, left: function(i) { + }, left: function(r) { this.moveTo(new a.$keyboardNavigation.MinicalButton(this.container, this.index ? 0 : 1)); }, down: function() { - var i = new a.$keyboardNavigation.MinicalCell(this.container, 0, 0); - i && !i.isValid() && (i = i.fallback()), this.moveTo(i); - }, enter: function(i) { + var r = new a.$keyboardNavigation.MinicalCell(this.container, 0, 0); + r && !r.isValid() && (r = r.fallback()), this.moveTo(r); + }, enter: function(r) { this.getNode().click(); } } }), a.$keyboardNavigation.MinicalButton.prototype.bindAll(a.$keyboardNavigation.MinicalButton.prototype.keys); }(e), function(a) { - a.$keyboardNavigation.MinicalCell = function(i, d, n) { - this.container = i, this.row = d || 0, this.col = n || 0; + a.$keyboardNavigation.MinicalCell = function(r, d, i) { + this.container = r, this.row = d || 0, this.col = i || 0; }, a.$keyboardNavigation.MinicalCell.prototype = a._compose(a.$keyboardNavigation.KeyNavNode, { isValid: function() { - var i = this._getGrid(); - return !(!i[this.row] || !i[this.row][this.col]); + var r = this._getGrid(); + return !(!r[this.row] || !r[this.row][this.col]); }, fallback: function() { - var i = this.row, d = this.col, n = this._getGrid(); - n[i] || (i = 0); + var r = this.row, d = this.col, i = this._getGrid(); + i[r] || (r = 0); var _ = !0; - if (i > n.length / 2 && (_ = !1), !n[i]) { + if (r > i.length / 2 && (_ = !1), !i[r]) { var o = new a.$keyboardNavigation.TimeSlot(); return o.isValid() ? o : new a.$keyboardNavigation.DataArea(); } if (_) { - for (var t = d; n[i] && t < n[i].length; t++) - if (n[i][t] || t != n[i].length - 1 || (i++, d = 0), n[i][t]) - return new a.$keyboardNavigation.MinicalCell(this.container, i, t); + for (var t = d; i[r] && t < i[r].length; t++) + if (i[r][t] || t != i[r].length - 1 || (r++, d = 0), i[r][t]) + return new a.$keyboardNavigation.MinicalCell(this.container, r, t); } else - for (t = d; n[i] && t < n[i].length; t--) - if (n[i][t] || t || (d = n[--i].length - 1), n[i][t]) - return new a.$keyboardNavigation.MinicalCell(this.container, i, t); + for (t = d; i[r] && t < i[r].length; t--) + if (i[r][t] || t || (d = i[--r].length - 1), i[r][t]) + return new a.$keyboardNavigation.MinicalCell(this.container, r, t); return new a.$keyboardNavigation.MinicalButton(this.container, 0); }, focus: function() { a.$keyboardNavigation.dispatcher.globalNode.disable(), this.container.removeAttribute("tabindex"), a.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this); }, blur: function() { this.container.setAttribute("tabindex", "0"), a.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this); - }, _getNode: function(i, d) { - return this.container.querySelector(".dhx_year_body tr:nth-child(" + (i + 1) + ") td:nth-child(" + (d + 1) + ")"); + }, _getNode: function(r, d) { + return this.container.querySelector(".dhx_year_body tr:nth-child(" + (r + 1) + ") td:nth-child(" + (d + 1) + ")"); }, getNode: function() { return this._getNode(this.row, this.col); }, _getGrid: function() { - for (var i = this.container.querySelectorAll(".dhx_year_body tr"), d = [], n = 0; n < i.length; n++) { - d[n] = []; - for (var _ = i[n].querySelectorAll("td"), o = 0; o < _.length; o++) { - var t = _[o], r = !0, s = a._getClassName(t); - (s.indexOf("dhx_after") > -1 || s.indexOf("dhx_before") > -1 || s.indexOf("dhx_scale_ignore") > -1) && (r = !1), d[n][o] = r; + for (var r = this.container.querySelectorAll(".dhx_year_body tr"), d = [], i = 0; i < r.length; i++) { + d[i] = []; + for (var _ = r[i].querySelectorAll("td"), o = 0; o < _.length; o++) { + var t = _[o], n = !0, s = a._getClassName(t); + (s.indexOf("dhx_after") > -1 || s.indexOf("dhx_before") > -1 || s.indexOf("dhx_scale_ignore") > -1) && (n = !1), d[i][o] = n; } } return d; - }, keys: { right: function(i) { - var d = this._getGrid(), n = this.row, _ = this.col + 1; - d[n] && d[n][_] || (d[n + 1] ? (n += 1, _ = 0) : _ = this.col); - var o = new a.$keyboardNavigation.MinicalCell(this.container, n, _); + }, keys: { right: function(r) { + var d = this._getGrid(), i = this.row, _ = this.col + 1; + d[i] && d[i][_] || (d[i + 1] ? (i += 1, _ = 0) : _ = this.col); + var o = new a.$keyboardNavigation.MinicalCell(this.container, i, _); o.isValid() || (o = o.fallback()), this.moveTo(o); - }, left: function(i) { - var d = this._getGrid(), n = this.row, _ = this.col - 1; - d[n] && d[n][_] || (_ = d[n - 1] ? d[n -= 1].length - 1 : this.col); - var o = new a.$keyboardNavigation.MinicalCell(this.container, n, _); + }, left: function(r) { + var d = this._getGrid(), i = this.row, _ = this.col - 1; + d[i] && d[i][_] || (_ = d[i - 1] ? d[i -= 1].length - 1 : this.col); + var o = new a.$keyboardNavigation.MinicalCell(this.container, i, _); o.isValid() || (o = o.fallback()), this.moveTo(o); }, down: function() { - var i = this._getGrid(), d = this.row + 1, n = this.col; - i[d] && i[d][n] || (d = this.row); - var _ = new a.$keyboardNavigation.MinicalCell(this.container, d, n); + var r = this._getGrid(), d = this.row + 1, i = this.col; + r[d] && r[d][i] || (d = this.row); + var _ = new a.$keyboardNavigation.MinicalCell(this.container, d, i); _.isValid() || (_ = _.fallback()), this.moveTo(_); }, up: function() { - var i = this._getGrid(), d = this.row - 1, n = this.col; - if (i[d] && i[d][n]) { - var _ = new a.$keyboardNavigation.MinicalCell(this.container, d, n); + var r = this._getGrid(), d = this.row - 1, i = this.col; + if (r[d] && r[d][i]) { + var _ = new a.$keyboardNavigation.MinicalCell(this.container, d, i); _.isValid() || (_ = _.fallback()), this.moveTo(_); } else { var o = 0; - this.col > i[this.row].length / 2 && (o = 1), this.moveTo(new a.$keyboardNavigation.MinicalButton(this.container, o)); + this.col > r[this.row].length / 2 && (o = 1), this.moveTo(new a.$keyboardNavigation.MinicalButton(this.container, o)); } - }, enter: function(i) { + }, enter: function(r) { this.getNode().querySelector(".dhx_month_head").click(); } } }), a.$keyboardNavigation.MinicalCell.prototype.bindAll(a.$keyboardNavigation.MinicalCell.prototype.keys); }(e), function(a) { - a.$keyboardNavigation.DataArea = function(i) { - this.index = i || 0; - }, a.$keyboardNavigation.DataArea.prototype = a._compose(a.$keyboardNavigation.KeyNavNode, { getNode: function(i) { + a.$keyboardNavigation.DataArea = function(r) { + this.index = r || 0; + }, a.$keyboardNavigation.DataArea.prototype = a._compose(a.$keyboardNavigation.KeyNavNode, { getNode: function(r) { return a.$container.querySelector(".dhx_cal_data"); }, _handlers: null, isValid: function() { return !0; @@ -5669,15 +5684,15 @@ const lt = { active_links: function(e) { this.moveTo(new a.$keyboardNavigation.TimeSlot()); } } }), a.$keyboardNavigation.DataArea.prototype.bindAll(a.$keyboardNavigation.DataArea.prototype.keys); }(e), rt(e), function(a) { - a.$keyboardNavigation.dispatcher = { isActive: !1, activeNode: null, globalNode: new a.$keyboardNavigation.SchedulerNode(), keepScrollPosition: function(i) { - var d, n, _ = a.$container.querySelector(".dhx_timeline_scrollable_data"); - _ || (_ = a.$container.querySelector(".dhx_cal_data")), _ && (d = _.scrollTop, n = _.scrollLeft), i(), _ && (_.scrollTop = d, _.scrollLeft = n); + a.$keyboardNavigation.dispatcher = { isActive: !1, activeNode: null, globalNode: new a.$keyboardNavigation.SchedulerNode(), keepScrollPosition: function(r) { + var d, i, _ = a.$container.querySelector(".dhx_timeline_scrollable_data"); + _ || (_ = a.$container.querySelector(".dhx_cal_data")), _ && (d = _.scrollTop, i = _.scrollLeft), r(), _ && (_.scrollTop = d, _.scrollLeft = i); }, enable: function() { if (a.$container) { this.isActive = !0; - var i = this; + var r = this; this.keepScrollPosition(function() { - i.globalNode.enable(), i.setActiveNode(i.getActiveNode()); + r.globalNode.enable(), r.setActiveNode(r.getActiveNode()); }); } }, disable: function() { @@ -5689,45 +5704,45 @@ const lt = { active_links: function(e) { }, setDefaultNode: function() { this.setActiveNode(this.getDefaultNode()); }, getActiveNode: function() { - var i = this.activeNode; - return i && !i.isValid() && (i = i.fallback()), i; + var r = this.activeNode; + return r && !r.isValid() && (r = r.fallback()), r; }, focusGlobalNode: function() { this.blurNode(this.globalNode), this.focusNode(this.globalNode); - }, setActiveNode: function(i) { - i && i.isValid() && (this.activeNode && this.activeNode.compareTo(i) || this.isEnabled() && (this.blurNode(this.activeNode), this.activeNode = i, this.focusNode(this.activeNode))); - }, focusNode: function(i) { - i && i.focus && (i.focus(), i.getNode && document.activeElement != i.getNode() && this.setActiveNode(new a.$keyboardNavigation.DataArea())); - }, blurNode: function(i) { - i && i.blur && i.blur(); - }, getInlineEditor: function(i) { - var d = a.$container.querySelector(".dhx_cal_editor[" + a.config.event_attribute + "='" + i + "'] textarea"); + }, setActiveNode: function(r) { + r && r.isValid() && (this.activeNode && this.activeNode.compareTo(r) || this.isEnabled() && (this.blurNode(this.activeNode), this.activeNode = r, this.focusNode(this.activeNode))); + }, focusNode: function(r) { + r && r.focus && (r.focus(), r.getNode && document.activeElement != r.getNode() && this.setActiveNode(new a.$keyboardNavigation.DataArea())); + }, blurNode: function(r) { + r && r.blur && r.blur(); + }, getInlineEditor: function(r) { + var d = a.$container.querySelector(".dhx_cal_editor[" + a.config.event_attribute + "='" + r + "'] textarea"); return d && d.offsetWidth ? d : null; - }, keyDownHandler: function(i) { - if (!i.defaultPrevented) { + }, keyDownHandler: function(r) { + if (!r.defaultPrevented) { var d = this.getActiveNode(); if ((!a.$keyboardNavigation.isModal() || d && d.container && a.utils.dom.locateCss({ target: d.container }, "dhx_minical_popup", !1)) && (!a.getState().editor_id || !this.getInlineEditor(a.getState().editor_id)) && this.isEnabled()) { - i = i || window.event; - var n = this.globalNode, _ = a.$keyboardNavigation.shortcuts.getCommandFromEvent(i); - d ? d.findHandler(_) ? d.doAction(_, i) : n.findHandler(_) && n.doAction(_, i) : this.setDefaultNode(); + r = r || window.event; + var i = this.globalNode, _ = a.$keyboardNavigation.shortcuts.getCommandFromEvent(r); + d ? d.findHandler(_) ? d.doAction(_, r) : i.findHandler(_) && i.doAction(_, r) : this.setDefaultNode(); } } - }, _timeout: null, delay: function(i, d) { - clearTimeout(this._timeout), this._timeout = setTimeout(i, d || 1); + }, _timeout: null, delay: function(r, d) { + clearTimeout(this._timeout), this._timeout = setTimeout(r, d || 1); } }; }(e), ot(e), function() { st(e), function(o) { o.$keyboardNavigation._minicalendars = [], o.$keyboardNavigation.isMinical = function(t) { - for (var r = o.$keyboardNavigation._minicalendars, s = 0; s < r.length; s++) - if (this.isChildOf(t, r[s])) + for (var n = o.$keyboardNavigation._minicalendars, s = 0; s < n.length; s++) + if (this.isChildOf(t, n[s])) return !0; return !1; - }, o.$keyboardNavigation.isChildOf = function(t, r) { - for (; t && t !== r; ) + }, o.$keyboardNavigation.isChildOf = function(t, n) { + for (; t && t !== n; ) t = t.parentNode; - return t === r; + return t === n; }, o.$keyboardNavigation.patchMinicalendar = function() { var t = o.$keyboardNavigation.dispatcher; - function r(v) { + function n(v) { var m = v.target; t.enable(), t.setActiveNode(new o.$keyboardNavigation.MinicalButton(m, 0)); } @@ -5760,7 +5775,7 @@ const lt = { active_links: function(e) { var c = o.renderCalendar; o.renderCalendar = function() { var v = c.apply(this, arguments), m = o.$keyboardNavigation._minicalendars; - o.eventRemove(v, "click", s), o.event(v, "click", s), o.eventRemove(v, "focus", r), o.event(v, "focus", r); + o.eventRemove(v, "click", s), o.event(v, "click", s), o.eventRemove(v, "focus", n), o.event(v, "focus", n); for (var l = !1, f = 0; f < m.length; f++) if (m[f] == v) { l = !0; @@ -5781,7 +5796,7 @@ const lt = { active_links: function(e) { var l = u.apply(this, arguments); if (!v || !v.parentNode) for (var f = o.$keyboardNavigation._minicalendars, g = 0; g < f.length; g++) - f[g] == v && (o.eventRemove(f[g], "focus", r), f.splice(g, 1), g--); + f[g] == v && (o.eventRemove(f[g], "focus", n), f.splice(g, 1), g--); return l; }; } @@ -5791,8 +5806,8 @@ const lt = { active_links: function(e) { if (e.$keyboardNavigation.attachSchedulerHandlers(), e.renderCalendar) e.$keyboardNavigation.patchMinicalendar(); else - var i = e.attachEvent("onSchedulerReady", function() { - e.detachEvent(i), e.$keyboardNavigation.patchMinicalendar(); + var r = e.attachEvent("onSchedulerReady", function() { + e.detachEvent(r), e.$keyboardNavigation.patchMinicalendar(); }); function d() { if (e.config.key_nav) { @@ -5800,14 +5815,14 @@ const lt = { active_links: function(e) { return !(!o || e.utils.dom.locateCss(o, "dhx_cal_quick_info", !1)) && (e.$keyboardNavigation.isChildOf(o, e.$container) || e.$keyboardNavigation.isMinical(o)); } } - function n(o) { + function i(o) { o && !a.isEnabled() ? a.enable() : !o && a.isEnabled() && a.disable(); } const _ = setInterval(function() { if (e.$container && e.$keyboardNavigation.isChildOf(e.$container, document.body)) { var o = d(); - o ? n(o) : !o && a.isEnabled() && setTimeout(function() { - e.$destroyed || (e.config.key_nav ? n(d()) : e.$container.removeAttribute("tabindex")); + o ? i(o) : !o && a.isEnabled() && setTimeout(function() { + e.$destroyed || (e.config.key_nav ? i(d()) : e.$container.removeAttribute("tabindex")); }, 100); } }, 500); @@ -5817,97 +5832,97 @@ const lt = { active_links: function(e) { }(); }, layer: function(e) { e.attachEvent("onTemplatesReady", function() { - this.layers.sort(function(a, i) { - return a.zIndex - i.zIndex; + this.layers.sort(function(a, r) { + return a.zIndex - r.zIndex; }), e._dp_init = function(a) { - a._methods = ["_set_event_text_style", "", "changeEventId", "deleteEvent"], this.attachEvent("onEventAdded", function(i) { - !this._loading && this.validId(i) && this.getEvent(i) && this.getEvent(i).layer == a.layer && a.setUpdated(i, !0, "inserted"); - }), this.attachEvent("onBeforeEventDelete", function(i) { - if (this.getEvent(i) && this.getEvent(i).layer == a.layer) { - if (!this.validId(i)) + a._methods = ["_set_event_text_style", "", "changeEventId", "deleteEvent"], this.attachEvent("onEventAdded", function(r) { + !this._loading && this.validId(r) && this.getEvent(r) && this.getEvent(r).layer == a.layer && a.setUpdated(r, !0, "inserted"); + }), this.attachEvent("onBeforeEventDelete", function(r) { + if (this.getEvent(r) && this.getEvent(r).layer == a.layer) { + if (!this.validId(r)) return; - var d = a.getState(i); - return d == "inserted" || this._new_event ? (a.setUpdated(i, !1), !0) : d != "deleted" && (d == "true_deleted" || (a.setUpdated(i, !0, "deleted"), !1)); + var d = a.getState(r); + return d == "inserted" || this._new_event ? (a.setUpdated(r, !1), !0) : d != "deleted" && (d == "true_deleted" || (a.setUpdated(r, !0, "deleted"), !1)); } return !0; - }), this.attachEvent("onEventChanged", function(i) { - !this._loading && this.validId(i) && this.getEvent(i) && this.getEvent(i).layer == a.layer && a.setUpdated(i, !0, "updated"); - }), a._getRowData = function(i, d) { - var n = this.obj.getEvent(i), _ = {}; - for (var o in n) - o.indexOf("_") !== 0 && (n[o] && n[o].getUTCFullYear ? _[o] = this.obj._helpers.formatDate(n[o]) : _[o] = n[o]); + }), this.attachEvent("onEventChanged", function(r) { + !this._loading && this.validId(r) && this.getEvent(r) && this.getEvent(r).layer == a.layer && a.setUpdated(r, !0, "updated"); + }), a._getRowData = function(r, d) { + var i = this.obj.getEvent(r), _ = {}; + for (var o in i) + o.indexOf("_") !== 0 && (i[o] && i[o].getUTCFullYear ? _[o] = this.obj._helpers.formatDate(i[o]) : _[o] = i[o]); return _; }, a._clearUpdateFlag = function() { - }, a.attachEvent("insertCallback", e._update_callback), a.attachEvent("updateCallback", e._update_callback), a.attachEvent("deleteCallback", function(i, d) { + }, a.attachEvent("insertCallback", e._update_callback), a.attachEvent("updateCallback", e._update_callback), a.attachEvent("deleteCallback", function(r, d) { this.obj.setUserData(d, this.action_param, "true_deleted"), this.obj.deleteEvent(d); }); }, function() { - var a = function(n) { - if (n === null || typeof n != "object") - return n; - var _ = new n.constructor(); - for (var o in n) - _[o] = a(n[o]); + var a = function(i) { + if (i === null || typeof i != "object") + return i; + var _ = new i.constructor(); + for (var o in i) + _[o] = a(i[o]); return _; }; e._dataprocessors = [], e._layers_zindex = {}; - for (var i = 0; i < e.layers.length; i++) { - if (e.config["lightbox_" + e.layers[i].name] = {}, e.config["lightbox_" + e.layers[i].name].sections = a(e.config.lightbox.sections), e._layers_zindex[e.layers[i].name] = e.config.initial_layer_zindex || 5 + 3 * i, e.layers[i].url) { - var d = e.createDataProcessor({ url: e.layers[i].url }); - d.layer = e.layers[i].name, e._dataprocessors.push(d), e._dataprocessors[i].init(e); + for (var r = 0; r < e.layers.length; r++) { + if (e.config["lightbox_" + e.layers[r].name] = {}, e.config["lightbox_" + e.layers[r].name].sections = a(e.config.lightbox.sections), e._layers_zindex[e.layers[r].name] = e.config.initial_layer_zindex || 5 + 3 * r, e.layers[r].url) { + var d = e.createDataProcessor({ url: e.layers[r].url }); + d.layer = e.layers[r].name, e._dataprocessors.push(d), e._dataprocessors[r].init(e); } - e.layers[i].isDefault && (e.defaultLayer = e.layers[i].name); + e.layers[r].isDefault && (e.defaultLayer = e.layers[r].name); } }(), e.showLayer = function(a) { this.toggleLayer(a, !0); }, e.hideLayer = function(a) { this.toggleLayer(a, !1); - }, e.toggleLayer = function(a, i) { + }, e.toggleLayer = function(a, r) { var d = this.getLayer(a); - d.visible = i !== void 0 ? !!i : !d.visible, this.setCurrentView(this._date, this._mode); + d.visible = r !== void 0 ? !!r : !d.visible, this.setCurrentView(this._date, this._mode); }, e.getLayer = function(a) { - var i, d; + var r, d; typeof a == "string" && (d = a), typeof a == "object" && (d = a.layer); - for (var n = 0; n < e.layers.length; n++) - e.layers[n].name == d && (i = e.layers[n]); - return i; + for (var i = 0; i < e.layers.length; i++) + e.layers[i].name == d && (r = e.layers[i]); + return r; }, e.attachEvent("onBeforeLightbox", function(a) { - var i = this.getEvent(a); - return this.config.lightbox.sections = this.config["lightbox_" + i.layer].sections, e.resetLightbox(), !0; - }), e.attachEvent("onClick", function(a, i) { + var r = this.getEvent(a); + return this.config.lightbox.sections = this.config["lightbox_" + r.layer].sections, e.resetLightbox(), !0; + }), e.attachEvent("onClick", function(a, r) { var d = e.getEvent(a); return !e.getLayer(d.layer).noMenu; - }), e.attachEvent("onEventCollision", function(a, i) { + }), e.attachEvent("onEventCollision", function(a, r) { var d = this.getLayer(a); if (!d.checkCollision) return !1; - for (var n = 0, _ = 0; _ < i.length; _++) - i[_].layer == d.name && i[_].id != a.id && n++; - return n >= e.config.collision_limit; - }), e.addEvent = function(a, i, d, n, _) { + for (var i = 0, _ = 0; _ < r.length; _++) + r[_].layer == d.name && r[_].id != a.id && i++; + return i >= e.config.collision_limit; + }), e.addEvent = function(a, r, d, i, _) { var o = a; - arguments.length != 1 && ((o = _ || {}).start_date = a, o.end_date = i, o.text = d, o.id = n, o.layer = this.defaultLayer), o.id = o.id || e.uid(), o.text = o.text || "", typeof o.start_date == "string" && (o.start_date = this.templates.api_date(o.start_date)), typeof o.end_date == "string" && (o.end_date = this.templates.api_date(o.end_date)), o._timed = this.isOneDayEvent(o); + arguments.length != 1 && ((o = _ || {}).start_date = a, o.end_date = r, o.text = d, o.id = i, o.layer = this.defaultLayer), o.id = o.id || e.uid(), o.text = o.text || "", typeof o.start_date == "string" && (o.start_date = this.templates.api_date(o.start_date)), typeof o.end_date == "string" && (o.end_date = this.templates.api_date(o.end_date)), o._timed = this.isOneDayEvent(o); var t = !this._events[o.id]; this._events[o.id] = o, this.event_updated(o), this._loading || this.callEvent(t ? "onEventAdded" : "onEventChanged", [o.id, o]); }, this._evs_layer = {}; for (var h = 0; h < this.layers.length; h++) this._evs_layer[this.layers[h].name] = []; - e.addEventNow = function(a, i, d) { - var n = {}; - typeof a == "object" && (n = a, a = null); + e.addEventNow = function(a, r, d) { + var i = {}; + typeof a == "object" && (i = a, a = null); var _ = 6e4 * (this.config.event_duration || this.config.time_step); a || (a = Math.round(e._currentDate().valueOf() / _) * _); var o = new Date(a); - if (!i) { + if (!r) { var t = this.config.first_hour; - t > o.getHours() && (o.setHours(t), a = o.valueOf()), i = a + _; + t > o.getHours() && (o.setHours(t), a = o.valueOf()), r = a + _; } - n.start_date = n.start_date || o, n.end_date = n.end_date || new Date(i), n.text = n.text || this.locale.labels.new_event, n.id = this._drag_id = this.uid(), n.layer = this.defaultLayer, this._drag_mode = "new-size", this._loading = !0, this.addEvent(n), this.callEvent("onEventCreated", [this._drag_id, d]), this._loading = !1, this._drag_event = {}, this._on_mouse_up(d); + i.start_date = i.start_date || o, i.end_date = i.end_date || new Date(r), i.text = i.text || this.locale.labels.new_event, i.id = this._drag_id = this.uid(), i.layer = this.defaultLayer, this._drag_mode = "new-size", this._loading = !0, this.addEvent(i), this.callEvent("onEventCreated", [this._drag_id, d]), this._loading = !1, this._drag_event = {}, this._on_mouse_up(d); }, e._t_render_view_data = function(a) { if (this.config.multi_day && !this._table_view) { - for (var i = [], d = [], n = 0; n < a.length; n++) - a[n]._timed ? i.push(a[n]) : d.push(a[n]); - this._table_view = !0, this.render_data(d), this._table_view = !1, this.render_data(i); + for (var r = [], d = [], i = 0; i < a.length; i++) + a[i]._timed ? r.push(a[i]) : d.push(a[i]); + this._table_view = !0, this.render_data(d), this._table_view = !1, this.render_data(r); } else this.render_data(a); }, e.render_view_data = function() { @@ -5917,9 +5932,9 @@ const lt = { active_links: function(e) { this._render_wait = !1, this.clear_view(), this._evs_layer = {}; for (var a = 0; a < this.layers.length; a++) this._evs_layer[this.layers[a].name] = []; - var i = this.get_visible_events(); - for (a = 0; a < i.length; a++) - this._evs_layer[i[a].layer] && this._evs_layer[i[a].layer].push(i[a]); + var r = this.get_visible_events(); + for (a = 0; a < r.length; a++) + this._evs_layer[r[a].layer] && this._evs_layer[r[a].layer].push(r[a]); if (this._mode == "month") { var d = []; for (a = 0; a < this.layers.length; a++) @@ -5928,38 +5943,38 @@ const lt = { active_links: function(e) { } else for (a = 0; a < this.layers.length; a++) if (this.layers[a].visible) { - var n = this._evs_layer[this.layers[a].name]; - this._t_render_view_data(n); + var i = this._evs_layer[this.layers[a].name]; + this._t_render_view_data(i); } } - }, e._render_v_bar = function(a, i, d, n, _, o, t, r, s) { + }, e._render_v_bar = function(a, r, d, i, _, o, t, n, s) { var c = a.id; - t.indexOf("
'; - return k += '
 
', k += '
' + t + "
", k += '
' + r + "
", k += '
', u.innerHTML = k, u.style.zIndex = 100, u.firstChild; + var l = e._border_box_events(), f = i - 2, g = l ? f : i - 4, p = l ? f : i - 6, y = l ? f : i - 14, w = l ? f - 2 : i - 8, b = l ? _ - this.xy.event_header_height : _ - 30 + 1, k = '
'; + return k += '
 
', k += '
' + t + "
", k += '
' + n + "
", k += '
', u.innerHTML = k, u.style.zIndex = 100, u.firstChild; }, e.render_event_bar = function(a) { - var i = this._els.dhx_cal_data[0], d = this._colsS[a._sday], n = this._colsS[a._eday]; - n == d && (n = this._colsS[a._eday + 1]); - var _ = this.xy.bar_height, o = this._colsS.heights[a._sweek] + (this._colsS.height ? this.xy.month_scale_height + 2 : 2) + a._sorder * _, t = document.createElement("div"), r = a._timed ? "dhx_cal_event_clear" : "dhx_cal_event_line", s = e.templates["event_class_" + a.layer] ? e.templates["event_class_" + a.layer](a.start_date, a.end_date, a) : e.templates.event_class(a.start_date, a.end_date, a); - s && (r = r + " " + s); - var c = '
'; - a._timed && (c += e.templates["event_bar_date_" + a.layer] ? e.templates["event_bar_date_" + a.layer](a.start_date, a.end_date, a) : e.templates.event_bar_date(a.start_date, a.end_date, a)), c += e.templates["event_bar_text_" + a.layer] ? e.templates["event_bar_text_" + a.layer](a.start_date, a.end_date, a) : e.templates.event_bar_text(a.start_date, a.end_date, a) + "
)", c += "
", t.innerHTML = c, this._rendered.push(t.firstChild), i.appendChild(t.firstChild); + var r = this._els.dhx_cal_data[0], d = this._colsS[a._sday], i = this._colsS[a._eday]; + i == d && (i = this._colsS[a._eday + 1]); + var _ = this.xy.bar_height, o = this._colsS.heights[a._sweek] + (this._colsS.height ? this.xy.month_scale_height + 2 : 2) + a._sorder * _, t = document.createElement("div"), n = a._timed ? "dhx_cal_event_clear" : "dhx_cal_event_line", s = e.templates["event_class_" + a.layer] ? e.templates["event_class_" + a.layer](a.start_date, a.end_date, a) : e.templates.event_class(a.start_date, a.end_date, a); + s && (n = n + " " + s); + var c = '
'; + a._timed && (c += e.templates["event_bar_date_" + a.layer] ? e.templates["event_bar_date_" + a.layer](a.start_date, a.end_date, a) : e.templates.event_bar_date(a.start_date, a.end_date, a)), c += e.templates["event_bar_text_" + a.layer] ? e.templates["event_bar_text_" + a.layer](a.start_date, a.end_date, a) : e.templates.event_bar_text(a.start_date, a.end_date, a) + "
)", c += "", t.innerHTML = c, this._rendered.push(t.firstChild), r.appendChild(t.firstChild); }, e.render_event = function(a) { - var i = e.xy.menu_width; - if (e.getLayer(a.layer).noMenu && (i = 0), !(a._sday < 0)) { + var r = e.xy.menu_width; + if (e.getLayer(a.layer).noMenu && (r = 0), !(a._sday < 0)) { var d = e.locate_holder(a._sday); if (d) { - var n = 60 * a.start_date.getHours() + a.start_date.getMinutes(), _ = 60 * a.end_date.getHours() + a.end_date.getMinutes() || 60 * e.config.last_hour, o = Math.round((60 * n * 1e3 - 60 * this.config.first_hour * 60 * 1e3) * this.config.hour_size_px / 36e5) % (24 * this.config.hour_size_px) + 1, t = Math.max(e.xy.min_event_height, (_ - n) * this.config.hour_size_px / 60) + 1, r = Math.floor((d.clientWidth - i) / a._count), s = a._sorder * r + 1; - a._inner || (r *= a._count - a._sorder); - var c = this._render_v_bar(a.id, i + s, o, r, t, a._text_style, e.templates.event_header(a.start_date, a.end_date, a), e.templates.event_text(a.start_date, a.end_date, a)); - if (this._rendered.push(c), d.appendChild(c), s = s + parseInt(d.style.left, 10) + i, o += this._dy_shift, c.style.zIndex = this._layers_zindex[a.layer], this._edit_id == a.id) { + var i = 60 * a.start_date.getHours() + a.start_date.getMinutes(), _ = 60 * a.end_date.getHours() + a.end_date.getMinutes() || 60 * e.config.last_hour, o = Math.round((60 * i * 1e3 - 60 * this.config.first_hour * 60 * 1e3) * this.config.hour_size_px / 36e5) % (24 * this.config.hour_size_px) + 1, t = Math.max(e.xy.min_event_height, (_ - i) * this.config.hour_size_px / 60) + 1, n = Math.floor((d.clientWidth - r) / a._count), s = a._sorder * n + 1; + a._inner || (n *= a._count - a._sorder); + var c = this._render_v_bar(a.id, r + s, o, n, t, a._text_style, e.templates.event_header(a.start_date, a.end_date, a), e.templates.event_text(a.start_date, a.end_date, a)); + if (this._rendered.push(c), d.appendChild(c), s = s + parseInt(d.style.left, 10) + r, o += this._dy_shift, c.style.zIndex = this._layers_zindex[a.layer], this._edit_id == a.id) { c.style.zIndex = parseInt(c.style.zIndex) + 1; var u = c.style.zIndex; - r = Math.max(r - 4, e.xy.editor_width), (c = document.createElement("div")).setAttribute("event_id", a.id), c.setAttribute(this.config.event_attribute, a.id), this.set_xy(c, r, t - 20, s, o + 14), c.className = "dhx_cal_editor", c.style.zIndex = u; + n = Math.max(n - 4, e.xy.editor_width), (c = document.createElement("div")).setAttribute("event_id", a.id), c.setAttribute(this.config.event_attribute, a.id), this.set_xy(c, n, t - 20, s, o + 14), c.className = "dhx_cal_editor", c.style.zIndex = u; var v = document.createElement("div"); - this.set_xy(v, r - 6, t - 26), v.style.cssText += ";margin:2px 2px 2px 2px;overflow:hidden;", v.style.zIndex = u, c.appendChild(v), this._els.dhx_cal_data[0].appendChild(c), this._rendered.push(c), v.innerHTML = "", this._editor = v.firstChild, this._editor.addEventListener("keypress", function(p) { + this.set_xy(v, n - 6, t - 26), v.style.cssText += ";margin:2px 2px 2px 2px;overflow:hidden;", v.style.zIndex = u, c.appendChild(v), this._els.dhx_cal_data[0].appendChild(c), this._rendered.push(c), v.innerHTML = "", this._editor = v.firstChild, this._editor.addEventListener("keypress", function(p) { if (p.shiftKey) return !0; var y = p.keyCode; @@ -5972,58 +5987,58 @@ const lt = { active_links: function(e) { c.style.zIndex = parseInt(c.style.zIndex) + 1; for (var m = this.config["icons_" + (this._edit_id == a.id ? "edit" : "select")], l = "", f = 0; f < m.length; f++) l += "
"; - var g = this._render_v_bar(a.id, s - i + 1, o, i, 20 * m.length + 26, "", "
", l, !0); - g.style.left = s - i + 1, g.style.zIndex = c.style.zIndex, this._els.dhx_cal_data[0].appendChild(g), this._rendered.push(g); + var g = this._render_v_bar(a.id, s - r + 1, o, r, 20 * m.length + 26, "", "
", l, !0); + g.style.left = s - r + 1, g.style.zIndex = c.style.zIndex, this._els.dhx_cal_data[0].appendChild(g), this._rendered.push(g); } } } - }, e.filter_agenda = function(a, i) { - var d = e.getLayer(i.layer); + }, e.filter_agenda = function(a, r) { + var d = e.getLayer(r.layer); return d && d.visible; }; }); }, limit: function(e) { e.config.limit_start = null, e.config.limit_end = null, e.config.limit_view = !1, e.config.check_limits = !0, e.config.mark_now = !0, e.config.display_marked_timespans = !0, e.config.overwrite_marked_timespans = !0, e._temp_limit_scope = function() { - var h = null, a = "dhx_time_block", i = "default", d = function(o, t, r) { + var h = null, a = "dhx_time_block", r = "default", d = function(o, t, n) { var s = typeof o == "object" ? o : { days: o }; - return s.type = a, s.css = "", t && (r && (s.sections = r), s = function(c, u, v) { + return s.type = a, s.css = "", t && (n && (s.sections = n), s = function(c, u, v) { return u instanceof Date && v instanceof Date ? (c.start_date = u, c.end_date = v) : (c.days = u, c.zones = v), c; }(s, o, t)), s; }; - e.blockTime = function(o, t, r) { - var s = d(o, t, r); + e.blockTime = function(o, t, n) { + var s = d(o, t, n); return e.addMarkedTimespan(s); - }, e.unblockTime = function(o, t, r) { - var s = d(o, t = t || "fullday", r); + }, e.unblockTime = function(o, t, n) { + var s = d(o, t = t || "fullday", n); return e.deleteMarkedTimespan(s); - }, e.attachEvent("onBeforeViewChange", function(o, t, r, s) { + }, e.attachEvent("onBeforeViewChange", function(o, t, n, s) { function c(u, v) { var m = e.config.limit_start, l = e.config.limit_end, f = e.date.add(u, 1, v); return u.valueOf() > l.valueOf() || f <= m.valueOf(); } - return !e.config.limit_view || !c(s = s || t, r = r || o) || t.valueOf() == s.valueOf() || (setTimeout(function() { + return !e.config.limit_view || !c(s = s || t, n = n || o) || t.valueOf() == s.valueOf() || (setTimeout(function() { if (e.$destroyed) return !0; - var u = c(t, r) ? e.config.limit_start : t; - e.setCurrentView(c(u, r) ? null : u, r); + var u = c(t, n) ? e.config.limit_start : t; + e.setCurrentView(c(u, n) ? null : u, n); }, 1), !1); - }), e.checkInMarkedTimespan = function(o, t, r) { - t = t || i; + }), e.checkInMarkedTimespan = function(o, t, n) { + t = t || r; for (var s = !0, c = new Date(o.start_date.valueOf()), u = e.date.add(c, 1, "day"), v = e._marked_timespans; c < o.end_date; c = e.date.date_part(u), u = e.date.add(c, 1, "day")) { var m = +e.date.date_part(new Date(c)), l = _(o, v, c.getDay(), m, t); if (l) for (var f = 0; f < l.length; f += 2) { var g = e._get_zone_minutes(c), p = o.end_date > u || o.end_date.getDate() != c.getDate() ? 1440 : e._get_zone_minutes(o.end_date), y = l[f], w = l[f + 1]; - if (y < p && w > g && !(s = typeof r == "function" && r(o, g, p, y, w))) + if (y < p && w > g && !(s = typeof n == "function" && n(o, g, p, y, w))) break; } } return !s; }; - var n = e.checkLimitViolation = function(o) { + var i = e.checkLimitViolation = function(o) { if (!o || !e.config.check_limits) return !0; - var t = e, r = t.config, s = []; + var t = e, n = t.config, s = []; if (o.rec_type) for (var c = e.getRecDates(o), u = 0; u < c.length; u++) { var v = e._copy_event(o); @@ -6033,73 +6048,73 @@ const lt = { active_links: function(e) { s = [o]; for (var m = !0, l = 0; l < s.length; l++) { var f = !0; - (v = s[l])._timed = e.isOneDayEvent(v), (f = !r.limit_start || !r.limit_end || v.start_date.valueOf() >= r.limit_start.valueOf() && v.end_date.valueOf() <= r.limit_end.valueOf()) && (f = !e.checkInMarkedTimespan(v, a, function(g, p, y, w, b) { + (v = s[l])._timed = e.isOneDayEvent(v), (f = !n.limit_start || !n.limit_end || v.start_date.valueOf() >= n.limit_start.valueOf() && v.end_date.valueOf() <= n.limit_end.valueOf()) && (f = !e.checkInMarkedTimespan(v, a, function(g, p, y, w, b) { var k = !0; return p <= b && p >= w && ((b == 1440 || y <= b) && (k = !1), g._timed && t._drag_id && t._drag_mode == "new-size" ? (g.start_date.setHours(0), g.start_date.setMinutes(b)) : k = !1), (y >= w && y <= b || p < w && y > b) && (g._timed && t._drag_id && t._drag_mode == "new-size" ? (g.end_date.setHours(0), g.end_date.setMinutes(w)) : k = !1), k; })), f || (f = t.checkEvent("onLimitViolation") ? t.callEvent("onLimitViolation", [v.id, v]) : f), m = m && f; } return m || (t._drag_id = null, t._drag_mode = null), m; }; - function _(o, t, r, s, c) { + function _(o, t, n, s, c) { var u = e, v = [], m = { _props: "map_to", matrix: "y_property" }; for (var l in m) { var f = m[l]; if (u[l]) for (var g in u[l]) { var p = u[l][g][f]; - o[p] && (v = u._add_timespan_zones(v, e._get_blocked_zones(t[g], o[p], r, s, c))); + o[p] && (v = u._add_timespan_zones(v, e._get_blocked_zones(t[g], o[p], n, s, c))); } } - return v = u._add_timespan_zones(v, e._get_blocked_zones(t, "global", r, s, c)); + return v = u._add_timespan_zones(v, e._get_blocked_zones(t, "global", n, s, c)); } - e._get_blocked_zones = function(o, t, r, s, c) { + e._get_blocked_zones = function(o, t, n, s, c) { var u = []; if (o && o[t]) - for (var v = o[t], m = this._get_relevant_blocked_zones(r, s, v, c), l = 0; l < m.length; l++) + for (var v = o[t], m = this._get_relevant_blocked_zones(n, s, v, c), l = 0; l < m.length; l++) u = this._add_timespan_zones(u, m[l].zones); return u; - }, e._get_relevant_blocked_zones = function(o, t, r, s) { + }, e._get_relevant_blocked_zones = function(o, t, n, s) { var c; - return e.config.overwrite_marked_timespans ? c = r[t] && r[t][s] ? r[t][s] : r[o] && r[o][s] ? r[o][s] : [] : (c = [], r[t] && r[t][s] && (c = c.concat(r[t][s])), r[o] && r[o][s] && (c = c.concat(r[o][s]))), c; + return e.config.overwrite_marked_timespans ? c = n[t] && n[t][s] ? n[t][s] : n[o] && n[o][s] ? n[o][s] : [] : (c = [], n[t] && n[t][s] && (c = c.concat(n[t][s])), n[o] && n[o][s] && (c = c.concat(n[o][s]))), c; }, e.attachEvent("onMouseDown", function(o) { return o != a; }), e.attachEvent("onBeforeDrag", function(o) { - return !o || n(e.getEvent(o)); + return !o || i(e.getEvent(o)); }), e.attachEvent("onClick", function(o, t) { - return n(e.getEvent(o)); + return i(e.getEvent(o)); }), e.attachEvent("onBeforeLightbox", function(o) { var t = e.getEvent(o); - return h = [t.start_date, t.end_date], n(t); - }), e.attachEvent("onEventSave", function(o, t, r) { + return h = [t.start_date, t.end_date], i(t); + }), e.attachEvent("onEventSave", function(o, t, n) { if (!t.start_date || !t.end_date) { var s = e.getEvent(o); t.start_date = new Date(s.start_date), t.end_date = new Date(s.end_date); } if (t.rec_type) { var c = e._lame_clone(t); - return e._roll_back_dates(c), n(c); + return e._roll_back_dates(c), i(c); } - return n(t); + return i(t); }), e.attachEvent("onEventAdded", function(o) { if (!o) return !0; var t = e.getEvent(o); - return !n(t) && e.config.limit_start && e.config.limit_end && (t.start_date < e.config.limit_start && (t.start_date = new Date(e.config.limit_start)), t.start_date.valueOf() >= e.config.limit_end.valueOf() && (t.start_date = this.date.add(e.config.limit_end, -1, "day")), t.end_date < e.config.limit_start && (t.end_date = new Date(e.config.limit_start)), t.end_date.valueOf() >= e.config.limit_end.valueOf() && (t.end_date = this.date.add(e.config.limit_end, -1, "day")), t.start_date.valueOf() >= t.end_date.valueOf() && (t.end_date = this.date.add(t.start_date, this.config.event_duration || this.config.time_step, "minute")), t._timed = this.isOneDayEvent(t)), !0; + return !i(t) && e.config.limit_start && e.config.limit_end && (t.start_date < e.config.limit_start && (t.start_date = new Date(e.config.limit_start)), t.start_date.valueOf() >= e.config.limit_end.valueOf() && (t.start_date = this.date.add(e.config.limit_end, -1, "day")), t.end_date < e.config.limit_start && (t.end_date = new Date(e.config.limit_start)), t.end_date.valueOf() >= e.config.limit_end.valueOf() && (t.end_date = this.date.add(e.config.limit_end, -1, "day")), t.start_date.valueOf() >= t.end_date.valueOf() && (t.end_date = this.date.add(t.start_date, this.config.event_duration || this.config.time_step, "minute")), t._timed = this.isOneDayEvent(t)), !0; }), e.attachEvent("onEventChanged", function(o) { if (!o) return !0; var t = e.getEvent(o); - if (!n(t)) { + if (!i(t)) { if (!h) return !1; t.start_date = h[0], t.end_date = h[1], t._timed = this.isOneDayEvent(t); } return !0; - }), e.attachEvent("onBeforeEventChanged", function(o, t, r) { - return n(o); + }), e.attachEvent("onBeforeEventChanged", function(o, t, n) { + return i(o); }), e.attachEvent("onBeforeEventCreated", function(o) { - var t = e.getActionData(o).date, r = { _timed: !0, start_date: t, end_date: e.date.add(t, e.config.time_step, "minute") }; - return n(r); + var t = e.getActionData(o).date, n = { _timed: !0, start_date: t, end_date: e.date.add(t, e.config.time_step, "minute") }; + return i(n); }), e.attachEvent("onViewChange", function() { e._mark_now(); }), e.attachEvent("onAfterSchedulerResize", function() { @@ -6117,13 +6132,13 @@ const lt = { active_links: function(e) { }), e._mark_now = function(o) { var t = "dhx_now_time"; this._els[t] || (this._els[t] = []); - var r = e._currentDate(), s = this.config; - if (e._remove_mark_now(), !o && s.mark_now && r < this._max_date && r > this._min_date && r.getHours() >= s.first_hour && r.getHours() < s.last_hour) { - var c = this.locate_holder_day(r); - this._els[t] = e._append_mark_now(c, r); + var n = e._currentDate(), s = this.config; + if (e._remove_mark_now(), !o && s.mark_now && n < this._max_date && n > this._min_date && n.getHours() >= s.first_hour && n.getHours() < s.last_hour) { + var c = this.locate_holder_day(n); + this._els[t] = e._append_mark_now(c, n); } }, e._append_mark_now = function(o, t) { - var r = "dhx_now_time", s = e._get_zone_minutes(t), c = { zones: [s, s + 1], css: r, type: r }; + var n = "dhx_now_time", s = e._get_zone_minutes(t), c = { zones: [s, s + 1], css: n, type: n }; if (!this._table_view) { if (this._props && this._props[this._mode]) { var u, v, m = this._props[this._mode], l = m.size || m.options.length; @@ -6141,15 +6156,15 @@ const lt = { active_links: function(e) { if (this._mode == "month") return c.days = +e.date.date_part(t), e._render_marked_timespan(c, null, null); }, e._remove_mark_now = function() { - for (var o = "dhx_now_time", t = this._els[o], r = 0; r < t.length; r++) { - var s = t[r], c = s.parentNode; + for (var o = "dhx_now_time", t = this._els[o], n = 0; n < t.length; n++) { + var s = t[n], c = s.parentNode; c && c.removeChild(s); } this._els[o] = []; }, e._marked_timespans = { global: {} }, e._get_zone_minutes = function(o) { return 60 * o.getHours() + o.getMinutes(); }, e._prepare_timespan_options = function(o) { - var t = [], r = []; + var t = [], n = []; if (o.days == "fullweek" && (o.days = [0, 1, 2, 3, 4, 5, 6]), o.days instanceof Array) { for (var s = o.days.slice(), c = 0; c < s.length; c++) { var u = e._lame_clone(o); @@ -6159,19 +6174,19 @@ const lt = { active_links: function(e) { } if (!o || !(o.start_date && o.end_date && o.end_date > o.start_date || o.days !== void 0 && o.zones) && !o.type) return t; - o.zones == "fullday" && (o.zones = [0, 1440]), o.zones && o.invert_zones && (o.zones = e.invertZones(o.zones)), o.id = e.uid(), o.css = o.css || "", o.type = o.type || i; + o.zones == "fullday" && (o.zones = [0, 1440]), o.zones && o.invert_zones && (o.zones = e.invertZones(o.zones)), o.id = e.uid(), o.css = o.css || "", o.type = o.type || r; var v = o.sections; if (v) { for (var m in v) if (v.hasOwnProperty(m)) { var l = v[m]; for (l instanceof Array || (l = [l]), c = 0; c < l.length; c++) - (k = e._lame_copy({}, o)).sections = {}, k.sections[m] = l[c], r.push(k); + (k = e._lame_copy({}, o)).sections = {}, k.sections[m] = l[c], n.push(k); } } else - r.push(o); - for (var f = 0; f < r.length; f++) { - var g = r[f], p = g.start_date, y = g.end_date; + n.push(o); + for (var f = 0; f < n.length; f++) { + var g = n[f], p = g.start_date, y = g.end_date; if (p && y) for (var w = e.date.date_part(new Date(p)), b = e.date.add(w, 1, "day"); w < y; ) { var k; @@ -6183,10 +6198,10 @@ const lt = { active_links: function(e) { g.days instanceof Date && (g.days = e.date.date_part(g.days).valueOf()), g.zones = o.zones.slice(), t.push(g); } return t; - }, e._get_dates_by_index = function(o, t, r) { + }, e._get_dates_by_index = function(o, t, n) { var s = []; - t = e.date.date_part(new Date(t || e._min_date)), r = new Date(r || e._max_date); - for (var c = t.getDay(), u = o - c >= 0 ? o - c : 7 - t.getDay() + o, v = e.date.add(t, u, "day"); v < r; v = e.date.add(v, 1, "week")) + t = e.date.date_part(new Date(t || e._min_date)), n = new Date(n || e._max_date); + for (var c = t.getDay(), u = o - c >= 0 ? o - c : 7 - t.getDay() + o, v = e.date.add(t, u, "day"); v < n; v = e.date.add(v, 1, "week")) s.push(v); return s; }, e._get_css_classes_by_config = function(o) { @@ -6195,35 +6210,35 @@ const lt = { active_links: function(e) { }, e._get_block_by_config = function(o) { var t = document.createElement("div"); return o.html && (typeof o.html == "string" ? t.innerHTML = o.html : t.appendChild(o.html)), t; - }, e._render_marked_timespan = function(o, t, r) { + }, e._render_marked_timespan = function(o, t, n) { var s = [], c = e.config, u = this._min_date, v = this._max_date, m = !1; if (!c.display_marked_timespans) return s; - if (!r && r !== 0) { + if (!n && n !== 0) { if (o.days < 7) - r = o.days; + n = o.days; else { var l = new Date(o.days); if (m = +l, !(+v > +l && +u <= +l)) return s; - r = l.getDay(); + n = l.getDay(); } var f = u.getDay(); - f > r ? r = 7 - (f - r) : r -= f; + f > n ? n = 7 - (f - n) : n -= f; } var g = o.zones, p = e._get_css_classes_by_config(o); if (e._table_view && e._mode == "month") { var y = [], w = []; if (t) - y.push(t), w.push(r); + y.push(t), w.push(n); else { - w = m ? [m] : e._get_dates_by_index(r); + w = m ? [m] : e._get_dates_by_index(n); for (var b = 0; b < w.length; b++) y.push(this._scales[w[b]]); } for (b = 0; b < y.length; b++) { - t = y[b], r = w[b]; - var k = this.locate_holder_day(r, !1) % this._cols.length; + t = y[b], n = w[b]; + var k = this.locate_holder_day(n, !1) % this._cols.length; if (!this._ignores[k]) { var E = e._get_block_by_config(o); E.className = p, E.style.top = "0px", E.style.height = "100%"; @@ -6236,8 +6251,8 @@ const lt = { active_links: function(e) { } } } else { - var S = r; - if (this._ignores[this.locate_holder_day(r, !1)]) + var S = n; + if (this._ignores[this.locate_holder_day(n, !1)]) return s; if (this._props && this._props[this._mode] && o.sections && o.sections[this._mode]) { var N = this._props[this._mode]; @@ -6261,9 +6276,9 @@ const lt = { active_links: function(e) { }, e._mark_timespans = function() { var o = this._els.dhx_cal_data[0], t = []; if (e._table_view && e._mode == "month") - for (var r in this._scales) { - var s = /* @__PURE__ */ new Date(+r); - t.push.apply(t, e._on_scale_add_marker(this._scales[r], s)); + for (var n in this._scales) { + var s = /* @__PURE__ */ new Date(+n); + t.push.apply(t, e._on_scale_add_marker(this._scales[n], s)); } else { s = new Date(e._min_date); @@ -6278,90 +6293,90 @@ const lt = { active_links: function(e) { throw new Error("`scheduler.markTimespan` can't be used before scheduler initialization. Place `scheduler.markTimespan` call after `scheduler.init`."); var t = !1; this._els.dhx_cal_data || (e.get_elements(), t = !0); - var r = e._marked_timespans_ids, s = e._marked_timespans_types, c = e._marked_timespans; + var n = e._marked_timespans_ids, s = e._marked_timespans_types, c = e._marked_timespans; e.deleteMarkedTimespan(), e.addMarkedTimespan(o); var u = e._mark_timespans(); - return t && (e._els = []), e._marked_timespans_ids = r, e._marked_timespans_types = s, e._marked_timespans = c, u; + return t && (e._els = []), e._marked_timespans_ids = n, e._marked_timespans_types = s, e._marked_timespans = c, u; }, e.unmarkTimespan = function(o) { if (o) for (var t = 0; t < o.length; t++) { - var r = o[t]; - r.parentNode && r.parentNode.removeChild(r); + var n = o[t]; + n.parentNode && n.parentNode.removeChild(n); } }, e._addMarkerTimespanConfig = function(o) { - var t = "global", r = e._marked_timespans, s = o.id, c = e._marked_timespans_ids; + var t = "global", n = e._marked_timespans, s = o.id, c = e._marked_timespans_ids; c[s] || (c[s] = []); var u = o.days, v = o.sections, m = o.type; if (o.id = s, v) { for (var l in v) if (v.hasOwnProperty(l)) { - r[l] || (r[l] = {}); - var f = v[l], g = r[l]; + n[l] || (n[l] = {}); + var f = v[l], g = n[l]; g[f] || (g[f] = {}), g[f][u] || (g[f][u] = {}), g[f][u][m] || (g[f][u][m] = [], e._marked_timespans_types || (e._marked_timespans_types = {}), e._marked_timespans_types[m] || (e._marked_timespans_types[m] = !0)); var p = g[f][u][m]; o._array = p, p.push(o), c[s].push(o); } } else - r[t][u] || (r[t][u] = {}), r[t][u][m] || (r[t][u][m] = []), e._marked_timespans_types || (e._marked_timespans_types = {}), e._marked_timespans_types[m] || (e._marked_timespans_types[m] = !0), p = r[t][u][m], o._array = p, p.push(o), c[s].push(o); + n[t][u] || (n[t][u] = {}), n[t][u][m] || (n[t][u][m] = []), e._marked_timespans_types || (e._marked_timespans_types = {}), e._marked_timespans_types[m] || (e._marked_timespans_types[m] = !0), p = n[t][u][m], o._array = p, p.push(o), c[s].push(o); }, e._marked_timespans_ids = {}, e.addMarkedTimespan = function(o) { var t = e._prepare_timespan_options(o); if (t.length) { - for (var r = t[0].id, s = 0; s < t.length; s++) + for (var n = t[0].id, s = 0; s < t.length; s++) e._addMarkerTimespanConfig(t[s]); - return r; + return n; } }, e._add_timespan_zones = function(o, t) { - var r = o.slice(); - if (t = t.slice(), !r.length) + var n = o.slice(); + if (t = t.slice(), !n.length) return t; - for (var s = 0; s < r.length; s += 2) - for (var c = r[s], u = r[s + 1], v = s + 2 == r.length, m = 0; m < t.length; m += 2) { + for (var s = 0; s < n.length; s += 2) + for (var c = n[s], u = n[s + 1], v = s + 2 == n.length, m = 0; m < t.length; m += 2) { var l = t[m], f = t[m + 1]; if (f > u && l <= u || l < c && f >= c) - r[s] = Math.min(c, l), r[s + 1] = Math.max(u, f), s -= 2; + n[s] = Math.min(c, l), n[s + 1] = Math.max(u, f), s -= 2; else { if (!v) continue; var g = c > l ? 0 : 2; - r.splice(s + g, 0, l, f); + n.splice(s + g, 0, l, f); } t.splice(m--, 2); break; } - return r; + return n; }, e._subtract_timespan_zones = function(o, t) { - for (var r = o.slice(), s = 0; s < r.length; s += 2) - for (var c = r[s], u = r[s + 1], v = 0; v < t.length; v += 2) { + for (var n = o.slice(), s = 0; s < n.length; s += 2) + for (var c = n[s], u = n[s + 1], v = 0; v < t.length; v += 2) { var m = t[v], l = t[v + 1]; if (l > c && m < u) { var f = !1; - c >= m && u <= l && r.splice(s, 2), c < m && (r.splice(s, 2, c, m), f = !0), u > l && r.splice(f ? s + 2 : s, f ? 0 : 2, l, u), s -= 2; + c >= m && u <= l && n.splice(s, 2), c < m && (n.splice(s, 2, c, m), f = !0), u > l && n.splice(f ? s + 2 : s, f ? 0 : 2, l, u), s -= 2; break; } } - return r; + return n; }, e.invertZones = function(o) { return e._subtract_timespan_zones([0, 1440], o.slice()); }, e._delete_marked_timespan_by_id = function(o) { var t = e._marked_timespans_ids[o]; if (t) { - for (var r = 0; r < t.length; r++) - for (var s = t[r], c = s._array, u = 0; u < c.length; u++) + for (var n = 0; n < t.length; n++) + for (var s = t[n], c = s._array, u = 0; u < c.length; u++) if (c[u] == s) { c.splice(u, 1); break; } } }, e._delete_marked_timespan_by_config = function(o) { - var t, r = e._marked_timespans, s = o.sections, c = o.days, u = o.type || i; + var t, n = e._marked_timespans, s = o.sections, c = o.days, u = o.type || r; if (s) { for (var v in s) - if (s.hasOwnProperty(v) && r[v]) { + if (s.hasOwnProperty(v) && n[v]) { var m = s[v]; - r[v][m] && (t = r[v][m]); + n[v][m] && (t = n[v][m]); } } else - t = r.global; + t = n.global; if (t) { if (c !== void 0) t[c] && t[c][u] && (e._addMarkerTimespanConfig(o), e._delete_marked_timespans_list(t[c][u], o)); @@ -6373,12 +6388,12 @@ const lt = { active_links: function(e) { } } }, e._delete_marked_timespans_list = function(o, t) { - for (var r = 0; r < o.length; r++) { - var s = o[r], c = e._subtract_timespan_zones(s.zones, t.zones); + for (var n = 0; n < o.length; n++) { + var s = o[n], c = e._subtract_timespan_zones(s.zones, t.zones); if (c.length) s.zones = c; else { - o.splice(r, 1), r--; + o.splice(n, 1), n--; for (var u = e._marked_timespans_ids[s.id], v = 0; v < u.length; v++) if (u[v] == s) { u.splice(v, 1); @@ -6395,8 +6410,8 @@ const lt = { active_links: function(e) { if (o.type) t.push(o.type); else - for (var r in e._marked_timespans_types) - t.push(r); + for (var n in e._marked_timespans_types) + t.push(n); for (var s = e._prepare_timespan_options(o), c = 0; c < s.length; c++) for (var u = s[c], v = 0; v < t.length; v++) { var m = e._lame_clone(u); @@ -6404,18 +6419,18 @@ const lt = { active_links: function(e) { } } }, e._get_types_to_render = function(o, t) { - var r = o ? e._lame_copy({}, o) : {}; + var n = o ? e._lame_copy({}, o) : {}; for (var s in t || {}) - t.hasOwnProperty(s) && (r[s] = t[s]); - return r; + t.hasOwnProperty(s) && (n[s] = t[s]); + return n; }, e._get_configs_to_render = function(o) { var t = []; - for (var r in o) - o.hasOwnProperty(r) && t.push.apply(t, o[r]); + for (var n in o) + o.hasOwnProperty(n) && t.push.apply(t, o[n]); return t; }, e._on_scale_add_marker = function(o, t) { if (!e._table_view || e._mode == "month") { - var r = t.getDay(), s = t.valueOf(), c = this._mode, u = e._marked_timespans, v = [], m = []; + var n = t.getDay(), s = t.valueOf(), c = this._mode, u = e._marked_timespans, v = [], m = []; if (this._props && this._props[c]) { var l = this._props[c], f = l.options, g = f[e._get_unit_index(l, t)]; if (l.days > 1) { @@ -6423,17 +6438,17 @@ const lt = { active_links: function(e) { t = e.date.add(e._min_date, Math.floor(p / y), "day"), t = e.date.date_part(t); } else t = e.date.date_part(new Date(this._date)); - if (r = t.getDay(), s = t.valueOf(), u[c] && u[c][g.key]) { - var w = u[c][g.key], b = e._get_types_to_render(w[r], w[s]); + if (n = t.getDay(), s = t.valueOf(), u[c] && u[c][g.key]) { + var w = u[c][g.key], b = e._get_types_to_render(w[n], w[s]); v.push.apply(v, e._get_configs_to_render(b)); } } var k = u.global; if (e.config.overwrite_marked_timespans) { - var E = k[s] || k[r]; + var E = k[s] || k[n]; v.push.apply(v, e._get_configs_to_render(E)); } else - k[s] && v.push.apply(v, e._get_configs_to_render(k[s])), k[r] && v.push.apply(v, e._get_configs_to_render(k[r])); + k[s] && v.push.apply(v, e._get_configs_to_render(k[s])), k[n] && v.push.apply(v, e._get_configs_to_render(k[n])); for (var D = 0; D < v.length; D++) m.push.apply(m, e._render_marked_timespan(v[D], o, t)); return m; @@ -6447,26 +6462,26 @@ const lt = { active_links: function(e) { }, map_view: function(e) { e.ext || (e.ext = {}), e.ext.mapView = { geocoder: null, map: null, points: null, markers: null, infoWindow: null, createMarker: function(h) { return new google.maps.Marker(h); - } }, e.xy.map_date_width = 188, e.xy.map_icon_width = 25, e.xy.map_description_width = 400, e.config.map_resolve_event_location = !0, e.config.map_resolve_user_location = !0, e.config.map_initial_position = new google.maps.LatLng(48.724, 8.215), e.config.map_error_position = new google.maps.LatLng(15, 15), e.config.map_infowindow_max_width = 300, e.config.map_type = google.maps.MapTypeId.ROADMAP, e.config.map_zoom_after_resolve = 15, e.locale.labels.marker_geo_success = "It seems you are here.", e.locale.labels.marker_geo_fail = "Sorry, could not get your current position using geolocation.", e.templates.marker_date = e.date.date_to_str("%Y-%m-%d %H:%i"), e.templates.marker_text = function(h, a, i) { - return "
" + i.text + "

" + (i.event_location || "") + "

" + e.templates.marker_date(h) + " - " + e.templates.marker_date(a) + "
"; + } }, e.xy.map_date_width = 188, e.xy.map_icon_width = 25, e.xy.map_description_width = 400, e.config.map_resolve_event_location = !0, e.config.map_resolve_user_location = !0, e.config.map_initial_position = new google.maps.LatLng(48.724, 8.215), e.config.map_error_position = new google.maps.LatLng(15, 15), e.config.map_infowindow_max_width = 300, e.config.map_type = google.maps.MapTypeId.ROADMAP, e.config.map_zoom_after_resolve = 15, e.locale.labels.marker_geo_success = "It seems you are here.", e.locale.labels.marker_geo_fail = "Sorry, could not get your current position using geolocation.", e.templates.marker_date = e.date.date_to_str("%Y-%m-%d %H:%i"), e.templates.marker_text = function(h, a, r) { + return "
" + r.text + "

" + (r.event_location || "") + "

" + e.templates.marker_date(h) + " - " + e.templates.marker_date(a) + "
"; }, e.dblclick_dhx_map_area = function() { !this.config.readonly && this.config.dblclick_create && this.addEventNow({ start_date: e._date, end_date: e.date.add(e._date, e.config.time_step, "minute") }); - }, e.templates.map_time = function(h, a, i) { - return e.config.rtl && !i._timed ? e.templates.day_date(a) + " – " + e.templates.day_date(h) : i._timed ? this.day_date(i.start_date, i.end_date, i) + " " + this.event_date(h) : e.templates.day_date(h) + " – " + e.templates.day_date(a); - }, e.templates.map_text = function(h, a, i) { - return i.text; + }, e.templates.map_time = function(h, a, r) { + return e.config.rtl && !r._timed ? e.templates.day_date(a) + " – " + e.templates.day_date(h) : r._timed ? this.day_date(r.start_date, r.end_date, r) + " " + this.event_date(h) : e.templates.day_date(h) + " – " + e.templates.day_date(a); + }, e.templates.map_text = function(h, a, r) { + return r.text; }, e.date.map_start = function(h) { return h; - }, e.date.add_map = function(h, a, i) { + }, e.date.add_map = function(h, a, r) { return new Date(h.valueOf()); - }, e.templates.map_date = function(h, a, i) { + }, e.templates.map_date = function(h, a, r) { return ""; }, e._latLngUpdate = !1, e.attachEvent("onSchedulerReady", function() { e._isMapPositionSet = !1; const h = document.createElement("div"); h.className = "dhx_map", h.id = "dhx_gmap", h.style.display = "none", e._obj.appendChild(h), e._els.dhx_gmap = [], e._els.dhx_gmap.push(h), o("dhx_gmap"); - const a = { zoom: e.config.map_initial_zoom || 10, center: e.config.map_initial_position, mapTypeId: e.config.map_type || google.maps.MapTypeId.ROADMAP }, i = new google.maps.Map(document.getElementById("dhx_gmap"), a); - i.disableDefaultUI = !1, i.disableDoubleClickZoom = !e.config.readonly, google.maps.event.addListener(i, "dblclick", function(u) { + const a = { zoom: e.config.map_initial_zoom || 10, center: e.config.map_initial_position, mapTypeId: e.config.map_type || google.maps.MapTypeId.ROADMAP }, r = new google.maps.Map(document.getElementById("dhx_gmap"), a); + r.disableDefaultUI = !1, r.disableDoubleClickZoom = !e.config.readonly, google.maps.event.addListener(r, "dblclick", function(u) { const v = e.ext.mapView.geocoder; if (!e.config.readonly && e.config.dblclick_create) { var m = u.latLng; @@ -6476,17 +6491,17 @@ const lt = { active_links: function(e) { } }); var d = { content: "" }; - e.config.map_infowindow_max_width && (d.maxWidth = e.config.map_infowindow_max_width), e.map = { _points: [], _markers: [], _infowindow: new google.maps.InfoWindow(d), _infowindows_content: [], _initialization_count: -1, _obj: i }, e.ext.mapView.geocoder = new google.maps.Geocoder(), e.ext.mapView.map = i, e.ext.mapView.points = e.map._points, e.ext.mapView.markers = e.map._markers, e.ext.mapView.infoWindow = e.map._infowindow, e.config.map_resolve_user_location && navigator.geolocation && (e._isMapPositionSet || navigator.geolocation.getCurrentPosition(function(u) { + e.config.map_infowindow_max_width && (d.maxWidth = e.config.map_infowindow_max_width), e.map = { _points: [], _markers: [], _infowindow: new google.maps.InfoWindow(d), _infowindows_content: [], _initialization_count: -1, _obj: r }, e.ext.mapView.geocoder = new google.maps.Geocoder(), e.ext.mapView.map = r, e.ext.mapView.points = e.map._points, e.ext.mapView.markers = e.map._markers, e.ext.mapView.infoWindow = e.map._infowindow, e.config.map_resolve_user_location && navigator.geolocation && (e._isMapPositionSet || navigator.geolocation.getCurrentPosition(function(u) { var v = new google.maps.LatLng(u.coords.latitude, u.coords.longitude); - i.setCenter(v), i.setZoom(e.config.map_zoom_after_resolve || 10), e.map._infowindow.setContent(e.locale.labels.marker_geo_success), e.map._infowindow.position = i.getCenter(), e.map._infowindow.open(i), e._isMapPositionSet = !0; + r.setCenter(v), r.setZoom(e.config.map_zoom_after_resolve || 10), e.map._infowindow.setContent(e.locale.labels.marker_geo_success), e.map._infowindow.position = r.getCenter(), e.map._infowindow.open(r), e._isMapPositionSet = !0; }, function() { - e.map._infowindow.setContent(e.locale.labels.marker_geo_fail), e.map._infowindow.setPosition(i.getCenter()), e.map._infowindow.open(i), e._isMapPositionSet = !0; - })), google.maps.event.addListener(i, "resize", function(u) { - h.style.zIndex = "5", i.setZoom(i.getZoom()); - }), google.maps.event.addListener(i, "tilesloaded", function(u) { + e.map._infowindow.setContent(e.locale.labels.marker_geo_fail), e.map._infowindow.setPosition(r.getCenter()), e.map._infowindow.open(r), e._isMapPositionSet = !0; + })), google.maps.event.addListener(r, "resize", function(u) { + h.style.zIndex = "5", r.setZoom(r.getZoom()); + }), google.maps.event.addListener(r, "tilesloaded", function(u) { h.style.zIndex = "5"; }), h.style.display = "none"; - const n = e.render_data; + const i = e.render_data; function _() { var u = e.get_visible_events(); u.sort(function(E, D) { @@ -6513,10 +6528,10 @@ const lt = { active_links: function(e) { } e.render_data = function(u, v) { if (this._mode != "map") - return n.apply(this, arguments); + return i.apply(this, arguments); _(); for (var m = e.get_visible_events(), l = 0; l < m.length; l++) - e.map._markers[m[l].id] || r(m[l], !1, !1); + e.map._markers[m[l].id] || n(m[l], !1, !1); }, e.map_view = function(u) { e.map._initialization_count++; var v, m = e._els.dhx_gmap[0]; @@ -6533,14 +6548,14 @@ const lt = { active_links: function(e) { g.hasOwnProperty(p) && (g[p].setMap(null), delete e.map._markers[p], e.map._infowindows_content[p] && delete e.map._infowindows_content[p]); })(), _(), m.style.display = "block", o("dhx_gmap"), v = e.map._obj.getCenter(); for (var l = e.get_visible_events(), f = 0; f < l.length; f++) - e.map._markers[l[f].id] || r(l[f]); + e.map._markers[l[f].id] || n(l[f]); } else m.style.display = "none"; google.maps.event.trigger(e.map._obj, "resize"), e.map._initialization_count === 0 && v && e.map._obj.setCenter(v), e._selected_event_id && t(e._selected_event_id); }; var t = function(u) { e.map._obj.setCenter(e.map._points[u]), e.callEvent("onClick", [u]); - }, r = function(u, v, m) { + }, n = function(u, v, m) { var l = e.config.map_error_position; u.lat && u.lng && (l = new google.maps.LatLng(u.lat, u.lng)); var f = e.templates.marker_text(u.start_date, u.end_date, u); @@ -6561,8 +6576,8 @@ const lt = { active_links: function(e) { const v = e.ext.mapView.geocoder; u.event_location && v ? v.geocode({ address: u.event_location, language: e.uid().toString() }, function(m, l) { var f = {}; - l != google.maps.GeocoderStatus.OK ? (f = e.callEvent("onLocationError", [u.id])) && f !== !0 || (f = e.config.map_error_position) : f = m[0].geometry.location, u.lat = f.lat(), u.lng = f.lng(), e._selected_event_id = u.id, e._latLngUpdate = !0, e.callEvent("onEventChanged", [u.id, u]), r(u, !0, !0); - }) : r(u, !0, !0); + l != google.maps.GeocoderStatus.OK ? (f = e.callEvent("onLocationError", [u.id])) && f !== !0 || (f = e.config.map_error_position) : f = m[0].geometry.location, u.lat = f.lat(), u.lng = f.lng(), e._selected_event_id = u.id, e._latLngUpdate = !0, e.callEvent("onEventChanged", [u.id, u]), n(u, !0, !0); + }) : n(u, !0, !0); }, c = function(u) { const v = e.ext.mapView.geocoder; u.event_location && v && v.geocode({ address: u.event_location, language: e.uid().toString() }, function(m, l) { @@ -6594,93 +6609,93 @@ const lt = { active_links: function(e) { }); }, minical: function(e) { const h = e._createDomEventScope(); - e.config.minicalendar = { mark_events: !0 }, e._synced_minicalendars = [], e.renderCalendar = function(a, i, d) { - var n = null, _ = a.date || e._currentDate(); - if (typeof _ == "string" && (_ = this.templates.api_date(_)), i) - n = this._render_calendar(i.parentNode, _, a, i), e.unmarkCalendar(n); + e.config.minicalendar = { mark_events: !0 }, e._synced_minicalendars = [], e.renderCalendar = function(a, r, d) { + var i = null, _ = a.date || e._currentDate(); + if (typeof _ == "string" && (_ = this.templates.api_date(_)), r) + i = this._render_calendar(r.parentNode, _, a, r), e.unmarkCalendar(i); else { var o = a.container, t = a.position; if (typeof o == "string" && (o = document.getElementById(o)), typeof t == "string" && (t = document.getElementById(t)), t && t.left === void 0 && t.right === void 0) { - var r = e.$domHelpers.getOffset(t); - t = { top: r.top + t.offsetHeight, left: r.left }; + var n = e.$domHelpers.getOffset(t); + t = { top: n.top + t.offsetHeight, left: n.left }; } - o || (o = e._get_def_cont(t)), (n = this._render_calendar(o, _, a)).$_eventAttached || (n.$_eventAttached = !0, h.attach(n, "click", (function(p) { + o || (o = e._get_def_cont(t)), (i = this._render_calendar(o, _, a)).$_eventAttached || (i.$_eventAttached = !0, h.attach(i, "click", (function(p) { var y = p.target || p.srcElement, w = e.$domHelpers; if (w.closest(y, ".dhx_month_head") && !w.closest(y, ".dhx_after") && !w.closest(y, ".dhx_before")) { var b = w.closest(y, "[data-cell-date]").getAttribute("data-cell-date"), k = e.templates.parse_date(b); e.unmarkCalendar(this), e.markCalendar(this, k, "dhx_calendar_click"), this._last_date = k, this.conf.handler && this.conf.handler.call(e, k, this); } - }).bind(n))); + }).bind(i))); } if (e.config.minicalendar.mark_events) for (var s = e.date.month_start(_), c = e.date.add(s, 1, "month"), u = this.getEvents(s, c), v = this["filter_" + this._mode], m = {}, l = 0; l < u.length; l++) { var f = u[l]; if (!v || v(f.id, f)) { var g = f.start_date; - for (g.valueOf() < s.valueOf() && (g = s), g = e.date.date_part(new Date(g.valueOf())); g < f.end_date && (m[+g] || (m[+g] = !0, this.markCalendar(n, g, "dhx_year_event")), !((g = this.date.add(g, 1, "day")).valueOf() >= c.valueOf())); ) + for (g.valueOf() < s.valueOf() && (g = s), g = e.date.date_part(new Date(g.valueOf())); g < f.end_date && (m[+g] || (m[+g] = !0, this.markCalendar(i, g, "dhx_year_event")), !((g = this.date.add(g, 1, "day")).valueOf() >= c.valueOf())); ) ; } } - return this._markCalendarCurrentDate(n), n.conf = a, a.sync && !d && this._synced_minicalendars.push(n), n.conf._on_xle_handler || (n.conf._on_xle_handler = e.attachEvent("onXLE", function() { - e.updateCalendar(n, n.conf.date); - })), this.config.wai_aria_attributes && this.config.wai_aria_application_role && n.setAttribute("role", "application"), n; + return this._markCalendarCurrentDate(i), i.conf = a, a.sync && !d && this._synced_minicalendars.push(i), i.conf._on_xle_handler || (i.conf._on_xle_handler = e.attachEvent("onXLE", function() { + e.updateCalendar(i, i.conf.date); + })), this.config.wai_aria_attributes && this.config.wai_aria_application_role && i.setAttribute("role", "application"), i; }, e._get_def_cont = function(a) { - return this._def_count || (this._def_count = document.createElement("div"), this._def_count.className = "dhx_minical_popup", e.event(this._def_count, "click", function(i) { - i.cancelBubble = !0; + return this._def_count || (this._def_count = document.createElement("div"), this._def_count.className = "dhx_minical_popup", e.event(this._def_count, "click", function(r) { + r.cancelBubble = !0; }), document.body.appendChild(this._def_count)), a.left && (this._def_count.style.left = a.left + "px"), a.right && (this._def_count.style.right = a.right + "px"), a.top && (this._def_count.style.top = a.top + "px"), a.bottom && (this._def_count.style.bottom = a.bottom + "px"), this._def_count._created = /* @__PURE__ */ new Date(), this._def_count; - }, e._locateCalendar = function(a, i) { - if (typeof i == "string" && (i = e.templates.api_date(i)), +i > +a._max_date || +i < +a._min_date) + }, e._locateCalendar = function(a, r) { + if (typeof r == "string" && (r = e.templates.api_date(r)), +r > +a._max_date || +r < +a._min_date) return null; - for (var d = a.querySelector(".dhx_year_body").childNodes[0], n = 0, _ = new Date(a._min_date); +this.date.add(_, 1, "week") <= +i; ) - _ = this.date.add(_, 1, "week"), n++; - var o = e.config.start_on_monday, t = (i.getDay() || (o ? 7 : 0)) - (o ? 1 : 0); - const r = d.querySelector(`.dhx_cal_month_row:nth-child(${n + 1}) .dhx_cal_month_cell:nth-child(${t + 1})`); - return r ? r.firstChild : null; - }, e.markCalendar = function(a, i, d) { - var n = this._locateCalendar(a, i); - n && (n.className += " " + d); - }, e.unmarkCalendar = function(a, i, d) { - if (d = d || "dhx_calendar_click", i = i || a._last_date) { - var n = this._locateCalendar(a, i); - n && (n.className = (n.className || "").replace(RegExp(d, "g"))); + for (var d = a.querySelector(".dhx_year_body").childNodes[0], i = 0, _ = new Date(a._min_date); +this.date.add(_, 1, "week") <= +r; ) + _ = this.date.add(_, 1, "week"), i++; + var o = e.config.start_on_monday, t = (r.getDay() || (o ? 7 : 0)) - (o ? 1 : 0); + const n = d.querySelector(`.dhx_cal_month_row:nth-child(${i + 1}) .dhx_cal_month_cell:nth-child(${t + 1})`); + return n ? n.firstChild : null; + }, e.markCalendar = function(a, r, d) { + var i = this._locateCalendar(a, r); + i && (i.className += " " + d); + }, e.unmarkCalendar = function(a, r, d) { + if (d = d || "dhx_calendar_click", r = r || a._last_date) { + var i = this._locateCalendar(a, r); + i && (i.className = (i.className || "").replace(RegExp(d, "g"))); } }, e._week_template = function(a) { - for (var i = a || 250, d = 0, n = document.createElement("div"), _ = this.date.week_start(e._currentDate()), o = 0; o < 7; o++) - this._cols[o] = Math.floor(i / (7 - o)), this._render_x_header(o, d, _, n), _ = this.date.add(_, 1, "day"), i -= this._cols[o], d += this._cols[o]; - return n.lastChild.className += " dhx_scale_bar_last", n; - }, e.updateCalendar = function(a, i) { - a.conf.date = i, this.renderCalendar(a.conf, a, !0); - }, e._mini_cal_arrows = [" ", " "], e._render_calendar = function(a, i, d, n) { + for (var r = a || 250, d = 0, i = document.createElement("div"), _ = this.date.week_start(e._currentDate()), o = 0; o < 7; o++) + this._cols[o] = Math.floor(r / (7 - o)), this._render_x_header(o, d, _, i), _ = this.date.add(_, 1, "day"), r -= this._cols[o], d += this._cols[o]; + return i.lastChild.className += " dhx_scale_bar_last", i; + }, e.updateCalendar = function(a, r) { + a.conf.date = r, this.renderCalendar(a.conf, a, !0); + }, e._mini_cal_arrows = [" ", " "], e._render_calendar = function(a, r, d, i) { var _ = e.templates, o = this._cols; this._cols = []; var t = this._mode; this._mode = "calendar"; - var r = this._colsS; + var n = this._colsS; this._colsS = { height: 0 }; var s = new Date(this._min_date), c = new Date(this._max_date), u = new Date(e._date), v = _.month_day, m = this._ignores_detected; - this._ignores_detected = 0, _.month_day = _.calendar_date, i = this.date.month_start(i); + this._ignores_detected = 0, _.month_day = _.calendar_date, r = this.date.month_start(r); var l, f = this._week_template(a.offsetWidth - 1 - this.config.minicalendar.padding); - n ? l = n : (l = document.createElement("div")).className = "dhx_cal_container dhx_mini_calendar", l.setAttribute("date", this._helpers.formatDate(i)), l.innerHTML = "
" : "'>") + "
" + (f ? f.innerHTML : "") + "
"; + i ? l = i : (l = document.createElement("div")).className = "dhx_cal_container dhx_mini_calendar", l.setAttribute("date", this._helpers.formatDate(r)), l.innerHTML = "
" : "'>") + "
" + (f ? f.innerHTML : "") + "
"; var g = l.querySelector(".dhx_year_month"), p = l.querySelector(".dhx_year_week"), y = l.querySelector(".dhx_year_body"); - if (g.innerHTML = this.templates.calendar_month(i), d.navigation) - for (var w = function($, P) { - var z = e.date.add($._date, P, "month"); - e.updateCalendar($, z), e._date.getMonth() == $._date.getMonth() && e._date.getFullYear() == $._date.getFullYear() && e._markCalendarCurrentDate($); - }, b = ["dhx_cal_prev_button", "dhx_cal_next_button"], k = ["left:1px;top:4px;position:absolute;", "left:auto; right:1px;top:4px;position:absolute;"], E = [-1, 1], D = function($) { + if (g.innerHTML = this.templates.calendar_month(r), d.navigation) + for (var w = function(H, P) { + var z = e.date.add(H._date, P, "month"); + e.updateCalendar(H, z), e._date.getMonth() == H._date.getMonth() && e._date.getFullYear() == H._date.getFullYear() && e._markCalendarCurrentDate(H); + }, b = ["dhx_cal_prev_button", "dhx_cal_next_button"], k = ["left:1px;top:4px;position:absolute;", "left:auto; right:1px;top:4px;position:absolute;"], E = [-1, 1], D = function(H) { return function() { if (d.sync) for (var P = e._synced_minicalendars, z = 0; z < P.length; z++) - w(P[z], $); + w(P[z], H); else - e.config.rtl && ($ = -$), w(l, $); + e.config.rtl && (H = -H), w(l, H); }; }, x = [e.locale.labels.prev, e.locale.labels.next], S = 0; S < 2; S++) { var N = document.createElement("div"); N.className = b[S], e._waiAria.headerButtonsAttributes(N, x[S]), N.style.cssText = k[S], N.innerHTML = this._mini_cal_arrows[S], g.appendChild(N), h.attach(N, "click", D(E[S])); } - l._date = new Date(i), l.week_start = (i.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) % 7; - var M = l._min_date = this.date.week_start(i); - l._max_date = this.date.add(l._min_date, 6, "week"), this._reset_month_scale(y, i, M, 6), n || a.appendChild(l), p.style.height = p.childNodes[0].offsetHeight - 1 + "px"; + l._date = new Date(r), l.week_start = (r.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) % 7; + var M = l._min_date = this.date.week_start(r); + l._max_date = this.date.add(l._min_date, 6, "week"), this._reset_month_scale(y, r, M, 6), i || a.appendChild(l), p.style.height = p.childNodes[0].offsetHeight - 1 + "px"; var A = e.uid(); e._waiAria.minicalHeader(g, A), e._waiAria.minicalGrid(l.querySelector(".dhx_year_grid"), A), e._waiAria.minicalRow(p); for (var C = p.querySelectorAll(".dhx_scale_bar"), T = 0; T < C.length; T++) @@ -6688,9 +6703,9 @@ const lt = { active_links: function(e) { var O = y.querySelectorAll(".dhx_cal_month_cell"), L = new Date(M); for (T = 0; T < O.length; T++) e._waiAria.minicalDayCell(O[T], new Date(L)), L = e.date.add(L, 1, "day"); - return e._waiAria.minicalHeader(g, A), this._cols = o, this._mode = t, this._colsS = r, this._min_date = s, this._max_date = c, e._date = u, _.month_day = v, this._ignores_detected = m, l; - }, e.destroyCalendar = function(a, i) { - !a && this._def_count && this._def_count.firstChild && (i || (/* @__PURE__ */ new Date()).valueOf() - this._def_count._created.valueOf() > 500) && (a = this._def_count.firstChild), a && (h.detachAll(), a.innerHTML = "", a.parentNode && a.parentNode.removeChild(a), this._def_count && (this._def_count.style.top = "-1000px"), a.conf && a.conf._on_xle_handler && e.detachEvent(a.conf._on_xle_handler)); + return e._waiAria.minicalHeader(g, A), this._cols = o, this._mode = t, this._colsS = n, this._min_date = s, this._max_date = c, e._date = u, _.month_day = v, this._ignores_detected = m, l; + }, e.destroyCalendar = function(a, r) { + !a && this._def_count && this._def_count.firstChild && (r || (/* @__PURE__ */ new Date()).valueOf() - this._def_count._created.valueOf() > 500) && (a = this._def_count.firstChild), a && (h.detachAll(), a.innerHTML = "", a.parentNode && a.parentNode.removeChild(a), this._def_count && (this._def_count.style.top = "-1000px"), a.conf && a.conf._on_xle_handler && e.detachEvent(a.conf._on_xle_handler)); }, e.isCalendarVisible = function() { return !!(this._def_count && parseInt(this._def_count.style.top, 10) > 0) && this._def_count; }, e.attachEvent("onTemplatesReady", function() { @@ -6698,13 +6713,13 @@ const lt = { active_links: function(e) { e.destroyCalendar(); }); }, { once: !0 }), e.form_blocks.calendar_time = { render: function(a) { - var i = "", d = e.config, n = this.date.date_part(e._currentDate()), _ = 1440, o = 0; - d.limit_time_select && (o = 60 * d.first_hour, _ = 60 * d.last_hour + 1), n.setHours(o / 60), a._time_values = [], i += " ", d = e.config, i = this.date.date_part(e._currentDate()), _ = 1440, o = 0; + d.limit_time_select && (o = 60 * d.first_hour, _ = 60 * d.last_hour + 1), i.setHours(o / 60), a._time_values = [], r += " ") + "  –  " + i + ""; - }, set_value: function(a, i, d, n) { - var _, o, t = a.getElementsByTagName("input"), r = a.getElementsByTagName("select"), s = function(g, p, y) { + r += "", a._time_values.push(t), i = this.date.add(i, this.config.time_step, "minute"); + return "
" + (r += "") + "  –  " + r + "
"; + }, set_value: function(a, r, d, i) { + var _, o, t = a.getElementsByTagName("input"), n = a.getElementsByTagName("select"), s = function(g, p, y) { e.event(g, "click", function() { e.destroyCalendar(null, !0), e.renderCalendar({ position: g, date: new Date(this._date), navigation: !0, handler: function(w) { g.value = e.templates.calendar_time(w), g._date = new Date(w), e.destroyCalendar(), e.config.event_duration && e.config.auto_end_date && y === 0 && m(); @@ -6717,26 +6732,26 @@ const lt = { active_links: function(e) { e.config.wide_form || (c = a.previousSibling.innerHTML + c), a.previousSibling.innerHTML = c, a._full_day = !0; } var u = a.previousSibling.getElementsByTagName("input")[0], v = e.date.time_part(d.start_date) === 0 && e.date.time_part(d.end_date) === 0; - u.checked = v, r[0].disabled = u.checked, r[1].disabled = u.checked, u.$_eventAttached || (u.$_eventAttached = !0, e.event(u, "click", function() { + u.checked = v, n[0].disabled = u.checked, n[1].disabled = u.checked, u.$_eventAttached || (u.$_eventAttached = !0, e.event(u, "click", function() { if (u.checked === !0) { var g = {}; e.form_blocks.calendar_time.get_value(a, g), _ = e.date.date_part(g.start_date), (+(o = e.date.date_part(g.end_date)) == +_ || +o >= +_ && (d.end_date.getHours() !== 0 || d.end_date.getMinutes() !== 0)) && (o = e.date.add(o, 1, "day")); } var p = _ || d.start_date, y = o || d.end_date; - l(t[0], p), l(t[1], y), r[0].value = 60 * p.getHours() + p.getMinutes(), r[1].value = 60 * y.getHours() + y.getMinutes(), r[0].disabled = u.checked, r[1].disabled = u.checked; + l(t[0], p), l(t[1], y), n[0].value = 60 * p.getHours() + p.getMinutes(), n[1].value = 60 * y.getHours() + y.getMinutes(), n[0].disabled = u.checked, n[1].disabled = u.checked; })); } if (e.config.event_duration && e.config.auto_end_date) { var m = function() { - e.config.auto_end_date && e.config.event_duration && (_ = e.date.add(t[0]._date, r[0].value, "minute"), o = new Date(_.getTime() + 60 * e.config.event_duration * 1e3), t[1].value = e.templates.calendar_time(o), t[1]._date = e.date.date_part(new Date(o)), r[1].value = 60 * o.getHours() + o.getMinutes()); + e.config.auto_end_date && e.config.event_duration && (_ = e.date.add(t[0]._date, n[0].value, "minute"), o = new Date(_.getTime() + 60 * e.config.event_duration * 1e3), t[1].value = e.templates.calendar_time(o), t[1]._date = e.date.date_part(new Date(o)), n[1].value = 60 * o.getHours() + o.getMinutes()); }; - r[0].$_eventAttached || r[0].addEventListener("change", m); + n[0].$_eventAttached || n[0].addEventListener("change", m); } function l(g, p, y) { s(g, p, y), g.value = e.templates.calendar_time(p), g._date = e.date.date_part(new Date(p)); } function f(g) { - for (var p = n._time_values, y = 60 * g.getHours() + g.getMinutes(), w = y, b = !1, k = 0; k < p.length; k++) { + for (var p = i._time_values, y = 60 * g.getHours() + g.getMinutes(), w = y, b = !1, k = 0; k < p.length; k++) { var E = p[k]; if (E === y) { b = !0; @@ -6747,22 +6762,22 @@ const lt = { active_links: function(e) { return b || w ? b ? y : w : -1; } l(t[0], d.start_date, 0), l(t[1], d.end_date, 1), s = function() { - }, r[0].value = f(d.start_date), r[1].value = f(d.end_date); - }, get_value: function(a, i) { - var d = a.getElementsByTagName("input"), n = a.getElementsByTagName("select"); - return i.start_date = e.date.add(d[0]._date, n[0].value, "minute"), i.end_date = e.date.add(d[1]._date, n[1].value, "minute"), i.end_date <= i.start_date && (i.end_date = e.date.add(i.start_date, e.config.time_step, "minute")), { start_date: new Date(i.start_date), end_date: new Date(i.end_date) }; + }, n[0].value = f(d.start_date), n[1].value = f(d.end_date); + }, get_value: function(a, r) { + var d = a.getElementsByTagName("input"), i = a.getElementsByTagName("select"); + return r.start_date = e.date.add(d[0]._date, i[0].value, "minute"), r.end_date = e.date.add(d[1]._date, i[1].value, "minute"), r.end_date <= r.start_date && (r.end_date = e.date.add(r.start_date, e.config.time_step, "minute")), { start_date: new Date(r.start_date), end_date: new Date(r.end_date) }; }, focus: function(a) { - } }, e.linkCalendar = function(a, i) { + } }, e.linkCalendar = function(a, r) { var d = function() { - var n = e._date, _ = new Date(n.valueOf()); - return i && (_ = i(_)), _.setDate(1), e.updateCalendar(a, _), !0; + var i = e._date, _ = new Date(i.valueOf()); + return r && (_ = r(_)), _.setDate(1), e.updateCalendar(a, _), !0; }; e.attachEvent("onViewChange", d), e.attachEvent("onXLE", d), e.attachEvent("onEventAdded", d), e.attachEvent("onEventChanged", d), e.attachEvent("onEventDeleted", d), d(); }, e._markCalendarCurrentDate = function(a) { - var i = e.getState(), d = i.min_date, n = i.max_date, _ = i.mode, o = e.date.month_start(new Date(a._date)), t = e.date.add(o, 1, "month"); - if (!({ month: !0, year: !0, agenda: !0, grid: !0 }[_] || d.valueOf() <= o.valueOf() && n.valueOf() >= t.valueOf())) - for (var r = d; r.valueOf() < n.valueOf(); ) - o.valueOf() <= r.valueOf() && t > r && e.markCalendar(a, r, "dhx_calendar_click"), r = e.date.add(r, 1, "day"); + var r = e.getState(), d = r.min_date, i = r.max_date, _ = r.mode, o = e.date.month_start(new Date(a._date)), t = e.date.add(o, 1, "month"); + if (!({ month: !0, year: !0, agenda: !0, grid: !0 }[_] || d.valueOf() <= o.valueOf() && i.valueOf() >= t.valueOf())) + for (var n = d; n.valueOf() < i.valueOf(); ) + o.valueOf() <= n.valueOf() && t > n && e.markCalendar(a, n, "dhx_calendar_click"), n = e.date.add(n, 1, "day"); }, e.attachEvent("onEventCancel", function() { e.destroyCalendar(null, !0); }), e.attachEvent("onDestroy", function() { @@ -6773,15 +6788,15 @@ const lt = { active_links: function(e) { e.xy.scroll_width = 0; var h = e.render_view_data; e.render_view_data = function() { - var i = this._els.dhx_cal_data[0]; - i.firstChild._h_fix = !0, h.apply(e, arguments); - var d = parseInt(i.style.height); - i.style.height = "1px", i.style.height = i.scrollHeight + "px", this._obj.style.height = this._obj.clientHeight + i.scrollHeight - d + "px"; + var r = this._els.dhx_cal_data[0]; + r.firstChild._h_fix = !0, h.apply(e, arguments); + var d = parseInt(r.style.height); + r.style.height = "1px", r.style.height = r.scrollHeight + "px", this._obj.style.height = this._obj.clientHeight + r.scrollHeight - d + "px"; }; var a = e._reset_month_scale; - e._reset_month_scale = function(i, d, n, _) { + e._reset_month_scale = function(r, d, i, _) { var o = { clientHeight: 100 }; - a.apply(e, [o, d, n, _]), i.innerHTML = o.innerHTML; + a.apply(e, [o, d, i, _]), r.innerHTML = o.innerHTML; }; }); }, multisection: function(e) { @@ -6790,28 +6805,28 @@ const lt = { active_links: function(e) { e.form_blocks.multiselect = { render: function(h) { var a = "dhx_multi_select_control dhx_multi_select_" + h.name; h.vertical && (a += " dhx_multi_select_control_vertical"); - for (var i = "
", d = 0; d < h.options.length; d++) - i += ""; - return i += "
"; - }, set_value: function(h, a, i, d) { - for (var n = h.getElementsByTagName("input"), _ = 0; _ < n.length; _++) - n[_].checked = !1; + for (var r = "
", d = 0; d < h.options.length; d++) + r += ""; + return r += "
"; + }, set_value: function(h, a, r, d) { + for (var i = h.getElementsByTagName("input"), _ = 0; _ < i.length; _++) + i[_].checked = !1; function o(u) { for (var v = h.getElementsByTagName("input"), m = 0; m < v.length; m++) v[m].checked = !!u[v[m].value]; } var t = {}; - if (i[d.map_to]) { - var r = (i[d.map_to] + "").split(d.delimiter || e.config.section_delimiter || ","); - for (_ = 0; _ < r.length; _++) - t[r[_]] = !0; + if (r[d.map_to]) { + var n = (r[d.map_to] + "").split(d.delimiter || e.config.section_delimiter || ","); + for (_ = 0; _ < n.length; _++) + t[n[_]] = !0; o(t); } else { if (e._new_event || !d.script_url) return; var s = document.createElement("div"); s.className = "dhx_loading", s.style.cssText = "position: absolute; top: 40%; left: 40%;", h.appendChild(s); - var c = [d.script_url, d.script_url.indexOf("?") == -1 ? "?" : "&", "dhx_crosslink_" + d.map_to + "=" + i.id + "&uid=" + e.uid()].join(""); + var c = [d.script_url, d.script_url.indexOf("?") == -1 ? "?" : "&", "dhx_crosslink_" + d.map_to + "=" + r.id + "&uid=" + e.uid()].join(""); e.ajax.get(c, function(u) { var v = function(m, l) { try { @@ -6831,28 +6846,28 @@ const lt = { active_links: function(e) { }(u, d)), o(v), h.removeChild(s); }); } - }, get_value: function(h, a, i) { - for (var d = [], n = h.getElementsByTagName("input"), _ = 0; _ < n.length; _++) - n[_].checked && d.push(n[_].value); - return d.join(i.delimiter || e.config.section_delimiter || ","); + }, get_value: function(h, a, r) { + for (var d = [], i = h.getElementsByTagName("input"), _ = 0; _ < i.length; _++) + i[_].checked && d.push(i[_].value); + return d.join(r.delimiter || e.config.section_delimiter || ","); }, focus: function(h) { } }; }, multisource: function(e) { var h = e._load; - e._load = function(a, i) { + e._load = function(a, r) { if (typeof (a = a || this._load_url) == "object") for (var d = function(_) { var o = function() { }; return o.prototype = _, o; - }(this._loaded), n = 0; n < a.length; n++) - this._loaded = new d(), h.call(this, a[n], i); + }(this._loaded), i = 0; i < a.length; i++) + this._loaded = new d(), h.call(this, a[i], r); else h.apply(this, arguments); }; }, mvc: function(e) { var h, a = { use_id: !1 }; - function i(_) { + function r(_) { var o = {}; for (var t in _) t.indexOf("_") !== 0 && (o[t] = _[t]); @@ -6861,32 +6876,32 @@ const lt = { active_links: function(e) { function d(_) { _._not_render = !1, _._render_wait && _.render_view_data(), _._loading = !1, _.callEvent("onXLE", []); } - function n(_) { + function i(_) { return a.use_id ? _.id : _.cid; } e.backbone = function(_, o) { o && (a = o), _.bind("change", function(s, c) { - var u = n(s), v = e._events[u] = s.toJSON(); + var u = i(s), v = e._events[u] = s.toJSON(); v.id = u, e._init_event(v), clearTimeout(h), h = setTimeout(function() { if (e.$destroyed) return !0; e.updateView(); }, 1); }), _.bind("remove", function(s, c) { - var u = n(s); + var u = i(s); e._events[u] && e.deleteEvent(u); }); var t = []; - function r() { + function n() { if (e.$destroyed) return !0; t.length && (e.parse(t, "json"), t = []); } _.bind("add", function(s, c) { - var u = n(s); + var u = i(s); if (!e._events[u]) { var v = s.toJSON(); - v.id = u, e._init_event(v), t.push(v), t.length == 1 && setTimeout(r, 1); + v.id = u, e._init_event(v), t.push(v), t.length == 1 && setTimeout(n, 1); } }), _.bind("request", function(s) { var c; @@ -6900,12 +6915,12 @@ const lt = { active_links: function(e) { return e._events[s] = c.toJSON(), e._events[s].id = s, !0; }), e.attachEvent("onEventAdded", function(s) { if (!_.get(s)) { - var c = i(e.getEvent(s)), u = new _.model(c), v = n(u); + var c = r(e.getEvent(s)), u = new _.model(c), v = i(u); v != s && this.changeEventId(s, v), _.add(u), _.trigger("scheduler:add", u); } return !0; }), e.attachEvent("onEventChanged", function(s) { - var c = _.get(s), u = i(e.getEvent(s)); + var c = _.get(s), u = r(e.getEvent(s)); return c.set(u), _.trigger("scheduler:change", c), !0; }), e.attachEvent("onEventDeleted", function(s) { var c = _.get(s); @@ -6914,11 +6929,11 @@ const lt = { active_links: function(e) { }; }, outerdrag: function(e) { e.attachEvent("onTemplatesReady", function() { - var h, a = new dhtmlDragAndDropObject(), i = a.stopDrag; - function d(n, _, o, t) { - if (!e.checkEvent("onBeforeExternalDragIn") || e.callEvent("onBeforeExternalDragIn", [n, _, o, t, h])) { - var r = e.attachEvent("onEventCreated", function(m) { - e.callEvent("onExternalDragIn", [m, n, h]) || (this._drag_mode = this._drag_id = null, this.deleteEvent(m)); + var h, a = new dhtmlDragAndDropObject(), r = a.stopDrag; + function d(i, _, o, t) { + if (!e.checkEvent("onBeforeExternalDragIn") || e.callEvent("onBeforeExternalDragIn", [i, _, o, t, h])) { + var n = e.attachEvent("onEventCreated", function(m) { + e.callEvent("onExternalDragIn", [m, i, h]) || (this._drag_mode = this._drag_id = null, this.deleteEvent(m)); }), s = e.getActionData(h), c = { start_date: new Date(s.date) }; if (e.matrix && e.matrix[e._mode]) { var u = e.matrix[e._mode]; @@ -6926,29 +6941,29 @@ const lt = { active_links: function(e) { var v = e._locate_cell_timeline(h); c.start_date = u._trace_x[v.x], c.end_date = e.date.add(c.start_date, u.x_step, u.x_unit); } - e._props && e._props[e._mode] && (c[e._props[e._mode].map_to] = s.section), e.addEventNow(c), e.detachEvent(r); + e._props && e._props[e._mode] && (c[e._props[e._mode].map_to] = s.section), e.addEventNow(c), e.detachEvent(n); } } - a.stopDrag = function(n) { - return h = n, i.apply(this, arguments); - }, a.addDragLanding(e._els.dhx_cal_data[0], { _drag: function(n, _, o, t) { - d(n, _, o, t); - }, _dragIn: function(n, _) { - return n; - }, _dragOut: function(n) { + a.stopDrag = function(i) { + return h = i, r.apply(this, arguments); + }, a.addDragLanding(e._els.dhx_cal_data[0], { _drag: function(i, _, o, t) { + d(i, _, o, t); + }, _dragIn: function(i, _) { + return i; + }, _dragOut: function(i) { return this; - } }), dhtmlx.DragControl && dhtmlx.DragControl.addDrop(e._els.dhx_cal_data[0], { onDrop: function(n, _, o, t) { - var r = dhtmlx.DragControl.getMaster(n); - h = t, d(n, r, _, t.target || t.srcElement); - }, onDragIn: function(n, _, o) { + } }), dhtmlx.DragControl && dhtmlx.DragControl.addDrop(e._els.dhx_cal_data[0], { onDrop: function(i, _, o, t) { + var n = dhtmlx.DragControl.getMaster(i); + h = t, d(i, n, _, t.target || t.srcElement); + }, onDragIn: function(i, _, o) { return _; } }, !0); }); }, pdf: function(e) { - var h, a, i = new RegExp("<[^>]*>", "g"), d = new RegExp("]*>", "g"); - function n(b) { + var h, a, r = new RegExp("<[^>]*>", "g"), d = new RegExp("]*>", "g"); + function i(b) { return b.replace(d, ` -`).replace(i, ""); +`).replace(r, ""); } function _(b, k) { b = parseFloat(b), k = parseFloat(k), isNaN(k) || (b -= k); @@ -6969,7 +6984,7 @@ const lt = { active_links: function(e) { } return { width: k, cols: x }; } - function r(b) { + function n(b) { return b = parseFloat(b), isNaN(b) ? "auto" : 100 * b / a; } function s(b, k) { @@ -6998,18 +7013,18 @@ const lt = { active_links: function(e) { var b = "", k = e._mode; if (e.matrix && e.matrix[e._mode] && (k = e.matrix[e._mode].render == "cell" ? "matrix" : "timeline"), b += "", e._mode == "week_agenda") for (var E = e._els.dhx_cal_data[0].getElementsByTagName("DIV"), D = 0; D < E.length; D++) - E[D].className == "dhx_wa_scale_bar" && (b += "" + n(E[D].innerHTML) + ""); + E[D].className == "dhx_wa_scale_bar" && (b += "" + i(E[D].innerHTML) + ""); else if (e._mode == "agenda" || e._mode == "map") - b += "" + n((E = e._els.dhx_cal_header[0].childNodes[0].childNodes)[0].innerHTML) + "" + n(E[1].innerHTML) + ""; + b += "" + i((E = e._els.dhx_cal_header[0].childNodes[0].childNodes)[0].innerHTML) + "" + i(E[1].innerHTML) + ""; else if (e._mode == "year") for (E = e._els.dhx_cal_data[0].childNodes, D = 0; D < E.length; D++) - b += "", b += g(E[D].querySelector(".dhx_year_week").childNodes), b += f(E[D].querySelector(".dhx_year_body")), b += ""; + b += "", b += g(E[D].querySelector(".dhx_year_week").childNodes), b += f(E[D].querySelector(".dhx_year_body")), b += ""; else { b += "", b += g(E = e._els.dhx_cal_header[0].childNodes), b += ""; var x = e._els.dhx_cal_data[0]; if (e.matrix && e.matrix[e._mode]) { for (b += "", D = 0; D < x.firstChild.rows.length; D++) - b += ""; + b += ""; b += "", a = x.firstChild.rows[0].cells[0].offsetHeight; } else if (x.firstChild.tagName == "TABLE") b += f(x); @@ -7018,7 +7033,7 @@ const lt = { active_links: function(e) { x = x.previousSibling; for (x = x.childNodes, b += "", D = 0; D < x.length; D++) b += ` -"; +"; b += "", a = x[0].offsetHeight; } } @@ -7029,7 +7044,7 @@ const lt = { active_links: function(e) { for (var x = [], S = E[D].querySelectorAll("td"), N = 0; N < S.length; N++) x.push(S[N].querySelector(".dhx_month_head").innerHTML); k += ` -", a = S[0].offsetHeight; +", a = S[0].offsetHeight; } return k; } @@ -7038,12 +7053,12 @@ const lt = { active_links: function(e) { e.matrix && e.matrix[e._mode] && (e.matrix[e._mode].second_scale && (k = b[1].childNodes), b = b[0].childNodes); for (var D = 0; D < b.length; D++) E += ` -"; +"; if (h = b[0].offsetWidth, k) { var x = 0, S = b[0].offsetWidth, N = 1; for (D = 0; D < k.length; D++) E += ` -", (x += k[D].offsetWidth) >= S && (S += b[N] ? b[N].offsetWidth : 0, N++), h = k[0].offsetWidth; +", (x += k[D].offsetWidth) >= S && (S += b[N] ? b[N].offsetWidth : 0, N++), h = k[0].offsetWidth; } return E; } @@ -7051,10 +7066,10 @@ const lt = { active_links: function(e) { var k = "", E = e._rendered, D = e.matrix && e.matrix[e._mode]; if (e._mode == "agenda" || e._mode == "map") for (var x = 0; x < E.length; x++) - k += ""; + k += ""; else if (e._mode == "week_agenda") for (x = 0; x < E.length; x++) - k += "" + n(E[x].innerHTML) + ""; + k += "" + i(E[x].innerHTML) + ""; else if (e._mode == "year") for (E = e.get_visible_events(), x = 0; x < E.length; x++) { var S = E[x].start_date; @@ -7067,7 +7082,7 @@ const lt = { active_links: function(e) { else if (D && D.render == "cell") for (E = e._els.dhx_cal_data[0].getElementsByTagName("TD"), x = 0; x < E.length; x++) A = b ? s(E[x], "color") : "", k += ` -"; +"; else for (x = 0; x < E.length; x++) { var T, O; @@ -7078,18 +7093,18 @@ const lt = { active_links: function(e) { T = o(E[x].style.left, L, !0), O = o(E[x].style.width, L) - 1; } if (!isNaN(1 * O)) { - var $ = r(E[x].style.top), P = r(E[x].style.height), z = E[x].className.split(" ")[0].replace("dhx_cal_", ""); + var H = n(E[x].style.top), P = n(E[x].style.height), z = E[x].className.split(" ")[0].replace("dhx_cal_", ""); if (z !== "dhx_tooltip_line") { - var H = e.getEvent(E[x].getAttribute(e.config.event_attribute)); - if (H) { - M = H._sday; - var j = H._sweek, F = H._length || 0; + var $ = e.getEvent(E[x].getAttribute(e.config.event_attribute)); + if ($) { + M = $._sday; + var j = $._sweek, F = $._length || 0; if (e._mode == "month") - P = parseInt(E[x].offsetHeight, 10), $ = parseInt(E[x].style.top, 10) - e.xy.month_head_height, M = c(E[x], M), j = u(E[x], j); + P = parseInt(E[x].offsetHeight, 10), H = parseInt(E[x].style.top, 10) - e.xy.month_head_height, M = c(E[x], M), j = u(E[x], j); else if (e.matrix && e.matrix[e._mode]) { M = 0, j = E[x].parentNode.parentNode.parentNode.rowIndex; var U = a; - a = E[x].parentNode.offsetHeight, $ = r(E[x].style.top), $ -= 0.2 * $, a = U; + a = E[x].parentNode.offsetHeight, H = n(E[x].style.top), H -= 0.2 * H, a = U; } else { if (E[x].parentNode == e._els.dhx_cal_data[0]) continue; @@ -7097,7 +7112,7 @@ const lt = { active_links: function(e) { T += _(E[x].parentNode.style.left, se); } k += ` -", z == "event" ? (k += "
", A = b ? s(E[x].childNodes[2], "color") : "", k += "") : (A = b ? s(E[x], "color") : "", k += ""), k += "
"; +", z == "event" ? (k += "
", A = b ? s(E[x].childNodes[2], "color") : "", k += "") : (A = b ? s(E[x], "color") : "", k += ""), k += "
"; } } } @@ -7140,14 +7155,14 @@ const lt = { active_links: function(e) { }), function() { for (var h = ["onEmptyClick", "onViewChange", "onLightbox", "onBeforeEventDelete", "onBeforeDrag"], a = function() { return e.hideQuickInfo(!0), !0; - }, i = 0; i < h.length; i++) - e.attachEvent(h[i], a); - }(), e.templates.quick_info_title = function(h, a, i) { - return i.text.substr(0, 50); - }, e.templates.quick_info_content = function(h, a, i) { - return i.details || ""; - }, e.templates.quick_info_date = function(h, a, i) { - return e.isOneDayEvent(i) && e.config.rtl ? e.templates.day_date(h, a, i) + " " + e.templates.event_header(a, h, i) : e.isOneDayEvent(i) ? e.templates.day_date(h, a, i) + " " + e.templates.event_header(h, a, i) : e.config.rtl ? e.templates.week_date(a, h, i) : e.templates.week_date(h, a, i); + }, r = 0; r < h.length; r++) + e.attachEvent(h[r], a); + }(), e.templates.quick_info_title = function(h, a, r) { + return r.text.substr(0, 50); + }, e.templates.quick_info_content = function(h, a, r) { + return r.details || ""; + }, e.templates.quick_info_date = function(h, a, r) { + return e.isOneDayEvent(r) && e.config.rtl ? e.templates.day_date(h, a, r) + " " + e.templates.event_header(a, h, r) : e.isOneDayEvent(r) ? e.templates.day_date(h, a, r) + " " + e.templates.event_header(h, a, r) : e.config.rtl ? e.templates.week_date(a, h, r) : e.templates.week_date(h, a, r); }, e.showQuickInfo = function(h) { if (h != this._quick_info_box_id && (this.hideQuickInfo(!0), this.callEvent("onBeforeQuickInfo", [h]) !== !1)) { var a = this._get_event_counter_part(h); @@ -7156,33 +7171,33 @@ const lt = { active_links: function(e) { }, function() { function h(a) { a = a || ""; - var i, d = parseFloat(a), n = a.match(/m?s/); - switch (n && (n = n[0]), n) { + var r, d = parseFloat(a), i = a.match(/m?s/); + switch (i && (i = i[0]), i) { case "s": - i = 1e3 * d; + r = 1e3 * d; break; case "ms": - i = d; + r = d; break; default: - i = 0; + r = 0; } - return i; + return r; } e.hideQuickInfo = function(a) { - var i = this._quick_info_box, d = this._quick_info_box_id; - if (this._quick_info_box_id = 0, i && i.parentNode) { - var n = i.offsetWidth; + var r = this._quick_info_box, d = this._quick_info_box_id; + if (this._quick_info_box_id = 0, r && r.parentNode) { + var i = r.offsetWidth; if (e.config.quick_info_detached) - return this.callEvent("onAfterQuickInfo", [d]), i.parentNode.removeChild(i); - if (i.style.right == "auto" ? i.style.left = -n + "px" : i.style.right = -n + "px", a) - i.parentNode.removeChild(i); + return this.callEvent("onAfterQuickInfo", [d]), r.parentNode.removeChild(r); + if (r.style.right == "auto" ? r.style.left = -i + "px" : r.style.right = -i + "px", a) + r.parentNode.removeChild(r); else { var _; - window.getComputedStyle ? _ = window.getComputedStyle(i, null) : i.currentStyle && (_ = i.currentStyle); + window.getComputedStyle ? _ = window.getComputedStyle(r, null) : r.currentStyle && (_ = r.currentStyle); var o = h(_["transition-delay"]) + h(_["transition-duration"]); setTimeout(function() { - i.parentNode && i.parentNode.removeChild(i); + r.parentNode && r.parentNode.removeChild(r); }, o); } this.callEvent("onAfterQuickInfo", [d]); @@ -7193,15 +7208,15 @@ const lt = { active_links: function(e) { }), e._show_quick_info = function(h) { var a = e._quick_info_box; e._obj.appendChild(a); - var i = a.offsetWidth, d = a.offsetHeight; + var r = a.offsetWidth, d = a.offsetHeight; if (e.config.quick_info_detached) { - var n = h.left - h.dx * (i - h.width); - e.getView() && e.getView()._x_scroll && (e.config.rtl ? n += e.getView()._x_scroll : n -= e.getView()._x_scroll), n + i > window.innerWidth && (n = window.innerWidth - i), n = Math.max(0, n), a.style.left = n + "px", a.style.top = h.top - (h.dy ? d : -h.height) + "px"; + var i = h.left - h.dx * (r - h.width); + e.getView() && e.getView()._x_scroll && (e.config.rtl ? i += e.getView()._x_scroll : i -= e.getView()._x_scroll), i + r > window.innerWidth && (i = window.innerWidth - r), i = Math.max(0, i), a.style.left = i + "px", a.style.top = h.top - (h.dy ? d : -h.height) + "px"; } else { const _ = e.$container.querySelector(".dhx_cal_data").offsetTop; - a.style.top = _ + 20 + "px", h.dx == 1 ? (a.style.right = "auto", a.style.left = -i + "px", setTimeout(function() { + a.style.top = _ + 20 + "px", h.dx == 1 ? (a.style.right = "auto", a.style.left = -r + "px", setTimeout(function() { a.style.left = "-10px"; - }, 1)) : (a.style.left = "auto", a.style.right = -i + "px", setTimeout(function() { + }, 1)) : (a.style.left = "auto", a.style.right = -r + "px", setTimeout(function() { a.style.right = "-10px"; }, 1)), a.className = a.className.replace(" dhx_qi_left", "").replace(" dhx_qi_right", "") + " dhx_qi_" + (h.dx == 1 ? "left" : "right"); } @@ -7227,11 +7242,11 @@ const lt = { active_links: function(e) {
`; a += '
'; - for (var i = e.config.icons_select, d = 0; d < i.length; d++) - a += `
-
${e.locale.labels[i[d]]}
`; - a += "
", h.innerHTML = a, e.event(h, "click", function(n) { - e._qi_button_click(n.target || n.srcElement); + for (var r = e.config.icons_select, d = 0; d < r.length; d++) + a += `
+
${e.locale.labels[r[d]]}
`; + a += "", h.innerHTML = a, e.event(h, "click", function(i) { + e._qi_button_click(i.target || i.srcElement); }), e.config.quick_info_detached && (e._detachDomEvent(e._els.dhx_cal_data[0], "scroll", e._quick_info_onscroll_handler), e.event(e._els.dhx_cal_data[0], "scroll", e._quick_info_onscroll_handler)); } return this._quick_info_box; @@ -7241,51 +7256,51 @@ const lt = { active_links: function(e) { if (h.closest(".dhx_cal_qi_close_btn")) e.hideQuickInfo(); else { - var i = e._getClassName(h); - if (i.indexOf("_icon") != -1) { + var r = e._getClassName(h); + if (r.indexOf("_icon") != -1) { var d = e._quick_info_box_id; - e._click.buttons[i.split(" ")[1].replace("icon_", "")](d); + e._click.buttons[r.split(" ")[1].replace("icon_", "")](d); } else e._qi_button_click(h.parentNode); } }, e._get_event_counter_part = function(h) { - for (var a = e.getRenderedEvent(h), i = 0, d = 0, n = a; n && n != e._obj; ) - i += n.offsetLeft, d += n.offsetTop - n.scrollTop, n = n.offsetParent; - return n ? { left: i, top: d, dx: i + a.offsetWidth / 2 > e._x / 2 ? 1 : 0, dy: d + a.offsetHeight / 2 > e._y / 2 ? 1 : 0, width: a.offsetWidth, height: a.offsetHeight } : 0; + for (var a = e.getRenderedEvent(h), r = 0, d = 0, i = a; i && i != e._obj; ) + r += i.offsetLeft, d += i.offsetTop - i.scrollTop, i = i.offsetParent; + return i ? { left: r, top: d, dx: r + a.offsetWidth / 2 > e._x / 2 ? 1 : 0, dy: d + a.offsetHeight / 2 > e._y / 2 ? 1 : 0, width: a.offsetWidth, height: a.offsetHeight } : 0; }, e._fill_quick_data = function(h) { - var a = e.getEvent(h), i = e._quick_info_box; + var a = e.getEvent(h), r = e._quick_info_box; e._quick_info_box_id = h; var d = { content: e.templates.quick_info_title(a.start_date, a.end_date, a), date: e.templates.quick_info_date(a.start_date, a.end_date, a) }; - i.querySelector(".dhx_cal_qi_tcontent").innerHTML = `${d.content}`, i.querySelector(".dhx_cal_qi_tdate").innerHTML = d.date, e._waiAria.quickInfoHeader(i, [d.content, d.date].join(" ")); - var n = i.querySelector(".dhx_cal_qi_content"); + r.querySelector(".dhx_cal_qi_tcontent").innerHTML = `${d.content}`, r.querySelector(".dhx_cal_qi_tdate").innerHTML = d.date, e._waiAria.quickInfoHeader(r, [d.content, d.date].join(" ")); + var i = r.querySelector(".dhx_cal_qi_content"); const _ = e.templates.quick_info_content(a.start_date, a.end_date, a); - _ ? (n.classList.remove("dhx_hidden"), n.innerHTML = _) : n.classList.add("dhx_hidden"); + _ ? (i.classList.remove("dhx_hidden"), i.innerHTML = _) : i.classList.add("dhx_hidden"); }; }, readonly: function(e) { e.attachEvent("onTemplatesReady", function() { var h; e.form_blocks.recurring && (h = e.form_blocks.recurring.set_value); - var a = e.config.buttons_left.slice(), i = e.config.buttons_right.slice(); - function d(o, t, r, s) { - for (var c = t.getElementsByTagName(o), u = r.getElementsByTagName(o), v = u.length - 1; v >= 0; v--) - if (r = u[v], s) { + var a = e.config.buttons_left.slice(), r = e.config.buttons_right.slice(); + function d(o, t, n, s) { + for (var c = t.getElementsByTagName(o), u = n.getElementsByTagName(o), v = u.length - 1; v >= 0; v--) + if (n = u[v], s) { var m = document.createElement("span"); - m.className = "dhx_text_disabled", m.innerHTML = s(c[v]), r.parentNode.insertBefore(m, r), r.parentNode.removeChild(r); + m.className = "dhx_text_disabled", m.innerHTML = s(c[v]), n.parentNode.insertBefore(m, n), n.parentNode.removeChild(n); } else - r.disabled = !0, t.checked && (r.checked = !0); + n.disabled = !0, t.checked && (n.checked = !0); } e.attachEvent("onBeforeLightbox", function(o) { - this.config.readonly_form || this.getEvent(o).readonly ? this.config.readonly_active = !0 : (this.config.readonly_active = !1, e.config.buttons_left = a.slice(), e.config.buttons_right = i.slice(), e.form_blocks.recurring && (e.form_blocks.recurring.set_value = h)); + this.config.readonly_form || this.getEvent(o).readonly ? this.config.readonly_active = !0 : (this.config.readonly_active = !1, e.config.buttons_left = a.slice(), e.config.buttons_right = r.slice(), e.form_blocks.recurring && (e.form_blocks.recurring.set_value = h)); var t = this.config.lightbox.sections; if (this.config.readonly_active) { - for (var r = 0; r < t.length; r++) - t[r].type == "recurring" && this.config.readonly_active && e.form_blocks.recurring && (e.form_blocks.recurring.set_value = function(g, p, y) { + for (var n = 0; n < t.length; n++) + t[n].type == "recurring" && this.config.readonly_active && e.form_blocks.recurring && (e.form_blocks.recurring.set_value = function(g, p, y) { var w = e.$domHelpers.closest(g, ".dhx_wrap_section"), b = "none"; w.querySelector(".dhx_cal_lsection").display = b, w.querySelector(".dhx_form_repeat").display = b, w.style.display = b, e.setLightboxSize(); }); var s = ["dhx_delete_btn", "dhx_save_btn"], c = [e.config.buttons_left, e.config.buttons_right]; - for (r = 0; r < s.length; r++) - for (var u = s[r], v = 0; v < c.length; v++) { + for (n = 0; n < s.length; n++) + for (var u = s[n], v = 0; v < c.length; v++) { for (var m = c[v], l = -1, f = 0; f < m.length; f++) if (m[f] == u) { l = f; @@ -7296,18 +7311,18 @@ const lt = { active_links: function(e) { } return this.resetLightbox(), !0; }); - var n = e._fill_lightbox; + var i = e._fill_lightbox; e._fill_lightbox = function() { var o = this.getLightbox(); this.config.readonly_active && (o.style.visibility = "hidden", o.style.display = "block"); - var t = n.apply(this, arguments); + var t = i.apply(this, arguments); if (this.config.readonly_active && (o.style.visibility = "", o.style.display = "none"), this.config.readonly_active) { - var r = this.getLightbox(), s = this._lightbox_r = r.cloneNode(!0); - s.id = e.uid(), s.className += " dhx_cal_light_readonly", d("textarea", r, s, function(c) { + var n = this.getLightbox(), s = this._lightbox_r = n.cloneNode(!0); + s.id = e.uid(), s.className += " dhx_cal_light_readonly", d("textarea", n, s, function(c) { return c.value; - }), d("input", r, s, !1), d("select", r, s, function(c) { + }), d("input", n, s, !1), d("select", n, s, function(c) { return c.options.length ? c.options[Math.max(c.selectedIndex || 0, 0)].text : ""; - }), r.parentNode.insertBefore(s, r), this.showCover(s), e._lightbox && e._lightbox.parentNode.removeChild(e._lightbox), this._lightbox = s, e.config.drag_lightbox && e.event(s.firstChild, "mousedown", e._ready_to_dnd), e._init_lightbox_events(), this.setLightboxSize(); + }), n.parentNode.insertBefore(s, n), this.showCover(s), e._lightbox && e._lightbox.parentNode.removeChild(e._lightbox), this._lightbox = s, e.config.drag_lightbox && e.event(s.firstChild, "mousedown", e._ready_to_dnd), e._init_lightbox_events(), this.setLightboxSize(); } return t; }; @@ -7318,81 +7333,81 @@ const lt = { active_links: function(e) { }); }, recurring: function(e) { function h() { - var n = e.formSection("recurring"); - if (n || (n = a("recurring")), !n) + var i = e.formSection("recurring"); + if (i || (i = a("recurring")), !i) throw new Error(["Can't locate the Recurring form section.", "Make sure that you have the recurring control on the lightbox configuration https://docs.dhtmlx.com/scheduler/recurring_events.html#recurringlightbox ", 'and that the recurring control has name "recurring":', "", "scheduler.config.lightbox.sections = [", ' {name:"recurring", ... }', "];"].join(` `)); - return n; + return i; } - function a(n) { + function a(i) { for (var _ = 0; _ < e.config.lightbox.sections.length; _++) { var o = e.config.lightbox.sections[_]; - if (o.type === n) + if (o.type === i) return e.formSection(o.name); } return null; } - function i(n) { - return new Date(n.getFullYear(), n.getMonth(), n.getDate(), n.getHours(), n.getMinutes(), n.getSeconds(), 0); + function r(i) { + return new Date(i.getFullYear(), i.getMonth(), i.getDate(), i.getHours(), i.getMinutes(), i.getSeconds(), 0); } var d; - e.config.occurrence_timestamp_in_utc = !1, e.config.recurring_workdays = [1, 2, 3, 4, 5], e.form_blocks.recurring = { _get_node: function(n) { - if (typeof n == "string") { - let _ = e._lightbox.querySelector(`#${n}`); - _ || (_ = document.getElementById(n)), n = _; - } - return n.style.display == "none" && (n.style.display = ""), n; - }, _outer_html: function(n) { - return n.outerHTML || (_ = n, (t = document.createElement("div")).appendChild(_.cloneNode(!0)), o = t.innerHTML, t = null, o); + e.config.occurrence_timestamp_in_utc = !1, e.config.recurring_workdays = [1, 2, 3, 4, 5], e.form_blocks.recurring = { _get_node: function(i) { + if (typeof i == "string") { + let _ = e._lightbox.querySelector(`#${i}`); + _ || (_ = document.getElementById(i)), i = _; + } + return i.style.display == "none" && (i.style.display = ""), i; + }, _outer_html: function(i) { + return i.outerHTML || (_ = i, (t = document.createElement("div")).appendChild(_.cloneNode(!0)), o = t.innerHTML, t = null, o); var _, o, t; - }, render: function(n) { - if (n.form) { - var _ = e.form_blocks.recurring, o = _._get_node(n.form), t = _._outer_html(o); + }, render: function(i) { + if (i.form) { + var _ = e.form_blocks.recurring, o = _._get_node(i.form), t = _._outer_html(o); return o.style.display = "none", t; } - var r = e.locale.labels; - return '
' + r.repeat_text_occurences_count + '
'; - }, _ds: {}, _get_form_node: function(n, _, o) { - var t = n[_]; + var n = e.locale.labels; + return '
' + n.repeat_text_occurences_count + '
'; + }, _ds: {}, _get_form_node: function(i, _, o) { + var t = i[_]; if (!t) return null; if (t.nodeName) return t; if (t.length) { - for (var r = 0; r < t.length; r++) - if (t[r].value == o) - return t[r]; + for (var n = 0; n < t.length; n++) + if (t[n].value == o) + return t[n]; } - }, _get_node_value: function(n, _, o) { - var t = n[_]; + }, _get_node_value: function(i, _, o) { + var t = i[_]; if (!t) return ""; if (t.length) { if (o) { - for (var r = [], s = 0; s < t.length; s++) - t[s].checked && r.push(t[s].value); - return r; + for (var n = [], s = 0; s < t.length; s++) + t[s].checked && n.push(t[s].value); + return n; } for (s = 0; s < t.length; s++) if (t[s].checked) return t[s].value; } return t.value ? o ? [t.value] : t.value : void 0; - }, _get_node_numeric_value: function(n, _) { - return 1 * e.form_blocks.recurring._get_node_value(n, _) || 0; - }, _set_node_value: function(n, _, o) { - var t = n[_]; + }, _get_node_numeric_value: function(i, _) { + return 1 * e.form_blocks.recurring._get_node_value(i, _) || 0; + }, _set_node_value: function(i, _, o) { + var t = i[_]; if (t) { if (t.name == _) t.value = o; else if (t.length) - for (var r = typeof o == "object", s = 0; s < t.length; s++) - (r || t[s].value == o) && (t[s].checked = r ? !!o[t[s].value] : !!o); + for (var n = typeof o == "object", s = 0; s < t.length; s++) + (n || t[s].value == o) && (t[s].checked = n ? !!o[t[s].value] : !!o); } - }, _init_set_value: function(n, _, o) { - var t = e.form_blocks.recurring, r = t._get_node_value, s = t._set_node_value; + }, _init_set_value: function(i, _, o) { + var t = e.form_blocks.recurring, n = t._get_node_value, s = t._set_node_value; e.form_blocks.recurring._ds = { start: o.start_date, end: o._end_date }; - var c = e.date.str_to_date(e.config.repeat_date, !1, !0), u = e.date.date_to_str(e.config.repeat_date), v = n.getElementsByTagName("FORM")[0], m = {}; + var c = e.date.str_to_date(e.config.repeat_date, !1, !0), u = e.date.date_to_str(e.config.repeat_date), v = i.getElementsByTagName("FORM")[0], m = {}; function l(D) { for (var x = 0; x < D.length; x++) { var S = D[x]; @@ -7442,7 +7457,7 @@ const lt = { active_links: function(e) { S.value = x; } e.form_blocks.recurring._get_repeat_code = function(D) { - var x = [r(m, "repeat")]; + var x = [n(m, "repeat")]; for (w[x[0]](x, D); x.length < 5; ) x.push(""); var S = "", N = function(M) { @@ -7458,7 +7473,7 @@ const lt = { active_links: function(e) { return N == "no" ? (D.end = new Date(9999, 1, 1), S = "no") : N == "date_of_end" ? D.end = function(M) { var A = c(M); return e.config.include_end_by && (A = e.date.add(A, 1, "day")), A; - }(r(m, "date_of_end")) : (e.transpose_type(x.join("_")), S = Math.max(1, r(m, "occurences_count")), D.end = e.date["add_" + x.join("_")](new Date(D.start), S + 0, { start_date: D.start }) || D.start), x.join("_") + "#" + S; + }(n(m, "date_of_end")) : (e.transpose_type(x.join("_")), S = Math.max(1, n(m, "occurences_count")), D.end = e.date["add_" + x.join("_")](new Date(D.start), S + 0, { start_date: D.start }) || D.start), x.join("_") + "#" + S; }; var w = { month: function(D, x) { var S = e.form_blocks.recurring._get_node_value, N = e.form_blocks.recurring._get_node_numeric_value; @@ -7514,20 +7529,20 @@ const lt = { active_links: function(e) { E.name === "repeat" && (E.nodeName != "SELECT" || E.$_eventAttached ? E.$_eventAttached || (E.$_eventAttached = !0, E.addEventListener("click", p)) : (E.$_eventAttached = !0, E.addEventListener("change", p))); } e._lightbox._rec_init_done = !0; - }, set_value: function(n, _, o) { + }, set_value: function(i, _, o) { var t = e.form_blocks.recurring; - e._lightbox._rec_init_done || t._init_set_value(n, _, o), n.open = !o.rec_type, n.blocked = this._is_modified_occurence(o); - var r = t._ds; - r.start = o.start_date, r.end = o._end_date, t._toggle_block(), _ && t._set_repeat_code(_, r); - }, get_value: function(n, _) { - if (n.open) { + e._lightbox._rec_init_done || t._init_set_value(i, _, o), i.open = !o.rec_type, i.blocked = this._is_modified_occurence(o); + var n = t._ds; + n.start = o.start_date, n.end = o._end_date, t._toggle_block(), _ && t._set_repeat_code(_, n); + }, get_value: function(i, _) { + if (i.open) { var o = e.form_blocks.recurring._ds, t = {}; (function() { - var r = e.formSection("time"); - if (r || (r = a("time")), r || (r = a("calendar_time")), !r) + var n = e.formSection("time"); + if (n || (n = a("time")), n || (n = a("calendar_time")), !n) throw new Error(["Can't calculate the recurring rule, the Recurring form block can't find the Time control. Make sure you have the time control in 'scheduler.config.lightbox.sections' config.", "You can use either the default time control https://docs.dhtmlx.com/scheduler/time.html, or the datepicker https://docs.dhtmlx.com/scheduler/minicalendar.html, or a custom control. ", 'In the latter case, make sure the control is named "time":', "", "scheduler.config.lightbox.sections = [", '{name:"time", height:72, type:"YOU CONTROL", map_to:"auto" }];'].join(` `)); - return r; + return n; })().getValue(t), o.start = t.start_date, _.rec_type = e.form_blocks.recurring._get_repeat_code(o), o._start ? (_.start_date = new Date(o.start), _._start_date = new Date(o.start), o._start = !1) : _._start_date = null, _._end_date = o.end, _.rec_pattern = _.rec_type.split("#")[0]; } else _.rec_type = _.rec_pattern = "", _._end_date = _.end_date; @@ -7537,165 +7552,165 @@ const lt = { active_links: function(e) { }, _get_form: function() { return h().node; }, open: function() { - var n = e.form_blocks.recurring; - n._get_form().open || n._toggle_block(); + var i = e.form_blocks.recurring; + i._get_form().open || i._toggle_block(); }, close: function() { - var n = e.form_blocks.recurring; - n._get_form().open && n._toggle_block(); + var i = e.form_blocks.recurring; + i._get_form().open && i._toggle_block(); }, _toggle_block: function() { - var n = e.form_blocks.recurring, _ = n._get_form(), o = n._get_button(); + var i = e.form_blocks.recurring, _ = i._get_form(), o = i._get_button(); _.open || _.blocked ? (_.style.height = "0px", o && (o.style.backgroundPosition = "-5px 20px", o.nextSibling.innerHTML = e.locale.labels.button_recurring)) : (_.style.height = "auto", o && (o.style.backgroundPosition = "-5px 0px", o.nextSibling.innerHTML = e.locale.labels.button_recurring_open)), _.open = !_.open, e.setLightboxSize(); - }, focus: function(n) { - }, button_click: function(n, _, o) { + }, focus: function(i) { + }, button_click: function(i, _, o) { e.form_blocks.recurring._get_form().blocked || e.form_blocks.recurring._toggle_block(); - } }, e._rec_markers = {}, e._rec_markers_pull = {}, e._add_rec_marker = function(n, _) { - n._pid_time = _, this._rec_markers[n.id] = n, this._rec_markers_pull[n.event_pid] || (this._rec_markers_pull[n.event_pid] = {}), this._rec_markers_pull[n.event_pid][_] = n; - }, e._get_rec_marker = function(n, _) { + } }, e._rec_markers = {}, e._rec_markers_pull = {}, e._add_rec_marker = function(i, _) { + i._pid_time = _, this._rec_markers[i.id] = i, this._rec_markers_pull[i.event_pid] || (this._rec_markers_pull[i.event_pid] = {}), this._rec_markers_pull[i.event_pid][_] = i; + }, e._get_rec_marker = function(i, _) { var o = this._rec_markers_pull[_]; - return o ? o[n] : null; - }, e._get_rec_markers = function(n) { - return this._rec_markers_pull[n] || []; - }, e._rec_temp = [], d = e.addEvent, e.addEvent = function(n, _, o, t, r) { + return o ? o[i] : null; + }, e._get_rec_markers = function(i) { + return this._rec_markers_pull[i] || []; + }, e._rec_temp = [], d = e.addEvent, e.addEvent = function(i, _, o, t, n) { var s = d.apply(this, arguments); if (s && e.getEvent(s)) { var c = e.getEvent(s); - c.start_date && (c.start_date = i(c.start_date)), c.end_date && (c.end_date = i(c.end_date)), this._is_modified_occurence(c) && e._add_rec_marker(c, 1e3 * c.event_length), c.rec_type && (c.rec_pattern = c.rec_type.split("#")[0]); + c.start_date && (c.start_date = r(c.start_date)), c.end_date && (c.end_date = r(c.end_date)), this._is_modified_occurence(c) && e._add_rec_marker(c, 1e3 * c.event_length), c.rec_type && (c.rec_pattern = c.rec_type.split("#")[0]); } return s; - }, e.attachEvent("onEventIdChange", function(n, _) { + }, e.attachEvent("onEventIdChange", function(i, _) { if (!this._ignore_call) { - this._ignore_call = !0, e._rec_markers[n] && (e._rec_markers[_] = e._rec_markers[n], delete e._rec_markers[n]), e._rec_markers_pull[n] && (e._rec_markers_pull[_] = e._rec_markers_pull[n], delete e._rec_markers_pull[n]); + this._ignore_call = !0, e._rec_markers[i] && (e._rec_markers[_] = e._rec_markers[i], delete e._rec_markers[i]), e._rec_markers_pull[i] && (e._rec_markers_pull[_] = e._rec_markers_pull[i], delete e._rec_markers_pull[i]); for (var o = 0; o < this._rec_temp.length; o++) - (t = this._rec_temp[o]).event_pid == n && (t.event_pid = _, this.changeEventId(t.id, _ + "#" + t.id.split("#")[1])); + (t = this._rec_temp[o]).event_pid == i && (t.event_pid = _, this.changeEventId(t.id, _ + "#" + t.id.split("#")[1])); for (var o in this._rec_markers) { var t; - (t = this._rec_markers[o]).event_pid == n && (t.event_pid = _, t._pid_changed = !0); + (t = this._rec_markers[o]).event_pid == i && (t.event_pid = _, t._pid_changed = !0); } - var r = e._rec_markers[_]; - r && r._pid_changed && (delete r._pid_changed, setTimeout(function() { + var n = e._rec_markers[_]; + n && n._pid_changed && (delete n._pid_changed, setTimeout(function() { if (e.$destroyed) return !0; e.callEvent("onEventChanged", [_, e.getEvent(_)]); }, 1)), delete this._ignore_call; } - }), e.attachEvent("onConfirmedBeforeEventDelete", function(n) { - var _ = this.getEvent(n); - if (this._is_virtual_event(n) || this._is_modified_occurence(_) && _.rec_type && _.rec_type != "none") { - n = n.split("#"); - var o = this.uid(), t = n[1] ? n[1] : Math.round(_._pid_time / 1e3), r = this._copy_event(_); - r.id = o, r.event_pid = _.event_pid || n[0]; + }), e.attachEvent("onConfirmedBeforeEventDelete", function(i) { + var _ = this.getEvent(i); + if (this._is_virtual_event(i) || this._is_modified_occurence(_) && _.rec_type && _.rec_type != "none") { + i = i.split("#"); + var o = this.uid(), t = i[1] ? i[1] : Math.round(_._pid_time / 1e3), n = this._copy_event(_); + n.id = o, n.event_pid = _.event_pid || i[0]; var s = t; - r.event_length = s, r.rec_type = r.rec_pattern = "none", this.addEvent(r), this._add_rec_marker(r, 1e3 * s); + n.event_length = s, n.rec_type = n.rec_pattern = "none", this.addEvent(n), this._add_rec_marker(n, 1e3 * s); } else { _.rec_type && this._lightbox_id && this._roll_back_dates(_); - var c = this._get_rec_markers(n); + var c = this._get_rec_markers(i); for (var u in c) - c.hasOwnProperty(u) && (n = c[u].id, this.getEvent(n) && this.deleteEvent(n, !0)); + c.hasOwnProperty(u) && (i = c[u].id, this.getEvent(i) && this.deleteEvent(i, !0)); } return !0; - }), e.attachEvent("onEventDeleted", function(n, _) { - !this._is_virtual_event(n) && this._is_modified_occurence(_) && (e._events[n] || (_.rec_type = _.rec_pattern = "none", this.setEvent(n, _))); - }), e.attachEvent("onEventChanged", function(n, _) { + }), e.attachEvent("onEventDeleted", function(i, _) { + !this._is_virtual_event(i) && this._is_modified_occurence(_) && (e._events[i] || (_.rec_type = _.rec_pattern = "none", this.setEvent(i, _))); + }), e.attachEvent("onEventChanged", function(i, _) { if (this._loading) return !0; - var o = this.getEvent(n); - if (this._is_virtual_event(n)) { - n = n.split("#"); + var o = this.getEvent(i); + if (this._is_virtual_event(i)) { + i = i.split("#"); var t = this.uid(); this._not_render = !0; - var r = this._copy_event(_); - r.id = t, r.event_pid = n[0]; - var s = n[1]; - r.event_length = s, r.rec_type = r.rec_pattern = "", this._add_rec_marker(r, 1e3 * s), this.addEvent(r), this._not_render = !1; + var n = this._copy_event(_); + n.id = t, n.event_pid = i[0]; + var s = i[1]; + n.event_length = s, n.rec_type = n.rec_pattern = "", this._add_rec_marker(n, 1e3 * s), this.addEvent(n), this._not_render = !1; } else { - o.start_date && (o.start_date = i(o.start_date)), o.end_date && (o.end_date = i(o.end_date)), o.rec_type && this._lightbox_id && this._roll_back_dates(o); - var c = this._get_rec_markers(n); + o.start_date && (o.start_date = r(o.start_date)), o.end_date && (o.end_date = r(o.end_date)), o.rec_type && this._lightbox_id && this._roll_back_dates(o); + var c = this._get_rec_markers(i); for (var u in c) c.hasOwnProperty(u) && (delete this._rec_markers[c[u].id], this.deleteEvent(c[u].id, !0)); - delete this._rec_markers_pull[n]; + delete this._rec_markers_pull[i]; for (var v = !1, m = 0; m < this._rendered.length; m++) - this._rendered[m].getAttribute(this.config.event_attribute) == n && (v = !0); + this._rendered[m].getAttribute(this.config.event_attribute) == i && (v = !0); v || (this._select_id = null); } return !0; - }), e.attachEvent("onEventAdded", function(n) { + }), e.attachEvent("onEventAdded", function(i) { if (!this._loading) { - var _ = this.getEvent(n); + var _ = this.getEvent(i); _.rec_type && !_.event_length && this._roll_back_dates(_); } return !0; - }), e.attachEvent("onEventSave", function(n, _, o) { - return this.getEvent(n).rec_type || !_.rec_type || this._is_virtual_event(n) || (this._select_id = null), !0; - }), e.attachEvent("onEventCreated", function(n) { - var _ = this.getEvent(n); + }), e.attachEvent("onEventSave", function(i, _, o) { + return this.getEvent(i).rec_type || !_.rec_type || this._is_virtual_event(i) || (this._select_id = null), !0; + }), e.attachEvent("onEventCreated", function(i) { + var _ = this.getEvent(i); return _.rec_type || (_.rec_type = _.rec_pattern = _.event_length = _.event_pid = ""), !0; - }), e.attachEvent("onEventCancel", function(n) { - var _ = this.getEvent(n); + }), e.attachEvent("onEventCancel", function(i) { + var _ = this.getEvent(i); _.rec_type && (this._roll_back_dates(_), this.render_view_data()); - }), e._roll_back_dates = function(n) { - n.start_date && (n.start_date = i(n.start_date)), n.end_date && (n.end_date = i(n.end_date)), n.event_length = Math.round((n.end_date.valueOf() - n.start_date.valueOf()) / 1e3), n.end_date = n._end_date, n._start_date && (n.start_date.setMonth(0), n.start_date.setDate(n._start_date.getDate()), n.start_date.setMonth(n._start_date.getMonth()), n.start_date.setFullYear(n._start_date.getFullYear())); - }, e._is_virtual_event = function(n) { - return n.toString().indexOf("#") != -1; - }, e._is_modified_occurence = function(n) { - return n.event_pid && n.event_pid != "0"; - }, e.showLightbox_rec = e.showLightbox, e.showLightbox = function(n) { - var _ = this.locale, o = e.config.lightbox_recurring, t = this.getEvent(n), r = t.event_pid, s = this._is_virtual_event(n); - s && (r = n.split("#")[0]); + }), e._roll_back_dates = function(i) { + i.start_date && (i.start_date = r(i.start_date)), i.end_date && (i.end_date = r(i.end_date)), i.event_length = Math.round((i.end_date.valueOf() - i.start_date.valueOf()) / 1e3), i.end_date = i._end_date, i._start_date && (i.start_date.setMonth(0), i.start_date.setDate(i._start_date.getDate()), i.start_date.setMonth(i._start_date.getMonth()), i.start_date.setFullYear(i._start_date.getFullYear())); + }, e._is_virtual_event = function(i) { + return i.toString().indexOf("#") != -1; + }, e._is_modified_occurence = function(i) { + return i.event_pid && i.event_pid != "0"; + }, e.showLightbox_rec = e.showLightbox, e.showLightbox = function(i) { + var _ = this.locale, o = e.config.lightbox_recurring, t = this.getEvent(i), n = t.event_pid, s = this._is_virtual_event(i); + s && (n = i.split("#")[0]); var c = function(v) { var m = e.getEvent(v); return m._end_date = m.end_date, m.end_date = new Date(m.start_date.valueOf() + 1e3 * m.event_length), e.showLightbox_rec(v); }; - if ((r || 1 * r == 0) && t.rec_type) - return c(n); - if (!r || r === "0" || !_.labels.confirm_recurring || o == "instance" || o == "series" && !s) - return this.showLightbox_rec(n); + if ((n || 1 * n == 0) && t.rec_type) + return c(i); + if (!n || n === "0" || !_.labels.confirm_recurring || o == "instance" || o == "series" && !s) + return this.showLightbox_rec(i); if (o == "ask") { var u = this; e.modalbox({ text: _.labels.confirm_recurring, title: _.labels.title_confirm_recurring, width: "500px", position: "middle", buttons: [_.labels.button_edit_series, _.labels.button_edit_occurrence, _.labels.icon_cancel], callback: function(v) { switch (+v) { case 0: - return c(r); + return c(n); case 1: - return u.showLightbox_rec(n); + return u.showLightbox_rec(i); case 2: return; } } }); } else - c(r); - }, e.get_visible_events_rec = e.get_visible_events, e.get_visible_events = function(n) { + c(n); + }, e.get_visible_events_rec = e.get_visible_events, e.get_visible_events = function(i) { for (var _ = 0; _ < this._rec_temp.length; _++) delete this._events[this._rec_temp[_].id]; this._rec_temp = []; - var o = this.get_visible_events_rec(n), t = []; + var o = this.get_visible_events_rec(i), t = []; for (_ = 0; _ < o.length; _++) o[_].rec_type ? o[_].rec_pattern != "none" && this.repeat_date(o[_], t) : t.push(o[_]); return t; }, function() { - var n = e.isOneDayEvent; + var i = e.isOneDayEvent; e.isOneDayEvent = function(o) { - return !!o.rec_type || n.call(this, o); + return !!o.rec_type || i.call(this, o); }; var _ = e.updateEvent; e.updateEvent = function(o) { var t = e.getEvent(o); t && t.rec_type && (t.rec_pattern = (t.rec_type || "").split("#")[0]), t && t.rec_type && !this._is_virtual_event(o) ? e.update_view() : _.call(this, o); }; - }(), e.transponse_size = { day: 1, week: 7, month: 1, year: 12 }, e.date.day_week = function(n, _, o) { - n.setDate(1); - var t = e.date.month_start(new Date(n)), r = 1 * _ + (o = 7 * (o - 1)) - n.getDay() + 1; - n.setDate(r <= o ? r + 7 : r); - var s = e.date.month_start(new Date(n)); + }(), e.transponse_size = { day: 1, week: 7, month: 1, year: 12 }, e.date.day_week = function(i, _, o) { + i.setDate(1); + var t = e.date.month_start(new Date(i)), n = 1 * _ + (o = 7 * (o - 1)) - i.getDay() + 1; + i.setDate(n <= o ? n + 7 : n); + var s = e.date.month_start(new Date(i)); return t.valueOf() === s.valueOf(); - }, e.transpose_day_week = function(n, _, o, t, r) { - for (var s = (n.getDay() || (e.config.start_on_monday ? 7 : 0)) - o, c = 0; c < _.length; c++) + }, e.transpose_day_week = function(i, _, o, t, n) { + for (var s = (i.getDay() || (e.config.start_on_monday ? 7 : 0)) - o, c = 0; c < _.length; c++) if (_[c] > s) - return n.setDate(n.getDate() + 1 * _[c] - s - (t ? o : r)); - this.transpose_day_week(n, _, o + t, null, o); - }, e.transpose_type = function(n) { - var _ = "transpose_" + n; + return i.setDate(i.getDate() + 1 * _[c] - s - (t ? o : n)); + this.transpose_day_week(i, _, o + t, null, o); + }, e.transpose_type = function(i) { + var _ = "transpose_" + i; if (!this.date[_]) { - var o = n.split("_"), t = "add_" + n, r = this.transponse_size[o[0]] * o[1]; + var o = i.split("_"), t = "add_" + i, n = this.transponse_size[o[0]] * o[1]; if (o[0] == "day" || o[0] == "week") { var s = null; if (o[4] && (s = o[4].split(","), e.config.start_on_monday)) { @@ -7704,80 +7719,80 @@ const lt = { active_links: function(e) { s.sort(); } this.date[_] = function(u, v) { - var m = Math.floor((v.valueOf() - u.valueOf()) / (864e5 * r)); - return m > 0 && u.setDate(u.getDate() + m * r), s && e.transpose_day_week(u, s, 1, r), u; + var m = Math.floor((v.valueOf() - u.valueOf()) / (864e5 * n)); + return m > 0 && u.setDate(u.getDate() + m * n), s && e.transpose_day_week(u, s, 1, n), u; }, this.date[t] = function(u, v) { var m = new Date(u.valueOf()); if (s) for (var l = 0; l < v; l++) - e.transpose_day_week(m, s, 0, r); + e.transpose_day_week(m, s, 0, n); else - m.setDate(m.getDate() + v * r); + m.setDate(m.getDate() + v * n); return m; }; } else o[0] != "month" && o[0] != "year" || (this.date[_] = function(u, v, m) { - var l = Math.ceil((12 * v.getFullYear() + 1 * v.getMonth() + 1 - (12 * u.getFullYear() + 1 * u.getMonth() + 1)) / r - 1); - return l >= 0 && (u.setDate(1), u.setMonth(u.getMonth() + l * r)), e.date[t](u, 0, m); + var l = Math.ceil((12 * v.getFullYear() + 1 * v.getMonth() + 1 - (12 * u.getFullYear() + 1 * u.getMonth() + 1)) / n - 1); + return l >= 0 && (u.setDate(1), u.setMonth(u.getMonth() + l * n)), e.date[t](u, 0, m); }, this.date[t] = function(u, v, m, l) { if (l ? l++ : l = 1, l > 12) return null; var f = new Date(u.valueOf()); - f.setDate(1), f.setMonth(f.getMonth() + v * r); + f.setDate(1), f.setMonth(f.getMonth() + v * n); var g = f.getMonth(), p = f.getFullYear(); f.setDate(m.start_date.getDate()), o[3] && e.date.day_week(f, o[2], o[3]); var y = e.config.recurring_overflow_instances; return f.getMonth() != g && y != "none" && (f = y === "lastDay" ? new Date(p, g + 1, 0, f.getHours(), f.getMinutes(), f.getSeconds(), f.getMilliseconds()) : e.date[t](new Date(p, g + 1, 0), v || 1, m, l)), f; }); } - }, e.repeat_date = function(n, _, o, t, r, s) { - t = t || this._min_date, r = r || this._max_date; - var c = s || -1, u = new Date(n.start_date.valueOf()), v = u.getHours(), m = 0; - for (!n.rec_pattern && n.rec_type && (n.rec_pattern = n.rec_type.split("#")[0]), this.transpose_type(n.rec_pattern), u = e.date["transpose_" + n.rec_pattern](u, t, n); u && (u < n.start_date || e._fix_daylight_saving_date(u, t, n, u, new Date(u.valueOf() + 1e3 * n.event_length)).valueOf() <= t.valueOf() || u.valueOf() + 1e3 * n.event_length <= t.valueOf()); ) - u = this.date["add_" + n.rec_pattern](u, 1, n); - for (; u && u < r && u < n.end_date && (c < 0 || m < c); ) { + }, e.repeat_date = function(i, _, o, t, n, s) { + t = t || this._min_date, n = n || this._max_date; + var c = s || -1, u = new Date(i.start_date.valueOf()), v = u.getHours(), m = 0; + for (!i.rec_pattern && i.rec_type && (i.rec_pattern = i.rec_type.split("#")[0]), this.transpose_type(i.rec_pattern), u = e.date["transpose_" + i.rec_pattern](u, t, i); u && (u < i.start_date || e._fix_daylight_saving_date(u, t, i, u, new Date(u.valueOf() + 1e3 * i.event_length)).valueOf() <= t.valueOf() || u.valueOf() + 1e3 * i.event_length <= t.valueOf()); ) + u = this.date["add_" + i.rec_pattern](u, 1, i); + for (; u && u < n && u < i.end_date && (c < 0 || m < c); ) { u.setHours(v); - var l = e.config.occurrence_timestamp_in_utc ? Date.UTC(u.getFullYear(), u.getMonth(), u.getDate(), u.getHours(), u.getMinutes(), u.getSeconds()) : u.valueOf(), f = this._get_rec_marker(l, n.id); + var l = e.config.occurrence_timestamp_in_utc ? Date.UTC(u.getFullYear(), u.getMonth(), u.getDate(), u.getHours(), u.getMinutes(), u.getSeconds()) : u.valueOf(), f = this._get_rec_marker(l, i.id); if (f) o && (f.rec_type != "none" && m++, _.push(f)); else { - var g = new Date(u.valueOf() + 1e3 * n.event_length), p = this._copy_event(n); - if (p.text = n.text, p.start_date = u, p.event_pid = n.id, p.id = n.id + "#" + Math.round(l / 1e3), p.end_date = g, p.end_date = e._fix_daylight_saving_date(p.start_date, p.end_date, n, u, p.end_date), p._timed = this.isOneDayEvent(p), !p._timed && !this._table_view && !this.config.multi_day) + var g = new Date(u.valueOf() + 1e3 * i.event_length), p = this._copy_event(i); + if (p.text = i.text, p.start_date = u, p.event_pid = i.id, p.id = i.id + "#" + Math.round(l / 1e3), p.end_date = g, p.end_date = e._fix_daylight_saving_date(p.start_date, p.end_date, i, u, p.end_date), p._timed = this.isOneDayEvent(p), !p._timed && !this._table_view && !this.config.multi_day) return; _.push(p), o || (this._events[p.id] = p, this._rec_temp.push(p)), m++; } - u = this.date["add_" + n.rec_pattern](u, 1, n); + u = this.date["add_" + i.rec_pattern](u, 1, i); } - }, e._fix_daylight_saving_date = function(n, _, o, t, r) { - var s = n.getTimezoneOffset() - _.getTimezoneOffset(); - return s ? s > 0 ? new Date(t.valueOf() + 1e3 * o.event_length - 60 * s * 1e3) : new Date(_.valueOf() - 60 * s * 1e3) : new Date(r.valueOf()); - }, e.getRecDates = function(n, _) { - var o = typeof n == "object" ? n : e.getEvent(n), t = []; + }, e._fix_daylight_saving_date = function(i, _, o, t, n) { + var s = i.getTimezoneOffset() - _.getTimezoneOffset(); + return s ? s > 0 ? new Date(t.valueOf() + 1e3 * o.event_length - 60 * s * 1e3) : new Date(_.valueOf() - 60 * s * 1e3) : new Date(n.valueOf()); + }, e.getRecDates = function(i, _) { + var o = typeof i == "object" ? i : e.getEvent(i), t = []; if (_ = _ || 100, !o.rec_type) return [{ start_date: o.start_date, end_date: o.end_date }]; if (o.rec_type == "none") return []; e.repeat_date(o, t, !0, o.start_date, o.end_date, _); - for (var r = [], s = 0; s < t.length; s++) - t[s].rec_type != "none" && r.push({ start_date: t[s].start_date, end_date: t[s].end_date }); - return r; - }, e.getEvents = function(n, _) { + for (var n = [], s = 0; s < t.length; s++) + t[s].rec_type != "none" && n.push({ start_date: t[s].start_date, end_date: t[s].end_date }); + return n; + }, e.getEvents = function(i, _) { var o = []; for (var t in this._events) { - var r = this._events[t]; - if (r && r.start_date < _ && r.end_date > n) - if (r.rec_pattern) { - if (r.rec_pattern == "none") + var n = this._events[t]; + if (n && n.start_date < _ && n.end_date > i) + if (n.rec_pattern) { + if (n.rec_pattern == "none") continue; var s = []; - this.repeat_date(r, s, !0, n, _); + this.repeat_date(n, s, !0, i, _); for (var c = 0; c < s.length; c++) - !s[c].rec_pattern && s[c].start_date < _ && s[c].end_date > n && !this._rec_markers[s[c].id] && o.push(s[c]); + !s[c].rec_pattern && s[c].start_date < _ && s[c].end_date > i && !this._rec_markers[s[c].id] && o.push(s[c]); } else - this._is_virtual_event(r.id) || o.push(r); + this._is_virtual_event(n.id) || o.push(n); } return o; - }, e.config.repeat_date = "%m.%d.%Y", e.config.lightbox.sections = [{ name: "description", map_to: "text", type: "textarea", focus: !0 }, { name: "recurring", type: "recurring", map_to: "rec_type", button: "recurring" }, { name: "time", height: 72, type: "time", map_to: "auto" }], e._copy_dummy = function(n) { + }, e.config.repeat_date = "%m.%d.%Y", e.config.lightbox.sections = [{ name: "description", map_to: "text", type: "textarea", focus: !0 }, { name: "recurring", type: "recurring", map_to: "rec_type", button: "recurring" }, { name: "time", height: 72, type: "time", map_to: "auto" }], e._copy_dummy = function(i) { var _ = new Date(this.start_date), o = new Date(this.end_date); this.start_date = _, this.end_date = o, this.event_length = this.event_pid = this.rec_pattern = this.rec_type = null; }, e.config.include_end_by = !1, e.config.lightbox_recurring = "ask", e.attachEvent("onClearAll", function() { @@ -7786,40 +7801,40 @@ const lt = { active_links: function(e) { }, serialize: function(e) { const h = oe(e); e.data_attributes = function() { - var a = [], i = e._helpers.formatDate, d = h(); - for (var n in d) { - var _ = d[n]; + var a = [], r = e._helpers.formatDate, d = h(); + for (var i in d) { + var _ = d[i]; for (var o in _) - o.substr(0, 1) != "_" && a.push([o, o == "start_date" || o == "end_date" ? i : null]); + o.substr(0, 1) != "_" && a.push([o, o == "start_date" || o == "end_date" ? r : null]); break; } return a; }, e.toXML = function(a) { - var i = [], d = this.data_attributes(), n = h(); - for (var _ in n) { - var o = n[_]; - i.push(""); + var r = [], d = this.data_attributes(), i = h(); + for (var _ in i) { + var o = i[_]; + r.push(""); for (var t = 0; t < d.length; t++) - i.push("<" + d[t][0] + ">"); - i.push(""); + r.push("<" + d[t][0] + ">"); + r.push(""); } - return (a || "") + "" + i.join(` + return (a || "") + "" + r.join(` `) + ""; }, e._serialize_json_value = function(a) { return a === null || typeof a == "boolean" ? a = "" + a : (a || a === 0 || (a = ""), a = '"' + a.toString().replace(/\n/g, "").replace(/\\/g, "\\\\").replace(/"/g, '\\"') + '"'), a; }, e.toJSON = function() { return JSON.stringify(this.serialize()); }, e.toICal = function(a) { - var i = e.date.date_to_str("%Y%m%dT%H%i%s"), d = e.date.date_to_str("%Y%m%d"), n = [], _ = h(); + var r = e.date.date_to_str("%Y%m%dT%H%i%s"), d = e.date.date_to_str("%Y%m%d"), i = [], _ = h(); for (var o in _) { var t = _[o]; - n.push("BEGIN:VEVENT"), t._timed && (t.start_date.getHours() || t.start_date.getMinutes()) ? n.push("DTSTART:" + i(t.start_date)) : n.push("DTSTART:" + d(t.start_date)), t._timed && (t.end_date.getHours() || t.end_date.getMinutes()) ? n.push("DTEND:" + i(t.end_date)) : n.push("DTEND:" + d(t.end_date)), n.push("SUMMARY:" + t.text), n.push("END:VEVENT"); + i.push("BEGIN:VEVENT"), t._timed && (t.start_date.getHours() || t.start_date.getMinutes()) ? i.push("DTSTART:" + r(t.start_date)) : i.push("DTSTART:" + d(t.start_date)), t._timed && (t.end_date.getHours() || t.end_date.getMinutes()) ? i.push("DTEND:" + r(t.end_date)) : i.push("DTEND:" + d(t.end_date)), i.push("SUMMARY:" + t.text), i.push("END:VEVENT"); } return `BEGIN:VCALENDAR VERSION:2.0 PRODID:-//dhtmlXScheduler//NONSGML v2.2//EN DESCRIPTION:` + (a || "") + ` -` + n.join(` +` + i.join(` `) + ` END:VCALENDAR`; }; @@ -7832,9 +7847,9 @@ END:VCALENDAR`; h.tooltipFor({ selector: "[" + e.config.event_attribute + "]", html: (a) => { if (e._mobile && !e.config.touch_tooltip) return; - const i = e._locate_event(a.target); - if (e.getEvent(i)) { - const d = e.getEvent(i); + const r = e._locate_event(a.target); + if (e.getEvent(r)) { + const d = e.getEvent(r); return e.templates.tooltip_text(d.start_date, d.end_date, d); } return null; @@ -7854,21 +7869,21 @@ END:VCALENDAR`; R("Units", e.assert); }, url: function(e) { e._get_url_nav = function() { - for (var h = {}, a = (document.location.hash || "").replace("#", "").split(","), i = 0; i < a.length; i++) { - var d = a[i].split("="); + for (var h = {}, a = (document.location.hash || "").replace("#", "").split(","), r = 0; r < a.length; r++) { + var d = a[r].split("="); d.length == 2 && (h[d[0]] = d[1]); } return h; }, e.attachEvent("onTemplatesReady", function() { - var h = !0, a = e.date.str_to_date("%Y-%m-%d"), i = e.date.date_to_str("%Y-%m-%d"), d = e._get_url_nav().event || null; - function n(_) { + var h = !0, a = e.date.str_to_date("%Y-%m-%d"), r = e.date.date_to_str("%Y-%m-%d"), d = e._get_url_nav().event || null; + function i(_) { if (e.$destroyed) return !0; d = _, e.getEvent(_) && e.showEvent(_); } e.attachEvent("onAfterEventDisplay", function(_) { return d = null, !0; - }), e.attachEvent("onBeforeViewChange", function(_, o, t, r) { + }), e.attachEvent("onBeforeViewChange", function(_, o, t, n) { if (h) { h = !1; var s = e._get_url_nav(); @@ -7876,11 +7891,11 @@ END:VCALENDAR`; try { if (e.getEvent(s.event)) return setTimeout(function() { - n(s.event); + i(s.event); }), !1; var c = e.attachEvent("onXLE", function() { setTimeout(function() { - n(s.event); + i(s.event); }), e.detachEvent(c); }); } catch { @@ -7894,7 +7909,7 @@ END:VCALENDAR`; return !1; } } - var u = ["date=" + i(r || o), "mode=" + (t || _)]; + var u = ["date=" + r(n || o), "mode=" + (t || _)]; d && u.push("event=" + d); var v = "#" + u.join(","); return document.location.hash = v, !0; @@ -7909,14 +7924,14 @@ END:VCALENDAR`; this._cover.style.height = this.expanded ? "100%" : (document.body.parentNode || document.body).scrollHeight + "px"; } catch { } - }), e.form_blocks.select.set_value = function(h, a, i) { + }), e.form_blocks.select.set_value = function(h, a, r) { a !== void 0 && a !== "" || (a = (h.firstChild.options[0] || {}).value), h.firstChild.value = a || ""; }; }, year_view: function(e) { e.templates.year_date = function(o) { return e.date.date_to_str(e.locale.labels.year_tab + " %Y")(o); - }, e.templates.year_month = e.date.date_to_str("%F"), e.templates.year_scale_date = e.date.date_to_str("%D"), e.templates.year_tooltip = function(o, t, r) { - return r.text; + }, e.templates.year_month = e.date.date_to_str("%F"), e.templates.year_scale_date = e.date.date_to_str("%D"), e.templates.year_tooltip = function(o, t, n) { + return n.text; }; const h = function() { return e._mode == "year"; @@ -7929,19 +7944,19 @@ END:VCALENDAR`; const t = o.target; if (e.$domHelpers.closest(t, ".dhx_before") || e.$domHelpers.closest(t, ".dhx_after")) return !1; - const r = a(t); - if (r) { - const s = r, c = this.date.add(s, 1, "day"); + const n = a(t); + if (n) { + const s = n, c = this.date.add(s, 1, "day"); !this.config.readonly && this.config.dblclick_create && this.addEventNow(s.valueOf(), c.valueOf(), o); } } }, e.attachEvent("onEventIdChange", function() { h() && this.year_view(!0); }); - var i = e.render_data; + var r = e.render_data; e.render_data = function(o) { if (!h()) - return i.apply(this, arguments); + return r.apply(this, arguments); for (var t = 0; t < o.length; t++) this._year_render_event(o[t]); }; @@ -7955,7 +7970,7 @@ END:VCALENDAR`; e._year_marked_cells = {}; }, e._hideToolTip = function() { this._tooltip && (this._tooltip.style.display = "none", this._tooltip.date = new Date(9999, 1, 1)); - }, e._showToolTip = function(o, t, r, s) { + }, e._showToolTip = function(o, t, n, s) { if (this._tooltip) { if (this._tooltip.date.valueOf() == o.valueOf()) return; @@ -7985,15 +8000,15 @@ END:VCALENDAR`; }, e._init_year_tooltip = function() { e._detachDomEvent(e._els.dhx_cal_data[0], "mouseover", e._year_view_tooltip_handler), e.event(e._els.dhx_cal_data[0], "mouseover", e._year_view_tooltip_handler); }, e._get_year_cell = function(o) { - for (var t = e.templates.format_date(o), r = this.$root.querySelectorAll(`.dhx_cal_data .dhx_cal_datepicker_date[data-cell-date="${t}"]`), s = 0; s < r.length; s++) - if (!e.$domHelpers.closest(r[s], ".dhx_after, .dhx_before")) - return r[s]; + for (var t = e.templates.format_date(o), n = this.$root.querySelectorAll(`.dhx_cal_data .dhx_cal_datepicker_date[data-cell-date="${t}"]`), s = 0; s < n.length; s++) + if (!e.$domHelpers.closest(n[s], ".dhx_after, .dhx_before")) + return n[s]; return null; }, e._year_marked_cells = {}, e._mark_year_date = function(o, t) { - var r = e.templates.format_date(o), s = this._get_year_cell(o); + var n = e.templates.format_date(o), s = this._get_year_cell(o); if (s) { var c = this.templates.event_class(t.start_date, t.end_date, t); - e._year_marked_cells[r] || (s.classList.add("dhx_year_event", "dhx_cal_datepicker_event"), s.setAttribute("data-year-date", r), s.setAttribute("date", r), e._year_marked_cells[r] = s), c && s.classList.add(c); + e._year_marked_cells[n] || (s.classList.add("dhx_year_event", "dhx_cal_datepicker_event"), s.setAttribute("data-year-date", n), s.setAttribute("date", n), e._year_marked_cells[n] = s), c && s.classList.add(c); } }, e._unmark_year_date = function(o) { var t = this._get_year_cell(o); @@ -8013,8 +8028,8 @@ END:VCALENDAR`; e._hideToolTip(); }, e._reset_year_scale = function() { this._cols = [], this._colsS = {}; - var o = [], t = this._els.dhx_cal_data[0], r = this.config; - t.scrollTop = 0, t.innerHTML = "", Math.floor((parseInt(t.style.height) - e.xy.year_top) / r.year_y); + var o = [], t = this._els.dhx_cal_data[0], n = this.config; + t.scrollTop = 0, t.innerHTML = "", Math.floor((parseInt(t.style.height) - e.xy.year_top) / n.year_y); var s = document.createElement("div"), c = this.date.week_start(e._currentDate()); this._process_ignores(c, 7, "day", 1); for (var u = 0; u < 7; u++) @@ -8023,8 +8038,8 @@ END:VCALENDAR`; this._waiAria.yearHeadCell(s.childNodes[u]); var v = this.date[this._mode + "_start"](this.date.copy(this._date)), m = v, l = null; const f = document.createElement("div"); - for (f.classList.add("dhx_year_wrapper"), u = 0; u < r.year_y; u++) - for (var g = 0; g < r.year_x; g++) { + for (f.classList.add("dhx_year_wrapper"), u = 0; u < n.year_y; u++) + for (var g = 0; g < n.year_x; g++) { (l = document.createElement("div")).className = "dhx_year_box", l.setAttribute("date", this._helpers.formatDate(v)), l.setAttribute("data-month-date", this._helpers.formatDate(v)), l.innerHTML = "
" + s.innerHTML + "
"; var p = l.querySelector(".dhx_year_month"), y = l.querySelector(".dhx_year_grid"), w = l.querySelector(".dhx_year_body"), b = e.uid(); this._waiAria.yearHeader(p, b), this._waiAria.yearGrid(y, b), p.innerHTML = this.templates.year_month(v); @@ -8032,7 +8047,7 @@ END:VCALENDAR`; this._reset_month_scale(w, v, k, 6); for (var E = w.querySelectorAll("td"), D = 0; D < E.length; D++) this._waiAria.yearDayCell(E[D]); - f.appendChild(l), o[u * r.year_x + g] = (v.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) % 7, v = this.date.add(v, 1, "month"); + f.appendChild(l), o[u * n.year_x + g] = (v.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) % 7, v = this.date.add(v, 1, "month"); } t.appendChild(f); var x = this._getNavDateElement(); @@ -8042,34 +8057,34 @@ END:VCALENDAR`; o.scrollTop = 0, o.innerHTML = ""; let t = this.date.year_start(new Date(this._date)); this._min_date = this.date.week_start(new Date(t)); - const r = document.createElement("div"); - r.classList.add("dhx_year_wrapper"); + const n = document.createElement("div"); + n.classList.add("dhx_year_wrapper"); let s = t; for (let v = 0; v < 12; v++) { let m = document.createElement("div"); m.className = "dhx_year_box", m.setAttribute("date", this._helpers.formatDate(s)), m.setAttribute("data-month-date", this._helpers.formatDate(s)), m.innerHTML = `
${this.templates.year_month(s)}
`; const l = m.querySelector(".dhx_year_grid"), f = e._createDatePicker(null, { date: s, minWeeks: 6 }); - f._renderDayGrid(l), f.destructor(), r.appendChild(m), s = this.date.add(s, 1, "month"); + f._renderDayGrid(l), f.destructor(), n.appendChild(m), s = this.date.add(s, 1, "month"); } - o.appendChild(r); + o.appendChild(n); let c = this.date.add(t, 1, "year"); c.valueOf() != this.date.week_start(new Date(c)).valueOf() && (c = this.date.week_start(new Date(c)), c = this.date.add(c, 1, "week")), this._max_date = c; var u = this._getNavDateElement(); u && (u.innerHTML = this.templates[this._mode + "_date"](t, c, this._mode)); }; - var n = e.getActionData; + var i = e.getActionData; e.getActionData = function(o) { - return h() ? { date: a(o.target), section: null } : n.apply(e, arguments); + return h() ? { date: a(o.target), section: null } : i.apply(e, arguments); }; var _ = e._locate_event; e._locate_event = function(o) { var t = _.apply(e, arguments); if (!t) { - var r = a(o); - if (!r) + var n = a(o); + if (!n) return null; - var s = e.getEvents(r, e.date.add(r, 1, "day")); + var s = e.getEvents(n, e.date.add(n, 1, "day")); if (!s.length) return null; t = s[0].id; @@ -8083,7 +8098,7 @@ END:VCALENDAR`; this._seed = 0, this._schedulerPlugins = [], this._bundledExtensions = e, this._extensionsManager = new it(e); } plugin(e) { - this._schedulerPlugins.push(e), B.scheduler && e(B.scheduler); + this._schedulerPlugins.push(e), I.scheduler && e(I.scheduler); } getSchedulerInstance(e) { for (var h = nt(this._extensionsManager), a = 0; a < this._schedulerPlugins.length; a++) diff --git a/codebase/dhtmlxscheduler.es.js.map b/codebase/dhtmlxscheduler.es.js.map index 774029f..dd1a6ef 100644 --- a/codebase/dhtmlxscheduler.es.js.map +++ b/codebase/dhtmlxscheduler.es.js.map @@ -1 +1 @@ -{"version":3,"file":"dhtmlxscheduler.es.js","sources":["../sources/global.js","../sources/core/nav_bar.js","../sources/core/scheduler_resize_listener.js","../sources/utils/eventable.js","../sources/core/utils/event.js","../sources/core/common.js","../sources/core/utils/scoped_event.js","../sources/core/utils/utils.js","../sources/core/utils/dom_helpers.js","../sources/utils/env.js","../sources/core/common/url_serialize.js","../sources/core/base.js","../sources/core/common/get_serializable_events.js","../sources/core/load.js","../sources/core/loaders/xml.js","../sources/core/loaders/json.js","../sources/core/loaders/ical.js","../sources/core/touch.js","../sources/core/skins.js","../sources/core/dataprocessor/dataprocessor_hooks.js","../sources/core/dataprocessor/dataprocessor.js","../sources/core/message.js","../sources/locale/locale_ar.js","../sources/locale/locale_be.js","../sources/locale/locale_ca.js","../sources/locale/locale_cn.js","../sources/locale/locale_cs.js","../sources/locale/locale_da.js","../sources/locale/locale_de.js","../sources/locale/locale_el.js","../sources/locale/locale_en.js","../sources/locale/locale_es.js","../sources/locale/locale_fi.js","../sources/locale/locale_fr.js","../sources/locale/locale_he.js","../sources/locale/locale_hu.js","../sources/locale/locale_id.js","../sources/locale/locale_it.js","../sources/locale/locale_jp.js","../sources/locale/locale_manager.js","../sources/locale/locale_nb.js","../sources/locale/locale_nl.js","../sources/locale/locale_no.js","../sources/locale/locale_pl.js","../sources/locale/locale_pt.js","../sources/locale/locale_ro.js","../sources/locale/locale_ru.js","../sources/locale/locale_si.js","../sources/locale/locale_sk.js","../sources/locale/locale_sv.js","../sources/locale/locale_tr.js","../sources/locale/locale_ua.js","../sources/core/datepicker.js","../sources/scheduler_factory_method.js","../sources/core/common_errors.js","../sources/core/scheduler.js","../sources/core/wai_aria.js","../sources/core/common/assert.js","../sources/core/jquery.js","../sources/core/destructor.js","../sources/core/utils/ajax.js","../sources/core/config.js","../sources/core/event.js","../sources/core/event_highlight.js","../sources/core/lightbox.js","../sources/core/dhtmlx/dhtmlx_suite_hooks.js","../sources/core/delay_render.js","../sources/core/connector.js","../sources/locale/index.js","../sources/ext/extension_manager.js","../sources/dhtmlx_hook.js","../sources/ext/restricted_extensions/not_implemented_extension.js","../sources/ext/keyboard_navigation/modals.js","../sources/ext/keyboard_navigation/key_nav_legacy.js","../sources/ext/keyboard_navigation/scheduler_handlers.js","../sources/ext/tooltip/tooltip.ts","../sources/ext/tooltip/tooltipManager.ts","../sources/ext/extensions_gpl.js","../sources/ext/active_links.js","../sources/ext/agenda_legacy_view.js","../sources/ext/agenda.js","../sources/ext/all_timed.js","../sources/ext/collision.js","../sources/ext/container_autoresize.js","../sources/ext/cookie.js","../sources/ext/restricted_extensions/daytimeline.js","../sources/ext/restricted_extensions/drag_between.js","../sources/ext/editors.js","../sources/ext/expand.js","../sources/ext/export_api/index.js","../sources/ext/restricted_extensions/grid_view.js","../sources/ext/html_templates.js","../sources/ext/key_nav.js","../sources/ext/keyboard_navigation/common/keyboard_shortcuts.js","../sources/ext/keyboard_navigation/common/eventhandler.js","../sources/ext/keyboard_navigation/common/trap_modal_focus.js","../sources/ext/keyboard_navigation/marker.js","../sources/ext/keyboard_navigation/elements/scheduler_node.js","../sources/ext/keyboard_navigation/elements/nav_node.js","../sources/ext/keyboard_navigation/elements/header_cell.js","../sources/ext/keyboard_navigation/elements/event.js","../sources/ext/keyboard_navigation/elements/time_slot.js","../sources/ext/keyboard_navigation/elements/minical_button.js","../sources/ext/keyboard_navigation/elements/minical_cell.js","../sources/ext/keyboard_navigation/elements/data_area.js","../sources/ext/keyboard_navigation/core.js","../sources/ext/keyboard_navigation/minical_handlers.js","../sources/ext/layer.js","../sources/ext/limit.js","../sources/ext/map_view.js","../sources/ext/minical.js","../sources/ext/monthheight.js","../sources/ext/restricted_extensions/multisection.js","../sources/ext/multiselect.js","../sources/ext/multisource.js","../sources/ext/mvc.js","../sources/ext/outerdrag.js","../sources/ext/pdf.js","../sources/ext/quick_info.js","../sources/ext/readonly.js","../sources/ext/recurring.js","../sources/ext/serialize.js","../sources/ext/restricted_extensions/timeline.js","../sources/ext/tooltip/index.ts","../sources/ext/restricted_extensions/treetimeline.js","../sources/ext/restricted_extensions/units.js","../sources/ext/url.js","../sources/ext/restricted_extensions/week_agenda.js","../sources/ext/wp.js","../sources/ext/year_view.js","../sources/dhtmlxscheduler.gpl.js","../sources/scheduler_factory.js"],"sourcesContent":["\r\n/* eslint-disable no-restricted-globals */\r\nvar globalScope;\r\nif(typeof window !== \"undefined\"){\r\n\tglobalScope = window;\r\n}else{\r\n\tglobalScope = global;\r\n}\r\n/* eslint-enable no-restricted-globals */\r\n\r\nexport default globalScope;","export default function extend(scheduler) {\r\n\r\nfunction div(className){\r\n\tvar element = document.createElement(\"div\");\r\n\tvar classes = (className || \"\").split(\" \");\r\n\tclasses.forEach(function(cssClass){\r\n\t\telement.classList.add(cssClass);\r\n\t});\r\n\treturn element;\r\n}\r\nvar itemTypes = {\r\n\trows_container: function(){\r\n\t\treturn div(\"dhx_cal_navbar_rows_container\");\r\n\t},\r\n\trow: function(){\r\n\t\treturn div(\"dhx_cal_navbar_row\");\r\n\t},\r\n\tview: function (config) {\r\n\t\tvar element = div(\"dhx_cal_tab\");\r\n\t\telement.setAttribute(\"name\", config.view + \"_tab\");\r\n\t\telement.setAttribute(\"data-tab\", config.view);\r\n\t\t// element.setAttribute(\"data-viewname\", config.view); // FIXME: need to remove? not used anywhere\r\n\t\tif(scheduler.config.fix_tab_position){\r\n\t\t\tif(config.$firstTab) {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_first\");\r\n\t\t\t}else if(config.$lastTab) {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_last\");\r\n\t\t\t} else if(config.view !== \"week\") {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_standalone\");\r\n\t\t\t}\r\n\r\n\t\t\tif(config.$segmentedTab) {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn element;\r\n\t},\r\n\tdate: function () {\r\n\t\treturn div(\"dhx_cal_date\");\r\n\t},\r\n\tbutton: function (config) {\r\n\t\treturn div(\"dhx_cal_nav_button dhx_cal_nav_button_custom dhx_cal_tab\");\r\n\t},\r\n\tbuiltInButton: function (config){\r\n\t\treturn div(\"dhx_cal_\" + config.view + \"_button dhx_cal_nav_button\");\r\n\t},\r\n\tspacer: function () {\r\n\t\treturn div(\"dhx_cal_line_spacer\");\r\n\t},\r\n\tminicalendarButton: function(config){\r\n\t\tvar minicalendarDiv = div('dhx_minical_icon');\r\n\t\tif(!config.click && !minicalendarDiv.$_eventAttached){\r\n\t\t\t\r\n\t\t\tscheduler.event(minicalendarDiv, \"click\", function () {\r\n\t\t\t\tif (scheduler.isCalendarVisible()) {\r\n\t\t\t\t\tscheduler.destroyCalendar();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tscheduler.renderCalendar({\r\n\t\t\t\t\t\tposition: this,\r\n\t\t\t\t\t\tdate: scheduler.getState().date,\r\n\t\t\t\t\t\tnavigation: true,\r\n\t\t\t\t\t\thandler: function (date, calendar) {\r\n\t\t\t\t\t\t\tscheduler.setCurrentView(date);\r\n\t\t\t\t\t\t\tscheduler.destroyCalendar();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn minicalendarDiv;\r\n\t},\r\n\thtml_element: function (config) {\r\n\t\treturn div(\"dhx_cal_nav_content\");\r\n\t}\r\n};\r\n\r\nfunction findRenderer(config) {\r\n\tvar renderer;\r\n\tif (config.view) {\r\n\t\tswitch (config.view){\r\n\t\t\tcase \"today\":\r\n\t\t\tcase \"next\":\r\n\t\t\tcase \"prev\":\r\n\t\t\t\trenderer = itemTypes.builtInButton;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"date\":\r\n\t\t\t\trenderer = itemTypes.date;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"spacer\":\r\n\t\t\t\trenderer = itemTypes.spacer;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"button\":\r\n\t\t\t\trenderer = itemTypes.button;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"minicalendar\":\r\n\t\t\t\trenderer = itemTypes.minicalendarButton;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\trenderer = itemTypes.view;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t} else if(config.rows) {\r\n\t\trenderer = itemTypes.rows_container;\r\n\t} else if(config.cols) {\r\n\t\trenderer = itemTypes.row;\r\n\t}\r\n\treturn renderer;\r\n}\r\n\r\nfunction renderElement(config){\r\n\tvar renderer = findRenderer(config);\r\n\tif(!renderer){\r\n\t\treturn;\r\n\t}\r\n\tvar element = renderer(config);\r\n\tif(config.css){\r\n\t\telement.classList.add(config.css);\r\n\t}\r\n\tif(config.width){\r\n\t\tvar value = config.width;\r\n\t\tif(value === value * 1){\r\n\t\t\tvalue += \"px\";\r\n\t\t}\r\n\t\telement.style.width = value;\r\n\t}\r\n\tif(config.height){\r\n\t\tvar value = config.height;\r\n\t\tif(value === value * 1){\r\n\t\t\tvalue += \"px\";\r\n\t\t}\r\n\t\telement.style.height = value;\r\n\t}\r\n\tif (config.click) {\r\n\t\tscheduler.event(element, \"click\", config.click);\r\n\t}\r\n\tif (config.html) {\r\n\t\telement.innerHTML = config.html;\r\n\t}\r\n\r\n\tif (config.align) {\r\n\t\tvar value = \"\";\r\n\t\tif (config.align == \"right\") {\r\n\t\t\tvalue = \"flex-end\";\r\n\t\t} else if(config.align == \"left\") {\r\n\t\t\tvalue = \"flex-start\";\r\n\t\t}\r\n\t\telement.style.justifyContent = value;\r\n\t}\r\n\treturn element;\r\n}\r\n\r\nfunction prepareConfig(config) {\r\n\tif (typeof config === \"string\") {\r\n\t\tconfig = {\r\n\t\t\tview: config\r\n\t\t};\r\n\t}\r\n\tif (!config.view && !config.rows && !config.cols) {\r\n\t\tconfig.view = \"button\";\r\n\t}\r\n\treturn config;\r\n}\r\n\r\nfunction renderLayout(config) {\r\n\tvar fragment = document.createDocumentFragment();\r\n\tvar items;\r\n\tif(Array.isArray(config)){\r\n\t\titems = config;\r\n\t}else{\r\n\t\titems = [config];\r\n\t}\r\n\r\n\tfor (var i = 0; i < items.length; i++) {\r\n\t\tvar view = prepareConfig(items[i]);\r\n\r\n\t\tif(view.view === \"day\" && items[i + 1]){\r\n\t\t\tvar next = prepareConfig(items[i + 1]);\r\n\t\t\tif(next.view === \"week\" || next.view === \"month\"){\r\n\t\t\t\tview.$firstTab = true;\r\n\t\t\t\tview.$segmentedTab = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(view.view === \"week\" && items[i - 1]){\r\n\t\t\tvar next = prepareConfig(items[i + 1]);\r\n\t\t\tif(next.view === \"week\" || next.view === \"month\"){\r\n\t\t\t\tview.$segmentedTab = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(view.view === \"month\" && items[i - 1]){\r\n\t\t\tvar next = prepareConfig(items[i - 1]);\r\n\t\t\tif(next.view === \"week\" || next.view === \"day\"){\r\n\t\t\t\tview.$lastTab = true;\r\n\t\t\t\tview.$segmentedTab = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar element = renderElement(view);\r\n\r\n\t\tfragment.appendChild(element);\r\n\t\tif(view.cols || view.rows){\r\n\t\t\telement.appendChild(renderLayout(view.cols || view.rows));\r\n\t\t}\r\n\t}\r\n\treturn fragment;\r\n}\r\n\r\nscheduler._init_nav_bar = function (items) {\r\n\tvar navBar = this.$container.querySelector(\".dhx_cal_navline\");\r\n\tif (!navBar){\r\n\t\tnavBar = document.createElement(\"div\");\r\n\t\tnavBar.className = \"dhx_cal_navline dhx_cal_navline_flex\";\r\n\t\tscheduler._update_nav_bar(items, navBar);\r\n\t\treturn navBar;\r\n\t}\r\n\treturn navBar;\r\n};\r\n\r\nvar previousNavbar = null;\r\nvar previousHeight = null;\r\nscheduler._update_nav_bar = function (config, container) {\r\n\r\n\tif(!config){\r\n\t\treturn;\r\n\t}\r\n\tvar heightChanged = false;\r\n\tvar configChanged = false;\r\n\r\n\tvar newHeight = config.height || scheduler.xy.nav_height;\r\n\r\n\tif(previousHeight === null ||\r\n\t\t\t(previousHeight !== newHeight)){\r\n\t\theightChanged = true;\r\n\t}\r\n\tif(!previousNavbar || JSON.stringify(config) !== previousNavbar){\r\n\t\tconfigChanged = true;\r\n\t}\r\n\r\n\tif(heightChanged){\r\n\t\tscheduler.xy.nav_height = newHeight;\r\n\t}\r\n\tif(configChanged){\r\n\t\tcontainer.innerHTML = \"\";\r\n\t\tcontainer.appendChild(renderLayout(config));\r\n\t}\r\n\r\n\tif(heightChanged || configChanged){\r\n\t\tscheduler.unset_actions();\r\n\t\tscheduler._els = [];\r\n\t\tscheduler.get_elements();\r\n\t\tscheduler.set_actions();\r\n\t}\r\n\r\n\tif(newHeight === 0){\r\n\t\tcontainer.style.display = \"none\";\r\n\t}else{\r\n\t\tcontainer.style.display = \"\";\r\n\t}\r\n\r\n\tpreviousHeight = newHeight;\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\tfunction isAttachedNode(container){\r\n\t\tvar root = document.body;\r\n\t\r\n\t\twhile(container && container != root){\r\n\t\t\tcontainer = container.parentNode;\r\n\t\t}\r\n\t\r\n\t\treturn !!(root == container);\r\n\t}\r\n\t\r\n\tfunction getWindowSize(window){\r\n\t\treturn {\r\n\t\t\tw : window.innerWidth || document.documentElement.clientWidth,\r\n\t\t\th : window.innerHeight || document.documentElement.clientHeight\r\n\t\t};\r\n\t}\r\n\tfunction equals(a,b){\r\n\t\treturn a.w == b.w && a.h == b.h;\r\n\t}\r\n\t\r\n\tfunction listenWindowResize(scheduler, window){\r\n\t\tvar oldSize = getWindowSize(window);\r\n\t\tvar resizeDelay;\r\n\t\tscheduler.event(window, \"resize\", function(){\r\n\t\t\tclearTimeout(resizeDelay);\r\n\t\t\tresizeDelay = setTimeout(function(){\r\n\r\n\t\t\t\tif (!isAttachedNode(scheduler.$container) || scheduler.$destroyed){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tvar newSize = getWindowSize(window);\r\n\t\t\t\t// element may be resized by container-autoresize exteinsion\r\n\t\t\t\t// check if the size is actually changed in order to not to get endless loop\r\n\t\t\t\tif (!equals(oldSize, newSize)) {\r\n\t\t\t\t\toldSize = newSize;\r\n\t\t\t\t\ttriggerSchedulerResize(scheduler);\r\n\t\t\t\t}\r\n\t\t\t}, 150);\r\n\t\t});\r\n\t}\r\n\t\r\n\tfunction triggerSchedulerResize(scheduler){\r\n\t\tif(scheduler.$destroyed || !scheduler.$root || !isAttachedNode(scheduler.$root)){\r\n\t\t\treturn;\t\r\n\t\t}\r\n\t\tif (scheduler.callEvent(\"onSchedulerResize\", [])) {\r\n\t\t\tscheduler.updateView();\r\n\t\t\tscheduler.callEvent(\"onAfterSchedulerResize\", []);\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction watchNodeResize(scheduler){\r\n\t\tvar previousHeight = scheduler.$root.offsetHeight;\r\n\t\tvar previousWidth = scheduler.$root.offsetWidth;\r\n\t\t\r\n\t\tfunction lowlevelResizeWatcher(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(scheduler.$root){\r\n\t\t\t\tif (scheduler.$root.offsetHeight != previousHeight ||\r\n\t\t\t\t\tscheduler.$root.offsetWidth != previousWidth){\r\n\t\t\t\t\ttriggerSchedulerResize(scheduler);\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\tpreviousHeight = scheduler.$root.offsetHeight;\r\n\t\t\t\tpreviousWidth = scheduler.$root.offsetWidth;\r\n\t\t\t}\r\n\t\r\n\t\t\tsetTimeout(lowlevelResizeWatcher, 200);\r\n\t\t}\r\n\t\t\r\n\t\tlowlevelResizeWatcher();\r\n\t}\r\n\t\r\n\tfunction addResizeListener(scheduler){\r\n\t\tvar root = scheduler.$container;\r\n\t\tvar containerStyles = window.getComputedStyle(root);\r\n\t\tif(containerStyles.getPropertyValue(\"position\") == \"static\"){\r\n\t\t\troot.style.position = \"relative\";\r\n\t\t}\r\n\t\r\n\t\tvar resizeWatcher = document.createElement('iframe');\r\n\t\tresizeWatcher.className = \"scheduler_container_resize_watcher\";\r\n\t\tresizeWatcher.tabIndex = -1;\r\n\t\tif(scheduler.config.wai_aria_attributes){\r\n\t\t\tresizeWatcher.setAttribute(\"role\", \"none\");\r\n\t\t\tresizeWatcher.setAttribute(\"aria-hidden\", true);\r\n\t\t}\r\n\t\r\n\t\t// in some environments (namely, in SalesForce) iframe.contentWindow is not available\r\n\t\tvar salesforce_environment = !!window[\"Sfdc\"] || !!window[\"$A\"] || window[\"Aura\"];\r\n\t\tif(salesforce_environment){\r\n\t\t\twatchNodeResize(scheduler);\r\n\t\t} else {\r\n\t\t\troot.appendChild(resizeWatcher);\r\n\t\t\tif (resizeWatcher.contentWindow) {\r\n\t\t\t\tlistenWindowResize(scheduler, resizeWatcher.contentWindow);\r\n\t\t\t} else {\r\n\t\t\t\t// if so - ditch the iframe and fallback to listening the main window resize\r\n\t\t\t\troot.removeChild(resizeWatcher);\r\n\t\t\t\tlistenWindowResize(scheduler, window);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\taddResizeListener(scheduler);\r\n\r\n}","class EventHost {\r\n\tconstructor(){\r\n\t\tthis._silent_mode = false;\r\n\t\tthis.listeners = {};\r\n\t}\r\n\t_silentStart(){\r\n\t\tthis._silent_mode = true;\r\n\t}\r\n\t_silentEnd() {\r\n\t\tthis._silent_mode = false;\r\n\t}\r\n}\r\n\r\nconst createEventStorage = function(obj) {\r\n\tlet handlers = {};\r\n\tlet index = 0;\r\n\tconst eventStorage = function(){\r\n\t\tlet combinedResult = true;\r\n\t\tfor(const i in handlers){\r\n\t\t\tconst handlerResult = handlers[i].apply(obj, arguments);\r\n\t\t\tcombinedResult=combinedResult && handlerResult;\r\n\t\t}\r\n\t\treturn combinedResult;\r\n\t};\r\n\teventStorage.addEvent=function(handler, settings){\r\n\t\tif (typeof (handler) == \"function\"){\r\n\t\t\tlet handlerId;\r\n\t\t\tif(settings && settings.id){\r\n\t\t\t\thandlerId = settings.id;\r\n\t\t\t}else{\r\n\t\t\t\thandlerId = index;\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\r\n\t\t\tif(settings && settings.once){\r\n\t\t\t\tconst originalHandler = handler;\r\n\t\t\t\thandler = function(){\r\n\t\t\t\t\toriginalHandler();\r\n\t\t\t\t\teventStorage.removeEvent(handlerId);\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\thandlers[handlerId] = handler;\r\n\t\t\treturn handlerId;\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\teventStorage.removeEvent=function(id){\r\n\t\tdelete handlers[id];\r\n\t};\r\n\r\n\teventStorage.clear = function(){\r\n\t\thandlers = {};\r\n\t};\r\n\r\n\treturn eventStorage;\r\n};\r\n\r\nfunction makeEventable(obj){\r\n\r\n\tconst eventHost = new EventHost();\r\n\tobj.attachEvent=function(eventName, handler, settings){\r\n\t\teventName = 'ev_'+eventName.toLowerCase();\r\n\t\tif (!eventHost.listeners[eventName]){\r\n\t\t\teventHost.listeners[eventName] = createEventStorage(this);\r\n\t\t}\r\n\r\n\t\tif(settings && settings.thisObject){\r\n\t\t\thandler = handler.bind(settings.thisObject);\r\n\t\t}\r\n\r\n\t\tconst innerId = eventHost.listeners[eventName].addEvent(handler, settings);\r\n\r\n\t\tlet handlerId = (eventName+':'+innerId); //return ID (ev_eventname:1)\r\n\t\tif(settings && settings.id){\r\n\t\t\thandlerId = settings.id;\r\n\t\t}\r\n\t\treturn handlerId;\r\n\t};\r\n\r\n\tobj.attachAll = function(callback){\r\n\t\tthis.attachEvent('listen_all', callback);\r\n\t};\r\n\r\n\tobj.callEvent=function(name, eventArguments){\r\n\t\tif (eventHost._silent_mode) return true;\r\n\r\n\t\tconst handlerName = 'ev_'+name.toLowerCase();\r\n\r\n\t\tconst listeners = eventHost.listeners;\r\n\t\tif (listeners['ev_listen_all']){\r\n\t\t\tlisteners['ev_listen_all'].apply(this, [name].concat(eventArguments));\r\n\t\t}\r\n\r\n\t\tif (listeners[handlerName])\r\n\t\t\treturn listeners[handlerName].apply(this, eventArguments);\r\n\t\treturn true;\r\n\t};\r\n\r\n\tobj.checkEvent=function(name){\r\n\t\tconst listeners = eventHost.listeners;\r\n\t\treturn (!!listeners['ev_'+name.toLowerCase()]);\r\n\t};\r\n\r\n\tobj.detachEvent=function(id){\r\n\t\tif (id){\r\n\t\t\tlet listeners = eventHost.listeners;\r\n\t\t\tfor(const i in listeners){\r\n\t\t\t\tlisteners[i].removeEvent(id); //remove event\r\n\t\t\t}\r\n\r\n\t\t\tconst list = id.split(':');//get EventName and ID\r\n\t\t\tlisteners = eventHost.listeners;\r\n\t\t\tif(list.length === 2){\r\n\t\t\t\tconst eventName = list[0];\r\n\t\t\t\tconst eventId = list[1];\r\n\t\t\t\tif(listeners[eventName]){\r\n\t\t\t\t\tlisteners[eventName].removeEvent(eventId); //remove event\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\tobj.detachAllEvents = function(){\r\n\t\tfor (const name in eventHost.listeners) {\r\n\t\t\teventHost.listeners[name].clear();\r\n\t\t}\r\n\t};\r\n\r\n}\r\n\r\nexport default makeEventable;","export default {\r\n\tevent: function (el, event, handler){\r\n\t\tif (el.addEventListener)\r\n\t\t\tel.addEventListener(event, handler, false);\r\n\t\r\n\t\telse if (el.attachEvent)\r\n\t\t\tel.attachEvent(\"on\"+event, handler);\r\n\t},\r\n\teventRemove: function (el, event, handler){\r\n\t\tif (el.removeEventListener)\r\n\t\t\tel.removeEventListener(event, handler, false);\r\n\t\r\n\t\telse if (el.detachEvent)\r\n\t\t\tel.detachEvent(\"on\"+event, handler);\r\n\t}\r\n};","import createEventScope from './utils/scoped_event';\r\n\r\nexport default function extend(scheduler) {\r\n\r\n\r\nvar domEvents = createEventScope();\r\n\r\nscheduler.event = domEvents.attach;\r\nscheduler.eventRemove = domEvents.detach;\r\nscheduler._eventRemoveAll = domEvents.detachAll;\r\nscheduler._createDomEventScope = domEvents.extend;\r\n\r\n\r\nscheduler._trim = function(str){\r\n\tvar func = String.prototype.trim || function(){ return this.replace(/^\\s+|\\s+$/g, \"\"); };\r\n\treturn func.apply(str);\r\n};\r\n\r\nscheduler._isDate = function(obj){\r\n\tif (obj && typeof obj == \"object\") {\r\n\t\treturn !!(obj.getFullYear && obj.getMonth && obj.getDate);\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n};\r\n\r\nscheduler._isObject = function(obj){\r\n\treturn (obj && typeof obj == \"object\");\r\n};\r\n\r\n}","import defaultDomEvents from './event';\r\n\r\nexport default function(){\r\n\r\n\tvar domEvents = function (addEvent, removeEvent) {\r\n\t\taddEvent = addEvent || defaultDomEvents.event;\r\n\t\tremoveEvent = removeEvent || defaultDomEvents.eventRemove;\r\n\t\tvar handlers = [];\r\n\t\tvar eventScope = {\r\n\t\t\tattach: function(el, event, callback, capture){\r\n\t\t\t\thandlers.push({element: el, event:event, callback: callback, capture: capture});\r\n\t\t\t\taddEvent(el, event, callback, capture);\r\n\t\t\t},\r\n\t\t\tdetach: function(el, event, callback, capture){\r\n\t\t\t\tremoveEvent(el, event, callback, capture);\r\n\t\t\t\tfor(var i = 0; i < handlers.length; i++){\r\n\t\t\t\t\tvar handler = handlers[i];\r\n\t\t\t\t\tif (handler.element === el && handler.event === event && handler.callback === callback && handler.capture === capture) {\r\n\t\t\t\t\t\thandlers.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tdetachAll: function () {\r\n\t\t\t\tvar staticArray = handlers.slice();\r\n\t\t\t\t// original handlers array can be spliced on every iteration\r\n\t\t\t\tfor (var i = 0; i < staticArray.length; i++){\r\n\t\t\t\t\tvar handler = staticArray[i];\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, handler.capture);\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, undefined);\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, false);\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, true);\r\n\t\t\t\t}\r\n\t\t\t\thandlers.splice(0, handlers.length);\r\n\t\t\t},\r\n\t\t\textend: function(){\r\n\t\t\t\treturn domEvents(this.event, this.eventRemove);\r\n\t\t\t}\r\n\t\t};\r\n\t\treturn eventScope;\r\n\t};\r\n\t\r\n\treturn domEvents();\r\n}","var uidSeed = Date.now();\r\nfunction uid () {\r\n\treturn uidSeed++;\r\n}\r\n\r\n// iframe-safe array type check instead of using instanceof\r\nfunction isArray(obj){\r\n\tif(Array.isArray){\r\n\t\treturn Array.isArray(obj);\r\n\t}else{\r\n\t\t// close enough\r\n\t\treturn (obj && obj.length !== undefined && obj.pop && obj.push);\r\n\t}\r\n}\r\n\r\n// non-primitive string object, e.g. new String(\"abc\")\r\nfunction isStringObject(obj){\r\n\treturn obj && typeof obj === \"object\" && \r\n\t\tFunction.prototype.toString.call(obj.constructor) === \"function String() { [native code] }\";\r\n}\r\n\r\n// non-primitive number object, e.g. new Number(5)\r\nfunction isNumberObject(obj){\r\n\treturn obj && typeof obj === \"object\" && \r\n\t\tFunction.prototype.toString.call(obj.constructor) === \"function Number() { [native code] }\";\r\n}\r\n\r\n// non-primitive number object, e.g. new Boolean(true)\r\nfunction isBooleanObject(obj){\r\n\treturn obj && typeof obj === \"object\" &&\r\n\t\tFunction.prototype.toString.call(obj.constructor) === \"function Boolean() { [native code] }\";\r\n}\r\n\r\nfunction isDate(obj) {\r\n\tif (obj && typeof obj === \"object\") {\r\n\t\treturn !!(obj.getFullYear && obj.getMonth && obj.getDate);\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n}\r\n\r\nfunction defined(obj) {\r\n\treturn typeof(obj) != \"undefined\";\r\n}\r\n\r\nfunction delay (callback, timeout){\r\n\tvar timer;\r\n\r\n\tvar result = function() {\r\n\t\tresult.$cancelTimeout();\r\n\t\tresult.$pending = true;\r\n\t\tvar args = Array.prototype.slice.call(arguments);\r\n\t\ttimer = setTimeout(function(){\r\n\t\t\tcallback.apply(this, args);\r\n\t\t\tresult.$pending = false;\r\n\t\t}, timeout);\r\n\t};\r\n\r\n\tresult.$pending = false;\r\n\tresult.$cancelTimeout = function(){\r\n\t\tclearTimeout(timer);\r\n\t\tresult.$pending = false;\r\n\t};\r\n\tresult.$execute = function(){\r\n\t\tvar args = Array.prototype.slice.call(arguments);\r\n\t\tcallback.apply(this, args);\r\n\t\tresult.$cancelTimeout();\r\n\t};\r\n\r\n\treturn result;\r\n}\r\n\r\nexport default {\r\n\tuid: uid,\r\n\tmixin: function mixin (target, source, force){\r\n\t\tfor (var f in source)\r\n\t\t\tif (((target[f] === undefined) || force)) target[f]=source[f];\r\n\t\treturn target;\r\n\t},\r\n\tcopy: function copy(object) {\r\n\t\tvar i, result; // iterator, types array, result\r\n\t\r\n\t\tif (object && typeof object == \"object\") {\r\n\t\r\n\t\t\tswitch (true){\r\n\t\t\t\tcase (isDate(object)):\r\n\t\t\t\t\tresult = new Date(object);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isArray(object)):\r\n\t\t\t\t\tresult = new Array(object.length);\r\n\t\t\t\t\tfor(i = 0; i < object.length; i++){\r\n\t\t\t\t\t\tresult[i] = copy(object[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isStringObject(object)):\r\n\t\t\t\t\tresult = new String(object);// jshint ignore:line\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isNumberObject(object)):\r\n\t\t\t\t\tresult = new Number(object);// jshint ignore:line\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isBooleanObject(object)):\r\n\t\t\t\t\tresult = new Boolean(object);// jshint ignore:line\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tresult = {};\r\n\t\t\t\t\tfor (i in object) {\r\n\t\t\t\t\t\tconst varType = typeof object[i];\r\n\r\n\t\t\t\t\t\tif (varType === \"string\" || varType === \"number\" || varType === \"boolean\" ) {\r\n\t\t\t\t\t\t\tresult[i] = object[i];\r\n\t\t\t\t\t\t} else if(isDate(object[i])){\r\n\t\t\t\t\t\t\tresult[i] = new Date(object[i]);\r\n\t\t\t\t\t\t}else if (Object.prototype.hasOwnProperty.apply(object, [i]))\r\n\t\t\t\t\t\t\tresult[i] = copy(object[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result || object;\r\n\t},\r\n\tdefined,\r\n\tisDate,\r\n\tdelay\r\n};\r\n","//returns position of html element on the page\r\nfunction elementPosition(elem) {\r\n\tvar top=0, left=0, right=0, bottom=0;\r\n\tif (elem.getBoundingClientRect) { //HTML5 method\r\n\t\tvar box = elem.getBoundingClientRect();\r\n\t\tvar body = document.body;\r\n\t\tvar docElem = (document.documentElement ||\r\n\t\t\tdocument.body.parentNode ||\r\n\t\t\tdocument.body);\r\n\r\n\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\r\n\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\r\n\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\r\n\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\r\n\t\ttop = box.top + scrollTop - clientTop;\r\n\t\tleft = box.left + scrollLeft - clientLeft;\r\n\r\n\t\tright = document.body.offsetWidth - box.right;\r\n\t\tbottom = document.body.offsetHeight - box.bottom;\r\n\t} else { //fallback to naive approach\r\n\t\twhile(elem) {\r\n\t\t\ttop = top + parseInt(elem.offsetTop,10);\r\n\t\t\tleft = left + parseInt(elem.offsetLeft,10);\r\n\t\t\telem = elem.offsetParent;\r\n\t\t}\r\n\r\n\t\tright = document.body.offsetWidth - elem.offsetWidth - left;\r\n\t\tbottom = document.body.offsetHeight - elem.offsetHeight - top;\r\n\t}\r\n\treturn { y: Math.round(top), x: Math.round(left), width:elem.offsetWidth, height:elem.offsetHeight, right: Math.round(right), bottom: Math.round(bottom) };\r\n}\r\n\r\n/*\r\nevent position relatively to DOM element\r\n */\r\nfunction getRelativeEventPosition(ev, node){\r\n\tvar d = document.documentElement;\r\n\tvar box = elementPosition(node);\r\n\r\n\treturn {\r\n\t\tx: ev.clientX + d.scrollLeft - d.clientLeft - box.x + node.scrollLeft,\r\n\t\ty: ev.clientY + d.scrollTop - d.clientTop - box.y + node.scrollTop\r\n\t};\r\n}\r\n\r\nfunction getNodePosition(elem) {\r\n\tvar top=0, left=0, right=0, bottom=0;\r\n\tif (elem.getBoundingClientRect) { //HTML5 method\r\n\t\tvar box = elem.getBoundingClientRect();\r\n\t\tvar body = document.body;\r\n\t\tvar docElem = (document.documentElement ||\r\n\t\t\tdocument.body.parentNode ||\r\n\t\t\tdocument.body);\r\n\r\n\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\r\n\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\r\n\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\r\n\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\r\n\t\ttop = box.top + scrollTop - clientTop;\r\n\t\tleft = box.left + scrollLeft - clientLeft;\r\n\r\n\t\tright = document.body.offsetWidth - box.right;\r\n\t\tbottom = document.body.offsetHeight - box.bottom;\r\n\t} else { //fallback to naive approach\r\n\t\twhile(elem) {\r\n\t\t\ttop = top + parseInt(elem.offsetTop,10);\r\n\t\t\tleft = left + parseInt(elem.offsetLeft,10);\r\n\t\t\telem = elem.offsetParent;\r\n\t\t}\r\n\r\n\t\tright = document.body.offsetWidth - elem.offsetWidth - left;\r\n\t\tbottom = document.body.offsetHeight - elem.offsetHeight - top;\r\n\t}\r\n\treturn { y: Math.round(top), x: Math.round(left), width:elem.offsetWidth, height:elem.offsetHeight, right: Math.round(right), bottom: Math.round(bottom) };\r\n}\r\n\r\nfunction getClassName(node){\r\n\tif(!node) return \"\";\r\n\r\n\tvar className = node.className || \"\";\r\n\tif(className.baseVal)//'className' exist but not a string - IE svg element in DOM\r\n\t\tclassName = className.baseVal;\r\n\r\n\tif(!className.indexOf)\r\n\t\tclassName = '';\r\n\r\n\treturn className || \"\";\r\n}\r\n\r\nfunction getTargetNode(e) {\r\n\tvar trg;\r\n\tif (e.tagName)\r\n\t\ttrg = e;\r\n\telse {\r\n\t\te = e || window.event;\r\n\t\ttrg = e.target || e.srcElement;\r\n\t\tif (trg.shadowRoot && e.composedPath) {\r\n\t\t\ttrg = e.composedPath()[0];\r\n\t\t}\r\n\t}\r\n\treturn trg;\r\n}\r\n\r\nfunction locateCss(e, classname, strict){\r\n\tif(strict === undefined)\r\n\t\tstrict = true;\r\n\r\n\tvar trg = e.target || e.srcElement;\r\n\tvar css = '';\r\n\r\n\twhile (trg){\r\n\t\tcss = getClassName(trg);\r\n\r\n\t\tif(css){\r\n\t\t\tvar ind = css.indexOf(classname);\r\n\t\t\tif (ind >= 0){\r\n\t\t\t\tif (!strict)\r\n\t\t\t\t\treturn trg;\r\n\r\n\t\t\t\t//check that we have exact match\r\n\t\t\t\tvar left = (ind === 0) || (!((css.charAt(ind - 1)||\"\").trim()));\r\n\t\t\t\tvar right = ((ind + classname.length >= css.length)) || (!((css.charAt(ind + classname.length)).trim()));\r\n\r\n\t\t\t\tif (left && right)\r\n\t\t\t\t\treturn trg;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\ttrg=trg.parentNode;\r\n\t}\r\n\treturn null;\r\n}\r\n\r\n\r\n// get focusable nodes\r\nfunction isVisible(node){\r\n\tvar display = false,\r\n\t\tvisibility = false;\r\n\tif(window.getComputedStyle){\r\n\t\tvar style = window.getComputedStyle(node, null);\r\n\t\tdisplay = style[\"display\"];\r\n\t\tvisibility = style[\"visibility\"];\r\n\t}else if(node.currentStyle){\r\n\t\tdisplay = node.currentStyle[\"display\"];\r\n\t\tvisibility = node.currentStyle[\"visibility\"];\r\n\t}\r\n\r\n\tvar hiddenSection = false;\r\n\tvar recurringSection = locateCss({target:node}, \"dhx_form_repeat\", false);\r\n\tif(recurringSection){\r\n\t\thiddenSection = !!(recurringSection.style.height == \"0px\");\r\n\t}\r\n\thiddenSection = hiddenSection || !(node.offsetHeight);\r\n\r\n\treturn (display != \"none\" && visibility != \"hidden\" && !hiddenSection);\r\n}\r\n\r\nfunction hasNonNegativeTabIndex(node){\r\n\treturn !isNaN(node.getAttribute(\"tabindex\")) && (node.getAttribute(\"tabindex\")*1 >= 0);\r\n}\r\n\r\nfunction hasHref(node){\r\n\tvar canHaveHref = {\"a\": true, \"area\": true};\r\n\tif(canHaveHref[node.nodeName.loLowerCase()]){\r\n\t\treturn !!node.getAttribute(\"href\");\r\n\t}\r\n\treturn true;\r\n}\r\n\r\nfunction isEnabled(node){\r\n\tvar canDisable = {\"input\":true, \"select\":true, \"textarea\":true, \"button\":true, \"object\":true};\r\n\tif(canDisable[node.nodeName.toLowerCase()]){\r\n\t\treturn !node.hasAttribute(\"disabled\");\r\n\t}\r\n\r\n\treturn true;\r\n}\r\n\r\n\r\nfunction getFocusableNodes(root){\r\n\tvar nodes = root.querySelectorAll([\r\n\t\t\"a[href]\",\r\n\t\t\"area[href]\",\r\n\t\t\"input\",\r\n\t\t\"select\",\r\n\t\t\"textarea\",\r\n\t\t\"button\",\r\n\t\t\"iframe\",\r\n\t\t\"object\",\r\n\t\t\"embed\",\r\n\t\t\"[tabindex]\",\r\n\t\t\"[contenteditable]\"\r\n\t].join(\", \"));\r\n\r\n\tvar nodesArray = Array.prototype.slice.call(nodes, 0);\r\n\t\r\n\tfor(var i = 0; i < nodesArray.length; i++){\r\n\t\tnodesArray[i].$position = i;\r\n\t\t// we remember original nodes order, \r\n\t\t// so when we sort them by tabindex we ensure order of nodes with same tabindex is preserved, \r\n\t\t// since some browsers do unstable sort\r\n\t}\r\n\t\r\n\tnodesArray.sort(function(a, b) {\r\n\t\tif(a.tabIndex === 0 && b.tabIndex !== 0){\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\tif(a.tabIndex !== 0 && b.tabIndex === 0){\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\t\r\n\t\tif (a.tabIndex === b.tabIndex){\r\n\t\t\t// ensure we do stable sort\r\n\t\t\treturn a.$position - b.$position;\r\n\t\t}\r\n\t\tif (a.tabIndex < b.tabIndex) {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\treturn 1;\r\n\t});\r\n\t\r\n\tfor(var i = 0; i < nodesArray.length; i++){\r\n\t\tvar node = nodesArray[i];\r\n\t\tvar isValid = (hasNonNegativeTabIndex(node) || isEnabled(node) || hasHref(node)) && isVisible(node);\r\n\t\tif(!isValid){\r\n\t\t\tnodesArray.splice(i, 1);\r\n\t\t\ti--;\r\n\t\t}\r\n\t}\r\n\treturn nodesArray;\r\n}\r\n\r\n\r\nfunction isShadowDomSupported() {\r\n\treturn document.head.createShadowRoot || document.head.attachShadow;\r\n}\r\n\r\n/**\r\n * Returns element that has the browser focus, or null if no element has focus.\r\n * Works with shadow DOM, so it's prefereed to use this function instead of document.activeElement directly.\r\n * @returns HTMLElement\r\n */\r\nfunction getActiveElement(){\r\n\tvar activeElement = document.activeElement;\r\n\tif (activeElement.shadowRoot) {\r\n\t\tactiveElement = activeElement.shadowRoot.activeElement;\r\n\t}\r\n\tif (activeElement === document.body && document.getSelection) {\r\n\t\tactiveElement = document.getSelection().focusNode || document.body;\r\n\t}\r\n\r\n\treturn activeElement;\r\n}\r\n\r\n/**\r\n * Returns document.body or the host node of the ShadowRoot, if the element is attached to ShadowDom\r\n * @param {HTMLElement} element \r\n * @returns HTMLElement\r\n */\r\nfunction getRootNode(element) {\r\n\tif (!element) {\r\n\t\treturn document.body;\r\n\t}\r\n\tif (!isShadowDomSupported()) {\r\n\t\treturn document.body;\r\n\t}\r\n\twhile (element.parentNode && (element = element.parentNode)) {\r\n\t\tif (element instanceof ShadowRoot) {\r\n\t\t\treturn element.host;\r\n\t\t}\r\n\t}\r\n\treturn document.body;\r\n}\r\n\r\nfunction hasShadowParent(element) {\r\n\treturn !!getRootNode(element);\r\n}\r\n\r\nexport default {\r\n\t/**\r\n\t * @desc: Calculate absolute position of html object\r\n\t * @type: private\r\n\t * @param: htmlObject - html object\r\n\t * @topic: 0\r\n\t */\r\n\tgetAbsoluteLeft: function getAbsoluteLeft(htmlObject){\r\n\t\treturn this.getOffset(htmlObject).left;\r\n\t},\r\n\t/**\r\n\t * @desc: Calculate absolute position of html object\r\n\t * @type: private\r\n\t * @param: htmlObject - html object\r\n\t * @topic: 0\r\n\t */\r\n\tgetAbsoluteTop: function getAbsoluteTop(htmlObject){\r\n\t\treturn this.getOffset(htmlObject).top;\r\n\t},\r\n\r\n\tgetOffsetSum: function getOffsetSum(elem) {\r\n\t\tvar top=0, left=0;\r\n\t\twhile(elem) {\r\n\t\t\ttop = top + parseInt(elem.offsetTop);\r\n\t\t\tleft = left + parseInt(elem.offsetLeft);\r\n\t\t\telem = elem.offsetParent;\r\n\t\t}\r\n\t\treturn {top: top, left: left};\r\n\t},\r\n\r\n\tgetOffsetRect: function getOffsetRect(elem) {\r\n\t\tvar box = elem.getBoundingClientRect();\r\n\r\n\t\tvar top = 0,\r\n\t\t\tleft = 0;\r\n\r\n\t\t// https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent#Mobile_Tablet_or_Desktop\r\n\t\tif (!/Mobi/.test(navigator.userAgent)) {\r\n\t\t\tvar body = document.body;\r\n\t\t\tvar docElem = document.documentElement;\r\n\t\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\r\n\t\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\r\n\t\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\r\n\t\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\r\n\r\n\t\t\ttop = box.top + scrollTop - clientTop;\r\n\t\t\tleft = box.left + scrollLeft - clientLeft;\r\n\t\t}else {\r\n\t\t\t// incorrect left coordinate on mobile zoom\r\n\t\t\t// https://bugs.chromium.org/p/chromium/issues/detail?id=489206\r\n\r\n\t\t\tvar dummy = document.createElement(\"div\");\r\n\t\t\tdummy.style.position=\"absolute\";\r\n\t\t\tdummy.style.left=\"0px\";\r\n\t\t\tdummy.style.top=\"0px\";\r\n\t\t\tdummy.style.width=\"1px\";\r\n\t\t\tdummy.style.height = \"1px\";\r\n\r\n\t\t\tdocument.body.appendChild(dummy);\r\n\t\t\tvar dummyBox = dummy.getBoundingClientRect();\r\n\t\t\ttop = box.top - dummyBox.top;\r\n\t\t\tleft = box.left - dummyBox.left;\r\n\r\n\t\t\tdummy.parentNode.removeChild(dummy);\r\n\t\t}\r\n\r\n\t\treturn { top: Math.round(top), left: Math.round(left) };\r\n\t},\r\n\r\n\tgetOffset: function getOffset(elem) {\r\n\t\tif (elem.getBoundingClientRect) {\r\n\t\t\treturn this.getOffsetRect(elem);\r\n\t\t} else {\r\n\t\t\treturn this.getOffsetSum(elem);\r\n\t\t}\r\n\t},\r\n\r\n\tclosest: function(element, selector){\r\n\t\tif(!element || !selector){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn closest(element, selector);\r\n\t},\r\n\tinsertAfter: function(newNode, referenceNode){\r\n\t\tif(referenceNode.nextSibling){\r\n\t\t\treferenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);\r\n\t\t}else{\r\n\t\t\treferenceNode.parentNode.appendChild(newNode);\r\n\t\t}\r\n\t},\r\n\tremove: function(node) {\r\n\t\tif (node && node.parentNode) {\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t}\r\n\t},\r\n\tisChildOf: function(child, parent) {\r\n\t\treturn parent.contains(child);\r\n\t},\r\n\tgetFocusableNodes,\r\n\tgetClassName,\r\n\tlocateCss,\r\n\tgetRootNode,\r\n\thasShadowParent,\r\n\tisShadowDomSupported,\r\n\tgetActiveElement,\r\n\tgetRelativeEventPosition,\r\n\tgetTargetNode,\r\n\tgetNodePosition\r\n};\r\n\r\nvar closest;\r\nif(Element.prototype.closest){\r\n\tclosest = function(element, selector){\r\n\t\treturn element.closest(selector);\r\n\t};\r\n}else{\r\n\tvar matches = Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\r\n\tclosest = function(element, selector) {\r\n\t\tvar el = element;\r\n\t\tdo {\r\n\t\t\tif (matches.call(el, selector)){\r\n\t\t\t\treturn el;\r\n\t\t\t}\r\n\t\t\tel = el.parentElement || el.parentNode;\r\n\t\t} while (el !== null && el.nodeType === 1);\r\n\t\treturn null;\r\n\t};\r\n}\r\n","/* eslint-disable no-restricted-globals */\r\nvar isWindowAwailable = typeof window !== \"undefined\";\r\n\r\n/* eslint-enable no-restricted-globals */\r\n\r\nexport default {\r\n\tisIE: isWindowAwailable && (navigator.userAgent.indexOf(\"MSIE\") >= 0 || navigator.userAgent.indexOf(\"Trident\") >= 0),\r\n\tisIE6: isWindowAwailable && (!XMLHttpRequest && navigator.userAgent.indexOf(\"MSIE\") >= 0),\r\n\tisIE7: isWindowAwailable && (navigator.userAgent.indexOf(\"MSIE 7.0\") >= 0 && navigator.userAgent.indexOf(\"Trident\") < 0),\r\n\tisIE8: isWindowAwailable && (navigator.userAgent.indexOf(\"MSIE 8.0\") >= 0 && navigator.userAgent.indexOf(\"Trident\") >= 0),\r\n\tisOpera: isWindowAwailable && (navigator.userAgent.indexOf(\"Opera\") >= 0),\r\n\tisChrome: isWindowAwailable && (navigator.userAgent.indexOf(\"Chrome\") >= 0),\r\n\tisKHTML: isWindowAwailable && (navigator.userAgent.indexOf(\"Safari\") >= 0 || navigator.userAgent.indexOf(\"Konqueror\") >= 0),\r\n\tisFF: isWindowAwailable && (navigator.userAgent.indexOf(\"Firefox\") >= 0),\r\n\tisIPad: isWindowAwailable && (navigator.userAgent.search(/iPad/gi) >= 0),\r\n\tisEdge: isWindowAwailable && (navigator.userAgent.indexOf(\"Edge\")!=-1),\r\n\tisNode: (!isWindowAwailable || typeof navigator == \"undefined\")\r\n};","export default function(data) {\r\n\tif (typeof data === \"string\" || typeof data === \"number\") {\r\n\t\treturn data;\r\n\t}\r\n\tvar result = \"\";\r\n\tfor (var key in data) {\r\n\t\tvar serialized = \"\";\r\n\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\tif (typeof data[key] === \"string\") {\r\n\t\t\t\tserialized = encodeURIComponent(data[key]);\r\n\t\t\t} else if (typeof data[key] === \"number\") {\r\n\t\t\t\tserialized = data[key];\r\n\t\t\t} else {\r\n\t\t\t\tserialized = encodeURIComponent(JSON.stringify(data[key]));\r\n\t\t\t}\r\n\t\t\tserialized = key + \"=\" + serialized;\r\n\r\n\t\t\tif (result.length) {\r\n\t\t\t\tserialized = \"&\" + serialized;\r\n\t\t\t}\r\n\t\t\tresult += serialized;\r\n\t\t}\r\n\t}\r\n\treturn result;\r\n}","export default function extend(scheduler) {\r\n\r\nvar generateStringToDate = function (format, utc) {\r\n\tvar splt = \"var temp=date.match(/[a-zA-Z]+|[0-9]+/g);\";\r\n\tvar mask = format.match(/%[a-zA-Z]/g);\r\n\tfor (var i = 0; i < mask.length; i++) {\r\n\t\tswitch (mask[i]) {\r\n\t\t\tcase \"%j\":\r\n\t\t\tcase \"%d\": splt += \"set[2]=temp[\" + i + \"]||1;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%n\":\r\n\t\t\tcase \"%m\": splt += \"set[1]=(temp[\" + i + \"]||1)-1;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%y\": splt += \"set[0]=temp[\" + i + \"]*1+(temp[\" + i + \"]>50?1900:2000);\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%g\":\r\n\t\t\tcase \"%G\":\r\n\t\t\tcase \"%h\":\r\n\t\t\tcase \"%H\":\r\n\t\t\t\tsplt += \"set[3]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%i\":\r\n\t\t\t\tsplt += \"set[4]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%Y\": splt += \"set[0]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%a\":\r\n\t\t\tcase \"%A\": splt += \"set[3]=set[3]%12+((temp[\" + i + \"]||'').toLowerCase()=='am'?0:12);\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%s\": splt += \"set[5]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%M\": splt += \"set[1]=this.locale.date.month_short_hash[temp[\" + i + \"]]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%F\": splt += \"set[1]=this.locale.date.month_full_hash[temp[\" + i + \"]]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\tvar code = \"set[0],set[1],set[2],set[3],set[4],set[5]\";\r\n\tif (utc) code = \" Date.UTC(\" + code + \")\";\r\n\treturn new Function(\"date\", \"var set=[0,0,1,0,0,0]; \" + splt + \" return new Date(\" + code + \");\");\r\n};\r\nvar csp_date_to_str = function (format, utc) {\r\n\treturn function(date) {\r\n\t\treturn format.replace(/%[a-zA-Z]/g, function (a) {\r\n\t\t\tswitch (a) {\r\n\t\t\t\tcase \"%d\": return utc ? scheduler.date.to_fixed(date.getUTCDate()) : scheduler.date.to_fixed(date.getDate());\r\n\t\t\t\tcase \"%m\": return utc ? scheduler.date.to_fixed((date.getUTCMonth() + 1)) : scheduler.date.to_fixed((date.getMonth() + 1));\r\n\t\t\t\tcase \"%j\": return utc ? date.getUTCDate() : date.getDate();\r\n\t\t\t\tcase \"%n\": return utc ? (date.getUTCMonth() + 1) : (date.getMonth() + 1);\r\n\t\t\t\tcase \"%y\": return utc ? scheduler.date.to_fixed(date.getUTCFullYear() % 100) : scheduler.date.to_fixed(date.getFullYear() % 100);\r\n\t\t\t\tcase \"%Y\": return utc ? date.getUTCFullYear() : date.getFullYear();\r\n\t\t\t\tcase \"%D\": return utc ? scheduler.locale.date.day_short[date.getUTCDay()] : scheduler.locale.date.day_short[date.getDay()];\r\n\t\t\t\tcase \"%l\": return utc ? scheduler.locale.date.day_full[date.getUTCDay()] : scheduler.locale.date.day_full[date.getDay()];\r\n\t\t\t\tcase \"%M\": return utc ? scheduler.locale.date.month_short[date.getUTCMonth()] : scheduler.locale.date.month_short[date.getMonth()];\r\n\t\t\t\tcase \"%F\": return utc ? scheduler.locale.date.month_full[date.getUTCMonth()] : scheduler.locale.date.month_full[date.getMonth()];\r\n\t\t\t\tcase \"%h\": return utc ? scheduler.date.to_fixed((date.getUTCHours() + 11) % 12 + 1) : scheduler.date.to_fixed((date.getHours() + 11) % 12 + 1);\r\n\t\t\t\tcase \"%g\": return utc ? ((date.getUTCHours() + 11) % 12 + 1) : ((date.getHours() + 11) % 12 + 1);\r\n\t\t\t\tcase \"%G\": return utc ? date.getUTCHours() : date.getHours();\r\n\t\t\t\tcase \"%H\": return utc ? scheduler.date.to_fixed(date.getUTCHours()) : scheduler.date.to_fixed(date.getHours());\r\n\t\t\t\tcase \"%i\": return utc ? scheduler.date.to_fixed(date.getUTCMinutes()) : scheduler.date.to_fixed(date.getMinutes());\r\n\t\t\t\tcase \"%a\": return utc ? (date.getUTCHours() > 11 ? \"pm\" : \"am\") : (date.getHours() > 11 ? \"pm\" : \"am\");\r\n\t\t\t\tcase \"%A\": return utc ? (date.getUTCHours() > 11 ? \"PM\" : \"AM\") : (date.getHours() > 11 ? \"PM\" : \"AM\");\r\n\t\t\t\tcase \"%s\": return utc ? scheduler.date.to_fixed(date.getUTCSeconds()) : scheduler.date.to_fixed(date.getSeconds());\r\n\t\t\t\tcase \"%W\": return utc ? scheduler.date.to_fixed(scheduler.date.getUTCISOWeek(date)) : scheduler.date.to_fixed(scheduler.date.getISOWeek(date));\r\n\t\t\t\tdefault: return a;\r\n\t\t\t}\r\n\t\t});\r\n\t};\r\n};\r\nvar csp_str_to_date = function (format, utc) {\r\n\treturn function (date){\r\n\t\tvar set = [0, 0, 1, 0, 0, 0];\r\n\t\tvar temp = date.match(/[a-zA-Z]+|[0-9]+/g);\r\n\t\tvar mask = format.match(/%[a-zA-Z]/g);\r\n\r\n\t\tfor (var i = 0; i < mask.length; i++) {\r\n\t\t\tswitch (mask[i]) {\r\n\t\t\t\tcase \"%j\":\r\n\t\t\t\tcase \"%d\":\r\n\t\t\t\t\tset[2] = temp[i] || 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%n\":\r\n\t\t\t\tcase \"%m\":\r\n\t\t\t\t\tset[1] = (temp[i] || 1) - 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%y\":\r\n\t\t\t\t\tset[0] = temp[i] * 1 + (temp[i] > 50 ? 1900 : 2000);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%g\":\r\n\t\t\t\tcase \"%G\":\r\n\t\t\t\tcase \"%h\":\r\n\t\t\t\tcase \"%H\":\r\n\t\t\t\t\tset[3] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%i\":\r\n\t\t\t\t\tset[4] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\tset[0] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%a\":\r\n\t\t\t\tcase \"%A\":\r\n\t\t\t\t\tset[3] = set[3] % 12 + ((temp[i] || '').toLowerCase() == 'am' ? 0 : 12);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%s\":\r\n\t\t\t\t\tset[5] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%M\":\r\n\t\t\t\t\tset[1] = scheduler.locale.date.month_short_hash[temp[i]] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%F\":\r\n\t\t\t\t\tset[1] = scheduler.locale.date.month_full_hash[temp[i]] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (utc) {\r\n\t\t\treturn new Date(Date.UTC(set[0], set[1], set[2], set[3], set[4], set[5]));\r\n\t\t}\r\n\r\n\t\treturn new Date(set[0], set[1], set[2], set[3], set[4], set[5]);\r\n\t};\r\n};\r\n\r\nvar canUseCsp = false;\r\n(function() {\r\n\ttry {\r\n\t\tnew Function(\"canUseCsp = false;\");\r\n\t} catch(e) {\r\n\t\tcanUseCsp = true;\r\n\t}\r\n})();\r\nfunction useCsp() {\r\n\tvar result = false;\r\n\tif (scheduler.config.csp === \"auto\") {\r\n\t\tresult = canUseCsp;\r\n\t} else {\r\n\t\tresult = scheduler.config.csp;\r\n\t}\r\n\treturn result;\r\n}\r\nscheduler.date = {\r\n\tinit:function(){\r\n\t\tvar s = scheduler.locale.date.month_short;\r\n\t\tvar t = scheduler.locale.date.month_short_hash = {};\r\n\t\tfor (var i = 0; i < s.length; i++)\r\n\t\t\tt[s[i]]=i;\r\n\r\n\t\tvar s = scheduler.locale.date.month_full;\r\n\t\tvar t = scheduler.locale.date.month_full_hash = {};\r\n\t\tfor (var i = 0; i < s.length; i++)\r\n\t\t\tt[s[i]]=i;\r\n\t},\r\n\t_bind_host_object : function(method){\r\n\t\tif(method.bind){\r\n\t\t\treturn method.bind(scheduler);\r\n\t\t}else{\r\n\t\t\treturn function(){ return method.apply(scheduler, arguments); };\r\n\t\t}\r\n\t},\r\n\tdate_part:function(date){\r\n\t\tvar old = new Date(date);\r\n\t\tdate.setHours(0);\r\n\t\tdate.setMinutes(0);\r\n\t\tdate.setSeconds(0);\r\n\t\tdate.setMilliseconds(0);\r\n\t\tif (date.getHours() && //shift to yesterday on dst\r\n\t\t\t(date.getDate() < old.getDate() || date.getMonth() < old.getMonth() || date.getFullYear() < old.getFullYear()) )\r\n\t\t\tdate.setTime(date.getTime() + 60 * 60 * 1000 * (24 - date.getHours()));\r\n\t\treturn date;\r\n\t},\r\n\ttime_part:function(date){\r\n\t\treturn (date.valueOf()/1000 - date.getTimezoneOffset()*60)%86400;\r\n\t},\r\n\tweek_start:function(date){\r\n\t\tvar shift=date.getDay();\r\n\t\tif (scheduler.config.start_on_monday){\r\n\t\t\tif (shift===0) shift=6;\r\n\t\t\telse shift--;\r\n\t\t}\r\n\t\treturn this.date_part(this.add(date,-1*shift,\"day\"));\r\n\t},\r\n\tmonth_start:function(date){\r\n\t\tdate.setDate(1);\r\n\t\treturn this.date_part(date);\r\n\t},\r\n\tyear_start:function(date){\r\n\t\tdate.setMonth(0);\r\n\t\treturn this.month_start(date);\r\n\t},\r\n\tday_start:function(date){\r\n\t\treturn this.date_part(date);\r\n\t},\r\n\t_add_days:function(date, inc){\r\n\t\tvar ndate = new Date(date.valueOf());\r\n\r\n\t\tndate.setDate(ndate.getDate() + inc);\r\n\r\n\t\t// Workaround for Safari/iOS timezone bug, ref:OKZ-149693\r\n\t\tif(inc == Math.round(inc) && inc > 0){\r\n\t\t\tvar datesDiff = +ndate - +date,\r\n\t\t\t\trest = datesDiff % (24*60*60*1000);\r\n\t\t\tif(rest && date.getTimezoneOffset() == ndate.getTimezoneOffset()){\r\n\t\t\t\tvar hours = rest / (60* 60 * 1000);\r\n\t\t\t\tndate.setTime(ndate.getTime() + (24 - hours) * 60 * 60 * 1000);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (inc >= 0 && (!date.getHours() && ndate.getHours()) &&//shift to yesterday on dst\r\n\t\t\t(ndate.getDate() < date.getDate() || ndate.getMonth() < date.getMonth() || ndate.getFullYear() < date.getFullYear()) )\r\n\t\t\tndate.setTime(ndate.getTime() + 60 * 60 * 1000 * (24 - ndate.getHours()));\r\n\t\treturn ndate;\r\n\t},\r\n\tadd:function(date,inc,mode){\r\n\t\tvar ndate=new Date(date.valueOf());\r\n\t\tswitch(mode){\r\n\t\t\tcase \"day\":\r\n\t\t\t\tndate = scheduler.date._add_days(ndate, inc);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"week\":\r\n\t\t\t\tndate = scheduler.date._add_days(ndate, inc * 7);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"month\": ndate.setMonth(ndate.getMonth()+inc); break;\r\n\t\t\tcase \"year\": ndate.setYear(ndate.getFullYear()+inc); break;\r\n\t\t\tcase \"hour\":\r\n\t\t\t\t/*\r\n\t\t\t\t setHour(getHour() + inc) and setMinutes gives weird result when is applied on a Daylight Saving time switch\r\n\t\t\t\t setTime seems working as expected\r\n\t\t\t\t*/\r\n\t\t\t\tndate.setTime(ndate.getTime() + inc * 60 * 60 * 1000);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"minute\":\r\n\t\t\t\tndate.setTime(ndate.getTime() + inc * 60 * 1000);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\treturn scheduler.date[\"add_\"+mode](date,inc,mode);\r\n\t\t}\r\n\t\treturn ndate;\r\n\t},\r\n\tto_fixed:function(num){\r\n\t\tif (num<10)\treturn \"0\"+num;\r\n\t\treturn num;\r\n\t},\r\n\tcopy:function(date){\r\n\t\treturn new Date(date.valueOf());\r\n\t},\r\n\tdate_to_str:function(format,utc){\r\n\t\tif (useCsp()) {\r\n\t\t\treturn csp_date_to_str(format,utc);\r\n\t\t}\r\n\r\n\t\tformat=format.replace(/%[a-zA-Z]/g,function(a){\r\n\t\t\tswitch(a){\r\n\t\t\t\tcase \"%d\": return \"\\\"+this.date.to_fixed(date.getDate())+\\\"\";\r\n\t\t\t\tcase \"%m\": return \"\\\"+this.date.to_fixed((date.getMonth()+1))+\\\"\";\r\n\t\t\t\tcase \"%j\": return \"\\\"+date.getDate()+\\\"\";\r\n\t\t\t\tcase \"%n\": return \"\\\"+(date.getMonth()+1)+\\\"\";\r\n\t\t\t\tcase \"%y\": return \"\\\"+this.date.to_fixed(date.getFullYear()%100)+\\\"\";\r\n\t\t\t\tcase \"%Y\": return \"\\\"+date.getFullYear()+\\\"\";\r\n\t\t\t\tcase \"%D\": return \"\\\"+this.locale.date.day_short[date.getDay()]+\\\"\";\r\n\t\t\t\tcase \"%l\": return \"\\\"+this.locale.date.day_full[date.getDay()]+\\\"\";\r\n\t\t\t\tcase \"%M\": return \"\\\"+this.locale.date.month_short[date.getMonth()]+\\\"\";\r\n\t\t\t\tcase \"%F\": return \"\\\"+this.locale.date.month_full[date.getMonth()]+\\\"\";\r\n\t\t\t\tcase \"%h\": return \"\\\"+this.date.to_fixed((date.getHours()+11)%12+1)+\\\"\";\r\n\t\t\t\tcase \"%g\": return \"\\\"+((date.getHours()+11)%12+1)+\\\"\";\r\n\t\t\t\tcase \"%G\": return \"\\\"+date.getHours()+\\\"\";\r\n\t\t\t\tcase \"%H\": return \"\\\"+this.date.to_fixed(date.getHours())+\\\"\";\r\n\t\t\t\tcase \"%i\": return \"\\\"+this.date.to_fixed(date.getMinutes())+\\\"\";\r\n\t\t\t\tcase \"%a\": return \"\\\"+(date.getHours()>11?\\\"pm\\\":\\\"am\\\")+\\\"\";\r\n\t\t\t\tcase \"%A\": return \"\\\"+(date.getHours()>11?\\\"PM\\\":\\\"AM\\\")+\\\"\";\r\n\t\t\t\tcase \"%s\": return \"\\\"+this.date.to_fixed(date.getSeconds())+\\\"\";\r\n\t\t\t\tcase \"%W\": return \"\\\"+this.date.to_fixed(this.date.getISOWeek(date))+\\\"\";\r\n\t\t\t\tdefault: return a;\r\n\t\t\t}\r\n\t\t});\r\n\t\tif (utc) format=format.replace(/date\\.get/g,\"date.getUTC\");\r\n\t\tvar func = new Function(\"date\",\"return \\\"\"+format+\"\\\";\");\r\n\r\n\t\treturn scheduler.date._bind_host_object(func);\r\n\t},\r\n\tstr_to_date:function(format, utc, exactFormat){\r\n\t\tvar stringToDateMethod = useCsp() ? csp_str_to_date : generateStringToDate;\r\n\t\tvar parseExactFormat = stringToDateMethod(format, utc);\r\n\t\t//return scheduler.date._bind_host_object(func);\r\n\t\t// eslint-disable-next-line\r\n\t\tvar yyyyMMddhhIIss = /^[0-9]{4}(\\-|\\/)[0-9]{2}(\\-|\\/)[0-9]{2} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/;\r\n\r\n\t\t// MM/dd/yyyy - default old format for xml-date\r\n\t\t// eslint-disable-next-line\r\n\t\tvar MMddyyyyhhIIss = /^[0-9]{2}\\/[0-9]{2}\\/[0-9]{4} ?(([0-9]{1,2}:[0-9]{2})(:[0-9]{1,2})?)?$/;\r\n\t\t// dd-MM-yyyy - default old format for api-date\r\n\t\t// eslint-disable-next-line\r\n\t\tvar ddMMyyyyhhIIss = /^[0-9]{2}\\-[0-9]{2}\\-[0-9]{4} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/;\r\n\t\t// eslint-disable-next-line\r\n\t\tvar ISO8601 = /^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$/;\r\n\r\n\t\tvar isYMDDate = function (datestr) {\r\n\t\t\treturn yyyyMMddhhIIss.test(String(datestr));\r\n\t\t};\r\n\r\n\t\tvar isMDYDate = function (datestr) {\r\n\t\t\treturn MMddyyyyhhIIss.test(String(datestr));\r\n\t\t};\r\n\t\tvar isDMYDate = function (datestr) {\r\n\t\t\treturn ddMMyyyyhhIIss.test(String(datestr));\r\n\t\t};\r\n\t\tvar isISO8601 = function (datestr) {\r\n\t\t\treturn ISO8601.test(datestr);\r\n\t\t};\r\n\r\n\t\tvar parseYMD = stringToDateMethod(\"%Y-%m-%d %H:%i:%s\", utc);\r\n\t\tvar parseMDY = stringToDateMethod(\"%m/%d/%Y %H:%i:%s\", utc);\r\n\t\tvar parseDMY = stringToDateMethod(\"%d-%m-%Y %H:%i:%s\", utc);\r\n\r\n\t\treturn function (dateString) {\r\n\r\n\t\t\tif (!exactFormat && !scheduler.config.parse_exact_format) {\r\n\t\t\t\tif (dateString && dateString.getISOWeek) {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t} else if (typeof dateString === \"number\") {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t} else if (isYMDDate(dateString)) {\r\n\t\t\t\t\treturn parseYMD(dateString);\r\n\t\t\t\t} else if (isMDYDate(dateString)) {\r\n\t\t\t\t\treturn parseMDY(dateString);\r\n\t\t\t\t} else if (isDMYDate(dateString)) {\r\n\t\t\t\t\treturn parseDMY(dateString);\r\n\t\t\t\t} else if (isISO8601(dateString)) {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn parseExactFormat.call(scheduler, dateString);\r\n\t\t};\r\n\t},\r\n\tgetISOWeek: function(ndate) {\r\n\t\tif(!ndate) return false;\r\n\t\tndate = this.date_part(new Date(ndate));\r\n\t\tvar nday = ndate.getDay();\r\n\t\tif (nday === 0) {\r\n\t\t\tnday = 7;\r\n\t\t}\r\n\t\tvar first_thursday = new Date(ndate.valueOf());\r\n\t\tfirst_thursday.setDate(ndate.getDate() + (4 - nday));\r\n\t\tvar year_number = first_thursday.getFullYear(); // year of the first Thursday\r\n\t\tvar ordinal_date = Math.round( (first_thursday.getTime() - new Date(year_number, 0, 1).getTime()) / 86400000); //ordinal date of the first Thursday - 1 (so not really ordinal date)\r\n\t\tvar week_number = 1 + Math.floor( ordinal_date / 7);\r\n\t\treturn week_number;\r\n\t},\r\n\tgetUTCISOWeek: function(ndate){\r\n\t\treturn this.getISOWeek(this.convert_to_utc(ndate));\r\n\t},\r\n\tconvert_to_utc: function(date) {\r\n\t\treturn new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds());\r\n\t}\r\n};\r\n\r\n}\r\n\r\n","export default function(scheduler){\r\n\treturn (function(){\r\n\t\tvar res = {};\r\n\t\tfor (var a in this._events){\r\n\t\t\tvar ev = this._events[a];\r\n\t\t\tif (ev.id.toString().indexOf(\"#\") == -1){\r\n\t\t\t\tres[ev.id] = ev;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn res;\r\n\t}).bind(scheduler);\r\n}","import xmlLoaded from \"./loaders/xml\";\r\nimport jsonLoader from \"./loaders/json\";\r\nimport iCalLoader from \"./loaders/ical\";\r\nimport createSerializator from \"../core/common/get_serializable_events\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler._loaded = {};\r\nscheduler._load = function(url, from) {\r\n\turl = url || this._load_url;\r\n\r\n\tif(!url){\r\n\t\t//if scheduler.setLoadMode is called before scheduler.init, initial rendering will invoke data loading while url is undefined\r\n\t\treturn;\r\n\t}\r\n\r\n\turl += (url.indexOf(\"?\") == -1 ? \"?\" : \"&\") + \"timeshift=\" + (new Date()).getTimezoneOffset();\r\n\tif (this.config.prevent_cache) url += \"&uid=\" + this.uid();\r\n\tvar to;\r\n\tfrom = from || this._date;\r\n\tfunction ajaxCallback(response) {\r\n\t\tscheduler.on_load(response);\r\n\t\tscheduler.callEvent(\"onLoadEnd\", []);\r\n\t}\r\n\tif (this._load_mode) {\r\n\t\tvar lf = this.templates.load_format;\r\n\r\n\t\tfrom = this.date[this._load_mode + \"_start\"](new Date(from.valueOf()));\r\n\t\twhile (from > this._min_date) from = this.date.add(from, -1, this._load_mode);\r\n\t\tto = from;\r\n\r\n\t\tvar cache_line = true;\r\n\t\twhile (to < this._max_date) {\r\n\t\t\tto = this.date.add(to, 1, this._load_mode);\r\n\t\t\tif (this._loaded[lf(from)] && cache_line)\r\n\t\t\t\tfrom = this.date.add(from, 1, this._load_mode); else cache_line = false;\r\n\t\t}\r\n\r\n\t\tvar temp_to = to;\r\n\t\tdo {\r\n\t\t\tto = temp_to;\r\n\t\t\ttemp_to = this.date.add(to, -1, this._load_mode);\r\n\t\t} while (temp_to > from && this._loaded[lf(temp_to)]);\r\n\r\n\t\tif (to <= from)\r\n\t\t\treturn false; //already loaded\r\n\r\n\t\tscheduler.ajax.get(url + \"&from=\" + lf(from) + \"&to=\" + lf(to), ajaxCallback);\r\n\r\n\t\twhile (from < to) {\r\n\t\t\tthis._loaded[lf(from)] = true;\r\n\t\t\tfrom = this.date.add(from, 1, this._load_mode);\r\n\t\t}\r\n\t} else {\r\n\t\tscheduler.ajax.get(url, ajaxCallback);\r\n\t}\r\n\r\n\t// TODO: remove onXLS\r\n\tthis.callEvent(\"onXLS\", []);\r\n\tthis.callEvent(\"onLoadStart\", []);\r\n\treturn true;\r\n};\r\n\r\nscheduler._parsers = {};\r\n\r\n\r\nxmlLoaded(scheduler);\r\njsonLoader(scheduler);\r\niCalLoader(scheduler);\r\n\r\nscheduler.on_load = function (loader) {\r\n\tthis.callEvent(\"onBeforeParse\", []);\r\n\r\n\tvar evs;\r\n\tvar error = false;\r\n\r\n\tvar foundParser = false;\r\n\tfor(var i in this._parsers){\r\n\t\tvar parser = this._parsers[i];\r\n\t\tif(parser.canParse(loader.xmlDoc.responseText, loader.xmlDoc)){\r\n\t\t\ttry{\r\n\t\t\t\tvar param = loader.xmlDoc.responseText;\r\n\t\t\t\tif(i === \"xml\"){\r\n\t\t\t\t\tparam = loader;\r\n\t\t\t\t}\r\n\t\t\t\tevs = parser.parse(param);\r\n\t\t\t\tif(!evs){\r\n\t\t\t\t\terror = true;\r\n\t\t\t\t}\r\n\t\t\t}catch(e){\r\n\t\t\t\terror = true;\r\n\t\t\t}\r\n\t\t\tfoundParser = true;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tif(!foundParser){\r\n\t\tif(this._process && this[this._process]){\r\n\t\t\ttry{\r\n\t\t\t\tevs = this[this._process].parse(loader.xmlDoc.responseText);\r\n\t\t\t}catch (e){\r\n\t\t\t\terror = true;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\terror = true;\r\n\t\t}\r\n\t}\r\n\r\n\tif(error || (loader.xmlDoc.status && loader.xmlDoc.status >= 400)){\r\n\t\tthis.callEvent(\"onLoadError\", [loader.xmlDoc]);\r\n\t\tevs = [];\r\n\t}\r\n\r\n\tthis._process_loading(evs);\r\n\r\n\t// TODO: remove onXLE\r\n\tthis.callEvent(\"onXLE\", []);\r\n\tthis.callEvent(\"onParse\", []);\r\n};\r\nscheduler._process_loading = function(evs) {\r\n\tthis._loading = true;\r\n\tthis._not_render = true;\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tif (!this.callEvent(\"onEventLoading\", [evs[i]])) continue;\r\n\t\tthis.addEvent(evs[i]);\r\n\t}\r\n\tthis._not_render = false;\r\n\tif (this._render_wait) this.render_view_data();\r\n\r\n\tthis._loading = false;\r\n\tif (this._after_call) this._after_call();\r\n\tthis._after_call = null;\r\n};\r\nscheduler._init_event = function(event) {\r\n\tevent.text = (event.text || event._tagvalue) || \"\";\r\n\tevent.start_date = scheduler._init_date(event.start_date);\r\n\tevent.end_date = scheduler._init_date(event.end_date);\r\n};\r\n\r\nscheduler._init_date = function(date){\r\n\tif(!date)\r\n\t\treturn null;\r\n\tif (typeof date == \"string\") {\r\n\t\treturn scheduler._helpers.parseDate(date);\r\n\t}\r\n\telse return new Date(date);\r\n};\r\n\r\nconst getSerializableData = createSerializator(scheduler);\r\nscheduler.serialize = function(){\r\n\tconst dataset = [];\r\n\tconst allEvents = getSerializableData();\r\n\tfor (var a in allEvents){\r\n\t\t\r\n\t\tconst exportedEvent = {};\r\n\t\tvar ev = allEvents[a];\r\n\r\n\t\tfor(var key in ev){\r\n\t\t\tif (key.charAt(0) == \"$\" || key.charAt(0) == \"_\"){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tlet exportValue;\r\n\t\t\tconst rawValue = ev[key];\r\n\t\t\tif(scheduler.utils.isDate(rawValue)){\r\n\t\t\t\texportValue = scheduler.defined(scheduler.templates.xml_format) ? scheduler.templates.xml_format(rawValue) : scheduler.templates.format_date(rawValue);\r\n\t\t\t}else{\r\n\t\t\t\texportValue = rawValue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\texportedEvent[key] = exportValue;\r\n\t\t}\r\n\r\n\t\tdataset.push(exportedEvent);\r\n\t}\r\n\treturn dataset;\r\n};\r\n\r\n/*\r\nscheduler.json = {};\r\nscheduler.json.parse = function(data) {\r\n\r\n\tvar events = [];\r\n\r\n\tif (typeof data == \"string\") {\r\n\t\tdata = JSON.parse(data);\r\n\t}\r\n\tif (Object.prototype.toString.call(data) === '[object Array]') {\r\n\t\tevents = data;\r\n\t} else {\r\n\t\tif(data){\r\n\t\t\tif(data.events){\r\n\t\t\t\tevents = data.events;\r\n\t\t\t}else if(data.data){\r\n\t\t\t\tevents = data.data;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tevents = events || [];\r\n\r\n\tif (data.dhx_security) {\r\n\t\tif (window.dhtmlx) {\r\n\t\t\twindow.dhtmlx.security_key = data.dhx_security;\r\n\t\t}\r\n\t\tscheduler.security_key = data.dhx_security;\r\n\t}\r\n\r\n\tvar collections = (data && data.collections) ? data.collections : {};\r\n\tvar collections_loaded = false;\r\n\tfor (var key in collections) {\r\n\t\tif (collections.hasOwnProperty(key)) {\r\n\t\t\tcollections_loaded = true;\r\n\t\t\tvar collection = collections[key];\r\n\t\t\tvar arr = scheduler.serverList[key];\r\n\t\t\tif (!arr) {\r\n\t\t\t\tscheduler.serverList[key] = arr = [];\r\n\t\t\t}\r\n\t\t\tarr.splice(0, arr.length); //clear old options\r\n\t\t\tfor (var j = 0; j < collection.length; j++) {\r\n\t\t\t\tvar option = collection[j];\r\n\t\t\t\tvar obj = { key: option.value, label: option.label }; // resulting option object\r\n\t\t\t\tfor (var option_key in option) {\r\n\t\t\t\t\tif (option.hasOwnProperty(option_key)) {\r\n\t\t\t\t\t\tif (option_key == \"value\" || option_key == \"label\")\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\tobj[option_key] = option[option_key]; // obj['value'] = option['value']\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tarr.push(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (collections_loaded)\r\n\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\r\n\tvar evs = [];\r\n\tfor (var i = 0; i < events.length; i++) {\r\n\t\tvar event = events[i];\r\n\t\tscheduler._init_event(event);\r\n\t\tevs.push(event);\r\n\t}\r\n\treturn evs;\r\n};*/\r\nscheduler.parse = function(data, type) {\r\n\tthis._process = type;\r\n\tthis.on_load({xmlDoc: {responseText: data}});\r\n};\r\nscheduler.load = function(url, call) {\r\n\tif (typeof call == \"string\") {\r\n\t\tthis._process = call;\r\n\t\tcall = arguments[2];\r\n\t}\r\n\r\n\tthis._load_url = url;\r\n\tthis._after_call = call;\r\n\tthis._load(url, this._date);\r\n};\r\n//possible values - day,week,month,year,all\r\nscheduler.setLoadMode = function(mode) {\r\n\tif (mode == \"all\") mode = \"\";\r\n\tthis._load_mode = mode;\r\n};\r\n\r\nscheduler.serverList = function(name, array) {\r\n\tif (array) {\r\n\t\tthis.serverList[name] = array.slice(0);\r\n\t\treturn this.serverList[name];\r\n\t}\r\n\tthis.serverList[name] = (this.serverList[name] || []);\r\n\treturn this.serverList[name];\r\n};\r\nscheduler._userdata = {};\r\n\r\nscheduler._xmlNodeToJSON = function(node) {\r\n\tvar t = {};\r\n\tfor (var i = 0; i < node.attributes.length; i++)\r\n\t\tt[node.attributes[i].name] = node.attributes[i].value;\r\n\r\n\tfor (var i = 0; i < node.childNodes.length; i++) {\r\n\t\tvar child = node.childNodes[i];\r\n\t\tif (child.nodeType == 1)\r\n\t\t\tt[child.tagName] = child.firstChild ? child.firstChild.nodeValue : \"\";\r\n\t}\r\n\r\n\tif (!t.text) t.text = node.firstChild ? node.firstChild.nodeValue : \"\";\r\n\r\n\treturn t;\r\n};\r\nscheduler.attachEvent(\"onXLS\", function() {\r\n\tif (this.config.show_loading === true) {\r\n\t\tvar t;\r\n\t\tt = this.config.show_loading = document.createElement(\"div\");\r\n\t\tt.className = 'dhx_loading';\r\n\t\tt.style.left = Math.round((this._x - 128) / 2) + \"px\";\r\n\t\tt.style.top = Math.round((this._y - 15) / 2) + \"px\";\r\n\t\tthis._obj.appendChild(t);\r\n\t}\r\n});\r\nscheduler.attachEvent(\"onXLE\", function() {\r\n\tvar t = this.config.show_loading;\r\n\tif (t && typeof t == \"object\") {\r\n\t\tif(t.parentNode) {\r\n\t\t\tt.parentNode.removeChild(t);\r\n\t\t}\r\n\t\tthis.config.show_loading = true;\r\n\t}\r\n});\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._parsers.xml = {\r\n\tcanParse: function(data, xhr){\r\n\t\t// IE returns non-empty responseXML type regardless of actual data type\r\n\t\tif(xhr.responseXML && xhr.responseXML.firstChild){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\ttry{\r\n\t\t\tvar xmlDoc = scheduler.ajax.parse(xhr.responseText);\r\n\t\t\tvar topElement = scheduler.ajax.xmltop(\"data\", xmlDoc);\r\n\t\t\tif(topElement && topElement.tagName === \"data\"){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}catch (e){\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\tparse: function(loader) {\r\n\t\tvar xml;\r\n\r\n\t\tif (!loader.xmlDoc.responseXML) { //from a string\r\n\t\t\tloader.xmlDoc.responseXML = scheduler.ajax.parse(loader.xmlDoc.responseText);\r\n\t\t}\r\n\t\r\n\t\txml = scheduler.ajax.xmltop(\"data\", loader.xmlDoc);\r\n\t\tif (xml.tagName != \"data\") return null;//not an xml\r\n\t\tvar csrfToken = xml.getAttribute(\"dhx_security\");\r\n\t\tif (csrfToken) {\r\n\t\t\tif (window.dhtmlx) {\r\n\t\t\t\twindow.dhtmlx.security_key = csrfToken;\r\n\t\t\t}\r\n\t\t\tscheduler.security_key = csrfToken;\r\n\t\t}\r\n\t\r\n\t\tvar opts = scheduler.ajax.xpath(\"//coll_options\", loader.xmlDoc);\r\n\t\tfor (var i = 0; i < opts.length; i++) {\r\n\t\t\tvar bind = opts[i].getAttribute(\"for\");\r\n\t\t\tvar arr = scheduler.serverList[bind];\r\n\t\t\tif (!arr) {\r\n\t\t\t\tscheduler.serverList[bind] = arr = [];\r\n\t\t\t}\r\n\t\t\tarr.splice(0, arr.length);\t//clear old options\r\n\t\t\tvar itms = scheduler.ajax.xpath(\".//item\", opts[i]);\r\n\t\t\tfor (var j = 0; j < itms.length; j++) {\r\n\t\t\t\tvar itm = itms[j];\r\n\t\t\t\tvar attrs = itm.attributes;\r\n\t\t\t\tvar obj = { key: itms[j].getAttribute(\"value\"), label: itms[j].getAttribute(\"label\")};\r\n\t\t\t\tfor (var k = 0; k < attrs.length; k++) {\r\n\t\t\t\t\tvar attr = attrs[k];\r\n\t\t\t\t\tif (attr.nodeName == \"value\" || attr.nodeName == \"label\")\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\tobj[attr.nodeName] = attr.nodeValue;\r\n\t\t\t\t}\r\n\t\t\t\tarr.push(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (opts.length)\r\n\t\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\t\r\n\t\tvar ud = scheduler.ajax.xpath(\"//userdata\", loader.xmlDoc);\r\n\t\tfor (var i = 0; i < ud.length; i++) {\r\n\t\t\tvar udx = scheduler._xmlNodeToJSON(ud[i]);\r\n\t\t\tscheduler._userdata[udx.name] = udx.text;\r\n\t\t}\r\n\t\r\n\t\tvar evs = [];\r\n\t\txml = scheduler.ajax.xpath(\"//event\", loader.xmlDoc);\r\n\t\r\n\t\tfor (var i = 0; i < xml.length; i++) {\r\n\t\t\tvar ev = evs[i] = scheduler._xmlNodeToJSON(xml[i]);\r\n\t\t\tscheduler._init_event(ev);\r\n\t\t}\r\n\t\treturn evs;\r\n\t}\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler.json = scheduler._parsers.json = {\r\n\tcanParse: function(data){\r\n\t\tif(data && typeof data === \"object\"){\r\n\t\t\treturn true;\r\n\t\t} else if(typeof data === \"string\"){\r\n\t\t\ttry {\r\n\t\t\t\tvar result = JSON.parse(data);\r\n\t\t\t\treturn Object.prototype.toString.call(result) === '[object Object]' || \r\n\t\t\t\t\t\tObject.prototype.toString.call(result) === '[object Array]';\r\n\t\t\t} catch (err) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\tparse: function(data) {\r\n\t\tvar events = [];\r\n\r\n\t\tif (typeof data == \"string\") {\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\t\tif (Object.prototype.toString.call(data) === '[object Array]') {\r\n\t\t\tevents = data;\r\n\t\t} else {\r\n\t\t\tif(data){\r\n\t\t\t\tif(data.events){\r\n\t\t\t\t\tevents = data.events;\r\n\t\t\t\t}else if(data.data){\r\n\t\t\t\t\tevents = data.data;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tevents = events || [];\r\n\r\n\t\tif (data.dhx_security) {\r\n\t\t\tif (window.dhtmlx) {\r\n\t\t\t\twindow.dhtmlx.security_key = data.dhx_security;\r\n\t\t\t}\r\n\t\t\tscheduler.security_key = data.dhx_security;\r\n\t\t}\r\n\r\n\t\tvar collections = (data && data.collections) ? data.collections : {};\r\n\t\tvar collections_loaded = false;\r\n\t\tfor (var key in collections) {\r\n\t\t\tif (collections.hasOwnProperty(key)) {\r\n\t\t\t\tcollections_loaded = true;\r\n\t\t\t\tvar collection = collections[key];\r\n\t\t\t\tvar arr = scheduler.serverList[key];\r\n\t\t\t\tif (!arr) {\r\n\t\t\t\t\tscheduler.serverList[key] = arr = [];\r\n\t\t\t\t}\r\n\t\t\t\tarr.splice(0, arr.length); //clear old options\r\n\t\t\t\tfor (var j = 0; j < collection.length; j++) {\r\n\t\t\t\t\tvar option = collection[j];\r\n\t\t\t\t\tvar obj = { key: option.value, label: option.label }; // resulting option object\r\n\t\t\t\t\tfor (var option_key in option) {\r\n\t\t\t\t\t\tif (option.hasOwnProperty(option_key)) {\r\n\t\t\t\t\t\t\tif (option_key == \"value\" || option_key == \"label\")\r\n\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\tobj[option_key] = option[option_key]; // obj['value'] = option['value']\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tarr.push(obj);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (collections_loaded)\r\n\t\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\r\n\t\tvar evs = [];\r\n\t\tfor (var i = 0; i < events.length; i++) {\r\n\t\t\tvar event = events[i];\r\n\t\t\tscheduler._init_event(event);\r\n\t\t\tevs.push(event);\r\n\t\t}\r\n\t\treturn evs;\r\n\t}\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler.ical = scheduler._parsers.ical = {\r\n\tcanParse: function(data){\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\treturn new RegExp(\"^BEGIN:VCALENDAR\").test(data);\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t},\r\n\tparse:function(str){\r\n\t\tvar data = str.match(RegExp(this.c_start+\"[^\\f]*\"+this.c_end,\"\"));\r\n\t\tif (!data.length) return;\r\n\r\n\t\t// mpl: handle bad unfolding\r\n\t\tdata[0]=data[0].replace(/[\\r\\n]+ /g,\"\");\r\n\r\n\t\t//unfolding \r\n\t\tdata[0]=data[0].replace(/[\\r\\n]+(?=[a-z \\t])/g,\" \");\r\n\t\t//drop property\r\n\t\tdata[0]=data[0].replace(/;[^:\\r\\n]*:/g,\":\");\r\n\t\t\r\n\t\t\r\n\t\tvar incoming=[];\r\n\t\tvar match;\r\n\t\tvar event_r = RegExp(\"(?:\"+this.e_start+\")([^\\f]*?)(?:\"+this.e_end+\")\",\"g\");\r\n\t\twhile ((match=event_r.exec(data)) !== null){\r\n\t\t\tvar e={};\r\n\t\t\tvar param;\r\n\t\t\tvar param_r = /[^\\r\\n]+[\\r\\n]+/g;\r\n\t\t\twhile ((param=param_r.exec(match[1])) !== null)\r\n\t\t\t\tthis.parse_param(param.toString(),e);\r\n\t\t\tif (e.uid && !e.id) e.id = e.uid; //fallback to UID, when ID is not defined\r\n\t\t\tincoming.push(e);\t\r\n\t\t}\r\n\t\treturn incoming;\r\n\t},\r\n\tparse_param:function(str,obj){\r\n\t\tvar d = str.indexOf(\":\"); \r\n\t\t\tif (d==-1) return;\r\n\t\t\r\n\t\tvar name = str.substr(0,d).toLowerCase();\r\n\t\tvar value = str.substr(d+1).replace(/\\\\,/g,\",\").replace(/[\\r\\n]+$/,\"\");\r\n\t\tif (name==\"summary\")\r\n\t\t\tname=\"text\";\r\n\t\telse if (name==\"dtstart\"){\r\n\t\t\tname = \"start_date\";\r\n\t\t\tvalue = this.parse_date(value,0,0);\r\n\t\t}\r\n\t\telse if (name==\"dtend\"){\r\n\t\t\tname = \"end_date\";\r\n\t\t\tvalue = this.parse_date(value,0,0);\r\n\t\t}\r\n\t\tobj[name]=value;\r\n\t},\r\n\tparse_date:function(value,dh,dm){\r\n\t\tvar t = value.split(\"T\");\r\n\r\n\t\tvar utcMark = false;\r\n\t\tif (t[1]){\r\n\t\t\tdh=t[1].substr(0,2);\r\n\t\t\tdm=t[1].substr(2,2);\r\n\t\t\tutcMark = !!(t[1][6] == \"Z\");\r\n\t\t}\r\n\t\tvar dy = t[0].substr(0,4);\r\n\t\tvar dn = parseInt(t[0].substr(4,2),10)-1;\r\n\t\tvar dd = t[0].substr(6,2);\r\n\r\n\t\tif(scheduler.config.server_utc || utcMark){\r\n\t\t\treturn new Date(Date.UTC(dy,dn,dd,dh,dm)) ;\r\n\t\t}else{\r\n\t\t\treturn new Date(dy,dn,dd,dh,dm);\r\n\t\t}\r\n\t},\r\n\tc_start:\"BEGIN:VCALENDAR\",\r\n\te_start:\"BEGIN:VEVENT\",\r\n\te_end:\"END:VEVENT\",\r\n\tc_end:\"END:VCALENDAR\"\t\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._init_touch_events = function(){\r\n\tvar mobile = this.config.touch &&\r\n\t\t( ((navigator.userAgent.indexOf(\"Mobile\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"iPad\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"Android\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"Touch\")!=-1)) && !window.MSStream) ||\r\n\t\t\t((navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1));\r\n\r\n\tif(mobile){\r\n\t\tthis.xy.scroll_width = 0;\r\n\t\tthis._mobile = true;\r\n\t}\r\n\r\n\tif(this.config.touch){\r\n\r\n\t\tvar touchEventsSupported = true;\r\n\t\ttry {\r\n\t\t\tdocument.createEvent(\"TouchEvent\");\r\n\t\t} catch (e) {\r\n\t\t\ttouchEventsSupported = false;\r\n\t\t}\r\n\r\n\t\tif (touchEventsSupported) {\r\n\t\t\tthis._touch_events([\"touchmove\", \"touchstart\", \"touchend\"], function (ev) {\r\n\t\t\t\tif (ev.touches && ev.touches.length > 1) return null;\r\n\t\t\t\tif (ev.touches[0])\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\ttarget: ev.target,\r\n\t\t\t\t\t\tpageX: ev.touches[0].pageX,\r\n\t\t\t\t\t\tpageY: ev.touches[0].pageY,\r\n\t\t\t\t\t\tclientX: ev.touches[0].clientX,\r\n\t\t\t\t\t\tclientY: ev.touches[0].clientY\r\n\t\t\t\t\t};\r\n\t\t\t\telse\r\n\t\t\t\t\treturn ev;\r\n\t\t\t}, function () {\r\n\t\t\t\treturn false;\r\n\t\t\t});\r\n\t\t} else if (window.PointerEvent || window.navigator.pointerEnabled) {\r\n\t\t\tthis._touch_events([\"pointermove\", \"pointerdown\", \"pointerup\"], function (ev) {\r\n\t\t\t\tif (ev.pointerType == \"mouse\") return null;\r\n\t\t\t\treturn ev;\r\n\t\t\t}, function (ev) {\r\n\t\t\t\treturn (!ev || (ev.pointerType == \"mouse\" ));\r\n\t\t\t});\r\n\t\t} else if (window.navigator.msPointerEnabled) {\r\n\t\t\tthis._touch_events([\"MSPointerMove\", \"MSPointerDown\", \"MSPointerUp\"], function (ev) {\r\n\t\t\t\tif (ev.pointerType == ev.MSPOINTER_TYPE_MOUSE) return null;\r\n\t\t\t\treturn ev;\r\n\t\t\t}, function (ev) {\r\n\t\t\t\treturn (!ev || ev.pointerType == ev.MSPOINTER_TYPE_MOUSE);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n};\r\n\r\nscheduler._touch_events = function(names, accessor, ignore){\r\n\t//webkit on android need to be handled separately\r\n\t//var a_webkit = (navigator.userAgent.indexOf(\"Android\")!=-1) && (navigator.userAgent.indexOf(\"WebKit\")!=-1);\r\n\tvar source, tracker, timer, drag_mode, scroll_mode, action_mode;\r\n\tvar dblclicktime = 0;\r\n\r\n\tfunction attachTouchEvent(element, name, callback){\r\n\t\t//touch gestures must be disabled when ligthbox is opened\r\n\t\tscheduler.event(element, name, function(e){\r\n\t\t\tif(scheduler._is_lightbox_open()){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tif (ignore(e)) return;\r\n\t\t\t\treturn callback(e);\r\n\t\t\t}\r\n\t\t}, { passive: false });\r\n\t}\r\n\r\n\tfunction check_direction_swipe(s_ev, e_ev, step, max_dy){\r\n\t\tif (!s_ev || !e_ev) return false;\r\n\r\n\t\tvar t = s_ev.target;\r\n\t\twhile(t && t != scheduler._obj){\r\n\t\t\tt = t.parentNode;\r\n\t\t}\r\n\t\tif(t != scheduler._obj){\r\n\t\t\t//swipe outside scheduler\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// ignore swipe in horizontal timeline\r\n\t\tif(scheduler.matrix && scheduler.matrix[scheduler.getState().mode]){\r\n\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\tif(timeline.scrollable){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar dy = Math.abs(s_ev.pageY - e_ev.pageY);\r\n\t\tvar dx = Math.abs(s_ev.pageX - e_ev.pageX);\r\n\t\tif (dy < max_dy && dx>step && (!dy || (dx/dy > 3))){\r\n\t\t\tif (s_ev.pageX > e_ev.pageX) {\r\n\t\t\t\tscheduler._click.dhx_cal_next_button();\r\n\t\t\t}else {\r\n\t\t\t\tscheduler._click.dhx_cal_prev_button();\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n\tfunction doMouseMove(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tvar dnd = scheduler.getState().drag_mode,\r\n\t\t\ttimeline = scheduler.matrix ? scheduler.matrix[scheduler._mode] : false;\r\n\r\n\t\tvar original_render = scheduler.render_view_data;\r\n\t\tif(dnd == 'create' && timeline){\r\n\t\t\t//suppress full redraw of timeline on creating event\r\n\t\t\tscheduler.render_view_data = function() {\r\n\t\t\t\tvar id = scheduler.getState().drag_id;\r\n\t\t\t\tvar ev = scheduler.getEvent(id);\r\n\t\t\t\tvar property = timeline.y_property;\r\n\r\n\t\t\t\tvar evs = scheduler.getEvents(ev.start_date, ev.end_date);\r\n\t\t\t\tfor(var i = 0; i < evs.length; i++){\r\n\t\t\t\t\tif(evs[i][property] != ev[property]){\r\n\t\t\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tev._sorder = evs.length - 1;\r\n\t\t\t\tev._count = evs.length;\r\n\r\n\t\t\t\tthis.render_data([ev], scheduler.getState().mode);\r\n\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\tscheduler._on_mouse_move(e);\r\n\r\n\t\tif(dnd == 'create' && timeline){\r\n\t\t\tscheduler.render_view_data = original_render;\r\n\t\t}\r\n\r\n\t\tif (e.preventDefault)\r\n\t\t\te.preventDefault();\r\n\t\te.cancelBubble = true;\r\n\t\treturn false;\r\n\t}\r\n\r\n\t// touchmove\r\n\tattachTouchEvent(document.body, names[0], function(e){\r\n\t\tif (ignore(e)) return;\r\n\r\n\t\tvar acc = accessor(e);\r\n\t\tif(!acc) return;\r\n\t\tif (drag_mode){\r\n\t\t\tdoMouseMove(acc);\r\n\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._update_global_tip();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//if (tracker && a_webkit){\r\n\t\t//\tcheck_direction_swipe(tracker, accessor(e), 0);\r\n\t\t//}\r\n\r\n\t\ttracker = accessor(e);\r\n\t\t//ignore common and scrolling moves\r\n\t\tif (!action_mode) return;\r\n\r\n\t\t//multitouch\r\n\t\tif (!tracker){\r\n\t\t\tscroll_mode = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//target changed - probably in scroll mode\r\n\r\n\t\tif (source.target != tracker.target || (Math.abs(source.pageX - tracker.pageX) > 5) || (Math.abs(source.pageY - tracker.pageY) > 5)){\r\n\t\t\tscroll_mode = true;\r\n\t\t\tclearTimeout(timer);\r\n\t\t}\r\n\r\n\t});\r\n\r\n\t//attachTouchEvent(this._els[\"dhx_cal_data\"][0], \"scroll\", drag_cancel);\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], \"touchcancel\", drag_cancel);\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], \"contextmenu\", function(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tif (action_mode){\r\n\t\t\tif (e && e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t});\r\n\r\n\t// touchstart\r\n\tattachTouchEvent(this._obj, names[1], function(e){\r\n\t\t// block pull-to-refresh\r\n\t\tif(document && document.body){\r\n\t\t\tdocument.body.classList.add(\"dhx_cal_touch_active\");\r\n\t\t}\r\n\r\n\t\tif (ignore(e)) return;\r\n\t\tscheduler._pointerDragId = e.pointerId;\r\n\r\n\t\tvar fake_event;\r\n\t\tdrag_mode = scroll_mode = false;\r\n\t\taction_mode = true;\r\n\t\tfake_event = tracker = accessor(e);\r\n\r\n\t\tif (!fake_event){\r\n\t\t\tscroll_mode = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//dbl click\r\n\t\tvar now = new Date();\r\n\r\n\t\tif (!scroll_mode && !drag_mode && now - dblclicktime < 250){\r\n\t\t\tscheduler._click.dhx_cal_data(fake_event);\r\n\t\t\twindow.setTimeout(function(){\r\n\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t//fake_event.type = \"dblclick\";\r\n\t\t\t\tscheduler._on_dbl_click(fake_event);\r\n\t\t\t}, 50);\r\n\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._block_next_stop = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tdblclicktime = now;\r\n\r\n\t\t//drag\r\n\r\n\t\tif (scroll_mode || drag_mode || !scheduler.config.touch_drag)\r\n\t\t\treturn;\r\n\r\n\t\tvar actTask = scheduler._locate_event(document.activeElement);\r\n\t\tvar fakeTask = scheduler._locate_event(fake_event.target);\r\n\t\tvar sourceTask = source? scheduler._locate_event(source.target) : null;\r\n\r\n\t\tif(actTask && fakeTask && actTask == fakeTask && actTask != sourceTask)\r\n\t\t{\r\n\t\t\tif(e.preventDefault) {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\tscheduler._click.dhx_cal_data(fake_event);\r\n\t\t\tsource = fake_event;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//there is no target\r\n\t\ttimer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tdrag_mode = true;\r\n\t\t\tvar target = source.target;\r\n\t\t\tvar className = scheduler._getClassName(target);\r\n\t\t\tif (target && className.indexOf(\"dhx_body\") != -1)\r\n\t\t\t\ttarget = target.previousSibling;\r\n\r\n\t\t\tscheduler._on_mouse_down(source, target);\r\n\t\t\tif (scheduler._drag_mode && scheduler._drag_mode != \"create\"){\r\n\t\t\t\tscheduler.for_rendered(scheduler._drag_id, function(node, i) {\r\n\t\t\t\t\tnode.style.display='none';\r\n\t\t\t\t\tscheduler._rendered.splice(i, 1);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif (scheduler.config.touch_tip) {\r\n\t\t\t\tscheduler._show_global_tip();\r\n\t\t\t}\r\n\t\t\tscheduler.updateEvent(scheduler._drag_id);\r\n\t\t},scheduler.config.touch_drag);\r\n\r\n\t\tsource = fake_event;\r\n\t});\r\n\tfunction drag_cancel(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tscheduler._hide_global_tip();\r\n\t\tif (drag_mode){\r\n\t\t\tscheduler._on_mouse_up( accessor(e) );\r\n\t\t\tscheduler._temp_touch_block = false;\r\n\t\t}\r\n\t\tscheduler._drag_id = null;\r\n\t\tscheduler._drag_mode=null;\r\n\t\tscheduler._drag_pos=null;\r\n\t\tscheduler._pointerDragId = null;\r\n\t\tclearTimeout(timer);\r\n\t\tdrag_mode = action_mode = false;\r\n\t\tscroll_mode = true;\r\n\t}\r\n\r\n\t// touch end\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], names[2], function(e){\r\n\t\tif(document && document.body){\r\n\t\t\tdocument.body.classList.remove(\"dhx_cal_touch_active\");\r\n\t\t}\r\n\r\n\t\tif (ignore(e)) return;\r\n\r\n\t\tif(scheduler.config.touch_swipe_dates){\r\n\t\t\tif (!drag_mode && check_direction_swipe(source, tracker, 200, 100)) {\r\n\t\t\t\tscheduler._block_next_stop = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (drag_mode) {\r\n\t\t\tscheduler._ignore_next_click = true;\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\t}, 100);\r\n\t\t}\r\n\r\n\t\tdrag_cancel(e);\r\n\t\tif (scheduler._block_next_stop){\r\n\t\t\tscheduler._block_next_stop = false;\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler.event(document.body, names[2], drag_cancel);\r\n};\r\n\r\nscheduler._show_global_tip = function(){\r\n\tscheduler._hide_global_tip();\r\n\r\n\tvar toptip = scheduler._global_tip = document.createElement(\"div\");\r\n\ttoptip.className='dhx_global_tip';\r\n\r\n\tscheduler._update_global_tip(1);\r\n\r\n\tdocument.body.appendChild(toptip);\r\n};\r\nscheduler._update_global_tip = function(init){\r\n\tvar toptip = scheduler._global_tip;\r\n\tif (toptip){\r\n\t\tvar time = \"\";\r\n\t\tif (scheduler._drag_id && !init){\r\n\t\t\tvar ev = scheduler.getEvent(scheduler._drag_id);\r\n\t\t\tif (ev)\r\n\t\t\t\ttime = \"
\" + (ev._timed ? scheduler.templates.event_header(ev.start_date, ev.end_date, ev):scheduler.templates.day_date(ev.start_date, ev.end_date, ev)) + \"
\";\r\n\t\t}\r\n\r\n\t\tif (scheduler._drag_mode == \"create\" || scheduler._drag_mode == \"new-size\")\r\n\t\t\ttoptip.innerHTML = (scheduler.locale.labels.drag_to_create || \"Drag to create\")+time;\r\n\t\telse\r\n\t\t\ttoptip.innerHTML = (scheduler.locale.labels.drag_to_move || \"Drag to move\")+time;\r\n\t}\r\n};\r\nscheduler._hide_global_tip = function(){\r\n\tvar toptip = scheduler._global_tip;\r\n\tif (toptip && toptip.parentNode){\r\n\t\ttoptip.parentNode.removeChild(toptip);\r\n\t\tscheduler._global_tip = 0;\r\n\t}\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._addThemeClass = function(){\r\n\tdocument.documentElement.setAttribute(\"data-scheduler-theme\", scheduler.skin);\r\n};\r\n\r\nscheduler._skin_settings = {\r\n\tfix_tab_position: [1,0],\r\n\tuse_select_menu_space: [1,0],\r\n\twide_form: [1,0],\r\n\r\n\thour_size_px: [44,42],\r\n\tdisplayed_event_color: [\"#ff4a4a\", \"ffc5ab\"],\r\n\tdisplayed_event_text_color: [\"#ffef80\", \"7e2727\"]\r\n};\r\n\r\nscheduler._skin_xy = {\r\n\tlightbox_additional_height: [90,50],\r\n\tnav_height: [59,22],\r\n\tbar_height: [24,20]\r\n};\r\n\r\n// material skin uses a different box sizing model than other skins, and also requires some post-processing.\r\n// In order to render events correctly, we need to know which box sizing model is used\r\n// We can detect it by styles applied, taking into account that styles may be loaded after scheduler is rendered\r\n\r\nscheduler._is_material_skin = function(){\r\n\tif(!scheduler.skin){\r\n\t\treturn checkIfMaterialSkin();\r\n\t}else{\r\n\t\treturn ((scheduler.skin + \"\").indexOf(\"material\") > -1);\r\n\t}\r\n};\r\n\r\nfunction themeNameFromFile(){\r\n\tvar links = document.getElementsByTagName(\"link\");\r\n\tfor (var i = 0; i < links.length; i++) {\r\n\t\tvar res = links[i].href.match(\"dhtmlxscheduler_([a-z]+).css\");\r\n\t\tif (res){\r\n\t\t\treturn res[1];\r\n\t\t}\r\n\t}\r\n}\r\n\r\nscheduler._build_skin_info = function() {\r\n\tmonitorThemeChange();\r\n\tconst styles = getComputedStyle(this.$container);\r\n\tconst themeVar = styles.getPropertyValue(\"--dhx-scheduler-theme\");\r\n\r\n\tlet isCssVarTheme = !!themeVar;\r\n\tlet themeName;\r\n\tlet cssValues = {};\r\n\tlet oldMaterialTheme = false;\r\n\r\n\tif(isCssVarTheme){\r\n\t\tthemeName = themeVar;\r\n\t\tfor(let i in scheduler.xy){\r\n\t\t\tcssValues[i] = styles.getPropertyValue(`--dhx-scheduler-xy-${i}`);\r\n\t\t}\r\n\r\n\t\tcssValues.hour_size_px = styles.getPropertyValue(`--dhx-scheduler-config-hour_size_px`);\r\n\t\tcssValues.wide_form = styles.getPropertyValue(`--dhx-scheduler-config-form_wide`);\r\n\r\n\t}else{\r\n\t\tthemeName = themeNameFromFile();\r\n\t\toldMaterialTheme = scheduler._is_material_skin();\r\n\t}\r\n\r\n\r\n\tscheduler._theme_info = {\r\n\t\ttheme: themeName,\r\n\t\tcssVarTheme: isCssVarTheme,\r\n\t\toldMaterialTheme: oldMaterialTheme,\r\n\t\tvalues: cssValues\r\n\t};\r\n\r\n\tif(scheduler._theme_info.cssVarTheme){\r\n\t\tconst themeVariables = this._theme_info.values;\r\n\t\tfor(let i in scheduler.xy){\r\n\t\t\tif(!isNaN(parseInt(themeVariables[i]))){\r\n\t\t\t\tscheduler.xy[i] = parseInt(themeVariables[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\n\r\nvar calculatedMaterial;\r\nfunction checkIfMaterialSkin(){\r\n\tif(calculatedMaterial === undefined){\r\n\t\tvar probe = document.createElement(\"div\");\r\n\t\tprobe.style.position = \"absolute\";\r\n\t\tprobe.style.left = \"-9999px\";\r\n\t\tprobe.style.top = \"-9999px\";\r\n\t\tprobe.innerHTML = \"
\" +\r\n\t\t\t\"
\" +\r\n\t\t\t\"
\"+\r\n\t\t\"
\";\r\n\t\tdocument.body.appendChild(probe);\r\n\t\tvar styles = window.getComputedStyle(probe.querySelector(\".dhx_cal_scale_placeholder\"));\r\n\t\tvar position = styles.getPropertyValue('position');\r\n\t\tif(position === \"absolute\"){\r\n\t\t\t// page has skins for placeholder element from material skin\r\n\t\t\tcalculatedMaterial = true;\r\n\t\t}else{\r\n\t\t\tcalculatedMaterial = false;\r\n\t\t}\r\n\r\n\t\tsetTimeout(function(){\r\n\t\t\tcalculatedMaterial = null;\r\n\t\t\tif(probe && probe.parentNode){\r\n\t\t\t\tprobe.parentNode.removeChild(probe);\r\n\t\t\t}\r\n\t\t}, 500);\r\n\t}\r\n\treturn calculatedMaterial;\r\n}\r\n\r\nvar cachedBorderBoxValue;\r\nfunction checkIfBorderBoxStyling(){\r\n\tif(scheduler._is_material_skin()){\r\n\t\treturn true;\r\n\t}else{\r\n\t\tif(cachedBorderBoxValue === undefined){\r\n\t\t\tvar probe = document.createElement(\"div\");\r\n\t\t\tprobe.style.position = \"absolute\";\r\n\t\t\tprobe.style.left = \"-9999px\";\r\n\t\t\tprobe.style.top = \"-9999px\";\r\n\t\t\tprobe.innerHTML = \"
\" +\r\n\t\t\t\t\"
\" +\r\n\t\t\t\t\t\"
\"+\r\n\t\t\t\t\"
\"+\r\n\t\t\t\"
\";\r\n\r\n\t\t\tdocument.body.appendChild(probe);\r\n\t\t\tvar styles = window.getComputedStyle(probe.querySelector(\".dhx_body\"));\r\n\t\t\tvar boxSizing = styles.getPropertyValue('box-sizing');\r\n\t\t\tdocument.body.removeChild(probe);\r\n\t\t\tcachedBorderBoxValue = !!(boxSizing === \"border-box\");\r\n\r\n\t\t\tif(!cachedBorderBoxValue){\r\n\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\tcachedBorderBoxValue = undefined;\r\n\t\t\t\t}, 1000);// recalculate in case scheduler initialized before skin is loaded\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\treturn cachedBorderBoxValue;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction refreshAfterLoad(){\r\n\tif(scheduler._is_material_skin() || scheduler._border_box_events()){\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar oldStyling = cachedBorderBoxValue;\r\n\tcachedBorderBoxValue = undefined;\r\n\tcalculatedMaterial = undefined;\r\n\tvar newStyling = checkIfBorderBoxStyling();\r\n\r\n\t// if box styling model changed - means scheduler was rendered before stylesheet was loaded or parsed inline\r\n\t// repaint scheduler in order to apply new styles\r\n\tif(oldStyling !== newStyling && scheduler.$container && scheduler.getState().mode){\r\n\t\tscheduler.setCurrentView();\r\n\t}\r\n}\r\nscheduler.event(window, 'DOMContentLoaded', refreshAfterLoad);\r\nscheduler.event(window, 'load', refreshAfterLoad);\r\n\r\nscheduler._border_box_events = function(){\r\n\treturn checkIfBorderBoxStyling();\r\n};\r\n\r\nscheduler._configure = function(col, data, skin){\r\n\tfor (var key in data)\r\n\t\tif (typeof col[key] == \"undefined\")\r\n\t\t\tcol[key] = data[key][skin];\r\n};\r\n\r\nscheduler.setSkin = function(value){\r\n\tthis.skin = value;\r\n\tscheduler._addThemeClass();\r\n\tif(scheduler.$container){\r\n\t\tthis._skin_init();\r\n\t\tthis.render();\r\n\t}\r\n\t\r\n\t//\r\n};\r\n\r\nfunction flatSkinHourScale(date){\r\n\tvar min = date.getMinutes();\r\n\tmin = min < 10 ? \"0\"+min : min;\r\n\tvar html = \"\"+ date.getHours() +\"\"+\r\n\t\t\" \"+ min +\"\";\r\n\treturn html;\r\n}\r\n\r\nlet monitorIntervalId = null;\r\nfunction monitorThemeChange(){\r\n\tconst container = scheduler.$container;\r\n\t\r\n\tclearInterval(monitorIntervalId);\r\n\tif(container){\r\n\t\tmonitorIntervalId = setInterval(() => {\r\n\t\t\tconst csstheme = getComputedStyle(container).getPropertyValue('--dhx-scheduler-theme');\r\n\t\t\tif(csstheme && csstheme !== scheduler.skin){\r\n\t\t\t\tscheduler.setSkin(csstheme);\r\n\t\t\t}\r\n\r\n\t\t}, 100);\r\n\t}\r\n}\r\nscheduler.attachEvent(\"onDestroy\", function(){\r\n\tclearInterval(monitorIntervalId);\r\n});\r\n\r\nscheduler._skin_init = function(){\r\n\tthis._build_skin_info();\r\n\r\n\tif (!this.skin){\r\n\t\tthis.skin = this._theme_info.theme;\r\n\t}\r\n\tscheduler._addThemeClass();\r\n\tif (scheduler.skin === \"flat\"){\r\n\t\t// scheduler.xy.scale_height = 35;\r\n\t\tscheduler.templates.hour_scale = flatSkinHourScale;\r\n\t}else if (scheduler.templates.hour_scale === flatSkinHourScale){\r\n\t\tscheduler.templates.hour_scale = scheduler.date.date_to_str(scheduler.config.hour_date);\r\n\t}\r\n\r\n\r\n\r\n\t//scheduler._lightbox_template=\"
 
\";\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\r\n\t\tvar date_to_str = scheduler.date.date_to_str(\"%d\");\r\n\t\tif(!scheduler.templates._old_month_day){\r\n\t\t\tscheduler.templates._old_month_day = scheduler.templates.month_day;\r\n\t\t}\r\n\t\tvar old_month_day = scheduler.templates._old_month_day;\r\n\t\tscheduler.templates.month_day = function(date) {\r\n\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\tvar label = date_to_str(date);\r\n\t\t\t\tif (date.getDate() == 1) {\r\n\t\t\t\t\tlabel = scheduler.locale.date.month_full[date.getMonth()] + \" \" + label;\r\n\t\t\t\t}\r\n\t\t\t\tif (+date == +scheduler.date.date_part(this._currentDate())) {\r\n\t\t\t\t\tlabel = scheduler.locale.labels.dhx_cal_today_button + \" \" + label;\r\n\t\t\t\t}\r\n\t\t\t\treturn label;\r\n\t\t\t} else {\r\n\t\t\t\treturn old_month_day.call(this, date);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t// tab classes\r\n\t\tif(scheduler.config.fix_tab_position){\r\n\t\t\tconst tabs = scheduler._els[\"dhx_cal_navline\"][0].querySelectorAll('[data-tab]');\r\n\t\t\ttabs.forEach((tab) => {\r\n\t\t\t\tconst view = tab.getAttribute(\"data-tab\") || tab.getAttribute(\"name\");\r\n\r\n\t\t\t\tswitch (view) {\r\n\t\t\t\t\tcase \"day\":\r\n\t\t\t\t\tcase \"day_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_first\");\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"week\":\r\n\t\t\t\t\tcase \"week_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"month\":\r\n\t\t\t\t\tcase \"month_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_last\");\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_standalone\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\treorderTabs(scheduler._els[\"dhx_cal_navline\"][0]);\r\n\r\n\t\t}\r\n\t}, {once: true});\r\n\r\n\tfunction reorderTabs(container) {\r\n\t\t// segmented tabs should go first\r\n\r\n\t\tif(scheduler.config.header){\r\n\t\t\treturn;\r\n\t\t\t// don't reorder tabs if header is defined via config\r\n\t\t}\r\n\t\tconst tabs = Array.from(container.querySelectorAll('.dhx_cal_tab'));\r\n\t\r\n\t\t// segmented tabs\r\n\t\tconst order = ['day', 'week', 'month'];\r\n\t\r\n\t\tconst specialTabs = order.map(tabName => \r\n\t\t\ttabs.find(tab => tab.getAttribute('data-tab') === tabName)\r\n\t\t).filter(tab => tab !== undefined);\r\n\t\r\n\t\tlet firstTab = tabs.length > 0 ? tabs[0] : null;\r\n\r\n\t\tspecialTabs.reverse().forEach(tab => {\r\n\t\t\tcontainer.insertBefore(tab, firstTab);\r\n\t\t\tfirstTab = tab;\r\n\t\t});\r\n\t}\r\n\r\n\t// scheduler._skin_init = function(){\r\n\t// \tthis._build_skin_info();\r\n\t// \tthis.skin = this._theme_info.theme;\r\n\t// };\r\n};\r\n\r\n\r\n\r\n}","export default function DataProcessorEvents(scheduler, dp){\r\n\tthis.$scheduler = scheduler;\r\n\tthis.$dp = dp;\r\n\tthis._dataProcessorHandlers = [];\r\n\r\n\tthis.attach = function () {\r\n\t\tvar dp = this.$dp;\r\n\t\tvar scheduler = this.$scheduler;\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onEventAdded\", function(id) {\r\n\t\t\tif (!this._loading && this._validId(id))\r\n\t\t\tdp.setUpdated(id,true,\"inserted\");\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onConfirmedBeforeEventDelete\", function(id) {\r\n\t\t\tif (!this._validId(id)) return;\r\n\t\t\tvar z=dp.getState(id);\r\n\r\n\t\t\tif (z==\"inserted\" || this._new_event) { dp.setUpdated(id,false); return true; }\r\n\t\t\tif (z==\"deleted\") return false;\r\n\t\t\tif (z==\"true_deleted\") return true;\r\n\r\n\t\t\tdp.setUpdated(id,true,\"deleted\");\r\n\t\t\treturn false;\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onEventChanged\", function(id) { \r\n\t\t\tif (!this._loading && this._validId(id))\r\n\t\t\tdp.setUpdated(id,true,\"updated\");\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onClearAll\", function() { \r\n\t\t\t// clear dataprocessor state when scheduler is reset\r\n\t\t\tdp._in_progress={};\r\n\t\t\tdp._invalid={};\r\n\t\t\tdp.updatedRows = [];\r\n\t\t\tdp._waitMode = 0;\r\n\t\t}));\r\n\r\n\t\tdp.attachEvent(\"insertCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"updateCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"deleteCallback\", function(upd, id) {\r\n\t\t\tif (scheduler.getEvent(id)){\r\n\t\t\t\tscheduler.setUserData(id, this.action_param, \"true_deleted\");\r\n\t\t\t\tscheduler.deleteEvent(id);\r\n\t\t\t} else if (scheduler._add_rec_marker)\r\n\t\t\t\tscheduler._update_callback(upd, id);\r\n\t\t});\r\n\t};\r\n\r\n\tthis.detach = function () {\r\n\t\tfor (var key in this._dataProcessorHandlers) {\r\n\t\t\tvar handler = this._dataProcessorHandlers[key];\r\n\t\t\tthis.$scheduler.detachEvent(handler);\r\n\t\t}\r\n\t\tthis._dataProcessorHandlers = [];\r\n\t};\r\n}\r\n\r\nexport function extendScheduler(scheduler, dp){\r\n\tscheduler._validId=function(id){\r\n\t\tif(this._is_virtual_event){\r\n\t\t\treturn !this._is_virtual_event(id);\r\n\t\t}\r\n\t\treturn true;\r\n\t};\r\n\tscheduler.setUserData=function(id,name,value){\r\n\t\tif (id){\r\n\t\t\tvar ev = this.getEvent(id);\r\n\t\t\tif(ev) ev[name]=value;\r\n\t\t}else{\r\n\t\t\tthis._userdata[name]=value;\r\n\t\t}\r\n\t};\r\n\tscheduler.getUserData=function(id,name){\r\n\t\tif (id){\r\n\t\t\tvar ev = this.getEvent(id);\r\n\t\t\tif(ev)\r\n\t\t\t\treturn ev[name];\r\n\t\t\telse\r\n\t\t\t\treturn null;\r\n\t\t}else{\r\n\t\t\treturn this._userdata[name];\r\n\t\t}\r\n\t};\r\n\tscheduler._set_event_text_style=function(id,style){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\t\tthis.for_rendered(id,function(r){\r\n\t\t\tr.style.cssText+=\";\"+style;\r\n\t\t});\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tev[\"_text_style\"]=style;\r\n\t\tthis.event_updated(ev);\r\n\t};\r\n\tscheduler._update_callback = function(upd,id){\r\n\t\tvar data = scheduler._xmlNodeToJSON(upd.firstChild);\r\n\t\t//fix for updates of recurring events\r\n\t\tif (data.rec_type == \"none\") data.rec_pattern = \"none\";\r\n\t\tdata.text = data.text||data._tagvalue;\r\n\t\tdata.start_date = scheduler._helpers.parseDate(data.start_date);\r\n\t\tdata.end_date = scheduler._helpers.parseDate(data.end_date);\r\n\t\tscheduler.addEvent(data);\r\n\t\tif (scheduler._add_rec_marker)\r\n\t\t\tscheduler.setCurrentView();\r\n\t};\r\n\tscheduler._dp_change_event_id = function(id, new_id){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\t\tscheduler.changeEventId(id, new_id);\r\n\t};\r\n\tscheduler._dp_hook_delete = function(id, new_id){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\r\n\t\tif(new_id && id != new_id){\r\n\t\t\tif(this.getUserData(id, dp.action_param) == \"true_deleted\")\r\n\t\t\t\tthis.setUserData(id, dp.action_param, \"updated\");\r\n\r\n\t\t\tthis.changeEventId(id, new_id);\r\n\t\t}\r\n\t\treturn this.deleteEvent(new_id, true);\r\n\t};\r\n\r\n\tscheduler.setDp = function() {\r\n\t\tthis._dp = dp;\r\n\t};\r\n\tscheduler.setDp();\r\n}","import DataProcessorEvents from \"./dataprocessor_hooks\";\r\nimport { extendScheduler } from \"./dataprocessor_hooks\";\r\nimport eventable from \"../../utils/eventable\";\r\nimport global from \"../../global\";\r\n\r\n/**\r\n *\t@desc: constructor, data processor object\r\n *\t@param: serverProcessorURL - url used for update\r\n *\t@type: public\r\n */\r\nexport function DataProcessor(serverProcessorURL){\r\n\tthis.serverProcessor = serverProcessorURL;\r\n\tthis.action_param = \"!nativeeditor_status\";\r\n\r\n\tthis.object = null;\r\n\tthis.updatedRows = []; // ids of updated rows\r\n\r\n\tthis.autoUpdate = true;\r\n\tthis.updateMode = \"cell\";\r\n\tthis._tMode = \"GET\";\r\n\tthis._headers = null;\r\n\tthis._payload = null;\r\n\tthis.post_delim = \"_\";\r\n\r\n\tthis._waitMode = 0;\r\n\tthis._in_progress = {};\r\n\tthis._invalid = {};\r\n\tthis.messages = [];\r\n\r\n\tthis.styles = {\r\n\t\tupdated: \"font-weight:bold;\",\r\n\t\tinserted: \"font-weight:bold;\",\r\n\t\tdeleted: \"text-decoration : line-through;\",\r\n\t\tinvalid: \"background-color:FFE0E0;\",\r\n\t\tinvalid_cell: \"border-bottom:2px solid red;\",\r\n\t\terror: \"color:red;\",\r\n\t\tclear: \"font-weight:normal;text-decoration:none;\"\r\n\t};\r\n\tthis.enableUTFencoding(true);\r\n\teventable(this); // TODO: need to update\r\n\r\n\treturn this;\r\n}\r\nDataProcessor.prototype = {\r\n\tsetTransactionMode: function (mode, total) {\r\n\t\tif (typeof mode == \"object\") {\r\n\t\t\tthis._tMode = mode.mode || this._tMode;\r\n\r\n\t\t\tif (mode.headers !== undefined) {\r\n\t\t\t\tthis._headers = mode.headers;\r\n\t\t\t}\r\n\r\n\t\t\tif (mode.payload !== undefined) {\r\n\t\t\t\tthis._payload = mode.payload;\r\n\t\t\t}\r\n\t\t\tthis._tSend = !!total;\r\n\t\t} else {\r\n\t\t\tthis._tMode = mode;\r\n\t\t\tthis._tSend = total;\r\n\t\t}\r\n\r\n\t\tif (this._tMode == \"REST\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t}\r\n\r\n\t\tif (this._tMode === \"JSON\" || this._tMode === \"REST-JSON\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t\tthis._serializeAsJson = true;\r\n\t\t\tthis._headers = this._headers || {};\r\n\t\t\tthis._headers[\"Content-Type\"] = \"application/json\";\r\n\t\t}else{\r\n\t\t\tif(this._headers && !this._headers[\"Content-Type\"]){\r\n\t\t\t\tthis._headers[\"Content-Type\"] = \"application/x-www-form-urlencoded\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (this._tMode === \"CUSTOM\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t\tthis._router = mode.router;\r\n\t\t}\r\n\t},\r\n\tescape: function (data) {\r\n\t\tif (this._utf)\r\n\t\t\treturn encodeURIComponent(data);\r\n\t\telse\r\n\t\t\treturn escape(data);\r\n\t},\r\n\t/**\r\n\t *\t@desc: allows to set escaping mode\r\n\t *\t@param: true - utf based escaping, simple - use current page encoding\r\n\t *\t@type: public\r\n\t */\r\n\tenableUTFencoding: function (mode) {\r\n\t\tthis._utf = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: allows to define, which column may trigger update\r\n\t *\t@param: val - array or list of true/false values\r\n\t *\t@type: public\r\n\t */\r\n\tsetDataColumns: function (val) {\r\n\t\tthis._columns = (typeof val == \"string\") ? val.split(\",\") : val;\r\n\t},\r\n\t/**\r\n\t *\t@desc: get state of updating\r\n\t *\t@returns: true - all in sync with server, false - some items not updated yet.\r\n\t *\t@type: public\r\n\t */\r\n\tgetSyncState: function () {\r\n\t\treturn !this.updatedRows.length;\r\n\t},\r\n\t/**\r\n\t *\t@desc: enable/disable named field for data syncing, will use column ids for grid\r\n\t *\t@param: mode - true/false\r\n\t *\t@type: public\r\n\t */\r\n\tenableDataNames: function (mode) {\r\n\t\tthis._endnm = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: enable/disable mode , when only changed fields and row id send to the server side, instead of all fields in default mode\r\n\t *\t@param: mode - true/false\r\n\t *\t@type: public\r\n\t */\r\n\tenablePartialDataSend: function (mode) {\r\n\t\tthis._changed = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: set if rows should be send to server automatically\r\n\t *\t@param: mode - \"row\" - based on row selection changed, \"cell\" - based on cell editing finished, \"off\" - manual data sending\r\n\t *\t@type: public\r\n\t */\r\n\tsetUpdateMode: function (mode, dnd) {\r\n\t\tthis.autoUpdate = (mode == \"cell\");\r\n\t\tthis.updateMode = mode;\r\n\t\tthis.dnd = dnd;\r\n\t},\r\n\tignore: function (code, master) {\r\n\t\tthis._silent_mode = true;\r\n\t\tcode.call(master || window);\r\n\t\tthis._silent_mode = false;\r\n\t},\r\n\t/**\r\n\t *\t@desc: mark row as updated/normal. check mandatory fields,initiate autoupdate (if turned on)\r\n\t *\t@param: rowId - id of row to set update-status for\r\n\t *\t@param: state - true for \"updated\", false for \"not updated\"\r\n\t *\t@param: mode - update mode name\r\n\t *\t@type: public\r\n\t */\r\n\tsetUpdated: function (rowId, state, mode) {\r\n\t\tif (this._silent_mode) return;\r\n\t\tvar ind = this.findRow(rowId);\r\n\r\n\t\tmode = mode || \"updated\";\r\n\t\tvar existing = this.$scheduler.getUserData(rowId, this.action_param);\r\n\t\tif (existing && mode == \"updated\") mode = existing;\r\n\t\tif (state) {\r\n\t\t\tthis.set_invalid(rowId, false); //clear previous error flag\r\n\t\t\tthis.updatedRows[ind] = rowId;\r\n\t\t\tthis.$scheduler.setUserData(rowId, this.action_param, mode);\r\n\t\t\tif (this._in_progress[rowId])\r\n\t\t\t\tthis._in_progress[rowId] = \"wait\";\r\n\t\t} else {\r\n\t\t\tif (!this.is_invalid(rowId)) {\r\n\t\t\t\tthis.updatedRows.splice(ind, 1);\r\n\t\t\t\tthis.$scheduler.setUserData(rowId, this.action_param, \"\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.markRow(rowId, state, mode);\r\n\t\tif (state && this.autoUpdate) this.sendData(rowId);\r\n\t},\r\n\r\n\tmarkRow: function (id, state, mode) {\r\n\t\tvar str = \"\";\r\n\t\tvar invalid = this.is_invalid(id);\r\n\t\tif (invalid) {\r\n\t\t\tstr = this.styles[invalid];\r\n\t\t\tstate = true;\r\n\t\t}\r\n\t\tif (this.callEvent(\"onRowMark\", [id, state, mode, invalid])) {\r\n\t\t\t//default logic\r\n\t\t\tstr = this.styles[state ? mode : \"clear\"] + str;\r\n\r\n\t\t\tthis.$scheduler[this._methods[0]](id, str);\r\n\r\n\t\t\tif (invalid && invalid.details) {\r\n\t\t\t\tstr += this.styles[invalid + \"_cell\"];\r\n\t\t\t\tfor (var i = 0; i < invalid.details.length; i++)\r\n\t\t\t\t\tif (invalid.details[i])\r\n\t\t\t\t\t\tthis.$scheduler[this._methods[1]](id, i, str);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tgetActionByState: function(state) {\r\n\t\tif (state === \"inserted\") {\r\n\t\t\treturn \"create\";\r\n\t\t}\r\n\t\tif (state === \"updated\") {\r\n\t\t\treturn \"update\";\r\n\t\t}\r\n\t\tif (state === \"deleted\") {\r\n\t\t\treturn \"delete\";\r\n\t\t}\r\n\t\treturn \"update\";\r\n\t},\r\n\r\n\tgetState: function (id) {\r\n\t\treturn this.$scheduler.getUserData(id, this.action_param);\r\n\t},\r\n\tis_invalid: function (id) {\r\n\t\treturn this._invalid[id];\r\n\t},\r\n\tset_invalid: function (id, mode, details) {\r\n\t\tif (details) mode = {\r\n\t\t\tvalue: mode, details: details, toString: function () {\r\n\t\t\t\treturn this.value.toString();\r\n\t\t\t}\r\n\t\t};\r\n\t\tthis._invalid[id] = mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: check mandatory fields and varify values of cells, initiate update (if specified)\r\n\t *\t@param: rowId - id of row to set update-status for\r\n\t *\t@type: public\r\n\t */\r\n\tcheckBeforeUpdate: function (rowId) {\r\n\t\treturn true;\r\n\t},\r\n\t/**\r\n\t *\t@desc: send row(s) values to server\r\n\t *\t@param: rowId - id of row which data to send. If not specified, then all \"updated\" rows will be send\r\n\t *\t@type: public\r\n\t */\r\n\tsendData: function (rowId) {\r\n\t\tif (this.$scheduler.editStop) this.$scheduler.editStop();\r\n\r\n\t\tif (typeof rowId == \"undefined\" || this._tSend) return this.sendAllData();\r\n\t\tif (this._in_progress[rowId]) return false;\r\n\r\n\t\tthis.messages = [];\r\n\t\tif (!this.checkBeforeUpdate(rowId) && this.callEvent(\"onValidationError\", [rowId, this.messages])) return false;\r\n\t\tthis._beforeSendData(this._getRowData(rowId), rowId);\r\n\t},\r\n\t_beforeSendData: function (data, rowId) {\r\n\t\tif (!this.callEvent(\"onBeforeUpdate\", [rowId, this.getState(rowId), data])) return false;\r\n\t\tthis._sendData(data, rowId);\r\n\t},\r\n\tserialize: function (data, id) {\r\n\t\tif (this._serializeAsJson) {\r\n\t\t\treturn this._serializeAsJSON(data);\r\n\t\t}\r\n\r\n\t\tif (typeof data == \"string\")\r\n\t\t\treturn data;\r\n\t\tif (typeof id != \"undefined\")\r\n\t\t\treturn this.serialize_one(data, \"\");\r\n\t\telse {\r\n\t\t\tvar stack = [];\r\n\t\t\tvar keys = [];\r\n\t\t\tfor (var key in data)\r\n\t\t\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\t\t\tstack.push(this.serialize_one(data[key], key + this.post_delim));\r\n\t\t\t\t\tkeys.push(key);\r\n\t\t\t\t}\r\n\t\t\tstack.push(\"ids=\" + this.escape(keys.join(\",\")));\r\n\t\t\tif (this.$scheduler.security_key)\r\n\t\t\t\tstack.push(\"dhx_security=\" + (this.$scheduler.security_key));\r\n\t\t\treturn stack.join(\"&\");\r\n\t\t}\r\n\t},\r\n\tserialize_one: function (data, pref) {\r\n\t\tif (typeof data == \"string\")\r\n\t\t\treturn data;\r\n\t\tvar stack = [];\r\n\t\tvar serialized = \"\";\r\n\t\tfor (var key in data)\r\n\t\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\t\tif ((key == \"id\" || key == this.action_param) && this._tMode == \"REST\") continue;\r\n\t\t\t\tif (typeof data[key] === \"string\" || typeof data[key] === \"number\") {\r\n\t\t\t\t\tserialized = data[key];\r\n\t\t\t\t} else {\r\n\t\t\t\t\tserialized = JSON.stringify(data[key]);\r\n\t\t\t\t}\r\n\t\t\t\tstack.push(this.escape((pref || \"\") + key) + \"=\" + this.escape(serialized));\r\n\t\t\t}\r\n\t\treturn stack.join(\"&\");\r\n\t},\r\n\t_applyPayload: function (url) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tif (this._payload)\r\n\t\t\tfor (var key in this._payload)\r\n\t\t\t\turl = url + ajax.urlSeparator(url) + this.escape(key) + \"=\" + this.escape(this._payload[key]);\r\n\t\treturn url;\r\n\t},\r\n\t_sendData: function (dataToSend, rowId) {\r\n\t\tif (!dataToSend) {\r\n\t\t\treturn; // nothing to send\r\n\t\t}\r\n\t\tif (!this.callEvent(\"onBeforeDataSending\", rowId ? [rowId, this.getState(rowId), dataToSend] : [null, null, dataToSend])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (rowId) {\r\n\t\t\tthis._in_progress[rowId] = (new Date()).valueOf();\r\n\t\t}\r\n\r\n\t\tvar self = this;\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\r\n\t\tif (this._tMode === \"CUSTOM\") {\r\n\t\t\tvar state = this.getState(rowId);\r\n\t\t\tvar action = this.getActionByState(state);\r\n\t\t\tvar _onResolvedCreateUpdate = function (tag) {\r\n\t\t\t\tvar resultState = state;\r\n\t\t\t\tif(tag && tag.responseText && tag.setRequestHeader){\r\n\t\t\t\t\tif(tag.status !== 200){\r\n\t\t\t\t\t\tresultState = \"error\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\ttag = JSON.parse(tag.responseText);\r\n\t\t\t\t\t} catch (e){}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tresultState = resultState || \"updated\";\r\n\t\t\t\tvar sid = rowId;\r\n\t\t\t\tvar tid = rowId;\r\n\r\n\t\t\t\tif (tag) {\r\n\t\t\t\t\tresultState = tag.action || resultState;\r\n\t\t\t\t\tsid = tag.sid || sid;\r\n\t\t\t\t\ttid = tag.id || tag.tid || tid;\r\n\t\t\t\t}\r\n\t\t\t\tself.afterUpdateCallback(sid, tid, resultState, tag);\r\n\t\t\t};\r\n\r\n\t\t\tconst routerMode = \"event\";\r\n\t\t\tvar actionPromise;\r\n\t\t\tif (this._router instanceof Function) {\r\n\t\t\t\tactionPromise = this._router(routerMode, action, dataToSend, rowId);\r\n\t\t\t} else {\r\n\t\t\t\tswitch (state) {\r\n\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].create(dataToSend);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].delete(rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].update(dataToSend, rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(actionPromise){\r\n\t\t\t\t// neither promise nor {tid: newId} response object\r\n\t\t\t\tif(!actionPromise.then &&\r\n\t\t\t\t\t(actionPromise.id === undefined && actionPromise.tid === undefined && actionPromise.action === undefined)){\r\n\t\t\t\t\tthrow new Error(\"Incorrect router return value. A Promise or a response object is expected\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(actionPromise.then){\r\n\t\t\t\t\tactionPromise.then(_onResolvedCreateUpdate).catch(function(error) {\r\n\t\t\t\t\t\tif(error && error.action){\r\n\t\t\t\t\t\t\t_onResolvedCreateUpdate(error);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t_onResolvedCreateUpdate({ action: \"error\", value: error});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// custom method may return a response object in case of sync action\r\n\t\t\t\t\t_onResolvedCreateUpdate(actionPromise);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t_onResolvedCreateUpdate(null);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar queryParams = {\r\n\t\t\tcallback: function(xml) {\r\n\t\t\t\tvar ids = [];\r\n\r\n\t\t\t\tif (rowId) {\r\n\t\t\t\t\tids.push(rowId);\r\n\t\t\t\t} else if (dataToSend) {\r\n\t\t\t\t\tfor (var key in dataToSend) {\r\n\t\t\t\t\t\tids.push(key);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.afterUpdate(self, xml, ids);\r\n\t\t\t},\r\n\t\t\theaders: self._headers\r\n\t\t};\r\n\r\n\t\tvar urlParams = this.serverProcessor + (this._user ? (ajax.urlSeparator(this.serverProcessor) + [\"dhx_user=\" + this._user, \"dhx_version=\" + this.$scheduler.getUserData(0, \"version\")].join(\"&\")) : \"\");\r\n\t\tvar url = this._applyPayload(urlParams);\r\n\t\tvar data;\r\n\r\n\t\tswitch (this._tMode) {\r\n\t\t\tcase \"GET\":\r\n\t\t\t\tdata = this._cleanupArgumentsBeforeSend(dataToSend);\r\n\t\t\t\tqueryParams.url = url + ajax.urlSeparator(url) + this.serialize(data, rowId);\r\n\t\t\t\tqueryParams.method = \"GET\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"POST\":\r\n\t\t\t\tdata = this._cleanupArgumentsBeforeSend(dataToSend);\r\n\t\t\t\tqueryParams.url = url;\r\n\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\tqueryParams.data = this.serialize(data, rowId);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"JSON\":\r\n\t\t\t\tdata = {};\r\n\t\t\t\tvar preprocessedData = this._cleanupItemBeforeSend(dataToSend);\r\n\t\t\t\tfor (var key in preprocessedData) {\r\n\t\t\t\t\tif (key === this.action_param || key === \"id\" || key === \"gr_id\") {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdata[key] = preprocessedData[key];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tqueryParams.url = url;\r\n\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\tqueryParams.data = JSON.stringify({\r\n\t\t\t\t\tid: rowId,\r\n\t\t\t\t\taction: dataToSend[this.action_param],\r\n\t\t\t\t\tdata: data\r\n\t\t\t\t});\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"REST\":\r\n\t\t\tcase \"REST-JSON\":\r\n\t\t\t\turl = urlParams.replace(/(&|\\?)editing=true/, \"\");\r\n\t\t\t\tdata = \"\";\r\n\r\n\t\t\t\tswitch (this.getState(rowId)) {\r\n\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\t\t\tqueryParams.data = this.serialize(dataToSend, rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\tqueryParams.method = \"DELETE\";\r\n\t\t\t\t\t\turl = url + (url.slice(-1) === \"/\" ? \"\" : \"/\") + rowId;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tqueryParams.method = \"PUT\";\r\n\t\t\t\t\t\tqueryParams.data = this.serialize(dataToSend, rowId);\r\n\t\t\t\t\t\turl = url + (url.slice(-1) === \"/\" ? \"\" : \"/\") + rowId;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tqueryParams.url = this._applyPayload(url);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tthis._waitMode++;\r\n\t\treturn ajax.query(queryParams);\r\n\t},\r\n\tsendAllData: function () {\r\n\t\tif (!this.updatedRows.length || this.updateMode === \"off\") { // FIXME: need to leave checking 'this.updateMode === \"off\"'?\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.messages = [];\r\n\t\tvar valid = true;\r\n\r\n\t\tthis._forEachUpdatedRow(function(rowId) {\r\n\t\t\tvalid = valid && this.checkBeforeUpdate(rowId);\r\n\t\t});\r\n\r\n\t\tif (!valid && !this.callEvent(\"onValidationError\", [\"\", this.messages])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (this._tSend) {\r\n\t\t\tthis._sendData(this._getAllData());\r\n\t\t} else {\r\n\t\t\tthis._forEachUpdatedRow(function(rowId) {\r\n\t\t\t\tif (!this._in_progress[rowId]) {\r\n\t\t\t\t\tif (this.is_invalid(rowId)) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis._beforeSendData(this._getRowData(rowId), rowId);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\r\n\t_getAllData: function (rowId) {\r\n\t\tvar out = {};\r\n\t\tvar has_one = false;\r\n\t\tthis._forEachUpdatedRow(function(id) {\r\n\t\t\tif (this._in_progress[id] || this.is_invalid(id)){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar row = this._getRowData(id);\r\n\t\t\tif (!this.callEvent(\"onBeforeUpdate\", [id, this.getState(id), row])) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tout[id] = row;\r\n\t\t\thas_one = true;\r\n\t\t\tthis._in_progress[id] = (new Date()).valueOf();\r\n\t\t});\r\n\t\treturn has_one ? out : null;\r\n\t},\r\n\r\n\tfindRow: function (pattern) {\r\n\t\tvar i = 0;\r\n\t\tfor (i = 0; i < this.updatedRows.length; i++)\r\n\t\t\tif (pattern == this.updatedRows[i]) break;\r\n\t\treturn i;\r\n\t},\r\n\r\n\t/**\r\n\t *\t@desc: define custom actions\r\n\t *\t@param: name - name of action, same as value of action attribute\r\n\t *\t@param: handler - custom function, which receives a XMl response content for action\r\n\t *\t@type: private\r\n\t */\r\n\tdefineAction: function (name, handler) {\r\n\t\tif (!this._uActions) this._uActions = {};\r\n\t\tthis._uActions[name] = handler;\r\n\t},\r\n\r\n\t/**\r\n\t *\t @desc: used in combination with setOnBeforeUpdateHandler to create custom client-server transport system\r\n\t *\t @param: sid - id of item before update\r\n\t *\t @param: tid - id of item after up0ate\r\n\t *\t @param: action - action name\r\n\t *\t @type: public\r\n\t *\t @topic: 0\r\n\t */\r\n\tafterUpdateCallback: function (sid, tid, action, btag) {\r\n\t\tif(!this.$scheduler){\r\n\t\t\t// destructor has been called before the callback\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar marker = sid;\r\n\t\tvar correct = (action !== \"error\" && action !== \"invalid\");\r\n\t\tif (!correct) {\r\n\t\t\tthis.set_invalid(sid, action);\r\n\t\t}\r\n\t\tif ((this._uActions) && (this._uActions[action]) && (!this._uActions[action](btag))) {\r\n\t\t\treturn (delete this._in_progress[marker]);\r\n\t\t}\r\n\r\n\t\tif (this._in_progress[marker] !== \"wait\") {\r\n\t\t\tthis.setUpdated(sid, false);\r\n\t\t}\r\n\r\n\t\tvar originalSid = sid;\r\n\r\n\t\tswitch (action) {\r\n\t\t\tcase \"inserted\":\r\n\t\t\tcase \"insert\":\r\n\t\t\t\tif (tid != sid) {\r\n\t\t\t\t\tthis.setUpdated(sid, false);\r\n\t\t\t\t\tthis.$scheduler[this._methods[2]](sid, tid);\r\n\t\t\t\t\tsid = tid;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"delete\":\r\n\t\t\tcase \"deleted\":\r\n\t\t\t\tthis.$scheduler.setUserData(sid, this.action_param, \"true_deleted\");\r\n\t\t\t\tthis.$scheduler[this._methods[3]](sid, tid);\r\n\t\t\t\tdelete this._in_progress[marker];\r\n\t\t\t\treturn this.callEvent(\"onAfterUpdate\", [sid, action, tid, btag]);\r\n\t\t}\r\n\r\n\t\tif (this._in_progress[marker] !== \"wait\") {\r\n\t\t\tif (correct) {\r\n\t\t\t\tthis.$scheduler.setUserData(sid, this.action_param, \"\");\r\n\t\t\t}\r\n\t\t\tdelete this._in_progress[marker];\r\n\t\t} else {\r\n\t\t\tdelete this._in_progress[marker];\r\n\t\t\tthis.setUpdated(tid, true, this.$scheduler.getUserData(sid, this.action_param));\r\n\t\t}\r\n\r\n\t\tthis.callEvent(\"onAfterUpdate\", [originalSid, action, tid, btag]);\r\n\t},\r\n\r\n\t_errorResponse: function (xml, id){\r\n\t\tif(this.$scheduler && this.$scheduler.callEvent){\r\n\t\t\tthis.$scheduler.callEvent(\"onSaveError\", [id, xml.xmlDoc]);\r\n\t\t}\r\n\t\treturn this.cleanUpdate(id);\r\n\t},\r\n\r\n\t_setDefaultTransactionMode: function () {\r\n\t\tif (this.serverProcessor) {\r\n\t\t\tthis.setTransactionMode(\"POST\", true);\r\n\t\t\tthis.serverProcessor += (this.serverProcessor.indexOf(\"?\") !== -1 ? \"&\" : \"?\") + \"editing=true\";\r\n\t\t\tthis._serverProcessor = this.serverProcessor;\r\n\t\t}\r\n\t},\r\n\t\r\n\t/**\r\n\t *\t@desc: response from server\r\n\t *\t@param: xml - XMLLoader object with response XML\r\n\t *\t@type: private\r\n\t */\r\n\tafterUpdate: function (that, xml, id) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\r\n\t\tif (xml.xmlDoc.status !== 200){\r\n\t\t\tthis._errorResponse(xml, id);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// try to use json first\r\n\t\tvar tag;\r\n\t\ttry {\r\n\t\t\ttag = JSON.parse(xml.xmlDoc.responseText);\r\n\t\t} catch (e) {\r\n\t\t\t// empty response also can be processed by json handler\r\n\t\t\tif (!xml.xmlDoc.responseText.length) {\r\n\t\t\t\ttag = {};\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (tag) {\r\n\t\t\tvar action = tag.action || this.getState(id) || \"updated\";\r\n\t\t\tvar sid = tag.sid || id[0];\r\n\t\t\tvar tid = tag.tid || id[0];\r\n\t\t\tthat.afterUpdateCallback(sid, tid, action, tag);\r\n\t\t\tthat.finalizeUpdate();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// xml response\r\n\t\tvar top = ajax.xmltop(\"data\", xml.xmlDoc); // fix incorrect content type in IE\r\n\t\tif (!top) {\r\n\t\t\treturn this._errorResponse(xml, id);\r\n\t\t}\r\n\t\tvar atag = ajax.xpath(\"//data/action\", top);\r\n\t\tif (!atag.length) {\r\n\t\t\treturn this._errorResponse(xml, id);\r\n\t\t}\r\n\r\n\t\tfor (var i = 0; i < atag.length; i++) {\r\n\t\t\tvar btag = atag[i];\r\n\t\t\tvar action = btag.getAttribute(\"type\");\r\n\t\t\tvar sid = btag.getAttribute(\"sid\");\r\n\t\t\tvar tid = btag.getAttribute(\"tid\");\r\n\r\n\t\t\tthat.afterUpdateCallback(sid, tid, action, btag);\r\n\t\t}\r\n\t\tthat.finalizeUpdate();\r\n\t},\r\n\tcleanUpdate: function (id) {\r\n\t\tif (id)\r\n\t\t\tfor (var i = 0; i < id.length; i++)\r\n\t\t\t\tdelete this._in_progress[id[i]];\r\n\t},\r\n\tfinalizeUpdate: function () {\r\n\t\tif (this._waitMode) this._waitMode--;\r\n\r\n\t\tthis.callEvent(\"onAfterUpdateFinish\", []);\r\n\t\tif (!this.updatedRows.length)\r\n\t\t\tthis.callEvent(\"onFullSync\", []);\r\n\t},\r\n\r\n\t/**\r\n\t *\t@desc: initializes data-processor\r\n\t *\t@param: scheduler - dhtmlxScheduler object to attach this data-processor to\r\n\t *\t@type: public\r\n\t */\r\n\tinit: function (scheduler) {\r\n\t\tif (this._initialized) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.$scheduler = scheduler;\r\n\t\tif (this.$scheduler._dp_init) {\r\n\t\t\tthis.$scheduler._dp_init(this);\r\n\t\t}\r\n\r\n\t\tthis._setDefaultTransactionMode();\r\n\r\n\t\tthis._methods=this._methods||[\"_set_event_text_style\",\"\",\"_dp_change_event_id\",\"_dp_hook_delete\"];\r\n\t\textendScheduler(this.$scheduler, this);\r\n\t\tvar dataProcessorEvents = new DataProcessorEvents(this.$scheduler, this);\r\n\t\tdataProcessorEvents.attach();\r\n\t\tthis.attachEvent(\"onDestroy\", function() {\r\n\t\t\tdelete this._getRowData;\r\n\r\n\t\t\tdelete this.$scheduler._dp;\r\n\t\t\tdelete this.$scheduler._dataprocessor;\r\n\t\t\tdelete this.$scheduler._set_event_text_style;\r\n\t\t\tdelete this.$scheduler._dp_change_event_id;\r\n\t\t\tdelete this.$scheduler._dp_hook_delete;\r\n\t\t\tdelete this.$scheduler;\r\n\t\t\tdataProcessorEvents.detach();\r\n\t\t});\r\n\t\tthis.$scheduler.callEvent(\"onDataProcessorReady\", [this]);\r\n\t\tthis._initialized = true;\r\n\r\n\t\tscheduler._dataprocessor=this;\r\n\t},\r\n\r\n\tsetOnAfterUpdate: function (ev) {\r\n\t\tthis.attachEvent(\"onAfterUpdate\", ev);\r\n\t},\r\n\tsetOnBeforeUpdateHandler: function (func) {\r\n\t\tthis.attachEvent(\"onBeforeDataSending\", func);\r\n\t},\r\n\r\n\t/* starts autoupdate mode\r\n\t\t@param interval time interval for sending update requests\r\n\t*/\r\n\tsetAutoUpdate: function (interval, user) {\r\n\t\tinterval = interval || 2000;\r\n\r\n\t\tthis._user = user || (new Date()).valueOf();\r\n\t\tthis._need_update = false;\r\n\t\t//this._loader = null;\r\n\t\tthis._update_busy = false;\r\n\r\n\t\tthis.attachEvent(\"onAfterUpdate\", function (sid, action, tid, xml_node) {\r\n\t\t\tthis.afterAutoUpdate(sid, action, tid, xml_node);\r\n\t\t});\r\n\t\tthis.attachEvent(\"onFullSync\", function () {\r\n\t\t\tthis.fullSync();\r\n\t\t});\r\n\r\n\t\tvar self = this;\r\n\t\tlet intervalId = global.setInterval(function () {\r\n\t\t\tself.loadUpdate();\r\n\t\t}, interval);\r\n\t\tthis.attachEvent(\"onDestroy\", function(){\r\n\t\t\tclearInterval(intervalId);\r\n\t\t});\r\n\t},\r\n\r\n\t/* process updating request answer\r\n\t\tif status == collision version is deprecated\r\n\t\tset flag for autoupdating immediately\r\n\t*/\r\n\tafterAutoUpdate: function (sid, action, tid, xml_node) {\r\n\t\tif (action == 'collision') {\r\n\t\t\tthis._need_update = true;\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t},\r\n\r\n\t/* callback function for onFillSync event\r\n\t\tcall update function if it's need\r\n\t*/\r\n\tfullSync: function () {\r\n\t\tif (this._need_update) {\r\n\t\t\tthis._need_update = false;\r\n\t\t\tthis.loadUpdate();\r\n\t\t}\r\n\t\treturn true;\r\n\t},\r\n\r\n\t/* sends query to the server and call callback function\r\n\t*/\r\n\tgetUpdates: function (url, callback) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tif (this._update_busy)\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t\tthis._update_busy = true;\r\n\r\n\t\tajax.get(url, callback);\r\n\t},\r\n\r\n\t/* returns xml node value\r\n\t\t@param node\r\n\t\t\txml node\r\n\t*/\r\n\t_getXmlNodeValue: function(node) {\r\n\t\tif (node.firstChild) {\r\n\t\t\treturn node.firstChild.nodeValue;\r\n\t\t}\r\n\t\treturn \"\";\r\n\t},\r\n\r\n\t/* loads updates and processes them\r\n\t*/\r\n\tloadUpdate: function () {\r\n\t\tvar self = this;\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tvar version = this.$scheduler.getUserData(0, \"version\");\r\n\t\tvar url = this.serverProcessor + ajax.urlSeparator(this.serverProcessor) + [\"dhx_user=\" + this._user, \"dhx_version=\" + version].join(\"&\");\r\n\t\turl = url.replace(\"editing=true&\", \"\");\r\n\t\tthis.getUpdates(url, function (xml) {\r\n\t\t\tvar vers = ajax.xpath(\"//userdata\", xml);\r\n\t\t\tself.$scheduler.setUserData(0, \"version\", self._getXmlNodeValue(vers[0]));\r\n\r\n\t\t\tvar updates = ajax.xpath(\"//update\", xml);\r\n\t\t\tif (updates.length) {\r\n\t\t\t\tself._silent_mode = true;\r\n\r\n\t\t\t\tfor (var i = 0; i < updates.length; i++) {\r\n\t\t\t\t\tvar status = updates[i].getAttribute(\"status\");\r\n\t\t\t\t\tvar id = updates[i].getAttribute(\"id\");\r\n\t\t\t\t\tvar parent = updates[i].getAttribute(\"parent\");\r\n\t\t\t\t\tswitch (status) {\r\n\t\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"insertCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"updated\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"updateCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"deleteCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tself._silent_mode = false;\r\n\t\t\t}\r\n\t\t\tself._update_busy = false;\r\n\t\t\tself = null;\r\n\t\t});\r\n\t},\r\n\r\n\tdestructor: function() {\r\n\t\tthis.callEvent(\"onDestroy\", []);\r\n\t\tthis.detachAllEvents();\r\n\r\n\t\tthis.updatedRows = [];\r\n\t\tthis._in_progress = {};\r\n\t\tthis._invalid = {};\r\n\t\tthis._headers = null;\r\n\t\tthis._payload = null;\r\n\t\tdelete this._initialized;\r\n\t},\r\n\r\n\turl: function(url) {\r\n\t\tthis.serverProcessor = this._serverProcessor = url;\r\n\t},\r\n\r\n\t_serializeAsJSON: function(data) {\r\n\t\tif (typeof data === \"string\") {\r\n\t\t\treturn data;\r\n\t\t}\r\n\r\n\t\tvar copy = this.$scheduler.utils.copy(data);\r\n\t\tif (this._tMode === \"REST-JSON\") {\r\n\t\t\tdelete copy.id;\r\n\t\t\tdelete copy[this.action_param];\r\n\t\t}\r\n\r\n\t\treturn JSON.stringify(copy);\r\n\t},\r\n\r\n\t// GET/POST/JSON modes of the dataProcessor didn't send the whole data items in 'delete' requests\r\n\t// clear extra info from the data in order not to change the request format\r\n\t_cleanupArgumentsBeforeSend: function(dataToSend) {\r\n\t\tvar processedData;\r\n\t\tif(dataToSend[this.action_param] === undefined){// hash of updated items, and not an individual item\r\n\t\t\tprocessedData = {};\r\n\t\t\tfor(var i in dataToSend) {\r\n\t\t\t\tprocessedData[i] = this._cleanupArgumentsBeforeSend(dataToSend[i]);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tprocessedData = this._cleanupItemBeforeSend(dataToSend);\r\n\t\t}\r\n\t\treturn processedData;\r\n\t},\r\n\t_cleanupItemBeforeSend: function(updatedItem) {\r\n\t\tvar output = null;\r\n\t\tif(updatedItem){\r\n\t\t\tif(updatedItem[this.action_param] === \"deleted\"){\r\n\t\t\t\toutput = {};\r\n\t\t\t\toutput.id = updatedItem.id;\r\n\t\t\t\toutput[this.action_param] = updatedItem[this.action_param];\r\n\t\t\t}else{\r\n\t\t\t\toutput = updatedItem;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn output;\r\n\t},\r\n\r\n\t_forEachUpdatedRow: function(code) {\r\n\t\tvar updatedRows = this.updatedRows.slice();\r\n\t\tfor (var i = 0; i < updatedRows.length; i++) {\r\n\t\t\tvar rowId = updatedRows[i];\r\n\t\t\tif (this.$scheduler.getUserData(rowId, this.action_param)) {\r\n\t\t\t\tcode.call(this, rowId);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t_prepareDataItem: function(item) {\r\n\t\tvar processedItem = {};\r\n\t\tvar scheduler = this.$scheduler;\r\n\t\tvar copy = scheduler.utils.copy(item);\r\n\t\tfor (var i in copy) {\r\n\t\t\tif (i.indexOf(\"_\") === 0) {\r\n\t\t\t\tcontinue;\r\n\t\t\t} else if (copy[i]) {\r\n\t\t\t\tif(copy[i].getUTCFullYear){\r\n\t\t\t\t\tprocessedItem[i] = scheduler._helpers.formatDate(copy[i]);\r\n\t\t\t\t} else if(typeof copy[i] == \"object\") {\r\n\t\t\t\t\tprocessedItem[i] = this._prepareDataItem(copy[i]);\r\n\t\t\t\t} else if(copy[i] === null) {\r\n\t\t\t\t\tprocessedItem[i] = \"\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprocessedItem[i] = copy[i];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tprocessedItem[this.action_param] = scheduler.getUserData(item.id, this.action_param);\r\n\t\treturn processedItem;\r\n\t},\r\n\t_getRowData: function(id) {\r\n\t\tvar dataItem = this.$scheduler.getEvent(id);\r\n\t\tif (!dataItem) {\r\n\t\t\tdataItem = { id: id };\r\n\t\t}\r\n\t\treturn this._prepareDataItem(dataItem);\r\n\t}\r\n};\r\n\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler.createDataProcessor = function(config) {\r\n\tvar router;\r\n\tvar tMode;\r\n\tif (config instanceof Function) {\r\n\t\trouter = config;\r\n\t} else if (config.hasOwnProperty(\"router\")) {\r\n\t\trouter = config.router;\r\n\t} else if(config.hasOwnProperty(\"event\")){\r\n\t\trouter = config;\r\n\t}\r\n\r\n\tif (router) {\r\n\t\ttMode = \"CUSTOM\";\r\n\t} else {\r\n\t\ttMode = config.mode || \"REST-JSON\";\r\n\t}\r\n\r\n\tvar dp = new DataProcessor(config.url);\r\n\tdp.init(scheduler);\r\n\tdp.setTransactionMode({\r\n\t\tmode: tMode,\r\n\t\trouter: router\r\n\t}, config.batchUpdate); // FIXME: config.batchUpdate where it is explained?\r\n\treturn dp;\r\n};\r\n\r\nscheduler.DataProcessor = DataProcessor;\r\n\r\n}\r\n\r\n//var dataProcessor = global.dataProcessor = DataProcessor; // for old","import utils from \"./utils/utils\";\r\nimport domHelpers from \"./utils/dom_helpers\";\r\n\r\n\r\nexport default function(scheduler) {\r\n\r\n\tvar boxAttribute = \"data-dhxbox\";\r\n\r\n\tvar _dhx_msg_cfg = null;\r\n\r\n\tfunction callback(config, result) {\r\n\t\tvar usercall = config.callback;\r\n\t\tmodalBox.hide(config.box);\r\n\r\n\t\t_dhx_msg_cfg = config.box = null;\r\n\tif (usercall)\r\n\t\t\tusercall(result);\r\n\t}\r\n\r\n\tfunction modal_key(event) {\r\n\t\tif (_dhx_msg_cfg) {\r\n\r\n\t\t\tvar code = event.which || event.keyCode;\r\n\t\t\tvar preventDefault = false;\r\n\r\n\t\t\tif (messageBox.keyboard) {\r\n\t\t\t\tif (code == 13 || code == 32) {\r\n\t\t\t\t\t// default behavior is to confirm/submit popup on space/enter\r\n\t\t\t\t\t// if browser focus is set on button element - do button click instead of default behavior\r\n\t\t\t\t\tvar target = event.target || event.srcElement;\r\n\t\t\t\t\tif (domHelpers.getClassName(target).indexOf(\"scheduler_popup_button\") > -1 && target.click) {\r\n\t\t\t\t\t\ttarget.click();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcallback(_dhx_msg_cfg, true);\r\n\t\t\t\t\t\tpreventDefault = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (code == 27) {\r\n\t\t\t\t\tcallback(_dhx_msg_cfg, false);\r\n\t\t\t\t\tpreventDefault = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (preventDefault) {\r\n\t\t\t\tif (event.preventDefault){\r\n\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t}\r\n\t\t\t\treturn !(event.cancelBubble = true);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler.event(document, \"keydown\", modal_key, true);\r\n\r\n\tfunction modality(mode) {\r\n\t\tif (!modality.cover) {\r\n\t\t\tmodality.cover = document.createElement(\"div\");\r\n\t\t\t//necessary for IE only\r\n\t\t\tscheduler.event(modality.cover, \"keydown\", modal_key);\r\n\t\t\tmodality.cover.className = \"dhx_modal_cover\";\r\n\t\t\tdocument.body.appendChild(modality.cover);\r\n\t\t}\r\n\r\n\t\tmodality.cover.style.display = mode ? \"inline-block\" : \"none\";\r\n\t}\r\n\r\n\tfunction button(text, classValue, result) {\r\n\t\tvar buttonAriaAttrs = scheduler._waiAria.messageButtonAttrString(text);\r\n\t\tvar name = (classValue || \"\").toLowerCase().replace(/ /g, \"_\");\r\n\t\tvar buttonCss = `scheduler_${name}_button dhtmlx_${name}_button`; \r\n\t\treturn `
${text}
`;\r\n\t}\r\n\r\n\tfunction info(text) {\r\n\t\tif (!messageBox.area) {\r\n\t\t\tmessageBox.area = document.createElement(\"div\");\r\n\t\t\tmessageBox.area.className = \"scheduler_message_area dhtmlx_message_area\";\r\n\t\t\tmessageBox.area.style[messageBox.position] = \"5px\";\r\n\t\t\tdocument.body.appendChild(messageBox.area);\r\n\t\t}\r\n\r\n\t\tmessageBox.hide(text.id);\r\n\t\tvar message = document.createElement(\"div\");\r\n\t\tmessage.innerHTML = \"
\" + text.text + \"
\";\r\n\t\tmessage.className = \"scheduler-info dhtmlx-info scheduler-\" + text.type + \" dhtmlx-\" + text.type;\r\n\t\tscheduler.event(message, \"click\",function () {\r\n\t\t\tmessageBox.hide(text.id);\r\n\t\t\ttext = null;\r\n\t\t});\r\n\r\n\t\tscheduler._waiAria.messageInfoAttr(message);\r\n\r\n\t\tif (messageBox.position == \"bottom\" && messageBox.area.firstChild)\r\n\t\t\tmessageBox.area.insertBefore(message, messageBox.area.firstChild);\r\n\t\telse\r\n\t\t\tmessageBox.area.appendChild(message);\r\n\r\n\t\tif (text.expire > 0)\r\n\t\t\tmessageBox.timers[text.id] = window.setTimeout(function () {\r\n\t\t\t\t// GS-1213: We need that when Scheduler is destroyed\r\n\t\t\t\tif (messageBox) messageBox.hide(text.id);\r\n\t\t\t}, text.expire);\r\n\r\n\t\tmessageBox.pull[text.id] = message;\r\n\t\tmessage = null;\r\n\r\n\t\treturn text.id;\r\n\t}\r\n\r\n\tfunction getFirstDefined() {\r\n\t\tvar values = [].slice.apply(arguments, [0]);\r\n\r\n\t\tfor (var i = 0; i < values.length; i++) {\r\n\t\t\tif (values[i]) {\r\n\t\t\t\treturn values[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tfunction _boxStructure(config, ok, cancel) {\r\n\t\tvar box = document.createElement(\"div\");\r\n\r\n\t\tvar contentId = utils.uid();\r\n\t\tscheduler._waiAria.messageModalAttr(box, contentId);\r\n\r\n\r\n\t\tbox.className = \" scheduler_modal_box dhtmlx_modal_box scheduler-\" + config.type + \" dhtmlx-\" + config.type;\r\n\t\tbox.setAttribute(boxAttribute, 1);\r\n\r\n\t\tvar inner = '';\r\n\r\n\t\tif (config.width)\r\n\t\t\tbox.style.width = config.width;\r\n\t\tif (config.height)\r\n\t\t\tbox.style.height = config.height;\r\n\t\tif (config.title)\r\n\t\t\tinner += '
' + config.title + '
';\r\n\t\tinner += '
' + (config.content ? '' : config.text) + '
';\r\n\t\tif (ok)\r\n\t\t\tinner += button(getFirstDefined(config.ok, scheduler.locale.labels.message_ok, \"OK\"), \"ok\", true);\r\n\t\tif (cancel)\r\n\t\t\tinner += button(getFirstDefined(config.cancel, scheduler.locale.labels.message_cancel, \"Cancel\"), \"cancel\", false);\r\n\r\n\t\tif (config.buttons) {\r\n\t\t\tfor (var i = 0; i < config.buttons.length; i++) {\r\n\t\t\t\tvar btn = config.buttons[i];\r\n\t\t\t\tif (typeof btn == \"object\") {\r\n\t\t\t\t\t// Support { label:\"Save\", css:\"main_button\", value:\"save\" }\r\n\t\t\t\t\tvar label = btn.label;\r\n\t\t\t\t\tvar css = btn.css || (\"scheduler_\" + btn.label.toLowerCase() + \"_button dhtmlx_\" + btn.label.toLowerCase() + \"_button\");\r\n\t\t\t\t\tvar value = btn.value || i;\r\n\t\t\t\t\tinner += button(label, css, value);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tinner += button(btn, btn, i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tinner += '
';\r\n\t\tbox.innerHTML = inner;\r\n\r\n\t\tif (config.content) {\r\n\t\t\tvar node = config.content;\r\n\t\t\tif (typeof node == \"string\")\r\n\t\t\t\tnode = document.getElementById(node);\r\n\t\t\tif (node.style.display == 'none')\r\n\t\t\t\tnode.style.display = \"\";\r\n\t\t\tbox.childNodes[config.title ? 1 : 0].appendChild(node);\r\n\t\t}\r\n\r\n\t\tscheduler.event(box, \"click\", function (event) {\r\n\t\t\tvar source = event.target || event.srcElement;\r\n\t\t\tif (!source.className) source = source.parentNode;\r\n\t\t\tif (domHelpers.closest(source, \".scheduler_popup_button\")) {\r\n\t\t\t\tvar result = source.getAttribute(\"data-result\");\r\n\t\t\t\tresult = (result == \"true\") || (result == \"false\" ? false : result);\r\n\t\t\t\tcallback(config, result);\r\n\t\t\t}\r\n\t\t});\r\n\t\tconfig.box = box;\r\n\t\tif (ok || cancel)\r\n\t\t\t_dhx_msg_cfg = config;\r\n\r\n\t\treturn box;\r\n\t}\r\n\r\n\tfunction _createBox(config, ok, cancel) {\r\n\t\tvar box = config.tagName ? config : _boxStructure(config, ok, cancel);\r\n\r\n\t\tif (!config.hidden)\r\n\t\t\tmodality(true);\r\n\t\tdocument.body.appendChild(box);\r\n\t\tvar x = Math.abs(Math.floor(((window.innerWidth || document.documentElement.offsetWidth) - box.offsetWidth) / 2));\r\n\t\tvar y = Math.abs(Math.floor(((window.innerHeight || document.documentElement.offsetHeight) - box.offsetHeight) / 2));\r\n\t\tif (config.position == \"top\")\r\n\t\t\tbox.style.top = \"-3px\";\r\n\t\telse\r\n\t\t\tbox.style.top = y + 'px';\r\n\t\tbox.style.left = x + 'px';\r\n\t\t//necessary for IE only\r\n\t\tscheduler.event(box, \"keydown\", modal_key);\r\n\r\n\t\tmodalBox.focus(box);\r\n\r\n\t\tif (config.hidden)\r\n\t\t\tmodalBox.hide(box);\r\n\r\n\t\tscheduler.callEvent(\"onMessagePopup\", [box]);\r\n\t\treturn box;\r\n\t}\r\n\r\n\tfunction alertPopup(config) {\r\n\t\treturn _createBox(config, true, false);\r\n\t}\r\n\r\n\tfunction confirmPopup(config) {\r\n\t\treturn _createBox(config, true, true);\r\n\t}\r\n\r\n\tfunction boxPopup(config) {\r\n\t\treturn _createBox(config);\r\n\t}\r\n\r\n\tfunction box_params(text, type, callback) {\r\n\t\tif (typeof text != \"object\") {\r\n\t\t\tif (typeof type == \"function\") {\r\n\t\t\t\tcallback = type;\r\n\t\t\t\ttype = \"\";\r\n\t\t\t}\r\n\t\t\ttext = {text: text, type: type, callback: callback};\r\n\t\t}\r\n\t\treturn text;\r\n\t}\r\n\r\n\tfunction params(text, type, expire, id) {\r\n\t\tif (typeof text != \"object\")\r\n\t\t\ttext = {text: text, type: type, expire: expire, id: id};\r\n\t\ttext.id = text.id || utils.uid();\r\n\t\ttext.expire = text.expire || messageBox.expire;\r\n\t\treturn text;\r\n\t}\r\n\r\n\tvar alertBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"confirm\";\r\n\t\treturn alertPopup(text);\r\n\t};\r\n\tvar confirmBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"alert\";\r\n\t\treturn confirmPopup(text);\r\n\t};\r\n\tvar modalBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"alert\";\r\n\t\treturn boxPopup(text);\r\n\t};\r\n\tmodalBox.hide = function (node) {\r\n\t\twhile (node && node.getAttribute && !node.getAttribute(boxAttribute))\r\n\t\t\tnode = node.parentNode;\r\n\t\tif (node) {\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t\tmodality(false);\r\n\r\n\t\t\tscheduler.callEvent(\"onAfterMessagePopup\", [node]);\r\n\t\t}\r\n\t};\r\n\r\n\tmodalBox.focus = function (node) {\r\n\t\tsetTimeout(function () {\r\n\t\t\tvar focusable = domHelpers.getFocusableNodes(node);\r\n\t\t\tif (focusable.length) {\r\n\t\t\t\tif (focusable[0].focus) focusable[0].focus();\r\n\t\t\t}\r\n\t\t}, 1);\r\n\t};\r\n\r\n\tvar messageBox = function (text, type, expire, id) {\r\n\t\ttext = params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"info\";\r\n\r\n\t\tvar subtype = text.type.split(\"-\")[0];\r\n\t\tswitch (subtype) {\r\n\t\t\tcase \"alert\":\r\n\t\t\t\treturn alertPopup(text);\r\n\t\t\tcase \"confirm\":\r\n\t\t\t\treturn confirmPopup(text);\r\n\t\t\tcase \"modalbox\":\r\n\t\t\t\treturn boxPopup(text);\r\n\t\t\tdefault:\r\n\t\t\t\treturn info(text);\r\n\t\t}\r\n\t};\r\n\r\n\tmessageBox.seed = (new Date()).valueOf();\r\n\tmessageBox.uid = utils.uid;\r\n\tmessageBox.expire = 4000;\r\n\tmessageBox.keyboard = true;\r\n\tmessageBox.position = \"top\";\r\n\tmessageBox.pull = {};\r\n\tmessageBox.timers = {};\r\n\r\n\tmessageBox.hideAll = function () {\r\n\t\tfor (var key in messageBox.pull)\r\n\t\t\tmessageBox.hide(key);\r\n\t};\r\n\tmessageBox.hide = function (id) {\r\n\t\tvar obj = messageBox.pull[id];\r\n\t\tif (obj && obj.parentNode) {\r\n\t\t\twindow.setTimeout(function () {\r\n\t\t\t\tobj.parentNode.removeChild(obj);\r\n\t\t\t\tobj = null;\r\n\t\t\t}, 2000);\r\n\t\t\tobj.className += \" hidden\";\r\n\r\n\t\t\tif (messageBox.timers[id])\r\n\t\t\t\twindow.clearTimeout(messageBox.timers[id]);\r\n\t\t\tdelete messageBox.pull[id];\r\n\t\t}\r\n\t};\r\n\r\n\tvar popups = [];\r\n\tscheduler.attachEvent(\"onMessagePopup\", function(box){\r\n\t\tpopups.push(box);\r\n\t});\r\n\tscheduler.attachEvent(\"onAfterMessagePopup\", function(box){\r\n\t\tfor(var i = 0; i < popups.length; i++){\r\n\t\t\tif(popups[i] === box){\r\n\t\t\t\tpopups.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tif(modality.cover && modality.cover.parentNode){\r\n\t\t\tmodality.cover.parentNode.removeChild(modality.cover);\r\n\t\t}\r\n\r\n\t\tfor(var i = 0; i < popups.length; i++){\r\n\t\t\tif(popups[i].parentNode){\r\n\t\t\t\tpopups[i].parentNode.removeChild(popups[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\tpopups = null;\r\n\r\n\t\tif(messageBox.area && messageBox.area.parentNode){\r\n\t\t\tmessageBox.area.parentNode.removeChild(messageBox.area);\r\n\t\t}\r\n\t\tmessageBox = null;\r\n\t});\r\n\r\n\treturn {\r\n\t\talert: alertBox,\r\n\t\tconfirm: confirmBox,\r\n\t\tmessage: messageBox,\r\n\t\tmodalbox: modalBox\r\n\t};\r\n}","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"كانون الثاني\", \"شباط\", \"آذار\", \"نيسان\", \"أيار\", \"حزيران\", \"تموز\", \"آب\", \"أيلول\", \"تشرين الأول\", \"تشرين الثاني\", \"كانون الأول\"],\r\n\t\tmonth_short: [\"يناير\", \"فبراير\", \"مارس\", \"أبريل\", \"مايو\", \"يونيو\", \"يوليو\", \"أغسطس\", \"سبتمبر\", \"أكتوبر\", \"نوفمبر\", \"ديسمبر\"],\r\n\t\tday_full: [\"الأحد\", \"الأثنين\", \"ألثلاثاء\", \"الأربعاء\", \"ألحميس\", \"ألجمعة\", \"السبت\"],\r\n\t\tday_short: [\"احد\", \"اثنين\", \"ثلاثاء\", \"اربعاء\", \"خميس\", \"جمعة\", \"سبت\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"اليوم\",\r\n\t\tday_tab: \"يوم\",\r\n\t\tweek_tab: \"أسبوع\",\r\n\t\tmonth_tab: \"شهر\",\r\n\t\tnew_event: \"حدث جديد\",\r\n\t\ticon_save: \"اخزن\",\r\n\t\ticon_cancel: \"الغاء\",\r\n\t\ticon_details: \"تفاصيل\",\r\n\t\ticon_edit: \"تحرير\",\r\n\t\ticon_delete: \"حذف\",\r\n\t\tconfirm_closing: \"التغييرات سوف تضيع, هل انت متأكد؟\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"الحدث سيتم حذفها نهائيا ، هل أنت متأكد؟\",\r\n\t\tsection_description: \"الوصف\",\r\n\t\tsection_time: \"الفترة الزمنية\",\r\n\t\tfull_day: \"طوال اليوم\",\r\n\r\n\t\tconfirm_recurring: \"هل تريد تحرير مجموعة كاملة من الأحداث المتكررة؟\",\r\n\t\tsection_recurring: \"تكرار الحدث\",\r\n\t\tbutton_recurring: \"تعطيل\",\r\n\t\tbutton_recurring_open: \"تمكين\",\r\n\t\tbutton_edit_series: \"تحرير سلسلة\",\r\n\t\tbutton_edit_occurrence: \"تعديل نسخة\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"جدول\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};\r\n\r\n\r\n","/*\r\n Translation by Sofya Morozova\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Студзень\", \"Люты\", \"Сакавік\", \"Красавік\", \"Maй\", \"Чэрвень\", \"Ліпень\", \"Жнівень\", \"Верасень\", \"Кастрычнік\", \"Лістапад\", \"Снежань\"],\r\n\t\tmonth_short: [\"Студз\", \"Лют\", \"Сак\", \"Крас\", \"Maй\", \"Чэр\", \"Ліп\", \"Жнів\", \"Вер\", \"Каст\", \"Ліст\", \"Снеж\"],\r\n\t\tday_full: [ \"Нядзеля\", \"Панядзелак\", \"Аўторак\", \"Серада\", \"Чацвер\", \"Пятніца\", \"Субота\"],\r\n\t\tday_short: [\"Нд\", \"Пн\", \"Аўт\", \"Ср\", \"Чцв\", \"Пт\", \"Сб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сёння\",\r\n\t\tday_tab: \"Дзень\",\r\n\t\tweek_tab: \"Тыдзень\",\r\n\t\tmonth_tab: \"Месяц\",\r\n\t\tnew_event: \"Новая падзея\",\r\n\t\ticon_save: \"Захаваць\",\r\n\t\ticon_cancel: \"Адмяніць\",\r\n\t\ticon_details: \"Дэталі\",\r\n\t\ticon_edit: \"Змяніць\",\r\n\t\ticon_delete: \"Выдаліць\",\r\n\t\tconfirm_closing: \"\", //Унесеныя змены будуць страчаны, працягнуць?\r\n\t\tconfirm_deleting: \"Падзея будзе выдалена незваротна, працягнуць?\",\r\n\t\tsection_description: \"Апісанне\",\r\n\t\tsection_time: \"Перыяд часу\",\r\n\t\tfull_day: \"Увесь дзень\",\r\n\r\n\t\tconfirm_recurring: \"Вы хочаце змяніць усю серыю паўтаральных падзей?\",\r\n\t\tsection_recurring: \"Паўтарэнне\",\r\n\t\tbutton_recurring: \"Адключана\",\r\n\t\tbutton_recurring_open: \"Уключана\",\r\n\t\tbutton_edit_series: \"Рэдагаваць серыю\",\r\n\t\tbutton_edit_occurrence: \"Рэдагаваць асобнік\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Спіс\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Апісанне\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Год\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Спіс\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Спic\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Дзень\",\r\n\t\trepeat_radio_week: \"Тыдзень\",\r\n\t\trepeat_radio_month: \"Месяц\",\r\n\t\trepeat_radio_year: \"Год\",\r\n\t\trepeat_radio_day_type: \"Кожны\",\r\n\t\trepeat_text_day_count: \"дзень\",\r\n\t\trepeat_radio_day_type2: \"Кожны працоўны дзень\",\r\n\t\trepeat_week: \" Паўтараць кожны\",\r\n\t\trepeat_text_week_count: \"тыдзень\",\r\n\t\trepeat_radio_month_type: \"Паўтараць\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" чысла кожнага\",\r\n\t\trepeat_text_month_count: \"месяцу\",\r\n\t\trepeat_text_month_count2_before: \"кожны \",\r\n\t\trepeat_text_month_count2_after: \"месяц\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"дзень\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без даты заканчэння\",\r\n\t\trepeat_text_occurences_count: \"паўтораў\",\r\n\t\trepeat_radio_end2: \"\",\r\n\t\trepeat_radio_end3: \"Да \",\r\n\t\tmonth_for_recurring: [\"Студзеня\", \"Лютага\", \"Сакавіка\", \"Красавіка\", \"Мая\", \"Чэрвеня\", \"Ліпeня\", \"Жніўня\", \"Верасня\", \"Кастрычніка\", \"Лістапада\", \"Снежня\"],\r\n\t\tday_for_recurring: [\"Нядзелю\", \"Панядзелак\", \"Аўторак\", \"Сераду\", \"Чацвер\", \"Пятніцу\", \"Суботу\"]\r\n\t}\r\n};\r\n","/*\r\n @Traducido por Vicente Adria Bohigues - vicenteadria@hotmail.com\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Gener\", \"Febrer\", \"Març\", \"Abril\", \"Maig\", \"Juny\", \"Juliol\", \"Agost\", \"Setembre\", \"Octubre\", \"Novembre\", \"Desembre\"],\r\n\t\tmonth_short: [\"Gen\", \"Feb\", \"Mar\", \"Abr\", \"Mai\", \"Jun\", \"Jul\", \"Ago\", \"Set\", \"Oct\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Diumenge\", \"Dilluns\", \"Dimarts\", \"Dimecres\", \"Dijous\", \"Divendres\", \"Dissabte\"],\r\n\t\tday_short: [\"Dg\", \"Dl\", \"Dm\", \"Dc\", \"Dj\", \"Dv\", \"Ds\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hui\",\r\n\t\tday_tab: \"Dia\",\r\n\t\tweek_tab: \"Setmana\",\r\n\t\tmonth_tab: \"Mes\",\r\n\t\tnew_event: \"Nou esdeveniment\",\r\n\t\ticon_save: \"Guardar\",\r\n\t\ticon_cancel: \"Cancel·lar\",\r\n\t\ticon_details: \"Detalls\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Esborrar\",\r\n\t\tconfirm_closing: \"\", //\"Els seus canvis es perdràn, continuar ?\"\r\n\t\tconfirm_deleting: \"L'esdeveniment s'esborrarà definitivament, continuar ?\",\r\n\t\tsection_description: \"Descripció\",\r\n\t\tsection_time: \"Periode de temps\",\r\n\t\tfull_day: \"Tot el dia\",\r\n\r\n\t\tconfirm_recurring: \"¿Desitja modificar el conjunt d'esdeveniments repetits?\",\r\n\t\tsection_recurring: \"Repeteixca l'esdeveniment\",\r\n\t\tbutton_recurring: \"Impedit\",\r\n\t\tbutton_recurring_open: \"Permés\",\r\n\t\tbutton_edit_series: \"Edit sèrie\",\r\n\t\tbutton_edit_occurrence: \"Edita Instància\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descripció\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Any\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Taula\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};","/*\r\nTranslation by FreezeSoul\r\n*/\r\n//scheduler.config.day_date=\"%M %d日 %D\";\r\n//scheduler.config.default_date=\"%Y年 %M %d日\";\r\n//scheduler.config.month_date=\"%Y年 %M\";\r\n\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"一月\", \"二月\", \"三月\", \"四月\", \"五月\", \"六月\", \"七月\", \"八月\", \"九月\", \"十月\", \"十一月\", \"十二月\"],\r\n\t\tmonth_short: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tday_full: [\"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\"],\r\n\t\tday_short: [\"日\", \"一\", \"二\", \"三\", \"四\", \"五\", \"六\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"今天\",\r\n\t\tday_tab: \"日\",\r\n\t\tweek_tab: \"周\",\r\n\t\tmonth_tab: \"月\",\r\n\t\tnew_event: \"新建日程\",\r\n\t\ticon_save: \"保存\",\r\n\t\ticon_cancel: \"关闭\",\r\n\t\ticon_details: \"详细\",\r\n\t\ticon_edit: \"编辑\",\r\n\t\ticon_delete: \"删除\",\r\n\t\tconfirm_closing: \"请确认是否撤销修改!\", //Your changes will be lost, are your sure?\r\n\t\tconfirm_deleting: \"是否删除日程?\",\r\n\t\tsection_description: \"描述\",\r\n\t\tsection_time: \"时间范围\",\r\n\t\tfull_day: \"整天\",\r\n\r\n\t\tconfirm_recurring:\"请确认是否将日程设为重复模式?\",\r\n\t\tsection_recurring:\"重复周期\",\r\n\t\tbutton_recurring:\"禁用\",\r\n\t\tbutton_recurring_open:\"启用\",\r\n\t\tbutton_edit_series: \"编辑系列\",\r\n\t\tbutton_edit_occurrence: \"编辑实例\",\r\n\t\t\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"议程\",\r\n\t\tdate:\"日期\",\r\n\t\tdescription:\"说明\",\r\n\t\t\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"今年\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"议程\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab:\"电网\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"按天\",\r\n\t\trepeat_radio_week: \"按周\",\r\n\t\trepeat_radio_month: \"按月\",\r\n\t\trepeat_radio_year: \"按年\",\r\n\t\trepeat_radio_day_type: \"每\",\r\n\t\trepeat_text_day_count: \"天\",\r\n\t\trepeat_radio_day_type2: \"每个工作日\",\r\n\t\trepeat_week: \" 重复 每\",\r\n\t\trepeat_text_week_count: \"星期的:\",\r\n\t\trepeat_radio_month_type: \"重复\",\r\n\t\trepeat_radio_month_start: \"在\",\r\n\t\trepeat_text_month_day: \"日 每\",\r\n\t\trepeat_text_month_count: \"月\",\r\n\t\trepeat_text_month_count2_before: \"每\",\r\n\t\trepeat_text_month_count2_after: \"月\",\r\n\t\trepeat_year_label: \"在\",\r\n\t\tselect_year_day2: \"的\",\r\n\t\trepeat_text_year_day: \"日\",\r\n\t\tselect_year_month: \"月\",\r\n\t\trepeat_radio_end: \"无结束日期\",\r\n\t\trepeat_text_occurences_count: \"次结束\",\r\n\t\trepeat_radio_end2: \"重复\",\r\n\t\trepeat_radio_end3: \"结束于\",\r\n\t\tmonth_for_recurring: [\"一月\", \"二月\", \"三月\", \"四月\", \"五月\", \"六月\", \"七月\", \"八月\", \"九月\", \"十月\", \"十一月\", \"十二月\"],\r\n\t\tday_for_recurring: [\"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Leden\", \"Únor\", \"Březen\", \"Duben\", \"Květen\", \"Červen\", \"Červenec\", \"Srpen\", \"Září\", \"Říjen\", \"Listopad\", \"Prosinec\"],\r\n\t\tmonth_short: [\"Led\", \"Ún\", \"Bře\", \"Dub\", \"Kvě\", \"Čer\", \"Čec\", \"Srp\", \"Září\", \"Říj\", \"List\", \"Pro\"],\r\n\t\tday_full: [\"Neděle\", \"Pondělí\", \"Úterý\", \"Středa\", \"Čtvrtek\", \"Pátek\", \"Sobota\"],\r\n\t\tday_short: [\"Ne\", \"Po\", \"Út\", \"St\", \"Čt\", \"Pá\", \"So\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dnes\",\r\n\t\tday_tab: \"Den\",\r\n\t\tweek_tab: \"Týden\",\r\n\t\tmonth_tab: \"Měsíc\",\r\n\t\tnew_event: \"Nová událost\",\r\n\t\ticon_save: \"Uložit\",\r\n\t\ticon_cancel: \"Zpět\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edituj\",\r\n\t\ticon_delete: \"Smazat\",\r\n\t\tconfirm_closing: \"\", //Vaše změny budou ztraceny, opravdu ?\r\n\t\tconfirm_deleting: \"Událost bude trvale smazána, opravdu?\",\r\n\t\tsection_description: \"Poznámky\",\r\n\t\tsection_time: \"Doba platnosti\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Přejete si upravit celou řadu opakovaných událostí?\",\r\n\t\tsection_recurring: \"Opakování události\",\r\n\t\tbutton_recurring: \"Vypnuto\",\r\n\t\tbutton_recurring_open: \"Zapnuto\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Upravit instance\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Program\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Poznámka\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\t\tfull_day: \"Full day\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Program\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Mřížka\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Denně\",\r\n\t\trepeat_radio_week: \"Týdně\",\r\n\t\trepeat_radio_month: \"Měsíčně\",\r\n\t\trepeat_radio_year: \"Ročně\",\r\n\t\trepeat_radio_day_type: \"každý\",\r\n\t\trepeat_text_day_count: \"Den\",\r\n\t\trepeat_radio_day_type2: \"pracovní dny\",\r\n\t\trepeat_week: \"Opakuje každých\",\r\n\t\trepeat_text_week_count: \"Týdnů na:\",\r\n\t\trepeat_radio_month_type: \"u každého\",\r\n\t\trepeat_radio_month_start: \"na\",\r\n\t\trepeat_text_month_day: \"Den každého\",\r\n\t\trepeat_text_month_count: \"Měsíc\",\r\n\t\trepeat_text_month_count2_before: \"každý\",\r\n\t\trepeat_text_month_count2_after: \"Měsíc\",\r\n\t\trepeat_year_label: \"na\",\r\n\t\tselect_year_day2: \"v\",\r\n\t\trepeat_text_year_day: \"Den v\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"bez data ukončení\",\r\n\t\trepeat_text_occurences_count: \"Události\",\r\n\t\trepeat_radio_end2: \"po\",\r\n\t\trepeat_radio_end3: \"Konec\",\r\n\t\tmonth_for_recurring: [\"Leden\", \"Únor\", \"Březen\", \"Duben\", \"Květen\", \"Červen\", \"Červenec\", \"Srpen\", \"Září\", \"Říjen\", \"Listopad\", \"Prosinec\"],\r\n\t\tday_for_recurring: [\"Neděle \", \"Pondělí\", \"Úterý\", \"Středa\", \"Čtvrtek\", \"Pátek\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Marts\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Man\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uge\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny begivenhed\",\r\n\t\ticon_save: \"Gem\",\r\n\t\ticon_cancel: \"Fortryd\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Tilret\",\r\n\t\ticon_delete: \"Slet\",\r\n\t\tconfirm_closing: \"Dine rettelser vil gå tabt.. Er dy sikker?\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Bigivenheden vil blive slettet permanent. Er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du tilrette hele serien af gentagne begivenheder?\",\r\n\t\tsection_recurring: \"Gentag begivenhed\",\r\n\t\tbutton_recurring: \"Frakoblet\",\r\n\t\tbutton_recurring_open: \"Tilkoblet\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Rediger en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dagsorden\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dagsorden\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daglig\",\r\n\t\trepeat_radio_week: \"Ugenlig\",\r\n\t\trepeat_radio_month: \"Månedlig\",\r\n\t\trepeat_radio_year: \"Årlig\",\r\n\t\trepeat_radio_day_type: \"Hver\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"På hver arbejdsdag\",\r\n\t\trepeat_week: \" Gentager sig hver\",\r\n\t\trepeat_text_week_count: \"uge på følgende dage:\",\r\n\t\trepeat_radio_month_type: \"Hver den\",\r\n\t\trepeat_radio_month_start: \"Den\",\r\n\t\trepeat_text_month_day: \" i hver\",\r\n\t\trepeat_text_month_count: \"måned\",\r\n\t\trepeat_text_month_count2_before: \"hver\",\r\n\t\trepeat_text_month_count2_after: \"måned\",\r\n\t\trepeat_year_label: \"Den\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Ingen slutdato\",\r\n\t\trepeat_text_occurences_count: \"gentagelse\",\r\n\t\trepeat_radio_end2: \"Efter\",\r\n\t\trepeat_radio_end3: \"Slut\",\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"März\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Dezember\"],\r\n\t\tday_for_recurring: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\" Januar\", \" Februar\", \" März \", \" April\", \" Mai\", \" Juni\", \" Juli\", \" August\", \" September \", \" Oktober\", \" November \", \" Dezember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mär\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dez\"],\r\n\t\tday_full: [ \"Sonntag\", \"Montag\", \"Dienstag\", \" Mittwoch\", \" Donnerstag\", \"Freitag\", \"Samstag\"],\r\n\t\tday_short: [\"So\", \"Mo\", \"Di\", \"Mi\", \"Do\", \"Fr\", \"Sa\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Heute\",\r\n\t\tday_tab: \"Tag\",\r\n\t\tweek_tab: \"Woche\",\r\n\t\tmonth_tab: \"Monat\",\r\n\t\tnew_event: \"neuer Eintrag\",\r\n\t\ticon_save: \"Speichern\",\r\n\t\ticon_cancel: \"Abbrechen\",\r\n\t\ticon_details: \"Details\",\r\n\t\ticon_edit: \"Ändern\",\r\n\t\ticon_delete: \"Löschen\",\r\n\t\tconfirm_closing: \"\", //\"Ihre Veränderungen werden verloren sein, wollen Sie ergänzen? \"\r\n\t\tconfirm_deleting: \"Der Eintrag wird gelöscht\",\r\n\t\tsection_description: \"Beschreibung\",\r\n\t\tsection_time: \"Zeitspanne\",\r\n\t\tfull_day: \"Ganzer Tag\",\r\n\r\n\t\tconfirm_recurring: \"Wollen Sie alle Einträge bearbeiten oder nur diesen einzelnen Eintrag?\",\r\n\t\tsection_recurring: \"Wiederholung\",\r\n\t\tbutton_recurring: \"Aus\",\r\n\t\tbutton_recurring_open: \"An\",\r\n\t\tbutton_edit_series: \"Bearbeiten Sie die Serie\",\r\n\t\tbutton_edit_occurrence: \"Bearbeiten Sie eine Kopie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Beschreibung\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Jahre\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Täglich\",\r\n\t\trepeat_radio_week: \"Wöchentlich\",\r\n\t\trepeat_radio_month: \"Monatlich\",\r\n\t\trepeat_radio_year: \"Jährlich\",\r\n\t\trepeat_radio_day_type: \"jeden\",\r\n\t\trepeat_text_day_count: \"Tag\",\r\n\t\trepeat_radio_day_type2: \"an jedem Arbeitstag\",\r\n\t\trepeat_week: \" Wiederholt sich jede\",\r\n\t\trepeat_text_week_count: \"Woche am:\",\r\n\t\trepeat_radio_month_type: \"an jedem\",\r\n\t\trepeat_radio_month_start: \"am\",\r\n\t\trepeat_text_month_day: \"Tag eines jeden\",\r\n\t\trepeat_text_month_count: \"Monats\",\r\n\t\trepeat_text_month_count2_before: \"jeden\",\r\n\t\trepeat_text_month_count2_after: \"Monats\",\r\n\t\trepeat_year_label: \"am\",\r\n\t\tselect_year_day2: \"im\",\r\n\t\trepeat_text_year_day: \"Tag im\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"kein Enddatum\",\r\n\t\trepeat_text_occurences_count: \"Ereignissen\",\r\n\t\trepeat_radio_end3: \"Schluß\",\r\n\t\trepeat_radio_end2: \"nach\",\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"März\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Dezember\"],\r\n\t\tday_for_recurring: [\"Sonntag\", \"Montag\", \"Dienstag\", \"Mittwoch\", \"Donnerstag\", \"Freitag\", \"Samstag\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Ιανουάριος\", \"Φεβρουάριος\", \"Μάρτιος\", \"Απρίλιος\", \"Μάϊος\", \"Ιούνιος\", \"Ιούλιος\", \"Αύγουστος\", \"Σεπτέμβριος\", \"Οκτώβριος\", \"Νοέμβριος\", \"Δεκέμβριος\"],\r\n\t\tmonth_short: [\"ΙΑΝ\", \"ΦΕΒ\", \"ΜΑΡ\", \"ΑΠΡ\", \"ΜΑΙ\", \"ΙΟΥΝ\", \"ΙΟΥΛ\", \"ΑΥΓ\", \"ΣΕΠ\", \"ΟΚΤ\", \"ΝΟΕ\", \"ΔΕΚ\"],\r\n\t\tday_full: [\"Κυριακή\", \"Δευτέρα\", \"Τρίτη\", \"Τετάρτη\", \"Πέμπτη\", \"Παρασκευή\", \"Σάββατο\"],\r\n\t\tday_short: [\"ΚΥ\", \"ΔΕ\", \"ΤΡ\", \"ΤΕ\", \"ΠΕ\", \"ΠΑ\", \"ΣΑ\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Σήμερα\",\r\n\t\tday_tab: \"Ημέρα\",\r\n\t\tweek_tab: \"Εβδομάδα\",\r\n\t\tmonth_tab: \"Μήνας\",\r\n\t\tnew_event: \"Νέο έργο\",\r\n\t\ticon_save: \"Αποθήκευση\",\r\n\t\ticon_cancel: \"Άκυρο\",\r\n\t\ticon_details: \"Λεπτομέρειες\",\r\n\t\ticon_edit: \"Επεξεργασία\",\r\n\t\ticon_delete: \"Διαγραφή\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Το έργο θα διαγραφεί οριστικά. Θέλετε να συνεχίσετε;\",\r\n\t\tsection_description: \"Περιγραφή\",\r\n\t\tsection_time: \"Χρονική περίοδος\",\r\n\t\tfull_day: \"Πλήρης Ημέρα\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Θέλετε να επεξεργασθείτε ολόκληρη την ομάδα των επαναλαμβανόμενων έργων;\",\r\n\t\tsection_recurring: \"Επαναλαμβανόμενο έργο\",\r\n\t\tbutton_recurring: \"Ανενεργό\",\r\n\t\tbutton_recurring_open: \"Ενεργό\",\r\n\t\tbutton_edit_series: \"Επεξεργαστείτε τη σειρά\",\r\n\t\tbutton_edit_occurrence: \"Επεξεργασία ένα αντίγραφο\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Ημερήσια Διάταξη\",\r\n\t\tdate: \"Ημερομηνία\",\r\n\t\tdescription: \"Περιγραφή\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Έτος\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Ημερήσια Διάταξη\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Πλέγμα\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Ημερησίως\",\r\n\t\trepeat_radio_week: \"Εβδομαδιαίως\",\r\n\t\trepeat_radio_month: \"Μηνιαίως\",\r\n\t\trepeat_radio_year: \"Ετησίως\",\r\n\t\trepeat_radio_day_type: \"Κάθε\",\r\n\t\trepeat_text_day_count: \"ημέρα\",\r\n\t\trepeat_radio_day_type2: \"Κάθε εργάσιμη\",\r\n\t\trepeat_week: \" Επανάληψη κάθε\",\r\n\t\trepeat_text_week_count: \"εβδομάδα τις επόμενες ημέρες:\",\r\n\t\trepeat_radio_month_type: \"Επανάληψη\",\r\n\t\trepeat_radio_month_start: \"Την\",\r\n\t\trepeat_text_month_day: \"ημέρα κάθε\",\r\n\t\trepeat_text_month_count: \"μήνα\",\r\n\t\trepeat_text_month_count2_before: \"κάθε\",\r\n\t\trepeat_text_month_count2_after: \"μήνα\",\r\n\t\trepeat_year_label: \"Την\",\r\n\t\tselect_year_day2: \"του\",\r\n\t\trepeat_text_year_day: \"ημέρα\",\r\n\t\tselect_year_month: \"μήνα\",\r\n\t\trepeat_radio_end: \"Χωρίς ημερομηνία λήξεως\",\r\n\t\trepeat_text_occurences_count: \"επαναλήψεις\",\r\n\t\trepeat_radio_end3: \"Λήγει την\",\r\n\t\trepeat_radio_end2: \"Μετά από\",\r\n\t\tmonth_for_recurring: [\"Ιανουάριος\", \"Φεβρουάριος\", \"Μάρτιος\", \"Απρίλιος\", \"Μάϊος\", \"Ιούνιος\", \"Ιούλιος\", \"Αύγουστος\", \"Σεπτέμβριος\", \"Οκτώβριος\", \"Νοέμβριος\", \"Δεκέμβριος\"],\r\n\t\tday_for_recurring: [\"Κυριακή\", \"Δευτέρα\", \"Τρίτη\", \"Τετάρτη\", \"Πέμπτη\", \"Παρασκευή\", \"Σάββατο\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate:{\r\n\t\tmonth_full:[\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\r\n\t\tmonth_short:[\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\r\n\t\tday_full:[\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\r\n\t\tday_short:[\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"]\r\n\t},\r\n\tlabels:{\r\n\t\tdhx_cal_today_button:\"Today\",\r\n\t\tday_tab:\"Day\",\r\n\t\tweek_tab:\"Week\",\r\n\t\tmonth_tab:\"Month\",\r\n\t\tnew_event:\"New event\",\r\n\t\ticon_save:\"Save\",\r\n\t\ticon_cancel:\"Cancel\",\r\n\t\ticon_details:\"Details\",\r\n\t\ticon_edit:\"Edit\",\r\n\t\ticon_delete:\"Delete\",\r\n\t\tconfirm_closing:\"\",//Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting:\"Event will be deleted permanently, are you sure?\",\r\n\t\tsection_description:\"Description\",\r\n\t\tsection_time:\"Time period\",\r\n\t\tfull_day:\"Full day\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring:\"Do you want to edit the whole set of repeated events?\",\r\n\t\tsection_recurring:\"Repeat event\",\r\n\t\tbutton_recurring:\"Disabled\",\r\n\t\tbutton_recurring_open:\"Enabled\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Edit occurrence\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"Agenda\",\r\n\t\tdate:\"Date\",\r\n\t\tdescription:\"Description\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"Year\",\r\n\r\n\t\t/* week agenda extension */\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daily\",//name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Weekly\",//name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Monthly\",\r\n\t\trepeat_radio_year: \"Yearly\",\r\n\t\trepeat_radio_day_type: \"Every\",\r\n\t\trepeat_text_day_count: \"day\",\r\n\t\trepeat_radio_day_type2: \"Every workday\",\r\n\t\trepeat_week: \" Repeat every\",\r\n\t\trepeat_text_week_count: \"week next days:\",\r\n\t\trepeat_radio_month_type: \"Repeat\",\r\n\t\trepeat_radio_month_start: \"On\",\r\n\t\trepeat_text_month_day: \"day every\",\r\n\t\trepeat_text_month_count: \"month\",\r\n\t\trepeat_text_month_count2_before: \"every\",\r\n\t\trepeat_text_month_count2_after: \"month\",\r\n\t\trepeat_year_label: \"On\",\r\n\t\tselect_year_day2: \"of\",\r\n\t\trepeat_text_year_day: \"day\",\r\n\t\tselect_year_month: \"month\",\r\n\t\trepeat_radio_end: \"No end date\",\r\n\t\trepeat_text_occurences_count: \"occurrences\",\r\n\t\trepeat_radio_end2: \"After\",\r\n\t\trepeat_radio_end3: \"End by\",\r\n\t\tmonth_for_recurring: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"]//\r\n\t}\r\n};\r\n\r\n","/*\r\n @Autor Manuel Fernandez Panzuela - www.mfernandez.es\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Enero\", \"Febrero\", \"Marzo\", \"Abril\", \"Mayo\", \"Junio\", \"Julio\", \"Agosto\", \"Septiembre\", \"Octubre\", \"Noviembre\", \"Diciembre\"],\r\n\t\tmonth_short: [\"Ene\", \"Feb\", \"Mar\", \"Abr\", \"May\", \"Jun\", \"Jul\", \"Ago\", \"Sep\", \"Oct\", \"Nov\", \"Dic\"],\r\n\t\tday_full: [\"Domingo\", \"Lunes\", \"Martes\", \"Miércoles\", \"Jueves\", \"Viernes\", \"Sábado\"],\r\n\t\tday_short: [\"Dom\", \"Lun\", \"Mar\", \"Mié\", \"Jue\", \"Vie\", \"Sáb\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hoy\",\r\n\t\tday_tab: \"Día\",\r\n\t\tweek_tab: \"Semana\",\r\n\t\tmonth_tab: \"Mes\",\r\n\t\tnew_event: \"Nuevo evento\",\r\n\t\ticon_save: \"Guardar\",\r\n\t\ticon_cancel: \"Cancelar\",\r\n\t\ticon_details: \"Detalles\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Eliminar\",\r\n\t\tconfirm_closing: \"\", //\"Sus cambios se perderán, continuar ?\"\r\n\t\tconfirm_deleting: \"El evento se borrará definitivamente, ¿continuar?\",\r\n\t\tsection_description: \"Descripción\",\r\n\t\tsection_time: \"Período\",\r\n\t\tfull_day: \"Todo el día\",\r\n\r\n\t\tconfirm_recurring: \"¿Desea modificar el conjunto de eventos repetidos?\",\r\n\t\tsection_recurring: \"Repita el evento\",\r\n\t\tbutton_recurring: \"Impedido\",\r\n\t\tbutton_recurring_open: \"Permitido\",\r\n\t\tbutton_edit_series: \"Editar la serie\",\r\n\t\tbutton_edit_occurrence: \"Editar este evento\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Día\",\r\n\t\tdate: \"Fecha\",\r\n\t\tdescription: \"Descripción\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Año\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Día\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Reja\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Diariamente\",\r\n\t\trepeat_radio_week: \"Semanalmente\",\r\n\t\trepeat_radio_month: \"Mensualmente\",\r\n\t\trepeat_radio_year: \"Anualmente\",\r\n\t\trepeat_radio_day_type: \"Cada\",\r\n\t\trepeat_text_day_count: \"dia\",\r\n\t\trepeat_radio_day_type2: \"Cada jornada de trabajo\",\r\n\t\trepeat_week: \" Repetir cada\",\r\n\t\trepeat_text_week_count: \"semana:\",\r\n\t\trepeat_radio_month_type: \"Repita\",\r\n\t\trepeat_radio_month_start: \"El\",\r\n\t\trepeat_text_month_day: \"dia cada \",\r\n\t\trepeat_text_month_count: \"mes\",\r\n\t\trepeat_text_month_count2_before: \"cada\",\r\n\t\trepeat_text_month_count2_after: \"mes\",\r\n\t\trepeat_year_label: \"El\",\r\n\t\tselect_year_day2: \"del\",\r\n\t\trepeat_text_year_day: \"dia\",\r\n\t\tselect_year_month: \"mes\",\r\n\t\trepeat_radio_end: \"Sin fecha de finalización\",\r\n\t\trepeat_text_occurences_count: \"ocurrencias\",\r\n\t\trepeat_radio_end3: \"Fin\",\r\n\t\trepeat_radio_end2: \"Después de\",\r\n\t\tmonth_for_recurring: [\"Enero\", \"Febrero\", \"Маrzo\", \"Аbril\", \"Mayo\", \"Junio\", \"Julio\", \"Аgosto\", \"Setiembre\", \"Octubre\", \"Noviembre\", \"Diciembre\"],\r\n\t\tday_for_recurring: [\"Domingo\", \"Lunes\", \"Martes\", \"Miércoles\", \"Jeuves\", \"Viernes\", \"Sabado\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Tammikuu\", \"Helmikuu\", \"Maaliskuu\", \"Huhtikuu\", \"Toukokuu\", \"Kesäkuu\", \"Heinäkuu\", \"Elokuu\", \"Syyskuu\", \"Lokakuu\", \"Marraskuu\", \"Joulukuu\"],\r\n\t\tmonth_short: [\"Tam\", \"Hel\", \"Maa\", \"Huh\", \"Tou\", \"Kes\", \"Hei\", \"Elo\", \"Syy\", \"Lok\", \"Mar\", \"Jou\"],\r\n\t\tday_full: [\"Sunnuntai\", \"Maanantai\", \"Tiistai\", \"Keskiviikko\", \"Torstai\", \"Perjantai\", \"Lauantai\"],\r\n\t\tday_short: [\"Su\", \"Ma\", \"Ti\", \"Ke\", \"To\", \"Pe\", \"La\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Tänään\",\r\n\t\tday_tab: \"Päivä\",\r\n\t\tweek_tab: \"Viikko\",\r\n\t\tmonth_tab: \"Kuukausi\",\r\n\t\tnew_event: \"Uusi tapahtuma\",\r\n\t\ticon_save: \"Tallenna\",\r\n\t\ticon_cancel: \"Peru\",\r\n\t\ticon_details: \"Tiedot\",\r\n\t\ticon_edit: \"Muokkaa\",\r\n\t\ticon_delete: \"Poista\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Haluatko varmasti poistaa tapahtuman?\",\r\n\t\tsection_description: \"Kuvaus\",\r\n\t\tsection_time: \"Aikajakso\",\r\n\t\tfull_day: \"Koko päivä\",\r\n\r\n\t\tconfirm_recurring: \"Haluatko varmasti muokata toistuvan tapahtuman kaikkia jaksoja?\",\r\n\t\tsection_recurring: \"Toista tapahtuma\",\r\n\t\tbutton_recurring: \"Ei käytössä\",\r\n\t\tbutton_recurring_open: \"Käytössä\",\r\n\t\tbutton_edit_series: \"Muokkaa sarja\",\r\n\t\tbutton_edit_occurrence: \"Muokkaa kopio\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Esityslista\",\r\n\t\tdate: \"Päivämäärä\",\r\n\t\tdescription: \"Kuvaus\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Vuoden\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Esityslista\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Ritilä\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Luo uusi vetämällä\",\r\n\t\tdrag_to_move:\"Siirrä vetämällä\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Päivittäin\",\r\n\t\trepeat_radio_week: \"Viikoittain\",\r\n\t\trepeat_radio_month: \"Kuukausittain\",\r\n\t\trepeat_radio_year: \"Vuosittain\",\r\n\t\trepeat_radio_day_type: \"Joka\",\r\n\t\trepeat_text_day_count: \"päivä\",\r\n\t\trepeat_radio_day_type2: \"Joka arkipäivä\",\r\n\t\trepeat_week: \"Toista joka\",\r\n\t\trepeat_text_week_count: \"viikko näinä päivinä:\",\r\n\t\trepeat_radio_month_type: \"Toista\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \"päivänä joka\",\r\n\t\trepeat_text_month_count: \"kuukausi\",\r\n\t\trepeat_text_month_count2_before: \"joka\",\r\n\t\trepeat_text_month_count2_after: \"kuukausi\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"päivä\",\r\n\t\tselect_year_month: \"kuukausi\",\r\n\t\trepeat_radio_end: \"Ei loppumisaikaa\",\r\n\t\trepeat_text_occurences_count: \"Toiston jälkeen\",\r\n\t\trepeat_radio_end3: \"Loppuu\",\r\n\t\trepeat_radio_end2: \"\",\r\n\t\tmonth_for_recurring: [\"Tammikuu\", \"Helmikuu\", \"Maaliskuu\", \"Huhtikuu\", \"Toukokuu\", \"Kesäkuu\", \"Heinäkuu\", \"Elokuu\", \"Syyskuu\", \"Lokakuu\", \"Marraskuu\", \"Joulukuu\"],\r\n\t\tday_for_recurring: [\"Sunnuntai\", \"Maanantai\", \"Tiistai\", \"Keskiviikko\", \"Torstai\", \"Perjantai\", \"Lauantai\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Janvier\", \"Février\", \"Mars\", \"Avril\", \"Mai\", \"Juin\", \"Juillet\", \"Août\", \"Septembre\", \"Octobre\", \"Novembre\", \"Décembre\"],\r\n\t\tmonth_short: [\"Jan\", \"Fév\", \"Mar\", \"Avr\", \"Mai\", \"Juin\", \"Juil\", \"Aoû\", \"Sep\", \"Oct\", \"Nov\", \"Déc\"],\r\n\t\tday_full: [\"Dimanche\", \"Lundi\", \"Mardi\", \"Mercredi\", \"Jeudi\", \"Vendredi\", \"Samedi\"],\r\n\t\tday_short: [\"Dim\", \"Lun\", \"Mar\", \"Mer\", \"Jeu\", \"Ven\", \"Sam\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Aujourd'hui\",\r\n\t\tday_tab: \"Jour\",\r\n\t\tweek_tab: \"Semaine\",\r\n\t\tmonth_tab: \"Mois\",\r\n\t\tnew_event: \"Nouvel événement\",\r\n\t\ticon_save: \"Enregistrer\",\r\n\t\ticon_cancel: \"Annuler\",\r\n\t\ticon_details: \"Détails\",\r\n\t\ticon_edit: \"Modifier\",\r\n\t\ticon_delete: \"Effacer\",\r\n\t\tconfirm_closing: \"\", //Vos modifications seront perdus, êtes-vous sûr ?\r\n\t\tconfirm_deleting: \"L'événement sera effacé sans appel, êtes-vous sûr ?\",\r\n\t\tsection_description: \"Description\",\r\n\t\tsection_time: \"Période\",\r\n\t\tfull_day: \"Journée complète\",\r\n\r\n\t\tconfirm_recurring: \"Voulez-vous éditer toute une série d'évènements répétés?\",\r\n\t\tsection_recurring: \"Périodicité\",\r\n\t\tbutton_recurring: \"Désactivé\",\r\n\t\tbutton_recurring_open: \"Activé\",\r\n\t\tbutton_edit_series: \"Modifier la série\",\r\n\t\tbutton_edit_occurrence: \"Modifier une copie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Jour\",\r\n\t\tdate: \"Date\",\r\n\t\tdescription: \"Description\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Année\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Jour\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grille\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Quotidienne\",\r\n\t\trepeat_radio_week: \"Hebdomadaire\",\r\n\t\trepeat_radio_month: \"Mensuelle\",\r\n\t\trepeat_radio_year: \"Annuelle\",\r\n\t\trepeat_radio_day_type: \"Chaque\",\r\n\t\trepeat_text_day_count: \"jour\",\r\n\t\trepeat_radio_day_type2: \"Chaque journée de travail\",\r\n\t\trepeat_week: \" Répéter toutes les\",\r\n\t\trepeat_text_week_count: \"semaine:\",\r\n\t\trepeat_radio_month_type: \"Répéter\",\r\n\t\trepeat_radio_month_start: \"Le\",\r\n\t\trepeat_text_month_day: \"jour chaque\",\r\n\t\trepeat_text_month_count: \"mois\",\r\n\t\trepeat_text_month_count2_before: \"chaque\",\r\n\t\trepeat_text_month_count2_after: \"mois\",\r\n\t\trepeat_year_label: \"Le\",\r\n\t\tselect_year_day2: \"du\",\r\n\t\trepeat_text_year_day: \"jour\",\r\n\t\tselect_year_month: \"mois\",\r\n\t\trepeat_radio_end: \"Pas de date d"achèvement\",\r\n\t\trepeat_text_occurences_count: \"occurrences\",\r\n\t\trepeat_radio_end3: \"Fin\",\r\n\t\trepeat_radio_end2: \"Après\",\r\n\t\tmonth_for_recurring: [\"Janvier\", \"Février\", \"Mars\", \"Avril\", \"Mai\", \"Juin\", \"Juillet\", \"Août\", \"Septembre\", \"Octobre\", \"Novembre\", \"Décembre\"],\r\n\t\tday_for_recurring: [\"Dimanche\", \"Lundi\", \"Mardi\", \"Mercredi\", \"Jeudi\", \"Vendredi\", \"Samedi\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"ינואר\", \"פברואר\", \"מרץ\", \"אפריל\", \"מאי\", \"יוני\", \"יולי\", \"אוגוסט\", \"ספטמבר\", \"אוקטובר\", \"נובמבר\", \"דצמבר\"],\r\n\t\tmonth_short: [\"ינו\", \"פבר\", \"מרץ\", \"אפר\", \"מאי\", \"יונ\", \"יול\", \"אוג\", \"ספט\", \"אוק\", \"נוב\", \"דצמ\"],\r\n\t\tday_full: [\"ראשון\", \"שני\", \"שלישי\", \"רביעי\", \"חמישי\", \"שישי\", \"שבת\"],\r\n\t\tday_short: [\"א\", \"ב\", \"ג\", \"ד\", \"ה\", \"ו\", \"ש\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"היום\",\r\n\t\tday_tab: \"יום\",\r\n\t\tweek_tab: \"שבוע\",\r\n\t\tmonth_tab: \"חודש\",\r\n\t\tnew_event: \"ארוע חדש\",\r\n\t\ticon_save: \"שמור\",\r\n\t\ticon_cancel: \"בטל\",\r\n\t\ticon_details: \"פרטים\",\r\n\t\ticon_edit: \"ערוך\",\r\n\t\ticon_delete: \"מחק\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"ארוע ימחק סופית.להמשיך?\",\r\n\t\tsection_description: \"תיאור\",\r\n\t\tsection_time: \"תקופה\",\r\n\r\n\t\tconfirm_recurring: \"האם ברצונך לשנות כל סדרת ארועים מתמשכים?\",\r\n\t\tsection_recurring: \"להעתיק ארוע\",\r\n\t\tbutton_recurring: \"לא פעיל\",\r\n\t\tbutton_recurring_open: \"פעיל\",\r\n\t\tfull_day: \"יום שלם\",\r\n\t\tbutton_edit_series: \"ערוך את הסדרה\",\r\n\t\tbutton_edit_occurrence: \"עריכת עותק\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"סדר יום\",\r\n\t\tdate: \"תאריך\",\r\n\t\tdescription: \"תיאור\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"לשנה\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"סדר יום\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"סורג\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"גרור כדי להזיז\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"בטל\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"הבא\",\r\n\t\tprev: \"הקודם\",\r\n\t\tyear: \"שנה\",\r\n\t\tmonth: \"חודש\",\r\n\t\tday: \"יום\",\r\n\t\thour:\"שעה\",\r\n\t\tminute: \"דקה\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"יומי\",\r\n\t\trepeat_radio_week: \"שבועי\",\r\n\t\trepeat_radio_month: \"חודשי\",\r\n\t\trepeat_radio_year: \"שנתי\",\r\n\t\trepeat_radio_day_type: \"חזור כל\",\r\n\t\trepeat_text_day_count: \"ימים\",\r\n\t\trepeat_radio_day_type2: \"חזור כל יום עבודה\",\r\n\t\trepeat_week: \" חזור כל\",\r\n\t\trepeat_text_week_count: \"שבוע לפי ימים:\",\r\n\t\trepeat_radio_month_type: \"חזור כל\",\r\n\t\trepeat_radio_month_start: \"כל\",\r\n\t\trepeat_text_month_day: \"ימים כל\",\r\n\t\trepeat_text_month_count: \"חודשים\",\r\n\t\trepeat_text_month_count2_before: \"חזור כל\",\r\n\t\trepeat_text_month_count2_after: \"חודש\",\r\n\t\trepeat_year_label: \"כל\",\r\n\t\tselect_year_day2: \"בחודש\",\r\n\t\trepeat_text_year_day: \"ימים\",\r\n\t\tselect_year_month: \"חודש\",\r\n\t\trepeat_radio_end: \"לעולם לא מסתיים\",\r\n\t\trepeat_text_occurences_count: \"אירועים\",\r\n\t\trepeat_radio_end3: \"מסתיים ב\",\r\n\t\trepeat_radio_end2: \"אחרי\",\r\n\t\tmonth_for_recurring: [\"ינואר\", \"פברואר\", \"מרץ\", \"אפריל\", \"מאי\", \"יוני\", \"יולי\", \"אוגוסט\", \"ספטמבר\", \"אוקטובר\", \"נובמבר\", \"דצמבר\"],\r\n\t\tday_for_recurring: [\"ראשון\", \"שני\", \"שלישי\", \"רביעי\", \"חמישי\", \"שישי\", \"שבת\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Január\", \"Február\", \"Március\", \"Április\", \"Május\", \"Június\", \"Július\", \"Augusztus\", \"Szeptember\", \"Október\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Már\", \"Ápr\", \"Máj\", \"Jún\", \"Júl\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Vasárnap\", \"Hétfõ\", \"Kedd\", \"Szerda\", \"Csütörtök\", \"Péntek\", \"szombat\"],\r\n\t\tday_short: [\"Va\", \"Hé\", \"Ke\", \"Sze\", \"Csü\", \"Pé\", \"Szo\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Ma\",\r\n\t\tday_tab: \"Nap\",\r\n\t\tweek_tab: \"Hét\",\r\n\t\tmonth_tab: \"Hónap\",\r\n\t\tnew_event: \"Új esemény\",\r\n\t\ticon_save: \"Mentés\",\r\n\t\ticon_cancel: \"Mégse\",\r\n\t\ticon_details: \"Részletek\",\r\n\t\ticon_edit: \"Szerkesztés\",\r\n\t\ticon_delete: \"Törlés\",\r\n\t\tconfirm_closing: \"\", //A változások elvesznek, biztosan folytatja? \"\r\n\t\tconfirm_deleting: \"Az esemény törölve lesz, biztosan folytatja?\",\r\n\t\tsection_description: \"Leírás\",\r\n\t\tsection_time: \"Idõszak\",\r\n\t\tfull_day: \"Egesz napos\",\r\n\r\n\t\t/*ismétlõdõ események*/\r\n\t\tconfirm_recurring: \"Biztosan szerkeszteni akarod az összes ismétlõdõ esemény beállítását?\",\r\n\t\tsection_recurring: \"Esemény ismétlése\",\r\n\t\tbutton_recurring: \"Tiltás\",\r\n\t\tbutton_recurring_open: \"Engedélyezés\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Szerkesztés bíróság\",\r\n\r\n\t\t/*napirendi nézet*/\r\n\t\tagenda_tab: \"Napirend\",\r\n\t\tdate: \"Dátum\",\r\n\t\tdescription: \"Leírás\",\r\n\r\n\t\t/*éves nézet*/\r\n\t\tyear_tab: \"Év\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Maret\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Agustus\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mei\", \"Jun\", \"Jul\", \"Ags\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Minggu\", \"Senin\", \"Selasa\", \"Rabu\", \"Kamis\", \"Jumat\", \"Sabtu\"],\r\n\t\tday_short: [\"Ming\", \"Sen\", \"Sel\", \"Rab\", \"Kam\", \"Jum\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hari Ini\",\r\n\t\tday_tab: \"Hari\",\r\n\t\tweek_tab: \"Minggu\",\r\n\t\tmonth_tab: \"Bulan\",\r\n\t\tnew_event: \"Acara Baru\",\r\n\t\ticon_save: \"Simpan\",\r\n\t\ticon_cancel: \"Batal\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edit\",\r\n\t\ticon_delete: \"Hapus\",\r\n\t\tconfirm_closing: \"\", /*Perubahan tidak akan disimpan ?*/\r\n\t\tconfirm_deleting: \"Acara akan dihapus\",\r\n\t\tsection_description: \"Keterangan\",\r\n\t\tsection_time: \"Periode\",\r\n\t\tfull_day: \"Hari penuh\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Apakah acara ini akan berulang?\",\r\n\t\tsection_recurring: \"Acara Rutin\",\r\n\t\tbutton_recurring: \"Tidak Difungsikan\",\r\n\t\tbutton_recurring_open: \"Difungsikan\",\r\n\t\tbutton_edit_series: \"Mengedit seri\",\r\n\t\tbutton_edit_occurrence: \"Mengedit salinan\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Tanggal\",\r\n\t\tdescription: \"Keterangan\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Tahun\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabel\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Gennaio\", \"Febbraio\", \"Marzo\", \"Aprile\", \"Maggio\", \"Giugno\", \"Luglio\", \"Agosto\", \"Settembre\", \"Ottobre\", \"Novembre\", \"Dicembre\"],\r\n\t\tmonth_short: [\"Gen\", \"Feb\", \"Mar\", \"Apr\", \"Mag\", \"Giu\", \"Lug\", \"Ago\", \"Set\", \"Ott\", \"Nov\", \"Dic\"],\r\n\t\tday_full: [\"Domenica\", \"Lunedì\", \"Martedì\", \"Mercoledì\", \"Giovedì\", \"Venerdì\", \"Sabato\"],\r\n\t\tday_short: [\"Dom\", \"Lun\", \"Mar\", \"Mer\", \"Gio\", \"Ven\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Oggi\",\r\n\t\tday_tab: \"Giorno\",\r\n\t\tweek_tab: \"Settimana\",\r\n\t\tmonth_tab: \"Mese\",\r\n\t\tnew_event: \"Nuovo evento\",\r\n\t\ticon_save: \"Salva\",\r\n\t\ticon_cancel: \"Chiudi\",\r\n\t\ticon_details: \"Dettagli\",\r\n\t\ticon_edit: \"Modifica\",\r\n\t\ticon_delete: \"Elimina\",\r\n\t\tconfirm_closing: \"\", //Le modifiche apportate saranno perse, siete sicuri?\r\n\t\tconfirm_deleting: \"L'evento sarà eliminato, siete sicuri?\",\r\n\t\tsection_description: \"Descrizione\",\r\n\t\tsection_time: \"Periodo di tempo\",\r\n\t\tfull_day: \"Intera giornata\",\r\n\r\n\t\tconfirm_recurring: \"Vuoi modificare l'intera serie di eventi?\",\r\n\t\tsection_recurring: \"Ripetere l'evento\",\r\n\t\tbutton_recurring: \"Disattivato\",\r\n\t\tbutton_recurring_open: \"Attivato\",\r\n\t\tbutton_edit_series: \"Modificare la serie\",\r\n\t\tbutton_edit_occurrence: \"Modificare una copia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descrizione\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Anno\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Griglia\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Quotidiano\",\r\n\t\trepeat_radio_week: \"Settimanale\",\r\n\t\trepeat_radio_month: \"Mensile\",\r\n\t\trepeat_radio_year: \"Annuale\",\r\n\t\trepeat_radio_day_type: \"Ogni\",\r\n\t\trepeat_text_day_count: \"giorno\",\r\n\t\trepeat_radio_day_type2: \"Ogni giornata lavorativa\",\r\n\t\trepeat_week: \" Ripetere ogni\",\r\n\t\trepeat_text_week_count: \"settimana:\",\r\n\t\trepeat_radio_month_type: \"Ripetere\",\r\n\t\trepeat_radio_month_start: \"Il\",\r\n\t\trepeat_text_month_day: \"giorno ogni\",\r\n\t\trepeat_text_month_count: \"mese\",\r\n\t\trepeat_text_month_count2_before: \"ogni\",\r\n\t\trepeat_text_month_count2_after: \"mese\",\r\n\t\trepeat_year_label: \"Il\",\r\n\t\tselect_year_day2: \"del\",\r\n\t\trepeat_text_year_day: \"giorno\",\r\n\t\tselect_year_month: \"mese\",\r\n\t\trepeat_radio_end: \"Senza data finale\",\r\n\t\trepeat_text_occurences_count: \"occorenze\",\r\n\t\trepeat_radio_end3: \"Fine\",\r\n\t\trepeat_radio_end2: \"Dopo\",\r\n\t\tmonth_for_recurring: [\"Gennaio\", \"Febbraio\", \"Marzo\", \"Aprile\", \"Maggio\", \"Jiugno\", \"Luglio\", \"Agosto\", \"Settembre\", \"Ottobre\", \"Novembre\", \"Dicembre\"],\r\n\t\tday_for_recurring: [\"Domenica\", \"Lunedì\", \"Martedì\", \"Mercoledì\", \"Jovedì\", \"Venerdì\", \"Sabato\"]\r\n\t}\r\n};\r\n","/*\r\n Translation by Genexus Japan Inc.\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tmonth_short: [ \"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tday_full: [\"日曜日\", \"月曜日\", \"火曜日\", \"水曜日\", \"木曜日\", \"金曜日\", \"土曜日\"],\r\n\t\tday_short: [\"日\", \"月\", \"火\", \"水\", \"木\", \"金\", \"土\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"今日\",\r\n\t\tday_tab: \"日\",\r\n\t\tweek_tab: \"週\",\r\n\t\tmonth_tab: \"月\",\r\n\t\tnew_event: \"新イベント\",\r\n\t\ticon_save: \"保存\",\r\n\t\ticon_cancel: \"キャンセル\",\r\n\t\ticon_details: \"詳細\",\r\n\t\ticon_edit: \"編集\",\r\n\t\ticon_delete: \"削除\",\r\n\t\tconfirm_closing: \"\", //変更が取り消されます、宜しいですか?\r\n\t\tconfirm_deleting: \"イベント完全に削除されます、宜しいですか?\",\r\n\t\tsection_description: \"デスクリプション\",\r\n\t\tsection_time: \"期間\",\r\n\t\tconfirm_recurring: \"繰り返されているイベントを全て編集しますか?\",\r\n\t\tsection_recurring: \"イベントを繰り返す\",\r\n\t\tbutton_recurring: \"無効\",\r\n\t\tbutton_recurring_open: \"有効\",\r\n\t\tfull_day: \"終日\",\r\n\t\tbutton_edit_series: \"シリーズを編集します\",\r\n\t\tbutton_edit_occurrence: \"コピーを編集\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"議題は\",\r\n\t\tdate: \"日付\",\r\n\t\tdescription: \"説明\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"今年\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"議題は\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"グリッド\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};\r\n\r\n\r\n","export default class LocaleManager{\r\n\tconstructor(config){\r\n\t\tthis._locales = {};\r\n\t\tfor(const i in config){\r\n\t\t\tthis._locales[i] = config[i];\r\n\t\t}\r\n\t}\r\n\r\n\taddLocale(name, locale) {\r\n\t\tthis._locales[name] = locale;\r\n\t}\r\n\r\n\tgetLocale(name) {\r\n\t\treturn this._locales[name];\r\n\t}\r\n}","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Mon\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"I dag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uke\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny hendelse\",\r\n\t\ticon_save: \"Lagre\",\r\n\t\ticon_cancel: \"Avbryt\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Rediger\",\r\n\t\ticon_delete: \"Slett\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Hendelsen vil bli slettet permanent. Er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du forandre hele dette settet av repeterende hendelser?\",\r\n\t\tsection_recurring: \"Repeter hendelsen\",\r\n\t\tbutton_recurring: \"Av\",\r\n\t\tbutton_recurring_open: \"På\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Redigere en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daglig\",\r\n\t\trepeat_radio_week: \"Ukentlig\",\r\n\t\trepeat_radio_month: \"Månedlig\",\r\n\t\trepeat_radio_year: \"Årlig\",\r\n\t\trepeat_radio_day_type: \"Hver\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"Alle hverdager\",\r\n\t\trepeat_week: \" Gjentas hver\",\r\n\t\trepeat_text_week_count: \"uke på:\",\r\n\t\trepeat_radio_month_type: \"På hver\",\r\n\t\trepeat_radio_month_start: \"På\",\r\n\t\trepeat_text_month_day: \"dag hver\",\r\n\t\trepeat_text_month_count: \"måned\",\r\n\t\trepeat_text_month_count2_before: \"hver\",\r\n\t\trepeat_text_month_count2_after: \"måned\",\r\n\t\trepeat_year_label: \"på\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Ingen sluttdato\",\r\n\t\trepeat_text_occurences_count: \"forekomst\",\r\n\t\trepeat_radio_end3: \"Stop den\",\r\n\t\trepeat_radio_end2: \"Etter\",\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tday_for_recurring: [\"Sondag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Maart\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Augustus\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"mrt\", \"Apr\", \"Mei\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Zondag\", \"Maandag\", \"Dinsdag\", \"Woensdag\", \"Donderdag\", \"Vrijdag\", \"Zaterdag\"],\r\n\t\tday_short: [\"Zo\", \"Ma\", \"Di\", \"Wo\", \"Do\", \"Vr\", \"Za\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Vandaag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Week\",\r\n\t\tmonth_tab: \"Maand\",\r\n\t\tnew_event: \"Nieuw item\",\r\n\t\ticon_save: \"Opslaan\",\r\n\t\ticon_cancel: \"Annuleren\",\r\n\t\ticon_details: \"Details\",\r\n\t\ticon_edit: \"Bewerken\",\r\n\t\ticon_delete: \"Verwijderen\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Item zal permanent worden verwijderd, doorgaan?\",\r\n\t\tsection_description: \"Beschrijving\",\r\n\t\tsection_time: \"Tijd periode\",\r\n\t\tfull_day: \"Hele dag\",\r\n\r\n\t\tconfirm_recurring: \"Wilt u alle terugkerende items bijwerken?\",\r\n\t\tsection_recurring: \"Item herhalen\",\r\n\t\tbutton_recurring: \"Uit\",\r\n\t\tbutton_recurring_open: \"Aan\",\r\n\t\tbutton_edit_series: \"Bewerk de serie\",\r\n\t\tbutton_edit_occurrence: \"Bewerk een kopie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Omschrijving\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Jaar\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabel\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Dagelijks\",\r\n\t\trepeat_radio_week: \"Wekelijks\",\r\n\t\trepeat_radio_month: \"Maandelijks\",\r\n\t\trepeat_radio_year: \"Jaarlijks\",\r\n\t\trepeat_radio_day_type: \"Elke\",\r\n\t\trepeat_text_day_count: \"dag(en)\",\r\n\t\trepeat_radio_day_type2: \"Elke werkdag\",\r\n\t\trepeat_week: \" Herhaal elke\",\r\n\t\trepeat_text_week_count: \"week op de volgende dagen:\",\r\n\t\trepeat_radio_month_type: \"Herhaal\",\r\n\t\trepeat_radio_month_start: \"Op\",\r\n\t\trepeat_text_month_day: \"dag iedere\",\r\n\t\trepeat_text_month_count: \"maanden\",\r\n\t\trepeat_text_month_count2_before: \"iedere\",\r\n\t\trepeat_text_month_count2_after: \"maanden\",\r\n\t\trepeat_year_label: \"Op\",\r\n\t\tselect_year_day2: \"van\",\r\n\t\trepeat_text_year_day: \"dag\",\r\n\t\tselect_year_month: \"maand\",\r\n\t\trepeat_radio_end: \"Geen eind datum\",\r\n\t\trepeat_text_occurences_count: \"keren\",\r\n\t\trepeat_radio_end3: \"Eindigd per\",\r\n\t\trepeat_radio_end2: \"Na\",\r\n\t\tmonth_for_recurring: [\"Januari\", \"Februari\", \"Maart\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Augustus\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Zondag\", \"Maandag\", \"Dinsdag\", \"Woensdag\", \"Donderdag\", \"Vrijdag\", \"Zaterdag\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Man\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uke\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny\",\r\n\t\ticon_save: \"Lagre\",\r\n\t\ticon_cancel: \"Avbryt\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Endre\",\r\n\t\ticon_delete: \"Slett\",\r\n\t\tconfirm_closing: \"Endringer blir ikke lagret, er du sikker?\", //Endringer blir ikke lagret, er du sikker?\r\n\t\tconfirm_deleting: \"Oppføringen vil bli slettet, er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\t\tfull_day: \"Full dag\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du endre hele settet med repeterende oppføringer?\",\r\n\t\tsection_recurring: \"Repeterende oppføring\",\r\n\t\tbutton_recurring: \"Ikke aktiv\",\r\n\t\tbutton_recurring_open: \"Aktiv\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Redigere en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Styczeń\", \"Luty\", \"Marzec\", \"Kwiecień\", \"Maj\", \"Czerwiec\", \"Lipiec\", \"Sierpień\", \"Wrzesień\", \"Październik\", \"Listopad\", \"Grudzień\"],\r\n\t\tmonth_short: [\"Sty\", \"Lut\", \"Mar\", \"Kwi\", \"Maj\", \"Cze\", \"Lip\", \"Sie\", \"Wrz\", \"Paź\", \"Lis\", \"Gru\"],\r\n\t\tday_full: [\"Niedziela\", \"Poniedziałek\", \"Wtorek\", \"Środa\", \"Czwartek\", \"Piątek\", \"Sobota\"],\r\n\t\tday_short: [\"Nie\", \"Pon\", \"Wto\", \"Śro\", \"Czw\", \"Pią\", \"Sob\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dziś\",\r\n\t\tday_tab: \"Dzień\",\r\n\t\tweek_tab: \"Tydzień\",\r\n\t\tmonth_tab: \"Miesiąc\",\r\n\t\tnew_event: \"Nowe zdarzenie\",\r\n\t\ticon_save: \"Zapisz\",\r\n\t\ticon_cancel: \"Anuluj\",\r\n\t\ticon_details: \"Szczegóły\",\r\n\t\ticon_edit: \"Edytuj\",\r\n\t\ticon_delete: \"Usuń\",\r\n\t\tconfirm_closing: \"\", //Zmiany zostaną usunięte, jesteś pewien?\r\n\t\tconfirm_deleting: \"Zdarzenie zostanie usunięte na zawsze, kontynuować?\",\r\n\t\tsection_description: \"Opis\",\r\n\t\tsection_time: \"Okres czasu\",\r\n\t\tfull_day: \"Cały dzień\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Czy chcesz edytować cały zbiór powtarzających się zdarzeń?\",\r\n\t\tsection_recurring: \"Powtórz zdarzenie\",\r\n\t\tbutton_recurring: \"Nieaktywne\",\r\n\t\tbutton_recurring_open: \"Aktywne\",\r\n\t\tbutton_edit_series: \"Edytuj serię\",\r\n\t\tbutton_edit_occurrence: \"Edytuj kopię\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Opis\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabela\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Codziennie\",\r\n\t\trepeat_radio_week: \"Co tydzie\",\r\n\t\trepeat_radio_month: \"Co miesic\",\r\n\t\trepeat_radio_year: \"Co rok\",\r\n\t\trepeat_radio_day_type: \"Kadego\",\r\n\t\trepeat_text_day_count: \"dnia\",\r\n\t\trepeat_radio_day_type2: \"Kadego dnia roboczego\",\r\n\t\trepeat_week: \" Powtarzaj kadego\",\r\n\t\trepeat_text_week_count: \"tygodnia w dni:\",\r\n\t\trepeat_radio_month_type: \"Powtrz\",\r\n\t\trepeat_radio_month_start: \"W\",\r\n\t\trepeat_text_month_day: \"dnia kadego\",\r\n\t\trepeat_text_month_count: \"miesica\",\r\n\t\trepeat_text_month_count2_before: \"kadego\",\r\n\t\trepeat_text_month_count2_after: \"miesica\",\r\n\t\trepeat_year_label: \"W\",\r\n\t\tselect_year_day2: \"miesica\",\r\n\t\trepeat_text_year_day: \"dnia miesica\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Bez daty kocowej\",\r\n\t\trepeat_text_occurences_count: \"wystpieniu/ach\",\r\n\t\trepeat_radio_end3: \"Zakocz w\",\r\n\t\trepeat_radio_end2: \"Po\",\r\n\t\tmonth_for_recurring: [\"Stycznia\", \"Lutego\", \"Marca\", \"Kwietnia\", \"Maja\", \"Czerwca\", \"Lipca\", \"Sierpnia\", \"Wrzenia\", \"Padziernka\", \"Listopada\", \"Grudnia\"],\r\n\t\tday_for_recurring: [\"Niedziela\", \"Poniedziaek\", \"Wtorek\", \"roda\", \"Czwartek\", \"Pitek\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","/*\r\n\r\n TRANSLATION BY MATTHEUS PIROVANI RORIZ GONЗALVES\r\n\r\n mattheusroriz@hotmail.com / mattheus.pirovani@gmail.com /\r\n\r\n www.atrixian.com.br\r\n\r\n */\r\n\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Janeiro\", \"Fevereiro\", \"Março\", \"Abril\", \"Maio\", \"Junho\", \"Julho\", \"Agosto\", \"Setembro\", \"Outubro\", \"Novembro\", \"Dezembro\"],\r\n\t\tmonth_short: [\"Jan\", \"Fev\", \"Mar\", \"Abr\", \"Mai\", \"Jun\", \"Jul\", \"Ago\", \"Set\", \"Out\", \"Nov\", \"Dez\"],\r\n\t\tday_full: [\"Domingo\", \"Segunda\", \"Terça\", \"Quarta\", \"Quinta\", \"Sexta\", \"Sábado\"],\r\n\t\tday_short: [\"Dom\", \"Seg\", \"Ter\", \"Qua\", \"Qui\", \"Sex\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hoje\",\r\n\t\tday_tab: \"Dia\",\r\n\t\tweek_tab: \"Semana\",\r\n\t\tmonth_tab: \"Mês\",\r\n\t\tnew_event: \"Novo evento\",\r\n\t\ticon_save: \"Salvar\",\r\n\t\ticon_cancel: \"Cancelar\",\r\n\t\ticon_details: \"Detalhes\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Deletar\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Tem certeza que deseja excluir?\",\r\n\t\tsection_description: \"Descrição\",\r\n\t\tsection_time: \"Período de tempo\",\r\n\t\tfull_day: \"Dia inteiro\",\r\n\r\n\t\tconfirm_recurring: \"Deseja editar todos esses eventos repetidos?\",\r\n\t\tsection_recurring: \"Repetir evento\",\r\n\t\tbutton_recurring: \"Desabilitar\",\r\n\t\tbutton_recurring_open: \"Habilitar\",\r\n\t\tbutton_edit_series: \"Editar a série\",\r\n\t\tbutton_edit_occurrence: \"Editar uma cópia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dia\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descrição\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Ano\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dia\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grade\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Diário\",\r\n\t\trepeat_radio_week: \"Semanal\",\r\n\t\trepeat_radio_month: \"Mensal\",\r\n\t\trepeat_radio_year: \"Anual\",\r\n\t\trepeat_radio_day_type: \"Cada\",\r\n\t\trepeat_text_day_count: \"dia(s)\",\r\n\t\trepeat_radio_day_type2: \"Cada trabalho diário\",\r\n\t\trepeat_week: \" Repita cada\",\r\n\t\trepeat_text_week_count: \"semana:\",\r\n\t\trepeat_radio_month_type: \"Repetir\",\r\n\t\trepeat_radio_month_start: \"Em\",\r\n\t\trepeat_text_month_day: \"todo dia\",\r\n\t\trepeat_text_month_count: \"mês\",\r\n\t\trepeat_text_month_count2_before: \"todo\",\r\n\t\trepeat_text_month_count2_after: \"mês\",\r\n\t\trepeat_year_label: \"Em\",\r\n\t\tselect_year_day2: \"of\",\r\n\t\trepeat_text_year_day: \"dia\",\r\n\t\tselect_year_month: \"mês\",\r\n\t\trepeat_radio_end: \"Sem data final\",\r\n\t\trepeat_text_occurences_count: \"ocorrências\",\r\n\t\trepeat_radio_end3: \"Fim\",\r\n\t\trepeat_radio_end2: \"Depois\",\r\n\t\tmonth_for_recurring: [\"Janeiro\", \"Fevereiro\", \"Março\", \"Abril\", \"Maio\", \"Junho\", \"Julho\", \"Agosto\", \"Setembro\", \"Outubro\", \"Novembro\", \"Dezembro\"],\r\n\t\tday_for_recurring: [\"Domingo\", \"Segunda\", \"Terça\", \"Quarta\", \"Quinta\", \"Sexta\", \"Sábado\"]\r\n\t}\r\n};\r\n\r\n\r\n","/*\r\n\tTraducere de Ovidiu Lixandru: http://www.madball.ro\r\n */\r\n\r\nexport default {\r\n\tdate:{\r\n\t\tmonth_full:[\"Ianuarie\", \"Februarie\", \"Martie\", \"Aprilie\", \"Mai\", \"Iunie\", \"Iulie\", \"August\", \"Septembrie\", \"Octombrie\", \"November\", \"December\"],\r\n\t\tmonth_short:[\"Ian\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Iun\", \"Iul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\r\n\t\tday_full:[\"Duminica\", \"Luni\", \"Marti\", \"Miercuri\", \"Joi\", \"Vineri\", \"Sambata\"],\r\n\t\tday_short:[\"Du\", \"Lu\", \"Ma\", \"Mi\", \"Jo\", \"Vi\", \"Sa\"]\r\n\t},\r\n\tlabels:{\r\n\t\tdhx_cal_today_button:\"Astazi\",\r\n\t\tday_tab:\"Zi\",\r\n\t\tweek_tab:\"Saptamana\",\r\n\t\tmonth_tab:\"Luna\",\r\n\t\tnew_event:\"Eveniment nou\",\r\n\t\ticon_save:\"Salveaza\",\r\n\t\ticon_cancel:\"Anuleaza\",\r\n\t\ticon_details:\"Detalii\",\r\n\t\ticon_edit:\"Editeaza\",\r\n\t\ticon_delete:\"Sterge\",\r\n\t\tconfirm_closing:\"Schimbarile nu vor fi salvate, esti sigur?\",//Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting:\"Evenimentul va fi sters permanent, esti sigur?\",\r\n\t\tsection_description:\"Descriere\",\r\n\t\tsection_time:\"Interval\",\r\n\t\tfull_day:\"Toata ziua\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring:\"Vrei sa editezi toata seria de evenimente repetate?\",\r\n\t\tsection_recurring:\"Repetare\",\r\n\t\tbutton_recurring:\"Dezactivata\",\r\n\t\tbutton_recurring_open:\"Activata\",\r\n\t\tbutton_edit_series: \"Editeaza serie\",\r\n\t\tbutton_edit_occurrence: \"Editeaza doar intrare\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"Agenda\",\r\n\t\tdate:\"Data\",\r\n\t\tdescription:\"Descriere\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"An\",\r\n\r\n\t\t/* week agenda extension */\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Lista\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Zilnic\",\r\n\t\trepeat_radio_week: \"Saptamanal\",\r\n\t\trepeat_radio_month: \"Lunar\",\r\n\t\trepeat_radio_year: \"Anual\",\r\n\t\trepeat_radio_day_type: \"La fiecare\",\r\n\t\trepeat_text_day_count: \"zi(le)\",\r\n\t\trepeat_radio_day_type2: \"Fiecare zi lucratoare\",\r\n\t\trepeat_week: \" Repeta la fiecare\",\r\n\t\trepeat_text_week_count: \"saptamana in urmatoarele zile:\",\r\n\t\trepeat_radio_month_type: \"Repeta in\",\r\n\t\trepeat_radio_month_start: \"In a\",\r\n\t\trepeat_text_month_day: \"zi la fiecare\",\r\n\t\trepeat_text_month_count: \"luni\",\r\n\t\trepeat_text_month_count2_before: \"la fiecare\",\r\n\t\trepeat_text_month_count2_after: \"luni\",\r\n\t\trepeat_year_label: \"In\",\r\n\t\tselect_year_day2: \"a lunii\",\r\n\t\trepeat_text_year_day: \"zi a lunii\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Fara data de sfarsit\",\r\n\t\trepeat_text_occurences_count: \"evenimente\",\r\n\t\trepeat_radio_end3: \"La data\",\r\n\t\trepeat_radio_end2: \"Dupa\",\r\n\t\tmonth_for_recurring: [\"Ianuarie\", \"Februarie\", \"Martie\", \"Aprilie\", \"Mai\", \"Iunie\", \"Iulie\", \"August\", \"Septembrie\", \"Octombrie\", \"Noiembrie\", \"Decembrie\"],\r\n\t\tday_for_recurring: [\"Duminica\", \"Luni\", \"Marti\", \"Miercuri\", \"Joi\", \"Vineri\", \"Sambata\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Январь\", \"Февраль\", \"Март\", \"Апрель\", \"Maй\", \"Июнь\", \"Июль\", \"Август\", \"Сентябрь\", \"Oктябрь\", \"Ноябрь\", \"Декабрь\"],\r\n\t\tmonth_short: [\"Янв\", \"Фев\", \"Maр\", \"Aпр\", \"Maй\", \"Июн\", \"Июл\", \"Aвг\", \"Сен\", \"Окт\", \"Ноя\", \"Дек\"],\r\n\t\tday_full: [ \"Воскресенье\", \"Понедельник\", \"Вторник\", \"Среда\", \"Четверг\", \"Пятница\", \"Суббота\"],\r\n\t\tday_short: [\"Вс\", \"Пн\", \"Вт\", \"Ср\", \"Чт\", \"Пт\", \"Сб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сегодня\",\r\n\t\tday_tab: \"День\",\r\n\t\tweek_tab: \"Неделя\",\r\n\t\tmonth_tab: \"Месяц\",\r\n\t\tnew_event: \"Новое событие\",\r\n\t\ticon_save: \"Сохранить\",\r\n\t\ticon_cancel: \"Отменить\",\r\n\t\ticon_details: \"Детали\",\r\n\t\ticon_edit: \"Изменить\",\r\n\t\ticon_delete: \"Удалить\",\r\n\t\tconfirm_closing: \"\", //Ваши изменения будут потеряны, продолжить?\r\n\t\tconfirm_deleting: \"Событие будет удалено безвозвратно, продолжить?\",\r\n\t\tsection_description: \"Описание\",\r\n\t\tsection_time: \"Период времени\",\r\n\t\tfull_day: \"Весь день\",\r\n\r\n\t\tconfirm_recurring: \"Вы хотите изменить всю серию повторяющихся событий?\",\r\n\t\tsection_recurring: \"Повторение\",\r\n\t\tbutton_recurring: \"Отключено\",\r\n\t\tbutton_recurring_open: \"Включено\",\r\n\t\tbutton_edit_series: \"Редактировать серию\",\r\n\t\tbutton_edit_occurrence: \"Редактировать экземпляр\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Список\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Описание\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Год\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Список\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Таблица\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"День\",\r\n\t\trepeat_radio_week: \"Неделя\",\r\n\t\trepeat_radio_month: \"Месяц\",\r\n\t\trepeat_radio_year: \"Год\",\r\n\t\trepeat_radio_day_type: \"Каждый\",\r\n\t\trepeat_text_day_count: \"день\",\r\n\t\trepeat_radio_day_type2: \"Каждый рабочий день\",\r\n\t\trepeat_week: \" Повторять каждую\",\r\n\t\trepeat_text_week_count: \"неделю , в:\",\r\n\t\trepeat_radio_month_type: \"Повторять\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" числа каждый \",\r\n\t\trepeat_text_month_count: \"месяц\",\r\n\t\trepeat_text_month_count2_before: \"каждый \",\r\n\t\trepeat_text_month_count2_after: \"месяц\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"день\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без даты окончания\",\r\n\t\trepeat_text_occurences_count: \"повторений\",\r\n\t\trepeat_radio_end3: \"До \",\r\n\t\trepeat_radio_end2: \"\",\r\n\t\tmonth_for_recurring: [\"Января\", \"Февраля\", \"Марта\", \"Апреля\", \"Мая\", \"Июня\", \"Июля\", \"Августа\", \"Сентября\", \"Октября\", \"Ноября\", \"Декабря\"],\r\n\t\tday_for_recurring: [\"Воскресенье\", \"Понедельник\", \"Вторник\", \"Среду\", \"Четверг\", \"Пятницу\", \"Субботу\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Marec\", \"April\", \"Maj\", \"Junij\", \"Julij\", \"Avgust\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Nedelja\", \"Ponedeljek\", \"Torek\", \"Sreda\", \"Četrtek\", \"Petek\", \"Sobota\"],\r\n\t\tday_short: [\"Ned\", \"Pon\", \"Tor\", \"Sre\", \"Čet\", \"Pet\", \"Sob\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Danes\",\r\n\t\tday_tab: \"Dan\",\r\n\t\tweek_tab: \"Teden\",\r\n\t\tmonth_tab: \"Mesec\",\r\n\t\tnew_event: \"Nov dogodek\",\r\n\t\ticon_save: \"Shrani\",\r\n\t\ticon_cancel: \"Prekliči\",\r\n\t\ticon_details: \"Podrobnosti\",\r\n\t\ticon_edit: \"Uredi\",\r\n\t\ticon_delete: \"Izbriši\",\r\n\t\tconfirm_closing: \"\", //Spremembe ne bodo shranjene. Želite nadaljevati ?\r\n\t\tconfirm_deleting: \"Dogodek bo izbrisan. Želite nadaljevati?\",\r\n\t\tsection_description: \"Opis\",\r\n\t\tsection_time: \"Časovni okvir\",\r\n\t\tfull_day: \"Ves dan\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Želite urediti celoten set ponavljajočih dogodkov?\",\r\n\t\tsection_recurring: \"Ponovi dogodek\",\r\n\t\tbutton_recurring: \"Onemogočeno\",\r\n\t\tbutton_recurring_open: \"Omogočeno\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Edit occurrence\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Zadeva\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Opis\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Leto\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Zadeva\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Miza\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Január\", \"Február\", \"Marec\", \"Apríl\", \"Máj\", \"Jún\", \"Júl\", \"August\", \"September\", \"Október\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Máj\", \"Jún\", \"Júl\", \"Aug\", \"Sept\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Nedeľa\", \"Pondelok\", \"Utorok\", \"Streda\", \"Štvrtok\", \"Piatok\", \"Sobota\"],\r\n\t\tday_short: [\"Ne\", \"Po\", \"Ut\", \"St\", \"Št\", \"Pi\", \"So\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dnes\",\r\n\t\tday_tab: \"Deň\",\r\n\t\tweek_tab: \"Týždeň\",\r\n\t\tmonth_tab: \"Mesiac\",\r\n\t\tnew_event: \"Nová udalosť\",\r\n\t\ticon_save: \"Uložiť\",\r\n\t\ticon_cancel: \"Späť\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edituj\",\r\n\t\ticon_delete: \"Zmazať\",\r\n\t\tconfirm_closing: \"Vaše zmeny nebudú uložené. Skutočne?\", //Vaše změny budou ztraceny, opravdu ?\r\n\t\tconfirm_deleting: \"Udalosť bude natrvalo vymazaná. Skutočne?\",\r\n\t\tsection_description: \"Poznámky\",\r\n\t\tsection_time: \"Doba platnosti\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Prajete si upraviť celú radu opakovaných udalostí?\",\r\n\t\tsection_recurring: \"Opakovanie udalosti\",\r\n\t\tbutton_recurring: \"Vypnuté\",\r\n\t\tbutton_recurring_open: \"Zapnuté\",\r\n\t\tbutton_edit_series: \"Upraviť opakovania\",\r\n\t\tbutton_edit_occurrence: \"Upraviť inštancie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Program\",\r\n\t\tdate: \"Dátum\",\r\n\t\tdescription: \"Poznámka\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\t\tfull_day: \"Celý deň\", // Full day\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Program\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Mriežka\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Denne\",\r\n\t\trepeat_radio_week: \"Týždenne\",\r\n\t\trepeat_radio_month: \"Mesaène\",\r\n\t\trepeat_radio_year: \"Roène\",\r\n\t\trepeat_radio_day_type: \"Každý\",\r\n\t\trepeat_text_day_count: \"deò\",\r\n\t\trepeat_radio_day_type2: \"Každý prac. deò\",\r\n\t\trepeat_week: \"Opakova každý\",\r\n\t\trepeat_text_week_count: \"týždeò v dòoch:\",\r\n\t\trepeat_radio_month_type: \"Opakova\",\r\n\t\trepeat_radio_month_start: \"On\",\r\n\t\trepeat_text_month_day: \"deò každý\",\r\n\t\trepeat_text_month_count: \"mesiac\",\r\n\t\trepeat_text_month_count2_before: \"každý\",\r\n\t\trepeat_text_month_count2_after: \"mesiac\",\r\n\t\trepeat_year_label: \"On\",\r\n\t\tselect_year_day2: \"poèas\",\r\n\t\trepeat_text_year_day: \"deò\",\r\n\t\tselect_year_month: \"mesiac\",\r\n\t\trepeat_radio_end: \"Bez dátumu ukonèenia\",\r\n\t\trepeat_text_occurences_count: \"udalostiach\",\r\n\t\trepeat_radio_end3: \"Ukonèi\",\r\n\t\trepeat_radio_end2: \"Po\",\r\n\t\tmonth_for_recurring: [\"Január\", \"Február\", \"Marec\", \"Apríl\", \"Máj\", \"Jún\", \"Júl\", \"August\", \"September\", \"Október\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Nede¾a\", \"Pondelok\", \"Utorok\", \"Streda\", \"Štvrtok\", \"Piatok\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Mars\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"Augusti\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Söndag\", \"Måndag\", \"Tisdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lördag\"],\r\n\t\tday_short: [\"Sön\", \"Mån\", \"Tis\", \"Ons\", \"Tor\", \"Fre\", \"Lör\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Vecka\",\r\n\t\tmonth_tab: \"Månad\",\r\n\t\tnew_event: \"Ny händelse\",\r\n\t\ticon_save: \"Spara\",\r\n\t\ticon_cancel: \"Ångra\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Ändra\",\r\n\t\ticon_delete: \"Ta bort\",\r\n\t\tconfirm_closing: \"\", //Dina förändingar kommer gå förlorade, är du säker?\r\n\t\tconfirm_deleting: \"Är du säker på att du vill ta bort händelsen permanent?\",\r\n\t\tsection_description: \"Beskrivning\",\r\n\t\tsection_time: \"Tid\",\r\n\t\tfull_day: \"Hela dagen\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vill du redigera hela serien med repeterande händelser?\",\r\n\t\tsection_recurring: \"Upprepa händelse\",\r\n\t\tbutton_recurring: \"Inaktiverat\",\r\n\t\tbutton_recurring_open: \"Aktiverat\",\r\n\t\tbutton_edit_series: \"Redigera serien\",\r\n\t\tbutton_edit_occurrence: \"Redigera en kopia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dagordning\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Beskrivning\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dagordning\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Galler\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Dra för att skapa ny\",\r\n\t\tdrag_to_move:\"Dra för att flytta\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Dagligen\",\r\n\t\trepeat_radio_week: \"Veckovis\",\r\n\t\trepeat_radio_month: \"Månadsvis\",\r\n\t\trepeat_radio_year: \"Årligen\",\r\n\t\trepeat_radio_day_type: \"Var\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"Varje arbetsdag\",\r\n\t\trepeat_week: \" Upprepa var\",\r\n\t\trepeat_text_week_count: \"vecka dessa dagar:\",\r\n\t\trepeat_radio_month_type: \"Upprepa\",\r\n\t\trepeat_radio_month_start: \"Den\",\r\n\t\trepeat_text_month_day: \"dagen var\",\r\n\t\trepeat_text_month_count: \"månad\",\r\n\t\trepeat_text_month_count2_before: \"var\",\r\n\t\trepeat_text_month_count2_after: \"månad\",\r\n\t\trepeat_year_label: \"Den\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"månad\",\r\n\t\trepeat_radio_end: \"Inget slutdatum\",\r\n\t\trepeat_text_occurences_count: \"upprepningar\",\r\n\t\trepeat_radio_end3: \"Sluta efter\",\r\n\t\trepeat_radio_end2: \"Efter\",\r\n\t\tmonth_for_recurring: [\"Januari\", \"Februari\", \"Mars\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"Augusti\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Söndag\", \"Måndag\", \"Tisdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lördag\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Ocak\", \"Þubat\", \"Mart\", \"Nisan\", \"Mayýs\", \"Haziran\", \"Temmuz\", \"Aðustos\", \"Eylül\", \"Ekim\", \"Kasým\", \"Aralýk\"],\r\n\t\tmonth_short: [\"Oca\", \"Þub\", \"Mar\", \"Nis\", \"May\", \"Haz\", \"Tem\", \"Aðu\", \"Eyl\", \"Eki\", \"Kas\", \"Ara\"],\r\n\t\tday_full: [\"Pazar\", \"Pazartes,\", \"Salý\", \"Çarþamba\", \"Perþembe\", \"Cuma\", \"Cumartesi\"],\r\n\t\tday_short: [\"Paz\", \"Pts\", \"Sal\", \"Çar\", \"Per\", \"Cum\", \"Cts\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Bugün\",\r\n\t\tday_tab: \"Gün\",\r\n\t\tweek_tab: \"Hafta\",\r\n\t\tmonth_tab: \"Ay\",\r\n\t\tnew_event: \"Uygun\",\r\n\t\ticon_save: \"Kaydet\",\r\n\t\ticon_cancel: \"Ýptal\",\r\n\t\ticon_details: \"Detaylar\",\r\n\t\ticon_edit: \"Düzenle\",\r\n\t\ticon_delete: \"Sil\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Etkinlik silinecek, devam?\",\r\n\t\tsection_description: \"Açýklama\",\r\n\t\tsection_time: \"Zaman aralýðý\",\r\n\t\tfull_day: \"Tam gün\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Tüm tekrar eden etkinlikler silinecek, devam?\",\r\n\t\tsection_recurring: \"Etkinliði tekrarla\",\r\n\t\tbutton_recurring: \"Pasif\",\r\n\t\tbutton_recurring_open: \"Aktif\",\r\n\t\tbutton_edit_series: \"Dizi düzenleme\",\r\n\t\tbutton_edit_occurrence: \"Bir kopyasını düzenleyin\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Ajanda\",\r\n\t\tdate: \"Tarih\",\r\n\t\tdescription: \"Açýklama\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Yýl\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Ajanda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Izgara\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Січень\", \"Лютий\", \"Березень\", \"Квітень\", \"Травень\", \"Червень\", \"Липень\", \"Серпень\", \"Вересень\", \"Жовтень\", \"Листопад\", \"Грудень\"],\r\n\t\tmonth_short: [\"Січ\", \"Лют\", \"Бер\", \"Кві\", \"Тра\", \"Чер\", \"Лип\", \"Сер\", \"Вер\", \"Жов\", \"Лис\", \"Гру\"],\r\n\t\tday_full: [\"Неділя\", \"Понеділок\", \"Вівторок\", \"Середа\", \"Четвер\", \"П'ятниця\", \"Субота\"],\r\n\t\tday_short: [\"Нед\", \"Пон\", \"Вів\", \"Сер\", \"Чет\", \"Птн\", \"Суб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сьогодні\",\r\n\t\tday_tab: \"День\",\r\n\t\tweek_tab: \"Тиждень\",\r\n\t\tmonth_tab: \"Місяць\",\r\n\t\tnew_event: \"Нова подія\",\r\n\t\ticon_save: \"Зберегти\",\r\n\t\ticon_cancel: \"Відміна\",\r\n\t\ticon_details: \"Деталі\",\r\n\t\ticon_edit: \"Редагувати\",\r\n\t\ticon_delete: \"Вилучити\",\r\n\t\tconfirm_closing: \"\", //Ваші зміни втратяться. Ви впевнені ?\r\n\t\tconfirm_deleting: \"Подія вилучиться назавжди. Ви впевнені?\",\r\n\t\tsection_description: \"Опис\",\r\n\t\tsection_time: \"Часовий проміжок\",\r\n\t\tfull_day: \"Весь день\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Хочете редагувати весь перелік повторюваних подій?\",\r\n\t\tsection_recurring: \"Повторювана подія\",\r\n\t\tbutton_recurring: \"Відключено\",\r\n\t\tbutton_recurring_open: \"Включено\",\r\n\t\tbutton_edit_series: \"Редагувати серію\",\r\n\t\tbutton_edit_occurrence: \"Редагувати примірник\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Перелік\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Опис\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Рік\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Перелік\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Таблиця\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"День\",\r\n\t\trepeat_radio_week: \"Тиждень\",\r\n\t\trepeat_radio_month: \"Місяць\",\r\n\t\trepeat_radio_year: \"Рік\",\r\n\t\trepeat_radio_day_type: \"Кожний\",\r\n\t\trepeat_text_day_count: \"день\",\r\n\t\trepeat_radio_day_type2: \"Кожний робочий день\",\r\n\t\trepeat_week: \" Повторювати кожен\",\r\n\t\trepeat_text_week_count: \"тиждень , по:\",\r\n\t\trepeat_radio_month_type: \"Повторювати\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" числа кожний \",\r\n\t\trepeat_text_month_count: \"місяць\",\r\n\t\trepeat_text_month_count2_before: \"кожен \",\r\n\t\trepeat_text_month_count2_after: \"місяць\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"день\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без дати закінчення\",\r\n\t\trepeat_text_occurences_count: \"повторень\",\r\n\t\trepeat_radio_end3: \"До \",\r\n\t\trepeat_radio_end2: \"\",\r\n\t\tmonth_for_recurring: [\"січня\", \"лютого\", \"березня\", \"квітня\", \"травня\", \"червня\", \"липня\", \"серпня\", \"вересня\", \"жовтня\", \"листопада\", \"грудня\"],\r\n\t\tday_for_recurring: [\"Неділям\", \"Понеділкам\", \"Вівторкам\", \"Середам\", \"Четвергам\", \"П'ятницям\", \"Суботам\"]\r\n\t}\r\n};\r\n","import eventable from \"../utils/eventable\";\r\n\r\nexport class DatePicker {\r\n\tconstructor(scheduler, container, state = {}) {\r\n\t\tthis.state = {\r\n\t\t\tdate: new Date(),\r\n\t\t\tmodes: ['days', 'months', 'years'],\r\n\t\t\tcurrentRange: [],\r\n\t\t\teventDates: [],\r\n\t\t\tcurrentModeIndex: 0,\r\n\t\t\t...state\r\n\t\t};\r\n\t\tthis.container = null;\r\n\t\tthis.element = null;\r\n\t\tthis.onStateChangeHandlers = [];\r\n\t\tthis.scheduler = scheduler;\r\n\t\tthis._domEvents = scheduler._createDomEventScope();\r\n\t\tthis.state = this.getState();\r\n\t\teventable(this);\r\n\t\tif(container){\r\n\r\n\t\t\tthis.container = container;\r\n\t\t\tthis.render(this.container);\r\n\t\t}\r\n\r\n\t\tthis.onStateChange((oldState, newState) => {\r\n\t\t\tthis.callEvent(\"onStateChange\", [newState, oldState]);\r\n\t\t});\r\n\t}\r\n\r\n\tgetState() {\r\n\t\treturn { \r\n\t\t\t...this.state,\r\n\t\t\tmode: this.state.modes[this.state.currentModeIndex]\r\n\t\t};\r\n\t}\r\n\r\n\tsetState(newState) {\r\n\t\tconst oldState = { ...this.state };\r\n\t\tif(newState.mode){\r\n\t\t\tnewState.currentModeIndex = this.state.modes.indexOf(newState.mode);\r\n\t\t}\r\n\t\tthis.state = { ...this.state, ...newState };\r\n\r\n\t\tthis._notifyStateChange(oldState, this.state);\r\n\r\n\t\tif (this.container) {\r\n\t\t\tthis.render(this.container);\r\n\t\t}\r\n\t}\r\n\r\n\tonStateChange(handler) {\r\n\t\tthis.onStateChangeHandlers.push(handler);\r\n\r\n\t\t// function to remove the handler\r\n\t\treturn () => {\r\n\t\t\tconst index = this.onStateChangeHandlers.indexOf(handler);\r\n\t\t\tif (index !== -1) {\r\n\t\t\t\tthis.onStateChangeHandlers.splice(index, 1);\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n\r\n\t_notifyStateChange(oldState, newState) {\r\n\t\tthis.onStateChangeHandlers.forEach(handler => handler(oldState, newState));\r\n\t}\r\n\r\n\t_adjustDate(direction) {\r\n\r\n\t\tconst {mode, date} = this.getState();\r\n\t\tconst newDate = new Date(date);\r\n\t\tif (mode === 'days') {\r\n\t\t\tnewDate.setMonth(date.getMonth() + direction);\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tnewDate.setFullYear(date.getFullYear() + direction);\r\n\t\t} else {\r\n\t\t\tnewDate.setFullYear(date.getFullYear() + direction * 10);\r\n\t\t}\r\n\t\tthis.setState({ date: newDate });\r\n\t}\r\n\r\n\t_toggleMode() {\r\n\t\tconst newIndex = (this.state.currentModeIndex + 1) % this.state.modes.length;\r\n\t\tthis.setState({ currentModeIndex: newIndex });\r\n\t}\r\n\r\n\t_renderCalendarHeader(container) {\r\n\t\tconst {mode, date} = this.getState();\r\n\r\n\t\tconst header = document.createElement('div');\r\n\t\theader.classList.add('dhx_cal_datepicker_header');\r\n\r\n\t\tconst backwardArrow = document.createElement('button');\r\n\r\n\t\tbackwardArrow.classList.add(\"dhx_cal_datepicker_arrow\", \"scheduler_icon\", \"arrow_left\");\r\n\t\theader.appendChild(backwardArrow);\r\n\r\n\t\tconst monthLabel = document.createElement('div');\r\n\t\tmonthLabel.classList.add('dhx_cal_datepicker_title');\r\n\r\n\t\tif (mode === 'days') {\r\n\t\t\tmonthLabel.innerText = date.toLocaleString('default', { month: 'long' }) + ' ' + date.getFullYear();\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tmonthLabel.innerText = date.getFullYear();\r\n\t\t} else {\r\n\t\t\tconst startYear = Math.floor(date.getFullYear() / 10) * 10;\r\n\t\t\tmonthLabel.innerText = `${startYear} - ${startYear + 9}`;\r\n\t\t}\r\n\r\n\t\tthis._domEvents.attach(monthLabel, \"click\", this._toggleMode.bind(this));\r\n\t\theader.appendChild(monthLabel);\r\n\r\n\t\tconst forwardArrow = document.createElement('button');\r\n\r\n\t\tforwardArrow.classList.add(\"dhx_cal_datepicker_arrow\", \"scheduler_icon\", \"arrow_right\");\r\n\t\theader.appendChild(forwardArrow);\r\n\r\n\t\tcontainer.appendChild(header);\r\n\r\n\t\tthis._domEvents.attach(backwardArrow, \"click\", this._adjustDate.bind(this, -1));\r\n\t\tthis._domEvents.attach(forwardArrow, \"click\", this._adjustDate.bind(this, 1));\r\n\t}\r\n\r\n\trender(container) {\r\n\t\tthis._domEvents.detachAll();\r\n\t\tthis.container = container || this.container; \r\n\t\tthis.container.innerHTML = '';\r\n\r\n\t\tif(!this.element){\r\n\t\t\tthis.element = document.createElement(\"div\");\r\n\t\t\tthis.element.classList.add(\"dhx_cal_datepicker\");\r\n\t\t}\r\n\t\tthis.element.innerHTML = '';\r\n\t\tthis.container.appendChild(this.element);\r\n\r\n\t\tthis._renderCalendarHeader(this.element);\r\n\t\tconst dataContainer = document.createElement(\"div\");\r\n\t\tdataContainer.classList.add(\"dhx_cal_datepicker_data\");\r\n\t\tthis.element.appendChild(dataContainer);\r\n\r\n\t\tconst {mode} = this.getState();\r\n\t\tif (mode === 'days') {\r\n\t\t\tthis._renderDayGrid(dataContainer);\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tthis._renderMonthGrid(dataContainer);\r\n\t\t} else {\r\n\t\t\tthis._renderYearGrid(dataContainer);\r\n\t\t}\r\n\t}\r\n\r\n\t_renderDayGridHeader(daysOfWeekContainer) {\r\n\t\tconst {date} = this.getState();\r\n\t\tconst scheduler = this.scheduler;\r\n\r\n\t\tlet currentDate = scheduler.date.week_start(new Date(date));\r\n\t\tconst maxDate = scheduler.date.add(scheduler.date.week_start(new Date(date)), 1, 'week');\r\n\r\n\t\tdaysOfWeekContainer.classList.add('dhx_cal_datepicker_days');\r\n\r\n\t\tconst labelFormat = scheduler.date.date_to_str(\"%D\");\r\n\r\n\t\twhile (currentDate.valueOf() < maxDate.valueOf()) {\r\n\t\t\tconst label = labelFormat(currentDate);\r\n\r\n\t\t\tconst dayElement = document.createElement('div');\r\n\t\t\tdayElement.setAttribute(\"data-day\", currentDate.getDay());\r\n\t\t\tdayElement.classList.add('dhx_cal_datepicker_dayname');\r\n\t\t\tdayElement.innerText = label;\r\n\t\t\tdaysOfWeekContainer.appendChild(dayElement);\r\n\r\n\t\t\tcurrentDate = scheduler.date.add(currentDate, 1, 'day');\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t_weeksBetween(min, max) {\r\n\t\tconst scheduler = this.scheduler;\r\n\t\tlet weeks = 0;\r\n\t\tlet currWeek = new Date(min);\r\n\t\twhile(currWeek.valueOf() < max.valueOf()){\r\n\t\t\tweeks += 1;\r\n\t\t\tcurrWeek = scheduler.date.week_start(scheduler.date.add(currWeek, 1, \"week\"));\r\n\t\t}\r\n\t\treturn weeks;\r\n\t}\r\n\r\n\t_renderDayGrid(container) {\r\n\t\tconst {date, currentRange, eventDates, minWeeks} = this.getState();\r\n\r\n\t\tlet minSchedulerDate = currentRange[0];\r\n\t\tlet maxSchedulerDate = currentRange[1];\r\n\r\n\t\tconst eventDaysTable = eventDates.reduce((acc, date) => {\r\n\t\t\tconst dayStart = this.scheduler.date.day_start(new Date(date));\r\n\t\t\tacc[dayStart.valueOf()] = true;\r\n\t\t\treturn acc;\r\n\t\t}, {});\r\n\r\n\r\n\t\t// Render Days of the Week\r\n\t\tconst daysOfWeekContainer = document.createElement('div');\r\n\t\tthis._renderDayGridHeader(daysOfWeekContainer);\r\n\t\tcontainer.appendChild(daysOfWeekContainer);\r\n\r\n\t\tconst scheduler = this.scheduler;\r\n\t\tconst firstDate = scheduler.date.week_start(scheduler.date.month_start(new Date(date)));\r\n\t\tconst monthStart = scheduler.date.month_start(new Date(date));\r\n\t\tconst monthEnd = scheduler.date.add(scheduler.date.month_start(new Date(date)), 1, 'month');\r\n\t\tlet lastDate = scheduler.date.add(scheduler.date.month_start(new Date(date)), 1, 'month');\r\n\t\tif(lastDate.getDay() !== 0){\r\n\t\t\tlastDate = scheduler.date.add(scheduler.date.week_start(lastDate), 1, \"week\");\r\n\t\t}\r\n\r\n\t\tlet weeks = this._weeksBetween(firstDate, lastDate);\r\n\t\tif(minWeeks && weeks < minWeeks){\r\n\t\t\tlastDate = scheduler.date.add(lastDate, (minWeeks - weeks), \"week\");\r\n\t\t}\r\n\r\n\t\tlet currDate = firstDate;\r\n\r\n\t\tconst dayGridContainer = document.createElement('div');\r\n\t\tdayGridContainer.classList.add('dhx_cal_datepicker_days');\r\n\r\n\t\tthis._domEvents.attach(dayGridContainer, \"click\", (event) => {\r\n\t\t\tconst dateCell = event.target.closest(\"[data-cell-date]\");\r\n\t\t\tconst date = new Date(dateCell.getAttribute(\"data-cell-date\"));\r\n\t\t\tthis.callEvent(\"onDateClick\", [date, event]);\r\n\t\t});\r\n\r\n\t\twhile(currDate.valueOf() < lastDate.valueOf()){\r\n\t\t\tconst dayElement = document.createElement('div');\r\n\t\t\tdayElement.setAttribute(\"data-cell-date\", scheduler.templates.format_date(currDate));\r\n\t\t\tdayElement.setAttribute(\"data-day\", currDate.getDay());\r\n\t\t\tdayElement.innerHTML = currDate.getDate();\r\n\r\n\t\t\tif(currDate.valueOf() < monthStart.valueOf()){\r\n\t\t\t\tdayElement.classList.add('dhx_before');\r\n\t\t\t}else if(currDate.valueOf() >= monthEnd.valueOf()){\t\r\n\t\t\t\tdayElement.classList.add('dhx_after');\r\n\t\t\t}\r\n\r\n\t\t\tif(currDate.getDay() === 0 || currDate.getDay() === 6){\r\n\t\t\t\tdayElement.classList.add(\"dhx_cal_datepicker_weekend\");\r\n\t\t\t}\r\n\r\n\t\t\tif(minSchedulerDate && maxSchedulerDate){\r\n\t\t\t\tif(currDate.valueOf() >= minSchedulerDate.valueOf() && currDate.valueOf() < maxSchedulerDate.valueOf()){\r\n\t\t\t\t\tdayElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(eventDaysTable[currDate.valueOf()]){\r\n\t\t\t\tdayElement.classList.add('dhx_cal_datepicker_event');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdayElement.classList.add('dhx_cal_datepicker_date');\r\n\r\n\t\t\tdayGridContainer.appendChild(dayElement);\r\n\t\t\tcurrDate = scheduler.date.add(currDate, 1, 'day');\r\n\t\t}\r\n\r\n\t\tcontainer.appendChild(dayGridContainer);\r\n\r\n\t}\r\n\r\n\t_renderMonthGrid(container) {\r\n\t\tconst {date} = this.getState();\r\n\r\n\t\tconst wrapper = document.createElement('div');\r\n\t\twrapper.classList.add(\"dhx_cal_datepicker_months\");\r\n\r\n\t\tconst months = [];\r\n\t\tfor(let i = 0; i < 12; i++){\r\n\t\t\tmonths.push(new Date(date.getFullYear(), i, 1));\r\n\t\t}\r\n\r\n\t\tconst formatLabel = this.scheduler.date.date_to_str(\"%M\");\r\n\t\tmonths.forEach(month => {\r\n\t\t\tconst monthElement = document.createElement('div');\r\n\t\t\tmonthElement.classList.add('dhx_cal_datepicker_month');\r\n\t\t\tif(date.getMonth() === month.getMonth()){\r\n\t\t\t\tmonthElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t}\r\n\t\t\tmonthElement.setAttribute(\"data-month\", month.getMonth());\r\n\t\t\tmonthElement.innerHTML = formatLabel(month);\r\n\t\t\tthis._domEvents.attach(monthElement, \"click\", () => {\r\n\t\t\t\tconst newDate = new Date(month);\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\tdate: newDate,\r\n\t\t\t\t\tmode: 'days'\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\twrapper.appendChild(monthElement);\r\n\t\t});\r\n\t\tcontainer.appendChild(wrapper);\r\n\r\n\t\tconst doneArea = document.createElement(\"div\");\r\n\t\tdoneArea.classList.add(\"dhx_cal_datepicker_done\");\r\n\t\tconst doneBtn = document.createElement(\"button\");\r\n\t\tdoneBtn.innerText = \"Done\";\r\n\t\tdoneBtn.classList.add(\"dhx_cal_datepicker_done_btn\");\r\n\t\tthis._domEvents.attach(doneBtn, \"click\", () => {\r\n\t\t\tthis.setState({\r\n\t\t\t\tmode: 'days'\r\n\t\t\t});\r\n\t\t});\r\n\t\tdoneArea.appendChild(doneBtn);\r\n\t\tcontainer.appendChild(doneArea);\r\n\t}\r\n\r\n\t_renderYearGrid(container) {\r\n\t\tconst {date} = this.getState();\r\n\t\tconst startYear = Math.floor(date.getFullYear() / 10) * 10;\r\n\t\t\r\n\t\tconst wrapper = document.createElement('div');\r\n\t\twrapper.classList.add(\"dhx_cal_datepicker_years\");\r\n\t\tfor (let i = startYear - 1; i <= startYear + 10; i++) {\r\n\t\t\tconst yearElement = document.createElement('div');\r\n\t\t\tyearElement.innerText = i;\r\n\t\t\tyearElement.classList.add('dhx_cal_datepicker_year');\r\n\t\t\tyearElement.setAttribute(\"data-year\", i);\r\n\t\t\tif(date.getFullYear() === i){\r\n\t\t\t\tyearElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t}\r\n\t\t\tthis._domEvents.attach(yearElement, \"click\", () => {\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\tdate: new Date(i, date.getMonth(), 1),\r\n\t\t\t\t\tmode: 'months'\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\twrapper.appendChild(yearElement);\r\n\t\t\t\r\n\t\t}\r\n\t\tcontainer.appendChild(wrapper);\r\n\r\n\t\tconst doneArea = document.createElement(\"div\");\r\n\t\tdoneArea.classList.add(\"dhx_cal_datepicker_done\");\r\n\t\tconst doneBtn = document.createElement(\"button\");\r\n\t\tdoneBtn.innerText = \"Done\";\r\n\t\tdoneBtn.classList.add(\"dhx_cal_datepicker_done_btn\");\r\n\t\tthis._domEvents.attach(doneBtn, \"click\", () => {\r\n\t\t\tthis.setState({\r\n\t\t\t\tmode: 'months'\r\n\t\t\t});\r\n\t\t});\r\n\t\tdoneArea.appendChild(doneBtn);\r\n\t\tcontainer.appendChild(doneArea);\r\n\t}\r\n\r\n\tdestructor(){\r\n\t\tthis.onStateChangeHandlers = [];\r\n\t\tif(this.element){\r\n\t\t\tthis.element.innerHTML = '';\r\n\t\t\tthis.element.remove();\r\n\t\t}\r\n\r\n\t\tthis._domEvents.detachAll();\r\n\t\tthis.callEvent(\"onDestroy\", []);\r\n\t\tthis.detachAllEvents();\r\n\r\n\t\tthis.scheduler = null;\r\n\t}\r\n}","// import \"./css/dhtmlxscheduler_terrace\";\r\n// import \"./css/dhtmlxscheduler_material\";\r\n// import \"./css/dhtmlxscheduler_material_nofont\";\r\n// import \"./css/dhtmlxscheduler_flat\";\r\n// import \"./css/dhtmlxscheduler_contrast_black\";\r\n// import \"./css/dhtmlxscheduler_contrast_white\";\r\n\r\n\r\nimport assert from \"./core/common/assert\";\r\nimport common_errors from \"./core/common_errors\";\r\nimport connector from \"./core/connector\";\r\nimport schedulerCore from \"./core/scheduler\";\r\nimport common from \"./core/common\";\r\nimport wai_aria from \"./core/wai_aria\";\r\nimport utils from \"./core/utils/utils\";\r\nimport dom_helpers from \"./core/utils/dom_helpers\";\r\nimport env from \"./utils/env\";\r\nimport destructor from \"./core/destructor\";\r\nimport ajax from \"./core/utils/ajax\";\r\nimport base from \"./core/base\";\r\nimport config from \"./core/config\";\r\nimport event from \"./core/event\";\r\nimport event_highlight from \"./core/event_highlight\";\r\nimport load from \"./core/load\";\r\nimport lightbox from \"./core/lightbox\";\r\nimport touch from \"./core/touch\";\r\nimport dhtmlx_suite_hooks from \"./core/dhtmlx/dhtmlx_suite_hooks\";\r\nimport skins from \"./core/skins\";\r\nimport jquery from \"./core/jquery\";\r\nimport delay_render from \"./core/delay_render\";\r\nimport dataProcessorExtend from \"./core/dataprocessor/dataprocessor\";\r\nimport message from \"./core/message\";\r\nimport i18nFactory from \"./locale\";\r\n\r\nimport voidFirst from \"./publish_helpers/void_script_first\";\r\nimport voidSecond from \"./publish_helpers/void_script_second\";\r\nimport voidThird from \"./publish_helpers/void_script_third\";\r\n\r\n//import datepickerHeader from \"./core/clickable_header\";\r\n\r\nimport { DatePicker } from \"./core/datepicker\";\r\n\r\nexport default function(extensionManager) {\r\n\r\n\tconst scheduler = { version: VERSION };\r\n\t\r\n\tcommon_errors(scheduler);\r\n\tcommon(scheduler);\r\n\tschedulerCore(scheduler);\r\n\twai_aria(scheduler);\r\n\t//utils(scheduler);\r\n\r\n\tscheduler.utils = utils;\r\n\tscheduler.$domHelpers = dom_helpers;\r\n\tscheduler.utils.dom = dom_helpers;\r\n\tscheduler.uid = utils.uid;\r\n\tscheduler.mixin = utils.mixin;\r\n\tscheduler.defined = utils.defined;\r\n\tscheduler.assert = assert(scheduler);\r\n\tscheduler.copy = utils.copy;\r\n\r\n\tscheduler._createDatePicker = function(container, config){\r\n\t\treturn new DatePicker(scheduler, container, config);\r\n\t};\r\n\r\n\t//datepickerHeader(scheduler);\r\n\r\n\r\n\t//old api compatibility\r\n\tscheduler._getFocusableNodes = dom_helpers.getFocusableNodes;\r\n\tscheduler._getClassName = dom_helpers.getClassName;\r\n\tscheduler._locate_css = dom_helpers.locateCss;\r\n\r\n\tconst messageApi = message(scheduler);\r\n\tscheduler.utils.mixin(scheduler, messageApi);\r\n\r\n\tscheduler.env = scheduler.$env = env;\r\n\tscheduler.Promise = window.Promise;\r\n\tdestructor(scheduler);\r\n\tajax(scheduler);\r\n\tvoidFirst(scheduler);\r\n\tbase(scheduler);\r\n\tconfig(scheduler);\r\n\tevent(scheduler);\r\n\tevent_highlight(scheduler);\r\n\tload(scheduler);\r\n\tlightbox(scheduler);\r\n\ttouch(scheduler);\r\n\tdhtmlx_suite_hooks(scheduler);\r\n\tvoidSecond(scheduler);\r\n\tskins(scheduler);\r\n\tjquery(scheduler);\r\n\tdelay_render(scheduler);\r\n\tdataProcessorExtend(scheduler);\r\n\tvoidThird(scheduler);\r\n\tconnector(scheduler);\r\n\tconst i18n = i18nFactory();\r\n\tscheduler.i18n = {\r\n\t\taddLocale: i18n.addLocale,\r\n\t\tsetLocale: function(locale){\r\n\t\t\tif(typeof locale === \"string\"){\r\n\t\t\t\tvar localeObject = i18n.getLocale(locale);\r\n\t\t\t\tif(!localeObject){\r\n\t\t\t\t\tlocaleObject = i18n.getLocale(\"en\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler.locale = localeObject;\r\n\t\t\t}else if(locale){\r\n\t\t\t\tif(!scheduler.locale){\r\n\t\t\t\t\tscheduler.locale = locale;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfor(var i in locale){\r\n\t\t\t\t\t\tif(locale[i] && typeof locale[i] === \"object\"){\r\n\t\t\t\t\t\t\tif(!scheduler.locale[i]){\r\n\t\t\t\t\t\t\t\tscheduler.locale[i] = {};\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tscheduler.mixin(scheduler.locale[i], locale[i], true);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tscheduler.locale[i] = locale[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar labels = scheduler.locale.labels;\r\n\t\t\tlabels.dhx_save_btn \t= labels.icon_save;\r\n\t\t\tlabels.dhx_cancel_btn \t= labels.icon_cancel;\r\n\t\t\tlabels.dhx_delete_btn \t= labels.icon_delete;\r\n\r\n\t\t\tif(scheduler.$container){\r\n\t\t\t\tscheduler.get_elements();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t},\r\n\t\tgetLocale: i18n.getLocale\r\n\t};\r\n\tscheduler.i18n.setLocale(\"en\");\r\n\r\n\tscheduler.ext = {};\r\n\r\n\tconst activePlugins = {};\r\n\tscheduler.plugins = function(config){\r\n\t\tconst extensionList = getExtensionList(config, {\r\n\t\t\t\ttreetimeline: [\"timeline\"],\r\n\t\t\t\tdaytimeline: [\"timeline\"],\r\n\t\t\t\touterdrag: [\"legacy\"]\r\n\t\t\t}, {\r\n\t\t\t\tlegacy: 1,\r\n\t\t\t\tlimit: 1,\r\n\t\t\t\ttimeline: 2,\r\n\t\t\t\tdaytimeline: 3,\r\n\t\t\t\ttreetimeline: 3,\r\n\t\t\t\touterdrag:6\r\n\t\t\t});\r\n\r\n\t\textensionList.forEach(function(name){\r\n\t\t\tif(!activePlugins[name]){\r\n\t\t\t\tconst plugin = extensionManager.getExtension(name);\r\n\t\t\t\tif(plugin){\r\n\t\t\t\t\tplugin(scheduler);\r\n\t\t\t\t\tactivePlugins[name] = true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthrow new Error(\"unknown plugin \" + name);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t};\r\n\r\n\tfunction getExtensionList(config, dependencies, priorities){\r\n\t\tconst result = [];\r\n\r\n\t\tfor(const i in config){\r\n\t\t\tif(config[i]){\r\n\t\t\t\tconst extension = i.toLowerCase();\r\n\t\t\t\tif(dependencies[extension]){\r\n\t\t\t\t\tdependencies[extension].forEach(function(dep){\r\n\t\t\t\t\t\tconst dependencyName = dep.toLowerCase();\r\n\t\t\t\t\t\tif(!config[dependencyName]){\r\n\t\t\t\t\t\t\tresult.push(dependencyName);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\tresult.push(extension);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tresult.sort(function(a, b){\r\n\t\t\tconst orderA = priorities[a] || 0;\r\n\t\t\tconst orderB = priorities[b] || 0;\r\n\t\t\tif(orderA > orderB){\r\n\t\t\t\treturn 1;\r\n\t\t\t}else if(orderA < orderB){\r\n\t\t\t\treturn -1;\r\n\t\t\t}else{\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\treturn scheduler;\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nvar commonViews = {\r\n\tagenda: \"https://docs.dhtmlx.com/scheduler/agenda_view.html\",\r\n\tgrid: \"https://docs.dhtmlx.com/scheduler/grid_view.html\",\r\n\tmap: \"https://docs.dhtmlx.com/scheduler/map_view.html\",\r\n\tunit: \"https://docs.dhtmlx.com/scheduler/units_view.html\",\r\n\ttimeline: \"https://docs.dhtmlx.com/scheduler/timeline_view.html\",\r\n\tweek_agenda: \"https://docs.dhtmlx.com/scheduler/weekagenda_view.html\",\r\n\tyear: \"https://docs.dhtmlx.com/scheduler/year_view.html\",\r\n\tanythingElse: \"https://docs.dhtmlx.com/scheduler/views.html\"\r\n};\r\n\r\nvar requiredExtensions = {\r\n\tagenda: \"ext/dhtmlxscheduler_agenda_view.js\",\r\n\tgrid: \"ext/dhtmlxscheduler_grid_view.js\",\r\n\tmap: \"ext/dhtmlxscheduler_map_view.js\",\r\n\tunit: \"ext/dhtmlxscheduler_units.js\",\r\n\ttimeline: \"ext/dhtmlxscheduler_timeline.js, ext/dhtmlxscheduler_treetimeline.js, ext/dhtmlxscheduler_daytimeline.js\",\r\n\tweek_agenda: \"ext/dhtmlxscheduler_week_agenda.js\",\r\n\tyear: \"ext/dhtmlxscheduler_year_view.js\",\r\n\tlimit: \"ext/dhtmlxscheduler_limit.js\"\r\n};\r\n\r\nscheduler._commonErrorMessages = {\r\n\tunknownView: function(view){\r\n\t\tvar relatedDoc = \"Related docs: \" + (commonViews[view] || commonViews.anythingElse); \r\n\t\tvar relatedExtension = requiredExtensions[view] ? (\"You're probably missing \" + requiredExtensions[view] + \".\") : \"\";\r\n\t\treturn (\r\n\t\t\t\"`\"+view+\"` view is not defined. \\n\" +\r\n\t\t\t\"Please check parameters you pass to `scheduler.init` or `scheduler.setCurrentView` in your code and ensure you've imported appropriate extensions. \\n\" + \r\n\t\t\trelatedDoc + \"\\n\" + (relatedExtension ? (relatedExtension + \"\\n\") : \"\"));\r\n\t},\r\n\tcollapsedContainer: function(div){\r\n\t\treturn \"Scheduler container height is set to *100%* but the rendered height is zero and the scheduler is not visible. \\n\"+\r\n\t\t\"Make sure that the container has some initial height or use different units. For example:\\n\" +\r\n\t\t\"
\\n\";\r\n\t}\r\n};\r\n\r\nscheduler.createTimelineView = function() {\r\n\tthrow new Error(\"scheduler.createTimelineView is not implemented. Be sure to add the required extension: \" + requiredExtensions.timeline + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.timeline);\r\n};\r\n\r\nscheduler.createUnitsView = function() {\r\n\tthrow new Error(\"scheduler.createUnitsView is not implemented. Be sure to add the required extension: \" + requiredExtensions.unit + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.unit);\r\n};\r\n\r\nscheduler.createGridView = function() {\r\n\tthrow new Error(\"scheduler.createGridView is not implemented. Be sure to add the required extension: \" + requiredExtensions.grid + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.grid);\r\n};\r\n\r\nscheduler.addMarkedTimespan = function() {\r\n\tthrow new Error(\"scheduler.addMarkedTimespan is not implemented. Be sure to add the required extension: ext/dhtmlxscheduler_limit.js\" + \r\n\t\"\\n\" +\r\n\t\"Related docs: https://docs.dhtmlx.com/scheduler/limits.html\");\r\n};\r\n\r\nscheduler.renderCalendar = function() {\r\n\tthrow new Error(\"scheduler.renderCalendar is not implemented. Be sure to add the required extension: ext/dhtmlxscheduler_minical.js\" + \r\n\t\"\\n\" +\r\n\t\"https://docs.dhtmlx.com/scheduler/minicalendar.html\");\r\n};\r\n\r\nscheduler.exportToPNG = function() {\r\n\tthrow new Error([\r\n\t\t\"scheduler.exportToPNG is not implemented.\",\r\n\t\t\"This feature requires an additional module, be sure to check the related doc here https://docs.dhtmlx.com/scheduler/png.html\",\r\n\t\t\"Licensing info: https://dhtmlx.com/docs/products/dhtmlxScheduler/export.shtml\"\r\n\t].join(\"\\n\"));\r\n};\r\n\r\nscheduler.exportToPDF = function() {\r\n\tthrow new Error([\r\n\t\t\"scheduler.exportToPDF is not implemented.\",\r\n\t\t\"This feature requires an additional module, be sure to check the related doc here https://docs.dhtmlx.com/scheduler/pdf.html\",\r\n\t\t\"Licensing info: https://dhtmlx.com/docs/products/dhtmlxScheduler/export.shtml\"\r\n\t].join(\"\\n\"));\r\n};\r\n\r\n\r\n}","\r\nimport nav_bar from \"./nav_bar\";\r\nimport scheduler_resize_listener from \"./scheduler_resize_listener\";\r\nimport eventable from \"../utils/eventable\";\r\n\r\n\r\nexport default function extend(scheduler) {\r\n\r\neventable(scheduler);\r\n\r\nnav_bar(scheduler);\r\n\r\nscheduler._detachDomEvent = function(el, event, handler){\r\n\tif (el.removeEventListener){\r\n\t\tel.removeEventListener(event, handler, false);\r\n\r\n\t}else if (el.detachEvent){\r\n\t\tel.detachEvent(\"on\"+event, handler);\r\n\t}\r\n};\r\n\r\n\r\nscheduler._init_once = function(){\r\n\tscheduler_resize_listener(scheduler);\r\n\r\n\tscheduler._init_once = function(){};\r\n};\r\n\r\nvar layout = {\r\n\t\"navbar\": {\r\n\t\trender: function (config) {\r\n\t\t\treturn scheduler._init_nav_bar(config);\r\n\t\t}\r\n\t},\r\n\t\"header\": {\r\n\t\trender: function (config) {\r\n\t\t\tvar element = document.createElement(\"div\");\r\n\t\t\telement.className = \"dhx_cal_header\";\r\n\t\t\treturn element;\r\n\t\t}\r\n\t},\r\n\t\"dataArea\": {\r\n\t\trender: function (config) {\r\n\t\t\tvar element = document.createElement(\"div\");\r\n\t\t\telement.className = \"dhx_cal_data\";\r\n\t\t\treturn element;\r\n\t\t}\r\n\t},\r\n\t\"html_element\": {\r\n\t\trender: function (config) {\r\n\t\t\treturn config.html;\r\n\t\t}\r\n\t}\r\n};\r\n\r\nfunction hasSchedulerMarkup(element){\r\n\treturn !!(\r\n\t\telement.querySelector(\".dhx_cal_header\") &&\r\n\t\telement.querySelector(\".dhx_cal_data\") &&\r\n\t\telement.querySelector(\".dhx_cal_navline\")\r\n\t\t);\r\n}\r\n\r\nfunction createDefaultHeader(scheduler){\r\n\tvar views = [\r\n\t\t\"day\",\r\n\t\t\"week\",\r\n\t\t\"month\"\r\n\t];\r\n\tvar date = [\r\n\t\t\"date\"\r\n\t];\r\n\tvar nav = [\r\n\t\t\"prev\",\r\n\t\t\"today\",\r\n\t\t\"next\"\r\n\t];\r\n\r\n\tif(scheduler.matrix){\r\n\t\tfor(var i in scheduler.matrix){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\tif(scheduler._props){\r\n\t\tfor(var i in scheduler._props){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\r\n\tif(scheduler._grid && scheduler._grid.names){\r\n\t\tfor(var i in scheduler._grid.names){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\r\n\tvar optionalViews = [\r\n\t\t\"map\",\r\n\t\t\"agenda\",\r\n\t\t\"week_agenda\",\r\n\t\t\"year\"\r\n\t];\r\n\r\n\toptionalViews.forEach(function(viewName){\r\n\t\tif(scheduler[viewName + \"_view\"]){\r\n\t\t\tviews.push(viewName);\r\n\t\t}\r\n\t});\r\n\r\n\treturn views.concat(date).concat(nav);\r\n}\r\n\r\nscheduler.init=function(id,date,mode){\r\n\tif(this.$destroyed){\r\n\t\treturn; // not have errors when try to reinit destroyed scheduler\r\n\t}\r\n\tdate=date||(scheduler._currentDate());\r\n\tmode=mode||\"week\";\r\n\r\n\tif(this._obj){\r\n\t\tthis.unset_actions();\r\n\t}\r\n\r\n\tthis._obj=(typeof id == \"string\")?document.getElementById(id):id;\r\n\tthis.$container = this._obj;\r\n\tthis.$root = this._obj;\r\n\r\n\tif(!this.$container.offsetHeight && this.$container.offsetWidth && this.$container.style.height === \"100%\"){\r\n\t\t// scheduler container has zero height and non-zero width\r\n\t\twindow.console.error(scheduler._commonErrorMessages.collapsedContainer(), this.$container);\r\n\t}\r\n\r\n\tif(this.config.wai_aria_attributes && this.config.wai_aria_application_role){\r\n\t\tthis.$container.setAttribute(\"role\", \"application\");\r\n\t}\r\n\r\n\tif(!this.config.header && !hasSchedulerMarkup(this.$container)){\r\n\t\t// if no header config and no required markup - use the default header\r\n\t\t// so the scheduler could be initialized in an empty div\r\n\t\tthis.config.header = createDefaultHeader(this);\r\n\t\twindow.console.log([// jshint ignore:line\r\n\t\t\t\"Required DOM elements are missing from the scheduler container and **scheduler.config.header** is not specified.\",\r\n\t\t\t\"Using a default header configuration: \",\r\n\t\t\t\"scheduler.config.header = \" + JSON.stringify(this.config.header, null, 2),\r\n\t\t\t\"Check this article for the details: https://docs.dhtmlx.com/scheduler/initialization.html\"\r\n\t\t].join(\"\\n\"));// jshint ignore:line\r\n\t}\r\n\r\n\tif (this.config.header) {\r\n\t\tthis.$container.innerHTML = \"\";\r\n\t\tthis.$container.classList.add(\"dhx_cal_container\");\r\n\t\tif(this.config.header.height){\r\n\t\t\tthis.xy.nav_height = this.config.header.height;\r\n\t\t}\r\n\t\tthis.$container.appendChild(layout.navbar.render(this.config.header));\r\n\t\tthis.$container.appendChild(layout.header.render());\r\n\t\tthis.$container.appendChild(layout.dataArea.render());\r\n\t} else {\r\n\t\t// if no header config provided - make sure scheduler container has all necessary elements\r\n\t\tif(!hasSchedulerMarkup(this.$container)){\r\n\t\t\tthrow new Error([\r\n\t\t\t\t\"Required DOM elements are missing from the scheduler container.\",\r\n\t\t\t\t\"Be sure to either specify them manually in the markup: https://docs.dhtmlx.com/scheduler/initialization.html#initializingschedulerviamarkup\",\r\n\t\t\t\t\"Or to use **scheduler.config.header** setting so they could be created automatically: https://docs.dhtmlx.com/scheduler/initialization.html#initializingschedulerviaheaderconfig\"\r\n\t\t\t].join(\"\\n\"));\r\n\t\t}\r\n\t}\r\n\r\n\tif (this.config.rtl) this.$container.className += \" dhx_cal_container_rtl\";\r\n\r\n\t//hook for terrace skin\r\n\tif (this._skin_init)\r\n\t\tscheduler._skin_init();\r\n\r\n\tscheduler.date.init();\r\n\r\n\tthis._scroll=true;\r\n\r\n\tthis._els=[];\r\n\tthis.get_elements();\r\n\tthis.init_templates();\r\n\tthis.set_actions();\r\n\r\n\tthis._init_once();\r\n\tthis._init_touch_events();\r\n\r\n\tthis.set_sizes();\r\n\tscheduler.callEvent('onSchedulerReady', []);\r\n\tscheduler.$initialized = true;\r\n\tthis.setCurrentView(date,mode);\r\n\r\n};\r\n\r\nscheduler.xy={\r\n\tmin_event_height:20,\r\n\tbar_height: 24,\r\n\tscale_width:50,\r\n\tscroll_width:18,\r\n\tscale_height:20,\r\n\tmonth_scale_height:20,\r\n\tmenu_width:25,\r\n\tmargin_top:0,\r\n\tmargin_left:0,\r\n\teditor_width:140,\r\n\tmonth_head_height:22,\r\n\tevent_header_height: 14\r\n};\r\nscheduler.keys={\r\n\tedit_save:13,\r\n\tedit_cancel:27\r\n};\r\n\r\nscheduler.bind = function bind(functor, object){\r\n\tif(functor.bind)\r\n\t\treturn functor.bind(object);\r\n\telse\r\n\t\treturn function(){ return functor.apply(object,arguments); };\r\n};\r\n\r\nscheduler.set_sizes=function(){\r\n\r\n\tvar w = this._x = this._obj.clientWidth-this.xy.margin_left;\r\n\r\n\t//not-table mode always has scroll - need to be fixed in future\r\n\tvar scale_x=this._table_view?0:(this.xy.scale_width+this.xy.scroll_width);\r\n\r\n\tvar materialScalePlaceholder = this.$container.querySelector(\".dhx_cal_scale_placeholder\");\r\n\tif(scheduler._is_material_skin()){\r\n\t\tif(!materialScalePlaceholder) {\r\n\t\t\tmaterialScalePlaceholder = document.createElement(\"div\");\r\n\t\t\tmaterialScalePlaceholder.className = \"dhx_cal_scale_placeholder\";\r\n\t\t\tthis.$container.insertBefore(materialScalePlaceholder, this._els[\"dhx_cal_header\"][0]);\r\n\t\t}\r\n\t\tmaterialScalePlaceholder.style.display = \"block\";\r\n\r\n\t\tthis.set_xy(materialScalePlaceholder,w,this.xy.scale_height + 1,0, this._els[\"dhx_cal_header\"][0].offsetTop);\r\n\r\n\t}else{\r\n\t\tif(materialScalePlaceholder){\r\n\t\t\tmaterialScalePlaceholder.parentNode.removeChild(materialScalePlaceholder);\r\n\t\t}\r\n\t}\r\n\r\n\tif (this._lightbox) {\r\n\t\tif (scheduler.$container.offsetWidth < 1200) {\r\n\t\t} else {\r\n\t\t\tthis._setLbPosition(document.querySelector(\".dhx_cal_light\"));\r\n\t\t}\r\n\t}\r\n\r\n\tthis._data_width = w-scale_x;\r\n\r\n\tthis._els[\"dhx_cal_navline\"][0].style.width = w + \"px\";\r\n\tconst header = this._els[\"dhx_cal_header\"][0];\r\n\tthis.set_xy(header, this._data_width, this.xy.scale_height);\r\n\t// this._els[\"dhx_cal_header\"][0].style.marginLeft = `${scheduler.xy.scale_width}px`;\r\n\theader.style.left = ``;\r\n\theader.style.right = ``;\r\n\tif(!this._table_view){\r\n\t\tif(this.config.rtl){\r\n\t\t\theader.style.right = `${this.xy.scale_width}px`;\r\n\t\t}else{\r\n\t\t\theader.style.left = `${this.xy.scale_width}px`;\r\n\t\t}\r\n\t} else {\r\n\t\tif(!this.config.rtl){\r\n\t\t\theader.style.left = `-1px`;\r\n\t\t} else {\r\n\t\t\theader.style.right = `-1px`;\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.set_xy=function(node,w,h,x,y){\r\n\tfunction prepareValue(val){\r\n\t\tlet prepared = val;\r\n\t\tif(!isNaN(Number(prepared))){\r\n\t\t\tprepared = Math.max(0,prepared) + \"px\";\r\n\t\t}\r\n\t\treturn prepared;\r\n\t}\r\n\r\n\tvar direction = 'left';\r\n\r\n\tif(w !== undefined) {\r\n\t\tnode.style.width = prepareValue(w);\r\n\t}\r\n\r\n\tif(h !== undefined){\r\n\t\tnode.style.height = prepareValue(h);\r\n\t}\r\n\r\n\tif (arguments.length>3){\r\n\r\n\t\tif(x !== undefined){\r\n\t\t\tif (this.config.rtl) direction = 'right';\r\n\t\t\tnode.style[direction]=x+\"px\";\r\n\t\t}\r\n\t\tif(y !== undefined){\r\n\t\t\tnode.style.top=y+\"px\";\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.get_elements=function(){\r\n\t//get all child elements as named hash\r\n\tvar els=this._obj.getElementsByTagName(\"DIV\");\r\n\tfor (var i=0; i < els.length; i++){\r\n\t\tvar class_name= scheduler._getClassName(els[i]);\r\n\t\tvar attr_value = els[i].getAttribute(\"data-tab\") || els[i].getAttribute(\"name\") || \"\";\r\n\t\tif (class_name) class_name = class_name.split(\" \")[0];\r\n\t\tif (!this._els[class_name]) this._els[class_name]=[];\r\n\t\tthis._els[class_name].push(els[i]);\r\n\r\n\t\t//check if name need to be changed\r\n\t\t// scheduler.locale.labels[attr_value+\"_tab\"] - to fix getting labels for data-tab\r\n\t\tvar label = scheduler.locale.labels[attr_value+\"_tab\"] || scheduler.locale.labels[attr_value||class_name];\r\n\t\tif (typeof label !== \"string\" && attr_value && !els[i].innerHTML)\r\n\t\t\tlabel = attr_value.split(\"_\")[0];\r\n\t\tif (label) {\r\n\t\t\tthis._waiAria.labelAttr(els[i], label);\r\n\t\t\tels[i].innerHTML = label;\r\n\t\t}\r\n\t}\r\n};\r\n\r\n\r\nvar domEventsScope = scheduler._createDomEventScope();\r\n\r\nscheduler.unset_actions = function(){\r\n\tdomEventsScope.detachAll();\r\n\r\n};\r\n\r\nscheduler.set_actions=function(){\r\n\tfor (var a in this._els){\r\n\t\tif (this._click[a]){\r\n\t\t\tfor (var i=0; i < this._els[a].length; i++){\r\n\t\t\t\tconst element = this._els[a][i];\r\n\t\t\t\tconst handler = this._click[a].bind(element);\r\n\t\t\t\tdomEventsScope.attach(element, \"click\", handler);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tdomEventsScope.attach(this._obj, \"selectstart\", function(e){\r\n\t\te.preventDefault();\r\n\t\treturn false;\r\n\t});\r\n\t//this._obj.onselectstart=function(e){ return false; };\r\n\tdomEventsScope.attach(this._obj, \"mousemove\", function(e){\r\n\t\tif (!scheduler._temp_touch_block)\r\n\t\t\tscheduler._on_mouse_move(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"mousedown\", function(e){\r\n\t\tif (!scheduler._ignore_next_click)\r\n\t\t\tscheduler._on_mouse_down(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"mouseup\", function(e){\r\n\t\tif (!scheduler._ignore_next_click)\r\n\t\t\tscheduler._on_mouse_up(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"dblclick\", function(e){\r\n\t\tscheduler._on_dbl_click(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"contextmenu\", function(e) {\r\n\t\tif(scheduler.checkEvent(\"onContextMenu\")){\r\n\t\t\t// block the default browser context menu \r\n\t\t\te.preventDefault();\r\n\t\t}\r\n\t\tvar ev = e;\r\n\t\tvar src = ev.target||ev.srcElement;\r\n\t\tvar returnValue = scheduler.callEvent(\"onContextMenu\", [scheduler._locate_event(src), ev]);\r\n\t\treturn returnValue;\r\n\t});\r\n};\r\nscheduler.select=function(id){\r\n\tif (this._select_id==id) return;\r\n\tscheduler._close_not_saved();\r\n\tthis.editStop(false);\r\n\tif(this._select_id){\r\n\t\tthis.unselect();\r\n\t}\r\n\tthis._select_id = id;\r\n\tthis.updateEvent(id);\r\n\tthis.callEvent(\"onEventSelected\", [id]);\r\n};\r\nscheduler.unselect=function(id){\r\n\tif (id && id!=this._select_id) return;\r\n\tvar t=this._select_id;\r\n\tthis._select_id = null;\r\n\tif (t && this.getEvent(t)) this.updateEvent(t);\r\n\tthis.callEvent(\"onEventUnselected\", [t]);\r\n};\r\nscheduler.getState=function(){\r\n\treturn {\r\n\t\tmode: this._mode,\r\n\t\tdate: new Date(this._date),\r\n\t\tmin_date: new Date(this._min_date),\r\n\t\tmax_date: new Date(this._max_date),\r\n\t\teditor_id: this._edit_id,\r\n\t\tlightbox_id: this._lightbox_id,\r\n\t\tnew_event: this._new_event,\r\n\t\tselect_id: this._select_id,\r\n\t\texpanded: this.expanded,\r\n\t\tdrag_id: this._drag_id,\r\n\t\tdrag_mode: this._drag_mode\r\n\t};\r\n};\r\nscheduler._click={\r\n\tdhx_cal_data:function(e){\r\n\t\t//in case of touch disable click processing\r\n\t\tif (scheduler._ignore_next_click){\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tvar trg = e.target;\r\n\t\tvar id = scheduler._locate_event(trg);\r\n\r\n\t\tif (!id) {\r\n\t\t\tscheduler.callEvent(\"onEmptyClick\",[scheduler.getActionData(e).date, e]);\r\n\t\t} else {\r\n\t\t\tif ( !scheduler.callEvent(\"onClick\",[id,e]) || scheduler.config.readonly ) return;\r\n\t\t}\r\n\r\n\t\tif (id && scheduler.config.select) {\r\n\r\n\t\t\tscheduler.select(id);\r\n\t\t\tconst icon = trg.closest(\".dhx_menu_icon\");\r\n\r\n\t\t\tvar mask = scheduler._getClassName(icon);\r\n\t\t\tif (mask.indexOf(\"_icon\")!=-1)\r\n\t\t\t\tscheduler._click.buttons[mask.split(\" \")[1].replace(\"icon_\",\"\")](id);\r\n\t\t} else{\r\n\t\t\tscheduler._close_not_saved();\r\n\t\t\tif (scheduler.getState().select_id && new Date().valueOf()-(scheduler._new_event||0) > 500){\r\n\t\t\t\tscheduler.unselect();\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tdhx_cal_prev_button:function(){\r\n\t\tscheduler._click.dhx_cal_next_button(0,-1);\r\n\t},\r\n\tdhx_cal_next_button:function(dummy,step){\r\n\t\tvar def_step = 1;\r\n\t\tif (scheduler.config.rtl){\r\n\t\t\tstep = -step;\r\n\t\t\tdef_step = -def_step;\r\n\t\t}\r\n\t\tscheduler.setCurrentView(scheduler.date.add( //next line changes scheduler._date , but seems it has not side-effects\r\n\t\t\tscheduler.date[scheduler._mode+\"_start\"](new Date(scheduler._date)),(step||def_step),scheduler._mode));\r\n\t},\r\n\tdhx_cal_today_button:function(){\r\n\t\tif (scheduler.callEvent(\"onBeforeTodayDisplayed\", [])) {\r\n\t\t\tscheduler.setCurrentView(scheduler._currentDate());\r\n\t\t}\r\n\t},\r\n\tdhx_cal_tab:function(){\r\n\t\tvar name = this.getAttribute(\"data-tab\");\r\n\t\tvar deprecated_name = this.getAttribute(\"name\");\r\n\t\tvar mode = name || deprecated_name.substring(0, deprecated_name.search(\"_tab\"));\r\n\t\tscheduler.setCurrentView(scheduler._date,mode);\r\n\t},\r\n\tbuttons:{\r\n\t\t\"delete\":function(id){\r\n\t\t\tvar c = scheduler.locale.labels.confirm_deleting;\r\n\t\t\tscheduler._dhtmlx_confirm({message: c, title: scheduler.locale.labels.title_confirm_deleting, callback:function(){ scheduler.deleteEvent(id); },\r\n\t\t\tconfig: {ok: scheduler.locale.labels.icon_delete}\r\n\t\t});\r\n\t\t},\r\n\t\tedit:function(id){ scheduler.edit(id); },\r\n\t\tsave:function(id){ scheduler.editStop(true); },\r\n\t\tdetails:function(id){ scheduler.showLightbox(id); },\r\n\t\tform:function(id){ scheduler.showLightbox(id); },\r\n\t\tcancel:function(id){ scheduler.editStop(false); }\r\n\t}\r\n};\r\nscheduler._dhtmlx_confirm = function({message, title, callback, config}) {\r\n\tif (!message)\r\n\t\treturn callback();\r\n\r\n\tconfig = config || {};\r\n\tvar opts = { ...config, text: message };\r\n\tif (title)\r\n\t\topts.title = title;\r\n\tif (callback) {\r\n\t\topts.callback = function(result) {\r\n\t\t\tif (result)\r\n\t\t\t\tcallback();\r\n\t\t};\r\n\t}\r\n\tscheduler.confirm(opts);\r\n};\r\nscheduler.addEventNow=function(start,end,e){\r\n\tvar base = {};\r\n\tif (scheduler._isObject(start) && !scheduler._isDate(start)){\r\n\t\tbase = start;\r\n\t\tstart = null;\r\n\t}\r\n\r\n\tvar d = (this.config.event_duration||this.config.time_step)*60000;\r\n\tif (!start) start = base.start_date||Math.round((scheduler._currentDate()).valueOf()/d)*d;\r\n\tvar start_date = new Date(start);\r\n\tif (!end){\r\n\t\tvar start_hour = this.config.first_hour;\r\n\t\tif (start_hour > start_date.getHours()){\r\n\t\t\tstart_date.setHours(start_hour);\r\n\t\t\tstart = start_date.valueOf();\r\n\t\t}\r\n\t\tend = start.valueOf()+d;\r\n\t}\r\n\tvar end_date = new Date(end);\r\n\r\n\t// scheduler.addEventNow(new Date(), new Date()) + collision though get_visible events defect (such event was not retrieved)\r\n\tif(start_date.valueOf() == end_date.valueOf())\r\n\t\tend_date.setTime(end_date.valueOf()+d);\r\n\tbase.start_date = base.start_date||start_date;\r\n\tbase.end_date = base.end_date||end_date;\r\n\tbase.text = base.text||this.locale.labels.new_event;\r\n\tbase.id = this._drag_id = base.id || this.uid();\r\n\tthis._drag_mode=\"new-size\";\r\n\tthis._loading=true;\r\n\tvar eventId = this.addEvent(base);\r\n\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\tthis._loading=false;\r\n\r\n\tthis._drag_event={}; //dummy , to trigger correct event updating logic\r\n\tthis._on_mouse_up(e);\r\n\treturn eventId;\r\n};\r\nscheduler._on_dbl_click=function(e,src){\r\n\tsrc = src||(e.target||e.srcElement);\r\n\tif (this.config.readonly) return;\r\n\tvar name = scheduler._getClassName(src).split(\" \")[0];\r\n\tswitch(name){\r\n\t\tcase \"dhx_scale_holder\":\r\n\t\tcase \"dhx_scale_holder_now\":\r\n\t\tcase \"dhx_month_body\":\r\n\t\tcase \"dhx_wa_day_data\":\r\n\t\t\tif (!scheduler.config.dblclick_create) break;\r\n\t\t\tthis.addEventNow(this.getActionData(e).date,null,e);\r\n\t\t\tbreak;\r\n\t\tcase \"dhx_cal_event\":\r\n\t\tcase \"dhx_wa_ev_body\":\r\n\t\tcase \"dhx_agenda_line\":\r\n\t\tcase \"dhx_cal_agenda_event_line\":\r\n\t\tcase \"dhx_grid_event\":\r\n\t\tcase \"dhx_cal_event_line\":\r\n\t\tcase \"dhx_cal_event_clear\":\r\n\t\t\tvar id = this._locate_event(src);\r\n\t\t\tif (!this.callEvent(\"onDblClick\",[id,e])) return;\r\n\t\t\tif (this.config.details_on_dblclick || this._table_view || !this.getEvent(id)._timed || !this.config.select)\r\n\t\t\t\tthis.showLightbox(id);\r\n\t\t\telse\r\n\t\t\t\tthis.edit(id);\r\n\t\t\tbreak;\r\n\t\tcase \"dhx_time_block\":\r\n\t\tcase \"dhx_cal_container\":\r\n\t\t\treturn;\r\n\t\tdefault:\r\n\t\t\tvar t = this[\"dblclick_\"+name];\r\n\t\t\tif (t) {\r\n\t\t\t\tt.call(this,e);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif (src.parentNode && src != this)\r\n\t\t\t\t\treturn scheduler._on_dbl_click(e,src.parentNode);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t}\r\n};\r\n//column index by mouse x-coordinate\r\nscheduler._get_column_index = function(x_pos){\r\n\tvar column = 0;\r\n\tif (this._cols){\r\n\t\tvar width = 0;\r\n\t\tvar i = 0;\r\n\t\twhile (width + this._cols[i] < x_pos && i < this._cols.length){\r\n\t\t\twidth += this._cols[i];\r\n\t\t\ti++;\r\n\t\t}\r\n\t\tcolumn = i + (this._cols[i] ? ((x_pos - width)/ this._cols[i]) : 0);\r\n\r\n\t\tif (this._ignores){\r\n\t\t\tif(column >= this._cols.length){\r\n\t\t\t\twhile(column >= 1 && this._ignores[Math.floor(column)]){\r\n\t\t\t\t\tcolumn--;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n\treturn column;\r\n};\r\n\r\n//transform mouse coordinates to day-time indexes of week based view\r\nscheduler._week_indexes_from_pos = function(pos){\r\n\t//\"get position\" can be invoked before columns are loaded into the units view(e.g. by onMouseMove handler in key_nav.js)\r\n\tif(!this._cols){\r\n\t\treturn pos;\r\n\t}else{\r\n\t\tvar column = this._get_column_index(pos.x);\r\n\r\n\t\tpos.x=Math.min(this._cols.length-1, Math.max(0,Math.ceil(column)-1));\r\n\t\tpos.y=Math.max(0,Math.ceil(pos.y*60/(this.config.time_step*this.config.hour_size_px))-1)+this.config.first_hour*(60/this.config.time_step);\r\n\t\treturn pos;\r\n\t}\r\n};\r\n\r\nscheduler._mouse_coords=function(ev){\r\n\tvar pos;\r\n\tvar b=document.body;\r\n\tvar d = document.documentElement;\r\n\tif (!this.$env.isIE && (ev.pageX || ev.pageY))\r\n\t\tpos={x:ev.pageX, y:ev.pageY};\r\n\telse pos={\r\n\t\tx:ev.clientX + (b.scrollLeft||d.scrollLeft||0) - b.clientLeft,\r\n\t\ty:ev.clientY + (b.scrollTop||d.scrollTop||0) - b.clientTop\r\n\t};\r\n\t//apply layout\r\n\tif (this.config.rtl && this._colsS) {\r\n\t\tpos.x = this.$container.querySelector(\".dhx_cal_data\").offsetWidth - pos.x;\r\n\t\tpos.x += this.$domHelpers.getAbsoluteLeft(this._obj);\r\n\t\tif (this._mode !== \"month\") {\r\n\t\t\tpos.x -= this.xy.scale_width;\r\n\t\t}\r\n\t} else {\r\n\t\tpos.x-=this.$domHelpers.getAbsoluteLeft(this._obj)+(this._table_view?0:this.xy.scale_width);\r\n\t}\r\n\r\n\tvar dataArea = this.$container.querySelector(\".dhx_cal_data\");\r\n\t//pos.y-=this.$domHelpers.getAbsoluteTop(this._obj)+this.xy.nav_height+(this._dy_shift||0)+this.xy.scale_height-this._els[\"dhx_cal_data\"][0].scrollTop;\r\n\tpos.y-=this.$domHelpers.getAbsoluteTop(dataArea)-this._els[\"dhx_cal_data\"][0].scrollTop;\r\n\tpos.ev = ev;\r\n\tvar handler = this[\"mouse_\"+this._mode];\r\n\tif (handler){\r\n\t\tpos = handler.call(this,pos);\r\n\t}else{\r\n\t\t//transform to date\r\n\t\tif (!this._table_view) {\r\n\t\t\tpos = this._week_indexes_from_pos(pos);\r\n\t\t} else {\r\n\t\t\tvar column = this._get_column_index(pos.x);\r\n\t\t\tif (!this._cols || !this._colsS) // agenda/map views\r\n\t\t\t\treturn pos;\r\n\t\t\tvar dy=0;\r\n\t\t\tfor (dy=1; dy < this._colsS.heights.length; dy++)\r\n\t\t\t\tif (this._colsS.heights[dy]>pos.y) break;\r\n\r\n\t\t\tpos.y=Math.ceil( (Math.max(0, column)+Math.max(0,dy-1)*7)*24*60/this.config.time_step );\r\n\r\n\t\t\tif (scheduler._drag_mode || this._mode == \"month\")\r\n\t\t\t\tpos.y=(Math.max(0,Math.ceil(column)-1)+Math.max(0,dy-1)*7)*24*60/this.config.time_step;\r\n\r\n\t\t\t//we care about ignored days only during event moving in month view\r\n\t\t\tif (this._drag_mode == \"move\"){\r\n\t\t\t\tif (scheduler._ignores_detected && scheduler.config.preserve_length){\r\n\t\t\t\t\tpos._ignores = true;\r\n\t\t\t\t\t//get real lengtn of event\r\n\t\t\t\t\tif (!this._drag_event._event_length)\r\n\t\t\t\t\t\tthis._drag_event._event_length = this._get_real_event_length(this._drag_event.start_date, this._drag_event.end_date, { x_step:1, x_unit:\"day\"});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tpos.x=0;\r\n\t\t}\r\n\t}\r\n\tpos.timestamp = +new Date();\r\n\treturn pos;\r\n};\r\nscheduler._close_not_saved=function(){\r\n\tif (new Date().valueOf()-(scheduler._new_event||0) > 500 && scheduler._edit_id){\r\n\t\tvar c=scheduler.locale.labels.confirm_closing;\r\n\r\n\t\tscheduler._dhtmlx_confirm({message: c, title: scheduler.locale.labels.title_confirm_closing, callback: function() { scheduler.editStop(scheduler.config.positive_closing); }});\r\n\t\tif(c){\r\n\t\t\tthis._drag_id = this._drag_pos = this._drag_mode = null;\r\n\t\t}\r\n\t}\r\n};\r\nscheduler._correct_shift=function(start, back){\r\n\treturn start-=((new Date(scheduler._min_date)).getTimezoneOffset()-(new Date(start)).getTimezoneOffset())*60000*(back?-1:1);\r\n};\r\n\r\nscheduler._is_pos_changed = function(old_pos, new_pos){\r\n\tfunction diff(old_val, new_val, acc){\r\n\t\treturn !!(Math.abs(old_val - new_val) > acc);\r\n\t}\r\n\r\n\tif(!(old_pos && this._drag_pos)){\r\n\t\treturn true;\r\n\t}\r\n\tvar delay = 100,\r\n\t\td_pos = 5;\r\n\r\n\t// start drag only if passed some time since mouse down, or if mouse position changed sufficiently\r\n\treturn !!(this._drag_pos.has_moved || !this._drag_pos.timestamp || (new_pos.timestamp - this._drag_pos.timestamp > delay) || diff(old_pos.ev.clientX, new_pos.ev.clientX, d_pos) || diff(old_pos.ev.clientY, new_pos.ev.clientY, d_pos));\r\n};\r\n\r\nscheduler._correct_drag_start_date = function(start){\r\n\tvar obj;\r\n\tif (scheduler.matrix)\r\n\t\tobj = scheduler.matrix[scheduler._mode];\r\n\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\tstart = new Date(start);\r\n\tvar len = 1;\r\n\tif(obj._start_correction || obj._end_correction)\r\n\t\tlen = (obj.last_hour||0)*60 - (start.getHours()*60+start.getMinutes()) || 1;\r\n\r\n\treturn start*1 + (scheduler._get_fictional_event_length(start, len, obj) - len);\r\n};\r\nscheduler._correct_drag_end_date = function(start, duration){\r\n\tvar obj;\r\n\tif (scheduler.matrix)\r\n\t\tobj = scheduler.matrix[scheduler._mode];\r\n\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\tvar end = start*1 + scheduler._get_fictional_event_length(start, duration, obj);\r\n\treturn new Date(end*1 - (scheduler._get_fictional_event_length(end, -1, obj, -1) + 1));\r\n};\r\n\r\nscheduler._on_mouse_move=function(e){\r\n\tif (this._drag_mode){\r\n\t\tvar pos=this._mouse_coords(e);\r\n\t\tif (this._is_pos_changed(this._drag_pos, pos)){\r\n\t\t\tvar start, end;\r\n\t\t\tif (this._edit_id!=this._drag_id)\r\n\t\t\t\tthis._close_not_saved();\r\n\r\n\t\t\tif(!this._drag_mode)\r\n\t\t\t\treturn;\r\n\r\n\t\t\tvar mousedownPos = null;\r\n\t\t\tif(this._drag_pos && !this._drag_pos.has_moved){\r\n\t\t\t\tmousedownPos = this._drag_pos;\r\n\t\t\t\tmousedownPos.has_moved = true;\r\n\t\t\t}\r\n\r\n\t\t\tthis._drag_pos = pos;\r\n\r\n\t\t\tthis._drag_pos.has_moved = true;\r\n\r\n\t\t\tif (this._drag_mode==\"create\"){\r\n\r\n\t\t\t\t// use mouse down position as a starting point for drag-create\r\n\t\t\t\tif(mousedownPos){\r\n\t\t\t\t\tpos = mousedownPos;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis._close_not_saved();\r\n\t\t\t\tthis.unselect(this._select_id);\r\n\t\t\t\tthis._loading=true; //will be ignored by dataprocessor\r\n\r\n\t\t\t\tstart = this._get_date_from_pos(pos).valueOf();\r\n\r\n\t\t\t\tif (!this._drag_start) {\r\n\t\t\t\t\tvar res = this.callEvent(\"onBeforeEventCreated\", [e, this._drag_id]);\r\n\t\t\t\t\tif (!res){\r\n\t\t\t\t\t\tthis._loading=false;\r\n\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis._loading=false;\r\n\t\t\t\t\tthis._drag_start=start;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tend = start;\r\n\t\t\t\tif (end == this._drag_start) {\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar start_date = new Date(this._drag_start);\r\n\t\t\t\tvar end_date = new Date(end);\r\n\t\t\t\tif ( (this._mode == \"day\" || this._mode == \"week\") &&\r\n\t\t\t\t\t(start_date.getHours() == end_date.getHours() &&\r\n\t\t\t\t\tstart_date.getMinutes() == end_date.getMinutes()) ) {\r\n\t\t\t\t\t\tend_date = new Date(this._drag_start+1000);\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\tthis._drag_id=this.uid();\r\n\t\t\t\tthis.addEvent(start_date, end_date, this.locale.labels.new_event, this._drag_id, pos.fields);\r\n\r\n\t\t\t\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\t\t\t\tthis._loading=false;\r\n\t\t\t\tthis._drag_mode=\"new-size\";\r\n\r\n\t\t\t}\r\n\r\n\t\t\tvar timeStep = this.config.time_step;\r\n\t\t\tvar ev=this.getEvent(this._drag_id);\r\n\t\t\tvar obj;\r\n\t\t\tif (scheduler.matrix)\r\n\t\t\t\tobj = scheduler.matrix[scheduler._mode];\r\n\t\t\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\t\t\tif (this._drag_mode==\"move\"){\r\n\t\t\t\tstart = this._min_date.valueOf()+(pos.y*this.config.time_step+pos.x*24*60)*60000;\r\n\t\t\t\tif (!pos.custom && this._table_view) {\r\n\t\t\t\t\tstart += this.date.time_part(ev.start_date) * 1000;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!this._table_view && this._dragEventBody && this._drag_event._move_event_shift === undefined) {\r\n\t\t\t\t\tthis._drag_event._move_event_shift = start - ev.start_date;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (this._drag_event._move_event_shift) {\r\n\t\t\t\t\tstart -= this._drag_event._move_event_shift;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tstart = this._correct_shift(start);\r\n\r\n\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view && obj){\r\n\r\n\t\t\t\t\tstart = scheduler._correct_drag_start_date(start);\r\n\t\t\t\t\tend = scheduler._correct_drag_end_date(start,this._drag_event._event_length);\r\n\r\n\t\t\t\t} else\r\n\t\t\t\t\tend = ev.end_date.valueOf()-(ev.start_date.valueOf()-start);\r\n\t\t\t} else { // resize\r\n\t\t\t\tstart = ev.start_date.valueOf();\r\n\t\t\t\tend = ev.end_date.valueOf();\r\n\t\t\t\tif (this._table_view) {\r\n\t\t\t\t\tvar resize_date = this._min_date.valueOf()+pos.y*this.config.time_step*60000 + (pos.custom?0:24*60*60000);\r\n\t\t\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\t\t\tresize_date = this._correct_shift(resize_date, false);\r\n\t\t\t\t\t\tif( this._drag_from_start ) {\r\n\t\t\t\t\t\t\tvar day = 24*60*60000;\r\n\t\t\t\t\t\t\tif( resize_date <= scheduler.date.date_part(new Date(end+day-1)).valueOf() ) // to get end time as 23:59:59 and then the day start\r\n\t\t\t\t\t\t\t\tstart = resize_date - day;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tend = resize_date;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif(this.config.preserve_length) {\r\n\t\t\t\t\t\t\tif (pos.resize_from_start) {\r\n\t\t\t\t\t\t\t\tstart = scheduler._correct_drag_start_date(resize_date);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tend = scheduler._correct_drag_end_date(resize_date, 0);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tif (pos.resize_from_start) {\r\n\t\t\t\t\t\t\t\tstart = resize_date;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tend = resize_date;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvar end_day_start = this.date.date_part(new Date(ev.end_date.valueOf() - 1)).valueOf();\r\n\t\t\t\t\tvar end_day_date = new Date(end_day_start);\r\n\t\t\t\t\tvar firstHour = this.config.first_hour;\r\n\t\t\t\t\tvar lastHour = this.config.last_hour;\r\n\t\t\t\t\tvar maxY = (lastHour - firstHour) * (60/timeStep);\r\n\r\n\t\t\t\t\tthis.config.time_step = 1;\r\n\t\t\t\t\tvar precisePos = this._mouse_coords(e);\r\n\t\t\t\t\tthis.config.time_step = timeStep;\r\n\r\n\t\t\t\t\tvar minDate = pos.y*timeStep*60000;\r\n\t\t\t\t\tvar maxDate = Math.min(pos.y + 1, maxY)*timeStep*60000;\r\n\t\t\t\t\tvar preciseDate = precisePos.y*60000;\r\n\r\n\t\t\t\t\t// rounding end date to the closest time step\r\n\t\t\t\t\tif(Math.abs(minDate - preciseDate) > Math.abs(maxDate - preciseDate)){\r\n\t\t\t\t\t\tend = end_day_start + maxDate;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tend = end_day_start + minDate;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = end + ((new Date(end)).getTimezoneOffset() - end_day_date.getTimezoneOffset()) * 60000;\r\n\t\t\t\t\tthis._els[\"dhx_cal_data\"][0].style.cursor=\"s-resize\";\r\n\t\t\t\t\tif (this._mode == \"week\" || this._mode == \"day\")\r\n\t\t\t\t\t\tend = this._correct_shift(end);\r\n\t\t\t\t}\r\n\t\t\t\tif (this._drag_mode == \"new-size\") {\r\n\t\t\t\t\tif (end <= this._drag_start){\r\n\t\t\t\t\t\tvar shift = pos.shift||((this._table_view && !pos.custom)?24*60*60000:0);\r\n\t\t\t\t\t\tstart = end-(pos.shift?0:shift);\r\n\t\t\t\t\t\tend = this._drag_start+(shift||(timeStep*60000));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tstart = this._drag_start;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (end<=start)\r\n\t\t\t\t\t\tend=start+timeStep*60000;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar new_end = new Date(end-1);\r\n\t\t\tvar new_start = new Date(start);\r\n\t\t\t//deny drag out of visible scheduler scale in timeline view\r\n\t\t\tif(this._drag_mode==\"move\" && scheduler.config.limit_drag_out &&\r\n\t\t\t\t(+new_start < +scheduler._min_date || +end > +scheduler._max_date)){\r\n\r\n\t\t\t\tif(+ev.start_date < +scheduler._min_date || +ev.end_date > +scheduler._max_date){\r\n\t\t\t\t\t// not move event if it's already outside time scale\r\n\t\t\t\t\tnew_start = new Date(ev.start_date);\r\n\t\t\t\t\tend = new Date(ev.end_date);\r\n\t\t\t\t}else{\r\n\r\n\t\t\t\t\tvar duration = end - new_start;\r\n\r\n\t\t\t\t\tif(+new_start < +scheduler._min_date){\r\n\t\t\t\t\t\tnew_start = new Date(scheduler._min_date);\r\n\t\t\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view){\r\n\t\t\t\t\t\t\tnew_start = new Date(scheduler._correct_drag_start_date(new_start));\r\n\t\t\t\t\t\t\tif(obj._start_correction)\r\n\t\t\t\t\t\t\t\tnew_start = new Date(new_start.valueOf() + obj._start_correction);\r\n\t\t\t\t\t\t\tend = new Date(new_start*1 + this._get_fictional_event_length(new_start, this._drag_event._event_length, obj));\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tend = new Date(+new_start + duration);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tend = new Date(scheduler._max_date);\r\n\r\n\t\t\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view){\r\n\t\t\t\t\t\t\tif(obj._end_correction)\r\n\t\t\t\t\t\t\t\tend = new Date(end.valueOf() - obj._end_correction);\r\n\t\t\t\t\t\t\tend = new Date(end*1 - this._get_fictional_event_length(end, 0, obj, true));\r\n\t\t\t\t\t\t\tnew_start = new Date(end*1 - this._get_fictional_event_length(end, this._drag_event._event_length, obj, true));\r\n\t\t\t\t\t\t\tif(this._ignores_detected){\r\n\t\t\t\t\t\t\t\tnew_start = scheduler.date.add(new_start, obj.x_step, obj.x_unit);\r\n\t\t\t\t\t\t\t\tend = new Date(end*1 - this._get_fictional_event_length(end, 0, obj, true));\r\n\t\t\t\t\t\t\t\tend = scheduler.date.add(end, obj.x_step, obj.x_unit);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tnew_start = new Date(+end - duration);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t\tvar new_end = new Date(end-1);\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\t// fix event dates when resized to bottom of the column (day/week views)\r\n\t\t\tif(!this._table_view && this._dragEventBody &&\r\n\t\t\t\t!scheduler.config.all_timed &&\r\n\t\t\t\t((!scheduler._get_section_view() && pos.x != this._get_event_sday({start_date: new Date(start), end_date:new Date(start)})) || new Date(start).getHours() < this.config.first_hour)){\r\n\t\t\t\tvar duration = end - new_start;\r\n\t\t\t\tif (this._drag_mode == \"move\") {\r\n\t\t\t\t\tvar day = this._min_date.valueOf() + (pos.x * 24 * 60) * 60000;\r\n\t\t\t\t\tnew_start = new Date(day);\r\n\t\t\t\t\tnew_start.setHours(this.config.first_hour);\r\n\t\t\t\t\tend = new Date(new_start.valueOf() + duration);\r\n\t\t\t\t\tnew_end = new Date(end-1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// fix event dates when resized to bottom of the column (day/week views)\r\n\t\t\tif(!this._table_view &&\r\n\t\t\t\t!scheduler.config.all_timed &&\r\n\t\t\t\t((!scheduler.getView() && pos.x != this._get_event_sday({start_date: new Date(end), end_date:new Date(end)})) || new Date(end).getHours() >= this.config.last_hour)){\r\n\t\t\t\tvar duration = end - new_start;\r\n\t\t\t\tvar day = this._min_date.valueOf()+(pos.x*24*60)*60000;\r\n\t\t\t\tend = scheduler.date.date_part(new Date(day));\r\n\t\t\t\tend.setHours(this.config.last_hour);\r\n\t\t\t\tnew_end = new Date(end-1);\r\n\t\t\t\tif(this._drag_mode == \"move\"){\r\n\t\t\t\t\tnew_start = new Date(+end - duration);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//prevent out-of-borders situation for day|week view\r\n\t\t\tif ( this._table_view || (new_end.getDate()==new_start.getDate() && new_end.getHours()=ed)\r\n\t\t\t\tcls += ' dhx_after';\r\n\t\t\telse if (sd.valueOf()==cd.valueOf())\r\n\t\t\t\tcls += ' dhx_now';\r\n\r\n\t\t\tif (this._ignores_detected && this._ignores[j]){\r\n\t\t\t\tcls += \" dhx_scale_ignore\";\r\n\t\t\t}\r\n\r\n\t\t\tcell.className = cls + \" \" + this.templates.month_date_class(sd, cd);\r\n\r\n\t\t\tcell.setAttribute(\"data-cell-date\", scheduler.templates.format_date(sd));\r\n\t\t\tvar body_class = \"dhx_month_body\";\r\n\t\t\tvar head_class = \"dhx_month_head\";\r\n\t\t\tif (j === 0 && this.config.left_border) {\r\n\t\t\t\tbody_class += \" dhx_month_body_border\";\r\n\t\t\t\thead_class += \" dhx_month_head_border\";\r\n\t\t\t}\r\n\t\t\tif (!this._ignores_detected || !this._ignores[j]){\r\n\t\t\t\tcell.style.width = tdwidths[j];\r\n\t\t\t\tthis._waiAria.monthCellAttr(cell, sd);\r\n\r\n\t\t\t\tvar cellHead = document.createElement(\"div\");\r\n\t\t\t\tcellHead.style.height = scheduler.xy.month_head_height + \"px\";\r\n\t\t\t\tcellHead.className = head_class;\r\n\t\t\t\tcellHead.innerHTML = this.templates.month_day(sd);\r\n\t\t\t\tcell.appendChild(cellHead);\r\n\r\n\t\t\t\tvar cellBody = document.createElement(\"div\");\r\n\t\t\t\tcellBody.className = body_class;\r\n\t\t\t\t// cellBody.style.height = row_height + \"px\";\r\n\t\t\t\t// cellBody.style.width = tdwidths[j];\r\n\t\t\t\tcell.appendChild(cellBody);\r\n\r\n\t\t\t} else {\r\n\t\t\t\tcell.appendChild(document.createElement(\"div\"));\r\n\t\t\t\tcell.appendChild(document.createElement(\"div\"));\r\n\t\t\t}\r\n\t\t\trendered_dates.push(sd);\r\n\t\t\tvar bf1 = sd.getDate();\r\n\t\t\tsd=this.date.add(sd,1,\"day\");\r\n\t\t\tif (sd.getDate() - bf1 > 1)\r\n\t\t\t\tsd = new Date(sd.getFullYear(), sd.getMonth(), bf1 + 1, 12, 0);\r\n\t\t}\r\n\r\n\t\tscheduler._colsS.heights[i] = cellheight;\r\n\t\tcellheight += getCellHeight(i);\r\n\t}\r\n\r\n\tthis._min_date = view_start;\r\n\tthis._max_date = sd;\r\n\r\n\tdiv.innerHTML = \"\";\r\n\tdiv.appendChild(table);\r\n\r\n\tthis._scales = {};\r\n\tvar cells = div.querySelectorAll('[data-cell-date]');\r\n\tcells.forEach((cell) => {\r\n\t\tconst date = scheduler.templates.parse_date(cell.getAttribute(\"data-cell-date\"));\r\n\t\tconst body = cell.querySelector(\".dhx_month_body\");\r\n\t\tthis._scales[+date] = body;\r\n\t\tthis.callEvent(\"onScaleAdd\", [this._scales[+date], date]);\r\n\t});\r\n\r\n\treturn this._max_date;\r\n};\r\n\r\nscheduler._reset_month_scale=function(b,dd,sd,rows){\r\n\t//recalculates rows height and redraws month layout\r\n\tvar ed=scheduler.date.add(dd,1,\"month\");\r\n\r\n\t//trim time part for comparison reasons\r\n\tvar cd = scheduler._currentDate();\r\n\tthis.date.date_part(cd);\r\n\tthis.date.date_part(sd);\r\n\r\n\trows = rows || Math.ceil(Math.round((ed.valueOf()-sd.valueOf()) / (60*60*24*1000) ) / 7);\r\n\r\n\tvar height = (Math.floor(b.clientHeight/rows) - this.xy.month_head_height);\r\n\r\n\tthis._colsS.height = height + this.xy.month_head_height;\r\n\tthis._colsS.heights = [];\r\n\r\n\treturn scheduler._render_month_scale(b, dd, sd, rows);\r\n\r\n};\r\n\r\nscheduler.getView = function (viewName) {\r\n\tif (!viewName) {\r\n\t\tviewName = scheduler.getState().mode;\r\n\t}\r\n\tif (scheduler.matrix && scheduler.matrix[viewName]) {\r\n\t\treturn scheduler.matrix[viewName];\r\n\t}\r\n\r\n\tif (scheduler._props && scheduler._props[viewName]) {\r\n\t\treturn scheduler._props[viewName];\r\n\t}\r\n\r\n\treturn null;\r\n};\r\n\r\nscheduler.getLabel = function(property, key) {\r\n\tvar sections = this.config.lightbox.sections;\r\n\tfor (var i=0; i scheduler.getState().max_date.valueOf()){\r\n\t\t\tendColumnIndex += getDaysDifference(endDate, scheduler.getState().max_date);\r\n\t\t}\r\n\t} else{\r\n\t\tendColumnIndex = Math.round(eventLength/60/60/1000/24);\r\n\t}\r\n\r\n\tvar last_column = true;\r\n\twhile (startColumnIndex < endColumnIndex){\r\n\t\tvar check = scheduler.date.add(endDate, -config.x_step, config.x_unit);\r\n\t\tif (ignore && ignore(endDate) && (!last_column || (last_column && ignore(check) ))){\r\n\t\t\teventLength -= (endDate-check);\r\n\r\n\t\t}else{\r\n\t\t\tlet excludedDuration = 0;\r\n\t\t\tconst intervalStart = new Date(Math.max(check.valueOf(), startDate.valueOf()));\r\n\t\t\tconst intervalEnd = endDate;\r\n\t\t\tconst leftCellCutOffStart = new Date(intervalStart.getFullYear(), intervalStart.getMonth(), intervalStart.getDate(), config.first_hour);\r\n\t\t\tconst leftCellCutOffEnd = new Date(intervalStart.getFullYear(), intervalStart.getMonth(), intervalStart.getDate(), config.last_hour);\r\n\t\t\tconst rightCellCutOffStart = new Date(endDate.getFullYear(), endDate.getMonth(), endDate.getDate(), config.first_hour);\r\n\t\t\tconst rightCellCutOffEnd = new Date(endDate.getFullYear(), endDate.getMonth(), endDate.getDate(), config.last_hour);\r\n\r\n\t\t\tif(intervalEnd.valueOf() > rightCellCutOffEnd.valueOf()){\r\n\t\t\t\texcludedDuration += intervalEnd - rightCellCutOffEnd;\r\n\t\t\t}\r\n\r\n\t\t\tif(intervalEnd.valueOf() > rightCellCutOffStart.valueOf()){\r\n\t\t\t\texcludedDuration += config._start_correction;\r\n\t\t\t} else {\r\n\t\t\t\texcludedDuration += intervalEnd.getHours()*60*60*1000 + intervalEnd.getMinutes()*60*1000;\r\n\t\t\t}\r\n\r\n\t\t\tif(intervalStart.valueOf() < leftCellCutOffEnd.valueOf()){\r\n\t\t\t\texcludedDuration += config._end_correction;\r\n\t\t\t}\r\n\r\n\t\t\tif(intervalStart.valueOf() < leftCellCutOffStart.valueOf()){\r\n\t\t\t\texcludedDuration += (leftCellCutOffStart.valueOf() - intervalStart.valueOf());\r\n\t\t\t}\r\n\t\t\t\r\n\r\n\t\t\teventLength -= excludedDuration;\r\n\t\t\tlast_column = false;\r\n\t\t}\r\n\t\tendDate = check;\r\n\t\tendColumnIndex--;\r\n\t}\r\n\treturn eventLength;\r\n};\r\nscheduler._get_fictional_event_length=function(end_date, ev_length, obj, back){\r\n\tvar sd = new Date(end_date);\r\n\tvar dir = back ? -1 : 1;\r\n\r\n\t//get difference caused by first|last hour\r\n\tif (obj._start_correction || obj._end_correction){\r\n\t\tvar today;\r\n\t\tif (back)\r\n\t\t\ttoday = (sd.getHours()*60+sd.getMinutes()) - (obj.first_hour||0)*60;\r\n\t\telse\r\n\t\t\ttoday = (obj.last_hour||0)*60 - (sd.getHours()*60+sd.getMinutes());\r\n\t\tvar per_day = (obj.last_hour - obj.first_hour)*60;\r\n\t\tvar days = Math.ceil( (ev_length / (60*1000) - today ) / per_day);\r\n\t\tif(days < 0) days = 0;\r\n\t\tev_length += days * (24*60 - per_day) * 60 * 1000;\r\n\t}\r\n\r\n\tvar fd = new Date(end_date*1+ev_length*dir);\r\n\tvar ignore = this[\"ignore_\"+this._mode];\r\n\r\n\tvar start_slot = 0,\r\n\t\tend_slot;\r\n\tif (obj.render){\r\n\t\tstart_slot = this._get_date_index(obj, sd);\r\n\t\tend_slot = this._get_date_index(obj, fd);\r\n\t} else{\r\n\t\tend_slot = Math.round(ev_length/60/60/1000/24);\r\n\t}\r\n\r\n\twhile (start_slot*dir <= end_slot*dir){\r\n\t\tvar check = scheduler.date.add(sd, obj.x_step*dir, obj.x_unit);\r\n\t\tif (ignore && ignore(sd)){\r\n\t\t\tev_length += (check-sd)*dir;\r\n\t\t\tend_slot += dir;\r\n\t\t}\r\n\r\n\t\tsd = check;\r\n\t\tstart_slot+=dir;\r\n\t}\r\n\r\n\treturn ev_length;\r\n};\r\n\r\nscheduler._get_section_view = function(){\r\n\treturn this.getView();\r\n};\r\n\r\nscheduler._get_section_property = function(){\r\n\tif(this.matrix && this.matrix[this._mode]){\r\n\t\treturn this.matrix[this._mode].y_property;\r\n\t}else if(this._props && this._props[this._mode]){\r\n\t\treturn this._props[this._mode].map_to;\r\n\t}\r\n\treturn null;\r\n};\r\n\r\nscheduler._is_initialized = function(){\r\n\tvar state = this.getState();\r\n\treturn (this._obj && state.date && state.mode);\r\n};\r\nscheduler._is_lightbox_open = function(){\r\n\tvar state = this.getState();\r\n\treturn state.lightbox_id !== null && state.lightbox_id !== undefined;\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n(function(){\r\n\r\n\t// eslint-disable-next-line no-control-regex\r\n\tvar htmlTags = new RegExp(\"<(?:.|\\n)*?>\", \"gm\");\r\n\tvar extraSpaces = new RegExp(\" +\", \"gm\");\r\n\r\n\tfunction stripHTMLLite(htmlText){\r\n\t\treturn (htmlText + \"\")\r\n\t\t\t.replace(htmlTags, \" \").\r\n\t\t\treplace(extraSpaces, \" \");\r\n\t}\r\n\r\n\tvar singleQuotes = new RegExp(\"'\", \"gm\");\r\n\tfunction escapeQuotes(text){\r\n\t\treturn (text + \"\").replace(singleQuotes, \"'\");\r\n\t}\r\n\r\n\tscheduler._waiAria = {\r\n\t\tgetAttributeString: function(attr){\r\n\t\t\tvar attributes = [\" \"];\r\n\t\t\tfor(var i in attr){\r\n\t\t\t\tif(typeof attr[i] != \"function\" && typeof attr[i] != \"object\") {\r\n\t\t\t\t\tvar text = escapeQuotes(stripHTMLLite(attr[i]));\r\n\t\t\t\t\tattributes.push(i + \"='\" + text + \"'\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tattributes.push(\" \");\r\n\t\t\treturn attributes.join(\" \");\r\n\t\t},\r\n\t\tsetAttributes: function(div, values){\r\n\t\t\tfor(var i in values){\r\n\t\t\t\tdiv.setAttribute(i, stripHTMLLite(values[i]));\r\n\t\t\t}\r\n\t\t\treturn div;\r\n\t\t},\r\n\r\n\t\tlabelAttr: function(div, content){\r\n\t\t\treturn this.setAttributes(div, {\"aria-label\": content});\r\n\t\t},\r\n\t\tlabel: function(label){\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": label});\r\n\t\t},\r\n\r\n\t\t// day/week/units\r\n\r\n\t\thourScaleAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\r\n\t\t},\r\n\t\tmonthCellAttr: function(div, date){\r\n\t\t\tthis.labelAttr(div, scheduler.templates.day_date(date));\r\n\t\t},\r\n\r\n\t\tnavBarDateAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\t\t},\r\n\t\tdayHeaderAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\t\t},\r\n\r\n\t\tdayColumnAttr: function(div, date){\r\n\t\t\tthis.dayHeaderAttr(div, scheduler.templates.day_date(date));\r\n\t\t},\r\n\r\n\t\theaderButtonsAttributes: function(div, label){\r\n\t\t\treturn this.setAttributes(div, {\"role\":\"button\", \"aria-label\":label});\r\n\t\t},\r\n\r\n\t\theaderToggleState: function(div, isActive){\r\n\t\t\treturn this.setAttributes(div, {\"aria-pressed\": isActive ? \"true\" : \"false\"});\r\n\t\t},\r\n\r\n\r\n\t\tgetHeaderCellAttr:function(dateString){\r\n\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": dateString});\r\n\t\t},\r\n\r\n\r\n\t\teventAttr: function(event, div){\r\n\t\t\tthis._eventCommonAttr(event, div);\r\n\t\t},\r\n\r\n\r\n\t\t_eventCommonAttr: function(event, div){\r\n\t\t\tdiv.setAttribute(\"aria-label\", stripHTMLLite(scheduler.templates.event_text(event.start_date, event.end_date, event)));\r\n\r\n\t\t\tif(scheduler.config.readonly){\r\n\t\t\t\tdiv.setAttribute(\"aria-readonly\", true);\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif(event.$dataprocessor_class){\r\n\t\t\t\tdiv.setAttribute(\"aria-busy\", true);\r\n\t\t\t}\r\n\r\n\r\n\t\t\tdiv.setAttribute(\"aria-selected\",\r\n\t\t\t\t(scheduler.getState().select_id == event.id) ? \"true\" : \"false\");\r\n\t\t},\r\n\r\n\t\tsetEventBarAttr: function(event, div){\r\n\t\t\tthis._eventCommonAttr(event, div);\r\n\t\t},\r\n\r\n\t\t_getAttributes: function(attributeSetter, arg){\r\n\t\t\tvar result = {\r\n\t\t\t\tsetAttribute:function(name, value){\r\n\t\t\t\t\tthis[name] = value;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\tattributeSetter.apply(this, [arg, result]);\r\n\t\t\treturn result;\r\n\r\n\t\t},\r\n\r\n\t\teventBarAttrString: function(event){\r\n\t\t\treturn this.getAttributeString(this._getAttributes(this.setEventBarAttr, event));\r\n\t\t},\r\n\r\n\r\n\r\n\t\tagendaHeadAttrString :function(){\r\n\t\t\treturn this.getAttributeString({role: \"row\"});\r\n\t\t},\r\n\t\tagendaHeadDateString :function(label){\r\n\t\t\treturn this.getAttributeString({role: \"columnheader\", \"aria-label\": label});\r\n\t\t},\r\n\t\tagendaHeadDescriptionString :function(label){\r\n\t\t\treturn this.agendaHeadDateString(label);\r\n\t\t},\r\n\t\tagendaDataAttrString: function(){\r\n\t\t\treturn this.getAttributeString({role: \"grid\"});\r\n\t\t},\r\n\t\tagendaEventAttrString: function(event){\r\n\t\t\tvar attrs = this._getAttributes(this._eventCommonAttr, event);\r\n\r\n\t\t\tattrs[\"role\"] = \"row\";\r\n\r\n\t\t\treturn this.getAttributeString(attrs);\r\n\r\n\t\t},\r\n\t\tagendaDetailsBtnString: function(){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels.icon_details});\r\n\t\t},\r\n\r\n\r\n\t\tgridAttrString: function(){\r\n\t\t\treturn this.getAttributeString({role: \"grid\"});\r\n\t\t},\r\n\r\n\t\tgridRowAttrString: function(event){\r\n\t\t\treturn this.agendaEventAttrString(event);\r\n\t\t},\r\n\r\n\t\tgridCellAttrString: function(event, column, value){\r\n\t\t\treturn this.getAttributeString({\"role\":\"gridcell\", \"aria-label\": [\r\n\t\t\t\t(column.label === undefined ? column.id : column.label),\r\n\t\t\t\t\": \",\r\n\t\t\t\tvalue\r\n\t\t\t]});\r\n\t\t},\r\n\r\n\t\tmapAttrString: function(){\r\n\t\t\treturn this.gridAttrString();\r\n\t\t},\r\n\t\tmapRowAttrString: function(event){\r\n\t\t\treturn this.gridRowAttrString(event);\r\n\t\t},\r\n\t\tmapDetailsBtnString: function(){\r\n\t\t\treturn this.agendaDetailsBtnString();\r\n\t\t},\r\n\r\n\t\tminicalHeader: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"id\":headerId+\"\",\r\n\t\t\t\t\"aria-live\":\"assertice\",\r\n\t\t\t\t\"aria-atomic\":\"true\"\r\n\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalGrid: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"aria-labelledby\":headerId+\"\",\r\n\t\t\t\t\"role\":\"grid\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalRow: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"row\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalDayCell: function(div, date){\r\n\t\t\tvar selected = (date.valueOf() < scheduler._max_date.valueOf() && date.valueOf() >= scheduler._min_date.valueOf());\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"gridcell\",\r\n\t\t\t\t\"aria-label\": scheduler.templates.day_date(date),\r\n\t\t\t\t\"aria-selected\": selected ? \"true\" : \"false\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalHeadCell: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"columnheader\"\r\n\t\t\t});\r\n\t\t},\r\n\r\n\r\n\t\tweekAgendaDayCell: function(div, date){\r\n\t\t\tvar header = div.querySelector(\".dhx_wa_scale_bar\");\r\n\t\t\tvar content = div.querySelector(\".dhx_wa_day_data\");\r\n\t\t\tvar headerId = scheduler.uid() + \"\";\r\n\t\t\tthis.setAttributes(header, { \"id\": headerId});\r\n\t\t\tthis.setAttributes(content, { \"aria-labelledby\": headerId});\r\n\r\n\t\t},\r\n\t\tweekAgendaEvent: function(div, event){\r\n\t\t\tthis.eventAttr(event, div);\r\n\t\t},\r\n\r\n\t\tlightboxHiddenAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t},\r\n\r\n\t\tlightboxVisibleAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"false\");\r\n\t\t},\r\n\r\n\t\tlightboxSectionButtonAttrString: function(label){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":label, \"tabindex\":\"0\"});\r\n\t\t},\r\n\r\n\t\tyearHeader: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"id\":headerId+\"\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tyearGrid: function(div, headerId){\r\n\t\t\tthis.minicalGrid(div, headerId);\r\n\t\t},\r\n\t\tyearHeadCell: function(div){\r\n\t\t\treturn this.minicalHeadCell(div);\r\n\t\t},\r\n\t\tyearRow: function(div){\r\n\t\t\treturn this.minicalRow(div);\r\n\t\t},\r\n\t\tyearDayCell: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"gridcell\"\r\n\t\t\t});\r\n\t\t},\r\n\r\n\t\tlightboxAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t\tdiv.firstChild.setAttribute(\"role\", \"heading\");\r\n\t\t},\r\n\r\n\t\tlightboxButtonAttrString:function(buttonName){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels[buttonName], \"tabindex\":\"0\"});\r\n\t\t},\r\n\t\teventMenuAttrString: function(iconName){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels[iconName]});\r\n\t\t},\r\n\t\tlightboxHeader: function(div, headerText){\r\n\t\t\tdiv.setAttribute(\"aria-label\", headerText);\r\n\t\t},\r\n\r\n\t\tlightboxSelectAttrString: function(time_option){\r\n\t\t\tvar label = \"\";\r\n\r\n\t\t\tswitch (time_option) {\r\n\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.year;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%m\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.month;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%d\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.day;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%H:%i\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.hour + \" \" + scheduler.locale.labels.minute;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": label});\r\n\t\t},\r\n\r\n\r\n\t\tmessageButtonAttrString: function(buttonLabel){\r\n\t\t\treturn \"tabindex='0' role='button' aria-label='\"+buttonLabel+\"'\";\r\n\t\t},\r\n\r\n\t\tmessageInfoAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"alert\");\r\n\t\t\t//div.setAttribute(\"tabindex\", \"-1\");\r\n\t\t},\r\n\r\n\t\tmessageModalAttr: function(div, uid){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t\tif(uid){\r\n\t\t\t\tdiv.setAttribute(\"aria-labelledby\", uid);\r\n\t\t\t}\r\n\r\n\t\t\t//\tdiv.setAttribute(\"tabindex\", \"-1\");\r\n\t\t},\r\n\r\n\t\tquickInfoAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t},\r\n\r\n\t\tquickInfoHeaderAttrString: function(){\r\n\t\t\treturn \" role='heading' \";\r\n\t\t},\r\n\r\n\t\tquickInfoHeader: function(div, header){\r\n\t\t\tdiv.setAttribute(\"aria-label\", header);\r\n\t\t},\r\n\r\n\t\tquickInfoButtonAttrString: function(label){\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"role\":\"button\", \"aria-label\":label, \"tabindex\":\"0\"});\r\n\t\t},\r\n\r\n\t\ttooltipAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"tooltip\");\r\n\t\t},\r\n\r\n\t\ttooltipVisibleAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"false\");\r\n\t\t},\r\n\r\n\t\ttooltipHiddenAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t}\r\n\t};\r\n\r\n\tfunction isDisabled(){\r\n\t\treturn !scheduler.config.wai_aria_attributes;\r\n\t}\r\n\r\n\tfor(var i in scheduler._waiAria){\r\n\t\tscheduler._waiAria[i] = (function(payload){\r\n\t\t\treturn function(){\r\n\t\t\t\tif(isDisabled()){\r\n\t\t\t\t\treturn \" \";\r\n\t\t\t\t}\r\n\t\t\t\treturn payload.apply(this, arguments);\r\n\t\t\t};\r\n\t\t})(scheduler._waiAria[i]);\r\n\t}\r\n\r\n\r\n})();\r\n\r\n}","export default function(scheduler){\r\n\treturn function assert(check, message){\r\n\t\tif (!check){\r\n\t\t\tif(scheduler.config.show_errors && scheduler.callEvent(\"onError\",[message]) !== false) {\r\n\t\t\t\tif (scheduler.message) {\r\n\t\t\t\t\tscheduler.message({type: \"error\", text: message, expire: -1});\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t// eslint-disable-next-line\r\n\t\t\t\t\tconsole.log(message);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// eslint-disable-next-line no-debugger\r\n\t\t\t\tdebugger;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n}","export default function extend(scheduler) {\r\n\r\nif (window.jQuery){\r\n\r\n(function( $ ){\r\n\tvar counter = 0;\r\n\tvar methods = [];\r\n\t$.fn.dhx_scheduler = function(config){\r\n\t\tif (typeof(config) === 'string') {\r\n\t\t\tif (methods[config] ) {\r\n\t\t\t\treturn methods[config].apply(this, []);\r\n\t\t\t}else {\r\n\t\t\t\t$.error('Method ' + config + ' does not exist on jQuery.dhx_scheduler');\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tvar views = [];\r\n\t\t\tthis.each(function() {\r\n\t\t\t\tif (this && this.getAttribute){\r\n\t\t\t\t\tif (!this.getAttribute(\"dhxscheduler\")){\r\n\t\t\t\t\t\tvar name = \"scheduler\";\r\n\t\t\t\t\t\tif (counter){\r\n\t\t\t\t\t\t\tname = \"scheduler\" + (counter+1);\r\n\t\t\t\t\t\t\twindow[name] = Scheduler.getSchedulerInstance();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tvar comp = window[name];\r\n\r\n\t\t\t\t\t\tthis.setAttribute(\"dhxscheduler\", name);\r\n\t\t\t\t\t\tfor (var key in config)\r\n\t\t\t\t\t\t\tif (key!=\"data\")\r\n\t\t\t\t\t\t\t\tcomp.config[key] = config[key];\r\n\r\n\t\t\t\t\t\tif (!this.getElementsByTagName(\"div\").length){\r\n\t\t\t\t\t\t\tthis.innerHTML = '
';\r\n\t\t\t\t\t\t\tthis.className += \" dhx_cal_container\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcomp.init(this, comp.config.date, comp.config.mode);\r\n\t\t\t\t\t\tif (config.data)\r\n\t\t\t\t\t\t\tcomp.parse(config.data);\r\n\r\n\t\t\t\t\t\tviews.push(comp);\r\n\t\t\t\t\t\tcounter++;\r\n\t\t\t\t\t} else\r\n\t\t\t\t\t\tviews.push(window[this.getAttribute(\"dhxscheduler\")]);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif (views.length === 1) return views[0];\r\n\t\t\treturn views;\r\n\t\t}\r\n\t};\r\n\r\n\r\n\r\n\r\n})(window.jQuery);\r\n\r\n}\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler.destructor = function(){\r\n\tscheduler.callEvent(\"onDestroy\", []);\r\n\tthis.clearAll();\r\n\r\n\tif(this.$container){\r\n\t\t// FIXME: clear container or remove container\r\n\t\tthis.$container.innerHTML = \"\";\r\n\t\t// scheduler.$domHelpers.remove(this.$container);\r\n\t}\r\n\r\n\tif(this._eventRemoveAll){\r\n\t\tthis._eventRemoveAll();\r\n\t}\r\n\r\n\tif(this.resetLightbox){\r\n\t\tthis.resetLightbox();\r\n\t}\r\n\r\n\tif(this._dp && this._dp.destructor){\r\n\t\tthis._dp.destructor();\r\n\t}\r\n\r\n\t// detachAllEvents should be called last, because in components may be attached events\r\n\tthis.detachAllEvents();\r\n\r\n\tfor(var i in this){\r\n\t\tif(i.indexOf(\"$\") === 0){\r\n\t\t\tdelete this[i];\r\n\t\t}\r\n\t}\r\n\tscheduler.$destroyed = true;\r\n};\r\n\r\n}","import serialize from \"../common/url_serialize.js\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler.Promise = window.Promise; \r\n\r\nfunction createConfig(method, args) {\r\n\tvar result = {\r\n\t\tmethod: method\r\n\t};\r\n\r\n\tif (args.length === 0) {\r\n\t\tthrow new Error(\"Arguments list of query is wrong.\");\r\n\t}\r\n\tif (args.length === 1) {\r\n\t\tif (typeof args[0] === \"string\") {\r\n\t\t\tresult.url = args[0];\r\n\t\t\tresult.async = true;\r\n\t\t} else {\r\n\t\t\tresult.url = args[0].url;\r\n\t\t\tresult.async = (args[0].async || true);\r\n\t\t\tresult.callback = args[0].callback;\r\n\t\t\tresult.headers = args[0].headers;\r\n\t\t}\r\n\t\tif (method === \"POST\" || \"PUT\") {\r\n\t\t\tif (args[0].data) {\r\n\t\t\t\tif (typeof args[0].data !== \"string\") {\r\n\t\t\t\t\tresult.data = serialize(args[0].data);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresult.data = args[0].data;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tresult.data = \"\";\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n\r\n\tresult.url = args[0];\r\n\tswitch(method) {\r\n\t\tcase \"GET\":\r\n\t\tcase \"DELETE\":\r\n\t\t\tresult.callback = args[1];\r\n\t\t\tresult.headers = args[2];\r\n\t\tbreak;\r\n\t\tcase \"POST\":\r\n\t\tcase \"PUT\":\r\n\t\t\tif (args[1]) {\r\n\t\t\t\tif (typeof args[1] !== \"string\") {\r\n\t\t\t\t\tresult.data = serialize(args[1]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresult.data = args[1];\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tresult.data = \"\";\r\n\t\t\t}\r\n\t\t\tresult.callback = args[2];\r\n\t\t\tresult.headers = args[3];\r\n\t\tbreak;\r\n\t}\r\n\treturn result;\r\n}\r\nscheduler.ajax = {\r\n\t// if false - dhxr param will added to prevent caching on client side (default),\r\n\t// if true - do not add extra params\r\n\tcache: true,\r\n\r\n\t// default method for load/loadStruct, post/get allowed\r\n\tmethod: \"get\",\r\n\r\n\tserializeRequestParams: serialize,\r\n\tparse: function(data) {\r\n\t\tif (typeof data !== \"string\") return data;\r\n\r\n\t\tvar obj;\r\n\t\tdata = data.replace(/^[\\s]+/,\"\");\r\n\t\tif (typeof DOMParser !== \"undefined\" && !scheduler.$env.isIE) { // ff,ie9\r\n\t\t\tobj = (new DOMParser()).parseFromString(data, \"text/xml\");\r\n\t\t} else if (typeof window.ActiveXObject !== \"undefined\") {\r\n\t\t\tobj = new window.ActiveXObject(\"Microsoft.XMLDOM\");\r\n\t\t\tobj.async = \"false\";\r\n\t\t\tobj.loadXML(data);\r\n\t\t}\r\n\t\treturn obj;\r\n\t},\r\n\txmltop: function(tagname, xhr, obj) {\r\n\t\tif (typeof xhr.status == \"undefined\" || xhr.status < 400) {\r\n\t\t\tvar xml = (!xhr.responseXML) ? this.parse(xhr.responseText || xhr) : (xhr.responseXML || xhr);\r\n\t\t\tif (xml && xml.documentElement !== null && !xml.getElementsByTagName(\"parsererror\").length) {\r\n\t\t\t\treturn xml.getElementsByTagName(tagname)[0];\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (obj !== -1) scheduler.callEvent(\"onLoadXMLError\",[\"Incorrect XML\", arguments[1], obj]);\r\n\t\treturn document.createElement(\"DIV\");\r\n\t},\r\n\txpath: function(xpathExp, docObj) {\r\n\t\tif (!docObj.nodeName) docObj = docObj.responseXML || docObj;\r\n\t\tif (scheduler.$env.isIE) {\r\n\t\t\treturn docObj.selectNodes(xpathExp)||[];\r\n\t\t} else {\r\n\t\t\tvar rows = [];\r\n\t\t\tvar first;\r\n\t\t\tvar col = (docObj.ownerDocument||docObj).evaluate(xpathExp, docObj, null, XPathResult.ANY_TYPE, null);\r\n\r\n\t\t\twhile (true){\r\n\t\t\t\tfirst = col.iterateNext();\r\n\t\t\t\tif(first){\r\n\t\t\t\t\trows.push(first);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn rows;\r\n\t\t}\r\n\t},\r\n\tquery: function(config) {\r\n\t\treturn this._call(\r\n\t\t\t(config.method || \"GET\"),\r\n\t\t\tconfig.url,\r\n\t\t\tconfig.data || \"\",\r\n\t\t\t(config.async || true),\r\n\t\t\tconfig.callback,\r\n\t\t\tconfig.headers\r\n\t\t);\r\n\t},\r\n\tget: function(url, onLoad, headers) {\r\n\t\tvar config = createConfig(\"GET\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tgetSync: function(url, headers) {\r\n\t\tvar config = createConfig(\"GET\", arguments);\r\n\t\tconfig.async = false;\r\n\t\treturn this.query(config);\r\n\t},\r\n\tput: function(url, postData, onLoad, headers) {\r\n\t\tvar config = createConfig(\"PUT\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tdel: function(url, onLoad, headers) {\r\n\t\t/**\r\n\t\t * https://tools.ietf.org/html/rfc7231#section-4.3.5\r\n\t\t * A payload within a DELETE request message has no defined semantics;\r\n\t\t * sending a payload body on a DELETE request might cause some existing\r\n\t\t * implementations to reject the request.\r\n\t\t */\r\n\t\tvar config = createConfig(\"DELETE\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tpost: function(url, postData, onLoad, headers) {\r\n\t\tif (arguments.length == 1) {\r\n\t\t\tpostData = \"\";\r\n\t\t} else if (arguments.length == 2 && typeof(postData) == \"function\") {\r\n\t\t\tonLoad = postData;\r\n\t\t\tpostData = \"\";\r\n\t\t}\r\n\t\tvar config = createConfig(\"POST\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tpostSync: function(url, postData, headers) {\r\n\t\tpostData = (postData === null ? \"\" : String(postData));\r\n\r\n\t\tvar config = createConfig(\"POST\", arguments);\r\n\t\tconfig.async = false;\r\n\t\treturn this.query(config);\r\n\t},\r\n\t_call: function(method, url, postData, async, onLoad, headers) {\r\n\t\treturn new scheduler.Promise((function(resolve, reject) {\r\n\t\t\tvar t = (typeof XMLHttpRequest !== undefined && !scheduler.$env.isIE ? new XMLHttpRequest() : new window.ActiveXObject(\"Microsoft.XMLHTTP\"));\r\n\t\t\tvar isQt = (navigator.userAgent.match(/AppleWebKit/) !== null && navigator.userAgent.match(/Qt/) !== null && navigator.userAgent.match(/Safari/) !== null);\r\n\r\n\t\t\tif (!!async) {\r\n\t\t\t\tt.addEventListener(\"readystatechange\", function() {\r\n\t\t\t\t\tif ((t.readyState == 4) || (isQt && t.readyState == 3)) { // what for long response and status 404?\r\n\t\t\t\t\t\tif (t.status != 200 || t.responseText === \"\")\r\n\t\t\t\t\t\t\tif (!scheduler.callEvent(\"onAjaxError\", [t])) return;\r\n\r\n\t\t\t\t\t\tsetTimeout(function() {\r\n\t\t\t\t\t\t\tif (typeof(onLoad) == \"function\") {\r\n\t\t\t\t\t\t\t\tonLoad.apply(window, [{xmlDoc:t, filePath:url}]); // dhtmlx-compat, response.xmlDoc.responseXML/responseText\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tresolve(t);\r\n\t\t\t\t\t\t\tif (typeof(onLoad) == \"function\") {\r\n\t\t\t\t\t\t\t\tonLoad = null;\r\n\t\t\t\t\t\t\t\tt = null;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}, 0);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif (method == \"GET\" && !this.cache) {\r\n\t\t\t\turl += (url.indexOf(\"?\")>=0?\"&\":\"?\")+\"dhxr\"+new Date().getTime()+\"=1\";\r\n\t\t\t}\r\n\r\n\t\t\tt.open(method, url, async);\r\n\r\n\t\t\tif (headers){\r\n\t\t\t\tfor (var key in headers)\r\n\t\t\t\t\tt.setRequestHeader(key, headers[key]);\r\n\t\t\t} else if (method.toUpperCase() == \"POST\" || method == \"PUT\" || method == \"DELETE\") {\r\n\t\t\t\tt.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\r\n\t\t\t} else if (method == \"GET\") {\r\n\t\t\t\tpostData = null;\r\n\t\t\t}\r\n\r\n\t\t\tt.setRequestHeader(\"X-Requested-With\", \"XMLHttpRequest\");\r\n\r\n\t\t\tt.send(postData);\r\n\r\n\t\t\tif (!async) return {xmlDoc:t, filePath:url}; // dhtmlx-compat, response.xmlDoc.responseXML/responseText\r\n\t\t}.bind(this)));\r\n\t},\r\n\turlSeparator: function(str){\r\n\t\tif (str.indexOf(\"?\") != -1)\r\n\t\t\treturn \"&\";\r\n\t\telse\r\n\t\t\treturn \"?\";\r\n\t}\r\n};\r\n\r\nscheduler.$ajax = scheduler.ajax; // for old\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n/*\r\n%e\tDay of the month without leading zeros (01..31)\r\n%d\tDay of the month, 2 digits with leading zeros (01..31)\r\n%j\tDay of the year, 3 digits with leading zeros (001..366)\r\n%a\tA textual representation of a day, two letters\r\n%W\tA full textual representation of the day of the week\r\n\r\n%c\tNumeric representation of a month, without leading zeros (0..12)\r\n%m\tNumeric representation of a month, with leading zeros (00..12)\r\n%b\tA short textual representation of a month, three letters (Jan..Dec)\r\n%M\tA full textual representation of a month, such as January or March (January..December)\r\n\r\n%y\tA two digit representation of a year (93..03)\r\n%Y\tA full numeric representation of a year, 4 digits (1993..03)\r\n*/\r\n\r\nscheduler.config={\r\n\tdefault_date: \"%j %M %Y\",\r\n\tmonth_date: \"%F %Y\",\r\n\tload_date: \"%Y-%m-%d\",\r\n\tweek_date: \"%l\",\r\n\tday_date: \"%D %j\",\r\n\thour_date: \"%H:%i\",\r\n\tmonth_day: \"%d\",\r\n\t//xml_date: \"%m/%d/%Y %H:%i\",\r\n\tdate_format: \"%Y-%m-%d %H:%i\",\r\n\tapi_date: \"%d-%m-%Y %H:%i\",\r\n\tparse_exact_format: false,\r\n\tpreserve_length:true,\r\n\ttime_step: 5,\r\n\tdisplayed_event_color: \"#ff4a4a\",\r\n\tdisplayed_event_text_color: \"#ffef80\",\r\n\twide_form: 0,\r\n\tday_column_padding: 8,\r\n\tuse_select_menu_space: true,\r\n\tfix_tab_position: true,\r\n\tstart_on_monday: true,\r\n\tfirst_hour: 0,\r\n\tlast_hour: 24,\r\n\treadonly: false,\r\n\tdrag_resize: true,\r\n\tdrag_move: true,\r\n\tdrag_create: true,\r\n\tdrag_event_body: true,\r\n\tdblclick_create: true,\r\n\tdetails_on_dblclick: true,\r\n\tedit_on_create: true,\r\n\tdetails_on_create: true,\r\n\theader: null,\r\n\thour_size_px: 44,\r\n\tresize_month_events:false,\r\n\tresize_month_timed:false,\r\n\t\r\n\tresponsive_lightbox: false,\r\n\tseparate_short_events: true,\r\n\trtl:false,\r\n\r\n\tcascade_event_display: false,\r\n\tcascade_event_count: 4,\r\n\tcascade_event_margin: 30,\r\n\r\n\tmulti_day:true,\r\n\tmulti_day_height_limit: 200,\r\n\r\n\tdrag_lightbox: true,\r\n\tpreserve_scroll: true,\r\n\tselect: true,\r\n\r\n\tserver_utc: false,\r\n\ttouch:true,\r\n\ttouch_tip:true,\r\n\ttouch_drag:500,\r\n\ttouch_swipe_dates: false,\r\n\tquick_info_detached:true,\r\n\r\n\tpositive_closing: false,\r\n\t//header_datepicker: true,\r\n\tdrag_highlight: true,\r\n\tlimit_drag_out: false,\r\n\ticons_edit: [\"icon_save\", \"icon_cancel\"],\r\n\ticons_select: [\"icon_details\", \"icon_edit\", \"icon_delete\"],\r\n\tbuttons_left: [\"dhx_save_btn\", \"dhx_cancel_btn\"],\r\n\tbuttons_right: [\"dhx_delete_btn\"],\r\n\tlightbox: {\r\n\t\tsections: [\r\n\t\t\t{name: \"description\", map_to: \"text\", type: \"textarea\", focus: true},\r\n\t\t\t{name: \"time\", height: 72, type: \"time\", map_to: \"auto\"}\r\n\t\t]\r\n\t},\r\n\thighlight_displayed_event: true,\r\n\tleft_border: false,\r\n\r\n\tajax_error: \"alert\",//\"ignore\"|\"console\"\r\n\tdelay_render: 0,\r\n\ttimeline_swap_resize: true,\r\n\twai_aria_attributes: true,\r\n\twai_aria_application_role: true,\r\n\r\n\tcsp: \"auto\",\r\n\tevent_attribute: \"data-event-id\",\r\n\tshow_errors: true\r\n};\r\n\r\nscheduler.config.buttons_left.$initial = scheduler.config.buttons_left.join();\r\nscheduler.config.buttons_right.$initial = scheduler.config.buttons_right.join();\r\n\r\nscheduler._helpers = {\r\n\tparseDate: function parseDate(date) {\r\n\t\tvar parse = scheduler.templates.xml_date || scheduler.templates.parse_date;\r\n\t\treturn parse(date);\r\n\t},\r\n\tformatDate: function formatDate(date) {\r\n\t\tvar format = scheduler.templates.xml_format || scheduler.templates.format_date;\r\n\t\treturn format(date);\r\n\t}\r\n};\r\n\r\nscheduler.templates={};\r\nscheduler.init_templates=function(){\r\n\r\n\r\n\r\n\tvar d=scheduler.date.date_to_str;\r\n\tvar c=scheduler.config;\r\n\tvar f = function(a,b){\r\n\t\tfor (var c in b)\r\n\t\t\tif (!a[c]) a[c]=b[c];\r\n\t};\r\n\tf(scheduler.templates,{\r\n\t\tday_date:d(c.default_date),\r\n\t\tmonth_date:d(c.month_date),\r\n\t\tweek_date:function(d1,d2){\r\n\t\t\tif(c.rtl) {\r\n\t\t\t\treturn scheduler.templates.day_date(scheduler.date.add(d2,-1,\"day\"))+\" – \"+scheduler.templates.day_date(d1);\r\n\t\t\t} \r\n\t\t\treturn scheduler.templates.day_date(d1)+\" – \"+scheduler.templates.day_date(scheduler.date.add(d2,-1,\"day\"));\r\n\t\t},\r\n\t\tday_scale_date:d(c.default_date),\r\n\t\ttime_slot_text: function(date){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\ttime_slot_class: function(date){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\r\n\t\tmonth_scale_date:d(c.week_date),\r\n\t\tweek_scale_date:d(c.day_date),\r\n\t\thour_scale:d(c.hour_date),\r\n\t\ttime_picker:d(c.hour_date),\r\n\t\tevent_date:d(c.hour_date),\r\n\t\tmonth_day:d(c.month_day),\r\n\r\n\t\tload_format: d(c.load_date),\r\n\t//\txml_date:scheduler.date.str_to_date(c.xml_date,c.server_utc),\r\n\t//\txml_format:d(c.date_format,c.server_utc),\r\n\t\tformat_date: d(c.date_format, c.server_utc),\r\n\t\tparse_date:scheduler.date.str_to_date(c.date_format,c.server_utc),\r\n\t\tapi_date:scheduler.date.str_to_date(c.api_date, false, false),\r\n\t\tevent_header:function(start,end,ev){\r\n\r\n\t\t\tif(ev._mode === \"small\" || ev._mode === \"smallest\"){\r\n\t\t\t\treturn scheduler.templates.event_date(start);\r\n\t\t\t}else{\r\n\t\t\t\treturn scheduler.templates.event_date(start)+\" - \"+scheduler.templates.event_date(end);\r\n\t\t\t}\r\n\t\t},\r\n\t\tevent_text:function(start,end,ev){\r\n\t\t\treturn ev.text;\r\n\t\t},\r\n\t\tevent_class:function(start,end,ev){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tmonth_date_class:function(d){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tweek_date_class:function(d){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tevent_bar_date:function(start,end,ev) {\r\n\t\t\treturn scheduler.templates.event_date(start);\r\n\t\t},\r\n\t\tevent_bar_text:function(start,end,ev){\r\n\t\t\treturn ev.text;\r\n\t\t},\r\n\t\tmonth_events_link : function(date, count){\r\n\t\t\treturn \"View more(\"+count+\" events)\";\r\n\t\t},\r\n\t\tdrag_marker_class : function(start, end, event){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tdrag_marker_content : function(start, end, event){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\t/* Could be redifined */\r\n\t\ttooltip_date_format: scheduler.date.date_to_str(\"%Y-%m-%d %H:%i\"),\r\n\t\ttooltip_text: function(start, end, event) {\r\n\t\t\treturn \"Event: \" + event.text + \"
Start date: \" + scheduler.templates.tooltip_date_format(start) + \"
End date: \" + scheduler.templates.tooltip_date_format(end);\r\n\t\t},\r\n\r\n\t\tcalendar_month: d(\"%F %Y\"),\r\n\t\tcalendar_scale_date: d(\"%D\"),\r\n\t\tcalendar_date: d(\"%d\"),\r\n\t\tcalendar_time: d(\"%d-%m-%Y\")\r\n\r\n\t});\r\n\tthis.callEvent(\"onTemplatesReady\",[]);\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler._events = {};\r\nscheduler.clearAll = function() {\r\n\tthis._events = {};\r\n\tthis._loaded = {};\r\n\r\n\tthis._edit_id = null;\r\n\tthis._select_id = null;\r\n\tthis._drag_id = null;\r\n\tthis._drag_mode = null;\r\n\tthis._drag_pos = null;\r\n\tthis._new_event = null;\r\n\r\n\tthis.clear_view();\r\n\tthis.callEvent(\"onClearAll\", []);\r\n};\r\nscheduler.addEvent = function(start_date, end_date, text, id, extra_data) {\r\n\tif (!arguments.length)\r\n\t\treturn this.addEventNow();\r\n\tvar ev = start_date;\r\n\tif (arguments.length != 1) {\r\n\t\tev = extra_data || {};\r\n\t\tev.start_date = start_date;\r\n\t\tev.end_date = end_date;\r\n\t\tev.text = text;\r\n\t\tev.id = id;\r\n\t}\r\n\tev.id = ev.id || scheduler.uid();\r\n\tev.text = ev.text || \"\";\r\n\r\n\tif (typeof ev.start_date == \"string\") ev.start_date = this.templates.api_date(ev.start_date);\r\n\tif (typeof ev.end_date == \"string\") ev.end_date = this.templates.api_date(ev.end_date);\r\n\tvar d = (this.config.event_duration || this.config.time_step) * 60000;\r\n\tif (ev.start_date.valueOf() == ev.end_date.valueOf())\r\n\t\tev.end_date.setTime(ev.end_date.valueOf() + d);\r\n\r\n\tev.start_date.setMilliseconds(0);\r\n\tev.end_date.setMilliseconds(0);\r\n\r\n\tev._timed = this.isOneDayEvent(ev);\r\n\r\n\tvar is_new = !this._events[ev.id];\r\n\tthis._events[ev.id] = ev;\r\n\tthis.event_updated(ev);\r\n\tif (!this._loading)\r\n\t\tthis.callEvent(is_new ? \"onEventAdded\" : \"onEventChanged\", [ev.id, ev]);\r\n\treturn ev.id;\r\n};\r\nscheduler.deleteEvent = function(id, silent) {\r\n\tvar ev = this._events[id];\r\n\tif (!silent && (!this.callEvent(\"onBeforeEventDelete\", [id, ev]) || !this.callEvent(\"onConfirmedBeforeEventDelete\", [id, ev])))\r\n\t\treturn;\r\n\tif (ev) {\r\n\t\tif(scheduler.getState().select_id == id){\r\n\t\t\tscheduler.unselect();\r\n\t\t}\r\n\t\tdelete this._events[id];\r\n\t\tthis.event_updated(ev);\r\n\r\n\t\tif(this._drag_id == ev.id){\r\n\t\t\tthis._drag_id = null;\r\n\t\t\tthis._drag_mode=null;\r\n\t\t\tthis._drag_pos=null;\r\n\t\t}\r\n\t}\r\n\r\n\tthis.callEvent(\"onEventDeleted\", [id, ev]);\r\n};\r\nscheduler.getEvent = function(id) {\r\n\treturn this._events[id];\r\n};\r\nscheduler.setEvent = function(id, hash) {\r\n\tif(!hash.id)\r\n\t\thash.id = id;\r\n\r\n\tthis._events[id] = hash;\r\n};\r\nscheduler.for_rendered = function(id, method) {\r\n\tfor (var i = this._rendered.length - 1; i >= 0; i--)\r\n\t\tif (this._rendered[i].getAttribute(this.config.event_attribute) == id)\r\n\t\t\tmethod(this._rendered[i], i);\r\n};\r\nscheduler.changeEventId = function(id, new_id) {\r\n\tif (id == new_id) return;\r\n\tvar ev = this._events[id];\r\n\tif (ev) {\r\n\t\tev.id = new_id;\r\n\t\tthis._events[new_id] = ev;\r\n\t\tdelete this._events[id];\r\n\t}\r\n\tthis.for_rendered(id, function(r) {\r\n\t\tr.setAttribute(\"event_id\", new_id); // for backward compatibility\r\n\t\tr.setAttribute(scheduler.config.event_attribute, new_id);\r\n\t});\r\n\tif (this._select_id == id) this._select_id = new_id;\r\n\tif (this._edit_id == id) this._edit_id = new_id;\r\n\t//if (this._drag_id==id) this._drag_id=new_id;\r\n\tthis.callEvent(\"onEventIdChange\", [id, new_id]);\r\n};\r\n\r\n(function() {\r\n\tvar attrs = [\"text\", \"Text\", \"start_date\", \"StartDate\", \"end_date\", \"EndDate\"];\r\n\tvar create_getter = function(name) {\r\n\t\treturn function(id) { return (scheduler.getEvent(id))[name]; };\r\n\t};\r\n\tvar create_setter = function(name) {\r\n\t\treturn function(id, value) {\r\n\t\t\tvar ev = scheduler.getEvent(id);\r\n\t\t\tev[name] = value;\r\n\t\t\tev._changed = true;\r\n\t\t\tev._timed = this.isOneDayEvent(ev);\r\n\t\t\tscheduler.event_updated(ev, true);\r\n\t\t};\r\n\t};\r\n\tfor (var i = 0; i < attrs.length; i += 2) {\r\n\t\tscheduler[\"getEvent\" + attrs[i + 1]] = create_getter(attrs[i]);\r\n\t\tscheduler[\"setEvent\" + attrs[i + 1]] = create_setter(attrs[i]);\r\n\t}\r\n})();\r\n\r\nscheduler.event_updated = function(ev, force) {\r\n\tif (this.is_visible_events(ev))\r\n\t\tthis.render_view_data();\r\n\telse\r\n\t\tthis.clear_event(ev.id);\r\n};\r\nscheduler.is_visible_events = function(ev) {\r\n\tif(!this._min_date || !this._max_date){\r\n\t\treturn false;\r\n\t}\r\n\r\n\t//if in displayed dates\r\n\tvar in_visible_range = (ev.start_date.valueOf() < this._max_date.valueOf() && this._min_date.valueOf() < ev.end_date.valueOf());\r\n\r\n\tif(in_visible_range){\r\n\r\n\t\t//end dates are not between last/first hours\r\n\t\tvar evFirstHour = ev.start_date.getHours(),\r\n\t\t\tevLastHour = ev.end_date.getHours() + (ev.end_date.getMinutes()/60),\r\n\t\t\tlastHour = this.config.last_hour,\r\n\t\t\tfirstHour = this.config.first_hour;\r\n\r\n\t\tvar end_dates_visible = (this._table_view || !((evLastHour > lastHour || evLastHour <= firstHour) && (evFirstHour >= lastHour || evFirstHour < firstHour)));\r\n\r\n\t\tif(end_dates_visible){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\r\n\t\t\t//event is bigger than area hidden between last/first hours\r\n\t\t\tvar event_duration = (ev.end_date.valueOf() - ev.start_date.valueOf()) / (1000*60*60),//hours\r\n\t\t\t\thidden_duration = 24 - (this.config.last_hour - this.config.first_hour);\r\n\r\n\t\t\treturn !!((event_duration > hidden_duration) || (evFirstHour < lastHour && evLastHour > firstHour));\r\n\r\n\t\t}\r\n\t}else{\r\n\t\treturn false;\r\n\t}\r\n};\r\nscheduler.isOneDayEvent = function(ev) {\r\n\t// decrease by one ms so events that ends on midnight on the next day were still considered one day events\r\n\t// e.g. (09-02-2018 19:00 - 10-02-2018 00:00)\r\n\t// events >= 24h long are considered multiday\r\n\tvar checkEndDate = new Date(ev.end_date.valueOf() - 1);\r\n\treturn (\r\n\t\tev.start_date.getFullYear() === checkEndDate.getFullYear() &&\r\n\t\tev.start_date.getMonth() === checkEndDate.getMonth() &&\r\n\t\tev.start_date.getDate() === checkEndDate.getDate()\r\n\t) && ((ev.end_date.valueOf() - ev.start_date.valueOf()) < (1000 * 60 * 60 * 24));\r\n};\r\n\r\nscheduler.get_visible_events = function(only_timed) {\r\n\t//not the best strategy for sure\r\n\tvar stack = [];\r\n\r\n\tfor (var id in this._events)\r\n\t\tif (this.is_visible_events(this._events[id]))\r\n\t\t\tif (!only_timed || this._events[id]._timed)\r\n\t\t\t\tif (this.filter_event(id, this._events[id]))\r\n\t\t\t\t\tstack.push(this._events[id]);\r\n\r\n\treturn stack;\r\n};\r\nscheduler.filter_event = function(id, ev) {\r\n\tvar filter = this[\"filter_\" + this._mode];\r\n\treturn (filter) ? filter(id, ev) : true;\r\n};\r\nscheduler._is_main_area_event = function(ev){\r\n\treturn !!ev._timed;\r\n};\r\nscheduler.render_view_data = function(evs, hold) {\r\n\tvar full = false;\r\n\tif (!evs) {\r\n\t\tfull = true;\r\n\t\tif (this._not_render) {\r\n\t\t\tthis._render_wait = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._render_wait = false;\r\n\r\n\t\tthis.clear_view();\r\n\t\tevs = this.get_visible_events(!(this._table_view || this.config.multi_day));\r\n\t}\r\n\tfor(var i= 0, len = evs.length; i < len; i++){\r\n\t\tthis._recalculate_timed(evs[i]);\r\n\t}\r\n\r\n\tif (this.config.multi_day && !this._table_view) {\r\n\r\n\t\tvar tvs = [];\r\n\t\tvar tvd = [];\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tif (this._is_main_area_event(evs[i]))\r\n\t\t\t\ttvs.push(evs[i]);\r\n\t\t\telse\r\n\t\t\t\ttvd.push(evs[i]);\r\n\t\t}\r\n\r\n\t\tif(!this._els['dhx_multi_day']){\r\n\t\t\tvar message = scheduler._commonErrorMessages.unknownView(this._mode);\r\n\t\t\tthrow new Error(message);\r\n\t\t}\r\n\r\n\t\t// multiday events\r\n\t\tthis._rendered_location = this._els['dhx_multi_day'][0];\r\n\t\tthis._table_view = true;\r\n\t\tthis.render_data(tvd, hold);\r\n\t\tthis._table_view = false;\r\n\r\n\t\t// normal events\r\n\t\tthis._rendered_location = this._els['dhx_cal_data'][0];\r\n\t\tthis._table_view = false;\r\n\t\tthis.render_data(tvs, hold);\r\n\r\n\t} else {\r\n\t\tvar buffer = document.createDocumentFragment();\r\n\t\tvar renderedLocation = this._els['dhx_cal_data'][0];\r\n\t\tthis._rendered_location = buffer;\r\n\t\tthis.render_data(evs, hold);\r\n\t\trenderedLocation.appendChild(buffer);\r\n\t\tthis._rendered_location = renderedLocation;\r\n\r\n\t}\r\n\r\n\tif(full){\r\n\t\tthis.callEvent(\"onDataRender\", []);\r\n\t}\r\n};\r\n\r\n\r\nscheduler._view_month_day = function(e){\r\n\tvar date = scheduler.getActionData(e).date;\r\n\tif(!scheduler.callEvent(\"onViewMoreClick\", [date]))\r\n\t\treturn;\r\n\tscheduler.setCurrentView(date, \"day\");\r\n};\r\n\r\nscheduler._render_month_link = function(ev){\r\n\tvar parent = this._rendered_location;\r\n\tvar toRender = this._lame_clone(ev);\r\n\r\n\t//render links in each cell of multiday events\r\n\tfor(var d = ev._sday; d < ev._eday; d++){\r\n\r\n\t\ttoRender._sday = d;\r\n\t\ttoRender._eday = d+1;\r\n\r\n\t\tvar date = scheduler.date;\r\n\t\tvar curr = scheduler._min_date;\r\n\t\tcurr = date.add(curr, toRender._sweek, \"week\");\r\n\t\tcurr = date.add(curr, toRender._sday, \"day\");\r\n\t\tvar count = scheduler.getEvents(curr, date.add(curr, 1, \"day\")).length;\r\n\r\n\t\tvar pos = this._get_event_bar_pos(toRender);\r\n\t\tvar widt = (pos.x2 - pos.x);\r\n\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tscheduler.event(el, \"click\", function(e){scheduler._view_month_day(e);});\r\n\t\tel.className = \"dhx_month_link\";\r\n\t\tel.style.top = pos.y + \"px\";\r\n\t\tel.style.left = pos.x + \"px\";\r\n\t\tel.style.width = widt + \"px\";\r\n\t\tel.innerHTML = scheduler.templates.month_events_link(curr, count);\r\n\t\tthis._rendered.push(el);\r\n\r\n\t\tparent.appendChild(el);\r\n\t}\r\n};\r\n\r\nscheduler._recalculate_timed = function(id){\r\n\tif(!id) return;\r\n\tvar ev;\r\n\tif(typeof(id) != \"object\")\r\n\t\tev = this._events[id];\r\n\telse\r\n\t\tev = id;\r\n\tif(!ev) return;\r\n\tev._timed = scheduler.isOneDayEvent(ev);\r\n};\r\nscheduler.attachEvent(\"onEventChanged\", scheduler._recalculate_timed);\r\nscheduler.attachEvent(\"onEventAdded\", scheduler._recalculate_timed);\r\n\r\nscheduler.render_data = function(evs, hold) {\r\n\tevs = this._pre_render_events(evs, hold);\r\n\tvar containers = {};\r\n\tfor (var i = 0; i < evs.length; i++)\r\n\t\tif (this._table_view){\r\n\t\t\tif(scheduler._mode != 'month'){\r\n\t\t\t\tthis.render_event_bar(evs[i]);//may be multiday section on other views\r\n\t\t\t}else{\r\n\r\n\t\t\t\tvar max_evs = scheduler.config.max_month_events;\r\n\t\t\t\tif(max_evs !== max_evs*1 || evs[i]._sorder < max_evs){\r\n\t\t\t\t\t//of max number events per month cell is set and event can be rendered\r\n\t\t\t\t\tthis.render_event_bar(evs[i]);\r\n\t\t\t\t}else if(max_evs !== undefined && evs[i]._sorder == max_evs){\r\n\t\t\t\t\t//render 'view more' links\r\n\t\t\t\t\tscheduler._render_month_link(evs[i]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\t//do not render events with ordinal number > maximum events per cell\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t}else{\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tvar parent = scheduler.locate_holder(ev._sday);\r\n\t\t\tif (!parent) continue; //attempt to render non-visible event\r\n\r\n\t\t\tif(!containers[ev._sday]){\r\n\t\t\t\tcontainers[ev._sday] = {\r\n\t\t\t\t\treal: parent,\r\n\t\t\t\t\tbuffer: document.createDocumentFragment(),\r\n\t\t\t\t\twidth: parent.clientWidth\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\tvar container = containers[ev._sday];\r\n\t\t\tthis.render_event(ev, container.buffer, container.width);\r\n\t\t}\r\n\r\n\t\tfor(var i in containers){\r\n\t\t\tvar container = containers[i];\r\n\t\t\tif(container.real && container.buffer){\r\n\t\t\t\tcontainer.real.appendChild(container.buffer);\r\n\t\t\t}\r\n\t\t}\r\n};\r\n\r\nscheduler._get_first_visible_cell = function(cells) {\r\n\tfor (var i = 0; i < cells.length; i++) {\r\n\t\tif ((cells[i].className || \"\").indexOf(\"dhx_scale_ignore\") == -1) {\r\n\t\t\treturn cells[i];\r\n\t\t}\r\n\t}\r\n\t// if no visible cell found, return cells[0] to be more tolerant, since it's the original logic\r\n\treturn cells[0];\r\n};\r\n\r\nscheduler._pre_render_events = function(evs, hold) {\r\n\tvar hb = this.xy.bar_height;\r\n\tvar h_old = this._colsS.heights;\r\n\tvar h = this._colsS.heights = [0, 0, 0, 0, 0, 0, 0];\r\n\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\r\n\tif (!this._table_view) {\r\n\t\tevs = this._pre_render_events_line(evs, hold); //ignore long events for now\r\n\t}\r\n\telse {\r\n\t\tevs = this._pre_render_events_table(evs, hold);\r\n\t}\r\n\tif (this._table_view) {\r\n\t\tif (hold)\r\n\t\t\tthis._colsS.heights = h_old;\r\n\t\telse {\r\n\t\t\tvar monthRows = data.querySelectorAll(\".dhx_cal_month_row\");\r\n\t\t\tif (monthRows.length) {\r\n\t\t\t\tfor (var i = 0; i < monthRows.length; i++) {\r\n\t\t\t\t\th[i]++;\r\n\t\t\t\t\tvar cells = monthRows[i].querySelectorAll(\".dhx_cal_month_cell\");\r\n\t\t\t\t\tvar cellHeight = this._colsS.height - this.xy.month_head_height;\r\n\t\t\t\t\tif ((h[i]) * hb > cellHeight) { // 22 - height of cell's header\r\n\t\t\t\t\t\t//we have overflow, update heights\r\n\r\n\t\t\t\t\t\tvar cHeight = cellHeight;\r\n\t\t\t\t\t\tif(this.config.max_month_events*1 !== this.config.max_month_events || h[i] <= this.config.max_month_events){\r\n\t\t\t\t\t\t\tcHeight = h[i] * hb;\r\n\t\t\t\t\t\t}else if( (this.config.max_month_events + 1) * hb > cellHeight){\r\n\t\t\t\t\t\t\tcHeight = (this.config.max_month_events + 1) * hb;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tmonthRows[i].style.height = (cHeight + this.xy.month_head_height) + \"px\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\th[i] = (h[i - 1] || 0) + scheduler._get_first_visible_cell(cells).offsetHeight;\r\n\t\t\t\t}\r\n\t\t\t\th.unshift(0);\r\n\t\t\t\tconst dataArea = this.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tif (dataArea.offsetHeight < dataArea.scrollHeight && !scheduler._colsS.scroll_fix && scheduler.xy.scroll_width) {\r\n\r\n\t\t\t\t\tvar scale_settings = scheduler._colsS,\r\n\t\t\t\t\t\tsum_width = scale_settings[scale_settings.col_length],\r\n\t\t\t\t\t\trow_heights = scale_settings.heights.slice();\r\n\r\n\t\t\t\t\tsum_width -= (scheduler.xy.scroll_width || 0);\r\n\t\t\t\t\tthis._calc_scale_sizes(sum_width, this._min_date, this._max_date);\r\n\t\t\t\t\tscheduler._colsS.heights = row_heights;\r\n\r\n\t\t\t\t\tthis.set_xy(this._els[\"dhx_cal_header\"][0], sum_width/*, this.xy.scale_height*/);\r\n\t\t\t\t\tscheduler._render_scales(this._els[\"dhx_cal_header\"][0]);\r\n\t\t\t\t\tscheduler._render_month_scale(this._els[\"dhx_cal_data\"][0], this._get_timeunit_start(), this._min_date);\r\n\r\n\t\t\t\t\tscale_settings.scroll_fix = true;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (!evs.length && this._els[\"dhx_multi_day\"][0].style.visibility == \"visible\")\r\n\t\t\t\t\th[0] = -1;\r\n\t\t\t\tif (evs.length || h[0] == -1) {\r\n\t\t\t\t\t//shift days to have space for multiday events\r\n\t\t\t\t\t//var childs = evl.parentNode.childNodes;\r\n\r\n\t\t\t\t\t// +1 so multiday events would have 2px from top and 2px from bottom by default\r\n\t\t\t\t\tvar full_multi_day_height = (h[0] + 1) * hb + 4;\r\n\r\n\t\t\t\t\tvar used_multi_day_height = full_multi_day_height;\r\n\t\t\t\t\tvar used_multi_day_height_css = full_multi_day_height + \"px\";\r\n\t\t\t\t\tif (this.config.multi_day_height_limit) {\r\n\t\t\t\t\t\tused_multi_day_height = Math.min(full_multi_day_height, this.config.multi_day_height_limit) ;\r\n\t\t\t\t\t\tused_multi_day_height_css = used_multi_day_height + \"px\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tvar multi_day_section = this._els[\"dhx_multi_day\"][0];\r\n\t\t\t\t\tmulti_day_section.style.height = used_multi_day_height_css;\r\n\t\t\t\t\tmulti_day_section.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\tmulti_day_section.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\r\n\t\t\t\t\t// icon\r\n\t\t\t\t\tvar multi_day_icon = this._els[\"dhx_multi_day\"][1];\r\n\t\t\t\t\tmulti_day_icon.style.height = used_multi_day_height_css;\r\n\t\t\t\t\tmulti_day_icon.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\tmulti_day_icon.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\t\t\t\t\tmulti_day_icon.className = h[0] ? \"dhx_multi_day_icon\" : \"dhx_multi_day_icon_small\";\r\n\t\t\t\t\tthis._dy_shift = (h[0] + 1) * hb;\r\n\t\t\t\t\tif(this.config.multi_day_height_limit){\r\n\t\t\t\t\t\tthis._dy_shift = Math.min(this.config.multi_day_height_limit, this._dy_shift);\r\n\t\t\t\t\t}\r\n\t\t\t\t\th[0] = 0;\r\n\r\n\t\t\t\t\tif (used_multi_day_height != full_multi_day_height) {\r\n\r\n\t\t\t\t\t\tmulti_day_section.style.overflowY = \"auto\";\r\n\t\t\t\t\t//\tmulti_day_section.style.width = (parseInt(this._els[\"dhx_cal_navline\"][0].style.width)) + \"px\";\r\n\r\n\t\t\t\t\t\tmulti_day_icon.style.position = \"fixed\";\r\n\t\t\t\t\t\tmulti_day_icon.style.top = \"\";\r\n\t\t\t\t\t\tmulti_day_icon.style.left = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn evs;\r\n};\r\nscheduler._get_event_sday = function(ev) {\r\n\t// get day in current view\r\n\t// use rounding for 23 or 25 hour days on DST\r\n\tvar datePart = this.date.day_start(new Date(ev.start_date));\r\n\treturn Math.round((datePart.valueOf() - this._min_date.valueOf()) / (24 * 60 * 60 * 1000));\r\n};\r\nscheduler._get_event_mapped_end_date = function(ev) {\r\n\tvar end_date = ev.end_date;\r\n\tif (this.config.separate_short_events) {\r\n\t\tvar ev_duration = (ev.end_date - ev.start_date) / 60000; // minutes\r\n\t\tif (ev_duration < this._min_mapped_duration) {\r\n\t\t\tend_date = this.date.add(end_date, this._min_mapped_duration - ev_duration, \"minute\");\r\n\t\t}\r\n\t}\r\n\treturn end_date;\r\n};\r\nscheduler._pre_render_events_line = function(evs, hold){\r\n\tevs.sort(function(a, b) {\r\n\t\tif (a.start_date.valueOf() == b.start_date.valueOf())\r\n\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\treturn a.start_date > b.start_date ? 1 : -1;\r\n\t});\r\n\tvar days = []; //events by weeks\r\n\tvar evs_originals = [];\r\n\r\n\tthis._min_mapped_duration = Math.floor(this.xy.min_event_height * 60 / this.config.hour_size_px); // values could change along the way\r\n\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tvar ev = evs[i];\r\n\r\n\t\t//check date overflow\r\n\t\tvar sd = ev.start_date;\r\n\t\tvar ed = ev.end_date;\r\n\t\t//check scale overflow\r\n\t\tvar sh = sd.getHours();\r\n\t\tvar eh = ed.getHours();\r\n\t\tev._sday = this._get_event_sday(ev); // sday based on event start_date\r\n\t\tif (this._ignores[ev._sday]){\r\n\t\t\t//ignore event\r\n\t\t\tevs.splice(i,1);\r\n\t\t\ti--;\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\tif (!days[ev._sday]) days[ev._sday] = [];\r\n\r\n\t\tif (!hold) {\r\n\t\t\tev._inner = false;\r\n\r\n\t\t\tvar stack = days[ev._sday];\r\n\r\n\t\t\twhile (stack.length) {\r\n\t\t\t\tvar t_ev = stack[stack.length - 1];\r\n\t\t\t\tvar t_end_date = this._get_event_mapped_end_date(t_ev);\r\n\t\t\t\tif (t_end_date.valueOf() <= ev.start_date.valueOf()) {\r\n\t\t\t\t\tstack.splice(stack.length - 1, 1);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar slot_index = stack.length;\r\n\t\t\tvar sorderSet = false;\r\n\t\t\tfor (var j = 0; j < stack.length; j++) {\r\n\t\t\t\tvar t_ev = stack[j];\r\n\t\t\t\tvar t_end_date = this._get_event_mapped_end_date(t_ev);\r\n\t\t\t\tif (t_end_date.valueOf() <= ev.start_date.valueOf()) {\r\n\t\t\t\t\tsorderSet = true;\r\n\t\t\t\t\tev._sorder = t_ev._sorder;\r\n\t\t\t\t\tslot_index = j;\r\n\t\t\t\t\tev._inner = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (stack.length)\r\n\t\t\t\tstack[stack.length - 1]._inner = true;\r\n\r\n\t\t\tif (!sorderSet) {\r\n\t\t\t\tif (stack.length) {\r\n\t\t\t\t\tif (stack.length <= stack[stack.length - 1]._sorder) {\r\n\t\t\t\t\t\tif (!stack[stack.length - 1]._sorder)\r\n\t\t\t\t\t\t\tev._sorder = 0;\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tfor (j = 0; j < stack.length; j++) {\r\n\t\t\t\t\t\t\t\tvar _is_sorder = false;\r\n\t\t\t\t\t\t\t\tfor (var k = 0; k < stack.length; k++) {\r\n\t\t\t\t\t\t\t\t\tif (stack[k]._sorder == j) {\r\n\t\t\t\t\t\t\t\t\t\t_is_sorder = true;\r\n\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (!_is_sorder) {\r\n\t\t\t\t\t\t\t\t\tev._sorder = j;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\tev._inner = true;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tvar _max_sorder = stack[0]._sorder;\r\n\t\t\t\t\t\tfor (j = 1; j < stack.length; j++) {\r\n\t\t\t\t\t\t\tif (stack[j]._sorder > _max_sorder)\r\n\t\t\t\t\t\t\t\t_max_sorder = stack[j]._sorder;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tev._sorder = _max_sorder + 1;\r\n\t\t\t\t\t\tev._inner = false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} else\r\n\t\t\t\t\tev._sorder = 0;\r\n\t\t\t}\r\n\r\n\t\t\tstack.splice(slot_index, slot_index == stack.length ? 0 : 1, ev);\r\n\r\n\t\t\tif (stack.length > (stack.max_count || 0)) {\r\n\t\t\t\tstack.max_count = stack.length;\r\n\t\t\t\tev._count = stack.length;\r\n\t\t\t} else {\r\n\t\t\t\tev._count = (ev._count) ? ev._count : 1;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (sh < this.config.first_hour || eh >= this.config.last_hour) {\r\n\t\t\t// Need to create copy of event as we will be changing it's start/end date\r\n\t\t\t// e.g. first_hour = 11 and event.start_date hours = 9. Need to preserve that info\r\n\t\t\tevs_originals.push(ev);\r\n\t\t\tevs[i] = ev = this._copy_event(ev);\r\n\r\n\t\t\tif (sh < this.config.first_hour) {\r\n\t\t\t\tev.start_date.setHours(this.config.first_hour);\r\n\t\t\t\tev.start_date.setMinutes(0);\r\n\t\t\t}\r\n\t\t\tif (eh >= this.config.last_hour) {\r\n\t\t\t\tev.end_date.setMinutes(0);\r\n\t\t\t\tev.end_date.setHours(this.config.last_hour);\r\n\t\t\t}\r\n\r\n\t\t\tif (ev.start_date > ev.end_date || sh == this.config.last_hour) {\r\n\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (!hold) {\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tevs[i]._count = days[evs[i]._sday].max_count;\r\n\t\t}\r\n\t\tfor (var i = 0; i < evs_originals.length; i++)\r\n\t\t\tevs_originals[i]._count = days[evs_originals[i]._sday].max_count;\r\n\t}\r\n\r\n\treturn evs;\r\n};\r\nscheduler._time_order = function(evs) {\r\n\tevs.sort(function(a, b) {\r\n\t\tif (a.start_date.valueOf() == b.start_date.valueOf()) {\r\n\t\t\tif (a._timed && !b._timed) return 1;\r\n\t\t\tif (!a._timed && b._timed) return -1;\r\n\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\t}\r\n\t\treturn a.start_date > b.start_date ? 1 : -1;\r\n\t});\r\n};\r\n\r\nscheduler._is_any_multiday_cell_visible = function(from, to, event){\r\n\tvar cols = this._cols.length;\r\n\tvar isAnyCellVisible = false;\r\n\tvar checkDate = from;\r\n\tvar noCells = true;\r\n\tvar lastDayEnd = new Date(to);\r\n\tif(scheduler.date.day_start(new Date(to)).valueOf() != to.valueOf()){\r\n\t\tlastDayEnd = scheduler.date.day_start(lastDayEnd);\r\n\t\tlastDayEnd = scheduler.date.add(lastDayEnd, 1, \"day\");\r\n\t}\r\n\twhile(checkDate < lastDayEnd){\r\n\t\tnoCells = false;\r\n\t\tvar cellIndex = this.locate_holder_day(checkDate, false, event);\r\n\t\tvar weekCellIndex = cellIndex % cols;\r\n\t\tif(!this._ignores[weekCellIndex]){\r\n\t\t\tisAnyCellVisible = true;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tcheckDate = scheduler.date.add(checkDate, 1, \"day\");\r\n\t}\r\n\treturn noCells || isAnyCellVisible;\r\n};\r\n\r\nscheduler._pre_render_events_table = function(evs, hold) { // max - max height of week slot\r\n\tthis._time_order(evs);\r\n\tvar out = [];\r\n\tvar weeks = [\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[]\r\n\t]; //events by weeks\r\n\tvar max = this._colsS.heights;\r\n\tvar start_date;\r\n\tvar cols = this._cols.length;\r\n\tvar chunks_info = {};\r\n\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tvar ev = evs[i];\r\n\t\tvar id = ev.id;\r\n\t\tif (!chunks_info[id]) {\r\n\t\t\tchunks_info[id] = {\r\n\t\t\t\tfirst_chunk: true,\r\n\t\t\t\tlast_chunk: true\r\n\t\t\t};\r\n\t\t}\r\n\t\tvar chunk_info = chunks_info[id];\r\n\t\tvar sd = (start_date || ev.start_date);\r\n\t\tvar ed = ev.end_date;\r\n\t\t//trim events which are crossing through current view\r\n\t\tif (sd < this._min_date) {\r\n\t\t\tchunk_info.first_chunk = false;\r\n\t\t\tsd = this._min_date;\r\n\t\t}\r\n\t\tif (ed > this._max_date) {\r\n\t\t\tchunk_info.last_chunk = false;\r\n\t\t\ted = this._max_date;\r\n\t\t}\r\n\r\n\t\tvar locate_s = this.locate_holder_day(sd, false, ev);\r\n\t\tev._sday = locate_s % cols;\r\n\t\t//skip single day events for ignored dates\r\n\t\tif (this._ignores[ev._sday] && ev._timed) continue;\r\n\r\n\t\tvar locate_e = this.locate_holder_day(ed, true, ev) || cols;\r\n\t\tev._eday = (locate_e % cols) || cols; //cols used to fill full week, when event end on monday\r\n\t\tev._length = locate_e - locate_s;\r\n\t\t//3600000 - compensate 1 hour during winter|summer time shift\r\n\t\tev._sweek = Math.floor((this._correct_shift(sd.valueOf(), 1) - this._min_date.valueOf()) / (60 * 60 * 1000 * 24 * cols));\r\n\r\n\t\tvar isAnyCellVisible = scheduler._is_any_multiday_cell_visible(sd, ed, ev);\r\n\r\n\t\tif(!isAnyCellVisible){\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\t//current slot\r\n\t\tvar stack = weeks[ev._sweek];\r\n\t\t//check order position\r\n\t\tvar stack_line;\r\n\r\n\t\tfor (stack_line = 0; stack_line < stack.length; stack_line++)\r\n\t\t\tif (stack[stack_line]._eday <= ev._sday)\r\n\t\t\t\tbreak;\r\n\r\n\t\tif (!ev._sorder || !hold) {\r\n\t\t\tev._sorder = stack_line;\r\n\t\t}\r\n\r\n\t\tif (ev._sday + ev._length <= cols) {\r\n\t\t\tstart_date = null;\r\n\t\t\tout.push(ev);\r\n\t\t\tstack[stack_line] = ev;\r\n\t\t\t//get max height of slot\r\n\t\t\tmax[ev._sweek] = stack.length - 1;\r\n\t\t\tev._first_chunk = chunk_info.first_chunk;\r\n\t\t\tev._last_chunk = chunk_info.last_chunk;\r\n\t\t} else { // split long event in chunks\r\n\t\t\tvar copy = this._copy_event(ev);\r\n\t\t\tcopy.id = ev.id;\r\n\t\t\tcopy._length = cols - ev._sday;\r\n\t\t\tcopy._eday = cols;\r\n\t\t\tcopy._sday = ev._sday;\r\n\t\t\tcopy._sweek = ev._sweek;\r\n\t\t\tcopy._sorder = ev._sorder;\r\n\t\t\tcopy.end_date = this.date.add(sd, copy._length, \"day\");\r\n\t\t\tcopy._first_chunk = chunk_info.first_chunk;\r\n\t\t\tif (chunk_info.first_chunk) {\r\n\t\t\t\tchunk_info.first_chunk = false;\r\n\t\t\t}\r\n\r\n\t\t\tout.push(copy);\r\n\t\t\tstack[stack_line] = copy;\r\n\t\t\tstart_date = copy.end_date;\r\n\t\t\t//get max height of slot\r\n\t\t\tmax[ev._sweek] = stack.length - 1;\r\n\t\t\ti--;\r\n\t\t\tcontinue; //repeat same step\r\n\t\t}\r\n\t}\r\n\treturn out;\r\n};\r\nscheduler._copy_dummy = function() {\r\n\tvar a = new Date(this.start_date);\r\n\tvar b = new Date(this.end_date);\r\n\tthis.start_date = a;\r\n\tthis.end_date = b;\r\n};\r\nscheduler._copy_event = function(ev) {\r\n\tthis._copy_dummy.prototype = ev;\r\n\treturn new this._copy_dummy();\r\n\t//return {start_date:ev.start_date, end_date:ev.end_date, text:ev.text, id:ev.id}\r\n};\r\nscheduler._rendered = [];\r\nscheduler.clear_view = function() {\r\n\tfor (var i = 0; i < this._rendered.length; i++) {\r\n\t\tvar obj = this._rendered[i];\r\n\t\tif (obj.parentNode) obj.parentNode.removeChild(obj);\r\n\t}\r\n\tthis._rendered = [];\r\n};\r\nscheduler.updateEvent = function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tthis.clear_event(id);\r\n\r\n\tif (ev && this.is_visible_events(ev) && this.filter_event(id, ev) && (this._table_view || this.config.multi_day || ev._timed)) {\r\n\t\tif (this.config.update_render){\r\n\t\t\tthis.render_view_data();\r\n\t\t}else{\r\n\t\t\tif(this.getState().mode == \"month\" && !this.getState().drag_id && !this.isOneDayEvent(ev)){\r\n\t\t\t\tthis.render_view_data();\r\n\t\t\t}else{\r\n\t\t\t\tthis.render_view_data([ev], true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.clear_event = function(id) {\r\n\tthis.for_rendered(id, function(node, i) {\r\n\t\tif (node.parentNode)\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\tscheduler._rendered.splice(i, 1);\r\n\t});\r\n};\r\nscheduler._y_from_date = function(date){\r\n\tvar sm = date.getHours() * 60 + date.getMinutes();\r\n\treturn ((Math.round((sm * 60 * 1000 - this.config.first_hour * 60 * 60 * 1000) * this.config.hour_size_px / (60 * 60 * 1000))) % (this.config.hour_size_px * 24)); //42px/hour\r\n};\r\nscheduler._calc_event_y = function(ev, min_height){\r\n\tmin_height = min_height || 0;\r\n\tvar sm = ev.start_date.getHours() * 60 + ev.start_date.getMinutes();\r\n\tvar em = (ev.end_date.getHours() * 60 + ev.end_date.getMinutes()) || (scheduler.config.last_hour * 60);\r\n\tvar top = this._y_from_date(ev.start_date);\r\n\r\n\tvar height = Math.max(min_height, (em - sm) * this.config.hour_size_px / 60); //42px/hour\r\n\treturn {\r\n\t\ttop: top,\r\n\t\theight: height\r\n\t};\r\n};\r\nscheduler.render_event = function(ev, buffer, parentWidth) {\r\n\tvar menu = scheduler.xy.menu_width;\r\n\tvar menu_offset = (this.config.use_select_menu_space) ? 0 : menu;\r\n\tif (ev._sday < 0) return; //can occur in case of recurring event during time shift\r\n\r\n\tvar parent = scheduler.locate_holder(ev._sday);\r\n\tif (!parent) return; //attempt to render non-visible event\r\n\r\n\tbuffer = buffer || parent;\r\n\r\n\tvar pos_y = this._calc_event_y(ev, scheduler.xy.min_event_height);\r\n\tvar top = pos_y.top,\r\n\t\theight = pos_y.height;\r\n\r\n\tvar ev_count = ev._count || 1;\r\n\tvar ev_sorder = ev._sorder || 0;\r\n\r\n\tparentWidth = parentWidth || parent.clientWidth;\r\n\tif(this.config.day_column_padding){\r\n\t\tparentWidth -= this.config.day_column_padding;\r\n\t}\r\n\r\n\tvar width = Math.floor((parentWidth - menu_offset) / ev_count);\r\n\tvar left = ev_sorder * width + (ev_sorder > 0 ? 2 : 1);\r\n\tif (!ev._inner) width = width * (ev_count - ev_sorder);\r\n\tif (this.config.cascade_event_display) {\r\n\t\tvar limit = this.config.cascade_event_count;\r\n\t\tvar margin = this.config.cascade_event_margin;\r\n\t\tleft = ev_sorder % limit * margin;\r\n\t\tvar right = (ev._inner) ? (ev_count - ev_sorder - 1) % limit * margin / 2 : 0;\r\n\t\twidth = Math.floor(parentWidth - menu_offset - left - right);\r\n\t}\r\n\r\n\tif(height < 30){\r\n\t\tev._mode = \"smallest\";\r\n\t}else if(height < 42){\r\n\t\tev._mode = \"small\";\r\n\t}else{\r\n\t\tev._mode = null;\r\n\t}\r\n\r\n\tvar d = this._render_v_bar(ev, menu_offset + left, top, width, height, ev._text_style, scheduler.templates.event_header(ev.start_date, ev.end_date, ev), scheduler.templates.event_text(ev.start_date, ev.end_date, ev));\r\n\t\r\n\tif(ev._mode === \"smallest\"){\r\n\t\td.classList.add(\"dhx_cal_event--xsmall\");\r\n\t}else if (ev._mode === \"small\"){\r\n\t\td.classList.add(\"dhx_cal_event--small\");\r\n\t}\r\n\r\n\tthis._waiAria.eventAttr(ev, d);\r\n\tthis._rendered.push(d);\r\n\tbuffer.appendChild(d);\r\n\r\n\tvar parentPosition = parseInt( this.config.rtl ? parent.style.right : parent.style.left, 10);\r\n\r\n\tleft = left + parentPosition + menu_offset;\r\n\r\n\tif (this._edit_id == ev.id) {\r\n\r\n\t\td.style.zIndex = 1; //fix overlapping issue\r\n\t\twidth = Math.max(width, scheduler.xy.editor_width);\r\n\t\td = document.createElement(\"div\");\r\n\t\td.setAttribute(\"event_id\", ev.id); // for backward compatibility\r\n\t\td.setAttribute(this.config.event_attribute, ev.id);\r\n\r\n\t\tthis._waiAria.eventAttr(ev, d);\r\n\r\n\t\td.className = \"dhx_cal_event dhx_cal_editor\";\r\n\t\tif (this.config.rtl) left++;\r\n\t\tthis.set_xy(d, width, height, left, top);\r\n\r\n\r\n\t\tif(ev.color){\r\n\t\t\td.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tvar tplClass = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\r\n\t\tif(tplClass){\r\n\t\t\td.className += \" \" + tplClass;\r\n\t\t}\r\n\t\tvar d2 = document.createElement(\"div\");\r\n\t\td2.style.cssText += \"overflow:hidden;height:100%\";\r\n\r\n\t\td.appendChild(d2);\r\n\t\tthis._els[\"dhx_cal_data\"][0].appendChild(d);\r\n\t\tthis._rendered.push(d);\r\n\r\n\t\td2.innerHTML = \"\";\r\n\t\tthis._editor = d2.querySelector(\"textarea\");\r\n\t\t\r\n\t\tscheduler.event(this._editor, \"keydown\", function(e) {\r\n\t\t\tif (e.shiftKey) return true;\r\n\t\t\tvar code = e.keyCode;\r\n\t\t\tif (code == scheduler.keys.edit_save) scheduler.editStop(true);\r\n\t\t\tif (code == scheduler.keys.edit_cancel) scheduler.editStop(false);\r\n\r\n\t\t\tif(code == scheduler.keys.edit_save || code == scheduler.keys.edit_cancel){\r\n\t\t\t\tif(e.preventDefault) e.preventDefault();\r\n\t\t\t}\r\n\t\t});\r\n\t\tscheduler.event(this._editor, \"selectstart\", function (e) {\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn true;\r\n\t\t});\r\n\t\tscheduler._focus(this._editor, true);\r\n\t\t//IE and opera can add x-scroll during focusing\r\n\t\tthis._els[\"dhx_cal_data\"][0].scrollLeft = 0;\r\n\t}\r\n\tif (this.xy.menu_width !== 0 && this._select_id == ev.id) {\r\n\r\n\t\tif (this.config.cascade_event_display && this._drag_mode)\r\n\t\t\td.style.zIndex = 1; //fix overlapping issue for cascade view in case of dnd of selected event\r\n\t\tvar icons = this.config[\"icons_\" + ((this._edit_id == ev.id) ? \"edit\" : \"select\")];\r\n\t\tvar icons_str = \"\";\r\n\r\n\t\tvar ariaAttr;\r\n\r\n\t\tfor (var i = 0; i < icons.length; i++) {\r\n\t\t\tconst currentIcon = icons[i];\r\n\t\t\tariaAttr = this._waiAria.eventMenuAttrString(currentIcon);\r\n\t\t\ticons_str += `
`;\r\n\t\t}\r\n\t\tvar obj = this._render_v_bar(ev, left - menu - 1, top, menu, null, \"\", \"
\", icons_str, true);\r\n\r\n\t\tif(ev.color){\r\n\t\t\tobj.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tobj.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\t//obj.style.left = left - menu + 1;\r\n\t\tthis._els[\"dhx_cal_data\"][0].appendChild(obj);\r\n\t\tthis._rendered.push(obj);\r\n\t}\r\n\tif(this.config.drag_highlight && this._drag_id == ev.id){\r\n\t\tthis.highlightEventPosition(ev);\r\n\t}\r\n};\r\nscheduler._render_v_bar = function (ev, x, y, w, h, style, contentA, contentB, bottom) {\r\n\tvar d = document.createElement(\"div\");\r\n\tvar id = ev.id;\r\n\tvar cs = (bottom) ? \"dhx_cal_event dhx_cal_select_menu\" : \"dhx_cal_event\";\r\n\r\n\tvar state = scheduler.getState();\r\n\tif(state.drag_id == ev.id){\r\n\t\tcs += \" dhx_cal_event_drag\";\r\n\t}\r\n\r\n\tif(state.select_id == ev.id){\r\n\t\tcs += \" dhx_cal_event_selected\";\r\n\t}\r\n\r\n\tvar cse = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\tif (cse) cs = cs + \" \" + cse;\r\n\r\n\tif(this.config.cascade_event_display) {\r\n\t\tcs += \" dhx_cal_event_cascade\";\r\n\t}\r\n\r\n\tvar boxWidth = w;\r\n\r\n\tvar html = '
';\r\n\td.innerHTML = html;\r\n\r\n\tvar container = d.cloneNode(true).firstChild;\r\n\r\n\tif (!bottom && scheduler.renderEvent(container, ev, w, h, contentA, contentB)) {\r\n\t\tif(ev.color){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\treturn container;\r\n\t} else {\r\n\t\tcontainer = d.firstChild;\r\n\t\tif(ev.color){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\tvar inner_html = '
 
';\r\n\t\tinner_html += '
' + contentA + '
';\r\n\t\tinner_html += '
' + contentB + '
'; // +2 css specific, moved from render_event\r\n\r\n\t\tvar footer_class = \"dhx_event_resize dhx_footer\";\r\n\t\tif (bottom || ev._drag_resize === false)\r\n\t\t\tfooter_class = \"dhx_resize_denied \" + footer_class;\r\n\r\n\t\tinner_html += '
';\r\n\r\n\t\tcontainer.innerHTML = inner_html;\r\n\t}\r\n\r\n\treturn container;\r\n};\r\nscheduler.renderEvent = function(){\r\n\treturn false;\r\n};\r\nscheduler.locate_holder = function(day) {\r\n\tif (this._mode == \"day\") return this._els[\"dhx_cal_data\"][0].firstChild; //dirty\r\n\treturn this._els[\"dhx_cal_data\"][0].childNodes[day];\r\n};\r\nscheduler.locate_holder_day = function(date, past) {\r\n\tvar day = Math.floor((this._correct_shift(date, 1) - this._min_date) / (60 * 60 * 24 * 1000));\r\n\t//when locating end data of event , we need to use next day if time part was defined\r\n\tif (past && this.date.time_part(date)) day++;\r\n\treturn day;\r\n};\r\n\r\n\r\n\r\nscheduler._get_dnd_order = function(order, ev_height, max_height){\r\n\tif(!this._drag_event)\r\n\t\treturn order;\r\n\tif(!this._drag_event._orig_sorder)\r\n\t\tthis._drag_event._orig_sorder = order;\r\n\telse\r\n\t\torder = this._drag_event._orig_sorder;\r\n\r\n\tvar evTop = ev_height * order;\r\n\twhile((evTop + ev_height) > max_height){\r\n\t\torder--;\r\n\t\tevTop -= ev_height;\r\n\t}\r\n\torder = Math.max(order, 0);\r\n\treturn order;\r\n};\r\n//scheduler._get_event_bar_pos = function(sday, eday, week, drag){\r\nscheduler._get_event_bar_pos = function(ev){\r\n\tvar rtl = this.config.rtl;\r\n\tvar columns = this._colsS;\r\n\tvar x = columns[ev._sday];\r\n\tvar x2 = columns[ev._eday];\r\n\tif (rtl) {\r\n\t\tx = columns[columns.col_length] - columns[ev._eday] + columns[0];\r\n\t\tx2 = columns[columns.col_length] - columns[ev._sday] + columns[0];\r\n\t}\r\n\r\n\tif (x2 == x) x2 = columns[ev._eday + 1];\r\n\tvar hb = this.xy.bar_height;\r\n\r\n\tvar order = ev._sorder;\r\n\tif(ev.id == this._drag_id){\r\n\t\tvar cellHeight = columns.heights[ev._sweek + 1] - columns.heights[ev._sweek]- this.xy.month_head_height;//22 for month head height\r\n\t\torder = scheduler._get_dnd_order(order, hb, cellHeight);\r\n\t}\r\n\tvar y_event_offset = order * hb;\r\n\tvar y = columns.heights[ev._sweek] + (columns.height ? (this.xy.month_scale_height + 2) : 2 ) + y_event_offset;\r\n\treturn {x:x, x2:x2, y:y};\r\n};\r\n\r\nscheduler.render_event_bar = function (ev) {\r\n\tvar parent = this._rendered_location;\r\n\tvar pos = this._get_event_bar_pos(ev);\r\n\tvar y = pos.y;\r\n\tvar x = pos.x;\r\n\tvar x2 = pos.x2;\r\n\t// resize for month mutliday events\r\n\tvar resize_handle = \"\";\r\n\r\n\t//events in ignored dates\r\n\r\n\tif (!x2) return;\r\n\r\n\tvar resizable = scheduler.config.resize_month_events && this._mode == \"month\" &&\r\n\t\t(!ev._timed || scheduler.config.resize_month_timed);\r\n\r\n\tvar d = document.createElement(\"div\");\r\n\tvar left_chunk = (ev.hasOwnProperty(\"_first_chunk\") && ev._first_chunk),\r\n\t\tright_chunk = (ev.hasOwnProperty(\"_last_chunk\") && ev._last_chunk);\r\n\r\n\tvar resize_left = resizable && (ev._timed || left_chunk);\r\n\tvar resize_right = resizable && (ev._timed || right_chunk);\r\n\r\n\tvar timed = true;\r\n\tvar cs = \"dhx_cal_event_clear\";\r\n\tif (!ev._timed || resizable) {\r\n\t\ttimed = false;\r\n\t\tcs = \"dhx_cal_event_line\";\r\n\t}\r\n\tif(left_chunk){\r\n\t\tcs += \" dhx_cal_event_line_start\";\r\n\t}\r\n\tif(right_chunk){\r\n\t\tcs += \" dhx_cal_event_line_end\";\r\n\t}\r\n\tif(resize_left){\r\n\t\tresize_handle += \"
\";\r\n\t}\r\n\tif(resize_right){\r\n\t\tresize_handle += \"
\";\r\n\t}\r\n\r\n\tvar cse = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\tif (cse){\r\n\t\tcs += \" \" + cse;\r\n\t}\r\n\r\n\tvar bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\tvar color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\tvar style_text = [\r\n\t\t\"position:absolute\",\r\n\t\t\"top:\" + y + \"px\",\r\n\t\t\"left:\" + x + \"px\",\r\n\t\t\"width:\" + (x2 - x - (timed ? 1 : 0)) + \"px\",\r\n\t\t\"height:\" + (this.xy.bar_height - 2) + \"px\",\r\n\t\tcolor,\r\n\t\tbg_color,\r\n\t\t(ev._text_style || \"\")\r\n\t].join(\";\");\r\n\r\n\tvar html = \"
\";\r\n\tif (resizable) {\r\n\t\thtml += resize_handle;\r\n\t}\r\n\tif(scheduler.getState().mode == \"month\"){\r\n\t\tev = scheduler.getEvent(ev.id); // ev at this point could be a part (row in a month view) of a larger event\r\n\t}\r\n\r\n\tif (ev._timed){\r\n\t\thtml += `${scheduler.templates.event_bar_date(ev.start_date, ev.end_date, ev)}`;\r\n\t}\r\n\r\n\thtml += \"
\";\r\n\thtml += scheduler.templates.event_bar_text(ev.start_date, ev.end_date, ev) + '
';\r\n\thtml += \"
\";\r\n\thtml += '
';\r\n\r\n\td.innerHTML = html;\r\n\r\n\tthis._rendered.push(d.firstChild);\r\n\tparent.appendChild(d.firstChild);\r\n};\r\n\r\nscheduler._locate_event = function(node) {\r\n\tvar id = null;\r\n\twhile (node && !id && node.getAttribute) {\r\n\t\tid = node.getAttribute(this.config.event_attribute);\r\n\t\tnode = node.parentNode;\r\n\t}\r\n\treturn id;\r\n};\r\n\r\nscheduler.edit = function(id) {\r\n\tif (this._edit_id == id) return;\r\n\tthis.editStop(false, id);\r\n\tthis._edit_id = id;\r\n\tthis.updateEvent(id);\r\n};\r\nscheduler.editStop = function(mode, id) {\r\n\tif (id && this._edit_id == id) return;\r\n\tvar ev = this.getEvent(this._edit_id);\r\n\tif (ev) {\r\n\t\tif (mode) ev.text = this._editor.value;\r\n\t\tthis._edit_id = null;\r\n\t\tthis._editor = null;\r\n\t\tthis.updateEvent(ev.id);\r\n\t\tthis._edit_stop_event(ev, mode);\r\n\t}\r\n};\r\nscheduler._edit_stop_event = function(ev, mode) {\r\n\tif (this._new_event) {\r\n\t\tif (!mode) {\r\n\t\t\tif (ev) // in case of custom lightbox user can already delete event\r\n\t\t\t\tthis.deleteEvent(ev.id, true);\r\n\t\t} else {\r\n\t\t\tthis.callEvent(\"onEventAdded\", [ev.id, ev]);\r\n\t\t}\r\n\t\tthis._new_event = null;\r\n\t} else {\r\n\t\tif (mode){\r\n\t\t\tthis.callEvent(\"onEventChanged\", [ev.id, ev]);\r\n\t\t}\r\n\t}\r\n};\r\n\r\nscheduler.getEvents = function(from, to) {\r\n\tvar result = [];\r\n\tfor (var a in this._events) {\r\n\t\tvar ev = this._events[a];\r\n\t\tif (ev && ( (!from && !to) || (ev.start_date < to && ev.end_date > from) ))\r\n\t\t\tresult.push(ev);\r\n\t}\r\n\treturn result;\r\n};\r\nscheduler.getRenderedEvent = function(id) {\r\n\tif (!id)\r\n\t\treturn;\r\n\tvar rendered_events = scheduler._rendered;\r\n\tfor (var i=0; i -1){\r\n\t\t\t\t\tsection = section.split(scheduler.config.section_delimiter)[0];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar top = timeline.getSectionTop(section);\r\n\t\t\tvar left = timeline.posFromDate(event.start_date);\r\n\t\t\tvar container = scheduler.$container.querySelector(\".dhx_timeline_data_wrapper\");\r\n\t\t\tleft = left - (container.offsetWidth - timeline.dx) / 2;\r\n\t\t\ttop = top - container.offsetHeight / 2 + timeline.dy/2;\r\n\r\n\t\t\tif (timeline._smartRenderingEnabled()) {\r\n\t\t\t\tvar handlerId = timeline.attachEvent(\"onScroll\", function(){\r\n\t\t\t\t\trestoreOriginalColors();\r\n\t\t\t\t\ttimeline.detachEvent(handlerId);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\ttimeline.scrollTo({\r\n\t\t\t\tleft: left,\r\n\t\t\t\ttop: top\r\n\t\t\t});\r\n\t\t\tif (!timeline._smartRenderingEnabled()) {\r\n\t\t\t\trestoreOriginalColors();\r\n\t\t\t}\r\n\t\t}\r\n\t}else{\r\n\t\trestoreOriginalColors();\r\n\t}\r\n\r\n\tscheduler.callEvent(\"onAfterEventDisplay\", [ev, mode]);\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._append_drag_marker = function(m){\r\n\tif(m.parentNode) return;\r\n\tvar zone = scheduler._els[\"dhx_cal_data\"][0];\r\n\r\n\tvar scale = zone.lastChild;\r\n\tvar className = scheduler._getClassName(scale);\r\n\tif(className.indexOf(\"dhx_scale_holder\") < 0 && scale.previousSibling){\r\n\t\tscale = scale.previousSibling;\r\n\t}\r\n\r\n\tclassName = scheduler._getClassName(scale);\r\n\tif (scale && className.indexOf(\"dhx_scale_holder\") === 0) {\r\n\t\tscale.appendChild(m);\r\n\t}\r\n};\r\n\r\nscheduler._update_marker_position = function(m, event){\r\n\tvar size = scheduler._calc_event_y(event, 0);\r\n\tm.style.top = size.top + \"px\";\r\n\tm.style.height = size.height + \"px\";\r\n};\r\n\r\nscheduler.highlightEventPosition = function(event){\r\n\tvar m = document.createElement(\"div\");\r\n\r\n\tm.setAttribute(\"event_id\", event.id); // for backward compatibility\r\n\tm.setAttribute(this.config.event_attribute, event.id);\r\n\tthis._rendered.push(m);\r\n\tthis._update_marker_position(m, event);\r\n\r\n\tvar css = this.templates.drag_marker_class(event.start_date, event.end_date, event);\r\n\tvar html = this.templates.drag_marker_content(event.start_date, event.end_date, event);\r\n\tm.className = \"dhx_drag_marker\";\r\n\tif(css)\r\n\t\tm.className += \" \" + css;\r\n\tif(html)\r\n\t\tm.innerHTML = html;\r\n\tthis._append_drag_marker(m);\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler._lightbox_controls = {};\r\nscheduler.formSection = function(name){\r\n\tvar config = this.config.lightbox.sections;\r\n\tvar i = 0;\r\n\tfor (i; i < config.length; i++) {\r\n\t\tif (config[i].name == name) {\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tif (i === config.length) {\r\n\t\t// GS-1662 section not found, should exit here instead of throwing an error\r\n\t\treturn null;\r\n\t}\r\n\r\n\tvar section = config[i];\r\n\tif (!scheduler._lightbox) {\r\n\t\tscheduler.getLightbox();\r\n\t}\r\n\tvar header = scheduler._lightbox.querySelector(`#${section.id}`);\r\n\tvar node = header.nextSibling;\r\n\r\n\tvar result = {\r\n\t\tsection: section,\r\n\t\theader: header,\r\n\t\tnode: node,\r\n\t\tgetValue:function(ev){\r\n\t\t\treturn scheduler.form_blocks[section.type].get_value(node, (ev||{}), section);\r\n\t\t},\r\n\t\tsetValue:function(value, ev){\r\n\t\t\treturn scheduler.form_blocks[section.type].set_value(node, value, (ev||{}), section);\r\n\t\t}\r\n\t};\r\n\r\n\tvar handler = scheduler._lightbox_controls[\"get_\"+section.type+\"_control\"];\r\n\treturn handler?handler(result):result;\r\n};\r\nscheduler._lightbox_controls.get_template_control = function(result) {\r\n\tresult.control = result.node;\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_select_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('select')[0];\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_textarea_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('textarea')[0];\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_time_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('select'); // array\r\n\treturn result;\r\n};\r\n\r\nscheduler._lightbox_controls.defaults = {\r\n\ttemplate: {\r\n\t\theight:30\r\n\t},\r\n\ttextarea: {\r\n\t\theight: 200\r\n\t},\r\n\tselect: {\r\n\t\theight: 23\r\n\t},\r\n\ttime: {\r\n\t\theight: 20\r\n\t}\r\n};\r\n\r\n\r\nscheduler.form_blocks={\r\n\ttemplate:{\r\n\t\trender: function(sns){\r\n\t\t\treturn \"
\";\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,config){\r\n\t\t\tnode.innerHTML = value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev,config){\r\n\t\t\treturn node.innerHTML||\"\";\r\n\t\t},\r\n\t\tfocus: function(node){\r\n\t\t}\r\n\t},\r\n\ttextarea:{\r\n\t\trender:function(sns){\r\n\t\t\treturn \"
\";\r\n\t\t},\r\n\t\tset_value:function(node,value,ev){\r\n\t\t\tscheduler.form_blocks.textarea._get_input(node).value=value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev){\r\n\t\t\treturn scheduler.form_blocks.textarea._get_input(node).value;\r\n\t\t},\r\n\t\tfocus:function(node){\r\n\t\t\tvar a = scheduler.form_blocks.textarea._get_input(node);\r\n\t\t\tscheduler._focus(a, true);\r\n\t\t},\r\n\t\t_get_input: function(node){\r\n\t\t\treturn node.getElementsByTagName(\"textarea\")[0];\r\n\t\t}\r\n\t},\r\n\tselect:{\r\n\t\trender:function(sns){\r\n\t\t\t//var defaults = scheduler._lightbox_controls.defaults.select;\r\n\t\t\tvar html=\"
\";\r\n\t\t\treturn html;\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,sns){\r\n\t\t\tvar select = node.firstChild;\r\n\t\t\tif (!select._dhx_onchange && sns.onchange) {\r\n\t\t\t\tscheduler.event(select, \"change\", sns.onchange);\r\n\t\t\t\tselect._dhx_onchange = true;\r\n\t\t\t}\r\n\t\t\tif (typeof value == \"undefined\")\r\n\t\t\t\tvalue = (select.options[0]||{}).value;\r\n\t\t\tselect.value=value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev){\r\n\t\t\treturn node.firstChild.value;\r\n\t\t},\r\n\t\tfocus:function(node){\r\n\t\t\tvar a=node.firstChild; scheduler._focus(a, true);\r\n\t\t}\r\n\t},\r\n\ttime:{\r\n\t\trender:function(sns) {\r\n\t\t\tif (!sns.time_format) {\r\n\t\t\t\t// default order\r\n\t\t\t\tsns.time_format = [\"%H:%i\", \"%d\", \"%m\", \"%Y\"];\r\n\t\t\t}\r\n\t\t\t// map: default order => real one\r\n\t\t\tsns._time_format_order = {};\r\n\t\t\tvar time_format = sns.time_format;\r\n\r\n\t\t\tvar cfg = scheduler.config;\r\n\t\t\tvar dt = scheduler.date.date_part(scheduler._currentDate());\r\n\t\t\tvar last = 24*60, first = 0;\r\n\t\t\tif(scheduler.config.limit_time_select){\r\n\t\t\t\tlast = 60*cfg.last_hour+1;\r\n\t\t\t\tfirst = 60*cfg.first_hour;\r\n\t\t\t\tdt.setHours(cfg.first_hour);\r\n\t\t\t}\r\n\t\t\tvar html = \"\";\r\n\r\n\t\t\tfor (var p = 0; p < time_format.length; p++) {\r\n\t\t\t\tvar time_option = time_format[p];\r\n\r\n\t\t\t\t// adding spaces between selects\r\n\t\t\t\tif (p > 0) {\r\n\t\t\t\t\thtml += \" \";\r\n\t\t\t\t}\r\n\t\t\t\tvar selectBoxClass = \"\";\r\n\t\t\t\tvar options = \"\";\r\n\t\t\t\tswitch (time_option) {\r\n\t\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_year_select\";\r\n\t\t\t\t\t\tsns._time_format_order[3] = p;\r\n\t\t\t\t\t\t//year\r\n\t\t\t\t\t\tvar range;\r\n\t\t\t\t\t\tvar start_year;\r\n\t\t\t\t\t\tvar end_year;\r\n\t\t\t\t\t\tif(sns.year_range){\r\n\t\t\t\t\t\t\tif (!isNaN(sns.year_range)) {\r\n\t\t\t\t\t\t\t\trange = sns.year_range;\r\n\t\t\t\t\t\t\t} else if (sns.year_range.push) {\r\n\t\t\t\t\t\t\t\t// if\r\n\t\t\t\t\t\t\t\tstart_year = sns.year_range[0];\r\n\t\t\t\t\t\t\t\tend_year = sns.year_range[1];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\trange = range || 10;\r\n\t\t\t\t\t\tvar offset = offset || Math.floor(range / 2);\r\n\t\t\t\t\t\tstart_year = start_year || dt.getFullYear() - offset;\r\n\t\t\t\t\t\tend_year = end_year || start_year + range;\r\n\r\n\t\t\t\t\t\tfor (var i = start_year; i < end_year; i++)\r\n\t\t\t\t\t\t\toptions += \"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%m\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_month_select\";\r\n\t\t\t\t\t\tsns._time_format_order[2] = p;\r\n\t\t\t\t\t\t//month\r\n\t\t\t\t\t\tfor (var i=0; i < 12; i++)\r\n\t\t\t\t\t\t\toptions+=\"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%d\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_day_select\";\r\n\t\t\t\t\t\tsns._time_format_order[1] = p;\r\n\t\t\t\t\t\t//days\r\n\t\t\t\t\t\tfor (var i=1; i < 32; i++)\r\n\t\t\t\t\t\t\toptions+=\"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%H:%i\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_time_select\";\r\n\t\t\t\t\t\tsns._time_format_order[0] = p;\r\n\t\t\t\t\t\t//hours\r\n\t\t\t\t\t\tvar i = first;\r\n\t\t\t\t\t\tvar tdate = dt.getDate();\r\n\t\t\t\t\t\tsns._time_values = [];\r\n\r\n\t\t\t\t\t\twhile(i\"+time+\"\";\r\n\t\t\t\t\t\t\tsns._time_values.push(i);\r\n\t\t\t\t\t\t\tdt.setTime(dt.valueOf()+this.config.time_step*60*1000);\r\n\t\t\t\t\t\t\tvar diff = (dt.getDate()!=tdate)?1:0; // moved or not to the next day\r\n\t\t\t\t\t\t\ti=diff*24*60+dt.getHours()*60+dt.getMinutes();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(options){\r\n\r\n\t\t\t\t\tvar ariaAttrs = scheduler._waiAria.lightboxSelectAttrString(time_option);\r\n\t\t\t\t\tvar readonly = sns.readonly ? \"disabled='disabled'\" : \"\";\r\n\t\t\t\t\thtml += \" \";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//var defaults = scheduler._lightbox_controls.defaults.select;\r\n\r\n\t\t\treturn \"
\"+html+\"  –  \"+html+\"
\";\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,config){\r\n\t\t\tvar cfg = scheduler.config;\r\n\t\t\tvar s=node.getElementsByTagName(\"select\");\r\n\t\t\tvar map = config._time_format_order;\r\n\t\t\tvar start_date, end_date;\r\n\r\n\t\t\tif(cfg.full_day) {\r\n\t\t\t\tif (!node._full_day){\r\n\t\t\t\t\tvar html = \"\";\r\n\t\t\t\t\tif (!scheduler.config.wide_form)\r\n\t\t\t\t\t\thtml = node.previousSibling.innerHTML+html;\r\n\t\t\t\t\tnode.previousSibling.innerHTML=html;\r\n\t\t\t\t\tnode._full_day=true;\r\n\t\t\t\t}\r\n\t\t\t\tvar input=node.previousSibling.getElementsByTagName(\"input\")[0];\r\n\t\t\t\tinput.checked = (scheduler.date.time_part(ev.start_date)===0 && scheduler.date.time_part(ev.end_date)===0);\r\n\r\n\t\t\t\ts[map[0]].disabled=input.checked;\r\n\t\t\t\ts[ map[0] + s.length/2 ].disabled=input.checked;\r\n\r\n\t\t\t\tif(!input.$_eventAttached){\r\n\t\t\t\t\tinput.$_eventAttached = true;\r\n\r\n\t\t\t\t\t\tscheduler.event(input, \"click\", function(){\r\n\t\t\t\t\t\tif(input.checked) {\r\n\t\t\t\t\t\t\tvar obj = {};\r\n\t\t\t\t\t\t\tscheduler.form_blocks.time.get_value(node,obj,config);\r\n\r\n\t\t\t\t\t\t\tstart_date = scheduler.date.date_part(obj.start_date);\r\n\t\t\t\t\t\t\tend_date = scheduler.date.date_part(obj.end_date);\r\n\r\n\t\t\t\t\t\t\tif (+end_date == +start_date || (+end_date >= +start_date && (ev.end_date.getHours() !== 0 || ev.end_date.getMinutes() !== 0)))\r\n\t\t\t\t\t\t\t\tend_date = scheduler.date.add(end_date, 1, \"day\");\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tstart_date = null;\r\n\t\t\t\t\t\t\tend_date = null;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\ts[map[0]].disabled=input.checked;\r\n\t\t\t\t\t\ts[ map[0] + s.length/2 ].disabled=input.checked;\r\n\r\n\t\t\t\t\t\t_fill_lightbox_select(s,0,start_date||ev.start_date);\r\n\t\t\t\t\t\t_fill_lightbox_select(s,4,end_date||ev.end_date);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(cfg.auto_end_date && cfg.event_duration) {\r\n\t\t\t\tvar _update_lightbox_select = function () {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (!(cfg.auto_end_date && cfg.event_duration)){\r\n\t\t\t\t\t\t// setting may be disabled after the handler is attached\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstart_date = new Date(s[map[3]].value,s[map[2]].value,s[map[1]].value,0,s[map[0]].value);\r\n\t\t\t\t\tend_date = new Date(start_date.getTime() + (scheduler.config.event_duration * 60 * 1000));\r\n\t\t\t\t\t_fill_lightbox_select(s, 4, end_date);\r\n\t\t\t\t};\r\n\t\t\t\tfor(var i=0; i<4; i++) {\r\n\t\t\t\t\tif(!s[i].$_eventAttached) {\r\n\t\t\t\t\t\ts[i].$_eventAttached = true;\r\n\t\t\t\t\t\tscheduler.event(s[i], \"change\", _update_lightbox_select);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfunction _fill_lightbox_select(s,i,d) {\r\n\t\t\t\tvar time_values = config._time_values;\r\n\t\t\t\tvar direct_value = d.getHours()*60+d.getMinutes();\r\n\t\t\t\tvar fixed_value = direct_value;\r\n\t\t\t\tvar value_found = false;\r\n\t\t\t\tfor (var k=0; k\";\r\n\t\tvar ariaAttr = \"\";\r\n\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\tariaAttr = this._waiAria.lightboxButtonAttrString(buttons[i]);\r\n\t\t\thtml += \"
\" + scheduler.locale.labels[buttons[i]] + \"
\";\r\n\t\t}\r\n\r\n\t\tbuttons = this.config.buttons_right;\r\n\t\tvar rtl = scheduler.config.rtl;\r\n\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\tariaAttr = this._waiAria.lightboxButtonAttrString(buttons[i]);\r\n\r\n\t\t\thtml += \"
\";\r\n\r\n\t\t\thtml += \"
\" + scheduler.locale.labels[buttons[i]] + \"
\";\r\n\t\t}\r\n\t\thtml += \"
\";\r\n\t\thtml+=\"
\";\r\n\t\td.innerHTML=html;\r\n\t\tif (scheduler.config.drag_lightbox){\r\n\t\t\tscheduler.event(d.firstChild, \"mousedown\", scheduler._ready_to_dnd);\r\n\t\t\tscheduler.event(d.firstChild, \"selectstart\", function(e){ \r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn false; \r\n\t\t\t});\r\n\t\t\td.firstChild.style.cursor = \"move\";\r\n\t\t\tscheduler._init_dnd_events();\r\n\r\n\t\t}\r\n\r\n\t\tthis._waiAria.lightboxAttr(d);\r\n\r\n\t\tthis.show_cover();\r\n\t\tthis._cover.insertBefore(d,this._cover.firstChild);\r\n\t\t\r\n\t\tthis._lightbox=d;\r\n\r\n\t\tvar sns=this.config.lightbox.sections;\r\n\t\thtml=\"\";\r\n\t\tfor (var i=0; i < sns.length; i++) {\r\n\t\t\tvar block=this.form_blocks[sns[i].type];\r\n\t\t\tif (!block) continue; //ignore incorrect blocks\r\n\t\t\tsns[i].id=\"area_\"+this.uid();\r\n\t\t\tvar button = \"\";\r\n\t\t\tif (sns[i].button){\r\n\t\t\t\tvar ariaAttr = scheduler._waiAria.lightboxSectionButtonAttrString(this.locale.labels[\"button_\"+sns[i].button]);\r\n\t\t\t\tbutton = \"
\"+this.locale.labels[\"button_\"+sns[i].button]+\"
\";\r\n\t\t\t}\r\n\r\n\t\t\tif (this.config.wide_form){\r\n\t\t\t\thtml+=\"
\";\r\n\t\t\t}\r\n\r\n\t\t\tvar label_name = this.locale.labels[\"section_\"+sns[i].name];\r\n\t\t\tif(typeof label_name !== \"string\"){\r\n\t\t\t\tlabel_name = sns[i].name;\r\n\t\t\t}\r\n\t\t\thtml+=\"
\"+button+ \"
\"+block.render.call(this,sns[i]);\r\n\t\t\thtml+=\"
\";\r\n\t\t}\r\n\r\n\t\tvar ds=d.getElementsByTagName(\"div\");\r\n\t\tfor (var i=0; i
 \r\n
\r\n
\r\n\r\n
`;\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler.getRootView = function() {\r\n\treturn {\r\n\t\tview: {\r\n\t\t\trender: function(){\r\n\t\t\t\treturn {\r\n\t\t\t\t\ttag: \"div\",\r\n\t\t\t\t\ttype: 1,\r\n\t\t\t\t\tattrs: {\r\n\t\t\t\t\t\tstyle: \"width:100%;height:100%;\"\r\n\t\t\t\t\t},\r\n\t\t\t\t\thooks: {\r\n\t\t\t\t\t\t\"didInsert\": function(){\r\n\t\t\t\t\t\t\tscheduler.setCurrentView();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tbody: [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tel: this.el,\r\n\t\t\t\t\t\t\ttype: 1\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t};\r\n\t\t\t},\r\n\t\t\tinit: function(){\r\n\t\t\t\tvar container = document.createElement(\"DIV\");\r\n\t\t\t\tcontainer.id = \"scheduler_\"+ scheduler.uid();\r\n\t\t\t\tcontainer.style.width = \"100%\";\r\n\t\t\t\tcontainer.style.height = \"100%\";\r\n\t\t\t\tcontainer.classList.add(\"dhx_cal_container\");\r\n\t\t\t\tcontainer.cmp = \"grid\";\r\n\t\t\t\tcontainer.innerHTML = '
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
';\r\n\t\t\t\tscheduler.init(container);\r\n\r\n\t\t\t\tthis.el = container;\r\n\t\t\t}\r\n\t\t},\r\n\t\ttype: 4\r\n\t};\r\n};\r\n\r\n}","import global from \"../global\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\n(function(){\r\n\r\n\tvar setCurrentView = scheduler.setCurrentView,\r\n\t\tupdateView = scheduler.updateView;\r\n\tvar update_view_timer = null,\r\n\t\tcurr_view_timer = null;\r\n\r\n\tvar lazy_setCurrentView = function(date, mode){\r\n\t\tvar self = this;\r\n\t\tglobal.clearTimeout(curr_view_timer);\r\n\t\tglobal.clearTimeout(update_view_timer);\r\n\r\n\t\tvar oldDate = self._date,\r\n\t\t\toldMode = self._mode;\r\n\t\tupdateFlags(this, date, mode);\r\n\r\n\t\tcurr_view_timer = setTimeout(function(){\r\n\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif (!self.callEvent(\"onBeforeViewChange\", [oldMode, oldDate, mode || self._mode, date || self._date])){\r\n\t\t\t\tupdateFlags(self, oldDate, oldMode);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tupdateView.call(self, date, mode);\r\n\t\t\tself.callEvent(\"onViewChange\", [self._mode, self._date]);\r\n\r\n\t\t\tglobal.clearTimeout(update_view_timer);\r\n\t\t\tcurr_view_timer = 0;\r\n\t\t}, scheduler.config.delay_render);\r\n\t};\r\n\tvar lazy_updateView = function(date, mode){\r\n\t\tvar self = this,\r\n\t\t\tars = arguments;\r\n\r\n\t\tupdateFlags(this, date, mode);\r\n\r\n\t\tglobal.clearTimeout(update_view_timer);\r\n\t\tupdate_view_timer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif(curr_view_timer)\r\n\t\t\t\treturn;\r\n\r\n\t\t\tupdateView.apply(self, ars);\r\n\t\t}, scheduler.config.delay_render);\r\n\t};\r\n\tfunction updateFlags(scheduler, date, mode){\r\n\t\tif(date)\r\n\t\t\tscheduler._date = date;\r\n\t\tif(mode)\r\n\t\t\tscheduler._mode = mode;\r\n\r\n\t}\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\tif(scheduler.config.delay_render){\r\n\t\t\tscheduler.setCurrentView = lazy_setCurrentView;\r\n\t\t\tscheduler.updateView = lazy_updateView;\r\n\t\t}else{\r\n\t\t\tscheduler.setCurrentView = setCurrentView;\r\n\t\t\tscheduler.updateView = updateView;\r\n\t\t}\r\n\t});\r\n\r\n})();\r\n\r\n}","import global from \"../global\";\r\n\r\nexport default function extend(scheduler) {\r\n/*\r\nif (global.dataProcessor && !dataProcessor.prototype.init_original){\r\n\tdataProcessor.prototype.init_original=dataProcessor.prototype.init;\r\n\tdataProcessor.prototype.init=function(obj){\r\n\t\tthis.init_original(obj);\r\n\t\tobj._dataprocessor=this;\r\n\r\n\t\tthis.setTransactionMode(\"POST\",true);\r\n\t\tthis.serverProcessor+=(this.serverProcessor.indexOf(\"?\")!=-1?\"&\":\"?\")+\"editing=true\";\r\n\t};\r\n}*/\r\n\r\nscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\tif(typeof dhtmlxError !== \"undefined\") {\r\n\t\twindow.dhtmlxError.catchError(\"LoadXML\", function(a, b, c){\r\n\t\t\tvar message = c[0].responseText;\r\n\r\n\t\t\tswitch (scheduler.config.ajax_error){\r\n\t\t\t\tcase \"alert\":\r\n\t\t\t\t\tglobal.alert(message);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"console\":\r\n\t\t\t\t\tglobal.console.log(message);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n});\r\n\r\n\r\n}","import ar from \"./locale_ar\";\r\nimport be from \"./locale_be\";\r\nimport ca from \"./locale_ca\";\r\nimport cn from \"./locale_cn\";\r\nimport cs from \"./locale_cs\";\r\nimport da from \"./locale_da\";\r\nimport de from \"./locale_de\";\r\nimport el from \"./locale_el\";\r\nimport en from \"./locale_en\";\r\nimport es from \"./locale_es\";\r\nimport fi from \"./locale_fi\";\r\nimport fr from \"./locale_fr\";\r\nimport he from \"./locale_he\";\r\nimport hu from \"./locale_hu\";\r\nimport id from \"./locale_id\";\r\nimport it from \"./locale_it\";\r\nimport jp from \"./locale_jp\";\r\n\r\nimport LocaleManager from \"./locale_manager\";\r\n\r\nimport nb from \"./locale_nb\";\r\nimport nl from \"./locale_nl\";\r\nimport no from \"./locale_no\";\r\nimport pl from \"./locale_pl\";\r\nimport pt from \"./locale_pt\";\r\nimport ro from \"./locale_ro\";\r\nimport ru from \"./locale_ru\";\r\nimport si from \"./locale_si\";\r\nimport sk from \"./locale_sk\";\r\nimport sv from \"./locale_sv\";\r\nimport tr from \"./locale_tr\";\r\nimport ua from \"./locale_ua\";\r\n\r\nexport default function(){\r\n\treturn new LocaleManager({\r\n\t\ten,\r\n\t\tar,\r\n\t\tbe,\r\n\t\tca,\r\n\t\tcn,\r\n\t\tcs,\r\n\t\tda,\r\n\t\tde,\r\n\t\tel,\r\n\t\tes,\r\n\t\tfi,\r\n\t\tfr,\r\n\t\the,\r\n\t\thu,\r\n\t\tid,\r\n\t\tit,\r\n\t\tjp,\r\n\t\tnb,\r\n\t\tnl,\r\n\t\tno,\r\n\t\tpl,\r\n\t\tpt,\r\n\t\tro,\r\n\t\tru,\r\n\t\tsi,\r\n\t\tsk,\r\n\t\tsv,\r\n\t\ttr,\r\n\t\tua\r\n\t});\r\n}","export default class ExtensionsManager{\r\n\tconstructor(config){\r\n\t\tthis._extensions = {};\r\n\t\tfor(const i in config){\r\n\t\t\tthis._extensions[i] = config[i];\r\n\t\t}\r\n\t}\r\n\r\n\taddExtension(name, ext) {\r\n\t\tthis._extensions[name] = ext;\r\n\t}\r\n\r\n\tgetExtension(name) {\r\n\t\treturn this._extensions[name];\r\n\t}\r\n}","\r\nexport default function(){\r\n/* global dhtmlx */\r\nif (typeof dhtmlx != \"undefined\" && dhtmlx.attaches) {\r\n\tdhtmlx.attaches.attachScheduler = function (day, mode, tabs, scheduler) {\r\n\t\tvar tabs = tabs || '
';\r\n\t\tvar obj = document.createElement(\"DIV\");\r\n\t\tobj.id = \"dhxSchedObj_\" + this._genStr(12);\r\n\t\tobj.innerHTML = '
' + tabs + '
';\r\n\t\tdocument.body.appendChild(obj.firstChild);\r\n\r\n\t\tthis.attachObject(obj.id, false, true);\r\n\r\n\t\tthis.vs[this.av].sched = scheduler;\r\n\t\tthis.vs[this.av].schedId = obj.id;\r\n\t\tscheduler.setSizes = scheduler.updateView;\r\n\t\tscheduler.destructor = function () { };\r\n\t\tscheduler.init(obj.id, day, mode);\r\n\r\n\t\treturn this.vs[this._viewRestore()].sched;\r\n\t};\r\n}\r\n\r\n}","export default {\r\n\talert: (extension, assert) => {\r\n\t\tassert(false, `The ${extension} extension is not included in this version of dhtmlxScheduler.
\r\n\t\tYou may need a Professional version of the component.
\r\n\t\tContact us at https://dhtmlx.com/docs/contact.shtml if you have any questions.`);\r\n\t}\r\n};","export default function(scheduler){\r\n\r\n\r\n\r\n(function(){\r\n\tvar modalsStack = [];\r\n\r\n\tfunction isModal(){\r\n\t\treturn !!(modalsStack.length);\r\n\t}\r\n\r\n\tfunction isChildOf(child, parent){\r\n\t\twhile(child && child != parent){\r\n\t\t\tchild = child.parentNode;\r\n\t\t}\r\n\r\n\t\treturn !!(child == parent);\r\n\t}\r\n\r\n\tfunction afterPopup(box){\r\n\t\tsetTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tif(!isModal() && !(isChildOf(document.activeElement, scheduler.$container))) {\r\n\t\t\t\tscheduler.focus();\r\n\t\t\t}\r\n\t\t}, 1);\r\n\t}\r\n\tfunction startModal(box){\r\n\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\tscheduler.event(box, \"keydown\", trapFocus);\r\n\t\tmodalsStack.push(box);\r\n\t\t//scheduler.$keyboardNavigation.dispatcher.disable();\r\n\t}\r\n\r\n\tfunction endModal(){\r\n\t\tvar box = modalsStack.pop();\r\n\t\tif(box) {\r\n\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t}\r\n\t\tafterPopup(box);\r\n\r\n\t}\r\n\r\n\tfunction isTopModal(box){\r\n\t//\tif(dhtmlx._modalsStack.length){\r\n\t//\t\treturn box == dhtmlx._modalsStack[dhtmlx._modalsStack.length - 1];\r\n\t//\t}else{\r\n\t\t\treturn box == modalsStack[modalsStack.length - 1];\r\n\t//\t}\r\n\r\n\t}\r\n\r\n\tfunction trapFocus(event){\r\n\t\tvar event = event || window.event;\r\n\t\tvar target = event.currentTarget;\r\n\t\tif(!isTopModal(target)) return;\r\n\r\n\t\tscheduler.$keyboardNavigation.trapFocus(target, event);\r\n\t}\r\n\r\n\tfunction traceLightbox(){\r\n\t\tstartModal(scheduler.getLightbox());\r\n\t}\r\n\r\n\tscheduler.attachEvent(\"onLightbox\", traceLightbox);\r\n\tscheduler.attachEvent(\"onAfterLightbox\", endModal);\r\n\r\n\tscheduler.attachEvent(\"onAfterQuickInfo\", function(){afterPopup();});\r\n\r\n\tif(!scheduler._keyNavMessagePopup) {\r\n\t\tscheduler._keyNavMessagePopup = true;\r\n\r\n\t\tvar focusElement = null;\r\n\t\tvar backupFocus = null;\r\n\t\tconst modalsStack = [];\r\n\t\tscheduler.attachEvent(\"onMessagePopup\", function(box){\r\n\t\t\tfocusElement = document.activeElement;\r\n\t\t\tbackupFocus = focusElement;\r\n\r\n\t\t\twhile(backupFocus && scheduler._getClassName(backupFocus).indexOf(\"dhx_cal_data\") < 0){\r\n\t\t\t\tbackupFocus = backupFocus.parentNode;\r\n\t\t\t}\r\n\t\t\tif(backupFocus){\r\n\t\t\t\tbackupFocus = backupFocus.parentNode;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t\tscheduler.event(box, \"keydown\", trapFocus);\r\n\t\t\tmodalsStack.push(box);\r\n\t\t});\r\n\r\n\r\n\t\tscheduler.attachEvent(\"onAfterMessagePopup\", function () {\r\n\t\t\tvar box = modalsStack.pop();\r\n\t\t\tif(box) {\r\n\t\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t\t}\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\tvar currentTarget = document.activeElement;\r\n\t\t\t\twhile(currentTarget && scheduler._getClassName(currentTarget).indexOf(\"dhx_cal_light\") < 0){\r\n\t\t\t\t\tcurrentTarget = currentTarget.parentNode;\r\n\t\t\t\t}\r\n\t\t\t\tif(currentTarget)\r\n\t\t\t\t\treturn;\r\n\r\n\r\n\t\t\t\tif(focusElement && focusElement.parentNode){\r\n\t\t\t\t\tfocusElement.focus();\r\n\r\n\t\t\t\t}else if(backupFocus && backupFocus.parentNode){\r\n\t\t\t\t\tbackupFocus.focus();\r\n\t\t\t\t}\r\n\t\t\t\tfocusElement = null;\r\n\t\t\t\tbackupFocus = null;\r\n\r\n\t\t\t}, 1);\r\n\t\t});\r\n\t}\r\n\r\n\tscheduler.$keyboardNavigation.isModal = isModal;\r\n\r\n\r\n})();\r\n\r\n}","export default function(scheduler){\r\n\r\n//Initial idea and implementation by Steve MC\r\nscheduler._temp_key_scope = function (){\r\n\r\n\tscheduler.config.key_nav = true;\r\n\r\n\tscheduler.$keyboardNavigation._pasteDate = null; // used for copy and paste operations\r\n\tscheduler.$keyboardNavigation._pasteSection = null; // used for copy and paste operations\r\n\tvar isCopy = null;\r\n\r\n\tvar pos = {};\r\n\r\n\tif(!document.body){\r\n\t\tscheduler.event(window, \"load\", function(){\r\n\t\t\tscheduler.event(document.body, \"mousemove\", trackMousePosition);\r\n\t\t});\r\n\t}else{\r\n\t\tscheduler.event(document.body, \"mousemove\", trackMousePosition);\r\n\t}\r\n\r\n\tfunction trackMousePosition(event){\r\n\t\tevent = event || window.event;\r\n\t\tpos.x = event.clientX;\r\n\t\tpos.y = event.clientY;\r\n\t}\r\n\tfunction currentTarget(){\r\n\r\n\t\tvar mousePointer = false;\r\n\t\tvar keyNavPointer = false;\r\n\r\n\t\tvar target = document.elementFromPoint(pos.x, pos.y);\r\n\t\twhile(target && target != scheduler._obj){\r\n\t\t\ttarget = target.parentNode;\r\n\t\t}\r\n\t\tmousePointer = !!(target == scheduler._obj);\r\n\r\n\t\tkeyNavPointer = scheduler.$keyboardNavigation.dispatcher.isEnabled();\r\n\r\n\t\treturn mousePointer || keyNavPointer;\r\n\t}\r\n\r\n\tscheduler.attachEvent(\"onMouseMove\", function(id,e){\r\n\t\tvar state = scheduler.getState();\r\n\r\n\t\t// make sure scheduler is fully initialized before calling scheduler.getActionData\r\n\t\tif(!(state.mode && state.min_date)){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tvar position = scheduler.getActionData(e);\r\n\t\tscheduler.$keyboardNavigation._pasteDate = position.date;\r\n\t\tscheduler.$keyboardNavigation._pasteSection = position.section;\r\n\t});\r\n\r\n\tfunction clear_event_after(ev){\r\n\t\tdelete ev.rec_type; delete ev.rec_pattern;\r\n\t\tdelete ev.event_pid; delete ev.event_length;\r\n\t}\r\n\r\n\tfunction copyEvent(ev){\r\n\t\treturn scheduler._lame_copy({}, ev);\r\n\t}\r\n\r\n\tscheduler._make_pasted_event = function(ev){\r\n\t\tvar date = scheduler.$keyboardNavigation._pasteDate;\r\n\t\tvar section = scheduler.$keyboardNavigation._pasteSection;\r\n\r\n\t\tvar event_duration = ev.end_date-ev.start_date;\r\n\r\n\t\tvar copy = copyEvent(ev);\r\n\t\tclear_event_after(copy);\r\n\t\tcopy.start_date = new Date(date);\r\n\t\tcopy.end_date = new Date(copy.start_date.valueOf() + event_duration);\r\n\r\n\t\tif(section){\r\n\t\t\tvar property = scheduler._get_section_property();\r\n\r\n\t\t\tif(scheduler.config.multisection)\r\n\t\t\t\tcopy[property] = ev[property]; // save initial set of resources for multisection view\r\n\t\t\telse\r\n\t\t\t\tcopy[property] = section;\r\n\t\t}\r\n\t\treturn copy;\r\n\t};\r\n\tscheduler._do_paste = function(is_copy, modified_ev, original_ev){\r\n\t\tif(scheduler.callEvent(\"onBeforeEventPasted\", [is_copy, modified_ev, original_ev]) === false){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tscheduler.addEvent(modified_ev);\r\n\t\tscheduler.callEvent(\"onEventPasted\", [is_copy, modified_ev, original_ev]);\r\n\t};\r\n\r\n\tscheduler._is_key_nav_active = function(){\r\n\t\tif(this._is_initialized() && !this._is_lightbox_open() && this.config.key_nav){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\r\n\tfunction getSelectedEvent(){\r\n\t\tvar node = scheduler.$keyboardNavigation.dispatcher.getActiveNode();\r\n\t\tif(node && node.eventId) return node.eventId;\r\n\t\treturn scheduler._select_id;\r\n\t}\r\n\r\n\tscheduler.event(document, \"keydown\", function(e){\r\n\t\t// compatibility fix - scheduler focus on ctrl+v on mouse hover\r\n\t\tif(((e.ctrlKey || e.metaKey) && e.keyCode == 86) && scheduler._buffer_event && !scheduler.$keyboardNavigation.dispatcher.isEnabled()) {\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.isActive = currentTarget();\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler._key_nav_copy_paste = function(e){\r\n\t\tif(!scheduler._is_key_nav_active()) return true;\r\n\r\n\t\tif (e.keyCode == 37 || e.keyCode == 39) { // Left, Right arrows\r\n\t\t\te.cancelBubble = true;\r\n\r\n\t\t\tvar next = scheduler.date.add(scheduler._date,(e.keyCode == 37 ? -1 : 1 ),scheduler._mode);\r\n\t\t\tscheduler.setCurrentView(next);\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tvar select_id = getSelectedEvent();\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 67) { // CTRL+C\r\n\t\t\tif (select_id) {\r\n\t\t\t\tscheduler._buffer_event = copyEvent(scheduler.getEvent(select_id));\r\n\t\t\t\tisCopy = true;\r\n\t\t\t\tscheduler.callEvent(\"onEventCopied\", [scheduler.getEvent(select_id)]);\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 88) { // CTRL+X\r\n\t\t\tif (select_id) {\r\n\t\t\t\tisCopy = false;\r\n\t\t\t\tvar ev = scheduler._buffer_event = copyEvent(scheduler.getEvent(select_id));\r\n\r\n\t\t\t\tscheduler.updateEvent(ev.id);\r\n\t\t\t\tscheduler.callEvent(\"onEventCut\", [ev]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 86 && currentTarget(e)) { // CTRL+V\r\n\t\t\tvar ev = scheduler._buffer_event ? scheduler.getEvent(scheduler._buffer_event.id) : scheduler._buffer_event;\r\n\t\t\tev = ev || scheduler._buffer_event;\r\n\r\n\t\t\tif (ev) {\r\n\t\t\t\tvar new_ev = scheduler._make_pasted_event(ev);\r\n\t\t\t\tif (isCopy) {\r\n\t\t\t\t\tnew_ev.id = scheduler.uid();\r\n\t\t\t\t\tscheduler._do_paste(isCopy, new_ev, ev);\r\n\t\t\t\t}\r\n\t\t\t\telse { // cut operation\r\n\t\t\t\t\tvar res = scheduler.callEvent(\"onBeforeEventChanged\",[new_ev, e, false, ev]);\r\n\t\t\t\t\tif (res) {\r\n\t\t\t\t\t\tscheduler._do_paste(isCopy, new_ev, ev);\r\n\t\t\t\t\t\tisCopy = true; // switch to copy after first paste operation\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t};\r\n};\r\nscheduler._temp_key_scope();\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.attachSchedulerHandlers = function(){\r\n\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\tvar keyDownHandler = function(e){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\r\n\t\treturn dispatcher.keyDownHandler(e);\r\n\t};\r\n\r\n\tvar focusHandler = function () {\r\n\t\tdispatcher.keepScrollPosition(function () {\r\n\t\t\tdispatcher.focusGlobalNode();\r\n\t\t});\r\n\t};\r\n\r\n\tvar waitCall;\r\n\tscheduler.attachEvent(\"onDataRender\", function(){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\t\tif(!(dispatcher.isEnabled() && !scheduler.getState().editor_id)) return;\r\n\r\n\t\tclearTimeout(waitCall);\r\n\t\twaitCall = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tif(!dispatcher.isEnabled())\r\n\t\t\t\tdispatcher.enable();\r\n\t\t\treFocusActiveNode();\r\n\t\t});\r\n\t});\r\n\r\n\tvar reFocusActiveNode = function(){\r\n\t\tif(!dispatcher.isEnabled())\r\n\t\t\treturn;\r\n\r\n\t\tvar activeNode = dispatcher.getActiveNode();\r\n\t\tif(!activeNode)\r\n\t\t\treturn;\r\n\r\n\t\tif(!activeNode.isValid()){\r\n\t\t\tactiveNode = activeNode.fallback();\r\n\t\t}\r\n\r\n\t\tif(!activeNode || activeNode instanceof scheduler.$keyboardNavigation.MinicalButton || activeNode instanceof scheduler.$keyboardNavigation.MinicalCell)\r\n\t\t\treturn;\r\n\r\n\t\tdispatcher.keepScrollPosition(function () {\r\n\t\t\tactiveNode.focus(true);\r\n\t\t});\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\tvar container = scheduler.$container;\r\n\t\tscheduler.eventRemove(document, \"keydown\", keyDownHandler);\r\n\t\tscheduler.eventRemove(container, \"mousedown\", mousedownHandler);\r\n\t\tscheduler.eventRemove(container, \"focus\", focusHandler);\r\n\r\n\r\n\t\tif(scheduler.config.key_nav){\r\n\r\n\t\t\tscheduler.event(document, \"keydown\", keyDownHandler);\r\n\t\t\tscheduler.event(container, \"mousedown\", mousedownHandler);\r\n\t\t\tscheduler.event(container, \"focus\", focusHandler);\r\n\r\n\t\t\tcontainer.setAttribute(\"tabindex\", \"0\");\r\n\r\n\t\t}else{\r\n\t\t\tcontainer.removeAttribute(\"tabindex\");\r\n\t\t}\r\n\t});\r\n\r\n\tfunction mousedownHandler(e){\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\r\n\r\n\t\tvar dataAreaClick = scheduler.$keyboardNavigation.isChildOf(e.target || e.srcElement, scheduler.$container.querySelector(\".dhx_cal_data\"));\r\n\r\n\r\n\t\tvar pos = scheduler.getActionData(e);\r\n\r\n\t\tvar focusNode;\r\n\t\tif(scheduler._locate_event(e.target || e.srcElement)){\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.Event(scheduler._locate_event(e.target || e.srcElement));\r\n\t\t}else if(dataAreaClick){\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(pos.date && dataAreaClick){\r\n\t\t\t\tfocusNode = focusNode.nextSlot(new scheduler.$keyboardNavigation.TimeSlot(pos.date, null, pos.section));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(focusNode) {\r\n\t\t\tif (!dispatcher.isEnabled()) {\r\n\t\t\t\tdispatcher.activeNode = focusNode;\r\n\r\n\t\t\t} else {\r\n\t\t\t\tif (pos.date && dataAreaClick) {\r\n\t\t\t\t\tdispatcher.delay(function () {\r\n\t\t\t\t\t\tdispatcher.setActiveNode(focusNode);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction focusEvent(evNode){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\t\tif(!dispatcher.isEnabled()) return;\r\n\r\n\r\n\t\tvar prevState = evNode;\r\n\t\tvar focusNode = new scheduler.$keyboardNavigation.Event(prevState.eventId);\r\n\t\tif(!focusNode.isValid()){\r\n\t\t\tvar lastStart = focusNode.start || prevState.start;\r\n\t\t\tvar lastEnd = focusNode.end || prevState.end;\r\n\t\t\tvar lastSection = focusNode.section || prevState.section;\r\n\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot(lastStart, lastEnd, lastSection);\r\n\t\t\tif(!focusNode.isValid()){\r\n\t\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdispatcher.setActiveNode(focusNode);\r\n\t\tvar node = dispatcher.getActiveNode();\r\n\t\tif(node && node.getNode && document.activeElement != node.getNode()){\r\n\t\t\tdispatcher.focusNode(dispatcher.getActiveNode());\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tvar updateEvent = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id){\r\n\t\tvar res = updateEvent.apply(this, arguments);\r\n\t\tif(scheduler.config.key_nav && dispatcher.isEnabled()){\r\n\t\t\tif(scheduler.getState().select_id == id){\r\n\t\t\t\tvar element = new scheduler.$keyboardNavigation.Event(id);\r\n\r\n\t\t\t\tif(!scheduler.getState().lightbox_id){\r\n\t\t\t\t\tfocusEvent(element);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn res;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onEventDeleted\", function(id) {\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\t\tif(dispatcher.isEnabled()){\r\n\t\t\tvar activeNode = dispatcher.getActiveNode();\r\n\t\t\tif(activeNode.eventId == id){\r\n\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onClearAll\", function(){\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\t\tif(dispatcher.isEnabled()){\r\n\t\t\tif(dispatcher.getActiveNode() instanceof scheduler.$keyboardNavigation.Event){\r\n\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n};\r\n\r\n}","interface IViewPosition{\r\n\ttop: number;\r\n\tleft: number;\r\n}\r\n\r\ninterface IViewBox extends IViewPosition{\r\n\twidth: number;\r\n\theight: number;\r\n\tbottom: number;\r\n\tright: number;\r\n}\r\n\r\nexport class Tooltip {\r\n\tprivate _root: HTMLElement;\r\n\tprivate _tooltipNode: HTMLElement | null;\r\n\tprivate _scheduler: any;\r\n\r\n\tconstructor(scheduler: any){\r\n\t\tthis._scheduler = scheduler;\r\n\t}\r\n\r\n\tgetNode() : HTMLElement {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tif (!this._tooltipNode){\r\n\t\t\tthis._tooltipNode = document.createElement(\"div\");\r\n\t\t\tthis._tooltipNode.className = \"dhtmlXTooltip scheduler_tooltip tooltip\";\r\n\r\n\t\t\tscheduler._waiAria.tooltipAttr(this._tooltipNode);\r\n\t\t}\r\n\t\tif(scheduler.config.rtl){\r\n\t\t\tthis._tooltipNode.classList.add(\"dhtmlXTooltip_rtl\");\r\n\t\t} else{\r\n\t\t\tthis._tooltipNode.classList.remove(\"dhtmlXTooltip_rtl\");\r\n\t\t}\r\n\t\treturn this._tooltipNode;\r\n\t}\r\n\r\n\tsetViewport(node: HTMLElement):Tooltip{\r\n\t\tthis._root = node;\r\n\t\treturn this;\r\n\t}\r\n\r\n\tshow(left: number, top: number): Tooltip;\r\n\tshow(event: MouseEvent): Tooltip;\r\n\tshow(left: number | MouseEvent, top?: number): Tooltip {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tconst container = document.body;\r\n\t\tconst node = this.getNode();\r\n\r\n\t\tif(!domHelpers.isChildOf(node, container)){\r\n\t\t\tthis.hide();\r\n\t\t\tcontainer.appendChild(node);\r\n\t\t}\r\n\r\n\t\tif (this._isLikeMouseEvent(left)) {\r\n\t\t\tconst position = this._calculateTooltipPosition(left as MouseEvent);\r\n\t\t\ttop = position.top;\r\n\t\t\tleft = position.left;\r\n\t\t}\r\n\r\n\t\tnode.style.top = top + \"px\";\r\n\t\tnode.style.left = left + \"px\";\r\n\r\n\t\tscheduler._waiAria.tooltipVisibleAttr(node);\r\n\t\treturn this;\r\n\t}\r\n\thide() : Tooltip{\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst node = this.getNode();\r\n\t\tif(node && node.parentNode){\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t}\r\n\t\tscheduler._waiAria.tooltipHiddenAttr(node);\r\n\t\treturn this;\r\n\t}\r\n\r\n\tsetContent(html: string) : Tooltip{\r\n\t\tconst node = this.getNode();\r\n\t\tnode.innerHTML = html;\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// it is for salesforce, because it proxies event to it own events\r\n\tprivate _isLikeMouseEvent(event: any): boolean {\r\n\t\tif (!event || typeof event !== \"object\") {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn \"clientX\" in event && \"clientY\" in event;\r\n\t}\r\n\r\n\tprivate _getViewPort() : HTMLElement {\r\n\t\treturn this._root || document.body;\r\n\t}\r\n\r\n\r\n\tprivate _calculateTooltipPosition(event: MouseEvent): IViewPosition{\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\t// top/left coordinates inside the viewport by mouse position\r\n\t\tconst viewport = this._getViewPortSize();\r\n\t\tconst tooltipNode = this.getNode();\r\n\t\tconst tooltip: IViewBox = {\r\n\t\t\ttop:0,\r\n\t\t\tleft: 0,\r\n\t\t\twidth: tooltipNode.offsetWidth,\r\n\t\t\theight: tooltipNode.offsetHeight,\r\n\t\t\tbottom: 0,\r\n\t\t\tright: 0\r\n\t\t};\r\n\r\n\t\tconst offsetX = scheduler.config.tooltip_offset_x;\r\n\t\tconst offsetY = scheduler.config.tooltip_offset_y;\r\n\r\n\t\tconst container = document.body;\r\n\t\tconst mouse = domHelpers.getRelativeEventPosition(event, container);\r\n\t\tconst containerPos = domHelpers.getNodePosition(container);\r\n\t\tmouse.y += containerPos.y; // to fix margin collapsing\r\n\r\n\t\ttooltip.top = mouse.y;\r\n\t\ttooltip.left = mouse.x;\r\n\t\ttooltip.top += offsetY;\r\n\t\ttooltip.left += offsetX;\r\n\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\ttooltip.right = tooltip.left + tooltip.width;\r\n\r\n\t\tconst scrollTop = window.scrollY + container.scrollTop; // to fix margin collapsing\r\n\t\t// edge cases when the tooltip element can be partially hidden by edges of the viewport\r\n\t\tif(tooltip.top < viewport.top - scrollTop){\r\n\t\t\ttooltip.top = viewport.top;\r\n\t\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\t}else if(tooltip.bottom > viewport.bottom){\r\n\t\t\ttooltip.bottom = viewport.bottom;\r\n\t\t\ttooltip.top = tooltip.bottom - tooltip.height;\r\n\t\t}\r\n\r\n\t\tif(tooltip.left < viewport.left){\r\n\t\t\ttooltip.left = viewport.left;\r\n\t\t\ttooltip.right = viewport.left + tooltip.width;\r\n\t\t}else if(tooltip.right > viewport.right){\r\n\t\t\ttooltip.right = viewport.right;\r\n\t\t\ttooltip.left = tooltip.right - tooltip.width;\r\n\t\t}\r\n\r\n\t\tif(mouse.x >= tooltip.left && mouse.x <= tooltip.right) {\r\n\t\t\ttooltip.left = mouse.x - tooltip.width - offsetX;\r\n\t\t\ttooltip.right = tooltip.left + tooltip.width;\r\n\t\t}\r\n\r\n\t\tif(mouse.y >= tooltip.top && mouse.y <= tooltip.bottom) {\r\n\t\t\ttooltip.top = mouse.y - tooltip.height - offsetY;\r\n\t\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\t}\r\n\r\n\t\treturn tooltip;\r\n\t}\r\n\r\n\tprivate _getViewPortSize() : IViewBox {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tconst container = this._getViewPort();\r\n\t\tlet viewport = container;\r\n\t\tlet scrollTop = window.scrollY + document.body.scrollTop;\r\n\t\tlet scrollLeft = window.scrollX + document.body.scrollLeft;\r\n\t\tlet pos;\r\n\t\t// support for the initial tooltip mode where the tooltip element was attached to the data area of scheduler\r\n\t\tif(container === scheduler.$event_data){\r\n\t\t\tviewport = scheduler.$event;\r\n\t\t\tscrollTop = 0;\r\n\t\t\tscrollLeft = 0;\r\n\t\t\tpos = domHelpers.getNodePosition(scheduler.$event);\r\n\t\t}else{\r\n\t\t\tpos = domHelpers.getNodePosition(viewport);\r\n\t\t}\r\n\t\treturn {\r\n\t\t\tleft:pos.x + scrollLeft,\r\n\t\t\ttop: pos.y + scrollTop,\r\n\t\t\twidth: pos.width,\r\n\t\t\theight: pos.height,\r\n\t\t\tbottom: pos.y + pos.height + scrollTop,\r\n\t\t\tright: pos.x + pos.width + scrollLeft\r\n\t\t};\r\n\t}\r\n}\r\n","import * as utils from \"../../core/utils/utils\";\r\nimport { Tooltip } from \"./tooltip\";\r\n\r\ninterface ITrackerTarget {\r\n\tselector: string;\r\n\tonmouseenter: (event: MouseEvent, node: HTMLElement) => void;\r\n\tonmousemove: (event: MouseEvent, node: HTMLElement) => void;\r\n\tonmouseleave: (event: MouseEvent, node: HTMLElement) => void;\r\n\tglobal: boolean;\r\n}\r\n\r\ninterface ITooltipConfig {\r\n\tselector: string;\r\n\thtml: (event: MouseEvent, node: HTMLElement) => string;\r\n\tglobal: boolean;\r\n}\r\n\r\nexport class TooltipManager{\r\n\ttooltip: Tooltip;\r\n\tprotected _domEvents: any;\r\n\tprivate _listeners: object = {};\r\n\tprivate _scheduler: any;\r\n\tprivate delayShow: any;\r\n\tprivate delayHide: any;\r\n\r\n\tconstructor(scheduler: any) {\r\n\t\tthis.tooltip = new Tooltip(scheduler);\r\n\t\tthis._scheduler = scheduler;\r\n\t\tthis._domEvents = scheduler._createDomEventScope();\r\n\t\tthis._initDelayedFunctions();\r\n\t}\r\n\r\n\tdestructor(): void{\r\n\t\tthis.tooltip.hide();\r\n\t\tthis._domEvents.detachAll();\r\n\t}\r\n\thideTooltip(): void{\r\n\t\tthis.delayHide();\r\n\t}\r\n\tattach(config: ITrackerTarget): void {\r\n\t\tlet root = document.body;\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tif(!config.global){\r\n\t\t\troot = scheduler.$root;\r\n\t\t}\r\n\r\n\t\tlet watchableTarget = null;\r\n\t\tconst handler = (event) => {\r\n\t\t\tconst eventTarget = domHelpers.getTargetNode(event);\r\n\t\t\tconst targetNode = domHelpers.closest(eventTarget, config.selector);\r\n\t\t\tif(domHelpers.isChildOf(eventTarget, this.tooltip.getNode())){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tconst doOnMouseEnter = () => {\r\n\t\t\t\twatchableTarget = targetNode;\r\n\t\t\t\tconfig.onmouseenter(event, targetNode);\r\n\t\t\t};\r\n\r\n\t\t\tif(watchableTarget){\r\n\t\t\t\tif(targetNode && targetNode === watchableTarget){\r\n\t\t\t\t\tconfig.onmousemove(event, targetNode);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconfig.onmouseleave(event, watchableTarget);\r\n\t\t\t\t\twatchableTarget = null;\r\n\r\n\t\t\t\t\tif(targetNode && targetNode !== watchableTarget){\r\n\t\t\t\t\t\tdoOnMouseEnter();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(targetNode){\r\n\t\t\t\t\tdoOnMouseEnter();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tthis.detach(config.selector);\r\n\t\tthis._domEvents.attach(root, \"mousemove\", handler);\r\n\t\tthis._listeners[config.selector] = {\r\n\t\t\tnode: root,\r\n\t\t\thandler\r\n\t\t};\r\n\t}\r\n\r\n\tdetach(selector: string): void {\r\n\t\tconst listener = this._listeners[selector];\r\n\t\tif(listener){\r\n\t\t\tthis._domEvents.detach(listener.node, \"mousemove\", listener.handler);\r\n\t\t}\r\n\t}\r\n\r\n\ttooltipFor(config: ITooltipConfig): void {\r\n\t\tconst cloneDomEvent = (event: MouseEvent) => {\r\n\t\t\tlet clone = event;\r\n\t\t\t// making events survive timeout in ie\r\n\t\t\t// tslint:disable-next-line no-string-literal\r\n\t\t\tif(document[\"createEventObject\"] && !document.createEvent){\r\n\t\t\t\t// tslint:disable-next-line no-string-literal\r\n\t\t\t\tclone = document[\"createEventObject\"](event);\r\n\t\t\t}\r\n\t\t\treturn clone;\r\n\t\t};\r\n\t\tthis._initDelayedFunctions();\r\n\t\tthis.attach({\r\n\t\t\tselector: config.selector,\r\n\t\t\tglobal: config.global,\r\n\t\t\tonmouseenter:(event: MouseEvent, node: HTMLElement) => {\r\n\t\t\t\tconst html = config.html(event, node);\r\n\t\t\t\tif(html){\r\n\t\t\t\t\tthis.delayShow(cloneDomEvent(event), html);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tonmousemove:(event: MouseEvent, node: HTMLElement) => {\r\n\t\t\t\tconst html = config.html(event, node);\r\n\t\t\t\tif(html){\r\n\t\t\t\t\tthis.delayShow(cloneDomEvent(event), html);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\t\t\tthis.delayHide();\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tonmouseleave:() => {\r\n\t\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\t\tthis.delayHide();\r\n\t\t\t},\r\n\t\t});\r\n\t}\r\n\r\n\tprivate _initDelayedFunctions(){\r\n\t\tconst scheduler = this._scheduler;\r\n\t\t// reset delayed functions in order to apply current values of tooltip_timeout\r\n\t\tif(this.delayShow){\r\n\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t}\r\n\t\tif(this.delayHide){\r\n\t\t\tthis.delayHide.$cancelTimeout();\r\n\t\t}\r\n\t\tthis.tooltip.hide();\r\n\t\t\r\n\t\tthis.delayShow = (utils as any).default.delay((event: MouseEvent, html: string) => {\r\n\t\t\tif(scheduler.callEvent(\"onBeforeTooltip\", [event]) === false) {\r\n\t\t\t\tthis.tooltip.hide();\r\n\t\t\t} else {\r\n\t\t\t\tthis.tooltip.setContent(html);\r\n\t\t\t\tthis.tooltip.show(event);\r\n\t\t\t}\r\n\t\t}, scheduler.config.tooltip_timeout || 1);\r\n\r\n\t\tthis.delayHide = (utils as any).default.delay(() => {\r\n\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\tthis.tooltip.hide();\r\n\t\t}, scheduler.config.tooltip_hide_timeout || 1);\r\n\t}\r\n\r\n}","import active_links from \"./active_links\";\r\nimport agenda_legacy from \"./agenda_legacy_view\";\r\nimport agenda_view from \"./agenda\";\r\nimport all_timed from \"./all_timed\";\r\nimport collision from \"./collision\";\r\nimport container_autoresize from \"./container_autoresize\";\r\nimport cookie from \"./cookie\";\r\nimport daytimeline_restricted from \"./restricted_extensions/daytimeline\";\r\nimport drag_between_restricted from \"./restricted_extensions/drag_between\";\r\nimport editors from \"./editors\";\r\nimport expand from \"./expand\";\r\nimport grid_view from \"./restricted_extensions/grid_view\";\r\nimport html_templates from \"./html_templates\";\r\nimport key_nav from \"./key_nav\";\r\nimport layer from \"./layer\";\r\nimport limit from \"./limit\";\r\nimport map_view from \"./map_view\";\r\nimport minical from \"./minical\";\r\nimport monthheight from \"./monthheight\";\r\nimport multisection_restricted from \"./restricted_extensions/multisection\";\r\nimport multiselect from \"./multiselect\";\r\nimport multisource from \"./multisource\";\r\nimport mvc from \"./mvc\";\r\nimport outerdrag from \"./outerdrag\";\r\nimport pdf from \"./pdf\";\r\nimport quick_info from \"./quick_info\";\r\nimport readonly from \"./readonly\";\r\nimport recurring from \"./recurring\";\r\nimport serialize from \"./serialize\";\r\nimport timeline_restricted from \"./restricted_extensions/timeline\";\r\nimport tooltip from \"./tooltip\";\r\nimport treetimeline_restricted from \"./restricted_extensions/treetimeline\";\r\nimport units_restricted from \"./restricted_extensions/units\";\r\nimport url from \"./url\";\r\nimport week_agenda_restricted from \"./restricted_extensions/week_agenda\";\r\nimport wp from \"./wp\";\r\nimport year_view from \"./year_view\";\r\nimport export_api from \"./export_api\";\r\n\r\nexport default {\r\n\tactive_links,\r\n\tagenda_legacy,\r\n\tagenda_view,\r\n\tall_timed,\r\n\tcollision,\r\n\tcontainer_autoresize,\r\n\tcookie,\r\n\tdaytimeline: daytimeline_restricted,\r\n\tdrag_between: drag_between_restricted,\r\n\teditors,\r\n\texpand,\r\n\texport_api,\r\n\tgrid_view,\r\n\thtml_templates,\r\n\tkey_nav,\r\n\tlayer,\r\n\tlimit,\r\n\tmap_view,\r\n\tminical,\r\n\tmonthheight,\r\n\tmultisection: multisection_restricted,\r\n\tmultiselect,\r\n\tmultisource,\r\n\tmvc,\r\n\touterdrag,\r\n\tpdf,\r\n\tquick_info,\r\n\treadonly,\r\n\trecurring,\r\n\tserialize,\r\n\ttimeline: timeline_restricted,\r\n\ttooltip,\r\n\ttreetimeline: treetimeline_restricted,\r\n\tunits: units_restricted,\r\n\turl,\r\n\tweek_agenda: week_agenda_restricted,\r\n\twp,\r\n\tyear_view\r\n};","export default function(scheduler){\r\n\r\nscheduler.config.active_link_view = \"day\";\r\nscheduler._active_link_click = function(e){\r\n\tvar start = e.target;\r\n\tvar to = start.getAttribute(\"data-link-date\");\r\n\tvar s_d = scheduler.date.str_to_date(scheduler.config.api_date, false, true);\r\n\tif (to) {\r\n\t\tscheduler.setCurrentView(s_d(to), scheduler.config.active_link_view);\r\n\t\tif (e && e.preventDefault)\r\n\t\t\te.preventDefault();\r\n\t\treturn false;\r\n\t}\r\n};\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar do_wrapper = function(key, fullname){\r\n\t\tfullname = fullname || (key+\"_scale_date\");\r\n\r\n\t\tif(!scheduler.templates['_active_links_old_'+ fullname]){\r\n\t\t\tscheduler.templates['_active_links_old_'+ fullname] = scheduler.templates[fullname];\r\n\t\t}\r\n\t\tvar week_x = scheduler.templates['_active_links_old_'+ fullname];\r\n\t\tvar d_s = scheduler.date.date_to_str(scheduler.config.api_date);\r\n\t\tscheduler.templates[fullname] = function(date) {\r\n\t\t\treturn \"\" + week_x(date) + \"\";\r\n\t\t};\r\n\t};\r\n\r\n\tdo_wrapper(\"week\");\r\n\tdo_wrapper(\"\", \"month_day\");\r\n\tif (this.matrix){\r\n\t\tfor (var key in this.matrix)\r\n\t\t\tdo_wrapper(key);\r\n\t}\r\n\r\n\tthis._detachDomEvent(this._obj, \"click\", scheduler._active_link_click);\r\n\tscheduler.event(this._obj, \"click\", scheduler._active_link_click);\r\n});\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.date.add_agenda_legacy = function(date){\r\n\treturn scheduler.date.add(date, 1, \"year\");\r\n};\r\n\r\nscheduler.templates.agenda_legacy_time = function(start,end,ev){\r\n\tif (ev._timed)\r\n\t\treturn this.day_date(ev.start_date, ev.end_date, ev)+\" \"+this.event_date(start);\r\n\telse\r\n\t\treturn scheduler.templates.day_date(start)+\" – \"+scheduler.templates.day_date(end);\r\n};\r\nscheduler.templates.agenda_legacy_text = function(start,end,event){\r\n\treturn event.text;\r\n};\r\nscheduler.templates.agenda_legacy_date = function(){ return \"\"; };\r\n\r\nscheduler.date.agenda_legacy_start=function(){ return scheduler.date.date_part(scheduler._currentDate()); };\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function() {\r\n\tvar old_dblclick_dhx_cal_data = scheduler.dblclick_dhx_cal_data;\r\n\tscheduler.dblclick_dhx_cal_data = function() {\r\n\t\tif (this._mode == \"agenda_legacy\") {\r\n\t\t\tif (!this.config.readonly && this.config.dblclick_create)\r\n\t\t\t\tthis.addEventNow();\r\n\t\t} else {\r\n\t\t\tif (old_dblclick_dhx_cal_data)\r\n\t\t\t\treturn old_dblclick_dhx_cal_data.apply(this, arguments);\r\n\t\t}\r\n\t};\r\n\r\n\r\n\tvar old = scheduler.render_data;\r\n\tscheduler.render_data=function(evs){\r\n\t\tif (this._mode == \"agenda_legacy\")\r\n\t\t\tfill_agenda_tab();\r\n\t\telse\r\n\t\t\treturn old.apply(this,arguments);\r\n\t};\r\n\r\n\tvar old_render_view_data = scheduler.render_view_data;\r\n\tscheduler.render_view_data = function(){\r\n\t\tif(this._mode == \"agenda_legacy\") {\r\n\t\t\tscheduler._agendaScrollTop = scheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop;\r\n\t\t\tscheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop = 0;\r\n\t\t}\r\n\t\treturn old_render_view_data.apply(this,arguments);\r\n\t};\r\n\r\n\r\n\r\n\tfunction set_full_view(mode){\r\n\t\tif (mode){\r\n\t\t\tvar l = scheduler.locale.labels;\r\n\r\n\t\t\tvar rowAttr = scheduler._waiAria.agendaHeadAttrString();\r\n\t\t\tvar dateHeader = scheduler._waiAria.agendaHeadDateString(l.date);\r\n\t\t\tvar descriptionHeader = scheduler._waiAria.agendaHeadDescriptionString(l.description);\r\n\r\n\t\t\tscheduler._els[\"dhx_cal_header\"][0].innerHTML=\"
\" +\r\n\t\t\t\t\"
\"+l.date+\"
\" +\r\n\t\t\t\t\"\"+l.description+\"\" +\r\n\t\t\t\t\"
\";\r\n\t\t\tscheduler._table_view=true;\r\n\t\t\tscheduler.set_sizes();\r\n\t\t}\r\n\t}\r\n\r\n\tfunction fill_agenda_tab(){\r\n\t\t//select events for which data need to be printed\r\n\r\n\t\tvar events = scheduler.get_visible_events();\r\n\t\tevents.sort(function(a,b){ return a.start_date>b.start_date?1:-1;});\r\n\r\n\t\tvar tableAttr = scheduler._waiAria.agendaDataAttrString();\r\n\t\tvar agendaEventAttrString;\r\n\t\t//generate html for the view\r\n\t\tvar html=\"
\";\r\n\t\tfor (var i=0; i
\"+\r\n\t\t\t\t\t(scheduler.config.rtl ? scheduler.templates.agenda_time(ev.end_date,ev.start_date, ev):scheduler.templates.agenda_time(ev.start_date, ev.end_date,ev))+\r\n\t\t\t\t\t\"
\";\r\n\t\t\thtml+=`
\r\n\t\t\t\r\n\t\t\t
`;\r\n\t\t\thtml+=\"\"+scheduler.templates.agenda_text(ev.start_date, ev.end_date, ev)+\"
\";\r\n\t\t}\r\n\t\thtml+=\"
\";\r\n\r\n\t\t//render html\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop = scheduler._agendaScrollTop||0;\r\n\r\n\t\t// setting up dhx_v_border size\r\n\t\tvar agenda_area = scheduler._els[\"dhx_cal_data\"][0].childNodes[0];\r\n\t\tvar v_border = agenda_area.childNodes[agenda_area.childNodes.length-1];\r\n\t\tv_border.style.height = (agenda_area.offsetHeight < scheduler._els[\"dhx_cal_data\"][0].offsetHeight) ? \"100%\" : (agenda_area.offsetHeight+\"px\");\r\n\r\n\t\tvar t=scheduler._els[\"dhx_cal_data\"][0].firstChild.childNodes;\r\n\r\n\t\tvar dateElement = scheduler._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML=scheduler.templates.agenda_date(scheduler._min_date, scheduler._max_date, scheduler._mode);\r\n\t\t}\r\n\r\n\t\tscheduler._rendered=[];\r\n\t\tfor (var i=0; i < t.length-1; i++)\r\n\t\t\tscheduler._rendered[i]=t[i];\r\n\r\n\t}\r\n\r\n\tscheduler.agenda_legacy_view=function(mode){\r\n\t\tscheduler._min_date = scheduler.config.agenda_start||scheduler.date.agenda_legacy_start(scheduler._date);\r\n\t\tscheduler._max_date = scheduler.config.agenda_end||scheduler.date.add_agenda_legacy(scheduler._min_date, 1);\r\n\r\n\t\tset_full_view(mode);\r\n\t\tif (mode){\r\n\t\t\tscheduler._cols = null;\r\n\t\t\tscheduler._colsS = null;\r\n\t\t\tscheduler._table_view = true;\r\n\t\t\t//agenda tab activated\r\n\t\t\tfill_agenda_tab();\r\n\t\t} else {\r\n\t\t\tscheduler._table_view = false;\r\n\t\t\t//agenda tab de-activated\r\n\t\t}\r\n\t};\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.date.add_agenda = function(date, inc){\r\n\t\treturn scheduler.date.add(date, 1*inc, \"month\");\r\n\t};\r\n\t\r\n\tscheduler.templates.agenda_time = function(start,end,ev){\r\n\t\tif (ev._timed){\r\n\t\t\treturn `${this.event_date(start)} - ${this.event_date(end)}`;\r\n\t\t}else{\r\n\t\t\treturn scheduler.locale.labels.full_day;\r\n\t\t}\r\n\t};\r\n\tscheduler.templates.agenda_text = function(start,end,ev){\r\n\t\treturn ev.text;\r\n\t};\r\n\r\n\tconst dayDateToStr = scheduler.date.date_to_str(\"%F %j\");\r\n\tconst dayDowToStr = scheduler.date.date_to_str(\"%l\");\r\n\r\n\tscheduler.templates.agenda_day = function(date){ \r\n\t\treturn `
${dayDateToStr(date)}
\r\n\t\t
${dayDowToStr(date)}
`;\r\n\t};\r\n\tscheduler.templates.agenda_date = function(start, end){ \r\n\t\treturn scheduler.templates.month_date(scheduler.getState().date); \r\n\t};\r\n\t\r\n\tscheduler.date.agenda_start=function(date){\r\n\t\treturn scheduler.date.month_start(new Date(date));\r\n\t};\r\n\r\n\tlet scrollTop = 0;\r\n\t\r\n\tscheduler.attachEvent(\"onTemplatesReady\",function() {\r\n\t\tvar old_dblclick_dhx_cal_data = scheduler.dblclick_dhx_cal_data;\r\n\t\tscheduler.dblclick_dhx_cal_data = function() {\r\n\t\t\tif (this._mode == \"agenda\") {\r\n\t\t\t\tif (!this.config.readonly && this.config.dblclick_create)\r\n\t\t\t\t\tthis.addEventNow();\r\n\t\t\t} else {\r\n\t\t\t\tif (old_dblclick_dhx_cal_data)\r\n\t\t\t\t\treturn old_dblclick_dhx_cal_data.apply(this, arguments);\r\n\t\t\t}\r\n\t\t};\r\n\t\r\n\t\r\n\t\tvar old = scheduler.render_data;\r\n\t\tscheduler.render_data=function(evs){\r\n\t\t\tif (this._mode == \"agenda\")\r\n\t\t\t\tfill_agenda_tab();\r\n\t\t\telse\r\n\t\t\t\treturn old.apply(this,arguments);\r\n\t\t};\r\n\t\r\n\t\tvar old_render_view_data = scheduler.render_view_data;\r\n\t\tscheduler.render_view_data = function(){\r\n\t\t\tif(this._mode == \"agenda\") {\r\n\t\t\t\tscrollTop = scheduler._els[\"dhx_cal_data\"][0].scrollTop;\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = 0;\r\n\t\t\t}\r\n\t\t\treturn old_render_view_data.apply(this,arguments);\r\n\t\t};\r\n\r\n\t\tfunction fill_agenda_tab(){\r\n\t\t\tconst events = scheduler.get_visible_events();\r\n\t\t\tevents.sort(function(a,b){ return a.start_date>b.start_date?1:-1;});\r\n\r\n\t\t\tconst eventsInDays = {};\r\n\t\t\tlet currDate = scheduler.getState().min_date;\r\n\t\t\tconst maxDate = scheduler.getState().max_date;\r\n\t\t\twhile(currDate.valueOf() < maxDate.valueOf()){\r\n\t\t\t\teventsInDays[currDate.valueOf()] = [];\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\r\n\t\t\tlet anyEvents = false;\r\n\r\n\t\t\tevents.forEach((ev) => {\r\n\t\t\t\tlet eventStart = scheduler.date.day_start(new Date(ev.start_date)); \r\n\t\t\t\twhile (eventStart.valueOf() < ev.end_date.valueOf()) {\r\n\t\t\t\t\tif (eventsInDays[eventStart.valueOf()]) {\r\n\t\t\t\t\t\teventsInDays[eventStart.valueOf()].push(ev);\r\n\t\t\t\t\t\tanyEvents = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\teventStart = scheduler.date.day_start(scheduler.date.add(eventStart, 1, \"day\"));\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(!anyEvents){\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = renderEmptyView();\r\n\t\t\t}else{\r\n\t\t\t\tlet html = \"\";\r\n\t\t\t\tfor(let day in eventsInDays){\r\n\t\t\t\t\thtml += renderDay(new Date(day*1), eventsInDays[day]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = scrollTop;\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\r\n\r\n\t\tfunction renderEmptyView(){\r\n\t\t\treturn `
${scheduler.locale.labels.agenda_tab}
`;\r\n\t\t}\r\n\r\n\t\tfunction renderDay(day, events) {\r\n\t\t\tif(!events.length){\r\n\t\t\t\treturn \"\";\r\n\t\t\t}\r\n\t\t\tlet html = `\r\n
\r\n\t
${scheduler.templates.agenda_day(day)}
\r\n\t
\r\n`;\r\n\r\n\t\t\tevents.forEach((calendarEvent) => {\r\n\t\t\t\thtml += renderOneEvent(day, calendarEvent);\r\n\t\t\t});\r\n\r\n\t\t\thtml += `
`;\r\n\t\t\treturn html;\r\n\t\t}\r\n\r\n\t\tfunction renderOneEvent(day, calendarEvent){\r\n\t\t\tconst dates = scheduler.templates.agenda_time(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\t\t\tconst selectedId = scheduler.getState().select_id;\r\n\t\t\tconst cls = scheduler.templates.event_class(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\t\t\tconst description = scheduler.templates.agenda_text(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\r\n\t\t\tlet style = \"\";\r\n\t\t\tif(calendarEvent.color || calendarEvent.textColor){\r\n\t\t\t\tconst bg = (calendarEvent.color ? (\"--dhx-scheduler-event-background:\" + calendarEvent.color + \";\") : \"\");\r\n\t\t\t\tconst color = (calendarEvent.textColor ? (\"--dhx-scheduler-event-color:\" + calendarEvent.textColor + \";\") : \"\");\r\n\t\t\t\tstyle = ` style=\"${bg}${color}\" `;\r\n\t\t\t}\r\n\r\n\t\t\treturn `
\r\n\t
\r\n\t
${dates}
\r\n\t
${description}
\r\n
`;\r\n\t\t}\r\n\t\r\n\t\tscheduler.agenda_view=function(mode){\r\n\t\t\tif (mode){\r\n\t\t\t\tscheduler._min_date = scheduler.config.agenda_start || scheduler.date.agenda_start(scheduler._date);\r\n\t\t\t\tscheduler._max_date = scheduler.config.agenda_end || scheduler.date.add_agenda(scheduler._min_date, 1);\r\n\t\t\t\tscheduler._cols = null;\r\n\t\t\t\tscheduler._colsS = null;\r\n\t\t\t\tscheduler._table_view = true;\r\n\r\n\t\t\t\tconst dateHeader = scheduler._getNavDateElement();\r\n\t\t\t\tdateHeader.innerHTML = scheduler.templates.agenda_date(scheduler._date);\r\n\t\t\t\t//agenda tab activated\r\n\t\t\t\tfill_agenda_tab();\r\n\t\t\t} else {\r\n\t\t\t\tscheduler._table_view = false;\r\n\t\t\t\t//agenda tab de-activated\r\n\t\t\t}\r\n\t\t};\r\n\t});\r\n\r\n\t// scheduler.attachEvent(\"onEventSelected\", function(id){\r\n\t// \tconst oldSelected = scheduler.$container.querySelectorAll(\".dhx_cal_agenda_event_line_selected\");\r\n\t// \toldSelected.forEach((el) => {\r\n\t// \t\tel.classList.remove(\"dhx_cal_agenda_event_line_selected\");\r\n\t// \t});\r\n\r\n\t// \tconst selected = scheduler.$container.querySelector(`[${scheduler.config.event_attribute}=\"${id}\"]`);\r\n\t// \tif(selected){\r\n\t// \t\tselected.classList.add(\"dhx_cal_agenda_event_line_selected\");\r\n\t// \t}\r\n\t// });\r\n\t\r\n\t\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.config.all_timed = \"short\";\r\n\tscheduler.config.all_timed_month = false;\r\n\r\n\tvar is_event_short = function (ev) {\r\n\t\tif(!((ev.end_date - ev.start_date)/(1000*60*60) >= 24)){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t// short event shouldn't disappear to multiday area during dnd-resize\r\n\t\tif(scheduler._drag_mode == \"resize\" && scheduler._drag_id == ev.id){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn \tfalse;\r\n\t};\r\n\r\n\t// copy of usual events and recurring instances;\r\n\t// regular copy causes problems with recurrings which have series event as a prototype\r\n\tscheduler._safe_copy = function(event){\r\n\t\tvar proto = null,\r\n\t\t\tcopy = scheduler._copy_event(event);\r\n\t\tif(event.event_pid){\r\n\t\t\tproto = scheduler.getEvent(event.event_pid);\r\n\t\t}\r\n\r\n\t\tif (proto && proto.isPrototypeOf(event)) {\r\n\t\t\tdelete copy.event_length;\r\n\t\t\tdelete copy.event_pid;\r\n\t\t\tdelete copy.rec_pattern;\r\n\t\t\tdelete copy.rec_type;\r\n\t\t}\r\n\r\n\t\treturn copy;\r\n\t};\r\n\r\n\tvar old_prerender_events_line = scheduler._pre_render_events_line;\r\n\tvar old_prerender_events_table = scheduler._pre_render_events_table;\r\n\r\n\tvar prerender_events = function (evs, hold) {\r\n\t\tif (!this._table_view) {\r\n\t\t\treturn old_prerender_events_line.call(this, evs, hold);\r\n\t\t}\r\n\r\n\t\treturn old_prerender_events_table.call(this, evs, hold);\r\n\t};\r\n\r\n\tscheduler._pre_render_events_line = scheduler._pre_render_events_table = function(evs, hold){\r\n\t\tif (!this.config.all_timed ||\r\n\t\t\t(this._table_view && this._mode != \"month\") ||\r\n\t\t\t(this._mode == \"month\" && !this.config.all_timed_month))\r\n\t\t\treturn prerender_events.call(this, evs, hold);\r\n\r\n\t\tfor (var i=0; i < evs.length; i++) {\r\n\t\t\tvar ev=evs[i];\r\n\r\n\t\t\tif (ev._timed)\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\tif (this.config.all_timed == \"short\") {\r\n\t\t\t\tif (!is_event_short(ev)) {\r\n\t\t\t\t\tif (this._mode != \"month\") {\r\n\t\t\t\t\t\tevs.splice(i--, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar ce = this._safe_copy(ev); // current event (event for one specific day) is copy of original with modified dates\r\n\t\t\tif(!ev._virtual){\r\n\t\t\t\tce._first_chunk = true;\r\n\t\t\t}else{\r\n\t\t\t\tce._first_chunk = false;\r\n\t\t\t}\r\n\t\t\tce._drag_resize = false;\r\n\t\t\tce._virtual = true;\r\n\t\t\tce.start_date = new Date(ce.start_date); // as lame copy doesn't copy date objects\r\n\r\n\t\t\tif (!isOvernightEvent(ev)) {\r\n\t\t\t\tce.end_date = new Date(ev.end_date);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tce.end_date = getNextDay(ce.start_date);\r\n\t\t\t\tif (this.config.last_hour != 24) { // if specific last_hour was set (e.g. 20)\r\n\t\t\t\t\tce.end_date = setDateTime(ce.start_date, this.config.last_hour);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar event_changed = false;\r\n\t\t\tif (ce.start_date < this._max_date && ce.end_date > this._min_date && ce.start_date < ce.end_date) {\r\n\t\t\t\tevs[i] = ce; // adding another event in collection\r\n\t\t\t\tevent_changed = true;\r\n\t\t\t}\r\n\t\t//\tif (ce.start_date > ce.end_date) {\r\n\t\t//\t\tevs.splice(i--,1);\r\n\t\t//\t}\r\n\r\n\t\t\tvar re = this._safe_copy(ev); // remaining event, copy of original with modified start_date (making range more narrow)\r\n\t\t\tre._virtual = true;\r\n\t\t\tre.end_date = new Date(re.end_date);\r\n\t\t\tif (re.start_date < this._min_date)\r\n\t\t\t\tre.start_date = setDateTime(this._min_date, this.config.first_hour);// as we are starting only with whole hours\r\n\t\t\telse\r\n\t\t\t\tre.start_date = setDateTime(getNextDay(ev.start_date), this.config.first_hour);\r\n\r\n\t\t\tif (re.start_date < this._max_date && re.start_date < re.end_date) {\r\n\t\t\t\tif (event_changed){\r\n\t\t\t\t\tevs.splice(i+1,0,re);//insert part\r\n\t\t\t\t}else {\r\n\t\t\t\t\tevs[i--] = re;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tre._last_chunk = false;\r\n\t\t\t}else{\r\n\t\t\t\tce._last_chunk = true;\r\n\t\t\t\tce._drag_resize = true;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t// in case of all_timed pre_render is not applied to the original event\r\n\t\t// so we need to force redraw in case of dnd\r\n\t\tvar redraw = (this._drag_mode == 'move')?false:hold;\r\n\t\treturn prerender_events.call(this, evs, redraw);\r\n\r\n\r\n\t\tfunction isOvernightEvent(ev){\r\n\t\t\tvar next_day = getNextDay(ev.start_date);\r\n\t\t\treturn (+ev.end_date > +next_day);\r\n\t\t}\r\n\t\tfunction getNextDay(date){\r\n\t\t\tvar next_day = scheduler.date.add(date, 1, \"day\");\r\n\t\t\tnext_day = scheduler.date.date_part(next_day);\r\n\t\t\treturn next_day;\r\n\t\t}\r\n\t\tfunction setDateTime(date, hours){\r\n\t\t\tvar val = scheduler.date.date_part(new Date(date));\r\n\t\t\tval.setHours(hours);\r\n\t\t\treturn val;\r\n\t\t}\r\n\t};\r\n\tvar old_get_visible_events = scheduler.get_visible_events;\r\n\tscheduler.get_visible_events = function(only_timed){\r\n\t\tif (!(this.config.all_timed && this.config.multi_day))\r\n\t\t\treturn old_get_visible_events.call(this, only_timed);\r\n\t\treturn old_get_visible_events.call(this, false); // only timed = false\r\n\t};\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function (old_mode, old_date, mode, date) {\r\n\t\tscheduler._allow_dnd = (mode == \"day\" || mode == \"week\" || scheduler.getView(mode));\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler._is_main_area_event = function(ev){\r\n\t\treturn !!(ev._timed || this.config.all_timed === true || (this.config.all_timed == \"short\" && is_event_short(ev)) );\r\n\t};\r\n\r\n\tvar oldUpdate = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id){\r\n\t\t// full redraw(update_render=true) messes events order while dnd.\r\n\t\t// individual redraw(update_render=false) of multiday event, which happens on select/unselect, expands event to full width of the cell and can be fixes only with full redraw.\r\n\t\t// so for now full redraw is always enabled for not-dnd updates\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tvar fullRedrawNeeded;\r\n\t\tvar initial;\r\n\t\tif(ev) {\r\n\t\t\tfullRedrawNeeded = (scheduler.config.all_timed && !(scheduler.isOneDayEvent(scheduler._events[id]) || scheduler.getState().drag_id));\r\n\t\t\tif (fullRedrawNeeded) {\r\n\t\t\t\tinitial = scheduler.config.update_render;\r\n\t\t\t\tscheduler.config.update_render = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\toldUpdate.apply(scheduler, arguments);\r\n\r\n\t\tif(ev) {\r\n\t\t\tif (fullRedrawNeeded) {\r\n\t\t\t\tscheduler.config.update_render = initial;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\r\nvar temp_section;\r\nvar before;\r\n\r\nscheduler.config.collision_limit = 1;\r\n\r\nfunction _setTempSection(event_id) { // for custom views (matrix, timeline, units)\r\n\tvar checked_mode = scheduler._get_section_view();\r\n\tif(checked_mode && event_id){\r\n\t\ttemp_section = scheduler.getEvent(event_id)[scheduler._get_section_property()];\r\n\t}\r\n}\r\n\r\nscheduler.attachEvent(\"onBeforeDrag\",function(id){\r\n\t_setTempSection(id);\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onBeforeLightbox\",function(id){\r\n\tvar ev = scheduler.getEvent(id);\r\n\tbefore = [ev.start_date, ev.end_date];\r\n\t_setTempSection(id);\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventChanged\",function(id){\r\n\tif (!id || !scheduler.getEvent(id)) return true;\r\n\tvar ev = scheduler.getEvent(id);\r\n\tif (!scheduler.checkCollision(ev)){\r\n\t\tif (!before) return false;\r\n\t\tev.start_date = before[0];\r\n\t\tev.end_date = before[1];\r\n\t\tev._timed=this.isOneDayEvent(ev);\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onBeforeEventChanged\",function(ev,e,is_new){\r\n\treturn scheduler.checkCollision(ev);\r\n});\r\nscheduler.attachEvent(\"onEventAdded\",function(id,ev) {\r\n\tvar result = scheduler.checkCollision(ev);\r\n\tif (!result)\r\n\t\tscheduler.deleteEvent(id);\r\n});\r\nscheduler.attachEvent(\"onEventSave\",function(id, edited_ev, is_new){\r\n\tedited_ev = scheduler._lame_clone(edited_ev);\r\n\tedited_ev.id = id;\r\n\r\n\t//lightbox may not have 'time' section\r\n\tif(!(edited_ev.start_date && edited_ev.end_date)){\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tedited_ev.start_date = new Date(ev.start_date);\r\n\t\tedited_ev.end_date = new Date(ev.end_date);\r\n\t}\r\n\r\n\tif(edited_ev.rec_type){\r\n\t\tscheduler._roll_back_dates(edited_ev);\r\n\t}\r\n\treturn scheduler.checkCollision(edited_ev); // in case user creates event on one date but then edited it another\r\n});\r\n\r\nscheduler._check_sections_collision = function(first, second){\r\n\tvar map_to = scheduler._get_section_property();\r\n\tif (first[map_to] == second[map_to] && first.id != second.id)\r\n\t\treturn true;\r\n\treturn false;\r\n};\r\n\r\nscheduler.checkCollision = function(ev) {\r\n\tvar evs = [];\r\n\tvar collision_limit = scheduler.config.collision_limit;\r\n\r\n\tif (ev.rec_type) {\r\n\t\tvar evs_dates = scheduler.getRecDates(ev);\r\n\t\tfor(var k=0; k= collision_limit) {\r\n\r\n\t\t\tsingle = false;\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\tif ( evs.length >= collision_limit )\r\n\t\t\tsingle = false;\r\n\t}\r\n\tif (!single) {\r\n\t\tvar res = !scheduler.callEvent(\"onEventCollision\",[ev,evs]);\r\n\t\tif (!res) {\r\n\t\t\tev[map_to] = temp_section||ev[map_to]; // from _setTempSection for custom views\r\n\t\t}\r\n\t\treturn res;\r\n\t}\r\n\treturn single;\r\n\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.config.container_autoresize = true;\r\n\tscheduler.config.month_day_min_height = 90;\r\n\tscheduler.config.min_grid_size = 25;\r\n\tscheduler.config.min_map_size = 400;\r\n\r\n\tvar old_pre_render_event = scheduler._pre_render_events;\r\n\r\n\t//need for temporary disabling without modifying public config\r\n\tvar active = true;\r\n\tvar total_height = 0;\r\n\tvar multiday_height = 0;\r\n\r\n\tscheduler._pre_render_events = function(evs, hold) {\r\n\t\tif (!(scheduler.config.container_autoresize && active)) {\r\n\t\t\treturn old_pre_render_event.apply(this, arguments);\r\n\t\t}\r\n\r\n\t\tvar hb = this.xy.bar_height;\r\n\t\tvar h_old = this._colsS.heights;\r\n\t\tvar h = this._colsS.heights = [0, 0, 0, 0, 0, 0, 0];\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tif (!this._table_view)\r\n\t\t\tevs = this._pre_render_events_line(evs, hold); //ignore long events for now\r\n\t\telse\r\n\t\t\tevs = this._pre_render_events_table(evs, hold);\r\n\r\n\t\tif (this._table_view) {\r\n\t\t\tif (hold){\r\n\t\t\t\tthis._colsS.heights = h_old;\r\n\t\t\t} else {\r\n\t\t\t\tvar evl = data.firstChild;\r\n\t\t\t\tconst rows = evl.querySelectorAll(\".dhx_cal_month_row\");\r\n\t\t\t\tif (rows) {\r\n\t\t\t\t\tfor (var i = 0; i < rows.length; i++) {\r\n\t\t\t\t\t\th[i]++;\r\n\r\n\t\t\t\t\t\tif ((h[i]) * hb > this._colsS.height - this.xy.month_head_height) { // 22 - height of cell's header\r\n\t\t\t\t\t\t\t//we have overflow, update heights\r\n\t\t\t\t\t\t\tvar cells = rows[i].querySelectorAll(\".dhx_cal_month_cell\");\r\n\r\n\t\t\t\t\t\t\tvar cHeight = this._colsS.height - this.xy.month_head_height;\r\n\t\t\t\t\t\t\tif(this.config.max_month_events*1 !== this.config.max_month_events || h[i] <= this.config.max_month_events){\r\n\t\t\t\t\t\t\t\tcHeight = h[i] * hb;\r\n\t\t\t\t\t\t\t}else if( (this.config.max_month_events + 1) * hb > this._colsS.height - this.xy.month_head_height){\r\n\t\t\t\t\t\t\t\tcHeight = (this.config.max_month_events + 1) * hb;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\trows[i].style.height = (cHeight + this.xy.month_head_height) + \"px\";\r\n\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\tfor (var j = 0; j < cells.length; j++) {\r\n\t\t\t\t\t\t\t\tcells[j].childNodes[1].style.height = cHeight + \"px\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\th[i] = (h[i - 1] || 0) + cells[0].offsetHeight;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\th[i] = (h[i - 1] || 0) + rows[i].querySelectorAll(\".dhx_cal_month_cell\")[0].offsetHeight;\r\n\t\t\t\t\t}\r\n\t\t\t\t\th.unshift(0);\r\n\t\t\t\t\tif (evl.parentNode.offsetHeight < evl.parentNode.scrollHeight && !evl._h_fix) {\r\n\t\t\t\t\t\t//we have v-scroll, decrease last day cell\r\n\r\n\t\t\t\t\t\t// NO CHECK SHOULD BE MADE ON VERTICAL SCROLL\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (!evs.length && this._els[\"dhx_multi_day\"][0].style.visibility == \"visible\")\r\n\t\t\t\t\t\th[0] = -1;\r\n\t\t\t\t\tif (evs.length || h[0] == -1) {\r\n\t\t\t\t\t\t//shift days to have space for multiday events\r\n\t\t\t\t\t\t//var childs = evl.parentNode.childNodes;\r\n\t\t\t\t\t\tvar dh = ((h[0] + 1) * hb + 1); // +1 so multiday events would have 2px from top and 2px from bottom by default\r\n\t\t\t\t\t\tif(multiday_height != dh + 1) {\r\n\t\t\t\t\t\t\tthis._obj.style.height = (total_height - multiday_height + dh - 1) + \"px\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tdh += \"px\";\r\n\t\t\t\t\t\tconst navHeight = this._els[\"dhx_cal_navline\"][0].offsetHeight;\r\n\t\t\t\t\t\tconst headerHeight = this._els[\"dhx_cal_header\"][0].offsetHeight;\r\n\t\t\t\t\t\tdata.style.height = (this._obj.offsetHeight - navHeight - headerHeight - (this.xy.margin_top || 0)) + 'px';\r\n\t\t\t\t\t\tvar last = this._els[\"dhx_multi_day\"][0];\r\n\t\t\t\t\t\tlast.style.height = dh;\r\n\t\t\t\t\t\tlast.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\t\tlast = this._els[\"dhx_multi_day\"][1];\r\n\t\t\t\t\t\tlast.style.height = dh;\r\n\t\t\t\t\t\tlast.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\t\tif(last.style.visibility == \"hidden\"){\r\n\t\t\t\t\t\t\tlast.style.display = \"none\";\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tlast.style.display = \"\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tlast.className = h[0] ? \"dhx_multi_day_icon\" : \"dhx_multi_day_icon_small\";\r\n\t\t\t\t\t\tthis._dy_shift = (h[0] + 1) * hb;\r\n\t\t\t\t\t\th[0] = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn evs;\r\n\t};\r\n\r\n\tvar checked_divs = [\"dhx_cal_navline\", \"dhx_cal_header\", \"dhx_multi_day\", \"dhx_cal_data\"];\r\n\tvar updateContainterHeight = function(is_repaint) {\r\n\t\ttotal_height = 0;\r\n\t\tfor (var i = 0; i < checked_divs.length; i++) {\r\n\r\n\t\t\tvar className = checked_divs[i];\r\n\t\t\tvar checked_div = (scheduler._els[className]) ? scheduler._els[className][0] : null;\r\n\t\t\tvar height = 0;\r\n\t\t\tswitch (className) {\r\n\t\t\t\tcase \"dhx_cal_navline\":\r\n\t\t\t\tcase \"dhx_cal_header\":\r\n\t\t\t\t\theight = checked_div.offsetHeight;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"dhx_multi_day\":\r\n\t\t\t\t\theight = (checked_div) ? checked_div.offsetHeight - 1 : 0;\r\n\t\t\t\t\tmultiday_height = height;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"dhx_cal_data\":\r\n\t\t\t\t\tvar mode = scheduler.getState().mode;\r\n\r\n\t\t\t\t\tif(checked_div.childNodes[1] && mode != \"month\") {\r\n\t\t\t\t\t\tlet maxHeight = 0;\r\n\t\t\t\t\t\tfor(let i = 0; i < checked_div.childNodes.length; i++){\r\n\t\t\t\t\t\t\tif(checked_div.childNodes[i].offsetHeight > maxHeight){\r\n\t\t\t\t\t\t\t\tmaxHeight = checked_div.childNodes[i].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\theight = maxHeight;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\theight = Math.max(checked_div.offsetHeight - 1, checked_div.scrollHeight);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (mode == \"month\") {\r\n\t\t\t\t\t\tif (scheduler.config.month_day_min_height && !is_repaint) {\r\n\t\t\t\t\t\t\tvar rows_length = checked_div.querySelectorAll(\".dhx_cal_month_row\").length;\r\n\t\t\t\t\t\t\theight = rows_length * scheduler.config.month_day_min_height;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (is_repaint) {\r\n\t\t\t\t\t\t\tchecked_div.style.height = height + \"px\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (mode == \"year\"){\r\n\t\t\t\t\t\theight = 190 * scheduler.config.year_y;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(mode == \"agenda\"){\r\n\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\tif(checked_div.childNodes && checked_div.childNodes.length){\r\n\t\t\t\t\t\t\tfor(var j = 0; j < checked_div.childNodes.length; j++){\r\n\t\t\t\t\t\t\t\theight += checked_div.childNodes[j].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(height + 2 < scheduler.config.min_grid_size){\r\n\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (mode == \"week_agenda\"){\r\n\t\t\t\t\t\tvar min_height = scheduler.xy.week_agenda_scale_height + scheduler.config.min_grid_size,\r\n\t\t\t\t\t\t\tcur_height;\r\n\r\n\t\t\t\t\t\tvar column;\r\n\t\t\t\t\t\tfor(var k = 0; k < checked_div.childNodes.length; k++){\r\n\t\t\t\t\t\t\tcolumn = checked_div.childNodes[k];\r\n\t\t\t\t\t\t\tfor(var j = 0; j < column.childNodes.length; j++) {\r\n\t\t\t\t\t\t\t\tvar innerHeight = 0,\r\n\t\t\t\t\t\t\t\t\teventsContainer = column.childNodes[j].childNodes[1];\r\n\r\n\t\t\t\t\t\t\t\tfor(var g =0; g < eventsContainer.childNodes.length; g++){\r\n\t\t\t\t\t\t\t\t\tinnerHeight += eventsContainer.childNodes[g].offsetHeight;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tcur_height = innerHeight + scheduler.xy.week_agenda_scale_height;\r\n\t\t\t\t\t\t\t\tcur_height = (k == 1 && (j == 2 || j == 3)) ? cur_height * 2 : cur_height; // for last two cells;\r\n\r\n\t\t\t\t\t\t\t\tif (cur_height > min_height) {\r\n\t\t\t\t\t\t\t\t\tmin_height = cur_height;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\theight = min_height * 3;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(mode == \"map\") {\r\n\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\tvar evs = checked_div.querySelectorAll(\".dhx_map_line\");\r\n\r\n\t\t\t\t\t\tfor (var j = 0; j < evs.length; j++) {\r\n\t\t\t\t\t\t\theight += evs[j].offsetHeight;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (height + 2 < scheduler.config.min_map_size) {\r\n\t\t\t\t\t\t\theight = scheduler.config.min_map_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(scheduler._gridView) {\r\n\t\t\t\t\t\theight = 0;\r\n\r\n\t\t\t\t\t\tif (checked_div.childNodes[1].childNodes[0].childNodes && checked_div.childNodes[1].childNodes[0].childNodes.length) {\r\n\t\t\t\t\t\t\tvar evs = checked_div.childNodes[1].childNodes[0].childNodes[0].childNodes;\r\n\r\n\t\t\t\t\t\t\tfor (var j = 0; j < evs.length; j++) {\r\n\t\t\t\t\t\t\t\theight += evs[j].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\theight += 2;\r\n\r\n\t\t\t\t\t\t\tif(height < scheduler.config.min_grid_size){\r\n\t\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (scheduler.matrix && scheduler.matrix[mode]) {\r\n\t\t\t\t\t\tif (is_repaint) {\r\n\t\t\t\t\t\t\theight += 0;\r\n\t\t\t\t\t\t\tchecked_div.style.height = height + \"px\";\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\t\tvar cfg = scheduler.matrix[mode];\r\n\t\t\t\t\t\t\tvar rows = cfg.y_unit;\r\n\t\t\t\t\t\t\tfor(var r=0; r < rows.length; r++){\r\n\t\t\t\t\t\t\t\theight += cfg.getSectionHeight(rows[r].key);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t// Check and add extra height to avoid events hiding by the horizontal scrollbar\r\n\t\t\t\t\t\t\tif(scheduler.$container.clientWidth != scheduler.$container.scrollWidth){\r\n\t\t\t\t\t\t\t\theight += getScrollSize();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\theight -= 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (mode == \"day\" || mode == \"week\" || (scheduler._props && scheduler._props[mode])) {\r\n\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\theight += 1;\r\n\t\t\ttotal_height += height;\r\n\t\t}\r\n\t\tscheduler._obj.style.height = (total_height) + \"px\";\r\n\r\n\t\tif (!is_repaint)\r\n\t\t\tscheduler.updateView();\r\n\t};\r\n\r\n\tfunction callUpdate(){\r\n\t\tactive = false;\r\n\t\tscheduler.callEvent(\"onAfterSchedulerResize\", []);\r\n\t\tactive = true;\r\n\t}\r\n\r\n\tvar conditionalUpdateContainerHeight = function() {\r\n\t\tif(!(scheduler.config.container_autoresize && active))\r\n\t\t\treturn true;\r\n\r\n\t\tvar mode = scheduler.getState().mode;\r\n\r\n\t\tif(!mode) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tvar asyncRepaint = window.requestAnimationFrame || window.setTimeout;\r\n\t\tvar scrollTop = document.documentElement.scrollTop;\r\n\r\n\t\tasyncRepaint(function() {\r\n\t\t\tif(scheduler.$destroyed || !scheduler.$initialized){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tupdateContainterHeight();\r\n\t\t});\r\n\r\n\t\tif ( (scheduler.matrix && scheduler.matrix[mode]) || mode == \"month\") {\r\n\t\t\tasyncRepaint(function() {\r\n\t\t\t\tif(scheduler.$destroyed || !scheduler.$initialized){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tupdateContainterHeight(true);\r\n\t\t\t\tdocument.documentElement.scrollTop = scrollTop;\r\n\t\t\t\tcallUpdate();\r\n\t\t\t}, 1);\r\n\t\t}else{\r\n\t\t\tcallUpdate();\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function(){\r\n\t\tvar autosizeEnabled = scheduler.config.container_autoresize;\r\n\t\tif(!scheduler.xy.$original_scroll_width){\r\n\t\t\tscheduler.xy.$original_scroll_width = scheduler.xy.scroll_width;\r\n\t\t}\r\n\r\n\t\tscheduler.xy.scroll_width = autosizeEnabled ? 0 : scheduler.xy.$original_scroll_width;\r\n\r\n\t\tif(scheduler.matrix){\r\n\t\t\tfor(var i in scheduler.matrix){\r\n\t\t\t\tvar timeline = scheduler.matrix[i];\r\n\t\t\t\tif(!timeline.$original_section_autoheight){\r\n\t\t\t\t\ttimeline.$original_section_autoheight = timeline.section_autoheight;\r\n\t\t\t\t}\r\n\t\t\t\tif(autosizeEnabled){\r\n\t\t\t\t\ttimeline.section_autoheight = false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\ttimeline.section_autoheight = timeline.$original_section_autoheight;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onXLE\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventChanged\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventCreated\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventAdded\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventDeleted\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onAfterSchedulerResize\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onClearAll\", conditionalUpdateContainerHeight);\r\n\r\n\t//disable container autoresize when expanded\r\n\tscheduler.attachEvent(\"onBeforeExpand\", function(){\r\n\t\tactive = false;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeCollapse\", function(){\r\n\t\tactive = true;\r\n\t\treturn true;\r\n\t});\r\n\t// helper function\r\n\tfunction getScrollSize() {\r\n\t\tvar div = document.createElement(\"div\");\r\n\t\tdiv.style.cssText = \"visibility:hidden;position:absolute;left:-1000px;width:100px;padding:0px;margin:0px;height:110px;min-height:100px;overflow-y:scroll;\";\r\n\r\n\t\tdocument.body.appendChild(div);\r\n\t\tvar size = div.offsetWidth - div.clientWidth;\r\n\t\tdocument.body.removeChild(div);\r\n\t\treturn size;\r\n\t}\r\n\r\n\r\n}","export default function(scheduler){\r\n\tfunction setCookie(name,cookie_param,value) {\r\n\t\tvar str = name + \"=\" + value + (cookie_param?(\"; \"+cookie_param):\"\");\r\n\t\tdocument.cookie = str;\r\n\t}\r\n\tfunction getCookie(name) {\r\n\t\tvar search = name + \"=\";\r\n\t\tif (document.cookie.length > 0) {\r\n\t\t\tvar offset = document.cookie.indexOf(search);\r\n\t\t\tif (offset != -1) {\r\n\t\t\t\toffset += search.length;\r\n\t\t\t\tvar end = document.cookie.indexOf(\";\", offset);\r\n\t\t\t\tif (end == -1)\r\n\t\t\t\t\tend = document.cookie.length;\r\n\t\t\t\treturn document.cookie.substring(offset, end);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}\r\n\r\n\tfunction getCookieName(scheduler) {\r\n\t\treturn (scheduler._obj.id || \"scheduler\") + \"_settings\";\r\n\t}\r\n\r\n\tvar first = true;\r\n\tscheduler.attachEvent(\"onBeforeViewChange\",function(oldMode,oldDate,mode,date){\r\n\t\t// if Url plugin is enabled - explicit url values should have more priority than cookies\r\n\t\tif (first && scheduler._get_url_nav){\r\n\t\t\tvar urlNavigationPlugin = scheduler._get_url_nav();\r\n\t\t\tif(urlNavigationPlugin.date || urlNavigationPlugin.mode || urlNavigationPlugin.event){\r\n\t\t\t\tfirst = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar cookie = getCookieName(scheduler);\r\n\r\n\t\tif (first){\r\n\t\t\tfirst = false;\r\n\t\t\tvar schedulerCookie = getCookie(cookie);\r\n\t\t\tif (schedulerCookie){\r\n\r\n\t\t\t\tif(!scheduler._min_date){\r\n\t\t\t\t\t//otherwise scheduler will have incorrect date until timeout\r\n\t\t\t\t\t//it can cause js error with 'onMouseMove' handler of key_nav.js\r\n\t\t\t\t\tscheduler._min_date = date;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tschedulerCookie = unescape(schedulerCookie).split(\"@\");\r\n\t\t\t\tschedulerCookie[0] = this._helpers.parseDate(schedulerCookie[0]);\r\n\t\t\t\tvar view = this.isViewExists(schedulerCookie[1]) ? schedulerCookie[1] : mode,\r\n\t\t\t\t\tdate = !isNaN(+schedulerCookie[0]) ? schedulerCookie[0] : date;\r\n\r\n\t\t\t\twindow.setTimeout(function(){\r\n\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tscheduler.setCurrentView(date,view);\r\n\t\t\t\t},1);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", function (newMode , newDate){\r\n\t\tvar cookie = getCookieName(scheduler);\r\n\t\tvar text = escape(this._helpers.formatDate(newDate)+\"@\"+(newMode));\r\n\t\tsetCookie(cookie,\"expires=Sun, 31 Jan 9999 22:00:00 GMT\",text);\r\n\t});\r\n\r\n\t// As we are blocking first render above there could be a problem in case of dynamic loading and rendering of visible data in general ('from'/'to' won't be defined)\r\n\tvar old_load = scheduler._load;\r\n\tscheduler._load = function() {\r\n\t\tvar args = arguments;\r\n\r\n\t\tif (!scheduler._date) {\r\n\t\t\tvar that = this;\r\n\t\t\twindow.setTimeout(function() {\r\n\t\t\t\told_load.apply(that, args);\r\n\t\t\t},1);\r\n\t\t} else {\r\n\t\t\told_load.apply(this, args);\r\n\t\t}\r\n\t};\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Day Timeline\", scheduler.assert);\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Drag Between\", scheduler.assert);\r\n}","export default function(scheduler){\r\n/* global dhtmlXCombo */\r\nscheduler.form_blocks['combo']={\r\n\trender:function(sns) {\r\n\t\tif (!sns.cached_options)\r\n\t\t\tsns.cached_options = {};\r\n\t\tvar res = '';\r\n\t\tres += \"
\";\r\n\t\treturn res;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\t(function(){\r\n\t\t\tresetCombo();\r\n\t\t\tvar id = scheduler.attachEvent(\"onAfterLightbox\",function(){\r\n\t\t\t\t// otherwise destructor will never be called after form reset(e.g. in readonly event mode)\r\n\t\t\t\tresetCombo();\r\n\t\t\t\tscheduler.detachEvent(id);\r\n\t\t\t});\r\n\t\t\tfunction resetCombo(){\r\n\t\t\t\tif(node._combo && node._combo.DOMParent) {\r\n\t\t\t\t\tvar combo = node._combo;\r\n\t\t\t\t\tif(combo.unload){\r\n\t\t\t\t\t\tcombo.unload();\r\n\t\t\t\t\t}else if(combo.destructor){\r\n\t\t\t\t\t\tcombo.destructor();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// dhtmlxCombo 4.1.0 bug\r\n\t\t\t\t\tcombo.DOMParent = combo.DOMelem = null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})();\r\n\t\twindow.dhx_globalImgPath = config.image_path||'/';\r\n\t\tnode._combo = new dhtmlXCombo(node, config.name, node.offsetWidth-8);\r\n\t\tif (config.onchange)\r\n\t\t\tnode._combo.attachEvent(\"onChange\", config.onchange);\r\n\r\n\t\tif (config.options_height)\r\n\t\t\tnode._combo.setOptionHeight(config.options_height);\r\n\t\tvar combo = node._combo;\r\n\t\tcombo.enableFilteringMode(config.filtering, config.script_path||null, !!config.cache);\r\n\r\n\t\tif (!config.script_path) { // script-side filtration is used\r\n\t\t\tvar all_options = [];\r\n\t\t\tfor (var i = 0; i < config.options.length; i++) {\r\n\t\t\t\tvar option = config.options[i];\r\n\t\t\t\tvar single_option = [\r\n\t\t\t\t\toption.key,\r\n\t\t\t\t\toption.label,\r\n\t\t\t\t\toption.css\r\n\t\t\t\t];\r\n\t\t\t\tall_options.push(single_option);\r\n\t\t\t}\r\n\t\t\tcombo.addOption(all_options);\r\n\t\t\tif (ev[config.map_to]) {\r\n\t\t\t\tvar index = combo.getIndexByValue(ev[config.map_to]);\r\n\t\t\t\tcombo.selectOption(index);\r\n\t\t\t}\r\n\t\t} else { // server-side filtration is used\r\n\t\t\tvar selected_id = ev[config.map_to];\r\n\t\t\tif (selected_id) {\r\n\t\t\t\tif (config.cached_options[selected_id]) {\r\n\t\t\t\t\tcombo.addOption(selected_id, config.cached_options[selected_id]);\r\n\t\t\t\t\tcombo.disable(1);\r\n\t\t\t\t\tcombo.selectOption(0);\r\n\t\t\t\t\tcombo.disable(0);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tscheduler.ajax.get(config.script_path+\"?id=\"+selected_id+\"&uid=\"+scheduler.uid(), function(result){\r\n\t\t\t\t\t\tvar responseText = result.xmlDoc.responseText;\r\n\t\t\t\t\t\tvar label;\r\n\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\tvar res = JSON.parse(responseText);\r\n\t\t\t\t\t\t\tlabel = res.options[0].text;\r\n\t\t\t\t\t\t}catch(e){\r\n\t\t\t\t\t\t\tvar option = scheduler.ajax.xpath(\"//option\", result.xmlDoc)[0];\r\n\t\t\t\t\t\t\tlabel = option.childNodes[0].nodeValue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tconfig.cached_options[selected_id] = label;\r\n\t\t\t\t\t\tcombo.addOption(selected_id, label);\r\n\t\t\t\t\t\tcombo.disable(1);\r\n\t\t\t\t\t\tcombo.selectOption(0);\r\n\t\t\t\t\t\tcombo.disable(0);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tcombo.setComboValue(\"\");\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config) {\r\n\t\tvar selected_id = node._combo.getSelectedValue(); // value = key\r\n\t\tif (config.script_path) {\r\n\t\t\tconfig.cached_options[selected_id] = node._combo.getSelectedText();\r\n\t\t}\r\n\t\treturn selected_id;\r\n\t},\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\nscheduler.form_blocks['radio']={\r\n\trender:function(sns) {\r\n\t\tvar res = '';\r\n\t\tres += `
`;\r\n\t\tfor (var i=0; i\"+\" \"+sns.options[i].label+\"\";\r\n\t\t}\r\n\t\tres += \"
\";\r\n\r\n\t\treturn res;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\tvar radiobuttons = node.getElementsByTagName('input');\r\n\t\tfor (var i = 0; i < radiobuttons.length; i++) {\r\n\t\t\tradiobuttons[i].checked = false;\r\n\t\t\tvar checked_value = ev[config.map_to]||value;\r\n\t\t\tif (radiobuttons[i].value == checked_value) {\r\n\t\t\t\tradiobuttons[i].checked = true;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tvar radiobuttons = node.getElementsByTagName('input');\r\n\t\tfor(var i=0; i
';\r\n\t\telse\r\n\t\t\treturn '';\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\tnode=scheduler._lightbox.querySelector(`#${config.id}`);\r\n\t\tvar id = scheduler.uid();\r\n\t\tvar isChecked = (typeof config.checked_value != \"undefined\") ? value == config.checked_value : !!value;\r\n\t\tnode.className += \" dhx_cal_checkbox\";\r\n\t\tvar check_html = \"\";\r\n\t\tvar label_html = \"\";\r\n\t\tif (scheduler.config.wide_form){\r\n\t\t\tnode.innerHTML = label_html;\r\n\t\t\tnode.nextSibling.innerHTML=check_html;\r\n\t\t} else\r\n\t\t\tnode.innerHTML=check_html+label_html;\r\n\r\n\t\tif (config.handler) {\r\n\t\t\tvar checkbox = node.getElementsByTagName('input')[0];\r\n\t\t\tif(checkbox.$_eventAttached){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tcheckbox.$_eventAttached = true;\r\n\t\t\tscheduler.event(checkbox, \"click\", config.handler);\r\n\t\t\t//checkbox.onclick = config.handler;\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tnode=scheduler._lightbox.querySelector(`#${config.id}`);\r\n\t\tvar checkbox = node.getElementsByTagName('input')[0]; // moved to the header\r\n\t\tif (!checkbox)\r\n\t\t\tcheckbox = node.nextSibling.getElementsByTagName('input')[0];\r\n\t\treturn (checkbox.checked)?(config.checked_value||true):(config.unchecked_value||false);\r\n\t},\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.ext.fullscreen = {\r\n\ttoggleIcon: null\r\n};\r\n\r\nscheduler.expand = function() {\r\n\tif(!scheduler.callEvent(\"onBeforeExpand\", []))\r\n\t\treturn;\r\n\tvar t = scheduler._obj;\r\n\tdo {\r\n\t\tt._position = t.style.position || \"\";\r\n\t\tt.style.position = \"static\";\r\n\t} while ((t = t.parentNode) && t.style);\r\n\tt = scheduler._obj;\r\n\tt.style.position = \"absolute\";\r\n\tt._width = t.style.width;\r\n\tt._height = t.style.height;\r\n\tt.style.width = t.style.height = \"100%\";\r\n\tt.style.top = t.style.left = \"0px\";\r\n\r\n\tvar top = document.body;\r\n\ttop.scrollTop = 0;\r\n\r\n\ttop = top.parentNode;\r\n\tif (top)\r\n\t\ttop.scrollTop = 0;\r\n\tdocument.body._overflow = document.body.style.overflow || \"\";\r\n\tdocument.body.style.overflow = \"hidden\";\r\n\tscheduler._maximize();\r\n\tscheduler.callEvent(\"onExpand\", []);\r\n};\r\nscheduler.collapse = function() {\r\n\tif(!scheduler.callEvent(\"onBeforeCollapse\", []))\r\n\t\treturn;\r\n\tvar t = scheduler._obj;\r\n\tdo {\r\n\t\tt.style.position = t._position;\r\n\t} while ((t = t.parentNode) && t.style);\r\n\tt = scheduler._obj;\r\n\tt.style.width = t._width;\r\n\tt.style.height = t._height;\r\n\tdocument.body.style.overflow = document.body._overflow;\r\n\tscheduler._maximize();\r\n\tscheduler.callEvent(\"onCollapse\", []);\r\n};\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar t = document.createElement(\"div\");\r\n\tt.className = \"dhx_expand_icon\";\r\n\tscheduler.ext.fullscreen.toggleIcon = t;\r\n\tt.innerHTML = `\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t`;\r\n\tscheduler._obj.appendChild(t);\r\n\tscheduler.event(t, \"click\", function() {\r\n\t\tif (!scheduler.expanded)\r\n\t\t\tscheduler.expand(); else\r\n\t\t\tscheduler.collapse();\r\n\t});\r\n});\r\nscheduler._maximize = function() {\r\n\tthis.expanded = !this.expanded;\r\n\tif(this.expanded){\r\n\t\tthis.ext.fullscreen.toggleIcon.classList.add(\"dhx_expand_icon--expanded\");\r\n\t\t\r\n\t}else{\r\n\t\tthis.ext.fullscreen.toggleIcon.classList.remove(\"dhx_expand_icon--expanded\");\r\n\t}\r\n\t\r\n\t//scheduler.ext.fullscreen.toggleIcon.style.backgroundPosition = \"0 \" + (this.expanded ? \"0\" : \"18\") + \"px\";\r\n\r\n\tvar directions = ['left', 'top'];\r\n\tfor (var i = 0; i < directions.length; i++) {\r\n\t\t//var margin = scheduler.xy['margin_' + directions[i]];\r\n\t\tvar prev_margin = scheduler['_prev_margin_' + directions[i]];\r\n\t\tif (scheduler.xy['margin_' + directions[i]]) {\r\n\t\t\tscheduler['_prev_margin_' + directions[i]] = scheduler.xy['margin_' + directions[i]];\r\n\t\t\tscheduler.xy['margin_' + directions[i]] = 0;\r\n\t\t} else {\r\n\t\t\tif (prev_margin) {\r\n\t\t\t\tscheduler.xy['margin_' + directions[i]] = scheduler['_prev_margin_' + directions[i]];\r\n\t\t\t\tdelete scheduler['_prev_margin_' + directions[i]];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler.setCurrentView();\r\n};\r\n\r\n\r\n}\r\n","export default function(scheduler){\r\n\r\n\r\n(function(){\r\n\r\nfunction defaults(obj, std){\r\n\tfor (var key in std)\r\n\t\tif (!obj[key])\r\n\t\t\tobj[key] = std[key];\r\n\treturn obj;\r\n}\r\n\r\nfunction getElementSizes(element, scheduler) {\r\n\tvar sizes = {};\r\n\telement = scheduler._els[element];\r\n\tif (element && element[0]) {\r\n\t\tsizes.x = element[0].scrollWidth;\r\n\t\tsizes.y = element[0].scrollHeight;\r\n\t} else {\r\n\t\tsizes.x = 0;\r\n\t\tsizes.y = 0;\r\n\t}\r\n\treturn sizes;\r\n}\r\n\r\n//compatibility for new versions of scheduler\r\nif(!window.dhtmlxAjax){\r\n\twindow.dhtmlxAjax = {\r\n\t\tpost: function(url, data, callback){\r\n\t\t\treturn window.dhx4.ajax.post(url, data, callback);\r\n\t\t},\r\n\t\tget: function(url, callback){\r\n\t\t\treturn window.ajax.get(url, callback);\r\n\t\t}\r\n\t};\r\n}\r\n\r\nfunction add_export_methods(scheduler){\r\n\r\n\tscheduler.exportToPDF = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.pdf\",\r\n\t\t\tformat:\"A4\",\r\n\t\t\torientation:\"landscape\",\r\n\t\t\tdpi:96,\r\n\t\t\tzoom:1,\r\n\t\t\trtl: scheduler.config.rtl\r\n\t\t});\r\n\t\tconfig.html = this._export_html(config);\r\n\t\tconfig.mode = this.getState().mode;\r\n\t\tthis._send_to_export(config, \"pdf\");\r\n\t};\r\n\r\n\tscheduler.exportToPNG = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.png\",\r\n\t\t\tformat:\"A4\",\r\n\t\t\torientation:\"landscape\",\r\n\t\t\tdpi:96,\r\n\t\t\tzoom:1,\r\n\t\t\trtl: scheduler.config.rtl\r\n\t\t});\r\n\t\tconfig.html = this._export_html(config);\r\n\t\tconfig.mode = this.getState().mode;\r\n\t\tthis._send_to_export(config, \"png\");\r\n\t};\r\n\r\n\tscheduler.exportToICal = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.ical\",\r\n\t\t\tdata:this._serialize_plain(null, config)\r\n\t\t});\r\n\t\tthis._send_to_export(config, \"ical\");\r\n\t};\r\n\r\n\tscheduler.exportToExcel = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.xlsx\",\r\n\t\t\ttitle:\"Events\",\r\n\t\t\tdata:this._serialize_plain( this.templates.xml_format, config),\r\n\t\t\tcolumns:this._serialize_columns()\r\n\t\t});\r\n\t\tthis._send_to_export(config, \"excel\");\r\n\t};\r\n\r\n\tscheduler._ajax_to_export = function(data, type, callback){\r\n\t\tdelete data.callback;\r\n\t\tvar url = data.server || \"https://export.dhtmlx.com/scheduler\";\r\n\r\n\t\twindow.dhtmlxAjax.post(url,\r\n\t\t\t\"type=\"+type+\"&store=1&data=\"+encodeURIComponent(JSON.stringify(data)),\r\n\t\t\tfunction(loader){\r\n\t\t\t\tvar fail = loader.xmlDoc.status > 400;\r\n\t\t\t\tvar info = null;\r\n\r\n\t\t\t\tif (!fail){\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\tinfo = JSON.parse(loader.xmlDoc.responseText);\r\n\t\t\t\t\t}catch(e){}\r\n\t\t\t\t}\r\n\t\t\t\tcallback(info);\r\n\t\t\t}\r\n\t\t);\r\n\t};\r\n\r\n\tscheduler._plain_export_copy = function(source, format){\r\n\t\tvar target = {};\r\n\t\tfor (var key in source)\r\n\t\t\ttarget[key] = source[key];\r\n\r\n\t\ttarget.start_date = format(target.start_date);\r\n\t\ttarget.end_date = format(target.end_date);\r\n\t\ttarget.$text = this.templates.event_text(source.start_date, source.end_date, source);\r\n\r\n\t\treturn target;\r\n\t};\r\n\r\n\tscheduler._serialize_plain = function(format, config){\r\n\t\tformat = format || scheduler.date.date_to_str(\"%Y%m%dT%H%i%s\", true);\r\n\r\n\t\tvar events;\r\n\t\tif (config && config.start && config.end)\r\n\t\t\tevents = scheduler.getEvents(config.start, config.end);\r\n\t\telse\r\n\t\t\tevents = scheduler.getEvents();\r\n\r\n\t\tvar data = [];\r\n\t\tfor (var i = 0; i< events.length; i++)\r\n\t\t\tdata[i] = this._plain_export_copy(events[i], format);\r\n\r\n\t\treturn data;\r\n\t};\r\n\r\n\tscheduler._serialize_columns = function(){\r\n\t\treturn [\r\n\t\t\t{ id:\"start_date\", header:\"Start Date\", width:30 },\r\n\t\t\t{ id:\"end_date\", header:\"End Date\", width:30 },\r\n\t\t\t{ id:\"$text\", header:\"Text\", width:100 }\r\n\t\t];\r\n\t};\r\n\r\n\tscheduler._send_to_export = function(data, type){\r\n\t\tif(!data.version){\r\n\t\t\tdata.version = scheduler.version;\r\n\t\t}\r\n\r\n\t\tif(!data.skin){\r\n\t\t\tdata.skin = scheduler.skin;\r\n\t\t}\r\n\r\n\t\tif (data.callback)\r\n\t\t\t\treturn scheduler._ajax_to_export(data, type, data.callback);\r\n\r\n\t\tvar form = this._create_hidden_form();\r\n\r\n\t\tform.firstChild.action = data.server || \"https://export.dhtmlx.com/scheduler\";\r\n\t\tform.firstChild.childNodes[0].value = JSON.stringify(data);\r\n\t\tform.firstChild.childNodes[1].value = type;\r\n\t\tform.firstChild.submit();\r\n\t};\r\n\r\n\tscheduler._create_hidden_form = function(){\r\n\t\tif (!this._hidden_export_form){\r\n\t\t\tvar t = this._hidden_export_form = document.createElement(\"div\");\r\n\t\t\tt.style.display = \"none\";\r\n\t\t\tt.innerHTML = \"
\";\r\n\t\t\tdocument.body.appendChild(t);\r\n\t\t}\r\n\t\treturn this._hidden_export_form;\r\n\t};\r\n\r\n\tscheduler._get_export_size = function(format, orientation, zoom, dpi, header, footer, scales) {\r\n\r\n\t\tdpi = parseInt(dpi)/25.4 || 4;\r\n\r\n\t\tvar sizes = {\r\n\t\t\t\"A5\":{ x:148, y:210 },\r\n\t\t\t\"A4\":{ x:210, y:297 },\r\n\t\t\t\"A3\":{ x:297, y:420 },\r\n\t\t\t\"A2\":{ x:420, y:594 },\r\n\t\t\t\"A1\":{ x:594, y:841 },\r\n\t\t\t\"A0\":{ x:841, y:1189 }\r\n\t\t};\r\n\r\n\t\tvar dataX = getElementSizes(\"dhx_cal_data\", this).x;\r\n\t\tvar dataY = getElementSizes(\"dhx_cal_data\", this).y;\r\n\t\tvar headY = getElementSizes(\"dhx_cal_header\", this).y;\r\n\t\tvar multY = getElementSizes(\"dhx_multi_day\", this).y;\r\n\r\n\t\tvar cSize = {\r\n\t\t\ty: dataY + headY + multY\r\n\t\t};\r\n\r\n\t\tif (format === \"full\") {\r\n\t\t\tcSize.x = dataX;\r\n\t\t} else {\r\n\t\t\tcSize.x = Math.floor( (orientation === \"landscape\" ? sizes[format].y : sizes[format].x) * dpi );\r\n\t\t}\r\n\r\n\t\tif (scales) {\r\n\t\t\tcSize.x *= (parseFloat(scales.x) || 1);\r\n\t\t\tcSize.y *= (parseFloat(scales.y) || 1);\r\n\t\t}\r\n\r\n\t\treturn cSize;\r\n\t};\r\n\r\n\tfunction getTimeline() {\r\n\t\tvar mode = scheduler.getState().mode;\r\n\t\tif (scheduler.matrix && scheduler.matrix[mode]) {\r\n\t\t\treturn scheduler.matrix[mode];\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n\r\n\tfunction getInitialSizes() {\r\n\t\tvar smartRendering = undefined,\r\n\t\t\tscrollable = undefined;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (timeline) {\r\n\t\t\tscrollable = timeline.scrollable;\r\n\t\t\tsmartRendering = timeline.smart_rendering;\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tnav_height: scheduler.xy.nav_height,\r\n\t\t\tscroll_width: scheduler.xy.scroll_width,\r\n\t\t\tstyle_width: scheduler._obj.style.width,\r\n\t\t\tstyle_height: scheduler._obj.style.height,\r\n\t\t\ttimeline_scrollable: scrollable,\r\n\t\t\ttimeline_smart_rendering: smartRendering\r\n\t\t};\r\n\t}\r\n\r\n\tfunction setExportSizes(size, initialSizes) {\r\n\t\tscheduler._obj.style.width = size.x + \"px\";\r\n\t\tscheduler._obj.style.height = size.y + \"px\";\r\n\r\n\t\tscheduler.xy.nav_height = 0;\r\n\t\tscheduler.xy.scroll_width = 0;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (initialSizes.timeline_scrollable || initialSizes.timeline_smart_rendering) {\r\n\r\n\t\t\ttimeline.scrollable = false;\r\n\t\t\ttimeline.smart_rendering = false;\r\n\t\t}\r\n\t}\r\n\r\n\tfunction setInitialSizes(initialSizes) {\r\n\t\tscheduler.xy.scroll_width = initialSizes.scroll_width;\r\n\t\tscheduler.xy.nav_height = initialSizes.nav_height;\r\n\t\tscheduler._obj.style.width = initialSizes.style_width;\r\n\t\tscheduler._obj.style.height = initialSizes.style_height;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (initialSizes.timeline_scrollable || initialSizes.timeline_smart_rendering) {\r\n\t\t\ttimeline.scrollable = initialSizes.timeline_scrollable;\r\n\t\t\ttimeline.smart_rendering = initialSizes.timeline_smart_rendering;\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler._export_html = function (obj) {\r\n\t\tvar initialSizes = getInitialSizes();\r\n\t\tvar size = scheduler._get_export_size(obj.format, obj.orientation, obj.zoom, obj.dpi, obj.header, obj.footer, obj.scales);\r\n\r\n\t\tvar html = \"\";\r\n\t\ttry {\r\n\t\t\tsetExportSizes(size, initialSizes);\r\n\t\t\tscheduler.setCurrentView();\r\n\t\t\thtml = scheduler._obj.innerHTML;\r\n\t\t} catch (e) {\r\n\r\n\t\t\t// eslint-disable-next-line no-console\r\n\t\t\tconsole.error(e);\r\n\t\t} finally {\r\n\t\t\tsetInitialSizes(initialSizes);\r\n\t\t\tscheduler.setCurrentView();\r\n\t\t}\r\n\r\n\t\treturn html;\r\n\t};\r\n\r\n}\r\n\r\nadd_export_methods(scheduler);\r\n\r\n\r\n})();\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Grid\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\tvar els = document.body.getElementsByTagName(\"DIV\");\r\n\tfor (var i=0; i < els.length; i++) {\r\n\t\tvar cs = els[i].className||\"\";\r\n\t\tcs = cs.split(\":\");\r\n\t\tif (cs.length == 2 && cs[0] == \"template\"){\r\n\t\t\tvar code = \"return \\\"\"+(els[i].innerHTML||\"\").replace(/\\\\/g, \"\\\\\\\\\").replace(/\"/g,\"\\\\\\\"\").replace(/[\\n\\r]+/g,\"\")+\"\\\";\";\r\n\t\t\tcode = unescape(code).replace(/\\{event\\.([a-z]+)\\}/g,function(all,mask){\r\n\t\t\t\treturn '\"+ev.'+mask+'+\"';\r\n\t\t\t});\r\n\t\t\tscheduler.templates[cs[1]]=Function(\"start\",\"end\",\"ev\",code);\r\n\t\t\tels[i].style.display='none';\r\n\t\t}\r\n\t}\r\n});\r\n\r\n}","import keyboard_shortcuts from \"./keyboard_navigation/common/keyboard_shortcuts\";\r\nimport eventhandler from \"./keyboard_navigation/common/eventhandler\";\r\nimport trap_modal_focus from \"./keyboard_navigation/common/trap_modal_focus\";\r\nimport marker from \"./keyboard_navigation/marker\";\r\nimport scheduler_node from \"./keyboard_navigation/elements/scheduler_node\";\r\nimport nav_node from \"./keyboard_navigation/elements/nav_node\";\r\nimport header_cell from \"./keyboard_navigation/elements/header_cell\";\r\nimport event from \"./keyboard_navigation/elements/event\";\r\nimport time_slot from \"./keyboard_navigation/elements/time_slot\";\r\nimport minical_button from \"./keyboard_navigation/elements/minical_button\";\r\nimport minical_cell from \"./keyboard_navigation/elements/minical_cell\";\r\nimport data_area from \"./keyboard_navigation/elements/data_area\";\r\nimport modals from \"./keyboard_navigation/modals\";\r\nimport core from \"./keyboard_navigation/core\";\r\nimport key_nav_legacy from \"./keyboard_navigation/key_nav_legacy\";\r\n\r\n\r\nimport scheduler_handlers from \"./keyboard_navigation/scheduler_handlers\";\r\nimport minical_handlers from \"./keyboard_navigation/minical_handlers\";\r\n\r\nexport default function(scheduler){\r\n\t\tscheduler.config.key_nav = true;\r\n\t\tscheduler.config.key_nav_step = 30;\r\n\t\tscheduler.addShortcut = function(shortcut, handler, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tscopeObject.prototype.bind(shortcut, handler);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.getShortcutHandler = function(shortcut, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tvar commands = scheduler.$keyboardNavigation.shortcuts.parse(shortcut);\r\n\t\t\t\tif(commands.length){\r\n\t\t\t\t\treturn scopeObject.prototype.findHandler(commands[0]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.removeShortcut = function(shortcut, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tscopeObject.prototype.unbind(shortcut);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.focus = function(){\r\n\t\t\tif(!scheduler.config.key_nav){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar disp = scheduler.$keyboardNavigation.dispatcher;\r\n\t\t\tdisp.enable();\r\n\t\t\tvar activeNode = disp.getActiveNode();\r\n\t\t\tif(!activeNode || activeNode instanceof scheduler.$keyboardNavigation.MinicalButton || activeNode instanceof scheduler.$keyboardNavigation.MinicalCell){\r\n\t\t\t\tdisp.setDefaultNode();\r\n\t\t\t}else{\r\n\t\t\t\tdisp.focusNode(disp.getActiveNode());\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfunction getScope(mode){\r\n\t\t\tvar scopes = {\r\n\t\t\t\t\"minicalButton\":scheduler.$keyboardNavigation.MinicalButton,\r\n\t\t\t\t\"minicalDate\":scheduler.$keyboardNavigation.MinicalCell,\r\n\t\t\t\t\"scheduler\":scheduler.$keyboardNavigation.SchedulerNode,\r\n\t\t\t\t\"dataArea\": scheduler.$keyboardNavigation.DataArea,\r\n\t\t\t\t\"timeSlot\": scheduler.$keyboardNavigation.TimeSlot,\r\n\t\t\t\t\"event\": scheduler.$keyboardNavigation.Event\r\n\t\t\t};\r\n\r\n\t\t\tvar searchMap = {};\r\n\t\t\tfor(var i in scopes)\r\n\t\t\t\tsearchMap[i.toLowerCase()] = scopes[i];\r\n\r\n\t\t\tmode = (mode + \"\").toLowerCase();\r\n\r\n\t\t\treturn searchMap[mode] || scopes.scheduler;\r\n\t\t}\r\n\r\n\t\tscheduler.$keyboardNavigation = {};\r\n\r\n\t\tscheduler._compose = function(){\r\n\t\t\tvar parts = Array.prototype.slice.call(arguments, 0);\r\n\t\t\tvar res = {};\r\n\t\t\tfor(var i = 0; i < parts.length; i++){\r\n\t\t\t\tvar obj = parts[i];\r\n\t\t\t\tif(typeof obj == \"function\"){\r\n\t\t\t\t\tobj = new obj();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor(var p in obj){\r\n\t\t\t\t\tres[p] = obj[p];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn res;\r\n\t\t};\r\n\r\n\t\tkeyboard_shortcuts(scheduler);\r\n\t\teventhandler(scheduler);\r\n\t\ttrap_modal_focus(scheduler);\r\n\t\tmarker(scheduler);\r\n\t\tscheduler_node(scheduler);\r\n\t\tnav_node(scheduler);\r\n\t\theader_cell(scheduler);\r\n\t\tevent(scheduler);\r\n\t\ttime_slot(scheduler);\r\n\t\tminical_button(scheduler);\r\n\t\tminical_cell(scheduler);\r\n\t\tdata_area(scheduler);\r\n\t\tmodals(scheduler);\r\n\t\tcore(scheduler);\r\n\t\tkey_nav_legacy(scheduler);\r\n\r\n\t\t(function(){\r\n\t\t\tscheduler_handlers(scheduler);\r\n\t\t\tminical_handlers(scheduler);\r\n\r\n\t\t\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\t\t\tscheduler.$keyboardNavigation.attachSchedulerHandlers();\r\n\r\n\t\t\tif(scheduler.renderCalendar){\r\n\t\t\t\t// if minical ext loaded before key nav ext - patch it now\r\n\t\t\t\tscheduler.$keyboardNavigation.patchMinicalendar();\r\n\t\t\t}else{\r\n\t\t\t\t// otherwise - wait until everything is loaded and try again\r\n\t\t\t\tvar attachOnce = scheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\t\t\t\tscheduler.detachEvent(attachOnce);\r\n\t\t\t\t\tscheduler.$keyboardNavigation.patchMinicalendar();\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\tfunction isSchedulerSelected(){\r\n\t\t\t\tif(!scheduler.config.key_nav) return;\r\n\r\n\t\t\t\tvar enable;\r\n\t\t\t\tvar focusElement = document.activeElement;\r\n\t\t\t\t// halt key nav when focus is outside scheduler or in quick info popup\r\n\t\t\t\tif(!focusElement || scheduler.utils.dom.locateCss(focusElement, \"dhx_cal_quick_info\", false)){\r\n\t\t\t\t\tenable = false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tenable = scheduler.$keyboardNavigation.isChildOf(focusElement, scheduler.$container) || scheduler.$keyboardNavigation.isMinical(focusElement);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn enable;\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\tfunction changeState(enable){\r\n\t\t\t\tif(enable && !dispatcher.isEnabled()){\r\n\t\t\t\t\tdispatcher.enable();\r\n\t\t\t\t}else if(!enable && dispatcher.isEnabled()){\r\n\t\t\t\t\tdispatcher.disable();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tconst intervalId = setInterval(function(){\r\n\t\t\t\tif(!scheduler.$container || !scheduler.$keyboardNavigation.isChildOf(scheduler.$container, document.body)){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar enable = isSchedulerSelected();\r\n\r\n\t\t\t\tif(enable){\r\n\t\t\t\t\tchangeState(enable);\r\n\t\t\t\t}else if(!enable && dispatcher.isEnabled()){\r\n\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// doublecheck in case checking is done in handler before focus element is repainted\r\n\t\t\t\t\t\tif(scheduler.config.key_nav){\r\n\t\t\t\t\t\t\tchangeState(isSchedulerSelected());\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tscheduler.$container.removeAttribute(\"tabindex\");\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}, 100);\r\n\t\t\t\t}\r\n\t\t\t}, 500);\r\n\t\t\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\t\t\tclearInterval(intervalId);\r\n\t\t\t});\r\n\t\t})();\r\n\t}\r\n\r\n\r\n","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.shortcuts = {\r\n\tcreateCommand: function(){\r\n\t\treturn {\r\n\t\t\tmodifiers:{\r\n\t\t\t\t\"shift\": false,\r\n\t\t\t\t\"alt\": false,\r\n\t\t\t\t\"ctrl\": false,\r\n\t\t\t\t\"meta\": false\r\n\t\t\t},\r\n\t\t\tkeyCode: null\r\n\t\t};\r\n\t},\r\n\tparse: function(shortcut){\r\n\t\tvar commands = [];\r\n\r\n\t\tvar expr = this.getExpressions(this.trim(shortcut));\r\n\t\tfor(var i = 0; i < expr.length; i++){\r\n\t\t\tvar words = this.getWords(expr[i]);\r\n\r\n\t\t\tvar command = this.createCommand();\r\n\r\n\t\t\tfor(var j = 0; j < words.length; j++){\r\n\t\t\t\tif(this.commandKeys[words[j]]){\r\n\t\t\t\t\tcommand.modifiers[words[j]] = true;\r\n\t\t\t\t}else if(this.specialKeys[words[j]]){\r\n\t\t\t\t\tcommand.keyCode = this.specialKeys[words[j]];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcommand.keyCode = words[j].charCodeAt(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tcommands.push(command);\r\n\t\t}\r\n\t\treturn commands;\r\n\t},\r\n\r\n\tgetCommandFromEvent: function(domEvent){\r\n\t\tvar command = this.createCommand();\r\n\t\tcommand.modifiers.shift = !!domEvent.shiftKey;\r\n\t\tcommand.modifiers.alt = !!domEvent.altKey;\r\n\t\tcommand.modifiers.ctrl = !!domEvent.ctrlKey;\r\n\t\tcommand.modifiers.meta = !!domEvent.metaKey;\r\n\t\tcommand.keyCode = domEvent.which || domEvent.keyCode;\r\n\r\n\t\tif(command.keyCode >= 96 && command.keyCode <= 105){\r\n\t\t\t// numpad keys 96-105 -> 48-57\r\n\t\t\tcommand.keyCode -= 48;//convert numpad number code to regular number code\r\n\t\t}\r\n\r\n\t\tvar printableKey = String.fromCharCode(command.keyCode );\r\n\t\tif(printableKey){\r\n\t\t\tcommand.keyCode = printableKey.toLowerCase().charCodeAt(0);\r\n\t\t}\r\n\t\treturn command;\r\n\t},\r\n\r\n\tgetHashFromEvent: function(domEvent){\r\n\t\treturn this.getHash(this.getCommandFromEvent(domEvent));\r\n\t},\r\n\r\n\tgetHash: function(command){\r\n\t\tvar parts = [];\r\n\t\tfor(var i in command.modifiers){\r\n\t\t\tif(command.modifiers[i]){\r\n\t\t\t\tparts.push(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tparts.push(command.keyCode);\r\n\r\n\t\treturn parts.join(this.junctionChar);\r\n\t},\r\n\r\n\tgetExpressions: function(shortcut){\r\n\t\treturn shortcut.split(this.junctionChar);\r\n\t},\r\n\tgetWords: function(term){\r\n\t\treturn term.split(this.combinationChar);\r\n\t},\r\n\ttrim: function(shortcut){\r\n\t\treturn shortcut.replace(/\\s/g, \"\");\r\n\t},\r\n\tjunctionChar:\",\",\r\n\tcombinationChar:\"+\",\r\n\tcommandKeys:{\r\n\t\t\"shift\": 16,\r\n\t\t\"alt\": 18,\r\n\t\t\"ctrl\": 17,\r\n\t\t\"meta\": true\r\n\t},\r\n\tspecialKeys:{\r\n\t\t\"backspace\": 8,\r\n\t\t\"tab\": 9,\r\n\t\t\"enter\": 13,\r\n\t\t\"esc\": 27,\r\n\t\t\"space\": 32,\r\n\t\t\"up\": 38,\r\n\t\t\"down\": 40,\r\n\t\t\"left\": 37,\r\n\t\t\"right\": 39,\r\n\t\t\"home\": 36,\r\n\t\t\"end\": 35,\r\n\t\t\"pageup\": 33,\r\n\t\t\"pagedown\": 34,\r\n\t\t\"delete\": 46,\r\n\t\t\"insert\": 45,\r\n\t\t\"plus\":107,\r\n\t\t\"f1\": 112,\r\n\t\t\"f2\": 113,\r\n\t\t\"f3\": 114,\r\n\t\t\"f4\": 115,\r\n\t\t\"f5\": 116,\r\n\t\t\"f6\": 117,\r\n\t\t\"f7\": 118,\r\n\t\t\"f8\": 119,\r\n\t\t\"f9\": 120,\r\n\t\t\"f10\": 121,\r\n\t\t\"f11\": 122,\r\n\t\t\"f12\": 123\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.EventHandler = {\r\n\t_handlers: null,\r\n\tfindHandler: function(command){\r\n\t\tif(!this._handlers) this._handlers = {};\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\t\tvar hash = shortcuts.getHash(command);\r\n\r\n\t\treturn this._handlers[hash];\r\n\t},\r\n\r\n\tdoAction: function(command, e){\r\n\t\tvar handler = this.findHandler(command);\r\n\t\tif(handler){\r\n\t\t\thandler.call(this, e);\r\n\r\n\t\t\tif (e.preventDefault) e.preventDefault();\r\n\t\t\telse e.returnValue = false;\r\n\r\n\t\t}\r\n\t},\r\n\tbind: function(shortcut, handler){\r\n\t\tif(!this._handlers) this._handlers = {};\r\n\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\r\n\t\tvar commands = shortcuts.parse(shortcut);\r\n\t\tfor(var i = 0; i < commands.length; i++){\r\n\t\t\tthis._handlers[shortcuts.getHash(commands[i])] = handler;\r\n\t\t}\r\n\t},\r\n\tunbind: function(shortcut){\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\r\n\t\tvar commands = shortcuts.parse(shortcut);\r\n\t\tfor(var i = 0; i < commands.length; i++){\r\n\t\t\tif(this._handlers[shortcuts.getHash(commands[i])]){\r\n\t\t\t\tdelete this._handlers[shortcuts.getHash(commands[i])];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tbindAll: function(map){\r\n\t\tfor(var i in map){\r\n\t\t\tthis.bind(i, map[i]);\r\n\t\t}\r\n\t},\r\n\tinitKeys: function(){\r\n\t\tif(!this._handlers)\r\n\t\t\tthis._handlers = {};\r\n\t\tif(this.keys){\r\n\t\t\tthis.bindAll(this.keys);\r\n\t\t}\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n(function(){\r\n\tscheduler.$keyboardNavigation.getFocusableNodes = scheduler._getFocusableNodes;\r\n\r\n\tscheduler.$keyboardNavigation.trapFocus = function trapFocus(root, e){\r\n\t\tif(e.keyCode != 9) return false;\r\n\r\n\t\tvar focusable = scheduler.$keyboardNavigation.getFocusableNodes(root);\r\n\t\tvar currentFocus = document.activeElement;\r\n\t\tvar currentIndex = -1;\r\n\t\tfor(var i = 0; i < focusable.length; i++){\r\n\t\t\tif(focusable[i] == currentFocus){\r\n\t\t\t\tcurrentIndex = i;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar nextIndex, nextItem;\r\n\t\tif(e.shiftKey){\r\n\r\n\t\t\t// back tab\r\n\t\t\t// go to the last element if we focused on the first\r\n\t\t\tnextIndex = (currentIndex <= 0) ? (focusable.length - 1) : (currentIndex - 1);\r\n\r\n\t\t\tnextItem = focusable[nextIndex];\r\n\t\t\tif(nextItem){\r\n\t\t\t\tnextItem.focus();\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\t// forward tab\r\n\t\t\t// forward tab from last element should go back to the first element\r\n\t\t\tnextIndex = (currentIndex >= focusable.length - 1) ? 0 : (currentIndex + 1);\r\n\t\t\tnextItem = focusable[nextIndex];\r\n\t\t\tif(nextItem){\r\n\t\t\t\tnextItem.focus();\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t};\r\n})();\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.marker = {\r\n\tclear: function(){\r\n\t\tvar divs = scheduler.$container.querySelectorAll(\".dhx_focus_slot\");\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tdivs[i].parentNode.removeChild(divs[i]);\r\n\t\t}\r\n\t},\r\n\tcreateElement: function(){\r\n\t\tvar element = document.createElement(\"div\");\r\n\t\telement.setAttribute(\"tabindex\", -1);\r\n\t\telement.className = \"dhx_focus_slot\";\r\n\t\treturn element;\r\n\t},\r\n\r\n\trenderMultiple: function(start, end, method){\r\n\t\tvar divs = [];\r\n\t\tvar currentStart = new Date(start);\r\n\t\tvar currentEnd = new Date(Math.min(end.valueOf(), scheduler.date.add(scheduler.date.day_start(new Date(start)), 1, \"day\").valueOf()));\r\n\t\twhile(currentStart.valueOf() < end.valueOf()){\r\n\r\n\t\t\tdivs = divs.concat(method.call(this, currentStart, new Date(Math.min(currentEnd.valueOf(), end.valueOf()))));\r\n\t\t\tcurrentStart = scheduler.date.day_start(scheduler.date.add(currentStart, 1, \"day\"));\r\n\r\n\t\t\tcurrentEnd = scheduler.date.day_start(scheduler.date.add(currentStart, 1, \"day\"));\r\n\t\t\tcurrentEnd = new Date(Math.min(currentEnd.valueOf(), end.valueOf()));\r\n\t\t}\r\n\r\n\t\treturn divs;\r\n\t},\r\n\r\n\r\n\trender: function(start, end, section){\r\n\t\tthis.clear();\r\n\t\tvar divs = [];\r\n\r\n\t\tvar modes = scheduler.$keyboardNavigation.TimeSlot.prototype._modes;\r\n\t\tvar view = scheduler.$keyboardNavigation.TimeSlot.prototype._getMode();\r\n\t\tswitch (view){\r\n\t\t\tcase modes.units:\r\n\t\t\t\tdivs = this.renderVerticalMarker(start, end, section);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.timeline:\r\n\t\t\t\tdivs = this.renderTimelineMarker(start, end, section);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.year:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderYearMarker));\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.month:\r\n\t\t\t\tdivs = this.renderMonthMarker(start, end);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.weekAgenda:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderWeekAgendaMarker));\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.list:\r\n\t\t\t\tdivs = this.renderAgendaMarker(start, end);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.dayColumns:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderVerticalMarker));\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tthis.addWaiAriaLabel(divs, start, end, section);\r\n\t\tthis.addDataAttributes(divs, start, end, section);\r\n\r\n\t\tfor(var i = divs.length - 1; i >= 0; i--){\r\n\t\t\tif(divs[i].offsetWidth){\r\n\t\t\t\treturn divs[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t},\r\n\r\n\taddDataAttributes: function(divs, start, end, section){\r\n\t\tvar dateToStr = scheduler.date.date_to_str(scheduler.config.api_date);\r\n\r\n\t\tvar from = dateToStr(start),\r\n\t\t\tto = dateToStr(end);\r\n\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tdivs[i].setAttribute(\"data-start-date\", from);\r\n\t\t\tdivs[i].setAttribute(\"data-end-date\", to);\r\n\t\t\tif(section){\r\n\t\t\t\tdivs[i].setAttribute(\"data-section\", section);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\taddWaiAriaLabel: function(divs, start, end, section){\r\n\t\tvar label = \"\";\r\n\t\tvar state = scheduler.getState();\r\n\t\tvar mode = state.mode;\r\n\r\n\t\tvar dateTimeLabel = false;\r\n\r\n\t\tlabel += scheduler.templates.day_date(start);\r\n\r\n\t\tif((scheduler.date.day_start(new Date(start)).valueOf() != start.valueOf())){\r\n\t\t\tlabel += \" \" + scheduler.templates.hour_scale(start);\r\n\t\t\tdateTimeLabel = true;\r\n\t\t}\r\n\r\n\t\tif((scheduler.date.day_start(new Date(start)).valueOf() != scheduler.date.day_start(new Date(end)).valueOf())){\r\n\r\n\t\t\tlabel += \" - \" + scheduler.templates.day_date(end);\r\n\t\t\tif(dateTimeLabel || (scheduler.date.day_start(new Date(end)).valueOf() != end.valueOf())){\r\n\t\t\t\tlabel += \" \" + scheduler.templates.hour_scale(end);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(section){\r\n\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\t\t\t\tconst timeline = scheduler.matrix[mode];\r\n\t\t\t\tconst sectionObject = timeline.y_unit[timeline.order[section]];\r\n\t\t\t\tlabel += \", \" + scheduler.templates[mode + \"_scale_label\"](sectionObject.key, sectionObject.label, sectionObject);\r\n\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\tconst units = scheduler._props[mode];\r\n\t\t\t\tconst sectionObject = units.options[units.order[section]];\r\n\r\n\t\t\t\tlabel += \", \" + scheduler.templates[mode + \"_scale_text\"](sectionObject.key, sectionObject.label, sectionObject);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tscheduler._waiAria.setAttributes(divs[i], {\r\n\t\t\t\t\"aria-label\": label,\r\n\t\t\t\t\"aria-live\": \"polite\"\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\r\n\trenderWeekAgendaMarker: function(start_date, end_date){\r\n\t\tvar divs = scheduler.$container.querySelectorAll(\".dhx_wa_day_cont .dhx_wa_scale_bar\");\r\n\r\n\t\tvar currDate = scheduler.date.week_start(new Date(scheduler.getState().min_date));\r\n\r\n\t\tvar index = -1;\r\n\t\tvar markerDate = scheduler.date.day_start(new Date(start_date));\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tindex++;\r\n\t\t\tif(scheduler.date.day_start(new Date(currDate)).valueOf() == markerDate.valueOf()){\r\n\t\t\t\tbreak;\r\n\t\t\t}else{\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(index != -1) return this._wrapDiv(divs[index]);\r\n\t\treturn [];\r\n\t},\r\n\r\n\t_wrapDiv: function(cell){\r\n\t\tvar marker = this.createElement();\r\n\t\tmarker.style.top = cell.offsetTop + \"px\";\r\n\t\tmarker.style.left = cell.offsetLeft + \"px\";\r\n\t\tmarker.style.width = cell.offsetWidth + \"px\";\r\n\t\tmarker.style.height = cell.offsetHeight + \"px\";\r\n\t\tcell.appendChild(marker);\r\n\t\treturn [marker];\r\n\t},\r\n\trenderYearMarker: function(start_date, end_date){\r\n\t\tvar cell = scheduler._get_year_cell(start_date);\r\n\t\tcell.style.position = \"relative\";\r\n\t\tvar marker = this.createElement();\r\n\t\tmarker.style.top = \"0px\";\r\n\t\tmarker.style.left = \"0px\";\r\n\t\tmarker.style.width = \"100%\";\r\n\t\tmarker.style.height = \"100%\";\r\n\t\tcell.appendChild(marker);\r\n\t\treturn [marker];\r\n\t},\r\n\r\n\trenderAgendaMarker: function(start_date, end_date){\r\n\t\tvar block = this.createElement();\r\n\t\tblock.style.height = \"1px\";\r\n\t\tblock.style.width = \"100%\";\r\n\t\tblock.style.opacity = 1;\r\n\t\tblock.style.top = \"0px\";\r\n\t\tblock.style.left = \"0px\";\r\n\t\tscheduler.$container.querySelector(\".dhx_cal_data\").appendChild(block);\r\n\t\treturn [block];\r\n\t},\r\n\r\n\trenderTimelineMarker: function(start_date, end_date, section){\r\n\t\tvar view_opts = scheduler._lame_copy({}, scheduler.matrix[scheduler._mode]);\r\n\t\tvar areas = view_opts._scales;\r\n\t\t//timespans must always use actual position, not rounded\r\n\t\tview_opts.round_position = false;\r\n\t\tvar blocks = [];\r\n\r\n\t\tvar min_date = start_date ? new Date(start_date) : scheduler._min_date;\r\n\t\tvar max_date = end_date ? new Date(end_date) : scheduler._max_date;\r\n\r\n\t\tif(min_date.valueOf() < scheduler._min_date.valueOf())\r\n\t\t\tmin_date = new Date(scheduler._min_date);\r\n\t\tif(max_date.valueOf() > scheduler._max_date.valueOf())\r\n\t\t\tmax_date = new Date(scheduler._max_date);\r\n\r\n\t\tif(!view_opts._trace_x) return blocks;\r\n\r\n\t\tfor(var i = 0; i < view_opts._trace_x.length; i++){\r\n\t\t\tif(scheduler._is_column_visible(view_opts._trace_x[i]))\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\tif(i == view_opts._trace_x.length)\r\n\t\t\treturn blocks;\r\n\r\n\t\tvar area = areas[section];\r\n\r\n\t\tif (!(min_date < end_date && max_date > start_date))\r\n\t\t\treturn blocks;\r\n\r\n\t\tvar block = this.createElement();\r\n\r\n\t\tlet start_pos;\r\n\t\tlet end_pos;\r\n\r\n\t\tfunction set_date_part(source, target) {\r\n\t\t\t// reset to start of the month in order to prevent month change when target is on 31th day, and source month has only 30 days\r\n\t\t\ttarget.setDate(1);\r\n\r\n\t\t\ttarget.setFullYear(source.getFullYear());\r\n\t\t\ttarget.setMonth(source.getMonth());\r\n\t\t\ttarget.setDate(source.getDate());\r\n\t\t}\r\n\r\n\t\tif(!scheduler.getView().days){\r\n\t\t\tstart_pos = scheduler._timeline_getX({start_date: start_date}, false, view_opts);\r\n\t\t\tend_pos = scheduler._timeline_getX({start_date: end_date}, false, view_opts);\r\n\t\t}else{\r\n\t\t\t// daytimeline\r\n\t\t\tconst tempStart = new Date(start_date);\r\n\t\t\tset_date_part(scheduler._min_date, tempStart);\r\n\t\t\tconst tempEnd = new Date(end_date);\r\n\t\t\tset_date_part(scheduler._min_date, tempEnd);\r\n\t\t\tstart_pos = scheduler._timeline_getX({start_date: tempStart}, false, view_opts);\r\n\t\t\tend_pos = scheduler._timeline_getX({start_date: tempEnd}, false, view_opts);\r\n\t\t}\r\n\r\n\t\tvar height = ((view_opts._section_height[section]-1) || (view_opts.dy - 1));\r\n\r\n\t\tvar top = 0;\r\n\t\tif (scheduler._isRender('cell')){\r\n\t\t\ttop = area.offsetTop;\r\n\t\t\tstart_pos += view_opts.dx;\r\n\t\t\tend_pos += view_opts.dx;\r\n\t\t\tarea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t}else{\r\n\r\n\t\t}\r\n\t\tvar width = Math.max(1, end_pos - start_pos - 1);\r\n\t\tlet direction = \"left\";\r\n\t\tif(scheduler.config.rtl){\r\n\t\t\tdirection = \"right\";\r\n\t\t}\r\n\t\tblock.style.cssText = `height:${height}px; ${direction}:${start_pos}px; width:${width}px; top:${top}px;`;\r\n\r\n\t\tif(area){\r\n\t\t\tarea.appendChild(block);\r\n\t\t\tblocks.push(block);\r\n\t\t}\r\n\r\n\t\treturn blocks;\r\n\t},\r\n\r\n\trenderMonthCell: function(date){\r\n\t\tvar cells = scheduler.$container.querySelectorAll(\".dhx_month_head\");\r\n\r\n\t\tvar divs = [];\r\n\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\tdivs.push(cells[i].parentNode);\r\n\t\t}\r\n\r\n\t\tvar firstDate = scheduler.date.week_start(new Date(scheduler.getState().min_date));\r\n\r\n\t\tvar index = -1;\r\n\t\tvar weekNumber = 0;\r\n\t\tvar dayIndex = -1;\r\n\t\tvar currDate = firstDate;\r\n\t\tvar markerDate = scheduler.date.day_start(new Date(date));\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tindex++;\r\n\r\n\t\t\tif(dayIndex == 6){\r\n\t\t\t\tweekNumber++;\r\n\t\t\t\tdayIndex = 0;\r\n\t\t\t}else{\r\n\t\t\t\tdayIndex++;\r\n\t\t\t}\r\n\r\n\t\t\tif(scheduler.date.day_start(new Date(currDate)).valueOf() == markerDate.valueOf()){\r\n\t\t\t\tbreak;\r\n\t\t\t}else{\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(index == -1){\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tvar left = scheduler._colsS[dayIndex];\r\n\t\tvar top = scheduler._colsS.heights[weekNumber];\r\n\r\n\t\tvar div = this.createElement();\r\n\t\tdiv.style.top = top + \"px\";\r\n\t\tdiv.style.left = left + \"px\";\r\n\t\tdiv.style.width = scheduler._cols[dayIndex] + \"px\";\r\n\t\tdiv.style.height = ((scheduler._colsS.heights[weekNumber + 1] - top) || scheduler._colsS.height) + \"px\" ;\r\n\r\n\r\n\t\tvar container = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\r\n\t\tvar datatable = container.querySelector(\"table\");\r\n\t\tif(datatable.nextSibling){\r\n\t\t\tcontainer.insertBefore(div, datatable.nextSibling);\r\n\t\t}else{\r\n\t\t\tcontainer.appendChild(div);\r\n\t\t}\r\n\t\treturn div;\r\n\t},\r\n\trenderMonthMarker: function(start_date, end_date){\r\n\t\tvar res = [];\r\n\t\tvar currentDate = start_date;\r\n\t\twhile(currentDate.valueOf() < end_date.valueOf()){\r\n\t\t\tres.push(this.renderMonthCell(currentDate));\r\n\t\t\tcurrentDate = scheduler.date.add(currentDate, 1, \"day\");\r\n\t\t}\r\n\t\treturn res;\r\n\t},\r\n\r\n\trenderVerticalMarker: function(start_date, end_date, section){\r\n\t\tvar index = scheduler.locate_holder_day(start_date);\r\n\r\n\t\tvar divs = [];\r\n\t\tvar area = null;\r\n\r\n\t\tvar c = scheduler.config;\r\n\t\tif(scheduler._ignores[index]) return divs;\r\n\r\n\t\tif (scheduler._props && scheduler._props[scheduler._mode] && section) {\r\n\t\t\tvar view = scheduler._props[scheduler._mode];\r\n\t\t\tindex = view.order[section];\r\n\r\n\t\t\tvar inner_index = view.order[section];\r\n\t\t\tif(!(view.days > 1)){\r\n\t\t\t\tindex = inner_index;\r\n\t\t\t\tif (view.size && (index > view.position+view.size)) {\r\n\t\t\t\t\tindex = 0;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t//var units_l = view.size || view.options.length;\r\n\r\n\t\t\t\tindex = scheduler.locate_holder_day(start_date) + inner_index;\r\n\t\t\t\t//index = index*units_l + inner_index;\r\n\t\t\t}\r\n\t\t}\r\n\t\tarea = scheduler.locate_holder(index);\r\n\t\tif(!area || area.querySelector(\".dhx_scale_hour\")){\r\n\t\t\t// hour scale instead of date column\r\n\t\t\treturn document.createElement(\"div\");\r\n\t\t}\r\n\r\n\t\tvar start = Math.max((start_date.getHours()*60 + start_date.getMinutes()), c.first_hour*60);\r\n\r\n\r\n\t\tvar end = Math.min((end_date.getHours()*60 + end_date.getMinutes()), c.last_hour*60);\r\n\t\tif(!end && (scheduler.date.day_start(new Date(end_date)).valueOf() > scheduler.date.day_start(new Date(start_date)).valueOf())){\r\n\t\t\tend = c.last_hour*60;\r\n\t\t}\r\n\r\n\t\tif (end <= start) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tvar block = this.createElement();\r\n\r\n\t\t// +1 for working with section which really takes up whole height (as % would be == 0)\r\n\t\tvar all_hours_height = scheduler.config.hour_size_px*c.last_hour + 1;\r\n\t\tvar hour_ms = 60*60*1000;\r\n\t\tblock.style.top = (Math.round((start*60*1000-scheduler.config.first_hour*hour_ms)*scheduler.config.hour_size_px/hour_ms) % all_hours_height) + \"px\";\r\n\t\tblock.style.lineHeight = block.style.height = Math.max((Math.round(((end-start)*60*1000)*scheduler.config.hour_size_px/hour_ms)) % all_hours_height, 1)+\"px\";\r\n\t\tblock.style.width = \"100%\";\r\n\t\tarea.appendChild(block);\r\n\t\tdivs.push(block);\r\n\t\treturn divs[0];\r\n\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode = function(){};\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.EventHandler,\r\n\t{\r\n\t\tgetDefaultNode: function(){\r\n\t\t\tvar node = new scheduler.$keyboardNavigation.TimeSlot();\r\n\r\n\t\t\tif(!node.isValid()){\r\n\t\t\t\tnode = node.fallback();\r\n\t\t\t}\r\n\t\t\treturn node;\r\n\t\t},\r\n\r\n\t\t_modes:{\r\n\t\t\tmonth: \"month\",\r\n\t\t\tyear: \"year\",\r\n\t\t\tdayColumns: \"dayColumns\",\r\n\t\t\ttimeline:\"timeline\",\r\n\t\t\tunits:\"units\",\r\n\t\t\tweekAgenda: \"weekAgenda\",\r\n\t\t\tlist: \"list\"\r\n\t\t},\r\n\t\tgetMode: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tvar mode = state.mode;\r\n\t\t\tif((scheduler.matrix && scheduler.matrix[mode])){\r\n\t\t\t\treturn this._modes.timeline;\r\n\t\t\t} else if((scheduler._props && scheduler._props[mode])){\r\n\t\t\t\treturn this._modes.units;\r\n\t\t\t}else if(mode == \"month\"){\r\n\t\t\t\treturn this._modes.month;\r\n\t\t\t}else if(mode == \"year\"){\r\n\t\t\t\treturn this._modes.year;\r\n\t\t\t}else if(mode == \"week_agenda\"){\r\n\t\t\t\treturn this._modes.weekAgenda;\r\n\t\t\t}else if(mode == \"map\" || mode == \"agenda\" || (scheduler._grid && scheduler[\"grid_\" + mode])){\r\n\t\t\t\treturn this._modes.list;\r\n\t\t\t}else{\r\n\t\t\t\treturn this._modes.dayColumns;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.focus();\r\n\t\t},\r\n\r\n\t\tblur: function(){\r\n\r\n\t\t},\r\n\r\n\t\tdisable: function(){\r\n\t\t\tscheduler.$container.setAttribute(\"tabindex\", \"0\");\r\n\t\t},\r\n\t\tenable: function(){\r\n\t\t\tif(scheduler.$container)\r\n\t\t\t\tscheduler.$container.removeAttribute(\"tabindex\");\r\n\t\t},\r\n\t\tisEnabled: function(){\r\n\t\t\treturn scheduler.$container.hasAttribute(\"tabindex\");\r\n\t\t},\r\n\r\n\r\n\t\t_compareEvents: function(a, b){\r\n\t\t\tif (a.start_date.valueOf() == b.start_date.valueOf())\r\n\t\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\t\treturn a.start_date.valueOf() > b.start_date.valueOf() ? 1 : -1;\r\n\t\t},\r\n\r\n\t\t_pickEvent: function(from, to, startId, reverse){\r\n\t\t\tvar range = scheduler.getState();\r\n\t\t\tfrom = new Date(Math.max(range.min_date.valueOf(), from.valueOf()));\r\n\t\t\tto = new Date(Math.min(range.max_date.valueOf(), to.valueOf()));\r\n\r\n\t\t\tvar evs = scheduler.getEvents(from, to);\r\n\t\t\tevs.sort(this._compareEvents);\r\n\t\t\tif(reverse){\r\n\t\t\t\tevs = evs.reverse();\r\n\t\t\t}\r\n\r\n\t\t\tvar trim = !!startId;\r\n\t\t\tfor(var i =0; i < evs.length && trim; i++){\r\n\t\t\t\tif(evs[i].id == startId){\r\n\t\t\t\t\ttrim = false;\r\n\t\t\t\t}\r\n\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\r\n\t\t\tfor(var i = 0; i < evs.length; i++){\r\n\t\t\t\tvar eventElement = new scheduler.$keyboardNavigation.Event(evs[i].id);\r\n\t\t\t\tif(eventElement.getNode())\r\n\t\t\t\t\treturn evs[i];\r\n\t\t\t}\r\n\r\n\t\t\treturn null;\r\n\t\t},\r\n\r\n\t\tnextEventHandler: function(id){\r\n\t\t\tvar activeNode = scheduler.$keyboardNavigation.dispatcher.activeNode;\r\n\r\n\t\t\tvar startId = id || (activeNode && activeNode.eventId);\r\n\r\n\t\t\tvar nextEvent = null;\r\n\t\t\tif(startId && scheduler.getEvent(startId)){\r\n\t\t\t\tvar currEvent = scheduler.getEvent(startId);\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tcurrEvent.start_date,\r\n\t\t\t\t\tscheduler.date.add(currEvent.start_date, 1, \"year\"),\r\n\t\t\t\t\tcurrEvent.id,\r\n\t\t\t\t\tfalse\r\n\t\t\t\t);\r\n\r\n\t\t\t}\r\n\t\t\tif(!nextEvent && !id){\r\n\t\t\t\tvar visibleDates = scheduler.getState();\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tvisibleDates.min_date,\r\n\t\t\t\t\tscheduler.date.add(visibleDates.min_date, 1, \"year\"),\r\n\t\t\t\t\tnull,\r\n\t\t\t\t\tfalse\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tif(nextEvent){\r\n\r\n\t\t\t\tvar nextEv = new scheduler.$keyboardNavigation.Event(nextEvent.id);\r\n\t\t\t\tif(!nextEv.isValid()){// not visible event\r\n\t\t\t\t\tthis.nextEventHandler(nextEvent.id);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(activeNode){activeNode.blur();}\r\n\t\t\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(nextEv);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tprevEventHandler: function(id){\r\n\t\t\tvar activeNode = scheduler.$keyboardNavigation.dispatcher.activeNode;\r\n\r\n\t\t\tvar startId = id || (activeNode && activeNode.eventId);\r\n\r\n\t\t\tvar nextEvent = null;\r\n\t\t\tif(startId && scheduler.getEvent(startId)){\r\n\t\t\t\tvar currEvent = scheduler.getEvent(startId);\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tscheduler.date.add(currEvent.end_date, -1, \"year\"),\r\n\t\t\t\t\tcurrEvent.end_date,\r\n\t\t\t\t\tcurrEvent.id,\r\n\t\t\t\t\ttrue\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t\tif(!nextEvent && !id){\r\n\t\t\t\tvar visibleDates = scheduler.getState();\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tscheduler.date.add(visibleDates.max_date, -1, \"year\"),\r\n\t\t\t\t\tvisibleDates.max_date,\r\n\t\t\t\t\tnull,\r\n\t\t\t\t\ttrue\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tif(nextEvent){\r\n\t\t\t\tvar nextEv = new scheduler.$keyboardNavigation.Event(nextEvent.id);\r\n\t\t\t\tif(!nextEv.isValid()){// not visible event\r\n\t\t\t\t\tthis.prevEventHandler(nextEvent.id);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(activeNode){activeNode.blur();}\r\n\t\t\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(nextEv);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\r\n\t\t\t\"alt+1, alt+2, alt+3, alt+4, alt+5, alt+6, alt+7, alt+8, alt+9\": function(e){\r\n\t\t\t\tvar tabs = scheduler.$keyboardNavigation.HeaderCell.prototype.getNodes(\".dhx_cal_navline .dhx_cal_tab\");\r\n\t\t\t\tvar key = e.key;\r\n\t\t\t\tif(key === undefined){\r\n\t\t\t\t\tkey = e.keyCode - 48;\r\n\t\t\t\t}\r\n\t\t\t\tif(tabs[key*1 - 1]){\r\n\t\t\t\t\ttabs[key*1 - 1].click();\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+left,meta+left\": function(e){\r\n\t\t\t\tscheduler._click.dhx_cal_prev_button();\r\n\t\t\t},\r\n\t\t\t\"ctrl+right,meta+right\": function(e){\r\n\t\t\t\tscheduler._click.dhx_cal_next_button();\r\n\t\t\t},\r\n\t\t\t\"ctrl+up,meta+up\":function(e){\r\n\t\t\t\tvar dataArea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tdataArea.scrollTop -= 20;\r\n\t\t\t},\r\n\t\t\t\"ctrl+down,meta+down\": function(e){\r\n\t\t\t\tvar dataArea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tdataArea.scrollTop += 20;\r\n\t\t\t},\r\n\r\n\r\n\t\t\t\"e\": function(){\r\n\t\t\t\tthis.nextEventHandler();\r\n\t\t\t},\r\n\r\n\t\t\t\"home\": function(){\r\n\t\t\t\tscheduler.setCurrentView(new Date());\r\n\t\t\t},\r\n\r\n\t\t\t\"shift+e\": function(){\r\n\t\t\t\tthis.prevEventHandler();\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+enter,meta+enter\": function(){\r\n\t\t\t\tscheduler.addEventNow({start_date: new Date(scheduler.getState().date)});\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+c,meta+c\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t},\r\n\t\t\t\"ctrl+v,meta+v\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t},\r\n\t\t\t\"ctrl+x,meta+x\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode.prototype.bindAll(scheduler.$keyboardNavigation.SchedulerNode.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.KeyNavNode = function(){};\r\n\r\nscheduler.$keyboardNavigation.KeyNavNode.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.EventHandler,\r\n\t{\r\n\t\tisValid: function(){\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\treturn null;\r\n\t\t},\r\n\r\n\t\tmoveTo: function (element) {\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(element);\r\n\t\t},\r\n\r\n\t\tcompareTo: function(b){\r\n\t\t\t// good enough comparison of two random objects\r\n\t\t\tif(!b) return false;\r\n\t\t\tfor(var i in this){\r\n\t\t\t\tif(!!this[i] != !!b[i]) return false;\r\n\r\n\t\t\t\tvar canStringifyThis = !!(this[i] && this[i].toString);\r\n\t\t\t\tvar canStringifyThat = !!(b[i] && b[i].toString);\r\n\t\t\t\tif(canStringifyThat != canStringifyThis) return false;\r\n\t\t\t\tif(!(canStringifyThat && canStringifyThis)) {\r\n\t\t\t\t\tif(b[i] != this[i]) return false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(b[i].toString() != this[i].toString())\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\r\n\t\tgetNode: function(){},\r\n\t\tfocus: function(){\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif(node){\r\n\t\t\t\tnode.setAttribute(\"tabindex\", \"-1\");\r\n\t\t\t\t//node.className += \" scheduler_focused\";\r\n\t\t\t\tif(node.focus) node.focus();\r\n\t\t\t}\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif(node){\r\n\t\t\t\tnode.setAttribute(\"tabindex\", \"-1\");\r\n\t\t\t\t//node.className = (node.className || \"\").replace(/ ?scheduler_focused/g, \"\");\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.HeaderCell = function(index){\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.HeaderCell.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\tgetNode: function(index){\r\n\t\t\tindex = index || this.index || 0;\r\n\t\t\tvar nodes = this.getNodes();\r\n\t\t\tif(nodes[index]) return nodes[index];\r\n\t\t},\r\n\r\n\t\tgetNodes: function(selector){\r\n\t\t\tselector = selector || [\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_prev_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_next_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_today_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_tab\"\r\n\t\t\t\t].join(\", \");\r\n\r\n\t\t\tvar nodes = Array.prototype.slice.call(scheduler.$container.querySelectorAll(selector));\r\n\t\t\tnodes.sort(function(a, b){\r\n\t\t\t\treturn a.offsetLeft - b.offsetLeft;\r\n\t\t\t});\r\n\t\t\treturn nodes;\r\n\t\t},\r\n\r\n\t\t_handlers:null,\r\n\r\n\t\tisValid: function(){\r\n\t\t\treturn !!this.getNode(this.index);\r\n\t\t},\r\n\t\tfallback:function(){\r\n\t\t\tvar defaultCell = this.getNode(0);\r\n\t\t\tif(!defaultCell){\r\n\t\t\t\tdefaultCell = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}\r\n\t\t\treturn defaultCell;\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tvar newIndex = this.index - 1;\r\n\t\t\t\tif(newIndex < 0){\r\n\t\t\t\t\tnewIndex = this.getNodes().length - 1;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.HeaderCell(newIndex));\r\n\r\n\t\t\t},\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tvar newIndex = this.index + 1;\r\n\t\t\t\tif(newIndex >= this.getNodes().length){\r\n\t\t\t\t\tnewIndex = 0;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.HeaderCell(newIndex));\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t},\r\n\r\n\t\t\t\"enter\": function(){\r\n\t\t\t\tvar node = this.getNode();\r\n\t\t\t\tif(node){\r\n\t\t\t\t\tnode.click();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.HeaderCell.prototype.bindAll(scheduler.$keyboardNavigation.HeaderCell.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.Event = function(id){\r\n\tthis.eventId = null;\r\n\tif(scheduler.getEvent(id)){\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tthis.start = new Date(ev.start_date);\r\n\t\tthis.end = new Date(ev.end_date);\r\n\r\n\t\tthis.section = this._getSection(ev);\r\n\t\tthis.eventId = id;\r\n\t}\r\n};\r\n\r\nscheduler.$keyboardNavigation.Event.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\t_getNodes: function(){\r\n\t\t\treturn Array.prototype.slice.call(scheduler.$container.querySelectorAll(\"[\"+scheduler.config.event_attribute+\"]\"));\r\n\t\t},\r\n\r\n\t\t_modes: scheduler.$keyboardNavigation.SchedulerNode.prototype._modes,\r\n\r\n\t\tgetMode: scheduler.$keyboardNavigation.SchedulerNode.prototype.getMode,\r\n\r\n\t\t_handlers: null,\r\n\t\tisValid: function(){\r\n\t\t\treturn !!(scheduler.getEvent(this.eventId) && this.getNode());\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\tvar eventNode = this._getNodes()[0];\r\n\t\t\tvar defaultElement = null;\r\n\t\t\tif(!eventNode || !(scheduler._locate_event(eventNode))){\r\n\t\t\t\tdefaultElement = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}else{\r\n\t\t\t\tvar id = scheduler._locate_event(eventNode);\r\n\t\t\t\tdefaultElement = new scheduler.$keyboardNavigation.Event(id);\r\n\t\t\t}\r\n\r\n\t\t\treturn defaultElement;\r\n\t\t},\r\n\r\n\t\tisScrolledIntoView: function (el) {\r\n\t\t\tvar eventBox = el.getBoundingClientRect();\r\n\t\t\tvar viewPort = scheduler.$container.querySelector(\".dhx_cal_data\").getBoundingClientRect();\r\n\t\t\t\r\n\t\t\tif(eventBox.bottom < viewPort.top || eventBox.top > viewPort.bottom){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\r\n\t\tgetNode: function(){\r\n\r\n\t\t\tvar idSelector = \"[\"+scheduler.config.event_attribute+\"='\"+this.eventId+\"']\";\r\n\r\n\t\t\tvar inlineEditor = scheduler.$keyboardNavigation.dispatcher.getInlineEditor(this.eventId);\r\n\t\t\tif(inlineEditor){// is inline editor visible\r\n\t\t\t\treturn inlineEditor;\r\n\t\t\t}else{\r\n\t\t\t\tif(scheduler.isMultisectionEvent && scheduler.isMultisectionEvent(scheduler.getEvent(this.eventId))){\r\n\t\t\t\t\tvar nodes = scheduler.$container.querySelectorAll(idSelector);\r\n\t\t\t\t\tfor(var i = 0; i < nodes.length; i++){\r\n\t\t\t\t\t\tif(this.isScrolledIntoView(nodes[i])){\r\n\t\t\t\t\t\t\treturn nodes[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn nodes[0];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn scheduler.$container.querySelector(idSelector);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tvar event = scheduler.getEvent(this.eventId);\r\n\r\n\t\t\tvar calendar = scheduler.getState();\r\n\t\t\tif(event.start_date.valueOf() > calendar.max_date.valueOf() || event.end_date.valueOf() <= calendar.min_date.valueOf()){\r\n\t\t\t\tscheduler.setCurrentView(event.start_date);\r\n\t\t\t}\r\n\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif (this.isScrolledIntoView(node)) {\r\n\t\t\t\tscheduler.$keyboardNavigation.dispatcher.keepScrollPosition((function(){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\t\t}).bind(this));\r\n\t\t\t} else {\r\n\t\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\t}\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\r\n\r\n\t\t_getSection: function(ev){\r\n\t\t\tvar section = null;\r\n\t\t\tvar mode = scheduler.getState().mode;\r\n\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\t\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\t\tsection = ev[timeline.y_property];\r\n\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\tvar unit = scheduler._props[mode];\r\n\t\t\t\tsection = ev[unit.map_to];\r\n\t\t\t}\r\n\t\t\treturn section;\r\n\t\t},\r\n\t\t_moveToSlot: function(dir){\r\n\t\t\tvar ev = scheduler.getEvent(this.eventId);\r\n\t\t\tif(ev){\r\n\t\t\t\tvar section =this._getSection(ev);\r\n\t\t\t\tvar slot = new scheduler.$keyboardNavigation.TimeSlot(ev.start_date, null, section);\r\n\t\t\t\tthis.moveTo(slot.nextSlot(slot, dir));\r\n\t\t\t}else{\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tthis._moveToSlot(\"left\");\r\n\t\t\t},\r\n\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tthis._moveToSlot(\"right\");\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\t\t\t\tif(this.getMode() == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.nextEventHandler();\r\n\t\t\t\t}else {\r\n\t\t\t\t\tthis._moveToSlot(\"down\");\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"space\": function(){\r\n\t\t\t\tvar node = this.getNode();\r\n\t\t\t\tif(node && node.click){\r\n\t\t\t\t\tnode.click();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"up\": function () {\r\n\t\t\t\tif(this.getMode() == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.prevEventHandler();\r\n\t\t\t\t}else {\r\n\t\t\t\t\tthis._moveToSlot(\"up\");\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"delete\": function(){\r\n\t\t\t\tif(scheduler.getEvent(this.eventId)) {\r\n\t\t\t\t\tscheduler._click.buttons[\"delete\"](this.eventId);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t// open lightbox\r\n\t\t\t\"enter\": function () {\r\n\t\t\t\tif(scheduler.getEvent(this.eventId)) {\r\n\t\t\t\t\tscheduler.showLightbox(this.eventId);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\nscheduler.$keyboardNavigation.Event.prototype.bindAll(scheduler.$keyboardNavigation.Event.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.TimeSlot = function(from, to, section, movingDate){\r\n\tvar state = scheduler.getState();\r\n\tvar timeline = scheduler.matrix && scheduler.matrix[state.mode];\r\n\r\n\tif(!from){\r\n\t\tfrom = this.getDefaultDate();\r\n\t}\r\n\r\n\tif(!to){\r\n\r\n\t\tif(timeline){\r\n\t\t\tto = scheduler.date.add(from, timeline.x_step, timeline.x_unit);\r\n\t\t}else{\r\n\t\t\tto = scheduler.date.add(from, scheduler.config.key_nav_step, \"minute\");\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tthis.section = section || this._getDefaultSection();\r\n\tthis.start_date = new Date(from);\r\n\tthis.end_date = new Date(to);\r\n\tthis.movingDate = movingDate || null;\r\n};\r\n\r\nscheduler.$keyboardNavigation.TimeSlot.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\t_handlers:null,\r\n\r\n\t\tgetDefaultDate: function(){\r\n\t\t\tvar from;\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar visibleTime = new Date(state.date);\r\n\t\t\tvisibleTime.setSeconds(0);\r\n\t\t\tvisibleTime.setMilliseconds(0);\r\n\r\n\t\t\tvar nowTime = new Date();\r\n\t\t\tnowTime.setSeconds(0);\r\n\t\t\tnowTime.setMilliseconds(0);\r\n\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[state.mode];\r\n\t\t\tvar showNowTime = false;\r\n\t\t\tif(visibleTime.valueOf() === nowTime.valueOf()){\r\n\t\t\t\tshowNowTime = true;\r\n\t\t\t}\r\n\r\n\t\t\tif(timeline){\r\n\t\t\t\tif(showNowTime){\r\n\t\t\t\t\tif(timeline.x_unit === \"day\"){\r\n\t\t\t\t\t\tnowTime.setHours(0);\r\n\t\t\t\t\t\tnowTime.setMinutes(0);\r\n\t\t\t\t\t}else if(timeline.x_unit === \"hour\"){\r\n\t\t\t\t\t\tnowTime.setMinutes(0);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfrom = nowTime;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfrom = scheduler.date[timeline.name + \"_start\"](new Date(state.date));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfrom = this.findVisibleColumn(from);\r\n\t\t\t}else{\r\n\t\t\t\tfrom = new Date(scheduler.getState().min_date);\r\n\t\t\t\tif(showNowTime){\r\n\t\t\t\t\tfrom = nowTime;\r\n\t\t\t\t}\r\n\t\t\t\tfrom = this.findVisibleColumn(from);\r\n\t\t\t\tif(!showNowTime){\r\n\t\t\t\t\tfrom.setHours(scheduler.config.first_hour);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(!scheduler._table_view){\r\n\t\t\t\t\tvar dataContainer = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\t\tif(dataContainer.scrollTop){\r\n\t\t\t\t\t\tfrom.setHours(scheduler.config.first_hour + Math.ceil(dataContainer.scrollTop / scheduler.config.hour_size_px));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn from;\r\n\t\t},\r\n\r\n\t\tclone: function(timeslot){\r\n\t\t\treturn new scheduler.$keyboardNavigation.TimeSlot(timeslot.start_date, timeslot.end_date, timeslot.section, timeslot.movingDate);\r\n\t\t},\r\n\t\t_getMultisectionView: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view;\r\n\t\t\tif(scheduler._props && scheduler._props[state.mode]) {\r\n\t\t\t\tview = scheduler._props[state.mode];\r\n\t\t\t}else if(scheduler.matrix && scheduler.matrix[state.mode]){\r\n\t\t\t\tview = scheduler.matrix[state.mode];\r\n\t\t\t}\r\n\t\t\treturn view;\r\n\t\t},\r\n\r\n\t\t_getDefaultSection: function(){\r\n\t\t\tvar section = null;\r\n\t\t\tvar view = this._getMultisectionView();\r\n\t\t\tif(view && !section){\r\n\t\t\t\tsection = this._getNextSection();\r\n\t\t\t}\r\n\t\t\treturn section;\r\n\t\t},\r\n\r\n\t\t_getNextSection: function(sectionId, dir){\r\n\t\t\tvar view = this._getMultisectionView();\r\n\t\t\tvar currentIndex = view.order[sectionId];\r\n\t\t\tvar nextIndex = currentIndex;\r\n\t\t\tif(currentIndex !== undefined){\r\n\t\t\t\tnextIndex = currentIndex + dir;\r\n\t\t\t}else{\r\n\t\t\t\tnextIndex = (view.size && view.position) ? view.position : 0;\r\n\t\t\t}\r\n\r\n\t\t\tif(nextIndex < 0){\r\n\t\t\t\tnextIndex = 0;\r\n\t\t\t}\r\n\t\t\tvar options = view.options || view.y_unit;\r\n\r\n\t\t\tif(nextIndex >= options.length){\r\n\t\t\t\tnextIndex = options.length - 1;\r\n\t\t\t}\r\n\t\t\t//nextIndex = nextIndex < 0 ? nextIndex = (view.options || view.y_unit).length -1 : nextIndex;\r\n\r\n\t\t\tif(options[nextIndex]){\r\n\t\t\t\treturn options[nextIndex].key;\r\n\t\t\t}else{\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar isInRange = !(this.start_date.valueOf() < state.min_date.valueOf() || this.start_date.valueOf() >= state.max_date.valueOf());\r\n\r\n\t\t\tif(!isInRange) return false;\r\n\r\n\r\n\t\t\tif(!this.isVisible(this.start_date, this.end_date)) return false;\r\n\r\n\t\t\tvar view = this._getMultisectionView();\r\n\r\n\t\t\tif(view){\r\n\t\t\t\treturn (view.order[this.section] !== undefined);\r\n\t\t\t}else{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t},\r\n\r\n\t\tfallback:function(){\r\n\r\n\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(!defaultSlot.isValid()){\r\n\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t}else{\r\n\t\t\t\treturn defaultSlot;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tgetNodes: function(){\r\n\t\t\treturn Array.prototype.slice.call(scheduler.$container.querySelectorAll(\".dhx_focus_slot\"));\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\treturn this.getNodes()[0];\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tif(this.section && scheduler.getView() && scheduler.getView().smart_rendering && scheduler.getView().scrollTo && !scheduler.$container.querySelector(`[data-section-id=\"${this.section}\"]`)){\r\n\t\t\t\tscheduler.getView().scrollTo({section: this.section});\r\n\t\t\t}\r\n\t\t\tscheduler.$keyboardNavigation.marker.render(this.start_date, this.end_date, this.section);\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\tscheduler.$keyboardNavigation._pasteDate = this.start_date;\r\n\t\t\tscheduler.$keyboardNavigation._pasteSection = this.section;\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t\tscheduler.$keyboardNavigation.marker.clear();\r\n\t\t},\r\n\r\n\t\t_modes: scheduler.$keyboardNavigation.SchedulerNode.prototype._modes,\r\n\r\n\t\t_getMode: scheduler.$keyboardNavigation.SchedulerNode.prototype.getMode,\r\n\r\n\t\taddMonthDate: function(date, dir, extend){\r\n\t\t\tvar res;\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tres = scheduler.date.add(date, -1, \"week\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tres = scheduler.date.add(date, 1, \"week\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tres = scheduler.date.day_start(scheduler.date.add(date, -1, \"day\"));\r\n\t\t\t\t\tres = this.findVisibleColumn(res, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tres = scheduler.date.day_start(scheduler.date.add(date, 1, \"day\"));\r\n\t\t\t\t\tres = this.findVisibleColumn(res, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tres = scheduler.date.day_start(new Date(date));\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tif(date.valueOf() < state.min_date.valueOf() || (!extend && date.valueOf() >= state.max_date.valueOf())){\r\n\t\t\t\tres = new Date(state.min_date);\r\n\t\t\t}\r\n\r\n\t\t\treturn res;\r\n\t\t},\r\n\r\n\t\tnextMonthSlot: function(slot, dir, extend){\r\n\r\n\t\t\tvar start, end;\r\n\t\t\tstart = this.addMonthDate(slot.start_date, dir, extend);\r\n\r\n\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\tend = new Date(start);\r\n\t\t\tend.setHours(scheduler.config.last_hour);\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\r\n\t\t_alignTimeSlot: function(date, minDate, unit, step){\r\n\t\t\tvar currentDate = new Date(minDate);\r\n\t\t\twhile(currentDate.valueOf() < date.valueOf()){\r\n\t\t\t\tcurrentDate = scheduler.date.add(currentDate, step, unit);\r\n\t\t\t}\r\n\r\n\t\t\tif(currentDate.valueOf() > date.valueOf()){\r\n\t\t\t\tcurrentDate = scheduler.date.add(currentDate, -step, unit);\r\n\t\t\t}\r\n\r\n\t\t\treturn currentDate;\r\n\t\t},\r\n\r\n\t\tnextTimelineSlot: function(slot, dir, extend){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view = scheduler.matrix[state.mode];\r\n\r\n\t\t\tvar startDate = this._alignTimeSlot(slot.start_date, scheduler.date[view.name + \"_start\"](new Date(slot.start_date)), view.x_unit, view.x_step);\r\n\t\t\tvar endDate = this._alignTimeSlot(slot.end_date, scheduler.date[view.name + \"_start\"](new Date(slot.end_date)), view.x_unit, view.x_step);\r\n\r\n\t\t\tif(endDate.valueOf() <= startDate.valueOf()){\r\n\t\t\t\tendDate = scheduler.date.add(startDate, view.x_step, view.x_unit);\r\n\t\t\t}\r\n\t\t\tvar newPos = this.clone(slot);\r\n\t\t\tnewPos.start_date = startDate;\r\n\t\t\tnewPos.end_date = endDate;\r\n\t\t\tnewPos.section = slot.section || this._getNextSection();\r\n\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tnewPos.section = this._getNextSection(slot.section, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tnewPos.section = this._getNextSection(slot.section, +1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tnewPos.start_date = this.findVisibleColumn(scheduler.date.add(newPos.start_date, -view.x_step, view.x_unit), -1);\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tnewPos.start_date = this.findVisibleColumn(scheduler.date.add(newPos.start_date, view.x_step, view.x_unit), 1);\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(newPos.start_date.valueOf() < state.min_date.valueOf() || newPos.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tif(extend && newPos.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\t\tnewPos.start_date = new Date(state.max_date);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tnewPos.start_date = scheduler.date[state.mode + \"_start\"](scheduler.date.add(state.date, dir == \"left\" ? -1 : 1, state.mode));\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn newPos;\r\n\t\t},\r\n\r\n\t\tnextUnitsSlot: function(slot, dir, extend){\r\n\t\t\tvar newPos = this.clone(slot);\r\n\t\t\tnewPos.section = slot.section || this._getNextSection();\r\n\r\n\t\t\tvar section = slot.section || this._getNextSection();\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view = scheduler._props[state.mode];\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tsection = this._getNextSection(slot.section, -1);\r\n\t\t\t\t\tvar optionsCount = view.size ? (view.size - 1) : view.options.length;\r\n\r\n\t\t\t\t\tif(view.days > 1 && (view.order[section] == optionsCount - 1)){\r\n\t\t\t\t\t\tif(scheduler.date.add(slot.start_date, -1, \"day\").valueOf() >= state.min_date.valueOf()){\r\n\t\t\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tsection = this._getNextSection(slot.section, 1);\r\n\t\t\t\t\tif(view.days > 1 && !view.order[section]){\r\n\t\t\t\t\t\tif(scheduler.date.add(slot.start_date, 1, \"day\").valueOf() < state.max_date.valueOf()){\r\n\t\t\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\tsection = slot.section;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tnewPos.section = section;\r\n\t\t\treturn newPos;\r\n\t\t},\r\n\r\n\t\t_moveDate: function(oldDate, dir){\r\n\t\t\tvar newDate = this.findVisibleColumn(scheduler.date.add(oldDate, dir, \"day\"), dir);\r\n\t\t\tnewDate.setHours(oldDate.getHours());\r\n\t\t\tnewDate.setMinutes(oldDate.getMinutes());\r\n\t\t\treturn newDate;\r\n\t\t},\r\n\r\n\t\tisBeforeLastHour: function(date, isStartDate){\r\n\t\t\tvar minutes = date.getMinutes(),\r\n\t\t\t\thours = date.getHours(),\r\n\t\t\t\tlast_hour = scheduler.config.last_hour;\r\n\t\t\treturn (hours < last_hour || (!isStartDate && ((last_hour == 24 || hours == last_hour) && !minutes)));\r\n\t\t},\r\n\t\tisAfterFirstHour: function(date, isStartDate){\r\n\t\t\tvar minutes = date.getMinutes(),\r\n\t\t\t\thours = date.getHours(),\r\n\t\t\t\tfirst_hour = scheduler.config.first_hour,\r\n\t\t\t\tlast_hour = scheduler.config.last_hour;\r\n\t\t\treturn (hours >= first_hour || (!isStartDate && (!minutes && ((!hours && last_hour == 24) || (hours == last_hour)))));\r\n\t\t},\r\n\t\tisInVisibleDayTime: function(date, isStartDate){\r\n\t\t\treturn (this.isBeforeLastHour(date, isStartDate) && this.isAfterFirstHour(date, isStartDate));\r\n\t\t},\r\n\r\n\t\tnextDaySlot: function(slot, dir, extend){\r\n\t\t\tvar start, end;\r\n\r\n\t\t\tvar key_nav_step = scheduler.config.key_nav_step;\r\n\r\n\t\t\tvar date = this._alignTimeSlot(slot.start_date, scheduler.date.day_start(new Date(slot.start_date)), \"minute\", key_nav_step);\r\n\r\n\r\n\t\t\tvar oldStart = slot.start_date;\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tstart = scheduler.date.add(date, -key_nav_step, \"minute\");\r\n\r\n\t\t\t\t\tif(!this.isInVisibleDayTime(start, true)){\r\n\t\t\t\t\t\tif (!extend || this.isInVisibleDayTime(oldStart, true)) {\r\n\r\n\t\t\t\t\t\t\tvar toNextDay = true;\r\n\t\t\t\t\t\t\tif(extend && scheduler.date.date_part(new Date(start)).valueOf() != scheduler.date.date_part(new Date(oldStart)).valueOf())\r\n\t\t\t\t\t\t\t\ttoNextDay = false;\r\n\t\t\t\t\t\t\tif(toNextDay)\r\n\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, -1, \"day\"), -1);\r\n\r\n\t\t\t\t\t\t\tstart.setHours(scheduler.config.last_hour);\r\n\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\tstart = scheduler.date.add(start, -key_nav_step, \"minute\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tstart = scheduler.date.add(date, key_nav_step, \"minute\");\r\n\r\n\t\t\t\t\tvar testEnd = extend ? start : scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tif(!this.isInVisibleDayTime(testEnd, false)){\r\n\t\t\t\t\t\tif(!extend || this.isInVisibleDayTime(oldStart, false)) {\r\n\t\t\t\t\t\t\tif (!extend) {\r\n\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, 1, \"day\"), 1);\r\n\t\t\t\t\t\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tvar toNextDay = true;\r\n\t\t\t\t\t\t\t\tif (scheduler.date.date_part(new Date(oldStart)).valueOf() == oldStart.valueOf()) {\r\n\t\t\t\t\t\t\t\t\ttoNextDay = false;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (toNextDay) {\r\n\t\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, 1, \"day\"), 1);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\t\tstart = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tstart = this._moveDate(slot.start_date, -1);\r\n\t\t\t\t\tend = this._moveDate(slot.end_date, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tstart = this._moveDate(slot.start_date, 1);\r\n\t\t\t\t\tend = this._moveDate(slot.end_date, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tstart = date;\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\t\tnextWeekAgendaSlot: function(slot, dir){\r\n\t\t\tvar start, end;\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tstart = scheduler.date.day_start(scheduler.date.add(slot.start_date, -1, \"day\"));\r\n\t\t\t\t\tstart = this.findVisibleColumn(start, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tstart = scheduler.date.day_start(scheduler.date.add(slot.start_date, 1, \"day\"));\r\n\t\t\t\t\tstart = this.findVisibleColumn(start, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tstart = scheduler.date.day_start(slot.start_date);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif(slot.start_date.valueOf() < state.min_date.valueOf() || slot.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tstart = new Date(state.min_date);\r\n\r\n\t\t\t}\r\n\t\t\tend = new Date(start);\r\n\t\t\tend.setHours(scheduler.config.last_hour);\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\t\tnextAgendaSlot: function(slot, dir){\r\n\t\t\treturn {start_date: slot.start_date, end_date: slot.end_date};\r\n\t\t},\r\n\r\n\r\n\t\tisDateVisible: function(date){\r\n\t\t\tif(!scheduler._ignores_detected)\r\n\t\t\t\treturn true;\r\n\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[scheduler.getState().mode];\r\n\r\n\t\t\tvar index;\r\n\t\t\tif(timeline){\r\n\t\t\t\tindex = scheduler._get_date_index(timeline, date);\r\n\t\t\t}else{\r\n\t\t\t\tindex = scheduler.locate_holder_day(date);\r\n\t\t\t}\r\n\r\n\t\t\treturn !scheduler._ignores[index];\r\n\t\t},\r\n\r\n\t\tfindVisibleColumn: function(start, dir){\r\n\t\t\tvar date = start;\r\n\t\t\tdir = dir || 1;\r\n\t\t\tvar range = scheduler.getState();\r\n\r\n\t\t\twhile(!this.isDateVisible(date) && ((dir > 0 && date.valueOf() <= range.max_date.valueOf()) || (dir < 0 && date.valueOf() >= range.min_date.valueOf()))){\r\n\t\t\t\tdate = this.nextDateColumn(date, dir);\r\n\t\t\t}\r\n\r\n\t\t\treturn date;\r\n\t\t},\r\n\r\n\t\tnextDateColumn: function(start, dir){\r\n\t\t\tdir = dir || 1;\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[scheduler.getState().mode];\r\n\r\n\t\t\tvar date;\r\n\t\t\tif(timeline){\r\n\t\t\t\tdate = scheduler.date.add(start, dir * timeline.x_step, timeline.x_unit);\r\n\t\t\t}else{\r\n\t\t\t\tdate = scheduler.date.day_start(scheduler.date.add(start, dir, \"day\"));\r\n\t\t\t}\r\n\r\n\t\t\treturn date;\r\n\t\t},\r\n\r\n\t\tisVisible:function(from, to){\r\n\t\t\tif(!scheduler._ignores_detected)\r\n\t\t\t\treturn true;\r\n\r\n\t\t\tvar current = new Date(from);\r\n\r\n\t\t\twhile(current.valueOf() < to.valueOf()){\r\n\t\t\t\tif(this.isDateVisible(current)) return true;\r\n\t\t\t\tcurrent = this.nextDateColumn(current);\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t},\r\n\r\n\t\tnextSlot: function(slot, dir, view, extend){\r\n\t\t\tvar next;\r\n\t\t\tview = view || this._getMode();\r\n\r\n\t\t\tvar tempSlot = scheduler.$keyboardNavigation.TimeSlot.prototype.clone(slot);\r\n\r\n\t\t\tswitch (view){\r\n\t\t\t\tcase this._modes.units:\r\n\t\t\t\t\tnext = this.nextUnitsSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.timeline:\r\n\t\t\t\t\tnext = this.nextTimelineSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.year:\r\n\t\t\t\t\tnext = this.nextMonthSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.month:\r\n\t\t\t\t\tnext = this.nextMonthSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.weekAgenda:\r\n\t\t\t\t\tnext = this.nextWeekAgendaSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.list:\r\n\t\t\t\t\tnext = this.nextAgendaSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.dayColumns:\r\n\t\t\t\t\tnext = this.nextDaySlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(next.start_date.valueOf() >= next.end_date.valueOf()){\r\n\t\t\t\tnext = this.nextSlot(next, dir, view);\r\n\t\t\t}\r\n\r\n\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(next);\r\n\r\n\t\t},\r\n\r\n\t\textendSlot: function(slot, dir){\r\n\t\t\tvar view = this._getMode();\r\n\t\t\tvar next;\r\n\t\t\tswitch (view){\r\n\t\t\t\tcase this._modes.units:\r\n\t\t\t\t\tif(dir == \"left\" || dir == \"right\"){\r\n\t\t\t\t\t\tnext = this.nextUnitsSlot(slot, dir);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnext = this.extendUnitsSlot(slot, dir);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.timeline:\r\n\t\t\t\t\tif(dir == \"down\" || dir == \"up\"){\r\n\t\t\t\t\t\tnext = this.nextTimelineSlot(slot, dir);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnext = this.extendTimelineSlot(slot, dir);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.year:\r\n\t\t\t\t\tnext = this.extendMonthSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.month:\r\n\t\t\t\t\tnext = this.extendMonthSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.dayColumns:\r\n\t\t\t\t\tnext = this.extendDaySlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.weekAgenda:\r\n\t\t\t\t\tnext = this.extendWeekAgendaSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnext = slot;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tvar range = scheduler.getState();\r\n\t\t\tif(next.start_date.valueOf() < range.min_date.valueOf()){\r\n\t\t\t\tnext.start_date = this.findVisibleColumn(range.min_date);\r\n\t\t\t\tnext.start_date.setHours(scheduler.config.first_hour);\r\n\t\t\t}\r\n\r\n\t\t\tif(next.end_date.valueOf() > range.max_date.valueOf()){\r\n\t\t\t//\tnext.end_date = new Date(slot.end_date);\r\n\t\t\t\tnext.end_date = this.findVisibleColumn(range.max_date, -1);\r\n\t\t\t}\r\n\r\n\r\n\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(next);\r\n\t\t},\r\n\r\n\t\textendTimelineSlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"timeline\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\textendWeekAgendaSlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"weekAgenda\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\textendGenericSlot: function(allowedDirections, slot, direction, type){\r\n\t\t\tvar next;\r\n\t\t\tvar moveDate = slot.movingDate;\r\n\r\n\t\t\tif(!moveDate){\r\n\t\t\t\tmoveDate = allowedDirections[direction];\r\n\t\t\t}\r\n\r\n\t\t\tif(!moveDate || !allowedDirections[direction]){\r\n\t\t\t\treturn slot;\r\n\t\t\t}\r\n\r\n\t\t\tif(direction){\r\n\t\t\t\tnext = this.nextSlot({start_date: slot[moveDate], section: slot.section}, direction, type, true);\r\n\r\n\t\t\t\tif(next.start_date.valueOf() == slot.start_date.valueOf()){\r\n\t\t\t\t\tnext = this.nextSlot({start_date: next.start_date, section:next.section}, direction, type, true);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tnext.movingDate = moveDate;\r\n\t\t\t}else{\r\n\t\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(slot);\r\n\t\t\t}\r\n\r\n\t\t\tvar newDates = this.extendSlotDates(slot, next, next.movingDate);\r\n\r\n\t\t\tif(newDates.end_date.valueOf() <= newDates.start_date.valueOf()){\r\n\t\t\t\tnext.movingDate = next.movingDate == \"end_date\" ? \"start_date\" : \"end_date\";\r\n\t\t\t}\r\n\t\t\tnewDates = this.extendSlotDates(slot, next, next.movingDate);\r\n\r\n\t\t\tnext.start_date = newDates.start_date;\r\n\t\t\tnext.end_date = newDates.end_date;\r\n\t\t\treturn next;\r\n\t\t},\r\n\r\n\t\textendSlotDates: function(oldSlot, newSlot, dateDirection){\r\n\t\t\tvar res = {start_date:null, end_date:null};\r\n\r\n\t\t\tif(dateDirection == \"start_date\"){\r\n\t\t\t\tres.start_date = newSlot.start_date;\r\n\t\t\t\tres.end_date = oldSlot.end_date;\r\n\t\t\t}else{\r\n\t\t\t\tres.start_date = oldSlot.start_date;\r\n\t\t\t\tres.end_date = newSlot.start_date;\r\n\t\t\t}\r\n\t\t\treturn res;\r\n\r\n\t\t},\r\n\r\n\t\textendMonthSlot: function(slot, direction){\r\n\t\t\tvar slot = this.extendGenericSlot({\r\n\t\t\t\t\t\"up\":\"start_date\",\r\n\t\t\t\t\t\"down\":\"end_date\",\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"month\"\r\n\t\t\t);\r\n\r\n\t\t\tslot.start_date.setHours(scheduler.config.first_hour);\r\n\t\t\tslot.end_date = scheduler.date.add(slot.end_date, -1, \"day\");\r\n\t\t\tslot.end_date.setHours(scheduler.config.last_hour);\r\n\t\t\treturn slot;\r\n\t\t},\r\n\r\n\t\textendUnitsSlot: function(slot, direction){\r\n\t\t\tvar next;\r\n\r\n\t\t\tswitch (direction){\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tnext = this.extendDaySlot(slot, direction);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnext = slot;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tnext.section = slot.section;\r\n\t\t\treturn next;\r\n\t\t},\r\n\t\textendDaySlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\t\"up\":\"start_date\",\r\n\t\t\t\t\t\"down\":\"end_date\",\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"dayColumns\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\tscrollSlot: function(dir){\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tvar slot = this.nextSlot(this, dir);\r\n\t\t\tif(slot.start_date.valueOf() < state.min_date.valueOf() || slot.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tscheduler.setCurrentView(new Date(slot.start_date));\r\n\t\t\t}\r\n\r\n\t\t\tthis.moveTo(slot);\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tthis.scrollSlot(\"left\");\r\n\t\t\t},\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tthis.scrollSlot(\"right\");\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\r\n\t\t\t\tvar mode = this._getMode();\r\n\t\t\t\tif(mode == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.nextEventHandler();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.scrollSlot(\"down\");\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"up\": function () {\r\n\t\t\t\tvar mode = this._getMode();\r\n\t\t\t\tif(mode == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.prevEventHandler();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.scrollSlot(\"up\");\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"shift+down\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"down\"));\r\n\t\t\t},\r\n\t\t\t\"shift+up\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"up\"));\r\n\t\t\t},\r\n\t\t\t\"shift+right\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"right\"));\r\n\t\t\t},\r\n\t\t\t\"shift+left\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"left\"));\r\n\t\t\t},\r\n\r\n\r\n\t\t\t\"enter\": function(){\r\n\t\t\t\tvar obj = {start_date: new Date(this.start_date), end_date: new Date(this.end_date)};\r\n\r\n\t\t\t\tvar mode = scheduler.getState().mode;\r\n\t\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\r\n\t\t\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\t\t\tobj[timeline.y_property] = this.section;\r\n\t\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\t\tvar unit = scheduler._props[mode];\r\n\t\t\t\t\tobj[unit.map_to] = this.section;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler.addEventNow(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.TimeSlot.prototype.bindAll(scheduler.$keyboardNavigation.TimeSlot.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.MinicalButton = function(div, index){\r\n\tthis.container = div;\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.MinicalButton.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar container = this.container;\r\n\t\t\treturn !!container.offsetWidth;// valid if container is visible\r\n\t\t},\r\n\r\n\t\tfallback: function(){\r\n\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(defaultSlot.isValid()){\r\n\t\t\t\treturn defaultSlot;\r\n\t\t\t}else{\r\n\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t}\r\n\t\t},\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.globalNode.disable();\r\n\t\t\tthis.container.removeAttribute(\"tabindex\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tthis.container.setAttribute(\"tabindex\", \"0\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\tif(!this.index){\r\n\t\t\t\treturn this.container.querySelector(\".dhx_cal_prev_button\");\r\n\t\t\t}else{\r\n\t\t\t\treturn this.container.querySelector(\".dhx_cal_next_button\");\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"right\": function(e){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, this.index ? 0 : 1));\r\n\t\t\t},\r\n\t\t\t\"left\": function(e){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, this.index ? 0 : 1));\r\n\t\t\t},\r\n\t\t\t\"down\": function(){\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, 0, 0);\r\n\t\t\t\tif(next && !next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"enter\": function(e){\r\n\t\t\t\tthis.getNode().click();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.MinicalButton.prototype.bindAll(scheduler.$keyboardNavigation.MinicalButton.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.MinicalCell = function(div, row, col){\r\n\tthis.container = div;\r\n\tthis.row = row || 0;\r\n\tthis.col = col || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.MinicalCell.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar grid = this._getGrid();\r\n\t\t\treturn !!(grid[this.row] && grid[this.row][this.col]);\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\tvar row = this.row;\r\n\t\t\tvar col = this.col;\r\n\t\t\tvar grid = this._getGrid();\r\n\t\t\tif(!grid[row]){\r\n\t\t\t\trow = 0;\r\n\t\t\t}\r\n\t\t\tvar dir = true;\r\n\t\t\tif(row > grid.length / 2){\r\n\t\t\t\tdir = false;\r\n\t\t\t}\r\n\r\n\t\t\tif(!grid[row]){\r\n\t\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t\tif(defaultSlot.isValid()){\r\n\t\t\t\t\treturn defaultSlot;\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(dir){\r\n\t\t\t\tfor(var c = col; grid[row] && c < grid[row].length; c++){\r\n\t\t\t\t\tif(!grid[row][c] && c == grid[row].length - 1){\r\n\t\t\t\t\t\trow++;\r\n\t\t\t\t\t\tcol = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(grid[row][c]){\r\n\t\t\t\t\t\treturn new scheduler.$keyboardNavigation.MinicalCell(this.container, row, c);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tfor(var c = col; grid[row] && c < grid[row].length; c--){\r\n\t\t\t\t\tif(!grid[row][c] && !c){\r\n\t\t\t\t\t\trow--;\r\n\t\t\t\t\t\tcol = grid[row].length - 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(grid[row][c]){\r\n\t\t\t\t\t\treturn new scheduler.$keyboardNavigation.MinicalCell(this.container, row, c);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn new scheduler.$keyboardNavigation.MinicalButton(this.container, 0);\r\n\t\t},\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.globalNode.disable();\r\n\r\n\t\t\tthis.container.removeAttribute(\"tabindex\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tthis.container.setAttribute(\"tabindex\", \"0\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\t\t_getNode: function(row, col){\r\n\t\t\treturn this.container.querySelector(\".dhx_year_body tr:nth-child(\"+(row + 1) + \") td:nth-child(\"+(col + 1)+\")\");\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\treturn this._getNode(this.row, this.col);\r\n\t\t},\r\n\r\n\t\t_getGrid: function(){\r\n\t\t\tvar rows = this.container.querySelectorAll(\".dhx_year_body tr\");\r\n\t\t\tvar grid = [];\r\n\t\t\tfor(var i = 0; i < rows.length; i++){\r\n\t\t\t\tgrid[i] = [];\r\n\t\t\t\tvar row = rows[i];\r\n\t\t\t\tvar cells = row.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var c = 0; c < cells.length; c++){\r\n\t\t\t\t\tvar cell = cells[c];\r\n\t\t\t\t\tvar enabled = true;\r\n\t\t\t\t\tvar css = scheduler._getClassName(cell);\r\n\t\t\t\t\tif(css.indexOf(\"dhx_after\") > -1 || css.indexOf(\"dhx_before\") > -1 || css.indexOf(\"dhx_scale_ignore\") > -1){\r\n\t\t\t\t\t\tenabled = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tgrid[i][c] = enabled;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn grid;\r\n\t\t},\r\n\r\n\r\n\t\tkeys: {\r\n\t\t\t\"right\": function(e){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row;\r\n\t\t\t\tvar newCol = this.col + 1;\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tif(grid[newRow + 1]){\r\n\t\t\t\t\t\tnewRow = newRow + 1;\r\n\t\t\t\t\t\tnewCol = 0;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnewCol = this.col;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"left\": function(e){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row;\r\n\t\t\t\tvar newCol = this.col - 1;\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tif(grid[newRow - 1]){\r\n\t\t\t\t\t\tnewRow = newRow - 1;\r\n\t\t\t\t\t\tnewCol = grid[newRow].length - 1;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnewCol = this.col;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"down\": function(){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row + 1;\r\n\t\t\t\tvar newCol = this.col;\r\n\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tnewRow = this.row;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"up\": function(){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row - 1;\r\n\t\t\t\tvar newCol = this.col;\r\n\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tvar index = 0;\r\n\t\t\t\t\tif(this.col > grid[this.row].length / 2){\r\n\t\t\t\t\t\tindex = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, index));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.moveTo(next);\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\t\t\t\"enter\": function(e){\r\n\t\t\t\tthis.getNode().querySelector(\".dhx_month_head\").click();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.MinicalCell.prototype.bindAll(scheduler.$keyboardNavigation.MinicalCell.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.DataArea = function(index){\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.DataArea.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\tgetNode: function(index){\r\n\t\t\treturn scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t},\r\n\r\n\t\t_handlers:null,\r\n\r\n\t\tisValid: function(){\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tfallback:function(){\r\n\t\t\treturn this;\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"up,down,right,left\":function(){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.DataArea.prototype.bindAll(scheduler.$keyboardNavigation.DataArea.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.dispatcher = {\r\n\tisActive: false,\r\n\tactiveNode: null,\r\n\tglobalNode: new scheduler.$keyboardNavigation.SchedulerNode(),\r\n\r\n\tkeepScrollPosition: function (callback) {\r\n\t\tvar top, left;\r\n\r\n\t\tvar scrollable = scheduler.$container.querySelector(\".dhx_timeline_scrollable_data\");\r\n\t\tif(!scrollable){\r\n\t\t\tscrollable = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t}\r\n\r\n\t\tif(scrollable){\r\n\t\t\ttop = scrollable.scrollTop;\r\n\t\t\tleft = scrollable.scrollLeft;\r\n\t\t}\r\n\r\n\t\tcallback();\r\n\r\n\t\tif(scrollable){\r\n\t\t\tscrollable.scrollTop = top;\r\n\t\t\tscrollable.scrollLeft = left;\r\n\t\t}\r\n\t},\r\n\tenable: function(){\r\n\t\tif(!scheduler.$container){\r\n\t\t\t// do nothing if not initialized\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.isActive = true;\r\n\t\tvar self = this;\r\n\t\tthis.keepScrollPosition(function () {\r\n\t\t\tself.globalNode.enable();\r\n\t\t\tself.setActiveNode(self.getActiveNode());\r\n\t\t});\r\n\t},\r\n\r\n\tdisable: function(){\r\n\t\tthis.isActive = false;\r\n\t\tthis.globalNode.disable();\r\n\t},\r\n\r\n\tisEnabled: function(){\r\n\t\treturn !!this.isActive;\r\n\t},\r\n\r\n\tgetDefaultNode: function(){\r\n\t\treturn this.globalNode.getDefaultNode();\r\n\t},\r\n\r\n\tsetDefaultNode: function() {\r\n\t\tthis.setActiveNode(this.getDefaultNode());\r\n\t},\r\n\r\n\tgetActiveNode: function(){\r\n\t\tvar node = this.activeNode;\r\n\t\tif(node && !node.isValid()){\r\n\t\t\tnode = node.fallback();\r\n\t\t}\r\n\t\treturn node;\r\n\t},\r\n\r\n\tfocusGlobalNode: function(){\r\n\t\tthis.blurNode(this.globalNode);\r\n\t\tthis.focusNode(this.globalNode);\r\n\t},\r\n\r\n\tsetActiveNode: function(el){\r\n\t\tif(!el || !el.isValid())\r\n\t\t\treturn;\r\n\r\n\t\tif(this.activeNode){\r\n\t\t\tif(this.activeNode.compareTo(el)){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(this.isEnabled()){\r\n\t\t\tthis.blurNode(this.activeNode);\r\n\t\t\tthis.activeNode = el;\r\n\t\t\tthis.focusNode(this.activeNode);\r\n\t\t}\r\n\t},\r\n\r\n\tfocusNode: function(el){\r\n\t\tif(el && el.focus){\r\n\t\t\tel.focus();\r\n\t\t\tif(el.getNode && document.activeElement != el.getNode()){\r\n\t\t\t\tthis.setActiveNode(new scheduler.$keyboardNavigation.DataArea());\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tblurNode: function(el){\r\n\t\tif(el && el.blur){\r\n\t\t\tel.blur();\r\n\t\t}\r\n\t},\r\n\r\n\tgetInlineEditor: function(id){\r\n\t\tvar editor = scheduler.$container.querySelector(\".dhx_cal_editor[\"+scheduler.config.event_attribute+\"='\"+id+\"'] textarea\");\r\n\t\tif(editor && editor.offsetWidth){\r\n\t\t\t// if exists and visible\r\n\t\t\treturn editor;\r\n\t\t}\r\n\t\treturn null;\r\n\t},\r\n\r\n\tkeyDownHandler: function (e) {\r\n\r\n\t\tif(e.defaultPrevented){\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar activeElement = this.getActiveNode();\r\n\r\n\t\tif(scheduler.$keyboardNavigation.isModal() &&\r\n\t\t\t!(activeElement && activeElement.container && scheduler.utils.dom.locateCss({target:activeElement.container}, \"dhx_minical_popup\", false)))\r\n\t\t\treturn;\r\n\r\n\t\tif(scheduler.getState().editor_id && this.getInlineEditor(scheduler.getState().editor_id))\r\n\t\t\treturn;\r\n\r\n\t\tif (!this.isEnabled())\r\n\t\t\treturn;\r\n\r\n\t\te = e || window.event;\r\n\r\n\t\tvar schedulerNode = this.globalNode;\r\n\r\n\t\tvar command = scheduler.$keyboardNavigation.shortcuts.getCommandFromEvent(e);\r\n\r\n\t\tif(!activeElement){\r\n\t\t\tthis.setDefaultNode();\r\n\t\t}else if(activeElement.findHandler(command)){\r\n\t\t\tactiveElement.doAction(command, e);\r\n\t\t}else if(schedulerNode.findHandler(command)){\r\n\t\t\tschedulerNode.doAction(command, e);\r\n\t\t}\r\n\r\n\t},\r\n\r\n\t_timeout: null,\r\n\tdelay: function(callback, delay){\r\n\r\n\t\tclearTimeout(this._timeout);\r\n\t\tthis._timeout = setTimeout(callback, delay || 1);\r\n\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation._minicalendars = [];\r\n\r\nscheduler.$keyboardNavigation.isMinical = function(node){\r\n\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\tif(this.isChildOf(node, minicalendars[i]))\r\n\t\t\treturn true;\r\n\t}\r\n\treturn false;\r\n};\r\n\r\nscheduler.$keyboardNavigation.isChildOf = function(child, parent){\r\n\twhile(child && child !== parent){\r\n\t\tchild = child.parentNode;\r\n\t}\r\n\r\n\treturn !!(child === parent);\r\n};\r\n\r\nscheduler.$keyboardNavigation.patchMinicalendar = function(){\r\n\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\tfunction focusMinical(e){\r\n\t\tvar target = e.target;\r\n\r\n\t\tdispatcher.enable();\r\n\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.MinicalButton(target, 0));\r\n\t}\r\n\r\n\tfunction minicalClick(e){\r\n\t\tvar target = e.target || e.srcElement;\r\n\r\n\t\tvar prev = scheduler.utils.dom.locateCss(e, \"dhx_cal_prev_button\", false);\r\n\t\tvar next = scheduler.utils.dom.locateCss(e, \"dhx_cal_next_button\", false);\r\n\t\tvar cell = scheduler.utils.dom.locateCss(e, \"dhx_year_body\", false);\r\n\r\n\t\tvar rowIndex = 0;\r\n\t\tvar cellIndex = 0;\r\n\t\tif(cell){\r\n\t\t\tvar tr;\r\n\t\t\tvar td;\r\n\t\t\tvar current = target;\r\n\t\t\twhile(current && current.tagName.toLowerCase() != \"td\"){\r\n\t\t\t\tcurrent = current.parentNode;\r\n\t\t\t}\r\n\t\t\tif(current){\r\n\t\t\t\ttd = current;\r\n\t\t\t\ttr = td.parentNode;\r\n\t\t\t}\r\n\r\n\t\t\tif(tr && td){\r\n\t\t\t\tvar rows = tr.parentNode.querySelectorAll(\"tr\");\r\n\t\t\t\tfor(var i = 0; i < rows.length; i++){\r\n\t\t\t\t\tif(rows[i] == tr){\r\n\t\t\t\t\t\trowIndex = i;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tvar cells = tr.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\t\t\tif(cells[i] == td){\r\n\t\t\t\t\t\tcellIndex = i;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tvar root = e.currentTarget;\r\n\t\tdispatcher.delay(function(){\r\n\t\t\tif(prev || next || cell){\r\n\r\n\t\t\t\tvar element;\r\n\t\t\t\tif(prev){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalButton(root, 0);\r\n\t\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.MinicalButton(root, 0));\r\n\t\t\t\t}else if(next){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalButton(root, 1);\r\n\t\t\t\t}else if(cell){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalCell(root, rowIndex, cellIndex);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(element){\r\n\r\n\t\t\t\t\tdispatcher.enable();\r\n\t\t\t\t\tif(element.isValid()){\r\n\t\t\t\t\t\tdispatcher.activeNode = null;\r\n\t\t\t\t\t\tdispatcher.setActiveNode(element);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t}\r\n\r\n\tif(scheduler.renderCalendar){\r\n\t\tvar renderMinical = scheduler.renderCalendar;\r\n\t\tscheduler.renderCalendar = function(){\r\n\t\t\tvar cal = renderMinical.apply(this, arguments);\r\n\t\t\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\r\n\t\t\tscheduler.eventRemove(cal, \"click\", minicalClick);\r\n\t\t\tscheduler.event(cal, \"click\", minicalClick);\r\n\r\n\t\t\tscheduler.eventRemove(cal, \"focus\", focusMinical);\r\n\t\t\tscheduler.event(cal, \"focus\", focusMinical);\r\n\r\n\t\t\tvar added = false;\r\n\t\t\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\t\t\tif(minicalendars[i] == cal){\r\n\t\t\t\t\tadded = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(!added)\r\n\t\t\t\tminicalendars.push(cal);\r\n\r\n\t\t\tif(dispatcher.isEnabled()){\r\n\t\t\t\tvar node = dispatcher.getActiveNode();\r\n\t\t\t\tif(node && node.container == cal){\r\n\t\t\t\t\tdispatcher.focusNode(node);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcal.setAttribute(\"tabindex\", \"0\");\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tcal.setAttribute(\"tabindex\", \"0\");\r\n\t\t\t}\r\n\t\t\treturn cal;\r\n\t\t};\r\n\t}\r\n\r\n\tif(scheduler.destroyCalendar){\r\n\t\tvar destroyMinical = scheduler.destroyCalendar;\r\n\t\tscheduler.destroyCalendar = function(cal, force){\r\n\t\t\tcal = cal || (scheduler._def_count ? scheduler._def_count.firstChild : null);\r\n\t\t\tvar res = destroyMinical.apply(this, arguments);\r\n\r\n\t\t\tif(!cal || !cal.parentNode){\r\n\t\t\t\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\t\t\t\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\t\t\t\tif(minicalendars[i] == cal){\r\n\t\t\t\t\t\tscheduler.eventRemove(minicalendars[i], \"focus\", focusMinical);\r\n\t\t\t\t\t\tminicalendars.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn res;\r\n\t\t};\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\r\n\tthis.layers.sort(function(a, b){\r\n\t\treturn a.zIndex - b.zIndex;\r\n\t});\r\n\r\n\tscheduler._dp_init=function(dp){\r\n\t\tdp._methods=[\"_set_event_text_style\",\"\",\"changeEventId\",\"deleteEvent\"];\r\n\r\n\t\tthis.attachEvent(\"onEventAdded\",function(id){\r\n\t\t\tif (!this._loading && this.validId(id) && this.getEvent(id) && this.getEvent(id).layer == dp.layer)\r\n\t\t\t\tdp.setUpdated(id,true,\"inserted\");\r\n\t\t});\r\n\t\tthis.attachEvent(\"onBeforeEventDelete\",function(id){\r\n\t\t\tif(this.getEvent(id) && this.getEvent(id).layer == dp.layer) {\r\n\t\t\t\tif (!this.validId(id)) return;\r\n\t\t\t\tvar z=dp.getState(id);\r\n\r\n\t\t\t\tif (z==\"inserted\" || this._new_event) { dp.setUpdated(id,false);\t\treturn true; }\r\n\t\t\t\tif (z==\"deleted\") return false;\r\n\t\t\t\tif (z==\"true_deleted\") return true;\r\n\r\n\t\t\t\tdp.setUpdated(id,true,\"deleted\");\r\n\t\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\telse return true;\r\n\t\t});\r\n\t\tthis.attachEvent(\"onEventChanged\",function(id){\r\n\t\t\tif (!this._loading && this.validId(id) && this.getEvent(id) && this.getEvent(id).layer == dp.layer)\r\n\t\t\t\tdp.setUpdated(id,true,\"updated\");\r\n\t\t});\r\n\r\n\t\tdp._getRowData=function(id,pref){\r\n\t\t\tvar ev=this.obj.getEvent(id);\r\n\t\t\tvar data = {};\r\n\r\n\t\t\tfor (var a in ev){\r\n\t\t\t\tif (a.indexOf(\"_\")===0) continue;\r\n\t\t\t\tif (ev[a] && ev[a].getUTCFullYear) //not very good, but will work\r\n\t\t\t\t\tdata[a] = this.obj._helpers.formatDate(ev[a]);\r\n\t\t\t\telse\r\n\t\t\t\t\tdata[a] = ev[a];\r\n\t\t\t}\r\n\t\t\treturn data;\r\n\t\t};\r\n\t\tdp._clearUpdateFlag=function(){};\r\n\r\n\t\tdp.attachEvent(\"insertCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"updateCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"deleteCallback\", function(upd, id) {\r\n\t\t\tthis.obj.setUserData(id, this.action_param, \"true_deleted\");\r\n\t\t\tthis.obj.deleteEvent(id);\r\n\t\t});\r\n\t};\r\n\r\n\t(function() {\r\n var _cloneObj = function(obj){\r\n if(obj === null || typeof(obj) != 'object')\r\n return obj;\r\n var temp = new obj.constructor();\r\n for(var key in obj)\r\n temp[key] = _cloneObj(obj[key]);\r\n return temp;\r\n };\r\n\r\n\t\tscheduler._dataprocessors = [];\r\n\t\tscheduler._layers_zindex = {};\r\n\t\tfor(var i=0; i= scheduler.config.collision_limit);\r\n\t});\r\n\r\n\tscheduler.addEvent=function(start_date,end_date,text,id,extra_data){\r\n\t\tvar ev=start_date;\r\n\t\tif (arguments.length!=1){\r\n\t\t\tev=extra_data||{};\r\n\t\t\tev.start_date=start_date;\r\n\t\t\tev.end_date=end_date;\r\n\t\t\tev.text=text;\r\n\t\t\tev.id=id;\r\n\t\t\tev.layer = this.defaultLayer;\r\n\t\t}\r\n\t\tev.id = ev.id||scheduler.uid();\r\n\t\tev.text = ev.text||\"\";\r\n\r\n\r\n\t\tif (typeof ev.start_date == \"string\") ev.start_date=this.templates.api_date(ev.start_date);\r\n\t\tif (typeof ev.end_date == \"string\") ev.end_date=this.templates.api_date(ev.end_date);\r\n\t\tev._timed=this.isOneDayEvent(ev);\r\n\r\n\t\tvar is_new=!this._events[ev.id];\r\n\t\tthis._events[ev.id]=ev;\r\n\t\tthis.event_updated(ev);\r\n\t\tif (!this._loading)\r\n\t\t\tthis.callEvent(is_new?\"onEventAdded\":\"onEventChanged\",[ev.id,ev]);\r\n\t};\r\n\r\n\tthis._evs_layer = {};\r\n\tfor (var i = 0; i < this.layers.length; i++) { // array in object for each layer\r\n\t\tthis._evs_layer[this.layers[i].name] = [];\r\n\t}\r\n\r\n\tscheduler.addEventNow=function(start,end,e){\r\n\t\tvar base = {};\r\n\t\tif (typeof start == \"object\"){\r\n\t\t\tbase = start;\r\n\t\t\tstart = null;\r\n\t\t}\r\n\r\n\t\tvar d = (this.config.event_duration||this.config.time_step)*60000;\r\n\t\tif (!start) start = Math.round((scheduler._currentDate()).valueOf()/d)*d;\r\n\t\tvar start_date = new Date(start);\r\n\t\tif (!end){\r\n\t\t\tvar start_hour = this.config.first_hour;\r\n\t\t\tif (start_hour > start_date.getHours()){\r\n\t\t\t\tstart_date.setHours(start_hour);\r\n\t\t\t\tstart = start_date.valueOf();\r\n\t\t\t}\r\n\t\t\tend = start+d;\r\n\t\t}\r\n\r\n\r\n\t\tbase.start_date = base.start_date||start_date;\r\n\t\tbase.end_date = base.end_date||new Date(end);\r\n\t\tbase.text = base.text||this.locale.labels.new_event;\r\n\t\tbase.id = this._drag_id = this.uid();\r\n\t\tbase.layer = this.defaultLayer;\r\n\t\tthis._drag_mode=\"new-size\";\r\n\r\n\t\tthis._loading=true;\r\n\t\tthis.addEvent(base);\r\n\t\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\t\tthis._loading=false;\r\n\r\n\t\tthis._drag_event={}; //dummy , to trigger correct event updating logic\r\n\t\tthis._on_mouse_up(e);\r\n\t};\r\n\r\n\tscheduler._t_render_view_data = function(events) { // helper\r\n\t\tif (this.config.multi_day && !this._table_view) {\r\n\t\t\tvar tvs = [];\r\n\t\t\tvar tvd = [];\r\n\t\t\tfor (var k = 0; k < events.length; k++) {\r\n\t\t\t\tif (events[k]._timed)\r\n\t\t\t\t\ttvs.push(events[k]);\r\n\t\t\t\telse\r\n\t\t\t\t\ttvd.push(events[k]);\r\n\t\t\t}\r\n\t\t\tthis._table_view = true;\r\n\t\t\tthis.render_data(tvd);\r\n\t\t\tthis._table_view = false;\r\n\t\t\tthis.render_data(tvs);\r\n\t\t}\r\n\t\telse\r\n\t\t\tthis.render_data(events);\r\n\t};\r\n\r\n\tscheduler.render_view_data = function(){\r\n\t\tif (this._not_render) {\r\n\t\t\tthis._render_wait = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._render_wait = false;\r\n\r\n\t\tthis.clear_view();\r\n\r\n\t\tthis._evs_layer = {};\r\n\t\tfor (var i = 0; i < this.layers.length; i++) { // array in object for each layer\r\n\t\t\tthis._evs_layer[this.layers[i].name] = [];\r\n\t\t}\r\n\r\n\t\tvar evs = this.get_visible_events();\r\n\t\tfor (var i = 0; i < evs.length; i++) { // filling layer arrays with events\r\n\t\t\tif(this._evs_layer[evs[i].layer])\r\n\t\t\t\tthis._evs_layer[evs[i].layer].push(evs[i]);\r\n\t\t}\r\n\r\n\t\tif(this._mode == 'month') { // old logic is used\r\n\t\t\tvar tevs = [];\r\n\t\t\tfor (var i = 0; i < this.layers.length; i++) {\r\n\t\t\t\tif (this.layers[i].visible)\r\n\t\t\t\t\ttevs = tevs.concat(this._evs_layer[this.layers[i].name]);\r\n\t\t\t}\r\n\t\t\tthis._t_render_view_data(tevs);\r\n\t\t}\r\n\t\telse { // week, day; should use new logic\r\n\t\t\tfor (var i = 0; i < this.layers.length; i++) {\r\n\t\t\t\tif (this.layers[i].visible) {\r\n\t\t\t\t\tvar evs_layer = this._evs_layer[this.layers[i].name];\r\n\t\t\t\t\tthis._t_render_view_data(evs_layer);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._render_v_bar=function(ev,x,y,w,h,style,contentA,contentB,bottom){\r\n\t\tvar id = ev.id;\r\n\r\n\t\tif(contentA.indexOf('
';\r\n\t\thtml+='
 
';\r\n\t\thtml+='
'+contentA+'
';\r\n\t\thtml+='
'+contentB+'
';\r\n\t\thtml+='
';\r\n\r\n\t\td.innerHTML=html;\r\n\t\td.style.zIndex = 100;\r\n\t\treturn d.firstChild;\r\n\t};\r\n\r\n\tscheduler.render_event_bar=function(ev){\r\n\t\tvar parent=this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tvar x=this._colsS[ev._sday];\r\n\t\tvar x2=this._colsS[ev._eday];\r\n\t\tif (x2==x) x2=this._colsS[ev._eday+1];\r\n\t\tvar hb = this.xy.bar_height;\r\n\r\n\t\tvar y=this._colsS.heights[ev._sweek]+(this._colsS.height?(this.xy.month_scale_height+2):2)+ev._sorder*hb;\r\n\r\n\t\tvar d=document.createElement(\"div\");\r\n\t\tvar cs = ev._timed?\"dhx_cal_event_clear\":\"dhx_cal_event_line\";\r\n\t\tvar cse = (scheduler.templates['event_class_'+ev.layer])?scheduler.templates['event_class_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_class(ev.start_date,ev.end_date,ev);\r\n\t\tif (cse) cs=cs+\" \"+cse;\r\n\r\n\t\tvar html='
';\r\n\r\n\t\tif (ev._timed)\r\n\t\t\thtml+=(scheduler.templates['event_bar_date_'+ev.layer])?scheduler.templates['event_bar_date_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_bar_date(ev.start_date,ev.end_date,ev);\r\n\t\thtml+=( (scheduler.templates['event_bar_text_'+ev.layer])?scheduler.templates['event_bar_text_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_bar_text(ev.start_date,ev.end_date,ev) + '
)');\r\n\t\thtml+='';\r\n\r\n\t\td.innerHTML=html;\r\n\r\n\t\tthis._rendered.push(d.firstChild);\r\n\t\tparent.appendChild(d.firstChild);\r\n\t};\r\n\r\n\tscheduler.render_event=function(ev){\r\n\t\tvar menu = scheduler.xy.menu_width;\r\n\t\tif(scheduler.getLayer(ev.layer).noMenu)\r\n\t\t\tmenu = 0;\r\n\r\n\t\tif (ev._sday<0) return; //can occur in case of recurring event during time shift\r\n\t\tvar parent=scheduler.locate_holder(ev._sday);\r\n\t\tif (!parent) return; //attempt to render non-visible event\r\n\t\tvar sm = ev.start_date.getHours()*60+ev.start_date.getMinutes();\r\n\t\tvar em = (ev.end_date.getHours()*60+ev.end_date.getMinutes())||(scheduler.config.last_hour*60);\r\n\r\n\t\tvar top = (Math.round((sm*60*1000-this.config.first_hour*60*60*1000)*this.config.hour_size_px/(60*60*1000)))%(this.config.hour_size_px*24)+1; //42px/hour\r\n\t\tvar height = Math.max(scheduler.xy.min_event_height,(em-sm)*this.config.hour_size_px/60)+1; //42px/hour\r\n\t\t\r\n\t\tvar width=Math.floor((parent.clientWidth-menu)/ev._count);\r\n\t\tvar left=ev._sorder*width+1;\r\n\t\tif (!ev._inner) width=width*(ev._count-ev._sorder);\r\n\r\n\r\n\r\n\t\tvar d=this._render_v_bar(ev.id,menu+left,top,width,height,ev._text_style,scheduler.templates.event_header(ev.start_date,ev.end_date,ev),scheduler.templates.event_text(ev.start_date,ev.end_date,ev));\r\n\r\n\t\tthis._rendered.push(d);\r\n\t\tparent.appendChild(d);\r\n\r\n\t\tleft=left+parseInt(parent.style.left,10)+menu;\r\n\r\n\t\ttop+=this._dy_shift; //corrupt top, to include possible multi-day shift\r\n\t\td.style.zIndex = this._layers_zindex[ev.layer];\r\n\r\n\t\tif (this._edit_id==ev.id){\r\n\t\t\td.style.zIndex = parseInt(d.style.zIndex)+1; //fix overlapping issue\r\n\t\t\tvar new_zIndex = d.style.zIndex;\r\n\t\t\twidth=Math.max(width-4,scheduler.xy.editor_width);\r\n\t\t\tvar d=document.createElement(\"div\");\r\n\t\t\td.setAttribute(\"event_id\",ev.id); // for backward compatibility\r\n\t\t\td.setAttribute(this.config.event_attribute,ev.id);\r\n\t\t\tthis.set_xy(d,width,height-20,left,top+14);\r\n\t\t\td.className=\"dhx_cal_editor\";\r\n\t\t\td.style.zIndex = new_zIndex;\r\n\t\t\tvar d2=document.createElement(\"div\");\r\n\t\t\tthis.set_xy(d2,width-6,height-26);\r\n\t\t\td2.style.cssText+=\";margin:2px 2px 2px 2px;overflow:hidden;\";\r\n\r\n\r\n\t\t\td2.style.zIndex = new_zIndex;\r\n\t\t\td.appendChild(d2);\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].appendChild(d);\r\n\t\t\tthis._rendered.push(d);\r\n\r\n\t\t\td2.innerHTML=\"\";\r\n\r\n\t\t\tthis._editor=d2.firstChild;\r\n\t\t\tthis._editor.addEventListener(\"keypress\", function(e){\r\n\t\t\t\tif (e.shiftKey) return true;\r\n\t\t\t\tvar code= e.keyCode;\r\n\t\t\t\tif (code==scheduler.keys.edit_save) scheduler.editStop(true);\r\n\t\t\t\tif (code==scheduler.keys.edit_cancel) scheduler.editStop(false);\r\n\t\t\t});\r\n\t\t\tthis._editor.addEventListener(\"selectstart\", function(e){ e.cancelBubble=true; return true; });\r\n\t\t\td2.firstChild.focus();\r\n\t\t\t//IE and opera can add x-scroll during focusing\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].scrollLeft=0;\r\n\t\t\td2.firstChild.select();\r\n\t\t}\r\n\t\tif (this._select_id==ev.id){\r\n\t\t\td.style.zIndex = parseInt(d.style.zIndex)+1; //fix overlapping issue\r\n\t\t\tvar icons=this.config[\"icons_\"+((this._edit_id==ev.id)?\"edit\":\"select\")];\r\n\t\t\tvar icons_str=\"\";\r\n\t\t\tfor (var i=0; i\";\r\n\t\t\tvar obj = this._render_v_bar(ev.id,left-menu+1,top,menu,icons.length*20+26,\"\",\"
\",icons_str,true);\r\n\t\t\tobj.style.left=left-menu+1;\r\n\t\t\tobj.style.zIndex = d.style.zIndex;\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].appendChild(obj);\r\n\t\t\tthis._rendered.push(obj);\r\n\t\t}\r\n\r\n\t};\r\n\r\n scheduler.filter_agenda = function(id, event) {\r\n var layer = scheduler.getLayer(event.layer);\r\n return (layer && layer.visible);\r\n };\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.limit_start = null;\r\nscheduler.config.limit_end = null;\r\nscheduler.config.limit_view = false;\r\nscheduler.config.check_limits = true;\r\nscheduler.config.mark_now = true;\r\nscheduler.config.display_marked_timespans = true;\r\nscheduler.config.overwrite_marked_timespans = true;\r\nscheduler._temp_limit_scope = function(){\r\n\tvar before = null;\r\n\tvar dhx_time_block = \"dhx_time_block\";\r\n\tvar default_timespan_type = \"default\";\r\n\tvar fix_options = function(options, days, zones) {\r\n\t\tif (days instanceof Date && zones instanceof Date) {\r\n\t\t\toptions.start_date = days;\r\n\t\t\toptions.end_date = zones;\r\n\t\t} else {\r\n\t\t\toptions.days = days;\r\n\t\t\toptions.zones = zones;\r\n\t\t}\r\n\t\treturn options;\r\n\t};\r\n\tvar get_resulting_options = function(days, zones, sections) {\r\n\t\tvar options = (typeof days == \"object\") ? days : { days: days };\r\n\t\toptions.type = dhx_time_block;\r\n\t\toptions.css = \"\";\r\n\t\tif (zones) {\r\n\t\t\tif (sections)\r\n\t\t\t\toptions.sections = sections;\r\n\t\t\toptions = fix_options(options, days, zones);\r\n\t\t}\r\n\t\treturn options;\r\n\t};\r\n\tscheduler.blockTime = function(days, zones, sections){\r\n\t\tvar options = get_resulting_options(days, zones, sections);\r\n\t\treturn scheduler.addMarkedTimespan(options);\r\n\t};\r\n\tscheduler.unblockTime = function(days, zones, sections) {\r\n\t\tzones = zones || \"fullday\";\r\n\t\tvar options = get_resulting_options(days, zones, sections);\r\n\t\treturn scheduler.deleteMarkedTimespan(options);\r\n\t};\r\n\tscheduler.attachEvent(\"onBeforeViewChange\",function(om,od,nm,nd){\r\n\r\n\t\tfunction isBlocked(date, mode){\r\n\t\t\tvar limit_start = scheduler.config.limit_start,\r\n\t\t\t\tlimit_end = scheduler.config.limit_end,\r\n\t\t\t\tdate_end = scheduler.date.add(date,1,mode);\r\n\r\n\t\t\treturn (date.valueOf() > limit_end.valueOf() || date_end <= limit_start.valueOf());\r\n\t\t}\r\n\r\n\t\tif (scheduler.config.limit_view){\r\n\t\t\tnd = nd||od; nm = nm||om;\r\n\t\t\tif (isBlocked(nd, nm) && !(od.valueOf() == nd.valueOf())){\r\n\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvar resetDate = !isBlocked(od, nm) ? od : scheduler.config.limit_start;\r\n\r\n\t\t\t\t\tscheduler.setCurrentView(!isBlocked(resetDate, nm) ? resetDate : null, nm);\r\n\t\t\t\t},1);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.checkInMarkedTimespan = function(ev, timespan_type, on_overlap){\r\n\t\ttimespan_type = timespan_type || default_timespan_type;\r\n\r\n\t\tvar res = true;\r\n\t\tvar temp_start_date = new Date(ev.start_date.valueOf());\r\n\t\tvar temp_end_date = scheduler.date.add(temp_start_date, 1, \"day\");\r\n\t\tvar timespans = scheduler._marked_timespans;\r\n\t\tfor (; temp_start_date < ev.end_date; temp_start_date = scheduler.date.date_part(temp_end_date), temp_end_date = scheduler.date.add(temp_start_date, 1, \"day\") ) {\r\n\t\t\tvar day_value = +scheduler.date.date_part( new Date(temp_start_date) ); // the first part of event not necessarily contains only date part\r\n\t\t\tvar day_index = temp_start_date.getDay();\r\n\r\n\t\t\tvar zones = getZones(ev, timespans, day_index, day_value, timespan_type);\r\n\t\t\tif (zones){\r\n\t\t\t\tfor (var i = 0; i < zones.length; i+=2) {\r\n\r\n\t\t\t\t\t// they may change for new event if it passes limit zone\r\n\t\t\t\t\tvar eventStart = scheduler._get_zone_minutes(temp_start_date);\r\n\t\t\t\t\tvar eventEnd = ( ev.end_date>temp_end_date || ev.end_date.getDate() != temp_start_date.getDate() ) ? 1440 : scheduler._get_zone_minutes(ev.end_date);\r\n\r\n\t\t\t\t\tvar markerStart = zones[i];\r\n\t\t\t\t\tvar markerEnd = zones[i+1];\r\n\t\t\t\t\tif (markerStarteventStart) {\r\n\t\t\t\t\t\tif(typeof on_overlap == \"function\"){\r\n\t\t\t\t\t\t\t//handler allows to cancel overlapping\r\n\t\t\t\t\t\t\t//actually needed only to keep default behavior of limits\r\n\t\t\t\t\t\t\tres = on_overlap(ev, eventStart, eventEnd, markerStart, markerEnd);//event object, event start/end minutes in 'zones' format, zone start/end minutes\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tres = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(!res)\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn !res;\r\n\t};\r\n\tvar blocker = scheduler.checkLimitViolation = function(event){\r\n\t\tif(!event)\r\n\t\t\treturn true;\r\n\t\tif (!scheduler.config.check_limits)\r\n\t\t\treturn true;\r\n\t\tvar s = scheduler;\r\n\t\tvar c = s.config;\r\n\t\tvar evs = [];\r\n\t\tif (event.rec_type) {\r\n\t\t\tvar dates = scheduler.getRecDates(event);\r\n\t\t\tfor(var i=0; i < dates.length; i++){\r\n\t\t\t\tvar ev = scheduler._copy_event(event);\r\n\t\t\t\tscheduler._lame_copy(ev, dates[i]);\r\n\t\t\t\tevs.push(ev);\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\tevs = [event];\r\n\t\t}\r\n\r\n\t\tvar complete_res = true;\r\n\t\tfor (var p=0; p= c.limit_start.valueOf() && ev.end_date.valueOf() <= c.limit_end.valueOf()) : true;\r\n\t\t\tif (res){\r\n\t\t\t\tres = !scheduler.checkInMarkedTimespan(ev, dhx_time_block, function(event, eventStart, eventEnd, markerStart, markerEnd){\r\n\t\t\t\t\t//try crop event to allow placing\r\n\t\t\t\t\tvar allow = true;\r\n\t\t\t\t\tif (eventStart<=markerEnd && eventStart >= markerStart){\r\n\t\t\t\t\t\tif (markerEnd == 24*60 || eventEnd <= markerEnd){\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(event._timed && s._drag_id && s._drag_mode == \"new-size\"){\r\n\t\t\t\t\t\t\tevent.start_date.setHours(0);\r\n\t\t\t\t\t\t\tevent.start_date.setMinutes(markerEnd);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ((eventEnd >= markerStart && eventEnd <= markerEnd) || (eventStart < markerStart && eventEnd > markerEnd)){\r\n\t\t\t\t\t\tif(event._timed && s._drag_id && s._drag_mode == \"new-size\"){\r\n\t\t\t\t\t\t\tevent.end_date.setHours(0);\r\n\t\t\t\t\t\t\tevent.end_date.setMinutes(markerStart);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn allow;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\tif (!res) {\r\n\t\t\t\tres = (s.checkEvent(\"onLimitViolation\")) ? s.callEvent(\"onLimitViolation\",[ev.id, ev]) : res;\r\n\t\t\t}\r\n\t\t\tcomplete_res = complete_res && res;\r\n\t\t}\r\n\t\tif(!complete_res){\r\n\t\t\ts._drag_id = null;\r\n\t\t\ts._drag_mode = null;\r\n\t\t}\r\n\t\treturn complete_res;\r\n\r\n\r\n\t};\r\n\tscheduler._get_blocked_zones = function(timespans, property, day_index, day_value, timespan_type){\r\n\t\tvar zones =[];\r\n\t\tif (timespans && timespans[property]) {\r\n\t\t\tvar timeline_zones = timespans[property];\r\n\t\t\tvar blocked_timeline_zones = this._get_relevant_blocked_zones(day_index, day_value, timeline_zones, timespan_type);\r\n\t\t\tfor (var i=0; i= scheduler.config.limit_end.valueOf()) {\r\n\t\t\t\tev.start_date = this.date.add(scheduler.config.limit_end, -1, \"day\");\r\n\t\t\t}\r\n\t\t\tif (ev.end_date < scheduler.config.limit_start) {\r\n\t\t\t\tev.end_date = new Date(scheduler.config.limit_start);\r\n\t\t\t}\r\n\t\t\tif (ev.end_date.valueOf() >= scheduler.config.limit_end.valueOf()) {\r\n\t\t\t\tev.end_date = this.date.add(scheduler.config.limit_end, -1, \"day\");\r\n\t\t\t}\r\n\t\t\tif (ev.start_date.valueOf() >= ev.end_date.valueOf()) {\r\n\t\t\t\tev.end_date = this.date.add(ev.start_date, (this.config.event_duration||this.config.time_step), \"minute\");\r\n\t\t\t}\r\n\t\t\tev._timed=this.isOneDayEvent(ev);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventChanged\",function(id){\r\n\t\tif (!id) return true;\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tif (!blocker(ev)){\r\n\t\t\tif (!before) return false;\r\n\t\t\tev.start_date = before[0];\r\n\t\t\tev.end_date = before[1];\r\n\t\t\tev._timed=this.isOneDayEvent(ev);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onBeforeEventChanged\",function(ev, native_object, is_new){\r\n\t\treturn blocker(ev);\r\n\t});\r\n\tscheduler.attachEvent(\"onBeforeEventCreated\", function(ev) { // native event\r\n\t\tvar start_date = scheduler.getActionData(ev).date;\r\n\t\tvar event = {\r\n\t\t\t_timed: true,\r\n\t\t\tstart_date: start_date,\r\n\t\t\tend_date: scheduler.date.add(start_date, scheduler.config.time_step, \"minute\")\r\n\t\t};\r\n\t\treturn blocker(event);\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", function(){\r\n\t\tscheduler._mark_now();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onAfterSchedulerResize\", function(){\r\n\t\twindow.setTimeout(function(){ \r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler._mark_now(); \r\n\t\t}, 1);\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\t\tscheduler._mark_now_timer = window.setInterval(function() {\r\n\t\t\tif(!scheduler._is_initialized())\r\n\t\t\t\treturn;\r\n\t\t\tscheduler._mark_now();\r\n\t\t}, 60000);\r\n\t});\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tclearInterval(scheduler._mark_now_timer);\r\n\t});\r\n\tscheduler._mark_now = function(hide) {\r\n\t\t// day, week, units views\r\n\t\tvar dhx_now_time = 'dhx_now_time';\r\n\t\tif (!this._els[dhx_now_time]) {\r\n\t\t\tthis._els[dhx_now_time] = [];\r\n\t\t}\r\n\t\tvar now = scheduler._currentDate();\r\n\t\tvar cfg = this.config;\r\n\t\tscheduler._remove_mark_now(); // delete previous marks if they exist\r\n\t\tif (!hide && cfg.mark_now && now < this._max_date && now > this._min_date && now.getHours() >= cfg.first_hour && now.getHours() 1) {\r\n\t\t\t\t\tif(view.size && view.options.length){\r\n\t\t\t\t\t\tday_index = ((view.position+ day_index) / view.options.length) * view.size;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstart_index = day_index;\r\n\t\t\t\t\tend_index = day_index + units_l;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tstart_index = 0;\r\n\t\t\t\t\tend_index = start_index + units_l;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar r_divs = [];\r\n\r\n\t\t\t\tfor (var i = start_index; i < end_index; i++) {\r\n\t\t\t\t\tvar t_day = i; // as each unit is actually considered +1 day\r\n\t\t\t\t\toptions.days = t_day;\r\n\t\t\t\t\tvar t_div = scheduler._render_marked_timespan(options, null, t_day)[0];\r\n\t\t\t\t\tr_divs.push(t_div);\r\n\t\t\t\t}\r\n\t\t\t\treturn r_divs;\r\n\t\t\t} else { // day/week views\r\n\t\t\t\toptions.days = day_index;\r\n\t\t\t\treturn scheduler._render_marked_timespan(options, null, day_index);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\toptions.days = +scheduler.date.date_part(now);\r\n\t\t\t\treturn scheduler._render_marked_timespan(options, null, null);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\tscheduler._remove_mark_now = function() {\r\n\t\tvar dhx_now_time = 'dhx_now_time';\r\n\t\tvar els = this._els[dhx_now_time];\r\n\t\tfor (var i=0; i config.start_date) || (config.days !== undefined && config.zones)) && !config.type )\r\n\t\t\treturn r_configs; // incorrect config was provided\r\n\r\n\t\tvar min = 0;\r\n\t\tvar max = 24*60;\r\n\t\tif (config.zones == \"fullday\")\r\n\t\t\tconfig.zones = [min, max];\r\n\t\tif (config.zones && config.invert_zones) {\r\n\t\t\tconfig.zones = scheduler.invertZones(config.zones);\r\n\t\t}\r\n\r\n\t\tconfig.id = scheduler.uid();\r\n\t\tconfig.css = config.css||\"\";\r\n\t\tconfig.type = config.type||default_timespan_type;\r\n\r\n\t\tvar sections = config.sections;\r\n\t\tif (sections) {\r\n\t\t\tfor (var view_key in sections) {\r\n\t\t\t\tif (sections.hasOwnProperty(view_key)) {\r\n\t\t\t\t\tvar ids = sections[view_key];\r\n\t\t\t\t\tif (!(ids instanceof Array))\r\n\t\t\t\t\t\tids = [ids];\r\n\t\t\t\t\tfor (var i=0; i t_sd) ? scheduler._get_zone_minutes(start_date) : min;\r\n\t\t\t\t\tvar zone_end = ( end_date > t_ed || end_date.getDate() != t_sd.getDate() ) ? max : scheduler._get_zone_minutes(end_date);\r\n\t\t\t\t\tt_config.zones = [zone_start, zone_end];\r\n\t\t\t\t\tr_configs.push(t_config);\r\n\r\n\t\t\t\t\tt_sd = t_ed;\r\n\t\t\t\t\tt_ed = scheduler.date.add(t_ed, 1, \"day\");\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (c_config.days instanceof Date)\r\n\t\t\t\t\tc_config.days = (scheduler.date.date_part(c_config.days)).valueOf();\r\n\t\t\t\tc_config.zones = config.zones.slice();\r\n\t\t\t\tr_configs.push(c_config);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn r_configs;\r\n\t};\r\n\tscheduler._get_dates_by_index = function(index, start, end) {\r\n\t\tvar dates = [];\r\n\t\tstart = scheduler.date.date_part(new Date(start||scheduler._min_date));\r\n\t\tend = new Date(end||scheduler._max_date);\r\n\t\tvar start_day = start.getDay();\r\n\t\tvar delta = (index-start_day >= 0) ? (index-start_day) : (7-start.getDay()+index);\r\n\t\tvar t_date = scheduler.date.add(start, delta, \"day\");\r\n\t\tfor (; t_date < end; t_date = scheduler.date.add(t_date, 1, \"week\")) {\r\n\t\t\tdates.push(t_date);\r\n\t\t}\r\n\t\treturn dates;\r\n\t};\r\n\tscheduler._get_css_classes_by_config = function(config) {\r\n\t\tvar css_classes = [];\r\n\t\tif (config.type == dhx_time_block) {\r\n\t\t\tcss_classes.push(dhx_time_block);\r\n\t\t\tif (config.css)\r\n\t\t\t\tcss_classes.push(dhx_time_block+\"_reset\");\r\n\t\t}\r\n\t\tcss_classes.push(\"dhx_marked_timespan\", config.css);\r\n\t\treturn css_classes.join(\" \");\r\n\t};\r\n\tscheduler._get_block_by_config = function(config) {\r\n\t\tvar block = document.createElement(\"div\");\r\n\t\tif (config.html) {\r\n\t\t\tif (typeof config.html == \"string\")\r\n\t\t\t\tblock.innerHTML = config.html;\r\n\t\t\telse\r\n\t\t\t\tblock.appendChild(config.html);\r\n\t\t}\r\n\t\treturn block;\r\n\t};\r\n\tscheduler._render_marked_timespan = function(options, area, day) {\r\n\t\tvar blocks = []; // resulting block which will be rendered and returned\r\n\t\tvar c = scheduler.config;\r\n\t\tvar min_date = this._min_date;\r\n\t\tvar max_date = this._max_date;\r\n\t\tvar day_value = false; // if timespan for specific date should be displayed\r\n\r\n\t\tif (!c.display_marked_timespans)\r\n\t\t\treturn blocks;\r\n\r\n\t\t// in case of markTimespan\r\n\t\tif (!day && day !== 0) {\r\n\t\t\tif (options.days < 7)\r\n\t\t\t\tday = options.days;\r\n\t\t\telse {\r\n\t\t\t\tvar date_to_display = new Date(options.days);\r\n\t\t\t\tday_value = +date_to_display;\r\n\r\n\t\t\t\t// in case of markTimespan date could be not in the viewing range, need to return\r\n\t\t\t\tif ( !(+max_date > +date_to_display && +min_date <= +date_to_display) )\r\n\t\t\t\t\treturn blocks;\r\n\r\n\t\t\t\tday = date_to_display.getDay();\r\n\t\t\t}\r\n\r\n\t\t\t// convert day default index (Sun - 0, Sat - 6) to index of hourscales (depends on week_start and config.start_on_monday)\r\n\t\t\tvar min_day = min_date.getDay();\r\n\t\t\tif (min_day > day) {\r\n\t\t\t\tday = 7 - (min_day-day);\r\n\t\t\t} else {\r\n\t\t\t\tday = day - min_day;\r\n\t\t\t}\r\n\t\t}\r\n\t\tvar zones = options.zones;\r\n\t\tvar css_classes = scheduler._get_css_classes_by_config(options);\r\n\r\n\t\tif (scheduler._table_view && scheduler._mode == \"month\") {\r\n\t\t\tvar areas = [];\r\n\t\t\tvar days = [];\r\n\r\n\r\n\t\t\tif (!area) {\r\n\t\t\t\tdays = (day_value) ? [day_value] : scheduler._get_dates_by_index(day);\r\n\t\t\t\tfor (var i=0; i < days.length; i++) {\r\n\t\t\t\t\tareas.push( this._scales[days[i]] );\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tareas.push(area);\r\n\t\t\t\tdays.push(day);\r\n\t\t\t}\r\n\r\n\t\t\tfor (var i=0; i < areas.length; i++) {\r\n\t\t\t\tarea = areas[i];\r\n\t\t\t\tday = days[i];\r\n\r\n\t\t\t\tvar sday = this.locate_holder_day(day, false) % this._cols.length;\r\n\r\n\t\t\t\tif(this._ignores[sday]) continue;\r\n\r\n\t\t\t\tvar block_proto = scheduler._get_block_by_config(options);\r\n\t\t\t\tblock_proto.className = css_classes;\r\n\t\t\t\tblock_proto.style.top = \"0px\";\r\n\t\t\t\tblock_proto.style.height = \"100%\";\r\n\t\t\t\t\r\n\t\t\t\tfor (var k=0; k < zones.length; k+=2) {\r\n\t\t\t\t\tvar start = zones[i];\r\n\t\t\t\t\tvar end = zones[i+1];\r\n\t\t\t\t\tif (end <= start)\r\n\t\t\t\t\t\treturn [];\r\n\r\n\t\t\t\t\tvar block = block_proto.cloneNode(true);\r\n\r\n\t\t\t\t\tblock.style.left = \"0px\";\r\n\t\t\t\t\tblock.style.width = \"100%\";\r\n\r\n\t\t\t\t\tarea.appendChild(block);\r\n\t\t\t\t\tblocks.push(block);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tvar index = day;\r\n\r\n\t\t\tif(this._ignores[this.locate_holder_day(day, false)]) return blocks;\r\n\r\n\t\t\tif (this._props && this._props[this._mode] && options.sections && options.sections[this._mode]) {\r\n\t\t\t\tvar view = this._props[this._mode];\r\n\t\t\t\tindex = view.order[options.sections[this._mode]];\r\n\r\n\t\t\t\tvar inner_index = view.order[options.sections[this._mode]];\r\n\t\t\t\tif(!(view.days > 1)){\r\n\t\t\t\t\tindex = inner_index;\r\n\t\t\t\t\tif (view.size && (index > view.position+view.size)) {\r\n\t\t\t\t\t\tindex = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar units_l = view.size || view.options.length;\r\n\t\t\t\t\tindex = index*units_l + inner_index;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tarea = area ? area : scheduler.locate_holder(index);\r\n\r\n\t\t\tfor (var i = 0; i < zones.length; i+=2){\r\n\t\t\t\tvar start = Math.max(zones[i], c.first_hour*60);\r\n\t\t\t\tvar end = Math.min(zones[i+1], c.last_hour*60);\r\n\t\t\t\tif (end <= start) {\r\n\t\t\t\t\tif (i+2 < zones.length)\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\treturn [];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar block = scheduler._get_block_by_config(options);\r\n\t\t\t\tblock.className = css_classes;\r\n\r\n\t\t\t\t// +1 for working with section which really takes up whole height (as % would be == 0)\r\n\t\t\t\tvar all_hours_height = this.config.hour_size_px*24 + 1;\r\n\t\t\t\tvar hour_ms = 60*60*1000;\r\n\t\t\t\tblock.style.top = (Math.round((start*60*1000-this.config.first_hour*hour_ms)*this.config.hour_size_px/hour_ms) % all_hours_height) + \"px\";\r\n\t\t\t\tblock.style.height = Math.max((Math.round(((end-start)*60*1000)*this.config.hour_size_px/hour_ms)) % all_hours_height, 1)+\"px\";\r\n\r\n\t\t\t\tarea.appendChild(block);\r\n\t\t\t\tblocks.push(block);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn blocks;\r\n\t};\r\n\r\n\tscheduler._mark_timespans = function(){\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\t\tvar divs = [];\r\n\t\tif (scheduler._table_view && scheduler._mode == \"month\"){\r\n\t\t\tfor (var day in this._scales) {\r\n\t\t\t\tvar date = new Date(+day);\r\n\t\t\t\tdivs.push.apply(divs, scheduler._on_scale_add_marker(this._scales[day],date));\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\t//manually trigger rendering of configs for each column\r\n\t\t\tvar date = new Date(scheduler._min_date);\r\n\t\t\tfor (var i = 0, len = data.childNodes.length; i < len; i++) {\r\n\t\t\t\tvar area = data.childNodes[i];\r\n\t\t\t\tif (area.firstChild && scheduler._getClassName(area.firstChild).indexOf(\"dhx_scale_hour\") > -1) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdivs.push.apply(divs, scheduler._on_scale_add_marker(area, date));\r\n\t\t\t\tdate = scheduler.date.add(date, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn divs;\r\n\t};\r\n\r\n\t// just marks timespan, will be cleaned after refresh\r\n\tscheduler.markTimespan = function(configuration) {\r\n\r\n\t\tif(!this._els){\r\n\t\t\tthrow new Error(\"`scheduler.markTimespan` can't be used before scheduler initialization. Place `scheduler.markTimespan` call after `scheduler.init`.\");\r\n\t\t}\r\n\r\n\t\tvar rebuild_els = false;\r\n\t\tif(!this._els[\"dhx_cal_data\"]){\r\n\t\t\tscheduler.get_elements();\r\n\t\t\trebuild_els = true;\r\n\t\t}\r\n\r\n\r\n\t\t// backup regular marked timespans\r\n\t\tvar timespans_ids = scheduler._marked_timespans_ids,\r\n\t\t\ttimespan_types = scheduler._marked_timespans_types,\r\n\t\t\ttimespans = scheduler._marked_timespans;\r\n\r\n\t\tscheduler.deleteMarkedTimespan();\r\n\r\n\t\t//add block to configs\r\n\t\tscheduler.addMarkedTimespan(configuration);\r\n\r\n\t\tvar divs = scheduler._mark_timespans();\r\n\r\n\t\tif(rebuild_els)\r\n\t\t\tscheduler._els = [];\r\n\r\n\t\t// restore timespan config\r\n\t\tscheduler._marked_timespans_ids = timespans_ids;\r\n\t\tscheduler._marked_timespans_types = timespan_types;\r\n\t\tscheduler._marked_timespans = timespans;\r\n\r\n\t\treturn divs;\r\n\t};\r\n\tscheduler.unmarkTimespan = function(divs) {\r\n\t\tif (!divs)\r\n\t\t\treturn;\r\n\t\tfor (var i=0; i c_zone_end && zone_start <= c_zone_end) || (zone_start < c_zone_start && zone_end >= c_zone_start)) {\r\n\t\t\t\t\tresulting_zones[i] = Math.min(c_zone_start, zone_start);\r\n\t\t\t\t\tresulting_zones[i+1] = Math.max(c_zone_end, zone_end);\r\n\t\t\t\t\ti -= 2;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (!isLast) // do nothing, maybe next current zone will match or will be last\r\n\t\t\t\t\t\tcontinue;\r\n\r\n\t\t\t\t\tvar offset = (c_zone_start > zone_start)?0:2;\r\n\t\t\t\t\tresulting_zones.splice(i+offset, 0, zone_start, zone_end); // last current zone, need to add another\r\n\t\t\t\t}\r\n\t\t\t\tzones.splice(k--,2); // zone was merged or added, need to exclude it\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn resulting_zones;\r\n\t};\r\n\tscheduler._subtract_timespan_zones = function(current_zones, zones) {\r\n\t\tvar resulting_zones = current_zones.slice();\r\n\t\tfor (var i=0; i c_zone_start && zone_start < c_zone_end) {\r\n\t\t\t\t\tvar is_modified = false;\r\n\t\t\t\t\tif (c_zone_start >= zone_start && c_zone_end <= zone_end) {\r\n\t\t\t\t\t\tresulting_zones.splice(i, 2);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (c_zone_start < zone_start) {\r\n\t\t\t\t\t\tresulting_zones.splice(i, 2, c_zone_start, zone_start);\r\n\t\t\t\t\t\tis_modified = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (c_zone_end > zone_end) {\r\n\t\t\t\t\t\tresulting_zones.splice( (is_modified)?(i+2):i, (is_modified)?0:2, zone_end, c_zone_end);\r\n\t\t\t\t\t}\r\n\t\t\t\t\ti -= 2;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn resulting_zones;\r\n\t};\r\n\tscheduler.invertZones = function(zones) {\r\n\t\treturn scheduler._subtract_timespan_zones([0, 1440], zones.slice());\r\n\t};\r\n\tscheduler._delete_marked_timespan_by_id = function(id) {\r\n\t\tvar configs = scheduler._marked_timespans_ids[id];\r\n\t\tif (configs) {\r\n\t\t\tfor (var i=0; i 1)){\r\n\t\t\t\tday = scheduler.date.date_part(new Date(this._date)); // for units view actually only 1 day is displayed yet the day variable will change, need to use this._date for all calls\r\n\t\t\t}else{\r\n\t\t\t\tvar dx = 24*60*60*1000;\r\n\t\t\t\tvar day_ind = Math.round((day - scheduler._min_date)/dx);\r\n\t\t\t\tvar unitsPerDay = view.size || units.length;\r\n\t\t\t\tday = scheduler.date.add(scheduler._min_date, Math.floor(day_ind/unitsPerDay), \"day\"); // to the \"same\" day for all sections\r\n\t\t\t\tday = scheduler.date.date_part(day);\r\n\t\t\t}\r\n\t\t\tday_index = day.getDay();\r\n\t\t\tday_value = day.valueOf();\r\n\r\n\t\t\tif (timespans[mode] && timespans[mode][unit.key]) {\r\n\t\t\t\tvar unit_zones = timespans[mode][unit.key];\r\n\t\t\t\tvar unit_types = scheduler._get_types_to_render(unit_zones[day_index], unit_zones[day_value]);\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(unit_types));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar global_data = timespans[\"global\"];\r\n\r\n\t\tif(scheduler.config.overwrite_marked_timespans){\r\n\t\t\tvar day_types = global_data[day_value]||global_data[day_index];\r\n\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(day_types));\r\n\t\t} else {\r\n\t\t\tif(global_data[day_value]){\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(global_data[day_value]));\r\n\t\t\t}\r\n\t\t\tif(global_data[day_index]){\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(global_data[day_index]));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (var i=0; i\" + ev.text + \"

\" + (ev.event_location || '') + \"

\" + scheduler.templates.marker_date(start) + \" - \" + scheduler.templates.marker_date(end) + \"\";\r\n};\r\nscheduler.dblclick_dhx_map_area = function() {\r\n\tif (!this.config.readonly && this.config.dblclick_create)\r\n\t\tthis.addEventNow({\r\n\t\t\tstart_date: scheduler._date,\r\n\t\t\tend_date: scheduler.date.add(scheduler._date, scheduler.config.time_step, \"minute\")\r\n\t\t});\r\n};\r\nscheduler.templates.map_time = function(start, end, ev) {\r\n\tif (scheduler.config.rtl && !ev._timed) {\r\n\t\treturn scheduler.templates.day_date(end) + \" – \" + scheduler.templates.day_date(start);\r\n\t} else if (ev._timed) {\r\n\t\treturn this.day_date(ev.start_date, ev.end_date, ev) + \" \" + this.event_date(start);\r\n\t} else {\r\n\t\treturn scheduler.templates.day_date(start) + \" – \" + scheduler.templates.day_date(end);\r\n\t}\r\n};\r\nscheduler.templates.map_text = function(start, end, ev) {\r\n\treturn ev.text;\r\n};\r\n\r\nscheduler.date.map_start = function(d) {\r\n\treturn d;\r\n};\r\nscheduler.date.add_map = function(date, inc, mode) {\r\n\treturn (new Date(date.valueOf()));\r\n};\r\n\r\nscheduler.templates.map_date = function(dd, ed, mode) {\r\n\treturn '';\r\n};\r\n\r\nscheduler._latLngUpdate = false; // flag for not displaying event second time in case of coordinates update\r\n\r\nscheduler.attachEvent(\"onSchedulerReady\", function() {\r\n\tscheduler._isMapPositionSet = false; // if user actual (geolocation) position was set on the map\r\n\r\n\tconst gmap = document.createElement('div');\r\n\tgmap.className = 'dhx_map';\r\n\tgmap.id = 'dhx_gmap';\r\n\tgmap.style.display = \"none\";\r\n\r\n\tscheduler._obj.appendChild(gmap);\r\n\r\n\tscheduler._els.dhx_gmap = [];\r\n\tscheduler._els.dhx_gmap.push(gmap);\r\n\r\n\t_setMapSize('dhx_gmap');\r\n\r\n\tconst mapOptions = {\r\n\t\tzoom: scheduler.config.map_initial_zoom || 10,\r\n\t\tcenter: scheduler.config.map_initial_position,\r\n\t\tmapTypeId: scheduler.config.map_type || google.maps.MapTypeId.ROADMAP\r\n\t};\r\n\tconst map = new google.maps.Map(document.getElementById('dhx_gmap'), mapOptions);\r\n\tmap.disableDefaultUI = false;\r\n\tmap.disableDoubleClickZoom = !scheduler.config.readonly;\r\n\r\n\tgoogle.maps.event.addListener(map, \"dblclick\", function(event) {\r\n\t\tconst geocoder = scheduler.ext.mapView.geocoder;\r\n\r\n\t\tif (!scheduler.config.readonly && scheduler.config.dblclick_create) {\r\n\t\t\tvar point = event.latLng;\r\n\t\t\tgeocoder.geocode(\r\n\t\t\t\t{ 'latLng': point },\r\n\t\t\t\tfunction(results, status) {\r\n\t\t\t\t\tif (status == google.maps.GeocoderStatus.OK) {\r\n\t\t\t\t\t\tpoint = results[0].geometry.location;\r\n\t\t\t\t\t\tscheduler.addEventNow({\r\n\t\t\t\t\t\t\tlat: point.lat(),\r\n\t\t\t\t\t\t\tlng: point.lng(),\r\n\t\t\t\t\t\t\tevent_location: results[0].formatted_address,\r\n\t\t\t\t\t\t\tstart_date: scheduler._date,\r\n\t\t\t\t\t\t\tend_date: scheduler.date.add(scheduler._date, scheduler.config.time_step, \"minute\")\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t}\r\n\t});\r\n\r\n\tvar infoWindowOptions = {\r\n\t\tcontent: ''\r\n\t};\r\n\r\n\tif (scheduler.config.map_infowindow_max_width) {\r\n\t\tinfoWindowOptions.maxWidth = scheduler.config.map_infowindow_max_width;\r\n\t}\r\n\r\n\tscheduler.map = {\r\n\t\t_points: [],\r\n\t\t_markers: [],\r\n\t\t_infowindow: new google.maps.InfoWindow(infoWindowOptions),\r\n\t\t_infowindows_content: [],\r\n\t\t_initialization_count: -1,\r\n\t\t_obj: map\r\n\t};\r\n\r\n\tscheduler.ext.mapView.geocoder = new google.maps.Geocoder();\r\n\tscheduler.ext.mapView.map = map;\r\n\tscheduler.ext.mapView.points = scheduler.map._points;\r\n\tscheduler.ext.mapView.markers = scheduler.map._markers;\r\n\tscheduler.ext.mapView.infoWindow = scheduler.map._infowindow;\r\n\r\n\tif (scheduler.config.map_resolve_user_location) {\r\n\t\tif (navigator.geolocation) {\r\n\t\t\tif (!scheduler._isMapPositionSet) {\r\n\t\t\t\tnavigator.geolocation.getCurrentPosition(function(position) {\r\n\t\t\t\t\tvar _userLocation = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);\r\n\t\t\t\t\tmap.setCenter(_userLocation);\r\n\t\t\t\t\tmap.setZoom(scheduler.config.map_zoom_after_resolve || 10);\r\n\t\t\t\t\tscheduler.map._infowindow.setContent(scheduler.locale.labels.marker_geo_success);\r\n\t\t\t\t\tscheduler.map._infowindow.position = map.getCenter();\r\n\t\t\t\t\tscheduler.map._infowindow.open(map);\r\n\r\n\t\t\t\t\tscheduler._isMapPositionSet = true;\r\n\t\t\t\t},\r\n\t\t\t\t\t\tfunction() {\r\n\t\t\t\t\t\t\tscheduler.map._infowindow.setContent(scheduler.locale.labels.marker_geo_fail);\r\n\t\t\t\t\t\t\tscheduler.map._infowindow.setPosition(map.getCenter());\r\n\t\t\t\t\t\t\tscheduler.map._infowindow.open(map);\r\n\t\t\t\t\t\t\tscheduler._isMapPositionSet = true;\r\n\t\t\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tgoogle.maps.event.addListener(map, \"resize\", function(event) {\r\n\t\tgmap.style.zIndex = '5';\r\n\t\tmap.setZoom(map.getZoom());\r\n\r\n\t});\r\n\tgoogle.maps.event.addListener(map, \"tilesloaded\", function(event) {\r\n\t\tgmap.style.zIndex = '5';\r\n\t});\r\n\r\n\tgmap.style.display = 'none'; // property was changed after attaching map\r\n\r\n\tconst old = scheduler.render_data;\r\n\tscheduler.render_data = function(evs, hold) {\r\n\t\tif (this._mode == \"map\") {\r\n\t\t\tfill_map_tab();\r\n\t\t\tvar events = scheduler.get_visible_events();\r\n\t\t\tfor (var i = 0; i < events.length; i++) {\r\n\t\t\t\tif (!scheduler.map._markers[events[i].id]) {\r\n\t\t\t\t\tshowAddress(events[i], false, false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else\r\n\t\t\treturn old.apply(this, arguments);\r\n\t};\r\n\r\n\tfunction set_full_view(mode) {\r\n\t\tif (mode) {\r\n\t\t\tvar l = scheduler.locale.labels;\r\n\t\t\tscheduler._els[\"dhx_cal_header\"][0].innerHTML = \"
\" + l.date + \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"
\" + l.description + \"
\";\r\n\t\t\tscheduler._table_view = true;\r\n\t\t\tscheduler.set_sizes();\r\n\t\t}\r\n\t}\r\n\r\n\tfunction clear_map_tab() {\r\n\t\tscheduler._selected_event_id = null;\r\n\t\tscheduler.map._infowindow.close();\r\n\t\tvar markers = scheduler.map._markers;\r\n\t\tfor (var key in markers) {\r\n\t\t\tif (markers.hasOwnProperty(key)) {\r\n\t\t\t\tmarkers[key].setMap(null);\r\n\t\t\t\tdelete scheduler.map._markers[key];\r\n\t\t\t\tif (scheduler.map._infowindows_content[key])\r\n\t\t\t\t\tdelete scheduler.map._infowindows_content[key];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction fill_map_tab() {\r\n\t\t//select events for which data need to be printed\r\n\t\tvar events = scheduler.get_visible_events();\r\n\t\tevents.sort(function(a, b) {\r\n\t\t\tif(a.start_date.valueOf()==b.start_date.valueOf())\r\n\t\t\t\treturn a.id>b.id?1:-1;\r\n\t\t\treturn a.start_date>b.start_date?1:-1;\r\n\t\t});\r\n\r\n\t\t//generate html for the view\r\n\t\tvar ariaAttr = scheduler._waiAria.mapAttrString();\r\n\r\n\t\tvar html = \"
\";\r\n\t\tfor (var i = 0; i < events.length; i++) {\r\n\t\t\tvar ev = events[i];\r\n\t\t\tvar event_class = (ev.id == scheduler._selected_event_id) ? 'dhx_map_line highlight' : 'dhx_map_line';\r\n\t\t\tvar bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\t\t\tvar color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\t\t\tvar ariaAttr = scheduler._waiAria.mapRowAttrString(ev);\r\n\t\t\tvar ariaButtonAttr = scheduler._waiAria.mapDetailsBtnString();\r\n\r\n\t\t\thtml += \"
\" + scheduler.templates.map_time(ev.start_date, ev.end_date, ev) + \"
\";\r\n\t\t\thtml += `
\r\n\t\t\t\r\n\t\t\t
`;\r\n\t\t\thtml += \"
\" + scheduler.templates.map_text(ev.start_date, ev.end_date, ev) + \"
\"; // -25 = icon size 20 and padding 5\r\n\t\t}\r\n\t\thtml += \"
\";\r\n\r\n\t\t//render html\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = 0; //fix flickering in FF\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t//\tscheduler._els[\"dhx_cal_data\"][0].style.width = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\r\n\t\tvar t = scheduler._els[\"dhx_cal_data\"][0].firstChild.childNodes;\r\n\r\n\t\tvar dateElement = scheduler._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML=scheduler.templates[scheduler._mode + \"_date\"](scheduler._min_date, scheduler._max_date, scheduler._mode);\r\n\t\t}\r\n\r\n\t\tscheduler._rendered = [];\r\n\t\tfor (var i = 0; i < t.length - 2; i++) {\r\n\t\t\tscheduler._rendered[i] = t[i];\r\n\t\t}\r\n\t}\r\n\r\n\tfunction _setMapSize(elem_id) { //input - map's div id\r\n\t\tvar map = document.getElementById(elem_id);\r\n\t\tconst nav_height = scheduler.$container.querySelector(\".dhx_cal_navline\").offsetHeight;\r\n\t\tvar height = scheduler._y - nav_height;\r\n\t\tif (height < 0)\r\n\t\t\theight = 0;\r\n\t\tvar width = scheduler._x - scheduler.xy.map_date_width - scheduler.xy.map_description_width - 1;\r\n\t\tif (width < 0)\r\n\t\t\twidth = 0;\r\n\t\tmap.style.height = height + 'px';\r\n\t\tmap.style.width = width + 'px';\r\n\t\tmap.style.position = \"absolute\";\r\n\t\tmap.style.top = nav_height + \"px\";\r\n\t\tif (scheduler.config.rtl) {\r\n\t\t\tmap.style.marginRight = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\t\t} else {\r\n\t\t\tmap.style.marginLeft = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\t\t}\r\n\t\tmap.style.marginTop = (scheduler.xy.nav_height + 2) + 'px';\r\n\t}\r\n\r\n\tscheduler.map_view = function(mode) {\r\n\t\tscheduler.map._initialization_count++;\r\n\t\tvar gmap = scheduler._els.dhx_gmap[0];\r\n\t\tvar temp_center;\r\n\t\t//scheduler._els.dhx_cal_data[0].style.width = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\r\n\t\tscheduler._min_date = scheduler.config.map_start || (scheduler._currentDate());\r\n\t\tscheduler._max_date = scheduler.config.map_end || scheduler.date.add(scheduler._currentDate(), 1, \"year\");\r\n\r\n\t\tscheduler._table_view = true;\r\n\t\tset_full_view(mode);\r\n\r\n\t\tif (mode) { //map tab activated\r\n\t\t\tclear_map_tab();\r\n\t\t\tfill_map_tab();\r\n\t\t\tgmap.style.display = 'block';\r\n\r\n\t\t\t// need to resize block every time window is resized\r\n\t\t\t_setMapSize('dhx_gmap');\r\n\t\t\ttemp_center = scheduler.map._obj.getCenter();\r\n\r\n\t\t\tvar events = scheduler.get_visible_events();\r\n\t\t\tfor (var i = 0; i < events.length; i++) {\r\n\t\t\t\tif (!scheduler.map._markers[events[i].id]) {\r\n\t\t\t\t\tshowAddress(events[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t} else { //map tab de-activated\r\n\t\t\tgmap.style.display = 'none';\r\n\t\t}\r\n\t\tgoogle.maps.event.trigger(scheduler.map._obj, 'resize');\r\n\r\n\t\tif (scheduler.map._initialization_count === 0 && temp_center) { // if tab is activated for the first time need to fix position\r\n\t\t\tscheduler.map._obj.setCenter(temp_center);\r\n\t\t}\r\n\r\n\t\tif (scheduler._selected_event_id) {\r\n\t\t\tselectEvent(scheduler._selected_event_id);\r\n\t\t}\r\n\t};\r\n\r\n\tvar selectEvent = function(event_id) {\r\n\t\tscheduler.map._obj.setCenter(scheduler.map._points[event_id]);\r\n\t\tscheduler.callEvent(\"onClick\", [event_id]);\r\n\t};\r\n\r\n\tvar showAddress = function(event, setCenter, performClick) { // what if event have incorrect position from the start?\r\n\t\tvar point = scheduler.config.map_error_position;\r\n\t\tif (event.lat && event.lng) {\r\n\t\t\tpoint = new google.maps.LatLng(event.lat, event.lng);\r\n\t\t}\r\n\t\tvar message = scheduler.templates.marker_text(event.start_date, event.end_date, event);\r\n\t\tif (!scheduler._new_event) {\r\n\r\n\t\t\tscheduler.map._infowindows_content[event.id] = message;\r\n\r\n\t\t\tif (scheduler.map._markers[event.id])\r\n\t\t\t\tscheduler.map._markers[event.id].setMap(null);\r\n\r\n\t\t\tscheduler.map._markers[event.id] = scheduler.ext.mapView.createMarker({\r\n\t\t\t\tposition: point,\r\n\t\t\t\tmap: scheduler.map._obj\r\n\t\t\t});\r\n\r\n\t\t\tgoogle.maps.event.addListener(scheduler.map._markers[event.id], 'click', function() {\r\n\t\t\t\tscheduler.map._infowindow.setContent(scheduler.map._infowindows_content[event.id]);\r\n\t\t\t\tscheduler.map._infowindow.open(scheduler.map._obj, scheduler.map._markers[event.id]);\r\n\t\t\t\tscheduler._selected_event_id = event.id;\r\n\t\t\t\tscheduler.render_data();\r\n\t\t\t});\r\n\t\t\tscheduler.map._points[event.id] = point;\r\n\r\n\t\t\tif (setCenter) scheduler.map._obj.setCenter(scheduler.map._points[event.id]);\r\n\t\t\tif (performClick) scheduler.callEvent(\"onClick\", [event.id]);\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onClick\", function(id, domEvent) {\r\n\t\tif (this._mode == \"map\") {\r\n\t\t\tscheduler._selected_event_id = id;\r\n\t\t\tfor (var i = 0; i < scheduler._rendered.length; i++) {\r\n\t\t\t\tscheduler._rendered[i].className = 'dhx_map_line';\r\n\t\t\t\tif (scheduler._rendered[i].getAttribute(scheduler.config.event_attribute) == id) {\r\n\t\t\t\t\tscheduler._rendered[i].className += \" highlight\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (scheduler.map._points[id] && scheduler.map._markers[id]) {\r\n\t\t\t\tscheduler.map._obj.setCenter(scheduler.map._points[id]); // was panTo\r\n\t\t\t\tgoogle.maps.event.trigger(scheduler.map._markers[id], 'click');\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tvar _displayEventOnMap = function(event) {\r\n\t\tconst geocoder = scheduler.ext.mapView.geocoder;\r\n\t\tif (event.event_location && geocoder) {\r\n\t\t\tgeocoder.geocode(\r\n\t\t\t\t{\r\n\t\t\t\t\t'address': event.event_location,\r\n\t\t\t\t\t'language': scheduler.uid().toString()\r\n\t\t\t\t},\r\n\t\t\t\tfunction(results, status) {\r\n\t\t\t\t\tvar point = {};\r\n\t\t\t\t\tif (status != google.maps.GeocoderStatus.OK) {\r\n\t\t\t\t\t\tpoint = scheduler.callEvent(\"onLocationError\", [event.id]);\r\n\t\t\t\t\t\tif (!point || point === true)\r\n\t\t\t\t\t\t\tpoint = scheduler.config.map_error_position;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tpoint = results[0].geometry.location;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tevent.lat = point.lat();\r\n\t\t\t\t\tevent.lng = point.lng();\r\n\r\n\t\t\t\t\tscheduler._selected_event_id = event.id;\r\n\r\n\t\t\t\t\tscheduler._latLngUpdate = true;\r\n\t\t\t\t\tscheduler.callEvent(\"onEventChanged\", [event.id, event]);\r\n\t\t\t\t\tshowAddress(event, true, true);\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t} else {\r\n\t\t\tshowAddress(event, true, true);\r\n\t\t}\r\n\t};\r\n\r\n\tvar _updateEventLocation = function(event) { // update lat and lng in database\r\n\t\tconst geocoder = scheduler.ext.mapView.geocoder;\r\n\t\tif (event.event_location && geocoder) {\r\n\t\t\tgeocoder.geocode(\r\n\t\t\t\t{\r\n\t\t\t\t\t'address': event.event_location,\r\n\t\t\t\t\t'language': scheduler.uid().toString()\r\n\t\t\t\t},\r\n\t\t\t\tfunction(results, status) {\r\n\t\t\t\t\tvar point = {};\r\n\t\t\t\t\tif (status != google.maps.GeocoderStatus.OK) {\r\n\t\t\t\t\t\tpoint = scheduler.callEvent(\"onLocationError\", [event.id]);\r\n\t\t\t\t\t\tif (!point || point === true)\r\n\t\t\t\t\t\t\tpoint = scheduler.config.map_error_position;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tpoint = results[0].geometry.location;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tevent.lat = point.lat();\r\n\t\t\t\t\tevent.lng = point.lng();\r\n\t\t\t\t\tscheduler._latLngUpdate = true;\r\n\t\t\t\t\tscheduler.callEvent(\"onEventChanged\", [event.id, event]);\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t}\r\n\t};\r\n\r\n\tvar _delay = function(method, object, params, delay) {\r\n\t\tsetTimeout(function() {\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tvar ret = method.apply(object, params);\r\n\t\t\tmethod = object = params = null;\r\n\t\t\treturn ret;\r\n\t\t}, delay || 1);\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onEventChanged\", function(id, event) {\r\n\t\tif (!this._latLngUpdate) {\r\n\t\t\tvar event = scheduler.getEvent(id);\r\n\t\t\tif ((event.start_date < scheduler._min_date && event.end_date > scheduler._min_date) || (event.start_date < scheduler._max_date && event.end_date > scheduler._max_date) || (event.start_date.valueOf() >= scheduler._min_date && event.end_date.valueOf() <= scheduler._max_date)) {\r\n\t\t\t\tif (scheduler.map._markers[id])\r\n\t\t\t\t\tscheduler.map._markers[id].setMap(null);\r\n\t\t\t\t_displayEventOnMap(event);\r\n\t\t\t} else { // event no longer should be displayed on the map view\r\n\t\t\t\tscheduler._selected_event_id = null;\r\n\t\t\t\tscheduler.map._infowindow.close();\r\n\t\t\t\tif (scheduler.map._markers[id])\r\n\t\t\t\t\tscheduler.map._markers[id].setMap(null);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t\tthis._latLngUpdate = false;\r\n\t\treturn true;\r\n\t});\r\n\r\n\r\n\tscheduler.attachEvent(\"onEventIdChange\", function(old_event_id, new_event_id) {\r\n\t\tvar event = scheduler.getEvent(new_event_id);\r\n\t\tif ((event.start_date < scheduler._min_date && event.end_date > scheduler._min_date) || (event.start_date < scheduler._max_date && event.end_date > scheduler._max_date) || (event.start_date.valueOf() >= scheduler._min_date && event.end_date.valueOf() <= scheduler._max_date)) {\r\n\t\t\tif (scheduler.map._markers[old_event_id]) {\r\n\t\t\t\tscheduler.map._markers[old_event_id].setMap(null);\r\n\t\t\t\tdelete scheduler.map._markers[old_event_id];\r\n\t\t\t}\r\n\t\t\tif (scheduler.map._infowindows_content[old_event_id])\r\n\t\t\t\tdelete scheduler.map._infowindows_content[old_event_id];\r\n\t\t\t_displayEventOnMap(event);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onEventAdded\", function(id, event) {\r\n\t\tif (!scheduler._dataprocessor) {\r\n\t\t\tif ((event.start_date < scheduler._min_date && event.end_date > scheduler._min_date) || (event.start_date < scheduler._max_date && event.end_date > scheduler._max_date) || (event.start_date.valueOf() >= scheduler._min_date && event.end_date.valueOf() <= scheduler._max_date)) {\r\n\t\t\t\tif (scheduler.map._markers[id])\r\n\t\t\t\t\tscheduler.map._markers[id].setMap(null);\r\n\t\t\t\t_displayEventOnMap(event);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\t/* Test/example\r\n\t scheduler.attachEvent(\"onLocationError\", function(event_id,event_object){\r\n\t return new google.maps.LatLng(8, 8);\r\n\t });\r\n\t */\r\n\r\n\tscheduler.attachEvent(\"onBeforeEventDelete\", function(id, event) {\r\n\t\tif (scheduler.map._markers[id]) {\r\n\t\t\tscheduler.map._markers[id].setMap(null); // if new event is deleted tab != map then it doesn't have marker yet\r\n\t\t}\r\n\t\tscheduler._selected_event_id = null;\r\n\t\tscheduler.map._infowindow.close();\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler._event_resolve_delay = 1500;\r\n\tscheduler.attachEvent(\"onEventLoading\", function(event) {\r\n\t\tif (scheduler.config.map_resolve_event_location && event.event_location && !event.lat && !event.lng) { // don't delete !event.lat && !event.lng as location could change\r\n\t\t\tscheduler._event_resolve_delay += 1500;\r\n\t\t\t_delay(_updateEventLocation, this, [event], scheduler._event_resolve_delay);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onEventCancel\", function(id, is_new) {\r\n\t\tif (is_new) {\r\n\t\t\tif (scheduler.map._markers[id])\r\n\t\t\t\tscheduler.map._markers[id].setMap(null);\r\n\t\t\tscheduler.map._infowindow.close();\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nconst minicalDomEvents = scheduler._createDomEventScope();\r\n\t\r\n\r\nscheduler.config.minicalendar = {\r\n\tmark_events: true\r\n};\r\nscheduler._synced_minicalendars = [];\r\nscheduler.renderCalendar = function(obj, _prev, is_refresh) {\r\n\tvar cal = null;\r\n\tvar date = obj.date || (scheduler._currentDate());\r\n\tif (typeof date == \"string\")\r\n\t\tdate = this.templates.api_date(date);\r\n\r\n\tif (!_prev) {\r\n\t\tvar cont = obj.container;\r\n\t\tvar pos = obj.position;\r\n\r\n\t\tif (typeof cont == \"string\")\r\n\t\t\tcont = document.getElementById(cont);\r\n\r\n\t\tif (typeof pos == \"string\")\r\n\t\t\tpos = document.getElementById(pos);\r\n\t\tif (pos && (typeof pos.left == \"undefined\" && typeof pos.right == \"undefined\")) {\r\n\t\t\tvar tpos = scheduler.$domHelpers.getOffset(pos);\r\n\t\t\tpos = {\r\n\t\t\t\ttop: tpos.top + pos.offsetHeight,\r\n\t\t\t\tleft: tpos.left\r\n\t\t\t};\r\n\t\t}\r\n\t\tif (!cont)\r\n\t\t\tcont = scheduler._get_def_cont(pos);\r\n\r\n\t\tcal = this._render_calendar(cont, date, obj);\r\n\t\r\n\t\tif (!cal.$_eventAttached) {\r\n\t\t\tcal.$_eventAttached = true;\r\n\t\t\tminicalDomEvents.attach(cal, \"click\", (function(e) {\r\n\t\t\t\tvar src = e.target || e.srcElement;\r\n\r\n\t\t\t\tvar $dom = scheduler.$domHelpers;\r\n\t\t\t\tif ($dom.closest(src, \".dhx_month_head\")) {\r\n\t\t\t\t\tif (!$dom.closest(src, \".dhx_after\") && !$dom.closest(src, \".dhx_before\")) {\r\n\r\n\t\t\t\t\t\tvar cellRoot = $dom.closest(src, \"[data-cell-date]\");\r\n\t\t\t\t\t\tvar dateAttribute = cellRoot.getAttribute(\"data-cell-date\");\r\n\t\t\t\t\t\tvar newDate = scheduler.templates.parse_date(dateAttribute);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tscheduler.unmarkCalendar(this);\r\n\t\t\t\t\t\tscheduler.markCalendar(this, newDate, \"dhx_calendar_click\");\r\n\t\t\t\t\t\tthis._last_date = newDate;\r\n\t\t\t\t\t\tif (this.conf.handler) this.conf.handler.call(scheduler, newDate, this);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}).bind(cal));\r\n\t\t}\r\n\t\r\n\t} else {\r\n\t\tcal = this._render_calendar(_prev.parentNode, date, obj, _prev);\r\n\t\tscheduler.unmarkCalendar(cal);\r\n\t}\r\n\r\n\tif (scheduler.config.minicalendar.mark_events) {\r\n\t\tvar start = scheduler.date.month_start(date);\r\n\t\tvar end = scheduler.date.add(start, 1, \"month\");\r\n\t\tvar evs = this.getEvents(start, end);\r\n\t\tvar filter = this[\"filter_\" + this._mode];\r\n\t\tvar markedDates = {};\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tif (filter && !filter(ev.id, ev))\r\n\t\t\t\tcontinue;\r\n\t\t\tvar d = ev.start_date;\r\n\t\t\tif (d.valueOf() < start.valueOf())\r\n\t\t\t\td = start;\r\n\t\t\td = scheduler.date.date_part(new Date(d.valueOf()));\r\n\t\t\twhile (d < ev.end_date) {\r\n\t\t\t\tif(!markedDates[+d]) {\r\n\t\t\t\t\tmarkedDates[+d] = true;\r\n\t\t\t\t\tthis.markCalendar(cal, d, \"dhx_year_event\");\r\n\t\t\t\t}\r\n\t\t\t\td = this.date.add(d, 1, \"day\");\r\n\t\t\t\tif (d.valueOf() >= end.valueOf())\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tthis._markCalendarCurrentDate(cal);\r\n\r\n\tcal.conf = obj;\r\n\tif (obj.sync && !is_refresh)\r\n\t\tthis._synced_minicalendars.push(cal);\r\n\r\n\tif(!cal.conf._on_xle_handler){\r\n\t\tcal.conf._on_xle_handler = scheduler.attachEvent(\"onXLE\", function refreshOnLoad(){\r\n\t\t\tscheduler.updateCalendar(cal, cal.conf.date);\r\n\t\t});\r\n\t}\r\n\r\n\tif(this.config.wai_aria_attributes && this.config.wai_aria_application_role){\r\n\t\tcal.setAttribute(\"role\", \"application\");\r\n\t}\r\n\r\n\treturn cal;\r\n};\r\nscheduler._get_def_cont = function(pos) {\r\n\tif (!this._def_count) {\r\n\t\tthis._def_count = document.createElement(\"div\");\r\n\t\tthis._def_count.className = \"dhx_minical_popup\";\r\n\t\tscheduler.event(this._def_count, \"click\", function(e) { e.cancelBubble = true; });\r\n\t\tdocument.body.appendChild(this._def_count);\r\n\t}\r\n\r\n\tif(pos.left){\r\n\t\tthis._def_count.style.left = pos.left + \"px\";\r\n\t}\r\n\tif(pos.right){\r\n\t\tthis._def_count.style.right = pos.right + \"px\";\r\n\t}\r\n\tif(pos.top){\r\n\t\tthis._def_count.style.top = pos.top + \"px\";\r\n\t}\r\n\tif(pos.bottom){\r\n\t\tthis._def_count.style.bottom = pos.bottom + \"px\";\r\n\t}\r\n\r\n\tthis._def_count._created = new Date();\r\n\r\n\treturn this._def_count;\r\n};\r\nscheduler._locateCalendar = function(cal, date) {\r\n\tif (typeof date == \"string\")\r\n\t\tdate = scheduler.templates.api_date(date);\r\n\r\n\tif(+date > +cal._max_date || +date < +cal._min_date)\r\n\t\treturn null;\r\n\r\n\tvar table = cal.querySelector(\".dhx_year_body\").childNodes[0];\r\n\r\n\tvar weekNum = 0;\r\n\tvar dat = new Date(cal._min_date);\r\n\twhile(+this.date.add(dat, 1, \"week\") <= +date){\r\n\t\tdat = this.date.add(dat, 1, \"week\");\r\n\t\tweekNum++;\r\n\t}\r\n\r\n\tvar sm = scheduler.config.start_on_monday;\r\n\tvar day = (date.getDay() || (sm ? 7 : 0)) - (sm ? 1 : 0);\r\n\r\n\tconst dayCell = table.querySelector(`.dhx_cal_month_row:nth-child(${weekNum + 1}) .dhx_cal_month_cell:nth-child(${day + 1})`);\r\n\tif(dayCell) {\r\n\t\treturn dayCell.firstChild;\r\n\t} else {\r\n\t\treturn null;\r\n\t}\r\n};\r\nscheduler.markCalendar = function(cal, date, css) {\r\n\tvar div = this._locateCalendar(cal, date);\r\n\tif(!div)\r\n\t\treturn;\r\n\r\n\tdiv.className += \" \" + css;\r\n};\r\nscheduler.unmarkCalendar = function(cal, date, css) {\r\n\tdate = date || cal._last_date;\r\n\tcss = css || \"dhx_calendar_click\";\r\n\tif (!date) return;\r\n\tvar el = this._locateCalendar(cal, date);\r\n\tif(!el)\r\n\t\treturn;\r\n\tel.className = (el.className || \"\").replace(RegExp(css, \"g\"));\r\n};\r\nscheduler._week_template = function(width) {\r\n\tvar summ = (width || 250);\r\n\tvar left = 0;\r\n\r\n\tvar week_template = document.createElement(\"div\");\r\n\tvar dummy_date = this.date.week_start(scheduler._currentDate());\r\n\tfor (var i = 0; i < 7; i++) {\r\n\t\tthis._cols[i] = Math.floor(summ / (7 - i));\r\n\t\tthis._render_x_header(i, left, dummy_date, week_template);\r\n\t\tdummy_date = this.date.add(dummy_date, 1, \"day\");\r\n\t\tsumm -= this._cols[i];\r\n\t\tleft += this._cols[i];\r\n\t}\r\n\tweek_template.lastChild.className += \" dhx_scale_bar_last\";\r\n\treturn week_template;\r\n};\r\nscheduler.updateCalendar = function(obj, sd) {\r\n\tobj.conf.date = sd;\r\n\tthis.renderCalendar(obj.conf, obj, true);\r\n};\r\nscheduler._mini_cal_arrows = [\" \", \" \"];\r\nscheduler._render_calendar = function(obj, sd, conf, previous) {\r\n\t/*store*/\r\n\tvar ts = scheduler.templates;\r\n\tvar temp = this._cols;\r\n\tthis._cols = [];\r\n\tvar temp2 = this._mode;\r\n\tthis._mode = \"calendar\";\r\n\tvar temp3 = this._colsS;\r\n\tthis._colsS = {height: 0};\r\n\tvar temp4 = new Date(this._min_date);\r\n\tvar temp5 = new Date(this._max_date);\r\n\tvar temp6 = new Date(scheduler._date);\r\n\tvar temp7 = ts.month_day;\r\n\tvar temp8 = this._ignores_detected; this._ignores_detected = 0;\r\n\tts.month_day = ts.calendar_date;\r\n\r\n\tsd = this.date.month_start(sd);\r\n\tvar week_template = this._week_template(obj.offsetWidth - 1 - this.config.minicalendar.padding );\r\n\r\n\tvar d;\r\n\tif (previous){\r\n\t\td = previous;\r\n\t} else {\r\n\t\td = document.createElement(\"div\");\r\n\t\td.className = \"dhx_cal_container dhx_mini_calendar\";\r\n\t}\r\n\td.setAttribute(\"date\", this._helpers.formatDate(sd));\r\n\td.innerHTML = \"
\" +\r\n\t\t\t\"
\" : \"'>\") +\r\n\t\t\t\"
\"+(week_template ? week_template.innerHTML : \"\")+\"
\" +\r\n\t\t\t\"
\" +\r\n\t\t\"
\";\r\n\tvar header = d.querySelector(\".dhx_year_month\");\r\n\tvar weekHeader = d.querySelector(\".dhx_year_week\");\r\n\tvar body = d.querySelector(\".dhx_year_body\");\r\n\r\n\theader.innerHTML = this.templates.calendar_month(sd);\r\n\tif (conf.navigation) {\r\n\t\tvar move_minicalendar_date = function(calendar, diff) {\r\n\t\t\tvar date = scheduler.date.add(calendar._date, diff, \"month\");\r\n\t\t\tscheduler.updateCalendar(calendar, date);\r\n\t\t\tif (scheduler._date.getMonth() == calendar._date.getMonth() && scheduler._date.getFullYear() == calendar._date.getFullYear()) {\r\n\t\t\t\tscheduler._markCalendarCurrentDate(calendar);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tvar css_classnames = [\"dhx_cal_prev_button\", \"dhx_cal_next_button\"];\r\n\t\tvar css_texts = [\"left:1px;top:4px;position:absolute;\", \"left:auto; right:1px;top:4px;position:absolute;\"];\r\n\t\tvar diffs = [-1, 1];\r\n\t\tvar handler = function(diff) {\r\n\t\t\treturn function() {\t\r\n\t\t\t\tif (conf.sync) {\r\n\t\t\t\t\tvar calendars = scheduler._synced_minicalendars;\r\n\t\t\t\t\tfor (var k = 0; k < calendars.length; k++) {\r\n\t\t\t\t\t\tmove_minicalendar_date(calendars[k], diff);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (scheduler.config.rtl) {\r\n\t\t\t\t\t\tdiff = -diff;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmove_minicalendar_date(d, diff);\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t};\r\n\t\tvar labels = [scheduler.locale.labels.prev, scheduler.locale.labels.next];\r\n\t\tfor (var j = 0; j < 2; j++) {\r\n\t\t\tvar arrow = document.createElement(\"div\");\r\n\t\t\t//var diff = diffs[j];\r\n\t\t\tarrow.className = css_classnames[j];\r\n\r\n\t\t\tscheduler._waiAria.headerButtonsAttributes(arrow, labels[j]);\r\n\r\n\t\t\tarrow.style.cssText = css_texts[j];\r\n\t\t\tarrow.innerHTML = this._mini_cal_arrows[j];\r\n\t\t\theader.appendChild(arrow);\r\n\t\t\tminicalDomEvents.attach(arrow, \"click\", handler(diffs[j]));\r\n\t\t}\r\n\t}\r\n\td._date = new Date(sd);\r\n\r\n\td.week_start = (sd.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) % 7;\r\n\r\n\tvar dd = d._min_date = this.date.week_start(sd);\r\n\td._max_date = this.date.add(d._min_date, 6, \"week\");\r\n\r\n\tthis._reset_month_scale(body, sd, dd, 6);\r\n\r\n\tif (!previous)\r\n\t\tobj.appendChild(d);\r\n\r\n\tweekHeader.style.height = (weekHeader.childNodes[0].offsetHeight - 1) + \"px\"; // dhx_year_week should have height property so that day dates would get correct position. dhx_year_week height = height of it's child (with the day name)\r\n\r\n\tvar headerId = scheduler.uid();\r\n\tscheduler._waiAria.minicalHeader(header, headerId);\r\n\tscheduler._waiAria.minicalGrid(d.querySelector(\".dhx_year_grid\"), headerId);\r\n\tscheduler._waiAria.minicalRow(weekHeader);\r\n\r\n\tvar dayHeaders = weekHeader.querySelectorAll(\".dhx_scale_bar\");\r\n\tfor(var i = 0; i < dayHeaders.length; i++){\r\n\t\tscheduler._waiAria.minicalHeadCell(dayHeaders[i]);\r\n\t}\r\n\tvar dayCells = body.querySelectorAll(\".dhx_cal_month_cell\");\r\n\tvar firstDate = new Date(dd);\r\n\tfor(var i = 0; i < dayCells.length; i++){\r\n\r\n\t\tscheduler._waiAria.minicalDayCell(dayCells[i], new Date(firstDate));\r\n\t\tfirstDate = scheduler.date.add(firstDate, 1, \"day\");\r\n\t}\r\n\r\n\tscheduler._waiAria.minicalHeader(header, headerId);\r\n\r\n\t/*restore*/\r\n\tthis._cols = temp;\r\n\tthis._mode = temp2;\r\n\tthis._colsS = temp3;\r\n\tthis._min_date = temp4;\r\n\tthis._max_date = temp5;\r\n\tscheduler._date = temp6;\r\n\tts.month_day = temp7;\r\n\tthis._ignores_detected = temp8;\r\n\treturn d;\r\n};\r\nscheduler.destroyCalendar = function(cal, force) {\r\n\tif (!cal && this._def_count && this._def_count.firstChild) {\r\n\t\tif (force || (new Date()).valueOf() - this._def_count._created.valueOf() > 500)\r\n\t\t\tcal = this._def_count.firstChild;\r\n\t}\r\n\tif (!cal) return;\r\n\tminicalDomEvents.detachAll();\r\n\t//cal.onclick = null;\r\n\tcal.innerHTML = \"\";\r\n\tif (cal.parentNode)\r\n\t\tcal.parentNode.removeChild(cal);\r\n\tif (this._def_count)\r\n\t\tthis._def_count.style.top = \"-1000px\";\r\n\r\n\tif(cal.conf && cal.conf._on_xle_handler)\r\n\t\tscheduler.detachEvent(cal.conf._on_xle_handler);\r\n};\r\nscheduler.isCalendarVisible = function() {\r\n\tif (this._def_count && parseInt(this._def_count.style.top, 10) > 0)\r\n\t\treturn this._def_count;\r\n\treturn false;\r\n};\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tscheduler.event(document.body, \"click\", function() { scheduler.destroyCalendar(); });\r\n}, {once: true});\r\n\r\n\r\n\r\nscheduler.form_blocks.calendar_time = {\r\n\trender: function(sns) {\r\n\t\tvar html = \"\";\r\n\r\n\t\tvar cfg = scheduler.config;\r\n\t\tvar dt = this.date.date_part(scheduler._currentDate());\r\n\r\n\t\tvar last = 24 * 60, first = 0;\r\n\t\tif (cfg.limit_time_select) {\r\n\t\t\tfirst = 60 * cfg.first_hour;\r\n\t\t\tlast = 60 * cfg.last_hour + 1; // to include \"17:00\" option if time select is limited\r\n\t\t}\r\n\t\tdt.setHours(first / 60);\r\n\r\n\t\tsns._time_values = [];\r\n\t\thtml += \" \";\r\n\r\n\t\t//var full_day = scheduler.config.full_day;\r\n\r\n\t\treturn \"
\" + html + \"  –  \" + html + \"
\";\r\n\t},\r\n\tset_value: function(node, value, ev, config) {\r\n\r\n\t\tvar inputs = node.getElementsByTagName(\"input\");\r\n\t\tvar selects = node.getElementsByTagName(\"select\");\r\n\t\tvar start_date,\r\n\t\t\tend_date;\r\n\r\n\t\tvar _init_once = function(inp, date, number) {\r\n\t\t\tscheduler.event(inp, \"click\", function() {\r\n\t\t\t\tscheduler.destroyCalendar(null, true);\r\n\t\t\t\tscheduler.renderCalendar({\r\n\t\t\t\t\tposition: inp,\r\n\t\t\t\t\tdate: new Date(this._date),\r\n\t\t\t\t\tnavigation: true,\r\n\t\t\t\t\thandler: function(new_date) {\r\n\t\t\t\t\t\tinp.value = scheduler.templates.calendar_time(new_date);\r\n\t\t\t\t\t\tinp._date = new Date(new_date);\r\n\t\t\t\t\t\tscheduler.destroyCalendar();\r\n\t\t\t\t\t\tif (scheduler.config.event_duration && scheduler.config.auto_end_date && number === 0) { //first element = start date\r\n\t\t\t\t\t\t\t_update_minical_select();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t};\r\n\r\n\t\tif (scheduler.config.full_day) {\r\n\t\t\tif (!node._full_day) {\r\n\t\t\t\tvar html = \"\";\r\n\t\t\t\tif (!scheduler.config.wide_form)\r\n\t\t\t\t\thtml = node.previousSibling.innerHTML + html;\r\n\t\t\t\tnode.previousSibling.innerHTML = html;\r\n\t\t\t\tnode._full_day = true;\r\n\t\t\t}\r\n\t\t\tvar input = node.previousSibling.getElementsByTagName(\"input\")[0];\r\n\r\n\t\t\tvar isFulldayEvent = (scheduler.date.time_part(ev.start_date) === 0 && scheduler.date.time_part(ev.end_date) === 0);\r\n\t\t\tinput.checked = isFulldayEvent;\r\n\r\n\t\t\tselects[0].disabled = input.checked;\r\n\t\t\tselects[1].disabled = input.checked;\r\n\r\n\t\t\tif (!input.$_eventAttached) {\r\n\t\t\t\tinput.$_eventAttached = true;\r\n\t\t\t\tscheduler.event(input, \"click\", function() {\r\n\t\t\t\t\tif (input.checked === true) {\r\n\t\t\t\t\t\tvar obj = {};\r\n\t\t\t\t\t\tscheduler.form_blocks.calendar_time.get_value(node, obj);\r\n\r\n\t\t\t\t\t\tstart_date = scheduler.date.date_part(obj.start_date);\r\n\t\t\t\t\t\tend_date = scheduler.date.date_part(obj.end_date);\r\n\r\n\t\t\t\t\t\tif (+end_date == +start_date || (+end_date >= +start_date && (ev.end_date.getHours() !== 0 || ev.end_date.getMinutes() !== 0)))\r\n\t\t\t\t\t\t\tend_date = scheduler.date.add(end_date, 1, \"day\");\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tvar start = start_date || ev.start_date;\r\n\t\t\t\t\tvar end = end_date || ev.end_date;\r\n\t\t\t\t\t_attach_action(inputs[0], start);\r\n\t\t\t\t\t_attach_action(inputs[1], end);\r\n\t\t\t\t\tselects[0].value = start.getHours() * 60 + start.getMinutes();\r\n\t\t\t\t\tselects[1].value = end.getHours() * 60 + end.getMinutes();\r\n\r\n\t\t\t\t\tselects[0].disabled = input.checked;\r\n\t\t\t\t\tselects[1].disabled = input.checked;\r\n\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (scheduler.config.event_duration && scheduler.config.auto_end_date) {\r\n\r\n\t\t\tvar _update_minical_select = function () {\r\n\t\t\t\tif (!(scheduler.config.auto_end_date && scheduler.config.event_duration)){\r\n\t\t\t\t\t// setting may be disabled after the handler is attached\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tstart_date = scheduler.date.add(inputs[0]._date, selects[0].value, \"minute\");\r\n\t\t\t\tend_date = new Date(start_date.getTime() + (scheduler.config.event_duration * 60 * 1000));\r\n\r\n\t\t\t\tinputs[1].value = scheduler.templates.calendar_time(end_date);\r\n\t\t\t\tinputs[1]._date = scheduler.date.date_part(new Date(end_date));\r\n\r\n\t\t\t\tselects[1].value = end_date.getHours() * 60 + end_date.getMinutes();\r\n\t\t\t};\r\n\r\n\t\t\tif(!selects[0].$_eventAttached){\r\n\t\t\t\tselects[0].addEventListener(\"change\", _update_minical_select); // only update on first select should trigger update so user could define other end date if he wishes too\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction _attach_action(inp, date, number) {\r\n\t\t\t_init_once(inp, date, number);\r\n\t\t\tinp.value = scheduler.templates.calendar_time(date);\r\n\t\t\tinp._date = scheduler.date.date_part(new Date(date));\r\n\t\t}\r\n\r\n\t\t_attach_action(inputs[0], ev.start_date, 0);\r\n\t\t_attach_action(inputs[1], ev.end_date, 1);\r\n\t\t_init_once = function() {};\r\n\r\n\t\tfunction _round_minutes(date) {\r\n\t\t\tvar time_values = config._time_values;\r\n\t\t\tvar direct_value = date.getHours() * 60 + date.getMinutes();\r\n\t\t\tvar fixed_value = direct_value;\r\n\t\t\tvar value_found = false;\r\n\r\n\t\t\tfor (var k = 0; k < time_values.length; k++) {\r\n\t\t\t\tvar t_v = time_values[k];\r\n\t\t\t\tif (t_v === direct_value) {\r\n\t\t\t\t\tvalue_found = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif (t_v < direct_value)\r\n\t\t\t\t\tfixed_value = t_v;\r\n\t\t\t}\r\n\r\n\t\t\tif(!(value_found || fixed_value))\r\n\t\t\t\treturn -1;\r\n\r\n\t\t\treturn (value_found) ? direct_value : fixed_value;\r\n\t\t}\r\n\r\n\t\tselects[0].value = _round_minutes(ev.start_date);\r\n\t\tselects[1].value = _round_minutes(ev.end_date);\r\n\r\n\t},\r\n\tget_value: function(node, ev) {\r\n\t\tvar inputs = node.getElementsByTagName(\"input\");\r\n\t\tvar selects = node.getElementsByTagName(\"select\");\r\n\r\n\t\tev.start_date = scheduler.date.add(inputs[0]._date, selects[0].value, \"minute\");\r\n\t\tev.end_date = scheduler.date.add(inputs[1]._date, selects[1].value, \"minute\");\r\n\r\n\t\tif (ev.end_date <= ev.start_date)\r\n\t\t\tev.end_date = scheduler.date.add(ev.start_date, scheduler.config.time_step, \"minute\");\r\n\t\treturn {\r\n\t\t\tstart_date: new Date(ev.start_date),\r\n\t\t\tend_date: new Date(ev.end_date)\r\n\t\t};\r\n\t},\r\n\tfocus: function(node) {\r\n\t}\r\n};\r\nscheduler.linkCalendar = function(calendar, datediff) {\r\n\tvar action = function() {\r\n\t\tvar date = scheduler._date;\r\n\t\tvar dateNew = new Date(date.valueOf());\r\n\t\tif (datediff) dateNew = datediff(dateNew);\r\n\t\tdateNew.setDate(1);\r\n\t\tscheduler.updateCalendar(calendar, dateNew);\r\n\t\treturn true;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", action);\r\n\tscheduler.attachEvent(\"onXLE\", action);\r\n\tscheduler.attachEvent(\"onEventAdded\", action);\r\n\tscheduler.attachEvent(\"onEventChanged\", action);\r\n\tscheduler.attachEvent(\"onEventDeleted\", action);\r\n\taction();\r\n};\r\n\r\nscheduler._markCalendarCurrentDate = function(calendar) {\r\n\tvar state = scheduler.getState();\r\n\tvar from = state.min_date;\r\n\tvar to = state.max_date;\r\n\tvar mode = state.mode;\r\n\r\n\tvar month_start = scheduler.date.month_start(new Date(calendar._date));\r\n\tvar month_end = scheduler.date.add(month_start, 1, \"month\");\r\n\r\n\tvar noHighlight = {\r\n\t\t\"month\":true,\r\n\t\t\"year\":true,\r\n\t\t\"agenda\":true,\r\n\t\t\"grid\":true\r\n\t};\r\n\t// no need to highlight current dates for a large range views - agenda, year, etc.\r\n\tif(noHighlight[mode] || (from.valueOf() <= month_start.valueOf() && to.valueOf() >= month_end.valueOf())){\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar current = from;\r\n\twhile(current.valueOf() < to.valueOf()){\r\n\t\tif (month_start.valueOf() <= current.valueOf() && month_end > current) {\r\n\t\t\tscheduler.markCalendar(calendar, current, \"dhx_calendar_click\");\r\n\t\t}\r\n\t\tcurrent = scheduler.date.add(current, 1, \"day\");\r\n\t}\r\n};\r\n\r\nscheduler.attachEvent(\"onEventCancel\", function(){\r\n\tscheduler.destroyCalendar(null, true);\r\n});\r\n\r\nscheduler.attachEvent(\"onDestroy\", function(){\r\n\tscheduler.destroyCalendar();\r\n});\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\tscheduler.xy.scroll_width = 0;\r\n\r\n\tvar old = scheduler.render_view_data;\r\n\tscheduler.render_view_data=function(){\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\t\tdata.firstChild._h_fix = true;\r\n\r\n\t\told.apply(scheduler,arguments);\r\n\r\n\r\n\r\n\t\tvar height = parseInt(data.style.height);\r\n\t\tdata.style.height=\"1px\";\r\n\t\tdata.style.height=data.scrollHeight+\"px\";\r\n\r\n\t\tthis._obj.style.height = this._obj.clientHeight + data.scrollHeight - height + \"px\";\r\n\t};\r\n\r\n\tvar old_s=scheduler._reset_month_scale;\r\n\tscheduler._reset_month_scale=function(a,b,c,d){\r\n\t\tvar dummy = {clientHeight:100};\r\n\t\told_s.apply(scheduler,[dummy,b,c,d]);\r\n\t\ta.innerHTML = dummy.innerHTML;\r\n\t};\r\n\r\n});\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Multisection\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\n\r\nfunction parseXMLOptions(loader, config){\r\n\tvar items = scheduler.ajax.xpath(\"//data/item\", loader.xmlDoc);\r\n\tvar ids = {};\r\n\tfor (var i = 0; i < items.length; i++) {\r\n\t\tids[items[i].getAttribute(config.map_to)] = true;\r\n\t}\r\n\treturn ids;\r\n}\r\n\r\nfunction parseJSONOptions(loader, config){\r\n\ttry{\r\n\t\tvar items = JSON.parse(loader.xmlDoc.responseText);\r\n\t\tvar ids = {};\r\n\t\tfor (var i = 0; i < items.length; i++) {\r\n\t\t\tvar option = items[i];\r\n\r\n\t\t\tids[option.value || option.key || option.id] = true;\r\n\t\t}\r\n\t\treturn ids;\r\n\t}catch(e){\r\n\t\treturn null;\r\n\t}\r\n}\r\n\r\nscheduler.form_blocks[\"multiselect\"]={\r\n\trender:function(sns) {\r\n\t\tvar css = \"dhx_multi_select_control dhx_multi_select_\"+sns.name;\r\n\t\tif(!!sns.vertical){\r\n\t\t\tcss += \" dhx_multi_select_control_vertical\";\r\n\t\t}\r\n\r\n\t\tvar _result = \"
\";\r\n\t\tfor (var i=0; i\"+sns.options[i].label+\"\";\r\n\t\t}\r\n\t\t_result += \"
\";\r\n\t\treturn _result;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\r\n\t\tvar _children = node.getElementsByTagName('input');\r\n\t\tfor(var i=0;i<_children.length;i++) {\r\n\t\t\t_children[i].checked = false; //unchecking all inputs on the form\r\n\t\t}\r\n\r\n\t\tfunction _mark_inputs(ids) { // ids = [ 0: undefined, 1: undefined, 2: true, 'custom_name': false ... ]\r\n\t\t\tvar _children = node.getElementsByTagName('input');\r\n\t\t\tfor(var i=0;i<_children.length; i++) {\r\n\t\t\t\t_children[i].checked = !! ids[_children[i].value];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar _ids = {};\r\n\t\tif (ev[config.map_to]) {\r\n\t\t\tvar results = (ev[config.map_to] + \"\").split(config.delimiter || scheduler.config.section_delimiter || \",\");\r\n\t\t\tfor (var i = 0; i < results.length; i++) {\r\n\t\t\t\t_ids[results[i]] = true;\r\n\t\t\t}\r\n\t\t\t_mark_inputs(_ids);\r\n\t\t} else {\r\n\t\t\tif (scheduler._new_event || !config.script_url)\r\n\t\t\t\treturn;\r\n\t\t\tvar divLoading = document.createElement('div');\r\n\t\t\tdivLoading.className = 'dhx_loading';\r\n\t\t\tdivLoading.style.cssText = \"position: absolute; top: 40%; left: 40%;\";\r\n\t\t\tnode.appendChild(divLoading);\r\n\r\n\t\t\tvar url = [\r\n\t\t\t\tconfig.script_url,\r\n\t\t\t\t(config.script_url.indexOf(\"?\") == -1 ? \"?\" : \"&\"),\r\n\t\t\t\t'dhx_crosslink_' + config.map_to + '=' + ev.id + '&uid=' + scheduler.uid()\r\n\t\t\t].join(\"\");\r\n\r\n\t\t\tscheduler.ajax.get(url, function(loader) {\r\n\t\t\t\tvar options = parseJSONOptions(loader, config);\r\n\t\t\t\tif(!options){\r\n\t\t\t\t\toptions = parseXMLOptions(loader, config);\r\n\t\t\t\t}\r\n\t\t\t\t_mark_inputs(options);\r\n\t\t\t\tnode.removeChild(divLoading);\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tvar _result = [];\r\n\t\tvar _children = node.getElementsByTagName(\"input\");\r\n\t\tfor(var i=0;i<_children.length;i++) {\r\n\t\t\tif(_children[i].checked)\r\n\t\t\t\t_result.push(_children[i].value);\r\n\t\t}\r\n\t\treturn _result.join(config.delimiter || scheduler.config.section_delimiter || \",\");\r\n\t},\r\n\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\r\n\tfunction backup(obj){\r\n\t\tvar t = function(){};\r\n\t\tt.prototype = obj;\r\n\t\treturn t;\r\n\t}\r\n\r\n\tvar old = scheduler._load;\r\n\tscheduler._load=function(url,from){\r\n\t\turl=url||this._load_url;\r\n\t\tif (typeof url == \"object\"){\r\n\t\t\tvar t = backup(this._loaded);\r\n\t\t\tfor (var i=0; i < url.length; i++) {\r\n\t\t\t\tthis._loaded=new t();\r\n\t\t\t\told.call(this,url[i],from);\r\n\t\t\t}\r\n\t\t} else\r\n\t\t\told.apply(this,arguments);\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\t/* global Backbone */\r\n\tvar cfg = {\r\n\t\tuse_id : false\r\n\t};\r\n\r\n\t//remove private properties\r\n\tfunction sanitize(ev){\r\n\t\tvar obj = {};\r\n\t\tfor (var key in ev)\r\n\t\t\tif (key.indexOf(\"_\") !== 0)\r\n\t\t\t\tobj[key] = ev[key];\r\n\r\n\t\tif (!cfg.use_id)\r\n\t\t\tdelete obj.id;\r\n\r\n\t\treturn obj;\r\n\t}\r\n\r\n\tvar update_timer;\r\n\tfunction update_view(){\r\n\t\tclearTimeout(update_timer);\r\n\t\tupdate_timer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler.updateView();\r\n\t\t},1);\r\n\t}\r\n\r\n\tfunction _start_ext_load(cal){\r\n\t\tcal._loading = true;\r\n\t\tcal._not_render = true;\r\n\r\n\t\tcal.callEvent(\"onXLS\", []);\r\n\t}\r\n\tfunction _finish_ext_load(cal){\r\n\t\tcal._not_render = false;\r\n\t\tif (cal._render_wait)\r\n\t\t\tcal.render_view_data();\r\n\t\tcal._loading = false;\r\n\r\n\t\tcal.callEvent(\"onXLE\", []);\r\n\t}\r\n\r\n\r\n\tfunction _get_id(model){\r\n\t\treturn cfg.use_id ? model.id : model.cid;\r\n\t}\r\n\r\nscheduler.backbone = function(events, config){\r\n\tif (config) cfg = config;\r\n\r\n\tevents.bind(\"change\", function(model, info){\r\n\t\tvar cid = _get_id(model);\r\n\t\tvar ev = scheduler._events[cid] = model.toJSON();\r\n\t\tev.id = cid;\r\n\r\n\t\tscheduler._init_event(ev);\r\n\t\tupdate_view();\r\n\t});\r\n\tevents.bind(\"remove\", function(model, changes){\r\n\t\tvar cid = _get_id(model);\r\n\t\tif (scheduler._events[cid])\r\n\t\t\tscheduler.deleteEvent(cid);\r\n\t});\r\n\r\n\tvar queue = [];\r\n\tfunction add_from_queue(){\r\n\t\tif(scheduler.$destroyed){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (queue.length){\r\n\t\t\tscheduler.parse(queue, \"json\");\r\n\t\t\tqueue = [];\r\n\t\t}\r\n\t}\r\n\r\n\tevents.bind(\"add\", function(model, changes){\r\n\t\tvar cid = _get_id(model);\r\n\t\tif (!scheduler._events[cid]){\r\n\t\t\tvar ev = model.toJSON();\r\n\t\t\tev.id = cid;\r\n\t\t\tscheduler._init_event(ev);\r\n\r\n\t\t\tqueue.push(ev);\r\n\t\t\tif (queue.length == 1)\r\n\t\t\t\tsetTimeout(add_from_queue,1);\r\n\t\t}\r\n\t});\r\n\r\n\tevents.bind(\"request\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_start_ext_load(scheduler);\r\n\t});\r\n\tevents.bind(\"sync\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_finish_ext_load(scheduler);\r\n\t});\r\n\tevents.bind(\"error\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_finish_ext_load(scheduler);\r\n\t});\r\n\r\n\r\n\tscheduler.attachEvent(\"onEventCreated\", function(id){\r\n\t\tvar ev = new events.model(scheduler.getEvent(id));\r\n\t\tscheduler._events[id] = ev.toJSON();\r\n\t\tscheduler._events[id].id = id;\r\n\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onEventAdded\", function(id){\r\n\t\tif (!events.get(id)){\r\n\t\t\tvar data = sanitize(scheduler.getEvent(id));\r\n\t\t\tvar model = new events.model(data);\r\n\r\n\t\t\tvar cid = _get_id(model);\r\n\t\t\tif (cid != id)\r\n\t\t\t\tthis.changeEventId(id, cid);\r\n\t\t\tevents.add(model);\r\n\t\t\tevents.trigger(\"scheduler:add\", model);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventChanged\", function(id){\r\n\t\tvar ev = events.get(id);\r\n\t\tvar upd = sanitize(scheduler.getEvent(id));\r\n\r\n\t\tev.set(upd);\r\n\t\tevents.trigger(\"scheduler:change\", ev);\r\n\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventDeleted\", function(id){\r\n\t\tvar model = events.get(id);\r\n\t\tif (model){\r\n\t\t\tevents.trigger(\"scheduler:remove\", model);\r\n\t\t\tevents.remove(id);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\t/* global dhtmlDragAndDropObject, dhtmlx */\r\n// lame old code doesn't provide raw event object\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\t\tvar dragger = (new dhtmlDragAndDropObject());\r\n\t\tvar old = dragger.stopDrag;\r\n\t\tvar last_event;\r\n\t\tdragger.stopDrag = function(e) {\r\n\t\t\tlast_event = e;\r\n\t\t\treturn old.apply(this, arguments);\r\n\t\t};\r\n\r\n\t\tfunction on_drop(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml) {\r\n\r\n\t\t\tif (scheduler.checkEvent(\"onBeforeExternalDragIn\") && !scheduler.callEvent(\"onBeforeExternalDragIn\", [sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml, last_event]))\r\n\t\t\t\treturn;\r\n\r\n\t\t\tvar temp = scheduler.attachEvent(\"onEventCreated\", function (id) {\r\n\t\t\t\tif (!scheduler.callEvent(\"onExternalDragIn\", [id, sourceHtmlObject, last_event])) {\r\n\t\t\t\t\tthis._drag_mode = this._drag_id = null;\r\n\t\t\t\t\tthis.deleteEvent(id);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tvar action_data = scheduler.getActionData(last_event);\r\n\t\t\tvar event_data = {\r\n\t\t\t\tstart_date: new Date(action_data.date)\r\n\t\t\t};\r\n\r\n\t\t\t// custom views, need to assign section id, fix dates\r\n\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\tvar view_options = scheduler.matrix[scheduler._mode];\r\n\t\t\t\tevent_data[view_options.y_property] = action_data.section;\r\n\r\n\t\t\t\tvar pos = scheduler._locate_cell_timeline(last_event);\r\n\t\t\t\tevent_data.start_date = view_options._trace_x[pos.x];\r\n\t\t\t\tevent_data.end_date = scheduler.date.add(event_data.start_date, view_options.x_step, view_options.x_unit);\r\n\t\t\t}\r\n\t\t\tif (scheduler._props && scheduler._props[scheduler._mode]) {\r\n\t\t\t\tevent_data[scheduler._props[scheduler._mode].map_to] = action_data.section;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler.addEventNow(event_data);\r\n\r\n\t\t\tscheduler.detachEvent(temp);\r\n\t\t}\r\n\r\n\t\tdragger.addDragLanding(scheduler._els[\"dhx_cal_data\"][0], {\r\n\t\t\t_drag: function(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml) {\r\n\t\t\t\ton_drop(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml);\r\n\t\t\t},\r\n\t\t\t_dragIn: function(htmlObject, shtmlObject) {\r\n\t\t\t\treturn htmlObject;\r\n\t\t\t},\r\n\t\t\t_dragOut: function(htmlObject) {\r\n\t\t\t\treturn this;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(dhtmlx.DragControl) {\r\n\t\t\tdhtmlx.DragControl.addDrop(scheduler._els[\"dhx_cal_data\"][0], {\r\n\t\t\t\tonDrop: function (source, target, d, e) {\r\n\t\t\t\t\tvar sourceDhtmlx = dhtmlx.DragControl.getMaster(source);\r\n\t\t\t\t\tlast_event = e;\r\n\t\t\t\t\ton_drop(source, sourceDhtmlx, target, e.target || e.srcElement);\r\n\t\t\t\t},\r\n\r\n\t\t\t\tonDragIn: function (source, target, e) {\r\n\t\t\t\t\treturn target;\r\n\t\t\t\t}\r\n\t\t\t}, true);\r\n\t\t}\r\n\t});\r\n\r\n}","export default function(scheduler){\r\n\r\n\tvar dx, dy,\r\n\t\thtml_regexp = new RegExp(\"<[^>]*>\", \"g\"),\r\n\t\tnewline_regexp = new RegExp(\"]*>\", \"g\");\r\n\r\n\tfunction clean_html(val) {\r\n\t\treturn val.replace(newline_regexp, \"\\n\").replace(html_regexp, \"\");\r\n\t}\r\n\r\n\tfunction x_norm(x, offset) {\r\n\t\tx = parseFloat(x);\r\n\t\toffset = parseFloat(offset);\r\n\t\tif (!isNaN(offset)) x -= offset;\r\n\r\n\t\tvar w = colsWidth(x);\r\n\t\tx = x - w.width + w.cols*dx;\r\n\t\treturn isNaN(x)?\"auto\":(100*x/(dx));\r\n\t}\r\n\r\n\tfunction x_norm_event(x, offset, is_left) {\r\n\t\tx = parseFloat(x);\r\n\t\toffset = parseFloat(offset);\r\n\t\tif (!isNaN(offset) && is_left) x -= offset;\r\n\r\n\t\tvar w = colsWidth(x);\r\n\t\tx = x - w.width + w.cols*dx;\r\n\t\treturn isNaN(x)?\"auto\":(100*x/(dx-(!isNaN(offset)?offset:0)));\r\n\t}\r\n\tfunction colsWidth(width) {\r\n\t\tvar r = 0;\r\n\t\tvar header = scheduler._els.dhx_cal_header[0].childNodes;\r\n\t\tvar els = header[1] ? header[1].childNodes : header[0].childNodes;\r\n\t\tfor (var i = 0; i < els.length; i++) {\r\n\t\t\tvar el = els[i].style ? els[i] : els[i].parentNode;\r\n\t\t\tvar w = parseFloat(el.style.width);\r\n\t\t\tif (width > w){\r\n\t\t\t\twidth -= (w+1);\r\n\t\t\t\tr+=(w+1);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\treturn { width: r, cols: i };\r\n\t}\r\n\r\n\tfunction y_norm(y) {\r\n\t\ty = parseFloat(y);\r\n\t\tif (isNaN(y)) return \"auto\";\r\n\t\treturn 100 * y / dy;\r\n\t}\r\n\r\n\tfunction get_style(node, style){\r\n\t\treturn (window.getComputedStyle?(window.getComputedStyle(node, null)[style]):(node.currentStyle?node.currentStyle[style]:null))||\"\";\r\n\t}\r\n\r\n\tfunction de_day(node, n) {\r\n\t\tvar x = parseInt(node.style.left, 10);\r\n\r\n\t\tfor (var dx = 0; dx < scheduler._cols.length; dx++) {\r\n\t\t\tx -= scheduler._cols[dx];\r\n\t\t\tif (x < 0) return dx;\r\n\t\t}\r\n\t\treturn n;\r\n\t}\r\n\r\n\tfunction de_week(node, n) {\r\n\t\tvar y = parseInt(node.style.top, 10);\r\n\t\tfor (var dy = 0; dy < scheduler._colsS.heights.length; dy++)\r\n\t\t\tif (scheduler._colsS.heights[dy] > y) return dy;\r\n\t\treturn n;\r\n\t}\r\n\r\n\tfunction xml_start(tag) {\r\n\t\treturn tag ? \"<\"+tag+\">\" : \"\";\r\n\t}\r\n\tfunction xml_end(tag) {\r\n\t\treturn tag ? \"\" : \"\";\r\n\t}\r\n\r\n\tfunction xml_top(tag, profile, header, footer) {\r\n\t\tvar xml = \"<\"+tag+\" profile='\" + profile + \"'\";\r\n\t\tif (header)\r\n\t\t\txml += \" header='\" + header + \"'\";\r\n\t\tif (footer)\r\n\t\t\txml += \" footer='\" + footer + \"'\";\r\n\t\txml += \">\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_body_header() {\r\n\t\tvar xml = \"\";\r\n\t\t// detects if current mode is timeline\r\n\t\tvar mode = scheduler._mode;\r\n\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode])\r\n\t\t\tmode = (scheduler.matrix[scheduler._mode].render == \"cell\") ? \"matrix\" : \"timeline\";\r\n\t\txml += \"\";\r\n\r\n\t\tif (scheduler._mode == \"week_agenda\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_data[0].getElementsByTagName(\"DIV\");\r\n\t\t\tfor (var i = 0; i < xh.length; i++)\r\n\t\t\t\tif (xh[i].className == \"dhx_wa_scale_bar\")\r\n\t\t\t\t\txml += \"\" + clean_html(xh[i].innerHTML) + \"\";\r\n\t\t} else if (scheduler._mode == \"agenda\" || scheduler._mode == \"map\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_header[0].childNodes[0].childNodes;\r\n\r\n\t\t\txml += \"\" + clean_html(xh[0].innerHTML) + \"\" + clean_html(xh[1].innerHTML) + \"\";\r\n\t\t} else if (scheduler._mode == \"year\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_data[0].childNodes;\r\n\t\t\tfor (var i = 0; i < xh.length; i++) {\r\n\t\t\t\txml += \"\";\r\n\t\t\t\txml += xml_month_scale(xh[i].querySelector(\".dhx_year_week\").childNodes);\r\n\t\t\t\txml += xml_month(xh[i].querySelector(\".dhx_year_body\"));\r\n\t\t\t\txml += \"\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\txml += \"\";\r\n\t\t\tvar xh = scheduler._els.dhx_cal_header[0].childNodes;\r\n\t\t\txml += xml_month_scale(xh);\r\n\t\t\txml += \"\";\r\n\r\n\t\t\tvar yh = scheduler._els.dhx_cal_data[0];\r\n\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tfor (var i = 0; i < yh.firstChild.rows.length; i++) {\r\n\t\t\t\t\tvar el = yh.firstChild.rows[i];\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t}\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tdy = yh.firstChild.rows[0].cells[0].offsetHeight;\r\n\t\t\t} else if (yh.firstChild.tagName == \"TABLE\") {\r\n\t\t\t\txml += xml_month(yh);\r\n\t\t\t} else {\r\n\t\t\t\tyh = yh.childNodes[yh.childNodes.length - 1];\r\n\t\t\t\twhile (yh.className.indexOf(\"dhx_scale_holder\") == -1)\r\n\t\t\t\t\tyh = yh.previousSibling;\r\n\t\t\t\tyh = yh.childNodes;\r\n\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tfor (var i = 0; i < yh.length; i++)\r\n\t\t\t\t\txml += \"\\n\";\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tdy = yh[0].offsetHeight;\r\n\t\t\t}\r\n\t\t}\r\n\t\txml += \"\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_month(yh) {\r\n\t\tvar xml = \"\";\r\n\t\tvar r = yh.querySelectorAll(\"tr\");\r\n\t\tfor (var i = 0; i < r.length; i++) {\r\n\t\t\tvar days = [];\r\n\t\t\tvar cells = r[i].querySelectorAll(\"td\");\r\n\r\n\t\t\tfor (var j = 0; j < cells.length; j++)\r\n\t\t\t\tdays.push(cells[j].querySelector(\".dhx_month_head\").innerHTML);\r\n\r\n\t\t\txml += \"\\n\";\r\n\t\t\tdy = cells[0].offsetHeight;\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_month_scale(xh) {\r\n\t\tvar xhs,\r\n\t\t\txml = \"\";\r\n\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\tif (scheduler.matrix[scheduler._mode].second_scale)\r\n\t\t\t\txhs = xh[1].childNodes;\r\n\r\n\t\t\txh = xh[0].childNodes;\r\n\t\t}\r\n\r\n\t\tfor (var i = 0; i < xh.length; i++)\r\n\t\t\txml += \"\\n\";\r\n\t\tdx = xh[0].offsetWidth;\r\n\r\n\t\tif (xhs) {\r\n\t\t\tvar width = 0;\r\n\t\t\tvar top_width = xh[0].offsetWidth;\r\n\t\t\tvar top_col = 1;\r\n\t\t\tfor (var i = 0; i < xhs.length; i++) {\r\n\t\t\t\txml += \"\\n\";\r\n\t\t\t\twidth += xhs[i].offsetWidth;\r\n\t\t\t\tif (width >= top_width) {\r\n\t\t\t\t\ttop_width += (xh[top_col] ? xh[top_col].offsetWidth : 0);\r\n\t\t\t\t\ttop_col++;\r\n\t\t\t\t}\r\n\t\t\t\tdx = xhs[0].offsetWidth;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_body(colors) {\r\n\t\tvar xml = \"\";\r\n\t\tvar evs = scheduler._rendered;\r\n\t\tvar matrix = scheduler.matrix && scheduler.matrix[scheduler._mode];\r\n\r\n\t\tif (scheduler._mode == \"agenda\" || scheduler._mode == \"map\") {\r\n\r\n\t\t\tfor (var i = 0; i < evs.length; i++)\r\n xml += \"\";\r\n\r\n\t\t} else if (scheduler._mode == \"week_agenda\") {\r\n\r\n\t\t\tfor (var i = 0; i < evs.length; i++)\r\n\t\t\t\txml += \"\" + clean_html(evs[i].innerHTML) + \"\";\r\n\r\n\t\t} else if (scheduler._mode == \"year\") {\r\n\r\n\t\t\tvar evs = scheduler.get_visible_events();\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar d = evs[i].start_date;\r\n\t\t\t\tif (d.valueOf() < scheduler._min_date.valueOf())\r\n\t\t\t\t\td = scheduler._min_date;\r\n\r\n\t\t\t\twhile (d < evs[i].end_date) {\r\n\t\t\t\t\tvar m = d.getMonth() + 12 * (d.getFullYear() - scheduler._min_date.getFullYear()) - scheduler.week_starts._month;\r\n\t\t\t\t\tvar day = scheduler.week_starts[m] + d.getDate() - 1;\r\n\t\t\t\t\tvar text_color = colors ? get_style(scheduler._get_year_cell(d), \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(scheduler._get_year_cell(d), \"backgroundColor\") : \"\";\r\n\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t\td = scheduler.date.add(d, 1, \"day\");\r\n\t\t\t\t\tif (d.valueOf() >= scheduler._max_date.valueOf())\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (matrix && matrix.render == \"cell\") {\r\n\t\t\tvar evs = scheduler._els.dhx_cal_data[0].getElementsByTagName(\"TD\");\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar text_color = colors ? get_style(evs[i], \"color\") : \"\";\r\n\t\t\t\tvar bg_color = colors ? get_style(evs[i], \"backgroundColor\") : \"\";\r\n\t\t\t\txml += \"\\n\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar zx, zdx;\r\n\t\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\t\t// logic for timeline view\r\n\t\t\t\t\tzx = x_norm(evs[i].style.left);\r\n\t\t\t\t\tzdx = x_norm(evs[i].offsetWidth)-1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// we should use specific logic for day/week/units view\r\n\t\t\t\t\tvar left_norm = scheduler.config.use_select_menu_space ? 0 : 26;\r\n\t\t\t\t\tzx = x_norm_event(evs[i].style.left, left_norm, true);\r\n\t\t\t\t\tzdx = x_norm_event(evs[i].style.width, left_norm)-1;\r\n\t\t\t\t}\r\n\t\t\t\tif (isNaN(zdx * 1)) continue;\r\n\t\t\t\tvar zy = y_norm(evs[i].style.top);\r\n\t\t\t\tvar zdy = y_norm(evs[i].style.height);\r\n\r\n\t\t\t\tvar e_type = evs[i].className.split(\" \")[0].replace(\"dhx_cal_\", \"\");\r\n\t\t\t\tif (e_type === 'dhx_tooltip_line') continue;\r\n\r\n\t\t\t\tvar dets = scheduler.getEvent(evs[i].getAttribute(scheduler.config.event_attribute));\r\n if (!dets) continue;\r\n\t\t\t\tvar day = dets._sday;\r\n\t\t\t\tvar week = dets._sweek;\r\n\t\t\t\tvar length = dets._length || 0;\r\n\r\n\t\t\t\tif (scheduler._mode == \"month\") {\r\n\t\t\t\t\tzdy = parseInt(evs[i].offsetHeight, 10);\r\n\t\t\t\t\tzy = parseInt(evs[i].style.top, 10) - scheduler.xy.month_head_height;\r\n\r\n\t\t\t\t\tday = de_day(evs[i], day);\r\n\t\t\t\t\tweek = de_week(evs[i], week);\r\n\t\t\t\t} else if (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\t\tday = 0;\r\n\t\t\t\t\tvar el = evs[i].parentNode.parentNode.parentNode;\r\n\t\t\t\t\tweek = el.rowIndex;\r\n\t\t\t\t\tvar dy_copy = dy;\r\n\t\t\t\t\tdy = evs[i].parentNode.offsetHeight;\r\n\t\t\t\t\tzy = y_norm(evs[i].style.top);\r\n\t\t\t\t\tzy -= zy * 0.2;\r\n\t\t\t\t\tdy = dy_copy;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (evs[i].parentNode == scheduler._els.dhx_cal_data[0]) continue;\r\n\t\t\t\t\tvar parent = scheduler._els[\"dhx_cal_data\"][0].childNodes[0];\r\n\t\t\t\t\tvar offset = parseFloat(parent.className.indexOf(\"dhx_scale_holder\") != -1 ? parent.style.left : 0);\r\n\t\t\t\t\tzx += x_norm(evs[i].parentNode.style.left, offset);\r\n\t\t\t\t}\r\n\r\n\t\t\t\txml += \"\\n\";\r\n\r\n\t\t\t\tif (e_type == \"event\") {\r\n\t\t\t\t\txml += \"
\";\r\n\t\t\t\t\tvar text_color = colors ? get_style(evs[i].childNodes[2], \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(evs[i].childNodes[2], \"backgroundColor\") : \"\";\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvar text_color = colors ? get_style(evs[i], \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(evs[i], \"backgroundColor\") : \"\";\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t}\r\n\t\t\t\txml += \"
\";\r\n\t\t\t}\r\n\t\t\t}\r\n\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction toXML(start, end, view, mode, header, footer){\r\n\t\tvar colors = false;\r\n\t\tif (mode == \"fullcolor\") {\r\n\t\t\tcolors = true;\r\n\t\t\tmode = \"color\";\r\n\t\t}\r\n\r\n\t\tmode = mode || \"color\";\r\n\r\n\t\tvar xml = \"\";\r\n\t\tif (start) {\r\n\r\n\t\t\tvar original_date = scheduler._date;\r\n\t\t\tvar original_mode = scheduler._mode;\r\n\t\t\tend = scheduler.date[view+\"_start\"](end);\r\n\t\t\tend = scheduler.date[\"get_\"+view+\"_end\"] ? scheduler.date[\"get_\"+view+\"_end\"](end) : scheduler.date.add(end, 1, view);\r\n\r\n\t\t\txml = xml_top(\"pages\", mode, header, footer);\r\n\t\t\tfor (var temp_date = new Date(start); +temp_date < +end; temp_date = this.date.add(temp_date, 1, view)) {\r\n\t\t\t\tthis.setCurrentView(temp_date, view);\r\n\t\t\t\txml += xml_start(\"page\") + xml_body_header().replace(\"\\u2013\", \"-\") + xml_body(colors) + xml_end(\"page\");\r\n\t\t\t}\r\n\t\t\txml += xml_end(\"pages\");\r\n\r\n\t\t\tthis.setCurrentView(original_date, original_mode);\r\n\t\t} else {\r\n\t\t\txml = xml_top(\"data\", mode, header, footer) + xml_body_header().replace(\"\\u2013\", \"-\") + xml_body(colors) + xml_end(\"data\");\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\tscheduler.getPDFData = toXML;\r\n\tfunction send_xml(xml, url){\r\n\t\tvar uid = scheduler.uid();\r\n\t\tvar d = document.createElement(\"div\");\r\n\t\td.style.display = \"none\";\r\n\t\tdocument.body.appendChild(d);\r\n\r\n\t\td.innerHTML = '
';\r\n\t\tdocument.getElementById(uid).firstChild.value = encodeURIComponent(xml);\r\n\t\tdocument.getElementById(uid).submit();\r\n\t\td.parentNode.removeChild(d);\r\n\t}\r\n\r\n\tfunction to_pdf(start, end, view, url, mode, header, footer) {\r\n\t\tvar xml = \"\";\r\n\t\tif(typeof mode == \"object\"){\r\n\t\t\txml = schedulersToPdf(mode);\r\n\t\t}else{\r\n\t\t\txml = toXML.apply(this, [start, end, view, mode, header, footer]);\r\n\t\t}\r\n\r\n\t\tsend_xml(xml, url);\r\n\t}\r\n\r\n\tfunction schedulersToPdf(objects){\r\n\t\tvar xml = \"\";\r\n\t\tfor(var i=0; i < objects.length; i++){\r\n\t\t\txml += objects[i].source.getPDFData(objects[i].start, objects[i].end, objects[i].view, objects[i].mode, objects[i].header, objects[i].footer);\r\n\t\t}\r\n\t\txml += \"\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\t/*\r\n\t * scheduler.toPDF(url, mode, header, footer) - for a single scheduler\r\n\t * scheduler.toPDF(url, [scheduler1, scheduler2,...]) - for multiple schedulers\r\n\t * example:\r\n\t * scheduler.toPDF(\"generate.ashx\", [\r\n\t * { source: scheduler1, mode: \"color\" },\r\n\t * { source: scheduler2, mode: \"gray\", view:\"week\", start:new Date(2013, 06, 1), end:new Date(2013, 06, 28) },\r\n\t * { source: scheduler3 }\r\n\t * ]);\r\n\t *\r\n\t */\r\n\tscheduler.toPDF = function(url, mode, header, footer) {\r\n\t\treturn to_pdf.apply(this, [null, null, null, url, mode, header, footer]);\r\n\t};\r\n\tscheduler.toPDFRange = function(start, end, view, url, mode, header, footer) {\r\n\t\tif (typeof start == \"string\") {\r\n\t\t\tstart = scheduler.templates.api_date(start);\r\n\t\t\tend = scheduler.templates.api_date(end);\r\n\t\t}\r\n\r\n\t\treturn to_pdf.apply(this, arguments);\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.icons_select = [\"icon_form\", \"icon_delete\"];\r\nscheduler.config.details_on_create = true;\r\nscheduler.config.show_quick_info = true;\r\nscheduler.xy.menu_width = 0;\r\n\r\nscheduler.attachEvent(\"onClick\", function(id){\r\n\tif(!scheduler.config.show_quick_info){\r\n\t\treturn;\r\n\t}\r\n\tscheduler.showQuickInfo(id);\r\n\treturn true;\r\n});\r\n\r\n(function(){\r\n\t// pass `force` argument in order to hide quick info synchronously\r\n\t// so it won't affect showQuickInfo call that can follow\r\n\tvar events = [\"onEmptyClick\", \"onViewChange\", \"onLightbox\", \"onBeforeEventDelete\", \"onBeforeDrag\"];\r\n\tvar hiding_function = function(){\r\n\t\tscheduler.hideQuickInfo(true);\r\n\t\treturn true;\r\n\t};\r\n\tfor (var i=0; i window.innerWidth){\r\n\t\t\tleft = window.innerWidth - width;\r\n\t\t}\r\n\t\tleft = Math.max(0, left);\r\n\r\n\t\tqi.style.left = left + \"px\";\r\n\t\tqi.style.top = pos.top - (pos.dy?height:-pos.height) + \"px\";\r\n\t} else {\r\n\r\n\t\tconst dataPos = scheduler.$container.querySelector('.dhx_cal_data').offsetTop;\r\n\t\tqi.style.top = dataPos + 20 + \"px\";\r\n\t\tif (pos.dx == 1){\r\n\t\t\tqi.style.right = \"auto\";\r\n\t\t\tqi.style.left = -width + \"px\";\r\n\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tqi.style.left = \"-10px\";\r\n\t\t\t},1);\r\n\t\t} else {\r\n\t\t\tqi.style.left = \"auto\";\r\n\t\t\tqi.style.right = -width + \"px\";\r\n\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tqi.style.right = \"-10px\";\r\n\t\t\t},1);\r\n\t\t}\r\n\t\tqi.className = qi.className.replace(\" dhx_qi_left\",\"\").replace(\" dhx_qi_right\",\"\")+\" dhx_qi_\"+(pos.dx==1?\"left\":\"right\");\r\n\t}\r\n};\r\nscheduler.attachEvent(\"onTemplatesReady\", function(){\r\n\tscheduler.hideQuickInfo();\r\n\tif(this._quick_info_box){\r\n\t\tvar box = this._quick_info_box;\r\n\t\tif(box.parentNode){\r\n\t\t\tbox.parentNode.removeChild(box);\r\n\t\t}\r\n\t\tthis._quick_info_box = null;\r\n\t}\r\n});\r\nscheduler._quick_info_onscroll_handler = function(e){\r\n\tscheduler.hideQuickInfo();\r\n};\r\nscheduler._init_quick_info = function(){\r\n\tif (!this._quick_info_box){\r\n\r\n\r\n\t\tvar qi = this._quick_info_box = document.createElement(\"div\");\r\n\r\n\t\tthis._waiAria.quickInfoAttr(qi);\r\n\r\n\t\tqi.className = \"dhx_cal_quick_info\";\r\n\t\tif (scheduler.$testmode)\r\n\t\t\tqi.className += \" dhx_no_animate\";\r\n\t\tif (scheduler.config.rtl) qi.className += \" dhx_quick_info_rtl\";\r\n\t//title\r\n\t\tvar ariaAttr = this._waiAria.quickInfoHeaderAttrString();\r\n\t\tvar html = `\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t\t
\r\n\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t\t
`;\r\n\r\n\t//buttons\r\n\t\thtml += \"
\";\r\n\t\tvar buttons = scheduler.config.icons_select;\r\n\t\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\t\tvar ariaAttr = this._waiAria.quickInfoButtonAttrString(this.locale.labels[buttons[i]]);\r\n\t\t\t\thtml += `
\r\n\t\t\t\t
${scheduler.locale.labels[buttons[i]]}
`;\r\n\t\t\t}\r\n\t\t// }\r\n\t\thtml += \"
\";\r\n\r\n\t\tqi.innerHTML = html;\r\n\t\tscheduler.event(qi, \"click\", function(ev){\r\n\t\t\tscheduler._qi_button_click(ev.target || ev.srcElement);\r\n\t\t});\r\n\t\tif (scheduler.config.quick_info_detached){\r\n\t\t\tscheduler._detachDomEvent(scheduler._els[\"dhx_cal_data\"][0], \"scroll\", scheduler._quick_info_onscroll_handler);\r\n\t\t\tscheduler.event(scheduler._els[\"dhx_cal_data\"][0], \"scroll\", scheduler._quick_info_onscroll_handler);\r\n\t\t}\r\n\t}\r\n\r\n\treturn this._quick_info_box;\r\n};\r\n\r\nscheduler._qi_button_click = function(node){\r\n\tvar box = scheduler._quick_info_box;\r\n\tif (!node || node == box) return;\r\n\r\n\tif(node.closest(\".dhx_cal_qi_close_btn\")){\r\n\t\tscheduler.hideQuickInfo();\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar mask = scheduler._getClassName(node);\r\n\tif (mask.indexOf(\"_icon\")!=-1){\r\n\t\tvar id = scheduler._quick_info_box_id;\r\n\t\tscheduler._click.buttons[mask.split(\" \")[1].replace(\"icon_\",\"\")](id);\r\n\t} else\r\n\t\tscheduler._qi_button_click(node.parentNode);\r\n};\r\nscheduler._get_event_counter_part = function(id){\r\n\tvar domEv = scheduler.getRenderedEvent(id);\r\n\tvar left = 0;\r\n\tvar top = 0;\r\n\r\n\tvar node = domEv;\r\n\twhile (node && node != scheduler._obj){\r\n\t\tleft += node.offsetLeft;\r\n\t\ttop += node.offsetTop-node.scrollTop;\r\n\t\tnode = node.offsetParent;\r\n\t}\r\n\tif(node){\r\n\t\tvar dx = (left + domEv.offsetWidth/2) > (scheduler._x/2) ? 1 : 0;\r\n\t\tvar dy = (top + domEv.offsetHeight/2) > (scheduler._y/2) ? 1 : 0;\r\n\r\n\t\treturn { left:left, top:top, dx:dx, dy:dy,\r\n\t\t\twidth:domEv.offsetWidth, height:domEv.offsetHeight };\r\n\t}\r\n\treturn 0;\r\n};\r\n\r\nscheduler._fill_quick_data = function(id){\r\n\tvar ev = scheduler.getEvent(id);\r\n\tvar qi = scheduler._quick_info_box;\r\n\r\n\tscheduler._quick_info_box_id = id;\r\n\r\n//title content\r\n\r\n\tvar header = {\r\n\t\tcontent: scheduler.templates.quick_info_title(ev.start_date, ev.end_date, ev),\r\n\t\tdate: scheduler.templates.quick_info_date(ev.start_date, ev.end_date, ev)\r\n\t};\r\n\tvar titleContent = qi.querySelector(\".dhx_cal_qi_tcontent\");\r\n\ttitleContent.innerHTML = `${header.content}`;\r\n\tvar titleDate = qi.querySelector(\".dhx_cal_qi_tdate\");\r\n\ttitleDate.innerHTML = header.date;\r\n\r\n\tscheduler._waiAria.quickInfoHeader(qi, [header.content, header.date].join(\" \"));\r\n\r\n//main content\r\n\tvar main = qi.querySelector(\".dhx_cal_qi_content\");\r\n\tconst mainContent = scheduler.templates.quick_info_content(ev.start_date, ev.end_date, ev);\r\n\tif(mainContent){\r\n\t\tmain.classList.remove(\"dhx_hidden\");\r\n\t\tmain.innerHTML = mainContent;\r\n\t}else{\r\n\t\tmain.classList.add(\"dhx_hidden\");\r\n\t}\r\n};\r\n\r\n\r\n}","export default function(scheduler){\r\n\t\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar originalRecurringSetValue;\r\n\tif (scheduler.form_blocks.recurring) {\r\n\t\toriginalRecurringSetValue = scheduler.form_blocks.recurring.set_value;\r\n\t}\r\n\tvar original_left_buttons = scheduler.config.buttons_left.slice();\r\n\tvar original_right_buttons = scheduler.config.buttons_right.slice();\r\n\r\n\tscheduler.attachEvent(\"onBeforeLightbox\", function(id) {\r\n\t\tif (this.config.readonly_form || this.getEvent(id).readonly) {\r\n\t\t\tthis.config.readonly_active = true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.config.readonly_active = false;\r\n\t\t\tscheduler.config.buttons_left = original_left_buttons.slice();\r\n\t\t\tscheduler.config.buttons_right = original_right_buttons.slice();\r\n\t\r\n\t\t\t// initial value\r\n\t\t\tif(scheduler.form_blocks.recurring) {\r\n\t\t\t\tscheduler.form_blocks.recurring.set_value = originalRecurringSetValue;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar sns = this.config.lightbox.sections;\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\tfor (var i = 0; i < sns.length; i++) {\r\n\t\t\t\tif (sns[i].type == 'recurring') {\r\n\t\t\t\t\tif (this.config.readonly_active && scheduler.form_blocks.recurring) {\r\n\t\t\t\t\t\tscheduler.form_blocks.recurring.set_value = function(node, value, ev) {\r\n\t\t\t\t\t\t\tvar wrapper = scheduler.$domHelpers.closest(node, \".dhx_wrap_section\");\r\n\t\t\t\t\t\t\tvar style = \"none\";\r\n\t\t\t\t\t\t\twrapper.querySelector('.dhx_cal_lsection').display = style;\r\n\t\t\t\t\t\t\twrapper.querySelector('.dhx_form_repeat').display = style;\r\n\t\t\t\t\t\t\twrapper.style.display = style;\r\n\r\n\t\t\t\t\t\t\tscheduler.setLightboxSize();\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar forbidden_buttons = [\"dhx_delete_btn\", \"dhx_save_btn\"];\r\n\t\t\tvar button_arrays = [scheduler.config.buttons_left, scheduler.config.buttons_right];\r\n\t\t\tfor (var i = 0; i < forbidden_buttons.length; i++) {\r\n\t\t\t\tvar forbidden_button = forbidden_buttons[i];\r\n\t\t\t\tfor (var k = 0; k < button_arrays.length; k++) {\r\n\t\t\t\t\tvar button_array = button_arrays[k];\r\n\t\t\t\t\tvar index = -1;\r\n\t\t\t\t\tfor (var p = 0; p < button_array.length; p++) {\r\n\t\t\t\t\t\tif (button_array[p] == forbidden_button) {\r\n\t\t\t\t\t\t\tindex = p;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (index != -1) {\r\n\t\t\t\t\t\tbutton_array.splice(index, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.resetLightbox();\r\n\r\n\t\treturn true;\r\n\t});\r\n\r\n\tfunction txt_replace(tag, d, n, text) {\r\n\t\tvar txts = d.getElementsByTagName(tag);\r\n\t\tvar txtt = n.getElementsByTagName(tag);\r\n\t\tfor (var i = txtt.length - 1; i >= 0; i--) {\r\n\t\t\tvar n = txtt[i];\r\n\t\t\tif (!text){\r\n\t\t\t\tn.disabled = true;\r\n\t\t\t\t//radio and checkboxes loses state after .cloneNode in IE\r\n\t\t\t\tif(d.checked)\r\n\t\t\t\t\tn.checked = true;\r\n\t\t\t}else {\r\n\t\t\t\tvar t = document.createElement(\"span\");\r\n\t\t\t\tt.className = \"dhx_text_disabled\";\r\n\t\t\t\tt.innerHTML = text(txts[i]);\r\n\t\t\t\tn.parentNode.insertBefore(t, n);\r\n\t\t\t\tn.parentNode.removeChild(n);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tvar old = scheduler._fill_lightbox;\r\n\tscheduler._fill_lightbox = function() {\r\n\r\n\t\tvar lb = this.getLightbox();\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\tlb.style.visibility = 'hidden';\r\n\t\t\t// lightbox should have actual sizes before rendering controls\r\n\t\t\t// currently only matters for dhtmlxCombo\r\n\t\t\tlb.style.display = 'block';\r\n\t\t}\r\n\t\tvar res = old.apply(this, arguments);\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\t//reset visibility and display\r\n\t\t\tlb.style.visibility = '';\r\n\t\t\tlb.style.display = 'none';\r\n\t\t}\r\n\r\n\t\tif (this.config.readonly_active) {\r\n\r\n\t\t\tvar originalForm = this.getLightbox();\r\n\t\t\tvar readonlyForm = this._lightbox_r = originalForm.cloneNode(true);\r\n\t\t\treadonlyForm.id = scheduler.uid();\r\n\t\t\treadonlyForm.className += \" dhx_cal_light_readonly\";\r\n\t\t\ttxt_replace(\"textarea\", originalForm, readonlyForm, function(a) {\r\n\t\t\t\treturn a.value;\r\n\t\t\t});\r\n\t\t\ttxt_replace(\"input\", originalForm, readonlyForm, false);\r\n\t\t\ttxt_replace(\"select\", originalForm, readonlyForm, function(a) {\r\n\t\t\t\tif(!a.options.length) return \"\";\r\n\t\t\t\treturn a.options[Math.max((a.selectedIndex || 0), 0)].text;\r\n\t\t\t});\r\n\r\n\t\t\toriginalForm.parentNode.insertBefore(readonlyForm, originalForm);\r\n\r\n\t\t\tthis.showCover(readonlyForm);\r\n\t\t\tif (scheduler._lightbox)\r\n\t\t\t\tscheduler._lightbox.parentNode.removeChild(scheduler._lightbox);\r\n\t\t\tthis._lightbox = readonlyForm;\r\n\r\n\t\t\tif (scheduler.config.drag_lightbox)\r\n\t\t\t\tscheduler.event(readonlyForm.firstChild, \"mousedown\", scheduler._ready_to_dnd);\r\n\t\t\t\t\r\n\t\t\tscheduler._init_lightbox_events();\r\n\t\t\tthis.setLightboxSize();\r\n\t\t}\r\n\t\treturn res;\r\n\t};\r\n\r\n\tvar hold = scheduler.hide_lightbox;\r\n\tscheduler.hide_lightbox = function() {\r\n\t\tif (this._lightbox_r) {\r\n\t\t\tthis._lightbox_r.parentNode.removeChild(this._lightbox_r);\r\n\t\t\tthis._lightbox_r = this._lightbox = null;\r\n\t\t}\r\n\r\n\t\treturn hold.apply(this, arguments);\r\n\t};\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.occurrence_timestamp_in_utc = false;\r\nscheduler.config.recurring_workdays = [1,2,3,4,5];\r\nscheduler.form_blocks[\"recurring\"] = {\r\n\t_get_node : function(node){\r\n\t\tif (typeof node == \"string\"){\r\n\t\t\tlet element = scheduler._lightbox.querySelector(`#${node}`);\r\n\t\t\tif(!element){\r\n\t\t\t\t// form is detached from lightbox \r\n\t\t\t\t// search globally, won't work in LWC\r\n\t\t\t\telement = document.getElementById(node);\r\n\t\t\t}\r\n\t\t\tnode = element;\r\n\t\t}\r\n\t\tif (node.style.display == 'none')\r\n\t\t\tnode.style.display = \"\";\r\n\t\treturn node;\r\n\t},\r\n\t_outer_html: function(node){\r\n\t\treturn node.outerHTML || getOuterHTML(node);\r\n\r\n\t\t//probably not needed, FF v10- only\r\n\t\tfunction getOuterHTML(n){\r\n\t\t\tvar div = document.createElement('div'), h;\r\n\t\t\tdiv.appendChild( n.cloneNode(true) );\r\n\t\t\th = div.innerHTML;\r\n\t\t\tdiv = null;\r\n\t\t\treturn h;\r\n\t\t}\r\n\t},\r\n\trender:function(sns) {\r\n\t\tif(sns.form){\r\n\t\t\tvar rec = scheduler.form_blocks[\"recurring\"];\r\n\t\t\tvar form = rec._get_node(sns.form);\r\n\t\t\tvar html = rec._outer_html(form);\r\n\t\t\tform.style.display = 'none';\r\n\t\t\treturn html;\r\n\t\t}\r\n\t\tvar loc = scheduler.locale.labels;\r\n\t\treturn '
'+\r\n\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t''+loc.repeat_text_week_count+'
'+\r\n\t\t\t\t\t\t\t\t' '+\r\n\t\t\t\t\t\t\t\t\t' '+\r\n\t\t\t\t\t\t\t\t\t\t' '+\r\n\t\t\t\t\t\t\t\t\t\t' '+\r\n\t\t\t\t\t\t\t\t\t\t' '+\r\n\t\t\t\t\t\t\t\t\t\t' '+\r\n\t\t\t\t\t\t\t\t\t' '+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t\t''+\r\n\t\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t\t''+\r\n\t\t\t\t\t\t\t\t\t''+\r\n\t\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t''+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t''+\r\n\t\t\t\t\t\t\t\t''+\r\n\t\t\t\t\t\t\t\tloc.select_year_day2+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t''+loc.repeat_text_occurences_count+'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t'
'+\r\n\t\t\t\t'
'+\r\n\t\t\t\t'';\r\n\t},\r\n\t_ds: {},\r\n\t_get_form_node: function(els, name, value){\r\n\t\tvar col = els[name];\r\n\t\tif(!col) return null;\r\n\t\tif(col.nodeName) return col;\r\n\r\n\t\tif(col.length){\r\n\t\t\tfor(var i=0; i < col.length; i++){\r\n\t\t\t\tif(col[i].value == value)\r\n\t\t\t\t\treturn col[i];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\t_get_node_value: function(els, name, multiselect){\r\n\t\tvar col = els[name];\r\n\t\tif(!col) return \"\";\r\n\t\tif(col.length){\r\n\t\t\tif(multiselect){\r\n\t\t\t\tvar res = [];\r\n\t\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\t\tif (col[i].checked) res.push(col[i].value);\r\n\r\n\t\t\t\treturn res;\r\n\t\t\t}else{\r\n\t\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\t\tif (col[i].checked) return col[i].value;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(col.value)\r\n\t\t\treturn !multiselect ? col.value : [col.value];\r\n\t},\r\n\r\n\t_get_node_numeric_value: function(els, name){\r\n\t\tvar value = scheduler.form_blocks[\"recurring\"]._get_node_value(els, name);\r\n\t\treturn ((value * 1) || 0);\r\n\t},\r\n\r\n\t_set_node_value: function(els, name, value){\r\n\t\tvar col = els[name];\r\n\t\tif(!col) return;\r\n\r\n\t\tif(col.name == name){\r\n\t\t\tcol.value = value;\r\n\t\t}else if(col.length){\r\n\t\t\tvar hash_value = typeof value == \"object\";\r\n\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\tif (hash_value || col[i].value == value){\r\n\t\t\t\t\tcol[i].checked = hash_value ? !!value[col[i].value] : !!value;\r\n\t\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t_init_set_value:function(node, value, ev) {\r\n\t\tvar block = scheduler.form_blocks[\"recurring\"];\r\n\t\tvar get_value = block._get_node_value;\r\n\t\tvar set_value = block._set_node_value;\r\n\t\tscheduler.form_blocks[\"recurring\"]._ds = {start:ev.start_date, end:ev._end_date};\r\n\r\n\t\tvar str_date_format = scheduler.date.str_to_date(scheduler.config.repeat_date, false, true);\r\n\t\tvar str_date = function(str_date) {\r\n\t\t\tvar date = str_date_format(str_date);\r\n\t\t\tif (scheduler.config.include_end_by)\r\n\t\t\t\tdate = scheduler.date.add(date, 1, 'day');\r\n\t\t\treturn date;\r\n\t\t};\r\n\r\n\t\tvar date_str = scheduler.date.date_to_str(scheduler.config.repeat_date);\r\n\r\n\t\tvar top = node.getElementsByTagName(\"FORM\")[0];\r\n\t\tvar els = {};\r\n\r\n\t\tfunction register_els(inps) {\r\n\t\t\tfor (var i = 0; i < inps.length; i++) {\r\n\t\t\t\tvar inp = inps[i];\r\n\r\n\t\t\t\tif(inp.name){\r\n\t\t\t\t\tif(!els[inp.name]){\r\n\t\t\t\t\t\tels[inp.name] = inp;\r\n\t\t\t\t\t}else if(els[inp.name].nodeType){\r\n\t\t\t\t\t\tvar node = els[inp.name];\r\n\t\t\t\t\t\tels[inp.name] = [node, inp];\r\n\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tels[inp.name].push(inp);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tregister_els(top.getElementsByTagName(\"INPUT\"));\r\n\t\tregister_els(top.getElementsByTagName(\"SELECT\"));\r\n\r\n\t\tif (!scheduler.config.repeat_date_of_end) {\r\n\t\t\tvar formatter = scheduler.date.date_to_str(scheduler.config.repeat_date);\r\n\t\t\tscheduler.config.repeat_date_of_end = formatter(scheduler.date.add(scheduler._currentDate(), 30, \"day\"));\r\n\t\t}\r\n\t\tset_value(els, \"date_of_end\", scheduler.config.repeat_date_of_end);\r\n\r\n\t\tvar $ = function(a) {\r\n\t\t\treturn scheduler._lightbox.querySelector(`#${a}`) || { style:{} };//return fake object if node not found\r\n\t\t};\r\n\r\n\t\tfunction change_current_view() {\r\n\t\t\t$(\"dhx_repeat_day\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_week\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_month\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_year\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_\" + this.value).style.display = \"\";\r\n\t\t\tscheduler.setLightboxSize();\r\n\t\t}\r\n\r\n\t\tfunction get_repeat_code(dates) {\r\n\t\t\tvar code = [get_value(els, \"repeat\")];\r\n\t\t\tget_rcode[code[0]](code, dates);\r\n\r\n\t\t\twhile (code.length < 5) code.push(\"\");\r\n\t\t\tvar repeat = \"\";\r\n\r\n\t\t\tvar end = get_end_rule(els);\r\n\r\n\t\t\tif (end == \"no\") {\r\n\t\t\t\tdates.end = new Date(9999, 1, 1);\r\n\t\t\t\trepeat = \"no\";\r\n\t\t\t}\r\n\t\t\telse if (end == \"date_of_end\") {\r\n\t\t\t\tdates.end = str_date(get_value(els, \"date_of_end\"));\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tscheduler.transpose_type(code.join(\"_\"));\r\n\t\t\t\trepeat = Math.max(1, get_value(els, \"occurences_count\"));\r\n\r\n\t\t\t\tvar transp = 0;\r\n\r\n\t\t\t\t//var transp = ((code[0] == \"week\" && code[4] && code[4].toString().indexOf(scheduler.config.start_on_monday ? 1 : 0) == -1) ? 1 : 0);\r\n\r\n\t\t\t\t// which is equal to following code, seems to produce extra instance, not clear why needed\r\n\r\n\t\t\t\t/*if(code[0] == \"week\"){\r\n\t\t\t\t\tvar days = code[4] || \"\";\r\n\t\t\t\t\tif(scheduler.config.start_on_monday){\r\n\t\t\t\t\t\tif(days.indexOf(1) == -1)\r\n\t\t\t\t\t\ttransp = 1;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(days.indexOf(0) == -1)\r\n\t\t\t\t\t\ttransp = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}*/\r\n\r\n\t\t\t//\tdates.end = scheduler.date.add(new Date(dates.start), repeat + transp, code.join(\"_\"));\r\n\r\n\t\t\t\tdates.end = scheduler.date[\"add_\" + code.join(\"_\")](new Date(dates.start), repeat + transp, {start_date: dates.start}) || dates.start;\r\n\t\t\t}\r\n\r\n\t\t\treturn code.join(\"_\") + \"#\" + repeat;\r\n\t\t}\r\n\t\tfunction get_end_rule(els){\r\n\t\t\tvar end = els[\"end\"];\r\n\t\t\tif(end.length){\r\n\t\t\t\tfor(var i =0; i < end.length; i++){\r\n\t\t\t\t\tif(end[i].checked){\r\n\t\t\t\t\t\tif(end[i].value && end[i].value != \"on\"){//seems to be default value:var input = document.createElement(\"input\"); input.type = \"radio\"; input.value\r\n\t\t\t\t\t\t\treturn end[i].value;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tif(!i){\r\n\t\t\t\t\t\t\t\treturn \"no\";\r\n\t\t\t\t\t\t\t}else if(i == 2){\r\n\t\t\t\t\t\t\t\treturn \"date_of_end\";\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\treturn \"occurences_count\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(end.value)\r\n\t\t\t\t\treturn end.value;\r\n\t\t\t}\r\n\t\t\treturn \"no\";\r\n\t\t}\r\n\t\tfunction set_end_rule(els, value){\r\n\t\t\tvar end = els[\"end\"];\r\n\r\n\t\t\tif(end.length){\r\n\t\t\t\tvar has_values = !!end[0].value && end[0].value != \"on\";\r\n\t\t\t\tif(has_values){\r\n\t\t\t\t\tfor(var i =0; i < end.length; i++){\r\n\t\t\t\t\t\tif(end[i].value == value)\r\n\t\t\t\t\t\t\tend[i].checked = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar ind = 0;\r\n\t\t\t\t\tswitch(value){\r\n\t\t\t\t\t\tcase \"no\":\r\n\t\t\t\t\t\t\tind = 0;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"date_of_end\":\r\n\t\t\t\t\t\t\tind = 2;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tind = 1;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend[ind].checked = true;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tend.value = value;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tscheduler.form_blocks[\"recurring\"]._get_repeat_code = get_repeat_code;\r\n\t\tvar get_rcode = {\r\n\t\t\tmonth:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tif (get_value(els, \"month_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_count\")));\r\n\t\t\t\t\tdates.start.setDate(get_value(els, \"month_day\"));\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_count2\")));\r\n\t\t\t\t\tcode.push( get_value(els, \"month_day2\"));\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_week2\")));\r\n\t\t\t\t\tif (!scheduler.config.repeat_precise){\r\n\t\t\t\t\t\tdates.start.setDate(1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tdates._start = true;\r\n\t\t\t},\r\n\t\t\tweek:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"week_count\")));\r\n\t\t\t\tcode.push(\"\");\r\n\t\t\t\tcode.push(\"\");\r\n\t\t\t\tvar t = [];\r\n\r\n\t\t\t\tvar col = get_value(els, \"week_day\", true);\r\n\t\t\t\t//var col = els[\"week_day\"];\r\n\t\t\t\tvar day = dates.start.getDay();\r\n\t\t\t\tvar start_exists = false;\r\n\r\n\t\t\t\tfor (var i = 0; i < col.length; i++){\r\n\t\t\t\t\tt.push(col[i]);\r\n\t\t\t\t\tstart_exists = start_exists || col[i] == day;\r\n\t\t\t\t}\r\n\t\t\t\tif (!t.length){\r\n\t\t\t\t\tt.push(day);\r\n\t\t\t\t\tstart_exists = true;\r\n\t\t\t\t}\r\n\t\t\t\tt.sort();\r\n\r\n\r\n\t\t\t\tif (!scheduler.config.repeat_precise){\r\n\t\t\t\t\tdates.start = scheduler.date.week_start(dates.start);\r\n\t\t\t\t\tdates._start = true;\r\n\t\t\t\t} else if (!start_exists){\r\n\t\t\t\t\tscheduler.transpose_day_week(dates.start, t, 1, 7);\r\n\t\t\t\t\tdates._start = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcode.push(t.join(\",\"));\r\n\t\t\t},\r\n\t\t\tday:function(code) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tif (get_value(els, \"day_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"day_count\")));\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcode.push(\"week\");\r\n\t\t\t\t\tcode.push(1);\r\n\t\t\t\t\tcode.push(\"\");\r\n\t\t\t\t\tcode.push(\"\");\r\n\t\t\t\t\tcode.push(scheduler.config.recurring_workdays.join(\",\"));\r\n\t\t\t\t\tcode.splice(0, 1);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tyear:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\r\n\t\t\t\tif (get_value(els, \"year_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(\"1\");\r\n\t\t\t\t\tdates.start.setMonth(0);\r\n\t\t\t\t\tdates.start.setDate(get_value(els, \"year_day\"));\r\n\t\t\t\t\tdates.start.setMonth(get_value(els, \"year_month\"));\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcode.push(\"1\");\r\n\t\t\t\t\tcode.push(get_value(els, \"year_day2\"));\r\n\t\t\t\t\tcode.push(get_value(els, \"year_week2\"));\r\n\t\t\t\t\tdates.start.setDate(1);\r\n\t\t\t\t\tdates.start.setMonth(get_value(els, \"year_month2\"));\r\n\t\t\t\t}\r\n\t\t\t\tdates._start = true;\r\n\t\t\t}\r\n\t\t};\r\n\t\tvar set_rcode = {\r\n\t\t\tweek:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\t\tset_value(els, \"week_count\", code[1]);\r\n\r\n\t\t\t\tvar t = code[4].split(\",\");\r\n\t\t\t\tvar d = {};\r\n\t\t\t\tfor (var i = 0; i < t.length; i++) d[t[i]] = true;\r\n\r\n\t\t\t\tset_value(els, \"week_day\", d);\r\n\r\n\t\t\t\t//for (var i = 0; i < col.length; i++)\r\n\t\t\t\t//\tcol[i].checked = (!!d[col[i].value]);\r\n\t\t\t},\r\n\t\t\tmonth:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\r\n\t\t\t\tif (code[2] === \"\") {\r\n\t\t\t\t\tset_value(els, \"month_type\", \"d\");\r\n\t\t\t\t\tset_value(els, \"month_count\", code[1]);\r\n\t\t\t\t\tset_value(els, \"month_day\", dates.start.getDate());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tset_value(els, \"month_type\", \"w\");\r\n\t\t\t\t\tset_value(els, \"month_count2\", code[1]);\r\n\t\t\t\t\tset_value(els, \"month_week2\", code[3]);\r\n\t\t\t\t\tset_value(els, \"month_day2\", code[2]);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tday:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\t\tset_value(els, \"day_type\", \"d\");\r\n\t\t\t\tset_value(els, \"day_count\", code[1]);\r\n\t\t\t},\r\n\t\t\tyear:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\r\n\t\t\t\tif (code[2] === \"\") {\r\n\t\t\t\t\tset_value(els, \"year_type\", \"d\");\r\n\t\t\t\t\tset_value(els, \"year_day\", dates.start.getDate());\r\n\t\t\t\t\tset_value(els, \"year_month\", dates.start.getMonth());\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tset_value(els, \"year_type\", \"w\");\r\n\t\t\t\t\tset_value(els, \"year_week2\", code[3]);\r\n\t\t\t\t\tset_value(els, \"year_day2\", code[2]);\r\n\t\t\t\t\tset_value(els, \"year_month2\", dates.start.getMonth());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfunction set_repeat_code(code, dates) {\r\n\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\tvar data = code.split(\"#\");\r\n\t\t\tcode = data[0].split(\"_\");\r\n\t\t\tset_rcode[code[0]](code, dates);\r\n\r\n\t\t\tswitch (data[1]) {\r\n\t\t\t\tcase \"no\":\r\n\t\t\t\t\tset_end_rule(els, \"no\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"\":\r\n\t\t\t\t\tset_end_rule(els, \"date_of_end\");\r\n\r\n\t\t\t\t\tvar end_date = dates.end;\r\n\t\t\t\t\tif (scheduler.config.include_end_by){\r\n\t\t\t\t\t\tend_date = scheduler.date.add(end_date, -1, 'day');\r\n\t\t\t\t\t}\r\n\t\t\t\t\tset_value(els, \"date_of_end\", date_str(end_date));\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tset_end_rule(els, \"occurences_count\");\r\n\t\t\t\t\tset_value(els, \"occurences_count\", data[1]);\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tset_value(els, \"repeat\", code[0]);\r\n\t\t\t//e.checked = true;\r\n\r\n\t\t\tvar node = scheduler.form_blocks[\"recurring\"]._get_form_node(els, \"repeat\", code[0]);\r\n\t\t\tif(node.nodeName == \"SELECT\"/* && node.onchange*/){\r\n\t\t\t//\tnode.onchange();\r\n\t\t\t\tnode.dispatchEvent(new Event('change'));\r\n\t\t\t\tnode.dispatchEvent(new MouseEvent('click'));\r\n\t\t\t}else{\r\n\t\t\t\tnode.dispatchEvent(new MouseEvent('click'));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tscheduler.form_blocks[\"recurring\"]._set_repeat_code = set_repeat_code;\r\n\r\n\t\tfor (var i = 0; i < top.elements.length; i++) {\r\n\t\t\tvar el = top.elements[i];\r\n\t\t\tswitch (el.name) {\r\n\t\t\t\tcase \"repeat\":\r\n\t\t\t\t\tif (el.nodeName == \"SELECT\" && !el.$_eventAttached) {\r\n\t\t\t\t\t\tel.$_eventAttached = true;\r\n\t\t\t\t\t\tel.addEventListener(\"change\", change_current_view);\r\n\t\t\t\t\t} else if(!el.$_eventAttached){\r\n\t\t\t\t\t\tel.$_eventAttached = true;\r\n\t\t\t\t\t\tel.addEventListener(\"click\", change_current_view);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tscheduler._lightbox._rec_init_done = true;\r\n\t},\r\n\tset_value:function(node, value, ev) {\r\n\t\tvar rf = scheduler.form_blocks[\"recurring\"];\r\n\t\tif (!scheduler._lightbox._rec_init_done)\r\n\t\t\trf._init_set_value(node, value, ev);\r\n\t\tnode.open = !ev.rec_type;\r\n\r\n\t\tnode.blocked = this._is_modified_occurence(ev);\r\n\r\n\t\tvar ds = rf._ds;\r\n\t\tds.start = ev.start_date;\r\n\t\tds.end = ev._end_date;\r\n\r\n\t\trf._toggle_block();\r\n\r\n\t\tif (value)\r\n\t\t\trf._set_repeat_code(value, ds);\r\n\t},\r\n\tget_value:function(node, ev) {\r\n\t\tif (node.open) {\r\n\t\t\tvar ds = scheduler.form_blocks[\"recurring\"]._ds;\r\n\t\t\tvar actual_dates = {};\r\n\r\n\t\t\tvar timeControl = getTimeSection();\r\n\r\n\t\t\ttimeControl.getValue(actual_dates);\r\n\t\t\tds.start = actual_dates.start_date;\r\n\t\t\tev.rec_type = scheduler.form_blocks[\"recurring\"]._get_repeat_code(ds);\r\n\t\t\tif (ds._start) {\r\n\t\t\t\tev.start_date = new Date(ds.start);\r\n\t\t\t\tev._start_date = new Date(ds.start);\r\n\t\t\t\tds._start = false;\r\n\t\t\t} else\r\n\t\t\t\tev._start_date = null;\r\n\r\n\t\t\tev._end_date = ds.end;\r\n\t\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\t\t} else {\r\n\t\t\tev.rec_type = ev.rec_pattern = \"\";\r\n\t\t\tev._end_date = ev.end_date;\r\n\t\t}\r\n\t\treturn ev.rec_type;\r\n\t},\r\n\t_get_button: function(){\r\n\t\tvar node = getRecurringSection().header;\r\n\t\treturn node.firstChild.firstChild;\r\n\t},\r\n\t_get_form: function(){\r\n\t\treturn getRecurringSection().node;\r\n\t},\r\n\topen:function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form();\r\n\t\tif(!cont.open)\r\n\t\t\tblock._toggle_block();\r\n\t},\r\n\tclose: function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form();\r\n\r\n\t\tif(cont.open)\r\n\t\t\tblock._toggle_block();\r\n\t},\r\n\t_toggle_block: function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form(),\r\n\t\t\tel = block._get_button();\r\n\t\tif (!cont.open && !cont.blocked) {\r\n\t\t\tcont.style.height = \"auto\";//reset to default value\r\n\t\t\tif(el){\r\n\t\t\t\tel.style.backgroundPosition = \"-5px 0px\";\r\n\t\t\t\tel.nextSibling.innerHTML = scheduler.locale.labels.button_recurring_open;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tcont.style.height = \"0px\";\r\n\t\t\tif(el){\r\n\t\t\t\tel.style.backgroundPosition = \"-5px 20px\";\r\n\t\t\t\tel.nextSibling.innerHTML = scheduler.locale.labels.button_recurring;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcont.open = !cont.open;\r\n\r\n\t\tscheduler.setLightboxSize();\r\n\t},\r\n\tfocus:function(node) {\r\n\t},\r\n\tbutton_click:function(node, button, event) {\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\t\tvar cont = block._get_form();\r\n\t\tif (!cont.blocked)\r\n\t\t\tscheduler.form_blocks.recurring._toggle_block();\r\n\t}\r\n};\r\n\r\nfunction getTimeSection(){\r\n\tvar timeControl = scheduler.formSection('time');\r\n\tif(!timeControl){\r\n\t\ttimeControl = getFirstSectionOfType('time');\r\n\t}\r\n\tif(!timeControl){\r\n\t\ttimeControl = getFirstSectionOfType('calendar_time');\r\n\t}\r\n\r\n\t\r\n\tif (!timeControl) {\r\n\t\tthrow new Error([\"Can't calculate the recurring rule, the Recurring form block can't find the Time control. Make sure you have the time control in 'scheduler.config.lightbox.sections' config.\",\r\n\"You can use either the default time control https://docs.dhtmlx.com/scheduler/time.html, or the datepicker https://docs.dhtmlx.com/scheduler/minicalendar.html, or a custom control. \",\r\n\"In the latter case, make sure the control is named \\\"time\\\":\",\r\n\"\",\r\n\"scheduler.config.lightbox.sections = [\",\r\n\"{name:\\\"time\\\", height:72, type:\\\"YOU CONTROL\\\", map_to:\\\"auto\\\" }];\"]\r\n.join(\"\\n\"));\r\n\t}\r\n\r\n\treturn timeControl;\r\n}\r\n\r\nfunction getRecurringSection(){\r\n\tvar recurringSection = scheduler.formSection('recurring');\r\n\tif(!recurringSection){\r\n\t\trecurringSection = getFirstSectionOfType('recurring');\r\n\t}\r\n\r\n\tif (!recurringSection) {\r\n\t\tthrow new Error([\"Can't locate the Recurring form section.\",\r\n\t\t\"Make sure that you have the recurring control on the lightbox configuration https://docs.dhtmlx.com/scheduler/recurring_events.html#recurringlightbox \",\r\n\t\t\"and that the recurring control has name \\\"recurring\\\":\",\r\n\"\",\r\n\"scheduler.config.lightbox.sections = [\",\r\n\"\t{name:\\\"recurring\\\", ... }\",\r\n\"];\"].join(\"\\n\"));\r\n\r\n\t}\r\n\r\n\treturn recurringSection;\r\n}\r\n\r\nfunction getFirstSectionOfType(type){\r\n\tfor(var i = 0; i < scheduler.config.lightbox.sections.length; i++){\r\n\t\tvar section = scheduler.config.lightbox.sections[i];\r\n\t\tif(section.type === type){\r\n\t\t\treturn scheduler.formSection(section.name);\r\n\t\t}\r\n\t}\r\n\treturn null;\r\n}\r\n\r\n//problem may occur if we will have two repeating events in the same moment of time\r\nscheduler._rec_markers = {};\r\nscheduler._rec_markers_pull = {};\r\nscheduler._add_rec_marker = function(ev, time) {\r\n\tev._pid_time = time;\r\n\tthis._rec_markers[ev.id] = ev;\r\n\tif (!this._rec_markers_pull[ev.event_pid]) this._rec_markers_pull[ev.event_pid] = {};\r\n\tthis._rec_markers_pull[ev.event_pid][time] = ev;\r\n};\r\nscheduler._get_rec_marker = function(time, id) {\r\n\tvar ch = this._rec_markers_pull[id];\r\n\tif (ch) return ch[time];\r\n\treturn null;\r\n};\r\nscheduler._get_rec_markers = function(id) {\r\n\treturn (this._rec_markers_pull[id] || []);\r\n};\r\n\r\nfunction clearMilliseconds(date){\r\n//\treturn date;\r\n\treturn new Date(\r\n\t\tdate.getFullYear(), \r\n\t\tdate.getMonth(), \r\n\t\tdate.getDate(), \r\n\t\tdate.getHours(), \r\n\t\tdate.getMinutes(),\r\n\t\tdate.getSeconds(),\r\n\t\t0\r\n\t);\r\n}\r\n\r\nscheduler._rec_temp = [];\r\n(function() {\r\n\tvar old_add_event = scheduler.addEvent;\r\n\tscheduler.addEvent = function(start_date, end_date, text, id, extra_data) {\r\n\t\tvar ev_id = old_add_event.apply(this, arguments);\r\n\r\n\t\tif (ev_id && scheduler.getEvent(ev_id)) {\r\n\t\t\tvar ev = scheduler.getEvent(ev_id);\r\n\t\t\t\r\n\t\t\tif(ev.start_date){\r\n\t\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t\t}\r\n\t\t\tif(ev.end_date){\r\n\t\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t\t}\r\n\t\t\tif (this._is_modified_occurence(ev))\r\n\t\t\t\tscheduler._add_rec_marker(ev, ev.event_length * 1000);\r\n\t\t\tif (ev.rec_type)\r\n\t\t\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\t\t}\r\n\t\treturn ev_id;\r\n\t};\r\n})();\r\n\r\nscheduler.attachEvent(\"onEventIdChange\", function(id, new_id) {\r\n\tif (this._ignore_call) return;\r\n\tthis._ignore_call = true;\r\n\r\n\tif(scheduler._rec_markers[id]){\r\n\t\t//important for for correct work of scheduler.getEvents(from, to) and collision detection\r\n\t\tscheduler._rec_markers[new_id] = scheduler._rec_markers[id];\r\n\t\tdelete scheduler._rec_markers[id];\r\n\t}\r\n\r\n\tif(scheduler._rec_markers_pull[id]){\r\n\t\tscheduler._rec_markers_pull[new_id] = scheduler._rec_markers_pull[id];\r\n\t\tdelete scheduler._rec_markers_pull[id];\r\n\t}\r\n\r\n\tfor (var i = 0; i < this._rec_temp.length; i++) {\r\n\t\tvar tev = this._rec_temp[i];\r\n\t\tif (tev.event_pid == id) {\r\n\t\t\ttev.event_pid = new_id;\r\n\t\t\tthis.changeEventId(tev.id, new_id + \"#\" + tev.id.split(\"#\")[1]);\r\n\t\t}\r\n\t}\r\n\r\n\tfor(var i in this._rec_markers){\r\n\t\tvar tev = this._rec_markers[i];\r\n\t\tif(tev.event_pid == id){\r\n\t\t\ttev.event_pid = new_id;\r\n\t\t\ttev._pid_changed = true;\r\n\t\t}\r\n\t}\r\n\r\n\tvar el = scheduler._rec_markers[new_id];\r\n\tif(el && el._pid_changed) {\r\n\t\tdelete el._pid_changed;\r\n\t\tsetTimeout(function() {\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler.callEvent(\"onEventChanged\", [new_id, scheduler.getEvent(new_id)]);\r\n\t\t}, 1);\r\n\t}\r\n\r\n\tdelete this._ignore_call;\r\n});\r\nscheduler.attachEvent(\"onConfirmedBeforeEventDelete\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (this._is_virtual_event(id) || (this._is_modified_occurence(ev) && ev.rec_type && ev.rec_type != 'none')) {\r\n\t\tid = id.split(\"#\");\r\n\t\tvar nid = this.uid();\r\n\t\tvar tid = (id[1]) ? id[1] : Math.round(ev._pid_time / 1000);\r\n\r\n\t\tvar nev = this._copy_event(ev);\r\n\t\tnev.id = nid;\r\n\t\tnev.event_pid = ev.event_pid || id[0];\r\n\t\tvar timestamp = tid;\r\n\t\tnev.event_length = timestamp;\r\n\t\tnev.rec_type = nev.rec_pattern = \"none\";\r\n\t\tthis.addEvent(nev);\r\n\r\n\t\tthis._add_rec_marker(nev, timestamp * 1000);\r\n\t} else {\r\n\t\tif (ev.rec_type && this._lightbox_id)\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\tvar sub = this._get_rec_markers(id);\r\n\t\tfor (var i in sub) {\r\n\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\tid = sub[i].id;\r\n\t\t\t\tif (this.getEvent(id))\r\n\t\t\t\t\tthis.deleteEvent(id, true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventDeleted\", function(id, ev){\r\n\tif(!this._is_virtual_event(id) && this._is_modified_occurence(ev)){\r\n\t\tif(!scheduler._events[id]){\r\n\t\t\tev.rec_type = ev.rec_pattern = \"none\";\r\n\t\t\tthis.setEvent(id, ev);\r\n\t\t}\r\n\t}\r\n});\r\nscheduler.attachEvent(\"onEventChanged\", function(id, event) {\r\n\tif (this._loading) return true;\r\n\r\n\tvar ev = this.getEvent(id);\r\n\r\n\tif (this._is_virtual_event(id)) {\r\n\t\tvar id = id.split(\"#\");\r\n\t\tvar nid = this.uid();\r\n\t\tthis._not_render = true;\r\n\r\n\t\tvar nev = this._copy_event(event);\r\n\t\tnev.id = nid;\r\n\t\tnev.event_pid = id[0];\r\n\t\tvar timestamp = id[1];\r\n\t\tnev.event_length = timestamp;\r\n\t\tnev.rec_type = nev.rec_pattern = \"\";\r\n\r\n\t\tthis._add_rec_marker(nev, timestamp * 1000);\r\n\t\tthis.addEvent(nev);\r\n\r\n\t\tthis._not_render = false;\r\n\r\n\t} else {\r\n\t\tif(ev.start_date){\r\n\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t}\r\n\t\tif(ev.end_date){\r\n\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t}\r\n\r\n\t\tif (ev.rec_type && this._lightbox_id){\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\t}\r\n\t\tvar sub = this._get_rec_markers(id);\r\n\t\tfor (var i in sub) {\r\n\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\tdelete this._rec_markers[sub[i].id];\r\n\t\t\t\tthis.deleteEvent(sub[i].id, true);\r\n\t\t\t}\r\n\t\t}\r\n\t\tdelete this._rec_markers_pull[id];\r\n\r\n\t\t// it's possible that after editing event is no longer exists, in such case we need to remove _select_id flag\r\n\t\tvar isEventFound = false;\r\n\t\tfor (var k = 0; k < this._rendered.length; k++) {\r\n\t\t\tif (this._rendered[k].getAttribute(this.config.event_attribute) == id)\r\n\t\t\t\tisEventFound = true;\r\n\t\t}\r\n\t\tif (!isEventFound)\r\n\t\t\tthis._select_id = null;\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventAdded\", function(id) {\r\n\tif (!this._loading) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (ev.rec_type && !ev.event_length){\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventSave\", function(id, data, is_new_event) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (!ev.rec_type && data.rec_type && !this._is_virtual_event(id))\r\n\t\tthis._select_id = null;\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventCreated\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (!ev.rec_type)\r\n\t\tev.rec_type = ev.rec_pattern = ev.event_length = ev.event_pid = \"\";\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventCancel\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (ev.rec_type) {\r\n\t\tthis._roll_back_dates(ev);\r\n\t\t// a bit expensive, but we need to be sure that event re-rendered, because view can be corrupted by resize , during edit process\r\n\t\tthis.render_view_data();\r\n\t}\r\n});\r\nscheduler._roll_back_dates = function(ev) {\r\n\tif(ev.start_date){\r\n\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t}\r\n\tif(ev.end_date){\r\n\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t}\r\n\tev.event_length = Math.round((ev.end_date.valueOf() - ev.start_date.valueOf()) / 1000);\r\n\tev.end_date = ev._end_date;\r\n\tif (ev._start_date) {\r\n\t\tev.start_date.setMonth(0);\r\n\t\tev.start_date.setDate(ev._start_date.getDate());\r\n\t\tev.start_date.setMonth(ev._start_date.getMonth());\r\n\t\tev.start_date.setFullYear(ev._start_date.getFullYear());\r\n\r\n\t}\r\n};\r\n\r\nscheduler._is_virtual_event = function(id){\r\n\treturn id.toString().indexOf(\"#\") != -1;\r\n};\r\nscheduler._is_modified_occurence = function(ev){\r\n\treturn (ev.event_pid && ev.event_pid != \"0\");\r\n};\r\n\r\nscheduler.showLightbox_rec = scheduler.showLightbox;\r\nscheduler.showLightbox = function(id) {\r\n\tvar locale = this.locale;\r\n\tvar c = scheduler.config.lightbox_recurring;\r\n\tvar ev = this.getEvent(id);\r\n\tvar pid = ev.event_pid;\r\n\tvar isVirtual = this._is_virtual_event(id);\r\n\tif (isVirtual)\r\n\t\tpid = id.split(\"#\")[0];\r\n\r\n\t// show series\r\n\tvar showSeries = function(id) {\r\n\t\tvar event = scheduler.getEvent(id);\r\n\t\tevent._end_date = event.end_date;\r\n\t\tevent.end_date = new Date(event.start_date.valueOf() + event.event_length * 1000);\r\n\t\treturn scheduler.showLightbox_rec(id); // editing series\r\n\t};\r\n\r\n\tif ( (pid || pid*1 === 0) && ev.rec_type) {\r\n\t\t// direct API call on series id\r\n\t\treturn showSeries(id);\r\n\t}\r\n\tif ( !pid || pid === '0' || ( (!locale.labels.confirm_recurring || c == 'instance') || (c == 'series' && !isVirtual)) ) {\r\n\t\t// editing instance or non recurring event\r\n\t\treturn this.showLightbox_rec(id);\r\n\t}\r\n\tif (c == 'ask') {\r\n\t\tvar that = this;\r\n\t\tscheduler.modalbox({\r\n\t\t\ttext: locale.labels.confirm_recurring,\r\n\t\t\ttitle: locale.labels.title_confirm_recurring,\r\n\t\t\twidth: \"500px\",\r\n\t\t\tposition: \"middle\",\r\n\t\t\tbuttons:[locale.labels.button_edit_series, locale.labels.button_edit_occurrence, locale.labels.icon_cancel],\r\n\t\t\tcallback: function(index) {\r\n\t\t\t\tswitch(+index) {\r\n\t\t\t\t\tcase 0:\r\n\t\t\t\t\t\treturn showSeries(pid);\r\n\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\treturn that.showLightbox_rec(id);\r\n\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t} else {\r\n\t\tshowSeries(pid);\r\n\t}\r\n};\r\n\r\n\r\nscheduler.get_visible_events_rec = scheduler.get_visible_events;\r\nscheduler.get_visible_events = function(only_timed) {\r\n\tfor (var i = 0; i < this._rec_temp.length; i++)\r\n\t\tdelete this._events[this._rec_temp[i].id];\r\n\tthis._rec_temp = [];\r\n\r\n\tvar stack = this.get_visible_events_rec(only_timed);\r\n\tvar out = [];\r\n\tfor (var i = 0; i < stack.length; i++) {\r\n\t\tif (stack[i].rec_type) {\r\n\t\t\t//deleted element of series\r\n\t\t\tif (stack[i].rec_pattern != \"none\")\r\n\t\t\t\tthis.repeat_date(stack[i], out);\r\n\t\t}\r\n\t\telse out.push(stack[i]);\r\n\t}\r\n\treturn out;\r\n};\r\n\r\n\r\n(function() {\r\n\tvar old = scheduler.isOneDayEvent;\r\n\tscheduler.isOneDayEvent = function(ev) {\r\n\t\tif (ev.rec_type) return true;\r\n\t\treturn old.call(this, ev);\r\n\t};\r\n\tvar old_update_event = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id) {\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tif(ev && ev.rec_type){\r\n\t\t\t//rec_type can be changed without the lightbox,\r\n\t\t\t// make sure rec_pattern updated as well\r\n\t\t\tev.rec_pattern = (ev.rec_type || \"\").split(\"#\")[0];\r\n\t\t}\r\n\t\tif (ev && ev.rec_type && !this._is_virtual_event(id)) {\r\n\t\t\tscheduler.update_view();\r\n\t\t} else {\r\n\t\t\told_update_event.call(this, id);\r\n\t\t}\r\n\t};\r\n})();\r\n\r\nscheduler.transponse_size = {\r\n\tday:1, week:7, month:1, year:12\r\n};\r\nscheduler.date.day_week = function(sd, day, week) {\r\n\tsd.setDate(1);\r\n\tvar originalMonth = scheduler.date.month_start(new Date(sd));\r\n\tweek = (week - 1) * 7;\r\n\tvar cday = sd.getDay();\r\n\tvar nday = day * 1 + week - cday + 1;\r\n\tsd.setDate(nday <= week ? (nday + 7) : nday);\r\n\tvar newMonth = scheduler.date.month_start(new Date(sd));\r\n\tif(originalMonth.valueOf() !== newMonth.valueOf()){\r\n\t\treturn false;\r\n\t}\r\n\treturn true;\r\n};\r\nscheduler.transpose_day_week = function(sd, list, cor, size, cor2) {\r\n\tvar cday = (sd.getDay() || (scheduler.config.start_on_monday ? 7 : 0)) - cor;\r\n\tfor (var i = 0; i < list.length; i++) {\r\n\t\tif (list[i] > cday)\r\n\t\t\treturn sd.setDate(sd.getDate() + list[i] * 1 - cday - (size ? cor : cor2));\r\n\t}\r\n\tthis.transpose_day_week(sd, list, cor + size, null, cor);\r\n};\r\nscheduler.transpose_type = function(type) {\r\n\tvar transposeRecurring = \"transpose_\" + type;\r\n\tif (!this.date[transposeRecurring]) {\r\n\t\tvar recurringParts = type.split(\"_\");\r\n\t\tvar dayDurationMs = 60 * 60 * 24 * 1000;\r\n\t\tvar addRecurring = \"add_\" + type;\r\n\t\tvar recurringStepDays = this.transponse_size[recurringParts[0]] * recurringParts[1];\r\n\r\n\t\tif (recurringParts[0] == \"day\" || recurringParts[0] == \"week\") {\r\n\t\t\tvar weekDays = null;\r\n\t\t\tif (recurringParts[4]) {\r\n\t\t\t\tweekDays = recurringParts[4].split(\",\");\r\n\t\t\t\tif (scheduler.config.start_on_monday) {\r\n\t\t\t\t\tfor (var i = 0; i < weekDays.length; i++)\r\n\t\t\t\t\t\tweekDays[i] = (weekDays[i] * 1) || 7;\r\n\t\t\t\t\tweekDays.sort();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.date[transposeRecurring] = function(nd, td) {\r\n\t\t\t\tvar delta = Math.floor((td.valueOf() - nd.valueOf()) / (dayDurationMs * recurringStepDays));\r\n\t\t\t\tif (delta > 0)\r\n\t\t\t\t\tnd.setDate(nd.getDate() + delta * recurringStepDays);\r\n\t\t\t\tif (weekDays)\r\n\t\t\t\t\tscheduler.transpose_day_week(nd, weekDays, 1, recurringStepDays);\r\n\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t\tthis.date[addRecurring] = function(sd, inc) {\r\n\t\t\t\tvar nd = new Date(sd.valueOf());\r\n\t\t\t\tif (weekDays) {\r\n\t\t\t\t\tfor (var count = 0; count < inc; count++)\r\n\t\t\t\t\t\tscheduler.transpose_day_week(nd, weekDays, 0, recurringStepDays);\r\n\t\t\t\t} else\r\n\t\t\t\t\tnd.setDate(nd.getDate() + inc * recurringStepDays);\r\n\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t}\r\n\t\telse if (recurringParts[0] == \"month\" || recurringParts[0] == \"year\") {\r\n\t\t\tthis.date[transposeRecurring] = function(nd, td, seriesInstance) {\r\n\t\t\t\tvar delta = Math.ceil(((td.getFullYear() * 12 + td.getMonth() * 1 + 1) - (nd.getFullYear() * 12 + nd.getMonth() * 1 + 1)) / (recurringStepDays) - 1);\r\n\r\n\t\t\t\tif (delta >= 0){\r\n\t\t\t\t\tnd.setDate(1);\r\n\t\t\t\t\tnd.setMonth(nd.getMonth() + delta * recurringStepDays);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn scheduler.date[addRecurring](nd, 0, seriesInstance);\r\n\t\t\t\t//if (str[3]){\r\n\t\t\t\t//\tscheduler.date.day_week(nd, str[2], str[3]);\r\n\t\t\t\t//}\r\n\t\t\t};\r\n\t\t\tthis.date[addRecurring] = function(sd, inc, seriesInstance, currentCount) {\r\n\t\t\t\tif(!currentCount){\r\n\t\t\t\t\tcurrentCount = 1;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcurrentCount++;\r\n\t\t\t\t}\r\n\t\t\t\tvar maxCount = 12;\r\n\t\t\t\tif(currentCount > maxCount){\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar nd = new Date(sd.valueOf());\r\n\t\t\t\tnd.setDate(1);\r\n\r\n\r\n\t\t\t\tnd.setMonth(nd.getMonth() + inc * recurringStepDays);\r\n\t\t\t\tvar origMonth = nd.getMonth();\r\n\t\t\t\tvar origYear = nd.getFullYear();\r\n\t\t\t\tnd.setDate(seriesInstance.start_date.getDate());\r\n\t\t\t\tif (recurringParts[3]){\r\n\t\t\t\t\tscheduler.date.day_week(nd, recurringParts[2], recurringParts[3]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar correctOverflowInstances = scheduler.config.recurring_overflow_instances;\r\n\t\t\t\tif(nd.getMonth() != origMonth && correctOverflowInstances != \"none\"){\r\n\t\t\t\t\t// no such day in a month\r\n\t\t\t\t\tif(correctOverflowInstances === \"lastDay\"){\r\n\t\t\t\t\t\t// return either last day of the month\r\n\t\t\t\t\t\tnd = new Date(origYear, origMonth + 1, 0, nd.getHours(), nd.getMinutes(), nd.getSeconds(), nd.getMilliseconds());\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t// or go to the next instance\r\n\t\t\t\t\t\tnd = scheduler.date[addRecurring](new Date(origYear, origMonth + 1, 0), inc||1, seriesInstance, currentCount);\r\n\t\t\t\t\t\t// if next instance is not possible (e.g. 'repeat on 40th day of the month') null will be returned\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.repeat_date = function(ev, stack, non_render, from, to, maxCount) {\r\n\r\n\tfrom = from || this._min_date;\r\n\tto = to || this._max_date;\r\n\tvar max = maxCount || -1;\r\n\tvar td = new Date(ev.start_date.valueOf());\r\n\r\n\tvar startHour = td.getHours();\r\n\r\n\tvar visibleCount = 0;\r\n\r\n\tif (!ev.rec_pattern && ev.rec_type)\r\n\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\r\n\tthis.transpose_type(ev.rec_pattern);\r\n\ttd = scheduler.date[\"transpose_\" + ev.rec_pattern](td, from, ev);\r\n\twhile ( td && (\r\n\t\ttd < ev.start_date ||\r\n\t\tscheduler._fix_daylight_saving_date(td,from,ev,td,new Date(td.valueOf() + ev.event_length * 1000)).valueOf() <= from.valueOf() ||\r\n\t\ttd.valueOf() + ev.event_length * 1000 <= from.valueOf())){\r\n\t\t\ttd = this.date[\"add_\" + ev.rec_pattern](td, 1, ev);\r\n\r\n\t}\r\n\twhile (td && (td < to && td < ev.end_date && (max < 0 || visibleCount < max))) {\r\n\t\ttd.setHours(startHour);\r\n\r\n\t\tvar timestamp = (scheduler.config.occurrence_timestamp_in_utc) ? Date.UTC(td.getFullYear(), td.getMonth(), td.getDate(), td.getHours(), td.getMinutes(), td.getSeconds()) : td.valueOf();\r\n\t\tvar ch = this._get_rec_marker(timestamp, ev.id);\r\n\t\tif (!ch) { // unmodified element of series\r\n\t\t\tvar ted = new Date(td.valueOf() + ev.event_length * 1000);\r\n\t\t\tvar copy = this._copy_event(ev);\r\n\t\t\t//copy._timed = ev._timed;\r\n\t\t\tcopy.text = ev.text;\r\n\t\t\tcopy.start_date = td;\r\n\t\t\tcopy.event_pid = ev.id;\r\n\t\t\tcopy.id = ev.id + \"#\" + Math.round(timestamp / 1000);\r\n\t\t\tcopy.end_date = ted;\r\n\r\n\t\t\tcopy.end_date = scheduler._fix_daylight_saving_date(copy.start_date, copy.end_date, ev, td, copy.end_date);\r\n\r\n\t\t\tcopy._timed = this.isOneDayEvent(copy);\r\n\r\n\t\t\tif (!copy._timed && !this._table_view && !this.config.multi_day) return;\r\n\t\t\tstack.push(copy);\r\n\r\n\t\t\tif (!non_render) {\r\n\t\t\t\tthis._events[copy.id] = copy;\r\n\t\t\t\tthis._rec_temp.push(copy);\r\n\t\t\t}\r\n\r\n\t\t\tvisibleCount++;\r\n\r\n\t\t} else\r\n\t\tif (non_render){\r\n\t\t\tif(ch.rec_type != \"none\"){\r\n\t\t\t\tvisibleCount++;\r\n\t\t\t}\r\n\t\t\tstack.push(ch);\r\n\t\t}\r\n\r\n\t\ttd = this.date[\"add_\" + ev.rec_pattern](td, 1, ev);\r\n\t//\tif(!scheduler.date[\"validate_add_\" + ev.rec_pattern](td, 1, ev.rec_pattern)){\r\n\t///\t\talert(\"detect add\")\r\n\t//\t}\r\n\t}\r\n};\r\nscheduler._fix_daylight_saving_date = function(start_date, end_date, ev, counter, default_date) {\r\n\tvar shift = start_date.getTimezoneOffset() - end_date.getTimezoneOffset();\r\n\tif (shift) {\r\n\t\tif (shift > 0) {\r\n\t\t\t// e.g. 24h -> 23h\r\n\t\t\treturn new Date(counter.valueOf() + ev.event_length * 1000 - shift * 60 * 1000);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// e.g. 24h -> 25h\r\n\t\t\treturn new Date(end_date.valueOf() - shift * 60 * 1000);\r\n\t\t}\r\n\t}\r\n\treturn new Date(default_date.valueOf());\r\n};\r\nscheduler.getRecDates = function(id, max) {\r\n\tvar ev = typeof id == \"object\" ? id : scheduler.getEvent(id);\r\n\tvar recurrings = [];\r\n\tmax = max || 100;\r\n\r\n\tif (!ev.rec_type) {\r\n\t\treturn [\r\n\t\t\t{ start_date: ev.start_date, end_date: ev.end_date }\r\n\t\t];\r\n\t}\r\n\tif (ev.rec_type == \"none\") {\r\n\t\treturn [];\r\n\t}\r\n\r\n\tscheduler.repeat_date(ev, recurrings, true, ev.start_date, ev.end_date, max);\r\n\r\n\tvar result = [];\r\n\tfor(var i = 0; i < recurrings.length; i++){\r\n\t\tif(recurrings[i].rec_type != \"none\"){\r\n\t\t\tresult.push({start_date: recurrings[i].start_date, end_date: recurrings[i].end_date});\r\n\t\t}\r\n\t}\r\n\r\n\treturn result;\r\n};\r\nscheduler.getEvents = function(from, to) {\r\n\tvar result = [];\r\n\tfor (var a in this._events) {\r\n\t\tvar ev = this._events[a];\r\n\t\tif (ev && ev.start_date < to && ev.end_date > from) {\r\n\t\t\tif (ev.rec_pattern) {\r\n\t\t\t\tif (ev.rec_pattern == \"none\") continue;\r\n\t\t\t\tvar sev = [];\r\n\t\t\t\tthis.repeat_date(ev, sev, true, from, to);\r\n\t\t\t\tfor (var i = 0; i < sev.length; i++) {\r\n\t\t\t\t\t// if event is in rec_markers then it will be checked by himself, here need to skip it\r\n\t\t\t\t\tif (!sev[i].rec_pattern && sev[i].start_date < to && sev[i].end_date > from && !this._rec_markers[sev[i].id]) {\r\n\t\t\t\t\t\tresult.push(sev[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if (!this._is_virtual_event(ev.id)) { // if it's virtual event we can skip it\r\n\t\t\t\tresult.push(ev);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn result;\r\n};\r\n\r\nscheduler.config.repeat_date = \"%m.%d.%Y\";\r\nscheduler.config.lightbox.sections = [\r\n\t{name:\"description\", map_to:\"text\", type:\"textarea\" , focus:true},\r\n\t{name:\"recurring\", type:\"recurring\", map_to:\"rec_type\", button:\"recurring\"},\r\n\t{name:\"time\", height:72, type:\"time\", map_to:\"auto\"}\r\n];\r\n\r\n\r\n//drop secondary attributes\r\nscheduler._copy_dummy = function(ev) {\r\n\tvar start_date = new Date(this.start_date);\r\n\tvar end_date = new Date(this.end_date);\r\n\tthis.start_date = start_date;\r\n\tthis.end_date = end_date;\r\n\tthis.event_length = this.event_pid = this.rec_pattern = this.rec_type = null;\r\n};\r\n\r\nscheduler.config.include_end_by = false;\r\nscheduler.config.lightbox_recurring = 'ask'; // series, instance\r\n\r\nscheduler.attachEvent(\"onClearAll\", function(){\r\n\tscheduler._rec_markers = {}; //clear recurring events data\r\n\tscheduler._rec_markers_pull = {};\r\n\tscheduler._rec_temp = [];\r\n});\r\n\r\n}","import getSerializator from '../core/common/get_serializable_events';\r\nexport default function(scheduler){\r\n\r\n\t\r\nconst getSerializableData = getSerializator(scheduler);\r\n\r\n//redefine this method, if you want to provide a custom set of attributes for serialization\r\nscheduler.data_attributes=function(){\r\n\tvar attrs = [];\r\n\tvar format = scheduler._helpers.formatDate;\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\t\tfor (var name in ev)\r\n\t\t\tif (name.substr(0,1) !=\"_\")\r\n\t\t\t\tattrs.push([name,((name == \"start_date\" || name == \"end_date\")?format:null)]);\r\n\t\tbreak;\r\n\t}\r\n\treturn attrs;\r\n};\r\n\r\nscheduler.toXML = function(header){\r\n\tvar xml = [];\r\n\tvar attrs = this.data_attributes();\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\r\n\t\txml.push(\"\");\r\n\t\tfor (var i=0; i < attrs.length; i++)\r\n\t\t\txml.push(\"<\"+attrs[i][0]+\">\");\r\n\r\n\t\txml.push(\"\");\r\n\t}\r\n\treturn (header||\"\")+\"\"+xml.join(\"\\n\")+\"\";\r\n};\r\n\r\nscheduler._serialize_json_value = function(value){\r\n\tif(value === null || typeof value === \"boolean\"){\r\n\t\tvalue = \"\" + value;\r\n\t}else{\r\n\t\tif(!value && value !== 0){\r\n\t\t\tvalue = \"\";\r\n\t\t}\r\n\t\tvalue = '\"' + value.toString().\r\n\t\t\treplace(/\\n/g,\"\").\r\n\t\t\treplace(/\\\\/g,\"\\\\\\\\\").\r\n\t\t\treplace(/\"/g, '\\\\\"') + '\"';\r\n\t}\r\n\treturn value;\r\n};\r\n\r\n\r\n\r\nscheduler.toJSON = function(){\r\n\treturn JSON.stringify(this.serialize());\r\n};\r\n\r\n\r\nscheduler.toICal = function(header){\r\n\tvar start = \"BEGIN:VCALENDAR\\nVERSION:2.0\\nPRODID:-//dhtmlXScheduler//NONSGML v2.2//EN\\nDESCRIPTION:\";\r\n\tvar end = \"END:VCALENDAR\";\r\n\tvar format = scheduler.date.date_to_str(\"%Y%m%dT%H%i%s\");\r\n\tvar full_day_format = scheduler.date.date_to_str(\"%Y%m%d\");\r\n\r\n\tvar ical = [];\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\r\n\r\n\t\tical.push(\"BEGIN:VEVENT\");\r\n\t\tif (!ev._timed || (!ev.start_date.getHours() && !ev.start_date.getMinutes()))\r\n\t\t\tical.push(\"DTSTART:\"+full_day_format(ev.start_date));\r\n\t\telse\r\n\t\t\tical.push(\"DTSTART:\"+format(ev.start_date));\r\n\t\tif (!ev._timed || (!ev.end_date.getHours() && !ev.end_date.getMinutes()))\r\n\t\t\tical.push(\"DTEND:\"+full_day_format(ev.end_date));\r\n\t\telse\r\n\t\t\tical.push(\"DTEND:\"+format(ev.end_date));\r\n\t\tical.push(\"SUMMARY:\"+ev.text);\r\n\t\tical.push(\"END:VEVENT\");\r\n\t}\r\n\treturn start+(header||\"\")+\"\\n\"+ical.join(\"\\n\")+\"\\n\"+end;\r\n};\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Timeline\", scheduler.assert);\r\n}","import { TooltipManager } from \"./tooltipManager\";\r\n\r\nexport default function (scheduler: any) {\r\n\r\n\tscheduler.config.tooltip_timeout = 30;\r\n\tscheduler.config.tooltip_offset_y = 20;\r\n\tscheduler.config.tooltip_offset_x = 10;\r\n\tscheduler.config.tooltip_hide_timeout = 30;\r\n\r\n\tconst tooltipManager = new TooltipManager(scheduler);\r\n\r\n\tscheduler.ext.tooltips = tooltipManager;\r\n\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function () {\r\n\r\n\t\ttooltipManager.tooltipFor({\r\n\t\t\tselector: \"[\" + scheduler.config.event_attribute + \"]\",\r\n\t\t\thtml: (event: MouseEvent) => {\r\n\t\t\t\tif (scheduler._mobile && !scheduler.config.touch_tooltip) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst targetEventId = scheduler._locate_event(event.target);\r\n\t\t\t\tif (scheduler.getEvent(targetEventId)) {\r\n\t\t\t\t\tconst event = scheduler.getEvent(targetEventId);\r\n\t\t\t\t\treturn scheduler.templates.tooltip_text(event.start_date, event.end_date, event);\r\n\t\t\t\t}\r\n\t\t\t\treturn null;\r\n\t\t\t},\r\n\t\t\tglobal: false\r\n\t\t});\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function () {\r\n\t\ttooltipManager.destructor();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onLightbox\", function () {\r\n\t\ttooltipManager.hideTooltip();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeDrag\", function() {\r\n\t\ttooltipManager.hideTooltip();\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventDeleted\", function() {\r\n\t\ttooltipManager.hideTooltip();\r\n\t\treturn true;\r\n\t});\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Tree Timeline\", scheduler.assert);\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Units\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\nscheduler._get_url_nav = function(){\r\n\tvar p = {};\r\n\tvar data = (document.location.hash || \"\").replace(\"#\", \"\").split(\",\");\r\n\tfor (var i = 0; i < data.length; i++) {\r\n\t\tvar s = data[i].split(\"=\");\r\n\t\tif (s.length == 2)\r\n\t\t\tp[s[0]] = s[1];\r\n\t}\r\n\treturn p;\r\n};\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\", function () {\r\n\tvar first = true;\r\n\tvar s2d = scheduler.date.str_to_date(\"%Y-%m-%d\");\r\n\tvar d2s = scheduler.date.date_to_str(\"%Y-%m-%d\");\r\n\tvar select_event = scheduler._get_url_nav().event || null;\r\n\r\n\tscheduler.attachEvent(\"onAfterEventDisplay\", function(ev){\r\n\t\tselect_event = null;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function (om, od, m, d) {\r\n\t\tif (first) {\r\n\t\t\tfirst = false;\r\n\t\t\tvar p = scheduler._get_url_nav();\r\n\r\n\t\t\tif (p.event){\r\n\t\t\t\ttry{\r\n\t\t\t\t\tif(scheduler.getEvent(p.event)){\r\n\t\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\t\tshowEvent(p.event);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tvar handler = scheduler.attachEvent(\"onXLE\", function(){\r\n\t\t\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\t\t\tshowEvent(p.event);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\tscheduler.detachEvent(handler);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (e){}\r\n\t\t\t}\r\n\r\n\t\t\tif (p.date || p.mode) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tthis.setCurrentView((p.date ? s2d(p.date) : null), (p.mode || null));\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\t//assuming that mode is not available anymore\r\n\t\t\t\t\tthis.setCurrentView((p.date ? s2d(p.date) : null), m);\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar values = [\r\n\t\t\t\"date=\" + d2s(d || od),\r\n\t\t\t\"mode=\" + (m || om)\r\n\t\t];\r\n\r\n\t\tif(select_event){\r\n\t\t\tvalues.push(\"event=\" + select_event);\r\n\t\t}\r\n\r\n\t\tvar text = \"#\" + values.join(\",\");\r\n\t\tdocument.location.hash = text;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tfunction showEvent(e){\r\n\t\tif(scheduler.$destroyed){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tselect_event = e;\r\n\t\tif(scheduler.getEvent(e)){\r\n\t\t\tscheduler.showEvent(e);\r\n\t\t}\r\n\t}\r\n});\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Week Agenda\", scheduler.assert);\r\n}","export default function(scheduler){\r\nscheduler.attachEvent(\"onLightBox\",function(){\r\n\tif (this._cover){\r\n\t\ttry{\r\n\t\t\tthis._cover.style.height = this.expanded ? \"100%\" : ((document.body.parentNode||document.body).scrollHeight+\"px\");\r\n\t\t} catch(e) {\r\n\r\n\t\t}\r\n\t}\r\n});\r\n\r\nscheduler.form_blocks.select.set_value=function(node,value,ev){\r\n\tif (typeof value == \"undefined\" || value === \"\")\r\n\t\tvalue = (node.firstChild.options[0]||{}).value;\r\n\tnode.firstChild.value=value||\"\";\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\t// scheduler.config.year_x = 4;\r\n\t// scheduler.config.year_y = 3;\r\n\t// scheduler.xy.year_top = 0;\r\n\r\n\tscheduler.templates.year_date = function(date) {\r\n\t\treturn scheduler.date.date_to_str(scheduler.locale.labels.year_tab + \" %Y\")(date);\r\n\t};\r\n\tscheduler.templates.year_month = scheduler.date.date_to_str(\"%F\");\r\n\tscheduler.templates.year_scale_date = scheduler.date.date_to_str(\"%D\");\r\n\tscheduler.templates.year_tooltip = function(s, e, ev) {\r\n\t\treturn ev.text;\r\n\t};\r\n\r\n\tconst isYearMode = function() {\r\n\t\treturn scheduler._mode == \"year\";\r\n\t};\r\n\t\r\n\tconst getCellDate = function(node){\r\n\t\tvar day = scheduler.$domHelpers.closest(node, \"[data-cell-date]\");\r\n\t\tif(!day || !day.hasAttribute(\"data-cell-date\")) return null;\r\n\t\treturn scheduler.templates.parse_date(day.getAttribute(\"data-cell-date\"));\r\n\t};\r\n\r\n\t// dbl click hook for scheduler._on_dbl_click\r\n\tscheduler.dblclick_dhx_month_head = function(e) {\r\n\t\tif (isYearMode()) {\r\n\t\t\tconst target = e.target;\r\n\t\t\tif(scheduler.$domHelpers.closest(target, \".dhx_before\") || scheduler.$domHelpers.closest(target, \".dhx_after\")){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tconst date = getCellDate(target);\r\n\t\t\t\r\n\t\t\tif(date){\r\n\t\t\t\tconst start = date;\r\n\t\t\t\tconst end = this.date.add(start, 1, \"day\");\r\n\t\t\t\tif (!this.config.readonly && this.config.dblclick_create){\r\n\t\t\t\t\tthis.addEventNow(start.valueOf(), end.valueOf(), e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\t\r\n\tscheduler.attachEvent(\"onEventIdChange\", function(){\r\n\t\tif (isYearMode())\r\n\t\t\tthis.year_view(true);\r\n\t});\r\n\r\n\r\n\tvar old = scheduler.render_data;\r\n\tscheduler.render_data = function(evs) {\r\n\t\tif (!isYearMode()) return old.apply(this, arguments);\r\n\t\tfor (var i = 0; i < evs.length; i++)\r\n\t\t\tthis._year_render_event(evs[i]);\r\n\t};\r\n\r\n\tvar clear = scheduler.clear_view;\r\n\tscheduler.clear_view = function() {\r\n\t\tif (!isYearMode()) return clear.apply(this, arguments);\r\n\t\tvar dates = scheduler._year_marked_cells,\r\n\t\t\tdiv = null;\r\n\t\tfor (var date in dates) {\r\n\t\t\tif (dates.hasOwnProperty(date)) {\r\n\t\t\t\tdiv = dates[date];\r\n\t\t\t\tdiv.classList.remove(\"dhx_year_event\", \"dhx_cal_datepicker_event\");\r\n\t\t\t\t// div.className = \"dhx_month_head\";\r\n\t\t\t\t// div.removeAttribute(\"date\");\r\n\t\t\t\t// div.removeAttribute(\"data-year-date\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tscheduler._year_marked_cells = {};\r\n\t};\r\n\r\n\tscheduler._hideToolTip = function() {\r\n\t\tif (this._tooltip) {\r\n\t\t\tthis._tooltip.style.display = \"none\";\r\n\t\t\tthis._tooltip.date = new Date(9999, 1, 1);\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._showToolTip = function(date, pos, e, src) {\r\n\t\tif (this._tooltip) {\r\n\t\t\tif (this._tooltip.date.valueOf() == date.valueOf()) return;\r\n\t\t\tthis._tooltip.innerHTML = \"\";\r\n\t\t} else {\r\n\t\t\tvar t = this._tooltip = document.createElement(\"div\");\r\n\t\t\tt.className = \"dhx_year_tooltip\";\r\n\t\t\tif (this.config.rtl) t.className += \" dhx_tooltip_rtl\";\r\n\t\t\tdocument.body.appendChild(t);\r\n\t\t\tt.addEventListener(\"click\", scheduler._click.dhx_cal_data);\r\n\t\t\tt.addEventListener(\"click\", function(e){\r\n\t\t\t\tif(e.target.closest(`[${scheduler.config.event_attribute}]`)){\r\n\t\t\t\t\tconst id = e.target.closest(`[${scheduler.config.event_attribute}]`).getAttribute(scheduler.config.event_attribute);\r\n\t\t\t\t\tscheduler.showLightbox(id);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\tvar evs = this.getEvents(date, this.date.add(date, 1, \"day\"));\r\n\t\tvar html = \"\";\r\n\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tif(!this.filter_event(ev.id, ev))\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\tvar bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\t\t\tvar color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\t\t\thtml += \"
\";\r\n\t\t\thtml += \"
\" + (evs[i]._timed ? this.templates.event_date(evs[i].start_date) : \"\") + \"
\";\r\n\t\t\thtml += \"
 
\";\r\n\t\t\thtml += this.templates.year_tooltip(evs[i].start_date, evs[i].end_date, evs[i]) + \"
\";\r\n\t\t}\r\n\r\n\t\tthis._tooltip.style.display = \"\";\r\n\t\tthis._tooltip.style.top = \"0px\";\r\n\r\n\r\n\t\tif (document.body.offsetWidth - pos.left - this._tooltip.offsetWidth < 0)\r\n\t\t\tthis._tooltip.style.left = pos.left - this._tooltip.offsetWidth + \"px\";\r\n\t\telse\r\n\t\t\tthis._tooltip.style.left = pos.left + src.offsetWidth + \"px\";\r\n\r\n\t\tthis._tooltip.date = date;\r\n\t\tthis._tooltip.innerHTML = html;\r\n\r\n\t\tif (document.body.offsetHeight - pos.top - this._tooltip.offsetHeight < 0)\r\n\t\t\tthis._tooltip.style.top = pos.top - this._tooltip.offsetHeight + src.offsetHeight + \"px\";\r\n\t\telse\r\n\t\t\tthis._tooltip.style.top = pos.top + \"px\";\r\n\t};\r\n\r\n\tscheduler._year_view_tooltip_handler = function(e){\r\n\t\tif (!isYearMode()) return;\r\n\r\n\t\tvar src = e.target || e.srcElement;\r\n\t\tif (src.tagName.toLowerCase() == 'a') // fix for active links extension (it adds links to the date in the cell)\r\n\t\t\tsrc = src.parentNode;\r\n\t\tif (scheduler._getClassName(src).indexOf(\"dhx_year_event\") != -1)\r\n\t\t\tscheduler._showToolTip(scheduler.templates.parse_date(src.getAttribute(\"data-year-date\")), scheduler.$domHelpers.getOffset(src), e, src);\r\n\t\telse\r\n\t\t\tscheduler._hideToolTip();\r\n\t};\r\n\tscheduler._init_year_tooltip = function() {\r\n\t\tscheduler._detachDomEvent(scheduler._els[\"dhx_cal_data\"][0], \"mouseover\", scheduler._year_view_tooltip_handler);\r\n\t\tscheduler.event(scheduler._els[\"dhx_cal_data\"][0], \"mouseover\", scheduler._year_view_tooltip_handler);\r\n\t};\r\n\r\n\tscheduler._get_year_cell = function(d) {\r\n\t\tvar dateString = scheduler.templates.format_date(d);\r\n\t\tvar cells = this.$root.querySelectorAll(`.dhx_cal_data .dhx_cal_datepicker_date[data-cell-date=\"${dateString}\"]`);\r\n\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\tif(!scheduler.$domHelpers.closest(cells[i], \".dhx_after, .dhx_before\")){\r\n\t\t\t\treturn cells[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t};\r\n\r\n\tscheduler._year_marked_cells = {};\r\n\tscheduler._mark_year_date = function(date, event) {\r\n\t\tvar dateString = scheduler.templates.format_date(date);\r\n\t\tvar cell = this._get_year_cell(date);\r\n\t\tif (!cell) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tvar ev_class = this.templates.event_class(event.start_date, event.end_date, event);\r\n\t\tif (!scheduler._year_marked_cells[dateString]) {\r\n\t\t\tcell.classList.add(\"dhx_year_event\", \"dhx_cal_datepicker_event\");// = \"dhx_month_head dhx_year_event\";\r\n\t\t\tcell.setAttribute(\"data-year-date\", dateString);\r\n\t\t\tcell.setAttribute(\"date\", dateString);\r\n\t\t\tscheduler._year_marked_cells[dateString] = cell;\r\n\t\t}\r\n\t\tif(ev_class){\r\n\t\t\tcell.classList.add(ev_class);\r\n\t\t}\r\n\t};\r\n\tscheduler._unmark_year_date = function(date) {\r\n\t\tvar cell = this._get_year_cell(date);\r\n\t\tif (!cell) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcell.classList.remove(\"dhx_year_event\", \"dhx_cal_datepicker_event\");\r\n//\t\tcell.className = \"dhx_month_head\";\r\n\t};\r\n\tscheduler._year_render_event = function(event) {\r\n\t\tvar date = event.start_date;\r\n\t\tif (date.valueOf() < this._min_date.valueOf()){\r\n\t\t\tdate = this._min_date;\r\n\t\t} else {\r\n\t\t\tdate = this.date.date_part(new Date(date));\r\n\t\t}\r\n\r\n\t\twhile (date < event.end_date) {\r\n\t\t\tthis._mark_year_date(date, event);\r\n\t\t\tdate = this.date.add(date, 1, \"day\");\r\n\t\t\tif (date.valueOf() >= this._max_date.valueOf())\r\n\t\t\t\treturn;\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler.year_view = function(mode) {\r\n\r\n\t\tscheduler.set_sizes();\r\n\r\n\t\tscheduler._table_view = mode;\r\n\r\n\t\tif (this._load_mode && this._load()) return;\r\n\r\n\t\tif (mode) {\r\n\t\t\tscheduler._init_year_tooltip();\r\n\t\t\tscheduler._reset_year_scale();\r\n\t\t\tif (scheduler._load_mode && scheduler._load()){\r\n\t\t\t\tscheduler._render_wait = true;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tscheduler.render_view_data();\r\n\t\t} else {\r\n\t\t\tscheduler._hideToolTip();\r\n\t\t}\r\n\t};\r\n\tscheduler._reset_year_scale = function() {\r\n\t\tthis._cols = [];\r\n\t\tthis._colsS = {};\r\n\t\tvar week_starts = []; //start day of first week in each month\r\n\t\tvar dataArea = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tvar c = this.config;\r\n\t\tdataArea.scrollTop = 0; //fix flickering in FF\r\n\t\tdataArea.innerHTML = \"\";\r\n\r\n\t\tvar dy = Math.floor((parseInt(dataArea.style.height) - scheduler.xy.year_top) / c.year_y);\r\n\t\tif (dy < 190) {\r\n\t\t\tdy = 190;\r\n\t\t}\r\n\r\n\t\tvar week_template = document.createElement(\"div\");\r\n\t\tvar dummy_date = this.date.week_start(scheduler._currentDate());\r\n\r\n\t\tthis._process_ignores(dummy_date, 7, \"day\", 1);\r\n\r\n\t\tfor (var i = 0; i < 7; i++) {\r\n\t\t\tif(!(this._ignores && this._ignores[i])) {\r\n\t\t\t\tthis._cols[i] = 'var(--dhx-scheduler-datepicker-cell-size)';\r\n\t\t\t\tthis._render_x_header(i, 0, dummy_date, week_template);\r\n\r\n\t\t\t}\r\n\t\t\tdummy_date = this.date.add(dummy_date, 1, \"day\");\r\n\t\t}\r\n\t\tweek_template.lastChild.className += \" dhx_scale_bar_last\";\r\n\r\n\t\tfor(var i = 0; i < week_template.childNodes.length; i++){\r\n\t\t\tthis._waiAria.yearHeadCell(week_template.childNodes[i]);\r\n\t\t}\r\n\r\n\t\tvar sd = this.date[this._mode + \"_start\"](this.date.copy(this._date));\r\n\t\tvar ssd = sd;\r\n\t\tvar yearBox = null;\r\n\t\tconst wrapper = document.createElement(\"div\");\r\n\t\twrapper.classList.add(\"dhx_year_wrapper\");\r\n\t\tfor (var i = 0; i < c.year_y; i++){\r\n\t\t\tfor (var j = 0; j < c.year_x; j++) {\r\n\t\t\t\tyearBox = document.createElement(\"div\");\r\n\t\t\t\tyearBox.className = \"dhx_year_box\";\r\n\r\n\t\t\t\tyearBox.setAttribute(\"date\", this._helpers.formatDate(sd));\r\n\t\t\t\tyearBox.setAttribute(\"data-month-date\", this._helpers.formatDate(sd));\r\n\t\t\t\tyearBox.innerHTML = \"
\" + week_template.innerHTML + \"
\";\r\n\r\n\t\t\t\tvar header = yearBox.querySelector(\".dhx_year_month\");\r\n\t\t\t\tvar grid = yearBox.querySelector(\".dhx_year_grid\");\r\n\t\t\t\tvar body = yearBox.querySelector(\".dhx_year_body\");\r\n\r\n\t\t\t\tvar headerId = scheduler.uid();\r\n\t\t\t\tthis._waiAria.yearHeader(header, headerId);\r\n\t\t\t\tthis._waiAria.yearGrid(grid, headerId);\r\n\r\n\r\n\t\t\t\theader.innerHTML = this.templates.year_month(sd);\r\n\r\n\r\n\r\n\t\t\t\tvar dd = this.date.week_start(sd);\r\n\t\t\t\tthis._reset_month_scale(body, sd, dd, 6);\r\n\r\n\t\t\t\tvar days = body.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var day = 0; day < days.length; day++){\r\n\t\t\t\t\tthis._waiAria.yearDayCell(days[day]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\twrapper.appendChild(yearBox);\r\n\r\n\t\t\t\tweek_starts[i * c.year_x + j] = (sd.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) % 7;\r\n\t\t\t\tsd = this.date.add(sd, 1, \"month\");\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdataArea.appendChild(wrapper);\r\n\r\n\t\tvar dateElement = this._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML = this.templates[this._mode + \"_date\"](ssd, sd, this._mode);\r\n\t\t}\r\n\r\n\t\tthis.week_starts = week_starts;\r\n\t\tweek_starts._month = ssd.getMonth();\r\n\t\tthis._min_date = ssd;\r\n\t\tthis._max_date = sd;\r\n\t};\r\n\r\n\tscheduler._reset_year_scale = function(){\r\n\r\n\t\tvar dataArea = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tdataArea.scrollTop = 0; //fix flickering in FF\r\n\t\tdataArea.innerHTML = \"\";\r\n\r\n\t\tlet yearStart = this.date.year_start(new Date(this._date));\r\n\t\t\r\n\t\tthis._min_date = this.date.week_start(new Date(yearStart));\r\n\r\n\t\tconst wrapper = document.createElement(\"div\");\r\n\t\twrapper.classList.add(\"dhx_year_wrapper\");\r\n\r\n\t\tlet currentDate = yearStart;\r\n\t\tfor(let i = 0; i < 12; i++){\r\n\t\t\tlet yearBox = document.createElement(\"div\");\r\n\t\t\tyearBox.className = \"dhx_year_box\";\r\n\r\n\t\t\tyearBox.setAttribute(\"date\", this._helpers.formatDate(currentDate));\r\n\t\t\tyearBox.setAttribute(\"data-month-date\", this._helpers.formatDate(currentDate));\r\n\t\t\tyearBox.innerHTML = `
${this.templates.year_month(currentDate)}
\r\n\t\t\t
`;\r\n\r\n\t\t\tconst yearGrid = yearBox.querySelector(\".dhx_year_grid\");\r\n\t\t\tconst datepicker = scheduler._createDatePicker(null, {\r\n\t\t\t\tdate: currentDate,\r\n\t\t\t\tminWeeks: 6\r\n\t\t\t});\r\n\t\t\tdatepicker._renderDayGrid(yearGrid);\r\n\t\t\tdatepicker.destructor();\r\n\r\n\t\t\twrapper.appendChild(yearBox);\r\n\r\n\t\t\tcurrentDate = this.date.add(currentDate, 1, \"month\");\r\n\r\n\t\t}\r\n\t\tdataArea.appendChild(wrapper);\r\n\r\n\t\tlet lastDate = this.date.add(yearStart, 1, \"year\");\r\n\t\tif(lastDate.valueOf() != this.date.week_start(new Date(lastDate)).valueOf()){\r\n\t\t\tlastDate = this.date.week_start(new Date(lastDate));\r\n\t\t\tlastDate = this.date.add(lastDate, 1, \"week\");\r\n\t\t}\r\n\t\tthis._max_date = lastDate;\r\n\t\tvar dateElement = this._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML = this.templates[this._mode + \"_date\"](yearStart, lastDate, this._mode);\r\n\t\t}\r\n\t};\r\n\r\n\tvar getActionData = scheduler.getActionData;\r\n\tscheduler.getActionData = function(n_ev) {\r\n\t\tif(!isYearMode()){\r\n\t\t\treturn getActionData.apply(scheduler, arguments);\r\n\t\t}\r\n\t\t\r\n\t\tvar date = getCellDate(n_ev.target);\r\n\t\treturn {\r\n\t\t\tdate:date,\r\n\t\t\tsection:null\r\n\t\t};\r\n\t};\r\n\r\n\tvar locateEvent = scheduler._locate_event;\r\n\tscheduler._locate_event = function(node) {\r\n\t\tvar id = locateEvent.apply(scheduler, arguments);\r\n\t\tif(!id){\r\n\t\t\t\r\n\t\t\tvar date = getCellDate(node);\r\n\t\t\tif(!date) return null;\r\n\t\t\tvar evs = scheduler.getEvents(date, scheduler.date.add(date, 1, \"day\"));\r\n\t\t\tif(!evs.length) return null;\r\n\r\n\t\t\t//can be multiple events in the cell, return any single one\r\n\t\t\tid = evs[0].id;\r\n\t\t}\r\n\t\treturn id;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tscheduler._hideToolTip();\r\n\t});\r\n}","import SchedulerFactory from \"./scheduler_factory\";\r\nimport gplExtensions from \"./ext/extensions_gpl\";\r\n\r\nconst factory = new SchedulerFactory(gplExtensions);\r\n\r\nconst scheduler = factory.getSchedulerInstance();\r\nconst Scheduler = {\r\n\tplugin: scheduler.bind(factory.plugin, factory)\r\n};\r\n\r\nwindow.scheduler = scheduler;\r\nwindow.Scheduler = Scheduler;\r\n\r\nif(!window.$dhx) {\r\n\twindow.$dhx = {};\r\n}\r\n\r\nwindow.$dhx.scheduler = scheduler;\r\nwindow.$dhx.Scheduler = Scheduler;\r\n\r\nexport default scheduler;export { scheduler, Scheduler };","\r\n\r\nimport dhtmlxHook from \"./dhtmlx_hook\";\r\nimport \"./css/theme.less\";\r\ndhtmlxHook();\r\n\r\nimport global from \"./global\";\r\n\r\nimport factoryMethod from \"./scheduler_factory_method\";\r\nimport ExtensionsManager from \"./ext/extension_manager\";\r\n\r\nclass SchedulerFactory {\r\n\r\n\tconstructor (extensions) {\r\n\t\tthis._seed = 0;\r\n\t\tthis._schedulerPlugins = [];\r\n\t\tthis._bundledExtensions = extensions;\r\n\t\tthis._extensionsManager = new ExtensionsManager(extensions);\r\n\t}\r\n\r\n\tplugin(code) {\r\n\t\tthis._schedulerPlugins.push(code);\r\n\r\n\t\tif(global.scheduler){\r\n\t\t\tcode(global.scheduler);\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetSchedulerInstance(initConfig) {\r\n\t\tvar scheduler = factoryMethod(this._extensionsManager);\r\n\r\n\t\tfor (var i = 0; i < this._schedulerPlugins.length; i++) {\r\n\t\t\tthis._schedulerPlugins[i](scheduler);\r\n\t\t}\r\n\t\tscheduler._internal_id = this._seed++;\r\n\t\r\n\t\tif (this.$syncFactory){\r\n\t\t\tthis.$syncFactory(scheduler);\r\n\t\t}\r\n\r\n\t\tif(initConfig){\r\n\t\t\tthis._initFromConfig(scheduler, initConfig);\r\n\t\t}\r\n\r\n\t\treturn scheduler;\r\n\t}\r\n\r\n\t_initFromConfig(scheduler, initConfig){\r\n\t\tif(initConfig.plugins){\r\n\t\t\tscheduler.plugins(initConfig.plugins);\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.config){\r\n\t\t\tscheduler.mixin(scheduler.config, initConfig.config, true);\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.templates){\r\n\t\t\tscheduler.attachEvent(\"onTemplatesReady\", function(){\r\n\t\t\t\tscheduler.mixin(scheduler.templates, initConfig.templates, true);\r\n\t\t\t}, {once: true});\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.events){\r\n\t\t\tfor(const event in initConfig.events){\r\n\t\t\t\tscheduler.attachEvent(event, initConfig.events[event]);\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.locale){\r\n\t\t\tscheduler.i18n.setLocale(initConfig.locale);\r\n\t\t}\r\n\t\r\n\t\tif(Array.isArray(initConfig.calendars)){\r\n\t\t\tinitConfig.calendars.forEach(function(calendar){\r\n\t\t\t\tscheduler.addCalendar(calendar);\r\n\t\t\t});\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.container){\r\n\t\t\tscheduler.init(initConfig.container);\r\n\t\t} else {\r\n\t\t\tscheduler.init();\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.data){\r\n\t\t\tif(typeof initConfig.data === \"string\"){\r\n\t\t\t\tscheduler.load(initConfig.data);\r\n\t\t\t}else{\r\n\t\t\t\tscheduler.parse(initConfig.data);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\r\n}\r\n\r\nexport default SchedulerFactory;"],"names":["global$1","window","global","extend","scheduler","div","className","element","document","createElement","split","forEach","cssClass","classList","add","itemTypes","rows_container","row","view","config","setAttribute","fix_tab_position","$firstTab","$lastTab","$segmentedTab","date","button","builtInButton","spacer","minicalendarButton","minicalendarDiv","click","$_eventAttached","event","isCalendarVisible","destroyCalendar","renderCalendar","position","this","getState","navigation","handler","calendar","setCurrentView","html_element","renderElement","renderer","rows","cols","css","width","value","style","height","html","innerHTML","align","justifyContent","prepareConfig","renderLayout","items","fragment","createDocumentFragment","Array","isArray","i","length","next","appendChild","_init_nav_bar","navBar","$container","querySelector","_update_nav_bar","previousHeight","container","heightChanged","newHeight","xy","nav_height","unset_actions","_els","get_elements","set_actions","display","isAttachedNode","root","body","parentNode","getWindowSize","w","innerWidth","documentElement","clientWidth","h","innerHeight","clientHeight","listenWindowResize","resizeDelay","oldSize","clearTimeout","setTimeout","$destroyed","a","b","newSize","triggerSchedulerResize","$root","callEvent","updateView","getComputedStyle","getPropertyValue","resizeWatcher","tabIndex","wai_aria_attributes","offsetHeight","previousWidth","offsetWidth","lowlevelResizeWatcher","contentWindow","removeChild","EventHost","_silent_mode","listeners","createEventStorage","obj","handlers","index","eventStorage","combinedResult","handlerResult","apply","arguments","addEvent","settings","e","handlerId","id","once","originalHandler","removeEvent","clear","makeEventable","eventHost","attachEvent","eventName","toLowerCase","thisObject","bind","attachAll","callback","name","eventArguments","handlerName","concat","checkEvent","detachEvent","list","eventId","detachAllEvents","defaultDomEvents","el","addEventListener","eventRemove","removeEventListener","domEvents","eventScope","attach","capture","push","detach","splice","detachAll","staticArray","slice","_eventRemoveAll","_createDomEventScope","_trim","str","String","prototype","trim","replace","_isDate","getFullYear","getMonth","getDate","_isObject","uidSeed","Date","now","isDate","utils","uid","mixin","target","source","force","f","undefined","copy","object","result","pop","Function","toString","call","constructor","Number","Boolean","varType","Object","hasOwnProperty","defined","delay","timeout","timer","$cancelTimeout","$pending","args","$execute","getClassName","node","baseVal","indexOf","locateCss","classname","strict","trg","srcElement","ind","left","charAt","right","isVisible","visibility","currentStyle","hiddenSection","recurringSection","hasNonNegativeTabIndex","isNaN","getAttribute","hasHref","area","nodeName","loLowerCase","isEnabled","input","select","textarea","hasAttribute","isShadowDomSupported","head","createShadowRoot","attachShadow","getRootNode","ShadowRoot","host","dom_helpers","getAbsoluteLeft","htmlObject","getOffset","getAbsoluteTop","top","getOffsetSum","elem","parseInt","offsetTop","offsetLeft","offsetParent","getOffsetRect","box","getBoundingClientRect","test","navigator","userAgent","dummy","dummyBox","docElem","scrollTop","pageYOffset","scrollLeft","pageXOffset","clientTop","clientLeft","Math","round","closest","selector","insertAfter","newNode","referenceNode","nextSibling","insertBefore","remove","isChildOf","child","parent","contains","getFocusableNodes","nodes","querySelectorAll","join","nodesArray","$position","sort","hasShadowParent","getActiveElement","activeElement","shadowRoot","getSelection","focusNode","getRelativeEventPosition","ev","d","bottom","y","x","clientX","clientY","getTargetNode","tagName","composedPath","getNodePosition","Element","matches","msMatchesSelector","webkitMatchesSelector","parentElement","nodeType","isWindowAwailable","env","isIE","isIE6","XMLHttpRequest","isIE7","isIE8","isOpera","isChrome","isKHTML","isFF","isIPad","search","isEdge","isNode","serialize$1","data","key","serialized","encodeURIComponent","JSON","stringify","generateStringToDate","format","utc","splt","mask","match","code","csp_str_to_date","set","temp","locale","month_short_hash","month_full_hash","UTC","canUseCsp","useCsp","csp","init","s","month_short","t","month_full","_bind_host_object","method","date_part","old","setHours","setMinutes","setSeconds","setMilliseconds","getHours","setTime","getTime","time_part","valueOf","getTimezoneOffset","week_start","shift","getDay","start_on_monday","month_start","setDate","year_start","setMonth","day_start","_add_days","inc","ndate","rest","hours","mode","setYear","to_fixed","num","date_to_str","getUTCDate","getUTCMonth","getUTCFullYear","day_short","getUTCDay","day_full","getUTCHours","getUTCMinutes","getMinutes","getUTCSeconds","getSeconds","getUTCISOWeek","getISOWeek","func","str_to_date","exactFormat","stringToDateMethod","parseExactFormat","yyyyMMddhhIIss","MMddyyyyhhIIss","ddMMyyyyhhIIss","ISO8601","parseYMD","parseMDY","parseDMY","dateString","parse_exact_format","datestr","nday","first_thursday","year_number","ordinal_date","floor","convert_to_utc","getSerializator","res","_events","_loaded","_load","url","from","_load_url","to","prevent_cache","_date","_load_mode","lf","templates","load_format","_min_date","cache_line","_max_date","temp_to","ajax","get","ajaxCallback","response","on_load","_parsers","xml","canParse","xhr","responseXML","firstChild","xmlDoc","parse","responseText","topElement","xmltop","loader","csrfToken","dhtmlx","security_key","opts","xpath","arr","serverList","itms","j","attrs","attributes","label","k","attr","nodeValue","ud","udx","_xmlNodeToJSON","_userdata","text","evs","_init_event","json","events","dhx_security","collections","collections_loaded","collection","option","option_key","ical","RegExp","c_start","c_end","incoming","event_r","e_start","e_end","exec","param","param_r","parse_param","substr","parse_date","dh","dm","utcMark","dy","dn","dd","server_utc","error","foundParser","parser","_process","status","_process_loading","_loading","_not_render","_render_wait","render_view_data","_after_call","_tagvalue","start_date","_init_date","end_date","_helpers","parseDate","getSerializableData","createSerializator","serialize","dataset","allEvents","exportedEvent","exportValue","rawValue","xml_format","format_date","type","load","setLoadMode","array","childNodes","show_loading","_x","_y","_obj","_init_touch_events","touch","MSStream","platform","maxTouchPoints","scroll_width","_mobile","touchEventsSupported","createEvent","_touch_events","touches","pageX","pageY","PointerEvent","pointerEnabled","pointerType","msPointerEnabled","MSPOINTER_TYPE_MOUSE","names","accessor","ignore","tracker","drag_mode","scroll_mode","action_mode","dblclicktime","attachTouchEvent","_is_lightbox_open","passive","drag_cancel","_hide_global_tip","_on_mouse_up","_temp_touch_block","_drag_id","_drag_mode","_drag_pos","_pointerDragId","acc","dnd","timeline","matrix","_mode","original_render","drag_id","getEvent","property","y_property","getEvents","_sorder","_count","render_data","_on_mouse_move","preventDefault","cancelBubble","_update_global_tip","abs","fake_event","pointerId","_click","dhx_cal_data","_on_dbl_click","_block_next_stop","touch_drag","actTask","_locate_event","fakeTask","sourceTask","_ignore_next_click","_getClassName","previousSibling","_on_mouse_down","for_rendered","_rendered","touch_tip","_show_global_tip","updateEvent","touch_swipe_dates","s_ev","e_ev","step","max_dy","scrollable","dx","dhx_cal_next_button","dhx_cal_prev_button","toptip","_global_tip","time","_timed","event_header","day_date","labels","drag_to_create","drag_to_move","calculatedMaterial","cachedBorderBoxValue","checkIfBorderBoxStyling","_is_material_skin","probe","boxSizing","refreshAfterLoad","_border_box_events","oldStyling","flatSkinHourScale","min","_addThemeClass","skin","_skin_settings","use_select_menu_space","wide_form","hour_size_px","displayed_event_color","displayed_event_text_color","_skin_xy","lightbox_additional_height","bar_height","checkIfMaterialSkin","_build_skin_info","clearInterval","monitorIntervalId","setInterval","csstheme","setSkin","styles","themeVar","themeName","isCssVarTheme","cssValues","oldMaterialTheme","links","getElementsByTagName","href","themeNameFromFile","_theme_info","theme","cssVarTheme","values","themeVariables","_configure","col","_skin_init","render","hour_scale","hour_date","_old_month_day","month_day","old_month_day","_currentDate","dhx_cal_today_button","tab","header","tabs","specialTabs","map","tabName","find","filter","firstTab","reverse","DataProcessorEvents","dp","$scheduler","$dp","_dataProcessorHandlers","_validId","setUpdated","z","_new_event","_in_progress","_invalid","updatedRows","_waitMode","_update_callback","upd","setUserData","action_param","deleteEvent","_add_rec_marker","DataProcessor","serverProcessorURL","serverProcessor","autoUpdate","updateMode","_tMode","_headers","_payload","post_delim","messages","updated","inserted","deleted","invalid","invalid_cell","enableUTFencoding","eventable","message","boxAttribute","_dhx_msg_cfg","usercall","modalBox","hide","modal_key","which","keyCode","messageBox","keyboard","domHelpers","modality","cover","classValue","buttonAriaAttrs","_waiAria","messageButtonAttrString","getFirstDefined","_createBox","ok","cancel","contentId","messageModalAttr","inner","title","content","message_ok","message_cancel","buttons","btn","getElementById","hidden","focus","alertPopup","confirmPopup","boxPopup","box_params","params","expire","focusable","messageInfoAttr","timers","pull","seed","hideAll","popups","alert","confirm","modalbox","setTransactionMode","total","headers","payload","_tSend","_endnm","_serializeAsJson","_router","router","escape","_utf","setDataColumns","val","_columns","getSyncState","enableDataNames","enablePartialDataSend","_changed","setUpdateMode","master","rowId","state","findRow","existing","getUserData","set_invalid","is_invalid","markRow","sendData","_methods","details","getActionByState","checkBeforeUpdate","editStop","sendAllData","_beforeSendData","_getRowData","_sendData","_serializeAsJSON","serialize_one","stack","keys","pref","_applyPayload","urlSeparator","dataToSend","self","queryParams","ids","afterUpdate","urlParams","_user","_cleanupArgumentsBeforeSend","preprocessedData","_cleanupItemBeforeSend","action","query","_onResolvedCreateUpdate","tag","resultState","setRequestHeader","sid","tid","afterUpdateCallback","routerMode","actionPromise","create","delete","update","then","Error","catch","valid","_forEachUpdatedRow","_getAllData","out","has_one","pattern","defineAction","_uActions","btag","marker","correct","originalSid","_errorResponse","cleanUpdate","_setDefaultTransactionMode","_serverProcessor","that","finalizeUpdate","atag","_initialized","_dp_init","_is_virtual_event","_set_event_text_style","r","cssText","event_updated","rec_type","rec_pattern","_dp_change_event_id","new_id","changeEventId","_dp_hook_delete","setDp","_dp","dataProcessorEvents","_dataprocessor","setOnAfterUpdate","setOnBeforeUpdateHandler","setAutoUpdate","interval","user","_need_update","_update_busy","xml_node","afterAutoUpdate","fullSync","intervalId","loadUpdate","getUpdates","_getXmlNodeValue","version","vers","updates","destructor","processedData","updatedItem","output","_prepareDataItem","item","processedItem","formatDate","dataItem","ar","day_tab","week_tab","month_tab","new_event","icon_save","icon_cancel","icon_details","icon_edit","icon_delete","confirm_closing","confirm_deleting","section_description","section_time","full_day","confirm_recurring","section_recurring","button_recurring","button_recurring_open","button_edit_series","button_edit_occurrence","grid_tab","prev","year","month","day","hour","minute","be","agenda_tab","description","year_tab","week_agenda_tab","repeat_radio_day","repeat_radio_week","repeat_radio_month","repeat_radio_year","repeat_radio_day_type","repeat_text_day_count","repeat_radio_day_type2","repeat_week","repeat_text_week_count","repeat_radio_month_type","repeat_radio_month_start","repeat_text_month_day","repeat_text_month_count","repeat_text_month_count2_before","repeat_text_month_count2_after","repeat_year_label","select_year_day2","repeat_text_year_day","select_year_month","repeat_radio_end","repeat_text_occurences_count","repeat_radio_end2","repeat_radio_end3","month_for_recurring","day_for_recurring","ca","cn","cs","da","de","en","es","fi","fr","he","hu","it","jp","LocaleManager","_locales","nb","nl","no","pl","pt","ro","ru","si","sk","sv","tr","ua","DatePicker","modes","currentRange","eventDates","currentModeIndex","onStateChangeHandlers","_domEvents","onStateChange","oldState","newState","_notifyStateChange","direction","newDate","setFullYear","setState","_toggleMode","newIndex","backwardArrow","monthLabel","innerText","toLocaleString","startYear","forwardArrow","_adjustDate","_renderCalendarHeader","dataContainer","_renderDayGrid","_renderMonthGrid","_renderYearGrid","daysOfWeekContainer","currentDate","maxDate","labelFormat","dayElement","max","weeks","currWeek","minWeeks","minSchedulerDate","maxSchedulerDate","eventDaysTable","reduce","_renderDayGridHeader","firstDate","monthStart","monthEnd","lastDate","_weeksBetween","currDate","dayGridContainer","dateCell","wrapper","months","formatLabel","monthElement","doneArea","doneBtn","yearElement","factoryMethod","extensionManager","commonViews","agenda","grid","unit","week_agenda","anythingElse","requiredExtensions","limit","_commonErrorMessages","unknownView","relatedExtension","collapsedContainer","createTimelineView","createUnitsView","createGridView","addMarkedTimespan","exportToPNG","exportToPDF","common","nav_bar","_detachDomEvent","_init_once","scheduler_resize_listener","layout","hasSchedulerMarkup","console","wai_aria_application_role","views","_props","_grid","viewName","log","rtl","_scroll","init_templates","set_sizes","$initialized","min_event_height","scale_width","scale_height","month_scale_height","menu_width","margin_top","margin_left","editor_width","month_head_height","event_header_height","edit_save","edit_cancel","functor","scale_x","_table_view","materialScalePlaceholder","set_xy","_lightbox","_setLbPosition","_data_width","prepareValue","prepared","els","class_name","attr_value","labelAttr","domEventsScope","getDaysDifference","startDate","endDate","start","differenceInDays","src","_select_id","_close_not_saved","unselect","min_date","max_date","editor_id","_edit_id","lightbox_id","_lightbox_id","select_id","expanded","readonly","getActionData","icon","def_step","dhx_cal_tab","deprecated_name","substring","c","_dhtmlx_confirm","title_confirm_deleting","edit","save","showLightbox","form","addEventNow","end","base","event_duration","time_step","start_hour","first_hour","_drag_event","dblclick_create","details_on_dblclick","_get_column_index","x_pos","column","_cols","_ignores","_week_indexes_from_pos","pos","ceil","_mouse_coords","$env","_colsS","$domHelpers","dataArea","heights","_ignores_detected","preserve_length","_event_length","_get_real_event_length","x_step","x_unit","timestamp","title_confirm_closing","positive_closing","_correct_shift","back","_is_pos_changed","old_pos","new_pos","diff","old_val","new_val","has_moved","_correct_drag_start_date","len","_start_correction","_end_correction","last_hour","_get_fictional_event_length","_correct_drag_end_date","duration","mousedownPos","_get_date_from_pos","_drag_start","fields","timeStep","custom","_dragEventBody","_move_event_shift","resize_date","_drag_from_start","resize_from_start","end_day_start","end_day_date","firstHour","maxY","precisePos","minDate","preciseDate","cursor","new_end","new_start","limit_drag_out","all_timed","_get_section_view","_get_event_sday","getView","_allow_dnd","update_render","sx","update_view","drag_event_body","_lame_clone","_get_private_properties","_clear_temporary_properties","clean","flagged_event","initial","current_state","moved","_dhx_changed","is_new","edit_on_create","details_on_create","isOneDayEvent","_lame_copy","_trigger_dyn_loading","_reset_ignores","_reset_scale","isViewExists","_set_aria_buttons_attrs","buttonGroups","group","headerButtonsAttributes","icon_form","oldClass","newClass","multidayScroll","dhx_multi_day","prev_scroll","preserve_scroll","_dy_shift","headerToggleState","_render_x_header","offset_top","left_border","columnHeaderText","dayHeaderAttr","_get_columns_num","count","count_n","_get_timeunit_start","_get_view_end","ed","_calc_scale_sizes","summ","_process_ignores","realcount","_set_scale_col_size","_render_scales","data_area","sd","today","scales","cls","firstHalf","slotDate","htmlContent","time_slot_text","time_slot_class","secondHalf","week_date_class","dayColumnAttr","_getNavDateElement","drag_resize","drag_move","_scales","navBarDateStr","scaleElement","navBarDateAttr","_reset_month_scale","_reset_hours_scale","multi_day","c1","totalWidth","col_length","offset","hiddenWidth","c2","cloneNode","cc","hourScaleAttr","scroll_hour","now_date","n","preserve","ign_date","_render_month_scale","view_start","cd","tdwidths","cell_width","getCellHeight","cellheight","table","cell","month_date_class","body_class","head_class","monthCellAttr","cellHead","cellBody","bf1","getLabel","sections","lightbox","map_to","options","updateCollection","list_name","resetLightbox","hideCover","cache","n_ev","section","_focus","endColumnIndex","eventLength","startColumnIndex","_get_date_index","last_column","check","excludedDuration","intervalStart","intervalEnd","leftCellCutOffStart","leftCellCutOffEnd","rightCellCutOffStart","rightCellCutOffEnd","ev_length","dir","per_day","days","end_slot","fd","start_slot","_get_section_property","_is_initialized","htmlTags","extraSpaces","stripHTMLLite","htmlText","singleQuotes","escapeQuotes","getAttributeString","setAttributes","role","isActive","getHeaderCellAttr","eventAttr","_eventCommonAttr","event_text","$dataprocessor_class","setEventBarAttr","_getAttributes","attributeSetter","arg","eventBarAttrString","agendaHeadAttrString","agendaHeadDateString","agendaHeadDescriptionString","agendaDataAttrString","agendaEventAttrString","agendaDetailsBtnString","gridAttrString","gridRowAttrString","gridCellAttrString","mapAttrString","mapRowAttrString","mapDetailsBtnString","minicalHeader","headerId","minicalGrid","minicalRow","minicalDayCell","selected","minicalHeadCell","weekAgendaDayCell","weekAgendaEvent","lightboxHiddenAttr","lightboxVisibleAttr","lightboxSectionButtonAttrString","tabindex","yearHeader","yearGrid","yearHeadCell","yearRow","yearDayCell","lightboxAttr","lightboxButtonAttrString","buttonName","eventMenuAttrString","iconName","lightboxHeader","headerText","lightboxSelectAttrString","time_option","buttonLabel","quickInfoAttr","quickInfoHeaderAttrString","quickInfoHeader","quickInfoButtonAttrString","tooltipAttr","tooltipVisibleAttr","tooltipHiddenAttr","dom","assert","show_errors","_createDatePicker","_getFocusableNodes","_locate_css","messageApi","$","counter","methods","Promise","clearAll","createConfig","async","serializeRequestParams","DOMParser","ActiveXObject","loadXML","parseFromString","tagname","xpathExp","docObj","selectNodes","first","ownerDocument","evaluate","XPathResult","ANY_TYPE","iterateNext","_call","onLoad","getSync","put","postData","del","post","postSync","resolve","reject","isQt","readyState","filePath","open","toUpperCase","send","$ajax","default_date","month_date","load_date","week_date","date_format","api_date","day_column_padding","drag_create","resize_month_events","resize_month_timed","responsive_lightbox","separate_short_events","cascade_event_display","cascade_event_count","cascade_event_margin","multi_day_height_limit","drag_lightbox","quick_info_detached","drag_highlight","icons_edit","icons_select","buttons_left","buttons_right","highlight_displayed_event","ajax_error","delay_render","timeline_swap_resize","event_attribute","$initial","xml_date","d1","d2","day_scale_date","month_scale_date","week_scale_date","time_picker","event_date","event_class","event_bar_date","event_bar_text","month_events_link","drag_marker_class","drag_marker_content","tooltip_date_format","tooltip_text","calendar_month","calendar_scale_date","calendar_date","calendar_time","clear_view","extra_data","silent","setEvent","hash","create_getter","create_setter","is_visible_events","clear_event","evFirstHour","evLastHour","lastHour","checkEndDate","get_visible_events","only_timed","filter_event","_is_main_area_event","hold","full","_recalculate_timed","tvs","tvd","_rendered_location","buffer","renderedLocation","_view_month_day","_render_month_link","toRender","_sday","_eday","curr","_sweek","_get_event_bar_pos","widt","x2","_pre_render_events","containers","render_event_bar","max_evs","max_month_events","locate_holder","real","render_event","_get_first_visible_cell","cells","hb","h_old","_pre_render_events_table","_pre_render_events_line","monthRows","cellHeight","cHeight","unshift","scrollHeight","scroll_fix","scale_settings","sum_width","row_heights","full_multi_day_height","used_multi_day_height","used_multi_day_height_css","multi_day_section","multi_day_icon","overflowY","datePart","_get_event_mapped_end_date","ev_duration","_min_mapped_duration","evs_originals","sh","eh","_inner","t_ev","slot_index","sorderSet","_is_sorder","_max_sorder","max_count","_copy_event","_time_order","_is_any_multiday_cell_visible","isAnyCellVisible","checkDate","noCells","lastDayEnd","weekCellIndex","locate_holder_day","chunks_info","first_chunk","last_chunk","chunk_info","locate_s","locate_e","_length","stack_line","_first_chunk","_last_chunk","_copy_dummy","_y_from_date","sm","_calc_event_y","min_height","em","parentWidth","menu","menu_offset","pos_y","ev_count","ev_sorder","margin","_render_v_bar","_text_style","zIndex","color","setProperty","tplClass","_editor","shiftKey","ariaAttr","icons","icons_str","currentIcon","textColor","highlightEventPosition","contentA","contentB","_","cse","boxWidth","renderEvent","inner_html","footer_class","_drag_resize","past","_get_dnd_order","order","ev_height","max_height","_orig_sorder","evTop","columns","y_event_offset","resize_handle","resizable","left_chunk","right_chunk","resize_left","resize_right","timed","bg_color","style_text","_edit_stop_event","getRenderedEvent","rendered_events","rendered_event","showEvent","original_color","original_text_color","section_delimiter","getSectionTop","posFromDate","_smartRenderingEnabled","restoreOriginalColors","scrollTo","_append_drag_marker","m","scale","lastChild","_update_marker_position","size","getLightboxRoot","cspEnvironment","salesforceEnvironment","_lightbox_controls","formSection","getLightbox","getValue","form_blocks","get_value","setValue","set_value","get_template_control","control","get_select_control","get_textarea_control","get_time_control","defaults","template","sns","_get_input","_dhx_onchange","onchange","time_format","_time_format_order","cfg","dt","last","limit_time_select","p","selectBoxClass","range","start_year","end_year","year_range","g","tdate","_time_values","ariaAttrs","_full_day","checked","disabled","_fill_lightbox_select","auto_end_date","_update_lightbox_select","time_values","direct_value","fixed_value","value_found","t_v","selectedIndex","original","showCover","show_cover","_cover","_fill_lightbox","lightbox_header","headerContent","headerDate","headerTitle","current_sns","_get_lightbox_section_node","block","default_value","_lightbox_out","_empty_lightbox","hide_lightbox","endLightbox","hide_cover","_move_while_dnd","_finish_dnd","save_lightbox","startLightbox","_custom_lightbox","_temp_lightbox","cancel_lightbox","hideLightbox","_init_lightbox_events","buttonTarget","sectionButton","button_click","readonly_active","setLightboxSize","_init_dnd_events","_dnd_start_lb","dhx_unselectable","lb","_lb_start","_ready_to_dnd","recurring","_lightbox_template","label_name","ds","t_ds","_bindLightboxLabels","inputBlock","fallback","inputId","old_id","getRootView","hooks","didInsert","cmp","skins","jQuery","fn","dhx_scheduler","each","Scheduler","getSchedulerInstance","comp","update_view_timer","curr_view_timer","lazy_setCurrentView","oldDate","oldMode","updateFlags","lazy_updateView","ars","createDataProcessor","tMode","batchUpdate","dhtmlxError","catchError","i18n","addLocale","setLocale","localeObject","getLocale","dhx_save_btn","dhx_cancel_btn","dhx_delete_btn","ext","activePlugins","plugins","extensionList","dependencies","priorities","extension","dep","dependencyName","orderA","orderB","treetimeline","daytimeline","outerdrag","legacy","plugin","getExtension","ExtensionsManager","_extensions","attaches","attachScheduler","_genStr","attachObject","vs","av","sched","schedId","setSizes","_viewRestore","notImplemented","modals","modalsStack","isModal","afterPopup","trapFocus","currentTarget","$keyboardNavigation","_keyNavMessagePopup","focusElement","backupFocus","key_nav_legacy","_temp_key_scope","key_nav","_pasteDate","_pasteSection","isCopy","trackMousePosition","mousePointer","keyNavPointer","elementFromPoint","dispatcher","copyEvent","_make_pasted_event","event_pid","event_length","multisection","_do_paste","is_copy","modified_ev","original_ev","_is_key_nav_active","ctrlKey","metaKey","_buffer_event","_key_nav_copy_paste","getActiveNode","new_ev","scheduler_handlers","attachSchedulerHandlers","waitCall","keyDownHandler","focusHandler","keepScrollPosition","focusGlobalNode","enable","reFocusActiveNode","activeNode","isValid","MinicalButton","MinicalCell","mousedownHandler","dataAreaClick","Event","TimeSlot","nextSlot","setActiveNode","removeAttribute","evNode","prevState","lastStart","lastEnd","lastSection","getNode","Tooltip","_scheduler","_tooltipNode","_root","_isLikeMouseEvent","_calculateTooltipPosition","viewport","_getViewPortSize","tooltipNode","tooltip","offsetX","tooltip_offset_x","offsetY","tooltip_offset_y","mouse","containerPos","scrollY","_getViewPort","scrollX","$event_data","$event","TooltipManager","_listeners","_initDelayedFunctions","delayHide","watchableTarget","eventTarget","targetNode","doOnMouseEnter","onmouseenter","onmousemove","onmouseleave","listener","cloneDomEvent","clone","delayShow","utils.default","setContent","show","tooltip_timeout","tooltip_hide_timeout","gplExtensions","active_links","active_link_view","_active_link_click","s_d","do_wrapper","fullname","week_x","d_s","agenda_legacy","add_agenda_legacy","agenda_legacy_time","agenda_legacy_text","agenda_legacy_date","agenda_legacy_start","old_dblclick_dhx_cal_data","dblclick_dhx_cal_data","fill_agenda_tab","old_render_view_data","ev_class","agendaDetailsButtonAttr","agenda_time","agenda_text","_agendaScrollTop","agenda_area","dateElement","agenda_date","agenda_legacy_view","agenda_start","agenda_end","l","rowAttr","dateHeader","descriptionHeader","agenda_view","add_agenda","dayDateToStr","dayDowToStr","agenda_day","eventsInDays","anyEvents","eventStart","renderDay","calendarEvent","dates","selectedId","all_timed_month","is_event_short","_safe_copy","proto","isPrototypeOf","old_prerender_events_line","old_prerender_events_table","prerender_events","ce","_virtual","isOvernightEvent","getNextDay","setDateTime","event_changed","re","redraw","next_day","old_get_visible_events","old_mode","old_date","oldUpdate","fullRedrawNeeded","collision","temp_section","before","_setTempSection","event_id","collision_limit","checkCollision","edited_ev","_roll_back_dates","_check_sections_collision","second","evs_dates","getRecDates","tevs","concurrent","checked_mode","single","container_autoresize","month_day_min_height","min_grid_size","min_map_size","old_pre_render_event","active","total_height","multiday_height","evl","_h_fix","navHeight","headerHeight","checked_divs","updateContainterHeight","is_repaint","checked_div","maxHeight","year_y","cur_height","week_agenda_scale_height","eventsContainer","_gridView","y_unit","getSectionHeight","scrollWidth","getScrollSize","callUpdate","conditionalUpdateContainerHeight","asyncRepaint","requestAnimationFrame","autosizeEnabled","$original_scroll_width","$original_section_autoheight","section_autoheight","cookie","getCookieName","_get_url_nav","urlNavigationPlugin","schedulerCookie","unescape","newMode","cookie_param","old_load","drag_between","editors","cached_options","resetCombo","_combo","DOMParent","combo","unload","DOMelem","dhx_globalImgPath","image_path","dhtmlXCombo","options_height","setOptionHeight","enableFilteringMode","filtering","script_path","selected_id","addOption","disable","selectOption","setComboValue","all_options","single_option","getIndexByValue","getSelectedValue","getSelectedText","vertical","radiobuttons","checked_value","isChecked","check_html","o","label_html","checkbox","unchecked_value","expand","fullscreen","toggleIcon","_position","_width","_height","_overflow","overflow","_maximize","collapse","directions","prev_margin","export_api","std","getElementSizes","sizes","dhtmlxAjax","dhx4","getTimeline","orientation","dpi","zoom","_export_html","_send_to_export","exportToICal","_serialize_plain","exportToExcel","_serialize_columns","_ajax_to_export","server","info","_plain_export_copy","$text","_create_hidden_form","submit","_hidden_export_form","_get_export_size","footer","A5","A4","A3","A2","A1","A0","dataX","cSize","parseFloat","smartRendering","initialSizes","smart_rendering","style_width","style_height","timeline_scrollable","timeline_smart_rendering","grid_view","html_templates","all","getScope","scopes","minicalButton","minicalDate","SchedulerNode","DataArea","timeSlot","searchMap","key_nav_step","addShortcut","shortcut","scope","scopeObject","getShortcutHandler","commands","shortcuts","findHandler","removeShortcut","unbind","disp","setDefaultNode","_compose","parts","createCommand","modifiers","alt","ctrl","meta","expr","getExpressions","words","getWords","command","commandKeys","specialKeys","charCodeAt","getCommandFromEvent","domEvent","altKey","printableKey","fromCharCode","getHashFromEvent","getHash","junctionChar","term","combinationChar","backspace","enter","esc","space","up","down","home","pageup","pagedown","insert","plus","f1","f2","f3","f4","f5","f6","f7","f8","f9","f10","f11","f12","EventHandler","_handlers","doAction","returnValue","bindAll","initKeys","nextItem","currentFocus","currentIndex","divs","renderMultiple","currentStart","currentEnd","_modes","_getMode","units","renderVerticalMarker","renderTimelineMarker","renderYearMarker","renderMonthMarker","weekAgenda","renderWeekAgendaMarker","renderAgendaMarker","dayColumns","addWaiAriaLabel","addDataAttributes","dateToStr","dateTimeLabel","sectionObject","markerDate","_wrapDiv","_get_year_cell","opacity","view_opts","areas","round_position","blocks","_trace_x","_is_column_visible","start_pos","end_pos","set_date_part","tempStart","tempEnd","_timeline_getX","_section_height","_isRender","renderMonthCell","weekNumber","dayIndex","datatable","inner_index","all_hours_height","hour_ms","lineHeight","getDefaultNode","getMode","blur","_compareEvents","_pickEvent","startId","nextEventHandler","nextEvent","currEvent","visibleDates","nextEv","prevEventHandler","HeaderCell","getNodes","KeyNavNode","moveTo","compareTo","canStringifyThis","canStringifyThat","defaultCell","_getSection","_getNodes","eventNode","defaultElement","isScrolledIntoView","eventBox","viewPort","idSelector","inlineEditor","getInlineEditor","isMultisectionEvent","_moveToSlot","slot","movingDate","getDefaultDate","_getDefaultSection","visibleTime","nowTime","showNowTime","findVisibleColumn","timeslot","_getMultisectionView","_getNextSection","sectionId","nextIndex","defaultSlot","addMonthDate","nextMonthSlot","_alignTimeSlot","nextTimelineSlot","newPos","nextUnitsSlot","optionsCount","nextDaySlot","_moveDate","isBeforeLastHour","isStartDate","minutes","isAfterFirstHour","isInVisibleDayTime","oldStart","toNextDay","testEnd","nextWeekAgendaSlot","nextAgendaSlot","isDateVisible","nextDateColumn","current","tempSlot","extendSlot","extendUnitsSlot","extendTimelineSlot","extendMonthSlot","extendDaySlot","extendWeekAgendaSlot","extendGenericSlot","allowedDirections","moveDate","newDates","extendSlotDates","oldSlot","newSlot","dateDirection","scrollSlot","globalNode","_getGrid","_getNode","enabled","newRow","newCol","blurNode","editor","defaultPrevented","schedulerNode","_timeout","_minicalendars","isMinical","minicalendars","patchMinicalendar","focusMinical","minicalClick","rowIndex","cellIndex","td","renderMinical","cal","added","destroyMinical","_def_count","attachOnce","isSchedulerSelected","changeState","layer","layers","validId","_clearUpdateFlag","_cloneObj","_dataprocessors","_layers_zindex","initial_layer_zindex","isDefault","defaultLayer","showLayer","tlayer","toggleLayer","hideLayer","visible","getLayer","layer_name","native_event_object","noMenu","_evs_layer","_t_render_view_data","evs_layer","borderBox","borderBoxWidth","headerWidth","bodyWidth","footerWidth","bodyHeight","new_zIndex","filter_agenda","limit_start","limit_end","limit_view","check_limits","mark_now","display_marked_timespans","overwrite_marked_timespans","_temp_limit_scope","dhx_time_block","default_timespan_type","get_resulting_options","zones","blockTime","unblockTime","deleteMarkedTimespan","om","od","nm","nd","isBlocked","date_end","resetDate","checkInMarkedTimespan","timespan_type","on_overlap","temp_start_date","temp_end_date","timespans","_marked_timespans","day_value","getZones","_get_zone_minutes","eventEnd","markerStart","markerEnd","blocker","checkLimitViolation","complete_res","allow","day_index","linker","_add_timespan_zones","_get_blocked_zones","timeline_zones","blocked_timeline_zones","_get_relevant_blocked_zones","resultZones","is_new_event","data_copy","native_object","_mark_now","_mark_now_timer","dhx_now_time","_remove_mark_now","_append_mark_now","zone_start","start_index","end_index","units_l","r_divs","t_day","t_div","_render_marked_timespan","_prepare_timespan_options","r_configs","temp_configs","t_days","cloned_config","invert_zones","invertZones","view_key","t_config","c_config","t_sd","t_ed","zone_end","_get_dates_by_index","start_day","delta","t_date","_get_css_classes_by_config","css_classes","_get_block_by_config","date_to_display","min_day","sday","block_proto","_mark_timespans","_on_scale_add_marker","markTimespan","configuration","rebuild_els","timespans_ids","_marked_timespans_ids","timespan_types","_marked_timespans_types","unmarkTimespan","_addMarkerTimespanConfig","unit_id","timespans_view","day_configs","_array","configs","current_zones","resulting_zones","c_zone_start","c_zone_end","isLast","_subtract_timespan_zones","is_modified","_delete_marked_timespan_by_id","parent_array","_delete_marked_timespan_by_config","viewspans","_delete_marked_timespans_list","dayConfig","day_timespans","d_t","related_zones","types","typedConfig","_get_types_to_render","specific","types_to_render","_get_configs_to_render","_get_unit_index","day_ind","unitsPerDay","unit_zones","unit_types","global_data","day_types","dblclick_dhx_marked_timespan","map_view","mapView","geocoder","points","markers","infoWindow","createMarker","google","maps","Marker","map_date_width","map_icon_width","map_description_width","map_resolve_event_location","map_resolve_user_location","map_initial_position","LatLng","map_error_position","map_infowindow_max_width","map_type","MapTypeId","ROADMAP","map_zoom_after_resolve","marker_geo_success","marker_geo_fail","marker_date","marker_text","event_location","dblclick_dhx_map_area","map_time","map_text","map_start","add_map","map_date","_latLngUpdate","_isMapPositionSet","gmap","dhx_gmap","_setMapSize","mapOptions","map_initial_zoom","center","mapTypeId","Map","disableDefaultUI","disableDoubleClickZoom","addListener","point","latLng","geocode","results","GeocoderStatus","OK","geometry","location","lat","lng","formatted_address","infoWindowOptions","maxWidth","_points","_markers","_infowindow","InfoWindow","_infowindows_content","_initialization_count","Geocoder","geolocation","getCurrentPosition","_userLocation","coords","latitude","longitude","setCenter","setZoom","getCenter","setPosition","getZoom","fill_map_tab","_selected_event_id","ariaButtonAttr","elem_id","marginRight","marginLeft","marginTop","showAddress","temp_center","map_end","close","setMap","trigger","selectEvent","performClick","_displayEventOnMap","address","language","_updateEventLocation","old_event_id","new_event_id","_event_resolve_delay","ret","minical","minicalDomEvents","minicalendar","mark_events","_synced_minicalendars","_prev","is_refresh","_render_calendar","unmarkCalendar","cont","tpos","_get_def_cont","$dom","dateAttribute","markCalendar","_last_date","conf","markedDates","_markCalendarCurrentDate","sync","_on_xle_handler","updateCalendar","_created","_locateCalendar","weekNum","dat","dayCell","_week_template","week_template","dummy_date","_mini_cal_arrows","previous","ts","temp2","temp3","temp4","temp5","temp6","temp7","temp8","padding","weekHeader","move_minicalendar_date","css_classnames","css_texts","diffs","calendars","arrow","dayHeaders","dayCells","inputs","selects","inp","number","new_date","_update_minical_select","isFulldayEvent","_attach_action","_round_minutes","linkCalendar","datediff","dateNew","month_end","monthheight","old_s","multiselect","_result","_children","_mark_inputs","_ids","delimiter","script_url","divLoading","multisource","mvc","update_timer","use_id","sanitize","_finish_ext_load","_get_id","model","cid","backbone","toJSON","changes","queue","add_from_queue","Backbone","Collection","last_event","dragger","dhtmlDragAndDropObject","stopDrag","on_drop","sourceHtmlObject","dhtmlObject","targetHtmlObject","targetHtml","action_data","event_data","view_options","_locate_cell_timeline","addDragLanding","_drag","_dragIn","shtmlObject","_dragOut","DragControl","addDrop","onDrop","sourceDhtmlx","getMaster","onDragIn","pdf","html_regexp","newline_regexp","clean_html","x_norm","colsWidth","x_norm_event","is_left","dhx_cal_header","y_norm","get_style","de_day","de_week","xml_end","xml_top","profile","xml_body_header","dhx_cal_date","xh","xml_month_scale","xml_month","yh","xhs","second_scale","top_width","top_col","xml_body","colors","week_starts","_month","text_color","zx","zdx","left_norm","zy","zdy","e_type","dets","week","dy_copy","toXML","original_date","original_mode","temp_date","to_pdf","objects","getPDFData","toPDF","toPDFRange","quick_info","show_quick_info","showQuickInfo","hiding_function","hideQuickInfo","quick_info_title","quick_info_content","quick_info_date","_quick_info_box_id","_get_event_counter_part","_quick_info_box","_init_quick_info","_fill_quick_data","_show_quick_info","cssTimeToMs","milliseconds","forced","qi","_x_scroll","dataPos","_quick_info_onscroll_handler","$testmode","_qi_button_click","domEv","main","mainContent","originalRecurringSetValue","original_left_buttons","original_right_buttons","txt_replace","txts","txtt","readonly_form","forbidden_buttons","button_arrays","forbidden_button","button_array","originalForm","readonlyForm","_lightbox_r","getRecurringSection","getFirstSectionOfType","clearMilliseconds","old_add_event","occurrence_timestamp_in_utc","recurring_workdays","_get_node","_outer_html","outerHTML","rec","loc","repeat_date_of_end","_ds","_get_form_node","_get_node_value","_get_node_numeric_value","_set_node_value","hash_value","_init_set_value","_end_date","str_date_format","repeat_date","date_str","register_els","inps","formatter","change_current_view","set_end_rule","_get_repeat_code","get_rcode","repeat","str_date","include_end_by","transpose_type","get_numeric_value","repeat_precise","_start","start_exists","transpose_day_week","set_rcode","_set_repeat_code","dispatchEvent","MouseEvent","elements","_rec_init_done","rf","blocked","_is_modified_occurence","_toggle_block","actual_dates","timeControl","_start_date","_get_button","_get_form","backgroundPosition","_rec_markers","_rec_markers_pull","_pid_time","_get_rec_marker","ch","_get_rec_markers","_rec_temp","ev_id","_ignore_call","tev","_pid_changed","nid","nev","sub","isEventFound","showLightbox_rec","lightbox_recurring","pid","isVirtual","showSeries","title_confirm_recurring","get_visible_events_rec","old_update_event","transponse_size","day_week","originalMonth","newMonth","cor","cor2","cday","transposeRecurring","recurringParts","addRecurring","recurringStepDays","weekDays","seriesInstance","currentCount","origMonth","origYear","correctOverflowInstances","recurring_overflow_instances","getMilliseconds","non_render","maxCount","startHour","visibleCount","_fix_daylight_saving_date","ted","recurrings","sev","data_attributes","all_events","_serialize_json_value","toICal","full_day_format","tooltipManager","tooltips","tooltipFor","touch_tooltip","targetEventId","hideTooltip","s2d","d2s","select_event","wp","year_view","year_date","year_month","year_scale_date","year_tooltip","isYearMode","getCellDate","dblclick_dhx_month_head","_year_render_event","_year_marked_cells","_hideToolTip","_tooltip","_showToolTip","_year_view_tooltip_handler","_init_year_tooltip","_mark_year_date","_unmark_year_date","_reset_year_scale","year_top","ssd","yearBox","year_x","yearStart","datepicker","locateEvent","factory","extensions","_seed","_schedulerPlugins","_bundledExtensions","_extensionsManager","initConfig","_internal_id","$syncFactory","_initFromConfig","addCalendar","$dhx"],"mappings":"AAUA,MAAAA,IAPUC,OAAAA,SAAW,MACNA,SAEAC;ACNA,SAASC,GAAOC,GAE/B;AAAA,WAASC,EAAIC,GAAAA;AACZ,QAAIC,IAAUC,SAASC,cAAc,KAKrC;AAAA,YAJeH,KAAa,IAAII,MAAM,GAAA,EAC9BC,QAAQ,SAASC,GACxBL;AAAAA,QAAQM,UAAUC,IAAIF,CACxB;AAAA,IAAA,CAAA,GACQL;AAAAA,EACR;AACA,MAAIQ,IAAY,EACfC,gBAAgB,WACf;AAAA,WAAOX,EAAI,+BAAA;AAAA,EACX,GACDY,KAAK,WACJ;AAAA,WAAOZ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AAA;AAAAA,OAAOG,YAAYA,GACnBH,OAAO8yD,YAAYA,IAEf9yD,OAAOmgG,SACVngG,OAAOmgG,OAAO,KAGfngG,OAAOmgG,KAAKhgG,YAAYA,GACxBH,OAAOmgG,KAAKrtC,YAAYA;"} \ No newline at end of file +{"version":3,"file":"dhtmlxscheduler.es.js","sources":["../sources/global.js","../sources/core/nav_bar.js","../sources/core/scheduler_resize_listener.js","../sources/utils/eventable.js","../sources/core/utils/event.js","../sources/core/common.js","../sources/core/utils/scoped_event.js","../sources/core/utils/utils.js","../sources/core/utils/dom_helpers.js","../sources/utils/env.js","../sources/core/common/url_serialize.js","../sources/core/base.js","../sources/core/common/get_serializable_events.js","../sources/core/load.js","../sources/core/loaders/xml.js","../sources/core/loaders/json.js","../sources/core/loaders/ical.js","../sources/core/touch.js","../sources/core/skins.js","../sources/core/dataprocessor/dataprocessor_hooks.js","../sources/core/dataprocessor/dataprocessor.js","../sources/core/message.js","../sources/locale/locale_ar.js","../sources/locale/locale_be.js","../sources/locale/locale_ca.js","../sources/locale/locale_cn.js","../sources/locale/locale_cs.js","../sources/locale/locale_da.js","../sources/locale/locale_de.js","../sources/locale/locale_el.js","../sources/locale/locale_en.js","../sources/locale/locale_es.js","../sources/locale/locale_fi.js","../sources/locale/locale_fr.js","../sources/locale/locale_he.js","../sources/locale/locale_hu.js","../sources/locale/locale_id.js","../sources/locale/locale_it.js","../sources/locale/locale_jp.js","../sources/locale/locale_manager.js","../sources/locale/locale_nb.js","../sources/locale/locale_nl.js","../sources/locale/locale_no.js","../sources/locale/locale_pl.js","../sources/locale/locale_pt.js","../sources/locale/locale_ro.js","../sources/locale/locale_ru.js","../sources/locale/locale_si.js","../sources/locale/locale_sk.js","../sources/locale/locale_sv.js","../sources/locale/locale_tr.js","../sources/locale/locale_ua.js","../sources/core/datepicker.js","../sources/scheduler_factory_method.js","../sources/core/common_errors.js","../sources/core/scheduler.js","../sources/core/wai_aria.js","../sources/core/common/assert.js","../sources/core/jquery.js","../sources/core/destructor.js","../sources/core/utils/ajax.js","../sources/core/config.js","../sources/core/event.js","../sources/core/event_highlight.js","../sources/core/lightbox.js","../sources/core/dhtmlx/dhtmlx_suite_hooks.js","../sources/core/delay_render.js","../sources/core/connector.js","../sources/locale/index.js","../sources/ext/extension_manager.js","../sources/dhtmlx_hook.js","../sources/ext/restricted_extensions/not_implemented_extension.js","../sources/ext/keyboard_navigation/modals.js","../sources/ext/keyboard_navigation/key_nav_legacy.js","../sources/ext/keyboard_navigation/scheduler_handlers.js","../sources/ext/tooltip/tooltip.ts","../sources/ext/tooltip/tooltipManager.ts","../sources/ext/extensions_gpl.js","../sources/ext/active_links.js","../sources/ext/agenda_legacy_view.js","../sources/ext/agenda.js","../sources/ext/all_timed.js","../sources/ext/collision.js","../sources/ext/container_autoresize.js","../sources/ext/cookie.js","../sources/ext/restricted_extensions/daytimeline.js","../sources/ext/restricted_extensions/drag_between.js","../sources/ext/editors.js","../sources/ext/expand.js","../sources/ext/export_api/index.js","../sources/ext/restricted_extensions/grid_view.js","../sources/ext/html_templates.js","../sources/ext/key_nav.js","../sources/ext/keyboard_navigation/common/keyboard_shortcuts.js","../sources/ext/keyboard_navigation/common/eventhandler.js","../sources/ext/keyboard_navigation/common/trap_modal_focus.js","../sources/ext/keyboard_navigation/marker.js","../sources/ext/keyboard_navigation/elements/scheduler_node.js","../sources/ext/keyboard_navigation/elements/nav_node.js","../sources/ext/keyboard_navigation/elements/header_cell.js","../sources/ext/keyboard_navigation/elements/event.js","../sources/ext/keyboard_navigation/elements/time_slot.js","../sources/ext/keyboard_navigation/elements/minical_button.js","../sources/ext/keyboard_navigation/elements/minical_cell.js","../sources/ext/keyboard_navigation/elements/data_area.js","../sources/ext/keyboard_navigation/core.js","../sources/ext/keyboard_navigation/minical_handlers.js","../sources/ext/layer.js","../sources/ext/limit.js","../sources/ext/map_view.js","../sources/ext/minical.js","../sources/ext/monthheight.js","../sources/ext/restricted_extensions/multisection.js","../sources/ext/multiselect.js","../sources/ext/multisource.js","../sources/ext/mvc.js","../sources/ext/outerdrag.js","../sources/ext/pdf.js","../sources/ext/quick_info.js","../sources/ext/readonly.js","../sources/ext/recurring.js","../sources/ext/serialize.js","../sources/ext/restricted_extensions/timeline.js","../sources/ext/tooltip/index.ts","../sources/ext/restricted_extensions/treetimeline.js","../sources/ext/restricted_extensions/units.js","../sources/ext/url.js","../sources/ext/restricted_extensions/week_agenda.js","../sources/ext/wp.js","../sources/ext/year_view.js","../sources/dhtmlxscheduler.gpl.js","../sources/scheduler_factory.js"],"sourcesContent":["\r\n/* eslint-disable no-restricted-globals */\r\nvar globalScope;\r\nif(typeof window !== \"undefined\"){\r\n\tglobalScope = window;\r\n}else{\r\n\tglobalScope = global;\r\n}\r\n/* eslint-enable no-restricted-globals */\r\n\r\nexport default globalScope;","export default function extend(scheduler) {\r\n\r\nfunction div(className){\r\n\tvar element = document.createElement(\"div\");\r\n\tvar classes = (className || \"\").split(\" \");\r\n\tclasses.forEach(function(cssClass){\r\n\t\telement.classList.add(cssClass);\r\n\t});\r\n\treturn element;\r\n}\r\nvar itemTypes = {\r\n\trows_container: function(){\r\n\t\treturn div(\"dhx_cal_navbar_rows_container\");\r\n\t},\r\n\trow: function(){\r\n\t\treturn div(\"dhx_cal_navbar_row\");\r\n\t},\r\n\tview: function (config) {\r\n\t\tvar element = div(\"dhx_cal_tab\");\r\n\t\telement.setAttribute(\"name\", config.view + \"_tab\");\r\n\t\telement.setAttribute(\"data-tab\", config.view);\r\n\t\t// element.setAttribute(\"data-viewname\", config.view); // FIXME: need to remove? not used anywhere\r\n\t\tif(scheduler.config.fix_tab_position){\r\n\t\t\tif(config.$firstTab) {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_first\");\r\n\t\t\t}else if(config.$lastTab) {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_last\");\r\n\t\t\t} else if(config.view !== \"week\") {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_standalone\");\r\n\t\t\t}\r\n\r\n\t\t\tif(config.$segmentedTab) {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn element;\r\n\t},\r\n\tdate: function () {\r\n\t\treturn div(\"dhx_cal_date\");\r\n\t},\r\n\tbutton: function (config) {\r\n\t\treturn div(\"dhx_cal_nav_button dhx_cal_nav_button_custom dhx_cal_tab\");\r\n\t},\r\n\tbuiltInButton: function (config){\r\n\t\treturn div(\"dhx_cal_\" + config.view + \"_button dhx_cal_nav_button\");\r\n\t},\r\n\tspacer: function () {\r\n\t\treturn div(\"dhx_cal_line_spacer\");\r\n\t},\r\n\tminicalendarButton: function(config){\r\n\t\tvar minicalendarDiv = div('dhx_minical_icon');\r\n\t\tif(!config.click && !minicalendarDiv.$_eventAttached){\r\n\t\t\t\r\n\t\t\tscheduler.event(minicalendarDiv, \"click\", function () {\r\n\t\t\t\tif (scheduler.isCalendarVisible()) {\r\n\t\t\t\t\tscheduler.destroyCalendar();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tscheduler.renderCalendar({\r\n\t\t\t\t\t\tposition: this,\r\n\t\t\t\t\t\tdate: scheduler.getState().date,\r\n\t\t\t\t\t\tnavigation: true,\r\n\t\t\t\t\t\thandler: function (date, calendar) {\r\n\t\t\t\t\t\t\tscheduler.setCurrentView(date);\r\n\t\t\t\t\t\t\tscheduler.destroyCalendar();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn minicalendarDiv;\r\n\t},\r\n\thtml_element: function (config) {\r\n\t\treturn div(\"dhx_cal_nav_content\");\r\n\t}\r\n};\r\n\r\nfunction findRenderer(config) {\r\n\tvar renderer;\r\n\tif (config.view) {\r\n\t\tswitch (config.view){\r\n\t\t\tcase \"today\":\r\n\t\t\tcase \"next\":\r\n\t\t\tcase \"prev\":\r\n\t\t\t\trenderer = itemTypes.builtInButton;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"date\":\r\n\t\t\t\trenderer = itemTypes.date;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"spacer\":\r\n\t\t\t\trenderer = itemTypes.spacer;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"button\":\r\n\t\t\t\trenderer = itemTypes.button;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"minicalendar\":\r\n\t\t\t\trenderer = itemTypes.minicalendarButton;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\trenderer = itemTypes.view;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t} else if(config.rows) {\r\n\t\trenderer = itemTypes.rows_container;\r\n\t} else if(config.cols) {\r\n\t\trenderer = itemTypes.row;\r\n\t}\r\n\treturn renderer;\r\n}\r\n\r\nfunction renderElement(config){\r\n\tvar renderer = findRenderer(config);\r\n\tif(!renderer){\r\n\t\treturn;\r\n\t}\r\n\tvar element = renderer(config);\r\n\tif(config.css){\r\n\t\telement.classList.add(config.css);\r\n\t}\r\n\tif(config.width){\r\n\t\tvar value = config.width;\r\n\t\tif(value === value * 1){\r\n\t\t\tvalue += \"px\";\r\n\t\t}\r\n\t\telement.style.width = value;\r\n\t}\r\n\tif(config.height){\r\n\t\tvar value = config.height;\r\n\t\tif(value === value * 1){\r\n\t\t\tvalue += \"px\";\r\n\t\t}\r\n\t\telement.style.height = value;\r\n\t}\r\n\tif (config.click) {\r\n\t\tscheduler.event(element, \"click\", config.click);\r\n\t}\r\n\tif (config.html) {\r\n\t\telement.innerHTML = config.html;\r\n\t}\r\n\r\n\tif (config.align) {\r\n\t\tvar value = \"\";\r\n\t\tif (config.align == \"right\") {\r\n\t\t\tvalue = \"flex-end\";\r\n\t\t} else if(config.align == \"left\") {\r\n\t\t\tvalue = \"flex-start\";\r\n\t\t}\r\n\t\telement.style.justifyContent = value;\r\n\t}\r\n\treturn element;\r\n}\r\n\r\nfunction prepareConfig(config) {\r\n\tif (typeof config === \"string\") {\r\n\t\tconfig = {\r\n\t\t\tview: config\r\n\t\t};\r\n\t}\r\n\tif (!config.view && !config.rows && !config.cols) {\r\n\t\tconfig.view = \"button\";\r\n\t}\r\n\treturn config;\r\n}\r\n\r\nfunction renderLayout(config) {\r\n\tvar fragment = document.createDocumentFragment();\r\n\tvar items;\r\n\tif(Array.isArray(config)){\r\n\t\titems = config;\r\n\t}else{\r\n\t\titems = [config];\r\n\t}\r\n\r\n\tfor (var i = 0; i < items.length; i++) {\r\n\t\tvar view = prepareConfig(items[i]);\r\n\r\n\t\tif(view.view === \"day\" && items[i + 1]){\r\n\t\t\tvar next = prepareConfig(items[i + 1]);\r\n\t\t\tif(next.view === \"week\" || next.view === \"month\"){\r\n\t\t\t\tview.$firstTab = true;\r\n\t\t\t\tview.$segmentedTab = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(view.view === \"week\" && items[i - 1]){\r\n\t\t\tvar next = prepareConfig(items[i + 1]);\r\n\t\t\tif(next.view === \"week\" || next.view === \"month\"){\r\n\t\t\t\tview.$segmentedTab = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(view.view === \"month\" && items[i - 1]){\r\n\t\t\tvar next = prepareConfig(items[i - 1]);\r\n\t\t\tif(next.view === \"week\" || next.view === \"day\"){\r\n\t\t\t\tview.$lastTab = true;\r\n\t\t\t\tview.$segmentedTab = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar element = renderElement(view);\r\n\r\n\t\tfragment.appendChild(element);\r\n\t\tif(view.cols || view.rows){\r\n\t\t\telement.appendChild(renderLayout(view.cols || view.rows));\r\n\t\t}\r\n\t}\r\n\treturn fragment;\r\n}\r\n\r\nscheduler._init_nav_bar = function (items) {\r\n\tvar navBar = this.$container.querySelector(\".dhx_cal_navline\");\r\n\tif (!navBar){\r\n\t\tnavBar = document.createElement(\"div\");\r\n\t\tnavBar.className = \"dhx_cal_navline dhx_cal_navline_flex\";\r\n\t\tscheduler._update_nav_bar(items, navBar);\r\n\t\treturn navBar;\r\n\t}\r\n\treturn navBar;\r\n};\r\n\r\nvar previousNavbar = null;\r\nvar previousHeight = null;\r\nscheduler._update_nav_bar = function (config, container) {\r\n\r\n\tif(!config){\r\n\t\treturn;\r\n\t}\r\n\tvar heightChanged = false;\r\n\tvar configChanged = false;\r\n\r\n\tvar newHeight = config.height || scheduler.xy.nav_height;\r\n\r\n\tif(previousHeight === null ||\r\n\t\t\t(previousHeight !== newHeight)){\r\n\t\theightChanged = true;\r\n\t}\r\n\tif(!previousNavbar || JSON.stringify(config) !== previousNavbar){\r\n\t\tconfigChanged = true;\r\n\t}\r\n\r\n\tif(heightChanged){\r\n\t\tscheduler.xy.nav_height = newHeight;\r\n\t}\r\n\tif(configChanged){\r\n\t\tcontainer.innerHTML = \"\";\r\n\t\tcontainer.appendChild(renderLayout(config));\r\n\t}\r\n\r\n\tif(heightChanged || configChanged){\r\n\t\tscheduler.unset_actions();\r\n\t\tscheduler._els = [];\r\n\t\tscheduler.get_elements();\r\n\t\tscheduler.set_actions();\r\n\t}\r\n\r\n\tif(newHeight === 0){\r\n\t\tcontainer.style.display = \"none\";\r\n\t}else{\r\n\t\tcontainer.style.display = \"\";\r\n\t}\r\n\r\n\tpreviousHeight = newHeight;\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\tfunction isAttachedNode(container){\r\n\t\tvar root = document.body;\r\n\t\r\n\t\twhile(container && container != root){\r\n\t\t\tcontainer = container.parentNode;\r\n\t\t}\r\n\t\r\n\t\treturn !!(root == container);\r\n\t}\r\n\t\r\n\tfunction getWindowSize(window){\r\n\t\treturn {\r\n\t\t\tw : window.innerWidth || document.documentElement.clientWidth,\r\n\t\t\th : window.innerHeight || document.documentElement.clientHeight\r\n\t\t};\r\n\t}\r\n\tfunction equals(a,b){\r\n\t\treturn a.w == b.w && a.h == b.h;\r\n\t}\r\n\t\r\n\tfunction listenWindowResize(scheduler, window){\r\n\t\tvar oldSize = getWindowSize(window);\r\n\t\tvar resizeDelay;\r\n\t\tscheduler.event(window, \"resize\", function(){\r\n\t\t\tclearTimeout(resizeDelay);\r\n\t\t\tresizeDelay = setTimeout(function(){\r\n\r\n\t\t\t\tif (!isAttachedNode(scheduler.$container) || scheduler.$destroyed){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tvar newSize = getWindowSize(window);\r\n\t\t\t\t// element may be resized by container-autoresize exteinsion\r\n\t\t\t\t// check if the size is actually changed in order to not to get endless loop\r\n\t\t\t\tif (!equals(oldSize, newSize)) {\r\n\t\t\t\t\toldSize = newSize;\r\n\t\t\t\t\ttriggerSchedulerResize(scheduler);\r\n\t\t\t\t}\r\n\t\t\t}, 150);\r\n\t\t});\r\n\t}\r\n\t\r\n\tfunction triggerSchedulerResize(scheduler){\r\n\t\tif(scheduler.$destroyed || !scheduler.$root || !isAttachedNode(scheduler.$root)){\r\n\t\t\treturn;\t\r\n\t\t}\r\n\t\tif (scheduler.callEvent(\"onSchedulerResize\", [])) {\r\n\t\t\tscheduler.updateView();\r\n\t\t\tscheduler.callEvent(\"onAfterSchedulerResize\", []);\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction watchNodeResize(scheduler){\r\n\t\tvar previousHeight = scheduler.$root.offsetHeight;\r\n\t\tvar previousWidth = scheduler.$root.offsetWidth;\r\n\t\t\r\n\t\tfunction lowlevelResizeWatcher(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(scheduler.$root){\r\n\t\t\t\tif (scheduler.$root.offsetHeight != previousHeight ||\r\n\t\t\t\t\tscheduler.$root.offsetWidth != previousWidth){\r\n\t\t\t\t\ttriggerSchedulerResize(scheduler);\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\tpreviousHeight = scheduler.$root.offsetHeight;\r\n\t\t\t\tpreviousWidth = scheduler.$root.offsetWidth;\r\n\t\t\t}\r\n\t\r\n\t\t\tsetTimeout(lowlevelResizeWatcher, 200);\r\n\t\t}\r\n\t\t\r\n\t\tlowlevelResizeWatcher();\r\n\t}\r\n\t\r\n\tfunction addResizeListener(scheduler){\r\n\t\tvar root = scheduler.$container;\r\n\t\tvar containerStyles = window.getComputedStyle(root);\r\n\t\tif(containerStyles.getPropertyValue(\"position\") == \"static\"){\r\n\t\t\troot.style.position = \"relative\";\r\n\t\t}\r\n\t\r\n\t\tvar resizeWatcher = document.createElement('iframe');\r\n\t\tresizeWatcher.className = \"scheduler_container_resize_watcher\";\r\n\t\tresizeWatcher.tabIndex = -1;\r\n\t\tif(scheduler.config.wai_aria_attributes){\r\n\t\t\tresizeWatcher.setAttribute(\"role\", \"none\");\r\n\t\t\tresizeWatcher.setAttribute(\"aria-hidden\", true);\r\n\t\t}\r\n\t\r\n\t\t// in some environments (namely, in SalesForce) iframe.contentWindow is not available\r\n\t\tvar salesforce_environment = !!window[\"Sfdc\"] || !!window[\"$A\"] || window[\"Aura\"];\r\n\t\tif(salesforce_environment){\r\n\t\t\twatchNodeResize(scheduler);\r\n\t\t} else {\r\n\t\t\troot.appendChild(resizeWatcher);\r\n\t\t\tif (resizeWatcher.contentWindow) {\r\n\t\t\t\tlistenWindowResize(scheduler, resizeWatcher.contentWindow);\r\n\t\t\t} else {\r\n\t\t\t\t// if so - ditch the iframe and fallback to listening the main window resize\r\n\t\t\t\troot.removeChild(resizeWatcher);\r\n\t\t\t\tlistenWindowResize(scheduler, window);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\taddResizeListener(scheduler);\r\n\r\n}","class EventHost {\r\n\tconstructor(){\r\n\t\tthis._silent_mode = false;\r\n\t\tthis.listeners = {};\r\n\t}\r\n\t_silentStart(){\r\n\t\tthis._silent_mode = true;\r\n\t}\r\n\t_silentEnd() {\r\n\t\tthis._silent_mode = false;\r\n\t}\r\n}\r\n\r\nconst createEventStorage = function(obj) {\r\n\tlet handlers = {};\r\n\tlet index = 0;\r\n\tconst eventStorage = function(){\r\n\t\tlet combinedResult = true;\r\n\t\tfor(const i in handlers){\r\n\t\t\tconst handlerResult = handlers[i].apply(obj, arguments);\r\n\t\t\tcombinedResult=combinedResult && handlerResult;\r\n\t\t}\r\n\t\treturn combinedResult;\r\n\t};\r\n\teventStorage.addEvent=function(handler, settings){\r\n\t\tif (typeof (handler) == \"function\"){\r\n\t\t\tlet handlerId;\r\n\t\t\tif(settings && settings.id){\r\n\t\t\t\thandlerId = settings.id;\r\n\t\t\t}else{\r\n\t\t\t\thandlerId = index;\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\r\n\t\t\tif(settings && settings.once){\r\n\t\t\t\tconst originalHandler = handler;\r\n\t\t\t\thandler = function(){\r\n\t\t\t\t\toriginalHandler();\r\n\t\t\t\t\teventStorage.removeEvent(handlerId);\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\thandlers[handlerId] = handler;\r\n\t\t\treturn handlerId;\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\teventStorage.removeEvent=function(id){\r\n\t\tdelete handlers[id];\r\n\t};\r\n\r\n\teventStorage.clear = function(){\r\n\t\thandlers = {};\r\n\t};\r\n\r\n\treturn eventStorage;\r\n};\r\n\r\nfunction makeEventable(obj){\r\n\r\n\tconst eventHost = new EventHost();\r\n\tobj.attachEvent=function(eventName, handler, settings){\r\n\t\teventName = 'ev_'+eventName.toLowerCase();\r\n\t\tif (!eventHost.listeners[eventName]){\r\n\t\t\teventHost.listeners[eventName] = createEventStorage(this);\r\n\t\t}\r\n\r\n\t\tif(settings && settings.thisObject){\r\n\t\t\thandler = handler.bind(settings.thisObject);\r\n\t\t}\r\n\r\n\t\tconst innerId = eventHost.listeners[eventName].addEvent(handler, settings);\r\n\r\n\t\tlet handlerId = (eventName+':'+innerId); //return ID (ev_eventname:1)\r\n\t\tif(settings && settings.id){\r\n\t\t\thandlerId = settings.id;\r\n\t\t}\r\n\t\treturn handlerId;\r\n\t};\r\n\r\n\tobj.attachAll = function(callback){\r\n\t\tthis.attachEvent('listen_all', callback);\r\n\t};\r\n\r\n\tobj.callEvent=function(name, eventArguments){\r\n\t\tif (eventHost._silent_mode) return true;\r\n\r\n\t\tconst handlerName = 'ev_'+name.toLowerCase();\r\n\r\n\t\tconst listeners = eventHost.listeners;\r\n\t\tif (listeners['ev_listen_all']){\r\n\t\t\tlisteners['ev_listen_all'].apply(this, [name].concat(eventArguments));\r\n\t\t}\r\n\r\n\t\tif (listeners[handlerName])\r\n\t\t\treturn listeners[handlerName].apply(this, eventArguments);\r\n\t\treturn true;\r\n\t};\r\n\r\n\tobj.checkEvent=function(name){\r\n\t\tconst listeners = eventHost.listeners;\r\n\t\treturn (!!listeners['ev_'+name.toLowerCase()]);\r\n\t};\r\n\r\n\tobj.detachEvent=function(id){\r\n\t\tif (id){\r\n\t\t\tlet listeners = eventHost.listeners;\r\n\t\t\tfor(const i in listeners){\r\n\t\t\t\tlisteners[i].removeEvent(id); //remove event\r\n\t\t\t}\r\n\r\n\t\t\tconst list = id.split(':');//get EventName and ID\r\n\t\t\tlisteners = eventHost.listeners;\r\n\t\t\tif(list.length === 2){\r\n\t\t\t\tconst eventName = list[0];\r\n\t\t\t\tconst eventId = list[1];\r\n\t\t\t\tif(listeners[eventName]){\r\n\t\t\t\t\tlisteners[eventName].removeEvent(eventId); //remove event\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\tobj.detachAllEvents = function(){\r\n\t\tfor (const name in eventHost.listeners) {\r\n\t\t\teventHost.listeners[name].clear();\r\n\t\t}\r\n\t};\r\n\r\n}\r\n\r\nexport default makeEventable;","export default {\r\n\tevent: function (el, event, handler){\r\n\t\tif (el.addEventListener)\r\n\t\t\tel.addEventListener(event, handler, false);\r\n\t\r\n\t\telse if (el.attachEvent)\r\n\t\t\tel.attachEvent(\"on\"+event, handler);\r\n\t},\r\n\teventRemove: function (el, event, handler){\r\n\t\tif (el.removeEventListener)\r\n\t\t\tel.removeEventListener(event, handler, false);\r\n\t\r\n\t\telse if (el.detachEvent)\r\n\t\t\tel.detachEvent(\"on\"+event, handler);\r\n\t}\r\n};","import createEventScope from './utils/scoped_event';\r\n\r\nexport default function extend(scheduler) {\r\n\r\n\r\nvar domEvents = createEventScope();\r\n\r\nscheduler.event = domEvents.attach;\r\nscheduler.eventRemove = domEvents.detach;\r\nscheduler._eventRemoveAll = domEvents.detachAll;\r\nscheduler._createDomEventScope = domEvents.extend;\r\n\r\n\r\nscheduler._trim = function(str){\r\n\tvar func = String.prototype.trim || function(){ return this.replace(/^\\s+|\\s+$/g, \"\"); };\r\n\treturn func.apply(str);\r\n};\r\n\r\nscheduler._isDate = function(obj){\r\n\tif (obj && typeof obj == \"object\") {\r\n\t\treturn !!(obj.getFullYear && obj.getMonth && obj.getDate);\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n};\r\n\r\nscheduler._isObject = function(obj){\r\n\treturn (obj && typeof obj == \"object\");\r\n};\r\n\r\n}","import defaultDomEvents from './event';\r\n\r\nexport default function(){\r\n\r\n\tvar domEvents = function (addEvent, removeEvent) {\r\n\t\taddEvent = addEvent || defaultDomEvents.event;\r\n\t\tremoveEvent = removeEvent || defaultDomEvents.eventRemove;\r\n\t\tvar handlers = [];\r\n\t\tvar eventScope = {\r\n\t\t\tattach: function(el, event, callback, capture){\r\n\t\t\t\thandlers.push({element: el, event:event, callback: callback, capture: capture});\r\n\t\t\t\taddEvent(el, event, callback, capture);\r\n\t\t\t},\r\n\t\t\tdetach: function(el, event, callback, capture){\r\n\t\t\t\tremoveEvent(el, event, callback, capture);\r\n\t\t\t\tfor(var i = 0; i < handlers.length; i++){\r\n\t\t\t\t\tvar handler = handlers[i];\r\n\t\t\t\t\tif (handler.element === el && handler.event === event && handler.callback === callback && handler.capture === capture) {\r\n\t\t\t\t\t\thandlers.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tdetachAll: function () {\r\n\t\t\t\tvar staticArray = handlers.slice();\r\n\t\t\t\t// original handlers array can be spliced on every iteration\r\n\t\t\t\tfor (var i = 0; i < staticArray.length; i++){\r\n\t\t\t\t\tvar handler = staticArray[i];\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, handler.capture);\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, undefined);\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, false);\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, true);\r\n\t\t\t\t}\r\n\t\t\t\thandlers.splice(0, handlers.length);\r\n\t\t\t},\r\n\t\t\textend: function(){\r\n\t\t\t\treturn domEvents(this.event, this.eventRemove);\r\n\t\t\t}\r\n\t\t};\r\n\t\treturn eventScope;\r\n\t};\r\n\t\r\n\treturn domEvents();\r\n}","var uidSeed = Date.now();\r\nfunction uid () {\r\n\treturn uidSeed++;\r\n}\r\n\r\n// iframe-safe array type check instead of using instanceof\r\nfunction isArray(obj){\r\n\tif(Array.isArray){\r\n\t\treturn Array.isArray(obj);\r\n\t}else{\r\n\t\t// close enough\r\n\t\treturn (obj && obj.length !== undefined && obj.pop && obj.push);\r\n\t}\r\n}\r\n\r\n// non-primitive string object, e.g. new String(\"abc\")\r\nfunction isStringObject(obj){\r\n\treturn obj && typeof obj === \"object\" && \r\n\t\tFunction.prototype.toString.call(obj.constructor) === \"function String() { [native code] }\";\r\n}\r\n\r\n// non-primitive number object, e.g. new Number(5)\r\nfunction isNumberObject(obj){\r\n\treturn obj && typeof obj === \"object\" && \r\n\t\tFunction.prototype.toString.call(obj.constructor) === \"function Number() { [native code] }\";\r\n}\r\n\r\n// non-primitive number object, e.g. new Boolean(true)\r\nfunction isBooleanObject(obj){\r\n\treturn obj && typeof obj === \"object\" &&\r\n\t\tFunction.prototype.toString.call(obj.constructor) === \"function Boolean() { [native code] }\";\r\n}\r\n\r\nfunction isDate(obj) {\r\n\tif (obj && typeof obj === \"object\") {\r\n\t\treturn !!(obj.getFullYear && obj.getMonth && obj.getDate);\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n}\r\n\r\nfunction defined(obj) {\r\n\treturn typeof(obj) != \"undefined\";\r\n}\r\n\r\nfunction delay (callback, timeout){\r\n\tvar timer;\r\n\r\n\tvar result = function() {\r\n\t\tresult.$cancelTimeout();\r\n\t\tresult.$pending = true;\r\n\t\tvar args = Array.prototype.slice.call(arguments);\r\n\t\ttimer = setTimeout(function(){\r\n\t\t\tcallback.apply(this, args);\r\n\t\t\tresult.$pending = false;\r\n\t\t}, timeout);\r\n\t};\r\n\r\n\tresult.$pending = false;\r\n\tresult.$cancelTimeout = function(){\r\n\t\tclearTimeout(timer);\r\n\t\tresult.$pending = false;\r\n\t};\r\n\tresult.$execute = function(){\r\n\t\tvar args = Array.prototype.slice.call(arguments);\r\n\t\tcallback.apply(this, args);\r\n\t\tresult.$cancelTimeout();\r\n\t};\r\n\r\n\treturn result;\r\n}\r\n\r\nexport default {\r\n\tuid: uid,\r\n\tmixin: function mixin (target, source, force){\r\n\t\tfor (var f in source)\r\n\t\t\tif (((target[f] === undefined) || force)) target[f]=source[f];\r\n\t\treturn target;\r\n\t},\r\n\tcopy: function copy(object) {\r\n\t\tvar i, result; // iterator, types array, result\r\n\t\r\n\t\tif (object && typeof object == \"object\") {\r\n\t\r\n\t\t\tswitch (true){\r\n\t\t\t\tcase (isDate(object)):\r\n\t\t\t\t\tresult = new Date(object);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isArray(object)):\r\n\t\t\t\t\tresult = new Array(object.length);\r\n\t\t\t\t\tfor(i = 0; i < object.length; i++){\r\n\t\t\t\t\t\tresult[i] = copy(object[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isStringObject(object)):\r\n\t\t\t\t\tresult = new String(object);// jshint ignore:line\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isNumberObject(object)):\r\n\t\t\t\t\tresult = new Number(object);// jshint ignore:line\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isBooleanObject(object)):\r\n\t\t\t\t\tresult = new Boolean(object);// jshint ignore:line\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tresult = {};\r\n\t\t\t\t\tfor (i in object) {\r\n\t\t\t\t\t\tconst varType = typeof object[i];\r\n\r\n\t\t\t\t\t\tif (varType === \"string\" || varType === \"number\" || varType === \"boolean\" ) {\r\n\t\t\t\t\t\t\tresult[i] = object[i];\r\n\t\t\t\t\t\t} else if(isDate(object[i])){\r\n\t\t\t\t\t\t\tresult[i] = new Date(object[i]);\r\n\t\t\t\t\t\t}else if (Object.prototype.hasOwnProperty.apply(object, [i]))\r\n\t\t\t\t\t\t\tresult[i] = copy(object[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result || object;\r\n\t},\r\n\tdefined,\r\n\tisDate,\r\n\tdelay\r\n};\r\n","//returns position of html element on the page\r\nfunction elementPosition(elem) {\r\n\tvar top=0, left=0, right=0, bottom=0;\r\n\tif (elem.getBoundingClientRect) { //HTML5 method\r\n\t\tvar box = elem.getBoundingClientRect();\r\n\t\tvar body = document.body;\r\n\t\tvar docElem = (document.documentElement ||\r\n\t\t\tdocument.body.parentNode ||\r\n\t\t\tdocument.body);\r\n\r\n\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\r\n\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\r\n\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\r\n\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\r\n\t\ttop = box.top + scrollTop - clientTop;\r\n\t\tleft = box.left + scrollLeft - clientLeft;\r\n\r\n\t\tright = document.body.offsetWidth - box.right;\r\n\t\tbottom = document.body.offsetHeight - box.bottom;\r\n\t} else { //fallback to naive approach\r\n\t\twhile(elem) {\r\n\t\t\ttop = top + parseInt(elem.offsetTop,10);\r\n\t\t\tleft = left + parseInt(elem.offsetLeft,10);\r\n\t\t\telem = elem.offsetParent;\r\n\t\t}\r\n\r\n\t\tright = document.body.offsetWidth - elem.offsetWidth - left;\r\n\t\tbottom = document.body.offsetHeight - elem.offsetHeight - top;\r\n\t}\r\n\treturn { y: Math.round(top), x: Math.round(left), width:elem.offsetWidth, height:elem.offsetHeight, right: Math.round(right), bottom: Math.round(bottom) };\r\n}\r\n\r\n/*\r\nevent position relatively to DOM element\r\n */\r\nfunction getRelativeEventPosition(ev, node){\r\n\tvar d = document.documentElement;\r\n\tvar box = elementPosition(node);\r\n\r\n\treturn {\r\n\t\tx: ev.clientX + d.scrollLeft - d.clientLeft - box.x + node.scrollLeft,\r\n\t\ty: ev.clientY + d.scrollTop - d.clientTop - box.y + node.scrollTop\r\n\t};\r\n}\r\n\r\nfunction getNodePosition(elem) {\r\n\tvar top=0, left=0, right=0, bottom=0;\r\n\tif (elem.getBoundingClientRect) { //HTML5 method\r\n\t\tvar box = elem.getBoundingClientRect();\r\n\t\tvar body = document.body;\r\n\t\tvar docElem = (document.documentElement ||\r\n\t\t\tdocument.body.parentNode ||\r\n\t\t\tdocument.body);\r\n\r\n\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\r\n\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\r\n\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\r\n\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\r\n\t\ttop = box.top + scrollTop - clientTop;\r\n\t\tleft = box.left + scrollLeft - clientLeft;\r\n\r\n\t\tright = document.body.offsetWidth - box.right;\r\n\t\tbottom = document.body.offsetHeight - box.bottom;\r\n\t} else { //fallback to naive approach\r\n\t\twhile(elem) {\r\n\t\t\ttop = top + parseInt(elem.offsetTop,10);\r\n\t\t\tleft = left + parseInt(elem.offsetLeft,10);\r\n\t\t\telem = elem.offsetParent;\r\n\t\t}\r\n\r\n\t\tright = document.body.offsetWidth - elem.offsetWidth - left;\r\n\t\tbottom = document.body.offsetHeight - elem.offsetHeight - top;\r\n\t}\r\n\treturn { y: Math.round(top), x: Math.round(left), width:elem.offsetWidth, height:elem.offsetHeight, right: Math.round(right), bottom: Math.round(bottom) };\r\n}\r\n\r\nfunction getClassName(node){\r\n\tif(!node) return \"\";\r\n\r\n\tvar className = node.className || \"\";\r\n\tif(className.baseVal)//'className' exist but not a string - IE svg element in DOM\r\n\t\tclassName = className.baseVal;\r\n\r\n\tif(!className.indexOf)\r\n\t\tclassName = '';\r\n\r\n\treturn className || \"\";\r\n}\r\n\r\nfunction getTargetNode(e) {\r\n\tvar trg;\r\n\tif (e.tagName)\r\n\t\ttrg = e;\r\n\telse {\r\n\t\te = e || window.event;\r\n\t\ttrg = e.target || e.srcElement;\r\n\t\tif (trg.shadowRoot && e.composedPath) {\r\n\t\t\ttrg = e.composedPath()[0];\r\n\t\t}\r\n\t}\r\n\treturn trg;\r\n}\r\n\r\nfunction locateCss(e, classname, strict){\r\n\tif(strict === undefined)\r\n\t\tstrict = true;\r\n\r\n\tvar trg = e.target || e.srcElement;\r\n\tvar css = '';\r\n\r\n\twhile (trg){\r\n\t\tcss = getClassName(trg);\r\n\r\n\t\tif(css){\r\n\t\t\tvar ind = css.indexOf(classname);\r\n\t\t\tif (ind >= 0){\r\n\t\t\t\tif (!strict)\r\n\t\t\t\t\treturn trg;\r\n\r\n\t\t\t\t//check that we have exact match\r\n\t\t\t\tvar left = (ind === 0) || (!((css.charAt(ind - 1)||\"\").trim()));\r\n\t\t\t\tvar right = ((ind + classname.length >= css.length)) || (!((css.charAt(ind + classname.length)).trim()));\r\n\r\n\t\t\t\tif (left && right)\r\n\t\t\t\t\treturn trg;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\ttrg=trg.parentNode;\r\n\t}\r\n\treturn null;\r\n}\r\n\r\n\r\n// get focusable nodes\r\nfunction isVisible(node){\r\n\tvar display = false,\r\n\t\tvisibility = false;\r\n\tif(window.getComputedStyle){\r\n\t\tvar style = window.getComputedStyle(node, null);\r\n\t\tdisplay = style[\"display\"];\r\n\t\tvisibility = style[\"visibility\"];\r\n\t}else if(node.currentStyle){\r\n\t\tdisplay = node.currentStyle[\"display\"];\r\n\t\tvisibility = node.currentStyle[\"visibility\"];\r\n\t}\r\n\r\n\tvar hiddenSection = false;\r\n\tvar recurringSection = locateCss({target:node}, \"dhx_form_repeat\", false);\r\n\tif(recurringSection){\r\n\t\thiddenSection = !!(recurringSection.style.height == \"0px\");\r\n\t}\r\n\thiddenSection = hiddenSection || !(node.offsetHeight);\r\n\r\n\treturn (display != \"none\" && visibility != \"hidden\" && !hiddenSection);\r\n}\r\n\r\nfunction hasNonNegativeTabIndex(node){\r\n\treturn !isNaN(node.getAttribute(\"tabindex\")) && (node.getAttribute(\"tabindex\")*1 >= 0);\r\n}\r\n\r\nfunction hasHref(node){\r\n\tvar canHaveHref = {\"a\": true, \"area\": true};\r\n\tif(canHaveHref[node.nodeName.loLowerCase()]){\r\n\t\treturn !!node.getAttribute(\"href\");\r\n\t}\r\n\treturn true;\r\n}\r\n\r\nfunction isEnabled(node){\r\n\tvar canDisable = {\"input\":true, \"select\":true, \"textarea\":true, \"button\":true, \"object\":true};\r\n\tif(canDisable[node.nodeName.toLowerCase()]){\r\n\t\treturn !node.hasAttribute(\"disabled\");\r\n\t}\r\n\r\n\treturn true;\r\n}\r\n\r\n\r\nfunction getFocusableNodes(root){\r\n\tvar nodes = root.querySelectorAll([\r\n\t\t\"a[href]\",\r\n\t\t\"area[href]\",\r\n\t\t\"input\",\r\n\t\t\"select\",\r\n\t\t\"textarea\",\r\n\t\t\"button\",\r\n\t\t\"iframe\",\r\n\t\t\"object\",\r\n\t\t\"embed\",\r\n\t\t\"[tabindex]\",\r\n\t\t\"[contenteditable]\"\r\n\t].join(\", \"));\r\n\r\n\tvar nodesArray = Array.prototype.slice.call(nodes, 0);\r\n\t\r\n\tfor(var i = 0; i < nodesArray.length; i++){\r\n\t\tnodesArray[i].$position = i;\r\n\t\t// we remember original nodes order, \r\n\t\t// so when we sort them by tabindex we ensure order of nodes with same tabindex is preserved, \r\n\t\t// since some browsers do unstable sort\r\n\t}\r\n\t\r\n\tnodesArray.sort(function(a, b) {\r\n\t\tif(a.tabIndex === 0 && b.tabIndex !== 0){\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\tif(a.tabIndex !== 0 && b.tabIndex === 0){\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\t\r\n\t\tif (a.tabIndex === b.tabIndex){\r\n\t\t\t// ensure we do stable sort\r\n\t\t\treturn a.$position - b.$position;\r\n\t\t}\r\n\t\tif (a.tabIndex < b.tabIndex) {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\treturn 1;\r\n\t});\r\n\t\r\n\tfor(var i = 0; i < nodesArray.length; i++){\r\n\t\tvar node = nodesArray[i];\r\n\t\tvar isValid = (hasNonNegativeTabIndex(node) || isEnabled(node) || hasHref(node)) && isVisible(node);\r\n\t\tif(!isValid){\r\n\t\t\tnodesArray.splice(i, 1);\r\n\t\t\ti--;\r\n\t\t}\r\n\t}\r\n\treturn nodesArray;\r\n}\r\n\r\n\r\nfunction isShadowDomSupported() {\r\n\treturn document.head.createShadowRoot || document.head.attachShadow;\r\n}\r\n\r\n/**\r\n * Returns element that has the browser focus, or null if no element has focus.\r\n * Works with shadow DOM, so it's prefereed to use this function instead of document.activeElement directly.\r\n * @returns HTMLElement\r\n */\r\nfunction getActiveElement(){\r\n\tvar activeElement = document.activeElement;\r\n\tif (activeElement.shadowRoot) {\r\n\t\tactiveElement = activeElement.shadowRoot.activeElement;\r\n\t}\r\n\tif (activeElement === document.body && document.getSelection) {\r\n\t\tactiveElement = document.getSelection().focusNode || document.body;\r\n\t}\r\n\r\n\treturn activeElement;\r\n}\r\n\r\n/**\r\n * Returns document.body or the host node of the ShadowRoot, if the element is attached to ShadowDom\r\n * @param {HTMLElement} element \r\n * @returns HTMLElement\r\n */\r\nfunction getRootNode(element) {\r\n\tif (!element) {\r\n\t\treturn document.body;\r\n\t}\r\n\tif (!isShadowDomSupported()) {\r\n\t\treturn document.body;\r\n\t}\r\n\twhile (element.parentNode && (element = element.parentNode)) {\r\n\t\tif (element instanceof ShadowRoot) {\r\n\t\t\treturn element.host;\r\n\t\t}\r\n\t}\r\n\treturn document.body;\r\n}\r\n\r\nfunction hasShadowParent(element) {\r\n\treturn !!getRootNode(element);\r\n}\r\n\r\nexport default {\r\n\t/**\r\n\t * @desc: Calculate absolute position of html object\r\n\t * @type: private\r\n\t * @param: htmlObject - html object\r\n\t * @topic: 0\r\n\t */\r\n\tgetAbsoluteLeft: function getAbsoluteLeft(htmlObject){\r\n\t\treturn this.getOffset(htmlObject).left;\r\n\t},\r\n\t/**\r\n\t * @desc: Calculate absolute position of html object\r\n\t * @type: private\r\n\t * @param: htmlObject - html object\r\n\t * @topic: 0\r\n\t */\r\n\tgetAbsoluteTop: function getAbsoluteTop(htmlObject){\r\n\t\treturn this.getOffset(htmlObject).top;\r\n\t},\r\n\r\n\tgetOffsetSum: function getOffsetSum(elem) {\r\n\t\tvar top=0, left=0;\r\n\t\twhile(elem) {\r\n\t\t\ttop = top + parseInt(elem.offsetTop);\r\n\t\t\tleft = left + parseInt(elem.offsetLeft);\r\n\t\t\telem = elem.offsetParent;\r\n\t\t}\r\n\t\treturn {top: top, left: left};\r\n\t},\r\n\r\n\tgetOffsetRect: function getOffsetRect(elem) {\r\n\t\tvar box = elem.getBoundingClientRect();\r\n\r\n\t\tvar top = 0,\r\n\t\t\tleft = 0;\r\n\r\n\t\t// https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent#Mobile_Tablet_or_Desktop\r\n\t\tif (!/Mobi/.test(navigator.userAgent)) {\r\n\t\t\tvar body = document.body;\r\n\t\t\tvar docElem = document.documentElement;\r\n\t\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\r\n\t\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\r\n\t\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\r\n\t\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\r\n\r\n\t\t\ttop = box.top + scrollTop - clientTop;\r\n\t\t\tleft = box.left + scrollLeft - clientLeft;\r\n\t\t}else {\r\n\t\t\t// incorrect left coordinate on mobile zoom\r\n\t\t\t// https://bugs.chromium.org/p/chromium/issues/detail?id=489206\r\n\r\n\t\t\tvar dummy = document.createElement(\"div\");\r\n\t\t\tdummy.style.position=\"absolute\";\r\n\t\t\tdummy.style.left=\"0px\";\r\n\t\t\tdummy.style.top=\"0px\";\r\n\t\t\tdummy.style.width=\"1px\";\r\n\t\t\tdummy.style.height = \"1px\";\r\n\r\n\t\t\tdocument.body.appendChild(dummy);\r\n\t\t\tvar dummyBox = dummy.getBoundingClientRect();\r\n\t\t\ttop = box.top - dummyBox.top;\r\n\t\t\tleft = box.left - dummyBox.left;\r\n\r\n\t\t\tdummy.parentNode.removeChild(dummy);\r\n\t\t}\r\n\r\n\t\treturn { top: Math.round(top), left: Math.round(left) };\r\n\t},\r\n\r\n\tgetOffset: function getOffset(elem) {\r\n\t\tif (elem.getBoundingClientRect) {\r\n\t\t\treturn this.getOffsetRect(elem);\r\n\t\t} else {\r\n\t\t\treturn this.getOffsetSum(elem);\r\n\t\t}\r\n\t},\r\n\r\n\tclosest: function(element, selector){\r\n\t\tif(!element || !selector){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn closest(element, selector);\r\n\t},\r\n\tinsertAfter: function(newNode, referenceNode){\r\n\t\tif(referenceNode.nextSibling){\r\n\t\t\treferenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);\r\n\t\t}else{\r\n\t\t\treferenceNode.parentNode.appendChild(newNode);\r\n\t\t}\r\n\t},\r\n\tremove: function(node) {\r\n\t\tif (node && node.parentNode) {\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t}\r\n\t},\r\n\tisChildOf: function(child, parent) {\r\n\t\treturn parent.contains(child);\r\n\t},\r\n\tgetFocusableNodes,\r\n\tgetClassName,\r\n\tlocateCss,\r\n\tgetRootNode,\r\n\thasShadowParent,\r\n\tisShadowDomSupported,\r\n\tgetActiveElement,\r\n\tgetRelativeEventPosition,\r\n\tgetTargetNode,\r\n\tgetNodePosition\r\n};\r\n\r\nvar closest;\r\nif(Element.prototype.closest){\r\n\tclosest = function(element, selector){\r\n\t\treturn element.closest(selector);\r\n\t};\r\n}else{\r\n\tvar matches = Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\r\n\tclosest = function(element, selector) {\r\n\t\tvar el = element;\r\n\t\tdo {\r\n\t\t\tif (matches.call(el, selector)){\r\n\t\t\t\treturn el;\r\n\t\t\t}\r\n\t\t\tel = el.parentElement || el.parentNode;\r\n\t\t} while (el !== null && el.nodeType === 1);\r\n\t\treturn null;\r\n\t};\r\n}\r\n","/* eslint-disable no-restricted-globals */\r\nvar isWindowAwailable = typeof window !== \"undefined\";\r\n\r\n/* eslint-enable no-restricted-globals */\r\n\r\nexport default {\r\n\tisIE: isWindowAwailable && (navigator.userAgent.indexOf(\"MSIE\") >= 0 || navigator.userAgent.indexOf(\"Trident\") >= 0),\r\n\tisOpera: isWindowAwailable && (navigator.userAgent.indexOf(\"Opera\") >= 0),\r\n\tisChrome: isWindowAwailable && (navigator.userAgent.indexOf(\"Chrome\") >= 0),\r\n\tisKHTML: isWindowAwailable && (navigator.userAgent.indexOf(\"Safari\") >= 0 || navigator.userAgent.indexOf(\"Konqueror\") >= 0),\r\n\tisFF: isWindowAwailable && (navigator.userAgent.indexOf(\"Firefox\") >= 0),\r\n\tisIPad: isWindowAwailable && (navigator.userAgent.search(/iPad/gi) >= 0),\r\n\tisEdge: isWindowAwailable && (navigator.userAgent.indexOf(\"Edge\")!=-1),\r\n\tisNode: (!isWindowAwailable || typeof navigator == \"undefined\")\r\n};","export default function(data) {\r\n\tif (typeof data === \"string\" || typeof data === \"number\") {\r\n\t\treturn data;\r\n\t}\r\n\tvar result = \"\";\r\n\tfor (var key in data) {\r\n\t\tvar serialized = \"\";\r\n\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\tif (typeof data[key] === \"string\") {\r\n\t\t\t\tserialized = encodeURIComponent(data[key]);\r\n\t\t\t} else if (typeof data[key] === \"number\") {\r\n\t\t\t\tserialized = data[key];\r\n\t\t\t} else {\r\n\t\t\t\tserialized = encodeURIComponent(JSON.stringify(data[key]));\r\n\t\t\t}\r\n\t\t\tserialized = key + \"=\" + serialized;\r\n\r\n\t\t\tif (result.length) {\r\n\t\t\t\tserialized = \"&\" + serialized;\r\n\t\t\t}\r\n\t\t\tresult += serialized;\r\n\t\t}\r\n\t}\r\n\treturn result;\r\n}","export default function extend(scheduler) {\r\n\r\nvar generateStringToDate = function (format, utc) {\r\n\tvar splt = \"var temp=date.match(/[a-zA-Z]+|[0-9]+/g);\";\r\n\tvar mask = format.match(/%[a-zA-Z]/g);\r\n\tfor (var i = 0; i < mask.length; i++) {\r\n\t\tswitch (mask[i]) {\r\n\t\t\tcase \"%j\":\r\n\t\t\tcase \"%d\": splt += \"set[2]=temp[\" + i + \"]||1;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%n\":\r\n\t\t\tcase \"%m\": splt += \"set[1]=(temp[\" + i + \"]||1)-1;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%y\": splt += \"set[0]=temp[\" + i + \"]*1+(temp[\" + i + \"]>50?1900:2000);\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%g\":\r\n\t\t\tcase \"%G\":\r\n\t\t\tcase \"%h\":\r\n\t\t\tcase \"%H\":\r\n\t\t\t\tsplt += \"set[3]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%i\":\r\n\t\t\t\tsplt += \"set[4]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%Y\": splt += \"set[0]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%a\":\r\n\t\t\tcase \"%A\": splt += \"set[3]=set[3]%12+((temp[\" + i + \"]||'').toLowerCase()=='am'?0:12);\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%s\": splt += \"set[5]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%M\": splt += \"set[1]=this.locale.date.month_short_hash[temp[\" + i + \"]]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%F\": splt += \"set[1]=this.locale.date.month_full_hash[temp[\" + i + \"]]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\tvar code = \"set[0],set[1],set[2],set[3],set[4],set[5]\";\r\n\tif (utc) code = \" Date.UTC(\" + code + \")\";\r\n\treturn new Function(\"date\", \"var set=[0,0,1,0,0,0]; \" + splt + \" return new Date(\" + code + \");\");\r\n};\r\nvar csp_date_to_str = function (format, utc) {\r\n\treturn function(date) {\r\n\t\treturn format.replace(/%[a-zA-Z]/g, function (a) {\r\n\t\t\tswitch (a) {\r\n\t\t\t\tcase \"%d\": return utc ? scheduler.date.to_fixed(date.getUTCDate()) : scheduler.date.to_fixed(date.getDate());\r\n\t\t\t\tcase \"%m\": return utc ? scheduler.date.to_fixed((date.getUTCMonth() + 1)) : scheduler.date.to_fixed((date.getMonth() + 1));\r\n\t\t\t\tcase \"%j\": return utc ? date.getUTCDate() : date.getDate();\r\n\t\t\t\tcase \"%n\": return utc ? (date.getUTCMonth() + 1) : (date.getMonth() + 1);\r\n\t\t\t\tcase \"%y\": return utc ? scheduler.date.to_fixed(date.getUTCFullYear() % 100) : scheduler.date.to_fixed(date.getFullYear() % 100);\r\n\t\t\t\tcase \"%Y\": return utc ? date.getUTCFullYear() : date.getFullYear();\r\n\t\t\t\tcase \"%D\": return utc ? scheduler.locale.date.day_short[date.getUTCDay()] : scheduler.locale.date.day_short[date.getDay()];\r\n\t\t\t\tcase \"%l\": return utc ? scheduler.locale.date.day_full[date.getUTCDay()] : scheduler.locale.date.day_full[date.getDay()];\r\n\t\t\t\tcase \"%M\": return utc ? scheduler.locale.date.month_short[date.getUTCMonth()] : scheduler.locale.date.month_short[date.getMonth()];\r\n\t\t\t\tcase \"%F\": return utc ? scheduler.locale.date.month_full[date.getUTCMonth()] : scheduler.locale.date.month_full[date.getMonth()];\r\n\t\t\t\tcase \"%h\": return utc ? scheduler.date.to_fixed((date.getUTCHours() + 11) % 12 + 1) : scheduler.date.to_fixed((date.getHours() + 11) % 12 + 1);\r\n\t\t\t\tcase \"%g\": return utc ? ((date.getUTCHours() + 11) % 12 + 1) : ((date.getHours() + 11) % 12 + 1);\r\n\t\t\t\tcase \"%G\": return utc ? date.getUTCHours() : date.getHours();\r\n\t\t\t\tcase \"%H\": return utc ? scheduler.date.to_fixed(date.getUTCHours()) : scheduler.date.to_fixed(date.getHours());\r\n\t\t\t\tcase \"%i\": return utc ? scheduler.date.to_fixed(date.getUTCMinutes()) : scheduler.date.to_fixed(date.getMinutes());\r\n\t\t\t\tcase \"%a\": return utc ? (date.getUTCHours() > 11 ? \"pm\" : \"am\") : (date.getHours() > 11 ? \"pm\" : \"am\");\r\n\t\t\t\tcase \"%A\": return utc ? (date.getUTCHours() > 11 ? \"PM\" : \"AM\") : (date.getHours() > 11 ? \"PM\" : \"AM\");\r\n\t\t\t\tcase \"%s\": return utc ? scheduler.date.to_fixed(date.getUTCSeconds()) : scheduler.date.to_fixed(date.getSeconds());\r\n\t\t\t\tcase \"%W\": return utc ? scheduler.date.to_fixed(scheduler.date.getUTCISOWeek(date)) : scheduler.date.to_fixed(scheduler.date.getISOWeek(date));\r\n\t\t\t\tdefault: return a;\r\n\t\t\t}\r\n\t\t});\r\n\t};\r\n};\r\nvar csp_str_to_date = function (format, utc) {\r\n\tconst mask = format.match(/%[a-zA-Z]/g);\r\n\treturn function (date){\r\n\t\tvar set = [0, 0, 1, 0, 0, 0];\r\n\t\tvar temp = date.match(/[a-zA-Z]+|[0-9]+/g);\r\n\r\n\t\tfor (var i = 0; i < mask.length; i++) {\r\n\t\t\tswitch (mask[i]) {\r\n\t\t\t\tcase \"%j\":\r\n\t\t\t\tcase \"%d\":\r\n\t\t\t\t\tset[2] = temp[i] || 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%n\":\r\n\t\t\t\tcase \"%m\":\r\n\t\t\t\t\tset[1] = (temp[i] || 1) - 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%y\":\r\n\t\t\t\t\tset[0] = temp[i] * 1 + (temp[i] > 50 ? 1900 : 2000);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%g\":\r\n\t\t\t\tcase \"%G\":\r\n\t\t\t\tcase \"%h\":\r\n\t\t\t\tcase \"%H\":\r\n\t\t\t\t\tset[3] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%i\":\r\n\t\t\t\t\tset[4] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\tset[0] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%a\":\r\n\t\t\t\tcase \"%A\":\r\n\t\t\t\t\tset[3] = set[3] % 12 + ((temp[i] || '').toLowerCase() == 'am' ? 0 : 12);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%s\":\r\n\t\t\t\t\tset[5] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%M\":\r\n\t\t\t\t\tset[1] = scheduler.locale.date.month_short_hash[temp[i]] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%F\":\r\n\t\t\t\t\tset[1] = scheduler.locale.date.month_full_hash[temp[i]] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (utc) {\r\n\t\t\treturn new Date(Date.UTC(set[0], set[1], set[2], set[3], set[4], set[5]));\r\n\t\t}\r\n\r\n\t\treturn new Date(set[0], set[1], set[2], set[3], set[4], set[5]);\r\n\t};\r\n};\r\n\r\nlet cspEnabled = undefined;\r\nfunction checkIfCSPEnabled(){\r\n\ttry {\r\n\t\tnew Function(\"cspEnabled = false;\");\r\n\t\tcspEnabled = false;\r\n\t} catch(e) {\r\n\t\tcspEnabled = true;\r\n\t}\r\n\treturn cspEnabled;\r\n}\r\n\r\nfunction useCsp() {\r\n\tvar result = false;\r\n\tif (scheduler.config.csp === \"auto\") {\r\n\t\tif(cspEnabled === undefined){\r\n\t\t\tcspEnabled = checkIfCSPEnabled();\r\n\t\t}\r\n\t\tresult = cspEnabled;\r\n\t} else {\r\n\t\tresult = scheduler.config.csp;\r\n\t}\r\n\treturn result;\r\n}\r\nscheduler.date = {\r\n\tinit:function(){\r\n\t\tvar s = scheduler.locale.date.month_short;\r\n\t\tvar t = scheduler.locale.date.month_short_hash = {};\r\n\t\tfor (var i = 0; i < s.length; i++)\r\n\t\t\tt[s[i]]=i;\r\n\r\n\t\tvar s = scheduler.locale.date.month_full;\r\n\t\tvar t = scheduler.locale.date.month_full_hash = {};\r\n\t\tfor (var i = 0; i < s.length; i++)\r\n\t\t\tt[s[i]]=i;\r\n\t},\r\n\tdate_part:function(date){\r\n\t\tvar old = new Date(date);\r\n\t\tdate.setHours(0);\r\n\t\tdate.setMinutes(0);\r\n\t\tdate.setSeconds(0);\r\n\t\tdate.setMilliseconds(0);\r\n\t\tif (date.getHours() && //shift to yesterday on dst\r\n\t\t\t(date.getDate() < old.getDate() || date.getMonth() < old.getMonth() || date.getFullYear() < old.getFullYear()) )\r\n\t\t\tdate.setTime(date.getTime() + 60 * 60 * 1000 * (24 - date.getHours()));\r\n\t\treturn date;\r\n\t},\r\n\ttime_part:function(date){\r\n\t\treturn (date.valueOf()/1000 - date.getTimezoneOffset()*60)%86400;\r\n\t},\r\n\tweek_start:function(date){\r\n\t\tvar shift=date.getDay();\r\n\t\tif (scheduler.config.start_on_monday){\r\n\t\t\tif (shift===0) shift=6;\r\n\t\t\telse shift--;\r\n\t\t}\r\n\t\treturn this.date_part(this.add(date,-1*shift,\"day\"));\r\n\t},\r\n\tmonth_start:function(date){\r\n\t\tdate.setDate(1);\r\n\t\treturn this.date_part(date);\r\n\t},\r\n\tyear_start:function(date){\r\n\t\tdate.setMonth(0);\r\n\t\treturn this.month_start(date);\r\n\t},\r\n\tday_start:function(date){\r\n\t\treturn this.date_part(date);\r\n\t},\r\n\t_add_days:function(date, inc){\r\n\t\tvar ndate = new Date(date.valueOf());\r\n\r\n\t\tndate.setDate(ndate.getDate() + inc);\r\n\r\n\t\t// Workaround for Safari/iOS timezone bug, ref:OKZ-149693\r\n\t\tif(inc == Math.round(inc) && inc > 0){\r\n\t\t\tvar datesDiff = +ndate - +date,\r\n\t\t\t\trest = datesDiff % (24*60*60*1000);\r\n\t\t\tif(rest && date.getTimezoneOffset() == ndate.getTimezoneOffset()){\r\n\t\t\t\tvar hours = rest / (60* 60 * 1000);\r\n\t\t\t\tndate.setTime(ndate.getTime() + (24 - hours) * 60 * 60 * 1000);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (inc >= 0 && (!date.getHours() && ndate.getHours()) &&//shift to yesterday on dst\r\n\t\t\t(ndate.getDate() < date.getDate() || ndate.getMonth() < date.getMonth() || ndate.getFullYear() < date.getFullYear()) )\r\n\t\t\tndate.setTime(ndate.getTime() + 60 * 60 * 1000 * (24 - ndate.getHours()));\r\n\t\treturn ndate;\r\n\t},\r\n\tadd:function(date,inc,mode){\r\n\t\tvar ndate=new Date(date.valueOf());\r\n\t\tswitch(mode){\r\n\t\t\tcase \"day\":\r\n\t\t\t\tndate = scheduler.date._add_days(ndate, inc);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"week\":\r\n\t\t\t\tndate = scheduler.date._add_days(ndate, inc * 7);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"month\": ndate.setMonth(ndate.getMonth()+inc); break;\r\n\t\t\tcase \"year\": ndate.setYear(ndate.getFullYear()+inc); break;\r\n\t\t\tcase \"hour\":\r\n\t\t\t\t/*\r\n\t\t\t\t setHour(getHour() + inc) and setMinutes gives weird result when is applied on a Daylight Saving time switch\r\n\t\t\t\t setTime seems working as expected\r\n\t\t\t\t*/\r\n\t\t\t\tndate.setTime(ndate.getTime() + inc * 60 * 60 * 1000);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"minute\":\r\n\t\t\t\tndate.setTime(ndate.getTime() + inc * 60 * 1000);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\treturn scheduler.date[\"add_\"+mode](date,inc,mode);\r\n\t\t}\r\n\t\treturn ndate;\r\n\t},\r\n\tto_fixed:function(num){\r\n\t\tif (num<10)\treturn \"0\"+num;\r\n\t\treturn num;\r\n\t},\r\n\tcopy:function(date){\r\n\t\treturn new Date(date.valueOf());\r\n\t},\r\n\tdate_to_str:function(format,utc){\r\n\t\tif (useCsp()) {\r\n\t\t\treturn csp_date_to_str(format,utc);\r\n\t\t}\r\n\r\n\t\tformat=format.replace(/%[a-zA-Z]/g,function(a){\r\n\t\t\tswitch(a){\r\n\t\t\t\tcase \"%d\": return \"\\\"+this.date.to_fixed(date.getDate())+\\\"\";\r\n\t\t\t\tcase \"%m\": return \"\\\"+this.date.to_fixed((date.getMonth()+1))+\\\"\";\r\n\t\t\t\tcase \"%j\": return \"\\\"+date.getDate()+\\\"\";\r\n\t\t\t\tcase \"%n\": return \"\\\"+(date.getMonth()+1)+\\\"\";\r\n\t\t\t\tcase \"%y\": return \"\\\"+this.date.to_fixed(date.getFullYear()%100)+\\\"\";\r\n\t\t\t\tcase \"%Y\": return \"\\\"+date.getFullYear()+\\\"\";\r\n\t\t\t\tcase \"%D\": return \"\\\"+this.locale.date.day_short[date.getDay()]+\\\"\";\r\n\t\t\t\tcase \"%l\": return \"\\\"+this.locale.date.day_full[date.getDay()]+\\\"\";\r\n\t\t\t\tcase \"%M\": return \"\\\"+this.locale.date.month_short[date.getMonth()]+\\\"\";\r\n\t\t\t\tcase \"%F\": return \"\\\"+this.locale.date.month_full[date.getMonth()]+\\\"\";\r\n\t\t\t\tcase \"%h\": return \"\\\"+this.date.to_fixed((date.getHours()+11)%12+1)+\\\"\";\r\n\t\t\t\tcase \"%g\": return \"\\\"+((date.getHours()+11)%12+1)+\\\"\";\r\n\t\t\t\tcase \"%G\": return \"\\\"+date.getHours()+\\\"\";\r\n\t\t\t\tcase \"%H\": return \"\\\"+this.date.to_fixed(date.getHours())+\\\"\";\r\n\t\t\t\tcase \"%i\": return \"\\\"+this.date.to_fixed(date.getMinutes())+\\\"\";\r\n\t\t\t\tcase \"%a\": return \"\\\"+(date.getHours()>11?\\\"pm\\\":\\\"am\\\")+\\\"\";\r\n\t\t\t\tcase \"%A\": return \"\\\"+(date.getHours()>11?\\\"PM\\\":\\\"AM\\\")+\\\"\";\r\n\t\t\t\tcase \"%s\": return \"\\\"+this.date.to_fixed(date.getSeconds())+\\\"\";\r\n\t\t\t\tcase \"%W\": return \"\\\"+this.date.to_fixed(this.date.getISOWeek(date))+\\\"\";\r\n\t\t\t\tdefault: return a;\r\n\t\t\t}\r\n\t\t});\r\n\t\tif (utc) format=format.replace(/date\\.get/g,\"date.getUTC\");\r\n\t\tvar func = new Function(\"date\",\"return \\\"\"+format+\"\\\";\");\r\n\r\n\t\treturn func.bind(scheduler);\r\n\t},\r\n\tstr_to_date:function(format, utc, exactFormat){\r\n\t\tvar stringToDateMethod = useCsp() ? csp_str_to_date : generateStringToDate;\r\n\t\tvar parseExactFormat = stringToDateMethod(format, utc);\r\n\t\t// eslint-disable-next-line\r\n\t\tvar yyyyMMddhhIIss = /^[0-9]{4}(\\-|\\/)[0-9]{2}(\\-|\\/)[0-9]{2} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/;\r\n\r\n\t\t// MM/dd/yyyy - default old format for xml-date\r\n\t\t// eslint-disable-next-line\r\n\t\tvar MMddyyyyhhIIss = /^[0-9]{2}\\/[0-9]{2}\\/[0-9]{4} ?(([0-9]{1,2}:[0-9]{2})(:[0-9]{1,2})?)?$/;\r\n\t\t// dd-MM-yyyy - default old format for api-date\r\n\t\t// eslint-disable-next-line\r\n\t\tvar ddMMyyyyhhIIss = /^[0-9]{2}\\-[0-9]{2}\\-[0-9]{4} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/;\r\n\t\t// eslint-disable-next-line\r\n\t\tvar ISO8601 = /^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$/;\r\n\r\n\t\tvar isYMDDate = function (datestr) {\r\n\t\t\treturn yyyyMMddhhIIss.test(String(datestr));\r\n\t\t};\r\n\r\n\t\tvar isMDYDate = function (datestr) {\r\n\t\t\treturn MMddyyyyhhIIss.test(String(datestr));\r\n\t\t};\r\n\t\tvar isDMYDate = function (datestr) {\r\n\t\t\treturn ddMMyyyyhhIIss.test(String(datestr));\r\n\t\t};\r\n\t\tvar isISO8601 = function (datestr) {\r\n\t\t\treturn ISO8601.test(datestr);\r\n\t\t};\r\n\r\n\t\tvar parseYMD = stringToDateMethod(\"%Y-%m-%d %H:%i:%s\", utc);\r\n\t\tvar parseMDY = stringToDateMethod(\"%m/%d/%Y %H:%i:%s\", utc);\r\n\t\tvar parseDMY = stringToDateMethod(\"%d-%m-%Y %H:%i:%s\", utc);\r\n\r\n\t\treturn function (dateString) {\r\n\r\n\t\t\tif (!exactFormat && !scheduler.config.parse_exact_format) {\r\n\t\t\t\tif (dateString && dateString.getISOWeek) {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t} else if (typeof dateString === \"number\") {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t} else if (isYMDDate(dateString)) {\r\n\t\t\t\t\treturn parseYMD(dateString);\r\n\t\t\t\t} else if (isMDYDate(dateString)) {\r\n\t\t\t\t\treturn parseMDY(dateString);\r\n\t\t\t\t} else if (isDMYDate(dateString)) {\r\n\t\t\t\t\treturn parseDMY(dateString);\r\n\t\t\t\t} else if (isISO8601(dateString)) {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn parseExactFormat.call(scheduler, dateString);\r\n\t\t};\r\n\t},\r\n\tgetISOWeek: function(ndate) {\r\n\t\tif(!ndate) return false;\r\n\t\tndate = this.date_part(new Date(ndate));\r\n\t\tvar nday = ndate.getDay();\r\n\t\tif (nday === 0) {\r\n\t\t\tnday = 7;\r\n\t\t}\r\n\t\tvar first_thursday = new Date(ndate.valueOf());\r\n\t\tfirst_thursday.setDate(ndate.getDate() + (4 - nday));\r\n\t\tvar year_number = first_thursday.getFullYear(); // year of the first Thursday\r\n\t\tvar ordinal_date = Math.round( (first_thursday.getTime() - new Date(year_number, 0, 1).getTime()) / 86400000); //ordinal date of the first Thursday - 1 (so not really ordinal date)\r\n\t\tvar week_number = 1 + Math.floor( ordinal_date / 7);\r\n\t\treturn week_number;\r\n\t},\r\n\tgetUTCISOWeek: function(ndate){\r\n\t\treturn this.getISOWeek(this.convert_to_utc(ndate));\r\n\t},\r\n\tconvert_to_utc: function(date) {\r\n\t\treturn new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds());\r\n\t}\r\n};\r\n\r\n}\r\n\r\n","export default function(scheduler){\r\n\treturn (function(){\r\n\t\tvar res = {};\r\n\t\tfor (var a in this._events){\r\n\t\t\tvar ev = this._events[a];\r\n\t\t\tif (ev.id.toString().indexOf(\"#\") == -1){\r\n\t\t\t\tres[ev.id] = ev;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn res;\r\n\t}).bind(scheduler);\r\n}","import xmlLoaded from \"./loaders/xml\";\r\nimport jsonLoader from \"./loaders/json\";\r\nimport iCalLoader from \"./loaders/ical\";\r\nimport createSerializator from \"../core/common/get_serializable_events\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler._loaded = {};\r\nscheduler._load = function(url, from) {\r\n\turl = url || this._load_url;\r\n\r\n\tif(!url){\r\n\t\t//if scheduler.setLoadMode is called before scheduler.init, initial rendering will invoke data loading while url is undefined\r\n\t\treturn;\r\n\t}\r\n\r\n\turl += (url.indexOf(\"?\") == -1 ? \"?\" : \"&\") + \"timeshift=\" + (new Date()).getTimezoneOffset();\r\n\tif (this.config.prevent_cache) url += \"&uid=\" + this.uid();\r\n\tvar to;\r\n\tfrom = from || this._date;\r\n\tfunction ajaxCallback(response) {\r\n\t\tscheduler.on_load(response);\r\n\t\tscheduler.callEvent(\"onLoadEnd\", []);\r\n\t}\r\n\tif (this._load_mode) {\r\n\t\tvar lf = this.templates.load_format;\r\n\r\n\t\tfrom = this.date[this._load_mode + \"_start\"](new Date(from.valueOf()));\r\n\t\twhile (from > this._min_date) from = this.date.add(from, -1, this._load_mode);\r\n\t\tto = from;\r\n\r\n\t\tvar cache_line = true;\r\n\t\twhile (to < this._max_date) {\r\n\t\t\tto = this.date.add(to, 1, this._load_mode);\r\n\t\t\tif (this._loaded[lf(from)] && cache_line)\r\n\t\t\t\tfrom = this.date.add(from, 1, this._load_mode); else cache_line = false;\r\n\t\t}\r\n\r\n\t\tvar temp_to = to;\r\n\t\tdo {\r\n\t\t\tto = temp_to;\r\n\t\t\ttemp_to = this.date.add(to, -1, this._load_mode);\r\n\t\t} while (temp_to > from && this._loaded[lf(temp_to)]);\r\n\r\n\t\tif (to <= from)\r\n\t\t\treturn false; //already loaded\r\n\r\n\t\tscheduler.ajax.get(url + \"&from=\" + lf(from) + \"&to=\" + lf(to), ajaxCallback);\r\n\r\n\t\twhile (from < to) {\r\n\t\t\tthis._loaded[lf(from)] = true;\r\n\t\t\tfrom = this.date.add(from, 1, this._load_mode);\r\n\t\t}\r\n\t} else {\r\n\t\tscheduler.ajax.get(url, ajaxCallback);\r\n\t}\r\n\r\n\t// TODO: remove onXLS\r\n\tthis.callEvent(\"onXLS\", []);\r\n\tthis.callEvent(\"onLoadStart\", []);\r\n\treturn true;\r\n};\r\n\r\nscheduler._parsers = {};\r\n\r\n\r\nxmlLoaded(scheduler);\r\njsonLoader(scheduler);\r\niCalLoader(scheduler);\r\n\r\nscheduler.on_load = function (loader) {\r\n\tthis.callEvent(\"onBeforeParse\", []);\r\n\r\n\tvar evs;\r\n\tvar error = false;\r\n\r\n\tvar foundParser = false;\r\n\tfor(var i in this._parsers){\r\n\t\tvar parser = this._parsers[i];\r\n\t\tif(parser.canParse(loader.xmlDoc.responseText, loader.xmlDoc)){\r\n\t\t\ttry{\r\n\t\t\t\tvar param = loader.xmlDoc.responseText;\r\n\t\t\t\tif(i === \"xml\"){\r\n\t\t\t\t\tparam = loader;\r\n\t\t\t\t}\r\n\t\t\t\tevs = parser.parse(param);\r\n\t\t\t\tif(!evs){\r\n\t\t\t\t\terror = true;\r\n\t\t\t\t}\r\n\t\t\t}catch(e){\r\n\t\t\t\terror = true;\r\n\t\t\t}\r\n\t\t\tfoundParser = true;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tif(!foundParser){\r\n\t\tif(this._process && this[this._process]){\r\n\t\t\ttry{\r\n\t\t\t\tevs = this[this._process].parse(loader.xmlDoc.responseText);\r\n\t\t\t}catch (e){\r\n\t\t\t\terror = true;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\terror = true;\r\n\t\t}\r\n\t}\r\n\r\n\tif(error || (loader.xmlDoc.status && loader.xmlDoc.status >= 400)){\r\n\t\tthis.callEvent(\"onLoadError\", [loader.xmlDoc]);\r\n\t\tevs = [];\r\n\t}\r\n\r\n\tthis._process_loading(evs);\r\n\r\n\t// TODO: remove onXLE\r\n\tthis.callEvent(\"onXLE\", []);\r\n\tthis.callEvent(\"onParse\", []);\r\n};\r\nscheduler._process_loading = function(evs) {\r\n\tthis._loading = true;\r\n\tthis._not_render = true;\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tif (!this.callEvent(\"onEventLoading\", [evs[i]])) continue;\r\n\t\tthis.addEvent(evs[i]);\r\n\t}\r\n\tthis._not_render = false;\r\n\tif (this._render_wait) this.render_view_data();\r\n\r\n\tthis._loading = false;\r\n\tif (this._after_call) this._after_call();\r\n\tthis._after_call = null;\r\n};\r\nscheduler._init_event = function(event) {\r\n\tevent.text = (event.text || event._tagvalue) || \"\";\r\n\tevent.start_date = scheduler._init_date(event.start_date);\r\n\tevent.end_date = scheduler._init_date(event.end_date);\r\n};\r\n\r\nscheduler._init_date = function(date){\r\n\tif(!date)\r\n\t\treturn null;\r\n\tif (typeof date == \"string\") {\r\n\t\treturn scheduler._helpers.parseDate(date);\r\n\t}\r\n\telse return new Date(date);\r\n};\r\n\r\nconst getSerializableData = createSerializator(scheduler);\r\nscheduler.serialize = function(){\r\n\tconst dataset = [];\r\n\tconst allEvents = getSerializableData();\r\n\tfor (var a in allEvents){\r\n\t\t\r\n\t\tconst exportedEvent = {};\r\n\t\tvar ev = allEvents[a];\r\n\r\n\t\tfor(var key in ev){\r\n\t\t\tif (key.charAt(0) == \"$\" || key.charAt(0) == \"_\"){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tlet exportValue;\r\n\t\t\tconst rawValue = ev[key];\r\n\t\t\tif(scheduler.utils.isDate(rawValue)){\r\n\t\t\t\texportValue = scheduler.defined(scheduler.templates.xml_format) ? scheduler.templates.xml_format(rawValue) : scheduler.templates.format_date(rawValue);\r\n\t\t\t}else{\r\n\t\t\t\texportValue = rawValue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\texportedEvent[key] = exportValue;\r\n\t\t}\r\n\r\n\t\tdataset.push(exportedEvent);\r\n\t}\r\n\treturn dataset;\r\n};\r\n\r\n/*\r\nscheduler.json = {};\r\nscheduler.json.parse = function(data) {\r\n\r\n\tvar events = [];\r\n\r\n\tif (typeof data == \"string\") {\r\n\t\tdata = JSON.parse(data);\r\n\t}\r\n\tif (Object.prototype.toString.call(data) === '[object Array]') {\r\n\t\tevents = data;\r\n\t} else {\r\n\t\tif(data){\r\n\t\t\tif(data.events){\r\n\t\t\t\tevents = data.events;\r\n\t\t\t}else if(data.data){\r\n\t\t\t\tevents = data.data;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tevents = events || [];\r\n\r\n\tif (data.dhx_security) {\r\n\t\tif (window.dhtmlx) {\r\n\t\t\twindow.dhtmlx.security_key = data.dhx_security;\r\n\t\t}\r\n\t\tscheduler.security_key = data.dhx_security;\r\n\t}\r\n\r\n\tvar collections = (data && data.collections) ? data.collections : {};\r\n\tvar collections_loaded = false;\r\n\tfor (var key in collections) {\r\n\t\tif (collections.hasOwnProperty(key)) {\r\n\t\t\tcollections_loaded = true;\r\n\t\t\tvar collection = collections[key];\r\n\t\t\tvar arr = scheduler.serverList[key];\r\n\t\t\tif (!arr) {\r\n\t\t\t\tscheduler.serverList[key] = arr = [];\r\n\t\t\t}\r\n\t\t\tarr.splice(0, arr.length); //clear old options\r\n\t\t\tfor (var j = 0; j < collection.length; j++) {\r\n\t\t\t\tvar option = collection[j];\r\n\t\t\t\tvar obj = { key: option.value, label: option.label }; // resulting option object\r\n\t\t\t\tfor (var option_key in option) {\r\n\t\t\t\t\tif (option.hasOwnProperty(option_key)) {\r\n\t\t\t\t\t\tif (option_key == \"value\" || option_key == \"label\")\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\tobj[option_key] = option[option_key]; // obj['value'] = option['value']\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tarr.push(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (collections_loaded)\r\n\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\r\n\tvar evs = [];\r\n\tfor (var i = 0; i < events.length; i++) {\r\n\t\tvar event = events[i];\r\n\t\tscheduler._init_event(event);\r\n\t\tevs.push(event);\r\n\t}\r\n\treturn evs;\r\n};*/\r\nscheduler.parse = function(data, type) {\r\n\tthis._process = type;\r\n\tthis.on_load({xmlDoc: {responseText: data}});\r\n};\r\nscheduler.load = function(url, call) {\r\n\tif (typeof call == \"string\") {\r\n\t\tthis._process = call;\r\n\t\tcall = arguments[2];\r\n\t}\r\n\r\n\tthis._load_url = url;\r\n\tthis._after_call = call;\r\n\tthis._load(url, this._date);\r\n};\r\n//possible values - day,week,month,year,all\r\nscheduler.setLoadMode = function(mode) {\r\n\tif (mode == \"all\") mode = \"\";\r\n\tthis._load_mode = mode;\r\n};\r\n\r\nscheduler.serverList = function(name, array) {\r\n\tif (array) {\r\n\t\tthis.serverList[name] = array.slice(0);\r\n\t\treturn this.serverList[name];\r\n\t}\r\n\tthis.serverList[name] = (this.serverList[name] || []);\r\n\treturn this.serverList[name];\r\n};\r\nscheduler._userdata = {};\r\n\r\nscheduler._xmlNodeToJSON = function(node) {\r\n\tvar t = {};\r\n\tfor (var i = 0; i < node.attributes.length; i++)\r\n\t\tt[node.attributes[i].name] = node.attributes[i].value;\r\n\r\n\tfor (var i = 0; i < node.childNodes.length; i++) {\r\n\t\tvar child = node.childNodes[i];\r\n\t\tif (child.nodeType == 1)\r\n\t\t\tt[child.tagName] = child.firstChild ? child.firstChild.nodeValue : \"\";\r\n\t}\r\n\r\n\tif (!t.text) t.text = node.firstChild ? node.firstChild.nodeValue : \"\";\r\n\r\n\treturn t;\r\n};\r\nscheduler.attachEvent(\"onXLS\", function() {\r\n\tif (this.config.show_loading === true) {\r\n\t\tvar t;\r\n\t\tt = this.config.show_loading = document.createElement(\"div\");\r\n\t\tt.className = 'dhx_loading';\r\n\t\tt.style.left = Math.round((this._x - 128) / 2) + \"px\";\r\n\t\tt.style.top = Math.round((this._y - 15) / 2) + \"px\";\r\n\t\tthis._obj.appendChild(t);\r\n\t}\r\n});\r\nscheduler.attachEvent(\"onXLE\", function() {\r\n\tvar t = this.config.show_loading;\r\n\tif (t && typeof t == \"object\") {\r\n\t\tif(t.parentNode) {\r\n\t\t\tt.parentNode.removeChild(t);\r\n\t\t}\r\n\t\tthis.config.show_loading = true;\r\n\t}\r\n});\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._parsers.xml = {\r\n\tcanParse: function(data, xhr){\r\n\t\t// IE returns non-empty responseXML type regardless of actual data type\r\n\t\tif(xhr.responseXML && xhr.responseXML.firstChild){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\ttry{\r\n\t\t\tvar xmlDoc = scheduler.ajax.parse(xhr.responseText);\r\n\t\t\tvar topElement = scheduler.ajax.xmltop(\"data\", xmlDoc);\r\n\t\t\tif(topElement && topElement.tagName === \"data\"){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}catch (e){\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\tparse: function(loader) {\r\n\t\tvar xml;\r\n\r\n\t\tif (!loader.xmlDoc.responseXML) { //from a string\r\n\t\t\tloader.xmlDoc.responseXML = scheduler.ajax.parse(loader.xmlDoc.responseText);\r\n\t\t}\r\n\t\r\n\t\txml = scheduler.ajax.xmltop(\"data\", loader.xmlDoc);\r\n\t\tif (xml.tagName != \"data\") return null;//not an xml\r\n\t\tvar csrfToken = xml.getAttribute(\"dhx_security\");\r\n\t\tif (csrfToken) {\r\n\t\t\tif (window.dhtmlx) {\r\n\t\t\t\twindow.dhtmlx.security_key = csrfToken;\r\n\t\t\t}\r\n\t\t\tscheduler.security_key = csrfToken;\r\n\t\t}\r\n\t\r\n\t\tvar opts = scheduler.ajax.xpath(\"//coll_options\", loader.xmlDoc);\r\n\t\tfor (var i = 0; i < opts.length; i++) {\r\n\t\t\tvar bind = opts[i].getAttribute(\"for\");\r\n\t\t\tvar arr = scheduler.serverList[bind];\r\n\t\t\tif (!arr) {\r\n\t\t\t\tscheduler.serverList[bind] = arr = [];\r\n\t\t\t}\r\n\t\t\tarr.splice(0, arr.length);\t//clear old options\r\n\t\t\tvar itms = scheduler.ajax.xpath(\".//item\", opts[i]);\r\n\t\t\tfor (var j = 0; j < itms.length; j++) {\r\n\t\t\t\tvar itm = itms[j];\r\n\t\t\t\tvar attrs = itm.attributes;\r\n\t\t\t\tvar obj = { key: itms[j].getAttribute(\"value\"), label: itms[j].getAttribute(\"label\")};\r\n\t\t\t\tfor (var k = 0; k < attrs.length; k++) {\r\n\t\t\t\t\tvar attr = attrs[k];\r\n\t\t\t\t\tif (attr.nodeName == \"value\" || attr.nodeName == \"label\")\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\tobj[attr.nodeName] = attr.nodeValue;\r\n\t\t\t\t}\r\n\t\t\t\tarr.push(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (opts.length)\r\n\t\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\t\r\n\t\tvar ud = scheduler.ajax.xpath(\"//userdata\", loader.xmlDoc);\r\n\t\tfor (var i = 0; i < ud.length; i++) {\r\n\t\t\tvar udx = scheduler._xmlNodeToJSON(ud[i]);\r\n\t\t\tscheduler._userdata[udx.name] = udx.text;\r\n\t\t}\r\n\t\r\n\t\tvar evs = [];\r\n\t\txml = scheduler.ajax.xpath(\"//event\", loader.xmlDoc);\r\n\t\r\n\t\tfor (var i = 0; i < xml.length; i++) {\r\n\t\t\tvar ev = evs[i] = scheduler._xmlNodeToJSON(xml[i]);\r\n\t\t\tscheduler._init_event(ev);\r\n\t\t}\r\n\t\treturn evs;\r\n\t}\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler.json = scheduler._parsers.json = {\r\n\tcanParse: function(data){\r\n\t\tif(data && typeof data === \"object\"){\r\n\t\t\treturn true;\r\n\t\t} else if(typeof data === \"string\"){\r\n\t\t\ttry {\r\n\t\t\t\tvar result = JSON.parse(data);\r\n\t\t\t\treturn Object.prototype.toString.call(result) === '[object Object]' || \r\n\t\t\t\t\t\tObject.prototype.toString.call(result) === '[object Array]';\r\n\t\t\t} catch (err) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\tparse: function(data) {\r\n\t\tvar events = [];\r\n\r\n\t\tif (typeof data == \"string\") {\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\t\tif (Object.prototype.toString.call(data) === '[object Array]') {\r\n\t\t\tevents = data;\r\n\t\t} else {\r\n\t\t\tif(data){\r\n\t\t\t\tif(data.events){\r\n\t\t\t\t\tevents = data.events;\r\n\t\t\t\t}else if(data.data){\r\n\t\t\t\t\tevents = data.data;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tevents = events || [];\r\n\r\n\t\tif (data.dhx_security) {\r\n\t\t\tif (window.dhtmlx) {\r\n\t\t\t\twindow.dhtmlx.security_key = data.dhx_security;\r\n\t\t\t}\r\n\t\t\tscheduler.security_key = data.dhx_security;\r\n\t\t}\r\n\r\n\t\tvar collections = (data && data.collections) ? data.collections : {};\r\n\t\tvar collections_loaded = false;\r\n\t\tfor (var key in collections) {\r\n\t\t\tif (collections.hasOwnProperty(key)) {\r\n\t\t\t\tcollections_loaded = true;\r\n\t\t\t\tvar collection = collections[key];\r\n\t\t\t\tvar arr = scheduler.serverList[key];\r\n\t\t\t\tif (!arr) {\r\n\t\t\t\t\tscheduler.serverList[key] = arr = [];\r\n\t\t\t\t}\r\n\t\t\t\tarr.splice(0, arr.length); //clear old options\r\n\t\t\t\tfor (var j = 0; j < collection.length; j++) {\r\n\t\t\t\t\tvar option = collection[j];\r\n\t\t\t\t\tvar obj = { key: option.value, label: option.label }; // resulting option object\r\n\t\t\t\t\tfor (var option_key in option) {\r\n\t\t\t\t\t\tif (option.hasOwnProperty(option_key)) {\r\n\t\t\t\t\t\t\tif (option_key == \"value\" || option_key == \"label\")\r\n\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\tobj[option_key] = option[option_key]; // obj['value'] = option['value']\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tarr.push(obj);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (collections_loaded)\r\n\t\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\r\n\t\tvar evs = [];\r\n\t\tfor (var i = 0; i < events.length; i++) {\r\n\t\t\tvar event = events[i];\r\n\t\t\tscheduler._init_event(event);\r\n\t\t\tevs.push(event);\r\n\t\t}\r\n\t\treturn evs;\r\n\t}\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler.ical = scheduler._parsers.ical = {\r\n\tcanParse: function(data){\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\treturn new RegExp(\"^BEGIN:VCALENDAR\").test(data);\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t},\r\n\tparse:function(str){\r\n\t\tvar data = str.match(RegExp(this.c_start+\"[^\\f]*\"+this.c_end,\"\"));\r\n\t\tif (!data.length) return;\r\n\r\n\t\t// mpl: handle bad unfolding\r\n\t\tdata[0]=data[0].replace(/[\\r\\n]+ /g,\"\");\r\n\r\n\t\t//unfolding \r\n\t\tdata[0]=data[0].replace(/[\\r\\n]+(?=[a-z \\t])/g,\" \");\r\n\t\t//drop property\r\n\t\tdata[0]=data[0].replace(/;[^:\\r\\n]*:/g,\":\");\r\n\t\t\r\n\t\t\r\n\t\tvar incoming=[];\r\n\t\tvar match;\r\n\t\tvar event_r = RegExp(\"(?:\"+this.e_start+\")([^\\f]*?)(?:\"+this.e_end+\")\",\"g\");\r\n\t\twhile ((match=event_r.exec(data)) !== null){\r\n\t\t\tvar e={};\r\n\t\t\tvar param;\r\n\t\t\tvar param_r = /[^\\r\\n]+[\\r\\n]+/g;\r\n\t\t\twhile ((param=param_r.exec(match[1])) !== null)\r\n\t\t\t\tthis.parse_param(param.toString(),e);\r\n\t\t\tif (e.uid && !e.id) e.id = e.uid; //fallback to UID, when ID is not defined\r\n\t\t\tincoming.push(e);\t\r\n\t\t}\r\n\t\treturn incoming;\r\n\t},\r\n\tparse_param:function(str,obj){\r\n\t\tvar d = str.indexOf(\":\"); \r\n\t\t\tif (d==-1) return;\r\n\t\t\r\n\t\tvar name = str.substr(0,d).toLowerCase();\r\n\t\tvar value = str.substr(d+1).replace(/\\\\,/g,\",\").replace(/[\\r\\n]+$/,\"\");\r\n\t\tif (name==\"summary\")\r\n\t\t\tname=\"text\";\r\n\t\telse if (name==\"dtstart\"){\r\n\t\t\tname = \"start_date\";\r\n\t\t\tvalue = this.parse_date(value,0,0);\r\n\t\t}\r\n\t\telse if (name==\"dtend\"){\r\n\t\t\tname = \"end_date\";\r\n\t\t\tvalue = this.parse_date(value,0,0);\r\n\t\t}\r\n\t\tobj[name]=value;\r\n\t},\r\n\tparse_date:function(value,dh,dm){\r\n\t\tvar t = value.split(\"T\");\r\n\r\n\t\tvar utcMark = false;\r\n\t\tif (t[1]){\r\n\t\t\tdh=t[1].substr(0,2);\r\n\t\t\tdm=t[1].substr(2,2);\r\n\t\t\tutcMark = !!(t[1][6] == \"Z\");\r\n\t\t}\r\n\t\tvar dy = t[0].substr(0,4);\r\n\t\tvar dn = parseInt(t[0].substr(4,2),10)-1;\r\n\t\tvar dd = t[0].substr(6,2);\r\n\r\n\t\tif(scheduler.config.server_utc || utcMark){\r\n\t\t\treturn new Date(Date.UTC(dy,dn,dd,dh,dm)) ;\r\n\t\t}else{\r\n\t\t\treturn new Date(dy,dn,dd,dh,dm);\r\n\t\t}\r\n\t},\r\n\tc_start:\"BEGIN:VCALENDAR\",\r\n\te_start:\"BEGIN:VEVENT\",\r\n\te_end:\"END:VEVENT\",\r\n\tc_end:\"END:VCALENDAR\"\t\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._init_touch_events = function(){\r\n\tvar mobile = this.config.touch &&\r\n\t\t( ((navigator.userAgent.indexOf(\"Mobile\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"iPad\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"Android\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"Touch\")!=-1)) && !window.MSStream) ||\r\n\t\t\t((navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1));\r\n\r\n\tif(mobile){\r\n\t\tthis.xy.scroll_width = 0;\r\n\t\tthis._mobile = true;\r\n\t}\r\n\r\n\tif(this.config.touch){\r\n\r\n\t\tvar touchEventsSupported = true;\r\n\t\ttry {\r\n\t\t\tdocument.createEvent(\"TouchEvent\");\r\n\t\t} catch (e) {\r\n\t\t\ttouchEventsSupported = false;\r\n\t\t}\r\n\r\n\t\tif (touchEventsSupported) {\r\n\t\t\tthis._touch_events([\"touchmove\", \"touchstart\", \"touchend\"], function (ev) {\r\n\t\t\t\tif (ev.touches && ev.touches.length > 1) return null;\r\n\t\t\t\tif (ev.touches[0])\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\ttarget: ev.target,\r\n\t\t\t\t\t\tpageX: ev.touches[0].pageX,\r\n\t\t\t\t\t\tpageY: ev.touches[0].pageY,\r\n\t\t\t\t\t\tclientX: ev.touches[0].clientX,\r\n\t\t\t\t\t\tclientY: ev.touches[0].clientY\r\n\t\t\t\t\t};\r\n\t\t\t\telse\r\n\t\t\t\t\treturn ev;\r\n\t\t\t}, function () {\r\n\t\t\t\treturn false;\r\n\t\t\t});\r\n\t\t} else if (window.PointerEvent || window.navigator.pointerEnabled) {\r\n\t\t\tthis._touch_events([\"pointermove\", \"pointerdown\", \"pointerup\"], function (ev) {\r\n\t\t\t\tif (ev.pointerType == \"mouse\") return null;\r\n\t\t\t\treturn ev;\r\n\t\t\t}, function (ev) {\r\n\t\t\t\treturn (!ev || (ev.pointerType == \"mouse\" ));\r\n\t\t\t});\r\n\t\t} else if (window.navigator.msPointerEnabled) {\r\n\t\t\tthis._touch_events([\"MSPointerMove\", \"MSPointerDown\", \"MSPointerUp\"], function (ev) {\r\n\t\t\t\tif (ev.pointerType == ev.MSPOINTER_TYPE_MOUSE) return null;\r\n\t\t\t\treturn ev;\r\n\t\t\t}, function (ev) {\r\n\t\t\t\treturn (!ev || ev.pointerType == ev.MSPOINTER_TYPE_MOUSE);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n};\r\n\r\nscheduler._touch_events = function(names, accessor, ignore){\r\n\t//webkit on android need to be handled separately\r\n\t//var a_webkit = (navigator.userAgent.indexOf(\"Android\")!=-1) && (navigator.userAgent.indexOf(\"WebKit\")!=-1);\r\n\tvar source, tracker, timer, drag_mode, scroll_mode, action_mode;\r\n\tvar dblclicktime = 0;\r\n\r\n\tfunction attachTouchEvent(element, name, callback){\r\n\t\t//touch gestures must be disabled when ligthbox is opened\r\n\t\tscheduler.event(element, name, function(e){\r\n\t\t\tif(scheduler._is_lightbox_open()){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tif (ignore(e)) return;\r\n\t\t\t\treturn callback(e);\r\n\t\t\t}\r\n\t\t}, { passive: false });\r\n\t}\r\n\r\n\tfunction check_direction_swipe(s_ev, e_ev, step, max_dy){\r\n\t\tif (!s_ev || !e_ev) return false;\r\n\r\n\t\tvar t = s_ev.target;\r\n\t\twhile(t && t != scheduler._obj){\r\n\t\t\tt = t.parentNode;\r\n\t\t}\r\n\t\tif(t != scheduler._obj){\r\n\t\t\t//swipe outside scheduler\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// ignore swipe in horizontal timeline\r\n\t\tif(scheduler.matrix && scheduler.matrix[scheduler.getState().mode]){\r\n\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\tif(timeline.scrollable){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar dy = Math.abs(s_ev.pageY - e_ev.pageY);\r\n\t\tvar dx = Math.abs(s_ev.pageX - e_ev.pageX);\r\n\t\tif (dy < max_dy && dx>step && (!dy || (dx/dy > 3))){\r\n\t\t\tif (s_ev.pageX > e_ev.pageX) {\r\n\t\t\t\tscheduler._click.dhx_cal_next_button();\r\n\t\t\t}else {\r\n\t\t\t\tscheduler._click.dhx_cal_prev_button();\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n\tfunction doMouseMove(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tvar dnd = scheduler.getState().drag_mode,\r\n\t\t\ttimeline = scheduler.matrix ? scheduler.matrix[scheduler._mode] : false;\r\n\r\n\t\tvar original_render = scheduler.render_view_data;\r\n\t\tif(dnd == 'create' && timeline){\r\n\t\t\t//suppress full redraw of timeline on creating event\r\n\t\t\tscheduler.render_view_data = function() {\r\n\t\t\t\tvar id = scheduler.getState().drag_id;\r\n\t\t\t\tvar ev = scheduler.getEvent(id);\r\n\t\t\t\tvar property = timeline.y_property;\r\n\r\n\t\t\t\tvar evs = scheduler.getEvents(ev.start_date, ev.end_date);\r\n\t\t\t\tfor(var i = 0; i < evs.length; i++){\r\n\t\t\t\t\tif(evs[i][property] != ev[property]){\r\n\t\t\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tev._sorder = evs.length - 1;\r\n\t\t\t\tev._count = evs.length;\r\n\r\n\t\t\t\tthis.render_data([ev], scheduler.getState().mode);\r\n\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\tscheduler._on_mouse_move(e);\r\n\r\n\t\tif(dnd == 'create' && timeline){\r\n\t\t\tscheduler.render_view_data = original_render;\r\n\t\t}\r\n\r\n\t\tif (e.preventDefault)\r\n\t\t\te.preventDefault();\r\n\t\te.cancelBubble = true;\r\n\t\treturn false;\r\n\t}\r\n\r\n\t// touchmove\r\n\tattachTouchEvent(document.body, names[0], function(e){\r\n\t\tif (ignore(e)) return;\r\n\r\n\t\tvar acc = accessor(e);\r\n\t\tif(!acc) return;\r\n\t\tif (drag_mode){\r\n\t\t\tdoMouseMove(acc);\r\n\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._update_global_tip();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//if (tracker && a_webkit){\r\n\t\t//\tcheck_direction_swipe(tracker, accessor(e), 0);\r\n\t\t//}\r\n\r\n\t\ttracker = accessor(e);\r\n\t\t//ignore common and scrolling moves\r\n\t\tif (!action_mode) return;\r\n\r\n\t\t//multitouch\r\n\t\tif (!tracker){\r\n\t\t\tscroll_mode = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//target changed - probably in scroll mode\r\n\r\n\t\tif (source.target != tracker.target || (Math.abs(source.pageX - tracker.pageX) > 5) || (Math.abs(source.pageY - tracker.pageY) > 5)){\r\n\t\t\tscroll_mode = true;\r\n\t\t\tclearTimeout(timer);\r\n\t\t}\r\n\r\n\t});\r\n\r\n\t//attachTouchEvent(this._els[\"dhx_cal_data\"][0], \"scroll\", drag_cancel);\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], \"touchcancel\", drag_cancel);\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], \"contextmenu\", function(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tif (action_mode){\r\n\t\t\tif (e && e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t});\r\n\r\n\t// touchstart\r\n\tattachTouchEvent(this._obj, names[1], function(e){\r\n\t\t// block pull-to-refresh\r\n\t\tif(document && document.body){\r\n\t\t\tdocument.body.classList.add(\"dhx_cal_touch_active\");\r\n\t\t}\r\n\r\n\t\tif (ignore(e)) return;\r\n\t\tscheduler._pointerDragId = e.pointerId;\r\n\r\n\t\tvar fake_event;\r\n\t\tdrag_mode = scroll_mode = false;\r\n\t\taction_mode = true;\r\n\t\tfake_event = tracker = accessor(e);\r\n\r\n\t\tif (!fake_event){\r\n\t\t\tscroll_mode = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//dbl click\r\n\t\tvar now = new Date();\r\n\r\n\t\tif (!scroll_mode && !drag_mode && now - dblclicktime < 250){\r\n\t\t\tscheduler._click.dhx_cal_data(fake_event);\r\n\t\t\twindow.setTimeout(function(){\r\n\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t//fake_event.type = \"dblclick\";\r\n\t\t\t\tscheduler._on_dbl_click(fake_event);\r\n\t\t\t}, 50);\r\n\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._block_next_stop = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tdblclicktime = now;\r\n\r\n\t\t//drag\r\n\r\n\t\tif (scroll_mode || drag_mode || !scheduler.config.touch_drag)\r\n\t\t\treturn;\r\n\r\n\t\tvar actTask = scheduler._locate_event(document.activeElement);\r\n\t\tvar fakeTask = scheduler._locate_event(fake_event.target);\r\n\t\tvar sourceTask = source? scheduler._locate_event(source.target) : null;\r\n\r\n\t\tif(actTask && fakeTask && actTask == fakeTask && actTask != sourceTask)\r\n\t\t{\r\n\t\t\tif(e.preventDefault) {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\tscheduler._click.dhx_cal_data(fake_event);\r\n\t\t\tsource = fake_event;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//there is no target\r\n\t\ttimer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tdrag_mode = true;\r\n\t\t\tvar target = source.target;\r\n\t\t\tvar className = scheduler._getClassName(target);\r\n\t\t\tif (target && className.indexOf(\"dhx_body\") != -1)\r\n\t\t\t\ttarget = target.previousSibling;\r\n\r\n\t\t\tscheduler._on_mouse_down(source, target);\r\n\t\t\tif (scheduler._drag_mode && scheduler._drag_mode != \"create\"){\r\n\t\t\t\tscheduler.for_rendered(scheduler._drag_id, function(node, i) {\r\n\t\t\t\t\tnode.style.display='none';\r\n\t\t\t\t\tscheduler._rendered.splice(i, 1);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif (scheduler.config.touch_tip) {\r\n\t\t\t\tscheduler._show_global_tip();\r\n\t\t\t}\r\n\t\t\tscheduler.updateEvent(scheduler._drag_id);\r\n\t\t},scheduler.config.touch_drag);\r\n\r\n\t\tsource = fake_event;\r\n\t});\r\n\tfunction drag_cancel(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tscheduler._hide_global_tip();\r\n\t\tif (drag_mode){\r\n\t\t\tscheduler._on_mouse_up( accessor(e) );\r\n\t\t\tscheduler._temp_touch_block = false;\r\n\t\t}\r\n\t\tscheduler._drag_id = null;\r\n\t\tscheduler._drag_mode=null;\r\n\t\tscheduler._drag_pos=null;\r\n\t\tscheduler._pointerDragId = null;\r\n\t\tclearTimeout(timer);\r\n\t\tdrag_mode = action_mode = false;\r\n\t\tscroll_mode = true;\r\n\t}\r\n\r\n\t// touch end\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], names[2], function(e){\r\n\t\tif(document && document.body){\r\n\t\t\tdocument.body.classList.remove(\"dhx_cal_touch_active\");\r\n\t\t}\r\n\r\n\t\tif (ignore(e)) return;\r\n\r\n\t\tif(scheduler.config.touch_swipe_dates){\r\n\t\t\tif (!drag_mode && check_direction_swipe(source, tracker, 200, 100)) {\r\n\t\t\t\tscheduler._block_next_stop = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (drag_mode) {\r\n\t\t\tscheduler._ignore_next_click = true;\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\t}, 100);\r\n\t\t}\r\n\r\n\t\tdrag_cancel(e);\r\n\t\tif (scheduler._block_next_stop){\r\n\t\t\tscheduler._block_next_stop = false;\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler.event(document.body, names[2], drag_cancel);\r\n};\r\n\r\nscheduler._show_global_tip = function(){\r\n\tscheduler._hide_global_tip();\r\n\r\n\tvar toptip = scheduler._global_tip = document.createElement(\"div\");\r\n\ttoptip.className='dhx_global_tip';\r\n\r\n\tscheduler._update_global_tip(1);\r\n\r\n\tdocument.body.appendChild(toptip);\r\n};\r\nscheduler._update_global_tip = function(init){\r\n\tvar toptip = scheduler._global_tip;\r\n\tif (toptip){\r\n\t\tvar time = \"\";\r\n\t\tif (scheduler._drag_id && !init){\r\n\t\t\tvar ev = scheduler.getEvent(scheduler._drag_id);\r\n\t\t\tif (ev)\r\n\t\t\t\ttime = \"
\" + (ev._timed ? scheduler.templates.event_header(ev.start_date, ev.end_date, ev):scheduler.templates.day_date(ev.start_date, ev.end_date, ev)) + \"
\";\r\n\t\t}\r\n\r\n\t\tif (scheduler._drag_mode == \"create\" || scheduler._drag_mode == \"new-size\")\r\n\t\t\ttoptip.innerHTML = (scheduler.locale.labels.drag_to_create || \"Drag to create\")+time;\r\n\t\telse\r\n\t\t\ttoptip.innerHTML = (scheduler.locale.labels.drag_to_move || \"Drag to move\")+time;\r\n\t}\r\n};\r\nscheduler._hide_global_tip = function(){\r\n\tvar toptip = scheduler._global_tip;\r\n\tif (toptip && toptip.parentNode){\r\n\t\ttoptip.parentNode.removeChild(toptip);\r\n\t\tscheduler._global_tip = 0;\r\n\t}\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._addThemeClass = function(){\r\n\tdocument.documentElement.setAttribute(\"data-scheduler-theme\", scheduler.skin);\r\n};\r\n\r\nscheduler._skin_settings = {\r\n\tfix_tab_position: [1,0],\r\n\tuse_select_menu_space: [1,0],\r\n\twide_form: [1,0],\r\n\r\n\thour_size_px: [44,42],\r\n\tdisplayed_event_color: [\"#ff4a4a\", \"ffc5ab\"],\r\n\tdisplayed_event_text_color: [\"#ffef80\", \"7e2727\"]\r\n};\r\n\r\nscheduler._skin_xy = {\r\n\tlightbox_additional_height: [90,50],\r\n\tnav_height: [59,22],\r\n\tbar_height: [24,20]\r\n};\r\n\r\n// material skin uses a different box sizing model than other skins, and also requires some post-processing.\r\n// In order to render events correctly, we need to know which box sizing model is used\r\n// We can detect it by styles applied, taking into account that styles may be loaded after scheduler is rendered\r\n\r\nscheduler._is_material_skin = function(){\r\n\tif(!scheduler.skin){\r\n\t\treturn checkIfMaterialSkin();\r\n\t}else{\r\n\t\treturn ((scheduler.skin + \"\").indexOf(\"material\") > -1);\r\n\t}\r\n};\r\n\r\nfunction themeNameFromFile(){\r\n\tvar links = document.getElementsByTagName(\"link\");\r\n\tfor (var i = 0; i < links.length; i++) {\r\n\t\tvar res = links[i].href.match(\"dhtmlxscheduler_([a-z]+).css\");\r\n\t\tif (res){\r\n\t\t\treturn res[1];\r\n\t\t}\r\n\t}\r\n}\r\n\r\nscheduler._build_skin_info = function() {\r\n\tmonitorThemeChange();\r\n\tconst styles = getComputedStyle(this.$container);\r\n\tconst themeVar = styles.getPropertyValue(\"--dhx-scheduler-theme\");\r\n\r\n\tlet isCssVarTheme = !!themeVar;\r\n\tlet themeName;\r\n\tlet cssValues = {};\r\n\tlet oldMaterialTheme = false;\r\n\r\n\tif(isCssVarTheme){\r\n\t\tthemeName = themeVar;\r\n\t\tfor(let i in scheduler.xy){\r\n\t\t\tcssValues[i] = styles.getPropertyValue(`--dhx-scheduler-xy-${i}`);\r\n\t\t}\r\n\r\n\t\tcssValues.hour_size_px = styles.getPropertyValue(`--dhx-scheduler-config-hour_size_px`);\r\n\t\tcssValues.wide_form = styles.getPropertyValue(`--dhx-scheduler-config-form_wide`);\r\n\r\n\t}else{\r\n\t\tthemeName = themeNameFromFile();\r\n\t\toldMaterialTheme = scheduler._is_material_skin();\r\n\t}\r\n\r\n\r\n\tscheduler._theme_info = {\r\n\t\ttheme: themeName,\r\n\t\tcssVarTheme: isCssVarTheme,\r\n\t\toldMaterialTheme: oldMaterialTheme,\r\n\t\tvalues: cssValues\r\n\t};\r\n\r\n\tif(scheduler._theme_info.cssVarTheme){\r\n\t\tconst themeVariables = this._theme_info.values;\r\n\t\tfor(let i in scheduler.xy){\r\n\t\t\tif(!isNaN(parseInt(themeVariables[i]))){\r\n\t\t\t\tscheduler.xy[i] = parseInt(themeVariables[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\n\r\nvar calculatedMaterial;\r\nfunction checkIfMaterialSkin(){\r\n\tif(calculatedMaterial === undefined){\r\n\t\tvar probe = document.createElement(\"div\");\r\n\t\tprobe.style.position = \"absolute\";\r\n\t\tprobe.style.left = \"-9999px\";\r\n\t\tprobe.style.top = \"-9999px\";\r\n\t\tprobe.innerHTML = \"
\" +\r\n\t\t\t\"
\" +\r\n\t\t\t\"
\"+\r\n\t\t\"
\";\r\n\t\tdocument.body.appendChild(probe);\r\n\t\tvar styles = window.getComputedStyle(probe.querySelector(\".dhx_cal_scale_placeholder\"));\r\n\t\tvar position = styles.getPropertyValue('position');\r\n\t\tif(position === \"absolute\"){\r\n\t\t\t// page has skins for placeholder element from material skin\r\n\t\t\tcalculatedMaterial = true;\r\n\t\t}else{\r\n\t\t\tcalculatedMaterial = false;\r\n\t\t}\r\n\r\n\t\tsetTimeout(function(){\r\n\t\t\tcalculatedMaterial = null;\r\n\t\t\tif(probe && probe.parentNode){\r\n\t\t\t\tprobe.parentNode.removeChild(probe);\r\n\t\t\t}\r\n\t\t}, 500);\r\n\t}\r\n\treturn calculatedMaterial;\r\n}\r\n\r\nvar cachedBorderBoxValue;\r\nfunction checkIfBorderBoxStyling(){\r\n\tif(scheduler._is_material_skin()){\r\n\t\treturn true;\r\n\t}else{\r\n\t\tif(cachedBorderBoxValue === undefined){\r\n\t\t\tvar probe = document.createElement(\"div\");\r\n\t\t\tprobe.style.position = \"absolute\";\r\n\t\t\tprobe.style.left = \"-9999px\";\r\n\t\t\tprobe.style.top = \"-9999px\";\r\n\t\t\tprobe.innerHTML = \"
\" +\r\n\t\t\t\t\"
\" +\r\n\t\t\t\t\t\"
\"+\r\n\t\t\t\t\"
\"+\r\n\t\t\t\"
\";\r\n\r\n\t\t\tdocument.body.appendChild(probe);\r\n\t\t\tvar styles = window.getComputedStyle(probe.querySelector(\".dhx_body\"));\r\n\t\t\tvar boxSizing = styles.getPropertyValue('box-sizing');\r\n\t\t\tdocument.body.removeChild(probe);\r\n\t\t\tcachedBorderBoxValue = !!(boxSizing === \"border-box\");\r\n\r\n\t\t\tif(!cachedBorderBoxValue){\r\n\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\tcachedBorderBoxValue = undefined;\r\n\t\t\t\t}, 1000);// recalculate in case scheduler initialized before skin is loaded\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\treturn cachedBorderBoxValue;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction refreshAfterLoad(){\r\n\tif(scheduler._is_material_skin() || scheduler._border_box_events()){\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar oldStyling = cachedBorderBoxValue;\r\n\tcachedBorderBoxValue = undefined;\r\n\tcalculatedMaterial = undefined;\r\n\tvar newStyling = checkIfBorderBoxStyling();\r\n\r\n\t// if box styling model changed - means scheduler was rendered before stylesheet was loaded or parsed inline\r\n\t// repaint scheduler in order to apply new styles\r\n\tif(oldStyling !== newStyling && scheduler.$container && scheduler.getState().mode){\r\n\t\tscheduler.setCurrentView();\r\n\t}\r\n}\r\nscheduler.event(window, 'DOMContentLoaded', refreshAfterLoad);\r\nscheduler.event(window, 'load', refreshAfterLoad);\r\n\r\nscheduler._border_box_events = function(){\r\n\treturn checkIfBorderBoxStyling();\r\n};\r\n\r\nscheduler._configure = function(col, data, skin){\r\n\tfor (var key in data)\r\n\t\tif (typeof col[key] == \"undefined\")\r\n\t\t\tcol[key] = data[key][skin];\r\n};\r\n\r\nscheduler.setSkin = function(value){\r\n\tthis.skin = value;\r\n\tscheduler._addThemeClass();\r\n\tif(scheduler.$container){\r\n\t\tthis._skin_init();\r\n\t\tthis.render();\r\n\t}\r\n\t\r\n\t//\r\n};\r\n\r\nfunction flatSkinHourScale(date){\r\n\tvar min = date.getMinutes();\r\n\tmin = min < 10 ? \"0\"+min : min;\r\n\tvar html = \"\"+ date.getHours() +\"\"+\r\n\t\t\" \"+ min +\"\";\r\n\treturn html;\r\n}\r\n\r\nlet monitorIntervalId = null;\r\nfunction monitorThemeChange(){\r\n\tconst container = scheduler.$container;\r\n\t\r\n\tclearInterval(monitorIntervalId);\r\n\tif(container){\r\n\t\tmonitorIntervalId = setInterval(() => {\r\n\t\t\tconst csstheme = getComputedStyle(container).getPropertyValue('--dhx-scheduler-theme');\r\n\t\t\tif(csstheme && csstheme !== scheduler.skin){\r\n\t\t\t\tscheduler.setSkin(csstheme);\r\n\t\t\t}\r\n\r\n\t\t}, 100);\r\n\t}\r\n}\r\nscheduler.attachEvent(\"onDestroy\", function(){\r\n\tclearInterval(monitorIntervalId);\r\n});\r\n\r\nscheduler._skin_init = function(){\r\n\tthis._build_skin_info();\r\n\r\n\tif (!this.skin){\r\n\t\tthis.skin = this._theme_info.theme;\r\n\t}\r\n\tscheduler._addThemeClass();\r\n\tif (scheduler.skin === \"flat\"){\r\n\t\t// scheduler.xy.scale_height = 35;\r\n\t\tscheduler.templates.hour_scale = flatSkinHourScale;\r\n\t}else if (scheduler.templates.hour_scale === flatSkinHourScale){\r\n\t\tscheduler.templates.hour_scale = scheduler.date.date_to_str(scheduler.config.hour_date);\r\n\t}\r\n\r\n\r\n\r\n\t//scheduler._lightbox_template=\"
 
\";\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\r\n\t\tvar date_to_str = scheduler.date.date_to_str(\"%d\");\r\n\t\tif(!scheduler.templates._old_month_day){\r\n\t\t\tscheduler.templates._old_month_day = scheduler.templates.month_day;\r\n\t\t}\r\n\t\tvar old_month_day = scheduler.templates._old_month_day;\r\n\t\tscheduler.templates.month_day = function(date) {\r\n\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\tvar label = date_to_str(date);\r\n\t\t\t\tif (date.getDate() == 1) {\r\n\t\t\t\t\tlabel = scheduler.locale.date.month_full[date.getMonth()] + \" \" + label;\r\n\t\t\t\t}\r\n\t\t\t\tif (+date == +scheduler.date.date_part(this._currentDate())) {\r\n\t\t\t\t\tlabel = scheduler.locale.labels.dhx_cal_today_button + \" \" + label;\r\n\t\t\t\t}\r\n\t\t\t\treturn label;\r\n\t\t\t} else {\r\n\t\t\t\treturn old_month_day.call(this, date);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t// tab classes\r\n\t\tif(scheduler.config.fix_tab_position){\r\n\t\t\tconst tabs = scheduler._els[\"dhx_cal_navline\"][0].querySelectorAll('[data-tab]');\r\n\t\t\ttabs.forEach((tab) => {\r\n\t\t\t\tconst view = tab.getAttribute(\"data-tab\") || tab.getAttribute(\"name\");\r\n\r\n\t\t\t\tswitch (view) {\r\n\t\t\t\t\tcase \"day\":\r\n\t\t\t\t\tcase \"day_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_first\");\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"week\":\r\n\t\t\t\t\tcase \"week_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"month\":\r\n\t\t\t\t\tcase \"month_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_last\");\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_standalone\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\treorderTabs(scheduler._els[\"dhx_cal_navline\"][0]);\r\n\r\n\t\t}\r\n\t}, {once: true});\r\n\r\n\tfunction reorderTabs(container) {\r\n\t\t// segmented tabs should go first\r\n\r\n\t\tif(scheduler.config.header){\r\n\t\t\treturn;\r\n\t\t\t// don't reorder tabs if header is defined via config\r\n\t\t}\r\n\t\tconst tabs = Array.from(container.querySelectorAll('.dhx_cal_tab'));\r\n\t\r\n\t\t// segmented tabs\r\n\t\tconst order = ['day', 'week', 'month'];\r\n\t\r\n\t\tconst specialTabs = order.map(tabName => \r\n\t\t\ttabs.find(tab => tab.getAttribute('data-tab') === tabName)\r\n\t\t).filter(tab => tab !== undefined);\r\n\t\r\n\t\tlet firstTab = tabs.length > 0 ? tabs[0] : null;\r\n\r\n\t\tspecialTabs.reverse().forEach(tab => {\r\n\t\t\tcontainer.insertBefore(tab, firstTab);\r\n\t\t\tfirstTab = tab;\r\n\t\t});\r\n\t}\r\n\r\n\t// scheduler._skin_init = function(){\r\n\t// \tthis._build_skin_info();\r\n\t// \tthis.skin = this._theme_info.theme;\r\n\t// };\r\n};\r\n\r\n\r\n\r\n}","export default function DataProcessorEvents(scheduler, dp){\r\n\tthis.$scheduler = scheduler;\r\n\tthis.$dp = dp;\r\n\tthis._dataProcessorHandlers = [];\r\n\r\n\tthis.attach = function () {\r\n\t\tvar dp = this.$dp;\r\n\t\tvar scheduler = this.$scheduler;\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onEventAdded\", function(id) {\r\n\t\t\tif (!this._loading && this._validId(id))\r\n\t\t\tdp.setUpdated(id,true,\"inserted\");\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onConfirmedBeforeEventDelete\", function(id) {\r\n\t\t\tif (!this._validId(id)) return;\r\n\t\t\tvar z=dp.getState(id);\r\n\r\n\t\t\tif (z==\"inserted\" || this._new_event) { dp.setUpdated(id,false); return true; }\r\n\t\t\tif (z==\"deleted\") return false;\r\n\t\t\tif (z==\"true_deleted\") return true;\r\n\r\n\t\t\tdp.setUpdated(id,true,\"deleted\");\r\n\t\t\treturn false;\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onEventChanged\", function(id) { \r\n\t\t\tif (!this._loading && this._validId(id))\r\n\t\t\tdp.setUpdated(id,true,\"updated\");\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onClearAll\", function() { \r\n\t\t\t// clear dataprocessor state when scheduler is reset\r\n\t\t\tdp._in_progress={};\r\n\t\t\tdp._invalid={};\r\n\t\t\tdp.updatedRows = [];\r\n\t\t\tdp._waitMode = 0;\r\n\t\t}));\r\n\r\n\t\tdp.attachEvent(\"insertCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"updateCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"deleteCallback\", function(upd, id) {\r\n\t\t\tif (scheduler.getEvent(id)){\r\n\t\t\t\tscheduler.setUserData(id, this.action_param, \"true_deleted\");\r\n\t\t\t\tscheduler.deleteEvent(id);\r\n\t\t\t} else if (scheduler._add_rec_marker)\r\n\t\t\t\tscheduler._update_callback(upd, id);\r\n\t\t});\r\n\t};\r\n\r\n\tthis.detach = function () {\r\n\t\tfor (var key in this._dataProcessorHandlers) {\r\n\t\t\tvar handler = this._dataProcessorHandlers[key];\r\n\t\t\tthis.$scheduler.detachEvent(handler);\r\n\t\t}\r\n\t\tthis._dataProcessorHandlers = [];\r\n\t};\r\n}\r\n\r\nexport function extendScheduler(scheduler, dp){\r\n\tscheduler._validId=function(id){\r\n\t\tif(this._is_virtual_event){\r\n\t\t\treturn !this._is_virtual_event(id);\r\n\t\t}\r\n\t\treturn true;\r\n\t};\r\n\tscheduler.setUserData=function(id,name,value){\r\n\t\tif (id){\r\n\t\t\tvar ev = this.getEvent(id);\r\n\t\t\tif(ev) ev[name]=value;\r\n\t\t}else{\r\n\t\t\tthis._userdata[name]=value;\r\n\t\t}\r\n\t};\r\n\tscheduler.getUserData=function(id,name){\r\n\t\tif (id){\r\n\t\t\tvar ev = this.getEvent(id);\r\n\t\t\tif(ev)\r\n\t\t\t\treturn ev[name];\r\n\t\t\telse\r\n\t\t\t\treturn null;\r\n\t\t}else{\r\n\t\t\treturn this._userdata[name];\r\n\t\t}\r\n\t};\r\n\tscheduler._set_event_text_style=function(id,style){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\t\tthis.for_rendered(id,function(r){\r\n\t\t\tr.style.cssText+=\";\"+style;\r\n\t\t});\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tev[\"_text_style\"]=style;\r\n\t\tthis.event_updated(ev);\r\n\t};\r\n\tscheduler._update_callback = function(upd,id){\r\n\t\tvar data = scheduler._xmlNodeToJSON(upd.firstChild);\r\n\t\t//fix for updates of recurring events\r\n\t\tif (data.rec_type == \"none\") data.rec_pattern = \"none\";\r\n\t\tdata.text = data.text||data._tagvalue;\r\n\t\tdata.start_date = scheduler._helpers.parseDate(data.start_date);\r\n\t\tdata.end_date = scheduler._helpers.parseDate(data.end_date);\r\n\t\tscheduler.addEvent(data);\r\n\t\tif (scheduler._add_rec_marker)\r\n\t\t\tscheduler.setCurrentView();\r\n\t};\r\n\tscheduler._dp_change_event_id = function(id, new_id){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\t\tscheduler.changeEventId(id, new_id);\r\n\t};\r\n\tscheduler._dp_hook_delete = function(id, new_id){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\r\n\t\tif(new_id && id != new_id){\r\n\t\t\tif(this.getUserData(id, dp.action_param) == \"true_deleted\")\r\n\t\t\t\tthis.setUserData(id, dp.action_param, \"updated\");\r\n\r\n\t\t\tthis.changeEventId(id, new_id);\r\n\t\t}\r\n\t\treturn this.deleteEvent(new_id, true);\r\n\t};\r\n\r\n\tscheduler.setDp = function() {\r\n\t\tthis._dp = dp;\r\n\t};\r\n\tscheduler.setDp();\r\n}","import DataProcessorEvents from \"./dataprocessor_hooks\";\r\nimport { extendScheduler } from \"./dataprocessor_hooks\";\r\nimport eventable from \"../../utils/eventable\";\r\nimport global from \"../../global\";\r\n\r\n/**\r\n *\t@desc: constructor, data processor object\r\n *\t@param: serverProcessorURL - url used for update\r\n *\t@type: public\r\n */\r\nexport function DataProcessor(serverProcessorURL){\r\n\tthis.serverProcessor = serverProcessorURL;\r\n\tthis.action_param = \"!nativeeditor_status\";\r\n\r\n\tthis.object = null;\r\n\tthis.updatedRows = []; // ids of updated rows\r\n\r\n\tthis.autoUpdate = true;\r\n\tthis.updateMode = \"cell\";\r\n\tthis._tMode = \"GET\";\r\n\tthis._headers = null;\r\n\tthis._payload = null;\r\n\tthis.post_delim = \"_\";\r\n\r\n\tthis._waitMode = 0;\r\n\tthis._in_progress = {};\r\n\tthis._invalid = {};\r\n\tthis.messages = [];\r\n\r\n\tthis.styles = {\r\n\t\tupdated: \"font-weight:bold;\",\r\n\t\tinserted: \"font-weight:bold;\",\r\n\t\tdeleted: \"text-decoration : line-through;\",\r\n\t\tinvalid: \"background-color:FFE0E0;\",\r\n\t\tinvalid_cell: \"border-bottom:2px solid red;\",\r\n\t\terror: \"color:red;\",\r\n\t\tclear: \"font-weight:normal;text-decoration:none;\"\r\n\t};\r\n\tthis.enableUTFencoding(true);\r\n\teventable(this); // TODO: need to update\r\n\r\n\treturn this;\r\n}\r\nDataProcessor.prototype = {\r\n\tsetTransactionMode: function (mode, total) {\r\n\t\tif (typeof mode == \"object\") {\r\n\t\t\tthis._tMode = mode.mode || this._tMode;\r\n\r\n\t\t\tif (mode.headers !== undefined) {\r\n\t\t\t\tthis._headers = mode.headers;\r\n\t\t\t}\r\n\r\n\t\t\tif (mode.payload !== undefined) {\r\n\t\t\t\tthis._payload = mode.payload;\r\n\t\t\t}\r\n\t\t\tthis._tSend = !!total;\r\n\t\t} else {\r\n\t\t\tthis._tMode = mode;\r\n\t\t\tthis._tSend = total;\r\n\t\t}\r\n\r\n\t\tif (this._tMode == \"REST\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t}\r\n\r\n\t\tif (this._tMode === \"JSON\" || this._tMode === \"REST-JSON\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t\tthis._serializeAsJson = true;\r\n\t\t\tthis._headers = this._headers || {};\r\n\t\t\tthis._headers[\"Content-Type\"] = \"application/json\";\r\n\t\t}else{\r\n\t\t\tif(this._headers && !this._headers[\"Content-Type\"]){\r\n\t\t\t\tthis._headers[\"Content-Type\"] = \"application/x-www-form-urlencoded\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (this._tMode === \"CUSTOM\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t\tthis._router = mode.router;\r\n\t\t}\r\n\t},\r\n\tescape: function (data) {\r\n\t\tif (this._utf)\r\n\t\t\treturn encodeURIComponent(data);\r\n\t\telse\r\n\t\t\treturn escape(data);\r\n\t},\r\n\t/**\r\n\t *\t@desc: allows to set escaping mode\r\n\t *\t@param: true - utf based escaping, simple - use current page encoding\r\n\t *\t@type: public\r\n\t */\r\n\tenableUTFencoding: function (mode) {\r\n\t\tthis._utf = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: allows to define, which column may trigger update\r\n\t *\t@param: val - array or list of true/false values\r\n\t *\t@type: public\r\n\t */\r\n\tsetDataColumns: function (val) {\r\n\t\tthis._columns = (typeof val == \"string\") ? val.split(\",\") : val;\r\n\t},\r\n\t/**\r\n\t *\t@desc: get state of updating\r\n\t *\t@returns: true - all in sync with server, false - some items not updated yet.\r\n\t *\t@type: public\r\n\t */\r\n\tgetSyncState: function () {\r\n\t\treturn !this.updatedRows.length;\r\n\t},\r\n\t/**\r\n\t *\t@desc: enable/disable named field for data syncing, will use column ids for grid\r\n\t *\t@param: mode - true/false\r\n\t *\t@type: public\r\n\t */\r\n\tenableDataNames: function (mode) {\r\n\t\tthis._endnm = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: enable/disable mode , when only changed fields and row id send to the server side, instead of all fields in default mode\r\n\t *\t@param: mode - true/false\r\n\t *\t@type: public\r\n\t */\r\n\tenablePartialDataSend: function (mode) {\r\n\t\tthis._changed = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: set if rows should be send to server automatically\r\n\t *\t@param: mode - \"row\" - based on row selection changed, \"cell\" - based on cell editing finished, \"off\" - manual data sending\r\n\t *\t@type: public\r\n\t */\r\n\tsetUpdateMode: function (mode, dnd) {\r\n\t\tthis.autoUpdate = (mode == \"cell\");\r\n\t\tthis.updateMode = mode;\r\n\t\tthis.dnd = dnd;\r\n\t},\r\n\tignore: function (code, master) {\r\n\t\tthis._silent_mode = true;\r\n\t\tcode.call(master || window);\r\n\t\tthis._silent_mode = false;\r\n\t},\r\n\t/**\r\n\t *\t@desc: mark row as updated/normal. check mandatory fields,initiate autoupdate (if turned on)\r\n\t *\t@param: rowId - id of row to set update-status for\r\n\t *\t@param: state - true for \"updated\", false for \"not updated\"\r\n\t *\t@param: mode - update mode name\r\n\t *\t@type: public\r\n\t */\r\n\tsetUpdated: function (rowId, state, mode) {\r\n\t\tif (this._silent_mode) return;\r\n\t\tvar ind = this.findRow(rowId);\r\n\r\n\t\tmode = mode || \"updated\";\r\n\t\tvar existing = this.$scheduler.getUserData(rowId, this.action_param);\r\n\t\tif (existing && mode == \"updated\") mode = existing;\r\n\t\tif (state) {\r\n\t\t\tthis.set_invalid(rowId, false); //clear previous error flag\r\n\t\t\tthis.updatedRows[ind] = rowId;\r\n\t\t\tthis.$scheduler.setUserData(rowId, this.action_param, mode);\r\n\t\t\tif (this._in_progress[rowId])\r\n\t\t\t\tthis._in_progress[rowId] = \"wait\";\r\n\t\t} else {\r\n\t\t\tif (!this.is_invalid(rowId)) {\r\n\t\t\t\tthis.updatedRows.splice(ind, 1);\r\n\t\t\t\tthis.$scheduler.setUserData(rowId, this.action_param, \"\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.markRow(rowId, state, mode);\r\n\t\tif (state && this.autoUpdate) this.sendData(rowId);\r\n\t},\r\n\r\n\tmarkRow: function (id, state, mode) {\r\n\t\tvar str = \"\";\r\n\t\tvar invalid = this.is_invalid(id);\r\n\t\tif (invalid) {\r\n\t\t\tstr = this.styles[invalid];\r\n\t\t\tstate = true;\r\n\t\t}\r\n\t\tif (this.callEvent(\"onRowMark\", [id, state, mode, invalid])) {\r\n\t\t\t//default logic\r\n\t\t\tstr = this.styles[state ? mode : \"clear\"] + str;\r\n\r\n\t\t\tthis.$scheduler[this._methods[0]](id, str);\r\n\r\n\t\t\tif (invalid && invalid.details) {\r\n\t\t\t\tstr += this.styles[invalid + \"_cell\"];\r\n\t\t\t\tfor (var i = 0; i < invalid.details.length; i++)\r\n\t\t\t\t\tif (invalid.details[i])\r\n\t\t\t\t\t\tthis.$scheduler[this._methods[1]](id, i, str);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tgetActionByState: function(state) {\r\n\t\tif (state === \"inserted\") {\r\n\t\t\treturn \"create\";\r\n\t\t}\r\n\t\tif (state === \"updated\") {\r\n\t\t\treturn \"update\";\r\n\t\t}\r\n\t\tif (state === \"deleted\") {\r\n\t\t\treturn \"delete\";\r\n\t\t}\r\n\t\treturn \"update\";\r\n\t},\r\n\r\n\tgetState: function (id) {\r\n\t\treturn this.$scheduler.getUserData(id, this.action_param);\r\n\t},\r\n\tis_invalid: function (id) {\r\n\t\treturn this._invalid[id];\r\n\t},\r\n\tset_invalid: function (id, mode, details) {\r\n\t\tif (details) mode = {\r\n\t\t\tvalue: mode, details: details, toString: function () {\r\n\t\t\t\treturn this.value.toString();\r\n\t\t\t}\r\n\t\t};\r\n\t\tthis._invalid[id] = mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: check mandatory fields and varify values of cells, initiate update (if specified)\r\n\t *\t@param: rowId - id of row to set update-status for\r\n\t *\t@type: public\r\n\t */\r\n\tcheckBeforeUpdate: function (rowId) {\r\n\t\treturn true;\r\n\t},\r\n\t/**\r\n\t *\t@desc: send row(s) values to server\r\n\t *\t@param: rowId - id of row which data to send. If not specified, then all \"updated\" rows will be send\r\n\t *\t@type: public\r\n\t */\r\n\tsendData: function (rowId) {\r\n\t\tif (this.$scheduler.editStop) this.$scheduler.editStop();\r\n\r\n\t\tif (typeof rowId == \"undefined\" || this._tSend) return this.sendAllData();\r\n\t\tif (this._in_progress[rowId]) return false;\r\n\r\n\t\tthis.messages = [];\r\n\t\tif (!this.checkBeforeUpdate(rowId) && this.callEvent(\"onValidationError\", [rowId, this.messages])) return false;\r\n\t\tthis._beforeSendData(this._getRowData(rowId), rowId);\r\n\t},\r\n\t_beforeSendData: function (data, rowId) {\r\n\t\tif (!this.callEvent(\"onBeforeUpdate\", [rowId, this.getState(rowId), data])) return false;\r\n\t\tthis._sendData(data, rowId);\r\n\t},\r\n\tserialize: function (data, id) {\r\n\t\tif (this._serializeAsJson) {\r\n\t\t\treturn this._serializeAsJSON(data);\r\n\t\t}\r\n\r\n\t\tif (typeof data == \"string\")\r\n\t\t\treturn data;\r\n\t\tif (typeof id != \"undefined\")\r\n\t\t\treturn this.serialize_one(data, \"\");\r\n\t\telse {\r\n\t\t\tvar stack = [];\r\n\t\t\tvar keys = [];\r\n\t\t\tfor (var key in data)\r\n\t\t\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\t\t\tstack.push(this.serialize_one(data[key], key + this.post_delim));\r\n\t\t\t\t\tkeys.push(key);\r\n\t\t\t\t}\r\n\t\t\tstack.push(\"ids=\" + this.escape(keys.join(\",\")));\r\n\t\t\tif (this.$scheduler.security_key)\r\n\t\t\t\tstack.push(\"dhx_security=\" + (this.$scheduler.security_key));\r\n\t\t\treturn stack.join(\"&\");\r\n\t\t}\r\n\t},\r\n\tserialize_one: function (data, pref) {\r\n\t\tif (typeof data == \"string\")\r\n\t\t\treturn data;\r\n\t\tvar stack = [];\r\n\t\tvar serialized = \"\";\r\n\t\tfor (var key in data)\r\n\t\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\t\tif ((key == \"id\" || key == this.action_param) && this._tMode == \"REST\") continue;\r\n\t\t\t\tif (typeof data[key] === \"string\" || typeof data[key] === \"number\") {\r\n\t\t\t\t\tserialized = data[key];\r\n\t\t\t\t} else {\r\n\t\t\t\t\tserialized = JSON.stringify(data[key]);\r\n\t\t\t\t}\r\n\t\t\t\tstack.push(this.escape((pref || \"\") + key) + \"=\" + this.escape(serialized));\r\n\t\t\t}\r\n\t\treturn stack.join(\"&\");\r\n\t},\r\n\t_applyPayload: function (url) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tif (this._payload)\r\n\t\t\tfor (var key in this._payload)\r\n\t\t\t\turl = url + ajax.urlSeparator(url) + this.escape(key) + \"=\" + this.escape(this._payload[key]);\r\n\t\treturn url;\r\n\t},\r\n\t_sendData: function (dataToSend, rowId) {\r\n\t\tif (!dataToSend) {\r\n\t\t\treturn; // nothing to send\r\n\t\t}\r\n\t\tif (!this.callEvent(\"onBeforeDataSending\", rowId ? [rowId, this.getState(rowId), dataToSend] : [null, null, dataToSend])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (rowId) {\r\n\t\t\tthis._in_progress[rowId] = (new Date()).valueOf();\r\n\t\t}\r\n\r\n\t\tvar self = this;\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\r\n\t\tif (this._tMode === \"CUSTOM\") {\r\n\t\t\tvar state = this.getState(rowId);\r\n\t\t\tvar action = this.getActionByState(state);\r\n\t\t\tvar _onResolvedCreateUpdate = function (tag) {\r\n\t\t\t\tvar resultState = state;\r\n\t\t\t\tif(tag && tag.responseText && tag.setRequestHeader){\r\n\t\t\t\t\tif(tag.status !== 200){\r\n\t\t\t\t\t\tresultState = \"error\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\ttag = JSON.parse(tag.responseText);\r\n\t\t\t\t\t} catch (e){}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tresultState = resultState || \"updated\";\r\n\t\t\t\tvar sid = rowId;\r\n\t\t\t\tvar tid = rowId;\r\n\r\n\t\t\t\tif (tag) {\r\n\t\t\t\t\tresultState = tag.action || resultState;\r\n\t\t\t\t\tsid = tag.sid || sid;\r\n\t\t\t\t\ttid = tag.id || tag.tid || tid;\r\n\t\t\t\t}\r\n\t\t\t\tself.afterUpdateCallback(sid, tid, resultState, tag);\r\n\t\t\t};\r\n\r\n\t\t\tconst routerMode = \"event\";\r\n\t\t\tvar actionPromise;\r\n\t\t\tif (this._router instanceof Function) {\r\n\t\t\t\tactionPromise = this._router(routerMode, action, dataToSend, rowId);\r\n\t\t\t} else {\r\n\t\t\t\tswitch (state) {\r\n\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].create(dataToSend);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].delete(rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].update(dataToSend, rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(actionPromise){\r\n\t\t\t\t// neither promise nor {tid: newId} response object\r\n\t\t\t\tif(!actionPromise.then &&\r\n\t\t\t\t\t(actionPromise.id === undefined && actionPromise.tid === undefined && actionPromise.action === undefined)){\r\n\t\t\t\t\tthrow new Error(\"Incorrect router return value. A Promise or a response object is expected\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(actionPromise.then){\r\n\t\t\t\t\tactionPromise.then(_onResolvedCreateUpdate).catch(function(error) {\r\n\t\t\t\t\t\tif(error && error.action){\r\n\t\t\t\t\t\t\t_onResolvedCreateUpdate(error);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t_onResolvedCreateUpdate({ action: \"error\", value: error});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// custom method may return a response object in case of sync action\r\n\t\t\t\t\t_onResolvedCreateUpdate(actionPromise);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t_onResolvedCreateUpdate(null);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar queryParams = {\r\n\t\t\tcallback: function(xml) {\r\n\t\t\t\tvar ids = [];\r\n\r\n\t\t\t\tif (rowId) {\r\n\t\t\t\t\tids.push(rowId);\r\n\t\t\t\t} else if (dataToSend) {\r\n\t\t\t\t\tfor (var key in dataToSend) {\r\n\t\t\t\t\t\tids.push(key);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.afterUpdate(self, xml, ids);\r\n\t\t\t},\r\n\t\t\theaders: self._headers\r\n\t\t};\r\n\r\n\t\tvar urlParams = this.serverProcessor + (this._user ? (ajax.urlSeparator(this.serverProcessor) + [\"dhx_user=\" + this._user, \"dhx_version=\" + this.$scheduler.getUserData(0, \"version\")].join(\"&\")) : \"\");\r\n\t\tvar url = this._applyPayload(urlParams);\r\n\t\tvar data;\r\n\r\n\t\tswitch (this._tMode) {\r\n\t\t\tcase \"GET\":\r\n\t\t\t\tdata = this._cleanupArgumentsBeforeSend(dataToSend);\r\n\t\t\t\tqueryParams.url = url + ajax.urlSeparator(url) + this.serialize(data, rowId);\r\n\t\t\t\tqueryParams.method = \"GET\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"POST\":\r\n\t\t\t\tdata = this._cleanupArgumentsBeforeSend(dataToSend);\r\n\t\t\t\tqueryParams.url = url;\r\n\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\tqueryParams.data = this.serialize(data, rowId);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"JSON\":\r\n\t\t\t\tdata = {};\r\n\t\t\t\tvar preprocessedData = this._cleanupItemBeforeSend(dataToSend);\r\n\t\t\t\tfor (var key in preprocessedData) {\r\n\t\t\t\t\tif (key === this.action_param || key === \"id\" || key === \"gr_id\") {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdata[key] = preprocessedData[key];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tqueryParams.url = url;\r\n\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\tqueryParams.data = JSON.stringify({\r\n\t\t\t\t\tid: rowId,\r\n\t\t\t\t\taction: dataToSend[this.action_param],\r\n\t\t\t\t\tdata: data\r\n\t\t\t\t});\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"REST\":\r\n\t\t\tcase \"REST-JSON\":\r\n\t\t\t\turl = urlParams.replace(/(&|\\?)editing=true/, \"\");\r\n\t\t\t\tdata = \"\";\r\n\r\n\t\t\t\tswitch (this.getState(rowId)) {\r\n\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\t\t\tqueryParams.data = this.serialize(dataToSend, rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\tqueryParams.method = \"DELETE\";\r\n\t\t\t\t\t\turl = url + (url.slice(-1) === \"/\" ? \"\" : \"/\") + rowId;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tqueryParams.method = \"PUT\";\r\n\t\t\t\t\t\tqueryParams.data = this.serialize(dataToSend, rowId);\r\n\t\t\t\t\t\turl = url + (url.slice(-1) === \"/\" ? \"\" : \"/\") + rowId;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tqueryParams.url = this._applyPayload(url);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tthis._waitMode++;\r\n\t\treturn ajax.query(queryParams);\r\n\t},\r\n\tsendAllData: function () {\r\n\t\tif (!this.updatedRows.length || this.updateMode === \"off\") { // FIXME: need to leave checking 'this.updateMode === \"off\"'?\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.messages = [];\r\n\t\tvar valid = true;\r\n\r\n\t\tthis._forEachUpdatedRow(function(rowId) {\r\n\t\t\tvalid = valid && this.checkBeforeUpdate(rowId);\r\n\t\t});\r\n\r\n\t\tif (!valid && !this.callEvent(\"onValidationError\", [\"\", this.messages])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (this._tSend) {\r\n\t\t\tthis._sendData(this._getAllData());\r\n\t\t} else {\r\n\t\t\tthis._forEachUpdatedRow(function(rowId) {\r\n\t\t\t\tif (!this._in_progress[rowId]) {\r\n\t\t\t\t\tif (this.is_invalid(rowId)) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis._beforeSendData(this._getRowData(rowId), rowId);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\r\n\t_getAllData: function (rowId) {\r\n\t\tvar out = {};\r\n\t\tvar has_one = false;\r\n\t\tthis._forEachUpdatedRow(function(id) {\r\n\t\t\tif (this._in_progress[id] || this.is_invalid(id)){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar row = this._getRowData(id);\r\n\t\t\tif (!this.callEvent(\"onBeforeUpdate\", [id, this.getState(id), row])) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tout[id] = row;\r\n\t\t\thas_one = true;\r\n\t\t\tthis._in_progress[id] = (new Date()).valueOf();\r\n\t\t});\r\n\t\treturn has_one ? out : null;\r\n\t},\r\n\r\n\tfindRow: function (pattern) {\r\n\t\tvar i = 0;\r\n\t\tfor (i = 0; i < this.updatedRows.length; i++)\r\n\t\t\tif (pattern == this.updatedRows[i]) break;\r\n\t\treturn i;\r\n\t},\r\n\r\n\t/**\r\n\t *\t@desc: define custom actions\r\n\t *\t@param: name - name of action, same as value of action attribute\r\n\t *\t@param: handler - custom function, which receives a XMl response content for action\r\n\t *\t@type: private\r\n\t */\r\n\tdefineAction: function (name, handler) {\r\n\t\tif (!this._uActions) this._uActions = {};\r\n\t\tthis._uActions[name] = handler;\r\n\t},\r\n\r\n\t/**\r\n\t *\t @desc: used in combination with setOnBeforeUpdateHandler to create custom client-server transport system\r\n\t *\t @param: sid - id of item before update\r\n\t *\t @param: tid - id of item after up0ate\r\n\t *\t @param: action - action name\r\n\t *\t @type: public\r\n\t *\t @topic: 0\r\n\t */\r\n\tafterUpdateCallback: function (sid, tid, action, btag) {\r\n\t\tif(!this.$scheduler){\r\n\t\t\t// destructor has been called before the callback\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar marker = sid;\r\n\t\tvar correct = (action !== \"error\" && action !== \"invalid\");\r\n\t\tif (!correct) {\r\n\t\t\tthis.set_invalid(sid, action);\r\n\t\t}\r\n\t\tif ((this._uActions) && (this._uActions[action]) && (!this._uActions[action](btag))) {\r\n\t\t\treturn (delete this._in_progress[marker]);\r\n\t\t}\r\n\r\n\t\tif (this._in_progress[marker] !== \"wait\") {\r\n\t\t\tthis.setUpdated(sid, false);\r\n\t\t}\r\n\r\n\t\tvar originalSid = sid;\r\n\r\n\t\tswitch (action) {\r\n\t\t\tcase \"inserted\":\r\n\t\t\tcase \"insert\":\r\n\t\t\t\tif (tid != sid) {\r\n\t\t\t\t\tthis.setUpdated(sid, false);\r\n\t\t\t\t\tthis.$scheduler[this._methods[2]](sid, tid);\r\n\t\t\t\t\tsid = tid;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"delete\":\r\n\t\t\tcase \"deleted\":\r\n\t\t\t\tthis.$scheduler.setUserData(sid, this.action_param, \"true_deleted\");\r\n\t\t\t\tthis.$scheduler[this._methods[3]](sid, tid);\r\n\t\t\t\tdelete this._in_progress[marker];\r\n\t\t\t\treturn this.callEvent(\"onAfterUpdate\", [sid, action, tid, btag]);\r\n\t\t}\r\n\r\n\t\tif (this._in_progress[marker] !== \"wait\") {\r\n\t\t\tif (correct) {\r\n\t\t\t\tthis.$scheduler.setUserData(sid, this.action_param, \"\");\r\n\t\t\t}\r\n\t\t\tdelete this._in_progress[marker];\r\n\t\t} else {\r\n\t\t\tdelete this._in_progress[marker];\r\n\t\t\tthis.setUpdated(tid, true, this.$scheduler.getUserData(sid, this.action_param));\r\n\t\t}\r\n\r\n\t\tthis.callEvent(\"onAfterUpdate\", [originalSid, action, tid, btag]);\r\n\t},\r\n\r\n\t_errorResponse: function (xml, id){\r\n\t\tif(this.$scheduler && this.$scheduler.callEvent){\r\n\t\t\tthis.$scheduler.callEvent(\"onSaveError\", [id, xml.xmlDoc]);\r\n\t\t}\r\n\t\treturn this.cleanUpdate(id);\r\n\t},\r\n\r\n\t_setDefaultTransactionMode: function () {\r\n\t\tif (this.serverProcessor) {\r\n\t\t\tthis.setTransactionMode(\"POST\", true);\r\n\t\t\tthis.serverProcessor += (this.serverProcessor.indexOf(\"?\") !== -1 ? \"&\" : \"?\") + \"editing=true\";\r\n\t\t\tthis._serverProcessor = this.serverProcessor;\r\n\t\t}\r\n\t},\r\n\t\r\n\t/**\r\n\t *\t@desc: response from server\r\n\t *\t@param: xml - XMLLoader object with response XML\r\n\t *\t@type: private\r\n\t */\r\n\tafterUpdate: function (that, xml, id) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\r\n\t\tif (xml.xmlDoc.status !== 200){\r\n\t\t\tthis._errorResponse(xml, id);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// try to use json first\r\n\t\tvar tag;\r\n\t\ttry {\r\n\t\t\ttag = JSON.parse(xml.xmlDoc.responseText);\r\n\t\t} catch (e) {\r\n\t\t\t// empty response also can be processed by json handler\r\n\t\t\tif (!xml.xmlDoc.responseText.length) {\r\n\t\t\t\ttag = {};\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (tag) {\r\n\t\t\tvar action = tag.action || this.getState(id) || \"updated\";\r\n\t\t\tvar sid = tag.sid || id[0];\r\n\t\t\tvar tid = tag.tid || id[0];\r\n\t\t\tthat.afterUpdateCallback(sid, tid, action, tag);\r\n\t\t\tthat.finalizeUpdate();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// xml response\r\n\t\tvar top = ajax.xmltop(\"data\", xml.xmlDoc); // fix incorrect content type in IE\r\n\t\tif (!top) {\r\n\t\t\treturn this._errorResponse(xml, id);\r\n\t\t}\r\n\t\tvar atag = ajax.xpath(\"//data/action\", top);\r\n\t\tif (!atag.length) {\r\n\t\t\treturn this._errorResponse(xml, id);\r\n\t\t}\r\n\r\n\t\tfor (var i = 0; i < atag.length; i++) {\r\n\t\t\tvar btag = atag[i];\r\n\t\t\tvar action = btag.getAttribute(\"type\");\r\n\t\t\tvar sid = btag.getAttribute(\"sid\");\r\n\t\t\tvar tid = btag.getAttribute(\"tid\");\r\n\r\n\t\t\tthat.afterUpdateCallback(sid, tid, action, btag);\r\n\t\t}\r\n\t\tthat.finalizeUpdate();\r\n\t},\r\n\tcleanUpdate: function (id) {\r\n\t\tif (id)\r\n\t\t\tfor (var i = 0; i < id.length; i++)\r\n\t\t\t\tdelete this._in_progress[id[i]];\r\n\t},\r\n\tfinalizeUpdate: function () {\r\n\t\tif (this._waitMode) this._waitMode--;\r\n\r\n\t\tthis.callEvent(\"onAfterUpdateFinish\", []);\r\n\t\tif (!this.updatedRows.length)\r\n\t\t\tthis.callEvent(\"onFullSync\", []);\r\n\t},\r\n\r\n\t/**\r\n\t *\t@desc: initializes data-processor\r\n\t *\t@param: scheduler - dhtmlxScheduler object to attach this data-processor to\r\n\t *\t@type: public\r\n\t */\r\n\tinit: function (scheduler) {\r\n\t\tif (this._initialized) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.$scheduler = scheduler;\r\n\t\tif (this.$scheduler._dp_init) {\r\n\t\t\tthis.$scheduler._dp_init(this);\r\n\t\t}\r\n\r\n\t\tthis._setDefaultTransactionMode();\r\n\r\n\t\tthis._methods=this._methods||[\"_set_event_text_style\",\"\",\"_dp_change_event_id\",\"_dp_hook_delete\"];\r\n\t\textendScheduler(this.$scheduler, this);\r\n\t\tvar dataProcessorEvents = new DataProcessorEvents(this.$scheduler, this);\r\n\t\tdataProcessorEvents.attach();\r\n\t\tthis.attachEvent(\"onDestroy\", function() {\r\n\t\t\tdelete this._getRowData;\r\n\r\n\t\t\tdelete this.$scheduler._dp;\r\n\t\t\tdelete this.$scheduler._dataprocessor;\r\n\t\t\tdelete this.$scheduler._set_event_text_style;\r\n\t\t\tdelete this.$scheduler._dp_change_event_id;\r\n\t\t\tdelete this.$scheduler._dp_hook_delete;\r\n\t\t\tdelete this.$scheduler;\r\n\t\t\tdataProcessorEvents.detach();\r\n\t\t});\r\n\t\tthis.$scheduler.callEvent(\"onDataProcessorReady\", [this]);\r\n\t\tthis._initialized = true;\r\n\r\n\t\tscheduler._dataprocessor=this;\r\n\t},\r\n\r\n\tsetOnAfterUpdate: function (ev) {\r\n\t\tthis.attachEvent(\"onAfterUpdate\", ev);\r\n\t},\r\n\tsetOnBeforeUpdateHandler: function (func) {\r\n\t\tthis.attachEvent(\"onBeforeDataSending\", func);\r\n\t},\r\n\r\n\t/* starts autoupdate mode\r\n\t\t@param interval time interval for sending update requests\r\n\t*/\r\n\tsetAutoUpdate: function (interval, user) {\r\n\t\tinterval = interval || 2000;\r\n\r\n\t\tthis._user = user || (new Date()).valueOf();\r\n\t\tthis._need_update = false;\r\n\t\t//this._loader = null;\r\n\t\tthis._update_busy = false;\r\n\r\n\t\tthis.attachEvent(\"onAfterUpdate\", function (sid, action, tid, xml_node) {\r\n\t\t\tthis.afterAutoUpdate(sid, action, tid, xml_node);\r\n\t\t});\r\n\t\tthis.attachEvent(\"onFullSync\", function () {\r\n\t\t\tthis.fullSync();\r\n\t\t});\r\n\r\n\t\tvar self = this;\r\n\t\tlet intervalId = global.setInterval(function () {\r\n\t\t\tself.loadUpdate();\r\n\t\t}, interval);\r\n\t\tthis.attachEvent(\"onDestroy\", function(){\r\n\t\t\tclearInterval(intervalId);\r\n\t\t});\r\n\t},\r\n\r\n\t/* process updating request answer\r\n\t\tif status == collision version is deprecated\r\n\t\tset flag for autoupdating immediately\r\n\t*/\r\n\tafterAutoUpdate: function (sid, action, tid, xml_node) {\r\n\t\tif (action == 'collision') {\r\n\t\t\tthis._need_update = true;\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t},\r\n\r\n\t/* callback function for onFillSync event\r\n\t\tcall update function if it's need\r\n\t*/\r\n\tfullSync: function () {\r\n\t\tif (this._need_update) {\r\n\t\t\tthis._need_update = false;\r\n\t\t\tthis.loadUpdate();\r\n\t\t}\r\n\t\treturn true;\r\n\t},\r\n\r\n\t/* sends query to the server and call callback function\r\n\t*/\r\n\tgetUpdates: function (url, callback) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tif (this._update_busy)\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t\tthis._update_busy = true;\r\n\r\n\t\tajax.get(url, callback);\r\n\t},\r\n\r\n\t/* returns xml node value\r\n\t\t@param node\r\n\t\t\txml node\r\n\t*/\r\n\t_getXmlNodeValue: function(node) {\r\n\t\tif (node.firstChild) {\r\n\t\t\treturn node.firstChild.nodeValue;\r\n\t\t}\r\n\t\treturn \"\";\r\n\t},\r\n\r\n\t/* loads updates and processes them\r\n\t*/\r\n\tloadUpdate: function () {\r\n\t\tvar self = this;\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tvar version = this.$scheduler.getUserData(0, \"version\");\r\n\t\tvar url = this.serverProcessor + ajax.urlSeparator(this.serverProcessor) + [\"dhx_user=\" + this._user, \"dhx_version=\" + version].join(\"&\");\r\n\t\turl = url.replace(\"editing=true&\", \"\");\r\n\t\tthis.getUpdates(url, function (xml) {\r\n\t\t\tvar vers = ajax.xpath(\"//userdata\", xml);\r\n\t\t\tself.$scheduler.setUserData(0, \"version\", self._getXmlNodeValue(vers[0]));\r\n\r\n\t\t\tvar updates = ajax.xpath(\"//update\", xml);\r\n\t\t\tif (updates.length) {\r\n\t\t\t\tself._silent_mode = true;\r\n\r\n\t\t\t\tfor (var i = 0; i < updates.length; i++) {\r\n\t\t\t\t\tvar status = updates[i].getAttribute(\"status\");\r\n\t\t\t\t\tvar id = updates[i].getAttribute(\"id\");\r\n\t\t\t\t\tvar parent = updates[i].getAttribute(\"parent\");\r\n\t\t\t\t\tswitch (status) {\r\n\t\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"insertCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"updated\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"updateCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"deleteCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tself._silent_mode = false;\r\n\t\t\t}\r\n\t\t\tself._update_busy = false;\r\n\t\t\tself = null;\r\n\t\t});\r\n\t},\r\n\r\n\tdestructor: function() {\r\n\t\tthis.callEvent(\"onDestroy\", []);\r\n\t\tthis.detachAllEvents();\r\n\r\n\t\tthis.updatedRows = [];\r\n\t\tthis._in_progress = {};\r\n\t\tthis._invalid = {};\r\n\t\tthis._headers = null;\r\n\t\tthis._payload = null;\r\n\t\tdelete this._initialized;\r\n\t},\r\n\r\n\turl: function(url) {\r\n\t\tthis.serverProcessor = this._serverProcessor = url;\r\n\t},\r\n\r\n\t_serializeAsJSON: function(data) {\r\n\t\tif (typeof data === \"string\") {\r\n\t\t\treturn data;\r\n\t\t}\r\n\r\n\t\tvar copy = this.$scheduler.utils.copy(data);\r\n\t\tif (this._tMode === \"REST-JSON\") {\r\n\t\t\tdelete copy.id;\r\n\t\t\tdelete copy[this.action_param];\r\n\t\t}\r\n\r\n\t\treturn JSON.stringify(copy);\r\n\t},\r\n\r\n\t// GET/POST/JSON modes of the dataProcessor didn't send the whole data items in 'delete' requests\r\n\t// clear extra info from the data in order not to change the request format\r\n\t_cleanupArgumentsBeforeSend: function(dataToSend) {\r\n\t\tvar processedData;\r\n\t\tif(dataToSend[this.action_param] === undefined){// hash of updated items, and not an individual item\r\n\t\t\tprocessedData = {};\r\n\t\t\tfor(var i in dataToSend) {\r\n\t\t\t\tprocessedData[i] = this._cleanupArgumentsBeforeSend(dataToSend[i]);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tprocessedData = this._cleanupItemBeforeSend(dataToSend);\r\n\t\t}\r\n\t\treturn processedData;\r\n\t},\r\n\t_cleanupItemBeforeSend: function(updatedItem) {\r\n\t\tvar output = null;\r\n\t\tif(updatedItem){\r\n\t\t\tif(updatedItem[this.action_param] === \"deleted\"){\r\n\t\t\t\toutput = {};\r\n\t\t\t\toutput.id = updatedItem.id;\r\n\t\t\t\toutput[this.action_param] = updatedItem[this.action_param];\r\n\t\t\t}else{\r\n\t\t\t\toutput = updatedItem;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn output;\r\n\t},\r\n\r\n\t_forEachUpdatedRow: function(code) {\r\n\t\tvar updatedRows = this.updatedRows.slice();\r\n\t\tfor (var i = 0; i < updatedRows.length; i++) {\r\n\t\t\tvar rowId = updatedRows[i];\r\n\t\t\tif (this.$scheduler.getUserData(rowId, this.action_param)) {\r\n\t\t\t\tcode.call(this, rowId);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t_prepareDataItem: function(item) {\r\n\t\tvar processedItem = {};\r\n\t\tvar scheduler = this.$scheduler;\r\n\t\tvar copy = scheduler.utils.copy(item);\r\n\t\tfor (var i in copy) {\r\n\t\t\tif (i.indexOf(\"_\") === 0) {\r\n\t\t\t\tcontinue;\r\n\t\t\t} else if (copy[i]) {\r\n\t\t\t\tif(copy[i].getUTCFullYear){\r\n\t\t\t\t\tprocessedItem[i] = scheduler._helpers.formatDate(copy[i]);\r\n\t\t\t\t} else if(typeof copy[i] == \"object\") {\r\n\t\t\t\t\tprocessedItem[i] = this._prepareDataItem(copy[i]);\r\n\t\t\t\t} else if(copy[i] === null) {\r\n\t\t\t\t\tprocessedItem[i] = \"\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprocessedItem[i] = copy[i];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tprocessedItem[this.action_param] = scheduler.getUserData(item.id, this.action_param);\r\n\t\treturn processedItem;\r\n\t},\r\n\t_getRowData: function(id) {\r\n\t\tvar dataItem = this.$scheduler.getEvent(id);\r\n\t\tif (!dataItem) {\r\n\t\t\tdataItem = { id: id };\r\n\t\t}\r\n\t\treturn this._prepareDataItem(dataItem);\r\n\t}\r\n};\r\n\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler.createDataProcessor = function(config) {\r\n\tvar router;\r\n\tvar tMode;\r\n\tif (config instanceof Function) {\r\n\t\trouter = config;\r\n\t} else if (config.hasOwnProperty(\"router\")) {\r\n\t\trouter = config.router;\r\n\t} else if(config.hasOwnProperty(\"event\")){\r\n\t\trouter = config;\r\n\t}\r\n\r\n\tif (router) {\r\n\t\ttMode = \"CUSTOM\";\r\n\t} else {\r\n\t\ttMode = config.mode || \"REST-JSON\";\r\n\t}\r\n\r\n\tvar dp = new DataProcessor(config.url);\r\n\tdp.init(scheduler);\r\n\tdp.setTransactionMode({\r\n\t\tmode: tMode,\r\n\t\trouter: router\r\n\t}, config.batchUpdate); // FIXME: config.batchUpdate where it is explained?\r\n\treturn dp;\r\n};\r\n\r\nscheduler.DataProcessor = DataProcessor;\r\n\r\n}\r\n\r\n//var dataProcessor = global.dataProcessor = DataProcessor; // for old","import utils from \"./utils/utils\";\r\nimport domHelpers from \"./utils/dom_helpers\";\r\n\r\n\r\nexport default function(scheduler) {\r\n\r\n\tvar boxAttribute = \"data-dhxbox\";\r\n\r\n\tvar _dhx_msg_cfg = null;\r\n\r\n\tfunction callback(config, result) {\r\n\t\tvar usercall = config.callback;\r\n\t\tmodalBox.hide(config.box);\r\n\r\n\t\t_dhx_msg_cfg = config.box = null;\r\n\tif (usercall)\r\n\t\t\tusercall(result);\r\n\t}\r\n\r\n\tfunction modal_key(event) {\r\n\t\tif (_dhx_msg_cfg) {\r\n\r\n\t\t\tvar code = event.which || event.keyCode;\r\n\t\t\tvar preventDefault = false;\r\n\r\n\t\t\tif (messageBox.keyboard) {\r\n\t\t\t\tif (code == 13 || code == 32) {\r\n\t\t\t\t\t// default behavior is to confirm/submit popup on space/enter\r\n\t\t\t\t\t// if browser focus is set on button element - do button click instead of default behavior\r\n\t\t\t\t\tvar target = event.target || event.srcElement;\r\n\t\t\t\t\tif (domHelpers.getClassName(target).indexOf(\"scheduler_popup_button\") > -1 && target.click) {\r\n\t\t\t\t\t\ttarget.click();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcallback(_dhx_msg_cfg, true);\r\n\t\t\t\t\t\tpreventDefault = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (code == 27) {\r\n\t\t\t\t\tcallback(_dhx_msg_cfg, false);\r\n\t\t\t\t\tpreventDefault = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (preventDefault) {\r\n\t\t\t\tif (event.preventDefault){\r\n\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t}\r\n\t\t\t\treturn !(event.cancelBubble = true);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler.event(document, \"keydown\", modal_key, true);\r\n\r\n\tfunction modality(mode) {\r\n\t\tif (!modality.cover) {\r\n\t\t\tmodality.cover = document.createElement(\"div\");\r\n\t\t\t//necessary for IE only\r\n\t\t\tscheduler.event(modality.cover, \"keydown\", modal_key);\r\n\t\t\tmodality.cover.className = \"dhx_modal_cover\";\r\n\t\t\tdocument.body.appendChild(modality.cover);\r\n\t\t}\r\n\r\n\t\tmodality.cover.style.display = mode ? \"inline-block\" : \"none\";\r\n\t}\r\n\r\n\tfunction button(text, classValue, result) {\r\n\t\tvar buttonAriaAttrs = scheduler._waiAria.messageButtonAttrString(text);\r\n\t\tvar name = (classValue || \"\").toLowerCase().replace(/ /g, \"_\");\r\n\t\tvar buttonCss = `scheduler_${name}_button dhtmlx_${name}_button`; \r\n\t\treturn `
${text}
`;\r\n\t}\r\n\r\n\tfunction info(text) {\r\n\t\tif (!messageBox.area) {\r\n\t\t\tmessageBox.area = document.createElement(\"div\");\r\n\t\t\tmessageBox.area.className = \"scheduler_message_area dhtmlx_message_area\";\r\n\t\t\tmessageBox.area.style[messageBox.position] = \"5px\";\r\n\t\t\tdocument.body.appendChild(messageBox.area);\r\n\t\t}\r\n\r\n\t\tmessageBox.hide(text.id);\r\n\t\tvar message = document.createElement(\"div\");\r\n\t\tmessage.innerHTML = \"
\" + text.text + \"
\";\r\n\t\tmessage.className = \"scheduler-info dhtmlx-info scheduler-\" + text.type + \" dhtmlx-\" + text.type;\r\n\t\tscheduler.event(message, \"click\",function () {\r\n\t\t\tmessageBox.hide(text.id);\r\n\t\t\ttext = null;\r\n\t\t});\r\n\r\n\t\tscheduler._waiAria.messageInfoAttr(message);\r\n\r\n\t\tif (messageBox.position == \"bottom\" && messageBox.area.firstChild)\r\n\t\t\tmessageBox.area.insertBefore(message, messageBox.area.firstChild);\r\n\t\telse\r\n\t\t\tmessageBox.area.appendChild(message);\r\n\r\n\t\tif (text.expire > 0)\r\n\t\t\tmessageBox.timers[text.id] = window.setTimeout(function () {\r\n\t\t\t\t// GS-1213: We need that when Scheduler is destroyed\r\n\t\t\t\tif (messageBox) messageBox.hide(text.id);\r\n\t\t\t}, text.expire);\r\n\r\n\t\tmessageBox.pull[text.id] = message;\r\n\t\tmessage = null;\r\n\r\n\t\treturn text.id;\r\n\t}\r\n\r\n\tfunction getFirstDefined() {\r\n\t\tvar values = [].slice.apply(arguments, [0]);\r\n\r\n\t\tfor (var i = 0; i < values.length; i++) {\r\n\t\t\tif (values[i]) {\r\n\t\t\t\treturn values[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tfunction _boxStructure(config, ok, cancel) {\r\n\t\tvar box = document.createElement(\"div\");\r\n\r\n\t\tvar contentId = utils.uid();\r\n\t\tscheduler._waiAria.messageModalAttr(box, contentId);\r\n\r\n\r\n\t\tbox.className = \" scheduler_modal_box dhtmlx_modal_box scheduler-\" + config.type + \" dhtmlx-\" + config.type;\r\n\t\tbox.setAttribute(boxAttribute, 1);\r\n\r\n\t\tvar inner = '';\r\n\r\n\t\tif (config.width)\r\n\t\t\tbox.style.width = config.width;\r\n\t\tif (config.height)\r\n\t\t\tbox.style.height = config.height;\r\n\t\tif (config.title)\r\n\t\t\tinner += '
' + config.title + '
';\r\n\t\tinner += '
' + (config.content ? '' : config.text) + '
';\r\n\t\tif (ok)\r\n\t\t\tinner += button(getFirstDefined(config.ok, scheduler.locale.labels.message_ok, \"OK\"), \"ok\", true);\r\n\t\tif (cancel)\r\n\t\t\tinner += button(getFirstDefined(config.cancel, scheduler.locale.labels.message_cancel, \"Cancel\"), \"cancel\", false);\r\n\r\n\t\tif (config.buttons) {\r\n\t\t\tfor (var i = 0; i < config.buttons.length; i++) {\r\n\t\t\t\tvar btn = config.buttons[i];\r\n\t\t\t\tif (typeof btn == \"object\") {\r\n\t\t\t\t\t// Support { label:\"Save\", css:\"main_button\", value:\"save\" }\r\n\t\t\t\t\tvar label = btn.label;\r\n\t\t\t\t\tvar css = btn.css || (\"scheduler_\" + btn.label.toLowerCase() + \"_button dhtmlx_\" + btn.label.toLowerCase() + \"_button\");\r\n\t\t\t\t\tvar value = btn.value || i;\r\n\t\t\t\t\tinner += button(label, css, value);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tinner += button(btn, btn, i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tinner += '
';\r\n\t\tbox.innerHTML = inner;\r\n\r\n\t\tif (config.content) {\r\n\t\t\tvar node = config.content;\r\n\t\t\tif (typeof node == \"string\")\r\n\t\t\t\tnode = document.getElementById(node);\r\n\t\t\tif (node.style.display == 'none')\r\n\t\t\t\tnode.style.display = \"\";\r\n\t\t\tbox.childNodes[config.title ? 1 : 0].appendChild(node);\r\n\t\t}\r\n\r\n\t\tscheduler.event(box, \"click\", function (event) {\r\n\t\t\tvar source = event.target || event.srcElement;\r\n\t\t\tif (!source.className) source = source.parentNode;\r\n\t\t\tif (domHelpers.closest(source, \".scheduler_popup_button\")) {\r\n\t\t\t\tvar result = source.getAttribute(\"data-result\");\r\n\t\t\t\tresult = (result == \"true\") || (result == \"false\" ? false : result);\r\n\t\t\t\tcallback(config, result);\r\n\t\t\t}\r\n\t\t});\r\n\t\tconfig.box = box;\r\n\t\tif (ok || cancel)\r\n\t\t\t_dhx_msg_cfg = config;\r\n\r\n\t\treturn box;\r\n\t}\r\n\r\n\tfunction _createBox(config, ok, cancel) {\r\n\t\tvar box = config.tagName ? config : _boxStructure(config, ok, cancel);\r\n\r\n\t\tif (!config.hidden)\r\n\t\t\tmodality(true);\r\n\t\tdocument.body.appendChild(box);\r\n\t\tvar x = Math.abs(Math.floor(((window.innerWidth || document.documentElement.offsetWidth) - box.offsetWidth) / 2));\r\n\t\tvar y = Math.abs(Math.floor(((window.innerHeight || document.documentElement.offsetHeight) - box.offsetHeight) / 2));\r\n\t\tif (config.position == \"top\")\r\n\t\t\tbox.style.top = \"-3px\";\r\n\t\telse\r\n\t\t\tbox.style.top = y + 'px';\r\n\t\tbox.style.left = x + 'px';\r\n\t\t//necessary for IE only\r\n\t\tscheduler.event(box, \"keydown\", modal_key);\r\n\r\n\t\tmodalBox.focus(box);\r\n\r\n\t\tif (config.hidden)\r\n\t\t\tmodalBox.hide(box);\r\n\r\n\t\tscheduler.callEvent(\"onMessagePopup\", [box]);\r\n\t\treturn box;\r\n\t}\r\n\r\n\tfunction alertPopup(config) {\r\n\t\treturn _createBox(config, true, false);\r\n\t}\r\n\r\n\tfunction confirmPopup(config) {\r\n\t\treturn _createBox(config, true, true);\r\n\t}\r\n\r\n\tfunction boxPopup(config) {\r\n\t\treturn _createBox(config);\r\n\t}\r\n\r\n\tfunction box_params(text, type, callback) {\r\n\t\tif (typeof text != \"object\") {\r\n\t\t\tif (typeof type == \"function\") {\r\n\t\t\t\tcallback = type;\r\n\t\t\t\ttype = \"\";\r\n\t\t\t}\r\n\t\t\ttext = {text: text, type: type, callback: callback};\r\n\t\t}\r\n\t\treturn text;\r\n\t}\r\n\r\n\tfunction params(text, type, expire, id) {\r\n\t\tif (typeof text != \"object\")\r\n\t\t\ttext = {text: text, type: type, expire: expire, id: id};\r\n\t\ttext.id = text.id || utils.uid();\r\n\t\ttext.expire = text.expire || messageBox.expire;\r\n\t\treturn text;\r\n\t}\r\n\r\n\tvar alertBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"confirm\";\r\n\t\treturn alertPopup(text);\r\n\t};\r\n\tvar confirmBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"alert\";\r\n\t\treturn confirmPopup(text);\r\n\t};\r\n\tvar modalBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"alert\";\r\n\t\treturn boxPopup(text);\r\n\t};\r\n\tmodalBox.hide = function (node) {\r\n\t\twhile (node && node.getAttribute && !node.getAttribute(boxAttribute))\r\n\t\t\tnode = node.parentNode;\r\n\t\tif (node) {\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t\tmodality(false);\r\n\r\n\t\t\tscheduler.callEvent(\"onAfterMessagePopup\", [node]);\r\n\t\t}\r\n\t};\r\n\r\n\tmodalBox.focus = function (node) {\r\n\t\tsetTimeout(function () {\r\n\t\t\tvar focusable = domHelpers.getFocusableNodes(node);\r\n\t\t\tif (focusable.length) {\r\n\t\t\t\tif (focusable[0].focus) focusable[0].focus();\r\n\t\t\t}\r\n\t\t}, 1);\r\n\t};\r\n\r\n\tvar messageBox = function (text, type, expire, id) {\r\n\t\ttext = params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"info\";\r\n\r\n\t\tvar subtype = text.type.split(\"-\")[0];\r\n\t\tswitch (subtype) {\r\n\t\t\tcase \"alert\":\r\n\t\t\t\treturn alertPopup(text);\r\n\t\t\tcase \"confirm\":\r\n\t\t\t\treturn confirmPopup(text);\r\n\t\t\tcase \"modalbox\":\r\n\t\t\t\treturn boxPopup(text);\r\n\t\t\tdefault:\r\n\t\t\t\treturn info(text);\r\n\t\t}\r\n\t};\r\n\r\n\tmessageBox.seed = (new Date()).valueOf();\r\n\tmessageBox.uid = utils.uid;\r\n\tmessageBox.expire = 4000;\r\n\tmessageBox.keyboard = true;\r\n\tmessageBox.position = \"top\";\r\n\tmessageBox.pull = {};\r\n\tmessageBox.timers = {};\r\n\r\n\tmessageBox.hideAll = function () {\r\n\t\tfor (var key in messageBox.pull)\r\n\t\t\tmessageBox.hide(key);\r\n\t};\r\n\tmessageBox.hide = function (id) {\r\n\t\tvar obj = messageBox.pull[id];\r\n\t\tif (obj && obj.parentNode) {\r\n\t\t\twindow.setTimeout(function () {\r\n\t\t\t\tobj.parentNode.removeChild(obj);\r\n\t\t\t\tobj = null;\r\n\t\t\t}, 2000);\r\n\t\t\tobj.className += \" hidden\";\r\n\r\n\t\t\tif (messageBox.timers[id])\r\n\t\t\t\twindow.clearTimeout(messageBox.timers[id]);\r\n\t\t\tdelete messageBox.pull[id];\r\n\t\t}\r\n\t};\r\n\r\n\tvar popups = [];\r\n\tscheduler.attachEvent(\"onMessagePopup\", function(box){\r\n\t\tpopups.push(box);\r\n\t});\r\n\tscheduler.attachEvent(\"onAfterMessagePopup\", function(box){\r\n\t\tfor(var i = 0; i < popups.length; i++){\r\n\t\t\tif(popups[i] === box){\r\n\t\t\t\tpopups.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tif(modality.cover && modality.cover.parentNode){\r\n\t\t\tmodality.cover.parentNode.removeChild(modality.cover);\r\n\t\t}\r\n\r\n\t\tfor(var i = 0; i < popups.length; i++){\r\n\t\t\tif(popups[i].parentNode){\r\n\t\t\t\tpopups[i].parentNode.removeChild(popups[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\tpopups = null;\r\n\r\n\t\tif(messageBox.area && messageBox.area.parentNode){\r\n\t\t\tmessageBox.area.parentNode.removeChild(messageBox.area);\r\n\t\t}\r\n\t\tmessageBox = null;\r\n\t});\r\n\r\n\treturn {\r\n\t\talert: alertBox,\r\n\t\tconfirm: confirmBox,\r\n\t\tmessage: messageBox,\r\n\t\tmodalbox: modalBox\r\n\t};\r\n}","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"كانون الثاني\", \"شباط\", \"آذار\", \"نيسان\", \"أيار\", \"حزيران\", \"تموز\", \"آب\", \"أيلول\", \"تشرين الأول\", \"تشرين الثاني\", \"كانون الأول\"],\r\n\t\tmonth_short: [\"يناير\", \"فبراير\", \"مارس\", \"أبريل\", \"مايو\", \"يونيو\", \"يوليو\", \"أغسطس\", \"سبتمبر\", \"أكتوبر\", \"نوفمبر\", \"ديسمبر\"],\r\n\t\tday_full: [\"الأحد\", \"الأثنين\", \"ألثلاثاء\", \"الأربعاء\", \"ألحميس\", \"ألجمعة\", \"السبت\"],\r\n\t\tday_short: [\"احد\", \"اثنين\", \"ثلاثاء\", \"اربعاء\", \"خميس\", \"جمعة\", \"سبت\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"اليوم\",\r\n\t\tday_tab: \"يوم\",\r\n\t\tweek_tab: \"أسبوع\",\r\n\t\tmonth_tab: \"شهر\",\r\n\t\tnew_event: \"حدث جديد\",\r\n\t\ticon_save: \"اخزن\",\r\n\t\ticon_cancel: \"الغاء\",\r\n\t\ticon_details: \"تفاصيل\",\r\n\t\ticon_edit: \"تحرير\",\r\n\t\ticon_delete: \"حذف\",\r\n\t\tconfirm_closing: \"التغييرات سوف تضيع, هل انت متأكد؟\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"الحدث سيتم حذفها نهائيا ، هل أنت متأكد؟\",\r\n\t\tsection_description: \"الوصف\",\r\n\t\tsection_time: \"الفترة الزمنية\",\r\n\t\tfull_day: \"طوال اليوم\",\r\n\r\n\t\tconfirm_recurring: \"هل تريد تحرير مجموعة كاملة من الأحداث المتكررة؟\",\r\n\t\tsection_recurring: \"تكرار الحدث\",\r\n\t\tbutton_recurring: \"تعطيل\",\r\n\t\tbutton_recurring_open: \"تمكين\",\r\n\t\tbutton_edit_series: \"تحرير سلسلة\",\r\n\t\tbutton_edit_occurrence: \"تعديل نسخة\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"جدول\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};\r\n\r\n\r\n","/*\r\n Translation by Sofya Morozova\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Студзень\", \"Люты\", \"Сакавік\", \"Красавік\", \"Maй\", \"Чэрвень\", \"Ліпень\", \"Жнівень\", \"Верасень\", \"Кастрычнік\", \"Лістапад\", \"Снежань\"],\r\n\t\tmonth_short: [\"Студз\", \"Лют\", \"Сак\", \"Крас\", \"Maй\", \"Чэр\", \"Ліп\", \"Жнів\", \"Вер\", \"Каст\", \"Ліст\", \"Снеж\"],\r\n\t\tday_full: [ \"Нядзеля\", \"Панядзелак\", \"Аўторак\", \"Серада\", \"Чацвер\", \"Пятніца\", \"Субота\"],\r\n\t\tday_short: [\"Нд\", \"Пн\", \"Аўт\", \"Ср\", \"Чцв\", \"Пт\", \"Сб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сёння\",\r\n\t\tday_tab: \"Дзень\",\r\n\t\tweek_tab: \"Тыдзень\",\r\n\t\tmonth_tab: \"Месяц\",\r\n\t\tnew_event: \"Новая падзея\",\r\n\t\ticon_save: \"Захаваць\",\r\n\t\ticon_cancel: \"Адмяніць\",\r\n\t\ticon_details: \"Дэталі\",\r\n\t\ticon_edit: \"Змяніць\",\r\n\t\ticon_delete: \"Выдаліць\",\r\n\t\tconfirm_closing: \"\", //Унесеныя змены будуць страчаны, працягнуць?\r\n\t\tconfirm_deleting: \"Падзея будзе выдалена незваротна, працягнуць?\",\r\n\t\tsection_description: \"Апісанне\",\r\n\t\tsection_time: \"Перыяд часу\",\r\n\t\tfull_day: \"Увесь дзень\",\r\n\r\n\t\tconfirm_recurring: \"Вы хочаце змяніць усю серыю паўтаральных падзей?\",\r\n\t\tsection_recurring: \"Паўтарэнне\",\r\n\t\tbutton_recurring: \"Адключана\",\r\n\t\tbutton_recurring_open: \"Уключана\",\r\n\t\tbutton_edit_series: \"Рэдагаваць серыю\",\r\n\t\tbutton_edit_occurrence: \"Рэдагаваць асобнік\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Спіс\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Апісанне\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Год\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Спіс\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Спic\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Дзень\",\r\n\t\trepeat_radio_week: \"Тыдзень\",\r\n\t\trepeat_radio_month: \"Месяц\",\r\n\t\trepeat_radio_year: \"Год\",\r\n\t\trepeat_radio_day_type: \"Кожны\",\r\n\t\trepeat_text_day_count: \"дзень\",\r\n\t\trepeat_radio_day_type2: \"Кожны працоўны дзень\",\r\n\t\trepeat_week: \" Паўтараць кожны\",\r\n\t\trepeat_text_week_count: \"тыдзень\",\r\n\t\trepeat_radio_month_type: \"Паўтараць\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" чысла кожнага\",\r\n\t\trepeat_text_month_count: \"месяцу\",\r\n\t\trepeat_text_month_count2_before: \"кожны \",\r\n\t\trepeat_text_month_count2_after: \"месяц\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"дзень\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без даты заканчэння\",\r\n\t\trepeat_text_occurences_count: \"паўтораў\",\r\n\t\trepeat_radio_end2: \"\",\r\n\t\trepeat_radio_end3: \"Да \",\r\n\t\tmonth_for_recurring: [\"Студзеня\", \"Лютага\", \"Сакавіка\", \"Красавіка\", \"Мая\", \"Чэрвеня\", \"Ліпeня\", \"Жніўня\", \"Верасня\", \"Кастрычніка\", \"Лістапада\", \"Снежня\"],\r\n\t\tday_for_recurring: [\"Нядзелю\", \"Панядзелак\", \"Аўторак\", \"Сераду\", \"Чацвер\", \"Пятніцу\", \"Суботу\"]\r\n\t}\r\n};\r\n","/*\r\n @Traducido por Vicente Adria Bohigues - vicenteadria@hotmail.com\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Gener\", \"Febrer\", \"Març\", \"Abril\", \"Maig\", \"Juny\", \"Juliol\", \"Agost\", \"Setembre\", \"Octubre\", \"Novembre\", \"Desembre\"],\r\n\t\tmonth_short: [\"Gen\", \"Feb\", \"Mar\", \"Abr\", \"Mai\", \"Jun\", \"Jul\", \"Ago\", \"Set\", \"Oct\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Diumenge\", \"Dilluns\", \"Dimarts\", \"Dimecres\", \"Dijous\", \"Divendres\", \"Dissabte\"],\r\n\t\tday_short: [\"Dg\", \"Dl\", \"Dm\", \"Dc\", \"Dj\", \"Dv\", \"Ds\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hui\",\r\n\t\tday_tab: \"Dia\",\r\n\t\tweek_tab: \"Setmana\",\r\n\t\tmonth_tab: \"Mes\",\r\n\t\tnew_event: \"Nou esdeveniment\",\r\n\t\ticon_save: \"Guardar\",\r\n\t\ticon_cancel: \"Cancel·lar\",\r\n\t\ticon_details: \"Detalls\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Esborrar\",\r\n\t\tconfirm_closing: \"\", //\"Els seus canvis es perdràn, continuar ?\"\r\n\t\tconfirm_deleting: \"L'esdeveniment s'esborrarà definitivament, continuar ?\",\r\n\t\tsection_description: \"Descripció\",\r\n\t\tsection_time: \"Periode de temps\",\r\n\t\tfull_day: \"Tot el dia\",\r\n\r\n\t\tconfirm_recurring: \"¿Desitja modificar el conjunt d'esdeveniments repetits?\",\r\n\t\tsection_recurring: \"Repeteixca l'esdeveniment\",\r\n\t\tbutton_recurring: \"Impedit\",\r\n\t\tbutton_recurring_open: \"Permés\",\r\n\t\tbutton_edit_series: \"Edit sèrie\",\r\n\t\tbutton_edit_occurrence: \"Edita Instància\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descripció\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Any\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Taula\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};","/*\r\nTranslation by FreezeSoul\r\n*/\r\n//scheduler.config.day_date=\"%M %d日 %D\";\r\n//scheduler.config.default_date=\"%Y年 %M %d日\";\r\n//scheduler.config.month_date=\"%Y年 %M\";\r\n\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"一月\", \"二月\", \"三月\", \"四月\", \"五月\", \"六月\", \"七月\", \"八月\", \"九月\", \"十月\", \"十一月\", \"十二月\"],\r\n\t\tmonth_short: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tday_full: [\"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\"],\r\n\t\tday_short: [\"日\", \"一\", \"二\", \"三\", \"四\", \"五\", \"六\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"今天\",\r\n\t\tday_tab: \"日\",\r\n\t\tweek_tab: \"周\",\r\n\t\tmonth_tab: \"月\",\r\n\t\tnew_event: \"新建日程\",\r\n\t\ticon_save: \"保存\",\r\n\t\ticon_cancel: \"关闭\",\r\n\t\ticon_details: \"详细\",\r\n\t\ticon_edit: \"编辑\",\r\n\t\ticon_delete: \"删除\",\r\n\t\tconfirm_closing: \"请确认是否撤销修改!\", //Your changes will be lost, are your sure?\r\n\t\tconfirm_deleting: \"是否删除日程?\",\r\n\t\tsection_description: \"描述\",\r\n\t\tsection_time: \"时间范围\",\r\n\t\tfull_day: \"整天\",\r\n\r\n\t\tconfirm_recurring:\"请确认是否将日程设为重复模式?\",\r\n\t\tsection_recurring:\"重复周期\",\r\n\t\tbutton_recurring:\"禁用\",\r\n\t\tbutton_recurring_open:\"启用\",\r\n\t\tbutton_edit_series: \"编辑系列\",\r\n\t\tbutton_edit_occurrence: \"编辑实例\",\r\n\t\t\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"议程\",\r\n\t\tdate:\"日期\",\r\n\t\tdescription:\"说明\",\r\n\t\t\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"今年\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"议程\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab:\"电网\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"按天\",\r\n\t\trepeat_radio_week: \"按周\",\r\n\t\trepeat_radio_month: \"按月\",\r\n\t\trepeat_radio_year: \"按年\",\r\n\t\trepeat_radio_day_type: \"每\",\r\n\t\trepeat_text_day_count: \"天\",\r\n\t\trepeat_radio_day_type2: \"每个工作日\",\r\n\t\trepeat_week: \" 重复 每\",\r\n\t\trepeat_text_week_count: \"星期的:\",\r\n\t\trepeat_radio_month_type: \"重复\",\r\n\t\trepeat_radio_month_start: \"在\",\r\n\t\trepeat_text_month_day: \"日 每\",\r\n\t\trepeat_text_month_count: \"月\",\r\n\t\trepeat_text_month_count2_before: \"每\",\r\n\t\trepeat_text_month_count2_after: \"月\",\r\n\t\trepeat_year_label: \"在\",\r\n\t\tselect_year_day2: \"的\",\r\n\t\trepeat_text_year_day: \"日\",\r\n\t\tselect_year_month: \"月\",\r\n\t\trepeat_radio_end: \"无结束日期\",\r\n\t\trepeat_text_occurences_count: \"次结束\",\r\n\t\trepeat_radio_end2: \"重复\",\r\n\t\trepeat_radio_end3: \"结束于\",\r\n\t\tmonth_for_recurring: [\"一月\", \"二月\", \"三月\", \"四月\", \"五月\", \"六月\", \"七月\", \"八月\", \"九月\", \"十月\", \"十一月\", \"十二月\"],\r\n\t\tday_for_recurring: [\"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Leden\", \"Únor\", \"Březen\", \"Duben\", \"Květen\", \"Červen\", \"Červenec\", \"Srpen\", \"Září\", \"Říjen\", \"Listopad\", \"Prosinec\"],\r\n\t\tmonth_short: [\"Led\", \"Ún\", \"Bře\", \"Dub\", \"Kvě\", \"Čer\", \"Čec\", \"Srp\", \"Září\", \"Říj\", \"List\", \"Pro\"],\r\n\t\tday_full: [\"Neděle\", \"Pondělí\", \"Úterý\", \"Středa\", \"Čtvrtek\", \"Pátek\", \"Sobota\"],\r\n\t\tday_short: [\"Ne\", \"Po\", \"Út\", \"St\", \"Čt\", \"Pá\", \"So\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dnes\",\r\n\t\tday_tab: \"Den\",\r\n\t\tweek_tab: \"Týden\",\r\n\t\tmonth_tab: \"Měsíc\",\r\n\t\tnew_event: \"Nová událost\",\r\n\t\ticon_save: \"Uložit\",\r\n\t\ticon_cancel: \"Zpět\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edituj\",\r\n\t\ticon_delete: \"Smazat\",\r\n\t\tconfirm_closing: \"\", //Vaše změny budou ztraceny, opravdu ?\r\n\t\tconfirm_deleting: \"Událost bude trvale smazána, opravdu?\",\r\n\t\tsection_description: \"Poznámky\",\r\n\t\tsection_time: \"Doba platnosti\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Přejete si upravit celou řadu opakovaných událostí?\",\r\n\t\tsection_recurring: \"Opakování události\",\r\n\t\tbutton_recurring: \"Vypnuto\",\r\n\t\tbutton_recurring_open: \"Zapnuto\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Upravit instance\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Program\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Poznámka\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\t\tfull_day: \"Full day\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Program\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Mřížka\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Denně\",\r\n\t\trepeat_radio_week: \"Týdně\",\r\n\t\trepeat_radio_month: \"Měsíčně\",\r\n\t\trepeat_radio_year: \"Ročně\",\r\n\t\trepeat_radio_day_type: \"každý\",\r\n\t\trepeat_text_day_count: \"Den\",\r\n\t\trepeat_radio_day_type2: \"pracovní dny\",\r\n\t\trepeat_week: \"Opakuje každých\",\r\n\t\trepeat_text_week_count: \"Týdnů na:\",\r\n\t\trepeat_radio_month_type: \"u každého\",\r\n\t\trepeat_radio_month_start: \"na\",\r\n\t\trepeat_text_month_day: \"Den každého\",\r\n\t\trepeat_text_month_count: \"Měsíc\",\r\n\t\trepeat_text_month_count2_before: \"každý\",\r\n\t\trepeat_text_month_count2_after: \"Měsíc\",\r\n\t\trepeat_year_label: \"na\",\r\n\t\tselect_year_day2: \"v\",\r\n\t\trepeat_text_year_day: \"Den v\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"bez data ukončení\",\r\n\t\trepeat_text_occurences_count: \"Události\",\r\n\t\trepeat_radio_end2: \"po\",\r\n\t\trepeat_radio_end3: \"Konec\",\r\n\t\tmonth_for_recurring: [\"Leden\", \"Únor\", \"Březen\", \"Duben\", \"Květen\", \"Červen\", \"Červenec\", \"Srpen\", \"Září\", \"Říjen\", \"Listopad\", \"Prosinec\"],\r\n\t\tday_for_recurring: [\"Neděle \", \"Pondělí\", \"Úterý\", \"Středa\", \"Čtvrtek\", \"Pátek\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Marts\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Man\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uge\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny begivenhed\",\r\n\t\ticon_save: \"Gem\",\r\n\t\ticon_cancel: \"Fortryd\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Tilret\",\r\n\t\ticon_delete: \"Slet\",\r\n\t\tconfirm_closing: \"Dine rettelser vil gå tabt.. Er dy sikker?\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Bigivenheden vil blive slettet permanent. Er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du tilrette hele serien af gentagne begivenheder?\",\r\n\t\tsection_recurring: \"Gentag begivenhed\",\r\n\t\tbutton_recurring: \"Frakoblet\",\r\n\t\tbutton_recurring_open: \"Tilkoblet\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Rediger en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dagsorden\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dagsorden\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daglig\",\r\n\t\trepeat_radio_week: \"Ugenlig\",\r\n\t\trepeat_radio_month: \"Månedlig\",\r\n\t\trepeat_radio_year: \"Årlig\",\r\n\t\trepeat_radio_day_type: \"Hver\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"På hver arbejdsdag\",\r\n\t\trepeat_week: \" Gentager sig hver\",\r\n\t\trepeat_text_week_count: \"uge på følgende dage:\",\r\n\t\trepeat_radio_month_type: \"Hver den\",\r\n\t\trepeat_radio_month_start: \"Den\",\r\n\t\trepeat_text_month_day: \" i hver\",\r\n\t\trepeat_text_month_count: \"måned\",\r\n\t\trepeat_text_month_count2_before: \"hver\",\r\n\t\trepeat_text_month_count2_after: \"måned\",\r\n\t\trepeat_year_label: \"Den\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Ingen slutdato\",\r\n\t\trepeat_text_occurences_count: \"gentagelse\",\r\n\t\trepeat_radio_end2: \"Efter\",\r\n\t\trepeat_radio_end3: \"Slut\",\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"März\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Dezember\"],\r\n\t\tday_for_recurring: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\" Januar\", \" Februar\", \" März \", \" April\", \" Mai\", \" Juni\", \" Juli\", \" August\", \" September \", \" Oktober\", \" November \", \" Dezember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mär\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dez\"],\r\n\t\tday_full: [ \"Sonntag\", \"Montag\", \"Dienstag\", \" Mittwoch\", \" Donnerstag\", \"Freitag\", \"Samstag\"],\r\n\t\tday_short: [\"So\", \"Mo\", \"Di\", \"Mi\", \"Do\", \"Fr\", \"Sa\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Heute\",\r\n\t\tday_tab: \"Tag\",\r\n\t\tweek_tab: \"Woche\",\r\n\t\tmonth_tab: \"Monat\",\r\n\t\tnew_event: \"neuer Eintrag\",\r\n\t\ticon_save: \"Speichern\",\r\n\t\ticon_cancel: \"Abbrechen\",\r\n\t\ticon_details: \"Details\",\r\n\t\ticon_edit: \"Ändern\",\r\n\t\ticon_delete: \"Löschen\",\r\n\t\tconfirm_closing: \"\", //\"Ihre Veränderungen werden verloren sein, wollen Sie ergänzen? \"\r\n\t\tconfirm_deleting: \"Der Eintrag wird gelöscht\",\r\n\t\tsection_description: \"Beschreibung\",\r\n\t\tsection_time: \"Zeitspanne\",\r\n\t\tfull_day: \"Ganzer Tag\",\r\n\r\n\t\tconfirm_recurring: \"Wollen Sie alle Einträge bearbeiten oder nur diesen einzelnen Eintrag?\",\r\n\t\tsection_recurring: \"Wiederholung\",\r\n\t\tbutton_recurring: \"Aus\",\r\n\t\tbutton_recurring_open: \"An\",\r\n\t\tbutton_edit_series: \"Bearbeiten Sie die Serie\",\r\n\t\tbutton_edit_occurrence: \"Bearbeiten Sie eine Kopie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Beschreibung\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Jahre\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Täglich\",\r\n\t\trepeat_radio_week: \"Wöchentlich\",\r\n\t\trepeat_radio_month: \"Monatlich\",\r\n\t\trepeat_radio_year: \"Jährlich\",\r\n\t\trepeat_radio_day_type: \"jeden\",\r\n\t\trepeat_text_day_count: \"Tag\",\r\n\t\trepeat_radio_day_type2: \"an jedem Arbeitstag\",\r\n\t\trepeat_week: \" Wiederholt sich jede\",\r\n\t\trepeat_text_week_count: \"Woche am:\",\r\n\t\trepeat_radio_month_type: \"an jedem\",\r\n\t\trepeat_radio_month_start: \"am\",\r\n\t\trepeat_text_month_day: \"Tag eines jeden\",\r\n\t\trepeat_text_month_count: \"Monats\",\r\n\t\trepeat_text_month_count2_before: \"jeden\",\r\n\t\trepeat_text_month_count2_after: \"Monats\",\r\n\t\trepeat_year_label: \"am\",\r\n\t\tselect_year_day2: \"im\",\r\n\t\trepeat_text_year_day: \"Tag im\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"kein Enddatum\",\r\n\t\trepeat_text_occurences_count: \"Ereignissen\",\r\n\t\trepeat_radio_end3: \"Schluß\",\r\n\t\trepeat_radio_end2: \"nach\",\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"März\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Dezember\"],\r\n\t\tday_for_recurring: [\"Sonntag\", \"Montag\", \"Dienstag\", \"Mittwoch\", \"Donnerstag\", \"Freitag\", \"Samstag\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Ιανουάριος\", \"Φεβρουάριος\", \"Μάρτιος\", \"Απρίλιος\", \"Μάϊος\", \"Ιούνιος\", \"Ιούλιος\", \"Αύγουστος\", \"Σεπτέμβριος\", \"Οκτώβριος\", \"Νοέμβριος\", \"Δεκέμβριος\"],\r\n\t\tmonth_short: [\"ΙΑΝ\", \"ΦΕΒ\", \"ΜΑΡ\", \"ΑΠΡ\", \"ΜΑΙ\", \"ΙΟΥΝ\", \"ΙΟΥΛ\", \"ΑΥΓ\", \"ΣΕΠ\", \"ΟΚΤ\", \"ΝΟΕ\", \"ΔΕΚ\"],\r\n\t\tday_full: [\"Κυριακή\", \"Δευτέρα\", \"Τρίτη\", \"Τετάρτη\", \"Πέμπτη\", \"Παρασκευή\", \"Σάββατο\"],\r\n\t\tday_short: [\"ΚΥ\", \"ΔΕ\", \"ΤΡ\", \"ΤΕ\", \"ΠΕ\", \"ΠΑ\", \"ΣΑ\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Σήμερα\",\r\n\t\tday_tab: \"Ημέρα\",\r\n\t\tweek_tab: \"Εβδομάδα\",\r\n\t\tmonth_tab: \"Μήνας\",\r\n\t\tnew_event: \"Νέο έργο\",\r\n\t\ticon_save: \"Αποθήκευση\",\r\n\t\ticon_cancel: \"Άκυρο\",\r\n\t\ticon_details: \"Λεπτομέρειες\",\r\n\t\ticon_edit: \"Επεξεργασία\",\r\n\t\ticon_delete: \"Διαγραφή\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Το έργο θα διαγραφεί οριστικά. Θέλετε να συνεχίσετε;\",\r\n\t\tsection_description: \"Περιγραφή\",\r\n\t\tsection_time: \"Χρονική περίοδος\",\r\n\t\tfull_day: \"Πλήρης Ημέρα\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Θέλετε να επεξεργασθείτε ολόκληρη την ομάδα των επαναλαμβανόμενων έργων;\",\r\n\t\tsection_recurring: \"Επαναλαμβανόμενο έργο\",\r\n\t\tbutton_recurring: \"Ανενεργό\",\r\n\t\tbutton_recurring_open: \"Ενεργό\",\r\n\t\tbutton_edit_series: \"Επεξεργαστείτε τη σειρά\",\r\n\t\tbutton_edit_occurrence: \"Επεξεργασία ένα αντίγραφο\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Ημερήσια Διάταξη\",\r\n\t\tdate: \"Ημερομηνία\",\r\n\t\tdescription: \"Περιγραφή\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Έτος\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Ημερήσια Διάταξη\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Πλέγμα\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Ημερησίως\",\r\n\t\trepeat_radio_week: \"Εβδομαδιαίως\",\r\n\t\trepeat_radio_month: \"Μηνιαίως\",\r\n\t\trepeat_radio_year: \"Ετησίως\",\r\n\t\trepeat_radio_day_type: \"Κάθε\",\r\n\t\trepeat_text_day_count: \"ημέρα\",\r\n\t\trepeat_radio_day_type2: \"Κάθε εργάσιμη\",\r\n\t\trepeat_week: \" Επανάληψη κάθε\",\r\n\t\trepeat_text_week_count: \"εβδομάδα τις επόμενες ημέρες:\",\r\n\t\trepeat_radio_month_type: \"Επανάληψη\",\r\n\t\trepeat_radio_month_start: \"Την\",\r\n\t\trepeat_text_month_day: \"ημέρα κάθε\",\r\n\t\trepeat_text_month_count: \"μήνα\",\r\n\t\trepeat_text_month_count2_before: \"κάθε\",\r\n\t\trepeat_text_month_count2_after: \"μήνα\",\r\n\t\trepeat_year_label: \"Την\",\r\n\t\tselect_year_day2: \"του\",\r\n\t\trepeat_text_year_day: \"ημέρα\",\r\n\t\tselect_year_month: \"μήνα\",\r\n\t\trepeat_radio_end: \"Χωρίς ημερομηνία λήξεως\",\r\n\t\trepeat_text_occurences_count: \"επαναλήψεις\",\r\n\t\trepeat_radio_end3: \"Λήγει την\",\r\n\t\trepeat_radio_end2: \"Μετά από\",\r\n\t\tmonth_for_recurring: [\"Ιανουάριος\", \"Φεβρουάριος\", \"Μάρτιος\", \"Απρίλιος\", \"Μάϊος\", \"Ιούνιος\", \"Ιούλιος\", \"Αύγουστος\", \"Σεπτέμβριος\", \"Οκτώβριος\", \"Νοέμβριος\", \"Δεκέμβριος\"],\r\n\t\tday_for_recurring: [\"Κυριακή\", \"Δευτέρα\", \"Τρίτη\", \"Τετάρτη\", \"Πέμπτη\", \"Παρασκευή\", \"Σάββατο\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate:{\r\n\t\tmonth_full:[\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\r\n\t\tmonth_short:[\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\r\n\t\tday_full:[\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\r\n\t\tday_short:[\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"]\r\n\t},\r\n\tlabels:{\r\n\t\tdhx_cal_today_button:\"Today\",\r\n\t\tday_tab:\"Day\",\r\n\t\tweek_tab:\"Week\",\r\n\t\tmonth_tab:\"Month\",\r\n\t\tnew_event:\"New event\",\r\n\t\ticon_save:\"Save\",\r\n\t\ticon_cancel:\"Cancel\",\r\n\t\ticon_details:\"Details\",\r\n\t\ticon_edit:\"Edit\",\r\n\t\ticon_delete:\"Delete\",\r\n\t\tconfirm_closing:\"\",//Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting:\"Event will be deleted permanently, are you sure?\",\r\n\t\tsection_description:\"Description\",\r\n\t\tsection_time:\"Time period\",\r\n\t\tfull_day:\"Full day\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring:\"Do you want to edit the whole set of repeated events?\",\r\n\t\tsection_recurring:\"Repeat event\",\r\n\t\tbutton_recurring:\"Disabled\",\r\n\t\tbutton_recurring_open:\"Enabled\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Edit occurrence\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"Agenda\",\r\n\t\tdate:\"Date\",\r\n\t\tdescription:\"Description\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"Year\",\r\n\r\n\t\t/* week agenda extension */\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daily\",//name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Weekly\",//name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Monthly\",\r\n\t\trepeat_radio_year: \"Yearly\",\r\n\t\trepeat_radio_day_type: \"Every\",\r\n\t\trepeat_text_day_count: \"day\",\r\n\t\trepeat_radio_day_type2: \"Every workday\",\r\n\t\trepeat_week: \" Repeat every\",\r\n\t\trepeat_text_week_count: \"week next days:\",\r\n\t\trepeat_radio_month_type: \"Repeat\",\r\n\t\trepeat_radio_month_start: \"On\",\r\n\t\trepeat_text_month_day: \"day every\",\r\n\t\trepeat_text_month_count: \"month\",\r\n\t\trepeat_text_month_count2_before: \"every\",\r\n\t\trepeat_text_month_count2_after: \"month\",\r\n\t\trepeat_year_label: \"On\",\r\n\t\tselect_year_day2: \"of\",\r\n\t\trepeat_text_year_day: \"day\",\r\n\t\tselect_year_month: \"month\",\r\n\t\trepeat_radio_end: \"No end date\",\r\n\t\trepeat_text_occurences_count: \"occurrences\",\r\n\t\trepeat_radio_end2: \"After\",\r\n\t\trepeat_radio_end3: \"End by\",\r\n\t\tmonth_for_recurring: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"]//\r\n\t}\r\n};\r\n\r\n","/*\r\n @Autor Manuel Fernandez Panzuela - www.mfernandez.es\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Enero\", \"Febrero\", \"Marzo\", \"Abril\", \"Mayo\", \"Junio\", \"Julio\", \"Agosto\", \"Septiembre\", \"Octubre\", \"Noviembre\", \"Diciembre\"],\r\n\t\tmonth_short: [\"Ene\", \"Feb\", \"Mar\", \"Abr\", \"May\", \"Jun\", \"Jul\", \"Ago\", \"Sep\", \"Oct\", \"Nov\", \"Dic\"],\r\n\t\tday_full: [\"Domingo\", \"Lunes\", \"Martes\", \"Miércoles\", \"Jueves\", \"Viernes\", \"Sábado\"],\r\n\t\tday_short: [\"Dom\", \"Lun\", \"Mar\", \"Mié\", \"Jue\", \"Vie\", \"Sáb\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hoy\",\r\n\t\tday_tab: \"Día\",\r\n\t\tweek_tab: \"Semana\",\r\n\t\tmonth_tab: \"Mes\",\r\n\t\tnew_event: \"Nuevo evento\",\r\n\t\ticon_save: \"Guardar\",\r\n\t\ticon_cancel: \"Cancelar\",\r\n\t\ticon_details: \"Detalles\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Eliminar\",\r\n\t\tconfirm_closing: \"\", //\"Sus cambios se perderán, continuar ?\"\r\n\t\tconfirm_deleting: \"El evento se borrará definitivamente, ¿continuar?\",\r\n\t\tsection_description: \"Descripción\",\r\n\t\tsection_time: \"Período\",\r\n\t\tfull_day: \"Todo el día\",\r\n\r\n\t\tconfirm_recurring: \"¿Desea modificar el conjunto de eventos repetidos?\",\r\n\t\tsection_recurring: \"Repita el evento\",\r\n\t\tbutton_recurring: \"Impedido\",\r\n\t\tbutton_recurring_open: \"Permitido\",\r\n\t\tbutton_edit_series: \"Editar la serie\",\r\n\t\tbutton_edit_occurrence: \"Editar este evento\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Día\",\r\n\t\tdate: \"Fecha\",\r\n\t\tdescription: \"Descripción\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Año\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Día\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Reja\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Diariamente\",\r\n\t\trepeat_radio_week: \"Semanalmente\",\r\n\t\trepeat_radio_month: \"Mensualmente\",\r\n\t\trepeat_radio_year: \"Anualmente\",\r\n\t\trepeat_radio_day_type: \"Cada\",\r\n\t\trepeat_text_day_count: \"dia\",\r\n\t\trepeat_radio_day_type2: \"Cada jornada de trabajo\",\r\n\t\trepeat_week: \" Repetir cada\",\r\n\t\trepeat_text_week_count: \"semana:\",\r\n\t\trepeat_radio_month_type: \"Repita\",\r\n\t\trepeat_radio_month_start: \"El\",\r\n\t\trepeat_text_month_day: \"dia cada \",\r\n\t\trepeat_text_month_count: \"mes\",\r\n\t\trepeat_text_month_count2_before: \"cada\",\r\n\t\trepeat_text_month_count2_after: \"mes\",\r\n\t\trepeat_year_label: \"El\",\r\n\t\tselect_year_day2: \"del\",\r\n\t\trepeat_text_year_day: \"dia\",\r\n\t\tselect_year_month: \"mes\",\r\n\t\trepeat_radio_end: \"Sin fecha de finalización\",\r\n\t\trepeat_text_occurences_count: \"ocurrencias\",\r\n\t\trepeat_radio_end3: \"Fin\",\r\n\t\trepeat_radio_end2: \"Después de\",\r\n\t\tmonth_for_recurring: [\"Enero\", \"Febrero\", \"Маrzo\", \"Аbril\", \"Mayo\", \"Junio\", \"Julio\", \"Аgosto\", \"Setiembre\", \"Octubre\", \"Noviembre\", \"Diciembre\"],\r\n\t\tday_for_recurring: [\"Domingo\", \"Lunes\", \"Martes\", \"Miércoles\", \"Jeuves\", \"Viernes\", \"Sabado\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Tammikuu\", \"Helmikuu\", \"Maaliskuu\", \"Huhtikuu\", \"Toukokuu\", \"Kesäkuu\", \"Heinäkuu\", \"Elokuu\", \"Syyskuu\", \"Lokakuu\", \"Marraskuu\", \"Joulukuu\"],\r\n\t\tmonth_short: [\"Tam\", \"Hel\", \"Maa\", \"Huh\", \"Tou\", \"Kes\", \"Hei\", \"Elo\", \"Syy\", \"Lok\", \"Mar\", \"Jou\"],\r\n\t\tday_full: [\"Sunnuntai\", \"Maanantai\", \"Tiistai\", \"Keskiviikko\", \"Torstai\", \"Perjantai\", \"Lauantai\"],\r\n\t\tday_short: [\"Su\", \"Ma\", \"Ti\", \"Ke\", \"To\", \"Pe\", \"La\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Tänään\",\r\n\t\tday_tab: \"Päivä\",\r\n\t\tweek_tab: \"Viikko\",\r\n\t\tmonth_tab: \"Kuukausi\",\r\n\t\tnew_event: \"Uusi tapahtuma\",\r\n\t\ticon_save: \"Tallenna\",\r\n\t\ticon_cancel: \"Peru\",\r\n\t\ticon_details: \"Tiedot\",\r\n\t\ticon_edit: \"Muokkaa\",\r\n\t\ticon_delete: \"Poista\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Haluatko varmasti poistaa tapahtuman?\",\r\n\t\tsection_description: \"Kuvaus\",\r\n\t\tsection_time: \"Aikajakso\",\r\n\t\tfull_day: \"Koko päivä\",\r\n\r\n\t\tconfirm_recurring: \"Haluatko varmasti muokata toistuvan tapahtuman kaikkia jaksoja?\",\r\n\t\tsection_recurring: \"Toista tapahtuma\",\r\n\t\tbutton_recurring: \"Ei käytössä\",\r\n\t\tbutton_recurring_open: \"Käytössä\",\r\n\t\tbutton_edit_series: \"Muokkaa sarja\",\r\n\t\tbutton_edit_occurrence: \"Muokkaa kopio\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Esityslista\",\r\n\t\tdate: \"Päivämäärä\",\r\n\t\tdescription: \"Kuvaus\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Vuoden\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Esityslista\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Ritilä\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Luo uusi vetämällä\",\r\n\t\tdrag_to_move:\"Siirrä vetämällä\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Päivittäin\",\r\n\t\trepeat_radio_week: \"Viikoittain\",\r\n\t\trepeat_radio_month: \"Kuukausittain\",\r\n\t\trepeat_radio_year: \"Vuosittain\",\r\n\t\trepeat_radio_day_type: \"Joka\",\r\n\t\trepeat_text_day_count: \"päivä\",\r\n\t\trepeat_radio_day_type2: \"Joka arkipäivä\",\r\n\t\trepeat_week: \"Toista joka\",\r\n\t\trepeat_text_week_count: \"viikko näinä päivinä:\",\r\n\t\trepeat_radio_month_type: \"Toista\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \"päivänä joka\",\r\n\t\trepeat_text_month_count: \"kuukausi\",\r\n\t\trepeat_text_month_count2_before: \"joka\",\r\n\t\trepeat_text_month_count2_after: \"kuukausi\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"päivä\",\r\n\t\tselect_year_month: \"kuukausi\",\r\n\t\trepeat_radio_end: \"Ei loppumisaikaa\",\r\n\t\trepeat_text_occurences_count: \"Toiston jälkeen\",\r\n\t\trepeat_radio_end3: \"Loppuu\",\r\n\t\trepeat_radio_end2: \"\",\r\n\t\tmonth_for_recurring: [\"Tammikuu\", \"Helmikuu\", \"Maaliskuu\", \"Huhtikuu\", \"Toukokuu\", \"Kesäkuu\", \"Heinäkuu\", \"Elokuu\", \"Syyskuu\", \"Lokakuu\", \"Marraskuu\", \"Joulukuu\"],\r\n\t\tday_for_recurring: [\"Sunnuntai\", \"Maanantai\", \"Tiistai\", \"Keskiviikko\", \"Torstai\", \"Perjantai\", \"Lauantai\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Janvier\", \"Février\", \"Mars\", \"Avril\", \"Mai\", \"Juin\", \"Juillet\", \"Août\", \"Septembre\", \"Octobre\", \"Novembre\", \"Décembre\"],\r\n\t\tmonth_short: [\"Jan\", \"Fév\", \"Mar\", \"Avr\", \"Mai\", \"Juin\", \"Juil\", \"Aoû\", \"Sep\", \"Oct\", \"Nov\", \"Déc\"],\r\n\t\tday_full: [\"Dimanche\", \"Lundi\", \"Mardi\", \"Mercredi\", \"Jeudi\", \"Vendredi\", \"Samedi\"],\r\n\t\tday_short: [\"Dim\", \"Lun\", \"Mar\", \"Mer\", \"Jeu\", \"Ven\", \"Sam\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Aujourd'hui\",\r\n\t\tday_tab: \"Jour\",\r\n\t\tweek_tab: \"Semaine\",\r\n\t\tmonth_tab: \"Mois\",\r\n\t\tnew_event: \"Nouvel événement\",\r\n\t\ticon_save: \"Enregistrer\",\r\n\t\ticon_cancel: \"Annuler\",\r\n\t\ticon_details: \"Détails\",\r\n\t\ticon_edit: \"Modifier\",\r\n\t\ticon_delete: \"Effacer\",\r\n\t\tconfirm_closing: \"\", //Vos modifications seront perdus, êtes-vous sûr ?\r\n\t\tconfirm_deleting: \"L'événement sera effacé sans appel, êtes-vous sûr ?\",\r\n\t\tsection_description: \"Description\",\r\n\t\tsection_time: \"Période\",\r\n\t\tfull_day: \"Journée complète\",\r\n\r\n\t\tconfirm_recurring: \"Voulez-vous éditer toute une série d'évènements répétés?\",\r\n\t\tsection_recurring: \"Périodicité\",\r\n\t\tbutton_recurring: \"Désactivé\",\r\n\t\tbutton_recurring_open: \"Activé\",\r\n\t\tbutton_edit_series: \"Modifier la série\",\r\n\t\tbutton_edit_occurrence: \"Modifier une copie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Jour\",\r\n\t\tdate: \"Date\",\r\n\t\tdescription: \"Description\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Année\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Jour\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grille\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Quotidienne\",\r\n\t\trepeat_radio_week: \"Hebdomadaire\",\r\n\t\trepeat_radio_month: \"Mensuelle\",\r\n\t\trepeat_radio_year: \"Annuelle\",\r\n\t\trepeat_radio_day_type: \"Chaque\",\r\n\t\trepeat_text_day_count: \"jour\",\r\n\t\trepeat_radio_day_type2: \"Chaque journée de travail\",\r\n\t\trepeat_week: \" Répéter toutes les\",\r\n\t\trepeat_text_week_count: \"semaine:\",\r\n\t\trepeat_radio_month_type: \"Répéter\",\r\n\t\trepeat_radio_month_start: \"Le\",\r\n\t\trepeat_text_month_day: \"jour chaque\",\r\n\t\trepeat_text_month_count: \"mois\",\r\n\t\trepeat_text_month_count2_before: \"chaque\",\r\n\t\trepeat_text_month_count2_after: \"mois\",\r\n\t\trepeat_year_label: \"Le\",\r\n\t\tselect_year_day2: \"du\",\r\n\t\trepeat_text_year_day: \"jour\",\r\n\t\tselect_year_month: \"mois\",\r\n\t\trepeat_radio_end: \"Pas de date d"achèvement\",\r\n\t\trepeat_text_occurences_count: \"occurrences\",\r\n\t\trepeat_radio_end3: \"Fin\",\r\n\t\trepeat_radio_end2: \"Après\",\r\n\t\tmonth_for_recurring: [\"Janvier\", \"Février\", \"Mars\", \"Avril\", \"Mai\", \"Juin\", \"Juillet\", \"Août\", \"Septembre\", \"Octobre\", \"Novembre\", \"Décembre\"],\r\n\t\tday_for_recurring: [\"Dimanche\", \"Lundi\", \"Mardi\", \"Mercredi\", \"Jeudi\", \"Vendredi\", \"Samedi\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"ינואר\", \"פברואר\", \"מרץ\", \"אפריל\", \"מאי\", \"יוני\", \"יולי\", \"אוגוסט\", \"ספטמבר\", \"אוקטובר\", \"נובמבר\", \"דצמבר\"],\r\n\t\tmonth_short: [\"ינו\", \"פבר\", \"מרץ\", \"אפר\", \"מאי\", \"יונ\", \"יול\", \"אוג\", \"ספט\", \"אוק\", \"נוב\", \"דצמ\"],\r\n\t\tday_full: [\"ראשון\", \"שני\", \"שלישי\", \"רביעי\", \"חמישי\", \"שישי\", \"שבת\"],\r\n\t\tday_short: [\"א\", \"ב\", \"ג\", \"ד\", \"ה\", \"ו\", \"ש\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"היום\",\r\n\t\tday_tab: \"יום\",\r\n\t\tweek_tab: \"שבוע\",\r\n\t\tmonth_tab: \"חודש\",\r\n\t\tnew_event: \"ארוע חדש\",\r\n\t\ticon_save: \"שמור\",\r\n\t\ticon_cancel: \"בטל\",\r\n\t\ticon_details: \"פרטים\",\r\n\t\ticon_edit: \"ערוך\",\r\n\t\ticon_delete: \"מחק\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"ארוע ימחק סופית.להמשיך?\",\r\n\t\tsection_description: \"תיאור\",\r\n\t\tsection_time: \"תקופה\",\r\n\r\n\t\tconfirm_recurring: \"האם ברצונך לשנות כל סדרת ארועים מתמשכים?\",\r\n\t\tsection_recurring: \"להעתיק ארוע\",\r\n\t\tbutton_recurring: \"לא פעיל\",\r\n\t\tbutton_recurring_open: \"פעיל\",\r\n\t\tfull_day: \"יום שלם\",\r\n\t\tbutton_edit_series: \"ערוך את הסדרה\",\r\n\t\tbutton_edit_occurrence: \"עריכת עותק\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"סדר יום\",\r\n\t\tdate: \"תאריך\",\r\n\t\tdescription: \"תיאור\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"לשנה\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"סדר יום\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"סורג\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"גרור כדי להזיז\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"בטל\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"הבא\",\r\n\t\tprev: \"הקודם\",\r\n\t\tyear: \"שנה\",\r\n\t\tmonth: \"חודש\",\r\n\t\tday: \"יום\",\r\n\t\thour:\"שעה\",\r\n\t\tminute: \"דקה\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"יומי\",\r\n\t\trepeat_radio_week: \"שבועי\",\r\n\t\trepeat_radio_month: \"חודשי\",\r\n\t\trepeat_radio_year: \"שנתי\",\r\n\t\trepeat_radio_day_type: \"חזור כל\",\r\n\t\trepeat_text_day_count: \"ימים\",\r\n\t\trepeat_radio_day_type2: \"חזור כל יום עבודה\",\r\n\t\trepeat_week: \" חזור כל\",\r\n\t\trepeat_text_week_count: \"שבוע לפי ימים:\",\r\n\t\trepeat_radio_month_type: \"חזור כל\",\r\n\t\trepeat_radio_month_start: \"כל\",\r\n\t\trepeat_text_month_day: \"ימים כל\",\r\n\t\trepeat_text_month_count: \"חודשים\",\r\n\t\trepeat_text_month_count2_before: \"חזור כל\",\r\n\t\trepeat_text_month_count2_after: \"חודש\",\r\n\t\trepeat_year_label: \"כל\",\r\n\t\tselect_year_day2: \"בחודש\",\r\n\t\trepeat_text_year_day: \"ימים\",\r\n\t\tselect_year_month: \"חודש\",\r\n\t\trepeat_radio_end: \"לעולם לא מסתיים\",\r\n\t\trepeat_text_occurences_count: \"אירועים\",\r\n\t\trepeat_radio_end3: \"מסתיים ב\",\r\n\t\trepeat_radio_end2: \"אחרי\",\r\n\t\tmonth_for_recurring: [\"ינואר\", \"פברואר\", \"מרץ\", \"אפריל\", \"מאי\", \"יוני\", \"יולי\", \"אוגוסט\", \"ספטמבר\", \"אוקטובר\", \"נובמבר\", \"דצמבר\"],\r\n\t\tday_for_recurring: [\"ראשון\", \"שני\", \"שלישי\", \"רביעי\", \"חמישי\", \"שישי\", \"שבת\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Január\", \"Február\", \"Március\", \"Április\", \"Május\", \"Június\", \"Július\", \"Augusztus\", \"Szeptember\", \"Október\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Már\", \"Ápr\", \"Máj\", \"Jún\", \"Júl\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Vasárnap\", \"Hétfõ\", \"Kedd\", \"Szerda\", \"Csütörtök\", \"Péntek\", \"szombat\"],\r\n\t\tday_short: [\"Va\", \"Hé\", \"Ke\", \"Sze\", \"Csü\", \"Pé\", \"Szo\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Ma\",\r\n\t\tday_tab: \"Nap\",\r\n\t\tweek_tab: \"Hét\",\r\n\t\tmonth_tab: \"Hónap\",\r\n\t\tnew_event: \"Új esemény\",\r\n\t\ticon_save: \"Mentés\",\r\n\t\ticon_cancel: \"Mégse\",\r\n\t\ticon_details: \"Részletek\",\r\n\t\ticon_edit: \"Szerkesztés\",\r\n\t\ticon_delete: \"Törlés\",\r\n\t\tconfirm_closing: \"\", //A változások elvesznek, biztosan folytatja? \"\r\n\t\tconfirm_deleting: \"Az esemény törölve lesz, biztosan folytatja?\",\r\n\t\tsection_description: \"Leírás\",\r\n\t\tsection_time: \"Idõszak\",\r\n\t\tfull_day: \"Egesz napos\",\r\n\r\n\t\t/*ismétlõdõ események*/\r\n\t\tconfirm_recurring: \"Biztosan szerkeszteni akarod az összes ismétlõdõ esemény beállítását?\",\r\n\t\tsection_recurring: \"Esemény ismétlése\",\r\n\t\tbutton_recurring: \"Tiltás\",\r\n\t\tbutton_recurring_open: \"Engedélyezés\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Szerkesztés bíróság\",\r\n\r\n\t\t/*napirendi nézet*/\r\n\t\tagenda_tab: \"Napirend\",\r\n\t\tdate: \"Dátum\",\r\n\t\tdescription: \"Leírás\",\r\n\r\n\t\t/*éves nézet*/\r\n\t\tyear_tab: \"Év\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Maret\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Agustus\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mei\", \"Jun\", \"Jul\", \"Ags\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Minggu\", \"Senin\", \"Selasa\", \"Rabu\", \"Kamis\", \"Jumat\", \"Sabtu\"],\r\n\t\tday_short: [\"Ming\", \"Sen\", \"Sel\", \"Rab\", \"Kam\", \"Jum\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hari Ini\",\r\n\t\tday_tab: \"Hari\",\r\n\t\tweek_tab: \"Minggu\",\r\n\t\tmonth_tab: \"Bulan\",\r\n\t\tnew_event: \"Acara Baru\",\r\n\t\ticon_save: \"Simpan\",\r\n\t\ticon_cancel: \"Batal\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edit\",\r\n\t\ticon_delete: \"Hapus\",\r\n\t\tconfirm_closing: \"\", /*Perubahan tidak akan disimpan ?*/\r\n\t\tconfirm_deleting: \"Acara akan dihapus\",\r\n\t\tsection_description: \"Keterangan\",\r\n\t\tsection_time: \"Periode\",\r\n\t\tfull_day: \"Hari penuh\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Apakah acara ini akan berulang?\",\r\n\t\tsection_recurring: \"Acara Rutin\",\r\n\t\tbutton_recurring: \"Tidak Difungsikan\",\r\n\t\tbutton_recurring_open: \"Difungsikan\",\r\n\t\tbutton_edit_series: \"Mengedit seri\",\r\n\t\tbutton_edit_occurrence: \"Mengedit salinan\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Tanggal\",\r\n\t\tdescription: \"Keterangan\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Tahun\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabel\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Gennaio\", \"Febbraio\", \"Marzo\", \"Aprile\", \"Maggio\", \"Giugno\", \"Luglio\", \"Agosto\", \"Settembre\", \"Ottobre\", \"Novembre\", \"Dicembre\"],\r\n\t\tmonth_short: [\"Gen\", \"Feb\", \"Mar\", \"Apr\", \"Mag\", \"Giu\", \"Lug\", \"Ago\", \"Set\", \"Ott\", \"Nov\", \"Dic\"],\r\n\t\tday_full: [\"Domenica\", \"Lunedì\", \"Martedì\", \"Mercoledì\", \"Giovedì\", \"Venerdì\", \"Sabato\"],\r\n\t\tday_short: [\"Dom\", \"Lun\", \"Mar\", \"Mer\", \"Gio\", \"Ven\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Oggi\",\r\n\t\tday_tab: \"Giorno\",\r\n\t\tweek_tab: \"Settimana\",\r\n\t\tmonth_tab: \"Mese\",\r\n\t\tnew_event: \"Nuovo evento\",\r\n\t\ticon_save: \"Salva\",\r\n\t\ticon_cancel: \"Chiudi\",\r\n\t\ticon_details: \"Dettagli\",\r\n\t\ticon_edit: \"Modifica\",\r\n\t\ticon_delete: \"Elimina\",\r\n\t\tconfirm_closing: \"\", //Le modifiche apportate saranno perse, siete sicuri?\r\n\t\tconfirm_deleting: \"L'evento sarà eliminato, siete sicuri?\",\r\n\t\tsection_description: \"Descrizione\",\r\n\t\tsection_time: \"Periodo di tempo\",\r\n\t\tfull_day: \"Intera giornata\",\r\n\r\n\t\tconfirm_recurring: \"Vuoi modificare l'intera serie di eventi?\",\r\n\t\tsection_recurring: \"Ripetere l'evento\",\r\n\t\tbutton_recurring: \"Disattivato\",\r\n\t\tbutton_recurring_open: \"Attivato\",\r\n\t\tbutton_edit_series: \"Modificare la serie\",\r\n\t\tbutton_edit_occurrence: \"Modificare una copia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descrizione\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Anno\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Griglia\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Quotidiano\",\r\n\t\trepeat_radio_week: \"Settimanale\",\r\n\t\trepeat_radio_month: \"Mensile\",\r\n\t\trepeat_radio_year: \"Annuale\",\r\n\t\trepeat_radio_day_type: \"Ogni\",\r\n\t\trepeat_text_day_count: \"giorno\",\r\n\t\trepeat_radio_day_type2: \"Ogni giornata lavorativa\",\r\n\t\trepeat_week: \" Ripetere ogni\",\r\n\t\trepeat_text_week_count: \"settimana:\",\r\n\t\trepeat_radio_month_type: \"Ripetere\",\r\n\t\trepeat_radio_month_start: \"Il\",\r\n\t\trepeat_text_month_day: \"giorno ogni\",\r\n\t\trepeat_text_month_count: \"mese\",\r\n\t\trepeat_text_month_count2_before: \"ogni\",\r\n\t\trepeat_text_month_count2_after: \"mese\",\r\n\t\trepeat_year_label: \"Il\",\r\n\t\tselect_year_day2: \"del\",\r\n\t\trepeat_text_year_day: \"giorno\",\r\n\t\tselect_year_month: \"mese\",\r\n\t\trepeat_radio_end: \"Senza data finale\",\r\n\t\trepeat_text_occurences_count: \"occorenze\",\r\n\t\trepeat_radio_end3: \"Fine\",\r\n\t\trepeat_radio_end2: \"Dopo\",\r\n\t\tmonth_for_recurring: [\"Gennaio\", \"Febbraio\", \"Marzo\", \"Aprile\", \"Maggio\", \"Jiugno\", \"Luglio\", \"Agosto\", \"Settembre\", \"Ottobre\", \"Novembre\", \"Dicembre\"],\r\n\t\tday_for_recurring: [\"Domenica\", \"Lunedì\", \"Martedì\", \"Mercoledì\", \"Jovedì\", \"Venerdì\", \"Sabato\"]\r\n\t}\r\n};\r\n","/*\r\n Translation by Genexus Japan Inc.\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tmonth_short: [ \"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tday_full: [\"日曜日\", \"月曜日\", \"火曜日\", \"水曜日\", \"木曜日\", \"金曜日\", \"土曜日\"],\r\n\t\tday_short: [\"日\", \"月\", \"火\", \"水\", \"木\", \"金\", \"土\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"今日\",\r\n\t\tday_tab: \"日\",\r\n\t\tweek_tab: \"週\",\r\n\t\tmonth_tab: \"月\",\r\n\t\tnew_event: \"新イベント\",\r\n\t\ticon_save: \"保存\",\r\n\t\ticon_cancel: \"キャンセル\",\r\n\t\ticon_details: \"詳細\",\r\n\t\ticon_edit: \"編集\",\r\n\t\ticon_delete: \"削除\",\r\n\t\tconfirm_closing: \"\", //変更が取り消されます、宜しいですか?\r\n\t\tconfirm_deleting: \"イベント完全に削除されます、宜しいですか?\",\r\n\t\tsection_description: \"デスクリプション\",\r\n\t\tsection_time: \"期間\",\r\n\t\tconfirm_recurring: \"繰り返されているイベントを全て編集しますか?\",\r\n\t\tsection_recurring: \"イベントを繰り返す\",\r\n\t\tbutton_recurring: \"無効\",\r\n\t\tbutton_recurring_open: \"有効\",\r\n\t\tfull_day: \"終日\",\r\n\t\tbutton_edit_series: \"シリーズを編集します\",\r\n\t\tbutton_edit_occurrence: \"コピーを編集\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"議題は\",\r\n\t\tdate: \"日付\",\r\n\t\tdescription: \"説明\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"今年\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"議題は\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"グリッド\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};\r\n\r\n\r\n","export default class LocaleManager{\r\n\tconstructor(config){\r\n\t\tthis._locales = {};\r\n\t\tfor(const i in config){\r\n\t\t\tthis._locales[i] = config[i];\r\n\t\t}\r\n\t}\r\n\r\n\taddLocale(name, locale) {\r\n\t\tthis._locales[name] = locale;\r\n\t}\r\n\r\n\tgetLocale(name) {\r\n\t\treturn this._locales[name];\r\n\t}\r\n}","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Mon\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"I dag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uke\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny hendelse\",\r\n\t\ticon_save: \"Lagre\",\r\n\t\ticon_cancel: \"Avbryt\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Rediger\",\r\n\t\ticon_delete: \"Slett\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Hendelsen vil bli slettet permanent. Er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du forandre hele dette settet av repeterende hendelser?\",\r\n\t\tsection_recurring: \"Repeter hendelsen\",\r\n\t\tbutton_recurring: \"Av\",\r\n\t\tbutton_recurring_open: \"På\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Redigere en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daglig\",\r\n\t\trepeat_radio_week: \"Ukentlig\",\r\n\t\trepeat_radio_month: \"Månedlig\",\r\n\t\trepeat_radio_year: \"Årlig\",\r\n\t\trepeat_radio_day_type: \"Hver\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"Alle hverdager\",\r\n\t\trepeat_week: \" Gjentas hver\",\r\n\t\trepeat_text_week_count: \"uke på:\",\r\n\t\trepeat_radio_month_type: \"På hver\",\r\n\t\trepeat_radio_month_start: \"På\",\r\n\t\trepeat_text_month_day: \"dag hver\",\r\n\t\trepeat_text_month_count: \"måned\",\r\n\t\trepeat_text_month_count2_before: \"hver\",\r\n\t\trepeat_text_month_count2_after: \"måned\",\r\n\t\trepeat_year_label: \"på\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Ingen sluttdato\",\r\n\t\trepeat_text_occurences_count: \"forekomst\",\r\n\t\trepeat_radio_end3: \"Stop den\",\r\n\t\trepeat_radio_end2: \"Etter\",\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tday_for_recurring: [\"Sondag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Maart\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Augustus\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"mrt\", \"Apr\", \"Mei\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Zondag\", \"Maandag\", \"Dinsdag\", \"Woensdag\", \"Donderdag\", \"Vrijdag\", \"Zaterdag\"],\r\n\t\tday_short: [\"Zo\", \"Ma\", \"Di\", \"Wo\", \"Do\", \"Vr\", \"Za\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Vandaag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Week\",\r\n\t\tmonth_tab: \"Maand\",\r\n\t\tnew_event: \"Nieuw item\",\r\n\t\ticon_save: \"Opslaan\",\r\n\t\ticon_cancel: \"Annuleren\",\r\n\t\ticon_details: \"Details\",\r\n\t\ticon_edit: \"Bewerken\",\r\n\t\ticon_delete: \"Verwijderen\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Item zal permanent worden verwijderd, doorgaan?\",\r\n\t\tsection_description: \"Beschrijving\",\r\n\t\tsection_time: \"Tijd periode\",\r\n\t\tfull_day: \"Hele dag\",\r\n\r\n\t\tconfirm_recurring: \"Wilt u alle terugkerende items bijwerken?\",\r\n\t\tsection_recurring: \"Item herhalen\",\r\n\t\tbutton_recurring: \"Uit\",\r\n\t\tbutton_recurring_open: \"Aan\",\r\n\t\tbutton_edit_series: \"Bewerk de serie\",\r\n\t\tbutton_edit_occurrence: \"Bewerk een kopie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Omschrijving\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Jaar\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabel\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Dagelijks\",\r\n\t\trepeat_radio_week: \"Wekelijks\",\r\n\t\trepeat_radio_month: \"Maandelijks\",\r\n\t\trepeat_radio_year: \"Jaarlijks\",\r\n\t\trepeat_radio_day_type: \"Elke\",\r\n\t\trepeat_text_day_count: \"dag(en)\",\r\n\t\trepeat_radio_day_type2: \"Elke werkdag\",\r\n\t\trepeat_week: \" Herhaal elke\",\r\n\t\trepeat_text_week_count: \"week op de volgende dagen:\",\r\n\t\trepeat_radio_month_type: \"Herhaal\",\r\n\t\trepeat_radio_month_start: \"Op\",\r\n\t\trepeat_text_month_day: \"dag iedere\",\r\n\t\trepeat_text_month_count: \"maanden\",\r\n\t\trepeat_text_month_count2_before: \"iedere\",\r\n\t\trepeat_text_month_count2_after: \"maanden\",\r\n\t\trepeat_year_label: \"Op\",\r\n\t\tselect_year_day2: \"van\",\r\n\t\trepeat_text_year_day: \"dag\",\r\n\t\tselect_year_month: \"maand\",\r\n\t\trepeat_radio_end: \"Geen eind datum\",\r\n\t\trepeat_text_occurences_count: \"keren\",\r\n\t\trepeat_radio_end3: \"Eindigd per\",\r\n\t\trepeat_radio_end2: \"Na\",\r\n\t\tmonth_for_recurring: [\"Januari\", \"Februari\", \"Maart\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Augustus\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Zondag\", \"Maandag\", \"Dinsdag\", \"Woensdag\", \"Donderdag\", \"Vrijdag\", \"Zaterdag\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Man\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uke\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny\",\r\n\t\ticon_save: \"Lagre\",\r\n\t\ticon_cancel: \"Avbryt\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Endre\",\r\n\t\ticon_delete: \"Slett\",\r\n\t\tconfirm_closing: \"Endringer blir ikke lagret, er du sikker?\", //Endringer blir ikke lagret, er du sikker?\r\n\t\tconfirm_deleting: \"Oppføringen vil bli slettet, er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\t\tfull_day: \"Full dag\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du endre hele settet med repeterende oppføringer?\",\r\n\t\tsection_recurring: \"Repeterende oppføring\",\r\n\t\tbutton_recurring: \"Ikke aktiv\",\r\n\t\tbutton_recurring_open: \"Aktiv\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Redigere en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Styczeń\", \"Luty\", \"Marzec\", \"Kwiecień\", \"Maj\", \"Czerwiec\", \"Lipiec\", \"Sierpień\", \"Wrzesień\", \"Październik\", \"Listopad\", \"Grudzień\"],\r\n\t\tmonth_short: [\"Sty\", \"Lut\", \"Mar\", \"Kwi\", \"Maj\", \"Cze\", \"Lip\", \"Sie\", \"Wrz\", \"Paź\", \"Lis\", \"Gru\"],\r\n\t\tday_full: [\"Niedziela\", \"Poniedziałek\", \"Wtorek\", \"Środa\", \"Czwartek\", \"Piątek\", \"Sobota\"],\r\n\t\tday_short: [\"Nie\", \"Pon\", \"Wto\", \"Śro\", \"Czw\", \"Pią\", \"Sob\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dziś\",\r\n\t\tday_tab: \"Dzień\",\r\n\t\tweek_tab: \"Tydzień\",\r\n\t\tmonth_tab: \"Miesiąc\",\r\n\t\tnew_event: \"Nowe zdarzenie\",\r\n\t\ticon_save: \"Zapisz\",\r\n\t\ticon_cancel: \"Anuluj\",\r\n\t\ticon_details: \"Szczegóły\",\r\n\t\ticon_edit: \"Edytuj\",\r\n\t\ticon_delete: \"Usuń\",\r\n\t\tconfirm_closing: \"\", //Zmiany zostaną usunięte, jesteś pewien?\r\n\t\tconfirm_deleting: \"Zdarzenie zostanie usunięte na zawsze, kontynuować?\",\r\n\t\tsection_description: \"Opis\",\r\n\t\tsection_time: \"Okres czasu\",\r\n\t\tfull_day: \"Cały dzień\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Czy chcesz edytować cały zbiór powtarzających się zdarzeń?\",\r\n\t\tsection_recurring: \"Powtórz zdarzenie\",\r\n\t\tbutton_recurring: \"Nieaktywne\",\r\n\t\tbutton_recurring_open: \"Aktywne\",\r\n\t\tbutton_edit_series: \"Edytuj serię\",\r\n\t\tbutton_edit_occurrence: \"Edytuj kopię\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Opis\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabela\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Codziennie\",\r\n\t\trepeat_radio_week: \"Co tydzie\",\r\n\t\trepeat_radio_month: \"Co miesic\",\r\n\t\trepeat_radio_year: \"Co rok\",\r\n\t\trepeat_radio_day_type: \"Kadego\",\r\n\t\trepeat_text_day_count: \"dnia\",\r\n\t\trepeat_radio_day_type2: \"Kadego dnia roboczego\",\r\n\t\trepeat_week: \" Powtarzaj kadego\",\r\n\t\trepeat_text_week_count: \"tygodnia w dni:\",\r\n\t\trepeat_radio_month_type: \"Powtrz\",\r\n\t\trepeat_radio_month_start: \"W\",\r\n\t\trepeat_text_month_day: \"dnia kadego\",\r\n\t\trepeat_text_month_count: \"miesica\",\r\n\t\trepeat_text_month_count2_before: \"kadego\",\r\n\t\trepeat_text_month_count2_after: \"miesica\",\r\n\t\trepeat_year_label: \"W\",\r\n\t\tselect_year_day2: \"miesica\",\r\n\t\trepeat_text_year_day: \"dnia miesica\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Bez daty kocowej\",\r\n\t\trepeat_text_occurences_count: \"wystpieniu/ach\",\r\n\t\trepeat_radio_end3: \"Zakocz w\",\r\n\t\trepeat_radio_end2: \"Po\",\r\n\t\tmonth_for_recurring: [\"Stycznia\", \"Lutego\", \"Marca\", \"Kwietnia\", \"Maja\", \"Czerwca\", \"Lipca\", \"Sierpnia\", \"Wrzenia\", \"Padziernka\", \"Listopada\", \"Grudnia\"],\r\n\t\tday_for_recurring: [\"Niedziela\", \"Poniedziaek\", \"Wtorek\", \"roda\", \"Czwartek\", \"Pitek\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","/*\r\n\r\n TRANSLATION BY MATTHEUS PIROVANI RORIZ GONЗALVES\r\n\r\n mattheusroriz@hotmail.com / mattheus.pirovani@gmail.com /\r\n\r\n www.atrixian.com.br\r\n\r\n */\r\n\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Janeiro\", \"Fevereiro\", \"Março\", \"Abril\", \"Maio\", \"Junho\", \"Julho\", \"Agosto\", \"Setembro\", \"Outubro\", \"Novembro\", \"Dezembro\"],\r\n\t\tmonth_short: [\"Jan\", \"Fev\", \"Mar\", \"Abr\", \"Mai\", \"Jun\", \"Jul\", \"Ago\", \"Set\", \"Out\", \"Nov\", \"Dez\"],\r\n\t\tday_full: [\"Domingo\", \"Segunda\", \"Terça\", \"Quarta\", \"Quinta\", \"Sexta\", \"Sábado\"],\r\n\t\tday_short: [\"Dom\", \"Seg\", \"Ter\", \"Qua\", \"Qui\", \"Sex\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hoje\",\r\n\t\tday_tab: \"Dia\",\r\n\t\tweek_tab: \"Semana\",\r\n\t\tmonth_tab: \"Mês\",\r\n\t\tnew_event: \"Novo evento\",\r\n\t\ticon_save: \"Salvar\",\r\n\t\ticon_cancel: \"Cancelar\",\r\n\t\ticon_details: \"Detalhes\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Deletar\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Tem certeza que deseja excluir?\",\r\n\t\tsection_description: \"Descrição\",\r\n\t\tsection_time: \"Período de tempo\",\r\n\t\tfull_day: \"Dia inteiro\",\r\n\r\n\t\tconfirm_recurring: \"Deseja editar todos esses eventos repetidos?\",\r\n\t\tsection_recurring: \"Repetir evento\",\r\n\t\tbutton_recurring: \"Desabilitar\",\r\n\t\tbutton_recurring_open: \"Habilitar\",\r\n\t\tbutton_edit_series: \"Editar a série\",\r\n\t\tbutton_edit_occurrence: \"Editar uma cópia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dia\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descrição\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Ano\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dia\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grade\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Diário\",\r\n\t\trepeat_radio_week: \"Semanal\",\r\n\t\trepeat_radio_month: \"Mensal\",\r\n\t\trepeat_radio_year: \"Anual\",\r\n\t\trepeat_radio_day_type: \"Cada\",\r\n\t\trepeat_text_day_count: \"dia(s)\",\r\n\t\trepeat_radio_day_type2: \"Cada trabalho diário\",\r\n\t\trepeat_week: \" Repita cada\",\r\n\t\trepeat_text_week_count: \"semana:\",\r\n\t\trepeat_radio_month_type: \"Repetir\",\r\n\t\trepeat_radio_month_start: \"Em\",\r\n\t\trepeat_text_month_day: \"todo dia\",\r\n\t\trepeat_text_month_count: \"mês\",\r\n\t\trepeat_text_month_count2_before: \"todo\",\r\n\t\trepeat_text_month_count2_after: \"mês\",\r\n\t\trepeat_year_label: \"Em\",\r\n\t\tselect_year_day2: \"of\",\r\n\t\trepeat_text_year_day: \"dia\",\r\n\t\tselect_year_month: \"mês\",\r\n\t\trepeat_radio_end: \"Sem data final\",\r\n\t\trepeat_text_occurences_count: \"ocorrências\",\r\n\t\trepeat_radio_end3: \"Fim\",\r\n\t\trepeat_radio_end2: \"Depois\",\r\n\t\tmonth_for_recurring: [\"Janeiro\", \"Fevereiro\", \"Março\", \"Abril\", \"Maio\", \"Junho\", \"Julho\", \"Agosto\", \"Setembro\", \"Outubro\", \"Novembro\", \"Dezembro\"],\r\n\t\tday_for_recurring: [\"Domingo\", \"Segunda\", \"Terça\", \"Quarta\", \"Quinta\", \"Sexta\", \"Sábado\"]\r\n\t}\r\n};\r\n\r\n\r\n","/*\r\n\tTraducere de Ovidiu Lixandru: http://www.madball.ro\r\n */\r\n\r\nexport default {\r\n\tdate:{\r\n\t\tmonth_full:[\"Ianuarie\", \"Februarie\", \"Martie\", \"Aprilie\", \"Mai\", \"Iunie\", \"Iulie\", \"August\", \"Septembrie\", \"Octombrie\", \"November\", \"December\"],\r\n\t\tmonth_short:[\"Ian\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Iun\", \"Iul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\r\n\t\tday_full:[\"Duminica\", \"Luni\", \"Marti\", \"Miercuri\", \"Joi\", \"Vineri\", \"Sambata\"],\r\n\t\tday_short:[\"Du\", \"Lu\", \"Ma\", \"Mi\", \"Jo\", \"Vi\", \"Sa\"]\r\n\t},\r\n\tlabels:{\r\n\t\tdhx_cal_today_button:\"Astazi\",\r\n\t\tday_tab:\"Zi\",\r\n\t\tweek_tab:\"Saptamana\",\r\n\t\tmonth_tab:\"Luna\",\r\n\t\tnew_event:\"Eveniment nou\",\r\n\t\ticon_save:\"Salveaza\",\r\n\t\ticon_cancel:\"Anuleaza\",\r\n\t\ticon_details:\"Detalii\",\r\n\t\ticon_edit:\"Editeaza\",\r\n\t\ticon_delete:\"Sterge\",\r\n\t\tconfirm_closing:\"Schimbarile nu vor fi salvate, esti sigur?\",//Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting:\"Evenimentul va fi sters permanent, esti sigur?\",\r\n\t\tsection_description:\"Descriere\",\r\n\t\tsection_time:\"Interval\",\r\n\t\tfull_day:\"Toata ziua\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring:\"Vrei sa editezi toata seria de evenimente repetate?\",\r\n\t\tsection_recurring:\"Repetare\",\r\n\t\tbutton_recurring:\"Dezactivata\",\r\n\t\tbutton_recurring_open:\"Activata\",\r\n\t\tbutton_edit_series: \"Editeaza serie\",\r\n\t\tbutton_edit_occurrence: \"Editeaza doar intrare\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"Agenda\",\r\n\t\tdate:\"Data\",\r\n\t\tdescription:\"Descriere\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"An\",\r\n\r\n\t\t/* week agenda extension */\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Lista\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Zilnic\",\r\n\t\trepeat_radio_week: \"Saptamanal\",\r\n\t\trepeat_radio_month: \"Lunar\",\r\n\t\trepeat_radio_year: \"Anual\",\r\n\t\trepeat_radio_day_type: \"La fiecare\",\r\n\t\trepeat_text_day_count: \"zi(le)\",\r\n\t\trepeat_radio_day_type2: \"Fiecare zi lucratoare\",\r\n\t\trepeat_week: \" Repeta la fiecare\",\r\n\t\trepeat_text_week_count: \"saptamana in urmatoarele zile:\",\r\n\t\trepeat_radio_month_type: \"Repeta in\",\r\n\t\trepeat_radio_month_start: \"In a\",\r\n\t\trepeat_text_month_day: \"zi la fiecare\",\r\n\t\trepeat_text_month_count: \"luni\",\r\n\t\trepeat_text_month_count2_before: \"la fiecare\",\r\n\t\trepeat_text_month_count2_after: \"luni\",\r\n\t\trepeat_year_label: \"In\",\r\n\t\tselect_year_day2: \"a lunii\",\r\n\t\trepeat_text_year_day: \"zi a lunii\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Fara data de sfarsit\",\r\n\t\trepeat_text_occurences_count: \"evenimente\",\r\n\t\trepeat_radio_end3: \"La data\",\r\n\t\trepeat_radio_end2: \"Dupa\",\r\n\t\tmonth_for_recurring: [\"Ianuarie\", \"Februarie\", \"Martie\", \"Aprilie\", \"Mai\", \"Iunie\", \"Iulie\", \"August\", \"Septembrie\", \"Octombrie\", \"Noiembrie\", \"Decembrie\"],\r\n\t\tday_for_recurring: [\"Duminica\", \"Luni\", \"Marti\", \"Miercuri\", \"Joi\", \"Vineri\", \"Sambata\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Январь\", \"Февраль\", \"Март\", \"Апрель\", \"Maй\", \"Июнь\", \"Июль\", \"Август\", \"Сентябрь\", \"Oктябрь\", \"Ноябрь\", \"Декабрь\"],\r\n\t\tmonth_short: [\"Янв\", \"Фев\", \"Maр\", \"Aпр\", \"Maй\", \"Июн\", \"Июл\", \"Aвг\", \"Сен\", \"Окт\", \"Ноя\", \"Дек\"],\r\n\t\tday_full: [ \"Воскресенье\", \"Понедельник\", \"Вторник\", \"Среда\", \"Четверг\", \"Пятница\", \"Суббота\"],\r\n\t\tday_short: [\"Вс\", \"Пн\", \"Вт\", \"Ср\", \"Чт\", \"Пт\", \"Сб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сегодня\",\r\n\t\tday_tab: \"День\",\r\n\t\tweek_tab: \"Неделя\",\r\n\t\tmonth_tab: \"Месяц\",\r\n\t\tnew_event: \"Новое событие\",\r\n\t\ticon_save: \"Сохранить\",\r\n\t\ticon_cancel: \"Отменить\",\r\n\t\ticon_details: \"Детали\",\r\n\t\ticon_edit: \"Изменить\",\r\n\t\ticon_delete: \"Удалить\",\r\n\t\tconfirm_closing: \"\", //Ваши изменения будут потеряны, продолжить?\r\n\t\tconfirm_deleting: \"Событие будет удалено безвозвратно, продолжить?\",\r\n\t\tsection_description: \"Описание\",\r\n\t\tsection_time: \"Период времени\",\r\n\t\tfull_day: \"Весь день\",\r\n\r\n\t\tconfirm_recurring: \"Вы хотите изменить всю серию повторяющихся событий?\",\r\n\t\tsection_recurring: \"Повторение\",\r\n\t\tbutton_recurring: \"Отключено\",\r\n\t\tbutton_recurring_open: \"Включено\",\r\n\t\tbutton_edit_series: \"Редактировать серию\",\r\n\t\tbutton_edit_occurrence: \"Редактировать экземпляр\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Список\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Описание\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Год\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Список\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Таблица\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"День\",\r\n\t\trepeat_radio_week: \"Неделя\",\r\n\t\trepeat_radio_month: \"Месяц\",\r\n\t\trepeat_radio_year: \"Год\",\r\n\t\trepeat_radio_day_type: \"Каждый\",\r\n\t\trepeat_text_day_count: \"день\",\r\n\t\trepeat_radio_day_type2: \"Каждый рабочий день\",\r\n\t\trepeat_week: \" Повторять каждую\",\r\n\t\trepeat_text_week_count: \"неделю , в:\",\r\n\t\trepeat_radio_month_type: \"Повторять\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" числа каждый \",\r\n\t\trepeat_text_month_count: \"месяц\",\r\n\t\trepeat_text_month_count2_before: \"каждый \",\r\n\t\trepeat_text_month_count2_after: \"месяц\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"день\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без даты окончания\",\r\n\t\trepeat_text_occurences_count: \"повторений\",\r\n\t\trepeat_radio_end3: \"До \",\r\n\t\trepeat_radio_end2: \"\",\r\n\t\tmonth_for_recurring: [\"Января\", \"Февраля\", \"Марта\", \"Апреля\", \"Мая\", \"Июня\", \"Июля\", \"Августа\", \"Сентября\", \"Октября\", \"Ноября\", \"Декабря\"],\r\n\t\tday_for_recurring: [\"Воскресенье\", \"Понедельник\", \"Вторник\", \"Среду\", \"Четверг\", \"Пятницу\", \"Субботу\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Marec\", \"April\", \"Maj\", \"Junij\", \"Julij\", \"Avgust\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Nedelja\", \"Ponedeljek\", \"Torek\", \"Sreda\", \"Četrtek\", \"Petek\", \"Sobota\"],\r\n\t\tday_short: [\"Ned\", \"Pon\", \"Tor\", \"Sre\", \"Čet\", \"Pet\", \"Sob\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Danes\",\r\n\t\tday_tab: \"Dan\",\r\n\t\tweek_tab: \"Teden\",\r\n\t\tmonth_tab: \"Mesec\",\r\n\t\tnew_event: \"Nov dogodek\",\r\n\t\ticon_save: \"Shrani\",\r\n\t\ticon_cancel: \"Prekliči\",\r\n\t\ticon_details: \"Podrobnosti\",\r\n\t\ticon_edit: \"Uredi\",\r\n\t\ticon_delete: \"Izbriši\",\r\n\t\tconfirm_closing: \"\", //Spremembe ne bodo shranjene. Želite nadaljevati ?\r\n\t\tconfirm_deleting: \"Dogodek bo izbrisan. Želite nadaljevati?\",\r\n\t\tsection_description: \"Opis\",\r\n\t\tsection_time: \"Časovni okvir\",\r\n\t\tfull_day: \"Ves dan\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Želite urediti celoten set ponavljajočih dogodkov?\",\r\n\t\tsection_recurring: \"Ponovi dogodek\",\r\n\t\tbutton_recurring: \"Onemogočeno\",\r\n\t\tbutton_recurring_open: \"Omogočeno\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Edit occurrence\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Zadeva\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Opis\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Leto\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Zadeva\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Miza\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Január\", \"Február\", \"Marec\", \"Apríl\", \"Máj\", \"Jún\", \"Júl\", \"August\", \"September\", \"Október\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Máj\", \"Jún\", \"Júl\", \"Aug\", \"Sept\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Nedeľa\", \"Pondelok\", \"Utorok\", \"Streda\", \"Štvrtok\", \"Piatok\", \"Sobota\"],\r\n\t\tday_short: [\"Ne\", \"Po\", \"Ut\", \"St\", \"Št\", \"Pi\", \"So\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dnes\",\r\n\t\tday_tab: \"Deň\",\r\n\t\tweek_tab: \"Týždeň\",\r\n\t\tmonth_tab: \"Mesiac\",\r\n\t\tnew_event: \"Nová udalosť\",\r\n\t\ticon_save: \"Uložiť\",\r\n\t\ticon_cancel: \"Späť\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edituj\",\r\n\t\ticon_delete: \"Zmazať\",\r\n\t\tconfirm_closing: \"Vaše zmeny nebudú uložené. Skutočne?\", //Vaše změny budou ztraceny, opravdu ?\r\n\t\tconfirm_deleting: \"Udalosť bude natrvalo vymazaná. Skutočne?\",\r\n\t\tsection_description: \"Poznámky\",\r\n\t\tsection_time: \"Doba platnosti\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Prajete si upraviť celú radu opakovaných udalostí?\",\r\n\t\tsection_recurring: \"Opakovanie udalosti\",\r\n\t\tbutton_recurring: \"Vypnuté\",\r\n\t\tbutton_recurring_open: \"Zapnuté\",\r\n\t\tbutton_edit_series: \"Upraviť opakovania\",\r\n\t\tbutton_edit_occurrence: \"Upraviť inštancie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Program\",\r\n\t\tdate: \"Dátum\",\r\n\t\tdescription: \"Poznámka\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\t\tfull_day: \"Celý deň\", // Full day\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Program\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Mriežka\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Denne\",\r\n\t\trepeat_radio_week: \"Týždenne\",\r\n\t\trepeat_radio_month: \"Mesaène\",\r\n\t\trepeat_radio_year: \"Roène\",\r\n\t\trepeat_radio_day_type: \"Každý\",\r\n\t\trepeat_text_day_count: \"deò\",\r\n\t\trepeat_radio_day_type2: \"Každý prac. deò\",\r\n\t\trepeat_week: \"Opakova každý\",\r\n\t\trepeat_text_week_count: \"týždeò v dòoch:\",\r\n\t\trepeat_radio_month_type: \"Opakova\",\r\n\t\trepeat_radio_month_start: \"On\",\r\n\t\trepeat_text_month_day: \"deò každý\",\r\n\t\trepeat_text_month_count: \"mesiac\",\r\n\t\trepeat_text_month_count2_before: \"každý\",\r\n\t\trepeat_text_month_count2_after: \"mesiac\",\r\n\t\trepeat_year_label: \"On\",\r\n\t\tselect_year_day2: \"poèas\",\r\n\t\trepeat_text_year_day: \"deò\",\r\n\t\tselect_year_month: \"mesiac\",\r\n\t\trepeat_radio_end: \"Bez dátumu ukonèenia\",\r\n\t\trepeat_text_occurences_count: \"udalostiach\",\r\n\t\trepeat_radio_end3: \"Ukonèi\",\r\n\t\trepeat_radio_end2: \"Po\",\r\n\t\tmonth_for_recurring: [\"Január\", \"Február\", \"Marec\", \"Apríl\", \"Máj\", \"Jún\", \"Júl\", \"August\", \"September\", \"Október\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Nede¾a\", \"Pondelok\", \"Utorok\", \"Streda\", \"Štvrtok\", \"Piatok\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Mars\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"Augusti\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Söndag\", \"Måndag\", \"Tisdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lördag\"],\r\n\t\tday_short: [\"Sön\", \"Mån\", \"Tis\", \"Ons\", \"Tor\", \"Fre\", \"Lör\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Vecka\",\r\n\t\tmonth_tab: \"Månad\",\r\n\t\tnew_event: \"Ny händelse\",\r\n\t\ticon_save: \"Spara\",\r\n\t\ticon_cancel: \"Ångra\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Ändra\",\r\n\t\ticon_delete: \"Ta bort\",\r\n\t\tconfirm_closing: \"\", //Dina förändingar kommer gå förlorade, är du säker?\r\n\t\tconfirm_deleting: \"Är du säker på att du vill ta bort händelsen permanent?\",\r\n\t\tsection_description: \"Beskrivning\",\r\n\t\tsection_time: \"Tid\",\r\n\t\tfull_day: \"Hela dagen\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vill du redigera hela serien med repeterande händelser?\",\r\n\t\tsection_recurring: \"Upprepa händelse\",\r\n\t\tbutton_recurring: \"Inaktiverat\",\r\n\t\tbutton_recurring_open: \"Aktiverat\",\r\n\t\tbutton_edit_series: \"Redigera serien\",\r\n\t\tbutton_edit_occurrence: \"Redigera en kopia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dagordning\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Beskrivning\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dagordning\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Galler\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Dra för att skapa ny\",\r\n\t\tdrag_to_move:\"Dra för att flytta\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Dagligen\",\r\n\t\trepeat_radio_week: \"Veckovis\",\r\n\t\trepeat_radio_month: \"Månadsvis\",\r\n\t\trepeat_radio_year: \"Årligen\",\r\n\t\trepeat_radio_day_type: \"Var\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"Varje arbetsdag\",\r\n\t\trepeat_week: \" Upprepa var\",\r\n\t\trepeat_text_week_count: \"vecka dessa dagar:\",\r\n\t\trepeat_radio_month_type: \"Upprepa\",\r\n\t\trepeat_radio_month_start: \"Den\",\r\n\t\trepeat_text_month_day: \"dagen var\",\r\n\t\trepeat_text_month_count: \"månad\",\r\n\t\trepeat_text_month_count2_before: \"var\",\r\n\t\trepeat_text_month_count2_after: \"månad\",\r\n\t\trepeat_year_label: \"Den\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"månad\",\r\n\t\trepeat_radio_end: \"Inget slutdatum\",\r\n\t\trepeat_text_occurences_count: \"upprepningar\",\r\n\t\trepeat_radio_end3: \"Sluta efter\",\r\n\t\trepeat_radio_end2: \"Efter\",\r\n\t\tmonth_for_recurring: [\"Januari\", \"Februari\", \"Mars\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"Augusti\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Söndag\", \"Måndag\", \"Tisdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lördag\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Ocak\", \"Þubat\", \"Mart\", \"Nisan\", \"Mayýs\", \"Haziran\", \"Temmuz\", \"Aðustos\", \"Eylül\", \"Ekim\", \"Kasým\", \"Aralýk\"],\r\n\t\tmonth_short: [\"Oca\", \"Þub\", \"Mar\", \"Nis\", \"May\", \"Haz\", \"Tem\", \"Aðu\", \"Eyl\", \"Eki\", \"Kas\", \"Ara\"],\r\n\t\tday_full: [\"Pazar\", \"Pazartes,\", \"Salý\", \"Çarþamba\", \"Perþembe\", \"Cuma\", \"Cumartesi\"],\r\n\t\tday_short: [\"Paz\", \"Pts\", \"Sal\", \"Çar\", \"Per\", \"Cum\", \"Cts\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Bugün\",\r\n\t\tday_tab: \"Gün\",\r\n\t\tweek_tab: \"Hafta\",\r\n\t\tmonth_tab: \"Ay\",\r\n\t\tnew_event: \"Uygun\",\r\n\t\ticon_save: \"Kaydet\",\r\n\t\ticon_cancel: \"Ýptal\",\r\n\t\ticon_details: \"Detaylar\",\r\n\t\ticon_edit: \"Düzenle\",\r\n\t\ticon_delete: \"Sil\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Etkinlik silinecek, devam?\",\r\n\t\tsection_description: \"Açýklama\",\r\n\t\tsection_time: \"Zaman aralýðý\",\r\n\t\tfull_day: \"Tam gün\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Tüm tekrar eden etkinlikler silinecek, devam?\",\r\n\t\tsection_recurring: \"Etkinliði tekrarla\",\r\n\t\tbutton_recurring: \"Pasif\",\r\n\t\tbutton_recurring_open: \"Aktif\",\r\n\t\tbutton_edit_series: \"Dizi düzenleme\",\r\n\t\tbutton_edit_occurrence: \"Bir kopyasını düzenleyin\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Ajanda\",\r\n\t\tdate: \"Tarih\",\r\n\t\tdescription: \"Açýklama\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Yýl\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Ajanda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Izgara\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Січень\", \"Лютий\", \"Березень\", \"Квітень\", \"Травень\", \"Червень\", \"Липень\", \"Серпень\", \"Вересень\", \"Жовтень\", \"Листопад\", \"Грудень\"],\r\n\t\tmonth_short: [\"Січ\", \"Лют\", \"Бер\", \"Кві\", \"Тра\", \"Чер\", \"Лип\", \"Сер\", \"Вер\", \"Жов\", \"Лис\", \"Гру\"],\r\n\t\tday_full: [\"Неділя\", \"Понеділок\", \"Вівторок\", \"Середа\", \"Четвер\", \"П'ятниця\", \"Субота\"],\r\n\t\tday_short: [\"Нед\", \"Пон\", \"Вів\", \"Сер\", \"Чет\", \"Птн\", \"Суб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сьогодні\",\r\n\t\tday_tab: \"День\",\r\n\t\tweek_tab: \"Тиждень\",\r\n\t\tmonth_tab: \"Місяць\",\r\n\t\tnew_event: \"Нова подія\",\r\n\t\ticon_save: \"Зберегти\",\r\n\t\ticon_cancel: \"Відміна\",\r\n\t\ticon_details: \"Деталі\",\r\n\t\ticon_edit: \"Редагувати\",\r\n\t\ticon_delete: \"Вилучити\",\r\n\t\tconfirm_closing: \"\", //Ваші зміни втратяться. Ви впевнені ?\r\n\t\tconfirm_deleting: \"Подія вилучиться назавжди. Ви впевнені?\",\r\n\t\tsection_description: \"Опис\",\r\n\t\tsection_time: \"Часовий проміжок\",\r\n\t\tfull_day: \"Весь день\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Хочете редагувати весь перелік повторюваних подій?\",\r\n\t\tsection_recurring: \"Повторювана подія\",\r\n\t\tbutton_recurring: \"Відключено\",\r\n\t\tbutton_recurring_open: \"Включено\",\r\n\t\tbutton_edit_series: \"Редагувати серію\",\r\n\t\tbutton_edit_occurrence: \"Редагувати примірник\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Перелік\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Опис\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Рік\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Перелік\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Таблиця\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"День\",\r\n\t\trepeat_radio_week: \"Тиждень\",\r\n\t\trepeat_radio_month: \"Місяць\",\r\n\t\trepeat_radio_year: \"Рік\",\r\n\t\trepeat_radio_day_type: \"Кожний\",\r\n\t\trepeat_text_day_count: \"день\",\r\n\t\trepeat_radio_day_type2: \"Кожний робочий день\",\r\n\t\trepeat_week: \" Повторювати кожен\",\r\n\t\trepeat_text_week_count: \"тиждень , по:\",\r\n\t\trepeat_radio_month_type: \"Повторювати\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" числа кожний \",\r\n\t\trepeat_text_month_count: \"місяць\",\r\n\t\trepeat_text_month_count2_before: \"кожен \",\r\n\t\trepeat_text_month_count2_after: \"місяць\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"день\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без дати закінчення\",\r\n\t\trepeat_text_occurences_count: \"повторень\",\r\n\t\trepeat_radio_end3: \"До \",\r\n\t\trepeat_radio_end2: \"\",\r\n\t\tmonth_for_recurring: [\"січня\", \"лютого\", \"березня\", \"квітня\", \"травня\", \"червня\", \"липня\", \"серпня\", \"вересня\", \"жовтня\", \"листопада\", \"грудня\"],\r\n\t\tday_for_recurring: [\"Неділям\", \"Понеділкам\", \"Вівторкам\", \"Середам\", \"Четвергам\", \"П'ятницям\", \"Суботам\"]\r\n\t}\r\n};\r\n","import eventable from \"../utils/eventable\";\r\n\r\nexport class DatePicker {\r\n\tconstructor(scheduler, container, state = {}) {\r\n\t\tthis.state = {\r\n\t\t\tdate: new Date(),\r\n\t\t\tmodes: ['days', 'months', 'years'],\r\n\t\t\tcurrentRange: [],\r\n\t\t\teventDates: [],\r\n\t\t\tcurrentModeIndex: 0,\r\n\t\t\t...state\r\n\t\t};\r\n\t\tthis.container = null;\r\n\t\tthis.element = null;\r\n\t\tthis.onStateChangeHandlers = [];\r\n\t\tthis.scheduler = scheduler;\r\n\t\tthis._domEvents = scheduler._createDomEventScope();\r\n\t\tthis.state = this.getState();\r\n\t\teventable(this);\r\n\t\tif(container){\r\n\r\n\t\t\tthis.container = container;\r\n\t\t\tthis.render(this.container);\r\n\t\t}\r\n\r\n\t\tthis.onStateChange((oldState, newState) => {\r\n\t\t\tthis.callEvent(\"onStateChange\", [newState, oldState]);\r\n\t\t});\r\n\t}\r\n\r\n\tgetState() {\r\n\t\treturn { \r\n\t\t\t...this.state,\r\n\t\t\tmode: this.state.modes[this.state.currentModeIndex]\r\n\t\t};\r\n\t}\r\n\r\n\tsetState(newState) {\r\n\t\tconst oldState = { ...this.state };\r\n\t\tif(newState.mode){\r\n\t\t\tnewState.currentModeIndex = this.state.modes.indexOf(newState.mode);\r\n\t\t}\r\n\t\tthis.state = { ...this.state, ...newState };\r\n\r\n\t\tthis._notifyStateChange(oldState, this.state);\r\n\r\n\t\tif (this.container) {\r\n\t\t\tthis.render(this.container);\r\n\t\t}\r\n\t}\r\n\r\n\tonStateChange(handler) {\r\n\t\tthis.onStateChangeHandlers.push(handler);\r\n\r\n\t\t// function to remove the handler\r\n\t\treturn () => {\r\n\t\t\tconst index = this.onStateChangeHandlers.indexOf(handler);\r\n\t\t\tif (index !== -1) {\r\n\t\t\t\tthis.onStateChangeHandlers.splice(index, 1);\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n\r\n\t_notifyStateChange(oldState, newState) {\r\n\t\tthis.onStateChangeHandlers.forEach(handler => handler(oldState, newState));\r\n\t}\r\n\r\n\t_adjustDate(direction) {\r\n\r\n\t\tconst {mode, date} = this.getState();\r\n\t\tconst newDate = new Date(date);\r\n\t\tif (mode === 'days') {\r\n\t\t\tnewDate.setMonth(date.getMonth() + direction);\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tnewDate.setFullYear(date.getFullYear() + direction);\r\n\t\t} else {\r\n\t\t\tnewDate.setFullYear(date.getFullYear() + direction * 10);\r\n\t\t}\r\n\t\tthis.setState({ date: newDate });\r\n\t}\r\n\r\n\t_toggleMode() {\r\n\t\tconst newIndex = (this.state.currentModeIndex + 1) % this.state.modes.length;\r\n\t\tthis.setState({ currentModeIndex: newIndex });\r\n\t}\r\n\r\n\t_renderCalendarHeader(container) {\r\n\t\tconst {mode, date} = this.getState();\r\n\r\n\t\tconst header = document.createElement('div');\r\n\t\theader.classList.add('dhx_cal_datepicker_header');\r\n\r\n\t\tconst backwardArrow = document.createElement('button');\r\n\r\n\t\tbackwardArrow.classList.add(\"dhx_cal_datepicker_arrow\", \"scheduler_icon\", \"arrow_left\");\r\n\t\theader.appendChild(backwardArrow);\r\n\r\n\t\tconst monthLabel = document.createElement('div');\r\n\t\tmonthLabel.classList.add('dhx_cal_datepicker_title');\r\n\r\n\t\tif (mode === 'days') {\r\n\t\t\tmonthLabel.innerText = date.toLocaleString('default', { month: 'long' }) + ' ' + date.getFullYear();\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tmonthLabel.innerText = date.getFullYear();\r\n\t\t} else {\r\n\t\t\tconst startYear = Math.floor(date.getFullYear() / 10) * 10;\r\n\t\t\tmonthLabel.innerText = `${startYear} - ${startYear + 9}`;\r\n\t\t}\r\n\r\n\t\tthis._domEvents.attach(monthLabel, \"click\", this._toggleMode.bind(this));\r\n\t\theader.appendChild(monthLabel);\r\n\r\n\t\tconst forwardArrow = document.createElement('button');\r\n\r\n\t\tforwardArrow.classList.add(\"dhx_cal_datepicker_arrow\", \"scheduler_icon\", \"arrow_right\");\r\n\t\theader.appendChild(forwardArrow);\r\n\r\n\t\tcontainer.appendChild(header);\r\n\r\n\t\tthis._domEvents.attach(backwardArrow, \"click\", this._adjustDate.bind(this, -1));\r\n\t\tthis._domEvents.attach(forwardArrow, \"click\", this._adjustDate.bind(this, 1));\r\n\t}\r\n\r\n\trender(container) {\r\n\t\tthis._domEvents.detachAll();\r\n\t\tthis.container = container || this.container; \r\n\t\tthis.container.innerHTML = '';\r\n\r\n\t\tif(!this.element){\r\n\t\t\tthis.element = document.createElement(\"div\");\r\n\t\t\tthis.element.classList.add(\"dhx_cal_datepicker\");\r\n\t\t}\r\n\t\tthis.element.innerHTML = '';\r\n\t\tthis.container.appendChild(this.element);\r\n\r\n\t\tthis._renderCalendarHeader(this.element);\r\n\t\tconst dataContainer = document.createElement(\"div\");\r\n\t\tdataContainer.classList.add(\"dhx_cal_datepicker_data\");\r\n\t\tthis.element.appendChild(dataContainer);\r\n\r\n\t\tconst {mode} = this.getState();\r\n\t\tif (mode === 'days') {\r\n\t\t\tthis._renderDayGrid(dataContainer);\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tthis._renderMonthGrid(dataContainer);\r\n\t\t} else {\r\n\t\t\tthis._renderYearGrid(dataContainer);\r\n\t\t}\r\n\t}\r\n\r\n\t_renderDayGridHeader(daysOfWeekContainer) {\r\n\t\tconst {date} = this.getState();\r\n\t\tconst scheduler = this.scheduler;\r\n\r\n\t\tlet currentDate = scheduler.date.week_start(new Date(date));\r\n\t\tconst maxDate = scheduler.date.add(scheduler.date.week_start(new Date(date)), 1, 'week');\r\n\r\n\t\tdaysOfWeekContainer.classList.add('dhx_cal_datepicker_days');\r\n\r\n\t\tconst labelFormat = scheduler.date.date_to_str(\"%D\");\r\n\r\n\t\twhile (currentDate.valueOf() < maxDate.valueOf()) {\r\n\t\t\tconst label = labelFormat(currentDate);\r\n\r\n\t\t\tconst dayElement = document.createElement('div');\r\n\t\t\tdayElement.setAttribute(\"data-day\", currentDate.getDay());\r\n\t\t\tdayElement.classList.add('dhx_cal_datepicker_dayname');\r\n\t\t\tdayElement.innerText = label;\r\n\t\t\tdaysOfWeekContainer.appendChild(dayElement);\r\n\r\n\t\t\tcurrentDate = scheduler.date.add(currentDate, 1, 'day');\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t_weeksBetween(min, max) {\r\n\t\tconst scheduler = this.scheduler;\r\n\t\tlet weeks = 0;\r\n\t\tlet currWeek = new Date(min);\r\n\t\twhile(currWeek.valueOf() < max.valueOf()){\r\n\t\t\tweeks += 1;\r\n\t\t\tcurrWeek = scheduler.date.week_start(scheduler.date.add(currWeek, 1, \"week\"));\r\n\t\t}\r\n\t\treturn weeks;\r\n\t}\r\n\r\n\t_renderDayGrid(container) {\r\n\t\tconst {date, currentRange, eventDates, minWeeks} = this.getState();\r\n\r\n\t\tlet minSchedulerDate = currentRange[0];\r\n\t\tlet maxSchedulerDate = currentRange[1];\r\n\r\n\t\tconst eventDaysTable = eventDates.reduce((acc, date) => {\r\n\t\t\tconst dayStart = this.scheduler.date.day_start(new Date(date));\r\n\t\t\tacc[dayStart.valueOf()] = true;\r\n\t\t\treturn acc;\r\n\t\t}, {});\r\n\r\n\r\n\t\t// Render Days of the Week\r\n\t\tconst daysOfWeekContainer = document.createElement('div');\r\n\t\tthis._renderDayGridHeader(daysOfWeekContainer);\r\n\t\tcontainer.appendChild(daysOfWeekContainer);\r\n\r\n\t\tconst scheduler = this.scheduler;\r\n\t\tconst firstDate = scheduler.date.week_start(scheduler.date.month_start(new Date(date)));\r\n\t\tconst monthStart = scheduler.date.month_start(new Date(date));\r\n\t\tconst monthEnd = scheduler.date.add(scheduler.date.month_start(new Date(date)), 1, 'month');\r\n\t\tlet lastDate = scheduler.date.add(scheduler.date.month_start(new Date(date)), 1, 'month');\r\n\t\tif(lastDate.getDay() !== 0){\r\n\t\t\tlastDate = scheduler.date.add(scheduler.date.week_start(lastDate), 1, \"week\");\r\n\t\t}\r\n\r\n\t\tlet weeks = this._weeksBetween(firstDate, lastDate);\r\n\t\tif(minWeeks && weeks < minWeeks){\r\n\t\t\tlastDate = scheduler.date.add(lastDate, (minWeeks - weeks), \"week\");\r\n\t\t}\r\n\r\n\t\tlet currDate = firstDate;\r\n\r\n\t\tconst dayGridContainer = document.createElement('div');\r\n\t\tdayGridContainer.classList.add('dhx_cal_datepicker_days');\r\n\r\n\t\tthis._domEvents.attach(dayGridContainer, \"click\", (event) => {\r\n\t\t\tconst dateCell = event.target.closest(\"[data-cell-date]\");\r\n\t\t\tconst date = new Date(dateCell.getAttribute(\"data-cell-date\"));\r\n\t\t\tthis.callEvent(\"onDateClick\", [date, event]);\r\n\t\t});\r\n\r\n\t\twhile(currDate.valueOf() < lastDate.valueOf()){\r\n\t\t\tconst dayElement = document.createElement('div');\r\n\t\t\tdayElement.setAttribute(\"data-cell-date\", scheduler.templates.format_date(currDate));\r\n\t\t\tdayElement.setAttribute(\"data-day\", currDate.getDay());\r\n\t\t\tdayElement.innerHTML = currDate.getDate();\r\n\r\n\t\t\tif(currDate.valueOf() < monthStart.valueOf()){\r\n\t\t\t\tdayElement.classList.add('dhx_before');\r\n\t\t\t}else if(currDate.valueOf() >= monthEnd.valueOf()){\t\r\n\t\t\t\tdayElement.classList.add('dhx_after');\r\n\t\t\t}\r\n\r\n\t\t\tif(currDate.getDay() === 0 || currDate.getDay() === 6){\r\n\t\t\t\tdayElement.classList.add(\"dhx_cal_datepicker_weekend\");\r\n\t\t\t}\r\n\r\n\t\t\tif(minSchedulerDate && maxSchedulerDate){\r\n\t\t\t\tif(currDate.valueOf() >= minSchedulerDate.valueOf() && currDate.valueOf() < maxSchedulerDate.valueOf()){\r\n\t\t\t\t\tdayElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(eventDaysTable[currDate.valueOf()]){\r\n\t\t\t\tdayElement.classList.add('dhx_cal_datepicker_event');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdayElement.classList.add('dhx_cal_datepicker_date');\r\n\r\n\t\t\tdayGridContainer.appendChild(dayElement);\r\n\t\t\tcurrDate = scheduler.date.add(currDate, 1, 'day');\r\n\t\t}\r\n\r\n\t\tcontainer.appendChild(dayGridContainer);\r\n\r\n\t}\r\n\r\n\t_renderMonthGrid(container) {\r\n\t\tconst {date} = this.getState();\r\n\r\n\t\tconst wrapper = document.createElement('div');\r\n\t\twrapper.classList.add(\"dhx_cal_datepicker_months\");\r\n\r\n\t\tconst months = [];\r\n\t\tfor(let i = 0; i < 12; i++){\r\n\t\t\tmonths.push(new Date(date.getFullYear(), i, 1));\r\n\t\t}\r\n\r\n\t\tconst formatLabel = this.scheduler.date.date_to_str(\"%M\");\r\n\t\tmonths.forEach(month => {\r\n\t\t\tconst monthElement = document.createElement('div');\r\n\t\t\tmonthElement.classList.add('dhx_cal_datepicker_month');\r\n\t\t\tif(date.getMonth() === month.getMonth()){\r\n\t\t\t\tmonthElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t}\r\n\t\t\tmonthElement.setAttribute(\"data-month\", month.getMonth());\r\n\t\t\tmonthElement.innerHTML = formatLabel(month);\r\n\t\t\tthis._domEvents.attach(monthElement, \"click\", () => {\r\n\t\t\t\tconst newDate = new Date(month);\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\tdate: newDate,\r\n\t\t\t\t\tmode: 'days'\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\twrapper.appendChild(monthElement);\r\n\t\t});\r\n\t\tcontainer.appendChild(wrapper);\r\n\r\n\t\tconst doneArea = document.createElement(\"div\");\r\n\t\tdoneArea.classList.add(\"dhx_cal_datepicker_done\");\r\n\t\tconst doneBtn = document.createElement(\"button\");\r\n\t\tdoneBtn.innerText = \"Done\";\r\n\t\tdoneBtn.classList.add(\"dhx_cal_datepicker_done_btn\");\r\n\t\tthis._domEvents.attach(doneBtn, \"click\", () => {\r\n\t\t\tthis.setState({\r\n\t\t\t\tmode: 'days'\r\n\t\t\t});\r\n\t\t});\r\n\t\tdoneArea.appendChild(doneBtn);\r\n\t\tcontainer.appendChild(doneArea);\r\n\t}\r\n\r\n\t_renderYearGrid(container) {\r\n\t\tconst {date} = this.getState();\r\n\t\tconst startYear = Math.floor(date.getFullYear() / 10) * 10;\r\n\t\t\r\n\t\tconst wrapper = document.createElement('div');\r\n\t\twrapper.classList.add(\"dhx_cal_datepicker_years\");\r\n\t\tfor (let i = startYear - 1; i <= startYear + 10; i++) {\r\n\t\t\tconst yearElement = document.createElement('div');\r\n\t\t\tyearElement.innerText = i;\r\n\t\t\tyearElement.classList.add('dhx_cal_datepicker_year');\r\n\t\t\tyearElement.setAttribute(\"data-year\", i);\r\n\t\t\tif(date.getFullYear() === i){\r\n\t\t\t\tyearElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t}\r\n\t\t\tthis._domEvents.attach(yearElement, \"click\", () => {\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\tdate: new Date(i, date.getMonth(), 1),\r\n\t\t\t\t\tmode: 'months'\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\twrapper.appendChild(yearElement);\r\n\t\t\t\r\n\t\t}\r\n\t\tcontainer.appendChild(wrapper);\r\n\r\n\t\tconst doneArea = document.createElement(\"div\");\r\n\t\tdoneArea.classList.add(\"dhx_cal_datepicker_done\");\r\n\t\tconst doneBtn = document.createElement(\"button\");\r\n\t\tdoneBtn.innerText = \"Done\";\r\n\t\tdoneBtn.classList.add(\"dhx_cal_datepicker_done_btn\");\r\n\t\tthis._domEvents.attach(doneBtn, \"click\", () => {\r\n\t\t\tthis.setState({\r\n\t\t\t\tmode: 'months'\r\n\t\t\t});\r\n\t\t});\r\n\t\tdoneArea.appendChild(doneBtn);\r\n\t\tcontainer.appendChild(doneArea);\r\n\t}\r\n\r\n\tdestructor(){\r\n\t\tthis.onStateChangeHandlers = [];\r\n\t\tif(this.element){\r\n\t\t\tthis.element.innerHTML = '';\r\n\t\t\tthis.element.remove();\r\n\t\t}\r\n\r\n\t\tthis._domEvents.detachAll();\r\n\t\tthis.callEvent(\"onDestroy\", []);\r\n\t\tthis.detachAllEvents();\r\n\r\n\t\tthis.scheduler = null;\r\n\t}\r\n}","// import \"./css/dhtmlxscheduler_terrace\";\r\n// import \"./css/dhtmlxscheduler_material\";\r\n// import \"./css/dhtmlxscheduler_material_nofont\";\r\n// import \"./css/dhtmlxscheduler_flat\";\r\n// import \"./css/dhtmlxscheduler_contrast_black\";\r\n// import \"./css/dhtmlxscheduler_contrast_white\";\r\n\r\n\r\nimport assert from \"./core/common/assert\";\r\nimport common_errors from \"./core/common_errors\";\r\nimport connector from \"./core/connector\";\r\nimport schedulerCore from \"./core/scheduler\";\r\nimport common from \"./core/common\";\r\nimport wai_aria from \"./core/wai_aria\";\r\nimport utils from \"./core/utils/utils\";\r\nimport dom_helpers from \"./core/utils/dom_helpers\";\r\nimport env from \"./utils/env\";\r\nimport destructor from \"./core/destructor\";\r\nimport ajax from \"./core/utils/ajax\";\r\nimport base from \"./core/base\";\r\nimport config from \"./core/config\";\r\nimport event from \"./core/event\";\r\nimport event_highlight from \"./core/event_highlight\";\r\nimport load from \"./core/load\";\r\nimport lightbox from \"./core/lightbox\";\r\nimport touch from \"./core/touch\";\r\nimport dhtmlx_suite_hooks from \"./core/dhtmlx/dhtmlx_suite_hooks\";\r\nimport skins from \"./core/skins\";\r\nimport jquery from \"./core/jquery\";\r\nimport delay_render from \"./core/delay_render\";\r\nimport dataProcessorExtend from \"./core/dataprocessor/dataprocessor\";\r\nimport message from \"./core/message\";\r\nimport i18nFactory from \"./locale\";\r\n\r\nimport voidFirst from \"./publish_helpers/void_script_first\";\r\nimport voidSecond from \"./publish_helpers/void_script_second\";\r\nimport voidThird from \"./publish_helpers/void_script_third\";\r\n\r\n//import datepickerHeader from \"./core/clickable_header\";\r\n\r\nimport { DatePicker } from \"./core/datepicker\";\r\n\r\nexport default function(extensionManager) {\r\n\r\n\tconst scheduler = { version: VERSION };\r\n\t\r\n\tcommon_errors(scheduler);\r\n\tcommon(scheduler);\r\n\tschedulerCore(scheduler);\r\n\twai_aria(scheduler);\r\n\t//utils(scheduler);\r\n\r\n\tscheduler.utils = utils;\r\n\tscheduler.$domHelpers = dom_helpers;\r\n\tscheduler.utils.dom = dom_helpers;\r\n\tscheduler.uid = utils.uid;\r\n\tscheduler.mixin = utils.mixin;\r\n\tscheduler.defined = utils.defined;\r\n\tscheduler.assert = assert(scheduler);\r\n\tscheduler.copy = utils.copy;\r\n\r\n\tscheduler._createDatePicker = function(container, config){\r\n\t\treturn new DatePicker(scheduler, container, config);\r\n\t};\r\n\r\n\t//datepickerHeader(scheduler);\r\n\r\n\r\n\t//old api compatibility\r\n\tscheduler._getFocusableNodes = dom_helpers.getFocusableNodes;\r\n\tscheduler._getClassName = dom_helpers.getClassName;\r\n\tscheduler._locate_css = dom_helpers.locateCss;\r\n\r\n\tconst messageApi = message(scheduler);\r\n\tscheduler.utils.mixin(scheduler, messageApi);\r\n\r\n\tscheduler.env = scheduler.$env = env;\r\n\tscheduler.Promise = window.Promise;\r\n\tdestructor(scheduler);\r\n\tajax(scheduler);\r\n\tvoidFirst(scheduler);\r\n\tbase(scheduler);\r\n\tconfig(scheduler);\r\n\tevent(scheduler);\r\n\tevent_highlight(scheduler);\r\n\tload(scheduler);\r\n\tlightbox(scheduler);\r\n\ttouch(scheduler);\r\n\tdhtmlx_suite_hooks(scheduler);\r\n\tvoidSecond(scheduler);\r\n\tskins(scheduler);\r\n\tjquery(scheduler);\r\n\tdelay_render(scheduler);\r\n\tdataProcessorExtend(scheduler);\r\n\tvoidThird(scheduler);\r\n\tconnector(scheduler);\r\n\tconst i18n = i18nFactory();\r\n\tscheduler.i18n = {\r\n\t\taddLocale: i18n.addLocale,\r\n\t\tsetLocale: function(locale){\r\n\t\t\tif(typeof locale === \"string\"){\r\n\t\t\t\tvar localeObject = i18n.getLocale(locale);\r\n\t\t\t\tif(!localeObject){\r\n\t\t\t\t\tlocaleObject = i18n.getLocale(\"en\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler.locale = localeObject;\r\n\t\t\t}else if(locale){\r\n\t\t\t\tif(!scheduler.locale){\r\n\t\t\t\t\tscheduler.locale = locale;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfor(var i in locale){\r\n\t\t\t\t\t\tif(locale[i] && typeof locale[i] === \"object\"){\r\n\t\t\t\t\t\t\tif(!scheduler.locale[i]){\r\n\t\t\t\t\t\t\t\tscheduler.locale[i] = {};\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tscheduler.mixin(scheduler.locale[i], locale[i], true);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tscheduler.locale[i] = locale[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar labels = scheduler.locale.labels;\r\n\t\t\tlabels.dhx_save_btn \t= labels.icon_save;\r\n\t\t\tlabels.dhx_cancel_btn \t= labels.icon_cancel;\r\n\t\t\tlabels.dhx_delete_btn \t= labels.icon_delete;\r\n\r\n\t\t\tif(scheduler.$container){\r\n\t\t\t\tscheduler.get_elements();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t},\r\n\t\tgetLocale: i18n.getLocale\r\n\t};\r\n\tscheduler.i18n.setLocale(\"en\");\r\n\r\n\tscheduler.ext = {};\r\n\r\n\tconst activePlugins = {};\r\n\tscheduler.plugins = function(config){\r\n\t\tconst extensionList = getExtensionList(config, {\r\n\t\t\t\ttreetimeline: [\"timeline\"],\r\n\t\t\t\tdaytimeline: [\"timeline\"],\r\n\t\t\t\touterdrag: [\"legacy\"]\r\n\t\t\t}, {\r\n\t\t\t\tlegacy: 1,\r\n\t\t\t\tlimit: 1,\r\n\t\t\t\ttimeline: 2,\r\n\t\t\t\tdaytimeline: 3,\r\n\t\t\t\ttreetimeline: 3,\r\n\t\t\t\touterdrag:6\r\n\t\t\t});\r\n\r\n\t\textensionList.forEach(function(name){\r\n\t\t\tif(!activePlugins[name]){\r\n\t\t\t\tconst plugin = extensionManager.getExtension(name);\r\n\t\t\t\tif(plugin){\r\n\t\t\t\t\tplugin(scheduler);\r\n\t\t\t\t\tactivePlugins[name] = true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthrow new Error(\"unknown plugin \" + name);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t};\r\n\r\n\tfunction getExtensionList(config, dependencies, priorities){\r\n\t\tconst result = [];\r\n\r\n\t\tfor(const i in config){\r\n\t\t\tif(config[i]){\r\n\t\t\t\tconst extension = i.toLowerCase();\r\n\t\t\t\tif(dependencies[extension]){\r\n\t\t\t\t\tdependencies[extension].forEach(function(dep){\r\n\t\t\t\t\t\tconst dependencyName = dep.toLowerCase();\r\n\t\t\t\t\t\tif(!config[dependencyName]){\r\n\t\t\t\t\t\t\tresult.push(dependencyName);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\tresult.push(extension);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tresult.sort(function(a, b){\r\n\t\t\tconst orderA = priorities[a] || 0;\r\n\t\t\tconst orderB = priorities[b] || 0;\r\n\t\t\tif(orderA > orderB){\r\n\t\t\t\treturn 1;\r\n\t\t\t}else if(orderA < orderB){\r\n\t\t\t\treturn -1;\r\n\t\t\t}else{\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\treturn scheduler;\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nvar commonViews = {\r\n\tagenda: \"https://docs.dhtmlx.com/scheduler/agenda_view.html\",\r\n\tgrid: \"https://docs.dhtmlx.com/scheduler/grid_view.html\",\r\n\tmap: \"https://docs.dhtmlx.com/scheduler/map_view.html\",\r\n\tunit: \"https://docs.dhtmlx.com/scheduler/units_view.html\",\r\n\ttimeline: \"https://docs.dhtmlx.com/scheduler/timeline_view.html\",\r\n\tweek_agenda: \"https://docs.dhtmlx.com/scheduler/weekagenda_view.html\",\r\n\tyear: \"https://docs.dhtmlx.com/scheduler/year_view.html\",\r\n\tanythingElse: \"https://docs.dhtmlx.com/scheduler/views.html\"\r\n};\r\n\r\nvar requiredExtensions = {\r\n\tagenda: \"ext/dhtmlxscheduler_agenda_view.js\",\r\n\tgrid: \"ext/dhtmlxscheduler_grid_view.js\",\r\n\tmap: \"ext/dhtmlxscheduler_map_view.js\",\r\n\tunit: \"ext/dhtmlxscheduler_units.js\",\r\n\ttimeline: \"ext/dhtmlxscheduler_timeline.js, ext/dhtmlxscheduler_treetimeline.js, ext/dhtmlxscheduler_daytimeline.js\",\r\n\tweek_agenda: \"ext/dhtmlxscheduler_week_agenda.js\",\r\n\tyear: \"ext/dhtmlxscheduler_year_view.js\",\r\n\tlimit: \"ext/dhtmlxscheduler_limit.js\"\r\n};\r\n\r\nscheduler._commonErrorMessages = {\r\n\tunknownView: function(view){\r\n\t\tvar relatedDoc = \"Related docs: \" + (commonViews[view] || commonViews.anythingElse); \r\n\t\tvar relatedExtension = requiredExtensions[view] ? (\"You're probably missing \" + requiredExtensions[view] + \".\") : \"\";\r\n\t\treturn (\r\n\t\t\t\"`\"+view+\"` view is not defined. \\n\" +\r\n\t\t\t\"Please check parameters you pass to `scheduler.init` or `scheduler.setCurrentView` in your code and ensure you've imported appropriate extensions. \\n\" + \r\n\t\t\trelatedDoc + \"\\n\" + (relatedExtension ? (relatedExtension + \"\\n\") : \"\"));\r\n\t},\r\n\tcollapsedContainer: function(div){\r\n\t\treturn \"Scheduler container height is set to *100%* but the rendered height is zero and the scheduler is not visible. \\n\"+\r\n\t\t\"Make sure that the container has some initial height or use different units. For example:\\n\" +\r\n\t\t\"
\\n\";\r\n\t}\r\n};\r\n\r\nscheduler.createTimelineView = function() {\r\n\tthrow new Error(\"scheduler.createTimelineView is not implemented. Be sure to add the required extension: \" + requiredExtensions.timeline + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.timeline);\r\n};\r\n\r\nscheduler.createUnitsView = function() {\r\n\tthrow new Error(\"scheduler.createUnitsView is not implemented. Be sure to add the required extension: \" + requiredExtensions.unit + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.unit);\r\n};\r\n\r\nscheduler.createGridView = function() {\r\n\tthrow new Error(\"scheduler.createGridView is not implemented. Be sure to add the required extension: \" + requiredExtensions.grid + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.grid);\r\n};\r\n\r\nscheduler.addMarkedTimespan = function() {\r\n\tthrow new Error(\"scheduler.addMarkedTimespan is not implemented. Be sure to add the required extension: ext/dhtmlxscheduler_limit.js\" + \r\n\t\"\\n\" +\r\n\t\"Related docs: https://docs.dhtmlx.com/scheduler/limits.html\");\r\n};\r\n\r\nscheduler.renderCalendar = function() {\r\n\tthrow new Error(\"scheduler.renderCalendar is not implemented. Be sure to add the required extension: ext/dhtmlxscheduler_minical.js\" + \r\n\t\"\\n\" +\r\n\t\"https://docs.dhtmlx.com/scheduler/minicalendar.html\");\r\n};\r\n\r\nscheduler.exportToPNG = function() {\r\n\tthrow new Error([\r\n\t\t\"scheduler.exportToPNG is not implemented.\",\r\n\t\t\"This feature requires an additional module, be sure to check the related doc here https://docs.dhtmlx.com/scheduler/png.html\",\r\n\t\t\"Licensing info: https://dhtmlx.com/docs/products/dhtmlxScheduler/export.shtml\"\r\n\t].join(\"\\n\"));\r\n};\r\n\r\nscheduler.exportToPDF = function() {\r\n\tthrow new Error([\r\n\t\t\"scheduler.exportToPDF is not implemented.\",\r\n\t\t\"This feature requires an additional module, be sure to check the related doc here https://docs.dhtmlx.com/scheduler/pdf.html\",\r\n\t\t\"Licensing info: https://dhtmlx.com/docs/products/dhtmlxScheduler/export.shtml\"\r\n\t].join(\"\\n\"));\r\n};\r\n\r\n\r\n}","\r\nimport nav_bar from \"./nav_bar\";\r\nimport scheduler_resize_listener from \"./scheduler_resize_listener\";\r\nimport eventable from \"../utils/eventable\";\r\n\r\n\r\nexport default function extend(scheduler) {\r\n\r\neventable(scheduler);\r\n\r\nnav_bar(scheduler);\r\n\r\nscheduler._detachDomEvent = function(el, event, handler){\r\n\tif (el.removeEventListener){\r\n\t\tel.removeEventListener(event, handler, false);\r\n\r\n\t}else if (el.detachEvent){\r\n\t\tel.detachEvent(\"on\"+event, handler);\r\n\t}\r\n};\r\n\r\n\r\nscheduler._init_once = function(){\r\n\tscheduler_resize_listener(scheduler);\r\n\r\n\tscheduler._init_once = function(){};\r\n};\r\n\r\nconst layout = {\r\n\t\"navbar\": {\r\n\t\trender: function (config) {\r\n\t\t\treturn scheduler._init_nav_bar(config);\r\n\t\t}\r\n\t},\r\n\t\"header\": {\r\n\t\trender: function (config) {\r\n\t\t\tconst element = document.createElement(\"div\");\r\n\t\t\telement.className = \"dhx_cal_header\";\r\n\t\t\treturn element;\r\n\t\t}\r\n\t},\r\n\t\"dataArea\": {\r\n\t\trender: function (config) {\r\n\t\t\tconst element = document.createElement(\"div\");\r\n\t\t\telement.className = \"dhx_cal_data\";\r\n\t\t\treturn element;\r\n\t\t}\r\n\t},\r\n\t\"html_element\": {\r\n\t\trender: function (config) {\r\n\t\t\treturn config.html;\r\n\t\t}\r\n\t}\r\n};\r\n\r\nfunction hasSchedulerMarkup(element){\r\n\treturn !!(\r\n\t\telement.querySelector(\".dhx_cal_header\") &&\r\n\t\telement.querySelector(\".dhx_cal_data\") &&\r\n\t\telement.querySelector(\".dhx_cal_navline\")\r\n\t\t);\r\n}\r\n\r\nfunction createDefaultHeader(scheduler){\r\n\tconst views = [\r\n\t\t\"day\",\r\n\t\t\"week\",\r\n\t\t\"month\"\r\n\t];\r\n\tconst date = [\r\n\t\t\"date\"\r\n\t];\r\n\tconst nav = [\r\n\t\t\"prev\",\r\n\t\t\"today\",\r\n\t\t\"next\"\r\n\t];\r\n\r\n\tif(scheduler.matrix){\r\n\t\tfor(const i in scheduler.matrix){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\tif(scheduler._props){\r\n\t\tfor(const i in scheduler._props){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\r\n\tif(scheduler._grid && scheduler._grid.names){\r\n\t\tfor(const i in scheduler._grid.names){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\r\n\tconst optionalViews = [\r\n\t\t\"map\",\r\n\t\t\"agenda\",\r\n\t\t\"week_agenda\",\r\n\t\t\"year\"\r\n\t];\r\n\r\n\toptionalViews.forEach(function(viewName){\r\n\t\tif(scheduler[viewName + \"_view\"]){\r\n\t\t\tviews.push(viewName);\r\n\t\t}\r\n\t});\r\n\r\n\treturn views.concat(date).concat(nav);\r\n}\r\n\r\nscheduler.init=function(id,date,mode){\r\n\tif(this.$destroyed){\r\n\t\treturn; // not have errors when try to reinit destroyed scheduler\r\n\t}\r\n\tdate=date||(scheduler._currentDate());\r\n\tmode=mode||\"week\";\r\n\r\n\tif(this._obj){\r\n\t\tthis.unset_actions();\r\n\t}\r\n\r\n\tthis._obj=(typeof id == \"string\")?document.getElementById(id):id;\r\n\tthis.$container = this._obj;\r\n\tthis.$root = this._obj;\r\n\r\n\tif(!this.$container.offsetHeight && this.$container.offsetWidth && this.$container.style.height === \"100%\"){\r\n\t\t// scheduler container has zero height and non-zero width\r\n\t\twindow.console.error(scheduler._commonErrorMessages.collapsedContainer(), this.$container);\r\n\t}\r\n\r\n\tif(this.config.wai_aria_attributes && this.config.wai_aria_application_role){\r\n\t\tthis.$container.setAttribute(\"role\", \"application\");\r\n\t}\r\n\r\n\tif(!this.config.header && !hasSchedulerMarkup(this.$container)){\r\n\t\t// if no header config and no required markup - use the default header\r\n\t\t// so the scheduler could be initialized in an empty div\r\n\t\tthis.config.header = createDefaultHeader(this);\r\n\t\twindow.console.log([// jshint ignore:line\r\n\t\t\t\"Required DOM elements are missing from the scheduler container and **scheduler.config.header** is not specified.\",\r\n\t\t\t\"Using a default header configuration: \",\r\n\t\t\t\"scheduler.config.header = \" + JSON.stringify(this.config.header, null, 2),\r\n\t\t\t\"Check this article for the details: https://docs.dhtmlx.com/scheduler/initialization.html\"\r\n\t\t].join(\"\\n\"));// jshint ignore:line\r\n\t}\r\n\r\n\tif (this.config.header) {\r\n\t\tthis.$container.innerHTML = \"\";\r\n\t\tthis.$container.classList.add(\"dhx_cal_container\");\r\n\t\tif(this.config.header.height){\r\n\t\t\tthis.xy.nav_height = this.config.header.height;\r\n\t\t}\r\n\t\tthis.$container.appendChild(layout.navbar.render(this.config.header));\r\n\t\tthis.$container.appendChild(layout.header.render());\r\n\t\tthis.$container.appendChild(layout.dataArea.render());\r\n\t} else {\r\n\t\t// if no header config provided - make sure scheduler container has all necessary elements\r\n\t\tif(!hasSchedulerMarkup(this.$container)){\r\n\t\t\tthrow new Error([\r\n\t\t\t\t\"Required DOM elements are missing from the scheduler container.\",\r\n\t\t\t\t\"Be sure to either specify them manually in the markup: https://docs.dhtmlx.com/scheduler/initialization.html#initializingschedulerviamarkup\",\r\n\t\t\t\t\"Or to use **scheduler.config.header** setting so they could be created automatically: https://docs.dhtmlx.com/scheduler/initialization.html#initializingschedulerviaheaderconfig\"\r\n\t\t\t].join(\"\\n\"));\r\n\t\t}\r\n\t}\r\n\r\n\tif (this.config.rtl) this.$container.className += \" dhx_cal_container_rtl\";\r\n\r\n\t//hook for terrace skin\r\n\tif (this._skin_init)\r\n\t\tscheduler._skin_init();\r\n\r\n\tscheduler.date.init();\r\n\r\n\tthis._scroll=true;\r\n\r\n\tthis._els=[];\r\n\tthis.get_elements();\r\n\tthis.init_templates();\r\n\tthis.set_actions();\r\n\r\n\tthis._init_once();\r\n\tthis._init_touch_events();\r\n\r\n\tthis.set_sizes();\r\n\tscheduler.callEvent('onSchedulerReady', []);\r\n\tscheduler.$initialized = true;\r\n\tthis.setCurrentView(date,mode);\r\n\r\n};\r\n\r\nscheduler.xy={\r\n\tmin_event_height:20,\r\n\tbar_height: 24,\r\n\tscale_width:50,\r\n\tscroll_width:18,\r\n\tscale_height:20,\r\n\tmonth_scale_height:20,\r\n\tmenu_width:25,\r\n\tmargin_top:0,\r\n\tmargin_left:0,\r\n\teditor_width:140,\r\n\tmonth_head_height:22,\r\n\tevent_header_height: 14\r\n};\r\nscheduler.keys={\r\n\tedit_save:13,\r\n\tedit_cancel:27\r\n};\r\n\r\nscheduler.bind = function bind(functor, object){\r\n\tif(functor.bind)\r\n\t\treturn functor.bind(object);\r\n\telse\r\n\t\treturn function(){ return functor.apply(object,arguments); };\r\n};\r\n\r\nscheduler.set_sizes=function(){\r\n\r\n\tvar w = this._x = this._obj.clientWidth-this.xy.margin_left;\r\n\r\n\t//not-table mode always has scroll - need to be fixed in future\r\n\tvar scale_x=this._table_view?0:(this.xy.scale_width+this.xy.scroll_width);\r\n\r\n\tvar materialScalePlaceholder = this.$container.querySelector(\".dhx_cal_scale_placeholder\");\r\n\tif(scheduler._is_material_skin()){\r\n\t\tif(!materialScalePlaceholder) {\r\n\t\t\tmaterialScalePlaceholder = document.createElement(\"div\");\r\n\t\t\tmaterialScalePlaceholder.className = \"dhx_cal_scale_placeholder\";\r\n\t\t\tthis.$container.insertBefore(materialScalePlaceholder, this._els[\"dhx_cal_header\"][0]);\r\n\t\t}\r\n\t\tmaterialScalePlaceholder.style.display = \"block\";\r\n\r\n\t\tthis.set_xy(materialScalePlaceholder,w,this.xy.scale_height + 1,0, this._els[\"dhx_cal_header\"][0].offsetTop);\r\n\r\n\t}else{\r\n\t\tif(materialScalePlaceholder){\r\n\t\t\tmaterialScalePlaceholder.parentNode.removeChild(materialScalePlaceholder);\r\n\t\t}\r\n\t}\r\n\r\n\tif (this._lightbox) {\r\n\t\tif (scheduler.$container.offsetWidth < 1200) {\r\n\t\t} else {\r\n\t\t\tthis._setLbPosition(document.querySelector(\".dhx_cal_light\"));\r\n\t\t}\r\n\t}\r\n\r\n\tthis._data_width = w-scale_x;\r\n\r\n\tthis._els[\"dhx_cal_navline\"][0].style.width = w + \"px\";\r\n\tconst header = this._els[\"dhx_cal_header\"][0];\r\n\tthis.set_xy(header, this._data_width, this.xy.scale_height);\r\n\t// this._els[\"dhx_cal_header\"][0].style.marginLeft = `${scheduler.xy.scale_width}px`;\r\n\theader.style.left = ``;\r\n\theader.style.right = ``;\r\n\tif(!this._table_view){\r\n\t\tif(this.config.rtl){\r\n\t\t\theader.style.right = `${this.xy.scale_width}px`;\r\n\t\t}else{\r\n\t\t\theader.style.left = `${this.xy.scale_width}px`;\r\n\t\t}\r\n\t} else {\r\n\t\tif(!this.config.rtl){\r\n\t\t\theader.style.left = `-1px`;\r\n\t\t} else {\r\n\t\t\theader.style.right = `-1px`;\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.set_xy=function(node,w,h,x,y){\r\n\tfunction prepareValue(val){\r\n\t\tlet prepared = val;\r\n\t\tif(!isNaN(Number(prepared))){\r\n\t\t\tprepared = Math.max(0,prepared) + \"px\";\r\n\t\t}\r\n\t\treturn prepared;\r\n\t}\r\n\r\n\tvar direction = 'left';\r\n\r\n\tif(w !== undefined) {\r\n\t\tnode.style.width = prepareValue(w);\r\n\t}\r\n\r\n\tif(h !== undefined){\r\n\t\tnode.style.height = prepareValue(h);\r\n\t}\r\n\r\n\tif (arguments.length>3){\r\n\r\n\t\tif(x !== undefined){\r\n\t\t\tif (this.config.rtl) direction = 'right';\r\n\t\t\tnode.style[direction]=x+\"px\";\r\n\t\t}\r\n\t\tif(y !== undefined){\r\n\t\t\tnode.style.top=y+\"px\";\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.get_elements=function(){\r\n\t//get all child elements as named hash\r\n\tconst els=this._obj.getElementsByTagName(\"DIV\");\r\n\tfor (let i=0; i < els.length; i++){\r\n\t\tlet class_name= scheduler._getClassName(els[i]);\r\n\t\tconst attr_value = els[i].getAttribute(\"data-tab\") || els[i].getAttribute(\"name\") || \"\";\r\n\t\tif (class_name) class_name = class_name.split(\" \")[0];\r\n\t\tif (!this._els[class_name]) this._els[class_name]=[];\r\n\t\tthis._els[class_name].push(els[i]);\r\n\r\n\t\t//check if name need to be changed\r\n\t\t// scheduler.locale.labels[attr_value+\"_tab\"] - to fix getting labels for data-tab\r\n\t\tlet label = scheduler.locale.labels[attr_value+\"_tab\"] || scheduler.locale.labels[attr_value||class_name];\r\n\t\tif (typeof label !== \"string\" && attr_value && !els[i].innerHTML)\r\n\t\t\tlabel = attr_value.split(\"_\")[0];\r\n\t\tif (label) {\r\n\t\t\tthis._waiAria.labelAttr(els[i], label);\r\n\t\t\tels[i].innerHTML = label;\r\n\t\t}\r\n\t}\r\n};\r\n\r\n\r\nconst domEventsScope = scheduler._createDomEventScope();\r\n\r\nscheduler.unset_actions = function(){\r\n\tdomEventsScope.detachAll();\r\n};\r\n\r\nscheduler.set_actions=function(){\r\n\tfor (const a in this._els){\r\n\t\tif (this._click[a]){\r\n\t\t\tfor (let i=0; i < this._els[a].length; i++){\r\n\t\t\t\tconst element = this._els[a][i];\r\n\t\t\t\tconst handler = this._click[a].bind(element);\r\n\t\t\t\tdomEventsScope.attach(element, \"click\", handler);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tdomEventsScope.attach(this._obj, \"selectstart\", function(e){\r\n\t\te.preventDefault();\r\n\t\treturn false;\r\n\t});\r\n\t//this._obj.onselectstart=function(e){ return false; };\r\n\tdomEventsScope.attach(this._obj, \"mousemove\", function(e){\r\n\t\tif (!scheduler._temp_touch_block)\r\n\t\t\tscheduler._on_mouse_move(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"mousedown\", function(e){\r\n\t\tif (!scheduler._ignore_next_click)\r\n\t\t\tscheduler._on_mouse_down(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"mouseup\", function(e){\r\n\t\tif (!scheduler._ignore_next_click)\r\n\t\t\tscheduler._on_mouse_up(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"dblclick\", function(e){\r\n\t\tscheduler._on_dbl_click(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"contextmenu\", function(event) {\r\n\t\tif(scheduler.checkEvent(\"onContextMenu\")){\r\n\t\t\t// block the default browser context menu \r\n\t\t\tevent.preventDefault();\r\n\t\t}\r\n\r\n\t\tconst returnValue = scheduler.callEvent(\"onContextMenu\", [scheduler._locate_event(event.target), event]);\r\n\t\treturn returnValue;\r\n\t});\r\n};\r\nscheduler.select=function(id){\r\n\tif (this._select_id==id) return;\r\n\tscheduler._close_not_saved();\r\n\tthis.editStop(false);\r\n\tif(this._select_id){\r\n\t\tthis.unselect();\r\n\t}\r\n\tthis._select_id = id;\r\n\tthis.updateEvent(id);\r\n\tthis.callEvent(\"onEventSelected\", [id]);\r\n};\r\nscheduler.unselect=function(id){\r\n\tif (id && id!=this._select_id) {\r\n\t\treturn;\r\n\t}\r\n\tconst previousSelection = this._select_id;\r\n\tthis._select_id = null;\r\n\tif (previousSelection && this.getEvent(previousSelection)) {\r\n\t\tthis.updateEvent(previousSelection);\r\n\t}\r\n\tthis.callEvent(\"onEventUnselected\", [previousSelection]);\r\n};\r\nscheduler.getState=function(){\r\n\treturn {\r\n\t\tmode: this._mode,\r\n\t\tdate: new Date(this._date),\r\n\t\tmin_date: new Date(this._min_date),\r\n\t\tmax_date: new Date(this._max_date),\r\n\t\teditor_id: this._edit_id,\r\n\t\tlightbox_id: this._lightbox_id,\r\n\t\tnew_event: this._new_event,\r\n\t\tselect_id: this._select_id,\r\n\t\texpanded: this.expanded,\r\n\t\tdrag_id: this._drag_id,\r\n\t\tdrag_mode: this._drag_mode\r\n\t};\r\n};\r\nscheduler._click={\r\n\tdhx_cal_data:function(e){\r\n\t\t//in case of touch disable click processing\r\n\t\tif (scheduler._ignore_next_click){\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\r\n\t\tconst id = scheduler._locate_event(e.target);\r\n\r\n\t\tif (!id) {\r\n\t\t\tscheduler.callEvent(\"onEmptyClick\",[scheduler.getActionData(e).date, e]);\r\n\t\t} else {\r\n\t\t\tif ( !scheduler.callEvent(\"onClick\",[id,e]) || scheduler.config.readonly ) return;\r\n\t\t}\r\n\r\n\t\tif (id && scheduler.config.select) {\r\n\r\n\t\t\tscheduler.select(id);\r\n\t\t\tconst icon = e.target.closest(\".dhx_menu_icon\");\r\n\r\n\t\t\tconst mask = scheduler._getClassName(icon);\r\n\t\t\tif (mask.indexOf(\"_icon\")!=-1)\r\n\t\t\t\tscheduler._click.buttons[mask.split(\" \")[1].replace(\"icon_\",\"\")](id);\r\n\t\t} else{\r\n\t\t\tscheduler._close_not_saved();\r\n\t\t\tif (scheduler.getState().select_id && new Date().valueOf()-(scheduler._new_event||0) > 500){\r\n\t\t\t\tscheduler.unselect();\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tdhx_cal_prev_button:function(){\r\n\t\tscheduler._click.dhx_cal_next_button(0,-1);\r\n\t},\r\n\tdhx_cal_next_button:function(dummy,step){\r\n\t\tlet def_step = 1;\r\n\t\tif (scheduler.config.rtl){\r\n\t\t\tstep = -step;\r\n\t\t\tdef_step = -def_step;\r\n\t\t}\r\n\t\tscheduler.setCurrentView(scheduler.date.add( //next line changes scheduler._date , but seems it has not side-effects\r\n\t\t\tscheduler.date[scheduler._mode+\"_start\"](new Date(scheduler._date)),(step||def_step),scheduler._mode));\r\n\t},\r\n\tdhx_cal_today_button:function(){\r\n\t\tif (scheduler.callEvent(\"onBeforeTodayDisplayed\", [])) {\r\n\t\t\tscheduler.setCurrentView(scheduler._currentDate());\r\n\t\t}\r\n\t},\r\n\tdhx_cal_tab:function(){\r\n\t\tconst name = this.getAttribute(\"data-tab\");\r\n\t\tconst deprecated_name = this.getAttribute(\"name\");\r\n\t\tconst mode = name || deprecated_name.substring(0, deprecated_name.search(\"_tab\"));\r\n\t\tscheduler.setCurrentView(scheduler._date,mode);\r\n\t},\r\n\tbuttons:{\r\n\t\t\"delete\":function(id){\r\n\t\t\tconst c = scheduler.locale.labels.confirm_deleting;\r\n\t\t\tscheduler._dhtmlx_confirm({message: c, title: scheduler.locale.labels.title_confirm_deleting, callback:function(){ scheduler.deleteEvent(id); },\r\n\t\t\tconfig: {ok: scheduler.locale.labels.icon_delete}\r\n\t\t});\r\n\t\t},\r\n\t\tedit:function(id){ scheduler.edit(id); },\r\n\t\tsave:function(id){ scheduler.editStop(true); },\r\n\t\tdetails:function(id){ scheduler.showLightbox(id); },\r\n\t\tform:function(id){ scheduler.showLightbox(id); },\r\n\t\tcancel:function(id){ scheduler.editStop(false); }\r\n\t}\r\n};\r\nscheduler._dhtmlx_confirm = function({message, title, callback, config}) {\r\n\tif (!message)\r\n\t\treturn callback();\r\n\r\n\tconfig = config || {};\r\n\tconst opts = { ...config, text: message };\r\n\tif (title) {\r\n\t\topts.title = title;\r\n\t}\r\n\tif (callback) {\r\n\t\topts.callback = function(result) {\r\n\t\t\tif (result) {\r\n\t\t\t\tcallback();\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n\tscheduler.confirm(opts);\r\n};\r\nscheduler.addEventNow=function(start,end,e){\r\n\tlet base = {};\r\n\tif (scheduler._isObject(start) && !scheduler._isDate(start)){\r\n\t\tbase = start;\r\n\t\tstart = null;\r\n\t}\r\n\r\n\tconst duration = (this.config.event_duration||this.config.time_step)*60000;\r\n\tif (!start) start = base.start_date||Math.round((scheduler._currentDate()).valueOf()/duration)*duration;\r\n\tlet start_date = new Date(start);\r\n\tif (!end){\r\n\t\tlet start_hour = this.config.first_hour;\r\n\t\tif (start_hour > start_date.getHours()){\r\n\t\t\tstart_date.setHours(start_hour);\r\n\t\t\tstart = start_date.valueOf();\r\n\t\t}\r\n\t\tend = start.valueOf()+duration;\r\n\t}\r\n\tlet end_date = new Date(end);\r\n\r\n\t// scheduler.addEventNow(new Date(), new Date()) + collision though get_visible events defect (such event was not retrieved)\r\n\tif(start_date.valueOf() == end_date.valueOf())\r\n\t\tend_date.setTime(end_date.valueOf()+duration);\r\n\tbase.start_date = base.start_date||start_date;\r\n\tbase.end_date = base.end_date||end_date;\r\n\tbase.text = base.text||this.locale.labels.new_event;\r\n\tbase.id = this._drag_id = base.id || this.uid();\r\n\tthis._drag_mode=\"new-size\";\r\n\tthis._loading=true;\r\n\tconst eventId = this.addEvent(base);\r\n\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\tthis._loading=false;\r\n\r\n\tthis._drag_event={}; //dummy , to trigger correct event updating logic\r\n\tthis._on_mouse_up(e);\r\n\treturn eventId;\r\n};\r\nscheduler._on_dbl_click=function(e,src){\r\n\tsrc = src || e.target;\r\n\tif (this.config.readonly) return;\r\n\tconst name = scheduler._getClassName(src).split(\" \")[0];\r\n\tswitch(name){\r\n\t\tcase \"dhx_scale_holder\":\r\n\t\tcase \"dhx_scale_holder_now\":\r\n\t\tcase \"dhx_month_body\":\r\n\t\tcase \"dhx_wa_day_data\":\r\n\t\t\tif (!scheduler.config.dblclick_create) break;\r\n\t\t\tthis.addEventNow(this.getActionData(e).date,null,e);\r\n\t\t\tbreak;\r\n\t\tcase \"dhx_cal_event\":\r\n\t\tcase \"dhx_wa_ev_body\":\r\n\t\tcase \"dhx_agenda_line\":\r\n\t\tcase \"dhx_cal_agenda_event_line\":\r\n\t\tcase \"dhx_grid_event\":\r\n\t\tcase \"dhx_cal_event_line\":\r\n\t\tcase \"dhx_cal_event_clear\": {\r\n\t\t\tconst id = this._locate_event(src);\r\n\t\t\tif (!this.callEvent(\"onDblClick\",[id,e])) return;\r\n\t\t\tif (this.config.details_on_dblclick || this._table_view || !this.getEvent(id)._timed || !this.config.select)\r\n\t\t\t\tthis.showLightbox(id);\r\n\t\t\telse\r\n\t\t\t\tthis.edit(id);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tcase \"dhx_time_block\":\r\n\t\tcase \"dhx_cal_container\":\r\n\t\t\treturn;\r\n\t\tdefault: {\r\n\t\t\tconst viewHandler = this[\"dblclick_\"+name];\r\n\t\t\tif (viewHandler) {\r\n\t\t\t\tviewHandler.call(this,e);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif (src.parentNode && src != this)\r\n\t\t\t\t\treturn scheduler._on_dbl_click(e,src.parentNode);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n};\r\n//column index by mouse x-coordinate\r\nscheduler._get_column_index = function(x_pos){\r\n\tlet column = 0;\r\n\tif (this._cols){\r\n\t\tlet width = 0;\r\n\t\tlet i = 0;\r\n\t\twhile (width + this._cols[i] < x_pos && i < this._cols.length){\r\n\t\t\twidth += this._cols[i];\r\n\t\t\ti++;\r\n\t\t}\r\n\t\tcolumn = i + (this._cols[i] ? ((x_pos - width)/ this._cols[i]) : 0);\r\n\r\n\t\tif (this._ignores){\r\n\t\t\tif(column >= this._cols.length){\r\n\t\t\t\twhile(column >= 1 && this._ignores[Math.floor(column)]){\r\n\t\t\t\t\tcolumn--;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n\treturn column;\r\n};\r\n\r\n//transform mouse coordinates to day-time indexes of week based view\r\nscheduler._week_indexes_from_pos = function(pos){\r\n\t//\"get position\" can be invoked before columns are loaded into the units view(e.g. by onMouseMove handler in key_nav.js)\r\n\tif(!this._cols){\r\n\t\treturn pos;\r\n\t}else{\r\n\t\tconst column = this._get_column_index(pos.x);\r\n\r\n\t\tpos.x=Math.min(this._cols.length-1, Math.max(0,Math.ceil(column)-1));\r\n\t\tpos.y=Math.max(0,Math.ceil(pos.y*60/(this.config.time_step*this.config.hour_size_px))-1)+this.config.first_hour*(60/this.config.time_step);\r\n\t\treturn pos;\r\n\t}\r\n};\r\n\r\nscheduler._mouse_coords=function(ev){\r\n\tlet pos;\r\n\tconst body = document.body;\r\n\tconst documentElement = document.documentElement;\r\n\tif (!this.$env.isIE && (ev.pageX || ev.pageY))\r\n\t\tpos={x:ev.pageX, y:ev.pageY};\r\n\telse pos={\r\n\t\tx:ev.clientX + (body.scrollLeft||documentElement.scrollLeft||0) - body.clientLeft,\r\n\t\ty:ev.clientY + (body.scrollTop||documentElement.scrollTop||0) - body.clientTop\r\n\t};\r\n\t//apply layout\r\n\tif (this.config.rtl && this._colsS) {\r\n\t\tpos.x = this.$container.querySelector(\".dhx_cal_data\").offsetWidth - pos.x;\r\n\t\tpos.x += this.$domHelpers.getAbsoluteLeft(this._obj);\r\n\t\tif (this._mode !== \"month\") {\r\n\t\t\tpos.x -= this.xy.scale_width;\r\n\t\t}\r\n\t} else {\r\n\t\tpos.x-=this.$domHelpers.getAbsoluteLeft(this._obj)+(this._table_view?0:this.xy.scale_width);\r\n\t}\r\n\r\n\tconst dataArea = this.$container.querySelector(\".dhx_cal_data\");\r\n\t//pos.y-=this.$domHelpers.getAbsoluteTop(this._obj)+this.xy.nav_height+(this._dy_shift||0)+this.xy.scale_height-this._els[\"dhx_cal_data\"][0].scrollTop;\r\n\tpos.y-=this.$domHelpers.getAbsoluteTop(dataArea)-this._els[\"dhx_cal_data\"][0].scrollTop;\r\n\tpos.ev = ev;\r\n\tconst handler = this[\"mouse_\"+this._mode];\r\n\tif (handler){\r\n\t\tpos = handler.call(this,pos);\r\n\t}else{\r\n\t\t//transform to date\r\n\t\tif (!this._table_view) {\r\n\t\t\tpos = this._week_indexes_from_pos(pos);\r\n\t\t} else {\r\n\t\t\tconst column = this._get_column_index(pos.x);\r\n\t\t\tif (!this._cols || !this._colsS) // agenda/map views\r\n\t\t\t\treturn pos;\r\n\t\t\tlet dy=0;\r\n\t\t\tfor (dy=1; dy < this._colsS.heights.length; dy++)\r\n\t\t\t\tif (this._colsS.heights[dy]>pos.y) break;\r\n\r\n\t\t\tpos.y=Math.ceil( (Math.max(0, column)+Math.max(0,dy-1)*7)*24*60/this.config.time_step );\r\n\r\n\t\t\tif (scheduler._drag_mode || this._mode == \"month\")\r\n\t\t\t\tpos.y=(Math.max(0,Math.ceil(column)-1)+Math.max(0,dy-1)*7)*24*60/this.config.time_step;\r\n\r\n\t\t\t//we care about ignored days only during event moving in month view\r\n\t\t\tif (this._drag_mode == \"move\"){\r\n\t\t\t\tif (scheduler._ignores_detected && scheduler.config.preserve_length){\r\n\t\t\t\t\tpos._ignores = true;\r\n\t\t\t\t\t//get real lengtn of event\r\n\t\t\t\t\tif (!this._drag_event._event_length)\r\n\t\t\t\t\t\tthis._drag_event._event_length = this._get_real_event_length(this._drag_event.start_date, this._drag_event.end_date, { x_step:1, x_unit:\"day\"});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tpos.x=0;\r\n\t\t}\r\n\t}\r\n\tpos.timestamp = +new Date();\r\n\treturn pos;\r\n};\r\nscheduler._close_not_saved=function(){\r\n\tif (new Date().valueOf()-(scheduler._new_event||0) > 500 && scheduler._edit_id){\r\n\t\tconst confirmationText=scheduler.locale.labels.confirm_closing;\r\n\r\n\t\tscheduler._dhtmlx_confirm({\r\n\t\t\tmessage: confirmationText, \r\n\t\t\ttitle: scheduler.locale.labels.title_confirm_closing, \r\n\t\t\tcallback: function() { \r\n\t\t\t\tscheduler.editStop(scheduler.config.positive_closing);\r\n\t\t\t}\r\n\t\t});\r\n\t\tif(confirmationText){\r\n\t\t\tthis._drag_id = this._drag_pos = this._drag_mode = null;\r\n\t\t}\r\n\t}\r\n};\r\nscheduler._correct_shift=function(start, back){\r\n\treturn start-=((new Date(scheduler._min_date)).getTimezoneOffset()-(new Date(start)).getTimezoneOffset())*60000*(back?-1:1);\r\n};\r\n\r\nscheduler._is_pos_changed = function(old_pos, new_pos){\r\n\tfunction diff(old_val, new_val, acc){\r\n\t\treturn !!(Math.abs(old_val - new_val) > acc);\r\n\t}\r\n\r\n\tif(!(old_pos && this._drag_pos)){\r\n\t\treturn true;\r\n\t}\r\n\tconst delay = 100;\r\n\tconst d_pos = 5;\r\n\r\n\t// start drag only if passed some time since mouse down, or if mouse position changed sufficiently\r\n\treturn !!(this._drag_pos.has_moved || !this._drag_pos.timestamp || (new_pos.timestamp - this._drag_pos.timestamp > delay) || diff(old_pos.ev.clientX, new_pos.ev.clientX, d_pos) || diff(old_pos.ev.clientY, new_pos.ev.clientY, d_pos));\r\n};\r\n\r\nscheduler._correct_drag_start_date = function(start){\r\n\tlet obj;\r\n\tif (scheduler.matrix)\r\n\t\tobj = scheduler.matrix[scheduler._mode];\r\n\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\tstart = new Date(start);\r\n\tlet len = 1;\r\n\tif(obj._start_correction || obj._end_correction)\r\n\t\tlen = (obj.last_hour||0)*60 - (start.getHours()*60+start.getMinutes()) || 1;\r\n\r\n\treturn start*1 + (scheduler._get_fictional_event_length(start, len, obj) - len);\r\n};\r\nscheduler._correct_drag_end_date = function(start, duration){\r\n\tlet obj;\r\n\tif (scheduler.matrix) {\r\n\t\tobj = scheduler.matrix[scheduler._mode];\r\n\t}\r\n\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\tconst end = start*1 + scheduler._get_fictional_event_length(start, duration, obj);\r\n\treturn new Date(end*1 - (scheduler._get_fictional_event_length(end, -1, obj, -1) + 1));\r\n};\r\n\r\nscheduler._on_mouse_move=function(e){\r\n\tif (this._drag_mode){\r\n\t\tvar pos=this._mouse_coords(e);\r\n\t\tif (this._is_pos_changed(this._drag_pos, pos)){\r\n\t\t\tvar start, end;\r\n\t\t\tif (this._edit_id!=this._drag_id)\r\n\t\t\t\tthis._close_not_saved();\r\n\r\n\t\t\tif(!this._drag_mode)\r\n\t\t\t\treturn;\r\n\r\n\t\t\tvar mousedownPos = null;\r\n\t\t\tif(this._drag_pos && !this._drag_pos.has_moved){\r\n\t\t\t\tmousedownPos = this._drag_pos;\r\n\t\t\t\tmousedownPos.has_moved = true;\r\n\t\t\t}\r\n\r\n\t\t\tthis._drag_pos = pos;\r\n\r\n\t\t\tthis._drag_pos.has_moved = true;\r\n\r\n\t\t\tif (this._drag_mode==\"create\"){\r\n\r\n\t\t\t\t// use mouse down position as a starting point for drag-create\r\n\t\t\t\tif(mousedownPos){\r\n\t\t\t\t\tpos = mousedownPos;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis._close_not_saved();\r\n\t\t\t\tthis.unselect(this._select_id);\r\n\t\t\t\tthis._loading=true; //will be ignored by dataprocessor\r\n\r\n\t\t\t\tstart = this._get_date_from_pos(pos).valueOf();\r\n\r\n\t\t\t\tif (!this._drag_start) {\r\n\t\t\t\t\tvar res = this.callEvent(\"onBeforeEventCreated\", [e, this._drag_id]);\r\n\t\t\t\t\tif (!res){\r\n\t\t\t\t\t\tthis._loading=false;\r\n\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis._loading=false;\r\n\t\t\t\t\tthis._drag_start=start;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tend = start;\r\n\t\t\t\tif (end == this._drag_start) {\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar start_date = new Date(this._drag_start);\r\n\t\t\t\tvar end_date = new Date(end);\r\n\t\t\t\tif ( (this._mode == \"day\" || this._mode == \"week\") &&\r\n\t\t\t\t\t(start_date.getHours() == end_date.getHours() &&\r\n\t\t\t\t\tstart_date.getMinutes() == end_date.getMinutes()) ) {\r\n\t\t\t\t\t\tend_date = new Date(this._drag_start+1000);\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\tthis._drag_id=this.uid();\r\n\t\t\t\tthis.addEvent(start_date, end_date, this.locale.labels.new_event, this._drag_id, pos.fields);\r\n\r\n\t\t\t\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\t\t\t\tthis._loading=false;\r\n\t\t\t\tthis._drag_mode=\"new-size\";\r\n\r\n\t\t\t}\r\n\r\n\t\t\tvar timeStep = this.config.time_step;\r\n\t\t\tvar ev=this.getEvent(this._drag_id);\r\n\t\t\tvar obj;\r\n\t\t\tif (scheduler.matrix)\r\n\t\t\t\tobj = scheduler.matrix[scheduler._mode];\r\n\t\t\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\t\t\tif (this._drag_mode==\"move\"){\r\n\t\t\t\tstart = this._min_date.valueOf()+(pos.y*this.config.time_step+pos.x*24*60)*60000;\r\n\t\t\t\tif (!pos.custom && this._table_view) {\r\n\t\t\t\t\tstart += this.date.time_part(ev.start_date) * 1000;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!this._table_view && this._dragEventBody && this._drag_event._move_event_shift === undefined) {\r\n\t\t\t\t\tthis._drag_event._move_event_shift = start - ev.start_date;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (this._drag_event._move_event_shift) {\r\n\t\t\t\t\tstart -= this._drag_event._move_event_shift;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tstart = this._correct_shift(start);\r\n\r\n\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view && obj){\r\n\r\n\t\t\t\t\tstart = scheduler._correct_drag_start_date(start);\r\n\t\t\t\t\tend = scheduler._correct_drag_end_date(start,this._drag_event._event_length);\r\n\r\n\t\t\t\t} else\r\n\t\t\t\t\tend = ev.end_date.valueOf()-(ev.start_date.valueOf()-start);\r\n\t\t\t} else { // resize\r\n\t\t\t\tstart = ev.start_date.valueOf();\r\n\t\t\t\tend = ev.end_date.valueOf();\r\n\t\t\t\tif (this._table_view) {\r\n\t\t\t\t\tvar resize_date = this._min_date.valueOf()+pos.y*this.config.time_step*60000 + (pos.custom?0:24*60*60000);\r\n\t\t\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\t\t\tresize_date = this._correct_shift(resize_date, false);\r\n\t\t\t\t\t\tif( this._drag_from_start ) {\r\n\t\t\t\t\t\t\tvar day = 24*60*60000;\r\n\t\t\t\t\t\t\tif( resize_date <= scheduler.date.date_part(new Date(end+day-1)).valueOf() ) // to get end time as 23:59:59 and then the day start\r\n\t\t\t\t\t\t\t\tstart = resize_date - day;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tend = resize_date;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif(this.config.preserve_length) {\r\n\t\t\t\t\t\t\tif (pos.resize_from_start) {\r\n\t\t\t\t\t\t\t\tstart = scheduler._correct_drag_start_date(resize_date);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tend = scheduler._correct_drag_end_date(resize_date, 0);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tif (pos.resize_from_start) {\r\n\t\t\t\t\t\t\t\tstart = resize_date;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tend = resize_date;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvar end_day_start = this.date.date_part(new Date(ev.end_date.valueOf() - 1)).valueOf();\r\n\t\t\t\t\tvar end_day_date = new Date(end_day_start);\r\n\t\t\t\t\tvar firstHour = this.config.first_hour;\r\n\t\t\t\t\tvar lastHour = this.config.last_hour;\r\n\t\t\t\t\tvar maxY = (lastHour - firstHour) * (60/timeStep);\r\n\r\n\t\t\t\t\tthis.config.time_step = 1;\r\n\t\t\t\t\tvar precisePos = this._mouse_coords(e);\r\n\t\t\t\t\tthis.config.time_step = timeStep;\r\n\r\n\t\t\t\t\tvar minDate = pos.y*timeStep*60000;\r\n\t\t\t\t\tvar maxDate = Math.min(pos.y + 1, maxY)*timeStep*60000;\r\n\t\t\t\t\tvar preciseDate = precisePos.y*60000;\r\n\r\n\t\t\t\t\t// rounding end date to the closest time step\r\n\t\t\t\t\tif(Math.abs(minDate - preciseDate) > Math.abs(maxDate - preciseDate)){\r\n\t\t\t\t\t\tend = end_day_start + maxDate;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tend = end_day_start + minDate;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = end + ((new Date(end)).getTimezoneOffset() - end_day_date.getTimezoneOffset()) * 60000;\r\n\t\t\t\t\tthis._els[\"dhx_cal_data\"][0].style.cursor=\"s-resize\";\r\n\t\t\t\t\tif (this._mode == \"week\" || this._mode == \"day\")\r\n\t\t\t\t\t\tend = this._correct_shift(end);\r\n\t\t\t\t}\r\n\t\t\t\tif (this._drag_mode == \"new-size\") {\r\n\t\t\t\t\tif (end <= this._drag_start){\r\n\t\t\t\t\t\tvar shift = pos.shift||((this._table_view && !pos.custom)?24*60*60000:0);\r\n\t\t\t\t\t\tstart = end-(pos.shift?0:shift);\r\n\t\t\t\t\t\tend = this._drag_start+(shift||(timeStep*60000));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tstart = this._drag_start;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (end<=start)\r\n\t\t\t\t\t\tend=start+timeStep*60000;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar new_end = new Date(end-1);\r\n\t\t\tvar new_start = new Date(start);\r\n\t\t\t//deny drag out of visible scheduler scale in timeline view\r\n\t\t\tif(this._drag_mode==\"move\" && scheduler.config.limit_drag_out &&\r\n\t\t\t\t(+new_start < +scheduler._min_date || +end > +scheduler._max_date)){\r\n\r\n\t\t\t\tif(+ev.start_date < +scheduler._min_date || +ev.end_date > +scheduler._max_date){\r\n\t\t\t\t\t// not move event if it's already outside time scale\r\n\t\t\t\t\tnew_start = new Date(ev.start_date);\r\n\t\t\t\t\tend = new Date(ev.end_date);\r\n\t\t\t\t}else{\r\n\r\n\t\t\t\t\tvar duration = end - new_start;\r\n\r\n\t\t\t\t\tif(+new_start < +scheduler._min_date){\r\n\t\t\t\t\t\tnew_start = new Date(scheduler._min_date);\r\n\t\t\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view){\r\n\t\t\t\t\t\t\tnew_start = new Date(scheduler._correct_drag_start_date(new_start));\r\n\t\t\t\t\t\t\tif(obj._start_correction)\r\n\t\t\t\t\t\t\t\tnew_start = new Date(new_start.valueOf() + obj._start_correction);\r\n\t\t\t\t\t\t\tend = new Date(new_start*1 + this._get_fictional_event_length(new_start, this._drag_event._event_length, obj));\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tend = new Date(+new_start + duration);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tend = new Date(scheduler._max_date);\r\n\r\n\t\t\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view){\r\n\t\t\t\t\t\t\tif(obj._end_correction)\r\n\t\t\t\t\t\t\t\tend = new Date(end.valueOf() - obj._end_correction);\r\n\t\t\t\t\t\t\tend = new Date(end*1 - this._get_fictional_event_length(end, 0, obj, true));\r\n\t\t\t\t\t\t\tnew_start = new Date(end*1 - this._get_fictional_event_length(end, this._drag_event._event_length, obj, true));\r\n\t\t\t\t\t\t\tif(this._ignores_detected){\r\n\t\t\t\t\t\t\t\tnew_start = scheduler.date.add(new_start, obj.x_step, obj.x_unit);\r\n\t\t\t\t\t\t\t\tend = new Date(end*1 - this._get_fictional_event_length(end, 0, obj, true));\r\n\t\t\t\t\t\t\t\tend = scheduler.date.add(end, obj.x_step, obj.x_unit);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tnew_start = new Date(+end - duration);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t\tvar new_end = new Date(end-1);\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\t// fix event dates when resized to bottom of the column (day/week views)\r\n\t\t\tif(!this._table_view && this._dragEventBody &&\r\n\t\t\t\t!scheduler.config.all_timed &&\r\n\t\t\t\t((!scheduler._get_section_view() && pos.x != this._get_event_sday({start_date: new Date(start), end_date:new Date(start)})) || new Date(start).getHours() < this.config.first_hour)){\r\n\t\t\t\tvar duration = end - new_start;\r\n\t\t\t\tif (this._drag_mode == \"move\") {\r\n\t\t\t\t\tvar day = this._min_date.valueOf() + (pos.x * 24 * 60) * 60000;\r\n\t\t\t\t\tnew_start = new Date(day);\r\n\t\t\t\t\tnew_start.setHours(this.config.first_hour);\r\n\t\t\t\t\tend = new Date(new_start.valueOf() + duration);\r\n\t\t\t\t\tnew_end = new Date(end-1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// fix event dates when resized to bottom of the column (day/week views)\r\n\t\t\tif(!this._table_view &&\r\n\t\t\t\t!scheduler.config.all_timed &&\r\n\t\t\t\t((!scheduler.getView() && pos.x != this._get_event_sday({start_date: new Date(end), end_date:new Date(end)})) || new Date(end).getHours() >= this.config.last_hour)){\r\n\t\t\t\tvar duration = end - new_start;\r\n\t\t\t\tvar day = this._min_date.valueOf()+(pos.x*24*60)*60000;\r\n\t\t\t\tend = scheduler.date.date_part(new Date(day));\r\n\t\t\t\tend.setHours(this.config.last_hour);\r\n\t\t\t\tnew_end = new Date(end-1);\r\n\t\t\t\tif(this._drag_mode == \"move\"){\r\n\t\t\t\t\tnew_start = new Date(+end - duration);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//prevent out-of-borders situation for day|week view\r\n\t\t\tif ( this._table_view || (new_end.getDate()==new_start.getDate() && new_end.getHours()=ed)\r\n\t\t\t\tcls += ' dhx_after';\r\n\t\t\telse if (sd.valueOf()==cd.valueOf())\r\n\t\t\t\tcls += ' dhx_now';\r\n\r\n\t\t\tif (this._ignores_detected && this._ignores[j]){\r\n\t\t\t\tcls += \" dhx_scale_ignore\";\r\n\t\t\t}\r\n\r\n\t\t\tcell.className = cls + \" \" + this.templates.month_date_class(sd, cd);\r\n\r\n\t\t\tcell.setAttribute(\"data-cell-date\", scheduler.templates.format_date(sd));\r\n\t\t\tvar body_class = \"dhx_month_body\";\r\n\t\t\tvar head_class = \"dhx_month_head\";\r\n\t\t\tif (j === 0 && this.config.left_border) {\r\n\t\t\t\tbody_class += \" dhx_month_body_border\";\r\n\t\t\t\thead_class += \" dhx_month_head_border\";\r\n\t\t\t}\r\n\t\t\tif (!this._ignores_detected || !this._ignores[j]){\r\n\t\t\t\tcell.style.width = tdwidths[j];\r\n\t\t\t\tthis._waiAria.monthCellAttr(cell, sd);\r\n\r\n\t\t\t\tvar cellHead = document.createElement(\"div\");\r\n\t\t\t\tcellHead.style.height = scheduler.xy.month_head_height + \"px\";\r\n\t\t\t\tcellHead.className = head_class;\r\n\t\t\t\tcellHead.innerHTML = this.templates.month_day(sd);\r\n\t\t\t\tcell.appendChild(cellHead);\r\n\r\n\t\t\t\tvar cellBody = document.createElement(\"div\");\r\n\t\t\t\tcellBody.className = body_class;\r\n\t\t\t\t// cellBody.style.height = row_height + \"px\";\r\n\t\t\t\t// cellBody.style.width = tdwidths[j];\r\n\t\t\t\tcell.appendChild(cellBody);\r\n\r\n\t\t\t} else {\r\n\t\t\t\tcell.appendChild(document.createElement(\"div\"));\r\n\t\t\t\tcell.appendChild(document.createElement(\"div\"));\r\n\t\t\t}\r\n\t\t\trendered_dates.push(sd);\r\n\t\t\tvar bf1 = sd.getDate();\r\n\t\t\tsd=this.date.add(sd,1,\"day\");\r\n\t\t\tif (sd.getDate() - bf1 > 1)\r\n\t\t\t\tsd = new Date(sd.getFullYear(), sd.getMonth(), bf1 + 1, 12, 0);\r\n\t\t}\r\n\r\n\t\tscheduler._colsS.heights[i] = cellheight;\r\n\t\tcellheight += getCellHeight(i);\r\n\t}\r\n\r\n\tthis._min_date = view_start;\r\n\tthis._max_date = sd;\r\n\r\n\tdiv.innerHTML = \"\";\r\n\tdiv.appendChild(table);\r\n\r\n\tthis._scales = {};\r\n\tvar cells = div.querySelectorAll('[data-cell-date]');\r\n\tcells.forEach((cell) => {\r\n\t\tconst date = scheduler.templates.parse_date(cell.getAttribute(\"data-cell-date\"));\r\n\t\tconst body = cell.querySelector(\".dhx_month_body\");\r\n\t\tthis._scales[+date] = body;\r\n\t\tthis.callEvent(\"onScaleAdd\", [this._scales[+date], date]);\r\n\t});\r\n\r\n\treturn this._max_date;\r\n};\r\n\r\nscheduler._reset_month_scale=function(b,dd,sd,rows){\r\n\t//recalculates rows height and redraws month layout\r\n\tvar ed=scheduler.date.add(dd,1,\"month\");\r\n\r\n\t//trim time part for comparison reasons\r\n\tvar cd = scheduler._currentDate();\r\n\tthis.date.date_part(cd);\r\n\tthis.date.date_part(sd);\r\n\r\n\trows = rows || Math.ceil(Math.round((ed.valueOf()-sd.valueOf()) / (60*60*24*1000) ) / 7);\r\n\r\n\tvar height = (Math.floor(b.clientHeight/rows) - this.xy.month_head_height);\r\n\r\n\tthis._colsS.height = height + this.xy.month_head_height;\r\n\tthis._colsS.heights = [];\r\n\r\n\treturn scheduler._render_month_scale(b, dd, sd, rows);\r\n\r\n};\r\n\r\nscheduler.getView = function (viewName) {\r\n\tif (!viewName) {\r\n\t\tviewName = scheduler.getState().mode;\r\n\t}\r\n\tif (scheduler.matrix && scheduler.matrix[viewName]) {\r\n\t\treturn scheduler.matrix[viewName];\r\n\t}\r\n\r\n\tif (scheduler._props && scheduler._props[viewName]) {\r\n\t\treturn scheduler._props[viewName];\r\n\t}\r\n\r\n\treturn null;\r\n};\r\n\r\nscheduler.getLabel = function(property, key) {\r\n\tvar sections = this.config.lightbox.sections;\r\n\tfor (var i=0; i scheduler.getState().max_date.valueOf()){\r\n\t\t\tendColumnIndex += getDaysDifference(endDate, scheduler.getState().max_date);\r\n\t\t}\r\n\t} else{\r\n\t\tendColumnIndex = Math.round(eventLength/60/60/1000/24);\r\n\t}\r\n\r\n\tvar last_column = true;\r\n\twhile (startColumnIndex < endColumnIndex){\r\n\t\tvar check = scheduler.date.add(endDate, -config.x_step, config.x_unit);\r\n\t\tif (ignore && ignore(endDate) && (!last_column || (last_column && ignore(check) ))){\r\n\t\t\teventLength -= (endDate-check);\r\n\r\n\t\t}else{\r\n\t\t\tlet excludedDuration = 0;\r\n\t\t\tconst intervalStart = new Date(Math.max(check.valueOf(), startDate.valueOf()));\r\n\t\t\tconst intervalEnd = endDate;\r\n\t\t\tconst leftCellCutOffStart = new Date(intervalStart.getFullYear(), intervalStart.getMonth(), intervalStart.getDate(), config.first_hour);\r\n\t\t\tconst leftCellCutOffEnd = new Date(intervalStart.getFullYear(), intervalStart.getMonth(), intervalStart.getDate(), config.last_hour||24);\r\n\t\t\tconst rightCellCutOffStart = new Date(endDate.getFullYear(), endDate.getMonth(), endDate.getDate(), config.first_hour);\r\n\t\t\tconst rightCellCutOffEnd = new Date(endDate.getFullYear(), endDate.getMonth(), endDate.getDate(), config.last_hour||24);\r\n\r\n\t\t\tif(intervalEnd.valueOf() > rightCellCutOffEnd.valueOf()){\r\n\t\t\t\texcludedDuration += intervalEnd - rightCellCutOffEnd;\r\n\t\t\t}\r\n\r\n\t\t\tif(intervalEnd.valueOf() > rightCellCutOffStart.valueOf()){\r\n\t\t\t\texcludedDuration += config._start_correction;\r\n\t\t\t} else {\r\n\t\t\t\texcludedDuration += intervalEnd.getHours()*60*60*1000 + intervalEnd.getMinutes()*60*1000;\r\n\t\t\t}\r\n\r\n\t\t\tif(intervalStart.valueOf() < leftCellCutOffEnd.valueOf()){\r\n\t\t\t\texcludedDuration += config._end_correction;\r\n\t\t\t}\r\n\r\n\t\t\tif(intervalStart.valueOf() < leftCellCutOffStart.valueOf()){\r\n\t\t\t\texcludedDuration += (leftCellCutOffStart.valueOf() - intervalStart.valueOf());\r\n\t\t\t}\r\n\t\t\t\r\n\r\n\t\t\teventLength -= excludedDuration;\r\n\t\t\tlast_column = false;\r\n\t\t}\r\n\t\tendDate = check;\r\n\t\tendColumnIndex--;\r\n\t}\r\n\treturn eventLength;\r\n};\r\nscheduler._get_fictional_event_length=function(end_date, ev_length, obj, back){\r\n\tvar sd = new Date(end_date);\r\n\tvar dir = back ? -1 : 1;\r\n\r\n\t//get difference caused by first|last hour\r\n\tif (obj._start_correction || obj._end_correction){\r\n\t\tvar today;\r\n\t\tif (back)\r\n\t\t\ttoday = (sd.getHours()*60+sd.getMinutes()) - (obj.first_hour||0)*60;\r\n\t\telse\r\n\t\t\ttoday = (obj.last_hour||0)*60 - (sd.getHours()*60+sd.getMinutes());\r\n\t\tvar per_day = (obj.last_hour - obj.first_hour)*60;\r\n\t\tvar days = Math.ceil( (ev_length / (60*1000) - today ) / per_day);\r\n\t\tif(days < 0) days = 0;\r\n\t\tev_length += days * (24*60 - per_day) * 60 * 1000;\r\n\t}\r\n\r\n\tvar fd = new Date(end_date*1+ev_length*dir);\r\n\tvar ignore = this[\"ignore_\"+this._mode];\r\n\r\n\tvar start_slot = 0,\r\n\t\tend_slot;\r\n\tif (obj.render){\r\n\t\tstart_slot = this._get_date_index(obj, sd);\r\n\t\tend_slot = this._get_date_index(obj, fd);\r\n\t} else{\r\n\t\tend_slot = Math.round(ev_length/60/60/1000/24);\r\n\t}\r\n\r\n\twhile (start_slot*dir <= end_slot*dir){\r\n\t\tvar check = scheduler.date.add(sd, obj.x_step*dir, obj.x_unit);\r\n\t\tif (ignore && ignore(sd)){\r\n\t\t\tev_length += (check-sd)*dir;\r\n\t\t\tend_slot += dir;\r\n\t\t}\r\n\r\n\t\tsd = check;\r\n\t\tstart_slot+=dir;\r\n\t}\r\n\r\n\treturn ev_length;\r\n};\r\n\r\nscheduler._get_section_view = function(){\r\n\treturn this.getView();\r\n};\r\n\r\nscheduler._get_section_property = function(){\r\n\tif(this.matrix && this.matrix[this._mode]){\r\n\t\treturn this.matrix[this._mode].y_property;\r\n\t}else if(this._props && this._props[this._mode]){\r\n\t\treturn this._props[this._mode].map_to;\r\n\t}\r\n\treturn null;\r\n};\r\n\r\nscheduler._is_initialized = function(){\r\n\tvar state = this.getState();\r\n\treturn (this._obj && state.date && state.mode);\r\n};\r\nscheduler._is_lightbox_open = function(){\r\n\tvar state = this.getState();\r\n\treturn state.lightbox_id !== null && state.lightbox_id !== undefined;\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n(function(){\r\n\r\n\t// eslint-disable-next-line no-control-regex\r\n\tvar htmlTags = new RegExp(\"<(?:.|\\n)*?>\", \"gm\");\r\n\tvar extraSpaces = new RegExp(\" +\", \"gm\");\r\n\r\n\tfunction stripHTMLLite(htmlText){\r\n\t\treturn (htmlText + \"\")\r\n\t\t\t.replace(htmlTags, \" \").\r\n\t\t\treplace(extraSpaces, \" \");\r\n\t}\r\n\r\n\tvar singleQuotes = new RegExp(\"'\", \"gm\");\r\n\tfunction escapeQuotes(text){\r\n\t\treturn (text + \"\").replace(singleQuotes, \"'\");\r\n\t}\r\n\r\n\tscheduler._waiAria = {\r\n\t\tgetAttributeString: function(attr){\r\n\t\t\tvar attributes = [\" \"];\r\n\t\t\tfor(var i in attr){\r\n\t\t\t\tif(typeof attr[i] != \"function\" && typeof attr[i] != \"object\") {\r\n\t\t\t\t\tvar text = escapeQuotes(stripHTMLLite(attr[i]));\r\n\t\t\t\t\tattributes.push(i + \"='\" + text + \"'\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tattributes.push(\" \");\r\n\t\t\treturn attributes.join(\" \");\r\n\t\t},\r\n\t\tsetAttributes: function(div, values){\r\n\t\t\tfor(var i in values){\r\n\t\t\t\tdiv.setAttribute(i, stripHTMLLite(values[i]));\r\n\t\t\t}\r\n\t\t\treturn div;\r\n\t\t},\r\n\r\n\t\tlabelAttr: function(div, content){\r\n\t\t\treturn this.setAttributes(div, {\"aria-label\": content});\r\n\t\t},\r\n\t\tlabel: function(label){\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": label});\r\n\t\t},\r\n\r\n\t\t// day/week/units\r\n\r\n\t\thourScaleAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\r\n\t\t},\r\n\t\tmonthCellAttr: function(div, date){\r\n\t\t\tthis.labelAttr(div, scheduler.templates.day_date(date));\r\n\t\t},\r\n\r\n\t\tnavBarDateAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\t\t},\r\n\t\tdayHeaderAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\t\t},\r\n\r\n\t\tdayColumnAttr: function(div, date){\r\n\t\t\tthis.dayHeaderAttr(div, scheduler.templates.day_date(date));\r\n\t\t},\r\n\r\n\t\theaderButtonsAttributes: function(div, label){\r\n\t\t\treturn this.setAttributes(div, {\"role\":\"button\", \"aria-label\":label});\r\n\t\t},\r\n\r\n\t\theaderToggleState: function(div, isActive){\r\n\t\t\treturn this.setAttributes(div, {\"aria-pressed\": isActive ? \"true\" : \"false\"});\r\n\t\t},\r\n\r\n\r\n\t\tgetHeaderCellAttr:function(dateString){\r\n\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": dateString});\r\n\t\t},\r\n\r\n\r\n\t\teventAttr: function(event, div){\r\n\t\t\tthis._eventCommonAttr(event, div);\r\n\t\t},\r\n\r\n\r\n\t\t_eventCommonAttr: function(event, div){\r\n\t\t\tdiv.setAttribute(\"aria-label\", stripHTMLLite(scheduler.templates.event_text(event.start_date, event.end_date, event)));\r\n\r\n\t\t\tif(scheduler.config.readonly){\r\n\t\t\t\tdiv.setAttribute(\"aria-readonly\", true);\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif(event.$dataprocessor_class){\r\n\t\t\t\tdiv.setAttribute(\"aria-busy\", true);\r\n\t\t\t}\r\n\r\n\r\n\t\t\tdiv.setAttribute(\"aria-selected\",\r\n\t\t\t\t(scheduler.getState().select_id == event.id) ? \"true\" : \"false\");\r\n\t\t},\r\n\r\n\t\tsetEventBarAttr: function(event, div){\r\n\t\t\tthis._eventCommonAttr(event, div);\r\n\t\t},\r\n\r\n\t\t_getAttributes: function(attributeSetter, arg){\r\n\t\t\tvar result = {\r\n\t\t\t\tsetAttribute:function(name, value){\r\n\t\t\t\t\tthis[name] = value;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\tattributeSetter.apply(this, [arg, result]);\r\n\t\t\treturn result;\r\n\r\n\t\t},\r\n\r\n\t\teventBarAttrString: function(event){\r\n\t\t\treturn this.getAttributeString(this._getAttributes(this.setEventBarAttr, event));\r\n\t\t},\r\n\r\n\r\n\r\n\t\tagendaHeadAttrString :function(){\r\n\t\t\treturn this.getAttributeString({role: \"row\"});\r\n\t\t},\r\n\t\tagendaHeadDateString :function(label){\r\n\t\t\treturn this.getAttributeString({role: \"columnheader\", \"aria-label\": label});\r\n\t\t},\r\n\t\tagendaHeadDescriptionString :function(label){\r\n\t\t\treturn this.agendaHeadDateString(label);\r\n\t\t},\r\n\t\tagendaDataAttrString: function(){\r\n\t\t\treturn this.getAttributeString({role: \"grid\"});\r\n\t\t},\r\n\t\tagendaEventAttrString: function(event){\r\n\t\t\tvar attrs = this._getAttributes(this._eventCommonAttr, event);\r\n\r\n\t\t\tattrs[\"role\"] = \"row\";\r\n\r\n\t\t\treturn this.getAttributeString(attrs);\r\n\r\n\t\t},\r\n\t\tagendaDetailsBtnString: function(){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels.icon_details});\r\n\t\t},\r\n\r\n\r\n\t\tgridAttrString: function(){\r\n\t\t\treturn this.getAttributeString({role: \"grid\"});\r\n\t\t},\r\n\r\n\t\tgridRowAttrString: function(event){\r\n\t\t\treturn this.agendaEventAttrString(event);\r\n\t\t},\r\n\r\n\t\tgridCellAttrString: function(event, column, value){\r\n\t\t\treturn this.getAttributeString({\"role\":\"gridcell\", \"aria-label\": [\r\n\t\t\t\t(column.label === undefined ? column.id : column.label),\r\n\t\t\t\t\": \",\r\n\t\t\t\tvalue\r\n\t\t\t]});\r\n\t\t},\r\n\r\n\t\tmapAttrString: function(){\r\n\t\t\treturn this.gridAttrString();\r\n\t\t},\r\n\t\tmapRowAttrString: function(event){\r\n\t\t\treturn this.gridRowAttrString(event);\r\n\t\t},\r\n\t\tmapDetailsBtnString: function(){\r\n\t\t\treturn this.agendaDetailsBtnString();\r\n\t\t},\r\n\r\n\t\tminicalHeader: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"id\":headerId+\"\",\r\n\t\t\t\t\"aria-live\":\"assertice\",\r\n\t\t\t\t\"aria-atomic\":\"true\"\r\n\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalGrid: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"aria-labelledby\":headerId+\"\",\r\n\t\t\t\t\"role\":\"grid\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalRow: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"row\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalDayCell: function(div, date){\r\n\t\t\tvar selected = (date.valueOf() < scheduler._max_date.valueOf() && date.valueOf() >= scheduler._min_date.valueOf());\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"gridcell\",\r\n\t\t\t\t\"aria-label\": scheduler.templates.day_date(date),\r\n\t\t\t\t\"aria-selected\": selected ? \"true\" : \"false\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalHeadCell: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"columnheader\"\r\n\t\t\t});\r\n\t\t},\r\n\r\n\r\n\t\tweekAgendaDayCell: function(div, date){\r\n\t\t\tvar header = div.querySelector(\".dhx_wa_scale_bar\");\r\n\t\t\tvar content = div.querySelector(\".dhx_wa_day_data\");\r\n\t\t\tvar headerId = scheduler.uid() + \"\";\r\n\t\t\tthis.setAttributes(header, { \"id\": headerId});\r\n\t\t\tthis.setAttributes(content, { \"aria-labelledby\": headerId});\r\n\r\n\t\t},\r\n\t\tweekAgendaEvent: function(div, event){\r\n\t\t\tthis.eventAttr(event, div);\r\n\t\t},\r\n\r\n\t\tlightboxHiddenAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t},\r\n\r\n\t\tlightboxVisibleAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"false\");\r\n\t\t},\r\n\r\n\t\tlightboxSectionButtonAttrString: function(label){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":label, \"tabindex\":\"0\"});\r\n\t\t},\r\n\r\n\t\tyearHeader: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"id\":headerId+\"\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tyearGrid: function(div, headerId){\r\n\t\t\tthis.minicalGrid(div, headerId);\r\n\t\t},\r\n\t\tyearHeadCell: function(div){\r\n\t\t\treturn this.minicalHeadCell(div);\r\n\t\t},\r\n\t\tyearRow: function(div){\r\n\t\t\treturn this.minicalRow(div);\r\n\t\t},\r\n\t\tyearDayCell: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"gridcell\"\r\n\t\t\t});\r\n\t\t},\r\n\r\n\t\tlightboxAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t\tdiv.firstChild.setAttribute(\"role\", \"heading\");\r\n\t\t},\r\n\r\n\t\tlightboxButtonAttrString:function(buttonName){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels[buttonName], \"tabindex\":\"0\"});\r\n\t\t},\r\n\t\teventMenuAttrString: function(iconName){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels[iconName]});\r\n\t\t},\r\n\t\tlightboxHeader: function(div, headerText){\r\n\t\t\tdiv.setAttribute(\"aria-label\", headerText);\r\n\t\t},\r\n\r\n\t\tlightboxSelectAttrString: function(time_option){\r\n\t\t\tvar label = \"\";\r\n\r\n\t\t\tswitch (time_option) {\r\n\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.year;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%m\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.month;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%d\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.day;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%H:%i\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.hour + \" \" + scheduler.locale.labels.minute;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": label});\r\n\t\t},\r\n\r\n\r\n\t\tmessageButtonAttrString: function(buttonLabel){\r\n\t\t\treturn \"tabindex='0' role='button' aria-label='\"+buttonLabel+\"'\";\r\n\t\t},\r\n\r\n\t\tmessageInfoAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"alert\");\r\n\t\t\t//div.setAttribute(\"tabindex\", \"-1\");\r\n\t\t},\r\n\r\n\t\tmessageModalAttr: function(div, uid){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t\tif(uid){\r\n\t\t\t\tdiv.setAttribute(\"aria-labelledby\", uid);\r\n\t\t\t}\r\n\r\n\t\t\t//\tdiv.setAttribute(\"tabindex\", \"-1\");\r\n\t\t},\r\n\r\n\t\tquickInfoAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t},\r\n\r\n\t\tquickInfoHeaderAttrString: function(){\r\n\t\t\treturn \" role='heading' \";\r\n\t\t},\r\n\r\n\t\tquickInfoHeader: function(div, header){\r\n\t\t\tdiv.setAttribute(\"aria-label\", header);\r\n\t\t},\r\n\r\n\t\tquickInfoButtonAttrString: function(label){\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"role\":\"button\", \"aria-label\":label, \"tabindex\":\"0\"});\r\n\t\t},\r\n\r\n\t\ttooltipAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"tooltip\");\r\n\t\t},\r\n\r\n\t\ttooltipVisibleAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"false\");\r\n\t\t},\r\n\r\n\t\ttooltipHiddenAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t}\r\n\t};\r\n\r\n\tfunction isDisabled(){\r\n\t\treturn !scheduler.config.wai_aria_attributes;\r\n\t}\r\n\r\n\tfor(var i in scheduler._waiAria){\r\n\t\tscheduler._waiAria[i] = (function(payload){\r\n\t\t\treturn function(){\r\n\t\t\t\tif(isDisabled()){\r\n\t\t\t\t\treturn \" \";\r\n\t\t\t\t}\r\n\t\t\t\treturn payload.apply(this, arguments);\r\n\t\t\t};\r\n\t\t})(scheduler._waiAria[i]);\r\n\t}\r\n\r\n\r\n})();\r\n\r\n}","export default function(scheduler){\r\n\treturn function assert(check, message){\r\n\t\tif (!check){\r\n\t\t\tif(scheduler.config.show_errors && scheduler.callEvent(\"onError\",[message]) !== false) {\r\n\t\t\t\tif (scheduler.message) {\r\n\t\t\t\t\tscheduler.message({type: \"error\", text: message, expire: -1});\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t// eslint-disable-next-line\r\n\t\t\t\t\tconsole.log(message);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// eslint-disable-next-line no-debugger\r\n\t\t\t\tdebugger;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n}","export default function extend(scheduler) {\r\n\r\nif (window.jQuery){\r\n\r\n(function( $ ){\r\n\tvar counter = 0;\r\n\tvar methods = [];\r\n\t$.fn.dhx_scheduler = function(config){\r\n\t\tif (typeof(config) === 'string') {\r\n\t\t\tif (methods[config] ) {\r\n\t\t\t\treturn methods[config].apply(this, []);\r\n\t\t\t}else {\r\n\t\t\t\t$.error('Method ' + config + ' does not exist on jQuery.dhx_scheduler');\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tvar views = [];\r\n\t\t\tthis.each(function() {\r\n\t\t\t\tif (this && this.getAttribute){\r\n\t\t\t\t\tif (!this.getAttribute(\"dhxscheduler\")){\r\n\t\t\t\t\t\tvar name = \"scheduler\";\r\n\t\t\t\t\t\tif (counter){\r\n\t\t\t\t\t\t\tname = \"scheduler\" + (counter+1);\r\n\t\t\t\t\t\t\twindow[name] = Scheduler.getSchedulerInstance();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tvar comp = window[name];\r\n\r\n\t\t\t\t\t\tthis.setAttribute(\"dhxscheduler\", name);\r\n\t\t\t\t\t\tfor (var key in config)\r\n\t\t\t\t\t\t\tif (key!=\"data\")\r\n\t\t\t\t\t\t\t\tcomp.config[key] = config[key];\r\n\r\n\t\t\t\t\t\tif (!this.getElementsByTagName(\"div\").length){\r\n\t\t\t\t\t\t\tthis.innerHTML = '
';\r\n\t\t\t\t\t\t\tthis.className += \" dhx_cal_container\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcomp.init(this, comp.config.date, comp.config.mode);\r\n\t\t\t\t\t\tif (config.data)\r\n\t\t\t\t\t\t\tcomp.parse(config.data);\r\n\r\n\t\t\t\t\t\tviews.push(comp);\r\n\t\t\t\t\t\tcounter++;\r\n\t\t\t\t\t} else\r\n\t\t\t\t\t\tviews.push(window[this.getAttribute(\"dhxscheduler\")]);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif (views.length === 1) return views[0];\r\n\t\t\treturn views;\r\n\t\t}\r\n\t};\r\n\r\n\r\n\r\n\r\n})(window.jQuery);\r\n\r\n}\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler.destructor = function(){\r\n\tscheduler.callEvent(\"onDestroy\", []);\r\n\tthis.clearAll();\r\n\r\n\tif(this.$container){\r\n\t\t// FIXME: clear container or remove container\r\n\t\tthis.$container.innerHTML = \"\";\r\n\t\t// scheduler.$domHelpers.remove(this.$container);\r\n\t}\r\n\r\n\tif(this._eventRemoveAll){\r\n\t\tthis._eventRemoveAll();\r\n\t}\r\n\r\n\tif(this.resetLightbox){\r\n\t\tthis.resetLightbox();\r\n\t}\r\n\r\n\tif(this._dp && this._dp.destructor){\r\n\t\tthis._dp.destructor();\r\n\t}\r\n\r\n\t// detachAllEvents should be called last, because in components may be attached events\r\n\tthis.detachAllEvents();\r\n\r\n\tfor(var i in this){\r\n\t\tif(i.indexOf(\"$\") === 0){\r\n\t\t\tdelete this[i];\r\n\t\t}\r\n\t}\r\n\tscheduler.$destroyed = true;\r\n};\r\n\r\n}","import serialize from \"../common/url_serialize.js\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler.Promise = window.Promise; \r\n\r\nfunction createConfig(method, args) {\r\n\tvar result = {\r\n\t\tmethod: method\r\n\t};\r\n\r\n\tif (args.length === 0) {\r\n\t\tthrow new Error(\"Arguments list of query is wrong.\");\r\n\t}\r\n\tif (args.length === 1) {\r\n\t\tif (typeof args[0] === \"string\") {\r\n\t\t\tresult.url = args[0];\r\n\t\t\tresult.async = true;\r\n\t\t} else {\r\n\t\t\tresult.url = args[0].url;\r\n\t\t\tresult.async = (args[0].async || true);\r\n\t\t\tresult.callback = args[0].callback;\r\n\t\t\tresult.headers = args[0].headers;\r\n\t\t}\r\n\t\tif (method === \"POST\" || \"PUT\") {\r\n\t\t\tif (args[0].data) {\r\n\t\t\t\tif (typeof args[0].data !== \"string\") {\r\n\t\t\t\t\tresult.data = serialize(args[0].data);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresult.data = args[0].data;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tresult.data = \"\";\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n\r\n\tresult.url = args[0];\r\n\tswitch(method) {\r\n\t\tcase \"GET\":\r\n\t\tcase \"DELETE\":\r\n\t\t\tresult.callback = args[1];\r\n\t\t\tresult.headers = args[2];\r\n\t\tbreak;\r\n\t\tcase \"POST\":\r\n\t\tcase \"PUT\":\r\n\t\t\tif (args[1]) {\r\n\t\t\t\tif (typeof args[1] !== \"string\") {\r\n\t\t\t\t\tresult.data = serialize(args[1]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresult.data = args[1];\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tresult.data = \"\";\r\n\t\t\t}\r\n\t\t\tresult.callback = args[2];\r\n\t\t\tresult.headers = args[3];\r\n\t\tbreak;\r\n\t}\r\n\treturn result;\r\n}\r\nscheduler.ajax = {\r\n\t// if false - dhxr param will added to prevent caching on client side (default),\r\n\t// if true - do not add extra params\r\n\tcache: true,\r\n\r\n\t// default method for load/loadStruct, post/get allowed\r\n\tmethod: \"get\",\r\n\r\n\tserializeRequestParams: serialize,\r\n\tparse: function(data) {\r\n\t\tif (typeof data !== \"string\") return data;\r\n\r\n\t\tvar obj;\r\n\t\tdata = data.replace(/^[\\s]+/,\"\");\r\n\t\tif (typeof DOMParser !== \"undefined\" && !scheduler.$env.isIE) { // ff,ie9\r\n\t\t\tobj = (new DOMParser()).parseFromString(data, \"text/xml\");\r\n\t\t} else if (typeof window.ActiveXObject !== \"undefined\") {\r\n\t\t\tobj = new window.ActiveXObject(\"Microsoft.XMLDOM\");\r\n\t\t\tobj.async = \"false\";\r\n\t\t\tobj.loadXML(data);\r\n\t\t}\r\n\t\treturn obj;\r\n\t},\r\n\txmltop: function(tagname, xhr, obj) {\r\n\t\tif (typeof xhr.status == \"undefined\" || xhr.status < 400) {\r\n\t\t\tvar xml = (!xhr.responseXML) ? this.parse(xhr.responseText || xhr) : (xhr.responseXML || xhr);\r\n\t\t\tif (xml && xml.documentElement !== null && !xml.getElementsByTagName(\"parsererror\").length) {\r\n\t\t\t\treturn xml.getElementsByTagName(tagname)[0];\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (obj !== -1) scheduler.callEvent(\"onLoadXMLError\",[\"Incorrect XML\", arguments[1], obj]);\r\n\t\treturn document.createElement(\"DIV\");\r\n\t},\r\n\txpath: function(xpathExp, docObj) {\r\n\t\tif (!docObj.nodeName) docObj = docObj.responseXML || docObj;\r\n\t\tif (scheduler.$env.isIE) {\r\n\t\t\treturn docObj.selectNodes(xpathExp)||[];\r\n\t\t} else {\r\n\t\t\tvar rows = [];\r\n\t\t\tvar first;\r\n\t\t\tvar col = (docObj.ownerDocument||docObj).evaluate(xpathExp, docObj, null, XPathResult.ANY_TYPE, null);\r\n\r\n\t\t\twhile (true){\r\n\t\t\t\tfirst = col.iterateNext();\r\n\t\t\t\tif(first){\r\n\t\t\t\t\trows.push(first);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn rows;\r\n\t\t}\r\n\t},\r\n\tquery: function(config) {\r\n\t\treturn this._call(\r\n\t\t\t(config.method || \"GET\"),\r\n\t\t\tconfig.url,\r\n\t\t\tconfig.data || \"\",\r\n\t\t\t(config.async || true),\r\n\t\t\tconfig.callback,\r\n\t\t\tconfig.headers\r\n\t\t);\r\n\t},\r\n\tget: function(url, onLoad, headers) {\r\n\t\tvar config = createConfig(\"GET\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tgetSync: function(url, headers) {\r\n\t\tvar config = createConfig(\"GET\", arguments);\r\n\t\tconfig.async = false;\r\n\t\treturn this.query(config);\r\n\t},\r\n\tput: function(url, postData, onLoad, headers) {\r\n\t\tvar config = createConfig(\"PUT\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tdel: function(url, onLoad, headers) {\r\n\t\t/**\r\n\t\t * https://tools.ietf.org/html/rfc7231#section-4.3.5\r\n\t\t * A payload within a DELETE request message has no defined semantics;\r\n\t\t * sending a payload body on a DELETE request might cause some existing\r\n\t\t * implementations to reject the request.\r\n\t\t */\r\n\t\tvar config = createConfig(\"DELETE\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tpost: function(url, postData, onLoad, headers) {\r\n\t\tif (arguments.length == 1) {\r\n\t\t\tpostData = \"\";\r\n\t\t} else if (arguments.length == 2 && typeof(postData) == \"function\") {\r\n\t\t\tonLoad = postData;\r\n\t\t\tpostData = \"\";\r\n\t\t}\r\n\t\tvar config = createConfig(\"POST\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tpostSync: function(url, postData, headers) {\r\n\t\tpostData = (postData === null ? \"\" : String(postData));\r\n\r\n\t\tvar config = createConfig(\"POST\", arguments);\r\n\t\tconfig.async = false;\r\n\t\treturn this.query(config);\r\n\t},\r\n\t_call: function(method, url, postData, async, onLoad, headers) {\r\n\t\treturn new scheduler.Promise((function(resolve, reject) {\r\n\t\t\tvar t = (typeof XMLHttpRequest !== undefined && !scheduler.$env.isIE ? new XMLHttpRequest() : new window.ActiveXObject(\"Microsoft.XMLHTTP\"));\r\n\t\t\tvar isQt = (navigator.userAgent.match(/AppleWebKit/) !== null && navigator.userAgent.match(/Qt/) !== null && navigator.userAgent.match(/Safari/) !== null);\r\n\r\n\t\t\tif (!!async) {\r\n\t\t\t\tt.addEventListener(\"readystatechange\", function() {\r\n\t\t\t\t\tif ((t.readyState == 4) || (isQt && t.readyState == 3)) { // what for long response and status 404?\r\n\t\t\t\t\t\tif (t.status != 200 || t.responseText === \"\")\r\n\t\t\t\t\t\t\tif (!scheduler.callEvent(\"onAjaxError\", [t])) return;\r\n\r\n\t\t\t\t\t\tsetTimeout(function() {\r\n\t\t\t\t\t\t\tif (typeof(onLoad) == \"function\") {\r\n\t\t\t\t\t\t\t\tonLoad.apply(window, [{xmlDoc:t, filePath:url}]); // dhtmlx-compat, response.xmlDoc.responseXML/responseText\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tresolve(t);\r\n\t\t\t\t\t\t\tif (typeof(onLoad) == \"function\") {\r\n\t\t\t\t\t\t\t\tonLoad = null;\r\n\t\t\t\t\t\t\t\tt = null;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}, 0);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif (method == \"GET\" && !this.cache) {\r\n\t\t\t\turl += (url.indexOf(\"?\")>=0?\"&\":\"?\")+\"dhxr\"+new Date().getTime()+\"=1\";\r\n\t\t\t}\r\n\r\n\t\t\tt.open(method, url, async);\r\n\r\n\t\t\tif (headers){\r\n\t\t\t\tfor (var key in headers)\r\n\t\t\t\t\tt.setRequestHeader(key, headers[key]);\r\n\t\t\t} else if (method.toUpperCase() == \"POST\" || method == \"PUT\" || method == \"DELETE\") {\r\n\t\t\t\tt.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\r\n\t\t\t} else if (method == \"GET\") {\r\n\t\t\t\tpostData = null;\r\n\t\t\t}\r\n\r\n\t\t\tt.setRequestHeader(\"X-Requested-With\", \"XMLHttpRequest\");\r\n\r\n\t\t\tt.send(postData);\r\n\r\n\t\t\tif (!async) return {xmlDoc:t, filePath:url}; // dhtmlx-compat, response.xmlDoc.responseXML/responseText\r\n\t\t}.bind(this)));\r\n\t},\r\n\turlSeparator: function(str){\r\n\t\tif (str.indexOf(\"?\") != -1)\r\n\t\t\treturn \"&\";\r\n\t\telse\r\n\t\t\treturn \"?\";\r\n\t}\r\n};\r\n\r\nscheduler.$ajax = scheduler.ajax; // for old\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n/*\r\n%e\tDay of the month without leading zeros (01..31)\r\n%d\tDay of the month, 2 digits with leading zeros (01..31)\r\n%j\tDay of the year, 3 digits with leading zeros (001..366)\r\n%a\tA textual representation of a day, two letters\r\n%W\tA full textual representation of the day of the week\r\n\r\n%c\tNumeric representation of a month, without leading zeros (0..12)\r\n%m\tNumeric representation of a month, with leading zeros (00..12)\r\n%b\tA short textual representation of a month, three letters (Jan..Dec)\r\n%M\tA full textual representation of a month, such as January or March (January..December)\r\n\r\n%y\tA two digit representation of a year (93..03)\r\n%Y\tA full numeric representation of a year, 4 digits (1993..03)\r\n*/\r\n\r\nscheduler.config={\r\n\tdefault_date: \"%j %M %Y\",\r\n\tmonth_date: \"%F %Y\",\r\n\tload_date: \"%Y-%m-%d\",\r\n\tweek_date: \"%l\",\r\n\tday_date: \"%D %j\",\r\n\thour_date: \"%H:%i\",\r\n\tmonth_day: \"%d\",\r\n\t//xml_date: \"%m/%d/%Y %H:%i\",\r\n\tdate_format: \"%Y-%m-%d %H:%i\",\r\n\tapi_date: \"%d-%m-%Y %H:%i\",\r\n\tparse_exact_format: false,\r\n\tpreserve_length:true,\r\n\ttime_step: 5,\r\n\tdisplayed_event_color: \"#ff4a4a\",\r\n\tdisplayed_event_text_color: \"#ffef80\",\r\n\twide_form: 0,\r\n\tday_column_padding: 8,\r\n\tuse_select_menu_space: true,\r\n\tfix_tab_position: true,\r\n\tstart_on_monday: true,\r\n\tfirst_hour: 0,\r\n\tlast_hour: 24,\r\n\treadonly: false,\r\n\tdrag_resize: true,\r\n\tdrag_move: true,\r\n\tdrag_create: true,\r\n\tdrag_event_body: true,\r\n\tdblclick_create: true,\r\n\tdetails_on_dblclick: true,\r\n\tedit_on_create: true,\r\n\tdetails_on_create: true,\r\n\theader: null,\r\n\thour_size_px: 44,\r\n\tresize_month_events:false,\r\n\tresize_month_timed:false,\r\n\t\r\n\tresponsive_lightbox: false,\r\n\tseparate_short_events: true,\r\n\trtl:false,\r\n\r\n\tcascade_event_display: false,\r\n\tcascade_event_count: 4,\r\n\tcascade_event_margin: 30,\r\n\r\n\tmulti_day:true,\r\n\tmulti_day_height_limit: 200,\r\n\r\n\tdrag_lightbox: true,\r\n\tpreserve_scroll: true,\r\n\tselect: true,\r\n\r\n\tserver_utc: false,\r\n\ttouch:true,\r\n\ttouch_tip:true,\r\n\ttouch_drag:500,\r\n\ttouch_swipe_dates: false,\r\n\tquick_info_detached:true,\r\n\r\n\tpositive_closing: false,\r\n\t//header_datepicker: true,\r\n\tdrag_highlight: true,\r\n\tlimit_drag_out: false,\r\n\ticons_edit: [\"icon_save\", \"icon_cancel\"],\r\n\ticons_select: [\"icon_details\", \"icon_edit\", \"icon_delete\"],\r\n\tbuttons_left: [\"dhx_save_btn\", \"dhx_cancel_btn\"],\r\n\tbuttons_right: [\"dhx_delete_btn\"],\r\n\tlightbox: {\r\n\t\tsections: [\r\n\t\t\t{name: \"description\", map_to: \"text\", type: \"textarea\", focus: true},\r\n\t\t\t{name: \"time\", height: 72, type: \"time\", map_to: \"auto\"}\r\n\t\t]\r\n\t},\r\n\thighlight_displayed_event: true,\r\n\tleft_border: false,\r\n\r\n\tajax_error: \"alert\",//\"ignore\"|\"console\"\r\n\tdelay_render: 0,\r\n\ttimeline_swap_resize: true,\r\n\twai_aria_attributes: true,\r\n\twai_aria_application_role: true,\r\n\r\n\tcsp: \"auto\",\r\n\tevent_attribute: \"data-event-id\",\r\n\tshow_errors: true\r\n};\r\n\r\nscheduler.config.buttons_left.$initial = scheduler.config.buttons_left.join();\r\nscheduler.config.buttons_right.$initial = scheduler.config.buttons_right.join();\r\n\r\nscheduler._helpers = {\r\n\tparseDate: function parseDate(date) {\r\n\t\tvar parse = scheduler.templates.xml_date || scheduler.templates.parse_date;\r\n\t\treturn parse(date);\r\n\t},\r\n\tformatDate: function formatDate(date) {\r\n\t\tvar format = scheduler.templates.xml_format || scheduler.templates.format_date;\r\n\t\treturn format(date);\r\n\t}\r\n};\r\n\r\nscheduler.templates={};\r\nscheduler.init_templates=function(){\r\n\r\n\r\n\r\n\tvar d=scheduler.date.date_to_str;\r\n\tvar c=scheduler.config;\r\n\tvar f = function(a,b){\r\n\t\tfor (var c in b)\r\n\t\t\tif (!a[c]) a[c]=b[c];\r\n\t};\r\n\tf(scheduler.templates,{\r\n\t\tday_date:d(c.default_date),\r\n\t\tmonth_date:d(c.month_date),\r\n\t\tweek_date:function(d1,d2){\r\n\t\t\tif(c.rtl) {\r\n\t\t\t\treturn scheduler.templates.day_date(scheduler.date.add(d2,-1,\"day\"))+\" – \"+scheduler.templates.day_date(d1);\r\n\t\t\t} \r\n\t\t\treturn scheduler.templates.day_date(d1)+\" – \"+scheduler.templates.day_date(scheduler.date.add(d2,-1,\"day\"));\r\n\t\t},\r\n\t\tday_scale_date:d(c.default_date),\r\n\t\ttime_slot_text: function(date){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\ttime_slot_class: function(date){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\r\n\t\tmonth_scale_date:d(c.week_date),\r\n\t\tweek_scale_date:d(c.day_date),\r\n\t\thour_scale:d(c.hour_date),\r\n\t\ttime_picker:d(c.hour_date),\r\n\t\tevent_date:d(c.hour_date),\r\n\t\tmonth_day:d(c.month_day),\r\n\r\n\t\tload_format: d(c.load_date),\r\n\t//\txml_date:scheduler.date.str_to_date(c.xml_date,c.server_utc),\r\n\t//\txml_format:d(c.date_format,c.server_utc),\r\n\t\tformat_date: d(c.date_format, c.server_utc),\r\n\t\tparse_date:scheduler.date.str_to_date(c.date_format,c.server_utc),\r\n\t\tapi_date:scheduler.date.str_to_date(c.api_date, false, false),\r\n\t\tevent_header:function(start,end,ev){\r\n\r\n\t\t\tif(ev._mode === \"small\" || ev._mode === \"smallest\"){\r\n\t\t\t\treturn scheduler.templates.event_date(start);\r\n\t\t\t}else{\r\n\t\t\t\treturn scheduler.templates.event_date(start)+\" - \"+scheduler.templates.event_date(end);\r\n\t\t\t}\r\n\t\t},\r\n\t\tevent_text:function(start,end,ev){\r\n\t\t\treturn ev.text;\r\n\t\t},\r\n\t\tevent_class:function(start,end,ev){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tmonth_date_class:function(d){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tweek_date_class:function(d){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tevent_bar_date:function(start,end,ev) {\r\n\t\t\treturn scheduler.templates.event_date(start);\r\n\t\t},\r\n\t\tevent_bar_text:function(start,end,ev){\r\n\t\t\treturn ev.text;\r\n\t\t},\r\n\t\tmonth_events_link : function(date, count){\r\n\t\t\treturn \"View more(\"+count+\" events)\";\r\n\t\t},\r\n\t\tdrag_marker_class : function(start, end, event){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tdrag_marker_content : function(start, end, event){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\t/* Could be redifined */\r\n\t\ttooltip_date_format: scheduler.date.date_to_str(\"%Y-%m-%d %H:%i\"),\r\n\t\ttooltip_text: function(start, end, event) {\r\n\t\t\treturn \"Event: \" + event.text + \"
Start date: \" + scheduler.templates.tooltip_date_format(start) + \"
End date: \" + scheduler.templates.tooltip_date_format(end);\r\n\t\t},\r\n\r\n\t\tcalendar_month: d(\"%F %Y\"),\r\n\t\tcalendar_scale_date: d(\"%D\"),\r\n\t\tcalendar_date: d(\"%d\"),\r\n\t\tcalendar_time: d(\"%d-%m-%Y\")\r\n\r\n\t});\r\n\tthis.callEvent(\"onTemplatesReady\",[]);\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler._events = {};\r\nscheduler.clearAll = function() {\r\n\tthis._events = {};\r\n\tthis._loaded = {};\r\n\r\n\tthis._edit_id = null;\r\n\tthis._select_id = null;\r\n\tthis._drag_id = null;\r\n\tthis._drag_mode = null;\r\n\tthis._drag_pos = null;\r\n\tthis._new_event = null;\r\n\r\n\tthis.clear_view();\r\n\tthis.callEvent(\"onClearAll\", []);\r\n};\r\nscheduler.addEvent = function(start_date, end_date, text, id, extra_data) {\r\n\tif (!arguments.length)\r\n\t\treturn this.addEventNow();\r\n\tvar ev = start_date;\r\n\tif (arguments.length != 1) {\r\n\t\tev = extra_data || {};\r\n\t\tev.start_date = start_date;\r\n\t\tev.end_date = end_date;\r\n\t\tev.text = text;\r\n\t\tev.id = id;\r\n\t}\r\n\tev.id = ev.id || scheduler.uid();\r\n\tev.text = ev.text || \"\";\r\n\r\n\tif (typeof ev.start_date == \"string\") ev.start_date = this.templates.api_date(ev.start_date);\r\n\tif (typeof ev.end_date == \"string\") ev.end_date = this.templates.api_date(ev.end_date);\r\n\tvar d = (this.config.event_duration || this.config.time_step) * 60000;\r\n\tif (ev.start_date.valueOf() == ev.end_date.valueOf())\r\n\t\tev.end_date.setTime(ev.end_date.valueOf() + d);\r\n\r\n\tev.start_date.setMilliseconds(0);\r\n\tev.end_date.setMilliseconds(0);\r\n\r\n\tev._timed = this.isOneDayEvent(ev);\r\n\r\n\tvar is_new = !this._events[ev.id];\r\n\tthis._events[ev.id] = ev;\r\n\tthis.event_updated(ev);\r\n\tif (!this._loading)\r\n\t\tthis.callEvent(is_new ? \"onEventAdded\" : \"onEventChanged\", [ev.id, ev]);\r\n\treturn ev.id;\r\n};\r\nscheduler.deleteEvent = function(id, silent) {\r\n\tvar ev = this._events[id];\r\n\tif (!silent && (!this.callEvent(\"onBeforeEventDelete\", [id, ev]) || !this.callEvent(\"onConfirmedBeforeEventDelete\", [id, ev])))\r\n\t\treturn;\r\n\tif (ev) {\r\n\t\tif(scheduler.getState().select_id == id){\r\n\t\t\tscheduler.unselect();\r\n\t\t}\r\n\t\tdelete this._events[id];\r\n\t\tthis.event_updated(ev);\r\n\r\n\t\tif(this._drag_id == ev.id){\r\n\t\t\tthis._drag_id = null;\r\n\t\t\tthis._drag_mode=null;\r\n\t\t\tthis._drag_pos=null;\r\n\t\t}\r\n\t}\r\n\r\n\tthis.callEvent(\"onEventDeleted\", [id, ev]);\r\n};\r\nscheduler.getEvent = function(id) {\r\n\treturn this._events[id];\r\n};\r\nscheduler.setEvent = function(id, hash) {\r\n\tif(!hash.id)\r\n\t\thash.id = id;\r\n\r\n\tthis._events[id] = hash;\r\n};\r\nscheduler.for_rendered = function(id, method) {\r\n\tfor (var i = this._rendered.length - 1; i >= 0; i--)\r\n\t\tif (this._rendered[i].getAttribute(this.config.event_attribute) == id)\r\n\t\t\tmethod(this._rendered[i], i);\r\n};\r\nscheduler.changeEventId = function(id, new_id) {\r\n\tif (id == new_id) return;\r\n\tvar ev = this._events[id];\r\n\tif (ev) {\r\n\t\tev.id = new_id;\r\n\t\tthis._events[new_id] = ev;\r\n\t\tdelete this._events[id];\r\n\t}\r\n\tthis.for_rendered(id, function(r) {\r\n\t\tr.setAttribute(\"event_id\", new_id); // for backward compatibility\r\n\t\tr.setAttribute(scheduler.config.event_attribute, new_id);\r\n\t});\r\n\tif (this._select_id == id) this._select_id = new_id;\r\n\tif (this._edit_id == id) this._edit_id = new_id;\r\n\t//if (this._drag_id==id) this._drag_id=new_id;\r\n\tthis.callEvent(\"onEventIdChange\", [id, new_id]);\r\n};\r\n\r\n(function() {\r\n\tvar attrs = [\"text\", \"Text\", \"start_date\", \"StartDate\", \"end_date\", \"EndDate\"];\r\n\tvar create_getter = function(name) {\r\n\t\treturn function(id) { return (scheduler.getEvent(id))[name]; };\r\n\t};\r\n\tvar create_setter = function(name) {\r\n\t\treturn function(id, value) {\r\n\t\t\tvar ev = scheduler.getEvent(id);\r\n\t\t\tev[name] = value;\r\n\t\t\tev._changed = true;\r\n\t\t\tev._timed = this.isOneDayEvent(ev);\r\n\t\t\tscheduler.event_updated(ev, true);\r\n\t\t};\r\n\t};\r\n\tfor (var i = 0; i < attrs.length; i += 2) {\r\n\t\tscheduler[\"getEvent\" + attrs[i + 1]] = create_getter(attrs[i]);\r\n\t\tscheduler[\"setEvent\" + attrs[i + 1]] = create_setter(attrs[i]);\r\n\t}\r\n})();\r\n\r\nscheduler.event_updated = function(ev, force) {\r\n\tif (this.is_visible_events(ev))\r\n\t\tthis.render_view_data();\r\n\telse\r\n\t\tthis.clear_event(ev.id);\r\n};\r\nscheduler.is_visible_events = function(ev) {\r\n\tif(!this._min_date || !this._max_date){\r\n\t\treturn false;\r\n\t}\r\n\r\n\t//if in displayed dates\r\n\tvar in_visible_range = (ev.start_date.valueOf() < this._max_date.valueOf() && this._min_date.valueOf() < ev.end_date.valueOf());\r\n\r\n\tif(in_visible_range){\r\n\r\n\t\t//end dates are not between last/first hours\r\n\t\tvar evFirstHour = ev.start_date.getHours(),\r\n\t\t\tevLastHour = ev.end_date.getHours() + (ev.end_date.getMinutes()/60),\r\n\t\t\tlastHour = this.config.last_hour,\r\n\t\t\tfirstHour = this.config.first_hour;\r\n\r\n\t\tvar end_dates_visible = (this._table_view || !((evLastHour > lastHour || evLastHour <= firstHour) && (evFirstHour >= lastHour || evFirstHour < firstHour)));\r\n\r\n\t\tif(end_dates_visible){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\r\n\t\t\t//event is bigger than area hidden between last/first hours\r\n\t\t\tvar event_duration = (ev.end_date.valueOf() - ev.start_date.valueOf()) / (1000*60*60),//hours\r\n\t\t\t\thidden_duration = 24 - (this.config.last_hour - this.config.first_hour);\r\n\r\n\t\t\treturn !!((event_duration > hidden_duration) || (evFirstHour < lastHour && evLastHour > firstHour));\r\n\r\n\t\t}\r\n\t}else{\r\n\t\treturn false;\r\n\t}\r\n};\r\nscheduler.isOneDayEvent = function(ev) {\r\n\t// decrease by one ms so events that ends on midnight on the next day were still considered one day events\r\n\t// e.g. (09-02-2018 19:00 - 10-02-2018 00:00)\r\n\t// events >= 24h long are considered multiday\r\n\tvar checkEndDate = new Date(ev.end_date.valueOf() - 1);\r\n\treturn (\r\n\t\tev.start_date.getFullYear() === checkEndDate.getFullYear() &&\r\n\t\tev.start_date.getMonth() === checkEndDate.getMonth() &&\r\n\t\tev.start_date.getDate() === checkEndDate.getDate()\r\n\t) && ((ev.end_date.valueOf() - ev.start_date.valueOf()) < (1000 * 60 * 60 * 24));\r\n};\r\n\r\nscheduler.get_visible_events = function(only_timed) {\r\n\t//not the best strategy for sure\r\n\tvar stack = [];\r\n\r\n\tfor (var id in this._events)\r\n\t\tif (this.is_visible_events(this._events[id]))\r\n\t\t\tif (!only_timed || this._events[id]._timed)\r\n\t\t\t\tif (this.filter_event(id, this._events[id]))\r\n\t\t\t\t\tstack.push(this._events[id]);\r\n\r\n\treturn stack;\r\n};\r\nscheduler.filter_event = function(id, ev) {\r\n\tvar filter = this[\"filter_\" + this._mode];\r\n\treturn (filter) ? filter(id, ev) : true;\r\n};\r\nscheduler._is_main_area_event = function(ev){\r\n\treturn !!ev._timed;\r\n};\r\nscheduler.render_view_data = function(evs, hold) {\r\n\tvar full = false;\r\n\tif (!evs) {\r\n\t\tfull = true;\r\n\t\tif (this._not_render) {\r\n\t\t\tthis._render_wait = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._render_wait = false;\r\n\r\n\t\tthis.clear_view();\r\n\t\tevs = this.get_visible_events(!(this._table_view || this.config.multi_day));\r\n\t}\r\n\tfor(var i= 0, len = evs.length; i < len; i++){\r\n\t\tthis._recalculate_timed(evs[i]);\r\n\t}\r\n\r\n\tif (this.config.multi_day && !this._table_view) {\r\n\r\n\t\tvar tvs = [];\r\n\t\tvar tvd = [];\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tif (this._is_main_area_event(evs[i]))\r\n\t\t\t\ttvs.push(evs[i]);\r\n\t\t\telse\r\n\t\t\t\ttvd.push(evs[i]);\r\n\t\t}\r\n\r\n\t\tif(!this._els['dhx_multi_day']){\r\n\t\t\tvar message = scheduler._commonErrorMessages.unknownView(this._mode);\r\n\t\t\tthrow new Error(message);\r\n\t\t}\r\n\r\n\t\t// multiday events\r\n\t\tthis._rendered_location = this._els['dhx_multi_day'][0];\r\n\t\tthis._table_view = true;\r\n\t\tthis.render_data(tvd, hold);\r\n\t\tthis._table_view = false;\r\n\r\n\t\t// normal events\r\n\t\tthis._rendered_location = this._els['dhx_cal_data'][0];\r\n\t\tthis._table_view = false;\r\n\t\tthis.render_data(tvs, hold);\r\n\r\n\t} else {\r\n\t\tvar buffer = document.createDocumentFragment();\r\n\t\tvar renderedLocation = this._els['dhx_cal_data'][0];\r\n\t\tthis._rendered_location = buffer;\r\n\t\tthis.render_data(evs, hold);\r\n\t\trenderedLocation.appendChild(buffer);\r\n\t\tthis._rendered_location = renderedLocation;\r\n\r\n\t}\r\n\r\n\tif(full){\r\n\t\tthis.callEvent(\"onDataRender\", []);\r\n\t}\r\n};\r\n\r\n\r\nscheduler._view_month_day = function(e){\r\n\tvar date = scheduler.getActionData(e).date;\r\n\tif(!scheduler.callEvent(\"onViewMoreClick\", [date]))\r\n\t\treturn;\r\n\tscheduler.setCurrentView(date, \"day\");\r\n};\r\n\r\nscheduler._render_month_link = function(ev){\r\n\tvar parent = this._rendered_location;\r\n\tvar toRender = this._lame_clone(ev);\r\n\r\n\t//render links in each cell of multiday events\r\n\tfor(var d = ev._sday; d < ev._eday; d++){\r\n\r\n\t\ttoRender._sday = d;\r\n\t\ttoRender._eday = d+1;\r\n\r\n\t\tvar date = scheduler.date;\r\n\t\tvar curr = scheduler._min_date;\r\n\t\tcurr = date.add(curr, toRender._sweek, \"week\");\r\n\t\tcurr = date.add(curr, toRender._sday, \"day\");\r\n\t\tvar count = scheduler.getEvents(curr, date.add(curr, 1, \"day\")).length;\r\n\r\n\t\tvar pos = this._get_event_bar_pos(toRender);\r\n\t\tvar widt = (pos.x2 - pos.x);\r\n\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tscheduler.event(el, \"click\", function(e){scheduler._view_month_day(e);});\r\n\t\tel.className = \"dhx_month_link\";\r\n\t\tel.style.top = pos.y + \"px\";\r\n\t\tel.style.left = pos.x + \"px\";\r\n\t\tel.style.width = widt + \"px\";\r\n\t\tel.innerHTML = scheduler.templates.month_events_link(curr, count);\r\n\t\tthis._rendered.push(el);\r\n\r\n\t\tparent.appendChild(el);\r\n\t}\r\n};\r\n\r\nscheduler._recalculate_timed = function(id){\r\n\tif(!id) return;\r\n\tvar ev;\r\n\tif(typeof(id) != \"object\")\r\n\t\tev = this._events[id];\r\n\telse\r\n\t\tev = id;\r\n\tif(!ev) return;\r\n\tev._timed = scheduler.isOneDayEvent(ev);\r\n};\r\nscheduler.attachEvent(\"onEventChanged\", scheduler._recalculate_timed);\r\nscheduler.attachEvent(\"onEventAdded\", scheduler._recalculate_timed);\r\n\r\nscheduler.render_data = function(evs, hold) {\r\n\tevs = this._pre_render_events(evs, hold);\r\n\tvar containers = {};\r\n\tfor (var i = 0; i < evs.length; i++)\r\n\t\tif (this._table_view){\r\n\t\t\tif(scheduler._mode != 'month'){\r\n\t\t\t\tthis.render_event_bar(evs[i]);//may be multiday section on other views\r\n\t\t\t}else{\r\n\r\n\t\t\t\tvar max_evs = scheduler.config.max_month_events;\r\n\t\t\t\tif(max_evs !== max_evs*1 || evs[i]._sorder < max_evs){\r\n\t\t\t\t\t//of max number events per month cell is set and event can be rendered\r\n\t\t\t\t\tthis.render_event_bar(evs[i]);\r\n\t\t\t\t}else if(max_evs !== undefined && evs[i]._sorder == max_evs){\r\n\t\t\t\t\t//render 'view more' links\r\n\t\t\t\t\tscheduler._render_month_link(evs[i]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\t//do not render events with ordinal number > maximum events per cell\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t}else{\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tvar parent = scheduler.locate_holder(ev._sday);\r\n\t\t\tif (!parent) continue; //attempt to render non-visible event\r\n\r\n\t\t\tif(!containers[ev._sday]){\r\n\t\t\t\tcontainers[ev._sday] = {\r\n\t\t\t\t\treal: parent,\r\n\t\t\t\t\tbuffer: document.createDocumentFragment(),\r\n\t\t\t\t\twidth: parent.clientWidth\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\tvar container = containers[ev._sday];\r\n\t\t\tthis.render_event(ev, container.buffer, container.width);\r\n\t\t}\r\n\r\n\t\tfor(var i in containers){\r\n\t\t\tvar container = containers[i];\r\n\t\t\tif(container.real && container.buffer){\r\n\t\t\t\tcontainer.real.appendChild(container.buffer);\r\n\t\t\t}\r\n\t\t}\r\n};\r\n\r\nscheduler._get_first_visible_cell = function(cells) {\r\n\tfor (var i = 0; i < cells.length; i++) {\r\n\t\tif ((cells[i].className || \"\").indexOf(\"dhx_scale_ignore\") == -1) {\r\n\t\t\treturn cells[i];\r\n\t\t}\r\n\t}\r\n\t// if no visible cell found, return cells[0] to be more tolerant, since it's the original logic\r\n\treturn cells[0];\r\n};\r\n\r\nscheduler._pre_render_events = function(evs, hold) {\r\n\tvar hb = this.xy.bar_height;\r\n\tvar h_old = this._colsS.heights;\r\n\tvar h = this._colsS.heights = [0, 0, 0, 0, 0, 0, 0];\r\n\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\r\n\tif (!this._table_view) {\r\n\t\tevs = this._pre_render_events_line(evs, hold); //ignore long events for now\r\n\t}\r\n\telse {\r\n\t\tevs = this._pre_render_events_table(evs, hold);\r\n\t}\r\n\tif (this._table_view) {\r\n\t\tif (hold)\r\n\t\t\tthis._colsS.heights = h_old;\r\n\t\telse {\r\n\t\t\tvar monthRows = data.querySelectorAll(\".dhx_cal_month_row\");\r\n\t\t\tif (monthRows.length) {\r\n\t\t\t\tfor (var i = 0; i < monthRows.length; i++) {\r\n\t\t\t\t\th[i]++;\r\n\t\t\t\t\tvar cells = monthRows[i].querySelectorAll(\".dhx_cal_month_cell\");\r\n\t\t\t\t\tvar cellHeight = this._colsS.height - this.xy.month_head_height;\r\n\t\t\t\t\tif ((h[i]) * hb > cellHeight) { // 22 - height of cell's header\r\n\t\t\t\t\t\t//we have overflow, update heights\r\n\r\n\t\t\t\t\t\tvar cHeight = cellHeight;\r\n\t\t\t\t\t\tif(this.config.max_month_events*1 !== this.config.max_month_events || h[i] <= this.config.max_month_events){\r\n\t\t\t\t\t\t\tcHeight = h[i] * hb;\r\n\t\t\t\t\t\t}else if( (this.config.max_month_events + 1) * hb > cellHeight){\r\n\t\t\t\t\t\t\tcHeight = (this.config.max_month_events + 1) * hb;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tmonthRows[i].style.height = (cHeight + this.xy.month_head_height) + \"px\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\th[i] = (h[i - 1] || 0) + scheduler._get_first_visible_cell(cells).offsetHeight;\r\n\t\t\t\t}\r\n\t\t\t\th.unshift(0);\r\n\t\t\t\tconst dataArea = this.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tif (dataArea.offsetHeight < dataArea.scrollHeight && !scheduler._colsS.scroll_fix && scheduler.xy.scroll_width) {\r\n\r\n\t\t\t\t\tvar scale_settings = scheduler._colsS,\r\n\t\t\t\t\t\tsum_width = scale_settings[scale_settings.col_length],\r\n\t\t\t\t\t\trow_heights = scale_settings.heights.slice();\r\n\r\n\t\t\t\t\tsum_width -= (scheduler.xy.scroll_width || 0);\r\n\t\t\t\t\tthis._calc_scale_sizes(sum_width, this._min_date, this._max_date);\r\n\t\t\t\t\tscheduler._colsS.heights = row_heights;\r\n\r\n\t\t\t\t\tthis.set_xy(this._els[\"dhx_cal_header\"][0], sum_width/*, this.xy.scale_height*/);\r\n\t\t\t\t\tscheduler._render_scales(this._els[\"dhx_cal_header\"][0]);\r\n\t\t\t\t\tscheduler._render_month_scale(this._els[\"dhx_cal_data\"][0], this._get_timeunit_start(), this._min_date);\r\n\r\n\t\t\t\t\tscale_settings.scroll_fix = true;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (!evs.length && this._els[\"dhx_multi_day\"][0].style.visibility == \"visible\")\r\n\t\t\t\t\th[0] = -1;\r\n\t\t\t\tif (evs.length || h[0] == -1) {\r\n\t\t\t\t\t//shift days to have space for multiday events\r\n\t\t\t\t\t//var childs = evl.parentNode.childNodes;\r\n\r\n\t\t\t\t\t// +1 so multiday events would have 2px from top and 2px from bottom by default\r\n\t\t\t\t\tvar full_multi_day_height = (h[0] + 1) * hb + 4;\r\n\r\n\t\t\t\t\tvar used_multi_day_height = full_multi_day_height;\r\n\t\t\t\t\tvar used_multi_day_height_css = full_multi_day_height + \"px\";\r\n\t\t\t\t\tif (this.config.multi_day_height_limit) {\r\n\t\t\t\t\t\tused_multi_day_height = Math.min(full_multi_day_height, this.config.multi_day_height_limit) ;\r\n\t\t\t\t\t\tused_multi_day_height_css = used_multi_day_height + \"px\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tvar multi_day_section = this._els[\"dhx_multi_day\"][0];\r\n\t\t\t\t\tmulti_day_section.style.height = used_multi_day_height_css;\r\n\t\t\t\t\tmulti_day_section.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\tmulti_day_section.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\r\n\t\t\t\t\t// icon\r\n\t\t\t\t\tvar multi_day_icon = this._els[\"dhx_multi_day\"][1];\r\n\t\t\t\t\tmulti_day_icon.style.height = used_multi_day_height_css;\r\n\t\t\t\t\tmulti_day_icon.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\tmulti_day_icon.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\t\t\t\t\tmulti_day_icon.className = h[0] ? \"dhx_multi_day_icon\" : \"dhx_multi_day_icon_small\";\r\n\t\t\t\t\tthis._dy_shift = (h[0] + 1) * hb;\r\n\t\t\t\t\tif(this.config.multi_day_height_limit){\r\n\t\t\t\t\t\tthis._dy_shift = Math.min(this.config.multi_day_height_limit, this._dy_shift);\r\n\t\t\t\t\t}\r\n\t\t\t\t\th[0] = 0;\r\n\r\n\t\t\t\t\tif (used_multi_day_height != full_multi_day_height) {\r\n\r\n\t\t\t\t\t\tmulti_day_section.style.overflowY = \"auto\";\r\n\t\t\t\t\t//\tmulti_day_section.style.width = (parseInt(this._els[\"dhx_cal_navline\"][0].style.width)) + \"px\";\r\n\r\n\t\t\t\t\t\tmulti_day_icon.style.position = \"fixed\";\r\n\t\t\t\t\t\tmulti_day_icon.style.top = \"\";\r\n\t\t\t\t\t\tmulti_day_icon.style.left = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn evs;\r\n};\r\nscheduler._get_event_sday = function(ev) {\r\n\t// get day in current view\r\n\t// use rounding for 23 or 25 hour days on DST\r\n\tvar datePart = this.date.day_start(new Date(ev.start_date));\r\n\treturn Math.round((datePart.valueOf() - this._min_date.valueOf()) / (24 * 60 * 60 * 1000));\r\n};\r\nscheduler._get_event_mapped_end_date = function(ev) {\r\n\tvar end_date = ev.end_date;\r\n\tif (this.config.separate_short_events) {\r\n\t\tvar ev_duration = (ev.end_date - ev.start_date) / 60000; // minutes\r\n\t\tif (ev_duration < this._min_mapped_duration) {\r\n\t\t\tend_date = this.date.add(end_date, this._min_mapped_duration - ev_duration, \"minute\");\r\n\t\t}\r\n\t}\r\n\treturn end_date;\r\n};\r\nscheduler._pre_render_events_line = function(evs, hold){\r\n\tevs.sort(function(a, b) {\r\n\t\tif (a.start_date.valueOf() == b.start_date.valueOf())\r\n\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\treturn a.start_date > b.start_date ? 1 : -1;\r\n\t});\r\n\tvar days = []; //events by weeks\r\n\tvar evs_originals = [];\r\n\r\n\tthis._min_mapped_duration = Math.floor(this.xy.min_event_height * 60 / this.config.hour_size_px); // values could change along the way\r\n\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tvar ev = evs[i];\r\n\r\n\t\t//check date overflow\r\n\t\tvar sd = ev.start_date;\r\n\t\tvar ed = ev.end_date;\r\n\t\t//check scale overflow\r\n\t\tvar sh = sd.getHours();\r\n\t\tvar eh = ed.getHours();\r\n\t\tev._sday = this._get_event_sday(ev); // sday based on event start_date\r\n\t\tif (this._ignores[ev._sday]){\r\n\t\t\t//ignore event\r\n\t\t\tevs.splice(i,1);\r\n\t\t\ti--;\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\tif (!days[ev._sday]) days[ev._sday] = [];\r\n\r\n\t\tif (!hold) {\r\n\t\t\tev._inner = false;\r\n\r\n\t\t\tvar stack = days[ev._sday];\r\n\r\n\t\t\twhile (stack.length) {\r\n\t\t\t\tvar t_ev = stack[stack.length - 1];\r\n\t\t\t\tvar t_end_date = this._get_event_mapped_end_date(t_ev);\r\n\t\t\t\tif (t_end_date.valueOf() <= ev.start_date.valueOf()) {\r\n\t\t\t\t\tstack.splice(stack.length - 1, 1);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar slot_index = stack.length;\r\n\t\t\tvar sorderSet = false;\r\n\t\t\tfor (var j = 0; j < stack.length; j++) {\r\n\t\t\t\tvar t_ev = stack[j];\r\n\t\t\t\tvar t_end_date = this._get_event_mapped_end_date(t_ev);\r\n\t\t\t\tif (t_end_date.valueOf() <= ev.start_date.valueOf()) {\r\n\t\t\t\t\tsorderSet = true;\r\n\t\t\t\t\tev._sorder = t_ev._sorder;\r\n\t\t\t\t\tslot_index = j;\r\n\t\t\t\t\tev._inner = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (stack.length)\r\n\t\t\t\tstack[stack.length - 1]._inner = true;\r\n\r\n\t\t\tif (!sorderSet) {\r\n\t\t\t\tif (stack.length) {\r\n\t\t\t\t\tif (stack.length <= stack[stack.length - 1]._sorder) {\r\n\t\t\t\t\t\tif (!stack[stack.length - 1]._sorder)\r\n\t\t\t\t\t\t\tev._sorder = 0;\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tfor (j = 0; j < stack.length; j++) {\r\n\t\t\t\t\t\t\t\tvar _is_sorder = false;\r\n\t\t\t\t\t\t\t\tfor (var k = 0; k < stack.length; k++) {\r\n\t\t\t\t\t\t\t\t\tif (stack[k]._sorder == j) {\r\n\t\t\t\t\t\t\t\t\t\t_is_sorder = true;\r\n\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (!_is_sorder) {\r\n\t\t\t\t\t\t\t\t\tev._sorder = j;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\tev._inner = true;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tvar _max_sorder = stack[0]._sorder;\r\n\t\t\t\t\t\tfor (j = 1; j < stack.length; j++) {\r\n\t\t\t\t\t\t\tif (stack[j]._sorder > _max_sorder)\r\n\t\t\t\t\t\t\t\t_max_sorder = stack[j]._sorder;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tev._sorder = _max_sorder + 1;\r\n\t\t\t\t\t\tev._inner = false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} else\r\n\t\t\t\t\tev._sorder = 0;\r\n\t\t\t}\r\n\r\n\t\t\tstack.splice(slot_index, slot_index == stack.length ? 0 : 1, ev);\r\n\r\n\t\t\tif (stack.length > (stack.max_count || 0)) {\r\n\t\t\t\tstack.max_count = stack.length;\r\n\t\t\t\tev._count = stack.length;\r\n\t\t\t} else {\r\n\t\t\t\tev._count = (ev._count) ? ev._count : 1;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (sh < this.config.first_hour || eh >= this.config.last_hour) {\r\n\t\t\t// Need to create copy of event as we will be changing it's start/end date\r\n\t\t\t// e.g. first_hour = 11 and event.start_date hours = 9. Need to preserve that info\r\n\t\t\tevs_originals.push(ev);\r\n\t\t\tevs[i] = ev = this._copy_event(ev);\r\n\r\n\t\t\tif (sh < this.config.first_hour) {\r\n\t\t\t\tev.start_date.setHours(this.config.first_hour);\r\n\t\t\t\tev.start_date.setMinutes(0);\r\n\t\t\t}\r\n\t\t\tif (eh >= this.config.last_hour) {\r\n\t\t\t\tev.end_date.setMinutes(0);\r\n\t\t\t\tev.end_date.setHours(this.config.last_hour);\r\n\t\t\t}\r\n\r\n\t\t\tif (ev.start_date > ev.end_date || sh == this.config.last_hour) {\r\n\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (!hold) {\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tevs[i]._count = days[evs[i]._sday].max_count;\r\n\t\t}\r\n\t\tfor (var i = 0; i < evs_originals.length; i++)\r\n\t\t\tevs_originals[i]._count = days[evs_originals[i]._sday].max_count;\r\n\t}\r\n\r\n\treturn evs;\r\n};\r\nscheduler._time_order = function(evs) {\r\n\tevs.sort(function(a, b) {\r\n\t\tif (a.start_date.valueOf() == b.start_date.valueOf()) {\r\n\t\t\tif (a._timed && !b._timed) return 1;\r\n\t\t\tif (!a._timed && b._timed) return -1;\r\n\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\t}\r\n\t\treturn a.start_date > b.start_date ? 1 : -1;\r\n\t});\r\n};\r\n\r\nscheduler._is_any_multiday_cell_visible = function(from, to, event){\r\n\tvar cols = this._cols.length;\r\n\tvar isAnyCellVisible = false;\r\n\tvar checkDate = from;\r\n\tvar noCells = true;\r\n\tvar lastDayEnd = new Date(to);\r\n\tif(scheduler.date.day_start(new Date(to)).valueOf() != to.valueOf()){\r\n\t\tlastDayEnd = scheduler.date.day_start(lastDayEnd);\r\n\t\tlastDayEnd = scheduler.date.add(lastDayEnd, 1, \"day\");\r\n\t}\r\n\twhile(checkDate < lastDayEnd){\r\n\t\tnoCells = false;\r\n\t\tvar cellIndex = this.locate_holder_day(checkDate, false, event);\r\n\t\tvar weekCellIndex = cellIndex % cols;\r\n\t\tif(!this._ignores[weekCellIndex]){\r\n\t\t\tisAnyCellVisible = true;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tcheckDate = scheduler.date.add(checkDate, 1, \"day\");\r\n\t}\r\n\treturn noCells || isAnyCellVisible;\r\n};\r\n\r\nscheduler._pre_render_events_table = function(evs, hold) { // max - max height of week slot\r\n\tthis._time_order(evs);\r\n\tvar out = [];\r\n\tvar weeks = [\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[]\r\n\t]; //events by weeks\r\n\tvar max = this._colsS.heights;\r\n\tvar start_date;\r\n\tvar cols = this._cols.length;\r\n\tvar chunks_info = {};\r\n\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tvar ev = evs[i];\r\n\t\tvar id = ev.id;\r\n\t\tif (!chunks_info[id]) {\r\n\t\t\tchunks_info[id] = {\r\n\t\t\t\tfirst_chunk: true,\r\n\t\t\t\tlast_chunk: true\r\n\t\t\t};\r\n\t\t}\r\n\t\tvar chunk_info = chunks_info[id];\r\n\t\tvar sd = (start_date || ev.start_date);\r\n\t\tvar ed = ev.end_date;\r\n\t\t//trim events which are crossing through current view\r\n\t\tif (sd < this._min_date) {\r\n\t\t\tchunk_info.first_chunk = false;\r\n\t\t\tsd = this._min_date;\r\n\t\t}\r\n\t\tif (ed > this._max_date) {\r\n\t\t\tchunk_info.last_chunk = false;\r\n\t\t\ted = this._max_date;\r\n\t\t}\r\n\r\n\t\tvar locate_s = this.locate_holder_day(sd, false, ev);\r\n\t\tev._sday = locate_s % cols;\r\n\t\t//skip single day events for ignored dates\r\n\t\tif (this._ignores[ev._sday] && ev._timed) continue;\r\n\r\n\t\tvar locate_e = this.locate_holder_day(ed, true, ev) || cols;\r\n\t\tev._eday = (locate_e % cols) || cols; //cols used to fill full week, when event end on monday\r\n\t\tev._length = locate_e - locate_s;\r\n\t\t//3600000 - compensate 1 hour during winter|summer time shift\r\n\t\tev._sweek = Math.floor((this._correct_shift(sd.valueOf(), 1) - this._min_date.valueOf()) / (60 * 60 * 1000 * 24 * cols));\r\n\r\n\t\tvar isAnyCellVisible = scheduler._is_any_multiday_cell_visible(sd, ed, ev);\r\n\r\n\t\tif(!isAnyCellVisible){\r\n\t\t\tstart_date = null;\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\t//current slot\r\n\t\tvar stack = weeks[ev._sweek];\r\n\t\t//check order position\r\n\t\tvar stack_line;\r\n\r\n\t\tfor (stack_line = 0; stack_line < stack.length; stack_line++)\r\n\t\t\tif (stack[stack_line]._eday <= ev._sday)\r\n\t\t\t\tbreak;\r\n\r\n\t\tif (!ev._sorder || !hold) {\r\n\t\t\tev._sorder = stack_line;\r\n\t\t}\r\n\r\n\t\tif (ev._sday + ev._length <= cols) {\r\n\t\t\tstart_date = null;\r\n\t\t\tout.push(ev);\r\n\t\t\tstack[stack_line] = ev;\r\n\t\t\t//get max height of slot\r\n\t\t\tmax[ev._sweek] = stack.length - 1;\r\n\t\t\tev._first_chunk = chunk_info.first_chunk;\r\n\t\t\tev._last_chunk = chunk_info.last_chunk;\r\n\t\t} else { // split long event in chunks\r\n\t\t\tvar copy = this._copy_event(ev);\r\n\t\t\tcopy.id = ev.id;\r\n\t\t\tcopy._length = cols - ev._sday;\r\n\t\t\tcopy._eday = cols;\r\n\t\t\tcopy._sday = ev._sday;\r\n\t\t\tcopy._sweek = ev._sweek;\r\n\t\t\tcopy._sorder = ev._sorder;\r\n\t\t\tcopy.end_date = this.date.add(sd, copy._length, \"day\");\r\n\t\t\tcopy._first_chunk = chunk_info.first_chunk;\r\n\t\t\tif (chunk_info.first_chunk) {\r\n\t\t\t\tchunk_info.first_chunk = false;\r\n\t\t\t}\r\n\r\n\t\t\tout.push(copy);\r\n\t\t\tstack[stack_line] = copy;\r\n\t\t\tstart_date = copy.end_date;\r\n\t\t\t//get max height of slot\r\n\t\t\tmax[ev._sweek] = stack.length - 1;\r\n\t\t\ti--;\r\n\t\t\tcontinue; //repeat same step\r\n\t\t}\r\n\t}\r\n\treturn out;\r\n};\r\nscheduler._copy_dummy = function() {\r\n\tvar a = new Date(this.start_date);\r\n\tvar b = new Date(this.end_date);\r\n\tthis.start_date = a;\r\n\tthis.end_date = b;\r\n};\r\nscheduler._copy_event = function(ev) {\r\n\tthis._copy_dummy.prototype = ev;\r\n\treturn new this._copy_dummy();\r\n\t//return {start_date:ev.start_date, end_date:ev.end_date, text:ev.text, id:ev.id}\r\n};\r\nscheduler._rendered = [];\r\nscheduler.clear_view = function() {\r\n\tfor (var i = 0; i < this._rendered.length; i++) {\r\n\t\tvar obj = this._rendered[i];\r\n\t\tif (obj.parentNode) obj.parentNode.removeChild(obj);\r\n\t}\r\n\tthis._rendered = [];\r\n};\r\nscheduler.updateEvent = function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tthis.clear_event(id);\r\n\r\n\tif (ev && this.is_visible_events(ev) && this.filter_event(id, ev) && (this._table_view || this.config.multi_day || ev._timed)) {\r\n\t\tif (this.config.update_render){\r\n\t\t\tthis.render_view_data();\r\n\t\t}else{\r\n\t\t\tif(this.getState().mode == \"month\" && !this.getState().drag_id && !this.isOneDayEvent(ev)){\r\n\t\t\t\tthis.render_view_data();\r\n\t\t\t}else{\r\n\t\t\t\tthis.render_view_data([ev], true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.clear_event = function(id) {\r\n\tthis.for_rendered(id, function(node, i) {\r\n\t\tif (node.parentNode)\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\tscheduler._rendered.splice(i, 1);\r\n\t});\r\n};\r\nscheduler._y_from_date = function(date){\r\n\tvar sm = date.getHours() * 60 + date.getMinutes();\r\n\treturn ((Math.round((sm * 60 * 1000 - this.config.first_hour * 60 * 60 * 1000) * this.config.hour_size_px / (60 * 60 * 1000))) % (this.config.hour_size_px * 24)); //42px/hour\r\n};\r\nscheduler._calc_event_y = function(ev, min_height){\r\n\tmin_height = min_height || 0;\r\n\tvar sm = ev.start_date.getHours() * 60 + ev.start_date.getMinutes();\r\n\tvar em = (ev.end_date.getHours() * 60 + ev.end_date.getMinutes()) || (scheduler.config.last_hour * 60);\r\n\tvar top = this._y_from_date(ev.start_date);\r\n\r\n\tvar height = Math.max(min_height, (em - sm) * this.config.hour_size_px / 60); //42px/hour\r\n\treturn {\r\n\t\ttop: top,\r\n\t\theight: height\r\n\t};\r\n};\r\nscheduler.render_event = function(ev, buffer, parentWidth) {\r\n\tvar menu = scheduler.xy.menu_width;\r\n\tvar menu_offset = (this.config.use_select_menu_space) ? 0 : menu;\r\n\tif (ev._sday < 0) return; //can occur in case of recurring event during time shift\r\n\r\n\tvar parent = scheduler.locate_holder(ev._sday);\r\n\tif (!parent) return; //attempt to render non-visible event\r\n\r\n\tbuffer = buffer || parent;\r\n\r\n\tvar pos_y = this._calc_event_y(ev, scheduler.xy.min_event_height);\r\n\tvar top = pos_y.top,\r\n\t\theight = pos_y.height;\r\n\r\n\tvar ev_count = ev._count || 1;\r\n\tvar ev_sorder = ev._sorder || 0;\r\n\r\n\tparentWidth = parentWidth || parent.clientWidth;\r\n\tif(this.config.day_column_padding){\r\n\t\tparentWidth -= this.config.day_column_padding;\r\n\t}\r\n\r\n\tvar width = Math.floor((parentWidth - menu_offset) / ev_count);\r\n\tvar left = ev_sorder * width + (ev_sorder > 0 ? 2 : 1);\r\n\tif (!ev._inner) width = width * (ev_count - ev_sorder);\r\n\tif (this.config.cascade_event_display) {\r\n\t\tvar limit = this.config.cascade_event_count;\r\n\t\tvar margin = this.config.cascade_event_margin;\r\n\t\tleft = ev_sorder % limit * margin;\r\n\t\tvar right = (ev._inner) ? (ev_count - ev_sorder - 1) % limit * margin / 2 : 0;\r\n\t\twidth = Math.floor(parentWidth - menu_offset - left - right);\r\n\t}\r\n\r\n\tif(height < 30){\r\n\t\tev._mode = \"smallest\";\r\n\t}else if(height < 42){\r\n\t\tev._mode = \"small\";\r\n\t}else{\r\n\t\tev._mode = null;\r\n\t}\r\n\r\n\tvar d = this._render_v_bar(ev, menu_offset + left, top, width, height, ev._text_style, scheduler.templates.event_header(ev.start_date, ev.end_date, ev), scheduler.templates.event_text(ev.start_date, ev.end_date, ev));\r\n\t\r\n\tif(ev._mode === \"smallest\"){\r\n\t\td.classList.add(\"dhx_cal_event--xsmall\");\r\n\t}else if (ev._mode === \"small\"){\r\n\t\td.classList.add(\"dhx_cal_event--small\");\r\n\t}\r\n\r\n\tthis._waiAria.eventAttr(ev, d);\r\n\tthis._rendered.push(d);\r\n\tbuffer.appendChild(d);\r\n\r\n\tvar parentPosition = parseInt( this.config.rtl ? parent.style.right : parent.style.left, 10);\r\n\r\n\tleft = left + parentPosition + menu_offset;\r\n\r\n\tif (this._edit_id == ev.id) {\r\n\r\n\t\td.style.zIndex = 1; //fix overlapping issue\r\n\t\twidth = Math.max(width, scheduler.xy.editor_width);\r\n\t\td = document.createElement(\"div\");\r\n\t\td.setAttribute(\"event_id\", ev.id); // for backward compatibility\r\n\t\td.setAttribute(this.config.event_attribute, ev.id);\r\n\r\n\t\tthis._waiAria.eventAttr(ev, d);\r\n\r\n\t\td.className = \"dhx_cal_event dhx_cal_editor\";\r\n\t\tif (this.config.rtl) left++;\r\n\t\tthis.set_xy(d, width, height, left, top);\r\n\r\n\r\n\t\tif(ev.color){\r\n\t\t\td.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tvar tplClass = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\r\n\t\tif(tplClass){\r\n\t\t\td.className += \" \" + tplClass;\r\n\t\t}\r\n\t\tvar d2 = document.createElement(\"div\");\r\n\t\td2.style.cssText += \"overflow:hidden;height:100%\";\r\n\r\n\t\td.appendChild(d2);\r\n\t\tthis._els[\"dhx_cal_data\"][0].appendChild(d);\r\n\t\tthis._rendered.push(d);\r\n\r\n\t\td2.innerHTML = \"\";\r\n\t\tthis._editor = d2.querySelector(\"textarea\");\r\n\t\t\r\n\t\tscheduler.event(this._editor, \"keydown\", function(e) {\r\n\t\t\tif (e.shiftKey) return true;\r\n\t\t\tvar code = e.keyCode;\r\n\t\t\tif (code == scheduler.keys.edit_save) scheduler.editStop(true);\r\n\t\t\tif (code == scheduler.keys.edit_cancel) scheduler.editStop(false);\r\n\r\n\t\t\tif(code == scheduler.keys.edit_save || code == scheduler.keys.edit_cancel){\r\n\t\t\t\tif(e.preventDefault) e.preventDefault();\r\n\t\t\t}\r\n\t\t});\r\n\t\tscheduler.event(this._editor, \"selectstart\", function (e) {\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn true;\r\n\t\t});\r\n\t\tscheduler._focus(this._editor, true);\r\n\t\t//IE and opera can add x-scroll during focusing\r\n\t\tthis._els[\"dhx_cal_data\"][0].scrollLeft = 0;\r\n\t}\r\n\tif (this.xy.menu_width !== 0 && this._select_id == ev.id) {\r\n\r\n\t\tif (this.config.cascade_event_display && this._drag_mode)\r\n\t\t\td.style.zIndex = 1; //fix overlapping issue for cascade view in case of dnd of selected event\r\n\t\tvar icons = this.config[\"icons_\" + ((this._edit_id == ev.id) ? \"edit\" : \"select\")];\r\n\t\tvar icons_str = \"\";\r\n\r\n\t\tvar ariaAttr;\r\n\r\n\t\tfor (var i = 0; i < icons.length; i++) {\r\n\t\t\tconst currentIcon = icons[i];\r\n\t\t\tariaAttr = this._waiAria.eventMenuAttrString(currentIcon);\r\n\t\t\ticons_str += `
`;\r\n\t\t}\r\n\t\tvar obj = this._render_v_bar(ev, left - menu - 1, top, menu, null, \"\", \"
\", icons_str, true);\r\n\r\n\t\tif(ev.color){\r\n\t\t\tobj.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tobj.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\t//obj.style.left = left - menu + 1;\r\n\t\tthis._els[\"dhx_cal_data\"][0].appendChild(obj);\r\n\t\tthis._rendered.push(obj);\r\n\t}\r\n\tif(this.config.drag_highlight && this._drag_id == ev.id){\r\n\t\tthis.highlightEventPosition(ev);\r\n\t}\r\n};\r\nscheduler._render_v_bar = function (ev, x, y, w, h, style, contentA, contentB, bottom) {\r\n\tvar d = document.createElement(\"div\");\r\n\tvar id = ev.id;\r\n\tvar cs = (bottom) ? \"dhx_cal_event dhx_cal_select_menu\" : \"dhx_cal_event\";\r\n\r\n\tvar state = scheduler.getState();\r\n\tif(state.drag_id == ev.id){\r\n\t\tcs += \" dhx_cal_event_drag\";\r\n\t}\r\n\r\n\tif(state.select_id == ev.id){\r\n\t\tcs += \" dhx_cal_event_selected\";\r\n\t}\r\n\r\n\tvar cse = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\tif (cse) cs = cs + \" \" + cse;\r\n\r\n\tif(this.config.cascade_event_display) {\r\n\t\tcs += \" dhx_cal_event_cascade\";\r\n\t}\r\n\r\n\tvar boxWidth = w;\r\n\r\n\tvar html = '
';\r\n\td.innerHTML = html;\r\n\r\n\tvar container = d.cloneNode(true).firstChild;\r\n\r\n\tif (!bottom && scheduler.renderEvent(container, ev, w, h, contentA, contentB)) {\r\n\t\tif(ev.color){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\treturn container;\r\n\t} else {\r\n\t\tcontainer = d.firstChild;\r\n\t\tif(ev.color){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\tvar inner_html = '
 
';\r\n\t\tinner_html += '
' + contentA + '
';\r\n\t\tinner_html += '
' + contentB + '
'; // +2 css specific, moved from render_event\r\n\r\n\t\tvar footer_class = \"dhx_event_resize dhx_footer\";\r\n\t\tif (bottom || ev._drag_resize === false)\r\n\t\t\tfooter_class = \"dhx_resize_denied \" + footer_class;\r\n\r\n\t\tinner_html += '
';\r\n\r\n\t\tcontainer.innerHTML = inner_html;\r\n\t}\r\n\r\n\treturn container;\r\n};\r\nscheduler.renderEvent = function(){\r\n\treturn false;\r\n};\r\nscheduler.locate_holder = function(day) {\r\n\tif (this._mode == \"day\") return this._els[\"dhx_cal_data\"][0].firstChild; //dirty\r\n\treturn this._els[\"dhx_cal_data\"][0].childNodes[day];\r\n};\r\nscheduler.locate_holder_day = function(date, past) {\r\n\tvar day = Math.floor((this._correct_shift(date, 1) - this._min_date) / (60 * 60 * 24 * 1000));\r\n\t//when locating end data of event , we need to use next day if time part was defined\r\n\tif (past && this.date.time_part(date)) day++;\r\n\treturn day;\r\n};\r\n\r\n\r\n\r\nscheduler._get_dnd_order = function(order, ev_height, max_height){\r\n\tif(!this._drag_event)\r\n\t\treturn order;\r\n\tif(!this._drag_event._orig_sorder)\r\n\t\tthis._drag_event._orig_sorder = order;\r\n\telse\r\n\t\torder = this._drag_event._orig_sorder;\r\n\r\n\tvar evTop = ev_height * order;\r\n\twhile((evTop + ev_height) > max_height){\r\n\t\torder--;\r\n\t\tevTop -= ev_height;\r\n\t}\r\n\torder = Math.max(order, 0);\r\n\treturn order;\r\n};\r\n//scheduler._get_event_bar_pos = function(sday, eday, week, drag){\r\nscheduler._get_event_bar_pos = function(ev){\r\n\tvar rtl = this.config.rtl;\r\n\tvar columns = this._colsS;\r\n\tvar x = columns[ev._sday];\r\n\tvar x2 = columns[ev._eday];\r\n\tif (rtl) {\r\n\t\tx = columns[columns.col_length] - columns[ev._eday] + columns[0];\r\n\t\tx2 = columns[columns.col_length] - columns[ev._sday] + columns[0];\r\n\t}\r\n\r\n\tif (x2 == x) x2 = columns[ev._eday + 1];\r\n\tvar hb = this.xy.bar_height;\r\n\r\n\tvar order = ev._sorder;\r\n\tif(ev.id == this._drag_id){\r\n\t\tvar cellHeight = columns.heights[ev._sweek + 1] - columns.heights[ev._sweek]- this.xy.month_head_height;//22 for month head height\r\n\t\torder = scheduler._get_dnd_order(order, hb, cellHeight);\r\n\t}\r\n\tvar y_event_offset = order * hb;\r\n\tvar y = columns.heights[ev._sweek] + (columns.height ? (this.xy.month_scale_height + 2) : 2 ) + y_event_offset;\r\n\treturn {x:x, x2:x2, y:y};\r\n};\r\n\r\nscheduler.render_event_bar = function (ev) {\r\n\tvar parent = this._rendered_location;\r\n\tvar pos = this._get_event_bar_pos(ev);\r\n\tvar y = pos.y;\r\n\tvar x = pos.x;\r\n\tvar x2 = pos.x2;\r\n\t// resize for month mutliday events\r\n\tvar resize_handle = \"\";\r\n\r\n\t//events in ignored dates\r\n\r\n\tif (!x2) return;\r\n\r\n\tvar resizable = scheduler.config.resize_month_events && this._mode == \"month\" &&\r\n\t\t(!ev._timed || scheduler.config.resize_month_timed);\r\n\r\n\tvar d = document.createElement(\"div\");\r\n\tvar left_chunk = (ev.hasOwnProperty(\"_first_chunk\") && ev._first_chunk),\r\n\t\tright_chunk = (ev.hasOwnProperty(\"_last_chunk\") && ev._last_chunk);\r\n\r\n\tvar resize_left = resizable && (ev._timed || left_chunk);\r\n\tvar resize_right = resizable && (ev._timed || right_chunk);\r\n\r\n\tvar timed = true;\r\n\tvar cs = \"dhx_cal_event_clear\";\r\n\tif (!ev._timed || resizable) {\r\n\t\ttimed = false;\r\n\t\tcs = \"dhx_cal_event_line\";\r\n\t}\r\n\tif(left_chunk){\r\n\t\tcs += \" dhx_cal_event_line_start\";\r\n\t}\r\n\tif(right_chunk){\r\n\t\tcs += \" dhx_cal_event_line_end\";\r\n\t}\r\n\tif(resize_left){\r\n\t\tresize_handle += \"
\";\r\n\t}\r\n\tif(resize_right){\r\n\t\tresize_handle += \"
\";\r\n\t}\r\n\r\n\tvar cse = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\tif (cse){\r\n\t\tcs += \" \" + cse;\r\n\t}\r\n\r\n\tvar bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\tvar color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\tvar style_text = [\r\n\t\t\"position:absolute\",\r\n\t\t\"top:\" + y + \"px\",\r\n\t\t\"left:\" + x + \"px\",\r\n\t\t\"width:\" + (x2 - x - (timed ? 1 : 0)) + \"px\",\r\n\t\t\"height:\" + (this.xy.bar_height - 2) + \"px\",\r\n\t\tcolor,\r\n\t\tbg_color,\r\n\t\t(ev._text_style || \"\")\r\n\t].join(\";\");\r\n\r\n\tvar html = \"
\";\r\n\tif (resizable) {\r\n\t\thtml += resize_handle;\r\n\t}\r\n\tif(scheduler.getState().mode == \"month\"){\r\n\t\tev = scheduler.getEvent(ev.id); // ev at this point could be a part (row in a month view) of a larger event\r\n\t}\r\n\r\n\tif (ev._timed){\r\n\t\thtml += `${scheduler.templates.event_bar_date(ev.start_date, ev.end_date, ev)}`;\r\n\t}\r\n\r\n\thtml += \"
\";\r\n\thtml += scheduler.templates.event_bar_text(ev.start_date, ev.end_date, ev) + '
';\r\n\thtml += \"
\";\r\n\thtml += '
';\r\n\r\n\td.innerHTML = html;\r\n\r\n\tthis._rendered.push(d.firstChild);\r\n\tparent.appendChild(d.firstChild);\r\n};\r\n\r\nscheduler._locate_event = function(node) {\r\n\tvar id = null;\r\n\twhile (node && !id && node.getAttribute) {\r\n\t\tid = node.getAttribute(this.config.event_attribute);\r\n\t\tnode = node.parentNode;\r\n\t}\r\n\treturn id;\r\n};\r\n\r\nscheduler.edit = function(id) {\r\n\tif (this._edit_id == id) return;\r\n\tthis.editStop(false, id);\r\n\tthis._edit_id = id;\r\n\tthis.updateEvent(id);\r\n};\r\nscheduler.editStop = function(mode, id) {\r\n\tif (id && this._edit_id == id) return;\r\n\tvar ev = this.getEvent(this._edit_id);\r\n\tif (ev) {\r\n\t\tif (mode) ev.text = this._editor.value;\r\n\t\tthis._edit_id = null;\r\n\t\tthis._editor = null;\r\n\t\tthis.updateEvent(ev.id);\r\n\t\tthis._edit_stop_event(ev, mode);\r\n\t}\r\n};\r\nscheduler._edit_stop_event = function(ev, mode) {\r\n\tif (this._new_event) {\r\n\t\tif (!mode) {\r\n\t\t\tif (ev) // in case of custom lightbox user can already delete event\r\n\t\t\t\tthis.deleteEvent(ev.id, true);\r\n\t\t} else {\r\n\t\t\tthis.callEvent(\"onEventAdded\", [ev.id, ev]);\r\n\t\t}\r\n\t\tthis._new_event = null;\r\n\t} else {\r\n\t\tif (mode){\r\n\t\t\tthis.callEvent(\"onEventChanged\", [ev.id, ev]);\r\n\t\t}\r\n\t}\r\n};\r\n\r\nscheduler.getEvents = function(from, to) {\r\n\tvar result = [];\r\n\tfor (var a in this._events) {\r\n\t\tvar ev = this._events[a];\r\n\t\tif (ev && ( (!from && !to) || (ev.start_date < to && ev.end_date > from) ))\r\n\t\t\tresult.push(ev);\r\n\t}\r\n\treturn result;\r\n};\r\nscheduler.getRenderedEvent = function(id) {\r\n\tif (!id)\r\n\t\treturn;\r\n\tvar rendered_events = scheduler._rendered;\r\n\tfor (var i=0; i -1){\r\n\t\t\t\t\tsection = section.split(scheduler.config.section_delimiter)[0];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar top = timeline.getSectionTop(section);\r\n\t\t\tvar left = timeline.posFromDate(event.start_date);\r\n\t\t\tvar container = scheduler.$container.querySelector(\".dhx_timeline_data_wrapper\");\r\n\t\t\tleft = left - (container.offsetWidth - timeline.dx) / 2;\r\n\t\t\ttop = top - container.offsetHeight / 2 + timeline.dy/2;\r\n\r\n\t\t\tif (timeline._smartRenderingEnabled()) {\r\n\t\t\t\tvar handlerId = timeline.attachEvent(\"onScroll\", function(){\r\n\t\t\t\t\trestoreOriginalColors();\r\n\t\t\t\t\ttimeline.detachEvent(handlerId);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\ttimeline.scrollTo({\r\n\t\t\t\tleft: left,\r\n\t\t\t\ttop: top\r\n\t\t\t});\r\n\t\t\tif (!timeline._smartRenderingEnabled()) {\r\n\t\t\t\trestoreOriginalColors();\r\n\t\t\t}\r\n\t\t}\r\n\t}else{\r\n\t\trestoreOriginalColors();\r\n\t}\r\n\r\n\tscheduler.callEvent(\"onAfterEventDisplay\", [ev, mode]);\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._append_drag_marker = function(m){\r\n\tif(m.parentNode) return;\r\n\tvar zone = scheduler._els[\"dhx_cal_data\"][0];\r\n\r\n\tvar scale = zone.lastChild;\r\n\tvar className = scheduler._getClassName(scale);\r\n\tif(className.indexOf(\"dhx_scale_holder\") < 0 && scale.previousSibling){\r\n\t\tscale = scale.previousSibling;\r\n\t}\r\n\r\n\tclassName = scheduler._getClassName(scale);\r\n\tif (scale && className.indexOf(\"dhx_scale_holder\") === 0) {\r\n\t\tscale.appendChild(m);\r\n\t}\r\n};\r\n\r\nscheduler._update_marker_position = function(m, event){\r\n\tvar size = scheduler._calc_event_y(event, 0);\r\n\tm.style.top = size.top + \"px\";\r\n\tm.style.height = size.height + \"px\";\r\n};\r\n\r\nscheduler.highlightEventPosition = function(event){\r\n\tvar m = document.createElement(\"div\");\r\n\r\n\tm.setAttribute(\"event_id\", event.id); // for backward compatibility\r\n\tm.setAttribute(this.config.event_attribute, event.id);\r\n\tthis._rendered.push(m);\r\n\tthis._update_marker_position(m, event);\r\n\r\n\tvar css = this.templates.drag_marker_class(event.start_date, event.end_date, event);\r\n\tvar html = this.templates.drag_marker_content(event.start_date, event.end_date, event);\r\n\tm.className = \"dhx_drag_marker\";\r\n\tif(css)\r\n\t\tm.className += \" \" + css;\r\n\tif(html)\r\n\t\tm.innerHTML = html;\r\n\tthis._append_drag_marker(m);\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler._lightbox_controls = {};\r\nscheduler.formSection = function(name){\r\n\tvar config = this.config.lightbox.sections;\r\n\tvar i = 0;\r\n\tfor (i; i < config.length; i++) {\r\n\t\tif (config[i].name == name) {\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tif (i === config.length) {\r\n\t\t// GS-1662 section not found, should exit here instead of throwing an error\r\n\t\treturn null;\r\n\t}\r\n\r\n\tvar section = config[i];\r\n\tif (!scheduler._lightbox) {\r\n\t\tscheduler.getLightbox();\r\n\t}\r\n\tvar header = scheduler._lightbox.querySelector(`#${section.id}`);\r\n\tvar node = header.nextSibling;\r\n\r\n\tvar result = {\r\n\t\tsection: section,\r\n\t\theader: header,\r\n\t\tnode: node,\r\n\t\tgetValue:function(ev){\r\n\t\t\treturn scheduler.form_blocks[section.type].get_value(node, (ev||{}), section);\r\n\t\t},\r\n\t\tsetValue:function(value, ev){\r\n\t\t\treturn scheduler.form_blocks[section.type].set_value(node, value, (ev||{}), section);\r\n\t\t}\r\n\t};\r\n\r\n\tvar handler = scheduler._lightbox_controls[\"get_\"+section.type+\"_control\"];\r\n\treturn handler?handler(result):result;\r\n};\r\nscheduler._lightbox_controls.get_template_control = function(result) {\r\n\tresult.control = result.node;\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_select_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('select')[0];\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_textarea_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('textarea')[0];\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_time_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('select'); // array\r\n\treturn result;\r\n};\r\n\r\nscheduler._lightbox_controls.defaults = {\r\n\ttemplate: {\r\n\t\theight:30\r\n\t},\r\n\ttextarea: {\r\n\t\theight: 200\r\n\t},\r\n\tselect: {\r\n\t\theight: 23\r\n\t},\r\n\ttime: {\r\n\t\theight: 20\r\n\t}\r\n};\r\n\r\n\r\nscheduler.form_blocks={\r\n\ttemplate:{\r\n\t\trender: function(sns){\r\n\t\t\treturn \"
\";\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,config){\r\n\t\t\tnode.innerHTML = value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev,config){\r\n\t\t\treturn node.innerHTML||\"\";\r\n\t\t},\r\n\t\tfocus: function(node){\r\n\t\t}\r\n\t},\r\n\ttextarea:{\r\n\t\trender:function(sns){\r\n\t\t\tconst placeholder = sns.placeholder ? `placeholder='${sns.placeholder}'` : \"\";\r\n\t\t\treturn `
`;\r\n\t\t},\r\n\t\tset_value:function(node,value,ev){\r\n\t\t\tscheduler.form_blocks.textarea._get_input(node).value=value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev){\r\n\t\t\treturn scheduler.form_blocks.textarea._get_input(node).value;\r\n\t\t},\r\n\t\tfocus:function(node){\r\n\t\t\tvar a = scheduler.form_blocks.textarea._get_input(node);\r\n\t\t\tscheduler._focus(a, true);\r\n\t\t},\r\n\t\t_get_input: function(node){\r\n\t\t\treturn node.getElementsByTagName(\"textarea\")[0];\r\n\t\t}\r\n\t},\r\n\tselect:{\r\n\t\trender:function(sns){\r\n\t\t\t//var defaults = scheduler._lightbox_controls.defaults.select;\r\n\t\t\tvar html=\"
\";\r\n\t\t\treturn html;\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,sns){\r\n\t\t\tvar select = node.firstChild;\r\n\t\t\tif (!select._dhx_onchange && sns.onchange) {\r\n\t\t\t\tscheduler.event(select, \"change\", sns.onchange);\r\n\t\t\t\tselect._dhx_onchange = true;\r\n\t\t\t}\r\n\t\t\tif (typeof value == \"undefined\")\r\n\t\t\t\tvalue = (select.options[0]||{}).value;\r\n\t\t\tselect.value=value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev){\r\n\t\t\treturn node.firstChild.value;\r\n\t\t},\r\n\t\tfocus:function(node){\r\n\t\t\tvar a=node.firstChild; scheduler._focus(a, true);\r\n\t\t}\r\n\t},\r\n\ttime:{\r\n\t\trender:function(sns) {\r\n\t\t\tif (!sns.time_format) {\r\n\t\t\t\t// default order\r\n\t\t\t\tsns.time_format = [\"%H:%i\", \"%d\", \"%m\", \"%Y\"];\r\n\t\t\t}\r\n\t\t\t// map: default order => real one\r\n\t\t\tsns._time_format_order = {};\r\n\t\t\tvar time_format = sns.time_format;\r\n\r\n\t\t\tvar cfg = scheduler.config;\r\n\t\t\tvar dt = scheduler.date.date_part(scheduler._currentDate());\r\n\t\t\tvar last = 24*60, first = 0;\r\n\t\t\tif(scheduler.config.limit_time_select){\r\n\t\t\t\tlast = 60*cfg.last_hour+1;\r\n\t\t\t\tfirst = 60*cfg.first_hour;\r\n\t\t\t\tdt.setHours(cfg.first_hour);\r\n\t\t\t}\r\n\t\t\tvar html = \"\";\r\n\r\n\t\t\tfor (var p = 0; p < time_format.length; p++) {\r\n\t\t\t\tvar time_option = time_format[p];\r\n\r\n\t\t\t\t// adding spaces between selects\r\n\t\t\t\tif (p > 0) {\r\n\t\t\t\t\thtml += \" \";\r\n\t\t\t\t}\r\n\t\t\t\tvar selectBoxClass = \"\";\r\n\t\t\t\tvar options = \"\";\r\n\t\t\t\tswitch (time_option) {\r\n\t\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_year_select\";\r\n\t\t\t\t\t\tsns._time_format_order[3] = p;\r\n\t\t\t\t\t\t//year\r\n\t\t\t\t\t\tvar range;\r\n\t\t\t\t\t\tvar start_year;\r\n\t\t\t\t\t\tvar end_year;\r\n\t\t\t\t\t\tif(sns.year_range){\r\n\t\t\t\t\t\t\tif (!isNaN(sns.year_range)) {\r\n\t\t\t\t\t\t\t\trange = sns.year_range;\r\n\t\t\t\t\t\t\t} else if (sns.year_range.push) {\r\n\t\t\t\t\t\t\t\t// if\r\n\t\t\t\t\t\t\t\tstart_year = sns.year_range[0];\r\n\t\t\t\t\t\t\t\tend_year = sns.year_range[1];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\trange = range || 10;\r\n\t\t\t\t\t\tvar offset = offset || Math.floor(range / 2);\r\n\t\t\t\t\t\tstart_year = start_year || dt.getFullYear() - offset;\r\n\t\t\t\t\t\tend_year = end_year || start_year + range;\r\n\r\n\t\t\t\t\t\tfor (var i = start_year; i < end_year; i++)\r\n\t\t\t\t\t\t\toptions += \"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%m\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_month_select\";\r\n\t\t\t\t\t\tsns._time_format_order[2] = p;\r\n\t\t\t\t\t\t//month\r\n\t\t\t\t\t\tfor (var i=0; i < 12; i++)\r\n\t\t\t\t\t\t\toptions+=\"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%d\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_day_select\";\r\n\t\t\t\t\t\tsns._time_format_order[1] = p;\r\n\t\t\t\t\t\t//days\r\n\t\t\t\t\t\tfor (var i=1; i < 32; i++)\r\n\t\t\t\t\t\t\toptions+=\"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%H:%i\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_time_select\";\r\n\t\t\t\t\t\tsns._time_format_order[0] = p;\r\n\t\t\t\t\t\t//hours\r\n\t\t\t\t\t\tvar i = first;\r\n\t\t\t\t\t\tvar tdate = dt.getDate();\r\n\t\t\t\t\t\tsns._time_values = [];\r\n\r\n\t\t\t\t\t\twhile(i\"+time+\"\";\r\n\t\t\t\t\t\t\tsns._time_values.push(i);\r\n\t\t\t\t\t\t\tdt.setTime(dt.valueOf()+this.config.time_step*60*1000);\r\n\t\t\t\t\t\t\tvar diff = (dt.getDate()!=tdate)?1:0; // moved or not to the next day\r\n\t\t\t\t\t\t\ti=diff*24*60+dt.getHours()*60+dt.getMinutes();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(options){\r\n\r\n\t\t\t\t\tvar ariaAttrs = scheduler._waiAria.lightboxSelectAttrString(time_option);\r\n\t\t\t\t\tvar readonly = sns.readonly ? \"disabled='disabled'\" : \"\";\r\n\t\t\t\t\thtml += \" \";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//var defaults = scheduler._lightbox_controls.defaults.select;\r\n\r\n\t\t\treturn \"
\"+html+\"  –  \"+html+\"
\";\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,config){\r\n\t\t\tvar cfg = scheduler.config;\r\n\t\t\tvar s=node.getElementsByTagName(\"select\");\r\n\t\t\tvar map = config._time_format_order;\r\n\t\t\tvar start_date, end_date;\r\n\r\n\t\t\tif(cfg.full_day) {\r\n\t\t\t\tif (!node._full_day){\r\n\t\t\t\t\tvar html = \"\";\r\n\t\t\t\t\tif (!scheduler.config.wide_form)\r\n\t\t\t\t\t\thtml = node.previousSibling.innerHTML+html;\r\n\t\t\t\t\tnode.previousSibling.innerHTML=html;\r\n\t\t\t\t\tnode._full_day=true;\r\n\t\t\t\t}\r\n\t\t\t\tvar input=node.previousSibling.getElementsByTagName(\"input\")[0];\r\n\t\t\t\tinput.checked = (scheduler.date.time_part(ev.start_date)===0 && scheduler.date.time_part(ev.end_date)===0);\r\n\r\n\t\t\t\ts[map[0]].disabled=input.checked;\r\n\t\t\t\ts[ map[0] + s.length/2 ].disabled=input.checked;\r\n\r\n\t\t\t\tif(!input.$_eventAttached){\r\n\t\t\t\t\tinput.$_eventAttached = true;\r\n\r\n\t\t\t\t\t\tscheduler.event(input, \"click\", function(){\r\n\t\t\t\t\t\tif(input.checked) {\r\n\t\t\t\t\t\t\tvar obj = {};\r\n\t\t\t\t\t\t\tscheduler.form_blocks.time.get_value(node,obj,config);\r\n\r\n\t\t\t\t\t\t\tstart_date = scheduler.date.date_part(obj.start_date);\r\n\t\t\t\t\t\t\tend_date = scheduler.date.date_part(obj.end_date);\r\n\r\n\t\t\t\t\t\t\tif (+end_date == +start_date || (+end_date >= +start_date && (ev.end_date.getHours() !== 0 || ev.end_date.getMinutes() !== 0)))\r\n\t\t\t\t\t\t\t\tend_date = scheduler.date.add(end_date, 1, \"day\");\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tstart_date = null;\r\n\t\t\t\t\t\t\tend_date = null;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\ts[map[0]].disabled=input.checked;\r\n\t\t\t\t\t\ts[ map[0] + s.length/2 ].disabled=input.checked;\r\n\r\n\t\t\t\t\t\t_fill_lightbox_select(s,0,start_date||ev.start_date);\r\n\t\t\t\t\t\t_fill_lightbox_select(s,4,end_date||ev.end_date);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(cfg.auto_end_date && cfg.event_duration) {\r\n\t\t\t\tvar _update_lightbox_select = function () {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (!(cfg.auto_end_date && cfg.event_duration)){\r\n\t\t\t\t\t\t// setting may be disabled after the handler is attached\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstart_date = new Date(s[map[3]].value,s[map[2]].value,s[map[1]].value,0,s[map[0]].value);\r\n\t\t\t\t\tend_date = new Date(start_date.getTime() + (scheduler.config.event_duration * 60 * 1000));\r\n\t\t\t\t\t_fill_lightbox_select(s, 4, end_date);\r\n\t\t\t\t};\r\n\t\t\t\tfor(var i=0; i<4; i++) {\r\n\t\t\t\t\tif(!s[i].$_eventAttached) {\r\n\t\t\t\t\t\ts[i].$_eventAttached = true;\r\n\t\t\t\t\t\tscheduler.event(s[i], \"change\", _update_lightbox_select);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfunction _fill_lightbox_select(s,i,d) {\r\n\t\t\t\tvar time_values = config._time_values;\r\n\t\t\t\tvar direct_value = d.getHours()*60+d.getMinutes();\r\n\t\t\t\tvar fixed_value = direct_value;\r\n\t\t\t\tvar value_found = false;\r\n\t\t\t\tfor (var k=0; k\";\r\n\t\tvar ariaAttr = \"\";\r\n\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\tariaAttr = this._waiAria.lightboxButtonAttrString(buttons[i]);\r\n\t\t\thtml += \"
\" + scheduler.locale.labels[buttons[i]] + \"
\";\r\n\t\t}\r\n\r\n\t\tbuttons = this.config.buttons_right;\r\n\t\tvar rtl = scheduler.config.rtl;\r\n\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\tariaAttr = this._waiAria.lightboxButtonAttrString(buttons[i]);\r\n\r\n\t\t\thtml += \"
\";\r\n\r\n\t\t\thtml += \"
\" + scheduler.locale.labels[buttons[i]] + \"
\";\r\n\t\t}\r\n\t\thtml += \"
\";\r\n\t\thtml+=\"
\";\r\n\t\td.innerHTML=html;\r\n\t\tif (scheduler.config.drag_lightbox){\r\n\t\t\tscheduler.event(d.firstChild, \"mousedown\", scheduler._ready_to_dnd);\r\n\t\t\tscheduler.event(d.firstChild, \"selectstart\", function(e){ \r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn false; \r\n\t\t\t});\r\n\t\t\td.firstChild.style.cursor = \"move\";\r\n\t\t\tscheduler._init_dnd_events();\r\n\r\n\t\t}\r\n\r\n\t\tthis._waiAria.lightboxAttr(d);\r\n\r\n\t\tthis.show_cover();\r\n\t\tthis._cover.insertBefore(d,this._cover.firstChild);\r\n\t\t\r\n\t\tthis._lightbox=d;\r\n\r\n\t\tvar sns=this.config.lightbox.sections;\r\n\t\thtml=\"\";\r\n\t\tfor (var i=0; i < sns.length; i++) {\r\n\t\t\tvar block=this.form_blocks[sns[i].type];\r\n\t\t\tif (!block) continue; //ignore incorrect blocks\r\n\t\t\tsns[i].id=\"area_\"+this.uid();\r\n\t\t\tvar button = \"\";\r\n\t\t\tif (sns[i].button){\r\n\t\t\t\tvar ariaAttr = scheduler._waiAria.lightboxSectionButtonAttrString(this.locale.labels[\"button_\"+sns[i].button]);\r\n\t\t\t\tbutton = \"
\"+this.locale.labels[\"button_\"+sns[i].button]+\"
\";\r\n\t\t\t}\r\n\r\n\t\t\tif (this.config.wide_form){\r\n\t\t\t\thtml+=\"
\";\r\n\t\t\t}\r\n\r\n\t\t\tvar label_name = this.locale.labels[\"section_\"+sns[i].name];\r\n\t\t\tif(typeof label_name !== \"string\"){\r\n\t\t\t\tlabel_name = sns[i].name;\r\n\t\t\t}\r\n\t\t\thtml+=\"
\"+button+ \"
\"+block.render.call(this,sns[i]);\r\n\t\t\thtml+=\"
\";\r\n\t\t}\r\n\r\n\t\tvar ds=d.getElementsByTagName(\"div\");\r\n\t\tfor (var i=0; i
 \r\n
\r\n
\r\n\r\n
`;\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler.getRootView = function() {\r\n\treturn {\r\n\t\tview: {\r\n\t\t\trender: function(){\r\n\t\t\t\treturn {\r\n\t\t\t\t\ttag: \"div\",\r\n\t\t\t\t\ttype: 1,\r\n\t\t\t\t\tattrs: {\r\n\t\t\t\t\t\tstyle: \"width:100%;height:100%;\"\r\n\t\t\t\t\t},\r\n\t\t\t\t\thooks: {\r\n\t\t\t\t\t\t\"didInsert\": function(){\r\n\t\t\t\t\t\t\tscheduler.setCurrentView();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tbody: [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tel: this.el,\r\n\t\t\t\t\t\t\ttype: 1\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t};\r\n\t\t\t},\r\n\t\t\tinit: function(){\r\n\t\t\t\tvar container = document.createElement(\"DIV\");\r\n\t\t\t\tcontainer.id = \"scheduler_\"+ scheduler.uid();\r\n\t\t\t\tcontainer.style.width = \"100%\";\r\n\t\t\t\tcontainer.style.height = \"100%\";\r\n\t\t\t\tcontainer.classList.add(\"dhx_cal_container\");\r\n\t\t\t\tcontainer.cmp = \"grid\";\r\n\t\t\t\tcontainer.innerHTML = '
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
';\r\n\t\t\t\tscheduler.init(container);\r\n\r\n\t\t\t\tthis.el = container;\r\n\t\t\t}\r\n\t\t},\r\n\t\ttype: 4\r\n\t};\r\n};\r\n\r\n}","import global from \"../global\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\n(function(){\r\n\r\n\tvar setCurrentView = scheduler.setCurrentView,\r\n\t\tupdateView = scheduler.updateView;\r\n\tvar update_view_timer = null,\r\n\t\tcurr_view_timer = null;\r\n\r\n\tvar lazy_setCurrentView = function(date, mode){\r\n\t\tvar self = this;\r\n\t\tglobal.clearTimeout(curr_view_timer);\r\n\t\tglobal.clearTimeout(update_view_timer);\r\n\r\n\t\tvar oldDate = self._date,\r\n\t\t\toldMode = self._mode;\r\n\t\tupdateFlags(this, date, mode);\r\n\r\n\t\tcurr_view_timer = setTimeout(function(){\r\n\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif (!self.callEvent(\"onBeforeViewChange\", [oldMode, oldDate, mode || self._mode, date || self._date])){\r\n\t\t\t\tupdateFlags(self, oldDate, oldMode);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tupdateView.call(self, date, mode);\r\n\t\t\tself.callEvent(\"onViewChange\", [self._mode, self._date]);\r\n\r\n\t\t\tglobal.clearTimeout(update_view_timer);\r\n\t\t\tcurr_view_timer = 0;\r\n\t\t}, scheduler.config.delay_render);\r\n\t};\r\n\tvar lazy_updateView = function(date, mode){\r\n\t\tvar self = this,\r\n\t\t\tars = arguments;\r\n\r\n\t\tupdateFlags(this, date, mode);\r\n\r\n\t\tglobal.clearTimeout(update_view_timer);\r\n\t\tupdate_view_timer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif(curr_view_timer)\r\n\t\t\t\treturn;\r\n\r\n\t\t\tupdateView.apply(self, ars);\r\n\t\t}, scheduler.config.delay_render);\r\n\t};\r\n\tfunction updateFlags(scheduler, date, mode){\r\n\t\tif(date)\r\n\t\t\tscheduler._date = date;\r\n\t\tif(mode)\r\n\t\t\tscheduler._mode = mode;\r\n\r\n\t}\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\tif(scheduler.config.delay_render){\r\n\t\t\tscheduler.setCurrentView = lazy_setCurrentView;\r\n\t\t\tscheduler.updateView = lazy_updateView;\r\n\t\t}else{\r\n\t\t\tscheduler.setCurrentView = setCurrentView;\r\n\t\t\tscheduler.updateView = updateView;\r\n\t\t}\r\n\t});\r\n\r\n})();\r\n\r\n}","import global from \"../global\";\r\n\r\nexport default function extend(scheduler) {\r\n/*\r\nif (global.dataProcessor && !dataProcessor.prototype.init_original){\r\n\tdataProcessor.prototype.init_original=dataProcessor.prototype.init;\r\n\tdataProcessor.prototype.init=function(obj){\r\n\t\tthis.init_original(obj);\r\n\t\tobj._dataprocessor=this;\r\n\r\n\t\tthis.setTransactionMode(\"POST\",true);\r\n\t\tthis.serverProcessor+=(this.serverProcessor.indexOf(\"?\")!=-1?\"&\":\"?\")+\"editing=true\";\r\n\t};\r\n}*/\r\n\r\nscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\tif(typeof dhtmlxError !== \"undefined\") {\r\n\t\twindow.dhtmlxError.catchError(\"LoadXML\", function(a, b, c){\r\n\t\t\tvar message = c[0].responseText;\r\n\r\n\t\t\tswitch (scheduler.config.ajax_error){\r\n\t\t\t\tcase \"alert\":\r\n\t\t\t\t\tglobal.alert(message);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"console\":\r\n\t\t\t\t\tglobal.console.log(message);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n});\r\n\r\n\r\n}","import ar from \"./locale_ar\";\r\nimport be from \"./locale_be\";\r\nimport ca from \"./locale_ca\";\r\nimport cn from \"./locale_cn\";\r\nimport cs from \"./locale_cs\";\r\nimport da from \"./locale_da\";\r\nimport de from \"./locale_de\";\r\nimport el from \"./locale_el\";\r\nimport en from \"./locale_en\";\r\nimport es from \"./locale_es\";\r\nimport fi from \"./locale_fi\";\r\nimport fr from \"./locale_fr\";\r\nimport he from \"./locale_he\";\r\nimport hu from \"./locale_hu\";\r\nimport id from \"./locale_id\";\r\nimport it from \"./locale_it\";\r\nimport jp from \"./locale_jp\";\r\n\r\nimport LocaleManager from \"./locale_manager\";\r\n\r\nimport nb from \"./locale_nb\";\r\nimport nl from \"./locale_nl\";\r\nimport no from \"./locale_no\";\r\nimport pl from \"./locale_pl\";\r\nimport pt from \"./locale_pt\";\r\nimport ro from \"./locale_ro\";\r\nimport ru from \"./locale_ru\";\r\nimport si from \"./locale_si\";\r\nimport sk from \"./locale_sk\";\r\nimport sv from \"./locale_sv\";\r\nimport tr from \"./locale_tr\";\r\nimport ua from \"./locale_ua\";\r\n\r\nexport default function(){\r\n\treturn new LocaleManager({\r\n\t\ten,\r\n\t\tar,\r\n\t\tbe,\r\n\t\tca,\r\n\t\tcn,\r\n\t\tcs,\r\n\t\tda,\r\n\t\tde,\r\n\t\tel,\r\n\t\tes,\r\n\t\tfi,\r\n\t\tfr,\r\n\t\the,\r\n\t\thu,\r\n\t\tid,\r\n\t\tit,\r\n\t\tjp,\r\n\t\tnb,\r\n\t\tnl,\r\n\t\tno,\r\n\t\tpl,\r\n\t\tpt,\r\n\t\tro,\r\n\t\tru,\r\n\t\tsi,\r\n\t\tsk,\r\n\t\tsv,\r\n\t\ttr,\r\n\t\tua\r\n\t});\r\n}","export default class ExtensionsManager{\r\n\tconstructor(config){\r\n\t\tthis._extensions = {};\r\n\t\tfor(const i in config){\r\n\t\t\tthis._extensions[i] = config[i];\r\n\t\t}\r\n\t}\r\n\r\n\taddExtension(name, ext) {\r\n\t\tthis._extensions[name] = ext;\r\n\t}\r\n\r\n\tgetExtension(name) {\r\n\t\treturn this._extensions[name];\r\n\t}\r\n}","\r\nexport default function(){\r\n/* global dhtmlx */\r\nif (typeof dhtmlx != \"undefined\" && dhtmlx.attaches) {\r\n\tdhtmlx.attaches.attachScheduler = function (day, mode, tabs, scheduler) {\r\n\t\tvar tabs = tabs || '
';\r\n\t\tvar obj = document.createElement(\"DIV\");\r\n\t\tobj.id = \"dhxSchedObj_\" + this._genStr(12);\r\n\t\tobj.innerHTML = '
' + tabs + '
';\r\n\t\tdocument.body.appendChild(obj.firstChild);\r\n\r\n\t\tthis.attachObject(obj.id, false, true);\r\n\r\n\t\tthis.vs[this.av].sched = scheduler;\r\n\t\tthis.vs[this.av].schedId = obj.id;\r\n\t\tscheduler.setSizes = scheduler.updateView;\r\n\t\tscheduler.destructor = function () { };\r\n\t\tscheduler.init(obj.id, day, mode);\r\n\r\n\t\treturn this.vs[this._viewRestore()].sched;\r\n\t};\r\n}\r\n\r\n}","export default {\r\n\talert: (extension, assert) => {\r\n\t\tassert(false, `The ${extension} extension is not included in this version of dhtmlxScheduler.
\r\n\t\tYou may need a Professional version of the component.
\r\n\t\tContact us at https://dhtmlx.com/docs/contact.shtml if you have any questions.`);\r\n\t}\r\n};","export default function(scheduler){\r\n\r\n\r\n\r\n(function(){\r\n\tvar modalsStack = [];\r\n\r\n\tfunction isModal(){\r\n\t\treturn !!(modalsStack.length);\r\n\t}\r\n\r\n\tfunction isChildOf(child, parent){\r\n\t\twhile(child && child != parent){\r\n\t\t\tchild = child.parentNode;\r\n\t\t}\r\n\r\n\t\treturn !!(child == parent);\r\n\t}\r\n\r\n\tfunction afterPopup(box){\r\n\t\tsetTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tif(!isModal() && !(isChildOf(document.activeElement, scheduler.$container))) {\r\n\t\t\t\tscheduler.focus();\r\n\t\t\t}\r\n\t\t}, 1);\r\n\t}\r\n\tfunction startModal(box){\r\n\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\tscheduler.event(box, \"keydown\", trapFocus);\r\n\t\tmodalsStack.push(box);\r\n\t\t//scheduler.$keyboardNavigation.dispatcher.disable();\r\n\t}\r\n\r\n\tfunction endModal(){\r\n\t\tvar box = modalsStack.pop();\r\n\t\tif(box) {\r\n\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t}\r\n\t\tafterPopup(box);\r\n\r\n\t}\r\n\r\n\tfunction isTopModal(box){\r\n\t//\tif(dhtmlx._modalsStack.length){\r\n\t//\t\treturn box == dhtmlx._modalsStack[dhtmlx._modalsStack.length - 1];\r\n\t//\t}else{\r\n\t\t\treturn box == modalsStack[modalsStack.length - 1];\r\n\t//\t}\r\n\r\n\t}\r\n\r\n\tfunction trapFocus(event){\r\n\t\tvar event = event || window.event;\r\n\t\tvar target = event.currentTarget;\r\n\t\tif(!isTopModal(target)) return;\r\n\r\n\t\tscheduler.$keyboardNavigation.trapFocus(target, event);\r\n\t}\r\n\r\n\tfunction traceLightbox(){\r\n\t\tstartModal(scheduler.getLightbox());\r\n\t}\r\n\r\n\tscheduler.attachEvent(\"onLightbox\", traceLightbox);\r\n\tscheduler.attachEvent(\"onAfterLightbox\", endModal);\r\n\r\n\tscheduler.attachEvent(\"onAfterQuickInfo\", function(){afterPopup();});\r\n\r\n\tif(!scheduler._keyNavMessagePopup) {\r\n\t\tscheduler._keyNavMessagePopup = true;\r\n\r\n\t\tvar focusElement = null;\r\n\t\tvar backupFocus = null;\r\n\t\tconst modalsStack = [];\r\n\t\tscheduler.attachEvent(\"onMessagePopup\", function(box){\r\n\t\t\tfocusElement = document.activeElement;\r\n\t\t\tbackupFocus = focusElement;\r\n\r\n\t\t\twhile(backupFocus && scheduler._getClassName(backupFocus).indexOf(\"dhx_cal_data\") < 0){\r\n\t\t\t\tbackupFocus = backupFocus.parentNode;\r\n\t\t\t}\r\n\t\t\tif(backupFocus){\r\n\t\t\t\tbackupFocus = backupFocus.parentNode;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t\tscheduler.event(box, \"keydown\", trapFocus);\r\n\t\t\tmodalsStack.push(box);\r\n\t\t});\r\n\r\n\r\n\t\tscheduler.attachEvent(\"onAfterMessagePopup\", function () {\r\n\t\t\tvar box = modalsStack.pop();\r\n\t\t\tif(box) {\r\n\t\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t\t}\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\tvar currentTarget = document.activeElement;\r\n\t\t\t\twhile(currentTarget && scheduler._getClassName(currentTarget).indexOf(\"dhx_cal_light\") < 0){\r\n\t\t\t\t\tcurrentTarget = currentTarget.parentNode;\r\n\t\t\t\t}\r\n\t\t\t\tif(currentTarget)\r\n\t\t\t\t\treturn;\r\n\r\n\r\n\t\t\t\tif(focusElement && focusElement.parentNode){\r\n\t\t\t\t\tfocusElement.focus();\r\n\r\n\t\t\t\t}else if(backupFocus && backupFocus.parentNode){\r\n\t\t\t\t\tbackupFocus.focus();\r\n\t\t\t\t}\r\n\t\t\t\tfocusElement = null;\r\n\t\t\t\tbackupFocus = null;\r\n\r\n\t\t\t}, 1);\r\n\t\t});\r\n\t}\r\n\r\n\tscheduler.$keyboardNavigation.isModal = isModal;\r\n\r\n\r\n})();\r\n\r\n}","export default function(scheduler){\r\n\r\n//Initial idea and implementation by Steve MC\r\nscheduler._temp_key_scope = function (){\r\n\r\n\tscheduler.config.key_nav = true;\r\n\r\n\tscheduler.$keyboardNavigation._pasteDate = null; // used for copy and paste operations\r\n\tscheduler.$keyboardNavigation._pasteSection = null; // used for copy and paste operations\r\n\tvar isCopy = null;\r\n\r\n\tvar pos = {};\r\n\r\n\tif(!document.body){\r\n\t\tscheduler.event(window, \"load\", function(){\r\n\t\t\tscheduler.event(document.body, \"mousemove\", trackMousePosition);\r\n\t\t});\r\n\t}else{\r\n\t\tscheduler.event(document.body, \"mousemove\", trackMousePosition);\r\n\t}\r\n\r\n\tfunction trackMousePosition(event){\r\n\t\tevent = event || window.event;\r\n\t\tpos.x = event.clientX;\r\n\t\tpos.y = event.clientY;\r\n\t}\r\n\tfunction currentTarget(){\r\n\r\n\t\tvar mousePointer = false;\r\n\t\tvar keyNavPointer = false;\r\n\r\n\t\tvar target = document.elementFromPoint(pos.x, pos.y);\r\n\t\twhile(target && target != scheduler._obj){\r\n\t\t\ttarget = target.parentNode;\r\n\t\t}\r\n\t\tmousePointer = !!(target == scheduler._obj);\r\n\r\n\t\tkeyNavPointer = scheduler.$keyboardNavigation.dispatcher.isEnabled();\r\n\r\n\t\treturn mousePointer || keyNavPointer;\r\n\t}\r\n\r\n\tscheduler.attachEvent(\"onMouseMove\", function(id,e){\r\n\t\tvar state = scheduler.getState();\r\n\r\n\t\t// make sure scheduler is fully initialized before calling scheduler.getActionData\r\n\t\tif(!(state.mode && state.min_date)){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tvar position = scheduler.getActionData(e);\r\n\t\tscheduler.$keyboardNavigation._pasteDate = position.date;\r\n\t\tscheduler.$keyboardNavigation._pasteSection = position.section;\r\n\t});\r\n\r\n\tfunction clear_event_after(ev){\r\n\t\tdelete ev.rec_type; delete ev.rec_pattern;\r\n\t\tdelete ev.event_pid; delete ev.event_length;\r\n\t}\r\n\r\n\tfunction copyEvent(ev){\r\n\t\treturn scheduler._lame_copy({}, ev);\r\n\t}\r\n\r\n\tscheduler._make_pasted_event = function(ev){\r\n\t\tvar date = scheduler.$keyboardNavigation._pasteDate;\r\n\t\tvar section = scheduler.$keyboardNavigation._pasteSection;\r\n\r\n\t\tvar event_duration = ev.end_date-ev.start_date;\r\n\r\n\t\tvar copy = copyEvent(ev);\r\n\t\tclear_event_after(copy);\r\n\t\tcopy.start_date = new Date(date);\r\n\t\tcopy.end_date = new Date(copy.start_date.valueOf() + event_duration);\r\n\r\n\t\tif(section){\r\n\t\t\tvar property = scheduler._get_section_property();\r\n\r\n\t\t\tif(scheduler.config.multisection)\r\n\t\t\t\tcopy[property] = ev[property]; // save initial set of resources for multisection view\r\n\t\t\telse\r\n\t\t\t\tcopy[property] = section;\r\n\t\t}\r\n\t\treturn copy;\r\n\t};\r\n\tscheduler._do_paste = function(is_copy, modified_ev, original_ev){\r\n\t\tif(scheduler.callEvent(\"onBeforeEventPasted\", [is_copy, modified_ev, original_ev]) === false){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tscheduler.addEvent(modified_ev);\r\n\t\tscheduler.callEvent(\"onEventPasted\", [is_copy, modified_ev, original_ev]);\r\n\t};\r\n\r\n\tscheduler._is_key_nav_active = function(){\r\n\t\tif(this._is_initialized() && !this._is_lightbox_open() && this.config.key_nav){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\r\n\tfunction getSelectedEvent(){\r\n\t\tvar node = scheduler.$keyboardNavigation.dispatcher.getActiveNode();\r\n\t\tif(node && node.eventId) return node.eventId;\r\n\t\treturn scheduler._select_id;\r\n\t}\r\n\r\n\tscheduler.event(document, \"keydown\", function(e){\r\n\t\t// compatibility fix - scheduler focus on ctrl+v on mouse hover\r\n\t\tif(((e.ctrlKey || e.metaKey) && e.keyCode == 86) && scheduler._buffer_event && !scheduler.$keyboardNavigation.dispatcher.isEnabled()) {\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.isActive = currentTarget();\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler._key_nav_copy_paste = function(e){\r\n\t\tif(!scheduler._is_key_nav_active()) return true;\r\n\r\n\t\tif (e.keyCode == 37 || e.keyCode == 39) { // Left, Right arrows\r\n\t\t\te.cancelBubble = true;\r\n\r\n\t\t\tvar next = scheduler.date.add(scheduler._date,(e.keyCode == 37 ? -1 : 1 ),scheduler._mode);\r\n\t\t\tscheduler.setCurrentView(next);\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tvar select_id = getSelectedEvent();\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 67) { // CTRL+C\r\n\t\t\tif (select_id) {\r\n\t\t\t\tscheduler._buffer_event = copyEvent(scheduler.getEvent(select_id));\r\n\t\t\t\tisCopy = true;\r\n\t\t\t\tscheduler.callEvent(\"onEventCopied\", [scheduler.getEvent(select_id)]);\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 88) { // CTRL+X\r\n\t\t\tif (select_id) {\r\n\t\t\t\tisCopy = false;\r\n\t\t\t\tvar ev = scheduler._buffer_event = copyEvent(scheduler.getEvent(select_id));\r\n\r\n\t\t\t\tscheduler.updateEvent(ev.id);\r\n\t\t\t\tscheduler.callEvent(\"onEventCut\", [ev]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 86 && currentTarget(e)) { // CTRL+V\r\n\t\t\tvar ev = scheduler._buffer_event ? scheduler.getEvent(scheduler._buffer_event.id) : scheduler._buffer_event;\r\n\t\t\tev = ev || scheduler._buffer_event;\r\n\r\n\t\t\tif (ev) {\r\n\t\t\t\tvar new_ev = scheduler._make_pasted_event(ev);\r\n\t\t\t\tif (isCopy) {\r\n\t\t\t\t\tnew_ev.id = scheduler.uid();\r\n\t\t\t\t\tscheduler._do_paste(isCopy, new_ev, ev);\r\n\t\t\t\t}\r\n\t\t\t\telse { // cut operation\r\n\t\t\t\t\tvar res = scheduler.callEvent(\"onBeforeEventChanged\",[new_ev, e, false, ev]);\r\n\t\t\t\t\tif (res) {\r\n\t\t\t\t\t\tscheduler._do_paste(isCopy, new_ev, ev);\r\n\t\t\t\t\t\tisCopy = true; // switch to copy after first paste operation\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t};\r\n};\r\nscheduler._temp_key_scope();\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.attachSchedulerHandlers = function(){\r\n\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\tvar keyDownHandler = function(e){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\r\n\t\treturn dispatcher.keyDownHandler(e);\r\n\t};\r\n\r\n\tvar focusHandler = function () {\r\n\t\tdispatcher.keepScrollPosition(function () {\r\n\t\t\tdispatcher.focusGlobalNode();\r\n\t\t});\r\n\t};\r\n\r\n\tvar waitCall;\r\n\tscheduler.attachEvent(\"onDataRender\", function(){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\t\tif(!(dispatcher.isEnabled() && !scheduler.getState().editor_id)) return;\r\n\r\n\t\tclearTimeout(waitCall);\r\n\t\twaitCall = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tif(!dispatcher.isEnabled())\r\n\t\t\t\tdispatcher.enable();\r\n\t\t\treFocusActiveNode();\r\n\t\t});\r\n\t});\r\n\r\n\tvar reFocusActiveNode = function(){\r\n\t\tif(!dispatcher.isEnabled())\r\n\t\t\treturn;\r\n\r\n\t\tvar activeNode = dispatcher.getActiveNode();\r\n\t\tif(!activeNode)\r\n\t\t\treturn;\r\n\r\n\t\tif(!activeNode.isValid()){\r\n\t\t\tactiveNode = activeNode.fallback();\r\n\t\t}\r\n\r\n\t\tif(!activeNode || activeNode instanceof scheduler.$keyboardNavigation.MinicalButton || activeNode instanceof scheduler.$keyboardNavigation.MinicalCell)\r\n\t\t\treturn;\r\n\r\n\t\tdispatcher.keepScrollPosition(function () {\r\n\t\t\tactiveNode.focus(true);\r\n\t\t});\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\tvar container = scheduler.$container;\r\n\t\tscheduler.eventRemove(document, \"keydown\", keyDownHandler);\r\n\t\tscheduler.eventRemove(container, \"mousedown\", mousedownHandler);\r\n\t\tscheduler.eventRemove(container, \"focus\", focusHandler);\r\n\r\n\r\n\t\tif(scheduler.config.key_nav){\r\n\r\n\t\t\tscheduler.event(document, \"keydown\", keyDownHandler);\r\n\t\t\tscheduler.event(container, \"mousedown\", mousedownHandler);\r\n\t\t\tscheduler.event(container, \"focus\", focusHandler);\r\n\r\n\t\t\tcontainer.setAttribute(\"tabindex\", \"0\");\r\n\r\n\t\t}else{\r\n\t\t\tcontainer.removeAttribute(\"tabindex\");\r\n\t\t}\r\n\t});\r\n\r\n\tfunction mousedownHandler(e){\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\r\n\t\tconst view = scheduler.getView();\r\n\t\tlet dataAreaClick = false;\r\n\t\tif (scheduler.getState().mode === \"month\") {\r\n\t\t\tdataAreaClick = scheduler.$keyboardNavigation.isChildOf(e.target || e.srcElement, scheduler.$container.querySelector(\".dhx_cal_month_table\"));\r\n\t\t} else if (view && view.layout === \"timeline\") {\r\n\t\t\tdataAreaClick = scheduler.$keyboardNavigation.isChildOf(e.target || e.srcElement, scheduler.$container.querySelector(\".dhx_timeline_data_col\"));\r\n\t\t} else {\r\n\t\t\tconst listOfScales = scheduler.$container.querySelectorAll(\".dhx_scale_holder\");\r\n\t\t\tconst arrOfScales = Array.from(listOfScales);\r\n\t\t\tdataAreaClick = arrOfScales.some(scale => scale === e.target.parentNode);\r\n\t\t}\r\n\r\n\t\tvar pos = scheduler.getActionData(e);\r\n\r\n\t\tvar focusNode;\r\n\t\tif(scheduler._locate_event(e.target || e.srcElement)){\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.Event(scheduler._locate_event(e.target || e.srcElement));\r\n\t\t}else if(dataAreaClick){\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(pos.date && dataAreaClick){\r\n\t\t\t\tfocusNode = focusNode.nextSlot(new scheduler.$keyboardNavigation.TimeSlot(pos.date, null, pos.section));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(focusNode) {\r\n\t\t\tif (!dispatcher.isEnabled()) {\r\n\t\t\t\tdispatcher.activeNode = focusNode;\r\n\r\n\t\t\t} else {\r\n\t\t\t\tif (pos.date && dataAreaClick) {\r\n\t\t\t\t\tdispatcher.delay(function () {\r\n\t\t\t\t\t\tdispatcher.setActiveNode(focusNode);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction focusEvent(evNode){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\t\tif(!dispatcher.isEnabled()) return;\r\n\r\n\r\n\t\tvar prevState = evNode;\r\n\t\tvar focusNode = new scheduler.$keyboardNavigation.Event(prevState.eventId);\r\n\t\tif(!focusNode.isValid()){\r\n\t\t\tvar lastStart = focusNode.start || prevState.start;\r\n\t\t\tvar lastEnd = focusNode.end || prevState.end;\r\n\t\t\tvar lastSection = focusNode.section || prevState.section;\r\n\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot(lastStart, lastEnd, lastSection);\r\n\t\t\tif(!focusNode.isValid()){\r\n\t\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdispatcher.setActiveNode(focusNode);\r\n\t\tvar node = dispatcher.getActiveNode();\r\n\t\tif(node && node.getNode && document.activeElement != node.getNode()){\r\n\t\t\tdispatcher.focusNode(dispatcher.getActiveNode());\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tvar updateEvent = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id){\r\n\t\tvar res = updateEvent.apply(this, arguments);\r\n\t\tif(scheduler.config.key_nav && dispatcher.isEnabled()){\r\n\t\t\tif(scheduler.getState().select_id == id){\r\n\t\t\t\tvar element = new scheduler.$keyboardNavigation.Event(id);\r\n\r\n\t\t\t\tif(!scheduler.getState().lightbox_id){\r\n\t\t\t\t\tfocusEvent(element);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn res;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onEventDeleted\", function(id) {\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\t\tif(dispatcher.isEnabled()){\r\n\t\t\tvar activeNode = dispatcher.getActiveNode();\r\n\t\t\tif(activeNode.eventId == id){\r\n\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onClearAll\", function(){\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\t\tif(dispatcher.isEnabled()){\r\n\t\t\tif(dispatcher.getActiveNode() instanceof scheduler.$keyboardNavigation.Event){\r\n\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n};\r\n\r\n}","interface IViewPosition{\r\n\ttop: number;\r\n\tleft: number;\r\n}\r\n\r\ninterface IViewBox extends IViewPosition{\r\n\twidth: number;\r\n\theight: number;\r\n\tbottom: number;\r\n\tright: number;\r\n}\r\n\r\nexport class Tooltip {\r\n\tprivate _root: HTMLElement;\r\n\tprivate _tooltipNode: HTMLElement | null;\r\n\tprivate _scheduler: any;\r\n\r\n\tconstructor(scheduler: any){\r\n\t\tthis._scheduler = scheduler;\r\n\t}\r\n\r\n\tgetNode() : HTMLElement {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tif (!this._tooltipNode){\r\n\t\t\tthis._tooltipNode = document.createElement(\"div\");\r\n\t\t\tthis._tooltipNode.className = \"dhtmlXTooltip scheduler_tooltip tooltip\";\r\n\r\n\t\t\tscheduler._waiAria.tooltipAttr(this._tooltipNode);\r\n\t\t}\r\n\t\tif(scheduler.config.rtl){\r\n\t\t\tthis._tooltipNode.classList.add(\"dhtmlXTooltip_rtl\");\r\n\t\t} else{\r\n\t\t\tthis._tooltipNode.classList.remove(\"dhtmlXTooltip_rtl\");\r\n\t\t}\r\n\t\treturn this._tooltipNode;\r\n\t}\r\n\r\n\tsetViewport(node: HTMLElement):Tooltip{\r\n\t\tthis._root = node;\r\n\t\treturn this;\r\n\t}\r\n\r\n\tshow(left: number, top: number): Tooltip;\r\n\tshow(event: MouseEvent): Tooltip;\r\n\tshow(left: number | MouseEvent, top?: number): Tooltip {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tconst container = document.body;\r\n\t\tconst node = this.getNode();\r\n\r\n\t\tif(!domHelpers.isChildOf(node, container)){\r\n\t\t\tthis.hide();\r\n\t\t\tcontainer.appendChild(node);\r\n\t\t}\r\n\r\n\t\tif (this._isLikeMouseEvent(left)) {\r\n\t\t\tconst position = this._calculateTooltipPosition(left as MouseEvent);\r\n\t\t\ttop = position.top;\r\n\t\t\tleft = position.left;\r\n\t\t}\r\n\r\n\t\tnode.style.top = top + \"px\";\r\n\t\tnode.style.left = left + \"px\";\r\n\r\n\t\tscheduler._waiAria.tooltipVisibleAttr(node);\r\n\t\treturn this;\r\n\t}\r\n\thide() : Tooltip{\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst node = this.getNode();\r\n\t\tif(node && node.parentNode){\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t}\r\n\t\tscheduler._waiAria.tooltipHiddenAttr(node);\r\n\t\treturn this;\r\n\t}\r\n\r\n\tsetContent(html: string) : Tooltip{\r\n\t\tconst node = this.getNode();\r\n\t\tnode.innerHTML = html;\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// it is for salesforce, because it proxies event to it own events\r\n\tprivate _isLikeMouseEvent(event: any): boolean {\r\n\t\tif (!event || typeof event !== \"object\") {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn \"clientX\" in event && \"clientY\" in event;\r\n\t}\r\n\r\n\tprivate _getViewPort() : HTMLElement {\r\n\t\treturn this._root || document.body;\r\n\t}\r\n\r\n\r\n\tprivate _calculateTooltipPosition(event: MouseEvent): IViewPosition{\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\t// top/left coordinates inside the viewport by mouse position\r\n\t\tconst viewport = this._getViewPortSize();\r\n\t\tconst tooltipNode = this.getNode();\r\n\t\tconst tooltip: IViewBox = {\r\n\t\t\ttop:0,\r\n\t\t\tleft: 0,\r\n\t\t\twidth: tooltipNode.offsetWidth,\r\n\t\t\theight: tooltipNode.offsetHeight,\r\n\t\t\tbottom: 0,\r\n\t\t\tright: 0\r\n\t\t};\r\n\r\n\t\tconst offsetX = scheduler.config.tooltip_offset_x;\r\n\t\tconst offsetY = scheduler.config.tooltip_offset_y;\r\n\r\n\t\tconst container = document.body;\r\n\t\tconst mouse = domHelpers.getRelativeEventPosition(event, container);\r\n\t\tconst containerPos = domHelpers.getNodePosition(container);\r\n\t\tmouse.y += containerPos.y; // to fix margin collapsing\r\n\r\n\t\ttooltip.top = mouse.y;\r\n\t\ttooltip.left = mouse.x;\r\n\t\ttooltip.top += offsetY;\r\n\t\ttooltip.left += offsetX;\r\n\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\ttooltip.right = tooltip.left + tooltip.width;\r\n\r\n\t\tconst scrollTop = window.scrollY + container.scrollTop; // to fix margin collapsing\r\n\t\t// edge cases when the tooltip element can be partially hidden by edges of the viewport\r\n\t\tif(tooltip.top < viewport.top - scrollTop){\r\n\t\t\ttooltip.top = viewport.top;\r\n\t\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\t}else if(tooltip.bottom > viewport.bottom){\r\n\t\t\ttooltip.bottom = viewport.bottom;\r\n\t\t\ttooltip.top = tooltip.bottom - tooltip.height;\r\n\t\t}\r\n\r\n\t\tif(tooltip.left < viewport.left){\r\n\t\t\ttooltip.left = viewport.left;\r\n\t\t\ttooltip.right = viewport.left + tooltip.width;\r\n\t\t}else if(tooltip.right > viewport.right){\r\n\t\t\ttooltip.right = viewport.right;\r\n\t\t\ttooltip.left = tooltip.right - tooltip.width;\r\n\t\t}\r\n\r\n\t\tif(mouse.x >= tooltip.left && mouse.x <= tooltip.right) {\r\n\t\t\ttooltip.left = mouse.x - tooltip.width - offsetX;\r\n\t\t\ttooltip.right = tooltip.left + tooltip.width;\r\n\t\t}\r\n\r\n\t\tif(mouse.y >= tooltip.top && mouse.y <= tooltip.bottom) {\r\n\t\t\ttooltip.top = mouse.y - tooltip.height - offsetY;\r\n\t\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\t}\r\n\r\n\t\treturn tooltip;\r\n\t}\r\n\r\n\tprivate _getViewPortSize() : IViewBox {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tconst container = this._getViewPort();\r\n\t\tlet viewport = container;\r\n\t\tlet scrollTop = window.scrollY + document.body.scrollTop;\r\n\t\tlet scrollLeft = window.scrollX + document.body.scrollLeft;\r\n\t\tlet pos;\r\n\t\t// support for the initial tooltip mode where the tooltip element was attached to the data area of scheduler\r\n\t\tif(container === scheduler.$event_data){\r\n\t\t\tviewport = scheduler.$event;\r\n\t\t\tscrollTop = 0;\r\n\t\t\tscrollLeft = 0;\r\n\t\t\tpos = domHelpers.getNodePosition(scheduler.$event);\r\n\t\t}else{\r\n\t\t\tpos = domHelpers.getNodePosition(viewport);\r\n\t\t}\r\n\t\treturn {\r\n\t\t\tleft:pos.x + scrollLeft,\r\n\t\t\ttop: pos.y + scrollTop,\r\n\t\t\twidth: pos.width,\r\n\t\t\theight: pos.height,\r\n\t\t\tbottom: pos.y + pos.height + scrollTop,\r\n\t\t\tright: pos.x + pos.width + scrollLeft\r\n\t\t};\r\n\t}\r\n}\r\n","import * as utils from \"../../core/utils/utils\";\r\nimport { Tooltip } from \"./tooltip\";\r\n\r\ninterface ITrackerTarget {\r\n\tselector: string;\r\n\tonmouseenter: (event: MouseEvent, node: HTMLElement) => void;\r\n\tonmousemove: (event: MouseEvent, node: HTMLElement) => void;\r\n\tonmouseleave: (event: MouseEvent, node: HTMLElement) => void;\r\n\tglobal: boolean;\r\n}\r\n\r\ninterface ITooltipConfig {\r\n\tselector: string;\r\n\thtml: (event: MouseEvent, node: HTMLElement) => string;\r\n\tglobal: boolean;\r\n}\r\n\r\nexport class TooltipManager{\r\n\ttooltip: Tooltip;\r\n\tprotected _domEvents: any;\r\n\tprivate _listeners: object = {};\r\n\tprivate _scheduler: any;\r\n\tprivate delayShow: any;\r\n\tprivate delayHide: any;\r\n\r\n\tconstructor(scheduler: any) {\r\n\t\tthis.tooltip = new Tooltip(scheduler);\r\n\t\tthis._scheduler = scheduler;\r\n\t\tthis._domEvents = scheduler._createDomEventScope();\r\n\t\tthis._initDelayedFunctions();\r\n\t}\r\n\r\n\tdestructor(): void{\r\n\t\tthis.tooltip.hide();\r\n\t\tthis._domEvents.detachAll();\r\n\t}\r\n\thideTooltip(): void{\r\n\t\tthis.delayHide();\r\n\t}\r\n\tattach(config: ITrackerTarget): void {\r\n\t\tlet root = document.body;\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tif(!config.global){\r\n\t\t\troot = scheduler.$root;\r\n\t\t}\r\n\r\n\t\tlet watchableTarget = null;\r\n\t\tconst handler = (event) => {\r\n\t\t\tconst eventTarget = domHelpers.getTargetNode(event);\r\n\t\t\tconst targetNode = domHelpers.closest(eventTarget, config.selector);\r\n\t\t\tif(domHelpers.isChildOf(eventTarget, this.tooltip.getNode())){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tconst doOnMouseEnter = () => {\r\n\t\t\t\twatchableTarget = targetNode;\r\n\t\t\t\tconfig.onmouseenter(event, targetNode);\r\n\t\t\t};\r\n\r\n\t\t\tif(watchableTarget){\r\n\t\t\t\tif(targetNode && targetNode === watchableTarget){\r\n\t\t\t\t\tconfig.onmousemove(event, targetNode);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconfig.onmouseleave(event, watchableTarget);\r\n\t\t\t\t\twatchableTarget = null;\r\n\r\n\t\t\t\t\tif(targetNode && targetNode !== watchableTarget){\r\n\t\t\t\t\t\tdoOnMouseEnter();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(targetNode){\r\n\t\t\t\t\tdoOnMouseEnter();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tthis.detach(config.selector);\r\n\t\tthis._domEvents.attach(root, \"mousemove\", handler);\r\n\t\tthis._listeners[config.selector] = {\r\n\t\t\tnode: root,\r\n\t\t\thandler\r\n\t\t};\r\n\t}\r\n\r\n\tdetach(selector: string): void {\r\n\t\tconst listener = this._listeners[selector];\r\n\t\tif(listener){\r\n\t\t\tthis._domEvents.detach(listener.node, \"mousemove\", listener.handler);\r\n\t\t}\r\n\t}\r\n\r\n\ttooltipFor(config: ITooltipConfig): void {\r\n\t\tconst cloneDomEvent = (event: MouseEvent) => {\r\n\t\t\tlet clone = event;\r\n\t\t\t// making events survive timeout in ie\r\n\t\t\t// tslint:disable-next-line no-string-literal\r\n\t\t\tif(document[\"createEventObject\"] && !document.createEvent){\r\n\t\t\t\t// tslint:disable-next-line no-string-literal\r\n\t\t\t\tclone = document[\"createEventObject\"](event);\r\n\t\t\t}\r\n\t\t\treturn clone;\r\n\t\t};\r\n\t\tthis._initDelayedFunctions();\r\n\t\tthis.attach({\r\n\t\t\tselector: config.selector,\r\n\t\t\tglobal: config.global,\r\n\t\t\tonmouseenter:(event: MouseEvent, node: HTMLElement) => {\r\n\t\t\t\tconst html = config.html(event, node);\r\n\t\t\t\tif(html){\r\n\t\t\t\t\tthis.delayShow(cloneDomEvent(event), html);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tonmousemove:(event: MouseEvent, node: HTMLElement) => {\r\n\t\t\t\tconst html = config.html(event, node);\r\n\t\t\t\tif(html){\r\n\t\t\t\t\tthis.delayShow(cloneDomEvent(event), html);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\t\t\tthis.delayHide();\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tonmouseleave:() => {\r\n\t\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\t\tthis.delayHide();\r\n\t\t\t},\r\n\t\t});\r\n\t}\r\n\r\n\tprivate _initDelayedFunctions(){\r\n\t\tconst scheduler = this._scheduler;\r\n\t\t// reset delayed functions in order to apply current values of tooltip_timeout\r\n\t\tif(this.delayShow){\r\n\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t}\r\n\t\tif(this.delayHide){\r\n\t\t\tthis.delayHide.$cancelTimeout();\r\n\t\t}\r\n\t\tthis.tooltip.hide();\r\n\t\t\r\n\t\tthis.delayShow = (utils as any).default.delay((event: MouseEvent, html: string) => {\r\n\t\t\tif(scheduler.callEvent(\"onBeforeTooltip\", [event]) === false) {\r\n\t\t\t\tthis.tooltip.hide();\r\n\t\t\t} else {\r\n\t\t\t\tthis.tooltip.setContent(html);\r\n\t\t\t\tthis.tooltip.show(event);\r\n\t\t\t}\r\n\t\t}, scheduler.config.tooltip_timeout || 1);\r\n\r\n\t\tthis.delayHide = (utils as any).default.delay(() => {\r\n\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\tthis.tooltip.hide();\r\n\t\t}, scheduler.config.tooltip_hide_timeout || 1);\r\n\t}\r\n\r\n}","import active_links from \"./active_links\";\r\nimport agenda_legacy from \"./agenda_legacy_view\";\r\nimport agenda_view from \"./agenda\";\r\nimport all_timed from \"./all_timed\";\r\nimport collision from \"./collision\";\r\nimport container_autoresize from \"./container_autoresize\";\r\nimport cookie from \"./cookie\";\r\nimport daytimeline_restricted from \"./restricted_extensions/daytimeline\";\r\nimport drag_between_restricted from \"./restricted_extensions/drag_between\";\r\nimport editors from \"./editors\";\r\nimport expand from \"./expand\";\r\nimport grid_view from \"./restricted_extensions/grid_view\";\r\nimport html_templates from \"./html_templates\";\r\nimport key_nav from \"./key_nav\";\r\nimport layer from \"./layer\";\r\nimport limit from \"./limit\";\r\nimport map_view from \"./map_view\";\r\nimport minical from \"./minical\";\r\nimport monthheight from \"./monthheight\";\r\nimport multisection_restricted from \"./restricted_extensions/multisection\";\r\nimport multiselect from \"./multiselect\";\r\nimport multisource from \"./multisource\";\r\nimport mvc from \"./mvc\";\r\nimport outerdrag from \"./outerdrag\";\r\nimport pdf from \"./pdf\";\r\nimport quick_info from \"./quick_info\";\r\nimport readonly from \"./readonly\";\r\nimport recurring from \"./recurring\";\r\nimport serialize from \"./serialize\";\r\nimport timeline_restricted from \"./restricted_extensions/timeline\";\r\nimport tooltip from \"./tooltip\";\r\nimport treetimeline_restricted from \"./restricted_extensions/treetimeline\";\r\nimport units_restricted from \"./restricted_extensions/units\";\r\nimport url from \"./url\";\r\nimport week_agenda_restricted from \"./restricted_extensions/week_agenda\";\r\nimport wp from \"./wp\";\r\nimport year_view from \"./year_view\";\r\nimport export_api from \"./export_api\";\r\n\r\nexport default {\r\n\tactive_links,\r\n\tagenda_legacy,\r\n\tagenda_view,\r\n\tall_timed,\r\n\tcollision,\r\n\tcontainer_autoresize,\r\n\tcookie,\r\n\tdaytimeline: daytimeline_restricted,\r\n\tdrag_between: drag_between_restricted,\r\n\teditors,\r\n\texpand,\r\n\texport_api,\r\n\tgrid_view,\r\n\thtml_templates,\r\n\tkey_nav,\r\n\tlayer,\r\n\tlimit,\r\n\tmap_view,\r\n\tminical,\r\n\tmonthheight,\r\n\tmultisection: multisection_restricted,\r\n\tmultiselect,\r\n\tmultisource,\r\n\tmvc,\r\n\touterdrag,\r\n\tpdf,\r\n\tquick_info,\r\n\treadonly,\r\n\trecurring,\r\n\tserialize,\r\n\ttimeline: timeline_restricted,\r\n\ttooltip,\r\n\ttreetimeline: treetimeline_restricted,\r\n\tunits: units_restricted,\r\n\turl,\r\n\tweek_agenda: week_agenda_restricted,\r\n\twp,\r\n\tyear_view\r\n};","export default function(scheduler){\r\n\r\nscheduler.config.active_link_view = \"day\";\r\nscheduler._active_link_click = function(e){\r\n\tvar start = e.target;\r\n\tvar to = start.getAttribute(\"data-link-date\");\r\n\tvar s_d = scheduler.date.str_to_date(scheduler.config.api_date, false, true);\r\n\tif (to) {\r\n\t\tscheduler.setCurrentView(s_d(to), scheduler.config.active_link_view);\r\n\t\tif (e && e.preventDefault)\r\n\t\t\te.preventDefault();\r\n\t\treturn false;\r\n\t}\r\n};\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar do_wrapper = function(key, fullname){\r\n\t\tfullname = fullname || (key+\"_scale_date\");\r\n\r\n\t\tif(!scheduler.templates['_active_links_old_'+ fullname]){\r\n\t\t\tscheduler.templates['_active_links_old_'+ fullname] = scheduler.templates[fullname];\r\n\t\t}\r\n\t\tvar week_x = scheduler.templates['_active_links_old_'+ fullname];\r\n\t\tvar d_s = scheduler.date.date_to_str(scheduler.config.api_date);\r\n\t\tscheduler.templates[fullname] = function(date) {\r\n\t\t\treturn \"\" + week_x(date) + \"\";\r\n\t\t};\r\n\t};\r\n\r\n\tdo_wrapper(\"week\");\r\n\tdo_wrapper(\"\", \"month_day\");\r\n\tif (this.matrix){\r\n\t\tfor (var key in this.matrix)\r\n\t\t\tdo_wrapper(key);\r\n\t}\r\n\r\n\tthis._detachDomEvent(this._obj, \"click\", scheduler._active_link_click);\r\n\tscheduler.event(this._obj, \"click\", scheduler._active_link_click);\r\n});\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.date.add_agenda_legacy = function(date){\r\n\treturn scheduler.date.add(date, 1, \"year\");\r\n};\r\n\r\nscheduler.templates.agenda_legacy_time = function(start,end,ev){\r\n\tif (ev._timed)\r\n\t\treturn this.day_date(ev.start_date, ev.end_date, ev)+\" \"+this.event_date(start);\r\n\telse\r\n\t\treturn scheduler.templates.day_date(start)+\" – \"+scheduler.templates.day_date(end);\r\n};\r\nscheduler.templates.agenda_legacy_text = function(start,end,event){\r\n\treturn event.text;\r\n};\r\nscheduler.templates.agenda_legacy_date = function(){ return \"\"; };\r\n\r\nscheduler.date.agenda_legacy_start=function(){ return scheduler.date.date_part(scheduler._currentDate()); };\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function() {\r\n\tvar old_dblclick_dhx_cal_data = scheduler.dblclick_dhx_cal_data;\r\n\tscheduler.dblclick_dhx_cal_data = function() {\r\n\t\tif (this._mode == \"agenda_legacy\") {\r\n\t\t\tif (!this.config.readonly && this.config.dblclick_create)\r\n\t\t\t\tthis.addEventNow();\r\n\t\t} else {\r\n\t\t\tif (old_dblclick_dhx_cal_data)\r\n\t\t\t\treturn old_dblclick_dhx_cal_data.apply(this, arguments);\r\n\t\t}\r\n\t};\r\n\r\n\r\n\tvar old = scheduler.render_data;\r\n\tscheduler.render_data=function(evs){\r\n\t\tif (this._mode == \"agenda_legacy\")\r\n\t\t\tfill_agenda_tab();\r\n\t\telse\r\n\t\t\treturn old.apply(this,arguments);\r\n\t};\r\n\r\n\tvar old_render_view_data = scheduler.render_view_data;\r\n\tscheduler.render_view_data = function(){\r\n\t\tif(this._mode == \"agenda_legacy\") {\r\n\t\t\tscheduler._agendaScrollTop = scheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop;\r\n\t\t\tscheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop = 0;\r\n\t\t}\r\n\t\treturn old_render_view_data.apply(this,arguments);\r\n\t};\r\n\r\n\r\n\r\n\tfunction set_full_view(mode){\r\n\t\tif (mode){\r\n\t\t\tvar l = scheduler.locale.labels;\r\n\r\n\t\t\tvar rowAttr = scheduler._waiAria.agendaHeadAttrString();\r\n\t\t\tvar dateHeader = scheduler._waiAria.agendaHeadDateString(l.date);\r\n\t\t\tvar descriptionHeader = scheduler._waiAria.agendaHeadDescriptionString(l.description);\r\n\r\n\t\t\tscheduler._els[\"dhx_cal_header\"][0].innerHTML=\"
\" +\r\n\t\t\t\t\"
\"+l.date+\"
\" +\r\n\t\t\t\t\"\"+l.description+\"\" +\r\n\t\t\t\t\"
\";\r\n\t\t\tscheduler._table_view=true;\r\n\t\t\tscheduler.set_sizes();\r\n\t\t}\r\n\t}\r\n\r\n\tfunction fill_agenda_tab(){\r\n\t\t//select events for which data need to be printed\r\n\r\n\t\tvar events = scheduler.get_visible_events();\r\n\t\tevents.sort(function(a,b){ return a.start_date>b.start_date?1:-1;});\r\n\r\n\t\tvar tableAttr = scheduler._waiAria.agendaDataAttrString();\r\n\t\tvar agendaEventAttrString;\r\n\t\t//generate html for the view\r\n\t\tvar html=\"
\";\r\n\t\tfor (var i=0; i
\"+\r\n\t\t\t\t\t(scheduler.config.rtl ? scheduler.templates.agenda_time(ev.end_date,ev.start_date, ev):scheduler.templates.agenda_time(ev.start_date, ev.end_date,ev))+\r\n\t\t\t\t\t\"
\";\r\n\t\t\thtml+=`
\r\n\t\t\t\r\n\t\t\t
`;\r\n\t\t\thtml+=\"\"+scheduler.templates.agenda_text(ev.start_date, ev.end_date, ev)+\"
\";\r\n\t\t}\r\n\t\thtml+=\"
\";\r\n\r\n\t\t//render html\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop = scheduler._agendaScrollTop||0;\r\n\r\n\t\t// setting up dhx_v_border size\r\n\t\tvar agenda_area = scheduler._els[\"dhx_cal_data\"][0].childNodes[0];\r\n\t\tvar v_border = agenda_area.childNodes[agenda_area.childNodes.length-1];\r\n\t\tv_border.style.height = (agenda_area.offsetHeight < scheduler._els[\"dhx_cal_data\"][0].offsetHeight) ? \"100%\" : (agenda_area.offsetHeight+\"px\");\r\n\r\n\t\tvar t=scheduler._els[\"dhx_cal_data\"][0].firstChild.childNodes;\r\n\r\n\t\tvar dateElement = scheduler._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML=scheduler.templates.agenda_date(scheduler._min_date, scheduler._max_date, scheduler._mode);\r\n\t\t}\r\n\r\n\t\tscheduler._rendered=[];\r\n\t\tfor (var i=0; i < t.length-1; i++)\r\n\t\t\tscheduler._rendered[i]=t[i];\r\n\r\n\t}\r\n\r\n\tscheduler.agenda_legacy_view=function(mode){\r\n\t\tscheduler._min_date = scheduler.config.agenda_start||scheduler.date.agenda_legacy_start(scheduler._date);\r\n\t\tscheduler._max_date = scheduler.config.agenda_end||scheduler.date.add_agenda_legacy(scheduler._min_date, 1);\r\n\r\n\t\tset_full_view(mode);\r\n\t\tif (mode){\r\n\t\t\tscheduler._cols = null;\r\n\t\t\tscheduler._colsS = null;\r\n\t\t\tscheduler._table_view = true;\r\n\t\t\t//agenda tab activated\r\n\t\t\tfill_agenda_tab();\r\n\t\t} else {\r\n\t\t\tscheduler._table_view = false;\r\n\t\t\t//agenda tab de-activated\r\n\t\t}\r\n\t};\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.date.add_agenda = function(date, inc){\r\n\t\treturn scheduler.date.add(date, 1*inc, \"month\");\r\n\t};\r\n\t\r\n\tscheduler.templates.agenda_time = function(start,end,ev){\r\n\t\tif (ev._timed){\r\n\t\t\treturn `${this.event_date(start)} - ${this.event_date(end)}`;\r\n\t\t}else{\r\n\t\t\treturn scheduler.locale.labels.full_day;\r\n\t\t}\r\n\t};\r\n\tscheduler.templates.agenda_text = function(start,end,ev){\r\n\t\treturn ev.text;\r\n\t};\r\n\r\n\tconst dayDateToStr = scheduler.date.date_to_str(\"%F %j\");\r\n\tconst dayDowToStr = scheduler.date.date_to_str(\"%l\");\r\n\r\n\tscheduler.templates.agenda_day = function(date){ \r\n\t\treturn `
${dayDateToStr(date)}
\r\n\t\t
${dayDowToStr(date)}
`;\r\n\t};\r\n\tscheduler.templates.agenda_date = function(start, end){ \r\n\t\treturn scheduler.templates.month_date(scheduler.getState().date); \r\n\t};\r\n\t\r\n\tscheduler.date.agenda_start=function(date){\r\n\t\treturn scheduler.date.month_start(new Date(date));\r\n\t};\r\n\r\n\tlet scrollTop = 0;\r\n\t\r\n\tscheduler.attachEvent(\"onTemplatesReady\",function() {\r\n\t\tvar old_dblclick_dhx_cal_data = scheduler.dblclick_dhx_cal_data;\r\n\t\tscheduler.dblclick_dhx_cal_data = function() {\r\n\t\t\tif (this._mode == \"agenda\") {\r\n\t\t\t\tif (!this.config.readonly && this.config.dblclick_create)\r\n\t\t\t\t\tthis.addEventNow();\r\n\t\t\t} else {\r\n\t\t\t\tif (old_dblclick_dhx_cal_data)\r\n\t\t\t\t\treturn old_dblclick_dhx_cal_data.apply(this, arguments);\r\n\t\t\t}\r\n\t\t};\r\n\t\r\n\t\r\n\t\tvar old = scheduler.render_data;\r\n\t\tscheduler.render_data=function(evs){\r\n\t\t\tif (this._mode == \"agenda\")\r\n\t\t\t\tfill_agenda_tab();\r\n\t\t\telse\r\n\t\t\t\treturn old.apply(this,arguments);\r\n\t\t};\r\n\t\r\n\t\tvar old_render_view_data = scheduler.render_view_data;\r\n\t\tscheduler.render_view_data = function(){\r\n\t\t\tif(this._mode == \"agenda\") {\r\n\t\t\t\tscrollTop = scheduler._els[\"dhx_cal_data\"][0].scrollTop;\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = 0;\r\n\t\t\t}\r\n\t\t\treturn old_render_view_data.apply(this,arguments);\r\n\t\t};\r\n\r\n\t\tfunction fill_agenda_tab(){\r\n\t\t\tconst events = scheduler.get_visible_events();\r\n\t\t\tevents.sort(function(a,b){ return a.start_date>b.start_date?1:-1;});\r\n\r\n\t\t\tconst eventsInDays = {};\r\n\t\t\tlet currDate = scheduler.getState().min_date;\r\n\t\t\tconst maxDate = scheduler.getState().max_date;\r\n\t\t\twhile(currDate.valueOf() < maxDate.valueOf()){\r\n\t\t\t\teventsInDays[currDate.valueOf()] = [];\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\r\n\t\t\tlet anyEvents = false;\r\n\r\n\t\t\tevents.forEach((ev) => {\r\n\t\t\t\tlet eventStart = scheduler.date.day_start(new Date(ev.start_date)); \r\n\t\t\t\twhile (eventStart.valueOf() < ev.end_date.valueOf()) {\r\n\t\t\t\t\tif (eventsInDays[eventStart.valueOf()]) {\r\n\t\t\t\t\t\teventsInDays[eventStart.valueOf()].push(ev);\r\n\t\t\t\t\t\tanyEvents = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\teventStart = scheduler.date.day_start(scheduler.date.add(eventStart, 1, \"day\"));\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(!anyEvents){\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = renderEmptyView();\r\n\t\t\t}else{\r\n\t\t\t\tlet html = \"\";\r\n\t\t\t\tfor(let day in eventsInDays){\r\n\t\t\t\t\thtml += renderDay(new Date(day*1), eventsInDays[day]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = scrollTop;\r\n\t\t\t\r\n\t\t\tlet t = scheduler._els[\"dhx_cal_data\"][0].querySelectorAll(\".dhx_cal_agenda_event_line\");\r\n\t\t\tscheduler._rendered = [];\r\n\t\t\tfor (var i = 0; i < t.length - 1; i++) {\r\n\t\t\t\tscheduler._rendered[i] = t[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\r\n\r\n\t\tfunction renderEmptyView(){\r\n\t\t\treturn `
${scheduler.locale.labels.agenda_tab}
`;\r\n\t\t}\r\n\r\n\t\tfunction renderDay(day, events) {\r\n\t\t\tif(!events.length){\r\n\t\t\t\treturn \"\";\r\n\t\t\t}\r\n\t\t\tlet html = `\r\n
\r\n\t
${scheduler.templates.agenda_day(day)}
\r\n\t
\r\n`;\r\n\r\n\t\t\tevents.forEach((calendarEvent) => {\r\n\t\t\t\thtml += renderOneEvent(day, calendarEvent);\r\n\t\t\t});\r\n\r\n\t\t\thtml += `
`;\r\n\t\t\treturn html;\r\n\t\t}\r\n\r\n\t\tfunction renderOneEvent(day, calendarEvent){\r\n\t\t\tconst dates = scheduler.templates.agenda_time(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\t\t\tconst selectedId = scheduler.getState().select_id;\r\n\t\t\tconst cls = scheduler.templates.event_class(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\t\t\tconst description = scheduler.templates.agenda_text(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\r\n\t\t\tlet style = \"\";\r\n\t\t\tif(calendarEvent.color || calendarEvent.textColor){\r\n\t\t\t\tconst bg = (calendarEvent.color ? (\"--dhx-scheduler-event-background:\" + calendarEvent.color + \";\") : \"\");\r\n\t\t\t\tconst color = (calendarEvent.textColor ? (\"--dhx-scheduler-event-color:\" + calendarEvent.textColor + \";\") : \"\");\r\n\t\t\t\tstyle = ` style=\"${bg}${color}\" `;\r\n\t\t\t}\r\n\r\n\t\t\treturn `
\r\n\t
\r\n\t
${dates}
\r\n\t
${description}
\r\n
`;\r\n\t\t}\r\n\t\r\n\t\tscheduler.agenda_view=function(mode){\r\n\t\t\tif (mode){\r\n\t\t\t\tscheduler._min_date = scheduler.config.agenda_start || scheduler.date.agenda_start(scheduler._date);\r\n\t\t\t\tscheduler._max_date = scheduler.config.agenda_end || scheduler.date.add_agenda(scheduler._min_date, 1);\r\n\t\t\t\tscheduler._cols = null;\r\n\t\t\t\tscheduler._colsS = null;\r\n\t\t\t\tscheduler._table_view = true;\r\n\r\n\t\t\t\tconst dateHeader = scheduler._getNavDateElement();\r\n\t\t\t\tdateHeader.innerHTML = scheduler.templates.agenda_date(scheduler._date);\r\n\t\t\t\t//agenda tab activated\r\n\t\t\t\tfill_agenda_tab();\r\n\t\t\t} else {\r\n\t\t\t\tscheduler._table_view = false;\r\n\t\t\t\t//agenda tab de-activated\r\n\t\t\t}\r\n\t\t};\r\n\t});\r\n\r\n\t// scheduler.attachEvent(\"onEventSelected\", function(id){\r\n\t// \tconst oldSelected = scheduler.$container.querySelectorAll(\".dhx_cal_agenda_event_line_selected\");\r\n\t// \toldSelected.forEach((el) => {\r\n\t// \t\tel.classList.remove(\"dhx_cal_agenda_event_line_selected\");\r\n\t// \t});\r\n\r\n\t// \tconst selected = scheduler.$container.querySelector(`[${scheduler.config.event_attribute}=\"${id}\"]`);\r\n\t// \tif(selected){\r\n\t// \t\tselected.classList.add(\"dhx_cal_agenda_event_line_selected\");\r\n\t// \t}\r\n\t// });\r\n\t\r\n\t\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.config.all_timed = \"short\";\r\n\tscheduler.config.all_timed_month = false;\r\n\r\n\tvar is_event_short = function (ev) {\r\n\t\tif(!((ev.end_date - ev.start_date)/(1000*60*60) >= 24)){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t// short event shouldn't disappear to multiday area during dnd-resize\r\n\t\tif(scheduler._drag_mode == \"resize\" && scheduler._drag_id == ev.id){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn \tfalse;\r\n\t};\r\n\r\n\t// copy of usual events and recurring instances;\r\n\t// regular copy causes problems with recurrings which have series event as a prototype\r\n\tscheduler._safe_copy = function(event){\r\n\t\tvar proto = null,\r\n\t\t\tcopy = scheduler._copy_event(event);\r\n\t\tif(event.event_pid){\r\n\t\t\tproto = scheduler.getEvent(event.event_pid);\r\n\t\t}\r\n\r\n\t\tif (proto && proto.isPrototypeOf(event)) {\r\n\t\t\tdelete copy.event_length;\r\n\t\t\tdelete copy.event_pid;\r\n\t\t\tdelete copy.rec_pattern;\r\n\t\t\tdelete copy.rec_type;\r\n\t\t}\r\n\r\n\t\treturn copy;\r\n\t};\r\n\r\n\tvar old_prerender_events_line = scheduler._pre_render_events_line;\r\n\tvar old_prerender_events_table = scheduler._pre_render_events_table;\r\n\r\n\tvar prerender_events = function (evs, hold) {\r\n\t\tif (!this._table_view) {\r\n\t\t\treturn old_prerender_events_line.call(this, evs, hold);\r\n\t\t}\r\n\r\n\t\treturn old_prerender_events_table.call(this, evs, hold);\r\n\t};\r\n\r\n\tscheduler._pre_render_events_line = scheduler._pre_render_events_table = function(evs, hold){\r\n\t\tif (!this.config.all_timed ||\r\n\t\t\t(this._table_view && this._mode != \"month\") ||\r\n\t\t\t(this._mode == \"month\" && !this.config.all_timed_month))\r\n\t\t\treturn prerender_events.call(this, evs, hold);\r\n\r\n\t\tfor (var i=0; i < evs.length; i++) {\r\n\t\t\tvar ev=evs[i];\r\n\r\n\t\t\tif (ev._timed)\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\tif (this.config.all_timed == \"short\") {\r\n\t\t\t\tif (!is_event_short(ev)) {\r\n\t\t\t\t\tif (this._mode != \"month\") {\r\n\t\t\t\t\t\tevs.splice(i--, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar ce = this._safe_copy(ev); // current event (event for one specific day) is copy of original with modified dates\r\n\t\t\tif(!ev._virtual){\r\n\t\t\t\tce._first_chunk = true;\r\n\t\t\t}else{\r\n\t\t\t\tce._first_chunk = false;\r\n\t\t\t}\r\n\t\t\tce._drag_resize = false;\r\n\t\t\tce._virtual = true;\r\n\t\t\tce.start_date = new Date(ce.start_date); // as lame copy doesn't copy date objects\r\n\r\n\t\t\tif (!isOvernightEvent(ev)) {\r\n\t\t\t\tce.end_date = new Date(ev.end_date);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tce.end_date = getNextDay(ce.start_date);\r\n\t\t\t\tif (this.config.last_hour != 24) { // if specific last_hour was set (e.g. 20)\r\n\t\t\t\t\tce.end_date = setDateTime(ce.start_date, this.config.last_hour);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar event_changed = false;\r\n\t\t\tif (ce.start_date < this._max_date && ce.end_date > this._min_date && ce.start_date < ce.end_date) {\r\n\t\t\t\tevs[i] = ce; // adding another event in collection\r\n\t\t\t\tevent_changed = true;\r\n\t\t\t}\r\n\t\t//\tif (ce.start_date > ce.end_date) {\r\n\t\t//\t\tevs.splice(i--,1);\r\n\t\t//\t}\r\n\r\n\t\t\tvar re = this._safe_copy(ev); // remaining event, copy of original with modified start_date (making range more narrow)\r\n\t\t\tre._virtual = true;\r\n\t\t\tre.end_date = new Date(re.end_date);\r\n\t\t\tif (re.start_date < this._min_date)\r\n\t\t\t\tre.start_date = setDateTime(this._min_date, this.config.first_hour);// as we are starting only with whole hours\r\n\t\t\telse\r\n\t\t\t\tre.start_date = setDateTime(getNextDay(ev.start_date), this.config.first_hour);\r\n\r\n\t\t\tif (re.start_date < this._max_date && re.start_date < re.end_date) {\r\n\t\t\t\tif (event_changed){\r\n\t\t\t\t\tevs.splice(i+1,0,re);//insert part\r\n\t\t\t\t}else {\r\n\t\t\t\t\tevs[i--] = re;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tre._last_chunk = false;\r\n\t\t\t}else{\r\n\t\t\t\tce._last_chunk = true;\r\n\t\t\t\tce._drag_resize = true;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t// in case of all_timed pre_render is not applied to the original event\r\n\t\t// so we need to force redraw in case of dnd\r\n\t\tvar redraw = (this._drag_mode == 'move')?false:hold;\r\n\t\treturn prerender_events.call(this, evs, redraw);\r\n\r\n\r\n\t\tfunction isOvernightEvent(ev){\r\n\t\t\tvar next_day = getNextDay(ev.start_date);\r\n\t\t\treturn (+ev.end_date > +next_day);\r\n\t\t}\r\n\t\tfunction getNextDay(date){\r\n\t\t\tvar next_day = scheduler.date.add(date, 1, \"day\");\r\n\t\t\tnext_day = scheduler.date.date_part(next_day);\r\n\t\t\treturn next_day;\r\n\t\t}\r\n\t\tfunction setDateTime(date, hours){\r\n\t\t\tvar val = scheduler.date.date_part(new Date(date));\r\n\t\t\tval.setHours(hours);\r\n\t\t\treturn val;\r\n\t\t}\r\n\t};\r\n\tvar old_get_visible_events = scheduler.get_visible_events;\r\n\tscheduler.get_visible_events = function(only_timed){\r\n\t\tif (!(this.config.all_timed && this.config.multi_day))\r\n\t\t\treturn old_get_visible_events.call(this, only_timed);\r\n\t\treturn old_get_visible_events.call(this, false); // only timed = false\r\n\t};\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function (old_mode, old_date, mode, date) {\r\n\t\tscheduler._allow_dnd = (mode == \"day\" || mode == \"week\" || scheduler.getView(mode));\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler._is_main_area_event = function(ev){\r\n\t\treturn !!(ev._timed || this.config.all_timed === true || (this.config.all_timed == \"short\" && is_event_short(ev)) );\r\n\t};\r\n\r\n\tvar oldUpdate = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id){\r\n\t\t// full redraw(update_render=true) messes events order while dnd.\r\n\t\t// individual redraw(update_render=false) of multiday event, which happens on select/unselect, expands event to full width of the cell and can be fixes only with full redraw.\r\n\t\t// so for now full redraw is always enabled for not-dnd updates\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tvar fullRedrawNeeded;\r\n\t\tvar initial;\r\n\t\tif(ev) {\r\n\t\t\tfullRedrawNeeded = (scheduler.config.all_timed && !(scheduler.isOneDayEvent(scheduler._events[id]) || scheduler.getState().drag_id));\r\n\t\t\tif (fullRedrawNeeded) {\r\n\t\t\t\tinitial = scheduler.config.update_render;\r\n\t\t\t\tscheduler.config.update_render = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\toldUpdate.apply(scheduler, arguments);\r\n\r\n\t\tif(ev) {\r\n\t\t\tif (fullRedrawNeeded) {\r\n\t\t\t\tscheduler.config.update_render = initial;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\r\nvar temp_section;\r\nvar before;\r\n\r\nscheduler.config.collision_limit = 1;\r\n\r\nfunction _setTempSection(event_id) { // for custom views (matrix, timeline, units)\r\n\tvar checked_mode = scheduler._get_section_view();\r\n\tif(checked_mode && event_id){\r\n\t\ttemp_section = scheduler.getEvent(event_id)[scheduler._get_section_property()];\r\n\t}\r\n}\r\n\r\nscheduler.attachEvent(\"onBeforeDrag\",function(id){\r\n\t_setTempSection(id);\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onBeforeLightbox\",function(id){\r\n\tvar ev = scheduler.getEvent(id);\r\n\tbefore = [ev.start_date, ev.end_date];\r\n\t_setTempSection(id);\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventChanged\",function(id){\r\n\tif (!id || !scheduler.getEvent(id)) return true;\r\n\tvar ev = scheduler.getEvent(id);\r\n\tif (!scheduler.checkCollision(ev)){\r\n\t\tif (!before) return false;\r\n\t\tev.start_date = before[0];\r\n\t\tev.end_date = before[1];\r\n\t\tev._timed=this.isOneDayEvent(ev);\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onBeforeEventChanged\",function(ev,e,is_new){\r\n\treturn scheduler.checkCollision(ev);\r\n});\r\nscheduler.attachEvent(\"onEventAdded\",function(id,ev) {\r\n\tvar result = scheduler.checkCollision(ev);\r\n\tif (!result)\r\n\t\tscheduler.deleteEvent(id);\r\n});\r\nscheduler.attachEvent(\"onEventSave\",function(id, edited_ev, is_new){\r\n\tedited_ev = scheduler._lame_clone(edited_ev);\r\n\tedited_ev.id = id;\r\n\r\n\t//lightbox may not have 'time' section\r\n\tif(!(edited_ev.start_date && edited_ev.end_date)){\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tedited_ev.start_date = new Date(ev.start_date);\r\n\t\tedited_ev.end_date = new Date(ev.end_date);\r\n\t}\r\n\r\n\tif(edited_ev.rec_type){\r\n\t\tscheduler._roll_back_dates(edited_ev);\r\n\t}\r\n\treturn scheduler.checkCollision(edited_ev); // in case user creates event on one date but then edited it another\r\n});\r\n\r\nscheduler._check_sections_collision = function(first, second){\r\n\tvar map_to = scheduler._get_section_property();\r\n\tif (first[map_to] == second[map_to] && first.id != second.id)\r\n\t\treturn true;\r\n\treturn false;\r\n};\r\n\r\nscheduler.checkCollision = function(ev) {\r\n\tvar evs = [];\r\n\tvar collision_limit = scheduler.config.collision_limit;\r\n\r\n\tif (ev.rec_type) {\r\n\t\tvar evs_dates = scheduler.getRecDates(ev);\r\n\t\tfor(var k=0; k= collision_limit) {\r\n\r\n\t\t\tsingle = false;\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\tif ( evs.length >= collision_limit )\r\n\t\t\tsingle = false;\r\n\t}\r\n\tif (!single) {\r\n\t\tvar res = !scheduler.callEvent(\"onEventCollision\",[ev,evs]);\r\n\t\tif (!res) {\r\n\t\t\tev[map_to] = temp_section||ev[map_to]; // from _setTempSection for custom views\r\n\t\t}\r\n\t\treturn res;\r\n\t}\r\n\treturn single;\r\n\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.config.container_autoresize = true;\r\n\tscheduler.config.month_day_min_height = 90;\r\n\tscheduler.config.min_grid_size = 25;\r\n\tscheduler.config.min_map_size = 400;\r\n\r\n\tvar old_pre_render_event = scheduler._pre_render_events;\r\n\r\n\t//need for temporary disabling without modifying public config\r\n\tvar active = true;\r\n\tvar total_height = 0;\r\n\tvar multiday_height = 0;\r\n\r\n\tscheduler._pre_render_events = function(evs, hold) {\r\n\t\tif (!(scheduler.config.container_autoresize && active)) {\r\n\t\t\treturn old_pre_render_event.apply(this, arguments);\r\n\t\t}\r\n\r\n\t\tvar hb = this.xy.bar_height;\r\n\t\tvar h_old = this._colsS.heights;\r\n\t\tvar h = this._colsS.heights = [0, 0, 0, 0, 0, 0, 0];\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tif (!this._table_view)\r\n\t\t\tevs = this._pre_render_events_line(evs, hold); //ignore long events for now\r\n\t\telse\r\n\t\t\tevs = this._pre_render_events_table(evs, hold);\r\n\r\n\t\tif (this._table_view) {\r\n\t\t\tif (hold){\r\n\t\t\t\tthis._colsS.heights = h_old;\r\n\t\t\t} else {\r\n\t\t\t\tvar evl = data.firstChild;\r\n\t\t\t\tconst rows = evl.querySelectorAll(\".dhx_cal_month_row\");\r\n\t\t\t\tif (rows) {\r\n\t\t\t\t\tfor (var i = 0; i < rows.length; i++) {\r\n\t\t\t\t\t\th[i]++;\r\n\r\n\t\t\t\t\t\tif ((h[i]) * hb > this._colsS.height - this.xy.month_head_height) { // 22 - height of cell's header\r\n\t\t\t\t\t\t\t//we have overflow, update heights\r\n\t\t\t\t\t\t\tvar cells = rows[i].querySelectorAll(\".dhx_cal_month_cell\");\r\n\r\n\t\t\t\t\t\t\tvar cHeight = this._colsS.height - this.xy.month_head_height;\r\n\t\t\t\t\t\t\tif(this.config.max_month_events*1 !== this.config.max_month_events || h[i] <= this.config.max_month_events){\r\n\t\t\t\t\t\t\t\tcHeight = h[i] * hb;\r\n\t\t\t\t\t\t\t}else if( (this.config.max_month_events + 1) * hb > this._colsS.height - this.xy.month_head_height){\r\n\t\t\t\t\t\t\t\tcHeight = (this.config.max_month_events + 1) * hb;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\trows[i].style.height = (cHeight + this.xy.month_head_height) + \"px\";\r\n\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\tfor (var j = 0; j < cells.length; j++) {\r\n\t\t\t\t\t\t\t\tcells[j].childNodes[1].style.height = cHeight + \"px\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\th[i] = (h[i - 1] || 0) + cells[0].offsetHeight;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\th[i] = (h[i - 1] || 0) + rows[i].querySelectorAll(\".dhx_cal_month_cell\")[0].offsetHeight;\r\n\t\t\t\t\t}\r\n\t\t\t\t\th.unshift(0);\r\n\t\t\t\t\tif (evl.parentNode.offsetHeight < evl.parentNode.scrollHeight && !evl._h_fix) {\r\n\t\t\t\t\t\t//we have v-scroll, decrease last day cell\r\n\r\n\t\t\t\t\t\t// NO CHECK SHOULD BE MADE ON VERTICAL SCROLL\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (!evs.length && this._els[\"dhx_multi_day\"][0].style.visibility == \"visible\")\r\n\t\t\t\t\t\th[0] = -1;\r\n\t\t\t\t\tif (evs.length || h[0] == -1) {\r\n\t\t\t\t\t\t//shift days to have space for multiday events\r\n\t\t\t\t\t\t//var childs = evl.parentNode.childNodes;\r\n\t\t\t\t\t\tvar dh = ((h[0] + 1) * hb + 1); // +1 so multiday events would have 2px from top and 2px from bottom by default\r\n\t\t\t\t\t\tif(multiday_height != dh + 1) {\r\n\t\t\t\t\t\t\tthis._obj.style.height = (total_height - multiday_height + dh - 1) + \"px\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tdh += \"px\";\r\n\t\t\t\t\t\tconst navHeight = this._els[\"dhx_cal_navline\"][0].offsetHeight;\r\n\t\t\t\t\t\tconst headerHeight = this._els[\"dhx_cal_header\"][0].offsetHeight;\r\n\t\t\t\t\t\tdata.style.height = (this._obj.offsetHeight - navHeight - headerHeight - (this.xy.margin_top || 0)) + 'px';\r\n\t\t\t\t\t\tvar last = this._els[\"dhx_multi_day\"][0];\r\n\t\t\t\t\t\tlast.style.height = dh;\r\n\t\t\t\t\t\tlast.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\t\tlast = this._els[\"dhx_multi_day\"][1];\r\n\t\t\t\t\t\tlast.style.height = dh;\r\n\t\t\t\t\t\tlast.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\t\tif(last.style.visibility == \"hidden\"){\r\n\t\t\t\t\t\t\tlast.style.display = \"none\";\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tlast.style.display = \"\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tlast.className = h[0] ? \"dhx_multi_day_icon\" : \"dhx_multi_day_icon_small\";\r\n\t\t\t\t\t\tthis._dy_shift = (h[0] + 1) * hb;\r\n\t\t\t\t\t\th[0] = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn evs;\r\n\t};\r\n\r\n\tvar checked_divs = [\"dhx_cal_navline\", \"dhx_cal_header\", \"dhx_multi_day\", \"dhx_cal_data\"];\r\n\tvar updateContainterHeight = function(is_repaint) {\r\n\t\ttotal_height = 0;\r\n\t\tfor (var i = 0; i < checked_divs.length; i++) {\r\n\r\n\t\t\tvar className = checked_divs[i];\r\n\t\t\tvar checked_div = (scheduler._els[className]) ? scheduler._els[className][0] : null;\r\n\t\t\tvar height = 0;\r\n\t\t\tswitch (className) {\r\n\t\t\t\tcase \"dhx_cal_navline\":\r\n\t\t\t\tcase \"dhx_cal_header\":\r\n\t\t\t\t\theight = checked_div.offsetHeight;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"dhx_multi_day\":\r\n\t\t\t\t\theight = (checked_div) ? checked_div.offsetHeight - 1 : 0;\r\n\t\t\t\t\tmultiday_height = height;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"dhx_cal_data\":\r\n\t\t\t\t\tvar mode = scheduler.getState().mode;\r\n\r\n\t\t\t\t\tif(checked_div.childNodes[1] && mode != \"month\") {\r\n\t\t\t\t\t\tlet maxHeight = 0;\r\n\t\t\t\t\t\tfor(let i = 0; i < checked_div.childNodes.length; i++){\r\n\t\t\t\t\t\t\tif(checked_div.childNodes[i].offsetHeight > maxHeight){\r\n\t\t\t\t\t\t\t\tmaxHeight = checked_div.childNodes[i].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\theight = maxHeight;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\theight = Math.max(checked_div.offsetHeight - 1, checked_div.scrollHeight);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (mode == \"month\") {\r\n\t\t\t\t\t\tif (scheduler.config.month_day_min_height && !is_repaint) {\r\n\t\t\t\t\t\t\tvar rows_length = checked_div.querySelectorAll(\".dhx_cal_month_row\").length;\r\n\t\t\t\t\t\t\theight = rows_length * scheduler.config.month_day_min_height;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (is_repaint) {\r\n\t\t\t\t\t\t\tchecked_div.style.height = height + \"px\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (mode == \"year\"){\r\n\t\t\t\t\t\theight = 190 * scheduler.config.year_y;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(mode == \"agenda\"){\r\n\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\tif(checked_div.childNodes && checked_div.childNodes.length){\r\n\t\t\t\t\t\t\tfor(var j = 0; j < checked_div.childNodes.length; j++){\r\n\t\t\t\t\t\t\t\theight += checked_div.childNodes[j].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(height + 2 < scheduler.config.min_grid_size){\r\n\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (mode == \"week_agenda\"){\r\n\t\t\t\t\t\tvar min_height = scheduler.xy.week_agenda_scale_height + scheduler.config.min_grid_size,\r\n\t\t\t\t\t\t\tcur_height;\r\n\r\n\t\t\t\t\t\tvar column;\r\n\t\t\t\t\t\tfor(var k = 0; k < checked_div.childNodes.length; k++){\r\n\t\t\t\t\t\t\tcolumn = checked_div.childNodes[k];\r\n\t\t\t\t\t\t\tfor(var j = 0; j < column.childNodes.length; j++) {\r\n\t\t\t\t\t\t\t\tvar innerHeight = 0,\r\n\t\t\t\t\t\t\t\t\teventsContainer = column.childNodes[j].childNodes[1];\r\n\r\n\t\t\t\t\t\t\t\tfor(var g =0; g < eventsContainer.childNodes.length; g++){\r\n\t\t\t\t\t\t\t\t\tinnerHeight += eventsContainer.childNodes[g].offsetHeight;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tcur_height = innerHeight + scheduler.xy.week_agenda_scale_height;\r\n\t\t\t\t\t\t\t\tcur_height = (k == 1 && (j == 2 || j == 3)) ? cur_height * 2 : cur_height; // for last two cells;\r\n\r\n\t\t\t\t\t\t\t\tif (cur_height > min_height) {\r\n\t\t\t\t\t\t\t\t\tmin_height = cur_height;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\theight = min_height * 3;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(mode == \"map\") {\r\n\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\tvar evs = checked_div.querySelectorAll(\".dhx_map_line\");\r\n\r\n\t\t\t\t\t\tfor (var j = 0; j < evs.length; j++) {\r\n\t\t\t\t\t\t\theight += evs[j].offsetHeight;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (height + 2 < scheduler.config.min_map_size) {\r\n\t\t\t\t\t\t\theight = scheduler.config.min_map_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(scheduler._gridView) {\r\n\t\t\t\t\t\theight = 0;\r\n\r\n\t\t\t\t\t\tif (checked_div.childNodes[1].childNodes[0].childNodes && checked_div.childNodes[1].childNodes[0].childNodes.length) {\r\n\t\t\t\t\t\t\tvar evs = checked_div.childNodes[1].childNodes[0].childNodes[0].childNodes;\r\n\r\n\t\t\t\t\t\t\tfor (var j = 0; j < evs.length; j++) {\r\n\t\t\t\t\t\t\t\theight += evs[j].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\theight += 2;\r\n\r\n\t\t\t\t\t\t\tif(height < scheduler.config.min_grid_size){\r\n\t\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (scheduler.matrix && scheduler.matrix[mode]) {\r\n\t\t\t\t\t\tif (is_repaint) {\r\n\t\t\t\t\t\t\theight += 0;\r\n\t\t\t\t\t\t\tchecked_div.style.height = height + \"px\";\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\t\tvar cfg = scheduler.matrix[mode];\r\n\t\t\t\t\t\t\tvar rows = cfg.y_unit;\r\n\t\t\t\t\t\t\tfor(var r=0; r < rows.length; r++){\r\n\t\t\t\t\t\t\t\theight += cfg.getSectionHeight(rows[r].key);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t// Check and add extra height to avoid events hiding by the horizontal scrollbar\r\n\t\t\t\t\t\t\tif(scheduler.$container.clientWidth != scheduler.$container.scrollWidth){\r\n\t\t\t\t\t\t\t\theight += getScrollSize();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\theight -= 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (mode == \"day\" || mode == \"week\" || (scheduler._props && scheduler._props[mode])) {\r\n\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\theight += 1;\r\n\t\t\ttotal_height += height;\r\n\t\t}\r\n\t\tscheduler._obj.style.height = (total_height) + \"px\";\r\n\r\n\t\tif (!is_repaint)\r\n\t\t\tscheduler.updateView();\r\n\t};\r\n\r\n\tfunction callUpdate(){\r\n\t\tactive = false;\r\n\t\tscheduler.callEvent(\"onAfterSchedulerResize\", []);\r\n\t\tactive = true;\r\n\t}\r\n\r\n\tvar conditionalUpdateContainerHeight = function() {\r\n\t\tif(!(scheduler.config.container_autoresize && active))\r\n\t\t\treturn true;\r\n\r\n\t\tvar mode = scheduler.getState().mode;\r\n\r\n\t\tif(!mode) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tvar asyncRepaint = window.requestAnimationFrame || window.setTimeout;\r\n\t\tvar scrollTop = document.documentElement.scrollTop;\r\n\r\n\t\tasyncRepaint(function() {\r\n\t\t\tif(scheduler.$destroyed || !scheduler.$initialized){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tupdateContainterHeight();\r\n\t\t});\r\n\r\n\t\tif ( (scheduler.matrix && scheduler.matrix[mode]) || mode == \"month\") {\r\n\t\t\tasyncRepaint(function() {\r\n\t\t\t\tif(scheduler.$destroyed || !scheduler.$initialized){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tupdateContainterHeight(true);\r\n\t\t\t\tdocument.documentElement.scrollTop = scrollTop;\r\n\t\t\t\tcallUpdate();\r\n\t\t\t}, 1);\r\n\t\t}else{\r\n\t\t\tcallUpdate();\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function(){\r\n\t\tvar autosizeEnabled = scheduler.config.container_autoresize;\r\n\t\tif(!scheduler.xy.$original_scroll_width){\r\n\t\t\tscheduler.xy.$original_scroll_width = scheduler.xy.scroll_width;\r\n\t\t}\r\n\r\n\t\tscheduler.xy.scroll_width = autosizeEnabled ? 0 : scheduler.xy.$original_scroll_width;\r\n\r\n\t\tif(scheduler.matrix){\r\n\t\t\tfor(var i in scheduler.matrix){\r\n\t\t\t\tvar timeline = scheduler.matrix[i];\r\n\t\t\t\tif(!timeline.$original_section_autoheight){\r\n\t\t\t\t\ttimeline.$original_section_autoheight = timeline.section_autoheight;\r\n\t\t\t\t}\r\n\t\t\t\tif(autosizeEnabled){\r\n\t\t\t\t\ttimeline.section_autoheight = false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\ttimeline.section_autoheight = timeline.$original_section_autoheight;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onXLE\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventChanged\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventCreated\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventAdded\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventDeleted\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onAfterSchedulerResize\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onClearAll\", conditionalUpdateContainerHeight);\r\n\r\n\t//disable container autoresize when expanded\r\n\tscheduler.attachEvent(\"onBeforeExpand\", function(){\r\n\t\tactive = false;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeCollapse\", function(){\r\n\t\tactive = true;\r\n\t\treturn true;\r\n\t});\r\n\t// helper function\r\n\tfunction getScrollSize() {\r\n\t\tvar div = document.createElement(\"div\");\r\n\t\tdiv.style.cssText = \"visibility:hidden;position:absolute;left:-1000px;width:100px;padding:0px;margin:0px;height:110px;min-height:100px;overflow-y:scroll;\";\r\n\r\n\t\tdocument.body.appendChild(div);\r\n\t\tvar size = div.offsetWidth - div.clientWidth;\r\n\t\tdocument.body.removeChild(div);\r\n\t\treturn size;\r\n\t}\r\n\r\n\r\n}","export default function(scheduler){\r\n\tfunction setCookie(name,cookie_param,value) {\r\n\t\tvar str = name + \"=\" + value + (cookie_param?(\"; \"+cookie_param):\"\");\r\n\t\tdocument.cookie = str;\r\n\t}\r\n\tfunction getCookie(name) {\r\n\t\tvar search = name + \"=\";\r\n\t\tif (document.cookie.length > 0) {\r\n\t\t\tvar offset = document.cookie.indexOf(search);\r\n\t\t\tif (offset != -1) {\r\n\t\t\t\toffset += search.length;\r\n\t\t\t\tvar end = document.cookie.indexOf(\";\", offset);\r\n\t\t\t\tif (end == -1)\r\n\t\t\t\t\tend = document.cookie.length;\r\n\t\t\t\treturn document.cookie.substring(offset, end);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}\r\n\r\n\tfunction getCookieName(scheduler) {\r\n\t\treturn (scheduler._obj.id || \"scheduler\") + \"_settings\";\r\n\t}\r\n\r\n\tvar first = true;\r\n\tscheduler.attachEvent(\"onBeforeViewChange\",function(oldMode,oldDate,mode,date){\r\n\t\t// if Url plugin is enabled - explicit url values should have more priority than cookies\r\n\t\tif (first && scheduler._get_url_nav){\r\n\t\t\tvar urlNavigationPlugin = scheduler._get_url_nav();\r\n\t\t\tif(urlNavigationPlugin.date || urlNavigationPlugin.mode || urlNavigationPlugin.event){\r\n\t\t\t\tfirst = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar cookie = getCookieName(scheduler);\r\n\r\n\t\tif (first){\r\n\t\t\tfirst = false;\r\n\t\t\tvar schedulerCookie = getCookie(cookie);\r\n\t\t\tif (schedulerCookie){\r\n\r\n\t\t\t\tif(!scheduler._min_date){\r\n\t\t\t\t\t//otherwise scheduler will have incorrect date until timeout\r\n\t\t\t\t\t//it can cause js error with 'onMouseMove' handler of key_nav.js\r\n\t\t\t\t\tscheduler._min_date = date;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tschedulerCookie = unescape(schedulerCookie).split(\"@\");\r\n\t\t\t\tschedulerCookie[0] = this._helpers.parseDate(schedulerCookie[0]);\r\n\t\t\t\tvar view = this.isViewExists(schedulerCookie[1]) ? schedulerCookie[1] : mode,\r\n\t\t\t\t\tdate = !isNaN(+schedulerCookie[0]) ? schedulerCookie[0] : date;\r\n\r\n\t\t\t\twindow.setTimeout(function(){\r\n\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tscheduler.setCurrentView(date,view);\r\n\t\t\t\t},1);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", function (newMode , newDate){\r\n\t\tvar cookie = getCookieName(scheduler);\r\n\t\tvar text = escape(this._helpers.formatDate(newDate)+\"@\"+(newMode));\r\n\t\tsetCookie(cookie,\"expires=Sun, 31 Jan 9999 22:00:00 GMT\",text);\r\n\t});\r\n\r\n\t// As we are blocking first render above there could be a problem in case of dynamic loading and rendering of visible data in general ('from'/'to' won't be defined)\r\n\tvar old_load = scheduler._load;\r\n\tscheduler._load = function() {\r\n\t\tvar args = arguments;\r\n\r\n\t\tif (!scheduler._date) {\r\n\t\t\tvar that = this;\r\n\t\t\twindow.setTimeout(function() {\r\n\t\t\t\told_load.apply(that, args);\r\n\t\t\t},1);\r\n\t\t} else {\r\n\t\t\told_load.apply(this, args);\r\n\t\t}\r\n\t};\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Day Timeline\", scheduler.assert);\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Drag Between\", scheduler.assert);\r\n}","export default function(scheduler){\r\n/* global dhtmlXCombo */\r\nscheduler.form_blocks['combo']={\r\n\trender:function(sns) {\r\n\t\tif (!sns.cached_options)\r\n\t\t\tsns.cached_options = {};\r\n\t\tvar res = '';\r\n\t\tres += \"
\";\r\n\t\treturn res;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\t(function(){\r\n\t\t\tresetCombo();\r\n\t\t\tvar id = scheduler.attachEvent(\"onAfterLightbox\",function(){\r\n\t\t\t\t// otherwise destructor will never be called after form reset(e.g. in readonly event mode)\r\n\t\t\t\tresetCombo();\r\n\t\t\t\tscheduler.detachEvent(id);\r\n\t\t\t});\r\n\t\t\tfunction resetCombo(){\r\n\t\t\t\tif(node._combo && node._combo.DOMParent) {\r\n\t\t\t\t\tvar combo = node._combo;\r\n\t\t\t\t\tif(combo.unload){\r\n\t\t\t\t\t\tcombo.unload();\r\n\t\t\t\t\t}else if(combo.destructor){\r\n\t\t\t\t\t\tcombo.destructor();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// dhtmlxCombo 4.1.0 bug\r\n\t\t\t\t\tcombo.DOMParent = combo.DOMelem = null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})();\r\n\t\twindow.dhx_globalImgPath = config.image_path||'/';\r\n\t\tnode._combo = new dhtmlXCombo(node, config.name, node.offsetWidth-8);\r\n\t\tif (config.onchange)\r\n\t\t\tnode._combo.attachEvent(\"onChange\", config.onchange);\r\n\r\n\t\tif (config.options_height)\r\n\t\t\tnode._combo.setOptionHeight(config.options_height);\r\n\t\tvar combo = node._combo;\r\n\t\tcombo.enableFilteringMode(config.filtering, config.script_path||null, !!config.cache);\r\n\r\n\t\tif (!config.script_path) { // script-side filtration is used\r\n\t\t\tvar all_options = [];\r\n\t\t\tfor (var i = 0; i < config.options.length; i++) {\r\n\t\t\t\tvar option = config.options[i];\r\n\t\t\t\tvar single_option = [\r\n\t\t\t\t\toption.key,\r\n\t\t\t\t\toption.label,\r\n\t\t\t\t\toption.css\r\n\t\t\t\t];\r\n\t\t\t\tall_options.push(single_option);\r\n\t\t\t}\r\n\t\t\tcombo.addOption(all_options);\r\n\t\t\tif (ev[config.map_to]) {\r\n\t\t\t\tvar index = combo.getIndexByValue(ev[config.map_to]);\r\n\t\t\t\tcombo.selectOption(index);\r\n\t\t\t}\r\n\t\t} else { // server-side filtration is used\r\n\t\t\tvar selected_id = ev[config.map_to];\r\n\t\t\tif (selected_id) {\r\n\t\t\t\tif (config.cached_options[selected_id]) {\r\n\t\t\t\t\tcombo.addOption(selected_id, config.cached_options[selected_id]);\r\n\t\t\t\t\tcombo.disable(1);\r\n\t\t\t\t\tcombo.selectOption(0);\r\n\t\t\t\t\tcombo.disable(0);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tscheduler.ajax.get(config.script_path+\"?id=\"+selected_id+\"&uid=\"+scheduler.uid(), function(result){\r\n\t\t\t\t\t\tvar responseText = result.xmlDoc.responseText;\r\n\t\t\t\t\t\tvar label;\r\n\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\tvar res = JSON.parse(responseText);\r\n\t\t\t\t\t\t\tlabel = res.options[0].text;\r\n\t\t\t\t\t\t}catch(e){\r\n\t\t\t\t\t\t\tvar option = scheduler.ajax.xpath(\"//option\", result.xmlDoc)[0];\r\n\t\t\t\t\t\t\tlabel = option.childNodes[0].nodeValue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tconfig.cached_options[selected_id] = label;\r\n\t\t\t\t\t\tcombo.addOption(selected_id, label);\r\n\t\t\t\t\t\tcombo.disable(1);\r\n\t\t\t\t\t\tcombo.selectOption(0);\r\n\t\t\t\t\t\tcombo.disable(0);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tcombo.setComboValue(\"\");\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config) {\r\n\t\tvar selected_id = node._combo.getSelectedValue(); // value = key\r\n\t\tif (config.script_path) {\r\n\t\t\tconfig.cached_options[selected_id] = node._combo.getSelectedText();\r\n\t\t}\r\n\t\treturn selected_id;\r\n\t},\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\nscheduler.form_blocks['radio']={\r\n\trender:function(sns) {\r\n\t\tvar res = '';\r\n\t\tres += `
`;\r\n\t\tfor (var i=0; i\"+\" \"+sns.options[i].label+\"\";\r\n\t\t}\r\n\t\tres += \"
\";\r\n\r\n\t\treturn res;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\tvar radiobuttons = node.getElementsByTagName('input');\r\n\t\tfor (var i = 0; i < radiobuttons.length; i++) {\r\n\t\t\tradiobuttons[i].checked = false;\r\n\t\t\tvar checked_value = ev[config.map_to]||value;\r\n\t\t\tif (radiobuttons[i].value == checked_value) {\r\n\t\t\t\tradiobuttons[i].checked = true;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tvar radiobuttons = node.getElementsByTagName('input');\r\n\t\tfor(var i=0; i
';\r\n\t\telse\r\n\t\t\treturn '';\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\tnode=scheduler._lightbox.querySelector(`#${config.id}`);\r\n\t\tvar id = scheduler.uid();\r\n\t\tvar isChecked = (typeof config.checked_value != \"undefined\") ? value == config.checked_value : !!value;\r\n\t\tnode.className += \" dhx_cal_checkbox\";\r\n\t\tvar check_html = \"\";\r\n\t\tvar label_html = \"\";\r\n\t\tif (scheduler.config.wide_form){\r\n\t\t\tnode.innerHTML = label_html;\r\n\t\t\tnode.nextSibling.innerHTML=check_html;\r\n\t\t} else\r\n\t\t\tnode.innerHTML=check_html+label_html;\r\n\r\n\t\tif (config.handler) {\r\n\t\t\tvar checkbox = node.getElementsByTagName('input')[0];\r\n\t\t\tif(checkbox.$_eventAttached){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tcheckbox.$_eventAttached = true;\r\n\t\t\tscheduler.event(checkbox, \"click\", config.handler);\r\n\t\t\t//checkbox.onclick = config.handler;\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tnode=scheduler._lightbox.querySelector(`#${config.id}`);\r\n\t\tvar checkbox = node.getElementsByTagName('input')[0]; // moved to the header\r\n\t\tif (!checkbox)\r\n\t\t\tcheckbox = node.nextSibling.getElementsByTagName('input')[0];\r\n\t\treturn (checkbox.checked)?(config.checked_value||true):(config.unchecked_value||false);\r\n\t},\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.ext.fullscreen = {\r\n\ttoggleIcon: null\r\n};\r\n\r\nscheduler.expand = function() {\r\n\tif(!scheduler.callEvent(\"onBeforeExpand\", []))\r\n\t\treturn;\r\n\tvar t = scheduler._obj;\r\n\tdo {\r\n\t\tt._position = t.style.position || \"\";\r\n\t\tt.style.position = \"static\";\r\n\t} while ((t = t.parentNode) && t.style);\r\n\tt = scheduler._obj;\r\n\tt.style.position = \"absolute\";\r\n\tt._width = t.style.width;\r\n\tt._height = t.style.height;\r\n\tt.style.width = t.style.height = \"100%\";\r\n\tt.style.top = t.style.left = \"0px\";\r\n\r\n\tvar top = document.body;\r\n\ttop.scrollTop = 0;\r\n\r\n\ttop = top.parentNode;\r\n\tif (top)\r\n\t\ttop.scrollTop = 0;\r\n\tdocument.body._overflow = document.body.style.overflow || \"\";\r\n\tdocument.body.style.overflow = \"hidden\";\r\n\tscheduler._maximize();\r\n\tscheduler.callEvent(\"onExpand\", []);\r\n};\r\nscheduler.collapse = function() {\r\n\tif(!scheduler.callEvent(\"onBeforeCollapse\", []))\r\n\t\treturn;\r\n\tvar t = scheduler._obj;\r\n\tdo {\r\n\t\tt.style.position = t._position;\r\n\t} while ((t = t.parentNode) && t.style);\r\n\tt = scheduler._obj;\r\n\tt.style.width = t._width;\r\n\tt.style.height = t._height;\r\n\tdocument.body.style.overflow = document.body._overflow;\r\n\tscheduler._maximize();\r\n\tscheduler.callEvent(\"onCollapse\", []);\r\n};\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar t = document.createElement(\"div\");\r\n\tt.className = \"dhx_expand_icon\";\r\n\tscheduler.ext.fullscreen.toggleIcon = t;\r\n\tt.innerHTML = `\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t`;\r\n\tscheduler._obj.appendChild(t);\r\n\tscheduler.event(t, \"click\", function() {\r\n\t\tif (!scheduler.expanded)\r\n\t\t\tscheduler.expand(); else\r\n\t\t\tscheduler.collapse();\r\n\t});\r\n});\r\nscheduler._maximize = function() {\r\n\tthis.expanded = !this.expanded;\r\n\tif(this.expanded){\r\n\t\tthis.ext.fullscreen.toggleIcon.classList.add(\"dhx_expand_icon--expanded\");\r\n\t\t\r\n\t}else{\r\n\t\tthis.ext.fullscreen.toggleIcon.classList.remove(\"dhx_expand_icon--expanded\");\r\n\t}\r\n\t\r\n\t//scheduler.ext.fullscreen.toggleIcon.style.backgroundPosition = \"0 \" + (this.expanded ? \"0\" : \"18\") + \"px\";\r\n\r\n\tvar directions = ['left', 'top'];\r\n\tfor (var i = 0; i < directions.length; i++) {\r\n\t\t//var margin = scheduler.xy['margin_' + directions[i]];\r\n\t\tvar prev_margin = scheduler['_prev_margin_' + directions[i]];\r\n\t\tif (scheduler.xy['margin_' + directions[i]]) {\r\n\t\t\tscheduler['_prev_margin_' + directions[i]] = scheduler.xy['margin_' + directions[i]];\r\n\t\t\tscheduler.xy['margin_' + directions[i]] = 0;\r\n\t\t} else {\r\n\t\t\tif (prev_margin) {\r\n\t\t\t\tscheduler.xy['margin_' + directions[i]] = scheduler['_prev_margin_' + directions[i]];\r\n\t\t\t\tdelete scheduler['_prev_margin_' + directions[i]];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler.setCurrentView();\r\n};\r\n\r\n\r\n}\r\n","export default function(scheduler){\r\n\r\n\r\n(function(){\r\n\r\nfunction defaults(obj, std){\r\n\tfor (var key in std)\r\n\t\tif (!obj[key])\r\n\t\t\tobj[key] = std[key];\r\n\treturn obj;\r\n}\r\n\r\nfunction getElementSizes(element, scheduler) {\r\n\tvar sizes = {};\r\n\telement = scheduler._els[element];\r\n\tif (element && element[0]) {\r\n\t\tsizes.x = element[0].scrollWidth;\r\n\t\tsizes.y = element[0].scrollHeight;\r\n\t} else {\r\n\t\tsizes.x = 0;\r\n\t\tsizes.y = 0;\r\n\t}\r\n\treturn sizes;\r\n}\r\n\r\n//compatibility for new versions of scheduler\r\nif(!window.dhtmlxAjax){\r\n\twindow.dhtmlxAjax = {\r\n\t\tpost: function(url, data, callback){\r\n\t\t\treturn window.dhx4.ajax.post(url, data, callback);\r\n\t\t},\r\n\t\tget: function(url, callback){\r\n\t\t\treturn window.ajax.get(url, callback);\r\n\t\t}\r\n\t};\r\n}\r\n\r\nfunction add_export_methods(scheduler){\r\n\r\n\tscheduler.exportToPDF = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.pdf\",\r\n\t\t\tformat:\"A4\",\r\n\t\t\torientation:\"landscape\",\r\n\t\t\tdpi:96,\r\n\t\t\tzoom:1,\r\n\t\t\trtl: scheduler.config.rtl\r\n\t\t});\r\n\t\tconfig.html = this._export_html(config);\r\n\t\tconfig.mode = this.getState().mode;\r\n\t\tthis._send_to_export(config, \"pdf\");\r\n\t};\r\n\r\n\tscheduler.exportToPNG = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.png\",\r\n\t\t\tformat:\"A4\",\r\n\t\t\torientation:\"landscape\",\r\n\t\t\tdpi:96,\r\n\t\t\tzoom:1,\r\n\t\t\trtl: scheduler.config.rtl\r\n\t\t});\r\n\t\tconfig.html = this._export_html(config);\r\n\t\tconfig.mode = this.getState().mode;\r\n\t\tthis._send_to_export(config, \"png\");\r\n\t};\r\n\r\n\tscheduler.exportToICal = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.ical\",\r\n\t\t\tdata:this._serialize_plain(null, config)\r\n\t\t});\r\n\t\tthis._send_to_export(config, \"ical\");\r\n\t};\r\n\r\n\tscheduler.exportToExcel = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.xlsx\",\r\n\t\t\ttitle:\"Events\",\r\n\t\t\tdata:this._serialize_plain( this.templates.xml_format, config),\r\n\t\t\tcolumns:this._serialize_columns()\r\n\t\t});\r\n\t\tthis._send_to_export(config, \"excel\");\r\n\t};\r\n\r\n\tscheduler._ajax_to_export = function(data, type, callback){\r\n\t\tdelete data.callback;\r\n\t\tvar url = data.server || \"https://export.dhtmlx.com/scheduler\";\r\n\r\n\t\twindow.dhtmlxAjax.post(url,\r\n\t\t\t\"type=\"+type+\"&store=1&data=\"+encodeURIComponent(JSON.stringify(data)),\r\n\t\t\tfunction(loader){\r\n\t\t\t\tvar fail = loader.xmlDoc.status > 400;\r\n\t\t\t\tvar info = null;\r\n\r\n\t\t\t\tif (!fail){\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\tinfo = JSON.parse(loader.xmlDoc.responseText);\r\n\t\t\t\t\t}catch(e){}\r\n\t\t\t\t}\r\n\t\t\t\tcallback(info);\r\n\t\t\t}\r\n\t\t);\r\n\t};\r\n\r\n\tscheduler._plain_export_copy = function(source, format){\r\n\t\tvar target = {};\r\n\t\tfor (var key in source)\r\n\t\t\ttarget[key] = source[key];\r\n\r\n\t\ttarget.start_date = format(target.start_date);\r\n\t\ttarget.end_date = format(target.end_date);\r\n\t\ttarget.$text = this.templates.event_text(source.start_date, source.end_date, source);\r\n\r\n\t\treturn target;\r\n\t};\r\n\r\n\tscheduler._serialize_plain = function(format, config){\r\n\t\tformat = format || scheduler.date.date_to_str(\"%Y%m%dT%H%i%s\", true);\r\n\r\n\t\tvar events;\r\n\t\tif (config && config.start && config.end)\r\n\t\t\tevents = scheduler.getEvents(config.start, config.end);\r\n\t\telse\r\n\t\t\tevents = scheduler.getEvents();\r\n\r\n\t\tvar data = [];\r\n\t\tfor (var i = 0; i< events.length; i++)\r\n\t\t\tdata[i] = this._plain_export_copy(events[i], format);\r\n\r\n\t\treturn data;\r\n\t};\r\n\r\n\tscheduler._serialize_columns = function(){\r\n\t\treturn [\r\n\t\t\t{ id:\"start_date\", header:\"Start Date\", width:30 },\r\n\t\t\t{ id:\"end_date\", header:\"End Date\", width:30 },\r\n\t\t\t{ id:\"$text\", header:\"Text\", width:100 }\r\n\t\t];\r\n\t};\r\n\r\n\tscheduler._send_to_export = function(data, type){\r\n\t\tif(!data.version){\r\n\t\t\tdata.version = scheduler.version;\r\n\t\t}\r\n\r\n\t\tif(!data.skin){\r\n\t\t\tdata.skin = scheduler.skin;\r\n\t\t}\r\n\r\n\t\tif (data.callback)\r\n\t\t\t\treturn scheduler._ajax_to_export(data, type, data.callback);\r\n\r\n\t\tvar form = this._create_hidden_form();\r\n\r\n\t\tform.firstChild.action = data.server || \"https://export.dhtmlx.com/scheduler\";\r\n\t\tform.firstChild.childNodes[0].value = JSON.stringify(data);\r\n\t\tform.firstChild.childNodes[1].value = type;\r\n\t\tform.firstChild.submit();\r\n\t};\r\n\r\n\tscheduler._create_hidden_form = function(){\r\n\t\tif (!this._hidden_export_form){\r\n\t\t\tvar t = this._hidden_export_form = document.createElement(\"div\");\r\n\t\t\tt.style.display = \"none\";\r\n\t\t\tt.innerHTML = \"
\";\r\n\t\t\tdocument.body.appendChild(t);\r\n\t\t}\r\n\t\treturn this._hidden_export_form;\r\n\t};\r\n\r\n\tscheduler._get_export_size = function(format, orientation, zoom, dpi, header, footer, scales) {\r\n\r\n\t\tdpi = parseInt(dpi)/25.4 || 4;\r\n\r\n\t\tvar sizes = {\r\n\t\t\t\"A5\":{ x:148, y:210 },\r\n\t\t\t\"A4\":{ x:210, y:297 },\r\n\t\t\t\"A3\":{ x:297, y:420 },\r\n\t\t\t\"A2\":{ x:420, y:594 },\r\n\t\t\t\"A1\":{ x:594, y:841 },\r\n\t\t\t\"A0\":{ x:841, y:1189 }\r\n\t\t};\r\n\r\n\t\tvar dataX = getElementSizes(\"dhx_cal_data\", this).x;\r\n\t\tvar dataY = getElementSizes(\"dhx_cal_data\", this).y;\r\n\t\tvar headY = getElementSizes(\"dhx_cal_header\", this).y;\r\n\t\tvar multY = getElementSizes(\"dhx_multi_day\", this).y;\r\n\r\n\t\tvar cSize = {\r\n\t\t\ty: dataY + headY + multY\r\n\t\t};\r\n\r\n\t\tif (format === \"full\") {\r\n\t\t\tcSize.x = dataX;\r\n\t\t} else {\r\n\t\t\tcSize.x = Math.floor( (orientation === \"landscape\" ? sizes[format].y : sizes[format].x) * dpi );\r\n\t\t}\r\n\r\n\t\tif (scales) {\r\n\t\t\tcSize.x *= (parseFloat(scales.x) || 1);\r\n\t\t\tcSize.y *= (parseFloat(scales.y) || 1);\r\n\t\t}\r\n\r\n\t\treturn cSize;\r\n\t};\r\n\r\n\tfunction getTimeline() {\r\n\t\tvar mode = scheduler.getState().mode;\r\n\t\tif (scheduler.matrix && scheduler.matrix[mode]) {\r\n\t\t\treturn scheduler.matrix[mode];\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n\r\n\tfunction getInitialSizes() {\r\n\t\tvar smartRendering = undefined,\r\n\t\t\tscrollable = undefined;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (timeline) {\r\n\t\t\tscrollable = timeline.scrollable;\r\n\t\t\tsmartRendering = timeline.smart_rendering;\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tnav_height: scheduler.xy.nav_height,\r\n\t\t\tscroll_width: scheduler.xy.scroll_width,\r\n\t\t\tstyle_width: scheduler._obj.style.width,\r\n\t\t\tstyle_height: scheduler._obj.style.height,\r\n\t\t\ttimeline_scrollable: scrollable,\r\n\t\t\ttimeline_smart_rendering: smartRendering\r\n\t\t};\r\n\t}\r\n\r\n\tfunction setExportSizes(size, initialSizes) {\r\n\t\tscheduler._obj.style.width = size.x + \"px\";\r\n\t\tscheduler._obj.style.height = size.y + \"px\";\r\n\r\n\t\tscheduler.xy.nav_height = 0;\r\n\t\tscheduler.xy.scroll_width = 0;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (initialSizes.timeline_scrollable || initialSizes.timeline_smart_rendering) {\r\n\r\n\t\t\ttimeline.scrollable = false;\r\n\t\t\ttimeline.smart_rendering = false;\r\n\t\t}\r\n\t}\r\n\r\n\tfunction setInitialSizes(initialSizes) {\r\n\t\tscheduler.xy.scroll_width = initialSizes.scroll_width;\r\n\t\tscheduler.xy.nav_height = initialSizes.nav_height;\r\n\t\tscheduler._obj.style.width = initialSizes.style_width;\r\n\t\tscheduler._obj.style.height = initialSizes.style_height;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (initialSizes.timeline_scrollable || initialSizes.timeline_smart_rendering) {\r\n\t\t\ttimeline.scrollable = initialSizes.timeline_scrollable;\r\n\t\t\ttimeline.smart_rendering = initialSizes.timeline_smart_rendering;\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler._export_html = function (obj) {\r\n\t\tvar initialSizes = getInitialSizes();\r\n\t\tvar size = scheduler._get_export_size(obj.format, obj.orientation, obj.zoom, obj.dpi, obj.header, obj.footer, obj.scales);\r\n\r\n\t\tvar html = \"\";\r\n\t\ttry {\r\n\t\t\tsetExportSizes(size, initialSizes);\r\n\t\t\tscheduler.setCurrentView();\r\n\t\t\thtml = scheduler._obj.innerHTML;\r\n\t\t} catch (e) {\r\n\r\n\t\t\t// eslint-disable-next-line no-console\r\n\t\t\tconsole.error(e);\r\n\t\t} finally {\r\n\t\t\tsetInitialSizes(initialSizes);\r\n\t\t\tscheduler.setCurrentView();\r\n\t\t}\r\n\r\n\t\treturn html;\r\n\t};\r\n\r\n}\r\n\r\nadd_export_methods(scheduler);\r\n\r\n\r\n})();\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Grid\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\tvar els = document.body.getElementsByTagName(\"DIV\");\r\n\tfor (var i=0; i < els.length; i++) {\r\n\t\tvar cs = els[i].className||\"\";\r\n\t\tcs = cs.split(\":\");\r\n\t\tif (cs.length == 2 && cs[0] == \"template\"){\r\n\t\t\tvar code = \"return \\\"\"+(els[i].innerHTML||\"\").replace(/\\\\/g, \"\\\\\\\\\").replace(/\"/g,\"\\\\\\\"\").replace(/[\\n\\r]+/g,\"\")+\"\\\";\";\r\n\t\t\tcode = unescape(code).replace(/\\{event\\.([a-z]+)\\}/g,function(all,mask){\r\n\t\t\t\treturn '\"+ev.'+mask+'+\"';\r\n\t\t\t});\r\n\t\t\tscheduler.templates[cs[1]]=Function(\"start\",\"end\",\"ev\",code);\r\n\t\t\tels[i].style.display='none';\r\n\t\t}\r\n\t}\r\n});\r\n\r\n}","import keyboard_shortcuts from \"./keyboard_navigation/common/keyboard_shortcuts\";\r\nimport eventhandler from \"./keyboard_navigation/common/eventhandler\";\r\nimport trap_modal_focus from \"./keyboard_navigation/common/trap_modal_focus\";\r\nimport marker from \"./keyboard_navigation/marker\";\r\nimport scheduler_node from \"./keyboard_navigation/elements/scheduler_node\";\r\nimport nav_node from \"./keyboard_navigation/elements/nav_node\";\r\nimport header_cell from \"./keyboard_navigation/elements/header_cell\";\r\nimport event from \"./keyboard_navigation/elements/event\";\r\nimport time_slot from \"./keyboard_navigation/elements/time_slot\";\r\nimport minical_button from \"./keyboard_navigation/elements/minical_button\";\r\nimport minical_cell from \"./keyboard_navigation/elements/minical_cell\";\r\nimport data_area from \"./keyboard_navigation/elements/data_area\";\r\nimport modals from \"./keyboard_navigation/modals\";\r\nimport core from \"./keyboard_navigation/core\";\r\nimport key_nav_legacy from \"./keyboard_navigation/key_nav_legacy\";\r\n\r\n\r\nimport scheduler_handlers from \"./keyboard_navigation/scheduler_handlers\";\r\nimport minical_handlers from \"./keyboard_navigation/minical_handlers\";\r\n\r\nexport default function(scheduler){\r\n\t\tscheduler.config.key_nav = true;\r\n\t\tscheduler.config.key_nav_step = 30;\r\n\t\tscheduler.addShortcut = function(shortcut, handler, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tscopeObject.prototype.bind(shortcut, handler);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.getShortcutHandler = function(shortcut, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tvar commands = scheduler.$keyboardNavigation.shortcuts.parse(shortcut);\r\n\t\t\t\tif(commands.length){\r\n\t\t\t\t\treturn scopeObject.prototype.findHandler(commands[0]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.removeShortcut = function(shortcut, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tscopeObject.prototype.unbind(shortcut);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.focus = function(){\r\n\t\t\tif(!scheduler.config.key_nav){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar disp = scheduler.$keyboardNavigation.dispatcher;\r\n\t\t\tdisp.enable();\r\n\t\t\tvar activeNode = disp.getActiveNode();\r\n\t\t\tif(!activeNode || activeNode instanceof scheduler.$keyboardNavigation.MinicalButton || activeNode instanceof scheduler.$keyboardNavigation.MinicalCell){\r\n\t\t\t\tdisp.setDefaultNode();\r\n\t\t\t}else{\r\n\t\t\t\tdisp.focusNode(disp.getActiveNode());\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfunction getScope(mode){\r\n\t\t\tvar scopes = {\r\n\t\t\t\t\"minicalButton\":scheduler.$keyboardNavigation.MinicalButton,\r\n\t\t\t\t\"minicalDate\":scheduler.$keyboardNavigation.MinicalCell,\r\n\t\t\t\t\"scheduler\":scheduler.$keyboardNavigation.SchedulerNode,\r\n\t\t\t\t\"dataArea\": scheduler.$keyboardNavigation.DataArea,\r\n\t\t\t\t\"timeSlot\": scheduler.$keyboardNavigation.TimeSlot,\r\n\t\t\t\t\"event\": scheduler.$keyboardNavigation.Event\r\n\t\t\t};\r\n\r\n\t\t\tvar searchMap = {};\r\n\t\t\tfor(var i in scopes)\r\n\t\t\t\tsearchMap[i.toLowerCase()] = scopes[i];\r\n\r\n\t\t\tmode = (mode + \"\").toLowerCase();\r\n\r\n\t\t\treturn searchMap[mode] || scopes.scheduler;\r\n\t\t}\r\n\r\n\t\tscheduler.$keyboardNavigation = {};\r\n\r\n\t\tscheduler._compose = function(){\r\n\t\t\tvar parts = Array.prototype.slice.call(arguments, 0);\r\n\t\t\tvar res = {};\r\n\t\t\tfor(var i = 0; i < parts.length; i++){\r\n\t\t\t\tvar obj = parts[i];\r\n\t\t\t\tif(typeof obj == \"function\"){\r\n\t\t\t\t\tobj = new obj();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor(var p in obj){\r\n\t\t\t\t\tres[p] = obj[p];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn res;\r\n\t\t};\r\n\r\n\t\tkeyboard_shortcuts(scheduler);\r\n\t\teventhandler(scheduler);\r\n\t\ttrap_modal_focus(scheduler);\r\n\t\tmarker(scheduler);\r\n\t\tscheduler_node(scheduler);\r\n\t\tnav_node(scheduler);\r\n\t\theader_cell(scheduler);\r\n\t\tevent(scheduler);\r\n\t\ttime_slot(scheduler);\r\n\t\tminical_button(scheduler);\r\n\t\tminical_cell(scheduler);\r\n\t\tdata_area(scheduler);\r\n\t\tmodals(scheduler);\r\n\t\tcore(scheduler);\r\n\t\tkey_nav_legacy(scheduler);\r\n\r\n\t\t(function(){\r\n\t\t\tscheduler_handlers(scheduler);\r\n\t\t\tminical_handlers(scheduler);\r\n\r\n\t\t\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\t\t\tscheduler.$keyboardNavigation.attachSchedulerHandlers();\r\n\r\n\t\t\tif(scheduler.renderCalendar){\r\n\t\t\t\t// if minical ext loaded before key nav ext - patch it now\r\n\t\t\t\tscheduler.$keyboardNavigation.patchMinicalendar();\r\n\t\t\t}else{\r\n\t\t\t\t// otherwise - wait until everything is loaded and try again\r\n\t\t\t\tvar attachOnce = scheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\t\t\t\tscheduler.detachEvent(attachOnce);\r\n\t\t\t\t\tscheduler.$keyboardNavigation.patchMinicalendar();\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\tfunction isSchedulerSelected(){\r\n\t\t\t\tif(!scheduler.config.key_nav) return;\r\n\r\n\t\t\t\tvar enable;\r\n\t\t\t\tvar focusElement = document.activeElement;\r\n\t\t\t\t// halt key nav when focus is outside scheduler or in quick info popup\r\n\t\t\t\tif(!focusElement || scheduler.utils.dom.locateCss(focusElement, \"dhx_cal_quick_info\", false)){\r\n\t\t\t\t\tenable = false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tenable = scheduler.$keyboardNavigation.isChildOf(focusElement, scheduler.$container) || scheduler.$keyboardNavigation.isMinical(focusElement);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn enable;\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\tfunction changeState(enable){\r\n\t\t\t\tif(enable && !dispatcher.isEnabled()){\r\n\t\t\t\t\tdispatcher.enable();\r\n\t\t\t\t}else if(!enable && dispatcher.isEnabled()){\r\n\t\t\t\t\tdispatcher.disable();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tconst intervalId = setInterval(function(){\r\n\t\t\t\tif(!scheduler.$container || !scheduler.$keyboardNavigation.isChildOf(scheduler.$container, document.body)){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar enable = isSchedulerSelected();\r\n\r\n\t\t\t\tif(enable){\r\n\t\t\t\t\tchangeState(enable);\r\n\t\t\t\t}else if(!enable && dispatcher.isEnabled()){\r\n\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// doublecheck in case checking is done in handler before focus element is repainted\r\n\t\t\t\t\t\tif(scheduler.config.key_nav){\r\n\t\t\t\t\t\t\tchangeState(isSchedulerSelected());\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tscheduler.$container.removeAttribute(\"tabindex\");\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}, 100);\r\n\t\t\t\t}\r\n\t\t\t}, 500);\r\n\t\t\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\t\t\tclearInterval(intervalId);\r\n\t\t\t});\r\n\t\t})();\r\n\t}\r\n\r\n\r\n","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.shortcuts = {\r\n\tcreateCommand: function(){\r\n\t\treturn {\r\n\t\t\tmodifiers:{\r\n\t\t\t\t\"shift\": false,\r\n\t\t\t\t\"alt\": false,\r\n\t\t\t\t\"ctrl\": false,\r\n\t\t\t\t\"meta\": false\r\n\t\t\t},\r\n\t\t\tkeyCode: null\r\n\t\t};\r\n\t},\r\n\tparse: function(shortcut){\r\n\t\tvar commands = [];\r\n\r\n\t\tvar expr = this.getExpressions(this.trim(shortcut));\r\n\t\tfor(var i = 0; i < expr.length; i++){\r\n\t\t\tvar words = this.getWords(expr[i]);\r\n\r\n\t\t\tvar command = this.createCommand();\r\n\r\n\t\t\tfor(var j = 0; j < words.length; j++){\r\n\t\t\t\tif(this.commandKeys[words[j]]){\r\n\t\t\t\t\tcommand.modifiers[words[j]] = true;\r\n\t\t\t\t}else if(this.specialKeys[words[j]]){\r\n\t\t\t\t\tcommand.keyCode = this.specialKeys[words[j]];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcommand.keyCode = words[j].charCodeAt(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tcommands.push(command);\r\n\t\t}\r\n\t\treturn commands;\r\n\t},\r\n\r\n\tgetCommandFromEvent: function(domEvent){\r\n\t\tvar command = this.createCommand();\r\n\t\tcommand.modifiers.shift = !!domEvent.shiftKey;\r\n\t\tcommand.modifiers.alt = !!domEvent.altKey;\r\n\t\tcommand.modifiers.ctrl = !!domEvent.ctrlKey;\r\n\t\tcommand.modifiers.meta = !!domEvent.metaKey;\r\n\t\tcommand.keyCode = domEvent.which || domEvent.keyCode;\r\n\r\n\t\tif(command.keyCode >= 96 && command.keyCode <= 105){\r\n\t\t\t// numpad keys 96-105 -> 48-57\r\n\t\t\tcommand.keyCode -= 48;//convert numpad number code to regular number code\r\n\t\t}\r\n\r\n\t\tvar printableKey = String.fromCharCode(command.keyCode );\r\n\t\tif(printableKey){\r\n\t\t\tcommand.keyCode = printableKey.toLowerCase().charCodeAt(0);\r\n\t\t}\r\n\t\treturn command;\r\n\t},\r\n\r\n\tgetHashFromEvent: function(domEvent){\r\n\t\treturn this.getHash(this.getCommandFromEvent(domEvent));\r\n\t},\r\n\r\n\tgetHash: function(command){\r\n\t\tvar parts = [];\r\n\t\tfor(var i in command.modifiers){\r\n\t\t\tif(command.modifiers[i]){\r\n\t\t\t\tparts.push(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tparts.push(command.keyCode);\r\n\r\n\t\treturn parts.join(this.junctionChar);\r\n\t},\r\n\r\n\tgetExpressions: function(shortcut){\r\n\t\treturn shortcut.split(this.junctionChar);\r\n\t},\r\n\tgetWords: function(term){\r\n\t\treturn term.split(this.combinationChar);\r\n\t},\r\n\ttrim: function(shortcut){\r\n\t\treturn shortcut.replace(/\\s/g, \"\");\r\n\t},\r\n\tjunctionChar:\",\",\r\n\tcombinationChar:\"+\",\r\n\tcommandKeys:{\r\n\t\t\"shift\": 16,\r\n\t\t\"alt\": 18,\r\n\t\t\"ctrl\": 17,\r\n\t\t\"meta\": true\r\n\t},\r\n\tspecialKeys:{\r\n\t\t\"backspace\": 8,\r\n\t\t\"tab\": 9,\r\n\t\t\"enter\": 13,\r\n\t\t\"esc\": 27,\r\n\t\t\"space\": 32,\r\n\t\t\"up\": 38,\r\n\t\t\"down\": 40,\r\n\t\t\"left\": 37,\r\n\t\t\"right\": 39,\r\n\t\t\"home\": 36,\r\n\t\t\"end\": 35,\r\n\t\t\"pageup\": 33,\r\n\t\t\"pagedown\": 34,\r\n\t\t\"delete\": 46,\r\n\t\t\"insert\": 45,\r\n\t\t\"plus\":107,\r\n\t\t\"f1\": 112,\r\n\t\t\"f2\": 113,\r\n\t\t\"f3\": 114,\r\n\t\t\"f4\": 115,\r\n\t\t\"f5\": 116,\r\n\t\t\"f6\": 117,\r\n\t\t\"f7\": 118,\r\n\t\t\"f8\": 119,\r\n\t\t\"f9\": 120,\r\n\t\t\"f10\": 121,\r\n\t\t\"f11\": 122,\r\n\t\t\"f12\": 123\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.EventHandler = {\r\n\t_handlers: null,\r\n\tfindHandler: function(command){\r\n\t\tif(!this._handlers) this._handlers = {};\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\t\tvar hash = shortcuts.getHash(command);\r\n\r\n\t\treturn this._handlers[hash];\r\n\t},\r\n\r\n\tdoAction: function(command, e){\r\n\t\tvar handler = this.findHandler(command);\r\n\t\tif(handler){\r\n\t\t\thandler.call(this, e);\r\n\r\n\t\t\tif (e.preventDefault) e.preventDefault();\r\n\t\t\telse e.returnValue = false;\r\n\r\n\t\t}\r\n\t},\r\n\tbind: function(shortcut, handler){\r\n\t\tif(!this._handlers) this._handlers = {};\r\n\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\r\n\t\tvar commands = shortcuts.parse(shortcut);\r\n\t\tfor(var i = 0; i < commands.length; i++){\r\n\t\t\tthis._handlers[shortcuts.getHash(commands[i])] = handler;\r\n\t\t}\r\n\t},\r\n\tunbind: function(shortcut){\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\r\n\t\tvar commands = shortcuts.parse(shortcut);\r\n\t\tfor(var i = 0; i < commands.length; i++){\r\n\t\t\tif(this._handlers[shortcuts.getHash(commands[i])]){\r\n\t\t\t\tdelete this._handlers[shortcuts.getHash(commands[i])];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tbindAll: function(map){\r\n\t\tfor(var i in map){\r\n\t\t\tthis.bind(i, map[i]);\r\n\t\t}\r\n\t},\r\n\tinitKeys: function(){\r\n\t\tif(!this._handlers)\r\n\t\t\tthis._handlers = {};\r\n\t\tif(this.keys){\r\n\t\t\tthis.bindAll(this.keys);\r\n\t\t}\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n(function(){\r\n\tscheduler.$keyboardNavigation.getFocusableNodes = scheduler._getFocusableNodes;\r\n\r\n\tscheduler.$keyboardNavigation.trapFocus = function trapFocus(root, e){\r\n\t\tif(e.keyCode != 9) return false;\r\n\r\n\t\tvar focusable = scheduler.$keyboardNavigation.getFocusableNodes(root);\r\n\t\tvar currentFocus = document.activeElement;\r\n\t\tvar currentIndex = -1;\r\n\t\tfor(var i = 0; i < focusable.length; i++){\r\n\t\t\tif(focusable[i] == currentFocus){\r\n\t\t\t\tcurrentIndex = i;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar nextIndex, nextItem;\r\n\t\tif(e.shiftKey){\r\n\r\n\t\t\t// back tab\r\n\t\t\t// go to the last element if we focused on the first\r\n\t\t\tnextIndex = (currentIndex <= 0) ? (focusable.length - 1) : (currentIndex - 1);\r\n\r\n\t\t\tnextItem = focusable[nextIndex];\r\n\t\t\tif(nextItem){\r\n\t\t\t\tnextItem.focus();\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\t// forward tab\r\n\t\t\t// forward tab from last element should go back to the first element\r\n\t\t\tnextIndex = (currentIndex >= focusable.length - 1) ? 0 : (currentIndex + 1);\r\n\t\t\tnextItem = focusable[nextIndex];\r\n\t\t\tif(nextItem){\r\n\t\t\t\tnextItem.focus();\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t};\r\n})();\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.marker = {\r\n\tclear: function(){\r\n\t\tvar divs = scheduler.$container.querySelectorAll(\".dhx_focus_slot\");\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tdivs[i].parentNode.removeChild(divs[i]);\r\n\t\t}\r\n\t},\r\n\tcreateElement: function(){\r\n\t\tvar element = document.createElement(\"div\");\r\n\t\telement.setAttribute(\"tabindex\", -1);\r\n\t\telement.className = \"dhx_focus_slot\";\r\n\t\treturn element;\r\n\t},\r\n\r\n\trenderMultiple: function(start, end, method){\r\n\t\tvar divs = [];\r\n\t\tvar currentStart = new Date(start);\r\n\t\tvar currentEnd = new Date(Math.min(end.valueOf(), scheduler.date.add(scheduler.date.day_start(new Date(start)), 1, \"day\").valueOf()));\r\n\t\twhile(currentStart.valueOf() < end.valueOf()){\r\n\r\n\t\t\tdivs = divs.concat(method.call(this, currentStart, new Date(Math.min(currentEnd.valueOf(), end.valueOf()))));\r\n\t\t\tcurrentStart = scheduler.date.day_start(scheduler.date.add(currentStart, 1, \"day\"));\r\n\r\n\t\t\tcurrentEnd = scheduler.date.day_start(scheduler.date.add(currentStart, 1, \"day\"));\r\n\t\t\tcurrentEnd = new Date(Math.min(currentEnd.valueOf(), end.valueOf()));\r\n\t\t}\r\n\r\n\t\treturn divs;\r\n\t},\r\n\r\n\r\n\trender: function(start, end, section){\r\n\t\tthis.clear();\r\n\t\tvar divs = [];\r\n\r\n\t\tvar modes = scheduler.$keyboardNavigation.TimeSlot.prototype._modes;\r\n\t\tvar view = scheduler.$keyboardNavigation.TimeSlot.prototype._getMode();\r\n\t\tswitch (view){\r\n\t\t\tcase modes.units:\r\n\t\t\t\tdivs = this.renderVerticalMarker(start, end, section);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.timeline:\r\n\t\t\t\tdivs = this.renderTimelineMarker(start, end, section);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.year:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderYearMarker));\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.month:\r\n\t\t\t\tdivs = this.renderMonthMarker(start, end);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.weekAgenda:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderWeekAgendaMarker));\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.list:\r\n\t\t\t\tdivs = this.renderAgendaMarker(start, end);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.dayColumns:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderVerticalMarker));\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tthis.addWaiAriaLabel(divs, start, end, section);\r\n\t\tthis.addDataAttributes(divs, start, end, section);\r\n\r\n\t\tfor(var i = divs.length - 1; i >= 0; i--){\r\n\t\t\tif(divs[i].offsetWidth){\r\n\t\t\t\treturn divs[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t},\r\n\r\n\taddDataAttributes: function(divs, start, end, section){\r\n\t\tvar dateToStr = scheduler.date.date_to_str(scheduler.config.api_date);\r\n\r\n\t\tvar from = dateToStr(start),\r\n\t\t\tto = dateToStr(end);\r\n\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tdivs[i].setAttribute(\"data-start-date\", from);\r\n\t\t\tdivs[i].setAttribute(\"data-end-date\", to);\r\n\t\t\tif(section){\r\n\t\t\t\tdivs[i].setAttribute(\"data-section\", section);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\taddWaiAriaLabel: function(divs, start, end, section){\r\n\t\tvar label = \"\";\r\n\t\tvar state = scheduler.getState();\r\n\t\tvar mode = state.mode;\r\n\r\n\t\tvar dateTimeLabel = false;\r\n\r\n\t\tlabel += scheduler.templates.day_date(start);\r\n\r\n\t\tif((scheduler.date.day_start(new Date(start)).valueOf() != start.valueOf())){\r\n\t\t\tlabel += \" \" + scheduler.templates.hour_scale(start);\r\n\t\t\tdateTimeLabel = true;\r\n\t\t}\r\n\r\n\t\tif((scheduler.date.day_start(new Date(start)).valueOf() != scheduler.date.day_start(new Date(end)).valueOf())){\r\n\r\n\t\t\tlabel += \" - \" + scheduler.templates.day_date(end);\r\n\t\t\tif(dateTimeLabel || (scheduler.date.day_start(new Date(end)).valueOf() != end.valueOf())){\r\n\t\t\t\tlabel += \" \" + scheduler.templates.hour_scale(end);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(section){\r\n\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\t\t\t\tconst timeline = scheduler.matrix[mode];\r\n\t\t\t\tconst sectionObject = timeline.y_unit[timeline.order[section]];\r\n\t\t\t\tlabel += \", \" + scheduler.templates[mode + \"_scale_label\"](sectionObject.key, sectionObject.label, sectionObject);\r\n\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\tconst units = scheduler._props[mode];\r\n\t\t\t\tconst sectionObject = units.options[units.order[section]];\r\n\r\n\t\t\t\tlabel += \", \" + scheduler.templates[mode + \"_scale_text\"](sectionObject.key, sectionObject.label, sectionObject);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tscheduler._waiAria.setAttributes(divs[i], {\r\n\t\t\t\t\"aria-label\": label,\r\n\t\t\t\t\"aria-live\": \"polite\"\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\r\n\trenderWeekAgendaMarker: function(start_date, end_date){\r\n\t\tvar divs = scheduler.$container.querySelectorAll(\".dhx_wa_day_cont .dhx_wa_scale_bar\");\r\n\r\n\t\tvar currDate = scheduler.date.week_start(new Date(scheduler.getState().min_date));\r\n\r\n\t\tvar index = -1;\r\n\t\tvar markerDate = scheduler.date.day_start(new Date(start_date));\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tindex++;\r\n\t\t\tif(scheduler.date.day_start(new Date(currDate)).valueOf() == markerDate.valueOf()){\r\n\t\t\t\tbreak;\r\n\t\t\t}else{\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(index != -1) return this._wrapDiv(divs[index]);\r\n\t\treturn [];\r\n\t},\r\n\r\n\t_wrapDiv: function(cell){\r\n\t\tvar marker = this.createElement();\r\n\t\tmarker.style.top = cell.offsetTop + \"px\";\r\n\t\tmarker.style.left = cell.offsetLeft + \"px\";\r\n\t\tmarker.style.width = cell.offsetWidth + \"px\";\r\n\t\tmarker.style.height = cell.offsetHeight + \"px\";\r\n\t\tcell.appendChild(marker);\r\n\t\treturn [marker];\r\n\t},\r\n\trenderYearMarker: function(start_date, end_date){\r\n\t\tvar cell = scheduler._get_year_cell(start_date);\r\n\t\tcell.style.position = \"relative\";\r\n\t\tvar marker = this.createElement();\r\n\t\tmarker.style.top = \"0px\";\r\n\t\tmarker.style.left = \"0px\";\r\n\t\tmarker.style.width = \"100%\";\r\n\t\tmarker.style.height = \"100%\";\r\n\t\tcell.appendChild(marker);\r\n\t\treturn [marker];\r\n\t},\r\n\r\n\trenderAgendaMarker: function(start_date, end_date){\r\n\t\tvar block = this.createElement();\r\n\t\tblock.style.height = \"1px\";\r\n\t\tblock.style.width = \"100%\";\r\n\t\tblock.style.opacity = 1;\r\n\t\tblock.style.top = \"0px\";\r\n\t\tblock.style.left = \"0px\";\r\n\t\tscheduler.$container.querySelector(\".dhx_cal_data\").appendChild(block);\r\n\t\treturn [block];\r\n\t},\r\n\r\n\trenderTimelineMarker: function(start_date, end_date, section){\r\n\t\tvar view_opts = scheduler._lame_copy({}, scheduler.matrix[scheduler._mode]);\r\n\t\tvar areas = view_opts._scales;\r\n\t\t//timespans must always use actual position, not rounded\r\n\t\tview_opts.round_position = false;\r\n\t\tvar blocks = [];\r\n\r\n\t\tvar min_date = start_date ? new Date(start_date) : scheduler._min_date;\r\n\t\tvar max_date = end_date ? new Date(end_date) : scheduler._max_date;\r\n\r\n\t\tif(min_date.valueOf() < scheduler._min_date.valueOf())\r\n\t\t\tmin_date = new Date(scheduler._min_date);\r\n\t\tif(max_date.valueOf() > scheduler._max_date.valueOf())\r\n\t\t\tmax_date = new Date(scheduler._max_date);\r\n\r\n\t\tif(!view_opts._trace_x) return blocks;\r\n\r\n\t\tfor(var i = 0; i < view_opts._trace_x.length; i++){\r\n\t\t\tif(scheduler._is_column_visible(view_opts._trace_x[i]))\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\tif(i == view_opts._trace_x.length)\r\n\t\t\treturn blocks;\r\n\r\n\t\tvar area = areas[section];\r\n\r\n\t\tif (!(min_date < end_date && max_date > start_date))\r\n\t\t\treturn blocks;\r\n\r\n\t\tvar block = this.createElement();\r\n\r\n\t\tlet start_pos;\r\n\t\tlet end_pos;\r\n\r\n\t\tfunction set_date_part(source, target) {\r\n\t\t\t// reset to start of the month in order to prevent month change when target is on 31th day, and source month has only 30 days\r\n\t\t\ttarget.setDate(1);\r\n\r\n\t\t\ttarget.setFullYear(source.getFullYear());\r\n\t\t\ttarget.setMonth(source.getMonth());\r\n\t\t\ttarget.setDate(source.getDate());\r\n\t\t}\r\n\r\n\t\tif(!scheduler.getView().days){\r\n\t\t\tstart_pos = scheduler._timeline_getX({start_date: start_date}, false, view_opts);\r\n\t\t\tend_pos = scheduler._timeline_getX({start_date: end_date}, false, view_opts);\r\n\t\t}else{\r\n\t\t\t// daytimeline\r\n\t\t\tconst tempStart = new Date(start_date);\r\n\t\t\tset_date_part(scheduler._min_date, tempStart);\r\n\t\t\tconst tempEnd = new Date(end_date);\r\n\t\t\tset_date_part(scheduler._min_date, tempEnd);\r\n\t\t\tstart_pos = scheduler._timeline_getX({start_date: tempStart}, false, view_opts);\r\n\t\t\tend_pos = scheduler._timeline_getX({start_date: tempEnd}, false, view_opts);\r\n\t\t}\r\n\r\n\t\tvar height = ((view_opts._section_height[section]-1) || (view_opts.dy - 1));\r\n\r\n\t\tvar top = 0;\r\n\t\tif (scheduler._isRender('cell')){\r\n\t\t\ttop = area.offsetTop;\r\n\t\t\tstart_pos += view_opts.dx;\r\n\t\t\tend_pos += view_opts.dx;\r\n\t\t\tarea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t}else{\r\n\r\n\t\t}\r\n\t\tvar width = Math.max(1, end_pos - start_pos - 1);\r\n\t\tlet direction = \"left\";\r\n\t\tif(scheduler.config.rtl){\r\n\t\t\tdirection = \"right\";\r\n\t\t}\r\n\t\tblock.style.cssText = `height:${height}px; ${direction}:${start_pos}px; width:${width}px; top:${top}px;`;\r\n\r\n\t\tif(area){\r\n\t\t\tarea.appendChild(block);\r\n\t\t\tblocks.push(block);\r\n\t\t}\r\n\r\n\t\treturn blocks;\r\n\t},\r\n\r\n\trenderMonthCell: function(date){\r\n\t\tvar cells = scheduler.$container.querySelectorAll(\".dhx_month_head\");\r\n\r\n\t\tvar divs = [];\r\n\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\tdivs.push(cells[i].parentNode);\r\n\t\t}\r\n\r\n\t\tvar firstDate = scheduler.date.week_start(new Date(scheduler.getState().min_date));\r\n\r\n\t\tvar index = -1;\r\n\t\tvar weekNumber = 0;\r\n\t\tvar dayIndex = -1;\r\n\t\tvar currDate = firstDate;\r\n\t\tvar markerDate = scheduler.date.day_start(new Date(date));\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tindex++;\r\n\r\n\t\t\tif(dayIndex == 6){\r\n\t\t\t\tweekNumber++;\r\n\t\t\t\tdayIndex = 0;\r\n\t\t\t}else{\r\n\t\t\t\tdayIndex++;\r\n\t\t\t}\r\n\r\n\t\t\tif(scheduler.date.day_start(new Date(currDate)).valueOf() == markerDate.valueOf()){\r\n\t\t\t\tbreak;\r\n\t\t\t}else{\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(index == -1){\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tvar left = scheduler._colsS[dayIndex];\r\n\t\tvar top = scheduler._colsS.heights[weekNumber];\r\n\r\n\t\tvar div = this.createElement();\r\n\t\tdiv.style.top = top + \"px\";\r\n\t\tdiv.style.left = left + \"px\";\r\n\t\tdiv.style.width = scheduler._cols[dayIndex] + \"px\";\r\n\t\tdiv.style.height = ((scheduler._colsS.heights[weekNumber + 1] - top) || scheduler._colsS.height) + \"px\" ;\r\n\r\n\r\n\t\tvar container = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\r\n\t\tvar datatable = container.querySelector(\".dhx_cal_month_table\");\r\n\t\tif(datatable.nextSibling){\r\n\t\t\tcontainer.insertBefore(div, datatable.nextSibling);\r\n\t\t}else{\r\n\t\t\tcontainer.appendChild(div);\r\n\t\t}\r\n\t\treturn div;\r\n\t},\r\n\trenderMonthMarker: function(start_date, end_date){\r\n\t\tvar res = [];\r\n\t\tvar currentDate = start_date;\r\n\t\twhile(currentDate.valueOf() < end_date.valueOf()){\r\n\t\t\tres.push(this.renderMonthCell(currentDate));\r\n\t\t\tcurrentDate = scheduler.date.add(currentDate, 1, \"day\");\r\n\t\t}\r\n\t\treturn res;\r\n\t},\r\n\r\n\trenderVerticalMarker: function(start_date, end_date, section){\r\n\t\tvar index = scheduler.locate_holder_day(start_date);\r\n\r\n\t\tvar divs = [];\r\n\t\tvar area = null;\r\n\r\n\t\tvar c = scheduler.config;\r\n\t\tif(scheduler._ignores[index]) return divs;\r\n\r\n\t\tif (scheduler._props && scheduler._props[scheduler._mode] && section) {\r\n\t\t\tvar view = scheduler._props[scheduler._mode];\r\n\t\t\tindex = view.order[section];\r\n\r\n\t\t\tvar inner_index = view.order[section];\r\n\t\t\tif(!(view.days > 1)){\r\n\t\t\t\tindex = inner_index;\r\n\t\t\t\tif (view.size && (index > view.position+view.size)) {\r\n\t\t\t\t\tindex = 0;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t//var units_l = view.size || view.options.length;\r\n\r\n\t\t\t\tindex = scheduler.locate_holder_day(start_date) + inner_index;\r\n\t\t\t\t//index = index*units_l + inner_index;\r\n\t\t\t}\r\n\t\t}\r\n\t\tarea = scheduler.locate_holder(index);\r\n\t\tif(!area || area.querySelector(\".dhx_scale_hour\")){\r\n\t\t\t// hour scale instead of date column\r\n\t\t\treturn document.createElement(\"div\");\r\n\t\t}\r\n\r\n\t\tvar start = Math.max((start_date.getHours()*60 + start_date.getMinutes()), c.first_hour*60);\r\n\r\n\r\n\t\tvar end = Math.min((end_date.getHours()*60 + end_date.getMinutes()), c.last_hour*60);\r\n\t\tif(!end && (scheduler.date.day_start(new Date(end_date)).valueOf() > scheduler.date.day_start(new Date(start_date)).valueOf())){\r\n\t\t\tend = c.last_hour*60;\r\n\t\t}\r\n\r\n\t\tif (end <= start) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tvar block = this.createElement();\r\n\r\n\t\t// +1 for working with section which really takes up whole height (as % would be == 0)\r\n\t\tvar all_hours_height = scheduler.config.hour_size_px*c.last_hour + 1;\r\n\t\tvar hour_ms = 60*60*1000;\r\n\t\tblock.style.top = (Math.round((start*60*1000-scheduler.config.first_hour*hour_ms)*scheduler.config.hour_size_px/hour_ms) % all_hours_height) + \"px\";\r\n\t\tblock.style.lineHeight = block.style.height = Math.max((Math.round(((end-start)*60*1000)*scheduler.config.hour_size_px/hour_ms)) % all_hours_height, 1)+\"px\";\r\n\t\tblock.style.width = \"100%\";\r\n\t\tarea.appendChild(block);\r\n\t\tdivs.push(block);\r\n\t\treturn divs[0];\r\n\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode = function(){};\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.EventHandler,\r\n\t{\r\n\t\tgetDefaultNode: function(){\r\n\t\t\tvar node = new scheduler.$keyboardNavigation.TimeSlot();\r\n\r\n\t\t\tif(!node.isValid()){\r\n\t\t\t\tnode = node.fallback();\r\n\t\t\t}\r\n\t\t\treturn node;\r\n\t\t},\r\n\r\n\t\t_modes:{\r\n\t\t\tmonth: \"month\",\r\n\t\t\tyear: \"year\",\r\n\t\t\tdayColumns: \"dayColumns\",\r\n\t\t\ttimeline:\"timeline\",\r\n\t\t\tunits:\"units\",\r\n\t\t\tweekAgenda: \"weekAgenda\",\r\n\t\t\tlist: \"list\"\r\n\t\t},\r\n\t\tgetMode: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tvar mode = state.mode;\r\n\t\t\tif((scheduler.matrix && scheduler.matrix[mode])){\r\n\t\t\t\treturn this._modes.timeline;\r\n\t\t\t} else if((scheduler._props && scheduler._props[mode])){\r\n\t\t\t\treturn this._modes.units;\r\n\t\t\t}else if(mode == \"month\"){\r\n\t\t\t\treturn this._modes.month;\r\n\t\t\t}else if(mode == \"year\"){\r\n\t\t\t\treturn this._modes.year;\r\n\t\t\t}else if(mode == \"week_agenda\"){\r\n\t\t\t\treturn this._modes.weekAgenda;\r\n\t\t\t}else if(mode == \"map\" || mode == \"agenda\" || (scheduler._grid && scheduler[\"grid_\" + mode])){\r\n\t\t\t\treturn this._modes.list;\r\n\t\t\t}else{\r\n\t\t\t\treturn this._modes.dayColumns;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.focus();\r\n\t\t},\r\n\r\n\t\tblur: function(){\r\n\r\n\t\t},\r\n\r\n\t\tdisable: function(){\r\n\t\t\tscheduler.$container.setAttribute(\"tabindex\", \"0\");\r\n\t\t},\r\n\t\tenable: function(){\r\n\t\t\tif(scheduler.$container)\r\n\t\t\t\tscheduler.$container.removeAttribute(\"tabindex\");\r\n\t\t},\r\n\t\tisEnabled: function(){\r\n\t\t\treturn scheduler.$container.hasAttribute(\"tabindex\");\r\n\t\t},\r\n\r\n\r\n\t\t_compareEvents: function(a, b){\r\n\t\t\tif (a.start_date.valueOf() == b.start_date.valueOf())\r\n\t\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\t\treturn a.start_date.valueOf() > b.start_date.valueOf() ? 1 : -1;\r\n\t\t},\r\n\r\n\t\t_pickEvent: function(from, to, startId, reverse){\r\n\t\t\tvar range = scheduler.getState();\r\n\t\t\tfrom = new Date(Math.max(range.min_date.valueOf(), from.valueOf()));\r\n\t\t\tto = new Date(Math.min(range.max_date.valueOf(), to.valueOf()));\r\n\r\n\t\t\tvar evs = scheduler.getEvents(from, to);\r\n\t\t\tevs.sort(this._compareEvents);\r\n\t\t\tif(reverse){\r\n\t\t\t\tevs = evs.reverse();\r\n\t\t\t}\r\n\r\n\t\t\tvar trim = !!startId;\r\n\t\t\tfor(var i =0; i < evs.length && trim; i++){\r\n\t\t\t\tif(evs[i].id == startId){\r\n\t\t\t\t\ttrim = false;\r\n\t\t\t\t}\r\n\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\r\n\t\t\tfor(var i = 0; i < evs.length; i++){\r\n\t\t\t\tvar eventElement = new scheduler.$keyboardNavigation.Event(evs[i].id);\r\n\t\t\t\tif(eventElement.getNode())\r\n\t\t\t\t\treturn evs[i];\r\n\t\t\t}\r\n\r\n\t\t\treturn null;\r\n\t\t},\r\n\r\n\t\tnextEventHandler: function(id){\r\n\t\t\tvar activeNode = scheduler.$keyboardNavigation.dispatcher.activeNode;\r\n\r\n\t\t\tvar startId = id || (activeNode && activeNode.eventId);\r\n\r\n\t\t\tvar nextEvent = null;\r\n\t\t\tif(startId && scheduler.getEvent(startId)){\r\n\t\t\t\tvar currEvent = scheduler.getEvent(startId);\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tcurrEvent.start_date,\r\n\t\t\t\t\tscheduler.date.add(currEvent.start_date, 1, \"year\"),\r\n\t\t\t\t\tcurrEvent.id,\r\n\t\t\t\t\tfalse\r\n\t\t\t\t);\r\n\r\n\t\t\t}\r\n\t\t\tif(!nextEvent && !id){\r\n\t\t\t\tvar visibleDates = scheduler.getState();\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tvisibleDates.min_date,\r\n\t\t\t\t\tscheduler.date.add(visibleDates.min_date, 1, \"year\"),\r\n\t\t\t\t\tnull,\r\n\t\t\t\t\tfalse\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tif(nextEvent){\r\n\r\n\t\t\t\tvar nextEv = new scheduler.$keyboardNavigation.Event(nextEvent.id);\r\n\t\t\t\tif(!nextEv.isValid()){// not visible event\r\n\t\t\t\t\tthis.nextEventHandler(nextEvent.id);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(activeNode){activeNode.blur();}\r\n\t\t\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(nextEv);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tprevEventHandler: function(id){\r\n\t\t\tvar activeNode = scheduler.$keyboardNavigation.dispatcher.activeNode;\r\n\r\n\t\t\tvar startId = id || (activeNode && activeNode.eventId);\r\n\r\n\t\t\tvar nextEvent = null;\r\n\t\t\tif(startId && scheduler.getEvent(startId)){\r\n\t\t\t\tvar currEvent = scheduler.getEvent(startId);\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tscheduler.date.add(currEvent.end_date, -1, \"year\"),\r\n\t\t\t\t\tcurrEvent.end_date,\r\n\t\t\t\t\tcurrEvent.id,\r\n\t\t\t\t\ttrue\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t\tif(!nextEvent && !id){\r\n\t\t\t\tvar visibleDates = scheduler.getState();\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tscheduler.date.add(visibleDates.max_date, -1, \"year\"),\r\n\t\t\t\t\tvisibleDates.max_date,\r\n\t\t\t\t\tnull,\r\n\t\t\t\t\ttrue\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tif(nextEvent){\r\n\t\t\t\tvar nextEv = new scheduler.$keyboardNavigation.Event(nextEvent.id);\r\n\t\t\t\tif(!nextEv.isValid()){// not visible event\r\n\t\t\t\t\tthis.prevEventHandler(nextEvent.id);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(activeNode){activeNode.blur();}\r\n\t\t\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(nextEv);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\r\n\t\t\t\"alt+1, alt+2, alt+3, alt+4, alt+5, alt+6, alt+7, alt+8, alt+9\": function(e){\r\n\t\t\t\tvar tabs = scheduler.$keyboardNavigation.HeaderCell.prototype.getNodes(\".dhx_cal_navline .dhx_cal_tab\");\r\n\t\t\t\tvar key = e.key;\r\n\t\t\t\tif(key === undefined){\r\n\t\t\t\t\tkey = e.keyCode - 48;\r\n\t\t\t\t}\r\n\t\t\t\tif(tabs[key*1 - 1]){\r\n\t\t\t\t\ttabs[key*1 - 1].click();\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+left,meta+left\": function(e){\r\n\t\t\t\tscheduler._click.dhx_cal_prev_button();\r\n\t\t\t},\r\n\t\t\t\"ctrl+right,meta+right\": function(e){\r\n\t\t\t\tscheduler._click.dhx_cal_next_button();\r\n\t\t\t},\r\n\t\t\t\"ctrl+up,meta+up\":function(e){\r\n\t\t\t\tvar dataArea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tdataArea.scrollTop -= 20;\r\n\t\t\t},\r\n\t\t\t\"ctrl+down,meta+down\": function(e){\r\n\t\t\t\tvar dataArea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tdataArea.scrollTop += 20;\r\n\t\t\t},\r\n\r\n\r\n\t\t\t\"e\": function(){\r\n\t\t\t\tthis.nextEventHandler();\r\n\t\t\t},\r\n\r\n\t\t\t\"home\": function(){\r\n\t\t\t\tscheduler.setCurrentView(new Date());\r\n\t\t\t},\r\n\r\n\t\t\t\"shift+e\": function(){\r\n\t\t\t\tthis.prevEventHandler();\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+enter,meta+enter\": function(){\r\n\t\t\t\tscheduler.addEventNow({start_date: new Date(scheduler.getState().date)});\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+c,meta+c\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t},\r\n\t\t\t\"ctrl+v,meta+v\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t},\r\n\t\t\t\"ctrl+x,meta+x\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode.prototype.bindAll(scheduler.$keyboardNavigation.SchedulerNode.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.KeyNavNode = function(){};\r\n\r\nscheduler.$keyboardNavigation.KeyNavNode.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.EventHandler,\r\n\t{\r\n\t\tisValid: function(){\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\treturn null;\r\n\t\t},\r\n\r\n\t\tmoveTo: function (element) {\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(element);\r\n\t\t},\r\n\r\n\t\tcompareTo: function(b){\r\n\t\t\t// good enough comparison of two random objects\r\n\t\t\tif(!b) return false;\r\n\t\t\tfor(var i in this){\r\n\t\t\t\tif(!!this[i] != !!b[i]) return false;\r\n\r\n\t\t\t\tvar canStringifyThis = !!(this[i] && this[i].toString);\r\n\t\t\t\tvar canStringifyThat = !!(b[i] && b[i].toString);\r\n\t\t\t\tif(canStringifyThat != canStringifyThis) return false;\r\n\t\t\t\tif(!(canStringifyThat && canStringifyThis)) {\r\n\t\t\t\t\tif(b[i] != this[i]) return false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(b[i].toString() != this[i].toString())\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\r\n\t\tgetNode: function(){},\r\n\t\tfocus: function(){\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif(node){\r\n\t\t\t\tnode.setAttribute(\"tabindex\", \"-1\");\r\n\t\t\t\t//node.className += \" scheduler_focused\";\r\n\t\t\t\tif(node.focus) node.focus();\r\n\t\t\t}\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif(node){\r\n\t\t\t\tnode.setAttribute(\"tabindex\", \"-1\");\r\n\t\t\t\t//node.className = (node.className || \"\").replace(/ ?scheduler_focused/g, \"\");\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.HeaderCell = function(index){\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.HeaderCell.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\tgetNode: function(index){\r\n\t\t\tindex = index || this.index || 0;\r\n\t\t\tvar nodes = this.getNodes();\r\n\t\t\tif(nodes[index]) return nodes[index];\r\n\t\t},\r\n\r\n\t\tgetNodes: function(selector){\r\n\t\t\tselector = selector || [\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_prev_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_next_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_today_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_tab\"\r\n\t\t\t\t].join(\", \");\r\n\r\n\t\t\tvar nodes = Array.prototype.slice.call(scheduler.$container.querySelectorAll(selector));\r\n\t\t\tnodes.sort(function(a, b){\r\n\t\t\t\treturn a.offsetLeft - b.offsetLeft;\r\n\t\t\t});\r\n\t\t\treturn nodes;\r\n\t\t},\r\n\r\n\t\t_handlers:null,\r\n\r\n\t\tisValid: function(){\r\n\t\t\treturn !!this.getNode(this.index);\r\n\t\t},\r\n\t\tfallback:function(){\r\n\t\t\tvar defaultCell = this.getNode(0);\r\n\t\t\tif(!defaultCell){\r\n\t\t\t\tdefaultCell = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}\r\n\t\t\treturn defaultCell;\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tvar newIndex = this.index - 1;\r\n\t\t\t\tif(newIndex < 0){\r\n\t\t\t\t\tnewIndex = this.getNodes().length - 1;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.HeaderCell(newIndex));\r\n\r\n\t\t\t},\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tvar newIndex = this.index + 1;\r\n\t\t\t\tif(newIndex >= this.getNodes().length){\r\n\t\t\t\t\tnewIndex = 0;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.HeaderCell(newIndex));\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t},\r\n\r\n\t\t\t\"enter\": function(){\r\n\t\t\t\tvar node = this.getNode();\r\n\t\t\t\tif(node){\r\n\t\t\t\t\tnode.click();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.HeaderCell.prototype.bindAll(scheduler.$keyboardNavigation.HeaderCell.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.Event = function(id){\r\n\tthis.eventId = null;\r\n\tif(scheduler.getEvent(id)){\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tthis.start = new Date(ev.start_date);\r\n\t\tthis.end = new Date(ev.end_date);\r\n\r\n\t\tthis.section = this._getSection(ev);\r\n\t\tthis.eventId = id;\r\n\t}\r\n};\r\n\r\nscheduler.$keyboardNavigation.Event.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\t_getNodes: function(){\r\n\t\t\treturn Array.prototype.slice.call(scheduler.$container.querySelectorAll(\"[\"+scheduler.config.event_attribute+\"]\"));\r\n\t\t},\r\n\r\n\t\t_modes: scheduler.$keyboardNavigation.SchedulerNode.prototype._modes,\r\n\r\n\t\tgetMode: scheduler.$keyboardNavigation.SchedulerNode.prototype.getMode,\r\n\r\n\t\t_handlers: null,\r\n\t\tisValid: function(){\r\n\t\t\treturn !!(scheduler.getEvent(this.eventId) && this.getNode());\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\tvar eventNode = this._getNodes()[0];\r\n\t\t\tvar defaultElement = null;\r\n\t\t\tif(!eventNode || !(scheduler._locate_event(eventNode))){\r\n\t\t\t\tdefaultElement = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}else{\r\n\t\t\t\tvar id = scheduler._locate_event(eventNode);\r\n\t\t\t\tdefaultElement = new scheduler.$keyboardNavigation.Event(id);\r\n\t\t\t}\r\n\r\n\t\t\treturn defaultElement;\r\n\t\t},\r\n\r\n\t\tisScrolledIntoView: function (el) {\r\n\t\t\tvar eventBox = el.getBoundingClientRect();\r\n\t\t\tvar viewPort = scheduler.$container.querySelector(\".dhx_cal_data\").getBoundingClientRect();\r\n\t\t\t\r\n\t\t\tif(eventBox.bottom < viewPort.top || eventBox.top > viewPort.bottom){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\r\n\t\tgetNode: function(){\r\n\r\n\t\t\tvar idSelector = \"[\"+scheduler.config.event_attribute+\"='\"+this.eventId+\"']\";\r\n\r\n\t\t\tvar inlineEditor = scheduler.$keyboardNavigation.dispatcher.getInlineEditor(this.eventId);\r\n\t\t\tif(inlineEditor){// is inline editor visible\r\n\t\t\t\treturn inlineEditor;\r\n\t\t\t}else{\r\n\t\t\t\tif(scheduler.isMultisectionEvent && scheduler.isMultisectionEvent(scheduler.getEvent(this.eventId))){\r\n\t\t\t\t\tvar nodes = scheduler.$container.querySelectorAll(idSelector);\r\n\t\t\t\t\tfor(var i = 0; i < nodes.length; i++){\r\n\t\t\t\t\t\tif(this.isScrolledIntoView(nodes[i])){\r\n\t\t\t\t\t\t\treturn nodes[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn nodes[0];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn scheduler.$container.querySelector(idSelector);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tvar event = scheduler.getEvent(this.eventId);\r\n\r\n\t\t\tvar calendar = scheduler.getState();\r\n\t\t\tif(event.start_date.valueOf() > calendar.max_date.valueOf() || event.end_date.valueOf() <= calendar.min_date.valueOf()){\r\n\t\t\t\tscheduler.setCurrentView(event.start_date);\r\n\t\t\t}\r\n\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif (this.isScrolledIntoView(node)) {\r\n\t\t\t\tscheduler.$keyboardNavigation.dispatcher.keepScrollPosition((function(){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\t\t}).bind(this));\r\n\t\t\t} else {\r\n\t\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\t}\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\r\n\r\n\t\t_getSection: function(ev){\r\n\t\t\tvar section = null;\r\n\t\t\tvar mode = scheduler.getState().mode;\r\n\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\t\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\t\tsection = ev[timeline.y_property];\r\n\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\tvar unit = scheduler._props[mode];\r\n\t\t\t\tsection = ev[unit.map_to];\r\n\t\t\t}\r\n\t\t\treturn section;\r\n\t\t},\r\n\t\t_moveToSlot: function(dir){\r\n\t\t\tvar ev = scheduler.getEvent(this.eventId);\r\n\t\t\tif(ev){\r\n\t\t\t\tvar section =this._getSection(ev);\r\n\t\t\t\tvar slot = new scheduler.$keyboardNavigation.TimeSlot(ev.start_date, null, section);\r\n\t\t\t\tthis.moveTo(slot.nextSlot(slot, dir));\r\n\t\t\t}else{\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tthis._moveToSlot(\"left\");\r\n\t\t\t},\r\n\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tthis._moveToSlot(\"right\");\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\t\t\t\tif(this.getMode() == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.nextEventHandler();\r\n\t\t\t\t}else {\r\n\t\t\t\t\tthis._moveToSlot(\"down\");\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"space\": function(){\r\n\t\t\t\tvar node = this.getNode();\r\n\t\t\t\tif(node && node.click){\r\n\t\t\t\t\tnode.click();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"up\": function () {\r\n\t\t\t\tif(this.getMode() == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.prevEventHandler();\r\n\t\t\t\t}else {\r\n\t\t\t\t\tthis._moveToSlot(\"up\");\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"delete\": function(){\r\n\t\t\t\tif(scheduler.getEvent(this.eventId)) {\r\n\t\t\t\t\tscheduler._click.buttons[\"delete\"](this.eventId);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t// open lightbox\r\n\t\t\t\"enter\": function () {\r\n\t\t\t\tif(scheduler.getEvent(this.eventId)) {\r\n\t\t\t\t\tscheduler.showLightbox(this.eventId);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\nscheduler.$keyboardNavigation.Event.prototype.bindAll(scheduler.$keyboardNavigation.Event.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.TimeSlot = function(from, to, section, movingDate){\r\n\tvar state = scheduler.getState();\r\n\tvar timeline = scheduler.matrix && scheduler.matrix[state.mode];\r\n\r\n\tif(!from){\r\n\t\tfrom = this.getDefaultDate();\r\n\t}\r\n\r\n\tif(!to){\r\n\r\n\t\tif(timeline){\r\n\t\t\tto = scheduler.date.add(from, timeline.x_step, timeline.x_unit);\r\n\t\t}else{\r\n\t\t\tto = scheduler.date.add(from, scheduler.config.key_nav_step, \"minute\");\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tthis.section = section || this._getDefaultSection();\r\n\tthis.start_date = new Date(from);\r\n\tthis.end_date = new Date(to);\r\n\tthis.movingDate = movingDate || null;\r\n};\r\n\r\nscheduler.$keyboardNavigation.TimeSlot.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\t_handlers:null,\r\n\r\n\t\tgetDefaultDate: function(){\r\n\t\t\tvar from;\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar visibleTime = new Date(state.date);\r\n\t\t\tvisibleTime.setSeconds(0);\r\n\t\t\tvisibleTime.setMilliseconds(0);\r\n\r\n\t\t\tvar nowTime = new Date();\r\n\t\t\tnowTime.setSeconds(0);\r\n\t\t\tnowTime.setMilliseconds(0);\r\n\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[state.mode];\r\n\t\t\tvar showNowTime = false;\r\n\t\t\tif(visibleTime.valueOf() === nowTime.valueOf()){\r\n\t\t\t\tshowNowTime = true;\r\n\t\t\t}\r\n\r\n\t\t\tif(timeline){\r\n\t\t\t\tif(showNowTime){\r\n\t\t\t\t\tif(timeline.x_unit === \"day\"){\r\n\t\t\t\t\t\tnowTime.setHours(0);\r\n\t\t\t\t\t\tnowTime.setMinutes(0);\r\n\t\t\t\t\t}else if(timeline.x_unit === \"hour\"){\r\n\t\t\t\t\t\tnowTime.setMinutes(0);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfrom = nowTime;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfrom = scheduler.date[timeline.name + \"_start\"](new Date(state.date));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfrom = this.findVisibleColumn(from);\r\n\t\t\t}else{\r\n\t\t\t\tfrom = new Date(scheduler.getState().min_date);\r\n\t\t\t\tif(showNowTime){\r\n\t\t\t\t\tfrom = nowTime;\r\n\t\t\t\t}\r\n\t\t\t\tfrom = this.findVisibleColumn(from);\r\n\t\t\t\tif(!showNowTime){\r\n\t\t\t\t\tfrom.setHours(scheduler.config.first_hour);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(!scheduler._table_view){\r\n\t\t\t\t\tvar dataContainer = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\t\tif(dataContainer.scrollTop){\r\n\t\t\t\t\t\tfrom.setHours(scheduler.config.first_hour + Math.ceil(dataContainer.scrollTop / scheduler.config.hour_size_px));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn from;\r\n\t\t},\r\n\r\n\t\tclone: function(timeslot){\r\n\t\t\treturn new scheduler.$keyboardNavigation.TimeSlot(timeslot.start_date, timeslot.end_date, timeslot.section, timeslot.movingDate);\r\n\t\t},\r\n\t\t_getMultisectionView: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view;\r\n\t\t\tif(scheduler._props && scheduler._props[state.mode]) {\r\n\t\t\t\tview = scheduler._props[state.mode];\r\n\t\t\t}else if(scheduler.matrix && scheduler.matrix[state.mode]){\r\n\t\t\t\tview = scheduler.matrix[state.mode];\r\n\t\t\t}\r\n\t\t\treturn view;\r\n\t\t},\r\n\r\n\t\t_getDefaultSection: function(){\r\n\t\t\tvar section = null;\r\n\t\t\tvar view = this._getMultisectionView();\r\n\t\t\tif(view && !section){\r\n\t\t\t\tsection = this._getNextSection();\r\n\t\t\t}\r\n\t\t\treturn section;\r\n\t\t},\r\n\r\n\t\t_getNextSection: function(sectionId, dir){\r\n\t\t\tvar view = this._getMultisectionView();\r\n\t\t\tvar currentIndex = view.order[sectionId];\r\n\t\t\tvar nextIndex = currentIndex;\r\n\t\t\tif(currentIndex !== undefined){\r\n\t\t\t\tnextIndex = currentIndex + dir;\r\n\t\t\t}else{\r\n\t\t\t\tnextIndex = (view.size && view.position) ? view.position : 0;\r\n\t\t\t}\r\n\r\n\t\t\tif(nextIndex < 0){\r\n\t\t\t\tnextIndex = 0;\r\n\t\t\t}\r\n\t\t\tvar options = view.options || view.y_unit;\r\n\r\n\t\t\tif(nextIndex >= options.length){\r\n\t\t\t\tnextIndex = options.length - 1;\r\n\t\t\t}\r\n\t\t\t//nextIndex = nextIndex < 0 ? nextIndex = (view.options || view.y_unit).length -1 : nextIndex;\r\n\r\n\t\t\tif(options[nextIndex]){\r\n\t\t\t\treturn options[nextIndex].key;\r\n\t\t\t}else{\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar isInRange = !(this.start_date.valueOf() < state.min_date.valueOf() || this.start_date.valueOf() >= state.max_date.valueOf());\r\n\r\n\t\t\tif(!isInRange) return false;\r\n\r\n\r\n\t\t\tif(!this.isVisible(this.start_date, this.end_date)) return false;\r\n\r\n\t\t\tvar view = this._getMultisectionView();\r\n\r\n\t\t\tif(view){\r\n\t\t\t\treturn (view.order[this.section] !== undefined);\r\n\t\t\t}else{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t},\r\n\r\n\t\tfallback:function(){\r\n\r\n\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(!defaultSlot.isValid()){\r\n\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t}else{\r\n\t\t\t\treturn defaultSlot;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tgetNodes: function(){\r\n\t\t\treturn Array.prototype.slice.call(scheduler.$container.querySelectorAll(\".dhx_focus_slot\"));\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\treturn this.getNodes()[0];\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tif(this.section && scheduler.getView() && scheduler.getView().smart_rendering && scheduler.getView().scrollTo && !scheduler.$container.querySelector(`[data-section-id=\"${this.section}\"]`)){\r\n\t\t\t\tscheduler.getView().scrollTo({section: this.section});\r\n\t\t\t}\r\n\t\t\tscheduler.$keyboardNavigation.marker.render(this.start_date, this.end_date, this.section);\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\tscheduler.$keyboardNavigation._pasteDate = this.start_date;\r\n\t\t\tscheduler.$keyboardNavigation._pasteSection = this.section;\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t\tscheduler.$keyboardNavigation.marker.clear();\r\n\t\t},\r\n\r\n\t\t_modes: scheduler.$keyboardNavigation.SchedulerNode.prototype._modes,\r\n\r\n\t\t_getMode: scheduler.$keyboardNavigation.SchedulerNode.prototype.getMode,\r\n\r\n\t\taddMonthDate: function(date, dir, extend){\r\n\t\t\tvar res;\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tres = scheduler.date.add(date, -1, \"week\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tres = scheduler.date.add(date, 1, \"week\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tres = scheduler.date.day_start(scheduler.date.add(date, -1, \"day\"));\r\n\t\t\t\t\tres = this.findVisibleColumn(res, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tres = scheduler.date.day_start(scheduler.date.add(date, 1, \"day\"));\r\n\t\t\t\t\tres = this.findVisibleColumn(res, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tres = scheduler.date.day_start(new Date(date));\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tif(date.valueOf() < state.min_date.valueOf() || (!extend && date.valueOf() >= state.max_date.valueOf())){\r\n\t\t\t\tres = new Date(state.min_date);\r\n\t\t\t}\r\n\r\n\t\t\treturn res;\r\n\t\t},\r\n\r\n\t\tnextMonthSlot: function(slot, dir, extend){\r\n\r\n\t\t\tvar start, end;\r\n\t\t\tstart = this.addMonthDate(slot.start_date, dir, extend);\r\n\r\n\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\tend = new Date(start);\r\n\t\t\tend.setHours(scheduler.config.last_hour);\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\r\n\t\t_alignTimeSlot: function(date, minDate, unit, step){\r\n\t\t\tvar currentDate = new Date(minDate);\r\n\t\t\twhile(currentDate.valueOf() < date.valueOf()){\r\n\t\t\t\tcurrentDate = scheduler.date.add(currentDate, step, unit);\r\n\t\t\t}\r\n\r\n\t\t\tif(currentDate.valueOf() > date.valueOf()){\r\n\t\t\t\tcurrentDate = scheduler.date.add(currentDate, -step, unit);\r\n\t\t\t}\r\n\r\n\t\t\treturn currentDate;\r\n\t\t},\r\n\r\n\t\tnextTimelineSlot: function(slot, dir, extend){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view = scheduler.matrix[state.mode];\r\n\r\n\t\t\tvar startDate = this._alignTimeSlot(slot.start_date, scheduler.date[view.name + \"_start\"](new Date(slot.start_date)), view.x_unit, view.x_step);\r\n\t\t\tvar endDate = this._alignTimeSlot(slot.end_date, scheduler.date[view.name + \"_start\"](new Date(slot.end_date)), view.x_unit, view.x_step);\r\n\r\n\t\t\tif(endDate.valueOf() <= startDate.valueOf()){\r\n\t\t\t\tendDate = scheduler.date.add(startDate, view.x_step, view.x_unit);\r\n\t\t\t}\r\n\t\t\tvar newPos = this.clone(slot);\r\n\t\t\tnewPos.start_date = startDate;\r\n\t\t\tnewPos.end_date = endDate;\r\n\t\t\tnewPos.section = slot.section || this._getNextSection();\r\n\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tnewPos.section = this._getNextSection(slot.section, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tnewPos.section = this._getNextSection(slot.section, +1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tnewPos.start_date = this.findVisibleColumn(scheduler.date.add(newPos.start_date, -view.x_step, view.x_unit), -1);\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tnewPos.start_date = this.findVisibleColumn(scheduler.date.add(newPos.start_date, view.x_step, view.x_unit), 1);\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(newPos.start_date.valueOf() < state.min_date.valueOf() || newPos.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tif(extend && newPos.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\t\tnewPos.start_date = new Date(state.max_date);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tnewPos.start_date = scheduler.date[state.mode + \"_start\"](scheduler.date.add(state.date, dir == \"left\" ? -1 : 1, state.mode));\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn newPos;\r\n\t\t},\r\n\r\n\t\tnextUnitsSlot: function(slot, dir, extend){\r\n\t\t\tvar newPos = this.clone(slot);\r\n\t\t\tnewPos.section = slot.section || this._getNextSection();\r\n\r\n\t\t\tvar section = slot.section || this._getNextSection();\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view = scheduler._props[state.mode];\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tsection = this._getNextSection(slot.section, -1);\r\n\t\t\t\t\tvar optionsCount = view.size ? (view.size - 1) : view.options.length;\r\n\r\n\t\t\t\t\tif(view.days > 1 && (view.order[section] == optionsCount - 1)){\r\n\t\t\t\t\t\tif(scheduler.date.add(slot.start_date, -1, \"day\").valueOf() >= state.min_date.valueOf()){\r\n\t\t\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tsection = this._getNextSection(slot.section, 1);\r\n\t\t\t\t\tif(view.days > 1 && !view.order[section]){\r\n\t\t\t\t\t\tif(scheduler.date.add(slot.start_date, 1, \"day\").valueOf() < state.max_date.valueOf()){\r\n\t\t\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\tsection = slot.section;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tnewPos.section = section;\r\n\t\t\treturn newPos;\r\n\t\t},\r\n\r\n\t\t_moveDate: function(oldDate, dir){\r\n\t\t\tvar newDate = this.findVisibleColumn(scheduler.date.add(oldDate, dir, \"day\"), dir);\r\n\t\t\tnewDate.setHours(oldDate.getHours());\r\n\t\t\tnewDate.setMinutes(oldDate.getMinutes());\r\n\t\t\treturn newDate;\r\n\t\t},\r\n\r\n\t\tisBeforeLastHour: function(date, isStartDate){\r\n\t\t\tvar minutes = date.getMinutes(),\r\n\t\t\t\thours = date.getHours(),\r\n\t\t\t\tlast_hour = scheduler.config.last_hour;\r\n\t\t\treturn (hours < last_hour || (!isStartDate && ((last_hour == 24 || hours == last_hour) && !minutes)));\r\n\t\t},\r\n\t\tisAfterFirstHour: function(date, isStartDate){\r\n\t\t\tvar minutes = date.getMinutes(),\r\n\t\t\t\thours = date.getHours(),\r\n\t\t\t\tfirst_hour = scheduler.config.first_hour,\r\n\t\t\t\tlast_hour = scheduler.config.last_hour;\r\n\t\t\treturn (hours >= first_hour || (!isStartDate && (!minutes && ((!hours && last_hour == 24) || (hours == last_hour)))));\r\n\t\t},\r\n\t\tisInVisibleDayTime: function(date, isStartDate){\r\n\t\t\treturn (this.isBeforeLastHour(date, isStartDate) && this.isAfterFirstHour(date, isStartDate));\r\n\t\t},\r\n\r\n\t\tnextDaySlot: function(slot, dir, extend){\r\n\t\t\tvar start, end;\r\n\r\n\t\t\tvar key_nav_step = scheduler.config.key_nav_step;\r\n\r\n\t\t\tvar date = this._alignTimeSlot(slot.start_date, scheduler.date.day_start(new Date(slot.start_date)), \"minute\", key_nav_step);\r\n\r\n\r\n\t\t\tvar oldStart = slot.start_date;\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tstart = scheduler.date.add(date, -key_nav_step, \"minute\");\r\n\r\n\t\t\t\t\tif(!this.isInVisibleDayTime(start, true)){\r\n\t\t\t\t\t\tif (!extend || this.isInVisibleDayTime(oldStart, true)) {\r\n\r\n\t\t\t\t\t\t\tvar toNextDay = true;\r\n\t\t\t\t\t\t\tif(extend && scheduler.date.date_part(new Date(start)).valueOf() != scheduler.date.date_part(new Date(oldStart)).valueOf())\r\n\t\t\t\t\t\t\t\ttoNextDay = false;\r\n\t\t\t\t\t\t\tif(toNextDay)\r\n\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, -1, \"day\"), -1);\r\n\r\n\t\t\t\t\t\t\tstart.setHours(scheduler.config.last_hour);\r\n\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\tstart = scheduler.date.add(start, -key_nav_step, \"minute\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tstart = scheduler.date.add(date, key_nav_step, \"minute\");\r\n\r\n\t\t\t\t\tvar testEnd = extend ? start : scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tif(!this.isInVisibleDayTime(testEnd, false)){\r\n\t\t\t\t\t\tif(!extend || this.isInVisibleDayTime(oldStart, false)) {\r\n\t\t\t\t\t\t\tif (!extend) {\r\n\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, 1, \"day\"), 1);\r\n\t\t\t\t\t\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tvar toNextDay = true;\r\n\t\t\t\t\t\t\t\tif (scheduler.date.date_part(new Date(oldStart)).valueOf() == oldStart.valueOf()) {\r\n\t\t\t\t\t\t\t\t\ttoNextDay = false;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (toNextDay) {\r\n\t\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, 1, \"day\"), 1);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\t\tstart = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tstart = this._moveDate(slot.start_date, -1);\r\n\t\t\t\t\tend = this._moveDate(slot.end_date, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tstart = this._moveDate(slot.start_date, 1);\r\n\t\t\t\t\tend = this._moveDate(slot.end_date, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tstart = date;\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\t\tnextWeekAgendaSlot: function(slot, dir){\r\n\t\t\tvar start, end;\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tstart = scheduler.date.day_start(scheduler.date.add(slot.start_date, -1, \"day\"));\r\n\t\t\t\t\tstart = this.findVisibleColumn(start, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tstart = scheduler.date.day_start(scheduler.date.add(slot.start_date, 1, \"day\"));\r\n\t\t\t\t\tstart = this.findVisibleColumn(start, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tstart = scheduler.date.day_start(slot.start_date);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif(slot.start_date.valueOf() < state.min_date.valueOf() || slot.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tstart = new Date(state.min_date);\r\n\r\n\t\t\t}\r\n\t\t\tend = new Date(start);\r\n\t\t\tend.setHours(scheduler.config.last_hour);\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\t\tnextAgendaSlot: function(slot, dir){\r\n\t\t\treturn {start_date: slot.start_date, end_date: slot.end_date};\r\n\t\t},\r\n\r\n\r\n\t\tisDateVisible: function(date){\r\n\t\t\tif(!scheduler._ignores_detected)\r\n\t\t\t\treturn true;\r\n\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[scheduler.getState().mode];\r\n\r\n\t\t\tvar index;\r\n\t\t\tif(timeline){\r\n\t\t\t\tindex = scheduler._get_date_index(timeline, date);\r\n\t\t\t}else{\r\n\t\t\t\tindex = scheduler.locate_holder_day(date);\r\n\t\t\t}\r\n\r\n\t\t\treturn !scheduler._ignores[index];\r\n\t\t},\r\n\r\n\t\tfindVisibleColumn: function(start, dir){\r\n\t\t\tvar date = start;\r\n\t\t\tdir = dir || 1;\r\n\t\t\tvar range = scheduler.getState();\r\n\r\n\t\t\twhile(!this.isDateVisible(date) && ((dir > 0 && date.valueOf() <= range.max_date.valueOf()) || (dir < 0 && date.valueOf() >= range.min_date.valueOf()))){\r\n\t\t\t\tdate = this.nextDateColumn(date, dir);\r\n\t\t\t}\r\n\r\n\t\t\treturn date;\r\n\t\t},\r\n\r\n\t\tnextDateColumn: function(start, dir){\r\n\t\t\tdir = dir || 1;\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[scheduler.getState().mode];\r\n\r\n\t\t\tvar date;\r\n\t\t\tif(timeline){\r\n\t\t\t\tdate = scheduler.date.add(start, dir * timeline.x_step, timeline.x_unit);\r\n\t\t\t}else{\r\n\t\t\t\tdate = scheduler.date.day_start(scheduler.date.add(start, dir, \"day\"));\r\n\t\t\t}\r\n\r\n\t\t\treturn date;\r\n\t\t},\r\n\r\n\t\tisVisible:function(from, to){\r\n\t\t\tif(!scheduler._ignores_detected)\r\n\t\t\t\treturn true;\r\n\r\n\t\t\tvar current = new Date(from);\r\n\r\n\t\t\twhile(current.valueOf() < to.valueOf()){\r\n\t\t\t\tif(this.isDateVisible(current)) return true;\r\n\t\t\t\tcurrent = this.nextDateColumn(current);\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t},\r\n\r\n\t\tnextSlot: function(slot, dir, view, extend){\r\n\t\t\tvar next;\r\n\t\t\tview = view || this._getMode();\r\n\r\n\t\t\tvar tempSlot = scheduler.$keyboardNavigation.TimeSlot.prototype.clone(slot);\r\n\r\n\t\t\tswitch (view){\r\n\t\t\t\tcase this._modes.units:\r\n\t\t\t\t\tnext = this.nextUnitsSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.timeline:\r\n\t\t\t\t\tnext = this.nextTimelineSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.year:\r\n\t\t\t\t\tnext = this.nextMonthSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.month:\r\n\t\t\t\t\tnext = this.nextMonthSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.weekAgenda:\r\n\t\t\t\t\tnext = this.nextWeekAgendaSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.list:\r\n\t\t\t\t\tnext = this.nextAgendaSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.dayColumns:\r\n\t\t\t\t\tnext = this.nextDaySlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(next.start_date.valueOf() >= next.end_date.valueOf()){\r\n\t\t\t\tnext = this.nextSlot(next, dir, view);\r\n\t\t\t}\r\n\r\n\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(next);\r\n\r\n\t\t},\r\n\r\n\t\textendSlot: function(slot, dir){\r\n\t\t\tvar view = this._getMode();\r\n\t\t\tvar next;\r\n\t\t\tswitch (view){\r\n\t\t\t\tcase this._modes.units:\r\n\t\t\t\t\tif(dir == \"left\" || dir == \"right\"){\r\n\t\t\t\t\t\tnext = this.nextUnitsSlot(slot, dir);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnext = this.extendUnitsSlot(slot, dir);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.timeline:\r\n\t\t\t\t\tif(dir == \"down\" || dir == \"up\"){\r\n\t\t\t\t\t\tnext = this.nextTimelineSlot(slot, dir);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnext = this.extendTimelineSlot(slot, dir);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.year:\r\n\t\t\t\t\tnext = this.extendMonthSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.month:\r\n\t\t\t\t\tnext = this.extendMonthSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.dayColumns:\r\n\t\t\t\t\tnext = this.extendDaySlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.weekAgenda:\r\n\t\t\t\t\tnext = this.extendWeekAgendaSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnext = slot;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tvar range = scheduler.getState();\r\n\t\t\tif(next.start_date.valueOf() < range.min_date.valueOf()){\r\n\t\t\t\tnext.start_date = this.findVisibleColumn(range.min_date);\r\n\t\t\t\tnext.start_date.setHours(scheduler.config.first_hour);\r\n\t\t\t}\r\n\r\n\t\t\tif(next.end_date.valueOf() > range.max_date.valueOf()){\r\n\t\t\t//\tnext.end_date = new Date(slot.end_date);\r\n\t\t\t\tnext.end_date = this.findVisibleColumn(range.max_date, -1);\r\n\t\t\t}\r\n\r\n\r\n\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(next);\r\n\t\t},\r\n\r\n\t\textendTimelineSlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"timeline\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\textendWeekAgendaSlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"weekAgenda\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\textendGenericSlot: function(allowedDirections, slot, direction, type){\r\n\t\t\tvar next;\r\n\t\t\tvar moveDate = slot.movingDate;\r\n\r\n\t\t\tif(!moveDate){\r\n\t\t\t\tmoveDate = allowedDirections[direction];\r\n\t\t\t}\r\n\r\n\t\t\tif(!moveDate || !allowedDirections[direction]){\r\n\t\t\t\treturn slot;\r\n\t\t\t}\r\n\r\n\t\t\tif(direction){\r\n\t\t\t\tnext = this.nextSlot({start_date: slot[moveDate], section: slot.section}, direction, type, true);\r\n\r\n\t\t\t\tif(next.start_date.valueOf() == slot.start_date.valueOf()){\r\n\t\t\t\t\tnext = this.nextSlot({start_date: next.start_date, section:next.section}, direction, type, true);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tnext.movingDate = moveDate;\r\n\t\t\t}else{\r\n\t\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(slot);\r\n\t\t\t}\r\n\r\n\t\t\tvar newDates = this.extendSlotDates(slot, next, next.movingDate);\r\n\r\n\t\t\tif(newDates.end_date.valueOf() <= newDates.start_date.valueOf()){\r\n\t\t\t\tnext.movingDate = next.movingDate == \"end_date\" ? \"start_date\" : \"end_date\";\r\n\t\t\t}\r\n\t\t\tnewDates = this.extendSlotDates(slot, next, next.movingDate);\r\n\r\n\t\t\tnext.start_date = newDates.start_date;\r\n\t\t\tnext.end_date = newDates.end_date;\r\n\t\t\treturn next;\r\n\t\t},\r\n\r\n\t\textendSlotDates: function(oldSlot, newSlot, dateDirection){\r\n\t\t\tvar res = {start_date:null, end_date:null};\r\n\r\n\t\t\tif(dateDirection == \"start_date\"){\r\n\t\t\t\tres.start_date = newSlot.start_date;\r\n\t\t\t\tres.end_date = oldSlot.end_date;\r\n\t\t\t}else{\r\n\t\t\t\tres.start_date = oldSlot.start_date;\r\n\t\t\t\tres.end_date = newSlot.start_date;\r\n\t\t\t}\r\n\t\t\treturn res;\r\n\r\n\t\t},\r\n\r\n\t\textendMonthSlot: function(slot, direction){\r\n\t\t\tvar slot = this.extendGenericSlot({\r\n\t\t\t\t\t\"up\":\"start_date\",\r\n\t\t\t\t\t\"down\":\"end_date\",\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"month\"\r\n\t\t\t);\r\n\r\n\t\t\tslot.start_date.setHours(scheduler.config.first_hour);\r\n\t\t\tslot.end_date = scheduler.date.add(slot.end_date, -1, \"day\");\r\n\t\t\tslot.end_date.setHours(scheduler.config.last_hour);\r\n\t\t\treturn slot;\r\n\t\t},\r\n\r\n\t\textendUnitsSlot: function(slot, direction){\r\n\t\t\tvar next;\r\n\r\n\t\t\tswitch (direction){\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tnext = this.extendDaySlot(slot, direction);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnext = slot;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tnext.section = slot.section;\r\n\t\t\treturn next;\r\n\t\t},\r\n\t\textendDaySlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\t\"up\":\"start_date\",\r\n\t\t\t\t\t\"down\":\"end_date\",\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"dayColumns\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\tscrollSlot: function(dir){\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tvar slot = this.nextSlot(this, dir);\r\n\t\t\tif(slot.start_date.valueOf() < state.min_date.valueOf() || slot.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tscheduler.setCurrentView(new Date(slot.start_date));\r\n\t\t\t}\r\n\r\n\t\t\tthis.moveTo(slot);\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tthis.scrollSlot(\"left\");\r\n\t\t\t},\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tthis.scrollSlot(\"right\");\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\r\n\t\t\t\tvar mode = this._getMode();\r\n\t\t\t\tif(mode == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.nextEventHandler();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.scrollSlot(\"down\");\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"up\": function () {\r\n\t\t\t\tvar mode = this._getMode();\r\n\t\t\t\tif(mode == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.prevEventHandler();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.scrollSlot(\"up\");\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"shift+down\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"down\"));\r\n\t\t\t},\r\n\t\t\t\"shift+up\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"up\"));\r\n\t\t\t},\r\n\t\t\t\"shift+right\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"right\"));\r\n\t\t\t},\r\n\t\t\t\"shift+left\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"left\"));\r\n\t\t\t},\r\n\r\n\r\n\t\t\t\"enter\": function(){\r\n\t\t\t\tvar obj = {start_date: new Date(this.start_date), end_date: new Date(this.end_date)};\r\n\r\n\t\t\t\tvar mode = scheduler.getState().mode;\r\n\t\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\r\n\t\t\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\t\t\tobj[timeline.y_property] = this.section;\r\n\t\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\t\tvar unit = scheduler._props[mode];\r\n\t\t\t\t\tobj[unit.map_to] = this.section;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler.addEventNow(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.TimeSlot.prototype.bindAll(scheduler.$keyboardNavigation.TimeSlot.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.MinicalButton = function(div, index){\r\n\tthis.container = div;\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.MinicalButton.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar container = this.container;\r\n\t\t\treturn !!container.offsetWidth;// valid if container is visible\r\n\t\t},\r\n\r\n\t\tfallback: function(){\r\n\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(defaultSlot.isValid()){\r\n\t\t\t\treturn defaultSlot;\r\n\t\t\t}else{\r\n\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t}\r\n\t\t},\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.globalNode.disable();\r\n\t\t\tthis.container.removeAttribute(\"tabindex\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tthis.container.setAttribute(\"tabindex\", \"0\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\tif(!this.index){\r\n\t\t\t\treturn this.container.querySelector(\".dhx_cal_prev_button\");\r\n\t\t\t}else{\r\n\t\t\t\treturn this.container.querySelector(\".dhx_cal_next_button\");\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"right\": function(e){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, this.index ? 0 : 1));\r\n\t\t\t},\r\n\t\t\t\"left\": function(e){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, this.index ? 0 : 1));\r\n\t\t\t},\r\n\t\t\t\"down\": function(){\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, 0, 0);\r\n\t\t\t\tif(next && !next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"enter\": function(e){\r\n\t\t\t\tthis.getNode().click();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.MinicalButton.prototype.bindAll(scheduler.$keyboardNavigation.MinicalButton.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.MinicalCell = function(div, row, col){\r\n\tthis.container = div;\r\n\tthis.row = row || 0;\r\n\tthis.col = col || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.MinicalCell.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar grid = this._getGrid();\r\n\t\t\treturn !!(grid[this.row] && grid[this.row][this.col]);\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\tvar row = this.row;\r\n\t\t\tvar col = this.col;\r\n\t\t\tvar grid = this._getGrid();\r\n\t\t\tif(!grid[row]){\r\n\t\t\t\trow = 0;\r\n\t\t\t}\r\n\t\t\tvar dir = true;\r\n\t\t\tif(row > grid.length / 2){\r\n\t\t\t\tdir = false;\r\n\t\t\t}\r\n\r\n\t\t\tif(!grid[row]){\r\n\t\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t\tif(defaultSlot.isValid()){\r\n\t\t\t\t\treturn defaultSlot;\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(dir){\r\n\t\t\t\tfor(var c = col; grid[row] && c < grid[row].length; c++){\r\n\t\t\t\t\tif(!grid[row][c] && c == grid[row].length - 1){\r\n\t\t\t\t\t\trow++;\r\n\t\t\t\t\t\tcol = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(grid[row][c]){\r\n\t\t\t\t\t\treturn new scheduler.$keyboardNavigation.MinicalCell(this.container, row, c);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tfor(var c = col; grid[row] && c < grid[row].length; c--){\r\n\t\t\t\t\tif(!grid[row][c] && !c){\r\n\t\t\t\t\t\trow--;\r\n\t\t\t\t\t\tcol = grid[row].length - 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(grid[row][c]){\r\n\t\t\t\t\t\treturn new scheduler.$keyboardNavigation.MinicalCell(this.container, row, c);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn new scheduler.$keyboardNavigation.MinicalButton(this.container, 0);\r\n\t\t},\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.globalNode.disable();\r\n\r\n\t\t\tthis.container.removeAttribute(\"tabindex\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tthis.container.setAttribute(\"tabindex\", \"0\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\t\t_getNode: function(row, col){\r\n\t\t\treturn this.container.querySelector(\".dhx_year_body tr:nth-child(\"+(row + 1) + \") td:nth-child(\"+(col + 1)+\")\");\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\treturn this._getNode(this.row, this.col);\r\n\t\t},\r\n\r\n\t\t_getGrid: function(){\r\n\t\t\tvar rows = this.container.querySelectorAll(\".dhx_year_body tr\");\r\n\t\t\tvar grid = [];\r\n\t\t\tfor(var i = 0; i < rows.length; i++){\r\n\t\t\t\tgrid[i] = [];\r\n\t\t\t\tvar row = rows[i];\r\n\t\t\t\tvar cells = row.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var c = 0; c < cells.length; c++){\r\n\t\t\t\t\tvar cell = cells[c];\r\n\t\t\t\t\tvar enabled = true;\r\n\t\t\t\t\tvar css = scheduler._getClassName(cell);\r\n\t\t\t\t\tif(css.indexOf(\"dhx_after\") > -1 || css.indexOf(\"dhx_before\") > -1 || css.indexOf(\"dhx_scale_ignore\") > -1){\r\n\t\t\t\t\t\tenabled = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tgrid[i][c] = enabled;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn grid;\r\n\t\t},\r\n\r\n\r\n\t\tkeys: {\r\n\t\t\t\"right\": function(e){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row;\r\n\t\t\t\tvar newCol = this.col + 1;\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tif(grid[newRow + 1]){\r\n\t\t\t\t\t\tnewRow = newRow + 1;\r\n\t\t\t\t\t\tnewCol = 0;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnewCol = this.col;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"left\": function(e){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row;\r\n\t\t\t\tvar newCol = this.col - 1;\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tif(grid[newRow - 1]){\r\n\t\t\t\t\t\tnewRow = newRow - 1;\r\n\t\t\t\t\t\tnewCol = grid[newRow].length - 1;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnewCol = this.col;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"down\": function(){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row + 1;\r\n\t\t\t\tvar newCol = this.col;\r\n\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tnewRow = this.row;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"up\": function(){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row - 1;\r\n\t\t\t\tvar newCol = this.col;\r\n\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tvar index = 0;\r\n\t\t\t\t\tif(this.col > grid[this.row].length / 2){\r\n\t\t\t\t\t\tindex = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, index));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.moveTo(next);\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\t\t\t\"enter\": function(e){\r\n\t\t\t\tthis.getNode().querySelector(\".dhx_month_head\").click();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.MinicalCell.prototype.bindAll(scheduler.$keyboardNavigation.MinicalCell.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.DataArea = function(index){\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.DataArea.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\tgetNode: function(index){\r\n\t\t\treturn scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t},\r\n\r\n\t\t_handlers:null,\r\n\r\n\t\tisValid: function(){\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tfallback:function(){\r\n\t\t\treturn this;\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"up,down,right,left\":function(){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.DataArea.prototype.bindAll(scheduler.$keyboardNavigation.DataArea.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.dispatcher = {\r\n\tisActive: false,\r\n\tactiveNode: null,\r\n\tglobalNode: new scheduler.$keyboardNavigation.SchedulerNode(),\r\n\r\n\tkeepScrollPosition: function (callback) {\r\n\t\tvar top, left;\r\n\r\n\t\tvar scrollable = scheduler.$container.querySelector(\".dhx_timeline_scrollable_data\");\r\n\t\tif(!scrollable){\r\n\t\t\tscrollable = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t}\r\n\r\n\t\tif(scrollable){\r\n\t\t\ttop = scrollable.scrollTop;\r\n\t\t\tleft = scrollable.scrollLeft;\r\n\t\t}\r\n\r\n\t\tcallback();\r\n\r\n\t\tif(scrollable){\r\n\t\t\tscrollable.scrollTop = top;\r\n\t\t\tscrollable.scrollLeft = left;\r\n\t\t}\r\n\t},\r\n\tenable: function(){\r\n\t\tif(!scheduler.$container){\r\n\t\t\t// do nothing if not initialized\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.isActive = true;\r\n\t\tvar self = this;\r\n\t\tthis.keepScrollPosition(function () {\r\n\t\t\tself.globalNode.enable();\r\n\t\t\tself.setActiveNode(self.getActiveNode());\r\n\t\t});\r\n\t},\r\n\r\n\tdisable: function(){\r\n\t\tthis.isActive = false;\r\n\t\tthis.globalNode.disable();\r\n\t},\r\n\r\n\tisEnabled: function(){\r\n\t\treturn !!this.isActive;\r\n\t},\r\n\r\n\tgetDefaultNode: function(){\r\n\t\treturn this.globalNode.getDefaultNode();\r\n\t},\r\n\r\n\tsetDefaultNode: function() {\r\n\t\tthis.setActiveNode(this.getDefaultNode());\r\n\t},\r\n\r\n\tgetActiveNode: function(){\r\n\t\tvar node = this.activeNode;\r\n\t\tif(node && !node.isValid()){\r\n\t\t\tnode = node.fallback();\r\n\t\t}\r\n\t\treturn node;\r\n\t},\r\n\r\n\tfocusGlobalNode: function(){\r\n\t\tthis.blurNode(this.globalNode);\r\n\t\tthis.focusNode(this.globalNode);\r\n\t},\r\n\r\n\tsetActiveNode: function(el){\r\n\t\tif(!el || !el.isValid())\r\n\t\t\treturn;\r\n\r\n\t\tif(this.activeNode){\r\n\t\t\tif(this.activeNode.compareTo(el)){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(this.isEnabled()){\r\n\t\t\tthis.blurNode(this.activeNode);\r\n\t\t\tthis.activeNode = el;\r\n\t\t\tthis.focusNode(this.activeNode);\r\n\t\t}\r\n\t},\r\n\r\n\tfocusNode: function(el){\r\n\t\tif(el && el.focus){\r\n\t\t\tel.focus();\r\n\t\t\tif(el.getNode && document.activeElement != el.getNode()){\r\n\t\t\t\tthis.setActiveNode(new scheduler.$keyboardNavigation.DataArea());\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tblurNode: function(el){\r\n\t\tif(el && el.blur){\r\n\t\t\tel.blur();\r\n\t\t}\r\n\t},\r\n\r\n\tgetInlineEditor: function(id){\r\n\t\tvar editor = scheduler.$container.querySelector(\".dhx_cal_editor[\"+scheduler.config.event_attribute+\"='\"+id+\"'] textarea\");\r\n\t\tif(editor && editor.offsetWidth){\r\n\t\t\t// if exists and visible\r\n\t\t\treturn editor;\r\n\t\t}\r\n\t\treturn null;\r\n\t},\r\n\r\n\tkeyDownHandler: function (e) {\r\n\r\n\t\tif(e.defaultPrevented){\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar activeElement = this.getActiveNode();\r\n\r\n\t\tif(scheduler.$keyboardNavigation.isModal() &&\r\n\t\t\t!(activeElement && activeElement.container && scheduler.utils.dom.locateCss({target:activeElement.container}, \"dhx_minical_popup\", false)))\r\n\t\t\treturn;\r\n\r\n\t\tif(scheduler.getState().editor_id && this.getInlineEditor(scheduler.getState().editor_id))\r\n\t\t\treturn;\r\n\r\n\t\tif (!this.isEnabled())\r\n\t\t\treturn;\r\n\r\n\t\te = e || window.event;\r\n\r\n\t\tvar schedulerNode = this.globalNode;\r\n\r\n\t\tvar command = scheduler.$keyboardNavigation.shortcuts.getCommandFromEvent(e);\r\n\r\n\t\tif(!activeElement){\r\n\t\t\tthis.setDefaultNode();\r\n\t\t}else if(activeElement.findHandler(command)){\r\n\t\t\tactiveElement.doAction(command, e);\r\n\t\t}else if(schedulerNode.findHandler(command)){\r\n\t\t\tschedulerNode.doAction(command, e);\r\n\t\t}\r\n\r\n\t},\r\n\r\n\t_timeout: null,\r\n\tdelay: function(callback, delay){\r\n\r\n\t\tclearTimeout(this._timeout);\r\n\t\tthis._timeout = setTimeout(callback, delay || 1);\r\n\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation._minicalendars = [];\r\n\r\nscheduler.$keyboardNavigation.isMinical = function(node){\r\n\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\tif(this.isChildOf(node, minicalendars[i]))\r\n\t\t\treturn true;\r\n\t}\r\n\treturn false;\r\n};\r\n\r\nscheduler.$keyboardNavigation.isChildOf = function(child, parent){\r\n\twhile(child && child !== parent){\r\n\t\tchild = child.parentNode;\r\n\t}\r\n\r\n\treturn !!(child === parent);\r\n};\r\n\r\nscheduler.$keyboardNavigation.patchMinicalendar = function(){\r\n\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\tfunction focusMinical(e){\r\n\t\tvar target = e.target;\r\n\r\n\t\tdispatcher.enable();\r\n\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.MinicalButton(target, 0));\r\n\t}\r\n\r\n\tfunction minicalClick(e){\r\n\t\tvar target = e.target || e.srcElement;\r\n\r\n\t\tvar prev = scheduler.utils.dom.locateCss(e, \"dhx_cal_prev_button\", false);\r\n\t\tvar next = scheduler.utils.dom.locateCss(e, \"dhx_cal_next_button\", false);\r\n\t\tvar cell = scheduler.utils.dom.locateCss(e, \"dhx_year_body\", false);\r\n\r\n\t\tvar rowIndex = 0;\r\n\t\tvar cellIndex = 0;\r\n\t\tif(cell){\r\n\t\t\tvar tr;\r\n\t\t\tvar td;\r\n\t\t\tvar current = target;\r\n\t\t\twhile(current && current.tagName.toLowerCase() != \"td\"){\r\n\t\t\t\tcurrent = current.parentNode;\r\n\t\t\t}\r\n\t\t\tif(current){\r\n\t\t\t\ttd = current;\r\n\t\t\t\ttr = td.parentNode;\r\n\t\t\t}\r\n\r\n\t\t\tif(tr && td){\r\n\t\t\t\tvar rows = tr.parentNode.querySelectorAll(\"tr\");\r\n\t\t\t\tfor(var i = 0; i < rows.length; i++){\r\n\t\t\t\t\tif(rows[i] == tr){\r\n\t\t\t\t\t\trowIndex = i;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tvar cells = tr.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\t\t\tif(cells[i] == td){\r\n\t\t\t\t\t\tcellIndex = i;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tvar root = e.currentTarget;\r\n\t\tdispatcher.delay(function(){\r\n\t\t\tif(prev || next || cell){\r\n\r\n\t\t\t\tvar element;\r\n\t\t\t\tif(prev){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalButton(root, 0);\r\n\t\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.MinicalButton(root, 0));\r\n\t\t\t\t}else if(next){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalButton(root, 1);\r\n\t\t\t\t}else if(cell){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalCell(root, rowIndex, cellIndex);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(element){\r\n\r\n\t\t\t\t\tdispatcher.enable();\r\n\t\t\t\t\tif(element.isValid()){\r\n\t\t\t\t\t\tdispatcher.activeNode = null;\r\n\t\t\t\t\t\tdispatcher.setActiveNode(element);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t}\r\n\r\n\tif(scheduler.renderCalendar){\r\n\t\tvar renderMinical = scheduler.renderCalendar;\r\n\t\tscheduler.renderCalendar = function(){\r\n\t\t\tvar cal = renderMinical.apply(this, arguments);\r\n\t\t\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\r\n\t\t\tscheduler.eventRemove(cal, \"click\", minicalClick);\r\n\t\t\tscheduler.event(cal, \"click\", minicalClick);\r\n\r\n\t\t\tscheduler.eventRemove(cal, \"focus\", focusMinical);\r\n\t\t\tscheduler.event(cal, \"focus\", focusMinical);\r\n\r\n\t\t\tvar added = false;\r\n\t\t\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\t\t\tif(minicalendars[i] == cal){\r\n\t\t\t\t\tadded = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(!added)\r\n\t\t\t\tminicalendars.push(cal);\r\n\r\n\t\t\tif(dispatcher.isEnabled()){\r\n\t\t\t\tvar node = dispatcher.getActiveNode();\r\n\t\t\t\tif(node && node.container == cal){\r\n\t\t\t\t\tdispatcher.focusNode(node);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcal.setAttribute(\"tabindex\", \"0\");\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tcal.setAttribute(\"tabindex\", \"0\");\r\n\t\t\t}\r\n\t\t\treturn cal;\r\n\t\t};\r\n\t}\r\n\r\n\tif(scheduler.destroyCalendar){\r\n\t\tvar destroyMinical = scheduler.destroyCalendar;\r\n\t\tscheduler.destroyCalendar = function(cal, force){\r\n\t\t\tcal = cal || (scheduler._def_count ? scheduler._def_count.firstChild : null);\r\n\t\t\tvar res = destroyMinical.apply(this, arguments);\r\n\r\n\t\t\tif(!cal || !cal.parentNode){\r\n\t\t\t\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\t\t\t\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\t\t\t\tif(minicalendars[i] == cal){\r\n\t\t\t\t\t\tscheduler.eventRemove(minicalendars[i], \"focus\", focusMinical);\r\n\t\t\t\t\t\tminicalendars.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn res;\r\n\t\t};\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\r\n\tthis.layers.sort(function(a, b){\r\n\t\treturn a.zIndex - b.zIndex;\r\n\t});\r\n\r\n\tscheduler._dp_init=function(dp){\r\n\t\tdp._methods=[\"_set_event_text_style\",\"\",\"changeEventId\",\"deleteEvent\"];\r\n\r\n\t\tthis.attachEvent(\"onEventAdded\",function(id){\r\n\t\t\tif (!this._loading && this.validId(id) && this.getEvent(id) && this.getEvent(id).layer == dp.layer)\r\n\t\t\t\tdp.setUpdated(id,true,\"inserted\");\r\n\t\t});\r\n\t\tthis.attachEvent(\"onBeforeEventDelete\",function(id){\r\n\t\t\tif(this.getEvent(id) && this.getEvent(id).layer == dp.layer) {\r\n\t\t\t\tif (!this.validId(id)) return;\r\n\t\t\t\tvar z=dp.getState(id);\r\n\r\n\t\t\t\tif (z==\"inserted\" || this._new_event) { dp.setUpdated(id,false);\t\treturn true; }\r\n\t\t\t\tif (z==\"deleted\") return false;\r\n\t\t\t\tif (z==\"true_deleted\") return true;\r\n\r\n\t\t\t\tdp.setUpdated(id,true,\"deleted\");\r\n\t\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\telse return true;\r\n\t\t});\r\n\t\tthis.attachEvent(\"onEventChanged\",function(id){\r\n\t\t\tif (!this._loading && this.validId(id) && this.getEvent(id) && this.getEvent(id).layer == dp.layer)\r\n\t\t\t\tdp.setUpdated(id,true,\"updated\");\r\n\t\t});\r\n\r\n\t\tdp._getRowData=function(id,pref){\r\n\t\t\tvar ev=this.obj.getEvent(id);\r\n\t\t\tvar data = {};\r\n\r\n\t\t\tfor (var a in ev){\r\n\t\t\t\tif (a.indexOf(\"_\")===0) continue;\r\n\t\t\t\tif (ev[a] && ev[a].getUTCFullYear) //not very good, but will work\r\n\t\t\t\t\tdata[a] = this.obj._helpers.formatDate(ev[a]);\r\n\t\t\t\telse\r\n\t\t\t\t\tdata[a] = ev[a];\r\n\t\t\t}\r\n\t\t\treturn data;\r\n\t\t};\r\n\t\tdp._clearUpdateFlag=function(){};\r\n\r\n\t\tdp.attachEvent(\"insertCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"updateCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"deleteCallback\", function(upd, id) {\r\n\t\t\tthis.obj.setUserData(id, this.action_param, \"true_deleted\");\r\n\t\t\tthis.obj.deleteEvent(id);\r\n\t\t});\r\n\t};\r\n\r\n\t(function() {\r\n var _cloneObj = function(obj){\r\n if(obj === null || typeof(obj) != 'object')\r\n return obj;\r\n var temp = new obj.constructor();\r\n for(var key in obj)\r\n temp[key] = _cloneObj(obj[key]);\r\n return temp;\r\n };\r\n\r\n\t\tscheduler._dataprocessors = [];\r\n\t\tscheduler._layers_zindex = {};\r\n\t\tfor(var i=0; i= scheduler.config.collision_limit);\r\n\t});\r\n\r\n\tscheduler.addEvent=function(start_date,end_date,text,id,extra_data){\r\n\t\tvar ev=start_date;\r\n\t\tif (arguments.length!=1){\r\n\t\t\tev=extra_data||{};\r\n\t\t\tev.start_date=start_date;\r\n\t\t\tev.end_date=end_date;\r\n\t\t\tev.text=text;\r\n\t\t\tev.id=id;\r\n\t\t\tev.layer = this.defaultLayer;\r\n\t\t}\r\n\t\tev.id = ev.id||scheduler.uid();\r\n\t\tev.text = ev.text||\"\";\r\n\r\n\r\n\t\tif (typeof ev.start_date == \"string\") ev.start_date=this.templates.api_date(ev.start_date);\r\n\t\tif (typeof ev.end_date == \"string\") ev.end_date=this.templates.api_date(ev.end_date);\r\n\t\tev._timed=this.isOneDayEvent(ev);\r\n\r\n\t\tvar is_new=!this._events[ev.id];\r\n\t\tthis._events[ev.id]=ev;\r\n\t\tthis.event_updated(ev);\r\n\t\tif (!this._loading)\r\n\t\t\tthis.callEvent(is_new?\"onEventAdded\":\"onEventChanged\",[ev.id,ev]);\r\n\t};\r\n\r\n\tthis._evs_layer = {};\r\n\tfor (var i = 0; i < this.layers.length; i++) { // array in object for each layer\r\n\t\tthis._evs_layer[this.layers[i].name] = [];\r\n\t}\r\n\r\n\tscheduler.addEventNow=function(start,end,e){\r\n\t\tvar base = {};\r\n\t\tif (typeof start == \"object\"){\r\n\t\t\tbase = start;\r\n\t\t\tstart = null;\r\n\t\t}\r\n\r\n\t\tvar d = (this.config.event_duration||this.config.time_step)*60000;\r\n\t\tif (!start) start = Math.round((scheduler._currentDate()).valueOf()/d)*d;\r\n\t\tvar start_date = new Date(start);\r\n\t\tif (!end){\r\n\t\t\tvar start_hour = this.config.first_hour;\r\n\t\t\tif (start_hour > start_date.getHours()){\r\n\t\t\t\tstart_date.setHours(start_hour);\r\n\t\t\t\tstart = start_date.valueOf();\r\n\t\t\t}\r\n\t\t\tend = start+d;\r\n\t\t}\r\n\r\n\r\n\t\tbase.start_date = base.start_date||start_date;\r\n\t\tbase.end_date = base.end_date||new Date(end);\r\n\t\tbase.text = base.text||this.locale.labels.new_event;\r\n\t\tbase.id = this._drag_id = this.uid();\r\n\t\tbase.layer = this.defaultLayer;\r\n\t\tthis._drag_mode=\"new-size\";\r\n\r\n\t\tthis._loading=true;\r\n\t\tthis.addEvent(base);\r\n\t\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\t\tthis._loading=false;\r\n\r\n\t\tthis._drag_event={}; //dummy , to trigger correct event updating logic\r\n\t\tthis._on_mouse_up(e);\r\n\t};\r\n\r\n\tscheduler._t_render_view_data = function(events) { // helper\r\n\t\tif (this.config.multi_day && !this._table_view) {\r\n\t\t\tvar tvs = [];\r\n\t\t\tvar tvd = [];\r\n\t\t\tfor (var k = 0; k < events.length; k++) {\r\n\t\t\t\tif (events[k]._timed)\r\n\t\t\t\t\ttvs.push(events[k]);\r\n\t\t\t\telse\r\n\t\t\t\t\ttvd.push(events[k]);\r\n\t\t\t}\r\n\t\t\tthis._table_view = true;\r\n\t\t\tthis.render_data(tvd);\r\n\t\t\tthis._table_view = false;\r\n\t\t\tthis.render_data(tvs);\r\n\t\t}\r\n\t\telse\r\n\t\t\tthis.render_data(events);\r\n\t};\r\n\r\n\tscheduler.render_view_data = function(){\r\n\t\tif (this._not_render) {\r\n\t\t\tthis._render_wait = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._render_wait = false;\r\n\r\n\t\tthis.clear_view();\r\n\r\n\t\tthis._evs_layer = {};\r\n\t\tfor (var i = 0; i < this.layers.length; i++) { // array in object for each layer\r\n\t\t\tthis._evs_layer[this.layers[i].name] = [];\r\n\t\t}\r\n\r\n\t\tvar evs = this.get_visible_events();\r\n\t\tfor (var i = 0; i < evs.length; i++) { // filling layer arrays with events\r\n\t\t\tif(this._evs_layer[evs[i].layer])\r\n\t\t\t\tthis._evs_layer[evs[i].layer].push(evs[i]);\r\n\t\t}\r\n\r\n\t\tif(this._mode == 'month') { // old logic is used\r\n\t\t\tvar tevs = [];\r\n\t\t\tfor (var i = 0; i < this.layers.length; i++) {\r\n\t\t\t\tif (this.layers[i].visible)\r\n\t\t\t\t\ttevs = tevs.concat(this._evs_layer[this.layers[i].name]);\r\n\t\t\t}\r\n\t\t\tthis._t_render_view_data(tevs);\r\n\t\t}\r\n\t\telse { // week, day; should use new logic\r\n\t\t\tfor (var i = 0; i < this.layers.length; i++) {\r\n\t\t\t\tif (this.layers[i].visible) {\r\n\t\t\t\t\tvar evs_layer = this._evs_layer[this.layers[i].name];\r\n\t\t\t\t\tthis._t_render_view_data(evs_layer);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._render_v_bar=function(ev,x,y,w,h,style,contentA,contentB,bottom){\r\n\t\tvar id = ev.id;\r\n\r\n\t\tif(contentA.indexOf('
';\r\n\t\thtml+='
 
';\r\n\t\thtml+='
'+contentA+'
';\r\n\t\thtml+='
'+contentB+'
';\r\n\t\thtml+='
';\r\n\r\n\t\td.innerHTML=html;\r\n\t\td.style.zIndex = 100;\r\n\t\treturn d.firstChild;\r\n\t};\r\n\r\n\tscheduler.render_event_bar=function(ev){\r\n\t\tvar parent=this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tvar x=this._colsS[ev._sday];\r\n\t\tvar x2=this._colsS[ev._eday];\r\n\t\tif (x2==x) x2=this._colsS[ev._eday+1];\r\n\t\tvar hb = this.xy.bar_height;\r\n\r\n\t\tvar y=this._colsS.heights[ev._sweek]+(this._colsS.height?(this.xy.month_scale_height+2):2)+ev._sorder*hb;\r\n\r\n\t\tvar d=document.createElement(\"div\");\r\n\t\tvar cs = ev._timed?\"dhx_cal_event_clear\":\"dhx_cal_event_line\";\r\n\t\tvar cse = (scheduler.templates['event_class_'+ev.layer])?scheduler.templates['event_class_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_class(ev.start_date,ev.end_date,ev);\r\n\t\tif (cse) cs=cs+\" \"+cse;\r\n\r\n\t\tvar html='
';\r\n\r\n\t\tif (ev._timed)\r\n\t\t\thtml+=(scheduler.templates['event_bar_date_'+ev.layer])?scheduler.templates['event_bar_date_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_bar_date(ev.start_date,ev.end_date,ev);\r\n\t\thtml+=( (scheduler.templates['event_bar_text_'+ev.layer])?scheduler.templates['event_bar_text_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_bar_text(ev.start_date,ev.end_date,ev) + '
)');\r\n\t\thtml+='';\r\n\r\n\t\td.innerHTML=html;\r\n\r\n\t\tthis._rendered.push(d.firstChild);\r\n\t\tparent.appendChild(d.firstChild);\r\n\t};\r\n\r\n\tscheduler.render_event=function(ev){\r\n\t\tvar menu = scheduler.xy.menu_width;\r\n\t\tif(scheduler.getLayer(ev.layer).noMenu)\r\n\t\t\tmenu = 0;\r\n\r\n\t\tif (ev._sday<0) return; //can occur in case of recurring event during time shift\r\n\t\tvar parent=scheduler.locate_holder(ev._sday);\r\n\t\tif (!parent) return; //attempt to render non-visible event\r\n\t\tvar sm = ev.start_date.getHours()*60+ev.start_date.getMinutes();\r\n\t\tvar em = (ev.end_date.getHours()*60+ev.end_date.getMinutes())||(scheduler.config.last_hour*60);\r\n\r\n\t\tvar top = (Math.round((sm*60*1000-this.config.first_hour*60*60*1000)*this.config.hour_size_px/(60*60*1000)))%(this.config.hour_size_px*24)+1; //42px/hour\r\n\t\tvar height = Math.max(scheduler.xy.min_event_height,(em-sm)*this.config.hour_size_px/60)+1; //42px/hour\r\n\t\t\r\n\t\tvar width=Math.floor((parent.clientWidth-menu)/ev._count);\r\n\t\tvar left=ev._sorder*width+1;\r\n\t\tif (!ev._inner) width=width*(ev._count-ev._sorder);\r\n\r\n\r\n\r\n\t\tvar d=this._render_v_bar(ev.id,menu+left,top,width,height,ev._text_style,scheduler.templates.event_header(ev.start_date,ev.end_date,ev),scheduler.templates.event_text(ev.start_date,ev.end_date,ev));\r\n\r\n\t\tthis._rendered.push(d);\r\n\t\tparent.appendChild(d);\r\n\r\n\t\tleft=left+parseInt(parent.style.left,10)+menu;\r\n\r\n\t\ttop+=this._dy_shift; //corrupt top, to include possible multi-day shift\r\n\t\td.style.zIndex = this._layers_zindex[ev.layer];\r\n\r\n\t\tif (this._edit_id==ev.id){\r\n\t\t\td.style.zIndex = parseInt(d.style.zIndex)+1; //fix overlapping issue\r\n\t\t\tvar new_zIndex = d.style.zIndex;\r\n\t\t\twidth=Math.max(width-4,scheduler.xy.editor_width);\r\n\t\t\tvar d=document.createElement(\"div\");\r\n\t\t\td.setAttribute(\"event_id\",ev.id); // for backward compatibility\r\n\t\t\td.setAttribute(this.config.event_attribute,ev.id);\r\n\t\t\tthis.set_xy(d,width,height-20,left,top+14);\r\n\t\t\td.className=\"dhx_cal_editor\";\r\n\t\t\td.style.zIndex = new_zIndex;\r\n\t\t\tvar d2=document.createElement(\"div\");\r\n\t\t\tthis.set_xy(d2,width-6,height-26);\r\n\t\t\td2.style.cssText+=\";margin:2px 2px 2px 2px;overflow:hidden;\";\r\n\r\n\r\n\t\t\td2.style.zIndex = new_zIndex;\r\n\t\t\td.appendChild(d2);\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].appendChild(d);\r\n\t\t\tthis._rendered.push(d);\r\n\r\n\t\t\td2.innerHTML=\"\";\r\n\r\n\t\t\tthis._editor=d2.firstChild;\r\n\t\t\tthis._editor.addEventListener(\"keypress\", function(e){\r\n\t\t\t\tif (e.shiftKey) return true;\r\n\t\t\t\tvar code= e.keyCode;\r\n\t\t\t\tif (code==scheduler.keys.edit_save) scheduler.editStop(true);\r\n\t\t\t\tif (code==scheduler.keys.edit_cancel) scheduler.editStop(false);\r\n\t\t\t});\r\n\t\t\tthis._editor.addEventListener(\"selectstart\", function(e){ e.cancelBubble=true; return true; });\r\n\t\t\td2.firstChild.focus();\r\n\t\t\t//IE and opera can add x-scroll during focusing\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].scrollLeft=0;\r\n\t\t\td2.firstChild.select();\r\n\t\t}\r\n\t\tif (this._select_id==ev.id){\r\n\t\t\td.style.zIndex = parseInt(d.style.zIndex)+1; //fix overlapping issue\r\n\t\t\tvar icons=this.config[\"icons_\"+((this._edit_id==ev.id)?\"edit\":\"select\")];\r\n\t\t\tvar icons_str=\"\";\r\n\t\t\tfor (var i=0; i\";\r\n\t\t\tvar obj = this._render_v_bar(ev.id,left-menu+1,top,menu,icons.length*20+26,\"\",\"
\",icons_str,true);\r\n\t\t\tobj.style.left=left-menu+1;\r\n\t\t\tobj.style.zIndex = d.style.zIndex;\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].appendChild(obj);\r\n\t\t\tthis._rendered.push(obj);\r\n\t\t}\r\n\r\n\t};\r\n\r\n scheduler.filter_agenda = function(id, event) {\r\n var layer = scheduler.getLayer(event.layer);\r\n return (layer && layer.visible);\r\n };\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.limit_start = null;\r\nscheduler.config.limit_end = null;\r\nscheduler.config.limit_view = false;\r\nscheduler.config.check_limits = true;\r\nscheduler.config.mark_now = true;\r\nscheduler.config.display_marked_timespans = true;\r\nscheduler.config.overwrite_marked_timespans = true;\r\nscheduler._temp_limit_scope = function(){\r\n\tvar before = null;\r\n\tvar dhx_time_block = \"dhx_time_block\";\r\n\tvar default_timespan_type = \"default\";\r\n\tvar fix_options = function(options, days, zones) {\r\n\t\tif (days instanceof Date && zones instanceof Date) {\r\n\t\t\toptions.start_date = days;\r\n\t\t\toptions.end_date = zones;\r\n\t\t} else {\r\n\t\t\toptions.days = days;\r\n\t\t\toptions.zones = zones;\r\n\t\t}\r\n\t\treturn options;\r\n\t};\r\n\tvar get_resulting_options = function(days, zones, sections) {\r\n\t\tvar options = (typeof days == \"object\") ? days : { days: days };\r\n\t\toptions.type = dhx_time_block;\r\n\t\toptions.css = \"\";\r\n\t\tif (zones) {\r\n\t\t\tif (sections)\r\n\t\t\t\toptions.sections = sections;\r\n\t\t\toptions = fix_options(options, days, zones);\r\n\t\t}\r\n\t\treturn options;\r\n\t};\r\n\tscheduler.blockTime = function(days, zones, sections){\r\n\t\tvar options = get_resulting_options(days, zones, sections);\r\n\t\treturn scheduler.addMarkedTimespan(options);\r\n\t};\r\n\tscheduler.unblockTime = function(days, zones, sections) {\r\n\t\tzones = zones || \"fullday\";\r\n\t\tvar options = get_resulting_options(days, zones, sections);\r\n\t\treturn scheduler.deleteMarkedTimespan(options);\r\n\t};\r\n\tscheduler.attachEvent(\"onBeforeViewChange\",function(om,od,nm,nd){\r\n\r\n\t\tfunction isBlocked(date, mode){\r\n\t\t\tvar limit_start = scheduler.config.limit_start,\r\n\t\t\t\tlimit_end = scheduler.config.limit_end,\r\n\t\t\t\tdate_end = scheduler.date.add(date,1,mode);\r\n\r\n\t\t\treturn (date.valueOf() > limit_end.valueOf() || date_end <= limit_start.valueOf());\r\n\t\t}\r\n\r\n\t\tif (scheduler.config.limit_view){\r\n\t\t\tnd = nd||od; nm = nm||om;\r\n\t\t\tif (isBlocked(nd, nm) && !(od.valueOf() == nd.valueOf())){\r\n\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvar resetDate = !isBlocked(od, nm) ? od : scheduler.config.limit_start;\r\n\r\n\t\t\t\t\tscheduler.setCurrentView(!isBlocked(resetDate, nm) ? resetDate : null, nm);\r\n\t\t\t\t},1);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.checkInMarkedTimespan = function(ev, timespan_type, on_overlap){\r\n\t\ttimespan_type = timespan_type || default_timespan_type;\r\n\r\n\t\tvar res = true;\r\n\t\tvar temp_start_date = new Date(ev.start_date.valueOf());\r\n\t\tvar temp_end_date = scheduler.date.add(temp_start_date, 1, \"day\");\r\n\t\tvar timespans = scheduler._marked_timespans;\r\n\t\tfor (; temp_start_date < ev.end_date; temp_start_date = scheduler.date.date_part(temp_end_date), temp_end_date = scheduler.date.add(temp_start_date, 1, \"day\") ) {\r\n\t\t\tvar day_value = +scheduler.date.date_part( new Date(temp_start_date) ); // the first part of event not necessarily contains only date part\r\n\t\t\tvar day_index = temp_start_date.getDay();\r\n\r\n\t\t\tvar zones = getZones(ev, timespans, day_index, day_value, timespan_type);\r\n\t\t\tif (zones){\r\n\t\t\t\tfor (var i = 0; i < zones.length; i+=2) {\r\n\r\n\t\t\t\t\t// they may change for new event if it passes limit zone\r\n\t\t\t\t\tvar eventStart = scheduler._get_zone_minutes(temp_start_date);\r\n\t\t\t\t\tvar eventEnd = ( ev.end_date>temp_end_date || ev.end_date.getDate() != temp_start_date.getDate() ) ? 1440 : scheduler._get_zone_minutes(ev.end_date);\r\n\r\n\t\t\t\t\tvar markerStart = zones[i];\r\n\t\t\t\t\tvar markerEnd = zones[i+1];\r\n\t\t\t\t\tif (markerStarteventStart) {\r\n\t\t\t\t\t\tif(typeof on_overlap == \"function\"){\r\n\t\t\t\t\t\t\t//handler allows to cancel overlapping\r\n\t\t\t\t\t\t\t//actually needed only to keep default behavior of limits\r\n\t\t\t\t\t\t\tres = on_overlap(ev, eventStart, eventEnd, markerStart, markerEnd);//event object, event start/end minutes in 'zones' format, zone start/end minutes\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tres = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(!res)\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn !res;\r\n\t};\r\n\tvar blocker = scheduler.checkLimitViolation = function(event){\r\n\t\tif(!event)\r\n\t\t\treturn true;\r\n\t\tif (!scheduler.config.check_limits)\r\n\t\t\treturn true;\r\n\t\tvar s = scheduler;\r\n\t\tvar c = s.config;\r\n\t\tvar evs = [];\r\n\t\tif (event.rec_type) {\r\n\t\t\tvar dates = scheduler.getRecDates(event);\r\n\t\t\tfor(var i=0; i < dates.length; i++){\r\n\t\t\t\tvar ev = scheduler._copy_event(event);\r\n\t\t\t\tscheduler._lame_copy(ev, dates[i]);\r\n\t\t\t\tevs.push(ev);\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\tevs = [event];\r\n\t\t}\r\n\r\n\t\tvar complete_res = true;\r\n\t\tfor (var p=0; p= c.limit_start.valueOf() && ev.end_date.valueOf() <= c.limit_end.valueOf()) : true;\r\n\t\t\tif (res){\r\n\t\t\t\tres = !scheduler.checkInMarkedTimespan(ev, dhx_time_block, function(event, eventStart, eventEnd, markerStart, markerEnd){\r\n\t\t\t\t\t//try crop event to allow placing\r\n\t\t\t\t\tvar allow = true;\r\n\t\t\t\t\tif (eventStart<=markerEnd && eventStart >= markerStart){\r\n\t\t\t\t\t\tif (markerEnd == 24*60 || eventEnd <= markerEnd){\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(event._timed && s._drag_id && s._drag_mode == \"new-size\"){\r\n\t\t\t\t\t\t\tevent.start_date.setHours(0);\r\n\t\t\t\t\t\t\tevent.start_date.setMinutes(markerEnd);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ((eventEnd >= markerStart && eventEnd <= markerEnd) || (eventStart < markerStart && eventEnd > markerEnd)){\r\n\t\t\t\t\t\tif(event._timed && s._drag_id && s._drag_mode == \"new-size\"){\r\n\t\t\t\t\t\t\tevent.end_date.setHours(0);\r\n\t\t\t\t\t\t\tevent.end_date.setMinutes(markerStart);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn allow;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\tif (!res) {\r\n\t\t\t\tres = (s.checkEvent(\"onLimitViolation\")) ? s.callEvent(\"onLimitViolation\",[ev.id, ev]) : res;\r\n\t\t\t}\r\n\t\t\tcomplete_res = complete_res && res;\r\n\t\t}\r\n\t\tif(!complete_res){\r\n\t\t\ts._drag_id = null;\r\n\t\t\ts._drag_mode = null;\r\n\t\t}\r\n\t\treturn complete_res;\r\n\r\n\r\n\t};\r\n\tscheduler._get_blocked_zones = function(timespans, property, day_index, day_value, timespan_type){\r\n\t\tvar zones =[];\r\n\t\tif (timespans && timespans[property]) {\r\n\t\t\tvar timeline_zones = timespans[property];\r\n\t\t\tvar blocked_timeline_zones = this._get_relevant_blocked_zones(day_index, day_value, timeline_zones, timespan_type);\r\n\t\t\tfor (var i=0; i= scheduler.config.limit_end.valueOf()) {\r\n\t\t\t\tev.start_date = this.date.add(scheduler.config.limit_end, -1, \"day\");\r\n\t\t\t}\r\n\t\t\tif (ev.end_date < scheduler.config.limit_start) {\r\n\t\t\t\tev.end_date = new Date(scheduler.config.limit_start);\r\n\t\t\t}\r\n\t\t\tif (ev.end_date.valueOf() >= scheduler.config.limit_end.valueOf()) {\r\n\t\t\t\tev.end_date = this.date.add(scheduler.config.limit_end, -1, \"day\");\r\n\t\t\t}\r\n\t\t\tif (ev.start_date.valueOf() >= ev.end_date.valueOf()) {\r\n\t\t\t\tev.end_date = this.date.add(ev.start_date, (this.config.event_duration||this.config.time_step), \"minute\");\r\n\t\t\t}\r\n\t\t\tev._timed=this.isOneDayEvent(ev);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventChanged\",function(id){\r\n\t\tif (!id) return true;\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tif (!blocker(ev)){\r\n\t\t\tif (!before) return false;\r\n\t\t\tev.start_date = before[0];\r\n\t\t\tev.end_date = before[1];\r\n\t\t\tev._timed=this.isOneDayEvent(ev);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onBeforeEventChanged\",function(ev, native_object, is_new){\r\n\t\treturn blocker(ev);\r\n\t});\r\n\tscheduler.attachEvent(\"onBeforeEventCreated\", function(ev) { // native event\r\n\t\tvar start_date = scheduler.getActionData(ev).date;\r\n\t\tvar event = {\r\n\t\t\t_timed: true,\r\n\t\t\tstart_date: start_date,\r\n\t\t\tend_date: scheduler.date.add(start_date, scheduler.config.time_step, \"minute\")\r\n\t\t};\r\n\t\treturn blocker(event);\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", function(){\r\n\t\tscheduler._mark_now();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onAfterSchedulerResize\", function(){\r\n\t\twindow.setTimeout(function(){ \r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler._mark_now(); \r\n\t\t}, 1);\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\t\tscheduler._mark_now_timer = window.setInterval(function() {\r\n\t\t\tif(!scheduler._is_initialized())\r\n\t\t\t\treturn;\r\n\t\t\tscheduler._mark_now();\r\n\t\t}, 60000);\r\n\t});\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tclearInterval(scheduler._mark_now_timer);\r\n\t});\r\n\tscheduler._mark_now = function(hide) {\r\n\t\t// day, week, units views\r\n\t\tvar dhx_now_time = 'dhx_now_time';\r\n\t\tif (!this._els[dhx_now_time]) {\r\n\t\t\tthis._els[dhx_now_time] = [];\r\n\t\t}\r\n\t\tvar now = scheduler._currentDate();\r\n\t\tvar cfg = this.config;\r\n\t\tscheduler._remove_mark_now(); // delete previous marks if they exist\r\n\t\tif (!hide && cfg.mark_now && now < this._max_date && now > this._min_date && now.getHours() >= cfg.first_hour && now.getHours() 1) {\r\n\t\t\t\t\tif(view.size && view.options.length){\r\n\t\t\t\t\t\tday_index = ((view.position+ day_index) / view.options.length) * view.size;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstart_index = day_index;\r\n\t\t\t\t\tend_index = day_index + units_l;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tstart_index = 0;\r\n\t\t\t\t\tend_index = start_index + units_l;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar r_divs = [];\r\n\r\n\t\t\t\tfor (var i = start_index; i < end_index; i++) {\r\n\t\t\t\t\tvar t_day = i; // as each unit is actually considered +1 day\r\n\t\t\t\t\toptions.days = t_day;\r\n\t\t\t\t\tvar t_div = scheduler._render_marked_timespan(options, null, t_day)[0];\r\n\t\t\t\t\tr_divs.push(t_div);\r\n\t\t\t\t}\r\n\t\t\t\treturn r_divs;\r\n\t\t\t} else { // day/week views\r\n\t\t\t\toptions.days = day_index;\r\n\t\t\t\treturn scheduler._render_marked_timespan(options, null, day_index);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\toptions.days = +scheduler.date.date_part(now);\r\n\t\t\t\treturn scheduler._render_marked_timespan(options, null, null);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\tscheduler._remove_mark_now = function() {\r\n\t\tvar dhx_now_time = 'dhx_now_time';\r\n\t\tvar els = this._els[dhx_now_time];\r\n\t\tfor (var i=0; i config.start_date) || (config.days !== undefined && config.zones)) && !config.type )\r\n\t\t\treturn r_configs; // incorrect config was provided\r\n\r\n\t\tvar min = 0;\r\n\t\tvar max = 24*60;\r\n\t\tif (config.zones == \"fullday\")\r\n\t\t\tconfig.zones = [min, max];\r\n\t\tif (config.zones && config.invert_zones) {\r\n\t\t\tconfig.zones = scheduler.invertZones(config.zones);\r\n\t\t}\r\n\r\n\t\tconfig.id = scheduler.uid();\r\n\t\tconfig.css = config.css||\"\";\r\n\t\tconfig.type = config.type||default_timespan_type;\r\n\r\n\t\tvar sections = config.sections;\r\n\t\tif (sections) {\r\n\t\t\tfor (var view_key in sections) {\r\n\t\t\t\tif (sections.hasOwnProperty(view_key)) {\r\n\t\t\t\t\tvar ids = sections[view_key];\r\n\t\t\t\t\tif (!(ids instanceof Array))\r\n\t\t\t\t\t\tids = [ids];\r\n\t\t\t\t\tfor (var i=0; i t_sd) ? scheduler._get_zone_minutes(start_date) : min;\r\n\t\t\t\t\tvar zone_end = ( end_date > t_ed || end_date.getDate() != t_sd.getDate() ) ? max : scheduler._get_zone_minutes(end_date);\r\n\t\t\t\t\tt_config.zones = [zone_start, zone_end];\r\n\t\t\t\t\tr_configs.push(t_config);\r\n\r\n\t\t\t\t\tt_sd = t_ed;\r\n\t\t\t\t\tt_ed = scheduler.date.add(t_ed, 1, \"day\");\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (c_config.days instanceof Date)\r\n\t\t\t\t\tc_config.days = (scheduler.date.date_part(c_config.days)).valueOf();\r\n\t\t\t\tc_config.zones = config.zones.slice();\r\n\t\t\t\tr_configs.push(c_config);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn r_configs;\r\n\t};\r\n\tscheduler._get_dates_by_index = function(index, start, end) {\r\n\t\tvar dates = [];\r\n\t\tstart = scheduler.date.date_part(new Date(start||scheduler._min_date));\r\n\t\tend = new Date(end||scheduler._max_date);\r\n\t\tvar start_day = start.getDay();\r\n\t\tvar delta = (index-start_day >= 0) ? (index-start_day) : (7-start.getDay()+index);\r\n\t\tvar t_date = scheduler.date.add(start, delta, \"day\");\r\n\t\tfor (; t_date < end; t_date = scheduler.date.add(t_date, 1, \"week\")) {\r\n\t\t\tdates.push(t_date);\r\n\t\t}\r\n\t\treturn dates;\r\n\t};\r\n\tscheduler._get_css_classes_by_config = function(config) {\r\n\t\tvar css_classes = [];\r\n\t\tif (config.type == dhx_time_block) {\r\n\t\t\tcss_classes.push(dhx_time_block);\r\n\t\t\tif (config.css)\r\n\t\t\t\tcss_classes.push(dhx_time_block+\"_reset\");\r\n\t\t}\r\n\t\tcss_classes.push(\"dhx_marked_timespan\", config.css);\r\n\t\treturn css_classes.join(\" \");\r\n\t};\r\n\tscheduler._get_block_by_config = function(config) {\r\n\t\tvar block = document.createElement(\"div\");\r\n\t\tif (config.html) {\r\n\t\t\tif (typeof config.html == \"string\")\r\n\t\t\t\tblock.innerHTML = config.html;\r\n\t\t\telse\r\n\t\t\t\tblock.appendChild(config.html);\r\n\t\t}\r\n\t\treturn block;\r\n\t};\r\n\tscheduler._render_marked_timespan = function(options, area, day) {\r\n\t\tvar blocks = []; // resulting block which will be rendered and returned\r\n\t\tvar c = scheduler.config;\r\n\t\tvar min_date = this._min_date;\r\n\t\tvar max_date = this._max_date;\r\n\t\tvar day_value = false; // if timespan for specific date should be displayed\r\n\r\n\t\tif (!c.display_marked_timespans)\r\n\t\t\treturn blocks;\r\n\r\n\t\t// in case of markTimespan\r\n\t\tif (!day && day !== 0) {\r\n\t\t\tif (options.days < 7)\r\n\t\t\t\tday = options.days;\r\n\t\t\telse {\r\n\t\t\t\tvar date_to_display = new Date(options.days);\r\n\t\t\t\tday_value = +date_to_display;\r\n\r\n\t\t\t\t// in case of markTimespan date could be not in the viewing range, need to return\r\n\t\t\t\tif ( !(+max_date > +date_to_display && +min_date <= +date_to_display) )\r\n\t\t\t\t\treturn blocks;\r\n\r\n\t\t\t\tday = date_to_display.getDay();\r\n\t\t\t}\r\n\r\n\t\t\t// convert day default index (Sun - 0, Sat - 6) to index of hourscales (depends on week_start and config.start_on_monday)\r\n\t\t\tvar min_day = min_date.getDay();\r\n\t\t\tif (min_day > day) {\r\n\t\t\t\tday = 7 - (min_day-day);\r\n\t\t\t} else {\r\n\t\t\t\tday = day - min_day;\r\n\t\t\t}\r\n\t\t}\r\n\t\tvar zones = options.zones;\r\n\t\tvar css_classes = scheduler._get_css_classes_by_config(options);\r\n\r\n\t\tif (scheduler._table_view && scheduler._mode == \"month\") {\r\n\t\t\tvar areas = [];\r\n\t\t\tvar days = [];\r\n\r\n\r\n\t\t\tif (!area) {\r\n\t\t\t\tdays = (day_value) ? [day_value] : scheduler._get_dates_by_index(day);\r\n\t\t\t\tfor (var i=0; i < days.length; i++) {\r\n\t\t\t\t\tareas.push( this._scales[days[i]] );\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tareas.push(area);\r\n\t\t\t\tdays.push(day);\r\n\t\t\t}\r\n\r\n\t\t\tfor (var i=0; i < areas.length; i++) {\r\n\t\t\t\tarea = areas[i];\r\n\t\t\t\tday = days[i];\r\n\r\n\t\t\t\tvar sday = this.locate_holder_day(day, false) % this._cols.length;\r\n\r\n\t\t\t\tif(this._ignores[sday]) continue;\r\n\r\n\t\t\t\tvar block_proto = scheduler._get_block_by_config(options);\r\n\t\t\t\tblock_proto.className = css_classes;\r\n\t\t\t\tblock_proto.style.top = \"0px\";\r\n\t\t\t\tblock_proto.style.height = \"100%\";\r\n\t\t\t\t\r\n\t\t\t\tfor (var k=0; k < zones.length; k+=2) {\r\n\t\t\t\t\tvar start = zones[i];\r\n\t\t\t\t\tvar end = zones[i+1];\r\n\t\t\t\t\tif (end <= start)\r\n\t\t\t\t\t\treturn [];\r\n\r\n\t\t\t\t\tvar block = block_proto.cloneNode(true);\r\n\r\n\t\t\t\t\tblock.style.left = \"0px\";\r\n\t\t\t\t\tblock.style.width = \"100%\";\r\n\r\n\t\t\t\t\tarea.appendChild(block);\r\n\t\t\t\t\tblocks.push(block);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tvar index = day;\r\n\r\n\t\t\tif(this._ignores[this.locate_holder_day(day, false)]) return blocks;\r\n\r\n\t\t\tif (this._props && this._props[this._mode] && options.sections && options.sections[this._mode]) {\r\n\t\t\t\tvar view = this._props[this._mode];\r\n\t\t\t\tindex = view.order[options.sections[this._mode]];\r\n\r\n\t\t\t\tvar inner_index = view.order[options.sections[this._mode]];\r\n\t\t\t\tif(!(view.days > 1)){\r\n\t\t\t\t\tindex = inner_index;\r\n\t\t\t\t\tif (view.size && (index > view.position+view.size)) {\r\n\t\t\t\t\t\tindex = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar units_l = view.size || view.options.length;\r\n\t\t\t\t\tindex = index*units_l + inner_index;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tarea = area ? area : scheduler.locate_holder(index);\r\n\r\n\t\t\tfor (var i = 0; i < zones.length; i+=2){\r\n\t\t\t\tvar start = Math.max(zones[i], c.first_hour*60);\r\n\t\t\t\tvar end = Math.min(zones[i+1], c.last_hour*60);\r\n\t\t\t\tif (end <= start) {\r\n\t\t\t\t\tif (i+2 < zones.length)\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\treturn [];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar block = scheduler._get_block_by_config(options);\r\n\t\t\t\tblock.className = css_classes;\r\n\r\n\t\t\t\t// +1 for working with section which really takes up whole height (as % would be == 0)\r\n\t\t\t\tvar all_hours_height = this.config.hour_size_px*24 + 1;\r\n\t\t\t\tvar hour_ms = 60*60*1000;\r\n\t\t\t\tblock.style.top = (Math.round((start*60*1000-this.config.first_hour*hour_ms)*this.config.hour_size_px/hour_ms) % all_hours_height) + \"px\";\r\n\t\t\t\tblock.style.height = Math.max((Math.round(((end-start)*60*1000)*this.config.hour_size_px/hour_ms)) % all_hours_height, 1)+\"px\";\r\n\r\n\t\t\t\tarea.appendChild(block);\r\n\t\t\t\tblocks.push(block);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn blocks;\r\n\t};\r\n\r\n\tscheduler._mark_timespans = function(){\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\t\tvar divs = [];\r\n\t\tif (scheduler._table_view && scheduler._mode == \"month\"){\r\n\t\t\tfor (var day in this._scales) {\r\n\t\t\t\tvar date = new Date(+day);\r\n\t\t\t\tdivs.push.apply(divs, scheduler._on_scale_add_marker(this._scales[day],date));\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\t//manually trigger rendering of configs for each column\r\n\t\t\tvar date = new Date(scheduler._min_date);\r\n\t\t\tfor (var i = 0, len = data.childNodes.length; i < len; i++) {\r\n\t\t\t\tvar area = data.childNodes[i];\r\n\t\t\t\tif (area.firstChild && scheduler._getClassName(area.firstChild).indexOf(\"dhx_scale_hour\") > -1) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdivs.push.apply(divs, scheduler._on_scale_add_marker(area, date));\r\n\t\t\t\tdate = scheduler.date.add(date, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn divs;\r\n\t};\r\n\r\n\t// just marks timespan, will be cleaned after refresh\r\n\tscheduler.markTimespan = function(configuration) {\r\n\r\n\t\tif(!this._els){\r\n\t\t\tthrow new Error(\"`scheduler.markTimespan` can't be used before scheduler initialization. Place `scheduler.markTimespan` call after `scheduler.init`.\");\r\n\t\t}\r\n\r\n\t\tvar rebuild_els = false;\r\n\t\tif(!this._els[\"dhx_cal_data\"]){\r\n\t\t\tscheduler.get_elements();\r\n\t\t\trebuild_els = true;\r\n\t\t}\r\n\r\n\r\n\t\t// backup regular marked timespans\r\n\t\tvar timespans_ids = scheduler._marked_timespans_ids,\r\n\t\t\ttimespan_types = scheduler._marked_timespans_types,\r\n\t\t\ttimespans = scheduler._marked_timespans;\r\n\r\n\t\tscheduler.deleteMarkedTimespan();\r\n\r\n\t\t//add block to configs\r\n\t\tscheduler.addMarkedTimespan(configuration);\r\n\r\n\t\tvar divs = scheduler._mark_timespans();\r\n\r\n\t\tif(rebuild_els)\r\n\t\t\tscheduler._els = [];\r\n\r\n\t\t// restore timespan config\r\n\t\tscheduler._marked_timespans_ids = timespans_ids;\r\n\t\tscheduler._marked_timespans_types = timespan_types;\r\n\t\tscheduler._marked_timespans = timespans;\r\n\r\n\t\treturn divs;\r\n\t};\r\n\tscheduler.unmarkTimespan = function(divs) {\r\n\t\tif (!divs)\r\n\t\t\treturn;\r\n\t\tfor (var i=0; i c_zone_end && zone_start <= c_zone_end) || (zone_start < c_zone_start && zone_end >= c_zone_start)) {\r\n\t\t\t\t\tresulting_zones[i] = Math.min(c_zone_start, zone_start);\r\n\t\t\t\t\tresulting_zones[i+1] = Math.max(c_zone_end, zone_end);\r\n\t\t\t\t\ti -= 2;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (!isLast) // do nothing, maybe next current zone will match or will be last\r\n\t\t\t\t\t\tcontinue;\r\n\r\n\t\t\t\t\tvar offset = (c_zone_start > zone_start)?0:2;\r\n\t\t\t\t\tresulting_zones.splice(i+offset, 0, zone_start, zone_end); // last current zone, need to add another\r\n\t\t\t\t}\r\n\t\t\t\tzones.splice(k--,2); // zone was merged or added, need to exclude it\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn resulting_zones;\r\n\t};\r\n\tscheduler._subtract_timespan_zones = function(current_zones, zones) {\r\n\t\tvar resulting_zones = current_zones.slice();\r\n\t\tfor (var i=0; i c_zone_start && zone_start < c_zone_end) {\r\n\t\t\t\t\tvar is_modified = false;\r\n\t\t\t\t\tif (c_zone_start >= zone_start && c_zone_end <= zone_end) {\r\n\t\t\t\t\t\tresulting_zones.splice(i, 2);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (c_zone_start < zone_start) {\r\n\t\t\t\t\t\tresulting_zones.splice(i, 2, c_zone_start, zone_start);\r\n\t\t\t\t\t\tis_modified = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (c_zone_end > zone_end) {\r\n\t\t\t\t\t\tresulting_zones.splice( (is_modified)?(i+2):i, (is_modified)?0:2, zone_end, c_zone_end);\r\n\t\t\t\t\t}\r\n\t\t\t\t\ti -= 2;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn resulting_zones;\r\n\t};\r\n\tscheduler.invertZones = function(zones) {\r\n\t\treturn scheduler._subtract_timespan_zones([0, 1440], zones.slice());\r\n\t};\r\n\tscheduler._delete_marked_timespan_by_id = function(id) {\r\n\t\tvar configs = scheduler._marked_timespans_ids[id];\r\n\t\tif (configs) {\r\n\t\t\tfor (var i=0; i 1)){\r\n\t\t\t\tday = scheduler.date.date_part(new Date(this._date)); // for units view actually only 1 day is displayed yet the day variable will change, need to use this._date for all calls\r\n\t\t\t}else{\r\n\t\t\t\tvar dx = 24*60*60*1000;\r\n\t\t\t\tvar day_ind = Math.round((day - scheduler._min_date)/dx);\r\n\t\t\t\tvar unitsPerDay = view.size || units.length;\r\n\t\t\t\tday = scheduler.date.add(scheduler._min_date, Math.floor(day_ind/unitsPerDay), \"day\"); // to the \"same\" day for all sections\r\n\t\t\t\tday = scheduler.date.date_part(day);\r\n\t\t\t}\r\n\t\t\tday_index = day.getDay();\r\n\t\t\tday_value = day.valueOf();\r\n\r\n\t\t\tif (timespans[mode] && timespans[mode][unit.key]) {\r\n\t\t\t\tvar unit_zones = timespans[mode][unit.key];\r\n\t\t\t\tvar unit_types = scheduler._get_types_to_render(unit_zones[day_index], unit_zones[day_value]);\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(unit_types));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar global_data = timespans[\"global\"];\r\n\r\n\t\tif(scheduler.config.overwrite_marked_timespans){\r\n\t\t\tvar day_types = global_data[day_value]||global_data[day_index];\r\n\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(day_types));\r\n\t\t} else {\r\n\t\t\tif(global_data[day_value]){\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(global_data[day_value]));\r\n\t\t\t}\r\n\t\t\tif(global_data[day_index]){\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(global_data[day_index]));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (var i=0; i\" + ev.text + \"

\" + (ev.event_location || '') + \"

\" + scheduler.templates.marker_date(start) + \" - \" + scheduler.templates.marker_date(end) + \"\";\r\n};\r\nscheduler.dblclick_dhx_map_area = function() {\r\n\tif (!this.config.readonly && this.config.dblclick_create)\r\n\t\tthis.addEventNow({\r\n\t\t\tstart_date: scheduler._date,\r\n\t\t\tend_date: scheduler.date.add(scheduler._date, scheduler.config.time_step, \"minute\")\r\n\t\t});\r\n};\r\nscheduler.templates.map_time = function(start, end, ev) {\r\n\tif (scheduler.config.rtl && !ev._timed) {\r\n\t\treturn scheduler.templates.day_date(end) + \" – \" + scheduler.templates.day_date(start);\r\n\t} else if (ev._timed) {\r\n\t\treturn this.day_date(ev.start_date, ev.end_date, ev) + \" \" + this.event_date(start);\r\n\t} else {\r\n\t\treturn scheduler.templates.day_date(start) + \" – \" + scheduler.templates.day_date(end);\r\n\t}\r\n};\r\nscheduler.templates.map_text = function(start, end, ev) {\r\n\treturn ev.text;\r\n};\r\n\r\nscheduler.date.map_start = function(d) {\r\n\treturn d;\r\n};\r\nscheduler.date.add_map = function(date, inc, mode) {\r\n\treturn (new Date(date.valueOf()));\r\n};\r\n\r\nscheduler.templates.map_date = function(dd, ed, mode) {\r\n\treturn '';\r\n};\r\n\r\nscheduler._latLngUpdate = false; // flag for not displaying event second time in case of coordinates update\r\n\r\nscheduler.attachEvent(\"onSchedulerReady\", function() {\r\n\tscheduler._isMapPositionSet = false; // if user actual (geolocation) position was set on the map\r\n\r\n\tconst gmap = document.createElement('div');\r\n\tgmap.className = 'dhx_map';\r\n\tgmap.id = 'dhx_gmap';\r\n\tgmap.style.display = \"none\";\r\n\r\n\tscheduler._obj.appendChild(gmap);\r\n\r\n\tscheduler._els.dhx_gmap = [];\r\n\tscheduler._els.dhx_gmap.push(gmap);\r\n\r\n\t_setMapSize('dhx_gmap');\r\n\r\n\tconst mapOptions = {\r\n\t\tzoom: scheduler.config.map_initial_zoom || 10,\r\n\t\tcenter: scheduler.config.map_initial_position,\r\n\t\tmapTypeId: scheduler.config.map_type || google.maps.MapTypeId.ROADMAP\r\n\t};\r\n\tconst map = new google.maps.Map(document.getElementById('dhx_gmap'), mapOptions);\r\n\tmap.disableDefaultUI = false;\r\n\tmap.disableDoubleClickZoom = !scheduler.config.readonly;\r\n\r\n\tgoogle.maps.event.addListener(map, \"dblclick\", function(event) {\r\n\t\tconst geocoder = scheduler.ext.mapView.geocoder;\r\n\r\n\t\tif (!scheduler.config.readonly && scheduler.config.dblclick_create) {\r\n\t\t\tvar point = event.latLng;\r\n\t\t\tgeocoder.geocode(\r\n\t\t\t\t{ 'latLng': point },\r\n\t\t\t\tfunction(results, status) {\r\n\t\t\t\t\tif (status == google.maps.GeocoderStatus.OK) {\r\n\t\t\t\t\t\tpoint = results[0].geometry.location;\r\n\t\t\t\t\t\tscheduler.addEventNow({\r\n\t\t\t\t\t\t\tlat: point.lat(),\r\n\t\t\t\t\t\t\tlng: point.lng(),\r\n\t\t\t\t\t\t\tevent_location: results[0].formatted_address,\r\n\t\t\t\t\t\t\tstart_date: scheduler._date,\r\n\t\t\t\t\t\t\tend_date: scheduler.date.add(scheduler._date, scheduler.config.time_step, \"minute\")\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t}\r\n\t});\r\n\r\n\tvar infoWindowOptions = {\r\n\t\tcontent: ''\r\n\t};\r\n\r\n\tif (scheduler.config.map_infowindow_max_width) {\r\n\t\tinfoWindowOptions.maxWidth = scheduler.config.map_infowindow_max_width;\r\n\t}\r\n\r\n\tscheduler.map = {\r\n\t\t_points: [],\r\n\t\t_markers: [],\r\n\t\t_infowindow: new google.maps.InfoWindow(infoWindowOptions),\r\n\t\t_infowindows_content: [],\r\n\t\t_initialization_count: -1,\r\n\t\t_obj: map\r\n\t};\r\n\r\n\tscheduler.ext.mapView.geocoder = new google.maps.Geocoder();\r\n\tscheduler.ext.mapView.map = map;\r\n\tscheduler.ext.mapView.points = scheduler.map._points;\r\n\tscheduler.ext.mapView.markers = scheduler.map._markers;\r\n\tscheduler.ext.mapView.infoWindow = scheduler.map._infowindow;\r\n\r\n\tif (scheduler.config.map_resolve_user_location) {\r\n\t\tif (navigator.geolocation) {\r\n\t\t\tif (!scheduler._isMapPositionSet) {\r\n\t\t\t\tnavigator.geolocation.getCurrentPosition(function(position) {\r\n\t\t\t\t\tvar _userLocation = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);\r\n\t\t\t\t\tmap.setCenter(_userLocation);\r\n\t\t\t\t\tmap.setZoom(scheduler.config.map_zoom_after_resolve || 10);\r\n\t\t\t\t\tscheduler.map._infowindow.setContent(scheduler.locale.labels.marker_geo_success);\r\n\t\t\t\t\tscheduler.map._infowindow.position = map.getCenter();\r\n\t\t\t\t\tscheduler.map._infowindow.open(map);\r\n\r\n\t\t\t\t\tscheduler._isMapPositionSet = true;\r\n\t\t\t\t},\r\n\t\t\t\t\t\tfunction() {\r\n\t\t\t\t\t\t\tscheduler.map._infowindow.setContent(scheduler.locale.labels.marker_geo_fail);\r\n\t\t\t\t\t\t\tscheduler.map._infowindow.setPosition(map.getCenter());\r\n\t\t\t\t\t\t\tscheduler.map._infowindow.open(map);\r\n\t\t\t\t\t\t\tscheduler._isMapPositionSet = true;\r\n\t\t\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tgoogle.maps.event.addListener(map, \"resize\", function(event) {\r\n\t\tgmap.style.zIndex = '5';\r\n\t\tmap.setZoom(map.getZoom());\r\n\r\n\t});\r\n\tgoogle.maps.event.addListener(map, \"tilesloaded\", function(event) {\r\n\t\tgmap.style.zIndex = '5';\r\n\t});\r\n\r\n\tgmap.style.display = 'none'; // property was changed after attaching map\r\n\r\n\tconst old = scheduler.render_data;\r\n\tscheduler.render_data = function(evs, hold) {\r\n\t\tif (this._mode == \"map\") {\r\n\t\t\tfill_map_tab();\r\n\t\t\tvar events = scheduler.get_visible_events();\r\n\t\t\tfor (var i = 0; i < events.length; i++) {\r\n\t\t\t\tif (!scheduler.map._markers[events[i].id]) {\r\n\t\t\t\t\tshowAddress(events[i], false, false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else\r\n\t\t\treturn old.apply(this, arguments);\r\n\t};\r\n\r\n\tfunction set_full_view(mode) {\r\n\t\tif (mode) {\r\n\t\t\tvar l = scheduler.locale.labels;\r\n\t\t\tscheduler._els[\"dhx_cal_header\"][0].innerHTML = \"
\" + l.date + \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"
\" + l.description + \"
\";\r\n\t\t\tscheduler._table_view = true;\r\n\t\t\tscheduler.set_sizes();\r\n\t\t}\r\n\t}\r\n\r\n\tfunction clear_map_tab() {\r\n\t\tscheduler._selected_event_id = null;\r\n\t\tscheduler.map._infowindow.close();\r\n\t\tvar markers = scheduler.map._markers;\r\n\t\tfor (var key in markers) {\r\n\t\t\tif (markers.hasOwnProperty(key)) {\r\n\t\t\t\tmarkers[key].setMap(null);\r\n\t\t\t\tdelete scheduler.map._markers[key];\r\n\t\t\t\tif (scheduler.map._infowindows_content[key])\r\n\t\t\t\t\tdelete scheduler.map._infowindows_content[key];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction fill_map_tab() {\r\n\t\t//select events for which data need to be printed\r\n\t\tvar events = scheduler.get_visible_events();\r\n\t\tevents.sort(function(a, b) {\r\n\t\t\tif(a.start_date.valueOf()==b.start_date.valueOf())\r\n\t\t\t\treturn a.id>b.id?1:-1;\r\n\t\t\treturn a.start_date>b.start_date?1:-1;\r\n\t\t});\r\n\r\n\t\t//generate html for the view\r\n\t\tvar ariaAttr = scheduler._waiAria.mapAttrString();\r\n\r\n\t\tvar html = \"
\";\r\n\t\tfor (var i = 0; i < events.length; i++) {\r\n\t\t\tvar ev = events[i];\r\n\t\t\tvar event_class = (ev.id == scheduler._selected_event_id) ? 'dhx_map_line highlight' : 'dhx_map_line';\r\n\t\t\tvar bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\t\t\tvar color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\t\t\tvar ariaAttr = scheduler._waiAria.mapRowAttrString(ev);\r\n\t\t\tvar ariaButtonAttr = scheduler._waiAria.mapDetailsBtnString();\r\n\r\n\t\t\thtml += \"
\" + scheduler.templates.map_time(ev.start_date, ev.end_date, ev) + \"
\";\r\n\t\t\thtml += `
\r\n\t\t\t\r\n\t\t\t
`;\r\n\t\t\thtml += \"
\" + scheduler.templates.map_text(ev.start_date, ev.end_date, ev) + \"
\"; // -25 = icon size 20 and padding 5\r\n\t\t}\r\n\t\thtml += \"
\";\r\n\r\n\t\t//render html\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = 0; //fix flickering in FF\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t//\tscheduler._els[\"dhx_cal_data\"][0].style.width = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\r\n\t\tvar t = scheduler._els[\"dhx_cal_data\"][0].firstChild.childNodes;\r\n\r\n\t\tvar dateElement = scheduler._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML=scheduler.templates[scheduler._mode + \"_date\"](scheduler._min_date, scheduler._max_date, scheduler._mode);\r\n\t\t}\r\n\r\n\t\tscheduler._rendered = [];\r\n\t\tfor (var i = 0; i < t.length - 2; i++) {\r\n\t\t\tscheduler._rendered[i] = t[i];\r\n\t\t}\r\n\t}\r\n\r\n\tfunction _setMapSize(elem_id) { //input - map's div id\r\n\t\tvar map = document.getElementById(elem_id);\r\n\t\tconst nav_height = scheduler.$container.querySelector(\".dhx_cal_navline\").offsetHeight;\r\n\t\tvar height = scheduler._y - nav_height;\r\n\t\tif (height < 0)\r\n\t\t\theight = 0;\r\n\t\tvar width = scheduler._x - scheduler.xy.map_date_width - scheduler.xy.map_description_width - 1;\r\n\t\tif (width < 0)\r\n\t\t\twidth = 0;\r\n\t\tmap.style.height = height + 'px';\r\n\t\tmap.style.width = width + 'px';\r\n\t\tmap.style.position = \"absolute\";\r\n\t\tmap.style.top = nav_height + \"px\";\r\n\t\tif (scheduler.config.rtl) {\r\n\t\t\tmap.style.marginRight = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\t\t} else {\r\n\t\t\tmap.style.marginLeft = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\t\t}\r\n\t\tmap.style.marginTop = (scheduler.xy.nav_height + 2) + 'px';\r\n\t}\r\n\r\n\tscheduler.map_view = function(mode) {\r\n\t\tscheduler.map._initialization_count++;\r\n\t\tvar gmap = scheduler._els.dhx_gmap[0];\r\n\t\tvar temp_center;\r\n\t\t//scheduler._els.dhx_cal_data[0].style.width = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\r\n\t\tscheduler._min_date = scheduler.config.map_start || (scheduler._currentDate());\r\n\t\tscheduler._max_date = scheduler.config.map_end || scheduler.date.add(scheduler._currentDate(), 1, \"year\");\r\n\r\n\t\tscheduler._table_view = true;\r\n\t\tset_full_view(mode);\r\n\r\n\t\tif (mode) { //map tab activated\r\n\t\t\tclear_map_tab();\r\n\t\t\tfill_map_tab();\r\n\t\t\tgmap.style.display = 'block';\r\n\r\n\t\t\t// need to resize block every time window is resized\r\n\t\t\t_setMapSize('dhx_gmap');\r\n\t\t\ttemp_center = scheduler.map._obj.getCenter();\r\n\r\n\t\t\tvar events = scheduler.get_visible_events();\r\n\t\t\tfor (var i = 0; i < events.length; i++) {\r\n\t\t\t\tif (!scheduler.map._markers[events[i].id]) {\r\n\t\t\t\t\tshowAddress(events[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t} else { //map tab de-activated\r\n\t\t\tgmap.style.display = 'none';\r\n\t\t}\r\n\t\tgoogle.maps.event.trigger(scheduler.map._obj, 'resize');\r\n\r\n\t\tif (scheduler.map._initialization_count === 0 && temp_center) { // if tab is activated for the first time need to fix position\r\n\t\t\tscheduler.map._obj.setCenter(temp_center);\r\n\t\t}\r\n\r\n\t\tif (scheduler._selected_event_id) {\r\n\t\t\tselectEvent(scheduler._selected_event_id);\r\n\t\t}\r\n\t};\r\n\r\n\tvar selectEvent = function(event_id) {\r\n\t\tscheduler.map._obj.setCenter(scheduler.map._points[event_id]);\r\n\t\tscheduler.callEvent(\"onClick\", [event_id]);\r\n\t};\r\n\r\n\tvar showAddress = function(event, setCenter, performClick) { // what if event have incorrect position from the start?\r\n\t\tvar point = scheduler.config.map_error_position;\r\n\t\tif (event.lat && event.lng) {\r\n\t\t\tpoint = new google.maps.LatLng(event.lat, event.lng);\r\n\t\t}\r\n\t\tvar message = scheduler.templates.marker_text(event.start_date, event.end_date, event);\r\n\t\tif (!scheduler._new_event) {\r\n\r\n\t\t\tscheduler.map._infowindows_content[event.id] = message;\r\n\r\n\t\t\tif (scheduler.map._markers[event.id])\r\n\t\t\t\tscheduler.map._markers[event.id].setMap(null);\r\n\r\n\t\t\tscheduler.map._markers[event.id] = scheduler.ext.mapView.createMarker({\r\n\t\t\t\tposition: point,\r\n\t\t\t\tmap: scheduler.map._obj\r\n\t\t\t});\r\n\r\n\t\t\tgoogle.maps.event.addListener(scheduler.map._markers[event.id], 'click', function() {\r\n\t\t\t\tscheduler.map._infowindow.setContent(scheduler.map._infowindows_content[event.id]);\r\n\t\t\t\tscheduler.map._infowindow.open(scheduler.map._obj, scheduler.map._markers[event.id]);\r\n\t\t\t\tscheduler._selected_event_id = event.id;\r\n\t\t\t\tscheduler.render_data();\r\n\t\t\t});\r\n\t\t\tscheduler.map._points[event.id] = point;\r\n\r\n\t\t\tif (setCenter) scheduler.map._obj.setCenter(scheduler.map._points[event.id]);\r\n\t\t\tif (performClick) scheduler.callEvent(\"onClick\", [event.id]);\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onClick\", function(id, domEvent) {\r\n\t\tif (this._mode == \"map\") {\r\n\t\t\tscheduler._selected_event_id = id;\r\n\t\t\tfor (var i = 0; i < scheduler._rendered.length; i++) {\r\n\t\t\t\tscheduler._rendered[i].className = 'dhx_map_line';\r\n\t\t\t\tif (scheduler._rendered[i].getAttribute(scheduler.config.event_attribute) == id) {\r\n\t\t\t\t\tscheduler._rendered[i].className += \" highlight\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (scheduler.map._points[id] && scheduler.map._markers[id]) {\r\n\t\t\t\tscheduler.map._obj.setCenter(scheduler.map._points[id]); // was panTo\r\n\t\t\t\tgoogle.maps.event.trigger(scheduler.map._markers[id], 'click');\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tvar _displayEventOnMap = function(event) {\r\n\t\tconst geocoder = scheduler.ext.mapView.geocoder;\r\n\t\tif (event.event_location && geocoder) {\r\n\t\t\tgeocoder.geocode(\r\n\t\t\t\t{\r\n\t\t\t\t\t'address': event.event_location,\r\n\t\t\t\t\t'language': scheduler.uid().toString()\r\n\t\t\t\t},\r\n\t\t\t\tfunction(results, status) {\r\n\t\t\t\t\tvar point = {};\r\n\t\t\t\t\tif (status != google.maps.GeocoderStatus.OK) {\r\n\t\t\t\t\t\tpoint = scheduler.callEvent(\"onLocationError\", [event.id]);\r\n\t\t\t\t\t\tif (!point || point === true)\r\n\t\t\t\t\t\t\tpoint = scheduler.config.map_error_position;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tpoint = results[0].geometry.location;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tevent.lat = point.lat();\r\n\t\t\t\t\tevent.lng = point.lng();\r\n\r\n\t\t\t\t\tscheduler._selected_event_id = event.id;\r\n\r\n\t\t\t\t\tscheduler._latLngUpdate = true;\r\n\t\t\t\t\tscheduler.callEvent(\"onEventChanged\", [event.id, event]);\r\n\t\t\t\t\tshowAddress(event, true, true);\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t} else {\r\n\t\t\tshowAddress(event, true, true);\r\n\t\t}\r\n\t};\r\n\r\n\tvar _updateEventLocation = function(event) { // update lat and lng in database\r\n\t\tconst geocoder = scheduler.ext.mapView.geocoder;\r\n\t\tif (event.event_location && geocoder) {\r\n\t\t\tgeocoder.geocode(\r\n\t\t\t\t{\r\n\t\t\t\t\t'address': event.event_location,\r\n\t\t\t\t\t'language': scheduler.uid().toString()\r\n\t\t\t\t},\r\n\t\t\t\tfunction(results, status) {\r\n\t\t\t\t\tvar point = {};\r\n\t\t\t\t\tif (status != google.maps.GeocoderStatus.OK) {\r\n\t\t\t\t\t\tpoint = scheduler.callEvent(\"onLocationError\", [event.id]);\r\n\t\t\t\t\t\tif (!point || point === true)\r\n\t\t\t\t\t\t\tpoint = scheduler.config.map_error_position;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tpoint = results[0].geometry.location;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tevent.lat = point.lat();\r\n\t\t\t\t\tevent.lng = point.lng();\r\n\t\t\t\t\tscheduler._latLngUpdate = true;\r\n\t\t\t\t\tscheduler.callEvent(\"onEventChanged\", [event.id, event]);\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t}\r\n\t};\r\n\r\n\tvar _delay = function(method, object, params, delay) {\r\n\t\tsetTimeout(function() {\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tvar ret = method.apply(object, params);\r\n\t\t\tmethod = object = params = null;\r\n\t\t\treturn ret;\r\n\t\t}, delay || 1);\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onEventChanged\", function(id, event) {\r\n\t\tif (!this._latLngUpdate) {\r\n\t\t\tvar event = scheduler.getEvent(id);\r\n\t\t\tif ((event.start_date < scheduler._min_date && event.end_date > scheduler._min_date) || (event.start_date < scheduler._max_date && event.end_date > scheduler._max_date) || (event.start_date.valueOf() >= scheduler._min_date && event.end_date.valueOf() <= scheduler._max_date)) {\r\n\t\t\t\tif (scheduler.map._markers[id])\r\n\t\t\t\t\tscheduler.map._markers[id].setMap(null);\r\n\t\t\t\t_displayEventOnMap(event);\r\n\t\t\t} else { // event no longer should be displayed on the map view\r\n\t\t\t\tscheduler._selected_event_id = null;\r\n\t\t\t\tscheduler.map._infowindow.close();\r\n\t\t\t\tif (scheduler.map._markers[id])\r\n\t\t\t\t\tscheduler.map._markers[id].setMap(null);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t\tthis._latLngUpdate = false;\r\n\t\treturn true;\r\n\t});\r\n\r\n\r\n\tscheduler.attachEvent(\"onEventIdChange\", function(old_event_id, new_event_id) {\r\n\t\tvar event = scheduler.getEvent(new_event_id);\r\n\t\tif ((event.start_date < scheduler._min_date && event.end_date > scheduler._min_date) || (event.start_date < scheduler._max_date && event.end_date > scheduler._max_date) || (event.start_date.valueOf() >= scheduler._min_date && event.end_date.valueOf() <= scheduler._max_date)) {\r\n\t\t\tif (scheduler.map._markers[old_event_id]) {\r\n\t\t\t\tscheduler.map._markers[old_event_id].setMap(null);\r\n\t\t\t\tdelete scheduler.map._markers[old_event_id];\r\n\t\t\t}\r\n\t\t\tif (scheduler.map._infowindows_content[old_event_id])\r\n\t\t\t\tdelete scheduler.map._infowindows_content[old_event_id];\r\n\t\t\t_displayEventOnMap(event);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onEventAdded\", function(id, event) {\r\n\t\tif (!scheduler._dataprocessor) {\r\n\t\t\tif ((event.start_date < scheduler._min_date && event.end_date > scheduler._min_date) || (event.start_date < scheduler._max_date && event.end_date > scheduler._max_date) || (event.start_date.valueOf() >= scheduler._min_date && event.end_date.valueOf() <= scheduler._max_date)) {\r\n\t\t\t\tif (scheduler.map._markers[id])\r\n\t\t\t\t\tscheduler.map._markers[id].setMap(null);\r\n\t\t\t\t_displayEventOnMap(event);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\t/* Test/example\r\n\t scheduler.attachEvent(\"onLocationError\", function(event_id,event_object){\r\n\t return new google.maps.LatLng(8, 8);\r\n\t });\r\n\t */\r\n\r\n\tscheduler.attachEvent(\"onBeforeEventDelete\", function(id, event) {\r\n\t\tif (scheduler.map._markers[id]) {\r\n\t\t\tscheduler.map._markers[id].setMap(null); // if new event is deleted tab != map then it doesn't have marker yet\r\n\t\t}\r\n\t\tscheduler._selected_event_id = null;\r\n\t\tscheduler.map._infowindow.close();\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler._event_resolve_delay = 1500;\r\n\tscheduler.attachEvent(\"onEventLoading\", function(event) {\r\n\t\tif (scheduler.config.map_resolve_event_location && event.event_location && !event.lat && !event.lng) { // don't delete !event.lat && !event.lng as location could change\r\n\t\t\tscheduler._event_resolve_delay += 1500;\r\n\t\t\t_delay(_updateEventLocation, this, [event], scheduler._event_resolve_delay);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onEventCancel\", function(id, is_new) {\r\n\t\tif (is_new) {\r\n\t\t\tif (scheduler.map._markers[id])\r\n\t\t\t\tscheduler.map._markers[id].setMap(null);\r\n\t\t\tscheduler.map._infowindow.close();\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nconst minicalDomEvents = scheduler._createDomEventScope();\r\n\t\r\n\r\nscheduler.config.minicalendar = {\r\n\tmark_events: true\r\n};\r\nscheduler._synced_minicalendars = [];\r\nscheduler.renderCalendar = function(obj, _prev, is_refresh) {\r\n\tvar cal = null;\r\n\tvar date = obj.date || (scheduler._currentDate());\r\n\tif (typeof date == \"string\")\r\n\t\tdate = this.templates.api_date(date);\r\n\r\n\tif (!_prev) {\r\n\t\tvar cont = obj.container;\r\n\t\tvar pos = obj.position;\r\n\r\n\t\tif (typeof cont == \"string\")\r\n\t\t\tcont = document.getElementById(cont);\r\n\r\n\t\tif (typeof pos == \"string\")\r\n\t\t\tpos = document.getElementById(pos);\r\n\t\tif (pos && (typeof pos.left == \"undefined\" && typeof pos.right == \"undefined\")) {\r\n\t\t\tvar tpos = scheduler.$domHelpers.getOffset(pos);\r\n\t\t\tpos = {\r\n\t\t\t\ttop: tpos.top + pos.offsetHeight,\r\n\t\t\t\tleft: tpos.left\r\n\t\t\t};\r\n\t\t}\r\n\t\tif (!cont)\r\n\t\t\tcont = scheduler._get_def_cont(pos);\r\n\r\n\t\tcal = this._render_calendar(cont, date, obj);\r\n\t\r\n\t\tif (!cal.$_eventAttached) {\r\n\t\t\tcal.$_eventAttached = true;\r\n\t\t\tminicalDomEvents.attach(cal, \"click\", (function(e) {\r\n\t\t\t\tvar src = e.target || e.srcElement;\r\n\r\n\t\t\t\tvar $dom = scheduler.$domHelpers;\r\n\t\t\t\tif ($dom.closest(src, \".dhx_month_head\")) {\r\n\t\t\t\t\tif (!$dom.closest(src, \".dhx_after\") && !$dom.closest(src, \".dhx_before\")) {\r\n\r\n\t\t\t\t\t\tvar cellRoot = $dom.closest(src, \"[data-cell-date]\");\r\n\t\t\t\t\t\tvar dateAttribute = cellRoot.getAttribute(\"data-cell-date\");\r\n\t\t\t\t\t\tvar newDate = scheduler.templates.parse_date(dateAttribute);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tscheduler.unmarkCalendar(this);\r\n\t\t\t\t\t\tscheduler.markCalendar(this, newDate, \"dhx_calendar_click\");\r\n\t\t\t\t\t\tthis._last_date = newDate;\r\n\t\t\t\t\t\tif (this.conf.handler) this.conf.handler.call(scheduler, newDate, this);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}).bind(cal));\r\n\t\t}\r\n\t\r\n\t} else {\r\n\t\tcal = this._render_calendar(_prev.parentNode, date, obj, _prev);\r\n\t\tscheduler.unmarkCalendar(cal);\r\n\t}\r\n\r\n\tif (scheduler.config.minicalendar.mark_events) {\r\n\t\tvar start = scheduler.date.month_start(date);\r\n\t\tvar end = scheduler.date.add(start, 1, \"month\");\r\n\t\tvar evs = this.getEvents(start, end);\r\n\t\tvar filter = this[\"filter_\" + this._mode];\r\n\t\tvar markedDates = {};\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tif (filter && !filter(ev.id, ev))\r\n\t\t\t\tcontinue;\r\n\t\t\tvar d = ev.start_date;\r\n\t\t\tif (d.valueOf() < start.valueOf())\r\n\t\t\t\td = start;\r\n\t\t\td = scheduler.date.date_part(new Date(d.valueOf()));\r\n\t\t\twhile (d < ev.end_date) {\r\n\t\t\t\tif(!markedDates[+d]) {\r\n\t\t\t\t\tmarkedDates[+d] = true;\r\n\t\t\t\t\tthis.markCalendar(cal, d, \"dhx_year_event\");\r\n\t\t\t\t}\r\n\t\t\t\td = this.date.add(d, 1, \"day\");\r\n\t\t\t\tif (d.valueOf() >= end.valueOf())\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tthis._markCalendarCurrentDate(cal);\r\n\r\n\tcal.conf = obj;\r\n\tif (obj.sync && !is_refresh)\r\n\t\tthis._synced_minicalendars.push(cal);\r\n\r\n\tif(!cal.conf._on_xle_handler){\r\n\t\tcal.conf._on_xle_handler = scheduler.attachEvent(\"onXLE\", function refreshOnLoad(){\r\n\t\t\tscheduler.updateCalendar(cal, cal.conf.date);\r\n\t\t});\r\n\t}\r\n\r\n\tif(this.config.wai_aria_attributes && this.config.wai_aria_application_role){\r\n\t\tcal.setAttribute(\"role\", \"application\");\r\n\t}\r\n\r\n\treturn cal;\r\n};\r\nscheduler._get_def_cont = function(pos) {\r\n\tif (!this._def_count) {\r\n\t\tthis._def_count = document.createElement(\"div\");\r\n\t\tthis._def_count.className = \"dhx_minical_popup\";\r\n\t\tscheduler.event(this._def_count, \"click\", function(e) { e.cancelBubble = true; });\r\n\t\tdocument.body.appendChild(this._def_count);\r\n\t}\r\n\r\n\tif(pos.left){\r\n\t\tthis._def_count.style.left = pos.left + \"px\";\r\n\t}\r\n\tif(pos.right){\r\n\t\tthis._def_count.style.right = pos.right + \"px\";\r\n\t}\r\n\tif(pos.top){\r\n\t\tthis._def_count.style.top = pos.top + \"px\";\r\n\t}\r\n\tif(pos.bottom){\r\n\t\tthis._def_count.style.bottom = pos.bottom + \"px\";\r\n\t}\r\n\r\n\tthis._def_count._created = new Date();\r\n\r\n\treturn this._def_count;\r\n};\r\nscheduler._locateCalendar = function(cal, date) {\r\n\tif (typeof date == \"string\")\r\n\t\tdate = scheduler.templates.api_date(date);\r\n\r\n\tif(+date > +cal._max_date || +date < +cal._min_date)\r\n\t\treturn null;\r\n\r\n\tvar table = cal.querySelector(\".dhx_year_body\").childNodes[0];\r\n\r\n\tvar weekNum = 0;\r\n\tvar dat = new Date(cal._min_date);\r\n\twhile(+this.date.add(dat, 1, \"week\") <= +date){\r\n\t\tdat = this.date.add(dat, 1, \"week\");\r\n\t\tweekNum++;\r\n\t}\r\n\r\n\tvar sm = scheduler.config.start_on_monday;\r\n\tvar day = (date.getDay() || (sm ? 7 : 0)) - (sm ? 1 : 0);\r\n\r\n\tconst dayCell = table.querySelector(`.dhx_cal_month_row:nth-child(${weekNum + 1}) .dhx_cal_month_cell:nth-child(${day + 1})`);\r\n\tif(dayCell) {\r\n\t\treturn dayCell.firstChild;\r\n\t} else {\r\n\t\treturn null;\r\n\t}\r\n};\r\nscheduler.markCalendar = function(cal, date, css) {\r\n\tvar div = this._locateCalendar(cal, date);\r\n\tif(!div)\r\n\t\treturn;\r\n\r\n\tdiv.className += \" \" + css;\r\n};\r\nscheduler.unmarkCalendar = function(cal, date, css) {\r\n\tdate = date || cal._last_date;\r\n\tcss = css || \"dhx_calendar_click\";\r\n\tif (!date) return;\r\n\tvar el = this._locateCalendar(cal, date);\r\n\tif(!el)\r\n\t\treturn;\r\n\tel.className = (el.className || \"\").replace(RegExp(css, \"g\"));\r\n};\r\nscheduler._week_template = function(width) {\r\n\tvar summ = (width || 250);\r\n\tvar left = 0;\r\n\r\n\tvar week_template = document.createElement(\"div\");\r\n\tvar dummy_date = this.date.week_start(scheduler._currentDate());\r\n\tfor (var i = 0; i < 7; i++) {\r\n\t\tthis._cols[i] = Math.floor(summ / (7 - i));\r\n\t\tthis._render_x_header(i, left, dummy_date, week_template);\r\n\t\tdummy_date = this.date.add(dummy_date, 1, \"day\");\r\n\t\tsumm -= this._cols[i];\r\n\t\tleft += this._cols[i];\r\n\t}\r\n\tweek_template.lastChild.className += \" dhx_scale_bar_last\";\r\n\treturn week_template;\r\n};\r\nscheduler.updateCalendar = function(obj, sd) {\r\n\tobj.conf.date = sd;\r\n\tthis.renderCalendar(obj.conf, obj, true);\r\n};\r\nscheduler._mini_cal_arrows = [\" \", \" \"];\r\nscheduler._render_calendar = function(obj, sd, conf, previous) {\r\n\t/*store*/\r\n\tvar ts = scheduler.templates;\r\n\tvar temp = this._cols;\r\n\tthis._cols = [];\r\n\tvar temp2 = this._mode;\r\n\tthis._mode = \"calendar\";\r\n\tvar temp3 = this._colsS;\r\n\tthis._colsS = {height: 0};\r\n\tvar temp4 = new Date(this._min_date);\r\n\tvar temp5 = new Date(this._max_date);\r\n\tvar temp6 = new Date(scheduler._date);\r\n\tvar temp7 = ts.month_day;\r\n\tvar temp8 = this._ignores_detected; this._ignores_detected = 0;\r\n\tts.month_day = ts.calendar_date;\r\n\r\n\tsd = this.date.month_start(sd);\r\n\tvar week_template = this._week_template(obj.offsetWidth - 1 - this.config.minicalendar.padding );\r\n\r\n\tvar d;\r\n\tif (previous){\r\n\t\td = previous;\r\n\t} else {\r\n\t\td = document.createElement(\"div\");\r\n\t\td.className = \"dhx_cal_container dhx_mini_calendar\";\r\n\t}\r\n\td.setAttribute(\"date\", this._helpers.formatDate(sd));\r\n\td.innerHTML = \"
\" +\r\n\t\t\t\"
\" : \"'>\") +\r\n\t\t\t\"
\"+(week_template ? week_template.innerHTML : \"\")+\"
\" +\r\n\t\t\t\"
\" +\r\n\t\t\"
\";\r\n\tvar header = d.querySelector(\".dhx_year_month\");\r\n\tvar weekHeader = d.querySelector(\".dhx_year_week\");\r\n\tvar body = d.querySelector(\".dhx_year_body\");\r\n\r\n\theader.innerHTML = this.templates.calendar_month(sd);\r\n\tif (conf.navigation) {\r\n\t\tvar move_minicalendar_date = function(calendar, diff) {\r\n\t\t\tvar date = scheduler.date.add(calendar._date, diff, \"month\");\r\n\t\t\tscheduler.updateCalendar(calendar, date);\r\n\t\t\tif (scheduler._date.getMonth() == calendar._date.getMonth() && scheduler._date.getFullYear() == calendar._date.getFullYear()) {\r\n\t\t\t\tscheduler._markCalendarCurrentDate(calendar);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tvar css_classnames = [\"dhx_cal_prev_button\", \"dhx_cal_next_button\"];\r\n\t\tvar css_texts = [\"left:1px;top:4px;position:absolute;\", \"left:auto; right:1px;top:4px;position:absolute;\"];\r\n\t\tvar diffs = [-1, 1];\r\n\t\tvar handler = function(diff) {\r\n\t\t\treturn function() {\t\r\n\t\t\t\tif (conf.sync) {\r\n\t\t\t\t\tvar calendars = scheduler._synced_minicalendars;\r\n\t\t\t\t\tfor (var k = 0; k < calendars.length; k++) {\r\n\t\t\t\t\t\tmove_minicalendar_date(calendars[k], diff);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (scheduler.config.rtl) {\r\n\t\t\t\t\t\tdiff = -diff;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmove_minicalendar_date(d, diff);\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t};\r\n\t\tvar labels = [scheduler.locale.labels.prev, scheduler.locale.labels.next];\r\n\t\tfor (var j = 0; j < 2; j++) {\r\n\t\t\tvar arrow = document.createElement(\"div\");\r\n\t\t\t//var diff = diffs[j];\r\n\t\t\tarrow.className = css_classnames[j];\r\n\r\n\t\t\tscheduler._waiAria.headerButtonsAttributes(arrow, labels[j]);\r\n\r\n\t\t\tarrow.style.cssText = css_texts[j];\r\n\t\t\tarrow.innerHTML = this._mini_cal_arrows[j];\r\n\t\t\theader.appendChild(arrow);\r\n\t\t\tminicalDomEvents.attach(arrow, \"click\", handler(diffs[j]));\r\n\t\t}\r\n\t}\r\n\td._date = new Date(sd);\r\n\r\n\td.week_start = (sd.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) % 7;\r\n\r\n\tvar dd = d._min_date = this.date.week_start(sd);\r\n\td._max_date = this.date.add(d._min_date, 6, \"week\");\r\n\r\n\tthis._reset_month_scale(body, sd, dd, 6);\r\n\r\n\tif (!previous)\r\n\t\tobj.appendChild(d);\r\n\r\n\tweekHeader.style.height = (weekHeader.childNodes[0].offsetHeight - 1) + \"px\"; // dhx_year_week should have height property so that day dates would get correct position. dhx_year_week height = height of it's child (with the day name)\r\n\r\n\tvar headerId = scheduler.uid();\r\n\tscheduler._waiAria.minicalHeader(header, headerId);\r\n\tscheduler._waiAria.minicalGrid(d.querySelector(\".dhx_year_grid\"), headerId);\r\n\tscheduler._waiAria.minicalRow(weekHeader);\r\n\r\n\tvar dayHeaders = weekHeader.querySelectorAll(\".dhx_scale_bar\");\r\n\tfor(var i = 0; i < dayHeaders.length; i++){\r\n\t\tscheduler._waiAria.minicalHeadCell(dayHeaders[i]);\r\n\t}\r\n\tvar dayCells = body.querySelectorAll(\".dhx_cal_month_cell\");\r\n\tvar firstDate = new Date(dd);\r\n\tfor(var i = 0; i < dayCells.length; i++){\r\n\r\n\t\tscheduler._waiAria.minicalDayCell(dayCells[i], new Date(firstDate));\r\n\t\tfirstDate = scheduler.date.add(firstDate, 1, \"day\");\r\n\t}\r\n\r\n\tscheduler._waiAria.minicalHeader(header, headerId);\r\n\r\n\t/*restore*/\r\n\tthis._cols = temp;\r\n\tthis._mode = temp2;\r\n\tthis._colsS = temp3;\r\n\tthis._min_date = temp4;\r\n\tthis._max_date = temp5;\r\n\tscheduler._date = temp6;\r\n\tts.month_day = temp7;\r\n\tthis._ignores_detected = temp8;\r\n\treturn d;\r\n};\r\nscheduler.destroyCalendar = function(cal, force) {\r\n\tif (!cal && this._def_count && this._def_count.firstChild) {\r\n\t\tif (force || (new Date()).valueOf() - this._def_count._created.valueOf() > 500)\r\n\t\t\tcal = this._def_count.firstChild;\r\n\t}\r\n\tif (!cal) return;\r\n\tminicalDomEvents.detachAll();\r\n\t//cal.onclick = null;\r\n\tcal.innerHTML = \"\";\r\n\tif (cal.parentNode)\r\n\t\tcal.parentNode.removeChild(cal);\r\n\tif (this._def_count)\r\n\t\tthis._def_count.style.top = \"-1000px\";\r\n\r\n\tif(cal.conf && cal.conf._on_xle_handler)\r\n\t\tscheduler.detachEvent(cal.conf._on_xle_handler);\r\n};\r\nscheduler.isCalendarVisible = function() {\r\n\tif (this._def_count && parseInt(this._def_count.style.top, 10) > 0)\r\n\t\treturn this._def_count;\r\n\treturn false;\r\n};\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tscheduler.event(document.body, \"click\", function() { scheduler.destroyCalendar(); });\r\n}, {once: true});\r\n\r\n\r\n\r\nscheduler.form_blocks.calendar_time = {\r\n\trender: function(sns) {\r\n\t\tvar html = \"\";\r\n\r\n\t\tvar cfg = scheduler.config;\r\n\t\tvar dt = this.date.date_part(scheduler._currentDate());\r\n\r\n\t\tvar last = 24 * 60, first = 0;\r\n\t\tif (cfg.limit_time_select) {\r\n\t\t\tfirst = 60 * cfg.first_hour;\r\n\t\t\tlast = 60 * cfg.last_hour + 1; // to include \"17:00\" option if time select is limited\r\n\t\t}\r\n\t\tdt.setHours(first / 60);\r\n\r\n\t\tsns._time_values = [];\r\n\t\thtml += \" \";\r\n\r\n\t\t//var full_day = scheduler.config.full_day;\r\n\r\n\t\treturn \"
\" + html + \"  –  \" + html + \"
\";\r\n\t},\r\n\tset_value: function(node, value, ev, config) {\r\n\r\n\t\tvar inputs = node.getElementsByTagName(\"input\");\r\n\t\tvar selects = node.getElementsByTagName(\"select\");\r\n\t\tvar start_date,\r\n\t\t\tend_date;\r\n\r\n\t\tvar _init_once = function(inp, date, number) {\r\n\t\t\tscheduler.event(inp, \"click\", function() {\r\n\t\t\t\tscheduler.destroyCalendar(null, true);\r\n\t\t\t\tscheduler.renderCalendar({\r\n\t\t\t\t\tposition: inp,\r\n\t\t\t\t\tdate: new Date(this._date),\r\n\t\t\t\t\tnavigation: true,\r\n\t\t\t\t\thandler: function(new_date) {\r\n\t\t\t\t\t\tinp.value = scheduler.templates.calendar_time(new_date);\r\n\t\t\t\t\t\tinp._date = new Date(new_date);\r\n\t\t\t\t\t\tscheduler.destroyCalendar();\r\n\t\t\t\t\t\tif (scheduler.config.event_duration && scheduler.config.auto_end_date && number === 0) { //first element = start date\r\n\t\t\t\t\t\t\t_update_minical_select();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t};\r\n\r\n\t\tif (scheduler.config.full_day) {\r\n\t\t\tif (!node._full_day) {\r\n\t\t\t\tvar html = \"\";\r\n\t\t\t\tif (!scheduler.config.wide_form)\r\n\t\t\t\t\thtml = node.previousSibling.innerHTML + html;\r\n\t\t\t\tnode.previousSibling.innerHTML = html;\r\n\t\t\t\tnode._full_day = true;\r\n\t\t\t}\r\n\t\t\tvar input = node.previousSibling.getElementsByTagName(\"input\")[0];\r\n\r\n\t\t\tvar isFulldayEvent = (scheduler.date.time_part(ev.start_date) === 0 && scheduler.date.time_part(ev.end_date) === 0);\r\n\t\t\tinput.checked = isFulldayEvent;\r\n\r\n\t\t\tselects[0].disabled = input.checked;\r\n\t\t\tselects[1].disabled = input.checked;\r\n\r\n\t\t\tif (!input.$_eventAttached) {\r\n\t\t\t\tinput.$_eventAttached = true;\r\n\t\t\t\tscheduler.event(input, \"click\", function() {\r\n\t\t\t\t\tif (input.checked === true) {\r\n\t\t\t\t\t\tvar obj = {};\r\n\t\t\t\t\t\tscheduler.form_blocks.calendar_time.get_value(node, obj);\r\n\r\n\t\t\t\t\t\tstart_date = scheduler.date.date_part(obj.start_date);\r\n\t\t\t\t\t\tend_date = scheduler.date.date_part(obj.end_date);\r\n\r\n\t\t\t\t\t\tif (+end_date == +start_date || (+end_date >= +start_date && (ev.end_date.getHours() !== 0 || ev.end_date.getMinutes() !== 0)))\r\n\t\t\t\t\t\t\tend_date = scheduler.date.add(end_date, 1, \"day\");\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tvar start = start_date || ev.start_date;\r\n\t\t\t\t\tvar end = end_date || ev.end_date;\r\n\t\t\t\t\t_attach_action(inputs[0], start);\r\n\t\t\t\t\t_attach_action(inputs[1], end);\r\n\t\t\t\t\tselects[0].value = start.getHours() * 60 + start.getMinutes();\r\n\t\t\t\t\tselects[1].value = end.getHours() * 60 + end.getMinutes();\r\n\r\n\t\t\t\t\tselects[0].disabled = input.checked;\r\n\t\t\t\t\tselects[1].disabled = input.checked;\r\n\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (scheduler.config.event_duration && scheduler.config.auto_end_date) {\r\n\r\n\t\t\tvar _update_minical_select = function () {\r\n\t\t\t\tif (!(scheduler.config.auto_end_date && scheduler.config.event_duration)){\r\n\t\t\t\t\t// setting may be disabled after the handler is attached\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tstart_date = scheduler.date.add(inputs[0]._date, selects[0].value, \"minute\");\r\n\t\t\t\tend_date = new Date(start_date.getTime() + (scheduler.config.event_duration * 60 * 1000));\r\n\r\n\t\t\t\tinputs[1].value = scheduler.templates.calendar_time(end_date);\r\n\t\t\t\tinputs[1]._date = scheduler.date.date_part(new Date(end_date));\r\n\r\n\t\t\t\tselects[1].value = end_date.getHours() * 60 + end_date.getMinutes();\r\n\t\t\t};\r\n\r\n\t\t\tif(!selects[0].$_eventAttached){\r\n\t\t\t\tselects[0].addEventListener(\"change\", _update_minical_select); // only update on first select should trigger update so user could define other end date if he wishes too\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction _attach_action(inp, date, number) {\r\n\t\t\t_init_once(inp, date, number);\r\n\t\t\tinp.value = scheduler.templates.calendar_time(date);\r\n\t\t\tinp._date = scheduler.date.date_part(new Date(date));\r\n\t\t}\r\n\r\n\t\t_attach_action(inputs[0], ev.start_date, 0);\r\n\t\t_attach_action(inputs[1], ev.end_date, 1);\r\n\t\t_init_once = function() {};\r\n\r\n\t\tfunction _round_minutes(date) {\r\n\t\t\tvar time_values = config._time_values;\r\n\t\t\tvar direct_value = date.getHours() * 60 + date.getMinutes();\r\n\t\t\tvar fixed_value = direct_value;\r\n\t\t\tvar value_found = false;\r\n\r\n\t\t\tfor (var k = 0; k < time_values.length; k++) {\r\n\t\t\t\tvar t_v = time_values[k];\r\n\t\t\t\tif (t_v === direct_value) {\r\n\t\t\t\t\tvalue_found = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif (t_v < direct_value)\r\n\t\t\t\t\tfixed_value = t_v;\r\n\t\t\t}\r\n\r\n\t\t\tif(!(value_found || fixed_value))\r\n\t\t\t\treturn -1;\r\n\r\n\t\t\treturn (value_found) ? direct_value : fixed_value;\r\n\t\t}\r\n\r\n\t\tselects[0].value = _round_minutes(ev.start_date);\r\n\t\tselects[1].value = _round_minutes(ev.end_date);\r\n\r\n\t},\r\n\tget_value: function(node, ev) {\r\n\t\tvar inputs = node.getElementsByTagName(\"input\");\r\n\t\tvar selects = node.getElementsByTagName(\"select\");\r\n\r\n\t\tev.start_date = scheduler.date.add(inputs[0]._date, selects[0].value, \"minute\");\r\n\t\tev.end_date = scheduler.date.add(inputs[1]._date, selects[1].value, \"minute\");\r\n\r\n\t\tif (ev.end_date <= ev.start_date)\r\n\t\t\tev.end_date = scheduler.date.add(ev.start_date, scheduler.config.time_step, \"minute\");\r\n\t\treturn {\r\n\t\t\tstart_date: new Date(ev.start_date),\r\n\t\t\tend_date: new Date(ev.end_date)\r\n\t\t};\r\n\t},\r\n\tfocus: function(node) {\r\n\t}\r\n};\r\nscheduler.linkCalendar = function(calendar, datediff) {\r\n\tvar action = function() {\r\n\t\tvar date = scheduler._date;\r\n\t\tvar dateNew = new Date(date.valueOf());\r\n\t\tif (datediff) dateNew = datediff(dateNew);\r\n\t\tdateNew.setDate(1);\r\n\t\tscheduler.updateCalendar(calendar, dateNew);\r\n\t\treturn true;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", action);\r\n\tscheduler.attachEvent(\"onXLE\", action);\r\n\tscheduler.attachEvent(\"onEventAdded\", action);\r\n\tscheduler.attachEvent(\"onEventChanged\", action);\r\n\tscheduler.attachEvent(\"onEventDeleted\", action);\r\n\taction();\r\n};\r\n\r\nscheduler._markCalendarCurrentDate = function(calendar) {\r\n\tvar state = scheduler.getState();\r\n\tvar from = state.min_date;\r\n\tvar to = state.max_date;\r\n\tvar mode = state.mode;\r\n\r\n\tvar month_start = scheduler.date.month_start(new Date(calendar._date));\r\n\tvar month_end = scheduler.date.add(month_start, 1, \"month\");\r\n\r\n\tvar noHighlight = {\r\n\t\t\"month\":true,\r\n\t\t\"year\":true,\r\n\t\t\"agenda\":true,\r\n\t\t\"grid\":true\r\n\t};\r\n\t// no need to highlight current dates for a large range views - agenda, year, etc.\r\n\tif(noHighlight[mode] || (from.valueOf() <= month_start.valueOf() && to.valueOf() >= month_end.valueOf())){\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar current = from;\r\n\twhile(current.valueOf() < to.valueOf()){\r\n\t\tif (month_start.valueOf() <= current.valueOf() && month_end > current) {\r\n\t\t\tscheduler.markCalendar(calendar, current, \"dhx_calendar_click\");\r\n\t\t}\r\n\t\tcurrent = scheduler.date.add(current, 1, \"day\");\r\n\t}\r\n};\r\n\r\nscheduler.attachEvent(\"onEventCancel\", function(){\r\n\tscheduler.destroyCalendar(null, true);\r\n});\r\n\r\nscheduler.attachEvent(\"onDestroy\", function(){\r\n\tscheduler.destroyCalendar();\r\n});\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\tscheduler.xy.scroll_width = 0;\r\n\r\n\tvar old = scheduler.render_view_data;\r\n\tscheduler.render_view_data=function(){\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\t\tdata.firstChild._h_fix = true;\r\n\r\n\t\told.apply(scheduler,arguments);\r\n\r\n\r\n\r\n\t\tvar height = parseInt(data.style.height);\r\n\t\tdata.style.height=\"1px\";\r\n\t\tdata.style.height=data.scrollHeight+\"px\";\r\n\r\n\t\tthis._obj.style.height = this._obj.clientHeight + data.scrollHeight - height + \"px\";\r\n\t};\r\n\r\n\tvar old_s=scheduler._reset_month_scale;\r\n\tscheduler._reset_month_scale=function(a,b,c,d){\r\n\t\tvar dummy = {clientHeight:100};\r\n\t\told_s.apply(scheduler,[dummy,b,c,d]);\r\n\t\ta.innerHTML = dummy.innerHTML;\r\n\t};\r\n\r\n});\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Multisection\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\n\r\nfunction parseXMLOptions(loader, config){\r\n\tvar items = scheduler.ajax.xpath(\"//data/item\", loader.xmlDoc);\r\n\tvar ids = {};\r\n\tfor (var i = 0; i < items.length; i++) {\r\n\t\tids[items[i].getAttribute(config.map_to)] = true;\r\n\t}\r\n\treturn ids;\r\n}\r\n\r\nfunction parseJSONOptions(loader, config){\r\n\ttry{\r\n\t\tvar items = JSON.parse(loader.xmlDoc.responseText);\r\n\t\tvar ids = {};\r\n\t\tfor (var i = 0; i < items.length; i++) {\r\n\t\t\tvar option = items[i];\r\n\r\n\t\t\tids[option.value || option.key || option.id] = true;\r\n\t\t}\r\n\t\treturn ids;\r\n\t}catch(e){\r\n\t\treturn null;\r\n\t}\r\n}\r\n\r\nscheduler.form_blocks[\"multiselect\"]={\r\n\trender:function(sns) {\r\n\t\tvar css = \"dhx_multi_select_control dhx_multi_select_\"+sns.name;\r\n\t\tif(!!sns.vertical){\r\n\t\t\tcss += \" dhx_multi_select_control_vertical\";\r\n\t\t}\r\n\r\n\t\tvar _result = \"
\";\r\n\t\tfor (var i=0; i\"+sns.options[i].label+\"\";\r\n\t\t}\r\n\t\t_result += \"
\";\r\n\t\treturn _result;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\r\n\t\tvar _children = node.getElementsByTagName('input');\r\n\t\tfor(var i=0;i<_children.length;i++) {\r\n\t\t\t_children[i].checked = false; //unchecking all inputs on the form\r\n\t\t}\r\n\r\n\t\tfunction _mark_inputs(ids) { // ids = [ 0: undefined, 1: undefined, 2: true, 'custom_name': false ... ]\r\n\t\t\tvar _children = node.getElementsByTagName('input');\r\n\t\t\tfor(var i=0;i<_children.length; i++) {\r\n\t\t\t\t_children[i].checked = !! ids[_children[i].value];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar _ids = {};\r\n\t\tif (ev[config.map_to]) {\r\n\t\t\tvar results = (ev[config.map_to] + \"\").split(config.delimiter || scheduler.config.section_delimiter || \",\");\r\n\t\t\tfor (var i = 0; i < results.length; i++) {\r\n\t\t\t\t_ids[results[i]] = true;\r\n\t\t\t}\r\n\t\t\t_mark_inputs(_ids);\r\n\t\t} else {\r\n\t\t\tif (scheduler._new_event || !config.script_url)\r\n\t\t\t\treturn;\r\n\t\t\tvar divLoading = document.createElement('div');\r\n\t\t\tdivLoading.className = 'dhx_loading';\r\n\t\t\tdivLoading.style.cssText = \"position: absolute; top: 40%; left: 40%;\";\r\n\t\t\tnode.appendChild(divLoading);\r\n\r\n\t\t\tvar url = [\r\n\t\t\t\tconfig.script_url,\r\n\t\t\t\t(config.script_url.indexOf(\"?\") == -1 ? \"?\" : \"&\"),\r\n\t\t\t\t'dhx_crosslink_' + config.map_to + '=' + ev.id + '&uid=' + scheduler.uid()\r\n\t\t\t].join(\"\");\r\n\r\n\t\t\tscheduler.ajax.get(url, function(loader) {\r\n\t\t\t\tvar options = parseJSONOptions(loader, config);\r\n\t\t\t\tif(!options){\r\n\t\t\t\t\toptions = parseXMLOptions(loader, config);\r\n\t\t\t\t}\r\n\t\t\t\t_mark_inputs(options);\r\n\t\t\t\tnode.removeChild(divLoading);\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tvar _result = [];\r\n\t\tvar _children = node.getElementsByTagName(\"input\");\r\n\t\tfor(var i=0;i<_children.length;i++) {\r\n\t\t\tif(_children[i].checked)\r\n\t\t\t\t_result.push(_children[i].value);\r\n\t\t}\r\n\t\treturn _result.join(config.delimiter || scheduler.config.section_delimiter || \",\");\r\n\t},\r\n\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\r\n\tfunction backup(obj){\r\n\t\tvar t = function(){};\r\n\t\tt.prototype = obj;\r\n\t\treturn t;\r\n\t}\r\n\r\n\tvar old = scheduler._load;\r\n\tscheduler._load=function(url,from){\r\n\t\turl=url||this._load_url;\r\n\t\tif (typeof url == \"object\"){\r\n\t\t\tvar t = backup(this._loaded);\r\n\t\t\tfor (var i=0; i < url.length; i++) {\r\n\t\t\t\tthis._loaded=new t();\r\n\t\t\t\told.call(this,url[i],from);\r\n\t\t\t}\r\n\t\t} else\r\n\t\t\told.apply(this,arguments);\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\t/* global Backbone */\r\n\tvar cfg = {\r\n\t\tuse_id : false\r\n\t};\r\n\r\n\t//remove private properties\r\n\tfunction sanitize(ev){\r\n\t\tvar obj = {};\r\n\t\tfor (var key in ev)\r\n\t\t\tif (key.indexOf(\"_\") !== 0)\r\n\t\t\t\tobj[key] = ev[key];\r\n\r\n\t\tif (!cfg.use_id)\r\n\t\t\tdelete obj.id;\r\n\r\n\t\treturn obj;\r\n\t}\r\n\r\n\tvar update_timer;\r\n\tfunction update_view(){\r\n\t\tclearTimeout(update_timer);\r\n\t\tupdate_timer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler.updateView();\r\n\t\t},1);\r\n\t}\r\n\r\n\tfunction _start_ext_load(cal){\r\n\t\tcal._loading = true;\r\n\t\tcal._not_render = true;\r\n\r\n\t\tcal.callEvent(\"onXLS\", []);\r\n\t}\r\n\tfunction _finish_ext_load(cal){\r\n\t\tcal._not_render = false;\r\n\t\tif (cal._render_wait)\r\n\t\t\tcal.render_view_data();\r\n\t\tcal._loading = false;\r\n\r\n\t\tcal.callEvent(\"onXLE\", []);\r\n\t}\r\n\r\n\r\n\tfunction _get_id(model){\r\n\t\treturn cfg.use_id ? model.id : model.cid;\r\n\t}\r\n\r\nscheduler.backbone = function(events, config){\r\n\tif (config) cfg = config;\r\n\r\n\tevents.bind(\"change\", function(model, info){\r\n\t\tvar cid = _get_id(model);\r\n\t\tvar ev = scheduler._events[cid] = model.toJSON();\r\n\t\tev.id = cid;\r\n\r\n\t\tscheduler._init_event(ev);\r\n\t\tupdate_view();\r\n\t});\r\n\tevents.bind(\"remove\", function(model, changes){\r\n\t\tvar cid = _get_id(model);\r\n\t\tif (scheduler._events[cid])\r\n\t\t\tscheduler.deleteEvent(cid);\r\n\t});\r\n\r\n\tvar queue = [];\r\n\tfunction add_from_queue(){\r\n\t\tif(scheduler.$destroyed){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (queue.length){\r\n\t\t\tscheduler.parse(queue, \"json\");\r\n\t\t\tqueue = [];\r\n\t\t}\r\n\t}\r\n\r\n\tevents.bind(\"add\", function(model, changes){\r\n\t\tvar cid = _get_id(model);\r\n\t\tif (!scheduler._events[cid]){\r\n\t\t\tvar ev = model.toJSON();\r\n\t\t\tev.id = cid;\r\n\t\t\tscheduler._init_event(ev);\r\n\r\n\t\t\tqueue.push(ev);\r\n\t\t\tif (queue.length == 1)\r\n\t\t\t\tsetTimeout(add_from_queue,1);\r\n\t\t}\r\n\t});\r\n\r\n\tevents.bind(\"request\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_start_ext_load(scheduler);\r\n\t});\r\n\tevents.bind(\"sync\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_finish_ext_load(scheduler);\r\n\t});\r\n\tevents.bind(\"error\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_finish_ext_load(scheduler);\r\n\t});\r\n\r\n\r\n\tscheduler.attachEvent(\"onEventCreated\", function(id){\r\n\t\tvar ev = new events.model(scheduler.getEvent(id));\r\n\t\tscheduler._events[id] = ev.toJSON();\r\n\t\tscheduler._events[id].id = id;\r\n\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onEventAdded\", function(id){\r\n\t\tif (!events.get(id)){\r\n\t\t\tvar data = sanitize(scheduler.getEvent(id));\r\n\t\t\tvar model = new events.model(data);\r\n\r\n\t\t\tvar cid = _get_id(model);\r\n\t\t\tif (cid != id)\r\n\t\t\t\tthis.changeEventId(id, cid);\r\n\t\t\tevents.add(model);\r\n\t\t\tevents.trigger(\"scheduler:add\", model);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventChanged\", function(id){\r\n\t\tvar ev = events.get(id);\r\n\t\tvar upd = sanitize(scheduler.getEvent(id));\r\n\r\n\t\tev.set(upd);\r\n\t\tevents.trigger(\"scheduler:change\", ev);\r\n\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventDeleted\", function(id){\r\n\t\tvar model = events.get(id);\r\n\t\tif (model){\r\n\t\t\tevents.trigger(\"scheduler:remove\", model);\r\n\t\t\tevents.remove(id);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\t/* global dhtmlDragAndDropObject, dhtmlx */\r\n// lame old code doesn't provide raw event object\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\t\tvar dragger = (new dhtmlDragAndDropObject());\r\n\t\tvar old = dragger.stopDrag;\r\n\t\tvar last_event;\r\n\t\tdragger.stopDrag = function(e) {\r\n\t\t\tlast_event = e;\r\n\t\t\treturn old.apply(this, arguments);\r\n\t\t};\r\n\r\n\t\tfunction on_drop(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml) {\r\n\r\n\t\t\tif (scheduler.checkEvent(\"onBeforeExternalDragIn\") && !scheduler.callEvent(\"onBeforeExternalDragIn\", [sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml, last_event]))\r\n\t\t\t\treturn;\r\n\r\n\t\t\tvar temp = scheduler.attachEvent(\"onEventCreated\", function (id) {\r\n\t\t\t\tif (!scheduler.callEvent(\"onExternalDragIn\", [id, sourceHtmlObject, last_event])) {\r\n\t\t\t\t\tthis._drag_mode = this._drag_id = null;\r\n\t\t\t\t\tthis.deleteEvent(id);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tvar action_data = scheduler.getActionData(last_event);\r\n\t\t\tvar event_data = {\r\n\t\t\t\tstart_date: new Date(action_data.date)\r\n\t\t\t};\r\n\r\n\t\t\t// custom views, need to assign section id, fix dates\r\n\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\tvar view_options = scheduler.matrix[scheduler._mode];\r\n\t\t\t\tevent_data[view_options.y_property] = action_data.section;\r\n\r\n\t\t\t\tvar pos = scheduler._locate_cell_timeline(last_event);\r\n\t\t\t\tevent_data.start_date = view_options._trace_x[pos.x];\r\n\t\t\t\tevent_data.end_date = scheduler.date.add(event_data.start_date, view_options.x_step, view_options.x_unit);\r\n\t\t\t}\r\n\t\t\tif (scheduler._props && scheduler._props[scheduler._mode]) {\r\n\t\t\t\tevent_data[scheduler._props[scheduler._mode].map_to] = action_data.section;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler.addEventNow(event_data);\r\n\r\n\t\t\tscheduler.detachEvent(temp);\r\n\t\t}\r\n\r\n\t\tdragger.addDragLanding(scheduler._els[\"dhx_cal_data\"][0], {\r\n\t\t\t_drag: function(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml) {\r\n\t\t\t\ton_drop(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml);\r\n\t\t\t},\r\n\t\t\t_dragIn: function(htmlObject, shtmlObject) {\r\n\t\t\t\treturn htmlObject;\r\n\t\t\t},\r\n\t\t\t_dragOut: function(htmlObject) {\r\n\t\t\t\treturn this;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(dhtmlx.DragControl) {\r\n\t\t\tdhtmlx.DragControl.addDrop(scheduler._els[\"dhx_cal_data\"][0], {\r\n\t\t\t\tonDrop: function (source, target, d, e) {\r\n\t\t\t\t\tvar sourceDhtmlx = dhtmlx.DragControl.getMaster(source);\r\n\t\t\t\t\tlast_event = e;\r\n\t\t\t\t\ton_drop(source, sourceDhtmlx, target, e.target || e.srcElement);\r\n\t\t\t\t},\r\n\r\n\t\t\t\tonDragIn: function (source, target, e) {\r\n\t\t\t\t\treturn target;\r\n\t\t\t\t}\r\n\t\t\t}, true);\r\n\t\t}\r\n\t});\r\n\r\n}","export default function(scheduler){\r\n\r\n\tvar dx, dy,\r\n\t\thtml_regexp = new RegExp(\"<[^>]*>\", \"g\"),\r\n\t\tnewline_regexp = new RegExp(\"]*>\", \"g\");\r\n\r\n\tfunction clean_html(val) {\r\n\t\treturn val.replace(newline_regexp, \"\\n\").replace(html_regexp, \"\");\r\n\t}\r\n\r\n\tfunction x_norm(x, offset) {\r\n\t\tx = parseFloat(x);\r\n\t\toffset = parseFloat(offset);\r\n\t\tif (!isNaN(offset)) x -= offset;\r\n\r\n\t\tvar w = colsWidth(x);\r\n\t\tx = x - w.width + w.cols*dx;\r\n\t\treturn isNaN(x)?\"auto\":(100*x/(dx));\r\n\t}\r\n\r\n\tfunction x_norm_event(x, offset, is_left) {\r\n\t\tx = parseFloat(x);\r\n\t\toffset = parseFloat(offset);\r\n\t\tif (!isNaN(offset) && is_left) x -= offset;\r\n\r\n\t\tvar w = colsWidth(x);\r\n\t\tx = x - w.width + w.cols*dx;\r\n\t\treturn isNaN(x)?\"auto\":(100*x/(dx-(!isNaN(offset)?offset:0)));\r\n\t}\r\n\tfunction colsWidth(width) {\r\n\t\tvar r = 0;\r\n\t\tvar header = scheduler._els.dhx_cal_header[0].childNodes;\r\n\t\tvar els = header[1] ? header[1].childNodes : header[0].childNodes;\r\n\t\tfor (var i = 0; i < els.length; i++) {\r\n\t\t\tvar el = els[i].style ? els[i] : els[i].parentNode;\r\n\t\t\tvar w = parseFloat(el.style.width);\r\n\t\t\tif (width > w){\r\n\t\t\t\twidth -= (w+1);\r\n\t\t\t\tr+=(w+1);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\treturn { width: r, cols: i };\r\n\t}\r\n\r\n\tfunction y_norm(y) {\r\n\t\ty = parseFloat(y);\r\n\t\tif (isNaN(y)) return \"auto\";\r\n\t\treturn 100 * y / dy;\r\n\t}\r\n\r\n\tfunction get_style(node, style){\r\n\t\treturn (window.getComputedStyle?(window.getComputedStyle(node, null)[style]):(node.currentStyle?node.currentStyle[style]:null))||\"\";\r\n\t}\r\n\r\n\tfunction de_day(node, n) {\r\n\t\tvar x = parseInt(node.style.left, 10);\r\n\r\n\t\tfor (var dx = 0; dx < scheduler._cols.length; dx++) {\r\n\t\t\tx -= scheduler._cols[dx];\r\n\t\t\tif (x < 0) return dx;\r\n\t\t}\r\n\t\treturn n;\r\n\t}\r\n\r\n\tfunction de_week(node, n) {\r\n\t\tvar y = parseInt(node.style.top, 10);\r\n\t\tfor (var dy = 0; dy < scheduler._colsS.heights.length; dy++)\r\n\t\t\tif (scheduler._colsS.heights[dy] > y) return dy;\r\n\t\treturn n;\r\n\t}\r\n\r\n\tfunction xml_start(tag) {\r\n\t\treturn tag ? \"<\"+tag+\">\" : \"\";\r\n\t}\r\n\tfunction xml_end(tag) {\r\n\t\treturn tag ? \"\" : \"\";\r\n\t}\r\n\r\n\tfunction xml_top(tag, profile, header, footer) {\r\n\t\tvar xml = \"<\"+tag+\" profile='\" + profile + \"'\";\r\n\t\tif (header)\r\n\t\t\txml += \" header='\" + header + \"'\";\r\n\t\tif (footer)\r\n\t\t\txml += \" footer='\" + footer + \"'\";\r\n\t\txml += \">\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_body_header() {\r\n\t\tvar xml = \"\";\r\n\t\t// detects if current mode is timeline\r\n\t\tvar mode = scheduler._mode;\r\n\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode])\r\n\t\t\tmode = (scheduler.matrix[scheduler._mode].render == \"cell\") ? \"matrix\" : \"timeline\";\r\n\t\txml += \"\";\r\n\r\n\t\tif (scheduler._mode == \"week_agenda\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_data[0].getElementsByTagName(\"DIV\");\r\n\t\t\tfor (var i = 0; i < xh.length; i++)\r\n\t\t\t\tif (xh[i].className == \"dhx_wa_scale_bar\")\r\n\t\t\t\t\txml += \"\" + clean_html(xh[i].innerHTML) + \"\";\r\n\t\t} else if (scheduler._mode == \"agenda\" || scheduler._mode == \"map\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_header[0].childNodes[0].childNodes;\r\n\r\n\t\t\txml += \"\" + clean_html(xh[0].innerHTML) + \"\" + clean_html(xh[1].innerHTML) + \"\";\r\n\t\t} else if (scheduler._mode == \"year\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_data[0].childNodes;\r\n\t\t\tfor (var i = 0; i < xh.length; i++) {\r\n\t\t\t\txml += \"\";\r\n\t\t\t\txml += xml_month_scale(xh[i].querySelector(\".dhx_year_week\").childNodes);\r\n\t\t\t\txml += xml_month(xh[i].querySelector(\".dhx_year_body\"));\r\n\t\t\t\txml += \"\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\txml += \"\";\r\n\t\t\tvar xh = scheduler._els.dhx_cal_header[0].childNodes;\r\n\t\t\txml += xml_month_scale(xh);\r\n\t\t\txml += \"\";\r\n\r\n\t\t\tvar yh = scheduler._els.dhx_cal_data[0];\r\n\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tfor (var i = 0; i < yh.firstChild.rows.length; i++) {\r\n\t\t\t\t\tvar el = yh.firstChild.rows[i];\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t}\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tdy = yh.firstChild.rows[0].cells[0].offsetHeight;\r\n\t\t\t} else if (yh.firstChild.tagName == \"TABLE\") {\r\n\t\t\t\txml += xml_month(yh);\r\n\t\t\t} else {\r\n\t\t\t\tyh = yh.childNodes[yh.childNodes.length - 1];\r\n\t\t\t\twhile (yh.className.indexOf(\"dhx_scale_holder\") == -1)\r\n\t\t\t\t\tyh = yh.previousSibling;\r\n\t\t\t\tyh = yh.childNodes;\r\n\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tfor (var i = 0; i < yh.length; i++)\r\n\t\t\t\t\txml += \"\\n\";\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tdy = yh[0].offsetHeight;\r\n\t\t\t}\r\n\t\t}\r\n\t\txml += \"\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_month(yh) {\r\n\t\tvar xml = \"\";\r\n\t\tvar r = yh.querySelectorAll(\"tr\");\r\n\t\tfor (var i = 0; i < r.length; i++) {\r\n\t\t\tvar days = [];\r\n\t\t\tvar cells = r[i].querySelectorAll(\"td\");\r\n\r\n\t\t\tfor (var j = 0; j < cells.length; j++)\r\n\t\t\t\tdays.push(cells[j].querySelector(\".dhx_month_head\").innerHTML);\r\n\r\n\t\t\txml += \"\\n\";\r\n\t\t\tdy = cells[0].offsetHeight;\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_month_scale(xh) {\r\n\t\tvar xhs,\r\n\t\t\txml = \"\";\r\n\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\tif (scheduler.matrix[scheduler._mode].second_scale)\r\n\t\t\t\txhs = xh[1].childNodes;\r\n\r\n\t\t\txh = xh[0].childNodes;\r\n\t\t}\r\n\r\n\t\tfor (var i = 0; i < xh.length; i++)\r\n\t\t\txml += \"\\n\";\r\n\t\tdx = xh[0].offsetWidth;\r\n\r\n\t\tif (xhs) {\r\n\t\t\tvar width = 0;\r\n\t\t\tvar top_width = xh[0].offsetWidth;\r\n\t\t\tvar top_col = 1;\r\n\t\t\tfor (var i = 0; i < xhs.length; i++) {\r\n\t\t\t\txml += \"\\n\";\r\n\t\t\t\twidth += xhs[i].offsetWidth;\r\n\t\t\t\tif (width >= top_width) {\r\n\t\t\t\t\ttop_width += (xh[top_col] ? xh[top_col].offsetWidth : 0);\r\n\t\t\t\t\ttop_col++;\r\n\t\t\t\t}\r\n\t\t\t\tdx = xhs[0].offsetWidth;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_body(colors) {\r\n\t\tvar xml = \"\";\r\n\t\tvar evs = scheduler._rendered;\r\n\t\tvar matrix = scheduler.matrix && scheduler.matrix[scheduler._mode];\r\n\r\n\t\tif (scheduler._mode == \"agenda\" || scheduler._mode == \"map\") {\r\n\r\n\t\t\tfor (var i = 0; i < evs.length; i++)\r\n xml += \"\";\r\n\r\n\t\t} else if (scheduler._mode == \"week_agenda\") {\r\n\r\n\t\t\tfor (var i = 0; i < evs.length; i++)\r\n\t\t\t\txml += \"\" + clean_html(evs[i].innerHTML) + \"\";\r\n\r\n\t\t} else if (scheduler._mode == \"year\") {\r\n\r\n\t\t\tvar evs = scheduler.get_visible_events();\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar d = evs[i].start_date;\r\n\t\t\t\tif (d.valueOf() < scheduler._min_date.valueOf())\r\n\t\t\t\t\td = scheduler._min_date;\r\n\r\n\t\t\t\twhile (d < evs[i].end_date) {\r\n\t\t\t\t\tvar m = d.getMonth() + 12 * (d.getFullYear() - scheduler._min_date.getFullYear()) - scheduler.week_starts._month;\r\n\t\t\t\t\tvar day = scheduler.week_starts[m] + d.getDate() - 1;\r\n\t\t\t\t\tvar text_color = colors ? get_style(scheduler._get_year_cell(d), \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(scheduler._get_year_cell(d), \"backgroundColor\") : \"\";\r\n\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t\td = scheduler.date.add(d, 1, \"day\");\r\n\t\t\t\t\tif (d.valueOf() >= scheduler._max_date.valueOf())\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (matrix && matrix.render == \"cell\") {\r\n\t\t\tvar evs = scheduler._els.dhx_cal_data[0].getElementsByTagName(\"TD\");\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar text_color = colors ? get_style(evs[i], \"color\") : \"\";\r\n\t\t\t\tvar bg_color = colors ? get_style(evs[i], \"backgroundColor\") : \"\";\r\n\t\t\t\txml += \"\\n\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar zx, zdx;\r\n\t\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\t\t// logic for timeline view\r\n\t\t\t\t\tzx = x_norm(evs[i].style.left);\r\n\t\t\t\t\tzdx = x_norm(evs[i].offsetWidth)-1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// we should use specific logic for day/week/units view\r\n\t\t\t\t\tvar left_norm = scheduler.config.use_select_menu_space ? 0 : 26;\r\n\t\t\t\t\tzx = x_norm_event(evs[i].style.left, left_norm, true);\r\n\t\t\t\t\tzdx = x_norm_event(evs[i].style.width, left_norm)-1;\r\n\t\t\t\t}\r\n\t\t\t\tif (isNaN(zdx * 1)) continue;\r\n\t\t\t\tvar zy = y_norm(evs[i].style.top);\r\n\t\t\t\tvar zdy = y_norm(evs[i].style.height);\r\n\r\n\t\t\t\tvar e_type = evs[i].className.split(\" \")[0].replace(\"dhx_cal_\", \"\");\r\n\t\t\t\tif (e_type === 'dhx_tooltip_line') continue;\r\n\r\n\t\t\t\tvar dets = scheduler.getEvent(evs[i].getAttribute(scheduler.config.event_attribute));\r\n if (!dets) continue;\r\n\t\t\t\tvar day = dets._sday;\r\n\t\t\t\tvar week = dets._sweek;\r\n\t\t\t\tvar length = dets._length || 0;\r\n\r\n\t\t\t\tif (scheduler._mode == \"month\") {\r\n\t\t\t\t\tzdy = parseInt(evs[i].offsetHeight, 10);\r\n\t\t\t\t\tzy = parseInt(evs[i].style.top, 10) - scheduler.xy.month_head_height;\r\n\r\n\t\t\t\t\tday = de_day(evs[i], day);\r\n\t\t\t\t\tweek = de_week(evs[i], week);\r\n\t\t\t\t} else if (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\t\tday = 0;\r\n\t\t\t\t\tvar el = evs[i].parentNode.parentNode.parentNode;\r\n\t\t\t\t\tweek = el.rowIndex;\r\n\t\t\t\t\tvar dy_copy = dy;\r\n\t\t\t\t\tdy = evs[i].parentNode.offsetHeight;\r\n\t\t\t\t\tzy = y_norm(evs[i].style.top);\r\n\t\t\t\t\tzy -= zy * 0.2;\r\n\t\t\t\t\tdy = dy_copy;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (evs[i].parentNode == scheduler._els.dhx_cal_data[0]) continue;\r\n\t\t\t\t\tvar parent = scheduler._els[\"dhx_cal_data\"][0].childNodes[0];\r\n\t\t\t\t\tvar offset = parseFloat(parent.className.indexOf(\"dhx_scale_holder\") != -1 ? parent.style.left : 0);\r\n\t\t\t\t\tzx += x_norm(evs[i].parentNode.style.left, offset);\r\n\t\t\t\t}\r\n\r\n\t\t\t\txml += \"\\n\";\r\n\r\n\t\t\t\tif (e_type == \"event\") {\r\n\t\t\t\t\txml += \"
\";\r\n\t\t\t\t\tvar text_color = colors ? get_style(evs[i].childNodes[2], \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(evs[i].childNodes[2], \"backgroundColor\") : \"\";\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvar text_color = colors ? get_style(evs[i], \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(evs[i], \"backgroundColor\") : \"\";\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t}\r\n\t\t\t\txml += \"
\";\r\n\t\t\t}\r\n\t\t\t}\r\n\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction toXML(start, end, view, mode, header, footer){\r\n\t\tvar colors = false;\r\n\t\tif (mode == \"fullcolor\") {\r\n\t\t\tcolors = true;\r\n\t\t\tmode = \"color\";\r\n\t\t}\r\n\r\n\t\tmode = mode || \"color\";\r\n\r\n\t\tvar xml = \"\";\r\n\t\tif (start) {\r\n\r\n\t\t\tvar original_date = scheduler._date;\r\n\t\t\tvar original_mode = scheduler._mode;\r\n\t\t\tend = scheduler.date[view+\"_start\"](end);\r\n\t\t\tend = scheduler.date[\"get_\"+view+\"_end\"] ? scheduler.date[\"get_\"+view+\"_end\"](end) : scheduler.date.add(end, 1, view);\r\n\r\n\t\t\txml = xml_top(\"pages\", mode, header, footer);\r\n\t\t\tfor (var temp_date = new Date(start); +temp_date < +end; temp_date = this.date.add(temp_date, 1, view)) {\r\n\t\t\t\tthis.setCurrentView(temp_date, view);\r\n\t\t\t\txml += xml_start(\"page\") + xml_body_header().replace(\"\\u2013\", \"-\") + xml_body(colors) + xml_end(\"page\");\r\n\t\t\t}\r\n\t\t\txml += xml_end(\"pages\");\r\n\r\n\t\t\tthis.setCurrentView(original_date, original_mode);\r\n\t\t} else {\r\n\t\t\txml = xml_top(\"data\", mode, header, footer) + xml_body_header().replace(\"\\u2013\", \"-\") + xml_body(colors) + xml_end(\"data\");\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\tscheduler.getPDFData = toXML;\r\n\tfunction send_xml(xml, url){\r\n\t\tvar uid = scheduler.uid();\r\n\t\tvar d = document.createElement(\"div\");\r\n\t\td.style.display = \"none\";\r\n\t\tdocument.body.appendChild(d);\r\n\r\n\t\td.innerHTML = '
';\r\n\t\tdocument.getElementById(uid).firstChild.value = encodeURIComponent(xml);\r\n\t\tdocument.getElementById(uid).submit();\r\n\t\td.parentNode.removeChild(d);\r\n\t}\r\n\r\n\tfunction to_pdf(start, end, view, url, mode, header, footer) {\r\n\t\tvar xml = \"\";\r\n\t\tif(typeof mode == \"object\"){\r\n\t\t\txml = schedulersToPdf(mode);\r\n\t\t}else{\r\n\t\t\txml = toXML.apply(this, [start, end, view, mode, header, footer]);\r\n\t\t}\r\n\r\n\t\tsend_xml(xml, url);\r\n\t}\r\n\r\n\tfunction schedulersToPdf(objects){\r\n\t\tvar xml = \"\";\r\n\t\tfor(var i=0; i < objects.length; i++){\r\n\t\t\txml += objects[i].source.getPDFData(objects[i].start, objects[i].end, objects[i].view, objects[i].mode, objects[i].header, objects[i].footer);\r\n\t\t}\r\n\t\txml += \"\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\t/*\r\n\t * scheduler.toPDF(url, mode, header, footer) - for a single scheduler\r\n\t * scheduler.toPDF(url, [scheduler1, scheduler2,...]) - for multiple schedulers\r\n\t * example:\r\n\t * scheduler.toPDF(\"generate.ashx\", [\r\n\t * { source: scheduler1, mode: \"color\" },\r\n\t * { source: scheduler2, mode: \"gray\", view:\"week\", start:new Date(2013, 06, 1), end:new Date(2013, 06, 28) },\r\n\t * { source: scheduler3 }\r\n\t * ]);\r\n\t *\r\n\t */\r\n\tscheduler.toPDF = function(url, mode, header, footer) {\r\n\t\treturn to_pdf.apply(this, [null, null, null, url, mode, header, footer]);\r\n\t};\r\n\tscheduler.toPDFRange = function(start, end, view, url, mode, header, footer) {\r\n\t\tif (typeof start == \"string\") {\r\n\t\t\tstart = scheduler.templates.api_date(start);\r\n\t\t\tend = scheduler.templates.api_date(end);\r\n\t\t}\r\n\r\n\t\treturn to_pdf.apply(this, arguments);\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.icons_select = [\"icon_form\", \"icon_delete\"];\r\nscheduler.config.details_on_create = true;\r\nscheduler.config.show_quick_info = true;\r\nscheduler.xy.menu_width = 0;\r\n\r\nscheduler.attachEvent(\"onClick\", function(id){\r\n\tif(!scheduler.config.show_quick_info){\r\n\t\treturn;\r\n\t}\r\n\tscheduler.showQuickInfo(id);\r\n\treturn true;\r\n});\r\n\r\n(function(){\r\n\t// pass `force` argument in order to hide quick info synchronously\r\n\t// so it won't affect showQuickInfo call that can follow\r\n\tvar events = [\"onEmptyClick\", \"onViewChange\", \"onLightbox\", \"onBeforeEventDelete\", \"onBeforeDrag\"];\r\n\tvar hiding_function = function(){\r\n\t\tscheduler.hideQuickInfo(true);\r\n\t\treturn true;\r\n\t};\r\n\tfor (var i=0; i window.innerWidth){\r\n\t\t\tleft = window.innerWidth - width;\r\n\t\t}\r\n\t\tleft = Math.max(0, left);\r\n\r\n\t\tqi.style.left = left + \"px\";\r\n\t\tqi.style.top = pos.top - (pos.dy?height:-pos.height) + \"px\";\r\n\t} else {\r\n\r\n\t\tconst dataPos = scheduler.$container.querySelector('.dhx_cal_data').offsetTop;\r\n\t\tqi.style.top = dataPos + 20 + \"px\";\r\n\t\tif (pos.dx == 1){\r\n\t\t\tqi.style.right = \"auto\";\r\n\t\t\tqi.style.left = -width + \"px\";\r\n\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tqi.style.left = \"-10px\";\r\n\t\t\t},1);\r\n\t\t} else {\r\n\t\t\tqi.style.left = \"auto\";\r\n\t\t\tqi.style.right = -width + \"px\";\r\n\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tqi.style.right = \"-10px\";\r\n\t\t\t},1);\r\n\t\t}\r\n\t\tqi.className = qi.className.replace(\" dhx_qi_left\",\"\").replace(\" dhx_qi_right\",\"\")+\" dhx_qi_\"+(pos.dx==1?\"left\":\"right\");\r\n\t}\r\n};\r\nscheduler.attachEvent(\"onTemplatesReady\", function(){\r\n\tscheduler.hideQuickInfo();\r\n\tif(this._quick_info_box){\r\n\t\tvar box = this._quick_info_box;\r\n\t\tif(box.parentNode){\r\n\t\t\tbox.parentNode.removeChild(box);\r\n\t\t}\r\n\t\tthis._quick_info_box = null;\r\n\t}\r\n});\r\nscheduler._quick_info_onscroll_handler = function(e){\r\n\tscheduler.hideQuickInfo();\r\n};\r\nscheduler._init_quick_info = function(){\r\n\tif (!this._quick_info_box){\r\n\r\n\r\n\t\tvar qi = this._quick_info_box = document.createElement(\"div\");\r\n\r\n\t\tthis._waiAria.quickInfoAttr(qi);\r\n\r\n\t\tqi.className = \"dhx_cal_quick_info\";\r\n\t\tif (scheduler.$testmode)\r\n\t\t\tqi.className += \" dhx_no_animate\";\r\n\t\tif (scheduler.config.rtl) qi.className += \" dhx_quick_info_rtl\";\r\n\t//title\r\n\t\tvar ariaAttr = this._waiAria.quickInfoHeaderAttrString();\r\n\t\tvar html = `\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t\t
\r\n\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t\t
`;\r\n\r\n\t//buttons\r\n\t\thtml += \"
\";\r\n\t\tvar buttons = scheduler.config.icons_select;\r\n\t\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\t\tvar ariaAttr = this._waiAria.quickInfoButtonAttrString(this.locale.labels[buttons[i]]);\r\n\t\t\t\thtml += `
\r\n\t\t\t\t
${scheduler.locale.labels[buttons[i]]}
`;\r\n\t\t\t}\r\n\t\t// }\r\n\t\thtml += \"
\";\r\n\r\n\t\tqi.innerHTML = html;\r\n\t\tscheduler.event(qi, \"click\", function(ev){\r\n\t\t\tscheduler._qi_button_click(ev.target || ev.srcElement);\r\n\t\t});\r\n\t\tif (scheduler.config.quick_info_detached){\r\n\t\t\tscheduler._detachDomEvent(scheduler._els[\"dhx_cal_data\"][0], \"scroll\", scheduler._quick_info_onscroll_handler);\r\n\t\t\tscheduler.event(scheduler._els[\"dhx_cal_data\"][0], \"scroll\", scheduler._quick_info_onscroll_handler);\r\n\t\t}\r\n\t}\r\n\r\n\treturn this._quick_info_box;\r\n};\r\n\r\nscheduler._qi_button_click = function(node){\r\n\tvar box = scheduler._quick_info_box;\r\n\tif (!node || node == box) return;\r\n\r\n\tif(node.closest(\".dhx_cal_qi_close_btn\")){\r\n\t\tscheduler.hideQuickInfo();\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar mask = scheduler._getClassName(node);\r\n\tif (mask.indexOf(\"_icon\")!=-1){\r\n\t\tvar id = scheduler._quick_info_box_id;\r\n\t\tscheduler._click.buttons[mask.split(\" \")[1].replace(\"icon_\",\"\")](id);\r\n\t} else\r\n\t\tscheduler._qi_button_click(node.parentNode);\r\n};\r\nscheduler._get_event_counter_part = function(id){\r\n\tvar domEv = scheduler.getRenderedEvent(id);\r\n\tvar left = 0;\r\n\tvar top = 0;\r\n\r\n\tvar node = domEv;\r\n\twhile (node && node != scheduler._obj){\r\n\t\tleft += node.offsetLeft;\r\n\t\ttop += node.offsetTop-node.scrollTop;\r\n\t\tnode = node.offsetParent;\r\n\t}\r\n\tif(node){\r\n\t\tvar dx = (left + domEv.offsetWidth/2) > (scheduler._x/2) ? 1 : 0;\r\n\t\tvar dy = (top + domEv.offsetHeight/2) > (scheduler._y/2) ? 1 : 0;\r\n\r\n\t\treturn { left:left, top:top, dx:dx, dy:dy,\r\n\t\t\twidth:domEv.offsetWidth, height:domEv.offsetHeight };\r\n\t}\r\n\treturn 0;\r\n};\r\n\r\nscheduler._fill_quick_data = function(id){\r\n\tvar ev = scheduler.getEvent(id);\r\n\tvar qi = scheduler._quick_info_box;\r\n\r\n\tscheduler._quick_info_box_id = id;\r\n\r\n//title content\r\n\r\n\tvar header = {\r\n\t\tcontent: scheduler.templates.quick_info_title(ev.start_date, ev.end_date, ev),\r\n\t\tdate: scheduler.templates.quick_info_date(ev.start_date, ev.end_date, ev)\r\n\t};\r\n\tvar titleContent = qi.querySelector(\".dhx_cal_qi_tcontent\");\r\n\ttitleContent.innerHTML = `${header.content}`;\r\n\tvar titleDate = qi.querySelector(\".dhx_cal_qi_tdate\");\r\n\ttitleDate.innerHTML = header.date;\r\n\r\n\tscheduler._waiAria.quickInfoHeader(qi, [header.content, header.date].join(\" \"));\r\n\r\n//main content\r\n\tvar main = qi.querySelector(\".dhx_cal_qi_content\");\r\n\tconst mainContent = scheduler.templates.quick_info_content(ev.start_date, ev.end_date, ev);\r\n\tif(mainContent){\r\n\t\tmain.classList.remove(\"dhx_hidden\");\r\n\t\tmain.innerHTML = mainContent;\r\n\t}else{\r\n\t\tmain.classList.add(\"dhx_hidden\");\r\n\t}\r\n};\r\n\r\n\r\n}","export default function(scheduler){\r\n\t\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar originalRecurringSetValue;\r\n\tif (scheduler.form_blocks.recurring) {\r\n\t\toriginalRecurringSetValue = scheduler.form_blocks.recurring.set_value;\r\n\t}\r\n\tvar original_left_buttons = scheduler.config.buttons_left.slice();\r\n\tvar original_right_buttons = scheduler.config.buttons_right.slice();\r\n\r\n\tscheduler.attachEvent(\"onBeforeLightbox\", function(id) {\r\n\t\tif (this.config.readonly_form || this.getEvent(id).readonly) {\r\n\t\t\tthis.config.readonly_active = true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.config.readonly_active = false;\r\n\t\t\tscheduler.config.buttons_left = original_left_buttons.slice();\r\n\t\t\tscheduler.config.buttons_right = original_right_buttons.slice();\r\n\t\r\n\t\t\t// initial value\r\n\t\t\tif(scheduler.form_blocks.recurring) {\r\n\t\t\t\tscheduler.form_blocks.recurring.set_value = originalRecurringSetValue;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar sns = this.config.lightbox.sections;\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\tfor (var i = 0; i < sns.length; i++) {\r\n\t\t\t\tif (sns[i].type == 'recurring') {\r\n\t\t\t\t\tif (this.config.readonly_active && scheduler.form_blocks.recurring) {\r\n\t\t\t\t\t\tscheduler.form_blocks.recurring.set_value = function(node, value, ev) {\r\n\t\t\t\t\t\t\tvar wrapper = scheduler.$domHelpers.closest(node, \".dhx_wrap_section\");\r\n\t\t\t\t\t\t\tvar style = \"none\";\r\n\t\t\t\t\t\t\twrapper.querySelector('.dhx_cal_lsection').display = style;\r\n\t\t\t\t\t\t\twrapper.querySelector('.dhx_form_repeat').display = style;\r\n\t\t\t\t\t\t\twrapper.style.display = style;\r\n\r\n\t\t\t\t\t\t\tscheduler.setLightboxSize();\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar forbidden_buttons = [\"dhx_delete_btn\", \"dhx_save_btn\"];\r\n\t\t\tvar button_arrays = [scheduler.config.buttons_left, scheduler.config.buttons_right];\r\n\t\t\tfor (var i = 0; i < forbidden_buttons.length; i++) {\r\n\t\t\t\tvar forbidden_button = forbidden_buttons[i];\r\n\t\t\t\tfor (var k = 0; k < button_arrays.length; k++) {\r\n\t\t\t\t\tvar button_array = button_arrays[k];\r\n\t\t\t\t\tvar index = -1;\r\n\t\t\t\t\tfor (var p = 0; p < button_array.length; p++) {\r\n\t\t\t\t\t\tif (button_array[p] == forbidden_button) {\r\n\t\t\t\t\t\t\tindex = p;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (index != -1) {\r\n\t\t\t\t\t\tbutton_array.splice(index, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.resetLightbox();\r\n\r\n\t\treturn true;\r\n\t});\r\n\r\n\tfunction txt_replace(tag, d, n, text) {\r\n\t\tvar txts = d.getElementsByTagName(tag);\r\n\t\tvar txtt = n.getElementsByTagName(tag);\r\n\t\tfor (var i = txtt.length - 1; i >= 0; i--) {\r\n\t\t\tvar n = txtt[i];\r\n\t\t\tif (!text){\r\n\t\t\t\tn.disabled = true;\r\n\t\t\t\t//radio and checkboxes loses state after .cloneNode in IE\r\n\t\t\t\tif(d.checked)\r\n\t\t\t\t\tn.checked = true;\r\n\t\t\t}else {\r\n\t\t\t\tvar t = document.createElement(\"span\");\r\n\t\t\t\tt.className = \"dhx_text_disabled\";\r\n\t\t\t\tt.innerHTML = text(txts[i]);\r\n\t\t\t\tn.parentNode.insertBefore(t, n);\r\n\t\t\t\tn.parentNode.removeChild(n);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tvar old = scheduler._fill_lightbox;\r\n\tscheduler._fill_lightbox = function() {\r\n\r\n\t\tvar lb = this.getLightbox();\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\tlb.style.visibility = 'hidden';\r\n\t\t\t// lightbox should have actual sizes before rendering controls\r\n\t\t\t// currently only matters for dhtmlxCombo\r\n\t\t\tlb.style.display = 'block';\r\n\t\t}\r\n\t\tvar res = old.apply(this, arguments);\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\t//reset visibility and display\r\n\t\t\tlb.style.visibility = '';\r\n\t\t\tlb.style.display = 'none';\r\n\t\t}\r\n\r\n\t\tif (this.config.readonly_active) {\r\n\r\n\t\t\tvar originalForm = this.getLightbox();\r\n\t\t\tvar readonlyForm = this._lightbox_r = originalForm.cloneNode(true);\r\n\t\t\treadonlyForm.id = scheduler.uid();\r\n\t\t\treadonlyForm.className += \" dhx_cal_light_readonly\";\r\n\t\t\ttxt_replace(\"textarea\", originalForm, readonlyForm, function(a) {\r\n\t\t\t\treturn a.value;\r\n\t\t\t});\r\n\t\t\ttxt_replace(\"input\", originalForm, readonlyForm, false);\r\n\t\t\ttxt_replace(\"select\", originalForm, readonlyForm, function(a) {\r\n\t\t\t\tif(!a.options.length) return \"\";\r\n\t\t\t\treturn a.options[Math.max((a.selectedIndex || 0), 0)].text;\r\n\t\t\t});\r\n\r\n\t\t\toriginalForm.parentNode.insertBefore(readonlyForm, originalForm);\r\n\r\n\t\t\tthis.showCover(readonlyForm);\r\n\t\t\tif (scheduler._lightbox)\r\n\t\t\t\tscheduler._lightbox.parentNode.removeChild(scheduler._lightbox);\r\n\t\t\tthis._lightbox = readonlyForm;\r\n\r\n\t\t\tif (scheduler.config.drag_lightbox)\r\n\t\t\t\tscheduler.event(readonlyForm.firstChild, \"mousedown\", scheduler._ready_to_dnd);\r\n\t\t\t\t\r\n\t\t\tscheduler._init_lightbox_events();\r\n\t\t\tthis.setLightboxSize();\r\n\t\t}\r\n\t\treturn res;\r\n\t};\r\n\r\n\tvar hold = scheduler.hide_lightbox;\r\n\tscheduler.hide_lightbox = function() {\r\n\t\tif (this._lightbox_r) {\r\n\t\t\tthis._lightbox_r.parentNode.removeChild(this._lightbox_r);\r\n\t\t\tthis._lightbox_r = this._lightbox = null;\r\n\t\t}\r\n\r\n\t\treturn hold.apply(this, arguments);\r\n\t};\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.occurrence_timestamp_in_utc = false;\r\nscheduler.config.recurring_workdays = [1,2,3,4,5];\r\nscheduler.form_blocks[\"recurring\"] = {\r\n\t_get_node : function(node){\r\n\t\tif (typeof node == \"string\"){\r\n\t\t\tlet element = scheduler._lightbox.querySelector(`#${node}`);\r\n\t\t\tif(!element){\r\n\t\t\t\t// form is detached from lightbox \r\n\t\t\t\t// search globally, won't work in LWC\r\n\t\t\t\telement = document.getElementById(node);\r\n\t\t\t}\r\n\t\t\tnode = element;\r\n\t\t}\r\n\t\tif (node.style.display == 'none')\r\n\t\t\tnode.style.display = \"\";\r\n\t\treturn node;\r\n\t},\r\n\t_outer_html: function(node){\r\n\t\treturn node.outerHTML || getOuterHTML(node);\r\n\r\n\t\t//probably not needed, FF v10- only\r\n\t\tfunction getOuterHTML(n){\r\n\t\t\tvar div = document.createElement('div'), h;\r\n\t\t\tdiv.appendChild( n.cloneNode(true) );\r\n\t\t\th = div.innerHTML;\r\n\t\t\tdiv = null;\r\n\t\t\treturn h;\r\n\t\t}\r\n\t},\r\n\trender:function(sns) {\r\n\t\tif(sns.form){\r\n\t\t\tvar rec = scheduler.form_blocks[\"recurring\"];\r\n\t\t\tvar form = rec._get_node(sns.form);\r\n\t\t\tvar html = rec._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\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t''+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t''+\r\n\t\t\t\t\t\t\t\t''+\r\n\t\t\t\t\t\t\t\tloc.select_year_day2+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t''+loc.repeat_text_occurences_count+'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t'
'+\r\n\t\t\t\t'
'+\r\n\t\t\t\t'';\r\n\t},\r\n\t_ds: {},\r\n\t_get_form_node: function(els, name, value){\r\n\t\tvar col = els[name];\r\n\t\tif(!col) return null;\r\n\t\tif(col.nodeName) return col;\r\n\r\n\t\tif(col.length){\r\n\t\t\tfor(var i=0; i < col.length; i++){\r\n\t\t\t\tif(col[i].value == value)\r\n\t\t\t\t\treturn col[i];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\t_get_node_value: function(els, name, multiselect){\r\n\t\tvar col = els[name];\r\n\t\tif(!col) return \"\";\r\n\t\tif(col.length){\r\n\t\t\tif(multiselect){\r\n\t\t\t\tvar res = [];\r\n\t\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\t\tif (col[i].checked) res.push(col[i].value);\r\n\r\n\t\t\t\treturn res;\r\n\t\t\t}else{\r\n\t\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\t\tif (col[i].checked) return col[i].value;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(col.value)\r\n\t\t\treturn !multiselect ? col.value : [col.value];\r\n\t},\r\n\r\n\t_get_node_numeric_value: function(els, name){\r\n\t\tvar value = scheduler.form_blocks[\"recurring\"]._get_node_value(els, name);\r\n\t\treturn ((value * 1) || 0);\r\n\t},\r\n\r\n\t_set_node_value: function(els, name, value){\r\n\t\tvar col = els[name];\r\n\t\tif(!col) return;\r\n\r\n\t\tif(col.name == name){\r\n\t\t\tcol.value = value;\r\n\t\t}else if(col.length){\r\n\t\t\tvar hash_value = typeof value == \"object\";\r\n\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\tif (hash_value || col[i].value == value){\r\n\t\t\t\t\tcol[i].checked = hash_value ? !!value[col[i].value] : !!value;\r\n\t\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t_init_set_value:function(node, value, ev) {\r\n\t\tvar block = scheduler.form_blocks[\"recurring\"];\r\n\t\tvar get_value = block._get_node_value;\r\n\t\tvar set_value = block._set_node_value;\r\n\t\tscheduler.form_blocks[\"recurring\"]._ds = {start:ev.start_date, end:ev._end_date};\r\n\r\n\t\tvar str_date_format = scheduler.date.str_to_date(scheduler.config.repeat_date, false, true);\r\n\t\tvar str_date = function(str_date) {\r\n\t\t\tvar date = str_date_format(str_date);\r\n\t\t\tif (scheduler.config.include_end_by)\r\n\t\t\t\tdate = scheduler.date.add(date, 1, 'day');\r\n\t\t\treturn date;\r\n\t\t};\r\n\r\n\t\tvar date_str = scheduler.date.date_to_str(scheduler.config.repeat_date);\r\n\r\n\t\tvar top = node.getElementsByTagName(\"FORM\")[0];\r\n\t\tvar els = {};\r\n\r\n\t\tfunction register_els(inps) {\r\n\t\t\tfor (var i = 0; i < inps.length; i++) {\r\n\t\t\t\tvar inp = inps[i];\r\n\r\n\t\t\t\tif(inp.name){\r\n\t\t\t\t\tif(!els[inp.name]){\r\n\t\t\t\t\t\tels[inp.name] = inp;\r\n\t\t\t\t\t}else if(els[inp.name].nodeType){\r\n\t\t\t\t\t\tvar node = els[inp.name];\r\n\t\t\t\t\t\tels[inp.name] = [node, inp];\r\n\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tels[inp.name].push(inp);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tregister_els(top.getElementsByTagName(\"INPUT\"));\r\n\t\tregister_els(top.getElementsByTagName(\"SELECT\"));\r\n\r\n\t\tif (!scheduler.config.repeat_date_of_end) {\r\n\t\t\tvar formatter = scheduler.date.date_to_str(scheduler.config.repeat_date);\r\n\t\t\tscheduler.config.repeat_date_of_end = formatter(scheduler.date.add(scheduler._currentDate(), 30, \"day\"));\r\n\t\t}\r\n\t\tset_value(els, \"date_of_end\", scheduler.config.repeat_date_of_end);\r\n\r\n\t\tvar $ = function(a) {\r\n\t\t\treturn scheduler._lightbox.querySelector(`#${a}`) || { style:{} };//return fake object if node not found\r\n\t\t};\r\n\r\n\t\tfunction change_current_view() {\r\n\t\t\t$(\"dhx_repeat_day\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_week\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_month\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_year\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_\" + this.value).style.display = \"\";\r\n\t\t\tscheduler.setLightboxSize();\r\n\t\t}\r\n\r\n\t\tfunction get_repeat_code(dates) {\r\n\t\t\tvar code = [get_value(els, \"repeat\")];\r\n\t\t\tget_rcode[code[0]](code, dates);\r\n\r\n\t\t\twhile (code.length < 5) code.push(\"\");\r\n\t\t\tvar repeat = \"\";\r\n\r\n\t\t\tvar end = get_end_rule(els);\r\n\r\n\t\t\tif (end == \"no\") {\r\n\t\t\t\tdates.end = new Date(9999, 1, 1);\r\n\t\t\t\trepeat = \"no\";\r\n\t\t\t}\r\n\t\t\telse if (end == \"date_of_end\") {\r\n\t\t\t\tdates.end = str_date(get_value(els, \"date_of_end\"));\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tscheduler.transpose_type(code.join(\"_\"));\r\n\t\t\t\trepeat = Math.max(1, get_value(els, \"occurences_count\"));\r\n\r\n\t\t\t\tvar transp = 0;\r\n\r\n\t\t\t\t//var transp = ((code[0] == \"week\" && code[4] && code[4].toString().indexOf(scheduler.config.start_on_monday ? 1 : 0) == -1) ? 1 : 0);\r\n\r\n\t\t\t\t// which is equal to following code, seems to produce extra instance, not clear why needed\r\n\r\n\t\t\t\t/*if(code[0] == \"week\"){\r\n\t\t\t\t\tvar days = code[4] || \"\";\r\n\t\t\t\t\tif(scheduler.config.start_on_monday){\r\n\t\t\t\t\t\tif(days.indexOf(1) == -1)\r\n\t\t\t\t\t\ttransp = 1;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(days.indexOf(0) == -1)\r\n\t\t\t\t\t\ttransp = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}*/\r\n\r\n\t\t\t//\tdates.end = scheduler.date.add(new Date(dates.start), repeat + transp, code.join(\"_\"));\r\n\r\n\t\t\t\tdates.end = scheduler.date[\"add_\" + code.join(\"_\")](new Date(dates.start), repeat + transp, {start_date: dates.start}) || dates.start;\r\n\t\t\t}\r\n\r\n\t\t\treturn code.join(\"_\") + \"#\" + repeat;\r\n\t\t}\r\n\t\tfunction get_end_rule(els){\r\n\t\t\tvar end = els[\"end\"];\r\n\t\t\tif(end.length){\r\n\t\t\t\tfor(var i =0; i < end.length; i++){\r\n\t\t\t\t\tif(end[i].checked){\r\n\t\t\t\t\t\tif(end[i].value && end[i].value != \"on\"){//seems to be default value:var input = document.createElement(\"input\"); input.type = \"radio\"; input.value\r\n\t\t\t\t\t\t\treturn end[i].value;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tif(!i){\r\n\t\t\t\t\t\t\t\treturn \"no\";\r\n\t\t\t\t\t\t\t}else if(i == 2){\r\n\t\t\t\t\t\t\t\treturn \"date_of_end\";\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\treturn \"occurences_count\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(end.value)\r\n\t\t\t\t\treturn end.value;\r\n\t\t\t}\r\n\t\t\treturn \"no\";\r\n\t\t}\r\n\t\tfunction set_end_rule(els, value){\r\n\t\t\tvar end = els[\"end\"];\r\n\r\n\t\t\tif(end.length){\r\n\t\t\t\tvar has_values = !!end[0].value && end[0].value != \"on\";\r\n\t\t\t\tif(has_values){\r\n\t\t\t\t\tfor(var i =0; i < end.length; i++){\r\n\t\t\t\t\t\tif(end[i].value == value)\r\n\t\t\t\t\t\t\tend[i].checked = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar ind = 0;\r\n\t\t\t\t\tswitch(value){\r\n\t\t\t\t\t\tcase \"no\":\r\n\t\t\t\t\t\t\tind = 0;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"date_of_end\":\r\n\t\t\t\t\t\t\tind = 2;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tind = 1;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend[ind].checked = true;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tend.value = value;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tscheduler.form_blocks[\"recurring\"]._get_repeat_code = get_repeat_code;\r\n\t\tvar get_rcode = {\r\n\t\t\tmonth:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tif (get_value(els, \"month_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_count\")));\r\n\t\t\t\t\tdates.start.setDate(get_value(els, \"month_day\"));\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_count2\")));\r\n\t\t\t\t\tcode.push( get_value(els, \"month_day2\"));\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_week2\")));\r\n\t\t\t\t\tif (!scheduler.config.repeat_precise){\r\n\t\t\t\t\t\tdates.start.setDate(1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tdates._start = true;\r\n\t\t\t},\r\n\t\t\tweek:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"week_count\")));\r\n\t\t\t\tcode.push(\"\");\r\n\t\t\t\tcode.push(\"\");\r\n\t\t\t\tvar t = [];\r\n\r\n\t\t\t\tvar col = get_value(els, \"week_day\", true);\r\n\t\t\t\t//var col = els[\"week_day\"];\r\n\t\t\t\tvar day = dates.start.getDay();\r\n\t\t\t\tvar start_exists = false;\r\n\r\n\t\t\t\tfor (var i = 0; i < col.length; i++){\r\n\t\t\t\t\tt.push(col[i]);\r\n\t\t\t\t\tstart_exists = start_exists || col[i] == day;\r\n\t\t\t\t}\r\n\t\t\t\tif (!t.length){\r\n\t\t\t\t\tt.push(day);\r\n\t\t\t\t\tstart_exists = true;\r\n\t\t\t\t}\r\n\t\t\t\tt.sort();\r\n\r\n\r\n\t\t\t\tif (!scheduler.config.repeat_precise){\r\n\t\t\t\t\tdates.start = scheduler.date.week_start(dates.start);\r\n\t\t\t\t\tdates._start = true;\r\n\t\t\t\t} else if (!start_exists){\r\n\t\t\t\t\tscheduler.transpose_day_week(dates.start, t, 1, 7);\r\n\t\t\t\t\tdates._start = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcode.push(t.join(\",\"));\r\n\t\t\t},\r\n\t\t\tday:function(code) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tif (get_value(els, \"day_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"day_count\")));\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcode.push(\"week\");\r\n\t\t\t\t\tcode.push(1);\r\n\t\t\t\t\tcode.push(\"\");\r\n\t\t\t\t\tcode.push(\"\");\r\n\t\t\t\t\tcode.push(scheduler.config.recurring_workdays.join(\",\"));\r\n\t\t\t\t\tcode.splice(0, 1);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tyear:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\r\n\t\t\t\tif (get_value(els, \"year_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(\"1\");\r\n\t\t\t\t\tdates.start.setMonth(0);\r\n\t\t\t\t\tdates.start.setDate(get_value(els, \"year_day\"));\r\n\t\t\t\t\tdates.start.setMonth(get_value(els, \"year_month\"));\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcode.push(\"1\");\r\n\t\t\t\t\tcode.push(get_value(els, \"year_day2\"));\r\n\t\t\t\t\tcode.push(get_value(els, \"year_week2\"));\r\n\t\t\t\t\tdates.start.setDate(1);\r\n\t\t\t\t\tdates.start.setMonth(get_value(els, \"year_month2\"));\r\n\t\t\t\t}\r\n\t\t\t\tdates._start = true;\r\n\t\t\t}\r\n\t\t};\r\n\t\tvar set_rcode = {\r\n\t\t\tweek:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\t\tset_value(els, \"week_count\", code[1]);\r\n\r\n\t\t\t\tvar t = code[4].split(\",\");\r\n\t\t\t\tvar d = {};\r\n\t\t\t\tfor (var i = 0; i < t.length; i++) d[t[i]] = true;\r\n\r\n\t\t\t\tset_value(els, \"week_day\", d);\r\n\r\n\t\t\t\t//for (var i = 0; i < col.length; i++)\r\n\t\t\t\t//\tcol[i].checked = (!!d[col[i].value]);\r\n\t\t\t},\r\n\t\t\tmonth:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\r\n\t\t\t\tif (code[2] === \"\") {\r\n\t\t\t\t\tset_value(els, \"month_type\", \"d\");\r\n\t\t\t\t\tset_value(els, \"month_count\", code[1]);\r\n\t\t\t\t\tset_value(els, \"month_day\", dates.start.getDate());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tset_value(els, \"month_type\", \"w\");\r\n\t\t\t\t\tset_value(els, \"month_count2\", code[1]);\r\n\t\t\t\t\tset_value(els, \"month_week2\", code[3]);\r\n\t\t\t\t\tset_value(els, \"month_day2\", code[2]);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tday:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\t\tset_value(els, \"day_type\", \"d\");\r\n\t\t\t\tset_value(els, \"day_count\", code[1]);\r\n\t\t\t},\r\n\t\t\tyear:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\r\n\t\t\t\tif (code[2] === \"\") {\r\n\t\t\t\t\tset_value(els, \"year_type\", \"d\");\r\n\t\t\t\t\tset_value(els, \"year_day\", dates.start.getDate());\r\n\t\t\t\t\tset_value(els, \"year_month\", dates.start.getMonth());\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tset_value(els, \"year_type\", \"w\");\r\n\t\t\t\t\tset_value(els, \"year_week2\", code[3]);\r\n\t\t\t\t\tset_value(els, \"year_day2\", code[2]);\r\n\t\t\t\t\tset_value(els, \"year_month2\", dates.start.getMonth());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfunction set_repeat_code(code, dates) {\r\n\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\tvar data = code.split(\"#\");\r\n\t\t\tcode = data[0].split(\"_\");\r\n\t\t\tset_rcode[code[0]](code, dates);\r\n\r\n\t\t\tswitch (data[1]) {\r\n\t\t\t\tcase \"no\":\r\n\t\t\t\t\tset_end_rule(els, \"no\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"\":\r\n\t\t\t\t\tset_end_rule(els, \"date_of_end\");\r\n\r\n\t\t\t\t\tvar end_date = dates.end;\r\n\t\t\t\t\tif (scheduler.config.include_end_by){\r\n\t\t\t\t\t\tend_date = scheduler.date.add(end_date, -1, 'day');\r\n\t\t\t\t\t}\r\n\t\t\t\t\tset_value(els, \"date_of_end\", date_str(end_date));\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tset_end_rule(els, \"occurences_count\");\r\n\t\t\t\t\tset_value(els, \"occurences_count\", data[1]);\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tset_value(els, \"repeat\", code[0]);\r\n\t\t\t//e.checked = true;\r\n\r\n\t\t\tvar node = scheduler.form_blocks[\"recurring\"]._get_form_node(els, \"repeat\", code[0]);\r\n\t\t\tif(node.nodeName == \"SELECT\"/* && node.onchange*/){\r\n\t\t\t//\tnode.onchange();\r\n\t\t\t\tnode.dispatchEvent(new Event('change'));\r\n\t\t\t\tnode.dispatchEvent(new MouseEvent('click'));\r\n\t\t\t}else{\r\n\t\t\t\tnode.dispatchEvent(new MouseEvent('click'));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tscheduler.form_blocks[\"recurring\"]._set_repeat_code = set_repeat_code;\r\n\r\n\t\tfor (var i = 0; i < top.elements.length; i++) {\r\n\t\t\tvar el = top.elements[i];\r\n\t\t\tswitch (el.name) {\r\n\t\t\t\tcase \"repeat\":\r\n\t\t\t\t\tif (el.nodeName == \"SELECT\" && !el.$_eventAttached) {\r\n\t\t\t\t\t\tel.$_eventAttached = true;\r\n\t\t\t\t\t\tel.addEventListener(\"change\", change_current_view);\r\n\t\t\t\t\t} else if(!el.$_eventAttached){\r\n\t\t\t\t\t\tel.$_eventAttached = true;\r\n\t\t\t\t\t\tel.addEventListener(\"click\", change_current_view);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tscheduler._lightbox._rec_init_done = true;\r\n\t},\r\n\tset_value:function(node, value, ev) {\r\n\t\tvar rf = scheduler.form_blocks[\"recurring\"];\r\n\t\tif (!scheduler._lightbox._rec_init_done)\r\n\t\t\trf._init_set_value(node, value, ev);\r\n\t\tnode.open = !ev.rec_type;\r\n\r\n\t\tnode.blocked = this._is_modified_occurence(ev);\r\n\r\n\t\tvar ds = rf._ds;\r\n\t\tds.start = ev.start_date;\r\n\t\tds.end = ev._end_date;\r\n\r\n\t\trf._toggle_block();\r\n\r\n\t\tif (value)\r\n\t\t\trf._set_repeat_code(value, ds);\r\n\t},\r\n\tget_value:function(node, ev) {\r\n\t\tif (node.open) {\r\n\t\t\tvar ds = scheduler.form_blocks[\"recurring\"]._ds;\r\n\t\t\tvar actual_dates = {};\r\n\r\n\t\t\tvar timeControl = getTimeSection();\r\n\r\n\t\t\ttimeControl.getValue(actual_dates);\r\n\t\t\tds.start = actual_dates.start_date;\r\n\t\t\tev.rec_type = scheduler.form_blocks[\"recurring\"]._get_repeat_code(ds);\r\n\t\t\tif (ds._start) {\r\n\t\t\t\tev.start_date = new Date(ds.start);\r\n\t\t\t\tev._start_date = new Date(ds.start);\r\n\t\t\t\tds._start = false;\r\n\t\t\t} else\r\n\t\t\t\tev._start_date = null;\r\n\r\n\t\t\tev._end_date = ds.end;\r\n\t\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\t\t} else {\r\n\t\t\tev.rec_type = ev.rec_pattern = \"\";\r\n\t\t\tev._end_date = ev.end_date;\r\n\t\t}\r\n\t\treturn ev.rec_type;\r\n\t},\r\n\t_get_button: function(){\r\n\t\tvar node = getRecurringSection().header;\r\n\t\treturn node.firstChild.firstChild;\r\n\t},\r\n\t_get_form: function(){\r\n\t\treturn getRecurringSection().node;\r\n\t},\r\n\topen:function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form();\r\n\t\tif(!cont.open)\r\n\t\t\tblock._toggle_block();\r\n\t},\r\n\tclose: function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form();\r\n\r\n\t\tif(cont.open)\r\n\t\t\tblock._toggle_block();\r\n\t},\r\n\t_toggle_block: function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form(),\r\n\t\t\tel = block._get_button();\r\n\t\tif (!cont.open && !cont.blocked) {\r\n\t\t\tcont.style.height = \"auto\";//reset to default value\r\n\t\t\tif(el){\r\n\t\t\t\tel.style.backgroundPosition = \"-5px 0px\";\r\n\t\t\t\tel.nextSibling.innerHTML = scheduler.locale.labels.button_recurring_open;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tcont.style.height = \"0px\";\r\n\t\t\tif(el){\r\n\t\t\t\tel.style.backgroundPosition = \"-5px 20px\";\r\n\t\t\t\tel.nextSibling.innerHTML = scheduler.locale.labels.button_recurring;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcont.open = !cont.open;\r\n\r\n\t\tscheduler.setLightboxSize();\r\n\t},\r\n\tfocus:function(node) {\r\n\t},\r\n\tbutton_click:function(node, button, event) {\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\t\tvar cont = block._get_form();\r\n\t\tif (!cont.blocked)\r\n\t\t\tscheduler.form_blocks.recurring._toggle_block();\r\n\t}\r\n};\r\n\r\nfunction getTimeSection(){\r\n\tvar timeControl = scheduler.formSection('time');\r\n\tif(!timeControl){\r\n\t\ttimeControl = getFirstSectionOfType('time');\r\n\t}\r\n\tif(!timeControl){\r\n\t\ttimeControl = getFirstSectionOfType('calendar_time');\r\n\t}\r\n\r\n\t\r\n\tif (!timeControl) {\r\n\t\tthrow new Error([\"Can't calculate the recurring rule, the Recurring form block can't find the Time control. Make sure you have the time control in 'scheduler.config.lightbox.sections' config.\",\r\n\"You can use either the default time control https://docs.dhtmlx.com/scheduler/time.html, or the datepicker https://docs.dhtmlx.com/scheduler/minicalendar.html, or a custom control. \",\r\n\"In the latter case, make sure the control is named \\\"time\\\":\",\r\n\"\",\r\n\"scheduler.config.lightbox.sections = [\",\r\n\"{name:\\\"time\\\", height:72, type:\\\"YOU CONTROL\\\", map_to:\\\"auto\\\" }];\"]\r\n.join(\"\\n\"));\r\n\t}\r\n\r\n\treturn timeControl;\r\n}\r\n\r\nfunction getRecurringSection(){\r\n\tvar recurringSection = scheduler.formSection('recurring');\r\n\tif(!recurringSection){\r\n\t\trecurringSection = getFirstSectionOfType('recurring');\r\n\t}\r\n\r\n\tif (!recurringSection) {\r\n\t\tthrow new Error([\"Can't locate the Recurring form section.\",\r\n\t\t\"Make sure that you have the recurring control on the lightbox configuration https://docs.dhtmlx.com/scheduler/recurring_events.html#recurringlightbox \",\r\n\t\t\"and that the recurring control has name \\\"recurring\\\":\",\r\n\"\",\r\n\"scheduler.config.lightbox.sections = [\",\r\n\"\t{name:\\\"recurring\\\", ... }\",\r\n\"];\"].join(\"\\n\"));\r\n\r\n\t}\r\n\r\n\treturn recurringSection;\r\n}\r\n\r\nfunction getFirstSectionOfType(type){\r\n\tfor(var i = 0; i < scheduler.config.lightbox.sections.length; i++){\r\n\t\tvar section = scheduler.config.lightbox.sections[i];\r\n\t\tif(section.type === type){\r\n\t\t\treturn scheduler.formSection(section.name);\r\n\t\t}\r\n\t}\r\n\treturn null;\r\n}\r\n\r\n//problem may occur if we will have two repeating events in the same moment of time\r\nscheduler._rec_markers = {};\r\nscheduler._rec_markers_pull = {};\r\nscheduler._add_rec_marker = function(ev, time) {\r\n\tev._pid_time = time;\r\n\tthis._rec_markers[ev.id] = ev;\r\n\tif (!this._rec_markers_pull[ev.event_pid]) this._rec_markers_pull[ev.event_pid] = {};\r\n\tthis._rec_markers_pull[ev.event_pid][time] = ev;\r\n};\r\nscheduler._get_rec_marker = function(time, id) {\r\n\tvar ch = this._rec_markers_pull[id];\r\n\tif (ch) return ch[time];\r\n\treturn null;\r\n};\r\nscheduler._get_rec_markers = function(id) {\r\n\treturn (this._rec_markers_pull[id] || []);\r\n};\r\n\r\nfunction clearMilliseconds(date){\r\n//\treturn date;\r\n\treturn new Date(\r\n\t\tdate.getFullYear(), \r\n\t\tdate.getMonth(), \r\n\t\tdate.getDate(), \r\n\t\tdate.getHours(), \r\n\t\tdate.getMinutes(),\r\n\t\tdate.getSeconds(),\r\n\t\t0\r\n\t);\r\n}\r\n\r\nscheduler._rec_temp = [];\r\n(function() {\r\n\tvar old_add_event = scheduler.addEvent;\r\n\tscheduler.addEvent = function(start_date, end_date, text, id, extra_data) {\r\n\t\tvar ev_id = old_add_event.apply(this, arguments);\r\n\r\n\t\tif (ev_id && scheduler.getEvent(ev_id)) {\r\n\t\t\tvar ev = scheduler.getEvent(ev_id);\r\n\t\t\t\r\n\t\t\tif(ev.start_date){\r\n\t\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t\t}\r\n\t\t\tif(ev.end_date){\r\n\t\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t\t}\r\n\t\t\tif (this._is_modified_occurence(ev))\r\n\t\t\t\tscheduler._add_rec_marker(ev, ev.event_length * 1000);\r\n\t\t\tif (ev.rec_type)\r\n\t\t\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\t\t}\r\n\t\treturn ev_id;\r\n\t};\r\n})();\r\n\r\nscheduler.attachEvent(\"onEventIdChange\", function(id, new_id) {\r\n\tif (this._ignore_call) return;\r\n\tthis._ignore_call = true;\r\n\r\n\tif(scheduler._rec_markers[id]){\r\n\t\t//important for for correct work of scheduler.getEvents(from, to) and collision detection\r\n\t\tscheduler._rec_markers[new_id] = scheduler._rec_markers[id];\r\n\t\tdelete scheduler._rec_markers[id];\r\n\t}\r\n\r\n\tif(scheduler._rec_markers_pull[id]){\r\n\t\tscheduler._rec_markers_pull[new_id] = scheduler._rec_markers_pull[id];\r\n\t\tdelete scheduler._rec_markers_pull[id];\r\n\t}\r\n\r\n\tfor (var i = 0; i < this._rec_temp.length; i++) {\r\n\t\tvar tev = this._rec_temp[i];\r\n\t\tif (tev.event_pid == id) {\r\n\t\t\ttev.event_pid = new_id;\r\n\t\t\tthis.changeEventId(tev.id, new_id + \"#\" + tev.id.split(\"#\")[1]);\r\n\t\t}\r\n\t}\r\n\r\n\tfor(var i in this._rec_markers){\r\n\t\tvar tev = this._rec_markers[i];\r\n\t\tif(tev.event_pid == id){\r\n\t\t\ttev.event_pid = new_id;\r\n\t\t\ttev._pid_changed = true;\r\n\t\t}\r\n\t}\r\n\r\n\tvar el = scheduler._rec_markers[new_id];\r\n\tif(el && el._pid_changed) {\r\n\t\tdelete el._pid_changed;\r\n\t\tsetTimeout(function() {\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler.callEvent(\"onEventChanged\", [new_id, scheduler.getEvent(new_id)]);\r\n\t\t}, 1);\r\n\t}\r\n\r\n\tdelete this._ignore_call;\r\n});\r\nscheduler.attachEvent(\"onConfirmedBeforeEventDelete\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (this._is_virtual_event(id) || (this._is_modified_occurence(ev) && ev.rec_type && ev.rec_type != 'none')) {\r\n\t\tid = id.split(\"#\");\r\n\t\tvar nid = this.uid();\r\n\t\tvar tid = (id[1]) ? id[1] : Math.round(ev._pid_time / 1000);\r\n\r\n\t\tvar nev = this._copy_event(ev);\r\n\t\tnev.id = nid;\r\n\t\tnev.event_pid = ev.event_pid || id[0];\r\n\t\tvar timestamp = tid;\r\n\t\tnev.event_length = timestamp;\r\n\t\tnev.rec_type = nev.rec_pattern = \"none\";\r\n\t\tthis.addEvent(nev);\r\n\r\n\t\tthis._add_rec_marker(nev, timestamp * 1000);\r\n\t} else {\r\n\t\tif (ev.rec_type && this._lightbox_id)\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\tvar sub = this._get_rec_markers(id);\r\n\t\tfor (var i in sub) {\r\n\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\tid = sub[i].id;\r\n\t\t\t\tif (this.getEvent(id))\r\n\t\t\t\t\tthis.deleteEvent(id, true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventDeleted\", function(id, ev){\r\n\tif(!this._is_virtual_event(id) && this._is_modified_occurence(ev)){\r\n\t\tif(!scheduler._events[id]){\r\n\t\t\tev.rec_type = ev.rec_pattern = \"none\";\r\n\t\t\tthis.setEvent(id, ev);\r\n\t\t}\r\n\t}\r\n});\r\nscheduler.attachEvent(\"onEventChanged\", function(id, event) {\r\n\tif (this._loading) return true;\r\n\r\n\tvar ev = this.getEvent(id);\r\n\r\n\tif (this._is_virtual_event(id)) {\r\n\t\tvar id = id.split(\"#\");\r\n\t\tvar nid = this.uid();\r\n\t\tthis._not_render = true;\r\n\r\n\t\tvar nev = this._copy_event(event);\r\n\t\tnev.id = nid;\r\n\t\tnev.event_pid = id[0];\r\n\t\tvar timestamp = id[1];\r\n\t\tnev.event_length = timestamp;\r\n\t\tnev.rec_type = nev.rec_pattern = \"\";\r\n\r\n\t\tthis._add_rec_marker(nev, timestamp * 1000);\r\n\t\tthis.addEvent(nev);\r\n\r\n\t\tthis._not_render = false;\r\n\r\n\t} else {\r\n\t\tif(ev.start_date){\r\n\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t}\r\n\t\tif(ev.end_date){\r\n\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t}\r\n\r\n\t\tif (ev.rec_type && this._lightbox_id){\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\t}\r\n\t\tvar sub = this._get_rec_markers(id);\r\n\t\tfor (var i in sub) {\r\n\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\tdelete this._rec_markers[sub[i].id];\r\n\t\t\t\tthis.deleteEvent(sub[i].id, true);\r\n\t\t\t}\r\n\t\t}\r\n\t\tdelete this._rec_markers_pull[id];\r\n\r\n\t\t// it's possible that after editing event is no longer exists, in such case we need to remove _select_id flag\r\n\t\tvar isEventFound = false;\r\n\t\tfor (var k = 0; k < this._rendered.length; k++) {\r\n\t\t\tif (this._rendered[k].getAttribute(this.config.event_attribute) == id)\r\n\t\t\t\tisEventFound = true;\r\n\t\t}\r\n\t\tif (!isEventFound)\r\n\t\t\tthis._select_id = null;\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventAdded\", function(id) {\r\n\tif (!this._loading) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (ev.rec_type && !ev.event_length){\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventSave\", function(id, data, is_new_event) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (!ev.rec_type && data.rec_type && !this._is_virtual_event(id))\r\n\t\tthis._select_id = null;\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventCreated\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (!ev.rec_type)\r\n\t\tev.rec_type = ev.rec_pattern = ev.event_length = ev.event_pid = \"\";\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventCancel\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (ev.rec_type) {\r\n\t\tthis._roll_back_dates(ev);\r\n\t\t// a bit expensive, but we need to be sure that event re-rendered, because view can be corrupted by resize , during edit process\r\n\t\tthis.render_view_data();\r\n\t}\r\n});\r\nscheduler._roll_back_dates = function(ev) {\r\n\tif(ev.start_date){\r\n\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t}\r\n\tif(ev.end_date){\r\n\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t}\r\n\tev.event_length = Math.round((ev.end_date.valueOf() - ev.start_date.valueOf()) / 1000);\r\n\tev.end_date = ev._end_date;\r\n\tif (ev._start_date) {\r\n\t\tev.start_date.setMonth(0);\r\n\t\tev.start_date.setDate(ev._start_date.getDate());\r\n\t\tev.start_date.setMonth(ev._start_date.getMonth());\r\n\t\tev.start_date.setFullYear(ev._start_date.getFullYear());\r\n\r\n\t}\r\n};\r\n\r\nscheduler._is_virtual_event = function(id){\r\n\treturn id.toString().indexOf(\"#\") != -1;\r\n};\r\nscheduler._is_modified_occurence = function(ev){\r\n\treturn (ev.event_pid && ev.event_pid != \"0\");\r\n};\r\n\r\nscheduler.showLightbox_rec = scheduler.showLightbox;\r\nscheduler.showLightbox = function(id) {\r\n\tvar locale = this.locale;\r\n\tvar c = scheduler.config.lightbox_recurring;\r\n\tvar ev = this.getEvent(id);\r\n\tvar pid = ev.event_pid;\r\n\tvar isVirtual = this._is_virtual_event(id);\r\n\tif (isVirtual)\r\n\t\tpid = id.split(\"#\")[0];\r\n\r\n\t// show series\r\n\tvar showSeries = function(id) {\r\n\t\tvar event = scheduler.getEvent(id);\r\n\t\tevent._end_date = event.end_date;\r\n\t\tevent.end_date = new Date(event.start_date.valueOf() + event.event_length * 1000);\r\n\t\treturn scheduler.showLightbox_rec(id); // editing series\r\n\t};\r\n\r\n\tif ( (pid || pid*1 === 0) && ev.rec_type) {\r\n\t\t// direct API call on series id\r\n\t\treturn showSeries(id);\r\n\t}\r\n\tif ( !pid || pid === '0' || ( (!locale.labels.confirm_recurring || c == 'instance') || (c == 'series' && !isVirtual)) ) {\r\n\t\t// editing instance or non recurring event\r\n\t\treturn this.showLightbox_rec(id);\r\n\t}\r\n\tif (c == 'ask') {\r\n\t\tvar that = this;\r\n\t\tscheduler.modalbox({\r\n\t\t\ttext: locale.labels.confirm_recurring,\r\n\t\t\ttitle: locale.labels.title_confirm_recurring,\r\n\t\t\twidth: \"500px\",\r\n\t\t\tposition: \"middle\",\r\n\t\t\tbuttons:[locale.labels.button_edit_series, locale.labels.button_edit_occurrence, locale.labels.icon_cancel],\r\n\t\t\tcallback: function(index) {\r\n\t\t\t\tswitch(+index) {\r\n\t\t\t\t\tcase 0:\r\n\t\t\t\t\t\treturn showSeries(pid);\r\n\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\treturn that.showLightbox_rec(id);\r\n\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t} else {\r\n\t\tshowSeries(pid);\r\n\t}\r\n};\r\n\r\n\r\nscheduler.get_visible_events_rec = scheduler.get_visible_events;\r\nscheduler.get_visible_events = function(only_timed) {\r\n\tfor (var i = 0; i < this._rec_temp.length; i++)\r\n\t\tdelete this._events[this._rec_temp[i].id];\r\n\tthis._rec_temp = [];\r\n\r\n\tvar stack = this.get_visible_events_rec(only_timed);\r\n\tvar out = [];\r\n\tfor (var i = 0; i < stack.length; i++) {\r\n\t\tif (stack[i].rec_type) {\r\n\t\t\t//deleted element of series\r\n\t\t\tif (stack[i].rec_pattern != \"none\")\r\n\t\t\t\tthis.repeat_date(stack[i], out);\r\n\t\t}\r\n\t\telse out.push(stack[i]);\r\n\t}\r\n\treturn out;\r\n};\r\n\r\n\r\n(function() {\r\n\tvar old = scheduler.isOneDayEvent;\r\n\tscheduler.isOneDayEvent = function(ev) {\r\n\t\tif (ev.rec_type) return true;\r\n\t\treturn old.call(this, ev);\r\n\t};\r\n\tvar old_update_event = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id) {\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tif(ev && ev.rec_type){\r\n\t\t\t//rec_type can be changed without the lightbox,\r\n\t\t\t// make sure rec_pattern updated as well\r\n\t\t\tev.rec_pattern = (ev.rec_type || \"\").split(\"#\")[0];\r\n\t\t}\r\n\t\tif (ev && ev.rec_type && !this._is_virtual_event(id)) {\r\n\t\t\tscheduler.update_view();\r\n\t\t} else {\r\n\t\t\told_update_event.call(this, id);\r\n\t\t}\r\n\t};\r\n})();\r\n\r\nscheduler.transponse_size = {\r\n\tday:1, week:7, month:1, year:12\r\n};\r\nscheduler.date.day_week = function(sd, day, week) {\r\n\tsd.setDate(1);\r\n\tvar originalMonth = scheduler.date.month_start(new Date(sd));\r\n\tweek = (week - 1) * 7;\r\n\tvar cday = sd.getDay();\r\n\tvar nday = day * 1 + week - cday + 1;\r\n\tsd.setDate(nday <= week ? (nday + 7) : nday);\r\n\tvar newMonth = scheduler.date.month_start(new Date(sd));\r\n\tif(originalMonth.valueOf() !== newMonth.valueOf()){\r\n\t\treturn false;\r\n\t}\r\n\treturn true;\r\n};\r\nscheduler.transpose_day_week = function(sd, list, cor, size, cor2) {\r\n\tvar cday = (sd.getDay() || (scheduler.config.start_on_monday ? 7 : 0)) - cor;\r\n\tfor (var i = 0; i < list.length; i++) {\r\n\t\tif (list[i] > cday)\r\n\t\t\treturn sd.setDate(sd.getDate() + list[i] * 1 - cday - (size ? cor : cor2));\r\n\t}\r\n\tthis.transpose_day_week(sd, list, cor + size, null, cor);\r\n};\r\nscheduler.transpose_type = function(type) {\r\n\tvar transposeRecurring = \"transpose_\" + type;\r\n\tif (!this.date[transposeRecurring]) {\r\n\t\tvar recurringParts = type.split(\"_\");\r\n\t\tvar dayDurationMs = 60 * 60 * 24 * 1000;\r\n\t\tvar addRecurring = \"add_\" + type;\r\n\t\tvar recurringStepDays = this.transponse_size[recurringParts[0]] * recurringParts[1];\r\n\r\n\t\tif (recurringParts[0] == \"day\" || recurringParts[0] == \"week\") {\r\n\t\t\tvar weekDays = null;\r\n\t\t\tif (recurringParts[4]) {\r\n\t\t\t\tweekDays = recurringParts[4].split(\",\");\r\n\t\t\t\tif (scheduler.config.start_on_monday) {\r\n\t\t\t\t\tfor (var i = 0; i < weekDays.length; i++)\r\n\t\t\t\t\t\tweekDays[i] = (weekDays[i] * 1) || 7;\r\n\t\t\t\t\tweekDays.sort();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.date[transposeRecurring] = function(nd, td) {\r\n\t\t\t\tvar delta = Math.floor((td.valueOf() - nd.valueOf()) / (dayDurationMs * recurringStepDays));\r\n\t\t\t\tif (delta > 0)\r\n\t\t\t\t\tnd.setDate(nd.getDate() + delta * recurringStepDays);\r\n\t\t\t\tif (weekDays)\r\n\t\t\t\t\tscheduler.transpose_day_week(nd, weekDays, 1, recurringStepDays);\r\n\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t\tthis.date[addRecurring] = function(sd, inc) {\r\n\t\t\t\tvar nd = new Date(sd.valueOf());\r\n\t\t\t\tif (weekDays) {\r\n\t\t\t\t\tfor (var count = 0; count < inc; count++)\r\n\t\t\t\t\t\tscheduler.transpose_day_week(nd, weekDays, 0, recurringStepDays);\r\n\t\t\t\t} else\r\n\t\t\t\t\tnd.setDate(nd.getDate() + inc * recurringStepDays);\r\n\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t}\r\n\t\telse if (recurringParts[0] == \"month\" || recurringParts[0] == \"year\") {\r\n\t\t\tthis.date[transposeRecurring] = function(nd, td, seriesInstance) {\r\n\t\t\t\tvar delta = Math.ceil(((td.getFullYear() * 12 + td.getMonth() * 1 + 1) - (nd.getFullYear() * 12 + nd.getMonth() * 1 + 1)) / (recurringStepDays) - 1);\r\n\r\n\t\t\t\tif (delta >= 0){\r\n\t\t\t\t\tnd.setDate(1);\r\n\t\t\t\t\tnd.setMonth(nd.getMonth() + delta * recurringStepDays);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn scheduler.date[addRecurring](nd, 0, seriesInstance);\r\n\t\t\t\t//if (str[3]){\r\n\t\t\t\t//\tscheduler.date.day_week(nd, str[2], str[3]);\r\n\t\t\t\t//}\r\n\t\t\t};\r\n\t\t\tthis.date[addRecurring] = function(sd, inc, seriesInstance, currentCount) {\r\n\t\t\t\tif(!currentCount){\r\n\t\t\t\t\tcurrentCount = 1;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcurrentCount++;\r\n\t\t\t\t}\r\n\t\t\t\tvar maxCount = 12;\r\n\t\t\t\tif(currentCount > maxCount){\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar nd = new Date(sd.valueOf());\r\n\t\t\t\tnd.setDate(1);\r\n\r\n\r\n\t\t\t\tnd.setMonth(nd.getMonth() + inc * recurringStepDays);\r\n\t\t\t\tvar origMonth = nd.getMonth();\r\n\t\t\t\tvar origYear = nd.getFullYear();\r\n\t\t\t\tnd.setDate(seriesInstance.start_date.getDate());\r\n\t\t\t\tif (recurringParts[3]){\r\n\t\t\t\t\tscheduler.date.day_week(nd, recurringParts[2], recurringParts[3]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar correctOverflowInstances = scheduler.config.recurring_overflow_instances;\r\n\t\t\t\tif(nd.getMonth() != origMonth && correctOverflowInstances != \"none\"){\r\n\t\t\t\t\t// no such day in a month\r\n\t\t\t\t\tif(correctOverflowInstances === \"lastDay\"){\r\n\t\t\t\t\t\t// return either last day of the month\r\n\t\t\t\t\t\tnd = new Date(origYear, origMonth + 1, 0, nd.getHours(), nd.getMinutes(), nd.getSeconds(), nd.getMilliseconds());\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t// or go to the next instance\r\n\t\t\t\t\t\tnd = scheduler.date[addRecurring](new Date(origYear, origMonth + 1, 0), inc||1, seriesInstance, currentCount);\r\n\t\t\t\t\t\t// if next instance is not possible (e.g. 'repeat on 40th day of the month') null will be returned\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.repeat_date = function(ev, stack, non_render, from, to, maxCount) {\r\n\r\n\tfrom = from || this._min_date;\r\n\tto = to || this._max_date;\r\n\tvar max = maxCount || -1;\r\n\tvar td = new Date(ev.start_date.valueOf());\r\n\r\n\tvar startHour = td.getHours();\r\n\r\n\tvar visibleCount = 0;\r\n\r\n\tif (!ev.rec_pattern && ev.rec_type)\r\n\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\r\n\tthis.transpose_type(ev.rec_pattern);\r\n\ttd = scheduler.date[\"transpose_\" + ev.rec_pattern](td, from, ev);\r\n\twhile ( td && (\r\n\t\ttd < ev.start_date ||\r\n\t\tscheduler._fix_daylight_saving_date(td,from,ev,td,new Date(td.valueOf() + ev.event_length * 1000)).valueOf() <= from.valueOf() ||\r\n\t\ttd.valueOf() + ev.event_length * 1000 <= from.valueOf())){\r\n\t\t\ttd = this.date[\"add_\" + ev.rec_pattern](td, 1, ev);\r\n\r\n\t}\r\n\twhile (td && (td < to && td < ev.end_date && (max < 0 || visibleCount < max))) {\r\n\t\ttd.setHours(startHour);\r\n\r\n\t\tvar timestamp = (scheduler.config.occurrence_timestamp_in_utc) ? Date.UTC(td.getFullYear(), td.getMonth(), td.getDate(), td.getHours(), td.getMinutes(), td.getSeconds()) : td.valueOf();\r\n\t\tvar ch = this._get_rec_marker(timestamp, ev.id);\r\n\t\tif (!ch) { // unmodified element of series\r\n\t\t\tvar ted = new Date(td.valueOf() + ev.event_length * 1000);\r\n\t\t\tvar copy = this._copy_event(ev);\r\n\t\t\t//copy._timed = ev._timed;\r\n\t\t\tcopy.text = ev.text;\r\n\t\t\tcopy.start_date = td;\r\n\t\t\tcopy.event_pid = ev.id;\r\n\t\t\tcopy.id = ev.id + \"#\" + Math.round(timestamp / 1000);\r\n\t\t\tcopy.end_date = ted;\r\n\r\n\t\t\tcopy.end_date = scheduler._fix_daylight_saving_date(copy.start_date, copy.end_date, ev, td, copy.end_date);\r\n\r\n\t\t\tcopy._timed = this.isOneDayEvent(copy);\r\n\r\n\t\t\tif (!copy._timed && !this._table_view && !this.config.multi_day) return;\r\n\t\t\tstack.push(copy);\r\n\r\n\t\t\tif (!non_render) {\r\n\t\t\t\tthis._events[copy.id] = copy;\r\n\t\t\t\tthis._rec_temp.push(copy);\r\n\t\t\t}\r\n\r\n\t\t\tvisibleCount++;\r\n\r\n\t\t} else\r\n\t\tif (non_render){\r\n\t\t\tif(ch.rec_type != \"none\"){\r\n\t\t\t\tvisibleCount++;\r\n\t\t\t}\r\n\t\t\tstack.push(ch);\r\n\t\t}\r\n\r\n\t\ttd = this.date[\"add_\" + ev.rec_pattern](td, 1, ev);\r\n\t//\tif(!scheduler.date[\"validate_add_\" + ev.rec_pattern](td, 1, ev.rec_pattern)){\r\n\t///\t\talert(\"detect add\")\r\n\t//\t}\r\n\t}\r\n};\r\nscheduler._fix_daylight_saving_date = function(start_date, end_date, ev, counter, default_date) {\r\n\tvar shift = start_date.getTimezoneOffset() - end_date.getTimezoneOffset();\r\n\tif (shift) {\r\n\t\tif (shift > 0) {\r\n\t\t\t// e.g. 24h -> 23h\r\n\t\t\treturn new Date(counter.valueOf() + ev.event_length * 1000 - shift * 60 * 1000);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// e.g. 24h -> 25h\r\n\t\t\treturn new Date(end_date.valueOf() - shift * 60 * 1000);\r\n\t\t}\r\n\t}\r\n\treturn new Date(default_date.valueOf());\r\n};\r\nscheduler.getRecDates = function(id, max) {\r\n\tvar ev = typeof id == \"object\" ? id : scheduler.getEvent(id);\r\n\tvar recurrings = [];\r\n\tmax = max || 100;\r\n\r\n\tif (!ev.rec_type) {\r\n\t\treturn [\r\n\t\t\t{ start_date: ev.start_date, end_date: ev.end_date }\r\n\t\t];\r\n\t}\r\n\tif (ev.rec_type == \"none\") {\r\n\t\treturn [];\r\n\t}\r\n\r\n\tscheduler.repeat_date(ev, recurrings, true, ev.start_date, ev.end_date, max);\r\n\r\n\tvar result = [];\r\n\tfor(var i = 0; i < recurrings.length; i++){\r\n\t\tif(recurrings[i].rec_type != \"none\"){\r\n\t\t\tresult.push({start_date: recurrings[i].start_date, end_date: recurrings[i].end_date});\r\n\t\t}\r\n\t}\r\n\r\n\treturn result;\r\n};\r\nscheduler.getEvents = function(from, to) {\r\n\tvar result = [];\r\n\tfor (var a in this._events) {\r\n\t\tvar ev = this._events[a];\r\n\t\tif (ev && ev.start_date < to && ev.end_date > from) {\r\n\t\t\tif (ev.rec_pattern) {\r\n\t\t\t\tif (ev.rec_pattern == \"none\") continue;\r\n\t\t\t\tvar sev = [];\r\n\t\t\t\tthis.repeat_date(ev, sev, true, from, to);\r\n\t\t\t\tfor (var i = 0; i < sev.length; i++) {\r\n\t\t\t\t\t// if event is in rec_markers then it will be checked by himself, here need to skip it\r\n\t\t\t\t\tif (!sev[i].rec_pattern && sev[i].start_date < to && sev[i].end_date > from && !this._rec_markers[sev[i].id]) {\r\n\t\t\t\t\t\tresult.push(sev[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if (!this._is_virtual_event(ev.id)) { // if it's virtual event we can skip it\r\n\t\t\t\tresult.push(ev);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn result;\r\n};\r\n\r\nscheduler.config.repeat_date = \"%m.%d.%Y\";\r\nscheduler.config.lightbox.sections = [\r\n\t{name:\"description\", map_to:\"text\", type:\"textarea\" , focus:true},\r\n\t{name:\"recurring\", type:\"recurring\", map_to:\"rec_type\", button:\"recurring\"},\r\n\t{name:\"time\", height:72, type:\"time\", map_to:\"auto\"}\r\n];\r\n\r\n\r\n//drop secondary attributes\r\nscheduler._copy_dummy = function(ev) {\r\n\tvar start_date = new Date(this.start_date);\r\n\tvar end_date = new Date(this.end_date);\r\n\tthis.start_date = start_date;\r\n\tthis.end_date = end_date;\r\n\tthis.event_length = this.event_pid = this.rec_pattern = this.rec_type = null;\r\n};\r\n\r\nscheduler.config.include_end_by = false;\r\nscheduler.config.lightbox_recurring = 'ask'; // series, instance\r\n\r\nscheduler.attachEvent(\"onClearAll\", function(){\r\n\tscheduler._rec_markers = {}; //clear recurring events data\r\n\tscheduler._rec_markers_pull = {};\r\n\tscheduler._rec_temp = [];\r\n});\r\n\r\n}","import getSerializator from '../core/common/get_serializable_events';\r\nexport default function(scheduler){\r\n\r\n\t\r\nconst getSerializableData = getSerializator(scheduler);\r\n\r\n//redefine this method, if you want to provide a custom set of attributes for serialization\r\nscheduler.data_attributes=function(){\r\n\tvar attrs = [];\r\n\tvar format = scheduler._helpers.formatDate;\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\t\tfor (var name in ev)\r\n\t\t\tif (name.substr(0,1) !=\"_\")\r\n\t\t\t\tattrs.push([name,((name == \"start_date\" || name == \"end_date\")?format:null)]);\r\n\t\tbreak;\r\n\t}\r\n\treturn attrs;\r\n};\r\n\r\nscheduler.toXML = function(header){\r\n\tvar xml = [];\r\n\tvar attrs = this.data_attributes();\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\r\n\t\txml.push(\"\");\r\n\t\tfor (var i=0; i < attrs.length; i++)\r\n\t\t\txml.push(\"<\"+attrs[i][0]+\">\");\r\n\r\n\t\txml.push(\"\");\r\n\t}\r\n\treturn (header||\"\")+\"\"+xml.join(\"\\n\")+\"\";\r\n};\r\n\r\nscheduler._serialize_json_value = function(value){\r\n\tif(value === null || typeof value === \"boolean\"){\r\n\t\tvalue = \"\" + value;\r\n\t}else{\r\n\t\tif(!value && value !== 0){\r\n\t\t\tvalue = \"\";\r\n\t\t}\r\n\t\tvalue = '\"' + value.toString().\r\n\t\t\treplace(/\\n/g,\"\").\r\n\t\t\treplace(/\\\\/g,\"\\\\\\\\\").\r\n\t\t\treplace(/\"/g, '\\\\\"') + '\"';\r\n\t}\r\n\treturn value;\r\n};\r\n\r\n\r\n\r\nscheduler.toJSON = function(){\r\n\treturn JSON.stringify(this.serialize());\r\n};\r\n\r\n\r\nscheduler.toICal = function(header){\r\n\tvar start = \"BEGIN:VCALENDAR\\nVERSION:2.0\\nPRODID:-//dhtmlXScheduler//NONSGML v2.2//EN\\nDESCRIPTION:\";\r\n\tvar end = \"END:VCALENDAR\";\r\n\tvar format = scheduler.date.date_to_str(\"%Y%m%dT%H%i%s\");\r\n\tvar full_day_format = scheduler.date.date_to_str(\"%Y%m%d\");\r\n\r\n\tvar ical = [];\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\r\n\r\n\t\tical.push(\"BEGIN:VEVENT\");\r\n\t\tif (!ev._timed || (!ev.start_date.getHours() && !ev.start_date.getMinutes()))\r\n\t\t\tical.push(\"DTSTART:\"+full_day_format(ev.start_date));\r\n\t\telse\r\n\t\t\tical.push(\"DTSTART:\"+format(ev.start_date));\r\n\t\tif (!ev._timed || (!ev.end_date.getHours() && !ev.end_date.getMinutes()))\r\n\t\t\tical.push(\"DTEND:\"+full_day_format(ev.end_date));\r\n\t\telse\r\n\t\t\tical.push(\"DTEND:\"+format(ev.end_date));\r\n\t\tical.push(\"SUMMARY:\"+ev.text);\r\n\t\tical.push(\"END:VEVENT\");\r\n\t}\r\n\treturn start+(header||\"\")+\"\\n\"+ical.join(\"\\n\")+\"\\n\"+end;\r\n};\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Timeline\", scheduler.assert);\r\n}","import { TooltipManager } from \"./tooltipManager\";\r\n\r\nexport default function (scheduler: any) {\r\n\r\n\tscheduler.config.tooltip_timeout = 30;\r\n\tscheduler.config.tooltip_offset_y = 20;\r\n\tscheduler.config.tooltip_offset_x = 10;\r\n\tscheduler.config.tooltip_hide_timeout = 30;\r\n\r\n\tconst tooltipManager = new TooltipManager(scheduler);\r\n\r\n\tscheduler.ext.tooltips = tooltipManager;\r\n\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function () {\r\n\r\n\t\ttooltipManager.tooltipFor({\r\n\t\t\tselector: \"[\" + scheduler.config.event_attribute + \"]\",\r\n\t\t\thtml: (event: MouseEvent) => {\r\n\t\t\t\tif (scheduler._mobile && !scheduler.config.touch_tooltip) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst targetEventId = scheduler._locate_event(event.target);\r\n\t\t\t\tif (scheduler.getEvent(targetEventId)) {\r\n\t\t\t\t\tconst event = scheduler.getEvent(targetEventId);\r\n\t\t\t\t\treturn scheduler.templates.tooltip_text(event.start_date, event.end_date, event);\r\n\t\t\t\t}\r\n\t\t\t\treturn null;\r\n\t\t\t},\r\n\t\t\tglobal: false\r\n\t\t});\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function () {\r\n\t\ttooltipManager.destructor();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onLightbox\", function () {\r\n\t\ttooltipManager.hideTooltip();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeDrag\", function() {\r\n\t\ttooltipManager.hideTooltip();\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventDeleted\", function() {\r\n\t\ttooltipManager.hideTooltip();\r\n\t\treturn true;\r\n\t});\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Tree Timeline\", scheduler.assert);\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Units\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\nscheduler._get_url_nav = function(){\r\n\tvar p = {};\r\n\tvar data = (document.location.hash || \"\").replace(\"#\", \"\").split(\",\");\r\n\tfor (var i = 0; i < data.length; i++) {\r\n\t\tvar s = data[i].split(\"=\");\r\n\t\tif (s.length == 2)\r\n\t\t\tp[s[0]] = s[1];\r\n\t}\r\n\treturn p;\r\n};\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\", function () {\r\n\tvar first = true;\r\n\tvar s2d = scheduler.date.str_to_date(\"%Y-%m-%d\");\r\n\tvar d2s = scheduler.date.date_to_str(\"%Y-%m-%d\");\r\n\tvar select_event = scheduler._get_url_nav().event || null;\r\n\r\n\tscheduler.attachEvent(\"onAfterEventDisplay\", function(ev){\r\n\t\tselect_event = null;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function (om, od, m, d) {\r\n\t\tif (first) {\r\n\t\t\tfirst = false;\r\n\t\t\tvar p = scheduler._get_url_nav();\r\n\r\n\t\t\tif (p.event){\r\n\t\t\t\ttry{\r\n\t\t\t\t\tif(scheduler.getEvent(p.event)){\r\n\t\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\t\tshowEvent(p.event);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tvar handler = scheduler.attachEvent(\"onXLE\", function(){\r\n\t\t\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\t\t\tshowEvent(p.event);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\tscheduler.detachEvent(handler);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (e){}\r\n\t\t\t}\r\n\r\n\t\t\tif (p.date || p.mode) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tthis.setCurrentView((p.date ? s2d(p.date) : null), (p.mode || null));\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\t//assuming that mode is not available anymore\r\n\t\t\t\t\tthis.setCurrentView((p.date ? s2d(p.date) : null), m);\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar values = [\r\n\t\t\t\"date=\" + d2s(d || od),\r\n\t\t\t\"mode=\" + (m || om)\r\n\t\t];\r\n\r\n\t\tif(select_event){\r\n\t\t\tvalues.push(\"event=\" + select_event);\r\n\t\t}\r\n\r\n\t\tvar text = \"#\" + values.join(\",\");\r\n\t\tdocument.location.hash = text;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tfunction showEvent(e){\r\n\t\tif(scheduler.$destroyed){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tselect_event = e;\r\n\t\tif(scheduler.getEvent(e)){\r\n\t\t\tscheduler.showEvent(e);\r\n\t\t}\r\n\t}\r\n});\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Week Agenda\", scheduler.assert);\r\n}","export default function(scheduler){\r\nscheduler.attachEvent(\"onLightBox\",function(){\r\n\tif (this._cover){\r\n\t\ttry{\r\n\t\t\tthis._cover.style.height = this.expanded ? \"100%\" : ((document.body.parentNode||document.body).scrollHeight+\"px\");\r\n\t\t} catch(e) {\r\n\r\n\t\t}\r\n\t}\r\n});\r\n\r\nscheduler.form_blocks.select.set_value=function(node,value,ev){\r\n\tif (typeof value == \"undefined\" || value === \"\")\r\n\t\tvalue = (node.firstChild.options[0]||{}).value;\r\n\tnode.firstChild.value=value||\"\";\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\t// scheduler.config.year_x = 4;\r\n\t// scheduler.config.year_y = 3;\r\n\t// scheduler.xy.year_top = 0;\r\n\r\n\tscheduler.templates.year_date = function(date) {\r\n\t\treturn scheduler.date.date_to_str(scheduler.locale.labels.year_tab + \" %Y\")(date);\r\n\t};\r\n\tscheduler.templates.year_month = scheduler.date.date_to_str(\"%F\");\r\n\tscheduler.templates.year_scale_date = scheduler.date.date_to_str(\"%D\");\r\n\tscheduler.templates.year_tooltip = function(s, e, ev) {\r\n\t\treturn ev.text;\r\n\t};\r\n\r\n\tconst isYearMode = function() {\r\n\t\treturn scheduler._mode == \"year\";\r\n\t};\r\n\t\r\n\tconst getCellDate = function(node){\r\n\t\tvar day = scheduler.$domHelpers.closest(node, \"[data-cell-date]\");\r\n\t\tif(!day || !day.hasAttribute(\"data-cell-date\")) return null;\r\n\t\treturn scheduler.templates.parse_date(day.getAttribute(\"data-cell-date\"));\r\n\t};\r\n\r\n\t// dbl click hook for scheduler._on_dbl_click\r\n\tscheduler.dblclick_dhx_month_head = function(e) {\r\n\t\tif (isYearMode()) {\r\n\t\t\tconst target = e.target;\r\n\t\t\tif(scheduler.$domHelpers.closest(target, \".dhx_before\") || scheduler.$domHelpers.closest(target, \".dhx_after\")){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tconst date = getCellDate(target);\r\n\t\t\t\r\n\t\t\tif(date){\r\n\t\t\t\tconst start = date;\r\n\t\t\t\tconst end = this.date.add(start, 1, \"day\");\r\n\t\t\t\tif (!this.config.readonly && this.config.dblclick_create){\r\n\t\t\t\t\tthis.addEventNow(start.valueOf(), end.valueOf(), e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\t\r\n\tscheduler.attachEvent(\"onEventIdChange\", function(){\r\n\t\tif (isYearMode())\r\n\t\t\tthis.year_view(true);\r\n\t});\r\n\r\n\r\n\tvar old = scheduler.render_data;\r\n\tscheduler.render_data = function(evs) {\r\n\t\tif (!isYearMode()) return old.apply(this, arguments);\r\n\t\tfor (var i = 0; i < evs.length; i++)\r\n\t\t\tthis._year_render_event(evs[i]);\r\n\t};\r\n\r\n\tvar clear = scheduler.clear_view;\r\n\tscheduler.clear_view = function() {\r\n\t\tif (!isYearMode()) return clear.apply(this, arguments);\r\n\t\tvar dates = scheduler._year_marked_cells,\r\n\t\t\tdiv = null;\r\n\t\tfor (var date in dates) {\r\n\t\t\tif (dates.hasOwnProperty(date)) {\r\n\t\t\t\tdiv = dates[date];\r\n\t\t\t\tdiv.classList.remove(\"dhx_year_event\", \"dhx_cal_datepicker_event\");\r\n\t\t\t\t// div.className = \"dhx_month_head\";\r\n\t\t\t\t// div.removeAttribute(\"date\");\r\n\t\t\t\t// div.removeAttribute(\"data-year-date\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tscheduler._year_marked_cells = {};\r\n\t};\r\n\r\n\tscheduler._hideToolTip = function() {\r\n\t\tif (this._tooltip) {\r\n\t\t\tthis._tooltip.style.display = \"none\";\r\n\t\t\tthis._tooltip.date = new Date(9999, 1, 1);\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._showToolTip = function(date, pos, e, src) {\r\n\t\tif (this._tooltip) {\r\n\t\t\tif (this._tooltip.date.valueOf() == date.valueOf()) return;\r\n\t\t\tthis._tooltip.innerHTML = \"\";\r\n\t\t} else {\r\n\t\t\tvar t = this._tooltip = document.createElement(\"div\");\r\n\t\t\tt.className = \"dhx_year_tooltip\";\r\n\t\t\tif (this.config.rtl) t.className += \" dhx_tooltip_rtl\";\r\n\t\t\tdocument.body.appendChild(t);\r\n\t\t\tt.addEventListener(\"click\", scheduler._click.dhx_cal_data);\r\n\t\t\tt.addEventListener(\"click\", function(e){\r\n\t\t\t\tif(e.target.closest(`[${scheduler.config.event_attribute}]`)){\r\n\t\t\t\t\tconst id = e.target.closest(`[${scheduler.config.event_attribute}]`).getAttribute(scheduler.config.event_attribute);\r\n\t\t\t\t\tscheduler.showLightbox(id);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\tvar evs = this.getEvents(date, this.date.add(date, 1, \"day\"));\r\n\t\tvar html = \"\";\r\n\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tif(!this.filter_event(ev.id, ev))\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\tvar bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\t\t\tvar color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\t\t\thtml += \"
\";\r\n\t\t\thtml += \"
\" + (evs[i]._timed ? this.templates.event_date(evs[i].start_date) : \"\") + \"
\";\r\n\t\t\thtml += \"
 
\";\r\n\t\t\thtml += this.templates.year_tooltip(evs[i].start_date, evs[i].end_date, evs[i]) + \"
\";\r\n\t\t}\r\n\r\n\t\tthis._tooltip.style.display = \"\";\r\n\t\tthis._tooltip.style.top = \"0px\";\r\n\r\n\r\n\t\tif (document.body.offsetWidth - pos.left - this._tooltip.offsetWidth < 0)\r\n\t\t\tthis._tooltip.style.left = pos.left - this._tooltip.offsetWidth + \"px\";\r\n\t\telse\r\n\t\t\tthis._tooltip.style.left = pos.left + src.offsetWidth + \"px\";\r\n\r\n\t\tthis._tooltip.date = date;\r\n\t\tthis._tooltip.innerHTML = html;\r\n\r\n\t\tif (document.body.offsetHeight - pos.top - this._tooltip.offsetHeight < 0)\r\n\t\t\tthis._tooltip.style.top = pos.top - this._tooltip.offsetHeight + src.offsetHeight + \"px\";\r\n\t\telse\r\n\t\t\tthis._tooltip.style.top = pos.top + \"px\";\r\n\t};\r\n\r\n\tscheduler._year_view_tooltip_handler = function(e){\r\n\t\tif (!isYearMode()) return;\r\n\r\n\t\tvar src = e.target || e.srcElement;\r\n\t\tif (src.tagName.toLowerCase() == 'a') // fix for active links extension (it adds links to the date in the cell)\r\n\t\t\tsrc = src.parentNode;\r\n\t\tif (scheduler._getClassName(src).indexOf(\"dhx_year_event\") != -1)\r\n\t\t\tscheduler._showToolTip(scheduler.templates.parse_date(src.getAttribute(\"data-year-date\")), scheduler.$domHelpers.getOffset(src), e, src);\r\n\t\telse\r\n\t\t\tscheduler._hideToolTip();\r\n\t};\r\n\tscheduler._init_year_tooltip = function() {\r\n\t\tscheduler._detachDomEvent(scheduler._els[\"dhx_cal_data\"][0], \"mouseover\", scheduler._year_view_tooltip_handler);\r\n\t\tscheduler.event(scheduler._els[\"dhx_cal_data\"][0], \"mouseover\", scheduler._year_view_tooltip_handler);\r\n\t};\r\n\r\n\tscheduler._get_year_cell = function(d) {\r\n\t\tvar dateString = scheduler.templates.format_date(d);\r\n\t\tvar cells = this.$root.querySelectorAll(`.dhx_cal_data .dhx_cal_datepicker_date[data-cell-date=\"${dateString}\"]`);\r\n\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\tif(!scheduler.$domHelpers.closest(cells[i], \".dhx_after, .dhx_before\")){\r\n\t\t\t\treturn cells[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t};\r\n\r\n\tscheduler._year_marked_cells = {};\r\n\tscheduler._mark_year_date = function(date, event) {\r\n\t\tvar dateString = scheduler.templates.format_date(date);\r\n\t\tvar cell = this._get_year_cell(date);\r\n\t\tif (!cell) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tvar ev_class = this.templates.event_class(event.start_date, event.end_date, event);\r\n\t\tif (!scheduler._year_marked_cells[dateString]) {\r\n\t\t\tcell.classList.add(\"dhx_year_event\", \"dhx_cal_datepicker_event\");// = \"dhx_month_head dhx_year_event\";\r\n\t\t\tcell.setAttribute(\"data-year-date\", dateString);\r\n\t\t\tcell.setAttribute(\"date\", dateString);\r\n\t\t\tscheduler._year_marked_cells[dateString] = cell;\r\n\t\t}\r\n\t\tif(ev_class){\r\n\t\t\tcell.classList.add(ev_class);\r\n\t\t}\r\n\t};\r\n\tscheduler._unmark_year_date = function(date) {\r\n\t\tvar cell = this._get_year_cell(date);\r\n\t\tif (!cell) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcell.classList.remove(\"dhx_year_event\", \"dhx_cal_datepicker_event\");\r\n//\t\tcell.className = \"dhx_month_head\";\r\n\t};\r\n\tscheduler._year_render_event = function(event) {\r\n\t\tvar date = event.start_date;\r\n\t\tif (date.valueOf() < this._min_date.valueOf()){\r\n\t\t\tdate = this._min_date;\r\n\t\t} else {\r\n\t\t\tdate = this.date.date_part(new Date(date));\r\n\t\t}\r\n\r\n\t\twhile (date < event.end_date) {\r\n\t\t\tthis._mark_year_date(date, event);\r\n\t\t\tdate = this.date.add(date, 1, \"day\");\r\n\t\t\tif (date.valueOf() >= this._max_date.valueOf())\r\n\t\t\t\treturn;\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler.year_view = function(mode) {\r\n\r\n\t\tscheduler.set_sizes();\r\n\r\n\t\tscheduler._table_view = mode;\r\n\r\n\t\tif (this._load_mode && this._load()) return;\r\n\r\n\t\tif (mode) {\r\n\t\t\tscheduler._init_year_tooltip();\r\n\t\t\tscheduler._reset_year_scale();\r\n\t\t\tif (scheduler._load_mode && scheduler._load()){\r\n\t\t\t\tscheduler._render_wait = true;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tscheduler.render_view_data();\r\n\t\t} else {\r\n\t\t\tscheduler._hideToolTip();\r\n\t\t}\r\n\t};\r\n\tscheduler._reset_year_scale = function() {\r\n\t\tthis._cols = [];\r\n\t\tthis._colsS = {};\r\n\t\tvar week_starts = []; //start day of first week in each month\r\n\t\tvar dataArea = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tvar c = this.config;\r\n\t\tdataArea.scrollTop = 0; //fix flickering in FF\r\n\t\tdataArea.innerHTML = \"\";\r\n\r\n\t\tvar dy = Math.floor((parseInt(dataArea.style.height) - scheduler.xy.year_top) / c.year_y);\r\n\t\tif (dy < 190) {\r\n\t\t\tdy = 190;\r\n\t\t}\r\n\r\n\t\tvar week_template = document.createElement(\"div\");\r\n\t\tvar dummy_date = this.date.week_start(scheduler._currentDate());\r\n\r\n\t\tthis._process_ignores(dummy_date, 7, \"day\", 1);\r\n\r\n\t\tfor (var i = 0; i < 7; i++) {\r\n\t\t\tif(!(this._ignores && this._ignores[i])) {\r\n\t\t\t\tthis._cols[i] = 'var(--dhx-scheduler-datepicker-cell-size)';\r\n\t\t\t\tthis._render_x_header(i, 0, dummy_date, week_template);\r\n\r\n\t\t\t}\r\n\t\t\tdummy_date = this.date.add(dummy_date, 1, \"day\");\r\n\t\t}\r\n\t\tweek_template.lastChild.className += \" dhx_scale_bar_last\";\r\n\r\n\t\tfor(var i = 0; i < week_template.childNodes.length; i++){\r\n\t\t\tthis._waiAria.yearHeadCell(week_template.childNodes[i]);\r\n\t\t}\r\n\r\n\t\tvar sd = this.date[this._mode + \"_start\"](this.date.copy(this._date));\r\n\t\tvar ssd = sd;\r\n\t\tvar yearBox = null;\r\n\t\tconst wrapper = document.createElement(\"div\");\r\n\t\twrapper.classList.add(\"dhx_year_wrapper\");\r\n\t\tfor (var i = 0; i < c.year_y; i++){\r\n\t\t\tfor (var j = 0; j < c.year_x; j++) {\r\n\t\t\t\tyearBox = document.createElement(\"div\");\r\n\t\t\t\tyearBox.className = \"dhx_year_box\";\r\n\r\n\t\t\t\tyearBox.setAttribute(\"date\", this._helpers.formatDate(sd));\r\n\t\t\t\tyearBox.setAttribute(\"data-month-date\", this._helpers.formatDate(sd));\r\n\t\t\t\tyearBox.innerHTML = \"
\" + week_template.innerHTML + \"
\";\r\n\r\n\t\t\t\tvar header = yearBox.querySelector(\".dhx_year_month\");\r\n\t\t\t\tvar grid = yearBox.querySelector(\".dhx_year_grid\");\r\n\t\t\t\tvar body = yearBox.querySelector(\".dhx_year_body\");\r\n\r\n\t\t\t\tvar headerId = scheduler.uid();\r\n\t\t\t\tthis._waiAria.yearHeader(header, headerId);\r\n\t\t\t\tthis._waiAria.yearGrid(grid, headerId);\r\n\r\n\r\n\t\t\t\theader.innerHTML = this.templates.year_month(sd);\r\n\r\n\r\n\r\n\t\t\t\tvar dd = this.date.week_start(sd);\r\n\t\t\t\tthis._reset_month_scale(body, sd, dd, 6);\r\n\r\n\t\t\t\tvar days = body.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var day = 0; day < days.length; day++){\r\n\t\t\t\t\tthis._waiAria.yearDayCell(days[day]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\twrapper.appendChild(yearBox);\r\n\r\n\t\t\t\tweek_starts[i * c.year_x + j] = (sd.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) % 7;\r\n\t\t\t\tsd = this.date.add(sd, 1, \"month\");\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdataArea.appendChild(wrapper);\r\n\r\n\t\tvar dateElement = this._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML = this.templates[this._mode + \"_date\"](ssd, sd, this._mode);\r\n\t\t}\r\n\r\n\t\tthis.week_starts = week_starts;\r\n\t\tweek_starts._month = ssd.getMonth();\r\n\t\tthis._min_date = ssd;\r\n\t\tthis._max_date = sd;\r\n\t};\r\n\r\n\tscheduler._reset_year_scale = function(){\r\n\r\n\t\tvar dataArea = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tdataArea.scrollTop = 0; //fix flickering in FF\r\n\t\tdataArea.innerHTML = \"\";\r\n\r\n\t\tlet yearStart = this.date.year_start(new Date(this._date));\r\n\t\t\r\n\t\tthis._min_date = this.date.week_start(new Date(yearStart));\r\n\r\n\t\tconst wrapper = document.createElement(\"div\");\r\n\t\twrapper.classList.add(\"dhx_year_wrapper\");\r\n\r\n\t\tlet currentDate = yearStart;\r\n\t\tfor(let i = 0; i < 12; i++){\r\n\t\t\tlet yearBox = document.createElement(\"div\");\r\n\t\t\tyearBox.className = \"dhx_year_box\";\r\n\r\n\t\t\tyearBox.setAttribute(\"date\", this._helpers.formatDate(currentDate));\r\n\t\t\tyearBox.setAttribute(\"data-month-date\", this._helpers.formatDate(currentDate));\r\n\t\t\tyearBox.innerHTML = `
${this.templates.year_month(currentDate)}
\r\n\t\t\t
`;\r\n\r\n\t\t\tconst yearGrid = yearBox.querySelector(\".dhx_year_grid\");\r\n\t\t\tconst datepicker = scheduler._createDatePicker(null, {\r\n\t\t\t\tdate: currentDate,\r\n\t\t\t\tminWeeks: 6\r\n\t\t\t});\r\n\t\t\tdatepicker._renderDayGrid(yearGrid);\r\n\t\t\tdatepicker.destructor();\r\n\r\n\t\t\twrapper.appendChild(yearBox);\r\n\r\n\t\t\tcurrentDate = this.date.add(currentDate, 1, \"month\");\r\n\r\n\t\t}\r\n\t\tdataArea.appendChild(wrapper);\r\n\r\n\t\tlet lastDate = this.date.add(yearStart, 1, \"year\");\r\n\t\tif(lastDate.valueOf() != this.date.week_start(new Date(lastDate)).valueOf()){\r\n\t\t\tlastDate = this.date.week_start(new Date(lastDate));\r\n\t\t\tlastDate = this.date.add(lastDate, 1, \"week\");\r\n\t\t}\r\n\t\tthis._max_date = lastDate;\r\n\t\tvar dateElement = this._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML = this.templates[this._mode + \"_date\"](yearStart, lastDate, this._mode);\r\n\t\t}\r\n\t};\r\n\r\n\tvar getActionData = scheduler.getActionData;\r\n\tscheduler.getActionData = function(n_ev) {\r\n\t\tif(!isYearMode()){\r\n\t\t\treturn getActionData.apply(scheduler, arguments);\r\n\t\t}\r\n\t\t\r\n\t\tvar date = getCellDate(n_ev.target);\r\n\t\treturn {\r\n\t\t\tdate:date,\r\n\t\t\tsection:null\r\n\t\t};\r\n\t};\r\n\r\n\tvar locateEvent = scheduler._locate_event;\r\n\tscheduler._locate_event = function(node) {\r\n\t\tvar id = locateEvent.apply(scheduler, arguments);\r\n\t\tif(!id){\r\n\t\t\t\r\n\t\t\tvar date = getCellDate(node);\r\n\t\t\tif(!date) return null;\r\n\t\t\tvar evs = scheduler.getEvents(date, scheduler.date.add(date, 1, \"day\"));\r\n\t\t\tif(!evs.length) return null;\r\n\r\n\t\t\t//can be multiple events in the cell, return any single one\r\n\t\t\tid = evs[0].id;\r\n\t\t}\r\n\t\treturn id;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tscheduler._hideToolTip();\r\n\t});\r\n}","import SchedulerFactory from \"./scheduler_factory\";\r\nimport gplExtensions from \"./ext/extensions_gpl\";\r\n\r\nconst factory = new SchedulerFactory(gplExtensions);\r\n\r\nconst scheduler = factory.getSchedulerInstance();\r\nconst Scheduler = {\r\n\tplugin: scheduler.bind(factory.plugin, factory)\r\n};\r\n\r\nwindow.scheduler = scheduler;\r\nwindow.Scheduler = Scheduler;\r\n\r\nif(!window.$dhx) {\r\n\twindow.$dhx = {};\r\n}\r\n\r\nwindow.$dhx.scheduler = scheduler;\r\nwindow.$dhx.Scheduler = Scheduler;\r\n\r\nexport default scheduler;export { scheduler, Scheduler };","\r\n\r\nimport dhtmlxHook from \"./dhtmlx_hook\";\r\nimport \"./css/theme.less\";\r\ndhtmlxHook();\r\n\r\nimport global from \"./global\";\r\n\r\nimport factoryMethod from \"./scheduler_factory_method\";\r\nimport ExtensionsManager from \"./ext/extension_manager\";\r\n\r\nclass SchedulerFactory {\r\n\r\n\tconstructor (extensions) {\r\n\t\tthis._seed = 0;\r\n\t\tthis._schedulerPlugins = [];\r\n\t\tthis._bundledExtensions = extensions;\r\n\t\tthis._extensionsManager = new ExtensionsManager(extensions);\r\n\t}\r\n\r\n\tplugin(code) {\r\n\t\tthis._schedulerPlugins.push(code);\r\n\r\n\t\tif(global.scheduler){\r\n\t\t\tcode(global.scheduler);\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetSchedulerInstance(initConfig) {\r\n\t\tvar scheduler = factoryMethod(this._extensionsManager);\r\n\r\n\t\tfor (var i = 0; i < this._schedulerPlugins.length; i++) {\r\n\t\t\tthis._schedulerPlugins[i](scheduler);\r\n\t\t}\r\n\t\tscheduler._internal_id = this._seed++;\r\n\t\r\n\t\tif (this.$syncFactory){\r\n\t\t\tthis.$syncFactory(scheduler);\r\n\t\t}\r\n\r\n\t\tif(initConfig){\r\n\t\t\tthis._initFromConfig(scheduler, initConfig);\r\n\t\t}\r\n\r\n\t\treturn scheduler;\r\n\t}\r\n\r\n\t_initFromConfig(scheduler, initConfig){\r\n\t\tif(initConfig.plugins){\r\n\t\t\tscheduler.plugins(initConfig.plugins);\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.config){\r\n\t\t\tscheduler.mixin(scheduler.config, initConfig.config, true);\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.templates){\r\n\t\t\tscheduler.attachEvent(\"onTemplatesReady\", function(){\r\n\t\t\t\tscheduler.mixin(scheduler.templates, initConfig.templates, true);\r\n\t\t\t}, {once: true});\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.events){\r\n\t\t\tfor(const event in initConfig.events){\r\n\t\t\t\tscheduler.attachEvent(event, initConfig.events[event]);\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.locale){\r\n\t\t\tscheduler.i18n.setLocale(initConfig.locale);\r\n\t\t}\r\n\t\r\n\t\tif(Array.isArray(initConfig.calendars)){\r\n\t\t\tinitConfig.calendars.forEach(function(calendar){\r\n\t\t\t\tscheduler.addCalendar(calendar);\r\n\t\t\t});\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.container){\r\n\t\t\tscheduler.init(initConfig.container);\r\n\t\t} else {\r\n\t\t\tscheduler.init();\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.data){\r\n\t\t\tif(typeof initConfig.data === \"string\"){\r\n\t\t\t\tscheduler.load(initConfig.data);\r\n\t\t\t}else{\r\n\t\t\t\tscheduler.parse(initConfig.data);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\r\n}\r\n\r\nexport default SchedulerFactory;"],"names":["global$1","window","global","extend","scheduler","div","className","element","document","createElement","split","forEach","cssClass","classList","add","itemTypes","rows_container","row","view","config","setAttribute","fix_tab_position","$firstTab","$lastTab","$segmentedTab","date","button","builtInButton","spacer","minicalendarButton","minicalendarDiv","click","$_eventAttached","event","isCalendarVisible","destroyCalendar","renderCalendar","position","this","getState","navigation","handler","calendar","setCurrentView","html_element","renderElement","renderer","rows","cols","css","width","value","style","height","html","innerHTML","align","justifyContent","prepareConfig","renderLayout","items","fragment","createDocumentFragment","Array","isArray","i","length","next","appendChild","_init_nav_bar","navBar","$container","querySelector","_update_nav_bar","previousHeight","container","heightChanged","newHeight","xy","nav_height","unset_actions","_els","get_elements","set_actions","display","isAttachedNode","root","body","parentNode","getWindowSize","w","innerWidth","documentElement","clientWidth","h","innerHeight","clientHeight","listenWindowResize","resizeDelay","oldSize","clearTimeout","setTimeout","$destroyed","a","b","newSize","triggerSchedulerResize","$root","callEvent","updateView","getComputedStyle","getPropertyValue","resizeWatcher","tabIndex","wai_aria_attributes","offsetHeight","previousWidth","offsetWidth","lowlevelResizeWatcher","contentWindow","removeChild","EventHost","constructor","_silent_mode","listeners","_silentStart","_silentEnd","createEventStorage","obj","handlers","index","eventStorage","combinedResult","handlerResult","apply","arguments","addEvent","settings","e","handlerId","id","once","originalHandler","removeEvent","clear","makeEventable","eventHost","attachEvent","eventName","toLowerCase","thisObject","bind","attachAll","callback","name","eventArguments","handlerName","concat","checkEvent","detachEvent","list","eventId","detachAllEvents","defaultDomEvents","el","addEventListener","eventRemove","removeEventListener","domEvents","eventScope","attach","capture","push","detach","splice","detachAll","staticArray","slice","undefined","createEventScope","_eventRemoveAll","_createDomEventScope","_trim","str","String","prototype","trim","replace","_isDate","getFullYear","getMonth","getDate","_isObject","uidSeed","Date","now","isDate","utils","uid","mixin","target","source","force","f","copy","object","result","pop","Function","toString","call","Number","Boolean","varType","Object","hasOwnProperty","defined","delay","timeout","timer","$cancelTimeout","$pending","args","$execute","getClassName","node","baseVal","indexOf","locateCss","classname","strict","trg","srcElement","ind","left","charAt","right","isVisible","visibility","currentStyle","hiddenSection","recurringSection","hasNonNegativeTabIndex","isNaN","getAttribute","hasHref","area","nodeName","loLowerCase","isEnabled","input","select","textarea","hasAttribute","isShadowDomSupported","head","createShadowRoot","attachShadow","getRootNode","ShadowRoot","host","dom_helpers","getAbsoluteLeft","htmlObject","getOffset","getAbsoluteTop","top","getOffsetSum","elem","parseInt","offsetTop","offsetLeft","offsetParent","getOffsetRect","box","getBoundingClientRect","test","navigator","userAgent","dummy","dummyBox","docElem","scrollTop","pageYOffset","scrollLeft","pageXOffset","clientTop","clientLeft","Math","round","closest","selector","insertAfter","newNode","referenceNode","nextSibling","insertBefore","remove","isChildOf","child","parent","contains","getFocusableNodes","nodes","querySelectorAll","join","nodesArray","$position","sort","hasShadowParent","getActiveElement","activeElement","shadowRoot","getSelection","focusNode","getRelativeEventPosition","ev","d","bottom","y","x","clientX","clientY","getTargetNode","tagName","composedPath","getNodePosition","Element","matches","msMatchesSelector","webkitMatchesSelector","parentElement","nodeType","isWindowAwailable","env","isIE","isOpera","isChrome","isKHTML","isFF","isIPad","search","isEdge","isNode","serialize$1","data","key","serialized","encodeURIComponent","JSON","stringify","generateStringToDate","format","utc","splt","mask","match","code","csp_str_to_date","set","temp","locale","month_short_hash","month_full_hash","UTC","cspEnabled","useCsp","csp","init","s","month_short","t","month_full","date_part","old","setHours","setMinutes","setSeconds","setMilliseconds","getHours","setTime","getTime","time_part","valueOf","getTimezoneOffset","week_start","shift","getDay","start_on_monday","month_start","setDate","year_start","setMonth","day_start","_add_days","inc","ndate","rest","hours","mode","setYear","to_fixed","num","date_to_str","getUTCDate","getUTCMonth","getUTCFullYear","day_short","getUTCDay","day_full","getUTCHours","getUTCMinutes","getMinutes","getUTCSeconds","getSeconds","getUTCISOWeek","getISOWeek","str_to_date","exactFormat","stringToDateMethod","parseExactFormat","yyyyMMddhhIIss","MMddyyyyhhIIss","ddMMyyyyhhIIss","ISO8601","parseYMD","parseMDY","parseDMY","dateString","parse_exact_format","datestr","nday","first_thursday","year_number","ordinal_date","floor","convert_to_utc","getSerializator","res","_events","_loaded","_load","url","from","_load_url","to","prevent_cache","_date","_load_mode","lf","templates","load_format","_min_date","cache_line","_max_date","temp_to","ajax","get","ajaxCallback","response","on_load","_parsers","xml","canParse","xhr","responseXML","firstChild","xmlDoc","parse","responseText","topElement","xmltop","loader","csrfToken","dhtmlx","security_key","opts","xpath","arr","serverList","itms","j","attrs","attributes","label","k","attr","nodeValue","ud","udx","_xmlNodeToJSON","_userdata","text","evs","_init_event","json","events","dhx_security","collections","collections_loaded","collection","option","option_key","ical","RegExp","c_start","c_end","incoming","event_r","e_start","e_end","exec","param","param_r","parse_param","substr","parse_date","dh","dm","utcMark","dy","dn","dd","server_utc","error","foundParser","parser","_process","status","_process_loading","_loading","_not_render","_render_wait","render_view_data","_after_call","_tagvalue","start_date","_init_date","end_date","_helpers","parseDate","getSerializableData","createSerializator","serialize","dataset","allEvents","exportedEvent","exportValue","rawValue","xml_format","format_date","type","load","setLoadMode","array","childNodes","show_loading","_x","_y","_obj","_init_touch_events","touch","MSStream","platform","maxTouchPoints","scroll_width","_mobile","touchEventsSupported","createEvent","_touch_events","touches","pageX","pageY","PointerEvent","pointerEnabled","pointerType","msPointerEnabled","MSPOINTER_TYPE_MOUSE","names","accessor","ignore","tracker","drag_mode","scroll_mode","action_mode","dblclicktime","attachTouchEvent","_is_lightbox_open","passive","drag_cancel","_hide_global_tip","_on_mouse_up","_temp_touch_block","_drag_id","_drag_mode","_drag_pos","_pointerDragId","acc","dnd","timeline","matrix","_mode","original_render","drag_id","getEvent","property","y_property","getEvents","_sorder","_count","render_data","_on_mouse_move","preventDefault","cancelBubble","_update_global_tip","abs","fake_event","pointerId","_click","dhx_cal_data","_on_dbl_click","_block_next_stop","touch_drag","actTask","_locate_event","fakeTask","sourceTask","_ignore_next_click","_getClassName","previousSibling","_on_mouse_down","for_rendered","_rendered","touch_tip","_show_global_tip","updateEvent","touch_swipe_dates","s_ev","e_ev","step","max_dy","scrollable","dx","dhx_cal_next_button","dhx_cal_prev_button","toptip","_global_tip","time","_timed","event_header","day_date","labels","drag_to_create","drag_to_move","calculatedMaterial","cachedBorderBoxValue","checkIfBorderBoxStyling","_is_material_skin","probe","boxSizing","refreshAfterLoad","_border_box_events","oldStyling","flatSkinHourScale","min","_addThemeClass","skin","_skin_settings","use_select_menu_space","wide_form","hour_size_px","displayed_event_color","displayed_event_text_color","_skin_xy","lightbox_additional_height","bar_height","_build_skin_info","clearInterval","monitorIntervalId","setInterval","csstheme","setSkin","monitorThemeChange","styles","themeVar","themeName","isCssVarTheme","cssValues","oldMaterialTheme","links","getElementsByTagName","href","themeNameFromFile","_theme_info","theme","cssVarTheme","values","themeVariables","_configure","col","_skin_init","render","hour_scale","hour_date","_old_month_day","month_day","old_month_day","_currentDate","dhx_cal_today_button","tab","header","tabs","specialTabs","map","tabName","find","filter","firstTab","reverse","DataProcessorEvents","dp","$scheduler","$dp","_dataProcessorHandlers","_validId","setUpdated","z","_new_event","_in_progress","_invalid","updatedRows","_waitMode","_update_callback","upd","setUserData","action_param","deleteEvent","_add_rec_marker","DataProcessor","serverProcessorURL","serverProcessor","autoUpdate","updateMode","_tMode","_headers","_payload","post_delim","messages","updated","inserted","deleted","invalid","invalid_cell","enableUTFencoding","eventable","message","boxAttribute","_dhx_msg_cfg","usercall","modalBox","hide","modal_key","which","keyCode","messageBox","keyboard","domHelpers","modality","cover","classValue","buttonAriaAttrs","_waiAria","messageButtonAttrString","getFirstDefined","_createBox","ok","cancel","contentId","messageModalAttr","inner","title","content","message_ok","message_cancel","buttons","btn","getElementById","hidden","focus","alertPopup","confirmPopup","boxPopup","box_params","params","expire","focusable","messageInfoAttr","timers","pull","seed","hideAll","popups","alert","confirm","modalbox","setTransactionMode","total","headers","payload","_tSend","_endnm","_serializeAsJson","_router","router","escape","_utf","setDataColumns","val","_columns","getSyncState","enableDataNames","enablePartialDataSend","_changed","setUpdateMode","master","rowId","state","findRow","existing","getUserData","set_invalid","is_invalid","markRow","sendData","_methods","details","getActionByState","checkBeforeUpdate","editStop","sendAllData","_beforeSendData","_getRowData","_sendData","_serializeAsJSON","serialize_one","stack","keys","pref","_applyPayload","urlSeparator","dataToSend","self","queryParams","ids","afterUpdate","urlParams","_user","_cleanupArgumentsBeforeSend","method","preprocessedData","_cleanupItemBeforeSend","action","query","_onResolvedCreateUpdate","tag","resultState","setRequestHeader","sid","tid","afterUpdateCallback","routerMode","actionPromise","create","delete","update","then","Error","catch","valid","_forEachUpdatedRow","_getAllData","out","has_one","pattern","defineAction","_uActions","btag","marker","correct","originalSid","_errorResponse","cleanUpdate","_setDefaultTransactionMode","_serverProcessor","that","finalizeUpdate","atag","_initialized","_dp_init","_is_virtual_event","_set_event_text_style","r","cssText","event_updated","rec_type","rec_pattern","_dp_change_event_id","new_id","changeEventId","_dp_hook_delete","setDp","_dp","dataProcessorEvents","_dataprocessor","setOnAfterUpdate","setOnBeforeUpdateHandler","func","setAutoUpdate","interval","user","_need_update","_update_busy","xml_node","afterAutoUpdate","fullSync","intervalId","loadUpdate","getUpdates","_getXmlNodeValue","version","vers","updates","destructor","processedData","updatedItem","output","_prepareDataItem","item","processedItem","formatDate","dataItem","ar","day_tab","week_tab","month_tab","new_event","icon_save","icon_cancel","icon_details","icon_edit","icon_delete","confirm_closing","confirm_deleting","section_description","section_time","full_day","confirm_recurring","section_recurring","button_recurring","button_recurring_open","button_edit_series","button_edit_occurrence","grid_tab","prev","year","month","day","hour","minute","be","agenda_tab","description","year_tab","week_agenda_tab","repeat_radio_day","repeat_radio_week","repeat_radio_month","repeat_radio_year","repeat_radio_day_type","repeat_text_day_count","repeat_radio_day_type2","repeat_week","repeat_text_week_count","repeat_radio_month_type","repeat_radio_month_start","repeat_text_month_day","repeat_text_month_count","repeat_text_month_count2_before","repeat_text_month_count2_after","repeat_year_label","select_year_day2","repeat_text_year_day","select_year_month","repeat_radio_end","repeat_text_occurences_count","repeat_radio_end2","repeat_radio_end3","month_for_recurring","day_for_recurring","ca","cn","cs","da","de","en","es","fi","fr","he","hu","it","jp","LocaleManager","_locales","nb","nl","no","pl","pt","ro","ru","si","sk","sv","tr","ua","DatePicker","modes","currentRange","eventDates","currentModeIndex","onStateChangeHandlers","_domEvents","onStateChange","oldState","newState","_notifyStateChange","direction","newDate","setFullYear","setState","_toggleMode","newIndex","backwardArrow","monthLabel","innerText","toLocaleString","startYear","forwardArrow","_adjustDate","_renderCalendarHeader","dataContainer","_renderDayGrid","_renderMonthGrid","_renderYearGrid","daysOfWeekContainer","currentDate","maxDate","labelFormat","dayElement","max","weeks","currWeek","minWeeks","minSchedulerDate","maxSchedulerDate","eventDaysTable","reduce","_renderDayGridHeader","firstDate","monthStart","monthEnd","lastDate","_weeksBetween","currDate","dayGridContainer","dateCell","wrapper","months","formatLabel","monthElement","doneArea","doneBtn","yearElement","factoryMethod","extensionManager","commonViews","agenda","grid","unit","week_agenda","anythingElse","requiredExtensions","limit","_commonErrorMessages","unknownView","relatedExtension","collapsedContainer","createTimelineView","createUnitsView","createGridView","addMarkedTimespan","exportToPNG","exportToPDF","common","nav_bar","_detachDomEvent","_init_once","scheduler_resize_listener","layout","hasSchedulerMarkup","console","wai_aria_application_role","views","_props","_grid","viewName","log","rtl","_scroll","init_templates","set_sizes","$initialized","min_event_height","scale_width","scale_height","month_scale_height","menu_width","margin_top","margin_left","editor_width","month_head_height","event_header_height","edit_save","edit_cancel","functor","scale_x","_table_view","materialScalePlaceholder","set_xy","_lightbox","_setLbPosition","_data_width","prepareValue","prepared","els","class_name","attr_value","labelAttr","domEventsScope","getDaysDifference","startDate","endDate","start","differenceInDays","_select_id","_close_not_saved","unselect","previousSelection","min_date","max_date","editor_id","_edit_id","lightbox_id","_lightbox_id","select_id","expanded","readonly","getActionData","icon","def_step","dhx_cal_tab","deprecated_name","substring","c","_dhtmlx_confirm","title_confirm_deleting","edit","save","showLightbox","form","addEventNow","end","base","duration","event_duration","time_step","start_hour","first_hour","_drag_event","src","dblclick_create","details_on_dblclick","viewHandler","_get_column_index","x_pos","column","_cols","_ignores","_week_indexes_from_pos","pos","ceil","_mouse_coords","$env","_colsS","$domHelpers","dataArea","heights","_ignores_detected","preserve_length","_event_length","_get_real_event_length","x_step","x_unit","timestamp","confirmationText","title_confirm_closing","positive_closing","_correct_shift","back","_is_pos_changed","old_pos","new_pos","diff","old_val","new_val","has_moved","_correct_drag_start_date","len","_start_correction","_end_correction","last_hour","_get_fictional_event_length","_correct_drag_end_date","mousedownPos","_get_date_from_pos","_drag_start","fields","timeStep","custom","_dragEventBody","_move_event_shift","resize_date","_drag_from_start","resize_from_start","end_day_start","end_day_date","firstHour","maxY","precisePos","minDate","preciseDate","cursor","new_end","new_start","limit_drag_out","all_timed","_get_section_view","_get_event_sday","getView","_allow_dnd","update_render","sx","update_view","drag_event_body","_lame_clone","_get_private_properties","_clear_temporary_properties","clean","flagged_event","initial","current_state","moved","_dhx_changed","is_new","edit_on_create","details_on_create","isOneDayEvent","_lame_copy","_trigger_dyn_loading","_reset_ignores","_reset_scale","isViewExists","_set_aria_buttons_attrs","buttonGroups","group","headerButtonsAttributes","icon_form","oldClass","newClass","multidayScroll","dhx_multi_day","prev_scroll","preserve_scroll","_dy_shift","headerToggleState","_render_x_header","offset_top","left_border","columnHeaderText","dayHeaderAttr","_get_columns_num","count","count_n","_get_timeunit_start","_get_view_end","ed","_calc_scale_sizes","summ","_process_ignores","realcount","_set_scale_col_size","_render_scales","data_area","sd","today","scales","cls","firstHalf","slotDate","htmlContent","time_slot_text","time_slot_class","secondHalf","week_date_class","dayColumnAttr","_getNavDateElement","drag_resize","drag_move","_scales","navBarDateStr","scaleElement","navBarDateAttr","_reset_month_scale","_reset_hours_scale","multi_day","c1","totalWidth","col_length","offset","hiddenWidth","c2","cloneNode","cc","hourScaleAttr","scroll_hour","now_date","n","preserve","ign_date","_render_month_scale","view_start","cd","tdwidths","cell_width","getCellHeight","cellheight","table","cell","month_date_class","body_class","head_class","monthCellAttr","cellHead","cellBody","bf1","getLabel","sections","lightbox","map_to","options","updateCollection","list_name","resetLightbox","hideCover","cache","n_ev","section","_focus","endColumnIndex","eventLength","startColumnIndex","_get_date_index","last_column","check","excludedDuration","intervalStart","intervalEnd","leftCellCutOffStart","leftCellCutOffEnd","rightCellCutOffStart","rightCellCutOffEnd","ev_length","dir","per_day","days","end_slot","fd","start_slot","_get_section_property","_is_initialized","htmlTags","extraSpaces","stripHTMLLite","htmlText","singleQuotes","escapeQuotes","getAttributeString","setAttributes","role","isActive","getHeaderCellAttr","eventAttr","_eventCommonAttr","event_text","$dataprocessor_class","setEventBarAttr","_getAttributes","attributeSetter","arg","eventBarAttrString","agendaHeadAttrString","agendaHeadDateString","agendaHeadDescriptionString","agendaDataAttrString","agendaEventAttrString","agendaDetailsBtnString","gridAttrString","gridRowAttrString","gridCellAttrString","mapAttrString","mapRowAttrString","mapDetailsBtnString","minicalHeader","headerId","minicalGrid","minicalRow","minicalDayCell","selected","minicalHeadCell","weekAgendaDayCell","weekAgendaEvent","lightboxHiddenAttr","lightboxVisibleAttr","lightboxSectionButtonAttrString","tabindex","yearHeader","yearGrid","yearHeadCell","yearRow","yearDayCell","lightboxAttr","lightboxButtonAttrString","buttonName","eventMenuAttrString","iconName","lightboxHeader","headerText","lightboxSelectAttrString","time_option","buttonLabel","quickInfoAttr","quickInfoHeaderAttrString","quickInfoHeader","quickInfoButtonAttrString","tooltipAttr","tooltipVisibleAttr","tooltipHiddenAttr","dom","assert","show_errors","_createDatePicker","_getFocusableNodes","_locate_css","messageApi","$","counter","methods","Promise","clearAll","createConfig","async","serializeRequestParams","DOMParser","ActiveXObject","loadXML","parseFromString","tagname","xpathExp","docObj","selectNodes","first","ownerDocument","evaluate","XPathResult","ANY_TYPE","iterateNext","_call","onLoad","getSync","put","postData","del","post","postSync","resolve","reject","XMLHttpRequest","isQt","readyState","filePath","open","toUpperCase","send","$ajax","default_date","month_date","load_date","week_date","date_format","api_date","day_column_padding","drag_create","resize_month_events","resize_month_timed","responsive_lightbox","separate_short_events","cascade_event_display","cascade_event_count","cascade_event_margin","multi_day_height_limit","drag_lightbox","quick_info_detached","drag_highlight","icons_edit","icons_select","buttons_left","buttons_right","highlight_displayed_event","ajax_error","delay_render","timeline_swap_resize","event_attribute","$initial","xml_date","d1","d2","day_scale_date","month_scale_date","week_scale_date","time_picker","event_date","event_class","event_bar_date","event_bar_text","month_events_link","drag_marker_class","drag_marker_content","tooltip_date_format","tooltip_text","calendar_month","calendar_scale_date","calendar_date","calendar_time","clear_view","extra_data","silent","setEvent","hash","create_getter","create_setter","is_visible_events","clear_event","evFirstHour","evLastHour","lastHour","checkEndDate","get_visible_events","only_timed","filter_event","_is_main_area_event","hold","full","_recalculate_timed","tvs","tvd","_rendered_location","buffer","renderedLocation","_view_month_day","_render_month_link","toRender","_sday","_eday","curr","_sweek","_get_event_bar_pos","widt","x2","_pre_render_events","containers","render_event_bar","max_evs","max_month_events","locate_holder","real","render_event","_get_first_visible_cell","cells","hb","h_old","_pre_render_events_table","_pre_render_events_line","monthRows","cellHeight","cHeight","unshift","scrollHeight","scroll_fix","scale_settings","sum_width","row_heights","full_multi_day_height","used_multi_day_height","used_multi_day_height_css","multi_day_section","multi_day_icon","overflowY","datePart","_get_event_mapped_end_date","ev_duration","_min_mapped_duration","evs_originals","sh","eh","_inner","t_ev","slot_index","sorderSet","_is_sorder","_max_sorder","max_count","_copy_event","_time_order","_is_any_multiday_cell_visible","isAnyCellVisible","checkDate","noCells","lastDayEnd","weekCellIndex","locate_holder_day","chunks_info","first_chunk","last_chunk","chunk_info","locate_s","locate_e","_length","stack_line","_first_chunk","_last_chunk","_copy_dummy","_y_from_date","sm","_calc_event_y","min_height","em","parentWidth","menu","menu_offset","pos_y","ev_count","ev_sorder","margin","_render_v_bar","_text_style","zIndex","color","setProperty","tplClass","_editor","shiftKey","ariaAttr","icons","icons_str","currentIcon","textColor","highlightEventPosition","contentA","contentB","_","cse","boxWidth","renderEvent","inner_html","footer_class","_drag_resize","past","_get_dnd_order","order","ev_height","max_height","_orig_sorder","evTop","columns","y_event_offset","resize_handle","resizable","left_chunk","right_chunk","resize_left","resize_right","timed","bg_color","style_text","_edit_stop_event","getRenderedEvent","rendered_events","rendered_event","showEvent","original_color","original_text_color","section_delimiter","getSectionTop","posFromDate","_smartRenderingEnabled","restoreOriginalColors","scrollTo","_append_drag_marker","m","scale","lastChild","_update_marker_position","size","getLightboxRoot","cspEnvironment","salesforceEnvironment","_lightbox_controls","formSection","getLightbox","getValue","form_blocks","get_value","setValue","set_value","get_template_control","control","get_select_control","get_textarea_control","get_time_control","defaults","template","sns","placeholder","_get_input","_dhx_onchange","onchange","time_format","_time_format_order","cfg","dt","last","limit_time_select","p","selectBoxClass","range","start_year","end_year","year_range","g","tdate","_time_values","ariaAttrs","_full_day","checked","disabled","_fill_lightbox_select","auto_end_date","_update_lightbox_select","time_values","direct_value","fixed_value","value_found","t_v","selectedIndex","original","showCover","show_cover","_cover","_fill_lightbox","lightbox_header","headerContent","headerDate","headerTitle","current_sns","_get_lightbox_section_node","block","default_value","_lightbox_out","_empty_lightbox","hide_lightbox","endLightbox","hide_cover","_move_while_dnd","_finish_dnd","save_lightbox","startLightbox","_custom_lightbox","_temp_lightbox","cancel_lightbox","hideLightbox","_init_lightbox_events","buttonTarget","sectionButton","button_click","readonly_active","setLightboxSize","_init_dnd_events","_dnd_start_lb","dhx_unselectable","lb","_lb_start","_ready_to_dnd","recurring","_lightbox_template","label_name","ds","t_ds","_bindLightboxLabels","inputBlock","fallback","inputId","old_id","getRootView","hooks","didInsert","cmp","skins","jQuery","fn","dhx_scheduler","each","Scheduler","getSchedulerInstance","comp","update_view_timer","curr_view_timer","lazy_setCurrentView","oldDate","oldMode","updateFlags","lazy_updateView","ars","createDataProcessor","tMode","batchUpdate","dhtmlxError","catchError","i18n","addLocale","setLocale","localeObject","getLocale","dhx_save_btn","dhx_cancel_btn","dhx_delete_btn","ext","activePlugins","plugins","extensionList","dependencies","priorities","extension","dep","dependencyName","orderA","orderB","treetimeline","daytimeline","outerdrag","legacy","plugin","getExtension","ExtensionsManager","_extensions","attaches","attachScheduler","_genStr","attachObject","vs","av","sched","schedId","setSizes","_viewRestore","notImplemented","modals","modalsStack","isModal","afterPopup","trapFocus","currentTarget","$keyboardNavigation","_keyNavMessagePopup","focusElement","backupFocus","key_nav_legacy","_temp_key_scope","key_nav","_pasteDate","_pasteSection","isCopy","trackMousePosition","mousePointer","keyNavPointer","elementFromPoint","dispatcher","copyEvent","_make_pasted_event","event_pid","event_length","multisection","_do_paste","is_copy","modified_ev","original_ev","_is_key_nav_active","ctrlKey","metaKey","_buffer_event","_key_nav_copy_paste","getActiveNode","new_ev","scheduler_handlers","attachSchedulerHandlers","waitCall","keyDownHandler","focusHandler","keepScrollPosition","focusGlobalNode","enable","reFocusActiveNode","activeNode","isValid","MinicalButton","MinicalCell","mousedownHandler","dataAreaClick","listOfScales","some","Event","TimeSlot","nextSlot","setActiveNode","removeAttribute","evNode","prevState","lastStart","lastEnd","lastSection","getNode","Tooltip","_scheduler","_tooltipNode","_root","_isLikeMouseEvent","_calculateTooltipPosition","viewport","_getViewPortSize","tooltipNode","tooltip","offsetX","tooltip_offset_x","offsetY","tooltip_offset_y","mouse","containerPos","scrollY","_getViewPort","scrollX","$event_data","$event","TooltipManager","_listeners","_initDelayedFunctions","delayHide","watchableTarget","eventTarget","targetNode","doOnMouseEnter","onmouseenter","onmousemove","onmouseleave","listener","cloneDomEvent","clone","delayShow","utils.default","setContent","show","tooltip_timeout","tooltip_hide_timeout","gplExtensions","active_links","active_link_view","_active_link_click","s_d","do_wrapper","fullname","week_x","d_s","agenda_legacy","add_agenda_legacy","agenda_legacy_time","agenda_legacy_text","agenda_legacy_date","agenda_legacy_start","old_dblclick_dhx_cal_data","dblclick_dhx_cal_data","fill_agenda_tab","old_render_view_data","ev_class","agendaDetailsButtonAttr","agenda_time","agenda_text","_agendaScrollTop","agenda_area","dateElement","agenda_date","agenda_legacy_view","agenda_start","agenda_end","l","rowAttr","dateHeader","descriptionHeader","agenda_view","add_agenda","dayDateToStr","dayDowToStr","agenda_day","eventsInDays","anyEvents","eventStart","renderDay","calendarEvent","dates","selectedId","all_timed_month","is_event_short","_safe_copy","proto","isPrototypeOf","old_prerender_events_line","old_prerender_events_table","prerender_events","ce","_virtual","isOvernightEvent","getNextDay","setDateTime","event_changed","re","redraw","next_day","old_get_visible_events","old_mode","old_date","oldUpdate","fullRedrawNeeded","collision","temp_section","before","_setTempSection","event_id","collision_limit","checkCollision","edited_ev","_roll_back_dates","_check_sections_collision","second","evs_dates","getRecDates","tevs","concurrent","checked_mode","single","container_autoresize","month_day_min_height","min_grid_size","min_map_size","old_pre_render_event","active","total_height","multiday_height","evl","_h_fix","navHeight","headerHeight","checked_divs","updateContainterHeight","is_repaint","checked_div","maxHeight","year_y","cur_height","week_agenda_scale_height","eventsContainer","_gridView","y_unit","getSectionHeight","scrollWidth","getScrollSize","callUpdate","conditionalUpdateContainerHeight","asyncRepaint","requestAnimationFrame","autosizeEnabled","$original_scroll_width","$original_section_autoheight","section_autoheight","cookie","getCookieName","_get_url_nav","urlNavigationPlugin","schedulerCookie","unescape","newMode","cookie_param","old_load","drag_between","editors","cached_options","resetCombo","_combo","DOMParent","combo","unload","DOMelem","dhx_globalImgPath","image_path","dhtmlXCombo","options_height","setOptionHeight","enableFilteringMode","filtering","script_path","selected_id","addOption","disable","selectOption","setComboValue","all_options","single_option","getIndexByValue","getSelectedValue","getSelectedText","vertical","radiobuttons","checked_value","isChecked","check_html","o","label_html","checkbox","unchecked_value","expand","fullscreen","toggleIcon","_position","_width","_height","_overflow","overflow","_maximize","collapse","directions","prev_margin","export_api","std","getElementSizes","sizes","dhtmlxAjax","dhx4","getTimeline","orientation","dpi","zoom","_export_html","_send_to_export","exportToICal","_serialize_plain","exportToExcel","_serialize_columns","_ajax_to_export","server","info","_plain_export_copy","$text","_create_hidden_form","submit","_hidden_export_form","_get_export_size","footer","A5","A4","A3","A2","A1","A0","dataX","cSize","parseFloat","smartRendering","initialSizes","smart_rendering","style_width","style_height","timeline_scrollable","timeline_smart_rendering","grid_view","html_templates","all","getScope","scopes","minicalButton","minicalDate","SchedulerNode","DataArea","timeSlot","searchMap","key_nav_step","addShortcut","shortcut","scope","scopeObject","getShortcutHandler","commands","shortcuts","findHandler","removeShortcut","unbind","disp","setDefaultNode","_compose","parts","createCommand","modifiers","alt","ctrl","meta","expr","getExpressions","words","getWords","command","commandKeys","specialKeys","charCodeAt","getCommandFromEvent","domEvent","altKey","printableKey","fromCharCode","getHashFromEvent","getHash","junctionChar","term","combinationChar","backspace","enter","esc","space","up","down","home","pageup","pagedown","insert","plus","f1","f2","f3","f4","f5","f6","f7","f8","f9","f10","f11","f12","EventHandler","_handlers","doAction","returnValue","bindAll","initKeys","nextItem","currentFocus","currentIndex","divs","renderMultiple","currentStart","currentEnd","_modes","_getMode","units","renderVerticalMarker","renderTimelineMarker","renderYearMarker","renderMonthMarker","weekAgenda","renderWeekAgendaMarker","renderAgendaMarker","dayColumns","addWaiAriaLabel","addDataAttributes","dateToStr","dateTimeLabel","sectionObject","markerDate","_wrapDiv","_get_year_cell","opacity","view_opts","areas","round_position","blocks","_trace_x","_is_column_visible","start_pos","end_pos","set_date_part","tempStart","tempEnd","_timeline_getX","_section_height","_isRender","renderMonthCell","weekNumber","dayIndex","datatable","inner_index","all_hours_height","hour_ms","lineHeight","getDefaultNode","getMode","blur","_compareEvents","_pickEvent","startId","nextEventHandler","nextEvent","currEvent","visibleDates","nextEv","prevEventHandler","HeaderCell","getNodes","KeyNavNode","moveTo","compareTo","canStringifyThis","canStringifyThat","defaultCell","_getSection","_getNodes","eventNode","defaultElement","isScrolledIntoView","eventBox","viewPort","idSelector","inlineEditor","getInlineEditor","isMultisectionEvent","_moveToSlot","slot","movingDate","getDefaultDate","_getDefaultSection","visibleTime","nowTime","showNowTime","findVisibleColumn","timeslot","_getMultisectionView","_getNextSection","sectionId","nextIndex","defaultSlot","addMonthDate","nextMonthSlot","_alignTimeSlot","nextTimelineSlot","newPos","nextUnitsSlot","optionsCount","nextDaySlot","_moveDate","isBeforeLastHour","isStartDate","minutes","isAfterFirstHour","isInVisibleDayTime","oldStart","toNextDay","testEnd","nextWeekAgendaSlot","nextAgendaSlot","isDateVisible","nextDateColumn","current","tempSlot","extendSlot","extendUnitsSlot","extendTimelineSlot","extendMonthSlot","extendDaySlot","extendWeekAgendaSlot","extendGenericSlot","allowedDirections","moveDate","newDates","extendSlotDates","oldSlot","newSlot","dateDirection","scrollSlot","globalNode","_getGrid","_getNode","enabled","newRow","newCol","blurNode","editor","defaultPrevented","schedulerNode","_timeout","_minicalendars","isMinical","minicalendars","patchMinicalendar","focusMinical","minicalClick","rowIndex","cellIndex","td","renderMinical","cal","added","destroyMinical","_def_count","attachOnce","isSchedulerSelected","changeState","layer","layers","validId","_clearUpdateFlag","_cloneObj","_dataprocessors","_layers_zindex","initial_layer_zindex","isDefault","defaultLayer","showLayer","tlayer","toggleLayer","hideLayer","visible","getLayer","layer_name","native_event_object","noMenu","_evs_layer","_t_render_view_data","evs_layer","borderBox","borderBoxWidth","headerWidth","bodyWidth","footerWidth","bodyHeight","new_zIndex","filter_agenda","limit_start","limit_end","limit_view","check_limits","mark_now","display_marked_timespans","overwrite_marked_timespans","_temp_limit_scope","dhx_time_block","default_timespan_type","get_resulting_options","zones","blockTime","unblockTime","deleteMarkedTimespan","om","od","nm","nd","isBlocked","date_end","resetDate","checkInMarkedTimespan","timespan_type","on_overlap","temp_start_date","temp_end_date","timespans","_marked_timespans","day_value","getZones","_get_zone_minutes","eventEnd","markerStart","markerEnd","blocker","checkLimitViolation","complete_res","allow","day_index","linker","_add_timespan_zones","_get_blocked_zones","timeline_zones","blocked_timeline_zones","_get_relevant_blocked_zones","resultZones","is_new_event","data_copy","native_object","_mark_now","_mark_now_timer","dhx_now_time","_remove_mark_now","_append_mark_now","zone_start","start_index","end_index","units_l","r_divs","t_day","t_div","_render_marked_timespan","_prepare_timespan_options","r_configs","temp_configs","t_days","cloned_config","invert_zones","invertZones","view_key","t_config","c_config","t_sd","t_ed","zone_end","_get_dates_by_index","start_day","delta","t_date","_get_css_classes_by_config","css_classes","_get_block_by_config","date_to_display","min_day","sday","block_proto","_mark_timespans","_on_scale_add_marker","markTimespan","configuration","rebuild_els","timespans_ids","_marked_timespans_ids","timespan_types","_marked_timespans_types","unmarkTimespan","_addMarkerTimespanConfig","unit_id","timespans_view","day_configs","_array","configs","current_zones","resulting_zones","c_zone_start","c_zone_end","isLast","_subtract_timespan_zones","is_modified","_delete_marked_timespan_by_id","parent_array","_delete_marked_timespan_by_config","viewspans","_delete_marked_timespans_list","dayConfig","day_timespans","d_t","related_zones","types","typedConfig","_get_types_to_render","specific","types_to_render","_get_configs_to_render","_get_unit_index","day_ind","unitsPerDay","unit_zones","unit_types","global_data","day_types","dblclick_dhx_marked_timespan","map_view","mapView","geocoder","points","markers","infoWindow","createMarker","google","maps","Marker","map_date_width","map_icon_width","map_description_width","map_resolve_event_location","map_resolve_user_location","map_initial_position","LatLng","map_error_position","map_infowindow_max_width","map_type","MapTypeId","ROADMAP","map_zoom_after_resolve","marker_geo_success","marker_geo_fail","marker_date","marker_text","event_location","dblclick_dhx_map_area","map_time","map_text","map_start","add_map","map_date","_latLngUpdate","_isMapPositionSet","gmap","dhx_gmap","_setMapSize","mapOptions","map_initial_zoom","center","mapTypeId","Map","disableDefaultUI","disableDoubleClickZoom","addListener","point","latLng","geocode","results","GeocoderStatus","OK","geometry","location","lat","lng","formatted_address","infoWindowOptions","maxWidth","_points","_markers","_infowindow","InfoWindow","_infowindows_content","_initialization_count","Geocoder","geolocation","getCurrentPosition","_userLocation","coords","latitude","longitude","setCenter","setZoom","getCenter","setPosition","getZoom","fill_map_tab","_selected_event_id","ariaButtonAttr","elem_id","marginRight","marginLeft","marginTop","showAddress","temp_center","map_end","close","setMap","clear_map_tab","trigger","selectEvent","performClick","_displayEventOnMap","address","language","_updateEventLocation","old_event_id","new_event_id","_event_resolve_delay","ret","minical","minicalDomEvents","minicalendar","mark_events","_synced_minicalendars","_prev","is_refresh","_render_calendar","unmarkCalendar","cont","tpos","_get_def_cont","$dom","dateAttribute","markCalendar","_last_date","conf","markedDates","_markCalendarCurrentDate","sync","_on_xle_handler","updateCalendar","_created","_locateCalendar","weekNum","dat","dayCell","_week_template","week_template","dummy_date","_mini_cal_arrows","previous","ts","temp2","temp3","temp4","temp5","temp6","temp7","temp8","padding","weekHeader","move_minicalendar_date","css_classnames","css_texts","diffs","calendars","arrow","dayHeaders","dayCells","inputs","selects","inp","number","new_date","_update_minical_select","isFulldayEvent","_attach_action","_round_minutes","linkCalendar","datediff","dateNew","month_end","monthheight","old_s","multiselect","_result","_children","_mark_inputs","_ids","delimiter","script_url","divLoading","multisource","mvc","update_timer","use_id","sanitize","_finish_ext_load","_get_id","model","cid","backbone","toJSON","changes","queue","add_from_queue","Backbone","Collection","last_event","dragger","dhtmlDragAndDropObject","stopDrag","on_drop","sourceHtmlObject","dhtmlObject","targetHtmlObject","targetHtml","action_data","event_data","view_options","_locate_cell_timeline","addDragLanding","_drag","_dragIn","shtmlObject","_dragOut","DragControl","addDrop","onDrop","sourceDhtmlx","getMaster","onDragIn","pdf","html_regexp","newline_regexp","clean_html","x_norm","colsWidth","x_norm_event","is_left","dhx_cal_header","y_norm","get_style","de_day","de_week","xml_end","xml_top","profile","xml_body_header","dhx_cal_date","xh","xml_month_scale","xml_month","yh","xhs","second_scale","top_width","top_col","xml_body","colors","week_starts","_month","text_color","zx","zdx","left_norm","zy","zdy","e_type","dets","week","dy_copy","toXML","original_date","original_mode","temp_date","to_pdf","objects","getPDFData","toPDF","toPDFRange","quick_info","show_quick_info","showQuickInfo","hiding_function","hideQuickInfo","quick_info_title","quick_info_content","quick_info_date","_quick_info_box_id","_get_event_counter_part","_quick_info_box","_init_quick_info","_fill_quick_data","_show_quick_info","cssTimeToMs","milliseconds","forced","qi","_x_scroll","dataPos","_quick_info_onscroll_handler","$testmode","_qi_button_click","domEv","main","mainContent","originalRecurringSetValue","original_left_buttons","original_right_buttons","txt_replace","txts","txtt","readonly_form","forbidden_buttons","button_arrays","forbidden_button","button_array","originalForm","readonlyForm","_lightbox_r","getRecurringSection","getFirstSectionOfType","clearMilliseconds","old_add_event","occurrence_timestamp_in_utc","recurring_workdays","_get_node","_outer_html","outerHTML","rec","loc","repeat_date_of_end","_ds","_get_form_node","_get_node_value","_get_node_numeric_value","_set_node_value","hash_value","_init_set_value","_end_date","str_date_format","repeat_date","date_str","register_els","inps","formatter","change_current_view","set_end_rule","_get_repeat_code","get_rcode","repeat","str_date","include_end_by","transpose_type","get_numeric_value","repeat_precise","_start","start_exists","transpose_day_week","set_rcode","_set_repeat_code","dispatchEvent","MouseEvent","elements","_rec_init_done","rf","blocked","_is_modified_occurence","_toggle_block","actual_dates","timeControl","_start_date","_get_button","_get_form","backgroundPosition","_rec_markers","_rec_markers_pull","_pid_time","_get_rec_marker","ch","_get_rec_markers","_rec_temp","ev_id","_ignore_call","tev","_pid_changed","nid","nev","sub","isEventFound","showLightbox_rec","lightbox_recurring","pid","isVirtual","showSeries","title_confirm_recurring","get_visible_events_rec","old_update_event","transponse_size","day_week","originalMonth","newMonth","cor","cor2","cday","transposeRecurring","recurringParts","addRecurring","recurringStepDays","weekDays","seriesInstance","currentCount","origMonth","origYear","correctOverflowInstances","recurring_overflow_instances","getMilliseconds","non_render","maxCount","startHour","visibleCount","_fix_daylight_saving_date","ted","recurrings","sev","data_attributes","all_events","_serialize_json_value","toICal","full_day_format","tooltipManager","tooltips","tooltipFor","touch_tooltip","targetEventId","hideTooltip","s2d","d2s","select_event","wp","year_view","year_date","year_month","year_scale_date","year_tooltip","isYearMode","getCellDate","dblclick_dhx_month_head","_year_render_event","_year_marked_cells","_hideToolTip","_tooltip","_showToolTip","_year_view_tooltip_handler","_init_year_tooltip","_mark_year_date","_unmark_year_date","_reset_year_scale","year_top","ssd","yearBox","year_x","yearStart","datepicker","locateEvent","factory","extensions","_seed","_schedulerPlugins","_bundledExtensions","_extensionsManager","initConfig","_internal_id","$syncFactory","_initFromConfig","addCalendar","$dhx"],"mappings":"AAUA,MAAAA,IAPUC,OAAAA,SAAW,MACNA,SAEAC;ACNA,SAASC,GAAOC,GAE/B;AAAA,WAASC,EAAIC,GAAAA;AACZ,QAAIC,IAAUC,SAASC,cAAc,KAKrC;AAAA,YAJeH,KAAa,IAAII,MAAM,GAAA,EAC9BC,QAAQ,SAASC,GACxBL;AAAAA,QAAQM,UAAUC,IAAIF,CACxB;AAAA,IAAA,CAAA,GACQL;AAAAA,EACR;AACA,MAAIQ,IAAY,EACfC,gBAAgB,WACf;AAAA,WAAOX,EAAI,+BAAA;AAAA,EACX,GACDY,KAAK,WACJ;AAAA,WAAOZ,EAAI,oBAAA;AAAA,EACX,GACDa,MAAM,SAAUC,GAAAA;AACf,QAAIZ,IAAUF,EAAI,aAAA;AAiBlB,WAhBAE,EAAQa,aAAa,QAAQD,EAAOD,OAAO,MAC3CX,GAAAA,EAAQa,aAA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AA,QAAUmM,MAAMnM,EAAU8b,WAAWmkF,EAAWnkF,WAAW,EAAA;AAAA,IAC/D,GAAM,EAACrT,MAAM,GAAA,CAAA,GAGRw3F,EAAWrhF;AACb,iBAAU/c,KAASo+F,EAAWrhF;AAC7B5e,UAAU+I,YAAYlH,GAAOo+F,EAAWrhF,OAAO/c,CAI9Co+F,CAAAA;AAAAA,IAAAA,EAAW5pF,UACbrW,EAAU8zD,KAAKE,UAAUisC,EAAW5pF,MAAAA,GAGlC1S,MAAMC,QAAQq8F,EAAWnT,SAAAA,KAC3BmT,EAAWnT,UAAUvsF,QAAQ,SAAS+B,GACrCtC;AAAAA,QAAUqgG,YAAY/9F,CAAAA;AAAAA,IAC1B,CAGK29F,GAAAA,EAAW17F,YACbvE,EAAU4W,KAAKqpF,EAAW17F,SAE1BvE,IAAAA,EAAU4W,KAGRqpF,GAAAA,EAAW5qF,SACiB,OAApB4qF,EAAW5qF,QAAS,WAC7BrV,EAAUoiB,KAAK69E,EAAW5qF,IAAAA,IAE1BrV,EAAUgd,MAAMijF,EAAW5qF,IAAAA;AAAAA,EAG7B;ADxFmCynD,EAAAA,EAAAA,GAE/B98D,IAAY2/F,EAAQ5sC,qBACpBD,GAAAA,KAAY,EACjBuC,QAAQr1D,EAAUmJ,KAAKw2F,EAAQtqC,QAAQsqC,CAGxC9/F,EAAAA;AAAAA,OAAOG,YAAYA,GACnBH,OAAOizD,YAAYA,IAEfjzD,OAAOygG,SACVzgG,OAAOygG,OAAO,KAGfzgG,OAAOygG,KAAKtgG,YAAYA,GACxBH,OAAOygG,KAAKxtC,YAAYA;"} \ No newline at end of file diff --git a/codebase/dhtmlxscheduler.js b/codebase/dhtmlxscheduler.js index c58e91f..b521144 100644 --- a/codebase/dhtmlxscheduler.js +++ b/codebase/dhtmlxscheduler.js @@ -1,37 +1,37 @@ -(function(F,P){typeof exports=="object"&&typeof module<"u"?P(exports):typeof define=="function"&&define.amd?define(["exports"],P):P((F=typeof globalThis<"u"?globalThis:F||self).dhtmlxscheduler={})})(this,function(F){"use strict";const P=typeof window<"u"?window:global;function de(e){function h(o){var t=document.createElement("div");return(o||"").split(" ").forEach(function(r){t.classList.add(r)}),t}var a={rows_container:function(){return h("dhx_cal_navbar_rows_container")},row:function(){return h("dhx_cal_navbar_row")},view:function(o){var t=h("dhx_cal_tab");return t.setAttribute("name",o.view+"_tab"),t.setAttribute("data-tab",o.view),e.config.fix_tab_position&&(o.$firstTab?t.classList.add("dhx_cal_tab_first"):o.$lastTab?t.classList.add("dhx_cal_tab_last"):o.view!=="week"&&t.classList.add("dhx_cal_tab_standalone"),o.$segmentedTab&&t.classList.add("dhx_cal_tab_segmented")),t},date:function(){return h("dhx_cal_date")},button:function(o){return h("dhx_cal_nav_button dhx_cal_nav_button_custom dhx_cal_tab")},builtInButton:function(o){return h("dhx_cal_"+o.view+"_button dhx_cal_nav_button")},spacer:function(){return h("dhx_cal_line_spacer")},minicalendarButton:function(o){var t=h("dhx_minical_icon");return o.click||t.$_eventAttached||e.event(t,"click",function(){e.isCalendarVisible()?e.destroyCalendar():e.renderCalendar({position:this,date:e.getState().date,navigation:!0,handler:function(r,s){e.setCurrentView(r),e.destroyCalendar()}})}),t},html_element:function(o){return h("dhx_cal_nav_content")}};function i(o){var t=function(c){var u;if(c.view)switch(c.view){case"today":case"next":case"prev":u=a.builtInButton;break;case"date":u=a.date;break;case"spacer":u=a.spacer;break;case"button":u=a.button;break;case"minicalendar":u=a.minicalendarButton;break;default:u=a.view}else c.rows?u=a.rows_container:c.cols&&(u=a.row);return u}(o);if(t){var r=t(o);if(o.css&&r.classList.add(o.css),o.width&&((s=o.width)===1*s&&(s+="px"),r.style.width=s),o.height&&((s=o.height)===1*s&&(s+="px"),r.style.height=s),o.click&&e.event(r,"click",o.click),o.html&&(r.innerHTML=o.html),o.align){var s="";o.align=="right"?s="flex-end":o.align=="left"&&(s="flex-start"),r.style.justifyContent=s}return r}}function d(o){return typeof o=="string"&&(o={view:o}),o.view||o.rows||o.cols||(o.view="button"),o}function n(o){var t,r=document.createDocumentFragment();t=Array.isArray(o)?o:[o];for(var s=0;s=0){if(!a)return i;var _=n===0||!(d.charAt(n-1)||"").trim(),o=n+h.length>=d.length||!d.charAt(n+h.length).trim();if(_&&o)return i}}i=i.parentNode}return null}function fe(e){var h=!1,a=!1;if(window.getComputedStyle){var i=window.getComputedStyle(e,null);h=i.display,a=i.visibility}else e.currentStyle&&(h=e.currentStyle.display,a=e.currentStyle.visibility);var d=!1,n=ie({target:e},"dhx_form_repeat",!1);return n&&(d=n.style.height=="0px"),d=d||!e.offsetHeight,h!="none"&&a!="hidden"&&!d}function ve(e){return!isNaN(e.getAttribute("tabindex"))&&1*e.getAttribute("tabindex")>=0}function ge(e){return!{a:!0,area:!0}[e.nodeName.loLowerCase()]||!!e.getAttribute("href")}function me(e){return!{input:!0,select:!0,textarea:!0,button:!0,object:!0}[e.nodeName.toLowerCase()]||!e.hasAttribute("disabled")}function re(){return document.head.createShadowRoot||document.head.attachShadow}function oe(e){if(!e||!re())return document.body;for(;e.parentNode&&(e=e.parentNode);)if(e instanceof ShadowRoot)return e.host;return document.body}const R={getAbsoluteLeft:function(e){return this.getOffset(e).left},getAbsoluteTop:function(e){return this.getOffset(e).top},getOffsetSum:function(e){for(var h=0,a=0;e;)h+=parseInt(e.offsetTop),a+=parseInt(e.offsetLeft),e=e.offsetParent;return{top:h,left:a}},getOffsetRect:function(e){var h=e.getBoundingClientRect(),a=0,i=0;if(/Mobi/.test(navigator.userAgent)){var d=document.createElement("div");d.style.position="absolute",d.style.left="0px",d.style.top="0px",d.style.width="1px",d.style.height="1px",document.body.appendChild(d);var n=d.getBoundingClientRect();a=h.top-n.top,i=h.left-n.left,d.parentNode.removeChild(d)}else{var _=document.body,o=document.documentElement,t=window.pageYOffset||o.scrollTop||_.scrollTop,r=window.pageXOffset||o.scrollLeft||_.scrollLeft,s=o.clientTop||_.clientTop||0,c=o.clientLeft||_.clientLeft||0;a=h.top+t-s,i=h.left+r-c}return{top:Math.round(a),left:Math.round(i)}},getOffset:function(e){return e.getBoundingClientRect?this.getOffsetRect(e):this.getOffsetSum(e)},closest:function(e,h){return e&&h?G(e,h):null},insertAfter:function(e,h){h.nextSibling?h.parentNode.insertBefore(e,h.nextSibling):h.parentNode.appendChild(e)},remove:function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},isChildOf:function(e,h){return h.contains(e)},getFocusableNodes:function(e){for(var h=e.querySelectorAll(["a[href]","area[href]","input","select","textarea","button","iframe","object","embed","[tabindex]","[contenteditable]"].join(", ")),a=Array.prototype.slice.call(h,0),i=0;i=0||navigator.userAgent.indexOf("Trident")>=0),isIE6:I&&!XMLHttpRequest&&navigator.userAgent.indexOf("MSIE")>=0,isIE7:I&&navigator.userAgent.indexOf("MSIE 7.0")>=0&&navigator.userAgent.indexOf("Trident")<0,isIE8:I&&navigator.userAgent.indexOf("MSIE 8.0")>=0&&navigator.userAgent.indexOf("Trident")>=0,isOpera:I&&navigator.userAgent.indexOf("Opera")>=0,isChrome:I&&navigator.userAgent.indexOf("Chrome")>=0,isKHTML:I&&(navigator.userAgent.indexOf("Safari")>=0||navigator.userAgent.indexOf("Konqueror")>=0),isFF:I&&navigator.userAgent.indexOf("Firefox")>=0,isIPad:I&&navigator.userAgent.search(/iPad/gi)>=0,isEdge:I&&navigator.userAgent.indexOf("Edge")!=-1,isNode:!I||typeof navigator>"u"};function X(e){if(typeof e=="string"||typeof e=="number")return e;var h="";for(var a in e){var i="";e.hasOwnProperty(a)&&(i=a+"="+(i=typeof e[a]=="string"?encodeURIComponent(e[a]):typeof e[a]=="number"?e[a]:encodeURIComponent(JSON.stringify(e[a]))),h.length&&(i="&"+i),h+=i)}return h}function be(e){var h=function(n,_){for(var o="var temp=date.match(/[a-zA-Z]+|[0-9]+/g);",t=n.match(/%[a-zA-Z]/g),r=0;r50?1900:2000);";break;case"%g":case"%G":case"%h":case"%H":o+="set[3]=temp["+r+"]||0;";break;case"%i":o+="set[4]=temp["+r+"]||0;";break;case"%Y":o+="set[0]=temp["+r+"]||0;";break;case"%a":case"%A":o+="set[3]=set[3]%12+((temp["+r+"]||'').toLowerCase()=='am'?0:12);";break;case"%s":o+="set[5]=temp["+r+"]||0;";break;case"%M":o+="set[1]=this.locale.date.month_short_hash[temp["+r+"]]||0;";break;case"%F":o+="set[1]=this.locale.date.month_full_hash[temp["+r+"]]||0;"}var s="set[0],set[1],set[2],set[3],set[4],set[5]";return _&&(s=" Date.UTC("+s+")"),new Function("date","var set=[0,0,1,0,0,0]; "+o+" return new Date("+s+");")},a=function(n,_){return function(o){for(var t=[0,0,1,0,0,0],r=o.match(/[a-zA-Z]+|[0-9]+/g),s=n.match(/%[a-zA-Z]/g),c=0;c50?1900:2e3);break;case"%g":case"%G":case"%h":case"%H":t[3]=r[c]||0;break;case"%i":t[4]=r[c]||0;break;case"%Y":t[0]=r[c]||0;break;case"%a":case"%A":t[3]=t[3]%12+((r[c]||"").toLowerCase()=="am"?0:12);break;case"%s":t[5]=r[c]||0;break;case"%M":t[1]=e.locale.date.month_short_hash[r[c]]||0;break;case"%F":t[1]=e.locale.date.month_full_hash[r[c]]||0}return _?new Date(Date.UTC(t[0],t[1],t[2],t[3],t[4],t[5])):new Date(t[0],t[1],t[2],t[3],t[4],t[5])}},i=!1;function d(){return e.config.csp==="auto"?i:e.config.csp}(function(){try{new Function("canUseCsp = false;")}catch{i=!0}})(),e.date={init:function(){for(var n=e.locale.date.month_short,_=e.locale.date.month_short_hash={},o=0;o0){var t=(+o-+n)%864e5;if(t&&n.getTimezoneOffset()==o.getTimezoneOffset()){var r=t/36e5;o.setTime(o.getTime()+60*(24-r)*60*1e3)}}return _>=0&&!n.getHours()&&o.getHours()&&(o.getDate()11?"pm":"am":s.getHours()>11?"pm":"am";case"%A":return r?s.getUTCHours()>11?"PM":"AM":s.getHours()>11?"PM":"AM";case"%s":return r?e.date.to_fixed(s.getUTCSeconds()):e.date.to_fixed(s.getSeconds());case"%W":return r?e.date.to_fixed(e.date.getUTCISOWeek(s)):e.date.to_fixed(e.date.getISOWeek(s));default:return c}})}}(n,_);n=n.replace(/%[a-zA-Z]/g,function(t){switch(t){case"%d":return'"+this.date.to_fixed(date.getDate())+"';case"%m":return'"+this.date.to_fixed((date.getMonth()+1))+"';case"%j":return'"+date.getDate()+"';case"%n":return'"+(date.getMonth()+1)+"';case"%y":return'"+this.date.to_fixed(date.getFullYear()%100)+"';case"%Y":return'"+date.getFullYear()+"';case"%D":return'"+this.locale.date.day_short[date.getDay()]+"';case"%l":return'"+this.locale.date.day_full[date.getDay()]+"';case"%M":return'"+this.locale.date.month_short[date.getMonth()]+"';case"%F":return'"+this.locale.date.month_full[date.getMonth()]+"';case"%h":return'"+this.date.to_fixed((date.getHours()+11)%12+1)+"';case"%g":return'"+((date.getHours()+11)%12+1)+"';case"%G":return'"+date.getHours()+"';case"%H":return'"+this.date.to_fixed(date.getHours())+"';case"%i":return'"+this.date.to_fixed(date.getMinutes())+"';case"%a":return'"+(date.getHours()>11?"pm":"am")+"';case"%A":return'"+(date.getHours()>11?"PM":"AM")+"';case"%s":return'"+this.date.to_fixed(date.getSeconds())+"';case"%W":return'"+this.date.to_fixed(this.date.getISOWeek(date))+"';default:return t}}),_&&(n=n.replace(/date\.get/g,"date.getUTC"));var o=new Function("date",'return "'+n+'";');return e.date._bind_host_object(o)},str_to_date:function(n,_,o){var t=d()?a:h,r=t(n,_),s=/^[0-9]{4}(\-|\/)[0-9]{2}(\-|\/)[0-9]{2} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/,c=/^[0-9]{2}\/[0-9]{2}\/[0-9]{4} ?(([0-9]{1,2}:[0-9]{2})(:[0-9]{1,2})?)?$/,u=/^[0-9]{2}\-[0-9]{2}\-[0-9]{4} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/,v=/^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/,m=t("%Y-%m-%d %H:%i:%s",_),l=t("%m/%d/%Y %H:%i:%s",_),f=t("%d-%m-%Y %H:%i:%s",_);return function(g){if(!o&&!e.config.parse_exact_format){if(g&&g.getISOWeek)return new Date(g);if(typeof g=="number")return new Date(g);if(p=g,s.test(String(p)))return m(g);if(function(y){return c.test(String(y))}(g))return l(g);if(function(y){return u.test(String(y))}(g))return f(g);if(function(y){return v.test(y)}(g))return new Date(g)}var p;return r.call(e,g)}},getISOWeek:function(n){if(!n)return!1;var _=(n=this.date_part(new Date(n))).getDay();_===0&&(_=7);var o=new Date(n.valueOf());o.setDate(n.getDate()+(4-_));var t=o.getFullYear(),r=Math.round((o.getTime()-new Date(t,0,1).getTime())/864e5);return 1+Math.floor(r/7)},getUTCISOWeek:function(n){return this.getISOWeek(this.convert_to_utc(n))},convert_to_utc:function(n){return new Date(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds())}}}function se(e){return(function(){var h={};for(var a in this._events){var i=this._events[a];i.id.toString().indexOf("#")==-1&&(h[i.id]=i)}return h}).bind(e)}function xe(e){e._loaded={},e._load=function(a,i){if(a=a||this._load_url){var d;if(a+=(a.indexOf("?")==-1?"?":"&")+"timeshift="+new Date().getTimezoneOffset(),this.config.prevent_cache&&(a+="&uid="+this.uid()),i=i||this._date,this._load_mode){var n=this.templates.load_format;for(i=this.date[this._load_mode+"_start"](new Date(i.valueOf()));i>this._min_date;)i=this.date.add(i,-1,this._load_mode);d=i;for(var _=!0;di&&this._loaded[n(o)]);if(d<=i)return!1;for(e.ajax.get(a+"&from="+n(i)+"&to="+n(d),t);i=400)&&(this.callEvent("onLoadError",[a.xmlDoc]),i=[]),this._process_loading(i),this.callEvent("onXLE",[]),this.callEvent("onParse",[])},e._process_loading=function(a){this._loading=!0,this._not_render=!0;for(var i=0;i1)&&(this.xy.scroll_width=0,this._mobile=!0),this.config.touch){var h=!0;try{document.createEvent("TouchEvent")}catch{h=!1}h?this._touch_events(["touchmove","touchstart","touchend"],function(a){return a.touches&&a.touches.length>1?null:a.touches[0]?{target:a.target,pageX:a.touches[0].pageX,pageY:a.touches[0].pageY,clientX:a.touches[0].clientX,clientY:a.touches[0].clientY}:a},function(){return!1}):window.PointerEvent||window.navigator.pointerEnabled?this._touch_events(["pointermove","pointerdown","pointerup"],function(a){return a.pointerType=="mouse"?null:a},function(a){return!a||a.pointerType=="mouse"}):window.navigator.msPointerEnabled&&this._touch_events(["MSPointerMove","MSPointerDown","MSPointerUp"],function(a){return a.pointerType==a.MSPOINTER_TYPE_MOUSE?null:a},function(a){return!a||a.pointerType==a.MSPOINTER_TYPE_MOUSE})}},e._touch_events=function(h,a,i){var d,n,_,o,t,r,s=0;function c(v,m,l){e.event(v,m,function(f){return!!e._is_lightbox_open()||(i(f)?void 0:l(f))},{passive:!1})}function u(v){i(v)||(e._hide_global_tip(),o&&(e._on_mouse_up(a(v)),e._temp_touch_block=!1),e._drag_id=null,e._drag_mode=null,e._drag_pos=null,e._pointerDragId=null,clearTimeout(_),o=r=!1,t=!0)}c(document.body,h[0],function(v){if(!i(v)){var m=a(v);if(m){if(o)return function(l){if(!i(l)){var f=e.getState().drag_mode,g=!!e.matrix&&e.matrix[e._mode],p=e.render_view_data;f=="create"&&g&&(e.render_view_data=function(){for(var y=e.getState().drag_id,w=e.getEvent(y),b=g.y_property,k=e.getEvents(w.start_date,w.end_date),E=0;E5||Math.abs(d.pageY-n.pageY)>5)&&(t=!0,clearTimeout(_)):t=!0)}}}),c(this._els.dhx_cal_data[0],"touchcancel",u),c(this._els.dhx_cal_data[0],"contextmenu",function(v){if(!i(v))return r?(v&&v.preventDefault&&v.preventDefault(),v.cancelBubble=!0,!1):void 0}),c(this._obj,h[1],function(v){var m;if(document&&document.body&&document.body.classList.add("dhx_cal_touch_active"),!i(v))if(e._pointerDragId=v.pointerId,o=t=!1,r=!0,m=n=a(v)){var l=new Date;if(!t&&!o&&l-s<250)return e._click.dhx_cal_data(m),window.setTimeout(function(){e.$destroyed||e._on_dbl_click(m)},50),v.preventDefault&&v.preventDefault(),v.cancelBubble=!0,e._block_next_stop=!0,!1;if(s=l,!t&&!o&&e.config.touch_drag){var f=e._locate_event(document.activeElement),g=e._locate_event(m.target),p=d?e._locate_event(d.target):null;if(f&&g&&f==g&&f!=p)return v.preventDefault&&v.preventDefault(),v.cancelBubble=!0,e._ignore_next_click=!1,e._click.dhx_cal_data(m),d=m,!1;_=setTimeout(function(){if(!e.$destroyed){o=!0;var y=d.target,w=e._getClassName(y);y&&w.indexOf("dhx_body")!=-1&&(y=y.previousSibling),e._on_mouse_down(d,y),e._drag_mode&&e._drag_mode!="create"&&e.for_rendered(e._drag_id,function(b,k){b.style.display="none",e._rendered.splice(k,1)}),e.config.touch_tip&&e._show_global_tip(),e.updateEvent(e._drag_id)}},e.config.touch_drag),d=m}}else t=!0}),c(this._els.dhx_cal_data[0],h[2],function(v){if(document&&document.body&&document.body.classList.remove("dhx_cal_touch_active"),!i(v))return e.config.touch_swipe_dates&&!o&&function(m,l,f,g){if(!m||!l)return!1;for(var p=m.target;p&&p!=e._obj;)p=p.parentNode;if(p!=e._obj||e.matrix&&e.matrix[e.getState().mode]&&e.matrix[e.getState().mode].scrollable)return!1;var y=Math.abs(m.pageY-l.pageY),w=Math.abs(m.pageX-l.pageX);return yf&&(!y||w/y>3)&&(m.pageX>l.pageX?e._click.dhx_cal_next_button():e._click.dhx_cal_prev_button(),!0)}(d,n,200,100)&&(e._block_next_stop=!0),o&&(e._ignore_next_click=!0,setTimeout(function(){e._ignore_next_click=!1},100)),u(v),e._block_next_stop?(e._block_next_stop=!1,v.preventDefault&&v.preventDefault(),v.cancelBubble=!0,!1):void 0}),e.event(document.body,h[2],u)},e._show_global_tip=function(){e._hide_global_tip();var h=e._global_tip=document.createElement("div");h.className="dhx_global_tip",e._update_global_tip(1),document.body.appendChild(h)},e._update_global_tip=function(h){var a=e._global_tip;if(a){var i="";if(e._drag_id&&!h){var d=e.getEvent(e._drag_id);d&&(i="
"+(d._timed?e.templates.event_header(d.start_date,d.end_date,d):e.templates.day_date(d.start_date,d.end_date,d))+"
")}e._drag_mode=="create"||e._drag_mode=="new-size"?a.innerHTML=(e.locale.labels.drag_to_create||"Drag to create")+i:a.innerHTML=(e.locale.labels.drag_to_move||"Drag to move")+i}},e._hide_global_tip=function(){var h=e._global_tip;h&&h.parentNode&&(h.parentNode.removeChild(h),e._global_tip=0)}}function ke(e){var h,a;function i(){if(e._is_material_skin())return!0;if(a!==void 0)return a;var o=document.createElement("div");o.style.position="absolute",o.style.left="-9999px",o.style.top="-9999px",o.innerHTML="
",document.body.appendChild(o);var t=window.getComputedStyle(o.querySelector(".dhx_body")).getPropertyValue("box-sizing");document.body.removeChild(o),(a=t==="border-box")||setTimeout(function(){a=void 0},1e3)}function d(){if(!e._is_material_skin()&&!e._border_box_events()){var o=a;a=void 0,h=void 0,o!==i()&&e.$container&&e.getState().mode&&e.setCurrentView()}}function n(o){var t=o.getMinutes();return t=t<10?"0"+t:t,""+o.getHours()+" "+t+""}e._addThemeClass=function(){document.documentElement.setAttribute("data-scheduler-theme",e.skin)},e._skin_settings={fix_tab_position:[1,0],use_select_menu_space:[1,0],wide_form:[1,0],hour_size_px:[44,42],displayed_event_color:["#ff4a4a","ffc5ab"],displayed_event_text_color:["#ffef80","7e2727"]},e._skin_xy={lightbox_additional_height:[90,50],nav_height:[59,22],bar_height:[24,20]},e._is_material_skin=function(){return e.skin?(e.skin+"").indexOf("material")>-1:function(){if(h===void 0){var o=document.createElement("div");o.style.position="absolute",o.style.left="-9999px",o.style.top="-9999px",o.innerHTML="
",document.body.appendChild(o);var t=window.getComputedStyle(o.querySelector(".dhx_cal_scale_placeholder")).getPropertyValue("position");h=t==="absolute",setTimeout(function(){h=null,o&&o.parentNode&&o.parentNode.removeChild(o)},500)}return h}()},e._build_skin_info=function(){(function(){const v=e.$container;clearInterval(_),v&&(_=setInterval(()=>{const m=getComputedStyle(v).getPropertyValue("--dhx-scheduler-theme");m&&m!==e.skin&&e.setSkin(m)},100))})();const o=getComputedStyle(this.$container),t=o.getPropertyValue("--dhx-scheduler-theme");let r,s=!!t,c={},u=!1;if(s){r=t;for(let v in e.xy)c[v]=o.getPropertyValue(`--dhx-scheduler-xy-${v}`);c.hour_size_px=o.getPropertyValue("--dhx-scheduler-config-hour_size_px"),c.wide_form=o.getPropertyValue("--dhx-scheduler-config-form_wide")}else r=function(){for(var v=document.getElementsByTagName("link"),m=0;m{switch(r.getAttribute("data-tab")||r.getAttribute("name")){case"day":case"day_tab":r.classList.add("dhx_cal_tab_first"),r.classList.add("dhx_cal_tab_segmented");break;case"week":case"week_tab":r.classList.add("dhx_cal_tab_segmented");break;case"month":case"month_tab":r.classList.add("dhx_cal_tab_last"),r.classList.add("dhx_cal_tab_segmented");break;default:r.classList.add("dhx_cal_tab_standalone")}}),function(r){if(e.config.header)return;const s=Array.from(r.querySelectorAll(".dhx_cal_tab")),c=["day","week","month"].map(v=>s.find(m=>m.getAttribute("data-tab")===v)).filter(v=>v!==void 0);let u=s.length>0?s[0]:null;c.reverse().forEach(v=>{r.insertBefore(v,u),u=v})}(e._els.dhx_cal_navline[0]))},{once:!0})}}function Ee(e,h){this.$scheduler=e,this.$dp=h,this._dataProcessorHandlers=[],this.attach=function(){var a=this.$dp,i=this.$scheduler;this._dataProcessorHandlers.push(i.attachEvent("onEventAdded",function(d){!this._loading&&this._validId(d)&&a.setUpdated(d,!0,"inserted")})),this._dataProcessorHandlers.push(i.attachEvent("onConfirmedBeforeEventDelete",function(d){if(this._validId(d)){var n=a.getState(d);return n=="inserted"||this._new_event?(a.setUpdated(d,!1),!0):n!="deleted"&&(n=="true_deleted"||(a.setUpdated(d,!0,"deleted"),!1))}})),this._dataProcessorHandlers.push(i.attachEvent("onEventChanged",function(d){!this._loading&&this._validId(d)&&a.setUpdated(d,!0,"updated")})),this._dataProcessorHandlers.push(i.attachEvent("onClearAll",function(){a._in_progress={},a._invalid={},a.updatedRows=[],a._waitMode=0})),a.attachEvent("insertCallback",i._update_callback),a.attachEvent("updateCallback",i._update_callback),a.attachEvent("deleteCallback",function(d,n){i.getEvent(n)?(i.setUserData(n,this.action_param,"true_deleted"),i.deleteEvent(n)):i._add_rec_marker&&i._update_callback(d,n)})},this.detach=function(){for(var a in this._dataProcessorHandlers){var i=this._dataProcessorHandlers[a];this.$scheduler.detachEvent(i)}this._dataProcessorHandlers=[]}}function Z(e){return this.serverProcessor=e,this.action_param="!nativeeditor_status",this.object=null,this.updatedRows=[],this.autoUpdate=!0,this.updateMode="cell",this._tMode="GET",this._headers=null,this._payload=null,this.post_delim="_",this._waitMode=0,this._in_progress={},this._invalid={},this.messages=[],this.styles={updated:"font-weight:bold;",inserted:"font-weight:bold;",deleted:"text-decoration : line-through;",invalid:"background-color:FFE0E0;",invalid_cell:"border-bottom:2px solid red;",error:"color:red;",clear:"font-weight:normal;text-decoration:none;"},this.enableUTFencoding(!0),W(this),this}function De(e){var h="data-dhxbox",a=null;function i(g,p){var y=g.callback;m.hide(g.box),a=g.box=null,y&&y(p)}function d(g){if(a){var p=g.which||g.keyCode,y=!1;if(l.keyboard){if(p==13||p==32){var w=g.target||g.srcElement;R.getClassName(w).indexOf("scheduler_popup_button")>-1&&w.click?w.click():(i(a,!0),y=!0)}p==27&&(i(a,!1),y=!0)}return y?(g.preventDefault&&g.preventDefault(),!(g.cancelBubble=!0)):void 0}}function n(g){n.cover||(n.cover=document.createElement("div"),e.event(n.cover,"keydown",d),n.cover.className="dhx_modal_cover",document.body.appendChild(n.cover)),n.cover.style.display=g?"inline-block":"none"}function _(g,p,y){var w=e._waiAria.messageButtonAttrString(g),b=(p||"").toLowerCase().replace(/ /g,"_");return`
${g}
`}function o(){for(var g=[].slice.apply(arguments,[0]),p=0;p'+E.title+"
"),M+='
'+(E.content?"":E.text)+'
',D&&(M+=_(o(E.ok,e.locale.labels.message_ok,"OK"),"ok",!0)),x&&(M+=_(o(E.cancel,e.locale.labels.message_cancel,"Cancel"),"cancel",!1)),E.buttons)for(var A=0;A",k.className="scheduler-info dhtmlx-info scheduler-"+b.type+" dhtmlx-"+b.type,e.event(k,"click",function(){l.hide(b.id),b=null}),e._waiAria.messageInfoAttr(k),l.position=="bottom"&&l.area.firstChild?l.area.insertBefore(k,l.area.firstChild):l.area.appendChild(k),b.expire>0&&(l.timers[b.id]=window.setTimeout(function(){l&&l.hide(b.id)},b.expire)),l.pull[b.id]=k,k=null,b.id}(g)}};l.seed=new Date().valueOf(),l.uid=B.uid,l.expire=4e3,l.keyboard=!0,l.position="top",l.pull={},l.timers={},l.hideAll=function(){for(var g in l.pull)l.hide(g)},l.hide=function(g){var p=l.pull[g];p&&p.parentNode&&(window.setTimeout(function(){p.parentNode.removeChild(p),p=null},2e3),p.className+=" hidden",l.timers[g]&&window.clearTimeout(l.timers[g]),delete l.pull[g])};var f=[];return e.attachEvent("onMessagePopup",function(g){f.push(g)}),e.attachEvent("onAfterMessagePopup",function(g){for(var p=0;p{this.callEvent("onStateChange",[n,d])})}getState(){return{...this.state,mode:this.state.modes[this.state.currentModeIndex]}}setState(h){const a={...this.state};h.mode&&(h.currentModeIndex=this.state.modes.indexOf(h.mode)),this.state={...this.state,...h},this._notifyStateChange(a,this.state),this.container&&this.render(this.container)}onStateChange(h){return this.onStateChangeHandlers.push(h),()=>{const a=this.onStateChangeHandlers.indexOf(h);a!==-1&&this.onStateChangeHandlers.splice(a,1)}}_notifyStateChange(h,a){this.onStateChangeHandlers.forEach(i=>i(h,a))}_adjustDate(h){const{mode:a,date:i}=this.getState(),d=new Date(i);a==="days"?d.setMonth(i.getMonth()+h):a==="months"?d.setFullYear(i.getFullYear()+h):d.setFullYear(i.getFullYear()+10*h),this.setState({date:d})}_toggleMode(){const h=(this.state.currentModeIndex+1)%this.state.modes.length;this.setState({currentModeIndex:h})}_renderCalendarHeader(h){const{mode:a,date:i}=this.getState(),d=document.createElement("div");d.classList.add("dhx_cal_datepicker_header");const n=document.createElement("button");n.classList.add("dhx_cal_datepicker_arrow","scheduler_icon","arrow_left"),d.appendChild(n);const _=document.createElement("div");if(_.classList.add("dhx_cal_datepicker_title"),a==="days")_.innerText=i.toLocaleString("default",{month:"long"})+" "+i.getFullYear();else if(a==="months")_.innerText=i.getFullYear();else{const t=10*Math.floor(i.getFullYear()/10);_.innerText=`${t} - ${t+9}`}this._domEvents.attach(_,"click",this._toggleMode.bind(this)),d.appendChild(_);const o=document.createElement("button");o.classList.add("dhx_cal_datepicker_arrow","scheduler_icon","arrow_right"),d.appendChild(o),h.appendChild(d),this._domEvents.attach(n,"click",this._adjustDate.bind(this,-1)),this._domEvents.attach(o,"click",this._adjustDate.bind(this,1))}render(h){this._domEvents.detachAll(),this.container=h||this.container,this.container.innerHTML="",this.element||(this.element=document.createElement("div"),this.element.classList.add("dhx_cal_datepicker")),this.element.innerHTML="",this.container.appendChild(this.element),this._renderCalendarHeader(this.element);const a=document.createElement("div");a.classList.add("dhx_cal_datepicker_data"),this.element.appendChild(a);const{mode:i}=this.getState();i==="days"?this._renderDayGrid(a):i==="months"?this._renderMonthGrid(a):this._renderYearGrid(a)}_renderDayGridHeader(h){const{date:a}=this.getState(),i=this.scheduler;let d=i.date.week_start(new Date(a));const n=i.date.add(i.date.week_start(new Date(a)),1,"week");h.classList.add("dhx_cal_datepicker_days");const _=i.date.date_to_str("%D");for(;d.valueOf()(p[this.scheduler.date.day_start(new Date(y)).valueOf()]=!0,p),{}),r=document.createElement("div");this._renderDayGridHeader(r),h.appendChild(r);const s=this.scheduler,c=s.date.week_start(s.date.month_start(new Date(a))),u=s.date.month_start(new Date(a)),v=s.date.add(s.date.month_start(new Date(a)),1,"month");let m=s.date.add(s.date.month_start(new Date(a)),1,"month");m.getDay()!==0&&(m=s.date.add(s.date.week_start(m),1,"week"));let l=this._weeksBetween(c,m);n&&l{const y=p.target.closest("[data-cell-date]"),w=new Date(y.getAttribute("data-cell-date"));this.callEvent("onDateClick",[w,p])});f.valueOf()=v.valueOf()&&p.classList.add("dhx_after"),f.getDay()!==0&&f.getDay()!==6||p.classList.add("dhx_cal_datepicker_weekend"),_&&o&&f.valueOf()>=_.valueOf()&&f.valueOf(){const r=document.createElement("div");r.classList.add("dhx_cal_datepicker_month"),a.getMonth()===t.getMonth()&&r.classList.add("dhx_cal_datepicker_current"),r.setAttribute("data-month",t.getMonth()),r.innerHTML=n(t),this._domEvents.attach(r,"click",()=>{const s=new Date(t);this.setState({date:s,mode:"days"})}),i.appendChild(r)}),h.appendChild(i);const _=document.createElement("div");_.classList.add("dhx_cal_datepicker_done");const o=document.createElement("button");o.innerText="Done",o.classList.add("dhx_cal_datepicker_done_btn"),this._domEvents.attach(o,"click",()=>{this.setState({mode:"days"})}),_.appendChild(o),h.appendChild(_)}_renderYearGrid(h){const{date:a}=this.getState(),i=10*Math.floor(a.getFullYear()/10),d=document.createElement("div");d.classList.add("dhx_cal_datepicker_years");for(let o=i-1;o<=i+10;o++){const t=document.createElement("div");t.innerText=o,t.classList.add("dhx_cal_datepicker_year"),t.setAttribute("data-year",o),a.getFullYear()===o&&t.classList.add("dhx_cal_datepicker_current"),this._domEvents.attach(t,"click",()=>{this.setState({date:new Date(o,a.getMonth(),1),mode:"months"})}),d.appendChild(t)}h.appendChild(d);const n=document.createElement("div");n.classList.add("dhx_cal_datepicker_done");const _=document.createElement("button");_.innerText="Done",_.classList.add("dhx_cal_datepicker_done_btn"),this._domEvents.attach(_,"click",()=>{this.setState({mode:"months"})}),n.appendChild(_),h.appendChild(n)}destructor(){this.onStateChangeHandlers=[],this.element&&(this.element.innerHTML="",this.element.remove()),this._domEvents.detachAll(),this.callEvent("onDestroy",[]),this.detachAllEvents(),this.scheduler=null}}function nt(e){const h={version:"7.0.3"};(function(t){var r={agenda:"https://docs.dhtmlx.com/scheduler/agenda_view.html",grid:"https://docs.dhtmlx.com/scheduler/grid_view.html",map:"https://docs.dhtmlx.com/scheduler/map_view.html",unit:"https://docs.dhtmlx.com/scheduler/units_view.html",timeline:"https://docs.dhtmlx.com/scheduler/timeline_view.html",week_agenda:"https://docs.dhtmlx.com/scheduler/weekagenda_view.html",year:"https://docs.dhtmlx.com/scheduler/year_view.html",anythingElse:"https://docs.dhtmlx.com/scheduler/views.html"},s={agenda:"ext/dhtmlxscheduler_agenda_view.js",grid:"ext/dhtmlxscheduler_grid_view.js",map:"ext/dhtmlxscheduler_map_view.js",unit:"ext/dhtmlxscheduler_units.js",timeline:"ext/dhtmlxscheduler_timeline.js, ext/dhtmlxscheduler_treetimeline.js, ext/dhtmlxscheduler_daytimeline.js",week_agenda:"ext/dhtmlxscheduler_week_agenda.js",year:"ext/dhtmlxscheduler_year_view.js",limit:"ext/dhtmlxscheduler_limit.js"};t._commonErrorMessages={unknownView:function(c){var u=s[c]?"You're probably missing "+s[c]+".":"";return"`"+c+"` view is not defined. \nPlease check parameters you pass to `scheduler.init` or `scheduler.setCurrentView` in your code and ensure you've imported appropriate extensions. \nRelated docs: "+(r[c]||r.anythingElse)+` +(function(F,P){typeof exports=="object"&&typeof module<"u"?P(exports):typeof define=="function"&&define.amd?define(["exports"],P):P((F=typeof globalThis<"u"?globalThis:F||self).dhtmlxscheduler={})})(this,function(F){"use strict";const P=typeof window<"u"?window:global;function de(e){function h(o){var t=document.createElement("div");return(o||"").split(" ").forEach(function(n){t.classList.add(n)}),t}var a={rows_container:function(){return h("dhx_cal_navbar_rows_container")},row:function(){return h("dhx_cal_navbar_row")},view:function(o){var t=h("dhx_cal_tab");return t.setAttribute("name",o.view+"_tab"),t.setAttribute("data-tab",o.view),e.config.fix_tab_position&&(o.$firstTab?t.classList.add("dhx_cal_tab_first"):o.$lastTab?t.classList.add("dhx_cal_tab_last"):o.view!=="week"&&t.classList.add("dhx_cal_tab_standalone"),o.$segmentedTab&&t.classList.add("dhx_cal_tab_segmented")),t},date:function(){return h("dhx_cal_date")},button:function(o){return h("dhx_cal_nav_button dhx_cal_nav_button_custom dhx_cal_tab")},builtInButton:function(o){return h("dhx_cal_"+o.view+"_button dhx_cal_nav_button")},spacer:function(){return h("dhx_cal_line_spacer")},minicalendarButton:function(o){var t=h("dhx_minical_icon");return o.click||t.$_eventAttached||e.event(t,"click",function(){e.isCalendarVisible()?e.destroyCalendar():e.renderCalendar({position:this,date:e.getState().date,navigation:!0,handler:function(n,s){e.setCurrentView(n),e.destroyCalendar()}})}),t},html_element:function(o){return h("dhx_cal_nav_content")}};function r(o){var t=function(c){var u;if(c.view)switch(c.view){case"today":case"next":case"prev":u=a.builtInButton;break;case"date":u=a.date;break;case"spacer":u=a.spacer;break;case"button":u=a.button;break;case"minicalendar":u=a.minicalendarButton;break;default:u=a.view}else c.rows?u=a.rows_container:c.cols&&(u=a.row);return u}(o);if(t){var n=t(o);if(o.css&&n.classList.add(o.css),o.width&&((s=o.width)===1*s&&(s+="px"),n.style.width=s),o.height&&((s=o.height)===1*s&&(s+="px"),n.style.height=s),o.click&&e.event(n,"click",o.click),o.html&&(n.innerHTML=o.html),o.align){var s="";o.align=="right"?s="flex-end":o.align=="left"&&(s="flex-start"),n.style.justifyContent=s}return n}}function d(o){return typeof o=="string"&&(o={view:o}),o.view||o.rows||o.cols||(o.view="button"),o}function i(o){var t,n=document.createDocumentFragment();t=Array.isArray(o)?o:[o];for(var s=0;s=0){if(!a)return r;var _=i===0||!(d.charAt(i-1)||"").trim(),o=i+h.length>=d.length||!d.charAt(i+h.length).trim();if(_&&o)return r}}r=r.parentNode}return null}function fe(e){var h=!1,a=!1;if(window.getComputedStyle){var r=window.getComputedStyle(e,null);h=r.display,a=r.visibility}else e.currentStyle&&(h=e.currentStyle.display,a=e.currentStyle.visibility);var d=!1,i=ie({target:e},"dhx_form_repeat",!1);return i&&(d=i.style.height=="0px"),d=d||!e.offsetHeight,h!="none"&&a!="hidden"&&!d}function ve(e){return!isNaN(e.getAttribute("tabindex"))&&1*e.getAttribute("tabindex")>=0}function ge(e){return!{a:!0,area:!0}[e.nodeName.loLowerCase()]||!!e.getAttribute("href")}function me(e){return!{input:!0,select:!0,textarea:!0,button:!0,object:!0}[e.nodeName.toLowerCase()]||!e.hasAttribute("disabled")}function re(){return document.head.createShadowRoot||document.head.attachShadow}function oe(e){if(!e||!re())return document.body;for(;e.parentNode&&(e=e.parentNode);)if(e instanceof ShadowRoot)return e.host;return document.body}const B={getAbsoluteLeft:function(e){return this.getOffset(e).left},getAbsoluteTop:function(e){return this.getOffset(e).top},getOffsetSum:function(e){for(var h=0,a=0;e;)h+=parseInt(e.offsetTop),a+=parseInt(e.offsetLeft),e=e.offsetParent;return{top:h,left:a}},getOffsetRect:function(e){var h=e.getBoundingClientRect(),a=0,r=0;if(/Mobi/.test(navigator.userAgent)){var d=document.createElement("div");d.style.position="absolute",d.style.left="0px",d.style.top="0px",d.style.width="1px",d.style.height="1px",document.body.appendChild(d);var i=d.getBoundingClientRect();a=h.top-i.top,r=h.left-i.left,d.parentNode.removeChild(d)}else{var _=document.body,o=document.documentElement,t=window.pageYOffset||o.scrollTop||_.scrollTop,n=window.pageXOffset||o.scrollLeft||_.scrollLeft,s=o.clientTop||_.clientTop||0,c=o.clientLeft||_.clientLeft||0;a=h.top+t-s,r=h.left+n-c}return{top:Math.round(a),left:Math.round(r)}},getOffset:function(e){return e.getBoundingClientRect?this.getOffsetRect(e):this.getOffsetSum(e)},closest:function(e,h){return e&&h?G(e,h):null},insertAfter:function(e,h){h.nextSibling?h.parentNode.insertBefore(e,h.nextSibling):h.parentNode.appendChild(e)},remove:function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},isChildOf:function(e,h){return h.contains(e)},getFocusableNodes:function(e){for(var h=e.querySelectorAll(["a[href]","area[href]","input","select","textarea","button","iframe","object","embed","[tabindex]","[contenteditable]"].join(", ")),a=Array.prototype.slice.call(h,0),r=0;r=0||navigator.userAgent.indexOf("Trident")>=0),isOpera:R&&navigator.userAgent.indexOf("Opera")>=0,isChrome:R&&navigator.userAgent.indexOf("Chrome")>=0,isKHTML:R&&(navigator.userAgent.indexOf("Safari")>=0||navigator.userAgent.indexOf("Konqueror")>=0),isFF:R&&navigator.userAgent.indexOf("Firefox")>=0,isIPad:R&&navigator.userAgent.search(/iPad/gi)>=0,isEdge:R&&navigator.userAgent.indexOf("Edge")!=-1,isNode:!R||typeof navigator>"u"};function X(e){if(typeof e=="string"||typeof e=="number")return e;var h="";for(var a in e){var r="";e.hasOwnProperty(a)&&(r=a+"="+(r=typeof e[a]=="string"?encodeURIComponent(e[a]):typeof e[a]=="number"?e[a]:encodeURIComponent(JSON.stringify(e[a]))),h.length&&(r="&"+r),h+=r)}return h}function be(e){var h=function(i,_){for(var o="var temp=date.match(/[a-zA-Z]+|[0-9]+/g);",t=i.match(/%[a-zA-Z]/g),n=0;n50?1900:2000);";break;case"%g":case"%G":case"%h":case"%H":o+="set[3]=temp["+n+"]||0;";break;case"%i":o+="set[4]=temp["+n+"]||0;";break;case"%Y":o+="set[0]=temp["+n+"]||0;";break;case"%a":case"%A":o+="set[3]=set[3]%12+((temp["+n+"]||'').toLowerCase()=='am'?0:12);";break;case"%s":o+="set[5]=temp["+n+"]||0;";break;case"%M":o+="set[1]=this.locale.date.month_short_hash[temp["+n+"]]||0;";break;case"%F":o+="set[1]=this.locale.date.month_full_hash[temp["+n+"]]||0;"}var s="set[0],set[1],set[2],set[3],set[4],set[5]";return _&&(s=" Date.UTC("+s+")"),new Function("date","var set=[0,0,1,0,0,0]; "+o+" return new Date("+s+");")},a=function(i,_){const o=i.match(/%[a-zA-Z]/g);return function(t){for(var n=[0,0,1,0,0,0],s=t.match(/[a-zA-Z]+|[0-9]+/g),c=0;c50?1900:2e3);break;case"%g":case"%G":case"%h":case"%H":n[3]=s[c]||0;break;case"%i":n[4]=s[c]||0;break;case"%Y":n[0]=s[c]||0;break;case"%a":case"%A":n[3]=n[3]%12+((s[c]||"").toLowerCase()=="am"?0:12);break;case"%s":n[5]=s[c]||0;break;case"%M":n[1]=e.locale.date.month_short_hash[s[c]]||0;break;case"%F":n[1]=e.locale.date.month_full_hash[s[c]]||0}return _?new Date(Date.UTC(n[0],n[1],n[2],n[3],n[4],n[5])):new Date(n[0],n[1],n[2],n[3],n[4],n[5])}};let r;function d(){var i=!1;return e.config.csp==="auto"?(r===void 0&&(r=function(){try{new Function("cspEnabled = false;"),r=!1}catch{r=!0}return r}()),i=r):i=e.config.csp,i}e.date={init:function(){for(var i=e.locale.date.month_short,_=e.locale.date.month_short_hash={},o=0;o0){var t=(+o-+i)%864e5;if(t&&i.getTimezoneOffset()==o.getTimezoneOffset()){var n=t/36e5;o.setTime(o.getTime()+60*(24-n)*60*1e3)}}return _>=0&&!i.getHours()&&o.getHours()&&(o.getDate()11?"pm":"am":n.getHours()>11?"pm":"am";case"%A":return t?n.getUTCHours()>11?"PM":"AM":n.getHours()>11?"PM":"AM";case"%s":return t?e.date.to_fixed(n.getUTCSeconds()):e.date.to_fixed(n.getSeconds());case"%W":return t?e.date.to_fixed(e.date.getUTCISOWeek(n)):e.date.to_fixed(e.date.getISOWeek(n));default:return s}})}}(i,_):(i=i.replace(/%[a-zA-Z]/g,function(o){switch(o){case"%d":return'"+this.date.to_fixed(date.getDate())+"';case"%m":return'"+this.date.to_fixed((date.getMonth()+1))+"';case"%j":return'"+date.getDate()+"';case"%n":return'"+(date.getMonth()+1)+"';case"%y":return'"+this.date.to_fixed(date.getFullYear()%100)+"';case"%Y":return'"+date.getFullYear()+"';case"%D":return'"+this.locale.date.day_short[date.getDay()]+"';case"%l":return'"+this.locale.date.day_full[date.getDay()]+"';case"%M":return'"+this.locale.date.month_short[date.getMonth()]+"';case"%F":return'"+this.locale.date.month_full[date.getMonth()]+"';case"%h":return'"+this.date.to_fixed((date.getHours()+11)%12+1)+"';case"%g":return'"+((date.getHours()+11)%12+1)+"';case"%G":return'"+date.getHours()+"';case"%H":return'"+this.date.to_fixed(date.getHours())+"';case"%i":return'"+this.date.to_fixed(date.getMinutes())+"';case"%a":return'"+(date.getHours()>11?"pm":"am")+"';case"%A":return'"+(date.getHours()>11?"PM":"AM")+"';case"%s":return'"+this.date.to_fixed(date.getSeconds())+"';case"%W":return'"+this.date.to_fixed(this.date.getISOWeek(date))+"';default:return o}}),_&&(i=i.replace(/date\.get/g,"date.getUTC")),new Function("date",'return "'+i+'";').bind(e))},str_to_date:function(i,_,o){var t=d()?a:h,n=t(i,_),s=/^[0-9]{4}(\-|\/)[0-9]{2}(\-|\/)[0-9]{2} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/,c=/^[0-9]{2}\/[0-9]{2}\/[0-9]{4} ?(([0-9]{1,2}:[0-9]{2})(:[0-9]{1,2})?)?$/,u=/^[0-9]{2}\-[0-9]{2}\-[0-9]{4} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/,v=/^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/,m=t("%Y-%m-%d %H:%i:%s",_),l=t("%m/%d/%Y %H:%i:%s",_),f=t("%d-%m-%Y %H:%i:%s",_);return function(g){if(!o&&!e.config.parse_exact_format){if(g&&g.getISOWeek)return new Date(g);if(typeof g=="number")return new Date(g);if(p=g,s.test(String(p)))return m(g);if(function(y){return c.test(String(y))}(g))return l(g);if(function(y){return u.test(String(y))}(g))return f(g);if(function(y){return v.test(y)}(g))return new Date(g)}var p;return n.call(e,g)}},getISOWeek:function(i){if(!i)return!1;var _=(i=this.date_part(new Date(i))).getDay();_===0&&(_=7);var o=new Date(i.valueOf());o.setDate(i.getDate()+(4-_));var t=o.getFullYear(),n=Math.round((o.getTime()-new Date(t,0,1).getTime())/864e5);return 1+Math.floor(n/7)},getUTCISOWeek:function(i){return this.getISOWeek(this.convert_to_utc(i))},convert_to_utc:function(i){return new Date(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate(),i.getUTCHours(),i.getUTCMinutes(),i.getUTCSeconds())}}}function se(e){return(function(){var h={};for(var a in this._events){var r=this._events[a];r.id.toString().indexOf("#")==-1&&(h[r.id]=r)}return h}).bind(e)}function xe(e){e._loaded={},e._load=function(a,r){if(a=a||this._load_url){var d;if(a+=(a.indexOf("?")==-1?"?":"&")+"timeshift="+new Date().getTimezoneOffset(),this.config.prevent_cache&&(a+="&uid="+this.uid()),r=r||this._date,this._load_mode){var i=this.templates.load_format;for(r=this.date[this._load_mode+"_start"](new Date(r.valueOf()));r>this._min_date;)r=this.date.add(r,-1,this._load_mode);d=r;for(var _=!0;dr&&this._loaded[i(o)]);if(d<=r)return!1;for(e.ajax.get(a+"&from="+i(r)+"&to="+i(d),t);r=400)&&(this.callEvent("onLoadError",[a.xmlDoc]),r=[]),this._process_loading(r),this.callEvent("onXLE",[]),this.callEvent("onParse",[])},e._process_loading=function(a){this._loading=!0,this._not_render=!0;for(var r=0;r1)&&(this.xy.scroll_width=0,this._mobile=!0),this.config.touch){var h=!0;try{document.createEvent("TouchEvent")}catch{h=!1}h?this._touch_events(["touchmove","touchstart","touchend"],function(a){return a.touches&&a.touches.length>1?null:a.touches[0]?{target:a.target,pageX:a.touches[0].pageX,pageY:a.touches[0].pageY,clientX:a.touches[0].clientX,clientY:a.touches[0].clientY}:a},function(){return!1}):window.PointerEvent||window.navigator.pointerEnabled?this._touch_events(["pointermove","pointerdown","pointerup"],function(a){return a.pointerType=="mouse"?null:a},function(a){return!a||a.pointerType=="mouse"}):window.navigator.msPointerEnabled&&this._touch_events(["MSPointerMove","MSPointerDown","MSPointerUp"],function(a){return a.pointerType==a.MSPOINTER_TYPE_MOUSE?null:a},function(a){return!a||a.pointerType==a.MSPOINTER_TYPE_MOUSE})}},e._touch_events=function(h,a,r){var d,i,_,o,t,n,s=0;function c(v,m,l){e.event(v,m,function(f){return!!e._is_lightbox_open()||(r(f)?void 0:l(f))},{passive:!1})}function u(v){r(v)||(e._hide_global_tip(),o&&(e._on_mouse_up(a(v)),e._temp_touch_block=!1),e._drag_id=null,e._drag_mode=null,e._drag_pos=null,e._pointerDragId=null,clearTimeout(_),o=n=!1,t=!0)}c(document.body,h[0],function(v){if(!r(v)){var m=a(v);if(m){if(o)return function(l){if(!r(l)){var f=e.getState().drag_mode,g=!!e.matrix&&e.matrix[e._mode],p=e.render_view_data;f=="create"&&g&&(e.render_view_data=function(){for(var y=e.getState().drag_id,w=e.getEvent(y),b=g.y_property,k=e.getEvents(w.start_date,w.end_date),E=0;E5||Math.abs(d.pageY-i.pageY)>5)&&(t=!0,clearTimeout(_)):t=!0)}}}),c(this._els.dhx_cal_data[0],"touchcancel",u),c(this._els.dhx_cal_data[0],"contextmenu",function(v){if(!r(v))return n?(v&&v.preventDefault&&v.preventDefault(),v.cancelBubble=!0,!1):void 0}),c(this._obj,h[1],function(v){var m;if(document&&document.body&&document.body.classList.add("dhx_cal_touch_active"),!r(v))if(e._pointerDragId=v.pointerId,o=t=!1,n=!0,m=i=a(v)){var l=new Date;if(!t&&!o&&l-s<250)return e._click.dhx_cal_data(m),window.setTimeout(function(){e.$destroyed||e._on_dbl_click(m)},50),v.preventDefault&&v.preventDefault(),v.cancelBubble=!0,e._block_next_stop=!0,!1;if(s=l,!t&&!o&&e.config.touch_drag){var f=e._locate_event(document.activeElement),g=e._locate_event(m.target),p=d?e._locate_event(d.target):null;if(f&&g&&f==g&&f!=p)return v.preventDefault&&v.preventDefault(),v.cancelBubble=!0,e._ignore_next_click=!1,e._click.dhx_cal_data(m),d=m,!1;_=setTimeout(function(){if(!e.$destroyed){o=!0;var y=d.target,w=e._getClassName(y);y&&w.indexOf("dhx_body")!=-1&&(y=y.previousSibling),e._on_mouse_down(d,y),e._drag_mode&&e._drag_mode!="create"&&e.for_rendered(e._drag_id,function(b,k){b.style.display="none",e._rendered.splice(k,1)}),e.config.touch_tip&&e._show_global_tip(),e.updateEvent(e._drag_id)}},e.config.touch_drag),d=m}}else t=!0}),c(this._els.dhx_cal_data[0],h[2],function(v){if(document&&document.body&&document.body.classList.remove("dhx_cal_touch_active"),!r(v))return e.config.touch_swipe_dates&&!o&&function(m,l,f,g){if(!m||!l)return!1;for(var p=m.target;p&&p!=e._obj;)p=p.parentNode;if(p!=e._obj||e.matrix&&e.matrix[e.getState().mode]&&e.matrix[e.getState().mode].scrollable)return!1;var y=Math.abs(m.pageY-l.pageY),w=Math.abs(m.pageX-l.pageX);return yf&&(!y||w/y>3)&&(m.pageX>l.pageX?e._click.dhx_cal_next_button():e._click.dhx_cal_prev_button(),!0)}(d,i,200,100)&&(e._block_next_stop=!0),o&&(e._ignore_next_click=!0,setTimeout(function(){e._ignore_next_click=!1},100)),u(v),e._block_next_stop?(e._block_next_stop=!1,v.preventDefault&&v.preventDefault(),v.cancelBubble=!0,!1):void 0}),e.event(document.body,h[2],u)},e._show_global_tip=function(){e._hide_global_tip();var h=e._global_tip=document.createElement("div");h.className="dhx_global_tip",e._update_global_tip(1),document.body.appendChild(h)},e._update_global_tip=function(h){var a=e._global_tip;if(a){var r="";if(e._drag_id&&!h){var d=e.getEvent(e._drag_id);d&&(r="
"+(d._timed?e.templates.event_header(d.start_date,d.end_date,d):e.templates.day_date(d.start_date,d.end_date,d))+"
")}e._drag_mode=="create"||e._drag_mode=="new-size"?a.innerHTML=(e.locale.labels.drag_to_create||"Drag to create")+r:a.innerHTML=(e.locale.labels.drag_to_move||"Drag to move")+r}},e._hide_global_tip=function(){var h=e._global_tip;h&&h.parentNode&&(h.parentNode.removeChild(h),e._global_tip=0)}}function ke(e){var h,a;function r(){if(e._is_material_skin())return!0;if(a!==void 0)return a;var o=document.createElement("div");o.style.position="absolute",o.style.left="-9999px",o.style.top="-9999px",o.innerHTML="
",document.body.appendChild(o);var t=window.getComputedStyle(o.querySelector(".dhx_body")).getPropertyValue("box-sizing");document.body.removeChild(o),(a=t==="border-box")||setTimeout(function(){a=void 0},1e3)}function d(){if(!e._is_material_skin()&&!e._border_box_events()){var o=a;a=void 0,h=void 0,o!==r()&&e.$container&&e.getState().mode&&e.setCurrentView()}}function i(o){var t=o.getMinutes();return t=t<10?"0"+t:t,""+o.getHours()+" "+t+""}e._addThemeClass=function(){document.documentElement.setAttribute("data-scheduler-theme",e.skin)},e._skin_settings={fix_tab_position:[1,0],use_select_menu_space:[1,0],wide_form:[1,0],hour_size_px:[44,42],displayed_event_color:["#ff4a4a","ffc5ab"],displayed_event_text_color:["#ffef80","7e2727"]},e._skin_xy={lightbox_additional_height:[90,50],nav_height:[59,22],bar_height:[24,20]},e._is_material_skin=function(){return e.skin?(e.skin+"").indexOf("material")>-1:function(){if(h===void 0){var o=document.createElement("div");o.style.position="absolute",o.style.left="-9999px",o.style.top="-9999px",o.innerHTML="
",document.body.appendChild(o);var t=window.getComputedStyle(o.querySelector(".dhx_cal_scale_placeholder")).getPropertyValue("position");h=t==="absolute",setTimeout(function(){h=null,o&&o.parentNode&&o.parentNode.removeChild(o)},500)}return h}()},e._build_skin_info=function(){(function(){const v=e.$container;clearInterval(_),v&&(_=setInterval(()=>{const m=getComputedStyle(v).getPropertyValue("--dhx-scheduler-theme");m&&m!==e.skin&&e.setSkin(m)},100))})();const o=getComputedStyle(this.$container),t=o.getPropertyValue("--dhx-scheduler-theme");let n,s=!!t,c={},u=!1;if(s){n=t;for(let v in e.xy)c[v]=o.getPropertyValue(`--dhx-scheduler-xy-${v}`);c.hour_size_px=o.getPropertyValue("--dhx-scheduler-config-hour_size_px"),c.wide_form=o.getPropertyValue("--dhx-scheduler-config-form_wide")}else n=function(){for(var v=document.getElementsByTagName("link"),m=0;m{switch(n.getAttribute("data-tab")||n.getAttribute("name")){case"day":case"day_tab":n.classList.add("dhx_cal_tab_first"),n.classList.add("dhx_cal_tab_segmented");break;case"week":case"week_tab":n.classList.add("dhx_cal_tab_segmented");break;case"month":case"month_tab":n.classList.add("dhx_cal_tab_last"),n.classList.add("dhx_cal_tab_segmented");break;default:n.classList.add("dhx_cal_tab_standalone")}}),function(n){if(e.config.header)return;const s=Array.from(n.querySelectorAll(".dhx_cal_tab")),c=["day","week","month"].map(v=>s.find(m=>m.getAttribute("data-tab")===v)).filter(v=>v!==void 0);let u=s.length>0?s[0]:null;c.reverse().forEach(v=>{n.insertBefore(v,u),u=v})}(e._els.dhx_cal_navline[0]))},{once:!0})}}function Ee(e,h){this.$scheduler=e,this.$dp=h,this._dataProcessorHandlers=[],this.attach=function(){var a=this.$dp,r=this.$scheduler;this._dataProcessorHandlers.push(r.attachEvent("onEventAdded",function(d){!this._loading&&this._validId(d)&&a.setUpdated(d,!0,"inserted")})),this._dataProcessorHandlers.push(r.attachEvent("onConfirmedBeforeEventDelete",function(d){if(this._validId(d)){var i=a.getState(d);return i=="inserted"||this._new_event?(a.setUpdated(d,!1),!0):i!="deleted"&&(i=="true_deleted"||(a.setUpdated(d,!0,"deleted"),!1))}})),this._dataProcessorHandlers.push(r.attachEvent("onEventChanged",function(d){!this._loading&&this._validId(d)&&a.setUpdated(d,!0,"updated")})),this._dataProcessorHandlers.push(r.attachEvent("onClearAll",function(){a._in_progress={},a._invalid={},a.updatedRows=[],a._waitMode=0})),a.attachEvent("insertCallback",r._update_callback),a.attachEvent("updateCallback",r._update_callback),a.attachEvent("deleteCallback",function(d,i){r.getEvent(i)?(r.setUserData(i,this.action_param,"true_deleted"),r.deleteEvent(i)):r._add_rec_marker&&r._update_callback(d,i)})},this.detach=function(){for(var a in this._dataProcessorHandlers){var r=this._dataProcessorHandlers[a];this.$scheduler.detachEvent(r)}this._dataProcessorHandlers=[]}}function Z(e){return this.serverProcessor=e,this.action_param="!nativeeditor_status",this.object=null,this.updatedRows=[],this.autoUpdate=!0,this.updateMode="cell",this._tMode="GET",this._headers=null,this._payload=null,this.post_delim="_",this._waitMode=0,this._in_progress={},this._invalid={},this.messages=[],this.styles={updated:"font-weight:bold;",inserted:"font-weight:bold;",deleted:"text-decoration : line-through;",invalid:"background-color:FFE0E0;",invalid_cell:"border-bottom:2px solid red;",error:"color:red;",clear:"font-weight:normal;text-decoration:none;"},this.enableUTFencoding(!0),W(this),this}function De(e){var h="data-dhxbox",a=null;function r(g,p){var y=g.callback;m.hide(g.box),a=g.box=null,y&&y(p)}function d(g){if(a){var p=g.which||g.keyCode,y=!1;if(l.keyboard){if(p==13||p==32){var w=g.target||g.srcElement;B.getClassName(w).indexOf("scheduler_popup_button")>-1&&w.click?w.click():(r(a,!0),y=!0)}p==27&&(r(a,!1),y=!0)}return y?(g.preventDefault&&g.preventDefault(),!(g.cancelBubble=!0)):void 0}}function i(g){i.cover||(i.cover=document.createElement("div"),e.event(i.cover,"keydown",d),i.cover.className="dhx_modal_cover",document.body.appendChild(i.cover)),i.cover.style.display=g?"inline-block":"none"}function _(g,p,y){var w=e._waiAria.messageButtonAttrString(g),b=(p||"").toLowerCase().replace(/ /g,"_");return`
${g}
`}function o(){for(var g=[].slice.apply(arguments,[0]),p=0;p'+E.title+"
"),M+='
'+(E.content?"":E.text)+'
',D&&(M+=_(o(E.ok,e.locale.labels.message_ok,"OK"),"ok",!0)),x&&(M+=_(o(E.cancel,e.locale.labels.message_cancel,"Cancel"),"cancel",!1)),E.buttons)for(var A=0;A",k.className="scheduler-info dhtmlx-info scheduler-"+b.type+" dhtmlx-"+b.type,e.event(k,"click",function(){l.hide(b.id),b=null}),e._waiAria.messageInfoAttr(k),l.position=="bottom"&&l.area.firstChild?l.area.insertBefore(k,l.area.firstChild):l.area.appendChild(k),b.expire>0&&(l.timers[b.id]=window.setTimeout(function(){l&&l.hide(b.id)},b.expire)),l.pull[b.id]=k,k=null,b.id}(g)}};l.seed=new Date().valueOf(),l.uid=I.uid,l.expire=4e3,l.keyboard=!0,l.position="top",l.pull={},l.timers={},l.hideAll=function(){for(var g in l.pull)l.hide(g)},l.hide=function(g){var p=l.pull[g];p&&p.parentNode&&(window.setTimeout(function(){p.parentNode.removeChild(p),p=null},2e3),p.className+=" hidden",l.timers[g]&&window.clearTimeout(l.timers[g]),delete l.pull[g])};var f=[];return e.attachEvent("onMessagePopup",function(g){f.push(g)}),e.attachEvent("onAfterMessagePopup",function(g){for(var p=0;p{this.callEvent("onStateChange",[i,d])})}getState(){return{...this.state,mode:this.state.modes[this.state.currentModeIndex]}}setState(h){const a={...this.state};h.mode&&(h.currentModeIndex=this.state.modes.indexOf(h.mode)),this.state={...this.state,...h},this._notifyStateChange(a,this.state),this.container&&this.render(this.container)}onStateChange(h){return this.onStateChangeHandlers.push(h),()=>{const a=this.onStateChangeHandlers.indexOf(h);a!==-1&&this.onStateChangeHandlers.splice(a,1)}}_notifyStateChange(h,a){this.onStateChangeHandlers.forEach(r=>r(h,a))}_adjustDate(h){const{mode:a,date:r}=this.getState(),d=new Date(r);a==="days"?d.setMonth(r.getMonth()+h):a==="months"?d.setFullYear(r.getFullYear()+h):d.setFullYear(r.getFullYear()+10*h),this.setState({date:d})}_toggleMode(){const h=(this.state.currentModeIndex+1)%this.state.modes.length;this.setState({currentModeIndex:h})}_renderCalendarHeader(h){const{mode:a,date:r}=this.getState(),d=document.createElement("div");d.classList.add("dhx_cal_datepicker_header");const i=document.createElement("button");i.classList.add("dhx_cal_datepicker_arrow","scheduler_icon","arrow_left"),d.appendChild(i);const _=document.createElement("div");if(_.classList.add("dhx_cal_datepicker_title"),a==="days")_.innerText=r.toLocaleString("default",{month:"long"})+" "+r.getFullYear();else if(a==="months")_.innerText=r.getFullYear();else{const t=10*Math.floor(r.getFullYear()/10);_.innerText=`${t} - ${t+9}`}this._domEvents.attach(_,"click",this._toggleMode.bind(this)),d.appendChild(_);const o=document.createElement("button");o.classList.add("dhx_cal_datepicker_arrow","scheduler_icon","arrow_right"),d.appendChild(o),h.appendChild(d),this._domEvents.attach(i,"click",this._adjustDate.bind(this,-1)),this._domEvents.attach(o,"click",this._adjustDate.bind(this,1))}render(h){this._domEvents.detachAll(),this.container=h||this.container,this.container.innerHTML="",this.element||(this.element=document.createElement("div"),this.element.classList.add("dhx_cal_datepicker")),this.element.innerHTML="",this.container.appendChild(this.element),this._renderCalendarHeader(this.element);const a=document.createElement("div");a.classList.add("dhx_cal_datepicker_data"),this.element.appendChild(a);const{mode:r}=this.getState();r==="days"?this._renderDayGrid(a):r==="months"?this._renderMonthGrid(a):this._renderYearGrid(a)}_renderDayGridHeader(h){const{date:a}=this.getState(),r=this.scheduler;let d=r.date.week_start(new Date(a));const i=r.date.add(r.date.week_start(new Date(a)),1,"week");h.classList.add("dhx_cal_datepicker_days");const _=r.date.date_to_str("%D");for(;d.valueOf()(p[this.scheduler.date.day_start(new Date(y)).valueOf()]=!0,p),{}),n=document.createElement("div");this._renderDayGridHeader(n),h.appendChild(n);const s=this.scheduler,c=s.date.week_start(s.date.month_start(new Date(a))),u=s.date.month_start(new Date(a)),v=s.date.add(s.date.month_start(new Date(a)),1,"month");let m=s.date.add(s.date.month_start(new Date(a)),1,"month");m.getDay()!==0&&(m=s.date.add(s.date.week_start(m),1,"week"));let l=this._weeksBetween(c,m);i&&l{const y=p.target.closest("[data-cell-date]"),w=new Date(y.getAttribute("data-cell-date"));this.callEvent("onDateClick",[w,p])});f.valueOf()=v.valueOf()&&p.classList.add("dhx_after"),f.getDay()!==0&&f.getDay()!==6||p.classList.add("dhx_cal_datepicker_weekend"),_&&o&&f.valueOf()>=_.valueOf()&&f.valueOf(){const n=document.createElement("div");n.classList.add("dhx_cal_datepicker_month"),a.getMonth()===t.getMonth()&&n.classList.add("dhx_cal_datepicker_current"),n.setAttribute("data-month",t.getMonth()),n.innerHTML=i(t),this._domEvents.attach(n,"click",()=>{const s=new Date(t);this.setState({date:s,mode:"days"})}),r.appendChild(n)}),h.appendChild(r);const _=document.createElement("div");_.classList.add("dhx_cal_datepicker_done");const o=document.createElement("button");o.innerText="Done",o.classList.add("dhx_cal_datepicker_done_btn"),this._domEvents.attach(o,"click",()=>{this.setState({mode:"days"})}),_.appendChild(o),h.appendChild(_)}_renderYearGrid(h){const{date:a}=this.getState(),r=10*Math.floor(a.getFullYear()/10),d=document.createElement("div");d.classList.add("dhx_cal_datepicker_years");for(let o=r-1;o<=r+10;o++){const t=document.createElement("div");t.innerText=o,t.classList.add("dhx_cal_datepicker_year"),t.setAttribute("data-year",o),a.getFullYear()===o&&t.classList.add("dhx_cal_datepicker_current"),this._domEvents.attach(t,"click",()=>{this.setState({date:new Date(o,a.getMonth(),1),mode:"months"})}),d.appendChild(t)}h.appendChild(d);const i=document.createElement("div");i.classList.add("dhx_cal_datepicker_done");const _=document.createElement("button");_.innerText="Done",_.classList.add("dhx_cal_datepicker_done_btn"),this._domEvents.attach(_,"click",()=>{this.setState({mode:"months"})}),i.appendChild(_),h.appendChild(i)}destructor(){this.onStateChangeHandlers=[],this.element&&(this.element.innerHTML="",this.element.remove()),this._domEvents.detachAll(),this.callEvent("onDestroy",[]),this.detachAllEvents(),this.scheduler=null}}function nt(e){const h={version:"7.0.4"};(function(t){var n={agenda:"https://docs.dhtmlx.com/scheduler/agenda_view.html",grid:"https://docs.dhtmlx.com/scheduler/grid_view.html",map:"https://docs.dhtmlx.com/scheduler/map_view.html",unit:"https://docs.dhtmlx.com/scheduler/units_view.html",timeline:"https://docs.dhtmlx.com/scheduler/timeline_view.html",week_agenda:"https://docs.dhtmlx.com/scheduler/weekagenda_view.html",year:"https://docs.dhtmlx.com/scheduler/year_view.html",anythingElse:"https://docs.dhtmlx.com/scheduler/views.html"},s={agenda:"ext/dhtmlxscheduler_agenda_view.js",grid:"ext/dhtmlxscheduler_grid_view.js",map:"ext/dhtmlxscheduler_map_view.js",unit:"ext/dhtmlxscheduler_units.js",timeline:"ext/dhtmlxscheduler_timeline.js, ext/dhtmlxscheduler_treetimeline.js, ext/dhtmlxscheduler_daytimeline.js",week_agenda:"ext/dhtmlxscheduler_week_agenda.js",year:"ext/dhtmlxscheduler_year_view.js",limit:"ext/dhtmlxscheduler_limit.js"};t._commonErrorMessages={unknownView:function(c){var u=s[c]?"You're probably missing "+s[c]+".":"";return"`"+c+"` view is not defined. \nPlease check parameters you pass to `scheduler.init` or `scheduler.setCurrentView` in your code and ensure you've imported appropriate extensions. \nRelated docs: "+(n[c]||n.anythingElse)+` `+(u?u+` `:"")},collapsedContainer:function(c){return`Scheduler container height is set to *100%* but the rendered height is zero and the scheduler is not visible. Make sure that the container has some initial height or use different units. For example:
`}},t.createTimelineView=function(){throw new Error("scheduler.createTimelineView is not implemented. Be sure to add the required extension: "+s.timeline+` -Related docs: `+r.timeline)},t.createUnitsView=function(){throw new Error("scheduler.createUnitsView is not implemented. Be sure to add the required extension: "+s.unit+` -Related docs: `+r.unit)},t.createGridView=function(){throw new Error("scheduler.createGridView is not implemented. Be sure to add the required extension: "+s.grid+` -Related docs: `+r.grid)},t.addMarkedTimespan=function(){throw new Error(`scheduler.addMarkedTimespan is not implemented. Be sure to add the required extension: ext/dhtmlxscheduler_limit.js +Related docs: `+n.timeline)},t.createUnitsView=function(){throw new Error("scheduler.createUnitsView is not implemented. Be sure to add the required extension: "+s.unit+` +Related docs: `+n.unit)},t.createGridView=function(){throw new Error("scheduler.createGridView is not implemented. Be sure to add the required extension: "+s.grid+` +Related docs: `+n.grid)},t.addMarkedTimespan=function(){throw new Error(`scheduler.addMarkedTimespan is not implemented. Be sure to add the required extension: ext/dhtmlxscheduler_limit.js Related docs: https://docs.dhtmlx.com/scheduler/limits.html`)},t.renderCalendar=function(){throw new Error(`scheduler.renderCalendar is not implemented. Be sure to add the required extension: ext/dhtmlxscheduler_minical.js https://docs.dhtmlx.com/scheduler/minicalendar.html`)},t.exportToPNG=function(){throw new Error(["scheduler.exportToPNG is not implemented.","This feature requires an additional module, be sure to check the related doc here https://docs.dhtmlx.com/scheduler/png.html","Licensing info: https://dhtmlx.com/docs/products/dhtmlxScheduler/export.shtml"].join(` `))},t.exportToPDF=function(){throw new Error(["scheduler.exportToPDF is not implemented.","This feature requires an additional module, be sure to check the related doc here https://docs.dhtmlx.com/scheduler/pdf.html","Licensing info: https://dhtmlx.com/docs/products/dhtmlxScheduler/export.shtml"].join(` -`))}})(h),he(h),function(t){W(t),de(t),t._detachDomEvent=function(l,f,g){l.removeEventListener?l.removeEventListener(f,g,!1):l.detachEvent&&l.detachEvent("on"+f,g)},t._init_once=function(){_e(t),t._init_once=function(){}};var r={render:function(l){return t._init_nav_bar(l)}},s={render:function(l){var f=document.createElement("div");return f.className="dhx_cal_header",f}},c={render:function(l){var f=document.createElement("div");return f.className="dhx_cal_data",f}};function u(l){return!!(l.querySelector(".dhx_cal_header")&&l.querySelector(".dhx_cal_data")&&l.querySelector(".dhx_cal_navline"))}t.init=function(l,f,g){if(!this.$destroyed){if(f=f||t._currentDate(),g=g||"week",this._obj&&this.unset_actions(),this._obj=typeof l=="string"?document.getElementById(l):l,this.$container=this._obj,this.$root=this._obj,!this.$container.offsetHeight&&this.$container.offsetWidth&&this.$container.style.height==="100%"&&window.console.error(t._commonErrorMessages.collapsedContainer(),this.$container),this.config.wai_aria_attributes&&this.config.wai_aria_application_role&&this.$container.setAttribute("role","application"),this.config.header||u(this.$container)||(this.config.header=function(p){var y=["day","week","month"];if(p.matrix)for(var w in p.matrix)y.push(w);if(p._props)for(var w in p._props)y.push(w);if(p._grid&&p._grid.names)for(var w in p._grid.names)y.push(w);return["map","agenda","week_agenda","year"].forEach(function(b){p[b+"_view"]&&y.push(b)}),y.concat(["date"]).concat(["prev","today","next"])}(this),window.console.log(["Required DOM elements are missing from the scheduler container and **scheduler.config.header** is not specified.","Using a default header configuration: ","scheduler.config.header = "+JSON.stringify(this.config.header,null,2),"Check this article for the details: https://docs.dhtmlx.com/scheduler/initialization.html"].join(` -`))),this.config.header)this.$container.innerHTML="",this.$container.classList.add("dhx_cal_container"),this.config.header.height&&(this.xy.nav_height=this.config.header.height),this.$container.appendChild(r.render(this.config.header)),this.$container.appendChild(s.render()),this.$container.appendChild(c.render());else if(!u(this.$container))throw new Error(["Required DOM elements are missing from the scheduler container.","Be sure to either specify them manually in the markup: https://docs.dhtmlx.com/scheduler/initialization.html#initializingschedulerviamarkup","Or to use **scheduler.config.header** setting so they could be created automatically: https://docs.dhtmlx.com/scheduler/initialization.html#initializingschedulerviaheaderconfig"].join(` -`));this.config.rtl&&(this.$container.className+=" dhx_cal_container_rtl"),this._skin_init&&t._skin_init(),t.date.init(),this._scroll=!0,this._els=[],this.get_elements(),this.init_templates(),this.set_actions(),this._init_once(),this._init_touch_events(),this.set_sizes(),t.callEvent("onSchedulerReady",[]),t.$initialized=!0,this.setCurrentView(f,g)}},t.xy={min_event_height:20,bar_height:24,scale_width:50,scroll_width:18,scale_height:20,month_scale_height:20,menu_width:25,margin_top:0,margin_left:0,editor_width:140,month_head_height:22,event_header_height:14},t.keys={edit_save:13,edit_cancel:27},t.bind=function(l,f){return l.bind?l.bind(f):function(){return l.apply(f,arguments)}},t.set_sizes=function(){var l=this._x=this._obj.clientWidth-this.xy.margin_left,f=this._table_view?0:this.xy.scale_width+this.xy.scroll_width,g=this.$container.querySelector(".dhx_cal_scale_placeholder");t._is_material_skin()?(g||((g=document.createElement("div")).className="dhx_cal_scale_placeholder",this.$container.insertBefore(g,this._els.dhx_cal_header[0])),g.style.display="block",this.set_xy(g,l,this.xy.scale_height+1,0,this._els.dhx_cal_header[0].offsetTop)):g&&g.parentNode.removeChild(g),this._lightbox&&(t.$container.offsetWidth<1200||this._setLbPosition(document.querySelector(".dhx_cal_light"))),this._data_width=l-f,this._els.dhx_cal_navline[0].style.width=l+"px";const p=this._els.dhx_cal_header[0];this.set_xy(p,this._data_width,this.xy.scale_height),p.style.left="",p.style.right="",this._table_view?this.config.rtl?p.style.right="-1px":p.style.left="-1px":this.config.rtl?p.style.right=`${this.xy.scale_width}px`:p.style.left=`${this.xy.scale_width}px`},t.set_xy=function(l,f,g,p,y){function w(k){let E=k;return isNaN(Number(E))||(E=Math.max(0,E)+"px"),E}var b="left";f!==void 0&&(l.style.width=w(f)),g!==void 0&&(l.style.height=w(g)),arguments.length>3&&(p!==void 0&&(this.config.rtl&&(b="right"),l.style[b]=p+"px"),y!==void 0&&(l.style.top=y+"px"))},t.get_elements=function(){for(var l=this._obj.getElementsByTagName("DIV"),f=0;f500&&t.unselect()},dhx_cal_prev_button:function(){t._click.dhx_cal_next_button(0,-1)},dhx_cal_next_button:function(l,f){var g=1;t.config.rtl&&(f=-f,g=-g),t.setCurrentView(t.date.add(t.date[t._mode+"_start"](new Date(t._date)),f||g,t._mode))},dhx_cal_today_button:function(){t.callEvent("onBeforeTodayDisplayed",[])&&t.setCurrentView(t._currentDate())},dhx_cal_tab:function(){var l=this.getAttribute("data-tab"),f=this.getAttribute("name"),g=l||f.substring(0,f.search("_tab"));t.setCurrentView(t._date,g)},buttons:{delete:function(l){var f=t.locale.labels.confirm_deleting;t._dhtmlx_confirm({message:f,title:t.locale.labels.title_confirm_deleting,callback:function(){t.deleteEvent(l)},config:{ok:t.locale.labels.icon_delete}})},edit:function(l){t.edit(l)},save:function(l){t.editStop(!0)},details:function(l){t.showLightbox(l)},form:function(l){t.showLightbox(l)},cancel:function(l){t.editStop(!1)}}},t._dhtmlx_confirm=function({message:l,title:f,callback:g,config:p}){if(!l)return g();p=p||{};var y={...p,text:l};f&&(y.title=f),g&&(y.callback=function(w){w&&g()}),t.confirm(y)},t.addEventNow=function(l,f,g){var p={};t._isObject(l)&&!t._isDate(l)&&(p=l,l=null);var y=6e4*(this.config.event_duration||this.config.time_step);l||(l=p.start_date||Math.round(t._currentDate().valueOf()/y)*y);var w=new Date(l);if(!f){var b=this.config.first_hour;b>w.getHours()&&(w.setHours(b),l=w.valueOf()),f=l.valueOf()+y}var k=new Date(f);w.valueOf()==k.valueOf()&&k.setTime(k.valueOf()+y),p.start_date=p.start_date||w,p.end_date=p.end_date||k,p.text=p.text||this.locale.labels.new_event,p.id=this._drag_id=p.id||this.uid(),this._drag_mode="new-size",this._loading=!0;var E=this.addEvent(p);return this.callEvent("onEventCreated",[this._drag_id,g]),this._loading=!1,this._drag_event={},this._on_mouse_up(g),E},t._on_dbl_click=function(l,f){if(f=f||l.target||l.srcElement,!this.config.readonly){var g=t._getClassName(f).split(" ")[0];switch(g){case"dhx_scale_holder":case"dhx_scale_holder_now":case"dhx_month_body":case"dhx_wa_day_data":if(!t.config.dblclick_create)break;this.addEventNow(this.getActionData(l).date,null,l);break;case"dhx_cal_event":case"dhx_wa_ev_body":case"dhx_agenda_line":case"dhx_cal_agenda_event_line":case"dhx_grid_event":case"dhx_cal_event_line":case"dhx_cal_event_clear":var p=this._locate_event(f);if(!this.callEvent("onDblClick",[p,l]))return;this.config.details_on_dblclick||this._table_view||!this.getEvent(p)._timed||!this.config.select?this.showLightbox(p):this.edit(p);break;case"dhx_time_block":case"dhx_cal_container":return;default:var y=this["dblclick_"+g];if(y)y.call(this,l);else if(f.parentNode&&f!=this)return t._on_dbl_click(l,f.parentNode)}}},t._get_column_index=function(l){var f=0;if(this._cols){for(var g=0,p=0;g+this._cols[p]=this._cols.length)for(;f>=1&&this._ignores[Math.floor(f)];)f--}return f},t._week_indexes_from_pos=function(l){if(this._cols){var f=this._get_column_index(l.x);return l.x=Math.min(this._cols.length-1,Math.max(0,Math.ceil(f)-1)),l.y=Math.max(0,Math.ceil(60*l.y/(this.config.time_step*this.config.hour_size_px))-1)+this.config.first_hour*(60/this.config.time_step),l}return l},t._mouse_coords=function(l){var f,g=document.body,p=document.documentElement;f=this.$env.isIE||!l.pageX&&!l.pageY?{x:l.clientX+(g.scrollLeft||p.scrollLeft||0)-g.clientLeft,y:l.clientY+(g.scrollTop||p.scrollTop||0)-g.clientTop}:{x:l.pageX,y:l.pageY},this.config.rtl&&this._colsS?(f.x=this.$container.querySelector(".dhx_cal_data").offsetWidth-f.x,f.x+=this.$domHelpers.getAbsoluteLeft(this._obj),this._mode!=="month"&&(f.x-=this.xy.scale_width)):f.x-=this.$domHelpers.getAbsoluteLeft(this._obj)+(this._table_view?0:this.xy.scale_width);var y=this.$container.querySelector(".dhx_cal_data");f.y-=this.$domHelpers.getAbsoluteTop(y)-this._els.dhx_cal_data[0].scrollTop,f.ev=l;var w=this["mouse_"+this._mode];if(w)f=w.call(this,f);else if(this._table_view){var b=this._get_column_index(f.x);if(!this._cols||!this._colsS)return f;var k=0;for(k=1;kf.y);k++);f.y=Math.ceil(24*(Math.max(0,b)+7*Math.max(0,k-1))*60/this.config.time_step),(t._drag_mode||this._mode=="month")&&(f.y=24*(Math.max(0,Math.ceil(b)-1)+7*Math.max(0,k-1))*60/this.config.time_step),this._drag_mode=="move"&&t._ignores_detected&&t.config.preserve_length&&(f._ignores=!0,this._drag_event._event_length||(this._drag_event._event_length=this._get_real_event_length(this._drag_event.start_date,this._drag_event.end_date,{x_step:1,x_unit:"day"}))),f.x=0}else f=this._week_indexes_from_pos(f);return f.timestamp=+new Date,f},t._close_not_saved=function(){if(new Date().valueOf()-(t._new_event||0)>500&&t._edit_id){var l=t.locale.labels.confirm_closing;t._dhtmlx_confirm({message:l,title:t.locale.labels.title_confirm_closing,callback:function(){t.editStop(t.config.positive_closing)}}),l&&(this._drag_id=this._drag_pos=this._drag_mode=null)}},t._correct_shift=function(l,f){return l-6e4*(new Date(t._min_date).getTimezoneOffset()-new Date(l).getTimezoneOffset())*(f?-1:1)},t._is_pos_changed=function(l,f){function g(p,y,w){return Math.abs(p-y)>w}return!l||!this._drag_pos||!!(this._drag_pos.has_moved||!this._drag_pos.timestamp||f.timestamp-this._drag_pos.timestamp>100||g(l.ev.clientX,f.ev.clientX,5)||g(l.ev.clientY,f.ev.clientY,5))},t._correct_drag_start_date=function(l){var f;t.matrix&&(f=t.matrix[t._mode]),f=f||{x_step:1,x_unit:"day"},l=new Date(l);var g=1;return(f._start_correction||f._end_correction)&&(g=60*(f.last_hour||0)-(60*l.getHours()+l.getMinutes())||1),1*l+(t._get_fictional_event_length(l,g,f)-g)},t._correct_drag_end_date=function(l,f){var g;t.matrix&&(g=t.matrix[t._mode]),g=g||{x_step:1,x_unit:"day"};var p=1*l+t._get_fictional_event_length(l,f,g);return new Date(1*p-(t._get_fictional_event_length(p,-1,g,-1)+1))},t._on_mouse_move=function(l){if(this._drag_mode){var f=this._mouse_coords(l);if(this._is_pos_changed(this._drag_pos,f)){var g,p;if(this._edit_id!=this._drag_id&&this._close_not_saved(),!this._drag_mode)return;var y=null;if(this._drag_pos&&!this._drag_pos.has_moved&&((y=this._drag_pos).has_moved=!0),this._drag_pos=f,this._drag_pos.has_moved=!0,this._drag_mode=="create"){if(y&&(f=y),this._close_not_saved(),this.unselect(this._select_id),this._loading=!0,g=this._get_date_from_pos(f).valueOf(),!this._drag_start)return this.callEvent("onBeforeEventCreated",[l,this._drag_id])?(this._loading=!1,void(this._drag_start=g)):void(this._loading=!1);p=g,this._drag_start;var w=new Date(this._drag_start),b=new Date(p);this._mode!="day"&&this._mode!="week"||w.getHours()!=b.getHours()||w.getMinutes()!=b.getMinutes()||(b=new Date(this._drag_start+1e3)),this._drag_id=this.uid(),this.addEvent(w,b,this.locale.labels.new_event,this._drag_id,f.fields),this.callEvent("onEventCreated",[this._drag_id,l]),this._loading=!1,this._drag_mode="new-size"}var k,E=this.config.time_step,D=this.getEvent(this._drag_id);if(t.matrix&&(k=t.matrix[t._mode]),k=k||{x_step:1,x_unit:"day"},this._drag_mode=="move")g=this._min_date.valueOf()+6e4*(f.y*this.config.time_step+24*f.x*60),!f.custom&&this._table_view&&(g+=1e3*this.date.time_part(D.start_date)),!this._table_view&&this._dragEventBody&&this._drag_event._move_event_shift===void 0&&(this._drag_event._move_event_shift=g-D.start_date),this._drag_event._move_event_shift&&(g-=this._drag_event._move_event_shift),g=this._correct_shift(g),f._ignores&&this.config.preserve_length&&this._table_view&&k?(g=t._correct_drag_start_date(g),p=t._correct_drag_end_date(g,this._drag_event._event_length)):p=D.end_date.valueOf()-(D.start_date.valueOf()-g);else{if(g=D.start_date.valueOf(),p=D.end_date.valueOf(),this._table_view){var x=this._min_date.valueOf()+f.y*this.config.time_step*6e4+(f.custom?0:864e5);if(this._mode=="month")if(x=this._correct_shift(x,!1),this._drag_from_start){var S=864e5;x<=t.date.date_part(new Date(p+S-1)).valueOf()&&(g=x-S)}else p=x;else this.config.preserve_length?f.resize_from_start?g=t._correct_drag_start_date(x):p=t._correct_drag_end_date(x,0):f.resize_from_start?g=x:p=x}else{var N=this.date.date_part(new Date(D.end_date.valueOf()-1)).valueOf(),M=new Date(N),A=this.config.first_hour,C=60/E*(this.config.last_hour-A);this.config.time_step=1;var T=this._mouse_coords(l);this.config.time_step=E;var O=f.y*E*6e4,L=Math.min(f.y+1,C)*E*6e4,$=6e4*T.y;p=Math.abs(O-$)>Math.abs(L-$)?N+L:N+O,p+=6e4*(new Date(p).getTimezoneOffset()-M.getTimezoneOffset()),this._els.dhx_cal_data[0].style.cursor="s-resize",this._mode!="week"&&this._mode!="day"||(p=this._correct_shift(p))}if(this._drag_mode=="new-size")if(p<=this._drag_start){var V=f.shift||(this._table_view&&!f.custom?864e5:0);g=p-(f.shift?0:V),p=this._drag_start+(V||6e4*E)}else g=this._drag_start;else p<=g&&(p=g+6e4*E)}var z=new Date(p-1),H=new Date(g);if(this._drag_mode=="move"&&t.config.limit_drag_out&&(+H<+t._min_date||+p>+t._max_date)){if(+D.start_date<+t._min_date||+D.end_date>+t._max_date)H=new Date(D.start_date),p=new Date(D.end_date);else{var j=p-H;+H<+t._min_date?(H=new Date(t._min_date),f._ignores&&this.config.preserve_length&&this._table_view?(H=new Date(t._correct_drag_start_date(H)),k._start_correction&&(H=new Date(H.valueOf()+k._start_correction)),p=new Date(1*H+this._get_fictional_event_length(H,this._drag_event._event_length,k))):p=new Date(+H+j)):(p=new Date(t._max_date),f._ignores&&this.config.preserve_length&&this._table_view?(k._end_correction&&(p=new Date(p.valueOf()-k._end_correction)),p=new Date(1*p-this._get_fictional_event_length(p,0,k,!0)),H=new Date(1*p-this._get_fictional_event_length(p,this._drag_event._event_length,k,!0)),this._ignores_detected&&(H=t.date.add(H,k.x_step,k.x_unit),p=new Date(1*p-this._get_fictional_event_length(p,0,k,!0)),p=t.date.add(p,k.x_step,k.x_unit))):H=new Date(+p-j))}z=new Date(p-1)}if(!this._table_view&&this._dragEventBody&&!t.config.all_timed&&(!t._get_section_view()&&f.x!=this._get_event_sday({start_date:new Date(g),end_date:new Date(g)})||new Date(g).getHours()=this.config.last_hour)||(j=p-H,S=this._min_date.valueOf()+24*f.x*60*6e4,(p=t.date.date_part(new Date(S))).setHours(this.config.last_hour),z=new Date(p-1),this._drag_mode=="move"&&(H=new Date(+p-j))),this._table_view||z.getDate()==H.getDate()&&z.getHours()=y?T+=" dhx_after":g.valueOf()==b.valueOf()&&(T+=" dhx_now"),this._ignores_detected&&this._ignores[A]&&(T+=" dhx_scale_ignore"),C.className=T+" "+this.templates.month_date_class(g,b),C.setAttribute("data-cell-date",t.templates.format_date(g));var O="dhx_month_body",L="dhx_month_head";if(A===0&&this.config.left_border&&(O+=" dhx_month_body_border",L+=" dhx_month_head_border"),this._ignores_detected&&this._ignores[A])C.appendChild(document.createElement("div")),C.appendChild(document.createElement("div"));else{C.style.width=k[A],this._waiAria.monthCellAttr(C,g);var $=document.createElement("div");$.style.height=t.xy.month_head_height+"px",$.className=L,$.innerHTML=this.templates.month_day(g),C.appendChild($);var V=document.createElement("div");V.className=O,C.appendChild(V)}var z=g.getDate();(g=this.date.add(g,1,"day")).getDate()-z>1&&(g=new Date(g.getFullYear(),g.getMonth(),z+1,12,0))}t._colsS.heights[E]=S,S+=x(E)}return this._min_date=w,this._max_date=g,l.innerHTML="",l.appendChild(N),this._scales={},l.querySelectorAll("[data-cell-date]").forEach(H=>{const j=t.templates.parse_date(H.getAttribute("data-cell-date")),U=H.querySelector(".dhx_month_body");this._scales[+j]=U,this.callEvent("onScaleAdd",[this._scales[+j],j])}),this._max_date},t._reset_month_scale=function(l,f,g,p){var y=t.date.add(f,1,"month"),w=t._currentDate();this.date.date_part(w),this.date.date_part(g),p=p||Math.ceil(Math.round((y.valueOf()-g.valueOf())/864e5)/7);var b=Math.floor(l.clientHeight/p)-this.xy.month_head_height;return this._colsS.height=b+this.xy.month_head_height,this._colsS.heights=[],t._render_month_scale(l,f,g,p)},t.getView=function(l){return l||(l=t.getState().mode),t.matrix&&t.matrix[l]?t.matrix[l]:t._props&&t._props[l]?t._props[l]:null},t.getLabel=function(l,f){for(var g=this.config.lightbox.sections,p=0;pt.getState().max_date.valueOf()&&(p+=m(f,t.getState().max_date))):p=Math.round(y/60/60/1e3/24);for(var k=!0;bC.valueOf()&&(D+=S-C),S.valueOf()>A.valueOf()?D+=g._start_correction:D+=60*S.getHours()*60*1e3+60*S.getMinutes()*1e3,x.valueOf()`,"gm"),s=new RegExp(" +","gm");function c(l){return(l+"").replace(r," ").replace(s," ")}var u=new RegExp("'","gm");function v(l){return(l+"").replace(u,"'")}for(var m in t._waiAria={getAttributeString:function(l){var f=[" "];for(var g in l)if(typeof l[g]!="function"&&typeof l[g]!="object"){var p=v(c(l[g]));f.push(g+"='"+p+"'")}return f.push(" "),f.join(" ")},setAttributes:function(l,f){for(var g in f)l.setAttribute(g,c(f[g]));return l},labelAttr:function(l,f){return this.setAttributes(l,{"aria-label":f})},label:function(l){return t._waiAria.getAttributeString({"aria-label":l})},hourScaleAttr:function(l,f){this.labelAttr(l,f)},monthCellAttr:function(l,f){this.labelAttr(l,t.templates.day_date(f))},navBarDateAttr:function(l,f){this.labelAttr(l,f)},dayHeaderAttr:function(l,f){this.labelAttr(l,f)},dayColumnAttr:function(l,f){this.dayHeaderAttr(l,t.templates.day_date(f))},headerButtonsAttributes:function(l,f){return this.setAttributes(l,{role:"button","aria-label":f})},headerToggleState:function(l,f){return this.setAttributes(l,{"aria-pressed":f?"true":"false"})},getHeaderCellAttr:function(l){return t._waiAria.getAttributeString({"aria-label":l})},eventAttr:function(l,f){this._eventCommonAttr(l,f)},_eventCommonAttr:function(l,f){f.setAttribute("aria-label",c(t.templates.event_text(l.start_date,l.end_date,l))),t.config.readonly&&f.setAttribute("aria-readonly",!0),l.$dataprocessor_class&&f.setAttribute("aria-busy",!0),f.setAttribute("aria-selected",t.getState().select_id==l.id?"true":"false")},setEventBarAttr:function(l,f){this._eventCommonAttr(l,f)},_getAttributes:function(l,f){var g={setAttribute:function(p,y){this[p]=y}};return l.apply(this,[f,g]),g},eventBarAttrString:function(l){return this.getAttributeString(this._getAttributes(this.setEventBarAttr,l))},agendaHeadAttrString:function(){return this.getAttributeString({role:"row"})},agendaHeadDateString:function(l){return this.getAttributeString({role:"columnheader","aria-label":l})},agendaHeadDescriptionString:function(l){return this.agendaHeadDateString(l)},agendaDataAttrString:function(){return this.getAttributeString({role:"grid"})},agendaEventAttrString:function(l){var f=this._getAttributes(this._eventCommonAttr,l);return f.role="row",this.getAttributeString(f)},agendaDetailsBtnString:function(){return this.getAttributeString({role:"button","aria-label":t.locale.labels.icon_details})},gridAttrString:function(){return this.getAttributeString({role:"grid"})},gridRowAttrString:function(l){return this.agendaEventAttrString(l)},gridCellAttrString:function(l,f,g){return this.getAttributeString({role:"gridcell","aria-label":[f.label===void 0?f.id:f.label,": ",g]})},mapAttrString:function(){return this.gridAttrString()},mapRowAttrString:function(l){return this.gridRowAttrString(l)},mapDetailsBtnString:function(){return this.agendaDetailsBtnString()},minicalHeader:function(l,f){this.setAttributes(l,{id:f+"","aria-live":"assertice","aria-atomic":"true"})},minicalGrid:function(l,f){this.setAttributes(l,{"aria-labelledby":f+"",role:"grid"})},minicalRow:function(l){this.setAttributes(l,{role:"row"})},minicalDayCell:function(l,f){var g=f.valueOf()=t._min_date.valueOf();this.setAttributes(l,{role:"gridcell","aria-label":t.templates.day_date(f),"aria-selected":g?"true":"false"})},minicalHeadCell:function(l){this.setAttributes(l,{role:"columnheader"})},weekAgendaDayCell:function(l,f){var g=l.querySelector(".dhx_wa_scale_bar"),p=l.querySelector(".dhx_wa_day_data"),y=t.uid()+"";this.setAttributes(g,{id:y}),this.setAttributes(p,{"aria-labelledby":y})},weekAgendaEvent:function(l,f){this.eventAttr(f,l)},lightboxHiddenAttr:function(l){l.setAttribute("aria-hidden","true")},lightboxVisibleAttr:function(l){l.setAttribute("aria-hidden","false")},lightboxSectionButtonAttrString:function(l){return this.getAttributeString({role:"button","aria-label":l,tabindex:"0"})},yearHeader:function(l,f){this.setAttributes(l,{id:f+""})},yearGrid:function(l,f){this.minicalGrid(l,f)},yearHeadCell:function(l){return this.minicalHeadCell(l)},yearRow:function(l){return this.minicalRow(l)},yearDayCell:function(l){this.setAttributes(l,{role:"gridcell"})},lightboxAttr:function(l){l.setAttribute("role","dialog"),l.setAttribute("aria-hidden","true"),l.firstChild.setAttribute("role","heading")},lightboxButtonAttrString:function(l){return this.getAttributeString({role:"button","aria-label":t.locale.labels[l],tabindex:"0"})},eventMenuAttrString:function(l){return this.getAttributeString({role:"button","aria-label":t.locale.labels[l]})},lightboxHeader:function(l,f){l.setAttribute("aria-label",f)},lightboxSelectAttrString:function(l){var f="";switch(l){case"%Y":f=t.locale.labels.year;break;case"%m":f=t.locale.labels.month;break;case"%d":f=t.locale.labels.day;break;case"%H:%i":f=t.locale.labels.hour+" "+t.locale.labels.minute}return t._waiAria.getAttributeString({"aria-label":f})},messageButtonAttrString:function(l){return"tabindex='0' role='button' aria-label='"+l+"'"},messageInfoAttr:function(l){l.setAttribute("role","alert")},messageModalAttr:function(l,f){l.setAttribute("role","dialog"),f&&l.setAttribute("aria-labelledby",f)},quickInfoAttr:function(l){l.setAttribute("role","dialog")},quickInfoHeaderAttrString:function(){return" role='heading' "},quickInfoHeader:function(l,f){l.setAttribute("aria-label",f)},quickInfoButtonAttrString:function(l){return t._waiAria.getAttributeString({role:"button","aria-label":l,tabindex:"0"})},tooltipAttr:function(l){l.setAttribute("role","tooltip")},tooltipVisibleAttr:function(l){l.setAttribute("aria-hidden","false")},tooltipHiddenAttr:function(l){l.setAttribute("aria-hidden","true")}},t._waiAria)t._waiAria[m]=function(l){return function(){return t.config.wai_aria_attributes?l.apply(this,arguments):" "}}(t._waiAria[m])})()}(h),h.utils=B,h.$domHelpers=R,h.utils.dom=R,h.uid=B.uid,h.mixin=B.mixin,h.defined=B.defined,h.assert=function(t){return function(r,s){r||t.config.show_errors&&t.callEvent("onError",[s])!==!1&&(t.message?t.message({type:"error",text:s,expire:-1}):console.log(s))}}(h),h.copy=B.copy,h._createDatePicker=function(t,r){return new at(h,t,r)},h._getFocusableNodes=R.getFocusableNodes,h._getClassName=R.getClassName,h._locate_css=R.locateCss;const a=De(h);var i,d,n;h.utils.mixin(h,a),h.env=h.$env=ye,h.Promise=window.Promise,function(t){t.destructor=function(){for(var r in t.callEvent("onDestroy",[]),this.clearAll(),this.$container&&(this.$container.innerHTML=""),this._eventRemoveAll&&this._eventRemoveAll(),this.resetLightbox&&this.resetLightbox(),this._dp&&this._dp.destructor&&this._dp.destructor(),this.detachAllEvents(),this)r.indexOf("$")===0&&delete this[r];t.$destroyed=!0}}(h),function(t){function r(s,c){var u={method:s};if(c.length===0)throw new Error("Arguments list of query is wrong.");if(c.length===1)return typeof c[0]=="string"?(u.url=c[0],u.async=!0):(u.url=c[0].url,u.async=c[0].async||!0,u.callback=c[0].callback,u.headers=c[0].headers),c[0].data?typeof c[0].data!="string"?u.data=X(c[0].data):u.data=c[0].data:u.data="",u;switch(u.url=c[0],s){case"GET":case"DELETE":u.callback=c[1],u.headers=c[2];break;case"POST":case"PUT":c[1]?typeof c[1]!="string"?u.data=X(c[1]):u.data=c[1]:u.data="",u.callback=c[2],u.headers=c[3]}return u}t.Promise=window.Promise,t.ajax={cache:!0,method:"get",serializeRequestParams:X,parse:function(s){return typeof s!="string"?s:(s=s.replace(/^[\s]+/,""),typeof DOMParser>"u"||t.$env.isIE?window.ActiveXObject!==void 0&&((c=new window.ActiveXObject("Microsoft.XMLDOM")).async="false",c.loadXML(s)):c=new DOMParser().parseFromString(s,"text/xml"),c);var c},xmltop:function(s,c,u){if(c.status===void 0||c.status<400){var v=c.responseXML?c.responseXML||c:this.parse(c.responseText||c);if(v&&v.documentElement!==null&&!v.getElementsByTagName("parsererror").length)return v.getElementsByTagName(s)[0]}return u!==-1&&t.callEvent("onLoadXMLError",["Incorrect XML",arguments[1],u]),document.createElement("DIV")},xpath:function(s,c){if(c.nodeName||(c=c.responseXML||c),t.$env.isIE)return c.selectNodes(s)||[];for(var u,v=[],m=(c.ownerDocument||c).evaluate(s,c,null,XPathResult.ANY_TYPE,null);u=m.iterateNext();)v.push(u);return v},query:function(s){return this._call(s.method||"GET",s.url,s.data||"",s.async||!0,s.callback,s.headers)},get:function(s,c,u){var v=r("GET",arguments);return this.query(v)},getSync:function(s,c){var u=r("GET",arguments);return u.async=!1,this.query(u)},put:function(s,c,u,v){var m=r("PUT",arguments);return this.query(m)},del:function(s,c,u){var v=r("DELETE",arguments);return this.query(v)},post:function(s,c,u,v){arguments.length==1?c="":arguments.length==2&&typeof c=="function"&&(u=c,c="");var m=r("POST",arguments);return this.query(m)},postSync:function(s,c,u){c=c===null?"":String(c);var v=r("POST",arguments);return v.async=!1,this.query(v)},_call:function(s,c,u,v,m,l){return new t.Promise((function(f,g){var p=typeof XMLHttpRequest===void 0||t.$env.isIE?new window.ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest,y=navigator.userAgent.match(/AppleWebKit/)!==null&&navigator.userAgent.match(/Qt/)!==null&&navigator.userAgent.match(/Safari/)!==null;if(v&&p.addEventListener("readystatechange",function(){if(p.readyState==4||y&&p.readyState==3){if((p.status!=200||p.responseText==="")&&!t.callEvent("onAjaxError",[p]))return;setTimeout(function(){typeof m=="function"&&m.apply(window,[{xmlDoc:p,filePath:c}]),f(p),typeof m=="function"&&(m=null,p=null)},0)}}),s!="GET"||this.cache||(c+=(c.indexOf("?")>=0?"&":"?")+"dhxr"+new Date().getTime()+"=1"),p.open(s,c,v),l)for(var w in l)p.setRequestHeader(w,l[w]);else s.toUpperCase()=="POST"||s=="PUT"||s=="DELETE"?p.setRequestHeader("Content-Type","application/x-www-form-urlencoded"):s=="GET"&&(u=null);if(p.setRequestHeader("X-Requested-With","XMLHttpRequest"),p.send(u),!v)return{xmlDoc:p,filePath:c}}).bind(this))},urlSeparator:function(s){return s.indexOf("?")!=-1?"&":"?"}},t.$ajax=t.ajax}(h),be(h),function(t){t.config={default_date:"%j %M %Y",month_date:"%F %Y",load_date:"%Y-%m-%d",week_date:"%l",day_date:"%D %j",hour_date:"%H:%i",month_day:"%d",date_format:"%Y-%m-%d %H:%i",api_date:"%d-%m-%Y %H:%i",parse_exact_format:!1,preserve_length:!0,time_step:5,displayed_event_color:"#ff4a4a",displayed_event_text_color:"#ffef80",wide_form:0,day_column_padding:8,use_select_menu_space:!0,fix_tab_position:!0,start_on_monday:!0,first_hour:0,last_hour:24,readonly:!1,drag_resize:!0,drag_move:!0,drag_create:!0,drag_event_body:!0,dblclick_create:!0,details_on_dblclick:!0,edit_on_create:!0,details_on_create:!0,header:null,hour_size_px:44,resize_month_events:!1,resize_month_timed:!1,responsive_lightbox:!1,separate_short_events:!0,rtl:!1,cascade_event_display:!1,cascade_event_count:4,cascade_event_margin:30,multi_day:!0,multi_day_height_limit:200,drag_lightbox:!0,preserve_scroll:!0,select:!0,server_utc:!1,touch:!0,touch_tip:!0,touch_drag:500,touch_swipe_dates:!1,quick_info_detached:!0,positive_closing:!1,drag_highlight:!0,limit_drag_out:!1,icons_edit:["icon_save","icon_cancel"],icons_select:["icon_details","icon_edit","icon_delete"],buttons_left:["dhx_save_btn","dhx_cancel_btn"],buttons_right:["dhx_delete_btn"],lightbox:{sections:[{name:"description",map_to:"text",type:"textarea",focus:!0},{name:"time",height:72,type:"time",map_to:"auto"}]},highlight_displayed_event:!0,left_border:!1,ajax_error:"alert",delay_render:0,timeline_swap_resize:!0,wai_aria_attributes:!0,wai_aria_application_role:!0,csp:"auto",event_attribute:"data-event-id",show_errors:!0},t.config.buttons_left.$initial=t.config.buttons_left.join(),t.config.buttons_right.$initial=t.config.buttons_right.join(),t._helpers={parseDate:function(r){return(t.templates.xml_date||t.templates.parse_date)(r)},formatDate:function(r){return(t.templates.xml_format||t.templates.format_date)(r)}},t.templates={},t.init_templates=function(){var r=t.date.date_to_str,s=t.config;(function(c,u){for(var v in u)c[v]||(c[v]=u[v])})(t.templates,{day_date:r(s.default_date),month_date:r(s.month_date),week_date:function(c,u){return s.rtl?t.templates.day_date(t.date.add(u,-1,"day"))+" – "+t.templates.day_date(c):t.templates.day_date(c)+" – "+t.templates.day_date(t.date.add(u,-1,"day"))},day_scale_date:r(s.default_date),time_slot_text:function(c){return""},time_slot_class:function(c){return""},month_scale_date:r(s.week_date),week_scale_date:r(s.day_date),hour_scale:r(s.hour_date),time_picker:r(s.hour_date),event_date:r(s.hour_date),month_day:r(s.month_day),load_format:r(s.load_date),format_date:r(s.date_format,s.server_utc),parse_date:t.date.str_to_date(s.date_format,s.server_utc),api_date:t.date.str_to_date(s.api_date,!1,!1),event_header:function(c,u,v){return v._mode==="small"||v._mode==="smallest"?t.templates.event_date(c):t.templates.event_date(c)+" - "+t.templates.event_date(u)},event_text:function(c,u,v){return v.text},event_class:function(c,u,v){return""},month_date_class:function(c){return""},week_date_class:function(c){return""},event_bar_date:function(c,u,v){return t.templates.event_date(c)},event_bar_text:function(c,u,v){return v.text},month_events_link:function(c,u){return"View more("+u+" events)"},drag_marker_class:function(c,u,v){return""},drag_marker_content:function(c,u,v){return""},tooltip_date_format:t.date.date_to_str("%Y-%m-%d %H:%i"),tooltip_text:function(c,u,v){return"Event: "+v.text+"
Start date: "+t.templates.tooltip_date_format(c)+"
End date: "+t.templates.tooltip_date_format(u)},calendar_month:r("%F %Y"),calendar_scale_date:r("%D"),calendar_date:r("%d"),calendar_time:r("%d-%m-%Y")}),this.callEvent("onTemplatesReady",[])}}(h),function(t){t._events={},t.clearAll=function(){this._events={},this._loaded={},this._edit_id=null,this._select_id=null,this._drag_id=null,this._drag_mode=null,this._drag_pos=null,this._new_event=null,this.clear_view(),this.callEvent("onClearAll",[])},t.addEvent=function(r,s,c,u,v){if(!arguments.length)return this.addEventNow();var m=r;arguments.length!=1&&((m=v||{}).start_date=r,m.end_date=s,m.text=c,m.id=u),m.id=m.id||t.uid(),m.text=m.text||"",typeof m.start_date=="string"&&(m.start_date=this.templates.api_date(m.start_date)),typeof m.end_date=="string"&&(m.end_date=this.templates.api_date(m.end_date));var l=6e4*(this.config.event_duration||this.config.time_step);m.start_date.valueOf()==m.end_date.valueOf()&&m.end_date.setTime(m.end_date.valueOf()+l),m.start_date.setMilliseconds(0),m.end_date.setMilliseconds(0),m._timed=this.isOneDayEvent(m);var f=!this._events[m.id];return this._events[m.id]=m,this.event_updated(m),this._loading||this.callEvent(f?"onEventAdded":"onEventChanged",[m.id,m]),m.id},t.deleteEvent=function(r,s){var c=this._events[r];(s||this.callEvent("onBeforeEventDelete",[r,c])&&this.callEvent("onConfirmedBeforeEventDelete",[r,c]))&&(c&&(t.getState().select_id==r&&t.unselect(),delete this._events[r],this.event_updated(c),this._drag_id==c.id&&(this._drag_id=null,this._drag_mode=null,this._drag_pos=null)),this.callEvent("onEventDeleted",[r,c]))},t.getEvent=function(r){return this._events[r]},t.setEvent=function(r,s){s.id||(s.id=r),this._events[r]=s},t.for_rendered=function(r,s){for(var c=this._rendered.length-1;c>=0;c--)this._rendered[c].getAttribute(this.config.event_attribute)==r&&s(this._rendered[c],c)},t.changeEventId=function(r,s){if(r!=s){var c=this._events[r];c&&(c.id=s,this._events[s]=c,delete this._events[r]),this.for_rendered(r,function(u){u.setAttribute("event_id",s),u.setAttribute(t.config.event_attribute,s)}),this._select_id==r&&(this._select_id=s),this._edit_id==r&&(this._edit_id=s),this.callEvent("onEventIdChange",[r,s])}},function(){for(var r=["text","Text","start_date","StartDate","end_date","EndDate"],s=function(v){return function(m){return t.getEvent(m)[v]}},c=function(v){return function(m,l){var f=t.getEvent(m);f[v]=l,f._changed=!0,f._timed=this.isOneDayEvent(f),t.event_updated(f,!0)}},u=0;uu||c<=v)&&(s>=u||s24-(this.config.last_hour-this.config.first_hour)||sv))}return!1},t.isOneDayEvent=function(r){var s=new Date(r.end_date.valueOf()-1);return r.start_date.getFullYear()===s.getFullYear()&&r.start_date.getMonth()===s.getMonth()&&r.start_date.getDate()===s.getDate()&&r.end_date.valueOf()-r.start_date.valueOf()<864e5},t.get_visible_events=function(r){var s=[];for(var c in this._events)this.is_visible_events(this._events[c])&&(r&&!this._events[c]._timed||this.filter_event(c,this._events[c])&&s.push(this._events[c]));return s},t.filter_event=function(r,s){var c=this["filter_"+this._mode];return!c||c(r,s)},t._is_main_area_event=function(r){return!!r._timed},t.render_view_data=function(r,s){var c=!1;if(!r){if(c=!0,this._not_render)return void(this._render_wait=!0);this._render_wait=!1,this.clear_view(),r=this.get_visible_events(!(this._table_view||this.config.multi_day))}for(var u=0,v=r.length;up){var y=p;1*this.config.max_month_events!==this.config.max_month_events||v[f]<=this.config.max_month_events?y=v[f]*c:(this.config.max_month_events+1)*c>p&&(y=(this.config.max_month_events+1)*c),l[f].style.height=y+this.xy.month_head_height+"px"}v[f]=(v[f-1]||0)+t._get_first_visible_cell(g).offsetHeight}v.unshift(0);const M=this.$container.querySelector(".dhx_cal_data");if(M.offsetHeightM.id?1:-1:N.start_date>M.start_date?1:-1});var c=[],u=[];this._min_mapped_duration=Math.floor(60*this.xy.min_event_height/this.config.hour_size_px);for(var v=0;vS&&(S=y[E]._sorder);m._sorder=S+1,m._inner=!1}else m._sorder=0;y.splice(b,b==y.length?0:1,m),y.length>(y.max_count||0)?(y.max_count=y.length,m._count=y.length):m._count=m._count?m._count:1}(g=this.config.last_hour)&&(u.push(m),r[v]=m=this._copy_event(m),g=this.config.last_hour&&(m.end_date.setMinutes(0),m.end_date.setHours(this.config.last_hour)),m.start_date>m.end_date||g==this.config.last_hour)&&(r.splice(v,1),v--)}}if(!s){for(v=0;vc.id?1:-1:s.start_date>c.start_date?1:-1})},t._is_any_multiday_cell_visible=function(r,s,c){var u=this._cols.length,v=!1,m=r,l=!0,f=new Date(s);for(t.date.day_start(new Date(s)).valueOf()!=s.valueOf()&&(f=t.date.day_start(f),f=t.date.add(f,1,"day"));mthis._max_date&&(w.last_chunk=!1,k=this._max_date);var E=this.locate_holder_day(b,!1,p);if(p._sday=E%l,!this._ignores[p._sday]||!p._timed){var D=this.locate_holder_day(k,!0,p)||l;if(p._eday=D%l||l,p._length=D-E,p._sweek=Math.floor((this._correct_shift(b.valueOf(),1)-this._min_date.valueOf())/(864e5*l)),t._is_any_multiday_cell_visible(b,k,p)){var x,S=v[p._sweek];for(x=0;x0?2:1);if(r._inner||(w*=p-y),this.config.cascade_event_display){var k=this.config.cascade_event_count,E=this.config.cascade_event_margin;b=y%k*E;var D=r._inner?(p-y-1)%k*E/2:0;w=Math.floor(c-v-b-D)}r._mode=g<30?"smallest":g<42?"small":null;var x=this._render_v_bar(r,v+b,f,w,g,r._text_style,t.templates.event_header(r.start_date,r.end_date,r),t.templates.event_text(r.start_date,r.end_date,r));if(r._mode==="smallest"?x.classList.add("dhx_cal_event--xsmall"):r._mode==="small"&&x.classList.add("dhx_cal_event--small"),this._waiAria.eventAttr(r,x),this._rendered.push(x),s.appendChild(x),b=b+parseInt(this.config.rtl?m.style.right:m.style.left,10)+v,this._edit_id==r.id){x.style.zIndex=1,w=Math.max(w,t.xy.editor_width),(x=document.createElement("div")).setAttribute("event_id",r.id),x.setAttribute(this.config.event_attribute,r.id),this._waiAria.eventAttr(r,x),x.className="dhx_cal_event dhx_cal_editor",this.config.rtl&&b++,this.set_xy(x,w,g,b,f),r.color&&x.style.setProperty("--dhx-scheduler-event-background",r.color);var S=t.templates.event_class(r.start_date,r.end_date,r);S&&(x.className+=" "+S);var N=document.createElement("div");N.style.cssText+="overflow:hidden;height:100%",x.appendChild(N),this._els.dhx_cal_data[0].appendChild(x),this._rendered.push(x),N.innerHTML="",this._editor=N.querySelector("textarea"),t.event(this._editor,"keydown",function(L){if(L.shiftKey)return!0;var $=L.keyCode;$==t.keys.edit_save&&t.editStop(!0),$==t.keys.edit_cancel&&t.editStop(!1),$!=t.keys.edit_save&&$!=t.keys.edit_cancel||L.preventDefault&&L.preventDefault()}),t.event(this._editor,"selectstart",function(L){return L.cancelBubble=!0,!0}),t._focus(this._editor,!0),this._els.dhx_cal_data[0].scrollLeft=0}if(this.xy.menu_width!==0&&this._select_id==r.id){this.config.cascade_event_display&&this._drag_mode&&(x.style.zIndex=1);for(var M,A=this.config["icons_"+(this._edit_id==r.id?"edit":"select")],C="",T=0;T
`}var O=this._render_v_bar(r,b-u-1,f,u,null,"","
",C,!0);r.color&&O.style.setProperty("--dhx-scheduler-event-background",r.color),r.textColor&&O.style.setProperty("--dhx-scheduler-event-color",r.textColor),this._els.dhx_cal_data[0].appendChild(O),this._rendered.push(O)}this.config.drag_highlight&&this._drag_id==r.id&&this.highlightEventPosition(r)}}},t._render_v_bar=function(r,s,c,u,v,m,l,f,g){var p=document.createElement("div"),y=r.id,w=g?"dhx_cal_event dhx_cal_select_menu":"dhx_cal_event",b=t.getState();b.drag_id==r.id&&(w+=" dhx_cal_event_drag"),b.select_id==r.id&&(w+=" dhx_cal_event_selected");var k=t.templates.event_class(r.start_date,r.end_date,r);k&&(w=w+" "+k),this.config.cascade_event_display&&(w+=" dhx_cal_event_cascade");var E=u,D='
';p.innerHTML=D;var x=p.cloneNode(!0).firstChild;if(!g&&t.renderEvent(x,r,u,v,l,f))return r.color&&x.style.setProperty("--dhx-scheduler-event-background",r.color),r.textColor&&x.style.setProperty("--dhx-scheduler-event-color",r.textColor),x;x=p.firstChild,r.color&&x.style.setProperty("--dhx-scheduler-event-background",r.color),r.textColor&&x.style.setProperty("--dhx-scheduler-event-color",r.textColor);var S='
 
';S+='
'+l+"
",S+='
'+f+"
";var N="dhx_event_resize dhx_footer";return(g||r._drag_resize===!1)&&(N="dhx_resize_denied "+N),S+='
',x.innerHTML=S,x},t.renderEvent=function(){return!1},t.locate_holder=function(r){return this._mode=="day"?this._els.dhx_cal_data[0].firstChild:this._els.dhx_cal_data[0].childNodes[r]},t.locate_holder_day=function(r,s){var c=Math.floor((this._correct_shift(r,1)-this._min_date)/864e5);return s&&this.date.time_part(r)&&c++,c},t._get_dnd_order=function(r,s,c){if(!this._drag_event)return r;this._drag_event._orig_sorder?r=this._drag_event._orig_sorder:this._drag_event._orig_sorder=r;for(var u=s*r;u+s>c;)r--,u-=s;return Math.max(r,0)},t._get_event_bar_pos=function(r){var s=this.config.rtl,c=this._colsS,u=c[r._sday],v=c[r._eday];s&&(u=c[c.col_length]-c[r._eday]+c[0],v=c[c.col_length]-c[r._sday]+c[0]),v==u&&(v=c[r._eday+1]);var m=this.xy.bar_height,l=r._sorder;if(r.id==this._drag_id){var f=c.heights[r._sweek+1]-c.heights[r._sweek]-this.xy.month_head_height;l=t._get_dnd_order(l,m,f)}var g=l*m;return{x:u,x2:v,y:c.heights[r._sweek]+(c.height?this.xy.month_scale_height+2:2)+g}},t.render_event_bar=function(r){var s=this._rendered_location,c=this._get_event_bar_pos(r),u=c.y,v=c.x,m=c.x2,l="";if(m){var f=t.config.resize_month_events&&this._mode=="month"&&(!r._timed||t.config.resize_month_timed),g=document.createElement("div"),p=r.hasOwnProperty("_first_chunk")&&r._first_chunk,y=r.hasOwnProperty("_last_chunk")&&r._last_chunk,w=f&&(r._timed||p),b=f&&(r._timed||y),k=!0,E="dhx_cal_event_clear";r._timed&&!f||(k=!1,E="dhx_cal_event_line"),p&&(E+=" dhx_cal_event_line_start"),y&&(E+=" dhx_cal_event_line_end"),w&&(l+="
"),b&&(l+="
");var D=t.templates.event_class(r.start_date,r.end_date,r);D&&(E+=" "+D);var x=r.color?"--dhx-scheduler-event-background:"+r.color+";":"",S=r.textColor?"--dhx-scheduler-event-color:"+r.textColor+";":"",N=["position:absolute","top:"+u+"px","left:"+v+"px","width:"+(m-v-(k?1:0))+"px","height:"+(this.xy.bar_height-2)+"px",S,x,r._text_style||""].join(";"),M="
";f&&(M+=l),t.getState().mode=="month"&&(r=t.getEvent(r.id)),r._timed&&(M+=`${t.templates.event_bar_date(r.start_date,r.end_date,r)}`),M+="
",M+=t.templates.event_bar_text(r.start_date,r.end_date,r)+"
",M+="
",M+="
",g.innerHTML=M,this._rendered.push(g.firstChild),s.appendChild(g.firstChild)}},t._locate_event=function(r){for(var s=null;r&&!s&&r.getAttribute;)s=r.getAttribute(this.config.event_attribute),r=r.parentNode;return s},t.edit=function(r){this._edit_id!=r&&(this.editStop(!1,r),this._edit_id=r,this.updateEvent(r))},t.editStop=function(r,s){if(!s||this._edit_id!=s){var c=this.getEvent(this._edit_id);c&&(r&&(c.text=this._editor.value),this._edit_id=null,this._editor=null,this.updateEvent(c.id),this._edit_stop_event(c,r))}},t._edit_stop_event=function(r,s){this._new_event?(s?this.callEvent("onEventAdded",[r.id,r]):r&&this.deleteEvent(r.id,!0),this._new_event=null):s&&this.callEvent("onEventChanged",[r.id,r])},t.getEvents=function(r,s){var c=[];for(var u in this._events){var v=this._events[u];v&&(!r&&!s||v.start_dater)&&c.push(v)}return c},t.getRenderedEvent=function(r){if(r){for(var s=t._rendered,c=0;c-1&&(y=y.split(t.config.section_delimiter)[0])}var w=f.getSectionTop(y),b=f.posFromDate(p.start_date),k=t.$container.querySelector(".dhx_timeline_data_wrapper");if(b-=(k.offsetWidth-f.dx)/2,w=w-k.offsetHeight/2+f.dy/2,f._smartRenderingEnabled())var E=f.attachEvent("onScroll",function(){D(),f.detachEvent(E)});f.scrollTo({left:b,top:w}),f._smartRenderingEnabled()||D()}}else D();t.callEvent("onAfterEventDisplay",[c,s])}function D(){c.color=m,c.textColor=l}}}(h),function(t){t._append_drag_marker=function(r){if(!r.parentNode){var s=t._els.dhx_cal_data[0].lastChild,c=t._getClassName(s);c.indexOf("dhx_scale_holder")<0&&s.previousSibling&&(s=s.previousSibling),c=t._getClassName(s),s&&c.indexOf("dhx_scale_holder")===0&&s.appendChild(r)}},t._update_marker_position=function(r,s){var c=t._calc_event_y(s,0);r.style.top=c.top+"px",r.style.height=c.height+"px"},t.highlightEventPosition=function(r){var s=document.createElement("div");s.setAttribute("event_id",r.id),s.setAttribute(this.config.event_attribute,r.id),this._rendered.push(s),this._update_marker_position(s,r);var c=this.templates.drag_marker_class(r.start_date,r.end_date,r),u=this.templates.drag_marker_content(r.start_date,r.end_date,r);s.className="dhx_drag_marker",c&&(s.className+=" "+c),u&&(s.innerHTML=u),this._append_drag_marker(s)}}(h),xe(h),function(t){function r(){const s=t.config.csp===!0,c=!!window.Sfdc||!!window.$A||window.Aura||"$shadowResolver$"in document.body;return s||c?t.$root:document.body}t._lightbox_controls={},t.formSection=function(s){for(var c=this.config.lightbox.sections,u=0;u
"},set_value:function(s,c,u,v){s.innerHTML=c||""},get_value:function(s,c,u){return s.innerHTML||""},focus:function(s){}},textarea:{render:function(s){return"
"},set_value:function(s,c,u){t.form_blocks.textarea._get_input(s).value=c||""},get_value:function(s,c){return t.form_blocks.textarea._get_input(s).value},focus:function(s){var c=t.form_blocks.textarea._get_input(s);t._focus(c,!0)},_get_input:function(s){return s.getElementsByTagName("textarea")[0]}},select:{render:function(s){for(var c="
"},set_value:function(s,c,u,v){var m=s.firstChild;!m._dhx_onchange&&v.onchange&&(t.event(m,"change",v.onchange),m._dhx_onchange=!0),c===void 0&&(c=(m.options[0]||{}).value),m.value=c||""},get_value:function(s,c){return s.firstChild.value},focus:function(s){var c=s.firstChild;t._focus(c,!0)}},time:{render:function(s){s.time_format||(s.time_format=["%H:%i","%d","%m","%Y"]),s._time_format_order={};var c=s.time_format,u=t.config,v=t.date.date_part(t._currentDate()),m=1440,l=0;t.config.limit_time_select&&(m=60*u.last_hour+1,l=60*u.first_hour,v.setHours(u.first_hour));for(var f="",g=0;g0&&(f+=" ");var y="",w="";switch(p){case"%Y":var b,k,E;y="dhx_lightbox_year_select",s._time_format_order[3]=g,s.year_range&&(isNaN(s.year_range)?s.year_range.push&&(k=s.year_range[0],E=s.year_range[1]):b=s.year_range),b=b||10;var D=D||Math.floor(b/2);k=k||v.getFullYear()-D,E=E||k+b;for(var x=k;x"+x+"";break;case"%m":for(y="dhx_lightbox_month_select",s._time_format_order[2]=g,x=0;x<12;x++)w+="";break;case"%d":for(y="dhx_lightbox_day_select",s._time_format_order[1]=g,x=1;x<32;x++)w+="";break;case"%H:%i":y="dhx_lightbox_time_select",s._time_format_order[0]=g,x=l;var S=v.getDate();for(s._time_values=[];x"+this.templates.time_picker(v)+"",s._time_values.push(x),v.setTime(v.valueOf()+60*this.config.time_step*1e3),x=24*(v.getDate()!=S?1:0)*60+60*v.getHours()+v.getMinutes()}if(w){var N=t._waiAria.lightboxSelectAttrString(p);f+=" "}}return"
"+f+"  –  "+f+"
"},set_value:function(s,c,u,v){var m,l,f=t.config,g=s.getElementsByTagName("select"),p=v._time_format_order;if(f.full_day){if(!s._full_day){var y="";t.config.wide_form||(y=s.previousSibling.innerHTML+y),s.previousSibling.innerHTML=y,s._full_day=!0}var w=s.previousSibling.getElementsByTagName("input")[0];w.checked=t.date.time_part(u.start_date)===0&&t.date.time_part(u.end_date)===0,g[p[0]].disabled=w.checked,g[p[0]+g.length/2].disabled=w.checked,w.$_eventAttached||(w.$_eventAttached=!0,t.event(w,"click",function(){if(w.checked){var D={};t.form_blocks.time.get_value(s,D,v),m=t.date.date_part(D.start_date),(+(l=t.date.date_part(D.end_date))==+m||+l>=+m&&(u.end_date.getHours()!==0||u.end_date.getMinutes()!==0))&&(l=t.date.add(l,1,"day"))}else m=null,l=null;g[p[0]].disabled=w.checked,g[p[0]+g.length/2].disabled=w.checked,E(g,0,m||u.start_date),E(g,4,l||u.end_date)}))}if(f.auto_end_date&&f.event_duration)for(var b=function(){f.auto_end_date&&f.event_duration&&(m=new Date(g[p[3]].value,g[p[2]].value,g[p[1]].value,0,g[p[0]].value),l=new Date(m.getTime()+60*t.config.event_duration*1e3),E(g,4,l))},k=0;k<4;k++)g[k].$_eventAttached||(g[k].$_eventAttached=!0,t.event(g[k],"change",b));function E(D,x,S){for(var N=v._time_values,M=60*S.getHours()+S.getMinutes(),A=M,C=!1,T=0;T";for(var v=0;v
"+t.locale.labels[u[v]]+"
";u=this.config.buttons_right;var m=t.config.rtl;for(v=0;v
",c+="
"+t.locale.labels[u[v]]+"
";c+="
",c+="
",s.innerHTML=c,t.config.drag_lightbox&&(t.event(s.firstChild,"mousedown",t._ready_to_dnd),t.event(s.firstChild,"selectstart",function(b){return b.preventDefault(),!1}),s.firstChild.style.cursor="move",t._init_dnd_events()),this._waiAria.lightboxAttr(s),this.show_cover(),this._cover.insertBefore(s,this._cover.firstChild),this._lightbox=s;var l=this.config.lightbox.sections;for(c="",v=0;v
"+this.locale.labels["button_"+l[v].button]+"
"),this.config.wide_form&&(c+="
");var p=this.locale.labels["section_"+l[v].name];typeof p!="string"&&(p=l[v].name),c+="
"+g+"
"+f.render.call(this,l[v]),c+="
"}}var y=s.getElementsByTagName("div");for(v=0;v
  +`))}})(h),he(h),function(t){W(t),de(t),t._detachDomEvent=function(l,f,g){l.removeEventListener?l.removeEventListener(f,g,!1):l.detachEvent&&l.detachEvent("on"+f,g)},t._init_once=function(){_e(t),t._init_once=function(){}};const n={render:function(l){return t._init_nav_bar(l)}},s={render:function(l){const f=document.createElement("div");return f.className="dhx_cal_header",f}},c={render:function(l){const f=document.createElement("div");return f.className="dhx_cal_data",f}};function u(l){return!!(l.querySelector(".dhx_cal_header")&&l.querySelector(".dhx_cal_data")&&l.querySelector(".dhx_cal_navline"))}t.init=function(l,f,g){if(!this.$destroyed){if(f=f||t._currentDate(),g=g||"week",this._obj&&this.unset_actions(),this._obj=typeof l=="string"?document.getElementById(l):l,this.$container=this._obj,this.$root=this._obj,!this.$container.offsetHeight&&this.$container.offsetWidth&&this.$container.style.height==="100%"&&window.console.error(t._commonErrorMessages.collapsedContainer(),this.$container),this.config.wai_aria_attributes&&this.config.wai_aria_application_role&&this.$container.setAttribute("role","application"),this.config.header||u(this.$container)||(this.config.header=function(p){const y=["day","week","month"];if(p.matrix)for(const w in p.matrix)y.push(w);if(p._props)for(const w in p._props)y.push(w);if(p._grid&&p._grid.names)for(const w in p._grid.names)y.push(w);return["map","agenda","week_agenda","year"].forEach(function(w){p[w+"_view"]&&y.push(w)}),y.concat(["date"]).concat(["prev","today","next"])}(this),window.console.log(["Required DOM elements are missing from the scheduler container and **scheduler.config.header** is not specified.","Using a default header configuration: ","scheduler.config.header = "+JSON.stringify(this.config.header,null,2),"Check this article for the details: https://docs.dhtmlx.com/scheduler/initialization.html"].join(` +`))),this.config.header)this.$container.innerHTML="",this.$container.classList.add("dhx_cal_container"),this.config.header.height&&(this.xy.nav_height=this.config.header.height),this.$container.appendChild(n.render(this.config.header)),this.$container.appendChild(s.render()),this.$container.appendChild(c.render());else if(!u(this.$container))throw new Error(["Required DOM elements are missing from the scheduler container.","Be sure to either specify them manually in the markup: https://docs.dhtmlx.com/scheduler/initialization.html#initializingschedulerviamarkup","Or to use **scheduler.config.header** setting so they could be created automatically: https://docs.dhtmlx.com/scheduler/initialization.html#initializingschedulerviaheaderconfig"].join(` +`));this.config.rtl&&(this.$container.className+=" dhx_cal_container_rtl"),this._skin_init&&t._skin_init(),t.date.init(),this._scroll=!0,this._els=[],this.get_elements(),this.init_templates(),this.set_actions(),this._init_once(),this._init_touch_events(),this.set_sizes(),t.callEvent("onSchedulerReady",[]),t.$initialized=!0,this.setCurrentView(f,g)}},t.xy={min_event_height:20,bar_height:24,scale_width:50,scroll_width:18,scale_height:20,month_scale_height:20,menu_width:25,margin_top:0,margin_left:0,editor_width:140,month_head_height:22,event_header_height:14},t.keys={edit_save:13,edit_cancel:27},t.bind=function(l,f){return l.bind?l.bind(f):function(){return l.apply(f,arguments)}},t.set_sizes=function(){var l=this._x=this._obj.clientWidth-this.xy.margin_left,f=this._table_view?0:this.xy.scale_width+this.xy.scroll_width,g=this.$container.querySelector(".dhx_cal_scale_placeholder");t._is_material_skin()?(g||((g=document.createElement("div")).className="dhx_cal_scale_placeholder",this.$container.insertBefore(g,this._els.dhx_cal_header[0])),g.style.display="block",this.set_xy(g,l,this.xy.scale_height+1,0,this._els.dhx_cal_header[0].offsetTop)):g&&g.parentNode.removeChild(g),this._lightbox&&(t.$container.offsetWidth<1200||this._setLbPosition(document.querySelector(".dhx_cal_light"))),this._data_width=l-f,this._els.dhx_cal_navline[0].style.width=l+"px";const p=this._els.dhx_cal_header[0];this.set_xy(p,this._data_width,this.xy.scale_height),p.style.left="",p.style.right="",this._table_view?this.config.rtl?p.style.right="-1px":p.style.left="-1px":this.config.rtl?p.style.right=`${this.xy.scale_width}px`:p.style.left=`${this.xy.scale_width}px`},t.set_xy=function(l,f,g,p,y){function w(k){let E=k;return isNaN(Number(E))||(E=Math.max(0,E)+"px"),E}var b="left";f!==void 0&&(l.style.width=w(f)),g!==void 0&&(l.style.height=w(g)),arguments.length>3&&(p!==void 0&&(this.config.rtl&&(b="right"),l.style[b]=p+"px"),y!==void 0&&(l.style.top=y+"px"))},t.get_elements=function(){const l=this._obj.getElementsByTagName("DIV");for(let f=0;f500&&t.unselect()},dhx_cal_prev_button:function(){t._click.dhx_cal_next_button(0,-1)},dhx_cal_next_button:function(l,f){let g=1;t.config.rtl&&(f=-f,g=-g),t.setCurrentView(t.date.add(t.date[t._mode+"_start"](new Date(t._date)),f||g,t._mode))},dhx_cal_today_button:function(){t.callEvent("onBeforeTodayDisplayed",[])&&t.setCurrentView(t._currentDate())},dhx_cal_tab:function(){const l=this.getAttribute("data-tab"),f=this.getAttribute("name"),g=l||f.substring(0,f.search("_tab"));t.setCurrentView(t._date,g)},buttons:{delete:function(l){const f=t.locale.labels.confirm_deleting;t._dhtmlx_confirm({message:f,title:t.locale.labels.title_confirm_deleting,callback:function(){t.deleteEvent(l)},config:{ok:t.locale.labels.icon_delete}})},edit:function(l){t.edit(l)},save:function(l){t.editStop(!0)},details:function(l){t.showLightbox(l)},form:function(l){t.showLightbox(l)},cancel:function(l){t.editStop(!1)}}},t._dhtmlx_confirm=function({message:l,title:f,callback:g,config:p}){if(!l)return g();p=p||{};const y={...p,text:l};f&&(y.title=f),g&&(y.callback=function(w){w&&g()}),t.confirm(y)},t.addEventNow=function(l,f,g){let p={};t._isObject(l)&&!t._isDate(l)&&(p=l,l=null);const y=6e4*(this.config.event_duration||this.config.time_step);l||(l=p.start_date||Math.round(t._currentDate().valueOf()/y)*y);let w=new Date(l);if(!f){let E=this.config.first_hour;E>w.getHours()&&(w.setHours(E),l=w.valueOf()),f=l.valueOf()+y}let b=new Date(f);w.valueOf()==b.valueOf()&&b.setTime(b.valueOf()+y),p.start_date=p.start_date||w,p.end_date=p.end_date||b,p.text=p.text||this.locale.labels.new_event,p.id=this._drag_id=p.id||this.uid(),this._drag_mode="new-size",this._loading=!0;const k=this.addEvent(p);return this.callEvent("onEventCreated",[this._drag_id,g]),this._loading=!1,this._drag_event={},this._on_mouse_up(g),k},t._on_dbl_click=function(l,f){if(f=f||l.target,this.config.readonly)return;const g=t._getClassName(f).split(" ")[0];switch(g){case"dhx_scale_holder":case"dhx_scale_holder_now":case"dhx_month_body":case"dhx_wa_day_data":if(!t.config.dblclick_create)break;this.addEventNow(this.getActionData(l).date,null,l);break;case"dhx_cal_event":case"dhx_wa_ev_body":case"dhx_agenda_line":case"dhx_cal_agenda_event_line":case"dhx_grid_event":case"dhx_cal_event_line":case"dhx_cal_event_clear":{const p=this._locate_event(f);if(!this.callEvent("onDblClick",[p,l]))return;this.config.details_on_dblclick||this._table_view||!this.getEvent(p)._timed||!this.config.select?this.showLightbox(p):this.edit(p);break}case"dhx_time_block":case"dhx_cal_container":return;default:{const p=this["dblclick_"+g];if(p)p.call(this,l);else if(f.parentNode&&f!=this)return t._on_dbl_click(l,f.parentNode);break}}},t._get_column_index=function(l){let f=0;if(this._cols){let g=0,p=0;for(;g+this._cols[p]=this._cols.length)for(;f>=1&&this._ignores[Math.floor(f)];)f--}return f},t._week_indexes_from_pos=function(l){if(this._cols){const f=this._get_column_index(l.x);return l.x=Math.min(this._cols.length-1,Math.max(0,Math.ceil(f)-1)),l.y=Math.max(0,Math.ceil(60*l.y/(this.config.time_step*this.config.hour_size_px))-1)+this.config.first_hour*(60/this.config.time_step),l}return l},t._mouse_coords=function(l){let f;const g=document.body,p=document.documentElement;f=this.$env.isIE||!l.pageX&&!l.pageY?{x:l.clientX+(g.scrollLeft||p.scrollLeft||0)-g.clientLeft,y:l.clientY+(g.scrollTop||p.scrollTop||0)-g.clientTop}:{x:l.pageX,y:l.pageY},this.config.rtl&&this._colsS?(f.x=this.$container.querySelector(".dhx_cal_data").offsetWidth-f.x,f.x+=this.$domHelpers.getAbsoluteLeft(this._obj),this._mode!=="month"&&(f.x-=this.xy.scale_width)):f.x-=this.$domHelpers.getAbsoluteLeft(this._obj)+(this._table_view?0:this.xy.scale_width);const y=this.$container.querySelector(".dhx_cal_data");f.y-=this.$domHelpers.getAbsoluteTop(y)-this._els.dhx_cal_data[0].scrollTop,f.ev=l;const w=this["mouse_"+this._mode];if(w)f=w.call(this,f);else if(this._table_view){const b=this._get_column_index(f.x);if(!this._cols||!this._colsS)return f;let k=0;for(k=1;kf.y);k++);f.y=Math.ceil(24*(Math.max(0,b)+7*Math.max(0,k-1))*60/this.config.time_step),(t._drag_mode||this._mode=="month")&&(f.y=24*(Math.max(0,Math.ceil(b)-1)+7*Math.max(0,k-1))*60/this.config.time_step),this._drag_mode=="move"&&t._ignores_detected&&t.config.preserve_length&&(f._ignores=!0,this._drag_event._event_length||(this._drag_event._event_length=this._get_real_event_length(this._drag_event.start_date,this._drag_event.end_date,{x_step:1,x_unit:"day"}))),f.x=0}else f=this._week_indexes_from_pos(f);return f.timestamp=+new Date,f},t._close_not_saved=function(){if(new Date().valueOf()-(t._new_event||0)>500&&t._edit_id){const l=t.locale.labels.confirm_closing;t._dhtmlx_confirm({message:l,title:t.locale.labels.title_confirm_closing,callback:function(){t.editStop(t.config.positive_closing)}}),l&&(this._drag_id=this._drag_pos=this._drag_mode=null)}},t._correct_shift=function(l,f){return l-6e4*(new Date(t._min_date).getTimezoneOffset()-new Date(l).getTimezoneOffset())*(f?-1:1)},t._is_pos_changed=function(l,f){function g(p,y,w){return Math.abs(p-y)>w}return!l||!this._drag_pos||!!(this._drag_pos.has_moved||!this._drag_pos.timestamp||f.timestamp-this._drag_pos.timestamp>100||g(l.ev.clientX,f.ev.clientX,5)||g(l.ev.clientY,f.ev.clientY,5))},t._correct_drag_start_date=function(l){let f;t.matrix&&(f=t.matrix[t._mode]),f=f||{x_step:1,x_unit:"day"},l=new Date(l);let g=1;return(f._start_correction||f._end_correction)&&(g=60*(f.last_hour||0)-(60*l.getHours()+l.getMinutes())||1),1*l+(t._get_fictional_event_length(l,g,f)-g)},t._correct_drag_end_date=function(l,f){let g;t.matrix&&(g=t.matrix[t._mode]),g=g||{x_step:1,x_unit:"day"};const p=1*l+t._get_fictional_event_length(l,f,g);return new Date(1*p-(t._get_fictional_event_length(p,-1,g,-1)+1))},t._on_mouse_move=function(l){if(this._drag_mode){var f=this._mouse_coords(l);if(this._is_pos_changed(this._drag_pos,f)){var g,p;if(this._edit_id!=this._drag_id&&this._close_not_saved(),!this._drag_mode)return;var y=null;if(this._drag_pos&&!this._drag_pos.has_moved&&((y=this._drag_pos).has_moved=!0),this._drag_pos=f,this._drag_pos.has_moved=!0,this._drag_mode=="create"){if(y&&(f=y),this._close_not_saved(),this.unselect(this._select_id),this._loading=!0,g=this._get_date_from_pos(f).valueOf(),!this._drag_start)return this.callEvent("onBeforeEventCreated",[l,this._drag_id])?(this._loading=!1,void(this._drag_start=g)):void(this._loading=!1);p=g,this._drag_start;var w=new Date(this._drag_start),b=new Date(p);this._mode!="day"&&this._mode!="week"||w.getHours()!=b.getHours()||w.getMinutes()!=b.getMinutes()||(b=new Date(this._drag_start+1e3)),this._drag_id=this.uid(),this.addEvent(w,b,this.locale.labels.new_event,this._drag_id,f.fields),this.callEvent("onEventCreated",[this._drag_id,l]),this._loading=!1,this._drag_mode="new-size"}var k,E=this.config.time_step,D=this.getEvent(this._drag_id);if(t.matrix&&(k=t.matrix[t._mode]),k=k||{x_step:1,x_unit:"day"},this._drag_mode=="move")g=this._min_date.valueOf()+6e4*(f.y*this.config.time_step+24*f.x*60),!f.custom&&this._table_view&&(g+=1e3*this.date.time_part(D.start_date)),!this._table_view&&this._dragEventBody&&this._drag_event._move_event_shift===void 0&&(this._drag_event._move_event_shift=g-D.start_date),this._drag_event._move_event_shift&&(g-=this._drag_event._move_event_shift),g=this._correct_shift(g),f._ignores&&this.config.preserve_length&&this._table_view&&k?(g=t._correct_drag_start_date(g),p=t._correct_drag_end_date(g,this._drag_event._event_length)):p=D.end_date.valueOf()-(D.start_date.valueOf()-g);else{if(g=D.start_date.valueOf(),p=D.end_date.valueOf(),this._table_view){var x=this._min_date.valueOf()+f.y*this.config.time_step*6e4+(f.custom?0:864e5);if(this._mode=="month")if(x=this._correct_shift(x,!1),this._drag_from_start){var S=864e5;x<=t.date.date_part(new Date(p+S-1)).valueOf()&&(g=x-S)}else p=x;else this.config.preserve_length?f.resize_from_start?g=t._correct_drag_start_date(x):p=t._correct_drag_end_date(x,0):f.resize_from_start?g=x:p=x}else{var N=this.date.date_part(new Date(D.end_date.valueOf()-1)).valueOf(),M=new Date(N),A=this.config.first_hour,C=60/E*(this.config.last_hour-A);this.config.time_step=1;var T=this._mouse_coords(l);this.config.time_step=E;var O=f.y*E*6e4,L=Math.min(f.y+1,C)*E*6e4,H=6e4*T.y;p=Math.abs(O-H)>Math.abs(L-H)?N+L:N+O,p+=6e4*(new Date(p).getTimezoneOffset()-M.getTimezoneOffset()),this._els.dhx_cal_data[0].style.cursor="s-resize",this._mode!="week"&&this._mode!="day"||(p=this._correct_shift(p))}if(this._drag_mode=="new-size")if(p<=this._drag_start){var V=f.shift||(this._table_view&&!f.custom?864e5:0);g=p-(f.shift?0:V),p=this._drag_start+(V||6e4*E)}else g=this._drag_start;else p<=g&&(p=g+6e4*E)}var z=new Date(p-1),$=new Date(g);if(this._drag_mode=="move"&&t.config.limit_drag_out&&(+$<+t._min_date||+p>+t._max_date)){if(+D.start_date<+t._min_date||+D.end_date>+t._max_date)$=new Date(D.start_date),p=new Date(D.end_date);else{var j=p-$;+$<+t._min_date?($=new Date(t._min_date),f._ignores&&this.config.preserve_length&&this._table_view?($=new Date(t._correct_drag_start_date($)),k._start_correction&&($=new Date($.valueOf()+k._start_correction)),p=new Date(1*$+this._get_fictional_event_length($,this._drag_event._event_length,k))):p=new Date(+$+j)):(p=new Date(t._max_date),f._ignores&&this.config.preserve_length&&this._table_view?(k._end_correction&&(p=new Date(p.valueOf()-k._end_correction)),p=new Date(1*p-this._get_fictional_event_length(p,0,k,!0)),$=new Date(1*p-this._get_fictional_event_length(p,this._drag_event._event_length,k,!0)),this._ignores_detected&&($=t.date.add($,k.x_step,k.x_unit),p=new Date(1*p-this._get_fictional_event_length(p,0,k,!0)),p=t.date.add(p,k.x_step,k.x_unit))):$=new Date(+p-j))}z=new Date(p-1)}if(!this._table_view&&this._dragEventBody&&!t.config.all_timed&&(!t._get_section_view()&&f.x!=this._get_event_sday({start_date:new Date(g),end_date:new Date(g)})||new Date(g).getHours()=this.config.last_hour)||(j=p-$,S=this._min_date.valueOf()+24*f.x*60*6e4,(p=t.date.date_part(new Date(S))).setHours(this.config.last_hour),z=new Date(p-1),this._drag_mode=="move"&&($=new Date(+p-j))),this._table_view||z.getDate()==$.getDate()&&z.getHours()=y?T+=" dhx_after":g.valueOf()==b.valueOf()&&(T+=" dhx_now"),this._ignores_detected&&this._ignores[A]&&(T+=" dhx_scale_ignore"),C.className=T+" "+this.templates.month_date_class(g,b),C.setAttribute("data-cell-date",t.templates.format_date(g));var O="dhx_month_body",L="dhx_month_head";if(A===0&&this.config.left_border&&(O+=" dhx_month_body_border",L+=" dhx_month_head_border"),this._ignores_detected&&this._ignores[A])C.appendChild(document.createElement("div")),C.appendChild(document.createElement("div"));else{C.style.width=k[A],this._waiAria.monthCellAttr(C,g);var H=document.createElement("div");H.style.height=t.xy.month_head_height+"px",H.className=L,H.innerHTML=this.templates.month_day(g),C.appendChild(H);var V=document.createElement("div");V.className=O,C.appendChild(V)}var z=g.getDate();(g=this.date.add(g,1,"day")).getDate()-z>1&&(g=new Date(g.getFullYear(),g.getMonth(),z+1,12,0))}t._colsS.heights[E]=S,S+=x(E)}return this._min_date=w,this._max_date=g,l.innerHTML="",l.appendChild(N),this._scales={},l.querySelectorAll("[data-cell-date]").forEach($=>{const j=t.templates.parse_date($.getAttribute("data-cell-date")),U=$.querySelector(".dhx_month_body");this._scales[+j]=U,this.callEvent("onScaleAdd",[this._scales[+j],j])}),this._max_date},t._reset_month_scale=function(l,f,g,p){var y=t.date.add(f,1,"month"),w=t._currentDate();this.date.date_part(w),this.date.date_part(g),p=p||Math.ceil(Math.round((y.valueOf()-g.valueOf())/864e5)/7);var b=Math.floor(l.clientHeight/p)-this.xy.month_head_height;return this._colsS.height=b+this.xy.month_head_height,this._colsS.heights=[],t._render_month_scale(l,f,g,p)},t.getView=function(l){return l||(l=t.getState().mode),t.matrix&&t.matrix[l]?t.matrix[l]:t._props&&t._props[l]?t._props[l]:null},t.getLabel=function(l,f){for(var g=this.config.lightbox.sections,p=0;pt.getState().max_date.valueOf()&&(p+=m(f,t.getState().max_date))):p=Math.round(y/60/60/1e3/24);for(var k=!0;bC.valueOf()&&(D+=S-C),S.valueOf()>A.valueOf()?D+=g._start_correction:D+=60*S.getHours()*60*1e3+60*S.getMinutes()*1e3,x.valueOf()`,"gm"),s=new RegExp(" +","gm");function c(l){return(l+"").replace(n," ").replace(s," ")}var u=new RegExp("'","gm");function v(l){return(l+"").replace(u,"'")}for(var m in t._waiAria={getAttributeString:function(l){var f=[" "];for(var g in l)if(typeof l[g]!="function"&&typeof l[g]!="object"){var p=v(c(l[g]));f.push(g+"='"+p+"'")}return f.push(" "),f.join(" ")},setAttributes:function(l,f){for(var g in f)l.setAttribute(g,c(f[g]));return l},labelAttr:function(l,f){return this.setAttributes(l,{"aria-label":f})},label:function(l){return t._waiAria.getAttributeString({"aria-label":l})},hourScaleAttr:function(l,f){this.labelAttr(l,f)},monthCellAttr:function(l,f){this.labelAttr(l,t.templates.day_date(f))},navBarDateAttr:function(l,f){this.labelAttr(l,f)},dayHeaderAttr:function(l,f){this.labelAttr(l,f)},dayColumnAttr:function(l,f){this.dayHeaderAttr(l,t.templates.day_date(f))},headerButtonsAttributes:function(l,f){return this.setAttributes(l,{role:"button","aria-label":f})},headerToggleState:function(l,f){return this.setAttributes(l,{"aria-pressed":f?"true":"false"})},getHeaderCellAttr:function(l){return t._waiAria.getAttributeString({"aria-label":l})},eventAttr:function(l,f){this._eventCommonAttr(l,f)},_eventCommonAttr:function(l,f){f.setAttribute("aria-label",c(t.templates.event_text(l.start_date,l.end_date,l))),t.config.readonly&&f.setAttribute("aria-readonly",!0),l.$dataprocessor_class&&f.setAttribute("aria-busy",!0),f.setAttribute("aria-selected",t.getState().select_id==l.id?"true":"false")},setEventBarAttr:function(l,f){this._eventCommonAttr(l,f)},_getAttributes:function(l,f){var g={setAttribute:function(p,y){this[p]=y}};return l.apply(this,[f,g]),g},eventBarAttrString:function(l){return this.getAttributeString(this._getAttributes(this.setEventBarAttr,l))},agendaHeadAttrString:function(){return this.getAttributeString({role:"row"})},agendaHeadDateString:function(l){return this.getAttributeString({role:"columnheader","aria-label":l})},agendaHeadDescriptionString:function(l){return this.agendaHeadDateString(l)},agendaDataAttrString:function(){return this.getAttributeString({role:"grid"})},agendaEventAttrString:function(l){var f=this._getAttributes(this._eventCommonAttr,l);return f.role="row",this.getAttributeString(f)},agendaDetailsBtnString:function(){return this.getAttributeString({role:"button","aria-label":t.locale.labels.icon_details})},gridAttrString:function(){return this.getAttributeString({role:"grid"})},gridRowAttrString:function(l){return this.agendaEventAttrString(l)},gridCellAttrString:function(l,f,g){return this.getAttributeString({role:"gridcell","aria-label":[f.label===void 0?f.id:f.label,": ",g]})},mapAttrString:function(){return this.gridAttrString()},mapRowAttrString:function(l){return this.gridRowAttrString(l)},mapDetailsBtnString:function(){return this.agendaDetailsBtnString()},minicalHeader:function(l,f){this.setAttributes(l,{id:f+"","aria-live":"assertice","aria-atomic":"true"})},minicalGrid:function(l,f){this.setAttributes(l,{"aria-labelledby":f+"",role:"grid"})},minicalRow:function(l){this.setAttributes(l,{role:"row"})},minicalDayCell:function(l,f){var g=f.valueOf()=t._min_date.valueOf();this.setAttributes(l,{role:"gridcell","aria-label":t.templates.day_date(f),"aria-selected":g?"true":"false"})},minicalHeadCell:function(l){this.setAttributes(l,{role:"columnheader"})},weekAgendaDayCell:function(l,f){var g=l.querySelector(".dhx_wa_scale_bar"),p=l.querySelector(".dhx_wa_day_data"),y=t.uid()+"";this.setAttributes(g,{id:y}),this.setAttributes(p,{"aria-labelledby":y})},weekAgendaEvent:function(l,f){this.eventAttr(f,l)},lightboxHiddenAttr:function(l){l.setAttribute("aria-hidden","true")},lightboxVisibleAttr:function(l){l.setAttribute("aria-hidden","false")},lightboxSectionButtonAttrString:function(l){return this.getAttributeString({role:"button","aria-label":l,tabindex:"0"})},yearHeader:function(l,f){this.setAttributes(l,{id:f+""})},yearGrid:function(l,f){this.minicalGrid(l,f)},yearHeadCell:function(l){return this.minicalHeadCell(l)},yearRow:function(l){return this.minicalRow(l)},yearDayCell:function(l){this.setAttributes(l,{role:"gridcell"})},lightboxAttr:function(l){l.setAttribute("role","dialog"),l.setAttribute("aria-hidden","true"),l.firstChild.setAttribute("role","heading")},lightboxButtonAttrString:function(l){return this.getAttributeString({role:"button","aria-label":t.locale.labels[l],tabindex:"0"})},eventMenuAttrString:function(l){return this.getAttributeString({role:"button","aria-label":t.locale.labels[l]})},lightboxHeader:function(l,f){l.setAttribute("aria-label",f)},lightboxSelectAttrString:function(l){var f="";switch(l){case"%Y":f=t.locale.labels.year;break;case"%m":f=t.locale.labels.month;break;case"%d":f=t.locale.labels.day;break;case"%H:%i":f=t.locale.labels.hour+" "+t.locale.labels.minute}return t._waiAria.getAttributeString({"aria-label":f})},messageButtonAttrString:function(l){return"tabindex='0' role='button' aria-label='"+l+"'"},messageInfoAttr:function(l){l.setAttribute("role","alert")},messageModalAttr:function(l,f){l.setAttribute("role","dialog"),f&&l.setAttribute("aria-labelledby",f)},quickInfoAttr:function(l){l.setAttribute("role","dialog")},quickInfoHeaderAttrString:function(){return" role='heading' "},quickInfoHeader:function(l,f){l.setAttribute("aria-label",f)},quickInfoButtonAttrString:function(l){return t._waiAria.getAttributeString({role:"button","aria-label":l,tabindex:"0"})},tooltipAttr:function(l){l.setAttribute("role","tooltip")},tooltipVisibleAttr:function(l){l.setAttribute("aria-hidden","false")},tooltipHiddenAttr:function(l){l.setAttribute("aria-hidden","true")}},t._waiAria)t._waiAria[m]=function(l){return function(){return t.config.wai_aria_attributes?l.apply(this,arguments):" "}}(t._waiAria[m])})()}(h),h.utils=I,h.$domHelpers=B,h.utils.dom=B,h.uid=I.uid,h.mixin=I.mixin,h.defined=I.defined,h.assert=function(t){return function(n,s){n||t.config.show_errors&&t.callEvent("onError",[s])!==!1&&(t.message?t.message({type:"error",text:s,expire:-1}):console.log(s))}}(h),h.copy=I.copy,h._createDatePicker=function(t,n){return new at(h,t,n)},h._getFocusableNodes=B.getFocusableNodes,h._getClassName=B.getClassName,h._locate_css=B.locateCss;const a=De(h);var r,d,i;h.utils.mixin(h,a),h.env=h.$env=ye,h.Promise=window.Promise,function(t){t.destructor=function(){for(var n in t.callEvent("onDestroy",[]),this.clearAll(),this.$container&&(this.$container.innerHTML=""),this._eventRemoveAll&&this._eventRemoveAll(),this.resetLightbox&&this.resetLightbox(),this._dp&&this._dp.destructor&&this._dp.destructor(),this.detachAllEvents(),this)n.indexOf("$")===0&&delete this[n];t.$destroyed=!0}}(h),function(t){function n(s,c){var u={method:s};if(c.length===0)throw new Error("Arguments list of query is wrong.");if(c.length===1)return typeof c[0]=="string"?(u.url=c[0],u.async=!0):(u.url=c[0].url,u.async=c[0].async||!0,u.callback=c[0].callback,u.headers=c[0].headers),c[0].data?typeof c[0].data!="string"?u.data=X(c[0].data):u.data=c[0].data:u.data="",u;switch(u.url=c[0],s){case"GET":case"DELETE":u.callback=c[1],u.headers=c[2];break;case"POST":case"PUT":c[1]?typeof c[1]!="string"?u.data=X(c[1]):u.data=c[1]:u.data="",u.callback=c[2],u.headers=c[3]}return u}t.Promise=window.Promise,t.ajax={cache:!0,method:"get",serializeRequestParams:X,parse:function(s){return typeof s!="string"?s:(s=s.replace(/^[\s]+/,""),typeof DOMParser>"u"||t.$env.isIE?window.ActiveXObject!==void 0&&((c=new window.ActiveXObject("Microsoft.XMLDOM")).async="false",c.loadXML(s)):c=new DOMParser().parseFromString(s,"text/xml"),c);var c},xmltop:function(s,c,u){if(c.status===void 0||c.status<400){var v=c.responseXML?c.responseXML||c:this.parse(c.responseText||c);if(v&&v.documentElement!==null&&!v.getElementsByTagName("parsererror").length)return v.getElementsByTagName(s)[0]}return u!==-1&&t.callEvent("onLoadXMLError",["Incorrect XML",arguments[1],u]),document.createElement("DIV")},xpath:function(s,c){if(c.nodeName||(c=c.responseXML||c),t.$env.isIE)return c.selectNodes(s)||[];for(var u,v=[],m=(c.ownerDocument||c).evaluate(s,c,null,XPathResult.ANY_TYPE,null);u=m.iterateNext();)v.push(u);return v},query:function(s){return this._call(s.method||"GET",s.url,s.data||"",s.async||!0,s.callback,s.headers)},get:function(s,c,u){var v=n("GET",arguments);return this.query(v)},getSync:function(s,c){var u=n("GET",arguments);return u.async=!1,this.query(u)},put:function(s,c,u,v){var m=n("PUT",arguments);return this.query(m)},del:function(s,c,u){var v=n("DELETE",arguments);return this.query(v)},post:function(s,c,u,v){arguments.length==1?c="":arguments.length==2&&typeof c=="function"&&(u=c,c="");var m=n("POST",arguments);return this.query(m)},postSync:function(s,c,u){c=c===null?"":String(c);var v=n("POST",arguments);return v.async=!1,this.query(v)},_call:function(s,c,u,v,m,l){return new t.Promise((function(f,g){var p=typeof XMLHttpRequest===void 0||t.$env.isIE?new window.ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest,y=navigator.userAgent.match(/AppleWebKit/)!==null&&navigator.userAgent.match(/Qt/)!==null&&navigator.userAgent.match(/Safari/)!==null;if(v&&p.addEventListener("readystatechange",function(){if(p.readyState==4||y&&p.readyState==3){if((p.status!=200||p.responseText==="")&&!t.callEvent("onAjaxError",[p]))return;setTimeout(function(){typeof m=="function"&&m.apply(window,[{xmlDoc:p,filePath:c}]),f(p),typeof m=="function"&&(m=null,p=null)},0)}}),s!="GET"||this.cache||(c+=(c.indexOf("?")>=0?"&":"?")+"dhxr"+new Date().getTime()+"=1"),p.open(s,c,v),l)for(var w in l)p.setRequestHeader(w,l[w]);else s.toUpperCase()=="POST"||s=="PUT"||s=="DELETE"?p.setRequestHeader("Content-Type","application/x-www-form-urlencoded"):s=="GET"&&(u=null);if(p.setRequestHeader("X-Requested-With","XMLHttpRequest"),p.send(u),!v)return{xmlDoc:p,filePath:c}}).bind(this))},urlSeparator:function(s){return s.indexOf("?")!=-1?"&":"?"}},t.$ajax=t.ajax}(h),be(h),function(t){t.config={default_date:"%j %M %Y",month_date:"%F %Y",load_date:"%Y-%m-%d",week_date:"%l",day_date:"%D %j",hour_date:"%H:%i",month_day:"%d",date_format:"%Y-%m-%d %H:%i",api_date:"%d-%m-%Y %H:%i",parse_exact_format:!1,preserve_length:!0,time_step:5,displayed_event_color:"#ff4a4a",displayed_event_text_color:"#ffef80",wide_form:0,day_column_padding:8,use_select_menu_space:!0,fix_tab_position:!0,start_on_monday:!0,first_hour:0,last_hour:24,readonly:!1,drag_resize:!0,drag_move:!0,drag_create:!0,drag_event_body:!0,dblclick_create:!0,details_on_dblclick:!0,edit_on_create:!0,details_on_create:!0,header:null,hour_size_px:44,resize_month_events:!1,resize_month_timed:!1,responsive_lightbox:!1,separate_short_events:!0,rtl:!1,cascade_event_display:!1,cascade_event_count:4,cascade_event_margin:30,multi_day:!0,multi_day_height_limit:200,drag_lightbox:!0,preserve_scroll:!0,select:!0,server_utc:!1,touch:!0,touch_tip:!0,touch_drag:500,touch_swipe_dates:!1,quick_info_detached:!0,positive_closing:!1,drag_highlight:!0,limit_drag_out:!1,icons_edit:["icon_save","icon_cancel"],icons_select:["icon_details","icon_edit","icon_delete"],buttons_left:["dhx_save_btn","dhx_cancel_btn"],buttons_right:["dhx_delete_btn"],lightbox:{sections:[{name:"description",map_to:"text",type:"textarea",focus:!0},{name:"time",height:72,type:"time",map_to:"auto"}]},highlight_displayed_event:!0,left_border:!1,ajax_error:"alert",delay_render:0,timeline_swap_resize:!0,wai_aria_attributes:!0,wai_aria_application_role:!0,csp:"auto",event_attribute:"data-event-id",show_errors:!0},t.config.buttons_left.$initial=t.config.buttons_left.join(),t.config.buttons_right.$initial=t.config.buttons_right.join(),t._helpers={parseDate:function(n){return(t.templates.xml_date||t.templates.parse_date)(n)},formatDate:function(n){return(t.templates.xml_format||t.templates.format_date)(n)}},t.templates={},t.init_templates=function(){var n=t.date.date_to_str,s=t.config;(function(c,u){for(var v in u)c[v]||(c[v]=u[v])})(t.templates,{day_date:n(s.default_date),month_date:n(s.month_date),week_date:function(c,u){return s.rtl?t.templates.day_date(t.date.add(u,-1,"day"))+" – "+t.templates.day_date(c):t.templates.day_date(c)+" – "+t.templates.day_date(t.date.add(u,-1,"day"))},day_scale_date:n(s.default_date),time_slot_text:function(c){return""},time_slot_class:function(c){return""},month_scale_date:n(s.week_date),week_scale_date:n(s.day_date),hour_scale:n(s.hour_date),time_picker:n(s.hour_date),event_date:n(s.hour_date),month_day:n(s.month_day),load_format:n(s.load_date),format_date:n(s.date_format,s.server_utc),parse_date:t.date.str_to_date(s.date_format,s.server_utc),api_date:t.date.str_to_date(s.api_date,!1,!1),event_header:function(c,u,v){return v._mode==="small"||v._mode==="smallest"?t.templates.event_date(c):t.templates.event_date(c)+" - "+t.templates.event_date(u)},event_text:function(c,u,v){return v.text},event_class:function(c,u,v){return""},month_date_class:function(c){return""},week_date_class:function(c){return""},event_bar_date:function(c,u,v){return t.templates.event_date(c)},event_bar_text:function(c,u,v){return v.text},month_events_link:function(c,u){return"View more("+u+" events)"},drag_marker_class:function(c,u,v){return""},drag_marker_content:function(c,u,v){return""},tooltip_date_format:t.date.date_to_str("%Y-%m-%d %H:%i"),tooltip_text:function(c,u,v){return"Event: "+v.text+"
Start date: "+t.templates.tooltip_date_format(c)+"
End date: "+t.templates.tooltip_date_format(u)},calendar_month:n("%F %Y"),calendar_scale_date:n("%D"),calendar_date:n("%d"),calendar_time:n("%d-%m-%Y")}),this.callEvent("onTemplatesReady",[])}}(h),function(t){t._events={},t.clearAll=function(){this._events={},this._loaded={},this._edit_id=null,this._select_id=null,this._drag_id=null,this._drag_mode=null,this._drag_pos=null,this._new_event=null,this.clear_view(),this.callEvent("onClearAll",[])},t.addEvent=function(n,s,c,u,v){if(!arguments.length)return this.addEventNow();var m=n;arguments.length!=1&&((m=v||{}).start_date=n,m.end_date=s,m.text=c,m.id=u),m.id=m.id||t.uid(),m.text=m.text||"",typeof m.start_date=="string"&&(m.start_date=this.templates.api_date(m.start_date)),typeof m.end_date=="string"&&(m.end_date=this.templates.api_date(m.end_date));var l=6e4*(this.config.event_duration||this.config.time_step);m.start_date.valueOf()==m.end_date.valueOf()&&m.end_date.setTime(m.end_date.valueOf()+l),m.start_date.setMilliseconds(0),m.end_date.setMilliseconds(0),m._timed=this.isOneDayEvent(m);var f=!this._events[m.id];return this._events[m.id]=m,this.event_updated(m),this._loading||this.callEvent(f?"onEventAdded":"onEventChanged",[m.id,m]),m.id},t.deleteEvent=function(n,s){var c=this._events[n];(s||this.callEvent("onBeforeEventDelete",[n,c])&&this.callEvent("onConfirmedBeforeEventDelete",[n,c]))&&(c&&(t.getState().select_id==n&&t.unselect(),delete this._events[n],this.event_updated(c),this._drag_id==c.id&&(this._drag_id=null,this._drag_mode=null,this._drag_pos=null)),this.callEvent("onEventDeleted",[n,c]))},t.getEvent=function(n){return this._events[n]},t.setEvent=function(n,s){s.id||(s.id=n),this._events[n]=s},t.for_rendered=function(n,s){for(var c=this._rendered.length-1;c>=0;c--)this._rendered[c].getAttribute(this.config.event_attribute)==n&&s(this._rendered[c],c)},t.changeEventId=function(n,s){if(n!=s){var c=this._events[n];c&&(c.id=s,this._events[s]=c,delete this._events[n]),this.for_rendered(n,function(u){u.setAttribute("event_id",s),u.setAttribute(t.config.event_attribute,s)}),this._select_id==n&&(this._select_id=s),this._edit_id==n&&(this._edit_id=s),this.callEvent("onEventIdChange",[n,s])}},function(){for(var n=["text","Text","start_date","StartDate","end_date","EndDate"],s=function(v){return function(m){return t.getEvent(m)[v]}},c=function(v){return function(m,l){var f=t.getEvent(m);f[v]=l,f._changed=!0,f._timed=this.isOneDayEvent(f),t.event_updated(f,!0)}},u=0;uu||c<=v)&&(s>=u||s24-(this.config.last_hour-this.config.first_hour)||sv))}return!1},t.isOneDayEvent=function(n){var s=new Date(n.end_date.valueOf()-1);return n.start_date.getFullYear()===s.getFullYear()&&n.start_date.getMonth()===s.getMonth()&&n.start_date.getDate()===s.getDate()&&n.end_date.valueOf()-n.start_date.valueOf()<864e5},t.get_visible_events=function(n){var s=[];for(var c in this._events)this.is_visible_events(this._events[c])&&(n&&!this._events[c]._timed||this.filter_event(c,this._events[c])&&s.push(this._events[c]));return s},t.filter_event=function(n,s){var c=this["filter_"+this._mode];return!c||c(n,s)},t._is_main_area_event=function(n){return!!n._timed},t.render_view_data=function(n,s){var c=!1;if(!n){if(c=!0,this._not_render)return void(this._render_wait=!0);this._render_wait=!1,this.clear_view(),n=this.get_visible_events(!(this._table_view||this.config.multi_day))}for(var u=0,v=n.length;up){var y=p;1*this.config.max_month_events!==this.config.max_month_events||v[f]<=this.config.max_month_events?y=v[f]*c:(this.config.max_month_events+1)*c>p&&(y=(this.config.max_month_events+1)*c),l[f].style.height=y+this.xy.month_head_height+"px"}v[f]=(v[f-1]||0)+t._get_first_visible_cell(g).offsetHeight}v.unshift(0);const M=this.$container.querySelector(".dhx_cal_data");if(M.offsetHeightM.id?1:-1:N.start_date>M.start_date?1:-1});var c=[],u=[];this._min_mapped_duration=Math.floor(60*this.xy.min_event_height/this.config.hour_size_px);for(var v=0;vS&&(S=y[E]._sorder);m._sorder=S+1,m._inner=!1}else m._sorder=0;y.splice(b,b==y.length?0:1,m),y.length>(y.max_count||0)?(y.max_count=y.length,m._count=y.length):m._count=m._count?m._count:1}(g=this.config.last_hour)&&(u.push(m),n[v]=m=this._copy_event(m),g=this.config.last_hour&&(m.end_date.setMinutes(0),m.end_date.setHours(this.config.last_hour)),m.start_date>m.end_date||g==this.config.last_hour)&&(n.splice(v,1),v--)}}if(!s){for(v=0;vc.id?1:-1:s.start_date>c.start_date?1:-1})},t._is_any_multiday_cell_visible=function(n,s,c){var u=this._cols.length,v=!1,m=n,l=!0,f=new Date(s);for(t.date.day_start(new Date(s)).valueOf()!=s.valueOf()&&(f=t.date.day_start(f),f=t.date.add(f,1,"day"));mthis._max_date&&(w.last_chunk=!1,k=this._max_date);var E=this.locate_holder_day(b,!1,p);if(p._sday=E%l,!this._ignores[p._sday]||!p._timed){var D=this.locate_holder_day(k,!0,p)||l;if(p._eday=D%l||l,p._length=D-E,p._sweek=Math.floor((this._correct_shift(b.valueOf(),1)-this._min_date.valueOf())/(864e5*l)),t._is_any_multiday_cell_visible(b,k,p)){var x,S=v[p._sweek];for(x=0;x0?2:1);if(n._inner||(w*=p-y),this.config.cascade_event_display){var k=this.config.cascade_event_count,E=this.config.cascade_event_margin;b=y%k*E;var D=n._inner?(p-y-1)%k*E/2:0;w=Math.floor(c-v-b-D)}n._mode=g<30?"smallest":g<42?"small":null;var x=this._render_v_bar(n,v+b,f,w,g,n._text_style,t.templates.event_header(n.start_date,n.end_date,n),t.templates.event_text(n.start_date,n.end_date,n));if(n._mode==="smallest"?x.classList.add("dhx_cal_event--xsmall"):n._mode==="small"&&x.classList.add("dhx_cal_event--small"),this._waiAria.eventAttr(n,x),this._rendered.push(x),s.appendChild(x),b=b+parseInt(this.config.rtl?m.style.right:m.style.left,10)+v,this._edit_id==n.id){x.style.zIndex=1,w=Math.max(w,t.xy.editor_width),(x=document.createElement("div")).setAttribute("event_id",n.id),x.setAttribute(this.config.event_attribute,n.id),this._waiAria.eventAttr(n,x),x.className="dhx_cal_event dhx_cal_editor",this.config.rtl&&b++,this.set_xy(x,w,g,b,f),n.color&&x.style.setProperty("--dhx-scheduler-event-background",n.color);var S=t.templates.event_class(n.start_date,n.end_date,n);S&&(x.className+=" "+S);var N=document.createElement("div");N.style.cssText+="overflow:hidden;height:100%",x.appendChild(N),this._els.dhx_cal_data[0].appendChild(x),this._rendered.push(x),N.innerHTML="",this._editor=N.querySelector("textarea"),t.event(this._editor,"keydown",function(L){if(L.shiftKey)return!0;var H=L.keyCode;H==t.keys.edit_save&&t.editStop(!0),H==t.keys.edit_cancel&&t.editStop(!1),H!=t.keys.edit_save&&H!=t.keys.edit_cancel||L.preventDefault&&L.preventDefault()}),t.event(this._editor,"selectstart",function(L){return L.cancelBubble=!0,!0}),t._focus(this._editor,!0),this._els.dhx_cal_data[0].scrollLeft=0}if(this.xy.menu_width!==0&&this._select_id==n.id){this.config.cascade_event_display&&this._drag_mode&&(x.style.zIndex=1);for(var M,A=this.config["icons_"+(this._edit_id==n.id?"edit":"select")],C="",T=0;T
`}var O=this._render_v_bar(n,b-u-1,f,u,null,"","
",C,!0);n.color&&O.style.setProperty("--dhx-scheduler-event-background",n.color),n.textColor&&O.style.setProperty("--dhx-scheduler-event-color",n.textColor),this._els.dhx_cal_data[0].appendChild(O),this._rendered.push(O)}this.config.drag_highlight&&this._drag_id==n.id&&this.highlightEventPosition(n)}}},t._render_v_bar=function(n,s,c,u,v,m,l,f,g){var p=document.createElement("div"),y=n.id,w=g?"dhx_cal_event dhx_cal_select_menu":"dhx_cal_event",b=t.getState();b.drag_id==n.id&&(w+=" dhx_cal_event_drag"),b.select_id==n.id&&(w+=" dhx_cal_event_selected");var k=t.templates.event_class(n.start_date,n.end_date,n);k&&(w=w+" "+k),this.config.cascade_event_display&&(w+=" dhx_cal_event_cascade");var E=u,D='
';p.innerHTML=D;var x=p.cloneNode(!0).firstChild;if(!g&&t.renderEvent(x,n,u,v,l,f))return n.color&&x.style.setProperty("--dhx-scheduler-event-background",n.color),n.textColor&&x.style.setProperty("--dhx-scheduler-event-color",n.textColor),x;x=p.firstChild,n.color&&x.style.setProperty("--dhx-scheduler-event-background",n.color),n.textColor&&x.style.setProperty("--dhx-scheduler-event-color",n.textColor);var S='
 
';S+='
'+l+"
",S+='
'+f+"
";var N="dhx_event_resize dhx_footer";return(g||n._drag_resize===!1)&&(N="dhx_resize_denied "+N),S+='
',x.innerHTML=S,x},t.renderEvent=function(){return!1},t.locate_holder=function(n){return this._mode=="day"?this._els.dhx_cal_data[0].firstChild:this._els.dhx_cal_data[0].childNodes[n]},t.locate_holder_day=function(n,s){var c=Math.floor((this._correct_shift(n,1)-this._min_date)/864e5);return s&&this.date.time_part(n)&&c++,c},t._get_dnd_order=function(n,s,c){if(!this._drag_event)return n;this._drag_event._orig_sorder?n=this._drag_event._orig_sorder:this._drag_event._orig_sorder=n;for(var u=s*n;u+s>c;)n--,u-=s;return Math.max(n,0)},t._get_event_bar_pos=function(n){var s=this.config.rtl,c=this._colsS,u=c[n._sday],v=c[n._eday];s&&(u=c[c.col_length]-c[n._eday]+c[0],v=c[c.col_length]-c[n._sday]+c[0]),v==u&&(v=c[n._eday+1]);var m=this.xy.bar_height,l=n._sorder;if(n.id==this._drag_id){var f=c.heights[n._sweek+1]-c.heights[n._sweek]-this.xy.month_head_height;l=t._get_dnd_order(l,m,f)}var g=l*m;return{x:u,x2:v,y:c.heights[n._sweek]+(c.height?this.xy.month_scale_height+2:2)+g}},t.render_event_bar=function(n){var s=this._rendered_location,c=this._get_event_bar_pos(n),u=c.y,v=c.x,m=c.x2,l="";if(m){var f=t.config.resize_month_events&&this._mode=="month"&&(!n._timed||t.config.resize_month_timed),g=document.createElement("div"),p=n.hasOwnProperty("_first_chunk")&&n._first_chunk,y=n.hasOwnProperty("_last_chunk")&&n._last_chunk,w=f&&(n._timed||p),b=f&&(n._timed||y),k=!0,E="dhx_cal_event_clear";n._timed&&!f||(k=!1,E="dhx_cal_event_line"),p&&(E+=" dhx_cal_event_line_start"),y&&(E+=" dhx_cal_event_line_end"),w&&(l+="
"),b&&(l+="
");var D=t.templates.event_class(n.start_date,n.end_date,n);D&&(E+=" "+D);var x=n.color?"--dhx-scheduler-event-background:"+n.color+";":"",S=n.textColor?"--dhx-scheduler-event-color:"+n.textColor+";":"",N=["position:absolute","top:"+u+"px","left:"+v+"px","width:"+(m-v-(k?1:0))+"px","height:"+(this.xy.bar_height-2)+"px",S,x,n._text_style||""].join(";"),M="
";f&&(M+=l),t.getState().mode=="month"&&(n=t.getEvent(n.id)),n._timed&&(M+=`${t.templates.event_bar_date(n.start_date,n.end_date,n)}`),M+="
",M+=t.templates.event_bar_text(n.start_date,n.end_date,n)+"
",M+="
",M+="
",g.innerHTML=M,this._rendered.push(g.firstChild),s.appendChild(g.firstChild)}},t._locate_event=function(n){for(var s=null;n&&!s&&n.getAttribute;)s=n.getAttribute(this.config.event_attribute),n=n.parentNode;return s},t.edit=function(n){this._edit_id!=n&&(this.editStop(!1,n),this._edit_id=n,this.updateEvent(n))},t.editStop=function(n,s){if(!s||this._edit_id!=s){var c=this.getEvent(this._edit_id);c&&(n&&(c.text=this._editor.value),this._edit_id=null,this._editor=null,this.updateEvent(c.id),this._edit_stop_event(c,n))}},t._edit_stop_event=function(n,s){this._new_event?(s?this.callEvent("onEventAdded",[n.id,n]):n&&this.deleteEvent(n.id,!0),this._new_event=null):s&&this.callEvent("onEventChanged",[n.id,n])},t.getEvents=function(n,s){var c=[];for(var u in this._events){var v=this._events[u];v&&(!n&&!s||v.start_daten)&&c.push(v)}return c},t.getRenderedEvent=function(n){if(n){for(var s=t._rendered,c=0;c-1&&(y=y.split(t.config.section_delimiter)[0])}var w=f.getSectionTop(y),b=f.posFromDate(p.start_date),k=t.$container.querySelector(".dhx_timeline_data_wrapper");if(b-=(k.offsetWidth-f.dx)/2,w=w-k.offsetHeight/2+f.dy/2,f._smartRenderingEnabled())var E=f.attachEvent("onScroll",function(){D(),f.detachEvent(E)});f.scrollTo({left:b,top:w}),f._smartRenderingEnabled()||D()}}else D();t.callEvent("onAfterEventDisplay",[c,s])}function D(){c.color=m,c.textColor=l}}}(h),function(t){t._append_drag_marker=function(n){if(!n.parentNode){var s=t._els.dhx_cal_data[0].lastChild,c=t._getClassName(s);c.indexOf("dhx_scale_holder")<0&&s.previousSibling&&(s=s.previousSibling),c=t._getClassName(s),s&&c.indexOf("dhx_scale_holder")===0&&s.appendChild(n)}},t._update_marker_position=function(n,s){var c=t._calc_event_y(s,0);n.style.top=c.top+"px",n.style.height=c.height+"px"},t.highlightEventPosition=function(n){var s=document.createElement("div");s.setAttribute("event_id",n.id),s.setAttribute(this.config.event_attribute,n.id),this._rendered.push(s),this._update_marker_position(s,n);var c=this.templates.drag_marker_class(n.start_date,n.end_date,n),u=this.templates.drag_marker_content(n.start_date,n.end_date,n);s.className="dhx_drag_marker",c&&(s.className+=" "+c),u&&(s.innerHTML=u),this._append_drag_marker(s)}}(h),xe(h),function(t){function n(){const s=t.config.csp===!0,c=!!window.Sfdc||!!window.$A||window.Aura||"$shadowResolver$"in document.body;return s||c?t.$root:document.body}t._lightbox_controls={},t.formSection=function(s){for(var c=this.config.lightbox.sections,u=0;u
"},set_value:function(s,c,u,v){s.innerHTML=c||""},get_value:function(s,c,u){return s.innerHTML||""},focus:function(s){}},textarea:{render:function(s){return`
`},set_value:function(s,c,u){t.form_blocks.textarea._get_input(s).value=c||""},get_value:function(s,c){return t.form_blocks.textarea._get_input(s).value},focus:function(s){var c=t.form_blocks.textarea._get_input(s);t._focus(c,!0)},_get_input:function(s){return s.getElementsByTagName("textarea")[0]}},select:{render:function(s){for(var c="
"},set_value:function(s,c,u,v){var m=s.firstChild;!m._dhx_onchange&&v.onchange&&(t.event(m,"change",v.onchange),m._dhx_onchange=!0),c===void 0&&(c=(m.options[0]||{}).value),m.value=c||""},get_value:function(s,c){return s.firstChild.value},focus:function(s){var c=s.firstChild;t._focus(c,!0)}},time:{render:function(s){s.time_format||(s.time_format=["%H:%i","%d","%m","%Y"]),s._time_format_order={};var c=s.time_format,u=t.config,v=t.date.date_part(t._currentDate()),m=1440,l=0;t.config.limit_time_select&&(m=60*u.last_hour+1,l=60*u.first_hour,v.setHours(u.first_hour));for(var f="",g=0;g0&&(f+=" ");var y="",w="";switch(p){case"%Y":var b,k,E;y="dhx_lightbox_year_select",s._time_format_order[3]=g,s.year_range&&(isNaN(s.year_range)?s.year_range.push&&(k=s.year_range[0],E=s.year_range[1]):b=s.year_range),b=b||10;var D=D||Math.floor(b/2);k=k||v.getFullYear()-D,E=E||k+b;for(var x=k;x"+x+"";break;case"%m":for(y="dhx_lightbox_month_select",s._time_format_order[2]=g,x=0;x<12;x++)w+="";break;case"%d":for(y="dhx_lightbox_day_select",s._time_format_order[1]=g,x=1;x<32;x++)w+="";break;case"%H:%i":y="dhx_lightbox_time_select",s._time_format_order[0]=g,x=l;var S=v.getDate();for(s._time_values=[];x"+this.templates.time_picker(v)+"",s._time_values.push(x),v.setTime(v.valueOf()+60*this.config.time_step*1e3),x=24*(v.getDate()!=S?1:0)*60+60*v.getHours()+v.getMinutes()}if(w){var N=t._waiAria.lightboxSelectAttrString(p);f+=" "}}return"
"+f+"  –  "+f+"
"},set_value:function(s,c,u,v){var m,l,f=t.config,g=s.getElementsByTagName("select"),p=v._time_format_order;if(f.full_day){if(!s._full_day){var y="";t.config.wide_form||(y=s.previousSibling.innerHTML+y),s.previousSibling.innerHTML=y,s._full_day=!0}var w=s.previousSibling.getElementsByTagName("input")[0];w.checked=t.date.time_part(u.start_date)===0&&t.date.time_part(u.end_date)===0,g[p[0]].disabled=w.checked,g[p[0]+g.length/2].disabled=w.checked,w.$_eventAttached||(w.$_eventAttached=!0,t.event(w,"click",function(){if(w.checked){var D={};t.form_blocks.time.get_value(s,D,v),m=t.date.date_part(D.start_date),(+(l=t.date.date_part(D.end_date))==+m||+l>=+m&&(u.end_date.getHours()!==0||u.end_date.getMinutes()!==0))&&(l=t.date.add(l,1,"day"))}else m=null,l=null;g[p[0]].disabled=w.checked,g[p[0]+g.length/2].disabled=w.checked,E(g,0,m||u.start_date),E(g,4,l||u.end_date)}))}if(f.auto_end_date&&f.event_duration)for(var b=function(){f.auto_end_date&&f.event_duration&&(m=new Date(g[p[3]].value,g[p[2]].value,g[p[1]].value,0,g[p[0]].value),l=new Date(m.getTime()+60*t.config.event_duration*1e3),E(g,4,l))},k=0;k<4;k++)g[k].$_eventAttached||(g[k].$_eventAttached=!0,t.event(g[k],"change",b));function E(D,x,S){for(var N=v._time_values,M=60*S.getHours()+S.getMinutes(),A=M,C=!1,T=0;T";for(var v=0;v
"+t.locale.labels[u[v]]+"
";u=this.config.buttons_right;var m=t.config.rtl;for(v=0;v",c+="
"+t.locale.labels[u[v]]+"
";c+="",c+="",s.innerHTML=c,t.config.drag_lightbox&&(t.event(s.firstChild,"mousedown",t._ready_to_dnd),t.event(s.firstChild,"selectstart",function(b){return b.preventDefault(),!1}),s.firstChild.style.cursor="move",t._init_dnd_events()),this._waiAria.lightboxAttr(s),this.show_cover(),this._cover.insertBefore(s,this._cover.firstChild),this._lightbox=s;var l=this.config.lightbox.sections;for(c="",v=0;v
"+this.locale.labels["button_"+l[v].button]+"
"),this.config.wide_form&&(c+="
");var p=this.locale.labels["section_"+l[v].name];typeof p!="string"&&(p=l[v].name),c+="
"+g+"
"+f.render.call(this,l[v]),c+="
"}}var y=s.getElementsByTagName("div");for(v=0;v
 
-
`}(h),we(h),function(t){t.getRootView=function(){return{view:{render:function(){return{tag:"div",type:1,attrs:{style:"width:100%;height:100%;"},hooks:{didInsert:function(){t.setCurrentView()}},body:[{el:this.el,type:1}]}},init:function(){var r=document.createElement("DIV");r.id="scheduler_"+t.uid(),r.style.width="100%",r.style.height="100%",r.classList.add("dhx_cal_container"),r.cmp="grid",r.innerHTML='
',t.init(r),this.el=r}},type:4}}}(h),ke(h),window.jQuery&&(i=window.jQuery,d=0,n=[],i.fn.dhx_scheduler=function(t){if(typeof t!="string"){var r=[];return this.each(function(){if(this&&this.getAttribute)if(this.getAttribute("dhxscheduler"))r.push(window[this.getAttribute("dhxscheduler")]);else{var s="scheduler";d&&(s="scheduler"+(d+1),window[s]=Scheduler.getSchedulerInstance());var c=window[s];for(var u in this.setAttribute("dhxscheduler",s),t)u!="data"&&(c.config[u]=t[u]);this.getElementsByTagName("div").length||(this.innerHTML='
',this.className+=" dhx_cal_container"),c.init(this,c.config.date,c.config.mode),t.data&&c.parse(t.data),r.push(c),d++}}),r.length===1?r[0]:r}if(n[t])return n[t].apply(this,[]);i.error("Method "+t+" does not exist on jQuery.dhx_scheduler")}),function(t){(function(){var r=t.setCurrentView,s=t.updateView,c=null,u=null,v=function(f,g){var p=this;P.clearTimeout(u),P.clearTimeout(c);var y=p._date,w=p._mode;l(this,f,g),u=setTimeout(function(){t.$destroyed||(p.callEvent("onBeforeViewChange",[w,y,g||p._mode,f||p._date])?(s.call(p,f,g),p.callEvent("onViewChange",[p._mode,p._date]),P.clearTimeout(c),u=0):l(p,y,w))},t.config.delay_render)},m=function(f,g){var p=this,y=arguments;l(this,f,g),P.clearTimeout(c),c=setTimeout(function(){t.$destroyed||u||s.apply(p,y)},t.config.delay_render)};function l(f,g,p){g&&(f._date=g),p&&(f._mode=p)}t.attachEvent("onSchedulerReady",function(){t.config.delay_render?(t.setCurrentView=v,t.updateView=m):(t.setCurrentView=r,t.updateView=s)})})()}(h),function(t){t.createDataProcessor=function(r){var s,c;r instanceof Function?s=r:r.hasOwnProperty("router")?s=r.router:r.hasOwnProperty("event")&&(s=r),c=s?"CUSTOM":r.mode||"REST-JSON";var u=new Z(r.url);return u.init(t),u.setTransactionMode({mode:c,router:s},r.batchUpdate),u},t.DataProcessor=Z}(h),function(t){t.attachEvent("onSchedulerReady",function(){typeof dhtmlxError<"u"&&window.dhtmlxError.catchError("LoadXML",function(r,s,c){var u=c[0].responseText;switch(t.config.ajax_error){case"alert":P.alert(u);break;case"console":P.console.log(u)}})})}(h);const _=new qe({en:$e,ar:Se,be:Ne,ca:Me,cn:Ae,cs:Ce,da:Te,de:Oe,el:He,es:Le,fi:ze,fr:je,he:Pe,hu:Ve,id:Ie,it:Be,jp:Re,nb:Fe,nl:Je,no:Ue,pl:Ye,pt:We,ro:Ke,ru:Ge,si:Xe,sk:Ze,sv:Qe,tr:et,ua:tt});h.i18n={addLocale:_.addLocale,setLocale:function(t){if(typeof t=="string"){var r=_.getLocale(t);r||(r=_.getLocale("en")),h.locale=r}else if(t)if(h.locale)for(var s in t)t[s]&&typeof t[s]=="object"?(h.locale[s]||(h.locale[s]={}),h.mixin(h.locale[s],t[s],!0)):h.locale[s]=t[s];else h.locale=t;var c=h.locale.labels;c.dhx_save_btn=c.icon_save,c.dhx_cancel_btn=c.icon_cancel,c.dhx_delete_btn=c.icon_delete,h.$container&&h.get_elements()},getLocale:_.getLocale},h.i18n.setLocale("en"),h.ext={};const o={};return h.plugins=function(t){(function(s,c,u){const v=[];for(const m in s)if(s[m]){const l=m.toLowerCase();c[l]&&c[l].forEach(function(f){const g=f.toLowerCase();s[g]||v.push(g)}),v.push(l)}return v.sort(function(m,l){const f=u[m]||0,g=u[l]||0;return f>g?1:f
';var d=document.createElement("DIV");return d.id="dhxSchedObj_"+this._genStr(12),d.innerHTML='
'+a+'
',document.body.appendChild(d.firstChild),this.attachObject(d.id,!1,!0),this.vs[this.av].sched=i,this.vs[this.av].schedId=d.id,i.setSizes=i.updateView,i.destructor=function(){},i.init(d.id,e,h),this.vs[this._viewRestore()].sched});const q=(e,h)=>{h(!1,`The ${e} extension is not included in this version of dhtmlxScheduler.
+
`}(h),we(h),function(t){t.getRootView=function(){return{view:{render:function(){return{tag:"div",type:1,attrs:{style:"width:100%;height:100%;"},hooks:{didInsert:function(){t.setCurrentView()}},body:[{el:this.el,type:1}]}},init:function(){var n=document.createElement("DIV");n.id="scheduler_"+t.uid(),n.style.width="100%",n.style.height="100%",n.classList.add("dhx_cal_container"),n.cmp="grid",n.innerHTML='
',t.init(n),this.el=n}},type:4}}}(h),ke(h),window.jQuery&&(r=window.jQuery,d=0,i=[],r.fn.dhx_scheduler=function(t){if(typeof t!="string"){var n=[];return this.each(function(){if(this&&this.getAttribute)if(this.getAttribute("dhxscheduler"))n.push(window[this.getAttribute("dhxscheduler")]);else{var s="scheduler";d&&(s="scheduler"+(d+1),window[s]=Scheduler.getSchedulerInstance());var c=window[s];for(var u in this.setAttribute("dhxscheduler",s),t)u!="data"&&(c.config[u]=t[u]);this.getElementsByTagName("div").length||(this.innerHTML='
',this.className+=" dhx_cal_container"),c.init(this,c.config.date,c.config.mode),t.data&&c.parse(t.data),n.push(c),d++}}),n.length===1?n[0]:n}if(i[t])return i[t].apply(this,[]);r.error("Method "+t+" does not exist on jQuery.dhx_scheduler")}),function(t){(function(){var n=t.setCurrentView,s=t.updateView,c=null,u=null,v=function(f,g){var p=this;P.clearTimeout(u),P.clearTimeout(c);var y=p._date,w=p._mode;l(this,f,g),u=setTimeout(function(){t.$destroyed||(p.callEvent("onBeforeViewChange",[w,y,g||p._mode,f||p._date])?(s.call(p,f,g),p.callEvent("onViewChange",[p._mode,p._date]),P.clearTimeout(c),u=0):l(p,y,w))},t.config.delay_render)},m=function(f,g){var p=this,y=arguments;l(this,f,g),P.clearTimeout(c),c=setTimeout(function(){t.$destroyed||u||s.apply(p,y)},t.config.delay_render)};function l(f,g,p){g&&(f._date=g),p&&(f._mode=p)}t.attachEvent("onSchedulerReady",function(){t.config.delay_render?(t.setCurrentView=v,t.updateView=m):(t.setCurrentView=n,t.updateView=s)})})()}(h),function(t){t.createDataProcessor=function(n){var s,c;n instanceof Function?s=n:n.hasOwnProperty("router")?s=n.router:n.hasOwnProperty("event")&&(s=n),c=s?"CUSTOM":n.mode||"REST-JSON";var u=new Z(n.url);return u.init(t),u.setTransactionMode({mode:c,router:s},n.batchUpdate),u},t.DataProcessor=Z}(h),function(t){t.attachEvent("onSchedulerReady",function(){typeof dhtmlxError<"u"&&window.dhtmlxError.catchError("LoadXML",function(n,s,c){var u=c[0].responseText;switch(t.config.ajax_error){case"alert":P.alert(u);break;case"console":P.console.log(u)}})})}(h);const _=new qe({en:He,ar:Se,be:Ne,ca:Me,cn:Ae,cs:Ce,da:Te,de:Oe,el:$e,es:Le,fi:ze,fr:je,he:Pe,hu:Ve,id:Ie,it:Be,jp:Re,nb:Fe,nl:Je,no:Ue,pl:Ye,pt:We,ro:Ke,ru:Ge,si:Xe,sk:Ze,sv:Qe,tr:et,ua:tt});h.i18n={addLocale:_.addLocale,setLocale:function(t){if(typeof t=="string"){var n=_.getLocale(t);n||(n=_.getLocale("en")),h.locale=n}else if(t)if(h.locale)for(var s in t)t[s]&&typeof t[s]=="object"?(h.locale[s]||(h.locale[s]={}),h.mixin(h.locale[s],t[s],!0)):h.locale[s]=t[s];else h.locale=t;var c=h.locale.labels;c.dhx_save_btn=c.icon_save,c.dhx_cancel_btn=c.icon_cancel,c.dhx_delete_btn=c.icon_delete,h.$container&&h.get_elements()},getLocale:_.getLocale},h.i18n.setLocale("en"),h.ext={};const o={};return h.plugins=function(t){(function(s,c,u){const v=[];for(const m in s)if(s[m]){const l=m.toLowerCase();c[l]&&c[l].forEach(function(f){const g=f.toLowerCase();s[g]||v.push(g)}),v.push(l)}return v.sort(function(m,l){const f=u[m]||0,g=u[l]||0;return f>g?1:f
';var d=document.createElement("DIV");return d.id="dhxSchedObj_"+this._genStr(12),d.innerHTML='
'+a+'
',document.body.appendChild(d.firstChild),this.attachObject(d.id,!1,!0),this.vs[this.av].sched=r,this.vs[this.av].schedId=d.id,r.setSizes=r.updateView,r.destructor=function(){},r.init(d.id,e,h),this.vs[this._viewRestore()].sched});const q=(e,h)=>{h(!1,`The ${e} extension is not included in this version of dhtmlxScheduler.
You may need a Professional version of the component.
- Contact us at https://dhtmlx.com/docs/contact.shtml if you have any questions.`)};function rt(e){(function(){var h=[];function a(){return!!h.length}function i(o){setTimeout(function(){if(e.$destroyed)return!0;a()||function(t,r){for(;t&&t!=r;)t=t.parentNode;return t==r}(document.activeElement,e.$container)||e.focus()},1)}function d(o){var t=(o=o||window.event).currentTarget;t==h[h.length-1]&&e.$keyboardNavigation.trapFocus(t,o)}if(e.attachEvent("onLightbox",function(){var o;o=e.getLightbox(),e.eventRemove(o,"keydown",d),e.event(o,"keydown",d),h.push(o)}),e.attachEvent("onAfterLightbox",function(){var o=h.pop();o&&e.eventRemove(o,"keydown",d),i()}),e.attachEvent("onAfterQuickInfo",function(){i()}),!e._keyNavMessagePopup){e._keyNavMessagePopup=!0;var n=null,_=null;const o=[];e.attachEvent("onMessagePopup",function(t){for(n=document.activeElement,_=n;_&&e._getClassName(_).indexOf("dhx_cal_data")<0;)_=_.parentNode;_&&(_=_.parentNode),e.eventRemove(t,"keydown",d),e.event(t,"keydown",d),o.push(t)}),e.attachEvent("onAfterMessagePopup",function(){var t=o.pop();t&&e.eventRemove(t,"keydown",d),setTimeout(function(){if(e.$destroyed)return!0;for(var r=document.activeElement;r&&e._getClassName(r).indexOf("dhx_cal_light")<0;)r=r.parentNode;r||(n&&n.parentNode?n.focus():_&&_.parentNode&&_.focus(),n=null,_=null)},1)})}e.$keyboardNavigation.isModal=a})()}function ot(e){e._temp_key_scope=function(){e.config.key_nav=!0,e.$keyboardNavigation._pasteDate=null,e.$keyboardNavigation._pasteSection=null;var h=null,a={};function i(_){_=_||window.event,a.x=_.clientX,a.y=_.clientY}function d(){for(var _,o,t=document.elementFromPoint(a.x,a.y);t&&t!=e._obj;)t=t.parentNode;return _=t==e._obj,o=e.$keyboardNavigation.dispatcher.isEnabled(),_||o}function n(_){return e._lame_copy({},_)}document.body?e.event(document.body,"mousemove",i):e.event(window,"load",function(){e.event(document.body,"mousemove",i)}),e.attachEvent("onMouseMove",function(_,o){var t=e.getState();if(t.mode&&t.min_date){var r=e.getActionData(o);e.$keyboardNavigation._pasteDate=r.date,e.$keyboardNavigation._pasteSection=r.section}}),e._make_pasted_event=function(_){var o=e.$keyboardNavigation._pasteDate,t=e.$keyboardNavigation._pasteSection,r=_.end_date-_.start_date,s=n(_);if(function(u){delete u.rec_type,delete u.rec_pattern,delete u.event_pid,delete u.event_length}(s),s.start_date=new Date(o),s.end_date=new Date(s.start_date.valueOf()+r),t){var c=e._get_section_property();e.config.multisection?s[c]=_[c]:s[c]=t}return s},e._do_paste=function(_,o,t){e.callEvent("onBeforeEventPasted",[_,o,t])!==!1&&(e.addEvent(o),e.callEvent("onEventPasted",[_,o,t]))},e._is_key_nav_active=function(){return!(!this._is_initialized()||this._is_lightbox_open()||!this.config.key_nav)},e.event(document,"keydown",function(_){(_.ctrlKey||_.metaKey)&&_.keyCode==86&&e._buffer_event&&!e.$keyboardNavigation.dispatcher.isEnabled()&&(e.$keyboardNavigation.dispatcher.isActive=d())}),e._key_nav_copy_paste=function(_){if(!e._is_key_nav_active())return!0;if(_.keyCode==37||_.keyCode==39){_.cancelBubble=!0;var o=e.date.add(e._date,_.keyCode==37?-1:1,e._mode);return e.setCurrentView(o),!0}var t,r=(t=e.$keyboardNavigation.dispatcher.getActiveNode())&&t.eventId?t.eventId:e._select_id;if((_.ctrlKey||_.metaKey)&&_.keyCode==67)return r&&(e._buffer_event=n(e.getEvent(r)),h=!0,e.callEvent("onEventCopied",[e.getEvent(r)])),!0;if((_.ctrlKey||_.metaKey)&&_.keyCode==88&&r){h=!1;var s=e._buffer_event=n(e.getEvent(r));e.updateEvent(s.id),e.callEvent("onEventCut",[s])}if((_.ctrlKey||_.metaKey)&&_.keyCode==86&&d()){if(s=(s=e._buffer_event?e.getEvent(e._buffer_event.id):e._buffer_event)||e._buffer_event){var c=e._make_pasted_event(s);h?(c.id=e.uid(),e._do_paste(h,c,s)):e.callEvent("onBeforeEventChanged",[c,_,!1,s])&&(e._do_paste(h,c,s),h=!0)}return!0}}},e._temp_key_scope()}function st(e){e.$keyboardNavigation.attachSchedulerHandlers=function(){var h,a=e.$keyboardNavigation.dispatcher,i=function(t){if(e.config.key_nav)return a.keyDownHandler(t)},d=function(){a.keepScrollPosition(function(){a.focusGlobalNode()})};e.attachEvent("onDataRender",function(){e.config.key_nav&&a.isEnabled()&&!e.getState().editor_id&&(clearTimeout(h),h=setTimeout(function(){if(e.$destroyed)return!0;a.isEnabled()||a.enable(),n()}))});var n=function(){if(a.isEnabled()){var t=a.getActiveNode();t&&(t.isValid()||(t=t.fallback()),!t||t instanceof e.$keyboardNavigation.MinicalButton||t instanceof e.$keyboardNavigation.MinicalCell||a.keepScrollPosition(function(){t.focus(!0)}))}};function _(t){if(!e.config.key_nav)return!0;var r,s=e.$keyboardNavigation.isChildOf(t.target||t.srcElement,e.$container.querySelector(".dhx_cal_data")),c=e.getActionData(t);e._locate_event(t.target||t.srcElement)?r=new e.$keyboardNavigation.Event(e._locate_event(t.target||t.srcElement)):s&&(r=new e.$keyboardNavigation.TimeSlot,c.date&&s&&(r=r.nextSlot(new e.$keyboardNavigation.TimeSlot(c.date,null,c.section)))),r&&(a.isEnabled()?c.date&&s&&a.delay(function(){a.setActiveNode(r)}):a.activeNode=r)}e.attachEvent("onSchedulerReady",function(){var t=e.$container;e.eventRemove(document,"keydown",i),e.eventRemove(t,"mousedown",_),e.eventRemove(t,"focus",d),e.config.key_nav?(e.event(document,"keydown",i),e.event(t,"mousedown",_),e.event(t,"focus",d),t.setAttribute("tabindex","0")):t.removeAttribute("tabindex")});var o=e.updateEvent;e.updateEvent=function(t){var r=o.apply(this,arguments);if(e.config.key_nav&&a.isEnabled()&&e.getState().select_id==t){var s=new e.$keyboardNavigation.Event(t);e.getState().lightbox_id||function(c){if(e.config.key_nav&&a.isEnabled()){var u=c,v=new e.$keyboardNavigation.Event(u.eventId);if(!v.isValid()){var m=v.start||u.start,l=v.end||u.end,f=v.section||u.section;(v=new e.$keyboardNavigation.TimeSlot(m,l,f)).isValid()||(v=new e.$keyboardNavigation.TimeSlot)}a.setActiveNode(v);var g=a.getActiveNode();g&&g.getNode&&document.activeElement!=g.getNode()&&a.focusNode(a.getActiveNode())}}(s)}return r},e.attachEvent("onEventDeleted",function(t){return e.config.key_nav&&a.isEnabled()&&a.getActiveNode().eventId==t&&a.setActiveNode(new e.$keyboardNavigation.TimeSlot),!0}),e.attachEvent("onClearAll",function(){if(!e.config.key_nav)return!0;a.isEnabled()&&a.getActiveNode()instanceof e.$keyboardNavigation.Event&&a.setActiveNode(new e.$keyboardNavigation.TimeSlot)})}}class dt{constructor(h){this._scheduler=h}getNode(){const h=this._scheduler;return this._tooltipNode||(this._tooltipNode=document.createElement("div"),this._tooltipNode.className="dhtmlXTooltip scheduler_tooltip tooltip",h._waiAria.tooltipAttr(this._tooltipNode)),h.config.rtl?this._tooltipNode.classList.add("dhtmlXTooltip_rtl"):this._tooltipNode.classList.remove("dhtmlXTooltip_rtl"),this._tooltipNode}setViewport(h){return this._root=h,this}show(h,a){const i=this._scheduler,d=i.$domHelpers,n=document.body,_=this.getNode();if(d.isChildOf(_,n)||(this.hide(),n.appendChild(_)),this._isLikeMouseEvent(h)){const o=this._calculateTooltipPosition(h);a=o.top,h=o.left}return _.style.top=a+"px",_.style.left=h+"px",i._waiAria.tooltipVisibleAttr(_),this}hide(){const h=this._scheduler,a=this.getNode();return a&&a.parentNode&&a.parentNode.removeChild(a),h._waiAria.tooltipHiddenAttr(a),this}setContent(h){return this.getNode().innerHTML=h,this}_isLikeMouseEvent(h){return!(!h||typeof h!="object")&&"clientX"in h&&"clientY"in h}_getViewPort(){return this._root||document.body}_calculateTooltipPosition(h){const a=this._scheduler,i=a.$domHelpers,d=this._getViewPortSize(),n=this.getNode(),_={top:0,left:0,width:n.offsetWidth,height:n.offsetHeight,bottom:0,right:0},o=a.config.tooltip_offset_x,t=a.config.tooltip_offset_y,r=document.body,s=i.getRelativeEventPosition(h,r),c=i.getNodePosition(r);s.y+=c.y,_.top=s.y,_.left=s.x,_.top+=t,_.left+=o,_.bottom=_.top+_.height,_.right=_.left+_.width;const u=window.scrollY+r.scrollTop;return _.topd.bottom&&(_.bottom=d.bottom,_.top=_.bottom-_.height),_.leftd.right&&(_.right=d.right,_.left=_.right-_.width),s.x>=_.left&&s.x<=_.right&&(_.left=s.x-_.width-o,_.right=_.left+_.width),s.y>=_.top&&s.y<=_.bottom&&(_.top=s.y-_.height-t,_.bottom=_.top+_.height),_}_getViewPortSize(){const h=this._scheduler,a=h.$domHelpers,i=this._getViewPort();let d,n=i,_=window.scrollY+document.body.scrollTop,o=window.scrollX+document.body.scrollLeft;return i===h.$event_data?(n=h.$event,_=0,o=0,d=a.getNodePosition(h.$event)):d=a.getNodePosition(n),{left:d.x+o,top:d.y+_,width:d.width,height:d.height,bottom:d.y+d.height+_,right:d.x+d.width+o}}}class _t{constructor(h){this._listeners={},this.tooltip=new dt(h),this._scheduler=h,this._domEvents=h._createDomEventScope(),this._initDelayedFunctions()}destructor(){this.tooltip.hide(),this._domEvents.detachAll()}hideTooltip(){this.delayHide()}attach(h){let a=document.body;const i=this._scheduler,d=i.$domHelpers;h.global||(a=i.$root);let n=null;const _=o=>{const t=d.getTargetNode(o),r=d.closest(t,h.selector);if(d.isChildOf(t,this.tooltip.getNode()))return;const s=()=>{n=r,h.onmouseenter(o,r)};n?r&&r===n?h.onmousemove(o,r):(h.onmouseleave(o,n),n=null,r&&r!==n&&s()):r&&s()};this.detach(h.selector),this._domEvents.attach(a,"mousemove",_),this._listeners[h.selector]={node:a,handler:_}}detach(h){const a=this._listeners[h];a&&this._domEvents.detach(a.node,"mousemove",a.handler)}tooltipFor(h){const a=i=>{let d=i;return document.createEventObject&&!document.createEvent&&(d=document.createEventObject(i)),d};this._initDelayedFunctions(),this.attach({selector:h.selector,global:h.global,onmouseenter:(i,d)=>{const n=h.html(i,d);n&&this.delayShow(a(i),n)},onmousemove:(i,d)=>{const n=h.html(i,d);n?this.delayShow(a(i),n):(this.delayShow.$cancelTimeout(),this.delayHide())},onmouseleave:()=>{this.delayShow.$cancelTimeout(),this.delayHide()}})}_initDelayedFunctions(){const h=this._scheduler;this.delayShow&&this.delayShow.$cancelTimeout(),this.delayHide&&this.delayHide.$cancelTimeout(),this.tooltip.hide(),this.delayShow=B.delay((a,i)=>{h.callEvent("onBeforeTooltip",[a])===!1?this.tooltip.hide():(this.tooltip.setContent(i),this.tooltip.show(a))},h.config.tooltip_timeout||1),this.delayHide=B.delay(()=>{this.delayShow.$cancelTimeout(),this.tooltip.hide()},h.config.tooltip_hide_timeout||1)}}const lt={active_links:function(e){e.config.active_link_view="day",e._active_link_click=function(h){var a=h.target.getAttribute("data-link-date"),i=e.date.str_to_date(e.config.api_date,!1,!0);if(a)return e.setCurrentView(i(a),e.config.active_link_view),h&&h.preventDefault&&h.preventDefault(),!1},e.attachEvent("onTemplatesReady",function(){var h=function(i,d){d=d||i+"_scale_date",e.templates["_active_links_old_"+d]||(e.templates["_active_links_old_"+d]=e.templates[d]);var n=e.templates["_active_links_old_"+d],_=e.date.date_to_str(e.config.api_date);e.templates[d]=function(o){return""+n(o)+""}};if(h("week"),h("","month_day"),this.matrix)for(var a in this.matrix)h(a);this._detachDomEvent(this._obj,"click",e._active_link_click),e.event(this._obj,"click",e._active_link_click)})},agenda_legacy:function(e){e.date.add_agenda_legacy=function(h){return e.date.add(h,1,"year")},e.templates.agenda_legacy_time=function(h,a,i){return i._timed?this.day_date(i.start_date,i.end_date,i)+" "+this.event_date(h):e.templates.day_date(h)+" – "+e.templates.day_date(a)},e.templates.agenda_legacy_text=function(h,a,i){return i.text},e.templates.agenda_legacy_date=function(){return""},e.date.agenda_legacy_start=function(){return e.date.date_part(e._currentDate())},e.attachEvent("onTemplatesReady",function(){var h=e.dblclick_dhx_cal_data;e.dblclick_dhx_cal_data=function(){if(this._mode=="agenda_legacy")!this.config.readonly&&this.config.dblclick_create&&this.addEventNow();else if(h)return h.apply(this,arguments)};var a=e.render_data;e.render_data=function(n){if(this._mode!="agenda_legacy")return a.apply(this,arguments);d()};var i=e.render_view_data;function d(){var n=e.get_visible_events();n.sort(function(g,p){return g.start_date>p.start_date?1:-1});for(var _,o="
",t=0;t
"+(e.config.rtl?e.templates.agenda_time(r.end_date,r.start_date,r):e.templates.agenda_time(r.start_date,r.end_date,r))+"
",o+=`
+ Contact us at https://dhtmlx.com/docs/contact.shtml if you have any questions.`)};function rt(e){(function(){var h=[];function a(){return!!h.length}function r(o){setTimeout(function(){if(e.$destroyed)return!0;a()||function(t,n){for(;t&&t!=n;)t=t.parentNode;return t==n}(document.activeElement,e.$container)||e.focus()},1)}function d(o){var t=(o=o||window.event).currentTarget;t==h[h.length-1]&&e.$keyboardNavigation.trapFocus(t,o)}if(e.attachEvent("onLightbox",function(){var o;o=e.getLightbox(),e.eventRemove(o,"keydown",d),e.event(o,"keydown",d),h.push(o)}),e.attachEvent("onAfterLightbox",function(){var o=h.pop();o&&e.eventRemove(o,"keydown",d),r()}),e.attachEvent("onAfterQuickInfo",function(){r()}),!e._keyNavMessagePopup){e._keyNavMessagePopup=!0;var i=null,_=null;const o=[];e.attachEvent("onMessagePopup",function(t){for(i=document.activeElement,_=i;_&&e._getClassName(_).indexOf("dhx_cal_data")<0;)_=_.parentNode;_&&(_=_.parentNode),e.eventRemove(t,"keydown",d),e.event(t,"keydown",d),o.push(t)}),e.attachEvent("onAfterMessagePopup",function(){var t=o.pop();t&&e.eventRemove(t,"keydown",d),setTimeout(function(){if(e.$destroyed)return!0;for(var n=document.activeElement;n&&e._getClassName(n).indexOf("dhx_cal_light")<0;)n=n.parentNode;n||(i&&i.parentNode?i.focus():_&&_.parentNode&&_.focus(),i=null,_=null)},1)})}e.$keyboardNavigation.isModal=a})()}function ot(e){e._temp_key_scope=function(){e.config.key_nav=!0,e.$keyboardNavigation._pasteDate=null,e.$keyboardNavigation._pasteSection=null;var h=null,a={};function r(_){_=_||window.event,a.x=_.clientX,a.y=_.clientY}function d(){for(var _,o,t=document.elementFromPoint(a.x,a.y);t&&t!=e._obj;)t=t.parentNode;return _=t==e._obj,o=e.$keyboardNavigation.dispatcher.isEnabled(),_||o}function i(_){return e._lame_copy({},_)}document.body?e.event(document.body,"mousemove",r):e.event(window,"load",function(){e.event(document.body,"mousemove",r)}),e.attachEvent("onMouseMove",function(_,o){var t=e.getState();if(t.mode&&t.min_date){var n=e.getActionData(o);e.$keyboardNavigation._pasteDate=n.date,e.$keyboardNavigation._pasteSection=n.section}}),e._make_pasted_event=function(_){var o=e.$keyboardNavigation._pasteDate,t=e.$keyboardNavigation._pasteSection,n=_.end_date-_.start_date,s=i(_);if(function(u){delete u.rec_type,delete u.rec_pattern,delete u.event_pid,delete u.event_length}(s),s.start_date=new Date(o),s.end_date=new Date(s.start_date.valueOf()+n),t){var c=e._get_section_property();e.config.multisection?s[c]=_[c]:s[c]=t}return s},e._do_paste=function(_,o,t){e.callEvent("onBeforeEventPasted",[_,o,t])!==!1&&(e.addEvent(o),e.callEvent("onEventPasted",[_,o,t]))},e._is_key_nav_active=function(){return!(!this._is_initialized()||this._is_lightbox_open()||!this.config.key_nav)},e.event(document,"keydown",function(_){(_.ctrlKey||_.metaKey)&&_.keyCode==86&&e._buffer_event&&!e.$keyboardNavigation.dispatcher.isEnabled()&&(e.$keyboardNavigation.dispatcher.isActive=d())}),e._key_nav_copy_paste=function(_){if(!e._is_key_nav_active())return!0;if(_.keyCode==37||_.keyCode==39){_.cancelBubble=!0;var o=e.date.add(e._date,_.keyCode==37?-1:1,e._mode);return e.setCurrentView(o),!0}var t,n=(t=e.$keyboardNavigation.dispatcher.getActiveNode())&&t.eventId?t.eventId:e._select_id;if((_.ctrlKey||_.metaKey)&&_.keyCode==67)return n&&(e._buffer_event=i(e.getEvent(n)),h=!0,e.callEvent("onEventCopied",[e.getEvent(n)])),!0;if((_.ctrlKey||_.metaKey)&&_.keyCode==88&&n){h=!1;var s=e._buffer_event=i(e.getEvent(n));e.updateEvent(s.id),e.callEvent("onEventCut",[s])}if((_.ctrlKey||_.metaKey)&&_.keyCode==86&&d()){if(s=(s=e._buffer_event?e.getEvent(e._buffer_event.id):e._buffer_event)||e._buffer_event){var c=e._make_pasted_event(s);h?(c.id=e.uid(),e._do_paste(h,c,s)):e.callEvent("onBeforeEventChanged",[c,_,!1,s])&&(e._do_paste(h,c,s),h=!0)}return!0}}},e._temp_key_scope()}function st(e){e.$keyboardNavigation.attachSchedulerHandlers=function(){var h,a=e.$keyboardNavigation.dispatcher,r=function(t){if(e.config.key_nav)return a.keyDownHandler(t)},d=function(){a.keepScrollPosition(function(){a.focusGlobalNode()})};e.attachEvent("onDataRender",function(){e.config.key_nav&&a.isEnabled()&&!e.getState().editor_id&&(clearTimeout(h),h=setTimeout(function(){if(e.$destroyed)return!0;a.isEnabled()||a.enable(),i()}))});var i=function(){if(a.isEnabled()){var t=a.getActiveNode();t&&(t.isValid()||(t=t.fallback()),!t||t instanceof e.$keyboardNavigation.MinicalButton||t instanceof e.$keyboardNavigation.MinicalCell||a.keepScrollPosition(function(){t.focus(!0)}))}};function _(t){if(!e.config.key_nav)return!0;const n=e.getView();let s=!1;if(e.getState().mode==="month")s=e.$keyboardNavigation.isChildOf(t.target||t.srcElement,e.$container.querySelector(".dhx_cal_month_table"));else if(n&&n.layout==="timeline")s=e.$keyboardNavigation.isChildOf(t.target||t.srcElement,e.$container.querySelector(".dhx_timeline_data_col"));else{const v=e.$container.querySelectorAll(".dhx_scale_holder");s=Array.from(v).some(m=>m===t.target.parentNode)}var c,u=e.getActionData(t);e._locate_event(t.target||t.srcElement)?c=new e.$keyboardNavigation.Event(e._locate_event(t.target||t.srcElement)):s&&(c=new e.$keyboardNavigation.TimeSlot,u.date&&s&&(c=c.nextSlot(new e.$keyboardNavigation.TimeSlot(u.date,null,u.section)))),c&&(a.isEnabled()?u.date&&s&&a.delay(function(){a.setActiveNode(c)}):a.activeNode=c)}e.attachEvent("onSchedulerReady",function(){var t=e.$container;e.eventRemove(document,"keydown",r),e.eventRemove(t,"mousedown",_),e.eventRemove(t,"focus",d),e.config.key_nav?(e.event(document,"keydown",r),e.event(t,"mousedown",_),e.event(t,"focus",d),t.setAttribute("tabindex","0")):t.removeAttribute("tabindex")});var o=e.updateEvent;e.updateEvent=function(t){var n=o.apply(this,arguments);if(e.config.key_nav&&a.isEnabled()&&e.getState().select_id==t){var s=new e.$keyboardNavigation.Event(t);e.getState().lightbox_id||function(c){if(e.config.key_nav&&a.isEnabled()){var u=c,v=new e.$keyboardNavigation.Event(u.eventId);if(!v.isValid()){var m=v.start||u.start,l=v.end||u.end,f=v.section||u.section;(v=new e.$keyboardNavigation.TimeSlot(m,l,f)).isValid()||(v=new e.$keyboardNavigation.TimeSlot)}a.setActiveNode(v);var g=a.getActiveNode();g&&g.getNode&&document.activeElement!=g.getNode()&&a.focusNode(a.getActiveNode())}}(s)}return n},e.attachEvent("onEventDeleted",function(t){return e.config.key_nav&&a.isEnabled()&&a.getActiveNode().eventId==t&&a.setActiveNode(new e.$keyboardNavigation.TimeSlot),!0}),e.attachEvent("onClearAll",function(){if(!e.config.key_nav)return!0;a.isEnabled()&&a.getActiveNode()instanceof e.$keyboardNavigation.Event&&a.setActiveNode(new e.$keyboardNavigation.TimeSlot)})}}class dt{constructor(h){this._scheduler=h}getNode(){const h=this._scheduler;return this._tooltipNode||(this._tooltipNode=document.createElement("div"),this._tooltipNode.className="dhtmlXTooltip scheduler_tooltip tooltip",h._waiAria.tooltipAttr(this._tooltipNode)),h.config.rtl?this._tooltipNode.classList.add("dhtmlXTooltip_rtl"):this._tooltipNode.classList.remove("dhtmlXTooltip_rtl"),this._tooltipNode}setViewport(h){return this._root=h,this}show(h,a){const r=this._scheduler,d=r.$domHelpers,i=document.body,_=this.getNode();if(d.isChildOf(_,i)||(this.hide(),i.appendChild(_)),this._isLikeMouseEvent(h)){const o=this._calculateTooltipPosition(h);a=o.top,h=o.left}return _.style.top=a+"px",_.style.left=h+"px",r._waiAria.tooltipVisibleAttr(_),this}hide(){const h=this._scheduler,a=this.getNode();return a&&a.parentNode&&a.parentNode.removeChild(a),h._waiAria.tooltipHiddenAttr(a),this}setContent(h){return this.getNode().innerHTML=h,this}_isLikeMouseEvent(h){return!(!h||typeof h!="object")&&"clientX"in h&&"clientY"in h}_getViewPort(){return this._root||document.body}_calculateTooltipPosition(h){const a=this._scheduler,r=a.$domHelpers,d=this._getViewPortSize(),i=this.getNode(),_={top:0,left:0,width:i.offsetWidth,height:i.offsetHeight,bottom:0,right:0},o=a.config.tooltip_offset_x,t=a.config.tooltip_offset_y,n=document.body,s=r.getRelativeEventPosition(h,n),c=r.getNodePosition(n);s.y+=c.y,_.top=s.y,_.left=s.x,_.top+=t,_.left+=o,_.bottom=_.top+_.height,_.right=_.left+_.width;const u=window.scrollY+n.scrollTop;return _.topd.bottom&&(_.bottom=d.bottom,_.top=_.bottom-_.height),_.leftd.right&&(_.right=d.right,_.left=_.right-_.width),s.x>=_.left&&s.x<=_.right&&(_.left=s.x-_.width-o,_.right=_.left+_.width),s.y>=_.top&&s.y<=_.bottom&&(_.top=s.y-_.height-t,_.bottom=_.top+_.height),_}_getViewPortSize(){const h=this._scheduler,a=h.$domHelpers,r=this._getViewPort();let d,i=r,_=window.scrollY+document.body.scrollTop,o=window.scrollX+document.body.scrollLeft;return r===h.$event_data?(i=h.$event,_=0,o=0,d=a.getNodePosition(h.$event)):d=a.getNodePosition(i),{left:d.x+o,top:d.y+_,width:d.width,height:d.height,bottom:d.y+d.height+_,right:d.x+d.width+o}}}class _t{constructor(h){this._listeners={},this.tooltip=new dt(h),this._scheduler=h,this._domEvents=h._createDomEventScope(),this._initDelayedFunctions()}destructor(){this.tooltip.hide(),this._domEvents.detachAll()}hideTooltip(){this.delayHide()}attach(h){let a=document.body;const r=this._scheduler,d=r.$domHelpers;h.global||(a=r.$root);let i=null;const _=o=>{const t=d.getTargetNode(o),n=d.closest(t,h.selector);if(d.isChildOf(t,this.tooltip.getNode()))return;const s=()=>{i=n,h.onmouseenter(o,n)};i?n&&n===i?h.onmousemove(o,n):(h.onmouseleave(o,i),i=null,n&&n!==i&&s()):n&&s()};this.detach(h.selector),this._domEvents.attach(a,"mousemove",_),this._listeners[h.selector]={node:a,handler:_}}detach(h){const a=this._listeners[h];a&&this._domEvents.detach(a.node,"mousemove",a.handler)}tooltipFor(h){const a=r=>{let d=r;return document.createEventObject&&!document.createEvent&&(d=document.createEventObject(r)),d};this._initDelayedFunctions(),this.attach({selector:h.selector,global:h.global,onmouseenter:(r,d)=>{const i=h.html(r,d);i&&this.delayShow(a(r),i)},onmousemove:(r,d)=>{const i=h.html(r,d);i?this.delayShow(a(r),i):(this.delayShow.$cancelTimeout(),this.delayHide())},onmouseleave:()=>{this.delayShow.$cancelTimeout(),this.delayHide()}})}_initDelayedFunctions(){const h=this._scheduler;this.delayShow&&this.delayShow.$cancelTimeout(),this.delayHide&&this.delayHide.$cancelTimeout(),this.tooltip.hide(),this.delayShow=I.delay((a,r)=>{h.callEvent("onBeforeTooltip",[a])===!1?this.tooltip.hide():(this.tooltip.setContent(r),this.tooltip.show(a))},h.config.tooltip_timeout||1),this.delayHide=I.delay(()=>{this.delayShow.$cancelTimeout(),this.tooltip.hide()},h.config.tooltip_hide_timeout||1)}}const lt={active_links:function(e){e.config.active_link_view="day",e._active_link_click=function(h){var a=h.target.getAttribute("data-link-date"),r=e.date.str_to_date(e.config.api_date,!1,!0);if(a)return e.setCurrentView(r(a),e.config.active_link_view),h&&h.preventDefault&&h.preventDefault(),!1},e.attachEvent("onTemplatesReady",function(){var h=function(r,d){d=d||r+"_scale_date",e.templates["_active_links_old_"+d]||(e.templates["_active_links_old_"+d]=e.templates[d]);var i=e.templates["_active_links_old_"+d],_=e.date.date_to_str(e.config.api_date);e.templates[d]=function(o){return""+i(o)+""}};if(h("week"),h("","month_day"),this.matrix)for(var a in this.matrix)h(a);this._detachDomEvent(this._obj,"click",e._active_link_click),e.event(this._obj,"click",e._active_link_click)})},agenda_legacy:function(e){e.date.add_agenda_legacy=function(h){return e.date.add(h,1,"year")},e.templates.agenda_legacy_time=function(h,a,r){return r._timed?this.day_date(r.start_date,r.end_date,r)+" "+this.event_date(h):e.templates.day_date(h)+" – "+e.templates.day_date(a)},e.templates.agenda_legacy_text=function(h,a,r){return r.text},e.templates.agenda_legacy_date=function(){return""},e.date.agenda_legacy_start=function(){return e.date.date_part(e._currentDate())},e.attachEvent("onTemplatesReady",function(){var h=e.dblclick_dhx_cal_data;e.dblclick_dhx_cal_data=function(){if(this._mode=="agenda_legacy")!this.config.readonly&&this.config.dblclick_create&&this.addEventNow();else if(h)return h.apply(this,arguments)};var a=e.render_data;e.render_data=function(i){if(this._mode!="agenda_legacy")return a.apply(this,arguments);d()};var r=e.render_view_data;function d(){var i=e.get_visible_events();i.sort(function(g,p){return g.start_date>p.start_date?1:-1});for(var _,o="
",t=0;t
"+(e.config.rtl?e.templates.agenda_time(n.end_date,n.start_date,n):e.templates.agenda_time(n.start_date,n.end_date,n))+"
",o+=`
-
`,o+=""+e.templates.agenda_text(r.start_date,r.end_date,r)+"
"}o+="
",e._els.dhx_cal_data[0].innerHTML=o,e._els.dhx_cal_data[0].childNodes[0].scrollTop=e._agendaScrollTop||0;var m=e._els.dhx_cal_data[0].childNodes[0];m.childNodes[m.childNodes.length-1].style.height=m.offsetHeight
"+o.date+"
"+o.description+"
",e._table_view=!0,e.set_sizes()}}(n),n?(e._cols=null,e._colsS=null,e._table_view=!0,d()):e._table_view=!1}})},agenda_view:function(e){e.date.add_agenda=function(d,n){return e.date.add(d,1*n,"month")},e.templates.agenda_time=function(d,n,_){return _._timed?`${this.event_date(d)} - ${this.event_date(n)}`:e.locale.labels.full_day},e.templates.agenda_text=function(d,n,_){return _.text};const h=e.date.date_to_str("%F %j"),a=e.date.date_to_str("%l");e.templates.agenda_day=function(d){return`
${h(d)}
-
${a(d)}
`},e.templates.agenda_date=function(d,n){return e.templates.month_date(e.getState().date)},e.date.agenda_start=function(d){return e.date.month_start(new Date(d))};let i=0;e.attachEvent("onTemplatesReady",function(){var d=e.dblclick_dhx_cal_data;e.dblclick_dhx_cal_data=function(){if(this._mode=="agenda")!this.config.readonly&&this.config.dblclick_create&&this.addEventNow();else if(d)return d.apply(this,arguments)};var n=e.render_data;e.render_data=function(r){if(this._mode!="agenda")return n.apply(this,arguments);o()};var _=e.render_view_data;function o(){const r=e.get_visible_events();r.sort(function(m,l){return m.start_date>l.start_date?1:-1});const s={};let c=e.getState().min_date;const u=e.getState().max_date;for(;c.valueOf(){let l=e.date.day_start(new Date(m.start_date));for(;l.valueOf()${e.locale.labels.agenda_tab}`;e._els.dhx_cal_data[0].scrollTop=i}function t(r,s){if(!s.length)return"";let c=` + `,o+=""+e.templates.agenda_text(n.start_date,n.end_date,n)+""}o+="
",e._els.dhx_cal_data[0].innerHTML=o,e._els.dhx_cal_data[0].childNodes[0].scrollTop=e._agendaScrollTop||0;var m=e._els.dhx_cal_data[0].childNodes[0];m.childNodes[m.childNodes.length-1].style.height=m.offsetHeight
"+o.date+"
"+o.description+"",e._table_view=!0,e.set_sizes()}}(i),i?(e._cols=null,e._colsS=null,e._table_view=!0,d()):e._table_view=!1}})},agenda_view:function(e){e.date.add_agenda=function(d,i){return e.date.add(d,1*i,"month")},e.templates.agenda_time=function(d,i,_){return _._timed?`${this.event_date(d)} - ${this.event_date(i)}`:e.locale.labels.full_day},e.templates.agenda_text=function(d,i,_){return _.text};const h=e.date.date_to_str("%F %j"),a=e.date.date_to_str("%l");e.templates.agenda_day=function(d){return`
${h(d)}
+
${a(d)}
`},e.templates.agenda_date=function(d,i){return e.templates.month_date(e.getState().date)},e.date.agenda_start=function(d){return e.date.month_start(new Date(d))};let r=0;e.attachEvent("onTemplatesReady",function(){var d=e.dblclick_dhx_cal_data;e.dblclick_dhx_cal_data=function(){if(this._mode=="agenda")!this.config.readonly&&this.config.dblclick_create&&this.addEventNow();else if(d)return d.apply(this,arguments)};var i=e.render_data;e.render_data=function(n){if(this._mode!="agenda")return i.apply(this,arguments);o()};var _=e.render_view_data;function o(){const n=e.get_visible_events();n.sort(function(f,g){return f.start_date>g.start_date?1:-1});const s={};let c=e.getState().min_date;const u=e.getState().max_date;for(;c.valueOf(){let g=e.date.day_start(new Date(f.start_date));for(;g.valueOf()${e.locale.labels.agenda_tab}`;e._els.dhx_cal_data[0].scrollTop=r;let m=e._els.dhx_cal_data[0].querySelectorAll(".dhx_cal_agenda_event_line");e._rendered=[];for(var l=0;l -
${e.templates.agenda_day(r)}
+
${e.templates.agenda_day(n)}
`;return s.forEach(u=>{c+=function(v,m){const l=e.templates.agenda_time(m.start_date,m.end_date,m),f=e.getState().select_id,g=e.templates.event_class(m.start_date,m.end_date,m),p=e.templates.agenda_text(m.start_date,m.end_date,m);let y="";return(m.color||m.textColor)&&(y=` style="${m.color?"--dhx-scheduler-event-background:"+m.color+";":""}${m.textColor?"--dhx-scheduler-event-color:"+m.textColor+";":""}" `),`
${l}
${p}
-
`}(0,u)}),c+="
",c}e.render_view_data=function(){return this._mode=="agenda"&&(i=e._els.dhx_cal_data[0].scrollTop,e._els.dhx_cal_data[0].scrollTop=0),_.apply(this,arguments)},e.agenda_view=function(r){r?(e._min_date=e.config.agenda_start||e.date.agenda_start(e._date),e._max_date=e.config.agenda_end||e.date.add_agenda(e._min_date,1),e._cols=null,e._colsS=null,e._table_view=!0,e._getNavDateElement().innerHTML=e.templates.agenda_date(e._date),o()):e._table_view=!1}})},all_timed:function(e){e.config.all_timed="short",e.config.all_timed_month=!1;var h=function(o){return!((o.end_date-o.start_date)/36e5>=24)||e._drag_mode=="resize"&&e._drag_id==o.id};e._safe_copy=function(o){var t=null,r=e._copy_event(o);return o.event_pid&&(t=e.getEvent(o.event_pid)),t&&t.isPrototypeOf(o)&&(delete r.event_length,delete r.event_pid,delete r.rec_pattern,delete r.rec_type),r};var a=e._pre_render_events_line,i=e._pre_render_events_table,d=function(o,t){return this._table_view?i.call(this,o,t):a.call(this,o,t)};e._pre_render_events_line=e._pre_render_events_table=function(o,t){if(!this.config.all_timed||this._table_view&&this._mode!="month"||this._mode=="month"&&!this.config.all_timed_month)return d.call(this,o,t);for(var r=0;rthis._min_date&&c.start_date+y}function f(p){var y=e.date.add(p,1,"day");return y=e.date.date_part(y)}function g(p,y){var w=e.date.date_part(new Date(p));return w.setHours(y),w}};var n=e.get_visible_events;e.get_visible_events=function(o){return this.config.all_timed&&this.config.multi_day?n.call(this,!1):n.call(this,o)},e.attachEvent("onBeforeViewChange",function(o,t,r,s){return e._allow_dnd=r=="day"||r=="week"||e.getView(r),!0}),e._is_main_area_event=function(o){return!!(o._timed||this.config.all_timed===!0||this.config.all_timed=="short"&&h(o))};var _=e.updateEvent;e.updateEvent=function(o){var t,r,s=e.getEvent(o);s&&(t=e.config.all_timed&&!(e.isOneDayEvent(e._events[o])||e.getState().drag_id))&&(r=e.config.update_render,e.config.update_render=!0),_.apply(e,arguments),s&&t&&(e.config.update_render=r)}},collision:function(e){var h,a;function i(d){e._get_section_view()&&d&&(h=e.getEvent(d)[e._get_section_property()])}e.config.collision_limit=1,e.attachEvent("onBeforeDrag",function(d){return i(d),!0}),e.attachEvent("onBeforeLightbox",function(d){var n=e.getEvent(d);return a=[n.start_date,n.end_date],i(d),!0}),e.attachEvent("onEventChanged",function(d){if(!d||!e.getEvent(d))return!0;var n=e.getEvent(d);if(!e.checkCollision(n)){if(!a)return!1;n.start_date=a[0],n.end_date=a[1],n._timed=this.isOneDayEvent(n)}return!0}),e.attachEvent("onBeforeEventChanged",function(d,n,_){return e.checkCollision(d)}),e.attachEvent("onEventAdded",function(d,n){e.checkCollision(n)||e.deleteEvent(d)}),e.attachEvent("onEventSave",function(d,n,_){if((n=e._lame_clone(n)).id=d,!n.start_date||!n.end_date){var o=e.getEvent(d);n.start_date=new Date(o.start_date),n.end_date=new Date(o.end_date)}return n.rec_type&&e._roll_back_dates(n),e.checkCollision(n)}),e._check_sections_collision=function(d,n){var _=e._get_section_property();return d[_]==n[_]&&d.id!=n.id},e.checkCollision=function(d){var n=[],_=e.config.collision_limit;if(d.rec_type)for(var o=e.getRecDates(d),t=0;t=_&&(l=!1)}else n.length>=_&&(l=!1);if(!l){var g=!e.callEvent("onEventCollision",[d,n]);return g||(d[m]=h||d[m]),g}return l}},container_autoresize:function(e){e.config.container_autoresize=!0,e.config.month_day_min_height=90,e.config.min_grid_size=25,e.config.min_map_size=400;var h=e._pre_render_events,a=!0,i=0,d=0;e._pre_render_events=function(s,c){if(!e.config.container_autoresize||!a)return h.apply(this,arguments);var u=this.xy.bar_height,v=this._colsS.heights,m=this._colsS.heights=[0,0,0,0,0,0,0],l=this._els.dhx_cal_data[0];if(s=this._table_view?this._pre_render_events_table(s,c):this._pre_render_events_line(s,c),this._table_view)if(c)this._colsS.heights=v;else{var f=l.firstChild;const E=f.querySelectorAll(".dhx_cal_month_row");if(E){for(var g=0;gthis._colsS.height-this.xy.month_head_height){var p=E[g].querySelectorAll(".dhx_cal_month_cell"),y=this._colsS.height-this.xy.month_head_height;1*this.config.max_month_events!==this.config.max_month_events||m[g]<=this.config.max_month_events?y=m[g]*u:(this.config.max_month_events+1)*u>this._colsS.height-this.xy.month_head_height&&(y=(this.config.max_month_events+1)*u),E[g].style.height=y+this.xy.month_head_height+"px";for(var w=0;wM&&(M=v.childNodes[A].offsetHeight);m=M}else m=Math.max(v.offsetHeight-1,v.scrollHeight);if(l=="month")e.config.month_day_min_height&&!s&&(m=v.querySelectorAll(".dhx_cal_month_row").length*e.config.month_day_min_height),s&&(v.style.height=m+"px");else if(l=="year")m=190*e.config.year_y;else if(l=="agenda"){if(m=0,v.childNodes&&v.childNodes.length)for(var f=0;fy&&(y=g)}m=3*y}else if(l=="map"){m=0;var D=v.querySelectorAll(".dhx_map_line");for(f=0;f0){var m=document.cookie.indexOf(v);if(m!=-1){m+=v.length;var l=document.cookie.indexOf(";",m);return l==-1&&(l=document.cookie.length),document.cookie.substring(m,l)}}return""}(r);if(s){e._min_date||(e._min_date=o),(s=unescape(s).split("@"))[0]=this._helpers.parseDate(s[0]);var c=this.isViewExists(s[1])?s[1]:_;return o=isNaN(+s[0])?o:s[0],window.setTimeout(function(){e.$destroyed||e.setCurrentView(o,c)},1),!1}}return!0}),e.attachEvent("onViewChange",function(d,n){var _,o,t=h(e),r=escape(this._helpers.formatDate(n)+"@"+d);o=t+"="+r+((_="expires=Sun, 31 Jan 9999 22:00:00 GMT")?"; "+_:""),document.cookie=o});var i=e._load;e._load=function(){var d=arguments;if(e._date)i.apply(this,d);else{var n=this;window.setTimeout(function(){i.apply(n,d)},1)}}},daytimeline:function(e){q("Day Timeline",e.assert)},drag_between:function(e){q("Drag Between",e.assert)},editors:function(e){e.form_blocks.combo={render:function(h){h.cached_options||(h.cached_options={});var a="";return a+="
"},set_value:function(h,a,i,d){(function(){v();var u=e.attachEvent("onAfterLightbox",function(){v(),e.detachEvent(u)});function v(){if(h._combo&&h._combo.DOMParent){var m=h._combo;m.unload?m.unload():m.destructor&&m.destructor(),m.DOMParent=m.DOMelem=null}}})(),window.dhx_globalImgPath=d.image_path||"/",h._combo=new dhtmlXCombo(h,d.name,h.offsetWidth-8),d.onchange&&h._combo.attachEvent("onChange",d.onchange),d.options_height&&h._combo.setOptionHeight(d.options_height);var n=h._combo;if(n.enableFilteringMode(d.filtering,d.script_path||null,!!d.cache),d.script_path){var _=i[d.map_to];_?d.cached_options[_]?(n.addOption(_,d.cached_options[_]),n.disable(1),n.selectOption(0),n.disable(0)):e.ajax.get(d.script_path+"?id="+_+"&uid="+e.uid(),function(u){var v,m=u.xmlDoc.responseText;try{v=JSON.parse(m).options[0].text}catch{v=e.ajax.xpath("//option",u.xmlDoc)[0].childNodes[0].nodeValue}d.cached_options[_]=v,n.addOption(_,v),n.disable(1),n.selectOption(0),n.disable(0)}):n.setComboValue("")}else{for(var o=[],t=0;t`;for(var i=0;i "+h.options[i].label+""}return a+=""},set_value:function(h,a,i,d){for(var n=h.getElementsByTagName("input"),_=0;_':""},set_value:function(h,a,i,d){h=e._lightbox.querySelector(`#${d.id}`);var n=e.uid(),_=d.checked_value!==void 0?a==d.checked_value:!!a;h.className+=" dhx_cal_checkbox";var o="",t="";if(e.config.wide_form?(h.innerHTML=t,h.nextSibling.innerHTML=o):h.innerHTML=o+t,d.handler){var r=h.getElementsByTagName("input")[0];if(r.$_eventAttached)return;r.$_eventAttached=!0,e.event(r,"click",d.handler)}},get_value:function(h,a,i){var d=(h=e._lightbox.querySelector(`#${i.id}`)).getElementsByTagName("input")[0];return d||(d=h.nextSibling.getElementsByTagName("input")[0]),d.checked?i.checked_value||!0:i.unchecked_value||!1},focus:function(h){}}},expand:function(e){e.ext.fullscreen={toggleIcon:null},e.expand=function(){if(e.callEvent("onBeforeExpand",[])){var h=e._obj;do h._position=h.style.position||"",h.style.position="static";while((h=h.parentNode)&&h.style);(h=e._obj).style.position="absolute",h._width=h.style.width,h._height=h.style.height,h.style.width=h.style.height="100%",h.style.top=h.style.left="0px";var a=document.body;a.scrollTop=0,(a=a.parentNode)&&(a.scrollTop=0),document.body._overflow=document.body.style.overflow||"",document.body.style.overflow="hidden",e._maximize(),e.callEvent("onExpand",[])}},e.collapse=function(){if(e.callEvent("onBeforeCollapse",[])){var h=e._obj;do h.style.position=h._position;while((h=h.parentNode)&&h.style);(h=e._obj).style.width=h._width,h.style.height=h._height,document.body.style.overflow=document.body._overflow,e._maximize(),e.callEvent("onCollapse",[])}},e.attachEvent("onTemplatesReady",function(){var h=document.createElement("div");h.className="dhx_expand_icon",e.ext.fullscreen.toggleIcon=h,h.innerHTML=` +`}(0,u)}),c+="",c}e.render_view_data=function(){return this._mode=="agenda"&&(r=e._els.dhx_cal_data[0].scrollTop,e._els.dhx_cal_data[0].scrollTop=0),_.apply(this,arguments)},e.agenda_view=function(n){n?(e._min_date=e.config.agenda_start||e.date.agenda_start(e._date),e._max_date=e.config.agenda_end||e.date.add_agenda(e._min_date,1),e._cols=null,e._colsS=null,e._table_view=!0,e._getNavDateElement().innerHTML=e.templates.agenda_date(e._date),o()):e._table_view=!1}})},all_timed:function(e){e.config.all_timed="short",e.config.all_timed_month=!1;var h=function(o){return!((o.end_date-o.start_date)/36e5>=24)||e._drag_mode=="resize"&&e._drag_id==o.id};e._safe_copy=function(o){var t=null,n=e._copy_event(o);return o.event_pid&&(t=e.getEvent(o.event_pid)),t&&t.isPrototypeOf(o)&&(delete n.event_length,delete n.event_pid,delete n.rec_pattern,delete n.rec_type),n};var a=e._pre_render_events_line,r=e._pre_render_events_table,d=function(o,t){return this._table_view?r.call(this,o,t):a.call(this,o,t)};e._pre_render_events_line=e._pre_render_events_table=function(o,t){if(!this.config.all_timed||this._table_view&&this._mode!="month"||this._mode=="month"&&!this.config.all_timed_month)return d.call(this,o,t);for(var n=0;nthis._min_date&&c.start_date+y}function f(p){var y=e.date.add(p,1,"day");return y=e.date.date_part(y)}function g(p,y){var w=e.date.date_part(new Date(p));return w.setHours(y),w}};var i=e.get_visible_events;e.get_visible_events=function(o){return this.config.all_timed&&this.config.multi_day?i.call(this,!1):i.call(this,o)},e.attachEvent("onBeforeViewChange",function(o,t,n,s){return e._allow_dnd=n=="day"||n=="week"||e.getView(n),!0}),e._is_main_area_event=function(o){return!!(o._timed||this.config.all_timed===!0||this.config.all_timed=="short"&&h(o))};var _=e.updateEvent;e.updateEvent=function(o){var t,n,s=e.getEvent(o);s&&(t=e.config.all_timed&&!(e.isOneDayEvent(e._events[o])||e.getState().drag_id))&&(n=e.config.update_render,e.config.update_render=!0),_.apply(e,arguments),s&&t&&(e.config.update_render=n)}},collision:function(e){var h,a;function r(d){e._get_section_view()&&d&&(h=e.getEvent(d)[e._get_section_property()])}e.config.collision_limit=1,e.attachEvent("onBeforeDrag",function(d){return r(d),!0}),e.attachEvent("onBeforeLightbox",function(d){var i=e.getEvent(d);return a=[i.start_date,i.end_date],r(d),!0}),e.attachEvent("onEventChanged",function(d){if(!d||!e.getEvent(d))return!0;var i=e.getEvent(d);if(!e.checkCollision(i)){if(!a)return!1;i.start_date=a[0],i.end_date=a[1],i._timed=this.isOneDayEvent(i)}return!0}),e.attachEvent("onBeforeEventChanged",function(d,i,_){return e.checkCollision(d)}),e.attachEvent("onEventAdded",function(d,i){e.checkCollision(i)||e.deleteEvent(d)}),e.attachEvent("onEventSave",function(d,i,_){if((i=e._lame_clone(i)).id=d,!i.start_date||!i.end_date){var o=e.getEvent(d);i.start_date=new Date(o.start_date),i.end_date=new Date(o.end_date)}return i.rec_type&&e._roll_back_dates(i),e.checkCollision(i)}),e._check_sections_collision=function(d,i){var _=e._get_section_property();return d[_]==i[_]&&d.id!=i.id},e.checkCollision=function(d){var i=[],_=e.config.collision_limit;if(d.rec_type)for(var o=e.getRecDates(d),t=0;t=_&&(l=!1)}else i.length>=_&&(l=!1);if(!l){var g=!e.callEvent("onEventCollision",[d,i]);return g||(d[m]=h||d[m]),g}return l}},container_autoresize:function(e){e.config.container_autoresize=!0,e.config.month_day_min_height=90,e.config.min_grid_size=25,e.config.min_map_size=400;var h=e._pre_render_events,a=!0,r=0,d=0;e._pre_render_events=function(s,c){if(!e.config.container_autoresize||!a)return h.apply(this,arguments);var u=this.xy.bar_height,v=this._colsS.heights,m=this._colsS.heights=[0,0,0,0,0,0,0],l=this._els.dhx_cal_data[0];if(s=this._table_view?this._pre_render_events_table(s,c):this._pre_render_events_line(s,c),this._table_view)if(c)this._colsS.heights=v;else{var f=l.firstChild;const E=f.querySelectorAll(".dhx_cal_month_row");if(E){for(var g=0;gthis._colsS.height-this.xy.month_head_height){var p=E[g].querySelectorAll(".dhx_cal_month_cell"),y=this._colsS.height-this.xy.month_head_height;1*this.config.max_month_events!==this.config.max_month_events||m[g]<=this.config.max_month_events?y=m[g]*u:(this.config.max_month_events+1)*u>this._colsS.height-this.xy.month_head_height&&(y=(this.config.max_month_events+1)*u),E[g].style.height=y+this.xy.month_head_height+"px";for(var w=0;wM&&(M=v.childNodes[A].offsetHeight);m=M}else m=Math.max(v.offsetHeight-1,v.scrollHeight);if(l=="month")e.config.month_day_min_height&&!s&&(m=v.querySelectorAll(".dhx_cal_month_row").length*e.config.month_day_min_height),s&&(v.style.height=m+"px");else if(l=="year")m=190*e.config.year_y;else if(l=="agenda"){if(m=0,v.childNodes&&v.childNodes.length)for(var f=0;fy&&(y=g)}m=3*y}else if(l=="map"){m=0;var D=v.querySelectorAll(".dhx_map_line");for(f=0;f0){var m=document.cookie.indexOf(v);if(m!=-1){m+=v.length;var l=document.cookie.indexOf(";",m);return l==-1&&(l=document.cookie.length),document.cookie.substring(m,l)}}return""}(n);if(s){e._min_date||(e._min_date=o),(s=unescape(s).split("@"))[0]=this._helpers.parseDate(s[0]);var c=this.isViewExists(s[1])?s[1]:_;return o=isNaN(+s[0])?o:s[0],window.setTimeout(function(){e.$destroyed||e.setCurrentView(o,c)},1),!1}}return!0}),e.attachEvent("onViewChange",function(d,i){var _,o,t=h(e),n=escape(this._helpers.formatDate(i)+"@"+d);o=t+"="+n+((_="expires=Sun, 31 Jan 9999 22:00:00 GMT")?"; "+_:""),document.cookie=o});var r=e._load;e._load=function(){var d=arguments;if(e._date)r.apply(this,d);else{var i=this;window.setTimeout(function(){r.apply(i,d)},1)}}},daytimeline:function(e){q("Day Timeline",e.assert)},drag_between:function(e){q("Drag Between",e.assert)},editors:function(e){e.form_blocks.combo={render:function(h){h.cached_options||(h.cached_options={});var a="";return a+="
"},set_value:function(h,a,r,d){(function(){v();var u=e.attachEvent("onAfterLightbox",function(){v(),e.detachEvent(u)});function v(){if(h._combo&&h._combo.DOMParent){var m=h._combo;m.unload?m.unload():m.destructor&&m.destructor(),m.DOMParent=m.DOMelem=null}}})(),window.dhx_globalImgPath=d.image_path||"/",h._combo=new dhtmlXCombo(h,d.name,h.offsetWidth-8),d.onchange&&h._combo.attachEvent("onChange",d.onchange),d.options_height&&h._combo.setOptionHeight(d.options_height);var i=h._combo;if(i.enableFilteringMode(d.filtering,d.script_path||null,!!d.cache),d.script_path){var _=r[d.map_to];_?d.cached_options[_]?(i.addOption(_,d.cached_options[_]),i.disable(1),i.selectOption(0),i.disable(0)):e.ajax.get(d.script_path+"?id="+_+"&uid="+e.uid(),function(u){var v,m=u.xmlDoc.responseText;try{v=JSON.parse(m).options[0].text}catch{v=e.ajax.xpath("//option",u.xmlDoc)[0].childNodes[0].nodeValue}d.cached_options[_]=v,i.addOption(_,v),i.disable(1),i.selectOption(0),i.disable(0)}):i.setComboValue("")}else{for(var o=[],t=0;t`;for(var r=0;r "+h.options[r].label+""}return a+=""},set_value:function(h,a,r,d){for(var i=h.getElementsByTagName("input"),_=0;_':""},set_value:function(h,a,r,d){h=e._lightbox.querySelector(`#${d.id}`);var i=e.uid(),_=d.checked_value!==void 0?a==d.checked_value:!!a;h.className+=" dhx_cal_checkbox";var o="",t="";if(e.config.wide_form?(h.innerHTML=t,h.nextSibling.innerHTML=o):h.innerHTML=o+t,d.handler){var n=h.getElementsByTagName("input")[0];if(n.$_eventAttached)return;n.$_eventAttached=!0,e.event(n,"click",d.handler)}},get_value:function(h,a,r){var d=(h=e._lightbox.querySelector(`#${r.id}`)).getElementsByTagName("input")[0];return d||(d=h.nextSibling.getElementsByTagName("input")[0]),d.checked?r.checked_value||!0:r.unchecked_value||!1},focus:function(h){}}},expand:function(e){e.ext.fullscreen={toggleIcon:null},e.expand=function(){if(e.callEvent("onBeforeExpand",[])){var h=e._obj;do h._position=h.style.position||"",h.style.position="static";while((h=h.parentNode)&&h.style);(h=e._obj).style.position="absolute",h._width=h.style.width,h._height=h.style.height,h.style.width=h.style.height="100%",h.style.top=h.style.left="0px";var a=document.body;a.scrollTop=0,(a=a.parentNode)&&(a.scrollTop=0),document.body._overflow=document.body.style.overflow||"",document.body.style.overflow="hidden",e._maximize(),e.callEvent("onExpand",[])}},e.collapse=function(){if(e.callEvent("onBeforeCollapse",[])){var h=e._obj;do h.style.position=h._position;while((h=h.parentNode)&&h.style);(h=e._obj).style.width=h._width,h.style.height=h._height,document.body.style.overflow=document.body._overflow,e._maximize(),e.callEvent("onCollapse",[])}},e.attachEvent("onTemplatesReady",function(){var h=document.createElement("div");h.className="dhx_expand_icon",e.ext.fullscreen.toggleIcon=h,h.innerHTML=` @@ -43,16 +43,16 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`)},t.exportToPNG=function(){ - `,e._obj.appendChild(h),e.event(h,"click",function(){e.expanded?e.collapse():e.expand()})}),e._maximize=function(){this.expanded=!this.expanded,this.expanded?this.ext.fullscreen.toggleIcon.classList.add("dhx_expand_icon--expanded"):this.ext.fullscreen.toggleIcon.classList.remove("dhx_expand_icon--expanded");for(var h=["left","top"],a=0;a400))try{s=JSON.parse(r.xmlDoc.responseText)}catch{}o(s)})},i._plain_export_copy=function(n,_){var o={};for(var t in n)o[t]=n[t];return o.start_date=_(o.start_date),o.end_date=_(o.end_date),o.$text=this.templates.event_text(n.start_date,n.end_date,n),o},i._serialize_plain=function(n,_){var o;n=n||i.date.date_to_str("%Y%m%dT%H%i%s",!0),o=_&&_.start&&_.end?i.getEvents(_.start,_.end):i.getEvents();for(var t=[],r=0;r",document.body.appendChild(n)}return this._hidden_export_form},i._get_export_size=function(n,_,o,t,r,s,c){t=parseInt(t)/25.4||4;var u={A5:{x:148,y:210},A4:{x:210,y:297},A3:{x:297,y:420},A2:{x:420,y:594},A1:{x:594,y:841},A0:{x:841,y:1189}},v=a("dhx_cal_data",this).x,m={y:a("dhx_cal_data",this).y+a("dhx_cal_header",this).y+a("dhx_multi_day",this).y};return m.x=n==="full"?v:Math.floor((_==="landscape"?u[n].y:u[n].x)*t),c&&(m.x*=parseFloat(c.x)||1,m.y*=parseFloat(c.y)||1),m},i._export_html=function(n){var _,o,t,r=(_=void 0,o=void 0,(t=d())&&(o=t.scrollable,_=t.smart_rendering),{nav_height:i.xy.nav_height,scroll_width:i.xy.scroll_width,style_width:i._obj.style.width,style_height:i._obj.style.height,timeline_scrollable:o,timeline_smart_rendering:_}),s=i._get_export_size(n.format,n.orientation,n.zoom,n.dpi,n.header,n.footer,n.scales),c="";try{(function(u,v){i._obj.style.width=u.x+"px",i._obj.style.height=u.y+"px",i.xy.nav_height=0,i.xy.scroll_width=0;var m=d();(v.timeline_scrollable||v.timeline_smart_rendering)&&(m.scrollable=!1,m.smart_rendering=!1)})(s,r),i.setCurrentView(),c=i._obj.innerHTML}catch(u){console.error(u)}finally{(function(u){i.xy.scroll_width=u.scroll_width,i.xy.nav_height=u.nav_height,i._obj.style.width=u.style_width,i._obj.style.height=u.style_height;var v=d();(u.timeline_scrollable||u.timeline_smart_rendering)&&(v.scrollable=u.timeline_scrollable,v.smart_rendering=u.timeline_smart_rendering)})(r),i.setCurrentView()}return c}}(e)})()},grid_view:function(e){q("Grid",e.assert)},html_templates:function(e){e.attachEvent("onTemplatesReady",function(){for(var h=document.body.getElementsByTagName("DIV"),a=0;a=96&&d.keyCode<=105&&(d.keyCode-=48);var n=String.fromCharCode(d.keyCode);return n&&(d.keyCode=n.toLowerCase().charCodeAt(0)),d},getHashFromEvent:function(i){return this.getHash(this.getCommandFromEvent(i))},getHash:function(i){var d=[];for(var n in i.modifiers)i.modifiers[n]&&d.push(n);return d.push(i.keyCode),d.join(this.junctionChar)},getExpressions:function(i){return i.split(this.junctionChar)},getWords:function(i){return i.split(this.combinationChar)},trim:function(i){return i.replace(/\s/g,"")},junctionChar:",",combinationChar:"+",commandKeys:{shift:16,alt:18,ctrl:17,meta:!0},specialKeys:{backspace:8,tab:9,enter:13,esc:27,space:32,up:38,down:40,left:37,right:39,home:36,end:35,pageup:33,pagedown:34,delete:46,insert:45,plus:107,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123}}}(e),function(a){a.$keyboardNavigation.EventHandler={_handlers:null,findHandler:function(i){this._handlers||(this._handlers={});var d=a.$keyboardNavigation.shortcuts.getHash(i);return this._handlers[d]},doAction:function(i,d){var n=this.findHandler(i);n&&(n.call(this,d),d.preventDefault?d.preventDefault():d.returnValue=!1)},bind:function(i,d){this._handlers||(this._handlers={});for(var n=a.$keyboardNavigation.shortcuts,_=n.parse(i),o=0;o<_.length;o++)this._handlers[n.getHash(_[o])]=d},unbind:function(i){for(var d=a.$keyboardNavigation.shortcuts,n=d.parse(i),_=0;_=_.length-1?0:t+1])return n.focus(),d.preventDefault(),!0;return!1}}(e),function(a){a.$keyboardNavigation.marker={clear:function(){for(var i=a.$container.querySelectorAll(".dhx_focus_slot"),d=0;d=0;t--)if(_[t].offsetWidth)return _[t];return null},addDataAttributes:function(i,d,n,_){for(var o=a.date.date_to_str(a.config.api_date),t=o(d),r=o(n),s=0;sa._max_date.valueOf()&&(s=new Date(a._max_date)),!_._trace_x)return t;for(var c=0;c<_._trace_x.length&&!a._is_column_visible(_._trace_x[c]);c++);if(c==_._trace_x.length)return t;var u=o[n];if(!(ri))return t;var v=this.createElement();let m,l;function f(b,k){k.setDate(1),k.setFullYear(b.getFullYear()),k.setMonth(b.getMonth()),k.setDate(b.getDate())}if(a.getView().days){const b=new Date(i);f(a._min_date,b);const k=new Date(d);f(a._min_date,k),m=a._timeline_getX({start_date:b},!1,_),l=a._timeline_getX({start_date:k},!1,_)}else m=a._timeline_getX({start_date:i},!1,_),l=a._timeline_getX({start_date:d},!1,_);var g=_._section_height[n]-1||_.dy-1,p=0;a._isRender("cell")&&(p=u.offsetTop,m+=_.dx,l+=_.dx,u=a.$container.querySelector(".dhx_cal_data"));var y=Math.max(1,l-m-1);let w="left";return a.config.rtl&&(w="right"),v.style.cssText=`height:${g}px; ${w}:${m}px; width:${y}px; top:${p}px;`,u&&(u.appendChild(v),t.push(v)),t},renderMonthCell:function(i){for(var d=a.$container.querySelectorAll(".dhx_month_head"),n=[],_=0;_1?_=a.locate_holder_day(i)+c:(_=c,s.size&&_>s.position+s.size&&(_=0))}if(!(t=a.locate_holder(_))||t.querySelector(".dhx_scale_hour"))return document.createElement("div");var u=Math.max(60*i.getHours()+i.getMinutes(),60*r.first_hour),v=Math.min(60*d.getHours()+d.getMinutes(),60*r.last_hour);if(!v&&a.date.day_start(new Date(d)).valueOf()>a.date.day_start(new Date(i)).valueOf()&&(v=60*r.last_hour),v<=u)return[];var m=this.createElement(),l=a.config.hour_size_px*r.last_hour+1,f=36e5;return m.style.top=Math.round((60*u*1e3-a.config.first_hour*f)*a.config.hour_size_px/f)%l+"px",m.style.lineHeight=m.style.height=Math.max(Math.round(60*(v-u)*1e3*a.config.hour_size_px/f)%l,1)+"px",m.style.width="100%",t.appendChild(m),o.push(m),o[0]}}}(e),function(a){a.$keyboardNavigation.SchedulerNode=function(){},a.$keyboardNavigation.SchedulerNode.prototype=a._compose(a.$keyboardNavigation.EventHandler,{getDefaultNode:function(){var i=new a.$keyboardNavigation.TimeSlot;return i.isValid()||(i=i.fallback()),i},_modes:{month:"month",year:"year",dayColumns:"dayColumns",timeline:"timeline",units:"units",weekAgenda:"weekAgenda",list:"list"},getMode:function(){var i=a.getState().mode;return a.matrix&&a.matrix[i]?this._modes.timeline:a._props&&a._props[i]?this._modes.units:i=="month"?this._modes.month:i=="year"?this._modes.year:i=="week_agenda"?this._modes.weekAgenda:i=="map"||i=="agenda"||a._grid&&a["grid_"+i]?this._modes.list:this._modes.dayColumns},focus:function(){a.focus()},blur:function(){},disable:function(){a.$container.setAttribute("tabindex","0")},enable:function(){a.$container&&a.$container.removeAttribute("tabindex")},isEnabled:function(){return a.$container.hasAttribute("tabindex")},_compareEvents:function(i,d){return i.start_date.valueOf()==d.start_date.valueOf()?i.id>d.id?1:-1:i.start_date.valueOf()>d.start_date.valueOf()?1:-1},_pickEvent:function(i,d,n,_){var o=a.getState();i=new Date(Math.max(o.min_date.valueOf(),i.valueOf())),d=new Date(Math.min(o.max_date.valueOf(),d.valueOf()));var t=a.getEvents(i,d);t.sort(this._compareEvents),_&&(t=t.reverse());for(var r=!!n,s=0;s=this.getNodes().length&&(i=0),this.moveTo(new a.$keyboardNavigation.HeaderCell(i))},down:function(){this.moveTo(new a.$keyboardNavigation.TimeSlot)},enter:function(){var i=this.getNode();i&&i.click()}}}),a.$keyboardNavigation.HeaderCell.prototype.bindAll(a.$keyboardNavigation.HeaderCell.prototype.keys)}(e),function(a){a.$keyboardNavigation.Event=function(i){if(this.eventId=null,a.getEvent(i)){var d=a.getEvent(i);this.start=new Date(d.start_date),this.end=new Date(d.end_date),this.section=this._getSection(d),this.eventId=i}},a.$keyboardNavigation.Event.prototype=a._compose(a.$keyboardNavigation.KeyNavNode,{_getNodes:function(){return Array.prototype.slice.call(a.$container.querySelectorAll("["+a.config.event_attribute+"]"))},_modes:a.$keyboardNavigation.SchedulerNode.prototype._modes,getMode:a.$keyboardNavigation.SchedulerNode.prototype.getMode,_handlers:null,isValid:function(){return!(!a.getEvent(this.eventId)||!this.getNode())},fallback:function(){var i=this._getNodes()[0],d=null;if(i&&a._locate_event(i)){var n=a._locate_event(i);d=new a.$keyboardNavigation.Event(n)}else d=new a.$keyboardNavigation.TimeSlot;return d},isScrolledIntoView:function(i){var d=i.getBoundingClientRect(),n=a.$container.querySelector(".dhx_cal_data").getBoundingClientRect();return!(d.bottomn.bottom)},getNode:function(){var i="["+a.config.event_attribute+"='"+this.eventId+"']",d=a.$keyboardNavigation.dispatcher.getInlineEditor(this.eventId);if(d)return d;if(a.isMultisectionEvent&&a.isMultisectionEvent(a.getEvent(this.eventId))){for(var n=a.$container.querySelectorAll(i),_=0;_d.max_date.valueOf()||i.end_date.valueOf()<=d.min_date.valueOf())&&a.setCurrentView(i.start_date);var n=this.getNode();this.isScrolledIntoView(n)?a.$keyboardNavigation.dispatcher.keepScrollPosition((function(){a.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this)}).bind(this)):a.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this)},blur:function(){a.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this)},_getSection:function(i){var d=null,n=a.getState().mode;return a.matrix&&a.matrix[n]?d=i[a.matrix[a.getState().mode].y_property]:a._props&&a._props[n]&&(d=i[a._props[n].map_to]),d},_moveToSlot:function(i){var d=a.getEvent(this.eventId);if(d){var n=this._getSection(d),_=new a.$keyboardNavigation.TimeSlot(d.start_date,null,n);this.moveTo(_.nextSlot(_,i))}else this.moveTo(new a.$keyboardNavigation.TimeSlot)},keys:{left:function(){this._moveToSlot("left")},right:function(){this._moveToSlot("right")},down:function(){this.getMode()==this._modes.list?a.$keyboardNavigation.SchedulerNode.prototype.nextEventHandler():this._moveToSlot("down")},space:function(){var i=this.getNode();i&&i.click?i.click():this.moveTo(new a.$keyboardNavigation.TimeSlot)},up:function(){this.getMode()==this._modes.list?a.$keyboardNavigation.SchedulerNode.prototype.prevEventHandler():this._moveToSlot("up")},delete:function(){a.getEvent(this.eventId)?a._click.buttons.delete(this.eventId):this.moveTo(new a.$keyboardNavigation.TimeSlot)},enter:function(){a.getEvent(this.eventId)?a.showLightbox(this.eventId):this.moveTo(new a.$keyboardNavigation.TimeSlot)}}}),a.$keyboardNavigation.Event.prototype.bindAll(a.$keyboardNavigation.Event.prototype.keys)}(e),function(a){a.$keyboardNavigation.TimeSlot=function(i,d,n,_){var o=a.getState(),t=a.matrix&&a.matrix[o.mode];i||(i=this.getDefaultDate()),d||(d=t?a.date.add(i,t.x_step,t.x_unit):a.date.add(i,a.config.key_nav_step,"minute")),this.section=n||this._getDefaultSection(),this.start_date=new Date(i),this.end_date=new Date(d),this.movingDate=_||null},a.$keyboardNavigation.TimeSlot.prototype=a._compose(a.$keyboardNavigation.KeyNavNode,{_handlers:null,getDefaultDate:function(){var i,d=a.getState(),n=new Date(d.date);n.setSeconds(0),n.setMilliseconds(0);var _=new Date;_.setSeconds(0),_.setMilliseconds(0);var o=a.matrix&&a.matrix[d.mode],t=!1;if(n.valueOf()===_.valueOf()&&(t=!0),o)t?(o.x_unit==="day"?(_.setHours(0),_.setMinutes(0)):o.x_unit==="hour"&&_.setMinutes(0),i=_):i=a.date[o.name+"_start"](new Date(d.date)),i=this.findVisibleColumn(i);else if(i=new Date(a.getState().min_date),t&&(i=_),i=this.findVisibleColumn(i),t||i.setHours(a.config.first_hour),!a._table_view){var r=a.$container.querySelector(".dhx_cal_data");r.scrollTop&&i.setHours(a.config.first_hour+Math.ceil(r.scrollTop/a.config.hour_size_px))}return i},clone:function(i){return new a.$keyboardNavigation.TimeSlot(i.start_date,i.end_date,i.section,i.movingDate)},_getMultisectionView:function(){var i,d=a.getState();return a._props&&a._props[d.mode]?i=a._props[d.mode]:a.matrix&&a.matrix[d.mode]&&(i=a.matrix[d.mode]),i},_getDefaultSection:function(){var i=null;return this._getMultisectionView()&&!i&&(i=this._getNextSection()),i},_getNextSection:function(i,d){var n=this._getMultisectionView(),_=n.order[i],o=_;(o=_!==void 0?_+d:n.size&&n.position?n.position:0)<0&&(o=0);var t=n.options||n.y_unit;return o>=t.length&&(o=t.length-1),t[o]?t[o].key:null},isValid:function(){var i=a.getState();if(this.start_date.valueOf()=i.max_date.valueOf()||!this.isVisible(this.start_date,this.end_date))return!1;var d=this._getMultisectionView();return!d||d.order[this.section]!==void 0},fallback:function(){var i=new a.$keyboardNavigation.TimeSlot;return i.isValid()?i:new a.$keyboardNavigation.DataArea},getNodes:function(){return Array.prototype.slice.call(a.$container.querySelectorAll(".dhx_focus_slot"))},getNode:function(){return this.getNodes()[0]},focus:function(){this.section&&a.getView()&&a.getView().smart_rendering&&a.getView().scrollTo&&!a.$container.querySelector(`[data-section-id="${this.section}"]`)&&a.getView().scrollTo({section:this.section}),a.$keyboardNavigation.marker.render(this.start_date,this.end_date,this.section),a.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this),a.$keyboardNavigation._pasteDate=this.start_date,a.$keyboardNavigation._pasteSection=this.section},blur:function(){a.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this),a.$keyboardNavigation.marker.clear()},_modes:a.$keyboardNavigation.SchedulerNode.prototype._modes,_getMode:a.$keyboardNavigation.SchedulerNode.prototype.getMode,addMonthDate:function(i,d,n){var _;switch(d){case"up":_=a.date.add(i,-1,"week");break;case"down":_=a.date.add(i,1,"week");break;case"left":_=a.date.day_start(a.date.add(i,-1,"day")),_=this.findVisibleColumn(_,-1);break;case"right":_=a.date.day_start(a.date.add(i,1,"day")),_=this.findVisibleColumn(_,1);break;default:_=a.date.day_start(new Date(i))}var o=a.getState();return(i.valueOf()=o.max_date.valueOf())&&(_=new Date(o.min_date)),_},nextMonthSlot:function(i,d,n){var _,o;return(_=this.addMonthDate(i.start_date,d,n)).setHours(a.config.first_hour),(o=new Date(_)).setHours(a.config.last_hour),{start_date:_,end_date:o}},_alignTimeSlot:function(i,d,n,_){for(var o=new Date(d);o.valueOf()i.valueOf()&&(o=a.date.add(o,-_,n)),o},nextTimelineSlot:function(i,d,n){var _=a.getState(),o=a.matrix[_.mode],t=this._alignTimeSlot(i.start_date,a.date[o.name+"_start"](new Date(i.start_date)),o.x_unit,o.x_step),r=this._alignTimeSlot(i.end_date,a.date[o.name+"_start"](new Date(i.end_date)),o.x_unit,o.x_step);r.valueOf()<=t.valueOf()&&(r=a.date.add(t,o.x_step,o.x_unit));var s=this.clone(i);switch(s.start_date=t,s.end_date=r,s.section=i.section||this._getNextSection(),d){case"up":s.section=this._getNextSection(i.section,-1);break;case"down":s.section=this._getNextSection(i.section,1);break;case"left":s.start_date=this.findVisibleColumn(a.date.add(s.start_date,-o.x_step,o.x_unit),-1),s.end_date=a.date.add(s.start_date,o.x_step,o.x_unit);break;case"right":s.start_date=this.findVisibleColumn(a.date.add(s.start_date,o.x_step,o.x_unit),1),s.end_date=a.date.add(s.start_date,o.x_step,o.x_unit)}return(s.start_date.valueOf()<_.min_date.valueOf()||s.start_date.valueOf()>=_.max_date.valueOf())&&(n&&s.start_date.valueOf()>=_.max_date.valueOf()?s.start_date=new Date(_.max_date):(s.start_date=a.date[_.mode+"_start"](a.date.add(_.date,d=="left"?-1:1,_.mode)),s.end_date=a.date.add(s.start_date,o.x_step,o.x_unit))),s},nextUnitsSlot:function(i,d,n){var _=this.clone(i);_.section=i.section||this._getNextSection();var o=i.section||this._getNextSection(),t=a.getState(),r=a._props[t.mode];switch(d){case"left":o=this._getNextSection(i.section,-1);var s=r.size?r.size-1:r.options.length;r.days>1&&r.order[o]==s-1&&a.date.add(i.start_date,-1,"day").valueOf()>=t.min_date.valueOf()&&(_=this.nextDaySlot(i,d,n));break;case"right":o=this._getNextSection(i.section,1),r.days>1&&!r.order[o]&&a.date.add(i.start_date,1,"day").valueOf()=o||!d&&!n&&(!_&&t==24||_==t)},isInVisibleDayTime:function(i,d){return this.isBeforeLastHour(i,d)&&this.isAfterFirstHour(i,d)},nextDaySlot:function(i,d,n){var _,o,t=a.config.key_nav_step,r=this._alignTimeSlot(i.start_date,a.date.day_start(new Date(i.start_date)),"minute",t),s=i.start_date;switch(d){case"up":if(_=a.date.add(r,-t,"minute"),!this.isInVisibleDayTime(_,!0)&&(!n||this.isInVisibleDayTime(s,!0))){var c=!0;n&&a.date.date_part(new Date(_)).valueOf()!=a.date.date_part(new Date(s)).valueOf()&&(c=!1),c&&(_=this.findVisibleColumn(a.date.add(i.start_date,-1,"day"),-1)),_.setHours(a.config.last_hour),_.setMinutes(0),_=a.date.add(_,-t,"minute")}o=a.date.add(_,t,"minute");break;case"down":_=a.date.add(r,t,"minute");var u=n?_:a.date.add(_,t,"minute");this.isInVisibleDayTime(u,!1)||n&&!this.isInVisibleDayTime(s,!1)||(n?(c=!0,a.date.date_part(new Date(s)).valueOf()==s.valueOf()&&(c=!1),c&&(_=this.findVisibleColumn(a.date.add(i.start_date,1,"day"),1)),_.setHours(a.config.first_hour),_.setMinutes(0),_=a.date.add(_,t,"minute")):((_=this.findVisibleColumn(a.date.add(i.start_date,1,"day"),1)).setHours(a.config.first_hour),_.setMinutes(0))),o=a.date.add(_,t,"minute");break;case"left":_=this._moveDate(i.start_date,-1),o=this._moveDate(i.end_date,-1);break;case"right":_=this._moveDate(i.start_date,1),o=this._moveDate(i.end_date,1);break;default:_=r,o=a.date.add(_,t,"minute")}return{start_date:_,end_date:o}},nextWeekAgendaSlot:function(i,d){var n,_,o=a.getState();switch(d){case"down":case"left":n=a.date.day_start(a.date.add(i.start_date,-1,"day")),n=this.findVisibleColumn(n,-1);break;case"up":case"right":n=a.date.day_start(a.date.add(i.start_date,1,"day")),n=this.findVisibleColumn(n,1);break;default:n=a.date.day_start(i.start_date)}return(i.start_date.valueOf()=o.max_date.valueOf())&&(n=new Date(o.min_date)),(_=new Date(n)).setHours(a.config.last_hour),{start_date:n,end_date:_}},nextAgendaSlot:function(i,d){return{start_date:i.start_date,end_date:i.end_date}},isDateVisible:function(i){if(!a._ignores_detected)return!0;var d,n=a.matrix&&a.matrix[a.getState().mode];return d=n?a._get_date_index(n,i):a.locate_holder_day(i),!a._ignores[d]},findVisibleColumn:function(i,d){var n=i;d=d||1;for(var _=a.getState();!this.isDateVisible(n)&&(d>0&&n.valueOf()<=_.max_date.valueOf()||d<0&&n.valueOf()>=_.min_date.valueOf());)n=this.nextDateColumn(n,d);return n},nextDateColumn:function(i,d){d=d||1;var n=a.matrix&&a.matrix[a.getState().mode];return n?a.date.add(i,d*n.x_step,n.x_unit):a.date.day_start(a.date.add(i,d,"day"))},isVisible:function(i,d){if(!a._ignores_detected)return!0;for(var n=new Date(i);n.valueOf()=o.end_date.valueOf()&&(o=this.nextSlot(o,d,n)),a.$keyboardNavigation.TimeSlot.prototype.clone(o)},extendSlot:function(i,d){var n;switch(this._getMode()){case this._modes.units:n=d=="left"||d=="right"?this.nextUnitsSlot(i,d):this.extendUnitsSlot(i,d);break;case this._modes.timeline:n=d=="down"||d=="up"?this.nextTimelineSlot(i,d):this.extendTimelineSlot(i,d);break;case this._modes.year:case this._modes.month:n=this.extendMonthSlot(i,d);break;case this._modes.dayColumns:n=this.extendDaySlot(i,d);break;case this._modes.weekAgenda:n=this.extendWeekAgendaSlot(i,d);break;default:n=i}var _=a.getState();return n.start_date.valueOf()<_.min_date.valueOf()&&(n.start_date=this.findVisibleColumn(_.min_date),n.start_date.setHours(a.config.first_hour)),n.end_date.valueOf()>_.max_date.valueOf()&&(n.end_date=this.findVisibleColumn(_.max_date,-1)),a.$keyboardNavigation.TimeSlot.prototype.clone(n)},extendTimelineSlot:function(i,d){return this.extendGenericSlot({left:"start_date",right:"end_date"},i,d,"timeline")},extendWeekAgendaSlot:function(i,d){return this.extendGenericSlot({left:"start_date",right:"end_date"},i,d,"weekAgenda")},extendGenericSlot:function(i,d,n,_){var o,t=d.movingDate;if(t||(t=i[n]),!t||!i[n])return d;if(!n)return a.$keyboardNavigation.TimeSlot.prototype.clone(d);(o=this.nextSlot({start_date:d[t],section:d.section},n,_,!0)).start_date.valueOf()==d.start_date.valueOf()&&(o=this.nextSlot({start_date:o.start_date,section:o.section},n,_,!0)),o.movingDate=t;var r=this.extendSlotDates(d,o,o.movingDate);return r.end_date.valueOf()<=r.start_date.valueOf()&&(o.movingDate=o.movingDate=="end_date"?"start_date":"end_date"),r=this.extendSlotDates(d,o,o.movingDate),o.start_date=r.start_date,o.end_date=r.end_date,o},extendSlotDates:function(i,d,n){var _={start_date:null,end_date:null};return n=="start_date"?(_.start_date=d.start_date,_.end_date=i.end_date):(_.start_date=i.start_date,_.end_date=d.start_date),_},extendMonthSlot:function(i,d){return(i=this.extendGenericSlot({up:"start_date",down:"end_date",left:"start_date",right:"end_date"},i,d,"month")).start_date.setHours(a.config.first_hour),i.end_date=a.date.add(i.end_date,-1,"day"),i.end_date.setHours(a.config.last_hour),i},extendUnitsSlot:function(i,d){var n;switch(d){case"down":case"up":n=this.extendDaySlot(i,d);break;default:n=i}return n.section=i.section,n},extendDaySlot:function(i,d){return this.extendGenericSlot({up:"start_date",down:"end_date",left:"start_date",right:"end_date"},i,d,"dayColumns")},scrollSlot:function(i){var d=a.getState(),n=this.nextSlot(this,i);(n.start_date.valueOf()=d.max_date.valueOf())&&a.setCurrentView(new Date(n.start_date)),this.moveTo(n)},keys:{left:function(){this.scrollSlot("left")},right:function(){this.scrollSlot("right")},down:function(){this._getMode()==this._modes.list?a.$keyboardNavigation.SchedulerNode.prototype.nextEventHandler():this.scrollSlot("down")},up:function(){this._getMode()==this._modes.list?a.$keyboardNavigation.SchedulerNode.prototype.prevEventHandler():this.scrollSlot("up")},"shift+down":function(){this.moveTo(this.extendSlot(this,"down"))},"shift+up":function(){this.moveTo(this.extendSlot(this,"up"))},"shift+right":function(){this.moveTo(this.extendSlot(this,"right"))},"shift+left":function(){this.moveTo(this.extendSlot(this,"left"))},enter:function(){var i={start_date:new Date(this.start_date),end_date:new Date(this.end_date)},d=a.getState().mode;a.matrix&&a.matrix[d]?i[a.matrix[a.getState().mode].y_property]=this.section:a._props&&a._props[d]&&(i[a._props[d].map_to]=this.section),a.addEventNow(i)}}}),a.$keyboardNavigation.TimeSlot.prototype.bindAll(a.$keyboardNavigation.TimeSlot.prototype.keys)}(e),function(a){a.$keyboardNavigation.MinicalButton=function(i,d){this.container=i,this.index=d||0},a.$keyboardNavigation.MinicalButton.prototype=a._compose(a.$keyboardNavigation.KeyNavNode,{isValid:function(){return!!this.container.offsetWidth},fallback:function(){var i=new a.$keyboardNavigation.TimeSlot;return i.isValid()?i:new a.$keyboardNavigation.DataArea},focus:function(){a.$keyboardNavigation.dispatcher.globalNode.disable(),this.container.removeAttribute("tabindex"),a.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this)},blur:function(){this.container.setAttribute("tabindex","0"),a.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this)},getNode:function(){return this.index?this.container.querySelector(".dhx_cal_next_button"):this.container.querySelector(".dhx_cal_prev_button")},keys:{right:function(i){this.moveTo(new a.$keyboardNavigation.MinicalButton(this.container,this.index?0:1))},left:function(i){this.moveTo(new a.$keyboardNavigation.MinicalButton(this.container,this.index?0:1))},down:function(){var i=new a.$keyboardNavigation.MinicalCell(this.container,0,0);i&&!i.isValid()&&(i=i.fallback()),this.moveTo(i)},enter:function(i){this.getNode().click()}}}),a.$keyboardNavigation.MinicalButton.prototype.bindAll(a.$keyboardNavigation.MinicalButton.prototype.keys)}(e),function(a){a.$keyboardNavigation.MinicalCell=function(i,d,n){this.container=i,this.row=d||0,this.col=n||0},a.$keyboardNavigation.MinicalCell.prototype=a._compose(a.$keyboardNavigation.KeyNavNode,{isValid:function(){var i=this._getGrid();return!(!i[this.row]||!i[this.row][this.col])},fallback:function(){var i=this.row,d=this.col,n=this._getGrid();n[i]||(i=0);var _=!0;if(i>n.length/2&&(_=!1),!n[i]){var o=new a.$keyboardNavigation.TimeSlot;return o.isValid()?o:new a.$keyboardNavigation.DataArea}if(_){for(var t=d;n[i]&&t-1||s.indexOf("dhx_before")>-1||s.indexOf("dhx_scale_ignore")>-1)&&(r=!1),d[n][o]=r}}return d},keys:{right:function(i){var d=this._getGrid(),n=this.row,_=this.col+1;d[n]&&d[n][_]||(d[n+1]?(n+=1,_=0):_=this.col);var o=new a.$keyboardNavigation.MinicalCell(this.container,n,_);o.isValid()||(o=o.fallback()),this.moveTo(o)},left:function(i){var d=this._getGrid(),n=this.row,_=this.col-1;d[n]&&d[n][_]||(_=d[n-1]?d[n-=1].length-1:this.col);var o=new a.$keyboardNavigation.MinicalCell(this.container,n,_);o.isValid()||(o=o.fallback()),this.moveTo(o)},down:function(){var i=this._getGrid(),d=this.row+1,n=this.col;i[d]&&i[d][n]||(d=this.row);var _=new a.$keyboardNavigation.MinicalCell(this.container,d,n);_.isValid()||(_=_.fallback()),this.moveTo(_)},up:function(){var i=this._getGrid(),d=this.row-1,n=this.col;if(i[d]&&i[d][n]){var _=new a.$keyboardNavigation.MinicalCell(this.container,d,n);_.isValid()||(_=_.fallback()),this.moveTo(_)}else{var o=0;this.col>i[this.row].length/2&&(o=1),this.moveTo(new a.$keyboardNavigation.MinicalButton(this.container,o))}},enter:function(i){this.getNode().querySelector(".dhx_month_head").click()}}}),a.$keyboardNavigation.MinicalCell.prototype.bindAll(a.$keyboardNavigation.MinicalCell.prototype.keys)}(e),function(a){a.$keyboardNavigation.DataArea=function(i){this.index=i||0},a.$keyboardNavigation.DataArea.prototype=a._compose(a.$keyboardNavigation.KeyNavNode,{getNode:function(i){return a.$container.querySelector(".dhx_cal_data")},_handlers:null,isValid:function(){return!0},fallback:function(){return this},keys:{"up,down,right,left":function(){this.moveTo(new a.$keyboardNavigation.TimeSlot)}}}),a.$keyboardNavigation.DataArea.prototype.bindAll(a.$keyboardNavigation.DataArea.prototype.keys)}(e),rt(e),function(a){a.$keyboardNavigation.dispatcher={isActive:!1,activeNode:null,globalNode:new a.$keyboardNavigation.SchedulerNode,keepScrollPosition:function(i){var d,n,_=a.$container.querySelector(".dhx_timeline_scrollable_data");_||(_=a.$container.querySelector(".dhx_cal_data")),_&&(d=_.scrollTop,n=_.scrollLeft),i(),_&&(_.scrollTop=d,_.scrollLeft=n)},enable:function(){if(a.$container){this.isActive=!0;var i=this;this.keepScrollPosition(function(){i.globalNode.enable(),i.setActiveNode(i.getActiveNode())})}},disable:function(){this.isActive=!1,this.globalNode.disable()},isEnabled:function(){return!!this.isActive},getDefaultNode:function(){return this.globalNode.getDefaultNode()},setDefaultNode:function(){this.setActiveNode(this.getDefaultNode())},getActiveNode:function(){var i=this.activeNode;return i&&!i.isValid()&&(i=i.fallback()),i},focusGlobalNode:function(){this.blurNode(this.globalNode),this.focusNode(this.globalNode)},setActiveNode:function(i){i&&i.isValid()&&(this.activeNode&&this.activeNode.compareTo(i)||this.isEnabled()&&(this.blurNode(this.activeNode),this.activeNode=i,this.focusNode(this.activeNode)))},focusNode:function(i){i&&i.focus&&(i.focus(),i.getNode&&document.activeElement!=i.getNode()&&this.setActiveNode(new a.$keyboardNavigation.DataArea))},blurNode:function(i){i&&i.blur&&i.blur()},getInlineEditor:function(i){var d=a.$container.querySelector(".dhx_cal_editor["+a.config.event_attribute+"='"+i+"'] textarea");return d&&d.offsetWidth?d:null},keyDownHandler:function(i){if(!i.defaultPrevented){var d=this.getActiveNode();if((!a.$keyboardNavigation.isModal()||d&&d.container&&a.utils.dom.locateCss({target:d.container},"dhx_minical_popup",!1))&&(!a.getState().editor_id||!this.getInlineEditor(a.getState().editor_id))&&this.isEnabled()){i=i||window.event;var n=this.globalNode,_=a.$keyboardNavigation.shortcuts.getCommandFromEvent(i);d?d.findHandler(_)?d.doAction(_,i):n.findHandler(_)&&n.doAction(_,i):this.setDefaultNode()}}},_timeout:null,delay:function(i,d){clearTimeout(this._timeout),this._timeout=setTimeout(i,d||1)}}}(e),ot(e),function(){st(e),function(o){o.$keyboardNavigation._minicalendars=[],o.$keyboardNavigation.isMinical=function(t){for(var r=o.$keyboardNavigation._minicalendars,s=0;s=e.config.collision_limit}),e.addEvent=function(a,i,d,n,_){var o=a;arguments.length!=1&&((o=_||{}).start_date=a,o.end_date=i,o.text=d,o.id=n,o.layer=this.defaultLayer),o.id=o.id||e.uid(),o.text=o.text||"",typeof o.start_date=="string"&&(o.start_date=this.templates.api_date(o.start_date)),typeof o.end_date=="string"&&(o.end_date=this.templates.api_date(o.end_date)),o._timed=this.isOneDayEvent(o);var t=!this._events[o.id];this._events[o.id]=o,this.event_updated(o),this._loading||this.callEvent(t?"onEventAdded":"onEventChanged",[o.id,o])},this._evs_layer={};for(var h=0;ho.getHours()&&(o.setHours(t),a=o.valueOf()),i=a+_}n.start_date=n.start_date||o,n.end_date=n.end_date||new Date(i),n.text=n.text||this.locale.labels.new_event,n.id=this._drag_id=this.uid(),n.layer=this.defaultLayer,this._drag_mode="new-size",this._loading=!0,this.addEvent(n),this.callEvent("onEventCreated",[this._drag_id,d]),this._loading=!1,this._drag_event={},this._on_mouse_up(d)},e._t_render_view_data=function(a){if(this.config.multi_day&&!this._table_view){for(var i=[],d=[],n=0;n';return k+='
 
',k+='
'+t+"
",k+='
'+r+"
",k+='',u.innerHTML=k,u.style.zIndex=100,u.firstChild},e.render_event_bar=function(a){var i=this._els.dhx_cal_data[0],d=this._colsS[a._sday],n=this._colsS[a._eday];n==d&&(n=this._colsS[a._eday+1]);var _=this.xy.bar_height,o=this._colsS.heights[a._sweek]+(this._colsS.height?this.xy.month_scale_height+2:2)+a._sorder*_,t=document.createElement("div"),r=a._timed?"dhx_cal_event_clear":"dhx_cal_event_line",s=e.templates["event_class_"+a.layer]?e.templates["event_class_"+a.layer](a.start_date,a.end_date,a):e.templates.event_class(a.start_date,a.end_date,a);s&&(r=r+" "+s);var c='
';a._timed&&(c+=e.templates["event_bar_date_"+a.layer]?e.templates["event_bar_date_"+a.layer](a.start_date,a.end_date,a):e.templates.event_bar_date(a.start_date,a.end_date,a)),c+=e.templates["event_bar_text_"+a.layer]?e.templates["event_bar_text_"+a.layer](a.start_date,a.end_date,a):e.templates.event_bar_text(a.start_date,a.end_date,a)+"
)",c+="",t.innerHTML=c,this._rendered.push(t.firstChild),i.appendChild(t.firstChild)},e.render_event=function(a){var i=e.xy.menu_width;if(e.getLayer(a.layer).noMenu&&(i=0),!(a._sday<0)){var d=e.locate_holder(a._sday);if(d){var n=60*a.start_date.getHours()+a.start_date.getMinutes(),_=60*a.end_date.getHours()+a.end_date.getMinutes()||60*e.config.last_hour,o=Math.round((60*n*1e3-60*this.config.first_hour*60*1e3)*this.config.hour_size_px/36e5)%(24*this.config.hour_size_px)+1,t=Math.max(e.xy.min_event_height,(_-n)*this.config.hour_size_px/60)+1,r=Math.floor((d.clientWidth-i)/a._count),s=a._sorder*r+1;a._inner||(r*=a._count-a._sorder);var c=this._render_v_bar(a.id,i+s,o,r,t,a._text_style,e.templates.event_header(a.start_date,a.end_date,a),e.templates.event_text(a.start_date,a.end_date,a));if(this._rendered.push(c),d.appendChild(c),s=s+parseInt(d.style.left,10)+i,o+=this._dy_shift,c.style.zIndex=this._layers_zindex[a.layer],this._edit_id==a.id){c.style.zIndex=parseInt(c.style.zIndex)+1;var u=c.style.zIndex;r=Math.max(r-4,e.xy.editor_width),(c=document.createElement("div")).setAttribute("event_id",a.id),c.setAttribute(this.config.event_attribute,a.id),this.set_xy(c,r,t-20,s,o+14),c.className="dhx_cal_editor",c.style.zIndex=u;var v=document.createElement("div");this.set_xy(v,r-6,t-26),v.style.cssText+=";margin:2px 2px 2px 2px;overflow:hidden;",v.style.zIndex=u,c.appendChild(v),this._els.dhx_cal_data[0].appendChild(c),this._rendered.push(c),v.innerHTML="",this._editor=v.firstChild,this._editor.addEventListener("keypress",function(p){if(p.shiftKey)return!0;var y=p.keyCode;y==e.keys.edit_save&&e.editStop(!0),y==e.keys.edit_cancel&&e.editStop(!1)}),this._editor.addEventListener("selectstart",function(p){return p.cancelBubble=!0,!0}),v.firstChild.focus(),this._els.dhx_cal_data[0].scrollLeft=0,v.firstChild.select()}if(this._select_id==a.id){c.style.zIndex=parseInt(c.style.zIndex)+1;for(var m=this.config["icons_"+(this._edit_id==a.id?"edit":"select")],l="",f=0;f";var g=this._render_v_bar(a.id,s-i+1,o,i,20*m.length+26,"","
",l,!0);g.style.left=s-i+1,g.style.zIndex=c.style.zIndex,this._els.dhx_cal_data[0].appendChild(g),this._rendered.push(g)}}}},e.filter_agenda=function(a,i){var d=e.getLayer(i.layer);return d&&d.visible}})},limit:function(e){e.config.limit_start=null,e.config.limit_end=null,e.config.limit_view=!1,e.config.check_limits=!0,e.config.mark_now=!0,e.config.display_marked_timespans=!0,e.config.overwrite_marked_timespans=!0,e._temp_limit_scope=function(){var h=null,a="dhx_time_block",i="default",d=function(o,t,r){var s=typeof o=="object"?o:{days:o};return s.type=a,s.css="",t&&(r&&(s.sections=r),s=function(c,u,v){return u instanceof Date&&v instanceof Date?(c.start_date=u,c.end_date=v):(c.days=u,c.zones=v),c}(s,o,t)),s};e.blockTime=function(o,t,r){var s=d(o,t,r);return e.addMarkedTimespan(s)},e.unblockTime=function(o,t,r){var s=d(o,t=t||"fullday",r);return e.deleteMarkedTimespan(s)},e.attachEvent("onBeforeViewChange",function(o,t,r,s){function c(u,v){var m=e.config.limit_start,l=e.config.limit_end,f=e.date.add(u,1,v);return u.valueOf()>l.valueOf()||f<=m.valueOf()}return!e.config.limit_view||!c(s=s||t,r=r||o)||t.valueOf()==s.valueOf()||(setTimeout(function(){if(e.$destroyed)return!0;var u=c(t,r)?e.config.limit_start:t;e.setCurrentView(c(u,r)?null:u,r)},1),!1)}),e.checkInMarkedTimespan=function(o,t,r){t=t||i;for(var s=!0,c=new Date(o.start_date.valueOf()),u=e.date.add(c,1,"day"),v=e._marked_timespans;cu||o.end_date.getDate()!=c.getDate()?1440:e._get_zone_minutes(o.end_date),y=l[f],w=l[f+1];if(yg&&!(s=typeof r=="function"&&r(o,g,p,y,w)))break}}return!s};var n=e.checkLimitViolation=function(o){if(!o||!e.config.check_limits)return!0;var t=e,r=t.config,s=[];if(o.rec_type)for(var c=e.getRecDates(o),u=0;u=r.limit_start.valueOf()&&v.end_date.valueOf()<=r.limit_end.valueOf())&&(f=!e.checkInMarkedTimespan(v,a,function(g,p,y,w,b){var k=!0;return p<=b&&p>=w&&((b==1440||y<=b)&&(k=!1),g._timed&&t._drag_id&&t._drag_mode=="new-size"?(g.start_date.setHours(0),g.start_date.setMinutes(b)):k=!1),(y>=w&&y<=b||pb)&&(g._timed&&t._drag_id&&t._drag_mode=="new-size"?(g.end_date.setHours(0),g.end_date.setMinutes(w)):k=!1),k})),f||(f=t.checkEvent("onLimitViolation")?t.callEvent("onLimitViolation",[v.id,v]):f),m=m&&f}return m||(t._drag_id=null,t._drag_mode=null),m};function _(o,t,r,s,c){var u=e,v=[],m={_props:"map_to",matrix:"y_property"};for(var l in m){var f=m[l];if(u[l])for(var g in u[l]){var p=u[l][g][f];o[p]&&(v=u._add_timespan_zones(v,e._get_blocked_zones(t[g],o[p],r,s,c)))}}return v=u._add_timespan_zones(v,e._get_blocked_zones(t,"global",r,s,c))}e._get_blocked_zones=function(o,t,r,s,c){var u=[];if(o&&o[t])for(var v=o[t],m=this._get_relevant_blocked_zones(r,s,v,c),l=0;l=e.config.limit_end.valueOf()&&(t.start_date=this.date.add(e.config.limit_end,-1,"day")),t.end_date=e.config.limit_end.valueOf()&&(t.end_date=this.date.add(e.config.limit_end,-1,"day")),t.start_date.valueOf()>=t.end_date.valueOf()&&(t.end_date=this.date.add(t.start_date,this.config.event_duration||this.config.time_step,"minute")),t._timed=this.isOneDayEvent(t)),!0}),e.attachEvent("onEventChanged",function(o){if(!o)return!0;var t=e.getEvent(o);if(!n(t)){if(!h)return!1;t.start_date=h[0],t.end_date=h[1],t._timed=this.isOneDayEvent(t)}return!0}),e.attachEvent("onBeforeEventChanged",function(o,t,r){return n(o)}),e.attachEvent("onBeforeEventCreated",function(o){var t=e.getActionData(o).date,r={_timed:!0,start_date:t,end_date:e.date.add(t,e.config.time_step,"minute")};return n(r)}),e.attachEvent("onViewChange",function(){e._mark_now()}),e.attachEvent("onAfterSchedulerResize",function(){return window.setTimeout(function(){if(e.$destroyed)return!0;e._mark_now()},1),!0}),e.attachEvent("onTemplatesReady",function(){e._mark_now_timer=window.setInterval(function(){e._is_initialized()&&e._mark_now()},6e4)}),e.attachEvent("onDestroy",function(){clearInterval(e._mark_now_timer)}),e._mark_now=function(o){var t="dhx_now_time";this._els[t]||(this._els[t]=[]);var r=e._currentDate(),s=this.config;if(e._remove_mark_now(),!o&&s.mark_now&&rthis._min_date&&r.getHours()>=s.first_hour&&r.getHours()1?(m.size&&m.options.length&&(o=(m.position+o)/m.options.length*m.size),u=o,v=o+l):v=(u=0)+l;for(var f=[],g=u;go.start_date||o.days!==void 0&&o.zones)&&!o.type)return t;o.zones=="fullday"&&(o.zones=[0,1440]),o.zones&&o.invert_zones&&(o.zones=e.invertZones(o.zones)),o.id=e.uid(),o.css=o.css||"",o.type=o.type||i;var v=o.sections;if(v){for(var m in v)if(v.hasOwnProperty(m)){var l=v[m];for(l instanceof Array||(l=[l]),c=0;cw?e._get_zone_minutes(p):0,D=y>b||y.getDate()!=w.getDate()?1440:e._get_zone_minutes(y);k.zones=[E,D],t.push(k),w=b,b=e.date.add(b,1,"day")}else g.days instanceof Date&&(g.days=e.date.date_part(g.days).valueOf()),g.zones=o.zones.slice(),t.push(g)}return t},e._get_dates_by_index=function(o,t,r){var s=[];t=e.date.date_part(new Date(t||e._min_date)),r=new Date(r||e._max_date);for(var c=t.getDay(),u=o-c>=0?o-c:7-t.getDay()+o,v=e.date.add(t,u,"day");v+l&&+u<=+l))return s;r=l.getDay()}var f=u.getDay();f>r?r=7-(f-r):r-=f}var g=o.zones,p=e._get_css_classes_by_config(o);if(e._table_view&&e._mode=="month"){var y=[],w=[];if(t)y.push(t),w.push(r);else{w=m?[m]:e._get_dates_by_index(r);for(var b=0;b1?S=S*(N.size||N.options.length)+M:(S=M,N.size&&S>N.position+N.size&&(S=0))}for(t=t||e.locate_holder(S),b=0;b-1||(t.push.apply(t,e._on_scale_add_marker(v,s)),s=e.date.add(s,1,"day"))}}return t},e.markTimespan=function(o){if(!this._els)throw new Error("`scheduler.markTimespan` can't be used before scheduler initialization. Place `scheduler.markTimespan` call after `scheduler.init`.");var t=!1;this._els.dhx_cal_data||(e.get_elements(),t=!0);var r=e._marked_timespans_ids,s=e._marked_timespans_types,c=e._marked_timespans;e.deleteMarkedTimespan(),e.addMarkedTimespan(o);var u=e._mark_timespans();return t&&(e._els=[]),e._marked_timespans_ids=r,e._marked_timespans_types=s,e._marked_timespans=c,u},e.unmarkTimespan=function(o){if(o)for(var t=0;tu&&l<=u||l=c)r[s]=Math.min(c,l),r[s+1]=Math.max(u,f),s-=2;else{if(!v)continue;var g=c>l?0:2;r.splice(s+g,0,l,f)}t.splice(m--,2);break}return r},e._subtract_timespan_zones=function(o,t){for(var r=o.slice(),s=0;sc&&m=m&&u<=l&&r.splice(s,2),cl&&r.splice(f?s+2:s,f?0:2,l,u),s-=2;break}}return r},e.invertZones=function(o){return e._subtract_timespan_zones([0,1440],o.slice())},e._delete_marked_timespan_by_id=function(o){var t=e._marked_timespans_ids[o];if(t){for(var r=0;r1){var p=Math.round((t-e._min_date)/864e5),y=l.size||f.length;t=e.date.add(e._min_date,Math.floor(p/y),"day"),t=e.date.date_part(t)}else t=e.date.date_part(new Date(this._date));if(r=t.getDay(),s=t.valueOf(),u[c]&&u[c][g.key]){var w=u[c][g.key],b=e._get_types_to_render(w[r],w[s]);v.push.apply(v,e._get_configs_to_render(b))}}var k=u.global;if(e.config.overwrite_marked_timespans){var E=k[s]||k[r];v.push.apply(v,e._get_configs_to_render(E))}else k[s]&&v.push.apply(v,e._get_configs_to_render(k[s])),k[r]&&v.push.apply(v,e._get_configs_to_render(k[r]));for(var D=0;D"+i.text+"

"+(i.event_location||"")+"

"+e.templates.marker_date(h)+" - "+e.templates.marker_date(a)+""},e.dblclick_dhx_map_area=function(){!this.config.readonly&&this.config.dblclick_create&&this.addEventNow({start_date:e._date,end_date:e.date.add(e._date,e.config.time_step,"minute")})},e.templates.map_time=function(h,a,i){return e.config.rtl&&!i._timed?e.templates.day_date(a)+" – "+e.templates.day_date(h):i._timed?this.day_date(i.start_date,i.end_date,i)+" "+this.event_date(h):e.templates.day_date(h)+" – "+e.templates.day_date(a)},e.templates.map_text=function(h,a,i){return i.text},e.date.map_start=function(h){return h},e.date.add_map=function(h,a,i){return new Date(h.valueOf())},e.templates.map_date=function(h,a,i){return""},e._latLngUpdate=!1,e.attachEvent("onSchedulerReady",function(){e._isMapPositionSet=!1;const h=document.createElement("div");h.className="dhx_map",h.id="dhx_gmap",h.style.display="none",e._obj.appendChild(h),e._els.dhx_gmap=[],e._els.dhx_gmap.push(h),o("dhx_gmap");const a={zoom:e.config.map_initial_zoom||10,center:e.config.map_initial_position,mapTypeId:e.config.map_type||google.maps.MapTypeId.ROADMAP},i=new google.maps.Map(document.getElementById("dhx_gmap"),a);i.disableDefaultUI=!1,i.disableDoubleClickZoom=!e.config.readonly,google.maps.event.addListener(i,"dblclick",function(u){const v=e.ext.mapView.geocoder;if(!e.config.readonly&&e.config.dblclick_create){var m=u.latLng;v.geocode({latLng:m},function(l,f){f==google.maps.GeocoderStatus.OK&&(m=l[0].geometry.location,e.addEventNow({lat:m.lat(),lng:m.lng(),event_location:l[0].formatted_address,start_date:e._date,end_date:e.date.add(e._date,e.config.time_step,"minute")}))})}});var d={content:""};e.config.map_infowindow_max_width&&(d.maxWidth=e.config.map_infowindow_max_width),e.map={_points:[],_markers:[],_infowindow:new google.maps.InfoWindow(d),_infowindows_content:[],_initialization_count:-1,_obj:i},e.ext.mapView.geocoder=new google.maps.Geocoder,e.ext.mapView.map=i,e.ext.mapView.points=e.map._points,e.ext.mapView.markers=e.map._markers,e.ext.mapView.infoWindow=e.map._infowindow,e.config.map_resolve_user_location&&navigator.geolocation&&(e._isMapPositionSet||navigator.geolocation.getCurrentPosition(function(u){var v=new google.maps.LatLng(u.coords.latitude,u.coords.longitude);i.setCenter(v),i.setZoom(e.config.map_zoom_after_resolve||10),e.map._infowindow.setContent(e.locale.labels.marker_geo_success),e.map._infowindow.position=i.getCenter(),e.map._infowindow.open(i),e._isMapPositionSet=!0},function(){e.map._infowindow.setContent(e.locale.labels.marker_geo_fail),e.map._infowindow.setPosition(i.getCenter()),e.map._infowindow.open(i),e._isMapPositionSet=!0})),google.maps.event.addListener(i,"resize",function(u){h.style.zIndex="5",i.setZoom(i.getZoom())}),google.maps.event.addListener(i,"tilesloaded",function(u){h.style.zIndex="5"}),h.style.display="none";const n=e.render_data;function _(){var u=e.get_visible_events();u.sort(function(E,D){return E.start_date.valueOf()==D.start_date.valueOf()?E.id>D.id?1:-1:E.start_date>D.start_date?1:-1});for(var v="
",m=0;m
"+e.templates.map_time(l.start_date,l.end_date,l)+"
",v+=`
+ `,e._obj.appendChild(h),e.event(h,"click",function(){e.expanded?e.collapse():e.expand()})}),e._maximize=function(){this.expanded=!this.expanded,this.expanded?this.ext.fullscreen.toggleIcon.classList.add("dhx_expand_icon--expanded"):this.ext.fullscreen.toggleIcon.classList.remove("dhx_expand_icon--expanded");for(var h=["left","top"],a=0;a400))try{s=JSON.parse(n.xmlDoc.responseText)}catch{}o(s)})},r._plain_export_copy=function(i,_){var o={};for(var t in i)o[t]=i[t];return o.start_date=_(o.start_date),o.end_date=_(o.end_date),o.$text=this.templates.event_text(i.start_date,i.end_date,i),o},r._serialize_plain=function(i,_){var o;i=i||r.date.date_to_str("%Y%m%dT%H%i%s",!0),o=_&&_.start&&_.end?r.getEvents(_.start,_.end):r.getEvents();for(var t=[],n=0;n
 
',k+='
'+t+"
",k+='
'+n+"
",k+='
',u.innerHTML=k,u.style.zIndex=100,u.firstChild},e.render_event_bar=function(a){var r=this._els.dhx_cal_data[0],d=this._colsS[a._sday],i=this._colsS[a._eday];i==d&&(i=this._colsS[a._eday+1]);var _=this.xy.bar_height,o=this._colsS.heights[a._sweek]+(this._colsS.height?this.xy.month_scale_height+2:2)+a._sorder*_,t=document.createElement("div"),n=a._timed?"dhx_cal_event_clear":"dhx_cal_event_line",s=e.templates["event_class_"+a.layer]?e.templates["event_class_"+a.layer](a.start_date,a.end_date,a):e.templates.event_class(a.start_date,a.end_date,a);s&&(n=n+" "+s);var c='
';a._timed&&(c+=e.templates["event_bar_date_"+a.layer]?e.templates["event_bar_date_"+a.layer](a.start_date,a.end_date,a):e.templates.event_bar_date(a.start_date,a.end_date,a)),c+=e.templates["event_bar_text_"+a.layer]?e.templates["event_bar_text_"+a.layer](a.start_date,a.end_date,a):e.templates.event_bar_text(a.start_date,a.end_date,a)+"
)",c+="
",t.innerHTML=c,this._rendered.push(t.firstChild),r.appendChild(t.firstChild)},e.render_event=function(a){var r=e.xy.menu_width;if(e.getLayer(a.layer).noMenu&&(r=0),!(a._sday<0)){var d=e.locate_holder(a._sday);if(d){var i=60*a.start_date.getHours()+a.start_date.getMinutes(),_=60*a.end_date.getHours()+a.end_date.getMinutes()||60*e.config.last_hour,o=Math.round((60*i*1e3-60*this.config.first_hour*60*1e3)*this.config.hour_size_px/36e5)%(24*this.config.hour_size_px)+1,t=Math.max(e.xy.min_event_height,(_-i)*this.config.hour_size_px/60)+1,n=Math.floor((d.clientWidth-r)/a._count),s=a._sorder*n+1;a._inner||(n*=a._count-a._sorder);var c=this._render_v_bar(a.id,r+s,o,n,t,a._text_style,e.templates.event_header(a.start_date,a.end_date,a),e.templates.event_text(a.start_date,a.end_date,a));if(this._rendered.push(c),d.appendChild(c),s=s+parseInt(d.style.left,10)+r,o+=this._dy_shift,c.style.zIndex=this._layers_zindex[a.layer],this._edit_id==a.id){c.style.zIndex=parseInt(c.style.zIndex)+1;var u=c.style.zIndex;n=Math.max(n-4,e.xy.editor_width),(c=document.createElement("div")).setAttribute("event_id",a.id),c.setAttribute(this.config.event_attribute,a.id),this.set_xy(c,n,t-20,s,o+14),c.className="dhx_cal_editor",c.style.zIndex=u;var v=document.createElement("div");this.set_xy(v,n-6,t-26),v.style.cssText+=";margin:2px 2px 2px 2px;overflow:hidden;",v.style.zIndex=u,c.appendChild(v),this._els.dhx_cal_data[0].appendChild(c),this._rendered.push(c),v.innerHTML="",this._editor=v.firstChild,this._editor.addEventListener("keypress",function(p){if(p.shiftKey)return!0;var y=p.keyCode;y==e.keys.edit_save&&e.editStop(!0),y==e.keys.edit_cancel&&e.editStop(!1)}),this._editor.addEventListener("selectstart",function(p){return p.cancelBubble=!0,!0}),v.firstChild.focus(),this._els.dhx_cal_data[0].scrollLeft=0,v.firstChild.select()}if(this._select_id==a.id){c.style.zIndex=parseInt(c.style.zIndex)+1;for(var m=this.config["icons_"+(this._edit_id==a.id?"edit":"select")],l="",f=0;f";var g=this._render_v_bar(a.id,s-r+1,o,r,20*m.length+26,"","
",l,!0);g.style.left=s-r+1,g.style.zIndex=c.style.zIndex,this._els.dhx_cal_data[0].appendChild(g),this._rendered.push(g)}}}},e.filter_agenda=function(a,r){var d=e.getLayer(r.layer);return d&&d.visible}})},limit:function(e){e.config.limit_start=null,e.config.limit_end=null,e.config.limit_view=!1,e.config.check_limits=!0,e.config.mark_now=!0,e.config.display_marked_timespans=!0,e.config.overwrite_marked_timespans=!0,e._temp_limit_scope=function(){var h=null,a="dhx_time_block",r="default",d=function(o,t,n){var s=typeof o=="object"?o:{days:o};return s.type=a,s.css="",t&&(n&&(s.sections=n),s=function(c,u,v){return u instanceof Date&&v instanceof Date?(c.start_date=u,c.end_date=v):(c.days=u,c.zones=v),c}(s,o,t)),s};e.blockTime=function(o,t,n){var s=d(o,t,n);return e.addMarkedTimespan(s)},e.unblockTime=function(o,t,n){var s=d(o,t=t||"fullday",n);return e.deleteMarkedTimespan(s)},e.attachEvent("onBeforeViewChange",function(o,t,n,s){function c(u,v){var m=e.config.limit_start,l=e.config.limit_end,f=e.date.add(u,1,v);return u.valueOf()>l.valueOf()||f<=m.valueOf()}return!e.config.limit_view||!c(s=s||t,n=n||o)||t.valueOf()==s.valueOf()||(setTimeout(function(){if(e.$destroyed)return!0;var u=c(t,n)?e.config.limit_start:t;e.setCurrentView(c(u,n)?null:u,n)},1),!1)}),e.checkInMarkedTimespan=function(o,t,n){t=t||r;for(var s=!0,c=new Date(o.start_date.valueOf()),u=e.date.add(c,1,"day"),v=e._marked_timespans;cu||o.end_date.getDate()!=c.getDate()?1440:e._get_zone_minutes(o.end_date),y=l[f],w=l[f+1];if(yg&&!(s=typeof n=="function"&&n(o,g,p,y,w)))break}}return!s};var i=e.checkLimitViolation=function(o){if(!o||!e.config.check_limits)return!0;var t=e,n=t.config,s=[];if(o.rec_type)for(var c=e.getRecDates(o),u=0;u=n.limit_start.valueOf()&&v.end_date.valueOf()<=n.limit_end.valueOf())&&(f=!e.checkInMarkedTimespan(v,a,function(g,p,y,w,b){var k=!0;return p<=b&&p>=w&&((b==1440||y<=b)&&(k=!1),g._timed&&t._drag_id&&t._drag_mode=="new-size"?(g.start_date.setHours(0),g.start_date.setMinutes(b)):k=!1),(y>=w&&y<=b||pb)&&(g._timed&&t._drag_id&&t._drag_mode=="new-size"?(g.end_date.setHours(0),g.end_date.setMinutes(w)):k=!1),k})),f||(f=t.checkEvent("onLimitViolation")?t.callEvent("onLimitViolation",[v.id,v]):f),m=m&&f}return m||(t._drag_id=null,t._drag_mode=null),m};function _(o,t,n,s,c){var u=e,v=[],m={_props:"map_to",matrix:"y_property"};for(var l in m){var f=m[l];if(u[l])for(var g in u[l]){var p=u[l][g][f];o[p]&&(v=u._add_timespan_zones(v,e._get_blocked_zones(t[g],o[p],n,s,c)))}}return v=u._add_timespan_zones(v,e._get_blocked_zones(t,"global",n,s,c))}e._get_blocked_zones=function(o,t,n,s,c){var u=[];if(o&&o[t])for(var v=o[t],m=this._get_relevant_blocked_zones(n,s,v,c),l=0;l=e.config.limit_end.valueOf()&&(t.start_date=this.date.add(e.config.limit_end,-1,"day")),t.end_date=e.config.limit_end.valueOf()&&(t.end_date=this.date.add(e.config.limit_end,-1,"day")),t.start_date.valueOf()>=t.end_date.valueOf()&&(t.end_date=this.date.add(t.start_date,this.config.event_duration||this.config.time_step,"minute")),t._timed=this.isOneDayEvent(t)),!0}),e.attachEvent("onEventChanged",function(o){if(!o)return!0;var t=e.getEvent(o);if(!i(t)){if(!h)return!1;t.start_date=h[0],t.end_date=h[1],t._timed=this.isOneDayEvent(t)}return!0}),e.attachEvent("onBeforeEventChanged",function(o,t,n){return i(o)}),e.attachEvent("onBeforeEventCreated",function(o){var t=e.getActionData(o).date,n={_timed:!0,start_date:t,end_date:e.date.add(t,e.config.time_step,"minute")};return i(n)}),e.attachEvent("onViewChange",function(){e._mark_now()}),e.attachEvent("onAfterSchedulerResize",function(){return window.setTimeout(function(){if(e.$destroyed)return!0;e._mark_now()},1),!0}),e.attachEvent("onTemplatesReady",function(){e._mark_now_timer=window.setInterval(function(){e._is_initialized()&&e._mark_now()},6e4)}),e.attachEvent("onDestroy",function(){clearInterval(e._mark_now_timer)}),e._mark_now=function(o){var t="dhx_now_time";this._els[t]||(this._els[t]=[]);var n=e._currentDate(),s=this.config;if(e._remove_mark_now(),!o&&s.mark_now&&nthis._min_date&&n.getHours()>=s.first_hour&&n.getHours()1?(m.size&&m.options.length&&(o=(m.position+o)/m.options.length*m.size),u=o,v=o+l):v=(u=0)+l;for(var f=[],g=u;go.start_date||o.days!==void 0&&o.zones)&&!o.type)return t;o.zones=="fullday"&&(o.zones=[0,1440]),o.zones&&o.invert_zones&&(o.zones=e.invertZones(o.zones)),o.id=e.uid(),o.css=o.css||"",o.type=o.type||r;var v=o.sections;if(v){for(var m in v)if(v.hasOwnProperty(m)){var l=v[m];for(l instanceof Array||(l=[l]),c=0;cw?e._get_zone_minutes(p):0,D=y>b||y.getDate()!=w.getDate()?1440:e._get_zone_minutes(y);k.zones=[E,D],t.push(k),w=b,b=e.date.add(b,1,"day")}else g.days instanceof Date&&(g.days=e.date.date_part(g.days).valueOf()),g.zones=o.zones.slice(),t.push(g)}return t},e._get_dates_by_index=function(o,t,n){var s=[];t=e.date.date_part(new Date(t||e._min_date)),n=new Date(n||e._max_date);for(var c=t.getDay(),u=o-c>=0?o-c:7-t.getDay()+o,v=e.date.add(t,u,"day");v+l&&+u<=+l))return s;n=l.getDay()}var f=u.getDay();f>n?n=7-(f-n):n-=f}var g=o.zones,p=e._get_css_classes_by_config(o);if(e._table_view&&e._mode=="month"){var y=[],w=[];if(t)y.push(t),w.push(n);else{w=m?[m]:e._get_dates_by_index(n);for(var b=0;b1?S=S*(N.size||N.options.length)+M:(S=M,N.size&&S>N.position+N.size&&(S=0))}for(t=t||e.locate_holder(S),b=0;b-1||(t.push.apply(t,e._on_scale_add_marker(v,s)),s=e.date.add(s,1,"day"))}}return t},e.markTimespan=function(o){if(!this._els)throw new Error("`scheduler.markTimespan` can't be used before scheduler initialization. Place `scheduler.markTimespan` call after `scheduler.init`.");var t=!1;this._els.dhx_cal_data||(e.get_elements(),t=!0);var n=e._marked_timespans_ids,s=e._marked_timespans_types,c=e._marked_timespans;e.deleteMarkedTimespan(),e.addMarkedTimespan(o);var u=e._mark_timespans();return t&&(e._els=[]),e._marked_timespans_ids=n,e._marked_timespans_types=s,e._marked_timespans=c,u},e.unmarkTimespan=function(o){if(o)for(var t=0;tu&&l<=u||l=c)n[s]=Math.min(c,l),n[s+1]=Math.max(u,f),s-=2;else{if(!v)continue;var g=c>l?0:2;n.splice(s+g,0,l,f)}t.splice(m--,2);break}return n},e._subtract_timespan_zones=function(o,t){for(var n=o.slice(),s=0;sc&&m=m&&u<=l&&n.splice(s,2),cl&&n.splice(f?s+2:s,f?0:2,l,u),s-=2;break}}return n},e.invertZones=function(o){return e._subtract_timespan_zones([0,1440],o.slice())},e._delete_marked_timespan_by_id=function(o){var t=e._marked_timespans_ids[o];if(t){for(var n=0;n1){var p=Math.round((t-e._min_date)/864e5),y=l.size||f.length;t=e.date.add(e._min_date,Math.floor(p/y),"day"),t=e.date.date_part(t)}else t=e.date.date_part(new Date(this._date));if(n=t.getDay(),s=t.valueOf(),u[c]&&u[c][g.key]){var w=u[c][g.key],b=e._get_types_to_render(w[n],w[s]);v.push.apply(v,e._get_configs_to_render(b))}}var k=u.global;if(e.config.overwrite_marked_timespans){var E=k[s]||k[n];v.push.apply(v,e._get_configs_to_render(E))}else k[s]&&v.push.apply(v,e._get_configs_to_render(k[s])),k[n]&&v.push.apply(v,e._get_configs_to_render(k[n]));for(var D=0;D"+r.text+"

"+(r.event_location||"")+"

"+e.templates.marker_date(h)+" - "+e.templates.marker_date(a)+""},e.dblclick_dhx_map_area=function(){!this.config.readonly&&this.config.dblclick_create&&this.addEventNow({start_date:e._date,end_date:e.date.add(e._date,e.config.time_step,"minute")})},e.templates.map_time=function(h,a,r){return e.config.rtl&&!r._timed?e.templates.day_date(a)+" – "+e.templates.day_date(h):r._timed?this.day_date(r.start_date,r.end_date,r)+" "+this.event_date(h):e.templates.day_date(h)+" – "+e.templates.day_date(a)},e.templates.map_text=function(h,a,r){return r.text},e.date.map_start=function(h){return h},e.date.add_map=function(h,a,r){return new Date(h.valueOf())},e.templates.map_date=function(h,a,r){return""},e._latLngUpdate=!1,e.attachEvent("onSchedulerReady",function(){e._isMapPositionSet=!1;const h=document.createElement("div");h.className="dhx_map",h.id="dhx_gmap",h.style.display="none",e._obj.appendChild(h),e._els.dhx_gmap=[],e._els.dhx_gmap.push(h),o("dhx_gmap");const a={zoom:e.config.map_initial_zoom||10,center:e.config.map_initial_position,mapTypeId:e.config.map_type||google.maps.MapTypeId.ROADMAP},r=new google.maps.Map(document.getElementById("dhx_gmap"),a);r.disableDefaultUI=!1,r.disableDoubleClickZoom=!e.config.readonly,google.maps.event.addListener(r,"dblclick",function(u){const v=e.ext.mapView.geocoder;if(!e.config.readonly&&e.config.dblclick_create){var m=u.latLng;v.geocode({latLng:m},function(l,f){f==google.maps.GeocoderStatus.OK&&(m=l[0].geometry.location,e.addEventNow({lat:m.lat(),lng:m.lng(),event_location:l[0].formatted_address,start_date:e._date,end_date:e.date.add(e._date,e.config.time_step,"minute")}))})}});var d={content:""};e.config.map_infowindow_max_width&&(d.maxWidth=e.config.map_infowindow_max_width),e.map={_points:[],_markers:[],_infowindow:new google.maps.InfoWindow(d),_infowindows_content:[],_initialization_count:-1,_obj:r},e.ext.mapView.geocoder=new google.maps.Geocoder,e.ext.mapView.map=r,e.ext.mapView.points=e.map._points,e.ext.mapView.markers=e.map._markers,e.ext.mapView.infoWindow=e.map._infowindow,e.config.map_resolve_user_location&&navigator.geolocation&&(e._isMapPositionSet||navigator.geolocation.getCurrentPosition(function(u){var v=new google.maps.LatLng(u.coords.latitude,u.coords.longitude);r.setCenter(v),r.setZoom(e.config.map_zoom_after_resolve||10),e.map._infowindow.setContent(e.locale.labels.marker_geo_success),e.map._infowindow.position=r.getCenter(),e.map._infowindow.open(r),e._isMapPositionSet=!0},function(){e.map._infowindow.setContent(e.locale.labels.marker_geo_fail),e.map._infowindow.setPosition(r.getCenter()),e.map._infowindow.open(r),e._isMapPositionSet=!0})),google.maps.event.addListener(r,"resize",function(u){h.style.zIndex="5",r.setZoom(r.getZoom())}),google.maps.event.addListener(r,"tilesloaded",function(u){h.style.zIndex="5"}),h.style.display="none";const i=e.render_data;function _(){var u=e.get_visible_events();u.sort(function(E,D){return E.start_date.valueOf()==D.start_date.valueOf()?E.id>D.id?1:-1:E.start_date>D.start_date?1:-1});for(var v="
",m=0;m
"+e.templates.map_time(l.start_date,l.end_date,l)+"
",v+=`
-
`,v+="
"+e.templates.map_text(l.start_date,l.end_date,l)+"
"}v+="
",e._els.dhx_cal_data[0].scrollTop=0,e._els.dhx_cal_data[0].innerHTML=v;var b=e._els.dhx_cal_data[0].firstChild.childNodes,k=e._getNavDateElement();for(k&&(k.innerHTML=e.templates[e._mode+"_date"](e._min_date,e._max_date,e._mode)),e._rendered=[],m=0;m
"+p.date+"
"+p.description+"
",e._table_view=!0,e.set_sizes()}}(u),u){(function(){e._selected_event_id=null,e.map._infowindow.close();var g=e.map._markers;for(var p in g)g.hasOwnProperty(p)&&(g[p].setMap(null),delete e.map._markers[p],e.map._infowindows_content[p]&&delete e.map._infowindows_content[p])})(),_(),m.style.display="block",o("dhx_gmap"),v=e.map._obj.getCenter();for(var l=e.get_visible_events(),f=0;fe._min_date||v.start_datee._max_date||v.start_date.valueOf()>=e._min_date&&v.end_date.valueOf()<=e._max_date?(e.map._markers[u]&&e.map._markers[u].setMap(null),s(v)):(e._selected_event_id=null,e.map._infowindow.close(),e.map._markers[u]&&e.map._markers[u].setMap(null)),!0}),e.attachEvent("onEventIdChange",function(u,v){var m=e.getEvent(v);return(m.start_datee._min_date||m.start_datee._max_date||m.start_date.valueOf()>=e._min_date&&m.end_date.valueOf()<=e._max_date)&&(e.map._markers[u]&&(e.map._markers[u].setMap(null),delete e.map._markers[u]),e.map._infowindows_content[u]&&delete e.map._infowindows_content[u],s(m)),!0}),e.attachEvent("onEventAdded",function(u,v){return e._dataprocessor||(v.start_datee._min_date||v.start_datee._max_date||v.start_date.valueOf()>=e._min_date&&v.end_date.valueOf()<=e._max_date)&&(e.map._markers[u]&&e.map._markers[u].setMap(null),s(v)),!0}),e.attachEvent("onBeforeEventDelete",function(u,v){return e.map._markers[u]&&e.map._markers[u].setMap(null),e._selected_event_id=null,e.map._infowindow.close(),!0}),e._event_resolve_delay=1500,e.attachEvent("onEventLoading",function(u){return e.config.map_resolve_event_location&&u.event_location&&!u.lat&&!u.lng&&(e._event_resolve_delay+=1500,function(v,m,l,f){setTimeout(function(){if(e.$destroyed)return!0;var g=v.apply(m,l);return v=m=l=null,g},f||1)}(c,this,[u],e._event_resolve_delay)),!0}),e.attachEvent("onEventCancel",function(u,v){return v&&(e.map._markers[u]&&e.map._markers[u].setMap(null),e.map._infowindow.close()),!0})})},minical:function(e){const h=e._createDomEventScope();e.config.minicalendar={mark_events:!0},e._synced_minicalendars=[],e.renderCalendar=function(a,i,d){var n=null,_=a.date||e._currentDate();if(typeof _=="string"&&(_=this.templates.api_date(_)),i)n=this._render_calendar(i.parentNode,_,a,i),e.unmarkCalendar(n);else{var o=a.container,t=a.position;if(typeof o=="string"&&(o=document.getElementById(o)),typeof t=="string"&&(t=document.getElementById(t)),t&&t.left===void 0&&t.right===void 0){var r=e.$domHelpers.getOffset(t);t={top:r.top+t.offsetHeight,left:r.left}}o||(o=e._get_def_cont(t)),(n=this._render_calendar(o,_,a)).$_eventAttached||(n.$_eventAttached=!0,h.attach(n,"click",(function(p){var y=p.target||p.srcElement,w=e.$domHelpers;if(w.closest(y,".dhx_month_head")&&!w.closest(y,".dhx_after")&&!w.closest(y,".dhx_before")){var b=w.closest(y,"[data-cell-date]").getAttribute("data-cell-date"),k=e.templates.parse_date(b);e.unmarkCalendar(this),e.markCalendar(this,k,"dhx_calendar_click"),this._last_date=k,this.conf.handler&&this.conf.handler.call(e,k,this)}}).bind(n)))}if(e.config.minicalendar.mark_events)for(var s=e.date.month_start(_),c=e.date.add(s,1,"month"),u=this.getEvents(s,c),v=this["filter_"+this._mode],m={},l=0;l=c.valueOf())););}}return this._markCalendarCurrentDate(n),n.conf=a,a.sync&&!d&&this._synced_minicalendars.push(n),n.conf._on_xle_handler||(n.conf._on_xle_handler=e.attachEvent("onXLE",function(){e.updateCalendar(n,n.conf.date)})),this.config.wai_aria_attributes&&this.config.wai_aria_application_role&&n.setAttribute("role","application"),n},e._get_def_cont=function(a){return this._def_count||(this._def_count=document.createElement("div"),this._def_count.className="dhx_minical_popup",e.event(this._def_count,"click",function(i){i.cancelBubble=!0}),document.body.appendChild(this._def_count)),a.left&&(this._def_count.style.left=a.left+"px"),a.right&&(this._def_count.style.right=a.right+"px"),a.top&&(this._def_count.style.top=a.top+"px"),a.bottom&&(this._def_count.style.bottom=a.bottom+"px"),this._def_count._created=new Date,this._def_count},e._locateCalendar=function(a,i){if(typeof i=="string"&&(i=e.templates.api_date(i)),+i>+a._max_date||+i<+a._min_date)return null;for(var d=a.querySelector(".dhx_year_body").childNodes[0],n=0,_=new Date(a._min_date);+this.date.add(_,1,"week")<=+i;)_=this.date.add(_,1,"week"),n++;var o=e.config.start_on_monday,t=(i.getDay()||(o?7:0))-(o?1:0);const r=d.querySelector(`.dhx_cal_month_row:nth-child(${n+1}) .dhx_cal_month_cell:nth-child(${t+1})`);return r?r.firstChild:null},e.markCalendar=function(a,i,d){var n=this._locateCalendar(a,i);n&&(n.className+=" "+d)},e.unmarkCalendar=function(a,i,d){if(d=d||"dhx_calendar_click",i=i||a._last_date){var n=this._locateCalendar(a,i);n&&(n.className=(n.className||"").replace(RegExp(d,"g")))}},e._week_template=function(a){for(var i=a||250,d=0,n=document.createElement("div"),_=this.date.week_start(e._currentDate()),o=0;o<7;o++)this._cols[o]=Math.floor(i/(7-o)),this._render_x_header(o,d,_,n),_=this.date.add(_,1,"day"),i-=this._cols[o],d+=this._cols[o];return n.lastChild.className+=" dhx_scale_bar_last",n},e.updateCalendar=function(a,i){a.conf.date=i,this.renderCalendar(a.conf,a,!0)},e._mini_cal_arrows=[" "," "],e._render_calendar=function(a,i,d,n){var _=e.templates,o=this._cols;this._cols=[];var t=this._mode;this._mode="calendar";var r=this._colsS;this._colsS={height:0};var s=new Date(this._min_date),c=new Date(this._max_date),u=new Date(e._date),v=_.month_day,m=this._ignores_detected;this._ignores_detected=0,_.month_day=_.calendar_date,i=this.date.month_start(i);var l,f=this._week_template(a.offsetWidth-1-this.config.minicalendar.padding);n?l=n:(l=document.createElement("div")).className="dhx_cal_container dhx_mini_calendar",l.setAttribute("date",this._helpers.formatDate(i)),l.innerHTML="
":"'>")+"
"+(f?f.innerHTML:"")+"
";var g=l.querySelector(".dhx_year_month"),p=l.querySelector(".dhx_year_week"),y=l.querySelector(".dhx_year_body");if(g.innerHTML=this.templates.calendar_month(i),d.navigation)for(var w=function($,V){var z=e.date.add($._date,V,"month");e.updateCalendar($,z),e._date.getMonth()==$._date.getMonth()&&e._date.getFullYear()==$._date.getFullYear()&&e._markCalendarCurrentDate($)},b=["dhx_cal_prev_button","dhx_cal_next_button"],k=["left:1px;top:4px;position:absolute;","left:auto; right:1px;top:4px;position:absolute;"],E=[-1,1],D=function($){return function(){if(d.sync)for(var V=e._synced_minicalendars,z=0;z500)&&(a=this._def_count.firstChild),a&&(h.detachAll(),a.innerHTML="",a.parentNode&&a.parentNode.removeChild(a),this._def_count&&(this._def_count.style.top="-1000px"),a.conf&&a.conf._on_xle_handler&&e.detachEvent(a.conf._on_xle_handler))},e.isCalendarVisible=function(){return!!(this._def_count&&parseInt(this._def_count.style.top,10)>0)&&this._def_count},e.attachEvent("onTemplatesReady",function(){e.event(document.body,"click",function(){e.destroyCalendar()})},{once:!0}),e.form_blocks.calendar_time={render:function(a){var i="",d=e.config,n=this.date.date_part(e._currentDate()),_=1440,o=0;d.limit_time_select&&(o=60*d.first_hour,_=60*d.last_hour+1),n.setHours(o/60),a._time_values=[],i+=" ")+"  –  "+i+""},set_value:function(a,i,d,n){var _,o,t=a.getElementsByTagName("input"),r=a.getElementsByTagName("select"),s=function(g,p,y){e.event(g,"click",function(){e.destroyCalendar(null,!0),e.renderCalendar({position:g,date:new Date(this._date),navigation:!0,handler:function(w){g.value=e.templates.calendar_time(w),g._date=new Date(w),e.destroyCalendar(),e.config.event_duration&&e.config.auto_end_date&&y===0&&m()}})})};if(e.config.full_day){if(!a._full_day){var c="";e.config.wide_form||(c=a.previousSibling.innerHTML+c),a.previousSibling.innerHTML=c,a._full_day=!0}var u=a.previousSibling.getElementsByTagName("input")[0],v=e.date.time_part(d.start_date)===0&&e.date.time_part(d.end_date)===0;u.checked=v,r[0].disabled=u.checked,r[1].disabled=u.checked,u.$_eventAttached||(u.$_eventAttached=!0,e.event(u,"click",function(){if(u.checked===!0){var g={};e.form_blocks.calendar_time.get_value(a,g),_=e.date.date_part(g.start_date),(+(o=e.date.date_part(g.end_date))==+_||+o>=+_&&(d.end_date.getHours()!==0||d.end_date.getMinutes()!==0))&&(o=e.date.add(o,1,"day"))}var p=_||d.start_date,y=o||d.end_date;l(t[0],p),l(t[1],y),r[0].value=60*p.getHours()+p.getMinutes(),r[1].value=60*y.getHours()+y.getMinutes(),r[0].disabled=u.checked,r[1].disabled=u.checked}))}if(e.config.event_duration&&e.config.auto_end_date){var m=function(){e.config.auto_end_date&&e.config.event_duration&&(_=e.date.add(t[0]._date,r[0].value,"minute"),o=new Date(_.getTime()+60*e.config.event_duration*1e3),t[1].value=e.templates.calendar_time(o),t[1]._date=e.date.date_part(new Date(o)),r[1].value=60*o.getHours()+o.getMinutes())};r[0].$_eventAttached||r[0].addEventListener("change",m)}function l(g,p,y){s(g,p,y),g.value=e.templates.calendar_time(p),g._date=e.date.date_part(new Date(p))}function f(g){for(var p=n._time_values,y=60*g.getHours()+g.getMinutes(),w=y,b=!1,k=0;k=t.valueOf()))for(var r=d;r.valueOf()r&&e.markCalendar(a,r,"dhx_calendar_click"),r=e.date.add(r,1,"day")},e.attachEvent("onEventCancel",function(){e.destroyCalendar(null,!0)}),e.attachEvent("onDestroy",function(){e.destroyCalendar()})},monthheight:function(e){e.attachEvent("onTemplatesReady",function(){e.xy.scroll_width=0;var h=e.render_view_data;e.render_view_data=function(){var i=this._els.dhx_cal_data[0];i.firstChild._h_fix=!0,h.apply(e,arguments);var d=parseInt(i.style.height);i.style.height="1px",i.style.height=i.scrollHeight+"px",this._obj.style.height=this._obj.clientHeight+i.scrollHeight-d+"px"};var a=e._reset_month_scale;e._reset_month_scale=function(i,d,n,_){var o={clientHeight:100};a.apply(e,[o,d,n,_]),i.innerHTML=o.innerHTML}})},multisection:function(e){q("Multisection",e.assert)},multiselect:function(e){e.form_blocks.multiselect={render:function(h){var a="dhx_multi_select_control dhx_multi_select_"+h.name;h.vertical&&(a+=" dhx_multi_select_control_vertical");for(var i="
",d=0;d"+h.options[d].label+"";return i+="
"},set_value:function(h,a,i,d){for(var n=h.getElementsByTagName("input"),_=0;_]*>","g"),d=new RegExp("]*>","g");function n(b){return b.replace(d,` -`).replace(i,"")}function _(b,k){b=parseFloat(b),k=parseFloat(k),isNaN(k)||(b-=k);var E=t(b);return b=b-E.width+E.cols*h,isNaN(b)?"auto":100*b/h}function o(b,k,E){b=parseFloat(b),k=parseFloat(k),!isNaN(k)&&E&&(b-=k);var D=t(b);return b=b-D.width+D.cols*h,isNaN(b)?"auto":100*b/(h-(isNaN(k)?0:k))}function t(b){for(var k=0,E=e._els.dhx_cal_header[0].childNodes,D=E[1]?E[1].childNodes:E[0].childNodes,x=0;xN))break;b-=N+1,k+=N+1}return{width:k,cols:x}}function r(b){return b=parseFloat(b),isNaN(b)?"auto":100*b/a}function s(b,k){return(window.getComputedStyle?window.getComputedStyle(b,null)[k]:b.currentStyle?b.currentStyle[k]:null)||""}function c(b,k){for(var E=parseInt(b.style.left,10),D=0;DE)return D;return k}function v(b){return b?"":""}function m(b,k,E,D){var x="<"+b+" profile='"+k+"'";return E&&(x+=" header='"+E+"'"),D&&(x+=" footer='"+D+"'"),x+=">"}function l(){var b="",k=e._mode;if(e.matrix&&e.matrix[e._mode]&&(k=e.matrix[e._mode].render=="cell"?"matrix":"timeline"),b+="",e._mode=="week_agenda")for(var E=e._els.dhx_cal_data[0].getElementsByTagName("DIV"),D=0;D"+n(E[D].innerHTML)+"");else if(e._mode=="agenda"||e._mode=="map")b+=""+n((E=e._els.dhx_cal_header[0].childNodes[0].childNodes)[0].innerHTML)+""+n(E[1].innerHTML)+"";else if(e._mode=="year")for(E=e._els.dhx_cal_data[0].childNodes,D=0;D",b+=g(E[D].querySelector(".dhx_year_week").childNodes),b+=f(E[D].querySelector(".dhx_year_body")),b+="";else{b+="",b+=g(E=e._els.dhx_cal_header[0].childNodes),b+="";var x=e._els.dhx_cal_data[0];if(e.matrix&&e.matrix[e._mode]){for(b+="",D=0;D";b+="",a=x.firstChild.rows[0].cells[0].offsetHeight}else if(x.firstChild.tagName=="TABLE")b+=f(x);else{for(x=x.childNodes[x.childNodes.length-1];x.className.indexOf("dhx_scale_holder")==-1;)x=x.previousSibling;for(x=x.childNodes,b+="",D=0;D";b+="",a=x[0].offsetHeight}}return b+=""}function f(b){for(var k="",E=b.querySelectorAll("tr"),D=0;D",a=S[0].offsetHeight}return k}function g(b){var k,E="";e.matrix&&e.matrix[e._mode]&&(e.matrix[e._mode].second_scale&&(k=b[1].childNodes),b=b[0].childNodes);for(var D=0;D";if(h=b[0].offsetWidth,k){var x=0,S=b[0].offsetWidth,N=1;for(D=0;D",(x+=k[D].offsetWidth)>=S&&(S+=b[N]?b[N].offsetWidth:0,N++),h=k[0].offsetWidth}return E}function p(b){var k="",E=e._rendered,D=e.matrix&&e.matrix[e._mode];if(e._mode=="agenda"||e._mode=="map")for(var x=0;x";else if(e._mode=="week_agenda")for(x=0;x"+n(E[x].innerHTML)+"";else if(e._mode=="year")for(E=e.get_visible_events(),x=0;x",(S=e.date.add(S,1,"day")).valueOf()>=e._max_date.valueOf())break}}else if(D&&D.render=="cell")for(E=e._els.dhx_cal_data[0].getElementsByTagName("TD"),x=0;x";else for(x=0;x",z=="event"?(k+="
",A=b?s(E[x].childNodes[2],"color"):"",k+=""):(A=b?s(E[x],"color"):"",k+=""),k+=""}}}}return k}function y(b,k,E,D,x,S){var N=!1;D=="fullcolor"&&(N=!0,D="color"),D=D||"color";var M,A="";if(b){var C=e._date,T=e._mode;k=e.date[E+"_start"](k),k=e.date["get_"+E+"_end"]?e.date["get_"+E+"_end"](k):e.date.add(k,1,E),A=m("pages",D,x,S);for(var O=new Date(b);+O<+k;O=this.date.add(O,1,E))this.setCurrentView(O,E),A+=((M="page")?"<"+M+">":"")+l().replace("–","-")+p(N)+v("page");A+=v("pages"),this.setCurrentView(C,T)}else A=m("data",D,x,S)+l().replace("–","-")+p(N)+v("data");return A}function w(b,k,E,D,x,S,N){(function(M,A){var C=e.uid(),T=document.createElement("div");T.style.display="none",document.body.appendChild(T),T.innerHTML='
',document.getElementById(C).firstChild.value=encodeURIComponent(M),document.getElementById(C).submit(),T.parentNode.removeChild(T)})(typeof x=="object"?function(M){for(var A="",C=0;Cwindow.innerWidth&&(n=window.innerWidth-i),n=Math.max(0,n),a.style.left=n+"px",a.style.top=h.top-(h.dy?d:-h.height)+"px"}else{const _=e.$container.querySelector(".dhx_cal_data").offsetTop;a.style.top=_+20+"px",h.dx==1?(a.style.right="auto",a.style.left=-i+"px",setTimeout(function(){a.style.left="-10px"},1)):(a.style.left="auto",a.style.right=-i+"px",setTimeout(function(){a.style.right="-10px"},1)),a.className=a.className.replace(" dhx_qi_left","").replace(" dhx_qi_right","")+" dhx_qi_"+(h.dx==1?"left":"right")}},e.attachEvent("onTemplatesReady",function(){if(e.hideQuickInfo(),this._quick_info_box){var h=this._quick_info_box;h.parentNode&&h.parentNode.removeChild(h),this._quick_info_box=null}}),e._quick_info_onscroll_handler=function(h){e.hideQuickInfo()},e._init_quick_info=function(){if(!this._quick_info_box){var h=this._quick_info_box=document.createElement("div");this._waiAria.quickInfoAttr(h),h.className="dhx_cal_quick_info",e.$testmode&&(h.className+=" dhx_no_animate"),e.config.rtl&&(h.className+=" dhx_quick_info_rtl");var a=` + `,v+="
"+e.templates.map_text(l.start_date,l.end_date,l)+"
"}v+="
",e._els.dhx_cal_data[0].scrollTop=0,e._els.dhx_cal_data[0].innerHTML=v;var b=e._els.dhx_cal_data[0].firstChild.childNodes,k=e._getNavDateElement();for(k&&(k.innerHTML=e.templates[e._mode+"_date"](e._min_date,e._max_date,e._mode)),e._rendered=[],m=0;m
"+p.date+"
"+p.description+"
",e._table_view=!0,e.set_sizes()}}(u),u){(function(){e._selected_event_id=null,e.map._infowindow.close();var g=e.map._markers;for(var p in g)g.hasOwnProperty(p)&&(g[p].setMap(null),delete e.map._markers[p],e.map._infowindows_content[p]&&delete e.map._infowindows_content[p])})(),_(),m.style.display="block",o("dhx_gmap"),v=e.map._obj.getCenter();for(var l=e.get_visible_events(),f=0;fe._min_date||v.start_datee._max_date||v.start_date.valueOf()>=e._min_date&&v.end_date.valueOf()<=e._max_date?(e.map._markers[u]&&e.map._markers[u].setMap(null),s(v)):(e._selected_event_id=null,e.map._infowindow.close(),e.map._markers[u]&&e.map._markers[u].setMap(null)),!0}),e.attachEvent("onEventIdChange",function(u,v){var m=e.getEvent(v);return(m.start_datee._min_date||m.start_datee._max_date||m.start_date.valueOf()>=e._min_date&&m.end_date.valueOf()<=e._max_date)&&(e.map._markers[u]&&(e.map._markers[u].setMap(null),delete e.map._markers[u]),e.map._infowindows_content[u]&&delete e.map._infowindows_content[u],s(m)),!0}),e.attachEvent("onEventAdded",function(u,v){return e._dataprocessor||(v.start_datee._min_date||v.start_datee._max_date||v.start_date.valueOf()>=e._min_date&&v.end_date.valueOf()<=e._max_date)&&(e.map._markers[u]&&e.map._markers[u].setMap(null),s(v)),!0}),e.attachEvent("onBeforeEventDelete",function(u,v){return e.map._markers[u]&&e.map._markers[u].setMap(null),e._selected_event_id=null,e.map._infowindow.close(),!0}),e._event_resolve_delay=1500,e.attachEvent("onEventLoading",function(u){return e.config.map_resolve_event_location&&u.event_location&&!u.lat&&!u.lng&&(e._event_resolve_delay+=1500,function(v,m,l,f){setTimeout(function(){if(e.$destroyed)return!0;var g=v.apply(m,l);return v=m=l=null,g},f||1)}(c,this,[u],e._event_resolve_delay)),!0}),e.attachEvent("onEventCancel",function(u,v){return v&&(e.map._markers[u]&&e.map._markers[u].setMap(null),e.map._infowindow.close()),!0})})},minical:function(e){const h=e._createDomEventScope();e.config.minicalendar={mark_events:!0},e._synced_minicalendars=[],e.renderCalendar=function(a,r,d){var i=null,_=a.date||e._currentDate();if(typeof _=="string"&&(_=this.templates.api_date(_)),r)i=this._render_calendar(r.parentNode,_,a,r),e.unmarkCalendar(i);else{var o=a.container,t=a.position;if(typeof o=="string"&&(o=document.getElementById(o)),typeof t=="string"&&(t=document.getElementById(t)),t&&t.left===void 0&&t.right===void 0){var n=e.$domHelpers.getOffset(t);t={top:n.top+t.offsetHeight,left:n.left}}o||(o=e._get_def_cont(t)),(i=this._render_calendar(o,_,a)).$_eventAttached||(i.$_eventAttached=!0,h.attach(i,"click",(function(p){var y=p.target||p.srcElement,w=e.$domHelpers;if(w.closest(y,".dhx_month_head")&&!w.closest(y,".dhx_after")&&!w.closest(y,".dhx_before")){var b=w.closest(y,"[data-cell-date]").getAttribute("data-cell-date"),k=e.templates.parse_date(b);e.unmarkCalendar(this),e.markCalendar(this,k,"dhx_calendar_click"),this._last_date=k,this.conf.handler&&this.conf.handler.call(e,k,this)}}).bind(i)))}if(e.config.minicalendar.mark_events)for(var s=e.date.month_start(_),c=e.date.add(s,1,"month"),u=this.getEvents(s,c),v=this["filter_"+this._mode],m={},l=0;l=c.valueOf())););}}return this._markCalendarCurrentDate(i),i.conf=a,a.sync&&!d&&this._synced_minicalendars.push(i),i.conf._on_xle_handler||(i.conf._on_xle_handler=e.attachEvent("onXLE",function(){e.updateCalendar(i,i.conf.date)})),this.config.wai_aria_attributes&&this.config.wai_aria_application_role&&i.setAttribute("role","application"),i},e._get_def_cont=function(a){return this._def_count||(this._def_count=document.createElement("div"),this._def_count.className="dhx_minical_popup",e.event(this._def_count,"click",function(r){r.cancelBubble=!0}),document.body.appendChild(this._def_count)),a.left&&(this._def_count.style.left=a.left+"px"),a.right&&(this._def_count.style.right=a.right+"px"),a.top&&(this._def_count.style.top=a.top+"px"),a.bottom&&(this._def_count.style.bottom=a.bottom+"px"),this._def_count._created=new Date,this._def_count},e._locateCalendar=function(a,r){if(typeof r=="string"&&(r=e.templates.api_date(r)),+r>+a._max_date||+r<+a._min_date)return null;for(var d=a.querySelector(".dhx_year_body").childNodes[0],i=0,_=new Date(a._min_date);+this.date.add(_,1,"week")<=+r;)_=this.date.add(_,1,"week"),i++;var o=e.config.start_on_monday,t=(r.getDay()||(o?7:0))-(o?1:0);const n=d.querySelector(`.dhx_cal_month_row:nth-child(${i+1}) .dhx_cal_month_cell:nth-child(${t+1})`);return n?n.firstChild:null},e.markCalendar=function(a,r,d){var i=this._locateCalendar(a,r);i&&(i.className+=" "+d)},e.unmarkCalendar=function(a,r,d){if(d=d||"dhx_calendar_click",r=r||a._last_date){var i=this._locateCalendar(a,r);i&&(i.className=(i.className||"").replace(RegExp(d,"g")))}},e._week_template=function(a){for(var r=a||250,d=0,i=document.createElement("div"),_=this.date.week_start(e._currentDate()),o=0;o<7;o++)this._cols[o]=Math.floor(r/(7-o)),this._render_x_header(o,d,_,i),_=this.date.add(_,1,"day"),r-=this._cols[o],d+=this._cols[o];return i.lastChild.className+=" dhx_scale_bar_last",i},e.updateCalendar=function(a,r){a.conf.date=r,this.renderCalendar(a.conf,a,!0)},e._mini_cal_arrows=[" "," "],e._render_calendar=function(a,r,d,i){var _=e.templates,o=this._cols;this._cols=[];var t=this._mode;this._mode="calendar";var n=this._colsS;this._colsS={height:0};var s=new Date(this._min_date),c=new Date(this._max_date),u=new Date(e._date),v=_.month_day,m=this._ignores_detected;this._ignores_detected=0,_.month_day=_.calendar_date,r=this.date.month_start(r);var l,f=this._week_template(a.offsetWidth-1-this.config.minicalendar.padding);i?l=i:(l=document.createElement("div")).className="dhx_cal_container dhx_mini_calendar",l.setAttribute("date",this._helpers.formatDate(r)),l.innerHTML="
":"'>")+"
"+(f?f.innerHTML:"")+"
";var g=l.querySelector(".dhx_year_month"),p=l.querySelector(".dhx_year_week"),y=l.querySelector(".dhx_year_body");if(g.innerHTML=this.templates.calendar_month(r),d.navigation)for(var w=function(H,V){var z=e.date.add(H._date,V,"month");e.updateCalendar(H,z),e._date.getMonth()==H._date.getMonth()&&e._date.getFullYear()==H._date.getFullYear()&&e._markCalendarCurrentDate(H)},b=["dhx_cal_prev_button","dhx_cal_next_button"],k=["left:1px;top:4px;position:absolute;","left:auto; right:1px;top:4px;position:absolute;"],E=[-1,1],D=function(H){return function(){if(d.sync)for(var V=e._synced_minicalendars,z=0;z500)&&(a=this._def_count.firstChild),a&&(h.detachAll(),a.innerHTML="",a.parentNode&&a.parentNode.removeChild(a),this._def_count&&(this._def_count.style.top="-1000px"),a.conf&&a.conf._on_xle_handler&&e.detachEvent(a.conf._on_xle_handler))},e.isCalendarVisible=function(){return!!(this._def_count&&parseInt(this._def_count.style.top,10)>0)&&this._def_count},e.attachEvent("onTemplatesReady",function(){e.event(document.body,"click",function(){e.destroyCalendar()})},{once:!0}),e.form_blocks.calendar_time={render:function(a){var r="",d=e.config,i=this.date.date_part(e._currentDate()),_=1440,o=0;d.limit_time_select&&(o=60*d.first_hour,_=60*d.last_hour+1),i.setHours(o/60),a._time_values=[],r+=" ")+"  –  "+r+""},set_value:function(a,r,d,i){var _,o,t=a.getElementsByTagName("input"),n=a.getElementsByTagName("select"),s=function(g,p,y){e.event(g,"click",function(){e.destroyCalendar(null,!0),e.renderCalendar({position:g,date:new Date(this._date),navigation:!0,handler:function(w){g.value=e.templates.calendar_time(w),g._date=new Date(w),e.destroyCalendar(),e.config.event_duration&&e.config.auto_end_date&&y===0&&m()}})})};if(e.config.full_day){if(!a._full_day){var c="";e.config.wide_form||(c=a.previousSibling.innerHTML+c),a.previousSibling.innerHTML=c,a._full_day=!0}var u=a.previousSibling.getElementsByTagName("input")[0],v=e.date.time_part(d.start_date)===0&&e.date.time_part(d.end_date)===0;u.checked=v,n[0].disabled=u.checked,n[1].disabled=u.checked,u.$_eventAttached||(u.$_eventAttached=!0,e.event(u,"click",function(){if(u.checked===!0){var g={};e.form_blocks.calendar_time.get_value(a,g),_=e.date.date_part(g.start_date),(+(o=e.date.date_part(g.end_date))==+_||+o>=+_&&(d.end_date.getHours()!==0||d.end_date.getMinutes()!==0))&&(o=e.date.add(o,1,"day"))}var p=_||d.start_date,y=o||d.end_date;l(t[0],p),l(t[1],y),n[0].value=60*p.getHours()+p.getMinutes(),n[1].value=60*y.getHours()+y.getMinutes(),n[0].disabled=u.checked,n[1].disabled=u.checked}))}if(e.config.event_duration&&e.config.auto_end_date){var m=function(){e.config.auto_end_date&&e.config.event_duration&&(_=e.date.add(t[0]._date,n[0].value,"minute"),o=new Date(_.getTime()+60*e.config.event_duration*1e3),t[1].value=e.templates.calendar_time(o),t[1]._date=e.date.date_part(new Date(o)),n[1].value=60*o.getHours()+o.getMinutes())};n[0].$_eventAttached||n[0].addEventListener("change",m)}function l(g,p,y){s(g,p,y),g.value=e.templates.calendar_time(p),g._date=e.date.date_part(new Date(p))}function f(g){for(var p=i._time_values,y=60*g.getHours()+g.getMinutes(),w=y,b=!1,k=0;k=t.valueOf()))for(var n=d;n.valueOf()n&&e.markCalendar(a,n,"dhx_calendar_click"),n=e.date.add(n,1,"day")},e.attachEvent("onEventCancel",function(){e.destroyCalendar(null,!0)}),e.attachEvent("onDestroy",function(){e.destroyCalendar()})},monthheight:function(e){e.attachEvent("onTemplatesReady",function(){e.xy.scroll_width=0;var h=e.render_view_data;e.render_view_data=function(){var r=this._els.dhx_cal_data[0];r.firstChild._h_fix=!0,h.apply(e,arguments);var d=parseInt(r.style.height);r.style.height="1px",r.style.height=r.scrollHeight+"px",this._obj.style.height=this._obj.clientHeight+r.scrollHeight-d+"px"};var a=e._reset_month_scale;e._reset_month_scale=function(r,d,i,_){var o={clientHeight:100};a.apply(e,[o,d,i,_]),r.innerHTML=o.innerHTML}})},multisection:function(e){q("Multisection",e.assert)},multiselect:function(e){e.form_blocks.multiselect={render:function(h){var a="dhx_multi_select_control dhx_multi_select_"+h.name;h.vertical&&(a+=" dhx_multi_select_control_vertical");for(var r="
",d=0;d"+h.options[d].label+"";return r+="
"},set_value:function(h,a,r,d){for(var i=h.getElementsByTagName("input"),_=0;_]*>","g"),d=new RegExp("]*>","g");function i(b){return b.replace(d,` +`).replace(r,"")}function _(b,k){b=parseFloat(b),k=parseFloat(k),isNaN(k)||(b-=k);var E=t(b);return b=b-E.width+E.cols*h,isNaN(b)?"auto":100*b/h}function o(b,k,E){b=parseFloat(b),k=parseFloat(k),!isNaN(k)&&E&&(b-=k);var D=t(b);return b=b-D.width+D.cols*h,isNaN(b)?"auto":100*b/(h-(isNaN(k)?0:k))}function t(b){for(var k=0,E=e._els.dhx_cal_header[0].childNodes,D=E[1]?E[1].childNodes:E[0].childNodes,x=0;xN))break;b-=N+1,k+=N+1}return{width:k,cols:x}}function n(b){return b=parseFloat(b),isNaN(b)?"auto":100*b/a}function s(b,k){return(window.getComputedStyle?window.getComputedStyle(b,null)[k]:b.currentStyle?b.currentStyle[k]:null)||""}function c(b,k){for(var E=parseInt(b.style.left,10),D=0;DE)return D;return k}function v(b){return b?"":""}function m(b,k,E,D){var x="<"+b+" profile='"+k+"'";return E&&(x+=" header='"+E+"'"),D&&(x+=" footer='"+D+"'"),x+=">"}function l(){var b="",k=e._mode;if(e.matrix&&e.matrix[e._mode]&&(k=e.matrix[e._mode].render=="cell"?"matrix":"timeline"),b+="",e._mode=="week_agenda")for(var E=e._els.dhx_cal_data[0].getElementsByTagName("DIV"),D=0;D"+i(E[D].innerHTML)+"");else if(e._mode=="agenda"||e._mode=="map")b+=""+i((E=e._els.dhx_cal_header[0].childNodes[0].childNodes)[0].innerHTML)+""+i(E[1].innerHTML)+"";else if(e._mode=="year")for(E=e._els.dhx_cal_data[0].childNodes,D=0;D",b+=g(E[D].querySelector(".dhx_year_week").childNodes),b+=f(E[D].querySelector(".dhx_year_body")),b+="";else{b+="",b+=g(E=e._els.dhx_cal_header[0].childNodes),b+="";var x=e._els.dhx_cal_data[0];if(e.matrix&&e.matrix[e._mode]){for(b+="",D=0;D";b+="",a=x.firstChild.rows[0].cells[0].offsetHeight}else if(x.firstChild.tagName=="TABLE")b+=f(x);else{for(x=x.childNodes[x.childNodes.length-1];x.className.indexOf("dhx_scale_holder")==-1;)x=x.previousSibling;for(x=x.childNodes,b+="",D=0;D";b+="",a=x[0].offsetHeight}}return b+=""}function f(b){for(var k="",E=b.querySelectorAll("tr"),D=0;D",a=S[0].offsetHeight}return k}function g(b){var k,E="";e.matrix&&e.matrix[e._mode]&&(e.matrix[e._mode].second_scale&&(k=b[1].childNodes),b=b[0].childNodes);for(var D=0;D";if(h=b[0].offsetWidth,k){var x=0,S=b[0].offsetWidth,N=1;for(D=0;D",(x+=k[D].offsetWidth)>=S&&(S+=b[N]?b[N].offsetWidth:0,N++),h=k[0].offsetWidth}return E}function p(b){var k="",E=e._rendered,D=e.matrix&&e.matrix[e._mode];if(e._mode=="agenda"||e._mode=="map")for(var x=0;x";else if(e._mode=="week_agenda")for(x=0;x"+i(E[x].innerHTML)+"";else if(e._mode=="year")for(E=e.get_visible_events(),x=0;x",(S=e.date.add(S,1,"day")).valueOf()>=e._max_date.valueOf())break}}else if(D&&D.render=="cell")for(E=e._els.dhx_cal_data[0].getElementsByTagName("TD"),x=0;x";else for(x=0;x",z=="event"?(k+="
",A=b?s(E[x].childNodes[2],"color"):"",k+=""):(A=b?s(E[x],"color"):"",k+=""),k+=""}}}}return k}function y(b,k,E,D,x,S){var N=!1;D=="fullcolor"&&(N=!0,D="color"),D=D||"color";var M,A="";if(b){var C=e._date,T=e._mode;k=e.date[E+"_start"](k),k=e.date["get_"+E+"_end"]?e.date["get_"+E+"_end"](k):e.date.add(k,1,E),A=m("pages",D,x,S);for(var O=new Date(b);+O<+k;O=this.date.add(O,1,E))this.setCurrentView(O,E),A+=((M="page")?"<"+M+">":"")+l().replace("–","-")+p(N)+v("page");A+=v("pages"),this.setCurrentView(C,T)}else A=m("data",D,x,S)+l().replace("–","-")+p(N)+v("data");return A}function w(b,k,E,D,x,S,N){(function(M,A){var C=e.uid(),T=document.createElement("div");T.style.display="none",document.body.appendChild(T),T.innerHTML='
',document.getElementById(C).firstChild.value=encodeURIComponent(M),document.getElementById(C).submit(),T.parentNode.removeChild(T)})(typeof x=="object"?function(M){for(var A="",C=0;Cwindow.innerWidth&&(i=window.innerWidth-r),i=Math.max(0,i),a.style.left=i+"px",a.style.top=h.top-(h.dy?d:-h.height)+"px"}else{const _=e.$container.querySelector(".dhx_cal_data").offsetTop;a.style.top=_+20+"px",h.dx==1?(a.style.right="auto",a.style.left=-r+"px",setTimeout(function(){a.style.left="-10px"},1)):(a.style.left="auto",a.style.right=-r+"px",setTimeout(function(){a.style.right="-10px"},1)),a.className=a.className.replace(" dhx_qi_left","").replace(" dhx_qi_right","")+" dhx_qi_"+(h.dx==1?"left":"right")}},e.attachEvent("onTemplatesReady",function(){if(e.hideQuickInfo(),this._quick_info_box){var h=this._quick_info_box;h.parentNode&&h.parentNode.removeChild(h),this._quick_info_box=null}}),e._quick_info_onscroll_handler=function(h){e.hideQuickInfo()},e._init_quick_info=function(){if(!this._quick_info_box){var h=this._quick_info_box=document.createElement("div");this._waiAria.quickInfoAttr(h),h.className="dhx_cal_quick_info",e.$testmode&&(h.className+=" dhx_no_animate"),e.config.rtl&&(h.className+=" dhx_quick_info_rtl");var a=`
@@ -61,16 +61,16 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`)},t.exportToPNG=function(){
-
`;a+='
';for(var i=e.config.icons_select,d=0;d -
${e.locale.labels[i[d]]}
`;a+="",h.innerHTML=a,e.event(h,"click",function(n){e._qi_button_click(n.target||n.srcElement)}),e.config.quick_info_detached&&(e._detachDomEvent(e._els.dhx_cal_data[0],"scroll",e._quick_info_onscroll_handler),e.event(e._els.dhx_cal_data[0],"scroll",e._quick_info_onscroll_handler))}return this._quick_info_box},e._qi_button_click=function(h){var a=e._quick_info_box;if(h&&h!=a)if(h.closest(".dhx_cal_qi_close_btn"))e.hideQuickInfo();else{var i=e._getClassName(h);if(i.indexOf("_icon")!=-1){var d=e._quick_info_box_id;e._click.buttons[i.split(" ")[1].replace("icon_","")](d)}else e._qi_button_click(h.parentNode)}},e._get_event_counter_part=function(h){for(var a=e.getRenderedEvent(h),i=0,d=0,n=a;n&&n!=e._obj;)i+=n.offsetLeft,d+=n.offsetTop-n.scrollTop,n=n.offsetParent;return n?{left:i,top:d,dx:i+a.offsetWidth/2>e._x/2?1:0,dy:d+a.offsetHeight/2>e._y/2?1:0,width:a.offsetWidth,height:a.offsetHeight}:0},e._fill_quick_data=function(h){var a=e.getEvent(h),i=e._quick_info_box;e._quick_info_box_id=h;var d={content:e.templates.quick_info_title(a.start_date,a.end_date,a),date:e.templates.quick_info_date(a.start_date,a.end_date,a)};i.querySelector(".dhx_cal_qi_tcontent").innerHTML=`${d.content}`,i.querySelector(".dhx_cal_qi_tdate").innerHTML=d.date,e._waiAria.quickInfoHeader(i,[d.content,d.date].join(" "));var n=i.querySelector(".dhx_cal_qi_content");const _=e.templates.quick_info_content(a.start_date,a.end_date,a);_?(n.classList.remove("dhx_hidden"),n.innerHTML=_):n.classList.add("dhx_hidden")}},readonly:function(e){e.attachEvent("onTemplatesReady",function(){var h;e.form_blocks.recurring&&(h=e.form_blocks.recurring.set_value);var a=e.config.buttons_left.slice(),i=e.config.buttons_right.slice();function d(o,t,r,s){for(var c=t.getElementsByTagName(o),u=r.getElementsByTagName(o),v=u.length-1;v>=0;v--)if(r=u[v],s){var m=document.createElement("span");m.className="dhx_text_disabled",m.innerHTML=s(c[v]),r.parentNode.insertBefore(m,r),r.parentNode.removeChild(r)}else r.disabled=!0,t.checked&&(r.checked=!0)}e.attachEvent("onBeforeLightbox",function(o){this.config.readonly_form||this.getEvent(o).readonly?this.config.readonly_active=!0:(this.config.readonly_active=!1,e.config.buttons_left=a.slice(),e.config.buttons_right=i.slice(),e.form_blocks.recurring&&(e.form_blocks.recurring.set_value=h));var t=this.config.lightbox.sections;if(this.config.readonly_active){for(var r=0;r
'+r.repeat_text_occurences_count+'
'},_ds:{},_get_form_node:function(n,_,o){var t=n[_];if(!t)return null;if(t.nodeName)return t;if(t.length){for(var r=0;rs)return n.setDate(n.getDate()+1*_[c]-s-(t?o:r));this.transpose_day_week(n,_,o+t,null,o)},e.transpose_type=function(n){var _="transpose_"+n;if(!this.date[_]){var o=n.split("_"),t="add_"+n,r=this.transponse_size[o[0]]*o[1];if(o[0]=="day"||o[0]=="week"){var s=null;if(o[4]&&(s=o[4].split(","),e.config.start_on_monday)){for(var c=0;c0&&u.setDate(u.getDate()+m*r),s&&e.transpose_day_week(u,s,1,r),u},this.date[t]=function(u,v){var m=new Date(u.valueOf());if(s)for(var l=0;l=0&&(u.setDate(1),u.setMonth(u.getMonth()+l*r)),e.date[t](u,0,m)},this.date[t]=function(u,v,m,l){if(l?l++:l=1,l>12)return null;var f=new Date(u.valueOf());f.setDate(1),f.setMonth(f.getMonth()+v*r);var g=f.getMonth(),p=f.getFullYear();f.setDate(m.start_date.getDate()),o[3]&&e.date.day_week(f,o[2],o[3]);var y=e.config.recurring_overflow_instances;return f.getMonth()!=g&&y!="none"&&(f=y==="lastDay"?new Date(p,g+1,0,f.getHours(),f.getMinutes(),f.getSeconds(),f.getMilliseconds()):e.date[t](new Date(p,g+1,0),v||1,m,l)),f})}},e.repeat_date=function(n,_,o,t,r,s){t=t||this._min_date,r=r||this._max_date;var c=s||-1,u=new Date(n.start_date.valueOf()),v=u.getHours(),m=0;for(!n.rec_pattern&&n.rec_type&&(n.rec_pattern=n.rec_type.split("#")[0]),this.transpose_type(n.rec_pattern),u=e.date["transpose_"+n.rec_pattern](u,t,n);u&&(u0?new Date(t.valueOf()+1e3*o.event_length-60*s*1e3):new Date(_.valueOf()-60*s*1e3):new Date(r.valueOf())},e.getRecDates=function(n,_){var o=typeof n=="object"?n:e.getEvent(n),t=[];if(_=_||100,!o.rec_type)return[{start_date:o.start_date,end_date:o.end_date}];if(o.rec_type=="none")return[];e.repeat_date(o,t,!0,o.start_date,o.end_date,_);for(var r=[],s=0;sn)if(r.rec_pattern){if(r.rec_pattern=="none")continue;var s=[];this.repeat_date(r,s,!0,n,_);for(var c=0;cn&&!this._rec_markers[s[c].id]&&o.push(s[c])}else this._is_virtual_event(r.id)||o.push(r)}return o},e.config.repeat_date="%m.%d.%Y",e.config.lightbox.sections=[{name:"description",map_to:"text",type:"textarea",focus:!0},{name:"recurring",type:"recurring",map_to:"rec_type",button:"recurring"},{name:"time",height:72,type:"time",map_to:"auto"}],e._copy_dummy=function(n){var _=new Date(this.start_date),o=new Date(this.end_date);this.start_date=_,this.end_date=o,this.event_length=this.event_pid=this.rec_pattern=this.rec_type=null},e.config.include_end_by=!1,e.config.lightbox_recurring="ask",e.attachEvent("onClearAll",function(){e._rec_markers={},e._rec_markers_pull={},e._rec_temp=[]})},serialize:function(e){const h=se(e);e.data_attributes=function(){var a=[],i=e._helpers.formatDate,d=h();for(var n in d){var _=d[n];for(var o in _)o.substr(0,1)!="_"&&a.push([o,o=="start_date"||o=="end_date"?i:null]);break}return a},e.toXML=function(a){var i=[],d=this.data_attributes(),n=h();for(var _ in n){var o=n[_];i.push("");for(var t=0;t");i.push("")}return(a||"")+""+i.join(` -`)+""},e._serialize_json_value=function(a){return a===null||typeof a=="boolean"?a=""+a:(a||a===0||(a=""),a='"'+a.toString().replace(/\n/g,"").replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'),a},e.toJSON=function(){return JSON.stringify(this.serialize())},e.toICal=function(a){var i=e.date.date_to_str("%Y%m%dT%H%i%s"),d=e.date.date_to_str("%Y%m%d"),n=[],_=h();for(var o in _){var t=_[o];n.push("BEGIN:VEVENT"),t._timed&&(t.start_date.getHours()||t.start_date.getMinutes())?n.push("DTSTART:"+i(t.start_date)):n.push("DTSTART:"+d(t.start_date)),t._timed&&(t.end_date.getHours()||t.end_date.getMinutes())?n.push("DTEND:"+i(t.end_date)):n.push("DTEND:"+d(t.end_date)),n.push("SUMMARY:"+t.text),n.push("END:VEVENT")}return`BEGIN:VCALENDAR +
`;a+='
';for(var r=e.config.icons_select,d=0;d +
${e.locale.labels[r[d]]}
`;a+="",h.innerHTML=a,e.event(h,"click",function(i){e._qi_button_click(i.target||i.srcElement)}),e.config.quick_info_detached&&(e._detachDomEvent(e._els.dhx_cal_data[0],"scroll",e._quick_info_onscroll_handler),e.event(e._els.dhx_cal_data[0],"scroll",e._quick_info_onscroll_handler))}return this._quick_info_box},e._qi_button_click=function(h){var a=e._quick_info_box;if(h&&h!=a)if(h.closest(".dhx_cal_qi_close_btn"))e.hideQuickInfo();else{var r=e._getClassName(h);if(r.indexOf("_icon")!=-1){var d=e._quick_info_box_id;e._click.buttons[r.split(" ")[1].replace("icon_","")](d)}else e._qi_button_click(h.parentNode)}},e._get_event_counter_part=function(h){for(var a=e.getRenderedEvent(h),r=0,d=0,i=a;i&&i!=e._obj;)r+=i.offsetLeft,d+=i.offsetTop-i.scrollTop,i=i.offsetParent;return i?{left:r,top:d,dx:r+a.offsetWidth/2>e._x/2?1:0,dy:d+a.offsetHeight/2>e._y/2?1:0,width:a.offsetWidth,height:a.offsetHeight}:0},e._fill_quick_data=function(h){var a=e.getEvent(h),r=e._quick_info_box;e._quick_info_box_id=h;var d={content:e.templates.quick_info_title(a.start_date,a.end_date,a),date:e.templates.quick_info_date(a.start_date,a.end_date,a)};r.querySelector(".dhx_cal_qi_tcontent").innerHTML=`${d.content}`,r.querySelector(".dhx_cal_qi_tdate").innerHTML=d.date,e._waiAria.quickInfoHeader(r,[d.content,d.date].join(" "));var i=r.querySelector(".dhx_cal_qi_content");const _=e.templates.quick_info_content(a.start_date,a.end_date,a);_?(i.classList.remove("dhx_hidden"),i.innerHTML=_):i.classList.add("dhx_hidden")}},readonly:function(e){e.attachEvent("onTemplatesReady",function(){var h;e.form_blocks.recurring&&(h=e.form_blocks.recurring.set_value);var a=e.config.buttons_left.slice(),r=e.config.buttons_right.slice();function d(o,t,n,s){for(var c=t.getElementsByTagName(o),u=n.getElementsByTagName(o),v=u.length-1;v>=0;v--)if(n=u[v],s){var m=document.createElement("span");m.className="dhx_text_disabled",m.innerHTML=s(c[v]),n.parentNode.insertBefore(m,n),n.parentNode.removeChild(n)}else n.disabled=!0,t.checked&&(n.checked=!0)}e.attachEvent("onBeforeLightbox",function(o){this.config.readonly_form||this.getEvent(o).readonly?this.config.readonly_active=!0:(this.config.readonly_active=!1,e.config.buttons_left=a.slice(),e.config.buttons_right=r.slice(),e.form_blocks.recurring&&(e.form_blocks.recurring.set_value=h));var t=this.config.lightbox.sections;if(this.config.readonly_active){for(var n=0;n
'+n.repeat_text_occurences_count+'
'},_ds:{},_get_form_node:function(i,_,o){var t=i[_];if(!t)return null;if(t.nodeName)return t;if(t.length){for(var n=0;ns)return i.setDate(i.getDate()+1*_[c]-s-(t?o:n));this.transpose_day_week(i,_,o+t,null,o)},e.transpose_type=function(i){var _="transpose_"+i;if(!this.date[_]){var o=i.split("_"),t="add_"+i,n=this.transponse_size[o[0]]*o[1];if(o[0]=="day"||o[0]=="week"){var s=null;if(o[4]&&(s=o[4].split(","),e.config.start_on_monday)){for(var c=0;c0&&u.setDate(u.getDate()+m*n),s&&e.transpose_day_week(u,s,1,n),u},this.date[t]=function(u,v){var m=new Date(u.valueOf());if(s)for(var l=0;l=0&&(u.setDate(1),u.setMonth(u.getMonth()+l*n)),e.date[t](u,0,m)},this.date[t]=function(u,v,m,l){if(l?l++:l=1,l>12)return null;var f=new Date(u.valueOf());f.setDate(1),f.setMonth(f.getMonth()+v*n);var g=f.getMonth(),p=f.getFullYear();f.setDate(m.start_date.getDate()),o[3]&&e.date.day_week(f,o[2],o[3]);var y=e.config.recurring_overflow_instances;return f.getMonth()!=g&&y!="none"&&(f=y==="lastDay"?new Date(p,g+1,0,f.getHours(),f.getMinutes(),f.getSeconds(),f.getMilliseconds()):e.date[t](new Date(p,g+1,0),v||1,m,l)),f})}},e.repeat_date=function(i,_,o,t,n,s){t=t||this._min_date,n=n||this._max_date;var c=s||-1,u=new Date(i.start_date.valueOf()),v=u.getHours(),m=0;for(!i.rec_pattern&&i.rec_type&&(i.rec_pattern=i.rec_type.split("#")[0]),this.transpose_type(i.rec_pattern),u=e.date["transpose_"+i.rec_pattern](u,t,i);u&&(u0?new Date(t.valueOf()+1e3*o.event_length-60*s*1e3):new Date(_.valueOf()-60*s*1e3):new Date(n.valueOf())},e.getRecDates=function(i,_){var o=typeof i=="object"?i:e.getEvent(i),t=[];if(_=_||100,!o.rec_type)return[{start_date:o.start_date,end_date:o.end_date}];if(o.rec_type=="none")return[];e.repeat_date(o,t,!0,o.start_date,o.end_date,_);for(var n=[],s=0;si)if(n.rec_pattern){if(n.rec_pattern=="none")continue;var s=[];this.repeat_date(n,s,!0,i,_);for(var c=0;ci&&!this._rec_markers[s[c].id]&&o.push(s[c])}else this._is_virtual_event(n.id)||o.push(n)}return o},e.config.repeat_date="%m.%d.%Y",e.config.lightbox.sections=[{name:"description",map_to:"text",type:"textarea",focus:!0},{name:"recurring",type:"recurring",map_to:"rec_type",button:"recurring"},{name:"time",height:72,type:"time",map_to:"auto"}],e._copy_dummy=function(i){var _=new Date(this.start_date),o=new Date(this.end_date);this.start_date=_,this.end_date=o,this.event_length=this.event_pid=this.rec_pattern=this.rec_type=null},e.config.include_end_by=!1,e.config.lightbox_recurring="ask",e.attachEvent("onClearAll",function(){e._rec_markers={},e._rec_markers_pull={},e._rec_temp=[]})},serialize:function(e){const h=se(e);e.data_attributes=function(){var a=[],r=e._helpers.formatDate,d=h();for(var i in d){var _=d[i];for(var o in _)o.substr(0,1)!="_"&&a.push([o,o=="start_date"||o=="end_date"?r:null]);break}return a},e.toXML=function(a){var r=[],d=this.data_attributes(),i=h();for(var _ in i){var o=i[_];r.push("");for(var t=0;t");r.push("")}return(a||"")+""+r.join(` +`)+""},e._serialize_json_value=function(a){return a===null||typeof a=="boolean"?a=""+a:(a||a===0||(a=""),a='"'+a.toString().replace(/\n/g,"").replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'),a},e.toJSON=function(){return JSON.stringify(this.serialize())},e.toICal=function(a){var r=e.date.date_to_str("%Y%m%dT%H%i%s"),d=e.date.date_to_str("%Y%m%d"),i=[],_=h();for(var o in _){var t=_[o];i.push("BEGIN:VEVENT"),t._timed&&(t.start_date.getHours()||t.start_date.getMinutes())?i.push("DTSTART:"+r(t.start_date)):i.push("DTSTART:"+d(t.start_date)),t._timed&&(t.end_date.getHours()||t.end_date.getMinutes())?i.push("DTEND:"+r(t.end_date)):i.push("DTEND:"+d(t.end_date)),i.push("SUMMARY:"+t.text),i.push("END:VEVENT")}return`BEGIN:VCALENDAR VERSION:2.0 PRODID:-//dhtmlXScheduler//NONSGML v2.2//EN DESCRIPTION:`+(a||"")+` -`+n.join(` +`+i.join(` `)+` -END:VCALENDAR`}},timeline:function(e){q("Timeline",e.assert)},tooltip:function(e){e.config.tooltip_timeout=30,e.config.tooltip_offset_y=20,e.config.tooltip_offset_x=10,e.config.tooltip_hide_timeout=30;const h=new _t(e);e.ext.tooltips=h,e.attachEvent("onSchedulerReady",function(){h.tooltipFor({selector:"["+e.config.event_attribute+"]",html:a=>{if(e._mobile&&!e.config.touch_tooltip)return;const i=e._locate_event(a.target);if(e.getEvent(i)){const d=e.getEvent(i);return e.templates.tooltip_text(d.start_date,d.end_date,d)}return null},global:!1})}),e.attachEvent("onDestroy",function(){h.destructor()}),e.attachEvent("onLightbox",function(){h.hideTooltip()}),e.attachEvent("onBeforeDrag",function(){return h.hideTooltip(),!0}),e.attachEvent("onEventDeleted",function(){return h.hideTooltip(),!0})},treetimeline:function(e){q("Tree Timeline",e.assert)},units:function(e){q("Units",e.assert)},url:function(e){e._get_url_nav=function(){for(var h={},a=(document.location.hash||"").replace("#","").split(","),i=0;i",v+="
"+(u[m]._timed?this.templates.event_date(u[m].start_date):"")+"
",v+="
 
",v+=this.templates.year_tooltip(u[m].start_date,u[m].end_date,u[m])+""}}this._tooltip.style.display="",this._tooltip.style.top="0px",document.body.offsetWidth-t.left-this._tooltip.offsetWidth<0?this._tooltip.style.left=t.left-this._tooltip.offsetWidth+"px":this._tooltip.style.left=t.left+s.offsetWidth+"px",this._tooltip.date=o,this._tooltip.innerHTML=v,document.body.offsetHeight-t.top-this._tooltip.offsetHeight<0?this._tooltip.style.top=t.top-this._tooltip.offsetHeight+s.offsetHeight+"px":this._tooltip.style.top=t.top+"px"},e._year_view_tooltip_handler=function(o){if(h()){var t=o.target||o.srcElement;t.tagName.toLowerCase()=="a"&&(t=t.parentNode),e._getClassName(t).indexOf("dhx_year_event")!=-1?e._showToolTip(e.templates.parse_date(t.getAttribute("data-year-date")),e.$domHelpers.getOffset(t),o,t):e._hideToolTip()}},e._init_year_tooltip=function(){e._detachDomEvent(e._els.dhx_cal_data[0],"mouseover",e._year_view_tooltip_handler),e.event(e._els.dhx_cal_data[0],"mouseover",e._year_view_tooltip_handler)},e._get_year_cell=function(o){for(var t=e.templates.format_date(o),r=this.$root.querySelectorAll(`.dhx_cal_data .dhx_cal_datepicker_date[data-cell-date="${t}"]`),s=0;s=this._max_date.valueOf())return},e.year_view=function(o){if(e.set_sizes(),e._table_view=o,!this._load_mode||!this._load())if(o){if(e._init_year_tooltip(),e._reset_year_scale(),e._load_mode&&e._load())return void(e._render_wait=!0);e.render_view_data()}else e._hideToolTip()},e._reset_year_scale=function(){this._cols=[],this._colsS={};var o=[],t=this._els.dhx_cal_data[0],r=this.config;t.scrollTop=0,t.innerHTML="",Math.floor((parseInt(t.style.height)-e.xy.year_top)/r.year_y);var s=document.createElement("div"),c=this.date.week_start(e._currentDate());this._process_ignores(c,7,"day",1);for(var u=0;u<7;u++)this._ignores&&this._ignores[u]||(this._cols[u]="var(--dhx-scheduler-datepicker-cell-size)",this._render_x_header(u,0,c,s)),c=this.date.add(c,1,"day");for(s.lastChild.className+=" dhx_scale_bar_last",u=0;u
"+s.innerHTML+"
";var p=l.querySelector(".dhx_year_month"),y=l.querySelector(".dhx_year_grid"),w=l.querySelector(".dhx_year_body"),b=e.uid();this._waiAria.yearHeader(p,b),this._waiAria.yearGrid(y,b),p.innerHTML=this.templates.year_month(v);var k=this.date.week_start(v);this._reset_month_scale(w,v,k,6);for(var E=w.querySelectorAll("td"),D=0;D${this.templates.year_month(s)} -
`;const l=m.querySelector(".dhx_year_grid"),f=e._createDatePicker(null,{date:s,minWeeks:6});f._renderDayGrid(l),f.destructor(),r.appendChild(m),s=this.date.add(s,1,"month")}o.appendChild(r);let c=this.date.add(t,1,"year");c.valueOf()!=this.date.week_start(new Date(c)).valueOf()&&(c=this.date.week_start(new Date(c)),c=this.date.add(c,1,"week")),this._max_date=c;var u=this._getNavDateElement();u&&(u.innerHTML=this.templates[this._mode+"_date"](t,c,this._mode))};var n=e.getActionData;e.getActionData=function(o){return h()?{date:a(o.target),section:null}:n.apply(e,arguments)};var _=e._locate_event;e._locate_event=function(o){var t=_.apply(e,arguments);if(!t){var r=a(o);if(!r)return null;var s=e.getEvents(r,e.date.add(r,1,"day"));if(!s.length)return null;t=s[0].id}return t},e.attachEvent("onDestroy",function(){e._hideToolTip()})}},Q=new class{constructor(e){this._seed=0,this._schedulerPlugins=[],this._bundledExtensions=e,this._extensionsManager=new it(e)}plugin(e){this._schedulerPlugins.push(e),P.scheduler&&e(P.scheduler)}getSchedulerInstance(e){for(var h=nt(this._extensionsManager),a=0;a{if(e._mobile&&!e.config.touch_tooltip)return;const r=e._locate_event(a.target);if(e.getEvent(r)){const d=e.getEvent(r);return e.templates.tooltip_text(d.start_date,d.end_date,d)}return null},global:!1})}),e.attachEvent("onDestroy",function(){h.destructor()}),e.attachEvent("onLightbox",function(){h.hideTooltip()}),e.attachEvent("onBeforeDrag",function(){return h.hideTooltip(),!0}),e.attachEvent("onEventDeleted",function(){return h.hideTooltip(),!0})},treetimeline:function(e){q("Tree Timeline",e.assert)},units:function(e){q("Units",e.assert)},url:function(e){e._get_url_nav=function(){for(var h={},a=(document.location.hash||"").replace("#","").split(","),r=0;r",v+="
"+(u[m]._timed?this.templates.event_date(u[m].start_date):"")+"
",v+="
 
",v+=this.templates.year_tooltip(u[m].start_date,u[m].end_date,u[m])+""}}this._tooltip.style.display="",this._tooltip.style.top="0px",document.body.offsetWidth-t.left-this._tooltip.offsetWidth<0?this._tooltip.style.left=t.left-this._tooltip.offsetWidth+"px":this._tooltip.style.left=t.left+s.offsetWidth+"px",this._tooltip.date=o,this._tooltip.innerHTML=v,document.body.offsetHeight-t.top-this._tooltip.offsetHeight<0?this._tooltip.style.top=t.top-this._tooltip.offsetHeight+s.offsetHeight+"px":this._tooltip.style.top=t.top+"px"},e._year_view_tooltip_handler=function(o){if(h()){var t=o.target||o.srcElement;t.tagName.toLowerCase()=="a"&&(t=t.parentNode),e._getClassName(t).indexOf("dhx_year_event")!=-1?e._showToolTip(e.templates.parse_date(t.getAttribute("data-year-date")),e.$domHelpers.getOffset(t),o,t):e._hideToolTip()}},e._init_year_tooltip=function(){e._detachDomEvent(e._els.dhx_cal_data[0],"mouseover",e._year_view_tooltip_handler),e.event(e._els.dhx_cal_data[0],"mouseover",e._year_view_tooltip_handler)},e._get_year_cell=function(o){for(var t=e.templates.format_date(o),n=this.$root.querySelectorAll(`.dhx_cal_data .dhx_cal_datepicker_date[data-cell-date="${t}"]`),s=0;s=this._max_date.valueOf())return},e.year_view=function(o){if(e.set_sizes(),e._table_view=o,!this._load_mode||!this._load())if(o){if(e._init_year_tooltip(),e._reset_year_scale(),e._load_mode&&e._load())return void(e._render_wait=!0);e.render_view_data()}else e._hideToolTip()},e._reset_year_scale=function(){this._cols=[],this._colsS={};var o=[],t=this._els.dhx_cal_data[0],n=this.config;t.scrollTop=0,t.innerHTML="",Math.floor((parseInt(t.style.height)-e.xy.year_top)/n.year_y);var s=document.createElement("div"),c=this.date.week_start(e._currentDate());this._process_ignores(c,7,"day",1);for(var u=0;u<7;u++)this._ignores&&this._ignores[u]||(this._cols[u]="var(--dhx-scheduler-datepicker-cell-size)",this._render_x_header(u,0,c,s)),c=this.date.add(c,1,"day");for(s.lastChild.className+=" dhx_scale_bar_last",u=0;u
"+s.innerHTML+"
";var p=l.querySelector(".dhx_year_month"),y=l.querySelector(".dhx_year_grid"),w=l.querySelector(".dhx_year_body"),b=e.uid();this._waiAria.yearHeader(p,b),this._waiAria.yearGrid(y,b),p.innerHTML=this.templates.year_month(v);var k=this.date.week_start(v);this._reset_month_scale(w,v,k,6);for(var E=w.querySelectorAll("td"),D=0;D${this.templates.year_month(s)} +
`;const l=m.querySelector(".dhx_year_grid"),f=e._createDatePicker(null,{date:s,minWeeks:6});f._renderDayGrid(l),f.destructor(),n.appendChild(m),s=this.date.add(s,1,"month")}o.appendChild(n);let c=this.date.add(t,1,"year");c.valueOf()!=this.date.week_start(new Date(c)).valueOf()&&(c=this.date.week_start(new Date(c)),c=this.date.add(c,1,"week")),this._max_date=c;var u=this._getNavDateElement();u&&(u.innerHTML=this.templates[this._mode+"_date"](t,c,this._mode))};var i=e.getActionData;e.getActionData=function(o){return h()?{date:a(o.target),section:null}:i.apply(e,arguments)};var _=e._locate_event;e._locate_event=function(o){var t=_.apply(e,arguments);if(!t){var n=a(o);if(!n)return null;var s=e.getEvents(n,e.date.add(n,1,"day"));if(!s.length)return null;t=s[0].id}return t},e.attachEvent("onDestroy",function(){e._hideToolTip()})}},Q=new class{constructor(e){this._seed=0,this._schedulerPlugins=[],this._bundledExtensions=e,this._extensionsManager=new it(e)}plugin(e){this._schedulerPlugins.push(e),P.scheduler&&e(P.scheduler)}getSchedulerInstance(e){for(var h=nt(this._extensionsManager),a=0;a= 0){\r\n\t\t\t\tif (!strict)\r\n\t\t\t\t\treturn trg;\r\n\r\n\t\t\t\t//check that we have exact match\r\n\t\t\t\tvar left = (ind === 0) || (!((css.charAt(ind - 1)||\"\").trim()));\r\n\t\t\t\tvar right = ((ind + classname.length >= css.length)) || (!((css.charAt(ind + classname.length)).trim()));\r\n\r\n\t\t\t\tif (left && right)\r\n\t\t\t\t\treturn trg;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\ttrg=trg.parentNode;\r\n\t}\r\n\treturn null;\r\n}\r\n\r\n\r\n// get focusable nodes\r\nfunction isVisible(node){\r\n\tvar display = false,\r\n\t\tvisibility = false;\r\n\tif(window.getComputedStyle){\r\n\t\tvar style = window.getComputedStyle(node, null);\r\n\t\tdisplay = style[\"display\"];\r\n\t\tvisibility = style[\"visibility\"];\r\n\t}else if(node.currentStyle){\r\n\t\tdisplay = node.currentStyle[\"display\"];\r\n\t\tvisibility = node.currentStyle[\"visibility\"];\r\n\t}\r\n\r\n\tvar hiddenSection = false;\r\n\tvar recurringSection = locateCss({target:node}, \"dhx_form_repeat\", false);\r\n\tif(recurringSection){\r\n\t\thiddenSection = !!(recurringSection.style.height == \"0px\");\r\n\t}\r\n\thiddenSection = hiddenSection || !(node.offsetHeight);\r\n\r\n\treturn (display != \"none\" && visibility != \"hidden\" && !hiddenSection);\r\n}\r\n\r\nfunction hasNonNegativeTabIndex(node){\r\n\treturn !isNaN(node.getAttribute(\"tabindex\")) && (node.getAttribute(\"tabindex\")*1 >= 0);\r\n}\r\n\r\nfunction hasHref(node){\r\n\tvar canHaveHref = {\"a\": true, \"area\": true};\r\n\tif(canHaveHref[node.nodeName.loLowerCase()]){\r\n\t\treturn !!node.getAttribute(\"href\");\r\n\t}\r\n\treturn true;\r\n}\r\n\r\nfunction isEnabled(node){\r\n\tvar canDisable = {\"input\":true, \"select\":true, \"textarea\":true, \"button\":true, \"object\":true};\r\n\tif(canDisable[node.nodeName.toLowerCase()]){\r\n\t\treturn !node.hasAttribute(\"disabled\");\r\n\t}\r\n\r\n\treturn true;\r\n}\r\n\r\n\r\nfunction getFocusableNodes(root){\r\n\tvar nodes = root.querySelectorAll([\r\n\t\t\"a[href]\",\r\n\t\t\"area[href]\",\r\n\t\t\"input\",\r\n\t\t\"select\",\r\n\t\t\"textarea\",\r\n\t\t\"button\",\r\n\t\t\"iframe\",\r\n\t\t\"object\",\r\n\t\t\"embed\",\r\n\t\t\"[tabindex]\",\r\n\t\t\"[contenteditable]\"\r\n\t].join(\", \"));\r\n\r\n\tvar nodesArray = Array.prototype.slice.call(nodes, 0);\r\n\t\r\n\tfor(var i = 0; i < nodesArray.length; i++){\r\n\t\tnodesArray[i].$position = i;\r\n\t\t// we remember original nodes order, \r\n\t\t// so when we sort them by tabindex we ensure order of nodes with same tabindex is preserved, \r\n\t\t// since some browsers do unstable sort\r\n\t}\r\n\t\r\n\tnodesArray.sort(function(a, b) {\r\n\t\tif(a.tabIndex === 0 && b.tabIndex !== 0){\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\tif(a.tabIndex !== 0 && b.tabIndex === 0){\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\t\r\n\t\tif (a.tabIndex === b.tabIndex){\r\n\t\t\t// ensure we do stable sort\r\n\t\t\treturn a.$position - b.$position;\r\n\t\t}\r\n\t\tif (a.tabIndex < b.tabIndex) {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\treturn 1;\r\n\t});\r\n\t\r\n\tfor(var i = 0; i < nodesArray.length; i++){\r\n\t\tvar node = nodesArray[i];\r\n\t\tvar isValid = (hasNonNegativeTabIndex(node) || isEnabled(node) || hasHref(node)) && isVisible(node);\r\n\t\tif(!isValid){\r\n\t\t\tnodesArray.splice(i, 1);\r\n\t\t\ti--;\r\n\t\t}\r\n\t}\r\n\treturn nodesArray;\r\n}\r\n\r\n\r\nfunction isShadowDomSupported() {\r\n\treturn document.head.createShadowRoot || document.head.attachShadow;\r\n}\r\n\r\n/**\r\n * Returns element that has the browser focus, or null if no element has focus.\r\n * Works with shadow DOM, so it's prefereed to use this function instead of document.activeElement directly.\r\n * @returns HTMLElement\r\n */\r\nfunction getActiveElement(){\r\n\tvar activeElement = document.activeElement;\r\n\tif (activeElement.shadowRoot) {\r\n\t\tactiveElement = activeElement.shadowRoot.activeElement;\r\n\t}\r\n\tif (activeElement === document.body && document.getSelection) {\r\n\t\tactiveElement = document.getSelection().focusNode || document.body;\r\n\t}\r\n\r\n\treturn activeElement;\r\n}\r\n\r\n/**\r\n * Returns document.body or the host node of the ShadowRoot, if the element is attached to ShadowDom\r\n * @param {HTMLElement} element \r\n * @returns HTMLElement\r\n */\r\nfunction getRootNode(element) {\r\n\tif (!element) {\r\n\t\treturn document.body;\r\n\t}\r\n\tif (!isShadowDomSupported()) {\r\n\t\treturn document.body;\r\n\t}\r\n\twhile (element.parentNode && (element = element.parentNode)) {\r\n\t\tif (element instanceof ShadowRoot) {\r\n\t\t\treturn element.host;\r\n\t\t}\r\n\t}\r\n\treturn document.body;\r\n}\r\n\r\nfunction hasShadowParent(element) {\r\n\treturn !!getRootNode(element);\r\n}\r\n\r\nexport default {\r\n\t/**\r\n\t * @desc: Calculate absolute position of html object\r\n\t * @type: private\r\n\t * @param: htmlObject - html object\r\n\t * @topic: 0\r\n\t */\r\n\tgetAbsoluteLeft: function getAbsoluteLeft(htmlObject){\r\n\t\treturn this.getOffset(htmlObject).left;\r\n\t},\r\n\t/**\r\n\t * @desc: Calculate absolute position of html object\r\n\t * @type: private\r\n\t * @param: htmlObject - html object\r\n\t * @topic: 0\r\n\t */\r\n\tgetAbsoluteTop: function getAbsoluteTop(htmlObject){\r\n\t\treturn this.getOffset(htmlObject).top;\r\n\t},\r\n\r\n\tgetOffsetSum: function getOffsetSum(elem) {\r\n\t\tvar top=0, left=0;\r\n\t\twhile(elem) {\r\n\t\t\ttop = top + parseInt(elem.offsetTop);\r\n\t\t\tleft = left + parseInt(elem.offsetLeft);\r\n\t\t\telem = elem.offsetParent;\r\n\t\t}\r\n\t\treturn {top: top, left: left};\r\n\t},\r\n\r\n\tgetOffsetRect: function getOffsetRect(elem) {\r\n\t\tvar box = elem.getBoundingClientRect();\r\n\r\n\t\tvar top = 0,\r\n\t\t\tleft = 0;\r\n\r\n\t\t// https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent#Mobile_Tablet_or_Desktop\r\n\t\tif (!/Mobi/.test(navigator.userAgent)) {\r\n\t\t\tvar body = document.body;\r\n\t\t\tvar docElem = document.documentElement;\r\n\t\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\r\n\t\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\r\n\t\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\r\n\t\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\r\n\r\n\t\t\ttop = box.top + scrollTop - clientTop;\r\n\t\t\tleft = box.left + scrollLeft - clientLeft;\r\n\t\t}else {\r\n\t\t\t// incorrect left coordinate on mobile zoom\r\n\t\t\t// https://bugs.chromium.org/p/chromium/issues/detail?id=489206\r\n\r\n\t\t\tvar dummy = document.createElement(\"div\");\r\n\t\t\tdummy.style.position=\"absolute\";\r\n\t\t\tdummy.style.left=\"0px\";\r\n\t\t\tdummy.style.top=\"0px\";\r\n\t\t\tdummy.style.width=\"1px\";\r\n\t\t\tdummy.style.height = \"1px\";\r\n\r\n\t\t\tdocument.body.appendChild(dummy);\r\n\t\t\tvar dummyBox = dummy.getBoundingClientRect();\r\n\t\t\ttop = box.top - dummyBox.top;\r\n\t\t\tleft = box.left - dummyBox.left;\r\n\r\n\t\t\tdummy.parentNode.removeChild(dummy);\r\n\t\t}\r\n\r\n\t\treturn { top: Math.round(top), left: Math.round(left) };\r\n\t},\r\n\r\n\tgetOffset: function getOffset(elem) {\r\n\t\tif (elem.getBoundingClientRect) {\r\n\t\t\treturn this.getOffsetRect(elem);\r\n\t\t} else {\r\n\t\t\treturn this.getOffsetSum(elem);\r\n\t\t}\r\n\t},\r\n\r\n\tclosest: function(element, selector){\r\n\t\tif(!element || !selector){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn closest(element, selector);\r\n\t},\r\n\tinsertAfter: function(newNode, referenceNode){\r\n\t\tif(referenceNode.nextSibling){\r\n\t\t\treferenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);\r\n\t\t}else{\r\n\t\t\treferenceNode.parentNode.appendChild(newNode);\r\n\t\t}\r\n\t},\r\n\tremove: function(node) {\r\n\t\tif (node && node.parentNode) {\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t}\r\n\t},\r\n\tisChildOf: function(child, parent) {\r\n\t\treturn parent.contains(child);\r\n\t},\r\n\tgetFocusableNodes,\r\n\tgetClassName,\r\n\tlocateCss,\r\n\tgetRootNode,\r\n\thasShadowParent,\r\n\tisShadowDomSupported,\r\n\tgetActiveElement,\r\n\tgetRelativeEventPosition,\r\n\tgetTargetNode,\r\n\tgetNodePosition\r\n};\r\n\r\nvar closest;\r\nif(Element.prototype.closest){\r\n\tclosest = function(element, selector){\r\n\t\treturn element.closest(selector);\r\n\t};\r\n}else{\r\n\tvar matches = Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\r\n\tclosest = function(element, selector) {\r\n\t\tvar el = element;\r\n\t\tdo {\r\n\t\t\tif (matches.call(el, selector)){\r\n\t\t\t\treturn el;\r\n\t\t\t}\r\n\t\t\tel = el.parentElement || el.parentNode;\r\n\t\t} while (el !== null && el.nodeType === 1);\r\n\t\treturn null;\r\n\t};\r\n}\r\n","/* eslint-disable no-restricted-globals */\r\nvar isWindowAwailable = typeof window !== \"undefined\";\r\n\r\n/* eslint-enable no-restricted-globals */\r\n\r\nexport default {\r\n\tisIE: isWindowAwailable && (navigator.userAgent.indexOf(\"MSIE\") >= 0 || navigator.userAgent.indexOf(\"Trident\") >= 0),\r\n\tisIE6: isWindowAwailable && (!XMLHttpRequest && navigator.userAgent.indexOf(\"MSIE\") >= 0),\r\n\tisIE7: isWindowAwailable && (navigator.userAgent.indexOf(\"MSIE 7.0\") >= 0 && navigator.userAgent.indexOf(\"Trident\") < 0),\r\n\tisIE8: isWindowAwailable && (navigator.userAgent.indexOf(\"MSIE 8.0\") >= 0 && navigator.userAgent.indexOf(\"Trident\") >= 0),\r\n\tisOpera: isWindowAwailable && (navigator.userAgent.indexOf(\"Opera\") >= 0),\r\n\tisChrome: isWindowAwailable && (navigator.userAgent.indexOf(\"Chrome\") >= 0),\r\n\tisKHTML: isWindowAwailable && (navigator.userAgent.indexOf(\"Safari\") >= 0 || navigator.userAgent.indexOf(\"Konqueror\") >= 0),\r\n\tisFF: isWindowAwailable && (navigator.userAgent.indexOf(\"Firefox\") >= 0),\r\n\tisIPad: isWindowAwailable && (navigator.userAgent.search(/iPad/gi) >= 0),\r\n\tisEdge: isWindowAwailable && (navigator.userAgent.indexOf(\"Edge\")!=-1),\r\n\tisNode: (!isWindowAwailable || typeof navigator == \"undefined\")\r\n};","export default function(data) {\r\n\tif (typeof data === \"string\" || typeof data === \"number\") {\r\n\t\treturn data;\r\n\t}\r\n\tvar result = \"\";\r\n\tfor (var key in data) {\r\n\t\tvar serialized = \"\";\r\n\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\tif (typeof data[key] === \"string\") {\r\n\t\t\t\tserialized = encodeURIComponent(data[key]);\r\n\t\t\t} else if (typeof data[key] === \"number\") {\r\n\t\t\t\tserialized = data[key];\r\n\t\t\t} else {\r\n\t\t\t\tserialized = encodeURIComponent(JSON.stringify(data[key]));\r\n\t\t\t}\r\n\t\t\tserialized = key + \"=\" + serialized;\r\n\r\n\t\t\tif (result.length) {\r\n\t\t\t\tserialized = \"&\" + serialized;\r\n\t\t\t}\r\n\t\t\tresult += serialized;\r\n\t\t}\r\n\t}\r\n\treturn result;\r\n}","export default function extend(scheduler) {\r\n\r\nvar generateStringToDate = function (format, utc) {\r\n\tvar splt = \"var temp=date.match(/[a-zA-Z]+|[0-9]+/g);\";\r\n\tvar mask = format.match(/%[a-zA-Z]/g);\r\n\tfor (var i = 0; i < mask.length; i++) {\r\n\t\tswitch (mask[i]) {\r\n\t\t\tcase \"%j\":\r\n\t\t\tcase \"%d\": splt += \"set[2]=temp[\" + i + \"]||1;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%n\":\r\n\t\t\tcase \"%m\": splt += \"set[1]=(temp[\" + i + \"]||1)-1;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%y\": splt += \"set[0]=temp[\" + i + \"]*1+(temp[\" + i + \"]>50?1900:2000);\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%g\":\r\n\t\t\tcase \"%G\":\r\n\t\t\tcase \"%h\":\r\n\t\t\tcase \"%H\":\r\n\t\t\t\tsplt += \"set[3]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%i\":\r\n\t\t\t\tsplt += \"set[4]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%Y\": splt += \"set[0]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%a\":\r\n\t\t\tcase \"%A\": splt += \"set[3]=set[3]%12+((temp[\" + i + \"]||'').toLowerCase()=='am'?0:12);\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%s\": splt += \"set[5]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%M\": splt += \"set[1]=this.locale.date.month_short_hash[temp[\" + i + \"]]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%F\": splt += \"set[1]=this.locale.date.month_full_hash[temp[\" + i + \"]]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\tvar code = \"set[0],set[1],set[2],set[3],set[4],set[5]\";\r\n\tif (utc) code = \" Date.UTC(\" + code + \")\";\r\n\treturn new Function(\"date\", \"var set=[0,0,1,0,0,0]; \" + splt + \" return new Date(\" + code + \");\");\r\n};\r\nvar csp_date_to_str = function (format, utc) {\r\n\treturn function(date) {\r\n\t\treturn format.replace(/%[a-zA-Z]/g, function (a) {\r\n\t\t\tswitch (a) {\r\n\t\t\t\tcase \"%d\": return utc ? scheduler.date.to_fixed(date.getUTCDate()) : scheduler.date.to_fixed(date.getDate());\r\n\t\t\t\tcase \"%m\": return utc ? scheduler.date.to_fixed((date.getUTCMonth() + 1)) : scheduler.date.to_fixed((date.getMonth() + 1));\r\n\t\t\t\tcase \"%j\": return utc ? date.getUTCDate() : date.getDate();\r\n\t\t\t\tcase \"%n\": return utc ? (date.getUTCMonth() + 1) : (date.getMonth() + 1);\r\n\t\t\t\tcase \"%y\": return utc ? scheduler.date.to_fixed(date.getUTCFullYear() % 100) : scheduler.date.to_fixed(date.getFullYear() % 100);\r\n\t\t\t\tcase \"%Y\": return utc ? date.getUTCFullYear() : date.getFullYear();\r\n\t\t\t\tcase \"%D\": return utc ? scheduler.locale.date.day_short[date.getUTCDay()] : scheduler.locale.date.day_short[date.getDay()];\r\n\t\t\t\tcase \"%l\": return utc ? scheduler.locale.date.day_full[date.getUTCDay()] : scheduler.locale.date.day_full[date.getDay()];\r\n\t\t\t\tcase \"%M\": return utc ? scheduler.locale.date.month_short[date.getUTCMonth()] : scheduler.locale.date.month_short[date.getMonth()];\r\n\t\t\t\tcase \"%F\": return utc ? scheduler.locale.date.month_full[date.getUTCMonth()] : scheduler.locale.date.month_full[date.getMonth()];\r\n\t\t\t\tcase \"%h\": return utc ? scheduler.date.to_fixed((date.getUTCHours() + 11) % 12 + 1) : scheduler.date.to_fixed((date.getHours() + 11) % 12 + 1);\r\n\t\t\t\tcase \"%g\": return utc ? ((date.getUTCHours() + 11) % 12 + 1) : ((date.getHours() + 11) % 12 + 1);\r\n\t\t\t\tcase \"%G\": return utc ? date.getUTCHours() : date.getHours();\r\n\t\t\t\tcase \"%H\": return utc ? scheduler.date.to_fixed(date.getUTCHours()) : scheduler.date.to_fixed(date.getHours());\r\n\t\t\t\tcase \"%i\": return utc ? scheduler.date.to_fixed(date.getUTCMinutes()) : scheduler.date.to_fixed(date.getMinutes());\r\n\t\t\t\tcase \"%a\": return utc ? (date.getUTCHours() > 11 ? \"pm\" : \"am\") : (date.getHours() > 11 ? \"pm\" : \"am\");\r\n\t\t\t\tcase \"%A\": return utc ? (date.getUTCHours() > 11 ? \"PM\" : \"AM\") : (date.getHours() > 11 ? \"PM\" : \"AM\");\r\n\t\t\t\tcase \"%s\": return utc ? scheduler.date.to_fixed(date.getUTCSeconds()) : scheduler.date.to_fixed(date.getSeconds());\r\n\t\t\t\tcase \"%W\": return utc ? scheduler.date.to_fixed(scheduler.date.getUTCISOWeek(date)) : scheduler.date.to_fixed(scheduler.date.getISOWeek(date));\r\n\t\t\t\tdefault: return a;\r\n\t\t\t}\r\n\t\t});\r\n\t};\r\n};\r\nvar csp_str_to_date = function (format, utc) {\r\n\treturn function (date){\r\n\t\tvar set = [0, 0, 1, 0, 0, 0];\r\n\t\tvar temp = date.match(/[a-zA-Z]+|[0-9]+/g);\r\n\t\tvar mask = format.match(/%[a-zA-Z]/g);\r\n\r\n\t\tfor (var i = 0; i < mask.length; i++) {\r\n\t\t\tswitch (mask[i]) {\r\n\t\t\t\tcase \"%j\":\r\n\t\t\t\tcase \"%d\":\r\n\t\t\t\t\tset[2] = temp[i] || 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%n\":\r\n\t\t\t\tcase \"%m\":\r\n\t\t\t\t\tset[1] = (temp[i] || 1) - 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%y\":\r\n\t\t\t\t\tset[0] = temp[i] * 1 + (temp[i] > 50 ? 1900 : 2000);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%g\":\r\n\t\t\t\tcase \"%G\":\r\n\t\t\t\tcase \"%h\":\r\n\t\t\t\tcase \"%H\":\r\n\t\t\t\t\tset[3] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%i\":\r\n\t\t\t\t\tset[4] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\tset[0] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%a\":\r\n\t\t\t\tcase \"%A\":\r\n\t\t\t\t\tset[3] = set[3] % 12 + ((temp[i] || '').toLowerCase() == 'am' ? 0 : 12);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%s\":\r\n\t\t\t\t\tset[5] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%M\":\r\n\t\t\t\t\tset[1] = scheduler.locale.date.month_short_hash[temp[i]] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%F\":\r\n\t\t\t\t\tset[1] = scheduler.locale.date.month_full_hash[temp[i]] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (utc) {\r\n\t\t\treturn new Date(Date.UTC(set[0], set[1], set[2], set[3], set[4], set[5]));\r\n\t\t}\r\n\r\n\t\treturn new Date(set[0], set[1], set[2], set[3], set[4], set[5]);\r\n\t};\r\n};\r\n\r\nvar canUseCsp = false;\r\n(function() {\r\n\ttry {\r\n\t\tnew Function(\"canUseCsp = false;\");\r\n\t} catch(e) {\r\n\t\tcanUseCsp = true;\r\n\t}\r\n})();\r\nfunction useCsp() {\r\n\tvar result = false;\r\n\tif (scheduler.config.csp === \"auto\") {\r\n\t\tresult = canUseCsp;\r\n\t} else {\r\n\t\tresult = scheduler.config.csp;\r\n\t}\r\n\treturn result;\r\n}\r\nscheduler.date = {\r\n\tinit:function(){\r\n\t\tvar s = scheduler.locale.date.month_short;\r\n\t\tvar t = scheduler.locale.date.month_short_hash = {};\r\n\t\tfor (var i = 0; i < s.length; i++)\r\n\t\t\tt[s[i]]=i;\r\n\r\n\t\tvar s = scheduler.locale.date.month_full;\r\n\t\tvar t = scheduler.locale.date.month_full_hash = {};\r\n\t\tfor (var i = 0; i < s.length; i++)\r\n\t\t\tt[s[i]]=i;\r\n\t},\r\n\t_bind_host_object : function(method){\r\n\t\tif(method.bind){\r\n\t\t\treturn method.bind(scheduler);\r\n\t\t}else{\r\n\t\t\treturn function(){ return method.apply(scheduler, arguments); };\r\n\t\t}\r\n\t},\r\n\tdate_part:function(date){\r\n\t\tvar old = new Date(date);\r\n\t\tdate.setHours(0);\r\n\t\tdate.setMinutes(0);\r\n\t\tdate.setSeconds(0);\r\n\t\tdate.setMilliseconds(0);\r\n\t\tif (date.getHours() && //shift to yesterday on dst\r\n\t\t\t(date.getDate() < old.getDate() || date.getMonth() < old.getMonth() || date.getFullYear() < old.getFullYear()) )\r\n\t\t\tdate.setTime(date.getTime() + 60 * 60 * 1000 * (24 - date.getHours()));\r\n\t\treturn date;\r\n\t},\r\n\ttime_part:function(date){\r\n\t\treturn (date.valueOf()/1000 - date.getTimezoneOffset()*60)%86400;\r\n\t},\r\n\tweek_start:function(date){\r\n\t\tvar shift=date.getDay();\r\n\t\tif (scheduler.config.start_on_monday){\r\n\t\t\tif (shift===0) shift=6;\r\n\t\t\telse shift--;\r\n\t\t}\r\n\t\treturn this.date_part(this.add(date,-1*shift,\"day\"));\r\n\t},\r\n\tmonth_start:function(date){\r\n\t\tdate.setDate(1);\r\n\t\treturn this.date_part(date);\r\n\t},\r\n\tyear_start:function(date){\r\n\t\tdate.setMonth(0);\r\n\t\treturn this.month_start(date);\r\n\t},\r\n\tday_start:function(date){\r\n\t\treturn this.date_part(date);\r\n\t},\r\n\t_add_days:function(date, inc){\r\n\t\tvar ndate = new Date(date.valueOf());\r\n\r\n\t\tndate.setDate(ndate.getDate() + inc);\r\n\r\n\t\t// Workaround for Safari/iOS timezone bug, ref:OKZ-149693\r\n\t\tif(inc == Math.round(inc) && inc > 0){\r\n\t\t\tvar datesDiff = +ndate - +date,\r\n\t\t\t\trest = datesDiff % (24*60*60*1000);\r\n\t\t\tif(rest && date.getTimezoneOffset() == ndate.getTimezoneOffset()){\r\n\t\t\t\tvar hours = rest / (60* 60 * 1000);\r\n\t\t\t\tndate.setTime(ndate.getTime() + (24 - hours) * 60 * 60 * 1000);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (inc >= 0 && (!date.getHours() && ndate.getHours()) &&//shift to yesterday on dst\r\n\t\t\t(ndate.getDate() < date.getDate() || ndate.getMonth() < date.getMonth() || ndate.getFullYear() < date.getFullYear()) )\r\n\t\t\tndate.setTime(ndate.getTime() + 60 * 60 * 1000 * (24 - ndate.getHours()));\r\n\t\treturn ndate;\r\n\t},\r\n\tadd:function(date,inc,mode){\r\n\t\tvar ndate=new Date(date.valueOf());\r\n\t\tswitch(mode){\r\n\t\t\tcase \"day\":\r\n\t\t\t\tndate = scheduler.date._add_days(ndate, inc);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"week\":\r\n\t\t\t\tndate = scheduler.date._add_days(ndate, inc * 7);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"month\": ndate.setMonth(ndate.getMonth()+inc); break;\r\n\t\t\tcase \"year\": ndate.setYear(ndate.getFullYear()+inc); break;\r\n\t\t\tcase \"hour\":\r\n\t\t\t\t/*\r\n\t\t\t\t setHour(getHour() + inc) and setMinutes gives weird result when is applied on a Daylight Saving time switch\r\n\t\t\t\t setTime seems working as expected\r\n\t\t\t\t*/\r\n\t\t\t\tndate.setTime(ndate.getTime() + inc * 60 * 60 * 1000);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"minute\":\r\n\t\t\t\tndate.setTime(ndate.getTime() + inc * 60 * 1000);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\treturn scheduler.date[\"add_\"+mode](date,inc,mode);\r\n\t\t}\r\n\t\treturn ndate;\r\n\t},\r\n\tto_fixed:function(num){\r\n\t\tif (num<10)\treturn \"0\"+num;\r\n\t\treturn num;\r\n\t},\r\n\tcopy:function(date){\r\n\t\treturn new Date(date.valueOf());\r\n\t},\r\n\tdate_to_str:function(format,utc){\r\n\t\tif (useCsp()) {\r\n\t\t\treturn csp_date_to_str(format,utc);\r\n\t\t}\r\n\r\n\t\tformat=format.replace(/%[a-zA-Z]/g,function(a){\r\n\t\t\tswitch(a){\r\n\t\t\t\tcase \"%d\": return \"\\\"+this.date.to_fixed(date.getDate())+\\\"\";\r\n\t\t\t\tcase \"%m\": return \"\\\"+this.date.to_fixed((date.getMonth()+1))+\\\"\";\r\n\t\t\t\tcase \"%j\": return \"\\\"+date.getDate()+\\\"\";\r\n\t\t\t\tcase \"%n\": return \"\\\"+(date.getMonth()+1)+\\\"\";\r\n\t\t\t\tcase \"%y\": return \"\\\"+this.date.to_fixed(date.getFullYear()%100)+\\\"\";\r\n\t\t\t\tcase \"%Y\": return \"\\\"+date.getFullYear()+\\\"\";\r\n\t\t\t\tcase \"%D\": return \"\\\"+this.locale.date.day_short[date.getDay()]+\\\"\";\r\n\t\t\t\tcase \"%l\": return \"\\\"+this.locale.date.day_full[date.getDay()]+\\\"\";\r\n\t\t\t\tcase \"%M\": return \"\\\"+this.locale.date.month_short[date.getMonth()]+\\\"\";\r\n\t\t\t\tcase \"%F\": return \"\\\"+this.locale.date.month_full[date.getMonth()]+\\\"\";\r\n\t\t\t\tcase \"%h\": return \"\\\"+this.date.to_fixed((date.getHours()+11)%12+1)+\\\"\";\r\n\t\t\t\tcase \"%g\": return \"\\\"+((date.getHours()+11)%12+1)+\\\"\";\r\n\t\t\t\tcase \"%G\": return \"\\\"+date.getHours()+\\\"\";\r\n\t\t\t\tcase \"%H\": return \"\\\"+this.date.to_fixed(date.getHours())+\\\"\";\r\n\t\t\t\tcase \"%i\": return \"\\\"+this.date.to_fixed(date.getMinutes())+\\\"\";\r\n\t\t\t\tcase \"%a\": return \"\\\"+(date.getHours()>11?\\\"pm\\\":\\\"am\\\")+\\\"\";\r\n\t\t\t\tcase \"%A\": return \"\\\"+(date.getHours()>11?\\\"PM\\\":\\\"AM\\\")+\\\"\";\r\n\t\t\t\tcase \"%s\": return \"\\\"+this.date.to_fixed(date.getSeconds())+\\\"\";\r\n\t\t\t\tcase \"%W\": return \"\\\"+this.date.to_fixed(this.date.getISOWeek(date))+\\\"\";\r\n\t\t\t\tdefault: return a;\r\n\t\t\t}\r\n\t\t});\r\n\t\tif (utc) format=format.replace(/date\\.get/g,\"date.getUTC\");\r\n\t\tvar func = new Function(\"date\",\"return \\\"\"+format+\"\\\";\");\r\n\r\n\t\treturn scheduler.date._bind_host_object(func);\r\n\t},\r\n\tstr_to_date:function(format, utc, exactFormat){\r\n\t\tvar stringToDateMethod = useCsp() ? csp_str_to_date : generateStringToDate;\r\n\t\tvar parseExactFormat = stringToDateMethod(format, utc);\r\n\t\t//return scheduler.date._bind_host_object(func);\r\n\t\t// eslint-disable-next-line\r\n\t\tvar yyyyMMddhhIIss = /^[0-9]{4}(\\-|\\/)[0-9]{2}(\\-|\\/)[0-9]{2} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/;\r\n\r\n\t\t// MM/dd/yyyy - default old format for xml-date\r\n\t\t// eslint-disable-next-line\r\n\t\tvar MMddyyyyhhIIss = /^[0-9]{2}\\/[0-9]{2}\\/[0-9]{4} ?(([0-9]{1,2}:[0-9]{2})(:[0-9]{1,2})?)?$/;\r\n\t\t// dd-MM-yyyy - default old format for api-date\r\n\t\t// eslint-disable-next-line\r\n\t\tvar ddMMyyyyhhIIss = /^[0-9]{2}\\-[0-9]{2}\\-[0-9]{4} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/;\r\n\t\t// eslint-disable-next-line\r\n\t\tvar ISO8601 = /^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$/;\r\n\r\n\t\tvar isYMDDate = function (datestr) {\r\n\t\t\treturn yyyyMMddhhIIss.test(String(datestr));\r\n\t\t};\r\n\r\n\t\tvar isMDYDate = function (datestr) {\r\n\t\t\treturn MMddyyyyhhIIss.test(String(datestr));\r\n\t\t};\r\n\t\tvar isDMYDate = function (datestr) {\r\n\t\t\treturn ddMMyyyyhhIIss.test(String(datestr));\r\n\t\t};\r\n\t\tvar isISO8601 = function (datestr) {\r\n\t\t\treturn ISO8601.test(datestr);\r\n\t\t};\r\n\r\n\t\tvar parseYMD = stringToDateMethod(\"%Y-%m-%d %H:%i:%s\", utc);\r\n\t\tvar parseMDY = stringToDateMethod(\"%m/%d/%Y %H:%i:%s\", utc);\r\n\t\tvar parseDMY = stringToDateMethod(\"%d-%m-%Y %H:%i:%s\", utc);\r\n\r\n\t\treturn function (dateString) {\r\n\r\n\t\t\tif (!exactFormat && !scheduler.config.parse_exact_format) {\r\n\t\t\t\tif (dateString && dateString.getISOWeek) {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t} else if (typeof dateString === \"number\") {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t} else if (isYMDDate(dateString)) {\r\n\t\t\t\t\treturn parseYMD(dateString);\r\n\t\t\t\t} else if (isMDYDate(dateString)) {\r\n\t\t\t\t\treturn parseMDY(dateString);\r\n\t\t\t\t} else if (isDMYDate(dateString)) {\r\n\t\t\t\t\treturn parseDMY(dateString);\r\n\t\t\t\t} else if (isISO8601(dateString)) {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn parseExactFormat.call(scheduler, dateString);\r\n\t\t};\r\n\t},\r\n\tgetISOWeek: function(ndate) {\r\n\t\tif(!ndate) return false;\r\n\t\tndate = this.date_part(new Date(ndate));\r\n\t\tvar nday = ndate.getDay();\r\n\t\tif (nday === 0) {\r\n\t\t\tnday = 7;\r\n\t\t}\r\n\t\tvar first_thursday = new Date(ndate.valueOf());\r\n\t\tfirst_thursday.setDate(ndate.getDate() + (4 - nday));\r\n\t\tvar year_number = first_thursday.getFullYear(); // year of the first Thursday\r\n\t\tvar ordinal_date = Math.round( (first_thursday.getTime() - new Date(year_number, 0, 1).getTime()) / 86400000); //ordinal date of the first Thursday - 1 (so not really ordinal date)\r\n\t\tvar week_number = 1 + Math.floor( ordinal_date / 7);\r\n\t\treturn week_number;\r\n\t},\r\n\tgetUTCISOWeek: function(ndate){\r\n\t\treturn this.getISOWeek(this.convert_to_utc(ndate));\r\n\t},\r\n\tconvert_to_utc: function(date) {\r\n\t\treturn new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds());\r\n\t}\r\n};\r\n\r\n}\r\n\r\n","export default function(scheduler){\r\n\treturn (function(){\r\n\t\tvar res = {};\r\n\t\tfor (var a in this._events){\r\n\t\t\tvar ev = this._events[a];\r\n\t\t\tif (ev.id.toString().indexOf(\"#\") == -1){\r\n\t\t\t\tres[ev.id] = ev;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn res;\r\n\t}).bind(scheduler);\r\n}","import xmlLoaded from \"./loaders/xml\";\r\nimport jsonLoader from \"./loaders/json\";\r\nimport iCalLoader from \"./loaders/ical\";\r\nimport createSerializator from \"../core/common/get_serializable_events\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler._loaded = {};\r\nscheduler._load = function(url, from) {\r\n\turl = url || this._load_url;\r\n\r\n\tif(!url){\r\n\t\t//if scheduler.setLoadMode is called before scheduler.init, initial rendering will invoke data loading while url is undefined\r\n\t\treturn;\r\n\t}\r\n\r\n\turl += (url.indexOf(\"?\") == -1 ? \"?\" : \"&\") + \"timeshift=\" + (new Date()).getTimezoneOffset();\r\n\tif (this.config.prevent_cache) url += \"&uid=\" + this.uid();\r\n\tvar to;\r\n\tfrom = from || this._date;\r\n\tfunction ajaxCallback(response) {\r\n\t\tscheduler.on_load(response);\r\n\t\tscheduler.callEvent(\"onLoadEnd\", []);\r\n\t}\r\n\tif (this._load_mode) {\r\n\t\tvar lf = this.templates.load_format;\r\n\r\n\t\tfrom = this.date[this._load_mode + \"_start\"](new Date(from.valueOf()));\r\n\t\twhile (from > this._min_date) from = this.date.add(from, -1, this._load_mode);\r\n\t\tto = from;\r\n\r\n\t\tvar cache_line = true;\r\n\t\twhile (to < this._max_date) {\r\n\t\t\tto = this.date.add(to, 1, this._load_mode);\r\n\t\t\tif (this._loaded[lf(from)] && cache_line)\r\n\t\t\t\tfrom = this.date.add(from, 1, this._load_mode); else cache_line = false;\r\n\t\t}\r\n\r\n\t\tvar temp_to = to;\r\n\t\tdo {\r\n\t\t\tto = temp_to;\r\n\t\t\ttemp_to = this.date.add(to, -1, this._load_mode);\r\n\t\t} while (temp_to > from && this._loaded[lf(temp_to)]);\r\n\r\n\t\tif (to <= from)\r\n\t\t\treturn false; //already loaded\r\n\r\n\t\tscheduler.ajax.get(url + \"&from=\" + lf(from) + \"&to=\" + lf(to), ajaxCallback);\r\n\r\n\t\twhile (from < to) {\r\n\t\t\tthis._loaded[lf(from)] = true;\r\n\t\t\tfrom = this.date.add(from, 1, this._load_mode);\r\n\t\t}\r\n\t} else {\r\n\t\tscheduler.ajax.get(url, ajaxCallback);\r\n\t}\r\n\r\n\t// TODO: remove onXLS\r\n\tthis.callEvent(\"onXLS\", []);\r\n\tthis.callEvent(\"onLoadStart\", []);\r\n\treturn true;\r\n};\r\n\r\nscheduler._parsers = {};\r\n\r\n\r\nxmlLoaded(scheduler);\r\njsonLoader(scheduler);\r\niCalLoader(scheduler);\r\n\r\nscheduler.on_load = function (loader) {\r\n\tthis.callEvent(\"onBeforeParse\", []);\r\n\r\n\tvar evs;\r\n\tvar error = false;\r\n\r\n\tvar foundParser = false;\r\n\tfor(var i in this._parsers){\r\n\t\tvar parser = this._parsers[i];\r\n\t\tif(parser.canParse(loader.xmlDoc.responseText, loader.xmlDoc)){\r\n\t\t\ttry{\r\n\t\t\t\tvar param = loader.xmlDoc.responseText;\r\n\t\t\t\tif(i === \"xml\"){\r\n\t\t\t\t\tparam = loader;\r\n\t\t\t\t}\r\n\t\t\t\tevs = parser.parse(param);\r\n\t\t\t\tif(!evs){\r\n\t\t\t\t\terror = true;\r\n\t\t\t\t}\r\n\t\t\t}catch(e){\r\n\t\t\t\terror = true;\r\n\t\t\t}\r\n\t\t\tfoundParser = true;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tif(!foundParser){\r\n\t\tif(this._process && this[this._process]){\r\n\t\t\ttry{\r\n\t\t\t\tevs = this[this._process].parse(loader.xmlDoc.responseText);\r\n\t\t\t}catch (e){\r\n\t\t\t\terror = true;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\terror = true;\r\n\t\t}\r\n\t}\r\n\r\n\tif(error || (loader.xmlDoc.status && loader.xmlDoc.status >= 400)){\r\n\t\tthis.callEvent(\"onLoadError\", [loader.xmlDoc]);\r\n\t\tevs = [];\r\n\t}\r\n\r\n\tthis._process_loading(evs);\r\n\r\n\t// TODO: remove onXLE\r\n\tthis.callEvent(\"onXLE\", []);\r\n\tthis.callEvent(\"onParse\", []);\r\n};\r\nscheduler._process_loading = function(evs) {\r\n\tthis._loading = true;\r\n\tthis._not_render = true;\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tif (!this.callEvent(\"onEventLoading\", [evs[i]])) continue;\r\n\t\tthis.addEvent(evs[i]);\r\n\t}\r\n\tthis._not_render = false;\r\n\tif (this._render_wait) this.render_view_data();\r\n\r\n\tthis._loading = false;\r\n\tif (this._after_call) this._after_call();\r\n\tthis._after_call = null;\r\n};\r\nscheduler._init_event = function(event) {\r\n\tevent.text = (event.text || event._tagvalue) || \"\";\r\n\tevent.start_date = scheduler._init_date(event.start_date);\r\n\tevent.end_date = scheduler._init_date(event.end_date);\r\n};\r\n\r\nscheduler._init_date = function(date){\r\n\tif(!date)\r\n\t\treturn null;\r\n\tif (typeof date == \"string\") {\r\n\t\treturn scheduler._helpers.parseDate(date);\r\n\t}\r\n\telse return new Date(date);\r\n};\r\n\r\nconst getSerializableData = createSerializator(scheduler);\r\nscheduler.serialize = function(){\r\n\tconst dataset = [];\r\n\tconst allEvents = getSerializableData();\r\n\tfor (var a in allEvents){\r\n\t\t\r\n\t\tconst exportedEvent = {};\r\n\t\tvar ev = allEvents[a];\r\n\r\n\t\tfor(var key in ev){\r\n\t\t\tif (key.charAt(0) == \"$\" || key.charAt(0) == \"_\"){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tlet exportValue;\r\n\t\t\tconst rawValue = ev[key];\r\n\t\t\tif(scheduler.utils.isDate(rawValue)){\r\n\t\t\t\texportValue = scheduler.defined(scheduler.templates.xml_format) ? scheduler.templates.xml_format(rawValue) : scheduler.templates.format_date(rawValue);\r\n\t\t\t}else{\r\n\t\t\t\texportValue = rawValue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\texportedEvent[key] = exportValue;\r\n\t\t}\r\n\r\n\t\tdataset.push(exportedEvent);\r\n\t}\r\n\treturn dataset;\r\n};\r\n\r\n/*\r\nscheduler.json = {};\r\nscheduler.json.parse = function(data) {\r\n\r\n\tvar events = [];\r\n\r\n\tif (typeof data == \"string\") {\r\n\t\tdata = JSON.parse(data);\r\n\t}\r\n\tif (Object.prototype.toString.call(data) === '[object Array]') {\r\n\t\tevents = data;\r\n\t} else {\r\n\t\tif(data){\r\n\t\t\tif(data.events){\r\n\t\t\t\tevents = data.events;\r\n\t\t\t}else if(data.data){\r\n\t\t\t\tevents = data.data;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tevents = events || [];\r\n\r\n\tif (data.dhx_security) {\r\n\t\tif (window.dhtmlx) {\r\n\t\t\twindow.dhtmlx.security_key = data.dhx_security;\r\n\t\t}\r\n\t\tscheduler.security_key = data.dhx_security;\r\n\t}\r\n\r\n\tvar collections = (data && data.collections) ? data.collections : {};\r\n\tvar collections_loaded = false;\r\n\tfor (var key in collections) {\r\n\t\tif (collections.hasOwnProperty(key)) {\r\n\t\t\tcollections_loaded = true;\r\n\t\t\tvar collection = collections[key];\r\n\t\t\tvar arr = scheduler.serverList[key];\r\n\t\t\tif (!arr) {\r\n\t\t\t\tscheduler.serverList[key] = arr = [];\r\n\t\t\t}\r\n\t\t\tarr.splice(0, arr.length); //clear old options\r\n\t\t\tfor (var j = 0; j < collection.length; j++) {\r\n\t\t\t\tvar option = collection[j];\r\n\t\t\t\tvar obj = { key: option.value, label: option.label }; // resulting option object\r\n\t\t\t\tfor (var option_key in option) {\r\n\t\t\t\t\tif (option.hasOwnProperty(option_key)) {\r\n\t\t\t\t\t\tif (option_key == \"value\" || option_key == \"label\")\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\tobj[option_key] = option[option_key]; // obj['value'] = option['value']\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tarr.push(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (collections_loaded)\r\n\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\r\n\tvar evs = [];\r\n\tfor (var i = 0; i < events.length; i++) {\r\n\t\tvar event = events[i];\r\n\t\tscheduler._init_event(event);\r\n\t\tevs.push(event);\r\n\t}\r\n\treturn evs;\r\n};*/\r\nscheduler.parse = function(data, type) {\r\n\tthis._process = type;\r\n\tthis.on_load({xmlDoc: {responseText: data}});\r\n};\r\nscheduler.load = function(url, call) {\r\n\tif (typeof call == \"string\") {\r\n\t\tthis._process = call;\r\n\t\tcall = arguments[2];\r\n\t}\r\n\r\n\tthis._load_url = url;\r\n\tthis._after_call = call;\r\n\tthis._load(url, this._date);\r\n};\r\n//possible values - day,week,month,year,all\r\nscheduler.setLoadMode = function(mode) {\r\n\tif (mode == \"all\") mode = \"\";\r\n\tthis._load_mode = mode;\r\n};\r\n\r\nscheduler.serverList = function(name, array) {\r\n\tif (array) {\r\n\t\tthis.serverList[name] = array.slice(0);\r\n\t\treturn this.serverList[name];\r\n\t}\r\n\tthis.serverList[name] = (this.serverList[name] || []);\r\n\treturn this.serverList[name];\r\n};\r\nscheduler._userdata = {};\r\n\r\nscheduler._xmlNodeToJSON = function(node) {\r\n\tvar t = {};\r\n\tfor (var i = 0; i < node.attributes.length; i++)\r\n\t\tt[node.attributes[i].name] = node.attributes[i].value;\r\n\r\n\tfor (var i = 0; i < node.childNodes.length; i++) {\r\n\t\tvar child = node.childNodes[i];\r\n\t\tif (child.nodeType == 1)\r\n\t\t\tt[child.tagName] = child.firstChild ? child.firstChild.nodeValue : \"\";\r\n\t}\r\n\r\n\tif (!t.text) t.text = node.firstChild ? node.firstChild.nodeValue : \"\";\r\n\r\n\treturn t;\r\n};\r\nscheduler.attachEvent(\"onXLS\", function() {\r\n\tif (this.config.show_loading === true) {\r\n\t\tvar t;\r\n\t\tt = this.config.show_loading = document.createElement(\"div\");\r\n\t\tt.className = 'dhx_loading';\r\n\t\tt.style.left = Math.round((this._x - 128) / 2) + \"px\";\r\n\t\tt.style.top = Math.round((this._y - 15) / 2) + \"px\";\r\n\t\tthis._obj.appendChild(t);\r\n\t}\r\n});\r\nscheduler.attachEvent(\"onXLE\", function() {\r\n\tvar t = this.config.show_loading;\r\n\tif (t && typeof t == \"object\") {\r\n\t\tif(t.parentNode) {\r\n\t\t\tt.parentNode.removeChild(t);\r\n\t\t}\r\n\t\tthis.config.show_loading = true;\r\n\t}\r\n});\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._parsers.xml = {\r\n\tcanParse: function(data, xhr){\r\n\t\t// IE returns non-empty responseXML type regardless of actual data type\r\n\t\tif(xhr.responseXML && xhr.responseXML.firstChild){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\ttry{\r\n\t\t\tvar xmlDoc = scheduler.ajax.parse(xhr.responseText);\r\n\t\t\tvar topElement = scheduler.ajax.xmltop(\"data\", xmlDoc);\r\n\t\t\tif(topElement && topElement.tagName === \"data\"){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}catch (e){\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\tparse: function(loader) {\r\n\t\tvar xml;\r\n\r\n\t\tif (!loader.xmlDoc.responseXML) { //from a string\r\n\t\t\tloader.xmlDoc.responseXML = scheduler.ajax.parse(loader.xmlDoc.responseText);\r\n\t\t}\r\n\t\r\n\t\txml = scheduler.ajax.xmltop(\"data\", loader.xmlDoc);\r\n\t\tif (xml.tagName != \"data\") return null;//not an xml\r\n\t\tvar csrfToken = xml.getAttribute(\"dhx_security\");\r\n\t\tif (csrfToken) {\r\n\t\t\tif (window.dhtmlx) {\r\n\t\t\t\twindow.dhtmlx.security_key = csrfToken;\r\n\t\t\t}\r\n\t\t\tscheduler.security_key = csrfToken;\r\n\t\t}\r\n\t\r\n\t\tvar opts = scheduler.ajax.xpath(\"//coll_options\", loader.xmlDoc);\r\n\t\tfor (var i = 0; i < opts.length; i++) {\r\n\t\t\tvar bind = opts[i].getAttribute(\"for\");\r\n\t\t\tvar arr = scheduler.serverList[bind];\r\n\t\t\tif (!arr) {\r\n\t\t\t\tscheduler.serverList[bind] = arr = [];\r\n\t\t\t}\r\n\t\t\tarr.splice(0, arr.length);\t//clear old options\r\n\t\t\tvar itms = scheduler.ajax.xpath(\".//item\", opts[i]);\r\n\t\t\tfor (var j = 0; j < itms.length; j++) {\r\n\t\t\t\tvar itm = itms[j];\r\n\t\t\t\tvar attrs = itm.attributes;\r\n\t\t\t\tvar obj = { key: itms[j].getAttribute(\"value\"), label: itms[j].getAttribute(\"label\")};\r\n\t\t\t\tfor (var k = 0; k < attrs.length; k++) {\r\n\t\t\t\t\tvar attr = attrs[k];\r\n\t\t\t\t\tif (attr.nodeName == \"value\" || attr.nodeName == \"label\")\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\tobj[attr.nodeName] = attr.nodeValue;\r\n\t\t\t\t}\r\n\t\t\t\tarr.push(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (opts.length)\r\n\t\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\t\r\n\t\tvar ud = scheduler.ajax.xpath(\"//userdata\", loader.xmlDoc);\r\n\t\tfor (var i = 0; i < ud.length; i++) {\r\n\t\t\tvar udx = scheduler._xmlNodeToJSON(ud[i]);\r\n\t\t\tscheduler._userdata[udx.name] = udx.text;\r\n\t\t}\r\n\t\r\n\t\tvar evs = [];\r\n\t\txml = scheduler.ajax.xpath(\"//event\", loader.xmlDoc);\r\n\t\r\n\t\tfor (var i = 0; i < xml.length; i++) {\r\n\t\t\tvar ev = evs[i] = scheduler._xmlNodeToJSON(xml[i]);\r\n\t\t\tscheduler._init_event(ev);\r\n\t\t}\r\n\t\treturn evs;\r\n\t}\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler.json = scheduler._parsers.json = {\r\n\tcanParse: function(data){\r\n\t\tif(data && typeof data === \"object\"){\r\n\t\t\treturn true;\r\n\t\t} else if(typeof data === \"string\"){\r\n\t\t\ttry {\r\n\t\t\t\tvar result = JSON.parse(data);\r\n\t\t\t\treturn Object.prototype.toString.call(result) === '[object Object]' || \r\n\t\t\t\t\t\tObject.prototype.toString.call(result) === '[object Array]';\r\n\t\t\t} catch (err) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\tparse: function(data) {\r\n\t\tvar events = [];\r\n\r\n\t\tif (typeof data == \"string\") {\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\t\tif (Object.prototype.toString.call(data) === '[object Array]') {\r\n\t\t\tevents = data;\r\n\t\t} else {\r\n\t\t\tif(data){\r\n\t\t\t\tif(data.events){\r\n\t\t\t\t\tevents = data.events;\r\n\t\t\t\t}else if(data.data){\r\n\t\t\t\t\tevents = data.data;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tevents = events || [];\r\n\r\n\t\tif (data.dhx_security) {\r\n\t\t\tif (window.dhtmlx) {\r\n\t\t\t\twindow.dhtmlx.security_key = data.dhx_security;\r\n\t\t\t}\r\n\t\t\tscheduler.security_key = data.dhx_security;\r\n\t\t}\r\n\r\n\t\tvar collections = (data && data.collections) ? data.collections : {};\r\n\t\tvar collections_loaded = false;\r\n\t\tfor (var key in collections) {\r\n\t\t\tif (collections.hasOwnProperty(key)) {\r\n\t\t\t\tcollections_loaded = true;\r\n\t\t\t\tvar collection = collections[key];\r\n\t\t\t\tvar arr = scheduler.serverList[key];\r\n\t\t\t\tif (!arr) {\r\n\t\t\t\t\tscheduler.serverList[key] = arr = [];\r\n\t\t\t\t}\r\n\t\t\t\tarr.splice(0, arr.length); //clear old options\r\n\t\t\t\tfor (var j = 0; j < collection.length; j++) {\r\n\t\t\t\t\tvar option = collection[j];\r\n\t\t\t\t\tvar obj = { key: option.value, label: option.label }; // resulting option object\r\n\t\t\t\t\tfor (var option_key in option) {\r\n\t\t\t\t\t\tif (option.hasOwnProperty(option_key)) {\r\n\t\t\t\t\t\t\tif (option_key == \"value\" || option_key == \"label\")\r\n\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\tobj[option_key] = option[option_key]; // obj['value'] = option['value']\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tarr.push(obj);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (collections_loaded)\r\n\t\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\r\n\t\tvar evs = [];\r\n\t\tfor (var i = 0; i < events.length; i++) {\r\n\t\t\tvar event = events[i];\r\n\t\t\tscheduler._init_event(event);\r\n\t\t\tevs.push(event);\r\n\t\t}\r\n\t\treturn evs;\r\n\t}\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler.ical = scheduler._parsers.ical = {\r\n\tcanParse: function(data){\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\treturn new RegExp(\"^BEGIN:VCALENDAR\").test(data);\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t},\r\n\tparse:function(str){\r\n\t\tvar data = str.match(RegExp(this.c_start+\"[^\\f]*\"+this.c_end,\"\"));\r\n\t\tif (!data.length) return;\r\n\r\n\t\t// mpl: handle bad unfolding\r\n\t\tdata[0]=data[0].replace(/[\\r\\n]+ /g,\"\");\r\n\r\n\t\t//unfolding \r\n\t\tdata[0]=data[0].replace(/[\\r\\n]+(?=[a-z \\t])/g,\" \");\r\n\t\t//drop property\r\n\t\tdata[0]=data[0].replace(/;[^:\\r\\n]*:/g,\":\");\r\n\t\t\r\n\t\t\r\n\t\tvar incoming=[];\r\n\t\tvar match;\r\n\t\tvar event_r = RegExp(\"(?:\"+this.e_start+\")([^\\f]*?)(?:\"+this.e_end+\")\",\"g\");\r\n\t\twhile ((match=event_r.exec(data)) !== null){\r\n\t\t\tvar e={};\r\n\t\t\tvar param;\r\n\t\t\tvar param_r = /[^\\r\\n]+[\\r\\n]+/g;\r\n\t\t\twhile ((param=param_r.exec(match[1])) !== null)\r\n\t\t\t\tthis.parse_param(param.toString(),e);\r\n\t\t\tif (e.uid && !e.id) e.id = e.uid; //fallback to UID, when ID is not defined\r\n\t\t\tincoming.push(e);\t\r\n\t\t}\r\n\t\treturn incoming;\r\n\t},\r\n\tparse_param:function(str,obj){\r\n\t\tvar d = str.indexOf(\":\"); \r\n\t\t\tif (d==-1) return;\r\n\t\t\r\n\t\tvar name = str.substr(0,d).toLowerCase();\r\n\t\tvar value = str.substr(d+1).replace(/\\\\,/g,\",\").replace(/[\\r\\n]+$/,\"\");\r\n\t\tif (name==\"summary\")\r\n\t\t\tname=\"text\";\r\n\t\telse if (name==\"dtstart\"){\r\n\t\t\tname = \"start_date\";\r\n\t\t\tvalue = this.parse_date(value,0,0);\r\n\t\t}\r\n\t\telse if (name==\"dtend\"){\r\n\t\t\tname = \"end_date\";\r\n\t\t\tvalue = this.parse_date(value,0,0);\r\n\t\t}\r\n\t\tobj[name]=value;\r\n\t},\r\n\tparse_date:function(value,dh,dm){\r\n\t\tvar t = value.split(\"T\");\r\n\r\n\t\tvar utcMark = false;\r\n\t\tif (t[1]){\r\n\t\t\tdh=t[1].substr(0,2);\r\n\t\t\tdm=t[1].substr(2,2);\r\n\t\t\tutcMark = !!(t[1][6] == \"Z\");\r\n\t\t}\r\n\t\tvar dy = t[0].substr(0,4);\r\n\t\tvar dn = parseInt(t[0].substr(4,2),10)-1;\r\n\t\tvar dd = t[0].substr(6,2);\r\n\r\n\t\tif(scheduler.config.server_utc || utcMark){\r\n\t\t\treturn new Date(Date.UTC(dy,dn,dd,dh,dm)) ;\r\n\t\t}else{\r\n\t\t\treturn new Date(dy,dn,dd,dh,dm);\r\n\t\t}\r\n\t},\r\n\tc_start:\"BEGIN:VCALENDAR\",\r\n\te_start:\"BEGIN:VEVENT\",\r\n\te_end:\"END:VEVENT\",\r\n\tc_end:\"END:VCALENDAR\"\t\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._init_touch_events = function(){\r\n\tvar mobile = this.config.touch &&\r\n\t\t( ((navigator.userAgent.indexOf(\"Mobile\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"iPad\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"Android\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"Touch\")!=-1)) && !window.MSStream) ||\r\n\t\t\t((navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1));\r\n\r\n\tif(mobile){\r\n\t\tthis.xy.scroll_width = 0;\r\n\t\tthis._mobile = true;\r\n\t}\r\n\r\n\tif(this.config.touch){\r\n\r\n\t\tvar touchEventsSupported = true;\r\n\t\ttry {\r\n\t\t\tdocument.createEvent(\"TouchEvent\");\r\n\t\t} catch (e) {\r\n\t\t\ttouchEventsSupported = false;\r\n\t\t}\r\n\r\n\t\tif (touchEventsSupported) {\r\n\t\t\tthis._touch_events([\"touchmove\", \"touchstart\", \"touchend\"], function (ev) {\r\n\t\t\t\tif (ev.touches && ev.touches.length > 1) return null;\r\n\t\t\t\tif (ev.touches[0])\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\ttarget: ev.target,\r\n\t\t\t\t\t\tpageX: ev.touches[0].pageX,\r\n\t\t\t\t\t\tpageY: ev.touches[0].pageY,\r\n\t\t\t\t\t\tclientX: ev.touches[0].clientX,\r\n\t\t\t\t\t\tclientY: ev.touches[0].clientY\r\n\t\t\t\t\t};\r\n\t\t\t\telse\r\n\t\t\t\t\treturn ev;\r\n\t\t\t}, function () {\r\n\t\t\t\treturn false;\r\n\t\t\t});\r\n\t\t} else if (window.PointerEvent || window.navigator.pointerEnabled) {\r\n\t\t\tthis._touch_events([\"pointermove\", \"pointerdown\", \"pointerup\"], function (ev) {\r\n\t\t\t\tif (ev.pointerType == \"mouse\") return null;\r\n\t\t\t\treturn ev;\r\n\t\t\t}, function (ev) {\r\n\t\t\t\treturn (!ev || (ev.pointerType == \"mouse\" ));\r\n\t\t\t});\r\n\t\t} else if (window.navigator.msPointerEnabled) {\r\n\t\t\tthis._touch_events([\"MSPointerMove\", \"MSPointerDown\", \"MSPointerUp\"], function (ev) {\r\n\t\t\t\tif (ev.pointerType == ev.MSPOINTER_TYPE_MOUSE) return null;\r\n\t\t\t\treturn ev;\r\n\t\t\t}, function (ev) {\r\n\t\t\t\treturn (!ev || ev.pointerType == ev.MSPOINTER_TYPE_MOUSE);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n};\r\n\r\nscheduler._touch_events = function(names, accessor, ignore){\r\n\t//webkit on android need to be handled separately\r\n\t//var a_webkit = (navigator.userAgent.indexOf(\"Android\")!=-1) && (navigator.userAgent.indexOf(\"WebKit\")!=-1);\r\n\tvar source, tracker, timer, drag_mode, scroll_mode, action_mode;\r\n\tvar dblclicktime = 0;\r\n\r\n\tfunction attachTouchEvent(element, name, callback){\r\n\t\t//touch gestures must be disabled when ligthbox is opened\r\n\t\tscheduler.event(element, name, function(e){\r\n\t\t\tif(scheduler._is_lightbox_open()){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tif (ignore(e)) return;\r\n\t\t\t\treturn callback(e);\r\n\t\t\t}\r\n\t\t}, { passive: false });\r\n\t}\r\n\r\n\tfunction check_direction_swipe(s_ev, e_ev, step, max_dy){\r\n\t\tif (!s_ev || !e_ev) return false;\r\n\r\n\t\tvar t = s_ev.target;\r\n\t\twhile(t && t != scheduler._obj){\r\n\t\t\tt = t.parentNode;\r\n\t\t}\r\n\t\tif(t != scheduler._obj){\r\n\t\t\t//swipe outside scheduler\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// ignore swipe in horizontal timeline\r\n\t\tif(scheduler.matrix && scheduler.matrix[scheduler.getState().mode]){\r\n\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\tif(timeline.scrollable){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar dy = Math.abs(s_ev.pageY - e_ev.pageY);\r\n\t\tvar dx = Math.abs(s_ev.pageX - e_ev.pageX);\r\n\t\tif (dy < max_dy && dx>step && (!dy || (dx/dy > 3))){\r\n\t\t\tif (s_ev.pageX > e_ev.pageX) {\r\n\t\t\t\tscheduler._click.dhx_cal_next_button();\r\n\t\t\t}else {\r\n\t\t\t\tscheduler._click.dhx_cal_prev_button();\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n\tfunction doMouseMove(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tvar dnd = scheduler.getState().drag_mode,\r\n\t\t\ttimeline = scheduler.matrix ? scheduler.matrix[scheduler._mode] : false;\r\n\r\n\t\tvar original_render = scheduler.render_view_data;\r\n\t\tif(dnd == 'create' && timeline){\r\n\t\t\t//suppress full redraw of timeline on creating event\r\n\t\t\tscheduler.render_view_data = function() {\r\n\t\t\t\tvar id = scheduler.getState().drag_id;\r\n\t\t\t\tvar ev = scheduler.getEvent(id);\r\n\t\t\t\tvar property = timeline.y_property;\r\n\r\n\t\t\t\tvar evs = scheduler.getEvents(ev.start_date, ev.end_date);\r\n\t\t\t\tfor(var i = 0; i < evs.length; i++){\r\n\t\t\t\t\tif(evs[i][property] != ev[property]){\r\n\t\t\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tev._sorder = evs.length - 1;\r\n\t\t\t\tev._count = evs.length;\r\n\r\n\t\t\t\tthis.render_data([ev], scheduler.getState().mode);\r\n\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\tscheduler._on_mouse_move(e);\r\n\r\n\t\tif(dnd == 'create' && timeline){\r\n\t\t\tscheduler.render_view_data = original_render;\r\n\t\t}\r\n\r\n\t\tif (e.preventDefault)\r\n\t\t\te.preventDefault();\r\n\t\te.cancelBubble = true;\r\n\t\treturn false;\r\n\t}\r\n\r\n\t// touchmove\r\n\tattachTouchEvent(document.body, names[0], function(e){\r\n\t\tif (ignore(e)) return;\r\n\r\n\t\tvar acc = accessor(e);\r\n\t\tif(!acc) return;\r\n\t\tif (drag_mode){\r\n\t\t\tdoMouseMove(acc);\r\n\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._update_global_tip();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//if (tracker && a_webkit){\r\n\t\t//\tcheck_direction_swipe(tracker, accessor(e), 0);\r\n\t\t//}\r\n\r\n\t\ttracker = accessor(e);\r\n\t\t//ignore common and scrolling moves\r\n\t\tif (!action_mode) return;\r\n\r\n\t\t//multitouch\r\n\t\tif (!tracker){\r\n\t\t\tscroll_mode = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//target changed - probably in scroll mode\r\n\r\n\t\tif (source.target != tracker.target || (Math.abs(source.pageX - tracker.pageX) > 5) || (Math.abs(source.pageY - tracker.pageY) > 5)){\r\n\t\t\tscroll_mode = true;\r\n\t\t\tclearTimeout(timer);\r\n\t\t}\r\n\r\n\t});\r\n\r\n\t//attachTouchEvent(this._els[\"dhx_cal_data\"][0], \"scroll\", drag_cancel);\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], \"touchcancel\", drag_cancel);\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], \"contextmenu\", function(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tif (action_mode){\r\n\t\t\tif (e && e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t});\r\n\r\n\t// touchstart\r\n\tattachTouchEvent(this._obj, names[1], function(e){\r\n\t\t// block pull-to-refresh\r\n\t\tif(document && document.body){\r\n\t\t\tdocument.body.classList.add(\"dhx_cal_touch_active\");\r\n\t\t}\r\n\r\n\t\tif (ignore(e)) return;\r\n\t\tscheduler._pointerDragId = e.pointerId;\r\n\r\n\t\tvar fake_event;\r\n\t\tdrag_mode = scroll_mode = false;\r\n\t\taction_mode = true;\r\n\t\tfake_event = tracker = accessor(e);\r\n\r\n\t\tif (!fake_event){\r\n\t\t\tscroll_mode = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//dbl click\r\n\t\tvar now = new Date();\r\n\r\n\t\tif (!scroll_mode && !drag_mode && now - dblclicktime < 250){\r\n\t\t\tscheduler._click.dhx_cal_data(fake_event);\r\n\t\t\twindow.setTimeout(function(){\r\n\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t//fake_event.type = \"dblclick\";\r\n\t\t\t\tscheduler._on_dbl_click(fake_event);\r\n\t\t\t}, 50);\r\n\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._block_next_stop = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tdblclicktime = now;\r\n\r\n\t\t//drag\r\n\r\n\t\tif (scroll_mode || drag_mode || !scheduler.config.touch_drag)\r\n\t\t\treturn;\r\n\r\n\t\tvar actTask = scheduler._locate_event(document.activeElement);\r\n\t\tvar fakeTask = scheduler._locate_event(fake_event.target);\r\n\t\tvar sourceTask = source? scheduler._locate_event(source.target) : null;\r\n\r\n\t\tif(actTask && fakeTask && actTask == fakeTask && actTask != sourceTask)\r\n\t\t{\r\n\t\t\tif(e.preventDefault) {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\tscheduler._click.dhx_cal_data(fake_event);\r\n\t\t\tsource = fake_event;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//there is no target\r\n\t\ttimer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tdrag_mode = true;\r\n\t\t\tvar target = source.target;\r\n\t\t\tvar className = scheduler._getClassName(target);\r\n\t\t\tif (target && className.indexOf(\"dhx_body\") != -1)\r\n\t\t\t\ttarget = target.previousSibling;\r\n\r\n\t\t\tscheduler._on_mouse_down(source, target);\r\n\t\t\tif (scheduler._drag_mode && scheduler._drag_mode != \"create\"){\r\n\t\t\t\tscheduler.for_rendered(scheduler._drag_id, function(node, i) {\r\n\t\t\t\t\tnode.style.display='none';\r\n\t\t\t\t\tscheduler._rendered.splice(i, 1);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif (scheduler.config.touch_tip) {\r\n\t\t\t\tscheduler._show_global_tip();\r\n\t\t\t}\r\n\t\t\tscheduler.updateEvent(scheduler._drag_id);\r\n\t\t},scheduler.config.touch_drag);\r\n\r\n\t\tsource = fake_event;\r\n\t});\r\n\tfunction drag_cancel(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tscheduler._hide_global_tip();\r\n\t\tif (drag_mode){\r\n\t\t\tscheduler._on_mouse_up( accessor(e) );\r\n\t\t\tscheduler._temp_touch_block = false;\r\n\t\t}\r\n\t\tscheduler._drag_id = null;\r\n\t\tscheduler._drag_mode=null;\r\n\t\tscheduler._drag_pos=null;\r\n\t\tscheduler._pointerDragId = null;\r\n\t\tclearTimeout(timer);\r\n\t\tdrag_mode = action_mode = false;\r\n\t\tscroll_mode = true;\r\n\t}\r\n\r\n\t// touch end\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], names[2], function(e){\r\n\t\tif(document && document.body){\r\n\t\t\tdocument.body.classList.remove(\"dhx_cal_touch_active\");\r\n\t\t}\r\n\r\n\t\tif (ignore(e)) return;\r\n\r\n\t\tif(scheduler.config.touch_swipe_dates){\r\n\t\t\tif (!drag_mode && check_direction_swipe(source, tracker, 200, 100)) {\r\n\t\t\t\tscheduler._block_next_stop = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (drag_mode) {\r\n\t\t\tscheduler._ignore_next_click = true;\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\t}, 100);\r\n\t\t}\r\n\r\n\t\tdrag_cancel(e);\r\n\t\tif (scheduler._block_next_stop){\r\n\t\t\tscheduler._block_next_stop = false;\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler.event(document.body, names[2], drag_cancel);\r\n};\r\n\r\nscheduler._show_global_tip = function(){\r\n\tscheduler._hide_global_tip();\r\n\r\n\tvar toptip = scheduler._global_tip = document.createElement(\"div\");\r\n\ttoptip.className='dhx_global_tip';\r\n\r\n\tscheduler._update_global_tip(1);\r\n\r\n\tdocument.body.appendChild(toptip);\r\n};\r\nscheduler._update_global_tip = function(init){\r\n\tvar toptip = scheduler._global_tip;\r\n\tif (toptip){\r\n\t\tvar time = \"\";\r\n\t\tif (scheduler._drag_id && !init){\r\n\t\t\tvar ev = scheduler.getEvent(scheduler._drag_id);\r\n\t\t\tif (ev)\r\n\t\t\t\ttime = \"
\" + (ev._timed ? scheduler.templates.event_header(ev.start_date, ev.end_date, ev):scheduler.templates.day_date(ev.start_date, ev.end_date, ev)) + \"
\";\r\n\t\t}\r\n\r\n\t\tif (scheduler._drag_mode == \"create\" || scheduler._drag_mode == \"new-size\")\r\n\t\t\ttoptip.innerHTML = (scheduler.locale.labels.drag_to_create || \"Drag to create\")+time;\r\n\t\telse\r\n\t\t\ttoptip.innerHTML = (scheduler.locale.labels.drag_to_move || \"Drag to move\")+time;\r\n\t}\r\n};\r\nscheduler._hide_global_tip = function(){\r\n\tvar toptip = scheduler._global_tip;\r\n\tif (toptip && toptip.parentNode){\r\n\t\ttoptip.parentNode.removeChild(toptip);\r\n\t\tscheduler._global_tip = 0;\r\n\t}\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._addThemeClass = function(){\r\n\tdocument.documentElement.setAttribute(\"data-scheduler-theme\", scheduler.skin);\r\n};\r\n\r\nscheduler._skin_settings = {\r\n\tfix_tab_position: [1,0],\r\n\tuse_select_menu_space: [1,0],\r\n\twide_form: [1,0],\r\n\r\n\thour_size_px: [44,42],\r\n\tdisplayed_event_color: [\"#ff4a4a\", \"ffc5ab\"],\r\n\tdisplayed_event_text_color: [\"#ffef80\", \"7e2727\"]\r\n};\r\n\r\nscheduler._skin_xy = {\r\n\tlightbox_additional_height: [90,50],\r\n\tnav_height: [59,22],\r\n\tbar_height: [24,20]\r\n};\r\n\r\n// material skin uses a different box sizing model than other skins, and also requires some post-processing.\r\n// In order to render events correctly, we need to know which box sizing model is used\r\n// We can detect it by styles applied, taking into account that styles may be loaded after scheduler is rendered\r\n\r\nscheduler._is_material_skin = function(){\r\n\tif(!scheduler.skin){\r\n\t\treturn checkIfMaterialSkin();\r\n\t}else{\r\n\t\treturn ((scheduler.skin + \"\").indexOf(\"material\") > -1);\r\n\t}\r\n};\r\n\r\nfunction themeNameFromFile(){\r\n\tvar links = document.getElementsByTagName(\"link\");\r\n\tfor (var i = 0; i < links.length; i++) {\r\n\t\tvar res = links[i].href.match(\"dhtmlxscheduler_([a-z]+).css\");\r\n\t\tif (res){\r\n\t\t\treturn res[1];\r\n\t\t}\r\n\t}\r\n}\r\n\r\nscheduler._build_skin_info = function() {\r\n\tmonitorThemeChange();\r\n\tconst styles = getComputedStyle(this.$container);\r\n\tconst themeVar = styles.getPropertyValue(\"--dhx-scheduler-theme\");\r\n\r\n\tlet isCssVarTheme = !!themeVar;\r\n\tlet themeName;\r\n\tlet cssValues = {};\r\n\tlet oldMaterialTheme = false;\r\n\r\n\tif(isCssVarTheme){\r\n\t\tthemeName = themeVar;\r\n\t\tfor(let i in scheduler.xy){\r\n\t\t\tcssValues[i] = styles.getPropertyValue(`--dhx-scheduler-xy-${i}`);\r\n\t\t}\r\n\r\n\t\tcssValues.hour_size_px = styles.getPropertyValue(`--dhx-scheduler-config-hour_size_px`);\r\n\t\tcssValues.wide_form = styles.getPropertyValue(`--dhx-scheduler-config-form_wide`);\r\n\r\n\t}else{\r\n\t\tthemeName = themeNameFromFile();\r\n\t\toldMaterialTheme = scheduler._is_material_skin();\r\n\t}\r\n\r\n\r\n\tscheduler._theme_info = {\r\n\t\ttheme: themeName,\r\n\t\tcssVarTheme: isCssVarTheme,\r\n\t\toldMaterialTheme: oldMaterialTheme,\r\n\t\tvalues: cssValues\r\n\t};\r\n\r\n\tif(scheduler._theme_info.cssVarTheme){\r\n\t\tconst themeVariables = this._theme_info.values;\r\n\t\tfor(let i in scheduler.xy){\r\n\t\t\tif(!isNaN(parseInt(themeVariables[i]))){\r\n\t\t\t\tscheduler.xy[i] = parseInt(themeVariables[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\n\r\nvar calculatedMaterial;\r\nfunction checkIfMaterialSkin(){\r\n\tif(calculatedMaterial === undefined){\r\n\t\tvar probe = document.createElement(\"div\");\r\n\t\tprobe.style.position = \"absolute\";\r\n\t\tprobe.style.left = \"-9999px\";\r\n\t\tprobe.style.top = \"-9999px\";\r\n\t\tprobe.innerHTML = \"
\" +\r\n\t\t\t\"
\" +\r\n\t\t\t\"
\"+\r\n\t\t\"
\";\r\n\t\tdocument.body.appendChild(probe);\r\n\t\tvar styles = window.getComputedStyle(probe.querySelector(\".dhx_cal_scale_placeholder\"));\r\n\t\tvar position = styles.getPropertyValue('position');\r\n\t\tif(position === \"absolute\"){\r\n\t\t\t// page has skins for placeholder element from material skin\r\n\t\t\tcalculatedMaterial = true;\r\n\t\t}else{\r\n\t\t\tcalculatedMaterial = false;\r\n\t\t}\r\n\r\n\t\tsetTimeout(function(){\r\n\t\t\tcalculatedMaterial = null;\r\n\t\t\tif(probe && probe.parentNode){\r\n\t\t\t\tprobe.parentNode.removeChild(probe);\r\n\t\t\t}\r\n\t\t}, 500);\r\n\t}\r\n\treturn calculatedMaterial;\r\n}\r\n\r\nvar cachedBorderBoxValue;\r\nfunction checkIfBorderBoxStyling(){\r\n\tif(scheduler._is_material_skin()){\r\n\t\treturn true;\r\n\t}else{\r\n\t\tif(cachedBorderBoxValue === undefined){\r\n\t\t\tvar probe = document.createElement(\"div\");\r\n\t\t\tprobe.style.position = \"absolute\";\r\n\t\t\tprobe.style.left = \"-9999px\";\r\n\t\t\tprobe.style.top = \"-9999px\";\r\n\t\t\tprobe.innerHTML = \"
\" +\r\n\t\t\t\t\"
\" +\r\n\t\t\t\t\t\"
\"+\r\n\t\t\t\t\"
\"+\r\n\t\t\t\"
\";\r\n\r\n\t\t\tdocument.body.appendChild(probe);\r\n\t\t\tvar styles = window.getComputedStyle(probe.querySelector(\".dhx_body\"));\r\n\t\t\tvar boxSizing = styles.getPropertyValue('box-sizing');\r\n\t\t\tdocument.body.removeChild(probe);\r\n\t\t\tcachedBorderBoxValue = !!(boxSizing === \"border-box\");\r\n\r\n\t\t\tif(!cachedBorderBoxValue){\r\n\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\tcachedBorderBoxValue = undefined;\r\n\t\t\t\t}, 1000);// recalculate in case scheduler initialized before skin is loaded\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\treturn cachedBorderBoxValue;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction refreshAfterLoad(){\r\n\tif(scheduler._is_material_skin() || scheduler._border_box_events()){\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar oldStyling = cachedBorderBoxValue;\r\n\tcachedBorderBoxValue = undefined;\r\n\tcalculatedMaterial = undefined;\r\n\tvar newStyling = checkIfBorderBoxStyling();\r\n\r\n\t// if box styling model changed - means scheduler was rendered before stylesheet was loaded or parsed inline\r\n\t// repaint scheduler in order to apply new styles\r\n\tif(oldStyling !== newStyling && scheduler.$container && scheduler.getState().mode){\r\n\t\tscheduler.setCurrentView();\r\n\t}\r\n}\r\nscheduler.event(window, 'DOMContentLoaded', refreshAfterLoad);\r\nscheduler.event(window, 'load', refreshAfterLoad);\r\n\r\nscheduler._border_box_events = function(){\r\n\treturn checkIfBorderBoxStyling();\r\n};\r\n\r\nscheduler._configure = function(col, data, skin){\r\n\tfor (var key in data)\r\n\t\tif (typeof col[key] == \"undefined\")\r\n\t\t\tcol[key] = data[key][skin];\r\n};\r\n\r\nscheduler.setSkin = function(value){\r\n\tthis.skin = value;\r\n\tscheduler._addThemeClass();\r\n\tif(scheduler.$container){\r\n\t\tthis._skin_init();\r\n\t\tthis.render();\r\n\t}\r\n\t\r\n\t//\r\n};\r\n\r\nfunction flatSkinHourScale(date){\r\n\tvar min = date.getMinutes();\r\n\tmin = min < 10 ? \"0\"+min : min;\r\n\tvar html = \"\"+ date.getHours() +\"\"+\r\n\t\t\" \"+ min +\"\";\r\n\treturn html;\r\n}\r\n\r\nlet monitorIntervalId = null;\r\nfunction monitorThemeChange(){\r\n\tconst container = scheduler.$container;\r\n\t\r\n\tclearInterval(monitorIntervalId);\r\n\tif(container){\r\n\t\tmonitorIntervalId = setInterval(() => {\r\n\t\t\tconst csstheme = getComputedStyle(container).getPropertyValue('--dhx-scheduler-theme');\r\n\t\t\tif(csstheme && csstheme !== scheduler.skin){\r\n\t\t\t\tscheduler.setSkin(csstheme);\r\n\t\t\t}\r\n\r\n\t\t}, 100);\r\n\t}\r\n}\r\nscheduler.attachEvent(\"onDestroy\", function(){\r\n\tclearInterval(monitorIntervalId);\r\n});\r\n\r\nscheduler._skin_init = function(){\r\n\tthis._build_skin_info();\r\n\r\n\tif (!this.skin){\r\n\t\tthis.skin = this._theme_info.theme;\r\n\t}\r\n\tscheduler._addThemeClass();\r\n\tif (scheduler.skin === \"flat\"){\r\n\t\t// scheduler.xy.scale_height = 35;\r\n\t\tscheduler.templates.hour_scale = flatSkinHourScale;\r\n\t}else if (scheduler.templates.hour_scale === flatSkinHourScale){\r\n\t\tscheduler.templates.hour_scale = scheduler.date.date_to_str(scheduler.config.hour_date);\r\n\t}\r\n\r\n\r\n\r\n\t//scheduler._lightbox_template=\"
 
\";\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\r\n\t\tvar date_to_str = scheduler.date.date_to_str(\"%d\");\r\n\t\tif(!scheduler.templates._old_month_day){\r\n\t\t\tscheduler.templates._old_month_day = scheduler.templates.month_day;\r\n\t\t}\r\n\t\tvar old_month_day = scheduler.templates._old_month_day;\r\n\t\tscheduler.templates.month_day = function(date) {\r\n\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\tvar label = date_to_str(date);\r\n\t\t\t\tif (date.getDate() == 1) {\r\n\t\t\t\t\tlabel = scheduler.locale.date.month_full[date.getMonth()] + \" \" + label;\r\n\t\t\t\t}\r\n\t\t\t\tif (+date == +scheduler.date.date_part(this._currentDate())) {\r\n\t\t\t\t\tlabel = scheduler.locale.labels.dhx_cal_today_button + \" \" + label;\r\n\t\t\t\t}\r\n\t\t\t\treturn label;\r\n\t\t\t} else {\r\n\t\t\t\treturn old_month_day.call(this, date);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t// tab classes\r\n\t\tif(scheduler.config.fix_tab_position){\r\n\t\t\tconst tabs = scheduler._els[\"dhx_cal_navline\"][0].querySelectorAll('[data-tab]');\r\n\t\t\ttabs.forEach((tab) => {\r\n\t\t\t\tconst view = tab.getAttribute(\"data-tab\") || tab.getAttribute(\"name\");\r\n\r\n\t\t\t\tswitch (view) {\r\n\t\t\t\t\tcase \"day\":\r\n\t\t\t\t\tcase \"day_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_first\");\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"week\":\r\n\t\t\t\t\tcase \"week_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"month\":\r\n\t\t\t\t\tcase \"month_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_last\");\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_standalone\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\treorderTabs(scheduler._els[\"dhx_cal_navline\"][0]);\r\n\r\n\t\t}\r\n\t}, {once: true});\r\n\r\n\tfunction reorderTabs(container) {\r\n\t\t// segmented tabs should go first\r\n\r\n\t\tif(scheduler.config.header){\r\n\t\t\treturn;\r\n\t\t\t// don't reorder tabs if header is defined via config\r\n\t\t}\r\n\t\tconst tabs = Array.from(container.querySelectorAll('.dhx_cal_tab'));\r\n\t\r\n\t\t// segmented tabs\r\n\t\tconst order = ['day', 'week', 'month'];\r\n\t\r\n\t\tconst specialTabs = order.map(tabName => \r\n\t\t\ttabs.find(tab => tab.getAttribute('data-tab') === tabName)\r\n\t\t).filter(tab => tab !== undefined);\r\n\t\r\n\t\tlet firstTab = tabs.length > 0 ? tabs[0] : null;\r\n\r\n\t\tspecialTabs.reverse().forEach(tab => {\r\n\t\t\tcontainer.insertBefore(tab, firstTab);\r\n\t\t\tfirstTab = tab;\r\n\t\t});\r\n\t}\r\n\r\n\t// scheduler._skin_init = function(){\r\n\t// \tthis._build_skin_info();\r\n\t// \tthis.skin = this._theme_info.theme;\r\n\t// };\r\n};\r\n\r\n\r\n\r\n}","export default function DataProcessorEvents(scheduler, dp){\r\n\tthis.$scheduler = scheduler;\r\n\tthis.$dp = dp;\r\n\tthis._dataProcessorHandlers = [];\r\n\r\n\tthis.attach = function () {\r\n\t\tvar dp = this.$dp;\r\n\t\tvar scheduler = this.$scheduler;\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onEventAdded\", function(id) {\r\n\t\t\tif (!this._loading && this._validId(id))\r\n\t\t\tdp.setUpdated(id,true,\"inserted\");\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onConfirmedBeforeEventDelete\", function(id) {\r\n\t\t\tif (!this._validId(id)) return;\r\n\t\t\tvar z=dp.getState(id);\r\n\r\n\t\t\tif (z==\"inserted\" || this._new_event) { dp.setUpdated(id,false); return true; }\r\n\t\t\tif (z==\"deleted\") return false;\r\n\t\t\tif (z==\"true_deleted\") return true;\r\n\r\n\t\t\tdp.setUpdated(id,true,\"deleted\");\r\n\t\t\treturn false;\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onEventChanged\", function(id) { \r\n\t\t\tif (!this._loading && this._validId(id))\r\n\t\t\tdp.setUpdated(id,true,\"updated\");\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onClearAll\", function() { \r\n\t\t\t// clear dataprocessor state when scheduler is reset\r\n\t\t\tdp._in_progress={};\r\n\t\t\tdp._invalid={};\r\n\t\t\tdp.updatedRows = [];\r\n\t\t\tdp._waitMode = 0;\r\n\t\t}));\r\n\r\n\t\tdp.attachEvent(\"insertCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"updateCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"deleteCallback\", function(upd, id) {\r\n\t\t\tif (scheduler.getEvent(id)){\r\n\t\t\t\tscheduler.setUserData(id, this.action_param, \"true_deleted\");\r\n\t\t\t\tscheduler.deleteEvent(id);\r\n\t\t\t} else if (scheduler._add_rec_marker)\r\n\t\t\t\tscheduler._update_callback(upd, id);\r\n\t\t});\r\n\t};\r\n\r\n\tthis.detach = function () {\r\n\t\tfor (var key in this._dataProcessorHandlers) {\r\n\t\t\tvar handler = this._dataProcessorHandlers[key];\r\n\t\t\tthis.$scheduler.detachEvent(handler);\r\n\t\t}\r\n\t\tthis._dataProcessorHandlers = [];\r\n\t};\r\n}\r\n\r\nexport function extendScheduler(scheduler, dp){\r\n\tscheduler._validId=function(id){\r\n\t\tif(this._is_virtual_event){\r\n\t\t\treturn !this._is_virtual_event(id);\r\n\t\t}\r\n\t\treturn true;\r\n\t};\r\n\tscheduler.setUserData=function(id,name,value){\r\n\t\tif (id){\r\n\t\t\tvar ev = this.getEvent(id);\r\n\t\t\tif(ev) ev[name]=value;\r\n\t\t}else{\r\n\t\t\tthis._userdata[name]=value;\r\n\t\t}\r\n\t};\r\n\tscheduler.getUserData=function(id,name){\r\n\t\tif (id){\r\n\t\t\tvar ev = this.getEvent(id);\r\n\t\t\tif(ev)\r\n\t\t\t\treturn ev[name];\r\n\t\t\telse\r\n\t\t\t\treturn null;\r\n\t\t}else{\r\n\t\t\treturn this._userdata[name];\r\n\t\t}\r\n\t};\r\n\tscheduler._set_event_text_style=function(id,style){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\t\tthis.for_rendered(id,function(r){\r\n\t\t\tr.style.cssText+=\";\"+style;\r\n\t\t});\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tev[\"_text_style\"]=style;\r\n\t\tthis.event_updated(ev);\r\n\t};\r\n\tscheduler._update_callback = function(upd,id){\r\n\t\tvar data = scheduler._xmlNodeToJSON(upd.firstChild);\r\n\t\t//fix for updates of recurring events\r\n\t\tif (data.rec_type == \"none\") data.rec_pattern = \"none\";\r\n\t\tdata.text = data.text||data._tagvalue;\r\n\t\tdata.start_date = scheduler._helpers.parseDate(data.start_date);\r\n\t\tdata.end_date = scheduler._helpers.parseDate(data.end_date);\r\n\t\tscheduler.addEvent(data);\r\n\t\tif (scheduler._add_rec_marker)\r\n\t\t\tscheduler.setCurrentView();\r\n\t};\r\n\tscheduler._dp_change_event_id = function(id, new_id){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\t\tscheduler.changeEventId(id, new_id);\r\n\t};\r\n\tscheduler._dp_hook_delete = function(id, new_id){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\r\n\t\tif(new_id && id != new_id){\r\n\t\t\tif(this.getUserData(id, dp.action_param) == \"true_deleted\")\r\n\t\t\t\tthis.setUserData(id, dp.action_param, \"updated\");\r\n\r\n\t\t\tthis.changeEventId(id, new_id);\r\n\t\t}\r\n\t\treturn this.deleteEvent(new_id, true);\r\n\t};\r\n\r\n\tscheduler.setDp = function() {\r\n\t\tthis._dp = dp;\r\n\t};\r\n\tscheduler.setDp();\r\n}","import DataProcessorEvents from \"./dataprocessor_hooks\";\r\nimport { extendScheduler } from \"./dataprocessor_hooks\";\r\nimport eventable from \"../../utils/eventable\";\r\nimport global from \"../../global\";\r\n\r\n/**\r\n *\t@desc: constructor, data processor object\r\n *\t@param: serverProcessorURL - url used for update\r\n *\t@type: public\r\n */\r\nexport function DataProcessor(serverProcessorURL){\r\n\tthis.serverProcessor = serverProcessorURL;\r\n\tthis.action_param = \"!nativeeditor_status\";\r\n\r\n\tthis.object = null;\r\n\tthis.updatedRows = []; // ids of updated rows\r\n\r\n\tthis.autoUpdate = true;\r\n\tthis.updateMode = \"cell\";\r\n\tthis._tMode = \"GET\";\r\n\tthis._headers = null;\r\n\tthis._payload = null;\r\n\tthis.post_delim = \"_\";\r\n\r\n\tthis._waitMode = 0;\r\n\tthis._in_progress = {};\r\n\tthis._invalid = {};\r\n\tthis.messages = [];\r\n\r\n\tthis.styles = {\r\n\t\tupdated: \"font-weight:bold;\",\r\n\t\tinserted: \"font-weight:bold;\",\r\n\t\tdeleted: \"text-decoration : line-through;\",\r\n\t\tinvalid: \"background-color:FFE0E0;\",\r\n\t\tinvalid_cell: \"border-bottom:2px solid red;\",\r\n\t\terror: \"color:red;\",\r\n\t\tclear: \"font-weight:normal;text-decoration:none;\"\r\n\t};\r\n\tthis.enableUTFencoding(true);\r\n\teventable(this); // TODO: need to update\r\n\r\n\treturn this;\r\n}\r\nDataProcessor.prototype = {\r\n\tsetTransactionMode: function (mode, total) {\r\n\t\tif (typeof mode == \"object\") {\r\n\t\t\tthis._tMode = mode.mode || this._tMode;\r\n\r\n\t\t\tif (mode.headers !== undefined) {\r\n\t\t\t\tthis._headers = mode.headers;\r\n\t\t\t}\r\n\r\n\t\t\tif (mode.payload !== undefined) {\r\n\t\t\t\tthis._payload = mode.payload;\r\n\t\t\t}\r\n\t\t\tthis._tSend = !!total;\r\n\t\t} else {\r\n\t\t\tthis._tMode = mode;\r\n\t\t\tthis._tSend = total;\r\n\t\t}\r\n\r\n\t\tif (this._tMode == \"REST\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t}\r\n\r\n\t\tif (this._tMode === \"JSON\" || this._tMode === \"REST-JSON\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t\tthis._serializeAsJson = true;\r\n\t\t\tthis._headers = this._headers || {};\r\n\t\t\tthis._headers[\"Content-Type\"] = \"application/json\";\r\n\t\t}else{\r\n\t\t\tif(this._headers && !this._headers[\"Content-Type\"]){\r\n\t\t\t\tthis._headers[\"Content-Type\"] = \"application/x-www-form-urlencoded\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (this._tMode === \"CUSTOM\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t\tthis._router = mode.router;\r\n\t\t}\r\n\t},\r\n\tescape: function (data) {\r\n\t\tif (this._utf)\r\n\t\t\treturn encodeURIComponent(data);\r\n\t\telse\r\n\t\t\treturn escape(data);\r\n\t},\r\n\t/**\r\n\t *\t@desc: allows to set escaping mode\r\n\t *\t@param: true - utf based escaping, simple - use current page encoding\r\n\t *\t@type: public\r\n\t */\r\n\tenableUTFencoding: function (mode) {\r\n\t\tthis._utf = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: allows to define, which column may trigger update\r\n\t *\t@param: val - array or list of true/false values\r\n\t *\t@type: public\r\n\t */\r\n\tsetDataColumns: function (val) {\r\n\t\tthis._columns = (typeof val == \"string\") ? val.split(\",\") : val;\r\n\t},\r\n\t/**\r\n\t *\t@desc: get state of updating\r\n\t *\t@returns: true - all in sync with server, false - some items not updated yet.\r\n\t *\t@type: public\r\n\t */\r\n\tgetSyncState: function () {\r\n\t\treturn !this.updatedRows.length;\r\n\t},\r\n\t/**\r\n\t *\t@desc: enable/disable named field for data syncing, will use column ids for grid\r\n\t *\t@param: mode - true/false\r\n\t *\t@type: public\r\n\t */\r\n\tenableDataNames: function (mode) {\r\n\t\tthis._endnm = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: enable/disable mode , when only changed fields and row id send to the server side, instead of all fields in default mode\r\n\t *\t@param: mode - true/false\r\n\t *\t@type: public\r\n\t */\r\n\tenablePartialDataSend: function (mode) {\r\n\t\tthis._changed = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: set if rows should be send to server automatically\r\n\t *\t@param: mode - \"row\" - based on row selection changed, \"cell\" - based on cell editing finished, \"off\" - manual data sending\r\n\t *\t@type: public\r\n\t */\r\n\tsetUpdateMode: function (mode, dnd) {\r\n\t\tthis.autoUpdate = (mode == \"cell\");\r\n\t\tthis.updateMode = mode;\r\n\t\tthis.dnd = dnd;\r\n\t},\r\n\tignore: function (code, master) {\r\n\t\tthis._silent_mode = true;\r\n\t\tcode.call(master || window);\r\n\t\tthis._silent_mode = false;\r\n\t},\r\n\t/**\r\n\t *\t@desc: mark row as updated/normal. check mandatory fields,initiate autoupdate (if turned on)\r\n\t *\t@param: rowId - id of row to set update-status for\r\n\t *\t@param: state - true for \"updated\", false for \"not updated\"\r\n\t *\t@param: mode - update mode name\r\n\t *\t@type: public\r\n\t */\r\n\tsetUpdated: function (rowId, state, mode) {\r\n\t\tif (this._silent_mode) return;\r\n\t\tvar ind = this.findRow(rowId);\r\n\r\n\t\tmode = mode || \"updated\";\r\n\t\tvar existing = this.$scheduler.getUserData(rowId, this.action_param);\r\n\t\tif (existing && mode == \"updated\") mode = existing;\r\n\t\tif (state) {\r\n\t\t\tthis.set_invalid(rowId, false); //clear previous error flag\r\n\t\t\tthis.updatedRows[ind] = rowId;\r\n\t\t\tthis.$scheduler.setUserData(rowId, this.action_param, mode);\r\n\t\t\tif (this._in_progress[rowId])\r\n\t\t\t\tthis._in_progress[rowId] = \"wait\";\r\n\t\t} else {\r\n\t\t\tif (!this.is_invalid(rowId)) {\r\n\t\t\t\tthis.updatedRows.splice(ind, 1);\r\n\t\t\t\tthis.$scheduler.setUserData(rowId, this.action_param, \"\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.markRow(rowId, state, mode);\r\n\t\tif (state && this.autoUpdate) this.sendData(rowId);\r\n\t},\r\n\r\n\tmarkRow: function (id, state, mode) {\r\n\t\tvar str = \"\";\r\n\t\tvar invalid = this.is_invalid(id);\r\n\t\tif (invalid) {\r\n\t\t\tstr = this.styles[invalid];\r\n\t\t\tstate = true;\r\n\t\t}\r\n\t\tif (this.callEvent(\"onRowMark\", [id, state, mode, invalid])) {\r\n\t\t\t//default logic\r\n\t\t\tstr = this.styles[state ? mode : \"clear\"] + str;\r\n\r\n\t\t\tthis.$scheduler[this._methods[0]](id, str);\r\n\r\n\t\t\tif (invalid && invalid.details) {\r\n\t\t\t\tstr += this.styles[invalid + \"_cell\"];\r\n\t\t\t\tfor (var i = 0; i < invalid.details.length; i++)\r\n\t\t\t\t\tif (invalid.details[i])\r\n\t\t\t\t\t\tthis.$scheduler[this._methods[1]](id, i, str);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tgetActionByState: function(state) {\r\n\t\tif (state === \"inserted\") {\r\n\t\t\treturn \"create\";\r\n\t\t}\r\n\t\tif (state === \"updated\") {\r\n\t\t\treturn \"update\";\r\n\t\t}\r\n\t\tif (state === \"deleted\") {\r\n\t\t\treturn \"delete\";\r\n\t\t}\r\n\t\treturn \"update\";\r\n\t},\r\n\r\n\tgetState: function (id) {\r\n\t\treturn this.$scheduler.getUserData(id, this.action_param);\r\n\t},\r\n\tis_invalid: function (id) {\r\n\t\treturn this._invalid[id];\r\n\t},\r\n\tset_invalid: function (id, mode, details) {\r\n\t\tif (details) mode = {\r\n\t\t\tvalue: mode, details: details, toString: function () {\r\n\t\t\t\treturn this.value.toString();\r\n\t\t\t}\r\n\t\t};\r\n\t\tthis._invalid[id] = mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: check mandatory fields and varify values of cells, initiate update (if specified)\r\n\t *\t@param: rowId - id of row to set update-status for\r\n\t *\t@type: public\r\n\t */\r\n\tcheckBeforeUpdate: function (rowId) {\r\n\t\treturn true;\r\n\t},\r\n\t/**\r\n\t *\t@desc: send row(s) values to server\r\n\t *\t@param: rowId - id of row which data to send. If not specified, then all \"updated\" rows will be send\r\n\t *\t@type: public\r\n\t */\r\n\tsendData: function (rowId) {\r\n\t\tif (this.$scheduler.editStop) this.$scheduler.editStop();\r\n\r\n\t\tif (typeof rowId == \"undefined\" || this._tSend) return this.sendAllData();\r\n\t\tif (this._in_progress[rowId]) return false;\r\n\r\n\t\tthis.messages = [];\r\n\t\tif (!this.checkBeforeUpdate(rowId) && this.callEvent(\"onValidationError\", [rowId, this.messages])) return false;\r\n\t\tthis._beforeSendData(this._getRowData(rowId), rowId);\r\n\t},\r\n\t_beforeSendData: function (data, rowId) {\r\n\t\tif (!this.callEvent(\"onBeforeUpdate\", [rowId, this.getState(rowId), data])) return false;\r\n\t\tthis._sendData(data, rowId);\r\n\t},\r\n\tserialize: function (data, id) {\r\n\t\tif (this._serializeAsJson) {\r\n\t\t\treturn this._serializeAsJSON(data);\r\n\t\t}\r\n\r\n\t\tif (typeof data == \"string\")\r\n\t\t\treturn data;\r\n\t\tif (typeof id != \"undefined\")\r\n\t\t\treturn this.serialize_one(data, \"\");\r\n\t\telse {\r\n\t\t\tvar stack = [];\r\n\t\t\tvar keys = [];\r\n\t\t\tfor (var key in data)\r\n\t\t\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\t\t\tstack.push(this.serialize_one(data[key], key + this.post_delim));\r\n\t\t\t\t\tkeys.push(key);\r\n\t\t\t\t}\r\n\t\t\tstack.push(\"ids=\" + this.escape(keys.join(\",\")));\r\n\t\t\tif (this.$scheduler.security_key)\r\n\t\t\t\tstack.push(\"dhx_security=\" + (this.$scheduler.security_key));\r\n\t\t\treturn stack.join(\"&\");\r\n\t\t}\r\n\t},\r\n\tserialize_one: function (data, pref) {\r\n\t\tif (typeof data == \"string\")\r\n\t\t\treturn data;\r\n\t\tvar stack = [];\r\n\t\tvar serialized = \"\";\r\n\t\tfor (var key in data)\r\n\t\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\t\tif ((key == \"id\" || key == this.action_param) && this._tMode == \"REST\") continue;\r\n\t\t\t\tif (typeof data[key] === \"string\" || typeof data[key] === \"number\") {\r\n\t\t\t\t\tserialized = data[key];\r\n\t\t\t\t} else {\r\n\t\t\t\t\tserialized = JSON.stringify(data[key]);\r\n\t\t\t\t}\r\n\t\t\t\tstack.push(this.escape((pref || \"\") + key) + \"=\" + this.escape(serialized));\r\n\t\t\t}\r\n\t\treturn stack.join(\"&\");\r\n\t},\r\n\t_applyPayload: function (url) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tif (this._payload)\r\n\t\t\tfor (var key in this._payload)\r\n\t\t\t\turl = url + ajax.urlSeparator(url) + this.escape(key) + \"=\" + this.escape(this._payload[key]);\r\n\t\treturn url;\r\n\t},\r\n\t_sendData: function (dataToSend, rowId) {\r\n\t\tif (!dataToSend) {\r\n\t\t\treturn; // nothing to send\r\n\t\t}\r\n\t\tif (!this.callEvent(\"onBeforeDataSending\", rowId ? [rowId, this.getState(rowId), dataToSend] : [null, null, dataToSend])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (rowId) {\r\n\t\t\tthis._in_progress[rowId] = (new Date()).valueOf();\r\n\t\t}\r\n\r\n\t\tvar self = this;\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\r\n\t\tif (this._tMode === \"CUSTOM\") {\r\n\t\t\tvar state = this.getState(rowId);\r\n\t\t\tvar action = this.getActionByState(state);\r\n\t\t\tvar _onResolvedCreateUpdate = function (tag) {\r\n\t\t\t\tvar resultState = state;\r\n\t\t\t\tif(tag && tag.responseText && tag.setRequestHeader){\r\n\t\t\t\t\tif(tag.status !== 200){\r\n\t\t\t\t\t\tresultState = \"error\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\ttag = JSON.parse(tag.responseText);\r\n\t\t\t\t\t} catch (e){}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tresultState = resultState || \"updated\";\r\n\t\t\t\tvar sid = rowId;\r\n\t\t\t\tvar tid = rowId;\r\n\r\n\t\t\t\tif (tag) {\r\n\t\t\t\t\tresultState = tag.action || resultState;\r\n\t\t\t\t\tsid = tag.sid || sid;\r\n\t\t\t\t\ttid = tag.id || tag.tid || tid;\r\n\t\t\t\t}\r\n\t\t\t\tself.afterUpdateCallback(sid, tid, resultState, tag);\r\n\t\t\t};\r\n\r\n\t\t\tconst routerMode = \"event\";\r\n\t\t\tvar actionPromise;\r\n\t\t\tif (this._router instanceof Function) {\r\n\t\t\t\tactionPromise = this._router(routerMode, action, dataToSend, rowId);\r\n\t\t\t} else {\r\n\t\t\t\tswitch (state) {\r\n\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].create(dataToSend);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].delete(rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].update(dataToSend, rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(actionPromise){\r\n\t\t\t\t// neither promise nor {tid: newId} response object\r\n\t\t\t\tif(!actionPromise.then &&\r\n\t\t\t\t\t(actionPromise.id === undefined && actionPromise.tid === undefined && actionPromise.action === undefined)){\r\n\t\t\t\t\tthrow new Error(\"Incorrect router return value. A Promise or a response object is expected\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(actionPromise.then){\r\n\t\t\t\t\tactionPromise.then(_onResolvedCreateUpdate).catch(function(error) {\r\n\t\t\t\t\t\tif(error && error.action){\r\n\t\t\t\t\t\t\t_onResolvedCreateUpdate(error);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t_onResolvedCreateUpdate({ action: \"error\", value: error});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// custom method may return a response object in case of sync action\r\n\t\t\t\t\t_onResolvedCreateUpdate(actionPromise);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t_onResolvedCreateUpdate(null);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar queryParams = {\r\n\t\t\tcallback: function(xml) {\r\n\t\t\t\tvar ids = [];\r\n\r\n\t\t\t\tif (rowId) {\r\n\t\t\t\t\tids.push(rowId);\r\n\t\t\t\t} else if (dataToSend) {\r\n\t\t\t\t\tfor (var key in dataToSend) {\r\n\t\t\t\t\t\tids.push(key);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.afterUpdate(self, xml, ids);\r\n\t\t\t},\r\n\t\t\theaders: self._headers\r\n\t\t};\r\n\r\n\t\tvar urlParams = this.serverProcessor + (this._user ? (ajax.urlSeparator(this.serverProcessor) + [\"dhx_user=\" + this._user, \"dhx_version=\" + this.$scheduler.getUserData(0, \"version\")].join(\"&\")) : \"\");\r\n\t\tvar url = this._applyPayload(urlParams);\r\n\t\tvar data;\r\n\r\n\t\tswitch (this._tMode) {\r\n\t\t\tcase \"GET\":\r\n\t\t\t\tdata = this._cleanupArgumentsBeforeSend(dataToSend);\r\n\t\t\t\tqueryParams.url = url + ajax.urlSeparator(url) + this.serialize(data, rowId);\r\n\t\t\t\tqueryParams.method = \"GET\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"POST\":\r\n\t\t\t\tdata = this._cleanupArgumentsBeforeSend(dataToSend);\r\n\t\t\t\tqueryParams.url = url;\r\n\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\tqueryParams.data = this.serialize(data, rowId);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"JSON\":\r\n\t\t\t\tdata = {};\r\n\t\t\t\tvar preprocessedData = this._cleanupItemBeforeSend(dataToSend);\r\n\t\t\t\tfor (var key in preprocessedData) {\r\n\t\t\t\t\tif (key === this.action_param || key === \"id\" || key === \"gr_id\") {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdata[key] = preprocessedData[key];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tqueryParams.url = url;\r\n\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\tqueryParams.data = JSON.stringify({\r\n\t\t\t\t\tid: rowId,\r\n\t\t\t\t\taction: dataToSend[this.action_param],\r\n\t\t\t\t\tdata: data\r\n\t\t\t\t});\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"REST\":\r\n\t\t\tcase \"REST-JSON\":\r\n\t\t\t\turl = urlParams.replace(/(&|\\?)editing=true/, \"\");\r\n\t\t\t\tdata = \"\";\r\n\r\n\t\t\t\tswitch (this.getState(rowId)) {\r\n\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\t\t\tqueryParams.data = this.serialize(dataToSend, rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\tqueryParams.method = \"DELETE\";\r\n\t\t\t\t\t\turl = url + (url.slice(-1) === \"/\" ? \"\" : \"/\") + rowId;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tqueryParams.method = \"PUT\";\r\n\t\t\t\t\t\tqueryParams.data = this.serialize(dataToSend, rowId);\r\n\t\t\t\t\t\turl = url + (url.slice(-1) === \"/\" ? \"\" : \"/\") + rowId;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tqueryParams.url = this._applyPayload(url);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tthis._waitMode++;\r\n\t\treturn ajax.query(queryParams);\r\n\t},\r\n\tsendAllData: function () {\r\n\t\tif (!this.updatedRows.length || this.updateMode === \"off\") { // FIXME: need to leave checking 'this.updateMode === \"off\"'?\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.messages = [];\r\n\t\tvar valid = true;\r\n\r\n\t\tthis._forEachUpdatedRow(function(rowId) {\r\n\t\t\tvalid = valid && this.checkBeforeUpdate(rowId);\r\n\t\t});\r\n\r\n\t\tif (!valid && !this.callEvent(\"onValidationError\", [\"\", this.messages])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (this._tSend) {\r\n\t\t\tthis._sendData(this._getAllData());\r\n\t\t} else {\r\n\t\t\tthis._forEachUpdatedRow(function(rowId) {\r\n\t\t\t\tif (!this._in_progress[rowId]) {\r\n\t\t\t\t\tif (this.is_invalid(rowId)) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis._beforeSendData(this._getRowData(rowId), rowId);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\r\n\t_getAllData: function (rowId) {\r\n\t\tvar out = {};\r\n\t\tvar has_one = false;\r\n\t\tthis._forEachUpdatedRow(function(id) {\r\n\t\t\tif (this._in_progress[id] || this.is_invalid(id)){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar row = this._getRowData(id);\r\n\t\t\tif (!this.callEvent(\"onBeforeUpdate\", [id, this.getState(id), row])) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tout[id] = row;\r\n\t\t\thas_one = true;\r\n\t\t\tthis._in_progress[id] = (new Date()).valueOf();\r\n\t\t});\r\n\t\treturn has_one ? out : null;\r\n\t},\r\n\r\n\tfindRow: function (pattern) {\r\n\t\tvar i = 0;\r\n\t\tfor (i = 0; i < this.updatedRows.length; i++)\r\n\t\t\tif (pattern == this.updatedRows[i]) break;\r\n\t\treturn i;\r\n\t},\r\n\r\n\t/**\r\n\t *\t@desc: define custom actions\r\n\t *\t@param: name - name of action, same as value of action attribute\r\n\t *\t@param: handler - custom function, which receives a XMl response content for action\r\n\t *\t@type: private\r\n\t */\r\n\tdefineAction: function (name, handler) {\r\n\t\tif (!this._uActions) this._uActions = {};\r\n\t\tthis._uActions[name] = handler;\r\n\t},\r\n\r\n\t/**\r\n\t *\t @desc: used in combination with setOnBeforeUpdateHandler to create custom client-server transport system\r\n\t *\t @param: sid - id of item before update\r\n\t *\t @param: tid - id of item after up0ate\r\n\t *\t @param: action - action name\r\n\t *\t @type: public\r\n\t *\t @topic: 0\r\n\t */\r\n\tafterUpdateCallback: function (sid, tid, action, btag) {\r\n\t\tif(!this.$scheduler){\r\n\t\t\t// destructor has been called before the callback\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar marker = sid;\r\n\t\tvar correct = (action !== \"error\" && action !== \"invalid\");\r\n\t\tif (!correct) {\r\n\t\t\tthis.set_invalid(sid, action);\r\n\t\t}\r\n\t\tif ((this._uActions) && (this._uActions[action]) && (!this._uActions[action](btag))) {\r\n\t\t\treturn (delete this._in_progress[marker]);\r\n\t\t}\r\n\r\n\t\tif (this._in_progress[marker] !== \"wait\") {\r\n\t\t\tthis.setUpdated(sid, false);\r\n\t\t}\r\n\r\n\t\tvar originalSid = sid;\r\n\r\n\t\tswitch (action) {\r\n\t\t\tcase \"inserted\":\r\n\t\t\tcase \"insert\":\r\n\t\t\t\tif (tid != sid) {\r\n\t\t\t\t\tthis.setUpdated(sid, false);\r\n\t\t\t\t\tthis.$scheduler[this._methods[2]](sid, tid);\r\n\t\t\t\t\tsid = tid;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"delete\":\r\n\t\t\tcase \"deleted\":\r\n\t\t\t\tthis.$scheduler.setUserData(sid, this.action_param, \"true_deleted\");\r\n\t\t\t\tthis.$scheduler[this._methods[3]](sid, tid);\r\n\t\t\t\tdelete this._in_progress[marker];\r\n\t\t\t\treturn this.callEvent(\"onAfterUpdate\", [sid, action, tid, btag]);\r\n\t\t}\r\n\r\n\t\tif (this._in_progress[marker] !== \"wait\") {\r\n\t\t\tif (correct) {\r\n\t\t\t\tthis.$scheduler.setUserData(sid, this.action_param, \"\");\r\n\t\t\t}\r\n\t\t\tdelete this._in_progress[marker];\r\n\t\t} else {\r\n\t\t\tdelete this._in_progress[marker];\r\n\t\t\tthis.setUpdated(tid, true, this.$scheduler.getUserData(sid, this.action_param));\r\n\t\t}\r\n\r\n\t\tthis.callEvent(\"onAfterUpdate\", [originalSid, action, tid, btag]);\r\n\t},\r\n\r\n\t_errorResponse: function (xml, id){\r\n\t\tif(this.$scheduler && this.$scheduler.callEvent){\r\n\t\t\tthis.$scheduler.callEvent(\"onSaveError\", [id, xml.xmlDoc]);\r\n\t\t}\r\n\t\treturn this.cleanUpdate(id);\r\n\t},\r\n\r\n\t_setDefaultTransactionMode: function () {\r\n\t\tif (this.serverProcessor) {\r\n\t\t\tthis.setTransactionMode(\"POST\", true);\r\n\t\t\tthis.serverProcessor += (this.serverProcessor.indexOf(\"?\") !== -1 ? \"&\" : \"?\") + \"editing=true\";\r\n\t\t\tthis._serverProcessor = this.serverProcessor;\r\n\t\t}\r\n\t},\r\n\t\r\n\t/**\r\n\t *\t@desc: response from server\r\n\t *\t@param: xml - XMLLoader object with response XML\r\n\t *\t@type: private\r\n\t */\r\n\tafterUpdate: function (that, xml, id) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\r\n\t\tif (xml.xmlDoc.status !== 200){\r\n\t\t\tthis._errorResponse(xml, id);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// try to use json first\r\n\t\tvar tag;\r\n\t\ttry {\r\n\t\t\ttag = JSON.parse(xml.xmlDoc.responseText);\r\n\t\t} catch (e) {\r\n\t\t\t// empty response also can be processed by json handler\r\n\t\t\tif (!xml.xmlDoc.responseText.length) {\r\n\t\t\t\ttag = {};\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (tag) {\r\n\t\t\tvar action = tag.action || this.getState(id) || \"updated\";\r\n\t\t\tvar sid = tag.sid || id[0];\r\n\t\t\tvar tid = tag.tid || id[0];\r\n\t\t\tthat.afterUpdateCallback(sid, tid, action, tag);\r\n\t\t\tthat.finalizeUpdate();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// xml response\r\n\t\tvar top = ajax.xmltop(\"data\", xml.xmlDoc); // fix incorrect content type in IE\r\n\t\tif (!top) {\r\n\t\t\treturn this._errorResponse(xml, id);\r\n\t\t}\r\n\t\tvar atag = ajax.xpath(\"//data/action\", top);\r\n\t\tif (!atag.length) {\r\n\t\t\treturn this._errorResponse(xml, id);\r\n\t\t}\r\n\r\n\t\tfor (var i = 0; i < atag.length; i++) {\r\n\t\t\tvar btag = atag[i];\r\n\t\t\tvar action = btag.getAttribute(\"type\");\r\n\t\t\tvar sid = btag.getAttribute(\"sid\");\r\n\t\t\tvar tid = btag.getAttribute(\"tid\");\r\n\r\n\t\t\tthat.afterUpdateCallback(sid, tid, action, btag);\r\n\t\t}\r\n\t\tthat.finalizeUpdate();\r\n\t},\r\n\tcleanUpdate: function (id) {\r\n\t\tif (id)\r\n\t\t\tfor (var i = 0; i < id.length; i++)\r\n\t\t\t\tdelete this._in_progress[id[i]];\r\n\t},\r\n\tfinalizeUpdate: function () {\r\n\t\tif (this._waitMode) this._waitMode--;\r\n\r\n\t\tthis.callEvent(\"onAfterUpdateFinish\", []);\r\n\t\tif (!this.updatedRows.length)\r\n\t\t\tthis.callEvent(\"onFullSync\", []);\r\n\t},\r\n\r\n\t/**\r\n\t *\t@desc: initializes data-processor\r\n\t *\t@param: scheduler - dhtmlxScheduler object to attach this data-processor to\r\n\t *\t@type: public\r\n\t */\r\n\tinit: function (scheduler) {\r\n\t\tif (this._initialized) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.$scheduler = scheduler;\r\n\t\tif (this.$scheduler._dp_init) {\r\n\t\t\tthis.$scheduler._dp_init(this);\r\n\t\t}\r\n\r\n\t\tthis._setDefaultTransactionMode();\r\n\r\n\t\tthis._methods=this._methods||[\"_set_event_text_style\",\"\",\"_dp_change_event_id\",\"_dp_hook_delete\"];\r\n\t\textendScheduler(this.$scheduler, this);\r\n\t\tvar dataProcessorEvents = new DataProcessorEvents(this.$scheduler, this);\r\n\t\tdataProcessorEvents.attach();\r\n\t\tthis.attachEvent(\"onDestroy\", function() {\r\n\t\t\tdelete this._getRowData;\r\n\r\n\t\t\tdelete this.$scheduler._dp;\r\n\t\t\tdelete this.$scheduler._dataprocessor;\r\n\t\t\tdelete this.$scheduler._set_event_text_style;\r\n\t\t\tdelete this.$scheduler._dp_change_event_id;\r\n\t\t\tdelete this.$scheduler._dp_hook_delete;\r\n\t\t\tdelete this.$scheduler;\r\n\t\t\tdataProcessorEvents.detach();\r\n\t\t});\r\n\t\tthis.$scheduler.callEvent(\"onDataProcessorReady\", [this]);\r\n\t\tthis._initialized = true;\r\n\r\n\t\tscheduler._dataprocessor=this;\r\n\t},\r\n\r\n\tsetOnAfterUpdate: function (ev) {\r\n\t\tthis.attachEvent(\"onAfterUpdate\", ev);\r\n\t},\r\n\tsetOnBeforeUpdateHandler: function (func) {\r\n\t\tthis.attachEvent(\"onBeforeDataSending\", func);\r\n\t},\r\n\r\n\t/* starts autoupdate mode\r\n\t\t@param interval time interval for sending update requests\r\n\t*/\r\n\tsetAutoUpdate: function (interval, user) {\r\n\t\tinterval = interval || 2000;\r\n\r\n\t\tthis._user = user || (new Date()).valueOf();\r\n\t\tthis._need_update = false;\r\n\t\t//this._loader = null;\r\n\t\tthis._update_busy = false;\r\n\r\n\t\tthis.attachEvent(\"onAfterUpdate\", function (sid, action, tid, xml_node) {\r\n\t\t\tthis.afterAutoUpdate(sid, action, tid, xml_node);\r\n\t\t});\r\n\t\tthis.attachEvent(\"onFullSync\", function () {\r\n\t\t\tthis.fullSync();\r\n\t\t});\r\n\r\n\t\tvar self = this;\r\n\t\tlet intervalId = global.setInterval(function () {\r\n\t\t\tself.loadUpdate();\r\n\t\t}, interval);\r\n\t\tthis.attachEvent(\"onDestroy\", function(){\r\n\t\t\tclearInterval(intervalId);\r\n\t\t});\r\n\t},\r\n\r\n\t/* process updating request answer\r\n\t\tif status == collision version is deprecated\r\n\t\tset flag for autoupdating immediately\r\n\t*/\r\n\tafterAutoUpdate: function (sid, action, tid, xml_node) {\r\n\t\tif (action == 'collision') {\r\n\t\t\tthis._need_update = true;\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t},\r\n\r\n\t/* callback function for onFillSync event\r\n\t\tcall update function if it's need\r\n\t*/\r\n\tfullSync: function () {\r\n\t\tif (this._need_update) {\r\n\t\t\tthis._need_update = false;\r\n\t\t\tthis.loadUpdate();\r\n\t\t}\r\n\t\treturn true;\r\n\t},\r\n\r\n\t/* sends query to the server and call callback function\r\n\t*/\r\n\tgetUpdates: function (url, callback) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tif (this._update_busy)\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t\tthis._update_busy = true;\r\n\r\n\t\tajax.get(url, callback);\r\n\t},\r\n\r\n\t/* returns xml node value\r\n\t\t@param node\r\n\t\t\txml node\r\n\t*/\r\n\t_getXmlNodeValue: function(node) {\r\n\t\tif (node.firstChild) {\r\n\t\t\treturn node.firstChild.nodeValue;\r\n\t\t}\r\n\t\treturn \"\";\r\n\t},\r\n\r\n\t/* loads updates and processes them\r\n\t*/\r\n\tloadUpdate: function () {\r\n\t\tvar self = this;\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tvar version = this.$scheduler.getUserData(0, \"version\");\r\n\t\tvar url = this.serverProcessor + ajax.urlSeparator(this.serverProcessor) + [\"dhx_user=\" + this._user, \"dhx_version=\" + version].join(\"&\");\r\n\t\turl = url.replace(\"editing=true&\", \"\");\r\n\t\tthis.getUpdates(url, function (xml) {\r\n\t\t\tvar vers = ajax.xpath(\"//userdata\", xml);\r\n\t\t\tself.$scheduler.setUserData(0, \"version\", self._getXmlNodeValue(vers[0]));\r\n\r\n\t\t\tvar updates = ajax.xpath(\"//update\", xml);\r\n\t\t\tif (updates.length) {\r\n\t\t\t\tself._silent_mode = true;\r\n\r\n\t\t\t\tfor (var i = 0; i < updates.length; i++) {\r\n\t\t\t\t\tvar status = updates[i].getAttribute(\"status\");\r\n\t\t\t\t\tvar id = updates[i].getAttribute(\"id\");\r\n\t\t\t\t\tvar parent = updates[i].getAttribute(\"parent\");\r\n\t\t\t\t\tswitch (status) {\r\n\t\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"insertCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"updated\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"updateCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"deleteCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tself._silent_mode = false;\r\n\t\t\t}\r\n\t\t\tself._update_busy = false;\r\n\t\t\tself = null;\r\n\t\t});\r\n\t},\r\n\r\n\tdestructor: function() {\r\n\t\tthis.callEvent(\"onDestroy\", []);\r\n\t\tthis.detachAllEvents();\r\n\r\n\t\tthis.updatedRows = [];\r\n\t\tthis._in_progress = {};\r\n\t\tthis._invalid = {};\r\n\t\tthis._headers = null;\r\n\t\tthis._payload = null;\r\n\t\tdelete this._initialized;\r\n\t},\r\n\r\n\turl: function(url) {\r\n\t\tthis.serverProcessor = this._serverProcessor = url;\r\n\t},\r\n\r\n\t_serializeAsJSON: function(data) {\r\n\t\tif (typeof data === \"string\") {\r\n\t\t\treturn data;\r\n\t\t}\r\n\r\n\t\tvar copy = this.$scheduler.utils.copy(data);\r\n\t\tif (this._tMode === \"REST-JSON\") {\r\n\t\t\tdelete copy.id;\r\n\t\t\tdelete copy[this.action_param];\r\n\t\t}\r\n\r\n\t\treturn JSON.stringify(copy);\r\n\t},\r\n\r\n\t// GET/POST/JSON modes of the dataProcessor didn't send the whole data items in 'delete' requests\r\n\t// clear extra info from the data in order not to change the request format\r\n\t_cleanupArgumentsBeforeSend: function(dataToSend) {\r\n\t\tvar processedData;\r\n\t\tif(dataToSend[this.action_param] === undefined){// hash of updated items, and not an individual item\r\n\t\t\tprocessedData = {};\r\n\t\t\tfor(var i in dataToSend) {\r\n\t\t\t\tprocessedData[i] = this._cleanupArgumentsBeforeSend(dataToSend[i]);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tprocessedData = this._cleanupItemBeforeSend(dataToSend);\r\n\t\t}\r\n\t\treturn processedData;\r\n\t},\r\n\t_cleanupItemBeforeSend: function(updatedItem) {\r\n\t\tvar output = null;\r\n\t\tif(updatedItem){\r\n\t\t\tif(updatedItem[this.action_param] === \"deleted\"){\r\n\t\t\t\toutput = {};\r\n\t\t\t\toutput.id = updatedItem.id;\r\n\t\t\t\toutput[this.action_param] = updatedItem[this.action_param];\r\n\t\t\t}else{\r\n\t\t\t\toutput = updatedItem;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn output;\r\n\t},\r\n\r\n\t_forEachUpdatedRow: function(code) {\r\n\t\tvar updatedRows = this.updatedRows.slice();\r\n\t\tfor (var i = 0; i < updatedRows.length; i++) {\r\n\t\t\tvar rowId = updatedRows[i];\r\n\t\t\tif (this.$scheduler.getUserData(rowId, this.action_param)) {\r\n\t\t\t\tcode.call(this, rowId);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t_prepareDataItem: function(item) {\r\n\t\tvar processedItem = {};\r\n\t\tvar scheduler = this.$scheduler;\r\n\t\tvar copy = scheduler.utils.copy(item);\r\n\t\tfor (var i in copy) {\r\n\t\t\tif (i.indexOf(\"_\") === 0) {\r\n\t\t\t\tcontinue;\r\n\t\t\t} else if (copy[i]) {\r\n\t\t\t\tif(copy[i].getUTCFullYear){\r\n\t\t\t\t\tprocessedItem[i] = scheduler._helpers.formatDate(copy[i]);\r\n\t\t\t\t} else if(typeof copy[i] == \"object\") {\r\n\t\t\t\t\tprocessedItem[i] = this._prepareDataItem(copy[i]);\r\n\t\t\t\t} else if(copy[i] === null) {\r\n\t\t\t\t\tprocessedItem[i] = \"\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprocessedItem[i] = copy[i];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tprocessedItem[this.action_param] = scheduler.getUserData(item.id, this.action_param);\r\n\t\treturn processedItem;\r\n\t},\r\n\t_getRowData: function(id) {\r\n\t\tvar dataItem = this.$scheduler.getEvent(id);\r\n\t\tif (!dataItem) {\r\n\t\t\tdataItem = { id: id };\r\n\t\t}\r\n\t\treturn this._prepareDataItem(dataItem);\r\n\t}\r\n};\r\n\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler.createDataProcessor = function(config) {\r\n\tvar router;\r\n\tvar tMode;\r\n\tif (config instanceof Function) {\r\n\t\trouter = config;\r\n\t} else if (config.hasOwnProperty(\"router\")) {\r\n\t\trouter = config.router;\r\n\t} else if(config.hasOwnProperty(\"event\")){\r\n\t\trouter = config;\r\n\t}\r\n\r\n\tif (router) {\r\n\t\ttMode = \"CUSTOM\";\r\n\t} else {\r\n\t\ttMode = config.mode || \"REST-JSON\";\r\n\t}\r\n\r\n\tvar dp = new DataProcessor(config.url);\r\n\tdp.init(scheduler);\r\n\tdp.setTransactionMode({\r\n\t\tmode: tMode,\r\n\t\trouter: router\r\n\t}, config.batchUpdate); // FIXME: config.batchUpdate where it is explained?\r\n\treturn dp;\r\n};\r\n\r\nscheduler.DataProcessor = DataProcessor;\r\n\r\n}\r\n\r\n//var dataProcessor = global.dataProcessor = DataProcessor; // for old","import utils from \"./utils/utils\";\r\nimport domHelpers from \"./utils/dom_helpers\";\r\n\r\n\r\nexport default function(scheduler) {\r\n\r\n\tvar boxAttribute = \"data-dhxbox\";\r\n\r\n\tvar _dhx_msg_cfg = null;\r\n\r\n\tfunction callback(config, result) {\r\n\t\tvar usercall = config.callback;\r\n\t\tmodalBox.hide(config.box);\r\n\r\n\t\t_dhx_msg_cfg = config.box = null;\r\n\tif (usercall)\r\n\t\t\tusercall(result);\r\n\t}\r\n\r\n\tfunction modal_key(event) {\r\n\t\tif (_dhx_msg_cfg) {\r\n\r\n\t\t\tvar code = event.which || event.keyCode;\r\n\t\t\tvar preventDefault = false;\r\n\r\n\t\t\tif (messageBox.keyboard) {\r\n\t\t\t\tif (code == 13 || code == 32) {\r\n\t\t\t\t\t// default behavior is to confirm/submit popup on space/enter\r\n\t\t\t\t\t// if browser focus is set on button element - do button click instead of default behavior\r\n\t\t\t\t\tvar target = event.target || event.srcElement;\r\n\t\t\t\t\tif (domHelpers.getClassName(target).indexOf(\"scheduler_popup_button\") > -1 && target.click) {\r\n\t\t\t\t\t\ttarget.click();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcallback(_dhx_msg_cfg, true);\r\n\t\t\t\t\t\tpreventDefault = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (code == 27) {\r\n\t\t\t\t\tcallback(_dhx_msg_cfg, false);\r\n\t\t\t\t\tpreventDefault = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (preventDefault) {\r\n\t\t\t\tif (event.preventDefault){\r\n\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t}\r\n\t\t\t\treturn !(event.cancelBubble = true);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler.event(document, \"keydown\", modal_key, true);\r\n\r\n\tfunction modality(mode) {\r\n\t\tif (!modality.cover) {\r\n\t\t\tmodality.cover = document.createElement(\"div\");\r\n\t\t\t//necessary for IE only\r\n\t\t\tscheduler.event(modality.cover, \"keydown\", modal_key);\r\n\t\t\tmodality.cover.className = \"dhx_modal_cover\";\r\n\t\t\tdocument.body.appendChild(modality.cover);\r\n\t\t}\r\n\r\n\t\tmodality.cover.style.display = mode ? \"inline-block\" : \"none\";\r\n\t}\r\n\r\n\tfunction button(text, classValue, result) {\r\n\t\tvar buttonAriaAttrs = scheduler._waiAria.messageButtonAttrString(text);\r\n\t\tvar name = (classValue || \"\").toLowerCase().replace(/ /g, \"_\");\r\n\t\tvar buttonCss = `scheduler_${name}_button dhtmlx_${name}_button`; \r\n\t\treturn `
${text}
`;\r\n\t}\r\n\r\n\tfunction info(text) {\r\n\t\tif (!messageBox.area) {\r\n\t\t\tmessageBox.area = document.createElement(\"div\");\r\n\t\t\tmessageBox.area.className = \"scheduler_message_area dhtmlx_message_area\";\r\n\t\t\tmessageBox.area.style[messageBox.position] = \"5px\";\r\n\t\t\tdocument.body.appendChild(messageBox.area);\r\n\t\t}\r\n\r\n\t\tmessageBox.hide(text.id);\r\n\t\tvar message = document.createElement(\"div\");\r\n\t\tmessage.innerHTML = \"
\" + text.text + \"
\";\r\n\t\tmessage.className = \"scheduler-info dhtmlx-info scheduler-\" + text.type + \" dhtmlx-\" + text.type;\r\n\t\tscheduler.event(message, \"click\",function () {\r\n\t\t\tmessageBox.hide(text.id);\r\n\t\t\ttext = null;\r\n\t\t});\r\n\r\n\t\tscheduler._waiAria.messageInfoAttr(message);\r\n\r\n\t\tif (messageBox.position == \"bottom\" && messageBox.area.firstChild)\r\n\t\t\tmessageBox.area.insertBefore(message, messageBox.area.firstChild);\r\n\t\telse\r\n\t\t\tmessageBox.area.appendChild(message);\r\n\r\n\t\tif (text.expire > 0)\r\n\t\t\tmessageBox.timers[text.id] = window.setTimeout(function () {\r\n\t\t\t\t// GS-1213: We need that when Scheduler is destroyed\r\n\t\t\t\tif (messageBox) messageBox.hide(text.id);\r\n\t\t\t}, text.expire);\r\n\r\n\t\tmessageBox.pull[text.id] = message;\r\n\t\tmessage = null;\r\n\r\n\t\treturn text.id;\r\n\t}\r\n\r\n\tfunction getFirstDefined() {\r\n\t\tvar values = [].slice.apply(arguments, [0]);\r\n\r\n\t\tfor (var i = 0; i < values.length; i++) {\r\n\t\t\tif (values[i]) {\r\n\t\t\t\treturn values[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tfunction _boxStructure(config, ok, cancel) {\r\n\t\tvar box = document.createElement(\"div\");\r\n\r\n\t\tvar contentId = utils.uid();\r\n\t\tscheduler._waiAria.messageModalAttr(box, contentId);\r\n\r\n\r\n\t\tbox.className = \" scheduler_modal_box dhtmlx_modal_box scheduler-\" + config.type + \" dhtmlx-\" + config.type;\r\n\t\tbox.setAttribute(boxAttribute, 1);\r\n\r\n\t\tvar inner = '';\r\n\r\n\t\tif (config.width)\r\n\t\t\tbox.style.width = config.width;\r\n\t\tif (config.height)\r\n\t\t\tbox.style.height = config.height;\r\n\t\tif (config.title)\r\n\t\t\tinner += '
' + config.title + '
';\r\n\t\tinner += '
' + (config.content ? '' : config.text) + '
';\r\n\t\tif (ok)\r\n\t\t\tinner += button(getFirstDefined(config.ok, scheduler.locale.labels.message_ok, \"OK\"), \"ok\", true);\r\n\t\tif (cancel)\r\n\t\t\tinner += button(getFirstDefined(config.cancel, scheduler.locale.labels.message_cancel, \"Cancel\"), \"cancel\", false);\r\n\r\n\t\tif (config.buttons) {\r\n\t\t\tfor (var i = 0; i < config.buttons.length; i++) {\r\n\t\t\t\tvar btn = config.buttons[i];\r\n\t\t\t\tif (typeof btn == \"object\") {\r\n\t\t\t\t\t// Support { label:\"Save\", css:\"main_button\", value:\"save\" }\r\n\t\t\t\t\tvar label = btn.label;\r\n\t\t\t\t\tvar css = btn.css || (\"scheduler_\" + btn.label.toLowerCase() + \"_button dhtmlx_\" + btn.label.toLowerCase() + \"_button\");\r\n\t\t\t\t\tvar value = btn.value || i;\r\n\t\t\t\t\tinner += button(label, css, value);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tinner += button(btn, btn, i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tinner += '
';\r\n\t\tbox.innerHTML = inner;\r\n\r\n\t\tif (config.content) {\r\n\t\t\tvar node = config.content;\r\n\t\t\tif (typeof node == \"string\")\r\n\t\t\t\tnode = document.getElementById(node);\r\n\t\t\tif (node.style.display == 'none')\r\n\t\t\t\tnode.style.display = \"\";\r\n\t\t\tbox.childNodes[config.title ? 1 : 0].appendChild(node);\r\n\t\t}\r\n\r\n\t\tscheduler.event(box, \"click\", function (event) {\r\n\t\t\tvar source = event.target || event.srcElement;\r\n\t\t\tif (!source.className) source = source.parentNode;\r\n\t\t\tif (domHelpers.closest(source, \".scheduler_popup_button\")) {\r\n\t\t\t\tvar result = source.getAttribute(\"data-result\");\r\n\t\t\t\tresult = (result == \"true\") || (result == \"false\" ? false : result);\r\n\t\t\t\tcallback(config, result);\r\n\t\t\t}\r\n\t\t});\r\n\t\tconfig.box = box;\r\n\t\tif (ok || cancel)\r\n\t\t\t_dhx_msg_cfg = config;\r\n\r\n\t\treturn box;\r\n\t}\r\n\r\n\tfunction _createBox(config, ok, cancel) {\r\n\t\tvar box = config.tagName ? config : _boxStructure(config, ok, cancel);\r\n\r\n\t\tif (!config.hidden)\r\n\t\t\tmodality(true);\r\n\t\tdocument.body.appendChild(box);\r\n\t\tvar x = Math.abs(Math.floor(((window.innerWidth || document.documentElement.offsetWidth) - box.offsetWidth) / 2));\r\n\t\tvar y = Math.abs(Math.floor(((window.innerHeight || document.documentElement.offsetHeight) - box.offsetHeight) / 2));\r\n\t\tif (config.position == \"top\")\r\n\t\t\tbox.style.top = \"-3px\";\r\n\t\telse\r\n\t\t\tbox.style.top = y + 'px';\r\n\t\tbox.style.left = x + 'px';\r\n\t\t//necessary for IE only\r\n\t\tscheduler.event(box, \"keydown\", modal_key);\r\n\r\n\t\tmodalBox.focus(box);\r\n\r\n\t\tif (config.hidden)\r\n\t\t\tmodalBox.hide(box);\r\n\r\n\t\tscheduler.callEvent(\"onMessagePopup\", [box]);\r\n\t\treturn box;\r\n\t}\r\n\r\n\tfunction alertPopup(config) {\r\n\t\treturn _createBox(config, true, false);\r\n\t}\r\n\r\n\tfunction confirmPopup(config) {\r\n\t\treturn _createBox(config, true, true);\r\n\t}\r\n\r\n\tfunction boxPopup(config) {\r\n\t\treturn _createBox(config);\r\n\t}\r\n\r\n\tfunction box_params(text, type, callback) {\r\n\t\tif (typeof text != \"object\") {\r\n\t\t\tif (typeof type == \"function\") {\r\n\t\t\t\tcallback = type;\r\n\t\t\t\ttype = \"\";\r\n\t\t\t}\r\n\t\t\ttext = {text: text, type: type, callback: callback};\r\n\t\t}\r\n\t\treturn text;\r\n\t}\r\n\r\n\tfunction params(text, type, expire, id) {\r\n\t\tif (typeof text != \"object\")\r\n\t\t\ttext = {text: text, type: type, expire: expire, id: id};\r\n\t\ttext.id = text.id || utils.uid();\r\n\t\ttext.expire = text.expire || messageBox.expire;\r\n\t\treturn text;\r\n\t}\r\n\r\n\tvar alertBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"confirm\";\r\n\t\treturn alertPopup(text);\r\n\t};\r\n\tvar confirmBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"alert\";\r\n\t\treturn confirmPopup(text);\r\n\t};\r\n\tvar modalBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"alert\";\r\n\t\treturn boxPopup(text);\r\n\t};\r\n\tmodalBox.hide = function (node) {\r\n\t\twhile (node && node.getAttribute && !node.getAttribute(boxAttribute))\r\n\t\t\tnode = node.parentNode;\r\n\t\tif (node) {\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t\tmodality(false);\r\n\r\n\t\t\tscheduler.callEvent(\"onAfterMessagePopup\", [node]);\r\n\t\t}\r\n\t};\r\n\r\n\tmodalBox.focus = function (node) {\r\n\t\tsetTimeout(function () {\r\n\t\t\tvar focusable = domHelpers.getFocusableNodes(node);\r\n\t\t\tif (focusable.length) {\r\n\t\t\t\tif (focusable[0].focus) focusable[0].focus();\r\n\t\t\t}\r\n\t\t}, 1);\r\n\t};\r\n\r\n\tvar messageBox = function (text, type, expire, id) {\r\n\t\ttext = params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"info\";\r\n\r\n\t\tvar subtype = text.type.split(\"-\")[0];\r\n\t\tswitch (subtype) {\r\n\t\t\tcase \"alert\":\r\n\t\t\t\treturn alertPopup(text);\r\n\t\t\tcase \"confirm\":\r\n\t\t\t\treturn confirmPopup(text);\r\n\t\t\tcase \"modalbox\":\r\n\t\t\t\treturn boxPopup(text);\r\n\t\t\tdefault:\r\n\t\t\t\treturn info(text);\r\n\t\t}\r\n\t};\r\n\r\n\tmessageBox.seed = (new Date()).valueOf();\r\n\tmessageBox.uid = utils.uid;\r\n\tmessageBox.expire = 4000;\r\n\tmessageBox.keyboard = true;\r\n\tmessageBox.position = \"top\";\r\n\tmessageBox.pull = {};\r\n\tmessageBox.timers = {};\r\n\r\n\tmessageBox.hideAll = function () {\r\n\t\tfor (var key in messageBox.pull)\r\n\t\t\tmessageBox.hide(key);\r\n\t};\r\n\tmessageBox.hide = function (id) {\r\n\t\tvar obj = messageBox.pull[id];\r\n\t\tif (obj && obj.parentNode) {\r\n\t\t\twindow.setTimeout(function () {\r\n\t\t\t\tobj.parentNode.removeChild(obj);\r\n\t\t\t\tobj = null;\r\n\t\t\t}, 2000);\r\n\t\t\tobj.className += \" hidden\";\r\n\r\n\t\t\tif (messageBox.timers[id])\r\n\t\t\t\twindow.clearTimeout(messageBox.timers[id]);\r\n\t\t\tdelete messageBox.pull[id];\r\n\t\t}\r\n\t};\r\n\r\n\tvar popups = [];\r\n\tscheduler.attachEvent(\"onMessagePopup\", function(box){\r\n\t\tpopups.push(box);\r\n\t});\r\n\tscheduler.attachEvent(\"onAfterMessagePopup\", function(box){\r\n\t\tfor(var i = 0; i < popups.length; i++){\r\n\t\t\tif(popups[i] === box){\r\n\t\t\t\tpopups.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tif(modality.cover && modality.cover.parentNode){\r\n\t\t\tmodality.cover.parentNode.removeChild(modality.cover);\r\n\t\t}\r\n\r\n\t\tfor(var i = 0; i < popups.length; i++){\r\n\t\t\tif(popups[i].parentNode){\r\n\t\t\t\tpopups[i].parentNode.removeChild(popups[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\tpopups = null;\r\n\r\n\t\tif(messageBox.area && messageBox.area.parentNode){\r\n\t\t\tmessageBox.area.parentNode.removeChild(messageBox.area);\r\n\t\t}\r\n\t\tmessageBox = null;\r\n\t});\r\n\r\n\treturn {\r\n\t\talert: alertBox,\r\n\t\tconfirm: confirmBox,\r\n\t\tmessage: messageBox,\r\n\t\tmodalbox: modalBox\r\n\t};\r\n}","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"كانون الثاني\", \"شباط\", \"آذار\", \"نيسان\", \"أيار\", \"حزيران\", \"تموز\", \"آب\", \"أيلول\", \"تشرين الأول\", \"تشرين الثاني\", \"كانون الأول\"],\r\n\t\tmonth_short: [\"يناير\", \"فبراير\", \"مارس\", \"أبريل\", \"مايو\", \"يونيو\", \"يوليو\", \"أغسطس\", \"سبتمبر\", \"أكتوبر\", \"نوفمبر\", \"ديسمبر\"],\r\n\t\tday_full: [\"الأحد\", \"الأثنين\", \"ألثلاثاء\", \"الأربعاء\", \"ألحميس\", \"ألجمعة\", \"السبت\"],\r\n\t\tday_short: [\"احد\", \"اثنين\", \"ثلاثاء\", \"اربعاء\", \"خميس\", \"جمعة\", \"سبت\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"اليوم\",\r\n\t\tday_tab: \"يوم\",\r\n\t\tweek_tab: \"أسبوع\",\r\n\t\tmonth_tab: \"شهر\",\r\n\t\tnew_event: \"حدث جديد\",\r\n\t\ticon_save: \"اخزن\",\r\n\t\ticon_cancel: \"الغاء\",\r\n\t\ticon_details: \"تفاصيل\",\r\n\t\ticon_edit: \"تحرير\",\r\n\t\ticon_delete: \"حذف\",\r\n\t\tconfirm_closing: \"التغييرات سوف تضيع, هل انت متأكد؟\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"الحدث سيتم حذفها نهائيا ، هل أنت متأكد؟\",\r\n\t\tsection_description: \"الوصف\",\r\n\t\tsection_time: \"الفترة الزمنية\",\r\n\t\tfull_day: \"طوال اليوم\",\r\n\r\n\t\tconfirm_recurring: \"هل تريد تحرير مجموعة كاملة من الأحداث المتكررة؟\",\r\n\t\tsection_recurring: \"تكرار الحدث\",\r\n\t\tbutton_recurring: \"تعطيل\",\r\n\t\tbutton_recurring_open: \"تمكين\",\r\n\t\tbutton_edit_series: \"تحرير سلسلة\",\r\n\t\tbutton_edit_occurrence: \"تعديل نسخة\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"جدول\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};\r\n\r\n\r\n","/*\r\n Translation by Sofya Morozova\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Студзень\", \"Люты\", \"Сакавік\", \"Красавік\", \"Maй\", \"Чэрвень\", \"Ліпень\", \"Жнівень\", \"Верасень\", \"Кастрычнік\", \"Лістапад\", \"Снежань\"],\r\n\t\tmonth_short: [\"Студз\", \"Лют\", \"Сак\", \"Крас\", \"Maй\", \"Чэр\", \"Ліп\", \"Жнів\", \"Вер\", \"Каст\", \"Ліст\", \"Снеж\"],\r\n\t\tday_full: [ \"Нядзеля\", \"Панядзелак\", \"Аўторак\", \"Серада\", \"Чацвер\", \"Пятніца\", \"Субота\"],\r\n\t\tday_short: [\"Нд\", \"Пн\", \"Аўт\", \"Ср\", \"Чцв\", \"Пт\", \"Сб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сёння\",\r\n\t\tday_tab: \"Дзень\",\r\n\t\tweek_tab: \"Тыдзень\",\r\n\t\tmonth_tab: \"Месяц\",\r\n\t\tnew_event: \"Новая падзея\",\r\n\t\ticon_save: \"Захаваць\",\r\n\t\ticon_cancel: \"Адмяніць\",\r\n\t\ticon_details: \"Дэталі\",\r\n\t\ticon_edit: \"Змяніць\",\r\n\t\ticon_delete: \"Выдаліць\",\r\n\t\tconfirm_closing: \"\", //Унесеныя змены будуць страчаны, працягнуць?\r\n\t\tconfirm_deleting: \"Падзея будзе выдалена незваротна, працягнуць?\",\r\n\t\tsection_description: \"Апісанне\",\r\n\t\tsection_time: \"Перыяд часу\",\r\n\t\tfull_day: \"Увесь дзень\",\r\n\r\n\t\tconfirm_recurring: \"Вы хочаце змяніць усю серыю паўтаральных падзей?\",\r\n\t\tsection_recurring: \"Паўтарэнне\",\r\n\t\tbutton_recurring: \"Адключана\",\r\n\t\tbutton_recurring_open: \"Уключана\",\r\n\t\tbutton_edit_series: \"Рэдагаваць серыю\",\r\n\t\tbutton_edit_occurrence: \"Рэдагаваць асобнік\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Спіс\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Апісанне\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Год\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Спіс\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Спic\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Дзень\",\r\n\t\trepeat_radio_week: \"Тыдзень\",\r\n\t\trepeat_radio_month: \"Месяц\",\r\n\t\trepeat_radio_year: \"Год\",\r\n\t\trepeat_radio_day_type: \"Кожны\",\r\n\t\trepeat_text_day_count: \"дзень\",\r\n\t\trepeat_radio_day_type2: \"Кожны працоўны дзень\",\r\n\t\trepeat_week: \" Паўтараць кожны\",\r\n\t\trepeat_text_week_count: \"тыдзень\",\r\n\t\trepeat_radio_month_type: \"Паўтараць\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" чысла кожнага\",\r\n\t\trepeat_text_month_count: \"месяцу\",\r\n\t\trepeat_text_month_count2_before: \"кожны \",\r\n\t\trepeat_text_month_count2_after: \"месяц\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"дзень\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без даты заканчэння\",\r\n\t\trepeat_text_occurences_count: \"паўтораў\",\r\n\t\trepeat_radio_end2: \"\",\r\n\t\trepeat_radio_end3: \"Да \",\r\n\t\tmonth_for_recurring: [\"Студзеня\", \"Лютага\", \"Сакавіка\", \"Красавіка\", \"Мая\", \"Чэрвеня\", \"Ліпeня\", \"Жніўня\", \"Верасня\", \"Кастрычніка\", \"Лістапада\", \"Снежня\"],\r\n\t\tday_for_recurring: [\"Нядзелю\", \"Панядзелак\", \"Аўторак\", \"Сераду\", \"Чацвер\", \"Пятніцу\", \"Суботу\"]\r\n\t}\r\n};\r\n","/*\r\n @Traducido por Vicente Adria Bohigues - vicenteadria@hotmail.com\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Gener\", \"Febrer\", \"Març\", \"Abril\", \"Maig\", \"Juny\", \"Juliol\", \"Agost\", \"Setembre\", \"Octubre\", \"Novembre\", \"Desembre\"],\r\n\t\tmonth_short: [\"Gen\", \"Feb\", \"Mar\", \"Abr\", \"Mai\", \"Jun\", \"Jul\", \"Ago\", \"Set\", \"Oct\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Diumenge\", \"Dilluns\", \"Dimarts\", \"Dimecres\", \"Dijous\", \"Divendres\", \"Dissabte\"],\r\n\t\tday_short: [\"Dg\", \"Dl\", \"Dm\", \"Dc\", \"Dj\", \"Dv\", \"Ds\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hui\",\r\n\t\tday_tab: \"Dia\",\r\n\t\tweek_tab: \"Setmana\",\r\n\t\tmonth_tab: \"Mes\",\r\n\t\tnew_event: \"Nou esdeveniment\",\r\n\t\ticon_save: \"Guardar\",\r\n\t\ticon_cancel: \"Cancel·lar\",\r\n\t\ticon_details: \"Detalls\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Esborrar\",\r\n\t\tconfirm_closing: \"\", //\"Els seus canvis es perdràn, continuar ?\"\r\n\t\tconfirm_deleting: \"L'esdeveniment s'esborrarà definitivament, continuar ?\",\r\n\t\tsection_description: \"Descripció\",\r\n\t\tsection_time: \"Periode de temps\",\r\n\t\tfull_day: \"Tot el dia\",\r\n\r\n\t\tconfirm_recurring: \"¿Desitja modificar el conjunt d'esdeveniments repetits?\",\r\n\t\tsection_recurring: \"Repeteixca l'esdeveniment\",\r\n\t\tbutton_recurring: \"Impedit\",\r\n\t\tbutton_recurring_open: \"Permés\",\r\n\t\tbutton_edit_series: \"Edit sèrie\",\r\n\t\tbutton_edit_occurrence: \"Edita Instància\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descripció\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Any\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Taula\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};","/*\r\nTranslation by FreezeSoul\r\n*/\r\n//scheduler.config.day_date=\"%M %d日 %D\";\r\n//scheduler.config.default_date=\"%Y年 %M %d日\";\r\n//scheduler.config.month_date=\"%Y年 %M\";\r\n\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"一月\", \"二月\", \"三月\", \"四月\", \"五月\", \"六月\", \"七月\", \"八月\", \"九月\", \"十月\", \"十一月\", \"十二月\"],\r\n\t\tmonth_short: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tday_full: [\"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\"],\r\n\t\tday_short: [\"日\", \"一\", \"二\", \"三\", \"四\", \"五\", \"六\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"今天\",\r\n\t\tday_tab: \"日\",\r\n\t\tweek_tab: \"周\",\r\n\t\tmonth_tab: \"月\",\r\n\t\tnew_event: \"新建日程\",\r\n\t\ticon_save: \"保存\",\r\n\t\ticon_cancel: \"关闭\",\r\n\t\ticon_details: \"详细\",\r\n\t\ticon_edit: \"编辑\",\r\n\t\ticon_delete: \"删除\",\r\n\t\tconfirm_closing: \"请确认是否撤销修改!\", //Your changes will be lost, are your sure?\r\n\t\tconfirm_deleting: \"是否删除日程?\",\r\n\t\tsection_description: \"描述\",\r\n\t\tsection_time: \"时间范围\",\r\n\t\tfull_day: \"整天\",\r\n\r\n\t\tconfirm_recurring:\"请确认是否将日程设为重复模式?\",\r\n\t\tsection_recurring:\"重复周期\",\r\n\t\tbutton_recurring:\"禁用\",\r\n\t\tbutton_recurring_open:\"启用\",\r\n\t\tbutton_edit_series: \"编辑系列\",\r\n\t\tbutton_edit_occurrence: \"编辑实例\",\r\n\t\t\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"议程\",\r\n\t\tdate:\"日期\",\r\n\t\tdescription:\"说明\",\r\n\t\t\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"今年\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"议程\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab:\"电网\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"按天\",\r\n\t\trepeat_radio_week: \"按周\",\r\n\t\trepeat_radio_month: \"按月\",\r\n\t\trepeat_radio_year: \"按年\",\r\n\t\trepeat_radio_day_type: \"每\",\r\n\t\trepeat_text_day_count: \"天\",\r\n\t\trepeat_radio_day_type2: \"每个工作日\",\r\n\t\trepeat_week: \" 重复 每\",\r\n\t\trepeat_text_week_count: \"星期的:\",\r\n\t\trepeat_radio_month_type: \"重复\",\r\n\t\trepeat_radio_month_start: \"在\",\r\n\t\trepeat_text_month_day: \"日 每\",\r\n\t\trepeat_text_month_count: \"月\",\r\n\t\trepeat_text_month_count2_before: \"每\",\r\n\t\trepeat_text_month_count2_after: \"月\",\r\n\t\trepeat_year_label: \"在\",\r\n\t\tselect_year_day2: \"的\",\r\n\t\trepeat_text_year_day: \"日\",\r\n\t\tselect_year_month: \"月\",\r\n\t\trepeat_radio_end: \"无结束日期\",\r\n\t\trepeat_text_occurences_count: \"次结束\",\r\n\t\trepeat_radio_end2: \"重复\",\r\n\t\trepeat_radio_end3: \"结束于\",\r\n\t\tmonth_for_recurring: [\"一月\", \"二月\", \"三月\", \"四月\", \"五月\", \"六月\", \"七月\", \"八月\", \"九月\", \"十月\", \"十一月\", \"十二月\"],\r\n\t\tday_for_recurring: [\"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Leden\", \"Únor\", \"Březen\", \"Duben\", \"Květen\", \"Červen\", \"Červenec\", \"Srpen\", \"Září\", \"Říjen\", \"Listopad\", \"Prosinec\"],\r\n\t\tmonth_short: [\"Led\", \"Ún\", \"Bře\", \"Dub\", \"Kvě\", \"Čer\", \"Čec\", \"Srp\", \"Září\", \"Říj\", \"List\", \"Pro\"],\r\n\t\tday_full: [\"Neděle\", \"Pondělí\", \"Úterý\", \"Středa\", \"Čtvrtek\", \"Pátek\", \"Sobota\"],\r\n\t\tday_short: [\"Ne\", \"Po\", \"Út\", \"St\", \"Čt\", \"Pá\", \"So\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dnes\",\r\n\t\tday_tab: \"Den\",\r\n\t\tweek_tab: \"Týden\",\r\n\t\tmonth_tab: \"Měsíc\",\r\n\t\tnew_event: \"Nová událost\",\r\n\t\ticon_save: \"Uložit\",\r\n\t\ticon_cancel: \"Zpět\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edituj\",\r\n\t\ticon_delete: \"Smazat\",\r\n\t\tconfirm_closing: \"\", //Vaše změny budou ztraceny, opravdu ?\r\n\t\tconfirm_deleting: \"Událost bude trvale smazána, opravdu?\",\r\n\t\tsection_description: \"Poznámky\",\r\n\t\tsection_time: \"Doba platnosti\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Přejete si upravit celou řadu opakovaných událostí?\",\r\n\t\tsection_recurring: \"Opakování události\",\r\n\t\tbutton_recurring: \"Vypnuto\",\r\n\t\tbutton_recurring_open: \"Zapnuto\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Upravit instance\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Program\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Poznámka\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\t\tfull_day: \"Full day\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Program\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Mřížka\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Denně\",\r\n\t\trepeat_radio_week: \"Týdně\",\r\n\t\trepeat_radio_month: \"Měsíčně\",\r\n\t\trepeat_radio_year: \"Ročně\",\r\n\t\trepeat_radio_day_type: \"každý\",\r\n\t\trepeat_text_day_count: \"Den\",\r\n\t\trepeat_radio_day_type2: \"pracovní dny\",\r\n\t\trepeat_week: \"Opakuje každých\",\r\n\t\trepeat_text_week_count: \"Týdnů na:\",\r\n\t\trepeat_radio_month_type: \"u každého\",\r\n\t\trepeat_radio_month_start: \"na\",\r\n\t\trepeat_text_month_day: \"Den každého\",\r\n\t\trepeat_text_month_count: \"Měsíc\",\r\n\t\trepeat_text_month_count2_before: \"každý\",\r\n\t\trepeat_text_month_count2_after: \"Měsíc\",\r\n\t\trepeat_year_label: \"na\",\r\n\t\tselect_year_day2: \"v\",\r\n\t\trepeat_text_year_day: \"Den v\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"bez data ukončení\",\r\n\t\trepeat_text_occurences_count: \"Události\",\r\n\t\trepeat_radio_end2: \"po\",\r\n\t\trepeat_radio_end3: \"Konec\",\r\n\t\tmonth_for_recurring: [\"Leden\", \"Únor\", \"Březen\", \"Duben\", \"Květen\", \"Červen\", \"Červenec\", \"Srpen\", \"Září\", \"Říjen\", \"Listopad\", \"Prosinec\"],\r\n\t\tday_for_recurring: [\"Neděle \", \"Pondělí\", \"Úterý\", \"Středa\", \"Čtvrtek\", \"Pátek\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Marts\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Man\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uge\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny begivenhed\",\r\n\t\ticon_save: \"Gem\",\r\n\t\ticon_cancel: \"Fortryd\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Tilret\",\r\n\t\ticon_delete: \"Slet\",\r\n\t\tconfirm_closing: \"Dine rettelser vil gå tabt.. Er dy sikker?\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Bigivenheden vil blive slettet permanent. Er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du tilrette hele serien af gentagne begivenheder?\",\r\n\t\tsection_recurring: \"Gentag begivenhed\",\r\n\t\tbutton_recurring: \"Frakoblet\",\r\n\t\tbutton_recurring_open: \"Tilkoblet\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Rediger en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dagsorden\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dagsorden\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daglig\",\r\n\t\trepeat_radio_week: \"Ugenlig\",\r\n\t\trepeat_radio_month: \"Månedlig\",\r\n\t\trepeat_radio_year: \"Årlig\",\r\n\t\trepeat_radio_day_type: \"Hver\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"På hver arbejdsdag\",\r\n\t\trepeat_week: \" Gentager sig hver\",\r\n\t\trepeat_text_week_count: \"uge på følgende dage:\",\r\n\t\trepeat_radio_month_type: \"Hver den\",\r\n\t\trepeat_radio_month_start: \"Den\",\r\n\t\trepeat_text_month_day: \" i hver\",\r\n\t\trepeat_text_month_count: \"måned\",\r\n\t\trepeat_text_month_count2_before: \"hver\",\r\n\t\trepeat_text_month_count2_after: \"måned\",\r\n\t\trepeat_year_label: \"Den\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Ingen slutdato\",\r\n\t\trepeat_text_occurences_count: \"gentagelse\",\r\n\t\trepeat_radio_end2: \"Efter\",\r\n\t\trepeat_radio_end3: \"Slut\",\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"März\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Dezember\"],\r\n\t\tday_for_recurring: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\" Januar\", \" Februar\", \" März \", \" April\", \" Mai\", \" Juni\", \" Juli\", \" August\", \" September \", \" Oktober\", \" November \", \" Dezember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mär\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dez\"],\r\n\t\tday_full: [ \"Sonntag\", \"Montag\", \"Dienstag\", \" Mittwoch\", \" Donnerstag\", \"Freitag\", \"Samstag\"],\r\n\t\tday_short: [\"So\", \"Mo\", \"Di\", \"Mi\", \"Do\", \"Fr\", \"Sa\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Heute\",\r\n\t\tday_tab: \"Tag\",\r\n\t\tweek_tab: \"Woche\",\r\n\t\tmonth_tab: \"Monat\",\r\n\t\tnew_event: \"neuer Eintrag\",\r\n\t\ticon_save: \"Speichern\",\r\n\t\ticon_cancel: \"Abbrechen\",\r\n\t\ticon_details: \"Details\",\r\n\t\ticon_edit: \"Ändern\",\r\n\t\ticon_delete: \"Löschen\",\r\n\t\tconfirm_closing: \"\", //\"Ihre Veränderungen werden verloren sein, wollen Sie ergänzen? \"\r\n\t\tconfirm_deleting: \"Der Eintrag wird gelöscht\",\r\n\t\tsection_description: \"Beschreibung\",\r\n\t\tsection_time: \"Zeitspanne\",\r\n\t\tfull_day: \"Ganzer Tag\",\r\n\r\n\t\tconfirm_recurring: \"Wollen Sie alle Einträge bearbeiten oder nur diesen einzelnen Eintrag?\",\r\n\t\tsection_recurring: \"Wiederholung\",\r\n\t\tbutton_recurring: \"Aus\",\r\n\t\tbutton_recurring_open: \"An\",\r\n\t\tbutton_edit_series: \"Bearbeiten Sie die Serie\",\r\n\t\tbutton_edit_occurrence: \"Bearbeiten Sie eine Kopie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Beschreibung\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Jahre\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Täglich\",\r\n\t\trepeat_radio_week: \"Wöchentlich\",\r\n\t\trepeat_radio_month: \"Monatlich\",\r\n\t\trepeat_radio_year: \"Jährlich\",\r\n\t\trepeat_radio_day_type: \"jeden\",\r\n\t\trepeat_text_day_count: \"Tag\",\r\n\t\trepeat_radio_day_type2: \"an jedem Arbeitstag\",\r\n\t\trepeat_week: \" Wiederholt sich jede\",\r\n\t\trepeat_text_week_count: \"Woche am:\",\r\n\t\trepeat_radio_month_type: \"an jedem\",\r\n\t\trepeat_radio_month_start: \"am\",\r\n\t\trepeat_text_month_day: \"Tag eines jeden\",\r\n\t\trepeat_text_month_count: \"Monats\",\r\n\t\trepeat_text_month_count2_before: \"jeden\",\r\n\t\trepeat_text_month_count2_after: \"Monats\",\r\n\t\trepeat_year_label: \"am\",\r\n\t\tselect_year_day2: \"im\",\r\n\t\trepeat_text_year_day: \"Tag im\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"kein Enddatum\",\r\n\t\trepeat_text_occurences_count: \"Ereignissen\",\r\n\t\trepeat_radio_end3: \"Schluß\",\r\n\t\trepeat_radio_end2: \"nach\",\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"März\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Dezember\"],\r\n\t\tday_for_recurring: [\"Sonntag\", \"Montag\", \"Dienstag\", \"Mittwoch\", \"Donnerstag\", \"Freitag\", \"Samstag\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Ιανουάριος\", \"Φεβρουάριος\", \"Μάρτιος\", \"Απρίλιος\", \"Μάϊος\", \"Ιούνιος\", \"Ιούλιος\", \"Αύγουστος\", \"Σεπτέμβριος\", \"Οκτώβριος\", \"Νοέμβριος\", \"Δεκέμβριος\"],\r\n\t\tmonth_short: [\"ΙΑΝ\", \"ΦΕΒ\", \"ΜΑΡ\", \"ΑΠΡ\", \"ΜΑΙ\", \"ΙΟΥΝ\", \"ΙΟΥΛ\", \"ΑΥΓ\", \"ΣΕΠ\", \"ΟΚΤ\", \"ΝΟΕ\", \"ΔΕΚ\"],\r\n\t\tday_full: [\"Κυριακή\", \"Δευτέρα\", \"Τρίτη\", \"Τετάρτη\", \"Πέμπτη\", \"Παρασκευή\", \"Σάββατο\"],\r\n\t\tday_short: [\"ΚΥ\", \"ΔΕ\", \"ΤΡ\", \"ΤΕ\", \"ΠΕ\", \"ΠΑ\", \"ΣΑ\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Σήμερα\",\r\n\t\tday_tab: \"Ημέρα\",\r\n\t\tweek_tab: \"Εβδομάδα\",\r\n\t\tmonth_tab: \"Μήνας\",\r\n\t\tnew_event: \"Νέο έργο\",\r\n\t\ticon_save: \"Αποθήκευση\",\r\n\t\ticon_cancel: \"Άκυρο\",\r\n\t\ticon_details: \"Λεπτομέρειες\",\r\n\t\ticon_edit: \"Επεξεργασία\",\r\n\t\ticon_delete: \"Διαγραφή\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Το έργο θα διαγραφεί οριστικά. Θέλετε να συνεχίσετε;\",\r\n\t\tsection_description: \"Περιγραφή\",\r\n\t\tsection_time: \"Χρονική περίοδος\",\r\n\t\tfull_day: \"Πλήρης Ημέρα\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Θέλετε να επεξεργασθείτε ολόκληρη την ομάδα των επαναλαμβανόμενων έργων;\",\r\n\t\tsection_recurring: \"Επαναλαμβανόμενο έργο\",\r\n\t\tbutton_recurring: \"Ανενεργό\",\r\n\t\tbutton_recurring_open: \"Ενεργό\",\r\n\t\tbutton_edit_series: \"Επεξεργαστείτε τη σειρά\",\r\n\t\tbutton_edit_occurrence: \"Επεξεργασία ένα αντίγραφο\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Ημερήσια Διάταξη\",\r\n\t\tdate: \"Ημερομηνία\",\r\n\t\tdescription: \"Περιγραφή\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Έτος\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Ημερήσια Διάταξη\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Πλέγμα\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Ημερησίως\",\r\n\t\trepeat_radio_week: \"Εβδομαδιαίως\",\r\n\t\trepeat_radio_month: \"Μηνιαίως\",\r\n\t\trepeat_radio_year: \"Ετησίως\",\r\n\t\trepeat_radio_day_type: \"Κάθε\",\r\n\t\trepeat_text_day_count: \"ημέρα\",\r\n\t\trepeat_radio_day_type2: \"Κάθε εργάσιμη\",\r\n\t\trepeat_week: \" Επανάληψη κάθε\",\r\n\t\trepeat_text_week_count: \"εβδομάδα τις επόμενες ημέρες:\",\r\n\t\trepeat_radio_month_type: \"Επανάληψη\",\r\n\t\trepeat_radio_month_start: \"Την\",\r\n\t\trepeat_text_month_day: \"ημέρα κάθε\",\r\n\t\trepeat_text_month_count: \"μήνα\",\r\n\t\trepeat_text_month_count2_before: \"κάθε\",\r\n\t\trepeat_text_month_count2_after: \"μήνα\",\r\n\t\trepeat_year_label: \"Την\",\r\n\t\tselect_year_day2: \"του\",\r\n\t\trepeat_text_year_day: \"ημέρα\",\r\n\t\tselect_year_month: \"μήνα\",\r\n\t\trepeat_radio_end: \"Χωρίς ημερομηνία λήξεως\",\r\n\t\trepeat_text_occurences_count: \"επαναλήψεις\",\r\n\t\trepeat_radio_end3: \"Λήγει την\",\r\n\t\trepeat_radio_end2: \"Μετά από\",\r\n\t\tmonth_for_recurring: [\"Ιανουάριος\", \"Φεβρουάριος\", \"Μάρτιος\", \"Απρίλιος\", \"Μάϊος\", \"Ιούνιος\", \"Ιούλιος\", \"Αύγουστος\", \"Σεπτέμβριος\", \"Οκτώβριος\", \"Νοέμβριος\", \"Δεκέμβριος\"],\r\n\t\tday_for_recurring: [\"Κυριακή\", \"Δευτέρα\", \"Τρίτη\", \"Τετάρτη\", \"Πέμπτη\", \"Παρασκευή\", \"Σάββατο\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate:{\r\n\t\tmonth_full:[\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\r\n\t\tmonth_short:[\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\r\n\t\tday_full:[\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\r\n\t\tday_short:[\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"]\r\n\t},\r\n\tlabels:{\r\n\t\tdhx_cal_today_button:\"Today\",\r\n\t\tday_tab:\"Day\",\r\n\t\tweek_tab:\"Week\",\r\n\t\tmonth_tab:\"Month\",\r\n\t\tnew_event:\"New event\",\r\n\t\ticon_save:\"Save\",\r\n\t\ticon_cancel:\"Cancel\",\r\n\t\ticon_details:\"Details\",\r\n\t\ticon_edit:\"Edit\",\r\n\t\ticon_delete:\"Delete\",\r\n\t\tconfirm_closing:\"\",//Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting:\"Event will be deleted permanently, are you sure?\",\r\n\t\tsection_description:\"Description\",\r\n\t\tsection_time:\"Time period\",\r\n\t\tfull_day:\"Full day\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring:\"Do you want to edit the whole set of repeated events?\",\r\n\t\tsection_recurring:\"Repeat event\",\r\n\t\tbutton_recurring:\"Disabled\",\r\n\t\tbutton_recurring_open:\"Enabled\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Edit occurrence\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"Agenda\",\r\n\t\tdate:\"Date\",\r\n\t\tdescription:\"Description\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"Year\",\r\n\r\n\t\t/* week agenda extension */\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daily\",//name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Weekly\",//name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Monthly\",\r\n\t\trepeat_radio_year: \"Yearly\",\r\n\t\trepeat_radio_day_type: \"Every\",\r\n\t\trepeat_text_day_count: \"day\",\r\n\t\trepeat_radio_day_type2: \"Every workday\",\r\n\t\trepeat_week: \" Repeat every\",\r\n\t\trepeat_text_week_count: \"week next days:\",\r\n\t\trepeat_radio_month_type: \"Repeat\",\r\n\t\trepeat_radio_month_start: \"On\",\r\n\t\trepeat_text_month_day: \"day every\",\r\n\t\trepeat_text_month_count: \"month\",\r\n\t\trepeat_text_month_count2_before: \"every\",\r\n\t\trepeat_text_month_count2_after: \"month\",\r\n\t\trepeat_year_label: \"On\",\r\n\t\tselect_year_day2: \"of\",\r\n\t\trepeat_text_year_day: \"day\",\r\n\t\tselect_year_month: \"month\",\r\n\t\trepeat_radio_end: \"No end date\",\r\n\t\trepeat_text_occurences_count: \"occurrences\",\r\n\t\trepeat_radio_end2: \"After\",\r\n\t\trepeat_radio_end3: \"End by\",\r\n\t\tmonth_for_recurring: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"]//\r\n\t}\r\n};\r\n\r\n","/*\r\n @Autor Manuel Fernandez Panzuela - www.mfernandez.es\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Enero\", \"Febrero\", \"Marzo\", \"Abril\", \"Mayo\", \"Junio\", \"Julio\", \"Agosto\", \"Septiembre\", \"Octubre\", \"Noviembre\", \"Diciembre\"],\r\n\t\tmonth_short: [\"Ene\", \"Feb\", \"Mar\", \"Abr\", \"May\", \"Jun\", \"Jul\", \"Ago\", \"Sep\", \"Oct\", \"Nov\", \"Dic\"],\r\n\t\tday_full: [\"Domingo\", \"Lunes\", \"Martes\", \"Miércoles\", \"Jueves\", \"Viernes\", \"Sábado\"],\r\n\t\tday_short: [\"Dom\", \"Lun\", \"Mar\", \"Mié\", \"Jue\", \"Vie\", \"Sáb\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hoy\",\r\n\t\tday_tab: \"Día\",\r\n\t\tweek_tab: \"Semana\",\r\n\t\tmonth_tab: \"Mes\",\r\n\t\tnew_event: \"Nuevo evento\",\r\n\t\ticon_save: \"Guardar\",\r\n\t\ticon_cancel: \"Cancelar\",\r\n\t\ticon_details: \"Detalles\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Eliminar\",\r\n\t\tconfirm_closing: \"\", //\"Sus cambios se perderán, continuar ?\"\r\n\t\tconfirm_deleting: \"El evento se borrará definitivamente, ¿continuar?\",\r\n\t\tsection_description: \"Descripción\",\r\n\t\tsection_time: \"Período\",\r\n\t\tfull_day: \"Todo el día\",\r\n\r\n\t\tconfirm_recurring: \"¿Desea modificar el conjunto de eventos repetidos?\",\r\n\t\tsection_recurring: \"Repita el evento\",\r\n\t\tbutton_recurring: \"Impedido\",\r\n\t\tbutton_recurring_open: \"Permitido\",\r\n\t\tbutton_edit_series: \"Editar la serie\",\r\n\t\tbutton_edit_occurrence: \"Editar este evento\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Día\",\r\n\t\tdate: \"Fecha\",\r\n\t\tdescription: \"Descripción\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Año\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Día\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Reja\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Diariamente\",\r\n\t\trepeat_radio_week: \"Semanalmente\",\r\n\t\trepeat_radio_month: \"Mensualmente\",\r\n\t\trepeat_radio_year: \"Anualmente\",\r\n\t\trepeat_radio_day_type: \"Cada\",\r\n\t\trepeat_text_day_count: \"dia\",\r\n\t\trepeat_radio_day_type2: \"Cada jornada de trabajo\",\r\n\t\trepeat_week: \" Repetir cada\",\r\n\t\trepeat_text_week_count: \"semana:\",\r\n\t\trepeat_radio_month_type: \"Repita\",\r\n\t\trepeat_radio_month_start: \"El\",\r\n\t\trepeat_text_month_day: \"dia cada \",\r\n\t\trepeat_text_month_count: \"mes\",\r\n\t\trepeat_text_month_count2_before: \"cada\",\r\n\t\trepeat_text_month_count2_after: \"mes\",\r\n\t\trepeat_year_label: \"El\",\r\n\t\tselect_year_day2: \"del\",\r\n\t\trepeat_text_year_day: \"dia\",\r\n\t\tselect_year_month: \"mes\",\r\n\t\trepeat_radio_end: \"Sin fecha de finalización\",\r\n\t\trepeat_text_occurences_count: \"ocurrencias\",\r\n\t\trepeat_radio_end3: \"Fin\",\r\n\t\trepeat_radio_end2: \"Después de\",\r\n\t\tmonth_for_recurring: [\"Enero\", \"Febrero\", \"Маrzo\", \"Аbril\", \"Mayo\", \"Junio\", \"Julio\", \"Аgosto\", \"Setiembre\", \"Octubre\", \"Noviembre\", \"Diciembre\"],\r\n\t\tday_for_recurring: [\"Domingo\", \"Lunes\", \"Martes\", \"Miércoles\", \"Jeuves\", \"Viernes\", \"Sabado\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Tammikuu\", \"Helmikuu\", \"Maaliskuu\", \"Huhtikuu\", \"Toukokuu\", \"Kesäkuu\", \"Heinäkuu\", \"Elokuu\", \"Syyskuu\", \"Lokakuu\", \"Marraskuu\", \"Joulukuu\"],\r\n\t\tmonth_short: [\"Tam\", \"Hel\", \"Maa\", \"Huh\", \"Tou\", \"Kes\", \"Hei\", \"Elo\", \"Syy\", \"Lok\", \"Mar\", \"Jou\"],\r\n\t\tday_full: [\"Sunnuntai\", \"Maanantai\", \"Tiistai\", \"Keskiviikko\", \"Torstai\", \"Perjantai\", \"Lauantai\"],\r\n\t\tday_short: [\"Su\", \"Ma\", \"Ti\", \"Ke\", \"To\", \"Pe\", \"La\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Tänään\",\r\n\t\tday_tab: \"Päivä\",\r\n\t\tweek_tab: \"Viikko\",\r\n\t\tmonth_tab: \"Kuukausi\",\r\n\t\tnew_event: \"Uusi tapahtuma\",\r\n\t\ticon_save: \"Tallenna\",\r\n\t\ticon_cancel: \"Peru\",\r\n\t\ticon_details: \"Tiedot\",\r\n\t\ticon_edit: \"Muokkaa\",\r\n\t\ticon_delete: \"Poista\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Haluatko varmasti poistaa tapahtuman?\",\r\n\t\tsection_description: \"Kuvaus\",\r\n\t\tsection_time: \"Aikajakso\",\r\n\t\tfull_day: \"Koko päivä\",\r\n\r\n\t\tconfirm_recurring: \"Haluatko varmasti muokata toistuvan tapahtuman kaikkia jaksoja?\",\r\n\t\tsection_recurring: \"Toista tapahtuma\",\r\n\t\tbutton_recurring: \"Ei käytössä\",\r\n\t\tbutton_recurring_open: \"Käytössä\",\r\n\t\tbutton_edit_series: \"Muokkaa sarja\",\r\n\t\tbutton_edit_occurrence: \"Muokkaa kopio\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Esityslista\",\r\n\t\tdate: \"Päivämäärä\",\r\n\t\tdescription: \"Kuvaus\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Vuoden\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Esityslista\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Ritilä\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Luo uusi vetämällä\",\r\n\t\tdrag_to_move:\"Siirrä vetämällä\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Päivittäin\",\r\n\t\trepeat_radio_week: \"Viikoittain\",\r\n\t\trepeat_radio_month: \"Kuukausittain\",\r\n\t\trepeat_radio_year: \"Vuosittain\",\r\n\t\trepeat_radio_day_type: \"Joka\",\r\n\t\trepeat_text_day_count: \"päivä\",\r\n\t\trepeat_radio_day_type2: \"Joka arkipäivä\",\r\n\t\trepeat_week: \"Toista joka\",\r\n\t\trepeat_text_week_count: \"viikko näinä päivinä:\",\r\n\t\trepeat_radio_month_type: \"Toista\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \"päivänä joka\",\r\n\t\trepeat_text_month_count: \"kuukausi\",\r\n\t\trepeat_text_month_count2_before: \"joka\",\r\n\t\trepeat_text_month_count2_after: \"kuukausi\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"päivä\",\r\n\t\tselect_year_month: \"kuukausi\",\r\n\t\trepeat_radio_end: \"Ei loppumisaikaa\",\r\n\t\trepeat_text_occurences_count: \"Toiston jälkeen\",\r\n\t\trepeat_radio_end3: \"Loppuu\",\r\n\t\trepeat_radio_end2: \"\",\r\n\t\tmonth_for_recurring: [\"Tammikuu\", \"Helmikuu\", \"Maaliskuu\", \"Huhtikuu\", \"Toukokuu\", \"Kesäkuu\", \"Heinäkuu\", \"Elokuu\", \"Syyskuu\", \"Lokakuu\", \"Marraskuu\", \"Joulukuu\"],\r\n\t\tday_for_recurring: [\"Sunnuntai\", \"Maanantai\", \"Tiistai\", \"Keskiviikko\", \"Torstai\", \"Perjantai\", \"Lauantai\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Janvier\", \"Février\", \"Mars\", \"Avril\", \"Mai\", \"Juin\", \"Juillet\", \"Août\", \"Septembre\", \"Octobre\", \"Novembre\", \"Décembre\"],\r\n\t\tmonth_short: [\"Jan\", \"Fév\", \"Mar\", \"Avr\", \"Mai\", \"Juin\", \"Juil\", \"Aoû\", \"Sep\", \"Oct\", \"Nov\", \"Déc\"],\r\n\t\tday_full: [\"Dimanche\", \"Lundi\", \"Mardi\", \"Mercredi\", \"Jeudi\", \"Vendredi\", \"Samedi\"],\r\n\t\tday_short: [\"Dim\", \"Lun\", \"Mar\", \"Mer\", \"Jeu\", \"Ven\", \"Sam\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Aujourd'hui\",\r\n\t\tday_tab: \"Jour\",\r\n\t\tweek_tab: \"Semaine\",\r\n\t\tmonth_tab: \"Mois\",\r\n\t\tnew_event: \"Nouvel événement\",\r\n\t\ticon_save: \"Enregistrer\",\r\n\t\ticon_cancel: \"Annuler\",\r\n\t\ticon_details: \"Détails\",\r\n\t\ticon_edit: \"Modifier\",\r\n\t\ticon_delete: \"Effacer\",\r\n\t\tconfirm_closing: \"\", //Vos modifications seront perdus, êtes-vous sûr ?\r\n\t\tconfirm_deleting: \"L'événement sera effacé sans appel, êtes-vous sûr ?\",\r\n\t\tsection_description: \"Description\",\r\n\t\tsection_time: \"Période\",\r\n\t\tfull_day: \"Journée complète\",\r\n\r\n\t\tconfirm_recurring: \"Voulez-vous éditer toute une série d'évènements répétés?\",\r\n\t\tsection_recurring: \"Périodicité\",\r\n\t\tbutton_recurring: \"Désactivé\",\r\n\t\tbutton_recurring_open: \"Activé\",\r\n\t\tbutton_edit_series: \"Modifier la série\",\r\n\t\tbutton_edit_occurrence: \"Modifier une copie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Jour\",\r\n\t\tdate: \"Date\",\r\n\t\tdescription: \"Description\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Année\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Jour\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grille\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Quotidienne\",\r\n\t\trepeat_radio_week: \"Hebdomadaire\",\r\n\t\trepeat_radio_month: \"Mensuelle\",\r\n\t\trepeat_radio_year: \"Annuelle\",\r\n\t\trepeat_radio_day_type: \"Chaque\",\r\n\t\trepeat_text_day_count: \"jour\",\r\n\t\trepeat_radio_day_type2: \"Chaque journée de travail\",\r\n\t\trepeat_week: \" Répéter toutes les\",\r\n\t\trepeat_text_week_count: \"semaine:\",\r\n\t\trepeat_radio_month_type: \"Répéter\",\r\n\t\trepeat_radio_month_start: \"Le\",\r\n\t\trepeat_text_month_day: \"jour chaque\",\r\n\t\trepeat_text_month_count: \"mois\",\r\n\t\trepeat_text_month_count2_before: \"chaque\",\r\n\t\trepeat_text_month_count2_after: \"mois\",\r\n\t\trepeat_year_label: \"Le\",\r\n\t\tselect_year_day2: \"du\",\r\n\t\trepeat_text_year_day: \"jour\",\r\n\t\tselect_year_month: \"mois\",\r\n\t\trepeat_radio_end: \"Pas de date d"achèvement\",\r\n\t\trepeat_text_occurences_count: \"occurrences\",\r\n\t\trepeat_radio_end3: \"Fin\",\r\n\t\trepeat_radio_end2: \"Après\",\r\n\t\tmonth_for_recurring: [\"Janvier\", \"Février\", \"Mars\", \"Avril\", \"Mai\", \"Juin\", \"Juillet\", \"Août\", \"Septembre\", \"Octobre\", \"Novembre\", \"Décembre\"],\r\n\t\tday_for_recurring: [\"Dimanche\", \"Lundi\", \"Mardi\", \"Mercredi\", \"Jeudi\", \"Vendredi\", \"Samedi\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"ינואר\", \"פברואר\", \"מרץ\", \"אפריל\", \"מאי\", \"יוני\", \"יולי\", \"אוגוסט\", \"ספטמבר\", \"אוקטובר\", \"נובמבר\", \"דצמבר\"],\r\n\t\tmonth_short: [\"ינו\", \"פבר\", \"מרץ\", \"אפר\", \"מאי\", \"יונ\", \"יול\", \"אוג\", \"ספט\", \"אוק\", \"נוב\", \"דצמ\"],\r\n\t\tday_full: [\"ראשון\", \"שני\", \"שלישי\", \"רביעי\", \"חמישי\", \"שישי\", \"שבת\"],\r\n\t\tday_short: [\"א\", \"ב\", \"ג\", \"ד\", \"ה\", \"ו\", \"ש\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"היום\",\r\n\t\tday_tab: \"יום\",\r\n\t\tweek_tab: \"שבוע\",\r\n\t\tmonth_tab: \"חודש\",\r\n\t\tnew_event: \"ארוע חדש\",\r\n\t\ticon_save: \"שמור\",\r\n\t\ticon_cancel: \"בטל\",\r\n\t\ticon_details: \"פרטים\",\r\n\t\ticon_edit: \"ערוך\",\r\n\t\ticon_delete: \"מחק\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"ארוע ימחק סופית.להמשיך?\",\r\n\t\tsection_description: \"תיאור\",\r\n\t\tsection_time: \"תקופה\",\r\n\r\n\t\tconfirm_recurring: \"האם ברצונך לשנות כל סדרת ארועים מתמשכים?\",\r\n\t\tsection_recurring: \"להעתיק ארוע\",\r\n\t\tbutton_recurring: \"לא פעיל\",\r\n\t\tbutton_recurring_open: \"פעיל\",\r\n\t\tfull_day: \"יום שלם\",\r\n\t\tbutton_edit_series: \"ערוך את הסדרה\",\r\n\t\tbutton_edit_occurrence: \"עריכת עותק\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"סדר יום\",\r\n\t\tdate: \"תאריך\",\r\n\t\tdescription: \"תיאור\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"לשנה\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"סדר יום\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"סורג\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"גרור כדי להזיז\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"בטל\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"הבא\",\r\n\t\tprev: \"הקודם\",\r\n\t\tyear: \"שנה\",\r\n\t\tmonth: \"חודש\",\r\n\t\tday: \"יום\",\r\n\t\thour:\"שעה\",\r\n\t\tminute: \"דקה\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"יומי\",\r\n\t\trepeat_radio_week: \"שבועי\",\r\n\t\trepeat_radio_month: \"חודשי\",\r\n\t\trepeat_radio_year: \"שנתי\",\r\n\t\trepeat_radio_day_type: \"חזור כל\",\r\n\t\trepeat_text_day_count: \"ימים\",\r\n\t\trepeat_radio_day_type2: \"חזור כל יום עבודה\",\r\n\t\trepeat_week: \" חזור כל\",\r\n\t\trepeat_text_week_count: \"שבוע לפי ימים:\",\r\n\t\trepeat_radio_month_type: \"חזור כל\",\r\n\t\trepeat_radio_month_start: \"כל\",\r\n\t\trepeat_text_month_day: \"ימים כל\",\r\n\t\trepeat_text_month_count: \"חודשים\",\r\n\t\trepeat_text_month_count2_before: \"חזור כל\",\r\n\t\trepeat_text_month_count2_after: \"חודש\",\r\n\t\trepeat_year_label: \"כל\",\r\n\t\tselect_year_day2: \"בחודש\",\r\n\t\trepeat_text_year_day: \"ימים\",\r\n\t\tselect_year_month: \"חודש\",\r\n\t\trepeat_radio_end: \"לעולם לא מסתיים\",\r\n\t\trepeat_text_occurences_count: \"אירועים\",\r\n\t\trepeat_radio_end3: \"מסתיים ב\",\r\n\t\trepeat_radio_end2: \"אחרי\",\r\n\t\tmonth_for_recurring: [\"ינואר\", \"פברואר\", \"מרץ\", \"אפריל\", \"מאי\", \"יוני\", \"יולי\", \"אוגוסט\", \"ספטמבר\", \"אוקטובר\", \"נובמבר\", \"דצמבר\"],\r\n\t\tday_for_recurring: [\"ראשון\", \"שני\", \"שלישי\", \"רביעי\", \"חמישי\", \"שישי\", \"שבת\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Január\", \"Február\", \"Március\", \"Április\", \"Május\", \"Június\", \"Július\", \"Augusztus\", \"Szeptember\", \"Október\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Már\", \"Ápr\", \"Máj\", \"Jún\", \"Júl\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Vasárnap\", \"Hétfõ\", \"Kedd\", \"Szerda\", \"Csütörtök\", \"Péntek\", \"szombat\"],\r\n\t\tday_short: [\"Va\", \"Hé\", \"Ke\", \"Sze\", \"Csü\", \"Pé\", \"Szo\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Ma\",\r\n\t\tday_tab: \"Nap\",\r\n\t\tweek_tab: \"Hét\",\r\n\t\tmonth_tab: \"Hónap\",\r\n\t\tnew_event: \"Új esemény\",\r\n\t\ticon_save: \"Mentés\",\r\n\t\ticon_cancel: \"Mégse\",\r\n\t\ticon_details: \"Részletek\",\r\n\t\ticon_edit: \"Szerkesztés\",\r\n\t\ticon_delete: \"Törlés\",\r\n\t\tconfirm_closing: \"\", //A változások elvesznek, biztosan folytatja? \"\r\n\t\tconfirm_deleting: \"Az esemény törölve lesz, biztosan folytatja?\",\r\n\t\tsection_description: \"Leírás\",\r\n\t\tsection_time: \"Idõszak\",\r\n\t\tfull_day: \"Egesz napos\",\r\n\r\n\t\t/*ismétlõdõ események*/\r\n\t\tconfirm_recurring: \"Biztosan szerkeszteni akarod az összes ismétlõdõ esemény beállítását?\",\r\n\t\tsection_recurring: \"Esemény ismétlése\",\r\n\t\tbutton_recurring: \"Tiltás\",\r\n\t\tbutton_recurring_open: \"Engedélyezés\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Szerkesztés bíróság\",\r\n\r\n\t\t/*napirendi nézet*/\r\n\t\tagenda_tab: \"Napirend\",\r\n\t\tdate: \"Dátum\",\r\n\t\tdescription: \"Leírás\",\r\n\r\n\t\t/*éves nézet*/\r\n\t\tyear_tab: \"Év\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Maret\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Agustus\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mei\", \"Jun\", \"Jul\", \"Ags\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Minggu\", \"Senin\", \"Selasa\", \"Rabu\", \"Kamis\", \"Jumat\", \"Sabtu\"],\r\n\t\tday_short: [\"Ming\", \"Sen\", \"Sel\", \"Rab\", \"Kam\", \"Jum\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hari Ini\",\r\n\t\tday_tab: \"Hari\",\r\n\t\tweek_tab: \"Minggu\",\r\n\t\tmonth_tab: \"Bulan\",\r\n\t\tnew_event: \"Acara Baru\",\r\n\t\ticon_save: \"Simpan\",\r\n\t\ticon_cancel: \"Batal\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edit\",\r\n\t\ticon_delete: \"Hapus\",\r\n\t\tconfirm_closing: \"\", /*Perubahan tidak akan disimpan ?*/\r\n\t\tconfirm_deleting: \"Acara akan dihapus\",\r\n\t\tsection_description: \"Keterangan\",\r\n\t\tsection_time: \"Periode\",\r\n\t\tfull_day: \"Hari penuh\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Apakah acara ini akan berulang?\",\r\n\t\tsection_recurring: \"Acara Rutin\",\r\n\t\tbutton_recurring: \"Tidak Difungsikan\",\r\n\t\tbutton_recurring_open: \"Difungsikan\",\r\n\t\tbutton_edit_series: \"Mengedit seri\",\r\n\t\tbutton_edit_occurrence: \"Mengedit salinan\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Tanggal\",\r\n\t\tdescription: \"Keterangan\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Tahun\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabel\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Gennaio\", \"Febbraio\", \"Marzo\", \"Aprile\", \"Maggio\", \"Giugno\", \"Luglio\", \"Agosto\", \"Settembre\", \"Ottobre\", \"Novembre\", \"Dicembre\"],\r\n\t\tmonth_short: [\"Gen\", \"Feb\", \"Mar\", \"Apr\", \"Mag\", \"Giu\", \"Lug\", \"Ago\", \"Set\", \"Ott\", \"Nov\", \"Dic\"],\r\n\t\tday_full: [\"Domenica\", \"Lunedì\", \"Martedì\", \"Mercoledì\", \"Giovedì\", \"Venerdì\", \"Sabato\"],\r\n\t\tday_short: [\"Dom\", \"Lun\", \"Mar\", \"Mer\", \"Gio\", \"Ven\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Oggi\",\r\n\t\tday_tab: \"Giorno\",\r\n\t\tweek_tab: \"Settimana\",\r\n\t\tmonth_tab: \"Mese\",\r\n\t\tnew_event: \"Nuovo evento\",\r\n\t\ticon_save: \"Salva\",\r\n\t\ticon_cancel: \"Chiudi\",\r\n\t\ticon_details: \"Dettagli\",\r\n\t\ticon_edit: \"Modifica\",\r\n\t\ticon_delete: \"Elimina\",\r\n\t\tconfirm_closing: \"\", //Le modifiche apportate saranno perse, siete sicuri?\r\n\t\tconfirm_deleting: \"L'evento sarà eliminato, siete sicuri?\",\r\n\t\tsection_description: \"Descrizione\",\r\n\t\tsection_time: \"Periodo di tempo\",\r\n\t\tfull_day: \"Intera giornata\",\r\n\r\n\t\tconfirm_recurring: \"Vuoi modificare l'intera serie di eventi?\",\r\n\t\tsection_recurring: \"Ripetere l'evento\",\r\n\t\tbutton_recurring: \"Disattivato\",\r\n\t\tbutton_recurring_open: \"Attivato\",\r\n\t\tbutton_edit_series: \"Modificare la serie\",\r\n\t\tbutton_edit_occurrence: \"Modificare una copia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descrizione\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Anno\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Griglia\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Quotidiano\",\r\n\t\trepeat_radio_week: \"Settimanale\",\r\n\t\trepeat_radio_month: \"Mensile\",\r\n\t\trepeat_radio_year: \"Annuale\",\r\n\t\trepeat_radio_day_type: \"Ogni\",\r\n\t\trepeat_text_day_count: \"giorno\",\r\n\t\trepeat_radio_day_type2: \"Ogni giornata lavorativa\",\r\n\t\trepeat_week: \" Ripetere ogni\",\r\n\t\trepeat_text_week_count: \"settimana:\",\r\n\t\trepeat_radio_month_type: \"Ripetere\",\r\n\t\trepeat_radio_month_start: \"Il\",\r\n\t\trepeat_text_month_day: \"giorno ogni\",\r\n\t\trepeat_text_month_count: \"mese\",\r\n\t\trepeat_text_month_count2_before: \"ogni\",\r\n\t\trepeat_text_month_count2_after: \"mese\",\r\n\t\trepeat_year_label: \"Il\",\r\n\t\tselect_year_day2: \"del\",\r\n\t\trepeat_text_year_day: \"giorno\",\r\n\t\tselect_year_month: \"mese\",\r\n\t\trepeat_radio_end: \"Senza data finale\",\r\n\t\trepeat_text_occurences_count: \"occorenze\",\r\n\t\trepeat_radio_end3: \"Fine\",\r\n\t\trepeat_radio_end2: \"Dopo\",\r\n\t\tmonth_for_recurring: [\"Gennaio\", \"Febbraio\", \"Marzo\", \"Aprile\", \"Maggio\", \"Jiugno\", \"Luglio\", \"Agosto\", \"Settembre\", \"Ottobre\", \"Novembre\", \"Dicembre\"],\r\n\t\tday_for_recurring: [\"Domenica\", \"Lunedì\", \"Martedì\", \"Mercoledì\", \"Jovedì\", \"Venerdì\", \"Sabato\"]\r\n\t}\r\n};\r\n","/*\r\n Translation by Genexus Japan Inc.\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tmonth_short: [ \"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tday_full: [\"日曜日\", \"月曜日\", \"火曜日\", \"水曜日\", \"木曜日\", \"金曜日\", \"土曜日\"],\r\n\t\tday_short: [\"日\", \"月\", \"火\", \"水\", \"木\", \"金\", \"土\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"今日\",\r\n\t\tday_tab: \"日\",\r\n\t\tweek_tab: \"週\",\r\n\t\tmonth_tab: \"月\",\r\n\t\tnew_event: \"新イベント\",\r\n\t\ticon_save: \"保存\",\r\n\t\ticon_cancel: \"キャンセル\",\r\n\t\ticon_details: \"詳細\",\r\n\t\ticon_edit: \"編集\",\r\n\t\ticon_delete: \"削除\",\r\n\t\tconfirm_closing: \"\", //変更が取り消されます、宜しいですか?\r\n\t\tconfirm_deleting: \"イベント完全に削除されます、宜しいですか?\",\r\n\t\tsection_description: \"デスクリプション\",\r\n\t\tsection_time: \"期間\",\r\n\t\tconfirm_recurring: \"繰り返されているイベントを全て編集しますか?\",\r\n\t\tsection_recurring: \"イベントを繰り返す\",\r\n\t\tbutton_recurring: \"無効\",\r\n\t\tbutton_recurring_open: \"有効\",\r\n\t\tfull_day: \"終日\",\r\n\t\tbutton_edit_series: \"シリーズを編集します\",\r\n\t\tbutton_edit_occurrence: \"コピーを編集\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"議題は\",\r\n\t\tdate: \"日付\",\r\n\t\tdescription: \"説明\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"今年\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"議題は\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"グリッド\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};\r\n\r\n\r\n","export default class LocaleManager{\r\n\tconstructor(config){\r\n\t\tthis._locales = {};\r\n\t\tfor(const i in config){\r\n\t\t\tthis._locales[i] = config[i];\r\n\t\t}\r\n\t}\r\n\r\n\taddLocale(name, locale) {\r\n\t\tthis._locales[name] = locale;\r\n\t}\r\n\r\n\tgetLocale(name) {\r\n\t\treturn this._locales[name];\r\n\t}\r\n}","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Mon\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"I dag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uke\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny hendelse\",\r\n\t\ticon_save: \"Lagre\",\r\n\t\ticon_cancel: \"Avbryt\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Rediger\",\r\n\t\ticon_delete: \"Slett\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Hendelsen vil bli slettet permanent. Er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du forandre hele dette settet av repeterende hendelser?\",\r\n\t\tsection_recurring: \"Repeter hendelsen\",\r\n\t\tbutton_recurring: \"Av\",\r\n\t\tbutton_recurring_open: \"På\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Redigere en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daglig\",\r\n\t\trepeat_radio_week: \"Ukentlig\",\r\n\t\trepeat_radio_month: \"Månedlig\",\r\n\t\trepeat_radio_year: \"Årlig\",\r\n\t\trepeat_radio_day_type: \"Hver\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"Alle hverdager\",\r\n\t\trepeat_week: \" Gjentas hver\",\r\n\t\trepeat_text_week_count: \"uke på:\",\r\n\t\trepeat_radio_month_type: \"På hver\",\r\n\t\trepeat_radio_month_start: \"På\",\r\n\t\trepeat_text_month_day: \"dag hver\",\r\n\t\trepeat_text_month_count: \"måned\",\r\n\t\trepeat_text_month_count2_before: \"hver\",\r\n\t\trepeat_text_month_count2_after: \"måned\",\r\n\t\trepeat_year_label: \"på\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Ingen sluttdato\",\r\n\t\trepeat_text_occurences_count: \"forekomst\",\r\n\t\trepeat_radio_end3: \"Stop den\",\r\n\t\trepeat_radio_end2: \"Etter\",\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tday_for_recurring: [\"Sondag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Maart\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Augustus\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"mrt\", \"Apr\", \"Mei\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Zondag\", \"Maandag\", \"Dinsdag\", \"Woensdag\", \"Donderdag\", \"Vrijdag\", \"Zaterdag\"],\r\n\t\tday_short: [\"Zo\", \"Ma\", \"Di\", \"Wo\", \"Do\", \"Vr\", \"Za\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Vandaag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Week\",\r\n\t\tmonth_tab: \"Maand\",\r\n\t\tnew_event: \"Nieuw item\",\r\n\t\ticon_save: \"Opslaan\",\r\n\t\ticon_cancel: \"Annuleren\",\r\n\t\ticon_details: \"Details\",\r\n\t\ticon_edit: \"Bewerken\",\r\n\t\ticon_delete: \"Verwijderen\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Item zal permanent worden verwijderd, doorgaan?\",\r\n\t\tsection_description: \"Beschrijving\",\r\n\t\tsection_time: \"Tijd periode\",\r\n\t\tfull_day: \"Hele dag\",\r\n\r\n\t\tconfirm_recurring: \"Wilt u alle terugkerende items bijwerken?\",\r\n\t\tsection_recurring: \"Item herhalen\",\r\n\t\tbutton_recurring: \"Uit\",\r\n\t\tbutton_recurring_open: \"Aan\",\r\n\t\tbutton_edit_series: \"Bewerk de serie\",\r\n\t\tbutton_edit_occurrence: \"Bewerk een kopie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Omschrijving\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Jaar\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabel\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Dagelijks\",\r\n\t\trepeat_radio_week: \"Wekelijks\",\r\n\t\trepeat_radio_month: \"Maandelijks\",\r\n\t\trepeat_radio_year: \"Jaarlijks\",\r\n\t\trepeat_radio_day_type: \"Elke\",\r\n\t\trepeat_text_day_count: \"dag(en)\",\r\n\t\trepeat_radio_day_type2: \"Elke werkdag\",\r\n\t\trepeat_week: \" Herhaal elke\",\r\n\t\trepeat_text_week_count: \"week op de volgende dagen:\",\r\n\t\trepeat_radio_month_type: \"Herhaal\",\r\n\t\trepeat_radio_month_start: \"Op\",\r\n\t\trepeat_text_month_day: \"dag iedere\",\r\n\t\trepeat_text_month_count: \"maanden\",\r\n\t\trepeat_text_month_count2_before: \"iedere\",\r\n\t\trepeat_text_month_count2_after: \"maanden\",\r\n\t\trepeat_year_label: \"Op\",\r\n\t\tselect_year_day2: \"van\",\r\n\t\trepeat_text_year_day: \"dag\",\r\n\t\tselect_year_month: \"maand\",\r\n\t\trepeat_radio_end: \"Geen eind datum\",\r\n\t\trepeat_text_occurences_count: \"keren\",\r\n\t\trepeat_radio_end3: \"Eindigd per\",\r\n\t\trepeat_radio_end2: \"Na\",\r\n\t\tmonth_for_recurring: [\"Januari\", \"Februari\", \"Maart\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Augustus\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Zondag\", \"Maandag\", \"Dinsdag\", \"Woensdag\", \"Donderdag\", \"Vrijdag\", \"Zaterdag\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Man\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uke\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny\",\r\n\t\ticon_save: \"Lagre\",\r\n\t\ticon_cancel: \"Avbryt\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Endre\",\r\n\t\ticon_delete: \"Slett\",\r\n\t\tconfirm_closing: \"Endringer blir ikke lagret, er du sikker?\", //Endringer blir ikke lagret, er du sikker?\r\n\t\tconfirm_deleting: \"Oppføringen vil bli slettet, er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\t\tfull_day: \"Full dag\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du endre hele settet med repeterende oppføringer?\",\r\n\t\tsection_recurring: \"Repeterende oppføring\",\r\n\t\tbutton_recurring: \"Ikke aktiv\",\r\n\t\tbutton_recurring_open: \"Aktiv\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Redigere en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Styczeń\", \"Luty\", \"Marzec\", \"Kwiecień\", \"Maj\", \"Czerwiec\", \"Lipiec\", \"Sierpień\", \"Wrzesień\", \"Październik\", \"Listopad\", \"Grudzień\"],\r\n\t\tmonth_short: [\"Sty\", \"Lut\", \"Mar\", \"Kwi\", \"Maj\", \"Cze\", \"Lip\", \"Sie\", \"Wrz\", \"Paź\", \"Lis\", \"Gru\"],\r\n\t\tday_full: [\"Niedziela\", \"Poniedziałek\", \"Wtorek\", \"Środa\", \"Czwartek\", \"Piątek\", \"Sobota\"],\r\n\t\tday_short: [\"Nie\", \"Pon\", \"Wto\", \"Śro\", \"Czw\", \"Pią\", \"Sob\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dziś\",\r\n\t\tday_tab: \"Dzień\",\r\n\t\tweek_tab: \"Tydzień\",\r\n\t\tmonth_tab: \"Miesiąc\",\r\n\t\tnew_event: \"Nowe zdarzenie\",\r\n\t\ticon_save: \"Zapisz\",\r\n\t\ticon_cancel: \"Anuluj\",\r\n\t\ticon_details: \"Szczegóły\",\r\n\t\ticon_edit: \"Edytuj\",\r\n\t\ticon_delete: \"Usuń\",\r\n\t\tconfirm_closing: \"\", //Zmiany zostaną usunięte, jesteś pewien?\r\n\t\tconfirm_deleting: \"Zdarzenie zostanie usunięte na zawsze, kontynuować?\",\r\n\t\tsection_description: \"Opis\",\r\n\t\tsection_time: \"Okres czasu\",\r\n\t\tfull_day: \"Cały dzień\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Czy chcesz edytować cały zbiór powtarzających się zdarzeń?\",\r\n\t\tsection_recurring: \"Powtórz zdarzenie\",\r\n\t\tbutton_recurring: \"Nieaktywne\",\r\n\t\tbutton_recurring_open: \"Aktywne\",\r\n\t\tbutton_edit_series: \"Edytuj serię\",\r\n\t\tbutton_edit_occurrence: \"Edytuj kopię\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Opis\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabela\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Codziennie\",\r\n\t\trepeat_radio_week: \"Co tydzie\",\r\n\t\trepeat_radio_month: \"Co miesic\",\r\n\t\trepeat_radio_year: \"Co rok\",\r\n\t\trepeat_radio_day_type: \"Kadego\",\r\n\t\trepeat_text_day_count: \"dnia\",\r\n\t\trepeat_radio_day_type2: \"Kadego dnia roboczego\",\r\n\t\trepeat_week: \" Powtarzaj kadego\",\r\n\t\trepeat_text_week_count: \"tygodnia w dni:\",\r\n\t\trepeat_radio_month_type: \"Powtrz\",\r\n\t\trepeat_radio_month_start: \"W\",\r\n\t\trepeat_text_month_day: \"dnia kadego\",\r\n\t\trepeat_text_month_count: \"miesica\",\r\n\t\trepeat_text_month_count2_before: \"kadego\",\r\n\t\trepeat_text_month_count2_after: \"miesica\",\r\n\t\trepeat_year_label: \"W\",\r\n\t\tselect_year_day2: \"miesica\",\r\n\t\trepeat_text_year_day: \"dnia miesica\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Bez daty kocowej\",\r\n\t\trepeat_text_occurences_count: \"wystpieniu/ach\",\r\n\t\trepeat_radio_end3: \"Zakocz w\",\r\n\t\trepeat_radio_end2: \"Po\",\r\n\t\tmonth_for_recurring: [\"Stycznia\", \"Lutego\", \"Marca\", \"Kwietnia\", \"Maja\", \"Czerwca\", \"Lipca\", \"Sierpnia\", \"Wrzenia\", \"Padziernka\", \"Listopada\", \"Grudnia\"],\r\n\t\tday_for_recurring: [\"Niedziela\", \"Poniedziaek\", \"Wtorek\", \"roda\", \"Czwartek\", \"Pitek\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","/*\r\n\r\n TRANSLATION BY MATTHEUS PIROVANI RORIZ GONЗALVES\r\n\r\n mattheusroriz@hotmail.com / mattheus.pirovani@gmail.com /\r\n\r\n www.atrixian.com.br\r\n\r\n */\r\n\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Janeiro\", \"Fevereiro\", \"Março\", \"Abril\", \"Maio\", \"Junho\", \"Julho\", \"Agosto\", \"Setembro\", \"Outubro\", \"Novembro\", \"Dezembro\"],\r\n\t\tmonth_short: [\"Jan\", \"Fev\", \"Mar\", \"Abr\", \"Mai\", \"Jun\", \"Jul\", \"Ago\", \"Set\", \"Out\", \"Nov\", \"Dez\"],\r\n\t\tday_full: [\"Domingo\", \"Segunda\", \"Terça\", \"Quarta\", \"Quinta\", \"Sexta\", \"Sábado\"],\r\n\t\tday_short: [\"Dom\", \"Seg\", \"Ter\", \"Qua\", \"Qui\", \"Sex\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hoje\",\r\n\t\tday_tab: \"Dia\",\r\n\t\tweek_tab: \"Semana\",\r\n\t\tmonth_tab: \"Mês\",\r\n\t\tnew_event: \"Novo evento\",\r\n\t\ticon_save: \"Salvar\",\r\n\t\ticon_cancel: \"Cancelar\",\r\n\t\ticon_details: \"Detalhes\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Deletar\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Tem certeza que deseja excluir?\",\r\n\t\tsection_description: \"Descrição\",\r\n\t\tsection_time: \"Período de tempo\",\r\n\t\tfull_day: \"Dia inteiro\",\r\n\r\n\t\tconfirm_recurring: \"Deseja editar todos esses eventos repetidos?\",\r\n\t\tsection_recurring: \"Repetir evento\",\r\n\t\tbutton_recurring: \"Desabilitar\",\r\n\t\tbutton_recurring_open: \"Habilitar\",\r\n\t\tbutton_edit_series: \"Editar a série\",\r\n\t\tbutton_edit_occurrence: \"Editar uma cópia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dia\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descrição\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Ano\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dia\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grade\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Diário\",\r\n\t\trepeat_radio_week: \"Semanal\",\r\n\t\trepeat_radio_month: \"Mensal\",\r\n\t\trepeat_radio_year: \"Anual\",\r\n\t\trepeat_radio_day_type: \"Cada\",\r\n\t\trepeat_text_day_count: \"dia(s)\",\r\n\t\trepeat_radio_day_type2: \"Cada trabalho diário\",\r\n\t\trepeat_week: \" Repita cada\",\r\n\t\trepeat_text_week_count: \"semana:\",\r\n\t\trepeat_radio_month_type: \"Repetir\",\r\n\t\trepeat_radio_month_start: \"Em\",\r\n\t\trepeat_text_month_day: \"todo dia\",\r\n\t\trepeat_text_month_count: \"mês\",\r\n\t\trepeat_text_month_count2_before: \"todo\",\r\n\t\trepeat_text_month_count2_after: \"mês\",\r\n\t\trepeat_year_label: \"Em\",\r\n\t\tselect_year_day2: \"of\",\r\n\t\trepeat_text_year_day: \"dia\",\r\n\t\tselect_year_month: \"mês\",\r\n\t\trepeat_radio_end: \"Sem data final\",\r\n\t\trepeat_text_occurences_count: \"ocorrências\",\r\n\t\trepeat_radio_end3: \"Fim\",\r\n\t\trepeat_radio_end2: \"Depois\",\r\n\t\tmonth_for_recurring: [\"Janeiro\", \"Fevereiro\", \"Março\", \"Abril\", \"Maio\", \"Junho\", \"Julho\", \"Agosto\", \"Setembro\", \"Outubro\", \"Novembro\", \"Dezembro\"],\r\n\t\tday_for_recurring: [\"Domingo\", \"Segunda\", \"Terça\", \"Quarta\", \"Quinta\", \"Sexta\", \"Sábado\"]\r\n\t}\r\n};\r\n\r\n\r\n","/*\r\n\tTraducere de Ovidiu Lixandru: http://www.madball.ro\r\n */\r\n\r\nexport default {\r\n\tdate:{\r\n\t\tmonth_full:[\"Ianuarie\", \"Februarie\", \"Martie\", \"Aprilie\", \"Mai\", \"Iunie\", \"Iulie\", \"August\", \"Septembrie\", \"Octombrie\", \"November\", \"December\"],\r\n\t\tmonth_short:[\"Ian\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Iun\", \"Iul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\r\n\t\tday_full:[\"Duminica\", \"Luni\", \"Marti\", \"Miercuri\", \"Joi\", \"Vineri\", \"Sambata\"],\r\n\t\tday_short:[\"Du\", \"Lu\", \"Ma\", \"Mi\", \"Jo\", \"Vi\", \"Sa\"]\r\n\t},\r\n\tlabels:{\r\n\t\tdhx_cal_today_button:\"Astazi\",\r\n\t\tday_tab:\"Zi\",\r\n\t\tweek_tab:\"Saptamana\",\r\n\t\tmonth_tab:\"Luna\",\r\n\t\tnew_event:\"Eveniment nou\",\r\n\t\ticon_save:\"Salveaza\",\r\n\t\ticon_cancel:\"Anuleaza\",\r\n\t\ticon_details:\"Detalii\",\r\n\t\ticon_edit:\"Editeaza\",\r\n\t\ticon_delete:\"Sterge\",\r\n\t\tconfirm_closing:\"Schimbarile nu vor fi salvate, esti sigur?\",//Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting:\"Evenimentul va fi sters permanent, esti sigur?\",\r\n\t\tsection_description:\"Descriere\",\r\n\t\tsection_time:\"Interval\",\r\n\t\tfull_day:\"Toata ziua\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring:\"Vrei sa editezi toata seria de evenimente repetate?\",\r\n\t\tsection_recurring:\"Repetare\",\r\n\t\tbutton_recurring:\"Dezactivata\",\r\n\t\tbutton_recurring_open:\"Activata\",\r\n\t\tbutton_edit_series: \"Editeaza serie\",\r\n\t\tbutton_edit_occurrence: \"Editeaza doar intrare\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"Agenda\",\r\n\t\tdate:\"Data\",\r\n\t\tdescription:\"Descriere\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"An\",\r\n\r\n\t\t/* week agenda extension */\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Lista\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Zilnic\",\r\n\t\trepeat_radio_week: \"Saptamanal\",\r\n\t\trepeat_radio_month: \"Lunar\",\r\n\t\trepeat_radio_year: \"Anual\",\r\n\t\trepeat_radio_day_type: \"La fiecare\",\r\n\t\trepeat_text_day_count: \"zi(le)\",\r\n\t\trepeat_radio_day_type2: \"Fiecare zi lucratoare\",\r\n\t\trepeat_week: \" Repeta la fiecare\",\r\n\t\trepeat_text_week_count: \"saptamana in urmatoarele zile:\",\r\n\t\trepeat_radio_month_type: \"Repeta in\",\r\n\t\trepeat_radio_month_start: \"In a\",\r\n\t\trepeat_text_month_day: \"zi la fiecare\",\r\n\t\trepeat_text_month_count: \"luni\",\r\n\t\trepeat_text_month_count2_before: \"la fiecare\",\r\n\t\trepeat_text_month_count2_after: \"luni\",\r\n\t\trepeat_year_label: \"In\",\r\n\t\tselect_year_day2: \"a lunii\",\r\n\t\trepeat_text_year_day: \"zi a lunii\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Fara data de sfarsit\",\r\n\t\trepeat_text_occurences_count: \"evenimente\",\r\n\t\trepeat_radio_end3: \"La data\",\r\n\t\trepeat_radio_end2: \"Dupa\",\r\n\t\tmonth_for_recurring: [\"Ianuarie\", \"Februarie\", \"Martie\", \"Aprilie\", \"Mai\", \"Iunie\", \"Iulie\", \"August\", \"Septembrie\", \"Octombrie\", \"Noiembrie\", \"Decembrie\"],\r\n\t\tday_for_recurring: [\"Duminica\", \"Luni\", \"Marti\", \"Miercuri\", \"Joi\", \"Vineri\", \"Sambata\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Январь\", \"Февраль\", \"Март\", \"Апрель\", \"Maй\", \"Июнь\", \"Июль\", \"Август\", \"Сентябрь\", \"Oктябрь\", \"Ноябрь\", \"Декабрь\"],\r\n\t\tmonth_short: [\"Янв\", \"Фев\", \"Maр\", \"Aпр\", \"Maй\", \"Июн\", \"Июл\", \"Aвг\", \"Сен\", \"Окт\", \"Ноя\", \"Дек\"],\r\n\t\tday_full: [ \"Воскресенье\", \"Понедельник\", \"Вторник\", \"Среда\", \"Четверг\", \"Пятница\", \"Суббота\"],\r\n\t\tday_short: [\"Вс\", \"Пн\", \"Вт\", \"Ср\", \"Чт\", \"Пт\", \"Сб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сегодня\",\r\n\t\tday_tab: \"День\",\r\n\t\tweek_tab: \"Неделя\",\r\n\t\tmonth_tab: \"Месяц\",\r\n\t\tnew_event: \"Новое событие\",\r\n\t\ticon_save: \"Сохранить\",\r\n\t\ticon_cancel: \"Отменить\",\r\n\t\ticon_details: \"Детали\",\r\n\t\ticon_edit: \"Изменить\",\r\n\t\ticon_delete: \"Удалить\",\r\n\t\tconfirm_closing: \"\", //Ваши изменения будут потеряны, продолжить?\r\n\t\tconfirm_deleting: \"Событие будет удалено безвозвратно, продолжить?\",\r\n\t\tsection_description: \"Описание\",\r\n\t\tsection_time: \"Период времени\",\r\n\t\tfull_day: \"Весь день\",\r\n\r\n\t\tconfirm_recurring: \"Вы хотите изменить всю серию повторяющихся событий?\",\r\n\t\tsection_recurring: \"Повторение\",\r\n\t\tbutton_recurring: \"Отключено\",\r\n\t\tbutton_recurring_open: \"Включено\",\r\n\t\tbutton_edit_series: \"Редактировать серию\",\r\n\t\tbutton_edit_occurrence: \"Редактировать экземпляр\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Список\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Описание\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Год\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Список\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Таблица\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"День\",\r\n\t\trepeat_radio_week: \"Неделя\",\r\n\t\trepeat_radio_month: \"Месяц\",\r\n\t\trepeat_radio_year: \"Год\",\r\n\t\trepeat_radio_day_type: \"Каждый\",\r\n\t\trepeat_text_day_count: \"день\",\r\n\t\trepeat_radio_day_type2: \"Каждый рабочий день\",\r\n\t\trepeat_week: \" Повторять каждую\",\r\n\t\trepeat_text_week_count: \"неделю , в:\",\r\n\t\trepeat_radio_month_type: \"Повторять\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" числа каждый \",\r\n\t\trepeat_text_month_count: \"месяц\",\r\n\t\trepeat_text_month_count2_before: \"каждый \",\r\n\t\trepeat_text_month_count2_after: \"месяц\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"день\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без даты окончания\",\r\n\t\trepeat_text_occurences_count: \"повторений\",\r\n\t\trepeat_radio_end3: \"До \",\r\n\t\trepeat_radio_end2: \"\",\r\n\t\tmonth_for_recurring: [\"Января\", \"Февраля\", \"Марта\", \"Апреля\", \"Мая\", \"Июня\", \"Июля\", \"Августа\", \"Сентября\", \"Октября\", \"Ноября\", \"Декабря\"],\r\n\t\tday_for_recurring: [\"Воскресенье\", \"Понедельник\", \"Вторник\", \"Среду\", \"Четверг\", \"Пятницу\", \"Субботу\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Marec\", \"April\", \"Maj\", \"Junij\", \"Julij\", \"Avgust\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Nedelja\", \"Ponedeljek\", \"Torek\", \"Sreda\", \"Četrtek\", \"Petek\", \"Sobota\"],\r\n\t\tday_short: [\"Ned\", \"Pon\", \"Tor\", \"Sre\", \"Čet\", \"Pet\", \"Sob\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Danes\",\r\n\t\tday_tab: \"Dan\",\r\n\t\tweek_tab: \"Teden\",\r\n\t\tmonth_tab: \"Mesec\",\r\n\t\tnew_event: \"Nov dogodek\",\r\n\t\ticon_save: \"Shrani\",\r\n\t\ticon_cancel: \"Prekliči\",\r\n\t\ticon_details: \"Podrobnosti\",\r\n\t\ticon_edit: \"Uredi\",\r\n\t\ticon_delete: \"Izbriši\",\r\n\t\tconfirm_closing: \"\", //Spremembe ne bodo shranjene. Želite nadaljevati ?\r\n\t\tconfirm_deleting: \"Dogodek bo izbrisan. Želite nadaljevati?\",\r\n\t\tsection_description: \"Opis\",\r\n\t\tsection_time: \"Časovni okvir\",\r\n\t\tfull_day: \"Ves dan\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Želite urediti celoten set ponavljajočih dogodkov?\",\r\n\t\tsection_recurring: \"Ponovi dogodek\",\r\n\t\tbutton_recurring: \"Onemogočeno\",\r\n\t\tbutton_recurring_open: \"Omogočeno\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Edit occurrence\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Zadeva\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Opis\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Leto\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Zadeva\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Miza\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Január\", \"Február\", \"Marec\", \"Apríl\", \"Máj\", \"Jún\", \"Júl\", \"August\", \"September\", \"Október\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Máj\", \"Jún\", \"Júl\", \"Aug\", \"Sept\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Nedeľa\", \"Pondelok\", \"Utorok\", \"Streda\", \"Štvrtok\", \"Piatok\", \"Sobota\"],\r\n\t\tday_short: [\"Ne\", \"Po\", \"Ut\", \"St\", \"Št\", \"Pi\", \"So\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dnes\",\r\n\t\tday_tab: \"Deň\",\r\n\t\tweek_tab: \"Týždeň\",\r\n\t\tmonth_tab: \"Mesiac\",\r\n\t\tnew_event: \"Nová udalosť\",\r\n\t\ticon_save: \"Uložiť\",\r\n\t\ticon_cancel: \"Späť\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edituj\",\r\n\t\ticon_delete: \"Zmazať\",\r\n\t\tconfirm_closing: \"Vaše zmeny nebudú uložené. Skutočne?\", //Vaše změny budou ztraceny, opravdu ?\r\n\t\tconfirm_deleting: \"Udalosť bude natrvalo vymazaná. Skutočne?\",\r\n\t\tsection_description: \"Poznámky\",\r\n\t\tsection_time: \"Doba platnosti\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Prajete si upraviť celú radu opakovaných udalostí?\",\r\n\t\tsection_recurring: \"Opakovanie udalosti\",\r\n\t\tbutton_recurring: \"Vypnuté\",\r\n\t\tbutton_recurring_open: \"Zapnuté\",\r\n\t\tbutton_edit_series: \"Upraviť opakovania\",\r\n\t\tbutton_edit_occurrence: \"Upraviť inštancie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Program\",\r\n\t\tdate: \"Dátum\",\r\n\t\tdescription: \"Poznámka\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\t\tfull_day: \"Celý deň\", // Full day\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Program\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Mriežka\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Denne\",\r\n\t\trepeat_radio_week: \"Týždenne\",\r\n\t\trepeat_radio_month: \"Mesaène\",\r\n\t\trepeat_radio_year: \"Roène\",\r\n\t\trepeat_radio_day_type: \"Každý\",\r\n\t\trepeat_text_day_count: \"deò\",\r\n\t\trepeat_radio_day_type2: \"Každý prac. deò\",\r\n\t\trepeat_week: \"Opakova každý\",\r\n\t\trepeat_text_week_count: \"týždeò v dòoch:\",\r\n\t\trepeat_radio_month_type: \"Opakova\",\r\n\t\trepeat_radio_month_start: \"On\",\r\n\t\trepeat_text_month_day: \"deò každý\",\r\n\t\trepeat_text_month_count: \"mesiac\",\r\n\t\trepeat_text_month_count2_before: \"každý\",\r\n\t\trepeat_text_month_count2_after: \"mesiac\",\r\n\t\trepeat_year_label: \"On\",\r\n\t\tselect_year_day2: \"poèas\",\r\n\t\trepeat_text_year_day: \"deò\",\r\n\t\tselect_year_month: \"mesiac\",\r\n\t\trepeat_radio_end: \"Bez dátumu ukonèenia\",\r\n\t\trepeat_text_occurences_count: \"udalostiach\",\r\n\t\trepeat_radio_end3: \"Ukonèi\",\r\n\t\trepeat_radio_end2: \"Po\",\r\n\t\tmonth_for_recurring: [\"Január\", \"Február\", \"Marec\", \"Apríl\", \"Máj\", \"Jún\", \"Júl\", \"August\", \"September\", \"Október\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Nede¾a\", \"Pondelok\", \"Utorok\", \"Streda\", \"Štvrtok\", \"Piatok\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Mars\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"Augusti\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Söndag\", \"Måndag\", \"Tisdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lördag\"],\r\n\t\tday_short: [\"Sön\", \"Mån\", \"Tis\", \"Ons\", \"Tor\", \"Fre\", \"Lör\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Vecka\",\r\n\t\tmonth_tab: \"Månad\",\r\n\t\tnew_event: \"Ny händelse\",\r\n\t\ticon_save: \"Spara\",\r\n\t\ticon_cancel: \"Ångra\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Ändra\",\r\n\t\ticon_delete: \"Ta bort\",\r\n\t\tconfirm_closing: \"\", //Dina förändingar kommer gå förlorade, är du säker?\r\n\t\tconfirm_deleting: \"Är du säker på att du vill ta bort händelsen permanent?\",\r\n\t\tsection_description: \"Beskrivning\",\r\n\t\tsection_time: \"Tid\",\r\n\t\tfull_day: \"Hela dagen\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vill du redigera hela serien med repeterande händelser?\",\r\n\t\tsection_recurring: \"Upprepa händelse\",\r\n\t\tbutton_recurring: \"Inaktiverat\",\r\n\t\tbutton_recurring_open: \"Aktiverat\",\r\n\t\tbutton_edit_series: \"Redigera serien\",\r\n\t\tbutton_edit_occurrence: \"Redigera en kopia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dagordning\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Beskrivning\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dagordning\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Galler\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Dra för att skapa ny\",\r\n\t\tdrag_to_move:\"Dra för att flytta\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Dagligen\",\r\n\t\trepeat_radio_week: \"Veckovis\",\r\n\t\trepeat_radio_month: \"Månadsvis\",\r\n\t\trepeat_radio_year: \"Årligen\",\r\n\t\trepeat_radio_day_type: \"Var\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"Varje arbetsdag\",\r\n\t\trepeat_week: \" Upprepa var\",\r\n\t\trepeat_text_week_count: \"vecka dessa dagar:\",\r\n\t\trepeat_radio_month_type: \"Upprepa\",\r\n\t\trepeat_radio_month_start: \"Den\",\r\n\t\trepeat_text_month_day: \"dagen var\",\r\n\t\trepeat_text_month_count: \"månad\",\r\n\t\trepeat_text_month_count2_before: \"var\",\r\n\t\trepeat_text_month_count2_after: \"månad\",\r\n\t\trepeat_year_label: \"Den\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"månad\",\r\n\t\trepeat_radio_end: \"Inget slutdatum\",\r\n\t\trepeat_text_occurences_count: \"upprepningar\",\r\n\t\trepeat_radio_end3: \"Sluta efter\",\r\n\t\trepeat_radio_end2: \"Efter\",\r\n\t\tmonth_for_recurring: [\"Januari\", \"Februari\", \"Mars\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"Augusti\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Söndag\", \"Måndag\", \"Tisdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lördag\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Ocak\", \"Þubat\", \"Mart\", \"Nisan\", \"Mayýs\", \"Haziran\", \"Temmuz\", \"Aðustos\", \"Eylül\", \"Ekim\", \"Kasým\", \"Aralýk\"],\r\n\t\tmonth_short: [\"Oca\", \"Þub\", \"Mar\", \"Nis\", \"May\", \"Haz\", \"Tem\", \"Aðu\", \"Eyl\", \"Eki\", \"Kas\", \"Ara\"],\r\n\t\tday_full: [\"Pazar\", \"Pazartes,\", \"Salý\", \"Çarþamba\", \"Perþembe\", \"Cuma\", \"Cumartesi\"],\r\n\t\tday_short: [\"Paz\", \"Pts\", \"Sal\", \"Çar\", \"Per\", \"Cum\", \"Cts\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Bugün\",\r\n\t\tday_tab: \"Gün\",\r\n\t\tweek_tab: \"Hafta\",\r\n\t\tmonth_tab: \"Ay\",\r\n\t\tnew_event: \"Uygun\",\r\n\t\ticon_save: \"Kaydet\",\r\n\t\ticon_cancel: \"Ýptal\",\r\n\t\ticon_details: \"Detaylar\",\r\n\t\ticon_edit: \"Düzenle\",\r\n\t\ticon_delete: \"Sil\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Etkinlik silinecek, devam?\",\r\n\t\tsection_description: \"Açýklama\",\r\n\t\tsection_time: \"Zaman aralýðý\",\r\n\t\tfull_day: \"Tam gün\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Tüm tekrar eden etkinlikler silinecek, devam?\",\r\n\t\tsection_recurring: \"Etkinliði tekrarla\",\r\n\t\tbutton_recurring: \"Pasif\",\r\n\t\tbutton_recurring_open: \"Aktif\",\r\n\t\tbutton_edit_series: \"Dizi düzenleme\",\r\n\t\tbutton_edit_occurrence: \"Bir kopyasını düzenleyin\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Ajanda\",\r\n\t\tdate: \"Tarih\",\r\n\t\tdescription: \"Açýklama\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Yýl\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Ajanda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Izgara\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Січень\", \"Лютий\", \"Березень\", \"Квітень\", \"Травень\", \"Червень\", \"Липень\", \"Серпень\", \"Вересень\", \"Жовтень\", \"Листопад\", \"Грудень\"],\r\n\t\tmonth_short: [\"Січ\", \"Лют\", \"Бер\", \"Кві\", \"Тра\", \"Чер\", \"Лип\", \"Сер\", \"Вер\", \"Жов\", \"Лис\", \"Гру\"],\r\n\t\tday_full: [\"Неділя\", \"Понеділок\", \"Вівторок\", \"Середа\", \"Четвер\", \"П'ятниця\", \"Субота\"],\r\n\t\tday_short: [\"Нед\", \"Пон\", \"Вів\", \"Сер\", \"Чет\", \"Птн\", \"Суб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сьогодні\",\r\n\t\tday_tab: \"День\",\r\n\t\tweek_tab: \"Тиждень\",\r\n\t\tmonth_tab: \"Місяць\",\r\n\t\tnew_event: \"Нова подія\",\r\n\t\ticon_save: \"Зберегти\",\r\n\t\ticon_cancel: \"Відміна\",\r\n\t\ticon_details: \"Деталі\",\r\n\t\ticon_edit: \"Редагувати\",\r\n\t\ticon_delete: \"Вилучити\",\r\n\t\tconfirm_closing: \"\", //Ваші зміни втратяться. Ви впевнені ?\r\n\t\tconfirm_deleting: \"Подія вилучиться назавжди. Ви впевнені?\",\r\n\t\tsection_description: \"Опис\",\r\n\t\tsection_time: \"Часовий проміжок\",\r\n\t\tfull_day: \"Весь день\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Хочете редагувати весь перелік повторюваних подій?\",\r\n\t\tsection_recurring: \"Повторювана подія\",\r\n\t\tbutton_recurring: \"Відключено\",\r\n\t\tbutton_recurring_open: \"Включено\",\r\n\t\tbutton_edit_series: \"Редагувати серію\",\r\n\t\tbutton_edit_occurrence: \"Редагувати примірник\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Перелік\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Опис\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Рік\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Перелік\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Таблиця\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"День\",\r\n\t\trepeat_radio_week: \"Тиждень\",\r\n\t\trepeat_radio_month: \"Місяць\",\r\n\t\trepeat_radio_year: \"Рік\",\r\n\t\trepeat_radio_day_type: \"Кожний\",\r\n\t\trepeat_text_day_count: \"день\",\r\n\t\trepeat_radio_day_type2: \"Кожний робочий день\",\r\n\t\trepeat_week: \" Повторювати кожен\",\r\n\t\trepeat_text_week_count: \"тиждень , по:\",\r\n\t\trepeat_radio_month_type: \"Повторювати\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" числа кожний \",\r\n\t\trepeat_text_month_count: \"місяць\",\r\n\t\trepeat_text_month_count2_before: \"кожен \",\r\n\t\trepeat_text_month_count2_after: \"місяць\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"день\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без дати закінчення\",\r\n\t\trepeat_text_occurences_count: \"повторень\",\r\n\t\trepeat_radio_end3: \"До \",\r\n\t\trepeat_radio_end2: \"\",\r\n\t\tmonth_for_recurring: [\"січня\", \"лютого\", \"березня\", \"квітня\", \"травня\", \"червня\", \"липня\", \"серпня\", \"вересня\", \"жовтня\", \"листопада\", \"грудня\"],\r\n\t\tday_for_recurring: [\"Неділям\", \"Понеділкам\", \"Вівторкам\", \"Середам\", \"Четвергам\", \"П'ятницям\", \"Суботам\"]\r\n\t}\r\n};\r\n","import eventable from \"../utils/eventable\";\r\n\r\nexport class DatePicker {\r\n\tconstructor(scheduler, container, state = {}) {\r\n\t\tthis.state = {\r\n\t\t\tdate: new Date(),\r\n\t\t\tmodes: ['days', 'months', 'years'],\r\n\t\t\tcurrentRange: [],\r\n\t\t\teventDates: [],\r\n\t\t\tcurrentModeIndex: 0,\r\n\t\t\t...state\r\n\t\t};\r\n\t\tthis.container = null;\r\n\t\tthis.element = null;\r\n\t\tthis.onStateChangeHandlers = [];\r\n\t\tthis.scheduler = scheduler;\r\n\t\tthis._domEvents = scheduler._createDomEventScope();\r\n\t\tthis.state = this.getState();\r\n\t\teventable(this);\r\n\t\tif(container){\r\n\r\n\t\t\tthis.container = container;\r\n\t\t\tthis.render(this.container);\r\n\t\t}\r\n\r\n\t\tthis.onStateChange((oldState, newState) => {\r\n\t\t\tthis.callEvent(\"onStateChange\", [newState, oldState]);\r\n\t\t});\r\n\t}\r\n\r\n\tgetState() {\r\n\t\treturn { \r\n\t\t\t...this.state,\r\n\t\t\tmode: this.state.modes[this.state.currentModeIndex]\r\n\t\t};\r\n\t}\r\n\r\n\tsetState(newState) {\r\n\t\tconst oldState = { ...this.state };\r\n\t\tif(newState.mode){\r\n\t\t\tnewState.currentModeIndex = this.state.modes.indexOf(newState.mode);\r\n\t\t}\r\n\t\tthis.state = { ...this.state, ...newState };\r\n\r\n\t\tthis._notifyStateChange(oldState, this.state);\r\n\r\n\t\tif (this.container) {\r\n\t\t\tthis.render(this.container);\r\n\t\t}\r\n\t}\r\n\r\n\tonStateChange(handler) {\r\n\t\tthis.onStateChangeHandlers.push(handler);\r\n\r\n\t\t// function to remove the handler\r\n\t\treturn () => {\r\n\t\t\tconst index = this.onStateChangeHandlers.indexOf(handler);\r\n\t\t\tif (index !== -1) {\r\n\t\t\t\tthis.onStateChangeHandlers.splice(index, 1);\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n\r\n\t_notifyStateChange(oldState, newState) {\r\n\t\tthis.onStateChangeHandlers.forEach(handler => handler(oldState, newState));\r\n\t}\r\n\r\n\t_adjustDate(direction) {\r\n\r\n\t\tconst {mode, date} = this.getState();\r\n\t\tconst newDate = new Date(date);\r\n\t\tif (mode === 'days') {\r\n\t\t\tnewDate.setMonth(date.getMonth() + direction);\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tnewDate.setFullYear(date.getFullYear() + direction);\r\n\t\t} else {\r\n\t\t\tnewDate.setFullYear(date.getFullYear() + direction * 10);\r\n\t\t}\r\n\t\tthis.setState({ date: newDate });\r\n\t}\r\n\r\n\t_toggleMode() {\r\n\t\tconst newIndex = (this.state.currentModeIndex + 1) % this.state.modes.length;\r\n\t\tthis.setState({ currentModeIndex: newIndex });\r\n\t}\r\n\r\n\t_renderCalendarHeader(container) {\r\n\t\tconst {mode, date} = this.getState();\r\n\r\n\t\tconst header = document.createElement('div');\r\n\t\theader.classList.add('dhx_cal_datepicker_header');\r\n\r\n\t\tconst backwardArrow = document.createElement('button');\r\n\r\n\t\tbackwardArrow.classList.add(\"dhx_cal_datepicker_arrow\", \"scheduler_icon\", \"arrow_left\");\r\n\t\theader.appendChild(backwardArrow);\r\n\r\n\t\tconst monthLabel = document.createElement('div');\r\n\t\tmonthLabel.classList.add('dhx_cal_datepicker_title');\r\n\r\n\t\tif (mode === 'days') {\r\n\t\t\tmonthLabel.innerText = date.toLocaleString('default', { month: 'long' }) + ' ' + date.getFullYear();\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tmonthLabel.innerText = date.getFullYear();\r\n\t\t} else {\r\n\t\t\tconst startYear = Math.floor(date.getFullYear() / 10) * 10;\r\n\t\t\tmonthLabel.innerText = `${startYear} - ${startYear + 9}`;\r\n\t\t}\r\n\r\n\t\tthis._domEvents.attach(monthLabel, \"click\", this._toggleMode.bind(this));\r\n\t\theader.appendChild(monthLabel);\r\n\r\n\t\tconst forwardArrow = document.createElement('button');\r\n\r\n\t\tforwardArrow.classList.add(\"dhx_cal_datepicker_arrow\", \"scheduler_icon\", \"arrow_right\");\r\n\t\theader.appendChild(forwardArrow);\r\n\r\n\t\tcontainer.appendChild(header);\r\n\r\n\t\tthis._domEvents.attach(backwardArrow, \"click\", this._adjustDate.bind(this, -1));\r\n\t\tthis._domEvents.attach(forwardArrow, \"click\", this._adjustDate.bind(this, 1));\r\n\t}\r\n\r\n\trender(container) {\r\n\t\tthis._domEvents.detachAll();\r\n\t\tthis.container = container || this.container; \r\n\t\tthis.container.innerHTML = '';\r\n\r\n\t\tif(!this.element){\r\n\t\t\tthis.element = document.createElement(\"div\");\r\n\t\t\tthis.element.classList.add(\"dhx_cal_datepicker\");\r\n\t\t}\r\n\t\tthis.element.innerHTML = '';\r\n\t\tthis.container.appendChild(this.element);\r\n\r\n\t\tthis._renderCalendarHeader(this.element);\r\n\t\tconst dataContainer = document.createElement(\"div\");\r\n\t\tdataContainer.classList.add(\"dhx_cal_datepicker_data\");\r\n\t\tthis.element.appendChild(dataContainer);\r\n\r\n\t\tconst {mode} = this.getState();\r\n\t\tif (mode === 'days') {\r\n\t\t\tthis._renderDayGrid(dataContainer);\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tthis._renderMonthGrid(dataContainer);\r\n\t\t} else {\r\n\t\t\tthis._renderYearGrid(dataContainer);\r\n\t\t}\r\n\t}\r\n\r\n\t_renderDayGridHeader(daysOfWeekContainer) {\r\n\t\tconst {date} = this.getState();\r\n\t\tconst scheduler = this.scheduler;\r\n\r\n\t\tlet currentDate = scheduler.date.week_start(new Date(date));\r\n\t\tconst maxDate = scheduler.date.add(scheduler.date.week_start(new Date(date)), 1, 'week');\r\n\r\n\t\tdaysOfWeekContainer.classList.add('dhx_cal_datepicker_days');\r\n\r\n\t\tconst labelFormat = scheduler.date.date_to_str(\"%D\");\r\n\r\n\t\twhile (currentDate.valueOf() < maxDate.valueOf()) {\r\n\t\t\tconst label = labelFormat(currentDate);\r\n\r\n\t\t\tconst dayElement = document.createElement('div');\r\n\t\t\tdayElement.setAttribute(\"data-day\", currentDate.getDay());\r\n\t\t\tdayElement.classList.add('dhx_cal_datepicker_dayname');\r\n\t\t\tdayElement.innerText = label;\r\n\t\t\tdaysOfWeekContainer.appendChild(dayElement);\r\n\r\n\t\t\tcurrentDate = scheduler.date.add(currentDate, 1, 'day');\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t_weeksBetween(min, max) {\r\n\t\tconst scheduler = this.scheduler;\r\n\t\tlet weeks = 0;\r\n\t\tlet currWeek = new Date(min);\r\n\t\twhile(currWeek.valueOf() < max.valueOf()){\r\n\t\t\tweeks += 1;\r\n\t\t\tcurrWeek = scheduler.date.week_start(scheduler.date.add(currWeek, 1, \"week\"));\r\n\t\t}\r\n\t\treturn weeks;\r\n\t}\r\n\r\n\t_renderDayGrid(container) {\r\n\t\tconst {date, currentRange, eventDates, minWeeks} = this.getState();\r\n\r\n\t\tlet minSchedulerDate = currentRange[0];\r\n\t\tlet maxSchedulerDate = currentRange[1];\r\n\r\n\t\tconst eventDaysTable = eventDates.reduce((acc, date) => {\r\n\t\t\tconst dayStart = this.scheduler.date.day_start(new Date(date));\r\n\t\t\tacc[dayStart.valueOf()] = true;\r\n\t\t\treturn acc;\r\n\t\t}, {});\r\n\r\n\r\n\t\t// Render Days of the Week\r\n\t\tconst daysOfWeekContainer = document.createElement('div');\r\n\t\tthis._renderDayGridHeader(daysOfWeekContainer);\r\n\t\tcontainer.appendChild(daysOfWeekContainer);\r\n\r\n\t\tconst scheduler = this.scheduler;\r\n\t\tconst firstDate = scheduler.date.week_start(scheduler.date.month_start(new Date(date)));\r\n\t\tconst monthStart = scheduler.date.month_start(new Date(date));\r\n\t\tconst monthEnd = scheduler.date.add(scheduler.date.month_start(new Date(date)), 1, 'month');\r\n\t\tlet lastDate = scheduler.date.add(scheduler.date.month_start(new Date(date)), 1, 'month');\r\n\t\tif(lastDate.getDay() !== 0){\r\n\t\t\tlastDate = scheduler.date.add(scheduler.date.week_start(lastDate), 1, \"week\");\r\n\t\t}\r\n\r\n\t\tlet weeks = this._weeksBetween(firstDate, lastDate);\r\n\t\tif(minWeeks && weeks < minWeeks){\r\n\t\t\tlastDate = scheduler.date.add(lastDate, (minWeeks - weeks), \"week\");\r\n\t\t}\r\n\r\n\t\tlet currDate = firstDate;\r\n\r\n\t\tconst dayGridContainer = document.createElement('div');\r\n\t\tdayGridContainer.classList.add('dhx_cal_datepicker_days');\r\n\r\n\t\tthis._domEvents.attach(dayGridContainer, \"click\", (event) => {\r\n\t\t\tconst dateCell = event.target.closest(\"[data-cell-date]\");\r\n\t\t\tconst date = new Date(dateCell.getAttribute(\"data-cell-date\"));\r\n\t\t\tthis.callEvent(\"onDateClick\", [date, event]);\r\n\t\t});\r\n\r\n\t\twhile(currDate.valueOf() < lastDate.valueOf()){\r\n\t\t\tconst dayElement = document.createElement('div');\r\n\t\t\tdayElement.setAttribute(\"data-cell-date\", scheduler.templates.format_date(currDate));\r\n\t\t\tdayElement.setAttribute(\"data-day\", currDate.getDay());\r\n\t\t\tdayElement.innerHTML = currDate.getDate();\r\n\r\n\t\t\tif(currDate.valueOf() < monthStart.valueOf()){\r\n\t\t\t\tdayElement.classList.add('dhx_before');\r\n\t\t\t}else if(currDate.valueOf() >= monthEnd.valueOf()){\t\r\n\t\t\t\tdayElement.classList.add('dhx_after');\r\n\t\t\t}\r\n\r\n\t\t\tif(currDate.getDay() === 0 || currDate.getDay() === 6){\r\n\t\t\t\tdayElement.classList.add(\"dhx_cal_datepicker_weekend\");\r\n\t\t\t}\r\n\r\n\t\t\tif(minSchedulerDate && maxSchedulerDate){\r\n\t\t\t\tif(currDate.valueOf() >= minSchedulerDate.valueOf() && currDate.valueOf() < maxSchedulerDate.valueOf()){\r\n\t\t\t\t\tdayElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(eventDaysTable[currDate.valueOf()]){\r\n\t\t\t\tdayElement.classList.add('dhx_cal_datepicker_event');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdayElement.classList.add('dhx_cal_datepicker_date');\r\n\r\n\t\t\tdayGridContainer.appendChild(dayElement);\r\n\t\t\tcurrDate = scheduler.date.add(currDate, 1, 'day');\r\n\t\t}\r\n\r\n\t\tcontainer.appendChild(dayGridContainer);\r\n\r\n\t}\r\n\r\n\t_renderMonthGrid(container) {\r\n\t\tconst {date} = this.getState();\r\n\r\n\t\tconst wrapper = document.createElement('div');\r\n\t\twrapper.classList.add(\"dhx_cal_datepicker_months\");\r\n\r\n\t\tconst months = [];\r\n\t\tfor(let i = 0; i < 12; i++){\r\n\t\t\tmonths.push(new Date(date.getFullYear(), i, 1));\r\n\t\t}\r\n\r\n\t\tconst formatLabel = this.scheduler.date.date_to_str(\"%M\");\r\n\t\tmonths.forEach(month => {\r\n\t\t\tconst monthElement = document.createElement('div');\r\n\t\t\tmonthElement.classList.add('dhx_cal_datepicker_month');\r\n\t\t\tif(date.getMonth() === month.getMonth()){\r\n\t\t\t\tmonthElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t}\r\n\t\t\tmonthElement.setAttribute(\"data-month\", month.getMonth());\r\n\t\t\tmonthElement.innerHTML = formatLabel(month);\r\n\t\t\tthis._domEvents.attach(monthElement, \"click\", () => {\r\n\t\t\t\tconst newDate = new Date(month);\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\tdate: newDate,\r\n\t\t\t\t\tmode: 'days'\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\twrapper.appendChild(monthElement);\r\n\t\t});\r\n\t\tcontainer.appendChild(wrapper);\r\n\r\n\t\tconst doneArea = document.createElement(\"div\");\r\n\t\tdoneArea.classList.add(\"dhx_cal_datepicker_done\");\r\n\t\tconst doneBtn = document.createElement(\"button\");\r\n\t\tdoneBtn.innerText = \"Done\";\r\n\t\tdoneBtn.classList.add(\"dhx_cal_datepicker_done_btn\");\r\n\t\tthis._domEvents.attach(doneBtn, \"click\", () => {\r\n\t\t\tthis.setState({\r\n\t\t\t\tmode: 'days'\r\n\t\t\t});\r\n\t\t});\r\n\t\tdoneArea.appendChild(doneBtn);\r\n\t\tcontainer.appendChild(doneArea);\r\n\t}\r\n\r\n\t_renderYearGrid(container) {\r\n\t\tconst {date} = this.getState();\r\n\t\tconst startYear = Math.floor(date.getFullYear() / 10) * 10;\r\n\t\t\r\n\t\tconst wrapper = document.createElement('div');\r\n\t\twrapper.classList.add(\"dhx_cal_datepicker_years\");\r\n\t\tfor (let i = startYear - 1; i <= startYear + 10; i++) {\r\n\t\t\tconst yearElement = document.createElement('div');\r\n\t\t\tyearElement.innerText = i;\r\n\t\t\tyearElement.classList.add('dhx_cal_datepicker_year');\r\n\t\t\tyearElement.setAttribute(\"data-year\", i);\r\n\t\t\tif(date.getFullYear() === i){\r\n\t\t\t\tyearElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t}\r\n\t\t\tthis._domEvents.attach(yearElement, \"click\", () => {\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\tdate: new Date(i, date.getMonth(), 1),\r\n\t\t\t\t\tmode: 'months'\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\twrapper.appendChild(yearElement);\r\n\t\t\t\r\n\t\t}\r\n\t\tcontainer.appendChild(wrapper);\r\n\r\n\t\tconst doneArea = document.createElement(\"div\");\r\n\t\tdoneArea.classList.add(\"dhx_cal_datepicker_done\");\r\n\t\tconst doneBtn = document.createElement(\"button\");\r\n\t\tdoneBtn.innerText = \"Done\";\r\n\t\tdoneBtn.classList.add(\"dhx_cal_datepicker_done_btn\");\r\n\t\tthis._domEvents.attach(doneBtn, \"click\", () => {\r\n\t\t\tthis.setState({\r\n\t\t\t\tmode: 'months'\r\n\t\t\t});\r\n\t\t});\r\n\t\tdoneArea.appendChild(doneBtn);\r\n\t\tcontainer.appendChild(doneArea);\r\n\t}\r\n\r\n\tdestructor(){\r\n\t\tthis.onStateChangeHandlers = [];\r\n\t\tif(this.element){\r\n\t\t\tthis.element.innerHTML = '';\r\n\t\t\tthis.element.remove();\r\n\t\t}\r\n\r\n\t\tthis._domEvents.detachAll();\r\n\t\tthis.callEvent(\"onDestroy\", []);\r\n\t\tthis.detachAllEvents();\r\n\r\n\t\tthis.scheduler = null;\r\n\t}\r\n}","// import \"./css/dhtmlxscheduler_terrace\";\r\n// import \"./css/dhtmlxscheduler_material\";\r\n// import \"./css/dhtmlxscheduler_material_nofont\";\r\n// import \"./css/dhtmlxscheduler_flat\";\r\n// import \"./css/dhtmlxscheduler_contrast_black\";\r\n// import \"./css/dhtmlxscheduler_contrast_white\";\r\n\r\n\r\nimport assert from \"./core/common/assert\";\r\nimport common_errors from \"./core/common_errors\";\r\nimport connector from \"./core/connector\";\r\nimport schedulerCore from \"./core/scheduler\";\r\nimport common from \"./core/common\";\r\nimport wai_aria from \"./core/wai_aria\";\r\nimport utils from \"./core/utils/utils\";\r\nimport dom_helpers from \"./core/utils/dom_helpers\";\r\nimport env from \"./utils/env\";\r\nimport destructor from \"./core/destructor\";\r\nimport ajax from \"./core/utils/ajax\";\r\nimport base from \"./core/base\";\r\nimport config from \"./core/config\";\r\nimport event from \"./core/event\";\r\nimport event_highlight from \"./core/event_highlight\";\r\nimport load from \"./core/load\";\r\nimport lightbox from \"./core/lightbox\";\r\nimport touch from \"./core/touch\";\r\nimport dhtmlx_suite_hooks from \"./core/dhtmlx/dhtmlx_suite_hooks\";\r\nimport skins from \"./core/skins\";\r\nimport jquery from \"./core/jquery\";\r\nimport delay_render from \"./core/delay_render\";\r\nimport dataProcessorExtend from \"./core/dataprocessor/dataprocessor\";\r\nimport message from \"./core/message\";\r\nimport i18nFactory from \"./locale\";\r\n\r\nimport voidFirst from \"./publish_helpers/void_script_first\";\r\nimport voidSecond from \"./publish_helpers/void_script_second\";\r\nimport voidThird from \"./publish_helpers/void_script_third\";\r\n\r\n//import datepickerHeader from \"./core/clickable_header\";\r\n\r\nimport { DatePicker } from \"./core/datepicker\";\r\n\r\nexport default function(extensionManager) {\r\n\r\n\tconst scheduler = { version: VERSION };\r\n\t\r\n\tcommon_errors(scheduler);\r\n\tcommon(scheduler);\r\n\tschedulerCore(scheduler);\r\n\twai_aria(scheduler);\r\n\t//utils(scheduler);\r\n\r\n\tscheduler.utils = utils;\r\n\tscheduler.$domHelpers = dom_helpers;\r\n\tscheduler.utils.dom = dom_helpers;\r\n\tscheduler.uid = utils.uid;\r\n\tscheduler.mixin = utils.mixin;\r\n\tscheduler.defined = utils.defined;\r\n\tscheduler.assert = assert(scheduler);\r\n\tscheduler.copy = utils.copy;\r\n\r\n\tscheduler._createDatePicker = function(container, config){\r\n\t\treturn new DatePicker(scheduler, container, config);\r\n\t};\r\n\r\n\t//datepickerHeader(scheduler);\r\n\r\n\r\n\t//old api compatibility\r\n\tscheduler._getFocusableNodes = dom_helpers.getFocusableNodes;\r\n\tscheduler._getClassName = dom_helpers.getClassName;\r\n\tscheduler._locate_css = dom_helpers.locateCss;\r\n\r\n\tconst messageApi = message(scheduler);\r\n\tscheduler.utils.mixin(scheduler, messageApi);\r\n\r\n\tscheduler.env = scheduler.$env = env;\r\n\tscheduler.Promise = window.Promise;\r\n\tdestructor(scheduler);\r\n\tajax(scheduler);\r\n\tvoidFirst(scheduler);\r\n\tbase(scheduler);\r\n\tconfig(scheduler);\r\n\tevent(scheduler);\r\n\tevent_highlight(scheduler);\r\n\tload(scheduler);\r\n\tlightbox(scheduler);\r\n\ttouch(scheduler);\r\n\tdhtmlx_suite_hooks(scheduler);\r\n\tvoidSecond(scheduler);\r\n\tskins(scheduler);\r\n\tjquery(scheduler);\r\n\tdelay_render(scheduler);\r\n\tdataProcessorExtend(scheduler);\r\n\tvoidThird(scheduler);\r\n\tconnector(scheduler);\r\n\tconst i18n = i18nFactory();\r\n\tscheduler.i18n = {\r\n\t\taddLocale: i18n.addLocale,\r\n\t\tsetLocale: function(locale){\r\n\t\t\tif(typeof locale === \"string\"){\r\n\t\t\t\tvar localeObject = i18n.getLocale(locale);\r\n\t\t\t\tif(!localeObject){\r\n\t\t\t\t\tlocaleObject = i18n.getLocale(\"en\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler.locale = localeObject;\r\n\t\t\t}else if(locale){\r\n\t\t\t\tif(!scheduler.locale){\r\n\t\t\t\t\tscheduler.locale = locale;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfor(var i in locale){\r\n\t\t\t\t\t\tif(locale[i] && typeof locale[i] === \"object\"){\r\n\t\t\t\t\t\t\tif(!scheduler.locale[i]){\r\n\t\t\t\t\t\t\t\tscheduler.locale[i] = {};\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tscheduler.mixin(scheduler.locale[i], locale[i], true);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tscheduler.locale[i] = locale[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar labels = scheduler.locale.labels;\r\n\t\t\tlabels.dhx_save_btn \t= labels.icon_save;\r\n\t\t\tlabels.dhx_cancel_btn \t= labels.icon_cancel;\r\n\t\t\tlabels.dhx_delete_btn \t= labels.icon_delete;\r\n\r\n\t\t\tif(scheduler.$container){\r\n\t\t\t\tscheduler.get_elements();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t},\r\n\t\tgetLocale: i18n.getLocale\r\n\t};\r\n\tscheduler.i18n.setLocale(\"en\");\r\n\r\n\tscheduler.ext = {};\r\n\r\n\tconst activePlugins = {};\r\n\tscheduler.plugins = function(config){\r\n\t\tconst extensionList = getExtensionList(config, {\r\n\t\t\t\ttreetimeline: [\"timeline\"],\r\n\t\t\t\tdaytimeline: [\"timeline\"],\r\n\t\t\t\touterdrag: [\"legacy\"]\r\n\t\t\t}, {\r\n\t\t\t\tlegacy: 1,\r\n\t\t\t\tlimit: 1,\r\n\t\t\t\ttimeline: 2,\r\n\t\t\t\tdaytimeline: 3,\r\n\t\t\t\ttreetimeline: 3,\r\n\t\t\t\touterdrag:6\r\n\t\t\t});\r\n\r\n\t\textensionList.forEach(function(name){\r\n\t\t\tif(!activePlugins[name]){\r\n\t\t\t\tconst plugin = extensionManager.getExtension(name);\r\n\t\t\t\tif(plugin){\r\n\t\t\t\t\tplugin(scheduler);\r\n\t\t\t\t\tactivePlugins[name] = true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthrow new Error(\"unknown plugin \" + name);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t};\r\n\r\n\tfunction getExtensionList(config, dependencies, priorities){\r\n\t\tconst result = [];\r\n\r\n\t\tfor(const i in config){\r\n\t\t\tif(config[i]){\r\n\t\t\t\tconst extension = i.toLowerCase();\r\n\t\t\t\tif(dependencies[extension]){\r\n\t\t\t\t\tdependencies[extension].forEach(function(dep){\r\n\t\t\t\t\t\tconst dependencyName = dep.toLowerCase();\r\n\t\t\t\t\t\tif(!config[dependencyName]){\r\n\t\t\t\t\t\t\tresult.push(dependencyName);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\tresult.push(extension);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tresult.sort(function(a, b){\r\n\t\t\tconst orderA = priorities[a] || 0;\r\n\t\t\tconst orderB = priorities[b] || 0;\r\n\t\t\tif(orderA > orderB){\r\n\t\t\t\treturn 1;\r\n\t\t\t}else if(orderA < orderB){\r\n\t\t\t\treturn -1;\r\n\t\t\t}else{\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\treturn scheduler;\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nvar commonViews = {\r\n\tagenda: \"https://docs.dhtmlx.com/scheduler/agenda_view.html\",\r\n\tgrid: \"https://docs.dhtmlx.com/scheduler/grid_view.html\",\r\n\tmap: \"https://docs.dhtmlx.com/scheduler/map_view.html\",\r\n\tunit: \"https://docs.dhtmlx.com/scheduler/units_view.html\",\r\n\ttimeline: \"https://docs.dhtmlx.com/scheduler/timeline_view.html\",\r\n\tweek_agenda: \"https://docs.dhtmlx.com/scheduler/weekagenda_view.html\",\r\n\tyear: \"https://docs.dhtmlx.com/scheduler/year_view.html\",\r\n\tanythingElse: \"https://docs.dhtmlx.com/scheduler/views.html\"\r\n};\r\n\r\nvar requiredExtensions = {\r\n\tagenda: \"ext/dhtmlxscheduler_agenda_view.js\",\r\n\tgrid: \"ext/dhtmlxscheduler_grid_view.js\",\r\n\tmap: \"ext/dhtmlxscheduler_map_view.js\",\r\n\tunit: \"ext/dhtmlxscheduler_units.js\",\r\n\ttimeline: \"ext/dhtmlxscheduler_timeline.js, ext/dhtmlxscheduler_treetimeline.js, ext/dhtmlxscheduler_daytimeline.js\",\r\n\tweek_agenda: \"ext/dhtmlxscheduler_week_agenda.js\",\r\n\tyear: \"ext/dhtmlxscheduler_year_view.js\",\r\n\tlimit: \"ext/dhtmlxscheduler_limit.js\"\r\n};\r\n\r\nscheduler._commonErrorMessages = {\r\n\tunknownView: function(view){\r\n\t\tvar relatedDoc = \"Related docs: \" + (commonViews[view] || commonViews.anythingElse); \r\n\t\tvar relatedExtension = requiredExtensions[view] ? (\"You're probably missing \" + requiredExtensions[view] + \".\") : \"\";\r\n\t\treturn (\r\n\t\t\t\"`\"+view+\"` view is not defined. \\n\" +\r\n\t\t\t\"Please check parameters you pass to `scheduler.init` or `scheduler.setCurrentView` in your code and ensure you've imported appropriate extensions. \\n\" + \r\n\t\t\trelatedDoc + \"\\n\" + (relatedExtension ? (relatedExtension + \"\\n\") : \"\"));\r\n\t},\r\n\tcollapsedContainer: function(div){\r\n\t\treturn \"Scheduler container height is set to *100%* but the rendered height is zero and the scheduler is not visible. \\n\"+\r\n\t\t\"Make sure that the container has some initial height or use different units. For example:\\n\" +\r\n\t\t\"
\\n\";\r\n\t}\r\n};\r\n\r\nscheduler.createTimelineView = function() {\r\n\tthrow new Error(\"scheduler.createTimelineView is not implemented. Be sure to add the required extension: \" + requiredExtensions.timeline + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.timeline);\r\n};\r\n\r\nscheduler.createUnitsView = function() {\r\n\tthrow new Error(\"scheduler.createUnitsView is not implemented. Be sure to add the required extension: \" + requiredExtensions.unit + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.unit);\r\n};\r\n\r\nscheduler.createGridView = function() {\r\n\tthrow new Error(\"scheduler.createGridView is not implemented. Be sure to add the required extension: \" + requiredExtensions.grid + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.grid);\r\n};\r\n\r\nscheduler.addMarkedTimespan = function() {\r\n\tthrow new Error(\"scheduler.addMarkedTimespan is not implemented. Be sure to add the required extension: ext/dhtmlxscheduler_limit.js\" + \r\n\t\"\\n\" +\r\n\t\"Related docs: https://docs.dhtmlx.com/scheduler/limits.html\");\r\n};\r\n\r\nscheduler.renderCalendar = function() {\r\n\tthrow new Error(\"scheduler.renderCalendar is not implemented. Be sure to add the required extension: ext/dhtmlxscheduler_minical.js\" + \r\n\t\"\\n\" +\r\n\t\"https://docs.dhtmlx.com/scheduler/minicalendar.html\");\r\n};\r\n\r\nscheduler.exportToPNG = function() {\r\n\tthrow new Error([\r\n\t\t\"scheduler.exportToPNG is not implemented.\",\r\n\t\t\"This feature requires an additional module, be sure to check the related doc here https://docs.dhtmlx.com/scheduler/png.html\",\r\n\t\t\"Licensing info: https://dhtmlx.com/docs/products/dhtmlxScheduler/export.shtml\"\r\n\t].join(\"\\n\"));\r\n};\r\n\r\nscheduler.exportToPDF = function() {\r\n\tthrow new Error([\r\n\t\t\"scheduler.exportToPDF is not implemented.\",\r\n\t\t\"This feature requires an additional module, be sure to check the related doc here https://docs.dhtmlx.com/scheduler/pdf.html\",\r\n\t\t\"Licensing info: https://dhtmlx.com/docs/products/dhtmlxScheduler/export.shtml\"\r\n\t].join(\"\\n\"));\r\n};\r\n\r\n\r\n}","\r\nimport nav_bar from \"./nav_bar\";\r\nimport scheduler_resize_listener from \"./scheduler_resize_listener\";\r\nimport eventable from \"../utils/eventable\";\r\n\r\n\r\nexport default function extend(scheduler) {\r\n\r\neventable(scheduler);\r\n\r\nnav_bar(scheduler);\r\n\r\nscheduler._detachDomEvent = function(el, event, handler){\r\n\tif (el.removeEventListener){\r\n\t\tel.removeEventListener(event, handler, false);\r\n\r\n\t}else if (el.detachEvent){\r\n\t\tel.detachEvent(\"on\"+event, handler);\r\n\t}\r\n};\r\n\r\n\r\nscheduler._init_once = function(){\r\n\tscheduler_resize_listener(scheduler);\r\n\r\n\tscheduler._init_once = function(){};\r\n};\r\n\r\nvar layout = {\r\n\t\"navbar\": {\r\n\t\trender: function (config) {\r\n\t\t\treturn scheduler._init_nav_bar(config);\r\n\t\t}\r\n\t},\r\n\t\"header\": {\r\n\t\trender: function (config) {\r\n\t\t\tvar element = document.createElement(\"div\");\r\n\t\t\telement.className = \"dhx_cal_header\";\r\n\t\t\treturn element;\r\n\t\t}\r\n\t},\r\n\t\"dataArea\": {\r\n\t\trender: function (config) {\r\n\t\t\tvar element = document.createElement(\"div\");\r\n\t\t\telement.className = \"dhx_cal_data\";\r\n\t\t\treturn element;\r\n\t\t}\r\n\t},\r\n\t\"html_element\": {\r\n\t\trender: function (config) {\r\n\t\t\treturn config.html;\r\n\t\t}\r\n\t}\r\n};\r\n\r\nfunction hasSchedulerMarkup(element){\r\n\treturn !!(\r\n\t\telement.querySelector(\".dhx_cal_header\") &&\r\n\t\telement.querySelector(\".dhx_cal_data\") &&\r\n\t\telement.querySelector(\".dhx_cal_navline\")\r\n\t\t);\r\n}\r\n\r\nfunction createDefaultHeader(scheduler){\r\n\tvar views = [\r\n\t\t\"day\",\r\n\t\t\"week\",\r\n\t\t\"month\"\r\n\t];\r\n\tvar date = [\r\n\t\t\"date\"\r\n\t];\r\n\tvar nav = [\r\n\t\t\"prev\",\r\n\t\t\"today\",\r\n\t\t\"next\"\r\n\t];\r\n\r\n\tif(scheduler.matrix){\r\n\t\tfor(var i in scheduler.matrix){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\tif(scheduler._props){\r\n\t\tfor(var i in scheduler._props){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\r\n\tif(scheduler._grid && scheduler._grid.names){\r\n\t\tfor(var i in scheduler._grid.names){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\r\n\tvar optionalViews = [\r\n\t\t\"map\",\r\n\t\t\"agenda\",\r\n\t\t\"week_agenda\",\r\n\t\t\"year\"\r\n\t];\r\n\r\n\toptionalViews.forEach(function(viewName){\r\n\t\tif(scheduler[viewName + \"_view\"]){\r\n\t\t\tviews.push(viewName);\r\n\t\t}\r\n\t});\r\n\r\n\treturn views.concat(date).concat(nav);\r\n}\r\n\r\nscheduler.init=function(id,date,mode){\r\n\tif(this.$destroyed){\r\n\t\treturn; // not have errors when try to reinit destroyed scheduler\r\n\t}\r\n\tdate=date||(scheduler._currentDate());\r\n\tmode=mode||\"week\";\r\n\r\n\tif(this._obj){\r\n\t\tthis.unset_actions();\r\n\t}\r\n\r\n\tthis._obj=(typeof id == \"string\")?document.getElementById(id):id;\r\n\tthis.$container = this._obj;\r\n\tthis.$root = this._obj;\r\n\r\n\tif(!this.$container.offsetHeight && this.$container.offsetWidth && this.$container.style.height === \"100%\"){\r\n\t\t// scheduler container has zero height and non-zero width\r\n\t\twindow.console.error(scheduler._commonErrorMessages.collapsedContainer(), this.$container);\r\n\t}\r\n\r\n\tif(this.config.wai_aria_attributes && this.config.wai_aria_application_role){\r\n\t\tthis.$container.setAttribute(\"role\", \"application\");\r\n\t}\r\n\r\n\tif(!this.config.header && !hasSchedulerMarkup(this.$container)){\r\n\t\t// if no header config and no required markup - use the default header\r\n\t\t// so the scheduler could be initialized in an empty div\r\n\t\tthis.config.header = createDefaultHeader(this);\r\n\t\twindow.console.log([// jshint ignore:line\r\n\t\t\t\"Required DOM elements are missing from the scheduler container and **scheduler.config.header** is not specified.\",\r\n\t\t\t\"Using a default header configuration: \",\r\n\t\t\t\"scheduler.config.header = \" + JSON.stringify(this.config.header, null, 2),\r\n\t\t\t\"Check this article for the details: https://docs.dhtmlx.com/scheduler/initialization.html\"\r\n\t\t].join(\"\\n\"));// jshint ignore:line\r\n\t}\r\n\r\n\tif (this.config.header) {\r\n\t\tthis.$container.innerHTML = \"\";\r\n\t\tthis.$container.classList.add(\"dhx_cal_container\");\r\n\t\tif(this.config.header.height){\r\n\t\t\tthis.xy.nav_height = this.config.header.height;\r\n\t\t}\r\n\t\tthis.$container.appendChild(layout.navbar.render(this.config.header));\r\n\t\tthis.$container.appendChild(layout.header.render());\r\n\t\tthis.$container.appendChild(layout.dataArea.render());\r\n\t} else {\r\n\t\t// if no header config provided - make sure scheduler container has all necessary elements\r\n\t\tif(!hasSchedulerMarkup(this.$container)){\r\n\t\t\tthrow new Error([\r\n\t\t\t\t\"Required DOM elements are missing from the scheduler container.\",\r\n\t\t\t\t\"Be sure to either specify them manually in the markup: https://docs.dhtmlx.com/scheduler/initialization.html#initializingschedulerviamarkup\",\r\n\t\t\t\t\"Or to use **scheduler.config.header** setting so they could be created automatically: https://docs.dhtmlx.com/scheduler/initialization.html#initializingschedulerviaheaderconfig\"\r\n\t\t\t].join(\"\\n\"));\r\n\t\t}\r\n\t}\r\n\r\n\tif (this.config.rtl) this.$container.className += \" dhx_cal_container_rtl\";\r\n\r\n\t//hook for terrace skin\r\n\tif (this._skin_init)\r\n\t\tscheduler._skin_init();\r\n\r\n\tscheduler.date.init();\r\n\r\n\tthis._scroll=true;\r\n\r\n\tthis._els=[];\r\n\tthis.get_elements();\r\n\tthis.init_templates();\r\n\tthis.set_actions();\r\n\r\n\tthis._init_once();\r\n\tthis._init_touch_events();\r\n\r\n\tthis.set_sizes();\r\n\tscheduler.callEvent('onSchedulerReady', []);\r\n\tscheduler.$initialized = true;\r\n\tthis.setCurrentView(date,mode);\r\n\r\n};\r\n\r\nscheduler.xy={\r\n\tmin_event_height:20,\r\n\tbar_height: 24,\r\n\tscale_width:50,\r\n\tscroll_width:18,\r\n\tscale_height:20,\r\n\tmonth_scale_height:20,\r\n\tmenu_width:25,\r\n\tmargin_top:0,\r\n\tmargin_left:0,\r\n\teditor_width:140,\r\n\tmonth_head_height:22,\r\n\tevent_header_height: 14\r\n};\r\nscheduler.keys={\r\n\tedit_save:13,\r\n\tedit_cancel:27\r\n};\r\n\r\nscheduler.bind = function bind(functor, object){\r\n\tif(functor.bind)\r\n\t\treturn functor.bind(object);\r\n\telse\r\n\t\treturn function(){ return functor.apply(object,arguments); };\r\n};\r\n\r\nscheduler.set_sizes=function(){\r\n\r\n\tvar w = this._x = this._obj.clientWidth-this.xy.margin_left;\r\n\r\n\t//not-table mode always has scroll - need to be fixed in future\r\n\tvar scale_x=this._table_view?0:(this.xy.scale_width+this.xy.scroll_width);\r\n\r\n\tvar materialScalePlaceholder = this.$container.querySelector(\".dhx_cal_scale_placeholder\");\r\n\tif(scheduler._is_material_skin()){\r\n\t\tif(!materialScalePlaceholder) {\r\n\t\t\tmaterialScalePlaceholder = document.createElement(\"div\");\r\n\t\t\tmaterialScalePlaceholder.className = \"dhx_cal_scale_placeholder\";\r\n\t\t\tthis.$container.insertBefore(materialScalePlaceholder, this._els[\"dhx_cal_header\"][0]);\r\n\t\t}\r\n\t\tmaterialScalePlaceholder.style.display = \"block\";\r\n\r\n\t\tthis.set_xy(materialScalePlaceholder,w,this.xy.scale_height + 1,0, this._els[\"dhx_cal_header\"][0].offsetTop);\r\n\r\n\t}else{\r\n\t\tif(materialScalePlaceholder){\r\n\t\t\tmaterialScalePlaceholder.parentNode.removeChild(materialScalePlaceholder);\r\n\t\t}\r\n\t}\r\n\r\n\tif (this._lightbox) {\r\n\t\tif (scheduler.$container.offsetWidth < 1200) {\r\n\t\t} else {\r\n\t\t\tthis._setLbPosition(document.querySelector(\".dhx_cal_light\"));\r\n\t\t}\r\n\t}\r\n\r\n\tthis._data_width = w-scale_x;\r\n\r\n\tthis._els[\"dhx_cal_navline\"][0].style.width = w + \"px\";\r\n\tconst header = this._els[\"dhx_cal_header\"][0];\r\n\tthis.set_xy(header, this._data_width, this.xy.scale_height);\r\n\t// this._els[\"dhx_cal_header\"][0].style.marginLeft = `${scheduler.xy.scale_width}px`;\r\n\theader.style.left = ``;\r\n\theader.style.right = ``;\r\n\tif(!this._table_view){\r\n\t\tif(this.config.rtl){\r\n\t\t\theader.style.right = `${this.xy.scale_width}px`;\r\n\t\t}else{\r\n\t\t\theader.style.left = `${this.xy.scale_width}px`;\r\n\t\t}\r\n\t} else {\r\n\t\tif(!this.config.rtl){\r\n\t\t\theader.style.left = `-1px`;\r\n\t\t} else {\r\n\t\t\theader.style.right = `-1px`;\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.set_xy=function(node,w,h,x,y){\r\n\tfunction prepareValue(val){\r\n\t\tlet prepared = val;\r\n\t\tif(!isNaN(Number(prepared))){\r\n\t\t\tprepared = Math.max(0,prepared) + \"px\";\r\n\t\t}\r\n\t\treturn prepared;\r\n\t}\r\n\r\n\tvar direction = 'left';\r\n\r\n\tif(w !== undefined) {\r\n\t\tnode.style.width = prepareValue(w);\r\n\t}\r\n\r\n\tif(h !== undefined){\r\n\t\tnode.style.height = prepareValue(h);\r\n\t}\r\n\r\n\tif (arguments.length>3){\r\n\r\n\t\tif(x !== undefined){\r\n\t\t\tif (this.config.rtl) direction = 'right';\r\n\t\t\tnode.style[direction]=x+\"px\";\r\n\t\t}\r\n\t\tif(y !== undefined){\r\n\t\t\tnode.style.top=y+\"px\";\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.get_elements=function(){\r\n\t//get all child elements as named hash\r\n\tvar els=this._obj.getElementsByTagName(\"DIV\");\r\n\tfor (var i=0; i < els.length; i++){\r\n\t\tvar class_name= scheduler._getClassName(els[i]);\r\n\t\tvar attr_value = els[i].getAttribute(\"data-tab\") || els[i].getAttribute(\"name\") || \"\";\r\n\t\tif (class_name) class_name = class_name.split(\" \")[0];\r\n\t\tif (!this._els[class_name]) this._els[class_name]=[];\r\n\t\tthis._els[class_name].push(els[i]);\r\n\r\n\t\t//check if name need to be changed\r\n\t\t// scheduler.locale.labels[attr_value+\"_tab\"] - to fix getting labels for data-tab\r\n\t\tvar label = scheduler.locale.labels[attr_value+\"_tab\"] || scheduler.locale.labels[attr_value||class_name];\r\n\t\tif (typeof label !== \"string\" && attr_value && !els[i].innerHTML)\r\n\t\t\tlabel = attr_value.split(\"_\")[0];\r\n\t\tif (label) {\r\n\t\t\tthis._waiAria.labelAttr(els[i], label);\r\n\t\t\tels[i].innerHTML = label;\r\n\t\t}\r\n\t}\r\n};\r\n\r\n\r\nvar domEventsScope = scheduler._createDomEventScope();\r\n\r\nscheduler.unset_actions = function(){\r\n\tdomEventsScope.detachAll();\r\n\r\n};\r\n\r\nscheduler.set_actions=function(){\r\n\tfor (var a in this._els){\r\n\t\tif (this._click[a]){\r\n\t\t\tfor (var i=0; i < this._els[a].length; i++){\r\n\t\t\t\tconst element = this._els[a][i];\r\n\t\t\t\tconst handler = this._click[a].bind(element);\r\n\t\t\t\tdomEventsScope.attach(element, \"click\", handler);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tdomEventsScope.attach(this._obj, \"selectstart\", function(e){\r\n\t\te.preventDefault();\r\n\t\treturn false;\r\n\t});\r\n\t//this._obj.onselectstart=function(e){ return false; };\r\n\tdomEventsScope.attach(this._obj, \"mousemove\", function(e){\r\n\t\tif (!scheduler._temp_touch_block)\r\n\t\t\tscheduler._on_mouse_move(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"mousedown\", function(e){\r\n\t\tif (!scheduler._ignore_next_click)\r\n\t\t\tscheduler._on_mouse_down(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"mouseup\", function(e){\r\n\t\tif (!scheduler._ignore_next_click)\r\n\t\t\tscheduler._on_mouse_up(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"dblclick\", function(e){\r\n\t\tscheduler._on_dbl_click(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"contextmenu\", function(e) {\r\n\t\tif(scheduler.checkEvent(\"onContextMenu\")){\r\n\t\t\t// block the default browser context menu \r\n\t\t\te.preventDefault();\r\n\t\t}\r\n\t\tvar ev = e;\r\n\t\tvar src = ev.target||ev.srcElement;\r\n\t\tvar returnValue = scheduler.callEvent(\"onContextMenu\", [scheduler._locate_event(src), ev]);\r\n\t\treturn returnValue;\r\n\t});\r\n};\r\nscheduler.select=function(id){\r\n\tif (this._select_id==id) return;\r\n\tscheduler._close_not_saved();\r\n\tthis.editStop(false);\r\n\tif(this._select_id){\r\n\t\tthis.unselect();\r\n\t}\r\n\tthis._select_id = id;\r\n\tthis.updateEvent(id);\r\n\tthis.callEvent(\"onEventSelected\", [id]);\r\n};\r\nscheduler.unselect=function(id){\r\n\tif (id && id!=this._select_id) return;\r\n\tvar t=this._select_id;\r\n\tthis._select_id = null;\r\n\tif (t && this.getEvent(t)) this.updateEvent(t);\r\n\tthis.callEvent(\"onEventUnselected\", [t]);\r\n};\r\nscheduler.getState=function(){\r\n\treturn {\r\n\t\tmode: this._mode,\r\n\t\tdate: new Date(this._date),\r\n\t\tmin_date: new Date(this._min_date),\r\n\t\tmax_date: new Date(this._max_date),\r\n\t\teditor_id: this._edit_id,\r\n\t\tlightbox_id: this._lightbox_id,\r\n\t\tnew_event: this._new_event,\r\n\t\tselect_id: this._select_id,\r\n\t\texpanded: this.expanded,\r\n\t\tdrag_id: this._drag_id,\r\n\t\tdrag_mode: this._drag_mode\r\n\t};\r\n};\r\nscheduler._click={\r\n\tdhx_cal_data:function(e){\r\n\t\t//in case of touch disable click processing\r\n\t\tif (scheduler._ignore_next_click){\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tvar trg = e.target;\r\n\t\tvar id = scheduler._locate_event(trg);\r\n\r\n\t\tif (!id) {\r\n\t\t\tscheduler.callEvent(\"onEmptyClick\",[scheduler.getActionData(e).date, e]);\r\n\t\t} else {\r\n\t\t\tif ( !scheduler.callEvent(\"onClick\",[id,e]) || scheduler.config.readonly ) return;\r\n\t\t}\r\n\r\n\t\tif (id && scheduler.config.select) {\r\n\r\n\t\t\tscheduler.select(id);\r\n\t\t\tconst icon = trg.closest(\".dhx_menu_icon\");\r\n\r\n\t\t\tvar mask = scheduler._getClassName(icon);\r\n\t\t\tif (mask.indexOf(\"_icon\")!=-1)\r\n\t\t\t\tscheduler._click.buttons[mask.split(\" \")[1].replace(\"icon_\",\"\")](id);\r\n\t\t} else{\r\n\t\t\tscheduler._close_not_saved();\r\n\t\t\tif (scheduler.getState().select_id && new Date().valueOf()-(scheduler._new_event||0) > 500){\r\n\t\t\t\tscheduler.unselect();\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tdhx_cal_prev_button:function(){\r\n\t\tscheduler._click.dhx_cal_next_button(0,-1);\r\n\t},\r\n\tdhx_cal_next_button:function(dummy,step){\r\n\t\tvar def_step = 1;\r\n\t\tif (scheduler.config.rtl){\r\n\t\t\tstep = -step;\r\n\t\t\tdef_step = -def_step;\r\n\t\t}\r\n\t\tscheduler.setCurrentView(scheduler.date.add( //next line changes scheduler._date , but seems it has not side-effects\r\n\t\t\tscheduler.date[scheduler._mode+\"_start\"](new Date(scheduler._date)),(step||def_step),scheduler._mode));\r\n\t},\r\n\tdhx_cal_today_button:function(){\r\n\t\tif (scheduler.callEvent(\"onBeforeTodayDisplayed\", [])) {\r\n\t\t\tscheduler.setCurrentView(scheduler._currentDate());\r\n\t\t}\r\n\t},\r\n\tdhx_cal_tab:function(){\r\n\t\tvar name = this.getAttribute(\"data-tab\");\r\n\t\tvar deprecated_name = this.getAttribute(\"name\");\r\n\t\tvar mode = name || deprecated_name.substring(0, deprecated_name.search(\"_tab\"));\r\n\t\tscheduler.setCurrentView(scheduler._date,mode);\r\n\t},\r\n\tbuttons:{\r\n\t\t\"delete\":function(id){\r\n\t\t\tvar c = scheduler.locale.labels.confirm_deleting;\r\n\t\t\tscheduler._dhtmlx_confirm({message: c, title: scheduler.locale.labels.title_confirm_deleting, callback:function(){ scheduler.deleteEvent(id); },\r\n\t\t\tconfig: {ok: scheduler.locale.labels.icon_delete}\r\n\t\t});\r\n\t\t},\r\n\t\tedit:function(id){ scheduler.edit(id); },\r\n\t\tsave:function(id){ scheduler.editStop(true); },\r\n\t\tdetails:function(id){ scheduler.showLightbox(id); },\r\n\t\tform:function(id){ scheduler.showLightbox(id); },\r\n\t\tcancel:function(id){ scheduler.editStop(false); }\r\n\t}\r\n};\r\nscheduler._dhtmlx_confirm = function({message, title, callback, config}) {\r\n\tif (!message)\r\n\t\treturn callback();\r\n\r\n\tconfig = config || {};\r\n\tvar opts = { ...config, text: message };\r\n\tif (title)\r\n\t\topts.title = title;\r\n\tif (callback) {\r\n\t\topts.callback = function(result) {\r\n\t\t\tif (result)\r\n\t\t\t\tcallback();\r\n\t\t};\r\n\t}\r\n\tscheduler.confirm(opts);\r\n};\r\nscheduler.addEventNow=function(start,end,e){\r\n\tvar base = {};\r\n\tif (scheduler._isObject(start) && !scheduler._isDate(start)){\r\n\t\tbase = start;\r\n\t\tstart = null;\r\n\t}\r\n\r\n\tvar d = (this.config.event_duration||this.config.time_step)*60000;\r\n\tif (!start) start = base.start_date||Math.round((scheduler._currentDate()).valueOf()/d)*d;\r\n\tvar start_date = new Date(start);\r\n\tif (!end){\r\n\t\tvar start_hour = this.config.first_hour;\r\n\t\tif (start_hour > start_date.getHours()){\r\n\t\t\tstart_date.setHours(start_hour);\r\n\t\t\tstart = start_date.valueOf();\r\n\t\t}\r\n\t\tend = start.valueOf()+d;\r\n\t}\r\n\tvar end_date = new Date(end);\r\n\r\n\t// scheduler.addEventNow(new Date(), new Date()) + collision though get_visible events defect (such event was not retrieved)\r\n\tif(start_date.valueOf() == end_date.valueOf())\r\n\t\tend_date.setTime(end_date.valueOf()+d);\r\n\tbase.start_date = base.start_date||start_date;\r\n\tbase.end_date = base.end_date||end_date;\r\n\tbase.text = base.text||this.locale.labels.new_event;\r\n\tbase.id = this._drag_id = base.id || this.uid();\r\n\tthis._drag_mode=\"new-size\";\r\n\tthis._loading=true;\r\n\tvar eventId = this.addEvent(base);\r\n\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\tthis._loading=false;\r\n\r\n\tthis._drag_event={}; //dummy , to trigger correct event updating logic\r\n\tthis._on_mouse_up(e);\r\n\treturn eventId;\r\n};\r\nscheduler._on_dbl_click=function(e,src){\r\n\tsrc = src||(e.target||e.srcElement);\r\n\tif (this.config.readonly) return;\r\n\tvar name = scheduler._getClassName(src).split(\" \")[0];\r\n\tswitch(name){\r\n\t\tcase \"dhx_scale_holder\":\r\n\t\tcase \"dhx_scale_holder_now\":\r\n\t\tcase \"dhx_month_body\":\r\n\t\tcase \"dhx_wa_day_data\":\r\n\t\t\tif (!scheduler.config.dblclick_create) break;\r\n\t\t\tthis.addEventNow(this.getActionData(e).date,null,e);\r\n\t\t\tbreak;\r\n\t\tcase \"dhx_cal_event\":\r\n\t\tcase \"dhx_wa_ev_body\":\r\n\t\tcase \"dhx_agenda_line\":\r\n\t\tcase \"dhx_cal_agenda_event_line\":\r\n\t\tcase \"dhx_grid_event\":\r\n\t\tcase \"dhx_cal_event_line\":\r\n\t\tcase \"dhx_cal_event_clear\":\r\n\t\t\tvar id = this._locate_event(src);\r\n\t\t\tif (!this.callEvent(\"onDblClick\",[id,e])) return;\r\n\t\t\tif (this.config.details_on_dblclick || this._table_view || !this.getEvent(id)._timed || !this.config.select)\r\n\t\t\t\tthis.showLightbox(id);\r\n\t\t\telse\r\n\t\t\t\tthis.edit(id);\r\n\t\t\tbreak;\r\n\t\tcase \"dhx_time_block\":\r\n\t\tcase \"dhx_cal_container\":\r\n\t\t\treturn;\r\n\t\tdefault:\r\n\t\t\tvar t = this[\"dblclick_\"+name];\r\n\t\t\tif (t) {\r\n\t\t\t\tt.call(this,e);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif (src.parentNode && src != this)\r\n\t\t\t\t\treturn scheduler._on_dbl_click(e,src.parentNode);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t}\r\n};\r\n//column index by mouse x-coordinate\r\nscheduler._get_column_index = function(x_pos){\r\n\tvar column = 0;\r\n\tif (this._cols){\r\n\t\tvar width = 0;\r\n\t\tvar i = 0;\r\n\t\twhile (width + this._cols[i] < x_pos && i < this._cols.length){\r\n\t\t\twidth += this._cols[i];\r\n\t\t\ti++;\r\n\t\t}\r\n\t\tcolumn = i + (this._cols[i] ? ((x_pos - width)/ this._cols[i]) : 0);\r\n\r\n\t\tif (this._ignores){\r\n\t\t\tif(column >= this._cols.length){\r\n\t\t\t\twhile(column >= 1 && this._ignores[Math.floor(column)]){\r\n\t\t\t\t\tcolumn--;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n\treturn column;\r\n};\r\n\r\n//transform mouse coordinates to day-time indexes of week based view\r\nscheduler._week_indexes_from_pos = function(pos){\r\n\t//\"get position\" can be invoked before columns are loaded into the units view(e.g. by onMouseMove handler in key_nav.js)\r\n\tif(!this._cols){\r\n\t\treturn pos;\r\n\t}else{\r\n\t\tvar column = this._get_column_index(pos.x);\r\n\r\n\t\tpos.x=Math.min(this._cols.length-1, Math.max(0,Math.ceil(column)-1));\r\n\t\tpos.y=Math.max(0,Math.ceil(pos.y*60/(this.config.time_step*this.config.hour_size_px))-1)+this.config.first_hour*(60/this.config.time_step);\r\n\t\treturn pos;\r\n\t}\r\n};\r\n\r\nscheduler._mouse_coords=function(ev){\r\n\tvar pos;\r\n\tvar b=document.body;\r\n\tvar d = document.documentElement;\r\n\tif (!this.$env.isIE && (ev.pageX || ev.pageY))\r\n\t\tpos={x:ev.pageX, y:ev.pageY};\r\n\telse pos={\r\n\t\tx:ev.clientX + (b.scrollLeft||d.scrollLeft||0) - b.clientLeft,\r\n\t\ty:ev.clientY + (b.scrollTop||d.scrollTop||0) - b.clientTop\r\n\t};\r\n\t//apply layout\r\n\tif (this.config.rtl && this._colsS) {\r\n\t\tpos.x = this.$container.querySelector(\".dhx_cal_data\").offsetWidth - pos.x;\r\n\t\tpos.x += this.$domHelpers.getAbsoluteLeft(this._obj);\r\n\t\tif (this._mode !== \"month\") {\r\n\t\t\tpos.x -= this.xy.scale_width;\r\n\t\t}\r\n\t} else {\r\n\t\tpos.x-=this.$domHelpers.getAbsoluteLeft(this._obj)+(this._table_view?0:this.xy.scale_width);\r\n\t}\r\n\r\n\tvar dataArea = this.$container.querySelector(\".dhx_cal_data\");\r\n\t//pos.y-=this.$domHelpers.getAbsoluteTop(this._obj)+this.xy.nav_height+(this._dy_shift||0)+this.xy.scale_height-this._els[\"dhx_cal_data\"][0].scrollTop;\r\n\tpos.y-=this.$domHelpers.getAbsoluteTop(dataArea)-this._els[\"dhx_cal_data\"][0].scrollTop;\r\n\tpos.ev = ev;\r\n\tvar handler = this[\"mouse_\"+this._mode];\r\n\tif (handler){\r\n\t\tpos = handler.call(this,pos);\r\n\t}else{\r\n\t\t//transform to date\r\n\t\tif (!this._table_view) {\r\n\t\t\tpos = this._week_indexes_from_pos(pos);\r\n\t\t} else {\r\n\t\t\tvar column = this._get_column_index(pos.x);\r\n\t\t\tif (!this._cols || !this._colsS) // agenda/map views\r\n\t\t\t\treturn pos;\r\n\t\t\tvar dy=0;\r\n\t\t\tfor (dy=1; dy < this._colsS.heights.length; dy++)\r\n\t\t\t\tif (this._colsS.heights[dy]>pos.y) break;\r\n\r\n\t\t\tpos.y=Math.ceil( (Math.max(0, column)+Math.max(0,dy-1)*7)*24*60/this.config.time_step );\r\n\r\n\t\t\tif (scheduler._drag_mode || this._mode == \"month\")\r\n\t\t\t\tpos.y=(Math.max(0,Math.ceil(column)-1)+Math.max(0,dy-1)*7)*24*60/this.config.time_step;\r\n\r\n\t\t\t//we care about ignored days only during event moving in month view\r\n\t\t\tif (this._drag_mode == \"move\"){\r\n\t\t\t\tif (scheduler._ignores_detected && scheduler.config.preserve_length){\r\n\t\t\t\t\tpos._ignores = true;\r\n\t\t\t\t\t//get real lengtn of event\r\n\t\t\t\t\tif (!this._drag_event._event_length)\r\n\t\t\t\t\t\tthis._drag_event._event_length = this._get_real_event_length(this._drag_event.start_date, this._drag_event.end_date, { x_step:1, x_unit:\"day\"});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tpos.x=0;\r\n\t\t}\r\n\t}\r\n\tpos.timestamp = +new Date();\r\n\treturn pos;\r\n};\r\nscheduler._close_not_saved=function(){\r\n\tif (new Date().valueOf()-(scheduler._new_event||0) > 500 && scheduler._edit_id){\r\n\t\tvar c=scheduler.locale.labels.confirm_closing;\r\n\r\n\t\tscheduler._dhtmlx_confirm({message: c, title: scheduler.locale.labels.title_confirm_closing, callback: function() { scheduler.editStop(scheduler.config.positive_closing); }});\r\n\t\tif(c){\r\n\t\t\tthis._drag_id = this._drag_pos = this._drag_mode = null;\r\n\t\t}\r\n\t}\r\n};\r\nscheduler._correct_shift=function(start, back){\r\n\treturn start-=((new Date(scheduler._min_date)).getTimezoneOffset()-(new Date(start)).getTimezoneOffset())*60000*(back?-1:1);\r\n};\r\n\r\nscheduler._is_pos_changed = function(old_pos, new_pos){\r\n\tfunction diff(old_val, new_val, acc){\r\n\t\treturn !!(Math.abs(old_val - new_val) > acc);\r\n\t}\r\n\r\n\tif(!(old_pos && this._drag_pos)){\r\n\t\treturn true;\r\n\t}\r\n\tvar delay = 100,\r\n\t\td_pos = 5;\r\n\r\n\t// start drag only if passed some time since mouse down, or if mouse position changed sufficiently\r\n\treturn !!(this._drag_pos.has_moved || !this._drag_pos.timestamp || (new_pos.timestamp - this._drag_pos.timestamp > delay) || diff(old_pos.ev.clientX, new_pos.ev.clientX, d_pos) || diff(old_pos.ev.clientY, new_pos.ev.clientY, d_pos));\r\n};\r\n\r\nscheduler._correct_drag_start_date = function(start){\r\n\tvar obj;\r\n\tif (scheduler.matrix)\r\n\t\tobj = scheduler.matrix[scheduler._mode];\r\n\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\tstart = new Date(start);\r\n\tvar len = 1;\r\n\tif(obj._start_correction || obj._end_correction)\r\n\t\tlen = (obj.last_hour||0)*60 - (start.getHours()*60+start.getMinutes()) || 1;\r\n\r\n\treturn start*1 + (scheduler._get_fictional_event_length(start, len, obj) - len);\r\n};\r\nscheduler._correct_drag_end_date = function(start, duration){\r\n\tvar obj;\r\n\tif (scheduler.matrix)\r\n\t\tobj = scheduler.matrix[scheduler._mode];\r\n\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\tvar end = start*1 + scheduler._get_fictional_event_length(start, duration, obj);\r\n\treturn new Date(end*1 - (scheduler._get_fictional_event_length(end, -1, obj, -1) + 1));\r\n};\r\n\r\nscheduler._on_mouse_move=function(e){\r\n\tif (this._drag_mode){\r\n\t\tvar pos=this._mouse_coords(e);\r\n\t\tif (this._is_pos_changed(this._drag_pos, pos)){\r\n\t\t\tvar start, end;\r\n\t\t\tif (this._edit_id!=this._drag_id)\r\n\t\t\t\tthis._close_not_saved();\r\n\r\n\t\t\tif(!this._drag_mode)\r\n\t\t\t\treturn;\r\n\r\n\t\t\tvar mousedownPos = null;\r\n\t\t\tif(this._drag_pos && !this._drag_pos.has_moved){\r\n\t\t\t\tmousedownPos = this._drag_pos;\r\n\t\t\t\tmousedownPos.has_moved = true;\r\n\t\t\t}\r\n\r\n\t\t\tthis._drag_pos = pos;\r\n\r\n\t\t\tthis._drag_pos.has_moved = true;\r\n\r\n\t\t\tif (this._drag_mode==\"create\"){\r\n\r\n\t\t\t\t// use mouse down position as a starting point for drag-create\r\n\t\t\t\tif(mousedownPos){\r\n\t\t\t\t\tpos = mousedownPos;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis._close_not_saved();\r\n\t\t\t\tthis.unselect(this._select_id);\r\n\t\t\t\tthis._loading=true; //will be ignored by dataprocessor\r\n\r\n\t\t\t\tstart = this._get_date_from_pos(pos).valueOf();\r\n\r\n\t\t\t\tif (!this._drag_start) {\r\n\t\t\t\t\tvar res = this.callEvent(\"onBeforeEventCreated\", [e, this._drag_id]);\r\n\t\t\t\t\tif (!res){\r\n\t\t\t\t\t\tthis._loading=false;\r\n\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis._loading=false;\r\n\t\t\t\t\tthis._drag_start=start;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tend = start;\r\n\t\t\t\tif (end == this._drag_start) {\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar start_date = new Date(this._drag_start);\r\n\t\t\t\tvar end_date = new Date(end);\r\n\t\t\t\tif ( (this._mode == \"day\" || this._mode == \"week\") &&\r\n\t\t\t\t\t(start_date.getHours() == end_date.getHours() &&\r\n\t\t\t\t\tstart_date.getMinutes() == end_date.getMinutes()) ) {\r\n\t\t\t\t\t\tend_date = new Date(this._drag_start+1000);\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\tthis._drag_id=this.uid();\r\n\t\t\t\tthis.addEvent(start_date, end_date, this.locale.labels.new_event, this._drag_id, pos.fields);\r\n\r\n\t\t\t\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\t\t\t\tthis._loading=false;\r\n\t\t\t\tthis._drag_mode=\"new-size\";\r\n\r\n\t\t\t}\r\n\r\n\t\t\tvar timeStep = this.config.time_step;\r\n\t\t\tvar ev=this.getEvent(this._drag_id);\r\n\t\t\tvar obj;\r\n\t\t\tif (scheduler.matrix)\r\n\t\t\t\tobj = scheduler.matrix[scheduler._mode];\r\n\t\t\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\t\t\tif (this._drag_mode==\"move\"){\r\n\t\t\t\tstart = this._min_date.valueOf()+(pos.y*this.config.time_step+pos.x*24*60)*60000;\r\n\t\t\t\tif (!pos.custom && this._table_view) {\r\n\t\t\t\t\tstart += this.date.time_part(ev.start_date) * 1000;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!this._table_view && this._dragEventBody && this._drag_event._move_event_shift === undefined) {\r\n\t\t\t\t\tthis._drag_event._move_event_shift = start - ev.start_date;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (this._drag_event._move_event_shift) {\r\n\t\t\t\t\tstart -= this._drag_event._move_event_shift;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tstart = this._correct_shift(start);\r\n\r\n\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view && obj){\r\n\r\n\t\t\t\t\tstart = scheduler._correct_drag_start_date(start);\r\n\t\t\t\t\tend = scheduler._correct_drag_end_date(start,this._drag_event._event_length);\r\n\r\n\t\t\t\t} else\r\n\t\t\t\t\tend = ev.end_date.valueOf()-(ev.start_date.valueOf()-start);\r\n\t\t\t} else { // resize\r\n\t\t\t\tstart = ev.start_date.valueOf();\r\n\t\t\t\tend = ev.end_date.valueOf();\r\n\t\t\t\tif (this._table_view) {\r\n\t\t\t\t\tvar resize_date = this._min_date.valueOf()+pos.y*this.config.time_step*60000 + (pos.custom?0:24*60*60000);\r\n\t\t\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\t\t\tresize_date = this._correct_shift(resize_date, false);\r\n\t\t\t\t\t\tif( this._drag_from_start ) {\r\n\t\t\t\t\t\t\tvar day = 24*60*60000;\r\n\t\t\t\t\t\t\tif( resize_date <= scheduler.date.date_part(new Date(end+day-1)).valueOf() ) // to get end time as 23:59:59 and then the day start\r\n\t\t\t\t\t\t\t\tstart = resize_date - day;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tend = resize_date;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif(this.config.preserve_length) {\r\n\t\t\t\t\t\t\tif (pos.resize_from_start) {\r\n\t\t\t\t\t\t\t\tstart = scheduler._correct_drag_start_date(resize_date);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tend = scheduler._correct_drag_end_date(resize_date, 0);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tif (pos.resize_from_start) {\r\n\t\t\t\t\t\t\t\tstart = resize_date;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tend = resize_date;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvar end_day_start = this.date.date_part(new Date(ev.end_date.valueOf() - 1)).valueOf();\r\n\t\t\t\t\tvar end_day_date = new Date(end_day_start);\r\n\t\t\t\t\tvar firstHour = this.config.first_hour;\r\n\t\t\t\t\tvar lastHour = this.config.last_hour;\r\n\t\t\t\t\tvar maxY = (lastHour - firstHour) * (60/timeStep);\r\n\r\n\t\t\t\t\tthis.config.time_step = 1;\r\n\t\t\t\t\tvar precisePos = this._mouse_coords(e);\r\n\t\t\t\t\tthis.config.time_step = timeStep;\r\n\r\n\t\t\t\t\tvar minDate = pos.y*timeStep*60000;\r\n\t\t\t\t\tvar maxDate = Math.min(pos.y + 1, maxY)*timeStep*60000;\r\n\t\t\t\t\tvar preciseDate = precisePos.y*60000;\r\n\r\n\t\t\t\t\t// rounding end date to the closest time step\r\n\t\t\t\t\tif(Math.abs(minDate - preciseDate) > Math.abs(maxDate - preciseDate)){\r\n\t\t\t\t\t\tend = end_day_start + maxDate;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tend = end_day_start + minDate;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = end + ((new Date(end)).getTimezoneOffset() - end_day_date.getTimezoneOffset()) * 60000;\r\n\t\t\t\t\tthis._els[\"dhx_cal_data\"][0].style.cursor=\"s-resize\";\r\n\t\t\t\t\tif (this._mode == \"week\" || this._mode == \"day\")\r\n\t\t\t\t\t\tend = this._correct_shift(end);\r\n\t\t\t\t}\r\n\t\t\t\tif (this._drag_mode == \"new-size\") {\r\n\t\t\t\t\tif (end <= this._drag_start){\r\n\t\t\t\t\t\tvar shift = pos.shift||((this._table_view && !pos.custom)?24*60*60000:0);\r\n\t\t\t\t\t\tstart = end-(pos.shift?0:shift);\r\n\t\t\t\t\t\tend = this._drag_start+(shift||(timeStep*60000));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tstart = this._drag_start;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (end<=start)\r\n\t\t\t\t\t\tend=start+timeStep*60000;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar new_end = new Date(end-1);\r\n\t\t\tvar new_start = new Date(start);\r\n\t\t\t//deny drag out of visible scheduler scale in timeline view\r\n\t\t\tif(this._drag_mode==\"move\" && scheduler.config.limit_drag_out &&\r\n\t\t\t\t(+new_start < +scheduler._min_date || +end > +scheduler._max_date)){\r\n\r\n\t\t\t\tif(+ev.start_date < +scheduler._min_date || +ev.end_date > +scheduler._max_date){\r\n\t\t\t\t\t// not move event if it's already outside time scale\r\n\t\t\t\t\tnew_start = new Date(ev.start_date);\r\n\t\t\t\t\tend = new Date(ev.end_date);\r\n\t\t\t\t}else{\r\n\r\n\t\t\t\t\tvar duration = end - new_start;\r\n\r\n\t\t\t\t\tif(+new_start < +scheduler._min_date){\r\n\t\t\t\t\t\tnew_start = new Date(scheduler._min_date);\r\n\t\t\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view){\r\n\t\t\t\t\t\t\tnew_start = new Date(scheduler._correct_drag_start_date(new_start));\r\n\t\t\t\t\t\t\tif(obj._start_correction)\r\n\t\t\t\t\t\t\t\tnew_start = new Date(new_start.valueOf() + obj._start_correction);\r\n\t\t\t\t\t\t\tend = new Date(new_start*1 + this._get_fictional_event_length(new_start, this._drag_event._event_length, obj));\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tend = new Date(+new_start + duration);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tend = new Date(scheduler._max_date);\r\n\r\n\t\t\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view){\r\n\t\t\t\t\t\t\tif(obj._end_correction)\r\n\t\t\t\t\t\t\t\tend = new Date(end.valueOf() - obj._end_correction);\r\n\t\t\t\t\t\t\tend = new Date(end*1 - this._get_fictional_event_length(end, 0, obj, true));\r\n\t\t\t\t\t\t\tnew_start = new Date(end*1 - this._get_fictional_event_length(end, this._drag_event._event_length, obj, true));\r\n\t\t\t\t\t\t\tif(this._ignores_detected){\r\n\t\t\t\t\t\t\t\tnew_start = scheduler.date.add(new_start, obj.x_step, obj.x_unit);\r\n\t\t\t\t\t\t\t\tend = new Date(end*1 - this._get_fictional_event_length(end, 0, obj, true));\r\n\t\t\t\t\t\t\t\tend = scheduler.date.add(end, obj.x_step, obj.x_unit);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tnew_start = new Date(+end - duration);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t\tvar new_end = new Date(end-1);\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\t// fix event dates when resized to bottom of the column (day/week views)\r\n\t\t\tif(!this._table_view && this._dragEventBody &&\r\n\t\t\t\t!scheduler.config.all_timed &&\r\n\t\t\t\t((!scheduler._get_section_view() && pos.x != this._get_event_sday({start_date: new Date(start), end_date:new Date(start)})) || new Date(start).getHours() < this.config.first_hour)){\r\n\t\t\t\tvar duration = end - new_start;\r\n\t\t\t\tif (this._drag_mode == \"move\") {\r\n\t\t\t\t\tvar day = this._min_date.valueOf() + (pos.x * 24 * 60) * 60000;\r\n\t\t\t\t\tnew_start = new Date(day);\r\n\t\t\t\t\tnew_start.setHours(this.config.first_hour);\r\n\t\t\t\t\tend = new Date(new_start.valueOf() + duration);\r\n\t\t\t\t\tnew_end = new Date(end-1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// fix event dates when resized to bottom of the column (day/week views)\r\n\t\t\tif(!this._table_view &&\r\n\t\t\t\t!scheduler.config.all_timed &&\r\n\t\t\t\t((!scheduler.getView() && pos.x != this._get_event_sday({start_date: new Date(end), end_date:new Date(end)})) || new Date(end).getHours() >= this.config.last_hour)){\r\n\t\t\t\tvar duration = end - new_start;\r\n\t\t\t\tvar day = this._min_date.valueOf()+(pos.x*24*60)*60000;\r\n\t\t\t\tend = scheduler.date.date_part(new Date(day));\r\n\t\t\t\tend.setHours(this.config.last_hour);\r\n\t\t\t\tnew_end = new Date(end-1);\r\n\t\t\t\tif(this._drag_mode == \"move\"){\r\n\t\t\t\t\tnew_start = new Date(+end - duration);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//prevent out-of-borders situation for day|week view\r\n\t\t\tif ( this._table_view || (new_end.getDate()==new_start.getDate() && new_end.getHours()=ed)\r\n\t\t\t\tcls += ' dhx_after';\r\n\t\t\telse if (sd.valueOf()==cd.valueOf())\r\n\t\t\t\tcls += ' dhx_now';\r\n\r\n\t\t\tif (this._ignores_detected && this._ignores[j]){\r\n\t\t\t\tcls += \" dhx_scale_ignore\";\r\n\t\t\t}\r\n\r\n\t\t\tcell.className = cls + \" \" + this.templates.month_date_class(sd, cd);\r\n\r\n\t\t\tcell.setAttribute(\"data-cell-date\", scheduler.templates.format_date(sd));\r\n\t\t\tvar body_class = \"dhx_month_body\";\r\n\t\t\tvar head_class = \"dhx_month_head\";\r\n\t\t\tif (j === 0 && this.config.left_border) {\r\n\t\t\t\tbody_class += \" dhx_month_body_border\";\r\n\t\t\t\thead_class += \" dhx_month_head_border\";\r\n\t\t\t}\r\n\t\t\tif (!this._ignores_detected || !this._ignores[j]){\r\n\t\t\t\tcell.style.width = tdwidths[j];\r\n\t\t\t\tthis._waiAria.monthCellAttr(cell, sd);\r\n\r\n\t\t\t\tvar cellHead = document.createElement(\"div\");\r\n\t\t\t\tcellHead.style.height = scheduler.xy.month_head_height + \"px\";\r\n\t\t\t\tcellHead.className = head_class;\r\n\t\t\t\tcellHead.innerHTML = this.templates.month_day(sd);\r\n\t\t\t\tcell.appendChild(cellHead);\r\n\r\n\t\t\t\tvar cellBody = document.createElement(\"div\");\r\n\t\t\t\tcellBody.className = body_class;\r\n\t\t\t\t// cellBody.style.height = row_height + \"px\";\r\n\t\t\t\t// cellBody.style.width = tdwidths[j];\r\n\t\t\t\tcell.appendChild(cellBody);\r\n\r\n\t\t\t} else {\r\n\t\t\t\tcell.appendChild(document.createElement(\"div\"));\r\n\t\t\t\tcell.appendChild(document.createElement(\"div\"));\r\n\t\t\t}\r\n\t\t\trendered_dates.push(sd);\r\n\t\t\tvar bf1 = sd.getDate();\r\n\t\t\tsd=this.date.add(sd,1,\"day\");\r\n\t\t\tif (sd.getDate() - bf1 > 1)\r\n\t\t\t\tsd = new Date(sd.getFullYear(), sd.getMonth(), bf1 + 1, 12, 0);\r\n\t\t}\r\n\r\n\t\tscheduler._colsS.heights[i] = cellheight;\r\n\t\tcellheight += getCellHeight(i);\r\n\t}\r\n\r\n\tthis._min_date = view_start;\r\n\tthis._max_date = sd;\r\n\r\n\tdiv.innerHTML = \"\";\r\n\tdiv.appendChild(table);\r\n\r\n\tthis._scales = {};\r\n\tvar cells = div.querySelectorAll('[data-cell-date]');\r\n\tcells.forEach((cell) => {\r\n\t\tconst date = scheduler.templates.parse_date(cell.getAttribute(\"data-cell-date\"));\r\n\t\tconst body = cell.querySelector(\".dhx_month_body\");\r\n\t\tthis._scales[+date] = body;\r\n\t\tthis.callEvent(\"onScaleAdd\", [this._scales[+date], date]);\r\n\t});\r\n\r\n\treturn this._max_date;\r\n};\r\n\r\nscheduler._reset_month_scale=function(b,dd,sd,rows){\r\n\t//recalculates rows height and redraws month layout\r\n\tvar ed=scheduler.date.add(dd,1,\"month\");\r\n\r\n\t//trim time part for comparison reasons\r\n\tvar cd = scheduler._currentDate();\r\n\tthis.date.date_part(cd);\r\n\tthis.date.date_part(sd);\r\n\r\n\trows = rows || Math.ceil(Math.round((ed.valueOf()-sd.valueOf()) / (60*60*24*1000) ) / 7);\r\n\r\n\tvar height = (Math.floor(b.clientHeight/rows) - this.xy.month_head_height);\r\n\r\n\tthis._colsS.height = height + this.xy.month_head_height;\r\n\tthis._colsS.heights = [];\r\n\r\n\treturn scheduler._render_month_scale(b, dd, sd, rows);\r\n\r\n};\r\n\r\nscheduler.getView = function (viewName) {\r\n\tif (!viewName) {\r\n\t\tviewName = scheduler.getState().mode;\r\n\t}\r\n\tif (scheduler.matrix && scheduler.matrix[viewName]) {\r\n\t\treturn scheduler.matrix[viewName];\r\n\t}\r\n\r\n\tif (scheduler._props && scheduler._props[viewName]) {\r\n\t\treturn scheduler._props[viewName];\r\n\t}\r\n\r\n\treturn null;\r\n};\r\n\r\nscheduler.getLabel = function(property, key) {\r\n\tvar sections = this.config.lightbox.sections;\r\n\tfor (var i=0; i scheduler.getState().max_date.valueOf()){\r\n\t\t\tendColumnIndex += getDaysDifference(endDate, scheduler.getState().max_date);\r\n\t\t}\r\n\t} else{\r\n\t\tendColumnIndex = Math.round(eventLength/60/60/1000/24);\r\n\t}\r\n\r\n\tvar last_column = true;\r\n\twhile (startColumnIndex < endColumnIndex){\r\n\t\tvar check = scheduler.date.add(endDate, -config.x_step, config.x_unit);\r\n\t\tif (ignore && ignore(endDate) && (!last_column || (last_column && ignore(check) ))){\r\n\t\t\teventLength -= (endDate-check);\r\n\r\n\t\t}else{\r\n\t\t\tlet excludedDuration = 0;\r\n\t\t\tconst intervalStart = new Date(Math.max(check.valueOf(), startDate.valueOf()));\r\n\t\t\tconst intervalEnd = endDate;\r\n\t\t\tconst leftCellCutOffStart = new Date(intervalStart.getFullYear(), intervalStart.getMonth(), intervalStart.getDate(), config.first_hour);\r\n\t\t\tconst leftCellCutOffEnd = new Date(intervalStart.getFullYear(), intervalStart.getMonth(), intervalStart.getDate(), config.last_hour);\r\n\t\t\tconst rightCellCutOffStart = new Date(endDate.getFullYear(), endDate.getMonth(), endDate.getDate(), config.first_hour);\r\n\t\t\tconst rightCellCutOffEnd = new Date(endDate.getFullYear(), endDate.getMonth(), endDate.getDate(), config.last_hour);\r\n\r\n\t\t\tif(intervalEnd.valueOf() > rightCellCutOffEnd.valueOf()){\r\n\t\t\t\texcludedDuration += intervalEnd - rightCellCutOffEnd;\r\n\t\t\t}\r\n\r\n\t\t\tif(intervalEnd.valueOf() > rightCellCutOffStart.valueOf()){\r\n\t\t\t\texcludedDuration += config._start_correction;\r\n\t\t\t} else {\r\n\t\t\t\texcludedDuration += intervalEnd.getHours()*60*60*1000 + intervalEnd.getMinutes()*60*1000;\r\n\t\t\t}\r\n\r\n\t\t\tif(intervalStart.valueOf() < leftCellCutOffEnd.valueOf()){\r\n\t\t\t\texcludedDuration += config._end_correction;\r\n\t\t\t}\r\n\r\n\t\t\tif(intervalStart.valueOf() < leftCellCutOffStart.valueOf()){\r\n\t\t\t\texcludedDuration += (leftCellCutOffStart.valueOf() - intervalStart.valueOf());\r\n\t\t\t}\r\n\t\t\t\r\n\r\n\t\t\teventLength -= excludedDuration;\r\n\t\t\tlast_column = false;\r\n\t\t}\r\n\t\tendDate = check;\r\n\t\tendColumnIndex--;\r\n\t}\r\n\treturn eventLength;\r\n};\r\nscheduler._get_fictional_event_length=function(end_date, ev_length, obj, back){\r\n\tvar sd = new Date(end_date);\r\n\tvar dir = back ? -1 : 1;\r\n\r\n\t//get difference caused by first|last hour\r\n\tif (obj._start_correction || obj._end_correction){\r\n\t\tvar today;\r\n\t\tif (back)\r\n\t\t\ttoday = (sd.getHours()*60+sd.getMinutes()) - (obj.first_hour||0)*60;\r\n\t\telse\r\n\t\t\ttoday = (obj.last_hour||0)*60 - (sd.getHours()*60+sd.getMinutes());\r\n\t\tvar per_day = (obj.last_hour - obj.first_hour)*60;\r\n\t\tvar days = Math.ceil( (ev_length / (60*1000) - today ) / per_day);\r\n\t\tif(days < 0) days = 0;\r\n\t\tev_length += days * (24*60 - per_day) * 60 * 1000;\r\n\t}\r\n\r\n\tvar fd = new Date(end_date*1+ev_length*dir);\r\n\tvar ignore = this[\"ignore_\"+this._mode];\r\n\r\n\tvar start_slot = 0,\r\n\t\tend_slot;\r\n\tif (obj.render){\r\n\t\tstart_slot = this._get_date_index(obj, sd);\r\n\t\tend_slot = this._get_date_index(obj, fd);\r\n\t} else{\r\n\t\tend_slot = Math.round(ev_length/60/60/1000/24);\r\n\t}\r\n\r\n\twhile (start_slot*dir <= end_slot*dir){\r\n\t\tvar check = scheduler.date.add(sd, obj.x_step*dir, obj.x_unit);\r\n\t\tif (ignore && ignore(sd)){\r\n\t\t\tev_length += (check-sd)*dir;\r\n\t\t\tend_slot += dir;\r\n\t\t}\r\n\r\n\t\tsd = check;\r\n\t\tstart_slot+=dir;\r\n\t}\r\n\r\n\treturn ev_length;\r\n};\r\n\r\nscheduler._get_section_view = function(){\r\n\treturn this.getView();\r\n};\r\n\r\nscheduler._get_section_property = function(){\r\n\tif(this.matrix && this.matrix[this._mode]){\r\n\t\treturn this.matrix[this._mode].y_property;\r\n\t}else if(this._props && this._props[this._mode]){\r\n\t\treturn this._props[this._mode].map_to;\r\n\t}\r\n\treturn null;\r\n};\r\n\r\nscheduler._is_initialized = function(){\r\n\tvar state = this.getState();\r\n\treturn (this._obj && state.date && state.mode);\r\n};\r\nscheduler._is_lightbox_open = function(){\r\n\tvar state = this.getState();\r\n\treturn state.lightbox_id !== null && state.lightbox_id !== undefined;\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n(function(){\r\n\r\n\t// eslint-disable-next-line no-control-regex\r\n\tvar htmlTags = new RegExp(\"<(?:.|\\n)*?>\", \"gm\");\r\n\tvar extraSpaces = new RegExp(\" +\", \"gm\");\r\n\r\n\tfunction stripHTMLLite(htmlText){\r\n\t\treturn (htmlText + \"\")\r\n\t\t\t.replace(htmlTags, \" \").\r\n\t\t\treplace(extraSpaces, \" \");\r\n\t}\r\n\r\n\tvar singleQuotes = new RegExp(\"'\", \"gm\");\r\n\tfunction escapeQuotes(text){\r\n\t\treturn (text + \"\").replace(singleQuotes, \"'\");\r\n\t}\r\n\r\n\tscheduler._waiAria = {\r\n\t\tgetAttributeString: function(attr){\r\n\t\t\tvar attributes = [\" \"];\r\n\t\t\tfor(var i in attr){\r\n\t\t\t\tif(typeof attr[i] != \"function\" && typeof attr[i] != \"object\") {\r\n\t\t\t\t\tvar text = escapeQuotes(stripHTMLLite(attr[i]));\r\n\t\t\t\t\tattributes.push(i + \"='\" + text + \"'\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tattributes.push(\" \");\r\n\t\t\treturn attributes.join(\" \");\r\n\t\t},\r\n\t\tsetAttributes: function(div, values){\r\n\t\t\tfor(var i in values){\r\n\t\t\t\tdiv.setAttribute(i, stripHTMLLite(values[i]));\r\n\t\t\t}\r\n\t\t\treturn div;\r\n\t\t},\r\n\r\n\t\tlabelAttr: function(div, content){\r\n\t\t\treturn this.setAttributes(div, {\"aria-label\": content});\r\n\t\t},\r\n\t\tlabel: function(label){\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": label});\r\n\t\t},\r\n\r\n\t\t// day/week/units\r\n\r\n\t\thourScaleAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\r\n\t\t},\r\n\t\tmonthCellAttr: function(div, date){\r\n\t\t\tthis.labelAttr(div, scheduler.templates.day_date(date));\r\n\t\t},\r\n\r\n\t\tnavBarDateAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\t\t},\r\n\t\tdayHeaderAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\t\t},\r\n\r\n\t\tdayColumnAttr: function(div, date){\r\n\t\t\tthis.dayHeaderAttr(div, scheduler.templates.day_date(date));\r\n\t\t},\r\n\r\n\t\theaderButtonsAttributes: function(div, label){\r\n\t\t\treturn this.setAttributes(div, {\"role\":\"button\", \"aria-label\":label});\r\n\t\t},\r\n\r\n\t\theaderToggleState: function(div, isActive){\r\n\t\t\treturn this.setAttributes(div, {\"aria-pressed\": isActive ? \"true\" : \"false\"});\r\n\t\t},\r\n\r\n\r\n\t\tgetHeaderCellAttr:function(dateString){\r\n\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": dateString});\r\n\t\t},\r\n\r\n\r\n\t\teventAttr: function(event, div){\r\n\t\t\tthis._eventCommonAttr(event, div);\r\n\t\t},\r\n\r\n\r\n\t\t_eventCommonAttr: function(event, div){\r\n\t\t\tdiv.setAttribute(\"aria-label\", stripHTMLLite(scheduler.templates.event_text(event.start_date, event.end_date, event)));\r\n\r\n\t\t\tif(scheduler.config.readonly){\r\n\t\t\t\tdiv.setAttribute(\"aria-readonly\", true);\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif(event.$dataprocessor_class){\r\n\t\t\t\tdiv.setAttribute(\"aria-busy\", true);\r\n\t\t\t}\r\n\r\n\r\n\t\t\tdiv.setAttribute(\"aria-selected\",\r\n\t\t\t\t(scheduler.getState().select_id == event.id) ? \"true\" : \"false\");\r\n\t\t},\r\n\r\n\t\tsetEventBarAttr: function(event, div){\r\n\t\t\tthis._eventCommonAttr(event, div);\r\n\t\t},\r\n\r\n\t\t_getAttributes: function(attributeSetter, arg){\r\n\t\t\tvar result = {\r\n\t\t\t\tsetAttribute:function(name, value){\r\n\t\t\t\t\tthis[name] = value;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\tattributeSetter.apply(this, [arg, result]);\r\n\t\t\treturn result;\r\n\r\n\t\t},\r\n\r\n\t\teventBarAttrString: function(event){\r\n\t\t\treturn this.getAttributeString(this._getAttributes(this.setEventBarAttr, event));\r\n\t\t},\r\n\r\n\r\n\r\n\t\tagendaHeadAttrString :function(){\r\n\t\t\treturn this.getAttributeString({role: \"row\"});\r\n\t\t},\r\n\t\tagendaHeadDateString :function(label){\r\n\t\t\treturn this.getAttributeString({role: \"columnheader\", \"aria-label\": label});\r\n\t\t},\r\n\t\tagendaHeadDescriptionString :function(label){\r\n\t\t\treturn this.agendaHeadDateString(label);\r\n\t\t},\r\n\t\tagendaDataAttrString: function(){\r\n\t\t\treturn this.getAttributeString({role: \"grid\"});\r\n\t\t},\r\n\t\tagendaEventAttrString: function(event){\r\n\t\t\tvar attrs = this._getAttributes(this._eventCommonAttr, event);\r\n\r\n\t\t\tattrs[\"role\"] = \"row\";\r\n\r\n\t\t\treturn this.getAttributeString(attrs);\r\n\r\n\t\t},\r\n\t\tagendaDetailsBtnString: function(){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels.icon_details});\r\n\t\t},\r\n\r\n\r\n\t\tgridAttrString: function(){\r\n\t\t\treturn this.getAttributeString({role: \"grid\"});\r\n\t\t},\r\n\r\n\t\tgridRowAttrString: function(event){\r\n\t\t\treturn this.agendaEventAttrString(event);\r\n\t\t},\r\n\r\n\t\tgridCellAttrString: function(event, column, value){\r\n\t\t\treturn this.getAttributeString({\"role\":\"gridcell\", \"aria-label\": [\r\n\t\t\t\t(column.label === undefined ? column.id : column.label),\r\n\t\t\t\t\": \",\r\n\t\t\t\tvalue\r\n\t\t\t]});\r\n\t\t},\r\n\r\n\t\tmapAttrString: function(){\r\n\t\t\treturn this.gridAttrString();\r\n\t\t},\r\n\t\tmapRowAttrString: function(event){\r\n\t\t\treturn this.gridRowAttrString(event);\r\n\t\t},\r\n\t\tmapDetailsBtnString: function(){\r\n\t\t\treturn this.agendaDetailsBtnString();\r\n\t\t},\r\n\r\n\t\tminicalHeader: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"id\":headerId+\"\",\r\n\t\t\t\t\"aria-live\":\"assertice\",\r\n\t\t\t\t\"aria-atomic\":\"true\"\r\n\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalGrid: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"aria-labelledby\":headerId+\"\",\r\n\t\t\t\t\"role\":\"grid\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalRow: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"row\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalDayCell: function(div, date){\r\n\t\t\tvar selected = (date.valueOf() < scheduler._max_date.valueOf() && date.valueOf() >= scheduler._min_date.valueOf());\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"gridcell\",\r\n\t\t\t\t\"aria-label\": scheduler.templates.day_date(date),\r\n\t\t\t\t\"aria-selected\": selected ? \"true\" : \"false\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalHeadCell: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"columnheader\"\r\n\t\t\t});\r\n\t\t},\r\n\r\n\r\n\t\tweekAgendaDayCell: function(div, date){\r\n\t\t\tvar header = div.querySelector(\".dhx_wa_scale_bar\");\r\n\t\t\tvar content = div.querySelector(\".dhx_wa_day_data\");\r\n\t\t\tvar headerId = scheduler.uid() + \"\";\r\n\t\t\tthis.setAttributes(header, { \"id\": headerId});\r\n\t\t\tthis.setAttributes(content, { \"aria-labelledby\": headerId});\r\n\r\n\t\t},\r\n\t\tweekAgendaEvent: function(div, event){\r\n\t\t\tthis.eventAttr(event, div);\r\n\t\t},\r\n\r\n\t\tlightboxHiddenAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t},\r\n\r\n\t\tlightboxVisibleAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"false\");\r\n\t\t},\r\n\r\n\t\tlightboxSectionButtonAttrString: function(label){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":label, \"tabindex\":\"0\"});\r\n\t\t},\r\n\r\n\t\tyearHeader: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"id\":headerId+\"\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tyearGrid: function(div, headerId){\r\n\t\t\tthis.minicalGrid(div, headerId);\r\n\t\t},\r\n\t\tyearHeadCell: function(div){\r\n\t\t\treturn this.minicalHeadCell(div);\r\n\t\t},\r\n\t\tyearRow: function(div){\r\n\t\t\treturn this.minicalRow(div);\r\n\t\t},\r\n\t\tyearDayCell: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"gridcell\"\r\n\t\t\t});\r\n\t\t},\r\n\r\n\t\tlightboxAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t\tdiv.firstChild.setAttribute(\"role\", \"heading\");\r\n\t\t},\r\n\r\n\t\tlightboxButtonAttrString:function(buttonName){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels[buttonName], \"tabindex\":\"0\"});\r\n\t\t},\r\n\t\teventMenuAttrString: function(iconName){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels[iconName]});\r\n\t\t},\r\n\t\tlightboxHeader: function(div, headerText){\r\n\t\t\tdiv.setAttribute(\"aria-label\", headerText);\r\n\t\t},\r\n\r\n\t\tlightboxSelectAttrString: function(time_option){\r\n\t\t\tvar label = \"\";\r\n\r\n\t\t\tswitch (time_option) {\r\n\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.year;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%m\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.month;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%d\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.day;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%H:%i\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.hour + \" \" + scheduler.locale.labels.minute;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": label});\r\n\t\t},\r\n\r\n\r\n\t\tmessageButtonAttrString: function(buttonLabel){\r\n\t\t\treturn \"tabindex='0' role='button' aria-label='\"+buttonLabel+\"'\";\r\n\t\t},\r\n\r\n\t\tmessageInfoAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"alert\");\r\n\t\t\t//div.setAttribute(\"tabindex\", \"-1\");\r\n\t\t},\r\n\r\n\t\tmessageModalAttr: function(div, uid){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t\tif(uid){\r\n\t\t\t\tdiv.setAttribute(\"aria-labelledby\", uid);\r\n\t\t\t}\r\n\r\n\t\t\t//\tdiv.setAttribute(\"tabindex\", \"-1\");\r\n\t\t},\r\n\r\n\t\tquickInfoAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t},\r\n\r\n\t\tquickInfoHeaderAttrString: function(){\r\n\t\t\treturn \" role='heading' \";\r\n\t\t},\r\n\r\n\t\tquickInfoHeader: function(div, header){\r\n\t\t\tdiv.setAttribute(\"aria-label\", header);\r\n\t\t},\r\n\r\n\t\tquickInfoButtonAttrString: function(label){\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"role\":\"button\", \"aria-label\":label, \"tabindex\":\"0\"});\r\n\t\t},\r\n\r\n\t\ttooltipAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"tooltip\");\r\n\t\t},\r\n\r\n\t\ttooltipVisibleAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"false\");\r\n\t\t},\r\n\r\n\t\ttooltipHiddenAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t}\r\n\t};\r\n\r\n\tfunction isDisabled(){\r\n\t\treturn !scheduler.config.wai_aria_attributes;\r\n\t}\r\n\r\n\tfor(var i in scheduler._waiAria){\r\n\t\tscheduler._waiAria[i] = (function(payload){\r\n\t\t\treturn function(){\r\n\t\t\t\tif(isDisabled()){\r\n\t\t\t\t\treturn \" \";\r\n\t\t\t\t}\r\n\t\t\t\treturn payload.apply(this, arguments);\r\n\t\t\t};\r\n\t\t})(scheduler._waiAria[i]);\r\n\t}\r\n\r\n\r\n})();\r\n\r\n}","export default function(scheduler){\r\n\treturn function assert(check, message){\r\n\t\tif (!check){\r\n\t\t\tif(scheduler.config.show_errors && scheduler.callEvent(\"onError\",[message]) !== false) {\r\n\t\t\t\tif (scheduler.message) {\r\n\t\t\t\t\tscheduler.message({type: \"error\", text: message, expire: -1});\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t// eslint-disable-next-line\r\n\t\t\t\t\tconsole.log(message);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// eslint-disable-next-line no-debugger\r\n\t\t\t\tdebugger;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n}","export default function extend(scheduler) {\r\n\r\nif (window.jQuery){\r\n\r\n(function( $ ){\r\n\tvar counter = 0;\r\n\tvar methods = [];\r\n\t$.fn.dhx_scheduler = function(config){\r\n\t\tif (typeof(config) === 'string') {\r\n\t\t\tif (methods[config] ) {\r\n\t\t\t\treturn methods[config].apply(this, []);\r\n\t\t\t}else {\r\n\t\t\t\t$.error('Method ' + config + ' does not exist on jQuery.dhx_scheduler');\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tvar views = [];\r\n\t\t\tthis.each(function() {\r\n\t\t\t\tif (this && this.getAttribute){\r\n\t\t\t\t\tif (!this.getAttribute(\"dhxscheduler\")){\r\n\t\t\t\t\t\tvar name = \"scheduler\";\r\n\t\t\t\t\t\tif (counter){\r\n\t\t\t\t\t\t\tname = \"scheduler\" + (counter+1);\r\n\t\t\t\t\t\t\twindow[name] = Scheduler.getSchedulerInstance();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tvar comp = window[name];\r\n\r\n\t\t\t\t\t\tthis.setAttribute(\"dhxscheduler\", name);\r\n\t\t\t\t\t\tfor (var key in config)\r\n\t\t\t\t\t\t\tif (key!=\"data\")\r\n\t\t\t\t\t\t\t\tcomp.config[key] = config[key];\r\n\r\n\t\t\t\t\t\tif (!this.getElementsByTagName(\"div\").length){\r\n\t\t\t\t\t\t\tthis.innerHTML = '
';\r\n\t\t\t\t\t\t\tthis.className += \" dhx_cal_container\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcomp.init(this, comp.config.date, comp.config.mode);\r\n\t\t\t\t\t\tif (config.data)\r\n\t\t\t\t\t\t\tcomp.parse(config.data);\r\n\r\n\t\t\t\t\t\tviews.push(comp);\r\n\t\t\t\t\t\tcounter++;\r\n\t\t\t\t\t} else\r\n\t\t\t\t\t\tviews.push(window[this.getAttribute(\"dhxscheduler\")]);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif (views.length === 1) return views[0];\r\n\t\t\treturn views;\r\n\t\t}\r\n\t};\r\n\r\n\r\n\r\n\r\n})(window.jQuery);\r\n\r\n}\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler.destructor = function(){\r\n\tscheduler.callEvent(\"onDestroy\", []);\r\n\tthis.clearAll();\r\n\r\n\tif(this.$container){\r\n\t\t// FIXME: clear container or remove container\r\n\t\tthis.$container.innerHTML = \"\";\r\n\t\t// scheduler.$domHelpers.remove(this.$container);\r\n\t}\r\n\r\n\tif(this._eventRemoveAll){\r\n\t\tthis._eventRemoveAll();\r\n\t}\r\n\r\n\tif(this.resetLightbox){\r\n\t\tthis.resetLightbox();\r\n\t}\r\n\r\n\tif(this._dp && this._dp.destructor){\r\n\t\tthis._dp.destructor();\r\n\t}\r\n\r\n\t// detachAllEvents should be called last, because in components may be attached events\r\n\tthis.detachAllEvents();\r\n\r\n\tfor(var i in this){\r\n\t\tif(i.indexOf(\"$\") === 0){\r\n\t\t\tdelete this[i];\r\n\t\t}\r\n\t}\r\n\tscheduler.$destroyed = true;\r\n};\r\n\r\n}","import serialize from \"../common/url_serialize.js\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler.Promise = window.Promise; \r\n\r\nfunction createConfig(method, args) {\r\n\tvar result = {\r\n\t\tmethod: method\r\n\t};\r\n\r\n\tif (args.length === 0) {\r\n\t\tthrow new Error(\"Arguments list of query is wrong.\");\r\n\t}\r\n\tif (args.length === 1) {\r\n\t\tif (typeof args[0] === \"string\") {\r\n\t\t\tresult.url = args[0];\r\n\t\t\tresult.async = true;\r\n\t\t} else {\r\n\t\t\tresult.url = args[0].url;\r\n\t\t\tresult.async = (args[0].async || true);\r\n\t\t\tresult.callback = args[0].callback;\r\n\t\t\tresult.headers = args[0].headers;\r\n\t\t}\r\n\t\tif (method === \"POST\" || \"PUT\") {\r\n\t\t\tif (args[0].data) {\r\n\t\t\t\tif (typeof args[0].data !== \"string\") {\r\n\t\t\t\t\tresult.data = serialize(args[0].data);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresult.data = args[0].data;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tresult.data = \"\";\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n\r\n\tresult.url = args[0];\r\n\tswitch(method) {\r\n\t\tcase \"GET\":\r\n\t\tcase \"DELETE\":\r\n\t\t\tresult.callback = args[1];\r\n\t\t\tresult.headers = args[2];\r\n\t\tbreak;\r\n\t\tcase \"POST\":\r\n\t\tcase \"PUT\":\r\n\t\t\tif (args[1]) {\r\n\t\t\t\tif (typeof args[1] !== \"string\") {\r\n\t\t\t\t\tresult.data = serialize(args[1]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresult.data = args[1];\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tresult.data = \"\";\r\n\t\t\t}\r\n\t\t\tresult.callback = args[2];\r\n\t\t\tresult.headers = args[3];\r\n\t\tbreak;\r\n\t}\r\n\treturn result;\r\n}\r\nscheduler.ajax = {\r\n\t// if false - dhxr param will added to prevent caching on client side (default),\r\n\t// if true - do not add extra params\r\n\tcache: true,\r\n\r\n\t// default method for load/loadStruct, post/get allowed\r\n\tmethod: \"get\",\r\n\r\n\tserializeRequestParams: serialize,\r\n\tparse: function(data) {\r\n\t\tif (typeof data !== \"string\") return data;\r\n\r\n\t\tvar obj;\r\n\t\tdata = data.replace(/^[\\s]+/,\"\");\r\n\t\tif (typeof DOMParser !== \"undefined\" && !scheduler.$env.isIE) { // ff,ie9\r\n\t\t\tobj = (new DOMParser()).parseFromString(data, \"text/xml\");\r\n\t\t} else if (typeof window.ActiveXObject !== \"undefined\") {\r\n\t\t\tobj = new window.ActiveXObject(\"Microsoft.XMLDOM\");\r\n\t\t\tobj.async = \"false\";\r\n\t\t\tobj.loadXML(data);\r\n\t\t}\r\n\t\treturn obj;\r\n\t},\r\n\txmltop: function(tagname, xhr, obj) {\r\n\t\tif (typeof xhr.status == \"undefined\" || xhr.status < 400) {\r\n\t\t\tvar xml = (!xhr.responseXML) ? this.parse(xhr.responseText || xhr) : (xhr.responseXML || xhr);\r\n\t\t\tif (xml && xml.documentElement !== null && !xml.getElementsByTagName(\"parsererror\").length) {\r\n\t\t\t\treturn xml.getElementsByTagName(tagname)[0];\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (obj !== -1) scheduler.callEvent(\"onLoadXMLError\",[\"Incorrect XML\", arguments[1], obj]);\r\n\t\treturn document.createElement(\"DIV\");\r\n\t},\r\n\txpath: function(xpathExp, docObj) {\r\n\t\tif (!docObj.nodeName) docObj = docObj.responseXML || docObj;\r\n\t\tif (scheduler.$env.isIE) {\r\n\t\t\treturn docObj.selectNodes(xpathExp)||[];\r\n\t\t} else {\r\n\t\t\tvar rows = [];\r\n\t\t\tvar first;\r\n\t\t\tvar col = (docObj.ownerDocument||docObj).evaluate(xpathExp, docObj, null, XPathResult.ANY_TYPE, null);\r\n\r\n\t\t\twhile (true){\r\n\t\t\t\tfirst = col.iterateNext();\r\n\t\t\t\tif(first){\r\n\t\t\t\t\trows.push(first);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn rows;\r\n\t\t}\r\n\t},\r\n\tquery: function(config) {\r\n\t\treturn this._call(\r\n\t\t\t(config.method || \"GET\"),\r\n\t\t\tconfig.url,\r\n\t\t\tconfig.data || \"\",\r\n\t\t\t(config.async || true),\r\n\t\t\tconfig.callback,\r\n\t\t\tconfig.headers\r\n\t\t);\r\n\t},\r\n\tget: function(url, onLoad, headers) {\r\n\t\tvar config = createConfig(\"GET\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tgetSync: function(url, headers) {\r\n\t\tvar config = createConfig(\"GET\", arguments);\r\n\t\tconfig.async = false;\r\n\t\treturn this.query(config);\r\n\t},\r\n\tput: function(url, postData, onLoad, headers) {\r\n\t\tvar config = createConfig(\"PUT\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tdel: function(url, onLoad, headers) {\r\n\t\t/**\r\n\t\t * https://tools.ietf.org/html/rfc7231#section-4.3.5\r\n\t\t * A payload within a DELETE request message has no defined semantics;\r\n\t\t * sending a payload body on a DELETE request might cause some existing\r\n\t\t * implementations to reject the request.\r\n\t\t */\r\n\t\tvar config = createConfig(\"DELETE\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tpost: function(url, postData, onLoad, headers) {\r\n\t\tif (arguments.length == 1) {\r\n\t\t\tpostData = \"\";\r\n\t\t} else if (arguments.length == 2 && typeof(postData) == \"function\") {\r\n\t\t\tonLoad = postData;\r\n\t\t\tpostData = \"\";\r\n\t\t}\r\n\t\tvar config = createConfig(\"POST\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tpostSync: function(url, postData, headers) {\r\n\t\tpostData = (postData === null ? \"\" : String(postData));\r\n\r\n\t\tvar config = createConfig(\"POST\", arguments);\r\n\t\tconfig.async = false;\r\n\t\treturn this.query(config);\r\n\t},\r\n\t_call: function(method, url, postData, async, onLoad, headers) {\r\n\t\treturn new scheduler.Promise((function(resolve, reject) {\r\n\t\t\tvar t = (typeof XMLHttpRequest !== undefined && !scheduler.$env.isIE ? new XMLHttpRequest() : new window.ActiveXObject(\"Microsoft.XMLHTTP\"));\r\n\t\t\tvar isQt = (navigator.userAgent.match(/AppleWebKit/) !== null && navigator.userAgent.match(/Qt/) !== null && navigator.userAgent.match(/Safari/) !== null);\r\n\r\n\t\t\tif (!!async) {\r\n\t\t\t\tt.addEventListener(\"readystatechange\", function() {\r\n\t\t\t\t\tif ((t.readyState == 4) || (isQt && t.readyState == 3)) { // what for long response and status 404?\r\n\t\t\t\t\t\tif (t.status != 200 || t.responseText === \"\")\r\n\t\t\t\t\t\t\tif (!scheduler.callEvent(\"onAjaxError\", [t])) return;\r\n\r\n\t\t\t\t\t\tsetTimeout(function() {\r\n\t\t\t\t\t\t\tif (typeof(onLoad) == \"function\") {\r\n\t\t\t\t\t\t\t\tonLoad.apply(window, [{xmlDoc:t, filePath:url}]); // dhtmlx-compat, response.xmlDoc.responseXML/responseText\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tresolve(t);\r\n\t\t\t\t\t\t\tif (typeof(onLoad) == \"function\") {\r\n\t\t\t\t\t\t\t\tonLoad = null;\r\n\t\t\t\t\t\t\t\tt = null;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}, 0);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif (method == \"GET\" && !this.cache) {\r\n\t\t\t\turl += (url.indexOf(\"?\")>=0?\"&\":\"?\")+\"dhxr\"+new Date().getTime()+\"=1\";\r\n\t\t\t}\r\n\r\n\t\t\tt.open(method, url, async);\r\n\r\n\t\t\tif (headers){\r\n\t\t\t\tfor (var key in headers)\r\n\t\t\t\t\tt.setRequestHeader(key, headers[key]);\r\n\t\t\t} else if (method.toUpperCase() == \"POST\" || method == \"PUT\" || method == \"DELETE\") {\r\n\t\t\t\tt.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\r\n\t\t\t} else if (method == \"GET\") {\r\n\t\t\t\tpostData = null;\r\n\t\t\t}\r\n\r\n\t\t\tt.setRequestHeader(\"X-Requested-With\", \"XMLHttpRequest\");\r\n\r\n\t\t\tt.send(postData);\r\n\r\n\t\t\tif (!async) return {xmlDoc:t, filePath:url}; // dhtmlx-compat, response.xmlDoc.responseXML/responseText\r\n\t\t}.bind(this)));\r\n\t},\r\n\turlSeparator: function(str){\r\n\t\tif (str.indexOf(\"?\") != -1)\r\n\t\t\treturn \"&\";\r\n\t\telse\r\n\t\t\treturn \"?\";\r\n\t}\r\n};\r\n\r\nscheduler.$ajax = scheduler.ajax; // for old\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n/*\r\n%e\tDay of the month without leading zeros (01..31)\r\n%d\tDay of the month, 2 digits with leading zeros (01..31)\r\n%j\tDay of the year, 3 digits with leading zeros (001..366)\r\n%a\tA textual representation of a day, two letters\r\n%W\tA full textual representation of the day of the week\r\n\r\n%c\tNumeric representation of a month, without leading zeros (0..12)\r\n%m\tNumeric representation of a month, with leading zeros (00..12)\r\n%b\tA short textual representation of a month, three letters (Jan..Dec)\r\n%M\tA full textual representation of a month, such as January or March (January..December)\r\n\r\n%y\tA two digit representation of a year (93..03)\r\n%Y\tA full numeric representation of a year, 4 digits (1993..03)\r\n*/\r\n\r\nscheduler.config={\r\n\tdefault_date: \"%j %M %Y\",\r\n\tmonth_date: \"%F %Y\",\r\n\tload_date: \"%Y-%m-%d\",\r\n\tweek_date: \"%l\",\r\n\tday_date: \"%D %j\",\r\n\thour_date: \"%H:%i\",\r\n\tmonth_day: \"%d\",\r\n\t//xml_date: \"%m/%d/%Y %H:%i\",\r\n\tdate_format: \"%Y-%m-%d %H:%i\",\r\n\tapi_date: \"%d-%m-%Y %H:%i\",\r\n\tparse_exact_format: false,\r\n\tpreserve_length:true,\r\n\ttime_step: 5,\r\n\tdisplayed_event_color: \"#ff4a4a\",\r\n\tdisplayed_event_text_color: \"#ffef80\",\r\n\twide_form: 0,\r\n\tday_column_padding: 8,\r\n\tuse_select_menu_space: true,\r\n\tfix_tab_position: true,\r\n\tstart_on_monday: true,\r\n\tfirst_hour: 0,\r\n\tlast_hour: 24,\r\n\treadonly: false,\r\n\tdrag_resize: true,\r\n\tdrag_move: true,\r\n\tdrag_create: true,\r\n\tdrag_event_body: true,\r\n\tdblclick_create: true,\r\n\tdetails_on_dblclick: true,\r\n\tedit_on_create: true,\r\n\tdetails_on_create: true,\r\n\theader: null,\r\n\thour_size_px: 44,\r\n\tresize_month_events:false,\r\n\tresize_month_timed:false,\r\n\t\r\n\tresponsive_lightbox: false,\r\n\tseparate_short_events: true,\r\n\trtl:false,\r\n\r\n\tcascade_event_display: false,\r\n\tcascade_event_count: 4,\r\n\tcascade_event_margin: 30,\r\n\r\n\tmulti_day:true,\r\n\tmulti_day_height_limit: 200,\r\n\r\n\tdrag_lightbox: true,\r\n\tpreserve_scroll: true,\r\n\tselect: true,\r\n\r\n\tserver_utc: false,\r\n\ttouch:true,\r\n\ttouch_tip:true,\r\n\ttouch_drag:500,\r\n\ttouch_swipe_dates: false,\r\n\tquick_info_detached:true,\r\n\r\n\tpositive_closing: false,\r\n\t//header_datepicker: true,\r\n\tdrag_highlight: true,\r\n\tlimit_drag_out: false,\r\n\ticons_edit: [\"icon_save\", \"icon_cancel\"],\r\n\ticons_select: [\"icon_details\", \"icon_edit\", \"icon_delete\"],\r\n\tbuttons_left: [\"dhx_save_btn\", \"dhx_cancel_btn\"],\r\n\tbuttons_right: [\"dhx_delete_btn\"],\r\n\tlightbox: {\r\n\t\tsections: [\r\n\t\t\t{name: \"description\", map_to: \"text\", type: \"textarea\", focus: true},\r\n\t\t\t{name: \"time\", height: 72, type: \"time\", map_to: \"auto\"}\r\n\t\t]\r\n\t},\r\n\thighlight_displayed_event: true,\r\n\tleft_border: false,\r\n\r\n\tajax_error: \"alert\",//\"ignore\"|\"console\"\r\n\tdelay_render: 0,\r\n\ttimeline_swap_resize: true,\r\n\twai_aria_attributes: true,\r\n\twai_aria_application_role: true,\r\n\r\n\tcsp: \"auto\",\r\n\tevent_attribute: \"data-event-id\",\r\n\tshow_errors: true\r\n};\r\n\r\nscheduler.config.buttons_left.$initial = scheduler.config.buttons_left.join();\r\nscheduler.config.buttons_right.$initial = scheduler.config.buttons_right.join();\r\n\r\nscheduler._helpers = {\r\n\tparseDate: function parseDate(date) {\r\n\t\tvar parse = scheduler.templates.xml_date || scheduler.templates.parse_date;\r\n\t\treturn parse(date);\r\n\t},\r\n\tformatDate: function formatDate(date) {\r\n\t\tvar format = scheduler.templates.xml_format || scheduler.templates.format_date;\r\n\t\treturn format(date);\r\n\t}\r\n};\r\n\r\nscheduler.templates={};\r\nscheduler.init_templates=function(){\r\n\r\n\r\n\r\n\tvar d=scheduler.date.date_to_str;\r\n\tvar c=scheduler.config;\r\n\tvar f = function(a,b){\r\n\t\tfor (var c in b)\r\n\t\t\tif (!a[c]) a[c]=b[c];\r\n\t};\r\n\tf(scheduler.templates,{\r\n\t\tday_date:d(c.default_date),\r\n\t\tmonth_date:d(c.month_date),\r\n\t\tweek_date:function(d1,d2){\r\n\t\t\tif(c.rtl) {\r\n\t\t\t\treturn scheduler.templates.day_date(scheduler.date.add(d2,-1,\"day\"))+\" – \"+scheduler.templates.day_date(d1);\r\n\t\t\t} \r\n\t\t\treturn scheduler.templates.day_date(d1)+\" – \"+scheduler.templates.day_date(scheduler.date.add(d2,-1,\"day\"));\r\n\t\t},\r\n\t\tday_scale_date:d(c.default_date),\r\n\t\ttime_slot_text: function(date){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\ttime_slot_class: function(date){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\r\n\t\tmonth_scale_date:d(c.week_date),\r\n\t\tweek_scale_date:d(c.day_date),\r\n\t\thour_scale:d(c.hour_date),\r\n\t\ttime_picker:d(c.hour_date),\r\n\t\tevent_date:d(c.hour_date),\r\n\t\tmonth_day:d(c.month_day),\r\n\r\n\t\tload_format: d(c.load_date),\r\n\t//\txml_date:scheduler.date.str_to_date(c.xml_date,c.server_utc),\r\n\t//\txml_format:d(c.date_format,c.server_utc),\r\n\t\tformat_date: d(c.date_format, c.server_utc),\r\n\t\tparse_date:scheduler.date.str_to_date(c.date_format,c.server_utc),\r\n\t\tapi_date:scheduler.date.str_to_date(c.api_date, false, false),\r\n\t\tevent_header:function(start,end,ev){\r\n\r\n\t\t\tif(ev._mode === \"small\" || ev._mode === \"smallest\"){\r\n\t\t\t\treturn scheduler.templates.event_date(start);\r\n\t\t\t}else{\r\n\t\t\t\treturn scheduler.templates.event_date(start)+\" - \"+scheduler.templates.event_date(end);\r\n\t\t\t}\r\n\t\t},\r\n\t\tevent_text:function(start,end,ev){\r\n\t\t\treturn ev.text;\r\n\t\t},\r\n\t\tevent_class:function(start,end,ev){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tmonth_date_class:function(d){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tweek_date_class:function(d){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tevent_bar_date:function(start,end,ev) {\r\n\t\t\treturn scheduler.templates.event_date(start);\r\n\t\t},\r\n\t\tevent_bar_text:function(start,end,ev){\r\n\t\t\treturn ev.text;\r\n\t\t},\r\n\t\tmonth_events_link : function(date, count){\r\n\t\t\treturn \"View more(\"+count+\" events)\";\r\n\t\t},\r\n\t\tdrag_marker_class : function(start, end, event){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tdrag_marker_content : function(start, end, event){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\t/* Could be redifined */\r\n\t\ttooltip_date_format: scheduler.date.date_to_str(\"%Y-%m-%d %H:%i\"),\r\n\t\ttooltip_text: function(start, end, event) {\r\n\t\t\treturn \"Event: \" + event.text + \"
Start date: \" + scheduler.templates.tooltip_date_format(start) + \"
End date: \" + scheduler.templates.tooltip_date_format(end);\r\n\t\t},\r\n\r\n\t\tcalendar_month: d(\"%F %Y\"),\r\n\t\tcalendar_scale_date: d(\"%D\"),\r\n\t\tcalendar_date: d(\"%d\"),\r\n\t\tcalendar_time: d(\"%d-%m-%Y\")\r\n\r\n\t});\r\n\tthis.callEvent(\"onTemplatesReady\",[]);\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler._events = {};\r\nscheduler.clearAll = function() {\r\n\tthis._events = {};\r\n\tthis._loaded = {};\r\n\r\n\tthis._edit_id = null;\r\n\tthis._select_id = null;\r\n\tthis._drag_id = null;\r\n\tthis._drag_mode = null;\r\n\tthis._drag_pos = null;\r\n\tthis._new_event = null;\r\n\r\n\tthis.clear_view();\r\n\tthis.callEvent(\"onClearAll\", []);\r\n};\r\nscheduler.addEvent = function(start_date, end_date, text, id, extra_data) {\r\n\tif (!arguments.length)\r\n\t\treturn this.addEventNow();\r\n\tvar ev = start_date;\r\n\tif (arguments.length != 1) {\r\n\t\tev = extra_data || {};\r\n\t\tev.start_date = start_date;\r\n\t\tev.end_date = end_date;\r\n\t\tev.text = text;\r\n\t\tev.id = id;\r\n\t}\r\n\tev.id = ev.id || scheduler.uid();\r\n\tev.text = ev.text || \"\";\r\n\r\n\tif (typeof ev.start_date == \"string\") ev.start_date = this.templates.api_date(ev.start_date);\r\n\tif (typeof ev.end_date == \"string\") ev.end_date = this.templates.api_date(ev.end_date);\r\n\tvar d = (this.config.event_duration || this.config.time_step) * 60000;\r\n\tif (ev.start_date.valueOf() == ev.end_date.valueOf())\r\n\t\tev.end_date.setTime(ev.end_date.valueOf() + d);\r\n\r\n\tev.start_date.setMilliseconds(0);\r\n\tev.end_date.setMilliseconds(0);\r\n\r\n\tev._timed = this.isOneDayEvent(ev);\r\n\r\n\tvar is_new = !this._events[ev.id];\r\n\tthis._events[ev.id] = ev;\r\n\tthis.event_updated(ev);\r\n\tif (!this._loading)\r\n\t\tthis.callEvent(is_new ? \"onEventAdded\" : \"onEventChanged\", [ev.id, ev]);\r\n\treturn ev.id;\r\n};\r\nscheduler.deleteEvent = function(id, silent) {\r\n\tvar ev = this._events[id];\r\n\tif (!silent && (!this.callEvent(\"onBeforeEventDelete\", [id, ev]) || !this.callEvent(\"onConfirmedBeforeEventDelete\", [id, ev])))\r\n\t\treturn;\r\n\tif (ev) {\r\n\t\tif(scheduler.getState().select_id == id){\r\n\t\t\tscheduler.unselect();\r\n\t\t}\r\n\t\tdelete this._events[id];\r\n\t\tthis.event_updated(ev);\r\n\r\n\t\tif(this._drag_id == ev.id){\r\n\t\t\tthis._drag_id = null;\r\n\t\t\tthis._drag_mode=null;\r\n\t\t\tthis._drag_pos=null;\r\n\t\t}\r\n\t}\r\n\r\n\tthis.callEvent(\"onEventDeleted\", [id, ev]);\r\n};\r\nscheduler.getEvent = function(id) {\r\n\treturn this._events[id];\r\n};\r\nscheduler.setEvent = function(id, hash) {\r\n\tif(!hash.id)\r\n\t\thash.id = id;\r\n\r\n\tthis._events[id] = hash;\r\n};\r\nscheduler.for_rendered = function(id, method) {\r\n\tfor (var i = this._rendered.length - 1; i >= 0; i--)\r\n\t\tif (this._rendered[i].getAttribute(this.config.event_attribute) == id)\r\n\t\t\tmethod(this._rendered[i], i);\r\n};\r\nscheduler.changeEventId = function(id, new_id) {\r\n\tif (id == new_id) return;\r\n\tvar ev = this._events[id];\r\n\tif (ev) {\r\n\t\tev.id = new_id;\r\n\t\tthis._events[new_id] = ev;\r\n\t\tdelete this._events[id];\r\n\t}\r\n\tthis.for_rendered(id, function(r) {\r\n\t\tr.setAttribute(\"event_id\", new_id); // for backward compatibility\r\n\t\tr.setAttribute(scheduler.config.event_attribute, new_id);\r\n\t});\r\n\tif (this._select_id == id) this._select_id = new_id;\r\n\tif (this._edit_id == id) this._edit_id = new_id;\r\n\t//if (this._drag_id==id) this._drag_id=new_id;\r\n\tthis.callEvent(\"onEventIdChange\", [id, new_id]);\r\n};\r\n\r\n(function() {\r\n\tvar attrs = [\"text\", \"Text\", \"start_date\", \"StartDate\", \"end_date\", \"EndDate\"];\r\n\tvar create_getter = function(name) {\r\n\t\treturn function(id) { return (scheduler.getEvent(id))[name]; };\r\n\t};\r\n\tvar create_setter = function(name) {\r\n\t\treturn function(id, value) {\r\n\t\t\tvar ev = scheduler.getEvent(id);\r\n\t\t\tev[name] = value;\r\n\t\t\tev._changed = true;\r\n\t\t\tev._timed = this.isOneDayEvent(ev);\r\n\t\t\tscheduler.event_updated(ev, true);\r\n\t\t};\r\n\t};\r\n\tfor (var i = 0; i < attrs.length; i += 2) {\r\n\t\tscheduler[\"getEvent\" + attrs[i + 1]] = create_getter(attrs[i]);\r\n\t\tscheduler[\"setEvent\" + attrs[i + 1]] = create_setter(attrs[i]);\r\n\t}\r\n})();\r\n\r\nscheduler.event_updated = function(ev, force) {\r\n\tif (this.is_visible_events(ev))\r\n\t\tthis.render_view_data();\r\n\telse\r\n\t\tthis.clear_event(ev.id);\r\n};\r\nscheduler.is_visible_events = function(ev) {\r\n\tif(!this._min_date || !this._max_date){\r\n\t\treturn false;\r\n\t}\r\n\r\n\t//if in displayed dates\r\n\tvar in_visible_range = (ev.start_date.valueOf() < this._max_date.valueOf() && this._min_date.valueOf() < ev.end_date.valueOf());\r\n\r\n\tif(in_visible_range){\r\n\r\n\t\t//end dates are not between last/first hours\r\n\t\tvar evFirstHour = ev.start_date.getHours(),\r\n\t\t\tevLastHour = ev.end_date.getHours() + (ev.end_date.getMinutes()/60),\r\n\t\t\tlastHour = this.config.last_hour,\r\n\t\t\tfirstHour = this.config.first_hour;\r\n\r\n\t\tvar end_dates_visible = (this._table_view || !((evLastHour > lastHour || evLastHour <= firstHour) && (evFirstHour >= lastHour || evFirstHour < firstHour)));\r\n\r\n\t\tif(end_dates_visible){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\r\n\t\t\t//event is bigger than area hidden between last/first hours\r\n\t\t\tvar event_duration = (ev.end_date.valueOf() - ev.start_date.valueOf()) / (1000*60*60),//hours\r\n\t\t\t\thidden_duration = 24 - (this.config.last_hour - this.config.first_hour);\r\n\r\n\t\t\treturn !!((event_duration > hidden_duration) || (evFirstHour < lastHour && evLastHour > firstHour));\r\n\r\n\t\t}\r\n\t}else{\r\n\t\treturn false;\r\n\t}\r\n};\r\nscheduler.isOneDayEvent = function(ev) {\r\n\t// decrease by one ms so events that ends on midnight on the next day were still considered one day events\r\n\t// e.g. (09-02-2018 19:00 - 10-02-2018 00:00)\r\n\t// events >= 24h long are considered multiday\r\n\tvar checkEndDate = new Date(ev.end_date.valueOf() - 1);\r\n\treturn (\r\n\t\tev.start_date.getFullYear() === checkEndDate.getFullYear() &&\r\n\t\tev.start_date.getMonth() === checkEndDate.getMonth() &&\r\n\t\tev.start_date.getDate() === checkEndDate.getDate()\r\n\t) && ((ev.end_date.valueOf() - ev.start_date.valueOf()) < (1000 * 60 * 60 * 24));\r\n};\r\n\r\nscheduler.get_visible_events = function(only_timed) {\r\n\t//not the best strategy for sure\r\n\tvar stack = [];\r\n\r\n\tfor (var id in this._events)\r\n\t\tif (this.is_visible_events(this._events[id]))\r\n\t\t\tif (!only_timed || this._events[id]._timed)\r\n\t\t\t\tif (this.filter_event(id, this._events[id]))\r\n\t\t\t\t\tstack.push(this._events[id]);\r\n\r\n\treturn stack;\r\n};\r\nscheduler.filter_event = function(id, ev) {\r\n\tvar filter = this[\"filter_\" + this._mode];\r\n\treturn (filter) ? filter(id, ev) : true;\r\n};\r\nscheduler._is_main_area_event = function(ev){\r\n\treturn !!ev._timed;\r\n};\r\nscheduler.render_view_data = function(evs, hold) {\r\n\tvar full = false;\r\n\tif (!evs) {\r\n\t\tfull = true;\r\n\t\tif (this._not_render) {\r\n\t\t\tthis._render_wait = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._render_wait = false;\r\n\r\n\t\tthis.clear_view();\r\n\t\tevs = this.get_visible_events(!(this._table_view || this.config.multi_day));\r\n\t}\r\n\tfor(var i= 0, len = evs.length; i < len; i++){\r\n\t\tthis._recalculate_timed(evs[i]);\r\n\t}\r\n\r\n\tif (this.config.multi_day && !this._table_view) {\r\n\r\n\t\tvar tvs = [];\r\n\t\tvar tvd = [];\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tif (this._is_main_area_event(evs[i]))\r\n\t\t\t\ttvs.push(evs[i]);\r\n\t\t\telse\r\n\t\t\t\ttvd.push(evs[i]);\r\n\t\t}\r\n\r\n\t\tif(!this._els['dhx_multi_day']){\r\n\t\t\tvar message = scheduler._commonErrorMessages.unknownView(this._mode);\r\n\t\t\tthrow new Error(message);\r\n\t\t}\r\n\r\n\t\t// multiday events\r\n\t\tthis._rendered_location = this._els['dhx_multi_day'][0];\r\n\t\tthis._table_view = true;\r\n\t\tthis.render_data(tvd, hold);\r\n\t\tthis._table_view = false;\r\n\r\n\t\t// normal events\r\n\t\tthis._rendered_location = this._els['dhx_cal_data'][0];\r\n\t\tthis._table_view = false;\r\n\t\tthis.render_data(tvs, hold);\r\n\r\n\t} else {\r\n\t\tvar buffer = document.createDocumentFragment();\r\n\t\tvar renderedLocation = this._els['dhx_cal_data'][0];\r\n\t\tthis._rendered_location = buffer;\r\n\t\tthis.render_data(evs, hold);\r\n\t\trenderedLocation.appendChild(buffer);\r\n\t\tthis._rendered_location = renderedLocation;\r\n\r\n\t}\r\n\r\n\tif(full){\r\n\t\tthis.callEvent(\"onDataRender\", []);\r\n\t}\r\n};\r\n\r\n\r\nscheduler._view_month_day = function(e){\r\n\tvar date = scheduler.getActionData(e).date;\r\n\tif(!scheduler.callEvent(\"onViewMoreClick\", [date]))\r\n\t\treturn;\r\n\tscheduler.setCurrentView(date, \"day\");\r\n};\r\n\r\nscheduler._render_month_link = function(ev){\r\n\tvar parent = this._rendered_location;\r\n\tvar toRender = this._lame_clone(ev);\r\n\r\n\t//render links in each cell of multiday events\r\n\tfor(var d = ev._sday; d < ev._eday; d++){\r\n\r\n\t\ttoRender._sday = d;\r\n\t\ttoRender._eday = d+1;\r\n\r\n\t\tvar date = scheduler.date;\r\n\t\tvar curr = scheduler._min_date;\r\n\t\tcurr = date.add(curr, toRender._sweek, \"week\");\r\n\t\tcurr = date.add(curr, toRender._sday, \"day\");\r\n\t\tvar count = scheduler.getEvents(curr, date.add(curr, 1, \"day\")).length;\r\n\r\n\t\tvar pos = this._get_event_bar_pos(toRender);\r\n\t\tvar widt = (pos.x2 - pos.x);\r\n\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tscheduler.event(el, \"click\", function(e){scheduler._view_month_day(e);});\r\n\t\tel.className = \"dhx_month_link\";\r\n\t\tel.style.top = pos.y + \"px\";\r\n\t\tel.style.left = pos.x + \"px\";\r\n\t\tel.style.width = widt + \"px\";\r\n\t\tel.innerHTML = scheduler.templates.month_events_link(curr, count);\r\n\t\tthis._rendered.push(el);\r\n\r\n\t\tparent.appendChild(el);\r\n\t}\r\n};\r\n\r\nscheduler._recalculate_timed = function(id){\r\n\tif(!id) return;\r\n\tvar ev;\r\n\tif(typeof(id) != \"object\")\r\n\t\tev = this._events[id];\r\n\telse\r\n\t\tev = id;\r\n\tif(!ev) return;\r\n\tev._timed = scheduler.isOneDayEvent(ev);\r\n};\r\nscheduler.attachEvent(\"onEventChanged\", scheduler._recalculate_timed);\r\nscheduler.attachEvent(\"onEventAdded\", scheduler._recalculate_timed);\r\n\r\nscheduler.render_data = function(evs, hold) {\r\n\tevs = this._pre_render_events(evs, hold);\r\n\tvar containers = {};\r\n\tfor (var i = 0; i < evs.length; i++)\r\n\t\tif (this._table_view){\r\n\t\t\tif(scheduler._mode != 'month'){\r\n\t\t\t\tthis.render_event_bar(evs[i]);//may be multiday section on other views\r\n\t\t\t}else{\r\n\r\n\t\t\t\tvar max_evs = scheduler.config.max_month_events;\r\n\t\t\t\tif(max_evs !== max_evs*1 || evs[i]._sorder < max_evs){\r\n\t\t\t\t\t//of max number events per month cell is set and event can be rendered\r\n\t\t\t\t\tthis.render_event_bar(evs[i]);\r\n\t\t\t\t}else if(max_evs !== undefined && evs[i]._sorder == max_evs){\r\n\t\t\t\t\t//render 'view more' links\r\n\t\t\t\t\tscheduler._render_month_link(evs[i]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\t//do not render events with ordinal number > maximum events per cell\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t}else{\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tvar parent = scheduler.locate_holder(ev._sday);\r\n\t\t\tif (!parent) continue; //attempt to render non-visible event\r\n\r\n\t\t\tif(!containers[ev._sday]){\r\n\t\t\t\tcontainers[ev._sday] = {\r\n\t\t\t\t\treal: parent,\r\n\t\t\t\t\tbuffer: document.createDocumentFragment(),\r\n\t\t\t\t\twidth: parent.clientWidth\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\tvar container = containers[ev._sday];\r\n\t\t\tthis.render_event(ev, container.buffer, container.width);\r\n\t\t}\r\n\r\n\t\tfor(var i in containers){\r\n\t\t\tvar container = containers[i];\r\n\t\t\tif(container.real && container.buffer){\r\n\t\t\t\tcontainer.real.appendChild(container.buffer);\r\n\t\t\t}\r\n\t\t}\r\n};\r\n\r\nscheduler._get_first_visible_cell = function(cells) {\r\n\tfor (var i = 0; i < cells.length; i++) {\r\n\t\tif ((cells[i].className || \"\").indexOf(\"dhx_scale_ignore\") == -1) {\r\n\t\t\treturn cells[i];\r\n\t\t}\r\n\t}\r\n\t// if no visible cell found, return cells[0] to be more tolerant, since it's the original logic\r\n\treturn cells[0];\r\n};\r\n\r\nscheduler._pre_render_events = function(evs, hold) {\r\n\tvar hb = this.xy.bar_height;\r\n\tvar h_old = this._colsS.heights;\r\n\tvar h = this._colsS.heights = [0, 0, 0, 0, 0, 0, 0];\r\n\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\r\n\tif (!this._table_view) {\r\n\t\tevs = this._pre_render_events_line(evs, hold); //ignore long events for now\r\n\t}\r\n\telse {\r\n\t\tevs = this._pre_render_events_table(evs, hold);\r\n\t}\r\n\tif (this._table_view) {\r\n\t\tif (hold)\r\n\t\t\tthis._colsS.heights = h_old;\r\n\t\telse {\r\n\t\t\tvar monthRows = data.querySelectorAll(\".dhx_cal_month_row\");\r\n\t\t\tif (monthRows.length) {\r\n\t\t\t\tfor (var i = 0; i < monthRows.length; i++) {\r\n\t\t\t\t\th[i]++;\r\n\t\t\t\t\tvar cells = monthRows[i].querySelectorAll(\".dhx_cal_month_cell\");\r\n\t\t\t\t\tvar cellHeight = this._colsS.height - this.xy.month_head_height;\r\n\t\t\t\t\tif ((h[i]) * hb > cellHeight) { // 22 - height of cell's header\r\n\t\t\t\t\t\t//we have overflow, update heights\r\n\r\n\t\t\t\t\t\tvar cHeight = cellHeight;\r\n\t\t\t\t\t\tif(this.config.max_month_events*1 !== this.config.max_month_events || h[i] <= this.config.max_month_events){\r\n\t\t\t\t\t\t\tcHeight = h[i] * hb;\r\n\t\t\t\t\t\t}else if( (this.config.max_month_events + 1) * hb > cellHeight){\r\n\t\t\t\t\t\t\tcHeight = (this.config.max_month_events + 1) * hb;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tmonthRows[i].style.height = (cHeight + this.xy.month_head_height) + \"px\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\th[i] = (h[i - 1] || 0) + scheduler._get_first_visible_cell(cells).offsetHeight;\r\n\t\t\t\t}\r\n\t\t\t\th.unshift(0);\r\n\t\t\t\tconst dataArea = this.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tif (dataArea.offsetHeight < dataArea.scrollHeight && !scheduler._colsS.scroll_fix && scheduler.xy.scroll_width) {\r\n\r\n\t\t\t\t\tvar scale_settings = scheduler._colsS,\r\n\t\t\t\t\t\tsum_width = scale_settings[scale_settings.col_length],\r\n\t\t\t\t\t\trow_heights = scale_settings.heights.slice();\r\n\r\n\t\t\t\t\tsum_width -= (scheduler.xy.scroll_width || 0);\r\n\t\t\t\t\tthis._calc_scale_sizes(sum_width, this._min_date, this._max_date);\r\n\t\t\t\t\tscheduler._colsS.heights = row_heights;\r\n\r\n\t\t\t\t\tthis.set_xy(this._els[\"dhx_cal_header\"][0], sum_width/*, this.xy.scale_height*/);\r\n\t\t\t\t\tscheduler._render_scales(this._els[\"dhx_cal_header\"][0]);\r\n\t\t\t\t\tscheduler._render_month_scale(this._els[\"dhx_cal_data\"][0], this._get_timeunit_start(), this._min_date);\r\n\r\n\t\t\t\t\tscale_settings.scroll_fix = true;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (!evs.length && this._els[\"dhx_multi_day\"][0].style.visibility == \"visible\")\r\n\t\t\t\t\th[0] = -1;\r\n\t\t\t\tif (evs.length || h[0] == -1) {\r\n\t\t\t\t\t//shift days to have space for multiday events\r\n\t\t\t\t\t//var childs = evl.parentNode.childNodes;\r\n\r\n\t\t\t\t\t// +1 so multiday events would have 2px from top and 2px from bottom by default\r\n\t\t\t\t\tvar full_multi_day_height = (h[0] + 1) * hb + 4;\r\n\r\n\t\t\t\t\tvar used_multi_day_height = full_multi_day_height;\r\n\t\t\t\t\tvar used_multi_day_height_css = full_multi_day_height + \"px\";\r\n\t\t\t\t\tif (this.config.multi_day_height_limit) {\r\n\t\t\t\t\t\tused_multi_day_height = Math.min(full_multi_day_height, this.config.multi_day_height_limit) ;\r\n\t\t\t\t\t\tused_multi_day_height_css = used_multi_day_height + \"px\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tvar multi_day_section = this._els[\"dhx_multi_day\"][0];\r\n\t\t\t\t\tmulti_day_section.style.height = used_multi_day_height_css;\r\n\t\t\t\t\tmulti_day_section.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\tmulti_day_section.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\r\n\t\t\t\t\t// icon\r\n\t\t\t\t\tvar multi_day_icon = this._els[\"dhx_multi_day\"][1];\r\n\t\t\t\t\tmulti_day_icon.style.height = used_multi_day_height_css;\r\n\t\t\t\t\tmulti_day_icon.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\tmulti_day_icon.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\t\t\t\t\tmulti_day_icon.className = h[0] ? \"dhx_multi_day_icon\" : \"dhx_multi_day_icon_small\";\r\n\t\t\t\t\tthis._dy_shift = (h[0] + 1) * hb;\r\n\t\t\t\t\tif(this.config.multi_day_height_limit){\r\n\t\t\t\t\t\tthis._dy_shift = Math.min(this.config.multi_day_height_limit, this._dy_shift);\r\n\t\t\t\t\t}\r\n\t\t\t\t\th[0] = 0;\r\n\r\n\t\t\t\t\tif (used_multi_day_height != full_multi_day_height) {\r\n\r\n\t\t\t\t\t\tmulti_day_section.style.overflowY = \"auto\";\r\n\t\t\t\t\t//\tmulti_day_section.style.width = (parseInt(this._els[\"dhx_cal_navline\"][0].style.width)) + \"px\";\r\n\r\n\t\t\t\t\t\tmulti_day_icon.style.position = \"fixed\";\r\n\t\t\t\t\t\tmulti_day_icon.style.top = \"\";\r\n\t\t\t\t\t\tmulti_day_icon.style.left = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn evs;\r\n};\r\nscheduler._get_event_sday = function(ev) {\r\n\t// get day in current view\r\n\t// use rounding for 23 or 25 hour days on DST\r\n\tvar datePart = this.date.day_start(new Date(ev.start_date));\r\n\treturn Math.round((datePart.valueOf() - this._min_date.valueOf()) / (24 * 60 * 60 * 1000));\r\n};\r\nscheduler._get_event_mapped_end_date = function(ev) {\r\n\tvar end_date = ev.end_date;\r\n\tif (this.config.separate_short_events) {\r\n\t\tvar ev_duration = (ev.end_date - ev.start_date) / 60000; // minutes\r\n\t\tif (ev_duration < this._min_mapped_duration) {\r\n\t\t\tend_date = this.date.add(end_date, this._min_mapped_duration - ev_duration, \"minute\");\r\n\t\t}\r\n\t}\r\n\treturn end_date;\r\n};\r\nscheduler._pre_render_events_line = function(evs, hold){\r\n\tevs.sort(function(a, b) {\r\n\t\tif (a.start_date.valueOf() == b.start_date.valueOf())\r\n\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\treturn a.start_date > b.start_date ? 1 : -1;\r\n\t});\r\n\tvar days = []; //events by weeks\r\n\tvar evs_originals = [];\r\n\r\n\tthis._min_mapped_duration = Math.floor(this.xy.min_event_height * 60 / this.config.hour_size_px); // values could change along the way\r\n\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tvar ev = evs[i];\r\n\r\n\t\t//check date overflow\r\n\t\tvar sd = ev.start_date;\r\n\t\tvar ed = ev.end_date;\r\n\t\t//check scale overflow\r\n\t\tvar sh = sd.getHours();\r\n\t\tvar eh = ed.getHours();\r\n\t\tev._sday = this._get_event_sday(ev); // sday based on event start_date\r\n\t\tif (this._ignores[ev._sday]){\r\n\t\t\t//ignore event\r\n\t\t\tevs.splice(i,1);\r\n\t\t\ti--;\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\tif (!days[ev._sday]) days[ev._sday] = [];\r\n\r\n\t\tif (!hold) {\r\n\t\t\tev._inner = false;\r\n\r\n\t\t\tvar stack = days[ev._sday];\r\n\r\n\t\t\twhile (stack.length) {\r\n\t\t\t\tvar t_ev = stack[stack.length - 1];\r\n\t\t\t\tvar t_end_date = this._get_event_mapped_end_date(t_ev);\r\n\t\t\t\tif (t_end_date.valueOf() <= ev.start_date.valueOf()) {\r\n\t\t\t\t\tstack.splice(stack.length - 1, 1);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar slot_index = stack.length;\r\n\t\t\tvar sorderSet = false;\r\n\t\t\tfor (var j = 0; j < stack.length; j++) {\r\n\t\t\t\tvar t_ev = stack[j];\r\n\t\t\t\tvar t_end_date = this._get_event_mapped_end_date(t_ev);\r\n\t\t\t\tif (t_end_date.valueOf() <= ev.start_date.valueOf()) {\r\n\t\t\t\t\tsorderSet = true;\r\n\t\t\t\t\tev._sorder = t_ev._sorder;\r\n\t\t\t\t\tslot_index = j;\r\n\t\t\t\t\tev._inner = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (stack.length)\r\n\t\t\t\tstack[stack.length - 1]._inner = true;\r\n\r\n\t\t\tif (!sorderSet) {\r\n\t\t\t\tif (stack.length) {\r\n\t\t\t\t\tif (stack.length <= stack[stack.length - 1]._sorder) {\r\n\t\t\t\t\t\tif (!stack[stack.length - 1]._sorder)\r\n\t\t\t\t\t\t\tev._sorder = 0;\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tfor (j = 0; j < stack.length; j++) {\r\n\t\t\t\t\t\t\t\tvar _is_sorder = false;\r\n\t\t\t\t\t\t\t\tfor (var k = 0; k < stack.length; k++) {\r\n\t\t\t\t\t\t\t\t\tif (stack[k]._sorder == j) {\r\n\t\t\t\t\t\t\t\t\t\t_is_sorder = true;\r\n\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (!_is_sorder) {\r\n\t\t\t\t\t\t\t\t\tev._sorder = j;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\tev._inner = true;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tvar _max_sorder = stack[0]._sorder;\r\n\t\t\t\t\t\tfor (j = 1; j < stack.length; j++) {\r\n\t\t\t\t\t\t\tif (stack[j]._sorder > _max_sorder)\r\n\t\t\t\t\t\t\t\t_max_sorder = stack[j]._sorder;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tev._sorder = _max_sorder + 1;\r\n\t\t\t\t\t\tev._inner = false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} else\r\n\t\t\t\t\tev._sorder = 0;\r\n\t\t\t}\r\n\r\n\t\t\tstack.splice(slot_index, slot_index == stack.length ? 0 : 1, ev);\r\n\r\n\t\t\tif (stack.length > (stack.max_count || 0)) {\r\n\t\t\t\tstack.max_count = stack.length;\r\n\t\t\t\tev._count = stack.length;\r\n\t\t\t} else {\r\n\t\t\t\tev._count = (ev._count) ? ev._count : 1;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (sh < this.config.first_hour || eh >= this.config.last_hour) {\r\n\t\t\t// Need to create copy of event as we will be changing it's start/end date\r\n\t\t\t// e.g. first_hour = 11 and event.start_date hours = 9. Need to preserve that info\r\n\t\t\tevs_originals.push(ev);\r\n\t\t\tevs[i] = ev = this._copy_event(ev);\r\n\r\n\t\t\tif (sh < this.config.first_hour) {\r\n\t\t\t\tev.start_date.setHours(this.config.first_hour);\r\n\t\t\t\tev.start_date.setMinutes(0);\r\n\t\t\t}\r\n\t\t\tif (eh >= this.config.last_hour) {\r\n\t\t\t\tev.end_date.setMinutes(0);\r\n\t\t\t\tev.end_date.setHours(this.config.last_hour);\r\n\t\t\t}\r\n\r\n\t\t\tif (ev.start_date > ev.end_date || sh == this.config.last_hour) {\r\n\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (!hold) {\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tevs[i]._count = days[evs[i]._sday].max_count;\r\n\t\t}\r\n\t\tfor (var i = 0; i < evs_originals.length; i++)\r\n\t\t\tevs_originals[i]._count = days[evs_originals[i]._sday].max_count;\r\n\t}\r\n\r\n\treturn evs;\r\n};\r\nscheduler._time_order = function(evs) {\r\n\tevs.sort(function(a, b) {\r\n\t\tif (a.start_date.valueOf() == b.start_date.valueOf()) {\r\n\t\t\tif (a._timed && !b._timed) return 1;\r\n\t\t\tif (!a._timed && b._timed) return -1;\r\n\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\t}\r\n\t\treturn a.start_date > b.start_date ? 1 : -1;\r\n\t});\r\n};\r\n\r\nscheduler._is_any_multiday_cell_visible = function(from, to, event){\r\n\tvar cols = this._cols.length;\r\n\tvar isAnyCellVisible = false;\r\n\tvar checkDate = from;\r\n\tvar noCells = true;\r\n\tvar lastDayEnd = new Date(to);\r\n\tif(scheduler.date.day_start(new Date(to)).valueOf() != to.valueOf()){\r\n\t\tlastDayEnd = scheduler.date.day_start(lastDayEnd);\r\n\t\tlastDayEnd = scheduler.date.add(lastDayEnd, 1, \"day\");\r\n\t}\r\n\twhile(checkDate < lastDayEnd){\r\n\t\tnoCells = false;\r\n\t\tvar cellIndex = this.locate_holder_day(checkDate, false, event);\r\n\t\tvar weekCellIndex = cellIndex % cols;\r\n\t\tif(!this._ignores[weekCellIndex]){\r\n\t\t\tisAnyCellVisible = true;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tcheckDate = scheduler.date.add(checkDate, 1, \"day\");\r\n\t}\r\n\treturn noCells || isAnyCellVisible;\r\n};\r\n\r\nscheduler._pre_render_events_table = function(evs, hold) { // max - max height of week slot\r\n\tthis._time_order(evs);\r\n\tvar out = [];\r\n\tvar weeks = [\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[]\r\n\t]; //events by weeks\r\n\tvar max = this._colsS.heights;\r\n\tvar start_date;\r\n\tvar cols = this._cols.length;\r\n\tvar chunks_info = {};\r\n\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tvar ev = evs[i];\r\n\t\tvar id = ev.id;\r\n\t\tif (!chunks_info[id]) {\r\n\t\t\tchunks_info[id] = {\r\n\t\t\t\tfirst_chunk: true,\r\n\t\t\t\tlast_chunk: true\r\n\t\t\t};\r\n\t\t}\r\n\t\tvar chunk_info = chunks_info[id];\r\n\t\tvar sd = (start_date || ev.start_date);\r\n\t\tvar ed = ev.end_date;\r\n\t\t//trim events which are crossing through current view\r\n\t\tif (sd < this._min_date) {\r\n\t\t\tchunk_info.first_chunk = false;\r\n\t\t\tsd = this._min_date;\r\n\t\t}\r\n\t\tif (ed > this._max_date) {\r\n\t\t\tchunk_info.last_chunk = false;\r\n\t\t\ted = this._max_date;\r\n\t\t}\r\n\r\n\t\tvar locate_s = this.locate_holder_day(sd, false, ev);\r\n\t\tev._sday = locate_s % cols;\r\n\t\t//skip single day events for ignored dates\r\n\t\tif (this._ignores[ev._sday] && ev._timed) continue;\r\n\r\n\t\tvar locate_e = this.locate_holder_day(ed, true, ev) || cols;\r\n\t\tev._eday = (locate_e % cols) || cols; //cols used to fill full week, when event end on monday\r\n\t\tev._length = locate_e - locate_s;\r\n\t\t//3600000 - compensate 1 hour during winter|summer time shift\r\n\t\tev._sweek = Math.floor((this._correct_shift(sd.valueOf(), 1) - this._min_date.valueOf()) / (60 * 60 * 1000 * 24 * cols));\r\n\r\n\t\tvar isAnyCellVisible = scheduler._is_any_multiday_cell_visible(sd, ed, ev);\r\n\r\n\t\tif(!isAnyCellVisible){\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\t//current slot\r\n\t\tvar stack = weeks[ev._sweek];\r\n\t\t//check order position\r\n\t\tvar stack_line;\r\n\r\n\t\tfor (stack_line = 0; stack_line < stack.length; stack_line++)\r\n\t\t\tif (stack[stack_line]._eday <= ev._sday)\r\n\t\t\t\tbreak;\r\n\r\n\t\tif (!ev._sorder || !hold) {\r\n\t\t\tev._sorder = stack_line;\r\n\t\t}\r\n\r\n\t\tif (ev._sday + ev._length <= cols) {\r\n\t\t\tstart_date = null;\r\n\t\t\tout.push(ev);\r\n\t\t\tstack[stack_line] = ev;\r\n\t\t\t//get max height of slot\r\n\t\t\tmax[ev._sweek] = stack.length - 1;\r\n\t\t\tev._first_chunk = chunk_info.first_chunk;\r\n\t\t\tev._last_chunk = chunk_info.last_chunk;\r\n\t\t} else { // split long event in chunks\r\n\t\t\tvar copy = this._copy_event(ev);\r\n\t\t\tcopy.id = ev.id;\r\n\t\t\tcopy._length = cols - ev._sday;\r\n\t\t\tcopy._eday = cols;\r\n\t\t\tcopy._sday = ev._sday;\r\n\t\t\tcopy._sweek = ev._sweek;\r\n\t\t\tcopy._sorder = ev._sorder;\r\n\t\t\tcopy.end_date = this.date.add(sd, copy._length, \"day\");\r\n\t\t\tcopy._first_chunk = chunk_info.first_chunk;\r\n\t\t\tif (chunk_info.first_chunk) {\r\n\t\t\t\tchunk_info.first_chunk = false;\r\n\t\t\t}\r\n\r\n\t\t\tout.push(copy);\r\n\t\t\tstack[stack_line] = copy;\r\n\t\t\tstart_date = copy.end_date;\r\n\t\t\t//get max height of slot\r\n\t\t\tmax[ev._sweek] = stack.length - 1;\r\n\t\t\ti--;\r\n\t\t\tcontinue; //repeat same step\r\n\t\t}\r\n\t}\r\n\treturn out;\r\n};\r\nscheduler._copy_dummy = function() {\r\n\tvar a = new Date(this.start_date);\r\n\tvar b = new Date(this.end_date);\r\n\tthis.start_date = a;\r\n\tthis.end_date = b;\r\n};\r\nscheduler._copy_event = function(ev) {\r\n\tthis._copy_dummy.prototype = ev;\r\n\treturn new this._copy_dummy();\r\n\t//return {start_date:ev.start_date, end_date:ev.end_date, text:ev.text, id:ev.id}\r\n};\r\nscheduler._rendered = [];\r\nscheduler.clear_view = function() {\r\n\tfor (var i = 0; i < this._rendered.length; i++) {\r\n\t\tvar obj = this._rendered[i];\r\n\t\tif (obj.parentNode) obj.parentNode.removeChild(obj);\r\n\t}\r\n\tthis._rendered = [];\r\n};\r\nscheduler.updateEvent = function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tthis.clear_event(id);\r\n\r\n\tif (ev && this.is_visible_events(ev) && this.filter_event(id, ev) && (this._table_view || this.config.multi_day || ev._timed)) {\r\n\t\tif (this.config.update_render){\r\n\t\t\tthis.render_view_data();\r\n\t\t}else{\r\n\t\t\tif(this.getState().mode == \"month\" && !this.getState().drag_id && !this.isOneDayEvent(ev)){\r\n\t\t\t\tthis.render_view_data();\r\n\t\t\t}else{\r\n\t\t\t\tthis.render_view_data([ev], true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.clear_event = function(id) {\r\n\tthis.for_rendered(id, function(node, i) {\r\n\t\tif (node.parentNode)\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\tscheduler._rendered.splice(i, 1);\r\n\t});\r\n};\r\nscheduler._y_from_date = function(date){\r\n\tvar sm = date.getHours() * 60 + date.getMinutes();\r\n\treturn ((Math.round((sm * 60 * 1000 - this.config.first_hour * 60 * 60 * 1000) * this.config.hour_size_px / (60 * 60 * 1000))) % (this.config.hour_size_px * 24)); //42px/hour\r\n};\r\nscheduler._calc_event_y = function(ev, min_height){\r\n\tmin_height = min_height || 0;\r\n\tvar sm = ev.start_date.getHours() * 60 + ev.start_date.getMinutes();\r\n\tvar em = (ev.end_date.getHours() * 60 + ev.end_date.getMinutes()) || (scheduler.config.last_hour * 60);\r\n\tvar top = this._y_from_date(ev.start_date);\r\n\r\n\tvar height = Math.max(min_height, (em - sm) * this.config.hour_size_px / 60); //42px/hour\r\n\treturn {\r\n\t\ttop: top,\r\n\t\theight: height\r\n\t};\r\n};\r\nscheduler.render_event = function(ev, buffer, parentWidth) {\r\n\tvar menu = scheduler.xy.menu_width;\r\n\tvar menu_offset = (this.config.use_select_menu_space) ? 0 : menu;\r\n\tif (ev._sday < 0) return; //can occur in case of recurring event during time shift\r\n\r\n\tvar parent = scheduler.locate_holder(ev._sday);\r\n\tif (!parent) return; //attempt to render non-visible event\r\n\r\n\tbuffer = buffer || parent;\r\n\r\n\tvar pos_y = this._calc_event_y(ev, scheduler.xy.min_event_height);\r\n\tvar top = pos_y.top,\r\n\t\theight = pos_y.height;\r\n\r\n\tvar ev_count = ev._count || 1;\r\n\tvar ev_sorder = ev._sorder || 0;\r\n\r\n\tparentWidth = parentWidth || parent.clientWidth;\r\n\tif(this.config.day_column_padding){\r\n\t\tparentWidth -= this.config.day_column_padding;\r\n\t}\r\n\r\n\tvar width = Math.floor((parentWidth - menu_offset) / ev_count);\r\n\tvar left = ev_sorder * width + (ev_sorder > 0 ? 2 : 1);\r\n\tif (!ev._inner) width = width * (ev_count - ev_sorder);\r\n\tif (this.config.cascade_event_display) {\r\n\t\tvar limit = this.config.cascade_event_count;\r\n\t\tvar margin = this.config.cascade_event_margin;\r\n\t\tleft = ev_sorder % limit * margin;\r\n\t\tvar right = (ev._inner) ? (ev_count - ev_sorder - 1) % limit * margin / 2 : 0;\r\n\t\twidth = Math.floor(parentWidth - menu_offset - left - right);\r\n\t}\r\n\r\n\tif(height < 30){\r\n\t\tev._mode = \"smallest\";\r\n\t}else if(height < 42){\r\n\t\tev._mode = \"small\";\r\n\t}else{\r\n\t\tev._mode = null;\r\n\t}\r\n\r\n\tvar d = this._render_v_bar(ev, menu_offset + left, top, width, height, ev._text_style, scheduler.templates.event_header(ev.start_date, ev.end_date, ev), scheduler.templates.event_text(ev.start_date, ev.end_date, ev));\r\n\t\r\n\tif(ev._mode === \"smallest\"){\r\n\t\td.classList.add(\"dhx_cal_event--xsmall\");\r\n\t}else if (ev._mode === \"small\"){\r\n\t\td.classList.add(\"dhx_cal_event--small\");\r\n\t}\r\n\r\n\tthis._waiAria.eventAttr(ev, d);\r\n\tthis._rendered.push(d);\r\n\tbuffer.appendChild(d);\r\n\r\n\tvar parentPosition = parseInt( this.config.rtl ? parent.style.right : parent.style.left, 10);\r\n\r\n\tleft = left + parentPosition + menu_offset;\r\n\r\n\tif (this._edit_id == ev.id) {\r\n\r\n\t\td.style.zIndex = 1; //fix overlapping issue\r\n\t\twidth = Math.max(width, scheduler.xy.editor_width);\r\n\t\td = document.createElement(\"div\");\r\n\t\td.setAttribute(\"event_id\", ev.id); // for backward compatibility\r\n\t\td.setAttribute(this.config.event_attribute, ev.id);\r\n\r\n\t\tthis._waiAria.eventAttr(ev, d);\r\n\r\n\t\td.className = \"dhx_cal_event dhx_cal_editor\";\r\n\t\tif (this.config.rtl) left++;\r\n\t\tthis.set_xy(d, width, height, left, top);\r\n\r\n\r\n\t\tif(ev.color){\r\n\t\t\td.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tvar tplClass = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\r\n\t\tif(tplClass){\r\n\t\t\td.className += \" \" + tplClass;\r\n\t\t}\r\n\t\tvar d2 = document.createElement(\"div\");\r\n\t\td2.style.cssText += \"overflow:hidden;height:100%\";\r\n\r\n\t\td.appendChild(d2);\r\n\t\tthis._els[\"dhx_cal_data\"][0].appendChild(d);\r\n\t\tthis._rendered.push(d);\r\n\r\n\t\td2.innerHTML = \"\";\r\n\t\tthis._editor = d2.querySelector(\"textarea\");\r\n\t\t\r\n\t\tscheduler.event(this._editor, \"keydown\", function(e) {\r\n\t\t\tif (e.shiftKey) return true;\r\n\t\t\tvar code = e.keyCode;\r\n\t\t\tif (code == scheduler.keys.edit_save) scheduler.editStop(true);\r\n\t\t\tif (code == scheduler.keys.edit_cancel) scheduler.editStop(false);\r\n\r\n\t\t\tif(code == scheduler.keys.edit_save || code == scheduler.keys.edit_cancel){\r\n\t\t\t\tif(e.preventDefault) e.preventDefault();\r\n\t\t\t}\r\n\t\t});\r\n\t\tscheduler.event(this._editor, \"selectstart\", function (e) {\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn true;\r\n\t\t});\r\n\t\tscheduler._focus(this._editor, true);\r\n\t\t//IE and opera can add x-scroll during focusing\r\n\t\tthis._els[\"dhx_cal_data\"][0].scrollLeft = 0;\r\n\t}\r\n\tif (this.xy.menu_width !== 0 && this._select_id == ev.id) {\r\n\r\n\t\tif (this.config.cascade_event_display && this._drag_mode)\r\n\t\t\td.style.zIndex = 1; //fix overlapping issue for cascade view in case of dnd of selected event\r\n\t\tvar icons = this.config[\"icons_\" + ((this._edit_id == ev.id) ? \"edit\" : \"select\")];\r\n\t\tvar icons_str = \"\";\r\n\r\n\t\tvar ariaAttr;\r\n\r\n\t\tfor (var i = 0; i < icons.length; i++) {\r\n\t\t\tconst currentIcon = icons[i];\r\n\t\t\tariaAttr = this._waiAria.eventMenuAttrString(currentIcon);\r\n\t\t\ticons_str += `
`;\r\n\t\t}\r\n\t\tvar obj = this._render_v_bar(ev, left - menu - 1, top, menu, null, \"\", \"
\", icons_str, true);\r\n\r\n\t\tif(ev.color){\r\n\t\t\tobj.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tobj.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\t//obj.style.left = left - menu + 1;\r\n\t\tthis._els[\"dhx_cal_data\"][0].appendChild(obj);\r\n\t\tthis._rendered.push(obj);\r\n\t}\r\n\tif(this.config.drag_highlight && this._drag_id == ev.id){\r\n\t\tthis.highlightEventPosition(ev);\r\n\t}\r\n};\r\nscheduler._render_v_bar = function (ev, x, y, w, h, style, contentA, contentB, bottom) {\r\n\tvar d = document.createElement(\"div\");\r\n\tvar id = ev.id;\r\n\tvar cs = (bottom) ? \"dhx_cal_event dhx_cal_select_menu\" : \"dhx_cal_event\";\r\n\r\n\tvar state = scheduler.getState();\r\n\tif(state.drag_id == ev.id){\r\n\t\tcs += \" dhx_cal_event_drag\";\r\n\t}\r\n\r\n\tif(state.select_id == ev.id){\r\n\t\tcs += \" dhx_cal_event_selected\";\r\n\t}\r\n\r\n\tvar cse = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\tif (cse) cs = cs + \" \" + cse;\r\n\r\n\tif(this.config.cascade_event_display) {\r\n\t\tcs += \" dhx_cal_event_cascade\";\r\n\t}\r\n\r\n\tvar boxWidth = w;\r\n\r\n\tvar html = '
';\r\n\td.innerHTML = html;\r\n\r\n\tvar container = d.cloneNode(true).firstChild;\r\n\r\n\tif (!bottom && scheduler.renderEvent(container, ev, w, h, contentA, contentB)) {\r\n\t\tif(ev.color){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\treturn container;\r\n\t} else {\r\n\t\tcontainer = d.firstChild;\r\n\t\tif(ev.color){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\tvar inner_html = '
 
';\r\n\t\tinner_html += '
' + contentA + '
';\r\n\t\tinner_html += '
' + contentB + '
'; // +2 css specific, moved from render_event\r\n\r\n\t\tvar footer_class = \"dhx_event_resize dhx_footer\";\r\n\t\tif (bottom || ev._drag_resize === false)\r\n\t\t\tfooter_class = \"dhx_resize_denied \" + footer_class;\r\n\r\n\t\tinner_html += '
';\r\n\r\n\t\tcontainer.innerHTML = inner_html;\r\n\t}\r\n\r\n\treturn container;\r\n};\r\nscheduler.renderEvent = function(){\r\n\treturn false;\r\n};\r\nscheduler.locate_holder = function(day) {\r\n\tif (this._mode == \"day\") return this._els[\"dhx_cal_data\"][0].firstChild; //dirty\r\n\treturn this._els[\"dhx_cal_data\"][0].childNodes[day];\r\n};\r\nscheduler.locate_holder_day = function(date, past) {\r\n\tvar day = Math.floor((this._correct_shift(date, 1) - this._min_date) / (60 * 60 * 24 * 1000));\r\n\t//when locating end data of event , we need to use next day if time part was defined\r\n\tif (past && this.date.time_part(date)) day++;\r\n\treturn day;\r\n};\r\n\r\n\r\n\r\nscheduler._get_dnd_order = function(order, ev_height, max_height){\r\n\tif(!this._drag_event)\r\n\t\treturn order;\r\n\tif(!this._drag_event._orig_sorder)\r\n\t\tthis._drag_event._orig_sorder = order;\r\n\telse\r\n\t\torder = this._drag_event._orig_sorder;\r\n\r\n\tvar evTop = ev_height * order;\r\n\twhile((evTop + ev_height) > max_height){\r\n\t\torder--;\r\n\t\tevTop -= ev_height;\r\n\t}\r\n\torder = Math.max(order, 0);\r\n\treturn order;\r\n};\r\n//scheduler._get_event_bar_pos = function(sday, eday, week, drag){\r\nscheduler._get_event_bar_pos = function(ev){\r\n\tvar rtl = this.config.rtl;\r\n\tvar columns = this._colsS;\r\n\tvar x = columns[ev._sday];\r\n\tvar x2 = columns[ev._eday];\r\n\tif (rtl) {\r\n\t\tx = columns[columns.col_length] - columns[ev._eday] + columns[0];\r\n\t\tx2 = columns[columns.col_length] - columns[ev._sday] + columns[0];\r\n\t}\r\n\r\n\tif (x2 == x) x2 = columns[ev._eday + 1];\r\n\tvar hb = this.xy.bar_height;\r\n\r\n\tvar order = ev._sorder;\r\n\tif(ev.id == this._drag_id){\r\n\t\tvar cellHeight = columns.heights[ev._sweek + 1] - columns.heights[ev._sweek]- this.xy.month_head_height;//22 for month head height\r\n\t\torder = scheduler._get_dnd_order(order, hb, cellHeight);\r\n\t}\r\n\tvar y_event_offset = order * hb;\r\n\tvar y = columns.heights[ev._sweek] + (columns.height ? (this.xy.month_scale_height + 2) : 2 ) + y_event_offset;\r\n\treturn {x:x, x2:x2, y:y};\r\n};\r\n\r\nscheduler.render_event_bar = function (ev) {\r\n\tvar parent = this._rendered_location;\r\n\tvar pos = this._get_event_bar_pos(ev);\r\n\tvar y = pos.y;\r\n\tvar x = pos.x;\r\n\tvar x2 = pos.x2;\r\n\t// resize for month mutliday events\r\n\tvar resize_handle = \"\";\r\n\r\n\t//events in ignored dates\r\n\r\n\tif (!x2) return;\r\n\r\n\tvar resizable = scheduler.config.resize_month_events && this._mode == \"month\" &&\r\n\t\t(!ev._timed || scheduler.config.resize_month_timed);\r\n\r\n\tvar d = document.createElement(\"div\");\r\n\tvar left_chunk = (ev.hasOwnProperty(\"_first_chunk\") && ev._first_chunk),\r\n\t\tright_chunk = (ev.hasOwnProperty(\"_last_chunk\") && ev._last_chunk);\r\n\r\n\tvar resize_left = resizable && (ev._timed || left_chunk);\r\n\tvar resize_right = resizable && (ev._timed || right_chunk);\r\n\r\n\tvar timed = true;\r\n\tvar cs = \"dhx_cal_event_clear\";\r\n\tif (!ev._timed || resizable) {\r\n\t\ttimed = false;\r\n\t\tcs = \"dhx_cal_event_line\";\r\n\t}\r\n\tif(left_chunk){\r\n\t\tcs += \" dhx_cal_event_line_start\";\r\n\t}\r\n\tif(right_chunk){\r\n\t\tcs += \" dhx_cal_event_line_end\";\r\n\t}\r\n\tif(resize_left){\r\n\t\tresize_handle += \"
\";\r\n\t}\r\n\tif(resize_right){\r\n\t\tresize_handle += \"
\";\r\n\t}\r\n\r\n\tvar cse = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\tif (cse){\r\n\t\tcs += \" \" + cse;\r\n\t}\r\n\r\n\tvar bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\tvar color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\tvar style_text = [\r\n\t\t\"position:absolute\",\r\n\t\t\"top:\" + y + \"px\",\r\n\t\t\"left:\" + x + \"px\",\r\n\t\t\"width:\" + (x2 - x - (timed ? 1 : 0)) + \"px\",\r\n\t\t\"height:\" + (this.xy.bar_height - 2) + \"px\",\r\n\t\tcolor,\r\n\t\tbg_color,\r\n\t\t(ev._text_style || \"\")\r\n\t].join(\";\");\r\n\r\n\tvar html = \"
\";\r\n\tif (resizable) {\r\n\t\thtml += resize_handle;\r\n\t}\r\n\tif(scheduler.getState().mode == \"month\"){\r\n\t\tev = scheduler.getEvent(ev.id); // ev at this point could be a part (row in a month view) of a larger event\r\n\t}\r\n\r\n\tif (ev._timed){\r\n\t\thtml += `${scheduler.templates.event_bar_date(ev.start_date, ev.end_date, ev)}`;\r\n\t}\r\n\r\n\thtml += \"
\";\r\n\thtml += scheduler.templates.event_bar_text(ev.start_date, ev.end_date, ev) + '
';\r\n\thtml += \"
\";\r\n\thtml += '
';\r\n\r\n\td.innerHTML = html;\r\n\r\n\tthis._rendered.push(d.firstChild);\r\n\tparent.appendChild(d.firstChild);\r\n};\r\n\r\nscheduler._locate_event = function(node) {\r\n\tvar id = null;\r\n\twhile (node && !id && node.getAttribute) {\r\n\t\tid = node.getAttribute(this.config.event_attribute);\r\n\t\tnode = node.parentNode;\r\n\t}\r\n\treturn id;\r\n};\r\n\r\nscheduler.edit = function(id) {\r\n\tif (this._edit_id == id) return;\r\n\tthis.editStop(false, id);\r\n\tthis._edit_id = id;\r\n\tthis.updateEvent(id);\r\n};\r\nscheduler.editStop = function(mode, id) {\r\n\tif (id && this._edit_id == id) return;\r\n\tvar ev = this.getEvent(this._edit_id);\r\n\tif (ev) {\r\n\t\tif (mode) ev.text = this._editor.value;\r\n\t\tthis._edit_id = null;\r\n\t\tthis._editor = null;\r\n\t\tthis.updateEvent(ev.id);\r\n\t\tthis._edit_stop_event(ev, mode);\r\n\t}\r\n};\r\nscheduler._edit_stop_event = function(ev, mode) {\r\n\tif (this._new_event) {\r\n\t\tif (!mode) {\r\n\t\t\tif (ev) // in case of custom lightbox user can already delete event\r\n\t\t\t\tthis.deleteEvent(ev.id, true);\r\n\t\t} else {\r\n\t\t\tthis.callEvent(\"onEventAdded\", [ev.id, ev]);\r\n\t\t}\r\n\t\tthis._new_event = null;\r\n\t} else {\r\n\t\tif (mode){\r\n\t\t\tthis.callEvent(\"onEventChanged\", [ev.id, ev]);\r\n\t\t}\r\n\t}\r\n};\r\n\r\nscheduler.getEvents = function(from, to) {\r\n\tvar result = [];\r\n\tfor (var a in this._events) {\r\n\t\tvar ev = this._events[a];\r\n\t\tif (ev && ( (!from && !to) || (ev.start_date < to && ev.end_date > from) ))\r\n\t\t\tresult.push(ev);\r\n\t}\r\n\treturn result;\r\n};\r\nscheduler.getRenderedEvent = function(id) {\r\n\tif (!id)\r\n\t\treturn;\r\n\tvar rendered_events = scheduler._rendered;\r\n\tfor (var i=0; i -1){\r\n\t\t\t\t\tsection = section.split(scheduler.config.section_delimiter)[0];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar top = timeline.getSectionTop(section);\r\n\t\t\tvar left = timeline.posFromDate(event.start_date);\r\n\t\t\tvar container = scheduler.$container.querySelector(\".dhx_timeline_data_wrapper\");\r\n\t\t\tleft = left - (container.offsetWidth - timeline.dx) / 2;\r\n\t\t\ttop = top - container.offsetHeight / 2 + timeline.dy/2;\r\n\r\n\t\t\tif (timeline._smartRenderingEnabled()) {\r\n\t\t\t\tvar handlerId = timeline.attachEvent(\"onScroll\", function(){\r\n\t\t\t\t\trestoreOriginalColors();\r\n\t\t\t\t\ttimeline.detachEvent(handlerId);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\ttimeline.scrollTo({\r\n\t\t\t\tleft: left,\r\n\t\t\t\ttop: top\r\n\t\t\t});\r\n\t\t\tif (!timeline._smartRenderingEnabled()) {\r\n\t\t\t\trestoreOriginalColors();\r\n\t\t\t}\r\n\t\t}\r\n\t}else{\r\n\t\trestoreOriginalColors();\r\n\t}\r\n\r\n\tscheduler.callEvent(\"onAfterEventDisplay\", [ev, mode]);\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._append_drag_marker = function(m){\r\n\tif(m.parentNode) return;\r\n\tvar zone = scheduler._els[\"dhx_cal_data\"][0];\r\n\r\n\tvar scale = zone.lastChild;\r\n\tvar className = scheduler._getClassName(scale);\r\n\tif(className.indexOf(\"dhx_scale_holder\") < 0 && scale.previousSibling){\r\n\t\tscale = scale.previousSibling;\r\n\t}\r\n\r\n\tclassName = scheduler._getClassName(scale);\r\n\tif (scale && className.indexOf(\"dhx_scale_holder\") === 0) {\r\n\t\tscale.appendChild(m);\r\n\t}\r\n};\r\n\r\nscheduler._update_marker_position = function(m, event){\r\n\tvar size = scheduler._calc_event_y(event, 0);\r\n\tm.style.top = size.top + \"px\";\r\n\tm.style.height = size.height + \"px\";\r\n};\r\n\r\nscheduler.highlightEventPosition = function(event){\r\n\tvar m = document.createElement(\"div\");\r\n\r\n\tm.setAttribute(\"event_id\", event.id); // for backward compatibility\r\n\tm.setAttribute(this.config.event_attribute, event.id);\r\n\tthis._rendered.push(m);\r\n\tthis._update_marker_position(m, event);\r\n\r\n\tvar css = this.templates.drag_marker_class(event.start_date, event.end_date, event);\r\n\tvar html = this.templates.drag_marker_content(event.start_date, event.end_date, event);\r\n\tm.className = \"dhx_drag_marker\";\r\n\tif(css)\r\n\t\tm.className += \" \" + css;\r\n\tif(html)\r\n\t\tm.innerHTML = html;\r\n\tthis._append_drag_marker(m);\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler._lightbox_controls = {};\r\nscheduler.formSection = function(name){\r\n\tvar config = this.config.lightbox.sections;\r\n\tvar i = 0;\r\n\tfor (i; i < config.length; i++) {\r\n\t\tif (config[i].name == name) {\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tif (i === config.length) {\r\n\t\t// GS-1662 section not found, should exit here instead of throwing an error\r\n\t\treturn null;\r\n\t}\r\n\r\n\tvar section = config[i];\r\n\tif (!scheduler._lightbox) {\r\n\t\tscheduler.getLightbox();\r\n\t}\r\n\tvar header = scheduler._lightbox.querySelector(`#${section.id}`);\r\n\tvar node = header.nextSibling;\r\n\r\n\tvar result = {\r\n\t\tsection: section,\r\n\t\theader: header,\r\n\t\tnode: node,\r\n\t\tgetValue:function(ev){\r\n\t\t\treturn scheduler.form_blocks[section.type].get_value(node, (ev||{}), section);\r\n\t\t},\r\n\t\tsetValue:function(value, ev){\r\n\t\t\treturn scheduler.form_blocks[section.type].set_value(node, value, (ev||{}), section);\r\n\t\t}\r\n\t};\r\n\r\n\tvar handler = scheduler._lightbox_controls[\"get_\"+section.type+\"_control\"];\r\n\treturn handler?handler(result):result;\r\n};\r\nscheduler._lightbox_controls.get_template_control = function(result) {\r\n\tresult.control = result.node;\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_select_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('select')[0];\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_textarea_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('textarea')[0];\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_time_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('select'); // array\r\n\treturn result;\r\n};\r\n\r\nscheduler._lightbox_controls.defaults = {\r\n\ttemplate: {\r\n\t\theight:30\r\n\t},\r\n\ttextarea: {\r\n\t\theight: 200\r\n\t},\r\n\tselect: {\r\n\t\theight: 23\r\n\t},\r\n\ttime: {\r\n\t\theight: 20\r\n\t}\r\n};\r\n\r\n\r\nscheduler.form_blocks={\r\n\ttemplate:{\r\n\t\trender: function(sns){\r\n\t\t\treturn \"
\";\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,config){\r\n\t\t\tnode.innerHTML = value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev,config){\r\n\t\t\treturn node.innerHTML||\"\";\r\n\t\t},\r\n\t\tfocus: function(node){\r\n\t\t}\r\n\t},\r\n\ttextarea:{\r\n\t\trender:function(sns){\r\n\t\t\treturn \"
\";\r\n\t\t},\r\n\t\tset_value:function(node,value,ev){\r\n\t\t\tscheduler.form_blocks.textarea._get_input(node).value=value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev){\r\n\t\t\treturn scheduler.form_blocks.textarea._get_input(node).value;\r\n\t\t},\r\n\t\tfocus:function(node){\r\n\t\t\tvar a = scheduler.form_blocks.textarea._get_input(node);\r\n\t\t\tscheduler._focus(a, true);\r\n\t\t},\r\n\t\t_get_input: function(node){\r\n\t\t\treturn node.getElementsByTagName(\"textarea\")[0];\r\n\t\t}\r\n\t},\r\n\tselect:{\r\n\t\trender:function(sns){\r\n\t\t\t//var defaults = scheduler._lightbox_controls.defaults.select;\r\n\t\t\tvar html=\"
\";\r\n\t\t\treturn html;\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,sns){\r\n\t\t\tvar select = node.firstChild;\r\n\t\t\tif (!select._dhx_onchange && sns.onchange) {\r\n\t\t\t\tscheduler.event(select, \"change\", sns.onchange);\r\n\t\t\t\tselect._dhx_onchange = true;\r\n\t\t\t}\r\n\t\t\tif (typeof value == \"undefined\")\r\n\t\t\t\tvalue = (select.options[0]||{}).value;\r\n\t\t\tselect.value=value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev){\r\n\t\t\treturn node.firstChild.value;\r\n\t\t},\r\n\t\tfocus:function(node){\r\n\t\t\tvar a=node.firstChild; scheduler._focus(a, true);\r\n\t\t}\r\n\t},\r\n\ttime:{\r\n\t\trender:function(sns) {\r\n\t\t\tif (!sns.time_format) {\r\n\t\t\t\t// default order\r\n\t\t\t\tsns.time_format = [\"%H:%i\", \"%d\", \"%m\", \"%Y\"];\r\n\t\t\t}\r\n\t\t\t// map: default order => real one\r\n\t\t\tsns._time_format_order = {};\r\n\t\t\tvar time_format = sns.time_format;\r\n\r\n\t\t\tvar cfg = scheduler.config;\r\n\t\t\tvar dt = scheduler.date.date_part(scheduler._currentDate());\r\n\t\t\tvar last = 24*60, first = 0;\r\n\t\t\tif(scheduler.config.limit_time_select){\r\n\t\t\t\tlast = 60*cfg.last_hour+1;\r\n\t\t\t\tfirst = 60*cfg.first_hour;\r\n\t\t\t\tdt.setHours(cfg.first_hour);\r\n\t\t\t}\r\n\t\t\tvar html = \"\";\r\n\r\n\t\t\tfor (var p = 0; p < time_format.length; p++) {\r\n\t\t\t\tvar time_option = time_format[p];\r\n\r\n\t\t\t\t// adding spaces between selects\r\n\t\t\t\tif (p > 0) {\r\n\t\t\t\t\thtml += \" \";\r\n\t\t\t\t}\r\n\t\t\t\tvar selectBoxClass = \"\";\r\n\t\t\t\tvar options = \"\";\r\n\t\t\t\tswitch (time_option) {\r\n\t\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_year_select\";\r\n\t\t\t\t\t\tsns._time_format_order[3] = p;\r\n\t\t\t\t\t\t//year\r\n\t\t\t\t\t\tvar range;\r\n\t\t\t\t\t\tvar start_year;\r\n\t\t\t\t\t\tvar end_year;\r\n\t\t\t\t\t\tif(sns.year_range){\r\n\t\t\t\t\t\t\tif (!isNaN(sns.year_range)) {\r\n\t\t\t\t\t\t\t\trange = sns.year_range;\r\n\t\t\t\t\t\t\t} else if (sns.year_range.push) {\r\n\t\t\t\t\t\t\t\t// if\r\n\t\t\t\t\t\t\t\tstart_year = sns.year_range[0];\r\n\t\t\t\t\t\t\t\tend_year = sns.year_range[1];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\trange = range || 10;\r\n\t\t\t\t\t\tvar offset = offset || Math.floor(range / 2);\r\n\t\t\t\t\t\tstart_year = start_year || dt.getFullYear() - offset;\r\n\t\t\t\t\t\tend_year = end_year || start_year + range;\r\n\r\n\t\t\t\t\t\tfor (var i = start_year; i < end_year; i++)\r\n\t\t\t\t\t\t\toptions += \"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%m\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_month_select\";\r\n\t\t\t\t\t\tsns._time_format_order[2] = p;\r\n\t\t\t\t\t\t//month\r\n\t\t\t\t\t\tfor (var i=0; i < 12; i++)\r\n\t\t\t\t\t\t\toptions+=\"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%d\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_day_select\";\r\n\t\t\t\t\t\tsns._time_format_order[1] = p;\r\n\t\t\t\t\t\t//days\r\n\t\t\t\t\t\tfor (var i=1; i < 32; i++)\r\n\t\t\t\t\t\t\toptions+=\"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%H:%i\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_time_select\";\r\n\t\t\t\t\t\tsns._time_format_order[0] = p;\r\n\t\t\t\t\t\t//hours\r\n\t\t\t\t\t\tvar i = first;\r\n\t\t\t\t\t\tvar tdate = dt.getDate();\r\n\t\t\t\t\t\tsns._time_values = [];\r\n\r\n\t\t\t\t\t\twhile(i\"+time+\"\";\r\n\t\t\t\t\t\t\tsns._time_values.push(i);\r\n\t\t\t\t\t\t\tdt.setTime(dt.valueOf()+this.config.time_step*60*1000);\r\n\t\t\t\t\t\t\tvar diff = (dt.getDate()!=tdate)?1:0; // moved or not to the next day\r\n\t\t\t\t\t\t\ti=diff*24*60+dt.getHours()*60+dt.getMinutes();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(options){\r\n\r\n\t\t\t\t\tvar ariaAttrs = scheduler._waiAria.lightboxSelectAttrString(time_option);\r\n\t\t\t\t\tvar readonly = sns.readonly ? \"disabled='disabled'\" : \"\";\r\n\t\t\t\t\thtml += \" \";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//var defaults = scheduler._lightbox_controls.defaults.select;\r\n\r\n\t\t\treturn \"
\"+html+\"  –  \"+html+\"
\";\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,config){\r\n\t\t\tvar cfg = scheduler.config;\r\n\t\t\tvar s=node.getElementsByTagName(\"select\");\r\n\t\t\tvar map = config._time_format_order;\r\n\t\t\tvar start_date, end_date;\r\n\r\n\t\t\tif(cfg.full_day) {\r\n\t\t\t\tif (!node._full_day){\r\n\t\t\t\t\tvar html = \"\";\r\n\t\t\t\t\tif (!scheduler.config.wide_form)\r\n\t\t\t\t\t\thtml = node.previousSibling.innerHTML+html;\r\n\t\t\t\t\tnode.previousSibling.innerHTML=html;\r\n\t\t\t\t\tnode._full_day=true;\r\n\t\t\t\t}\r\n\t\t\t\tvar input=node.previousSibling.getElementsByTagName(\"input\")[0];\r\n\t\t\t\tinput.checked = (scheduler.date.time_part(ev.start_date)===0 && scheduler.date.time_part(ev.end_date)===0);\r\n\r\n\t\t\t\ts[map[0]].disabled=input.checked;\r\n\t\t\t\ts[ map[0] + s.length/2 ].disabled=input.checked;\r\n\r\n\t\t\t\tif(!input.$_eventAttached){\r\n\t\t\t\t\tinput.$_eventAttached = true;\r\n\r\n\t\t\t\t\t\tscheduler.event(input, \"click\", function(){\r\n\t\t\t\t\t\tif(input.checked) {\r\n\t\t\t\t\t\t\tvar obj = {};\r\n\t\t\t\t\t\t\tscheduler.form_blocks.time.get_value(node,obj,config);\r\n\r\n\t\t\t\t\t\t\tstart_date = scheduler.date.date_part(obj.start_date);\r\n\t\t\t\t\t\t\tend_date = scheduler.date.date_part(obj.end_date);\r\n\r\n\t\t\t\t\t\t\tif (+end_date == +start_date || (+end_date >= +start_date && (ev.end_date.getHours() !== 0 || ev.end_date.getMinutes() !== 0)))\r\n\t\t\t\t\t\t\t\tend_date = scheduler.date.add(end_date, 1, \"day\");\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tstart_date = null;\r\n\t\t\t\t\t\t\tend_date = null;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\ts[map[0]].disabled=input.checked;\r\n\t\t\t\t\t\ts[ map[0] + s.length/2 ].disabled=input.checked;\r\n\r\n\t\t\t\t\t\t_fill_lightbox_select(s,0,start_date||ev.start_date);\r\n\t\t\t\t\t\t_fill_lightbox_select(s,4,end_date||ev.end_date);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(cfg.auto_end_date && cfg.event_duration) {\r\n\t\t\t\tvar _update_lightbox_select = function () {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (!(cfg.auto_end_date && cfg.event_duration)){\r\n\t\t\t\t\t\t// setting may be disabled after the handler is attached\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstart_date = new Date(s[map[3]].value,s[map[2]].value,s[map[1]].value,0,s[map[0]].value);\r\n\t\t\t\t\tend_date = new Date(start_date.getTime() + (scheduler.config.event_duration * 60 * 1000));\r\n\t\t\t\t\t_fill_lightbox_select(s, 4, end_date);\r\n\t\t\t\t};\r\n\t\t\t\tfor(var i=0; i<4; i++) {\r\n\t\t\t\t\tif(!s[i].$_eventAttached) {\r\n\t\t\t\t\t\ts[i].$_eventAttached = true;\r\n\t\t\t\t\t\tscheduler.event(s[i], \"change\", _update_lightbox_select);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfunction _fill_lightbox_select(s,i,d) {\r\n\t\t\t\tvar time_values = config._time_values;\r\n\t\t\t\tvar direct_value = d.getHours()*60+d.getMinutes();\r\n\t\t\t\tvar fixed_value = direct_value;\r\n\t\t\t\tvar value_found = false;\r\n\t\t\t\tfor (var k=0; k\";\r\n\t\tvar ariaAttr = \"\";\r\n\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\tariaAttr = this._waiAria.lightboxButtonAttrString(buttons[i]);\r\n\t\t\thtml += \"
\" + scheduler.locale.labels[buttons[i]] + \"
\";\r\n\t\t}\r\n\r\n\t\tbuttons = this.config.buttons_right;\r\n\t\tvar rtl = scheduler.config.rtl;\r\n\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\tariaAttr = this._waiAria.lightboxButtonAttrString(buttons[i]);\r\n\r\n\t\t\thtml += \"
\";\r\n\r\n\t\t\thtml += \"
\" + scheduler.locale.labels[buttons[i]] + \"
\";\r\n\t\t}\r\n\t\thtml += \"
\";\r\n\t\thtml+=\"
\";\r\n\t\td.innerHTML=html;\r\n\t\tif (scheduler.config.drag_lightbox){\r\n\t\t\tscheduler.event(d.firstChild, \"mousedown\", scheduler._ready_to_dnd);\r\n\t\t\tscheduler.event(d.firstChild, \"selectstart\", function(e){ \r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn false; \r\n\t\t\t});\r\n\t\t\td.firstChild.style.cursor = \"move\";\r\n\t\t\tscheduler._init_dnd_events();\r\n\r\n\t\t}\r\n\r\n\t\tthis._waiAria.lightboxAttr(d);\r\n\r\n\t\tthis.show_cover();\r\n\t\tthis._cover.insertBefore(d,this._cover.firstChild);\r\n\t\t\r\n\t\tthis._lightbox=d;\r\n\r\n\t\tvar sns=this.config.lightbox.sections;\r\n\t\thtml=\"\";\r\n\t\tfor (var i=0; i < sns.length; i++) {\r\n\t\t\tvar block=this.form_blocks[sns[i].type];\r\n\t\t\tif (!block) continue; //ignore incorrect blocks\r\n\t\t\tsns[i].id=\"area_\"+this.uid();\r\n\t\t\tvar button = \"\";\r\n\t\t\tif (sns[i].button){\r\n\t\t\t\tvar ariaAttr = scheduler._waiAria.lightboxSectionButtonAttrString(this.locale.labels[\"button_\"+sns[i].button]);\r\n\t\t\t\tbutton = \"
\"+this.locale.labels[\"button_\"+sns[i].button]+\"
\";\r\n\t\t\t}\r\n\r\n\t\t\tif (this.config.wide_form){\r\n\t\t\t\thtml+=\"
\";\r\n\t\t\t}\r\n\r\n\t\t\tvar label_name = this.locale.labels[\"section_\"+sns[i].name];\r\n\t\t\tif(typeof label_name !== \"string\"){\r\n\t\t\t\tlabel_name = sns[i].name;\r\n\t\t\t}\r\n\t\t\thtml+=\"
\"+button+ \"
\"+block.render.call(this,sns[i]);\r\n\t\t\thtml+=\"
\";\r\n\t\t}\r\n\r\n\t\tvar ds=d.getElementsByTagName(\"div\");\r\n\t\tfor (var i=0; i
 \r\n
\r\n
\r\n\r\n
`;\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler.getRootView = function() {\r\n\treturn {\r\n\t\tview: {\r\n\t\t\trender: function(){\r\n\t\t\t\treturn {\r\n\t\t\t\t\ttag: \"div\",\r\n\t\t\t\t\ttype: 1,\r\n\t\t\t\t\tattrs: {\r\n\t\t\t\t\t\tstyle: \"width:100%;height:100%;\"\r\n\t\t\t\t\t},\r\n\t\t\t\t\thooks: {\r\n\t\t\t\t\t\t\"didInsert\": function(){\r\n\t\t\t\t\t\t\tscheduler.setCurrentView();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tbody: [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tel: this.el,\r\n\t\t\t\t\t\t\ttype: 1\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t};\r\n\t\t\t},\r\n\t\t\tinit: function(){\r\n\t\t\t\tvar container = document.createElement(\"DIV\");\r\n\t\t\t\tcontainer.id = \"scheduler_\"+ scheduler.uid();\r\n\t\t\t\tcontainer.style.width = \"100%\";\r\n\t\t\t\tcontainer.style.height = \"100%\";\r\n\t\t\t\tcontainer.classList.add(\"dhx_cal_container\");\r\n\t\t\t\tcontainer.cmp = \"grid\";\r\n\t\t\t\tcontainer.innerHTML = '
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
';\r\n\t\t\t\tscheduler.init(container);\r\n\r\n\t\t\t\tthis.el = container;\r\n\t\t\t}\r\n\t\t},\r\n\t\ttype: 4\r\n\t};\r\n};\r\n\r\n}","import global from \"../global\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\n(function(){\r\n\r\n\tvar setCurrentView = scheduler.setCurrentView,\r\n\t\tupdateView = scheduler.updateView;\r\n\tvar update_view_timer = null,\r\n\t\tcurr_view_timer = null;\r\n\r\n\tvar lazy_setCurrentView = function(date, mode){\r\n\t\tvar self = this;\r\n\t\tglobal.clearTimeout(curr_view_timer);\r\n\t\tglobal.clearTimeout(update_view_timer);\r\n\r\n\t\tvar oldDate = self._date,\r\n\t\t\toldMode = self._mode;\r\n\t\tupdateFlags(this, date, mode);\r\n\r\n\t\tcurr_view_timer = setTimeout(function(){\r\n\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif (!self.callEvent(\"onBeforeViewChange\", [oldMode, oldDate, mode || self._mode, date || self._date])){\r\n\t\t\t\tupdateFlags(self, oldDate, oldMode);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tupdateView.call(self, date, mode);\r\n\t\t\tself.callEvent(\"onViewChange\", [self._mode, self._date]);\r\n\r\n\t\t\tglobal.clearTimeout(update_view_timer);\r\n\t\t\tcurr_view_timer = 0;\r\n\t\t}, scheduler.config.delay_render);\r\n\t};\r\n\tvar lazy_updateView = function(date, mode){\r\n\t\tvar self = this,\r\n\t\t\tars = arguments;\r\n\r\n\t\tupdateFlags(this, date, mode);\r\n\r\n\t\tglobal.clearTimeout(update_view_timer);\r\n\t\tupdate_view_timer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif(curr_view_timer)\r\n\t\t\t\treturn;\r\n\r\n\t\t\tupdateView.apply(self, ars);\r\n\t\t}, scheduler.config.delay_render);\r\n\t};\r\n\tfunction updateFlags(scheduler, date, mode){\r\n\t\tif(date)\r\n\t\t\tscheduler._date = date;\r\n\t\tif(mode)\r\n\t\t\tscheduler._mode = mode;\r\n\r\n\t}\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\tif(scheduler.config.delay_render){\r\n\t\t\tscheduler.setCurrentView = lazy_setCurrentView;\r\n\t\t\tscheduler.updateView = lazy_updateView;\r\n\t\t}else{\r\n\t\t\tscheduler.setCurrentView = setCurrentView;\r\n\t\t\tscheduler.updateView = updateView;\r\n\t\t}\r\n\t});\r\n\r\n})();\r\n\r\n}","import global from \"../global\";\r\n\r\nexport default function extend(scheduler) {\r\n/*\r\nif (global.dataProcessor && !dataProcessor.prototype.init_original){\r\n\tdataProcessor.prototype.init_original=dataProcessor.prototype.init;\r\n\tdataProcessor.prototype.init=function(obj){\r\n\t\tthis.init_original(obj);\r\n\t\tobj._dataprocessor=this;\r\n\r\n\t\tthis.setTransactionMode(\"POST\",true);\r\n\t\tthis.serverProcessor+=(this.serverProcessor.indexOf(\"?\")!=-1?\"&\":\"?\")+\"editing=true\";\r\n\t};\r\n}*/\r\n\r\nscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\tif(typeof dhtmlxError !== \"undefined\") {\r\n\t\twindow.dhtmlxError.catchError(\"LoadXML\", function(a, b, c){\r\n\t\t\tvar message = c[0].responseText;\r\n\r\n\t\t\tswitch (scheduler.config.ajax_error){\r\n\t\t\t\tcase \"alert\":\r\n\t\t\t\t\tglobal.alert(message);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"console\":\r\n\t\t\t\t\tglobal.console.log(message);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n});\r\n\r\n\r\n}","import ar from \"./locale_ar\";\r\nimport be from \"./locale_be\";\r\nimport ca from \"./locale_ca\";\r\nimport cn from \"./locale_cn\";\r\nimport cs from \"./locale_cs\";\r\nimport da from \"./locale_da\";\r\nimport de from \"./locale_de\";\r\nimport el from \"./locale_el\";\r\nimport en from \"./locale_en\";\r\nimport es from \"./locale_es\";\r\nimport fi from \"./locale_fi\";\r\nimport fr from \"./locale_fr\";\r\nimport he from \"./locale_he\";\r\nimport hu from \"./locale_hu\";\r\nimport id from \"./locale_id\";\r\nimport it from \"./locale_it\";\r\nimport jp from \"./locale_jp\";\r\n\r\nimport LocaleManager from \"./locale_manager\";\r\n\r\nimport nb from \"./locale_nb\";\r\nimport nl from \"./locale_nl\";\r\nimport no from \"./locale_no\";\r\nimport pl from \"./locale_pl\";\r\nimport pt from \"./locale_pt\";\r\nimport ro from \"./locale_ro\";\r\nimport ru from \"./locale_ru\";\r\nimport si from \"./locale_si\";\r\nimport sk from \"./locale_sk\";\r\nimport sv from \"./locale_sv\";\r\nimport tr from \"./locale_tr\";\r\nimport ua from \"./locale_ua\";\r\n\r\nexport default function(){\r\n\treturn new LocaleManager({\r\n\t\ten,\r\n\t\tar,\r\n\t\tbe,\r\n\t\tca,\r\n\t\tcn,\r\n\t\tcs,\r\n\t\tda,\r\n\t\tde,\r\n\t\tel,\r\n\t\tes,\r\n\t\tfi,\r\n\t\tfr,\r\n\t\the,\r\n\t\thu,\r\n\t\tid,\r\n\t\tit,\r\n\t\tjp,\r\n\t\tnb,\r\n\t\tnl,\r\n\t\tno,\r\n\t\tpl,\r\n\t\tpt,\r\n\t\tro,\r\n\t\tru,\r\n\t\tsi,\r\n\t\tsk,\r\n\t\tsv,\r\n\t\ttr,\r\n\t\tua\r\n\t});\r\n}","export default class ExtensionsManager{\r\n\tconstructor(config){\r\n\t\tthis._extensions = {};\r\n\t\tfor(const i in config){\r\n\t\t\tthis._extensions[i] = config[i];\r\n\t\t}\r\n\t}\r\n\r\n\taddExtension(name, ext) {\r\n\t\tthis._extensions[name] = ext;\r\n\t}\r\n\r\n\tgetExtension(name) {\r\n\t\treturn this._extensions[name];\r\n\t}\r\n}","\r\nexport default function(){\r\n/* global dhtmlx */\r\nif (typeof dhtmlx != \"undefined\" && dhtmlx.attaches) {\r\n\tdhtmlx.attaches.attachScheduler = function (day, mode, tabs, scheduler) {\r\n\t\tvar tabs = tabs || '
';\r\n\t\tvar obj = document.createElement(\"DIV\");\r\n\t\tobj.id = \"dhxSchedObj_\" + this._genStr(12);\r\n\t\tobj.innerHTML = '
' + tabs + '
';\r\n\t\tdocument.body.appendChild(obj.firstChild);\r\n\r\n\t\tthis.attachObject(obj.id, false, true);\r\n\r\n\t\tthis.vs[this.av].sched = scheduler;\r\n\t\tthis.vs[this.av].schedId = obj.id;\r\n\t\tscheduler.setSizes = scheduler.updateView;\r\n\t\tscheduler.destructor = function () { };\r\n\t\tscheduler.init(obj.id, day, mode);\r\n\r\n\t\treturn this.vs[this._viewRestore()].sched;\r\n\t};\r\n}\r\n\r\n}","export default {\r\n\talert: (extension, assert) => {\r\n\t\tassert(false, `The ${extension} extension is not included in this version of dhtmlxScheduler.
\r\n\t\tYou may need a Professional version of the component.
\r\n\t\tContact us at https://dhtmlx.com/docs/contact.shtml if you have any questions.`);\r\n\t}\r\n};","export default function(scheduler){\r\n\r\n\r\n\r\n(function(){\r\n\tvar modalsStack = [];\r\n\r\n\tfunction isModal(){\r\n\t\treturn !!(modalsStack.length);\r\n\t}\r\n\r\n\tfunction isChildOf(child, parent){\r\n\t\twhile(child && child != parent){\r\n\t\t\tchild = child.parentNode;\r\n\t\t}\r\n\r\n\t\treturn !!(child == parent);\r\n\t}\r\n\r\n\tfunction afterPopup(box){\r\n\t\tsetTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tif(!isModal() && !(isChildOf(document.activeElement, scheduler.$container))) {\r\n\t\t\t\tscheduler.focus();\r\n\t\t\t}\r\n\t\t}, 1);\r\n\t}\r\n\tfunction startModal(box){\r\n\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\tscheduler.event(box, \"keydown\", trapFocus);\r\n\t\tmodalsStack.push(box);\r\n\t\t//scheduler.$keyboardNavigation.dispatcher.disable();\r\n\t}\r\n\r\n\tfunction endModal(){\r\n\t\tvar box = modalsStack.pop();\r\n\t\tif(box) {\r\n\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t}\r\n\t\tafterPopup(box);\r\n\r\n\t}\r\n\r\n\tfunction isTopModal(box){\r\n\t//\tif(dhtmlx._modalsStack.length){\r\n\t//\t\treturn box == dhtmlx._modalsStack[dhtmlx._modalsStack.length - 1];\r\n\t//\t}else{\r\n\t\t\treturn box == modalsStack[modalsStack.length - 1];\r\n\t//\t}\r\n\r\n\t}\r\n\r\n\tfunction trapFocus(event){\r\n\t\tvar event = event || window.event;\r\n\t\tvar target = event.currentTarget;\r\n\t\tif(!isTopModal(target)) return;\r\n\r\n\t\tscheduler.$keyboardNavigation.trapFocus(target, event);\r\n\t}\r\n\r\n\tfunction traceLightbox(){\r\n\t\tstartModal(scheduler.getLightbox());\r\n\t}\r\n\r\n\tscheduler.attachEvent(\"onLightbox\", traceLightbox);\r\n\tscheduler.attachEvent(\"onAfterLightbox\", endModal);\r\n\r\n\tscheduler.attachEvent(\"onAfterQuickInfo\", function(){afterPopup();});\r\n\r\n\tif(!scheduler._keyNavMessagePopup) {\r\n\t\tscheduler._keyNavMessagePopup = true;\r\n\r\n\t\tvar focusElement = null;\r\n\t\tvar backupFocus = null;\r\n\t\tconst modalsStack = [];\r\n\t\tscheduler.attachEvent(\"onMessagePopup\", function(box){\r\n\t\t\tfocusElement = document.activeElement;\r\n\t\t\tbackupFocus = focusElement;\r\n\r\n\t\t\twhile(backupFocus && scheduler._getClassName(backupFocus).indexOf(\"dhx_cal_data\") < 0){\r\n\t\t\t\tbackupFocus = backupFocus.parentNode;\r\n\t\t\t}\r\n\t\t\tif(backupFocus){\r\n\t\t\t\tbackupFocus = backupFocus.parentNode;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t\tscheduler.event(box, \"keydown\", trapFocus);\r\n\t\t\tmodalsStack.push(box);\r\n\t\t});\r\n\r\n\r\n\t\tscheduler.attachEvent(\"onAfterMessagePopup\", function () {\r\n\t\t\tvar box = modalsStack.pop();\r\n\t\t\tif(box) {\r\n\t\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t\t}\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\tvar currentTarget = document.activeElement;\r\n\t\t\t\twhile(currentTarget && scheduler._getClassName(currentTarget).indexOf(\"dhx_cal_light\") < 0){\r\n\t\t\t\t\tcurrentTarget = currentTarget.parentNode;\r\n\t\t\t\t}\r\n\t\t\t\tif(currentTarget)\r\n\t\t\t\t\treturn;\r\n\r\n\r\n\t\t\t\tif(focusElement && focusElement.parentNode){\r\n\t\t\t\t\tfocusElement.focus();\r\n\r\n\t\t\t\t}else if(backupFocus && backupFocus.parentNode){\r\n\t\t\t\t\tbackupFocus.focus();\r\n\t\t\t\t}\r\n\t\t\t\tfocusElement = null;\r\n\t\t\t\tbackupFocus = null;\r\n\r\n\t\t\t}, 1);\r\n\t\t});\r\n\t}\r\n\r\n\tscheduler.$keyboardNavigation.isModal = isModal;\r\n\r\n\r\n})();\r\n\r\n}","export default function(scheduler){\r\n\r\n//Initial idea and implementation by Steve MC\r\nscheduler._temp_key_scope = function (){\r\n\r\n\tscheduler.config.key_nav = true;\r\n\r\n\tscheduler.$keyboardNavigation._pasteDate = null; // used for copy and paste operations\r\n\tscheduler.$keyboardNavigation._pasteSection = null; // used for copy and paste operations\r\n\tvar isCopy = null;\r\n\r\n\tvar pos = {};\r\n\r\n\tif(!document.body){\r\n\t\tscheduler.event(window, \"load\", function(){\r\n\t\t\tscheduler.event(document.body, \"mousemove\", trackMousePosition);\r\n\t\t});\r\n\t}else{\r\n\t\tscheduler.event(document.body, \"mousemove\", trackMousePosition);\r\n\t}\r\n\r\n\tfunction trackMousePosition(event){\r\n\t\tevent = event || window.event;\r\n\t\tpos.x = event.clientX;\r\n\t\tpos.y = event.clientY;\r\n\t}\r\n\tfunction currentTarget(){\r\n\r\n\t\tvar mousePointer = false;\r\n\t\tvar keyNavPointer = false;\r\n\r\n\t\tvar target = document.elementFromPoint(pos.x, pos.y);\r\n\t\twhile(target && target != scheduler._obj){\r\n\t\t\ttarget = target.parentNode;\r\n\t\t}\r\n\t\tmousePointer = !!(target == scheduler._obj);\r\n\r\n\t\tkeyNavPointer = scheduler.$keyboardNavigation.dispatcher.isEnabled();\r\n\r\n\t\treturn mousePointer || keyNavPointer;\r\n\t}\r\n\r\n\tscheduler.attachEvent(\"onMouseMove\", function(id,e){\r\n\t\tvar state = scheduler.getState();\r\n\r\n\t\t// make sure scheduler is fully initialized before calling scheduler.getActionData\r\n\t\tif(!(state.mode && state.min_date)){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tvar position = scheduler.getActionData(e);\r\n\t\tscheduler.$keyboardNavigation._pasteDate = position.date;\r\n\t\tscheduler.$keyboardNavigation._pasteSection = position.section;\r\n\t});\r\n\r\n\tfunction clear_event_after(ev){\r\n\t\tdelete ev.rec_type; delete ev.rec_pattern;\r\n\t\tdelete ev.event_pid; delete ev.event_length;\r\n\t}\r\n\r\n\tfunction copyEvent(ev){\r\n\t\treturn scheduler._lame_copy({}, ev);\r\n\t}\r\n\r\n\tscheduler._make_pasted_event = function(ev){\r\n\t\tvar date = scheduler.$keyboardNavigation._pasteDate;\r\n\t\tvar section = scheduler.$keyboardNavigation._pasteSection;\r\n\r\n\t\tvar event_duration = ev.end_date-ev.start_date;\r\n\r\n\t\tvar copy = copyEvent(ev);\r\n\t\tclear_event_after(copy);\r\n\t\tcopy.start_date = new Date(date);\r\n\t\tcopy.end_date = new Date(copy.start_date.valueOf() + event_duration);\r\n\r\n\t\tif(section){\r\n\t\t\tvar property = scheduler._get_section_property();\r\n\r\n\t\t\tif(scheduler.config.multisection)\r\n\t\t\t\tcopy[property] = ev[property]; // save initial set of resources for multisection view\r\n\t\t\telse\r\n\t\t\t\tcopy[property] = section;\r\n\t\t}\r\n\t\treturn copy;\r\n\t};\r\n\tscheduler._do_paste = function(is_copy, modified_ev, original_ev){\r\n\t\tif(scheduler.callEvent(\"onBeforeEventPasted\", [is_copy, modified_ev, original_ev]) === false){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tscheduler.addEvent(modified_ev);\r\n\t\tscheduler.callEvent(\"onEventPasted\", [is_copy, modified_ev, original_ev]);\r\n\t};\r\n\r\n\tscheduler._is_key_nav_active = function(){\r\n\t\tif(this._is_initialized() && !this._is_lightbox_open() && this.config.key_nav){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\r\n\tfunction getSelectedEvent(){\r\n\t\tvar node = scheduler.$keyboardNavigation.dispatcher.getActiveNode();\r\n\t\tif(node && node.eventId) return node.eventId;\r\n\t\treturn scheduler._select_id;\r\n\t}\r\n\r\n\tscheduler.event(document, \"keydown\", function(e){\r\n\t\t// compatibility fix - scheduler focus on ctrl+v on mouse hover\r\n\t\tif(((e.ctrlKey || e.metaKey) && e.keyCode == 86) && scheduler._buffer_event && !scheduler.$keyboardNavigation.dispatcher.isEnabled()) {\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.isActive = currentTarget();\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler._key_nav_copy_paste = function(e){\r\n\t\tif(!scheduler._is_key_nav_active()) return true;\r\n\r\n\t\tif (e.keyCode == 37 || e.keyCode == 39) { // Left, Right arrows\r\n\t\t\te.cancelBubble = true;\r\n\r\n\t\t\tvar next = scheduler.date.add(scheduler._date,(e.keyCode == 37 ? -1 : 1 ),scheduler._mode);\r\n\t\t\tscheduler.setCurrentView(next);\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tvar select_id = getSelectedEvent();\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 67) { // CTRL+C\r\n\t\t\tif (select_id) {\r\n\t\t\t\tscheduler._buffer_event = copyEvent(scheduler.getEvent(select_id));\r\n\t\t\t\tisCopy = true;\r\n\t\t\t\tscheduler.callEvent(\"onEventCopied\", [scheduler.getEvent(select_id)]);\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 88) { // CTRL+X\r\n\t\t\tif (select_id) {\r\n\t\t\t\tisCopy = false;\r\n\t\t\t\tvar ev = scheduler._buffer_event = copyEvent(scheduler.getEvent(select_id));\r\n\r\n\t\t\t\tscheduler.updateEvent(ev.id);\r\n\t\t\t\tscheduler.callEvent(\"onEventCut\", [ev]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 86 && currentTarget(e)) { // CTRL+V\r\n\t\t\tvar ev = scheduler._buffer_event ? scheduler.getEvent(scheduler._buffer_event.id) : scheduler._buffer_event;\r\n\t\t\tev = ev || scheduler._buffer_event;\r\n\r\n\t\t\tif (ev) {\r\n\t\t\t\tvar new_ev = scheduler._make_pasted_event(ev);\r\n\t\t\t\tif (isCopy) {\r\n\t\t\t\t\tnew_ev.id = scheduler.uid();\r\n\t\t\t\t\tscheduler._do_paste(isCopy, new_ev, ev);\r\n\t\t\t\t}\r\n\t\t\t\telse { // cut operation\r\n\t\t\t\t\tvar res = scheduler.callEvent(\"onBeforeEventChanged\",[new_ev, e, false, ev]);\r\n\t\t\t\t\tif (res) {\r\n\t\t\t\t\t\tscheduler._do_paste(isCopy, new_ev, ev);\r\n\t\t\t\t\t\tisCopy = true; // switch to copy after first paste operation\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t};\r\n};\r\nscheduler._temp_key_scope();\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.attachSchedulerHandlers = function(){\r\n\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\tvar keyDownHandler = function(e){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\r\n\t\treturn dispatcher.keyDownHandler(e);\r\n\t};\r\n\r\n\tvar focusHandler = function () {\r\n\t\tdispatcher.keepScrollPosition(function () {\r\n\t\t\tdispatcher.focusGlobalNode();\r\n\t\t});\r\n\t};\r\n\r\n\tvar waitCall;\r\n\tscheduler.attachEvent(\"onDataRender\", function(){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\t\tif(!(dispatcher.isEnabled() && !scheduler.getState().editor_id)) return;\r\n\r\n\t\tclearTimeout(waitCall);\r\n\t\twaitCall = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tif(!dispatcher.isEnabled())\r\n\t\t\t\tdispatcher.enable();\r\n\t\t\treFocusActiveNode();\r\n\t\t});\r\n\t});\r\n\r\n\tvar reFocusActiveNode = function(){\r\n\t\tif(!dispatcher.isEnabled())\r\n\t\t\treturn;\r\n\r\n\t\tvar activeNode = dispatcher.getActiveNode();\r\n\t\tif(!activeNode)\r\n\t\t\treturn;\r\n\r\n\t\tif(!activeNode.isValid()){\r\n\t\t\tactiveNode = activeNode.fallback();\r\n\t\t}\r\n\r\n\t\tif(!activeNode || activeNode instanceof scheduler.$keyboardNavigation.MinicalButton || activeNode instanceof scheduler.$keyboardNavigation.MinicalCell)\r\n\t\t\treturn;\r\n\r\n\t\tdispatcher.keepScrollPosition(function () {\r\n\t\t\tactiveNode.focus(true);\r\n\t\t});\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\tvar container = scheduler.$container;\r\n\t\tscheduler.eventRemove(document, \"keydown\", keyDownHandler);\r\n\t\tscheduler.eventRemove(container, \"mousedown\", mousedownHandler);\r\n\t\tscheduler.eventRemove(container, \"focus\", focusHandler);\r\n\r\n\r\n\t\tif(scheduler.config.key_nav){\r\n\r\n\t\t\tscheduler.event(document, \"keydown\", keyDownHandler);\r\n\t\t\tscheduler.event(container, \"mousedown\", mousedownHandler);\r\n\t\t\tscheduler.event(container, \"focus\", focusHandler);\r\n\r\n\t\t\tcontainer.setAttribute(\"tabindex\", \"0\");\r\n\r\n\t\t}else{\r\n\t\t\tcontainer.removeAttribute(\"tabindex\");\r\n\t\t}\r\n\t});\r\n\r\n\tfunction mousedownHandler(e){\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\r\n\r\n\t\tvar dataAreaClick = scheduler.$keyboardNavigation.isChildOf(e.target || e.srcElement, scheduler.$container.querySelector(\".dhx_cal_data\"));\r\n\r\n\r\n\t\tvar pos = scheduler.getActionData(e);\r\n\r\n\t\tvar focusNode;\r\n\t\tif(scheduler._locate_event(e.target || e.srcElement)){\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.Event(scheduler._locate_event(e.target || e.srcElement));\r\n\t\t}else if(dataAreaClick){\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(pos.date && dataAreaClick){\r\n\t\t\t\tfocusNode = focusNode.nextSlot(new scheduler.$keyboardNavigation.TimeSlot(pos.date, null, pos.section));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(focusNode) {\r\n\t\t\tif (!dispatcher.isEnabled()) {\r\n\t\t\t\tdispatcher.activeNode = focusNode;\r\n\r\n\t\t\t} else {\r\n\t\t\t\tif (pos.date && dataAreaClick) {\r\n\t\t\t\t\tdispatcher.delay(function () {\r\n\t\t\t\t\t\tdispatcher.setActiveNode(focusNode);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction focusEvent(evNode){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\t\tif(!dispatcher.isEnabled()) return;\r\n\r\n\r\n\t\tvar prevState = evNode;\r\n\t\tvar focusNode = new scheduler.$keyboardNavigation.Event(prevState.eventId);\r\n\t\tif(!focusNode.isValid()){\r\n\t\t\tvar lastStart = focusNode.start || prevState.start;\r\n\t\t\tvar lastEnd = focusNode.end || prevState.end;\r\n\t\t\tvar lastSection = focusNode.section || prevState.section;\r\n\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot(lastStart, lastEnd, lastSection);\r\n\t\t\tif(!focusNode.isValid()){\r\n\t\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdispatcher.setActiveNode(focusNode);\r\n\t\tvar node = dispatcher.getActiveNode();\r\n\t\tif(node && node.getNode && document.activeElement != node.getNode()){\r\n\t\t\tdispatcher.focusNode(dispatcher.getActiveNode());\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tvar updateEvent = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id){\r\n\t\tvar res = updateEvent.apply(this, arguments);\r\n\t\tif(scheduler.config.key_nav && dispatcher.isEnabled()){\r\n\t\t\tif(scheduler.getState().select_id == id){\r\n\t\t\t\tvar element = new scheduler.$keyboardNavigation.Event(id);\r\n\r\n\t\t\t\tif(!scheduler.getState().lightbox_id){\r\n\t\t\t\t\tfocusEvent(element);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn res;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onEventDeleted\", function(id) {\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\t\tif(dispatcher.isEnabled()){\r\n\t\t\tvar activeNode = dispatcher.getActiveNode();\r\n\t\t\tif(activeNode.eventId == id){\r\n\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onClearAll\", function(){\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\t\tif(dispatcher.isEnabled()){\r\n\t\t\tif(dispatcher.getActiveNode() instanceof scheduler.$keyboardNavigation.Event){\r\n\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n};\r\n\r\n}","interface IViewPosition{\r\n\ttop: number;\r\n\tleft: number;\r\n}\r\n\r\ninterface IViewBox extends IViewPosition{\r\n\twidth: number;\r\n\theight: number;\r\n\tbottom: number;\r\n\tright: number;\r\n}\r\n\r\nexport class Tooltip {\r\n\tprivate _root: HTMLElement;\r\n\tprivate _tooltipNode: HTMLElement | null;\r\n\tprivate _scheduler: any;\r\n\r\n\tconstructor(scheduler: any){\r\n\t\tthis._scheduler = scheduler;\r\n\t}\r\n\r\n\tgetNode() : HTMLElement {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tif (!this._tooltipNode){\r\n\t\t\tthis._tooltipNode = document.createElement(\"div\");\r\n\t\t\tthis._tooltipNode.className = \"dhtmlXTooltip scheduler_tooltip tooltip\";\r\n\r\n\t\t\tscheduler._waiAria.tooltipAttr(this._tooltipNode);\r\n\t\t}\r\n\t\tif(scheduler.config.rtl){\r\n\t\t\tthis._tooltipNode.classList.add(\"dhtmlXTooltip_rtl\");\r\n\t\t} else{\r\n\t\t\tthis._tooltipNode.classList.remove(\"dhtmlXTooltip_rtl\");\r\n\t\t}\r\n\t\treturn this._tooltipNode;\r\n\t}\r\n\r\n\tsetViewport(node: HTMLElement):Tooltip{\r\n\t\tthis._root = node;\r\n\t\treturn this;\r\n\t}\r\n\r\n\tshow(left: number, top: number): Tooltip;\r\n\tshow(event: MouseEvent): Tooltip;\r\n\tshow(left: number | MouseEvent, top?: number): Tooltip {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tconst container = document.body;\r\n\t\tconst node = this.getNode();\r\n\r\n\t\tif(!domHelpers.isChildOf(node, container)){\r\n\t\t\tthis.hide();\r\n\t\t\tcontainer.appendChild(node);\r\n\t\t}\r\n\r\n\t\tif (this._isLikeMouseEvent(left)) {\r\n\t\t\tconst position = this._calculateTooltipPosition(left as MouseEvent);\r\n\t\t\ttop = position.top;\r\n\t\t\tleft = position.left;\r\n\t\t}\r\n\r\n\t\tnode.style.top = top + \"px\";\r\n\t\tnode.style.left = left + \"px\";\r\n\r\n\t\tscheduler._waiAria.tooltipVisibleAttr(node);\r\n\t\treturn this;\r\n\t}\r\n\thide() : Tooltip{\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst node = this.getNode();\r\n\t\tif(node && node.parentNode){\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t}\r\n\t\tscheduler._waiAria.tooltipHiddenAttr(node);\r\n\t\treturn this;\r\n\t}\r\n\r\n\tsetContent(html: string) : Tooltip{\r\n\t\tconst node = this.getNode();\r\n\t\tnode.innerHTML = html;\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// it is for salesforce, because it proxies event to it own events\r\n\tprivate _isLikeMouseEvent(event: any): boolean {\r\n\t\tif (!event || typeof event !== \"object\") {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn \"clientX\" in event && \"clientY\" in event;\r\n\t}\r\n\r\n\tprivate _getViewPort() : HTMLElement {\r\n\t\treturn this._root || document.body;\r\n\t}\r\n\r\n\r\n\tprivate _calculateTooltipPosition(event: MouseEvent): IViewPosition{\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\t// top/left coordinates inside the viewport by mouse position\r\n\t\tconst viewport = this._getViewPortSize();\r\n\t\tconst tooltipNode = this.getNode();\r\n\t\tconst tooltip: IViewBox = {\r\n\t\t\ttop:0,\r\n\t\t\tleft: 0,\r\n\t\t\twidth: tooltipNode.offsetWidth,\r\n\t\t\theight: tooltipNode.offsetHeight,\r\n\t\t\tbottom: 0,\r\n\t\t\tright: 0\r\n\t\t};\r\n\r\n\t\tconst offsetX = scheduler.config.tooltip_offset_x;\r\n\t\tconst offsetY = scheduler.config.tooltip_offset_y;\r\n\r\n\t\tconst container = document.body;\r\n\t\tconst mouse = domHelpers.getRelativeEventPosition(event, container);\r\n\t\tconst containerPos = domHelpers.getNodePosition(container);\r\n\t\tmouse.y += containerPos.y; // to fix margin collapsing\r\n\r\n\t\ttooltip.top = mouse.y;\r\n\t\ttooltip.left = mouse.x;\r\n\t\ttooltip.top += offsetY;\r\n\t\ttooltip.left += offsetX;\r\n\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\ttooltip.right = tooltip.left + tooltip.width;\r\n\r\n\t\tconst scrollTop = window.scrollY + container.scrollTop; // to fix margin collapsing\r\n\t\t// edge cases when the tooltip element can be partially hidden by edges of the viewport\r\n\t\tif(tooltip.top < viewport.top - scrollTop){\r\n\t\t\ttooltip.top = viewport.top;\r\n\t\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\t}else if(tooltip.bottom > viewport.bottom){\r\n\t\t\ttooltip.bottom = viewport.bottom;\r\n\t\t\ttooltip.top = tooltip.bottom - tooltip.height;\r\n\t\t}\r\n\r\n\t\tif(tooltip.left < viewport.left){\r\n\t\t\ttooltip.left = viewport.left;\r\n\t\t\ttooltip.right = viewport.left + tooltip.width;\r\n\t\t}else if(tooltip.right > viewport.right){\r\n\t\t\ttooltip.right = viewport.right;\r\n\t\t\ttooltip.left = tooltip.right - tooltip.width;\r\n\t\t}\r\n\r\n\t\tif(mouse.x >= tooltip.left && mouse.x <= tooltip.right) {\r\n\t\t\ttooltip.left = mouse.x - tooltip.width - offsetX;\r\n\t\t\ttooltip.right = tooltip.left + tooltip.width;\r\n\t\t}\r\n\r\n\t\tif(mouse.y >= tooltip.top && mouse.y <= tooltip.bottom) {\r\n\t\t\ttooltip.top = mouse.y - tooltip.height - offsetY;\r\n\t\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\t}\r\n\r\n\t\treturn tooltip;\r\n\t}\r\n\r\n\tprivate _getViewPortSize() : IViewBox {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tconst container = this._getViewPort();\r\n\t\tlet viewport = container;\r\n\t\tlet scrollTop = window.scrollY + document.body.scrollTop;\r\n\t\tlet scrollLeft = window.scrollX + document.body.scrollLeft;\r\n\t\tlet pos;\r\n\t\t// support for the initial tooltip mode where the tooltip element was attached to the data area of scheduler\r\n\t\tif(container === scheduler.$event_data){\r\n\t\t\tviewport = scheduler.$event;\r\n\t\t\tscrollTop = 0;\r\n\t\t\tscrollLeft = 0;\r\n\t\t\tpos = domHelpers.getNodePosition(scheduler.$event);\r\n\t\t}else{\r\n\t\t\tpos = domHelpers.getNodePosition(viewport);\r\n\t\t}\r\n\t\treturn {\r\n\t\t\tleft:pos.x + scrollLeft,\r\n\t\t\ttop: pos.y + scrollTop,\r\n\t\t\twidth: pos.width,\r\n\t\t\theight: pos.height,\r\n\t\t\tbottom: pos.y + pos.height + scrollTop,\r\n\t\t\tright: pos.x + pos.width + scrollLeft\r\n\t\t};\r\n\t}\r\n}\r\n","import * as utils from \"../../core/utils/utils\";\r\nimport { Tooltip } from \"./tooltip\";\r\n\r\ninterface ITrackerTarget {\r\n\tselector: string;\r\n\tonmouseenter: (event: MouseEvent, node: HTMLElement) => void;\r\n\tonmousemove: (event: MouseEvent, node: HTMLElement) => void;\r\n\tonmouseleave: (event: MouseEvent, node: HTMLElement) => void;\r\n\tglobal: boolean;\r\n}\r\n\r\ninterface ITooltipConfig {\r\n\tselector: string;\r\n\thtml: (event: MouseEvent, node: HTMLElement) => string;\r\n\tglobal: boolean;\r\n}\r\n\r\nexport class TooltipManager{\r\n\ttooltip: Tooltip;\r\n\tprotected _domEvents: any;\r\n\tprivate _listeners: object = {};\r\n\tprivate _scheduler: any;\r\n\tprivate delayShow: any;\r\n\tprivate delayHide: any;\r\n\r\n\tconstructor(scheduler: any) {\r\n\t\tthis.tooltip = new Tooltip(scheduler);\r\n\t\tthis._scheduler = scheduler;\r\n\t\tthis._domEvents = scheduler._createDomEventScope();\r\n\t\tthis._initDelayedFunctions();\r\n\t}\r\n\r\n\tdestructor(): void{\r\n\t\tthis.tooltip.hide();\r\n\t\tthis._domEvents.detachAll();\r\n\t}\r\n\thideTooltip(): void{\r\n\t\tthis.delayHide();\r\n\t}\r\n\tattach(config: ITrackerTarget): void {\r\n\t\tlet root = document.body;\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tif(!config.global){\r\n\t\t\troot = scheduler.$root;\r\n\t\t}\r\n\r\n\t\tlet watchableTarget = null;\r\n\t\tconst handler = (event) => {\r\n\t\t\tconst eventTarget = domHelpers.getTargetNode(event);\r\n\t\t\tconst targetNode = domHelpers.closest(eventTarget, config.selector);\r\n\t\t\tif(domHelpers.isChildOf(eventTarget, this.tooltip.getNode())){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tconst doOnMouseEnter = () => {\r\n\t\t\t\twatchableTarget = targetNode;\r\n\t\t\t\tconfig.onmouseenter(event, targetNode);\r\n\t\t\t};\r\n\r\n\t\t\tif(watchableTarget){\r\n\t\t\t\tif(targetNode && targetNode === watchableTarget){\r\n\t\t\t\t\tconfig.onmousemove(event, targetNode);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconfig.onmouseleave(event, watchableTarget);\r\n\t\t\t\t\twatchableTarget = null;\r\n\r\n\t\t\t\t\tif(targetNode && targetNode !== watchableTarget){\r\n\t\t\t\t\t\tdoOnMouseEnter();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(targetNode){\r\n\t\t\t\t\tdoOnMouseEnter();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tthis.detach(config.selector);\r\n\t\tthis._domEvents.attach(root, \"mousemove\", handler);\r\n\t\tthis._listeners[config.selector] = {\r\n\t\t\tnode: root,\r\n\t\t\thandler\r\n\t\t};\r\n\t}\r\n\r\n\tdetach(selector: string): void {\r\n\t\tconst listener = this._listeners[selector];\r\n\t\tif(listener){\r\n\t\t\tthis._domEvents.detach(listener.node, \"mousemove\", listener.handler);\r\n\t\t}\r\n\t}\r\n\r\n\ttooltipFor(config: ITooltipConfig): void {\r\n\t\tconst cloneDomEvent = (event: MouseEvent) => {\r\n\t\t\tlet clone = event;\r\n\t\t\t// making events survive timeout in ie\r\n\t\t\t// tslint:disable-next-line no-string-literal\r\n\t\t\tif(document[\"createEventObject\"] && !document.createEvent){\r\n\t\t\t\t// tslint:disable-next-line no-string-literal\r\n\t\t\t\tclone = document[\"createEventObject\"](event);\r\n\t\t\t}\r\n\t\t\treturn clone;\r\n\t\t};\r\n\t\tthis._initDelayedFunctions();\r\n\t\tthis.attach({\r\n\t\t\tselector: config.selector,\r\n\t\t\tglobal: config.global,\r\n\t\t\tonmouseenter:(event: MouseEvent, node: HTMLElement) => {\r\n\t\t\t\tconst html = config.html(event, node);\r\n\t\t\t\tif(html){\r\n\t\t\t\t\tthis.delayShow(cloneDomEvent(event), html);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tonmousemove:(event: MouseEvent, node: HTMLElement) => {\r\n\t\t\t\tconst html = config.html(event, node);\r\n\t\t\t\tif(html){\r\n\t\t\t\t\tthis.delayShow(cloneDomEvent(event), html);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\t\t\tthis.delayHide();\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tonmouseleave:() => {\r\n\t\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\t\tthis.delayHide();\r\n\t\t\t},\r\n\t\t});\r\n\t}\r\n\r\n\tprivate _initDelayedFunctions(){\r\n\t\tconst scheduler = this._scheduler;\r\n\t\t// reset delayed functions in order to apply current values of tooltip_timeout\r\n\t\tif(this.delayShow){\r\n\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t}\r\n\t\tif(this.delayHide){\r\n\t\t\tthis.delayHide.$cancelTimeout();\r\n\t\t}\r\n\t\tthis.tooltip.hide();\r\n\t\t\r\n\t\tthis.delayShow = (utils as any).default.delay((event: MouseEvent, html: string) => {\r\n\t\t\tif(scheduler.callEvent(\"onBeforeTooltip\", [event]) === false) {\r\n\t\t\t\tthis.tooltip.hide();\r\n\t\t\t} else {\r\n\t\t\t\tthis.tooltip.setContent(html);\r\n\t\t\t\tthis.tooltip.show(event);\r\n\t\t\t}\r\n\t\t}, scheduler.config.tooltip_timeout || 1);\r\n\r\n\t\tthis.delayHide = (utils as any).default.delay(() => {\r\n\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\tthis.tooltip.hide();\r\n\t\t}, scheduler.config.tooltip_hide_timeout || 1);\r\n\t}\r\n\r\n}","import active_links from \"./active_links\";\r\nimport agenda_legacy from \"./agenda_legacy_view\";\r\nimport agenda_view from \"./agenda\";\r\nimport all_timed from \"./all_timed\";\r\nimport collision from \"./collision\";\r\nimport container_autoresize from \"./container_autoresize\";\r\nimport cookie from \"./cookie\";\r\nimport daytimeline_restricted from \"./restricted_extensions/daytimeline\";\r\nimport drag_between_restricted from \"./restricted_extensions/drag_between\";\r\nimport editors from \"./editors\";\r\nimport expand from \"./expand\";\r\nimport grid_view from \"./restricted_extensions/grid_view\";\r\nimport html_templates from \"./html_templates\";\r\nimport key_nav from \"./key_nav\";\r\nimport layer from \"./layer\";\r\nimport limit from \"./limit\";\r\nimport map_view from \"./map_view\";\r\nimport minical from \"./minical\";\r\nimport monthheight from \"./monthheight\";\r\nimport multisection_restricted from \"./restricted_extensions/multisection\";\r\nimport multiselect from \"./multiselect\";\r\nimport multisource from \"./multisource\";\r\nimport mvc from \"./mvc\";\r\nimport outerdrag from \"./outerdrag\";\r\nimport pdf from \"./pdf\";\r\nimport quick_info from \"./quick_info\";\r\nimport readonly from \"./readonly\";\r\nimport recurring from \"./recurring\";\r\nimport serialize from \"./serialize\";\r\nimport timeline_restricted from \"./restricted_extensions/timeline\";\r\nimport tooltip from \"./tooltip\";\r\nimport treetimeline_restricted from \"./restricted_extensions/treetimeline\";\r\nimport units_restricted from \"./restricted_extensions/units\";\r\nimport url from \"./url\";\r\nimport week_agenda_restricted from \"./restricted_extensions/week_agenda\";\r\nimport wp from \"./wp\";\r\nimport year_view from \"./year_view\";\r\nimport export_api from \"./export_api\";\r\n\r\nexport default {\r\n\tactive_links,\r\n\tagenda_legacy,\r\n\tagenda_view,\r\n\tall_timed,\r\n\tcollision,\r\n\tcontainer_autoresize,\r\n\tcookie,\r\n\tdaytimeline: daytimeline_restricted,\r\n\tdrag_between: drag_between_restricted,\r\n\teditors,\r\n\texpand,\r\n\texport_api,\r\n\tgrid_view,\r\n\thtml_templates,\r\n\tkey_nav,\r\n\tlayer,\r\n\tlimit,\r\n\tmap_view,\r\n\tminical,\r\n\tmonthheight,\r\n\tmultisection: multisection_restricted,\r\n\tmultiselect,\r\n\tmultisource,\r\n\tmvc,\r\n\touterdrag,\r\n\tpdf,\r\n\tquick_info,\r\n\treadonly,\r\n\trecurring,\r\n\tserialize,\r\n\ttimeline: timeline_restricted,\r\n\ttooltip,\r\n\ttreetimeline: treetimeline_restricted,\r\n\tunits: units_restricted,\r\n\turl,\r\n\tweek_agenda: week_agenda_restricted,\r\n\twp,\r\n\tyear_view\r\n};","export default function(scheduler){\r\n\r\nscheduler.config.active_link_view = \"day\";\r\nscheduler._active_link_click = function(e){\r\n\tvar start = e.target;\r\n\tvar to = start.getAttribute(\"data-link-date\");\r\n\tvar s_d = scheduler.date.str_to_date(scheduler.config.api_date, false, true);\r\n\tif (to) {\r\n\t\tscheduler.setCurrentView(s_d(to), scheduler.config.active_link_view);\r\n\t\tif (e && e.preventDefault)\r\n\t\t\te.preventDefault();\r\n\t\treturn false;\r\n\t}\r\n};\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar do_wrapper = function(key, fullname){\r\n\t\tfullname = fullname || (key+\"_scale_date\");\r\n\r\n\t\tif(!scheduler.templates['_active_links_old_'+ fullname]){\r\n\t\t\tscheduler.templates['_active_links_old_'+ fullname] = scheduler.templates[fullname];\r\n\t\t}\r\n\t\tvar week_x = scheduler.templates['_active_links_old_'+ fullname];\r\n\t\tvar d_s = scheduler.date.date_to_str(scheduler.config.api_date);\r\n\t\tscheduler.templates[fullname] = function(date) {\r\n\t\t\treturn \"\" + week_x(date) + \"\";\r\n\t\t};\r\n\t};\r\n\r\n\tdo_wrapper(\"week\");\r\n\tdo_wrapper(\"\", \"month_day\");\r\n\tif (this.matrix){\r\n\t\tfor (var key in this.matrix)\r\n\t\t\tdo_wrapper(key);\r\n\t}\r\n\r\n\tthis._detachDomEvent(this._obj, \"click\", scheduler._active_link_click);\r\n\tscheduler.event(this._obj, \"click\", scheduler._active_link_click);\r\n});\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.date.add_agenda_legacy = function(date){\r\n\treturn scheduler.date.add(date, 1, \"year\");\r\n};\r\n\r\nscheduler.templates.agenda_legacy_time = function(start,end,ev){\r\n\tif (ev._timed)\r\n\t\treturn this.day_date(ev.start_date, ev.end_date, ev)+\" \"+this.event_date(start);\r\n\telse\r\n\t\treturn scheduler.templates.day_date(start)+\" – \"+scheduler.templates.day_date(end);\r\n};\r\nscheduler.templates.agenda_legacy_text = function(start,end,event){\r\n\treturn event.text;\r\n};\r\nscheduler.templates.agenda_legacy_date = function(){ return \"\"; };\r\n\r\nscheduler.date.agenda_legacy_start=function(){ return scheduler.date.date_part(scheduler._currentDate()); };\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function() {\r\n\tvar old_dblclick_dhx_cal_data = scheduler.dblclick_dhx_cal_data;\r\n\tscheduler.dblclick_dhx_cal_data = function() {\r\n\t\tif (this._mode == \"agenda_legacy\") {\r\n\t\t\tif (!this.config.readonly && this.config.dblclick_create)\r\n\t\t\t\tthis.addEventNow();\r\n\t\t} else {\r\n\t\t\tif (old_dblclick_dhx_cal_data)\r\n\t\t\t\treturn old_dblclick_dhx_cal_data.apply(this, arguments);\r\n\t\t}\r\n\t};\r\n\r\n\r\n\tvar old = scheduler.render_data;\r\n\tscheduler.render_data=function(evs){\r\n\t\tif (this._mode == \"agenda_legacy\")\r\n\t\t\tfill_agenda_tab();\r\n\t\telse\r\n\t\t\treturn old.apply(this,arguments);\r\n\t};\r\n\r\n\tvar old_render_view_data = scheduler.render_view_data;\r\n\tscheduler.render_view_data = function(){\r\n\t\tif(this._mode == \"agenda_legacy\") {\r\n\t\t\tscheduler._agendaScrollTop = scheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop;\r\n\t\t\tscheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop = 0;\r\n\t\t}\r\n\t\treturn old_render_view_data.apply(this,arguments);\r\n\t};\r\n\r\n\r\n\r\n\tfunction set_full_view(mode){\r\n\t\tif (mode){\r\n\t\t\tvar l = scheduler.locale.labels;\r\n\r\n\t\t\tvar rowAttr = scheduler._waiAria.agendaHeadAttrString();\r\n\t\t\tvar dateHeader = scheduler._waiAria.agendaHeadDateString(l.date);\r\n\t\t\tvar descriptionHeader = scheduler._waiAria.agendaHeadDescriptionString(l.description);\r\n\r\n\t\t\tscheduler._els[\"dhx_cal_header\"][0].innerHTML=\"
\" +\r\n\t\t\t\t\"
\"+l.date+\"
\" +\r\n\t\t\t\t\"\"+l.description+\"\" +\r\n\t\t\t\t\"
\";\r\n\t\t\tscheduler._table_view=true;\r\n\t\t\tscheduler.set_sizes();\r\n\t\t}\r\n\t}\r\n\r\n\tfunction fill_agenda_tab(){\r\n\t\t//select events for which data need to be printed\r\n\r\n\t\tvar events = scheduler.get_visible_events();\r\n\t\tevents.sort(function(a,b){ return a.start_date>b.start_date?1:-1;});\r\n\r\n\t\tvar tableAttr = scheduler._waiAria.agendaDataAttrString();\r\n\t\tvar agendaEventAttrString;\r\n\t\t//generate html for the view\r\n\t\tvar html=\"
\";\r\n\t\tfor (var i=0; i
\"+\r\n\t\t\t\t\t(scheduler.config.rtl ? scheduler.templates.agenda_time(ev.end_date,ev.start_date, ev):scheduler.templates.agenda_time(ev.start_date, ev.end_date,ev))+\r\n\t\t\t\t\t\"
\";\r\n\t\t\thtml+=`
\r\n\t\t\t\r\n\t\t\t
`;\r\n\t\t\thtml+=\"\"+scheduler.templates.agenda_text(ev.start_date, ev.end_date, ev)+\"
\";\r\n\t\t}\r\n\t\thtml+=\"
\";\r\n\r\n\t\t//render html\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop = scheduler._agendaScrollTop||0;\r\n\r\n\t\t// setting up dhx_v_border size\r\n\t\tvar agenda_area = scheduler._els[\"dhx_cal_data\"][0].childNodes[0];\r\n\t\tvar v_border = agenda_area.childNodes[agenda_area.childNodes.length-1];\r\n\t\tv_border.style.height = (agenda_area.offsetHeight < scheduler._els[\"dhx_cal_data\"][0].offsetHeight) ? \"100%\" : (agenda_area.offsetHeight+\"px\");\r\n\r\n\t\tvar t=scheduler._els[\"dhx_cal_data\"][0].firstChild.childNodes;\r\n\r\n\t\tvar dateElement = scheduler._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML=scheduler.templates.agenda_date(scheduler._min_date, scheduler._max_date, scheduler._mode);\r\n\t\t}\r\n\r\n\t\tscheduler._rendered=[];\r\n\t\tfor (var i=0; i < t.length-1; i++)\r\n\t\t\tscheduler._rendered[i]=t[i];\r\n\r\n\t}\r\n\r\n\tscheduler.agenda_legacy_view=function(mode){\r\n\t\tscheduler._min_date = scheduler.config.agenda_start||scheduler.date.agenda_legacy_start(scheduler._date);\r\n\t\tscheduler._max_date = scheduler.config.agenda_end||scheduler.date.add_agenda_legacy(scheduler._min_date, 1);\r\n\r\n\t\tset_full_view(mode);\r\n\t\tif (mode){\r\n\t\t\tscheduler._cols = null;\r\n\t\t\tscheduler._colsS = null;\r\n\t\t\tscheduler._table_view = true;\r\n\t\t\t//agenda tab activated\r\n\t\t\tfill_agenda_tab();\r\n\t\t} else {\r\n\t\t\tscheduler._table_view = false;\r\n\t\t\t//agenda tab de-activated\r\n\t\t}\r\n\t};\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.date.add_agenda = function(date, inc){\r\n\t\treturn scheduler.date.add(date, 1*inc, \"month\");\r\n\t};\r\n\t\r\n\tscheduler.templates.agenda_time = function(start,end,ev){\r\n\t\tif (ev._timed){\r\n\t\t\treturn `${this.event_date(start)} - ${this.event_date(end)}`;\r\n\t\t}else{\r\n\t\t\treturn scheduler.locale.labels.full_day;\r\n\t\t}\r\n\t};\r\n\tscheduler.templates.agenda_text = function(start,end,ev){\r\n\t\treturn ev.text;\r\n\t};\r\n\r\n\tconst dayDateToStr = scheduler.date.date_to_str(\"%F %j\");\r\n\tconst dayDowToStr = scheduler.date.date_to_str(\"%l\");\r\n\r\n\tscheduler.templates.agenda_day = function(date){ \r\n\t\treturn `
${dayDateToStr(date)}
\r\n\t\t
${dayDowToStr(date)}
`;\r\n\t};\r\n\tscheduler.templates.agenda_date = function(start, end){ \r\n\t\treturn scheduler.templates.month_date(scheduler.getState().date); \r\n\t};\r\n\t\r\n\tscheduler.date.agenda_start=function(date){\r\n\t\treturn scheduler.date.month_start(new Date(date));\r\n\t};\r\n\r\n\tlet scrollTop = 0;\r\n\t\r\n\tscheduler.attachEvent(\"onTemplatesReady\",function() {\r\n\t\tvar old_dblclick_dhx_cal_data = scheduler.dblclick_dhx_cal_data;\r\n\t\tscheduler.dblclick_dhx_cal_data = function() {\r\n\t\t\tif (this._mode == \"agenda\") {\r\n\t\t\t\tif (!this.config.readonly && this.config.dblclick_create)\r\n\t\t\t\t\tthis.addEventNow();\r\n\t\t\t} else {\r\n\t\t\t\tif (old_dblclick_dhx_cal_data)\r\n\t\t\t\t\treturn old_dblclick_dhx_cal_data.apply(this, arguments);\r\n\t\t\t}\r\n\t\t};\r\n\t\r\n\t\r\n\t\tvar old = scheduler.render_data;\r\n\t\tscheduler.render_data=function(evs){\r\n\t\t\tif (this._mode == \"agenda\")\r\n\t\t\t\tfill_agenda_tab();\r\n\t\t\telse\r\n\t\t\t\treturn old.apply(this,arguments);\r\n\t\t};\r\n\t\r\n\t\tvar old_render_view_data = scheduler.render_view_data;\r\n\t\tscheduler.render_view_data = function(){\r\n\t\t\tif(this._mode == \"agenda\") {\r\n\t\t\t\tscrollTop = scheduler._els[\"dhx_cal_data\"][0].scrollTop;\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = 0;\r\n\t\t\t}\r\n\t\t\treturn old_render_view_data.apply(this,arguments);\r\n\t\t};\r\n\r\n\t\tfunction fill_agenda_tab(){\r\n\t\t\tconst events = scheduler.get_visible_events();\r\n\t\t\tevents.sort(function(a,b){ return a.start_date>b.start_date?1:-1;});\r\n\r\n\t\t\tconst eventsInDays = {};\r\n\t\t\tlet currDate = scheduler.getState().min_date;\r\n\t\t\tconst maxDate = scheduler.getState().max_date;\r\n\t\t\twhile(currDate.valueOf() < maxDate.valueOf()){\r\n\t\t\t\teventsInDays[currDate.valueOf()] = [];\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\r\n\t\t\tlet anyEvents = false;\r\n\r\n\t\t\tevents.forEach((ev) => {\r\n\t\t\t\tlet eventStart = scheduler.date.day_start(new Date(ev.start_date)); \r\n\t\t\t\twhile (eventStart.valueOf() < ev.end_date.valueOf()) {\r\n\t\t\t\t\tif (eventsInDays[eventStart.valueOf()]) {\r\n\t\t\t\t\t\teventsInDays[eventStart.valueOf()].push(ev);\r\n\t\t\t\t\t\tanyEvents = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\teventStart = scheduler.date.day_start(scheduler.date.add(eventStart, 1, \"day\"));\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(!anyEvents){\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = renderEmptyView();\r\n\t\t\t}else{\r\n\t\t\t\tlet html = \"\";\r\n\t\t\t\tfor(let day in eventsInDays){\r\n\t\t\t\t\thtml += renderDay(new Date(day*1), eventsInDays[day]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = scrollTop;\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\r\n\r\n\t\tfunction renderEmptyView(){\r\n\t\t\treturn `
${scheduler.locale.labels.agenda_tab}
`;\r\n\t\t}\r\n\r\n\t\tfunction renderDay(day, events) {\r\n\t\t\tif(!events.length){\r\n\t\t\t\treturn \"\";\r\n\t\t\t}\r\n\t\t\tlet html = `\r\n
\r\n\t
${scheduler.templates.agenda_day(day)}
\r\n\t
\r\n`;\r\n\r\n\t\t\tevents.forEach((calendarEvent) => {\r\n\t\t\t\thtml += renderOneEvent(day, calendarEvent);\r\n\t\t\t});\r\n\r\n\t\t\thtml += `
`;\r\n\t\t\treturn html;\r\n\t\t}\r\n\r\n\t\tfunction renderOneEvent(day, calendarEvent){\r\n\t\t\tconst dates = scheduler.templates.agenda_time(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\t\t\tconst selectedId = scheduler.getState().select_id;\r\n\t\t\tconst cls = scheduler.templates.event_class(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\t\t\tconst description = scheduler.templates.agenda_text(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\r\n\t\t\tlet style = \"\";\r\n\t\t\tif(calendarEvent.color || calendarEvent.textColor){\r\n\t\t\t\tconst bg = (calendarEvent.color ? (\"--dhx-scheduler-event-background:\" + calendarEvent.color + \";\") : \"\");\r\n\t\t\t\tconst color = (calendarEvent.textColor ? (\"--dhx-scheduler-event-color:\" + calendarEvent.textColor + \";\") : \"\");\r\n\t\t\t\tstyle = ` style=\"${bg}${color}\" `;\r\n\t\t\t}\r\n\r\n\t\t\treturn `
\r\n\t
\r\n\t
${dates}
\r\n\t
${description}
\r\n
`;\r\n\t\t}\r\n\t\r\n\t\tscheduler.agenda_view=function(mode){\r\n\t\t\tif (mode){\r\n\t\t\t\tscheduler._min_date = scheduler.config.agenda_start || scheduler.date.agenda_start(scheduler._date);\r\n\t\t\t\tscheduler._max_date = scheduler.config.agenda_end || scheduler.date.add_agenda(scheduler._min_date, 1);\r\n\t\t\t\tscheduler._cols = null;\r\n\t\t\t\tscheduler._colsS = null;\r\n\t\t\t\tscheduler._table_view = true;\r\n\r\n\t\t\t\tconst dateHeader = scheduler._getNavDateElement();\r\n\t\t\t\tdateHeader.innerHTML = scheduler.templates.agenda_date(scheduler._date);\r\n\t\t\t\t//agenda tab activated\r\n\t\t\t\tfill_agenda_tab();\r\n\t\t\t} else {\r\n\t\t\t\tscheduler._table_view = false;\r\n\t\t\t\t//agenda tab de-activated\r\n\t\t\t}\r\n\t\t};\r\n\t});\r\n\r\n\t// scheduler.attachEvent(\"onEventSelected\", function(id){\r\n\t// \tconst oldSelected = scheduler.$container.querySelectorAll(\".dhx_cal_agenda_event_line_selected\");\r\n\t// \toldSelected.forEach((el) => {\r\n\t// \t\tel.classList.remove(\"dhx_cal_agenda_event_line_selected\");\r\n\t// \t});\r\n\r\n\t// \tconst selected = scheduler.$container.querySelector(`[${scheduler.config.event_attribute}=\"${id}\"]`);\r\n\t// \tif(selected){\r\n\t// \t\tselected.classList.add(\"dhx_cal_agenda_event_line_selected\");\r\n\t// \t}\r\n\t// });\r\n\t\r\n\t\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.config.all_timed = \"short\";\r\n\tscheduler.config.all_timed_month = false;\r\n\r\n\tvar is_event_short = function (ev) {\r\n\t\tif(!((ev.end_date - ev.start_date)/(1000*60*60) >= 24)){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t// short event shouldn't disappear to multiday area during dnd-resize\r\n\t\tif(scheduler._drag_mode == \"resize\" && scheduler._drag_id == ev.id){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn \tfalse;\r\n\t};\r\n\r\n\t// copy of usual events and recurring instances;\r\n\t// regular copy causes problems with recurrings which have series event as a prototype\r\n\tscheduler._safe_copy = function(event){\r\n\t\tvar proto = null,\r\n\t\t\tcopy = scheduler._copy_event(event);\r\n\t\tif(event.event_pid){\r\n\t\t\tproto = scheduler.getEvent(event.event_pid);\r\n\t\t}\r\n\r\n\t\tif (proto && proto.isPrototypeOf(event)) {\r\n\t\t\tdelete copy.event_length;\r\n\t\t\tdelete copy.event_pid;\r\n\t\t\tdelete copy.rec_pattern;\r\n\t\t\tdelete copy.rec_type;\r\n\t\t}\r\n\r\n\t\treturn copy;\r\n\t};\r\n\r\n\tvar old_prerender_events_line = scheduler._pre_render_events_line;\r\n\tvar old_prerender_events_table = scheduler._pre_render_events_table;\r\n\r\n\tvar prerender_events = function (evs, hold) {\r\n\t\tif (!this._table_view) {\r\n\t\t\treturn old_prerender_events_line.call(this, evs, hold);\r\n\t\t}\r\n\r\n\t\treturn old_prerender_events_table.call(this, evs, hold);\r\n\t};\r\n\r\n\tscheduler._pre_render_events_line = scheduler._pre_render_events_table = function(evs, hold){\r\n\t\tif (!this.config.all_timed ||\r\n\t\t\t(this._table_view && this._mode != \"month\") ||\r\n\t\t\t(this._mode == \"month\" && !this.config.all_timed_month))\r\n\t\t\treturn prerender_events.call(this, evs, hold);\r\n\r\n\t\tfor (var i=0; i < evs.length; i++) {\r\n\t\t\tvar ev=evs[i];\r\n\r\n\t\t\tif (ev._timed)\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\tif (this.config.all_timed == \"short\") {\r\n\t\t\t\tif (!is_event_short(ev)) {\r\n\t\t\t\t\tif (this._mode != \"month\") {\r\n\t\t\t\t\t\tevs.splice(i--, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar ce = this._safe_copy(ev); // current event (event for one specific day) is copy of original with modified dates\r\n\t\t\tif(!ev._virtual){\r\n\t\t\t\tce._first_chunk = true;\r\n\t\t\t}else{\r\n\t\t\t\tce._first_chunk = false;\r\n\t\t\t}\r\n\t\t\tce._drag_resize = false;\r\n\t\t\tce._virtual = true;\r\n\t\t\tce.start_date = new Date(ce.start_date); // as lame copy doesn't copy date objects\r\n\r\n\t\t\tif (!isOvernightEvent(ev)) {\r\n\t\t\t\tce.end_date = new Date(ev.end_date);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tce.end_date = getNextDay(ce.start_date);\r\n\t\t\t\tif (this.config.last_hour != 24) { // if specific last_hour was set (e.g. 20)\r\n\t\t\t\t\tce.end_date = setDateTime(ce.start_date, this.config.last_hour);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar event_changed = false;\r\n\t\t\tif (ce.start_date < this._max_date && ce.end_date > this._min_date && ce.start_date < ce.end_date) {\r\n\t\t\t\tevs[i] = ce; // adding another event in collection\r\n\t\t\t\tevent_changed = true;\r\n\t\t\t}\r\n\t\t//\tif (ce.start_date > ce.end_date) {\r\n\t\t//\t\tevs.splice(i--,1);\r\n\t\t//\t}\r\n\r\n\t\t\tvar re = this._safe_copy(ev); // remaining event, copy of original with modified start_date (making range more narrow)\r\n\t\t\tre._virtual = true;\r\n\t\t\tre.end_date = new Date(re.end_date);\r\n\t\t\tif (re.start_date < this._min_date)\r\n\t\t\t\tre.start_date = setDateTime(this._min_date, this.config.first_hour);// as we are starting only with whole hours\r\n\t\t\telse\r\n\t\t\t\tre.start_date = setDateTime(getNextDay(ev.start_date), this.config.first_hour);\r\n\r\n\t\t\tif (re.start_date < this._max_date && re.start_date < re.end_date) {\r\n\t\t\t\tif (event_changed){\r\n\t\t\t\t\tevs.splice(i+1,0,re);//insert part\r\n\t\t\t\t}else {\r\n\t\t\t\t\tevs[i--] = re;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tre._last_chunk = false;\r\n\t\t\t}else{\r\n\t\t\t\tce._last_chunk = true;\r\n\t\t\t\tce._drag_resize = true;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t// in case of all_timed pre_render is not applied to the original event\r\n\t\t// so we need to force redraw in case of dnd\r\n\t\tvar redraw = (this._drag_mode == 'move')?false:hold;\r\n\t\treturn prerender_events.call(this, evs, redraw);\r\n\r\n\r\n\t\tfunction isOvernightEvent(ev){\r\n\t\t\tvar next_day = getNextDay(ev.start_date);\r\n\t\t\treturn (+ev.end_date > +next_day);\r\n\t\t}\r\n\t\tfunction getNextDay(date){\r\n\t\t\tvar next_day = scheduler.date.add(date, 1, \"day\");\r\n\t\t\tnext_day = scheduler.date.date_part(next_day);\r\n\t\t\treturn next_day;\r\n\t\t}\r\n\t\tfunction setDateTime(date, hours){\r\n\t\t\tvar val = scheduler.date.date_part(new Date(date));\r\n\t\t\tval.setHours(hours);\r\n\t\t\treturn val;\r\n\t\t}\r\n\t};\r\n\tvar old_get_visible_events = scheduler.get_visible_events;\r\n\tscheduler.get_visible_events = function(only_timed){\r\n\t\tif (!(this.config.all_timed && this.config.multi_day))\r\n\t\t\treturn old_get_visible_events.call(this, only_timed);\r\n\t\treturn old_get_visible_events.call(this, false); // only timed = false\r\n\t};\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function (old_mode, old_date, mode, date) {\r\n\t\tscheduler._allow_dnd = (mode == \"day\" || mode == \"week\" || scheduler.getView(mode));\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler._is_main_area_event = function(ev){\r\n\t\treturn !!(ev._timed || this.config.all_timed === true || (this.config.all_timed == \"short\" && is_event_short(ev)) );\r\n\t};\r\n\r\n\tvar oldUpdate = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id){\r\n\t\t// full redraw(update_render=true) messes events order while dnd.\r\n\t\t// individual redraw(update_render=false) of multiday event, which happens on select/unselect, expands event to full width of the cell and can be fixes only with full redraw.\r\n\t\t// so for now full redraw is always enabled for not-dnd updates\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tvar fullRedrawNeeded;\r\n\t\tvar initial;\r\n\t\tif(ev) {\r\n\t\t\tfullRedrawNeeded = (scheduler.config.all_timed && !(scheduler.isOneDayEvent(scheduler._events[id]) || scheduler.getState().drag_id));\r\n\t\t\tif (fullRedrawNeeded) {\r\n\t\t\t\tinitial = scheduler.config.update_render;\r\n\t\t\t\tscheduler.config.update_render = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\toldUpdate.apply(scheduler, arguments);\r\n\r\n\t\tif(ev) {\r\n\t\t\tif (fullRedrawNeeded) {\r\n\t\t\t\tscheduler.config.update_render = initial;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\r\nvar temp_section;\r\nvar before;\r\n\r\nscheduler.config.collision_limit = 1;\r\n\r\nfunction _setTempSection(event_id) { // for custom views (matrix, timeline, units)\r\n\tvar checked_mode = scheduler._get_section_view();\r\n\tif(checked_mode && event_id){\r\n\t\ttemp_section = scheduler.getEvent(event_id)[scheduler._get_section_property()];\r\n\t}\r\n}\r\n\r\nscheduler.attachEvent(\"onBeforeDrag\",function(id){\r\n\t_setTempSection(id);\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onBeforeLightbox\",function(id){\r\n\tvar ev = scheduler.getEvent(id);\r\n\tbefore = [ev.start_date, ev.end_date];\r\n\t_setTempSection(id);\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventChanged\",function(id){\r\n\tif (!id || !scheduler.getEvent(id)) return true;\r\n\tvar ev = scheduler.getEvent(id);\r\n\tif (!scheduler.checkCollision(ev)){\r\n\t\tif (!before) return false;\r\n\t\tev.start_date = before[0];\r\n\t\tev.end_date = before[1];\r\n\t\tev._timed=this.isOneDayEvent(ev);\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onBeforeEventChanged\",function(ev,e,is_new){\r\n\treturn scheduler.checkCollision(ev);\r\n});\r\nscheduler.attachEvent(\"onEventAdded\",function(id,ev) {\r\n\tvar result = scheduler.checkCollision(ev);\r\n\tif (!result)\r\n\t\tscheduler.deleteEvent(id);\r\n});\r\nscheduler.attachEvent(\"onEventSave\",function(id, edited_ev, is_new){\r\n\tedited_ev = scheduler._lame_clone(edited_ev);\r\n\tedited_ev.id = id;\r\n\r\n\t//lightbox may not have 'time' section\r\n\tif(!(edited_ev.start_date && edited_ev.end_date)){\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tedited_ev.start_date = new Date(ev.start_date);\r\n\t\tedited_ev.end_date = new Date(ev.end_date);\r\n\t}\r\n\r\n\tif(edited_ev.rec_type){\r\n\t\tscheduler._roll_back_dates(edited_ev);\r\n\t}\r\n\treturn scheduler.checkCollision(edited_ev); // in case user creates event on one date but then edited it another\r\n});\r\n\r\nscheduler._check_sections_collision = function(first, second){\r\n\tvar map_to = scheduler._get_section_property();\r\n\tif (first[map_to] == second[map_to] && first.id != second.id)\r\n\t\treturn true;\r\n\treturn false;\r\n};\r\n\r\nscheduler.checkCollision = function(ev) {\r\n\tvar evs = [];\r\n\tvar collision_limit = scheduler.config.collision_limit;\r\n\r\n\tif (ev.rec_type) {\r\n\t\tvar evs_dates = scheduler.getRecDates(ev);\r\n\t\tfor(var k=0; k= collision_limit) {\r\n\r\n\t\t\tsingle = false;\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\tif ( evs.length >= collision_limit )\r\n\t\t\tsingle = false;\r\n\t}\r\n\tif (!single) {\r\n\t\tvar res = !scheduler.callEvent(\"onEventCollision\",[ev,evs]);\r\n\t\tif (!res) {\r\n\t\t\tev[map_to] = temp_section||ev[map_to]; // from _setTempSection for custom views\r\n\t\t}\r\n\t\treturn res;\r\n\t}\r\n\treturn single;\r\n\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.config.container_autoresize = true;\r\n\tscheduler.config.month_day_min_height = 90;\r\n\tscheduler.config.min_grid_size = 25;\r\n\tscheduler.config.min_map_size = 400;\r\n\r\n\tvar old_pre_render_event = scheduler._pre_render_events;\r\n\r\n\t//need for temporary disabling without modifying public config\r\n\tvar active = true;\r\n\tvar total_height = 0;\r\n\tvar multiday_height = 0;\r\n\r\n\tscheduler._pre_render_events = function(evs, hold) {\r\n\t\tif (!(scheduler.config.container_autoresize && active)) {\r\n\t\t\treturn old_pre_render_event.apply(this, arguments);\r\n\t\t}\r\n\r\n\t\tvar hb = this.xy.bar_height;\r\n\t\tvar h_old = this._colsS.heights;\r\n\t\tvar h = this._colsS.heights = [0, 0, 0, 0, 0, 0, 0];\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tif (!this._table_view)\r\n\t\t\tevs = this._pre_render_events_line(evs, hold); //ignore long events for now\r\n\t\telse\r\n\t\t\tevs = this._pre_render_events_table(evs, hold);\r\n\r\n\t\tif (this._table_view) {\r\n\t\t\tif (hold){\r\n\t\t\t\tthis._colsS.heights = h_old;\r\n\t\t\t} else {\r\n\t\t\t\tvar evl = data.firstChild;\r\n\t\t\t\tconst rows = evl.querySelectorAll(\".dhx_cal_month_row\");\r\n\t\t\t\tif (rows) {\r\n\t\t\t\t\tfor (var i = 0; i < rows.length; i++) {\r\n\t\t\t\t\t\th[i]++;\r\n\r\n\t\t\t\t\t\tif ((h[i]) * hb > this._colsS.height - this.xy.month_head_height) { // 22 - height of cell's header\r\n\t\t\t\t\t\t\t//we have overflow, update heights\r\n\t\t\t\t\t\t\tvar cells = rows[i].querySelectorAll(\".dhx_cal_month_cell\");\r\n\r\n\t\t\t\t\t\t\tvar cHeight = this._colsS.height - this.xy.month_head_height;\r\n\t\t\t\t\t\t\tif(this.config.max_month_events*1 !== this.config.max_month_events || h[i] <= this.config.max_month_events){\r\n\t\t\t\t\t\t\t\tcHeight = h[i] * hb;\r\n\t\t\t\t\t\t\t}else if( (this.config.max_month_events + 1) * hb > this._colsS.height - this.xy.month_head_height){\r\n\t\t\t\t\t\t\t\tcHeight = (this.config.max_month_events + 1) * hb;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\trows[i].style.height = (cHeight + this.xy.month_head_height) + \"px\";\r\n\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\tfor (var j = 0; j < cells.length; j++) {\r\n\t\t\t\t\t\t\t\tcells[j].childNodes[1].style.height = cHeight + \"px\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\th[i] = (h[i - 1] || 0) + cells[0].offsetHeight;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\th[i] = (h[i - 1] || 0) + rows[i].querySelectorAll(\".dhx_cal_month_cell\")[0].offsetHeight;\r\n\t\t\t\t\t}\r\n\t\t\t\t\th.unshift(0);\r\n\t\t\t\t\tif (evl.parentNode.offsetHeight < evl.parentNode.scrollHeight && !evl._h_fix) {\r\n\t\t\t\t\t\t//we have v-scroll, decrease last day cell\r\n\r\n\t\t\t\t\t\t// NO CHECK SHOULD BE MADE ON VERTICAL SCROLL\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (!evs.length && this._els[\"dhx_multi_day\"][0].style.visibility == \"visible\")\r\n\t\t\t\t\t\th[0] = -1;\r\n\t\t\t\t\tif (evs.length || h[0] == -1) {\r\n\t\t\t\t\t\t//shift days to have space for multiday events\r\n\t\t\t\t\t\t//var childs = evl.parentNode.childNodes;\r\n\t\t\t\t\t\tvar dh = ((h[0] + 1) * hb + 1); // +1 so multiday events would have 2px from top and 2px from bottom by default\r\n\t\t\t\t\t\tif(multiday_height != dh + 1) {\r\n\t\t\t\t\t\t\tthis._obj.style.height = (total_height - multiday_height + dh - 1) + \"px\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tdh += \"px\";\r\n\t\t\t\t\t\tconst navHeight = this._els[\"dhx_cal_navline\"][0].offsetHeight;\r\n\t\t\t\t\t\tconst headerHeight = this._els[\"dhx_cal_header\"][0].offsetHeight;\r\n\t\t\t\t\t\tdata.style.height = (this._obj.offsetHeight - navHeight - headerHeight - (this.xy.margin_top || 0)) + 'px';\r\n\t\t\t\t\t\tvar last = this._els[\"dhx_multi_day\"][0];\r\n\t\t\t\t\t\tlast.style.height = dh;\r\n\t\t\t\t\t\tlast.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\t\tlast = this._els[\"dhx_multi_day\"][1];\r\n\t\t\t\t\t\tlast.style.height = dh;\r\n\t\t\t\t\t\tlast.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\t\tif(last.style.visibility == \"hidden\"){\r\n\t\t\t\t\t\t\tlast.style.display = \"none\";\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tlast.style.display = \"\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tlast.className = h[0] ? \"dhx_multi_day_icon\" : \"dhx_multi_day_icon_small\";\r\n\t\t\t\t\t\tthis._dy_shift = (h[0] + 1) * hb;\r\n\t\t\t\t\t\th[0] = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn evs;\r\n\t};\r\n\r\n\tvar checked_divs = [\"dhx_cal_navline\", \"dhx_cal_header\", \"dhx_multi_day\", \"dhx_cal_data\"];\r\n\tvar updateContainterHeight = function(is_repaint) {\r\n\t\ttotal_height = 0;\r\n\t\tfor (var i = 0; i < checked_divs.length; i++) {\r\n\r\n\t\t\tvar className = checked_divs[i];\r\n\t\t\tvar checked_div = (scheduler._els[className]) ? scheduler._els[className][0] : null;\r\n\t\t\tvar height = 0;\r\n\t\t\tswitch (className) {\r\n\t\t\t\tcase \"dhx_cal_navline\":\r\n\t\t\t\tcase \"dhx_cal_header\":\r\n\t\t\t\t\theight = checked_div.offsetHeight;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"dhx_multi_day\":\r\n\t\t\t\t\theight = (checked_div) ? checked_div.offsetHeight - 1 : 0;\r\n\t\t\t\t\tmultiday_height = height;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"dhx_cal_data\":\r\n\t\t\t\t\tvar mode = scheduler.getState().mode;\r\n\r\n\t\t\t\t\tif(checked_div.childNodes[1] && mode != \"month\") {\r\n\t\t\t\t\t\tlet maxHeight = 0;\r\n\t\t\t\t\t\tfor(let i = 0; i < checked_div.childNodes.length; i++){\r\n\t\t\t\t\t\t\tif(checked_div.childNodes[i].offsetHeight > maxHeight){\r\n\t\t\t\t\t\t\t\tmaxHeight = checked_div.childNodes[i].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\theight = maxHeight;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\theight = Math.max(checked_div.offsetHeight - 1, checked_div.scrollHeight);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (mode == \"month\") {\r\n\t\t\t\t\t\tif (scheduler.config.month_day_min_height && !is_repaint) {\r\n\t\t\t\t\t\t\tvar rows_length = checked_div.querySelectorAll(\".dhx_cal_month_row\").length;\r\n\t\t\t\t\t\t\theight = rows_length * scheduler.config.month_day_min_height;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (is_repaint) {\r\n\t\t\t\t\t\t\tchecked_div.style.height = height + \"px\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (mode == \"year\"){\r\n\t\t\t\t\t\theight = 190 * scheduler.config.year_y;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(mode == \"agenda\"){\r\n\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\tif(checked_div.childNodes && checked_div.childNodes.length){\r\n\t\t\t\t\t\t\tfor(var j = 0; j < checked_div.childNodes.length; j++){\r\n\t\t\t\t\t\t\t\theight += checked_div.childNodes[j].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(height + 2 < scheduler.config.min_grid_size){\r\n\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (mode == \"week_agenda\"){\r\n\t\t\t\t\t\tvar min_height = scheduler.xy.week_agenda_scale_height + scheduler.config.min_grid_size,\r\n\t\t\t\t\t\t\tcur_height;\r\n\r\n\t\t\t\t\t\tvar column;\r\n\t\t\t\t\t\tfor(var k = 0; k < checked_div.childNodes.length; k++){\r\n\t\t\t\t\t\t\tcolumn = checked_div.childNodes[k];\r\n\t\t\t\t\t\t\tfor(var j = 0; j < column.childNodes.length; j++) {\r\n\t\t\t\t\t\t\t\tvar innerHeight = 0,\r\n\t\t\t\t\t\t\t\t\teventsContainer = column.childNodes[j].childNodes[1];\r\n\r\n\t\t\t\t\t\t\t\tfor(var g =0; g < eventsContainer.childNodes.length; g++){\r\n\t\t\t\t\t\t\t\t\tinnerHeight += eventsContainer.childNodes[g].offsetHeight;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tcur_height = innerHeight + scheduler.xy.week_agenda_scale_height;\r\n\t\t\t\t\t\t\t\tcur_height = (k == 1 && (j == 2 || j == 3)) ? cur_height * 2 : cur_height; // for last two cells;\r\n\r\n\t\t\t\t\t\t\t\tif (cur_height > min_height) {\r\n\t\t\t\t\t\t\t\t\tmin_height = cur_height;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\theight = min_height * 3;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(mode == \"map\") {\r\n\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\tvar evs = checked_div.querySelectorAll(\".dhx_map_line\");\r\n\r\n\t\t\t\t\t\tfor (var j = 0; j < evs.length; j++) {\r\n\t\t\t\t\t\t\theight += evs[j].offsetHeight;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (height + 2 < scheduler.config.min_map_size) {\r\n\t\t\t\t\t\t\theight = scheduler.config.min_map_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(scheduler._gridView) {\r\n\t\t\t\t\t\theight = 0;\r\n\r\n\t\t\t\t\t\tif (checked_div.childNodes[1].childNodes[0].childNodes && checked_div.childNodes[1].childNodes[0].childNodes.length) {\r\n\t\t\t\t\t\t\tvar evs = checked_div.childNodes[1].childNodes[0].childNodes[0].childNodes;\r\n\r\n\t\t\t\t\t\t\tfor (var j = 0; j < evs.length; j++) {\r\n\t\t\t\t\t\t\t\theight += evs[j].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\theight += 2;\r\n\r\n\t\t\t\t\t\t\tif(height < scheduler.config.min_grid_size){\r\n\t\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (scheduler.matrix && scheduler.matrix[mode]) {\r\n\t\t\t\t\t\tif (is_repaint) {\r\n\t\t\t\t\t\t\theight += 0;\r\n\t\t\t\t\t\t\tchecked_div.style.height = height + \"px\";\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\t\tvar cfg = scheduler.matrix[mode];\r\n\t\t\t\t\t\t\tvar rows = cfg.y_unit;\r\n\t\t\t\t\t\t\tfor(var r=0; r < rows.length; r++){\r\n\t\t\t\t\t\t\t\theight += cfg.getSectionHeight(rows[r].key);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t// Check and add extra height to avoid events hiding by the horizontal scrollbar\r\n\t\t\t\t\t\t\tif(scheduler.$container.clientWidth != scheduler.$container.scrollWidth){\r\n\t\t\t\t\t\t\t\theight += getScrollSize();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\theight -= 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (mode == \"day\" || mode == \"week\" || (scheduler._props && scheduler._props[mode])) {\r\n\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\theight += 1;\r\n\t\t\ttotal_height += height;\r\n\t\t}\r\n\t\tscheduler._obj.style.height = (total_height) + \"px\";\r\n\r\n\t\tif (!is_repaint)\r\n\t\t\tscheduler.updateView();\r\n\t};\r\n\r\n\tfunction callUpdate(){\r\n\t\tactive = false;\r\n\t\tscheduler.callEvent(\"onAfterSchedulerResize\", []);\r\n\t\tactive = true;\r\n\t}\r\n\r\n\tvar conditionalUpdateContainerHeight = function() {\r\n\t\tif(!(scheduler.config.container_autoresize && active))\r\n\t\t\treturn true;\r\n\r\n\t\tvar mode = scheduler.getState().mode;\r\n\r\n\t\tif(!mode) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tvar asyncRepaint = window.requestAnimationFrame || window.setTimeout;\r\n\t\tvar scrollTop = document.documentElement.scrollTop;\r\n\r\n\t\tasyncRepaint(function() {\r\n\t\t\tif(scheduler.$destroyed || !scheduler.$initialized){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tupdateContainterHeight();\r\n\t\t});\r\n\r\n\t\tif ( (scheduler.matrix && scheduler.matrix[mode]) || mode == \"month\") {\r\n\t\t\tasyncRepaint(function() {\r\n\t\t\t\tif(scheduler.$destroyed || !scheduler.$initialized){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tupdateContainterHeight(true);\r\n\t\t\t\tdocument.documentElement.scrollTop = scrollTop;\r\n\t\t\t\tcallUpdate();\r\n\t\t\t}, 1);\r\n\t\t}else{\r\n\t\t\tcallUpdate();\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function(){\r\n\t\tvar autosizeEnabled = scheduler.config.container_autoresize;\r\n\t\tif(!scheduler.xy.$original_scroll_width){\r\n\t\t\tscheduler.xy.$original_scroll_width = scheduler.xy.scroll_width;\r\n\t\t}\r\n\r\n\t\tscheduler.xy.scroll_width = autosizeEnabled ? 0 : scheduler.xy.$original_scroll_width;\r\n\r\n\t\tif(scheduler.matrix){\r\n\t\t\tfor(var i in scheduler.matrix){\r\n\t\t\t\tvar timeline = scheduler.matrix[i];\r\n\t\t\t\tif(!timeline.$original_section_autoheight){\r\n\t\t\t\t\ttimeline.$original_section_autoheight = timeline.section_autoheight;\r\n\t\t\t\t}\r\n\t\t\t\tif(autosizeEnabled){\r\n\t\t\t\t\ttimeline.section_autoheight = false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\ttimeline.section_autoheight = timeline.$original_section_autoheight;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onXLE\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventChanged\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventCreated\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventAdded\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventDeleted\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onAfterSchedulerResize\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onClearAll\", conditionalUpdateContainerHeight);\r\n\r\n\t//disable container autoresize when expanded\r\n\tscheduler.attachEvent(\"onBeforeExpand\", function(){\r\n\t\tactive = false;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeCollapse\", function(){\r\n\t\tactive = true;\r\n\t\treturn true;\r\n\t});\r\n\t// helper function\r\n\tfunction getScrollSize() {\r\n\t\tvar div = document.createElement(\"div\");\r\n\t\tdiv.style.cssText = \"visibility:hidden;position:absolute;left:-1000px;width:100px;padding:0px;margin:0px;height:110px;min-height:100px;overflow-y:scroll;\";\r\n\r\n\t\tdocument.body.appendChild(div);\r\n\t\tvar size = div.offsetWidth - div.clientWidth;\r\n\t\tdocument.body.removeChild(div);\r\n\t\treturn size;\r\n\t}\r\n\r\n\r\n}","export default function(scheduler){\r\n\tfunction setCookie(name,cookie_param,value) {\r\n\t\tvar str = name + \"=\" + value + (cookie_param?(\"; \"+cookie_param):\"\");\r\n\t\tdocument.cookie = str;\r\n\t}\r\n\tfunction getCookie(name) {\r\n\t\tvar search = name + \"=\";\r\n\t\tif (document.cookie.length > 0) {\r\n\t\t\tvar offset = document.cookie.indexOf(search);\r\n\t\t\tif (offset != -1) {\r\n\t\t\t\toffset += search.length;\r\n\t\t\t\tvar end = document.cookie.indexOf(\";\", offset);\r\n\t\t\t\tif (end == -1)\r\n\t\t\t\t\tend = document.cookie.length;\r\n\t\t\t\treturn document.cookie.substring(offset, end);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}\r\n\r\n\tfunction getCookieName(scheduler) {\r\n\t\treturn (scheduler._obj.id || \"scheduler\") + \"_settings\";\r\n\t}\r\n\r\n\tvar first = true;\r\n\tscheduler.attachEvent(\"onBeforeViewChange\",function(oldMode,oldDate,mode,date){\r\n\t\t// if Url plugin is enabled - explicit url values should have more priority than cookies\r\n\t\tif (first && scheduler._get_url_nav){\r\n\t\t\tvar urlNavigationPlugin = scheduler._get_url_nav();\r\n\t\t\tif(urlNavigationPlugin.date || urlNavigationPlugin.mode || urlNavigationPlugin.event){\r\n\t\t\t\tfirst = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar cookie = getCookieName(scheduler);\r\n\r\n\t\tif (first){\r\n\t\t\tfirst = false;\r\n\t\t\tvar schedulerCookie = getCookie(cookie);\r\n\t\t\tif (schedulerCookie){\r\n\r\n\t\t\t\tif(!scheduler._min_date){\r\n\t\t\t\t\t//otherwise scheduler will have incorrect date until timeout\r\n\t\t\t\t\t//it can cause js error with 'onMouseMove' handler of key_nav.js\r\n\t\t\t\t\tscheduler._min_date = date;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tschedulerCookie = unescape(schedulerCookie).split(\"@\");\r\n\t\t\t\tschedulerCookie[0] = this._helpers.parseDate(schedulerCookie[0]);\r\n\t\t\t\tvar view = this.isViewExists(schedulerCookie[1]) ? schedulerCookie[1] : mode,\r\n\t\t\t\t\tdate = !isNaN(+schedulerCookie[0]) ? schedulerCookie[0] : date;\r\n\r\n\t\t\t\twindow.setTimeout(function(){\r\n\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tscheduler.setCurrentView(date,view);\r\n\t\t\t\t},1);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", function (newMode , newDate){\r\n\t\tvar cookie = getCookieName(scheduler);\r\n\t\tvar text = escape(this._helpers.formatDate(newDate)+\"@\"+(newMode));\r\n\t\tsetCookie(cookie,\"expires=Sun, 31 Jan 9999 22:00:00 GMT\",text);\r\n\t});\r\n\r\n\t// As we are blocking first render above there could be a problem in case of dynamic loading and rendering of visible data in general ('from'/'to' won't be defined)\r\n\tvar old_load = scheduler._load;\r\n\tscheduler._load = function() {\r\n\t\tvar args = arguments;\r\n\r\n\t\tif (!scheduler._date) {\r\n\t\t\tvar that = this;\r\n\t\t\twindow.setTimeout(function() {\r\n\t\t\t\told_load.apply(that, args);\r\n\t\t\t},1);\r\n\t\t} else {\r\n\t\t\told_load.apply(this, args);\r\n\t\t}\r\n\t};\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Day Timeline\", scheduler.assert);\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Drag Between\", scheduler.assert);\r\n}","export default function(scheduler){\r\n/* global dhtmlXCombo */\r\nscheduler.form_blocks['combo']={\r\n\trender:function(sns) {\r\n\t\tif (!sns.cached_options)\r\n\t\t\tsns.cached_options = {};\r\n\t\tvar res = '';\r\n\t\tres += \"
\";\r\n\t\treturn res;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\t(function(){\r\n\t\t\tresetCombo();\r\n\t\t\tvar id = scheduler.attachEvent(\"onAfterLightbox\",function(){\r\n\t\t\t\t// otherwise destructor will never be called after form reset(e.g. in readonly event mode)\r\n\t\t\t\tresetCombo();\r\n\t\t\t\tscheduler.detachEvent(id);\r\n\t\t\t});\r\n\t\t\tfunction resetCombo(){\r\n\t\t\t\tif(node._combo && node._combo.DOMParent) {\r\n\t\t\t\t\tvar combo = node._combo;\r\n\t\t\t\t\tif(combo.unload){\r\n\t\t\t\t\t\tcombo.unload();\r\n\t\t\t\t\t}else if(combo.destructor){\r\n\t\t\t\t\t\tcombo.destructor();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// dhtmlxCombo 4.1.0 bug\r\n\t\t\t\t\tcombo.DOMParent = combo.DOMelem = null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})();\r\n\t\twindow.dhx_globalImgPath = config.image_path||'/';\r\n\t\tnode._combo = new dhtmlXCombo(node, config.name, node.offsetWidth-8);\r\n\t\tif (config.onchange)\r\n\t\t\tnode._combo.attachEvent(\"onChange\", config.onchange);\r\n\r\n\t\tif (config.options_height)\r\n\t\t\tnode._combo.setOptionHeight(config.options_height);\r\n\t\tvar combo = node._combo;\r\n\t\tcombo.enableFilteringMode(config.filtering, config.script_path||null, !!config.cache);\r\n\r\n\t\tif (!config.script_path) { // script-side filtration is used\r\n\t\t\tvar all_options = [];\r\n\t\t\tfor (var i = 0; i < config.options.length; i++) {\r\n\t\t\t\tvar option = config.options[i];\r\n\t\t\t\tvar single_option = [\r\n\t\t\t\t\toption.key,\r\n\t\t\t\t\toption.label,\r\n\t\t\t\t\toption.css\r\n\t\t\t\t];\r\n\t\t\t\tall_options.push(single_option);\r\n\t\t\t}\r\n\t\t\tcombo.addOption(all_options);\r\n\t\t\tif (ev[config.map_to]) {\r\n\t\t\t\tvar index = combo.getIndexByValue(ev[config.map_to]);\r\n\t\t\t\tcombo.selectOption(index);\r\n\t\t\t}\r\n\t\t} else { // server-side filtration is used\r\n\t\t\tvar selected_id = ev[config.map_to];\r\n\t\t\tif (selected_id) {\r\n\t\t\t\tif (config.cached_options[selected_id]) {\r\n\t\t\t\t\tcombo.addOption(selected_id, config.cached_options[selected_id]);\r\n\t\t\t\t\tcombo.disable(1);\r\n\t\t\t\t\tcombo.selectOption(0);\r\n\t\t\t\t\tcombo.disable(0);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tscheduler.ajax.get(config.script_path+\"?id=\"+selected_id+\"&uid=\"+scheduler.uid(), function(result){\r\n\t\t\t\t\t\tvar responseText = result.xmlDoc.responseText;\r\n\t\t\t\t\t\tvar label;\r\n\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\tvar res = JSON.parse(responseText);\r\n\t\t\t\t\t\t\tlabel = res.options[0].text;\r\n\t\t\t\t\t\t}catch(e){\r\n\t\t\t\t\t\t\tvar option = scheduler.ajax.xpath(\"//option\", result.xmlDoc)[0];\r\n\t\t\t\t\t\t\tlabel = option.childNodes[0].nodeValue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tconfig.cached_options[selected_id] = label;\r\n\t\t\t\t\t\tcombo.addOption(selected_id, label);\r\n\t\t\t\t\t\tcombo.disable(1);\r\n\t\t\t\t\t\tcombo.selectOption(0);\r\n\t\t\t\t\t\tcombo.disable(0);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tcombo.setComboValue(\"\");\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config) {\r\n\t\tvar selected_id = node._combo.getSelectedValue(); // value = key\r\n\t\tif (config.script_path) {\r\n\t\t\tconfig.cached_options[selected_id] = node._combo.getSelectedText();\r\n\t\t}\r\n\t\treturn selected_id;\r\n\t},\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\nscheduler.form_blocks['radio']={\r\n\trender:function(sns) {\r\n\t\tvar res = '';\r\n\t\tres += `
`;\r\n\t\tfor (var i=0; i\"+\" \"+sns.options[i].label+\"\";\r\n\t\t}\r\n\t\tres += \"
\";\r\n\r\n\t\treturn res;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\tvar radiobuttons = node.getElementsByTagName('input');\r\n\t\tfor (var i = 0; i < radiobuttons.length; i++) {\r\n\t\t\tradiobuttons[i].checked = false;\r\n\t\t\tvar checked_value = ev[config.map_to]||value;\r\n\t\t\tif (radiobuttons[i].value == checked_value) {\r\n\t\t\t\tradiobuttons[i].checked = true;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tvar radiobuttons = node.getElementsByTagName('input');\r\n\t\tfor(var i=0; i
';\r\n\t\telse\r\n\t\t\treturn '';\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\tnode=scheduler._lightbox.querySelector(`#${config.id}`);\r\n\t\tvar id = scheduler.uid();\r\n\t\tvar isChecked = (typeof config.checked_value != \"undefined\") ? value == config.checked_value : !!value;\r\n\t\tnode.className += \" dhx_cal_checkbox\";\r\n\t\tvar check_html = \"\";\r\n\t\tvar label_html = \"\";\r\n\t\tif (scheduler.config.wide_form){\r\n\t\t\tnode.innerHTML = label_html;\r\n\t\t\tnode.nextSibling.innerHTML=check_html;\r\n\t\t} else\r\n\t\t\tnode.innerHTML=check_html+label_html;\r\n\r\n\t\tif (config.handler) {\r\n\t\t\tvar checkbox = node.getElementsByTagName('input')[0];\r\n\t\t\tif(checkbox.$_eventAttached){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tcheckbox.$_eventAttached = true;\r\n\t\t\tscheduler.event(checkbox, \"click\", config.handler);\r\n\t\t\t//checkbox.onclick = config.handler;\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tnode=scheduler._lightbox.querySelector(`#${config.id}`);\r\n\t\tvar checkbox = node.getElementsByTagName('input')[0]; // moved to the header\r\n\t\tif (!checkbox)\r\n\t\t\tcheckbox = node.nextSibling.getElementsByTagName('input')[0];\r\n\t\treturn (checkbox.checked)?(config.checked_value||true):(config.unchecked_value||false);\r\n\t},\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.ext.fullscreen = {\r\n\ttoggleIcon: null\r\n};\r\n\r\nscheduler.expand = function() {\r\n\tif(!scheduler.callEvent(\"onBeforeExpand\", []))\r\n\t\treturn;\r\n\tvar t = scheduler._obj;\r\n\tdo {\r\n\t\tt._position = t.style.position || \"\";\r\n\t\tt.style.position = \"static\";\r\n\t} while ((t = t.parentNode) && t.style);\r\n\tt = scheduler._obj;\r\n\tt.style.position = \"absolute\";\r\n\tt._width = t.style.width;\r\n\tt._height = t.style.height;\r\n\tt.style.width = t.style.height = \"100%\";\r\n\tt.style.top = t.style.left = \"0px\";\r\n\r\n\tvar top = document.body;\r\n\ttop.scrollTop = 0;\r\n\r\n\ttop = top.parentNode;\r\n\tif (top)\r\n\t\ttop.scrollTop = 0;\r\n\tdocument.body._overflow = document.body.style.overflow || \"\";\r\n\tdocument.body.style.overflow = \"hidden\";\r\n\tscheduler._maximize();\r\n\tscheduler.callEvent(\"onExpand\", []);\r\n};\r\nscheduler.collapse = function() {\r\n\tif(!scheduler.callEvent(\"onBeforeCollapse\", []))\r\n\t\treturn;\r\n\tvar t = scheduler._obj;\r\n\tdo {\r\n\t\tt.style.position = t._position;\r\n\t} while ((t = t.parentNode) && t.style);\r\n\tt = scheduler._obj;\r\n\tt.style.width = t._width;\r\n\tt.style.height = t._height;\r\n\tdocument.body.style.overflow = document.body._overflow;\r\n\tscheduler._maximize();\r\n\tscheduler.callEvent(\"onCollapse\", []);\r\n};\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar t = document.createElement(\"div\");\r\n\tt.className = \"dhx_expand_icon\";\r\n\tscheduler.ext.fullscreen.toggleIcon = t;\r\n\tt.innerHTML = `\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t`;\r\n\tscheduler._obj.appendChild(t);\r\n\tscheduler.event(t, \"click\", function() {\r\n\t\tif (!scheduler.expanded)\r\n\t\t\tscheduler.expand(); else\r\n\t\t\tscheduler.collapse();\r\n\t});\r\n});\r\nscheduler._maximize = function() {\r\n\tthis.expanded = !this.expanded;\r\n\tif(this.expanded){\r\n\t\tthis.ext.fullscreen.toggleIcon.classList.add(\"dhx_expand_icon--expanded\");\r\n\t\t\r\n\t}else{\r\n\t\tthis.ext.fullscreen.toggleIcon.classList.remove(\"dhx_expand_icon--expanded\");\r\n\t}\r\n\t\r\n\t//scheduler.ext.fullscreen.toggleIcon.style.backgroundPosition = \"0 \" + (this.expanded ? \"0\" : \"18\") + \"px\";\r\n\r\n\tvar directions = ['left', 'top'];\r\n\tfor (var i = 0; i < directions.length; i++) {\r\n\t\t//var margin = scheduler.xy['margin_' + directions[i]];\r\n\t\tvar prev_margin = scheduler['_prev_margin_' + directions[i]];\r\n\t\tif (scheduler.xy['margin_' + directions[i]]) {\r\n\t\t\tscheduler['_prev_margin_' + directions[i]] = scheduler.xy['margin_' + directions[i]];\r\n\t\t\tscheduler.xy['margin_' + directions[i]] = 0;\r\n\t\t} else {\r\n\t\t\tif (prev_margin) {\r\n\t\t\t\tscheduler.xy['margin_' + directions[i]] = scheduler['_prev_margin_' + directions[i]];\r\n\t\t\t\tdelete scheduler['_prev_margin_' + directions[i]];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler.setCurrentView();\r\n};\r\n\r\n\r\n}\r\n","export default function(scheduler){\r\n\r\n\r\n(function(){\r\n\r\nfunction defaults(obj, std){\r\n\tfor (var key in std)\r\n\t\tif (!obj[key])\r\n\t\t\tobj[key] = std[key];\r\n\treturn obj;\r\n}\r\n\r\nfunction getElementSizes(element, scheduler) {\r\n\tvar sizes = {};\r\n\telement = scheduler._els[element];\r\n\tif (element && element[0]) {\r\n\t\tsizes.x = element[0].scrollWidth;\r\n\t\tsizes.y = element[0].scrollHeight;\r\n\t} else {\r\n\t\tsizes.x = 0;\r\n\t\tsizes.y = 0;\r\n\t}\r\n\treturn sizes;\r\n}\r\n\r\n//compatibility for new versions of scheduler\r\nif(!window.dhtmlxAjax){\r\n\twindow.dhtmlxAjax = {\r\n\t\tpost: function(url, data, callback){\r\n\t\t\treturn window.dhx4.ajax.post(url, data, callback);\r\n\t\t},\r\n\t\tget: function(url, callback){\r\n\t\t\treturn window.ajax.get(url, callback);\r\n\t\t}\r\n\t};\r\n}\r\n\r\nfunction add_export_methods(scheduler){\r\n\r\n\tscheduler.exportToPDF = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.pdf\",\r\n\t\t\tformat:\"A4\",\r\n\t\t\torientation:\"landscape\",\r\n\t\t\tdpi:96,\r\n\t\t\tzoom:1,\r\n\t\t\trtl: scheduler.config.rtl\r\n\t\t});\r\n\t\tconfig.html = this._export_html(config);\r\n\t\tconfig.mode = this.getState().mode;\r\n\t\tthis._send_to_export(config, \"pdf\");\r\n\t};\r\n\r\n\tscheduler.exportToPNG = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.png\",\r\n\t\t\tformat:\"A4\",\r\n\t\t\torientation:\"landscape\",\r\n\t\t\tdpi:96,\r\n\t\t\tzoom:1,\r\n\t\t\trtl: scheduler.config.rtl\r\n\t\t});\r\n\t\tconfig.html = this._export_html(config);\r\n\t\tconfig.mode = this.getState().mode;\r\n\t\tthis._send_to_export(config, \"png\");\r\n\t};\r\n\r\n\tscheduler.exportToICal = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.ical\",\r\n\t\t\tdata:this._serialize_plain(null, config)\r\n\t\t});\r\n\t\tthis._send_to_export(config, \"ical\");\r\n\t};\r\n\r\n\tscheduler.exportToExcel = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.xlsx\",\r\n\t\t\ttitle:\"Events\",\r\n\t\t\tdata:this._serialize_plain( this.templates.xml_format, config),\r\n\t\t\tcolumns:this._serialize_columns()\r\n\t\t});\r\n\t\tthis._send_to_export(config, \"excel\");\r\n\t};\r\n\r\n\tscheduler._ajax_to_export = function(data, type, callback){\r\n\t\tdelete data.callback;\r\n\t\tvar url = data.server || \"https://export.dhtmlx.com/scheduler\";\r\n\r\n\t\twindow.dhtmlxAjax.post(url,\r\n\t\t\t\"type=\"+type+\"&store=1&data=\"+encodeURIComponent(JSON.stringify(data)),\r\n\t\t\tfunction(loader){\r\n\t\t\t\tvar fail = loader.xmlDoc.status > 400;\r\n\t\t\t\tvar info = null;\r\n\r\n\t\t\t\tif (!fail){\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\tinfo = JSON.parse(loader.xmlDoc.responseText);\r\n\t\t\t\t\t}catch(e){}\r\n\t\t\t\t}\r\n\t\t\t\tcallback(info);\r\n\t\t\t}\r\n\t\t);\r\n\t};\r\n\r\n\tscheduler._plain_export_copy = function(source, format){\r\n\t\tvar target = {};\r\n\t\tfor (var key in source)\r\n\t\t\ttarget[key] = source[key];\r\n\r\n\t\ttarget.start_date = format(target.start_date);\r\n\t\ttarget.end_date = format(target.end_date);\r\n\t\ttarget.$text = this.templates.event_text(source.start_date, source.end_date, source);\r\n\r\n\t\treturn target;\r\n\t};\r\n\r\n\tscheduler._serialize_plain = function(format, config){\r\n\t\tformat = format || scheduler.date.date_to_str(\"%Y%m%dT%H%i%s\", true);\r\n\r\n\t\tvar events;\r\n\t\tif (config && config.start && config.end)\r\n\t\t\tevents = scheduler.getEvents(config.start, config.end);\r\n\t\telse\r\n\t\t\tevents = scheduler.getEvents();\r\n\r\n\t\tvar data = [];\r\n\t\tfor (var i = 0; i< events.length; i++)\r\n\t\t\tdata[i] = this._plain_export_copy(events[i], format);\r\n\r\n\t\treturn data;\r\n\t};\r\n\r\n\tscheduler._serialize_columns = function(){\r\n\t\treturn [\r\n\t\t\t{ id:\"start_date\", header:\"Start Date\", width:30 },\r\n\t\t\t{ id:\"end_date\", header:\"End Date\", width:30 },\r\n\t\t\t{ id:\"$text\", header:\"Text\", width:100 }\r\n\t\t];\r\n\t};\r\n\r\n\tscheduler._send_to_export = function(data, type){\r\n\t\tif(!data.version){\r\n\t\t\tdata.version = scheduler.version;\r\n\t\t}\r\n\r\n\t\tif(!data.skin){\r\n\t\t\tdata.skin = scheduler.skin;\r\n\t\t}\r\n\r\n\t\tif (data.callback)\r\n\t\t\t\treturn scheduler._ajax_to_export(data, type, data.callback);\r\n\r\n\t\tvar form = this._create_hidden_form();\r\n\r\n\t\tform.firstChild.action = data.server || \"https://export.dhtmlx.com/scheduler\";\r\n\t\tform.firstChild.childNodes[0].value = JSON.stringify(data);\r\n\t\tform.firstChild.childNodes[1].value = type;\r\n\t\tform.firstChild.submit();\r\n\t};\r\n\r\n\tscheduler._create_hidden_form = function(){\r\n\t\tif (!this._hidden_export_form){\r\n\t\t\tvar t = this._hidden_export_form = document.createElement(\"div\");\r\n\t\t\tt.style.display = \"none\";\r\n\t\t\tt.innerHTML = \"
\";\r\n\t\t\tdocument.body.appendChild(t);\r\n\t\t}\r\n\t\treturn this._hidden_export_form;\r\n\t};\r\n\r\n\tscheduler._get_export_size = function(format, orientation, zoom, dpi, header, footer, scales) {\r\n\r\n\t\tdpi = parseInt(dpi)/25.4 || 4;\r\n\r\n\t\tvar sizes = {\r\n\t\t\t\"A5\":{ x:148, y:210 },\r\n\t\t\t\"A4\":{ x:210, y:297 },\r\n\t\t\t\"A3\":{ x:297, y:420 },\r\n\t\t\t\"A2\":{ x:420, y:594 },\r\n\t\t\t\"A1\":{ x:594, y:841 },\r\n\t\t\t\"A0\":{ x:841, y:1189 }\r\n\t\t};\r\n\r\n\t\tvar dataX = getElementSizes(\"dhx_cal_data\", this).x;\r\n\t\tvar dataY = getElementSizes(\"dhx_cal_data\", this).y;\r\n\t\tvar headY = getElementSizes(\"dhx_cal_header\", this).y;\r\n\t\tvar multY = getElementSizes(\"dhx_multi_day\", this).y;\r\n\r\n\t\tvar cSize = {\r\n\t\t\ty: dataY + headY + multY\r\n\t\t};\r\n\r\n\t\tif (format === \"full\") {\r\n\t\t\tcSize.x = dataX;\r\n\t\t} else {\r\n\t\t\tcSize.x = Math.floor( (orientation === \"landscape\" ? sizes[format].y : sizes[format].x) * dpi );\r\n\t\t}\r\n\r\n\t\tif (scales) {\r\n\t\t\tcSize.x *= (parseFloat(scales.x) || 1);\r\n\t\t\tcSize.y *= (parseFloat(scales.y) || 1);\r\n\t\t}\r\n\r\n\t\treturn cSize;\r\n\t};\r\n\r\n\tfunction getTimeline() {\r\n\t\tvar mode = scheduler.getState().mode;\r\n\t\tif (scheduler.matrix && scheduler.matrix[mode]) {\r\n\t\t\treturn scheduler.matrix[mode];\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n\r\n\tfunction getInitialSizes() {\r\n\t\tvar smartRendering = undefined,\r\n\t\t\tscrollable = undefined;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (timeline) {\r\n\t\t\tscrollable = timeline.scrollable;\r\n\t\t\tsmartRendering = timeline.smart_rendering;\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tnav_height: scheduler.xy.nav_height,\r\n\t\t\tscroll_width: scheduler.xy.scroll_width,\r\n\t\t\tstyle_width: scheduler._obj.style.width,\r\n\t\t\tstyle_height: scheduler._obj.style.height,\r\n\t\t\ttimeline_scrollable: scrollable,\r\n\t\t\ttimeline_smart_rendering: smartRendering\r\n\t\t};\r\n\t}\r\n\r\n\tfunction setExportSizes(size, initialSizes) {\r\n\t\tscheduler._obj.style.width = size.x + \"px\";\r\n\t\tscheduler._obj.style.height = size.y + \"px\";\r\n\r\n\t\tscheduler.xy.nav_height = 0;\r\n\t\tscheduler.xy.scroll_width = 0;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (initialSizes.timeline_scrollable || initialSizes.timeline_smart_rendering) {\r\n\r\n\t\t\ttimeline.scrollable = false;\r\n\t\t\ttimeline.smart_rendering = false;\r\n\t\t}\r\n\t}\r\n\r\n\tfunction setInitialSizes(initialSizes) {\r\n\t\tscheduler.xy.scroll_width = initialSizes.scroll_width;\r\n\t\tscheduler.xy.nav_height = initialSizes.nav_height;\r\n\t\tscheduler._obj.style.width = initialSizes.style_width;\r\n\t\tscheduler._obj.style.height = initialSizes.style_height;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (initialSizes.timeline_scrollable || initialSizes.timeline_smart_rendering) {\r\n\t\t\ttimeline.scrollable = initialSizes.timeline_scrollable;\r\n\t\t\ttimeline.smart_rendering = initialSizes.timeline_smart_rendering;\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler._export_html = function (obj) {\r\n\t\tvar initialSizes = getInitialSizes();\r\n\t\tvar size = scheduler._get_export_size(obj.format, obj.orientation, obj.zoom, obj.dpi, obj.header, obj.footer, obj.scales);\r\n\r\n\t\tvar html = \"\";\r\n\t\ttry {\r\n\t\t\tsetExportSizes(size, initialSizes);\r\n\t\t\tscheduler.setCurrentView();\r\n\t\t\thtml = scheduler._obj.innerHTML;\r\n\t\t} catch (e) {\r\n\r\n\t\t\t// eslint-disable-next-line no-console\r\n\t\t\tconsole.error(e);\r\n\t\t} finally {\r\n\t\t\tsetInitialSizes(initialSizes);\r\n\t\t\tscheduler.setCurrentView();\r\n\t\t}\r\n\r\n\t\treturn html;\r\n\t};\r\n\r\n}\r\n\r\nadd_export_methods(scheduler);\r\n\r\n\r\n})();\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Grid\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\tvar els = document.body.getElementsByTagName(\"DIV\");\r\n\tfor (var i=0; i < els.length; i++) {\r\n\t\tvar cs = els[i].className||\"\";\r\n\t\tcs = cs.split(\":\");\r\n\t\tif (cs.length == 2 && cs[0] == \"template\"){\r\n\t\t\tvar code = \"return \\\"\"+(els[i].innerHTML||\"\").replace(/\\\\/g, \"\\\\\\\\\").replace(/\"/g,\"\\\\\\\"\").replace(/[\\n\\r]+/g,\"\")+\"\\\";\";\r\n\t\t\tcode = unescape(code).replace(/\\{event\\.([a-z]+)\\}/g,function(all,mask){\r\n\t\t\t\treturn '\"+ev.'+mask+'+\"';\r\n\t\t\t});\r\n\t\t\tscheduler.templates[cs[1]]=Function(\"start\",\"end\",\"ev\",code);\r\n\t\t\tels[i].style.display='none';\r\n\t\t}\r\n\t}\r\n});\r\n\r\n}","import keyboard_shortcuts from \"./keyboard_navigation/common/keyboard_shortcuts\";\r\nimport eventhandler from \"./keyboard_navigation/common/eventhandler\";\r\nimport trap_modal_focus from \"./keyboard_navigation/common/trap_modal_focus\";\r\nimport marker from \"./keyboard_navigation/marker\";\r\nimport scheduler_node from \"./keyboard_navigation/elements/scheduler_node\";\r\nimport nav_node from \"./keyboard_navigation/elements/nav_node\";\r\nimport header_cell from \"./keyboard_navigation/elements/header_cell\";\r\nimport event from \"./keyboard_navigation/elements/event\";\r\nimport time_slot from \"./keyboard_navigation/elements/time_slot\";\r\nimport minical_button from \"./keyboard_navigation/elements/minical_button\";\r\nimport minical_cell from \"./keyboard_navigation/elements/minical_cell\";\r\nimport data_area from \"./keyboard_navigation/elements/data_area\";\r\nimport modals from \"./keyboard_navigation/modals\";\r\nimport core from \"./keyboard_navigation/core\";\r\nimport key_nav_legacy from \"./keyboard_navigation/key_nav_legacy\";\r\n\r\n\r\nimport scheduler_handlers from \"./keyboard_navigation/scheduler_handlers\";\r\nimport minical_handlers from \"./keyboard_navigation/minical_handlers\";\r\n\r\nexport default function(scheduler){\r\n\t\tscheduler.config.key_nav = true;\r\n\t\tscheduler.config.key_nav_step = 30;\r\n\t\tscheduler.addShortcut = function(shortcut, handler, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tscopeObject.prototype.bind(shortcut, handler);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.getShortcutHandler = function(shortcut, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tvar commands = scheduler.$keyboardNavigation.shortcuts.parse(shortcut);\r\n\t\t\t\tif(commands.length){\r\n\t\t\t\t\treturn scopeObject.prototype.findHandler(commands[0]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.removeShortcut = function(shortcut, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tscopeObject.prototype.unbind(shortcut);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.focus = function(){\r\n\t\t\tif(!scheduler.config.key_nav){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar disp = scheduler.$keyboardNavigation.dispatcher;\r\n\t\t\tdisp.enable();\r\n\t\t\tvar activeNode = disp.getActiveNode();\r\n\t\t\tif(!activeNode || activeNode instanceof scheduler.$keyboardNavigation.MinicalButton || activeNode instanceof scheduler.$keyboardNavigation.MinicalCell){\r\n\t\t\t\tdisp.setDefaultNode();\r\n\t\t\t}else{\r\n\t\t\t\tdisp.focusNode(disp.getActiveNode());\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfunction getScope(mode){\r\n\t\t\tvar scopes = {\r\n\t\t\t\t\"minicalButton\":scheduler.$keyboardNavigation.MinicalButton,\r\n\t\t\t\t\"minicalDate\":scheduler.$keyboardNavigation.MinicalCell,\r\n\t\t\t\t\"scheduler\":scheduler.$keyboardNavigation.SchedulerNode,\r\n\t\t\t\t\"dataArea\": scheduler.$keyboardNavigation.DataArea,\r\n\t\t\t\t\"timeSlot\": scheduler.$keyboardNavigation.TimeSlot,\r\n\t\t\t\t\"event\": scheduler.$keyboardNavigation.Event\r\n\t\t\t};\r\n\r\n\t\t\tvar searchMap = {};\r\n\t\t\tfor(var i in scopes)\r\n\t\t\t\tsearchMap[i.toLowerCase()] = scopes[i];\r\n\r\n\t\t\tmode = (mode + \"\").toLowerCase();\r\n\r\n\t\t\treturn searchMap[mode] || scopes.scheduler;\r\n\t\t}\r\n\r\n\t\tscheduler.$keyboardNavigation = {};\r\n\r\n\t\tscheduler._compose = function(){\r\n\t\t\tvar parts = Array.prototype.slice.call(arguments, 0);\r\n\t\t\tvar res = {};\r\n\t\t\tfor(var i = 0; i < parts.length; i++){\r\n\t\t\t\tvar obj = parts[i];\r\n\t\t\t\tif(typeof obj == \"function\"){\r\n\t\t\t\t\tobj = new obj();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor(var p in obj){\r\n\t\t\t\t\tres[p] = obj[p];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn res;\r\n\t\t};\r\n\r\n\t\tkeyboard_shortcuts(scheduler);\r\n\t\teventhandler(scheduler);\r\n\t\ttrap_modal_focus(scheduler);\r\n\t\tmarker(scheduler);\r\n\t\tscheduler_node(scheduler);\r\n\t\tnav_node(scheduler);\r\n\t\theader_cell(scheduler);\r\n\t\tevent(scheduler);\r\n\t\ttime_slot(scheduler);\r\n\t\tminical_button(scheduler);\r\n\t\tminical_cell(scheduler);\r\n\t\tdata_area(scheduler);\r\n\t\tmodals(scheduler);\r\n\t\tcore(scheduler);\r\n\t\tkey_nav_legacy(scheduler);\r\n\r\n\t\t(function(){\r\n\t\t\tscheduler_handlers(scheduler);\r\n\t\t\tminical_handlers(scheduler);\r\n\r\n\t\t\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\t\t\tscheduler.$keyboardNavigation.attachSchedulerHandlers();\r\n\r\n\t\t\tif(scheduler.renderCalendar){\r\n\t\t\t\t// if minical ext loaded before key nav ext - patch it now\r\n\t\t\t\tscheduler.$keyboardNavigation.patchMinicalendar();\r\n\t\t\t}else{\r\n\t\t\t\t// otherwise - wait until everything is loaded and try again\r\n\t\t\t\tvar attachOnce = scheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\t\t\t\tscheduler.detachEvent(attachOnce);\r\n\t\t\t\t\tscheduler.$keyboardNavigation.patchMinicalendar();\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\tfunction isSchedulerSelected(){\r\n\t\t\t\tif(!scheduler.config.key_nav) return;\r\n\r\n\t\t\t\tvar enable;\r\n\t\t\t\tvar focusElement = document.activeElement;\r\n\t\t\t\t// halt key nav when focus is outside scheduler or in quick info popup\r\n\t\t\t\tif(!focusElement || scheduler.utils.dom.locateCss(focusElement, \"dhx_cal_quick_info\", false)){\r\n\t\t\t\t\tenable = false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tenable = scheduler.$keyboardNavigation.isChildOf(focusElement, scheduler.$container) || scheduler.$keyboardNavigation.isMinical(focusElement);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn enable;\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\tfunction changeState(enable){\r\n\t\t\t\tif(enable && !dispatcher.isEnabled()){\r\n\t\t\t\t\tdispatcher.enable();\r\n\t\t\t\t}else if(!enable && dispatcher.isEnabled()){\r\n\t\t\t\t\tdispatcher.disable();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tconst intervalId = setInterval(function(){\r\n\t\t\t\tif(!scheduler.$container || !scheduler.$keyboardNavigation.isChildOf(scheduler.$container, document.body)){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar enable = isSchedulerSelected();\r\n\r\n\t\t\t\tif(enable){\r\n\t\t\t\t\tchangeState(enable);\r\n\t\t\t\t}else if(!enable && dispatcher.isEnabled()){\r\n\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// doublecheck in case checking is done in handler before focus element is repainted\r\n\t\t\t\t\t\tif(scheduler.config.key_nav){\r\n\t\t\t\t\t\t\tchangeState(isSchedulerSelected());\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tscheduler.$container.removeAttribute(\"tabindex\");\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}, 100);\r\n\t\t\t\t}\r\n\t\t\t}, 500);\r\n\t\t\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\t\t\tclearInterval(intervalId);\r\n\t\t\t});\r\n\t\t})();\r\n\t}\r\n\r\n\r\n","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.shortcuts = {\r\n\tcreateCommand: function(){\r\n\t\treturn {\r\n\t\t\tmodifiers:{\r\n\t\t\t\t\"shift\": false,\r\n\t\t\t\t\"alt\": false,\r\n\t\t\t\t\"ctrl\": false,\r\n\t\t\t\t\"meta\": false\r\n\t\t\t},\r\n\t\t\tkeyCode: null\r\n\t\t};\r\n\t},\r\n\tparse: function(shortcut){\r\n\t\tvar commands = [];\r\n\r\n\t\tvar expr = this.getExpressions(this.trim(shortcut));\r\n\t\tfor(var i = 0; i < expr.length; i++){\r\n\t\t\tvar words = this.getWords(expr[i]);\r\n\r\n\t\t\tvar command = this.createCommand();\r\n\r\n\t\t\tfor(var j = 0; j < words.length; j++){\r\n\t\t\t\tif(this.commandKeys[words[j]]){\r\n\t\t\t\t\tcommand.modifiers[words[j]] = true;\r\n\t\t\t\t}else if(this.specialKeys[words[j]]){\r\n\t\t\t\t\tcommand.keyCode = this.specialKeys[words[j]];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcommand.keyCode = words[j].charCodeAt(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tcommands.push(command);\r\n\t\t}\r\n\t\treturn commands;\r\n\t},\r\n\r\n\tgetCommandFromEvent: function(domEvent){\r\n\t\tvar command = this.createCommand();\r\n\t\tcommand.modifiers.shift = !!domEvent.shiftKey;\r\n\t\tcommand.modifiers.alt = !!domEvent.altKey;\r\n\t\tcommand.modifiers.ctrl = !!domEvent.ctrlKey;\r\n\t\tcommand.modifiers.meta = !!domEvent.metaKey;\r\n\t\tcommand.keyCode = domEvent.which || domEvent.keyCode;\r\n\r\n\t\tif(command.keyCode >= 96 && command.keyCode <= 105){\r\n\t\t\t// numpad keys 96-105 -> 48-57\r\n\t\t\tcommand.keyCode -= 48;//convert numpad number code to regular number code\r\n\t\t}\r\n\r\n\t\tvar printableKey = String.fromCharCode(command.keyCode );\r\n\t\tif(printableKey){\r\n\t\t\tcommand.keyCode = printableKey.toLowerCase().charCodeAt(0);\r\n\t\t}\r\n\t\treturn command;\r\n\t},\r\n\r\n\tgetHashFromEvent: function(domEvent){\r\n\t\treturn this.getHash(this.getCommandFromEvent(domEvent));\r\n\t},\r\n\r\n\tgetHash: function(command){\r\n\t\tvar parts = [];\r\n\t\tfor(var i in command.modifiers){\r\n\t\t\tif(command.modifiers[i]){\r\n\t\t\t\tparts.push(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tparts.push(command.keyCode);\r\n\r\n\t\treturn parts.join(this.junctionChar);\r\n\t},\r\n\r\n\tgetExpressions: function(shortcut){\r\n\t\treturn shortcut.split(this.junctionChar);\r\n\t},\r\n\tgetWords: function(term){\r\n\t\treturn term.split(this.combinationChar);\r\n\t},\r\n\ttrim: function(shortcut){\r\n\t\treturn shortcut.replace(/\\s/g, \"\");\r\n\t},\r\n\tjunctionChar:\",\",\r\n\tcombinationChar:\"+\",\r\n\tcommandKeys:{\r\n\t\t\"shift\": 16,\r\n\t\t\"alt\": 18,\r\n\t\t\"ctrl\": 17,\r\n\t\t\"meta\": true\r\n\t},\r\n\tspecialKeys:{\r\n\t\t\"backspace\": 8,\r\n\t\t\"tab\": 9,\r\n\t\t\"enter\": 13,\r\n\t\t\"esc\": 27,\r\n\t\t\"space\": 32,\r\n\t\t\"up\": 38,\r\n\t\t\"down\": 40,\r\n\t\t\"left\": 37,\r\n\t\t\"right\": 39,\r\n\t\t\"home\": 36,\r\n\t\t\"end\": 35,\r\n\t\t\"pageup\": 33,\r\n\t\t\"pagedown\": 34,\r\n\t\t\"delete\": 46,\r\n\t\t\"insert\": 45,\r\n\t\t\"plus\":107,\r\n\t\t\"f1\": 112,\r\n\t\t\"f2\": 113,\r\n\t\t\"f3\": 114,\r\n\t\t\"f4\": 115,\r\n\t\t\"f5\": 116,\r\n\t\t\"f6\": 117,\r\n\t\t\"f7\": 118,\r\n\t\t\"f8\": 119,\r\n\t\t\"f9\": 120,\r\n\t\t\"f10\": 121,\r\n\t\t\"f11\": 122,\r\n\t\t\"f12\": 123\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.EventHandler = {\r\n\t_handlers: null,\r\n\tfindHandler: function(command){\r\n\t\tif(!this._handlers) this._handlers = {};\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\t\tvar hash = shortcuts.getHash(command);\r\n\r\n\t\treturn this._handlers[hash];\r\n\t},\r\n\r\n\tdoAction: function(command, e){\r\n\t\tvar handler = this.findHandler(command);\r\n\t\tif(handler){\r\n\t\t\thandler.call(this, e);\r\n\r\n\t\t\tif (e.preventDefault) e.preventDefault();\r\n\t\t\telse e.returnValue = false;\r\n\r\n\t\t}\r\n\t},\r\n\tbind: function(shortcut, handler){\r\n\t\tif(!this._handlers) this._handlers = {};\r\n\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\r\n\t\tvar commands = shortcuts.parse(shortcut);\r\n\t\tfor(var i = 0; i < commands.length; i++){\r\n\t\t\tthis._handlers[shortcuts.getHash(commands[i])] = handler;\r\n\t\t}\r\n\t},\r\n\tunbind: function(shortcut){\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\r\n\t\tvar commands = shortcuts.parse(shortcut);\r\n\t\tfor(var i = 0; i < commands.length; i++){\r\n\t\t\tif(this._handlers[shortcuts.getHash(commands[i])]){\r\n\t\t\t\tdelete this._handlers[shortcuts.getHash(commands[i])];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tbindAll: function(map){\r\n\t\tfor(var i in map){\r\n\t\t\tthis.bind(i, map[i]);\r\n\t\t}\r\n\t},\r\n\tinitKeys: function(){\r\n\t\tif(!this._handlers)\r\n\t\t\tthis._handlers = {};\r\n\t\tif(this.keys){\r\n\t\t\tthis.bindAll(this.keys);\r\n\t\t}\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n(function(){\r\n\tscheduler.$keyboardNavigation.getFocusableNodes = scheduler._getFocusableNodes;\r\n\r\n\tscheduler.$keyboardNavigation.trapFocus = function trapFocus(root, e){\r\n\t\tif(e.keyCode != 9) return false;\r\n\r\n\t\tvar focusable = scheduler.$keyboardNavigation.getFocusableNodes(root);\r\n\t\tvar currentFocus = document.activeElement;\r\n\t\tvar currentIndex = -1;\r\n\t\tfor(var i = 0; i < focusable.length; i++){\r\n\t\t\tif(focusable[i] == currentFocus){\r\n\t\t\t\tcurrentIndex = i;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar nextIndex, nextItem;\r\n\t\tif(e.shiftKey){\r\n\r\n\t\t\t// back tab\r\n\t\t\t// go to the last element if we focused on the first\r\n\t\t\tnextIndex = (currentIndex <= 0) ? (focusable.length - 1) : (currentIndex - 1);\r\n\r\n\t\t\tnextItem = focusable[nextIndex];\r\n\t\t\tif(nextItem){\r\n\t\t\t\tnextItem.focus();\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\t// forward tab\r\n\t\t\t// forward tab from last element should go back to the first element\r\n\t\t\tnextIndex = (currentIndex >= focusable.length - 1) ? 0 : (currentIndex + 1);\r\n\t\t\tnextItem = focusable[nextIndex];\r\n\t\t\tif(nextItem){\r\n\t\t\t\tnextItem.focus();\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t};\r\n})();\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.marker = {\r\n\tclear: function(){\r\n\t\tvar divs = scheduler.$container.querySelectorAll(\".dhx_focus_slot\");\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tdivs[i].parentNode.removeChild(divs[i]);\r\n\t\t}\r\n\t},\r\n\tcreateElement: function(){\r\n\t\tvar element = document.createElement(\"div\");\r\n\t\telement.setAttribute(\"tabindex\", -1);\r\n\t\telement.className = \"dhx_focus_slot\";\r\n\t\treturn element;\r\n\t},\r\n\r\n\trenderMultiple: function(start, end, method){\r\n\t\tvar divs = [];\r\n\t\tvar currentStart = new Date(start);\r\n\t\tvar currentEnd = new Date(Math.min(end.valueOf(), scheduler.date.add(scheduler.date.day_start(new Date(start)), 1, \"day\").valueOf()));\r\n\t\twhile(currentStart.valueOf() < end.valueOf()){\r\n\r\n\t\t\tdivs = divs.concat(method.call(this, currentStart, new Date(Math.min(currentEnd.valueOf(), end.valueOf()))));\r\n\t\t\tcurrentStart = scheduler.date.day_start(scheduler.date.add(currentStart, 1, \"day\"));\r\n\r\n\t\t\tcurrentEnd = scheduler.date.day_start(scheduler.date.add(currentStart, 1, \"day\"));\r\n\t\t\tcurrentEnd = new Date(Math.min(currentEnd.valueOf(), end.valueOf()));\r\n\t\t}\r\n\r\n\t\treturn divs;\r\n\t},\r\n\r\n\r\n\trender: function(start, end, section){\r\n\t\tthis.clear();\r\n\t\tvar divs = [];\r\n\r\n\t\tvar modes = scheduler.$keyboardNavigation.TimeSlot.prototype._modes;\r\n\t\tvar view = scheduler.$keyboardNavigation.TimeSlot.prototype._getMode();\r\n\t\tswitch (view){\r\n\t\t\tcase modes.units:\r\n\t\t\t\tdivs = this.renderVerticalMarker(start, end, section);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.timeline:\r\n\t\t\t\tdivs = this.renderTimelineMarker(start, end, section);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.year:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderYearMarker));\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.month:\r\n\t\t\t\tdivs = this.renderMonthMarker(start, end);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.weekAgenda:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderWeekAgendaMarker));\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.list:\r\n\t\t\t\tdivs = this.renderAgendaMarker(start, end);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.dayColumns:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderVerticalMarker));\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tthis.addWaiAriaLabel(divs, start, end, section);\r\n\t\tthis.addDataAttributes(divs, start, end, section);\r\n\r\n\t\tfor(var i = divs.length - 1; i >= 0; i--){\r\n\t\t\tif(divs[i].offsetWidth){\r\n\t\t\t\treturn divs[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t},\r\n\r\n\taddDataAttributes: function(divs, start, end, section){\r\n\t\tvar dateToStr = scheduler.date.date_to_str(scheduler.config.api_date);\r\n\r\n\t\tvar from = dateToStr(start),\r\n\t\t\tto = dateToStr(end);\r\n\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tdivs[i].setAttribute(\"data-start-date\", from);\r\n\t\t\tdivs[i].setAttribute(\"data-end-date\", to);\r\n\t\t\tif(section){\r\n\t\t\t\tdivs[i].setAttribute(\"data-section\", section);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\taddWaiAriaLabel: function(divs, start, end, section){\r\n\t\tvar label = \"\";\r\n\t\tvar state = scheduler.getState();\r\n\t\tvar mode = state.mode;\r\n\r\n\t\tvar dateTimeLabel = false;\r\n\r\n\t\tlabel += scheduler.templates.day_date(start);\r\n\r\n\t\tif((scheduler.date.day_start(new Date(start)).valueOf() != start.valueOf())){\r\n\t\t\tlabel += \" \" + scheduler.templates.hour_scale(start);\r\n\t\t\tdateTimeLabel = true;\r\n\t\t}\r\n\r\n\t\tif((scheduler.date.day_start(new Date(start)).valueOf() != scheduler.date.day_start(new Date(end)).valueOf())){\r\n\r\n\t\t\tlabel += \" - \" + scheduler.templates.day_date(end);\r\n\t\t\tif(dateTimeLabel || (scheduler.date.day_start(new Date(end)).valueOf() != end.valueOf())){\r\n\t\t\t\tlabel += \" \" + scheduler.templates.hour_scale(end);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(section){\r\n\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\t\t\t\tconst timeline = scheduler.matrix[mode];\r\n\t\t\t\tconst sectionObject = timeline.y_unit[timeline.order[section]];\r\n\t\t\t\tlabel += \", \" + scheduler.templates[mode + \"_scale_label\"](sectionObject.key, sectionObject.label, sectionObject);\r\n\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\tconst units = scheduler._props[mode];\r\n\t\t\t\tconst sectionObject = units.options[units.order[section]];\r\n\r\n\t\t\t\tlabel += \", \" + scheduler.templates[mode + \"_scale_text\"](sectionObject.key, sectionObject.label, sectionObject);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tscheduler._waiAria.setAttributes(divs[i], {\r\n\t\t\t\t\"aria-label\": label,\r\n\t\t\t\t\"aria-live\": \"polite\"\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\r\n\trenderWeekAgendaMarker: function(start_date, end_date){\r\n\t\tvar divs = scheduler.$container.querySelectorAll(\".dhx_wa_day_cont .dhx_wa_scale_bar\");\r\n\r\n\t\tvar currDate = scheduler.date.week_start(new Date(scheduler.getState().min_date));\r\n\r\n\t\tvar index = -1;\r\n\t\tvar markerDate = scheduler.date.day_start(new Date(start_date));\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tindex++;\r\n\t\t\tif(scheduler.date.day_start(new Date(currDate)).valueOf() == markerDate.valueOf()){\r\n\t\t\t\tbreak;\r\n\t\t\t}else{\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(index != -1) return this._wrapDiv(divs[index]);\r\n\t\treturn [];\r\n\t},\r\n\r\n\t_wrapDiv: function(cell){\r\n\t\tvar marker = this.createElement();\r\n\t\tmarker.style.top = cell.offsetTop + \"px\";\r\n\t\tmarker.style.left = cell.offsetLeft + \"px\";\r\n\t\tmarker.style.width = cell.offsetWidth + \"px\";\r\n\t\tmarker.style.height = cell.offsetHeight + \"px\";\r\n\t\tcell.appendChild(marker);\r\n\t\treturn [marker];\r\n\t},\r\n\trenderYearMarker: function(start_date, end_date){\r\n\t\tvar cell = scheduler._get_year_cell(start_date);\r\n\t\tcell.style.position = \"relative\";\r\n\t\tvar marker = this.createElement();\r\n\t\tmarker.style.top = \"0px\";\r\n\t\tmarker.style.left = \"0px\";\r\n\t\tmarker.style.width = \"100%\";\r\n\t\tmarker.style.height = \"100%\";\r\n\t\tcell.appendChild(marker);\r\n\t\treturn [marker];\r\n\t},\r\n\r\n\trenderAgendaMarker: function(start_date, end_date){\r\n\t\tvar block = this.createElement();\r\n\t\tblock.style.height = \"1px\";\r\n\t\tblock.style.width = \"100%\";\r\n\t\tblock.style.opacity = 1;\r\n\t\tblock.style.top = \"0px\";\r\n\t\tblock.style.left = \"0px\";\r\n\t\tscheduler.$container.querySelector(\".dhx_cal_data\").appendChild(block);\r\n\t\treturn [block];\r\n\t},\r\n\r\n\trenderTimelineMarker: function(start_date, end_date, section){\r\n\t\tvar view_opts = scheduler._lame_copy({}, scheduler.matrix[scheduler._mode]);\r\n\t\tvar areas = view_opts._scales;\r\n\t\t//timespans must always use actual position, not rounded\r\n\t\tview_opts.round_position = false;\r\n\t\tvar blocks = [];\r\n\r\n\t\tvar min_date = start_date ? new Date(start_date) : scheduler._min_date;\r\n\t\tvar max_date = end_date ? new Date(end_date) : scheduler._max_date;\r\n\r\n\t\tif(min_date.valueOf() < scheduler._min_date.valueOf())\r\n\t\t\tmin_date = new Date(scheduler._min_date);\r\n\t\tif(max_date.valueOf() > scheduler._max_date.valueOf())\r\n\t\t\tmax_date = new Date(scheduler._max_date);\r\n\r\n\t\tif(!view_opts._trace_x) return blocks;\r\n\r\n\t\tfor(var i = 0; i < view_opts._trace_x.length; i++){\r\n\t\t\tif(scheduler._is_column_visible(view_opts._trace_x[i]))\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\tif(i == view_opts._trace_x.length)\r\n\t\t\treturn blocks;\r\n\r\n\t\tvar area = areas[section];\r\n\r\n\t\tif (!(min_date < end_date && max_date > start_date))\r\n\t\t\treturn blocks;\r\n\r\n\t\tvar block = this.createElement();\r\n\r\n\t\tlet start_pos;\r\n\t\tlet end_pos;\r\n\r\n\t\tfunction set_date_part(source, target) {\r\n\t\t\t// reset to start of the month in order to prevent month change when target is on 31th day, and source month has only 30 days\r\n\t\t\ttarget.setDate(1);\r\n\r\n\t\t\ttarget.setFullYear(source.getFullYear());\r\n\t\t\ttarget.setMonth(source.getMonth());\r\n\t\t\ttarget.setDate(source.getDate());\r\n\t\t}\r\n\r\n\t\tif(!scheduler.getView().days){\r\n\t\t\tstart_pos = scheduler._timeline_getX({start_date: start_date}, false, view_opts);\r\n\t\t\tend_pos = scheduler._timeline_getX({start_date: end_date}, false, view_opts);\r\n\t\t}else{\r\n\t\t\t// daytimeline\r\n\t\t\tconst tempStart = new Date(start_date);\r\n\t\t\tset_date_part(scheduler._min_date, tempStart);\r\n\t\t\tconst tempEnd = new Date(end_date);\r\n\t\t\tset_date_part(scheduler._min_date, tempEnd);\r\n\t\t\tstart_pos = scheduler._timeline_getX({start_date: tempStart}, false, view_opts);\r\n\t\t\tend_pos = scheduler._timeline_getX({start_date: tempEnd}, false, view_opts);\r\n\t\t}\r\n\r\n\t\tvar height = ((view_opts._section_height[section]-1) || (view_opts.dy - 1));\r\n\r\n\t\tvar top = 0;\r\n\t\tif (scheduler._isRender('cell')){\r\n\t\t\ttop = area.offsetTop;\r\n\t\t\tstart_pos += view_opts.dx;\r\n\t\t\tend_pos += view_opts.dx;\r\n\t\t\tarea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t}else{\r\n\r\n\t\t}\r\n\t\tvar width = Math.max(1, end_pos - start_pos - 1);\r\n\t\tlet direction = \"left\";\r\n\t\tif(scheduler.config.rtl){\r\n\t\t\tdirection = \"right\";\r\n\t\t}\r\n\t\tblock.style.cssText = `height:${height}px; ${direction}:${start_pos}px; width:${width}px; top:${top}px;`;\r\n\r\n\t\tif(area){\r\n\t\t\tarea.appendChild(block);\r\n\t\t\tblocks.push(block);\r\n\t\t}\r\n\r\n\t\treturn blocks;\r\n\t},\r\n\r\n\trenderMonthCell: function(date){\r\n\t\tvar cells = scheduler.$container.querySelectorAll(\".dhx_month_head\");\r\n\r\n\t\tvar divs = [];\r\n\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\tdivs.push(cells[i].parentNode);\r\n\t\t}\r\n\r\n\t\tvar firstDate = scheduler.date.week_start(new Date(scheduler.getState().min_date));\r\n\r\n\t\tvar index = -1;\r\n\t\tvar weekNumber = 0;\r\n\t\tvar dayIndex = -1;\r\n\t\tvar currDate = firstDate;\r\n\t\tvar markerDate = scheduler.date.day_start(new Date(date));\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tindex++;\r\n\r\n\t\t\tif(dayIndex == 6){\r\n\t\t\t\tweekNumber++;\r\n\t\t\t\tdayIndex = 0;\r\n\t\t\t}else{\r\n\t\t\t\tdayIndex++;\r\n\t\t\t}\r\n\r\n\t\t\tif(scheduler.date.day_start(new Date(currDate)).valueOf() == markerDate.valueOf()){\r\n\t\t\t\tbreak;\r\n\t\t\t}else{\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(index == -1){\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tvar left = scheduler._colsS[dayIndex];\r\n\t\tvar top = scheduler._colsS.heights[weekNumber];\r\n\r\n\t\tvar div = this.createElement();\r\n\t\tdiv.style.top = top + \"px\";\r\n\t\tdiv.style.left = left + \"px\";\r\n\t\tdiv.style.width = scheduler._cols[dayIndex] + \"px\";\r\n\t\tdiv.style.height = ((scheduler._colsS.heights[weekNumber + 1] - top) || scheduler._colsS.height) + \"px\" ;\r\n\r\n\r\n\t\tvar container = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\r\n\t\tvar datatable = container.querySelector(\"table\");\r\n\t\tif(datatable.nextSibling){\r\n\t\t\tcontainer.insertBefore(div, datatable.nextSibling);\r\n\t\t}else{\r\n\t\t\tcontainer.appendChild(div);\r\n\t\t}\r\n\t\treturn div;\r\n\t},\r\n\trenderMonthMarker: function(start_date, end_date){\r\n\t\tvar res = [];\r\n\t\tvar currentDate = start_date;\r\n\t\twhile(currentDate.valueOf() < end_date.valueOf()){\r\n\t\t\tres.push(this.renderMonthCell(currentDate));\r\n\t\t\tcurrentDate = scheduler.date.add(currentDate, 1, \"day\");\r\n\t\t}\r\n\t\treturn res;\r\n\t},\r\n\r\n\trenderVerticalMarker: function(start_date, end_date, section){\r\n\t\tvar index = scheduler.locate_holder_day(start_date);\r\n\r\n\t\tvar divs = [];\r\n\t\tvar area = null;\r\n\r\n\t\tvar c = scheduler.config;\r\n\t\tif(scheduler._ignores[index]) return divs;\r\n\r\n\t\tif (scheduler._props && scheduler._props[scheduler._mode] && section) {\r\n\t\t\tvar view = scheduler._props[scheduler._mode];\r\n\t\t\tindex = view.order[section];\r\n\r\n\t\t\tvar inner_index = view.order[section];\r\n\t\t\tif(!(view.days > 1)){\r\n\t\t\t\tindex = inner_index;\r\n\t\t\t\tif (view.size && (index > view.position+view.size)) {\r\n\t\t\t\t\tindex = 0;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t//var units_l = view.size || view.options.length;\r\n\r\n\t\t\t\tindex = scheduler.locate_holder_day(start_date) + inner_index;\r\n\t\t\t\t//index = index*units_l + inner_index;\r\n\t\t\t}\r\n\t\t}\r\n\t\tarea = scheduler.locate_holder(index);\r\n\t\tif(!area || area.querySelector(\".dhx_scale_hour\")){\r\n\t\t\t// hour scale instead of date column\r\n\t\t\treturn document.createElement(\"div\");\r\n\t\t}\r\n\r\n\t\tvar start = Math.max((start_date.getHours()*60 + start_date.getMinutes()), c.first_hour*60);\r\n\r\n\r\n\t\tvar end = Math.min((end_date.getHours()*60 + end_date.getMinutes()), c.last_hour*60);\r\n\t\tif(!end && (scheduler.date.day_start(new Date(end_date)).valueOf() > scheduler.date.day_start(new Date(start_date)).valueOf())){\r\n\t\t\tend = c.last_hour*60;\r\n\t\t}\r\n\r\n\t\tif (end <= start) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tvar block = this.createElement();\r\n\r\n\t\t// +1 for working with section which really takes up whole height (as % would be == 0)\r\n\t\tvar all_hours_height = scheduler.config.hour_size_px*c.last_hour + 1;\r\n\t\tvar hour_ms = 60*60*1000;\r\n\t\tblock.style.top = (Math.round((start*60*1000-scheduler.config.first_hour*hour_ms)*scheduler.config.hour_size_px/hour_ms) % all_hours_height) + \"px\";\r\n\t\tblock.style.lineHeight = block.style.height = Math.max((Math.round(((end-start)*60*1000)*scheduler.config.hour_size_px/hour_ms)) % all_hours_height, 1)+\"px\";\r\n\t\tblock.style.width = \"100%\";\r\n\t\tarea.appendChild(block);\r\n\t\tdivs.push(block);\r\n\t\treturn divs[0];\r\n\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode = function(){};\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.EventHandler,\r\n\t{\r\n\t\tgetDefaultNode: function(){\r\n\t\t\tvar node = new scheduler.$keyboardNavigation.TimeSlot();\r\n\r\n\t\t\tif(!node.isValid()){\r\n\t\t\t\tnode = node.fallback();\r\n\t\t\t}\r\n\t\t\treturn node;\r\n\t\t},\r\n\r\n\t\t_modes:{\r\n\t\t\tmonth: \"month\",\r\n\t\t\tyear: \"year\",\r\n\t\t\tdayColumns: \"dayColumns\",\r\n\t\t\ttimeline:\"timeline\",\r\n\t\t\tunits:\"units\",\r\n\t\t\tweekAgenda: \"weekAgenda\",\r\n\t\t\tlist: \"list\"\r\n\t\t},\r\n\t\tgetMode: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tvar mode = state.mode;\r\n\t\t\tif((scheduler.matrix && scheduler.matrix[mode])){\r\n\t\t\t\treturn this._modes.timeline;\r\n\t\t\t} else if((scheduler._props && scheduler._props[mode])){\r\n\t\t\t\treturn this._modes.units;\r\n\t\t\t}else if(mode == \"month\"){\r\n\t\t\t\treturn this._modes.month;\r\n\t\t\t}else if(mode == \"year\"){\r\n\t\t\t\treturn this._modes.year;\r\n\t\t\t}else if(mode == \"week_agenda\"){\r\n\t\t\t\treturn this._modes.weekAgenda;\r\n\t\t\t}else if(mode == \"map\" || mode == \"agenda\" || (scheduler._grid && scheduler[\"grid_\" + mode])){\r\n\t\t\t\treturn this._modes.list;\r\n\t\t\t}else{\r\n\t\t\t\treturn this._modes.dayColumns;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.focus();\r\n\t\t},\r\n\r\n\t\tblur: function(){\r\n\r\n\t\t},\r\n\r\n\t\tdisable: function(){\r\n\t\t\tscheduler.$container.setAttribute(\"tabindex\", \"0\");\r\n\t\t},\r\n\t\tenable: function(){\r\n\t\t\tif(scheduler.$container)\r\n\t\t\t\tscheduler.$container.removeAttribute(\"tabindex\");\r\n\t\t},\r\n\t\tisEnabled: function(){\r\n\t\t\treturn scheduler.$container.hasAttribute(\"tabindex\");\r\n\t\t},\r\n\r\n\r\n\t\t_compareEvents: function(a, b){\r\n\t\t\tif (a.start_date.valueOf() == b.start_date.valueOf())\r\n\t\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\t\treturn a.start_date.valueOf() > b.start_date.valueOf() ? 1 : -1;\r\n\t\t},\r\n\r\n\t\t_pickEvent: function(from, to, startId, reverse){\r\n\t\t\tvar range = scheduler.getState();\r\n\t\t\tfrom = new Date(Math.max(range.min_date.valueOf(), from.valueOf()));\r\n\t\t\tto = new Date(Math.min(range.max_date.valueOf(), to.valueOf()));\r\n\r\n\t\t\tvar evs = scheduler.getEvents(from, to);\r\n\t\t\tevs.sort(this._compareEvents);\r\n\t\t\tif(reverse){\r\n\t\t\t\tevs = evs.reverse();\r\n\t\t\t}\r\n\r\n\t\t\tvar trim = !!startId;\r\n\t\t\tfor(var i =0; i < evs.length && trim; i++){\r\n\t\t\t\tif(evs[i].id == startId){\r\n\t\t\t\t\ttrim = false;\r\n\t\t\t\t}\r\n\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\r\n\t\t\tfor(var i = 0; i < evs.length; i++){\r\n\t\t\t\tvar eventElement = new scheduler.$keyboardNavigation.Event(evs[i].id);\r\n\t\t\t\tif(eventElement.getNode())\r\n\t\t\t\t\treturn evs[i];\r\n\t\t\t}\r\n\r\n\t\t\treturn null;\r\n\t\t},\r\n\r\n\t\tnextEventHandler: function(id){\r\n\t\t\tvar activeNode = scheduler.$keyboardNavigation.dispatcher.activeNode;\r\n\r\n\t\t\tvar startId = id || (activeNode && activeNode.eventId);\r\n\r\n\t\t\tvar nextEvent = null;\r\n\t\t\tif(startId && scheduler.getEvent(startId)){\r\n\t\t\t\tvar currEvent = scheduler.getEvent(startId);\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tcurrEvent.start_date,\r\n\t\t\t\t\tscheduler.date.add(currEvent.start_date, 1, \"year\"),\r\n\t\t\t\t\tcurrEvent.id,\r\n\t\t\t\t\tfalse\r\n\t\t\t\t);\r\n\r\n\t\t\t}\r\n\t\t\tif(!nextEvent && !id){\r\n\t\t\t\tvar visibleDates = scheduler.getState();\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tvisibleDates.min_date,\r\n\t\t\t\t\tscheduler.date.add(visibleDates.min_date, 1, \"year\"),\r\n\t\t\t\t\tnull,\r\n\t\t\t\t\tfalse\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tif(nextEvent){\r\n\r\n\t\t\t\tvar nextEv = new scheduler.$keyboardNavigation.Event(nextEvent.id);\r\n\t\t\t\tif(!nextEv.isValid()){// not visible event\r\n\t\t\t\t\tthis.nextEventHandler(nextEvent.id);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(activeNode){activeNode.blur();}\r\n\t\t\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(nextEv);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tprevEventHandler: function(id){\r\n\t\t\tvar activeNode = scheduler.$keyboardNavigation.dispatcher.activeNode;\r\n\r\n\t\t\tvar startId = id || (activeNode && activeNode.eventId);\r\n\r\n\t\t\tvar nextEvent = null;\r\n\t\t\tif(startId && scheduler.getEvent(startId)){\r\n\t\t\t\tvar currEvent = scheduler.getEvent(startId);\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tscheduler.date.add(currEvent.end_date, -1, \"year\"),\r\n\t\t\t\t\tcurrEvent.end_date,\r\n\t\t\t\t\tcurrEvent.id,\r\n\t\t\t\t\ttrue\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t\tif(!nextEvent && !id){\r\n\t\t\t\tvar visibleDates = scheduler.getState();\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tscheduler.date.add(visibleDates.max_date, -1, \"year\"),\r\n\t\t\t\t\tvisibleDates.max_date,\r\n\t\t\t\t\tnull,\r\n\t\t\t\t\ttrue\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tif(nextEvent){\r\n\t\t\t\tvar nextEv = new scheduler.$keyboardNavigation.Event(nextEvent.id);\r\n\t\t\t\tif(!nextEv.isValid()){// not visible event\r\n\t\t\t\t\tthis.prevEventHandler(nextEvent.id);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(activeNode){activeNode.blur();}\r\n\t\t\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(nextEv);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\r\n\t\t\t\"alt+1, alt+2, alt+3, alt+4, alt+5, alt+6, alt+7, alt+8, alt+9\": function(e){\r\n\t\t\t\tvar tabs = scheduler.$keyboardNavigation.HeaderCell.prototype.getNodes(\".dhx_cal_navline .dhx_cal_tab\");\r\n\t\t\t\tvar key = e.key;\r\n\t\t\t\tif(key === undefined){\r\n\t\t\t\t\tkey = e.keyCode - 48;\r\n\t\t\t\t}\r\n\t\t\t\tif(tabs[key*1 - 1]){\r\n\t\t\t\t\ttabs[key*1 - 1].click();\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+left,meta+left\": function(e){\r\n\t\t\t\tscheduler._click.dhx_cal_prev_button();\r\n\t\t\t},\r\n\t\t\t\"ctrl+right,meta+right\": function(e){\r\n\t\t\t\tscheduler._click.dhx_cal_next_button();\r\n\t\t\t},\r\n\t\t\t\"ctrl+up,meta+up\":function(e){\r\n\t\t\t\tvar dataArea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tdataArea.scrollTop -= 20;\r\n\t\t\t},\r\n\t\t\t\"ctrl+down,meta+down\": function(e){\r\n\t\t\t\tvar dataArea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tdataArea.scrollTop += 20;\r\n\t\t\t},\r\n\r\n\r\n\t\t\t\"e\": function(){\r\n\t\t\t\tthis.nextEventHandler();\r\n\t\t\t},\r\n\r\n\t\t\t\"home\": function(){\r\n\t\t\t\tscheduler.setCurrentView(new Date());\r\n\t\t\t},\r\n\r\n\t\t\t\"shift+e\": function(){\r\n\t\t\t\tthis.prevEventHandler();\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+enter,meta+enter\": function(){\r\n\t\t\t\tscheduler.addEventNow({start_date: new Date(scheduler.getState().date)});\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+c,meta+c\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t},\r\n\t\t\t\"ctrl+v,meta+v\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t},\r\n\t\t\t\"ctrl+x,meta+x\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode.prototype.bindAll(scheduler.$keyboardNavigation.SchedulerNode.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.KeyNavNode = function(){};\r\n\r\nscheduler.$keyboardNavigation.KeyNavNode.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.EventHandler,\r\n\t{\r\n\t\tisValid: function(){\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\treturn null;\r\n\t\t},\r\n\r\n\t\tmoveTo: function (element) {\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(element);\r\n\t\t},\r\n\r\n\t\tcompareTo: function(b){\r\n\t\t\t// good enough comparison of two random objects\r\n\t\t\tif(!b) return false;\r\n\t\t\tfor(var i in this){\r\n\t\t\t\tif(!!this[i] != !!b[i]) return false;\r\n\r\n\t\t\t\tvar canStringifyThis = !!(this[i] && this[i].toString);\r\n\t\t\t\tvar canStringifyThat = !!(b[i] && b[i].toString);\r\n\t\t\t\tif(canStringifyThat != canStringifyThis) return false;\r\n\t\t\t\tif(!(canStringifyThat && canStringifyThis)) {\r\n\t\t\t\t\tif(b[i] != this[i]) return false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(b[i].toString() != this[i].toString())\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\r\n\t\tgetNode: function(){},\r\n\t\tfocus: function(){\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif(node){\r\n\t\t\t\tnode.setAttribute(\"tabindex\", \"-1\");\r\n\t\t\t\t//node.className += \" scheduler_focused\";\r\n\t\t\t\tif(node.focus) node.focus();\r\n\t\t\t}\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif(node){\r\n\t\t\t\tnode.setAttribute(\"tabindex\", \"-1\");\r\n\t\t\t\t//node.className = (node.className || \"\").replace(/ ?scheduler_focused/g, \"\");\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.HeaderCell = function(index){\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.HeaderCell.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\tgetNode: function(index){\r\n\t\t\tindex = index || this.index || 0;\r\n\t\t\tvar nodes = this.getNodes();\r\n\t\t\tif(nodes[index]) return nodes[index];\r\n\t\t},\r\n\r\n\t\tgetNodes: function(selector){\r\n\t\t\tselector = selector || [\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_prev_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_next_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_today_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_tab\"\r\n\t\t\t\t].join(\", \");\r\n\r\n\t\t\tvar nodes = Array.prototype.slice.call(scheduler.$container.querySelectorAll(selector));\r\n\t\t\tnodes.sort(function(a, b){\r\n\t\t\t\treturn a.offsetLeft - b.offsetLeft;\r\n\t\t\t});\r\n\t\t\treturn nodes;\r\n\t\t},\r\n\r\n\t\t_handlers:null,\r\n\r\n\t\tisValid: function(){\r\n\t\t\treturn !!this.getNode(this.index);\r\n\t\t},\r\n\t\tfallback:function(){\r\n\t\t\tvar defaultCell = this.getNode(0);\r\n\t\t\tif(!defaultCell){\r\n\t\t\t\tdefaultCell = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}\r\n\t\t\treturn defaultCell;\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tvar newIndex = this.index - 1;\r\n\t\t\t\tif(newIndex < 0){\r\n\t\t\t\t\tnewIndex = this.getNodes().length - 1;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.HeaderCell(newIndex));\r\n\r\n\t\t\t},\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tvar newIndex = this.index + 1;\r\n\t\t\t\tif(newIndex >= this.getNodes().length){\r\n\t\t\t\t\tnewIndex = 0;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.HeaderCell(newIndex));\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t},\r\n\r\n\t\t\t\"enter\": function(){\r\n\t\t\t\tvar node = this.getNode();\r\n\t\t\t\tif(node){\r\n\t\t\t\t\tnode.click();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.HeaderCell.prototype.bindAll(scheduler.$keyboardNavigation.HeaderCell.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.Event = function(id){\r\n\tthis.eventId = null;\r\n\tif(scheduler.getEvent(id)){\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tthis.start = new Date(ev.start_date);\r\n\t\tthis.end = new Date(ev.end_date);\r\n\r\n\t\tthis.section = this._getSection(ev);\r\n\t\tthis.eventId = id;\r\n\t}\r\n};\r\n\r\nscheduler.$keyboardNavigation.Event.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\t_getNodes: function(){\r\n\t\t\treturn Array.prototype.slice.call(scheduler.$container.querySelectorAll(\"[\"+scheduler.config.event_attribute+\"]\"));\r\n\t\t},\r\n\r\n\t\t_modes: scheduler.$keyboardNavigation.SchedulerNode.prototype._modes,\r\n\r\n\t\tgetMode: scheduler.$keyboardNavigation.SchedulerNode.prototype.getMode,\r\n\r\n\t\t_handlers: null,\r\n\t\tisValid: function(){\r\n\t\t\treturn !!(scheduler.getEvent(this.eventId) && this.getNode());\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\tvar eventNode = this._getNodes()[0];\r\n\t\t\tvar defaultElement = null;\r\n\t\t\tif(!eventNode || !(scheduler._locate_event(eventNode))){\r\n\t\t\t\tdefaultElement = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}else{\r\n\t\t\t\tvar id = scheduler._locate_event(eventNode);\r\n\t\t\t\tdefaultElement = new scheduler.$keyboardNavigation.Event(id);\r\n\t\t\t}\r\n\r\n\t\t\treturn defaultElement;\r\n\t\t},\r\n\r\n\t\tisScrolledIntoView: function (el) {\r\n\t\t\tvar eventBox = el.getBoundingClientRect();\r\n\t\t\tvar viewPort = scheduler.$container.querySelector(\".dhx_cal_data\").getBoundingClientRect();\r\n\t\t\t\r\n\t\t\tif(eventBox.bottom < viewPort.top || eventBox.top > viewPort.bottom){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\r\n\t\tgetNode: function(){\r\n\r\n\t\t\tvar idSelector = \"[\"+scheduler.config.event_attribute+\"='\"+this.eventId+\"']\";\r\n\r\n\t\t\tvar inlineEditor = scheduler.$keyboardNavigation.dispatcher.getInlineEditor(this.eventId);\r\n\t\t\tif(inlineEditor){// is inline editor visible\r\n\t\t\t\treturn inlineEditor;\r\n\t\t\t}else{\r\n\t\t\t\tif(scheduler.isMultisectionEvent && scheduler.isMultisectionEvent(scheduler.getEvent(this.eventId))){\r\n\t\t\t\t\tvar nodes = scheduler.$container.querySelectorAll(idSelector);\r\n\t\t\t\t\tfor(var i = 0; i < nodes.length; i++){\r\n\t\t\t\t\t\tif(this.isScrolledIntoView(nodes[i])){\r\n\t\t\t\t\t\t\treturn nodes[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn nodes[0];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn scheduler.$container.querySelector(idSelector);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tvar event = scheduler.getEvent(this.eventId);\r\n\r\n\t\t\tvar calendar = scheduler.getState();\r\n\t\t\tif(event.start_date.valueOf() > calendar.max_date.valueOf() || event.end_date.valueOf() <= calendar.min_date.valueOf()){\r\n\t\t\t\tscheduler.setCurrentView(event.start_date);\r\n\t\t\t}\r\n\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif (this.isScrolledIntoView(node)) {\r\n\t\t\t\tscheduler.$keyboardNavigation.dispatcher.keepScrollPosition((function(){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\t\t}).bind(this));\r\n\t\t\t} else {\r\n\t\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\t}\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\r\n\r\n\t\t_getSection: function(ev){\r\n\t\t\tvar section = null;\r\n\t\t\tvar mode = scheduler.getState().mode;\r\n\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\t\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\t\tsection = ev[timeline.y_property];\r\n\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\tvar unit = scheduler._props[mode];\r\n\t\t\t\tsection = ev[unit.map_to];\r\n\t\t\t}\r\n\t\t\treturn section;\r\n\t\t},\r\n\t\t_moveToSlot: function(dir){\r\n\t\t\tvar ev = scheduler.getEvent(this.eventId);\r\n\t\t\tif(ev){\r\n\t\t\t\tvar section =this._getSection(ev);\r\n\t\t\t\tvar slot = new scheduler.$keyboardNavigation.TimeSlot(ev.start_date, null, section);\r\n\t\t\t\tthis.moveTo(slot.nextSlot(slot, dir));\r\n\t\t\t}else{\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tthis._moveToSlot(\"left\");\r\n\t\t\t},\r\n\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tthis._moveToSlot(\"right\");\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\t\t\t\tif(this.getMode() == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.nextEventHandler();\r\n\t\t\t\t}else {\r\n\t\t\t\t\tthis._moveToSlot(\"down\");\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"space\": function(){\r\n\t\t\t\tvar node = this.getNode();\r\n\t\t\t\tif(node && node.click){\r\n\t\t\t\t\tnode.click();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"up\": function () {\r\n\t\t\t\tif(this.getMode() == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.prevEventHandler();\r\n\t\t\t\t}else {\r\n\t\t\t\t\tthis._moveToSlot(\"up\");\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"delete\": function(){\r\n\t\t\t\tif(scheduler.getEvent(this.eventId)) {\r\n\t\t\t\t\tscheduler._click.buttons[\"delete\"](this.eventId);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t// open lightbox\r\n\t\t\t\"enter\": function () {\r\n\t\t\t\tif(scheduler.getEvent(this.eventId)) {\r\n\t\t\t\t\tscheduler.showLightbox(this.eventId);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\nscheduler.$keyboardNavigation.Event.prototype.bindAll(scheduler.$keyboardNavigation.Event.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.TimeSlot = function(from, to, section, movingDate){\r\n\tvar state = scheduler.getState();\r\n\tvar timeline = scheduler.matrix && scheduler.matrix[state.mode];\r\n\r\n\tif(!from){\r\n\t\tfrom = this.getDefaultDate();\r\n\t}\r\n\r\n\tif(!to){\r\n\r\n\t\tif(timeline){\r\n\t\t\tto = scheduler.date.add(from, timeline.x_step, timeline.x_unit);\r\n\t\t}else{\r\n\t\t\tto = scheduler.date.add(from, scheduler.config.key_nav_step, \"minute\");\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tthis.section = section || this._getDefaultSection();\r\n\tthis.start_date = new Date(from);\r\n\tthis.end_date = new Date(to);\r\n\tthis.movingDate = movingDate || null;\r\n};\r\n\r\nscheduler.$keyboardNavigation.TimeSlot.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\t_handlers:null,\r\n\r\n\t\tgetDefaultDate: function(){\r\n\t\t\tvar from;\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar visibleTime = new Date(state.date);\r\n\t\t\tvisibleTime.setSeconds(0);\r\n\t\t\tvisibleTime.setMilliseconds(0);\r\n\r\n\t\t\tvar nowTime = new Date();\r\n\t\t\tnowTime.setSeconds(0);\r\n\t\t\tnowTime.setMilliseconds(0);\r\n\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[state.mode];\r\n\t\t\tvar showNowTime = false;\r\n\t\t\tif(visibleTime.valueOf() === nowTime.valueOf()){\r\n\t\t\t\tshowNowTime = true;\r\n\t\t\t}\r\n\r\n\t\t\tif(timeline){\r\n\t\t\t\tif(showNowTime){\r\n\t\t\t\t\tif(timeline.x_unit === \"day\"){\r\n\t\t\t\t\t\tnowTime.setHours(0);\r\n\t\t\t\t\t\tnowTime.setMinutes(0);\r\n\t\t\t\t\t}else if(timeline.x_unit === \"hour\"){\r\n\t\t\t\t\t\tnowTime.setMinutes(0);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfrom = nowTime;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfrom = scheduler.date[timeline.name + \"_start\"](new Date(state.date));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfrom = this.findVisibleColumn(from);\r\n\t\t\t}else{\r\n\t\t\t\tfrom = new Date(scheduler.getState().min_date);\r\n\t\t\t\tif(showNowTime){\r\n\t\t\t\t\tfrom = nowTime;\r\n\t\t\t\t}\r\n\t\t\t\tfrom = this.findVisibleColumn(from);\r\n\t\t\t\tif(!showNowTime){\r\n\t\t\t\t\tfrom.setHours(scheduler.config.first_hour);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(!scheduler._table_view){\r\n\t\t\t\t\tvar dataContainer = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\t\tif(dataContainer.scrollTop){\r\n\t\t\t\t\t\tfrom.setHours(scheduler.config.first_hour + Math.ceil(dataContainer.scrollTop / scheduler.config.hour_size_px));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn from;\r\n\t\t},\r\n\r\n\t\tclone: function(timeslot){\r\n\t\t\treturn new scheduler.$keyboardNavigation.TimeSlot(timeslot.start_date, timeslot.end_date, timeslot.section, timeslot.movingDate);\r\n\t\t},\r\n\t\t_getMultisectionView: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view;\r\n\t\t\tif(scheduler._props && scheduler._props[state.mode]) {\r\n\t\t\t\tview = scheduler._props[state.mode];\r\n\t\t\t}else if(scheduler.matrix && scheduler.matrix[state.mode]){\r\n\t\t\t\tview = scheduler.matrix[state.mode];\r\n\t\t\t}\r\n\t\t\treturn view;\r\n\t\t},\r\n\r\n\t\t_getDefaultSection: function(){\r\n\t\t\tvar section = null;\r\n\t\t\tvar view = this._getMultisectionView();\r\n\t\t\tif(view && !section){\r\n\t\t\t\tsection = this._getNextSection();\r\n\t\t\t}\r\n\t\t\treturn section;\r\n\t\t},\r\n\r\n\t\t_getNextSection: function(sectionId, dir){\r\n\t\t\tvar view = this._getMultisectionView();\r\n\t\t\tvar currentIndex = view.order[sectionId];\r\n\t\t\tvar nextIndex = currentIndex;\r\n\t\t\tif(currentIndex !== undefined){\r\n\t\t\t\tnextIndex = currentIndex + dir;\r\n\t\t\t}else{\r\n\t\t\t\tnextIndex = (view.size && view.position) ? view.position : 0;\r\n\t\t\t}\r\n\r\n\t\t\tif(nextIndex < 0){\r\n\t\t\t\tnextIndex = 0;\r\n\t\t\t}\r\n\t\t\tvar options = view.options || view.y_unit;\r\n\r\n\t\t\tif(nextIndex >= options.length){\r\n\t\t\t\tnextIndex = options.length - 1;\r\n\t\t\t}\r\n\t\t\t//nextIndex = nextIndex < 0 ? nextIndex = (view.options || view.y_unit).length -1 : nextIndex;\r\n\r\n\t\t\tif(options[nextIndex]){\r\n\t\t\t\treturn options[nextIndex].key;\r\n\t\t\t}else{\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar isInRange = !(this.start_date.valueOf() < state.min_date.valueOf() || this.start_date.valueOf() >= state.max_date.valueOf());\r\n\r\n\t\t\tif(!isInRange) return false;\r\n\r\n\r\n\t\t\tif(!this.isVisible(this.start_date, this.end_date)) return false;\r\n\r\n\t\t\tvar view = this._getMultisectionView();\r\n\r\n\t\t\tif(view){\r\n\t\t\t\treturn (view.order[this.section] !== undefined);\r\n\t\t\t}else{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t},\r\n\r\n\t\tfallback:function(){\r\n\r\n\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(!defaultSlot.isValid()){\r\n\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t}else{\r\n\t\t\t\treturn defaultSlot;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tgetNodes: function(){\r\n\t\t\treturn Array.prototype.slice.call(scheduler.$container.querySelectorAll(\".dhx_focus_slot\"));\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\treturn this.getNodes()[0];\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tif(this.section && scheduler.getView() && scheduler.getView().smart_rendering && scheduler.getView().scrollTo && !scheduler.$container.querySelector(`[data-section-id=\"${this.section}\"]`)){\r\n\t\t\t\tscheduler.getView().scrollTo({section: this.section});\r\n\t\t\t}\r\n\t\t\tscheduler.$keyboardNavigation.marker.render(this.start_date, this.end_date, this.section);\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\tscheduler.$keyboardNavigation._pasteDate = this.start_date;\r\n\t\t\tscheduler.$keyboardNavigation._pasteSection = this.section;\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t\tscheduler.$keyboardNavigation.marker.clear();\r\n\t\t},\r\n\r\n\t\t_modes: scheduler.$keyboardNavigation.SchedulerNode.prototype._modes,\r\n\r\n\t\t_getMode: scheduler.$keyboardNavigation.SchedulerNode.prototype.getMode,\r\n\r\n\t\taddMonthDate: function(date, dir, extend){\r\n\t\t\tvar res;\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tres = scheduler.date.add(date, -1, \"week\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tres = scheduler.date.add(date, 1, \"week\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tres = scheduler.date.day_start(scheduler.date.add(date, -1, \"day\"));\r\n\t\t\t\t\tres = this.findVisibleColumn(res, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tres = scheduler.date.day_start(scheduler.date.add(date, 1, \"day\"));\r\n\t\t\t\t\tres = this.findVisibleColumn(res, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tres = scheduler.date.day_start(new Date(date));\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tif(date.valueOf() < state.min_date.valueOf() || (!extend && date.valueOf() >= state.max_date.valueOf())){\r\n\t\t\t\tres = new Date(state.min_date);\r\n\t\t\t}\r\n\r\n\t\t\treturn res;\r\n\t\t},\r\n\r\n\t\tnextMonthSlot: function(slot, dir, extend){\r\n\r\n\t\t\tvar start, end;\r\n\t\t\tstart = this.addMonthDate(slot.start_date, dir, extend);\r\n\r\n\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\tend = new Date(start);\r\n\t\t\tend.setHours(scheduler.config.last_hour);\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\r\n\t\t_alignTimeSlot: function(date, minDate, unit, step){\r\n\t\t\tvar currentDate = new Date(minDate);\r\n\t\t\twhile(currentDate.valueOf() < date.valueOf()){\r\n\t\t\t\tcurrentDate = scheduler.date.add(currentDate, step, unit);\r\n\t\t\t}\r\n\r\n\t\t\tif(currentDate.valueOf() > date.valueOf()){\r\n\t\t\t\tcurrentDate = scheduler.date.add(currentDate, -step, unit);\r\n\t\t\t}\r\n\r\n\t\t\treturn currentDate;\r\n\t\t},\r\n\r\n\t\tnextTimelineSlot: function(slot, dir, extend){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view = scheduler.matrix[state.mode];\r\n\r\n\t\t\tvar startDate = this._alignTimeSlot(slot.start_date, scheduler.date[view.name + \"_start\"](new Date(slot.start_date)), view.x_unit, view.x_step);\r\n\t\t\tvar endDate = this._alignTimeSlot(slot.end_date, scheduler.date[view.name + \"_start\"](new Date(slot.end_date)), view.x_unit, view.x_step);\r\n\r\n\t\t\tif(endDate.valueOf() <= startDate.valueOf()){\r\n\t\t\t\tendDate = scheduler.date.add(startDate, view.x_step, view.x_unit);\r\n\t\t\t}\r\n\t\t\tvar newPos = this.clone(slot);\r\n\t\t\tnewPos.start_date = startDate;\r\n\t\t\tnewPos.end_date = endDate;\r\n\t\t\tnewPos.section = slot.section || this._getNextSection();\r\n\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tnewPos.section = this._getNextSection(slot.section, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tnewPos.section = this._getNextSection(slot.section, +1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tnewPos.start_date = this.findVisibleColumn(scheduler.date.add(newPos.start_date, -view.x_step, view.x_unit), -1);\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tnewPos.start_date = this.findVisibleColumn(scheduler.date.add(newPos.start_date, view.x_step, view.x_unit), 1);\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(newPos.start_date.valueOf() < state.min_date.valueOf() || newPos.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tif(extend && newPos.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\t\tnewPos.start_date = new Date(state.max_date);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tnewPos.start_date = scheduler.date[state.mode + \"_start\"](scheduler.date.add(state.date, dir == \"left\" ? -1 : 1, state.mode));\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn newPos;\r\n\t\t},\r\n\r\n\t\tnextUnitsSlot: function(slot, dir, extend){\r\n\t\t\tvar newPos = this.clone(slot);\r\n\t\t\tnewPos.section = slot.section || this._getNextSection();\r\n\r\n\t\t\tvar section = slot.section || this._getNextSection();\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view = scheduler._props[state.mode];\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tsection = this._getNextSection(slot.section, -1);\r\n\t\t\t\t\tvar optionsCount = view.size ? (view.size - 1) : view.options.length;\r\n\r\n\t\t\t\t\tif(view.days > 1 && (view.order[section] == optionsCount - 1)){\r\n\t\t\t\t\t\tif(scheduler.date.add(slot.start_date, -1, \"day\").valueOf() >= state.min_date.valueOf()){\r\n\t\t\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tsection = this._getNextSection(slot.section, 1);\r\n\t\t\t\t\tif(view.days > 1 && !view.order[section]){\r\n\t\t\t\t\t\tif(scheduler.date.add(slot.start_date, 1, \"day\").valueOf() < state.max_date.valueOf()){\r\n\t\t\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\tsection = slot.section;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tnewPos.section = section;\r\n\t\t\treturn newPos;\r\n\t\t},\r\n\r\n\t\t_moveDate: function(oldDate, dir){\r\n\t\t\tvar newDate = this.findVisibleColumn(scheduler.date.add(oldDate, dir, \"day\"), dir);\r\n\t\t\tnewDate.setHours(oldDate.getHours());\r\n\t\t\tnewDate.setMinutes(oldDate.getMinutes());\r\n\t\t\treturn newDate;\r\n\t\t},\r\n\r\n\t\tisBeforeLastHour: function(date, isStartDate){\r\n\t\t\tvar minutes = date.getMinutes(),\r\n\t\t\t\thours = date.getHours(),\r\n\t\t\t\tlast_hour = scheduler.config.last_hour;\r\n\t\t\treturn (hours < last_hour || (!isStartDate && ((last_hour == 24 || hours == last_hour) && !minutes)));\r\n\t\t},\r\n\t\tisAfterFirstHour: function(date, isStartDate){\r\n\t\t\tvar minutes = date.getMinutes(),\r\n\t\t\t\thours = date.getHours(),\r\n\t\t\t\tfirst_hour = scheduler.config.first_hour,\r\n\t\t\t\tlast_hour = scheduler.config.last_hour;\r\n\t\t\treturn (hours >= first_hour || (!isStartDate && (!minutes && ((!hours && last_hour == 24) || (hours == last_hour)))));\r\n\t\t},\r\n\t\tisInVisibleDayTime: function(date, isStartDate){\r\n\t\t\treturn (this.isBeforeLastHour(date, isStartDate) && this.isAfterFirstHour(date, isStartDate));\r\n\t\t},\r\n\r\n\t\tnextDaySlot: function(slot, dir, extend){\r\n\t\t\tvar start, end;\r\n\r\n\t\t\tvar key_nav_step = scheduler.config.key_nav_step;\r\n\r\n\t\t\tvar date = this._alignTimeSlot(slot.start_date, scheduler.date.day_start(new Date(slot.start_date)), \"minute\", key_nav_step);\r\n\r\n\r\n\t\t\tvar oldStart = slot.start_date;\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tstart = scheduler.date.add(date, -key_nav_step, \"minute\");\r\n\r\n\t\t\t\t\tif(!this.isInVisibleDayTime(start, true)){\r\n\t\t\t\t\t\tif (!extend || this.isInVisibleDayTime(oldStart, true)) {\r\n\r\n\t\t\t\t\t\t\tvar toNextDay = true;\r\n\t\t\t\t\t\t\tif(extend && scheduler.date.date_part(new Date(start)).valueOf() != scheduler.date.date_part(new Date(oldStart)).valueOf())\r\n\t\t\t\t\t\t\t\ttoNextDay = false;\r\n\t\t\t\t\t\t\tif(toNextDay)\r\n\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, -1, \"day\"), -1);\r\n\r\n\t\t\t\t\t\t\tstart.setHours(scheduler.config.last_hour);\r\n\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\tstart = scheduler.date.add(start, -key_nav_step, \"minute\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tstart = scheduler.date.add(date, key_nav_step, \"minute\");\r\n\r\n\t\t\t\t\tvar testEnd = extend ? start : scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tif(!this.isInVisibleDayTime(testEnd, false)){\r\n\t\t\t\t\t\tif(!extend || this.isInVisibleDayTime(oldStart, false)) {\r\n\t\t\t\t\t\t\tif (!extend) {\r\n\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, 1, \"day\"), 1);\r\n\t\t\t\t\t\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tvar toNextDay = true;\r\n\t\t\t\t\t\t\t\tif (scheduler.date.date_part(new Date(oldStart)).valueOf() == oldStart.valueOf()) {\r\n\t\t\t\t\t\t\t\t\ttoNextDay = false;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (toNextDay) {\r\n\t\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, 1, \"day\"), 1);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\t\tstart = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tstart = this._moveDate(slot.start_date, -1);\r\n\t\t\t\t\tend = this._moveDate(slot.end_date, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tstart = this._moveDate(slot.start_date, 1);\r\n\t\t\t\t\tend = this._moveDate(slot.end_date, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tstart = date;\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\t\tnextWeekAgendaSlot: function(slot, dir){\r\n\t\t\tvar start, end;\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tstart = scheduler.date.day_start(scheduler.date.add(slot.start_date, -1, \"day\"));\r\n\t\t\t\t\tstart = this.findVisibleColumn(start, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tstart = scheduler.date.day_start(scheduler.date.add(slot.start_date, 1, \"day\"));\r\n\t\t\t\t\tstart = this.findVisibleColumn(start, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tstart = scheduler.date.day_start(slot.start_date);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif(slot.start_date.valueOf() < state.min_date.valueOf() || slot.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tstart = new Date(state.min_date);\r\n\r\n\t\t\t}\r\n\t\t\tend = new Date(start);\r\n\t\t\tend.setHours(scheduler.config.last_hour);\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\t\tnextAgendaSlot: function(slot, dir){\r\n\t\t\treturn {start_date: slot.start_date, end_date: slot.end_date};\r\n\t\t},\r\n\r\n\r\n\t\tisDateVisible: function(date){\r\n\t\t\tif(!scheduler._ignores_detected)\r\n\t\t\t\treturn true;\r\n\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[scheduler.getState().mode];\r\n\r\n\t\t\tvar index;\r\n\t\t\tif(timeline){\r\n\t\t\t\tindex = scheduler._get_date_index(timeline, date);\r\n\t\t\t}else{\r\n\t\t\t\tindex = scheduler.locate_holder_day(date);\r\n\t\t\t}\r\n\r\n\t\t\treturn !scheduler._ignores[index];\r\n\t\t},\r\n\r\n\t\tfindVisibleColumn: function(start, dir){\r\n\t\t\tvar date = start;\r\n\t\t\tdir = dir || 1;\r\n\t\t\tvar range = scheduler.getState();\r\n\r\n\t\t\twhile(!this.isDateVisible(date) && ((dir > 0 && date.valueOf() <= range.max_date.valueOf()) || (dir < 0 && date.valueOf() >= range.min_date.valueOf()))){\r\n\t\t\t\tdate = this.nextDateColumn(date, dir);\r\n\t\t\t}\r\n\r\n\t\t\treturn date;\r\n\t\t},\r\n\r\n\t\tnextDateColumn: function(start, dir){\r\n\t\t\tdir = dir || 1;\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[scheduler.getState().mode];\r\n\r\n\t\t\tvar date;\r\n\t\t\tif(timeline){\r\n\t\t\t\tdate = scheduler.date.add(start, dir * timeline.x_step, timeline.x_unit);\r\n\t\t\t}else{\r\n\t\t\t\tdate = scheduler.date.day_start(scheduler.date.add(start, dir, \"day\"));\r\n\t\t\t}\r\n\r\n\t\t\treturn date;\r\n\t\t},\r\n\r\n\t\tisVisible:function(from, to){\r\n\t\t\tif(!scheduler._ignores_detected)\r\n\t\t\t\treturn true;\r\n\r\n\t\t\tvar current = new Date(from);\r\n\r\n\t\t\twhile(current.valueOf() < to.valueOf()){\r\n\t\t\t\tif(this.isDateVisible(current)) return true;\r\n\t\t\t\tcurrent = this.nextDateColumn(current);\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t},\r\n\r\n\t\tnextSlot: function(slot, dir, view, extend){\r\n\t\t\tvar next;\r\n\t\t\tview = view || this._getMode();\r\n\r\n\t\t\tvar tempSlot = scheduler.$keyboardNavigation.TimeSlot.prototype.clone(slot);\r\n\r\n\t\t\tswitch (view){\r\n\t\t\t\tcase this._modes.units:\r\n\t\t\t\t\tnext = this.nextUnitsSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.timeline:\r\n\t\t\t\t\tnext = this.nextTimelineSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.year:\r\n\t\t\t\t\tnext = this.nextMonthSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.month:\r\n\t\t\t\t\tnext = this.nextMonthSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.weekAgenda:\r\n\t\t\t\t\tnext = this.nextWeekAgendaSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.list:\r\n\t\t\t\t\tnext = this.nextAgendaSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.dayColumns:\r\n\t\t\t\t\tnext = this.nextDaySlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(next.start_date.valueOf() >= next.end_date.valueOf()){\r\n\t\t\t\tnext = this.nextSlot(next, dir, view);\r\n\t\t\t}\r\n\r\n\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(next);\r\n\r\n\t\t},\r\n\r\n\t\textendSlot: function(slot, dir){\r\n\t\t\tvar view = this._getMode();\r\n\t\t\tvar next;\r\n\t\t\tswitch (view){\r\n\t\t\t\tcase this._modes.units:\r\n\t\t\t\t\tif(dir == \"left\" || dir == \"right\"){\r\n\t\t\t\t\t\tnext = this.nextUnitsSlot(slot, dir);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnext = this.extendUnitsSlot(slot, dir);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.timeline:\r\n\t\t\t\t\tif(dir == \"down\" || dir == \"up\"){\r\n\t\t\t\t\t\tnext = this.nextTimelineSlot(slot, dir);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnext = this.extendTimelineSlot(slot, dir);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.year:\r\n\t\t\t\t\tnext = this.extendMonthSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.month:\r\n\t\t\t\t\tnext = this.extendMonthSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.dayColumns:\r\n\t\t\t\t\tnext = this.extendDaySlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.weekAgenda:\r\n\t\t\t\t\tnext = this.extendWeekAgendaSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnext = slot;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tvar range = scheduler.getState();\r\n\t\t\tif(next.start_date.valueOf() < range.min_date.valueOf()){\r\n\t\t\t\tnext.start_date = this.findVisibleColumn(range.min_date);\r\n\t\t\t\tnext.start_date.setHours(scheduler.config.first_hour);\r\n\t\t\t}\r\n\r\n\t\t\tif(next.end_date.valueOf() > range.max_date.valueOf()){\r\n\t\t\t//\tnext.end_date = new Date(slot.end_date);\r\n\t\t\t\tnext.end_date = this.findVisibleColumn(range.max_date, -1);\r\n\t\t\t}\r\n\r\n\r\n\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(next);\r\n\t\t},\r\n\r\n\t\textendTimelineSlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"timeline\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\textendWeekAgendaSlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"weekAgenda\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\textendGenericSlot: function(allowedDirections, slot, direction, type){\r\n\t\t\tvar next;\r\n\t\t\tvar moveDate = slot.movingDate;\r\n\r\n\t\t\tif(!moveDate){\r\n\t\t\t\tmoveDate = allowedDirections[direction];\r\n\t\t\t}\r\n\r\n\t\t\tif(!moveDate || !allowedDirections[direction]){\r\n\t\t\t\treturn slot;\r\n\t\t\t}\r\n\r\n\t\t\tif(direction){\r\n\t\t\t\tnext = this.nextSlot({start_date: slot[moveDate], section: slot.section}, direction, type, true);\r\n\r\n\t\t\t\tif(next.start_date.valueOf() == slot.start_date.valueOf()){\r\n\t\t\t\t\tnext = this.nextSlot({start_date: next.start_date, section:next.section}, direction, type, true);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tnext.movingDate = moveDate;\r\n\t\t\t}else{\r\n\t\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(slot);\r\n\t\t\t}\r\n\r\n\t\t\tvar newDates = this.extendSlotDates(slot, next, next.movingDate);\r\n\r\n\t\t\tif(newDates.end_date.valueOf() <= newDates.start_date.valueOf()){\r\n\t\t\t\tnext.movingDate = next.movingDate == \"end_date\" ? \"start_date\" : \"end_date\";\r\n\t\t\t}\r\n\t\t\tnewDates = this.extendSlotDates(slot, next, next.movingDate);\r\n\r\n\t\t\tnext.start_date = newDates.start_date;\r\n\t\t\tnext.end_date = newDates.end_date;\r\n\t\t\treturn next;\r\n\t\t},\r\n\r\n\t\textendSlotDates: function(oldSlot, newSlot, dateDirection){\r\n\t\t\tvar res = {start_date:null, end_date:null};\r\n\r\n\t\t\tif(dateDirection == \"start_date\"){\r\n\t\t\t\tres.start_date = newSlot.start_date;\r\n\t\t\t\tres.end_date = oldSlot.end_date;\r\n\t\t\t}else{\r\n\t\t\t\tres.start_date = oldSlot.start_date;\r\n\t\t\t\tres.end_date = newSlot.start_date;\r\n\t\t\t}\r\n\t\t\treturn res;\r\n\r\n\t\t},\r\n\r\n\t\textendMonthSlot: function(slot, direction){\r\n\t\t\tvar slot = this.extendGenericSlot({\r\n\t\t\t\t\t\"up\":\"start_date\",\r\n\t\t\t\t\t\"down\":\"end_date\",\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"month\"\r\n\t\t\t);\r\n\r\n\t\t\tslot.start_date.setHours(scheduler.config.first_hour);\r\n\t\t\tslot.end_date = scheduler.date.add(slot.end_date, -1, \"day\");\r\n\t\t\tslot.end_date.setHours(scheduler.config.last_hour);\r\n\t\t\treturn slot;\r\n\t\t},\r\n\r\n\t\textendUnitsSlot: function(slot, direction){\r\n\t\t\tvar next;\r\n\r\n\t\t\tswitch (direction){\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tnext = this.extendDaySlot(slot, direction);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnext = slot;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tnext.section = slot.section;\r\n\t\t\treturn next;\r\n\t\t},\r\n\t\textendDaySlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\t\"up\":\"start_date\",\r\n\t\t\t\t\t\"down\":\"end_date\",\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"dayColumns\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\tscrollSlot: function(dir){\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tvar slot = this.nextSlot(this, dir);\r\n\t\t\tif(slot.start_date.valueOf() < state.min_date.valueOf() || slot.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tscheduler.setCurrentView(new Date(slot.start_date));\r\n\t\t\t}\r\n\r\n\t\t\tthis.moveTo(slot);\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tthis.scrollSlot(\"left\");\r\n\t\t\t},\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tthis.scrollSlot(\"right\");\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\r\n\t\t\t\tvar mode = this._getMode();\r\n\t\t\t\tif(mode == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.nextEventHandler();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.scrollSlot(\"down\");\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"up\": function () {\r\n\t\t\t\tvar mode = this._getMode();\r\n\t\t\t\tif(mode == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.prevEventHandler();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.scrollSlot(\"up\");\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"shift+down\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"down\"));\r\n\t\t\t},\r\n\t\t\t\"shift+up\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"up\"));\r\n\t\t\t},\r\n\t\t\t\"shift+right\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"right\"));\r\n\t\t\t},\r\n\t\t\t\"shift+left\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"left\"));\r\n\t\t\t},\r\n\r\n\r\n\t\t\t\"enter\": function(){\r\n\t\t\t\tvar obj = {start_date: new Date(this.start_date), end_date: new Date(this.end_date)};\r\n\r\n\t\t\t\tvar mode = scheduler.getState().mode;\r\n\t\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\r\n\t\t\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\t\t\tobj[timeline.y_property] = this.section;\r\n\t\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\t\tvar unit = scheduler._props[mode];\r\n\t\t\t\t\tobj[unit.map_to] = this.section;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler.addEventNow(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.TimeSlot.prototype.bindAll(scheduler.$keyboardNavigation.TimeSlot.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.MinicalButton = function(div, index){\r\n\tthis.container = div;\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.MinicalButton.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar container = this.container;\r\n\t\t\treturn !!container.offsetWidth;// valid if container is visible\r\n\t\t},\r\n\r\n\t\tfallback: function(){\r\n\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(defaultSlot.isValid()){\r\n\t\t\t\treturn defaultSlot;\r\n\t\t\t}else{\r\n\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t}\r\n\t\t},\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.globalNode.disable();\r\n\t\t\tthis.container.removeAttribute(\"tabindex\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tthis.container.setAttribute(\"tabindex\", \"0\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\tif(!this.index){\r\n\t\t\t\treturn this.container.querySelector(\".dhx_cal_prev_button\");\r\n\t\t\t}else{\r\n\t\t\t\treturn this.container.querySelector(\".dhx_cal_next_button\");\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"right\": function(e){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, this.index ? 0 : 1));\r\n\t\t\t},\r\n\t\t\t\"left\": function(e){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, this.index ? 0 : 1));\r\n\t\t\t},\r\n\t\t\t\"down\": function(){\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, 0, 0);\r\n\t\t\t\tif(next && !next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"enter\": function(e){\r\n\t\t\t\tthis.getNode().click();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.MinicalButton.prototype.bindAll(scheduler.$keyboardNavigation.MinicalButton.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.MinicalCell = function(div, row, col){\r\n\tthis.container = div;\r\n\tthis.row = row || 0;\r\n\tthis.col = col || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.MinicalCell.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar grid = this._getGrid();\r\n\t\t\treturn !!(grid[this.row] && grid[this.row][this.col]);\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\tvar row = this.row;\r\n\t\t\tvar col = this.col;\r\n\t\t\tvar grid = this._getGrid();\r\n\t\t\tif(!grid[row]){\r\n\t\t\t\trow = 0;\r\n\t\t\t}\r\n\t\t\tvar dir = true;\r\n\t\t\tif(row > grid.length / 2){\r\n\t\t\t\tdir = false;\r\n\t\t\t}\r\n\r\n\t\t\tif(!grid[row]){\r\n\t\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t\tif(defaultSlot.isValid()){\r\n\t\t\t\t\treturn defaultSlot;\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(dir){\r\n\t\t\t\tfor(var c = col; grid[row] && c < grid[row].length; c++){\r\n\t\t\t\t\tif(!grid[row][c] && c == grid[row].length - 1){\r\n\t\t\t\t\t\trow++;\r\n\t\t\t\t\t\tcol = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(grid[row][c]){\r\n\t\t\t\t\t\treturn new scheduler.$keyboardNavigation.MinicalCell(this.container, row, c);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tfor(var c = col; grid[row] && c < grid[row].length; c--){\r\n\t\t\t\t\tif(!grid[row][c] && !c){\r\n\t\t\t\t\t\trow--;\r\n\t\t\t\t\t\tcol = grid[row].length - 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(grid[row][c]){\r\n\t\t\t\t\t\treturn new scheduler.$keyboardNavigation.MinicalCell(this.container, row, c);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn new scheduler.$keyboardNavigation.MinicalButton(this.container, 0);\r\n\t\t},\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.globalNode.disable();\r\n\r\n\t\t\tthis.container.removeAttribute(\"tabindex\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tthis.container.setAttribute(\"tabindex\", \"0\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\t\t_getNode: function(row, col){\r\n\t\t\treturn this.container.querySelector(\".dhx_year_body tr:nth-child(\"+(row + 1) + \") td:nth-child(\"+(col + 1)+\")\");\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\treturn this._getNode(this.row, this.col);\r\n\t\t},\r\n\r\n\t\t_getGrid: function(){\r\n\t\t\tvar rows = this.container.querySelectorAll(\".dhx_year_body tr\");\r\n\t\t\tvar grid = [];\r\n\t\t\tfor(var i = 0; i < rows.length; i++){\r\n\t\t\t\tgrid[i] = [];\r\n\t\t\t\tvar row = rows[i];\r\n\t\t\t\tvar cells = row.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var c = 0; c < cells.length; c++){\r\n\t\t\t\t\tvar cell = cells[c];\r\n\t\t\t\t\tvar enabled = true;\r\n\t\t\t\t\tvar css = scheduler._getClassName(cell);\r\n\t\t\t\t\tif(css.indexOf(\"dhx_after\") > -1 || css.indexOf(\"dhx_before\") > -1 || css.indexOf(\"dhx_scale_ignore\") > -1){\r\n\t\t\t\t\t\tenabled = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tgrid[i][c] = enabled;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn grid;\r\n\t\t},\r\n\r\n\r\n\t\tkeys: {\r\n\t\t\t\"right\": function(e){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row;\r\n\t\t\t\tvar newCol = this.col + 1;\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tif(grid[newRow + 1]){\r\n\t\t\t\t\t\tnewRow = newRow + 1;\r\n\t\t\t\t\t\tnewCol = 0;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnewCol = this.col;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"left\": function(e){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row;\r\n\t\t\t\tvar newCol = this.col - 1;\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tif(grid[newRow - 1]){\r\n\t\t\t\t\t\tnewRow = newRow - 1;\r\n\t\t\t\t\t\tnewCol = grid[newRow].length - 1;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnewCol = this.col;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"down\": function(){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row + 1;\r\n\t\t\t\tvar newCol = this.col;\r\n\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tnewRow = this.row;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"up\": function(){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row - 1;\r\n\t\t\t\tvar newCol = this.col;\r\n\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tvar index = 0;\r\n\t\t\t\t\tif(this.col > grid[this.row].length / 2){\r\n\t\t\t\t\t\tindex = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, index));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.moveTo(next);\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\t\t\t\"enter\": function(e){\r\n\t\t\t\tthis.getNode().querySelector(\".dhx_month_head\").click();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.MinicalCell.prototype.bindAll(scheduler.$keyboardNavigation.MinicalCell.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.DataArea = function(index){\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.DataArea.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\tgetNode: function(index){\r\n\t\t\treturn scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t},\r\n\r\n\t\t_handlers:null,\r\n\r\n\t\tisValid: function(){\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tfallback:function(){\r\n\t\t\treturn this;\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"up,down,right,left\":function(){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.DataArea.prototype.bindAll(scheduler.$keyboardNavigation.DataArea.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.dispatcher = {\r\n\tisActive: false,\r\n\tactiveNode: null,\r\n\tglobalNode: new scheduler.$keyboardNavigation.SchedulerNode(),\r\n\r\n\tkeepScrollPosition: function (callback) {\r\n\t\tvar top, left;\r\n\r\n\t\tvar scrollable = scheduler.$container.querySelector(\".dhx_timeline_scrollable_data\");\r\n\t\tif(!scrollable){\r\n\t\t\tscrollable = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t}\r\n\r\n\t\tif(scrollable){\r\n\t\t\ttop = scrollable.scrollTop;\r\n\t\t\tleft = scrollable.scrollLeft;\r\n\t\t}\r\n\r\n\t\tcallback();\r\n\r\n\t\tif(scrollable){\r\n\t\t\tscrollable.scrollTop = top;\r\n\t\t\tscrollable.scrollLeft = left;\r\n\t\t}\r\n\t},\r\n\tenable: function(){\r\n\t\tif(!scheduler.$container){\r\n\t\t\t// do nothing if not initialized\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.isActive = true;\r\n\t\tvar self = this;\r\n\t\tthis.keepScrollPosition(function () {\r\n\t\t\tself.globalNode.enable();\r\n\t\t\tself.setActiveNode(self.getActiveNode());\r\n\t\t});\r\n\t},\r\n\r\n\tdisable: function(){\r\n\t\tthis.isActive = false;\r\n\t\tthis.globalNode.disable();\r\n\t},\r\n\r\n\tisEnabled: function(){\r\n\t\treturn !!this.isActive;\r\n\t},\r\n\r\n\tgetDefaultNode: function(){\r\n\t\treturn this.globalNode.getDefaultNode();\r\n\t},\r\n\r\n\tsetDefaultNode: function() {\r\n\t\tthis.setActiveNode(this.getDefaultNode());\r\n\t},\r\n\r\n\tgetActiveNode: function(){\r\n\t\tvar node = this.activeNode;\r\n\t\tif(node && !node.isValid()){\r\n\t\t\tnode = node.fallback();\r\n\t\t}\r\n\t\treturn node;\r\n\t},\r\n\r\n\tfocusGlobalNode: function(){\r\n\t\tthis.blurNode(this.globalNode);\r\n\t\tthis.focusNode(this.globalNode);\r\n\t},\r\n\r\n\tsetActiveNode: function(el){\r\n\t\tif(!el || !el.isValid())\r\n\t\t\treturn;\r\n\r\n\t\tif(this.activeNode){\r\n\t\t\tif(this.activeNode.compareTo(el)){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(this.isEnabled()){\r\n\t\t\tthis.blurNode(this.activeNode);\r\n\t\t\tthis.activeNode = el;\r\n\t\t\tthis.focusNode(this.activeNode);\r\n\t\t}\r\n\t},\r\n\r\n\tfocusNode: function(el){\r\n\t\tif(el && el.focus){\r\n\t\t\tel.focus();\r\n\t\t\tif(el.getNode && document.activeElement != el.getNode()){\r\n\t\t\t\tthis.setActiveNode(new scheduler.$keyboardNavigation.DataArea());\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tblurNode: function(el){\r\n\t\tif(el && el.blur){\r\n\t\t\tel.blur();\r\n\t\t}\r\n\t},\r\n\r\n\tgetInlineEditor: function(id){\r\n\t\tvar editor = scheduler.$container.querySelector(\".dhx_cal_editor[\"+scheduler.config.event_attribute+\"='\"+id+\"'] textarea\");\r\n\t\tif(editor && editor.offsetWidth){\r\n\t\t\t// if exists and visible\r\n\t\t\treturn editor;\r\n\t\t}\r\n\t\treturn null;\r\n\t},\r\n\r\n\tkeyDownHandler: function (e) {\r\n\r\n\t\tif(e.defaultPrevented){\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar activeElement = this.getActiveNode();\r\n\r\n\t\tif(scheduler.$keyboardNavigation.isModal() &&\r\n\t\t\t!(activeElement && activeElement.container && scheduler.utils.dom.locateCss({target:activeElement.container}, \"dhx_minical_popup\", false)))\r\n\t\t\treturn;\r\n\r\n\t\tif(scheduler.getState().editor_id && this.getInlineEditor(scheduler.getState().editor_id))\r\n\t\t\treturn;\r\n\r\n\t\tif (!this.isEnabled())\r\n\t\t\treturn;\r\n\r\n\t\te = e || window.event;\r\n\r\n\t\tvar schedulerNode = this.globalNode;\r\n\r\n\t\tvar command = scheduler.$keyboardNavigation.shortcuts.getCommandFromEvent(e);\r\n\r\n\t\tif(!activeElement){\r\n\t\t\tthis.setDefaultNode();\r\n\t\t}else if(activeElement.findHandler(command)){\r\n\t\t\tactiveElement.doAction(command, e);\r\n\t\t}else if(schedulerNode.findHandler(command)){\r\n\t\t\tschedulerNode.doAction(command, e);\r\n\t\t}\r\n\r\n\t},\r\n\r\n\t_timeout: null,\r\n\tdelay: function(callback, delay){\r\n\r\n\t\tclearTimeout(this._timeout);\r\n\t\tthis._timeout = setTimeout(callback, delay || 1);\r\n\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation._minicalendars = [];\r\n\r\nscheduler.$keyboardNavigation.isMinical = function(node){\r\n\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\tif(this.isChildOf(node, minicalendars[i]))\r\n\t\t\treturn true;\r\n\t}\r\n\treturn false;\r\n};\r\n\r\nscheduler.$keyboardNavigation.isChildOf = function(child, parent){\r\n\twhile(child && child !== parent){\r\n\t\tchild = child.parentNode;\r\n\t}\r\n\r\n\treturn !!(child === parent);\r\n};\r\n\r\nscheduler.$keyboardNavigation.patchMinicalendar = function(){\r\n\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\tfunction focusMinical(e){\r\n\t\tvar target = e.target;\r\n\r\n\t\tdispatcher.enable();\r\n\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.MinicalButton(target, 0));\r\n\t}\r\n\r\n\tfunction minicalClick(e){\r\n\t\tvar target = e.target || e.srcElement;\r\n\r\n\t\tvar prev = scheduler.utils.dom.locateCss(e, \"dhx_cal_prev_button\", false);\r\n\t\tvar next = scheduler.utils.dom.locateCss(e, \"dhx_cal_next_button\", false);\r\n\t\tvar cell = scheduler.utils.dom.locateCss(e, \"dhx_year_body\", false);\r\n\r\n\t\tvar rowIndex = 0;\r\n\t\tvar cellIndex = 0;\r\n\t\tif(cell){\r\n\t\t\tvar tr;\r\n\t\t\tvar td;\r\n\t\t\tvar current = target;\r\n\t\t\twhile(current && current.tagName.toLowerCase() != \"td\"){\r\n\t\t\t\tcurrent = current.parentNode;\r\n\t\t\t}\r\n\t\t\tif(current){\r\n\t\t\t\ttd = current;\r\n\t\t\t\ttr = td.parentNode;\r\n\t\t\t}\r\n\r\n\t\t\tif(tr && td){\r\n\t\t\t\tvar rows = tr.parentNode.querySelectorAll(\"tr\");\r\n\t\t\t\tfor(var i = 0; i < rows.length; i++){\r\n\t\t\t\t\tif(rows[i] == tr){\r\n\t\t\t\t\t\trowIndex = i;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tvar cells = tr.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\t\t\tif(cells[i] == td){\r\n\t\t\t\t\t\tcellIndex = i;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tvar root = e.currentTarget;\r\n\t\tdispatcher.delay(function(){\r\n\t\t\tif(prev || next || cell){\r\n\r\n\t\t\t\tvar element;\r\n\t\t\t\tif(prev){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalButton(root, 0);\r\n\t\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.MinicalButton(root, 0));\r\n\t\t\t\t}else if(next){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalButton(root, 1);\r\n\t\t\t\t}else if(cell){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalCell(root, rowIndex, cellIndex);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(element){\r\n\r\n\t\t\t\t\tdispatcher.enable();\r\n\t\t\t\t\tif(element.isValid()){\r\n\t\t\t\t\t\tdispatcher.activeNode = null;\r\n\t\t\t\t\t\tdispatcher.setActiveNode(element);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t}\r\n\r\n\tif(scheduler.renderCalendar){\r\n\t\tvar renderMinical = scheduler.renderCalendar;\r\n\t\tscheduler.renderCalendar = function(){\r\n\t\t\tvar cal = renderMinical.apply(this, arguments);\r\n\t\t\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\r\n\t\t\tscheduler.eventRemove(cal, \"click\", minicalClick);\r\n\t\t\tscheduler.event(cal, \"click\", minicalClick);\r\n\r\n\t\t\tscheduler.eventRemove(cal, \"focus\", focusMinical);\r\n\t\t\tscheduler.event(cal, \"focus\", focusMinical);\r\n\r\n\t\t\tvar added = false;\r\n\t\t\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\t\t\tif(minicalendars[i] == cal){\r\n\t\t\t\t\tadded = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(!added)\r\n\t\t\t\tminicalendars.push(cal);\r\n\r\n\t\t\tif(dispatcher.isEnabled()){\r\n\t\t\t\tvar node = dispatcher.getActiveNode();\r\n\t\t\t\tif(node && node.container == cal){\r\n\t\t\t\t\tdispatcher.focusNode(node);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcal.setAttribute(\"tabindex\", \"0\");\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tcal.setAttribute(\"tabindex\", \"0\");\r\n\t\t\t}\r\n\t\t\treturn cal;\r\n\t\t};\r\n\t}\r\n\r\n\tif(scheduler.destroyCalendar){\r\n\t\tvar destroyMinical = scheduler.destroyCalendar;\r\n\t\tscheduler.destroyCalendar = function(cal, force){\r\n\t\t\tcal = cal || (scheduler._def_count ? scheduler._def_count.firstChild : null);\r\n\t\t\tvar res = destroyMinical.apply(this, arguments);\r\n\r\n\t\t\tif(!cal || !cal.parentNode){\r\n\t\t\t\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\t\t\t\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\t\t\t\tif(minicalendars[i] == cal){\r\n\t\t\t\t\t\tscheduler.eventRemove(minicalendars[i], \"focus\", focusMinical);\r\n\t\t\t\t\t\tminicalendars.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn res;\r\n\t\t};\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\r\n\tthis.layers.sort(function(a, b){\r\n\t\treturn a.zIndex - b.zIndex;\r\n\t});\r\n\r\n\tscheduler._dp_init=function(dp){\r\n\t\tdp._methods=[\"_set_event_text_style\",\"\",\"changeEventId\",\"deleteEvent\"];\r\n\r\n\t\tthis.attachEvent(\"onEventAdded\",function(id){\r\n\t\t\tif (!this._loading && this.validId(id) && this.getEvent(id) && this.getEvent(id).layer == dp.layer)\r\n\t\t\t\tdp.setUpdated(id,true,\"inserted\");\r\n\t\t});\r\n\t\tthis.attachEvent(\"onBeforeEventDelete\",function(id){\r\n\t\t\tif(this.getEvent(id) && this.getEvent(id).layer == dp.layer) {\r\n\t\t\t\tif (!this.validId(id)) return;\r\n\t\t\t\tvar z=dp.getState(id);\r\n\r\n\t\t\t\tif (z==\"inserted\" || this._new_event) { dp.setUpdated(id,false);\t\treturn true; }\r\n\t\t\t\tif (z==\"deleted\") return false;\r\n\t\t\t\tif (z==\"true_deleted\") return true;\r\n\r\n\t\t\t\tdp.setUpdated(id,true,\"deleted\");\r\n\t\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\telse return true;\r\n\t\t});\r\n\t\tthis.attachEvent(\"onEventChanged\",function(id){\r\n\t\t\tif (!this._loading && this.validId(id) && this.getEvent(id) && this.getEvent(id).layer == dp.layer)\r\n\t\t\t\tdp.setUpdated(id,true,\"updated\");\r\n\t\t});\r\n\r\n\t\tdp._getRowData=function(id,pref){\r\n\t\t\tvar ev=this.obj.getEvent(id);\r\n\t\t\tvar data = {};\r\n\r\n\t\t\tfor (var a in ev){\r\n\t\t\t\tif (a.indexOf(\"_\")===0) continue;\r\n\t\t\t\tif (ev[a] && ev[a].getUTCFullYear) //not very good, but will work\r\n\t\t\t\t\tdata[a] = this.obj._helpers.formatDate(ev[a]);\r\n\t\t\t\telse\r\n\t\t\t\t\tdata[a] = ev[a];\r\n\t\t\t}\r\n\t\t\treturn data;\r\n\t\t};\r\n\t\tdp._clearUpdateFlag=function(){};\r\n\r\n\t\tdp.attachEvent(\"insertCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"updateCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"deleteCallback\", function(upd, id) {\r\n\t\t\tthis.obj.setUserData(id, this.action_param, \"true_deleted\");\r\n\t\t\tthis.obj.deleteEvent(id);\r\n\t\t});\r\n\t};\r\n\r\n\t(function() {\r\n var _cloneObj = function(obj){\r\n if(obj === null || typeof(obj) != 'object')\r\n return obj;\r\n var temp = new obj.constructor();\r\n for(var key in obj)\r\n temp[key] = _cloneObj(obj[key]);\r\n return temp;\r\n };\r\n\r\n\t\tscheduler._dataprocessors = [];\r\n\t\tscheduler._layers_zindex = {};\r\n\t\tfor(var i=0; i= scheduler.config.collision_limit);\r\n\t});\r\n\r\n\tscheduler.addEvent=function(start_date,end_date,text,id,extra_data){\r\n\t\tvar ev=start_date;\r\n\t\tif (arguments.length!=1){\r\n\t\t\tev=extra_data||{};\r\n\t\t\tev.start_date=start_date;\r\n\t\t\tev.end_date=end_date;\r\n\t\t\tev.text=text;\r\n\t\t\tev.id=id;\r\n\t\t\tev.layer = this.defaultLayer;\r\n\t\t}\r\n\t\tev.id = ev.id||scheduler.uid();\r\n\t\tev.text = ev.text||\"\";\r\n\r\n\r\n\t\tif (typeof ev.start_date == \"string\") ev.start_date=this.templates.api_date(ev.start_date);\r\n\t\tif (typeof ev.end_date == \"string\") ev.end_date=this.templates.api_date(ev.end_date);\r\n\t\tev._timed=this.isOneDayEvent(ev);\r\n\r\n\t\tvar is_new=!this._events[ev.id];\r\n\t\tthis._events[ev.id]=ev;\r\n\t\tthis.event_updated(ev);\r\n\t\tif (!this._loading)\r\n\t\t\tthis.callEvent(is_new?\"onEventAdded\":\"onEventChanged\",[ev.id,ev]);\r\n\t};\r\n\r\n\tthis._evs_layer = {};\r\n\tfor (var i = 0; i < this.layers.length; i++) { // array in object for each layer\r\n\t\tthis._evs_layer[this.layers[i].name] = [];\r\n\t}\r\n\r\n\tscheduler.addEventNow=function(start,end,e){\r\n\t\tvar base = {};\r\n\t\tif (typeof start == \"object\"){\r\n\t\t\tbase = start;\r\n\t\t\tstart = null;\r\n\t\t}\r\n\r\n\t\tvar d = (this.config.event_duration||this.config.time_step)*60000;\r\n\t\tif (!start) start = Math.round((scheduler._currentDate()).valueOf()/d)*d;\r\n\t\tvar start_date = new Date(start);\r\n\t\tif (!end){\r\n\t\t\tvar start_hour = this.config.first_hour;\r\n\t\t\tif (start_hour > start_date.getHours()){\r\n\t\t\t\tstart_date.setHours(start_hour);\r\n\t\t\t\tstart = start_date.valueOf();\r\n\t\t\t}\r\n\t\t\tend = start+d;\r\n\t\t}\r\n\r\n\r\n\t\tbase.start_date = base.start_date||start_date;\r\n\t\tbase.end_date = base.end_date||new Date(end);\r\n\t\tbase.text = base.text||this.locale.labels.new_event;\r\n\t\tbase.id = this._drag_id = this.uid();\r\n\t\tbase.layer = this.defaultLayer;\r\n\t\tthis._drag_mode=\"new-size\";\r\n\r\n\t\tthis._loading=true;\r\n\t\tthis.addEvent(base);\r\n\t\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\t\tthis._loading=false;\r\n\r\n\t\tthis._drag_event={}; //dummy , to trigger correct event updating logic\r\n\t\tthis._on_mouse_up(e);\r\n\t};\r\n\r\n\tscheduler._t_render_view_data = function(events) { // helper\r\n\t\tif (this.config.multi_day && !this._table_view) {\r\n\t\t\tvar tvs = [];\r\n\t\t\tvar tvd = [];\r\n\t\t\tfor (var k = 0; k < events.length; k++) {\r\n\t\t\t\tif (events[k]._timed)\r\n\t\t\t\t\ttvs.push(events[k]);\r\n\t\t\t\telse\r\n\t\t\t\t\ttvd.push(events[k]);\r\n\t\t\t}\r\n\t\t\tthis._table_view = true;\r\n\t\t\tthis.render_data(tvd);\r\n\t\t\tthis._table_view = false;\r\n\t\t\tthis.render_data(tvs);\r\n\t\t}\r\n\t\telse\r\n\t\t\tthis.render_data(events);\r\n\t};\r\n\r\n\tscheduler.render_view_data = function(){\r\n\t\tif (this._not_render) {\r\n\t\t\tthis._render_wait = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._render_wait = false;\r\n\r\n\t\tthis.clear_view();\r\n\r\n\t\tthis._evs_layer = {};\r\n\t\tfor (var i = 0; i < this.layers.length; i++) { // array in object for each layer\r\n\t\t\tthis._evs_layer[this.layers[i].name] = [];\r\n\t\t}\r\n\r\n\t\tvar evs = this.get_visible_events();\r\n\t\tfor (var i = 0; i < evs.length; i++) { // filling layer arrays with events\r\n\t\t\tif(this._evs_layer[evs[i].layer])\r\n\t\t\t\tthis._evs_layer[evs[i].layer].push(evs[i]);\r\n\t\t}\r\n\r\n\t\tif(this._mode == 'month') { // old logic is used\r\n\t\t\tvar tevs = [];\r\n\t\t\tfor (var i = 0; i < this.layers.length; i++) {\r\n\t\t\t\tif (this.layers[i].visible)\r\n\t\t\t\t\ttevs = tevs.concat(this._evs_layer[this.layers[i].name]);\r\n\t\t\t}\r\n\t\t\tthis._t_render_view_data(tevs);\r\n\t\t}\r\n\t\telse { // week, day; should use new logic\r\n\t\t\tfor (var i = 0; i < this.layers.length; i++) {\r\n\t\t\t\tif (this.layers[i].visible) {\r\n\t\t\t\t\tvar evs_layer = this._evs_layer[this.layers[i].name];\r\n\t\t\t\t\tthis._t_render_view_data(evs_layer);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._render_v_bar=function(ev,x,y,w,h,style,contentA,contentB,bottom){\r\n\t\tvar id = ev.id;\r\n\r\n\t\tif(contentA.indexOf('
';\r\n\t\thtml+='
 
';\r\n\t\thtml+='
'+contentA+'
';\r\n\t\thtml+='
'+contentB+'
';\r\n\t\thtml+='
';\r\n\r\n\t\td.innerHTML=html;\r\n\t\td.style.zIndex = 100;\r\n\t\treturn d.firstChild;\r\n\t};\r\n\r\n\tscheduler.render_event_bar=function(ev){\r\n\t\tvar parent=this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tvar x=this._colsS[ev._sday];\r\n\t\tvar x2=this._colsS[ev._eday];\r\n\t\tif (x2==x) x2=this._colsS[ev._eday+1];\r\n\t\tvar hb = this.xy.bar_height;\r\n\r\n\t\tvar y=this._colsS.heights[ev._sweek]+(this._colsS.height?(this.xy.month_scale_height+2):2)+ev._sorder*hb;\r\n\r\n\t\tvar d=document.createElement(\"div\");\r\n\t\tvar cs = ev._timed?\"dhx_cal_event_clear\":\"dhx_cal_event_line\";\r\n\t\tvar cse = (scheduler.templates['event_class_'+ev.layer])?scheduler.templates['event_class_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_class(ev.start_date,ev.end_date,ev);\r\n\t\tif (cse) cs=cs+\" \"+cse;\r\n\r\n\t\tvar html='
';\r\n\r\n\t\tif (ev._timed)\r\n\t\t\thtml+=(scheduler.templates['event_bar_date_'+ev.layer])?scheduler.templates['event_bar_date_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_bar_date(ev.start_date,ev.end_date,ev);\r\n\t\thtml+=( (scheduler.templates['event_bar_text_'+ev.layer])?scheduler.templates['event_bar_text_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_bar_text(ev.start_date,ev.end_date,ev) + '
)');\r\n\t\thtml+='';\r\n\r\n\t\td.innerHTML=html;\r\n\r\n\t\tthis._rendered.push(d.firstChild);\r\n\t\tparent.appendChild(d.firstChild);\r\n\t};\r\n\r\n\tscheduler.render_event=function(ev){\r\n\t\tvar menu = scheduler.xy.menu_width;\r\n\t\tif(scheduler.getLayer(ev.layer).noMenu)\r\n\t\t\tmenu = 0;\r\n\r\n\t\tif (ev._sday<0) return; //can occur in case of recurring event during time shift\r\n\t\tvar parent=scheduler.locate_holder(ev._sday);\r\n\t\tif (!parent) return; //attempt to render non-visible event\r\n\t\tvar sm = ev.start_date.getHours()*60+ev.start_date.getMinutes();\r\n\t\tvar em = (ev.end_date.getHours()*60+ev.end_date.getMinutes())||(scheduler.config.last_hour*60);\r\n\r\n\t\tvar top = (Math.round((sm*60*1000-this.config.first_hour*60*60*1000)*this.config.hour_size_px/(60*60*1000)))%(this.config.hour_size_px*24)+1; //42px/hour\r\n\t\tvar height = Math.max(scheduler.xy.min_event_height,(em-sm)*this.config.hour_size_px/60)+1; //42px/hour\r\n\t\t\r\n\t\tvar width=Math.floor((parent.clientWidth-menu)/ev._count);\r\n\t\tvar left=ev._sorder*width+1;\r\n\t\tif (!ev._inner) width=width*(ev._count-ev._sorder);\r\n\r\n\r\n\r\n\t\tvar d=this._render_v_bar(ev.id,menu+left,top,width,height,ev._text_style,scheduler.templates.event_header(ev.start_date,ev.end_date,ev),scheduler.templates.event_text(ev.start_date,ev.end_date,ev));\r\n\r\n\t\tthis._rendered.push(d);\r\n\t\tparent.appendChild(d);\r\n\r\n\t\tleft=left+parseInt(parent.style.left,10)+menu;\r\n\r\n\t\ttop+=this._dy_shift; //corrupt top, to include possible multi-day shift\r\n\t\td.style.zIndex = this._layers_zindex[ev.layer];\r\n\r\n\t\tif (this._edit_id==ev.id){\r\n\t\t\td.style.zIndex = parseInt(d.style.zIndex)+1; //fix overlapping issue\r\n\t\t\tvar new_zIndex = d.style.zIndex;\r\n\t\t\twidth=Math.max(width-4,scheduler.xy.editor_width);\r\n\t\t\tvar d=document.createElement(\"div\");\r\n\t\t\td.setAttribute(\"event_id\",ev.id); // for backward compatibility\r\n\t\t\td.setAttribute(this.config.event_attribute,ev.id);\r\n\t\t\tthis.set_xy(d,width,height-20,left,top+14);\r\n\t\t\td.className=\"dhx_cal_editor\";\r\n\t\t\td.style.zIndex = new_zIndex;\r\n\t\t\tvar d2=document.createElement(\"div\");\r\n\t\t\tthis.set_xy(d2,width-6,height-26);\r\n\t\t\td2.style.cssText+=\";margin:2px 2px 2px 2px;overflow:hidden;\";\r\n\r\n\r\n\t\t\td2.style.zIndex = new_zIndex;\r\n\t\t\td.appendChild(d2);\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].appendChild(d);\r\n\t\t\tthis._rendered.push(d);\r\n\r\n\t\t\td2.innerHTML=\"\";\r\n\r\n\t\t\tthis._editor=d2.firstChild;\r\n\t\t\tthis._editor.addEventListener(\"keypress\", function(e){\r\n\t\t\t\tif (e.shiftKey) return true;\r\n\t\t\t\tvar code= e.keyCode;\r\n\t\t\t\tif (code==scheduler.keys.edit_save) scheduler.editStop(true);\r\n\t\t\t\tif (code==scheduler.keys.edit_cancel) scheduler.editStop(false);\r\n\t\t\t});\r\n\t\t\tthis._editor.addEventListener(\"selectstart\", function(e){ e.cancelBubble=true; return true; });\r\n\t\t\td2.firstChild.focus();\r\n\t\t\t//IE and opera can add x-scroll during focusing\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].scrollLeft=0;\r\n\t\t\td2.firstChild.select();\r\n\t\t}\r\n\t\tif (this._select_id==ev.id){\r\n\t\t\td.style.zIndex = parseInt(d.style.zIndex)+1; //fix overlapping issue\r\n\t\t\tvar icons=this.config[\"icons_\"+((this._edit_id==ev.id)?\"edit\":\"select\")];\r\n\t\t\tvar icons_str=\"\";\r\n\t\t\tfor (var i=0; i\";\r\n\t\t\tvar obj = this._render_v_bar(ev.id,left-menu+1,top,menu,icons.length*20+26,\"\",\"
\",icons_str,true);\r\n\t\t\tobj.style.left=left-menu+1;\r\n\t\t\tobj.style.zIndex = d.style.zIndex;\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].appendChild(obj);\r\n\t\t\tthis._rendered.push(obj);\r\n\t\t}\r\n\r\n\t};\r\n\r\n scheduler.filter_agenda = function(id, event) {\r\n var layer = scheduler.getLayer(event.layer);\r\n return (layer && layer.visible);\r\n };\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.limit_start = null;\r\nscheduler.config.limit_end = null;\r\nscheduler.config.limit_view = false;\r\nscheduler.config.check_limits = true;\r\nscheduler.config.mark_now = true;\r\nscheduler.config.display_marked_timespans = true;\r\nscheduler.config.overwrite_marked_timespans = true;\r\nscheduler._temp_limit_scope = function(){\r\n\tvar before = null;\r\n\tvar dhx_time_block = \"dhx_time_block\";\r\n\tvar default_timespan_type = \"default\";\r\n\tvar fix_options = function(options, days, zones) {\r\n\t\tif (days instanceof Date && zones instanceof Date) {\r\n\t\t\toptions.start_date = days;\r\n\t\t\toptions.end_date = zones;\r\n\t\t} else {\r\n\t\t\toptions.days = days;\r\n\t\t\toptions.zones = zones;\r\n\t\t}\r\n\t\treturn options;\r\n\t};\r\n\tvar get_resulting_options = function(days, zones, sections) {\r\n\t\tvar options = (typeof days == \"object\") ? days : { days: days };\r\n\t\toptions.type = dhx_time_block;\r\n\t\toptions.css = \"\";\r\n\t\tif (zones) {\r\n\t\t\tif (sections)\r\n\t\t\t\toptions.sections = sections;\r\n\t\t\toptions = fix_options(options, days, zones);\r\n\t\t}\r\n\t\treturn options;\r\n\t};\r\n\tscheduler.blockTime = function(days, zones, sections){\r\n\t\tvar options = get_resulting_options(days, zones, sections);\r\n\t\treturn scheduler.addMarkedTimespan(options);\r\n\t};\r\n\tscheduler.unblockTime = function(days, zones, sections) {\r\n\t\tzones = zones || \"fullday\";\r\n\t\tvar options = get_resulting_options(days, zones, sections);\r\n\t\treturn scheduler.deleteMarkedTimespan(options);\r\n\t};\r\n\tscheduler.attachEvent(\"onBeforeViewChange\",function(om,od,nm,nd){\r\n\r\n\t\tfunction isBlocked(date, mode){\r\n\t\t\tvar limit_start = scheduler.config.limit_start,\r\n\t\t\t\tlimit_end = scheduler.config.limit_end,\r\n\t\t\t\tdate_end = scheduler.date.add(date,1,mode);\r\n\r\n\t\t\treturn (date.valueOf() > limit_end.valueOf() || date_end <= limit_start.valueOf());\r\n\t\t}\r\n\r\n\t\tif (scheduler.config.limit_view){\r\n\t\t\tnd = nd||od; nm = nm||om;\r\n\t\t\tif (isBlocked(nd, nm) && !(od.valueOf() == nd.valueOf())){\r\n\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvar resetDate = !isBlocked(od, nm) ? od : scheduler.config.limit_start;\r\n\r\n\t\t\t\t\tscheduler.setCurrentView(!isBlocked(resetDate, nm) ? resetDate : null, nm);\r\n\t\t\t\t},1);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.checkInMarkedTimespan = function(ev, timespan_type, on_overlap){\r\n\t\ttimespan_type = timespan_type || default_timespan_type;\r\n\r\n\t\tvar res = true;\r\n\t\tvar temp_start_date = new Date(ev.start_date.valueOf());\r\n\t\tvar temp_end_date = scheduler.date.add(temp_start_date, 1, \"day\");\r\n\t\tvar timespans = scheduler._marked_timespans;\r\n\t\tfor (; temp_start_date < ev.end_date; temp_start_date = scheduler.date.date_part(temp_end_date), temp_end_date = scheduler.date.add(temp_start_date, 1, \"day\") ) {\r\n\t\t\tvar day_value = +scheduler.date.date_part( new Date(temp_start_date) ); // the first part of event not necessarily contains only date part\r\n\t\t\tvar day_index = temp_start_date.getDay();\r\n\r\n\t\t\tvar zones = getZones(ev, timespans, day_index, day_value, timespan_type);\r\n\t\t\tif (zones){\r\n\t\t\t\tfor (var i = 0; i < zones.length; i+=2) {\r\n\r\n\t\t\t\t\t// they may change for new event if it passes limit zone\r\n\t\t\t\t\tvar eventStart = scheduler._get_zone_minutes(temp_start_date);\r\n\t\t\t\t\tvar eventEnd = ( ev.end_date>temp_end_date || ev.end_date.getDate() != temp_start_date.getDate() ) ? 1440 : scheduler._get_zone_minutes(ev.end_date);\r\n\r\n\t\t\t\t\tvar markerStart = zones[i];\r\n\t\t\t\t\tvar markerEnd = zones[i+1];\r\n\t\t\t\t\tif (markerStarteventStart) {\r\n\t\t\t\t\t\tif(typeof on_overlap == \"function\"){\r\n\t\t\t\t\t\t\t//handler allows to cancel overlapping\r\n\t\t\t\t\t\t\t//actually needed only to keep default behavior of limits\r\n\t\t\t\t\t\t\tres = on_overlap(ev, eventStart, eventEnd, markerStart, markerEnd);//event object, event start/end minutes in 'zones' format, zone start/end minutes\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tres = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(!res)\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn !res;\r\n\t};\r\n\tvar blocker = scheduler.checkLimitViolation = function(event){\r\n\t\tif(!event)\r\n\t\t\treturn true;\r\n\t\tif (!scheduler.config.check_limits)\r\n\t\t\treturn true;\r\n\t\tvar s = scheduler;\r\n\t\tvar c = s.config;\r\n\t\tvar evs = [];\r\n\t\tif (event.rec_type) {\r\n\t\t\tvar dates = scheduler.getRecDates(event);\r\n\t\t\tfor(var i=0; i < dates.length; i++){\r\n\t\t\t\tvar ev = scheduler._copy_event(event);\r\n\t\t\t\tscheduler._lame_copy(ev, dates[i]);\r\n\t\t\t\tevs.push(ev);\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\tevs = [event];\r\n\t\t}\r\n\r\n\t\tvar complete_res = true;\r\n\t\tfor (var p=0; p= c.limit_start.valueOf() && ev.end_date.valueOf() <= c.limit_end.valueOf()) : true;\r\n\t\t\tif (res){\r\n\t\t\t\tres = !scheduler.checkInMarkedTimespan(ev, dhx_time_block, function(event, eventStart, eventEnd, markerStart, markerEnd){\r\n\t\t\t\t\t//try crop event to allow placing\r\n\t\t\t\t\tvar allow = true;\r\n\t\t\t\t\tif (eventStart<=markerEnd && eventStart >= markerStart){\r\n\t\t\t\t\t\tif (markerEnd == 24*60 || eventEnd <= markerEnd){\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(event._timed && s._drag_id && s._drag_mode == \"new-size\"){\r\n\t\t\t\t\t\t\tevent.start_date.setHours(0);\r\n\t\t\t\t\t\t\tevent.start_date.setMinutes(markerEnd);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ((eventEnd >= markerStart && eventEnd <= markerEnd) || (eventStart < markerStart && eventEnd > markerEnd)){\r\n\t\t\t\t\t\tif(event._timed && s._drag_id && s._drag_mode == \"new-size\"){\r\n\t\t\t\t\t\t\tevent.end_date.setHours(0);\r\n\t\t\t\t\t\t\tevent.end_date.setMinutes(markerStart);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn allow;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\tif (!res) {\r\n\t\t\t\tres = (s.checkEvent(\"onLimitViolation\")) ? s.callEvent(\"onLimitViolation\",[ev.id, ev]) : res;\r\n\t\t\t}\r\n\t\t\tcomplete_res = complete_res && res;\r\n\t\t}\r\n\t\tif(!complete_res){\r\n\t\t\ts._drag_id = null;\r\n\t\t\ts._drag_mode = null;\r\n\t\t}\r\n\t\treturn complete_res;\r\n\r\n\r\n\t};\r\n\tscheduler._get_blocked_zones = function(timespans, property, day_index, day_value, timespan_type){\r\n\t\tvar zones =[];\r\n\t\tif (timespans && timespans[property]) {\r\n\t\t\tvar timeline_zones = timespans[property];\r\n\t\t\tvar blocked_timeline_zones = this._get_relevant_blocked_zones(day_index, day_value, timeline_zones, timespan_type);\r\n\t\t\tfor (var i=0; i= scheduler.config.limit_end.valueOf()) {\r\n\t\t\t\tev.start_date = this.date.add(scheduler.config.limit_end, -1, \"day\");\r\n\t\t\t}\r\n\t\t\tif (ev.end_date < scheduler.config.limit_start) {\r\n\t\t\t\tev.end_date = new Date(scheduler.config.limit_start);\r\n\t\t\t}\r\n\t\t\tif (ev.end_date.valueOf() >= scheduler.config.limit_end.valueOf()) {\r\n\t\t\t\tev.end_date = this.date.add(scheduler.config.limit_end, -1, \"day\");\r\n\t\t\t}\r\n\t\t\tif (ev.start_date.valueOf() >= ev.end_date.valueOf()) {\r\n\t\t\t\tev.end_date = this.date.add(ev.start_date, (this.config.event_duration||this.config.time_step), \"minute\");\r\n\t\t\t}\r\n\t\t\tev._timed=this.isOneDayEvent(ev);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventChanged\",function(id){\r\n\t\tif (!id) return true;\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tif (!blocker(ev)){\r\n\t\t\tif (!before) return false;\r\n\t\t\tev.start_date = before[0];\r\n\t\t\tev.end_date = before[1];\r\n\t\t\tev._timed=this.isOneDayEvent(ev);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onBeforeEventChanged\",function(ev, native_object, is_new){\r\n\t\treturn blocker(ev);\r\n\t});\r\n\tscheduler.attachEvent(\"onBeforeEventCreated\", function(ev) { // native event\r\n\t\tvar start_date = scheduler.getActionData(ev).date;\r\n\t\tvar event = {\r\n\t\t\t_timed: true,\r\n\t\t\tstart_date: start_date,\r\n\t\t\tend_date: scheduler.date.add(start_date, scheduler.config.time_step, \"minute\")\r\n\t\t};\r\n\t\treturn blocker(event);\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", function(){\r\n\t\tscheduler._mark_now();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onAfterSchedulerResize\", function(){\r\n\t\twindow.setTimeout(function(){ \r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler._mark_now(); \r\n\t\t}, 1);\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\t\tscheduler._mark_now_timer = window.setInterval(function() {\r\n\t\t\tif(!scheduler._is_initialized())\r\n\t\t\t\treturn;\r\n\t\t\tscheduler._mark_now();\r\n\t\t}, 60000);\r\n\t});\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tclearInterval(scheduler._mark_now_timer);\r\n\t});\r\n\tscheduler._mark_now = function(hide) {\r\n\t\t// day, week, units views\r\n\t\tvar dhx_now_time = 'dhx_now_time';\r\n\t\tif (!this._els[dhx_now_time]) {\r\n\t\t\tthis._els[dhx_now_time] = [];\r\n\t\t}\r\n\t\tvar now = scheduler._currentDate();\r\n\t\tvar cfg = this.config;\r\n\t\tscheduler._remove_mark_now(); // delete previous marks if they exist\r\n\t\tif (!hide && cfg.mark_now && now < this._max_date && now > this._min_date && now.getHours() >= cfg.first_hour && now.getHours() 1) {\r\n\t\t\t\t\tif(view.size && view.options.length){\r\n\t\t\t\t\t\tday_index = ((view.position+ day_index) / view.options.length) * view.size;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstart_index = day_index;\r\n\t\t\t\t\tend_index = day_index + units_l;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tstart_index = 0;\r\n\t\t\t\t\tend_index = start_index + units_l;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar r_divs = [];\r\n\r\n\t\t\t\tfor (var i = start_index; i < end_index; i++) {\r\n\t\t\t\t\tvar t_day = i; // as each unit is actually considered +1 day\r\n\t\t\t\t\toptions.days = t_day;\r\n\t\t\t\t\tvar t_div = scheduler._render_marked_timespan(options, null, t_day)[0];\r\n\t\t\t\t\tr_divs.push(t_div);\r\n\t\t\t\t}\r\n\t\t\t\treturn r_divs;\r\n\t\t\t} else { // day/week views\r\n\t\t\t\toptions.days = day_index;\r\n\t\t\t\treturn scheduler._render_marked_timespan(options, null, day_index);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\toptions.days = +scheduler.date.date_part(now);\r\n\t\t\t\treturn scheduler._render_marked_timespan(options, null, null);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\tscheduler._remove_mark_now = function() {\r\n\t\tvar dhx_now_time = 'dhx_now_time';\r\n\t\tvar els = this._els[dhx_now_time];\r\n\t\tfor (var i=0; i config.start_date) || (config.days !== undefined && config.zones)) && !config.type )\r\n\t\t\treturn r_configs; // incorrect config was provided\r\n\r\n\t\tvar min = 0;\r\n\t\tvar max = 24*60;\r\n\t\tif (config.zones == \"fullday\")\r\n\t\t\tconfig.zones = [min, max];\r\n\t\tif (config.zones && config.invert_zones) {\r\n\t\t\tconfig.zones = scheduler.invertZones(config.zones);\r\n\t\t}\r\n\r\n\t\tconfig.id = scheduler.uid();\r\n\t\tconfig.css = config.css||\"\";\r\n\t\tconfig.type = config.type||default_timespan_type;\r\n\r\n\t\tvar sections = config.sections;\r\n\t\tif (sections) {\r\n\t\t\tfor (var view_key in sections) {\r\n\t\t\t\tif (sections.hasOwnProperty(view_key)) {\r\n\t\t\t\t\tvar ids = sections[view_key];\r\n\t\t\t\t\tif (!(ids instanceof Array))\r\n\t\t\t\t\t\tids = [ids];\r\n\t\t\t\t\tfor (var i=0; i t_sd) ? scheduler._get_zone_minutes(start_date) : min;\r\n\t\t\t\t\tvar zone_end = ( end_date > t_ed || end_date.getDate() != t_sd.getDate() ) ? max : scheduler._get_zone_minutes(end_date);\r\n\t\t\t\t\tt_config.zones = [zone_start, zone_end];\r\n\t\t\t\t\tr_configs.push(t_config);\r\n\r\n\t\t\t\t\tt_sd = t_ed;\r\n\t\t\t\t\tt_ed = scheduler.date.add(t_ed, 1, \"day\");\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (c_config.days instanceof Date)\r\n\t\t\t\t\tc_config.days = (scheduler.date.date_part(c_config.days)).valueOf();\r\n\t\t\t\tc_config.zones = config.zones.slice();\r\n\t\t\t\tr_configs.push(c_config);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn r_configs;\r\n\t};\r\n\tscheduler._get_dates_by_index = function(index, start, end) {\r\n\t\tvar dates = [];\r\n\t\tstart = scheduler.date.date_part(new Date(start||scheduler._min_date));\r\n\t\tend = new Date(end||scheduler._max_date);\r\n\t\tvar start_day = start.getDay();\r\n\t\tvar delta = (index-start_day >= 0) ? (index-start_day) : (7-start.getDay()+index);\r\n\t\tvar t_date = scheduler.date.add(start, delta, \"day\");\r\n\t\tfor (; t_date < end; t_date = scheduler.date.add(t_date, 1, \"week\")) {\r\n\t\t\tdates.push(t_date);\r\n\t\t}\r\n\t\treturn dates;\r\n\t};\r\n\tscheduler._get_css_classes_by_config = function(config) {\r\n\t\tvar css_classes = [];\r\n\t\tif (config.type == dhx_time_block) {\r\n\t\t\tcss_classes.push(dhx_time_block);\r\n\t\t\tif (config.css)\r\n\t\t\t\tcss_classes.push(dhx_time_block+\"_reset\");\r\n\t\t}\r\n\t\tcss_classes.push(\"dhx_marked_timespan\", config.css);\r\n\t\treturn css_classes.join(\" \");\r\n\t};\r\n\tscheduler._get_block_by_config = function(config) {\r\n\t\tvar block = document.createElement(\"div\");\r\n\t\tif (config.html) {\r\n\t\t\tif (typeof config.html == \"string\")\r\n\t\t\t\tblock.innerHTML = config.html;\r\n\t\t\telse\r\n\t\t\t\tblock.appendChild(config.html);\r\n\t\t}\r\n\t\treturn block;\r\n\t};\r\n\tscheduler._render_marked_timespan = function(options, area, day) {\r\n\t\tvar blocks = []; // resulting block which will be rendered and returned\r\n\t\tvar c = scheduler.config;\r\n\t\tvar min_date = this._min_date;\r\n\t\tvar max_date = this._max_date;\r\n\t\tvar day_value = false; // if timespan for specific date should be displayed\r\n\r\n\t\tif (!c.display_marked_timespans)\r\n\t\t\treturn blocks;\r\n\r\n\t\t// in case of markTimespan\r\n\t\tif (!day && day !== 0) {\r\n\t\t\tif (options.days < 7)\r\n\t\t\t\tday = options.days;\r\n\t\t\telse {\r\n\t\t\t\tvar date_to_display = new Date(options.days);\r\n\t\t\t\tday_value = +date_to_display;\r\n\r\n\t\t\t\t// in case of markTimespan date could be not in the viewing range, need to return\r\n\t\t\t\tif ( !(+max_date > +date_to_display && +min_date <= +date_to_display) )\r\n\t\t\t\t\treturn blocks;\r\n\r\n\t\t\t\tday = date_to_display.getDay();\r\n\t\t\t}\r\n\r\n\t\t\t// convert day default index (Sun - 0, Sat - 6) to index of hourscales (depends on week_start and config.start_on_monday)\r\n\t\t\tvar min_day = min_date.getDay();\r\n\t\t\tif (min_day > day) {\r\n\t\t\t\tday = 7 - (min_day-day);\r\n\t\t\t} else {\r\n\t\t\t\tday = day - min_day;\r\n\t\t\t}\r\n\t\t}\r\n\t\tvar zones = options.zones;\r\n\t\tvar css_classes = scheduler._get_css_classes_by_config(options);\r\n\r\n\t\tif (scheduler._table_view && scheduler._mode == \"month\") {\r\n\t\t\tvar areas = [];\r\n\t\t\tvar days = [];\r\n\r\n\r\n\t\t\tif (!area) {\r\n\t\t\t\tdays = (day_value) ? [day_value] : scheduler._get_dates_by_index(day);\r\n\t\t\t\tfor (var i=0; i < days.length; i++) {\r\n\t\t\t\t\tareas.push( this._scales[days[i]] );\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tareas.push(area);\r\n\t\t\t\tdays.push(day);\r\n\t\t\t}\r\n\r\n\t\t\tfor (var i=0; i < areas.length; i++) {\r\n\t\t\t\tarea = areas[i];\r\n\t\t\t\tday = days[i];\r\n\r\n\t\t\t\tvar sday = this.locate_holder_day(day, false) % this._cols.length;\r\n\r\n\t\t\t\tif(this._ignores[sday]) continue;\r\n\r\n\t\t\t\tvar block_proto = scheduler._get_block_by_config(options);\r\n\t\t\t\tblock_proto.className = css_classes;\r\n\t\t\t\tblock_proto.style.top = \"0px\";\r\n\t\t\t\tblock_proto.style.height = \"100%\";\r\n\t\t\t\t\r\n\t\t\t\tfor (var k=0; k < zones.length; k+=2) {\r\n\t\t\t\t\tvar start = zones[i];\r\n\t\t\t\t\tvar end = zones[i+1];\r\n\t\t\t\t\tif (end <= start)\r\n\t\t\t\t\t\treturn [];\r\n\r\n\t\t\t\t\tvar block = block_proto.cloneNode(true);\r\n\r\n\t\t\t\t\tblock.style.left = \"0px\";\r\n\t\t\t\t\tblock.style.width = \"100%\";\r\n\r\n\t\t\t\t\tarea.appendChild(block);\r\n\t\t\t\t\tblocks.push(block);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tvar index = day;\r\n\r\n\t\t\tif(this._ignores[this.locate_holder_day(day, false)]) return blocks;\r\n\r\n\t\t\tif (this._props && this._props[this._mode] && options.sections && options.sections[this._mode]) {\r\n\t\t\t\tvar view = this._props[this._mode];\r\n\t\t\t\tindex = view.order[options.sections[this._mode]];\r\n\r\n\t\t\t\tvar inner_index = view.order[options.sections[this._mode]];\r\n\t\t\t\tif(!(view.days > 1)){\r\n\t\t\t\t\tindex = inner_index;\r\n\t\t\t\t\tif (view.size && (index > view.position+view.size)) {\r\n\t\t\t\t\t\tindex = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar units_l = view.size || view.options.length;\r\n\t\t\t\t\tindex = index*units_l + inner_index;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tarea = area ? area : scheduler.locate_holder(index);\r\n\r\n\t\t\tfor (var i = 0; i < zones.length; i+=2){\r\n\t\t\t\tvar start = Math.max(zones[i], c.first_hour*60);\r\n\t\t\t\tvar end = Math.min(zones[i+1], c.last_hour*60);\r\n\t\t\t\tif (end <= start) {\r\n\t\t\t\t\tif (i+2 < zones.length)\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\treturn [];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar block = scheduler._get_block_by_config(options);\r\n\t\t\t\tblock.className = css_classes;\r\n\r\n\t\t\t\t// +1 for working with section which really takes up whole height (as % would be == 0)\r\n\t\t\t\tvar all_hours_height = this.config.hour_size_px*24 + 1;\r\n\t\t\t\tvar hour_ms = 60*60*1000;\r\n\t\t\t\tblock.style.top = (Math.round((start*60*1000-this.config.first_hour*hour_ms)*this.config.hour_size_px/hour_ms) % all_hours_height) + \"px\";\r\n\t\t\t\tblock.style.height = Math.max((Math.round(((end-start)*60*1000)*this.config.hour_size_px/hour_ms)) % all_hours_height, 1)+\"px\";\r\n\r\n\t\t\t\tarea.appendChild(block);\r\n\t\t\t\tblocks.push(block);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn blocks;\r\n\t};\r\n\r\n\tscheduler._mark_timespans = function(){\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\t\tvar divs = [];\r\n\t\tif (scheduler._table_view && scheduler._mode == \"month\"){\r\n\t\t\tfor (var day in this._scales) {\r\n\t\t\t\tvar date = new Date(+day);\r\n\t\t\t\tdivs.push.apply(divs, scheduler._on_scale_add_marker(this._scales[day],date));\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\t//manually trigger rendering of configs for each column\r\n\t\t\tvar date = new Date(scheduler._min_date);\r\n\t\t\tfor (var i = 0, len = data.childNodes.length; i < len; i++) {\r\n\t\t\t\tvar area = data.childNodes[i];\r\n\t\t\t\tif (area.firstChild && scheduler._getClassName(area.firstChild).indexOf(\"dhx_scale_hour\") > -1) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdivs.push.apply(divs, scheduler._on_scale_add_marker(area, date));\r\n\t\t\t\tdate = scheduler.date.add(date, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn divs;\r\n\t};\r\n\r\n\t// just marks timespan, will be cleaned after refresh\r\n\tscheduler.markTimespan = function(configuration) {\r\n\r\n\t\tif(!this._els){\r\n\t\t\tthrow new Error(\"`scheduler.markTimespan` can't be used before scheduler initialization. Place `scheduler.markTimespan` call after `scheduler.init`.\");\r\n\t\t}\r\n\r\n\t\tvar rebuild_els = false;\r\n\t\tif(!this._els[\"dhx_cal_data\"]){\r\n\t\t\tscheduler.get_elements();\r\n\t\t\trebuild_els = true;\r\n\t\t}\r\n\r\n\r\n\t\t// backup regular marked timespans\r\n\t\tvar timespans_ids = scheduler._marked_timespans_ids,\r\n\t\t\ttimespan_types = scheduler._marked_timespans_types,\r\n\t\t\ttimespans = scheduler._marked_timespans;\r\n\r\n\t\tscheduler.deleteMarkedTimespan();\r\n\r\n\t\t//add block to configs\r\n\t\tscheduler.addMarkedTimespan(configuration);\r\n\r\n\t\tvar divs = scheduler._mark_timespans();\r\n\r\n\t\tif(rebuild_els)\r\n\t\t\tscheduler._els = [];\r\n\r\n\t\t// restore timespan config\r\n\t\tscheduler._marked_timespans_ids = timespans_ids;\r\n\t\tscheduler._marked_timespans_types = timespan_types;\r\n\t\tscheduler._marked_timespans = timespans;\r\n\r\n\t\treturn divs;\r\n\t};\r\n\tscheduler.unmarkTimespan = function(divs) {\r\n\t\tif (!divs)\r\n\t\t\treturn;\r\n\t\tfor (var i=0; i c_zone_end && zone_start <= c_zone_end) || (zone_start < c_zone_start && zone_end >= c_zone_start)) {\r\n\t\t\t\t\tresulting_zones[i] = Math.min(c_zone_start, zone_start);\r\n\t\t\t\t\tresulting_zones[i+1] = Math.max(c_zone_end, zone_end);\r\n\t\t\t\t\ti -= 2;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (!isLast) // do nothing, maybe next current zone will match or will be last\r\n\t\t\t\t\t\tcontinue;\r\n\r\n\t\t\t\t\tvar offset = (c_zone_start > zone_start)?0:2;\r\n\t\t\t\t\tresulting_zones.splice(i+offset, 0, zone_start, zone_end); // last current zone, need to add another\r\n\t\t\t\t}\r\n\t\t\t\tzones.splice(k--,2); // zone was merged or added, need to exclude it\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn resulting_zones;\r\n\t};\r\n\tscheduler._subtract_timespan_zones = function(current_zones, zones) {\r\n\t\tvar resulting_zones = current_zones.slice();\r\n\t\tfor (var i=0; i c_zone_start && zone_start < c_zone_end) {\r\n\t\t\t\t\tvar is_modified = false;\r\n\t\t\t\t\tif (c_zone_start >= zone_start && c_zone_end <= zone_end) {\r\n\t\t\t\t\t\tresulting_zones.splice(i, 2);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (c_zone_start < zone_start) {\r\n\t\t\t\t\t\tresulting_zones.splice(i, 2, c_zone_start, zone_start);\r\n\t\t\t\t\t\tis_modified = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (c_zone_end > zone_end) {\r\n\t\t\t\t\t\tresulting_zones.splice( (is_modified)?(i+2):i, (is_modified)?0:2, zone_end, c_zone_end);\r\n\t\t\t\t\t}\r\n\t\t\t\t\ti -= 2;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn resulting_zones;\r\n\t};\r\n\tscheduler.invertZones = function(zones) {\r\n\t\treturn scheduler._subtract_timespan_zones([0, 1440], zones.slice());\r\n\t};\r\n\tscheduler._delete_marked_timespan_by_id = function(id) {\r\n\t\tvar configs = scheduler._marked_timespans_ids[id];\r\n\t\tif (configs) {\r\n\t\t\tfor (var i=0; i 1)){\r\n\t\t\t\tday = scheduler.date.date_part(new Date(this._date)); // for units view actually only 1 day is displayed yet the day variable will change, need to use this._date for all calls\r\n\t\t\t}else{\r\n\t\t\t\tvar dx = 24*60*60*1000;\r\n\t\t\t\tvar day_ind = Math.round((day - scheduler._min_date)/dx);\r\n\t\t\t\tvar unitsPerDay = view.size || units.length;\r\n\t\t\t\tday = scheduler.date.add(scheduler._min_date, Math.floor(day_ind/unitsPerDay), \"day\"); // to the \"same\" day for all sections\r\n\t\t\t\tday = scheduler.date.date_part(day);\r\n\t\t\t}\r\n\t\t\tday_index = day.getDay();\r\n\t\t\tday_value = day.valueOf();\r\n\r\n\t\t\tif (timespans[mode] && timespans[mode][unit.key]) {\r\n\t\t\t\tvar unit_zones = timespans[mode][unit.key];\r\n\t\t\t\tvar unit_types = scheduler._get_types_to_render(unit_zones[day_index], unit_zones[day_value]);\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(unit_types));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar global_data = timespans[\"global\"];\r\n\r\n\t\tif(scheduler.config.overwrite_marked_timespans){\r\n\t\t\tvar day_types = global_data[day_value]||global_data[day_index];\r\n\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(day_types));\r\n\t\t} else {\r\n\t\t\tif(global_data[day_value]){\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(global_data[day_value]));\r\n\t\t\t}\r\n\t\t\tif(global_data[day_index]){\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(global_data[day_index]));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (var i=0; i\" + ev.text + \"

\" + (ev.event_location || '') + \"

\" + scheduler.templates.marker_date(start) + \" - \" + scheduler.templates.marker_date(end) + \"\";\r\n};\r\nscheduler.dblclick_dhx_map_area = function() {\r\n\tif (!this.config.readonly && this.config.dblclick_create)\r\n\t\tthis.addEventNow({\r\n\t\t\tstart_date: scheduler._date,\r\n\t\t\tend_date: scheduler.date.add(scheduler._date, scheduler.config.time_step, \"minute\")\r\n\t\t});\r\n};\r\nscheduler.templates.map_time = function(start, end, ev) {\r\n\tif (scheduler.config.rtl && !ev._timed) {\r\n\t\treturn scheduler.templates.day_date(end) + \" – \" + scheduler.templates.day_date(start);\r\n\t} else if (ev._timed) {\r\n\t\treturn this.day_date(ev.start_date, ev.end_date, ev) + \" \" + this.event_date(start);\r\n\t} else {\r\n\t\treturn scheduler.templates.day_date(start) + \" – \" + scheduler.templates.day_date(end);\r\n\t}\r\n};\r\nscheduler.templates.map_text = function(start, end, ev) {\r\n\treturn ev.text;\r\n};\r\n\r\nscheduler.date.map_start = function(d) {\r\n\treturn d;\r\n};\r\nscheduler.date.add_map = function(date, inc, mode) {\r\n\treturn (new Date(date.valueOf()));\r\n};\r\n\r\nscheduler.templates.map_date = function(dd, ed, mode) {\r\n\treturn '';\r\n};\r\n\r\nscheduler._latLngUpdate = false; // flag for not displaying event second time in case of coordinates update\r\n\r\nscheduler.attachEvent(\"onSchedulerReady\", function() {\r\n\tscheduler._isMapPositionSet = false; // if user actual (geolocation) position was set on the map\r\n\r\n\tconst gmap = document.createElement('div');\r\n\tgmap.className = 'dhx_map';\r\n\tgmap.id = 'dhx_gmap';\r\n\tgmap.style.display = \"none\";\r\n\r\n\tscheduler._obj.appendChild(gmap);\r\n\r\n\tscheduler._els.dhx_gmap = [];\r\n\tscheduler._els.dhx_gmap.push(gmap);\r\n\r\n\t_setMapSize('dhx_gmap');\r\n\r\n\tconst mapOptions = {\r\n\t\tzoom: scheduler.config.map_initial_zoom || 10,\r\n\t\tcenter: scheduler.config.map_initial_position,\r\n\t\tmapTypeId: scheduler.config.map_type || google.maps.MapTypeId.ROADMAP\r\n\t};\r\n\tconst map = new google.maps.Map(document.getElementById('dhx_gmap'), mapOptions);\r\n\tmap.disableDefaultUI = false;\r\n\tmap.disableDoubleClickZoom = !scheduler.config.readonly;\r\n\r\n\tgoogle.maps.event.addListener(map, \"dblclick\", function(event) {\r\n\t\tconst geocoder = scheduler.ext.mapView.geocoder;\r\n\r\n\t\tif (!scheduler.config.readonly && scheduler.config.dblclick_create) {\r\n\t\t\tvar point = event.latLng;\r\n\t\t\tgeocoder.geocode(\r\n\t\t\t\t{ 'latLng': point },\r\n\t\t\t\tfunction(results, status) {\r\n\t\t\t\t\tif (status == google.maps.GeocoderStatus.OK) {\r\n\t\t\t\t\t\tpoint = results[0].geometry.location;\r\n\t\t\t\t\t\tscheduler.addEventNow({\r\n\t\t\t\t\t\t\tlat: point.lat(),\r\n\t\t\t\t\t\t\tlng: point.lng(),\r\n\t\t\t\t\t\t\tevent_location: results[0].formatted_address,\r\n\t\t\t\t\t\t\tstart_date: scheduler._date,\r\n\t\t\t\t\t\t\tend_date: scheduler.date.add(scheduler._date, scheduler.config.time_step, \"minute\")\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t}\r\n\t});\r\n\r\n\tvar infoWindowOptions = {\r\n\t\tcontent: ''\r\n\t};\r\n\r\n\tif (scheduler.config.map_infowindow_max_width) {\r\n\t\tinfoWindowOptions.maxWidth = scheduler.config.map_infowindow_max_width;\r\n\t}\r\n\r\n\tscheduler.map = {\r\n\t\t_points: [],\r\n\t\t_markers: [],\r\n\t\t_infowindow: new google.maps.InfoWindow(infoWindowOptions),\r\n\t\t_infowindows_content: [],\r\n\t\t_initialization_count: -1,\r\n\t\t_obj: map\r\n\t};\r\n\r\n\tscheduler.ext.mapView.geocoder = new google.maps.Geocoder();\r\n\tscheduler.ext.mapView.map = map;\r\n\tscheduler.ext.mapView.points = scheduler.map._points;\r\n\tscheduler.ext.mapView.markers = scheduler.map._markers;\r\n\tscheduler.ext.mapView.infoWindow = scheduler.map._infowindow;\r\n\r\n\tif (scheduler.config.map_resolve_user_location) {\r\n\t\tif (navigator.geolocation) {\r\n\t\t\tif (!scheduler._isMapPositionSet) {\r\n\t\t\t\tnavigator.geolocation.getCurrentPosition(function(position) {\r\n\t\t\t\t\tvar _userLocation = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);\r\n\t\t\t\t\tmap.setCenter(_userLocation);\r\n\t\t\t\t\tmap.setZoom(scheduler.config.map_zoom_after_resolve || 10);\r\n\t\t\t\t\tscheduler.map._infowindow.setContent(scheduler.locale.labels.marker_geo_success);\r\n\t\t\t\t\tscheduler.map._infowindow.position = map.getCenter();\r\n\t\t\t\t\tscheduler.map._infowindow.open(map);\r\n\r\n\t\t\t\t\tscheduler._isMapPositionSet = true;\r\n\t\t\t\t},\r\n\t\t\t\t\t\tfunction() {\r\n\t\t\t\t\t\t\tscheduler.map._infowindow.setContent(scheduler.locale.labels.marker_geo_fail);\r\n\t\t\t\t\t\t\tscheduler.map._infowindow.setPosition(map.getCenter());\r\n\t\t\t\t\t\t\tscheduler.map._infowindow.open(map);\r\n\t\t\t\t\t\t\tscheduler._isMapPositionSet = true;\r\n\t\t\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tgoogle.maps.event.addListener(map, \"resize\", function(event) {\r\n\t\tgmap.style.zIndex = '5';\r\n\t\tmap.setZoom(map.getZoom());\r\n\r\n\t});\r\n\tgoogle.maps.event.addListener(map, \"tilesloaded\", function(event) {\r\n\t\tgmap.style.zIndex = '5';\r\n\t});\r\n\r\n\tgmap.style.display = 'none'; // property was changed after attaching map\r\n\r\n\tconst old = scheduler.render_data;\r\n\tscheduler.render_data = function(evs, hold) {\r\n\t\tif (this._mode == \"map\") {\r\n\t\t\tfill_map_tab();\r\n\t\t\tvar events = scheduler.get_visible_events();\r\n\t\t\tfor (var i = 0; i < events.length; i++) {\r\n\t\t\t\tif (!scheduler.map._markers[events[i].id]) {\r\n\t\t\t\t\tshowAddress(events[i], false, false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else\r\n\t\t\treturn old.apply(this, arguments);\r\n\t};\r\n\r\n\tfunction set_full_view(mode) {\r\n\t\tif (mode) {\r\n\t\t\tvar l = scheduler.locale.labels;\r\n\t\t\tscheduler._els[\"dhx_cal_header\"][0].innerHTML = \"
\" + l.date + \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"
\" + l.description + \"
\";\r\n\t\t\tscheduler._table_view = true;\r\n\t\t\tscheduler.set_sizes();\r\n\t\t}\r\n\t}\r\n\r\n\tfunction clear_map_tab() {\r\n\t\tscheduler._selected_event_id = null;\r\n\t\tscheduler.map._infowindow.close();\r\n\t\tvar markers = scheduler.map._markers;\r\n\t\tfor (var key in markers) {\r\n\t\t\tif (markers.hasOwnProperty(key)) {\r\n\t\t\t\tmarkers[key].setMap(null);\r\n\t\t\t\tdelete scheduler.map._markers[key];\r\n\t\t\t\tif (scheduler.map._infowindows_content[key])\r\n\t\t\t\t\tdelete scheduler.map._infowindows_content[key];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction fill_map_tab() {\r\n\t\t//select events for which data need to be printed\r\n\t\tvar events = scheduler.get_visible_events();\r\n\t\tevents.sort(function(a, b) {\r\n\t\t\tif(a.start_date.valueOf()==b.start_date.valueOf())\r\n\t\t\t\treturn a.id>b.id?1:-1;\r\n\t\t\treturn a.start_date>b.start_date?1:-1;\r\n\t\t});\r\n\r\n\t\t//generate html for the view\r\n\t\tvar ariaAttr = scheduler._waiAria.mapAttrString();\r\n\r\n\t\tvar html = \"
\";\r\n\t\tfor (var i = 0; i < events.length; i++) {\r\n\t\t\tvar ev = events[i];\r\n\t\t\tvar event_class = (ev.id == scheduler._selected_event_id) ? 'dhx_map_line highlight' : 'dhx_map_line';\r\n\t\t\tvar bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\t\t\tvar color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\t\t\tvar ariaAttr = scheduler._waiAria.mapRowAttrString(ev);\r\n\t\t\tvar ariaButtonAttr = scheduler._waiAria.mapDetailsBtnString();\r\n\r\n\t\t\thtml += \"
\" + scheduler.templates.map_time(ev.start_date, ev.end_date, ev) + \"
\";\r\n\t\t\thtml += `
\r\n\t\t\t\r\n\t\t\t
`;\r\n\t\t\thtml += \"
\" + scheduler.templates.map_text(ev.start_date, ev.end_date, ev) + \"
\"; // -25 = icon size 20 and padding 5\r\n\t\t}\r\n\t\thtml += \"
\";\r\n\r\n\t\t//render html\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = 0; //fix flickering in FF\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t//\tscheduler._els[\"dhx_cal_data\"][0].style.width = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\r\n\t\tvar t = scheduler._els[\"dhx_cal_data\"][0].firstChild.childNodes;\r\n\r\n\t\tvar dateElement = scheduler._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML=scheduler.templates[scheduler._mode + \"_date\"](scheduler._min_date, scheduler._max_date, scheduler._mode);\r\n\t\t}\r\n\r\n\t\tscheduler._rendered = [];\r\n\t\tfor (var i = 0; i < t.length - 2; i++) {\r\n\t\t\tscheduler._rendered[i] = t[i];\r\n\t\t}\r\n\t}\r\n\r\n\tfunction _setMapSize(elem_id) { //input - map's div id\r\n\t\tvar map = document.getElementById(elem_id);\r\n\t\tconst nav_height = scheduler.$container.querySelector(\".dhx_cal_navline\").offsetHeight;\r\n\t\tvar height = scheduler._y - nav_height;\r\n\t\tif (height < 0)\r\n\t\t\theight = 0;\r\n\t\tvar width = scheduler._x - scheduler.xy.map_date_width - scheduler.xy.map_description_width - 1;\r\n\t\tif (width < 0)\r\n\t\t\twidth = 0;\r\n\t\tmap.style.height = height + 'px';\r\n\t\tmap.style.width = width + 'px';\r\n\t\tmap.style.position = \"absolute\";\r\n\t\tmap.style.top = nav_height + \"px\";\r\n\t\tif (scheduler.config.rtl) {\r\n\t\t\tmap.style.marginRight = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\t\t} else {\r\n\t\t\tmap.style.marginLeft = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\t\t}\r\n\t\tmap.style.marginTop = (scheduler.xy.nav_height + 2) + 'px';\r\n\t}\r\n\r\n\tscheduler.map_view = function(mode) {\r\n\t\tscheduler.map._initialization_count++;\r\n\t\tvar gmap = scheduler._els.dhx_gmap[0];\r\n\t\tvar temp_center;\r\n\t\t//scheduler._els.dhx_cal_data[0].style.width = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\r\n\t\tscheduler._min_date = scheduler.config.map_start || (scheduler._currentDate());\r\n\t\tscheduler._max_date = scheduler.config.map_end || scheduler.date.add(scheduler._currentDate(), 1, \"year\");\r\n\r\n\t\tscheduler._table_view = true;\r\n\t\tset_full_view(mode);\r\n\r\n\t\tif (mode) { //map tab activated\r\n\t\t\tclear_map_tab();\r\n\t\t\tfill_map_tab();\r\n\t\t\tgmap.style.display = 'block';\r\n\r\n\t\t\t// need to resize block every time window is resized\r\n\t\t\t_setMapSize('dhx_gmap');\r\n\t\t\ttemp_center = scheduler.map._obj.getCenter();\r\n\r\n\t\t\tvar events = scheduler.get_visible_events();\r\n\t\t\tfor (var i = 0; i < events.length; i++) {\r\n\t\t\t\tif (!scheduler.map._markers[events[i].id]) {\r\n\t\t\t\t\tshowAddress(events[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t} else { //map tab de-activated\r\n\t\t\tgmap.style.display = 'none';\r\n\t\t}\r\n\t\tgoogle.maps.event.trigger(scheduler.map._obj, 'resize');\r\n\r\n\t\tif (scheduler.map._initialization_count === 0 && temp_center) { // if tab is activated for the first time need to fix position\r\n\t\t\tscheduler.map._obj.setCenter(temp_center);\r\n\t\t}\r\n\r\n\t\tif (scheduler._selected_event_id) {\r\n\t\t\tselectEvent(scheduler._selected_event_id);\r\n\t\t}\r\n\t};\r\n\r\n\tvar selectEvent = function(event_id) {\r\n\t\tscheduler.map._obj.setCenter(scheduler.map._points[event_id]);\r\n\t\tscheduler.callEvent(\"onClick\", [event_id]);\r\n\t};\r\n\r\n\tvar showAddress = function(event, setCenter, performClick) { // what if event have incorrect position from the start?\r\n\t\tvar point = scheduler.config.map_error_position;\r\n\t\tif (event.lat && event.lng) {\r\n\t\t\tpoint = new google.maps.LatLng(event.lat, event.lng);\r\n\t\t}\r\n\t\tvar message = scheduler.templates.marker_text(event.start_date, event.end_date, event);\r\n\t\tif (!scheduler._new_event) {\r\n\r\n\t\t\tscheduler.map._infowindows_content[event.id] = message;\r\n\r\n\t\t\tif (scheduler.map._markers[event.id])\r\n\t\t\t\tscheduler.map._markers[event.id].setMap(null);\r\n\r\n\t\t\tscheduler.map._markers[event.id] = scheduler.ext.mapView.createMarker({\r\n\t\t\t\tposition: point,\r\n\t\t\t\tmap: scheduler.map._obj\r\n\t\t\t});\r\n\r\n\t\t\tgoogle.maps.event.addListener(scheduler.map._markers[event.id], 'click', function() {\r\n\t\t\t\tscheduler.map._infowindow.setContent(scheduler.map._infowindows_content[event.id]);\r\n\t\t\t\tscheduler.map._infowindow.open(scheduler.map._obj, scheduler.map._markers[event.id]);\r\n\t\t\t\tscheduler._selected_event_id = event.id;\r\n\t\t\t\tscheduler.render_data();\r\n\t\t\t});\r\n\t\t\tscheduler.map._points[event.id] = point;\r\n\r\n\t\t\tif (setCenter) scheduler.map._obj.setCenter(scheduler.map._points[event.id]);\r\n\t\t\tif (performClick) scheduler.callEvent(\"onClick\", [event.id]);\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onClick\", function(id, domEvent) {\r\n\t\tif (this._mode == \"map\") {\r\n\t\t\tscheduler._selected_event_id = id;\r\n\t\t\tfor (var i = 0; i < scheduler._rendered.length; i++) {\r\n\t\t\t\tscheduler._rendered[i].className = 'dhx_map_line';\r\n\t\t\t\tif (scheduler._rendered[i].getAttribute(scheduler.config.event_attribute) == id) {\r\n\t\t\t\t\tscheduler._rendered[i].className += \" highlight\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (scheduler.map._points[id] && scheduler.map._markers[id]) {\r\n\t\t\t\tscheduler.map._obj.setCenter(scheduler.map._points[id]); // was panTo\r\n\t\t\t\tgoogle.maps.event.trigger(scheduler.map._markers[id], 'click');\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tvar _displayEventOnMap = function(event) {\r\n\t\tconst geocoder = scheduler.ext.mapView.geocoder;\r\n\t\tif (event.event_location && geocoder) {\r\n\t\t\tgeocoder.geocode(\r\n\t\t\t\t{\r\n\t\t\t\t\t'address': event.event_location,\r\n\t\t\t\t\t'language': scheduler.uid().toString()\r\n\t\t\t\t},\r\n\t\t\t\tfunction(results, status) {\r\n\t\t\t\t\tvar point = {};\r\n\t\t\t\t\tif (status != google.maps.GeocoderStatus.OK) {\r\n\t\t\t\t\t\tpoint = scheduler.callEvent(\"onLocationError\", [event.id]);\r\n\t\t\t\t\t\tif (!point || point === true)\r\n\t\t\t\t\t\t\tpoint = scheduler.config.map_error_position;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tpoint = results[0].geometry.location;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tevent.lat = point.lat();\r\n\t\t\t\t\tevent.lng = point.lng();\r\n\r\n\t\t\t\t\tscheduler._selected_event_id = event.id;\r\n\r\n\t\t\t\t\tscheduler._latLngUpdate = true;\r\n\t\t\t\t\tscheduler.callEvent(\"onEventChanged\", [event.id, event]);\r\n\t\t\t\t\tshowAddress(event, true, true);\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t} else {\r\n\t\t\tshowAddress(event, true, true);\r\n\t\t}\r\n\t};\r\n\r\n\tvar _updateEventLocation = function(event) { // update lat and lng in database\r\n\t\tconst geocoder = scheduler.ext.mapView.geocoder;\r\n\t\tif (event.event_location && geocoder) {\r\n\t\t\tgeocoder.geocode(\r\n\t\t\t\t{\r\n\t\t\t\t\t'address': event.event_location,\r\n\t\t\t\t\t'language': scheduler.uid().toString()\r\n\t\t\t\t},\r\n\t\t\t\tfunction(results, status) {\r\n\t\t\t\t\tvar point = {};\r\n\t\t\t\t\tif (status != google.maps.GeocoderStatus.OK) {\r\n\t\t\t\t\t\tpoint = scheduler.callEvent(\"onLocationError\", [event.id]);\r\n\t\t\t\t\t\tif (!point || point === true)\r\n\t\t\t\t\t\t\tpoint = scheduler.config.map_error_position;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tpoint = results[0].geometry.location;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tevent.lat = point.lat();\r\n\t\t\t\t\tevent.lng = point.lng();\r\n\t\t\t\t\tscheduler._latLngUpdate = true;\r\n\t\t\t\t\tscheduler.callEvent(\"onEventChanged\", [event.id, event]);\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t}\r\n\t};\r\n\r\n\tvar _delay = function(method, object, params, delay) {\r\n\t\tsetTimeout(function() {\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tvar ret = method.apply(object, params);\r\n\t\t\tmethod = object = params = null;\r\n\t\t\treturn ret;\r\n\t\t}, delay || 1);\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onEventChanged\", function(id, event) {\r\n\t\tif (!this._latLngUpdate) {\r\n\t\t\tvar event = scheduler.getEvent(id);\r\n\t\t\tif ((event.start_date < scheduler._min_date && event.end_date > scheduler._min_date) || (event.start_date < scheduler._max_date && event.end_date > scheduler._max_date) || (event.start_date.valueOf() >= scheduler._min_date && event.end_date.valueOf() <= scheduler._max_date)) {\r\n\t\t\t\tif (scheduler.map._markers[id])\r\n\t\t\t\t\tscheduler.map._markers[id].setMap(null);\r\n\t\t\t\t_displayEventOnMap(event);\r\n\t\t\t} else { // event no longer should be displayed on the map view\r\n\t\t\t\tscheduler._selected_event_id = null;\r\n\t\t\t\tscheduler.map._infowindow.close();\r\n\t\t\t\tif (scheduler.map._markers[id])\r\n\t\t\t\t\tscheduler.map._markers[id].setMap(null);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t\tthis._latLngUpdate = false;\r\n\t\treturn true;\r\n\t});\r\n\r\n\r\n\tscheduler.attachEvent(\"onEventIdChange\", function(old_event_id, new_event_id) {\r\n\t\tvar event = scheduler.getEvent(new_event_id);\r\n\t\tif ((event.start_date < scheduler._min_date && event.end_date > scheduler._min_date) || (event.start_date < scheduler._max_date && event.end_date > scheduler._max_date) || (event.start_date.valueOf() >= scheduler._min_date && event.end_date.valueOf() <= scheduler._max_date)) {\r\n\t\t\tif (scheduler.map._markers[old_event_id]) {\r\n\t\t\t\tscheduler.map._markers[old_event_id].setMap(null);\r\n\t\t\t\tdelete scheduler.map._markers[old_event_id];\r\n\t\t\t}\r\n\t\t\tif (scheduler.map._infowindows_content[old_event_id])\r\n\t\t\t\tdelete scheduler.map._infowindows_content[old_event_id];\r\n\t\t\t_displayEventOnMap(event);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onEventAdded\", function(id, event) {\r\n\t\tif (!scheduler._dataprocessor) {\r\n\t\t\tif ((event.start_date < scheduler._min_date && event.end_date > scheduler._min_date) || (event.start_date < scheduler._max_date && event.end_date > scheduler._max_date) || (event.start_date.valueOf() >= scheduler._min_date && event.end_date.valueOf() <= scheduler._max_date)) {\r\n\t\t\t\tif (scheduler.map._markers[id])\r\n\t\t\t\t\tscheduler.map._markers[id].setMap(null);\r\n\t\t\t\t_displayEventOnMap(event);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\t/* Test/example\r\n\t scheduler.attachEvent(\"onLocationError\", function(event_id,event_object){\r\n\t return new google.maps.LatLng(8, 8);\r\n\t });\r\n\t */\r\n\r\n\tscheduler.attachEvent(\"onBeforeEventDelete\", function(id, event) {\r\n\t\tif (scheduler.map._markers[id]) {\r\n\t\t\tscheduler.map._markers[id].setMap(null); // if new event is deleted tab != map then it doesn't have marker yet\r\n\t\t}\r\n\t\tscheduler._selected_event_id = null;\r\n\t\tscheduler.map._infowindow.close();\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler._event_resolve_delay = 1500;\r\n\tscheduler.attachEvent(\"onEventLoading\", function(event) {\r\n\t\tif (scheduler.config.map_resolve_event_location && event.event_location && !event.lat && !event.lng) { // don't delete !event.lat && !event.lng as location could change\r\n\t\t\tscheduler._event_resolve_delay += 1500;\r\n\t\t\t_delay(_updateEventLocation, this, [event], scheduler._event_resolve_delay);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onEventCancel\", function(id, is_new) {\r\n\t\tif (is_new) {\r\n\t\t\tif (scheduler.map._markers[id])\r\n\t\t\t\tscheduler.map._markers[id].setMap(null);\r\n\t\t\tscheduler.map._infowindow.close();\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nconst minicalDomEvents = scheduler._createDomEventScope();\r\n\t\r\n\r\nscheduler.config.minicalendar = {\r\n\tmark_events: true\r\n};\r\nscheduler._synced_minicalendars = [];\r\nscheduler.renderCalendar = function(obj, _prev, is_refresh) {\r\n\tvar cal = null;\r\n\tvar date = obj.date || (scheduler._currentDate());\r\n\tif (typeof date == \"string\")\r\n\t\tdate = this.templates.api_date(date);\r\n\r\n\tif (!_prev) {\r\n\t\tvar cont = obj.container;\r\n\t\tvar pos = obj.position;\r\n\r\n\t\tif (typeof cont == \"string\")\r\n\t\t\tcont = document.getElementById(cont);\r\n\r\n\t\tif (typeof pos == \"string\")\r\n\t\t\tpos = document.getElementById(pos);\r\n\t\tif (pos && (typeof pos.left == \"undefined\" && typeof pos.right == \"undefined\")) {\r\n\t\t\tvar tpos = scheduler.$domHelpers.getOffset(pos);\r\n\t\t\tpos = {\r\n\t\t\t\ttop: tpos.top + pos.offsetHeight,\r\n\t\t\t\tleft: tpos.left\r\n\t\t\t};\r\n\t\t}\r\n\t\tif (!cont)\r\n\t\t\tcont = scheduler._get_def_cont(pos);\r\n\r\n\t\tcal = this._render_calendar(cont, date, obj);\r\n\t\r\n\t\tif (!cal.$_eventAttached) {\r\n\t\t\tcal.$_eventAttached = true;\r\n\t\t\tminicalDomEvents.attach(cal, \"click\", (function(e) {\r\n\t\t\t\tvar src = e.target || e.srcElement;\r\n\r\n\t\t\t\tvar $dom = scheduler.$domHelpers;\r\n\t\t\t\tif ($dom.closest(src, \".dhx_month_head\")) {\r\n\t\t\t\t\tif (!$dom.closest(src, \".dhx_after\") && !$dom.closest(src, \".dhx_before\")) {\r\n\r\n\t\t\t\t\t\tvar cellRoot = $dom.closest(src, \"[data-cell-date]\");\r\n\t\t\t\t\t\tvar dateAttribute = cellRoot.getAttribute(\"data-cell-date\");\r\n\t\t\t\t\t\tvar newDate = scheduler.templates.parse_date(dateAttribute);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tscheduler.unmarkCalendar(this);\r\n\t\t\t\t\t\tscheduler.markCalendar(this, newDate, \"dhx_calendar_click\");\r\n\t\t\t\t\t\tthis._last_date = newDate;\r\n\t\t\t\t\t\tif (this.conf.handler) this.conf.handler.call(scheduler, newDate, this);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}).bind(cal));\r\n\t\t}\r\n\t\r\n\t} else {\r\n\t\tcal = this._render_calendar(_prev.parentNode, date, obj, _prev);\r\n\t\tscheduler.unmarkCalendar(cal);\r\n\t}\r\n\r\n\tif (scheduler.config.minicalendar.mark_events) {\r\n\t\tvar start = scheduler.date.month_start(date);\r\n\t\tvar end = scheduler.date.add(start, 1, \"month\");\r\n\t\tvar evs = this.getEvents(start, end);\r\n\t\tvar filter = this[\"filter_\" + this._mode];\r\n\t\tvar markedDates = {};\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tif (filter && !filter(ev.id, ev))\r\n\t\t\t\tcontinue;\r\n\t\t\tvar d = ev.start_date;\r\n\t\t\tif (d.valueOf() < start.valueOf())\r\n\t\t\t\td = start;\r\n\t\t\td = scheduler.date.date_part(new Date(d.valueOf()));\r\n\t\t\twhile (d < ev.end_date) {\r\n\t\t\t\tif(!markedDates[+d]) {\r\n\t\t\t\t\tmarkedDates[+d] = true;\r\n\t\t\t\t\tthis.markCalendar(cal, d, \"dhx_year_event\");\r\n\t\t\t\t}\r\n\t\t\t\td = this.date.add(d, 1, \"day\");\r\n\t\t\t\tif (d.valueOf() >= end.valueOf())\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tthis._markCalendarCurrentDate(cal);\r\n\r\n\tcal.conf = obj;\r\n\tif (obj.sync && !is_refresh)\r\n\t\tthis._synced_minicalendars.push(cal);\r\n\r\n\tif(!cal.conf._on_xle_handler){\r\n\t\tcal.conf._on_xle_handler = scheduler.attachEvent(\"onXLE\", function refreshOnLoad(){\r\n\t\t\tscheduler.updateCalendar(cal, cal.conf.date);\r\n\t\t});\r\n\t}\r\n\r\n\tif(this.config.wai_aria_attributes && this.config.wai_aria_application_role){\r\n\t\tcal.setAttribute(\"role\", \"application\");\r\n\t}\r\n\r\n\treturn cal;\r\n};\r\nscheduler._get_def_cont = function(pos) {\r\n\tif (!this._def_count) {\r\n\t\tthis._def_count = document.createElement(\"div\");\r\n\t\tthis._def_count.className = \"dhx_minical_popup\";\r\n\t\tscheduler.event(this._def_count, \"click\", function(e) { e.cancelBubble = true; });\r\n\t\tdocument.body.appendChild(this._def_count);\r\n\t}\r\n\r\n\tif(pos.left){\r\n\t\tthis._def_count.style.left = pos.left + \"px\";\r\n\t}\r\n\tif(pos.right){\r\n\t\tthis._def_count.style.right = pos.right + \"px\";\r\n\t}\r\n\tif(pos.top){\r\n\t\tthis._def_count.style.top = pos.top + \"px\";\r\n\t}\r\n\tif(pos.bottom){\r\n\t\tthis._def_count.style.bottom = pos.bottom + \"px\";\r\n\t}\r\n\r\n\tthis._def_count._created = new Date();\r\n\r\n\treturn this._def_count;\r\n};\r\nscheduler._locateCalendar = function(cal, date) {\r\n\tif (typeof date == \"string\")\r\n\t\tdate = scheduler.templates.api_date(date);\r\n\r\n\tif(+date > +cal._max_date || +date < +cal._min_date)\r\n\t\treturn null;\r\n\r\n\tvar table = cal.querySelector(\".dhx_year_body\").childNodes[0];\r\n\r\n\tvar weekNum = 0;\r\n\tvar dat = new Date(cal._min_date);\r\n\twhile(+this.date.add(dat, 1, \"week\") <= +date){\r\n\t\tdat = this.date.add(dat, 1, \"week\");\r\n\t\tweekNum++;\r\n\t}\r\n\r\n\tvar sm = scheduler.config.start_on_monday;\r\n\tvar day = (date.getDay() || (sm ? 7 : 0)) - (sm ? 1 : 0);\r\n\r\n\tconst dayCell = table.querySelector(`.dhx_cal_month_row:nth-child(${weekNum + 1}) .dhx_cal_month_cell:nth-child(${day + 1})`);\r\n\tif(dayCell) {\r\n\t\treturn dayCell.firstChild;\r\n\t} else {\r\n\t\treturn null;\r\n\t}\r\n};\r\nscheduler.markCalendar = function(cal, date, css) {\r\n\tvar div = this._locateCalendar(cal, date);\r\n\tif(!div)\r\n\t\treturn;\r\n\r\n\tdiv.className += \" \" + css;\r\n};\r\nscheduler.unmarkCalendar = function(cal, date, css) {\r\n\tdate = date || cal._last_date;\r\n\tcss = css || \"dhx_calendar_click\";\r\n\tif (!date) return;\r\n\tvar el = this._locateCalendar(cal, date);\r\n\tif(!el)\r\n\t\treturn;\r\n\tel.className = (el.className || \"\").replace(RegExp(css, \"g\"));\r\n};\r\nscheduler._week_template = function(width) {\r\n\tvar summ = (width || 250);\r\n\tvar left = 0;\r\n\r\n\tvar week_template = document.createElement(\"div\");\r\n\tvar dummy_date = this.date.week_start(scheduler._currentDate());\r\n\tfor (var i = 0; i < 7; i++) {\r\n\t\tthis._cols[i] = Math.floor(summ / (7 - i));\r\n\t\tthis._render_x_header(i, left, dummy_date, week_template);\r\n\t\tdummy_date = this.date.add(dummy_date, 1, \"day\");\r\n\t\tsumm -= this._cols[i];\r\n\t\tleft += this._cols[i];\r\n\t}\r\n\tweek_template.lastChild.className += \" dhx_scale_bar_last\";\r\n\treturn week_template;\r\n};\r\nscheduler.updateCalendar = function(obj, sd) {\r\n\tobj.conf.date = sd;\r\n\tthis.renderCalendar(obj.conf, obj, true);\r\n};\r\nscheduler._mini_cal_arrows = [\" \", \" \"];\r\nscheduler._render_calendar = function(obj, sd, conf, previous) {\r\n\t/*store*/\r\n\tvar ts = scheduler.templates;\r\n\tvar temp = this._cols;\r\n\tthis._cols = [];\r\n\tvar temp2 = this._mode;\r\n\tthis._mode = \"calendar\";\r\n\tvar temp3 = this._colsS;\r\n\tthis._colsS = {height: 0};\r\n\tvar temp4 = new Date(this._min_date);\r\n\tvar temp5 = new Date(this._max_date);\r\n\tvar temp6 = new Date(scheduler._date);\r\n\tvar temp7 = ts.month_day;\r\n\tvar temp8 = this._ignores_detected; this._ignores_detected = 0;\r\n\tts.month_day = ts.calendar_date;\r\n\r\n\tsd = this.date.month_start(sd);\r\n\tvar week_template = this._week_template(obj.offsetWidth - 1 - this.config.minicalendar.padding );\r\n\r\n\tvar d;\r\n\tif (previous){\r\n\t\td = previous;\r\n\t} else {\r\n\t\td = document.createElement(\"div\");\r\n\t\td.className = \"dhx_cal_container dhx_mini_calendar\";\r\n\t}\r\n\td.setAttribute(\"date\", this._helpers.formatDate(sd));\r\n\td.innerHTML = \"
\" +\r\n\t\t\t\"
\" : \"'>\") +\r\n\t\t\t\"
\"+(week_template ? week_template.innerHTML : \"\")+\"
\" +\r\n\t\t\t\"
\" +\r\n\t\t\"
\";\r\n\tvar header = d.querySelector(\".dhx_year_month\");\r\n\tvar weekHeader = d.querySelector(\".dhx_year_week\");\r\n\tvar body = d.querySelector(\".dhx_year_body\");\r\n\r\n\theader.innerHTML = this.templates.calendar_month(sd);\r\n\tif (conf.navigation) {\r\n\t\tvar move_minicalendar_date = function(calendar, diff) {\r\n\t\t\tvar date = scheduler.date.add(calendar._date, diff, \"month\");\r\n\t\t\tscheduler.updateCalendar(calendar, date);\r\n\t\t\tif (scheduler._date.getMonth() == calendar._date.getMonth() && scheduler._date.getFullYear() == calendar._date.getFullYear()) {\r\n\t\t\t\tscheduler._markCalendarCurrentDate(calendar);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tvar css_classnames = [\"dhx_cal_prev_button\", \"dhx_cal_next_button\"];\r\n\t\tvar css_texts = [\"left:1px;top:4px;position:absolute;\", \"left:auto; right:1px;top:4px;position:absolute;\"];\r\n\t\tvar diffs = [-1, 1];\r\n\t\tvar handler = function(diff) {\r\n\t\t\treturn function() {\t\r\n\t\t\t\tif (conf.sync) {\r\n\t\t\t\t\tvar calendars = scheduler._synced_minicalendars;\r\n\t\t\t\t\tfor (var k = 0; k < calendars.length; k++) {\r\n\t\t\t\t\t\tmove_minicalendar_date(calendars[k], diff);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (scheduler.config.rtl) {\r\n\t\t\t\t\t\tdiff = -diff;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmove_minicalendar_date(d, diff);\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t};\r\n\t\tvar labels = [scheduler.locale.labels.prev, scheduler.locale.labels.next];\r\n\t\tfor (var j = 0; j < 2; j++) {\r\n\t\t\tvar arrow = document.createElement(\"div\");\r\n\t\t\t//var diff = diffs[j];\r\n\t\t\tarrow.className = css_classnames[j];\r\n\r\n\t\t\tscheduler._waiAria.headerButtonsAttributes(arrow, labels[j]);\r\n\r\n\t\t\tarrow.style.cssText = css_texts[j];\r\n\t\t\tarrow.innerHTML = this._mini_cal_arrows[j];\r\n\t\t\theader.appendChild(arrow);\r\n\t\t\tminicalDomEvents.attach(arrow, \"click\", handler(diffs[j]));\r\n\t\t}\r\n\t}\r\n\td._date = new Date(sd);\r\n\r\n\td.week_start = (sd.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) % 7;\r\n\r\n\tvar dd = d._min_date = this.date.week_start(sd);\r\n\td._max_date = this.date.add(d._min_date, 6, \"week\");\r\n\r\n\tthis._reset_month_scale(body, sd, dd, 6);\r\n\r\n\tif (!previous)\r\n\t\tobj.appendChild(d);\r\n\r\n\tweekHeader.style.height = (weekHeader.childNodes[0].offsetHeight - 1) + \"px\"; // dhx_year_week should have height property so that day dates would get correct position. dhx_year_week height = height of it's child (with the day name)\r\n\r\n\tvar headerId = scheduler.uid();\r\n\tscheduler._waiAria.minicalHeader(header, headerId);\r\n\tscheduler._waiAria.minicalGrid(d.querySelector(\".dhx_year_grid\"), headerId);\r\n\tscheduler._waiAria.minicalRow(weekHeader);\r\n\r\n\tvar dayHeaders = weekHeader.querySelectorAll(\".dhx_scale_bar\");\r\n\tfor(var i = 0; i < dayHeaders.length; i++){\r\n\t\tscheduler._waiAria.minicalHeadCell(dayHeaders[i]);\r\n\t}\r\n\tvar dayCells = body.querySelectorAll(\".dhx_cal_month_cell\");\r\n\tvar firstDate = new Date(dd);\r\n\tfor(var i = 0; i < dayCells.length; i++){\r\n\r\n\t\tscheduler._waiAria.minicalDayCell(dayCells[i], new Date(firstDate));\r\n\t\tfirstDate = scheduler.date.add(firstDate, 1, \"day\");\r\n\t}\r\n\r\n\tscheduler._waiAria.minicalHeader(header, headerId);\r\n\r\n\t/*restore*/\r\n\tthis._cols = temp;\r\n\tthis._mode = temp2;\r\n\tthis._colsS = temp3;\r\n\tthis._min_date = temp4;\r\n\tthis._max_date = temp5;\r\n\tscheduler._date = temp6;\r\n\tts.month_day = temp7;\r\n\tthis._ignores_detected = temp8;\r\n\treturn d;\r\n};\r\nscheduler.destroyCalendar = function(cal, force) {\r\n\tif (!cal && this._def_count && this._def_count.firstChild) {\r\n\t\tif (force || (new Date()).valueOf() - this._def_count._created.valueOf() > 500)\r\n\t\t\tcal = this._def_count.firstChild;\r\n\t}\r\n\tif (!cal) return;\r\n\tminicalDomEvents.detachAll();\r\n\t//cal.onclick = null;\r\n\tcal.innerHTML = \"\";\r\n\tif (cal.parentNode)\r\n\t\tcal.parentNode.removeChild(cal);\r\n\tif (this._def_count)\r\n\t\tthis._def_count.style.top = \"-1000px\";\r\n\r\n\tif(cal.conf && cal.conf._on_xle_handler)\r\n\t\tscheduler.detachEvent(cal.conf._on_xle_handler);\r\n};\r\nscheduler.isCalendarVisible = function() {\r\n\tif (this._def_count && parseInt(this._def_count.style.top, 10) > 0)\r\n\t\treturn this._def_count;\r\n\treturn false;\r\n};\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tscheduler.event(document.body, \"click\", function() { scheduler.destroyCalendar(); });\r\n}, {once: true});\r\n\r\n\r\n\r\nscheduler.form_blocks.calendar_time = {\r\n\trender: function(sns) {\r\n\t\tvar html = \"\";\r\n\r\n\t\tvar cfg = scheduler.config;\r\n\t\tvar dt = this.date.date_part(scheduler._currentDate());\r\n\r\n\t\tvar last = 24 * 60, first = 0;\r\n\t\tif (cfg.limit_time_select) {\r\n\t\t\tfirst = 60 * cfg.first_hour;\r\n\t\t\tlast = 60 * cfg.last_hour + 1; // to include \"17:00\" option if time select is limited\r\n\t\t}\r\n\t\tdt.setHours(first / 60);\r\n\r\n\t\tsns._time_values = [];\r\n\t\thtml += \" \";\r\n\r\n\t\t//var full_day = scheduler.config.full_day;\r\n\r\n\t\treturn \"
\" + html + \"  –  \" + html + \"
\";\r\n\t},\r\n\tset_value: function(node, value, ev, config) {\r\n\r\n\t\tvar inputs = node.getElementsByTagName(\"input\");\r\n\t\tvar selects = node.getElementsByTagName(\"select\");\r\n\t\tvar start_date,\r\n\t\t\tend_date;\r\n\r\n\t\tvar _init_once = function(inp, date, number) {\r\n\t\t\tscheduler.event(inp, \"click\", function() {\r\n\t\t\t\tscheduler.destroyCalendar(null, true);\r\n\t\t\t\tscheduler.renderCalendar({\r\n\t\t\t\t\tposition: inp,\r\n\t\t\t\t\tdate: new Date(this._date),\r\n\t\t\t\t\tnavigation: true,\r\n\t\t\t\t\thandler: function(new_date) {\r\n\t\t\t\t\t\tinp.value = scheduler.templates.calendar_time(new_date);\r\n\t\t\t\t\t\tinp._date = new Date(new_date);\r\n\t\t\t\t\t\tscheduler.destroyCalendar();\r\n\t\t\t\t\t\tif (scheduler.config.event_duration && scheduler.config.auto_end_date && number === 0) { //first element = start date\r\n\t\t\t\t\t\t\t_update_minical_select();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t};\r\n\r\n\t\tif (scheduler.config.full_day) {\r\n\t\t\tif (!node._full_day) {\r\n\t\t\t\tvar html = \"\";\r\n\t\t\t\tif (!scheduler.config.wide_form)\r\n\t\t\t\t\thtml = node.previousSibling.innerHTML + html;\r\n\t\t\t\tnode.previousSibling.innerHTML = html;\r\n\t\t\t\tnode._full_day = true;\r\n\t\t\t}\r\n\t\t\tvar input = node.previousSibling.getElementsByTagName(\"input\")[0];\r\n\r\n\t\t\tvar isFulldayEvent = (scheduler.date.time_part(ev.start_date) === 0 && scheduler.date.time_part(ev.end_date) === 0);\r\n\t\t\tinput.checked = isFulldayEvent;\r\n\r\n\t\t\tselects[0].disabled = input.checked;\r\n\t\t\tselects[1].disabled = input.checked;\r\n\r\n\t\t\tif (!input.$_eventAttached) {\r\n\t\t\t\tinput.$_eventAttached = true;\r\n\t\t\t\tscheduler.event(input, \"click\", function() {\r\n\t\t\t\t\tif (input.checked === true) {\r\n\t\t\t\t\t\tvar obj = {};\r\n\t\t\t\t\t\tscheduler.form_blocks.calendar_time.get_value(node, obj);\r\n\r\n\t\t\t\t\t\tstart_date = scheduler.date.date_part(obj.start_date);\r\n\t\t\t\t\t\tend_date = scheduler.date.date_part(obj.end_date);\r\n\r\n\t\t\t\t\t\tif (+end_date == +start_date || (+end_date >= +start_date && (ev.end_date.getHours() !== 0 || ev.end_date.getMinutes() !== 0)))\r\n\t\t\t\t\t\t\tend_date = scheduler.date.add(end_date, 1, \"day\");\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tvar start = start_date || ev.start_date;\r\n\t\t\t\t\tvar end = end_date || ev.end_date;\r\n\t\t\t\t\t_attach_action(inputs[0], start);\r\n\t\t\t\t\t_attach_action(inputs[1], end);\r\n\t\t\t\t\tselects[0].value = start.getHours() * 60 + start.getMinutes();\r\n\t\t\t\t\tselects[1].value = end.getHours() * 60 + end.getMinutes();\r\n\r\n\t\t\t\t\tselects[0].disabled = input.checked;\r\n\t\t\t\t\tselects[1].disabled = input.checked;\r\n\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (scheduler.config.event_duration && scheduler.config.auto_end_date) {\r\n\r\n\t\t\tvar _update_minical_select = function () {\r\n\t\t\t\tif (!(scheduler.config.auto_end_date && scheduler.config.event_duration)){\r\n\t\t\t\t\t// setting may be disabled after the handler is attached\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tstart_date = scheduler.date.add(inputs[0]._date, selects[0].value, \"minute\");\r\n\t\t\t\tend_date = new Date(start_date.getTime() + (scheduler.config.event_duration * 60 * 1000));\r\n\r\n\t\t\t\tinputs[1].value = scheduler.templates.calendar_time(end_date);\r\n\t\t\t\tinputs[1]._date = scheduler.date.date_part(new Date(end_date));\r\n\r\n\t\t\t\tselects[1].value = end_date.getHours() * 60 + end_date.getMinutes();\r\n\t\t\t};\r\n\r\n\t\t\tif(!selects[0].$_eventAttached){\r\n\t\t\t\tselects[0].addEventListener(\"change\", _update_minical_select); // only update on first select should trigger update so user could define other end date if he wishes too\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction _attach_action(inp, date, number) {\r\n\t\t\t_init_once(inp, date, number);\r\n\t\t\tinp.value = scheduler.templates.calendar_time(date);\r\n\t\t\tinp._date = scheduler.date.date_part(new Date(date));\r\n\t\t}\r\n\r\n\t\t_attach_action(inputs[0], ev.start_date, 0);\r\n\t\t_attach_action(inputs[1], ev.end_date, 1);\r\n\t\t_init_once = function() {};\r\n\r\n\t\tfunction _round_minutes(date) {\r\n\t\t\tvar time_values = config._time_values;\r\n\t\t\tvar direct_value = date.getHours() * 60 + date.getMinutes();\r\n\t\t\tvar fixed_value = direct_value;\r\n\t\t\tvar value_found = false;\r\n\r\n\t\t\tfor (var k = 0; k < time_values.length; k++) {\r\n\t\t\t\tvar t_v = time_values[k];\r\n\t\t\t\tif (t_v === direct_value) {\r\n\t\t\t\t\tvalue_found = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif (t_v < direct_value)\r\n\t\t\t\t\tfixed_value = t_v;\r\n\t\t\t}\r\n\r\n\t\t\tif(!(value_found || fixed_value))\r\n\t\t\t\treturn -1;\r\n\r\n\t\t\treturn (value_found) ? direct_value : fixed_value;\r\n\t\t}\r\n\r\n\t\tselects[0].value = _round_minutes(ev.start_date);\r\n\t\tselects[1].value = _round_minutes(ev.end_date);\r\n\r\n\t},\r\n\tget_value: function(node, ev) {\r\n\t\tvar inputs = node.getElementsByTagName(\"input\");\r\n\t\tvar selects = node.getElementsByTagName(\"select\");\r\n\r\n\t\tev.start_date = scheduler.date.add(inputs[0]._date, selects[0].value, \"minute\");\r\n\t\tev.end_date = scheduler.date.add(inputs[1]._date, selects[1].value, \"minute\");\r\n\r\n\t\tif (ev.end_date <= ev.start_date)\r\n\t\t\tev.end_date = scheduler.date.add(ev.start_date, scheduler.config.time_step, \"minute\");\r\n\t\treturn {\r\n\t\t\tstart_date: new Date(ev.start_date),\r\n\t\t\tend_date: new Date(ev.end_date)\r\n\t\t};\r\n\t},\r\n\tfocus: function(node) {\r\n\t}\r\n};\r\nscheduler.linkCalendar = function(calendar, datediff) {\r\n\tvar action = function() {\r\n\t\tvar date = scheduler._date;\r\n\t\tvar dateNew = new Date(date.valueOf());\r\n\t\tif (datediff) dateNew = datediff(dateNew);\r\n\t\tdateNew.setDate(1);\r\n\t\tscheduler.updateCalendar(calendar, dateNew);\r\n\t\treturn true;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", action);\r\n\tscheduler.attachEvent(\"onXLE\", action);\r\n\tscheduler.attachEvent(\"onEventAdded\", action);\r\n\tscheduler.attachEvent(\"onEventChanged\", action);\r\n\tscheduler.attachEvent(\"onEventDeleted\", action);\r\n\taction();\r\n};\r\n\r\nscheduler._markCalendarCurrentDate = function(calendar) {\r\n\tvar state = scheduler.getState();\r\n\tvar from = state.min_date;\r\n\tvar to = state.max_date;\r\n\tvar mode = state.mode;\r\n\r\n\tvar month_start = scheduler.date.month_start(new Date(calendar._date));\r\n\tvar month_end = scheduler.date.add(month_start, 1, \"month\");\r\n\r\n\tvar noHighlight = {\r\n\t\t\"month\":true,\r\n\t\t\"year\":true,\r\n\t\t\"agenda\":true,\r\n\t\t\"grid\":true\r\n\t};\r\n\t// no need to highlight current dates for a large range views - agenda, year, etc.\r\n\tif(noHighlight[mode] || (from.valueOf() <= month_start.valueOf() && to.valueOf() >= month_end.valueOf())){\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar current = from;\r\n\twhile(current.valueOf() < to.valueOf()){\r\n\t\tif (month_start.valueOf() <= current.valueOf() && month_end > current) {\r\n\t\t\tscheduler.markCalendar(calendar, current, \"dhx_calendar_click\");\r\n\t\t}\r\n\t\tcurrent = scheduler.date.add(current, 1, \"day\");\r\n\t}\r\n};\r\n\r\nscheduler.attachEvent(\"onEventCancel\", function(){\r\n\tscheduler.destroyCalendar(null, true);\r\n});\r\n\r\nscheduler.attachEvent(\"onDestroy\", function(){\r\n\tscheduler.destroyCalendar();\r\n});\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\tscheduler.xy.scroll_width = 0;\r\n\r\n\tvar old = scheduler.render_view_data;\r\n\tscheduler.render_view_data=function(){\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\t\tdata.firstChild._h_fix = true;\r\n\r\n\t\told.apply(scheduler,arguments);\r\n\r\n\r\n\r\n\t\tvar height = parseInt(data.style.height);\r\n\t\tdata.style.height=\"1px\";\r\n\t\tdata.style.height=data.scrollHeight+\"px\";\r\n\r\n\t\tthis._obj.style.height = this._obj.clientHeight + data.scrollHeight - height + \"px\";\r\n\t};\r\n\r\n\tvar old_s=scheduler._reset_month_scale;\r\n\tscheduler._reset_month_scale=function(a,b,c,d){\r\n\t\tvar dummy = {clientHeight:100};\r\n\t\told_s.apply(scheduler,[dummy,b,c,d]);\r\n\t\ta.innerHTML = dummy.innerHTML;\r\n\t};\r\n\r\n});\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Multisection\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\n\r\nfunction parseXMLOptions(loader, config){\r\n\tvar items = scheduler.ajax.xpath(\"//data/item\", loader.xmlDoc);\r\n\tvar ids = {};\r\n\tfor (var i = 0; i < items.length; i++) {\r\n\t\tids[items[i].getAttribute(config.map_to)] = true;\r\n\t}\r\n\treturn ids;\r\n}\r\n\r\nfunction parseJSONOptions(loader, config){\r\n\ttry{\r\n\t\tvar items = JSON.parse(loader.xmlDoc.responseText);\r\n\t\tvar ids = {};\r\n\t\tfor (var i = 0; i < items.length; i++) {\r\n\t\t\tvar option = items[i];\r\n\r\n\t\t\tids[option.value || option.key || option.id] = true;\r\n\t\t}\r\n\t\treturn ids;\r\n\t}catch(e){\r\n\t\treturn null;\r\n\t}\r\n}\r\n\r\nscheduler.form_blocks[\"multiselect\"]={\r\n\trender:function(sns) {\r\n\t\tvar css = \"dhx_multi_select_control dhx_multi_select_\"+sns.name;\r\n\t\tif(!!sns.vertical){\r\n\t\t\tcss += \" dhx_multi_select_control_vertical\";\r\n\t\t}\r\n\r\n\t\tvar _result = \"
\";\r\n\t\tfor (var i=0; i\"+sns.options[i].label+\"\";\r\n\t\t}\r\n\t\t_result += \"
\";\r\n\t\treturn _result;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\r\n\t\tvar _children = node.getElementsByTagName('input');\r\n\t\tfor(var i=0;i<_children.length;i++) {\r\n\t\t\t_children[i].checked = false; //unchecking all inputs on the form\r\n\t\t}\r\n\r\n\t\tfunction _mark_inputs(ids) { // ids = [ 0: undefined, 1: undefined, 2: true, 'custom_name': false ... ]\r\n\t\t\tvar _children = node.getElementsByTagName('input');\r\n\t\t\tfor(var i=0;i<_children.length; i++) {\r\n\t\t\t\t_children[i].checked = !! ids[_children[i].value];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar _ids = {};\r\n\t\tif (ev[config.map_to]) {\r\n\t\t\tvar results = (ev[config.map_to] + \"\").split(config.delimiter || scheduler.config.section_delimiter || \",\");\r\n\t\t\tfor (var i = 0; i < results.length; i++) {\r\n\t\t\t\t_ids[results[i]] = true;\r\n\t\t\t}\r\n\t\t\t_mark_inputs(_ids);\r\n\t\t} else {\r\n\t\t\tif (scheduler._new_event || !config.script_url)\r\n\t\t\t\treturn;\r\n\t\t\tvar divLoading = document.createElement('div');\r\n\t\t\tdivLoading.className = 'dhx_loading';\r\n\t\t\tdivLoading.style.cssText = \"position: absolute; top: 40%; left: 40%;\";\r\n\t\t\tnode.appendChild(divLoading);\r\n\r\n\t\t\tvar url = [\r\n\t\t\t\tconfig.script_url,\r\n\t\t\t\t(config.script_url.indexOf(\"?\") == -1 ? \"?\" : \"&\"),\r\n\t\t\t\t'dhx_crosslink_' + config.map_to + '=' + ev.id + '&uid=' + scheduler.uid()\r\n\t\t\t].join(\"\");\r\n\r\n\t\t\tscheduler.ajax.get(url, function(loader) {\r\n\t\t\t\tvar options = parseJSONOptions(loader, config);\r\n\t\t\t\tif(!options){\r\n\t\t\t\t\toptions = parseXMLOptions(loader, config);\r\n\t\t\t\t}\r\n\t\t\t\t_mark_inputs(options);\r\n\t\t\t\tnode.removeChild(divLoading);\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tvar _result = [];\r\n\t\tvar _children = node.getElementsByTagName(\"input\");\r\n\t\tfor(var i=0;i<_children.length;i++) {\r\n\t\t\tif(_children[i].checked)\r\n\t\t\t\t_result.push(_children[i].value);\r\n\t\t}\r\n\t\treturn _result.join(config.delimiter || scheduler.config.section_delimiter || \",\");\r\n\t},\r\n\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\r\n\tfunction backup(obj){\r\n\t\tvar t = function(){};\r\n\t\tt.prototype = obj;\r\n\t\treturn t;\r\n\t}\r\n\r\n\tvar old = scheduler._load;\r\n\tscheduler._load=function(url,from){\r\n\t\turl=url||this._load_url;\r\n\t\tif (typeof url == \"object\"){\r\n\t\t\tvar t = backup(this._loaded);\r\n\t\t\tfor (var i=0; i < url.length; i++) {\r\n\t\t\t\tthis._loaded=new t();\r\n\t\t\t\told.call(this,url[i],from);\r\n\t\t\t}\r\n\t\t} else\r\n\t\t\told.apply(this,arguments);\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\t/* global Backbone */\r\n\tvar cfg = {\r\n\t\tuse_id : false\r\n\t};\r\n\r\n\t//remove private properties\r\n\tfunction sanitize(ev){\r\n\t\tvar obj = {};\r\n\t\tfor (var key in ev)\r\n\t\t\tif (key.indexOf(\"_\") !== 0)\r\n\t\t\t\tobj[key] = ev[key];\r\n\r\n\t\tif (!cfg.use_id)\r\n\t\t\tdelete obj.id;\r\n\r\n\t\treturn obj;\r\n\t}\r\n\r\n\tvar update_timer;\r\n\tfunction update_view(){\r\n\t\tclearTimeout(update_timer);\r\n\t\tupdate_timer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler.updateView();\r\n\t\t},1);\r\n\t}\r\n\r\n\tfunction _start_ext_load(cal){\r\n\t\tcal._loading = true;\r\n\t\tcal._not_render = true;\r\n\r\n\t\tcal.callEvent(\"onXLS\", []);\r\n\t}\r\n\tfunction _finish_ext_load(cal){\r\n\t\tcal._not_render = false;\r\n\t\tif (cal._render_wait)\r\n\t\t\tcal.render_view_data();\r\n\t\tcal._loading = false;\r\n\r\n\t\tcal.callEvent(\"onXLE\", []);\r\n\t}\r\n\r\n\r\n\tfunction _get_id(model){\r\n\t\treturn cfg.use_id ? model.id : model.cid;\r\n\t}\r\n\r\nscheduler.backbone = function(events, config){\r\n\tif (config) cfg = config;\r\n\r\n\tevents.bind(\"change\", function(model, info){\r\n\t\tvar cid = _get_id(model);\r\n\t\tvar ev = scheduler._events[cid] = model.toJSON();\r\n\t\tev.id = cid;\r\n\r\n\t\tscheduler._init_event(ev);\r\n\t\tupdate_view();\r\n\t});\r\n\tevents.bind(\"remove\", function(model, changes){\r\n\t\tvar cid = _get_id(model);\r\n\t\tif (scheduler._events[cid])\r\n\t\t\tscheduler.deleteEvent(cid);\r\n\t});\r\n\r\n\tvar queue = [];\r\n\tfunction add_from_queue(){\r\n\t\tif(scheduler.$destroyed){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (queue.length){\r\n\t\t\tscheduler.parse(queue, \"json\");\r\n\t\t\tqueue = [];\r\n\t\t}\r\n\t}\r\n\r\n\tevents.bind(\"add\", function(model, changes){\r\n\t\tvar cid = _get_id(model);\r\n\t\tif (!scheduler._events[cid]){\r\n\t\t\tvar ev = model.toJSON();\r\n\t\t\tev.id = cid;\r\n\t\t\tscheduler._init_event(ev);\r\n\r\n\t\t\tqueue.push(ev);\r\n\t\t\tif (queue.length == 1)\r\n\t\t\t\tsetTimeout(add_from_queue,1);\r\n\t\t}\r\n\t});\r\n\r\n\tevents.bind(\"request\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_start_ext_load(scheduler);\r\n\t});\r\n\tevents.bind(\"sync\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_finish_ext_load(scheduler);\r\n\t});\r\n\tevents.bind(\"error\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_finish_ext_load(scheduler);\r\n\t});\r\n\r\n\r\n\tscheduler.attachEvent(\"onEventCreated\", function(id){\r\n\t\tvar ev = new events.model(scheduler.getEvent(id));\r\n\t\tscheduler._events[id] = ev.toJSON();\r\n\t\tscheduler._events[id].id = id;\r\n\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onEventAdded\", function(id){\r\n\t\tif (!events.get(id)){\r\n\t\t\tvar data = sanitize(scheduler.getEvent(id));\r\n\t\t\tvar model = new events.model(data);\r\n\r\n\t\t\tvar cid = _get_id(model);\r\n\t\t\tif (cid != id)\r\n\t\t\t\tthis.changeEventId(id, cid);\r\n\t\t\tevents.add(model);\r\n\t\t\tevents.trigger(\"scheduler:add\", model);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventChanged\", function(id){\r\n\t\tvar ev = events.get(id);\r\n\t\tvar upd = sanitize(scheduler.getEvent(id));\r\n\r\n\t\tev.set(upd);\r\n\t\tevents.trigger(\"scheduler:change\", ev);\r\n\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventDeleted\", function(id){\r\n\t\tvar model = events.get(id);\r\n\t\tif (model){\r\n\t\t\tevents.trigger(\"scheduler:remove\", model);\r\n\t\t\tevents.remove(id);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\t/* global dhtmlDragAndDropObject, dhtmlx */\r\n// lame old code doesn't provide raw event object\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\t\tvar dragger = (new dhtmlDragAndDropObject());\r\n\t\tvar old = dragger.stopDrag;\r\n\t\tvar last_event;\r\n\t\tdragger.stopDrag = function(e) {\r\n\t\t\tlast_event = e;\r\n\t\t\treturn old.apply(this, arguments);\r\n\t\t};\r\n\r\n\t\tfunction on_drop(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml) {\r\n\r\n\t\t\tif (scheduler.checkEvent(\"onBeforeExternalDragIn\") && !scheduler.callEvent(\"onBeforeExternalDragIn\", [sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml, last_event]))\r\n\t\t\t\treturn;\r\n\r\n\t\t\tvar temp = scheduler.attachEvent(\"onEventCreated\", function (id) {\r\n\t\t\t\tif (!scheduler.callEvent(\"onExternalDragIn\", [id, sourceHtmlObject, last_event])) {\r\n\t\t\t\t\tthis._drag_mode = this._drag_id = null;\r\n\t\t\t\t\tthis.deleteEvent(id);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tvar action_data = scheduler.getActionData(last_event);\r\n\t\t\tvar event_data = {\r\n\t\t\t\tstart_date: new Date(action_data.date)\r\n\t\t\t};\r\n\r\n\t\t\t// custom views, need to assign section id, fix dates\r\n\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\tvar view_options = scheduler.matrix[scheduler._mode];\r\n\t\t\t\tevent_data[view_options.y_property] = action_data.section;\r\n\r\n\t\t\t\tvar pos = scheduler._locate_cell_timeline(last_event);\r\n\t\t\t\tevent_data.start_date = view_options._trace_x[pos.x];\r\n\t\t\t\tevent_data.end_date = scheduler.date.add(event_data.start_date, view_options.x_step, view_options.x_unit);\r\n\t\t\t}\r\n\t\t\tif (scheduler._props && scheduler._props[scheduler._mode]) {\r\n\t\t\t\tevent_data[scheduler._props[scheduler._mode].map_to] = action_data.section;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler.addEventNow(event_data);\r\n\r\n\t\t\tscheduler.detachEvent(temp);\r\n\t\t}\r\n\r\n\t\tdragger.addDragLanding(scheduler._els[\"dhx_cal_data\"][0], {\r\n\t\t\t_drag: function(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml) {\r\n\t\t\t\ton_drop(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml);\r\n\t\t\t},\r\n\t\t\t_dragIn: function(htmlObject, shtmlObject) {\r\n\t\t\t\treturn htmlObject;\r\n\t\t\t},\r\n\t\t\t_dragOut: function(htmlObject) {\r\n\t\t\t\treturn this;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(dhtmlx.DragControl) {\r\n\t\t\tdhtmlx.DragControl.addDrop(scheduler._els[\"dhx_cal_data\"][0], {\r\n\t\t\t\tonDrop: function (source, target, d, e) {\r\n\t\t\t\t\tvar sourceDhtmlx = dhtmlx.DragControl.getMaster(source);\r\n\t\t\t\t\tlast_event = e;\r\n\t\t\t\t\ton_drop(source, sourceDhtmlx, target, e.target || e.srcElement);\r\n\t\t\t\t},\r\n\r\n\t\t\t\tonDragIn: function (source, target, e) {\r\n\t\t\t\t\treturn target;\r\n\t\t\t\t}\r\n\t\t\t}, true);\r\n\t\t}\r\n\t});\r\n\r\n}","export default function(scheduler){\r\n\r\n\tvar dx, dy,\r\n\t\thtml_regexp = new RegExp(\"<[^>]*>\", \"g\"),\r\n\t\tnewline_regexp = new RegExp(\"]*>\", \"g\");\r\n\r\n\tfunction clean_html(val) {\r\n\t\treturn val.replace(newline_regexp, \"\\n\").replace(html_regexp, \"\");\r\n\t}\r\n\r\n\tfunction x_norm(x, offset) {\r\n\t\tx = parseFloat(x);\r\n\t\toffset = parseFloat(offset);\r\n\t\tif (!isNaN(offset)) x -= offset;\r\n\r\n\t\tvar w = colsWidth(x);\r\n\t\tx = x - w.width + w.cols*dx;\r\n\t\treturn isNaN(x)?\"auto\":(100*x/(dx));\r\n\t}\r\n\r\n\tfunction x_norm_event(x, offset, is_left) {\r\n\t\tx = parseFloat(x);\r\n\t\toffset = parseFloat(offset);\r\n\t\tif (!isNaN(offset) && is_left) x -= offset;\r\n\r\n\t\tvar w = colsWidth(x);\r\n\t\tx = x - w.width + w.cols*dx;\r\n\t\treturn isNaN(x)?\"auto\":(100*x/(dx-(!isNaN(offset)?offset:0)));\r\n\t}\r\n\tfunction colsWidth(width) {\r\n\t\tvar r = 0;\r\n\t\tvar header = scheduler._els.dhx_cal_header[0].childNodes;\r\n\t\tvar els = header[1] ? header[1].childNodes : header[0].childNodes;\r\n\t\tfor (var i = 0; i < els.length; i++) {\r\n\t\t\tvar el = els[i].style ? els[i] : els[i].parentNode;\r\n\t\t\tvar w = parseFloat(el.style.width);\r\n\t\t\tif (width > w){\r\n\t\t\t\twidth -= (w+1);\r\n\t\t\t\tr+=(w+1);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\treturn { width: r, cols: i };\r\n\t}\r\n\r\n\tfunction y_norm(y) {\r\n\t\ty = parseFloat(y);\r\n\t\tif (isNaN(y)) return \"auto\";\r\n\t\treturn 100 * y / dy;\r\n\t}\r\n\r\n\tfunction get_style(node, style){\r\n\t\treturn (window.getComputedStyle?(window.getComputedStyle(node, null)[style]):(node.currentStyle?node.currentStyle[style]:null))||\"\";\r\n\t}\r\n\r\n\tfunction de_day(node, n) {\r\n\t\tvar x = parseInt(node.style.left, 10);\r\n\r\n\t\tfor (var dx = 0; dx < scheduler._cols.length; dx++) {\r\n\t\t\tx -= scheduler._cols[dx];\r\n\t\t\tif (x < 0) return dx;\r\n\t\t}\r\n\t\treturn n;\r\n\t}\r\n\r\n\tfunction de_week(node, n) {\r\n\t\tvar y = parseInt(node.style.top, 10);\r\n\t\tfor (var dy = 0; dy < scheduler._colsS.heights.length; dy++)\r\n\t\t\tif (scheduler._colsS.heights[dy] > y) return dy;\r\n\t\treturn n;\r\n\t}\r\n\r\n\tfunction xml_start(tag) {\r\n\t\treturn tag ? \"<\"+tag+\">\" : \"\";\r\n\t}\r\n\tfunction xml_end(tag) {\r\n\t\treturn tag ? \"\" : \"\";\r\n\t}\r\n\r\n\tfunction xml_top(tag, profile, header, footer) {\r\n\t\tvar xml = \"<\"+tag+\" profile='\" + profile + \"'\";\r\n\t\tif (header)\r\n\t\t\txml += \" header='\" + header + \"'\";\r\n\t\tif (footer)\r\n\t\t\txml += \" footer='\" + footer + \"'\";\r\n\t\txml += \">\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_body_header() {\r\n\t\tvar xml = \"\";\r\n\t\t// detects if current mode is timeline\r\n\t\tvar mode = scheduler._mode;\r\n\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode])\r\n\t\t\tmode = (scheduler.matrix[scheduler._mode].render == \"cell\") ? \"matrix\" : \"timeline\";\r\n\t\txml += \"\";\r\n\r\n\t\tif (scheduler._mode == \"week_agenda\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_data[0].getElementsByTagName(\"DIV\");\r\n\t\t\tfor (var i = 0; i < xh.length; i++)\r\n\t\t\t\tif (xh[i].className == \"dhx_wa_scale_bar\")\r\n\t\t\t\t\txml += \"\" + clean_html(xh[i].innerHTML) + \"\";\r\n\t\t} else if (scheduler._mode == \"agenda\" || scheduler._mode == \"map\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_header[0].childNodes[0].childNodes;\r\n\r\n\t\t\txml += \"\" + clean_html(xh[0].innerHTML) + \"\" + clean_html(xh[1].innerHTML) + \"\";\r\n\t\t} else if (scheduler._mode == \"year\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_data[0].childNodes;\r\n\t\t\tfor (var i = 0; i < xh.length; i++) {\r\n\t\t\t\txml += \"\";\r\n\t\t\t\txml += xml_month_scale(xh[i].querySelector(\".dhx_year_week\").childNodes);\r\n\t\t\t\txml += xml_month(xh[i].querySelector(\".dhx_year_body\"));\r\n\t\t\t\txml += \"\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\txml += \"\";\r\n\t\t\tvar xh = scheduler._els.dhx_cal_header[0].childNodes;\r\n\t\t\txml += xml_month_scale(xh);\r\n\t\t\txml += \"\";\r\n\r\n\t\t\tvar yh = scheduler._els.dhx_cal_data[0];\r\n\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tfor (var i = 0; i < yh.firstChild.rows.length; i++) {\r\n\t\t\t\t\tvar el = yh.firstChild.rows[i];\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t}\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tdy = yh.firstChild.rows[0].cells[0].offsetHeight;\r\n\t\t\t} else if (yh.firstChild.tagName == \"TABLE\") {\r\n\t\t\t\txml += xml_month(yh);\r\n\t\t\t} else {\r\n\t\t\t\tyh = yh.childNodes[yh.childNodes.length - 1];\r\n\t\t\t\twhile (yh.className.indexOf(\"dhx_scale_holder\") == -1)\r\n\t\t\t\t\tyh = yh.previousSibling;\r\n\t\t\t\tyh = yh.childNodes;\r\n\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tfor (var i = 0; i < yh.length; i++)\r\n\t\t\t\t\txml += \"\\n\";\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tdy = yh[0].offsetHeight;\r\n\t\t\t}\r\n\t\t}\r\n\t\txml += \"\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_month(yh) {\r\n\t\tvar xml = \"\";\r\n\t\tvar r = yh.querySelectorAll(\"tr\");\r\n\t\tfor (var i = 0; i < r.length; i++) {\r\n\t\t\tvar days = [];\r\n\t\t\tvar cells = r[i].querySelectorAll(\"td\");\r\n\r\n\t\t\tfor (var j = 0; j < cells.length; j++)\r\n\t\t\t\tdays.push(cells[j].querySelector(\".dhx_month_head\").innerHTML);\r\n\r\n\t\t\txml += \"\\n\";\r\n\t\t\tdy = cells[0].offsetHeight;\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_month_scale(xh) {\r\n\t\tvar xhs,\r\n\t\t\txml = \"\";\r\n\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\tif (scheduler.matrix[scheduler._mode].second_scale)\r\n\t\t\t\txhs = xh[1].childNodes;\r\n\r\n\t\t\txh = xh[0].childNodes;\r\n\t\t}\r\n\r\n\t\tfor (var i = 0; i < xh.length; i++)\r\n\t\t\txml += \"\\n\";\r\n\t\tdx = xh[0].offsetWidth;\r\n\r\n\t\tif (xhs) {\r\n\t\t\tvar width = 0;\r\n\t\t\tvar top_width = xh[0].offsetWidth;\r\n\t\t\tvar top_col = 1;\r\n\t\t\tfor (var i = 0; i < xhs.length; i++) {\r\n\t\t\t\txml += \"\\n\";\r\n\t\t\t\twidth += xhs[i].offsetWidth;\r\n\t\t\t\tif (width >= top_width) {\r\n\t\t\t\t\ttop_width += (xh[top_col] ? xh[top_col].offsetWidth : 0);\r\n\t\t\t\t\ttop_col++;\r\n\t\t\t\t}\r\n\t\t\t\tdx = xhs[0].offsetWidth;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_body(colors) {\r\n\t\tvar xml = \"\";\r\n\t\tvar evs = scheduler._rendered;\r\n\t\tvar matrix = scheduler.matrix && scheduler.matrix[scheduler._mode];\r\n\r\n\t\tif (scheduler._mode == \"agenda\" || scheduler._mode == \"map\") {\r\n\r\n\t\t\tfor (var i = 0; i < evs.length; i++)\r\n xml += \"\";\r\n\r\n\t\t} else if (scheduler._mode == \"week_agenda\") {\r\n\r\n\t\t\tfor (var i = 0; i < evs.length; i++)\r\n\t\t\t\txml += \"\" + clean_html(evs[i].innerHTML) + \"\";\r\n\r\n\t\t} else if (scheduler._mode == \"year\") {\r\n\r\n\t\t\tvar evs = scheduler.get_visible_events();\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar d = evs[i].start_date;\r\n\t\t\t\tif (d.valueOf() < scheduler._min_date.valueOf())\r\n\t\t\t\t\td = scheduler._min_date;\r\n\r\n\t\t\t\twhile (d < evs[i].end_date) {\r\n\t\t\t\t\tvar m = d.getMonth() + 12 * (d.getFullYear() - scheduler._min_date.getFullYear()) - scheduler.week_starts._month;\r\n\t\t\t\t\tvar day = scheduler.week_starts[m] + d.getDate() - 1;\r\n\t\t\t\t\tvar text_color = colors ? get_style(scheduler._get_year_cell(d), \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(scheduler._get_year_cell(d), \"backgroundColor\") : \"\";\r\n\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t\td = scheduler.date.add(d, 1, \"day\");\r\n\t\t\t\t\tif (d.valueOf() >= scheduler._max_date.valueOf())\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (matrix && matrix.render == \"cell\") {\r\n\t\t\tvar evs = scheduler._els.dhx_cal_data[0].getElementsByTagName(\"TD\");\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar text_color = colors ? get_style(evs[i], \"color\") : \"\";\r\n\t\t\t\tvar bg_color = colors ? get_style(evs[i], \"backgroundColor\") : \"\";\r\n\t\t\t\txml += \"\\n\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar zx, zdx;\r\n\t\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\t\t// logic for timeline view\r\n\t\t\t\t\tzx = x_norm(evs[i].style.left);\r\n\t\t\t\t\tzdx = x_norm(evs[i].offsetWidth)-1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// we should use specific logic for day/week/units view\r\n\t\t\t\t\tvar left_norm = scheduler.config.use_select_menu_space ? 0 : 26;\r\n\t\t\t\t\tzx = x_norm_event(evs[i].style.left, left_norm, true);\r\n\t\t\t\t\tzdx = x_norm_event(evs[i].style.width, left_norm)-1;\r\n\t\t\t\t}\r\n\t\t\t\tif (isNaN(zdx * 1)) continue;\r\n\t\t\t\tvar zy = y_norm(evs[i].style.top);\r\n\t\t\t\tvar zdy = y_norm(evs[i].style.height);\r\n\r\n\t\t\t\tvar e_type = evs[i].className.split(\" \")[0].replace(\"dhx_cal_\", \"\");\r\n\t\t\t\tif (e_type === 'dhx_tooltip_line') continue;\r\n\r\n\t\t\t\tvar dets = scheduler.getEvent(evs[i].getAttribute(scheduler.config.event_attribute));\r\n if (!dets) continue;\r\n\t\t\t\tvar day = dets._sday;\r\n\t\t\t\tvar week = dets._sweek;\r\n\t\t\t\tvar length = dets._length || 0;\r\n\r\n\t\t\t\tif (scheduler._mode == \"month\") {\r\n\t\t\t\t\tzdy = parseInt(evs[i].offsetHeight, 10);\r\n\t\t\t\t\tzy = parseInt(evs[i].style.top, 10) - scheduler.xy.month_head_height;\r\n\r\n\t\t\t\t\tday = de_day(evs[i], day);\r\n\t\t\t\t\tweek = de_week(evs[i], week);\r\n\t\t\t\t} else if (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\t\tday = 0;\r\n\t\t\t\t\tvar el = evs[i].parentNode.parentNode.parentNode;\r\n\t\t\t\t\tweek = el.rowIndex;\r\n\t\t\t\t\tvar dy_copy = dy;\r\n\t\t\t\t\tdy = evs[i].parentNode.offsetHeight;\r\n\t\t\t\t\tzy = y_norm(evs[i].style.top);\r\n\t\t\t\t\tzy -= zy * 0.2;\r\n\t\t\t\t\tdy = dy_copy;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (evs[i].parentNode == scheduler._els.dhx_cal_data[0]) continue;\r\n\t\t\t\t\tvar parent = scheduler._els[\"dhx_cal_data\"][0].childNodes[0];\r\n\t\t\t\t\tvar offset = parseFloat(parent.className.indexOf(\"dhx_scale_holder\") != -1 ? parent.style.left : 0);\r\n\t\t\t\t\tzx += x_norm(evs[i].parentNode.style.left, offset);\r\n\t\t\t\t}\r\n\r\n\t\t\t\txml += \"\\n\";\r\n\r\n\t\t\t\tif (e_type == \"event\") {\r\n\t\t\t\t\txml += \"
\";\r\n\t\t\t\t\tvar text_color = colors ? get_style(evs[i].childNodes[2], \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(evs[i].childNodes[2], \"backgroundColor\") : \"\";\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvar text_color = colors ? get_style(evs[i], \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(evs[i], \"backgroundColor\") : \"\";\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t}\r\n\t\t\t\txml += \"
\";\r\n\t\t\t}\r\n\t\t\t}\r\n\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction toXML(start, end, view, mode, header, footer){\r\n\t\tvar colors = false;\r\n\t\tif (mode == \"fullcolor\") {\r\n\t\t\tcolors = true;\r\n\t\t\tmode = \"color\";\r\n\t\t}\r\n\r\n\t\tmode = mode || \"color\";\r\n\r\n\t\tvar xml = \"\";\r\n\t\tif (start) {\r\n\r\n\t\t\tvar original_date = scheduler._date;\r\n\t\t\tvar original_mode = scheduler._mode;\r\n\t\t\tend = scheduler.date[view+\"_start\"](end);\r\n\t\t\tend = scheduler.date[\"get_\"+view+\"_end\"] ? scheduler.date[\"get_\"+view+\"_end\"](end) : scheduler.date.add(end, 1, view);\r\n\r\n\t\t\txml = xml_top(\"pages\", mode, header, footer);\r\n\t\t\tfor (var temp_date = new Date(start); +temp_date < +end; temp_date = this.date.add(temp_date, 1, view)) {\r\n\t\t\t\tthis.setCurrentView(temp_date, view);\r\n\t\t\t\txml += xml_start(\"page\") + xml_body_header().replace(\"\\u2013\", \"-\") + xml_body(colors) + xml_end(\"page\");\r\n\t\t\t}\r\n\t\t\txml += xml_end(\"pages\");\r\n\r\n\t\t\tthis.setCurrentView(original_date, original_mode);\r\n\t\t} else {\r\n\t\t\txml = xml_top(\"data\", mode, header, footer) + xml_body_header().replace(\"\\u2013\", \"-\") + xml_body(colors) + xml_end(\"data\");\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\tscheduler.getPDFData = toXML;\r\n\tfunction send_xml(xml, url){\r\n\t\tvar uid = scheduler.uid();\r\n\t\tvar d = document.createElement(\"div\");\r\n\t\td.style.display = \"none\";\r\n\t\tdocument.body.appendChild(d);\r\n\r\n\t\td.innerHTML = '
';\r\n\t\tdocument.getElementById(uid).firstChild.value = encodeURIComponent(xml);\r\n\t\tdocument.getElementById(uid).submit();\r\n\t\td.parentNode.removeChild(d);\r\n\t}\r\n\r\n\tfunction to_pdf(start, end, view, url, mode, header, footer) {\r\n\t\tvar xml = \"\";\r\n\t\tif(typeof mode == \"object\"){\r\n\t\t\txml = schedulersToPdf(mode);\r\n\t\t}else{\r\n\t\t\txml = toXML.apply(this, [start, end, view, mode, header, footer]);\r\n\t\t}\r\n\r\n\t\tsend_xml(xml, url);\r\n\t}\r\n\r\n\tfunction schedulersToPdf(objects){\r\n\t\tvar xml = \"\";\r\n\t\tfor(var i=0; i < objects.length; i++){\r\n\t\t\txml += objects[i].source.getPDFData(objects[i].start, objects[i].end, objects[i].view, objects[i].mode, objects[i].header, objects[i].footer);\r\n\t\t}\r\n\t\txml += \"\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\t/*\r\n\t * scheduler.toPDF(url, mode, header, footer) - for a single scheduler\r\n\t * scheduler.toPDF(url, [scheduler1, scheduler2,...]) - for multiple schedulers\r\n\t * example:\r\n\t * scheduler.toPDF(\"generate.ashx\", [\r\n\t * { source: scheduler1, mode: \"color\" },\r\n\t * { source: scheduler2, mode: \"gray\", view:\"week\", start:new Date(2013, 06, 1), end:new Date(2013, 06, 28) },\r\n\t * { source: scheduler3 }\r\n\t * ]);\r\n\t *\r\n\t */\r\n\tscheduler.toPDF = function(url, mode, header, footer) {\r\n\t\treturn to_pdf.apply(this, [null, null, null, url, mode, header, footer]);\r\n\t};\r\n\tscheduler.toPDFRange = function(start, end, view, url, mode, header, footer) {\r\n\t\tif (typeof start == \"string\") {\r\n\t\t\tstart = scheduler.templates.api_date(start);\r\n\t\t\tend = scheduler.templates.api_date(end);\r\n\t\t}\r\n\r\n\t\treturn to_pdf.apply(this, arguments);\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.icons_select = [\"icon_form\", \"icon_delete\"];\r\nscheduler.config.details_on_create = true;\r\nscheduler.config.show_quick_info = true;\r\nscheduler.xy.menu_width = 0;\r\n\r\nscheduler.attachEvent(\"onClick\", function(id){\r\n\tif(!scheduler.config.show_quick_info){\r\n\t\treturn;\r\n\t}\r\n\tscheduler.showQuickInfo(id);\r\n\treturn true;\r\n});\r\n\r\n(function(){\r\n\t// pass `force` argument in order to hide quick info synchronously\r\n\t// so it won't affect showQuickInfo call that can follow\r\n\tvar events = [\"onEmptyClick\", \"onViewChange\", \"onLightbox\", \"onBeforeEventDelete\", \"onBeforeDrag\"];\r\n\tvar hiding_function = function(){\r\n\t\tscheduler.hideQuickInfo(true);\r\n\t\treturn true;\r\n\t};\r\n\tfor (var i=0; i window.innerWidth){\r\n\t\t\tleft = window.innerWidth - width;\r\n\t\t}\r\n\t\tleft = Math.max(0, left);\r\n\r\n\t\tqi.style.left = left + \"px\";\r\n\t\tqi.style.top = pos.top - (pos.dy?height:-pos.height) + \"px\";\r\n\t} else {\r\n\r\n\t\tconst dataPos = scheduler.$container.querySelector('.dhx_cal_data').offsetTop;\r\n\t\tqi.style.top = dataPos + 20 + \"px\";\r\n\t\tif (pos.dx == 1){\r\n\t\t\tqi.style.right = \"auto\";\r\n\t\t\tqi.style.left = -width + \"px\";\r\n\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tqi.style.left = \"-10px\";\r\n\t\t\t},1);\r\n\t\t} else {\r\n\t\t\tqi.style.left = \"auto\";\r\n\t\t\tqi.style.right = -width + \"px\";\r\n\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tqi.style.right = \"-10px\";\r\n\t\t\t},1);\r\n\t\t}\r\n\t\tqi.className = qi.className.replace(\" dhx_qi_left\",\"\").replace(\" dhx_qi_right\",\"\")+\" dhx_qi_\"+(pos.dx==1?\"left\":\"right\");\r\n\t}\r\n};\r\nscheduler.attachEvent(\"onTemplatesReady\", function(){\r\n\tscheduler.hideQuickInfo();\r\n\tif(this._quick_info_box){\r\n\t\tvar box = this._quick_info_box;\r\n\t\tif(box.parentNode){\r\n\t\t\tbox.parentNode.removeChild(box);\r\n\t\t}\r\n\t\tthis._quick_info_box = null;\r\n\t}\r\n});\r\nscheduler._quick_info_onscroll_handler = function(e){\r\n\tscheduler.hideQuickInfo();\r\n};\r\nscheduler._init_quick_info = function(){\r\n\tif (!this._quick_info_box){\r\n\r\n\r\n\t\tvar qi = this._quick_info_box = document.createElement(\"div\");\r\n\r\n\t\tthis._waiAria.quickInfoAttr(qi);\r\n\r\n\t\tqi.className = \"dhx_cal_quick_info\";\r\n\t\tif (scheduler.$testmode)\r\n\t\t\tqi.className += \" dhx_no_animate\";\r\n\t\tif (scheduler.config.rtl) qi.className += \" dhx_quick_info_rtl\";\r\n\t//title\r\n\t\tvar ariaAttr = this._waiAria.quickInfoHeaderAttrString();\r\n\t\tvar html = `\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t\t
\r\n\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t\t
`;\r\n\r\n\t//buttons\r\n\t\thtml += \"
\";\r\n\t\tvar buttons = scheduler.config.icons_select;\r\n\t\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\t\tvar ariaAttr = this._waiAria.quickInfoButtonAttrString(this.locale.labels[buttons[i]]);\r\n\t\t\t\thtml += `
\r\n\t\t\t\t
${scheduler.locale.labels[buttons[i]]}
`;\r\n\t\t\t}\r\n\t\t// }\r\n\t\thtml += \"
\";\r\n\r\n\t\tqi.innerHTML = html;\r\n\t\tscheduler.event(qi, \"click\", function(ev){\r\n\t\t\tscheduler._qi_button_click(ev.target || ev.srcElement);\r\n\t\t});\r\n\t\tif (scheduler.config.quick_info_detached){\r\n\t\t\tscheduler._detachDomEvent(scheduler._els[\"dhx_cal_data\"][0], \"scroll\", scheduler._quick_info_onscroll_handler);\r\n\t\t\tscheduler.event(scheduler._els[\"dhx_cal_data\"][0], \"scroll\", scheduler._quick_info_onscroll_handler);\r\n\t\t}\r\n\t}\r\n\r\n\treturn this._quick_info_box;\r\n};\r\n\r\nscheduler._qi_button_click = function(node){\r\n\tvar box = scheduler._quick_info_box;\r\n\tif (!node || node == box) return;\r\n\r\n\tif(node.closest(\".dhx_cal_qi_close_btn\")){\r\n\t\tscheduler.hideQuickInfo();\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar mask = scheduler._getClassName(node);\r\n\tif (mask.indexOf(\"_icon\")!=-1){\r\n\t\tvar id = scheduler._quick_info_box_id;\r\n\t\tscheduler._click.buttons[mask.split(\" \")[1].replace(\"icon_\",\"\")](id);\r\n\t} else\r\n\t\tscheduler._qi_button_click(node.parentNode);\r\n};\r\nscheduler._get_event_counter_part = function(id){\r\n\tvar domEv = scheduler.getRenderedEvent(id);\r\n\tvar left = 0;\r\n\tvar top = 0;\r\n\r\n\tvar node = domEv;\r\n\twhile (node && node != scheduler._obj){\r\n\t\tleft += node.offsetLeft;\r\n\t\ttop += node.offsetTop-node.scrollTop;\r\n\t\tnode = node.offsetParent;\r\n\t}\r\n\tif(node){\r\n\t\tvar dx = (left + domEv.offsetWidth/2) > (scheduler._x/2) ? 1 : 0;\r\n\t\tvar dy = (top + domEv.offsetHeight/2) > (scheduler._y/2) ? 1 : 0;\r\n\r\n\t\treturn { left:left, top:top, dx:dx, dy:dy,\r\n\t\t\twidth:domEv.offsetWidth, height:domEv.offsetHeight };\r\n\t}\r\n\treturn 0;\r\n};\r\n\r\nscheduler._fill_quick_data = function(id){\r\n\tvar ev = scheduler.getEvent(id);\r\n\tvar qi = scheduler._quick_info_box;\r\n\r\n\tscheduler._quick_info_box_id = id;\r\n\r\n//title content\r\n\r\n\tvar header = {\r\n\t\tcontent: scheduler.templates.quick_info_title(ev.start_date, ev.end_date, ev),\r\n\t\tdate: scheduler.templates.quick_info_date(ev.start_date, ev.end_date, ev)\r\n\t};\r\n\tvar titleContent = qi.querySelector(\".dhx_cal_qi_tcontent\");\r\n\ttitleContent.innerHTML = `${header.content}`;\r\n\tvar titleDate = qi.querySelector(\".dhx_cal_qi_tdate\");\r\n\ttitleDate.innerHTML = header.date;\r\n\r\n\tscheduler._waiAria.quickInfoHeader(qi, [header.content, header.date].join(\" \"));\r\n\r\n//main content\r\n\tvar main = qi.querySelector(\".dhx_cal_qi_content\");\r\n\tconst mainContent = scheduler.templates.quick_info_content(ev.start_date, ev.end_date, ev);\r\n\tif(mainContent){\r\n\t\tmain.classList.remove(\"dhx_hidden\");\r\n\t\tmain.innerHTML = mainContent;\r\n\t}else{\r\n\t\tmain.classList.add(\"dhx_hidden\");\r\n\t}\r\n};\r\n\r\n\r\n}","export default function(scheduler){\r\n\t\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar originalRecurringSetValue;\r\n\tif (scheduler.form_blocks.recurring) {\r\n\t\toriginalRecurringSetValue = scheduler.form_blocks.recurring.set_value;\r\n\t}\r\n\tvar original_left_buttons = scheduler.config.buttons_left.slice();\r\n\tvar original_right_buttons = scheduler.config.buttons_right.slice();\r\n\r\n\tscheduler.attachEvent(\"onBeforeLightbox\", function(id) {\r\n\t\tif (this.config.readonly_form || this.getEvent(id).readonly) {\r\n\t\t\tthis.config.readonly_active = true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.config.readonly_active = false;\r\n\t\t\tscheduler.config.buttons_left = original_left_buttons.slice();\r\n\t\t\tscheduler.config.buttons_right = original_right_buttons.slice();\r\n\t\r\n\t\t\t// initial value\r\n\t\t\tif(scheduler.form_blocks.recurring) {\r\n\t\t\t\tscheduler.form_blocks.recurring.set_value = originalRecurringSetValue;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar sns = this.config.lightbox.sections;\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\tfor (var i = 0; i < sns.length; i++) {\r\n\t\t\t\tif (sns[i].type == 'recurring') {\r\n\t\t\t\t\tif (this.config.readonly_active && scheduler.form_blocks.recurring) {\r\n\t\t\t\t\t\tscheduler.form_blocks.recurring.set_value = function(node, value, ev) {\r\n\t\t\t\t\t\t\tvar wrapper = scheduler.$domHelpers.closest(node, \".dhx_wrap_section\");\r\n\t\t\t\t\t\t\tvar style = \"none\";\r\n\t\t\t\t\t\t\twrapper.querySelector('.dhx_cal_lsection').display = style;\r\n\t\t\t\t\t\t\twrapper.querySelector('.dhx_form_repeat').display = style;\r\n\t\t\t\t\t\t\twrapper.style.display = style;\r\n\r\n\t\t\t\t\t\t\tscheduler.setLightboxSize();\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar forbidden_buttons = [\"dhx_delete_btn\", \"dhx_save_btn\"];\r\n\t\t\tvar button_arrays = [scheduler.config.buttons_left, scheduler.config.buttons_right];\r\n\t\t\tfor (var i = 0; i < forbidden_buttons.length; i++) {\r\n\t\t\t\tvar forbidden_button = forbidden_buttons[i];\r\n\t\t\t\tfor (var k = 0; k < button_arrays.length; k++) {\r\n\t\t\t\t\tvar button_array = button_arrays[k];\r\n\t\t\t\t\tvar index = -1;\r\n\t\t\t\t\tfor (var p = 0; p < button_array.length; p++) {\r\n\t\t\t\t\t\tif (button_array[p] == forbidden_button) {\r\n\t\t\t\t\t\t\tindex = p;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (index != -1) {\r\n\t\t\t\t\t\tbutton_array.splice(index, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.resetLightbox();\r\n\r\n\t\treturn true;\r\n\t});\r\n\r\n\tfunction txt_replace(tag, d, n, text) {\r\n\t\tvar txts = d.getElementsByTagName(tag);\r\n\t\tvar txtt = n.getElementsByTagName(tag);\r\n\t\tfor (var i = txtt.length - 1; i >= 0; i--) {\r\n\t\t\tvar n = txtt[i];\r\n\t\t\tif (!text){\r\n\t\t\t\tn.disabled = true;\r\n\t\t\t\t//radio and checkboxes loses state after .cloneNode in IE\r\n\t\t\t\tif(d.checked)\r\n\t\t\t\t\tn.checked = true;\r\n\t\t\t}else {\r\n\t\t\t\tvar t = document.createElement(\"span\");\r\n\t\t\t\tt.className = \"dhx_text_disabled\";\r\n\t\t\t\tt.innerHTML = text(txts[i]);\r\n\t\t\t\tn.parentNode.insertBefore(t, n);\r\n\t\t\t\tn.parentNode.removeChild(n);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tvar old = scheduler._fill_lightbox;\r\n\tscheduler._fill_lightbox = function() {\r\n\r\n\t\tvar lb = this.getLightbox();\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\tlb.style.visibility = 'hidden';\r\n\t\t\t// lightbox should have actual sizes before rendering controls\r\n\t\t\t// currently only matters for dhtmlxCombo\r\n\t\t\tlb.style.display = 'block';\r\n\t\t}\r\n\t\tvar res = old.apply(this, arguments);\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\t//reset visibility and display\r\n\t\t\tlb.style.visibility = '';\r\n\t\t\tlb.style.display = 'none';\r\n\t\t}\r\n\r\n\t\tif (this.config.readonly_active) {\r\n\r\n\t\t\tvar originalForm = this.getLightbox();\r\n\t\t\tvar readonlyForm = this._lightbox_r = originalForm.cloneNode(true);\r\n\t\t\treadonlyForm.id = scheduler.uid();\r\n\t\t\treadonlyForm.className += \" dhx_cal_light_readonly\";\r\n\t\t\ttxt_replace(\"textarea\", originalForm, readonlyForm, function(a) {\r\n\t\t\t\treturn a.value;\r\n\t\t\t});\r\n\t\t\ttxt_replace(\"input\", originalForm, readonlyForm, false);\r\n\t\t\ttxt_replace(\"select\", originalForm, readonlyForm, function(a) {\r\n\t\t\t\tif(!a.options.length) return \"\";\r\n\t\t\t\treturn a.options[Math.max((a.selectedIndex || 0), 0)].text;\r\n\t\t\t});\r\n\r\n\t\t\toriginalForm.parentNode.insertBefore(readonlyForm, originalForm);\r\n\r\n\t\t\tthis.showCover(readonlyForm);\r\n\t\t\tif (scheduler._lightbox)\r\n\t\t\t\tscheduler._lightbox.parentNode.removeChild(scheduler._lightbox);\r\n\t\t\tthis._lightbox = readonlyForm;\r\n\r\n\t\t\tif (scheduler.config.drag_lightbox)\r\n\t\t\t\tscheduler.event(readonlyForm.firstChild, \"mousedown\", scheduler._ready_to_dnd);\r\n\t\t\t\t\r\n\t\t\tscheduler._init_lightbox_events();\r\n\t\t\tthis.setLightboxSize();\r\n\t\t}\r\n\t\treturn res;\r\n\t};\r\n\r\n\tvar hold = scheduler.hide_lightbox;\r\n\tscheduler.hide_lightbox = function() {\r\n\t\tif (this._lightbox_r) {\r\n\t\t\tthis._lightbox_r.parentNode.removeChild(this._lightbox_r);\r\n\t\t\tthis._lightbox_r = this._lightbox = null;\r\n\t\t}\r\n\r\n\t\treturn hold.apply(this, arguments);\r\n\t};\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.occurrence_timestamp_in_utc = false;\r\nscheduler.config.recurring_workdays = [1,2,3,4,5];\r\nscheduler.form_blocks[\"recurring\"] = {\r\n\t_get_node : function(node){\r\n\t\tif (typeof node == \"string\"){\r\n\t\t\tlet element = scheduler._lightbox.querySelector(`#${node}`);\r\n\t\t\tif(!element){\r\n\t\t\t\t// form is detached from lightbox \r\n\t\t\t\t// search globally, won't work in LWC\r\n\t\t\t\telement = document.getElementById(node);\r\n\t\t\t}\r\n\t\t\tnode = element;\r\n\t\t}\r\n\t\tif (node.style.display == 'none')\r\n\t\t\tnode.style.display = \"\";\r\n\t\treturn node;\r\n\t},\r\n\t_outer_html: function(node){\r\n\t\treturn node.outerHTML || getOuterHTML(node);\r\n\r\n\t\t//probably not needed, FF v10- only\r\n\t\tfunction getOuterHTML(n){\r\n\t\t\tvar div = document.createElement('div'), h;\r\n\t\t\tdiv.appendChild( n.cloneNode(true) );\r\n\t\t\th = div.innerHTML;\r\n\t\t\tdiv = null;\r\n\t\t\treturn h;\r\n\t\t}\r\n\t},\r\n\trender:function(sns) {\r\n\t\tif(sns.form){\r\n\t\t\tvar rec = scheduler.form_blocks[\"recurring\"];\r\n\t\t\tvar form = rec._get_node(sns.form);\r\n\t\t\tvar html = rec._outer_html(form);\r\n\t\t\tform.style.display = 'none';\r\n\t\t\treturn html;\r\n\t\t}\r\n\t\tvar loc = scheduler.locale.labels;\r\n\t\treturn '
'+\r\n\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+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\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t''+loc.repeat_text_occurences_count+'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t'
'+\r\n\t\t\t\t'
'+\r\n\t\t\t\t'';\r\n\t},\r\n\t_ds: {},\r\n\t_get_form_node: function(els, name, value){\r\n\t\tvar col = els[name];\r\n\t\tif(!col) return null;\r\n\t\tif(col.nodeName) return col;\r\n\r\n\t\tif(col.length){\r\n\t\t\tfor(var i=0; i < col.length; i++){\r\n\t\t\t\tif(col[i].value == value)\r\n\t\t\t\t\treturn col[i];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\t_get_node_value: function(els, name, multiselect){\r\n\t\tvar col = els[name];\r\n\t\tif(!col) return \"\";\r\n\t\tif(col.length){\r\n\t\t\tif(multiselect){\r\n\t\t\t\tvar res = [];\r\n\t\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\t\tif (col[i].checked) res.push(col[i].value);\r\n\r\n\t\t\t\treturn res;\r\n\t\t\t}else{\r\n\t\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\t\tif (col[i].checked) return col[i].value;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(col.value)\r\n\t\t\treturn !multiselect ? col.value : [col.value];\r\n\t},\r\n\r\n\t_get_node_numeric_value: function(els, name){\r\n\t\tvar value = scheduler.form_blocks[\"recurring\"]._get_node_value(els, name);\r\n\t\treturn ((value * 1) || 0);\r\n\t},\r\n\r\n\t_set_node_value: function(els, name, value){\r\n\t\tvar col = els[name];\r\n\t\tif(!col) return;\r\n\r\n\t\tif(col.name == name){\r\n\t\t\tcol.value = value;\r\n\t\t}else if(col.length){\r\n\t\t\tvar hash_value = typeof value == \"object\";\r\n\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\tif (hash_value || col[i].value == value){\r\n\t\t\t\t\tcol[i].checked = hash_value ? !!value[col[i].value] : !!value;\r\n\t\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t_init_set_value:function(node, value, ev) {\r\n\t\tvar block = scheduler.form_blocks[\"recurring\"];\r\n\t\tvar get_value = block._get_node_value;\r\n\t\tvar set_value = block._set_node_value;\r\n\t\tscheduler.form_blocks[\"recurring\"]._ds = {start:ev.start_date, end:ev._end_date};\r\n\r\n\t\tvar str_date_format = scheduler.date.str_to_date(scheduler.config.repeat_date, false, true);\r\n\t\tvar str_date = function(str_date) {\r\n\t\t\tvar date = str_date_format(str_date);\r\n\t\t\tif (scheduler.config.include_end_by)\r\n\t\t\t\tdate = scheduler.date.add(date, 1, 'day');\r\n\t\t\treturn date;\r\n\t\t};\r\n\r\n\t\tvar date_str = scheduler.date.date_to_str(scheduler.config.repeat_date);\r\n\r\n\t\tvar top = node.getElementsByTagName(\"FORM\")[0];\r\n\t\tvar els = {};\r\n\r\n\t\tfunction register_els(inps) {\r\n\t\t\tfor (var i = 0; i < inps.length; i++) {\r\n\t\t\t\tvar inp = inps[i];\r\n\r\n\t\t\t\tif(inp.name){\r\n\t\t\t\t\tif(!els[inp.name]){\r\n\t\t\t\t\t\tels[inp.name] = inp;\r\n\t\t\t\t\t}else if(els[inp.name].nodeType){\r\n\t\t\t\t\t\tvar node = els[inp.name];\r\n\t\t\t\t\t\tels[inp.name] = [node, inp];\r\n\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tels[inp.name].push(inp);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tregister_els(top.getElementsByTagName(\"INPUT\"));\r\n\t\tregister_els(top.getElementsByTagName(\"SELECT\"));\r\n\r\n\t\tif (!scheduler.config.repeat_date_of_end) {\r\n\t\t\tvar formatter = scheduler.date.date_to_str(scheduler.config.repeat_date);\r\n\t\t\tscheduler.config.repeat_date_of_end = formatter(scheduler.date.add(scheduler._currentDate(), 30, \"day\"));\r\n\t\t}\r\n\t\tset_value(els, \"date_of_end\", scheduler.config.repeat_date_of_end);\r\n\r\n\t\tvar $ = function(a) {\r\n\t\t\treturn scheduler._lightbox.querySelector(`#${a}`) || { style:{} };//return fake object if node not found\r\n\t\t};\r\n\r\n\t\tfunction change_current_view() {\r\n\t\t\t$(\"dhx_repeat_day\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_week\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_month\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_year\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_\" + this.value).style.display = \"\";\r\n\t\t\tscheduler.setLightboxSize();\r\n\t\t}\r\n\r\n\t\tfunction get_repeat_code(dates) {\r\n\t\t\tvar code = [get_value(els, \"repeat\")];\r\n\t\t\tget_rcode[code[0]](code, dates);\r\n\r\n\t\t\twhile (code.length < 5) code.push(\"\");\r\n\t\t\tvar repeat = \"\";\r\n\r\n\t\t\tvar end = get_end_rule(els);\r\n\r\n\t\t\tif (end == \"no\") {\r\n\t\t\t\tdates.end = new Date(9999, 1, 1);\r\n\t\t\t\trepeat = \"no\";\r\n\t\t\t}\r\n\t\t\telse if (end == \"date_of_end\") {\r\n\t\t\t\tdates.end = str_date(get_value(els, \"date_of_end\"));\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tscheduler.transpose_type(code.join(\"_\"));\r\n\t\t\t\trepeat = Math.max(1, get_value(els, \"occurences_count\"));\r\n\r\n\t\t\t\tvar transp = 0;\r\n\r\n\t\t\t\t//var transp = ((code[0] == \"week\" && code[4] && code[4].toString().indexOf(scheduler.config.start_on_monday ? 1 : 0) == -1) ? 1 : 0);\r\n\r\n\t\t\t\t// which is equal to following code, seems to produce extra instance, not clear why needed\r\n\r\n\t\t\t\t/*if(code[0] == \"week\"){\r\n\t\t\t\t\tvar days = code[4] || \"\";\r\n\t\t\t\t\tif(scheduler.config.start_on_monday){\r\n\t\t\t\t\t\tif(days.indexOf(1) == -1)\r\n\t\t\t\t\t\ttransp = 1;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(days.indexOf(0) == -1)\r\n\t\t\t\t\t\ttransp = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}*/\r\n\r\n\t\t\t//\tdates.end = scheduler.date.add(new Date(dates.start), repeat + transp, code.join(\"_\"));\r\n\r\n\t\t\t\tdates.end = scheduler.date[\"add_\" + code.join(\"_\")](new Date(dates.start), repeat + transp, {start_date: dates.start}) || dates.start;\r\n\t\t\t}\r\n\r\n\t\t\treturn code.join(\"_\") + \"#\" + repeat;\r\n\t\t}\r\n\t\tfunction get_end_rule(els){\r\n\t\t\tvar end = els[\"end\"];\r\n\t\t\tif(end.length){\r\n\t\t\t\tfor(var i =0; i < end.length; i++){\r\n\t\t\t\t\tif(end[i].checked){\r\n\t\t\t\t\t\tif(end[i].value && end[i].value != \"on\"){//seems to be default value:var input = document.createElement(\"input\"); input.type = \"radio\"; input.value\r\n\t\t\t\t\t\t\treturn end[i].value;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tif(!i){\r\n\t\t\t\t\t\t\t\treturn \"no\";\r\n\t\t\t\t\t\t\t}else if(i == 2){\r\n\t\t\t\t\t\t\t\treturn \"date_of_end\";\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\treturn \"occurences_count\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(end.value)\r\n\t\t\t\t\treturn end.value;\r\n\t\t\t}\r\n\t\t\treturn \"no\";\r\n\t\t}\r\n\t\tfunction set_end_rule(els, value){\r\n\t\t\tvar end = els[\"end\"];\r\n\r\n\t\t\tif(end.length){\r\n\t\t\t\tvar has_values = !!end[0].value && end[0].value != \"on\";\r\n\t\t\t\tif(has_values){\r\n\t\t\t\t\tfor(var i =0; i < end.length; i++){\r\n\t\t\t\t\t\tif(end[i].value == value)\r\n\t\t\t\t\t\t\tend[i].checked = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar ind = 0;\r\n\t\t\t\t\tswitch(value){\r\n\t\t\t\t\t\tcase \"no\":\r\n\t\t\t\t\t\t\tind = 0;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"date_of_end\":\r\n\t\t\t\t\t\t\tind = 2;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tind = 1;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend[ind].checked = true;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tend.value = value;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tscheduler.form_blocks[\"recurring\"]._get_repeat_code = get_repeat_code;\r\n\t\tvar get_rcode = {\r\n\t\t\tmonth:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tif (get_value(els, \"month_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_count\")));\r\n\t\t\t\t\tdates.start.setDate(get_value(els, \"month_day\"));\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_count2\")));\r\n\t\t\t\t\tcode.push( get_value(els, \"month_day2\"));\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_week2\")));\r\n\t\t\t\t\tif (!scheduler.config.repeat_precise){\r\n\t\t\t\t\t\tdates.start.setDate(1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tdates._start = true;\r\n\t\t\t},\r\n\t\t\tweek:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"week_count\")));\r\n\t\t\t\tcode.push(\"\");\r\n\t\t\t\tcode.push(\"\");\r\n\t\t\t\tvar t = [];\r\n\r\n\t\t\t\tvar col = get_value(els, \"week_day\", true);\r\n\t\t\t\t//var col = els[\"week_day\"];\r\n\t\t\t\tvar day = dates.start.getDay();\r\n\t\t\t\tvar start_exists = false;\r\n\r\n\t\t\t\tfor (var i = 0; i < col.length; i++){\r\n\t\t\t\t\tt.push(col[i]);\r\n\t\t\t\t\tstart_exists = start_exists || col[i] == day;\r\n\t\t\t\t}\r\n\t\t\t\tif (!t.length){\r\n\t\t\t\t\tt.push(day);\r\n\t\t\t\t\tstart_exists = true;\r\n\t\t\t\t}\r\n\t\t\t\tt.sort();\r\n\r\n\r\n\t\t\t\tif (!scheduler.config.repeat_precise){\r\n\t\t\t\t\tdates.start = scheduler.date.week_start(dates.start);\r\n\t\t\t\t\tdates._start = true;\r\n\t\t\t\t} else if (!start_exists){\r\n\t\t\t\t\tscheduler.transpose_day_week(dates.start, t, 1, 7);\r\n\t\t\t\t\tdates._start = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcode.push(t.join(\",\"));\r\n\t\t\t},\r\n\t\t\tday:function(code) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tif (get_value(els, \"day_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"day_count\")));\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcode.push(\"week\");\r\n\t\t\t\t\tcode.push(1);\r\n\t\t\t\t\tcode.push(\"\");\r\n\t\t\t\t\tcode.push(\"\");\r\n\t\t\t\t\tcode.push(scheduler.config.recurring_workdays.join(\",\"));\r\n\t\t\t\t\tcode.splice(0, 1);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tyear:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\r\n\t\t\t\tif (get_value(els, \"year_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(\"1\");\r\n\t\t\t\t\tdates.start.setMonth(0);\r\n\t\t\t\t\tdates.start.setDate(get_value(els, \"year_day\"));\r\n\t\t\t\t\tdates.start.setMonth(get_value(els, \"year_month\"));\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcode.push(\"1\");\r\n\t\t\t\t\tcode.push(get_value(els, \"year_day2\"));\r\n\t\t\t\t\tcode.push(get_value(els, \"year_week2\"));\r\n\t\t\t\t\tdates.start.setDate(1);\r\n\t\t\t\t\tdates.start.setMonth(get_value(els, \"year_month2\"));\r\n\t\t\t\t}\r\n\t\t\t\tdates._start = true;\r\n\t\t\t}\r\n\t\t};\r\n\t\tvar set_rcode = {\r\n\t\t\tweek:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\t\tset_value(els, \"week_count\", code[1]);\r\n\r\n\t\t\t\tvar t = code[4].split(\",\");\r\n\t\t\t\tvar d = {};\r\n\t\t\t\tfor (var i = 0; i < t.length; i++) d[t[i]] = true;\r\n\r\n\t\t\t\tset_value(els, \"week_day\", d);\r\n\r\n\t\t\t\t//for (var i = 0; i < col.length; i++)\r\n\t\t\t\t//\tcol[i].checked = (!!d[col[i].value]);\r\n\t\t\t},\r\n\t\t\tmonth:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\r\n\t\t\t\tif (code[2] === \"\") {\r\n\t\t\t\t\tset_value(els, \"month_type\", \"d\");\r\n\t\t\t\t\tset_value(els, \"month_count\", code[1]);\r\n\t\t\t\t\tset_value(els, \"month_day\", dates.start.getDate());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tset_value(els, \"month_type\", \"w\");\r\n\t\t\t\t\tset_value(els, \"month_count2\", code[1]);\r\n\t\t\t\t\tset_value(els, \"month_week2\", code[3]);\r\n\t\t\t\t\tset_value(els, \"month_day2\", code[2]);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tday:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\t\tset_value(els, \"day_type\", \"d\");\r\n\t\t\t\tset_value(els, \"day_count\", code[1]);\r\n\t\t\t},\r\n\t\t\tyear:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\r\n\t\t\t\tif (code[2] === \"\") {\r\n\t\t\t\t\tset_value(els, \"year_type\", \"d\");\r\n\t\t\t\t\tset_value(els, \"year_day\", dates.start.getDate());\r\n\t\t\t\t\tset_value(els, \"year_month\", dates.start.getMonth());\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tset_value(els, \"year_type\", \"w\");\r\n\t\t\t\t\tset_value(els, \"year_week2\", code[3]);\r\n\t\t\t\t\tset_value(els, \"year_day2\", code[2]);\r\n\t\t\t\t\tset_value(els, \"year_month2\", dates.start.getMonth());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfunction set_repeat_code(code, dates) {\r\n\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\tvar data = code.split(\"#\");\r\n\t\t\tcode = data[0].split(\"_\");\r\n\t\t\tset_rcode[code[0]](code, dates);\r\n\r\n\t\t\tswitch (data[1]) {\r\n\t\t\t\tcase \"no\":\r\n\t\t\t\t\tset_end_rule(els, \"no\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"\":\r\n\t\t\t\t\tset_end_rule(els, \"date_of_end\");\r\n\r\n\t\t\t\t\tvar end_date = dates.end;\r\n\t\t\t\t\tif (scheduler.config.include_end_by){\r\n\t\t\t\t\t\tend_date = scheduler.date.add(end_date, -1, 'day');\r\n\t\t\t\t\t}\r\n\t\t\t\t\tset_value(els, \"date_of_end\", date_str(end_date));\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tset_end_rule(els, \"occurences_count\");\r\n\t\t\t\t\tset_value(els, \"occurences_count\", data[1]);\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tset_value(els, \"repeat\", code[0]);\r\n\t\t\t//e.checked = true;\r\n\r\n\t\t\tvar node = scheduler.form_blocks[\"recurring\"]._get_form_node(els, \"repeat\", code[0]);\r\n\t\t\tif(node.nodeName == \"SELECT\"/* && node.onchange*/){\r\n\t\t\t//\tnode.onchange();\r\n\t\t\t\tnode.dispatchEvent(new Event('change'));\r\n\t\t\t\tnode.dispatchEvent(new MouseEvent('click'));\r\n\t\t\t}else{\r\n\t\t\t\tnode.dispatchEvent(new MouseEvent('click'));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tscheduler.form_blocks[\"recurring\"]._set_repeat_code = set_repeat_code;\r\n\r\n\t\tfor (var i = 0; i < top.elements.length; i++) {\r\n\t\t\tvar el = top.elements[i];\r\n\t\t\tswitch (el.name) {\r\n\t\t\t\tcase \"repeat\":\r\n\t\t\t\t\tif (el.nodeName == \"SELECT\" && !el.$_eventAttached) {\r\n\t\t\t\t\t\tel.$_eventAttached = true;\r\n\t\t\t\t\t\tel.addEventListener(\"change\", change_current_view);\r\n\t\t\t\t\t} else if(!el.$_eventAttached){\r\n\t\t\t\t\t\tel.$_eventAttached = true;\r\n\t\t\t\t\t\tel.addEventListener(\"click\", change_current_view);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tscheduler._lightbox._rec_init_done = true;\r\n\t},\r\n\tset_value:function(node, value, ev) {\r\n\t\tvar rf = scheduler.form_blocks[\"recurring\"];\r\n\t\tif (!scheduler._lightbox._rec_init_done)\r\n\t\t\trf._init_set_value(node, value, ev);\r\n\t\tnode.open = !ev.rec_type;\r\n\r\n\t\tnode.blocked = this._is_modified_occurence(ev);\r\n\r\n\t\tvar ds = rf._ds;\r\n\t\tds.start = ev.start_date;\r\n\t\tds.end = ev._end_date;\r\n\r\n\t\trf._toggle_block();\r\n\r\n\t\tif (value)\r\n\t\t\trf._set_repeat_code(value, ds);\r\n\t},\r\n\tget_value:function(node, ev) {\r\n\t\tif (node.open) {\r\n\t\t\tvar ds = scheduler.form_blocks[\"recurring\"]._ds;\r\n\t\t\tvar actual_dates = {};\r\n\r\n\t\t\tvar timeControl = getTimeSection();\r\n\r\n\t\t\ttimeControl.getValue(actual_dates);\r\n\t\t\tds.start = actual_dates.start_date;\r\n\t\t\tev.rec_type = scheduler.form_blocks[\"recurring\"]._get_repeat_code(ds);\r\n\t\t\tif (ds._start) {\r\n\t\t\t\tev.start_date = new Date(ds.start);\r\n\t\t\t\tev._start_date = new Date(ds.start);\r\n\t\t\t\tds._start = false;\r\n\t\t\t} else\r\n\t\t\t\tev._start_date = null;\r\n\r\n\t\t\tev._end_date = ds.end;\r\n\t\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\t\t} else {\r\n\t\t\tev.rec_type = ev.rec_pattern = \"\";\r\n\t\t\tev._end_date = ev.end_date;\r\n\t\t}\r\n\t\treturn ev.rec_type;\r\n\t},\r\n\t_get_button: function(){\r\n\t\tvar node = getRecurringSection().header;\r\n\t\treturn node.firstChild.firstChild;\r\n\t},\r\n\t_get_form: function(){\r\n\t\treturn getRecurringSection().node;\r\n\t},\r\n\topen:function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form();\r\n\t\tif(!cont.open)\r\n\t\t\tblock._toggle_block();\r\n\t},\r\n\tclose: function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form();\r\n\r\n\t\tif(cont.open)\r\n\t\t\tblock._toggle_block();\r\n\t},\r\n\t_toggle_block: function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form(),\r\n\t\t\tel = block._get_button();\r\n\t\tif (!cont.open && !cont.blocked) {\r\n\t\t\tcont.style.height = \"auto\";//reset to default value\r\n\t\t\tif(el){\r\n\t\t\t\tel.style.backgroundPosition = \"-5px 0px\";\r\n\t\t\t\tel.nextSibling.innerHTML = scheduler.locale.labels.button_recurring_open;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tcont.style.height = \"0px\";\r\n\t\t\tif(el){\r\n\t\t\t\tel.style.backgroundPosition = \"-5px 20px\";\r\n\t\t\t\tel.nextSibling.innerHTML = scheduler.locale.labels.button_recurring;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcont.open = !cont.open;\r\n\r\n\t\tscheduler.setLightboxSize();\r\n\t},\r\n\tfocus:function(node) {\r\n\t},\r\n\tbutton_click:function(node, button, event) {\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\t\tvar cont = block._get_form();\r\n\t\tif (!cont.blocked)\r\n\t\t\tscheduler.form_blocks.recurring._toggle_block();\r\n\t}\r\n};\r\n\r\nfunction getTimeSection(){\r\n\tvar timeControl = scheduler.formSection('time');\r\n\tif(!timeControl){\r\n\t\ttimeControl = getFirstSectionOfType('time');\r\n\t}\r\n\tif(!timeControl){\r\n\t\ttimeControl = getFirstSectionOfType('calendar_time');\r\n\t}\r\n\r\n\t\r\n\tif (!timeControl) {\r\n\t\tthrow new Error([\"Can't calculate the recurring rule, the Recurring form block can't find the Time control. Make sure you have the time control in 'scheduler.config.lightbox.sections' config.\",\r\n\"You can use either the default time control https://docs.dhtmlx.com/scheduler/time.html, or the datepicker https://docs.dhtmlx.com/scheduler/minicalendar.html, or a custom control. \",\r\n\"In the latter case, make sure the control is named \\\"time\\\":\",\r\n\"\",\r\n\"scheduler.config.lightbox.sections = [\",\r\n\"{name:\\\"time\\\", height:72, type:\\\"YOU CONTROL\\\", map_to:\\\"auto\\\" }];\"]\r\n.join(\"\\n\"));\r\n\t}\r\n\r\n\treturn timeControl;\r\n}\r\n\r\nfunction getRecurringSection(){\r\n\tvar recurringSection = scheduler.formSection('recurring');\r\n\tif(!recurringSection){\r\n\t\trecurringSection = getFirstSectionOfType('recurring');\r\n\t}\r\n\r\n\tif (!recurringSection) {\r\n\t\tthrow new Error([\"Can't locate the Recurring form section.\",\r\n\t\t\"Make sure that you have the recurring control on the lightbox configuration https://docs.dhtmlx.com/scheduler/recurring_events.html#recurringlightbox \",\r\n\t\t\"and that the recurring control has name \\\"recurring\\\":\",\r\n\"\",\r\n\"scheduler.config.lightbox.sections = [\",\r\n\"\t{name:\\\"recurring\\\", ... }\",\r\n\"];\"].join(\"\\n\"));\r\n\r\n\t}\r\n\r\n\treturn recurringSection;\r\n}\r\n\r\nfunction getFirstSectionOfType(type){\r\n\tfor(var i = 0; i < scheduler.config.lightbox.sections.length; i++){\r\n\t\tvar section = scheduler.config.lightbox.sections[i];\r\n\t\tif(section.type === type){\r\n\t\t\treturn scheduler.formSection(section.name);\r\n\t\t}\r\n\t}\r\n\treturn null;\r\n}\r\n\r\n//problem may occur if we will have two repeating events in the same moment of time\r\nscheduler._rec_markers = {};\r\nscheduler._rec_markers_pull = {};\r\nscheduler._add_rec_marker = function(ev, time) {\r\n\tev._pid_time = time;\r\n\tthis._rec_markers[ev.id] = ev;\r\n\tif (!this._rec_markers_pull[ev.event_pid]) this._rec_markers_pull[ev.event_pid] = {};\r\n\tthis._rec_markers_pull[ev.event_pid][time] = ev;\r\n};\r\nscheduler._get_rec_marker = function(time, id) {\r\n\tvar ch = this._rec_markers_pull[id];\r\n\tif (ch) return ch[time];\r\n\treturn null;\r\n};\r\nscheduler._get_rec_markers = function(id) {\r\n\treturn (this._rec_markers_pull[id] || []);\r\n};\r\n\r\nfunction clearMilliseconds(date){\r\n//\treturn date;\r\n\treturn new Date(\r\n\t\tdate.getFullYear(), \r\n\t\tdate.getMonth(), \r\n\t\tdate.getDate(), \r\n\t\tdate.getHours(), \r\n\t\tdate.getMinutes(),\r\n\t\tdate.getSeconds(),\r\n\t\t0\r\n\t);\r\n}\r\n\r\nscheduler._rec_temp = [];\r\n(function() {\r\n\tvar old_add_event = scheduler.addEvent;\r\n\tscheduler.addEvent = function(start_date, end_date, text, id, extra_data) {\r\n\t\tvar ev_id = old_add_event.apply(this, arguments);\r\n\r\n\t\tif (ev_id && scheduler.getEvent(ev_id)) {\r\n\t\t\tvar ev = scheduler.getEvent(ev_id);\r\n\t\t\t\r\n\t\t\tif(ev.start_date){\r\n\t\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t\t}\r\n\t\t\tif(ev.end_date){\r\n\t\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t\t}\r\n\t\t\tif (this._is_modified_occurence(ev))\r\n\t\t\t\tscheduler._add_rec_marker(ev, ev.event_length * 1000);\r\n\t\t\tif (ev.rec_type)\r\n\t\t\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\t\t}\r\n\t\treturn ev_id;\r\n\t};\r\n})();\r\n\r\nscheduler.attachEvent(\"onEventIdChange\", function(id, new_id) {\r\n\tif (this._ignore_call) return;\r\n\tthis._ignore_call = true;\r\n\r\n\tif(scheduler._rec_markers[id]){\r\n\t\t//important for for correct work of scheduler.getEvents(from, to) and collision detection\r\n\t\tscheduler._rec_markers[new_id] = scheduler._rec_markers[id];\r\n\t\tdelete scheduler._rec_markers[id];\r\n\t}\r\n\r\n\tif(scheduler._rec_markers_pull[id]){\r\n\t\tscheduler._rec_markers_pull[new_id] = scheduler._rec_markers_pull[id];\r\n\t\tdelete scheduler._rec_markers_pull[id];\r\n\t}\r\n\r\n\tfor (var i = 0; i < this._rec_temp.length; i++) {\r\n\t\tvar tev = this._rec_temp[i];\r\n\t\tif (tev.event_pid == id) {\r\n\t\t\ttev.event_pid = new_id;\r\n\t\t\tthis.changeEventId(tev.id, new_id + \"#\" + tev.id.split(\"#\")[1]);\r\n\t\t}\r\n\t}\r\n\r\n\tfor(var i in this._rec_markers){\r\n\t\tvar tev = this._rec_markers[i];\r\n\t\tif(tev.event_pid == id){\r\n\t\t\ttev.event_pid = new_id;\r\n\t\t\ttev._pid_changed = true;\r\n\t\t}\r\n\t}\r\n\r\n\tvar el = scheduler._rec_markers[new_id];\r\n\tif(el && el._pid_changed) {\r\n\t\tdelete el._pid_changed;\r\n\t\tsetTimeout(function() {\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler.callEvent(\"onEventChanged\", [new_id, scheduler.getEvent(new_id)]);\r\n\t\t}, 1);\r\n\t}\r\n\r\n\tdelete this._ignore_call;\r\n});\r\nscheduler.attachEvent(\"onConfirmedBeforeEventDelete\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (this._is_virtual_event(id) || (this._is_modified_occurence(ev) && ev.rec_type && ev.rec_type != 'none')) {\r\n\t\tid = id.split(\"#\");\r\n\t\tvar nid = this.uid();\r\n\t\tvar tid = (id[1]) ? id[1] : Math.round(ev._pid_time / 1000);\r\n\r\n\t\tvar nev = this._copy_event(ev);\r\n\t\tnev.id = nid;\r\n\t\tnev.event_pid = ev.event_pid || id[0];\r\n\t\tvar timestamp = tid;\r\n\t\tnev.event_length = timestamp;\r\n\t\tnev.rec_type = nev.rec_pattern = \"none\";\r\n\t\tthis.addEvent(nev);\r\n\r\n\t\tthis._add_rec_marker(nev, timestamp * 1000);\r\n\t} else {\r\n\t\tif (ev.rec_type && this._lightbox_id)\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\tvar sub = this._get_rec_markers(id);\r\n\t\tfor (var i in sub) {\r\n\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\tid = sub[i].id;\r\n\t\t\t\tif (this.getEvent(id))\r\n\t\t\t\t\tthis.deleteEvent(id, true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventDeleted\", function(id, ev){\r\n\tif(!this._is_virtual_event(id) && this._is_modified_occurence(ev)){\r\n\t\tif(!scheduler._events[id]){\r\n\t\t\tev.rec_type = ev.rec_pattern = \"none\";\r\n\t\t\tthis.setEvent(id, ev);\r\n\t\t}\r\n\t}\r\n});\r\nscheduler.attachEvent(\"onEventChanged\", function(id, event) {\r\n\tif (this._loading) return true;\r\n\r\n\tvar ev = this.getEvent(id);\r\n\r\n\tif (this._is_virtual_event(id)) {\r\n\t\tvar id = id.split(\"#\");\r\n\t\tvar nid = this.uid();\r\n\t\tthis._not_render = true;\r\n\r\n\t\tvar nev = this._copy_event(event);\r\n\t\tnev.id = nid;\r\n\t\tnev.event_pid = id[0];\r\n\t\tvar timestamp = id[1];\r\n\t\tnev.event_length = timestamp;\r\n\t\tnev.rec_type = nev.rec_pattern = \"\";\r\n\r\n\t\tthis._add_rec_marker(nev, timestamp * 1000);\r\n\t\tthis.addEvent(nev);\r\n\r\n\t\tthis._not_render = false;\r\n\r\n\t} else {\r\n\t\tif(ev.start_date){\r\n\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t}\r\n\t\tif(ev.end_date){\r\n\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t}\r\n\r\n\t\tif (ev.rec_type && this._lightbox_id){\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\t}\r\n\t\tvar sub = this._get_rec_markers(id);\r\n\t\tfor (var i in sub) {\r\n\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\tdelete this._rec_markers[sub[i].id];\r\n\t\t\t\tthis.deleteEvent(sub[i].id, true);\r\n\t\t\t}\r\n\t\t}\r\n\t\tdelete this._rec_markers_pull[id];\r\n\r\n\t\t// it's possible that after editing event is no longer exists, in such case we need to remove _select_id flag\r\n\t\tvar isEventFound = false;\r\n\t\tfor (var k = 0; k < this._rendered.length; k++) {\r\n\t\t\tif (this._rendered[k].getAttribute(this.config.event_attribute) == id)\r\n\t\t\t\tisEventFound = true;\r\n\t\t}\r\n\t\tif (!isEventFound)\r\n\t\t\tthis._select_id = null;\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventAdded\", function(id) {\r\n\tif (!this._loading) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (ev.rec_type && !ev.event_length){\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventSave\", function(id, data, is_new_event) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (!ev.rec_type && data.rec_type && !this._is_virtual_event(id))\r\n\t\tthis._select_id = null;\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventCreated\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (!ev.rec_type)\r\n\t\tev.rec_type = ev.rec_pattern = ev.event_length = ev.event_pid = \"\";\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventCancel\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (ev.rec_type) {\r\n\t\tthis._roll_back_dates(ev);\r\n\t\t// a bit expensive, but we need to be sure that event re-rendered, because view can be corrupted by resize , during edit process\r\n\t\tthis.render_view_data();\r\n\t}\r\n});\r\nscheduler._roll_back_dates = function(ev) {\r\n\tif(ev.start_date){\r\n\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t}\r\n\tif(ev.end_date){\r\n\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t}\r\n\tev.event_length = Math.round((ev.end_date.valueOf() - ev.start_date.valueOf()) / 1000);\r\n\tev.end_date = ev._end_date;\r\n\tif (ev._start_date) {\r\n\t\tev.start_date.setMonth(0);\r\n\t\tev.start_date.setDate(ev._start_date.getDate());\r\n\t\tev.start_date.setMonth(ev._start_date.getMonth());\r\n\t\tev.start_date.setFullYear(ev._start_date.getFullYear());\r\n\r\n\t}\r\n};\r\n\r\nscheduler._is_virtual_event = function(id){\r\n\treturn id.toString().indexOf(\"#\") != -1;\r\n};\r\nscheduler._is_modified_occurence = function(ev){\r\n\treturn (ev.event_pid && ev.event_pid != \"0\");\r\n};\r\n\r\nscheduler.showLightbox_rec = scheduler.showLightbox;\r\nscheduler.showLightbox = function(id) {\r\n\tvar locale = this.locale;\r\n\tvar c = scheduler.config.lightbox_recurring;\r\n\tvar ev = this.getEvent(id);\r\n\tvar pid = ev.event_pid;\r\n\tvar isVirtual = this._is_virtual_event(id);\r\n\tif (isVirtual)\r\n\t\tpid = id.split(\"#\")[0];\r\n\r\n\t// show series\r\n\tvar showSeries = function(id) {\r\n\t\tvar event = scheduler.getEvent(id);\r\n\t\tevent._end_date = event.end_date;\r\n\t\tevent.end_date = new Date(event.start_date.valueOf() + event.event_length * 1000);\r\n\t\treturn scheduler.showLightbox_rec(id); // editing series\r\n\t};\r\n\r\n\tif ( (pid || pid*1 === 0) && ev.rec_type) {\r\n\t\t// direct API call on series id\r\n\t\treturn showSeries(id);\r\n\t}\r\n\tif ( !pid || pid === '0' || ( (!locale.labels.confirm_recurring || c == 'instance') || (c == 'series' && !isVirtual)) ) {\r\n\t\t// editing instance or non recurring event\r\n\t\treturn this.showLightbox_rec(id);\r\n\t}\r\n\tif (c == 'ask') {\r\n\t\tvar that = this;\r\n\t\tscheduler.modalbox({\r\n\t\t\ttext: locale.labels.confirm_recurring,\r\n\t\t\ttitle: locale.labels.title_confirm_recurring,\r\n\t\t\twidth: \"500px\",\r\n\t\t\tposition: \"middle\",\r\n\t\t\tbuttons:[locale.labels.button_edit_series, locale.labels.button_edit_occurrence, locale.labels.icon_cancel],\r\n\t\t\tcallback: function(index) {\r\n\t\t\t\tswitch(+index) {\r\n\t\t\t\t\tcase 0:\r\n\t\t\t\t\t\treturn showSeries(pid);\r\n\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\treturn that.showLightbox_rec(id);\r\n\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t} else {\r\n\t\tshowSeries(pid);\r\n\t}\r\n};\r\n\r\n\r\nscheduler.get_visible_events_rec = scheduler.get_visible_events;\r\nscheduler.get_visible_events = function(only_timed) {\r\n\tfor (var i = 0; i < this._rec_temp.length; i++)\r\n\t\tdelete this._events[this._rec_temp[i].id];\r\n\tthis._rec_temp = [];\r\n\r\n\tvar stack = this.get_visible_events_rec(only_timed);\r\n\tvar out = [];\r\n\tfor (var i = 0; i < stack.length; i++) {\r\n\t\tif (stack[i].rec_type) {\r\n\t\t\t//deleted element of series\r\n\t\t\tif (stack[i].rec_pattern != \"none\")\r\n\t\t\t\tthis.repeat_date(stack[i], out);\r\n\t\t}\r\n\t\telse out.push(stack[i]);\r\n\t}\r\n\treturn out;\r\n};\r\n\r\n\r\n(function() {\r\n\tvar old = scheduler.isOneDayEvent;\r\n\tscheduler.isOneDayEvent = function(ev) {\r\n\t\tif (ev.rec_type) return true;\r\n\t\treturn old.call(this, ev);\r\n\t};\r\n\tvar old_update_event = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id) {\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tif(ev && ev.rec_type){\r\n\t\t\t//rec_type can be changed without the lightbox,\r\n\t\t\t// make sure rec_pattern updated as well\r\n\t\t\tev.rec_pattern = (ev.rec_type || \"\").split(\"#\")[0];\r\n\t\t}\r\n\t\tif (ev && ev.rec_type && !this._is_virtual_event(id)) {\r\n\t\t\tscheduler.update_view();\r\n\t\t} else {\r\n\t\t\told_update_event.call(this, id);\r\n\t\t}\r\n\t};\r\n})();\r\n\r\nscheduler.transponse_size = {\r\n\tday:1, week:7, month:1, year:12\r\n};\r\nscheduler.date.day_week = function(sd, day, week) {\r\n\tsd.setDate(1);\r\n\tvar originalMonth = scheduler.date.month_start(new Date(sd));\r\n\tweek = (week - 1) * 7;\r\n\tvar cday = sd.getDay();\r\n\tvar nday = day * 1 + week - cday + 1;\r\n\tsd.setDate(nday <= week ? (nday + 7) : nday);\r\n\tvar newMonth = scheduler.date.month_start(new Date(sd));\r\n\tif(originalMonth.valueOf() !== newMonth.valueOf()){\r\n\t\treturn false;\r\n\t}\r\n\treturn true;\r\n};\r\nscheduler.transpose_day_week = function(sd, list, cor, size, cor2) {\r\n\tvar cday = (sd.getDay() || (scheduler.config.start_on_monday ? 7 : 0)) - cor;\r\n\tfor (var i = 0; i < list.length; i++) {\r\n\t\tif (list[i] > cday)\r\n\t\t\treturn sd.setDate(sd.getDate() + list[i] * 1 - cday - (size ? cor : cor2));\r\n\t}\r\n\tthis.transpose_day_week(sd, list, cor + size, null, cor);\r\n};\r\nscheduler.transpose_type = function(type) {\r\n\tvar transposeRecurring = \"transpose_\" + type;\r\n\tif (!this.date[transposeRecurring]) {\r\n\t\tvar recurringParts = type.split(\"_\");\r\n\t\tvar dayDurationMs = 60 * 60 * 24 * 1000;\r\n\t\tvar addRecurring = \"add_\" + type;\r\n\t\tvar recurringStepDays = this.transponse_size[recurringParts[0]] * recurringParts[1];\r\n\r\n\t\tif (recurringParts[0] == \"day\" || recurringParts[0] == \"week\") {\r\n\t\t\tvar weekDays = null;\r\n\t\t\tif (recurringParts[4]) {\r\n\t\t\t\tweekDays = recurringParts[4].split(\",\");\r\n\t\t\t\tif (scheduler.config.start_on_monday) {\r\n\t\t\t\t\tfor (var i = 0; i < weekDays.length; i++)\r\n\t\t\t\t\t\tweekDays[i] = (weekDays[i] * 1) || 7;\r\n\t\t\t\t\tweekDays.sort();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.date[transposeRecurring] = function(nd, td) {\r\n\t\t\t\tvar delta = Math.floor((td.valueOf() - nd.valueOf()) / (dayDurationMs * recurringStepDays));\r\n\t\t\t\tif (delta > 0)\r\n\t\t\t\t\tnd.setDate(nd.getDate() + delta * recurringStepDays);\r\n\t\t\t\tif (weekDays)\r\n\t\t\t\t\tscheduler.transpose_day_week(nd, weekDays, 1, recurringStepDays);\r\n\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t\tthis.date[addRecurring] = function(sd, inc) {\r\n\t\t\t\tvar nd = new Date(sd.valueOf());\r\n\t\t\t\tif (weekDays) {\r\n\t\t\t\t\tfor (var count = 0; count < inc; count++)\r\n\t\t\t\t\t\tscheduler.transpose_day_week(nd, weekDays, 0, recurringStepDays);\r\n\t\t\t\t} else\r\n\t\t\t\t\tnd.setDate(nd.getDate() + inc * recurringStepDays);\r\n\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t}\r\n\t\telse if (recurringParts[0] == \"month\" || recurringParts[0] == \"year\") {\r\n\t\t\tthis.date[transposeRecurring] = function(nd, td, seriesInstance) {\r\n\t\t\t\tvar delta = Math.ceil(((td.getFullYear() * 12 + td.getMonth() * 1 + 1) - (nd.getFullYear() * 12 + nd.getMonth() * 1 + 1)) / (recurringStepDays) - 1);\r\n\r\n\t\t\t\tif (delta >= 0){\r\n\t\t\t\t\tnd.setDate(1);\r\n\t\t\t\t\tnd.setMonth(nd.getMonth() + delta * recurringStepDays);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn scheduler.date[addRecurring](nd, 0, seriesInstance);\r\n\t\t\t\t//if (str[3]){\r\n\t\t\t\t//\tscheduler.date.day_week(nd, str[2], str[3]);\r\n\t\t\t\t//}\r\n\t\t\t};\r\n\t\t\tthis.date[addRecurring] = function(sd, inc, seriesInstance, currentCount) {\r\n\t\t\t\tif(!currentCount){\r\n\t\t\t\t\tcurrentCount = 1;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcurrentCount++;\r\n\t\t\t\t}\r\n\t\t\t\tvar maxCount = 12;\r\n\t\t\t\tif(currentCount > maxCount){\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar nd = new Date(sd.valueOf());\r\n\t\t\t\tnd.setDate(1);\r\n\r\n\r\n\t\t\t\tnd.setMonth(nd.getMonth() + inc * recurringStepDays);\r\n\t\t\t\tvar origMonth = nd.getMonth();\r\n\t\t\t\tvar origYear = nd.getFullYear();\r\n\t\t\t\tnd.setDate(seriesInstance.start_date.getDate());\r\n\t\t\t\tif (recurringParts[3]){\r\n\t\t\t\t\tscheduler.date.day_week(nd, recurringParts[2], recurringParts[3]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar correctOverflowInstances = scheduler.config.recurring_overflow_instances;\r\n\t\t\t\tif(nd.getMonth() != origMonth && correctOverflowInstances != \"none\"){\r\n\t\t\t\t\t// no such day in a month\r\n\t\t\t\t\tif(correctOverflowInstances === \"lastDay\"){\r\n\t\t\t\t\t\t// return either last day of the month\r\n\t\t\t\t\t\tnd = new Date(origYear, origMonth + 1, 0, nd.getHours(), nd.getMinutes(), nd.getSeconds(), nd.getMilliseconds());\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t// or go to the next instance\r\n\t\t\t\t\t\tnd = scheduler.date[addRecurring](new Date(origYear, origMonth + 1, 0), inc||1, seriesInstance, currentCount);\r\n\t\t\t\t\t\t// if next instance is not possible (e.g. 'repeat on 40th day of the month') null will be returned\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.repeat_date = function(ev, stack, non_render, from, to, maxCount) {\r\n\r\n\tfrom = from || this._min_date;\r\n\tto = to || this._max_date;\r\n\tvar max = maxCount || -1;\r\n\tvar td = new Date(ev.start_date.valueOf());\r\n\r\n\tvar startHour = td.getHours();\r\n\r\n\tvar visibleCount = 0;\r\n\r\n\tif (!ev.rec_pattern && ev.rec_type)\r\n\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\r\n\tthis.transpose_type(ev.rec_pattern);\r\n\ttd = scheduler.date[\"transpose_\" + ev.rec_pattern](td, from, ev);\r\n\twhile ( td && (\r\n\t\ttd < ev.start_date ||\r\n\t\tscheduler._fix_daylight_saving_date(td,from,ev,td,new Date(td.valueOf() + ev.event_length * 1000)).valueOf() <= from.valueOf() ||\r\n\t\ttd.valueOf() + ev.event_length * 1000 <= from.valueOf())){\r\n\t\t\ttd = this.date[\"add_\" + ev.rec_pattern](td, 1, ev);\r\n\r\n\t}\r\n\twhile (td && (td < to && td < ev.end_date && (max < 0 || visibleCount < max))) {\r\n\t\ttd.setHours(startHour);\r\n\r\n\t\tvar timestamp = (scheduler.config.occurrence_timestamp_in_utc) ? Date.UTC(td.getFullYear(), td.getMonth(), td.getDate(), td.getHours(), td.getMinutes(), td.getSeconds()) : td.valueOf();\r\n\t\tvar ch = this._get_rec_marker(timestamp, ev.id);\r\n\t\tif (!ch) { // unmodified element of series\r\n\t\t\tvar ted = new Date(td.valueOf() + ev.event_length * 1000);\r\n\t\t\tvar copy = this._copy_event(ev);\r\n\t\t\t//copy._timed = ev._timed;\r\n\t\t\tcopy.text = ev.text;\r\n\t\t\tcopy.start_date = td;\r\n\t\t\tcopy.event_pid = ev.id;\r\n\t\t\tcopy.id = ev.id + \"#\" + Math.round(timestamp / 1000);\r\n\t\t\tcopy.end_date = ted;\r\n\r\n\t\t\tcopy.end_date = scheduler._fix_daylight_saving_date(copy.start_date, copy.end_date, ev, td, copy.end_date);\r\n\r\n\t\t\tcopy._timed = this.isOneDayEvent(copy);\r\n\r\n\t\t\tif (!copy._timed && !this._table_view && !this.config.multi_day) return;\r\n\t\t\tstack.push(copy);\r\n\r\n\t\t\tif (!non_render) {\r\n\t\t\t\tthis._events[copy.id] = copy;\r\n\t\t\t\tthis._rec_temp.push(copy);\r\n\t\t\t}\r\n\r\n\t\t\tvisibleCount++;\r\n\r\n\t\t} else\r\n\t\tif (non_render){\r\n\t\t\tif(ch.rec_type != \"none\"){\r\n\t\t\t\tvisibleCount++;\r\n\t\t\t}\r\n\t\t\tstack.push(ch);\r\n\t\t}\r\n\r\n\t\ttd = this.date[\"add_\" + ev.rec_pattern](td, 1, ev);\r\n\t//\tif(!scheduler.date[\"validate_add_\" + ev.rec_pattern](td, 1, ev.rec_pattern)){\r\n\t///\t\talert(\"detect add\")\r\n\t//\t}\r\n\t}\r\n};\r\nscheduler._fix_daylight_saving_date = function(start_date, end_date, ev, counter, default_date) {\r\n\tvar shift = start_date.getTimezoneOffset() - end_date.getTimezoneOffset();\r\n\tif (shift) {\r\n\t\tif (shift > 0) {\r\n\t\t\t// e.g. 24h -> 23h\r\n\t\t\treturn new Date(counter.valueOf() + ev.event_length * 1000 - shift * 60 * 1000);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// e.g. 24h -> 25h\r\n\t\t\treturn new Date(end_date.valueOf() - shift * 60 * 1000);\r\n\t\t}\r\n\t}\r\n\treturn new Date(default_date.valueOf());\r\n};\r\nscheduler.getRecDates = function(id, max) {\r\n\tvar ev = typeof id == \"object\" ? id : scheduler.getEvent(id);\r\n\tvar recurrings = [];\r\n\tmax = max || 100;\r\n\r\n\tif (!ev.rec_type) {\r\n\t\treturn [\r\n\t\t\t{ start_date: ev.start_date, end_date: ev.end_date }\r\n\t\t];\r\n\t}\r\n\tif (ev.rec_type == \"none\") {\r\n\t\treturn [];\r\n\t}\r\n\r\n\tscheduler.repeat_date(ev, recurrings, true, ev.start_date, ev.end_date, max);\r\n\r\n\tvar result = [];\r\n\tfor(var i = 0; i < recurrings.length; i++){\r\n\t\tif(recurrings[i].rec_type != \"none\"){\r\n\t\t\tresult.push({start_date: recurrings[i].start_date, end_date: recurrings[i].end_date});\r\n\t\t}\r\n\t}\r\n\r\n\treturn result;\r\n};\r\nscheduler.getEvents = function(from, to) {\r\n\tvar result = [];\r\n\tfor (var a in this._events) {\r\n\t\tvar ev = this._events[a];\r\n\t\tif (ev && ev.start_date < to && ev.end_date > from) {\r\n\t\t\tif (ev.rec_pattern) {\r\n\t\t\t\tif (ev.rec_pattern == \"none\") continue;\r\n\t\t\t\tvar sev = [];\r\n\t\t\t\tthis.repeat_date(ev, sev, true, from, to);\r\n\t\t\t\tfor (var i = 0; i < sev.length; i++) {\r\n\t\t\t\t\t// if event is in rec_markers then it will be checked by himself, here need to skip it\r\n\t\t\t\t\tif (!sev[i].rec_pattern && sev[i].start_date < to && sev[i].end_date > from && !this._rec_markers[sev[i].id]) {\r\n\t\t\t\t\t\tresult.push(sev[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if (!this._is_virtual_event(ev.id)) { // if it's virtual event we can skip it\r\n\t\t\t\tresult.push(ev);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn result;\r\n};\r\n\r\nscheduler.config.repeat_date = \"%m.%d.%Y\";\r\nscheduler.config.lightbox.sections = [\r\n\t{name:\"description\", map_to:\"text\", type:\"textarea\" , focus:true},\r\n\t{name:\"recurring\", type:\"recurring\", map_to:\"rec_type\", button:\"recurring\"},\r\n\t{name:\"time\", height:72, type:\"time\", map_to:\"auto\"}\r\n];\r\n\r\n\r\n//drop secondary attributes\r\nscheduler._copy_dummy = function(ev) {\r\n\tvar start_date = new Date(this.start_date);\r\n\tvar end_date = new Date(this.end_date);\r\n\tthis.start_date = start_date;\r\n\tthis.end_date = end_date;\r\n\tthis.event_length = this.event_pid = this.rec_pattern = this.rec_type = null;\r\n};\r\n\r\nscheduler.config.include_end_by = false;\r\nscheduler.config.lightbox_recurring = 'ask'; // series, instance\r\n\r\nscheduler.attachEvent(\"onClearAll\", function(){\r\n\tscheduler._rec_markers = {}; //clear recurring events data\r\n\tscheduler._rec_markers_pull = {};\r\n\tscheduler._rec_temp = [];\r\n});\r\n\r\n}","import getSerializator from '../core/common/get_serializable_events';\r\nexport default function(scheduler){\r\n\r\n\t\r\nconst getSerializableData = getSerializator(scheduler);\r\n\r\n//redefine this method, if you want to provide a custom set of attributes for serialization\r\nscheduler.data_attributes=function(){\r\n\tvar attrs = [];\r\n\tvar format = scheduler._helpers.formatDate;\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\t\tfor (var name in ev)\r\n\t\t\tif (name.substr(0,1) !=\"_\")\r\n\t\t\t\tattrs.push([name,((name == \"start_date\" || name == \"end_date\")?format:null)]);\r\n\t\tbreak;\r\n\t}\r\n\treturn attrs;\r\n};\r\n\r\nscheduler.toXML = function(header){\r\n\tvar xml = [];\r\n\tvar attrs = this.data_attributes();\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\r\n\t\txml.push(\"\");\r\n\t\tfor (var i=0; i < attrs.length; i++)\r\n\t\t\txml.push(\"<\"+attrs[i][0]+\">\");\r\n\r\n\t\txml.push(\"\");\r\n\t}\r\n\treturn (header||\"\")+\"\"+xml.join(\"\\n\")+\"\";\r\n};\r\n\r\nscheduler._serialize_json_value = function(value){\r\n\tif(value === null || typeof value === \"boolean\"){\r\n\t\tvalue = \"\" + value;\r\n\t}else{\r\n\t\tif(!value && value !== 0){\r\n\t\t\tvalue = \"\";\r\n\t\t}\r\n\t\tvalue = '\"' + value.toString().\r\n\t\t\treplace(/\\n/g,\"\").\r\n\t\t\treplace(/\\\\/g,\"\\\\\\\\\").\r\n\t\t\treplace(/\"/g, '\\\\\"') + '\"';\r\n\t}\r\n\treturn value;\r\n};\r\n\r\n\r\n\r\nscheduler.toJSON = function(){\r\n\treturn JSON.stringify(this.serialize());\r\n};\r\n\r\n\r\nscheduler.toICal = function(header){\r\n\tvar start = \"BEGIN:VCALENDAR\\nVERSION:2.0\\nPRODID:-//dhtmlXScheduler//NONSGML v2.2//EN\\nDESCRIPTION:\";\r\n\tvar end = \"END:VCALENDAR\";\r\n\tvar format = scheduler.date.date_to_str(\"%Y%m%dT%H%i%s\");\r\n\tvar full_day_format = scheduler.date.date_to_str(\"%Y%m%d\");\r\n\r\n\tvar ical = [];\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\r\n\r\n\t\tical.push(\"BEGIN:VEVENT\");\r\n\t\tif (!ev._timed || (!ev.start_date.getHours() && !ev.start_date.getMinutes()))\r\n\t\t\tical.push(\"DTSTART:\"+full_day_format(ev.start_date));\r\n\t\telse\r\n\t\t\tical.push(\"DTSTART:\"+format(ev.start_date));\r\n\t\tif (!ev._timed || (!ev.end_date.getHours() && !ev.end_date.getMinutes()))\r\n\t\t\tical.push(\"DTEND:\"+full_day_format(ev.end_date));\r\n\t\telse\r\n\t\t\tical.push(\"DTEND:\"+format(ev.end_date));\r\n\t\tical.push(\"SUMMARY:\"+ev.text);\r\n\t\tical.push(\"END:VEVENT\");\r\n\t}\r\n\treturn start+(header||\"\")+\"\\n\"+ical.join(\"\\n\")+\"\\n\"+end;\r\n};\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Timeline\", scheduler.assert);\r\n}","import { TooltipManager } from \"./tooltipManager\";\r\n\r\nexport default function (scheduler: any) {\r\n\r\n\tscheduler.config.tooltip_timeout = 30;\r\n\tscheduler.config.tooltip_offset_y = 20;\r\n\tscheduler.config.tooltip_offset_x = 10;\r\n\tscheduler.config.tooltip_hide_timeout = 30;\r\n\r\n\tconst tooltipManager = new TooltipManager(scheduler);\r\n\r\n\tscheduler.ext.tooltips = tooltipManager;\r\n\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function () {\r\n\r\n\t\ttooltipManager.tooltipFor({\r\n\t\t\tselector: \"[\" + scheduler.config.event_attribute + \"]\",\r\n\t\t\thtml: (event: MouseEvent) => {\r\n\t\t\t\tif (scheduler._mobile && !scheduler.config.touch_tooltip) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst targetEventId = scheduler._locate_event(event.target);\r\n\t\t\t\tif (scheduler.getEvent(targetEventId)) {\r\n\t\t\t\t\tconst event = scheduler.getEvent(targetEventId);\r\n\t\t\t\t\treturn scheduler.templates.tooltip_text(event.start_date, event.end_date, event);\r\n\t\t\t\t}\r\n\t\t\t\treturn null;\r\n\t\t\t},\r\n\t\t\tglobal: false\r\n\t\t});\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function () {\r\n\t\ttooltipManager.destructor();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onLightbox\", function () {\r\n\t\ttooltipManager.hideTooltip();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeDrag\", function() {\r\n\t\ttooltipManager.hideTooltip();\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventDeleted\", function() {\r\n\t\ttooltipManager.hideTooltip();\r\n\t\treturn true;\r\n\t});\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Tree Timeline\", scheduler.assert);\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Units\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\nscheduler._get_url_nav = function(){\r\n\tvar p = {};\r\n\tvar data = (document.location.hash || \"\").replace(\"#\", \"\").split(\",\");\r\n\tfor (var i = 0; i < data.length; i++) {\r\n\t\tvar s = data[i].split(\"=\");\r\n\t\tif (s.length == 2)\r\n\t\t\tp[s[0]] = s[1];\r\n\t}\r\n\treturn p;\r\n};\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\", function () {\r\n\tvar first = true;\r\n\tvar s2d = scheduler.date.str_to_date(\"%Y-%m-%d\");\r\n\tvar d2s = scheduler.date.date_to_str(\"%Y-%m-%d\");\r\n\tvar select_event = scheduler._get_url_nav().event || null;\r\n\r\n\tscheduler.attachEvent(\"onAfterEventDisplay\", function(ev){\r\n\t\tselect_event = null;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function (om, od, m, d) {\r\n\t\tif (first) {\r\n\t\t\tfirst = false;\r\n\t\t\tvar p = scheduler._get_url_nav();\r\n\r\n\t\t\tif (p.event){\r\n\t\t\t\ttry{\r\n\t\t\t\t\tif(scheduler.getEvent(p.event)){\r\n\t\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\t\tshowEvent(p.event);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tvar handler = scheduler.attachEvent(\"onXLE\", function(){\r\n\t\t\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\t\t\tshowEvent(p.event);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\tscheduler.detachEvent(handler);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (e){}\r\n\t\t\t}\r\n\r\n\t\t\tif (p.date || p.mode) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tthis.setCurrentView((p.date ? s2d(p.date) : null), (p.mode || null));\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\t//assuming that mode is not available anymore\r\n\t\t\t\t\tthis.setCurrentView((p.date ? s2d(p.date) : null), m);\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar values = [\r\n\t\t\t\"date=\" + d2s(d || od),\r\n\t\t\t\"mode=\" + (m || om)\r\n\t\t];\r\n\r\n\t\tif(select_event){\r\n\t\t\tvalues.push(\"event=\" + select_event);\r\n\t\t}\r\n\r\n\t\tvar text = \"#\" + values.join(\",\");\r\n\t\tdocument.location.hash = text;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tfunction showEvent(e){\r\n\t\tif(scheduler.$destroyed){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tselect_event = e;\r\n\t\tif(scheduler.getEvent(e)){\r\n\t\t\tscheduler.showEvent(e);\r\n\t\t}\r\n\t}\r\n});\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Week Agenda\", scheduler.assert);\r\n}","export default function(scheduler){\r\nscheduler.attachEvent(\"onLightBox\",function(){\r\n\tif (this._cover){\r\n\t\ttry{\r\n\t\t\tthis._cover.style.height = this.expanded ? \"100%\" : ((document.body.parentNode||document.body).scrollHeight+\"px\");\r\n\t\t} catch(e) {\r\n\r\n\t\t}\r\n\t}\r\n});\r\n\r\nscheduler.form_blocks.select.set_value=function(node,value,ev){\r\n\tif (typeof value == \"undefined\" || value === \"\")\r\n\t\tvalue = (node.firstChild.options[0]||{}).value;\r\n\tnode.firstChild.value=value||\"\";\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\t// scheduler.config.year_x = 4;\r\n\t// scheduler.config.year_y = 3;\r\n\t// scheduler.xy.year_top = 0;\r\n\r\n\tscheduler.templates.year_date = function(date) {\r\n\t\treturn scheduler.date.date_to_str(scheduler.locale.labels.year_tab + \" %Y\")(date);\r\n\t};\r\n\tscheduler.templates.year_month = scheduler.date.date_to_str(\"%F\");\r\n\tscheduler.templates.year_scale_date = scheduler.date.date_to_str(\"%D\");\r\n\tscheduler.templates.year_tooltip = function(s, e, ev) {\r\n\t\treturn ev.text;\r\n\t};\r\n\r\n\tconst isYearMode = function() {\r\n\t\treturn scheduler._mode == \"year\";\r\n\t};\r\n\t\r\n\tconst getCellDate = function(node){\r\n\t\tvar day = scheduler.$domHelpers.closest(node, \"[data-cell-date]\");\r\n\t\tif(!day || !day.hasAttribute(\"data-cell-date\")) return null;\r\n\t\treturn scheduler.templates.parse_date(day.getAttribute(\"data-cell-date\"));\r\n\t};\r\n\r\n\t// dbl click hook for scheduler._on_dbl_click\r\n\tscheduler.dblclick_dhx_month_head = function(e) {\r\n\t\tif (isYearMode()) {\r\n\t\t\tconst target = e.target;\r\n\t\t\tif(scheduler.$domHelpers.closest(target, \".dhx_before\") || scheduler.$domHelpers.closest(target, \".dhx_after\")){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tconst date = getCellDate(target);\r\n\t\t\t\r\n\t\t\tif(date){\r\n\t\t\t\tconst start = date;\r\n\t\t\t\tconst end = this.date.add(start, 1, \"day\");\r\n\t\t\t\tif (!this.config.readonly && this.config.dblclick_create){\r\n\t\t\t\t\tthis.addEventNow(start.valueOf(), end.valueOf(), e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\t\r\n\tscheduler.attachEvent(\"onEventIdChange\", function(){\r\n\t\tif (isYearMode())\r\n\t\t\tthis.year_view(true);\r\n\t});\r\n\r\n\r\n\tvar old = scheduler.render_data;\r\n\tscheduler.render_data = function(evs) {\r\n\t\tif (!isYearMode()) return old.apply(this, arguments);\r\n\t\tfor (var i = 0; i < evs.length; i++)\r\n\t\t\tthis._year_render_event(evs[i]);\r\n\t};\r\n\r\n\tvar clear = scheduler.clear_view;\r\n\tscheduler.clear_view = function() {\r\n\t\tif (!isYearMode()) return clear.apply(this, arguments);\r\n\t\tvar dates = scheduler._year_marked_cells,\r\n\t\t\tdiv = null;\r\n\t\tfor (var date in dates) {\r\n\t\t\tif (dates.hasOwnProperty(date)) {\r\n\t\t\t\tdiv = dates[date];\r\n\t\t\t\tdiv.classList.remove(\"dhx_year_event\", \"dhx_cal_datepicker_event\");\r\n\t\t\t\t// div.className = \"dhx_month_head\";\r\n\t\t\t\t// div.removeAttribute(\"date\");\r\n\t\t\t\t// div.removeAttribute(\"data-year-date\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tscheduler._year_marked_cells = {};\r\n\t};\r\n\r\n\tscheduler._hideToolTip = function() {\r\n\t\tif (this._tooltip) {\r\n\t\t\tthis._tooltip.style.display = \"none\";\r\n\t\t\tthis._tooltip.date = new Date(9999, 1, 1);\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._showToolTip = function(date, pos, e, src) {\r\n\t\tif (this._tooltip) {\r\n\t\t\tif (this._tooltip.date.valueOf() == date.valueOf()) return;\r\n\t\t\tthis._tooltip.innerHTML = \"\";\r\n\t\t} else {\r\n\t\t\tvar t = this._tooltip = document.createElement(\"div\");\r\n\t\t\tt.className = \"dhx_year_tooltip\";\r\n\t\t\tif (this.config.rtl) t.className += \" dhx_tooltip_rtl\";\r\n\t\t\tdocument.body.appendChild(t);\r\n\t\t\tt.addEventListener(\"click\", scheduler._click.dhx_cal_data);\r\n\t\t\tt.addEventListener(\"click\", function(e){\r\n\t\t\t\tif(e.target.closest(`[${scheduler.config.event_attribute}]`)){\r\n\t\t\t\t\tconst id = e.target.closest(`[${scheduler.config.event_attribute}]`).getAttribute(scheduler.config.event_attribute);\r\n\t\t\t\t\tscheduler.showLightbox(id);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\tvar evs = this.getEvents(date, this.date.add(date, 1, \"day\"));\r\n\t\tvar html = \"\";\r\n\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tif(!this.filter_event(ev.id, ev))\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\tvar bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\t\t\tvar color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\t\t\thtml += \"
\";\r\n\t\t\thtml += \"
\" + (evs[i]._timed ? this.templates.event_date(evs[i].start_date) : \"\") + \"
\";\r\n\t\t\thtml += \"
 
\";\r\n\t\t\thtml += this.templates.year_tooltip(evs[i].start_date, evs[i].end_date, evs[i]) + \"
\";\r\n\t\t}\r\n\r\n\t\tthis._tooltip.style.display = \"\";\r\n\t\tthis._tooltip.style.top = \"0px\";\r\n\r\n\r\n\t\tif (document.body.offsetWidth - pos.left - this._tooltip.offsetWidth < 0)\r\n\t\t\tthis._tooltip.style.left = pos.left - this._tooltip.offsetWidth + \"px\";\r\n\t\telse\r\n\t\t\tthis._tooltip.style.left = pos.left + src.offsetWidth + \"px\";\r\n\r\n\t\tthis._tooltip.date = date;\r\n\t\tthis._tooltip.innerHTML = html;\r\n\r\n\t\tif (document.body.offsetHeight - pos.top - this._tooltip.offsetHeight < 0)\r\n\t\t\tthis._tooltip.style.top = pos.top - this._tooltip.offsetHeight + src.offsetHeight + \"px\";\r\n\t\telse\r\n\t\t\tthis._tooltip.style.top = pos.top + \"px\";\r\n\t};\r\n\r\n\tscheduler._year_view_tooltip_handler = function(e){\r\n\t\tif (!isYearMode()) return;\r\n\r\n\t\tvar src = e.target || e.srcElement;\r\n\t\tif (src.tagName.toLowerCase() == 'a') // fix for active links extension (it adds links to the date in the cell)\r\n\t\t\tsrc = src.parentNode;\r\n\t\tif (scheduler._getClassName(src).indexOf(\"dhx_year_event\") != -1)\r\n\t\t\tscheduler._showToolTip(scheduler.templates.parse_date(src.getAttribute(\"data-year-date\")), scheduler.$domHelpers.getOffset(src), e, src);\r\n\t\telse\r\n\t\t\tscheduler._hideToolTip();\r\n\t};\r\n\tscheduler._init_year_tooltip = function() {\r\n\t\tscheduler._detachDomEvent(scheduler._els[\"dhx_cal_data\"][0], \"mouseover\", scheduler._year_view_tooltip_handler);\r\n\t\tscheduler.event(scheduler._els[\"dhx_cal_data\"][0], \"mouseover\", scheduler._year_view_tooltip_handler);\r\n\t};\r\n\r\n\tscheduler._get_year_cell = function(d) {\r\n\t\tvar dateString = scheduler.templates.format_date(d);\r\n\t\tvar cells = this.$root.querySelectorAll(`.dhx_cal_data .dhx_cal_datepicker_date[data-cell-date=\"${dateString}\"]`);\r\n\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\tif(!scheduler.$domHelpers.closest(cells[i], \".dhx_after, .dhx_before\")){\r\n\t\t\t\treturn cells[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t};\r\n\r\n\tscheduler._year_marked_cells = {};\r\n\tscheduler._mark_year_date = function(date, event) {\r\n\t\tvar dateString = scheduler.templates.format_date(date);\r\n\t\tvar cell = this._get_year_cell(date);\r\n\t\tif (!cell) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tvar ev_class = this.templates.event_class(event.start_date, event.end_date, event);\r\n\t\tif (!scheduler._year_marked_cells[dateString]) {\r\n\t\t\tcell.classList.add(\"dhx_year_event\", \"dhx_cal_datepicker_event\");// = \"dhx_month_head dhx_year_event\";\r\n\t\t\tcell.setAttribute(\"data-year-date\", dateString);\r\n\t\t\tcell.setAttribute(\"date\", dateString);\r\n\t\t\tscheduler._year_marked_cells[dateString] = cell;\r\n\t\t}\r\n\t\tif(ev_class){\r\n\t\t\tcell.classList.add(ev_class);\r\n\t\t}\r\n\t};\r\n\tscheduler._unmark_year_date = function(date) {\r\n\t\tvar cell = this._get_year_cell(date);\r\n\t\tif (!cell) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcell.classList.remove(\"dhx_year_event\", \"dhx_cal_datepicker_event\");\r\n//\t\tcell.className = \"dhx_month_head\";\r\n\t};\r\n\tscheduler._year_render_event = function(event) {\r\n\t\tvar date = event.start_date;\r\n\t\tif (date.valueOf() < this._min_date.valueOf()){\r\n\t\t\tdate = this._min_date;\r\n\t\t} else {\r\n\t\t\tdate = this.date.date_part(new Date(date));\r\n\t\t}\r\n\r\n\t\twhile (date < event.end_date) {\r\n\t\t\tthis._mark_year_date(date, event);\r\n\t\t\tdate = this.date.add(date, 1, \"day\");\r\n\t\t\tif (date.valueOf() >= this._max_date.valueOf())\r\n\t\t\t\treturn;\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler.year_view = function(mode) {\r\n\r\n\t\tscheduler.set_sizes();\r\n\r\n\t\tscheduler._table_view = mode;\r\n\r\n\t\tif (this._load_mode && this._load()) return;\r\n\r\n\t\tif (mode) {\r\n\t\t\tscheduler._init_year_tooltip();\r\n\t\t\tscheduler._reset_year_scale();\r\n\t\t\tif (scheduler._load_mode && scheduler._load()){\r\n\t\t\t\tscheduler._render_wait = true;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tscheduler.render_view_data();\r\n\t\t} else {\r\n\t\t\tscheduler._hideToolTip();\r\n\t\t}\r\n\t};\r\n\tscheduler._reset_year_scale = function() {\r\n\t\tthis._cols = [];\r\n\t\tthis._colsS = {};\r\n\t\tvar week_starts = []; //start day of first week in each month\r\n\t\tvar dataArea = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tvar c = this.config;\r\n\t\tdataArea.scrollTop = 0; //fix flickering in FF\r\n\t\tdataArea.innerHTML = \"\";\r\n\r\n\t\tvar dy = Math.floor((parseInt(dataArea.style.height) - scheduler.xy.year_top) / c.year_y);\r\n\t\tif (dy < 190) {\r\n\t\t\tdy = 190;\r\n\t\t}\r\n\r\n\t\tvar week_template = document.createElement(\"div\");\r\n\t\tvar dummy_date = this.date.week_start(scheduler._currentDate());\r\n\r\n\t\tthis._process_ignores(dummy_date, 7, \"day\", 1);\r\n\r\n\t\tfor (var i = 0; i < 7; i++) {\r\n\t\t\tif(!(this._ignores && this._ignores[i])) {\r\n\t\t\t\tthis._cols[i] = 'var(--dhx-scheduler-datepicker-cell-size)';\r\n\t\t\t\tthis._render_x_header(i, 0, dummy_date, week_template);\r\n\r\n\t\t\t}\r\n\t\t\tdummy_date = this.date.add(dummy_date, 1, \"day\");\r\n\t\t}\r\n\t\tweek_template.lastChild.className += \" dhx_scale_bar_last\";\r\n\r\n\t\tfor(var i = 0; i < week_template.childNodes.length; i++){\r\n\t\t\tthis._waiAria.yearHeadCell(week_template.childNodes[i]);\r\n\t\t}\r\n\r\n\t\tvar sd = this.date[this._mode + \"_start\"](this.date.copy(this._date));\r\n\t\tvar ssd = sd;\r\n\t\tvar yearBox = null;\r\n\t\tconst wrapper = document.createElement(\"div\");\r\n\t\twrapper.classList.add(\"dhx_year_wrapper\");\r\n\t\tfor (var i = 0; i < c.year_y; i++){\r\n\t\t\tfor (var j = 0; j < c.year_x; j++) {\r\n\t\t\t\tyearBox = document.createElement(\"div\");\r\n\t\t\t\tyearBox.className = \"dhx_year_box\";\r\n\r\n\t\t\t\tyearBox.setAttribute(\"date\", this._helpers.formatDate(sd));\r\n\t\t\t\tyearBox.setAttribute(\"data-month-date\", this._helpers.formatDate(sd));\r\n\t\t\t\tyearBox.innerHTML = \"
\" + week_template.innerHTML + \"
\";\r\n\r\n\t\t\t\tvar header = yearBox.querySelector(\".dhx_year_month\");\r\n\t\t\t\tvar grid = yearBox.querySelector(\".dhx_year_grid\");\r\n\t\t\t\tvar body = yearBox.querySelector(\".dhx_year_body\");\r\n\r\n\t\t\t\tvar headerId = scheduler.uid();\r\n\t\t\t\tthis._waiAria.yearHeader(header, headerId);\r\n\t\t\t\tthis._waiAria.yearGrid(grid, headerId);\r\n\r\n\r\n\t\t\t\theader.innerHTML = this.templates.year_month(sd);\r\n\r\n\r\n\r\n\t\t\t\tvar dd = this.date.week_start(sd);\r\n\t\t\t\tthis._reset_month_scale(body, sd, dd, 6);\r\n\r\n\t\t\t\tvar days = body.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var day = 0; day < days.length; day++){\r\n\t\t\t\t\tthis._waiAria.yearDayCell(days[day]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\twrapper.appendChild(yearBox);\r\n\r\n\t\t\t\tweek_starts[i * c.year_x + j] = (sd.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) % 7;\r\n\t\t\t\tsd = this.date.add(sd, 1, \"month\");\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdataArea.appendChild(wrapper);\r\n\r\n\t\tvar dateElement = this._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML = this.templates[this._mode + \"_date\"](ssd, sd, this._mode);\r\n\t\t}\r\n\r\n\t\tthis.week_starts = week_starts;\r\n\t\tweek_starts._month = ssd.getMonth();\r\n\t\tthis._min_date = ssd;\r\n\t\tthis._max_date = sd;\r\n\t};\r\n\r\n\tscheduler._reset_year_scale = function(){\r\n\r\n\t\tvar dataArea = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tdataArea.scrollTop = 0; //fix flickering in FF\r\n\t\tdataArea.innerHTML = \"\";\r\n\r\n\t\tlet yearStart = this.date.year_start(new Date(this._date));\r\n\t\t\r\n\t\tthis._min_date = this.date.week_start(new Date(yearStart));\r\n\r\n\t\tconst wrapper = document.createElement(\"div\");\r\n\t\twrapper.classList.add(\"dhx_year_wrapper\");\r\n\r\n\t\tlet currentDate = yearStart;\r\n\t\tfor(let i = 0; i < 12; i++){\r\n\t\t\tlet yearBox = document.createElement(\"div\");\r\n\t\t\tyearBox.className = \"dhx_year_box\";\r\n\r\n\t\t\tyearBox.setAttribute(\"date\", this._helpers.formatDate(currentDate));\r\n\t\t\tyearBox.setAttribute(\"data-month-date\", this._helpers.formatDate(currentDate));\r\n\t\t\tyearBox.innerHTML = `
${this.templates.year_month(currentDate)}
\r\n\t\t\t
`;\r\n\r\n\t\t\tconst yearGrid = yearBox.querySelector(\".dhx_year_grid\");\r\n\t\t\tconst datepicker = scheduler._createDatePicker(null, {\r\n\t\t\t\tdate: currentDate,\r\n\t\t\t\tminWeeks: 6\r\n\t\t\t});\r\n\t\t\tdatepicker._renderDayGrid(yearGrid);\r\n\t\t\tdatepicker.destructor();\r\n\r\n\t\t\twrapper.appendChild(yearBox);\r\n\r\n\t\t\tcurrentDate = this.date.add(currentDate, 1, \"month\");\r\n\r\n\t\t}\r\n\t\tdataArea.appendChild(wrapper);\r\n\r\n\t\tlet lastDate = this.date.add(yearStart, 1, \"year\");\r\n\t\tif(lastDate.valueOf() != this.date.week_start(new Date(lastDate)).valueOf()){\r\n\t\t\tlastDate = this.date.week_start(new Date(lastDate));\r\n\t\t\tlastDate = this.date.add(lastDate, 1, \"week\");\r\n\t\t}\r\n\t\tthis._max_date = lastDate;\r\n\t\tvar dateElement = this._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML = this.templates[this._mode + \"_date\"](yearStart, lastDate, this._mode);\r\n\t\t}\r\n\t};\r\n\r\n\tvar getActionData = scheduler.getActionData;\r\n\tscheduler.getActionData = function(n_ev) {\r\n\t\tif(!isYearMode()){\r\n\t\t\treturn getActionData.apply(scheduler, arguments);\r\n\t\t}\r\n\t\t\r\n\t\tvar date = getCellDate(n_ev.target);\r\n\t\treturn {\r\n\t\t\tdate:date,\r\n\t\t\tsection:null\r\n\t\t};\r\n\t};\r\n\r\n\tvar locateEvent = scheduler._locate_event;\r\n\tscheduler._locate_event = function(node) {\r\n\t\tvar id = locateEvent.apply(scheduler, arguments);\r\n\t\tif(!id){\r\n\t\t\t\r\n\t\t\tvar date = getCellDate(node);\r\n\t\t\tif(!date) return null;\r\n\t\t\tvar evs = scheduler.getEvents(date, scheduler.date.add(date, 1, \"day\"));\r\n\t\t\tif(!evs.length) return null;\r\n\r\n\t\t\t//can be multiple events in the cell, return any single one\r\n\t\t\tid = evs[0].id;\r\n\t\t}\r\n\t\treturn id;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tscheduler._hideToolTip();\r\n\t});\r\n}","import SchedulerFactory from \"./scheduler_factory\";\r\nimport gplExtensions from \"./ext/extensions_gpl\";\r\n\r\nconst factory = new SchedulerFactory(gplExtensions);\r\n\r\nconst scheduler = factory.getSchedulerInstance();\r\nconst Scheduler = {\r\n\tplugin: scheduler.bind(factory.plugin, factory)\r\n};\r\n\r\nwindow.scheduler = scheduler;\r\nwindow.Scheduler = Scheduler;\r\n\r\nif(!window.$dhx) {\r\n\twindow.$dhx = {};\r\n}\r\n\r\nwindow.$dhx.scheduler = scheduler;\r\nwindow.$dhx.Scheduler = Scheduler;\r\n\r\nexport default scheduler;export { scheduler, Scheduler };","\r\n\r\nimport dhtmlxHook from \"./dhtmlx_hook\";\r\nimport \"./css/theme.less\";\r\ndhtmlxHook();\r\n\r\nimport global from \"./global\";\r\n\r\nimport factoryMethod from \"./scheduler_factory_method\";\r\nimport ExtensionsManager from \"./ext/extension_manager\";\r\n\r\nclass SchedulerFactory {\r\n\r\n\tconstructor (extensions) {\r\n\t\tthis._seed = 0;\r\n\t\tthis._schedulerPlugins = [];\r\n\t\tthis._bundledExtensions = extensions;\r\n\t\tthis._extensionsManager = new ExtensionsManager(extensions);\r\n\t}\r\n\r\n\tplugin(code) {\r\n\t\tthis._schedulerPlugins.push(code);\r\n\r\n\t\tif(global.scheduler){\r\n\t\t\tcode(global.scheduler);\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetSchedulerInstance(initConfig) {\r\n\t\tvar scheduler = factoryMethod(this._extensionsManager);\r\n\r\n\t\tfor (var i = 0; i < this._schedulerPlugins.length; i++) {\r\n\t\t\tthis._schedulerPlugins[i](scheduler);\r\n\t\t}\r\n\t\tscheduler._internal_id = this._seed++;\r\n\t\r\n\t\tif (this.$syncFactory){\r\n\t\t\tthis.$syncFactory(scheduler);\r\n\t\t}\r\n\r\n\t\tif(initConfig){\r\n\t\t\tthis._initFromConfig(scheduler, initConfig);\r\n\t\t}\r\n\r\n\t\treturn scheduler;\r\n\t}\r\n\r\n\t_initFromConfig(scheduler, initConfig){\r\n\t\tif(initConfig.plugins){\r\n\t\t\tscheduler.plugins(initConfig.plugins);\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.config){\r\n\t\t\tscheduler.mixin(scheduler.config, initConfig.config, true);\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.templates){\r\n\t\t\tscheduler.attachEvent(\"onTemplatesReady\", function(){\r\n\t\t\t\tscheduler.mixin(scheduler.templates, initConfig.templates, true);\r\n\t\t\t}, {once: true});\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.events){\r\n\t\t\tfor(const event in initConfig.events){\r\n\t\t\t\tscheduler.attachEvent(event, initConfig.events[event]);\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.locale){\r\n\t\t\tscheduler.i18n.setLocale(initConfig.locale);\r\n\t\t}\r\n\t\r\n\t\tif(Array.isArray(initConfig.calendars)){\r\n\t\t\tinitConfig.calendars.forEach(function(calendar){\r\n\t\t\t\tscheduler.addCalendar(calendar);\r\n\t\t\t});\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.container){\r\n\t\t\tscheduler.init(initConfig.container);\r\n\t\t} else {\r\n\t\t\tscheduler.init();\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.data){\r\n\t\t\tif(typeof initConfig.data === \"string\"){\r\n\t\t\t\tscheduler.load(initConfig.data);\r\n\t\t\t}else{\r\n\t\t\t\tscheduler.parse(initConfig.data);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\r\n}\r\n\r\nexport default SchedulerFactory;"],"names":["global$1","window","global","extend","scheduler","div","className","element","document","createElement","split","forEach","cssClass","classList","add","itemTypes","rows_container","row","view","config","setAttribute","fix_tab_position","$firstTab","$lastTab","$segmentedTab","date","button","builtInButton","spacer","minicalendarButton","minicalendarDiv","click","$_eventAttached","event","isCalendarVisible","destroyCalendar","renderCalendar","position","this","getState","navigation","handler","calendar","setCurrentView","html_element","renderElement","renderer","rows","cols","css","width","value","style","height","html","innerHTML","align","justifyContent","prepareConfig","renderLayout","items","fragment","createDocumentFragment","Array","isArray","i","length","next","appendChild","_init_nav_bar","navBar","$container","querySelector","_update_nav_bar","previousHeight","container","heightChanged","newHeight","xy","nav_height","unset_actions","_els","get_elements","set_actions","display","isAttachedNode","root","body","parentNode","getWindowSize","w","innerWidth","documentElement","clientWidth","h","innerHeight","clientHeight","listenWindowResize","resizeDelay","oldSize","clearTimeout","setTimeout","$destroyed","a","b","newSize","triggerSchedulerResize","$root","callEvent","updateView","getComputedStyle","getPropertyValue","resizeWatcher","tabIndex","wai_aria_attributes","offsetHeight","previousWidth","offsetWidth","lowlevelResizeWatcher","contentWindow","removeChild","EventHost","_silent_mode","listeners","createEventStorage","obj","handlers","index","eventStorage","combinedResult","handlerResult","apply","arguments","addEvent","settings","e","handlerId","id","once","originalHandler","removeEvent","clear","makeEventable","eventHost","attachEvent","eventName","toLowerCase","thisObject","bind","attachAll","callback","name","eventArguments","handlerName","concat","checkEvent","detachEvent","list","eventId","detachAllEvents","defaultDomEvents","el","addEventListener","eventRemove","removeEventListener","domEvents","eventScope","attach","capture","push","detach","splice","detachAll","staticArray","slice","_eventRemoveAll","_createDomEventScope","_trim","str","String","prototype","trim","replace","_isDate","getFullYear","getMonth","getDate","_isObject","uidSeed","Date","now","isDate","utils","uid","mixin","target","source","force","f","copy","object","result","pop","Function","toString","call","constructor","Number","Boolean","varType","Object","hasOwnProperty","defined","delay","timeout","timer","$cancelTimeout","$pending","args","$execute","getClassName","node","baseVal","indexOf","locateCss","classname","strict","trg","srcElement","ind","left","charAt","right","isVisible","visibility","currentStyle","hiddenSection","recurringSection","hasNonNegativeTabIndex","isNaN","getAttribute","hasHref","area","nodeName","loLowerCase","isEnabled","input","select","textarea","hasAttribute","isShadowDomSupported","head","createShadowRoot","attachShadow","getRootNode","ShadowRoot","host","dom_helpers","getAbsoluteLeft","htmlObject","getOffset","getAbsoluteTop","top","getOffsetSum","elem","parseInt","offsetTop","offsetLeft","offsetParent","getOffsetRect","box","getBoundingClientRect","test","navigator","userAgent","dummy","dummyBox","docElem","scrollTop","pageYOffset","scrollLeft","pageXOffset","clientTop","clientLeft","Math","round","closest","selector","insertAfter","newNode","referenceNode","nextSibling","insertBefore","remove","isChildOf","child","parent","contains","getFocusableNodes","nodes","querySelectorAll","join","nodesArray","$position","sort","hasShadowParent","getActiveElement","activeElement","shadowRoot","getSelection","focusNode","getRelativeEventPosition","ev","d","bottom","y","x","clientX","clientY","getTargetNode","tagName","composedPath","getNodePosition","Element","matches","msMatchesSelector","webkitMatchesSelector","parentElement","nodeType","isWindowAwailable","env","isIE","isIE6","XMLHttpRequest","isIE7","isIE8","isOpera","isChrome","isKHTML","isFF","isIPad","search","isEdge","isNode","serialize$1","data","key","serialized","encodeURIComponent","JSON","stringify","generateStringToDate","format","utc","splt","mask","match","code","csp_str_to_date","set","temp","locale","month_short_hash","month_full_hash","UTC","canUseCsp","useCsp","csp","init","s","month_short","t","month_full","_bind_host_object","method","date_part","old","setHours","setMinutes","setSeconds","setMilliseconds","getHours","setTime","getTime","time_part","valueOf","getTimezoneOffset","week_start","shift","getDay","start_on_monday","month_start","setDate","year_start","setMonth","day_start","_add_days","inc","ndate","rest","hours","mode","setYear","to_fixed","num","date_to_str","getUTCDate","getUTCMonth","getUTCFullYear","day_short","getUTCDay","day_full","getUTCHours","getUTCMinutes","getMinutes","getUTCSeconds","getSeconds","getUTCISOWeek","getISOWeek","func","str_to_date","exactFormat","stringToDateMethod","parseExactFormat","yyyyMMddhhIIss","MMddyyyyhhIIss","ddMMyyyyhhIIss","ISO8601","parseYMD","parseMDY","parseDMY","dateString","parse_exact_format","datestr","nday","first_thursday","year_number","ordinal_date","floor","convert_to_utc","getSerializator","res","_events","_loaded","_load","url","from","_load_url","to","prevent_cache","_date","_load_mode","lf","templates","load_format","_min_date","cache_line","_max_date","temp_to","ajax","get","ajaxCallback","response","on_load","_parsers","xml","canParse","xhr","responseXML","firstChild","xmlDoc","parse","responseText","topElement","xmltop","loader","csrfToken","dhtmlx","security_key","opts","xpath","arr","serverList","itms","j","attrs","attributes","label","k","attr","nodeValue","ud","udx","_xmlNodeToJSON","_userdata","text","evs","_init_event","json","events","dhx_security","collections","collections_loaded","collection","option","option_key","ical","RegExp","c_start","c_end","incoming","event_r","e_start","e_end","exec","param","param_r","parse_param","substr","parse_date","dh","dm","utcMark","dy","dn","dd","server_utc","error","foundParser","parser","_process","status","_process_loading","_loading","_not_render","_render_wait","render_view_data","_after_call","_tagvalue","start_date","_init_date","end_date","_helpers","parseDate","getSerializableData","createSerializator","serialize","dataset","allEvents","exportedEvent","exportValue","rawValue","xml_format","format_date","type","load","setLoadMode","array","childNodes","show_loading","_x","_y","_obj","_init_touch_events","touch","MSStream","platform","maxTouchPoints","scroll_width","_mobile","touchEventsSupported","createEvent","_touch_events","touches","pageX","pageY","PointerEvent","pointerEnabled","pointerType","msPointerEnabled","MSPOINTER_TYPE_MOUSE","names","accessor","ignore","tracker","drag_mode","scroll_mode","action_mode","dblclicktime","attachTouchEvent","_is_lightbox_open","passive","drag_cancel","_hide_global_tip","_on_mouse_up","_temp_touch_block","_drag_id","_drag_mode","_drag_pos","_pointerDragId","acc","dnd","timeline","matrix","_mode","original_render","drag_id","getEvent","property","y_property","getEvents","_sorder","_count","render_data","_on_mouse_move","preventDefault","cancelBubble","_update_global_tip","abs","fake_event","pointerId","_click","dhx_cal_data","_on_dbl_click","_block_next_stop","touch_drag","actTask","_locate_event","fakeTask","sourceTask","_ignore_next_click","_getClassName","previousSibling","_on_mouse_down","for_rendered","_rendered","touch_tip","_show_global_tip","updateEvent","touch_swipe_dates","s_ev","e_ev","step","max_dy","scrollable","dx","dhx_cal_next_button","dhx_cal_prev_button","toptip","_global_tip","time","_timed","event_header","day_date","labels","drag_to_create","drag_to_move","calculatedMaterial","cachedBorderBoxValue","checkIfBorderBoxStyling","_is_material_skin","undefined","probe","boxSizing","refreshAfterLoad","_border_box_events","oldStyling","flatSkinHourScale","min","_addThemeClass","skin","_skin_settings","use_select_menu_space","wide_form","hour_size_px","displayed_event_color","displayed_event_text_color","_skin_xy","lightbox_additional_height","bar_height","checkIfMaterialSkin","_build_skin_info","clearInterval","monitorIntervalId","setInterval","csstheme","setSkin","styles","themeVar","themeName","isCssVarTheme","cssValues","oldMaterialTheme","links","getElementsByTagName","href","themeNameFromFile","_theme_info","theme","cssVarTheme","values","themeVariables","_configure","col","_skin_init","render","hour_scale","hour_date","_old_month_day","month_day","old_month_day","_currentDate","dhx_cal_today_button","tab","header","tabs","specialTabs","map","tabName","find","filter","firstTab","reverse","DataProcessorEvents","dp","$scheduler","$dp","_dataProcessorHandlers","_validId","setUpdated","z","_new_event","_in_progress","_invalid","updatedRows","_waitMode","_update_callback","upd","setUserData","action_param","deleteEvent","_add_rec_marker","DataProcessor","serverProcessorURL","serverProcessor","autoUpdate","updateMode","_tMode","_headers","_payload","post_delim","messages","updated","inserted","deleted","invalid","invalid_cell","enableUTFencoding","eventable","message","boxAttribute","_dhx_msg_cfg","usercall","modalBox","hide","modal_key","which","keyCode","messageBox","keyboard","domHelpers","modality","cover","classValue","buttonAriaAttrs","_waiAria","messageButtonAttrString","getFirstDefined","_createBox","ok","cancel","contentId","messageModalAttr","inner","title","content","message_ok","message_cancel","buttons","btn","getElementById","hidden","focus","alertPopup","confirmPopup","boxPopup","box_params","params","expire","focusable","messageInfoAttr","timers","pull","seed","hideAll","popups","alert","confirm","modalbox","setTransactionMode","total","headers","payload","_tSend","_endnm","_serializeAsJson","_router","router","escape","_utf","setDataColumns","val","_columns","getSyncState","enableDataNames","enablePartialDataSend","_changed","setUpdateMode","master","rowId","state","findRow","existing","getUserData","set_invalid","is_invalid","markRow","sendData","_methods","details","getActionByState","checkBeforeUpdate","editStop","sendAllData","_beforeSendData","_getRowData","_sendData","_serializeAsJSON","serialize_one","stack","keys","pref","_applyPayload","urlSeparator","dataToSend","self","queryParams","ids","afterUpdate","urlParams","_user","_cleanupArgumentsBeforeSend","preprocessedData","_cleanupItemBeforeSend","action","query","_onResolvedCreateUpdate","tag","resultState","setRequestHeader","sid","tid","afterUpdateCallback","routerMode","actionPromise","create","delete","update","then","Error","catch","valid","_forEachUpdatedRow","_getAllData","out","has_one","pattern","defineAction","_uActions","btag","marker","correct","originalSid","_errorResponse","cleanUpdate","_setDefaultTransactionMode","_serverProcessor","that","finalizeUpdate","atag","_initialized","_dp_init","_is_virtual_event","_set_event_text_style","r","cssText","event_updated","rec_type","rec_pattern","_dp_change_event_id","new_id","changeEventId","_dp_hook_delete","setDp","_dp","dataProcessorEvents","_dataprocessor","setOnAfterUpdate","setOnBeforeUpdateHandler","setAutoUpdate","interval","user","_need_update","_update_busy","xml_node","afterAutoUpdate","fullSync","intervalId","loadUpdate","getUpdates","_getXmlNodeValue","version","vers","updates","destructor","processedData","updatedItem","output","_prepareDataItem","item","processedItem","formatDate","dataItem","ar","day_tab","week_tab","month_tab","new_event","icon_save","icon_cancel","icon_details","icon_edit","icon_delete","confirm_closing","confirm_deleting","section_description","section_time","full_day","confirm_recurring","section_recurring","button_recurring","button_recurring_open","button_edit_series","button_edit_occurrence","grid_tab","prev","year","month","day","hour","minute","be","agenda_tab","description","year_tab","week_agenda_tab","repeat_radio_day","repeat_radio_week","repeat_radio_month","repeat_radio_year","repeat_radio_day_type","repeat_text_day_count","repeat_radio_day_type2","repeat_week","repeat_text_week_count","repeat_radio_month_type","repeat_radio_month_start","repeat_text_month_day","repeat_text_month_count","repeat_text_month_count2_before","repeat_text_month_count2_after","repeat_year_label","select_year_day2","repeat_text_year_day","select_year_month","repeat_radio_end","repeat_text_occurences_count","repeat_radio_end2","repeat_radio_end3","month_for_recurring","day_for_recurring","ca","cn","cs","da","de","en","es","fi","fr","he","hu","it","jp","LocaleManager","_locales","nb","nl","no","pl","pt","ro","ru","si","sk","sv","tr","ua","DatePicker","modes","currentRange","eventDates","currentModeIndex","onStateChangeHandlers","_domEvents","onStateChange","oldState","newState","_notifyStateChange","direction","newDate","setFullYear","setState","newIndex","backwardArrow","monthLabel","innerText","toLocaleString","startYear","_toggleMode","forwardArrow","_adjustDate","_renderCalendarHeader","dataContainer","_renderDayGrid","_renderMonthGrid","_renderYearGrid","daysOfWeekContainer","currentDate","maxDate","labelFormat","dayElement","max","weeks","currWeek","minWeeks","minSchedulerDate","maxSchedulerDate","eventDaysTable","reduce","_renderDayGridHeader","firstDate","monthStart","monthEnd","lastDate","_weeksBetween","currDate","dayGridContainer","dateCell","wrapper","months","formatLabel","monthElement","doneArea","doneBtn","yearElement","factoryMethod","extensionManager","commonViews","agenda","grid","unit","week_agenda","anythingElse","requiredExtensions","limit","_commonErrorMessages","unknownView","relatedExtension","collapsedContainer","createTimelineView","createUnitsView","createGridView","addMarkedTimespan","exportToPNG","exportToPDF","common","extend$l","_detachDomEvent","_init_once","scheduler_resize_listener","layout","hasSchedulerMarkup","console","wai_aria_application_role","views","_props","_grid","viewName","log","rtl","_scroll","init_templates","set_sizes","$initialized","min_event_height","scale_width","scale_height","month_scale_height","menu_width","margin_top","margin_left","editor_width","month_head_height","event_header_height","edit_save","edit_cancel","functor","scale_x","_table_view","materialScalePlaceholder","set_xy","_lightbox","_setLbPosition","_data_width","prepareValue","prepared","els","class_name","attr_value","labelAttr","domEventsScope","getDaysDifference","startDate","endDate","start","differenceInDays","src","_select_id","_close_not_saved","unselect","min_date","max_date","editor_id","_edit_id","lightbox_id","_lightbox_id","select_id","expanded","readonly","getActionData","icon","def_step","dhx_cal_tab","deprecated_name","substring","c","_dhtmlx_confirm","title_confirm_deleting","edit","save","showLightbox","form","addEventNow","end","base","event_duration","time_step","start_hour","first_hour","_drag_event","dblclick_create","details_on_dblclick","_get_column_index","x_pos","column","_cols","_ignores","_week_indexes_from_pos","pos","ceil","_mouse_coords","$env","_colsS","$domHelpers","dataArea","heights","_ignores_detected","preserve_length","_event_length","_get_real_event_length","x_step","x_unit","timestamp","title_confirm_closing","positive_closing","_correct_shift","back","_is_pos_changed","old_pos","new_pos","diff","old_val","new_val","has_moved","_correct_drag_start_date","len","_start_correction","_end_correction","last_hour","_get_fictional_event_length","_correct_drag_end_date","duration","mousedownPos","_get_date_from_pos","_drag_start","fields","timeStep","custom","_dragEventBody","_move_event_shift","resize_date","_drag_from_start","resize_from_start","end_day_start","end_day_date","firstHour","maxY","precisePos","minDate","preciseDate","cursor","new_end","new_start","limit_drag_out","all_timed","_get_section_view","_get_event_sday","getView","_allow_dnd","update_render","sx","update_view","drag_event_body","_lame_clone","_get_private_properties","_clear_temporary_properties","clean","flagged_event","initial","current_state","moved","_dhx_changed","is_new","edit_on_create","details_on_create","isOneDayEvent","_lame_copy","_trigger_dyn_loading","_reset_ignores","_reset_scale","isViewExists","_set_aria_buttons_attrs","buttonGroups","group","headerButtonsAttributes","icon_form","oldClass","newClass","multidayScroll","dhx_multi_day","prev_scroll","preserve_scroll","_dy_shift","headerToggleState","_render_x_header","offset_top","left_border","columnHeaderText","dayHeaderAttr","_get_columns_num","count","count_n","_get_timeunit_start","_get_view_end","ed","_calc_scale_sizes","summ","_process_ignores","realcount","_set_scale_col_size","_render_scales","data_area","sd","today","scales","cls","firstHalf","slotDate","htmlContent","time_slot_text","time_slot_class","secondHalf","week_date_class","dayColumnAttr","_getNavDateElement","drag_resize","drag_move","_scales","navBarDateStr","scaleElement","navBarDateAttr","_reset_month_scale","_reset_hours_scale","multi_day","c1","totalWidth","col_length","offset","hiddenWidth","c2","cloneNode","cc","hourScaleAttr","scroll_hour","now_date","n","preserve","ign_date","_render_month_scale","view_start","cd","tdwidths","cell_width","getCellHeight","cellheight","table","cell","month_date_class","body_class","head_class","monthCellAttr","cellHead","cellBody","bf1","getLabel","sections","lightbox","map_to","options","updateCollection","list_name","resetLightbox","hideCover","cache","n_ev","section","_focus","endColumnIndex","eventLength","startColumnIndex","_get_date_index","last_column","check","excludedDuration","intervalStart","intervalEnd","leftCellCutOffStart","leftCellCutOffEnd","rightCellCutOffStart","rightCellCutOffEnd","ev_length","dir","per_day","days","end_slot","fd","start_slot","_get_section_property","_is_initialized","htmlTags","extraSpaces","stripHTMLLite","htmlText","singleQuotes","escapeQuotes","getAttributeString","setAttributes","role","isActive","getHeaderCellAttr","eventAttr","_eventCommonAttr","event_text","$dataprocessor_class","setEventBarAttr","_getAttributes","attributeSetter","arg","eventBarAttrString","agendaHeadAttrString","agendaHeadDateString","agendaHeadDescriptionString","agendaDataAttrString","agendaEventAttrString","agendaDetailsBtnString","gridAttrString","gridRowAttrString","gridCellAttrString","mapAttrString","mapRowAttrString","mapDetailsBtnString","minicalHeader","headerId","minicalGrid","minicalRow","minicalDayCell","selected","minicalHeadCell","weekAgendaDayCell","weekAgendaEvent","lightboxHiddenAttr","lightboxVisibleAttr","lightboxSectionButtonAttrString","tabindex","yearHeader","yearGrid","yearHeadCell","yearRow","yearDayCell","lightboxAttr","lightboxButtonAttrString","buttonName","eventMenuAttrString","iconName","lightboxHeader","headerText","lightboxSelectAttrString","time_option","buttonLabel","quickInfoAttr","quickInfoHeaderAttrString","quickInfoHeader","quickInfoButtonAttrString","tooltipAttr","tooltipVisibleAttr","tooltipHiddenAttr","dom","assert","show_errors","_createDatePicker","_getFocusableNodes","_locate_css","messageApi","$","counter","methods","Promise","clearAll","createConfig","async","serializeRequestParams","DOMParser","ActiveXObject","loadXML","parseFromString","tagname","xpathExp","docObj","selectNodes","first","ownerDocument","evaluate","XPathResult","ANY_TYPE","iterateNext","_call","onLoad","getSync","put","postData","del","post","postSync","resolve","reject","isQt","readyState","filePath","open","toUpperCase","send","$ajax","default_date","month_date","load_date","week_date","date_format","api_date","day_column_padding","drag_create","resize_month_events","resize_month_timed","responsive_lightbox","separate_short_events","cascade_event_display","cascade_event_count","cascade_event_margin","multi_day_height_limit","drag_lightbox","quick_info_detached","drag_highlight","icons_edit","icons_select","buttons_left","buttons_right","highlight_displayed_event","ajax_error","delay_render","timeline_swap_resize","event_attribute","$initial","xml_date","d1","d2","day_scale_date","month_scale_date","week_scale_date","time_picker","event_date","event_class","event_bar_date","event_bar_text","month_events_link","drag_marker_class","drag_marker_content","tooltip_date_format","tooltip_text","calendar_month","calendar_scale_date","calendar_date","calendar_time","clear_view","extra_data","silent","setEvent","hash","create_getter","create_setter","is_visible_events","clear_event","evFirstHour","evLastHour","lastHour","checkEndDate","get_visible_events","only_timed","filter_event","_is_main_area_event","hold","full","_recalculate_timed","tvs","tvd","_rendered_location","buffer","renderedLocation","_view_month_day","_render_month_link","toRender","_sday","_eday","curr","_sweek","_get_event_bar_pos","widt","x2","_pre_render_events","containers","render_event_bar","max_evs","max_month_events","locate_holder","real","render_event","_get_first_visible_cell","cells","hb","h_old","_pre_render_events_table","_pre_render_events_line","monthRows","cellHeight","cHeight","unshift","scrollHeight","scroll_fix","scale_settings","sum_width","row_heights","full_multi_day_height","used_multi_day_height","used_multi_day_height_css","multi_day_section","multi_day_icon","overflowY","datePart","_get_event_mapped_end_date","ev_duration","_min_mapped_duration","evs_originals","sh","eh","_inner","t_ev","slot_index","sorderSet","_is_sorder","_max_sorder","max_count","_copy_event","_time_order","_is_any_multiday_cell_visible","isAnyCellVisible","checkDate","noCells","lastDayEnd","weekCellIndex","locate_holder_day","chunks_info","first_chunk","last_chunk","chunk_info","locate_s","locate_e","_length","stack_line","_first_chunk","_last_chunk","_copy_dummy","_y_from_date","sm","_calc_event_y","min_height","em","parentWidth","menu","menu_offset","pos_y","ev_count","ev_sorder","margin","_render_v_bar","_text_style","zIndex","color","setProperty","tplClass","_editor","shiftKey","ariaAttr","icons","icons_str","currentIcon","textColor","highlightEventPosition","contentA","contentB","_","cse","boxWidth","renderEvent","inner_html","footer_class","_drag_resize","past","_get_dnd_order","order","ev_height","max_height","_orig_sorder","evTop","columns","y_event_offset","resize_handle","resizable","left_chunk","right_chunk","resize_left","resize_right","timed","bg_color","style_text","_edit_stop_event","getRenderedEvent","rendered_events","rendered_event","showEvent","original_color","original_text_color","section_delimiter","getSectionTop","posFromDate","_smartRenderingEnabled","restoreOriginalColors","scrollTo","_append_drag_marker","m","scale","lastChild","_update_marker_position","size","getLightboxRoot","cspEnvironment","salesforceEnvironment","_lightbox_controls","formSection","getLightbox","getValue","form_blocks","get_value","setValue","set_value","get_template_control","control","get_select_control","get_textarea_control","get_time_control","defaults","template","sns","_get_input","_dhx_onchange","onchange","time_format","_time_format_order","cfg","dt","last","limit_time_select","p","selectBoxClass","range","start_year","end_year","year_range","g","tdate","_time_values","ariaAttrs","_full_day","checked","disabled","_fill_lightbox_select","auto_end_date","_update_lightbox_select","time_values","direct_value","fixed_value","value_found","t_v","selectedIndex","original","showCover","show_cover","_cover","_fill_lightbox","lightbox_header","headerContent","headerDate","headerTitle","current_sns","_get_lightbox_section_node","block","default_value","_lightbox_out","_empty_lightbox","hide_lightbox","endLightbox","hide_cover","_move_while_dnd","_finish_dnd","save_lightbox","startLightbox","_custom_lightbox","_temp_lightbox","cancel_lightbox","hideLightbox","_init_lightbox_events","buttonTarget","sectionButton","button_click","readonly_active","setLightboxSize","_init_dnd_events","_dnd_start_lb","dhx_unselectable","lb","_lb_start","_ready_to_dnd","recurring","_lightbox_template","label_name","ds","t_ds","_bindLightboxLabels","inputBlock","fallback","inputId","old_id","getRootView","hooks","didInsert","cmp","skins","jQuery","fn","dhx_scheduler","each","Scheduler","getSchedulerInstance","comp","update_view_timer","curr_view_timer","lazy_setCurrentView","oldDate","oldMode","updateFlags","lazy_updateView","ars","createDataProcessor","tMode","batchUpdate","dhtmlxError","catchError","i18n","addLocale","setLocale","localeObject","getLocale","dhx_save_btn","dhx_cancel_btn","dhx_delete_btn","ext","activePlugins","plugins","dependencies","priorities","extension","dep","dependencyName","orderA","orderB","treetimeline","daytimeline","outerdrag","legacy","extensionList","plugin","getExtension","ExtensionsManager","_extensions","attaches","attachScheduler","_genStr","attachObject","vs","av","sched","schedId","setSizes","_viewRestore","notImplemented","modals","modalsStack","isModal","afterPopup","trapFocus","currentTarget","$keyboardNavigation","_keyNavMessagePopup","focusElement","backupFocus","key_nav_legacy","_temp_key_scope","key_nav","_pasteDate","_pasteSection","isCopy","trackMousePosition","mousePointer","keyNavPointer","elementFromPoint","dispatcher","copyEvent","_make_pasted_event","event_pid","event_length","multisection","_do_paste","is_copy","modified_ev","original_ev","_is_key_nav_active","ctrlKey","metaKey","_buffer_event","_key_nav_copy_paste","getActiveNode","new_ev","scheduler_handlers","attachSchedulerHandlers","waitCall","keyDownHandler","focusHandler","keepScrollPosition","focusGlobalNode","enable","reFocusActiveNode","activeNode","isValid","MinicalButton","MinicalCell","mousedownHandler","dataAreaClick","Event","TimeSlot","nextSlot","setActiveNode","removeAttribute","evNode","prevState","lastStart","lastEnd","lastSection","getNode","Tooltip","_scheduler","_tooltipNode","_root","_isLikeMouseEvent","_calculateTooltipPosition","viewport","_getViewPortSize","tooltipNode","tooltip","offsetX","tooltip_offset_x","offsetY","tooltip_offset_y","mouse","containerPos","scrollY","_getViewPort","scrollX","$event_data","$event","TooltipManager","_listeners","_initDelayedFunctions","delayHide","watchableTarget","eventTarget","targetNode","doOnMouseEnter","onmouseenter","onmousemove","onmouseleave","listener","cloneDomEvent","clone","delayShow","utils.default","setContent","show","tooltip_timeout","tooltip_hide_timeout","gplExtensions","active_links","active_link_view","_active_link_click","s_d","do_wrapper","fullname","week_x","d_s","agenda_legacy","add_agenda_legacy","agenda_legacy_time","agenda_legacy_text","agenda_legacy_date","agenda_legacy_start","old_dblclick_dhx_cal_data","dblclick_dhx_cal_data","fill_agenda_tab","old_render_view_data","ev_class","agendaDetailsButtonAttr","agenda_time","agenda_text","_agendaScrollTop","agenda_area","dateElement","agenda_date","agenda_legacy_view","agenda_start","agenda_end","l","rowAttr","dateHeader","descriptionHeader","agenda_view","add_agenda","dayDateToStr","dayDowToStr","agenda_day","eventsInDays","anyEvents","eventStart","renderDay","calendarEvent","dates","selectedId","all_timed_month","is_event_short","_safe_copy","proto","isPrototypeOf","old_prerender_events_line","old_prerender_events_table","prerender_events","ce","_virtual","isOvernightEvent","getNextDay","setDateTime","event_changed","re","redraw","next_day","old_get_visible_events","old_mode","old_date","oldUpdate","fullRedrawNeeded","collision","temp_section","before","_setTempSection","event_id","collision_limit","checkCollision","edited_ev","_roll_back_dates","_check_sections_collision","second","evs_dates","getRecDates","tevs","concurrent","checked_mode","single","container_autoresize","month_day_min_height","min_grid_size","min_map_size","old_pre_render_event","active","total_height","multiday_height","evl","_h_fix","navHeight","headerHeight","checked_divs","updateContainterHeight","is_repaint","checked_div","maxHeight","year_y","cur_height","week_agenda_scale_height","eventsContainer","_gridView","y_unit","getSectionHeight","scrollWidth","getScrollSize","callUpdate","conditionalUpdateContainerHeight","asyncRepaint","requestAnimationFrame","autosizeEnabled","$original_scroll_width","$original_section_autoheight","section_autoheight","cookie","getCookieName","_get_url_nav","urlNavigationPlugin","schedulerCookie","unescape","newMode","cookie_param","old_load","drag_between","editors","cached_options","resetCombo","_combo","DOMParent","combo","unload","DOMelem","dhx_globalImgPath","image_path","dhtmlXCombo","options_height","setOptionHeight","enableFilteringMode","filtering","script_path","selected_id","addOption","disable","selectOption","setComboValue","all_options","single_option","getIndexByValue","getSelectedValue","getSelectedText","vertical","radiobuttons","checked_value","isChecked","check_html","o","label_html","checkbox","unchecked_value","expand","fullscreen","toggleIcon","_position","_width","_height","_overflow","overflow","_maximize","collapse","directions","prev_margin","export_api","std","getElementSizes","sizes","dhtmlxAjax","dhx4","getTimeline","orientation","dpi","zoom","_export_html","_send_to_export","exportToICal","_serialize_plain","exportToExcel","_serialize_columns","_ajax_to_export","server","info","_plain_export_copy","$text","_create_hidden_form","submit","_hidden_export_form","_get_export_size","footer","A5","A4","A3","A2","A1","A0","dataX","cSize","parseFloat","smartRendering","initialSizes","smart_rendering","style_width","style_height","timeline_scrollable","timeline_smart_rendering","grid_view","html_templates","all","getScope","scopes","minicalButton","minicalDate","SchedulerNode","DataArea","timeSlot","searchMap","key_nav_step","addShortcut","shortcut","scope","scopeObject","getShortcutHandler","commands","shortcuts","findHandler","removeShortcut","unbind","disp","setDefaultNode","_compose","parts","createCommand","modifiers","alt","ctrl","meta","expr","getExpressions","words","getWords","command","commandKeys","specialKeys","charCodeAt","getCommandFromEvent","domEvent","altKey","printableKey","fromCharCode","getHashFromEvent","getHash","junctionChar","term","combinationChar","backspace","enter","esc","space","up","down","home","pageup","pagedown","insert","plus","f1","f2","f3","f4","f5","f6","f7","f8","f9","f10","f11","f12","EventHandler","_handlers","doAction","returnValue","bindAll","initKeys","nextItem","currentFocus","currentIndex","divs","renderMultiple","currentStart","currentEnd","_modes","_getMode","units","renderVerticalMarker","renderTimelineMarker","renderYearMarker","renderMonthMarker","weekAgenda","renderWeekAgendaMarker","renderAgendaMarker","dayColumns","addWaiAriaLabel","addDataAttributes","dateToStr","dateTimeLabel","sectionObject","markerDate","_wrapDiv","_get_year_cell","opacity","view_opts","areas","round_position","blocks","_trace_x","_is_column_visible","start_pos","end_pos","set_date_part","tempStart","tempEnd","_timeline_getX","_section_height","_isRender","renderMonthCell","weekNumber","dayIndex","datatable","inner_index","all_hours_height","hour_ms","lineHeight","getDefaultNode","getMode","blur","_compareEvents","_pickEvent","startId","nextEventHandler","nextEvent","currEvent","visibleDates","nextEv","prevEventHandler","HeaderCell","getNodes","KeyNavNode","moveTo","compareTo","canStringifyThis","canStringifyThat","defaultCell","_getSection","_getNodes","eventNode","defaultElement","isScrolledIntoView","eventBox","viewPort","idSelector","inlineEditor","getInlineEditor","isMultisectionEvent","_moveToSlot","slot","movingDate","getDefaultDate","_getDefaultSection","visibleTime","nowTime","showNowTime","findVisibleColumn","timeslot","_getMultisectionView","_getNextSection","sectionId","nextIndex","defaultSlot","addMonthDate","nextMonthSlot","_alignTimeSlot","nextTimelineSlot","newPos","nextUnitsSlot","optionsCount","nextDaySlot","_moveDate","isBeforeLastHour","isStartDate","minutes","isAfterFirstHour","isInVisibleDayTime","oldStart","toNextDay","testEnd","nextWeekAgendaSlot","nextAgendaSlot","isDateVisible","nextDateColumn","current","tempSlot","extendSlot","extendUnitsSlot","extendTimelineSlot","extendMonthSlot","extendDaySlot","extendWeekAgendaSlot","extendGenericSlot","allowedDirections","moveDate","newDates","extendSlotDates","oldSlot","newSlot","dateDirection","scrollSlot","globalNode","_getGrid","_getNode","enabled","newRow","newCol","blurNode","editor","defaultPrevented","schedulerNode","_timeout","_minicalendars","isMinical","minicalendars","patchMinicalendar","focusMinical","minicalClick","rowIndex","cellIndex","td","renderMinical","cal","added","destroyMinical","_def_count","attachOnce","isSchedulerSelected","changeState","layer","layers","validId","_clearUpdateFlag","_cloneObj","_dataprocessors","_layers_zindex","initial_layer_zindex","isDefault","defaultLayer","showLayer","tlayer","toggleLayer","hideLayer","visible","getLayer","layer_name","native_event_object","noMenu","_evs_layer","_t_render_view_data","evs_layer","borderBox","borderBoxWidth","headerWidth","bodyWidth","footerWidth","bodyHeight","new_zIndex","filter_agenda","limit_start","limit_end","limit_view","check_limits","mark_now","display_marked_timespans","overwrite_marked_timespans","_temp_limit_scope","dhx_time_block","default_timespan_type","get_resulting_options","zones","blockTime","unblockTime","deleteMarkedTimespan","om","od","nm","nd","isBlocked","date_end","resetDate","checkInMarkedTimespan","timespan_type","on_overlap","temp_start_date","temp_end_date","timespans","_marked_timespans","day_value","getZones","_get_zone_minutes","eventEnd","markerStart","markerEnd","blocker","checkLimitViolation","complete_res","allow","day_index","linker","_add_timespan_zones","_get_blocked_zones","timeline_zones","blocked_timeline_zones","_get_relevant_blocked_zones","resultZones","is_new_event","data_copy","native_object","_mark_now","_mark_now_timer","dhx_now_time","_remove_mark_now","_append_mark_now","zone_start","start_index","end_index","units_l","r_divs","t_day","t_div","_render_marked_timespan","_prepare_timespan_options","r_configs","temp_configs","t_days","cloned_config","invert_zones","invertZones","view_key","t_config","c_config","t_sd","t_ed","zone_end","_get_dates_by_index","start_day","delta","t_date","_get_css_classes_by_config","css_classes","_get_block_by_config","date_to_display","min_day","sday","block_proto","_mark_timespans","_on_scale_add_marker","markTimespan","configuration","rebuild_els","timespans_ids","_marked_timespans_ids","timespan_types","_marked_timespans_types","unmarkTimespan","_addMarkerTimespanConfig","unit_id","timespans_view","day_configs","_array","configs","current_zones","resulting_zones","c_zone_start","c_zone_end","isLast","_subtract_timespan_zones","is_modified","_delete_marked_timespan_by_id","parent_array","_delete_marked_timespan_by_config","viewspans","_delete_marked_timespans_list","dayConfig","day_timespans","d_t","related_zones","types","typedConfig","_get_types_to_render","specific","types_to_render","_get_configs_to_render","_get_unit_index","day_ind","unitsPerDay","unit_zones","unit_types","global_data","day_types","dblclick_dhx_marked_timespan","map_view","mapView","geocoder","points","markers","infoWindow","createMarker","google","maps","Marker","map_date_width","map_icon_width","map_description_width","map_resolve_event_location","map_resolve_user_location","map_initial_position","LatLng","map_error_position","map_infowindow_max_width","map_type","MapTypeId","ROADMAP","map_zoom_after_resolve","marker_geo_success","marker_geo_fail","marker_date","marker_text","event_location","dblclick_dhx_map_area","map_time","map_text","map_start","add_map","map_date","_latLngUpdate","_isMapPositionSet","gmap","dhx_gmap","_setMapSize","mapOptions","map_initial_zoom","center","mapTypeId","Map","disableDefaultUI","disableDoubleClickZoom","addListener","point","latLng","geocode","results","GeocoderStatus","OK","geometry","location","lat","lng","formatted_address","infoWindowOptions","maxWidth","_points","_markers","_infowindow","InfoWindow","_infowindows_content","_initialization_count","Geocoder","geolocation","getCurrentPosition","_userLocation","coords","latitude","longitude","setCenter","setZoom","getCenter","setPosition","getZoom","fill_map_tab","_selected_event_id","ariaButtonAttr","elem_id","marginRight","marginLeft","marginTop","showAddress","temp_center","map_end","close","setMap","clear_map_tab","trigger","selectEvent","performClick","_displayEventOnMap","address","language","_updateEventLocation","old_event_id","new_event_id","_event_resolve_delay","ret","minical","minicalDomEvents","minicalendar","mark_events","_synced_minicalendars","_prev","is_refresh","_render_calendar","unmarkCalendar","cont","tpos","_get_def_cont","$dom","dateAttribute","markCalendar","_last_date","conf","markedDates","_markCalendarCurrentDate","sync","_on_xle_handler","updateCalendar","_created","_locateCalendar","weekNum","dat","dayCell","_week_template","week_template","dummy_date","_mini_cal_arrows","previous","ts","temp2","temp3","temp4","temp5","temp6","temp7","temp8","padding","weekHeader","move_minicalendar_date","css_classnames","css_texts","diffs","calendars","arrow","dayHeaders","dayCells","inputs","selects","inp","number","new_date","_update_minical_select","isFulldayEvent","_attach_action","_round_minutes","linkCalendar","datediff","dateNew","month_end","monthheight","old_s","multiselect","_result","_children","_mark_inputs","_ids","delimiter","script_url","divLoading","multisource","mvc","update_timer","use_id","sanitize","_finish_ext_load","_get_id","model","cid","backbone","toJSON","changes","queue","add_from_queue","Backbone","Collection","last_event","dragger","dhtmlDragAndDropObject","stopDrag","on_drop","sourceHtmlObject","dhtmlObject","targetHtmlObject","targetHtml","action_data","event_data","view_options","_locate_cell_timeline","addDragLanding","_drag","_dragIn","shtmlObject","_dragOut","DragControl","addDrop","onDrop","sourceDhtmlx","getMaster","onDragIn","pdf","html_regexp","newline_regexp","clean_html","x_norm","colsWidth","x_norm_event","is_left","dhx_cal_header","y_norm","get_style","de_day","de_week","xml_end","xml_top","profile","xml_body_header","dhx_cal_date","xh","xml_month_scale","xml_month","yh","xhs","second_scale","top_width","top_col","xml_body","colors","week_starts","_month","text_color","zx","zdx","left_norm","zy","zdy","e_type","dets","week","dy_copy","toXML","original_date","original_mode","temp_date","to_pdf","objects","getPDFData","toPDF","toPDFRange","quick_info","show_quick_info","showQuickInfo","hiding_function","hideQuickInfo","quick_info_title","quick_info_content","quick_info_date","_quick_info_box_id","_get_event_counter_part","_quick_info_box","_init_quick_info","_fill_quick_data","_show_quick_info","cssTimeToMs","milliseconds","forced","qi","_x_scroll","dataPos","_quick_info_onscroll_handler","$testmode","_qi_button_click","domEv","main","mainContent","originalRecurringSetValue","original_left_buttons","original_right_buttons","txt_replace","txts","txtt","readonly_form","forbidden_buttons","button_arrays","forbidden_button","button_array","originalForm","readonlyForm","_lightbox_r","getRecurringSection","getFirstSectionOfType","clearMilliseconds","old_add_event","occurrence_timestamp_in_utc","recurring_workdays","_get_node","_outer_html","outerHTML","rec","loc","repeat_date_of_end","_ds","_get_form_node","_get_node_value","_get_node_numeric_value","_set_node_value","hash_value","_init_set_value","_end_date","str_date_format","repeat_date","date_str","register_els","inps","formatter","change_current_view","set_end_rule","_get_repeat_code","get_rcode","repeat","str_date","include_end_by","transpose_type","get_numeric_value","repeat_precise","_start","start_exists","transpose_day_week","set_rcode","_set_repeat_code","dispatchEvent","MouseEvent","elements","_rec_init_done","rf","blocked","_is_modified_occurence","_toggle_block","actual_dates","timeControl","_start_date","_get_button","_get_form","backgroundPosition","_rec_markers","_rec_markers_pull","_pid_time","_get_rec_marker","ch","_get_rec_markers","_rec_temp","ev_id","_ignore_call","tev","_pid_changed","nid","nev","sub","isEventFound","showLightbox_rec","lightbox_recurring","pid","isVirtual","showSeries","title_confirm_recurring","get_visible_events_rec","old_update_event","transponse_size","day_week","originalMonth","newMonth","cor","cor2","cday","transposeRecurring","recurringParts","addRecurring","recurringStepDays","weekDays","seriesInstance","currentCount","origMonth","origYear","correctOverflowInstances","recurring_overflow_instances","getMilliseconds","non_render","maxCount","startHour","visibleCount","_fix_daylight_saving_date","ted","recurrings","sev","data_attributes","all_events","_serialize_json_value","toICal","full_day_format","tooltipManager","tooltips","tooltipFor","touch_tooltip","targetEventId","hideTooltip","s2d","d2s","select_event","wp","year_view","year_date","year_month","year_scale_date","year_tooltip","isYearMode","getCellDate","dblclick_dhx_month_head","_year_render_event","_year_marked_cells","_hideToolTip","_tooltip","_showToolTip","_year_view_tooltip_handler","_init_year_tooltip","_mark_year_date","_unmark_year_date","_reset_year_scale","year_top","ssd","yearBox","year_x","yearStart","datepicker","locateEvent","factory","extensions","_seed","_schedulerPlugins","_bundledExtensions","_extensionsManager","initConfig","_internal_id","$syncFactory","_initFromConfig","addCalendar","$dhx"],"mappings":"qOAUA,MAAAA,EAPqB,OAAXC,OAAW,IACNA,OAEAC,OCNA,SAASC,GAAOC,EAAAA,CAE/B,SAASC,EAAIC,EACZ,CAAA,IAAIC,EAAUC,SAASC,cAAc,KAAA,EAKrC,OAJeH,GAAa,IAAII,MAAM,GAC9BC,EAAAA,QAAQ,SAASC,EAAAA,CACxBL,EAAQM,UAAUC,IAAIF,CAAAA,CACxB,GACQL,CACR,CACA,IAAIQ,EAAY,CACfC,eAAgB,UACf,CAAA,OAAOX,EAAI,+BAAA,CACX,EACDY,IAAK,UACJ,CAAA,OAAOZ,EAAI,oBAAA,CACX,EACDa,KAAM,SAAUC,EAAAA,CACf,IAAIZ,EAAUF,EAAI,aAAA,EAiBlB,OAhBAE,EAAQa,aAAa,OAAQD,EAAOD,KAAO,MAC3CX,EAAAA,EAAQa,aAAa,WAAYD,EAAOD,IAAAA,EAErCd,EAAUe,OAAOE,mBAChBF,EAAOG,UACTf,EAAQM,UAAUC,IAAI,mBACdK,EAAAA,EAAOI,SACfhB,EAAQM,UAAUC,IAAI,kBACG,EAAhBK,EAAOD,OAAS,QACzBX,EAAQM,UAAUC,IAAI,wBAAA,EAGpBK,EAAOK,eACTjB,EAAQM,UAAUC,IAAI,uBAGjBP,GAAAA,CACP,EACDkB,KAAM,UACL,CAAA,OAAOpB,EAAI,cAAA,CACX,EACDqB,OAAQ,SAAUP,EAAAA,CACjB,OAAOd,EAAI,0DACX,CAAA,EACDsB,cAAe,SAAUR,EACxB,CAAA,OAAOd,EAAI,WAAac,EAAOD,KAAO,4BACtC,CAAA,EACDU,OAAQ,UA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U2zD,KAAKE,UAAU+rC,EAAWvpF,MAGlC1S,EAAAA,MAAMC,QAAQg8F,EAAWnT,SAC3BmT,GAAAA,EAAWnT,UAAUlsF,QAAQ,SAAS+B,EAAAA,CACrCtC,EAAUggG,YAAY19F,CAC1B,CAAA,CAAA,EAGKs9F,EAAWr7F,UACbvE,EAAU4W,KAAKgpF,EAAWr7F,SAAAA,EAE1BvE,EAAU4W,KAAAA,EAGRgpF,EAAWvqF,OACHuqF,OAAAA,EAAWvqF,MAAS,SAC7BrV,EAAUuiB,KAAKq9E,EAAWvqF,IAE1BrV,EAAAA,EAAUmd,MAAMyiF,EAAWvqF,IAG7B,EAAA,CAAA,EDxFmConD,EAE/Bz8D,EAAAA,EAAYs/F,EAAQ1sC,qBAAAA,EACpBD,GAAY,CACjBuC,OAAQl1D,EAAUgJ,KAAKs2F,EAAQpqC,OAAQoqC,CAAAA,CAAAA,EAGxCz/F,OAAOG,UAAYA,EACnBH,OAAO8yD,UAAYA,GAEf9yD,OAAOogG,OACVpgG,OAAOogG,KAAO,IAGfpgG,OAAOogG,KAAKjgG,UAAYA,EACxBH,OAAOogG,KAAKttC,UAAYA"} \ No newline at end of file +{"version":3,"file":"dhtmlxscheduler.js","sources":["../sources/global.js","../sources/core/nav_bar.js","../sources/core/scheduler_resize_listener.js","../sources/utils/eventable.js","../sources/core/utils/event.js","../sources/core/common.js","../sources/core/utils/scoped_event.js","../sources/core/utils/utils.js","../sources/core/utils/dom_helpers.js","../sources/utils/env.js","../sources/core/common/url_serialize.js","../sources/core/base.js","../sources/core/common/get_serializable_events.js","../sources/core/load.js","../sources/core/loaders/xml.js","../sources/core/loaders/json.js","../sources/core/loaders/ical.js","../sources/core/touch.js","../sources/core/skins.js","../sources/core/dataprocessor/dataprocessor_hooks.js","../sources/core/dataprocessor/dataprocessor.js","../sources/core/message.js","../sources/locale/locale_ar.js","../sources/locale/locale_be.js","../sources/locale/locale_ca.js","../sources/locale/locale_cn.js","../sources/locale/locale_cs.js","../sources/locale/locale_da.js","../sources/locale/locale_de.js","../sources/locale/locale_el.js","../sources/locale/locale_en.js","../sources/locale/locale_es.js","../sources/locale/locale_fi.js","../sources/locale/locale_fr.js","../sources/locale/locale_he.js","../sources/locale/locale_hu.js","../sources/locale/locale_id.js","../sources/locale/locale_it.js","../sources/locale/locale_jp.js","../sources/locale/locale_manager.js","../sources/locale/locale_nb.js","../sources/locale/locale_nl.js","../sources/locale/locale_no.js","../sources/locale/locale_pl.js","../sources/locale/locale_pt.js","../sources/locale/locale_ro.js","../sources/locale/locale_ru.js","../sources/locale/locale_si.js","../sources/locale/locale_sk.js","../sources/locale/locale_sv.js","../sources/locale/locale_tr.js","../sources/locale/locale_ua.js","../sources/core/datepicker.js","../sources/scheduler_factory_method.js","../sources/core/common_errors.js","../sources/core/scheduler.js","../sources/core/wai_aria.js","../sources/core/common/assert.js","../sources/core/jquery.js","../sources/core/destructor.js","../sources/core/utils/ajax.js","../sources/core/config.js","../sources/core/event.js","../sources/core/event_highlight.js","../sources/core/lightbox.js","../sources/core/dhtmlx/dhtmlx_suite_hooks.js","../sources/core/delay_render.js","../sources/core/connector.js","../sources/locale/index.js","../sources/ext/extension_manager.js","../sources/dhtmlx_hook.js","../sources/ext/restricted_extensions/not_implemented_extension.js","../sources/ext/keyboard_navigation/modals.js","../sources/ext/keyboard_navigation/key_nav_legacy.js","../sources/ext/keyboard_navigation/scheduler_handlers.js","../sources/ext/tooltip/tooltip.ts","../sources/ext/tooltip/tooltipManager.ts","../sources/ext/extensions_gpl.js","../sources/ext/active_links.js","../sources/ext/agenda_legacy_view.js","../sources/ext/agenda.js","../sources/ext/all_timed.js","../sources/ext/collision.js","../sources/ext/container_autoresize.js","../sources/ext/cookie.js","../sources/ext/restricted_extensions/daytimeline.js","../sources/ext/restricted_extensions/drag_between.js","../sources/ext/editors.js","../sources/ext/expand.js","../sources/ext/export_api/index.js","../sources/ext/restricted_extensions/grid_view.js","../sources/ext/html_templates.js","../sources/ext/key_nav.js","../sources/ext/keyboard_navigation/common/keyboard_shortcuts.js","../sources/ext/keyboard_navigation/common/eventhandler.js","../sources/ext/keyboard_navigation/common/trap_modal_focus.js","../sources/ext/keyboard_navigation/marker.js","../sources/ext/keyboard_navigation/elements/scheduler_node.js","../sources/ext/keyboard_navigation/elements/nav_node.js","../sources/ext/keyboard_navigation/elements/header_cell.js","../sources/ext/keyboard_navigation/elements/event.js","../sources/ext/keyboard_navigation/elements/time_slot.js","../sources/ext/keyboard_navigation/elements/minical_button.js","../sources/ext/keyboard_navigation/elements/minical_cell.js","../sources/ext/keyboard_navigation/elements/data_area.js","../sources/ext/keyboard_navigation/core.js","../sources/ext/keyboard_navigation/minical_handlers.js","../sources/ext/layer.js","../sources/ext/limit.js","../sources/ext/map_view.js","../sources/ext/minical.js","../sources/ext/monthheight.js","../sources/ext/restricted_extensions/multisection.js","../sources/ext/multiselect.js","../sources/ext/multisource.js","../sources/ext/mvc.js","../sources/ext/outerdrag.js","../sources/ext/pdf.js","../sources/ext/quick_info.js","../sources/ext/readonly.js","../sources/ext/recurring.js","../sources/ext/serialize.js","../sources/ext/restricted_extensions/timeline.js","../sources/ext/tooltip/index.ts","../sources/ext/restricted_extensions/treetimeline.js","../sources/ext/restricted_extensions/units.js","../sources/ext/url.js","../sources/ext/restricted_extensions/week_agenda.js","../sources/ext/wp.js","../sources/ext/year_view.js","../sources/dhtmlxscheduler.gpl.js","../sources/scheduler_factory.js"],"sourcesContent":["\r\n/* eslint-disable no-restricted-globals */\r\nvar globalScope;\r\nif(typeof window !== \"undefined\"){\r\n\tglobalScope = window;\r\n}else{\r\n\tglobalScope = global;\r\n}\r\n/* eslint-enable no-restricted-globals */\r\n\r\nexport default globalScope;","export default function extend(scheduler) {\r\n\r\nfunction div(className){\r\n\tvar element = document.createElement(\"div\");\r\n\tvar classes = (className || \"\").split(\" \");\r\n\tclasses.forEach(function(cssClass){\r\n\t\telement.classList.add(cssClass);\r\n\t});\r\n\treturn element;\r\n}\r\nvar itemTypes = {\r\n\trows_container: function(){\r\n\t\treturn div(\"dhx_cal_navbar_rows_container\");\r\n\t},\r\n\trow: function(){\r\n\t\treturn div(\"dhx_cal_navbar_row\");\r\n\t},\r\n\tview: function (config) {\r\n\t\tvar element = div(\"dhx_cal_tab\");\r\n\t\telement.setAttribute(\"name\", config.view + \"_tab\");\r\n\t\telement.setAttribute(\"data-tab\", config.view);\r\n\t\t// element.setAttribute(\"data-viewname\", config.view); // FIXME: need to remove? not used anywhere\r\n\t\tif(scheduler.config.fix_tab_position){\r\n\t\t\tif(config.$firstTab) {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_first\");\r\n\t\t\t}else if(config.$lastTab) {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_last\");\r\n\t\t\t} else if(config.view !== \"week\") {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_standalone\");\r\n\t\t\t}\r\n\r\n\t\t\tif(config.$segmentedTab) {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn element;\r\n\t},\r\n\tdate: function () {\r\n\t\treturn div(\"dhx_cal_date\");\r\n\t},\r\n\tbutton: function (config) {\r\n\t\treturn div(\"dhx_cal_nav_button dhx_cal_nav_button_custom dhx_cal_tab\");\r\n\t},\r\n\tbuiltInButton: function (config){\r\n\t\treturn div(\"dhx_cal_\" + config.view + \"_button dhx_cal_nav_button\");\r\n\t},\r\n\tspacer: function () {\r\n\t\treturn div(\"dhx_cal_line_spacer\");\r\n\t},\r\n\tminicalendarButton: function(config){\r\n\t\tvar minicalendarDiv = div('dhx_minical_icon');\r\n\t\tif(!config.click && !minicalendarDiv.$_eventAttached){\r\n\t\t\t\r\n\t\t\tscheduler.event(minicalendarDiv, \"click\", function () {\r\n\t\t\t\tif (scheduler.isCalendarVisible()) {\r\n\t\t\t\t\tscheduler.destroyCalendar();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tscheduler.renderCalendar({\r\n\t\t\t\t\t\tposition: this,\r\n\t\t\t\t\t\tdate: scheduler.getState().date,\r\n\t\t\t\t\t\tnavigation: true,\r\n\t\t\t\t\t\thandler: function (date, calendar) {\r\n\t\t\t\t\t\t\tscheduler.setCurrentView(date);\r\n\t\t\t\t\t\t\tscheduler.destroyCalendar();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn minicalendarDiv;\r\n\t},\r\n\thtml_element: function (config) {\r\n\t\treturn div(\"dhx_cal_nav_content\");\r\n\t}\r\n};\r\n\r\nfunction findRenderer(config) {\r\n\tvar renderer;\r\n\tif (config.view) {\r\n\t\tswitch (config.view){\r\n\t\t\tcase \"today\":\r\n\t\t\tcase \"next\":\r\n\t\t\tcase \"prev\":\r\n\t\t\t\trenderer = itemTypes.builtInButton;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"date\":\r\n\t\t\t\trenderer = itemTypes.date;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"spacer\":\r\n\t\t\t\trenderer = itemTypes.spacer;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"button\":\r\n\t\t\t\trenderer = itemTypes.button;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"minicalendar\":\r\n\t\t\t\trenderer = itemTypes.minicalendarButton;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\trenderer = itemTypes.view;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t} else if(config.rows) {\r\n\t\trenderer = itemTypes.rows_container;\r\n\t} else if(config.cols) {\r\n\t\trenderer = itemTypes.row;\r\n\t}\r\n\treturn renderer;\r\n}\r\n\r\nfunction renderElement(config){\r\n\tvar renderer = findRenderer(config);\r\n\tif(!renderer){\r\n\t\treturn;\r\n\t}\r\n\tvar element = renderer(config);\r\n\tif(config.css){\r\n\t\telement.classList.add(config.css);\r\n\t}\r\n\tif(config.width){\r\n\t\tvar value = config.width;\r\n\t\tif(value === value * 1){\r\n\t\t\tvalue += \"px\";\r\n\t\t}\r\n\t\telement.style.width = value;\r\n\t}\r\n\tif(config.height){\r\n\t\tvar value = config.height;\r\n\t\tif(value === value * 1){\r\n\t\t\tvalue += \"px\";\r\n\t\t}\r\n\t\telement.style.height = value;\r\n\t}\r\n\tif (config.click) {\r\n\t\tscheduler.event(element, \"click\", config.click);\r\n\t}\r\n\tif (config.html) {\r\n\t\telement.innerHTML = config.html;\r\n\t}\r\n\r\n\tif (config.align) {\r\n\t\tvar value = \"\";\r\n\t\tif (config.align == \"right\") {\r\n\t\t\tvalue = \"flex-end\";\r\n\t\t} else if(config.align == \"left\") {\r\n\t\t\tvalue = \"flex-start\";\r\n\t\t}\r\n\t\telement.style.justifyContent = value;\r\n\t}\r\n\treturn element;\r\n}\r\n\r\nfunction prepareConfig(config) {\r\n\tif (typeof config === \"string\") {\r\n\t\tconfig = {\r\n\t\t\tview: config\r\n\t\t};\r\n\t}\r\n\tif (!config.view && !config.rows && !config.cols) {\r\n\t\tconfig.view = \"button\";\r\n\t}\r\n\treturn config;\r\n}\r\n\r\nfunction renderLayout(config) {\r\n\tvar fragment = document.createDocumentFragment();\r\n\tvar items;\r\n\tif(Array.isArray(config)){\r\n\t\titems = config;\r\n\t}else{\r\n\t\titems = [config];\r\n\t}\r\n\r\n\tfor (var i = 0; i < items.length; i++) {\r\n\t\tvar view = prepareConfig(items[i]);\r\n\r\n\t\tif(view.view === \"day\" && items[i + 1]){\r\n\t\t\tvar next = prepareConfig(items[i + 1]);\r\n\t\t\tif(next.view === \"week\" || next.view === \"month\"){\r\n\t\t\t\tview.$firstTab = true;\r\n\t\t\t\tview.$segmentedTab = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(view.view === \"week\" && items[i - 1]){\r\n\t\t\tvar next = prepareConfig(items[i + 1]);\r\n\t\t\tif(next.view === \"week\" || next.view === \"month\"){\r\n\t\t\t\tview.$segmentedTab = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(view.view === \"month\" && items[i - 1]){\r\n\t\t\tvar next = prepareConfig(items[i - 1]);\r\n\t\t\tif(next.view === \"week\" || next.view === \"day\"){\r\n\t\t\t\tview.$lastTab = true;\r\n\t\t\t\tview.$segmentedTab = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar element = renderElement(view);\r\n\r\n\t\tfragment.appendChild(element);\r\n\t\tif(view.cols || view.rows){\r\n\t\t\telement.appendChild(renderLayout(view.cols || view.rows));\r\n\t\t}\r\n\t}\r\n\treturn fragment;\r\n}\r\n\r\nscheduler._init_nav_bar = function (items) {\r\n\tvar navBar = this.$container.querySelector(\".dhx_cal_navline\");\r\n\tif (!navBar){\r\n\t\tnavBar = document.createElement(\"div\");\r\n\t\tnavBar.className = \"dhx_cal_navline dhx_cal_navline_flex\";\r\n\t\tscheduler._update_nav_bar(items, navBar);\r\n\t\treturn navBar;\r\n\t}\r\n\treturn navBar;\r\n};\r\n\r\nvar previousNavbar = null;\r\nvar previousHeight = null;\r\nscheduler._update_nav_bar = function (config, container) {\r\n\r\n\tif(!config){\r\n\t\treturn;\r\n\t}\r\n\tvar heightChanged = false;\r\n\tvar configChanged = false;\r\n\r\n\tvar newHeight = config.height || scheduler.xy.nav_height;\r\n\r\n\tif(previousHeight === null ||\r\n\t\t\t(previousHeight !== newHeight)){\r\n\t\theightChanged = true;\r\n\t}\r\n\tif(!previousNavbar || JSON.stringify(config) !== previousNavbar){\r\n\t\tconfigChanged = true;\r\n\t}\r\n\r\n\tif(heightChanged){\r\n\t\tscheduler.xy.nav_height = newHeight;\r\n\t}\r\n\tif(configChanged){\r\n\t\tcontainer.innerHTML = \"\";\r\n\t\tcontainer.appendChild(renderLayout(config));\r\n\t}\r\n\r\n\tif(heightChanged || configChanged){\r\n\t\tscheduler.unset_actions();\r\n\t\tscheduler._els = [];\r\n\t\tscheduler.get_elements();\r\n\t\tscheduler.set_actions();\r\n\t}\r\n\r\n\tif(newHeight === 0){\r\n\t\tcontainer.style.display = \"none\";\r\n\t}else{\r\n\t\tcontainer.style.display = \"\";\r\n\t}\r\n\r\n\tpreviousHeight = newHeight;\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\tfunction isAttachedNode(container){\r\n\t\tvar root = document.body;\r\n\t\r\n\t\twhile(container && container != root){\r\n\t\t\tcontainer = container.parentNode;\r\n\t\t}\r\n\t\r\n\t\treturn !!(root == container);\r\n\t}\r\n\t\r\n\tfunction getWindowSize(window){\r\n\t\treturn {\r\n\t\t\tw : window.innerWidth || document.documentElement.clientWidth,\r\n\t\t\th : window.innerHeight || document.documentElement.clientHeight\r\n\t\t};\r\n\t}\r\n\tfunction equals(a,b){\r\n\t\treturn a.w == b.w && a.h == b.h;\r\n\t}\r\n\t\r\n\tfunction listenWindowResize(scheduler, window){\r\n\t\tvar oldSize = getWindowSize(window);\r\n\t\tvar resizeDelay;\r\n\t\tscheduler.event(window, \"resize\", function(){\r\n\t\t\tclearTimeout(resizeDelay);\r\n\t\t\tresizeDelay = setTimeout(function(){\r\n\r\n\t\t\t\tif (!isAttachedNode(scheduler.$container) || scheduler.$destroyed){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tvar newSize = getWindowSize(window);\r\n\t\t\t\t// element may be resized by container-autoresize exteinsion\r\n\t\t\t\t// check if the size is actually changed in order to not to get endless loop\r\n\t\t\t\tif (!equals(oldSize, newSize)) {\r\n\t\t\t\t\toldSize = newSize;\r\n\t\t\t\t\ttriggerSchedulerResize(scheduler);\r\n\t\t\t\t}\r\n\t\t\t}, 150);\r\n\t\t});\r\n\t}\r\n\t\r\n\tfunction triggerSchedulerResize(scheduler){\r\n\t\tif(scheduler.$destroyed || !scheduler.$root || !isAttachedNode(scheduler.$root)){\r\n\t\t\treturn;\t\r\n\t\t}\r\n\t\tif (scheduler.callEvent(\"onSchedulerResize\", [])) {\r\n\t\t\tscheduler.updateView();\r\n\t\t\tscheduler.callEvent(\"onAfterSchedulerResize\", []);\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction watchNodeResize(scheduler){\r\n\t\tvar previousHeight = scheduler.$root.offsetHeight;\r\n\t\tvar previousWidth = scheduler.$root.offsetWidth;\r\n\t\t\r\n\t\tfunction lowlevelResizeWatcher(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(scheduler.$root){\r\n\t\t\t\tif (scheduler.$root.offsetHeight != previousHeight ||\r\n\t\t\t\t\tscheduler.$root.offsetWidth != previousWidth){\r\n\t\t\t\t\ttriggerSchedulerResize(scheduler);\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\tpreviousHeight = scheduler.$root.offsetHeight;\r\n\t\t\t\tpreviousWidth = scheduler.$root.offsetWidth;\r\n\t\t\t}\r\n\t\r\n\t\t\tsetTimeout(lowlevelResizeWatcher, 200);\r\n\t\t}\r\n\t\t\r\n\t\tlowlevelResizeWatcher();\r\n\t}\r\n\t\r\n\tfunction addResizeListener(scheduler){\r\n\t\tvar root = scheduler.$container;\r\n\t\tvar containerStyles = window.getComputedStyle(root);\r\n\t\tif(containerStyles.getPropertyValue(\"position\") == \"static\"){\r\n\t\t\troot.style.position = \"relative\";\r\n\t\t}\r\n\t\r\n\t\tvar resizeWatcher = document.createElement('iframe');\r\n\t\tresizeWatcher.className = \"scheduler_container_resize_watcher\";\r\n\t\tresizeWatcher.tabIndex = -1;\r\n\t\tif(scheduler.config.wai_aria_attributes){\r\n\t\t\tresizeWatcher.setAttribute(\"role\", \"none\");\r\n\t\t\tresizeWatcher.setAttribute(\"aria-hidden\", true);\r\n\t\t}\r\n\t\r\n\t\t// in some environments (namely, in SalesForce) iframe.contentWindow is not available\r\n\t\tvar salesforce_environment = !!window[\"Sfdc\"] || !!window[\"$A\"] || window[\"Aura\"];\r\n\t\tif(salesforce_environment){\r\n\t\t\twatchNodeResize(scheduler);\r\n\t\t} else {\r\n\t\t\troot.appendChild(resizeWatcher);\r\n\t\t\tif (resizeWatcher.contentWindow) {\r\n\t\t\t\tlistenWindowResize(scheduler, resizeWatcher.contentWindow);\r\n\t\t\t} else {\r\n\t\t\t\t// if so - ditch the iframe and fallback to listening the main window resize\r\n\t\t\t\troot.removeChild(resizeWatcher);\r\n\t\t\t\tlistenWindowResize(scheduler, window);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\taddResizeListener(scheduler);\r\n\r\n}","class EventHost {\r\n\tconstructor(){\r\n\t\tthis._silent_mode = false;\r\n\t\tthis.listeners = {};\r\n\t}\r\n\t_silentStart(){\r\n\t\tthis._silent_mode = true;\r\n\t}\r\n\t_silentEnd() {\r\n\t\tthis._silent_mode = false;\r\n\t}\r\n}\r\n\r\nconst createEventStorage = function(obj) {\r\n\tlet handlers = {};\r\n\tlet index = 0;\r\n\tconst eventStorage = function(){\r\n\t\tlet combinedResult = true;\r\n\t\tfor(const i in handlers){\r\n\t\t\tconst handlerResult = handlers[i].apply(obj, arguments);\r\n\t\t\tcombinedResult=combinedResult && handlerResult;\r\n\t\t}\r\n\t\treturn combinedResult;\r\n\t};\r\n\teventStorage.addEvent=function(handler, settings){\r\n\t\tif (typeof (handler) == \"function\"){\r\n\t\t\tlet handlerId;\r\n\t\t\tif(settings && settings.id){\r\n\t\t\t\thandlerId = settings.id;\r\n\t\t\t}else{\r\n\t\t\t\thandlerId = index;\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\r\n\t\t\tif(settings && settings.once){\r\n\t\t\t\tconst originalHandler = handler;\r\n\t\t\t\thandler = function(){\r\n\t\t\t\t\toriginalHandler();\r\n\t\t\t\t\teventStorage.removeEvent(handlerId);\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\thandlers[handlerId] = handler;\r\n\t\t\treturn handlerId;\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\teventStorage.removeEvent=function(id){\r\n\t\tdelete handlers[id];\r\n\t};\r\n\r\n\teventStorage.clear = function(){\r\n\t\thandlers = {};\r\n\t};\r\n\r\n\treturn eventStorage;\r\n};\r\n\r\nfunction makeEventable(obj){\r\n\r\n\tconst eventHost = new EventHost();\r\n\tobj.attachEvent=function(eventName, handler, settings){\r\n\t\teventName = 'ev_'+eventName.toLowerCase();\r\n\t\tif (!eventHost.listeners[eventName]){\r\n\t\t\teventHost.listeners[eventName] = createEventStorage(this);\r\n\t\t}\r\n\r\n\t\tif(settings && settings.thisObject){\r\n\t\t\thandler = handler.bind(settings.thisObject);\r\n\t\t}\r\n\r\n\t\tconst innerId = eventHost.listeners[eventName].addEvent(handler, settings);\r\n\r\n\t\tlet handlerId = (eventName+':'+innerId); //return ID (ev_eventname:1)\r\n\t\tif(settings && settings.id){\r\n\t\t\thandlerId = settings.id;\r\n\t\t}\r\n\t\treturn handlerId;\r\n\t};\r\n\r\n\tobj.attachAll = function(callback){\r\n\t\tthis.attachEvent('listen_all', callback);\r\n\t};\r\n\r\n\tobj.callEvent=function(name, eventArguments){\r\n\t\tif (eventHost._silent_mode) return true;\r\n\r\n\t\tconst handlerName = 'ev_'+name.toLowerCase();\r\n\r\n\t\tconst listeners = eventHost.listeners;\r\n\t\tif (listeners['ev_listen_all']){\r\n\t\t\tlisteners['ev_listen_all'].apply(this, [name].concat(eventArguments));\r\n\t\t}\r\n\r\n\t\tif (listeners[handlerName])\r\n\t\t\treturn listeners[handlerName].apply(this, eventArguments);\r\n\t\treturn true;\r\n\t};\r\n\r\n\tobj.checkEvent=function(name){\r\n\t\tconst listeners = eventHost.listeners;\r\n\t\treturn (!!listeners['ev_'+name.toLowerCase()]);\r\n\t};\r\n\r\n\tobj.detachEvent=function(id){\r\n\t\tif (id){\r\n\t\t\tlet listeners = eventHost.listeners;\r\n\t\t\tfor(const i in listeners){\r\n\t\t\t\tlisteners[i].removeEvent(id); //remove event\r\n\t\t\t}\r\n\r\n\t\t\tconst list = id.split(':');//get EventName and ID\r\n\t\t\tlisteners = eventHost.listeners;\r\n\t\t\tif(list.length === 2){\r\n\t\t\t\tconst eventName = list[0];\r\n\t\t\t\tconst eventId = list[1];\r\n\t\t\t\tif(listeners[eventName]){\r\n\t\t\t\t\tlisteners[eventName].removeEvent(eventId); //remove event\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\tobj.detachAllEvents = function(){\r\n\t\tfor (const name in eventHost.listeners) {\r\n\t\t\teventHost.listeners[name].clear();\r\n\t\t}\r\n\t};\r\n\r\n}\r\n\r\nexport default makeEventable;","export default {\r\n\tevent: function (el, event, handler){\r\n\t\tif (el.addEventListener)\r\n\t\t\tel.addEventListener(event, handler, false);\r\n\t\r\n\t\telse if (el.attachEvent)\r\n\t\t\tel.attachEvent(\"on\"+event, handler);\r\n\t},\r\n\teventRemove: function (el, event, handler){\r\n\t\tif (el.removeEventListener)\r\n\t\t\tel.removeEventListener(event, handler, false);\r\n\t\r\n\t\telse if (el.detachEvent)\r\n\t\t\tel.detachEvent(\"on\"+event, handler);\r\n\t}\r\n};","import createEventScope from './utils/scoped_event';\r\n\r\nexport default function extend(scheduler) {\r\n\r\n\r\nvar domEvents = createEventScope();\r\n\r\nscheduler.event = domEvents.attach;\r\nscheduler.eventRemove = domEvents.detach;\r\nscheduler._eventRemoveAll = domEvents.detachAll;\r\nscheduler._createDomEventScope = domEvents.extend;\r\n\r\n\r\nscheduler._trim = function(str){\r\n\tvar func = String.prototype.trim || function(){ return this.replace(/^\\s+|\\s+$/g, \"\"); };\r\n\treturn func.apply(str);\r\n};\r\n\r\nscheduler._isDate = function(obj){\r\n\tif (obj && typeof obj == \"object\") {\r\n\t\treturn !!(obj.getFullYear && obj.getMonth && obj.getDate);\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n};\r\n\r\nscheduler._isObject = function(obj){\r\n\treturn (obj && typeof obj == \"object\");\r\n};\r\n\r\n}","import defaultDomEvents from './event';\r\n\r\nexport default function(){\r\n\r\n\tvar domEvents = function (addEvent, removeEvent) {\r\n\t\taddEvent = addEvent || defaultDomEvents.event;\r\n\t\tremoveEvent = removeEvent || defaultDomEvents.eventRemove;\r\n\t\tvar handlers = [];\r\n\t\tvar eventScope = {\r\n\t\t\tattach: function(el, event, callback, capture){\r\n\t\t\t\thandlers.push({element: el, event:event, callback: callback, capture: capture});\r\n\t\t\t\taddEvent(el, event, callback, capture);\r\n\t\t\t},\r\n\t\t\tdetach: function(el, event, callback, capture){\r\n\t\t\t\tremoveEvent(el, event, callback, capture);\r\n\t\t\t\tfor(var i = 0; i < handlers.length; i++){\r\n\t\t\t\t\tvar handler = handlers[i];\r\n\t\t\t\t\tif (handler.element === el && handler.event === event && handler.callback === callback && handler.capture === capture) {\r\n\t\t\t\t\t\thandlers.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tdetachAll: function () {\r\n\t\t\t\tvar staticArray = handlers.slice();\r\n\t\t\t\t// original handlers array can be spliced on every iteration\r\n\t\t\t\tfor (var i = 0; i < staticArray.length; i++){\r\n\t\t\t\t\tvar handler = staticArray[i];\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, handler.capture);\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, undefined);\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, false);\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, true);\r\n\t\t\t\t}\r\n\t\t\t\thandlers.splice(0, handlers.length);\r\n\t\t\t},\r\n\t\t\textend: function(){\r\n\t\t\t\treturn domEvents(this.event, this.eventRemove);\r\n\t\t\t}\r\n\t\t};\r\n\t\treturn eventScope;\r\n\t};\r\n\t\r\n\treturn domEvents();\r\n}","var uidSeed = Date.now();\r\nfunction uid () {\r\n\treturn uidSeed++;\r\n}\r\n\r\n// iframe-safe array type check instead of using instanceof\r\nfunction isArray(obj){\r\n\tif(Array.isArray){\r\n\t\treturn Array.isArray(obj);\r\n\t}else{\r\n\t\t// close enough\r\n\t\treturn (obj && obj.length !== undefined && obj.pop && obj.push);\r\n\t}\r\n}\r\n\r\n// non-primitive string object, e.g. new String(\"abc\")\r\nfunction isStringObject(obj){\r\n\treturn obj && typeof obj === \"object\" && \r\n\t\tFunction.prototype.toString.call(obj.constructor) === \"function String() { [native code] }\";\r\n}\r\n\r\n// non-primitive number object, e.g. new Number(5)\r\nfunction isNumberObject(obj){\r\n\treturn obj && typeof obj === \"object\" && \r\n\t\tFunction.prototype.toString.call(obj.constructor) === \"function Number() { [native code] }\";\r\n}\r\n\r\n// non-primitive number object, e.g. new Boolean(true)\r\nfunction isBooleanObject(obj){\r\n\treturn obj && typeof obj === \"object\" &&\r\n\t\tFunction.prototype.toString.call(obj.constructor) === \"function Boolean() { [native code] }\";\r\n}\r\n\r\nfunction isDate(obj) {\r\n\tif (obj && typeof obj === \"object\") {\r\n\t\treturn !!(obj.getFullYear && obj.getMonth && obj.getDate);\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n}\r\n\r\nfunction defined(obj) {\r\n\treturn typeof(obj) != \"undefined\";\r\n}\r\n\r\nfunction delay (callback, timeout){\r\n\tvar timer;\r\n\r\n\tvar result = function() {\r\n\t\tresult.$cancelTimeout();\r\n\t\tresult.$pending = true;\r\n\t\tvar args = Array.prototype.slice.call(arguments);\r\n\t\ttimer = setTimeout(function(){\r\n\t\t\tcallback.apply(this, args);\r\n\t\t\tresult.$pending = false;\r\n\t\t}, timeout);\r\n\t};\r\n\r\n\tresult.$pending = false;\r\n\tresult.$cancelTimeout = function(){\r\n\t\tclearTimeout(timer);\r\n\t\tresult.$pending = false;\r\n\t};\r\n\tresult.$execute = function(){\r\n\t\tvar args = Array.prototype.slice.call(arguments);\r\n\t\tcallback.apply(this, args);\r\n\t\tresult.$cancelTimeout();\r\n\t};\r\n\r\n\treturn result;\r\n}\r\n\r\nexport default {\r\n\tuid: uid,\r\n\tmixin: function mixin (target, source, force){\r\n\t\tfor (var f in source)\r\n\t\t\tif (((target[f] === undefined) || force)) target[f]=source[f];\r\n\t\treturn target;\r\n\t},\r\n\tcopy: function copy(object) {\r\n\t\tvar i, result; // iterator, types array, result\r\n\t\r\n\t\tif (object && typeof object == \"object\") {\r\n\t\r\n\t\t\tswitch (true){\r\n\t\t\t\tcase (isDate(object)):\r\n\t\t\t\t\tresult = new Date(object);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isArray(object)):\r\n\t\t\t\t\tresult = new Array(object.length);\r\n\t\t\t\t\tfor(i = 0; i < object.length; i++){\r\n\t\t\t\t\t\tresult[i] = copy(object[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isStringObject(object)):\r\n\t\t\t\t\tresult = new String(object);// jshint ignore:line\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isNumberObject(object)):\r\n\t\t\t\t\tresult = new Number(object);// jshint ignore:line\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isBooleanObject(object)):\r\n\t\t\t\t\tresult = new Boolean(object);// jshint ignore:line\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tresult = {};\r\n\t\t\t\t\tfor (i in object) {\r\n\t\t\t\t\t\tconst varType = typeof object[i];\r\n\r\n\t\t\t\t\t\tif (varType === \"string\" || varType === \"number\" || varType === \"boolean\" ) {\r\n\t\t\t\t\t\t\tresult[i] = object[i];\r\n\t\t\t\t\t\t} else if(isDate(object[i])){\r\n\t\t\t\t\t\t\tresult[i] = new Date(object[i]);\r\n\t\t\t\t\t\t}else if (Object.prototype.hasOwnProperty.apply(object, [i]))\r\n\t\t\t\t\t\t\tresult[i] = copy(object[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result || object;\r\n\t},\r\n\tdefined,\r\n\tisDate,\r\n\tdelay\r\n};\r\n","//returns position of html element on the page\r\nfunction elementPosition(elem) {\r\n\tvar top=0, left=0, right=0, bottom=0;\r\n\tif (elem.getBoundingClientRect) { //HTML5 method\r\n\t\tvar box = elem.getBoundingClientRect();\r\n\t\tvar body = document.body;\r\n\t\tvar docElem = (document.documentElement ||\r\n\t\t\tdocument.body.parentNode ||\r\n\t\t\tdocument.body);\r\n\r\n\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\r\n\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\r\n\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\r\n\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\r\n\t\ttop = box.top + scrollTop - clientTop;\r\n\t\tleft = box.left + scrollLeft - clientLeft;\r\n\r\n\t\tright = document.body.offsetWidth - box.right;\r\n\t\tbottom = document.body.offsetHeight - box.bottom;\r\n\t} else { //fallback to naive approach\r\n\t\twhile(elem) {\r\n\t\t\ttop = top + parseInt(elem.offsetTop,10);\r\n\t\t\tleft = left + parseInt(elem.offsetLeft,10);\r\n\t\t\telem = elem.offsetParent;\r\n\t\t}\r\n\r\n\t\tright = document.body.offsetWidth - elem.offsetWidth - left;\r\n\t\tbottom = document.body.offsetHeight - elem.offsetHeight - top;\r\n\t}\r\n\treturn { y: Math.round(top), x: Math.round(left), width:elem.offsetWidth, height:elem.offsetHeight, right: Math.round(right), bottom: Math.round(bottom) };\r\n}\r\n\r\n/*\r\nevent position relatively to DOM element\r\n */\r\nfunction getRelativeEventPosition(ev, node){\r\n\tvar d = document.documentElement;\r\n\tvar box = elementPosition(node);\r\n\r\n\treturn {\r\n\t\tx: ev.clientX + d.scrollLeft - d.clientLeft - box.x + node.scrollLeft,\r\n\t\ty: ev.clientY + d.scrollTop - d.clientTop - box.y + node.scrollTop\r\n\t};\r\n}\r\n\r\nfunction getNodePosition(elem) {\r\n\tvar top=0, left=0, right=0, bottom=0;\r\n\tif (elem.getBoundingClientRect) { //HTML5 method\r\n\t\tvar box = elem.getBoundingClientRect();\r\n\t\tvar body = document.body;\r\n\t\tvar docElem = (document.documentElement ||\r\n\t\t\tdocument.body.parentNode ||\r\n\t\t\tdocument.body);\r\n\r\n\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\r\n\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\r\n\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\r\n\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\r\n\t\ttop = box.top + scrollTop - clientTop;\r\n\t\tleft = box.left + scrollLeft - clientLeft;\r\n\r\n\t\tright = document.body.offsetWidth - box.right;\r\n\t\tbottom = document.body.offsetHeight - box.bottom;\r\n\t} else { //fallback to naive approach\r\n\t\twhile(elem) {\r\n\t\t\ttop = top + parseInt(elem.offsetTop,10);\r\n\t\t\tleft = left + parseInt(elem.offsetLeft,10);\r\n\t\t\telem = elem.offsetParent;\r\n\t\t}\r\n\r\n\t\tright = document.body.offsetWidth - elem.offsetWidth - left;\r\n\t\tbottom = document.body.offsetHeight - elem.offsetHeight - top;\r\n\t}\r\n\treturn { y: Math.round(top), x: Math.round(left), width:elem.offsetWidth, height:elem.offsetHeight, right: Math.round(right), bottom: Math.round(bottom) };\r\n}\r\n\r\nfunction getClassName(node){\r\n\tif(!node) return \"\";\r\n\r\n\tvar className = node.className || \"\";\r\n\tif(className.baseVal)//'className' exist but not a string - IE svg element in DOM\r\n\t\tclassName = className.baseVal;\r\n\r\n\tif(!className.indexOf)\r\n\t\tclassName = '';\r\n\r\n\treturn className || \"\";\r\n}\r\n\r\nfunction getTargetNode(e) {\r\n\tvar trg;\r\n\tif (e.tagName)\r\n\t\ttrg = e;\r\n\telse {\r\n\t\te = e || window.event;\r\n\t\ttrg = e.target || e.srcElement;\r\n\t\tif (trg.shadowRoot && e.composedPath) {\r\n\t\t\ttrg = e.composedPath()[0];\r\n\t\t}\r\n\t}\r\n\treturn trg;\r\n}\r\n\r\nfunction locateCss(e, classname, strict){\r\n\tif(strict === undefined)\r\n\t\tstrict = true;\r\n\r\n\tvar trg = e.target || e.srcElement;\r\n\tvar css = '';\r\n\r\n\twhile (trg){\r\n\t\tcss = getClassName(trg);\r\n\r\n\t\tif(css){\r\n\t\t\tvar ind = css.indexOf(classname);\r\n\t\t\tif (ind >= 0){\r\n\t\t\t\tif (!strict)\r\n\t\t\t\t\treturn trg;\r\n\r\n\t\t\t\t//check that we have exact match\r\n\t\t\t\tvar left = (ind === 0) || (!((css.charAt(ind - 1)||\"\").trim()));\r\n\t\t\t\tvar right = ((ind + classname.length >= css.length)) || (!((css.charAt(ind + classname.length)).trim()));\r\n\r\n\t\t\t\tif (left && right)\r\n\t\t\t\t\treturn trg;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\ttrg=trg.parentNode;\r\n\t}\r\n\treturn null;\r\n}\r\n\r\n\r\n// get focusable nodes\r\nfunction isVisible(node){\r\n\tvar display = false,\r\n\t\tvisibility = false;\r\n\tif(window.getComputedStyle){\r\n\t\tvar style = window.getComputedStyle(node, null);\r\n\t\tdisplay = style[\"display\"];\r\n\t\tvisibility = style[\"visibility\"];\r\n\t}else if(node.currentStyle){\r\n\t\tdisplay = node.currentStyle[\"display\"];\r\n\t\tvisibility = node.currentStyle[\"visibility\"];\r\n\t}\r\n\r\n\tvar hiddenSection = false;\r\n\tvar recurringSection = locateCss({target:node}, \"dhx_form_repeat\", false);\r\n\tif(recurringSection){\r\n\t\thiddenSection = !!(recurringSection.style.height == \"0px\");\r\n\t}\r\n\thiddenSection = hiddenSection || !(node.offsetHeight);\r\n\r\n\treturn (display != \"none\" && visibility != \"hidden\" && !hiddenSection);\r\n}\r\n\r\nfunction hasNonNegativeTabIndex(node){\r\n\treturn !isNaN(node.getAttribute(\"tabindex\")) && (node.getAttribute(\"tabindex\")*1 >= 0);\r\n}\r\n\r\nfunction hasHref(node){\r\n\tvar canHaveHref = {\"a\": true, \"area\": true};\r\n\tif(canHaveHref[node.nodeName.loLowerCase()]){\r\n\t\treturn !!node.getAttribute(\"href\");\r\n\t}\r\n\treturn true;\r\n}\r\n\r\nfunction isEnabled(node){\r\n\tvar canDisable = {\"input\":true, \"select\":true, \"textarea\":true, \"button\":true, \"object\":true};\r\n\tif(canDisable[node.nodeName.toLowerCase()]){\r\n\t\treturn !node.hasAttribute(\"disabled\");\r\n\t}\r\n\r\n\treturn true;\r\n}\r\n\r\n\r\nfunction getFocusableNodes(root){\r\n\tvar nodes = root.querySelectorAll([\r\n\t\t\"a[href]\",\r\n\t\t\"area[href]\",\r\n\t\t\"input\",\r\n\t\t\"select\",\r\n\t\t\"textarea\",\r\n\t\t\"button\",\r\n\t\t\"iframe\",\r\n\t\t\"object\",\r\n\t\t\"embed\",\r\n\t\t\"[tabindex]\",\r\n\t\t\"[contenteditable]\"\r\n\t].join(\", \"));\r\n\r\n\tvar nodesArray = Array.prototype.slice.call(nodes, 0);\r\n\t\r\n\tfor(var i = 0; i < nodesArray.length; i++){\r\n\t\tnodesArray[i].$position = i;\r\n\t\t// we remember original nodes order, \r\n\t\t// so when we sort them by tabindex we ensure order of nodes with same tabindex is preserved, \r\n\t\t// since some browsers do unstable sort\r\n\t}\r\n\t\r\n\tnodesArray.sort(function(a, b) {\r\n\t\tif(a.tabIndex === 0 && b.tabIndex !== 0){\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\tif(a.tabIndex !== 0 && b.tabIndex === 0){\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\t\r\n\t\tif (a.tabIndex === b.tabIndex){\r\n\t\t\t// ensure we do stable sort\r\n\t\t\treturn a.$position - b.$position;\r\n\t\t}\r\n\t\tif (a.tabIndex < b.tabIndex) {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\treturn 1;\r\n\t});\r\n\t\r\n\tfor(var i = 0; i < nodesArray.length; i++){\r\n\t\tvar node = nodesArray[i];\r\n\t\tvar isValid = (hasNonNegativeTabIndex(node) || isEnabled(node) || hasHref(node)) && isVisible(node);\r\n\t\tif(!isValid){\r\n\t\t\tnodesArray.splice(i, 1);\r\n\t\t\ti--;\r\n\t\t}\r\n\t}\r\n\treturn nodesArray;\r\n}\r\n\r\n\r\nfunction isShadowDomSupported() {\r\n\treturn document.head.createShadowRoot || document.head.attachShadow;\r\n}\r\n\r\n/**\r\n * Returns element that has the browser focus, or null if no element has focus.\r\n * Works with shadow DOM, so it's prefereed to use this function instead of document.activeElement directly.\r\n * @returns HTMLElement\r\n */\r\nfunction getActiveElement(){\r\n\tvar activeElement = document.activeElement;\r\n\tif (activeElement.shadowRoot) {\r\n\t\tactiveElement = activeElement.shadowRoot.activeElement;\r\n\t}\r\n\tif (activeElement === document.body && document.getSelection) {\r\n\t\tactiveElement = document.getSelection().focusNode || document.body;\r\n\t}\r\n\r\n\treturn activeElement;\r\n}\r\n\r\n/**\r\n * Returns document.body or the host node of the ShadowRoot, if the element is attached to ShadowDom\r\n * @param {HTMLElement} element \r\n * @returns HTMLElement\r\n */\r\nfunction getRootNode(element) {\r\n\tif (!element) {\r\n\t\treturn document.body;\r\n\t}\r\n\tif (!isShadowDomSupported()) {\r\n\t\treturn document.body;\r\n\t}\r\n\twhile (element.parentNode && (element = element.parentNode)) {\r\n\t\tif (element instanceof ShadowRoot) {\r\n\t\t\treturn element.host;\r\n\t\t}\r\n\t}\r\n\treturn document.body;\r\n}\r\n\r\nfunction hasShadowParent(element) {\r\n\treturn !!getRootNode(element);\r\n}\r\n\r\nexport default {\r\n\t/**\r\n\t * @desc: Calculate absolute position of html object\r\n\t * @type: private\r\n\t * @param: htmlObject - html object\r\n\t * @topic: 0\r\n\t */\r\n\tgetAbsoluteLeft: function getAbsoluteLeft(htmlObject){\r\n\t\treturn this.getOffset(htmlObject).left;\r\n\t},\r\n\t/**\r\n\t * @desc: Calculate absolute position of html object\r\n\t * @type: private\r\n\t * @param: htmlObject - html object\r\n\t * @topic: 0\r\n\t */\r\n\tgetAbsoluteTop: function getAbsoluteTop(htmlObject){\r\n\t\treturn this.getOffset(htmlObject).top;\r\n\t},\r\n\r\n\tgetOffsetSum: function getOffsetSum(elem) {\r\n\t\tvar top=0, left=0;\r\n\t\twhile(elem) {\r\n\t\t\ttop = top + parseInt(elem.offsetTop);\r\n\t\t\tleft = left + parseInt(elem.offsetLeft);\r\n\t\t\telem = elem.offsetParent;\r\n\t\t}\r\n\t\treturn {top: top, left: left};\r\n\t},\r\n\r\n\tgetOffsetRect: function getOffsetRect(elem) {\r\n\t\tvar box = elem.getBoundingClientRect();\r\n\r\n\t\tvar top = 0,\r\n\t\t\tleft = 0;\r\n\r\n\t\t// https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent#Mobile_Tablet_or_Desktop\r\n\t\tif (!/Mobi/.test(navigator.userAgent)) {\r\n\t\t\tvar body = document.body;\r\n\t\t\tvar docElem = document.documentElement;\r\n\t\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\r\n\t\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\r\n\t\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\r\n\t\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\r\n\r\n\t\t\ttop = box.top + scrollTop - clientTop;\r\n\t\t\tleft = box.left + scrollLeft - clientLeft;\r\n\t\t}else {\r\n\t\t\t// incorrect left coordinate on mobile zoom\r\n\t\t\t// https://bugs.chromium.org/p/chromium/issues/detail?id=489206\r\n\r\n\t\t\tvar dummy = document.createElement(\"div\");\r\n\t\t\tdummy.style.position=\"absolute\";\r\n\t\t\tdummy.style.left=\"0px\";\r\n\t\t\tdummy.style.top=\"0px\";\r\n\t\t\tdummy.style.width=\"1px\";\r\n\t\t\tdummy.style.height = \"1px\";\r\n\r\n\t\t\tdocument.body.appendChild(dummy);\r\n\t\t\tvar dummyBox = dummy.getBoundingClientRect();\r\n\t\t\ttop = box.top - dummyBox.top;\r\n\t\t\tleft = box.left - dummyBox.left;\r\n\r\n\t\t\tdummy.parentNode.removeChild(dummy);\r\n\t\t}\r\n\r\n\t\treturn { top: Math.round(top), left: Math.round(left) };\r\n\t},\r\n\r\n\tgetOffset: function getOffset(elem) {\r\n\t\tif (elem.getBoundingClientRect) {\r\n\t\t\treturn this.getOffsetRect(elem);\r\n\t\t} else {\r\n\t\t\treturn this.getOffsetSum(elem);\r\n\t\t}\r\n\t},\r\n\r\n\tclosest: function(element, selector){\r\n\t\tif(!element || !selector){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn closest(element, selector);\r\n\t},\r\n\tinsertAfter: function(newNode, referenceNode){\r\n\t\tif(referenceNode.nextSibling){\r\n\t\t\treferenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);\r\n\t\t}else{\r\n\t\t\treferenceNode.parentNode.appendChild(newNode);\r\n\t\t}\r\n\t},\r\n\tremove: function(node) {\r\n\t\tif (node && node.parentNode) {\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t}\r\n\t},\r\n\tisChildOf: function(child, parent) {\r\n\t\treturn parent.contains(child);\r\n\t},\r\n\tgetFocusableNodes,\r\n\tgetClassName,\r\n\tlocateCss,\r\n\tgetRootNode,\r\n\thasShadowParent,\r\n\tisShadowDomSupported,\r\n\tgetActiveElement,\r\n\tgetRelativeEventPosition,\r\n\tgetTargetNode,\r\n\tgetNodePosition\r\n};\r\n\r\nvar closest;\r\nif(Element.prototype.closest){\r\n\tclosest = function(element, selector){\r\n\t\treturn element.closest(selector);\r\n\t};\r\n}else{\r\n\tvar matches = Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\r\n\tclosest = function(element, selector) {\r\n\t\tvar el = element;\r\n\t\tdo {\r\n\t\t\tif (matches.call(el, selector)){\r\n\t\t\t\treturn el;\r\n\t\t\t}\r\n\t\t\tel = el.parentElement || el.parentNode;\r\n\t\t} while (el !== null && el.nodeType === 1);\r\n\t\treturn null;\r\n\t};\r\n}\r\n","/* eslint-disable no-restricted-globals */\r\nvar isWindowAwailable = typeof window !== \"undefined\";\r\n\r\n/* eslint-enable no-restricted-globals */\r\n\r\nexport default {\r\n\tisIE: isWindowAwailable && (navigator.userAgent.indexOf(\"MSIE\") >= 0 || navigator.userAgent.indexOf(\"Trident\") >= 0),\r\n\tisOpera: isWindowAwailable && (navigator.userAgent.indexOf(\"Opera\") >= 0),\r\n\tisChrome: isWindowAwailable && (navigator.userAgent.indexOf(\"Chrome\") >= 0),\r\n\tisKHTML: isWindowAwailable && (navigator.userAgent.indexOf(\"Safari\") >= 0 || navigator.userAgent.indexOf(\"Konqueror\") >= 0),\r\n\tisFF: isWindowAwailable && (navigator.userAgent.indexOf(\"Firefox\") >= 0),\r\n\tisIPad: isWindowAwailable && (navigator.userAgent.search(/iPad/gi) >= 0),\r\n\tisEdge: isWindowAwailable && (navigator.userAgent.indexOf(\"Edge\")!=-1),\r\n\tisNode: (!isWindowAwailable || typeof navigator == \"undefined\")\r\n};","export default function(data) {\r\n\tif (typeof data === \"string\" || typeof data === \"number\") {\r\n\t\treturn data;\r\n\t}\r\n\tvar result = \"\";\r\n\tfor (var key in data) {\r\n\t\tvar serialized = \"\";\r\n\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\tif (typeof data[key] === \"string\") {\r\n\t\t\t\tserialized = encodeURIComponent(data[key]);\r\n\t\t\t} else if (typeof data[key] === \"number\") {\r\n\t\t\t\tserialized = data[key];\r\n\t\t\t} else {\r\n\t\t\t\tserialized = encodeURIComponent(JSON.stringify(data[key]));\r\n\t\t\t}\r\n\t\t\tserialized = key + \"=\" + serialized;\r\n\r\n\t\t\tif (result.length) {\r\n\t\t\t\tserialized = \"&\" + serialized;\r\n\t\t\t}\r\n\t\t\tresult += serialized;\r\n\t\t}\r\n\t}\r\n\treturn result;\r\n}","export default function extend(scheduler) {\r\n\r\nvar generateStringToDate = function (format, utc) {\r\n\tvar splt = \"var temp=date.match(/[a-zA-Z]+|[0-9]+/g);\";\r\n\tvar mask = format.match(/%[a-zA-Z]/g);\r\n\tfor (var i = 0; i < mask.length; i++) {\r\n\t\tswitch (mask[i]) {\r\n\t\t\tcase \"%j\":\r\n\t\t\tcase \"%d\": splt += \"set[2]=temp[\" + i + \"]||1;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%n\":\r\n\t\t\tcase \"%m\": splt += \"set[1]=(temp[\" + i + \"]||1)-1;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%y\": splt += \"set[0]=temp[\" + i + \"]*1+(temp[\" + i + \"]>50?1900:2000);\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%g\":\r\n\t\t\tcase \"%G\":\r\n\t\t\tcase \"%h\":\r\n\t\t\tcase \"%H\":\r\n\t\t\t\tsplt += \"set[3]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%i\":\r\n\t\t\t\tsplt += \"set[4]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%Y\": splt += \"set[0]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%a\":\r\n\t\t\tcase \"%A\": splt += \"set[3]=set[3]%12+((temp[\" + i + \"]||'').toLowerCase()=='am'?0:12);\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%s\": splt += \"set[5]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%M\": splt += \"set[1]=this.locale.date.month_short_hash[temp[\" + i + \"]]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%F\": splt += \"set[1]=this.locale.date.month_full_hash[temp[\" + i + \"]]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\tvar code = \"set[0],set[1],set[2],set[3],set[4],set[5]\";\r\n\tif (utc) code = \" Date.UTC(\" + code + \")\";\r\n\treturn new Function(\"date\", \"var set=[0,0,1,0,0,0]; \" + splt + \" return new Date(\" + code + \");\");\r\n};\r\nvar csp_date_to_str = function (format, utc) {\r\n\treturn function(date) {\r\n\t\treturn format.replace(/%[a-zA-Z]/g, function (a) {\r\n\t\t\tswitch (a) {\r\n\t\t\t\tcase \"%d\": return utc ? scheduler.date.to_fixed(date.getUTCDate()) : scheduler.date.to_fixed(date.getDate());\r\n\t\t\t\tcase \"%m\": return utc ? scheduler.date.to_fixed((date.getUTCMonth() + 1)) : scheduler.date.to_fixed((date.getMonth() + 1));\r\n\t\t\t\tcase \"%j\": return utc ? date.getUTCDate() : date.getDate();\r\n\t\t\t\tcase \"%n\": return utc ? (date.getUTCMonth() + 1) : (date.getMonth() + 1);\r\n\t\t\t\tcase \"%y\": return utc ? scheduler.date.to_fixed(date.getUTCFullYear() % 100) : scheduler.date.to_fixed(date.getFullYear() % 100);\r\n\t\t\t\tcase \"%Y\": return utc ? date.getUTCFullYear() : date.getFullYear();\r\n\t\t\t\tcase \"%D\": return utc ? scheduler.locale.date.day_short[date.getUTCDay()] : scheduler.locale.date.day_short[date.getDay()];\r\n\t\t\t\tcase \"%l\": return utc ? scheduler.locale.date.day_full[date.getUTCDay()] : scheduler.locale.date.day_full[date.getDay()];\r\n\t\t\t\tcase \"%M\": return utc ? scheduler.locale.date.month_short[date.getUTCMonth()] : scheduler.locale.date.month_short[date.getMonth()];\r\n\t\t\t\tcase \"%F\": return utc ? scheduler.locale.date.month_full[date.getUTCMonth()] : scheduler.locale.date.month_full[date.getMonth()];\r\n\t\t\t\tcase \"%h\": return utc ? scheduler.date.to_fixed((date.getUTCHours() + 11) % 12 + 1) : scheduler.date.to_fixed((date.getHours() + 11) % 12 + 1);\r\n\t\t\t\tcase \"%g\": return utc ? ((date.getUTCHours() + 11) % 12 + 1) : ((date.getHours() + 11) % 12 + 1);\r\n\t\t\t\tcase \"%G\": return utc ? date.getUTCHours() : date.getHours();\r\n\t\t\t\tcase \"%H\": return utc ? scheduler.date.to_fixed(date.getUTCHours()) : scheduler.date.to_fixed(date.getHours());\r\n\t\t\t\tcase \"%i\": return utc ? scheduler.date.to_fixed(date.getUTCMinutes()) : scheduler.date.to_fixed(date.getMinutes());\r\n\t\t\t\tcase \"%a\": return utc ? (date.getUTCHours() > 11 ? \"pm\" : \"am\") : (date.getHours() > 11 ? \"pm\" : \"am\");\r\n\t\t\t\tcase \"%A\": return utc ? (date.getUTCHours() > 11 ? \"PM\" : \"AM\") : (date.getHours() > 11 ? \"PM\" : \"AM\");\r\n\t\t\t\tcase \"%s\": return utc ? scheduler.date.to_fixed(date.getUTCSeconds()) : scheduler.date.to_fixed(date.getSeconds());\r\n\t\t\t\tcase \"%W\": return utc ? scheduler.date.to_fixed(scheduler.date.getUTCISOWeek(date)) : scheduler.date.to_fixed(scheduler.date.getISOWeek(date));\r\n\t\t\t\tdefault: return a;\r\n\t\t\t}\r\n\t\t});\r\n\t};\r\n};\r\nvar csp_str_to_date = function (format, utc) {\r\n\tconst mask = format.match(/%[a-zA-Z]/g);\r\n\treturn function (date){\r\n\t\tvar set = [0, 0, 1, 0, 0, 0];\r\n\t\tvar temp = date.match(/[a-zA-Z]+|[0-9]+/g);\r\n\r\n\t\tfor (var i = 0; i < mask.length; i++) {\r\n\t\t\tswitch (mask[i]) {\r\n\t\t\t\tcase \"%j\":\r\n\t\t\t\tcase \"%d\":\r\n\t\t\t\t\tset[2] = temp[i] || 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%n\":\r\n\t\t\t\tcase \"%m\":\r\n\t\t\t\t\tset[1] = (temp[i] || 1) - 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%y\":\r\n\t\t\t\t\tset[0] = temp[i] * 1 + (temp[i] > 50 ? 1900 : 2000);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%g\":\r\n\t\t\t\tcase \"%G\":\r\n\t\t\t\tcase \"%h\":\r\n\t\t\t\tcase \"%H\":\r\n\t\t\t\t\tset[3] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%i\":\r\n\t\t\t\t\tset[4] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\tset[0] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%a\":\r\n\t\t\t\tcase \"%A\":\r\n\t\t\t\t\tset[3] = set[3] % 12 + ((temp[i] || '').toLowerCase() == 'am' ? 0 : 12);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%s\":\r\n\t\t\t\t\tset[5] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%M\":\r\n\t\t\t\t\tset[1] = scheduler.locale.date.month_short_hash[temp[i]] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%F\":\r\n\t\t\t\t\tset[1] = scheduler.locale.date.month_full_hash[temp[i]] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (utc) {\r\n\t\t\treturn new Date(Date.UTC(set[0], set[1], set[2], set[3], set[4], set[5]));\r\n\t\t}\r\n\r\n\t\treturn new Date(set[0], set[1], set[2], set[3], set[4], set[5]);\r\n\t};\r\n};\r\n\r\nlet cspEnabled = undefined;\r\nfunction checkIfCSPEnabled(){\r\n\ttry {\r\n\t\tnew Function(\"cspEnabled = false;\");\r\n\t\tcspEnabled = false;\r\n\t} catch(e) {\r\n\t\tcspEnabled = true;\r\n\t}\r\n\treturn cspEnabled;\r\n}\r\n\r\nfunction useCsp() {\r\n\tvar result = false;\r\n\tif (scheduler.config.csp === \"auto\") {\r\n\t\tif(cspEnabled === undefined){\r\n\t\t\tcspEnabled = checkIfCSPEnabled();\r\n\t\t}\r\n\t\tresult = cspEnabled;\r\n\t} else {\r\n\t\tresult = scheduler.config.csp;\r\n\t}\r\n\treturn result;\r\n}\r\nscheduler.date = {\r\n\tinit:function(){\r\n\t\tvar s = scheduler.locale.date.month_short;\r\n\t\tvar t = scheduler.locale.date.month_short_hash = {};\r\n\t\tfor (var i = 0; i < s.length; i++)\r\n\t\t\tt[s[i]]=i;\r\n\r\n\t\tvar s = scheduler.locale.date.month_full;\r\n\t\tvar t = scheduler.locale.date.month_full_hash = {};\r\n\t\tfor (var i = 0; i < s.length; i++)\r\n\t\t\tt[s[i]]=i;\r\n\t},\r\n\tdate_part:function(date){\r\n\t\tvar old = new Date(date);\r\n\t\tdate.setHours(0);\r\n\t\tdate.setMinutes(0);\r\n\t\tdate.setSeconds(0);\r\n\t\tdate.setMilliseconds(0);\r\n\t\tif (date.getHours() && //shift to yesterday on dst\r\n\t\t\t(date.getDate() < old.getDate() || date.getMonth() < old.getMonth() || date.getFullYear() < old.getFullYear()) )\r\n\t\t\tdate.setTime(date.getTime() + 60 * 60 * 1000 * (24 - date.getHours()));\r\n\t\treturn date;\r\n\t},\r\n\ttime_part:function(date){\r\n\t\treturn (date.valueOf()/1000 - date.getTimezoneOffset()*60)%86400;\r\n\t},\r\n\tweek_start:function(date){\r\n\t\tvar shift=date.getDay();\r\n\t\tif (scheduler.config.start_on_monday){\r\n\t\t\tif (shift===0) shift=6;\r\n\t\t\telse shift--;\r\n\t\t}\r\n\t\treturn this.date_part(this.add(date,-1*shift,\"day\"));\r\n\t},\r\n\tmonth_start:function(date){\r\n\t\tdate.setDate(1);\r\n\t\treturn this.date_part(date);\r\n\t},\r\n\tyear_start:function(date){\r\n\t\tdate.setMonth(0);\r\n\t\treturn this.month_start(date);\r\n\t},\r\n\tday_start:function(date){\r\n\t\treturn this.date_part(date);\r\n\t},\r\n\t_add_days:function(date, inc){\r\n\t\tvar ndate = new Date(date.valueOf());\r\n\r\n\t\tndate.setDate(ndate.getDate() + inc);\r\n\r\n\t\t// Workaround for Safari/iOS timezone bug, ref:OKZ-149693\r\n\t\tif(inc == Math.round(inc) && inc > 0){\r\n\t\t\tvar datesDiff = +ndate - +date,\r\n\t\t\t\trest = datesDiff % (24*60*60*1000);\r\n\t\t\tif(rest && date.getTimezoneOffset() == ndate.getTimezoneOffset()){\r\n\t\t\t\tvar hours = rest / (60* 60 * 1000);\r\n\t\t\t\tndate.setTime(ndate.getTime() + (24 - hours) * 60 * 60 * 1000);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (inc >= 0 && (!date.getHours() && ndate.getHours()) &&//shift to yesterday on dst\r\n\t\t\t(ndate.getDate() < date.getDate() || ndate.getMonth() < date.getMonth() || ndate.getFullYear() < date.getFullYear()) )\r\n\t\t\tndate.setTime(ndate.getTime() + 60 * 60 * 1000 * (24 - ndate.getHours()));\r\n\t\treturn ndate;\r\n\t},\r\n\tadd:function(date,inc,mode){\r\n\t\tvar ndate=new Date(date.valueOf());\r\n\t\tswitch(mode){\r\n\t\t\tcase \"day\":\r\n\t\t\t\tndate = scheduler.date._add_days(ndate, inc);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"week\":\r\n\t\t\t\tndate = scheduler.date._add_days(ndate, inc * 7);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"month\": ndate.setMonth(ndate.getMonth()+inc); break;\r\n\t\t\tcase \"year\": ndate.setYear(ndate.getFullYear()+inc); break;\r\n\t\t\tcase \"hour\":\r\n\t\t\t\t/*\r\n\t\t\t\t setHour(getHour() + inc) and setMinutes gives weird result when is applied on a Daylight Saving time switch\r\n\t\t\t\t setTime seems working as expected\r\n\t\t\t\t*/\r\n\t\t\t\tndate.setTime(ndate.getTime() + inc * 60 * 60 * 1000);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"minute\":\r\n\t\t\t\tndate.setTime(ndate.getTime() + inc * 60 * 1000);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\treturn scheduler.date[\"add_\"+mode](date,inc,mode);\r\n\t\t}\r\n\t\treturn ndate;\r\n\t},\r\n\tto_fixed:function(num){\r\n\t\tif (num<10)\treturn \"0\"+num;\r\n\t\treturn num;\r\n\t},\r\n\tcopy:function(date){\r\n\t\treturn new Date(date.valueOf());\r\n\t},\r\n\tdate_to_str:function(format,utc){\r\n\t\tif (useCsp()) {\r\n\t\t\treturn csp_date_to_str(format,utc);\r\n\t\t}\r\n\r\n\t\tformat=format.replace(/%[a-zA-Z]/g,function(a){\r\n\t\t\tswitch(a){\r\n\t\t\t\tcase \"%d\": return \"\\\"+this.date.to_fixed(date.getDate())+\\\"\";\r\n\t\t\t\tcase \"%m\": return \"\\\"+this.date.to_fixed((date.getMonth()+1))+\\\"\";\r\n\t\t\t\tcase \"%j\": return \"\\\"+date.getDate()+\\\"\";\r\n\t\t\t\tcase \"%n\": return \"\\\"+(date.getMonth()+1)+\\\"\";\r\n\t\t\t\tcase \"%y\": return \"\\\"+this.date.to_fixed(date.getFullYear()%100)+\\\"\";\r\n\t\t\t\tcase \"%Y\": return \"\\\"+date.getFullYear()+\\\"\";\r\n\t\t\t\tcase \"%D\": return \"\\\"+this.locale.date.day_short[date.getDay()]+\\\"\";\r\n\t\t\t\tcase \"%l\": return \"\\\"+this.locale.date.day_full[date.getDay()]+\\\"\";\r\n\t\t\t\tcase \"%M\": return \"\\\"+this.locale.date.month_short[date.getMonth()]+\\\"\";\r\n\t\t\t\tcase \"%F\": return \"\\\"+this.locale.date.month_full[date.getMonth()]+\\\"\";\r\n\t\t\t\tcase \"%h\": return \"\\\"+this.date.to_fixed((date.getHours()+11)%12+1)+\\\"\";\r\n\t\t\t\tcase \"%g\": return \"\\\"+((date.getHours()+11)%12+1)+\\\"\";\r\n\t\t\t\tcase \"%G\": return \"\\\"+date.getHours()+\\\"\";\r\n\t\t\t\tcase \"%H\": return \"\\\"+this.date.to_fixed(date.getHours())+\\\"\";\r\n\t\t\t\tcase \"%i\": return \"\\\"+this.date.to_fixed(date.getMinutes())+\\\"\";\r\n\t\t\t\tcase \"%a\": return \"\\\"+(date.getHours()>11?\\\"pm\\\":\\\"am\\\")+\\\"\";\r\n\t\t\t\tcase \"%A\": return \"\\\"+(date.getHours()>11?\\\"PM\\\":\\\"AM\\\")+\\\"\";\r\n\t\t\t\tcase \"%s\": return \"\\\"+this.date.to_fixed(date.getSeconds())+\\\"\";\r\n\t\t\t\tcase \"%W\": return \"\\\"+this.date.to_fixed(this.date.getISOWeek(date))+\\\"\";\r\n\t\t\t\tdefault: return a;\r\n\t\t\t}\r\n\t\t});\r\n\t\tif (utc) format=format.replace(/date\\.get/g,\"date.getUTC\");\r\n\t\tvar func = new Function(\"date\",\"return \\\"\"+format+\"\\\";\");\r\n\r\n\t\treturn func.bind(scheduler);\r\n\t},\r\n\tstr_to_date:function(format, utc, exactFormat){\r\n\t\tvar stringToDateMethod = useCsp() ? csp_str_to_date : generateStringToDate;\r\n\t\tvar parseExactFormat = stringToDateMethod(format, utc);\r\n\t\t// eslint-disable-next-line\r\n\t\tvar yyyyMMddhhIIss = /^[0-9]{4}(\\-|\\/)[0-9]{2}(\\-|\\/)[0-9]{2} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/;\r\n\r\n\t\t// MM/dd/yyyy - default old format for xml-date\r\n\t\t// eslint-disable-next-line\r\n\t\tvar MMddyyyyhhIIss = /^[0-9]{2}\\/[0-9]{2}\\/[0-9]{4} ?(([0-9]{1,2}:[0-9]{2})(:[0-9]{1,2})?)?$/;\r\n\t\t// dd-MM-yyyy - default old format for api-date\r\n\t\t// eslint-disable-next-line\r\n\t\tvar ddMMyyyyhhIIss = /^[0-9]{2}\\-[0-9]{2}\\-[0-9]{4} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/;\r\n\t\t// eslint-disable-next-line\r\n\t\tvar ISO8601 = /^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$/;\r\n\r\n\t\tvar isYMDDate = function (datestr) {\r\n\t\t\treturn yyyyMMddhhIIss.test(String(datestr));\r\n\t\t};\r\n\r\n\t\tvar isMDYDate = function (datestr) {\r\n\t\t\treturn MMddyyyyhhIIss.test(String(datestr));\r\n\t\t};\r\n\t\tvar isDMYDate = function (datestr) {\r\n\t\t\treturn ddMMyyyyhhIIss.test(String(datestr));\r\n\t\t};\r\n\t\tvar isISO8601 = function (datestr) {\r\n\t\t\treturn ISO8601.test(datestr);\r\n\t\t};\r\n\r\n\t\tvar parseYMD = stringToDateMethod(\"%Y-%m-%d %H:%i:%s\", utc);\r\n\t\tvar parseMDY = stringToDateMethod(\"%m/%d/%Y %H:%i:%s\", utc);\r\n\t\tvar parseDMY = stringToDateMethod(\"%d-%m-%Y %H:%i:%s\", utc);\r\n\r\n\t\treturn function (dateString) {\r\n\r\n\t\t\tif (!exactFormat && !scheduler.config.parse_exact_format) {\r\n\t\t\t\tif (dateString && dateString.getISOWeek) {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t} else if (typeof dateString === \"number\") {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t} else if (isYMDDate(dateString)) {\r\n\t\t\t\t\treturn parseYMD(dateString);\r\n\t\t\t\t} else if (isMDYDate(dateString)) {\r\n\t\t\t\t\treturn parseMDY(dateString);\r\n\t\t\t\t} else if (isDMYDate(dateString)) {\r\n\t\t\t\t\treturn parseDMY(dateString);\r\n\t\t\t\t} else if (isISO8601(dateString)) {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn parseExactFormat.call(scheduler, dateString);\r\n\t\t};\r\n\t},\r\n\tgetISOWeek: function(ndate) {\r\n\t\tif(!ndate) return false;\r\n\t\tndate = this.date_part(new Date(ndate));\r\n\t\tvar nday = ndate.getDay();\r\n\t\tif (nday === 0) {\r\n\t\t\tnday = 7;\r\n\t\t}\r\n\t\tvar first_thursday = new Date(ndate.valueOf());\r\n\t\tfirst_thursday.setDate(ndate.getDate() + (4 - nday));\r\n\t\tvar year_number = first_thursday.getFullYear(); // year of the first Thursday\r\n\t\tvar ordinal_date = Math.round( (first_thursday.getTime() - new Date(year_number, 0, 1).getTime()) / 86400000); //ordinal date of the first Thursday - 1 (so not really ordinal date)\r\n\t\tvar week_number = 1 + Math.floor( ordinal_date / 7);\r\n\t\treturn week_number;\r\n\t},\r\n\tgetUTCISOWeek: function(ndate){\r\n\t\treturn this.getISOWeek(this.convert_to_utc(ndate));\r\n\t},\r\n\tconvert_to_utc: function(date) {\r\n\t\treturn new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds());\r\n\t}\r\n};\r\n\r\n}\r\n\r\n","export default function(scheduler){\r\n\treturn (function(){\r\n\t\tvar res = {};\r\n\t\tfor (var a in this._events){\r\n\t\t\tvar ev = this._events[a];\r\n\t\t\tif (ev.id.toString().indexOf(\"#\") == -1){\r\n\t\t\t\tres[ev.id] = ev;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn res;\r\n\t}).bind(scheduler);\r\n}","import xmlLoaded from \"./loaders/xml\";\r\nimport jsonLoader from \"./loaders/json\";\r\nimport iCalLoader from \"./loaders/ical\";\r\nimport createSerializator from \"../core/common/get_serializable_events\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler._loaded = {};\r\nscheduler._load = function(url, from) {\r\n\turl = url || this._load_url;\r\n\r\n\tif(!url){\r\n\t\t//if scheduler.setLoadMode is called before scheduler.init, initial rendering will invoke data loading while url is undefined\r\n\t\treturn;\r\n\t}\r\n\r\n\turl += (url.indexOf(\"?\") == -1 ? \"?\" : \"&\") + \"timeshift=\" + (new Date()).getTimezoneOffset();\r\n\tif (this.config.prevent_cache) url += \"&uid=\" + this.uid();\r\n\tvar to;\r\n\tfrom = from || this._date;\r\n\tfunction ajaxCallback(response) {\r\n\t\tscheduler.on_load(response);\r\n\t\tscheduler.callEvent(\"onLoadEnd\", []);\r\n\t}\r\n\tif (this._load_mode) {\r\n\t\tvar lf = this.templates.load_format;\r\n\r\n\t\tfrom = this.date[this._load_mode + \"_start\"](new Date(from.valueOf()));\r\n\t\twhile (from > this._min_date) from = this.date.add(from, -1, this._load_mode);\r\n\t\tto = from;\r\n\r\n\t\tvar cache_line = true;\r\n\t\twhile (to < this._max_date) {\r\n\t\t\tto = this.date.add(to, 1, this._load_mode);\r\n\t\t\tif (this._loaded[lf(from)] && cache_line)\r\n\t\t\t\tfrom = this.date.add(from, 1, this._load_mode); else cache_line = false;\r\n\t\t}\r\n\r\n\t\tvar temp_to = to;\r\n\t\tdo {\r\n\t\t\tto = temp_to;\r\n\t\t\ttemp_to = this.date.add(to, -1, this._load_mode);\r\n\t\t} while (temp_to > from && this._loaded[lf(temp_to)]);\r\n\r\n\t\tif (to <= from)\r\n\t\t\treturn false; //already loaded\r\n\r\n\t\tscheduler.ajax.get(url + \"&from=\" + lf(from) + \"&to=\" + lf(to), ajaxCallback);\r\n\r\n\t\twhile (from < to) {\r\n\t\t\tthis._loaded[lf(from)] = true;\r\n\t\t\tfrom = this.date.add(from, 1, this._load_mode);\r\n\t\t}\r\n\t} else {\r\n\t\tscheduler.ajax.get(url, ajaxCallback);\r\n\t}\r\n\r\n\t// TODO: remove onXLS\r\n\tthis.callEvent(\"onXLS\", []);\r\n\tthis.callEvent(\"onLoadStart\", []);\r\n\treturn true;\r\n};\r\n\r\nscheduler._parsers = {};\r\n\r\n\r\nxmlLoaded(scheduler);\r\njsonLoader(scheduler);\r\niCalLoader(scheduler);\r\n\r\nscheduler.on_load = function (loader) {\r\n\tthis.callEvent(\"onBeforeParse\", []);\r\n\r\n\tvar evs;\r\n\tvar error = false;\r\n\r\n\tvar foundParser = false;\r\n\tfor(var i in this._parsers){\r\n\t\tvar parser = this._parsers[i];\r\n\t\tif(parser.canParse(loader.xmlDoc.responseText, loader.xmlDoc)){\r\n\t\t\ttry{\r\n\t\t\t\tvar param = loader.xmlDoc.responseText;\r\n\t\t\t\tif(i === \"xml\"){\r\n\t\t\t\t\tparam = loader;\r\n\t\t\t\t}\r\n\t\t\t\tevs = parser.parse(param);\r\n\t\t\t\tif(!evs){\r\n\t\t\t\t\terror = true;\r\n\t\t\t\t}\r\n\t\t\t}catch(e){\r\n\t\t\t\terror = true;\r\n\t\t\t}\r\n\t\t\tfoundParser = true;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tif(!foundParser){\r\n\t\tif(this._process && this[this._process]){\r\n\t\t\ttry{\r\n\t\t\t\tevs = this[this._process].parse(loader.xmlDoc.responseText);\r\n\t\t\t}catch (e){\r\n\t\t\t\terror = true;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\terror = true;\r\n\t\t}\r\n\t}\r\n\r\n\tif(error || (loader.xmlDoc.status && loader.xmlDoc.status >= 400)){\r\n\t\tthis.callEvent(\"onLoadError\", [loader.xmlDoc]);\r\n\t\tevs = [];\r\n\t}\r\n\r\n\tthis._process_loading(evs);\r\n\r\n\t// TODO: remove onXLE\r\n\tthis.callEvent(\"onXLE\", []);\r\n\tthis.callEvent(\"onParse\", []);\r\n};\r\nscheduler._process_loading = function(evs) {\r\n\tthis._loading = true;\r\n\tthis._not_render = true;\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tif (!this.callEvent(\"onEventLoading\", [evs[i]])) continue;\r\n\t\tthis.addEvent(evs[i]);\r\n\t}\r\n\tthis._not_render = false;\r\n\tif (this._render_wait) this.render_view_data();\r\n\r\n\tthis._loading = false;\r\n\tif (this._after_call) this._after_call();\r\n\tthis._after_call = null;\r\n};\r\nscheduler._init_event = function(event) {\r\n\tevent.text = (event.text || event._tagvalue) || \"\";\r\n\tevent.start_date = scheduler._init_date(event.start_date);\r\n\tevent.end_date = scheduler._init_date(event.end_date);\r\n};\r\n\r\nscheduler._init_date = function(date){\r\n\tif(!date)\r\n\t\treturn null;\r\n\tif (typeof date == \"string\") {\r\n\t\treturn scheduler._helpers.parseDate(date);\r\n\t}\r\n\telse return new Date(date);\r\n};\r\n\r\nconst getSerializableData = createSerializator(scheduler);\r\nscheduler.serialize = function(){\r\n\tconst dataset = [];\r\n\tconst allEvents = getSerializableData();\r\n\tfor (var a in allEvents){\r\n\t\t\r\n\t\tconst exportedEvent = {};\r\n\t\tvar ev = allEvents[a];\r\n\r\n\t\tfor(var key in ev){\r\n\t\t\tif (key.charAt(0) == \"$\" || key.charAt(0) == \"_\"){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tlet exportValue;\r\n\t\t\tconst rawValue = ev[key];\r\n\t\t\tif(scheduler.utils.isDate(rawValue)){\r\n\t\t\t\texportValue = scheduler.defined(scheduler.templates.xml_format) ? scheduler.templates.xml_format(rawValue) : scheduler.templates.format_date(rawValue);\r\n\t\t\t}else{\r\n\t\t\t\texportValue = rawValue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\texportedEvent[key] = exportValue;\r\n\t\t}\r\n\r\n\t\tdataset.push(exportedEvent);\r\n\t}\r\n\treturn dataset;\r\n};\r\n\r\n/*\r\nscheduler.json = {};\r\nscheduler.json.parse = function(data) {\r\n\r\n\tvar events = [];\r\n\r\n\tif (typeof data == \"string\") {\r\n\t\tdata = JSON.parse(data);\r\n\t}\r\n\tif (Object.prototype.toString.call(data) === '[object Array]') {\r\n\t\tevents = data;\r\n\t} else {\r\n\t\tif(data){\r\n\t\t\tif(data.events){\r\n\t\t\t\tevents = data.events;\r\n\t\t\t}else if(data.data){\r\n\t\t\t\tevents = data.data;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tevents = events || [];\r\n\r\n\tif (data.dhx_security) {\r\n\t\tif (window.dhtmlx) {\r\n\t\t\twindow.dhtmlx.security_key = data.dhx_security;\r\n\t\t}\r\n\t\tscheduler.security_key = data.dhx_security;\r\n\t}\r\n\r\n\tvar collections = (data && data.collections) ? data.collections : {};\r\n\tvar collections_loaded = false;\r\n\tfor (var key in collections) {\r\n\t\tif (collections.hasOwnProperty(key)) {\r\n\t\t\tcollections_loaded = true;\r\n\t\t\tvar collection = collections[key];\r\n\t\t\tvar arr = scheduler.serverList[key];\r\n\t\t\tif (!arr) {\r\n\t\t\t\tscheduler.serverList[key] = arr = [];\r\n\t\t\t}\r\n\t\t\tarr.splice(0, arr.length); //clear old options\r\n\t\t\tfor (var j = 0; j < collection.length; j++) {\r\n\t\t\t\tvar option = collection[j];\r\n\t\t\t\tvar obj = { key: option.value, label: option.label }; // resulting option object\r\n\t\t\t\tfor (var option_key in option) {\r\n\t\t\t\t\tif (option.hasOwnProperty(option_key)) {\r\n\t\t\t\t\t\tif (option_key == \"value\" || option_key == \"label\")\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\tobj[option_key] = option[option_key]; // obj['value'] = option['value']\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tarr.push(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (collections_loaded)\r\n\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\r\n\tvar evs = [];\r\n\tfor (var i = 0; i < events.length; i++) {\r\n\t\tvar event = events[i];\r\n\t\tscheduler._init_event(event);\r\n\t\tevs.push(event);\r\n\t}\r\n\treturn evs;\r\n};*/\r\nscheduler.parse = function(data, type) {\r\n\tthis._process = type;\r\n\tthis.on_load({xmlDoc: {responseText: data}});\r\n};\r\nscheduler.load = function(url, call) {\r\n\tif (typeof call == \"string\") {\r\n\t\tthis._process = call;\r\n\t\tcall = arguments[2];\r\n\t}\r\n\r\n\tthis._load_url = url;\r\n\tthis._after_call = call;\r\n\tthis._load(url, this._date);\r\n};\r\n//possible values - day,week,month,year,all\r\nscheduler.setLoadMode = function(mode) {\r\n\tif (mode == \"all\") mode = \"\";\r\n\tthis._load_mode = mode;\r\n};\r\n\r\nscheduler.serverList = function(name, array) {\r\n\tif (array) {\r\n\t\tthis.serverList[name] = array.slice(0);\r\n\t\treturn this.serverList[name];\r\n\t}\r\n\tthis.serverList[name] = (this.serverList[name] || []);\r\n\treturn this.serverList[name];\r\n};\r\nscheduler._userdata = {};\r\n\r\nscheduler._xmlNodeToJSON = function(node) {\r\n\tvar t = {};\r\n\tfor (var i = 0; i < node.attributes.length; i++)\r\n\t\tt[node.attributes[i].name] = node.attributes[i].value;\r\n\r\n\tfor (var i = 0; i < node.childNodes.length; i++) {\r\n\t\tvar child = node.childNodes[i];\r\n\t\tif (child.nodeType == 1)\r\n\t\t\tt[child.tagName] = child.firstChild ? child.firstChild.nodeValue : \"\";\r\n\t}\r\n\r\n\tif (!t.text) t.text = node.firstChild ? node.firstChild.nodeValue : \"\";\r\n\r\n\treturn t;\r\n};\r\nscheduler.attachEvent(\"onXLS\", function() {\r\n\tif (this.config.show_loading === true) {\r\n\t\tvar t;\r\n\t\tt = this.config.show_loading = document.createElement(\"div\");\r\n\t\tt.className = 'dhx_loading';\r\n\t\tt.style.left = Math.round((this._x - 128) / 2) + \"px\";\r\n\t\tt.style.top = Math.round((this._y - 15) / 2) + \"px\";\r\n\t\tthis._obj.appendChild(t);\r\n\t}\r\n});\r\nscheduler.attachEvent(\"onXLE\", function() {\r\n\tvar t = this.config.show_loading;\r\n\tif (t && typeof t == \"object\") {\r\n\t\tif(t.parentNode) {\r\n\t\t\tt.parentNode.removeChild(t);\r\n\t\t}\r\n\t\tthis.config.show_loading = true;\r\n\t}\r\n});\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._parsers.xml = {\r\n\tcanParse: function(data, xhr){\r\n\t\t// IE returns non-empty responseXML type regardless of actual data type\r\n\t\tif(xhr.responseXML && xhr.responseXML.firstChild){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\ttry{\r\n\t\t\tvar xmlDoc = scheduler.ajax.parse(xhr.responseText);\r\n\t\t\tvar topElement = scheduler.ajax.xmltop(\"data\", xmlDoc);\r\n\t\t\tif(topElement && topElement.tagName === \"data\"){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}catch (e){\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\tparse: function(loader) {\r\n\t\tvar xml;\r\n\r\n\t\tif (!loader.xmlDoc.responseXML) { //from a string\r\n\t\t\tloader.xmlDoc.responseXML = scheduler.ajax.parse(loader.xmlDoc.responseText);\r\n\t\t}\r\n\t\r\n\t\txml = scheduler.ajax.xmltop(\"data\", loader.xmlDoc);\r\n\t\tif (xml.tagName != \"data\") return null;//not an xml\r\n\t\tvar csrfToken = xml.getAttribute(\"dhx_security\");\r\n\t\tif (csrfToken) {\r\n\t\t\tif (window.dhtmlx) {\r\n\t\t\t\twindow.dhtmlx.security_key = csrfToken;\r\n\t\t\t}\r\n\t\t\tscheduler.security_key = csrfToken;\r\n\t\t}\r\n\t\r\n\t\tvar opts = scheduler.ajax.xpath(\"//coll_options\", loader.xmlDoc);\r\n\t\tfor (var i = 0; i < opts.length; i++) {\r\n\t\t\tvar bind = opts[i].getAttribute(\"for\");\r\n\t\t\tvar arr = scheduler.serverList[bind];\r\n\t\t\tif (!arr) {\r\n\t\t\t\tscheduler.serverList[bind] = arr = [];\r\n\t\t\t}\r\n\t\t\tarr.splice(0, arr.length);\t//clear old options\r\n\t\t\tvar itms = scheduler.ajax.xpath(\".//item\", opts[i]);\r\n\t\t\tfor (var j = 0; j < itms.length; j++) {\r\n\t\t\t\tvar itm = itms[j];\r\n\t\t\t\tvar attrs = itm.attributes;\r\n\t\t\t\tvar obj = { key: itms[j].getAttribute(\"value\"), label: itms[j].getAttribute(\"label\")};\r\n\t\t\t\tfor (var k = 0; k < attrs.length; k++) {\r\n\t\t\t\t\tvar attr = attrs[k];\r\n\t\t\t\t\tif (attr.nodeName == \"value\" || attr.nodeName == \"label\")\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\tobj[attr.nodeName] = attr.nodeValue;\r\n\t\t\t\t}\r\n\t\t\t\tarr.push(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (opts.length)\r\n\t\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\t\r\n\t\tvar ud = scheduler.ajax.xpath(\"//userdata\", loader.xmlDoc);\r\n\t\tfor (var i = 0; i < ud.length; i++) {\r\n\t\t\tvar udx = scheduler._xmlNodeToJSON(ud[i]);\r\n\t\t\tscheduler._userdata[udx.name] = udx.text;\r\n\t\t}\r\n\t\r\n\t\tvar evs = [];\r\n\t\txml = scheduler.ajax.xpath(\"//event\", loader.xmlDoc);\r\n\t\r\n\t\tfor (var i = 0; i < xml.length; i++) {\r\n\t\t\tvar ev = evs[i] = scheduler._xmlNodeToJSON(xml[i]);\r\n\t\t\tscheduler._init_event(ev);\r\n\t\t}\r\n\t\treturn evs;\r\n\t}\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler.json = scheduler._parsers.json = {\r\n\tcanParse: function(data){\r\n\t\tif(data && typeof data === \"object\"){\r\n\t\t\treturn true;\r\n\t\t} else if(typeof data === \"string\"){\r\n\t\t\ttry {\r\n\t\t\t\tvar result = JSON.parse(data);\r\n\t\t\t\treturn Object.prototype.toString.call(result) === '[object Object]' || \r\n\t\t\t\t\t\tObject.prototype.toString.call(result) === '[object Array]';\r\n\t\t\t} catch (err) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\tparse: function(data) {\r\n\t\tvar events = [];\r\n\r\n\t\tif (typeof data == \"string\") {\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\t\tif (Object.prototype.toString.call(data) === '[object Array]') {\r\n\t\t\tevents = data;\r\n\t\t} else {\r\n\t\t\tif(data){\r\n\t\t\t\tif(data.events){\r\n\t\t\t\t\tevents = data.events;\r\n\t\t\t\t}else if(data.data){\r\n\t\t\t\t\tevents = data.data;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tevents = events || [];\r\n\r\n\t\tif (data.dhx_security) {\r\n\t\t\tif (window.dhtmlx) {\r\n\t\t\t\twindow.dhtmlx.security_key = data.dhx_security;\r\n\t\t\t}\r\n\t\t\tscheduler.security_key = data.dhx_security;\r\n\t\t}\r\n\r\n\t\tvar collections = (data && data.collections) ? data.collections : {};\r\n\t\tvar collections_loaded = false;\r\n\t\tfor (var key in collections) {\r\n\t\t\tif (collections.hasOwnProperty(key)) {\r\n\t\t\t\tcollections_loaded = true;\r\n\t\t\t\tvar collection = collections[key];\r\n\t\t\t\tvar arr = scheduler.serverList[key];\r\n\t\t\t\tif (!arr) {\r\n\t\t\t\t\tscheduler.serverList[key] = arr = [];\r\n\t\t\t\t}\r\n\t\t\t\tarr.splice(0, arr.length); //clear old options\r\n\t\t\t\tfor (var j = 0; j < collection.length; j++) {\r\n\t\t\t\t\tvar option = collection[j];\r\n\t\t\t\t\tvar obj = { key: option.value, label: option.label }; // resulting option object\r\n\t\t\t\t\tfor (var option_key in option) {\r\n\t\t\t\t\t\tif (option.hasOwnProperty(option_key)) {\r\n\t\t\t\t\t\t\tif (option_key == \"value\" || option_key == \"label\")\r\n\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\tobj[option_key] = option[option_key]; // obj['value'] = option['value']\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tarr.push(obj);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (collections_loaded)\r\n\t\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\r\n\t\tvar evs = [];\r\n\t\tfor (var i = 0; i < events.length; i++) {\r\n\t\t\tvar event = events[i];\r\n\t\t\tscheduler._init_event(event);\r\n\t\t\tevs.push(event);\r\n\t\t}\r\n\t\treturn evs;\r\n\t}\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler.ical = scheduler._parsers.ical = {\r\n\tcanParse: function(data){\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\treturn new RegExp(\"^BEGIN:VCALENDAR\").test(data);\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t},\r\n\tparse:function(str){\r\n\t\tvar data = str.match(RegExp(this.c_start+\"[^\\f]*\"+this.c_end,\"\"));\r\n\t\tif (!data.length) return;\r\n\r\n\t\t// mpl: handle bad unfolding\r\n\t\tdata[0]=data[0].replace(/[\\r\\n]+ /g,\"\");\r\n\r\n\t\t//unfolding \r\n\t\tdata[0]=data[0].replace(/[\\r\\n]+(?=[a-z \\t])/g,\" \");\r\n\t\t//drop property\r\n\t\tdata[0]=data[0].replace(/;[^:\\r\\n]*:/g,\":\");\r\n\t\t\r\n\t\t\r\n\t\tvar incoming=[];\r\n\t\tvar match;\r\n\t\tvar event_r = RegExp(\"(?:\"+this.e_start+\")([^\\f]*?)(?:\"+this.e_end+\")\",\"g\");\r\n\t\twhile ((match=event_r.exec(data)) !== null){\r\n\t\t\tvar e={};\r\n\t\t\tvar param;\r\n\t\t\tvar param_r = /[^\\r\\n]+[\\r\\n]+/g;\r\n\t\t\twhile ((param=param_r.exec(match[1])) !== null)\r\n\t\t\t\tthis.parse_param(param.toString(),e);\r\n\t\t\tif (e.uid && !e.id) e.id = e.uid; //fallback to UID, when ID is not defined\r\n\t\t\tincoming.push(e);\t\r\n\t\t}\r\n\t\treturn incoming;\r\n\t},\r\n\tparse_param:function(str,obj){\r\n\t\tvar d = str.indexOf(\":\"); \r\n\t\t\tif (d==-1) return;\r\n\t\t\r\n\t\tvar name = str.substr(0,d).toLowerCase();\r\n\t\tvar value = str.substr(d+1).replace(/\\\\,/g,\",\").replace(/[\\r\\n]+$/,\"\");\r\n\t\tif (name==\"summary\")\r\n\t\t\tname=\"text\";\r\n\t\telse if (name==\"dtstart\"){\r\n\t\t\tname = \"start_date\";\r\n\t\t\tvalue = this.parse_date(value,0,0);\r\n\t\t}\r\n\t\telse if (name==\"dtend\"){\r\n\t\t\tname = \"end_date\";\r\n\t\t\tvalue = this.parse_date(value,0,0);\r\n\t\t}\r\n\t\tobj[name]=value;\r\n\t},\r\n\tparse_date:function(value,dh,dm){\r\n\t\tvar t = value.split(\"T\");\r\n\r\n\t\tvar utcMark = false;\r\n\t\tif (t[1]){\r\n\t\t\tdh=t[1].substr(0,2);\r\n\t\t\tdm=t[1].substr(2,2);\r\n\t\t\tutcMark = !!(t[1][6] == \"Z\");\r\n\t\t}\r\n\t\tvar dy = t[0].substr(0,4);\r\n\t\tvar dn = parseInt(t[0].substr(4,2),10)-1;\r\n\t\tvar dd = t[0].substr(6,2);\r\n\r\n\t\tif(scheduler.config.server_utc || utcMark){\r\n\t\t\treturn new Date(Date.UTC(dy,dn,dd,dh,dm)) ;\r\n\t\t}else{\r\n\t\t\treturn new Date(dy,dn,dd,dh,dm);\r\n\t\t}\r\n\t},\r\n\tc_start:\"BEGIN:VCALENDAR\",\r\n\te_start:\"BEGIN:VEVENT\",\r\n\te_end:\"END:VEVENT\",\r\n\tc_end:\"END:VCALENDAR\"\t\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._init_touch_events = function(){\r\n\tvar mobile = this.config.touch &&\r\n\t\t( ((navigator.userAgent.indexOf(\"Mobile\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"iPad\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"Android\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"Touch\")!=-1)) && !window.MSStream) ||\r\n\t\t\t((navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1));\r\n\r\n\tif(mobile){\r\n\t\tthis.xy.scroll_width = 0;\r\n\t\tthis._mobile = true;\r\n\t}\r\n\r\n\tif(this.config.touch){\r\n\r\n\t\tvar touchEventsSupported = true;\r\n\t\ttry {\r\n\t\t\tdocument.createEvent(\"TouchEvent\");\r\n\t\t} catch (e) {\r\n\t\t\ttouchEventsSupported = false;\r\n\t\t}\r\n\r\n\t\tif (touchEventsSupported) {\r\n\t\t\tthis._touch_events([\"touchmove\", \"touchstart\", \"touchend\"], function (ev) {\r\n\t\t\t\tif (ev.touches && ev.touches.length > 1) return null;\r\n\t\t\t\tif (ev.touches[0])\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\ttarget: ev.target,\r\n\t\t\t\t\t\tpageX: ev.touches[0].pageX,\r\n\t\t\t\t\t\tpageY: ev.touches[0].pageY,\r\n\t\t\t\t\t\tclientX: ev.touches[0].clientX,\r\n\t\t\t\t\t\tclientY: ev.touches[0].clientY\r\n\t\t\t\t\t};\r\n\t\t\t\telse\r\n\t\t\t\t\treturn ev;\r\n\t\t\t}, function () {\r\n\t\t\t\treturn false;\r\n\t\t\t});\r\n\t\t} else if (window.PointerEvent || window.navigator.pointerEnabled) {\r\n\t\t\tthis._touch_events([\"pointermove\", \"pointerdown\", \"pointerup\"], function (ev) {\r\n\t\t\t\tif (ev.pointerType == \"mouse\") return null;\r\n\t\t\t\treturn ev;\r\n\t\t\t}, function (ev) {\r\n\t\t\t\treturn (!ev || (ev.pointerType == \"mouse\" ));\r\n\t\t\t});\r\n\t\t} else if (window.navigator.msPointerEnabled) {\r\n\t\t\tthis._touch_events([\"MSPointerMove\", \"MSPointerDown\", \"MSPointerUp\"], function (ev) {\r\n\t\t\t\tif (ev.pointerType == ev.MSPOINTER_TYPE_MOUSE) return null;\r\n\t\t\t\treturn ev;\r\n\t\t\t}, function (ev) {\r\n\t\t\t\treturn (!ev || ev.pointerType == ev.MSPOINTER_TYPE_MOUSE);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n};\r\n\r\nscheduler._touch_events = function(names, accessor, ignore){\r\n\t//webkit on android need to be handled separately\r\n\t//var a_webkit = (navigator.userAgent.indexOf(\"Android\")!=-1) && (navigator.userAgent.indexOf(\"WebKit\")!=-1);\r\n\tvar source, tracker, timer, drag_mode, scroll_mode, action_mode;\r\n\tvar dblclicktime = 0;\r\n\r\n\tfunction attachTouchEvent(element, name, callback){\r\n\t\t//touch gestures must be disabled when ligthbox is opened\r\n\t\tscheduler.event(element, name, function(e){\r\n\t\t\tif(scheduler._is_lightbox_open()){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tif (ignore(e)) return;\r\n\t\t\t\treturn callback(e);\r\n\t\t\t}\r\n\t\t}, { passive: false });\r\n\t}\r\n\r\n\tfunction check_direction_swipe(s_ev, e_ev, step, max_dy){\r\n\t\tif (!s_ev || !e_ev) return false;\r\n\r\n\t\tvar t = s_ev.target;\r\n\t\twhile(t && t != scheduler._obj){\r\n\t\t\tt = t.parentNode;\r\n\t\t}\r\n\t\tif(t != scheduler._obj){\r\n\t\t\t//swipe outside scheduler\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// ignore swipe in horizontal timeline\r\n\t\tif(scheduler.matrix && scheduler.matrix[scheduler.getState().mode]){\r\n\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\tif(timeline.scrollable){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar dy = Math.abs(s_ev.pageY - e_ev.pageY);\r\n\t\tvar dx = Math.abs(s_ev.pageX - e_ev.pageX);\r\n\t\tif (dy < max_dy && dx>step && (!dy || (dx/dy > 3))){\r\n\t\t\tif (s_ev.pageX > e_ev.pageX) {\r\n\t\t\t\tscheduler._click.dhx_cal_next_button();\r\n\t\t\t}else {\r\n\t\t\t\tscheduler._click.dhx_cal_prev_button();\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n\tfunction doMouseMove(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tvar dnd = scheduler.getState().drag_mode,\r\n\t\t\ttimeline = scheduler.matrix ? scheduler.matrix[scheduler._mode] : false;\r\n\r\n\t\tvar original_render = scheduler.render_view_data;\r\n\t\tif(dnd == 'create' && timeline){\r\n\t\t\t//suppress full redraw of timeline on creating event\r\n\t\t\tscheduler.render_view_data = function() {\r\n\t\t\t\tvar id = scheduler.getState().drag_id;\r\n\t\t\t\tvar ev = scheduler.getEvent(id);\r\n\t\t\t\tvar property = timeline.y_property;\r\n\r\n\t\t\t\tvar evs = scheduler.getEvents(ev.start_date, ev.end_date);\r\n\t\t\t\tfor(var i = 0; i < evs.length; i++){\r\n\t\t\t\t\tif(evs[i][property] != ev[property]){\r\n\t\t\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tev._sorder = evs.length - 1;\r\n\t\t\t\tev._count = evs.length;\r\n\r\n\t\t\t\tthis.render_data([ev], scheduler.getState().mode);\r\n\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\tscheduler._on_mouse_move(e);\r\n\r\n\t\tif(dnd == 'create' && timeline){\r\n\t\t\tscheduler.render_view_data = original_render;\r\n\t\t}\r\n\r\n\t\tif (e.preventDefault)\r\n\t\t\te.preventDefault();\r\n\t\te.cancelBubble = true;\r\n\t\treturn false;\r\n\t}\r\n\r\n\t// touchmove\r\n\tattachTouchEvent(document.body, names[0], function(e){\r\n\t\tif (ignore(e)) return;\r\n\r\n\t\tvar acc = accessor(e);\r\n\t\tif(!acc) return;\r\n\t\tif (drag_mode){\r\n\t\t\tdoMouseMove(acc);\r\n\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._update_global_tip();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//if (tracker && a_webkit){\r\n\t\t//\tcheck_direction_swipe(tracker, accessor(e), 0);\r\n\t\t//}\r\n\r\n\t\ttracker = accessor(e);\r\n\t\t//ignore common and scrolling moves\r\n\t\tif (!action_mode) return;\r\n\r\n\t\t//multitouch\r\n\t\tif (!tracker){\r\n\t\t\tscroll_mode = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//target changed - probably in scroll mode\r\n\r\n\t\tif (source.target != tracker.target || (Math.abs(source.pageX - tracker.pageX) > 5) || (Math.abs(source.pageY - tracker.pageY) > 5)){\r\n\t\t\tscroll_mode = true;\r\n\t\t\tclearTimeout(timer);\r\n\t\t}\r\n\r\n\t});\r\n\r\n\t//attachTouchEvent(this._els[\"dhx_cal_data\"][0], \"scroll\", drag_cancel);\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], \"touchcancel\", drag_cancel);\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], \"contextmenu\", function(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tif (action_mode){\r\n\t\t\tif (e && e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t});\r\n\r\n\t// touchstart\r\n\tattachTouchEvent(this._obj, names[1], function(e){\r\n\t\t// block pull-to-refresh\r\n\t\tif(document && document.body){\r\n\t\t\tdocument.body.classList.add(\"dhx_cal_touch_active\");\r\n\t\t}\r\n\r\n\t\tif (ignore(e)) return;\r\n\t\tscheduler._pointerDragId = e.pointerId;\r\n\r\n\t\tvar fake_event;\r\n\t\tdrag_mode = scroll_mode = false;\r\n\t\taction_mode = true;\r\n\t\tfake_event = tracker = accessor(e);\r\n\r\n\t\tif (!fake_event){\r\n\t\t\tscroll_mode = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//dbl click\r\n\t\tvar now = new Date();\r\n\r\n\t\tif (!scroll_mode && !drag_mode && now - dblclicktime < 250){\r\n\t\t\tscheduler._click.dhx_cal_data(fake_event);\r\n\t\t\twindow.setTimeout(function(){\r\n\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t//fake_event.type = \"dblclick\";\r\n\t\t\t\tscheduler._on_dbl_click(fake_event);\r\n\t\t\t}, 50);\r\n\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._block_next_stop = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tdblclicktime = now;\r\n\r\n\t\t//drag\r\n\r\n\t\tif (scroll_mode || drag_mode || !scheduler.config.touch_drag)\r\n\t\t\treturn;\r\n\r\n\t\tvar actTask = scheduler._locate_event(document.activeElement);\r\n\t\tvar fakeTask = scheduler._locate_event(fake_event.target);\r\n\t\tvar sourceTask = source? scheduler._locate_event(source.target) : null;\r\n\r\n\t\tif(actTask && fakeTask && actTask == fakeTask && actTask != sourceTask)\r\n\t\t{\r\n\t\t\tif(e.preventDefault) {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\tscheduler._click.dhx_cal_data(fake_event);\r\n\t\t\tsource = fake_event;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//there is no target\r\n\t\ttimer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tdrag_mode = true;\r\n\t\t\tvar target = source.target;\r\n\t\t\tvar className = scheduler._getClassName(target);\r\n\t\t\tif (target && className.indexOf(\"dhx_body\") != -1)\r\n\t\t\t\ttarget = target.previousSibling;\r\n\r\n\t\t\tscheduler._on_mouse_down(source, target);\r\n\t\t\tif (scheduler._drag_mode && scheduler._drag_mode != \"create\"){\r\n\t\t\t\tscheduler.for_rendered(scheduler._drag_id, function(node, i) {\r\n\t\t\t\t\tnode.style.display='none';\r\n\t\t\t\t\tscheduler._rendered.splice(i, 1);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif (scheduler.config.touch_tip) {\r\n\t\t\t\tscheduler._show_global_tip();\r\n\t\t\t}\r\n\t\t\tscheduler.updateEvent(scheduler._drag_id);\r\n\t\t},scheduler.config.touch_drag);\r\n\r\n\t\tsource = fake_event;\r\n\t});\r\n\tfunction drag_cancel(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tscheduler._hide_global_tip();\r\n\t\tif (drag_mode){\r\n\t\t\tscheduler._on_mouse_up( accessor(e) );\r\n\t\t\tscheduler._temp_touch_block = false;\r\n\t\t}\r\n\t\tscheduler._drag_id = null;\r\n\t\tscheduler._drag_mode=null;\r\n\t\tscheduler._drag_pos=null;\r\n\t\tscheduler._pointerDragId = null;\r\n\t\tclearTimeout(timer);\r\n\t\tdrag_mode = action_mode = false;\r\n\t\tscroll_mode = true;\r\n\t}\r\n\r\n\t// touch end\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], names[2], function(e){\r\n\t\tif(document && document.body){\r\n\t\t\tdocument.body.classList.remove(\"dhx_cal_touch_active\");\r\n\t\t}\r\n\r\n\t\tif (ignore(e)) return;\r\n\r\n\t\tif(scheduler.config.touch_swipe_dates){\r\n\t\t\tif (!drag_mode && check_direction_swipe(source, tracker, 200, 100)) {\r\n\t\t\t\tscheduler._block_next_stop = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (drag_mode) {\r\n\t\t\tscheduler._ignore_next_click = true;\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\t}, 100);\r\n\t\t}\r\n\r\n\t\tdrag_cancel(e);\r\n\t\tif (scheduler._block_next_stop){\r\n\t\t\tscheduler._block_next_stop = false;\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler.event(document.body, names[2], drag_cancel);\r\n};\r\n\r\nscheduler._show_global_tip = function(){\r\n\tscheduler._hide_global_tip();\r\n\r\n\tvar toptip = scheduler._global_tip = document.createElement(\"div\");\r\n\ttoptip.className='dhx_global_tip';\r\n\r\n\tscheduler._update_global_tip(1);\r\n\r\n\tdocument.body.appendChild(toptip);\r\n};\r\nscheduler._update_global_tip = function(init){\r\n\tvar toptip = scheduler._global_tip;\r\n\tif (toptip){\r\n\t\tvar time = \"\";\r\n\t\tif (scheduler._drag_id && !init){\r\n\t\t\tvar ev = scheduler.getEvent(scheduler._drag_id);\r\n\t\t\tif (ev)\r\n\t\t\t\ttime = \"
\" + (ev._timed ? scheduler.templates.event_header(ev.start_date, ev.end_date, ev):scheduler.templates.day_date(ev.start_date, ev.end_date, ev)) + \"
\";\r\n\t\t}\r\n\r\n\t\tif (scheduler._drag_mode == \"create\" || scheduler._drag_mode == \"new-size\")\r\n\t\t\ttoptip.innerHTML = (scheduler.locale.labels.drag_to_create || \"Drag to create\")+time;\r\n\t\telse\r\n\t\t\ttoptip.innerHTML = (scheduler.locale.labels.drag_to_move || \"Drag to move\")+time;\r\n\t}\r\n};\r\nscheduler._hide_global_tip = function(){\r\n\tvar toptip = scheduler._global_tip;\r\n\tif (toptip && toptip.parentNode){\r\n\t\ttoptip.parentNode.removeChild(toptip);\r\n\t\tscheduler._global_tip = 0;\r\n\t}\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._addThemeClass = function(){\r\n\tdocument.documentElement.setAttribute(\"data-scheduler-theme\", scheduler.skin);\r\n};\r\n\r\nscheduler._skin_settings = {\r\n\tfix_tab_position: [1,0],\r\n\tuse_select_menu_space: [1,0],\r\n\twide_form: [1,0],\r\n\r\n\thour_size_px: [44,42],\r\n\tdisplayed_event_color: [\"#ff4a4a\", \"ffc5ab\"],\r\n\tdisplayed_event_text_color: [\"#ffef80\", \"7e2727\"]\r\n};\r\n\r\nscheduler._skin_xy = {\r\n\tlightbox_additional_height: [90,50],\r\n\tnav_height: [59,22],\r\n\tbar_height: [24,20]\r\n};\r\n\r\n// material skin uses a different box sizing model than other skins, and also requires some post-processing.\r\n// In order to render events correctly, we need to know which box sizing model is used\r\n// We can detect it by styles applied, taking into account that styles may be loaded after scheduler is rendered\r\n\r\nscheduler._is_material_skin = function(){\r\n\tif(!scheduler.skin){\r\n\t\treturn checkIfMaterialSkin();\r\n\t}else{\r\n\t\treturn ((scheduler.skin + \"\").indexOf(\"material\") > -1);\r\n\t}\r\n};\r\n\r\nfunction themeNameFromFile(){\r\n\tvar links = document.getElementsByTagName(\"link\");\r\n\tfor (var i = 0; i < links.length; i++) {\r\n\t\tvar res = links[i].href.match(\"dhtmlxscheduler_([a-z]+).css\");\r\n\t\tif (res){\r\n\t\t\treturn res[1];\r\n\t\t}\r\n\t}\r\n}\r\n\r\nscheduler._build_skin_info = function() {\r\n\tmonitorThemeChange();\r\n\tconst styles = getComputedStyle(this.$container);\r\n\tconst themeVar = styles.getPropertyValue(\"--dhx-scheduler-theme\");\r\n\r\n\tlet isCssVarTheme = !!themeVar;\r\n\tlet themeName;\r\n\tlet cssValues = {};\r\n\tlet oldMaterialTheme = false;\r\n\r\n\tif(isCssVarTheme){\r\n\t\tthemeName = themeVar;\r\n\t\tfor(let i in scheduler.xy){\r\n\t\t\tcssValues[i] = styles.getPropertyValue(`--dhx-scheduler-xy-${i}`);\r\n\t\t}\r\n\r\n\t\tcssValues.hour_size_px = styles.getPropertyValue(`--dhx-scheduler-config-hour_size_px`);\r\n\t\tcssValues.wide_form = styles.getPropertyValue(`--dhx-scheduler-config-form_wide`);\r\n\r\n\t}else{\r\n\t\tthemeName = themeNameFromFile();\r\n\t\toldMaterialTheme = scheduler._is_material_skin();\r\n\t}\r\n\r\n\r\n\tscheduler._theme_info = {\r\n\t\ttheme: themeName,\r\n\t\tcssVarTheme: isCssVarTheme,\r\n\t\toldMaterialTheme: oldMaterialTheme,\r\n\t\tvalues: cssValues\r\n\t};\r\n\r\n\tif(scheduler._theme_info.cssVarTheme){\r\n\t\tconst themeVariables = this._theme_info.values;\r\n\t\tfor(let i in scheduler.xy){\r\n\t\t\tif(!isNaN(parseInt(themeVariables[i]))){\r\n\t\t\t\tscheduler.xy[i] = parseInt(themeVariables[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\n\r\nvar calculatedMaterial;\r\nfunction checkIfMaterialSkin(){\r\n\tif(calculatedMaterial === undefined){\r\n\t\tvar probe = document.createElement(\"div\");\r\n\t\tprobe.style.position = \"absolute\";\r\n\t\tprobe.style.left = \"-9999px\";\r\n\t\tprobe.style.top = \"-9999px\";\r\n\t\tprobe.innerHTML = \"
\" +\r\n\t\t\t\"
\" +\r\n\t\t\t\"
\"+\r\n\t\t\"
\";\r\n\t\tdocument.body.appendChild(probe);\r\n\t\tvar styles = window.getComputedStyle(probe.querySelector(\".dhx_cal_scale_placeholder\"));\r\n\t\tvar position = styles.getPropertyValue('position');\r\n\t\tif(position === \"absolute\"){\r\n\t\t\t// page has skins for placeholder element from material skin\r\n\t\t\tcalculatedMaterial = true;\r\n\t\t}else{\r\n\t\t\tcalculatedMaterial = false;\r\n\t\t}\r\n\r\n\t\tsetTimeout(function(){\r\n\t\t\tcalculatedMaterial = null;\r\n\t\t\tif(probe && probe.parentNode){\r\n\t\t\t\tprobe.parentNode.removeChild(probe);\r\n\t\t\t}\r\n\t\t}, 500);\r\n\t}\r\n\treturn calculatedMaterial;\r\n}\r\n\r\nvar cachedBorderBoxValue;\r\nfunction checkIfBorderBoxStyling(){\r\n\tif(scheduler._is_material_skin()){\r\n\t\treturn true;\r\n\t}else{\r\n\t\tif(cachedBorderBoxValue === undefined){\r\n\t\t\tvar probe = document.createElement(\"div\");\r\n\t\t\tprobe.style.position = \"absolute\";\r\n\t\t\tprobe.style.left = \"-9999px\";\r\n\t\t\tprobe.style.top = \"-9999px\";\r\n\t\t\tprobe.innerHTML = \"
\" +\r\n\t\t\t\t\"
\" +\r\n\t\t\t\t\t\"
\"+\r\n\t\t\t\t\"
\"+\r\n\t\t\t\"
\";\r\n\r\n\t\t\tdocument.body.appendChild(probe);\r\n\t\t\tvar styles = window.getComputedStyle(probe.querySelector(\".dhx_body\"));\r\n\t\t\tvar boxSizing = styles.getPropertyValue('box-sizing');\r\n\t\t\tdocument.body.removeChild(probe);\r\n\t\t\tcachedBorderBoxValue = !!(boxSizing === \"border-box\");\r\n\r\n\t\t\tif(!cachedBorderBoxValue){\r\n\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\tcachedBorderBoxValue = undefined;\r\n\t\t\t\t}, 1000);// recalculate in case scheduler initialized before skin is loaded\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\treturn cachedBorderBoxValue;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction refreshAfterLoad(){\r\n\tif(scheduler._is_material_skin() || scheduler._border_box_events()){\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar oldStyling = cachedBorderBoxValue;\r\n\tcachedBorderBoxValue = undefined;\r\n\tcalculatedMaterial = undefined;\r\n\tvar newStyling = checkIfBorderBoxStyling();\r\n\r\n\t// if box styling model changed - means scheduler was rendered before stylesheet was loaded or parsed inline\r\n\t// repaint scheduler in order to apply new styles\r\n\tif(oldStyling !== newStyling && scheduler.$container && scheduler.getState().mode){\r\n\t\tscheduler.setCurrentView();\r\n\t}\r\n}\r\nscheduler.event(window, 'DOMContentLoaded', refreshAfterLoad);\r\nscheduler.event(window, 'load', refreshAfterLoad);\r\n\r\nscheduler._border_box_events = function(){\r\n\treturn checkIfBorderBoxStyling();\r\n};\r\n\r\nscheduler._configure = function(col, data, skin){\r\n\tfor (var key in data)\r\n\t\tif (typeof col[key] == \"undefined\")\r\n\t\t\tcol[key] = data[key][skin];\r\n};\r\n\r\nscheduler.setSkin = function(value){\r\n\tthis.skin = value;\r\n\tscheduler._addThemeClass();\r\n\tif(scheduler.$container){\r\n\t\tthis._skin_init();\r\n\t\tthis.render();\r\n\t}\r\n\t\r\n\t//\r\n};\r\n\r\nfunction flatSkinHourScale(date){\r\n\tvar min = date.getMinutes();\r\n\tmin = min < 10 ? \"0\"+min : min;\r\n\tvar html = \"\"+ date.getHours() +\"\"+\r\n\t\t\" \"+ min +\"\";\r\n\treturn html;\r\n}\r\n\r\nlet monitorIntervalId = null;\r\nfunction monitorThemeChange(){\r\n\tconst container = scheduler.$container;\r\n\t\r\n\tclearInterval(monitorIntervalId);\r\n\tif(container){\r\n\t\tmonitorIntervalId = setInterval(() => {\r\n\t\t\tconst csstheme = getComputedStyle(container).getPropertyValue('--dhx-scheduler-theme');\r\n\t\t\tif(csstheme && csstheme !== scheduler.skin){\r\n\t\t\t\tscheduler.setSkin(csstheme);\r\n\t\t\t}\r\n\r\n\t\t}, 100);\r\n\t}\r\n}\r\nscheduler.attachEvent(\"onDestroy\", function(){\r\n\tclearInterval(monitorIntervalId);\r\n});\r\n\r\nscheduler._skin_init = function(){\r\n\tthis._build_skin_info();\r\n\r\n\tif (!this.skin){\r\n\t\tthis.skin = this._theme_info.theme;\r\n\t}\r\n\tscheduler._addThemeClass();\r\n\tif (scheduler.skin === \"flat\"){\r\n\t\t// scheduler.xy.scale_height = 35;\r\n\t\tscheduler.templates.hour_scale = flatSkinHourScale;\r\n\t}else if (scheduler.templates.hour_scale === flatSkinHourScale){\r\n\t\tscheduler.templates.hour_scale = scheduler.date.date_to_str(scheduler.config.hour_date);\r\n\t}\r\n\r\n\r\n\r\n\t//scheduler._lightbox_template=\"
 
\";\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\r\n\t\tvar date_to_str = scheduler.date.date_to_str(\"%d\");\r\n\t\tif(!scheduler.templates._old_month_day){\r\n\t\t\tscheduler.templates._old_month_day = scheduler.templates.month_day;\r\n\t\t}\r\n\t\tvar old_month_day = scheduler.templates._old_month_day;\r\n\t\tscheduler.templates.month_day = function(date) {\r\n\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\tvar label = date_to_str(date);\r\n\t\t\t\tif (date.getDate() == 1) {\r\n\t\t\t\t\tlabel = scheduler.locale.date.month_full[date.getMonth()] + \" \" + label;\r\n\t\t\t\t}\r\n\t\t\t\tif (+date == +scheduler.date.date_part(this._currentDate())) {\r\n\t\t\t\t\tlabel = scheduler.locale.labels.dhx_cal_today_button + \" \" + label;\r\n\t\t\t\t}\r\n\t\t\t\treturn label;\r\n\t\t\t} else {\r\n\t\t\t\treturn old_month_day.call(this, date);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t// tab classes\r\n\t\tif(scheduler.config.fix_tab_position){\r\n\t\t\tconst tabs = scheduler._els[\"dhx_cal_navline\"][0].querySelectorAll('[data-tab]');\r\n\t\t\ttabs.forEach((tab) => {\r\n\t\t\t\tconst view = tab.getAttribute(\"data-tab\") || tab.getAttribute(\"name\");\r\n\r\n\t\t\t\tswitch (view) {\r\n\t\t\t\t\tcase \"day\":\r\n\t\t\t\t\tcase \"day_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_first\");\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"week\":\r\n\t\t\t\t\tcase \"week_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"month\":\r\n\t\t\t\t\tcase \"month_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_last\");\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_standalone\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\treorderTabs(scheduler._els[\"dhx_cal_navline\"][0]);\r\n\r\n\t\t}\r\n\t}, {once: true});\r\n\r\n\tfunction reorderTabs(container) {\r\n\t\t// segmented tabs should go first\r\n\r\n\t\tif(scheduler.config.header){\r\n\t\t\treturn;\r\n\t\t\t// don't reorder tabs if header is defined via config\r\n\t\t}\r\n\t\tconst tabs = Array.from(container.querySelectorAll('.dhx_cal_tab'));\r\n\t\r\n\t\t// segmented tabs\r\n\t\tconst order = ['day', 'week', 'month'];\r\n\t\r\n\t\tconst specialTabs = order.map(tabName => \r\n\t\t\ttabs.find(tab => tab.getAttribute('data-tab') === tabName)\r\n\t\t).filter(tab => tab !== undefined);\r\n\t\r\n\t\tlet firstTab = tabs.length > 0 ? tabs[0] : null;\r\n\r\n\t\tspecialTabs.reverse().forEach(tab => {\r\n\t\t\tcontainer.insertBefore(tab, firstTab);\r\n\t\t\tfirstTab = tab;\r\n\t\t});\r\n\t}\r\n\r\n\t// scheduler._skin_init = function(){\r\n\t// \tthis._build_skin_info();\r\n\t// \tthis.skin = this._theme_info.theme;\r\n\t// };\r\n};\r\n\r\n\r\n\r\n}","export default function DataProcessorEvents(scheduler, dp){\r\n\tthis.$scheduler = scheduler;\r\n\tthis.$dp = dp;\r\n\tthis._dataProcessorHandlers = [];\r\n\r\n\tthis.attach = function () {\r\n\t\tvar dp = this.$dp;\r\n\t\tvar scheduler = this.$scheduler;\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onEventAdded\", function(id) {\r\n\t\t\tif (!this._loading && this._validId(id))\r\n\t\t\tdp.setUpdated(id,true,\"inserted\");\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onConfirmedBeforeEventDelete\", function(id) {\r\n\t\t\tif (!this._validId(id)) return;\r\n\t\t\tvar z=dp.getState(id);\r\n\r\n\t\t\tif (z==\"inserted\" || this._new_event) { dp.setUpdated(id,false); return true; }\r\n\t\t\tif (z==\"deleted\") return false;\r\n\t\t\tif (z==\"true_deleted\") return true;\r\n\r\n\t\t\tdp.setUpdated(id,true,\"deleted\");\r\n\t\t\treturn false;\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onEventChanged\", function(id) { \r\n\t\t\tif (!this._loading && this._validId(id))\r\n\t\t\tdp.setUpdated(id,true,\"updated\");\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onClearAll\", function() { \r\n\t\t\t// clear dataprocessor state when scheduler is reset\r\n\t\t\tdp._in_progress={};\r\n\t\t\tdp._invalid={};\r\n\t\t\tdp.updatedRows = [];\r\n\t\t\tdp._waitMode = 0;\r\n\t\t}));\r\n\r\n\t\tdp.attachEvent(\"insertCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"updateCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"deleteCallback\", function(upd, id) {\r\n\t\t\tif (scheduler.getEvent(id)){\r\n\t\t\t\tscheduler.setUserData(id, this.action_param, \"true_deleted\");\r\n\t\t\t\tscheduler.deleteEvent(id);\r\n\t\t\t} else if (scheduler._add_rec_marker)\r\n\t\t\t\tscheduler._update_callback(upd, id);\r\n\t\t});\r\n\t};\r\n\r\n\tthis.detach = function () {\r\n\t\tfor (var key in this._dataProcessorHandlers) {\r\n\t\t\tvar handler = this._dataProcessorHandlers[key];\r\n\t\t\tthis.$scheduler.detachEvent(handler);\r\n\t\t}\r\n\t\tthis._dataProcessorHandlers = [];\r\n\t};\r\n}\r\n\r\nexport function extendScheduler(scheduler, dp){\r\n\tscheduler._validId=function(id){\r\n\t\tif(this._is_virtual_event){\r\n\t\t\treturn !this._is_virtual_event(id);\r\n\t\t}\r\n\t\treturn true;\r\n\t};\r\n\tscheduler.setUserData=function(id,name,value){\r\n\t\tif (id){\r\n\t\t\tvar ev = this.getEvent(id);\r\n\t\t\tif(ev) ev[name]=value;\r\n\t\t}else{\r\n\t\t\tthis._userdata[name]=value;\r\n\t\t}\r\n\t};\r\n\tscheduler.getUserData=function(id,name){\r\n\t\tif (id){\r\n\t\t\tvar ev = this.getEvent(id);\r\n\t\t\tif(ev)\r\n\t\t\t\treturn ev[name];\r\n\t\t\telse\r\n\t\t\t\treturn null;\r\n\t\t}else{\r\n\t\t\treturn this._userdata[name];\r\n\t\t}\r\n\t};\r\n\tscheduler._set_event_text_style=function(id,style){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\t\tthis.for_rendered(id,function(r){\r\n\t\t\tr.style.cssText+=\";\"+style;\r\n\t\t});\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tev[\"_text_style\"]=style;\r\n\t\tthis.event_updated(ev);\r\n\t};\r\n\tscheduler._update_callback = function(upd,id){\r\n\t\tvar data = scheduler._xmlNodeToJSON(upd.firstChild);\r\n\t\t//fix for updates of recurring events\r\n\t\tif (data.rec_type == \"none\") data.rec_pattern = \"none\";\r\n\t\tdata.text = data.text||data._tagvalue;\r\n\t\tdata.start_date = scheduler._helpers.parseDate(data.start_date);\r\n\t\tdata.end_date = scheduler._helpers.parseDate(data.end_date);\r\n\t\tscheduler.addEvent(data);\r\n\t\tif (scheduler._add_rec_marker)\r\n\t\t\tscheduler.setCurrentView();\r\n\t};\r\n\tscheduler._dp_change_event_id = function(id, new_id){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\t\tscheduler.changeEventId(id, new_id);\r\n\t};\r\n\tscheduler._dp_hook_delete = function(id, new_id){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\r\n\t\tif(new_id && id != new_id){\r\n\t\t\tif(this.getUserData(id, dp.action_param) == \"true_deleted\")\r\n\t\t\t\tthis.setUserData(id, dp.action_param, \"updated\");\r\n\r\n\t\t\tthis.changeEventId(id, new_id);\r\n\t\t}\r\n\t\treturn this.deleteEvent(new_id, true);\r\n\t};\r\n\r\n\tscheduler.setDp = function() {\r\n\t\tthis._dp = dp;\r\n\t};\r\n\tscheduler.setDp();\r\n}","import DataProcessorEvents from \"./dataprocessor_hooks\";\r\nimport { extendScheduler } from \"./dataprocessor_hooks\";\r\nimport eventable from \"../../utils/eventable\";\r\nimport global from \"../../global\";\r\n\r\n/**\r\n *\t@desc: constructor, data processor object\r\n *\t@param: serverProcessorURL - url used for update\r\n *\t@type: public\r\n */\r\nexport function DataProcessor(serverProcessorURL){\r\n\tthis.serverProcessor = serverProcessorURL;\r\n\tthis.action_param = \"!nativeeditor_status\";\r\n\r\n\tthis.object = null;\r\n\tthis.updatedRows = []; // ids of updated rows\r\n\r\n\tthis.autoUpdate = true;\r\n\tthis.updateMode = \"cell\";\r\n\tthis._tMode = \"GET\";\r\n\tthis._headers = null;\r\n\tthis._payload = null;\r\n\tthis.post_delim = \"_\";\r\n\r\n\tthis._waitMode = 0;\r\n\tthis._in_progress = {};\r\n\tthis._invalid = {};\r\n\tthis.messages = [];\r\n\r\n\tthis.styles = {\r\n\t\tupdated: \"font-weight:bold;\",\r\n\t\tinserted: \"font-weight:bold;\",\r\n\t\tdeleted: \"text-decoration : line-through;\",\r\n\t\tinvalid: \"background-color:FFE0E0;\",\r\n\t\tinvalid_cell: \"border-bottom:2px solid red;\",\r\n\t\terror: \"color:red;\",\r\n\t\tclear: \"font-weight:normal;text-decoration:none;\"\r\n\t};\r\n\tthis.enableUTFencoding(true);\r\n\teventable(this); // TODO: need to update\r\n\r\n\treturn this;\r\n}\r\nDataProcessor.prototype = {\r\n\tsetTransactionMode: function (mode, total) {\r\n\t\tif (typeof mode == \"object\") {\r\n\t\t\tthis._tMode = mode.mode || this._tMode;\r\n\r\n\t\t\tif (mode.headers !== undefined) {\r\n\t\t\t\tthis._headers = mode.headers;\r\n\t\t\t}\r\n\r\n\t\t\tif (mode.payload !== undefined) {\r\n\t\t\t\tthis._payload = mode.payload;\r\n\t\t\t}\r\n\t\t\tthis._tSend = !!total;\r\n\t\t} else {\r\n\t\t\tthis._tMode = mode;\r\n\t\t\tthis._tSend = total;\r\n\t\t}\r\n\r\n\t\tif (this._tMode == \"REST\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t}\r\n\r\n\t\tif (this._tMode === \"JSON\" || this._tMode === \"REST-JSON\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t\tthis._serializeAsJson = true;\r\n\t\t\tthis._headers = this._headers || {};\r\n\t\t\tthis._headers[\"Content-Type\"] = \"application/json\";\r\n\t\t}else{\r\n\t\t\tif(this._headers && !this._headers[\"Content-Type\"]){\r\n\t\t\t\tthis._headers[\"Content-Type\"] = \"application/x-www-form-urlencoded\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (this._tMode === \"CUSTOM\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t\tthis._router = mode.router;\r\n\t\t}\r\n\t},\r\n\tescape: function (data) {\r\n\t\tif (this._utf)\r\n\t\t\treturn encodeURIComponent(data);\r\n\t\telse\r\n\t\t\treturn escape(data);\r\n\t},\r\n\t/**\r\n\t *\t@desc: allows to set escaping mode\r\n\t *\t@param: true - utf based escaping, simple - use current page encoding\r\n\t *\t@type: public\r\n\t */\r\n\tenableUTFencoding: function (mode) {\r\n\t\tthis._utf = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: allows to define, which column may trigger update\r\n\t *\t@param: val - array or list of true/false values\r\n\t *\t@type: public\r\n\t */\r\n\tsetDataColumns: function (val) {\r\n\t\tthis._columns = (typeof val == \"string\") ? val.split(\",\") : val;\r\n\t},\r\n\t/**\r\n\t *\t@desc: get state of updating\r\n\t *\t@returns: true - all in sync with server, false - some items not updated yet.\r\n\t *\t@type: public\r\n\t */\r\n\tgetSyncState: function () {\r\n\t\treturn !this.updatedRows.length;\r\n\t},\r\n\t/**\r\n\t *\t@desc: enable/disable named field for data syncing, will use column ids for grid\r\n\t *\t@param: mode - true/false\r\n\t *\t@type: public\r\n\t */\r\n\tenableDataNames: function (mode) {\r\n\t\tthis._endnm = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: enable/disable mode , when only changed fields and row id send to the server side, instead of all fields in default mode\r\n\t *\t@param: mode - true/false\r\n\t *\t@type: public\r\n\t */\r\n\tenablePartialDataSend: function (mode) {\r\n\t\tthis._changed = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: set if rows should be send to server automatically\r\n\t *\t@param: mode - \"row\" - based on row selection changed, \"cell\" - based on cell editing finished, \"off\" - manual data sending\r\n\t *\t@type: public\r\n\t */\r\n\tsetUpdateMode: function (mode, dnd) {\r\n\t\tthis.autoUpdate = (mode == \"cell\");\r\n\t\tthis.updateMode = mode;\r\n\t\tthis.dnd = dnd;\r\n\t},\r\n\tignore: function (code, master) {\r\n\t\tthis._silent_mode = true;\r\n\t\tcode.call(master || window);\r\n\t\tthis._silent_mode = false;\r\n\t},\r\n\t/**\r\n\t *\t@desc: mark row as updated/normal. check mandatory fields,initiate autoupdate (if turned on)\r\n\t *\t@param: rowId - id of row to set update-status for\r\n\t *\t@param: state - true for \"updated\", false for \"not updated\"\r\n\t *\t@param: mode - update mode name\r\n\t *\t@type: public\r\n\t */\r\n\tsetUpdated: function (rowId, state, mode) {\r\n\t\tif (this._silent_mode) return;\r\n\t\tvar ind = this.findRow(rowId);\r\n\r\n\t\tmode = mode || \"updated\";\r\n\t\tvar existing = this.$scheduler.getUserData(rowId, this.action_param);\r\n\t\tif (existing && mode == \"updated\") mode = existing;\r\n\t\tif (state) {\r\n\t\t\tthis.set_invalid(rowId, false); //clear previous error flag\r\n\t\t\tthis.updatedRows[ind] = rowId;\r\n\t\t\tthis.$scheduler.setUserData(rowId, this.action_param, mode);\r\n\t\t\tif (this._in_progress[rowId])\r\n\t\t\t\tthis._in_progress[rowId] = \"wait\";\r\n\t\t} else {\r\n\t\t\tif (!this.is_invalid(rowId)) {\r\n\t\t\t\tthis.updatedRows.splice(ind, 1);\r\n\t\t\t\tthis.$scheduler.setUserData(rowId, this.action_param, \"\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.markRow(rowId, state, mode);\r\n\t\tif (state && this.autoUpdate) this.sendData(rowId);\r\n\t},\r\n\r\n\tmarkRow: function (id, state, mode) {\r\n\t\tvar str = \"\";\r\n\t\tvar invalid = this.is_invalid(id);\r\n\t\tif (invalid) {\r\n\t\t\tstr = this.styles[invalid];\r\n\t\t\tstate = true;\r\n\t\t}\r\n\t\tif (this.callEvent(\"onRowMark\", [id, state, mode, invalid])) {\r\n\t\t\t//default logic\r\n\t\t\tstr = this.styles[state ? mode : \"clear\"] + str;\r\n\r\n\t\t\tthis.$scheduler[this._methods[0]](id, str);\r\n\r\n\t\t\tif (invalid && invalid.details) {\r\n\t\t\t\tstr += this.styles[invalid + \"_cell\"];\r\n\t\t\t\tfor (var i = 0; i < invalid.details.length; i++)\r\n\t\t\t\t\tif (invalid.details[i])\r\n\t\t\t\t\t\tthis.$scheduler[this._methods[1]](id, i, str);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tgetActionByState: function(state) {\r\n\t\tif (state === \"inserted\") {\r\n\t\t\treturn \"create\";\r\n\t\t}\r\n\t\tif (state === \"updated\") {\r\n\t\t\treturn \"update\";\r\n\t\t}\r\n\t\tif (state === \"deleted\") {\r\n\t\t\treturn \"delete\";\r\n\t\t}\r\n\t\treturn \"update\";\r\n\t},\r\n\r\n\tgetState: function (id) {\r\n\t\treturn this.$scheduler.getUserData(id, this.action_param);\r\n\t},\r\n\tis_invalid: function (id) {\r\n\t\treturn this._invalid[id];\r\n\t},\r\n\tset_invalid: function (id, mode, details) {\r\n\t\tif (details) mode = {\r\n\t\t\tvalue: mode, details: details, toString: function () {\r\n\t\t\t\treturn this.value.toString();\r\n\t\t\t}\r\n\t\t};\r\n\t\tthis._invalid[id] = mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: check mandatory fields and varify values of cells, initiate update (if specified)\r\n\t *\t@param: rowId - id of row to set update-status for\r\n\t *\t@type: public\r\n\t */\r\n\tcheckBeforeUpdate: function (rowId) {\r\n\t\treturn true;\r\n\t},\r\n\t/**\r\n\t *\t@desc: send row(s) values to server\r\n\t *\t@param: rowId - id of row which data to send. If not specified, then all \"updated\" rows will be send\r\n\t *\t@type: public\r\n\t */\r\n\tsendData: function (rowId) {\r\n\t\tif (this.$scheduler.editStop) this.$scheduler.editStop();\r\n\r\n\t\tif (typeof rowId == \"undefined\" || this._tSend) return this.sendAllData();\r\n\t\tif (this._in_progress[rowId]) return false;\r\n\r\n\t\tthis.messages = [];\r\n\t\tif (!this.checkBeforeUpdate(rowId) && this.callEvent(\"onValidationError\", [rowId, this.messages])) return false;\r\n\t\tthis._beforeSendData(this._getRowData(rowId), rowId);\r\n\t},\r\n\t_beforeSendData: function (data, rowId) {\r\n\t\tif (!this.callEvent(\"onBeforeUpdate\", [rowId, this.getState(rowId), data])) return false;\r\n\t\tthis._sendData(data, rowId);\r\n\t},\r\n\tserialize: function (data, id) {\r\n\t\tif (this._serializeAsJson) {\r\n\t\t\treturn this._serializeAsJSON(data);\r\n\t\t}\r\n\r\n\t\tif (typeof data == \"string\")\r\n\t\t\treturn data;\r\n\t\tif (typeof id != \"undefined\")\r\n\t\t\treturn this.serialize_one(data, \"\");\r\n\t\telse {\r\n\t\t\tvar stack = [];\r\n\t\t\tvar keys = [];\r\n\t\t\tfor (var key in data)\r\n\t\t\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\t\t\tstack.push(this.serialize_one(data[key], key + this.post_delim));\r\n\t\t\t\t\tkeys.push(key);\r\n\t\t\t\t}\r\n\t\t\tstack.push(\"ids=\" + this.escape(keys.join(\",\")));\r\n\t\t\tif (this.$scheduler.security_key)\r\n\t\t\t\tstack.push(\"dhx_security=\" + (this.$scheduler.security_key));\r\n\t\t\treturn stack.join(\"&\");\r\n\t\t}\r\n\t},\r\n\tserialize_one: function (data, pref) {\r\n\t\tif (typeof data == \"string\")\r\n\t\t\treturn data;\r\n\t\tvar stack = [];\r\n\t\tvar serialized = \"\";\r\n\t\tfor (var key in data)\r\n\t\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\t\tif ((key == \"id\" || key == this.action_param) && this._tMode == \"REST\") continue;\r\n\t\t\t\tif (typeof data[key] === \"string\" || typeof data[key] === \"number\") {\r\n\t\t\t\t\tserialized = data[key];\r\n\t\t\t\t} else {\r\n\t\t\t\t\tserialized = JSON.stringify(data[key]);\r\n\t\t\t\t}\r\n\t\t\t\tstack.push(this.escape((pref || \"\") + key) + \"=\" + this.escape(serialized));\r\n\t\t\t}\r\n\t\treturn stack.join(\"&\");\r\n\t},\r\n\t_applyPayload: function (url) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tif (this._payload)\r\n\t\t\tfor (var key in this._payload)\r\n\t\t\t\turl = url + ajax.urlSeparator(url) + this.escape(key) + \"=\" + this.escape(this._payload[key]);\r\n\t\treturn url;\r\n\t},\r\n\t_sendData: function (dataToSend, rowId) {\r\n\t\tif (!dataToSend) {\r\n\t\t\treturn; // nothing to send\r\n\t\t}\r\n\t\tif (!this.callEvent(\"onBeforeDataSending\", rowId ? [rowId, this.getState(rowId), dataToSend] : [null, null, dataToSend])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (rowId) {\r\n\t\t\tthis._in_progress[rowId] = (new Date()).valueOf();\r\n\t\t}\r\n\r\n\t\tvar self = this;\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\r\n\t\tif (this._tMode === \"CUSTOM\") {\r\n\t\t\tvar state = this.getState(rowId);\r\n\t\t\tvar action = this.getActionByState(state);\r\n\t\t\tvar _onResolvedCreateUpdate = function (tag) {\r\n\t\t\t\tvar resultState = state;\r\n\t\t\t\tif(tag && tag.responseText && tag.setRequestHeader){\r\n\t\t\t\t\tif(tag.status !== 200){\r\n\t\t\t\t\t\tresultState = \"error\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\ttag = JSON.parse(tag.responseText);\r\n\t\t\t\t\t} catch (e){}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tresultState = resultState || \"updated\";\r\n\t\t\t\tvar sid = rowId;\r\n\t\t\t\tvar tid = rowId;\r\n\r\n\t\t\t\tif (tag) {\r\n\t\t\t\t\tresultState = tag.action || resultState;\r\n\t\t\t\t\tsid = tag.sid || sid;\r\n\t\t\t\t\ttid = tag.id || tag.tid || tid;\r\n\t\t\t\t}\r\n\t\t\t\tself.afterUpdateCallback(sid, tid, resultState, tag);\r\n\t\t\t};\r\n\r\n\t\t\tconst routerMode = \"event\";\r\n\t\t\tvar actionPromise;\r\n\t\t\tif (this._router instanceof Function) {\r\n\t\t\t\tactionPromise = this._router(routerMode, action, dataToSend, rowId);\r\n\t\t\t} else {\r\n\t\t\t\tswitch (state) {\r\n\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].create(dataToSend);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].delete(rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].update(dataToSend, rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(actionPromise){\r\n\t\t\t\t// neither promise nor {tid: newId} response object\r\n\t\t\t\tif(!actionPromise.then &&\r\n\t\t\t\t\t(actionPromise.id === undefined && actionPromise.tid === undefined && actionPromise.action === undefined)){\r\n\t\t\t\t\tthrow new Error(\"Incorrect router return value. A Promise or a response object is expected\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(actionPromise.then){\r\n\t\t\t\t\tactionPromise.then(_onResolvedCreateUpdate).catch(function(error) {\r\n\t\t\t\t\t\tif(error && error.action){\r\n\t\t\t\t\t\t\t_onResolvedCreateUpdate(error);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t_onResolvedCreateUpdate({ action: \"error\", value: error});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// custom method may return a response object in case of sync action\r\n\t\t\t\t\t_onResolvedCreateUpdate(actionPromise);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t_onResolvedCreateUpdate(null);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar queryParams = {\r\n\t\t\tcallback: function(xml) {\r\n\t\t\t\tvar ids = [];\r\n\r\n\t\t\t\tif (rowId) {\r\n\t\t\t\t\tids.push(rowId);\r\n\t\t\t\t} else if (dataToSend) {\r\n\t\t\t\t\tfor (var key in dataToSend) {\r\n\t\t\t\t\t\tids.push(key);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.afterUpdate(self, xml, ids);\r\n\t\t\t},\r\n\t\t\theaders: self._headers\r\n\t\t};\r\n\r\n\t\tvar urlParams = this.serverProcessor + (this._user ? (ajax.urlSeparator(this.serverProcessor) + [\"dhx_user=\" + this._user, \"dhx_version=\" + this.$scheduler.getUserData(0, \"version\")].join(\"&\")) : \"\");\r\n\t\tvar url = this._applyPayload(urlParams);\r\n\t\tvar data;\r\n\r\n\t\tswitch (this._tMode) {\r\n\t\t\tcase \"GET\":\r\n\t\t\t\tdata = this._cleanupArgumentsBeforeSend(dataToSend);\r\n\t\t\t\tqueryParams.url = url + ajax.urlSeparator(url) + this.serialize(data, rowId);\r\n\t\t\t\tqueryParams.method = \"GET\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"POST\":\r\n\t\t\t\tdata = this._cleanupArgumentsBeforeSend(dataToSend);\r\n\t\t\t\tqueryParams.url = url;\r\n\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\tqueryParams.data = this.serialize(data, rowId);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"JSON\":\r\n\t\t\t\tdata = {};\r\n\t\t\t\tvar preprocessedData = this._cleanupItemBeforeSend(dataToSend);\r\n\t\t\t\tfor (var key in preprocessedData) {\r\n\t\t\t\t\tif (key === this.action_param || key === \"id\" || key === \"gr_id\") {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdata[key] = preprocessedData[key];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tqueryParams.url = url;\r\n\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\tqueryParams.data = JSON.stringify({\r\n\t\t\t\t\tid: rowId,\r\n\t\t\t\t\taction: dataToSend[this.action_param],\r\n\t\t\t\t\tdata: data\r\n\t\t\t\t});\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"REST\":\r\n\t\t\tcase \"REST-JSON\":\r\n\t\t\t\turl = urlParams.replace(/(&|\\?)editing=true/, \"\");\r\n\t\t\t\tdata = \"\";\r\n\r\n\t\t\t\tswitch (this.getState(rowId)) {\r\n\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\t\t\tqueryParams.data = this.serialize(dataToSend, rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\tqueryParams.method = \"DELETE\";\r\n\t\t\t\t\t\turl = url + (url.slice(-1) === \"/\" ? \"\" : \"/\") + rowId;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tqueryParams.method = \"PUT\";\r\n\t\t\t\t\t\tqueryParams.data = this.serialize(dataToSend, rowId);\r\n\t\t\t\t\t\turl = url + (url.slice(-1) === \"/\" ? \"\" : \"/\") + rowId;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tqueryParams.url = this._applyPayload(url);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tthis._waitMode++;\r\n\t\treturn ajax.query(queryParams);\r\n\t},\r\n\tsendAllData: function () {\r\n\t\tif (!this.updatedRows.length || this.updateMode === \"off\") { // FIXME: need to leave checking 'this.updateMode === \"off\"'?\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.messages = [];\r\n\t\tvar valid = true;\r\n\r\n\t\tthis._forEachUpdatedRow(function(rowId) {\r\n\t\t\tvalid = valid && this.checkBeforeUpdate(rowId);\r\n\t\t});\r\n\r\n\t\tif (!valid && !this.callEvent(\"onValidationError\", [\"\", this.messages])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (this._tSend) {\r\n\t\t\tthis._sendData(this._getAllData());\r\n\t\t} else {\r\n\t\t\tthis._forEachUpdatedRow(function(rowId) {\r\n\t\t\t\tif (!this._in_progress[rowId]) {\r\n\t\t\t\t\tif (this.is_invalid(rowId)) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis._beforeSendData(this._getRowData(rowId), rowId);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\r\n\t_getAllData: function (rowId) {\r\n\t\tvar out = {};\r\n\t\tvar has_one = false;\r\n\t\tthis._forEachUpdatedRow(function(id) {\r\n\t\t\tif (this._in_progress[id] || this.is_invalid(id)){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar row = this._getRowData(id);\r\n\t\t\tif (!this.callEvent(\"onBeforeUpdate\", [id, this.getState(id), row])) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tout[id] = row;\r\n\t\t\thas_one = true;\r\n\t\t\tthis._in_progress[id] = (new Date()).valueOf();\r\n\t\t});\r\n\t\treturn has_one ? out : null;\r\n\t},\r\n\r\n\tfindRow: function (pattern) {\r\n\t\tvar i = 0;\r\n\t\tfor (i = 0; i < this.updatedRows.length; i++)\r\n\t\t\tif (pattern == this.updatedRows[i]) break;\r\n\t\treturn i;\r\n\t},\r\n\r\n\t/**\r\n\t *\t@desc: define custom actions\r\n\t *\t@param: name - name of action, same as value of action attribute\r\n\t *\t@param: handler - custom function, which receives a XMl response content for action\r\n\t *\t@type: private\r\n\t */\r\n\tdefineAction: function (name, handler) {\r\n\t\tif (!this._uActions) this._uActions = {};\r\n\t\tthis._uActions[name] = handler;\r\n\t},\r\n\r\n\t/**\r\n\t *\t @desc: used in combination with setOnBeforeUpdateHandler to create custom client-server transport system\r\n\t *\t @param: sid - id of item before update\r\n\t *\t @param: tid - id of item after up0ate\r\n\t *\t @param: action - action name\r\n\t *\t @type: public\r\n\t *\t @topic: 0\r\n\t */\r\n\tafterUpdateCallback: function (sid, tid, action, btag) {\r\n\t\tif(!this.$scheduler){\r\n\t\t\t// destructor has been called before the callback\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar marker = sid;\r\n\t\tvar correct = (action !== \"error\" && action !== \"invalid\");\r\n\t\tif (!correct) {\r\n\t\t\tthis.set_invalid(sid, action);\r\n\t\t}\r\n\t\tif ((this._uActions) && (this._uActions[action]) && (!this._uActions[action](btag))) {\r\n\t\t\treturn (delete this._in_progress[marker]);\r\n\t\t}\r\n\r\n\t\tif (this._in_progress[marker] !== \"wait\") {\r\n\t\t\tthis.setUpdated(sid, false);\r\n\t\t}\r\n\r\n\t\tvar originalSid = sid;\r\n\r\n\t\tswitch (action) {\r\n\t\t\tcase \"inserted\":\r\n\t\t\tcase \"insert\":\r\n\t\t\t\tif (tid != sid) {\r\n\t\t\t\t\tthis.setUpdated(sid, false);\r\n\t\t\t\t\tthis.$scheduler[this._methods[2]](sid, tid);\r\n\t\t\t\t\tsid = tid;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"delete\":\r\n\t\t\tcase \"deleted\":\r\n\t\t\t\tthis.$scheduler.setUserData(sid, this.action_param, \"true_deleted\");\r\n\t\t\t\tthis.$scheduler[this._methods[3]](sid, tid);\r\n\t\t\t\tdelete this._in_progress[marker];\r\n\t\t\t\treturn this.callEvent(\"onAfterUpdate\", [sid, action, tid, btag]);\r\n\t\t}\r\n\r\n\t\tif (this._in_progress[marker] !== \"wait\") {\r\n\t\t\tif (correct) {\r\n\t\t\t\tthis.$scheduler.setUserData(sid, this.action_param, \"\");\r\n\t\t\t}\r\n\t\t\tdelete this._in_progress[marker];\r\n\t\t} else {\r\n\t\t\tdelete this._in_progress[marker];\r\n\t\t\tthis.setUpdated(tid, true, this.$scheduler.getUserData(sid, this.action_param));\r\n\t\t}\r\n\r\n\t\tthis.callEvent(\"onAfterUpdate\", [originalSid, action, tid, btag]);\r\n\t},\r\n\r\n\t_errorResponse: function (xml, id){\r\n\t\tif(this.$scheduler && this.$scheduler.callEvent){\r\n\t\t\tthis.$scheduler.callEvent(\"onSaveError\", [id, xml.xmlDoc]);\r\n\t\t}\r\n\t\treturn this.cleanUpdate(id);\r\n\t},\r\n\r\n\t_setDefaultTransactionMode: function () {\r\n\t\tif (this.serverProcessor) {\r\n\t\t\tthis.setTransactionMode(\"POST\", true);\r\n\t\t\tthis.serverProcessor += (this.serverProcessor.indexOf(\"?\") !== -1 ? \"&\" : \"?\") + \"editing=true\";\r\n\t\t\tthis._serverProcessor = this.serverProcessor;\r\n\t\t}\r\n\t},\r\n\t\r\n\t/**\r\n\t *\t@desc: response from server\r\n\t *\t@param: xml - XMLLoader object with response XML\r\n\t *\t@type: private\r\n\t */\r\n\tafterUpdate: function (that, xml, id) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\r\n\t\tif (xml.xmlDoc.status !== 200){\r\n\t\t\tthis._errorResponse(xml, id);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// try to use json first\r\n\t\tvar tag;\r\n\t\ttry {\r\n\t\t\ttag = JSON.parse(xml.xmlDoc.responseText);\r\n\t\t} catch (e) {\r\n\t\t\t// empty response also can be processed by json handler\r\n\t\t\tif (!xml.xmlDoc.responseText.length) {\r\n\t\t\t\ttag = {};\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (tag) {\r\n\t\t\tvar action = tag.action || this.getState(id) || \"updated\";\r\n\t\t\tvar sid = tag.sid || id[0];\r\n\t\t\tvar tid = tag.tid || id[0];\r\n\t\t\tthat.afterUpdateCallback(sid, tid, action, tag);\r\n\t\t\tthat.finalizeUpdate();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// xml response\r\n\t\tvar top = ajax.xmltop(\"data\", xml.xmlDoc); // fix incorrect content type in IE\r\n\t\tif (!top) {\r\n\t\t\treturn this._errorResponse(xml, id);\r\n\t\t}\r\n\t\tvar atag = ajax.xpath(\"//data/action\", top);\r\n\t\tif (!atag.length) {\r\n\t\t\treturn this._errorResponse(xml, id);\r\n\t\t}\r\n\r\n\t\tfor (var i = 0; i < atag.length; i++) {\r\n\t\t\tvar btag = atag[i];\r\n\t\t\tvar action = btag.getAttribute(\"type\");\r\n\t\t\tvar sid = btag.getAttribute(\"sid\");\r\n\t\t\tvar tid = btag.getAttribute(\"tid\");\r\n\r\n\t\t\tthat.afterUpdateCallback(sid, tid, action, btag);\r\n\t\t}\r\n\t\tthat.finalizeUpdate();\r\n\t},\r\n\tcleanUpdate: function (id) {\r\n\t\tif (id)\r\n\t\t\tfor (var i = 0; i < id.length; i++)\r\n\t\t\t\tdelete this._in_progress[id[i]];\r\n\t},\r\n\tfinalizeUpdate: function () {\r\n\t\tif (this._waitMode) this._waitMode--;\r\n\r\n\t\tthis.callEvent(\"onAfterUpdateFinish\", []);\r\n\t\tif (!this.updatedRows.length)\r\n\t\t\tthis.callEvent(\"onFullSync\", []);\r\n\t},\r\n\r\n\t/**\r\n\t *\t@desc: initializes data-processor\r\n\t *\t@param: scheduler - dhtmlxScheduler object to attach this data-processor to\r\n\t *\t@type: public\r\n\t */\r\n\tinit: function (scheduler) {\r\n\t\tif (this._initialized) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.$scheduler = scheduler;\r\n\t\tif (this.$scheduler._dp_init) {\r\n\t\t\tthis.$scheduler._dp_init(this);\r\n\t\t}\r\n\r\n\t\tthis._setDefaultTransactionMode();\r\n\r\n\t\tthis._methods=this._methods||[\"_set_event_text_style\",\"\",\"_dp_change_event_id\",\"_dp_hook_delete\"];\r\n\t\textendScheduler(this.$scheduler, this);\r\n\t\tvar dataProcessorEvents = new DataProcessorEvents(this.$scheduler, this);\r\n\t\tdataProcessorEvents.attach();\r\n\t\tthis.attachEvent(\"onDestroy\", function() {\r\n\t\t\tdelete this._getRowData;\r\n\r\n\t\t\tdelete this.$scheduler._dp;\r\n\t\t\tdelete this.$scheduler._dataprocessor;\r\n\t\t\tdelete this.$scheduler._set_event_text_style;\r\n\t\t\tdelete this.$scheduler._dp_change_event_id;\r\n\t\t\tdelete this.$scheduler._dp_hook_delete;\r\n\t\t\tdelete this.$scheduler;\r\n\t\t\tdataProcessorEvents.detach();\r\n\t\t});\r\n\t\tthis.$scheduler.callEvent(\"onDataProcessorReady\", [this]);\r\n\t\tthis._initialized = true;\r\n\r\n\t\tscheduler._dataprocessor=this;\r\n\t},\r\n\r\n\tsetOnAfterUpdate: function (ev) {\r\n\t\tthis.attachEvent(\"onAfterUpdate\", ev);\r\n\t},\r\n\tsetOnBeforeUpdateHandler: function (func) {\r\n\t\tthis.attachEvent(\"onBeforeDataSending\", func);\r\n\t},\r\n\r\n\t/* starts autoupdate mode\r\n\t\t@param interval time interval for sending update requests\r\n\t*/\r\n\tsetAutoUpdate: function (interval, user) {\r\n\t\tinterval = interval || 2000;\r\n\r\n\t\tthis._user = user || (new Date()).valueOf();\r\n\t\tthis._need_update = false;\r\n\t\t//this._loader = null;\r\n\t\tthis._update_busy = false;\r\n\r\n\t\tthis.attachEvent(\"onAfterUpdate\", function (sid, action, tid, xml_node) {\r\n\t\t\tthis.afterAutoUpdate(sid, action, tid, xml_node);\r\n\t\t});\r\n\t\tthis.attachEvent(\"onFullSync\", function () {\r\n\t\t\tthis.fullSync();\r\n\t\t});\r\n\r\n\t\tvar self = this;\r\n\t\tlet intervalId = global.setInterval(function () {\r\n\t\t\tself.loadUpdate();\r\n\t\t}, interval);\r\n\t\tthis.attachEvent(\"onDestroy\", function(){\r\n\t\t\tclearInterval(intervalId);\r\n\t\t});\r\n\t},\r\n\r\n\t/* process updating request answer\r\n\t\tif status == collision version is deprecated\r\n\t\tset flag for autoupdating immediately\r\n\t*/\r\n\tafterAutoUpdate: function (sid, action, tid, xml_node) {\r\n\t\tif (action == 'collision') {\r\n\t\t\tthis._need_update = true;\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t},\r\n\r\n\t/* callback function for onFillSync event\r\n\t\tcall update function if it's need\r\n\t*/\r\n\tfullSync: function () {\r\n\t\tif (this._need_update) {\r\n\t\t\tthis._need_update = false;\r\n\t\t\tthis.loadUpdate();\r\n\t\t}\r\n\t\treturn true;\r\n\t},\r\n\r\n\t/* sends query to the server and call callback function\r\n\t*/\r\n\tgetUpdates: function (url, callback) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tif (this._update_busy)\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t\tthis._update_busy = true;\r\n\r\n\t\tajax.get(url, callback);\r\n\t},\r\n\r\n\t/* returns xml node value\r\n\t\t@param node\r\n\t\t\txml node\r\n\t*/\r\n\t_getXmlNodeValue: function(node) {\r\n\t\tif (node.firstChild) {\r\n\t\t\treturn node.firstChild.nodeValue;\r\n\t\t}\r\n\t\treturn \"\";\r\n\t},\r\n\r\n\t/* loads updates and processes them\r\n\t*/\r\n\tloadUpdate: function () {\r\n\t\tvar self = this;\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tvar version = this.$scheduler.getUserData(0, \"version\");\r\n\t\tvar url = this.serverProcessor + ajax.urlSeparator(this.serverProcessor) + [\"dhx_user=\" + this._user, \"dhx_version=\" + version].join(\"&\");\r\n\t\turl = url.replace(\"editing=true&\", \"\");\r\n\t\tthis.getUpdates(url, function (xml) {\r\n\t\t\tvar vers = ajax.xpath(\"//userdata\", xml);\r\n\t\t\tself.$scheduler.setUserData(0, \"version\", self._getXmlNodeValue(vers[0]));\r\n\r\n\t\t\tvar updates = ajax.xpath(\"//update\", xml);\r\n\t\t\tif (updates.length) {\r\n\t\t\t\tself._silent_mode = true;\r\n\r\n\t\t\t\tfor (var i = 0; i < updates.length; i++) {\r\n\t\t\t\t\tvar status = updates[i].getAttribute(\"status\");\r\n\t\t\t\t\tvar id = updates[i].getAttribute(\"id\");\r\n\t\t\t\t\tvar parent = updates[i].getAttribute(\"parent\");\r\n\t\t\t\t\tswitch (status) {\r\n\t\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"insertCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"updated\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"updateCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"deleteCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tself._silent_mode = false;\r\n\t\t\t}\r\n\t\t\tself._update_busy = false;\r\n\t\t\tself = null;\r\n\t\t});\r\n\t},\r\n\r\n\tdestructor: function() {\r\n\t\tthis.callEvent(\"onDestroy\", []);\r\n\t\tthis.detachAllEvents();\r\n\r\n\t\tthis.updatedRows = [];\r\n\t\tthis._in_progress = {};\r\n\t\tthis._invalid = {};\r\n\t\tthis._headers = null;\r\n\t\tthis._payload = null;\r\n\t\tdelete this._initialized;\r\n\t},\r\n\r\n\turl: function(url) {\r\n\t\tthis.serverProcessor = this._serverProcessor = url;\r\n\t},\r\n\r\n\t_serializeAsJSON: function(data) {\r\n\t\tif (typeof data === \"string\") {\r\n\t\t\treturn data;\r\n\t\t}\r\n\r\n\t\tvar copy = this.$scheduler.utils.copy(data);\r\n\t\tif (this._tMode === \"REST-JSON\") {\r\n\t\t\tdelete copy.id;\r\n\t\t\tdelete copy[this.action_param];\r\n\t\t}\r\n\r\n\t\treturn JSON.stringify(copy);\r\n\t},\r\n\r\n\t// GET/POST/JSON modes of the dataProcessor didn't send the whole data items in 'delete' requests\r\n\t// clear extra info from the data in order not to change the request format\r\n\t_cleanupArgumentsBeforeSend: function(dataToSend) {\r\n\t\tvar processedData;\r\n\t\tif(dataToSend[this.action_param] === undefined){// hash of updated items, and not an individual item\r\n\t\t\tprocessedData = {};\r\n\t\t\tfor(var i in dataToSend) {\r\n\t\t\t\tprocessedData[i] = this._cleanupArgumentsBeforeSend(dataToSend[i]);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tprocessedData = this._cleanupItemBeforeSend(dataToSend);\r\n\t\t}\r\n\t\treturn processedData;\r\n\t},\r\n\t_cleanupItemBeforeSend: function(updatedItem) {\r\n\t\tvar output = null;\r\n\t\tif(updatedItem){\r\n\t\t\tif(updatedItem[this.action_param] === \"deleted\"){\r\n\t\t\t\toutput = {};\r\n\t\t\t\toutput.id = updatedItem.id;\r\n\t\t\t\toutput[this.action_param] = updatedItem[this.action_param];\r\n\t\t\t}else{\r\n\t\t\t\toutput = updatedItem;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn output;\r\n\t},\r\n\r\n\t_forEachUpdatedRow: function(code) {\r\n\t\tvar updatedRows = this.updatedRows.slice();\r\n\t\tfor (var i = 0; i < updatedRows.length; i++) {\r\n\t\t\tvar rowId = updatedRows[i];\r\n\t\t\tif (this.$scheduler.getUserData(rowId, this.action_param)) {\r\n\t\t\t\tcode.call(this, rowId);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t_prepareDataItem: function(item) {\r\n\t\tvar processedItem = {};\r\n\t\tvar scheduler = this.$scheduler;\r\n\t\tvar copy = scheduler.utils.copy(item);\r\n\t\tfor (var i in copy) {\r\n\t\t\tif (i.indexOf(\"_\") === 0) {\r\n\t\t\t\tcontinue;\r\n\t\t\t} else if (copy[i]) {\r\n\t\t\t\tif(copy[i].getUTCFullYear){\r\n\t\t\t\t\tprocessedItem[i] = scheduler._helpers.formatDate(copy[i]);\r\n\t\t\t\t} else if(typeof copy[i] == \"object\") {\r\n\t\t\t\t\tprocessedItem[i] = this._prepareDataItem(copy[i]);\r\n\t\t\t\t} else if(copy[i] === null) {\r\n\t\t\t\t\tprocessedItem[i] = \"\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprocessedItem[i] = copy[i];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tprocessedItem[this.action_param] = scheduler.getUserData(item.id, this.action_param);\r\n\t\treturn processedItem;\r\n\t},\r\n\t_getRowData: function(id) {\r\n\t\tvar dataItem = this.$scheduler.getEvent(id);\r\n\t\tif (!dataItem) {\r\n\t\t\tdataItem = { id: id };\r\n\t\t}\r\n\t\treturn this._prepareDataItem(dataItem);\r\n\t}\r\n};\r\n\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler.createDataProcessor = function(config) {\r\n\tvar router;\r\n\tvar tMode;\r\n\tif (config instanceof Function) {\r\n\t\trouter = config;\r\n\t} else if (config.hasOwnProperty(\"router\")) {\r\n\t\trouter = config.router;\r\n\t} else if(config.hasOwnProperty(\"event\")){\r\n\t\trouter = config;\r\n\t}\r\n\r\n\tif (router) {\r\n\t\ttMode = \"CUSTOM\";\r\n\t} else {\r\n\t\ttMode = config.mode || \"REST-JSON\";\r\n\t}\r\n\r\n\tvar dp = new DataProcessor(config.url);\r\n\tdp.init(scheduler);\r\n\tdp.setTransactionMode({\r\n\t\tmode: tMode,\r\n\t\trouter: router\r\n\t}, config.batchUpdate); // FIXME: config.batchUpdate where it is explained?\r\n\treturn dp;\r\n};\r\n\r\nscheduler.DataProcessor = DataProcessor;\r\n\r\n}\r\n\r\n//var dataProcessor = global.dataProcessor = DataProcessor; // for old","import utils from \"./utils/utils\";\r\nimport domHelpers from \"./utils/dom_helpers\";\r\n\r\n\r\nexport default function(scheduler) {\r\n\r\n\tvar boxAttribute = \"data-dhxbox\";\r\n\r\n\tvar _dhx_msg_cfg = null;\r\n\r\n\tfunction callback(config, result) {\r\n\t\tvar usercall = config.callback;\r\n\t\tmodalBox.hide(config.box);\r\n\r\n\t\t_dhx_msg_cfg = config.box = null;\r\n\tif (usercall)\r\n\t\t\tusercall(result);\r\n\t}\r\n\r\n\tfunction modal_key(event) {\r\n\t\tif (_dhx_msg_cfg) {\r\n\r\n\t\t\tvar code = event.which || event.keyCode;\r\n\t\t\tvar preventDefault = false;\r\n\r\n\t\t\tif (messageBox.keyboard) {\r\n\t\t\t\tif (code == 13 || code == 32) {\r\n\t\t\t\t\t// default behavior is to confirm/submit popup on space/enter\r\n\t\t\t\t\t// if browser focus is set on button element - do button click instead of default behavior\r\n\t\t\t\t\tvar target = event.target || event.srcElement;\r\n\t\t\t\t\tif (domHelpers.getClassName(target).indexOf(\"scheduler_popup_button\") > -1 && target.click) {\r\n\t\t\t\t\t\ttarget.click();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcallback(_dhx_msg_cfg, true);\r\n\t\t\t\t\t\tpreventDefault = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (code == 27) {\r\n\t\t\t\t\tcallback(_dhx_msg_cfg, false);\r\n\t\t\t\t\tpreventDefault = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (preventDefault) {\r\n\t\t\t\tif (event.preventDefault){\r\n\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t}\r\n\t\t\t\treturn !(event.cancelBubble = true);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler.event(document, \"keydown\", modal_key, true);\r\n\r\n\tfunction modality(mode) {\r\n\t\tif (!modality.cover) {\r\n\t\t\tmodality.cover = document.createElement(\"div\");\r\n\t\t\t//necessary for IE only\r\n\t\t\tscheduler.event(modality.cover, \"keydown\", modal_key);\r\n\t\t\tmodality.cover.className = \"dhx_modal_cover\";\r\n\t\t\tdocument.body.appendChild(modality.cover);\r\n\t\t}\r\n\r\n\t\tmodality.cover.style.display = mode ? \"inline-block\" : \"none\";\r\n\t}\r\n\r\n\tfunction button(text, classValue, result) {\r\n\t\tvar buttonAriaAttrs = scheduler._waiAria.messageButtonAttrString(text);\r\n\t\tvar name = (classValue || \"\").toLowerCase().replace(/ /g, \"_\");\r\n\t\tvar buttonCss = `scheduler_${name}_button dhtmlx_${name}_button`; \r\n\t\treturn `
${text}
`;\r\n\t}\r\n\r\n\tfunction info(text) {\r\n\t\tif (!messageBox.area) {\r\n\t\t\tmessageBox.area = document.createElement(\"div\");\r\n\t\t\tmessageBox.area.className = \"scheduler_message_area dhtmlx_message_area\";\r\n\t\t\tmessageBox.area.style[messageBox.position] = \"5px\";\r\n\t\t\tdocument.body.appendChild(messageBox.area);\r\n\t\t}\r\n\r\n\t\tmessageBox.hide(text.id);\r\n\t\tvar message = document.createElement(\"div\");\r\n\t\tmessage.innerHTML = \"
\" + text.text + \"
\";\r\n\t\tmessage.className = \"scheduler-info dhtmlx-info scheduler-\" + text.type + \" dhtmlx-\" + text.type;\r\n\t\tscheduler.event(message, \"click\",function () {\r\n\t\t\tmessageBox.hide(text.id);\r\n\t\t\ttext = null;\r\n\t\t});\r\n\r\n\t\tscheduler._waiAria.messageInfoAttr(message);\r\n\r\n\t\tif (messageBox.position == \"bottom\" && messageBox.area.firstChild)\r\n\t\t\tmessageBox.area.insertBefore(message, messageBox.area.firstChild);\r\n\t\telse\r\n\t\t\tmessageBox.area.appendChild(message);\r\n\r\n\t\tif (text.expire > 0)\r\n\t\t\tmessageBox.timers[text.id] = window.setTimeout(function () {\r\n\t\t\t\t// GS-1213: We need that when Scheduler is destroyed\r\n\t\t\t\tif (messageBox) messageBox.hide(text.id);\r\n\t\t\t}, text.expire);\r\n\r\n\t\tmessageBox.pull[text.id] = message;\r\n\t\tmessage = null;\r\n\r\n\t\treturn text.id;\r\n\t}\r\n\r\n\tfunction getFirstDefined() {\r\n\t\tvar values = [].slice.apply(arguments, [0]);\r\n\r\n\t\tfor (var i = 0; i < values.length; i++) {\r\n\t\t\tif (values[i]) {\r\n\t\t\t\treturn values[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tfunction _boxStructure(config, ok, cancel) {\r\n\t\tvar box = document.createElement(\"div\");\r\n\r\n\t\tvar contentId = utils.uid();\r\n\t\tscheduler._waiAria.messageModalAttr(box, contentId);\r\n\r\n\r\n\t\tbox.className = \" scheduler_modal_box dhtmlx_modal_box scheduler-\" + config.type + \" dhtmlx-\" + config.type;\r\n\t\tbox.setAttribute(boxAttribute, 1);\r\n\r\n\t\tvar inner = '';\r\n\r\n\t\tif (config.width)\r\n\t\t\tbox.style.width = config.width;\r\n\t\tif (config.height)\r\n\t\t\tbox.style.height = config.height;\r\n\t\tif (config.title)\r\n\t\t\tinner += '
' + config.title + '
';\r\n\t\tinner += '
' + (config.content ? '' : config.text) + '
';\r\n\t\tif (ok)\r\n\t\t\tinner += button(getFirstDefined(config.ok, scheduler.locale.labels.message_ok, \"OK\"), \"ok\", true);\r\n\t\tif (cancel)\r\n\t\t\tinner += button(getFirstDefined(config.cancel, scheduler.locale.labels.message_cancel, \"Cancel\"), \"cancel\", false);\r\n\r\n\t\tif (config.buttons) {\r\n\t\t\tfor (var i = 0; i < config.buttons.length; i++) {\r\n\t\t\t\tvar btn = config.buttons[i];\r\n\t\t\t\tif (typeof btn == \"object\") {\r\n\t\t\t\t\t// Support { label:\"Save\", css:\"main_button\", value:\"save\" }\r\n\t\t\t\t\tvar label = btn.label;\r\n\t\t\t\t\tvar css = btn.css || (\"scheduler_\" + btn.label.toLowerCase() + \"_button dhtmlx_\" + btn.label.toLowerCase() + \"_button\");\r\n\t\t\t\t\tvar value = btn.value || i;\r\n\t\t\t\t\tinner += button(label, css, value);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tinner += button(btn, btn, i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tinner += '
';\r\n\t\tbox.innerHTML = inner;\r\n\r\n\t\tif (config.content) {\r\n\t\t\tvar node = config.content;\r\n\t\t\tif (typeof node == \"string\")\r\n\t\t\t\tnode = document.getElementById(node);\r\n\t\t\tif (node.style.display == 'none')\r\n\t\t\t\tnode.style.display = \"\";\r\n\t\t\tbox.childNodes[config.title ? 1 : 0].appendChild(node);\r\n\t\t}\r\n\r\n\t\tscheduler.event(box, \"click\", function (event) {\r\n\t\t\tvar source = event.target || event.srcElement;\r\n\t\t\tif (!source.className) source = source.parentNode;\r\n\t\t\tif (domHelpers.closest(source, \".scheduler_popup_button\")) {\r\n\t\t\t\tvar result = source.getAttribute(\"data-result\");\r\n\t\t\t\tresult = (result == \"true\") || (result == \"false\" ? false : result);\r\n\t\t\t\tcallback(config, result);\r\n\t\t\t}\r\n\t\t});\r\n\t\tconfig.box = box;\r\n\t\tif (ok || cancel)\r\n\t\t\t_dhx_msg_cfg = config;\r\n\r\n\t\treturn box;\r\n\t}\r\n\r\n\tfunction _createBox(config, ok, cancel) {\r\n\t\tvar box = config.tagName ? config : _boxStructure(config, ok, cancel);\r\n\r\n\t\tif (!config.hidden)\r\n\t\t\tmodality(true);\r\n\t\tdocument.body.appendChild(box);\r\n\t\tvar x = Math.abs(Math.floor(((window.innerWidth || document.documentElement.offsetWidth) - box.offsetWidth) / 2));\r\n\t\tvar y = Math.abs(Math.floor(((window.innerHeight || document.documentElement.offsetHeight) - box.offsetHeight) / 2));\r\n\t\tif (config.position == \"top\")\r\n\t\t\tbox.style.top = \"-3px\";\r\n\t\telse\r\n\t\t\tbox.style.top = y + 'px';\r\n\t\tbox.style.left = x + 'px';\r\n\t\t//necessary for IE only\r\n\t\tscheduler.event(box, \"keydown\", modal_key);\r\n\r\n\t\tmodalBox.focus(box);\r\n\r\n\t\tif (config.hidden)\r\n\t\t\tmodalBox.hide(box);\r\n\r\n\t\tscheduler.callEvent(\"onMessagePopup\", [box]);\r\n\t\treturn box;\r\n\t}\r\n\r\n\tfunction alertPopup(config) {\r\n\t\treturn _createBox(config, true, false);\r\n\t}\r\n\r\n\tfunction confirmPopup(config) {\r\n\t\treturn _createBox(config, true, true);\r\n\t}\r\n\r\n\tfunction boxPopup(config) {\r\n\t\treturn _createBox(config);\r\n\t}\r\n\r\n\tfunction box_params(text, type, callback) {\r\n\t\tif (typeof text != \"object\") {\r\n\t\t\tif (typeof type == \"function\") {\r\n\t\t\t\tcallback = type;\r\n\t\t\t\ttype = \"\";\r\n\t\t\t}\r\n\t\t\ttext = {text: text, type: type, callback: callback};\r\n\t\t}\r\n\t\treturn text;\r\n\t}\r\n\r\n\tfunction params(text, type, expire, id) {\r\n\t\tif (typeof text != \"object\")\r\n\t\t\ttext = {text: text, type: type, expire: expire, id: id};\r\n\t\ttext.id = text.id || utils.uid();\r\n\t\ttext.expire = text.expire || messageBox.expire;\r\n\t\treturn text;\r\n\t}\r\n\r\n\tvar alertBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"confirm\";\r\n\t\treturn alertPopup(text);\r\n\t};\r\n\tvar confirmBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"alert\";\r\n\t\treturn confirmPopup(text);\r\n\t};\r\n\tvar modalBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"alert\";\r\n\t\treturn boxPopup(text);\r\n\t};\r\n\tmodalBox.hide = function (node) {\r\n\t\twhile (node && node.getAttribute && !node.getAttribute(boxAttribute))\r\n\t\t\tnode = node.parentNode;\r\n\t\tif (node) {\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t\tmodality(false);\r\n\r\n\t\t\tscheduler.callEvent(\"onAfterMessagePopup\", [node]);\r\n\t\t}\r\n\t};\r\n\r\n\tmodalBox.focus = function (node) {\r\n\t\tsetTimeout(function () {\r\n\t\t\tvar focusable = domHelpers.getFocusableNodes(node);\r\n\t\t\tif (focusable.length) {\r\n\t\t\t\tif (focusable[0].focus) focusable[0].focus();\r\n\t\t\t}\r\n\t\t}, 1);\r\n\t};\r\n\r\n\tvar messageBox = function (text, type, expire, id) {\r\n\t\ttext = params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"info\";\r\n\r\n\t\tvar subtype = text.type.split(\"-\")[0];\r\n\t\tswitch (subtype) {\r\n\t\t\tcase \"alert\":\r\n\t\t\t\treturn alertPopup(text);\r\n\t\t\tcase \"confirm\":\r\n\t\t\t\treturn confirmPopup(text);\r\n\t\t\tcase \"modalbox\":\r\n\t\t\t\treturn boxPopup(text);\r\n\t\t\tdefault:\r\n\t\t\t\treturn info(text);\r\n\t\t}\r\n\t};\r\n\r\n\tmessageBox.seed = (new Date()).valueOf();\r\n\tmessageBox.uid = utils.uid;\r\n\tmessageBox.expire = 4000;\r\n\tmessageBox.keyboard = true;\r\n\tmessageBox.position = \"top\";\r\n\tmessageBox.pull = {};\r\n\tmessageBox.timers = {};\r\n\r\n\tmessageBox.hideAll = function () {\r\n\t\tfor (var key in messageBox.pull)\r\n\t\t\tmessageBox.hide(key);\r\n\t};\r\n\tmessageBox.hide = function (id) {\r\n\t\tvar obj = messageBox.pull[id];\r\n\t\tif (obj && obj.parentNode) {\r\n\t\t\twindow.setTimeout(function () {\r\n\t\t\t\tobj.parentNode.removeChild(obj);\r\n\t\t\t\tobj = null;\r\n\t\t\t}, 2000);\r\n\t\t\tobj.className += \" hidden\";\r\n\r\n\t\t\tif (messageBox.timers[id])\r\n\t\t\t\twindow.clearTimeout(messageBox.timers[id]);\r\n\t\t\tdelete messageBox.pull[id];\r\n\t\t}\r\n\t};\r\n\r\n\tvar popups = [];\r\n\tscheduler.attachEvent(\"onMessagePopup\", function(box){\r\n\t\tpopups.push(box);\r\n\t});\r\n\tscheduler.attachEvent(\"onAfterMessagePopup\", function(box){\r\n\t\tfor(var i = 0; i < popups.length; i++){\r\n\t\t\tif(popups[i] === box){\r\n\t\t\t\tpopups.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tif(modality.cover && modality.cover.parentNode){\r\n\t\t\tmodality.cover.parentNode.removeChild(modality.cover);\r\n\t\t}\r\n\r\n\t\tfor(var i = 0; i < popups.length; i++){\r\n\t\t\tif(popups[i].parentNode){\r\n\t\t\t\tpopups[i].parentNode.removeChild(popups[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\tpopups = null;\r\n\r\n\t\tif(messageBox.area && messageBox.area.parentNode){\r\n\t\t\tmessageBox.area.parentNode.removeChild(messageBox.area);\r\n\t\t}\r\n\t\tmessageBox = null;\r\n\t});\r\n\r\n\treturn {\r\n\t\talert: alertBox,\r\n\t\tconfirm: confirmBox,\r\n\t\tmessage: messageBox,\r\n\t\tmodalbox: modalBox\r\n\t};\r\n}","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"كانون الثاني\", \"شباط\", \"آذار\", \"نيسان\", \"أيار\", \"حزيران\", \"تموز\", \"آب\", \"أيلول\", \"تشرين الأول\", \"تشرين الثاني\", \"كانون الأول\"],\r\n\t\tmonth_short: [\"يناير\", \"فبراير\", \"مارس\", \"أبريل\", \"مايو\", \"يونيو\", \"يوليو\", \"أغسطس\", \"سبتمبر\", \"أكتوبر\", \"نوفمبر\", \"ديسمبر\"],\r\n\t\tday_full: [\"الأحد\", \"الأثنين\", \"ألثلاثاء\", \"الأربعاء\", \"ألحميس\", \"ألجمعة\", \"السبت\"],\r\n\t\tday_short: [\"احد\", \"اثنين\", \"ثلاثاء\", \"اربعاء\", \"خميس\", \"جمعة\", \"سبت\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"اليوم\",\r\n\t\tday_tab: \"يوم\",\r\n\t\tweek_tab: \"أسبوع\",\r\n\t\tmonth_tab: \"شهر\",\r\n\t\tnew_event: \"حدث جديد\",\r\n\t\ticon_save: \"اخزن\",\r\n\t\ticon_cancel: \"الغاء\",\r\n\t\ticon_details: \"تفاصيل\",\r\n\t\ticon_edit: \"تحرير\",\r\n\t\ticon_delete: \"حذف\",\r\n\t\tconfirm_closing: \"التغييرات سوف تضيع, هل انت متأكد؟\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"الحدث سيتم حذفها نهائيا ، هل أنت متأكد؟\",\r\n\t\tsection_description: \"الوصف\",\r\n\t\tsection_time: \"الفترة الزمنية\",\r\n\t\tfull_day: \"طوال اليوم\",\r\n\r\n\t\tconfirm_recurring: \"هل تريد تحرير مجموعة كاملة من الأحداث المتكررة؟\",\r\n\t\tsection_recurring: \"تكرار الحدث\",\r\n\t\tbutton_recurring: \"تعطيل\",\r\n\t\tbutton_recurring_open: \"تمكين\",\r\n\t\tbutton_edit_series: \"تحرير سلسلة\",\r\n\t\tbutton_edit_occurrence: \"تعديل نسخة\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"جدول\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};\r\n\r\n\r\n","/*\r\n Translation by Sofya Morozova\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Студзень\", \"Люты\", \"Сакавік\", \"Красавік\", \"Maй\", \"Чэрвень\", \"Ліпень\", \"Жнівень\", \"Верасень\", \"Кастрычнік\", \"Лістапад\", \"Снежань\"],\r\n\t\tmonth_short: [\"Студз\", \"Лют\", \"Сак\", \"Крас\", \"Maй\", \"Чэр\", \"Ліп\", \"Жнів\", \"Вер\", \"Каст\", \"Ліст\", \"Снеж\"],\r\n\t\tday_full: [ \"Нядзеля\", \"Панядзелак\", \"Аўторак\", \"Серада\", \"Чацвер\", \"Пятніца\", \"Субота\"],\r\n\t\tday_short: [\"Нд\", \"Пн\", \"Аўт\", \"Ср\", \"Чцв\", \"Пт\", \"Сб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сёння\",\r\n\t\tday_tab: \"Дзень\",\r\n\t\tweek_tab: \"Тыдзень\",\r\n\t\tmonth_tab: \"Месяц\",\r\n\t\tnew_event: \"Новая падзея\",\r\n\t\ticon_save: \"Захаваць\",\r\n\t\ticon_cancel: \"Адмяніць\",\r\n\t\ticon_details: \"Дэталі\",\r\n\t\ticon_edit: \"Змяніць\",\r\n\t\ticon_delete: \"Выдаліць\",\r\n\t\tconfirm_closing: \"\", //Унесеныя змены будуць страчаны, працягнуць?\r\n\t\tconfirm_deleting: \"Падзея будзе выдалена незваротна, працягнуць?\",\r\n\t\tsection_description: \"Апісанне\",\r\n\t\tsection_time: \"Перыяд часу\",\r\n\t\tfull_day: \"Увесь дзень\",\r\n\r\n\t\tconfirm_recurring: \"Вы хочаце змяніць усю серыю паўтаральных падзей?\",\r\n\t\tsection_recurring: \"Паўтарэнне\",\r\n\t\tbutton_recurring: \"Адключана\",\r\n\t\tbutton_recurring_open: \"Уключана\",\r\n\t\tbutton_edit_series: \"Рэдагаваць серыю\",\r\n\t\tbutton_edit_occurrence: \"Рэдагаваць асобнік\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Спіс\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Апісанне\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Год\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Спіс\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Спic\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Дзень\",\r\n\t\trepeat_radio_week: \"Тыдзень\",\r\n\t\trepeat_radio_month: \"Месяц\",\r\n\t\trepeat_radio_year: \"Год\",\r\n\t\trepeat_radio_day_type: \"Кожны\",\r\n\t\trepeat_text_day_count: \"дзень\",\r\n\t\trepeat_radio_day_type2: \"Кожны працоўны дзень\",\r\n\t\trepeat_week: \" Паўтараць кожны\",\r\n\t\trepeat_text_week_count: \"тыдзень\",\r\n\t\trepeat_radio_month_type: \"Паўтараць\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" чысла кожнага\",\r\n\t\trepeat_text_month_count: \"месяцу\",\r\n\t\trepeat_text_month_count2_before: \"кожны \",\r\n\t\trepeat_text_month_count2_after: \"месяц\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"дзень\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без даты заканчэння\",\r\n\t\trepeat_text_occurences_count: \"паўтораў\",\r\n\t\trepeat_radio_end2: \"\",\r\n\t\trepeat_radio_end3: \"Да \",\r\n\t\tmonth_for_recurring: [\"Студзеня\", \"Лютага\", \"Сакавіка\", \"Красавіка\", \"Мая\", \"Чэрвеня\", \"Ліпeня\", \"Жніўня\", \"Верасня\", \"Кастрычніка\", \"Лістапада\", \"Снежня\"],\r\n\t\tday_for_recurring: [\"Нядзелю\", \"Панядзелак\", \"Аўторак\", \"Сераду\", \"Чацвер\", \"Пятніцу\", \"Суботу\"]\r\n\t}\r\n};\r\n","/*\r\n @Traducido por Vicente Adria Bohigues - vicenteadria@hotmail.com\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Gener\", \"Febrer\", \"Març\", \"Abril\", \"Maig\", \"Juny\", \"Juliol\", \"Agost\", \"Setembre\", \"Octubre\", \"Novembre\", \"Desembre\"],\r\n\t\tmonth_short: [\"Gen\", \"Feb\", \"Mar\", \"Abr\", \"Mai\", \"Jun\", \"Jul\", \"Ago\", \"Set\", \"Oct\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Diumenge\", \"Dilluns\", \"Dimarts\", \"Dimecres\", \"Dijous\", \"Divendres\", \"Dissabte\"],\r\n\t\tday_short: [\"Dg\", \"Dl\", \"Dm\", \"Dc\", \"Dj\", \"Dv\", \"Ds\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hui\",\r\n\t\tday_tab: \"Dia\",\r\n\t\tweek_tab: \"Setmana\",\r\n\t\tmonth_tab: \"Mes\",\r\n\t\tnew_event: \"Nou esdeveniment\",\r\n\t\ticon_save: \"Guardar\",\r\n\t\ticon_cancel: \"Cancel·lar\",\r\n\t\ticon_details: \"Detalls\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Esborrar\",\r\n\t\tconfirm_closing: \"\", //\"Els seus canvis es perdràn, continuar ?\"\r\n\t\tconfirm_deleting: \"L'esdeveniment s'esborrarà definitivament, continuar ?\",\r\n\t\tsection_description: \"Descripció\",\r\n\t\tsection_time: \"Periode de temps\",\r\n\t\tfull_day: \"Tot el dia\",\r\n\r\n\t\tconfirm_recurring: \"¿Desitja modificar el conjunt d'esdeveniments repetits?\",\r\n\t\tsection_recurring: \"Repeteixca l'esdeveniment\",\r\n\t\tbutton_recurring: \"Impedit\",\r\n\t\tbutton_recurring_open: \"Permés\",\r\n\t\tbutton_edit_series: \"Edit sèrie\",\r\n\t\tbutton_edit_occurrence: \"Edita Instància\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descripció\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Any\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Taula\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};","/*\r\nTranslation by FreezeSoul\r\n*/\r\n//scheduler.config.day_date=\"%M %d日 %D\";\r\n//scheduler.config.default_date=\"%Y年 %M %d日\";\r\n//scheduler.config.month_date=\"%Y年 %M\";\r\n\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"一月\", \"二月\", \"三月\", \"四月\", \"五月\", \"六月\", \"七月\", \"八月\", \"九月\", \"十月\", \"十一月\", \"十二月\"],\r\n\t\tmonth_short: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tday_full: [\"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\"],\r\n\t\tday_short: [\"日\", \"一\", \"二\", \"三\", \"四\", \"五\", \"六\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"今天\",\r\n\t\tday_tab: \"日\",\r\n\t\tweek_tab: \"周\",\r\n\t\tmonth_tab: \"月\",\r\n\t\tnew_event: \"新建日程\",\r\n\t\ticon_save: \"保存\",\r\n\t\ticon_cancel: \"关闭\",\r\n\t\ticon_details: \"详细\",\r\n\t\ticon_edit: \"编辑\",\r\n\t\ticon_delete: \"删除\",\r\n\t\tconfirm_closing: \"请确认是否撤销修改!\", //Your changes will be lost, are your sure?\r\n\t\tconfirm_deleting: \"是否删除日程?\",\r\n\t\tsection_description: \"描述\",\r\n\t\tsection_time: \"时间范围\",\r\n\t\tfull_day: \"整天\",\r\n\r\n\t\tconfirm_recurring:\"请确认是否将日程设为重复模式?\",\r\n\t\tsection_recurring:\"重复周期\",\r\n\t\tbutton_recurring:\"禁用\",\r\n\t\tbutton_recurring_open:\"启用\",\r\n\t\tbutton_edit_series: \"编辑系列\",\r\n\t\tbutton_edit_occurrence: \"编辑实例\",\r\n\t\t\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"议程\",\r\n\t\tdate:\"日期\",\r\n\t\tdescription:\"说明\",\r\n\t\t\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"今年\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"议程\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab:\"电网\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"按天\",\r\n\t\trepeat_radio_week: \"按周\",\r\n\t\trepeat_radio_month: \"按月\",\r\n\t\trepeat_radio_year: \"按年\",\r\n\t\trepeat_radio_day_type: \"每\",\r\n\t\trepeat_text_day_count: \"天\",\r\n\t\trepeat_radio_day_type2: \"每个工作日\",\r\n\t\trepeat_week: \" 重复 每\",\r\n\t\trepeat_text_week_count: \"星期的:\",\r\n\t\trepeat_radio_month_type: \"重复\",\r\n\t\trepeat_radio_month_start: \"在\",\r\n\t\trepeat_text_month_day: \"日 每\",\r\n\t\trepeat_text_month_count: \"月\",\r\n\t\trepeat_text_month_count2_before: \"每\",\r\n\t\trepeat_text_month_count2_after: \"月\",\r\n\t\trepeat_year_label: \"在\",\r\n\t\tselect_year_day2: \"的\",\r\n\t\trepeat_text_year_day: \"日\",\r\n\t\tselect_year_month: \"月\",\r\n\t\trepeat_radio_end: \"无结束日期\",\r\n\t\trepeat_text_occurences_count: \"次结束\",\r\n\t\trepeat_radio_end2: \"重复\",\r\n\t\trepeat_radio_end3: \"结束于\",\r\n\t\tmonth_for_recurring: [\"一月\", \"二月\", \"三月\", \"四月\", \"五月\", \"六月\", \"七月\", \"八月\", \"九月\", \"十月\", \"十一月\", \"十二月\"],\r\n\t\tday_for_recurring: [\"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Leden\", \"Únor\", \"Březen\", \"Duben\", \"Květen\", \"Červen\", \"Červenec\", \"Srpen\", \"Září\", \"Říjen\", \"Listopad\", \"Prosinec\"],\r\n\t\tmonth_short: [\"Led\", \"Ún\", \"Bře\", \"Dub\", \"Kvě\", \"Čer\", \"Čec\", \"Srp\", \"Září\", \"Říj\", \"List\", \"Pro\"],\r\n\t\tday_full: [\"Neděle\", \"Pondělí\", \"Úterý\", \"Středa\", \"Čtvrtek\", \"Pátek\", \"Sobota\"],\r\n\t\tday_short: [\"Ne\", \"Po\", \"Út\", \"St\", \"Čt\", \"Pá\", \"So\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dnes\",\r\n\t\tday_tab: \"Den\",\r\n\t\tweek_tab: \"Týden\",\r\n\t\tmonth_tab: \"Měsíc\",\r\n\t\tnew_event: \"Nová událost\",\r\n\t\ticon_save: \"Uložit\",\r\n\t\ticon_cancel: \"Zpět\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edituj\",\r\n\t\ticon_delete: \"Smazat\",\r\n\t\tconfirm_closing: \"\", //Vaše změny budou ztraceny, opravdu ?\r\n\t\tconfirm_deleting: \"Událost bude trvale smazána, opravdu?\",\r\n\t\tsection_description: \"Poznámky\",\r\n\t\tsection_time: \"Doba platnosti\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Přejete si upravit celou řadu opakovaných událostí?\",\r\n\t\tsection_recurring: \"Opakování události\",\r\n\t\tbutton_recurring: \"Vypnuto\",\r\n\t\tbutton_recurring_open: \"Zapnuto\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Upravit instance\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Program\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Poznámka\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\t\tfull_day: \"Full day\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Program\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Mřížka\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Denně\",\r\n\t\trepeat_radio_week: \"Týdně\",\r\n\t\trepeat_radio_month: \"Měsíčně\",\r\n\t\trepeat_radio_year: \"Ročně\",\r\n\t\trepeat_radio_day_type: \"každý\",\r\n\t\trepeat_text_day_count: \"Den\",\r\n\t\trepeat_radio_day_type2: \"pracovní dny\",\r\n\t\trepeat_week: \"Opakuje každých\",\r\n\t\trepeat_text_week_count: \"Týdnů na:\",\r\n\t\trepeat_radio_month_type: \"u každého\",\r\n\t\trepeat_radio_month_start: \"na\",\r\n\t\trepeat_text_month_day: \"Den každého\",\r\n\t\trepeat_text_month_count: \"Měsíc\",\r\n\t\trepeat_text_month_count2_before: \"každý\",\r\n\t\trepeat_text_month_count2_after: \"Měsíc\",\r\n\t\trepeat_year_label: \"na\",\r\n\t\tselect_year_day2: \"v\",\r\n\t\trepeat_text_year_day: \"Den v\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"bez data ukončení\",\r\n\t\trepeat_text_occurences_count: \"Události\",\r\n\t\trepeat_radio_end2: \"po\",\r\n\t\trepeat_radio_end3: \"Konec\",\r\n\t\tmonth_for_recurring: [\"Leden\", \"Únor\", \"Březen\", \"Duben\", \"Květen\", \"Červen\", \"Červenec\", \"Srpen\", \"Září\", \"Říjen\", \"Listopad\", \"Prosinec\"],\r\n\t\tday_for_recurring: [\"Neděle \", \"Pondělí\", \"Úterý\", \"Středa\", \"Čtvrtek\", \"Pátek\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Marts\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Man\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uge\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny begivenhed\",\r\n\t\ticon_save: \"Gem\",\r\n\t\ticon_cancel: \"Fortryd\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Tilret\",\r\n\t\ticon_delete: \"Slet\",\r\n\t\tconfirm_closing: \"Dine rettelser vil gå tabt.. Er dy sikker?\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Bigivenheden vil blive slettet permanent. Er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du tilrette hele serien af gentagne begivenheder?\",\r\n\t\tsection_recurring: \"Gentag begivenhed\",\r\n\t\tbutton_recurring: \"Frakoblet\",\r\n\t\tbutton_recurring_open: \"Tilkoblet\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Rediger en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dagsorden\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dagsorden\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daglig\",\r\n\t\trepeat_radio_week: \"Ugenlig\",\r\n\t\trepeat_radio_month: \"Månedlig\",\r\n\t\trepeat_radio_year: \"Årlig\",\r\n\t\trepeat_radio_day_type: \"Hver\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"På hver arbejdsdag\",\r\n\t\trepeat_week: \" Gentager sig hver\",\r\n\t\trepeat_text_week_count: \"uge på følgende dage:\",\r\n\t\trepeat_radio_month_type: \"Hver den\",\r\n\t\trepeat_radio_month_start: \"Den\",\r\n\t\trepeat_text_month_day: \" i hver\",\r\n\t\trepeat_text_month_count: \"måned\",\r\n\t\trepeat_text_month_count2_before: \"hver\",\r\n\t\trepeat_text_month_count2_after: \"måned\",\r\n\t\trepeat_year_label: \"Den\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Ingen slutdato\",\r\n\t\trepeat_text_occurences_count: \"gentagelse\",\r\n\t\trepeat_radio_end2: \"Efter\",\r\n\t\trepeat_radio_end3: \"Slut\",\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"März\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Dezember\"],\r\n\t\tday_for_recurring: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\" Januar\", \" Februar\", \" März \", \" April\", \" Mai\", \" Juni\", \" Juli\", \" August\", \" September \", \" Oktober\", \" November \", \" Dezember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mär\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dez\"],\r\n\t\tday_full: [ \"Sonntag\", \"Montag\", \"Dienstag\", \" Mittwoch\", \" Donnerstag\", \"Freitag\", \"Samstag\"],\r\n\t\tday_short: [\"So\", \"Mo\", \"Di\", \"Mi\", \"Do\", \"Fr\", \"Sa\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Heute\",\r\n\t\tday_tab: \"Tag\",\r\n\t\tweek_tab: \"Woche\",\r\n\t\tmonth_tab: \"Monat\",\r\n\t\tnew_event: \"neuer Eintrag\",\r\n\t\ticon_save: \"Speichern\",\r\n\t\ticon_cancel: \"Abbrechen\",\r\n\t\ticon_details: \"Details\",\r\n\t\ticon_edit: \"Ändern\",\r\n\t\ticon_delete: \"Löschen\",\r\n\t\tconfirm_closing: \"\", //\"Ihre Veränderungen werden verloren sein, wollen Sie ergänzen? \"\r\n\t\tconfirm_deleting: \"Der Eintrag wird gelöscht\",\r\n\t\tsection_description: \"Beschreibung\",\r\n\t\tsection_time: \"Zeitspanne\",\r\n\t\tfull_day: \"Ganzer Tag\",\r\n\r\n\t\tconfirm_recurring: \"Wollen Sie alle Einträge bearbeiten oder nur diesen einzelnen Eintrag?\",\r\n\t\tsection_recurring: \"Wiederholung\",\r\n\t\tbutton_recurring: \"Aus\",\r\n\t\tbutton_recurring_open: \"An\",\r\n\t\tbutton_edit_series: \"Bearbeiten Sie die Serie\",\r\n\t\tbutton_edit_occurrence: \"Bearbeiten Sie eine Kopie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Beschreibung\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Jahre\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Täglich\",\r\n\t\trepeat_radio_week: \"Wöchentlich\",\r\n\t\trepeat_radio_month: \"Monatlich\",\r\n\t\trepeat_radio_year: \"Jährlich\",\r\n\t\trepeat_radio_day_type: \"jeden\",\r\n\t\trepeat_text_day_count: \"Tag\",\r\n\t\trepeat_radio_day_type2: \"an jedem Arbeitstag\",\r\n\t\trepeat_week: \" Wiederholt sich jede\",\r\n\t\trepeat_text_week_count: \"Woche am:\",\r\n\t\trepeat_radio_month_type: \"an jedem\",\r\n\t\trepeat_radio_month_start: \"am\",\r\n\t\trepeat_text_month_day: \"Tag eines jeden\",\r\n\t\trepeat_text_month_count: \"Monats\",\r\n\t\trepeat_text_month_count2_before: \"jeden\",\r\n\t\trepeat_text_month_count2_after: \"Monats\",\r\n\t\trepeat_year_label: \"am\",\r\n\t\tselect_year_day2: \"im\",\r\n\t\trepeat_text_year_day: \"Tag im\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"kein Enddatum\",\r\n\t\trepeat_text_occurences_count: \"Ereignissen\",\r\n\t\trepeat_radio_end3: \"Schluß\",\r\n\t\trepeat_radio_end2: \"nach\",\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"März\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Dezember\"],\r\n\t\tday_for_recurring: [\"Sonntag\", \"Montag\", \"Dienstag\", \"Mittwoch\", \"Donnerstag\", \"Freitag\", \"Samstag\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Ιανουάριος\", \"Φεβρουάριος\", \"Μάρτιος\", \"Απρίλιος\", \"Μάϊος\", \"Ιούνιος\", \"Ιούλιος\", \"Αύγουστος\", \"Σεπτέμβριος\", \"Οκτώβριος\", \"Νοέμβριος\", \"Δεκέμβριος\"],\r\n\t\tmonth_short: [\"ΙΑΝ\", \"ΦΕΒ\", \"ΜΑΡ\", \"ΑΠΡ\", \"ΜΑΙ\", \"ΙΟΥΝ\", \"ΙΟΥΛ\", \"ΑΥΓ\", \"ΣΕΠ\", \"ΟΚΤ\", \"ΝΟΕ\", \"ΔΕΚ\"],\r\n\t\tday_full: [\"Κυριακή\", \"Δευτέρα\", \"Τρίτη\", \"Τετάρτη\", \"Πέμπτη\", \"Παρασκευή\", \"Σάββατο\"],\r\n\t\tday_short: [\"ΚΥ\", \"ΔΕ\", \"ΤΡ\", \"ΤΕ\", \"ΠΕ\", \"ΠΑ\", \"ΣΑ\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Σήμερα\",\r\n\t\tday_tab: \"Ημέρα\",\r\n\t\tweek_tab: \"Εβδομάδα\",\r\n\t\tmonth_tab: \"Μήνας\",\r\n\t\tnew_event: \"Νέο έργο\",\r\n\t\ticon_save: \"Αποθήκευση\",\r\n\t\ticon_cancel: \"Άκυρο\",\r\n\t\ticon_details: \"Λεπτομέρειες\",\r\n\t\ticon_edit: \"Επεξεργασία\",\r\n\t\ticon_delete: \"Διαγραφή\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Το έργο θα διαγραφεί οριστικά. Θέλετε να συνεχίσετε;\",\r\n\t\tsection_description: \"Περιγραφή\",\r\n\t\tsection_time: \"Χρονική περίοδος\",\r\n\t\tfull_day: \"Πλήρης Ημέρα\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Θέλετε να επεξεργασθείτε ολόκληρη την ομάδα των επαναλαμβανόμενων έργων;\",\r\n\t\tsection_recurring: \"Επαναλαμβανόμενο έργο\",\r\n\t\tbutton_recurring: \"Ανενεργό\",\r\n\t\tbutton_recurring_open: \"Ενεργό\",\r\n\t\tbutton_edit_series: \"Επεξεργαστείτε τη σειρά\",\r\n\t\tbutton_edit_occurrence: \"Επεξεργασία ένα αντίγραφο\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Ημερήσια Διάταξη\",\r\n\t\tdate: \"Ημερομηνία\",\r\n\t\tdescription: \"Περιγραφή\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Έτος\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Ημερήσια Διάταξη\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Πλέγμα\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Ημερησίως\",\r\n\t\trepeat_radio_week: \"Εβδομαδιαίως\",\r\n\t\trepeat_radio_month: \"Μηνιαίως\",\r\n\t\trepeat_radio_year: \"Ετησίως\",\r\n\t\trepeat_radio_day_type: \"Κάθε\",\r\n\t\trepeat_text_day_count: \"ημέρα\",\r\n\t\trepeat_radio_day_type2: \"Κάθε εργάσιμη\",\r\n\t\trepeat_week: \" Επανάληψη κάθε\",\r\n\t\trepeat_text_week_count: \"εβδομάδα τις επόμενες ημέρες:\",\r\n\t\trepeat_radio_month_type: \"Επανάληψη\",\r\n\t\trepeat_radio_month_start: \"Την\",\r\n\t\trepeat_text_month_day: \"ημέρα κάθε\",\r\n\t\trepeat_text_month_count: \"μήνα\",\r\n\t\trepeat_text_month_count2_before: \"κάθε\",\r\n\t\trepeat_text_month_count2_after: \"μήνα\",\r\n\t\trepeat_year_label: \"Την\",\r\n\t\tselect_year_day2: \"του\",\r\n\t\trepeat_text_year_day: \"ημέρα\",\r\n\t\tselect_year_month: \"μήνα\",\r\n\t\trepeat_radio_end: \"Χωρίς ημερομηνία λήξεως\",\r\n\t\trepeat_text_occurences_count: \"επαναλήψεις\",\r\n\t\trepeat_radio_end3: \"Λήγει την\",\r\n\t\trepeat_radio_end2: \"Μετά από\",\r\n\t\tmonth_for_recurring: [\"Ιανουάριος\", \"Φεβρουάριος\", \"Μάρτιος\", \"Απρίλιος\", \"Μάϊος\", \"Ιούνιος\", \"Ιούλιος\", \"Αύγουστος\", \"Σεπτέμβριος\", \"Οκτώβριος\", \"Νοέμβριος\", \"Δεκέμβριος\"],\r\n\t\tday_for_recurring: [\"Κυριακή\", \"Δευτέρα\", \"Τρίτη\", \"Τετάρτη\", \"Πέμπτη\", \"Παρασκευή\", \"Σάββατο\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate:{\r\n\t\tmonth_full:[\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\r\n\t\tmonth_short:[\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\r\n\t\tday_full:[\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\r\n\t\tday_short:[\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"]\r\n\t},\r\n\tlabels:{\r\n\t\tdhx_cal_today_button:\"Today\",\r\n\t\tday_tab:\"Day\",\r\n\t\tweek_tab:\"Week\",\r\n\t\tmonth_tab:\"Month\",\r\n\t\tnew_event:\"New event\",\r\n\t\ticon_save:\"Save\",\r\n\t\ticon_cancel:\"Cancel\",\r\n\t\ticon_details:\"Details\",\r\n\t\ticon_edit:\"Edit\",\r\n\t\ticon_delete:\"Delete\",\r\n\t\tconfirm_closing:\"\",//Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting:\"Event will be deleted permanently, are you sure?\",\r\n\t\tsection_description:\"Description\",\r\n\t\tsection_time:\"Time period\",\r\n\t\tfull_day:\"Full day\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring:\"Do you want to edit the whole set of repeated events?\",\r\n\t\tsection_recurring:\"Repeat event\",\r\n\t\tbutton_recurring:\"Disabled\",\r\n\t\tbutton_recurring_open:\"Enabled\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Edit occurrence\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"Agenda\",\r\n\t\tdate:\"Date\",\r\n\t\tdescription:\"Description\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"Year\",\r\n\r\n\t\t/* week agenda extension */\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daily\",//name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Weekly\",//name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Monthly\",\r\n\t\trepeat_radio_year: \"Yearly\",\r\n\t\trepeat_radio_day_type: \"Every\",\r\n\t\trepeat_text_day_count: \"day\",\r\n\t\trepeat_radio_day_type2: \"Every workday\",\r\n\t\trepeat_week: \" Repeat every\",\r\n\t\trepeat_text_week_count: \"week next days:\",\r\n\t\trepeat_radio_month_type: \"Repeat\",\r\n\t\trepeat_radio_month_start: \"On\",\r\n\t\trepeat_text_month_day: \"day every\",\r\n\t\trepeat_text_month_count: \"month\",\r\n\t\trepeat_text_month_count2_before: \"every\",\r\n\t\trepeat_text_month_count2_after: \"month\",\r\n\t\trepeat_year_label: \"On\",\r\n\t\tselect_year_day2: \"of\",\r\n\t\trepeat_text_year_day: \"day\",\r\n\t\tselect_year_month: \"month\",\r\n\t\trepeat_radio_end: \"No end date\",\r\n\t\trepeat_text_occurences_count: \"occurrences\",\r\n\t\trepeat_radio_end2: \"After\",\r\n\t\trepeat_radio_end3: \"End by\",\r\n\t\tmonth_for_recurring: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"]//\r\n\t}\r\n};\r\n\r\n","/*\r\n @Autor Manuel Fernandez Panzuela - www.mfernandez.es\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Enero\", \"Febrero\", \"Marzo\", \"Abril\", \"Mayo\", \"Junio\", \"Julio\", \"Agosto\", \"Septiembre\", \"Octubre\", \"Noviembre\", \"Diciembre\"],\r\n\t\tmonth_short: [\"Ene\", \"Feb\", \"Mar\", \"Abr\", \"May\", \"Jun\", \"Jul\", \"Ago\", \"Sep\", \"Oct\", \"Nov\", \"Dic\"],\r\n\t\tday_full: [\"Domingo\", \"Lunes\", \"Martes\", \"Miércoles\", \"Jueves\", \"Viernes\", \"Sábado\"],\r\n\t\tday_short: [\"Dom\", \"Lun\", \"Mar\", \"Mié\", \"Jue\", \"Vie\", \"Sáb\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hoy\",\r\n\t\tday_tab: \"Día\",\r\n\t\tweek_tab: \"Semana\",\r\n\t\tmonth_tab: \"Mes\",\r\n\t\tnew_event: \"Nuevo evento\",\r\n\t\ticon_save: \"Guardar\",\r\n\t\ticon_cancel: \"Cancelar\",\r\n\t\ticon_details: \"Detalles\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Eliminar\",\r\n\t\tconfirm_closing: \"\", //\"Sus cambios se perderán, continuar ?\"\r\n\t\tconfirm_deleting: \"El evento se borrará definitivamente, ¿continuar?\",\r\n\t\tsection_description: \"Descripción\",\r\n\t\tsection_time: \"Período\",\r\n\t\tfull_day: \"Todo el día\",\r\n\r\n\t\tconfirm_recurring: \"¿Desea modificar el conjunto de eventos repetidos?\",\r\n\t\tsection_recurring: \"Repita el evento\",\r\n\t\tbutton_recurring: \"Impedido\",\r\n\t\tbutton_recurring_open: \"Permitido\",\r\n\t\tbutton_edit_series: \"Editar la serie\",\r\n\t\tbutton_edit_occurrence: \"Editar este evento\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Día\",\r\n\t\tdate: \"Fecha\",\r\n\t\tdescription: \"Descripción\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Año\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Día\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Reja\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Diariamente\",\r\n\t\trepeat_radio_week: \"Semanalmente\",\r\n\t\trepeat_radio_month: \"Mensualmente\",\r\n\t\trepeat_radio_year: \"Anualmente\",\r\n\t\trepeat_radio_day_type: \"Cada\",\r\n\t\trepeat_text_day_count: \"dia\",\r\n\t\trepeat_radio_day_type2: \"Cada jornada de trabajo\",\r\n\t\trepeat_week: \" Repetir cada\",\r\n\t\trepeat_text_week_count: \"semana:\",\r\n\t\trepeat_radio_month_type: \"Repita\",\r\n\t\trepeat_radio_month_start: \"El\",\r\n\t\trepeat_text_month_day: \"dia cada \",\r\n\t\trepeat_text_month_count: \"mes\",\r\n\t\trepeat_text_month_count2_before: \"cada\",\r\n\t\trepeat_text_month_count2_after: \"mes\",\r\n\t\trepeat_year_label: \"El\",\r\n\t\tselect_year_day2: \"del\",\r\n\t\trepeat_text_year_day: \"dia\",\r\n\t\tselect_year_month: \"mes\",\r\n\t\trepeat_radio_end: \"Sin fecha de finalización\",\r\n\t\trepeat_text_occurences_count: \"ocurrencias\",\r\n\t\trepeat_radio_end3: \"Fin\",\r\n\t\trepeat_radio_end2: \"Después de\",\r\n\t\tmonth_for_recurring: [\"Enero\", \"Febrero\", \"Маrzo\", \"Аbril\", \"Mayo\", \"Junio\", \"Julio\", \"Аgosto\", \"Setiembre\", \"Octubre\", \"Noviembre\", \"Diciembre\"],\r\n\t\tday_for_recurring: [\"Domingo\", \"Lunes\", \"Martes\", \"Miércoles\", \"Jeuves\", \"Viernes\", \"Sabado\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Tammikuu\", \"Helmikuu\", \"Maaliskuu\", \"Huhtikuu\", \"Toukokuu\", \"Kesäkuu\", \"Heinäkuu\", \"Elokuu\", \"Syyskuu\", \"Lokakuu\", \"Marraskuu\", \"Joulukuu\"],\r\n\t\tmonth_short: [\"Tam\", \"Hel\", \"Maa\", \"Huh\", \"Tou\", \"Kes\", \"Hei\", \"Elo\", \"Syy\", \"Lok\", \"Mar\", \"Jou\"],\r\n\t\tday_full: [\"Sunnuntai\", \"Maanantai\", \"Tiistai\", \"Keskiviikko\", \"Torstai\", \"Perjantai\", \"Lauantai\"],\r\n\t\tday_short: [\"Su\", \"Ma\", \"Ti\", \"Ke\", \"To\", \"Pe\", \"La\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Tänään\",\r\n\t\tday_tab: \"Päivä\",\r\n\t\tweek_tab: \"Viikko\",\r\n\t\tmonth_tab: \"Kuukausi\",\r\n\t\tnew_event: \"Uusi tapahtuma\",\r\n\t\ticon_save: \"Tallenna\",\r\n\t\ticon_cancel: \"Peru\",\r\n\t\ticon_details: \"Tiedot\",\r\n\t\ticon_edit: \"Muokkaa\",\r\n\t\ticon_delete: \"Poista\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Haluatko varmasti poistaa tapahtuman?\",\r\n\t\tsection_description: \"Kuvaus\",\r\n\t\tsection_time: \"Aikajakso\",\r\n\t\tfull_day: \"Koko päivä\",\r\n\r\n\t\tconfirm_recurring: \"Haluatko varmasti muokata toistuvan tapahtuman kaikkia jaksoja?\",\r\n\t\tsection_recurring: \"Toista tapahtuma\",\r\n\t\tbutton_recurring: \"Ei käytössä\",\r\n\t\tbutton_recurring_open: \"Käytössä\",\r\n\t\tbutton_edit_series: \"Muokkaa sarja\",\r\n\t\tbutton_edit_occurrence: \"Muokkaa kopio\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Esityslista\",\r\n\t\tdate: \"Päivämäärä\",\r\n\t\tdescription: \"Kuvaus\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Vuoden\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Esityslista\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Ritilä\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Luo uusi vetämällä\",\r\n\t\tdrag_to_move:\"Siirrä vetämällä\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Päivittäin\",\r\n\t\trepeat_radio_week: \"Viikoittain\",\r\n\t\trepeat_radio_month: \"Kuukausittain\",\r\n\t\trepeat_radio_year: \"Vuosittain\",\r\n\t\trepeat_radio_day_type: \"Joka\",\r\n\t\trepeat_text_day_count: \"päivä\",\r\n\t\trepeat_radio_day_type2: \"Joka arkipäivä\",\r\n\t\trepeat_week: \"Toista joka\",\r\n\t\trepeat_text_week_count: \"viikko näinä päivinä:\",\r\n\t\trepeat_radio_month_type: \"Toista\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \"päivänä joka\",\r\n\t\trepeat_text_month_count: \"kuukausi\",\r\n\t\trepeat_text_month_count2_before: \"joka\",\r\n\t\trepeat_text_month_count2_after: \"kuukausi\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"päivä\",\r\n\t\tselect_year_month: \"kuukausi\",\r\n\t\trepeat_radio_end: \"Ei loppumisaikaa\",\r\n\t\trepeat_text_occurences_count: \"Toiston jälkeen\",\r\n\t\trepeat_radio_end3: \"Loppuu\",\r\n\t\trepeat_radio_end2: \"\",\r\n\t\tmonth_for_recurring: [\"Tammikuu\", \"Helmikuu\", \"Maaliskuu\", \"Huhtikuu\", \"Toukokuu\", \"Kesäkuu\", \"Heinäkuu\", \"Elokuu\", \"Syyskuu\", \"Lokakuu\", \"Marraskuu\", \"Joulukuu\"],\r\n\t\tday_for_recurring: [\"Sunnuntai\", \"Maanantai\", \"Tiistai\", \"Keskiviikko\", \"Torstai\", \"Perjantai\", \"Lauantai\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Janvier\", \"Février\", \"Mars\", \"Avril\", \"Mai\", \"Juin\", \"Juillet\", \"Août\", \"Septembre\", \"Octobre\", \"Novembre\", \"Décembre\"],\r\n\t\tmonth_short: [\"Jan\", \"Fév\", \"Mar\", \"Avr\", \"Mai\", \"Juin\", \"Juil\", \"Aoû\", \"Sep\", \"Oct\", \"Nov\", \"Déc\"],\r\n\t\tday_full: [\"Dimanche\", \"Lundi\", \"Mardi\", \"Mercredi\", \"Jeudi\", \"Vendredi\", \"Samedi\"],\r\n\t\tday_short: [\"Dim\", \"Lun\", \"Mar\", \"Mer\", \"Jeu\", \"Ven\", \"Sam\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Aujourd'hui\",\r\n\t\tday_tab: \"Jour\",\r\n\t\tweek_tab: \"Semaine\",\r\n\t\tmonth_tab: \"Mois\",\r\n\t\tnew_event: \"Nouvel événement\",\r\n\t\ticon_save: \"Enregistrer\",\r\n\t\ticon_cancel: \"Annuler\",\r\n\t\ticon_details: \"Détails\",\r\n\t\ticon_edit: \"Modifier\",\r\n\t\ticon_delete: \"Effacer\",\r\n\t\tconfirm_closing: \"\", //Vos modifications seront perdus, êtes-vous sûr ?\r\n\t\tconfirm_deleting: \"L'événement sera effacé sans appel, êtes-vous sûr ?\",\r\n\t\tsection_description: \"Description\",\r\n\t\tsection_time: \"Période\",\r\n\t\tfull_day: \"Journée complète\",\r\n\r\n\t\tconfirm_recurring: \"Voulez-vous éditer toute une série d'évènements répétés?\",\r\n\t\tsection_recurring: \"Périodicité\",\r\n\t\tbutton_recurring: \"Désactivé\",\r\n\t\tbutton_recurring_open: \"Activé\",\r\n\t\tbutton_edit_series: \"Modifier la série\",\r\n\t\tbutton_edit_occurrence: \"Modifier une copie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Jour\",\r\n\t\tdate: \"Date\",\r\n\t\tdescription: \"Description\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Année\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Jour\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grille\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Quotidienne\",\r\n\t\trepeat_radio_week: \"Hebdomadaire\",\r\n\t\trepeat_radio_month: \"Mensuelle\",\r\n\t\trepeat_radio_year: \"Annuelle\",\r\n\t\trepeat_radio_day_type: \"Chaque\",\r\n\t\trepeat_text_day_count: \"jour\",\r\n\t\trepeat_radio_day_type2: \"Chaque journée de travail\",\r\n\t\trepeat_week: \" Répéter toutes les\",\r\n\t\trepeat_text_week_count: \"semaine:\",\r\n\t\trepeat_radio_month_type: \"Répéter\",\r\n\t\trepeat_radio_month_start: \"Le\",\r\n\t\trepeat_text_month_day: \"jour chaque\",\r\n\t\trepeat_text_month_count: \"mois\",\r\n\t\trepeat_text_month_count2_before: \"chaque\",\r\n\t\trepeat_text_month_count2_after: \"mois\",\r\n\t\trepeat_year_label: \"Le\",\r\n\t\tselect_year_day2: \"du\",\r\n\t\trepeat_text_year_day: \"jour\",\r\n\t\tselect_year_month: \"mois\",\r\n\t\trepeat_radio_end: \"Pas de date d"achèvement\",\r\n\t\trepeat_text_occurences_count: \"occurrences\",\r\n\t\trepeat_radio_end3: \"Fin\",\r\n\t\trepeat_radio_end2: \"Après\",\r\n\t\tmonth_for_recurring: [\"Janvier\", \"Février\", \"Mars\", \"Avril\", \"Mai\", \"Juin\", \"Juillet\", \"Août\", \"Septembre\", \"Octobre\", \"Novembre\", \"Décembre\"],\r\n\t\tday_for_recurring: [\"Dimanche\", \"Lundi\", \"Mardi\", \"Mercredi\", \"Jeudi\", \"Vendredi\", \"Samedi\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"ינואר\", \"פברואר\", \"מרץ\", \"אפריל\", \"מאי\", \"יוני\", \"יולי\", \"אוגוסט\", \"ספטמבר\", \"אוקטובר\", \"נובמבר\", \"דצמבר\"],\r\n\t\tmonth_short: [\"ינו\", \"פבר\", \"מרץ\", \"אפר\", \"מאי\", \"יונ\", \"יול\", \"אוג\", \"ספט\", \"אוק\", \"נוב\", \"דצמ\"],\r\n\t\tday_full: [\"ראשון\", \"שני\", \"שלישי\", \"רביעי\", \"חמישי\", \"שישי\", \"שבת\"],\r\n\t\tday_short: [\"א\", \"ב\", \"ג\", \"ד\", \"ה\", \"ו\", \"ש\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"היום\",\r\n\t\tday_tab: \"יום\",\r\n\t\tweek_tab: \"שבוע\",\r\n\t\tmonth_tab: \"חודש\",\r\n\t\tnew_event: \"ארוע חדש\",\r\n\t\ticon_save: \"שמור\",\r\n\t\ticon_cancel: \"בטל\",\r\n\t\ticon_details: \"פרטים\",\r\n\t\ticon_edit: \"ערוך\",\r\n\t\ticon_delete: \"מחק\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"ארוע ימחק סופית.להמשיך?\",\r\n\t\tsection_description: \"תיאור\",\r\n\t\tsection_time: \"תקופה\",\r\n\r\n\t\tconfirm_recurring: \"האם ברצונך לשנות כל סדרת ארועים מתמשכים?\",\r\n\t\tsection_recurring: \"להעתיק ארוע\",\r\n\t\tbutton_recurring: \"לא פעיל\",\r\n\t\tbutton_recurring_open: \"פעיל\",\r\n\t\tfull_day: \"יום שלם\",\r\n\t\tbutton_edit_series: \"ערוך את הסדרה\",\r\n\t\tbutton_edit_occurrence: \"עריכת עותק\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"סדר יום\",\r\n\t\tdate: \"תאריך\",\r\n\t\tdescription: \"תיאור\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"לשנה\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"סדר יום\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"סורג\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"גרור כדי להזיז\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"בטל\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"הבא\",\r\n\t\tprev: \"הקודם\",\r\n\t\tyear: \"שנה\",\r\n\t\tmonth: \"חודש\",\r\n\t\tday: \"יום\",\r\n\t\thour:\"שעה\",\r\n\t\tminute: \"דקה\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"יומי\",\r\n\t\trepeat_radio_week: \"שבועי\",\r\n\t\trepeat_radio_month: \"חודשי\",\r\n\t\trepeat_radio_year: \"שנתי\",\r\n\t\trepeat_radio_day_type: \"חזור כל\",\r\n\t\trepeat_text_day_count: \"ימים\",\r\n\t\trepeat_radio_day_type2: \"חזור כל יום עבודה\",\r\n\t\trepeat_week: \" חזור כל\",\r\n\t\trepeat_text_week_count: \"שבוע לפי ימים:\",\r\n\t\trepeat_radio_month_type: \"חזור כל\",\r\n\t\trepeat_radio_month_start: \"כל\",\r\n\t\trepeat_text_month_day: \"ימים כל\",\r\n\t\trepeat_text_month_count: \"חודשים\",\r\n\t\trepeat_text_month_count2_before: \"חזור כל\",\r\n\t\trepeat_text_month_count2_after: \"חודש\",\r\n\t\trepeat_year_label: \"כל\",\r\n\t\tselect_year_day2: \"בחודש\",\r\n\t\trepeat_text_year_day: \"ימים\",\r\n\t\tselect_year_month: \"חודש\",\r\n\t\trepeat_radio_end: \"לעולם לא מסתיים\",\r\n\t\trepeat_text_occurences_count: \"אירועים\",\r\n\t\trepeat_radio_end3: \"מסתיים ב\",\r\n\t\trepeat_radio_end2: \"אחרי\",\r\n\t\tmonth_for_recurring: [\"ינואר\", \"פברואר\", \"מרץ\", \"אפריל\", \"מאי\", \"יוני\", \"יולי\", \"אוגוסט\", \"ספטמבר\", \"אוקטובר\", \"נובמבר\", \"דצמבר\"],\r\n\t\tday_for_recurring: [\"ראשון\", \"שני\", \"שלישי\", \"רביעי\", \"חמישי\", \"שישי\", \"שבת\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Január\", \"Február\", \"Március\", \"Április\", \"Május\", \"Június\", \"Július\", \"Augusztus\", \"Szeptember\", \"Október\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Már\", \"Ápr\", \"Máj\", \"Jún\", \"Júl\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Vasárnap\", \"Hétfõ\", \"Kedd\", \"Szerda\", \"Csütörtök\", \"Péntek\", \"szombat\"],\r\n\t\tday_short: [\"Va\", \"Hé\", \"Ke\", \"Sze\", \"Csü\", \"Pé\", \"Szo\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Ma\",\r\n\t\tday_tab: \"Nap\",\r\n\t\tweek_tab: \"Hét\",\r\n\t\tmonth_tab: \"Hónap\",\r\n\t\tnew_event: \"Új esemény\",\r\n\t\ticon_save: \"Mentés\",\r\n\t\ticon_cancel: \"Mégse\",\r\n\t\ticon_details: \"Részletek\",\r\n\t\ticon_edit: \"Szerkesztés\",\r\n\t\ticon_delete: \"Törlés\",\r\n\t\tconfirm_closing: \"\", //A változások elvesznek, biztosan folytatja? \"\r\n\t\tconfirm_deleting: \"Az esemény törölve lesz, biztosan folytatja?\",\r\n\t\tsection_description: \"Leírás\",\r\n\t\tsection_time: \"Idõszak\",\r\n\t\tfull_day: \"Egesz napos\",\r\n\r\n\t\t/*ismétlõdõ események*/\r\n\t\tconfirm_recurring: \"Biztosan szerkeszteni akarod az összes ismétlõdõ esemény beállítását?\",\r\n\t\tsection_recurring: \"Esemény ismétlése\",\r\n\t\tbutton_recurring: \"Tiltás\",\r\n\t\tbutton_recurring_open: \"Engedélyezés\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Szerkesztés bíróság\",\r\n\r\n\t\t/*napirendi nézet*/\r\n\t\tagenda_tab: \"Napirend\",\r\n\t\tdate: \"Dátum\",\r\n\t\tdescription: \"Leírás\",\r\n\r\n\t\t/*éves nézet*/\r\n\t\tyear_tab: \"Év\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Maret\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Agustus\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mei\", \"Jun\", \"Jul\", \"Ags\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Minggu\", \"Senin\", \"Selasa\", \"Rabu\", \"Kamis\", \"Jumat\", \"Sabtu\"],\r\n\t\tday_short: [\"Ming\", \"Sen\", \"Sel\", \"Rab\", \"Kam\", \"Jum\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hari Ini\",\r\n\t\tday_tab: \"Hari\",\r\n\t\tweek_tab: \"Minggu\",\r\n\t\tmonth_tab: \"Bulan\",\r\n\t\tnew_event: \"Acara Baru\",\r\n\t\ticon_save: \"Simpan\",\r\n\t\ticon_cancel: \"Batal\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edit\",\r\n\t\ticon_delete: \"Hapus\",\r\n\t\tconfirm_closing: \"\", /*Perubahan tidak akan disimpan ?*/\r\n\t\tconfirm_deleting: \"Acara akan dihapus\",\r\n\t\tsection_description: \"Keterangan\",\r\n\t\tsection_time: \"Periode\",\r\n\t\tfull_day: \"Hari penuh\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Apakah acara ini akan berulang?\",\r\n\t\tsection_recurring: \"Acara Rutin\",\r\n\t\tbutton_recurring: \"Tidak Difungsikan\",\r\n\t\tbutton_recurring_open: \"Difungsikan\",\r\n\t\tbutton_edit_series: \"Mengedit seri\",\r\n\t\tbutton_edit_occurrence: \"Mengedit salinan\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Tanggal\",\r\n\t\tdescription: \"Keterangan\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Tahun\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabel\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Gennaio\", \"Febbraio\", \"Marzo\", \"Aprile\", \"Maggio\", \"Giugno\", \"Luglio\", \"Agosto\", \"Settembre\", \"Ottobre\", \"Novembre\", \"Dicembre\"],\r\n\t\tmonth_short: [\"Gen\", \"Feb\", \"Mar\", \"Apr\", \"Mag\", \"Giu\", \"Lug\", \"Ago\", \"Set\", \"Ott\", \"Nov\", \"Dic\"],\r\n\t\tday_full: [\"Domenica\", \"Lunedì\", \"Martedì\", \"Mercoledì\", \"Giovedì\", \"Venerdì\", \"Sabato\"],\r\n\t\tday_short: [\"Dom\", \"Lun\", \"Mar\", \"Mer\", \"Gio\", \"Ven\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Oggi\",\r\n\t\tday_tab: \"Giorno\",\r\n\t\tweek_tab: \"Settimana\",\r\n\t\tmonth_tab: \"Mese\",\r\n\t\tnew_event: \"Nuovo evento\",\r\n\t\ticon_save: \"Salva\",\r\n\t\ticon_cancel: \"Chiudi\",\r\n\t\ticon_details: \"Dettagli\",\r\n\t\ticon_edit: \"Modifica\",\r\n\t\ticon_delete: \"Elimina\",\r\n\t\tconfirm_closing: \"\", //Le modifiche apportate saranno perse, siete sicuri?\r\n\t\tconfirm_deleting: \"L'evento sarà eliminato, siete sicuri?\",\r\n\t\tsection_description: \"Descrizione\",\r\n\t\tsection_time: \"Periodo di tempo\",\r\n\t\tfull_day: \"Intera giornata\",\r\n\r\n\t\tconfirm_recurring: \"Vuoi modificare l'intera serie di eventi?\",\r\n\t\tsection_recurring: \"Ripetere l'evento\",\r\n\t\tbutton_recurring: \"Disattivato\",\r\n\t\tbutton_recurring_open: \"Attivato\",\r\n\t\tbutton_edit_series: \"Modificare la serie\",\r\n\t\tbutton_edit_occurrence: \"Modificare una copia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descrizione\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Anno\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Griglia\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Quotidiano\",\r\n\t\trepeat_radio_week: \"Settimanale\",\r\n\t\trepeat_radio_month: \"Mensile\",\r\n\t\trepeat_radio_year: \"Annuale\",\r\n\t\trepeat_radio_day_type: \"Ogni\",\r\n\t\trepeat_text_day_count: \"giorno\",\r\n\t\trepeat_radio_day_type2: \"Ogni giornata lavorativa\",\r\n\t\trepeat_week: \" Ripetere ogni\",\r\n\t\trepeat_text_week_count: \"settimana:\",\r\n\t\trepeat_radio_month_type: \"Ripetere\",\r\n\t\trepeat_radio_month_start: \"Il\",\r\n\t\trepeat_text_month_day: \"giorno ogni\",\r\n\t\trepeat_text_month_count: \"mese\",\r\n\t\trepeat_text_month_count2_before: \"ogni\",\r\n\t\trepeat_text_month_count2_after: \"mese\",\r\n\t\trepeat_year_label: \"Il\",\r\n\t\tselect_year_day2: \"del\",\r\n\t\trepeat_text_year_day: \"giorno\",\r\n\t\tselect_year_month: \"mese\",\r\n\t\trepeat_radio_end: \"Senza data finale\",\r\n\t\trepeat_text_occurences_count: \"occorenze\",\r\n\t\trepeat_radio_end3: \"Fine\",\r\n\t\trepeat_radio_end2: \"Dopo\",\r\n\t\tmonth_for_recurring: [\"Gennaio\", \"Febbraio\", \"Marzo\", \"Aprile\", \"Maggio\", \"Jiugno\", \"Luglio\", \"Agosto\", \"Settembre\", \"Ottobre\", \"Novembre\", \"Dicembre\"],\r\n\t\tday_for_recurring: [\"Domenica\", \"Lunedì\", \"Martedì\", \"Mercoledì\", \"Jovedì\", \"Venerdì\", \"Sabato\"]\r\n\t}\r\n};\r\n","/*\r\n Translation by Genexus Japan Inc.\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tmonth_short: [ \"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tday_full: [\"日曜日\", \"月曜日\", \"火曜日\", \"水曜日\", \"木曜日\", \"金曜日\", \"土曜日\"],\r\n\t\tday_short: [\"日\", \"月\", \"火\", \"水\", \"木\", \"金\", \"土\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"今日\",\r\n\t\tday_tab: \"日\",\r\n\t\tweek_tab: \"週\",\r\n\t\tmonth_tab: \"月\",\r\n\t\tnew_event: \"新イベント\",\r\n\t\ticon_save: \"保存\",\r\n\t\ticon_cancel: \"キャンセル\",\r\n\t\ticon_details: \"詳細\",\r\n\t\ticon_edit: \"編集\",\r\n\t\ticon_delete: \"削除\",\r\n\t\tconfirm_closing: \"\", //変更が取り消されます、宜しいですか?\r\n\t\tconfirm_deleting: \"イベント完全に削除されます、宜しいですか?\",\r\n\t\tsection_description: \"デスクリプション\",\r\n\t\tsection_time: \"期間\",\r\n\t\tconfirm_recurring: \"繰り返されているイベントを全て編集しますか?\",\r\n\t\tsection_recurring: \"イベントを繰り返す\",\r\n\t\tbutton_recurring: \"無効\",\r\n\t\tbutton_recurring_open: \"有効\",\r\n\t\tfull_day: \"終日\",\r\n\t\tbutton_edit_series: \"シリーズを編集します\",\r\n\t\tbutton_edit_occurrence: \"コピーを編集\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"議題は\",\r\n\t\tdate: \"日付\",\r\n\t\tdescription: \"説明\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"今年\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"議題は\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"グリッド\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};\r\n\r\n\r\n","export default class LocaleManager{\r\n\tconstructor(config){\r\n\t\tthis._locales = {};\r\n\t\tfor(const i in config){\r\n\t\t\tthis._locales[i] = config[i];\r\n\t\t}\r\n\t}\r\n\r\n\taddLocale(name, locale) {\r\n\t\tthis._locales[name] = locale;\r\n\t}\r\n\r\n\tgetLocale(name) {\r\n\t\treturn this._locales[name];\r\n\t}\r\n}","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Mon\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"I dag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uke\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny hendelse\",\r\n\t\ticon_save: \"Lagre\",\r\n\t\ticon_cancel: \"Avbryt\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Rediger\",\r\n\t\ticon_delete: \"Slett\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Hendelsen vil bli slettet permanent. Er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du forandre hele dette settet av repeterende hendelser?\",\r\n\t\tsection_recurring: \"Repeter hendelsen\",\r\n\t\tbutton_recurring: \"Av\",\r\n\t\tbutton_recurring_open: \"På\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Redigere en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daglig\",\r\n\t\trepeat_radio_week: \"Ukentlig\",\r\n\t\trepeat_radio_month: \"Månedlig\",\r\n\t\trepeat_radio_year: \"Årlig\",\r\n\t\trepeat_radio_day_type: \"Hver\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"Alle hverdager\",\r\n\t\trepeat_week: \" Gjentas hver\",\r\n\t\trepeat_text_week_count: \"uke på:\",\r\n\t\trepeat_radio_month_type: \"På hver\",\r\n\t\trepeat_radio_month_start: \"På\",\r\n\t\trepeat_text_month_day: \"dag hver\",\r\n\t\trepeat_text_month_count: \"måned\",\r\n\t\trepeat_text_month_count2_before: \"hver\",\r\n\t\trepeat_text_month_count2_after: \"måned\",\r\n\t\trepeat_year_label: \"på\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Ingen sluttdato\",\r\n\t\trepeat_text_occurences_count: \"forekomst\",\r\n\t\trepeat_radio_end3: \"Stop den\",\r\n\t\trepeat_radio_end2: \"Etter\",\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tday_for_recurring: [\"Sondag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Maart\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Augustus\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"mrt\", \"Apr\", \"Mei\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Zondag\", \"Maandag\", \"Dinsdag\", \"Woensdag\", \"Donderdag\", \"Vrijdag\", \"Zaterdag\"],\r\n\t\tday_short: [\"Zo\", \"Ma\", \"Di\", \"Wo\", \"Do\", \"Vr\", \"Za\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Vandaag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Week\",\r\n\t\tmonth_tab: \"Maand\",\r\n\t\tnew_event: \"Nieuw item\",\r\n\t\ticon_save: \"Opslaan\",\r\n\t\ticon_cancel: \"Annuleren\",\r\n\t\ticon_details: \"Details\",\r\n\t\ticon_edit: \"Bewerken\",\r\n\t\ticon_delete: \"Verwijderen\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Item zal permanent worden verwijderd, doorgaan?\",\r\n\t\tsection_description: \"Beschrijving\",\r\n\t\tsection_time: \"Tijd periode\",\r\n\t\tfull_day: \"Hele dag\",\r\n\r\n\t\tconfirm_recurring: \"Wilt u alle terugkerende items bijwerken?\",\r\n\t\tsection_recurring: \"Item herhalen\",\r\n\t\tbutton_recurring: \"Uit\",\r\n\t\tbutton_recurring_open: \"Aan\",\r\n\t\tbutton_edit_series: \"Bewerk de serie\",\r\n\t\tbutton_edit_occurrence: \"Bewerk een kopie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Omschrijving\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Jaar\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabel\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Dagelijks\",\r\n\t\trepeat_radio_week: \"Wekelijks\",\r\n\t\trepeat_radio_month: \"Maandelijks\",\r\n\t\trepeat_radio_year: \"Jaarlijks\",\r\n\t\trepeat_radio_day_type: \"Elke\",\r\n\t\trepeat_text_day_count: \"dag(en)\",\r\n\t\trepeat_radio_day_type2: \"Elke werkdag\",\r\n\t\trepeat_week: \" Herhaal elke\",\r\n\t\trepeat_text_week_count: \"week op de volgende dagen:\",\r\n\t\trepeat_radio_month_type: \"Herhaal\",\r\n\t\trepeat_radio_month_start: \"Op\",\r\n\t\trepeat_text_month_day: \"dag iedere\",\r\n\t\trepeat_text_month_count: \"maanden\",\r\n\t\trepeat_text_month_count2_before: \"iedere\",\r\n\t\trepeat_text_month_count2_after: \"maanden\",\r\n\t\trepeat_year_label: \"Op\",\r\n\t\tselect_year_day2: \"van\",\r\n\t\trepeat_text_year_day: \"dag\",\r\n\t\tselect_year_month: \"maand\",\r\n\t\trepeat_radio_end: \"Geen eind datum\",\r\n\t\trepeat_text_occurences_count: \"keren\",\r\n\t\trepeat_radio_end3: \"Eindigd per\",\r\n\t\trepeat_radio_end2: \"Na\",\r\n\t\tmonth_for_recurring: [\"Januari\", \"Februari\", \"Maart\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Augustus\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Zondag\", \"Maandag\", \"Dinsdag\", \"Woensdag\", \"Donderdag\", \"Vrijdag\", \"Zaterdag\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Man\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uke\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny\",\r\n\t\ticon_save: \"Lagre\",\r\n\t\ticon_cancel: \"Avbryt\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Endre\",\r\n\t\ticon_delete: \"Slett\",\r\n\t\tconfirm_closing: \"Endringer blir ikke lagret, er du sikker?\", //Endringer blir ikke lagret, er du sikker?\r\n\t\tconfirm_deleting: \"Oppføringen vil bli slettet, er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\t\tfull_day: \"Full dag\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du endre hele settet med repeterende oppføringer?\",\r\n\t\tsection_recurring: \"Repeterende oppføring\",\r\n\t\tbutton_recurring: \"Ikke aktiv\",\r\n\t\tbutton_recurring_open: \"Aktiv\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Redigere en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Styczeń\", \"Luty\", \"Marzec\", \"Kwiecień\", \"Maj\", \"Czerwiec\", \"Lipiec\", \"Sierpień\", \"Wrzesień\", \"Październik\", \"Listopad\", \"Grudzień\"],\r\n\t\tmonth_short: [\"Sty\", \"Lut\", \"Mar\", \"Kwi\", \"Maj\", \"Cze\", \"Lip\", \"Sie\", \"Wrz\", \"Paź\", \"Lis\", \"Gru\"],\r\n\t\tday_full: [\"Niedziela\", \"Poniedziałek\", \"Wtorek\", \"Środa\", \"Czwartek\", \"Piątek\", \"Sobota\"],\r\n\t\tday_short: [\"Nie\", \"Pon\", \"Wto\", \"Śro\", \"Czw\", \"Pią\", \"Sob\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dziś\",\r\n\t\tday_tab: \"Dzień\",\r\n\t\tweek_tab: \"Tydzień\",\r\n\t\tmonth_tab: \"Miesiąc\",\r\n\t\tnew_event: \"Nowe zdarzenie\",\r\n\t\ticon_save: \"Zapisz\",\r\n\t\ticon_cancel: \"Anuluj\",\r\n\t\ticon_details: \"Szczegóły\",\r\n\t\ticon_edit: \"Edytuj\",\r\n\t\ticon_delete: \"Usuń\",\r\n\t\tconfirm_closing: \"\", //Zmiany zostaną usunięte, jesteś pewien?\r\n\t\tconfirm_deleting: \"Zdarzenie zostanie usunięte na zawsze, kontynuować?\",\r\n\t\tsection_description: \"Opis\",\r\n\t\tsection_time: \"Okres czasu\",\r\n\t\tfull_day: \"Cały dzień\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Czy chcesz edytować cały zbiór powtarzających się zdarzeń?\",\r\n\t\tsection_recurring: \"Powtórz zdarzenie\",\r\n\t\tbutton_recurring: \"Nieaktywne\",\r\n\t\tbutton_recurring_open: \"Aktywne\",\r\n\t\tbutton_edit_series: \"Edytuj serię\",\r\n\t\tbutton_edit_occurrence: \"Edytuj kopię\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Opis\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabela\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Codziennie\",\r\n\t\trepeat_radio_week: \"Co tydzie\",\r\n\t\trepeat_radio_month: \"Co miesic\",\r\n\t\trepeat_radio_year: \"Co rok\",\r\n\t\trepeat_radio_day_type: \"Kadego\",\r\n\t\trepeat_text_day_count: \"dnia\",\r\n\t\trepeat_radio_day_type2: \"Kadego dnia roboczego\",\r\n\t\trepeat_week: \" Powtarzaj kadego\",\r\n\t\trepeat_text_week_count: \"tygodnia w dni:\",\r\n\t\trepeat_radio_month_type: \"Powtrz\",\r\n\t\trepeat_radio_month_start: \"W\",\r\n\t\trepeat_text_month_day: \"dnia kadego\",\r\n\t\trepeat_text_month_count: \"miesica\",\r\n\t\trepeat_text_month_count2_before: \"kadego\",\r\n\t\trepeat_text_month_count2_after: \"miesica\",\r\n\t\trepeat_year_label: \"W\",\r\n\t\tselect_year_day2: \"miesica\",\r\n\t\trepeat_text_year_day: \"dnia miesica\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Bez daty kocowej\",\r\n\t\trepeat_text_occurences_count: \"wystpieniu/ach\",\r\n\t\trepeat_radio_end3: \"Zakocz w\",\r\n\t\trepeat_radio_end2: \"Po\",\r\n\t\tmonth_for_recurring: [\"Stycznia\", \"Lutego\", \"Marca\", \"Kwietnia\", \"Maja\", \"Czerwca\", \"Lipca\", \"Sierpnia\", \"Wrzenia\", \"Padziernka\", \"Listopada\", \"Grudnia\"],\r\n\t\tday_for_recurring: [\"Niedziela\", \"Poniedziaek\", \"Wtorek\", \"roda\", \"Czwartek\", \"Pitek\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","/*\r\n\r\n TRANSLATION BY MATTHEUS PIROVANI RORIZ GONЗALVES\r\n\r\n mattheusroriz@hotmail.com / mattheus.pirovani@gmail.com /\r\n\r\n www.atrixian.com.br\r\n\r\n */\r\n\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Janeiro\", \"Fevereiro\", \"Março\", \"Abril\", \"Maio\", \"Junho\", \"Julho\", \"Agosto\", \"Setembro\", \"Outubro\", \"Novembro\", \"Dezembro\"],\r\n\t\tmonth_short: [\"Jan\", \"Fev\", \"Mar\", \"Abr\", \"Mai\", \"Jun\", \"Jul\", \"Ago\", \"Set\", \"Out\", \"Nov\", \"Dez\"],\r\n\t\tday_full: [\"Domingo\", \"Segunda\", \"Terça\", \"Quarta\", \"Quinta\", \"Sexta\", \"Sábado\"],\r\n\t\tday_short: [\"Dom\", \"Seg\", \"Ter\", \"Qua\", \"Qui\", \"Sex\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hoje\",\r\n\t\tday_tab: \"Dia\",\r\n\t\tweek_tab: \"Semana\",\r\n\t\tmonth_tab: \"Mês\",\r\n\t\tnew_event: \"Novo evento\",\r\n\t\ticon_save: \"Salvar\",\r\n\t\ticon_cancel: \"Cancelar\",\r\n\t\ticon_details: \"Detalhes\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Deletar\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Tem certeza que deseja excluir?\",\r\n\t\tsection_description: \"Descrição\",\r\n\t\tsection_time: \"Período de tempo\",\r\n\t\tfull_day: \"Dia inteiro\",\r\n\r\n\t\tconfirm_recurring: \"Deseja editar todos esses eventos repetidos?\",\r\n\t\tsection_recurring: \"Repetir evento\",\r\n\t\tbutton_recurring: \"Desabilitar\",\r\n\t\tbutton_recurring_open: \"Habilitar\",\r\n\t\tbutton_edit_series: \"Editar a série\",\r\n\t\tbutton_edit_occurrence: \"Editar uma cópia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dia\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descrição\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Ano\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dia\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grade\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Diário\",\r\n\t\trepeat_radio_week: \"Semanal\",\r\n\t\trepeat_radio_month: \"Mensal\",\r\n\t\trepeat_radio_year: \"Anual\",\r\n\t\trepeat_radio_day_type: \"Cada\",\r\n\t\trepeat_text_day_count: \"dia(s)\",\r\n\t\trepeat_radio_day_type2: \"Cada trabalho diário\",\r\n\t\trepeat_week: \" Repita cada\",\r\n\t\trepeat_text_week_count: \"semana:\",\r\n\t\trepeat_radio_month_type: \"Repetir\",\r\n\t\trepeat_radio_month_start: \"Em\",\r\n\t\trepeat_text_month_day: \"todo dia\",\r\n\t\trepeat_text_month_count: \"mês\",\r\n\t\trepeat_text_month_count2_before: \"todo\",\r\n\t\trepeat_text_month_count2_after: \"mês\",\r\n\t\trepeat_year_label: \"Em\",\r\n\t\tselect_year_day2: \"of\",\r\n\t\trepeat_text_year_day: \"dia\",\r\n\t\tselect_year_month: \"mês\",\r\n\t\trepeat_radio_end: \"Sem data final\",\r\n\t\trepeat_text_occurences_count: \"ocorrências\",\r\n\t\trepeat_radio_end3: \"Fim\",\r\n\t\trepeat_radio_end2: \"Depois\",\r\n\t\tmonth_for_recurring: [\"Janeiro\", \"Fevereiro\", \"Março\", \"Abril\", \"Maio\", \"Junho\", \"Julho\", \"Agosto\", \"Setembro\", \"Outubro\", \"Novembro\", \"Dezembro\"],\r\n\t\tday_for_recurring: [\"Domingo\", \"Segunda\", \"Terça\", \"Quarta\", \"Quinta\", \"Sexta\", \"Sábado\"]\r\n\t}\r\n};\r\n\r\n\r\n","/*\r\n\tTraducere de Ovidiu Lixandru: http://www.madball.ro\r\n */\r\n\r\nexport default {\r\n\tdate:{\r\n\t\tmonth_full:[\"Ianuarie\", \"Februarie\", \"Martie\", \"Aprilie\", \"Mai\", \"Iunie\", \"Iulie\", \"August\", \"Septembrie\", \"Octombrie\", \"November\", \"December\"],\r\n\t\tmonth_short:[\"Ian\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Iun\", \"Iul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\r\n\t\tday_full:[\"Duminica\", \"Luni\", \"Marti\", \"Miercuri\", \"Joi\", \"Vineri\", \"Sambata\"],\r\n\t\tday_short:[\"Du\", \"Lu\", \"Ma\", \"Mi\", \"Jo\", \"Vi\", \"Sa\"]\r\n\t},\r\n\tlabels:{\r\n\t\tdhx_cal_today_button:\"Astazi\",\r\n\t\tday_tab:\"Zi\",\r\n\t\tweek_tab:\"Saptamana\",\r\n\t\tmonth_tab:\"Luna\",\r\n\t\tnew_event:\"Eveniment nou\",\r\n\t\ticon_save:\"Salveaza\",\r\n\t\ticon_cancel:\"Anuleaza\",\r\n\t\ticon_details:\"Detalii\",\r\n\t\ticon_edit:\"Editeaza\",\r\n\t\ticon_delete:\"Sterge\",\r\n\t\tconfirm_closing:\"Schimbarile nu vor fi salvate, esti sigur?\",//Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting:\"Evenimentul va fi sters permanent, esti sigur?\",\r\n\t\tsection_description:\"Descriere\",\r\n\t\tsection_time:\"Interval\",\r\n\t\tfull_day:\"Toata ziua\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring:\"Vrei sa editezi toata seria de evenimente repetate?\",\r\n\t\tsection_recurring:\"Repetare\",\r\n\t\tbutton_recurring:\"Dezactivata\",\r\n\t\tbutton_recurring_open:\"Activata\",\r\n\t\tbutton_edit_series: \"Editeaza serie\",\r\n\t\tbutton_edit_occurrence: \"Editeaza doar intrare\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"Agenda\",\r\n\t\tdate:\"Data\",\r\n\t\tdescription:\"Descriere\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"An\",\r\n\r\n\t\t/* week agenda extension */\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Lista\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Zilnic\",\r\n\t\trepeat_radio_week: \"Saptamanal\",\r\n\t\trepeat_radio_month: \"Lunar\",\r\n\t\trepeat_radio_year: \"Anual\",\r\n\t\trepeat_radio_day_type: \"La fiecare\",\r\n\t\trepeat_text_day_count: \"zi(le)\",\r\n\t\trepeat_radio_day_type2: \"Fiecare zi lucratoare\",\r\n\t\trepeat_week: \" Repeta la fiecare\",\r\n\t\trepeat_text_week_count: \"saptamana in urmatoarele zile:\",\r\n\t\trepeat_radio_month_type: \"Repeta in\",\r\n\t\trepeat_radio_month_start: \"In a\",\r\n\t\trepeat_text_month_day: \"zi la fiecare\",\r\n\t\trepeat_text_month_count: \"luni\",\r\n\t\trepeat_text_month_count2_before: \"la fiecare\",\r\n\t\trepeat_text_month_count2_after: \"luni\",\r\n\t\trepeat_year_label: \"In\",\r\n\t\tselect_year_day2: \"a lunii\",\r\n\t\trepeat_text_year_day: \"zi a lunii\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Fara data de sfarsit\",\r\n\t\trepeat_text_occurences_count: \"evenimente\",\r\n\t\trepeat_radio_end3: \"La data\",\r\n\t\trepeat_radio_end2: \"Dupa\",\r\n\t\tmonth_for_recurring: [\"Ianuarie\", \"Februarie\", \"Martie\", \"Aprilie\", \"Mai\", \"Iunie\", \"Iulie\", \"August\", \"Septembrie\", \"Octombrie\", \"Noiembrie\", \"Decembrie\"],\r\n\t\tday_for_recurring: [\"Duminica\", \"Luni\", \"Marti\", \"Miercuri\", \"Joi\", \"Vineri\", \"Sambata\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Январь\", \"Февраль\", \"Март\", \"Апрель\", \"Maй\", \"Июнь\", \"Июль\", \"Август\", \"Сентябрь\", \"Oктябрь\", \"Ноябрь\", \"Декабрь\"],\r\n\t\tmonth_short: [\"Янв\", \"Фев\", \"Maр\", \"Aпр\", \"Maй\", \"Июн\", \"Июл\", \"Aвг\", \"Сен\", \"Окт\", \"Ноя\", \"Дек\"],\r\n\t\tday_full: [ \"Воскресенье\", \"Понедельник\", \"Вторник\", \"Среда\", \"Четверг\", \"Пятница\", \"Суббота\"],\r\n\t\tday_short: [\"Вс\", \"Пн\", \"Вт\", \"Ср\", \"Чт\", \"Пт\", \"Сб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сегодня\",\r\n\t\tday_tab: \"День\",\r\n\t\tweek_tab: \"Неделя\",\r\n\t\tmonth_tab: \"Месяц\",\r\n\t\tnew_event: \"Новое событие\",\r\n\t\ticon_save: \"Сохранить\",\r\n\t\ticon_cancel: \"Отменить\",\r\n\t\ticon_details: \"Детали\",\r\n\t\ticon_edit: \"Изменить\",\r\n\t\ticon_delete: \"Удалить\",\r\n\t\tconfirm_closing: \"\", //Ваши изменения будут потеряны, продолжить?\r\n\t\tconfirm_deleting: \"Событие будет удалено безвозвратно, продолжить?\",\r\n\t\tsection_description: \"Описание\",\r\n\t\tsection_time: \"Период времени\",\r\n\t\tfull_day: \"Весь день\",\r\n\r\n\t\tconfirm_recurring: \"Вы хотите изменить всю серию повторяющихся событий?\",\r\n\t\tsection_recurring: \"Повторение\",\r\n\t\tbutton_recurring: \"Отключено\",\r\n\t\tbutton_recurring_open: \"Включено\",\r\n\t\tbutton_edit_series: \"Редактировать серию\",\r\n\t\tbutton_edit_occurrence: \"Редактировать экземпляр\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Список\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Описание\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Год\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Список\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Таблица\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"День\",\r\n\t\trepeat_radio_week: \"Неделя\",\r\n\t\trepeat_radio_month: \"Месяц\",\r\n\t\trepeat_radio_year: \"Год\",\r\n\t\trepeat_radio_day_type: \"Каждый\",\r\n\t\trepeat_text_day_count: \"день\",\r\n\t\trepeat_radio_day_type2: \"Каждый рабочий день\",\r\n\t\trepeat_week: \" Повторять каждую\",\r\n\t\trepeat_text_week_count: \"неделю , в:\",\r\n\t\trepeat_radio_month_type: \"Повторять\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" числа каждый \",\r\n\t\trepeat_text_month_count: \"месяц\",\r\n\t\trepeat_text_month_count2_before: \"каждый \",\r\n\t\trepeat_text_month_count2_after: \"месяц\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"день\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без даты окончания\",\r\n\t\trepeat_text_occurences_count: \"повторений\",\r\n\t\trepeat_radio_end3: \"До \",\r\n\t\trepeat_radio_end2: \"\",\r\n\t\tmonth_for_recurring: [\"Января\", \"Февраля\", \"Марта\", \"Апреля\", \"Мая\", \"Июня\", \"Июля\", \"Августа\", \"Сентября\", \"Октября\", \"Ноября\", \"Декабря\"],\r\n\t\tday_for_recurring: [\"Воскресенье\", \"Понедельник\", \"Вторник\", \"Среду\", \"Четверг\", \"Пятницу\", \"Субботу\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Marec\", \"April\", \"Maj\", \"Junij\", \"Julij\", \"Avgust\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Nedelja\", \"Ponedeljek\", \"Torek\", \"Sreda\", \"Četrtek\", \"Petek\", \"Sobota\"],\r\n\t\tday_short: [\"Ned\", \"Pon\", \"Tor\", \"Sre\", \"Čet\", \"Pet\", \"Sob\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Danes\",\r\n\t\tday_tab: \"Dan\",\r\n\t\tweek_tab: \"Teden\",\r\n\t\tmonth_tab: \"Mesec\",\r\n\t\tnew_event: \"Nov dogodek\",\r\n\t\ticon_save: \"Shrani\",\r\n\t\ticon_cancel: \"Prekliči\",\r\n\t\ticon_details: \"Podrobnosti\",\r\n\t\ticon_edit: \"Uredi\",\r\n\t\ticon_delete: \"Izbriši\",\r\n\t\tconfirm_closing: \"\", //Spremembe ne bodo shranjene. Želite nadaljevati ?\r\n\t\tconfirm_deleting: \"Dogodek bo izbrisan. Želite nadaljevati?\",\r\n\t\tsection_description: \"Opis\",\r\n\t\tsection_time: \"Časovni okvir\",\r\n\t\tfull_day: \"Ves dan\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Želite urediti celoten set ponavljajočih dogodkov?\",\r\n\t\tsection_recurring: \"Ponovi dogodek\",\r\n\t\tbutton_recurring: \"Onemogočeno\",\r\n\t\tbutton_recurring_open: \"Omogočeno\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Edit occurrence\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Zadeva\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Opis\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Leto\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Zadeva\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Miza\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Január\", \"Február\", \"Marec\", \"Apríl\", \"Máj\", \"Jún\", \"Júl\", \"August\", \"September\", \"Október\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Máj\", \"Jún\", \"Júl\", \"Aug\", \"Sept\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Nedeľa\", \"Pondelok\", \"Utorok\", \"Streda\", \"Štvrtok\", \"Piatok\", \"Sobota\"],\r\n\t\tday_short: [\"Ne\", \"Po\", \"Ut\", \"St\", \"Št\", \"Pi\", \"So\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dnes\",\r\n\t\tday_tab: \"Deň\",\r\n\t\tweek_tab: \"Týždeň\",\r\n\t\tmonth_tab: \"Mesiac\",\r\n\t\tnew_event: \"Nová udalosť\",\r\n\t\ticon_save: \"Uložiť\",\r\n\t\ticon_cancel: \"Späť\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edituj\",\r\n\t\ticon_delete: \"Zmazať\",\r\n\t\tconfirm_closing: \"Vaše zmeny nebudú uložené. Skutočne?\", //Vaše změny budou ztraceny, opravdu ?\r\n\t\tconfirm_deleting: \"Udalosť bude natrvalo vymazaná. Skutočne?\",\r\n\t\tsection_description: \"Poznámky\",\r\n\t\tsection_time: \"Doba platnosti\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Prajete si upraviť celú radu opakovaných udalostí?\",\r\n\t\tsection_recurring: \"Opakovanie udalosti\",\r\n\t\tbutton_recurring: \"Vypnuté\",\r\n\t\tbutton_recurring_open: \"Zapnuté\",\r\n\t\tbutton_edit_series: \"Upraviť opakovania\",\r\n\t\tbutton_edit_occurrence: \"Upraviť inštancie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Program\",\r\n\t\tdate: \"Dátum\",\r\n\t\tdescription: \"Poznámka\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\t\tfull_day: \"Celý deň\", // Full day\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Program\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Mriežka\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Denne\",\r\n\t\trepeat_radio_week: \"Týždenne\",\r\n\t\trepeat_radio_month: \"Mesaène\",\r\n\t\trepeat_radio_year: \"Roène\",\r\n\t\trepeat_radio_day_type: \"Každý\",\r\n\t\trepeat_text_day_count: \"deò\",\r\n\t\trepeat_radio_day_type2: \"Každý prac. deò\",\r\n\t\trepeat_week: \"Opakova každý\",\r\n\t\trepeat_text_week_count: \"týždeò v dòoch:\",\r\n\t\trepeat_radio_month_type: \"Opakova\",\r\n\t\trepeat_radio_month_start: \"On\",\r\n\t\trepeat_text_month_day: \"deò každý\",\r\n\t\trepeat_text_month_count: \"mesiac\",\r\n\t\trepeat_text_month_count2_before: \"každý\",\r\n\t\trepeat_text_month_count2_after: \"mesiac\",\r\n\t\trepeat_year_label: \"On\",\r\n\t\tselect_year_day2: \"poèas\",\r\n\t\trepeat_text_year_day: \"deò\",\r\n\t\tselect_year_month: \"mesiac\",\r\n\t\trepeat_radio_end: \"Bez dátumu ukonèenia\",\r\n\t\trepeat_text_occurences_count: \"udalostiach\",\r\n\t\trepeat_radio_end3: \"Ukonèi\",\r\n\t\trepeat_radio_end2: \"Po\",\r\n\t\tmonth_for_recurring: [\"Január\", \"Február\", \"Marec\", \"Apríl\", \"Máj\", \"Jún\", \"Júl\", \"August\", \"September\", \"Október\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Nede¾a\", \"Pondelok\", \"Utorok\", \"Streda\", \"Štvrtok\", \"Piatok\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Mars\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"Augusti\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Söndag\", \"Måndag\", \"Tisdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lördag\"],\r\n\t\tday_short: [\"Sön\", \"Mån\", \"Tis\", \"Ons\", \"Tor\", \"Fre\", \"Lör\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Vecka\",\r\n\t\tmonth_tab: \"Månad\",\r\n\t\tnew_event: \"Ny händelse\",\r\n\t\ticon_save: \"Spara\",\r\n\t\ticon_cancel: \"Ångra\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Ändra\",\r\n\t\ticon_delete: \"Ta bort\",\r\n\t\tconfirm_closing: \"\", //Dina förändingar kommer gå förlorade, är du säker?\r\n\t\tconfirm_deleting: \"Är du säker på att du vill ta bort händelsen permanent?\",\r\n\t\tsection_description: \"Beskrivning\",\r\n\t\tsection_time: \"Tid\",\r\n\t\tfull_day: \"Hela dagen\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vill du redigera hela serien med repeterande händelser?\",\r\n\t\tsection_recurring: \"Upprepa händelse\",\r\n\t\tbutton_recurring: \"Inaktiverat\",\r\n\t\tbutton_recurring_open: \"Aktiverat\",\r\n\t\tbutton_edit_series: \"Redigera serien\",\r\n\t\tbutton_edit_occurrence: \"Redigera en kopia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dagordning\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Beskrivning\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dagordning\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Galler\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Dra för att skapa ny\",\r\n\t\tdrag_to_move:\"Dra för att flytta\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Dagligen\",\r\n\t\trepeat_radio_week: \"Veckovis\",\r\n\t\trepeat_radio_month: \"Månadsvis\",\r\n\t\trepeat_radio_year: \"Årligen\",\r\n\t\trepeat_radio_day_type: \"Var\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"Varje arbetsdag\",\r\n\t\trepeat_week: \" Upprepa var\",\r\n\t\trepeat_text_week_count: \"vecka dessa dagar:\",\r\n\t\trepeat_radio_month_type: \"Upprepa\",\r\n\t\trepeat_radio_month_start: \"Den\",\r\n\t\trepeat_text_month_day: \"dagen var\",\r\n\t\trepeat_text_month_count: \"månad\",\r\n\t\trepeat_text_month_count2_before: \"var\",\r\n\t\trepeat_text_month_count2_after: \"månad\",\r\n\t\trepeat_year_label: \"Den\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"månad\",\r\n\t\trepeat_radio_end: \"Inget slutdatum\",\r\n\t\trepeat_text_occurences_count: \"upprepningar\",\r\n\t\trepeat_radio_end3: \"Sluta efter\",\r\n\t\trepeat_radio_end2: \"Efter\",\r\n\t\tmonth_for_recurring: [\"Januari\", \"Februari\", \"Mars\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"Augusti\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Söndag\", \"Måndag\", \"Tisdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lördag\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Ocak\", \"Þubat\", \"Mart\", \"Nisan\", \"Mayýs\", \"Haziran\", \"Temmuz\", \"Aðustos\", \"Eylül\", \"Ekim\", \"Kasým\", \"Aralýk\"],\r\n\t\tmonth_short: [\"Oca\", \"Þub\", \"Mar\", \"Nis\", \"May\", \"Haz\", \"Tem\", \"Aðu\", \"Eyl\", \"Eki\", \"Kas\", \"Ara\"],\r\n\t\tday_full: [\"Pazar\", \"Pazartes,\", \"Salý\", \"Çarþamba\", \"Perþembe\", \"Cuma\", \"Cumartesi\"],\r\n\t\tday_short: [\"Paz\", \"Pts\", \"Sal\", \"Çar\", \"Per\", \"Cum\", \"Cts\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Bugün\",\r\n\t\tday_tab: \"Gün\",\r\n\t\tweek_tab: \"Hafta\",\r\n\t\tmonth_tab: \"Ay\",\r\n\t\tnew_event: \"Uygun\",\r\n\t\ticon_save: \"Kaydet\",\r\n\t\ticon_cancel: \"Ýptal\",\r\n\t\ticon_details: \"Detaylar\",\r\n\t\ticon_edit: \"Düzenle\",\r\n\t\ticon_delete: \"Sil\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Etkinlik silinecek, devam?\",\r\n\t\tsection_description: \"Açýklama\",\r\n\t\tsection_time: \"Zaman aralýðý\",\r\n\t\tfull_day: \"Tam gün\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Tüm tekrar eden etkinlikler silinecek, devam?\",\r\n\t\tsection_recurring: \"Etkinliði tekrarla\",\r\n\t\tbutton_recurring: \"Pasif\",\r\n\t\tbutton_recurring_open: \"Aktif\",\r\n\t\tbutton_edit_series: \"Dizi düzenleme\",\r\n\t\tbutton_edit_occurrence: \"Bir kopyasını düzenleyin\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Ajanda\",\r\n\t\tdate: \"Tarih\",\r\n\t\tdescription: \"Açýklama\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Yýl\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Ajanda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Izgara\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Січень\", \"Лютий\", \"Березень\", \"Квітень\", \"Травень\", \"Червень\", \"Липень\", \"Серпень\", \"Вересень\", \"Жовтень\", \"Листопад\", \"Грудень\"],\r\n\t\tmonth_short: [\"Січ\", \"Лют\", \"Бер\", \"Кві\", \"Тра\", \"Чер\", \"Лип\", \"Сер\", \"Вер\", \"Жов\", \"Лис\", \"Гру\"],\r\n\t\tday_full: [\"Неділя\", \"Понеділок\", \"Вівторок\", \"Середа\", \"Четвер\", \"П'ятниця\", \"Субота\"],\r\n\t\tday_short: [\"Нед\", \"Пон\", \"Вів\", \"Сер\", \"Чет\", \"Птн\", \"Суб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сьогодні\",\r\n\t\tday_tab: \"День\",\r\n\t\tweek_tab: \"Тиждень\",\r\n\t\tmonth_tab: \"Місяць\",\r\n\t\tnew_event: \"Нова подія\",\r\n\t\ticon_save: \"Зберегти\",\r\n\t\ticon_cancel: \"Відміна\",\r\n\t\ticon_details: \"Деталі\",\r\n\t\ticon_edit: \"Редагувати\",\r\n\t\ticon_delete: \"Вилучити\",\r\n\t\tconfirm_closing: \"\", //Ваші зміни втратяться. Ви впевнені ?\r\n\t\tconfirm_deleting: \"Подія вилучиться назавжди. Ви впевнені?\",\r\n\t\tsection_description: \"Опис\",\r\n\t\tsection_time: \"Часовий проміжок\",\r\n\t\tfull_day: \"Весь день\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Хочете редагувати весь перелік повторюваних подій?\",\r\n\t\tsection_recurring: \"Повторювана подія\",\r\n\t\tbutton_recurring: \"Відключено\",\r\n\t\tbutton_recurring_open: \"Включено\",\r\n\t\tbutton_edit_series: \"Редагувати серію\",\r\n\t\tbutton_edit_occurrence: \"Редагувати примірник\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Перелік\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Опис\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Рік\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Перелік\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Таблиця\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"День\",\r\n\t\trepeat_radio_week: \"Тиждень\",\r\n\t\trepeat_radio_month: \"Місяць\",\r\n\t\trepeat_radio_year: \"Рік\",\r\n\t\trepeat_radio_day_type: \"Кожний\",\r\n\t\trepeat_text_day_count: \"день\",\r\n\t\trepeat_radio_day_type2: \"Кожний робочий день\",\r\n\t\trepeat_week: \" Повторювати кожен\",\r\n\t\trepeat_text_week_count: \"тиждень , по:\",\r\n\t\trepeat_radio_month_type: \"Повторювати\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" числа кожний \",\r\n\t\trepeat_text_month_count: \"місяць\",\r\n\t\trepeat_text_month_count2_before: \"кожен \",\r\n\t\trepeat_text_month_count2_after: \"місяць\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"день\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без дати закінчення\",\r\n\t\trepeat_text_occurences_count: \"повторень\",\r\n\t\trepeat_radio_end3: \"До \",\r\n\t\trepeat_radio_end2: \"\",\r\n\t\tmonth_for_recurring: [\"січня\", \"лютого\", \"березня\", \"квітня\", \"травня\", \"червня\", \"липня\", \"серпня\", \"вересня\", \"жовтня\", \"листопада\", \"грудня\"],\r\n\t\tday_for_recurring: [\"Неділям\", \"Понеділкам\", \"Вівторкам\", \"Середам\", \"Четвергам\", \"П'ятницям\", \"Суботам\"]\r\n\t}\r\n};\r\n","import eventable from \"../utils/eventable\";\r\n\r\nexport class DatePicker {\r\n\tconstructor(scheduler, container, state = {}) {\r\n\t\tthis.state = {\r\n\t\t\tdate: new Date(),\r\n\t\t\tmodes: ['days', 'months', 'years'],\r\n\t\t\tcurrentRange: [],\r\n\t\t\teventDates: [],\r\n\t\t\tcurrentModeIndex: 0,\r\n\t\t\t...state\r\n\t\t};\r\n\t\tthis.container = null;\r\n\t\tthis.element = null;\r\n\t\tthis.onStateChangeHandlers = [];\r\n\t\tthis.scheduler = scheduler;\r\n\t\tthis._domEvents = scheduler._createDomEventScope();\r\n\t\tthis.state = this.getState();\r\n\t\teventable(this);\r\n\t\tif(container){\r\n\r\n\t\t\tthis.container = container;\r\n\t\t\tthis.render(this.container);\r\n\t\t}\r\n\r\n\t\tthis.onStateChange((oldState, newState) => {\r\n\t\t\tthis.callEvent(\"onStateChange\", [newState, oldState]);\r\n\t\t});\r\n\t}\r\n\r\n\tgetState() {\r\n\t\treturn { \r\n\t\t\t...this.state,\r\n\t\t\tmode: this.state.modes[this.state.currentModeIndex]\r\n\t\t};\r\n\t}\r\n\r\n\tsetState(newState) {\r\n\t\tconst oldState = { ...this.state };\r\n\t\tif(newState.mode){\r\n\t\t\tnewState.currentModeIndex = this.state.modes.indexOf(newState.mode);\r\n\t\t}\r\n\t\tthis.state = { ...this.state, ...newState };\r\n\r\n\t\tthis._notifyStateChange(oldState, this.state);\r\n\r\n\t\tif (this.container) {\r\n\t\t\tthis.render(this.container);\r\n\t\t}\r\n\t}\r\n\r\n\tonStateChange(handler) {\r\n\t\tthis.onStateChangeHandlers.push(handler);\r\n\r\n\t\t// function to remove the handler\r\n\t\treturn () => {\r\n\t\t\tconst index = this.onStateChangeHandlers.indexOf(handler);\r\n\t\t\tif (index !== -1) {\r\n\t\t\t\tthis.onStateChangeHandlers.splice(index, 1);\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n\r\n\t_notifyStateChange(oldState, newState) {\r\n\t\tthis.onStateChangeHandlers.forEach(handler => handler(oldState, newState));\r\n\t}\r\n\r\n\t_adjustDate(direction) {\r\n\r\n\t\tconst {mode, date} = this.getState();\r\n\t\tconst newDate = new Date(date);\r\n\t\tif (mode === 'days') {\r\n\t\t\tnewDate.setMonth(date.getMonth() + direction);\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tnewDate.setFullYear(date.getFullYear() + direction);\r\n\t\t} else {\r\n\t\t\tnewDate.setFullYear(date.getFullYear() + direction * 10);\r\n\t\t}\r\n\t\tthis.setState({ date: newDate });\r\n\t}\r\n\r\n\t_toggleMode() {\r\n\t\tconst newIndex = (this.state.currentModeIndex + 1) % this.state.modes.length;\r\n\t\tthis.setState({ currentModeIndex: newIndex });\r\n\t}\r\n\r\n\t_renderCalendarHeader(container) {\r\n\t\tconst {mode, date} = this.getState();\r\n\r\n\t\tconst header = document.createElement('div');\r\n\t\theader.classList.add('dhx_cal_datepicker_header');\r\n\r\n\t\tconst backwardArrow = document.createElement('button');\r\n\r\n\t\tbackwardArrow.classList.add(\"dhx_cal_datepicker_arrow\", \"scheduler_icon\", \"arrow_left\");\r\n\t\theader.appendChild(backwardArrow);\r\n\r\n\t\tconst monthLabel = document.createElement('div');\r\n\t\tmonthLabel.classList.add('dhx_cal_datepicker_title');\r\n\r\n\t\tif (mode === 'days') {\r\n\t\t\tmonthLabel.innerText = date.toLocaleString('default', { month: 'long' }) + ' ' + date.getFullYear();\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tmonthLabel.innerText = date.getFullYear();\r\n\t\t} else {\r\n\t\t\tconst startYear = Math.floor(date.getFullYear() / 10) * 10;\r\n\t\t\tmonthLabel.innerText = `${startYear} - ${startYear + 9}`;\r\n\t\t}\r\n\r\n\t\tthis._domEvents.attach(monthLabel, \"click\", this._toggleMode.bind(this));\r\n\t\theader.appendChild(monthLabel);\r\n\r\n\t\tconst forwardArrow = document.createElement('button');\r\n\r\n\t\tforwardArrow.classList.add(\"dhx_cal_datepicker_arrow\", \"scheduler_icon\", \"arrow_right\");\r\n\t\theader.appendChild(forwardArrow);\r\n\r\n\t\tcontainer.appendChild(header);\r\n\r\n\t\tthis._domEvents.attach(backwardArrow, \"click\", this._adjustDate.bind(this, -1));\r\n\t\tthis._domEvents.attach(forwardArrow, \"click\", this._adjustDate.bind(this, 1));\r\n\t}\r\n\r\n\trender(container) {\r\n\t\tthis._domEvents.detachAll();\r\n\t\tthis.container = container || this.container; \r\n\t\tthis.container.innerHTML = '';\r\n\r\n\t\tif(!this.element){\r\n\t\t\tthis.element = document.createElement(\"div\");\r\n\t\t\tthis.element.classList.add(\"dhx_cal_datepicker\");\r\n\t\t}\r\n\t\tthis.element.innerHTML = '';\r\n\t\tthis.container.appendChild(this.element);\r\n\r\n\t\tthis._renderCalendarHeader(this.element);\r\n\t\tconst dataContainer = document.createElement(\"div\");\r\n\t\tdataContainer.classList.add(\"dhx_cal_datepicker_data\");\r\n\t\tthis.element.appendChild(dataContainer);\r\n\r\n\t\tconst {mode} = this.getState();\r\n\t\tif (mode === 'days') {\r\n\t\t\tthis._renderDayGrid(dataContainer);\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tthis._renderMonthGrid(dataContainer);\r\n\t\t} else {\r\n\t\t\tthis._renderYearGrid(dataContainer);\r\n\t\t}\r\n\t}\r\n\r\n\t_renderDayGridHeader(daysOfWeekContainer) {\r\n\t\tconst {date} = this.getState();\r\n\t\tconst scheduler = this.scheduler;\r\n\r\n\t\tlet currentDate = scheduler.date.week_start(new Date(date));\r\n\t\tconst maxDate = scheduler.date.add(scheduler.date.week_start(new Date(date)), 1, 'week');\r\n\r\n\t\tdaysOfWeekContainer.classList.add('dhx_cal_datepicker_days');\r\n\r\n\t\tconst labelFormat = scheduler.date.date_to_str(\"%D\");\r\n\r\n\t\twhile (currentDate.valueOf() < maxDate.valueOf()) {\r\n\t\t\tconst label = labelFormat(currentDate);\r\n\r\n\t\t\tconst dayElement = document.createElement('div');\r\n\t\t\tdayElement.setAttribute(\"data-day\", currentDate.getDay());\r\n\t\t\tdayElement.classList.add('dhx_cal_datepicker_dayname');\r\n\t\t\tdayElement.innerText = label;\r\n\t\t\tdaysOfWeekContainer.appendChild(dayElement);\r\n\r\n\t\t\tcurrentDate = scheduler.date.add(currentDate, 1, 'day');\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t_weeksBetween(min, max) {\r\n\t\tconst scheduler = this.scheduler;\r\n\t\tlet weeks = 0;\r\n\t\tlet currWeek = new Date(min);\r\n\t\twhile(currWeek.valueOf() < max.valueOf()){\r\n\t\t\tweeks += 1;\r\n\t\t\tcurrWeek = scheduler.date.week_start(scheduler.date.add(currWeek, 1, \"week\"));\r\n\t\t}\r\n\t\treturn weeks;\r\n\t}\r\n\r\n\t_renderDayGrid(container) {\r\n\t\tconst {date, currentRange, eventDates, minWeeks} = this.getState();\r\n\r\n\t\tlet minSchedulerDate = currentRange[0];\r\n\t\tlet maxSchedulerDate = currentRange[1];\r\n\r\n\t\tconst eventDaysTable = eventDates.reduce((acc, date) => {\r\n\t\t\tconst dayStart = this.scheduler.date.day_start(new Date(date));\r\n\t\t\tacc[dayStart.valueOf()] = true;\r\n\t\t\treturn acc;\r\n\t\t}, {});\r\n\r\n\r\n\t\t// Render Days of the Week\r\n\t\tconst daysOfWeekContainer = document.createElement('div');\r\n\t\tthis._renderDayGridHeader(daysOfWeekContainer);\r\n\t\tcontainer.appendChild(daysOfWeekContainer);\r\n\r\n\t\tconst scheduler = this.scheduler;\r\n\t\tconst firstDate = scheduler.date.week_start(scheduler.date.month_start(new Date(date)));\r\n\t\tconst monthStart = scheduler.date.month_start(new Date(date));\r\n\t\tconst monthEnd = scheduler.date.add(scheduler.date.month_start(new Date(date)), 1, 'month');\r\n\t\tlet lastDate = scheduler.date.add(scheduler.date.month_start(new Date(date)), 1, 'month');\r\n\t\tif(lastDate.getDay() !== 0){\r\n\t\t\tlastDate = scheduler.date.add(scheduler.date.week_start(lastDate), 1, \"week\");\r\n\t\t}\r\n\r\n\t\tlet weeks = this._weeksBetween(firstDate, lastDate);\r\n\t\tif(minWeeks && weeks < minWeeks){\r\n\t\t\tlastDate = scheduler.date.add(lastDate, (minWeeks - weeks), \"week\");\r\n\t\t}\r\n\r\n\t\tlet currDate = firstDate;\r\n\r\n\t\tconst dayGridContainer = document.createElement('div');\r\n\t\tdayGridContainer.classList.add('dhx_cal_datepicker_days');\r\n\r\n\t\tthis._domEvents.attach(dayGridContainer, \"click\", (event) => {\r\n\t\t\tconst dateCell = event.target.closest(\"[data-cell-date]\");\r\n\t\t\tconst date = new Date(dateCell.getAttribute(\"data-cell-date\"));\r\n\t\t\tthis.callEvent(\"onDateClick\", [date, event]);\r\n\t\t});\r\n\r\n\t\twhile(currDate.valueOf() < lastDate.valueOf()){\r\n\t\t\tconst dayElement = document.createElement('div');\r\n\t\t\tdayElement.setAttribute(\"data-cell-date\", scheduler.templates.format_date(currDate));\r\n\t\t\tdayElement.setAttribute(\"data-day\", currDate.getDay());\r\n\t\t\tdayElement.innerHTML = currDate.getDate();\r\n\r\n\t\t\tif(currDate.valueOf() < monthStart.valueOf()){\r\n\t\t\t\tdayElement.classList.add('dhx_before');\r\n\t\t\t}else if(currDate.valueOf() >= monthEnd.valueOf()){\t\r\n\t\t\t\tdayElement.classList.add('dhx_after');\r\n\t\t\t}\r\n\r\n\t\t\tif(currDate.getDay() === 0 || currDate.getDay() === 6){\r\n\t\t\t\tdayElement.classList.add(\"dhx_cal_datepicker_weekend\");\r\n\t\t\t}\r\n\r\n\t\t\tif(minSchedulerDate && maxSchedulerDate){\r\n\t\t\t\tif(currDate.valueOf() >= minSchedulerDate.valueOf() && currDate.valueOf() < maxSchedulerDate.valueOf()){\r\n\t\t\t\t\tdayElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(eventDaysTable[currDate.valueOf()]){\r\n\t\t\t\tdayElement.classList.add('dhx_cal_datepicker_event');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdayElement.classList.add('dhx_cal_datepicker_date');\r\n\r\n\t\t\tdayGridContainer.appendChild(dayElement);\r\n\t\t\tcurrDate = scheduler.date.add(currDate, 1, 'day');\r\n\t\t}\r\n\r\n\t\tcontainer.appendChild(dayGridContainer);\r\n\r\n\t}\r\n\r\n\t_renderMonthGrid(container) {\r\n\t\tconst {date} = this.getState();\r\n\r\n\t\tconst wrapper = document.createElement('div');\r\n\t\twrapper.classList.add(\"dhx_cal_datepicker_months\");\r\n\r\n\t\tconst months = [];\r\n\t\tfor(let i = 0; i < 12; i++){\r\n\t\t\tmonths.push(new Date(date.getFullYear(), i, 1));\r\n\t\t}\r\n\r\n\t\tconst formatLabel = this.scheduler.date.date_to_str(\"%M\");\r\n\t\tmonths.forEach(month => {\r\n\t\t\tconst monthElement = document.createElement('div');\r\n\t\t\tmonthElement.classList.add('dhx_cal_datepicker_month');\r\n\t\t\tif(date.getMonth() === month.getMonth()){\r\n\t\t\t\tmonthElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t}\r\n\t\t\tmonthElement.setAttribute(\"data-month\", month.getMonth());\r\n\t\t\tmonthElement.innerHTML = formatLabel(month);\r\n\t\t\tthis._domEvents.attach(monthElement, \"click\", () => {\r\n\t\t\t\tconst newDate = new Date(month);\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\tdate: newDate,\r\n\t\t\t\t\tmode: 'days'\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\twrapper.appendChild(monthElement);\r\n\t\t});\r\n\t\tcontainer.appendChild(wrapper);\r\n\r\n\t\tconst doneArea = document.createElement(\"div\");\r\n\t\tdoneArea.classList.add(\"dhx_cal_datepicker_done\");\r\n\t\tconst doneBtn = document.createElement(\"button\");\r\n\t\tdoneBtn.innerText = \"Done\";\r\n\t\tdoneBtn.classList.add(\"dhx_cal_datepicker_done_btn\");\r\n\t\tthis._domEvents.attach(doneBtn, \"click\", () => {\r\n\t\t\tthis.setState({\r\n\t\t\t\tmode: 'days'\r\n\t\t\t});\r\n\t\t});\r\n\t\tdoneArea.appendChild(doneBtn);\r\n\t\tcontainer.appendChild(doneArea);\r\n\t}\r\n\r\n\t_renderYearGrid(container) {\r\n\t\tconst {date} = this.getState();\r\n\t\tconst startYear = Math.floor(date.getFullYear() / 10) * 10;\r\n\t\t\r\n\t\tconst wrapper = document.createElement('div');\r\n\t\twrapper.classList.add(\"dhx_cal_datepicker_years\");\r\n\t\tfor (let i = startYear - 1; i <= startYear + 10; i++) {\r\n\t\t\tconst yearElement = document.createElement('div');\r\n\t\t\tyearElement.innerText = i;\r\n\t\t\tyearElement.classList.add('dhx_cal_datepicker_year');\r\n\t\t\tyearElement.setAttribute(\"data-year\", i);\r\n\t\t\tif(date.getFullYear() === i){\r\n\t\t\t\tyearElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t}\r\n\t\t\tthis._domEvents.attach(yearElement, \"click\", () => {\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\tdate: new Date(i, date.getMonth(), 1),\r\n\t\t\t\t\tmode: 'months'\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\twrapper.appendChild(yearElement);\r\n\t\t\t\r\n\t\t}\r\n\t\tcontainer.appendChild(wrapper);\r\n\r\n\t\tconst doneArea = document.createElement(\"div\");\r\n\t\tdoneArea.classList.add(\"dhx_cal_datepicker_done\");\r\n\t\tconst doneBtn = document.createElement(\"button\");\r\n\t\tdoneBtn.innerText = \"Done\";\r\n\t\tdoneBtn.classList.add(\"dhx_cal_datepicker_done_btn\");\r\n\t\tthis._domEvents.attach(doneBtn, \"click\", () => {\r\n\t\t\tthis.setState({\r\n\t\t\t\tmode: 'months'\r\n\t\t\t});\r\n\t\t});\r\n\t\tdoneArea.appendChild(doneBtn);\r\n\t\tcontainer.appendChild(doneArea);\r\n\t}\r\n\r\n\tdestructor(){\r\n\t\tthis.onStateChangeHandlers = [];\r\n\t\tif(this.element){\r\n\t\t\tthis.element.innerHTML = '';\r\n\t\t\tthis.element.remove();\r\n\t\t}\r\n\r\n\t\tthis._domEvents.detachAll();\r\n\t\tthis.callEvent(\"onDestroy\", []);\r\n\t\tthis.detachAllEvents();\r\n\r\n\t\tthis.scheduler = null;\r\n\t}\r\n}","// import \"./css/dhtmlxscheduler_terrace\";\r\n// import \"./css/dhtmlxscheduler_material\";\r\n// import \"./css/dhtmlxscheduler_material_nofont\";\r\n// import \"./css/dhtmlxscheduler_flat\";\r\n// import \"./css/dhtmlxscheduler_contrast_black\";\r\n// import \"./css/dhtmlxscheduler_contrast_white\";\r\n\r\n\r\nimport assert from \"./core/common/assert\";\r\nimport common_errors from \"./core/common_errors\";\r\nimport connector from \"./core/connector\";\r\nimport schedulerCore from \"./core/scheduler\";\r\nimport common from \"./core/common\";\r\nimport wai_aria from \"./core/wai_aria\";\r\nimport utils from \"./core/utils/utils\";\r\nimport dom_helpers from \"./core/utils/dom_helpers\";\r\nimport env from \"./utils/env\";\r\nimport destructor from \"./core/destructor\";\r\nimport ajax from \"./core/utils/ajax\";\r\nimport base from \"./core/base\";\r\nimport config from \"./core/config\";\r\nimport event from \"./core/event\";\r\nimport event_highlight from \"./core/event_highlight\";\r\nimport load from \"./core/load\";\r\nimport lightbox from \"./core/lightbox\";\r\nimport touch from \"./core/touch\";\r\nimport dhtmlx_suite_hooks from \"./core/dhtmlx/dhtmlx_suite_hooks\";\r\nimport skins from \"./core/skins\";\r\nimport jquery from \"./core/jquery\";\r\nimport delay_render from \"./core/delay_render\";\r\nimport dataProcessorExtend from \"./core/dataprocessor/dataprocessor\";\r\nimport message from \"./core/message\";\r\nimport i18nFactory from \"./locale\";\r\n\r\nimport voidFirst from \"./publish_helpers/void_script_first\";\r\nimport voidSecond from \"./publish_helpers/void_script_second\";\r\nimport voidThird from \"./publish_helpers/void_script_third\";\r\n\r\n//import datepickerHeader from \"./core/clickable_header\";\r\n\r\nimport { DatePicker } from \"./core/datepicker\";\r\n\r\nexport default function(extensionManager) {\r\n\r\n\tconst scheduler = { version: VERSION };\r\n\t\r\n\tcommon_errors(scheduler);\r\n\tcommon(scheduler);\r\n\tschedulerCore(scheduler);\r\n\twai_aria(scheduler);\r\n\t//utils(scheduler);\r\n\r\n\tscheduler.utils = utils;\r\n\tscheduler.$domHelpers = dom_helpers;\r\n\tscheduler.utils.dom = dom_helpers;\r\n\tscheduler.uid = utils.uid;\r\n\tscheduler.mixin = utils.mixin;\r\n\tscheduler.defined = utils.defined;\r\n\tscheduler.assert = assert(scheduler);\r\n\tscheduler.copy = utils.copy;\r\n\r\n\tscheduler._createDatePicker = function(container, config){\r\n\t\treturn new DatePicker(scheduler, container, config);\r\n\t};\r\n\r\n\t//datepickerHeader(scheduler);\r\n\r\n\r\n\t//old api compatibility\r\n\tscheduler._getFocusableNodes = dom_helpers.getFocusableNodes;\r\n\tscheduler._getClassName = dom_helpers.getClassName;\r\n\tscheduler._locate_css = dom_helpers.locateCss;\r\n\r\n\tconst messageApi = message(scheduler);\r\n\tscheduler.utils.mixin(scheduler, messageApi);\r\n\r\n\tscheduler.env = scheduler.$env = env;\r\n\tscheduler.Promise = window.Promise;\r\n\tdestructor(scheduler);\r\n\tajax(scheduler);\r\n\tvoidFirst(scheduler);\r\n\tbase(scheduler);\r\n\tconfig(scheduler);\r\n\tevent(scheduler);\r\n\tevent_highlight(scheduler);\r\n\tload(scheduler);\r\n\tlightbox(scheduler);\r\n\ttouch(scheduler);\r\n\tdhtmlx_suite_hooks(scheduler);\r\n\tvoidSecond(scheduler);\r\n\tskins(scheduler);\r\n\tjquery(scheduler);\r\n\tdelay_render(scheduler);\r\n\tdataProcessorExtend(scheduler);\r\n\tvoidThird(scheduler);\r\n\tconnector(scheduler);\r\n\tconst i18n = i18nFactory();\r\n\tscheduler.i18n = {\r\n\t\taddLocale: i18n.addLocale,\r\n\t\tsetLocale: function(locale){\r\n\t\t\tif(typeof locale === \"string\"){\r\n\t\t\t\tvar localeObject = i18n.getLocale(locale);\r\n\t\t\t\tif(!localeObject){\r\n\t\t\t\t\tlocaleObject = i18n.getLocale(\"en\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler.locale = localeObject;\r\n\t\t\t}else if(locale){\r\n\t\t\t\tif(!scheduler.locale){\r\n\t\t\t\t\tscheduler.locale = locale;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfor(var i in locale){\r\n\t\t\t\t\t\tif(locale[i] && typeof locale[i] === \"object\"){\r\n\t\t\t\t\t\t\tif(!scheduler.locale[i]){\r\n\t\t\t\t\t\t\t\tscheduler.locale[i] = {};\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tscheduler.mixin(scheduler.locale[i], locale[i], true);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tscheduler.locale[i] = locale[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar labels = scheduler.locale.labels;\r\n\t\t\tlabels.dhx_save_btn \t= labels.icon_save;\r\n\t\t\tlabels.dhx_cancel_btn \t= labels.icon_cancel;\r\n\t\t\tlabels.dhx_delete_btn \t= labels.icon_delete;\r\n\r\n\t\t\tif(scheduler.$container){\r\n\t\t\t\tscheduler.get_elements();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t},\r\n\t\tgetLocale: i18n.getLocale\r\n\t};\r\n\tscheduler.i18n.setLocale(\"en\");\r\n\r\n\tscheduler.ext = {};\r\n\r\n\tconst activePlugins = {};\r\n\tscheduler.plugins = function(config){\r\n\t\tconst extensionList = getExtensionList(config, {\r\n\t\t\t\ttreetimeline: [\"timeline\"],\r\n\t\t\t\tdaytimeline: [\"timeline\"],\r\n\t\t\t\touterdrag: [\"legacy\"]\r\n\t\t\t}, {\r\n\t\t\t\tlegacy: 1,\r\n\t\t\t\tlimit: 1,\r\n\t\t\t\ttimeline: 2,\r\n\t\t\t\tdaytimeline: 3,\r\n\t\t\t\ttreetimeline: 3,\r\n\t\t\t\touterdrag:6\r\n\t\t\t});\r\n\r\n\t\textensionList.forEach(function(name){\r\n\t\t\tif(!activePlugins[name]){\r\n\t\t\t\tconst plugin = extensionManager.getExtension(name);\r\n\t\t\t\tif(plugin){\r\n\t\t\t\t\tplugin(scheduler);\r\n\t\t\t\t\tactivePlugins[name] = true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthrow new Error(\"unknown plugin \" + name);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t};\r\n\r\n\tfunction getExtensionList(config, dependencies, priorities){\r\n\t\tconst result = [];\r\n\r\n\t\tfor(const i in config){\r\n\t\t\tif(config[i]){\r\n\t\t\t\tconst extension = i.toLowerCase();\r\n\t\t\t\tif(dependencies[extension]){\r\n\t\t\t\t\tdependencies[extension].forEach(function(dep){\r\n\t\t\t\t\t\tconst dependencyName = dep.toLowerCase();\r\n\t\t\t\t\t\tif(!config[dependencyName]){\r\n\t\t\t\t\t\t\tresult.push(dependencyName);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\tresult.push(extension);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tresult.sort(function(a, b){\r\n\t\t\tconst orderA = priorities[a] || 0;\r\n\t\t\tconst orderB = priorities[b] || 0;\r\n\t\t\tif(orderA > orderB){\r\n\t\t\t\treturn 1;\r\n\t\t\t}else if(orderA < orderB){\r\n\t\t\t\treturn -1;\r\n\t\t\t}else{\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\treturn scheduler;\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nvar commonViews = {\r\n\tagenda: \"https://docs.dhtmlx.com/scheduler/agenda_view.html\",\r\n\tgrid: \"https://docs.dhtmlx.com/scheduler/grid_view.html\",\r\n\tmap: \"https://docs.dhtmlx.com/scheduler/map_view.html\",\r\n\tunit: \"https://docs.dhtmlx.com/scheduler/units_view.html\",\r\n\ttimeline: \"https://docs.dhtmlx.com/scheduler/timeline_view.html\",\r\n\tweek_agenda: \"https://docs.dhtmlx.com/scheduler/weekagenda_view.html\",\r\n\tyear: \"https://docs.dhtmlx.com/scheduler/year_view.html\",\r\n\tanythingElse: \"https://docs.dhtmlx.com/scheduler/views.html\"\r\n};\r\n\r\nvar requiredExtensions = {\r\n\tagenda: \"ext/dhtmlxscheduler_agenda_view.js\",\r\n\tgrid: \"ext/dhtmlxscheduler_grid_view.js\",\r\n\tmap: \"ext/dhtmlxscheduler_map_view.js\",\r\n\tunit: \"ext/dhtmlxscheduler_units.js\",\r\n\ttimeline: \"ext/dhtmlxscheduler_timeline.js, ext/dhtmlxscheduler_treetimeline.js, ext/dhtmlxscheduler_daytimeline.js\",\r\n\tweek_agenda: \"ext/dhtmlxscheduler_week_agenda.js\",\r\n\tyear: \"ext/dhtmlxscheduler_year_view.js\",\r\n\tlimit: \"ext/dhtmlxscheduler_limit.js\"\r\n};\r\n\r\nscheduler._commonErrorMessages = {\r\n\tunknownView: function(view){\r\n\t\tvar relatedDoc = \"Related docs: \" + (commonViews[view] || commonViews.anythingElse); \r\n\t\tvar relatedExtension = requiredExtensions[view] ? (\"You're probably missing \" + requiredExtensions[view] + \".\") : \"\";\r\n\t\treturn (\r\n\t\t\t\"`\"+view+\"` view is not defined. \\n\" +\r\n\t\t\t\"Please check parameters you pass to `scheduler.init` or `scheduler.setCurrentView` in your code and ensure you've imported appropriate extensions. \\n\" + \r\n\t\t\trelatedDoc + \"\\n\" + (relatedExtension ? (relatedExtension + \"\\n\") : \"\"));\r\n\t},\r\n\tcollapsedContainer: function(div){\r\n\t\treturn \"Scheduler container height is set to *100%* but the rendered height is zero and the scheduler is not visible. \\n\"+\r\n\t\t\"Make sure that the container has some initial height or use different units. For example:\\n\" +\r\n\t\t\"
\\n\";\r\n\t}\r\n};\r\n\r\nscheduler.createTimelineView = function() {\r\n\tthrow new Error(\"scheduler.createTimelineView is not implemented. Be sure to add the required extension: \" + requiredExtensions.timeline + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.timeline);\r\n};\r\n\r\nscheduler.createUnitsView = function() {\r\n\tthrow new Error(\"scheduler.createUnitsView is not implemented. Be sure to add the required extension: \" + requiredExtensions.unit + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.unit);\r\n};\r\n\r\nscheduler.createGridView = function() {\r\n\tthrow new Error(\"scheduler.createGridView is not implemented. Be sure to add the required extension: \" + requiredExtensions.grid + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.grid);\r\n};\r\n\r\nscheduler.addMarkedTimespan = function() {\r\n\tthrow new Error(\"scheduler.addMarkedTimespan is not implemented. Be sure to add the required extension: ext/dhtmlxscheduler_limit.js\" + \r\n\t\"\\n\" +\r\n\t\"Related docs: https://docs.dhtmlx.com/scheduler/limits.html\");\r\n};\r\n\r\nscheduler.renderCalendar = function() {\r\n\tthrow new Error(\"scheduler.renderCalendar is not implemented. Be sure to add the required extension: ext/dhtmlxscheduler_minical.js\" + \r\n\t\"\\n\" +\r\n\t\"https://docs.dhtmlx.com/scheduler/minicalendar.html\");\r\n};\r\n\r\nscheduler.exportToPNG = function() {\r\n\tthrow new Error([\r\n\t\t\"scheduler.exportToPNG is not implemented.\",\r\n\t\t\"This feature requires an additional module, be sure to check the related doc here https://docs.dhtmlx.com/scheduler/png.html\",\r\n\t\t\"Licensing info: https://dhtmlx.com/docs/products/dhtmlxScheduler/export.shtml\"\r\n\t].join(\"\\n\"));\r\n};\r\n\r\nscheduler.exportToPDF = function() {\r\n\tthrow new Error([\r\n\t\t\"scheduler.exportToPDF is not implemented.\",\r\n\t\t\"This feature requires an additional module, be sure to check the related doc here https://docs.dhtmlx.com/scheduler/pdf.html\",\r\n\t\t\"Licensing info: https://dhtmlx.com/docs/products/dhtmlxScheduler/export.shtml\"\r\n\t].join(\"\\n\"));\r\n};\r\n\r\n\r\n}","\r\nimport nav_bar from \"./nav_bar\";\r\nimport scheduler_resize_listener from \"./scheduler_resize_listener\";\r\nimport eventable from \"../utils/eventable\";\r\n\r\n\r\nexport default function extend(scheduler) {\r\n\r\neventable(scheduler);\r\n\r\nnav_bar(scheduler);\r\n\r\nscheduler._detachDomEvent = function(el, event, handler){\r\n\tif (el.removeEventListener){\r\n\t\tel.removeEventListener(event, handler, false);\r\n\r\n\t}else if (el.detachEvent){\r\n\t\tel.detachEvent(\"on\"+event, handler);\r\n\t}\r\n};\r\n\r\n\r\nscheduler._init_once = function(){\r\n\tscheduler_resize_listener(scheduler);\r\n\r\n\tscheduler._init_once = function(){};\r\n};\r\n\r\nconst layout = {\r\n\t\"navbar\": {\r\n\t\trender: function (config) {\r\n\t\t\treturn scheduler._init_nav_bar(config);\r\n\t\t}\r\n\t},\r\n\t\"header\": {\r\n\t\trender: function (config) {\r\n\t\t\tconst element = document.createElement(\"div\");\r\n\t\t\telement.className = \"dhx_cal_header\";\r\n\t\t\treturn element;\r\n\t\t}\r\n\t},\r\n\t\"dataArea\": {\r\n\t\trender: function (config) {\r\n\t\t\tconst element = document.createElement(\"div\");\r\n\t\t\telement.className = \"dhx_cal_data\";\r\n\t\t\treturn element;\r\n\t\t}\r\n\t},\r\n\t\"html_element\": {\r\n\t\trender: function (config) {\r\n\t\t\treturn config.html;\r\n\t\t}\r\n\t}\r\n};\r\n\r\nfunction hasSchedulerMarkup(element){\r\n\treturn !!(\r\n\t\telement.querySelector(\".dhx_cal_header\") &&\r\n\t\telement.querySelector(\".dhx_cal_data\") &&\r\n\t\telement.querySelector(\".dhx_cal_navline\")\r\n\t\t);\r\n}\r\n\r\nfunction createDefaultHeader(scheduler){\r\n\tconst views = [\r\n\t\t\"day\",\r\n\t\t\"week\",\r\n\t\t\"month\"\r\n\t];\r\n\tconst date = [\r\n\t\t\"date\"\r\n\t];\r\n\tconst nav = [\r\n\t\t\"prev\",\r\n\t\t\"today\",\r\n\t\t\"next\"\r\n\t];\r\n\r\n\tif(scheduler.matrix){\r\n\t\tfor(const i in scheduler.matrix){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\tif(scheduler._props){\r\n\t\tfor(const i in scheduler._props){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\r\n\tif(scheduler._grid && scheduler._grid.names){\r\n\t\tfor(const i in scheduler._grid.names){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\r\n\tconst optionalViews = [\r\n\t\t\"map\",\r\n\t\t\"agenda\",\r\n\t\t\"week_agenda\",\r\n\t\t\"year\"\r\n\t];\r\n\r\n\toptionalViews.forEach(function(viewName){\r\n\t\tif(scheduler[viewName + \"_view\"]){\r\n\t\t\tviews.push(viewName);\r\n\t\t}\r\n\t});\r\n\r\n\treturn views.concat(date).concat(nav);\r\n}\r\n\r\nscheduler.init=function(id,date,mode){\r\n\tif(this.$destroyed){\r\n\t\treturn; // not have errors when try to reinit destroyed scheduler\r\n\t}\r\n\tdate=date||(scheduler._currentDate());\r\n\tmode=mode||\"week\";\r\n\r\n\tif(this._obj){\r\n\t\tthis.unset_actions();\r\n\t}\r\n\r\n\tthis._obj=(typeof id == \"string\")?document.getElementById(id):id;\r\n\tthis.$container = this._obj;\r\n\tthis.$root = this._obj;\r\n\r\n\tif(!this.$container.offsetHeight && this.$container.offsetWidth && this.$container.style.height === \"100%\"){\r\n\t\t// scheduler container has zero height and non-zero width\r\n\t\twindow.console.error(scheduler._commonErrorMessages.collapsedContainer(), this.$container);\r\n\t}\r\n\r\n\tif(this.config.wai_aria_attributes && this.config.wai_aria_application_role){\r\n\t\tthis.$container.setAttribute(\"role\", \"application\");\r\n\t}\r\n\r\n\tif(!this.config.header && !hasSchedulerMarkup(this.$container)){\r\n\t\t// if no header config and no required markup - use the default header\r\n\t\t// so the scheduler could be initialized in an empty div\r\n\t\tthis.config.header = createDefaultHeader(this);\r\n\t\twindow.console.log([// jshint ignore:line\r\n\t\t\t\"Required DOM elements are missing from the scheduler container and **scheduler.config.header** is not specified.\",\r\n\t\t\t\"Using a default header configuration: \",\r\n\t\t\t\"scheduler.config.header = \" + JSON.stringify(this.config.header, null, 2),\r\n\t\t\t\"Check this article for the details: https://docs.dhtmlx.com/scheduler/initialization.html\"\r\n\t\t].join(\"\\n\"));// jshint ignore:line\r\n\t}\r\n\r\n\tif (this.config.header) {\r\n\t\tthis.$container.innerHTML = \"\";\r\n\t\tthis.$container.classList.add(\"dhx_cal_container\");\r\n\t\tif(this.config.header.height){\r\n\t\t\tthis.xy.nav_height = this.config.header.height;\r\n\t\t}\r\n\t\tthis.$container.appendChild(layout.navbar.render(this.config.header));\r\n\t\tthis.$container.appendChild(layout.header.render());\r\n\t\tthis.$container.appendChild(layout.dataArea.render());\r\n\t} else {\r\n\t\t// if no header config provided - make sure scheduler container has all necessary elements\r\n\t\tif(!hasSchedulerMarkup(this.$container)){\r\n\t\t\tthrow new Error([\r\n\t\t\t\t\"Required DOM elements are missing from the scheduler container.\",\r\n\t\t\t\t\"Be sure to either specify them manually in the markup: https://docs.dhtmlx.com/scheduler/initialization.html#initializingschedulerviamarkup\",\r\n\t\t\t\t\"Or to use **scheduler.config.header** setting so they could be created automatically: https://docs.dhtmlx.com/scheduler/initialization.html#initializingschedulerviaheaderconfig\"\r\n\t\t\t].join(\"\\n\"));\r\n\t\t}\r\n\t}\r\n\r\n\tif (this.config.rtl) this.$container.className += \" dhx_cal_container_rtl\";\r\n\r\n\t//hook for terrace skin\r\n\tif (this._skin_init)\r\n\t\tscheduler._skin_init();\r\n\r\n\tscheduler.date.init();\r\n\r\n\tthis._scroll=true;\r\n\r\n\tthis._els=[];\r\n\tthis.get_elements();\r\n\tthis.init_templates();\r\n\tthis.set_actions();\r\n\r\n\tthis._init_once();\r\n\tthis._init_touch_events();\r\n\r\n\tthis.set_sizes();\r\n\tscheduler.callEvent('onSchedulerReady', []);\r\n\tscheduler.$initialized = true;\r\n\tthis.setCurrentView(date,mode);\r\n\r\n};\r\n\r\nscheduler.xy={\r\n\tmin_event_height:20,\r\n\tbar_height: 24,\r\n\tscale_width:50,\r\n\tscroll_width:18,\r\n\tscale_height:20,\r\n\tmonth_scale_height:20,\r\n\tmenu_width:25,\r\n\tmargin_top:0,\r\n\tmargin_left:0,\r\n\teditor_width:140,\r\n\tmonth_head_height:22,\r\n\tevent_header_height: 14\r\n};\r\nscheduler.keys={\r\n\tedit_save:13,\r\n\tedit_cancel:27\r\n};\r\n\r\nscheduler.bind = function bind(functor, object){\r\n\tif(functor.bind)\r\n\t\treturn functor.bind(object);\r\n\telse\r\n\t\treturn function(){ return functor.apply(object,arguments); };\r\n};\r\n\r\nscheduler.set_sizes=function(){\r\n\r\n\tvar w = this._x = this._obj.clientWidth-this.xy.margin_left;\r\n\r\n\t//not-table mode always has scroll - need to be fixed in future\r\n\tvar scale_x=this._table_view?0:(this.xy.scale_width+this.xy.scroll_width);\r\n\r\n\tvar materialScalePlaceholder = this.$container.querySelector(\".dhx_cal_scale_placeholder\");\r\n\tif(scheduler._is_material_skin()){\r\n\t\tif(!materialScalePlaceholder) {\r\n\t\t\tmaterialScalePlaceholder = document.createElement(\"div\");\r\n\t\t\tmaterialScalePlaceholder.className = \"dhx_cal_scale_placeholder\";\r\n\t\t\tthis.$container.insertBefore(materialScalePlaceholder, this._els[\"dhx_cal_header\"][0]);\r\n\t\t}\r\n\t\tmaterialScalePlaceholder.style.display = \"block\";\r\n\r\n\t\tthis.set_xy(materialScalePlaceholder,w,this.xy.scale_height + 1,0, this._els[\"dhx_cal_header\"][0].offsetTop);\r\n\r\n\t}else{\r\n\t\tif(materialScalePlaceholder){\r\n\t\t\tmaterialScalePlaceholder.parentNode.removeChild(materialScalePlaceholder);\r\n\t\t}\r\n\t}\r\n\r\n\tif (this._lightbox) {\r\n\t\tif (scheduler.$container.offsetWidth < 1200) {\r\n\t\t} else {\r\n\t\t\tthis._setLbPosition(document.querySelector(\".dhx_cal_light\"));\r\n\t\t}\r\n\t}\r\n\r\n\tthis._data_width = w-scale_x;\r\n\r\n\tthis._els[\"dhx_cal_navline\"][0].style.width = w + \"px\";\r\n\tconst header = this._els[\"dhx_cal_header\"][0];\r\n\tthis.set_xy(header, this._data_width, this.xy.scale_height);\r\n\t// this._els[\"dhx_cal_header\"][0].style.marginLeft = `${scheduler.xy.scale_width}px`;\r\n\theader.style.left = ``;\r\n\theader.style.right = ``;\r\n\tif(!this._table_view){\r\n\t\tif(this.config.rtl){\r\n\t\t\theader.style.right = `${this.xy.scale_width}px`;\r\n\t\t}else{\r\n\t\t\theader.style.left = `${this.xy.scale_width}px`;\r\n\t\t}\r\n\t} else {\r\n\t\tif(!this.config.rtl){\r\n\t\t\theader.style.left = `-1px`;\r\n\t\t} else {\r\n\t\t\theader.style.right = `-1px`;\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.set_xy=function(node,w,h,x,y){\r\n\tfunction prepareValue(val){\r\n\t\tlet prepared = val;\r\n\t\tif(!isNaN(Number(prepared))){\r\n\t\t\tprepared = Math.max(0,prepared) + \"px\";\r\n\t\t}\r\n\t\treturn prepared;\r\n\t}\r\n\r\n\tvar direction = 'left';\r\n\r\n\tif(w !== undefined) {\r\n\t\tnode.style.width = prepareValue(w);\r\n\t}\r\n\r\n\tif(h !== undefined){\r\n\t\tnode.style.height = prepareValue(h);\r\n\t}\r\n\r\n\tif (arguments.length>3){\r\n\r\n\t\tif(x !== undefined){\r\n\t\t\tif (this.config.rtl) direction = 'right';\r\n\t\t\tnode.style[direction]=x+\"px\";\r\n\t\t}\r\n\t\tif(y !== undefined){\r\n\t\t\tnode.style.top=y+\"px\";\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.get_elements=function(){\r\n\t//get all child elements as named hash\r\n\tconst els=this._obj.getElementsByTagName(\"DIV\");\r\n\tfor (let i=0; i < els.length; i++){\r\n\t\tlet class_name= scheduler._getClassName(els[i]);\r\n\t\tconst attr_value = els[i].getAttribute(\"data-tab\") || els[i].getAttribute(\"name\") || \"\";\r\n\t\tif (class_name) class_name = class_name.split(\" \")[0];\r\n\t\tif (!this._els[class_name]) this._els[class_name]=[];\r\n\t\tthis._els[class_name].push(els[i]);\r\n\r\n\t\t//check if name need to be changed\r\n\t\t// scheduler.locale.labels[attr_value+\"_tab\"] - to fix getting labels for data-tab\r\n\t\tlet label = scheduler.locale.labels[attr_value+\"_tab\"] || scheduler.locale.labels[attr_value||class_name];\r\n\t\tif (typeof label !== \"string\" && attr_value && !els[i].innerHTML)\r\n\t\t\tlabel = attr_value.split(\"_\")[0];\r\n\t\tif (label) {\r\n\t\t\tthis._waiAria.labelAttr(els[i], label);\r\n\t\t\tels[i].innerHTML = label;\r\n\t\t}\r\n\t}\r\n};\r\n\r\n\r\nconst domEventsScope = scheduler._createDomEventScope();\r\n\r\nscheduler.unset_actions = function(){\r\n\tdomEventsScope.detachAll();\r\n};\r\n\r\nscheduler.set_actions=function(){\r\n\tfor (const a in this._els){\r\n\t\tif (this._click[a]){\r\n\t\t\tfor (let i=0; i < this._els[a].length; i++){\r\n\t\t\t\tconst element = this._els[a][i];\r\n\t\t\t\tconst handler = this._click[a].bind(element);\r\n\t\t\t\tdomEventsScope.attach(element, \"click\", handler);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tdomEventsScope.attach(this._obj, \"selectstart\", function(e){\r\n\t\te.preventDefault();\r\n\t\treturn false;\r\n\t});\r\n\t//this._obj.onselectstart=function(e){ return false; };\r\n\tdomEventsScope.attach(this._obj, \"mousemove\", function(e){\r\n\t\tif (!scheduler._temp_touch_block)\r\n\t\t\tscheduler._on_mouse_move(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"mousedown\", function(e){\r\n\t\tif (!scheduler._ignore_next_click)\r\n\t\t\tscheduler._on_mouse_down(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"mouseup\", function(e){\r\n\t\tif (!scheduler._ignore_next_click)\r\n\t\t\tscheduler._on_mouse_up(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"dblclick\", function(e){\r\n\t\tscheduler._on_dbl_click(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"contextmenu\", function(event) {\r\n\t\tif(scheduler.checkEvent(\"onContextMenu\")){\r\n\t\t\t// block the default browser context menu \r\n\t\t\tevent.preventDefault();\r\n\t\t}\r\n\r\n\t\tconst returnValue = scheduler.callEvent(\"onContextMenu\", [scheduler._locate_event(event.target), event]);\r\n\t\treturn returnValue;\r\n\t});\r\n};\r\nscheduler.select=function(id){\r\n\tif (this._select_id==id) return;\r\n\tscheduler._close_not_saved();\r\n\tthis.editStop(false);\r\n\tif(this._select_id){\r\n\t\tthis.unselect();\r\n\t}\r\n\tthis._select_id = id;\r\n\tthis.updateEvent(id);\r\n\tthis.callEvent(\"onEventSelected\", [id]);\r\n};\r\nscheduler.unselect=function(id){\r\n\tif (id && id!=this._select_id) {\r\n\t\treturn;\r\n\t}\r\n\tconst previousSelection = this._select_id;\r\n\tthis._select_id = null;\r\n\tif (previousSelection && this.getEvent(previousSelection)) {\r\n\t\tthis.updateEvent(previousSelection);\r\n\t}\r\n\tthis.callEvent(\"onEventUnselected\", [previousSelection]);\r\n};\r\nscheduler.getState=function(){\r\n\treturn {\r\n\t\tmode: this._mode,\r\n\t\tdate: new Date(this._date),\r\n\t\tmin_date: new Date(this._min_date),\r\n\t\tmax_date: new Date(this._max_date),\r\n\t\teditor_id: this._edit_id,\r\n\t\tlightbox_id: this._lightbox_id,\r\n\t\tnew_event: this._new_event,\r\n\t\tselect_id: this._select_id,\r\n\t\texpanded: this.expanded,\r\n\t\tdrag_id: this._drag_id,\r\n\t\tdrag_mode: this._drag_mode\r\n\t};\r\n};\r\nscheduler._click={\r\n\tdhx_cal_data:function(e){\r\n\t\t//in case of touch disable click processing\r\n\t\tif (scheduler._ignore_next_click){\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\r\n\t\tconst id = scheduler._locate_event(e.target);\r\n\r\n\t\tif (!id) {\r\n\t\t\tscheduler.callEvent(\"onEmptyClick\",[scheduler.getActionData(e).date, e]);\r\n\t\t} else {\r\n\t\t\tif ( !scheduler.callEvent(\"onClick\",[id,e]) || scheduler.config.readonly ) return;\r\n\t\t}\r\n\r\n\t\tif (id && scheduler.config.select) {\r\n\r\n\t\t\tscheduler.select(id);\r\n\t\t\tconst icon = e.target.closest(\".dhx_menu_icon\");\r\n\r\n\t\t\tconst mask = scheduler._getClassName(icon);\r\n\t\t\tif (mask.indexOf(\"_icon\")!=-1)\r\n\t\t\t\tscheduler._click.buttons[mask.split(\" \")[1].replace(\"icon_\",\"\")](id);\r\n\t\t} else{\r\n\t\t\tscheduler._close_not_saved();\r\n\t\t\tif (scheduler.getState().select_id && new Date().valueOf()-(scheduler._new_event||0) > 500){\r\n\t\t\t\tscheduler.unselect();\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tdhx_cal_prev_button:function(){\r\n\t\tscheduler._click.dhx_cal_next_button(0,-1);\r\n\t},\r\n\tdhx_cal_next_button:function(dummy,step){\r\n\t\tlet def_step = 1;\r\n\t\tif (scheduler.config.rtl){\r\n\t\t\tstep = -step;\r\n\t\t\tdef_step = -def_step;\r\n\t\t}\r\n\t\tscheduler.setCurrentView(scheduler.date.add( //next line changes scheduler._date , but seems it has not side-effects\r\n\t\t\tscheduler.date[scheduler._mode+\"_start\"](new Date(scheduler._date)),(step||def_step),scheduler._mode));\r\n\t},\r\n\tdhx_cal_today_button:function(){\r\n\t\tif (scheduler.callEvent(\"onBeforeTodayDisplayed\", [])) {\r\n\t\t\tscheduler.setCurrentView(scheduler._currentDate());\r\n\t\t}\r\n\t},\r\n\tdhx_cal_tab:function(){\r\n\t\tconst name = this.getAttribute(\"data-tab\");\r\n\t\tconst deprecated_name = this.getAttribute(\"name\");\r\n\t\tconst mode = name || deprecated_name.substring(0, deprecated_name.search(\"_tab\"));\r\n\t\tscheduler.setCurrentView(scheduler._date,mode);\r\n\t},\r\n\tbuttons:{\r\n\t\t\"delete\":function(id){\r\n\t\t\tconst c = scheduler.locale.labels.confirm_deleting;\r\n\t\t\tscheduler._dhtmlx_confirm({message: c, title: scheduler.locale.labels.title_confirm_deleting, callback:function(){ scheduler.deleteEvent(id); },\r\n\t\t\tconfig: {ok: scheduler.locale.labels.icon_delete}\r\n\t\t});\r\n\t\t},\r\n\t\tedit:function(id){ scheduler.edit(id); },\r\n\t\tsave:function(id){ scheduler.editStop(true); },\r\n\t\tdetails:function(id){ scheduler.showLightbox(id); },\r\n\t\tform:function(id){ scheduler.showLightbox(id); },\r\n\t\tcancel:function(id){ scheduler.editStop(false); }\r\n\t}\r\n};\r\nscheduler._dhtmlx_confirm = function({message, title, callback, config}) {\r\n\tif (!message)\r\n\t\treturn callback();\r\n\r\n\tconfig = config || {};\r\n\tconst opts = { ...config, text: message };\r\n\tif (title) {\r\n\t\topts.title = title;\r\n\t}\r\n\tif (callback) {\r\n\t\topts.callback = function(result) {\r\n\t\t\tif (result) {\r\n\t\t\t\tcallback();\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n\tscheduler.confirm(opts);\r\n};\r\nscheduler.addEventNow=function(start,end,e){\r\n\tlet base = {};\r\n\tif (scheduler._isObject(start) && !scheduler._isDate(start)){\r\n\t\tbase = start;\r\n\t\tstart = null;\r\n\t}\r\n\r\n\tconst duration = (this.config.event_duration||this.config.time_step)*60000;\r\n\tif (!start) start = base.start_date||Math.round((scheduler._currentDate()).valueOf()/duration)*duration;\r\n\tlet start_date = new Date(start);\r\n\tif (!end){\r\n\t\tlet start_hour = this.config.first_hour;\r\n\t\tif (start_hour > start_date.getHours()){\r\n\t\t\tstart_date.setHours(start_hour);\r\n\t\t\tstart = start_date.valueOf();\r\n\t\t}\r\n\t\tend = start.valueOf()+duration;\r\n\t}\r\n\tlet end_date = new Date(end);\r\n\r\n\t// scheduler.addEventNow(new Date(), new Date()) + collision though get_visible events defect (such event was not retrieved)\r\n\tif(start_date.valueOf() == end_date.valueOf())\r\n\t\tend_date.setTime(end_date.valueOf()+duration);\r\n\tbase.start_date = base.start_date||start_date;\r\n\tbase.end_date = base.end_date||end_date;\r\n\tbase.text = base.text||this.locale.labels.new_event;\r\n\tbase.id = this._drag_id = base.id || this.uid();\r\n\tthis._drag_mode=\"new-size\";\r\n\tthis._loading=true;\r\n\tconst eventId = this.addEvent(base);\r\n\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\tthis._loading=false;\r\n\r\n\tthis._drag_event={}; //dummy , to trigger correct event updating logic\r\n\tthis._on_mouse_up(e);\r\n\treturn eventId;\r\n};\r\nscheduler._on_dbl_click=function(e,src){\r\n\tsrc = src || e.target;\r\n\tif (this.config.readonly) return;\r\n\tconst name = scheduler._getClassName(src).split(\" \")[0];\r\n\tswitch(name){\r\n\t\tcase \"dhx_scale_holder\":\r\n\t\tcase \"dhx_scale_holder_now\":\r\n\t\tcase \"dhx_month_body\":\r\n\t\tcase \"dhx_wa_day_data\":\r\n\t\t\tif (!scheduler.config.dblclick_create) break;\r\n\t\t\tthis.addEventNow(this.getActionData(e).date,null,e);\r\n\t\t\tbreak;\r\n\t\tcase \"dhx_cal_event\":\r\n\t\tcase \"dhx_wa_ev_body\":\r\n\t\tcase \"dhx_agenda_line\":\r\n\t\tcase \"dhx_cal_agenda_event_line\":\r\n\t\tcase \"dhx_grid_event\":\r\n\t\tcase \"dhx_cal_event_line\":\r\n\t\tcase \"dhx_cal_event_clear\": {\r\n\t\t\tconst id = this._locate_event(src);\r\n\t\t\tif (!this.callEvent(\"onDblClick\",[id,e])) return;\r\n\t\t\tif (this.config.details_on_dblclick || this._table_view || !this.getEvent(id)._timed || !this.config.select)\r\n\t\t\t\tthis.showLightbox(id);\r\n\t\t\telse\r\n\t\t\t\tthis.edit(id);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tcase \"dhx_time_block\":\r\n\t\tcase \"dhx_cal_container\":\r\n\t\t\treturn;\r\n\t\tdefault: {\r\n\t\t\tconst viewHandler = this[\"dblclick_\"+name];\r\n\t\t\tif (viewHandler) {\r\n\t\t\t\tviewHandler.call(this,e);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif (src.parentNode && src != this)\r\n\t\t\t\t\treturn scheduler._on_dbl_click(e,src.parentNode);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n};\r\n//column index by mouse x-coordinate\r\nscheduler._get_column_index = function(x_pos){\r\n\tlet column = 0;\r\n\tif (this._cols){\r\n\t\tlet width = 0;\r\n\t\tlet i = 0;\r\n\t\twhile (width + this._cols[i] < x_pos && i < this._cols.length){\r\n\t\t\twidth += this._cols[i];\r\n\t\t\ti++;\r\n\t\t}\r\n\t\tcolumn = i + (this._cols[i] ? ((x_pos - width)/ this._cols[i]) : 0);\r\n\r\n\t\tif (this._ignores){\r\n\t\t\tif(column >= this._cols.length){\r\n\t\t\t\twhile(column >= 1 && this._ignores[Math.floor(column)]){\r\n\t\t\t\t\tcolumn--;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n\treturn column;\r\n};\r\n\r\n//transform mouse coordinates to day-time indexes of week based view\r\nscheduler._week_indexes_from_pos = function(pos){\r\n\t//\"get position\" can be invoked before columns are loaded into the units view(e.g. by onMouseMove handler in key_nav.js)\r\n\tif(!this._cols){\r\n\t\treturn pos;\r\n\t}else{\r\n\t\tconst column = this._get_column_index(pos.x);\r\n\r\n\t\tpos.x=Math.min(this._cols.length-1, Math.max(0,Math.ceil(column)-1));\r\n\t\tpos.y=Math.max(0,Math.ceil(pos.y*60/(this.config.time_step*this.config.hour_size_px))-1)+this.config.first_hour*(60/this.config.time_step);\r\n\t\treturn pos;\r\n\t}\r\n};\r\n\r\nscheduler._mouse_coords=function(ev){\r\n\tlet pos;\r\n\tconst body = document.body;\r\n\tconst documentElement = document.documentElement;\r\n\tif (!this.$env.isIE && (ev.pageX || ev.pageY))\r\n\t\tpos={x:ev.pageX, y:ev.pageY};\r\n\telse pos={\r\n\t\tx:ev.clientX + (body.scrollLeft||documentElement.scrollLeft||0) - body.clientLeft,\r\n\t\ty:ev.clientY + (body.scrollTop||documentElement.scrollTop||0) - body.clientTop\r\n\t};\r\n\t//apply layout\r\n\tif (this.config.rtl && this._colsS) {\r\n\t\tpos.x = this.$container.querySelector(\".dhx_cal_data\").offsetWidth - pos.x;\r\n\t\tpos.x += this.$domHelpers.getAbsoluteLeft(this._obj);\r\n\t\tif (this._mode !== \"month\") {\r\n\t\t\tpos.x -= this.xy.scale_width;\r\n\t\t}\r\n\t} else {\r\n\t\tpos.x-=this.$domHelpers.getAbsoluteLeft(this._obj)+(this._table_view?0:this.xy.scale_width);\r\n\t}\r\n\r\n\tconst dataArea = this.$container.querySelector(\".dhx_cal_data\");\r\n\t//pos.y-=this.$domHelpers.getAbsoluteTop(this._obj)+this.xy.nav_height+(this._dy_shift||0)+this.xy.scale_height-this._els[\"dhx_cal_data\"][0].scrollTop;\r\n\tpos.y-=this.$domHelpers.getAbsoluteTop(dataArea)-this._els[\"dhx_cal_data\"][0].scrollTop;\r\n\tpos.ev = ev;\r\n\tconst handler = this[\"mouse_\"+this._mode];\r\n\tif (handler){\r\n\t\tpos = handler.call(this,pos);\r\n\t}else{\r\n\t\t//transform to date\r\n\t\tif (!this._table_view) {\r\n\t\t\tpos = this._week_indexes_from_pos(pos);\r\n\t\t} else {\r\n\t\t\tconst column = this._get_column_index(pos.x);\r\n\t\t\tif (!this._cols || !this._colsS) // agenda/map views\r\n\t\t\t\treturn pos;\r\n\t\t\tlet dy=0;\r\n\t\t\tfor (dy=1; dy < this._colsS.heights.length; dy++)\r\n\t\t\t\tif (this._colsS.heights[dy]>pos.y) break;\r\n\r\n\t\t\tpos.y=Math.ceil( (Math.max(0, column)+Math.max(0,dy-1)*7)*24*60/this.config.time_step );\r\n\r\n\t\t\tif (scheduler._drag_mode || this._mode == \"month\")\r\n\t\t\t\tpos.y=(Math.max(0,Math.ceil(column)-1)+Math.max(0,dy-1)*7)*24*60/this.config.time_step;\r\n\r\n\t\t\t//we care about ignored days only during event moving in month view\r\n\t\t\tif (this._drag_mode == \"move\"){\r\n\t\t\t\tif (scheduler._ignores_detected && scheduler.config.preserve_length){\r\n\t\t\t\t\tpos._ignores = true;\r\n\t\t\t\t\t//get real lengtn of event\r\n\t\t\t\t\tif (!this._drag_event._event_length)\r\n\t\t\t\t\t\tthis._drag_event._event_length = this._get_real_event_length(this._drag_event.start_date, this._drag_event.end_date, { x_step:1, x_unit:\"day\"});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tpos.x=0;\r\n\t\t}\r\n\t}\r\n\tpos.timestamp = +new Date();\r\n\treturn pos;\r\n};\r\nscheduler._close_not_saved=function(){\r\n\tif (new Date().valueOf()-(scheduler._new_event||0) > 500 && scheduler._edit_id){\r\n\t\tconst confirmationText=scheduler.locale.labels.confirm_closing;\r\n\r\n\t\tscheduler._dhtmlx_confirm({\r\n\t\t\tmessage: confirmationText, \r\n\t\t\ttitle: scheduler.locale.labels.title_confirm_closing, \r\n\t\t\tcallback: function() { \r\n\t\t\t\tscheduler.editStop(scheduler.config.positive_closing);\r\n\t\t\t}\r\n\t\t});\r\n\t\tif(confirmationText){\r\n\t\t\tthis._drag_id = this._drag_pos = this._drag_mode = null;\r\n\t\t}\r\n\t}\r\n};\r\nscheduler._correct_shift=function(start, back){\r\n\treturn start-=((new Date(scheduler._min_date)).getTimezoneOffset()-(new Date(start)).getTimezoneOffset())*60000*(back?-1:1);\r\n};\r\n\r\nscheduler._is_pos_changed = function(old_pos, new_pos){\r\n\tfunction diff(old_val, new_val, acc){\r\n\t\treturn !!(Math.abs(old_val - new_val) > acc);\r\n\t}\r\n\r\n\tif(!(old_pos && this._drag_pos)){\r\n\t\treturn true;\r\n\t}\r\n\tconst delay = 100;\r\n\tconst d_pos = 5;\r\n\r\n\t// start drag only if passed some time since mouse down, or if mouse position changed sufficiently\r\n\treturn !!(this._drag_pos.has_moved || !this._drag_pos.timestamp || (new_pos.timestamp - this._drag_pos.timestamp > delay) || diff(old_pos.ev.clientX, new_pos.ev.clientX, d_pos) || diff(old_pos.ev.clientY, new_pos.ev.clientY, d_pos));\r\n};\r\n\r\nscheduler._correct_drag_start_date = function(start){\r\n\tlet obj;\r\n\tif (scheduler.matrix)\r\n\t\tobj = scheduler.matrix[scheduler._mode];\r\n\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\tstart = new Date(start);\r\n\tlet len = 1;\r\n\tif(obj._start_correction || obj._end_correction)\r\n\t\tlen = (obj.last_hour||0)*60 - (start.getHours()*60+start.getMinutes()) || 1;\r\n\r\n\treturn start*1 + (scheduler._get_fictional_event_length(start, len, obj) - len);\r\n};\r\nscheduler._correct_drag_end_date = function(start, duration){\r\n\tlet obj;\r\n\tif (scheduler.matrix) {\r\n\t\tobj = scheduler.matrix[scheduler._mode];\r\n\t}\r\n\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\tconst end = start*1 + scheduler._get_fictional_event_length(start, duration, obj);\r\n\treturn new Date(end*1 - (scheduler._get_fictional_event_length(end, -1, obj, -1) + 1));\r\n};\r\n\r\nscheduler._on_mouse_move=function(e){\r\n\tif (this._drag_mode){\r\n\t\tvar pos=this._mouse_coords(e);\r\n\t\tif (this._is_pos_changed(this._drag_pos, pos)){\r\n\t\t\tvar start, end;\r\n\t\t\tif (this._edit_id!=this._drag_id)\r\n\t\t\t\tthis._close_not_saved();\r\n\r\n\t\t\tif(!this._drag_mode)\r\n\t\t\t\treturn;\r\n\r\n\t\t\tvar mousedownPos = null;\r\n\t\t\tif(this._drag_pos && !this._drag_pos.has_moved){\r\n\t\t\t\tmousedownPos = this._drag_pos;\r\n\t\t\t\tmousedownPos.has_moved = true;\r\n\t\t\t}\r\n\r\n\t\t\tthis._drag_pos = pos;\r\n\r\n\t\t\tthis._drag_pos.has_moved = true;\r\n\r\n\t\t\tif (this._drag_mode==\"create\"){\r\n\r\n\t\t\t\t// use mouse down position as a starting point for drag-create\r\n\t\t\t\tif(mousedownPos){\r\n\t\t\t\t\tpos = mousedownPos;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis._close_not_saved();\r\n\t\t\t\tthis.unselect(this._select_id);\r\n\t\t\t\tthis._loading=true; //will be ignored by dataprocessor\r\n\r\n\t\t\t\tstart = this._get_date_from_pos(pos).valueOf();\r\n\r\n\t\t\t\tif (!this._drag_start) {\r\n\t\t\t\t\tvar res = this.callEvent(\"onBeforeEventCreated\", [e, this._drag_id]);\r\n\t\t\t\t\tif (!res){\r\n\t\t\t\t\t\tthis._loading=false;\r\n\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis._loading=false;\r\n\t\t\t\t\tthis._drag_start=start;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tend = start;\r\n\t\t\t\tif (end == this._drag_start) {\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar start_date = new Date(this._drag_start);\r\n\t\t\t\tvar end_date = new Date(end);\r\n\t\t\t\tif ( (this._mode == \"day\" || this._mode == \"week\") &&\r\n\t\t\t\t\t(start_date.getHours() == end_date.getHours() &&\r\n\t\t\t\t\tstart_date.getMinutes() == end_date.getMinutes()) ) {\r\n\t\t\t\t\t\tend_date = new Date(this._drag_start+1000);\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\tthis._drag_id=this.uid();\r\n\t\t\t\tthis.addEvent(start_date, end_date, this.locale.labels.new_event, this._drag_id, pos.fields);\r\n\r\n\t\t\t\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\t\t\t\tthis._loading=false;\r\n\t\t\t\tthis._drag_mode=\"new-size\";\r\n\r\n\t\t\t}\r\n\r\n\t\t\tvar timeStep = this.config.time_step;\r\n\t\t\tvar ev=this.getEvent(this._drag_id);\r\n\t\t\tvar obj;\r\n\t\t\tif (scheduler.matrix)\r\n\t\t\t\tobj = scheduler.matrix[scheduler._mode];\r\n\t\t\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\t\t\tif (this._drag_mode==\"move\"){\r\n\t\t\t\tstart = this._min_date.valueOf()+(pos.y*this.config.time_step+pos.x*24*60)*60000;\r\n\t\t\t\tif (!pos.custom && this._table_view) {\r\n\t\t\t\t\tstart += this.date.time_part(ev.start_date) * 1000;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!this._table_view && this._dragEventBody && this._drag_event._move_event_shift === undefined) {\r\n\t\t\t\t\tthis._drag_event._move_event_shift = start - ev.start_date;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (this._drag_event._move_event_shift) {\r\n\t\t\t\t\tstart -= this._drag_event._move_event_shift;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tstart = this._correct_shift(start);\r\n\r\n\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view && obj){\r\n\r\n\t\t\t\t\tstart = scheduler._correct_drag_start_date(start);\r\n\t\t\t\t\tend = scheduler._correct_drag_end_date(start,this._drag_event._event_length);\r\n\r\n\t\t\t\t} else\r\n\t\t\t\t\tend = ev.end_date.valueOf()-(ev.start_date.valueOf()-start);\r\n\t\t\t} else { // resize\r\n\t\t\t\tstart = ev.start_date.valueOf();\r\n\t\t\t\tend = ev.end_date.valueOf();\r\n\t\t\t\tif (this._table_view) {\r\n\t\t\t\t\tvar resize_date = this._min_date.valueOf()+pos.y*this.config.time_step*60000 + (pos.custom?0:24*60*60000);\r\n\t\t\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\t\t\tresize_date = this._correct_shift(resize_date, false);\r\n\t\t\t\t\t\tif( this._drag_from_start ) {\r\n\t\t\t\t\t\t\tvar day = 24*60*60000;\r\n\t\t\t\t\t\t\tif( resize_date <= scheduler.date.date_part(new Date(end+day-1)).valueOf() ) // to get end time as 23:59:59 and then the day start\r\n\t\t\t\t\t\t\t\tstart = resize_date - day;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tend = resize_date;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif(this.config.preserve_length) {\r\n\t\t\t\t\t\t\tif (pos.resize_from_start) {\r\n\t\t\t\t\t\t\t\tstart = scheduler._correct_drag_start_date(resize_date);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tend = scheduler._correct_drag_end_date(resize_date, 0);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tif (pos.resize_from_start) {\r\n\t\t\t\t\t\t\t\tstart = resize_date;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tend = resize_date;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvar end_day_start = this.date.date_part(new Date(ev.end_date.valueOf() - 1)).valueOf();\r\n\t\t\t\t\tvar end_day_date = new Date(end_day_start);\r\n\t\t\t\t\tvar firstHour = this.config.first_hour;\r\n\t\t\t\t\tvar lastHour = this.config.last_hour;\r\n\t\t\t\t\tvar maxY = (lastHour - firstHour) * (60/timeStep);\r\n\r\n\t\t\t\t\tthis.config.time_step = 1;\r\n\t\t\t\t\tvar precisePos = this._mouse_coords(e);\r\n\t\t\t\t\tthis.config.time_step = timeStep;\r\n\r\n\t\t\t\t\tvar minDate = pos.y*timeStep*60000;\r\n\t\t\t\t\tvar maxDate = Math.min(pos.y + 1, maxY)*timeStep*60000;\r\n\t\t\t\t\tvar preciseDate = precisePos.y*60000;\r\n\r\n\t\t\t\t\t// rounding end date to the closest time step\r\n\t\t\t\t\tif(Math.abs(minDate - preciseDate) > Math.abs(maxDate - preciseDate)){\r\n\t\t\t\t\t\tend = end_day_start + maxDate;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tend = end_day_start + minDate;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = end + ((new Date(end)).getTimezoneOffset() - end_day_date.getTimezoneOffset()) * 60000;\r\n\t\t\t\t\tthis._els[\"dhx_cal_data\"][0].style.cursor=\"s-resize\";\r\n\t\t\t\t\tif (this._mode == \"week\" || this._mode == \"day\")\r\n\t\t\t\t\t\tend = this._correct_shift(end);\r\n\t\t\t\t}\r\n\t\t\t\tif (this._drag_mode == \"new-size\") {\r\n\t\t\t\t\tif (end <= this._drag_start){\r\n\t\t\t\t\t\tvar shift = pos.shift||((this._table_view && !pos.custom)?24*60*60000:0);\r\n\t\t\t\t\t\tstart = end-(pos.shift?0:shift);\r\n\t\t\t\t\t\tend = this._drag_start+(shift||(timeStep*60000));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tstart = this._drag_start;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (end<=start)\r\n\t\t\t\t\t\tend=start+timeStep*60000;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar new_end = new Date(end-1);\r\n\t\t\tvar new_start = new Date(start);\r\n\t\t\t//deny drag out of visible scheduler scale in timeline view\r\n\t\t\tif(this._drag_mode==\"move\" && scheduler.config.limit_drag_out &&\r\n\t\t\t\t(+new_start < +scheduler._min_date || +end > +scheduler._max_date)){\r\n\r\n\t\t\t\tif(+ev.start_date < +scheduler._min_date || +ev.end_date > +scheduler._max_date){\r\n\t\t\t\t\t// not move event if it's already outside time scale\r\n\t\t\t\t\tnew_start = new Date(ev.start_date);\r\n\t\t\t\t\tend = new Date(ev.end_date);\r\n\t\t\t\t}else{\r\n\r\n\t\t\t\t\tvar duration = end - new_start;\r\n\r\n\t\t\t\t\tif(+new_start < +scheduler._min_date){\r\n\t\t\t\t\t\tnew_start = new Date(scheduler._min_date);\r\n\t\t\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view){\r\n\t\t\t\t\t\t\tnew_start = new Date(scheduler._correct_drag_start_date(new_start));\r\n\t\t\t\t\t\t\tif(obj._start_correction)\r\n\t\t\t\t\t\t\t\tnew_start = new Date(new_start.valueOf() + obj._start_correction);\r\n\t\t\t\t\t\t\tend = new Date(new_start*1 + this._get_fictional_event_length(new_start, this._drag_event._event_length, obj));\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tend = new Date(+new_start + duration);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tend = new Date(scheduler._max_date);\r\n\r\n\t\t\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view){\r\n\t\t\t\t\t\t\tif(obj._end_correction)\r\n\t\t\t\t\t\t\t\tend = new Date(end.valueOf() - obj._end_correction);\r\n\t\t\t\t\t\t\tend = new Date(end*1 - this._get_fictional_event_length(end, 0, obj, true));\r\n\t\t\t\t\t\t\tnew_start = new Date(end*1 - this._get_fictional_event_length(end, this._drag_event._event_length, obj, true));\r\n\t\t\t\t\t\t\tif(this._ignores_detected){\r\n\t\t\t\t\t\t\t\tnew_start = scheduler.date.add(new_start, obj.x_step, obj.x_unit);\r\n\t\t\t\t\t\t\t\tend = new Date(end*1 - this._get_fictional_event_length(end, 0, obj, true));\r\n\t\t\t\t\t\t\t\tend = scheduler.date.add(end, obj.x_step, obj.x_unit);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tnew_start = new Date(+end - duration);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t\tvar new_end = new Date(end-1);\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\t// fix event dates when resized to bottom of the column (day/week views)\r\n\t\t\tif(!this._table_view && this._dragEventBody &&\r\n\t\t\t\t!scheduler.config.all_timed &&\r\n\t\t\t\t((!scheduler._get_section_view() && pos.x != this._get_event_sday({start_date: new Date(start), end_date:new Date(start)})) || new Date(start).getHours() < this.config.first_hour)){\r\n\t\t\t\tvar duration = end - new_start;\r\n\t\t\t\tif (this._drag_mode == \"move\") {\r\n\t\t\t\t\tvar day = this._min_date.valueOf() + (pos.x * 24 * 60) * 60000;\r\n\t\t\t\t\tnew_start = new Date(day);\r\n\t\t\t\t\tnew_start.setHours(this.config.first_hour);\r\n\t\t\t\t\tend = new Date(new_start.valueOf() + duration);\r\n\t\t\t\t\tnew_end = new Date(end-1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// fix event dates when resized to bottom of the column (day/week views)\r\n\t\t\tif(!this._table_view &&\r\n\t\t\t\t!scheduler.config.all_timed &&\r\n\t\t\t\t((!scheduler.getView() && pos.x != this._get_event_sday({start_date: new Date(end), end_date:new Date(end)})) || new Date(end).getHours() >= this.config.last_hour)){\r\n\t\t\t\tvar duration = end - new_start;\r\n\t\t\t\tvar day = this._min_date.valueOf()+(pos.x*24*60)*60000;\r\n\t\t\t\tend = scheduler.date.date_part(new Date(day));\r\n\t\t\t\tend.setHours(this.config.last_hour);\r\n\t\t\t\tnew_end = new Date(end-1);\r\n\t\t\t\tif(this._drag_mode == \"move\"){\r\n\t\t\t\t\tnew_start = new Date(+end - duration);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//prevent out-of-borders situation for day|week view\r\n\t\t\tif ( this._table_view || (new_end.getDate()==new_start.getDate() && new_end.getHours()=ed)\r\n\t\t\t\tcls += ' dhx_after';\r\n\t\t\telse if (sd.valueOf()==cd.valueOf())\r\n\t\t\t\tcls += ' dhx_now';\r\n\r\n\t\t\tif (this._ignores_detected && this._ignores[j]){\r\n\t\t\t\tcls += \" dhx_scale_ignore\";\r\n\t\t\t}\r\n\r\n\t\t\tcell.className = cls + \" \" + this.templates.month_date_class(sd, cd);\r\n\r\n\t\t\tcell.setAttribute(\"data-cell-date\", scheduler.templates.format_date(sd));\r\n\t\t\tvar body_class = \"dhx_month_body\";\r\n\t\t\tvar head_class = \"dhx_month_head\";\r\n\t\t\tif (j === 0 && this.config.left_border) {\r\n\t\t\t\tbody_class += \" dhx_month_body_border\";\r\n\t\t\t\thead_class += \" dhx_month_head_border\";\r\n\t\t\t}\r\n\t\t\tif (!this._ignores_detected || !this._ignores[j]){\r\n\t\t\t\tcell.style.width = tdwidths[j];\r\n\t\t\t\tthis._waiAria.monthCellAttr(cell, sd);\r\n\r\n\t\t\t\tvar cellHead = document.createElement(\"div\");\r\n\t\t\t\tcellHead.style.height = scheduler.xy.month_head_height + \"px\";\r\n\t\t\t\tcellHead.className = head_class;\r\n\t\t\t\tcellHead.innerHTML = this.templates.month_day(sd);\r\n\t\t\t\tcell.appendChild(cellHead);\r\n\r\n\t\t\t\tvar cellBody = document.createElement(\"div\");\r\n\t\t\t\tcellBody.className = body_class;\r\n\t\t\t\t// cellBody.style.height = row_height + \"px\";\r\n\t\t\t\t// cellBody.style.width = tdwidths[j];\r\n\t\t\t\tcell.appendChild(cellBody);\r\n\r\n\t\t\t} else {\r\n\t\t\t\tcell.appendChild(document.createElement(\"div\"));\r\n\t\t\t\tcell.appendChild(document.createElement(\"div\"));\r\n\t\t\t}\r\n\t\t\trendered_dates.push(sd);\r\n\t\t\tvar bf1 = sd.getDate();\r\n\t\t\tsd=this.date.add(sd,1,\"day\");\r\n\t\t\tif (sd.getDate() - bf1 > 1)\r\n\t\t\t\tsd = new Date(sd.getFullYear(), sd.getMonth(), bf1 + 1, 12, 0);\r\n\t\t}\r\n\r\n\t\tscheduler._colsS.heights[i] = cellheight;\r\n\t\tcellheight += getCellHeight(i);\r\n\t}\r\n\r\n\tthis._min_date = view_start;\r\n\tthis._max_date = sd;\r\n\r\n\tdiv.innerHTML = \"\";\r\n\tdiv.appendChild(table);\r\n\r\n\tthis._scales = {};\r\n\tvar cells = div.querySelectorAll('[data-cell-date]');\r\n\tcells.forEach((cell) => {\r\n\t\tconst date = scheduler.templates.parse_date(cell.getAttribute(\"data-cell-date\"));\r\n\t\tconst body = cell.querySelector(\".dhx_month_body\");\r\n\t\tthis._scales[+date] = body;\r\n\t\tthis.callEvent(\"onScaleAdd\", [this._scales[+date], date]);\r\n\t});\r\n\r\n\treturn this._max_date;\r\n};\r\n\r\nscheduler._reset_month_scale=function(b,dd,sd,rows){\r\n\t//recalculates rows height and redraws month layout\r\n\tvar ed=scheduler.date.add(dd,1,\"month\");\r\n\r\n\t//trim time part for comparison reasons\r\n\tvar cd = scheduler._currentDate();\r\n\tthis.date.date_part(cd);\r\n\tthis.date.date_part(sd);\r\n\r\n\trows = rows || Math.ceil(Math.round((ed.valueOf()-sd.valueOf()) / (60*60*24*1000) ) / 7);\r\n\r\n\tvar height = (Math.floor(b.clientHeight/rows) - this.xy.month_head_height);\r\n\r\n\tthis._colsS.height = height + this.xy.month_head_height;\r\n\tthis._colsS.heights = [];\r\n\r\n\treturn scheduler._render_month_scale(b, dd, sd, rows);\r\n\r\n};\r\n\r\nscheduler.getView = function (viewName) {\r\n\tif (!viewName) {\r\n\t\tviewName = scheduler.getState().mode;\r\n\t}\r\n\tif (scheduler.matrix && scheduler.matrix[viewName]) {\r\n\t\treturn scheduler.matrix[viewName];\r\n\t}\r\n\r\n\tif (scheduler._props && scheduler._props[viewName]) {\r\n\t\treturn scheduler._props[viewName];\r\n\t}\r\n\r\n\treturn null;\r\n};\r\n\r\nscheduler.getLabel = function(property, key) {\r\n\tvar sections = this.config.lightbox.sections;\r\n\tfor (var i=0; i scheduler.getState().max_date.valueOf()){\r\n\t\t\tendColumnIndex += getDaysDifference(endDate, scheduler.getState().max_date);\r\n\t\t}\r\n\t} else{\r\n\t\tendColumnIndex = Math.round(eventLength/60/60/1000/24);\r\n\t}\r\n\r\n\tvar last_column = true;\r\n\twhile (startColumnIndex < endColumnIndex){\r\n\t\tvar check = scheduler.date.add(endDate, -config.x_step, config.x_unit);\r\n\t\tif (ignore && ignore(endDate) && (!last_column || (last_column && ignore(check) ))){\r\n\t\t\teventLength -= (endDate-check);\r\n\r\n\t\t}else{\r\n\t\t\tlet excludedDuration = 0;\r\n\t\t\tconst intervalStart = new Date(Math.max(check.valueOf(), startDate.valueOf()));\r\n\t\t\tconst intervalEnd = endDate;\r\n\t\t\tconst leftCellCutOffStart = new Date(intervalStart.getFullYear(), intervalStart.getMonth(), intervalStart.getDate(), config.first_hour);\r\n\t\t\tconst leftCellCutOffEnd = new Date(intervalStart.getFullYear(), intervalStart.getMonth(), intervalStart.getDate(), config.last_hour||24);\r\n\t\t\tconst rightCellCutOffStart = new Date(endDate.getFullYear(), endDate.getMonth(), endDate.getDate(), config.first_hour);\r\n\t\t\tconst rightCellCutOffEnd = new Date(endDate.getFullYear(), endDate.getMonth(), endDate.getDate(), config.last_hour||24);\r\n\r\n\t\t\tif(intervalEnd.valueOf() > rightCellCutOffEnd.valueOf()){\r\n\t\t\t\texcludedDuration += intervalEnd - rightCellCutOffEnd;\r\n\t\t\t}\r\n\r\n\t\t\tif(intervalEnd.valueOf() > rightCellCutOffStart.valueOf()){\r\n\t\t\t\texcludedDuration += config._start_correction;\r\n\t\t\t} else {\r\n\t\t\t\texcludedDuration += intervalEnd.getHours()*60*60*1000 + intervalEnd.getMinutes()*60*1000;\r\n\t\t\t}\r\n\r\n\t\t\tif(intervalStart.valueOf() < leftCellCutOffEnd.valueOf()){\r\n\t\t\t\texcludedDuration += config._end_correction;\r\n\t\t\t}\r\n\r\n\t\t\tif(intervalStart.valueOf() < leftCellCutOffStart.valueOf()){\r\n\t\t\t\texcludedDuration += (leftCellCutOffStart.valueOf() - intervalStart.valueOf());\r\n\t\t\t}\r\n\t\t\t\r\n\r\n\t\t\teventLength -= excludedDuration;\r\n\t\t\tlast_column = false;\r\n\t\t}\r\n\t\tendDate = check;\r\n\t\tendColumnIndex--;\r\n\t}\r\n\treturn eventLength;\r\n};\r\nscheduler._get_fictional_event_length=function(end_date, ev_length, obj, back){\r\n\tvar sd = new Date(end_date);\r\n\tvar dir = back ? -1 : 1;\r\n\r\n\t//get difference caused by first|last hour\r\n\tif (obj._start_correction || obj._end_correction){\r\n\t\tvar today;\r\n\t\tif (back)\r\n\t\t\ttoday = (sd.getHours()*60+sd.getMinutes()) - (obj.first_hour||0)*60;\r\n\t\telse\r\n\t\t\ttoday = (obj.last_hour||0)*60 - (sd.getHours()*60+sd.getMinutes());\r\n\t\tvar per_day = (obj.last_hour - obj.first_hour)*60;\r\n\t\tvar days = Math.ceil( (ev_length / (60*1000) - today ) / per_day);\r\n\t\tif(days < 0) days = 0;\r\n\t\tev_length += days * (24*60 - per_day) * 60 * 1000;\r\n\t}\r\n\r\n\tvar fd = new Date(end_date*1+ev_length*dir);\r\n\tvar ignore = this[\"ignore_\"+this._mode];\r\n\r\n\tvar start_slot = 0,\r\n\t\tend_slot;\r\n\tif (obj.render){\r\n\t\tstart_slot = this._get_date_index(obj, sd);\r\n\t\tend_slot = this._get_date_index(obj, fd);\r\n\t} else{\r\n\t\tend_slot = Math.round(ev_length/60/60/1000/24);\r\n\t}\r\n\r\n\twhile (start_slot*dir <= end_slot*dir){\r\n\t\tvar check = scheduler.date.add(sd, obj.x_step*dir, obj.x_unit);\r\n\t\tif (ignore && ignore(sd)){\r\n\t\t\tev_length += (check-sd)*dir;\r\n\t\t\tend_slot += dir;\r\n\t\t}\r\n\r\n\t\tsd = check;\r\n\t\tstart_slot+=dir;\r\n\t}\r\n\r\n\treturn ev_length;\r\n};\r\n\r\nscheduler._get_section_view = function(){\r\n\treturn this.getView();\r\n};\r\n\r\nscheduler._get_section_property = function(){\r\n\tif(this.matrix && this.matrix[this._mode]){\r\n\t\treturn this.matrix[this._mode].y_property;\r\n\t}else if(this._props && this._props[this._mode]){\r\n\t\treturn this._props[this._mode].map_to;\r\n\t}\r\n\treturn null;\r\n};\r\n\r\nscheduler._is_initialized = function(){\r\n\tvar state = this.getState();\r\n\treturn (this._obj && state.date && state.mode);\r\n};\r\nscheduler._is_lightbox_open = function(){\r\n\tvar state = this.getState();\r\n\treturn state.lightbox_id !== null && state.lightbox_id !== undefined;\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n(function(){\r\n\r\n\t// eslint-disable-next-line no-control-regex\r\n\tvar htmlTags = new RegExp(\"<(?:.|\\n)*?>\", \"gm\");\r\n\tvar extraSpaces = new RegExp(\" +\", \"gm\");\r\n\r\n\tfunction stripHTMLLite(htmlText){\r\n\t\treturn (htmlText + \"\")\r\n\t\t\t.replace(htmlTags, \" \").\r\n\t\t\treplace(extraSpaces, \" \");\r\n\t}\r\n\r\n\tvar singleQuotes = new RegExp(\"'\", \"gm\");\r\n\tfunction escapeQuotes(text){\r\n\t\treturn (text + \"\").replace(singleQuotes, \"'\");\r\n\t}\r\n\r\n\tscheduler._waiAria = {\r\n\t\tgetAttributeString: function(attr){\r\n\t\t\tvar attributes = [\" \"];\r\n\t\t\tfor(var i in attr){\r\n\t\t\t\tif(typeof attr[i] != \"function\" && typeof attr[i] != \"object\") {\r\n\t\t\t\t\tvar text = escapeQuotes(stripHTMLLite(attr[i]));\r\n\t\t\t\t\tattributes.push(i + \"='\" + text + \"'\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tattributes.push(\" \");\r\n\t\t\treturn attributes.join(\" \");\r\n\t\t},\r\n\t\tsetAttributes: function(div, values){\r\n\t\t\tfor(var i in values){\r\n\t\t\t\tdiv.setAttribute(i, stripHTMLLite(values[i]));\r\n\t\t\t}\r\n\t\t\treturn div;\r\n\t\t},\r\n\r\n\t\tlabelAttr: function(div, content){\r\n\t\t\treturn this.setAttributes(div, {\"aria-label\": content});\r\n\t\t},\r\n\t\tlabel: function(label){\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": label});\r\n\t\t},\r\n\r\n\t\t// day/week/units\r\n\r\n\t\thourScaleAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\r\n\t\t},\r\n\t\tmonthCellAttr: function(div, date){\r\n\t\t\tthis.labelAttr(div, scheduler.templates.day_date(date));\r\n\t\t},\r\n\r\n\t\tnavBarDateAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\t\t},\r\n\t\tdayHeaderAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\t\t},\r\n\r\n\t\tdayColumnAttr: function(div, date){\r\n\t\t\tthis.dayHeaderAttr(div, scheduler.templates.day_date(date));\r\n\t\t},\r\n\r\n\t\theaderButtonsAttributes: function(div, label){\r\n\t\t\treturn this.setAttributes(div, {\"role\":\"button\", \"aria-label\":label});\r\n\t\t},\r\n\r\n\t\theaderToggleState: function(div, isActive){\r\n\t\t\treturn this.setAttributes(div, {\"aria-pressed\": isActive ? \"true\" : \"false\"});\r\n\t\t},\r\n\r\n\r\n\t\tgetHeaderCellAttr:function(dateString){\r\n\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": dateString});\r\n\t\t},\r\n\r\n\r\n\t\teventAttr: function(event, div){\r\n\t\t\tthis._eventCommonAttr(event, div);\r\n\t\t},\r\n\r\n\r\n\t\t_eventCommonAttr: function(event, div){\r\n\t\t\tdiv.setAttribute(\"aria-label\", stripHTMLLite(scheduler.templates.event_text(event.start_date, event.end_date, event)));\r\n\r\n\t\t\tif(scheduler.config.readonly){\r\n\t\t\t\tdiv.setAttribute(\"aria-readonly\", true);\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif(event.$dataprocessor_class){\r\n\t\t\t\tdiv.setAttribute(\"aria-busy\", true);\r\n\t\t\t}\r\n\r\n\r\n\t\t\tdiv.setAttribute(\"aria-selected\",\r\n\t\t\t\t(scheduler.getState().select_id == event.id) ? \"true\" : \"false\");\r\n\t\t},\r\n\r\n\t\tsetEventBarAttr: function(event, div){\r\n\t\t\tthis._eventCommonAttr(event, div);\r\n\t\t},\r\n\r\n\t\t_getAttributes: function(attributeSetter, arg){\r\n\t\t\tvar result = {\r\n\t\t\t\tsetAttribute:function(name, value){\r\n\t\t\t\t\tthis[name] = value;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\tattributeSetter.apply(this, [arg, result]);\r\n\t\t\treturn result;\r\n\r\n\t\t},\r\n\r\n\t\teventBarAttrString: function(event){\r\n\t\t\treturn this.getAttributeString(this._getAttributes(this.setEventBarAttr, event));\r\n\t\t},\r\n\r\n\r\n\r\n\t\tagendaHeadAttrString :function(){\r\n\t\t\treturn this.getAttributeString({role: \"row\"});\r\n\t\t},\r\n\t\tagendaHeadDateString :function(label){\r\n\t\t\treturn this.getAttributeString({role: \"columnheader\", \"aria-label\": label});\r\n\t\t},\r\n\t\tagendaHeadDescriptionString :function(label){\r\n\t\t\treturn this.agendaHeadDateString(label);\r\n\t\t},\r\n\t\tagendaDataAttrString: function(){\r\n\t\t\treturn this.getAttributeString({role: \"grid\"});\r\n\t\t},\r\n\t\tagendaEventAttrString: function(event){\r\n\t\t\tvar attrs = this._getAttributes(this._eventCommonAttr, event);\r\n\r\n\t\t\tattrs[\"role\"] = \"row\";\r\n\r\n\t\t\treturn this.getAttributeString(attrs);\r\n\r\n\t\t},\r\n\t\tagendaDetailsBtnString: function(){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels.icon_details});\r\n\t\t},\r\n\r\n\r\n\t\tgridAttrString: function(){\r\n\t\t\treturn this.getAttributeString({role: \"grid\"});\r\n\t\t},\r\n\r\n\t\tgridRowAttrString: function(event){\r\n\t\t\treturn this.agendaEventAttrString(event);\r\n\t\t},\r\n\r\n\t\tgridCellAttrString: function(event, column, value){\r\n\t\t\treturn this.getAttributeString({\"role\":\"gridcell\", \"aria-label\": [\r\n\t\t\t\t(column.label === undefined ? column.id : column.label),\r\n\t\t\t\t\": \",\r\n\t\t\t\tvalue\r\n\t\t\t]});\r\n\t\t},\r\n\r\n\t\tmapAttrString: function(){\r\n\t\t\treturn this.gridAttrString();\r\n\t\t},\r\n\t\tmapRowAttrString: function(event){\r\n\t\t\treturn this.gridRowAttrString(event);\r\n\t\t},\r\n\t\tmapDetailsBtnString: function(){\r\n\t\t\treturn this.agendaDetailsBtnString();\r\n\t\t},\r\n\r\n\t\tminicalHeader: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"id\":headerId+\"\",\r\n\t\t\t\t\"aria-live\":\"assertice\",\r\n\t\t\t\t\"aria-atomic\":\"true\"\r\n\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalGrid: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"aria-labelledby\":headerId+\"\",\r\n\t\t\t\t\"role\":\"grid\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalRow: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"row\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalDayCell: function(div, date){\r\n\t\t\tvar selected = (date.valueOf() < scheduler._max_date.valueOf() && date.valueOf() >= scheduler._min_date.valueOf());\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"gridcell\",\r\n\t\t\t\t\"aria-label\": scheduler.templates.day_date(date),\r\n\t\t\t\t\"aria-selected\": selected ? \"true\" : \"false\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalHeadCell: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"columnheader\"\r\n\t\t\t});\r\n\t\t},\r\n\r\n\r\n\t\tweekAgendaDayCell: function(div, date){\r\n\t\t\tvar header = div.querySelector(\".dhx_wa_scale_bar\");\r\n\t\t\tvar content = div.querySelector(\".dhx_wa_day_data\");\r\n\t\t\tvar headerId = scheduler.uid() + \"\";\r\n\t\t\tthis.setAttributes(header, { \"id\": headerId});\r\n\t\t\tthis.setAttributes(content, { \"aria-labelledby\": headerId});\r\n\r\n\t\t},\r\n\t\tweekAgendaEvent: function(div, event){\r\n\t\t\tthis.eventAttr(event, div);\r\n\t\t},\r\n\r\n\t\tlightboxHiddenAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t},\r\n\r\n\t\tlightboxVisibleAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"false\");\r\n\t\t},\r\n\r\n\t\tlightboxSectionButtonAttrString: function(label){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":label, \"tabindex\":\"0\"});\r\n\t\t},\r\n\r\n\t\tyearHeader: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"id\":headerId+\"\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tyearGrid: function(div, headerId){\r\n\t\t\tthis.minicalGrid(div, headerId);\r\n\t\t},\r\n\t\tyearHeadCell: function(div){\r\n\t\t\treturn this.minicalHeadCell(div);\r\n\t\t},\r\n\t\tyearRow: function(div){\r\n\t\t\treturn this.minicalRow(div);\r\n\t\t},\r\n\t\tyearDayCell: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"gridcell\"\r\n\t\t\t});\r\n\t\t},\r\n\r\n\t\tlightboxAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t\tdiv.firstChild.setAttribute(\"role\", \"heading\");\r\n\t\t},\r\n\r\n\t\tlightboxButtonAttrString:function(buttonName){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels[buttonName], \"tabindex\":\"0\"});\r\n\t\t},\r\n\t\teventMenuAttrString: function(iconName){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels[iconName]});\r\n\t\t},\r\n\t\tlightboxHeader: function(div, headerText){\r\n\t\t\tdiv.setAttribute(\"aria-label\", headerText);\r\n\t\t},\r\n\r\n\t\tlightboxSelectAttrString: function(time_option){\r\n\t\t\tvar label = \"\";\r\n\r\n\t\t\tswitch (time_option) {\r\n\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.year;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%m\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.month;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%d\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.day;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%H:%i\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.hour + \" \" + scheduler.locale.labels.minute;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": label});\r\n\t\t},\r\n\r\n\r\n\t\tmessageButtonAttrString: function(buttonLabel){\r\n\t\t\treturn \"tabindex='0' role='button' aria-label='\"+buttonLabel+\"'\";\r\n\t\t},\r\n\r\n\t\tmessageInfoAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"alert\");\r\n\t\t\t//div.setAttribute(\"tabindex\", \"-1\");\r\n\t\t},\r\n\r\n\t\tmessageModalAttr: function(div, uid){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t\tif(uid){\r\n\t\t\t\tdiv.setAttribute(\"aria-labelledby\", uid);\r\n\t\t\t}\r\n\r\n\t\t\t//\tdiv.setAttribute(\"tabindex\", \"-1\");\r\n\t\t},\r\n\r\n\t\tquickInfoAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t},\r\n\r\n\t\tquickInfoHeaderAttrString: function(){\r\n\t\t\treturn \" role='heading' \";\r\n\t\t},\r\n\r\n\t\tquickInfoHeader: function(div, header){\r\n\t\t\tdiv.setAttribute(\"aria-label\", header);\r\n\t\t},\r\n\r\n\t\tquickInfoButtonAttrString: function(label){\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"role\":\"button\", \"aria-label\":label, \"tabindex\":\"0\"});\r\n\t\t},\r\n\r\n\t\ttooltipAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"tooltip\");\r\n\t\t},\r\n\r\n\t\ttooltipVisibleAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"false\");\r\n\t\t},\r\n\r\n\t\ttooltipHiddenAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t}\r\n\t};\r\n\r\n\tfunction isDisabled(){\r\n\t\treturn !scheduler.config.wai_aria_attributes;\r\n\t}\r\n\r\n\tfor(var i in scheduler._waiAria){\r\n\t\tscheduler._waiAria[i] = (function(payload){\r\n\t\t\treturn function(){\r\n\t\t\t\tif(isDisabled()){\r\n\t\t\t\t\treturn \" \";\r\n\t\t\t\t}\r\n\t\t\t\treturn payload.apply(this, arguments);\r\n\t\t\t};\r\n\t\t})(scheduler._waiAria[i]);\r\n\t}\r\n\r\n\r\n})();\r\n\r\n}","export default function(scheduler){\r\n\treturn function assert(check, message){\r\n\t\tif (!check){\r\n\t\t\tif(scheduler.config.show_errors && scheduler.callEvent(\"onError\",[message]) !== false) {\r\n\t\t\t\tif (scheduler.message) {\r\n\t\t\t\t\tscheduler.message({type: \"error\", text: message, expire: -1});\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t// eslint-disable-next-line\r\n\t\t\t\t\tconsole.log(message);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// eslint-disable-next-line no-debugger\r\n\t\t\t\tdebugger;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n}","export default function extend(scheduler) {\r\n\r\nif (window.jQuery){\r\n\r\n(function( $ ){\r\n\tvar counter = 0;\r\n\tvar methods = [];\r\n\t$.fn.dhx_scheduler = function(config){\r\n\t\tif (typeof(config) === 'string') {\r\n\t\t\tif (methods[config] ) {\r\n\t\t\t\treturn methods[config].apply(this, []);\r\n\t\t\t}else {\r\n\t\t\t\t$.error('Method ' + config + ' does not exist on jQuery.dhx_scheduler');\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tvar views = [];\r\n\t\t\tthis.each(function() {\r\n\t\t\t\tif (this && this.getAttribute){\r\n\t\t\t\t\tif (!this.getAttribute(\"dhxscheduler\")){\r\n\t\t\t\t\t\tvar name = \"scheduler\";\r\n\t\t\t\t\t\tif (counter){\r\n\t\t\t\t\t\t\tname = \"scheduler\" + (counter+1);\r\n\t\t\t\t\t\t\twindow[name] = Scheduler.getSchedulerInstance();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tvar comp = window[name];\r\n\r\n\t\t\t\t\t\tthis.setAttribute(\"dhxscheduler\", name);\r\n\t\t\t\t\t\tfor (var key in config)\r\n\t\t\t\t\t\t\tif (key!=\"data\")\r\n\t\t\t\t\t\t\t\tcomp.config[key] = config[key];\r\n\r\n\t\t\t\t\t\tif (!this.getElementsByTagName(\"div\").length){\r\n\t\t\t\t\t\t\tthis.innerHTML = '
';\r\n\t\t\t\t\t\t\tthis.className += \" dhx_cal_container\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcomp.init(this, comp.config.date, comp.config.mode);\r\n\t\t\t\t\t\tif (config.data)\r\n\t\t\t\t\t\t\tcomp.parse(config.data);\r\n\r\n\t\t\t\t\t\tviews.push(comp);\r\n\t\t\t\t\t\tcounter++;\r\n\t\t\t\t\t} else\r\n\t\t\t\t\t\tviews.push(window[this.getAttribute(\"dhxscheduler\")]);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif (views.length === 1) return views[0];\r\n\t\t\treturn views;\r\n\t\t}\r\n\t};\r\n\r\n\r\n\r\n\r\n})(window.jQuery);\r\n\r\n}\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler.destructor = function(){\r\n\tscheduler.callEvent(\"onDestroy\", []);\r\n\tthis.clearAll();\r\n\r\n\tif(this.$container){\r\n\t\t// FIXME: clear container or remove container\r\n\t\tthis.$container.innerHTML = \"\";\r\n\t\t// scheduler.$domHelpers.remove(this.$container);\r\n\t}\r\n\r\n\tif(this._eventRemoveAll){\r\n\t\tthis._eventRemoveAll();\r\n\t}\r\n\r\n\tif(this.resetLightbox){\r\n\t\tthis.resetLightbox();\r\n\t}\r\n\r\n\tif(this._dp && this._dp.destructor){\r\n\t\tthis._dp.destructor();\r\n\t}\r\n\r\n\t// detachAllEvents should be called last, because in components may be attached events\r\n\tthis.detachAllEvents();\r\n\r\n\tfor(var i in this){\r\n\t\tif(i.indexOf(\"$\") === 0){\r\n\t\t\tdelete this[i];\r\n\t\t}\r\n\t}\r\n\tscheduler.$destroyed = true;\r\n};\r\n\r\n}","import serialize from \"../common/url_serialize.js\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler.Promise = window.Promise; \r\n\r\nfunction createConfig(method, args) {\r\n\tvar result = {\r\n\t\tmethod: method\r\n\t};\r\n\r\n\tif (args.length === 0) {\r\n\t\tthrow new Error(\"Arguments list of query is wrong.\");\r\n\t}\r\n\tif (args.length === 1) {\r\n\t\tif (typeof args[0] === \"string\") {\r\n\t\t\tresult.url = args[0];\r\n\t\t\tresult.async = true;\r\n\t\t} else {\r\n\t\t\tresult.url = args[0].url;\r\n\t\t\tresult.async = (args[0].async || true);\r\n\t\t\tresult.callback = args[0].callback;\r\n\t\t\tresult.headers = args[0].headers;\r\n\t\t}\r\n\t\tif (method === \"POST\" || \"PUT\") {\r\n\t\t\tif (args[0].data) {\r\n\t\t\t\tif (typeof args[0].data !== \"string\") {\r\n\t\t\t\t\tresult.data = serialize(args[0].data);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresult.data = args[0].data;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tresult.data = \"\";\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n\r\n\tresult.url = args[0];\r\n\tswitch(method) {\r\n\t\tcase \"GET\":\r\n\t\tcase \"DELETE\":\r\n\t\t\tresult.callback = args[1];\r\n\t\t\tresult.headers = args[2];\r\n\t\tbreak;\r\n\t\tcase \"POST\":\r\n\t\tcase \"PUT\":\r\n\t\t\tif (args[1]) {\r\n\t\t\t\tif (typeof args[1] !== \"string\") {\r\n\t\t\t\t\tresult.data = serialize(args[1]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresult.data = args[1];\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tresult.data = \"\";\r\n\t\t\t}\r\n\t\t\tresult.callback = args[2];\r\n\t\t\tresult.headers = args[3];\r\n\t\tbreak;\r\n\t}\r\n\treturn result;\r\n}\r\nscheduler.ajax = {\r\n\t// if false - dhxr param will added to prevent caching on client side (default),\r\n\t// if true - do not add extra params\r\n\tcache: true,\r\n\r\n\t// default method for load/loadStruct, post/get allowed\r\n\tmethod: \"get\",\r\n\r\n\tserializeRequestParams: serialize,\r\n\tparse: function(data) {\r\n\t\tif (typeof data !== \"string\") return data;\r\n\r\n\t\tvar obj;\r\n\t\tdata = data.replace(/^[\\s]+/,\"\");\r\n\t\tif (typeof DOMParser !== \"undefined\" && !scheduler.$env.isIE) { // ff,ie9\r\n\t\t\tobj = (new DOMParser()).parseFromString(data, \"text/xml\");\r\n\t\t} else if (typeof window.ActiveXObject !== \"undefined\") {\r\n\t\t\tobj = new window.ActiveXObject(\"Microsoft.XMLDOM\");\r\n\t\t\tobj.async = \"false\";\r\n\t\t\tobj.loadXML(data);\r\n\t\t}\r\n\t\treturn obj;\r\n\t},\r\n\txmltop: function(tagname, xhr, obj) {\r\n\t\tif (typeof xhr.status == \"undefined\" || xhr.status < 400) {\r\n\t\t\tvar xml = (!xhr.responseXML) ? this.parse(xhr.responseText || xhr) : (xhr.responseXML || xhr);\r\n\t\t\tif (xml && xml.documentElement !== null && !xml.getElementsByTagName(\"parsererror\").length) {\r\n\t\t\t\treturn xml.getElementsByTagName(tagname)[0];\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (obj !== -1) scheduler.callEvent(\"onLoadXMLError\",[\"Incorrect XML\", arguments[1], obj]);\r\n\t\treturn document.createElement(\"DIV\");\r\n\t},\r\n\txpath: function(xpathExp, docObj) {\r\n\t\tif (!docObj.nodeName) docObj = docObj.responseXML || docObj;\r\n\t\tif (scheduler.$env.isIE) {\r\n\t\t\treturn docObj.selectNodes(xpathExp)||[];\r\n\t\t} else {\r\n\t\t\tvar rows = [];\r\n\t\t\tvar first;\r\n\t\t\tvar col = (docObj.ownerDocument||docObj).evaluate(xpathExp, docObj, null, XPathResult.ANY_TYPE, null);\r\n\r\n\t\t\twhile (true){\r\n\t\t\t\tfirst = col.iterateNext();\r\n\t\t\t\tif(first){\r\n\t\t\t\t\trows.push(first);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn rows;\r\n\t\t}\r\n\t},\r\n\tquery: function(config) {\r\n\t\treturn this._call(\r\n\t\t\t(config.method || \"GET\"),\r\n\t\t\tconfig.url,\r\n\t\t\tconfig.data || \"\",\r\n\t\t\t(config.async || true),\r\n\t\t\tconfig.callback,\r\n\t\t\tconfig.headers\r\n\t\t);\r\n\t},\r\n\tget: function(url, onLoad, headers) {\r\n\t\tvar config = createConfig(\"GET\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tgetSync: function(url, headers) {\r\n\t\tvar config = createConfig(\"GET\", arguments);\r\n\t\tconfig.async = false;\r\n\t\treturn this.query(config);\r\n\t},\r\n\tput: function(url, postData, onLoad, headers) {\r\n\t\tvar config = createConfig(\"PUT\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tdel: function(url, onLoad, headers) {\r\n\t\t/**\r\n\t\t * https://tools.ietf.org/html/rfc7231#section-4.3.5\r\n\t\t * A payload within a DELETE request message has no defined semantics;\r\n\t\t * sending a payload body on a DELETE request might cause some existing\r\n\t\t * implementations to reject the request.\r\n\t\t */\r\n\t\tvar config = createConfig(\"DELETE\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tpost: function(url, postData, onLoad, headers) {\r\n\t\tif (arguments.length == 1) {\r\n\t\t\tpostData = \"\";\r\n\t\t} else if (arguments.length == 2 && typeof(postData) == \"function\") {\r\n\t\t\tonLoad = postData;\r\n\t\t\tpostData = \"\";\r\n\t\t}\r\n\t\tvar config = createConfig(\"POST\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tpostSync: function(url, postData, headers) {\r\n\t\tpostData = (postData === null ? \"\" : String(postData));\r\n\r\n\t\tvar config = createConfig(\"POST\", arguments);\r\n\t\tconfig.async = false;\r\n\t\treturn this.query(config);\r\n\t},\r\n\t_call: function(method, url, postData, async, onLoad, headers) {\r\n\t\treturn new scheduler.Promise((function(resolve, reject) {\r\n\t\t\tvar t = (typeof XMLHttpRequest !== undefined && !scheduler.$env.isIE ? new XMLHttpRequest() : new window.ActiveXObject(\"Microsoft.XMLHTTP\"));\r\n\t\t\tvar isQt = (navigator.userAgent.match(/AppleWebKit/) !== null && navigator.userAgent.match(/Qt/) !== null && navigator.userAgent.match(/Safari/) !== null);\r\n\r\n\t\t\tif (!!async) {\r\n\t\t\t\tt.addEventListener(\"readystatechange\", function() {\r\n\t\t\t\t\tif ((t.readyState == 4) || (isQt && t.readyState == 3)) { // what for long response and status 404?\r\n\t\t\t\t\t\tif (t.status != 200 || t.responseText === \"\")\r\n\t\t\t\t\t\t\tif (!scheduler.callEvent(\"onAjaxError\", [t])) return;\r\n\r\n\t\t\t\t\t\tsetTimeout(function() {\r\n\t\t\t\t\t\t\tif (typeof(onLoad) == \"function\") {\r\n\t\t\t\t\t\t\t\tonLoad.apply(window, [{xmlDoc:t, filePath:url}]); // dhtmlx-compat, response.xmlDoc.responseXML/responseText\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tresolve(t);\r\n\t\t\t\t\t\t\tif (typeof(onLoad) == \"function\") {\r\n\t\t\t\t\t\t\t\tonLoad = null;\r\n\t\t\t\t\t\t\t\tt = null;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}, 0);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif (method == \"GET\" && !this.cache) {\r\n\t\t\t\turl += (url.indexOf(\"?\")>=0?\"&\":\"?\")+\"dhxr\"+new Date().getTime()+\"=1\";\r\n\t\t\t}\r\n\r\n\t\t\tt.open(method, url, async);\r\n\r\n\t\t\tif (headers){\r\n\t\t\t\tfor (var key in headers)\r\n\t\t\t\t\tt.setRequestHeader(key, headers[key]);\r\n\t\t\t} else if (method.toUpperCase() == \"POST\" || method == \"PUT\" || method == \"DELETE\") {\r\n\t\t\t\tt.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\r\n\t\t\t} else if (method == \"GET\") {\r\n\t\t\t\tpostData = null;\r\n\t\t\t}\r\n\r\n\t\t\tt.setRequestHeader(\"X-Requested-With\", \"XMLHttpRequest\");\r\n\r\n\t\t\tt.send(postData);\r\n\r\n\t\t\tif (!async) return {xmlDoc:t, filePath:url}; // dhtmlx-compat, response.xmlDoc.responseXML/responseText\r\n\t\t}.bind(this)));\r\n\t},\r\n\turlSeparator: function(str){\r\n\t\tif (str.indexOf(\"?\") != -1)\r\n\t\t\treturn \"&\";\r\n\t\telse\r\n\t\t\treturn \"?\";\r\n\t}\r\n};\r\n\r\nscheduler.$ajax = scheduler.ajax; // for old\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n/*\r\n%e\tDay of the month without leading zeros (01..31)\r\n%d\tDay of the month, 2 digits with leading zeros (01..31)\r\n%j\tDay of the year, 3 digits with leading zeros (001..366)\r\n%a\tA textual representation of a day, two letters\r\n%W\tA full textual representation of the day of the week\r\n\r\n%c\tNumeric representation of a month, without leading zeros (0..12)\r\n%m\tNumeric representation of a month, with leading zeros (00..12)\r\n%b\tA short textual representation of a month, three letters (Jan..Dec)\r\n%M\tA full textual representation of a month, such as January or March (January..December)\r\n\r\n%y\tA two digit representation of a year (93..03)\r\n%Y\tA full numeric representation of a year, 4 digits (1993..03)\r\n*/\r\n\r\nscheduler.config={\r\n\tdefault_date: \"%j %M %Y\",\r\n\tmonth_date: \"%F %Y\",\r\n\tload_date: \"%Y-%m-%d\",\r\n\tweek_date: \"%l\",\r\n\tday_date: \"%D %j\",\r\n\thour_date: \"%H:%i\",\r\n\tmonth_day: \"%d\",\r\n\t//xml_date: \"%m/%d/%Y %H:%i\",\r\n\tdate_format: \"%Y-%m-%d %H:%i\",\r\n\tapi_date: \"%d-%m-%Y %H:%i\",\r\n\tparse_exact_format: false,\r\n\tpreserve_length:true,\r\n\ttime_step: 5,\r\n\tdisplayed_event_color: \"#ff4a4a\",\r\n\tdisplayed_event_text_color: \"#ffef80\",\r\n\twide_form: 0,\r\n\tday_column_padding: 8,\r\n\tuse_select_menu_space: true,\r\n\tfix_tab_position: true,\r\n\tstart_on_monday: true,\r\n\tfirst_hour: 0,\r\n\tlast_hour: 24,\r\n\treadonly: false,\r\n\tdrag_resize: true,\r\n\tdrag_move: true,\r\n\tdrag_create: true,\r\n\tdrag_event_body: true,\r\n\tdblclick_create: true,\r\n\tdetails_on_dblclick: true,\r\n\tedit_on_create: true,\r\n\tdetails_on_create: true,\r\n\theader: null,\r\n\thour_size_px: 44,\r\n\tresize_month_events:false,\r\n\tresize_month_timed:false,\r\n\t\r\n\tresponsive_lightbox: false,\r\n\tseparate_short_events: true,\r\n\trtl:false,\r\n\r\n\tcascade_event_display: false,\r\n\tcascade_event_count: 4,\r\n\tcascade_event_margin: 30,\r\n\r\n\tmulti_day:true,\r\n\tmulti_day_height_limit: 200,\r\n\r\n\tdrag_lightbox: true,\r\n\tpreserve_scroll: true,\r\n\tselect: true,\r\n\r\n\tserver_utc: false,\r\n\ttouch:true,\r\n\ttouch_tip:true,\r\n\ttouch_drag:500,\r\n\ttouch_swipe_dates: false,\r\n\tquick_info_detached:true,\r\n\r\n\tpositive_closing: false,\r\n\t//header_datepicker: true,\r\n\tdrag_highlight: true,\r\n\tlimit_drag_out: false,\r\n\ticons_edit: [\"icon_save\", \"icon_cancel\"],\r\n\ticons_select: [\"icon_details\", \"icon_edit\", \"icon_delete\"],\r\n\tbuttons_left: [\"dhx_save_btn\", \"dhx_cancel_btn\"],\r\n\tbuttons_right: [\"dhx_delete_btn\"],\r\n\tlightbox: {\r\n\t\tsections: [\r\n\t\t\t{name: \"description\", map_to: \"text\", type: \"textarea\", focus: true},\r\n\t\t\t{name: \"time\", height: 72, type: \"time\", map_to: \"auto\"}\r\n\t\t]\r\n\t},\r\n\thighlight_displayed_event: true,\r\n\tleft_border: false,\r\n\r\n\tajax_error: \"alert\",//\"ignore\"|\"console\"\r\n\tdelay_render: 0,\r\n\ttimeline_swap_resize: true,\r\n\twai_aria_attributes: true,\r\n\twai_aria_application_role: true,\r\n\r\n\tcsp: \"auto\",\r\n\tevent_attribute: \"data-event-id\",\r\n\tshow_errors: true\r\n};\r\n\r\nscheduler.config.buttons_left.$initial = scheduler.config.buttons_left.join();\r\nscheduler.config.buttons_right.$initial = scheduler.config.buttons_right.join();\r\n\r\nscheduler._helpers = {\r\n\tparseDate: function parseDate(date) {\r\n\t\tvar parse = scheduler.templates.xml_date || scheduler.templates.parse_date;\r\n\t\treturn parse(date);\r\n\t},\r\n\tformatDate: function formatDate(date) {\r\n\t\tvar format = scheduler.templates.xml_format || scheduler.templates.format_date;\r\n\t\treturn format(date);\r\n\t}\r\n};\r\n\r\nscheduler.templates={};\r\nscheduler.init_templates=function(){\r\n\r\n\r\n\r\n\tvar d=scheduler.date.date_to_str;\r\n\tvar c=scheduler.config;\r\n\tvar f = function(a,b){\r\n\t\tfor (var c in b)\r\n\t\t\tif (!a[c]) a[c]=b[c];\r\n\t};\r\n\tf(scheduler.templates,{\r\n\t\tday_date:d(c.default_date),\r\n\t\tmonth_date:d(c.month_date),\r\n\t\tweek_date:function(d1,d2){\r\n\t\t\tif(c.rtl) {\r\n\t\t\t\treturn scheduler.templates.day_date(scheduler.date.add(d2,-1,\"day\"))+\" – \"+scheduler.templates.day_date(d1);\r\n\t\t\t} \r\n\t\t\treturn scheduler.templates.day_date(d1)+\" – \"+scheduler.templates.day_date(scheduler.date.add(d2,-1,\"day\"));\r\n\t\t},\r\n\t\tday_scale_date:d(c.default_date),\r\n\t\ttime_slot_text: function(date){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\ttime_slot_class: function(date){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\r\n\t\tmonth_scale_date:d(c.week_date),\r\n\t\tweek_scale_date:d(c.day_date),\r\n\t\thour_scale:d(c.hour_date),\r\n\t\ttime_picker:d(c.hour_date),\r\n\t\tevent_date:d(c.hour_date),\r\n\t\tmonth_day:d(c.month_day),\r\n\r\n\t\tload_format: d(c.load_date),\r\n\t//\txml_date:scheduler.date.str_to_date(c.xml_date,c.server_utc),\r\n\t//\txml_format:d(c.date_format,c.server_utc),\r\n\t\tformat_date: d(c.date_format, c.server_utc),\r\n\t\tparse_date:scheduler.date.str_to_date(c.date_format,c.server_utc),\r\n\t\tapi_date:scheduler.date.str_to_date(c.api_date, false, false),\r\n\t\tevent_header:function(start,end,ev){\r\n\r\n\t\t\tif(ev._mode === \"small\" || ev._mode === \"smallest\"){\r\n\t\t\t\treturn scheduler.templates.event_date(start);\r\n\t\t\t}else{\r\n\t\t\t\treturn scheduler.templates.event_date(start)+\" - \"+scheduler.templates.event_date(end);\r\n\t\t\t}\r\n\t\t},\r\n\t\tevent_text:function(start,end,ev){\r\n\t\t\treturn ev.text;\r\n\t\t},\r\n\t\tevent_class:function(start,end,ev){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tmonth_date_class:function(d){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tweek_date_class:function(d){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tevent_bar_date:function(start,end,ev) {\r\n\t\t\treturn scheduler.templates.event_date(start);\r\n\t\t},\r\n\t\tevent_bar_text:function(start,end,ev){\r\n\t\t\treturn ev.text;\r\n\t\t},\r\n\t\tmonth_events_link : function(date, count){\r\n\t\t\treturn \"View more(\"+count+\" events)\";\r\n\t\t},\r\n\t\tdrag_marker_class : function(start, end, event){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tdrag_marker_content : function(start, end, event){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\t/* Could be redifined */\r\n\t\ttooltip_date_format: scheduler.date.date_to_str(\"%Y-%m-%d %H:%i\"),\r\n\t\ttooltip_text: function(start, end, event) {\r\n\t\t\treturn \"Event: \" + event.text + \"
Start date: \" + scheduler.templates.tooltip_date_format(start) + \"
End date: \" + scheduler.templates.tooltip_date_format(end);\r\n\t\t},\r\n\r\n\t\tcalendar_month: d(\"%F %Y\"),\r\n\t\tcalendar_scale_date: d(\"%D\"),\r\n\t\tcalendar_date: d(\"%d\"),\r\n\t\tcalendar_time: d(\"%d-%m-%Y\")\r\n\r\n\t});\r\n\tthis.callEvent(\"onTemplatesReady\",[]);\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler._events = {};\r\nscheduler.clearAll = function() {\r\n\tthis._events = {};\r\n\tthis._loaded = {};\r\n\r\n\tthis._edit_id = null;\r\n\tthis._select_id = null;\r\n\tthis._drag_id = null;\r\n\tthis._drag_mode = null;\r\n\tthis._drag_pos = null;\r\n\tthis._new_event = null;\r\n\r\n\tthis.clear_view();\r\n\tthis.callEvent(\"onClearAll\", []);\r\n};\r\nscheduler.addEvent = function(start_date, end_date, text, id, extra_data) {\r\n\tif (!arguments.length)\r\n\t\treturn this.addEventNow();\r\n\tvar ev = start_date;\r\n\tif (arguments.length != 1) {\r\n\t\tev = extra_data || {};\r\n\t\tev.start_date = start_date;\r\n\t\tev.end_date = end_date;\r\n\t\tev.text = text;\r\n\t\tev.id = id;\r\n\t}\r\n\tev.id = ev.id || scheduler.uid();\r\n\tev.text = ev.text || \"\";\r\n\r\n\tif (typeof ev.start_date == \"string\") ev.start_date = this.templates.api_date(ev.start_date);\r\n\tif (typeof ev.end_date == \"string\") ev.end_date = this.templates.api_date(ev.end_date);\r\n\tvar d = (this.config.event_duration || this.config.time_step) * 60000;\r\n\tif (ev.start_date.valueOf() == ev.end_date.valueOf())\r\n\t\tev.end_date.setTime(ev.end_date.valueOf() + d);\r\n\r\n\tev.start_date.setMilliseconds(0);\r\n\tev.end_date.setMilliseconds(0);\r\n\r\n\tev._timed = this.isOneDayEvent(ev);\r\n\r\n\tvar is_new = !this._events[ev.id];\r\n\tthis._events[ev.id] = ev;\r\n\tthis.event_updated(ev);\r\n\tif (!this._loading)\r\n\t\tthis.callEvent(is_new ? \"onEventAdded\" : \"onEventChanged\", [ev.id, ev]);\r\n\treturn ev.id;\r\n};\r\nscheduler.deleteEvent = function(id, silent) {\r\n\tvar ev = this._events[id];\r\n\tif (!silent && (!this.callEvent(\"onBeforeEventDelete\", [id, ev]) || !this.callEvent(\"onConfirmedBeforeEventDelete\", [id, ev])))\r\n\t\treturn;\r\n\tif (ev) {\r\n\t\tif(scheduler.getState().select_id == id){\r\n\t\t\tscheduler.unselect();\r\n\t\t}\r\n\t\tdelete this._events[id];\r\n\t\tthis.event_updated(ev);\r\n\r\n\t\tif(this._drag_id == ev.id){\r\n\t\t\tthis._drag_id = null;\r\n\t\t\tthis._drag_mode=null;\r\n\t\t\tthis._drag_pos=null;\r\n\t\t}\r\n\t}\r\n\r\n\tthis.callEvent(\"onEventDeleted\", [id, ev]);\r\n};\r\nscheduler.getEvent = function(id) {\r\n\treturn this._events[id];\r\n};\r\nscheduler.setEvent = function(id, hash) {\r\n\tif(!hash.id)\r\n\t\thash.id = id;\r\n\r\n\tthis._events[id] = hash;\r\n};\r\nscheduler.for_rendered = function(id, method) {\r\n\tfor (var i = this._rendered.length - 1; i >= 0; i--)\r\n\t\tif (this._rendered[i].getAttribute(this.config.event_attribute) == id)\r\n\t\t\tmethod(this._rendered[i], i);\r\n};\r\nscheduler.changeEventId = function(id, new_id) {\r\n\tif (id == new_id) return;\r\n\tvar ev = this._events[id];\r\n\tif (ev) {\r\n\t\tev.id = new_id;\r\n\t\tthis._events[new_id] = ev;\r\n\t\tdelete this._events[id];\r\n\t}\r\n\tthis.for_rendered(id, function(r) {\r\n\t\tr.setAttribute(\"event_id\", new_id); // for backward compatibility\r\n\t\tr.setAttribute(scheduler.config.event_attribute, new_id);\r\n\t});\r\n\tif (this._select_id == id) this._select_id = new_id;\r\n\tif (this._edit_id == id) this._edit_id = new_id;\r\n\t//if (this._drag_id==id) this._drag_id=new_id;\r\n\tthis.callEvent(\"onEventIdChange\", [id, new_id]);\r\n};\r\n\r\n(function() {\r\n\tvar attrs = [\"text\", \"Text\", \"start_date\", \"StartDate\", \"end_date\", \"EndDate\"];\r\n\tvar create_getter = function(name) {\r\n\t\treturn function(id) { return (scheduler.getEvent(id))[name]; };\r\n\t};\r\n\tvar create_setter = function(name) {\r\n\t\treturn function(id, value) {\r\n\t\t\tvar ev = scheduler.getEvent(id);\r\n\t\t\tev[name] = value;\r\n\t\t\tev._changed = true;\r\n\t\t\tev._timed = this.isOneDayEvent(ev);\r\n\t\t\tscheduler.event_updated(ev, true);\r\n\t\t};\r\n\t};\r\n\tfor (var i = 0; i < attrs.length; i += 2) {\r\n\t\tscheduler[\"getEvent\" + attrs[i + 1]] = create_getter(attrs[i]);\r\n\t\tscheduler[\"setEvent\" + attrs[i + 1]] = create_setter(attrs[i]);\r\n\t}\r\n})();\r\n\r\nscheduler.event_updated = function(ev, force) {\r\n\tif (this.is_visible_events(ev))\r\n\t\tthis.render_view_data();\r\n\telse\r\n\t\tthis.clear_event(ev.id);\r\n};\r\nscheduler.is_visible_events = function(ev) {\r\n\tif(!this._min_date || !this._max_date){\r\n\t\treturn false;\r\n\t}\r\n\r\n\t//if in displayed dates\r\n\tvar in_visible_range = (ev.start_date.valueOf() < this._max_date.valueOf() && this._min_date.valueOf() < ev.end_date.valueOf());\r\n\r\n\tif(in_visible_range){\r\n\r\n\t\t//end dates are not between last/first hours\r\n\t\tvar evFirstHour = ev.start_date.getHours(),\r\n\t\t\tevLastHour = ev.end_date.getHours() + (ev.end_date.getMinutes()/60),\r\n\t\t\tlastHour = this.config.last_hour,\r\n\t\t\tfirstHour = this.config.first_hour;\r\n\r\n\t\tvar end_dates_visible = (this._table_view || !((evLastHour > lastHour || evLastHour <= firstHour) && (evFirstHour >= lastHour || evFirstHour < firstHour)));\r\n\r\n\t\tif(end_dates_visible){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\r\n\t\t\t//event is bigger than area hidden between last/first hours\r\n\t\t\tvar event_duration = (ev.end_date.valueOf() - ev.start_date.valueOf()) / (1000*60*60),//hours\r\n\t\t\t\thidden_duration = 24 - (this.config.last_hour - this.config.first_hour);\r\n\r\n\t\t\treturn !!((event_duration > hidden_duration) || (evFirstHour < lastHour && evLastHour > firstHour));\r\n\r\n\t\t}\r\n\t}else{\r\n\t\treturn false;\r\n\t}\r\n};\r\nscheduler.isOneDayEvent = function(ev) {\r\n\t// decrease by one ms so events that ends on midnight on the next day were still considered one day events\r\n\t// e.g. (09-02-2018 19:00 - 10-02-2018 00:00)\r\n\t// events >= 24h long are considered multiday\r\n\tvar checkEndDate = new Date(ev.end_date.valueOf() - 1);\r\n\treturn (\r\n\t\tev.start_date.getFullYear() === checkEndDate.getFullYear() &&\r\n\t\tev.start_date.getMonth() === checkEndDate.getMonth() &&\r\n\t\tev.start_date.getDate() === checkEndDate.getDate()\r\n\t) && ((ev.end_date.valueOf() - ev.start_date.valueOf()) < (1000 * 60 * 60 * 24));\r\n};\r\n\r\nscheduler.get_visible_events = function(only_timed) {\r\n\t//not the best strategy for sure\r\n\tvar stack = [];\r\n\r\n\tfor (var id in this._events)\r\n\t\tif (this.is_visible_events(this._events[id]))\r\n\t\t\tif (!only_timed || this._events[id]._timed)\r\n\t\t\t\tif (this.filter_event(id, this._events[id]))\r\n\t\t\t\t\tstack.push(this._events[id]);\r\n\r\n\treturn stack;\r\n};\r\nscheduler.filter_event = function(id, ev) {\r\n\tvar filter = this[\"filter_\" + this._mode];\r\n\treturn (filter) ? filter(id, ev) : true;\r\n};\r\nscheduler._is_main_area_event = function(ev){\r\n\treturn !!ev._timed;\r\n};\r\nscheduler.render_view_data = function(evs, hold) {\r\n\tvar full = false;\r\n\tif (!evs) {\r\n\t\tfull = true;\r\n\t\tif (this._not_render) {\r\n\t\t\tthis._render_wait = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._render_wait = false;\r\n\r\n\t\tthis.clear_view();\r\n\t\tevs = this.get_visible_events(!(this._table_view || this.config.multi_day));\r\n\t}\r\n\tfor(var i= 0, len = evs.length; i < len; i++){\r\n\t\tthis._recalculate_timed(evs[i]);\r\n\t}\r\n\r\n\tif (this.config.multi_day && !this._table_view) {\r\n\r\n\t\tvar tvs = [];\r\n\t\tvar tvd = [];\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tif (this._is_main_area_event(evs[i]))\r\n\t\t\t\ttvs.push(evs[i]);\r\n\t\t\telse\r\n\t\t\t\ttvd.push(evs[i]);\r\n\t\t}\r\n\r\n\t\tif(!this._els['dhx_multi_day']){\r\n\t\t\tvar message = scheduler._commonErrorMessages.unknownView(this._mode);\r\n\t\t\tthrow new Error(message);\r\n\t\t}\r\n\r\n\t\t// multiday events\r\n\t\tthis._rendered_location = this._els['dhx_multi_day'][0];\r\n\t\tthis._table_view = true;\r\n\t\tthis.render_data(tvd, hold);\r\n\t\tthis._table_view = false;\r\n\r\n\t\t// normal events\r\n\t\tthis._rendered_location = this._els['dhx_cal_data'][0];\r\n\t\tthis._table_view = false;\r\n\t\tthis.render_data(tvs, hold);\r\n\r\n\t} else {\r\n\t\tvar buffer = document.createDocumentFragment();\r\n\t\tvar renderedLocation = this._els['dhx_cal_data'][0];\r\n\t\tthis._rendered_location = buffer;\r\n\t\tthis.render_data(evs, hold);\r\n\t\trenderedLocation.appendChild(buffer);\r\n\t\tthis._rendered_location = renderedLocation;\r\n\r\n\t}\r\n\r\n\tif(full){\r\n\t\tthis.callEvent(\"onDataRender\", []);\r\n\t}\r\n};\r\n\r\n\r\nscheduler._view_month_day = function(e){\r\n\tvar date = scheduler.getActionData(e).date;\r\n\tif(!scheduler.callEvent(\"onViewMoreClick\", [date]))\r\n\t\treturn;\r\n\tscheduler.setCurrentView(date, \"day\");\r\n};\r\n\r\nscheduler._render_month_link = function(ev){\r\n\tvar parent = this._rendered_location;\r\n\tvar toRender = this._lame_clone(ev);\r\n\r\n\t//render links in each cell of multiday events\r\n\tfor(var d = ev._sday; d < ev._eday; d++){\r\n\r\n\t\ttoRender._sday = d;\r\n\t\ttoRender._eday = d+1;\r\n\r\n\t\tvar date = scheduler.date;\r\n\t\tvar curr = scheduler._min_date;\r\n\t\tcurr = date.add(curr, toRender._sweek, \"week\");\r\n\t\tcurr = date.add(curr, toRender._sday, \"day\");\r\n\t\tvar count = scheduler.getEvents(curr, date.add(curr, 1, \"day\")).length;\r\n\r\n\t\tvar pos = this._get_event_bar_pos(toRender);\r\n\t\tvar widt = (pos.x2 - pos.x);\r\n\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tscheduler.event(el, \"click\", function(e){scheduler._view_month_day(e);});\r\n\t\tel.className = \"dhx_month_link\";\r\n\t\tel.style.top = pos.y + \"px\";\r\n\t\tel.style.left = pos.x + \"px\";\r\n\t\tel.style.width = widt + \"px\";\r\n\t\tel.innerHTML = scheduler.templates.month_events_link(curr, count);\r\n\t\tthis._rendered.push(el);\r\n\r\n\t\tparent.appendChild(el);\r\n\t}\r\n};\r\n\r\nscheduler._recalculate_timed = function(id){\r\n\tif(!id) return;\r\n\tvar ev;\r\n\tif(typeof(id) != \"object\")\r\n\t\tev = this._events[id];\r\n\telse\r\n\t\tev = id;\r\n\tif(!ev) return;\r\n\tev._timed = scheduler.isOneDayEvent(ev);\r\n};\r\nscheduler.attachEvent(\"onEventChanged\", scheduler._recalculate_timed);\r\nscheduler.attachEvent(\"onEventAdded\", scheduler._recalculate_timed);\r\n\r\nscheduler.render_data = function(evs, hold) {\r\n\tevs = this._pre_render_events(evs, hold);\r\n\tvar containers = {};\r\n\tfor (var i = 0; i < evs.length; i++)\r\n\t\tif (this._table_view){\r\n\t\t\tif(scheduler._mode != 'month'){\r\n\t\t\t\tthis.render_event_bar(evs[i]);//may be multiday section on other views\r\n\t\t\t}else{\r\n\r\n\t\t\t\tvar max_evs = scheduler.config.max_month_events;\r\n\t\t\t\tif(max_evs !== max_evs*1 || evs[i]._sorder < max_evs){\r\n\t\t\t\t\t//of max number events per month cell is set and event can be rendered\r\n\t\t\t\t\tthis.render_event_bar(evs[i]);\r\n\t\t\t\t}else if(max_evs !== undefined && evs[i]._sorder == max_evs){\r\n\t\t\t\t\t//render 'view more' links\r\n\t\t\t\t\tscheduler._render_month_link(evs[i]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\t//do not render events with ordinal number > maximum events per cell\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t}else{\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tvar parent = scheduler.locate_holder(ev._sday);\r\n\t\t\tif (!parent) continue; //attempt to render non-visible event\r\n\r\n\t\t\tif(!containers[ev._sday]){\r\n\t\t\t\tcontainers[ev._sday] = {\r\n\t\t\t\t\treal: parent,\r\n\t\t\t\t\tbuffer: document.createDocumentFragment(),\r\n\t\t\t\t\twidth: parent.clientWidth\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\tvar container = containers[ev._sday];\r\n\t\t\tthis.render_event(ev, container.buffer, container.width);\r\n\t\t}\r\n\r\n\t\tfor(var i in containers){\r\n\t\t\tvar container = containers[i];\r\n\t\t\tif(container.real && container.buffer){\r\n\t\t\t\tcontainer.real.appendChild(container.buffer);\r\n\t\t\t}\r\n\t\t}\r\n};\r\n\r\nscheduler._get_first_visible_cell = function(cells) {\r\n\tfor (var i = 0; i < cells.length; i++) {\r\n\t\tif ((cells[i].className || \"\").indexOf(\"dhx_scale_ignore\") == -1) {\r\n\t\t\treturn cells[i];\r\n\t\t}\r\n\t}\r\n\t// if no visible cell found, return cells[0] to be more tolerant, since it's the original logic\r\n\treturn cells[0];\r\n};\r\n\r\nscheduler._pre_render_events = function(evs, hold) {\r\n\tvar hb = this.xy.bar_height;\r\n\tvar h_old = this._colsS.heights;\r\n\tvar h = this._colsS.heights = [0, 0, 0, 0, 0, 0, 0];\r\n\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\r\n\tif (!this._table_view) {\r\n\t\tevs = this._pre_render_events_line(evs, hold); //ignore long events for now\r\n\t}\r\n\telse {\r\n\t\tevs = this._pre_render_events_table(evs, hold);\r\n\t}\r\n\tif (this._table_view) {\r\n\t\tif (hold)\r\n\t\t\tthis._colsS.heights = h_old;\r\n\t\telse {\r\n\t\t\tvar monthRows = data.querySelectorAll(\".dhx_cal_month_row\");\r\n\t\t\tif (monthRows.length) {\r\n\t\t\t\tfor (var i = 0; i < monthRows.length; i++) {\r\n\t\t\t\t\th[i]++;\r\n\t\t\t\t\tvar cells = monthRows[i].querySelectorAll(\".dhx_cal_month_cell\");\r\n\t\t\t\t\tvar cellHeight = this._colsS.height - this.xy.month_head_height;\r\n\t\t\t\t\tif ((h[i]) * hb > cellHeight) { // 22 - height of cell's header\r\n\t\t\t\t\t\t//we have overflow, update heights\r\n\r\n\t\t\t\t\t\tvar cHeight = cellHeight;\r\n\t\t\t\t\t\tif(this.config.max_month_events*1 !== this.config.max_month_events || h[i] <= this.config.max_month_events){\r\n\t\t\t\t\t\t\tcHeight = h[i] * hb;\r\n\t\t\t\t\t\t}else if( (this.config.max_month_events + 1) * hb > cellHeight){\r\n\t\t\t\t\t\t\tcHeight = (this.config.max_month_events + 1) * hb;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tmonthRows[i].style.height = (cHeight + this.xy.month_head_height) + \"px\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\th[i] = (h[i - 1] || 0) + scheduler._get_first_visible_cell(cells).offsetHeight;\r\n\t\t\t\t}\r\n\t\t\t\th.unshift(0);\r\n\t\t\t\tconst dataArea = this.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tif (dataArea.offsetHeight < dataArea.scrollHeight && !scheduler._colsS.scroll_fix && scheduler.xy.scroll_width) {\r\n\r\n\t\t\t\t\tvar scale_settings = scheduler._colsS,\r\n\t\t\t\t\t\tsum_width = scale_settings[scale_settings.col_length],\r\n\t\t\t\t\t\trow_heights = scale_settings.heights.slice();\r\n\r\n\t\t\t\t\tsum_width -= (scheduler.xy.scroll_width || 0);\r\n\t\t\t\t\tthis._calc_scale_sizes(sum_width, this._min_date, this._max_date);\r\n\t\t\t\t\tscheduler._colsS.heights = row_heights;\r\n\r\n\t\t\t\t\tthis.set_xy(this._els[\"dhx_cal_header\"][0], sum_width/*, this.xy.scale_height*/);\r\n\t\t\t\t\tscheduler._render_scales(this._els[\"dhx_cal_header\"][0]);\r\n\t\t\t\t\tscheduler._render_month_scale(this._els[\"dhx_cal_data\"][0], this._get_timeunit_start(), this._min_date);\r\n\r\n\t\t\t\t\tscale_settings.scroll_fix = true;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (!evs.length && this._els[\"dhx_multi_day\"][0].style.visibility == \"visible\")\r\n\t\t\t\t\th[0] = -1;\r\n\t\t\t\tif (evs.length || h[0] == -1) {\r\n\t\t\t\t\t//shift days to have space for multiday events\r\n\t\t\t\t\t//var childs = evl.parentNode.childNodes;\r\n\r\n\t\t\t\t\t// +1 so multiday events would have 2px from top and 2px from bottom by default\r\n\t\t\t\t\tvar full_multi_day_height = (h[0] + 1) * hb + 4;\r\n\r\n\t\t\t\t\tvar used_multi_day_height = full_multi_day_height;\r\n\t\t\t\t\tvar used_multi_day_height_css = full_multi_day_height + \"px\";\r\n\t\t\t\t\tif (this.config.multi_day_height_limit) {\r\n\t\t\t\t\t\tused_multi_day_height = Math.min(full_multi_day_height, this.config.multi_day_height_limit) ;\r\n\t\t\t\t\t\tused_multi_day_height_css = used_multi_day_height + \"px\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tvar multi_day_section = this._els[\"dhx_multi_day\"][0];\r\n\t\t\t\t\tmulti_day_section.style.height = used_multi_day_height_css;\r\n\t\t\t\t\tmulti_day_section.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\tmulti_day_section.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\r\n\t\t\t\t\t// icon\r\n\t\t\t\t\tvar multi_day_icon = this._els[\"dhx_multi_day\"][1];\r\n\t\t\t\t\tmulti_day_icon.style.height = used_multi_day_height_css;\r\n\t\t\t\t\tmulti_day_icon.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\tmulti_day_icon.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\t\t\t\t\tmulti_day_icon.className = h[0] ? \"dhx_multi_day_icon\" : \"dhx_multi_day_icon_small\";\r\n\t\t\t\t\tthis._dy_shift = (h[0] + 1) * hb;\r\n\t\t\t\t\tif(this.config.multi_day_height_limit){\r\n\t\t\t\t\t\tthis._dy_shift = Math.min(this.config.multi_day_height_limit, this._dy_shift);\r\n\t\t\t\t\t}\r\n\t\t\t\t\th[0] = 0;\r\n\r\n\t\t\t\t\tif (used_multi_day_height != full_multi_day_height) {\r\n\r\n\t\t\t\t\t\tmulti_day_section.style.overflowY = \"auto\";\r\n\t\t\t\t\t//\tmulti_day_section.style.width = (parseInt(this._els[\"dhx_cal_navline\"][0].style.width)) + \"px\";\r\n\r\n\t\t\t\t\t\tmulti_day_icon.style.position = \"fixed\";\r\n\t\t\t\t\t\tmulti_day_icon.style.top = \"\";\r\n\t\t\t\t\t\tmulti_day_icon.style.left = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn evs;\r\n};\r\nscheduler._get_event_sday = function(ev) {\r\n\t// get day in current view\r\n\t// use rounding for 23 or 25 hour days on DST\r\n\tvar datePart = this.date.day_start(new Date(ev.start_date));\r\n\treturn Math.round((datePart.valueOf() - this._min_date.valueOf()) / (24 * 60 * 60 * 1000));\r\n};\r\nscheduler._get_event_mapped_end_date = function(ev) {\r\n\tvar end_date = ev.end_date;\r\n\tif (this.config.separate_short_events) {\r\n\t\tvar ev_duration = (ev.end_date - ev.start_date) / 60000; // minutes\r\n\t\tif (ev_duration < this._min_mapped_duration) {\r\n\t\t\tend_date = this.date.add(end_date, this._min_mapped_duration - ev_duration, \"minute\");\r\n\t\t}\r\n\t}\r\n\treturn end_date;\r\n};\r\nscheduler._pre_render_events_line = function(evs, hold){\r\n\tevs.sort(function(a, b) {\r\n\t\tif (a.start_date.valueOf() == b.start_date.valueOf())\r\n\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\treturn a.start_date > b.start_date ? 1 : -1;\r\n\t});\r\n\tvar days = []; //events by weeks\r\n\tvar evs_originals = [];\r\n\r\n\tthis._min_mapped_duration = Math.floor(this.xy.min_event_height * 60 / this.config.hour_size_px); // values could change along the way\r\n\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tvar ev = evs[i];\r\n\r\n\t\t//check date overflow\r\n\t\tvar sd = ev.start_date;\r\n\t\tvar ed = ev.end_date;\r\n\t\t//check scale overflow\r\n\t\tvar sh = sd.getHours();\r\n\t\tvar eh = ed.getHours();\r\n\t\tev._sday = this._get_event_sday(ev); // sday based on event start_date\r\n\t\tif (this._ignores[ev._sday]){\r\n\t\t\t//ignore event\r\n\t\t\tevs.splice(i,1);\r\n\t\t\ti--;\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\tif (!days[ev._sday]) days[ev._sday] = [];\r\n\r\n\t\tif (!hold) {\r\n\t\t\tev._inner = false;\r\n\r\n\t\t\tvar stack = days[ev._sday];\r\n\r\n\t\t\twhile (stack.length) {\r\n\t\t\t\tvar t_ev = stack[stack.length - 1];\r\n\t\t\t\tvar t_end_date = this._get_event_mapped_end_date(t_ev);\r\n\t\t\t\tif (t_end_date.valueOf() <= ev.start_date.valueOf()) {\r\n\t\t\t\t\tstack.splice(stack.length - 1, 1);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar slot_index = stack.length;\r\n\t\t\tvar sorderSet = false;\r\n\t\t\tfor (var j = 0; j < stack.length; j++) {\r\n\t\t\t\tvar t_ev = stack[j];\r\n\t\t\t\tvar t_end_date = this._get_event_mapped_end_date(t_ev);\r\n\t\t\t\tif (t_end_date.valueOf() <= ev.start_date.valueOf()) {\r\n\t\t\t\t\tsorderSet = true;\r\n\t\t\t\t\tev._sorder = t_ev._sorder;\r\n\t\t\t\t\tslot_index = j;\r\n\t\t\t\t\tev._inner = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (stack.length)\r\n\t\t\t\tstack[stack.length - 1]._inner = true;\r\n\r\n\t\t\tif (!sorderSet) {\r\n\t\t\t\tif (stack.length) {\r\n\t\t\t\t\tif (stack.length <= stack[stack.length - 1]._sorder) {\r\n\t\t\t\t\t\tif (!stack[stack.length - 1]._sorder)\r\n\t\t\t\t\t\t\tev._sorder = 0;\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tfor (j = 0; j < stack.length; j++) {\r\n\t\t\t\t\t\t\t\tvar _is_sorder = false;\r\n\t\t\t\t\t\t\t\tfor (var k = 0; k < stack.length; k++) {\r\n\t\t\t\t\t\t\t\t\tif (stack[k]._sorder == j) {\r\n\t\t\t\t\t\t\t\t\t\t_is_sorder = true;\r\n\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (!_is_sorder) {\r\n\t\t\t\t\t\t\t\t\tev._sorder = j;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\tev._inner = true;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tvar _max_sorder = stack[0]._sorder;\r\n\t\t\t\t\t\tfor (j = 1; j < stack.length; j++) {\r\n\t\t\t\t\t\t\tif (stack[j]._sorder > _max_sorder)\r\n\t\t\t\t\t\t\t\t_max_sorder = stack[j]._sorder;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tev._sorder = _max_sorder + 1;\r\n\t\t\t\t\t\tev._inner = false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} else\r\n\t\t\t\t\tev._sorder = 0;\r\n\t\t\t}\r\n\r\n\t\t\tstack.splice(slot_index, slot_index == stack.length ? 0 : 1, ev);\r\n\r\n\t\t\tif (stack.length > (stack.max_count || 0)) {\r\n\t\t\t\tstack.max_count = stack.length;\r\n\t\t\t\tev._count = stack.length;\r\n\t\t\t} else {\r\n\t\t\t\tev._count = (ev._count) ? ev._count : 1;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (sh < this.config.first_hour || eh >= this.config.last_hour) {\r\n\t\t\t// Need to create copy of event as we will be changing it's start/end date\r\n\t\t\t// e.g. first_hour = 11 and event.start_date hours = 9. Need to preserve that info\r\n\t\t\tevs_originals.push(ev);\r\n\t\t\tevs[i] = ev = this._copy_event(ev);\r\n\r\n\t\t\tif (sh < this.config.first_hour) {\r\n\t\t\t\tev.start_date.setHours(this.config.first_hour);\r\n\t\t\t\tev.start_date.setMinutes(0);\r\n\t\t\t}\r\n\t\t\tif (eh >= this.config.last_hour) {\r\n\t\t\t\tev.end_date.setMinutes(0);\r\n\t\t\t\tev.end_date.setHours(this.config.last_hour);\r\n\t\t\t}\r\n\r\n\t\t\tif (ev.start_date > ev.end_date || sh == this.config.last_hour) {\r\n\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (!hold) {\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tevs[i]._count = days[evs[i]._sday].max_count;\r\n\t\t}\r\n\t\tfor (var i = 0; i < evs_originals.length; i++)\r\n\t\t\tevs_originals[i]._count = days[evs_originals[i]._sday].max_count;\r\n\t}\r\n\r\n\treturn evs;\r\n};\r\nscheduler._time_order = function(evs) {\r\n\tevs.sort(function(a, b) {\r\n\t\tif (a.start_date.valueOf() == b.start_date.valueOf()) {\r\n\t\t\tif (a._timed && !b._timed) return 1;\r\n\t\t\tif (!a._timed && b._timed) return -1;\r\n\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\t}\r\n\t\treturn a.start_date > b.start_date ? 1 : -1;\r\n\t});\r\n};\r\n\r\nscheduler._is_any_multiday_cell_visible = function(from, to, event){\r\n\tvar cols = this._cols.length;\r\n\tvar isAnyCellVisible = false;\r\n\tvar checkDate = from;\r\n\tvar noCells = true;\r\n\tvar lastDayEnd = new Date(to);\r\n\tif(scheduler.date.day_start(new Date(to)).valueOf() != to.valueOf()){\r\n\t\tlastDayEnd = scheduler.date.day_start(lastDayEnd);\r\n\t\tlastDayEnd = scheduler.date.add(lastDayEnd, 1, \"day\");\r\n\t}\r\n\twhile(checkDate < lastDayEnd){\r\n\t\tnoCells = false;\r\n\t\tvar cellIndex = this.locate_holder_day(checkDate, false, event);\r\n\t\tvar weekCellIndex = cellIndex % cols;\r\n\t\tif(!this._ignores[weekCellIndex]){\r\n\t\t\tisAnyCellVisible = true;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tcheckDate = scheduler.date.add(checkDate, 1, \"day\");\r\n\t}\r\n\treturn noCells || isAnyCellVisible;\r\n};\r\n\r\nscheduler._pre_render_events_table = function(evs, hold) { // max - max height of week slot\r\n\tthis._time_order(evs);\r\n\tvar out = [];\r\n\tvar weeks = [\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[]\r\n\t]; //events by weeks\r\n\tvar max = this._colsS.heights;\r\n\tvar start_date;\r\n\tvar cols = this._cols.length;\r\n\tvar chunks_info = {};\r\n\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tvar ev = evs[i];\r\n\t\tvar id = ev.id;\r\n\t\tif (!chunks_info[id]) {\r\n\t\t\tchunks_info[id] = {\r\n\t\t\t\tfirst_chunk: true,\r\n\t\t\t\tlast_chunk: true\r\n\t\t\t};\r\n\t\t}\r\n\t\tvar chunk_info = chunks_info[id];\r\n\t\tvar sd = (start_date || ev.start_date);\r\n\t\tvar ed = ev.end_date;\r\n\t\t//trim events which are crossing through current view\r\n\t\tif (sd < this._min_date) {\r\n\t\t\tchunk_info.first_chunk = false;\r\n\t\t\tsd = this._min_date;\r\n\t\t}\r\n\t\tif (ed > this._max_date) {\r\n\t\t\tchunk_info.last_chunk = false;\r\n\t\t\ted = this._max_date;\r\n\t\t}\r\n\r\n\t\tvar locate_s = this.locate_holder_day(sd, false, ev);\r\n\t\tev._sday = locate_s % cols;\r\n\t\t//skip single day events for ignored dates\r\n\t\tif (this._ignores[ev._sday] && ev._timed) continue;\r\n\r\n\t\tvar locate_e = this.locate_holder_day(ed, true, ev) || cols;\r\n\t\tev._eday = (locate_e % cols) || cols; //cols used to fill full week, when event end on monday\r\n\t\tev._length = locate_e - locate_s;\r\n\t\t//3600000 - compensate 1 hour during winter|summer time shift\r\n\t\tev._sweek = Math.floor((this._correct_shift(sd.valueOf(), 1) - this._min_date.valueOf()) / (60 * 60 * 1000 * 24 * cols));\r\n\r\n\t\tvar isAnyCellVisible = scheduler._is_any_multiday_cell_visible(sd, ed, ev);\r\n\r\n\t\tif(!isAnyCellVisible){\r\n\t\t\tstart_date = null;\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\t//current slot\r\n\t\tvar stack = weeks[ev._sweek];\r\n\t\t//check order position\r\n\t\tvar stack_line;\r\n\r\n\t\tfor (stack_line = 0; stack_line < stack.length; stack_line++)\r\n\t\t\tif (stack[stack_line]._eday <= ev._sday)\r\n\t\t\t\tbreak;\r\n\r\n\t\tif (!ev._sorder || !hold) {\r\n\t\t\tev._sorder = stack_line;\r\n\t\t}\r\n\r\n\t\tif (ev._sday + ev._length <= cols) {\r\n\t\t\tstart_date = null;\r\n\t\t\tout.push(ev);\r\n\t\t\tstack[stack_line] = ev;\r\n\t\t\t//get max height of slot\r\n\t\t\tmax[ev._sweek] = stack.length - 1;\r\n\t\t\tev._first_chunk = chunk_info.first_chunk;\r\n\t\t\tev._last_chunk = chunk_info.last_chunk;\r\n\t\t} else { // split long event in chunks\r\n\t\t\tvar copy = this._copy_event(ev);\r\n\t\t\tcopy.id = ev.id;\r\n\t\t\tcopy._length = cols - ev._sday;\r\n\t\t\tcopy._eday = cols;\r\n\t\t\tcopy._sday = ev._sday;\r\n\t\t\tcopy._sweek = ev._sweek;\r\n\t\t\tcopy._sorder = ev._sorder;\r\n\t\t\tcopy.end_date = this.date.add(sd, copy._length, \"day\");\r\n\t\t\tcopy._first_chunk = chunk_info.first_chunk;\r\n\t\t\tif (chunk_info.first_chunk) {\r\n\t\t\t\tchunk_info.first_chunk = false;\r\n\t\t\t}\r\n\r\n\t\t\tout.push(copy);\r\n\t\t\tstack[stack_line] = copy;\r\n\t\t\tstart_date = copy.end_date;\r\n\t\t\t//get max height of slot\r\n\t\t\tmax[ev._sweek] = stack.length - 1;\r\n\t\t\ti--;\r\n\t\t\tcontinue; //repeat same step\r\n\t\t}\r\n\t}\r\n\treturn out;\r\n};\r\nscheduler._copy_dummy = function() {\r\n\tvar a = new Date(this.start_date);\r\n\tvar b = new Date(this.end_date);\r\n\tthis.start_date = a;\r\n\tthis.end_date = b;\r\n};\r\nscheduler._copy_event = function(ev) {\r\n\tthis._copy_dummy.prototype = ev;\r\n\treturn new this._copy_dummy();\r\n\t//return {start_date:ev.start_date, end_date:ev.end_date, text:ev.text, id:ev.id}\r\n};\r\nscheduler._rendered = [];\r\nscheduler.clear_view = function() {\r\n\tfor (var i = 0; i < this._rendered.length; i++) {\r\n\t\tvar obj = this._rendered[i];\r\n\t\tif (obj.parentNode) obj.parentNode.removeChild(obj);\r\n\t}\r\n\tthis._rendered = [];\r\n};\r\nscheduler.updateEvent = function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tthis.clear_event(id);\r\n\r\n\tif (ev && this.is_visible_events(ev) && this.filter_event(id, ev) && (this._table_view || this.config.multi_day || ev._timed)) {\r\n\t\tif (this.config.update_render){\r\n\t\t\tthis.render_view_data();\r\n\t\t}else{\r\n\t\t\tif(this.getState().mode == \"month\" && !this.getState().drag_id && !this.isOneDayEvent(ev)){\r\n\t\t\t\tthis.render_view_data();\r\n\t\t\t}else{\r\n\t\t\t\tthis.render_view_data([ev], true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.clear_event = function(id) {\r\n\tthis.for_rendered(id, function(node, i) {\r\n\t\tif (node.parentNode)\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\tscheduler._rendered.splice(i, 1);\r\n\t});\r\n};\r\nscheduler._y_from_date = function(date){\r\n\tvar sm = date.getHours() * 60 + date.getMinutes();\r\n\treturn ((Math.round((sm * 60 * 1000 - this.config.first_hour * 60 * 60 * 1000) * this.config.hour_size_px / (60 * 60 * 1000))) % (this.config.hour_size_px * 24)); //42px/hour\r\n};\r\nscheduler._calc_event_y = function(ev, min_height){\r\n\tmin_height = min_height || 0;\r\n\tvar sm = ev.start_date.getHours() * 60 + ev.start_date.getMinutes();\r\n\tvar em = (ev.end_date.getHours() * 60 + ev.end_date.getMinutes()) || (scheduler.config.last_hour * 60);\r\n\tvar top = this._y_from_date(ev.start_date);\r\n\r\n\tvar height = Math.max(min_height, (em - sm) * this.config.hour_size_px / 60); //42px/hour\r\n\treturn {\r\n\t\ttop: top,\r\n\t\theight: height\r\n\t};\r\n};\r\nscheduler.render_event = function(ev, buffer, parentWidth) {\r\n\tvar menu = scheduler.xy.menu_width;\r\n\tvar menu_offset = (this.config.use_select_menu_space) ? 0 : menu;\r\n\tif (ev._sday < 0) return; //can occur in case of recurring event during time shift\r\n\r\n\tvar parent = scheduler.locate_holder(ev._sday);\r\n\tif (!parent) return; //attempt to render non-visible event\r\n\r\n\tbuffer = buffer || parent;\r\n\r\n\tvar pos_y = this._calc_event_y(ev, scheduler.xy.min_event_height);\r\n\tvar top = pos_y.top,\r\n\t\theight = pos_y.height;\r\n\r\n\tvar ev_count = ev._count || 1;\r\n\tvar ev_sorder = ev._sorder || 0;\r\n\r\n\tparentWidth = parentWidth || parent.clientWidth;\r\n\tif(this.config.day_column_padding){\r\n\t\tparentWidth -= this.config.day_column_padding;\r\n\t}\r\n\r\n\tvar width = Math.floor((parentWidth - menu_offset) / ev_count);\r\n\tvar left = ev_sorder * width + (ev_sorder > 0 ? 2 : 1);\r\n\tif (!ev._inner) width = width * (ev_count - ev_sorder);\r\n\tif (this.config.cascade_event_display) {\r\n\t\tvar limit = this.config.cascade_event_count;\r\n\t\tvar margin = this.config.cascade_event_margin;\r\n\t\tleft = ev_sorder % limit * margin;\r\n\t\tvar right = (ev._inner) ? (ev_count - ev_sorder - 1) % limit * margin / 2 : 0;\r\n\t\twidth = Math.floor(parentWidth - menu_offset - left - right);\r\n\t}\r\n\r\n\tif(height < 30){\r\n\t\tev._mode = \"smallest\";\r\n\t}else if(height < 42){\r\n\t\tev._mode = \"small\";\r\n\t}else{\r\n\t\tev._mode = null;\r\n\t}\r\n\r\n\tvar d = this._render_v_bar(ev, menu_offset + left, top, width, height, ev._text_style, scheduler.templates.event_header(ev.start_date, ev.end_date, ev), scheduler.templates.event_text(ev.start_date, ev.end_date, ev));\r\n\t\r\n\tif(ev._mode === \"smallest\"){\r\n\t\td.classList.add(\"dhx_cal_event--xsmall\");\r\n\t}else if (ev._mode === \"small\"){\r\n\t\td.classList.add(\"dhx_cal_event--small\");\r\n\t}\r\n\r\n\tthis._waiAria.eventAttr(ev, d);\r\n\tthis._rendered.push(d);\r\n\tbuffer.appendChild(d);\r\n\r\n\tvar parentPosition = parseInt( this.config.rtl ? parent.style.right : parent.style.left, 10);\r\n\r\n\tleft = left + parentPosition + menu_offset;\r\n\r\n\tif (this._edit_id == ev.id) {\r\n\r\n\t\td.style.zIndex = 1; //fix overlapping issue\r\n\t\twidth = Math.max(width, scheduler.xy.editor_width);\r\n\t\td = document.createElement(\"div\");\r\n\t\td.setAttribute(\"event_id\", ev.id); // for backward compatibility\r\n\t\td.setAttribute(this.config.event_attribute, ev.id);\r\n\r\n\t\tthis._waiAria.eventAttr(ev, d);\r\n\r\n\t\td.className = \"dhx_cal_event dhx_cal_editor\";\r\n\t\tif (this.config.rtl) left++;\r\n\t\tthis.set_xy(d, width, height, left, top);\r\n\r\n\r\n\t\tif(ev.color){\r\n\t\t\td.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tvar tplClass = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\r\n\t\tif(tplClass){\r\n\t\t\td.className += \" \" + tplClass;\r\n\t\t}\r\n\t\tvar d2 = document.createElement(\"div\");\r\n\t\td2.style.cssText += \"overflow:hidden;height:100%\";\r\n\r\n\t\td.appendChild(d2);\r\n\t\tthis._els[\"dhx_cal_data\"][0].appendChild(d);\r\n\t\tthis._rendered.push(d);\r\n\r\n\t\td2.innerHTML = \"\";\r\n\t\tthis._editor = d2.querySelector(\"textarea\");\r\n\t\t\r\n\t\tscheduler.event(this._editor, \"keydown\", function(e) {\r\n\t\t\tif (e.shiftKey) return true;\r\n\t\t\tvar code = e.keyCode;\r\n\t\t\tif (code == scheduler.keys.edit_save) scheduler.editStop(true);\r\n\t\t\tif (code == scheduler.keys.edit_cancel) scheduler.editStop(false);\r\n\r\n\t\t\tif(code == scheduler.keys.edit_save || code == scheduler.keys.edit_cancel){\r\n\t\t\t\tif(e.preventDefault) e.preventDefault();\r\n\t\t\t}\r\n\t\t});\r\n\t\tscheduler.event(this._editor, \"selectstart\", function (e) {\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn true;\r\n\t\t});\r\n\t\tscheduler._focus(this._editor, true);\r\n\t\t//IE and opera can add x-scroll during focusing\r\n\t\tthis._els[\"dhx_cal_data\"][0].scrollLeft = 0;\r\n\t}\r\n\tif (this.xy.menu_width !== 0 && this._select_id == ev.id) {\r\n\r\n\t\tif (this.config.cascade_event_display && this._drag_mode)\r\n\t\t\td.style.zIndex = 1; //fix overlapping issue for cascade view in case of dnd of selected event\r\n\t\tvar icons = this.config[\"icons_\" + ((this._edit_id == ev.id) ? \"edit\" : \"select\")];\r\n\t\tvar icons_str = \"\";\r\n\r\n\t\tvar ariaAttr;\r\n\r\n\t\tfor (var i = 0; i < icons.length; i++) {\r\n\t\t\tconst currentIcon = icons[i];\r\n\t\t\tariaAttr = this._waiAria.eventMenuAttrString(currentIcon);\r\n\t\t\ticons_str += `
`;\r\n\t\t}\r\n\t\tvar obj = this._render_v_bar(ev, left - menu - 1, top, menu, null, \"\", \"
\", icons_str, true);\r\n\r\n\t\tif(ev.color){\r\n\t\t\tobj.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tobj.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\t//obj.style.left = left - menu + 1;\r\n\t\tthis._els[\"dhx_cal_data\"][0].appendChild(obj);\r\n\t\tthis._rendered.push(obj);\r\n\t}\r\n\tif(this.config.drag_highlight && this._drag_id == ev.id){\r\n\t\tthis.highlightEventPosition(ev);\r\n\t}\r\n};\r\nscheduler._render_v_bar = function (ev, x, y, w, h, style, contentA, contentB, bottom) {\r\n\tvar d = document.createElement(\"div\");\r\n\tvar id = ev.id;\r\n\tvar cs = (bottom) ? \"dhx_cal_event dhx_cal_select_menu\" : \"dhx_cal_event\";\r\n\r\n\tvar state = scheduler.getState();\r\n\tif(state.drag_id == ev.id){\r\n\t\tcs += \" dhx_cal_event_drag\";\r\n\t}\r\n\r\n\tif(state.select_id == ev.id){\r\n\t\tcs += \" dhx_cal_event_selected\";\r\n\t}\r\n\r\n\tvar cse = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\tif (cse) cs = cs + \" \" + cse;\r\n\r\n\tif(this.config.cascade_event_display) {\r\n\t\tcs += \" dhx_cal_event_cascade\";\r\n\t}\r\n\r\n\tvar boxWidth = w;\r\n\r\n\tvar html = '
';\r\n\td.innerHTML = html;\r\n\r\n\tvar container = d.cloneNode(true).firstChild;\r\n\r\n\tif (!bottom && scheduler.renderEvent(container, ev, w, h, contentA, contentB)) {\r\n\t\tif(ev.color){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\treturn container;\r\n\t} else {\r\n\t\tcontainer = d.firstChild;\r\n\t\tif(ev.color){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\tvar inner_html = '
 
';\r\n\t\tinner_html += '
' + contentA + '
';\r\n\t\tinner_html += '
' + contentB + '
'; // +2 css specific, moved from render_event\r\n\r\n\t\tvar footer_class = \"dhx_event_resize dhx_footer\";\r\n\t\tif (bottom || ev._drag_resize === false)\r\n\t\t\tfooter_class = \"dhx_resize_denied \" + footer_class;\r\n\r\n\t\tinner_html += '
';\r\n\r\n\t\tcontainer.innerHTML = inner_html;\r\n\t}\r\n\r\n\treturn container;\r\n};\r\nscheduler.renderEvent = function(){\r\n\treturn false;\r\n};\r\nscheduler.locate_holder = function(day) {\r\n\tif (this._mode == \"day\") return this._els[\"dhx_cal_data\"][0].firstChild; //dirty\r\n\treturn this._els[\"dhx_cal_data\"][0].childNodes[day];\r\n};\r\nscheduler.locate_holder_day = function(date, past) {\r\n\tvar day = Math.floor((this._correct_shift(date, 1) - this._min_date) / (60 * 60 * 24 * 1000));\r\n\t//when locating end data of event , we need to use next day if time part was defined\r\n\tif (past && this.date.time_part(date)) day++;\r\n\treturn day;\r\n};\r\n\r\n\r\n\r\nscheduler._get_dnd_order = function(order, ev_height, max_height){\r\n\tif(!this._drag_event)\r\n\t\treturn order;\r\n\tif(!this._drag_event._orig_sorder)\r\n\t\tthis._drag_event._orig_sorder = order;\r\n\telse\r\n\t\torder = this._drag_event._orig_sorder;\r\n\r\n\tvar evTop = ev_height * order;\r\n\twhile((evTop + ev_height) > max_height){\r\n\t\torder--;\r\n\t\tevTop -= ev_height;\r\n\t}\r\n\torder = Math.max(order, 0);\r\n\treturn order;\r\n};\r\n//scheduler._get_event_bar_pos = function(sday, eday, week, drag){\r\nscheduler._get_event_bar_pos = function(ev){\r\n\tvar rtl = this.config.rtl;\r\n\tvar columns = this._colsS;\r\n\tvar x = columns[ev._sday];\r\n\tvar x2 = columns[ev._eday];\r\n\tif (rtl) {\r\n\t\tx = columns[columns.col_length] - columns[ev._eday] + columns[0];\r\n\t\tx2 = columns[columns.col_length] - columns[ev._sday] + columns[0];\r\n\t}\r\n\r\n\tif (x2 == x) x2 = columns[ev._eday + 1];\r\n\tvar hb = this.xy.bar_height;\r\n\r\n\tvar order = ev._sorder;\r\n\tif(ev.id == this._drag_id){\r\n\t\tvar cellHeight = columns.heights[ev._sweek + 1] - columns.heights[ev._sweek]- this.xy.month_head_height;//22 for month head height\r\n\t\torder = scheduler._get_dnd_order(order, hb, cellHeight);\r\n\t}\r\n\tvar y_event_offset = order * hb;\r\n\tvar y = columns.heights[ev._sweek] + (columns.height ? (this.xy.month_scale_height + 2) : 2 ) + y_event_offset;\r\n\treturn {x:x, x2:x2, y:y};\r\n};\r\n\r\nscheduler.render_event_bar = function (ev) {\r\n\tvar parent = this._rendered_location;\r\n\tvar pos = this._get_event_bar_pos(ev);\r\n\tvar y = pos.y;\r\n\tvar x = pos.x;\r\n\tvar x2 = pos.x2;\r\n\t// resize for month mutliday events\r\n\tvar resize_handle = \"\";\r\n\r\n\t//events in ignored dates\r\n\r\n\tif (!x2) return;\r\n\r\n\tvar resizable = scheduler.config.resize_month_events && this._mode == \"month\" &&\r\n\t\t(!ev._timed || scheduler.config.resize_month_timed);\r\n\r\n\tvar d = document.createElement(\"div\");\r\n\tvar left_chunk = (ev.hasOwnProperty(\"_first_chunk\") && ev._first_chunk),\r\n\t\tright_chunk = (ev.hasOwnProperty(\"_last_chunk\") && ev._last_chunk);\r\n\r\n\tvar resize_left = resizable && (ev._timed || left_chunk);\r\n\tvar resize_right = resizable && (ev._timed || right_chunk);\r\n\r\n\tvar timed = true;\r\n\tvar cs = \"dhx_cal_event_clear\";\r\n\tif (!ev._timed || resizable) {\r\n\t\ttimed = false;\r\n\t\tcs = \"dhx_cal_event_line\";\r\n\t}\r\n\tif(left_chunk){\r\n\t\tcs += \" dhx_cal_event_line_start\";\r\n\t}\r\n\tif(right_chunk){\r\n\t\tcs += \" dhx_cal_event_line_end\";\r\n\t}\r\n\tif(resize_left){\r\n\t\tresize_handle += \"
\";\r\n\t}\r\n\tif(resize_right){\r\n\t\tresize_handle += \"
\";\r\n\t}\r\n\r\n\tvar cse = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\tif (cse){\r\n\t\tcs += \" \" + cse;\r\n\t}\r\n\r\n\tvar bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\tvar color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\tvar style_text = [\r\n\t\t\"position:absolute\",\r\n\t\t\"top:\" + y + \"px\",\r\n\t\t\"left:\" + x + \"px\",\r\n\t\t\"width:\" + (x2 - x - (timed ? 1 : 0)) + \"px\",\r\n\t\t\"height:\" + (this.xy.bar_height - 2) + \"px\",\r\n\t\tcolor,\r\n\t\tbg_color,\r\n\t\t(ev._text_style || \"\")\r\n\t].join(\";\");\r\n\r\n\tvar html = \"
\";\r\n\tif (resizable) {\r\n\t\thtml += resize_handle;\r\n\t}\r\n\tif(scheduler.getState().mode == \"month\"){\r\n\t\tev = scheduler.getEvent(ev.id); // ev at this point could be a part (row in a month view) of a larger event\r\n\t}\r\n\r\n\tif (ev._timed){\r\n\t\thtml += `${scheduler.templates.event_bar_date(ev.start_date, ev.end_date, ev)}`;\r\n\t}\r\n\r\n\thtml += \"
\";\r\n\thtml += scheduler.templates.event_bar_text(ev.start_date, ev.end_date, ev) + '
';\r\n\thtml += \"
\";\r\n\thtml += '
';\r\n\r\n\td.innerHTML = html;\r\n\r\n\tthis._rendered.push(d.firstChild);\r\n\tparent.appendChild(d.firstChild);\r\n};\r\n\r\nscheduler._locate_event = function(node) {\r\n\tvar id = null;\r\n\twhile (node && !id && node.getAttribute) {\r\n\t\tid = node.getAttribute(this.config.event_attribute);\r\n\t\tnode = node.parentNode;\r\n\t}\r\n\treturn id;\r\n};\r\n\r\nscheduler.edit = function(id) {\r\n\tif (this._edit_id == id) return;\r\n\tthis.editStop(false, id);\r\n\tthis._edit_id = id;\r\n\tthis.updateEvent(id);\r\n};\r\nscheduler.editStop = function(mode, id) {\r\n\tif (id && this._edit_id == id) return;\r\n\tvar ev = this.getEvent(this._edit_id);\r\n\tif (ev) {\r\n\t\tif (mode) ev.text = this._editor.value;\r\n\t\tthis._edit_id = null;\r\n\t\tthis._editor = null;\r\n\t\tthis.updateEvent(ev.id);\r\n\t\tthis._edit_stop_event(ev, mode);\r\n\t}\r\n};\r\nscheduler._edit_stop_event = function(ev, mode) {\r\n\tif (this._new_event) {\r\n\t\tif (!mode) {\r\n\t\t\tif (ev) // in case of custom lightbox user can already delete event\r\n\t\t\t\tthis.deleteEvent(ev.id, true);\r\n\t\t} else {\r\n\t\t\tthis.callEvent(\"onEventAdded\", [ev.id, ev]);\r\n\t\t}\r\n\t\tthis._new_event = null;\r\n\t} else {\r\n\t\tif (mode){\r\n\t\t\tthis.callEvent(\"onEventChanged\", [ev.id, ev]);\r\n\t\t}\r\n\t}\r\n};\r\n\r\nscheduler.getEvents = function(from, to) {\r\n\tvar result = [];\r\n\tfor (var a in this._events) {\r\n\t\tvar ev = this._events[a];\r\n\t\tif (ev && ( (!from && !to) || (ev.start_date < to && ev.end_date > from) ))\r\n\t\t\tresult.push(ev);\r\n\t}\r\n\treturn result;\r\n};\r\nscheduler.getRenderedEvent = function(id) {\r\n\tif (!id)\r\n\t\treturn;\r\n\tvar rendered_events = scheduler._rendered;\r\n\tfor (var i=0; i -1){\r\n\t\t\t\t\tsection = section.split(scheduler.config.section_delimiter)[0];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar top = timeline.getSectionTop(section);\r\n\t\t\tvar left = timeline.posFromDate(event.start_date);\r\n\t\t\tvar container = scheduler.$container.querySelector(\".dhx_timeline_data_wrapper\");\r\n\t\t\tleft = left - (container.offsetWidth - timeline.dx) / 2;\r\n\t\t\ttop = top - container.offsetHeight / 2 + timeline.dy/2;\r\n\r\n\t\t\tif (timeline._smartRenderingEnabled()) {\r\n\t\t\t\tvar handlerId = timeline.attachEvent(\"onScroll\", function(){\r\n\t\t\t\t\trestoreOriginalColors();\r\n\t\t\t\t\ttimeline.detachEvent(handlerId);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\ttimeline.scrollTo({\r\n\t\t\t\tleft: left,\r\n\t\t\t\ttop: top\r\n\t\t\t});\r\n\t\t\tif (!timeline._smartRenderingEnabled()) {\r\n\t\t\t\trestoreOriginalColors();\r\n\t\t\t}\r\n\t\t}\r\n\t}else{\r\n\t\trestoreOriginalColors();\r\n\t}\r\n\r\n\tscheduler.callEvent(\"onAfterEventDisplay\", [ev, mode]);\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._append_drag_marker = function(m){\r\n\tif(m.parentNode) return;\r\n\tvar zone = scheduler._els[\"dhx_cal_data\"][0];\r\n\r\n\tvar scale = zone.lastChild;\r\n\tvar className = scheduler._getClassName(scale);\r\n\tif(className.indexOf(\"dhx_scale_holder\") < 0 && scale.previousSibling){\r\n\t\tscale = scale.previousSibling;\r\n\t}\r\n\r\n\tclassName = scheduler._getClassName(scale);\r\n\tif (scale && className.indexOf(\"dhx_scale_holder\") === 0) {\r\n\t\tscale.appendChild(m);\r\n\t}\r\n};\r\n\r\nscheduler._update_marker_position = function(m, event){\r\n\tvar size = scheduler._calc_event_y(event, 0);\r\n\tm.style.top = size.top + \"px\";\r\n\tm.style.height = size.height + \"px\";\r\n};\r\n\r\nscheduler.highlightEventPosition = function(event){\r\n\tvar m = document.createElement(\"div\");\r\n\r\n\tm.setAttribute(\"event_id\", event.id); // for backward compatibility\r\n\tm.setAttribute(this.config.event_attribute, event.id);\r\n\tthis._rendered.push(m);\r\n\tthis._update_marker_position(m, event);\r\n\r\n\tvar css = this.templates.drag_marker_class(event.start_date, event.end_date, event);\r\n\tvar html = this.templates.drag_marker_content(event.start_date, event.end_date, event);\r\n\tm.className = \"dhx_drag_marker\";\r\n\tif(css)\r\n\t\tm.className += \" \" + css;\r\n\tif(html)\r\n\t\tm.innerHTML = html;\r\n\tthis._append_drag_marker(m);\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler._lightbox_controls = {};\r\nscheduler.formSection = function(name){\r\n\tvar config = this.config.lightbox.sections;\r\n\tvar i = 0;\r\n\tfor (i; i < config.length; i++) {\r\n\t\tif (config[i].name == name) {\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tif (i === config.length) {\r\n\t\t// GS-1662 section not found, should exit here instead of throwing an error\r\n\t\treturn null;\r\n\t}\r\n\r\n\tvar section = config[i];\r\n\tif (!scheduler._lightbox) {\r\n\t\tscheduler.getLightbox();\r\n\t}\r\n\tvar header = scheduler._lightbox.querySelector(`#${section.id}`);\r\n\tvar node = header.nextSibling;\r\n\r\n\tvar result = {\r\n\t\tsection: section,\r\n\t\theader: header,\r\n\t\tnode: node,\r\n\t\tgetValue:function(ev){\r\n\t\t\treturn scheduler.form_blocks[section.type].get_value(node, (ev||{}), section);\r\n\t\t},\r\n\t\tsetValue:function(value, ev){\r\n\t\t\treturn scheduler.form_blocks[section.type].set_value(node, value, (ev||{}), section);\r\n\t\t}\r\n\t};\r\n\r\n\tvar handler = scheduler._lightbox_controls[\"get_\"+section.type+\"_control\"];\r\n\treturn handler?handler(result):result;\r\n};\r\nscheduler._lightbox_controls.get_template_control = function(result) {\r\n\tresult.control = result.node;\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_select_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('select')[0];\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_textarea_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('textarea')[0];\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_time_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('select'); // array\r\n\treturn result;\r\n};\r\n\r\nscheduler._lightbox_controls.defaults = {\r\n\ttemplate: {\r\n\t\theight:30\r\n\t},\r\n\ttextarea: {\r\n\t\theight: 200\r\n\t},\r\n\tselect: {\r\n\t\theight: 23\r\n\t},\r\n\ttime: {\r\n\t\theight: 20\r\n\t}\r\n};\r\n\r\n\r\nscheduler.form_blocks={\r\n\ttemplate:{\r\n\t\trender: function(sns){\r\n\t\t\treturn \"
\";\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,config){\r\n\t\t\tnode.innerHTML = value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev,config){\r\n\t\t\treturn node.innerHTML||\"\";\r\n\t\t},\r\n\t\tfocus: function(node){\r\n\t\t}\r\n\t},\r\n\ttextarea:{\r\n\t\trender:function(sns){\r\n\t\t\tconst placeholder = sns.placeholder ? `placeholder='${sns.placeholder}'` : \"\";\r\n\t\t\treturn `
`;\r\n\t\t},\r\n\t\tset_value:function(node,value,ev){\r\n\t\t\tscheduler.form_blocks.textarea._get_input(node).value=value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev){\r\n\t\t\treturn scheduler.form_blocks.textarea._get_input(node).value;\r\n\t\t},\r\n\t\tfocus:function(node){\r\n\t\t\tvar a = scheduler.form_blocks.textarea._get_input(node);\r\n\t\t\tscheduler._focus(a, true);\r\n\t\t},\r\n\t\t_get_input: function(node){\r\n\t\t\treturn node.getElementsByTagName(\"textarea\")[0];\r\n\t\t}\r\n\t},\r\n\tselect:{\r\n\t\trender:function(sns){\r\n\t\t\t//var defaults = scheduler._lightbox_controls.defaults.select;\r\n\t\t\tvar html=\"
\";\r\n\t\t\treturn html;\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,sns){\r\n\t\t\tvar select = node.firstChild;\r\n\t\t\tif (!select._dhx_onchange && sns.onchange) {\r\n\t\t\t\tscheduler.event(select, \"change\", sns.onchange);\r\n\t\t\t\tselect._dhx_onchange = true;\r\n\t\t\t}\r\n\t\t\tif (typeof value == \"undefined\")\r\n\t\t\t\tvalue = (select.options[0]||{}).value;\r\n\t\t\tselect.value=value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev){\r\n\t\t\treturn node.firstChild.value;\r\n\t\t},\r\n\t\tfocus:function(node){\r\n\t\t\tvar a=node.firstChild; scheduler._focus(a, true);\r\n\t\t}\r\n\t},\r\n\ttime:{\r\n\t\trender:function(sns) {\r\n\t\t\tif (!sns.time_format) {\r\n\t\t\t\t// default order\r\n\t\t\t\tsns.time_format = [\"%H:%i\", \"%d\", \"%m\", \"%Y\"];\r\n\t\t\t}\r\n\t\t\t// map: default order => real one\r\n\t\t\tsns._time_format_order = {};\r\n\t\t\tvar time_format = sns.time_format;\r\n\r\n\t\t\tvar cfg = scheduler.config;\r\n\t\t\tvar dt = scheduler.date.date_part(scheduler._currentDate());\r\n\t\t\tvar last = 24*60, first = 0;\r\n\t\t\tif(scheduler.config.limit_time_select){\r\n\t\t\t\tlast = 60*cfg.last_hour+1;\r\n\t\t\t\tfirst = 60*cfg.first_hour;\r\n\t\t\t\tdt.setHours(cfg.first_hour);\r\n\t\t\t}\r\n\t\t\tvar html = \"\";\r\n\r\n\t\t\tfor (var p = 0; p < time_format.length; p++) {\r\n\t\t\t\tvar time_option = time_format[p];\r\n\r\n\t\t\t\t// adding spaces between selects\r\n\t\t\t\tif (p > 0) {\r\n\t\t\t\t\thtml += \" \";\r\n\t\t\t\t}\r\n\t\t\t\tvar selectBoxClass = \"\";\r\n\t\t\t\tvar options = \"\";\r\n\t\t\t\tswitch (time_option) {\r\n\t\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_year_select\";\r\n\t\t\t\t\t\tsns._time_format_order[3] = p;\r\n\t\t\t\t\t\t//year\r\n\t\t\t\t\t\tvar range;\r\n\t\t\t\t\t\tvar start_year;\r\n\t\t\t\t\t\tvar end_year;\r\n\t\t\t\t\t\tif(sns.year_range){\r\n\t\t\t\t\t\t\tif (!isNaN(sns.year_range)) {\r\n\t\t\t\t\t\t\t\trange = sns.year_range;\r\n\t\t\t\t\t\t\t} else if (sns.year_range.push) {\r\n\t\t\t\t\t\t\t\t// if\r\n\t\t\t\t\t\t\t\tstart_year = sns.year_range[0];\r\n\t\t\t\t\t\t\t\tend_year = sns.year_range[1];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\trange = range || 10;\r\n\t\t\t\t\t\tvar offset = offset || Math.floor(range / 2);\r\n\t\t\t\t\t\tstart_year = start_year || dt.getFullYear() - offset;\r\n\t\t\t\t\t\tend_year = end_year || start_year + range;\r\n\r\n\t\t\t\t\t\tfor (var i = start_year; i < end_year; i++)\r\n\t\t\t\t\t\t\toptions += \"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%m\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_month_select\";\r\n\t\t\t\t\t\tsns._time_format_order[2] = p;\r\n\t\t\t\t\t\t//month\r\n\t\t\t\t\t\tfor (var i=0; i < 12; i++)\r\n\t\t\t\t\t\t\toptions+=\"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%d\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_day_select\";\r\n\t\t\t\t\t\tsns._time_format_order[1] = p;\r\n\t\t\t\t\t\t//days\r\n\t\t\t\t\t\tfor (var i=1; i < 32; i++)\r\n\t\t\t\t\t\t\toptions+=\"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%H:%i\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_time_select\";\r\n\t\t\t\t\t\tsns._time_format_order[0] = p;\r\n\t\t\t\t\t\t//hours\r\n\t\t\t\t\t\tvar i = first;\r\n\t\t\t\t\t\tvar tdate = dt.getDate();\r\n\t\t\t\t\t\tsns._time_values = [];\r\n\r\n\t\t\t\t\t\twhile(i\"+time+\"\";\r\n\t\t\t\t\t\t\tsns._time_values.push(i);\r\n\t\t\t\t\t\t\tdt.setTime(dt.valueOf()+this.config.time_step*60*1000);\r\n\t\t\t\t\t\t\tvar diff = (dt.getDate()!=tdate)?1:0; // moved or not to the next day\r\n\t\t\t\t\t\t\ti=diff*24*60+dt.getHours()*60+dt.getMinutes();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(options){\r\n\r\n\t\t\t\t\tvar ariaAttrs = scheduler._waiAria.lightboxSelectAttrString(time_option);\r\n\t\t\t\t\tvar readonly = sns.readonly ? \"disabled='disabled'\" : \"\";\r\n\t\t\t\t\thtml += \" \";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//var defaults = scheduler._lightbox_controls.defaults.select;\r\n\r\n\t\t\treturn \"
\"+html+\"  –  \"+html+\"
\";\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,config){\r\n\t\t\tvar cfg = scheduler.config;\r\n\t\t\tvar s=node.getElementsByTagName(\"select\");\r\n\t\t\tvar map = config._time_format_order;\r\n\t\t\tvar start_date, end_date;\r\n\r\n\t\t\tif(cfg.full_day) {\r\n\t\t\t\tif (!node._full_day){\r\n\t\t\t\t\tvar html = \"\";\r\n\t\t\t\t\tif (!scheduler.config.wide_form)\r\n\t\t\t\t\t\thtml = node.previousSibling.innerHTML+html;\r\n\t\t\t\t\tnode.previousSibling.innerHTML=html;\r\n\t\t\t\t\tnode._full_day=true;\r\n\t\t\t\t}\r\n\t\t\t\tvar input=node.previousSibling.getElementsByTagName(\"input\")[0];\r\n\t\t\t\tinput.checked = (scheduler.date.time_part(ev.start_date)===0 && scheduler.date.time_part(ev.end_date)===0);\r\n\r\n\t\t\t\ts[map[0]].disabled=input.checked;\r\n\t\t\t\ts[ map[0] + s.length/2 ].disabled=input.checked;\r\n\r\n\t\t\t\tif(!input.$_eventAttached){\r\n\t\t\t\t\tinput.$_eventAttached = true;\r\n\r\n\t\t\t\t\t\tscheduler.event(input, \"click\", function(){\r\n\t\t\t\t\t\tif(input.checked) {\r\n\t\t\t\t\t\t\tvar obj = {};\r\n\t\t\t\t\t\t\tscheduler.form_blocks.time.get_value(node,obj,config);\r\n\r\n\t\t\t\t\t\t\tstart_date = scheduler.date.date_part(obj.start_date);\r\n\t\t\t\t\t\t\tend_date = scheduler.date.date_part(obj.end_date);\r\n\r\n\t\t\t\t\t\t\tif (+end_date == +start_date || (+end_date >= +start_date && (ev.end_date.getHours() !== 0 || ev.end_date.getMinutes() !== 0)))\r\n\t\t\t\t\t\t\t\tend_date = scheduler.date.add(end_date, 1, \"day\");\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tstart_date = null;\r\n\t\t\t\t\t\t\tend_date = null;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\ts[map[0]].disabled=input.checked;\r\n\t\t\t\t\t\ts[ map[0] + s.length/2 ].disabled=input.checked;\r\n\r\n\t\t\t\t\t\t_fill_lightbox_select(s,0,start_date||ev.start_date);\r\n\t\t\t\t\t\t_fill_lightbox_select(s,4,end_date||ev.end_date);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(cfg.auto_end_date && cfg.event_duration) {\r\n\t\t\t\tvar _update_lightbox_select = function () {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (!(cfg.auto_end_date && cfg.event_duration)){\r\n\t\t\t\t\t\t// setting may be disabled after the handler is attached\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstart_date = new Date(s[map[3]].value,s[map[2]].value,s[map[1]].value,0,s[map[0]].value);\r\n\t\t\t\t\tend_date = new Date(start_date.getTime() + (scheduler.config.event_duration * 60 * 1000));\r\n\t\t\t\t\t_fill_lightbox_select(s, 4, end_date);\r\n\t\t\t\t};\r\n\t\t\t\tfor(var i=0; i<4; i++) {\r\n\t\t\t\t\tif(!s[i].$_eventAttached) {\r\n\t\t\t\t\t\ts[i].$_eventAttached = true;\r\n\t\t\t\t\t\tscheduler.event(s[i], \"change\", _update_lightbox_select);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfunction _fill_lightbox_select(s,i,d) {\r\n\t\t\t\tvar time_values = config._time_values;\r\n\t\t\t\tvar direct_value = d.getHours()*60+d.getMinutes();\r\n\t\t\t\tvar fixed_value = direct_value;\r\n\t\t\t\tvar value_found = false;\r\n\t\t\t\tfor (var k=0; k\";\r\n\t\tvar ariaAttr = \"\";\r\n\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\tariaAttr = this._waiAria.lightboxButtonAttrString(buttons[i]);\r\n\t\t\thtml += \"
\" + scheduler.locale.labels[buttons[i]] + \"
\";\r\n\t\t}\r\n\r\n\t\tbuttons = this.config.buttons_right;\r\n\t\tvar rtl = scheduler.config.rtl;\r\n\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\tariaAttr = this._waiAria.lightboxButtonAttrString(buttons[i]);\r\n\r\n\t\t\thtml += \"
\";\r\n\r\n\t\t\thtml += \"
\" + scheduler.locale.labels[buttons[i]] + \"
\";\r\n\t\t}\r\n\t\thtml += \"
\";\r\n\t\thtml+=\"
\";\r\n\t\td.innerHTML=html;\r\n\t\tif (scheduler.config.drag_lightbox){\r\n\t\t\tscheduler.event(d.firstChild, \"mousedown\", scheduler._ready_to_dnd);\r\n\t\t\tscheduler.event(d.firstChild, \"selectstart\", function(e){ \r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn false; \r\n\t\t\t});\r\n\t\t\td.firstChild.style.cursor = \"move\";\r\n\t\t\tscheduler._init_dnd_events();\r\n\r\n\t\t}\r\n\r\n\t\tthis._waiAria.lightboxAttr(d);\r\n\r\n\t\tthis.show_cover();\r\n\t\tthis._cover.insertBefore(d,this._cover.firstChild);\r\n\t\t\r\n\t\tthis._lightbox=d;\r\n\r\n\t\tvar sns=this.config.lightbox.sections;\r\n\t\thtml=\"\";\r\n\t\tfor (var i=0; i < sns.length; i++) {\r\n\t\t\tvar block=this.form_blocks[sns[i].type];\r\n\t\t\tif (!block) continue; //ignore incorrect blocks\r\n\t\t\tsns[i].id=\"area_\"+this.uid();\r\n\t\t\tvar button = \"\";\r\n\t\t\tif (sns[i].button){\r\n\t\t\t\tvar ariaAttr = scheduler._waiAria.lightboxSectionButtonAttrString(this.locale.labels[\"button_\"+sns[i].button]);\r\n\t\t\t\tbutton = \"
\"+this.locale.labels[\"button_\"+sns[i].button]+\"
\";\r\n\t\t\t}\r\n\r\n\t\t\tif (this.config.wide_form){\r\n\t\t\t\thtml+=\"
\";\r\n\t\t\t}\r\n\r\n\t\t\tvar label_name = this.locale.labels[\"section_\"+sns[i].name];\r\n\t\t\tif(typeof label_name !== \"string\"){\r\n\t\t\t\tlabel_name = sns[i].name;\r\n\t\t\t}\r\n\t\t\thtml+=\"
\"+button+ \"
\"+block.render.call(this,sns[i]);\r\n\t\t\thtml+=\"
\";\r\n\t\t}\r\n\r\n\t\tvar ds=d.getElementsByTagName(\"div\");\r\n\t\tfor (var i=0; i
 \r\n
\r\n
\r\n\r\n
`;\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler.getRootView = function() {\r\n\treturn {\r\n\t\tview: {\r\n\t\t\trender: function(){\r\n\t\t\t\treturn {\r\n\t\t\t\t\ttag: \"div\",\r\n\t\t\t\t\ttype: 1,\r\n\t\t\t\t\tattrs: {\r\n\t\t\t\t\t\tstyle: \"width:100%;height:100%;\"\r\n\t\t\t\t\t},\r\n\t\t\t\t\thooks: {\r\n\t\t\t\t\t\t\"didInsert\": function(){\r\n\t\t\t\t\t\t\tscheduler.setCurrentView();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tbody: [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tel: this.el,\r\n\t\t\t\t\t\t\ttype: 1\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t};\r\n\t\t\t},\r\n\t\t\tinit: function(){\r\n\t\t\t\tvar container = document.createElement(\"DIV\");\r\n\t\t\t\tcontainer.id = \"scheduler_\"+ scheduler.uid();\r\n\t\t\t\tcontainer.style.width = \"100%\";\r\n\t\t\t\tcontainer.style.height = \"100%\";\r\n\t\t\t\tcontainer.classList.add(\"dhx_cal_container\");\r\n\t\t\t\tcontainer.cmp = \"grid\";\r\n\t\t\t\tcontainer.innerHTML = '
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
';\r\n\t\t\t\tscheduler.init(container);\r\n\r\n\t\t\t\tthis.el = container;\r\n\t\t\t}\r\n\t\t},\r\n\t\ttype: 4\r\n\t};\r\n};\r\n\r\n}","import global from \"../global\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\n(function(){\r\n\r\n\tvar setCurrentView = scheduler.setCurrentView,\r\n\t\tupdateView = scheduler.updateView;\r\n\tvar update_view_timer = null,\r\n\t\tcurr_view_timer = null;\r\n\r\n\tvar lazy_setCurrentView = function(date, mode){\r\n\t\tvar self = this;\r\n\t\tglobal.clearTimeout(curr_view_timer);\r\n\t\tglobal.clearTimeout(update_view_timer);\r\n\r\n\t\tvar oldDate = self._date,\r\n\t\t\toldMode = self._mode;\r\n\t\tupdateFlags(this, date, mode);\r\n\r\n\t\tcurr_view_timer = setTimeout(function(){\r\n\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif (!self.callEvent(\"onBeforeViewChange\", [oldMode, oldDate, mode || self._mode, date || self._date])){\r\n\t\t\t\tupdateFlags(self, oldDate, oldMode);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tupdateView.call(self, date, mode);\r\n\t\t\tself.callEvent(\"onViewChange\", [self._mode, self._date]);\r\n\r\n\t\t\tglobal.clearTimeout(update_view_timer);\r\n\t\t\tcurr_view_timer = 0;\r\n\t\t}, scheduler.config.delay_render);\r\n\t};\r\n\tvar lazy_updateView = function(date, mode){\r\n\t\tvar self = this,\r\n\t\t\tars = arguments;\r\n\r\n\t\tupdateFlags(this, date, mode);\r\n\r\n\t\tglobal.clearTimeout(update_view_timer);\r\n\t\tupdate_view_timer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif(curr_view_timer)\r\n\t\t\t\treturn;\r\n\r\n\t\t\tupdateView.apply(self, ars);\r\n\t\t}, scheduler.config.delay_render);\r\n\t};\r\n\tfunction updateFlags(scheduler, date, mode){\r\n\t\tif(date)\r\n\t\t\tscheduler._date = date;\r\n\t\tif(mode)\r\n\t\t\tscheduler._mode = mode;\r\n\r\n\t}\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\tif(scheduler.config.delay_render){\r\n\t\t\tscheduler.setCurrentView = lazy_setCurrentView;\r\n\t\t\tscheduler.updateView = lazy_updateView;\r\n\t\t}else{\r\n\t\t\tscheduler.setCurrentView = setCurrentView;\r\n\t\t\tscheduler.updateView = updateView;\r\n\t\t}\r\n\t});\r\n\r\n})();\r\n\r\n}","import global from \"../global\";\r\n\r\nexport default function extend(scheduler) {\r\n/*\r\nif (global.dataProcessor && !dataProcessor.prototype.init_original){\r\n\tdataProcessor.prototype.init_original=dataProcessor.prototype.init;\r\n\tdataProcessor.prototype.init=function(obj){\r\n\t\tthis.init_original(obj);\r\n\t\tobj._dataprocessor=this;\r\n\r\n\t\tthis.setTransactionMode(\"POST\",true);\r\n\t\tthis.serverProcessor+=(this.serverProcessor.indexOf(\"?\")!=-1?\"&\":\"?\")+\"editing=true\";\r\n\t};\r\n}*/\r\n\r\nscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\tif(typeof dhtmlxError !== \"undefined\") {\r\n\t\twindow.dhtmlxError.catchError(\"LoadXML\", function(a, b, c){\r\n\t\t\tvar message = c[0].responseText;\r\n\r\n\t\t\tswitch (scheduler.config.ajax_error){\r\n\t\t\t\tcase \"alert\":\r\n\t\t\t\t\tglobal.alert(message);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"console\":\r\n\t\t\t\t\tglobal.console.log(message);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n});\r\n\r\n\r\n}","import ar from \"./locale_ar\";\r\nimport be from \"./locale_be\";\r\nimport ca from \"./locale_ca\";\r\nimport cn from \"./locale_cn\";\r\nimport cs from \"./locale_cs\";\r\nimport da from \"./locale_da\";\r\nimport de from \"./locale_de\";\r\nimport el from \"./locale_el\";\r\nimport en from \"./locale_en\";\r\nimport es from \"./locale_es\";\r\nimport fi from \"./locale_fi\";\r\nimport fr from \"./locale_fr\";\r\nimport he from \"./locale_he\";\r\nimport hu from \"./locale_hu\";\r\nimport id from \"./locale_id\";\r\nimport it from \"./locale_it\";\r\nimport jp from \"./locale_jp\";\r\n\r\nimport LocaleManager from \"./locale_manager\";\r\n\r\nimport nb from \"./locale_nb\";\r\nimport nl from \"./locale_nl\";\r\nimport no from \"./locale_no\";\r\nimport pl from \"./locale_pl\";\r\nimport pt from \"./locale_pt\";\r\nimport ro from \"./locale_ro\";\r\nimport ru from \"./locale_ru\";\r\nimport si from \"./locale_si\";\r\nimport sk from \"./locale_sk\";\r\nimport sv from \"./locale_sv\";\r\nimport tr from \"./locale_tr\";\r\nimport ua from \"./locale_ua\";\r\n\r\nexport default function(){\r\n\treturn new LocaleManager({\r\n\t\ten,\r\n\t\tar,\r\n\t\tbe,\r\n\t\tca,\r\n\t\tcn,\r\n\t\tcs,\r\n\t\tda,\r\n\t\tde,\r\n\t\tel,\r\n\t\tes,\r\n\t\tfi,\r\n\t\tfr,\r\n\t\the,\r\n\t\thu,\r\n\t\tid,\r\n\t\tit,\r\n\t\tjp,\r\n\t\tnb,\r\n\t\tnl,\r\n\t\tno,\r\n\t\tpl,\r\n\t\tpt,\r\n\t\tro,\r\n\t\tru,\r\n\t\tsi,\r\n\t\tsk,\r\n\t\tsv,\r\n\t\ttr,\r\n\t\tua\r\n\t});\r\n}","export default class ExtensionsManager{\r\n\tconstructor(config){\r\n\t\tthis._extensions = {};\r\n\t\tfor(const i in config){\r\n\t\t\tthis._extensions[i] = config[i];\r\n\t\t}\r\n\t}\r\n\r\n\taddExtension(name, ext) {\r\n\t\tthis._extensions[name] = ext;\r\n\t}\r\n\r\n\tgetExtension(name) {\r\n\t\treturn this._extensions[name];\r\n\t}\r\n}","\r\nexport default function(){\r\n/* global dhtmlx */\r\nif (typeof dhtmlx != \"undefined\" && dhtmlx.attaches) {\r\n\tdhtmlx.attaches.attachScheduler = function (day, mode, tabs, scheduler) {\r\n\t\tvar tabs = tabs || '
';\r\n\t\tvar obj = document.createElement(\"DIV\");\r\n\t\tobj.id = \"dhxSchedObj_\" + this._genStr(12);\r\n\t\tobj.innerHTML = '
' + tabs + '
';\r\n\t\tdocument.body.appendChild(obj.firstChild);\r\n\r\n\t\tthis.attachObject(obj.id, false, true);\r\n\r\n\t\tthis.vs[this.av].sched = scheduler;\r\n\t\tthis.vs[this.av].schedId = obj.id;\r\n\t\tscheduler.setSizes = scheduler.updateView;\r\n\t\tscheduler.destructor = function () { };\r\n\t\tscheduler.init(obj.id, day, mode);\r\n\r\n\t\treturn this.vs[this._viewRestore()].sched;\r\n\t};\r\n}\r\n\r\n}","export default {\r\n\talert: (extension, assert) => {\r\n\t\tassert(false, `The ${extension} extension is not included in this version of dhtmlxScheduler.
\r\n\t\tYou may need a Professional version of the component.
\r\n\t\tContact us at https://dhtmlx.com/docs/contact.shtml if you have any questions.`);\r\n\t}\r\n};","export default function(scheduler){\r\n\r\n\r\n\r\n(function(){\r\n\tvar modalsStack = [];\r\n\r\n\tfunction isModal(){\r\n\t\treturn !!(modalsStack.length);\r\n\t}\r\n\r\n\tfunction isChildOf(child, parent){\r\n\t\twhile(child && child != parent){\r\n\t\t\tchild = child.parentNode;\r\n\t\t}\r\n\r\n\t\treturn !!(child == parent);\r\n\t}\r\n\r\n\tfunction afterPopup(box){\r\n\t\tsetTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tif(!isModal() && !(isChildOf(document.activeElement, scheduler.$container))) {\r\n\t\t\t\tscheduler.focus();\r\n\t\t\t}\r\n\t\t}, 1);\r\n\t}\r\n\tfunction startModal(box){\r\n\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\tscheduler.event(box, \"keydown\", trapFocus);\r\n\t\tmodalsStack.push(box);\r\n\t\t//scheduler.$keyboardNavigation.dispatcher.disable();\r\n\t}\r\n\r\n\tfunction endModal(){\r\n\t\tvar box = modalsStack.pop();\r\n\t\tif(box) {\r\n\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t}\r\n\t\tafterPopup(box);\r\n\r\n\t}\r\n\r\n\tfunction isTopModal(box){\r\n\t//\tif(dhtmlx._modalsStack.length){\r\n\t//\t\treturn box == dhtmlx._modalsStack[dhtmlx._modalsStack.length - 1];\r\n\t//\t}else{\r\n\t\t\treturn box == modalsStack[modalsStack.length - 1];\r\n\t//\t}\r\n\r\n\t}\r\n\r\n\tfunction trapFocus(event){\r\n\t\tvar event = event || window.event;\r\n\t\tvar target = event.currentTarget;\r\n\t\tif(!isTopModal(target)) return;\r\n\r\n\t\tscheduler.$keyboardNavigation.trapFocus(target, event);\r\n\t}\r\n\r\n\tfunction traceLightbox(){\r\n\t\tstartModal(scheduler.getLightbox());\r\n\t}\r\n\r\n\tscheduler.attachEvent(\"onLightbox\", traceLightbox);\r\n\tscheduler.attachEvent(\"onAfterLightbox\", endModal);\r\n\r\n\tscheduler.attachEvent(\"onAfterQuickInfo\", function(){afterPopup();});\r\n\r\n\tif(!scheduler._keyNavMessagePopup) {\r\n\t\tscheduler._keyNavMessagePopup = true;\r\n\r\n\t\tvar focusElement = null;\r\n\t\tvar backupFocus = null;\r\n\t\tconst modalsStack = [];\r\n\t\tscheduler.attachEvent(\"onMessagePopup\", function(box){\r\n\t\t\tfocusElement = document.activeElement;\r\n\t\t\tbackupFocus = focusElement;\r\n\r\n\t\t\twhile(backupFocus && scheduler._getClassName(backupFocus).indexOf(\"dhx_cal_data\") < 0){\r\n\t\t\t\tbackupFocus = backupFocus.parentNode;\r\n\t\t\t}\r\n\t\t\tif(backupFocus){\r\n\t\t\t\tbackupFocus = backupFocus.parentNode;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t\tscheduler.event(box, \"keydown\", trapFocus);\r\n\t\t\tmodalsStack.push(box);\r\n\t\t});\r\n\r\n\r\n\t\tscheduler.attachEvent(\"onAfterMessagePopup\", function () {\r\n\t\t\tvar box = modalsStack.pop();\r\n\t\t\tif(box) {\r\n\t\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t\t}\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\tvar currentTarget = document.activeElement;\r\n\t\t\t\twhile(currentTarget && scheduler._getClassName(currentTarget).indexOf(\"dhx_cal_light\") < 0){\r\n\t\t\t\t\tcurrentTarget = currentTarget.parentNode;\r\n\t\t\t\t}\r\n\t\t\t\tif(currentTarget)\r\n\t\t\t\t\treturn;\r\n\r\n\r\n\t\t\t\tif(focusElement && focusElement.parentNode){\r\n\t\t\t\t\tfocusElement.focus();\r\n\r\n\t\t\t\t}else if(backupFocus && backupFocus.parentNode){\r\n\t\t\t\t\tbackupFocus.focus();\r\n\t\t\t\t}\r\n\t\t\t\tfocusElement = null;\r\n\t\t\t\tbackupFocus = null;\r\n\r\n\t\t\t}, 1);\r\n\t\t});\r\n\t}\r\n\r\n\tscheduler.$keyboardNavigation.isModal = isModal;\r\n\r\n\r\n})();\r\n\r\n}","export default function(scheduler){\r\n\r\n//Initial idea and implementation by Steve MC\r\nscheduler._temp_key_scope = function (){\r\n\r\n\tscheduler.config.key_nav = true;\r\n\r\n\tscheduler.$keyboardNavigation._pasteDate = null; // used for copy and paste operations\r\n\tscheduler.$keyboardNavigation._pasteSection = null; // used for copy and paste operations\r\n\tvar isCopy = null;\r\n\r\n\tvar pos = {};\r\n\r\n\tif(!document.body){\r\n\t\tscheduler.event(window, \"load\", function(){\r\n\t\t\tscheduler.event(document.body, \"mousemove\", trackMousePosition);\r\n\t\t});\r\n\t}else{\r\n\t\tscheduler.event(document.body, \"mousemove\", trackMousePosition);\r\n\t}\r\n\r\n\tfunction trackMousePosition(event){\r\n\t\tevent = event || window.event;\r\n\t\tpos.x = event.clientX;\r\n\t\tpos.y = event.clientY;\r\n\t}\r\n\tfunction currentTarget(){\r\n\r\n\t\tvar mousePointer = false;\r\n\t\tvar keyNavPointer = false;\r\n\r\n\t\tvar target = document.elementFromPoint(pos.x, pos.y);\r\n\t\twhile(target && target != scheduler._obj){\r\n\t\t\ttarget = target.parentNode;\r\n\t\t}\r\n\t\tmousePointer = !!(target == scheduler._obj);\r\n\r\n\t\tkeyNavPointer = scheduler.$keyboardNavigation.dispatcher.isEnabled();\r\n\r\n\t\treturn mousePointer || keyNavPointer;\r\n\t}\r\n\r\n\tscheduler.attachEvent(\"onMouseMove\", function(id,e){\r\n\t\tvar state = scheduler.getState();\r\n\r\n\t\t// make sure scheduler is fully initialized before calling scheduler.getActionData\r\n\t\tif(!(state.mode && state.min_date)){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tvar position = scheduler.getActionData(e);\r\n\t\tscheduler.$keyboardNavigation._pasteDate = position.date;\r\n\t\tscheduler.$keyboardNavigation._pasteSection = position.section;\r\n\t});\r\n\r\n\tfunction clear_event_after(ev){\r\n\t\tdelete ev.rec_type; delete ev.rec_pattern;\r\n\t\tdelete ev.event_pid; delete ev.event_length;\r\n\t}\r\n\r\n\tfunction copyEvent(ev){\r\n\t\treturn scheduler._lame_copy({}, ev);\r\n\t}\r\n\r\n\tscheduler._make_pasted_event = function(ev){\r\n\t\tvar date = scheduler.$keyboardNavigation._pasteDate;\r\n\t\tvar section = scheduler.$keyboardNavigation._pasteSection;\r\n\r\n\t\tvar event_duration = ev.end_date-ev.start_date;\r\n\r\n\t\tvar copy = copyEvent(ev);\r\n\t\tclear_event_after(copy);\r\n\t\tcopy.start_date = new Date(date);\r\n\t\tcopy.end_date = new Date(copy.start_date.valueOf() + event_duration);\r\n\r\n\t\tif(section){\r\n\t\t\tvar property = scheduler._get_section_property();\r\n\r\n\t\t\tif(scheduler.config.multisection)\r\n\t\t\t\tcopy[property] = ev[property]; // save initial set of resources for multisection view\r\n\t\t\telse\r\n\t\t\t\tcopy[property] = section;\r\n\t\t}\r\n\t\treturn copy;\r\n\t};\r\n\tscheduler._do_paste = function(is_copy, modified_ev, original_ev){\r\n\t\tif(scheduler.callEvent(\"onBeforeEventPasted\", [is_copy, modified_ev, original_ev]) === false){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tscheduler.addEvent(modified_ev);\r\n\t\tscheduler.callEvent(\"onEventPasted\", [is_copy, modified_ev, original_ev]);\r\n\t};\r\n\r\n\tscheduler._is_key_nav_active = function(){\r\n\t\tif(this._is_initialized() && !this._is_lightbox_open() && this.config.key_nav){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\r\n\tfunction getSelectedEvent(){\r\n\t\tvar node = scheduler.$keyboardNavigation.dispatcher.getActiveNode();\r\n\t\tif(node && node.eventId) return node.eventId;\r\n\t\treturn scheduler._select_id;\r\n\t}\r\n\r\n\tscheduler.event(document, \"keydown\", function(e){\r\n\t\t// compatibility fix - scheduler focus on ctrl+v on mouse hover\r\n\t\tif(((e.ctrlKey || e.metaKey) && e.keyCode == 86) && scheduler._buffer_event && !scheduler.$keyboardNavigation.dispatcher.isEnabled()) {\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.isActive = currentTarget();\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler._key_nav_copy_paste = function(e){\r\n\t\tif(!scheduler._is_key_nav_active()) return true;\r\n\r\n\t\tif (e.keyCode == 37 || e.keyCode == 39) { // Left, Right arrows\r\n\t\t\te.cancelBubble = true;\r\n\r\n\t\t\tvar next = scheduler.date.add(scheduler._date,(e.keyCode == 37 ? -1 : 1 ),scheduler._mode);\r\n\t\t\tscheduler.setCurrentView(next);\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tvar select_id = getSelectedEvent();\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 67) { // CTRL+C\r\n\t\t\tif (select_id) {\r\n\t\t\t\tscheduler._buffer_event = copyEvent(scheduler.getEvent(select_id));\r\n\t\t\t\tisCopy = true;\r\n\t\t\t\tscheduler.callEvent(\"onEventCopied\", [scheduler.getEvent(select_id)]);\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 88) { // CTRL+X\r\n\t\t\tif (select_id) {\r\n\t\t\t\tisCopy = false;\r\n\t\t\t\tvar ev = scheduler._buffer_event = copyEvent(scheduler.getEvent(select_id));\r\n\r\n\t\t\t\tscheduler.updateEvent(ev.id);\r\n\t\t\t\tscheduler.callEvent(\"onEventCut\", [ev]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 86 && currentTarget(e)) { // CTRL+V\r\n\t\t\tvar ev = scheduler._buffer_event ? scheduler.getEvent(scheduler._buffer_event.id) : scheduler._buffer_event;\r\n\t\t\tev = ev || scheduler._buffer_event;\r\n\r\n\t\t\tif (ev) {\r\n\t\t\t\tvar new_ev = scheduler._make_pasted_event(ev);\r\n\t\t\t\tif (isCopy) {\r\n\t\t\t\t\tnew_ev.id = scheduler.uid();\r\n\t\t\t\t\tscheduler._do_paste(isCopy, new_ev, ev);\r\n\t\t\t\t}\r\n\t\t\t\telse { // cut operation\r\n\t\t\t\t\tvar res = scheduler.callEvent(\"onBeforeEventChanged\",[new_ev, e, false, ev]);\r\n\t\t\t\t\tif (res) {\r\n\t\t\t\t\t\tscheduler._do_paste(isCopy, new_ev, ev);\r\n\t\t\t\t\t\tisCopy = true; // switch to copy after first paste operation\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t};\r\n};\r\nscheduler._temp_key_scope();\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.attachSchedulerHandlers = function(){\r\n\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\tvar keyDownHandler = function(e){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\r\n\t\treturn dispatcher.keyDownHandler(e);\r\n\t};\r\n\r\n\tvar focusHandler = function () {\r\n\t\tdispatcher.keepScrollPosition(function () {\r\n\t\t\tdispatcher.focusGlobalNode();\r\n\t\t});\r\n\t};\r\n\r\n\tvar waitCall;\r\n\tscheduler.attachEvent(\"onDataRender\", function(){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\t\tif(!(dispatcher.isEnabled() && !scheduler.getState().editor_id)) return;\r\n\r\n\t\tclearTimeout(waitCall);\r\n\t\twaitCall = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tif(!dispatcher.isEnabled())\r\n\t\t\t\tdispatcher.enable();\r\n\t\t\treFocusActiveNode();\r\n\t\t});\r\n\t});\r\n\r\n\tvar reFocusActiveNode = function(){\r\n\t\tif(!dispatcher.isEnabled())\r\n\t\t\treturn;\r\n\r\n\t\tvar activeNode = dispatcher.getActiveNode();\r\n\t\tif(!activeNode)\r\n\t\t\treturn;\r\n\r\n\t\tif(!activeNode.isValid()){\r\n\t\t\tactiveNode = activeNode.fallback();\r\n\t\t}\r\n\r\n\t\tif(!activeNode || activeNode instanceof scheduler.$keyboardNavigation.MinicalButton || activeNode instanceof scheduler.$keyboardNavigation.MinicalCell)\r\n\t\t\treturn;\r\n\r\n\t\tdispatcher.keepScrollPosition(function () {\r\n\t\t\tactiveNode.focus(true);\r\n\t\t});\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\tvar container = scheduler.$container;\r\n\t\tscheduler.eventRemove(document, \"keydown\", keyDownHandler);\r\n\t\tscheduler.eventRemove(container, \"mousedown\", mousedownHandler);\r\n\t\tscheduler.eventRemove(container, \"focus\", focusHandler);\r\n\r\n\r\n\t\tif(scheduler.config.key_nav){\r\n\r\n\t\t\tscheduler.event(document, \"keydown\", keyDownHandler);\r\n\t\t\tscheduler.event(container, \"mousedown\", mousedownHandler);\r\n\t\t\tscheduler.event(container, \"focus\", focusHandler);\r\n\r\n\t\t\tcontainer.setAttribute(\"tabindex\", \"0\");\r\n\r\n\t\t}else{\r\n\t\t\tcontainer.removeAttribute(\"tabindex\");\r\n\t\t}\r\n\t});\r\n\r\n\tfunction mousedownHandler(e){\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\r\n\t\tconst view = scheduler.getView();\r\n\t\tlet dataAreaClick = false;\r\n\t\tif (scheduler.getState().mode === \"month\") {\r\n\t\t\tdataAreaClick = scheduler.$keyboardNavigation.isChildOf(e.target || e.srcElement, scheduler.$container.querySelector(\".dhx_cal_month_table\"));\r\n\t\t} else if (view && view.layout === \"timeline\") {\r\n\t\t\tdataAreaClick = scheduler.$keyboardNavigation.isChildOf(e.target || e.srcElement, scheduler.$container.querySelector(\".dhx_timeline_data_col\"));\r\n\t\t} else {\r\n\t\t\tconst listOfScales = scheduler.$container.querySelectorAll(\".dhx_scale_holder\");\r\n\t\t\tconst arrOfScales = Array.from(listOfScales);\r\n\t\t\tdataAreaClick = arrOfScales.some(scale => scale === e.target.parentNode);\r\n\t\t}\r\n\r\n\t\tvar pos = scheduler.getActionData(e);\r\n\r\n\t\tvar focusNode;\r\n\t\tif(scheduler._locate_event(e.target || e.srcElement)){\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.Event(scheduler._locate_event(e.target || e.srcElement));\r\n\t\t}else if(dataAreaClick){\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(pos.date && dataAreaClick){\r\n\t\t\t\tfocusNode = focusNode.nextSlot(new scheduler.$keyboardNavigation.TimeSlot(pos.date, null, pos.section));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(focusNode) {\r\n\t\t\tif (!dispatcher.isEnabled()) {\r\n\t\t\t\tdispatcher.activeNode = focusNode;\r\n\r\n\t\t\t} else {\r\n\t\t\t\tif (pos.date && dataAreaClick) {\r\n\t\t\t\t\tdispatcher.delay(function () {\r\n\t\t\t\t\t\tdispatcher.setActiveNode(focusNode);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction focusEvent(evNode){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\t\tif(!dispatcher.isEnabled()) return;\r\n\r\n\r\n\t\tvar prevState = evNode;\r\n\t\tvar focusNode = new scheduler.$keyboardNavigation.Event(prevState.eventId);\r\n\t\tif(!focusNode.isValid()){\r\n\t\t\tvar lastStart = focusNode.start || prevState.start;\r\n\t\t\tvar lastEnd = focusNode.end || prevState.end;\r\n\t\t\tvar lastSection = focusNode.section || prevState.section;\r\n\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot(lastStart, lastEnd, lastSection);\r\n\t\t\tif(!focusNode.isValid()){\r\n\t\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdispatcher.setActiveNode(focusNode);\r\n\t\tvar node = dispatcher.getActiveNode();\r\n\t\tif(node && node.getNode && document.activeElement != node.getNode()){\r\n\t\t\tdispatcher.focusNode(dispatcher.getActiveNode());\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tvar updateEvent = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id){\r\n\t\tvar res = updateEvent.apply(this, arguments);\r\n\t\tif(scheduler.config.key_nav && dispatcher.isEnabled()){\r\n\t\t\tif(scheduler.getState().select_id == id){\r\n\t\t\t\tvar element = new scheduler.$keyboardNavigation.Event(id);\r\n\r\n\t\t\t\tif(!scheduler.getState().lightbox_id){\r\n\t\t\t\t\tfocusEvent(element);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn res;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onEventDeleted\", function(id) {\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\t\tif(dispatcher.isEnabled()){\r\n\t\t\tvar activeNode = dispatcher.getActiveNode();\r\n\t\t\tif(activeNode.eventId == id){\r\n\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onClearAll\", function(){\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\t\tif(dispatcher.isEnabled()){\r\n\t\t\tif(dispatcher.getActiveNode() instanceof scheduler.$keyboardNavigation.Event){\r\n\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n};\r\n\r\n}","interface IViewPosition{\r\n\ttop: number;\r\n\tleft: number;\r\n}\r\n\r\ninterface IViewBox extends IViewPosition{\r\n\twidth: number;\r\n\theight: number;\r\n\tbottom: number;\r\n\tright: number;\r\n}\r\n\r\nexport class Tooltip {\r\n\tprivate _root: HTMLElement;\r\n\tprivate _tooltipNode: HTMLElement | null;\r\n\tprivate _scheduler: any;\r\n\r\n\tconstructor(scheduler: any){\r\n\t\tthis._scheduler = scheduler;\r\n\t}\r\n\r\n\tgetNode() : HTMLElement {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tif (!this._tooltipNode){\r\n\t\t\tthis._tooltipNode = document.createElement(\"div\");\r\n\t\t\tthis._tooltipNode.className = \"dhtmlXTooltip scheduler_tooltip tooltip\";\r\n\r\n\t\t\tscheduler._waiAria.tooltipAttr(this._tooltipNode);\r\n\t\t}\r\n\t\tif(scheduler.config.rtl){\r\n\t\t\tthis._tooltipNode.classList.add(\"dhtmlXTooltip_rtl\");\r\n\t\t} else{\r\n\t\t\tthis._tooltipNode.classList.remove(\"dhtmlXTooltip_rtl\");\r\n\t\t}\r\n\t\treturn this._tooltipNode;\r\n\t}\r\n\r\n\tsetViewport(node: HTMLElement):Tooltip{\r\n\t\tthis._root = node;\r\n\t\treturn this;\r\n\t}\r\n\r\n\tshow(left: number, top: number): Tooltip;\r\n\tshow(event: MouseEvent): Tooltip;\r\n\tshow(left: number | MouseEvent, top?: number): Tooltip {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tconst container = document.body;\r\n\t\tconst node = this.getNode();\r\n\r\n\t\tif(!domHelpers.isChildOf(node, container)){\r\n\t\t\tthis.hide();\r\n\t\t\tcontainer.appendChild(node);\r\n\t\t}\r\n\r\n\t\tif (this._isLikeMouseEvent(left)) {\r\n\t\t\tconst position = this._calculateTooltipPosition(left as MouseEvent);\r\n\t\t\ttop = position.top;\r\n\t\t\tleft = position.left;\r\n\t\t}\r\n\r\n\t\tnode.style.top = top + \"px\";\r\n\t\tnode.style.left = left + \"px\";\r\n\r\n\t\tscheduler._waiAria.tooltipVisibleAttr(node);\r\n\t\treturn this;\r\n\t}\r\n\thide() : Tooltip{\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst node = this.getNode();\r\n\t\tif(node && node.parentNode){\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t}\r\n\t\tscheduler._waiAria.tooltipHiddenAttr(node);\r\n\t\treturn this;\r\n\t}\r\n\r\n\tsetContent(html: string) : Tooltip{\r\n\t\tconst node = this.getNode();\r\n\t\tnode.innerHTML = html;\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// it is for salesforce, because it proxies event to it own events\r\n\tprivate _isLikeMouseEvent(event: any): boolean {\r\n\t\tif (!event || typeof event !== \"object\") {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn \"clientX\" in event && \"clientY\" in event;\r\n\t}\r\n\r\n\tprivate _getViewPort() : HTMLElement {\r\n\t\treturn this._root || document.body;\r\n\t}\r\n\r\n\r\n\tprivate _calculateTooltipPosition(event: MouseEvent): IViewPosition{\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\t// top/left coordinates inside the viewport by mouse position\r\n\t\tconst viewport = this._getViewPortSize();\r\n\t\tconst tooltipNode = this.getNode();\r\n\t\tconst tooltip: IViewBox = {\r\n\t\t\ttop:0,\r\n\t\t\tleft: 0,\r\n\t\t\twidth: tooltipNode.offsetWidth,\r\n\t\t\theight: tooltipNode.offsetHeight,\r\n\t\t\tbottom: 0,\r\n\t\t\tright: 0\r\n\t\t};\r\n\r\n\t\tconst offsetX = scheduler.config.tooltip_offset_x;\r\n\t\tconst offsetY = scheduler.config.tooltip_offset_y;\r\n\r\n\t\tconst container = document.body;\r\n\t\tconst mouse = domHelpers.getRelativeEventPosition(event, container);\r\n\t\tconst containerPos = domHelpers.getNodePosition(container);\r\n\t\tmouse.y += containerPos.y; // to fix margin collapsing\r\n\r\n\t\ttooltip.top = mouse.y;\r\n\t\ttooltip.left = mouse.x;\r\n\t\ttooltip.top += offsetY;\r\n\t\ttooltip.left += offsetX;\r\n\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\ttooltip.right = tooltip.left + tooltip.width;\r\n\r\n\t\tconst scrollTop = window.scrollY + container.scrollTop; // to fix margin collapsing\r\n\t\t// edge cases when the tooltip element can be partially hidden by edges of the viewport\r\n\t\tif(tooltip.top < viewport.top - scrollTop){\r\n\t\t\ttooltip.top = viewport.top;\r\n\t\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\t}else if(tooltip.bottom > viewport.bottom){\r\n\t\t\ttooltip.bottom = viewport.bottom;\r\n\t\t\ttooltip.top = tooltip.bottom - tooltip.height;\r\n\t\t}\r\n\r\n\t\tif(tooltip.left < viewport.left){\r\n\t\t\ttooltip.left = viewport.left;\r\n\t\t\ttooltip.right = viewport.left + tooltip.width;\r\n\t\t}else if(tooltip.right > viewport.right){\r\n\t\t\ttooltip.right = viewport.right;\r\n\t\t\ttooltip.left = tooltip.right - tooltip.width;\r\n\t\t}\r\n\r\n\t\tif(mouse.x >= tooltip.left && mouse.x <= tooltip.right) {\r\n\t\t\ttooltip.left = mouse.x - tooltip.width - offsetX;\r\n\t\t\ttooltip.right = tooltip.left + tooltip.width;\r\n\t\t}\r\n\r\n\t\tif(mouse.y >= tooltip.top && mouse.y <= tooltip.bottom) {\r\n\t\t\ttooltip.top = mouse.y - tooltip.height - offsetY;\r\n\t\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\t}\r\n\r\n\t\treturn tooltip;\r\n\t}\r\n\r\n\tprivate _getViewPortSize() : IViewBox {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tconst container = this._getViewPort();\r\n\t\tlet viewport = container;\r\n\t\tlet scrollTop = window.scrollY + document.body.scrollTop;\r\n\t\tlet scrollLeft = window.scrollX + document.body.scrollLeft;\r\n\t\tlet pos;\r\n\t\t// support for the initial tooltip mode where the tooltip element was attached to the data area of scheduler\r\n\t\tif(container === scheduler.$event_data){\r\n\t\t\tviewport = scheduler.$event;\r\n\t\t\tscrollTop = 0;\r\n\t\t\tscrollLeft = 0;\r\n\t\t\tpos = domHelpers.getNodePosition(scheduler.$event);\r\n\t\t}else{\r\n\t\t\tpos = domHelpers.getNodePosition(viewport);\r\n\t\t}\r\n\t\treturn {\r\n\t\t\tleft:pos.x + scrollLeft,\r\n\t\t\ttop: pos.y + scrollTop,\r\n\t\t\twidth: pos.width,\r\n\t\t\theight: pos.height,\r\n\t\t\tbottom: pos.y + pos.height + scrollTop,\r\n\t\t\tright: pos.x + pos.width + scrollLeft\r\n\t\t};\r\n\t}\r\n}\r\n","import * as utils from \"../../core/utils/utils\";\r\nimport { Tooltip } from \"./tooltip\";\r\n\r\ninterface ITrackerTarget {\r\n\tselector: string;\r\n\tonmouseenter: (event: MouseEvent, node: HTMLElement) => void;\r\n\tonmousemove: (event: MouseEvent, node: HTMLElement) => void;\r\n\tonmouseleave: (event: MouseEvent, node: HTMLElement) => void;\r\n\tglobal: boolean;\r\n}\r\n\r\ninterface ITooltipConfig {\r\n\tselector: string;\r\n\thtml: (event: MouseEvent, node: HTMLElement) => string;\r\n\tglobal: boolean;\r\n}\r\n\r\nexport class TooltipManager{\r\n\ttooltip: Tooltip;\r\n\tprotected _domEvents: any;\r\n\tprivate _listeners: object = {};\r\n\tprivate _scheduler: any;\r\n\tprivate delayShow: any;\r\n\tprivate delayHide: any;\r\n\r\n\tconstructor(scheduler: any) {\r\n\t\tthis.tooltip = new Tooltip(scheduler);\r\n\t\tthis._scheduler = scheduler;\r\n\t\tthis._domEvents = scheduler._createDomEventScope();\r\n\t\tthis._initDelayedFunctions();\r\n\t}\r\n\r\n\tdestructor(): void{\r\n\t\tthis.tooltip.hide();\r\n\t\tthis._domEvents.detachAll();\r\n\t}\r\n\thideTooltip(): void{\r\n\t\tthis.delayHide();\r\n\t}\r\n\tattach(config: ITrackerTarget): void {\r\n\t\tlet root = document.body;\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tif(!config.global){\r\n\t\t\troot = scheduler.$root;\r\n\t\t}\r\n\r\n\t\tlet watchableTarget = null;\r\n\t\tconst handler = (event) => {\r\n\t\t\tconst eventTarget = domHelpers.getTargetNode(event);\r\n\t\t\tconst targetNode = domHelpers.closest(eventTarget, config.selector);\r\n\t\t\tif(domHelpers.isChildOf(eventTarget, this.tooltip.getNode())){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tconst doOnMouseEnter = () => {\r\n\t\t\t\twatchableTarget = targetNode;\r\n\t\t\t\tconfig.onmouseenter(event, targetNode);\r\n\t\t\t};\r\n\r\n\t\t\tif(watchableTarget){\r\n\t\t\t\tif(targetNode && targetNode === watchableTarget){\r\n\t\t\t\t\tconfig.onmousemove(event, targetNode);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconfig.onmouseleave(event, watchableTarget);\r\n\t\t\t\t\twatchableTarget = null;\r\n\r\n\t\t\t\t\tif(targetNode && targetNode !== watchableTarget){\r\n\t\t\t\t\t\tdoOnMouseEnter();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(targetNode){\r\n\t\t\t\t\tdoOnMouseEnter();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tthis.detach(config.selector);\r\n\t\tthis._domEvents.attach(root, \"mousemove\", handler);\r\n\t\tthis._listeners[config.selector] = {\r\n\t\t\tnode: root,\r\n\t\t\thandler\r\n\t\t};\r\n\t}\r\n\r\n\tdetach(selector: string): void {\r\n\t\tconst listener = this._listeners[selector];\r\n\t\tif(listener){\r\n\t\t\tthis._domEvents.detach(listener.node, \"mousemove\", listener.handler);\r\n\t\t}\r\n\t}\r\n\r\n\ttooltipFor(config: ITooltipConfig): void {\r\n\t\tconst cloneDomEvent = (event: MouseEvent) => {\r\n\t\t\tlet clone = event;\r\n\t\t\t// making events survive timeout in ie\r\n\t\t\t// tslint:disable-next-line no-string-literal\r\n\t\t\tif(document[\"createEventObject\"] && !document.createEvent){\r\n\t\t\t\t// tslint:disable-next-line no-string-literal\r\n\t\t\t\tclone = document[\"createEventObject\"](event);\r\n\t\t\t}\r\n\t\t\treturn clone;\r\n\t\t};\r\n\t\tthis._initDelayedFunctions();\r\n\t\tthis.attach({\r\n\t\t\tselector: config.selector,\r\n\t\t\tglobal: config.global,\r\n\t\t\tonmouseenter:(event: MouseEvent, node: HTMLElement) => {\r\n\t\t\t\tconst html = config.html(event, node);\r\n\t\t\t\tif(html){\r\n\t\t\t\t\tthis.delayShow(cloneDomEvent(event), html);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tonmousemove:(event: MouseEvent, node: HTMLElement) => {\r\n\t\t\t\tconst html = config.html(event, node);\r\n\t\t\t\tif(html){\r\n\t\t\t\t\tthis.delayShow(cloneDomEvent(event), html);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\t\t\tthis.delayHide();\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tonmouseleave:() => {\r\n\t\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\t\tthis.delayHide();\r\n\t\t\t},\r\n\t\t});\r\n\t}\r\n\r\n\tprivate _initDelayedFunctions(){\r\n\t\tconst scheduler = this._scheduler;\r\n\t\t// reset delayed functions in order to apply current values of tooltip_timeout\r\n\t\tif(this.delayShow){\r\n\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t}\r\n\t\tif(this.delayHide){\r\n\t\t\tthis.delayHide.$cancelTimeout();\r\n\t\t}\r\n\t\tthis.tooltip.hide();\r\n\t\t\r\n\t\tthis.delayShow = (utils as any).default.delay((event: MouseEvent, html: string) => {\r\n\t\t\tif(scheduler.callEvent(\"onBeforeTooltip\", [event]) === false) {\r\n\t\t\t\tthis.tooltip.hide();\r\n\t\t\t} else {\r\n\t\t\t\tthis.tooltip.setContent(html);\r\n\t\t\t\tthis.tooltip.show(event);\r\n\t\t\t}\r\n\t\t}, scheduler.config.tooltip_timeout || 1);\r\n\r\n\t\tthis.delayHide = (utils as any).default.delay(() => {\r\n\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\tthis.tooltip.hide();\r\n\t\t}, scheduler.config.tooltip_hide_timeout || 1);\r\n\t}\r\n\r\n}","import active_links from \"./active_links\";\r\nimport agenda_legacy from \"./agenda_legacy_view\";\r\nimport agenda_view from \"./agenda\";\r\nimport all_timed from \"./all_timed\";\r\nimport collision from \"./collision\";\r\nimport container_autoresize from \"./container_autoresize\";\r\nimport cookie from \"./cookie\";\r\nimport daytimeline_restricted from \"./restricted_extensions/daytimeline\";\r\nimport drag_between_restricted from \"./restricted_extensions/drag_between\";\r\nimport editors from \"./editors\";\r\nimport expand from \"./expand\";\r\nimport grid_view from \"./restricted_extensions/grid_view\";\r\nimport html_templates from \"./html_templates\";\r\nimport key_nav from \"./key_nav\";\r\nimport layer from \"./layer\";\r\nimport limit from \"./limit\";\r\nimport map_view from \"./map_view\";\r\nimport minical from \"./minical\";\r\nimport monthheight from \"./monthheight\";\r\nimport multisection_restricted from \"./restricted_extensions/multisection\";\r\nimport multiselect from \"./multiselect\";\r\nimport multisource from \"./multisource\";\r\nimport mvc from \"./mvc\";\r\nimport outerdrag from \"./outerdrag\";\r\nimport pdf from \"./pdf\";\r\nimport quick_info from \"./quick_info\";\r\nimport readonly from \"./readonly\";\r\nimport recurring from \"./recurring\";\r\nimport serialize from \"./serialize\";\r\nimport timeline_restricted from \"./restricted_extensions/timeline\";\r\nimport tooltip from \"./tooltip\";\r\nimport treetimeline_restricted from \"./restricted_extensions/treetimeline\";\r\nimport units_restricted from \"./restricted_extensions/units\";\r\nimport url from \"./url\";\r\nimport week_agenda_restricted from \"./restricted_extensions/week_agenda\";\r\nimport wp from \"./wp\";\r\nimport year_view from \"./year_view\";\r\nimport export_api from \"./export_api\";\r\n\r\nexport default {\r\n\tactive_links,\r\n\tagenda_legacy,\r\n\tagenda_view,\r\n\tall_timed,\r\n\tcollision,\r\n\tcontainer_autoresize,\r\n\tcookie,\r\n\tdaytimeline: daytimeline_restricted,\r\n\tdrag_between: drag_between_restricted,\r\n\teditors,\r\n\texpand,\r\n\texport_api,\r\n\tgrid_view,\r\n\thtml_templates,\r\n\tkey_nav,\r\n\tlayer,\r\n\tlimit,\r\n\tmap_view,\r\n\tminical,\r\n\tmonthheight,\r\n\tmultisection: multisection_restricted,\r\n\tmultiselect,\r\n\tmultisource,\r\n\tmvc,\r\n\touterdrag,\r\n\tpdf,\r\n\tquick_info,\r\n\treadonly,\r\n\trecurring,\r\n\tserialize,\r\n\ttimeline: timeline_restricted,\r\n\ttooltip,\r\n\ttreetimeline: treetimeline_restricted,\r\n\tunits: units_restricted,\r\n\turl,\r\n\tweek_agenda: week_agenda_restricted,\r\n\twp,\r\n\tyear_view\r\n};","export default function(scheduler){\r\n\r\nscheduler.config.active_link_view = \"day\";\r\nscheduler._active_link_click = function(e){\r\n\tvar start = e.target;\r\n\tvar to = start.getAttribute(\"data-link-date\");\r\n\tvar s_d = scheduler.date.str_to_date(scheduler.config.api_date, false, true);\r\n\tif (to) {\r\n\t\tscheduler.setCurrentView(s_d(to), scheduler.config.active_link_view);\r\n\t\tif (e && e.preventDefault)\r\n\t\t\te.preventDefault();\r\n\t\treturn false;\r\n\t}\r\n};\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar do_wrapper = function(key, fullname){\r\n\t\tfullname = fullname || (key+\"_scale_date\");\r\n\r\n\t\tif(!scheduler.templates['_active_links_old_'+ fullname]){\r\n\t\t\tscheduler.templates['_active_links_old_'+ fullname] = scheduler.templates[fullname];\r\n\t\t}\r\n\t\tvar week_x = scheduler.templates['_active_links_old_'+ fullname];\r\n\t\tvar d_s = scheduler.date.date_to_str(scheduler.config.api_date);\r\n\t\tscheduler.templates[fullname] = function(date) {\r\n\t\t\treturn \"\" + week_x(date) + \"\";\r\n\t\t};\r\n\t};\r\n\r\n\tdo_wrapper(\"week\");\r\n\tdo_wrapper(\"\", \"month_day\");\r\n\tif (this.matrix){\r\n\t\tfor (var key in this.matrix)\r\n\t\t\tdo_wrapper(key);\r\n\t}\r\n\r\n\tthis._detachDomEvent(this._obj, \"click\", scheduler._active_link_click);\r\n\tscheduler.event(this._obj, \"click\", scheduler._active_link_click);\r\n});\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.date.add_agenda_legacy = function(date){\r\n\treturn scheduler.date.add(date, 1, \"year\");\r\n};\r\n\r\nscheduler.templates.agenda_legacy_time = function(start,end,ev){\r\n\tif (ev._timed)\r\n\t\treturn this.day_date(ev.start_date, ev.end_date, ev)+\" \"+this.event_date(start);\r\n\telse\r\n\t\treturn scheduler.templates.day_date(start)+\" – \"+scheduler.templates.day_date(end);\r\n};\r\nscheduler.templates.agenda_legacy_text = function(start,end,event){\r\n\treturn event.text;\r\n};\r\nscheduler.templates.agenda_legacy_date = function(){ return \"\"; };\r\n\r\nscheduler.date.agenda_legacy_start=function(){ return scheduler.date.date_part(scheduler._currentDate()); };\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function() {\r\n\tvar old_dblclick_dhx_cal_data = scheduler.dblclick_dhx_cal_data;\r\n\tscheduler.dblclick_dhx_cal_data = function() {\r\n\t\tif (this._mode == \"agenda_legacy\") {\r\n\t\t\tif (!this.config.readonly && this.config.dblclick_create)\r\n\t\t\t\tthis.addEventNow();\r\n\t\t} else {\r\n\t\t\tif (old_dblclick_dhx_cal_data)\r\n\t\t\t\treturn old_dblclick_dhx_cal_data.apply(this, arguments);\r\n\t\t}\r\n\t};\r\n\r\n\r\n\tvar old = scheduler.render_data;\r\n\tscheduler.render_data=function(evs){\r\n\t\tif (this._mode == \"agenda_legacy\")\r\n\t\t\tfill_agenda_tab();\r\n\t\telse\r\n\t\t\treturn old.apply(this,arguments);\r\n\t};\r\n\r\n\tvar old_render_view_data = scheduler.render_view_data;\r\n\tscheduler.render_view_data = function(){\r\n\t\tif(this._mode == \"agenda_legacy\") {\r\n\t\t\tscheduler._agendaScrollTop = scheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop;\r\n\t\t\tscheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop = 0;\r\n\t\t}\r\n\t\treturn old_render_view_data.apply(this,arguments);\r\n\t};\r\n\r\n\r\n\r\n\tfunction set_full_view(mode){\r\n\t\tif (mode){\r\n\t\t\tvar l = scheduler.locale.labels;\r\n\r\n\t\t\tvar rowAttr = scheduler._waiAria.agendaHeadAttrString();\r\n\t\t\tvar dateHeader = scheduler._waiAria.agendaHeadDateString(l.date);\r\n\t\t\tvar descriptionHeader = scheduler._waiAria.agendaHeadDescriptionString(l.description);\r\n\r\n\t\t\tscheduler._els[\"dhx_cal_header\"][0].innerHTML=\"
\" +\r\n\t\t\t\t\"
\"+l.date+\"
\" +\r\n\t\t\t\t\"\"+l.description+\"\" +\r\n\t\t\t\t\"
\";\r\n\t\t\tscheduler._table_view=true;\r\n\t\t\tscheduler.set_sizes();\r\n\t\t}\r\n\t}\r\n\r\n\tfunction fill_agenda_tab(){\r\n\t\t//select events for which data need to be printed\r\n\r\n\t\tvar events = scheduler.get_visible_events();\r\n\t\tevents.sort(function(a,b){ return a.start_date>b.start_date?1:-1;});\r\n\r\n\t\tvar tableAttr = scheduler._waiAria.agendaDataAttrString();\r\n\t\tvar agendaEventAttrString;\r\n\t\t//generate html for the view\r\n\t\tvar html=\"
\";\r\n\t\tfor (var i=0; i
\"+\r\n\t\t\t\t\t(scheduler.config.rtl ? scheduler.templates.agenda_time(ev.end_date,ev.start_date, ev):scheduler.templates.agenda_time(ev.start_date, ev.end_date,ev))+\r\n\t\t\t\t\t\"
\";\r\n\t\t\thtml+=`
\r\n\t\t\t\r\n\t\t\t
`;\r\n\t\t\thtml+=\"\"+scheduler.templates.agenda_text(ev.start_date, ev.end_date, ev)+\"
\";\r\n\t\t}\r\n\t\thtml+=\"
\";\r\n\r\n\t\t//render html\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop = scheduler._agendaScrollTop||0;\r\n\r\n\t\t// setting up dhx_v_border size\r\n\t\tvar agenda_area = scheduler._els[\"dhx_cal_data\"][0].childNodes[0];\r\n\t\tvar v_border = agenda_area.childNodes[agenda_area.childNodes.length-1];\r\n\t\tv_border.style.height = (agenda_area.offsetHeight < scheduler._els[\"dhx_cal_data\"][0].offsetHeight) ? \"100%\" : (agenda_area.offsetHeight+\"px\");\r\n\r\n\t\tvar t=scheduler._els[\"dhx_cal_data\"][0].firstChild.childNodes;\r\n\r\n\t\tvar dateElement = scheduler._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML=scheduler.templates.agenda_date(scheduler._min_date, scheduler._max_date, scheduler._mode);\r\n\t\t}\r\n\r\n\t\tscheduler._rendered=[];\r\n\t\tfor (var i=0; i < t.length-1; i++)\r\n\t\t\tscheduler._rendered[i]=t[i];\r\n\r\n\t}\r\n\r\n\tscheduler.agenda_legacy_view=function(mode){\r\n\t\tscheduler._min_date = scheduler.config.agenda_start||scheduler.date.agenda_legacy_start(scheduler._date);\r\n\t\tscheduler._max_date = scheduler.config.agenda_end||scheduler.date.add_agenda_legacy(scheduler._min_date, 1);\r\n\r\n\t\tset_full_view(mode);\r\n\t\tif (mode){\r\n\t\t\tscheduler._cols = null;\r\n\t\t\tscheduler._colsS = null;\r\n\t\t\tscheduler._table_view = true;\r\n\t\t\t//agenda tab activated\r\n\t\t\tfill_agenda_tab();\r\n\t\t} else {\r\n\t\t\tscheduler._table_view = false;\r\n\t\t\t//agenda tab de-activated\r\n\t\t}\r\n\t};\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.date.add_agenda = function(date, inc){\r\n\t\treturn scheduler.date.add(date, 1*inc, \"month\");\r\n\t};\r\n\t\r\n\tscheduler.templates.agenda_time = function(start,end,ev){\r\n\t\tif (ev._timed){\r\n\t\t\treturn `${this.event_date(start)} - ${this.event_date(end)}`;\r\n\t\t}else{\r\n\t\t\treturn scheduler.locale.labels.full_day;\r\n\t\t}\r\n\t};\r\n\tscheduler.templates.agenda_text = function(start,end,ev){\r\n\t\treturn ev.text;\r\n\t};\r\n\r\n\tconst dayDateToStr = scheduler.date.date_to_str(\"%F %j\");\r\n\tconst dayDowToStr = scheduler.date.date_to_str(\"%l\");\r\n\r\n\tscheduler.templates.agenda_day = function(date){ \r\n\t\treturn `
${dayDateToStr(date)}
\r\n\t\t
${dayDowToStr(date)}
`;\r\n\t};\r\n\tscheduler.templates.agenda_date = function(start, end){ \r\n\t\treturn scheduler.templates.month_date(scheduler.getState().date); \r\n\t};\r\n\t\r\n\tscheduler.date.agenda_start=function(date){\r\n\t\treturn scheduler.date.month_start(new Date(date));\r\n\t};\r\n\r\n\tlet scrollTop = 0;\r\n\t\r\n\tscheduler.attachEvent(\"onTemplatesReady\",function() {\r\n\t\tvar old_dblclick_dhx_cal_data = scheduler.dblclick_dhx_cal_data;\r\n\t\tscheduler.dblclick_dhx_cal_data = function() {\r\n\t\t\tif (this._mode == \"agenda\") {\r\n\t\t\t\tif (!this.config.readonly && this.config.dblclick_create)\r\n\t\t\t\t\tthis.addEventNow();\r\n\t\t\t} else {\r\n\t\t\t\tif (old_dblclick_dhx_cal_data)\r\n\t\t\t\t\treturn old_dblclick_dhx_cal_data.apply(this, arguments);\r\n\t\t\t}\r\n\t\t};\r\n\t\r\n\t\r\n\t\tvar old = scheduler.render_data;\r\n\t\tscheduler.render_data=function(evs){\r\n\t\t\tif (this._mode == \"agenda\")\r\n\t\t\t\tfill_agenda_tab();\r\n\t\t\telse\r\n\t\t\t\treturn old.apply(this,arguments);\r\n\t\t};\r\n\t\r\n\t\tvar old_render_view_data = scheduler.render_view_data;\r\n\t\tscheduler.render_view_data = function(){\r\n\t\t\tif(this._mode == \"agenda\") {\r\n\t\t\t\tscrollTop = scheduler._els[\"dhx_cal_data\"][0].scrollTop;\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = 0;\r\n\t\t\t}\r\n\t\t\treturn old_render_view_data.apply(this,arguments);\r\n\t\t};\r\n\r\n\t\tfunction fill_agenda_tab(){\r\n\t\t\tconst events = scheduler.get_visible_events();\r\n\t\t\tevents.sort(function(a,b){ return a.start_date>b.start_date?1:-1;});\r\n\r\n\t\t\tconst eventsInDays = {};\r\n\t\t\tlet currDate = scheduler.getState().min_date;\r\n\t\t\tconst maxDate = scheduler.getState().max_date;\r\n\t\t\twhile(currDate.valueOf() < maxDate.valueOf()){\r\n\t\t\t\teventsInDays[currDate.valueOf()] = [];\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\r\n\t\t\tlet anyEvents = false;\r\n\r\n\t\t\tevents.forEach((ev) => {\r\n\t\t\t\tlet eventStart = scheduler.date.day_start(new Date(ev.start_date)); \r\n\t\t\t\twhile (eventStart.valueOf() < ev.end_date.valueOf()) {\r\n\t\t\t\t\tif (eventsInDays[eventStart.valueOf()]) {\r\n\t\t\t\t\t\teventsInDays[eventStart.valueOf()].push(ev);\r\n\t\t\t\t\t\tanyEvents = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\teventStart = scheduler.date.day_start(scheduler.date.add(eventStart, 1, \"day\"));\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(!anyEvents){\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = renderEmptyView();\r\n\t\t\t}else{\r\n\t\t\t\tlet html = \"\";\r\n\t\t\t\tfor(let day in eventsInDays){\r\n\t\t\t\t\thtml += renderDay(new Date(day*1), eventsInDays[day]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = scrollTop;\r\n\t\t\t\r\n\t\t\tlet t = scheduler._els[\"dhx_cal_data\"][0].querySelectorAll(\".dhx_cal_agenda_event_line\");\r\n\t\t\tscheduler._rendered = [];\r\n\t\t\tfor (var i = 0; i < t.length - 1; i++) {\r\n\t\t\t\tscheduler._rendered[i] = t[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\r\n\r\n\t\tfunction renderEmptyView(){\r\n\t\t\treturn `
${scheduler.locale.labels.agenda_tab}
`;\r\n\t\t}\r\n\r\n\t\tfunction renderDay(day, events) {\r\n\t\t\tif(!events.length){\r\n\t\t\t\treturn \"\";\r\n\t\t\t}\r\n\t\t\tlet html = `\r\n
\r\n\t
${scheduler.templates.agenda_day(day)}
\r\n\t
\r\n`;\r\n\r\n\t\t\tevents.forEach((calendarEvent) => {\r\n\t\t\t\thtml += renderOneEvent(day, calendarEvent);\r\n\t\t\t});\r\n\r\n\t\t\thtml += `
`;\r\n\t\t\treturn html;\r\n\t\t}\r\n\r\n\t\tfunction renderOneEvent(day, calendarEvent){\r\n\t\t\tconst dates = scheduler.templates.agenda_time(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\t\t\tconst selectedId = scheduler.getState().select_id;\r\n\t\t\tconst cls = scheduler.templates.event_class(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\t\t\tconst description = scheduler.templates.agenda_text(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\r\n\t\t\tlet style = \"\";\r\n\t\t\tif(calendarEvent.color || calendarEvent.textColor){\r\n\t\t\t\tconst bg = (calendarEvent.color ? (\"--dhx-scheduler-event-background:\" + calendarEvent.color + \";\") : \"\");\r\n\t\t\t\tconst color = (calendarEvent.textColor ? (\"--dhx-scheduler-event-color:\" + calendarEvent.textColor + \";\") : \"\");\r\n\t\t\t\tstyle = ` style=\"${bg}${color}\" `;\r\n\t\t\t}\r\n\r\n\t\t\treturn `
\r\n\t
\r\n\t
${dates}
\r\n\t
${description}
\r\n
`;\r\n\t\t}\r\n\t\r\n\t\tscheduler.agenda_view=function(mode){\r\n\t\t\tif (mode){\r\n\t\t\t\tscheduler._min_date = scheduler.config.agenda_start || scheduler.date.agenda_start(scheduler._date);\r\n\t\t\t\tscheduler._max_date = scheduler.config.agenda_end || scheduler.date.add_agenda(scheduler._min_date, 1);\r\n\t\t\t\tscheduler._cols = null;\r\n\t\t\t\tscheduler._colsS = null;\r\n\t\t\t\tscheduler._table_view = true;\r\n\r\n\t\t\t\tconst dateHeader = scheduler._getNavDateElement();\r\n\t\t\t\tdateHeader.innerHTML = scheduler.templates.agenda_date(scheduler._date);\r\n\t\t\t\t//agenda tab activated\r\n\t\t\t\tfill_agenda_tab();\r\n\t\t\t} else {\r\n\t\t\t\tscheduler._table_view = false;\r\n\t\t\t\t//agenda tab de-activated\r\n\t\t\t}\r\n\t\t};\r\n\t});\r\n\r\n\t// scheduler.attachEvent(\"onEventSelected\", function(id){\r\n\t// \tconst oldSelected = scheduler.$container.querySelectorAll(\".dhx_cal_agenda_event_line_selected\");\r\n\t// \toldSelected.forEach((el) => {\r\n\t// \t\tel.classList.remove(\"dhx_cal_agenda_event_line_selected\");\r\n\t// \t});\r\n\r\n\t// \tconst selected = scheduler.$container.querySelector(`[${scheduler.config.event_attribute}=\"${id}\"]`);\r\n\t// \tif(selected){\r\n\t// \t\tselected.classList.add(\"dhx_cal_agenda_event_line_selected\");\r\n\t// \t}\r\n\t// });\r\n\t\r\n\t\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.config.all_timed = \"short\";\r\n\tscheduler.config.all_timed_month = false;\r\n\r\n\tvar is_event_short = function (ev) {\r\n\t\tif(!((ev.end_date - ev.start_date)/(1000*60*60) >= 24)){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t// short event shouldn't disappear to multiday area during dnd-resize\r\n\t\tif(scheduler._drag_mode == \"resize\" && scheduler._drag_id == ev.id){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn \tfalse;\r\n\t};\r\n\r\n\t// copy of usual events and recurring instances;\r\n\t// regular copy causes problems with recurrings which have series event as a prototype\r\n\tscheduler._safe_copy = function(event){\r\n\t\tvar proto = null,\r\n\t\t\tcopy = scheduler._copy_event(event);\r\n\t\tif(event.event_pid){\r\n\t\t\tproto = scheduler.getEvent(event.event_pid);\r\n\t\t}\r\n\r\n\t\tif (proto && proto.isPrototypeOf(event)) {\r\n\t\t\tdelete copy.event_length;\r\n\t\t\tdelete copy.event_pid;\r\n\t\t\tdelete copy.rec_pattern;\r\n\t\t\tdelete copy.rec_type;\r\n\t\t}\r\n\r\n\t\treturn copy;\r\n\t};\r\n\r\n\tvar old_prerender_events_line = scheduler._pre_render_events_line;\r\n\tvar old_prerender_events_table = scheduler._pre_render_events_table;\r\n\r\n\tvar prerender_events = function (evs, hold) {\r\n\t\tif (!this._table_view) {\r\n\t\t\treturn old_prerender_events_line.call(this, evs, hold);\r\n\t\t}\r\n\r\n\t\treturn old_prerender_events_table.call(this, evs, hold);\r\n\t};\r\n\r\n\tscheduler._pre_render_events_line = scheduler._pre_render_events_table = function(evs, hold){\r\n\t\tif (!this.config.all_timed ||\r\n\t\t\t(this._table_view && this._mode != \"month\") ||\r\n\t\t\t(this._mode == \"month\" && !this.config.all_timed_month))\r\n\t\t\treturn prerender_events.call(this, evs, hold);\r\n\r\n\t\tfor (var i=0; i < evs.length; i++) {\r\n\t\t\tvar ev=evs[i];\r\n\r\n\t\t\tif (ev._timed)\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\tif (this.config.all_timed == \"short\") {\r\n\t\t\t\tif (!is_event_short(ev)) {\r\n\t\t\t\t\tif (this._mode != \"month\") {\r\n\t\t\t\t\t\tevs.splice(i--, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar ce = this._safe_copy(ev); // current event (event for one specific day) is copy of original with modified dates\r\n\t\t\tif(!ev._virtual){\r\n\t\t\t\tce._first_chunk = true;\r\n\t\t\t}else{\r\n\t\t\t\tce._first_chunk = false;\r\n\t\t\t}\r\n\t\t\tce._drag_resize = false;\r\n\t\t\tce._virtual = true;\r\n\t\t\tce.start_date = new Date(ce.start_date); // as lame copy doesn't copy date objects\r\n\r\n\t\t\tif (!isOvernightEvent(ev)) {\r\n\t\t\t\tce.end_date = new Date(ev.end_date);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tce.end_date = getNextDay(ce.start_date);\r\n\t\t\t\tif (this.config.last_hour != 24) { // if specific last_hour was set (e.g. 20)\r\n\t\t\t\t\tce.end_date = setDateTime(ce.start_date, this.config.last_hour);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar event_changed = false;\r\n\t\t\tif (ce.start_date < this._max_date && ce.end_date > this._min_date && ce.start_date < ce.end_date) {\r\n\t\t\t\tevs[i] = ce; // adding another event in collection\r\n\t\t\t\tevent_changed = true;\r\n\t\t\t}\r\n\t\t//\tif (ce.start_date > ce.end_date) {\r\n\t\t//\t\tevs.splice(i--,1);\r\n\t\t//\t}\r\n\r\n\t\t\tvar re = this._safe_copy(ev); // remaining event, copy of original with modified start_date (making range more narrow)\r\n\t\t\tre._virtual = true;\r\n\t\t\tre.end_date = new Date(re.end_date);\r\n\t\t\tif (re.start_date < this._min_date)\r\n\t\t\t\tre.start_date = setDateTime(this._min_date, this.config.first_hour);// as we are starting only with whole hours\r\n\t\t\telse\r\n\t\t\t\tre.start_date = setDateTime(getNextDay(ev.start_date), this.config.first_hour);\r\n\r\n\t\t\tif (re.start_date < this._max_date && re.start_date < re.end_date) {\r\n\t\t\t\tif (event_changed){\r\n\t\t\t\t\tevs.splice(i+1,0,re);//insert part\r\n\t\t\t\t}else {\r\n\t\t\t\t\tevs[i--] = re;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tre._last_chunk = false;\r\n\t\t\t}else{\r\n\t\t\t\tce._last_chunk = true;\r\n\t\t\t\tce._drag_resize = true;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t// in case of all_timed pre_render is not applied to the original event\r\n\t\t// so we need to force redraw in case of dnd\r\n\t\tvar redraw = (this._drag_mode == 'move')?false:hold;\r\n\t\treturn prerender_events.call(this, evs, redraw);\r\n\r\n\r\n\t\tfunction isOvernightEvent(ev){\r\n\t\t\tvar next_day = getNextDay(ev.start_date);\r\n\t\t\treturn (+ev.end_date > +next_day);\r\n\t\t}\r\n\t\tfunction getNextDay(date){\r\n\t\t\tvar next_day = scheduler.date.add(date, 1, \"day\");\r\n\t\t\tnext_day = scheduler.date.date_part(next_day);\r\n\t\t\treturn next_day;\r\n\t\t}\r\n\t\tfunction setDateTime(date, hours){\r\n\t\t\tvar val = scheduler.date.date_part(new Date(date));\r\n\t\t\tval.setHours(hours);\r\n\t\t\treturn val;\r\n\t\t}\r\n\t};\r\n\tvar old_get_visible_events = scheduler.get_visible_events;\r\n\tscheduler.get_visible_events = function(only_timed){\r\n\t\tif (!(this.config.all_timed && this.config.multi_day))\r\n\t\t\treturn old_get_visible_events.call(this, only_timed);\r\n\t\treturn old_get_visible_events.call(this, false); // only timed = false\r\n\t};\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function (old_mode, old_date, mode, date) {\r\n\t\tscheduler._allow_dnd = (mode == \"day\" || mode == \"week\" || scheduler.getView(mode));\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler._is_main_area_event = function(ev){\r\n\t\treturn !!(ev._timed || this.config.all_timed === true || (this.config.all_timed == \"short\" && is_event_short(ev)) );\r\n\t};\r\n\r\n\tvar oldUpdate = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id){\r\n\t\t// full redraw(update_render=true) messes events order while dnd.\r\n\t\t// individual redraw(update_render=false) of multiday event, which happens on select/unselect, expands event to full width of the cell and can be fixes only with full redraw.\r\n\t\t// so for now full redraw is always enabled for not-dnd updates\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tvar fullRedrawNeeded;\r\n\t\tvar initial;\r\n\t\tif(ev) {\r\n\t\t\tfullRedrawNeeded = (scheduler.config.all_timed && !(scheduler.isOneDayEvent(scheduler._events[id]) || scheduler.getState().drag_id));\r\n\t\t\tif (fullRedrawNeeded) {\r\n\t\t\t\tinitial = scheduler.config.update_render;\r\n\t\t\t\tscheduler.config.update_render = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\toldUpdate.apply(scheduler, arguments);\r\n\r\n\t\tif(ev) {\r\n\t\t\tif (fullRedrawNeeded) {\r\n\t\t\t\tscheduler.config.update_render = initial;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\r\nvar temp_section;\r\nvar before;\r\n\r\nscheduler.config.collision_limit = 1;\r\n\r\nfunction _setTempSection(event_id) { // for custom views (matrix, timeline, units)\r\n\tvar checked_mode = scheduler._get_section_view();\r\n\tif(checked_mode && event_id){\r\n\t\ttemp_section = scheduler.getEvent(event_id)[scheduler._get_section_property()];\r\n\t}\r\n}\r\n\r\nscheduler.attachEvent(\"onBeforeDrag\",function(id){\r\n\t_setTempSection(id);\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onBeforeLightbox\",function(id){\r\n\tvar ev = scheduler.getEvent(id);\r\n\tbefore = [ev.start_date, ev.end_date];\r\n\t_setTempSection(id);\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventChanged\",function(id){\r\n\tif (!id || !scheduler.getEvent(id)) return true;\r\n\tvar ev = scheduler.getEvent(id);\r\n\tif (!scheduler.checkCollision(ev)){\r\n\t\tif (!before) return false;\r\n\t\tev.start_date = before[0];\r\n\t\tev.end_date = before[1];\r\n\t\tev._timed=this.isOneDayEvent(ev);\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onBeforeEventChanged\",function(ev,e,is_new){\r\n\treturn scheduler.checkCollision(ev);\r\n});\r\nscheduler.attachEvent(\"onEventAdded\",function(id,ev) {\r\n\tvar result = scheduler.checkCollision(ev);\r\n\tif (!result)\r\n\t\tscheduler.deleteEvent(id);\r\n});\r\nscheduler.attachEvent(\"onEventSave\",function(id, edited_ev, is_new){\r\n\tedited_ev = scheduler._lame_clone(edited_ev);\r\n\tedited_ev.id = id;\r\n\r\n\t//lightbox may not have 'time' section\r\n\tif(!(edited_ev.start_date && edited_ev.end_date)){\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tedited_ev.start_date = new Date(ev.start_date);\r\n\t\tedited_ev.end_date = new Date(ev.end_date);\r\n\t}\r\n\r\n\tif(edited_ev.rec_type){\r\n\t\tscheduler._roll_back_dates(edited_ev);\r\n\t}\r\n\treturn scheduler.checkCollision(edited_ev); // in case user creates event on one date but then edited it another\r\n});\r\n\r\nscheduler._check_sections_collision = function(first, second){\r\n\tvar map_to = scheduler._get_section_property();\r\n\tif (first[map_to] == second[map_to] && first.id != second.id)\r\n\t\treturn true;\r\n\treturn false;\r\n};\r\n\r\nscheduler.checkCollision = function(ev) {\r\n\tvar evs = [];\r\n\tvar collision_limit = scheduler.config.collision_limit;\r\n\r\n\tif (ev.rec_type) {\r\n\t\tvar evs_dates = scheduler.getRecDates(ev);\r\n\t\tfor(var k=0; k= collision_limit) {\r\n\r\n\t\t\tsingle = false;\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\tif ( evs.length >= collision_limit )\r\n\t\t\tsingle = false;\r\n\t}\r\n\tif (!single) {\r\n\t\tvar res = !scheduler.callEvent(\"onEventCollision\",[ev,evs]);\r\n\t\tif (!res) {\r\n\t\t\tev[map_to] = temp_section||ev[map_to]; // from _setTempSection for custom views\r\n\t\t}\r\n\t\treturn res;\r\n\t}\r\n\treturn single;\r\n\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.config.container_autoresize = true;\r\n\tscheduler.config.month_day_min_height = 90;\r\n\tscheduler.config.min_grid_size = 25;\r\n\tscheduler.config.min_map_size = 400;\r\n\r\n\tvar old_pre_render_event = scheduler._pre_render_events;\r\n\r\n\t//need for temporary disabling without modifying public config\r\n\tvar active = true;\r\n\tvar total_height = 0;\r\n\tvar multiday_height = 0;\r\n\r\n\tscheduler._pre_render_events = function(evs, hold) {\r\n\t\tif (!(scheduler.config.container_autoresize && active)) {\r\n\t\t\treturn old_pre_render_event.apply(this, arguments);\r\n\t\t}\r\n\r\n\t\tvar hb = this.xy.bar_height;\r\n\t\tvar h_old = this._colsS.heights;\r\n\t\tvar h = this._colsS.heights = [0, 0, 0, 0, 0, 0, 0];\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tif (!this._table_view)\r\n\t\t\tevs = this._pre_render_events_line(evs, hold); //ignore long events for now\r\n\t\telse\r\n\t\t\tevs = this._pre_render_events_table(evs, hold);\r\n\r\n\t\tif (this._table_view) {\r\n\t\t\tif (hold){\r\n\t\t\t\tthis._colsS.heights = h_old;\r\n\t\t\t} else {\r\n\t\t\t\tvar evl = data.firstChild;\r\n\t\t\t\tconst rows = evl.querySelectorAll(\".dhx_cal_month_row\");\r\n\t\t\t\tif (rows) {\r\n\t\t\t\t\tfor (var i = 0; i < rows.length; i++) {\r\n\t\t\t\t\t\th[i]++;\r\n\r\n\t\t\t\t\t\tif ((h[i]) * hb > this._colsS.height - this.xy.month_head_height) { // 22 - height of cell's header\r\n\t\t\t\t\t\t\t//we have overflow, update heights\r\n\t\t\t\t\t\t\tvar cells = rows[i].querySelectorAll(\".dhx_cal_month_cell\");\r\n\r\n\t\t\t\t\t\t\tvar cHeight = this._colsS.height - this.xy.month_head_height;\r\n\t\t\t\t\t\t\tif(this.config.max_month_events*1 !== this.config.max_month_events || h[i] <= this.config.max_month_events){\r\n\t\t\t\t\t\t\t\tcHeight = h[i] * hb;\r\n\t\t\t\t\t\t\t}else if( (this.config.max_month_events + 1) * hb > this._colsS.height - this.xy.month_head_height){\r\n\t\t\t\t\t\t\t\tcHeight = (this.config.max_month_events + 1) * hb;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\trows[i].style.height = (cHeight + this.xy.month_head_height) + \"px\";\r\n\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\tfor (var j = 0; j < cells.length; j++) {\r\n\t\t\t\t\t\t\t\tcells[j].childNodes[1].style.height = cHeight + \"px\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\th[i] = (h[i - 1] || 0) + cells[0].offsetHeight;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\th[i] = (h[i - 1] || 0) + rows[i].querySelectorAll(\".dhx_cal_month_cell\")[0].offsetHeight;\r\n\t\t\t\t\t}\r\n\t\t\t\t\th.unshift(0);\r\n\t\t\t\t\tif (evl.parentNode.offsetHeight < evl.parentNode.scrollHeight && !evl._h_fix) {\r\n\t\t\t\t\t\t//we have v-scroll, decrease last day cell\r\n\r\n\t\t\t\t\t\t// NO CHECK SHOULD BE MADE ON VERTICAL SCROLL\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (!evs.length && this._els[\"dhx_multi_day\"][0].style.visibility == \"visible\")\r\n\t\t\t\t\t\th[0] = -1;\r\n\t\t\t\t\tif (evs.length || h[0] == -1) {\r\n\t\t\t\t\t\t//shift days to have space for multiday events\r\n\t\t\t\t\t\t//var childs = evl.parentNode.childNodes;\r\n\t\t\t\t\t\tvar dh = ((h[0] + 1) * hb + 1); // +1 so multiday events would have 2px from top and 2px from bottom by default\r\n\t\t\t\t\t\tif(multiday_height != dh + 1) {\r\n\t\t\t\t\t\t\tthis._obj.style.height = (total_height - multiday_height + dh - 1) + \"px\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tdh += \"px\";\r\n\t\t\t\t\t\tconst navHeight = this._els[\"dhx_cal_navline\"][0].offsetHeight;\r\n\t\t\t\t\t\tconst headerHeight = this._els[\"dhx_cal_header\"][0].offsetHeight;\r\n\t\t\t\t\t\tdata.style.height = (this._obj.offsetHeight - navHeight - headerHeight - (this.xy.margin_top || 0)) + 'px';\r\n\t\t\t\t\t\tvar last = this._els[\"dhx_multi_day\"][0];\r\n\t\t\t\t\t\tlast.style.height = dh;\r\n\t\t\t\t\t\tlast.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\t\tlast = this._els[\"dhx_multi_day\"][1];\r\n\t\t\t\t\t\tlast.style.height = dh;\r\n\t\t\t\t\t\tlast.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\t\tif(last.style.visibility == \"hidden\"){\r\n\t\t\t\t\t\t\tlast.style.display = \"none\";\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tlast.style.display = \"\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tlast.className = h[0] ? \"dhx_multi_day_icon\" : \"dhx_multi_day_icon_small\";\r\n\t\t\t\t\t\tthis._dy_shift = (h[0] + 1) * hb;\r\n\t\t\t\t\t\th[0] = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn evs;\r\n\t};\r\n\r\n\tvar checked_divs = [\"dhx_cal_navline\", \"dhx_cal_header\", \"dhx_multi_day\", \"dhx_cal_data\"];\r\n\tvar updateContainterHeight = function(is_repaint) {\r\n\t\ttotal_height = 0;\r\n\t\tfor (var i = 0; i < checked_divs.length; i++) {\r\n\r\n\t\t\tvar className = checked_divs[i];\r\n\t\t\tvar checked_div = (scheduler._els[className]) ? scheduler._els[className][0] : null;\r\n\t\t\tvar height = 0;\r\n\t\t\tswitch (className) {\r\n\t\t\t\tcase \"dhx_cal_navline\":\r\n\t\t\t\tcase \"dhx_cal_header\":\r\n\t\t\t\t\theight = checked_div.offsetHeight;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"dhx_multi_day\":\r\n\t\t\t\t\theight = (checked_div) ? checked_div.offsetHeight - 1 : 0;\r\n\t\t\t\t\tmultiday_height = height;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"dhx_cal_data\":\r\n\t\t\t\t\tvar mode = scheduler.getState().mode;\r\n\r\n\t\t\t\t\tif(checked_div.childNodes[1] && mode != \"month\") {\r\n\t\t\t\t\t\tlet maxHeight = 0;\r\n\t\t\t\t\t\tfor(let i = 0; i < checked_div.childNodes.length; i++){\r\n\t\t\t\t\t\t\tif(checked_div.childNodes[i].offsetHeight > maxHeight){\r\n\t\t\t\t\t\t\t\tmaxHeight = checked_div.childNodes[i].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\theight = maxHeight;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\theight = Math.max(checked_div.offsetHeight - 1, checked_div.scrollHeight);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (mode == \"month\") {\r\n\t\t\t\t\t\tif (scheduler.config.month_day_min_height && !is_repaint) {\r\n\t\t\t\t\t\t\tvar rows_length = checked_div.querySelectorAll(\".dhx_cal_month_row\").length;\r\n\t\t\t\t\t\t\theight = rows_length * scheduler.config.month_day_min_height;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (is_repaint) {\r\n\t\t\t\t\t\t\tchecked_div.style.height = height + \"px\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (mode == \"year\"){\r\n\t\t\t\t\t\theight = 190 * scheduler.config.year_y;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(mode == \"agenda\"){\r\n\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\tif(checked_div.childNodes && checked_div.childNodes.length){\r\n\t\t\t\t\t\t\tfor(var j = 0; j < checked_div.childNodes.length; j++){\r\n\t\t\t\t\t\t\t\theight += checked_div.childNodes[j].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(height + 2 < scheduler.config.min_grid_size){\r\n\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (mode == \"week_agenda\"){\r\n\t\t\t\t\t\tvar min_height = scheduler.xy.week_agenda_scale_height + scheduler.config.min_grid_size,\r\n\t\t\t\t\t\t\tcur_height;\r\n\r\n\t\t\t\t\t\tvar column;\r\n\t\t\t\t\t\tfor(var k = 0; k < checked_div.childNodes.length; k++){\r\n\t\t\t\t\t\t\tcolumn = checked_div.childNodes[k];\r\n\t\t\t\t\t\t\tfor(var j = 0; j < column.childNodes.length; j++) {\r\n\t\t\t\t\t\t\t\tvar innerHeight = 0,\r\n\t\t\t\t\t\t\t\t\teventsContainer = column.childNodes[j].childNodes[1];\r\n\r\n\t\t\t\t\t\t\t\tfor(var g =0; g < eventsContainer.childNodes.length; g++){\r\n\t\t\t\t\t\t\t\t\tinnerHeight += eventsContainer.childNodes[g].offsetHeight;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tcur_height = innerHeight + scheduler.xy.week_agenda_scale_height;\r\n\t\t\t\t\t\t\t\tcur_height = (k == 1 && (j == 2 || j == 3)) ? cur_height * 2 : cur_height; // for last two cells;\r\n\r\n\t\t\t\t\t\t\t\tif (cur_height > min_height) {\r\n\t\t\t\t\t\t\t\t\tmin_height = cur_height;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\theight = min_height * 3;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(mode == \"map\") {\r\n\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\tvar evs = checked_div.querySelectorAll(\".dhx_map_line\");\r\n\r\n\t\t\t\t\t\tfor (var j = 0; j < evs.length; j++) {\r\n\t\t\t\t\t\t\theight += evs[j].offsetHeight;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (height + 2 < scheduler.config.min_map_size) {\r\n\t\t\t\t\t\t\theight = scheduler.config.min_map_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(scheduler._gridView) {\r\n\t\t\t\t\t\theight = 0;\r\n\r\n\t\t\t\t\t\tif (checked_div.childNodes[1].childNodes[0].childNodes && checked_div.childNodes[1].childNodes[0].childNodes.length) {\r\n\t\t\t\t\t\t\tvar evs = checked_div.childNodes[1].childNodes[0].childNodes[0].childNodes;\r\n\r\n\t\t\t\t\t\t\tfor (var j = 0; j < evs.length; j++) {\r\n\t\t\t\t\t\t\t\theight += evs[j].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\theight += 2;\r\n\r\n\t\t\t\t\t\t\tif(height < scheduler.config.min_grid_size){\r\n\t\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (scheduler.matrix && scheduler.matrix[mode]) {\r\n\t\t\t\t\t\tif (is_repaint) {\r\n\t\t\t\t\t\t\theight += 0;\r\n\t\t\t\t\t\t\tchecked_div.style.height = height + \"px\";\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\t\tvar cfg = scheduler.matrix[mode];\r\n\t\t\t\t\t\t\tvar rows = cfg.y_unit;\r\n\t\t\t\t\t\t\tfor(var r=0; r < rows.length; r++){\r\n\t\t\t\t\t\t\t\theight += cfg.getSectionHeight(rows[r].key);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t// Check and add extra height to avoid events hiding by the horizontal scrollbar\r\n\t\t\t\t\t\t\tif(scheduler.$container.clientWidth != scheduler.$container.scrollWidth){\r\n\t\t\t\t\t\t\t\theight += getScrollSize();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\theight -= 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (mode == \"day\" || mode == \"week\" || (scheduler._props && scheduler._props[mode])) {\r\n\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\theight += 1;\r\n\t\t\ttotal_height += height;\r\n\t\t}\r\n\t\tscheduler._obj.style.height = (total_height) + \"px\";\r\n\r\n\t\tif (!is_repaint)\r\n\t\t\tscheduler.updateView();\r\n\t};\r\n\r\n\tfunction callUpdate(){\r\n\t\tactive = false;\r\n\t\tscheduler.callEvent(\"onAfterSchedulerResize\", []);\r\n\t\tactive = true;\r\n\t}\r\n\r\n\tvar conditionalUpdateContainerHeight = function() {\r\n\t\tif(!(scheduler.config.container_autoresize && active))\r\n\t\t\treturn true;\r\n\r\n\t\tvar mode = scheduler.getState().mode;\r\n\r\n\t\tif(!mode) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tvar asyncRepaint = window.requestAnimationFrame || window.setTimeout;\r\n\t\tvar scrollTop = document.documentElement.scrollTop;\r\n\r\n\t\tasyncRepaint(function() {\r\n\t\t\tif(scheduler.$destroyed || !scheduler.$initialized){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tupdateContainterHeight();\r\n\t\t});\r\n\r\n\t\tif ( (scheduler.matrix && scheduler.matrix[mode]) || mode == \"month\") {\r\n\t\t\tasyncRepaint(function() {\r\n\t\t\t\tif(scheduler.$destroyed || !scheduler.$initialized){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tupdateContainterHeight(true);\r\n\t\t\t\tdocument.documentElement.scrollTop = scrollTop;\r\n\t\t\t\tcallUpdate();\r\n\t\t\t}, 1);\r\n\t\t}else{\r\n\t\t\tcallUpdate();\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function(){\r\n\t\tvar autosizeEnabled = scheduler.config.container_autoresize;\r\n\t\tif(!scheduler.xy.$original_scroll_width){\r\n\t\t\tscheduler.xy.$original_scroll_width = scheduler.xy.scroll_width;\r\n\t\t}\r\n\r\n\t\tscheduler.xy.scroll_width = autosizeEnabled ? 0 : scheduler.xy.$original_scroll_width;\r\n\r\n\t\tif(scheduler.matrix){\r\n\t\t\tfor(var i in scheduler.matrix){\r\n\t\t\t\tvar timeline = scheduler.matrix[i];\r\n\t\t\t\tif(!timeline.$original_section_autoheight){\r\n\t\t\t\t\ttimeline.$original_section_autoheight = timeline.section_autoheight;\r\n\t\t\t\t}\r\n\t\t\t\tif(autosizeEnabled){\r\n\t\t\t\t\ttimeline.section_autoheight = false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\ttimeline.section_autoheight = timeline.$original_section_autoheight;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onXLE\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventChanged\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventCreated\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventAdded\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventDeleted\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onAfterSchedulerResize\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onClearAll\", conditionalUpdateContainerHeight);\r\n\r\n\t//disable container autoresize when expanded\r\n\tscheduler.attachEvent(\"onBeforeExpand\", function(){\r\n\t\tactive = false;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeCollapse\", function(){\r\n\t\tactive = true;\r\n\t\treturn true;\r\n\t});\r\n\t// helper function\r\n\tfunction getScrollSize() {\r\n\t\tvar div = document.createElement(\"div\");\r\n\t\tdiv.style.cssText = \"visibility:hidden;position:absolute;left:-1000px;width:100px;padding:0px;margin:0px;height:110px;min-height:100px;overflow-y:scroll;\";\r\n\r\n\t\tdocument.body.appendChild(div);\r\n\t\tvar size = div.offsetWidth - div.clientWidth;\r\n\t\tdocument.body.removeChild(div);\r\n\t\treturn size;\r\n\t}\r\n\r\n\r\n}","export default function(scheduler){\r\n\tfunction setCookie(name,cookie_param,value) {\r\n\t\tvar str = name + \"=\" + value + (cookie_param?(\"; \"+cookie_param):\"\");\r\n\t\tdocument.cookie = str;\r\n\t}\r\n\tfunction getCookie(name) {\r\n\t\tvar search = name + \"=\";\r\n\t\tif (document.cookie.length > 0) {\r\n\t\t\tvar offset = document.cookie.indexOf(search);\r\n\t\t\tif (offset != -1) {\r\n\t\t\t\toffset += search.length;\r\n\t\t\t\tvar end = document.cookie.indexOf(\";\", offset);\r\n\t\t\t\tif (end == -1)\r\n\t\t\t\t\tend = document.cookie.length;\r\n\t\t\t\treturn document.cookie.substring(offset, end);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}\r\n\r\n\tfunction getCookieName(scheduler) {\r\n\t\treturn (scheduler._obj.id || \"scheduler\") + \"_settings\";\r\n\t}\r\n\r\n\tvar first = true;\r\n\tscheduler.attachEvent(\"onBeforeViewChange\",function(oldMode,oldDate,mode,date){\r\n\t\t// if Url plugin is enabled - explicit url values should have more priority than cookies\r\n\t\tif (first && scheduler._get_url_nav){\r\n\t\t\tvar urlNavigationPlugin = scheduler._get_url_nav();\r\n\t\t\tif(urlNavigationPlugin.date || urlNavigationPlugin.mode || urlNavigationPlugin.event){\r\n\t\t\t\tfirst = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar cookie = getCookieName(scheduler);\r\n\r\n\t\tif (first){\r\n\t\t\tfirst = false;\r\n\t\t\tvar schedulerCookie = getCookie(cookie);\r\n\t\t\tif (schedulerCookie){\r\n\r\n\t\t\t\tif(!scheduler._min_date){\r\n\t\t\t\t\t//otherwise scheduler will have incorrect date until timeout\r\n\t\t\t\t\t//it can cause js error with 'onMouseMove' handler of key_nav.js\r\n\t\t\t\t\tscheduler._min_date = date;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tschedulerCookie = unescape(schedulerCookie).split(\"@\");\r\n\t\t\t\tschedulerCookie[0] = this._helpers.parseDate(schedulerCookie[0]);\r\n\t\t\t\tvar view = this.isViewExists(schedulerCookie[1]) ? schedulerCookie[1] : mode,\r\n\t\t\t\t\tdate = !isNaN(+schedulerCookie[0]) ? schedulerCookie[0] : date;\r\n\r\n\t\t\t\twindow.setTimeout(function(){\r\n\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tscheduler.setCurrentView(date,view);\r\n\t\t\t\t},1);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", function (newMode , newDate){\r\n\t\tvar cookie = getCookieName(scheduler);\r\n\t\tvar text = escape(this._helpers.formatDate(newDate)+\"@\"+(newMode));\r\n\t\tsetCookie(cookie,\"expires=Sun, 31 Jan 9999 22:00:00 GMT\",text);\r\n\t});\r\n\r\n\t// As we are blocking first render above there could be a problem in case of dynamic loading and rendering of visible data in general ('from'/'to' won't be defined)\r\n\tvar old_load = scheduler._load;\r\n\tscheduler._load = function() {\r\n\t\tvar args = arguments;\r\n\r\n\t\tif (!scheduler._date) {\r\n\t\t\tvar that = this;\r\n\t\t\twindow.setTimeout(function() {\r\n\t\t\t\told_load.apply(that, args);\r\n\t\t\t},1);\r\n\t\t} else {\r\n\t\t\told_load.apply(this, args);\r\n\t\t}\r\n\t};\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Day Timeline\", scheduler.assert);\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Drag Between\", scheduler.assert);\r\n}","export default function(scheduler){\r\n/* global dhtmlXCombo */\r\nscheduler.form_blocks['combo']={\r\n\trender:function(sns) {\r\n\t\tif (!sns.cached_options)\r\n\t\t\tsns.cached_options = {};\r\n\t\tvar res = '';\r\n\t\tres += \"
\";\r\n\t\treturn res;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\t(function(){\r\n\t\t\tresetCombo();\r\n\t\t\tvar id = scheduler.attachEvent(\"onAfterLightbox\",function(){\r\n\t\t\t\t// otherwise destructor will never be called after form reset(e.g. in readonly event mode)\r\n\t\t\t\tresetCombo();\r\n\t\t\t\tscheduler.detachEvent(id);\r\n\t\t\t});\r\n\t\t\tfunction resetCombo(){\r\n\t\t\t\tif(node._combo && node._combo.DOMParent) {\r\n\t\t\t\t\tvar combo = node._combo;\r\n\t\t\t\t\tif(combo.unload){\r\n\t\t\t\t\t\tcombo.unload();\r\n\t\t\t\t\t}else if(combo.destructor){\r\n\t\t\t\t\t\tcombo.destructor();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// dhtmlxCombo 4.1.0 bug\r\n\t\t\t\t\tcombo.DOMParent = combo.DOMelem = null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})();\r\n\t\twindow.dhx_globalImgPath = config.image_path||'/';\r\n\t\tnode._combo = new dhtmlXCombo(node, config.name, node.offsetWidth-8);\r\n\t\tif (config.onchange)\r\n\t\t\tnode._combo.attachEvent(\"onChange\", config.onchange);\r\n\r\n\t\tif (config.options_height)\r\n\t\t\tnode._combo.setOptionHeight(config.options_height);\r\n\t\tvar combo = node._combo;\r\n\t\tcombo.enableFilteringMode(config.filtering, config.script_path||null, !!config.cache);\r\n\r\n\t\tif (!config.script_path) { // script-side filtration is used\r\n\t\t\tvar all_options = [];\r\n\t\t\tfor (var i = 0; i < config.options.length; i++) {\r\n\t\t\t\tvar option = config.options[i];\r\n\t\t\t\tvar single_option = [\r\n\t\t\t\t\toption.key,\r\n\t\t\t\t\toption.label,\r\n\t\t\t\t\toption.css\r\n\t\t\t\t];\r\n\t\t\t\tall_options.push(single_option);\r\n\t\t\t}\r\n\t\t\tcombo.addOption(all_options);\r\n\t\t\tif (ev[config.map_to]) {\r\n\t\t\t\tvar index = combo.getIndexByValue(ev[config.map_to]);\r\n\t\t\t\tcombo.selectOption(index);\r\n\t\t\t}\r\n\t\t} else { // server-side filtration is used\r\n\t\t\tvar selected_id = ev[config.map_to];\r\n\t\t\tif (selected_id) {\r\n\t\t\t\tif (config.cached_options[selected_id]) {\r\n\t\t\t\t\tcombo.addOption(selected_id, config.cached_options[selected_id]);\r\n\t\t\t\t\tcombo.disable(1);\r\n\t\t\t\t\tcombo.selectOption(0);\r\n\t\t\t\t\tcombo.disable(0);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tscheduler.ajax.get(config.script_path+\"?id=\"+selected_id+\"&uid=\"+scheduler.uid(), function(result){\r\n\t\t\t\t\t\tvar responseText = result.xmlDoc.responseText;\r\n\t\t\t\t\t\tvar label;\r\n\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\tvar res = JSON.parse(responseText);\r\n\t\t\t\t\t\t\tlabel = res.options[0].text;\r\n\t\t\t\t\t\t}catch(e){\r\n\t\t\t\t\t\t\tvar option = scheduler.ajax.xpath(\"//option\", result.xmlDoc)[0];\r\n\t\t\t\t\t\t\tlabel = option.childNodes[0].nodeValue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tconfig.cached_options[selected_id] = label;\r\n\t\t\t\t\t\tcombo.addOption(selected_id, label);\r\n\t\t\t\t\t\tcombo.disable(1);\r\n\t\t\t\t\t\tcombo.selectOption(0);\r\n\t\t\t\t\t\tcombo.disable(0);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tcombo.setComboValue(\"\");\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config) {\r\n\t\tvar selected_id = node._combo.getSelectedValue(); // value = key\r\n\t\tif (config.script_path) {\r\n\t\t\tconfig.cached_options[selected_id] = node._combo.getSelectedText();\r\n\t\t}\r\n\t\treturn selected_id;\r\n\t},\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\nscheduler.form_blocks['radio']={\r\n\trender:function(sns) {\r\n\t\tvar res = '';\r\n\t\tres += `
`;\r\n\t\tfor (var i=0; i\"+\" \"+sns.options[i].label+\"\";\r\n\t\t}\r\n\t\tres += \"
\";\r\n\r\n\t\treturn res;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\tvar radiobuttons = node.getElementsByTagName('input');\r\n\t\tfor (var i = 0; i < radiobuttons.length; i++) {\r\n\t\t\tradiobuttons[i].checked = false;\r\n\t\t\tvar checked_value = ev[config.map_to]||value;\r\n\t\t\tif (radiobuttons[i].value == checked_value) {\r\n\t\t\t\tradiobuttons[i].checked = true;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tvar radiobuttons = node.getElementsByTagName('input');\r\n\t\tfor(var i=0; i
';\r\n\t\telse\r\n\t\t\treturn '';\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\tnode=scheduler._lightbox.querySelector(`#${config.id}`);\r\n\t\tvar id = scheduler.uid();\r\n\t\tvar isChecked = (typeof config.checked_value != \"undefined\") ? value == config.checked_value : !!value;\r\n\t\tnode.className += \" dhx_cal_checkbox\";\r\n\t\tvar check_html = \"\";\r\n\t\tvar label_html = \"\";\r\n\t\tif (scheduler.config.wide_form){\r\n\t\t\tnode.innerHTML = label_html;\r\n\t\t\tnode.nextSibling.innerHTML=check_html;\r\n\t\t} else\r\n\t\t\tnode.innerHTML=check_html+label_html;\r\n\r\n\t\tif (config.handler) {\r\n\t\t\tvar checkbox = node.getElementsByTagName('input')[0];\r\n\t\t\tif(checkbox.$_eventAttached){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tcheckbox.$_eventAttached = true;\r\n\t\t\tscheduler.event(checkbox, \"click\", config.handler);\r\n\t\t\t//checkbox.onclick = config.handler;\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tnode=scheduler._lightbox.querySelector(`#${config.id}`);\r\n\t\tvar checkbox = node.getElementsByTagName('input')[0]; // moved to the header\r\n\t\tif (!checkbox)\r\n\t\t\tcheckbox = node.nextSibling.getElementsByTagName('input')[0];\r\n\t\treturn (checkbox.checked)?(config.checked_value||true):(config.unchecked_value||false);\r\n\t},\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.ext.fullscreen = {\r\n\ttoggleIcon: null\r\n};\r\n\r\nscheduler.expand = function() {\r\n\tif(!scheduler.callEvent(\"onBeforeExpand\", []))\r\n\t\treturn;\r\n\tvar t = scheduler._obj;\r\n\tdo {\r\n\t\tt._position = t.style.position || \"\";\r\n\t\tt.style.position = \"static\";\r\n\t} while ((t = t.parentNode) && t.style);\r\n\tt = scheduler._obj;\r\n\tt.style.position = \"absolute\";\r\n\tt._width = t.style.width;\r\n\tt._height = t.style.height;\r\n\tt.style.width = t.style.height = \"100%\";\r\n\tt.style.top = t.style.left = \"0px\";\r\n\r\n\tvar top = document.body;\r\n\ttop.scrollTop = 0;\r\n\r\n\ttop = top.parentNode;\r\n\tif (top)\r\n\t\ttop.scrollTop = 0;\r\n\tdocument.body._overflow = document.body.style.overflow || \"\";\r\n\tdocument.body.style.overflow = \"hidden\";\r\n\tscheduler._maximize();\r\n\tscheduler.callEvent(\"onExpand\", []);\r\n};\r\nscheduler.collapse = function() {\r\n\tif(!scheduler.callEvent(\"onBeforeCollapse\", []))\r\n\t\treturn;\r\n\tvar t = scheduler._obj;\r\n\tdo {\r\n\t\tt.style.position = t._position;\r\n\t} while ((t = t.parentNode) && t.style);\r\n\tt = scheduler._obj;\r\n\tt.style.width = t._width;\r\n\tt.style.height = t._height;\r\n\tdocument.body.style.overflow = document.body._overflow;\r\n\tscheduler._maximize();\r\n\tscheduler.callEvent(\"onCollapse\", []);\r\n};\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar t = document.createElement(\"div\");\r\n\tt.className = \"dhx_expand_icon\";\r\n\tscheduler.ext.fullscreen.toggleIcon = t;\r\n\tt.innerHTML = `\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t`;\r\n\tscheduler._obj.appendChild(t);\r\n\tscheduler.event(t, \"click\", function() {\r\n\t\tif (!scheduler.expanded)\r\n\t\t\tscheduler.expand(); else\r\n\t\t\tscheduler.collapse();\r\n\t});\r\n});\r\nscheduler._maximize = function() {\r\n\tthis.expanded = !this.expanded;\r\n\tif(this.expanded){\r\n\t\tthis.ext.fullscreen.toggleIcon.classList.add(\"dhx_expand_icon--expanded\");\r\n\t\t\r\n\t}else{\r\n\t\tthis.ext.fullscreen.toggleIcon.classList.remove(\"dhx_expand_icon--expanded\");\r\n\t}\r\n\t\r\n\t//scheduler.ext.fullscreen.toggleIcon.style.backgroundPosition = \"0 \" + (this.expanded ? \"0\" : \"18\") + \"px\";\r\n\r\n\tvar directions = ['left', 'top'];\r\n\tfor (var i = 0; i < directions.length; i++) {\r\n\t\t//var margin = scheduler.xy['margin_' + directions[i]];\r\n\t\tvar prev_margin = scheduler['_prev_margin_' + directions[i]];\r\n\t\tif (scheduler.xy['margin_' + directions[i]]) {\r\n\t\t\tscheduler['_prev_margin_' + directions[i]] = scheduler.xy['margin_' + directions[i]];\r\n\t\t\tscheduler.xy['margin_' + directions[i]] = 0;\r\n\t\t} else {\r\n\t\t\tif (prev_margin) {\r\n\t\t\t\tscheduler.xy['margin_' + directions[i]] = scheduler['_prev_margin_' + directions[i]];\r\n\t\t\t\tdelete scheduler['_prev_margin_' + directions[i]];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler.setCurrentView();\r\n};\r\n\r\n\r\n}\r\n","export default function(scheduler){\r\n\r\n\r\n(function(){\r\n\r\nfunction defaults(obj, std){\r\n\tfor (var key in std)\r\n\t\tif (!obj[key])\r\n\t\t\tobj[key] = std[key];\r\n\treturn obj;\r\n}\r\n\r\nfunction getElementSizes(element, scheduler) {\r\n\tvar sizes = {};\r\n\telement = scheduler._els[element];\r\n\tif (element && element[0]) {\r\n\t\tsizes.x = element[0].scrollWidth;\r\n\t\tsizes.y = element[0].scrollHeight;\r\n\t} else {\r\n\t\tsizes.x = 0;\r\n\t\tsizes.y = 0;\r\n\t}\r\n\treturn sizes;\r\n}\r\n\r\n//compatibility for new versions of scheduler\r\nif(!window.dhtmlxAjax){\r\n\twindow.dhtmlxAjax = {\r\n\t\tpost: function(url, data, callback){\r\n\t\t\treturn window.dhx4.ajax.post(url, data, callback);\r\n\t\t},\r\n\t\tget: function(url, callback){\r\n\t\t\treturn window.ajax.get(url, callback);\r\n\t\t}\r\n\t};\r\n}\r\n\r\nfunction add_export_methods(scheduler){\r\n\r\n\tscheduler.exportToPDF = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.pdf\",\r\n\t\t\tformat:\"A4\",\r\n\t\t\torientation:\"landscape\",\r\n\t\t\tdpi:96,\r\n\t\t\tzoom:1,\r\n\t\t\trtl: scheduler.config.rtl\r\n\t\t});\r\n\t\tconfig.html = this._export_html(config);\r\n\t\tconfig.mode = this.getState().mode;\r\n\t\tthis._send_to_export(config, \"pdf\");\r\n\t};\r\n\r\n\tscheduler.exportToPNG = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.png\",\r\n\t\t\tformat:\"A4\",\r\n\t\t\torientation:\"landscape\",\r\n\t\t\tdpi:96,\r\n\t\t\tzoom:1,\r\n\t\t\trtl: scheduler.config.rtl\r\n\t\t});\r\n\t\tconfig.html = this._export_html(config);\r\n\t\tconfig.mode = this.getState().mode;\r\n\t\tthis._send_to_export(config, \"png\");\r\n\t};\r\n\r\n\tscheduler.exportToICal = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.ical\",\r\n\t\t\tdata:this._serialize_plain(null, config)\r\n\t\t});\r\n\t\tthis._send_to_export(config, \"ical\");\r\n\t};\r\n\r\n\tscheduler.exportToExcel = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.xlsx\",\r\n\t\t\ttitle:\"Events\",\r\n\t\t\tdata:this._serialize_plain( this.templates.xml_format, config),\r\n\t\t\tcolumns:this._serialize_columns()\r\n\t\t});\r\n\t\tthis._send_to_export(config, \"excel\");\r\n\t};\r\n\r\n\tscheduler._ajax_to_export = function(data, type, callback){\r\n\t\tdelete data.callback;\r\n\t\tvar url = data.server || \"https://export.dhtmlx.com/scheduler\";\r\n\r\n\t\twindow.dhtmlxAjax.post(url,\r\n\t\t\t\"type=\"+type+\"&store=1&data=\"+encodeURIComponent(JSON.stringify(data)),\r\n\t\t\tfunction(loader){\r\n\t\t\t\tvar fail = loader.xmlDoc.status > 400;\r\n\t\t\t\tvar info = null;\r\n\r\n\t\t\t\tif (!fail){\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\tinfo = JSON.parse(loader.xmlDoc.responseText);\r\n\t\t\t\t\t}catch(e){}\r\n\t\t\t\t}\r\n\t\t\t\tcallback(info);\r\n\t\t\t}\r\n\t\t);\r\n\t};\r\n\r\n\tscheduler._plain_export_copy = function(source, format){\r\n\t\tvar target = {};\r\n\t\tfor (var key in source)\r\n\t\t\ttarget[key] = source[key];\r\n\r\n\t\ttarget.start_date = format(target.start_date);\r\n\t\ttarget.end_date = format(target.end_date);\r\n\t\ttarget.$text = this.templates.event_text(source.start_date, source.end_date, source);\r\n\r\n\t\treturn target;\r\n\t};\r\n\r\n\tscheduler._serialize_plain = function(format, config){\r\n\t\tformat = format || scheduler.date.date_to_str(\"%Y%m%dT%H%i%s\", true);\r\n\r\n\t\tvar events;\r\n\t\tif (config && config.start && config.end)\r\n\t\t\tevents = scheduler.getEvents(config.start, config.end);\r\n\t\telse\r\n\t\t\tevents = scheduler.getEvents();\r\n\r\n\t\tvar data = [];\r\n\t\tfor (var i = 0; i< events.length; i++)\r\n\t\t\tdata[i] = this._plain_export_copy(events[i], format);\r\n\r\n\t\treturn data;\r\n\t};\r\n\r\n\tscheduler._serialize_columns = function(){\r\n\t\treturn [\r\n\t\t\t{ id:\"start_date\", header:\"Start Date\", width:30 },\r\n\t\t\t{ id:\"end_date\", header:\"End Date\", width:30 },\r\n\t\t\t{ id:\"$text\", header:\"Text\", width:100 }\r\n\t\t];\r\n\t};\r\n\r\n\tscheduler._send_to_export = function(data, type){\r\n\t\tif(!data.version){\r\n\t\t\tdata.version = scheduler.version;\r\n\t\t}\r\n\r\n\t\tif(!data.skin){\r\n\t\t\tdata.skin = scheduler.skin;\r\n\t\t}\r\n\r\n\t\tif (data.callback)\r\n\t\t\t\treturn scheduler._ajax_to_export(data, type, data.callback);\r\n\r\n\t\tvar form = this._create_hidden_form();\r\n\r\n\t\tform.firstChild.action = data.server || \"https://export.dhtmlx.com/scheduler\";\r\n\t\tform.firstChild.childNodes[0].value = JSON.stringify(data);\r\n\t\tform.firstChild.childNodes[1].value = type;\r\n\t\tform.firstChild.submit();\r\n\t};\r\n\r\n\tscheduler._create_hidden_form = function(){\r\n\t\tif (!this._hidden_export_form){\r\n\t\t\tvar t = this._hidden_export_form = document.createElement(\"div\");\r\n\t\t\tt.style.display = \"none\";\r\n\t\t\tt.innerHTML = \"
\";\r\n\t\t\tdocument.body.appendChild(t);\r\n\t\t}\r\n\t\treturn this._hidden_export_form;\r\n\t};\r\n\r\n\tscheduler._get_export_size = function(format, orientation, zoom, dpi, header, footer, scales) {\r\n\r\n\t\tdpi = parseInt(dpi)/25.4 || 4;\r\n\r\n\t\tvar sizes = {\r\n\t\t\t\"A5\":{ x:148, y:210 },\r\n\t\t\t\"A4\":{ x:210, y:297 },\r\n\t\t\t\"A3\":{ x:297, y:420 },\r\n\t\t\t\"A2\":{ x:420, y:594 },\r\n\t\t\t\"A1\":{ x:594, y:841 },\r\n\t\t\t\"A0\":{ x:841, y:1189 }\r\n\t\t};\r\n\r\n\t\tvar dataX = getElementSizes(\"dhx_cal_data\", this).x;\r\n\t\tvar dataY = getElementSizes(\"dhx_cal_data\", this).y;\r\n\t\tvar headY = getElementSizes(\"dhx_cal_header\", this).y;\r\n\t\tvar multY = getElementSizes(\"dhx_multi_day\", this).y;\r\n\r\n\t\tvar cSize = {\r\n\t\t\ty: dataY + headY + multY\r\n\t\t};\r\n\r\n\t\tif (format === \"full\") {\r\n\t\t\tcSize.x = dataX;\r\n\t\t} else {\r\n\t\t\tcSize.x = Math.floor( (orientation === \"landscape\" ? sizes[format].y : sizes[format].x) * dpi );\r\n\t\t}\r\n\r\n\t\tif (scales) {\r\n\t\t\tcSize.x *= (parseFloat(scales.x) || 1);\r\n\t\t\tcSize.y *= (parseFloat(scales.y) || 1);\r\n\t\t}\r\n\r\n\t\treturn cSize;\r\n\t};\r\n\r\n\tfunction getTimeline() {\r\n\t\tvar mode = scheduler.getState().mode;\r\n\t\tif (scheduler.matrix && scheduler.matrix[mode]) {\r\n\t\t\treturn scheduler.matrix[mode];\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n\r\n\tfunction getInitialSizes() {\r\n\t\tvar smartRendering = undefined,\r\n\t\t\tscrollable = undefined;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (timeline) {\r\n\t\t\tscrollable = timeline.scrollable;\r\n\t\t\tsmartRendering = timeline.smart_rendering;\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tnav_height: scheduler.xy.nav_height,\r\n\t\t\tscroll_width: scheduler.xy.scroll_width,\r\n\t\t\tstyle_width: scheduler._obj.style.width,\r\n\t\t\tstyle_height: scheduler._obj.style.height,\r\n\t\t\ttimeline_scrollable: scrollable,\r\n\t\t\ttimeline_smart_rendering: smartRendering\r\n\t\t};\r\n\t}\r\n\r\n\tfunction setExportSizes(size, initialSizes) {\r\n\t\tscheduler._obj.style.width = size.x + \"px\";\r\n\t\tscheduler._obj.style.height = size.y + \"px\";\r\n\r\n\t\tscheduler.xy.nav_height = 0;\r\n\t\tscheduler.xy.scroll_width = 0;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (initialSizes.timeline_scrollable || initialSizes.timeline_smart_rendering) {\r\n\r\n\t\t\ttimeline.scrollable = false;\r\n\t\t\ttimeline.smart_rendering = false;\r\n\t\t}\r\n\t}\r\n\r\n\tfunction setInitialSizes(initialSizes) {\r\n\t\tscheduler.xy.scroll_width = initialSizes.scroll_width;\r\n\t\tscheduler.xy.nav_height = initialSizes.nav_height;\r\n\t\tscheduler._obj.style.width = initialSizes.style_width;\r\n\t\tscheduler._obj.style.height = initialSizes.style_height;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (initialSizes.timeline_scrollable || initialSizes.timeline_smart_rendering) {\r\n\t\t\ttimeline.scrollable = initialSizes.timeline_scrollable;\r\n\t\t\ttimeline.smart_rendering = initialSizes.timeline_smart_rendering;\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler._export_html = function (obj) {\r\n\t\tvar initialSizes = getInitialSizes();\r\n\t\tvar size = scheduler._get_export_size(obj.format, obj.orientation, obj.zoom, obj.dpi, obj.header, obj.footer, obj.scales);\r\n\r\n\t\tvar html = \"\";\r\n\t\ttry {\r\n\t\t\tsetExportSizes(size, initialSizes);\r\n\t\t\tscheduler.setCurrentView();\r\n\t\t\thtml = scheduler._obj.innerHTML;\r\n\t\t} catch (e) {\r\n\r\n\t\t\t// eslint-disable-next-line no-console\r\n\t\t\tconsole.error(e);\r\n\t\t} finally {\r\n\t\t\tsetInitialSizes(initialSizes);\r\n\t\t\tscheduler.setCurrentView();\r\n\t\t}\r\n\r\n\t\treturn html;\r\n\t};\r\n\r\n}\r\n\r\nadd_export_methods(scheduler);\r\n\r\n\r\n})();\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Grid\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\tvar els = document.body.getElementsByTagName(\"DIV\");\r\n\tfor (var i=0; i < els.length; i++) {\r\n\t\tvar cs = els[i].className||\"\";\r\n\t\tcs = cs.split(\":\");\r\n\t\tif (cs.length == 2 && cs[0] == \"template\"){\r\n\t\t\tvar code = \"return \\\"\"+(els[i].innerHTML||\"\").replace(/\\\\/g, \"\\\\\\\\\").replace(/\"/g,\"\\\\\\\"\").replace(/[\\n\\r]+/g,\"\")+\"\\\";\";\r\n\t\t\tcode = unescape(code).replace(/\\{event\\.([a-z]+)\\}/g,function(all,mask){\r\n\t\t\t\treturn '\"+ev.'+mask+'+\"';\r\n\t\t\t});\r\n\t\t\tscheduler.templates[cs[1]]=Function(\"start\",\"end\",\"ev\",code);\r\n\t\t\tels[i].style.display='none';\r\n\t\t}\r\n\t}\r\n});\r\n\r\n}","import keyboard_shortcuts from \"./keyboard_navigation/common/keyboard_shortcuts\";\r\nimport eventhandler from \"./keyboard_navigation/common/eventhandler\";\r\nimport trap_modal_focus from \"./keyboard_navigation/common/trap_modal_focus\";\r\nimport marker from \"./keyboard_navigation/marker\";\r\nimport scheduler_node from \"./keyboard_navigation/elements/scheduler_node\";\r\nimport nav_node from \"./keyboard_navigation/elements/nav_node\";\r\nimport header_cell from \"./keyboard_navigation/elements/header_cell\";\r\nimport event from \"./keyboard_navigation/elements/event\";\r\nimport time_slot from \"./keyboard_navigation/elements/time_slot\";\r\nimport minical_button from \"./keyboard_navigation/elements/minical_button\";\r\nimport minical_cell from \"./keyboard_navigation/elements/minical_cell\";\r\nimport data_area from \"./keyboard_navigation/elements/data_area\";\r\nimport modals from \"./keyboard_navigation/modals\";\r\nimport core from \"./keyboard_navigation/core\";\r\nimport key_nav_legacy from \"./keyboard_navigation/key_nav_legacy\";\r\n\r\n\r\nimport scheduler_handlers from \"./keyboard_navigation/scheduler_handlers\";\r\nimport minical_handlers from \"./keyboard_navigation/minical_handlers\";\r\n\r\nexport default function(scheduler){\r\n\t\tscheduler.config.key_nav = true;\r\n\t\tscheduler.config.key_nav_step = 30;\r\n\t\tscheduler.addShortcut = function(shortcut, handler, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tscopeObject.prototype.bind(shortcut, handler);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.getShortcutHandler = function(shortcut, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tvar commands = scheduler.$keyboardNavigation.shortcuts.parse(shortcut);\r\n\t\t\t\tif(commands.length){\r\n\t\t\t\t\treturn scopeObject.prototype.findHandler(commands[0]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.removeShortcut = function(shortcut, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tscopeObject.prototype.unbind(shortcut);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.focus = function(){\r\n\t\t\tif(!scheduler.config.key_nav){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar disp = scheduler.$keyboardNavigation.dispatcher;\r\n\t\t\tdisp.enable();\r\n\t\t\tvar activeNode = disp.getActiveNode();\r\n\t\t\tif(!activeNode || activeNode instanceof scheduler.$keyboardNavigation.MinicalButton || activeNode instanceof scheduler.$keyboardNavigation.MinicalCell){\r\n\t\t\t\tdisp.setDefaultNode();\r\n\t\t\t}else{\r\n\t\t\t\tdisp.focusNode(disp.getActiveNode());\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfunction getScope(mode){\r\n\t\t\tvar scopes = {\r\n\t\t\t\t\"minicalButton\":scheduler.$keyboardNavigation.MinicalButton,\r\n\t\t\t\t\"minicalDate\":scheduler.$keyboardNavigation.MinicalCell,\r\n\t\t\t\t\"scheduler\":scheduler.$keyboardNavigation.SchedulerNode,\r\n\t\t\t\t\"dataArea\": scheduler.$keyboardNavigation.DataArea,\r\n\t\t\t\t\"timeSlot\": scheduler.$keyboardNavigation.TimeSlot,\r\n\t\t\t\t\"event\": scheduler.$keyboardNavigation.Event\r\n\t\t\t};\r\n\r\n\t\t\tvar searchMap = {};\r\n\t\t\tfor(var i in scopes)\r\n\t\t\t\tsearchMap[i.toLowerCase()] = scopes[i];\r\n\r\n\t\t\tmode = (mode + \"\").toLowerCase();\r\n\r\n\t\t\treturn searchMap[mode] || scopes.scheduler;\r\n\t\t}\r\n\r\n\t\tscheduler.$keyboardNavigation = {};\r\n\r\n\t\tscheduler._compose = function(){\r\n\t\t\tvar parts = Array.prototype.slice.call(arguments, 0);\r\n\t\t\tvar res = {};\r\n\t\t\tfor(var i = 0; i < parts.length; i++){\r\n\t\t\t\tvar obj = parts[i];\r\n\t\t\t\tif(typeof obj == \"function\"){\r\n\t\t\t\t\tobj = new obj();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor(var p in obj){\r\n\t\t\t\t\tres[p] = obj[p];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn res;\r\n\t\t};\r\n\r\n\t\tkeyboard_shortcuts(scheduler);\r\n\t\teventhandler(scheduler);\r\n\t\ttrap_modal_focus(scheduler);\r\n\t\tmarker(scheduler);\r\n\t\tscheduler_node(scheduler);\r\n\t\tnav_node(scheduler);\r\n\t\theader_cell(scheduler);\r\n\t\tevent(scheduler);\r\n\t\ttime_slot(scheduler);\r\n\t\tminical_button(scheduler);\r\n\t\tminical_cell(scheduler);\r\n\t\tdata_area(scheduler);\r\n\t\tmodals(scheduler);\r\n\t\tcore(scheduler);\r\n\t\tkey_nav_legacy(scheduler);\r\n\r\n\t\t(function(){\r\n\t\t\tscheduler_handlers(scheduler);\r\n\t\t\tminical_handlers(scheduler);\r\n\r\n\t\t\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\t\t\tscheduler.$keyboardNavigation.attachSchedulerHandlers();\r\n\r\n\t\t\tif(scheduler.renderCalendar){\r\n\t\t\t\t// if minical ext loaded before key nav ext - patch it now\r\n\t\t\t\tscheduler.$keyboardNavigation.patchMinicalendar();\r\n\t\t\t}else{\r\n\t\t\t\t// otherwise - wait until everything is loaded and try again\r\n\t\t\t\tvar attachOnce = scheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\t\t\t\tscheduler.detachEvent(attachOnce);\r\n\t\t\t\t\tscheduler.$keyboardNavigation.patchMinicalendar();\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\tfunction isSchedulerSelected(){\r\n\t\t\t\tif(!scheduler.config.key_nav) return;\r\n\r\n\t\t\t\tvar enable;\r\n\t\t\t\tvar focusElement = document.activeElement;\r\n\t\t\t\t// halt key nav when focus is outside scheduler or in quick info popup\r\n\t\t\t\tif(!focusElement || scheduler.utils.dom.locateCss(focusElement, \"dhx_cal_quick_info\", false)){\r\n\t\t\t\t\tenable = false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tenable = scheduler.$keyboardNavigation.isChildOf(focusElement, scheduler.$container) || scheduler.$keyboardNavigation.isMinical(focusElement);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn enable;\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\tfunction changeState(enable){\r\n\t\t\t\tif(enable && !dispatcher.isEnabled()){\r\n\t\t\t\t\tdispatcher.enable();\r\n\t\t\t\t}else if(!enable && dispatcher.isEnabled()){\r\n\t\t\t\t\tdispatcher.disable();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tconst intervalId = setInterval(function(){\r\n\t\t\t\tif(!scheduler.$container || !scheduler.$keyboardNavigation.isChildOf(scheduler.$container, document.body)){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar enable = isSchedulerSelected();\r\n\r\n\t\t\t\tif(enable){\r\n\t\t\t\t\tchangeState(enable);\r\n\t\t\t\t}else if(!enable && dispatcher.isEnabled()){\r\n\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// doublecheck in case checking is done in handler before focus element is repainted\r\n\t\t\t\t\t\tif(scheduler.config.key_nav){\r\n\t\t\t\t\t\t\tchangeState(isSchedulerSelected());\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tscheduler.$container.removeAttribute(\"tabindex\");\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}, 100);\r\n\t\t\t\t}\r\n\t\t\t}, 500);\r\n\t\t\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\t\t\tclearInterval(intervalId);\r\n\t\t\t});\r\n\t\t})();\r\n\t}\r\n\r\n\r\n","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.shortcuts = {\r\n\tcreateCommand: function(){\r\n\t\treturn {\r\n\t\t\tmodifiers:{\r\n\t\t\t\t\"shift\": false,\r\n\t\t\t\t\"alt\": false,\r\n\t\t\t\t\"ctrl\": false,\r\n\t\t\t\t\"meta\": false\r\n\t\t\t},\r\n\t\t\tkeyCode: null\r\n\t\t};\r\n\t},\r\n\tparse: function(shortcut){\r\n\t\tvar commands = [];\r\n\r\n\t\tvar expr = this.getExpressions(this.trim(shortcut));\r\n\t\tfor(var i = 0; i < expr.length; i++){\r\n\t\t\tvar words = this.getWords(expr[i]);\r\n\r\n\t\t\tvar command = this.createCommand();\r\n\r\n\t\t\tfor(var j = 0; j < words.length; j++){\r\n\t\t\t\tif(this.commandKeys[words[j]]){\r\n\t\t\t\t\tcommand.modifiers[words[j]] = true;\r\n\t\t\t\t}else if(this.specialKeys[words[j]]){\r\n\t\t\t\t\tcommand.keyCode = this.specialKeys[words[j]];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcommand.keyCode = words[j].charCodeAt(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tcommands.push(command);\r\n\t\t}\r\n\t\treturn commands;\r\n\t},\r\n\r\n\tgetCommandFromEvent: function(domEvent){\r\n\t\tvar command = this.createCommand();\r\n\t\tcommand.modifiers.shift = !!domEvent.shiftKey;\r\n\t\tcommand.modifiers.alt = !!domEvent.altKey;\r\n\t\tcommand.modifiers.ctrl = !!domEvent.ctrlKey;\r\n\t\tcommand.modifiers.meta = !!domEvent.metaKey;\r\n\t\tcommand.keyCode = domEvent.which || domEvent.keyCode;\r\n\r\n\t\tif(command.keyCode >= 96 && command.keyCode <= 105){\r\n\t\t\t// numpad keys 96-105 -> 48-57\r\n\t\t\tcommand.keyCode -= 48;//convert numpad number code to regular number code\r\n\t\t}\r\n\r\n\t\tvar printableKey = String.fromCharCode(command.keyCode );\r\n\t\tif(printableKey){\r\n\t\t\tcommand.keyCode = printableKey.toLowerCase().charCodeAt(0);\r\n\t\t}\r\n\t\treturn command;\r\n\t},\r\n\r\n\tgetHashFromEvent: function(domEvent){\r\n\t\treturn this.getHash(this.getCommandFromEvent(domEvent));\r\n\t},\r\n\r\n\tgetHash: function(command){\r\n\t\tvar parts = [];\r\n\t\tfor(var i in command.modifiers){\r\n\t\t\tif(command.modifiers[i]){\r\n\t\t\t\tparts.push(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tparts.push(command.keyCode);\r\n\r\n\t\treturn parts.join(this.junctionChar);\r\n\t},\r\n\r\n\tgetExpressions: function(shortcut){\r\n\t\treturn shortcut.split(this.junctionChar);\r\n\t},\r\n\tgetWords: function(term){\r\n\t\treturn term.split(this.combinationChar);\r\n\t},\r\n\ttrim: function(shortcut){\r\n\t\treturn shortcut.replace(/\\s/g, \"\");\r\n\t},\r\n\tjunctionChar:\",\",\r\n\tcombinationChar:\"+\",\r\n\tcommandKeys:{\r\n\t\t\"shift\": 16,\r\n\t\t\"alt\": 18,\r\n\t\t\"ctrl\": 17,\r\n\t\t\"meta\": true\r\n\t},\r\n\tspecialKeys:{\r\n\t\t\"backspace\": 8,\r\n\t\t\"tab\": 9,\r\n\t\t\"enter\": 13,\r\n\t\t\"esc\": 27,\r\n\t\t\"space\": 32,\r\n\t\t\"up\": 38,\r\n\t\t\"down\": 40,\r\n\t\t\"left\": 37,\r\n\t\t\"right\": 39,\r\n\t\t\"home\": 36,\r\n\t\t\"end\": 35,\r\n\t\t\"pageup\": 33,\r\n\t\t\"pagedown\": 34,\r\n\t\t\"delete\": 46,\r\n\t\t\"insert\": 45,\r\n\t\t\"plus\":107,\r\n\t\t\"f1\": 112,\r\n\t\t\"f2\": 113,\r\n\t\t\"f3\": 114,\r\n\t\t\"f4\": 115,\r\n\t\t\"f5\": 116,\r\n\t\t\"f6\": 117,\r\n\t\t\"f7\": 118,\r\n\t\t\"f8\": 119,\r\n\t\t\"f9\": 120,\r\n\t\t\"f10\": 121,\r\n\t\t\"f11\": 122,\r\n\t\t\"f12\": 123\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.EventHandler = {\r\n\t_handlers: null,\r\n\tfindHandler: function(command){\r\n\t\tif(!this._handlers) this._handlers = {};\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\t\tvar hash = shortcuts.getHash(command);\r\n\r\n\t\treturn this._handlers[hash];\r\n\t},\r\n\r\n\tdoAction: function(command, e){\r\n\t\tvar handler = this.findHandler(command);\r\n\t\tif(handler){\r\n\t\t\thandler.call(this, e);\r\n\r\n\t\t\tif (e.preventDefault) e.preventDefault();\r\n\t\t\telse e.returnValue = false;\r\n\r\n\t\t}\r\n\t},\r\n\tbind: function(shortcut, handler){\r\n\t\tif(!this._handlers) this._handlers = {};\r\n\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\r\n\t\tvar commands = shortcuts.parse(shortcut);\r\n\t\tfor(var i = 0; i < commands.length; i++){\r\n\t\t\tthis._handlers[shortcuts.getHash(commands[i])] = handler;\r\n\t\t}\r\n\t},\r\n\tunbind: function(shortcut){\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\r\n\t\tvar commands = shortcuts.parse(shortcut);\r\n\t\tfor(var i = 0; i < commands.length; i++){\r\n\t\t\tif(this._handlers[shortcuts.getHash(commands[i])]){\r\n\t\t\t\tdelete this._handlers[shortcuts.getHash(commands[i])];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tbindAll: function(map){\r\n\t\tfor(var i in map){\r\n\t\t\tthis.bind(i, map[i]);\r\n\t\t}\r\n\t},\r\n\tinitKeys: function(){\r\n\t\tif(!this._handlers)\r\n\t\t\tthis._handlers = {};\r\n\t\tif(this.keys){\r\n\t\t\tthis.bindAll(this.keys);\r\n\t\t}\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n(function(){\r\n\tscheduler.$keyboardNavigation.getFocusableNodes = scheduler._getFocusableNodes;\r\n\r\n\tscheduler.$keyboardNavigation.trapFocus = function trapFocus(root, e){\r\n\t\tif(e.keyCode != 9) return false;\r\n\r\n\t\tvar focusable = scheduler.$keyboardNavigation.getFocusableNodes(root);\r\n\t\tvar currentFocus = document.activeElement;\r\n\t\tvar currentIndex = -1;\r\n\t\tfor(var i = 0; i < focusable.length; i++){\r\n\t\t\tif(focusable[i] == currentFocus){\r\n\t\t\t\tcurrentIndex = i;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar nextIndex, nextItem;\r\n\t\tif(e.shiftKey){\r\n\r\n\t\t\t// back tab\r\n\t\t\t// go to the last element if we focused on the first\r\n\t\t\tnextIndex = (currentIndex <= 0) ? (focusable.length - 1) : (currentIndex - 1);\r\n\r\n\t\t\tnextItem = focusable[nextIndex];\r\n\t\t\tif(nextItem){\r\n\t\t\t\tnextItem.focus();\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\t// forward tab\r\n\t\t\t// forward tab from last element should go back to the first element\r\n\t\t\tnextIndex = (currentIndex >= focusable.length - 1) ? 0 : (currentIndex + 1);\r\n\t\t\tnextItem = focusable[nextIndex];\r\n\t\t\tif(nextItem){\r\n\t\t\t\tnextItem.focus();\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t};\r\n})();\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.marker = {\r\n\tclear: function(){\r\n\t\tvar divs = scheduler.$container.querySelectorAll(\".dhx_focus_slot\");\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tdivs[i].parentNode.removeChild(divs[i]);\r\n\t\t}\r\n\t},\r\n\tcreateElement: function(){\r\n\t\tvar element = document.createElement(\"div\");\r\n\t\telement.setAttribute(\"tabindex\", -1);\r\n\t\telement.className = \"dhx_focus_slot\";\r\n\t\treturn element;\r\n\t},\r\n\r\n\trenderMultiple: function(start, end, method){\r\n\t\tvar divs = [];\r\n\t\tvar currentStart = new Date(start);\r\n\t\tvar currentEnd = new Date(Math.min(end.valueOf(), scheduler.date.add(scheduler.date.day_start(new Date(start)), 1, \"day\").valueOf()));\r\n\t\twhile(currentStart.valueOf() < end.valueOf()){\r\n\r\n\t\t\tdivs = divs.concat(method.call(this, currentStart, new Date(Math.min(currentEnd.valueOf(), end.valueOf()))));\r\n\t\t\tcurrentStart = scheduler.date.day_start(scheduler.date.add(currentStart, 1, \"day\"));\r\n\r\n\t\t\tcurrentEnd = scheduler.date.day_start(scheduler.date.add(currentStart, 1, \"day\"));\r\n\t\t\tcurrentEnd = new Date(Math.min(currentEnd.valueOf(), end.valueOf()));\r\n\t\t}\r\n\r\n\t\treturn divs;\r\n\t},\r\n\r\n\r\n\trender: function(start, end, section){\r\n\t\tthis.clear();\r\n\t\tvar divs = [];\r\n\r\n\t\tvar modes = scheduler.$keyboardNavigation.TimeSlot.prototype._modes;\r\n\t\tvar view = scheduler.$keyboardNavigation.TimeSlot.prototype._getMode();\r\n\t\tswitch (view){\r\n\t\t\tcase modes.units:\r\n\t\t\t\tdivs = this.renderVerticalMarker(start, end, section);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.timeline:\r\n\t\t\t\tdivs = this.renderTimelineMarker(start, end, section);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.year:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderYearMarker));\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.month:\r\n\t\t\t\tdivs = this.renderMonthMarker(start, end);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.weekAgenda:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderWeekAgendaMarker));\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.list:\r\n\t\t\t\tdivs = this.renderAgendaMarker(start, end);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.dayColumns:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderVerticalMarker));\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tthis.addWaiAriaLabel(divs, start, end, section);\r\n\t\tthis.addDataAttributes(divs, start, end, section);\r\n\r\n\t\tfor(var i = divs.length - 1; i >= 0; i--){\r\n\t\t\tif(divs[i].offsetWidth){\r\n\t\t\t\treturn divs[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t},\r\n\r\n\taddDataAttributes: function(divs, start, end, section){\r\n\t\tvar dateToStr = scheduler.date.date_to_str(scheduler.config.api_date);\r\n\r\n\t\tvar from = dateToStr(start),\r\n\t\t\tto = dateToStr(end);\r\n\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tdivs[i].setAttribute(\"data-start-date\", from);\r\n\t\t\tdivs[i].setAttribute(\"data-end-date\", to);\r\n\t\t\tif(section){\r\n\t\t\t\tdivs[i].setAttribute(\"data-section\", section);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\taddWaiAriaLabel: function(divs, start, end, section){\r\n\t\tvar label = \"\";\r\n\t\tvar state = scheduler.getState();\r\n\t\tvar mode = state.mode;\r\n\r\n\t\tvar dateTimeLabel = false;\r\n\r\n\t\tlabel += scheduler.templates.day_date(start);\r\n\r\n\t\tif((scheduler.date.day_start(new Date(start)).valueOf() != start.valueOf())){\r\n\t\t\tlabel += \" \" + scheduler.templates.hour_scale(start);\r\n\t\t\tdateTimeLabel = true;\r\n\t\t}\r\n\r\n\t\tif((scheduler.date.day_start(new Date(start)).valueOf() != scheduler.date.day_start(new Date(end)).valueOf())){\r\n\r\n\t\t\tlabel += \" - \" + scheduler.templates.day_date(end);\r\n\t\t\tif(dateTimeLabel || (scheduler.date.day_start(new Date(end)).valueOf() != end.valueOf())){\r\n\t\t\t\tlabel += \" \" + scheduler.templates.hour_scale(end);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(section){\r\n\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\t\t\t\tconst timeline = scheduler.matrix[mode];\r\n\t\t\t\tconst sectionObject = timeline.y_unit[timeline.order[section]];\r\n\t\t\t\tlabel += \", \" + scheduler.templates[mode + \"_scale_label\"](sectionObject.key, sectionObject.label, sectionObject);\r\n\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\tconst units = scheduler._props[mode];\r\n\t\t\t\tconst sectionObject = units.options[units.order[section]];\r\n\r\n\t\t\t\tlabel += \", \" + scheduler.templates[mode + \"_scale_text\"](sectionObject.key, sectionObject.label, sectionObject);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tscheduler._waiAria.setAttributes(divs[i], {\r\n\t\t\t\t\"aria-label\": label,\r\n\t\t\t\t\"aria-live\": \"polite\"\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\r\n\trenderWeekAgendaMarker: function(start_date, end_date){\r\n\t\tvar divs = scheduler.$container.querySelectorAll(\".dhx_wa_day_cont .dhx_wa_scale_bar\");\r\n\r\n\t\tvar currDate = scheduler.date.week_start(new Date(scheduler.getState().min_date));\r\n\r\n\t\tvar index = -1;\r\n\t\tvar markerDate = scheduler.date.day_start(new Date(start_date));\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tindex++;\r\n\t\t\tif(scheduler.date.day_start(new Date(currDate)).valueOf() == markerDate.valueOf()){\r\n\t\t\t\tbreak;\r\n\t\t\t}else{\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(index != -1) return this._wrapDiv(divs[index]);\r\n\t\treturn [];\r\n\t},\r\n\r\n\t_wrapDiv: function(cell){\r\n\t\tvar marker = this.createElement();\r\n\t\tmarker.style.top = cell.offsetTop + \"px\";\r\n\t\tmarker.style.left = cell.offsetLeft + \"px\";\r\n\t\tmarker.style.width = cell.offsetWidth + \"px\";\r\n\t\tmarker.style.height = cell.offsetHeight + \"px\";\r\n\t\tcell.appendChild(marker);\r\n\t\treturn [marker];\r\n\t},\r\n\trenderYearMarker: function(start_date, end_date){\r\n\t\tvar cell = scheduler._get_year_cell(start_date);\r\n\t\tcell.style.position = \"relative\";\r\n\t\tvar marker = this.createElement();\r\n\t\tmarker.style.top = \"0px\";\r\n\t\tmarker.style.left = \"0px\";\r\n\t\tmarker.style.width = \"100%\";\r\n\t\tmarker.style.height = \"100%\";\r\n\t\tcell.appendChild(marker);\r\n\t\treturn [marker];\r\n\t},\r\n\r\n\trenderAgendaMarker: function(start_date, end_date){\r\n\t\tvar block = this.createElement();\r\n\t\tblock.style.height = \"1px\";\r\n\t\tblock.style.width = \"100%\";\r\n\t\tblock.style.opacity = 1;\r\n\t\tblock.style.top = \"0px\";\r\n\t\tblock.style.left = \"0px\";\r\n\t\tscheduler.$container.querySelector(\".dhx_cal_data\").appendChild(block);\r\n\t\treturn [block];\r\n\t},\r\n\r\n\trenderTimelineMarker: function(start_date, end_date, section){\r\n\t\tvar view_opts = scheduler._lame_copy({}, scheduler.matrix[scheduler._mode]);\r\n\t\tvar areas = view_opts._scales;\r\n\t\t//timespans must always use actual position, not rounded\r\n\t\tview_opts.round_position = false;\r\n\t\tvar blocks = [];\r\n\r\n\t\tvar min_date = start_date ? new Date(start_date) : scheduler._min_date;\r\n\t\tvar max_date = end_date ? new Date(end_date) : scheduler._max_date;\r\n\r\n\t\tif(min_date.valueOf() < scheduler._min_date.valueOf())\r\n\t\t\tmin_date = new Date(scheduler._min_date);\r\n\t\tif(max_date.valueOf() > scheduler._max_date.valueOf())\r\n\t\t\tmax_date = new Date(scheduler._max_date);\r\n\r\n\t\tif(!view_opts._trace_x) return blocks;\r\n\r\n\t\tfor(var i = 0; i < view_opts._trace_x.length; i++){\r\n\t\t\tif(scheduler._is_column_visible(view_opts._trace_x[i]))\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\tif(i == view_opts._trace_x.length)\r\n\t\t\treturn blocks;\r\n\r\n\t\tvar area = areas[section];\r\n\r\n\t\tif (!(min_date < end_date && max_date > start_date))\r\n\t\t\treturn blocks;\r\n\r\n\t\tvar block = this.createElement();\r\n\r\n\t\tlet start_pos;\r\n\t\tlet end_pos;\r\n\r\n\t\tfunction set_date_part(source, target) {\r\n\t\t\t// reset to start of the month in order to prevent month change when target is on 31th day, and source month has only 30 days\r\n\t\t\ttarget.setDate(1);\r\n\r\n\t\t\ttarget.setFullYear(source.getFullYear());\r\n\t\t\ttarget.setMonth(source.getMonth());\r\n\t\t\ttarget.setDate(source.getDate());\r\n\t\t}\r\n\r\n\t\tif(!scheduler.getView().days){\r\n\t\t\tstart_pos = scheduler._timeline_getX({start_date: start_date}, false, view_opts);\r\n\t\t\tend_pos = scheduler._timeline_getX({start_date: end_date}, false, view_opts);\r\n\t\t}else{\r\n\t\t\t// daytimeline\r\n\t\t\tconst tempStart = new Date(start_date);\r\n\t\t\tset_date_part(scheduler._min_date, tempStart);\r\n\t\t\tconst tempEnd = new Date(end_date);\r\n\t\t\tset_date_part(scheduler._min_date, tempEnd);\r\n\t\t\tstart_pos = scheduler._timeline_getX({start_date: tempStart}, false, view_opts);\r\n\t\t\tend_pos = scheduler._timeline_getX({start_date: tempEnd}, false, view_opts);\r\n\t\t}\r\n\r\n\t\tvar height = ((view_opts._section_height[section]-1) || (view_opts.dy - 1));\r\n\r\n\t\tvar top = 0;\r\n\t\tif (scheduler._isRender('cell')){\r\n\t\t\ttop = area.offsetTop;\r\n\t\t\tstart_pos += view_opts.dx;\r\n\t\t\tend_pos += view_opts.dx;\r\n\t\t\tarea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t}else{\r\n\r\n\t\t}\r\n\t\tvar width = Math.max(1, end_pos - start_pos - 1);\r\n\t\tlet direction = \"left\";\r\n\t\tif(scheduler.config.rtl){\r\n\t\t\tdirection = \"right\";\r\n\t\t}\r\n\t\tblock.style.cssText = `height:${height}px; ${direction}:${start_pos}px; width:${width}px; top:${top}px;`;\r\n\r\n\t\tif(area){\r\n\t\t\tarea.appendChild(block);\r\n\t\t\tblocks.push(block);\r\n\t\t}\r\n\r\n\t\treturn blocks;\r\n\t},\r\n\r\n\trenderMonthCell: function(date){\r\n\t\tvar cells = scheduler.$container.querySelectorAll(\".dhx_month_head\");\r\n\r\n\t\tvar divs = [];\r\n\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\tdivs.push(cells[i].parentNode);\r\n\t\t}\r\n\r\n\t\tvar firstDate = scheduler.date.week_start(new Date(scheduler.getState().min_date));\r\n\r\n\t\tvar index = -1;\r\n\t\tvar weekNumber = 0;\r\n\t\tvar dayIndex = -1;\r\n\t\tvar currDate = firstDate;\r\n\t\tvar markerDate = scheduler.date.day_start(new Date(date));\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tindex++;\r\n\r\n\t\t\tif(dayIndex == 6){\r\n\t\t\t\tweekNumber++;\r\n\t\t\t\tdayIndex = 0;\r\n\t\t\t}else{\r\n\t\t\t\tdayIndex++;\r\n\t\t\t}\r\n\r\n\t\t\tif(scheduler.date.day_start(new Date(currDate)).valueOf() == markerDate.valueOf()){\r\n\t\t\t\tbreak;\r\n\t\t\t}else{\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(index == -1){\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tvar left = scheduler._colsS[dayIndex];\r\n\t\tvar top = scheduler._colsS.heights[weekNumber];\r\n\r\n\t\tvar div = this.createElement();\r\n\t\tdiv.style.top = top + \"px\";\r\n\t\tdiv.style.left = left + \"px\";\r\n\t\tdiv.style.width = scheduler._cols[dayIndex] + \"px\";\r\n\t\tdiv.style.height = ((scheduler._colsS.heights[weekNumber + 1] - top) || scheduler._colsS.height) + \"px\" ;\r\n\r\n\r\n\t\tvar container = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\r\n\t\tvar datatable = container.querySelector(\".dhx_cal_month_table\");\r\n\t\tif(datatable.nextSibling){\r\n\t\t\tcontainer.insertBefore(div, datatable.nextSibling);\r\n\t\t}else{\r\n\t\t\tcontainer.appendChild(div);\r\n\t\t}\r\n\t\treturn div;\r\n\t},\r\n\trenderMonthMarker: function(start_date, end_date){\r\n\t\tvar res = [];\r\n\t\tvar currentDate = start_date;\r\n\t\twhile(currentDate.valueOf() < end_date.valueOf()){\r\n\t\t\tres.push(this.renderMonthCell(currentDate));\r\n\t\t\tcurrentDate = scheduler.date.add(currentDate, 1, \"day\");\r\n\t\t}\r\n\t\treturn res;\r\n\t},\r\n\r\n\trenderVerticalMarker: function(start_date, end_date, section){\r\n\t\tvar index = scheduler.locate_holder_day(start_date);\r\n\r\n\t\tvar divs = [];\r\n\t\tvar area = null;\r\n\r\n\t\tvar c = scheduler.config;\r\n\t\tif(scheduler._ignores[index]) return divs;\r\n\r\n\t\tif (scheduler._props && scheduler._props[scheduler._mode] && section) {\r\n\t\t\tvar view = scheduler._props[scheduler._mode];\r\n\t\t\tindex = view.order[section];\r\n\r\n\t\t\tvar inner_index = view.order[section];\r\n\t\t\tif(!(view.days > 1)){\r\n\t\t\t\tindex = inner_index;\r\n\t\t\t\tif (view.size && (index > view.position+view.size)) {\r\n\t\t\t\t\tindex = 0;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t//var units_l = view.size || view.options.length;\r\n\r\n\t\t\t\tindex = scheduler.locate_holder_day(start_date) + inner_index;\r\n\t\t\t\t//index = index*units_l + inner_index;\r\n\t\t\t}\r\n\t\t}\r\n\t\tarea = scheduler.locate_holder(index);\r\n\t\tif(!area || area.querySelector(\".dhx_scale_hour\")){\r\n\t\t\t// hour scale instead of date column\r\n\t\t\treturn document.createElement(\"div\");\r\n\t\t}\r\n\r\n\t\tvar start = Math.max((start_date.getHours()*60 + start_date.getMinutes()), c.first_hour*60);\r\n\r\n\r\n\t\tvar end = Math.min((end_date.getHours()*60 + end_date.getMinutes()), c.last_hour*60);\r\n\t\tif(!end && (scheduler.date.day_start(new Date(end_date)).valueOf() > scheduler.date.day_start(new Date(start_date)).valueOf())){\r\n\t\t\tend = c.last_hour*60;\r\n\t\t}\r\n\r\n\t\tif (end <= start) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tvar block = this.createElement();\r\n\r\n\t\t// +1 for working with section which really takes up whole height (as % would be == 0)\r\n\t\tvar all_hours_height = scheduler.config.hour_size_px*c.last_hour + 1;\r\n\t\tvar hour_ms = 60*60*1000;\r\n\t\tblock.style.top = (Math.round((start*60*1000-scheduler.config.first_hour*hour_ms)*scheduler.config.hour_size_px/hour_ms) % all_hours_height) + \"px\";\r\n\t\tblock.style.lineHeight = block.style.height = Math.max((Math.round(((end-start)*60*1000)*scheduler.config.hour_size_px/hour_ms)) % all_hours_height, 1)+\"px\";\r\n\t\tblock.style.width = \"100%\";\r\n\t\tarea.appendChild(block);\r\n\t\tdivs.push(block);\r\n\t\treturn divs[0];\r\n\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode = function(){};\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.EventHandler,\r\n\t{\r\n\t\tgetDefaultNode: function(){\r\n\t\t\tvar node = new scheduler.$keyboardNavigation.TimeSlot();\r\n\r\n\t\t\tif(!node.isValid()){\r\n\t\t\t\tnode = node.fallback();\r\n\t\t\t}\r\n\t\t\treturn node;\r\n\t\t},\r\n\r\n\t\t_modes:{\r\n\t\t\tmonth: \"month\",\r\n\t\t\tyear: \"year\",\r\n\t\t\tdayColumns: \"dayColumns\",\r\n\t\t\ttimeline:\"timeline\",\r\n\t\t\tunits:\"units\",\r\n\t\t\tweekAgenda: \"weekAgenda\",\r\n\t\t\tlist: \"list\"\r\n\t\t},\r\n\t\tgetMode: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tvar mode = state.mode;\r\n\t\t\tif((scheduler.matrix && scheduler.matrix[mode])){\r\n\t\t\t\treturn this._modes.timeline;\r\n\t\t\t} else if((scheduler._props && scheduler._props[mode])){\r\n\t\t\t\treturn this._modes.units;\r\n\t\t\t}else if(mode == \"month\"){\r\n\t\t\t\treturn this._modes.month;\r\n\t\t\t}else if(mode == \"year\"){\r\n\t\t\t\treturn this._modes.year;\r\n\t\t\t}else if(mode == \"week_agenda\"){\r\n\t\t\t\treturn this._modes.weekAgenda;\r\n\t\t\t}else if(mode == \"map\" || mode == \"agenda\" || (scheduler._grid && scheduler[\"grid_\" + mode])){\r\n\t\t\t\treturn this._modes.list;\r\n\t\t\t}else{\r\n\t\t\t\treturn this._modes.dayColumns;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.focus();\r\n\t\t},\r\n\r\n\t\tblur: function(){\r\n\r\n\t\t},\r\n\r\n\t\tdisable: function(){\r\n\t\t\tscheduler.$container.setAttribute(\"tabindex\", \"0\");\r\n\t\t},\r\n\t\tenable: function(){\r\n\t\t\tif(scheduler.$container)\r\n\t\t\t\tscheduler.$container.removeAttribute(\"tabindex\");\r\n\t\t},\r\n\t\tisEnabled: function(){\r\n\t\t\treturn scheduler.$container.hasAttribute(\"tabindex\");\r\n\t\t},\r\n\r\n\r\n\t\t_compareEvents: function(a, b){\r\n\t\t\tif (a.start_date.valueOf() == b.start_date.valueOf())\r\n\t\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\t\treturn a.start_date.valueOf() > b.start_date.valueOf() ? 1 : -1;\r\n\t\t},\r\n\r\n\t\t_pickEvent: function(from, to, startId, reverse){\r\n\t\t\tvar range = scheduler.getState();\r\n\t\t\tfrom = new Date(Math.max(range.min_date.valueOf(), from.valueOf()));\r\n\t\t\tto = new Date(Math.min(range.max_date.valueOf(), to.valueOf()));\r\n\r\n\t\t\tvar evs = scheduler.getEvents(from, to);\r\n\t\t\tevs.sort(this._compareEvents);\r\n\t\t\tif(reverse){\r\n\t\t\t\tevs = evs.reverse();\r\n\t\t\t}\r\n\r\n\t\t\tvar trim = !!startId;\r\n\t\t\tfor(var i =0; i < evs.length && trim; i++){\r\n\t\t\t\tif(evs[i].id == startId){\r\n\t\t\t\t\ttrim = false;\r\n\t\t\t\t}\r\n\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\r\n\t\t\tfor(var i = 0; i < evs.length; i++){\r\n\t\t\t\tvar eventElement = new scheduler.$keyboardNavigation.Event(evs[i].id);\r\n\t\t\t\tif(eventElement.getNode())\r\n\t\t\t\t\treturn evs[i];\r\n\t\t\t}\r\n\r\n\t\t\treturn null;\r\n\t\t},\r\n\r\n\t\tnextEventHandler: function(id){\r\n\t\t\tvar activeNode = scheduler.$keyboardNavigation.dispatcher.activeNode;\r\n\r\n\t\t\tvar startId = id || (activeNode && activeNode.eventId);\r\n\r\n\t\t\tvar nextEvent = null;\r\n\t\t\tif(startId && scheduler.getEvent(startId)){\r\n\t\t\t\tvar currEvent = scheduler.getEvent(startId);\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tcurrEvent.start_date,\r\n\t\t\t\t\tscheduler.date.add(currEvent.start_date, 1, \"year\"),\r\n\t\t\t\t\tcurrEvent.id,\r\n\t\t\t\t\tfalse\r\n\t\t\t\t);\r\n\r\n\t\t\t}\r\n\t\t\tif(!nextEvent && !id){\r\n\t\t\t\tvar visibleDates = scheduler.getState();\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tvisibleDates.min_date,\r\n\t\t\t\t\tscheduler.date.add(visibleDates.min_date, 1, \"year\"),\r\n\t\t\t\t\tnull,\r\n\t\t\t\t\tfalse\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tif(nextEvent){\r\n\r\n\t\t\t\tvar nextEv = new scheduler.$keyboardNavigation.Event(nextEvent.id);\r\n\t\t\t\tif(!nextEv.isValid()){// not visible event\r\n\t\t\t\t\tthis.nextEventHandler(nextEvent.id);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(activeNode){activeNode.blur();}\r\n\t\t\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(nextEv);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tprevEventHandler: function(id){\r\n\t\t\tvar activeNode = scheduler.$keyboardNavigation.dispatcher.activeNode;\r\n\r\n\t\t\tvar startId = id || (activeNode && activeNode.eventId);\r\n\r\n\t\t\tvar nextEvent = null;\r\n\t\t\tif(startId && scheduler.getEvent(startId)){\r\n\t\t\t\tvar currEvent = scheduler.getEvent(startId);\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tscheduler.date.add(currEvent.end_date, -1, \"year\"),\r\n\t\t\t\t\tcurrEvent.end_date,\r\n\t\t\t\t\tcurrEvent.id,\r\n\t\t\t\t\ttrue\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t\tif(!nextEvent && !id){\r\n\t\t\t\tvar visibleDates = scheduler.getState();\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tscheduler.date.add(visibleDates.max_date, -1, \"year\"),\r\n\t\t\t\t\tvisibleDates.max_date,\r\n\t\t\t\t\tnull,\r\n\t\t\t\t\ttrue\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tif(nextEvent){\r\n\t\t\t\tvar nextEv = new scheduler.$keyboardNavigation.Event(nextEvent.id);\r\n\t\t\t\tif(!nextEv.isValid()){// not visible event\r\n\t\t\t\t\tthis.prevEventHandler(nextEvent.id);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(activeNode){activeNode.blur();}\r\n\t\t\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(nextEv);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\r\n\t\t\t\"alt+1, alt+2, alt+3, alt+4, alt+5, alt+6, alt+7, alt+8, alt+9\": function(e){\r\n\t\t\t\tvar tabs = scheduler.$keyboardNavigation.HeaderCell.prototype.getNodes(\".dhx_cal_navline .dhx_cal_tab\");\r\n\t\t\t\tvar key = e.key;\r\n\t\t\t\tif(key === undefined){\r\n\t\t\t\t\tkey = e.keyCode - 48;\r\n\t\t\t\t}\r\n\t\t\t\tif(tabs[key*1 - 1]){\r\n\t\t\t\t\ttabs[key*1 - 1].click();\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+left,meta+left\": function(e){\r\n\t\t\t\tscheduler._click.dhx_cal_prev_button();\r\n\t\t\t},\r\n\t\t\t\"ctrl+right,meta+right\": function(e){\r\n\t\t\t\tscheduler._click.dhx_cal_next_button();\r\n\t\t\t},\r\n\t\t\t\"ctrl+up,meta+up\":function(e){\r\n\t\t\t\tvar dataArea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tdataArea.scrollTop -= 20;\r\n\t\t\t},\r\n\t\t\t\"ctrl+down,meta+down\": function(e){\r\n\t\t\t\tvar dataArea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tdataArea.scrollTop += 20;\r\n\t\t\t},\r\n\r\n\r\n\t\t\t\"e\": function(){\r\n\t\t\t\tthis.nextEventHandler();\r\n\t\t\t},\r\n\r\n\t\t\t\"home\": function(){\r\n\t\t\t\tscheduler.setCurrentView(new Date());\r\n\t\t\t},\r\n\r\n\t\t\t\"shift+e\": function(){\r\n\t\t\t\tthis.prevEventHandler();\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+enter,meta+enter\": function(){\r\n\t\t\t\tscheduler.addEventNow({start_date: new Date(scheduler.getState().date)});\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+c,meta+c\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t},\r\n\t\t\t\"ctrl+v,meta+v\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t},\r\n\t\t\t\"ctrl+x,meta+x\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode.prototype.bindAll(scheduler.$keyboardNavigation.SchedulerNode.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.KeyNavNode = function(){};\r\n\r\nscheduler.$keyboardNavigation.KeyNavNode.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.EventHandler,\r\n\t{\r\n\t\tisValid: function(){\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\treturn null;\r\n\t\t},\r\n\r\n\t\tmoveTo: function (element) {\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(element);\r\n\t\t},\r\n\r\n\t\tcompareTo: function(b){\r\n\t\t\t// good enough comparison of two random objects\r\n\t\t\tif(!b) return false;\r\n\t\t\tfor(var i in this){\r\n\t\t\t\tif(!!this[i] != !!b[i]) return false;\r\n\r\n\t\t\t\tvar canStringifyThis = !!(this[i] && this[i].toString);\r\n\t\t\t\tvar canStringifyThat = !!(b[i] && b[i].toString);\r\n\t\t\t\tif(canStringifyThat != canStringifyThis) return false;\r\n\t\t\t\tif(!(canStringifyThat && canStringifyThis)) {\r\n\t\t\t\t\tif(b[i] != this[i]) return false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(b[i].toString() != this[i].toString())\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\r\n\t\tgetNode: function(){},\r\n\t\tfocus: function(){\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif(node){\r\n\t\t\t\tnode.setAttribute(\"tabindex\", \"-1\");\r\n\t\t\t\t//node.className += \" scheduler_focused\";\r\n\t\t\t\tif(node.focus) node.focus();\r\n\t\t\t}\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif(node){\r\n\t\t\t\tnode.setAttribute(\"tabindex\", \"-1\");\r\n\t\t\t\t//node.className = (node.className || \"\").replace(/ ?scheduler_focused/g, \"\");\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.HeaderCell = function(index){\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.HeaderCell.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\tgetNode: function(index){\r\n\t\t\tindex = index || this.index || 0;\r\n\t\t\tvar nodes = this.getNodes();\r\n\t\t\tif(nodes[index]) return nodes[index];\r\n\t\t},\r\n\r\n\t\tgetNodes: function(selector){\r\n\t\t\tselector = selector || [\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_prev_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_next_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_today_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_tab\"\r\n\t\t\t\t].join(\", \");\r\n\r\n\t\t\tvar nodes = Array.prototype.slice.call(scheduler.$container.querySelectorAll(selector));\r\n\t\t\tnodes.sort(function(a, b){\r\n\t\t\t\treturn a.offsetLeft - b.offsetLeft;\r\n\t\t\t});\r\n\t\t\treturn nodes;\r\n\t\t},\r\n\r\n\t\t_handlers:null,\r\n\r\n\t\tisValid: function(){\r\n\t\t\treturn !!this.getNode(this.index);\r\n\t\t},\r\n\t\tfallback:function(){\r\n\t\t\tvar defaultCell = this.getNode(0);\r\n\t\t\tif(!defaultCell){\r\n\t\t\t\tdefaultCell = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}\r\n\t\t\treturn defaultCell;\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tvar newIndex = this.index - 1;\r\n\t\t\t\tif(newIndex < 0){\r\n\t\t\t\t\tnewIndex = this.getNodes().length - 1;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.HeaderCell(newIndex));\r\n\r\n\t\t\t},\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tvar newIndex = this.index + 1;\r\n\t\t\t\tif(newIndex >= this.getNodes().length){\r\n\t\t\t\t\tnewIndex = 0;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.HeaderCell(newIndex));\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t},\r\n\r\n\t\t\t\"enter\": function(){\r\n\t\t\t\tvar node = this.getNode();\r\n\t\t\t\tif(node){\r\n\t\t\t\t\tnode.click();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.HeaderCell.prototype.bindAll(scheduler.$keyboardNavigation.HeaderCell.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.Event = function(id){\r\n\tthis.eventId = null;\r\n\tif(scheduler.getEvent(id)){\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tthis.start = new Date(ev.start_date);\r\n\t\tthis.end = new Date(ev.end_date);\r\n\r\n\t\tthis.section = this._getSection(ev);\r\n\t\tthis.eventId = id;\r\n\t}\r\n};\r\n\r\nscheduler.$keyboardNavigation.Event.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\t_getNodes: function(){\r\n\t\t\treturn Array.prototype.slice.call(scheduler.$container.querySelectorAll(\"[\"+scheduler.config.event_attribute+\"]\"));\r\n\t\t},\r\n\r\n\t\t_modes: scheduler.$keyboardNavigation.SchedulerNode.prototype._modes,\r\n\r\n\t\tgetMode: scheduler.$keyboardNavigation.SchedulerNode.prototype.getMode,\r\n\r\n\t\t_handlers: null,\r\n\t\tisValid: function(){\r\n\t\t\treturn !!(scheduler.getEvent(this.eventId) && this.getNode());\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\tvar eventNode = this._getNodes()[0];\r\n\t\t\tvar defaultElement = null;\r\n\t\t\tif(!eventNode || !(scheduler._locate_event(eventNode))){\r\n\t\t\t\tdefaultElement = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}else{\r\n\t\t\t\tvar id = scheduler._locate_event(eventNode);\r\n\t\t\t\tdefaultElement = new scheduler.$keyboardNavigation.Event(id);\r\n\t\t\t}\r\n\r\n\t\t\treturn defaultElement;\r\n\t\t},\r\n\r\n\t\tisScrolledIntoView: function (el) {\r\n\t\t\tvar eventBox = el.getBoundingClientRect();\r\n\t\t\tvar viewPort = scheduler.$container.querySelector(\".dhx_cal_data\").getBoundingClientRect();\r\n\t\t\t\r\n\t\t\tif(eventBox.bottom < viewPort.top || eventBox.top > viewPort.bottom){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\r\n\t\tgetNode: function(){\r\n\r\n\t\t\tvar idSelector = \"[\"+scheduler.config.event_attribute+\"='\"+this.eventId+\"']\";\r\n\r\n\t\t\tvar inlineEditor = scheduler.$keyboardNavigation.dispatcher.getInlineEditor(this.eventId);\r\n\t\t\tif(inlineEditor){// is inline editor visible\r\n\t\t\t\treturn inlineEditor;\r\n\t\t\t}else{\r\n\t\t\t\tif(scheduler.isMultisectionEvent && scheduler.isMultisectionEvent(scheduler.getEvent(this.eventId))){\r\n\t\t\t\t\tvar nodes = scheduler.$container.querySelectorAll(idSelector);\r\n\t\t\t\t\tfor(var i = 0; i < nodes.length; i++){\r\n\t\t\t\t\t\tif(this.isScrolledIntoView(nodes[i])){\r\n\t\t\t\t\t\t\treturn nodes[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn nodes[0];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn scheduler.$container.querySelector(idSelector);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tvar event = scheduler.getEvent(this.eventId);\r\n\r\n\t\t\tvar calendar = scheduler.getState();\r\n\t\t\tif(event.start_date.valueOf() > calendar.max_date.valueOf() || event.end_date.valueOf() <= calendar.min_date.valueOf()){\r\n\t\t\t\tscheduler.setCurrentView(event.start_date);\r\n\t\t\t}\r\n\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif (this.isScrolledIntoView(node)) {\r\n\t\t\t\tscheduler.$keyboardNavigation.dispatcher.keepScrollPosition((function(){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\t\t}).bind(this));\r\n\t\t\t} else {\r\n\t\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\t}\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\r\n\r\n\t\t_getSection: function(ev){\r\n\t\t\tvar section = null;\r\n\t\t\tvar mode = scheduler.getState().mode;\r\n\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\t\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\t\tsection = ev[timeline.y_property];\r\n\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\tvar unit = scheduler._props[mode];\r\n\t\t\t\tsection = ev[unit.map_to];\r\n\t\t\t}\r\n\t\t\treturn section;\r\n\t\t},\r\n\t\t_moveToSlot: function(dir){\r\n\t\t\tvar ev = scheduler.getEvent(this.eventId);\r\n\t\t\tif(ev){\r\n\t\t\t\tvar section =this._getSection(ev);\r\n\t\t\t\tvar slot = new scheduler.$keyboardNavigation.TimeSlot(ev.start_date, null, section);\r\n\t\t\t\tthis.moveTo(slot.nextSlot(slot, dir));\r\n\t\t\t}else{\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tthis._moveToSlot(\"left\");\r\n\t\t\t},\r\n\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tthis._moveToSlot(\"right\");\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\t\t\t\tif(this.getMode() == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.nextEventHandler();\r\n\t\t\t\t}else {\r\n\t\t\t\t\tthis._moveToSlot(\"down\");\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"space\": function(){\r\n\t\t\t\tvar node = this.getNode();\r\n\t\t\t\tif(node && node.click){\r\n\t\t\t\t\tnode.click();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"up\": function () {\r\n\t\t\t\tif(this.getMode() == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.prevEventHandler();\r\n\t\t\t\t}else {\r\n\t\t\t\t\tthis._moveToSlot(\"up\");\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"delete\": function(){\r\n\t\t\t\tif(scheduler.getEvent(this.eventId)) {\r\n\t\t\t\t\tscheduler._click.buttons[\"delete\"](this.eventId);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t// open lightbox\r\n\t\t\t\"enter\": function () {\r\n\t\t\t\tif(scheduler.getEvent(this.eventId)) {\r\n\t\t\t\t\tscheduler.showLightbox(this.eventId);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\nscheduler.$keyboardNavigation.Event.prototype.bindAll(scheduler.$keyboardNavigation.Event.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.TimeSlot = function(from, to, section, movingDate){\r\n\tvar state = scheduler.getState();\r\n\tvar timeline = scheduler.matrix && scheduler.matrix[state.mode];\r\n\r\n\tif(!from){\r\n\t\tfrom = this.getDefaultDate();\r\n\t}\r\n\r\n\tif(!to){\r\n\r\n\t\tif(timeline){\r\n\t\t\tto = scheduler.date.add(from, timeline.x_step, timeline.x_unit);\r\n\t\t}else{\r\n\t\t\tto = scheduler.date.add(from, scheduler.config.key_nav_step, \"minute\");\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tthis.section = section || this._getDefaultSection();\r\n\tthis.start_date = new Date(from);\r\n\tthis.end_date = new Date(to);\r\n\tthis.movingDate = movingDate || null;\r\n};\r\n\r\nscheduler.$keyboardNavigation.TimeSlot.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\t_handlers:null,\r\n\r\n\t\tgetDefaultDate: function(){\r\n\t\t\tvar from;\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar visibleTime = new Date(state.date);\r\n\t\t\tvisibleTime.setSeconds(0);\r\n\t\t\tvisibleTime.setMilliseconds(0);\r\n\r\n\t\t\tvar nowTime = new Date();\r\n\t\t\tnowTime.setSeconds(0);\r\n\t\t\tnowTime.setMilliseconds(0);\r\n\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[state.mode];\r\n\t\t\tvar showNowTime = false;\r\n\t\t\tif(visibleTime.valueOf() === nowTime.valueOf()){\r\n\t\t\t\tshowNowTime = true;\r\n\t\t\t}\r\n\r\n\t\t\tif(timeline){\r\n\t\t\t\tif(showNowTime){\r\n\t\t\t\t\tif(timeline.x_unit === \"day\"){\r\n\t\t\t\t\t\tnowTime.setHours(0);\r\n\t\t\t\t\t\tnowTime.setMinutes(0);\r\n\t\t\t\t\t}else if(timeline.x_unit === \"hour\"){\r\n\t\t\t\t\t\tnowTime.setMinutes(0);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfrom = nowTime;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfrom = scheduler.date[timeline.name + \"_start\"](new Date(state.date));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfrom = this.findVisibleColumn(from);\r\n\t\t\t}else{\r\n\t\t\t\tfrom = new Date(scheduler.getState().min_date);\r\n\t\t\t\tif(showNowTime){\r\n\t\t\t\t\tfrom = nowTime;\r\n\t\t\t\t}\r\n\t\t\t\tfrom = this.findVisibleColumn(from);\r\n\t\t\t\tif(!showNowTime){\r\n\t\t\t\t\tfrom.setHours(scheduler.config.first_hour);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(!scheduler._table_view){\r\n\t\t\t\t\tvar dataContainer = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\t\tif(dataContainer.scrollTop){\r\n\t\t\t\t\t\tfrom.setHours(scheduler.config.first_hour + Math.ceil(dataContainer.scrollTop / scheduler.config.hour_size_px));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn from;\r\n\t\t},\r\n\r\n\t\tclone: function(timeslot){\r\n\t\t\treturn new scheduler.$keyboardNavigation.TimeSlot(timeslot.start_date, timeslot.end_date, timeslot.section, timeslot.movingDate);\r\n\t\t},\r\n\t\t_getMultisectionView: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view;\r\n\t\t\tif(scheduler._props && scheduler._props[state.mode]) {\r\n\t\t\t\tview = scheduler._props[state.mode];\r\n\t\t\t}else if(scheduler.matrix && scheduler.matrix[state.mode]){\r\n\t\t\t\tview = scheduler.matrix[state.mode];\r\n\t\t\t}\r\n\t\t\treturn view;\r\n\t\t},\r\n\r\n\t\t_getDefaultSection: function(){\r\n\t\t\tvar section = null;\r\n\t\t\tvar view = this._getMultisectionView();\r\n\t\t\tif(view && !section){\r\n\t\t\t\tsection = this._getNextSection();\r\n\t\t\t}\r\n\t\t\treturn section;\r\n\t\t},\r\n\r\n\t\t_getNextSection: function(sectionId, dir){\r\n\t\t\tvar view = this._getMultisectionView();\r\n\t\t\tvar currentIndex = view.order[sectionId];\r\n\t\t\tvar nextIndex = currentIndex;\r\n\t\t\tif(currentIndex !== undefined){\r\n\t\t\t\tnextIndex = currentIndex + dir;\r\n\t\t\t}else{\r\n\t\t\t\tnextIndex = (view.size && view.position) ? view.position : 0;\r\n\t\t\t}\r\n\r\n\t\t\tif(nextIndex < 0){\r\n\t\t\t\tnextIndex = 0;\r\n\t\t\t}\r\n\t\t\tvar options = view.options || view.y_unit;\r\n\r\n\t\t\tif(nextIndex >= options.length){\r\n\t\t\t\tnextIndex = options.length - 1;\r\n\t\t\t}\r\n\t\t\t//nextIndex = nextIndex < 0 ? nextIndex = (view.options || view.y_unit).length -1 : nextIndex;\r\n\r\n\t\t\tif(options[nextIndex]){\r\n\t\t\t\treturn options[nextIndex].key;\r\n\t\t\t}else{\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar isInRange = !(this.start_date.valueOf() < state.min_date.valueOf() || this.start_date.valueOf() >= state.max_date.valueOf());\r\n\r\n\t\t\tif(!isInRange) return false;\r\n\r\n\r\n\t\t\tif(!this.isVisible(this.start_date, this.end_date)) return false;\r\n\r\n\t\t\tvar view = this._getMultisectionView();\r\n\r\n\t\t\tif(view){\r\n\t\t\t\treturn (view.order[this.section] !== undefined);\r\n\t\t\t}else{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t},\r\n\r\n\t\tfallback:function(){\r\n\r\n\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(!defaultSlot.isValid()){\r\n\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t}else{\r\n\t\t\t\treturn defaultSlot;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tgetNodes: function(){\r\n\t\t\treturn Array.prototype.slice.call(scheduler.$container.querySelectorAll(\".dhx_focus_slot\"));\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\treturn this.getNodes()[0];\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tif(this.section && scheduler.getView() && scheduler.getView().smart_rendering && scheduler.getView().scrollTo && !scheduler.$container.querySelector(`[data-section-id=\"${this.section}\"]`)){\r\n\t\t\t\tscheduler.getView().scrollTo({section: this.section});\r\n\t\t\t}\r\n\t\t\tscheduler.$keyboardNavigation.marker.render(this.start_date, this.end_date, this.section);\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\tscheduler.$keyboardNavigation._pasteDate = this.start_date;\r\n\t\t\tscheduler.$keyboardNavigation._pasteSection = this.section;\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t\tscheduler.$keyboardNavigation.marker.clear();\r\n\t\t},\r\n\r\n\t\t_modes: scheduler.$keyboardNavigation.SchedulerNode.prototype._modes,\r\n\r\n\t\t_getMode: scheduler.$keyboardNavigation.SchedulerNode.prototype.getMode,\r\n\r\n\t\taddMonthDate: function(date, dir, extend){\r\n\t\t\tvar res;\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tres = scheduler.date.add(date, -1, \"week\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tres = scheduler.date.add(date, 1, \"week\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tres = scheduler.date.day_start(scheduler.date.add(date, -1, \"day\"));\r\n\t\t\t\t\tres = this.findVisibleColumn(res, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tres = scheduler.date.day_start(scheduler.date.add(date, 1, \"day\"));\r\n\t\t\t\t\tres = this.findVisibleColumn(res, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tres = scheduler.date.day_start(new Date(date));\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tif(date.valueOf() < state.min_date.valueOf() || (!extend && date.valueOf() >= state.max_date.valueOf())){\r\n\t\t\t\tres = new Date(state.min_date);\r\n\t\t\t}\r\n\r\n\t\t\treturn res;\r\n\t\t},\r\n\r\n\t\tnextMonthSlot: function(slot, dir, extend){\r\n\r\n\t\t\tvar start, end;\r\n\t\t\tstart = this.addMonthDate(slot.start_date, dir, extend);\r\n\r\n\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\tend = new Date(start);\r\n\t\t\tend.setHours(scheduler.config.last_hour);\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\r\n\t\t_alignTimeSlot: function(date, minDate, unit, step){\r\n\t\t\tvar currentDate = new Date(minDate);\r\n\t\t\twhile(currentDate.valueOf() < date.valueOf()){\r\n\t\t\t\tcurrentDate = scheduler.date.add(currentDate, step, unit);\r\n\t\t\t}\r\n\r\n\t\t\tif(currentDate.valueOf() > date.valueOf()){\r\n\t\t\t\tcurrentDate = scheduler.date.add(currentDate, -step, unit);\r\n\t\t\t}\r\n\r\n\t\t\treturn currentDate;\r\n\t\t},\r\n\r\n\t\tnextTimelineSlot: function(slot, dir, extend){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view = scheduler.matrix[state.mode];\r\n\r\n\t\t\tvar startDate = this._alignTimeSlot(slot.start_date, scheduler.date[view.name + \"_start\"](new Date(slot.start_date)), view.x_unit, view.x_step);\r\n\t\t\tvar endDate = this._alignTimeSlot(slot.end_date, scheduler.date[view.name + \"_start\"](new Date(slot.end_date)), view.x_unit, view.x_step);\r\n\r\n\t\t\tif(endDate.valueOf() <= startDate.valueOf()){\r\n\t\t\t\tendDate = scheduler.date.add(startDate, view.x_step, view.x_unit);\r\n\t\t\t}\r\n\t\t\tvar newPos = this.clone(slot);\r\n\t\t\tnewPos.start_date = startDate;\r\n\t\t\tnewPos.end_date = endDate;\r\n\t\t\tnewPos.section = slot.section || this._getNextSection();\r\n\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tnewPos.section = this._getNextSection(slot.section, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tnewPos.section = this._getNextSection(slot.section, +1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tnewPos.start_date = this.findVisibleColumn(scheduler.date.add(newPos.start_date, -view.x_step, view.x_unit), -1);\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tnewPos.start_date = this.findVisibleColumn(scheduler.date.add(newPos.start_date, view.x_step, view.x_unit), 1);\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(newPos.start_date.valueOf() < state.min_date.valueOf() || newPos.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tif(extend && newPos.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\t\tnewPos.start_date = new Date(state.max_date);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tnewPos.start_date = scheduler.date[state.mode + \"_start\"](scheduler.date.add(state.date, dir == \"left\" ? -1 : 1, state.mode));\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn newPos;\r\n\t\t},\r\n\r\n\t\tnextUnitsSlot: function(slot, dir, extend){\r\n\t\t\tvar newPos = this.clone(slot);\r\n\t\t\tnewPos.section = slot.section || this._getNextSection();\r\n\r\n\t\t\tvar section = slot.section || this._getNextSection();\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view = scheduler._props[state.mode];\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tsection = this._getNextSection(slot.section, -1);\r\n\t\t\t\t\tvar optionsCount = view.size ? (view.size - 1) : view.options.length;\r\n\r\n\t\t\t\t\tif(view.days > 1 && (view.order[section] == optionsCount - 1)){\r\n\t\t\t\t\t\tif(scheduler.date.add(slot.start_date, -1, \"day\").valueOf() >= state.min_date.valueOf()){\r\n\t\t\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tsection = this._getNextSection(slot.section, 1);\r\n\t\t\t\t\tif(view.days > 1 && !view.order[section]){\r\n\t\t\t\t\t\tif(scheduler.date.add(slot.start_date, 1, \"day\").valueOf() < state.max_date.valueOf()){\r\n\t\t\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\tsection = slot.section;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tnewPos.section = section;\r\n\t\t\treturn newPos;\r\n\t\t},\r\n\r\n\t\t_moveDate: function(oldDate, dir){\r\n\t\t\tvar newDate = this.findVisibleColumn(scheduler.date.add(oldDate, dir, \"day\"), dir);\r\n\t\t\tnewDate.setHours(oldDate.getHours());\r\n\t\t\tnewDate.setMinutes(oldDate.getMinutes());\r\n\t\t\treturn newDate;\r\n\t\t},\r\n\r\n\t\tisBeforeLastHour: function(date, isStartDate){\r\n\t\t\tvar minutes = date.getMinutes(),\r\n\t\t\t\thours = date.getHours(),\r\n\t\t\t\tlast_hour = scheduler.config.last_hour;\r\n\t\t\treturn (hours < last_hour || (!isStartDate && ((last_hour == 24 || hours == last_hour) && !minutes)));\r\n\t\t},\r\n\t\tisAfterFirstHour: function(date, isStartDate){\r\n\t\t\tvar minutes = date.getMinutes(),\r\n\t\t\t\thours = date.getHours(),\r\n\t\t\t\tfirst_hour = scheduler.config.first_hour,\r\n\t\t\t\tlast_hour = scheduler.config.last_hour;\r\n\t\t\treturn (hours >= first_hour || (!isStartDate && (!minutes && ((!hours && last_hour == 24) || (hours == last_hour)))));\r\n\t\t},\r\n\t\tisInVisibleDayTime: function(date, isStartDate){\r\n\t\t\treturn (this.isBeforeLastHour(date, isStartDate) && this.isAfterFirstHour(date, isStartDate));\r\n\t\t},\r\n\r\n\t\tnextDaySlot: function(slot, dir, extend){\r\n\t\t\tvar start, end;\r\n\r\n\t\t\tvar key_nav_step = scheduler.config.key_nav_step;\r\n\r\n\t\t\tvar date = this._alignTimeSlot(slot.start_date, scheduler.date.day_start(new Date(slot.start_date)), \"minute\", key_nav_step);\r\n\r\n\r\n\t\t\tvar oldStart = slot.start_date;\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tstart = scheduler.date.add(date, -key_nav_step, \"minute\");\r\n\r\n\t\t\t\t\tif(!this.isInVisibleDayTime(start, true)){\r\n\t\t\t\t\t\tif (!extend || this.isInVisibleDayTime(oldStart, true)) {\r\n\r\n\t\t\t\t\t\t\tvar toNextDay = true;\r\n\t\t\t\t\t\t\tif(extend && scheduler.date.date_part(new Date(start)).valueOf() != scheduler.date.date_part(new Date(oldStart)).valueOf())\r\n\t\t\t\t\t\t\t\ttoNextDay = false;\r\n\t\t\t\t\t\t\tif(toNextDay)\r\n\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, -1, \"day\"), -1);\r\n\r\n\t\t\t\t\t\t\tstart.setHours(scheduler.config.last_hour);\r\n\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\tstart = scheduler.date.add(start, -key_nav_step, \"minute\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tstart = scheduler.date.add(date, key_nav_step, \"minute\");\r\n\r\n\t\t\t\t\tvar testEnd = extend ? start : scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tif(!this.isInVisibleDayTime(testEnd, false)){\r\n\t\t\t\t\t\tif(!extend || this.isInVisibleDayTime(oldStart, false)) {\r\n\t\t\t\t\t\t\tif (!extend) {\r\n\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, 1, \"day\"), 1);\r\n\t\t\t\t\t\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tvar toNextDay = true;\r\n\t\t\t\t\t\t\t\tif (scheduler.date.date_part(new Date(oldStart)).valueOf() == oldStart.valueOf()) {\r\n\t\t\t\t\t\t\t\t\ttoNextDay = false;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (toNextDay) {\r\n\t\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, 1, \"day\"), 1);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\t\tstart = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tstart = this._moveDate(slot.start_date, -1);\r\n\t\t\t\t\tend = this._moveDate(slot.end_date, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tstart = this._moveDate(slot.start_date, 1);\r\n\t\t\t\t\tend = this._moveDate(slot.end_date, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tstart = date;\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\t\tnextWeekAgendaSlot: function(slot, dir){\r\n\t\t\tvar start, end;\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tstart = scheduler.date.day_start(scheduler.date.add(slot.start_date, -1, \"day\"));\r\n\t\t\t\t\tstart = this.findVisibleColumn(start, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tstart = scheduler.date.day_start(scheduler.date.add(slot.start_date, 1, \"day\"));\r\n\t\t\t\t\tstart = this.findVisibleColumn(start, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tstart = scheduler.date.day_start(slot.start_date);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif(slot.start_date.valueOf() < state.min_date.valueOf() || slot.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tstart = new Date(state.min_date);\r\n\r\n\t\t\t}\r\n\t\t\tend = new Date(start);\r\n\t\t\tend.setHours(scheduler.config.last_hour);\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\t\tnextAgendaSlot: function(slot, dir){\r\n\t\t\treturn {start_date: slot.start_date, end_date: slot.end_date};\r\n\t\t},\r\n\r\n\r\n\t\tisDateVisible: function(date){\r\n\t\t\tif(!scheduler._ignores_detected)\r\n\t\t\t\treturn true;\r\n\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[scheduler.getState().mode];\r\n\r\n\t\t\tvar index;\r\n\t\t\tif(timeline){\r\n\t\t\t\tindex = scheduler._get_date_index(timeline, date);\r\n\t\t\t}else{\r\n\t\t\t\tindex = scheduler.locate_holder_day(date);\r\n\t\t\t}\r\n\r\n\t\t\treturn !scheduler._ignores[index];\r\n\t\t},\r\n\r\n\t\tfindVisibleColumn: function(start, dir){\r\n\t\t\tvar date = start;\r\n\t\t\tdir = dir || 1;\r\n\t\t\tvar range = scheduler.getState();\r\n\r\n\t\t\twhile(!this.isDateVisible(date) && ((dir > 0 && date.valueOf() <= range.max_date.valueOf()) || (dir < 0 && date.valueOf() >= range.min_date.valueOf()))){\r\n\t\t\t\tdate = this.nextDateColumn(date, dir);\r\n\t\t\t}\r\n\r\n\t\t\treturn date;\r\n\t\t},\r\n\r\n\t\tnextDateColumn: function(start, dir){\r\n\t\t\tdir = dir || 1;\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[scheduler.getState().mode];\r\n\r\n\t\t\tvar date;\r\n\t\t\tif(timeline){\r\n\t\t\t\tdate = scheduler.date.add(start, dir * timeline.x_step, timeline.x_unit);\r\n\t\t\t}else{\r\n\t\t\t\tdate = scheduler.date.day_start(scheduler.date.add(start, dir, \"day\"));\r\n\t\t\t}\r\n\r\n\t\t\treturn date;\r\n\t\t},\r\n\r\n\t\tisVisible:function(from, to){\r\n\t\t\tif(!scheduler._ignores_detected)\r\n\t\t\t\treturn true;\r\n\r\n\t\t\tvar current = new Date(from);\r\n\r\n\t\t\twhile(current.valueOf() < to.valueOf()){\r\n\t\t\t\tif(this.isDateVisible(current)) return true;\r\n\t\t\t\tcurrent = this.nextDateColumn(current);\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t},\r\n\r\n\t\tnextSlot: function(slot, dir, view, extend){\r\n\t\t\tvar next;\r\n\t\t\tview = view || this._getMode();\r\n\r\n\t\t\tvar tempSlot = scheduler.$keyboardNavigation.TimeSlot.prototype.clone(slot);\r\n\r\n\t\t\tswitch (view){\r\n\t\t\t\tcase this._modes.units:\r\n\t\t\t\t\tnext = this.nextUnitsSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.timeline:\r\n\t\t\t\t\tnext = this.nextTimelineSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.year:\r\n\t\t\t\t\tnext = this.nextMonthSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.month:\r\n\t\t\t\t\tnext = this.nextMonthSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.weekAgenda:\r\n\t\t\t\t\tnext = this.nextWeekAgendaSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.list:\r\n\t\t\t\t\tnext = this.nextAgendaSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.dayColumns:\r\n\t\t\t\t\tnext = this.nextDaySlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(next.start_date.valueOf() >= next.end_date.valueOf()){\r\n\t\t\t\tnext = this.nextSlot(next, dir, view);\r\n\t\t\t}\r\n\r\n\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(next);\r\n\r\n\t\t},\r\n\r\n\t\textendSlot: function(slot, dir){\r\n\t\t\tvar view = this._getMode();\r\n\t\t\tvar next;\r\n\t\t\tswitch (view){\r\n\t\t\t\tcase this._modes.units:\r\n\t\t\t\t\tif(dir == \"left\" || dir == \"right\"){\r\n\t\t\t\t\t\tnext = this.nextUnitsSlot(slot, dir);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnext = this.extendUnitsSlot(slot, dir);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.timeline:\r\n\t\t\t\t\tif(dir == \"down\" || dir == \"up\"){\r\n\t\t\t\t\t\tnext = this.nextTimelineSlot(slot, dir);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnext = this.extendTimelineSlot(slot, dir);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.year:\r\n\t\t\t\t\tnext = this.extendMonthSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.month:\r\n\t\t\t\t\tnext = this.extendMonthSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.dayColumns:\r\n\t\t\t\t\tnext = this.extendDaySlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.weekAgenda:\r\n\t\t\t\t\tnext = this.extendWeekAgendaSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnext = slot;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tvar range = scheduler.getState();\r\n\t\t\tif(next.start_date.valueOf() < range.min_date.valueOf()){\r\n\t\t\t\tnext.start_date = this.findVisibleColumn(range.min_date);\r\n\t\t\t\tnext.start_date.setHours(scheduler.config.first_hour);\r\n\t\t\t}\r\n\r\n\t\t\tif(next.end_date.valueOf() > range.max_date.valueOf()){\r\n\t\t\t//\tnext.end_date = new Date(slot.end_date);\r\n\t\t\t\tnext.end_date = this.findVisibleColumn(range.max_date, -1);\r\n\t\t\t}\r\n\r\n\r\n\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(next);\r\n\t\t},\r\n\r\n\t\textendTimelineSlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"timeline\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\textendWeekAgendaSlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"weekAgenda\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\textendGenericSlot: function(allowedDirections, slot, direction, type){\r\n\t\t\tvar next;\r\n\t\t\tvar moveDate = slot.movingDate;\r\n\r\n\t\t\tif(!moveDate){\r\n\t\t\t\tmoveDate = allowedDirections[direction];\r\n\t\t\t}\r\n\r\n\t\t\tif(!moveDate || !allowedDirections[direction]){\r\n\t\t\t\treturn slot;\r\n\t\t\t}\r\n\r\n\t\t\tif(direction){\r\n\t\t\t\tnext = this.nextSlot({start_date: slot[moveDate], section: slot.section}, direction, type, true);\r\n\r\n\t\t\t\tif(next.start_date.valueOf() == slot.start_date.valueOf()){\r\n\t\t\t\t\tnext = this.nextSlot({start_date: next.start_date, section:next.section}, direction, type, true);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tnext.movingDate = moveDate;\r\n\t\t\t}else{\r\n\t\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(slot);\r\n\t\t\t}\r\n\r\n\t\t\tvar newDates = this.extendSlotDates(slot, next, next.movingDate);\r\n\r\n\t\t\tif(newDates.end_date.valueOf() <= newDates.start_date.valueOf()){\r\n\t\t\t\tnext.movingDate = next.movingDate == \"end_date\" ? \"start_date\" : \"end_date\";\r\n\t\t\t}\r\n\t\t\tnewDates = this.extendSlotDates(slot, next, next.movingDate);\r\n\r\n\t\t\tnext.start_date = newDates.start_date;\r\n\t\t\tnext.end_date = newDates.end_date;\r\n\t\t\treturn next;\r\n\t\t},\r\n\r\n\t\textendSlotDates: function(oldSlot, newSlot, dateDirection){\r\n\t\t\tvar res = {start_date:null, end_date:null};\r\n\r\n\t\t\tif(dateDirection == \"start_date\"){\r\n\t\t\t\tres.start_date = newSlot.start_date;\r\n\t\t\t\tres.end_date = oldSlot.end_date;\r\n\t\t\t}else{\r\n\t\t\t\tres.start_date = oldSlot.start_date;\r\n\t\t\t\tres.end_date = newSlot.start_date;\r\n\t\t\t}\r\n\t\t\treturn res;\r\n\r\n\t\t},\r\n\r\n\t\textendMonthSlot: function(slot, direction){\r\n\t\t\tvar slot = this.extendGenericSlot({\r\n\t\t\t\t\t\"up\":\"start_date\",\r\n\t\t\t\t\t\"down\":\"end_date\",\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"month\"\r\n\t\t\t);\r\n\r\n\t\t\tslot.start_date.setHours(scheduler.config.first_hour);\r\n\t\t\tslot.end_date = scheduler.date.add(slot.end_date, -1, \"day\");\r\n\t\t\tslot.end_date.setHours(scheduler.config.last_hour);\r\n\t\t\treturn slot;\r\n\t\t},\r\n\r\n\t\textendUnitsSlot: function(slot, direction){\r\n\t\t\tvar next;\r\n\r\n\t\t\tswitch (direction){\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tnext = this.extendDaySlot(slot, direction);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnext = slot;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tnext.section = slot.section;\r\n\t\t\treturn next;\r\n\t\t},\r\n\t\textendDaySlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\t\"up\":\"start_date\",\r\n\t\t\t\t\t\"down\":\"end_date\",\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"dayColumns\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\tscrollSlot: function(dir){\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tvar slot = this.nextSlot(this, dir);\r\n\t\t\tif(slot.start_date.valueOf() < state.min_date.valueOf() || slot.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tscheduler.setCurrentView(new Date(slot.start_date));\r\n\t\t\t}\r\n\r\n\t\t\tthis.moveTo(slot);\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tthis.scrollSlot(\"left\");\r\n\t\t\t},\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tthis.scrollSlot(\"right\");\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\r\n\t\t\t\tvar mode = this._getMode();\r\n\t\t\t\tif(mode == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.nextEventHandler();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.scrollSlot(\"down\");\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"up\": function () {\r\n\t\t\t\tvar mode = this._getMode();\r\n\t\t\t\tif(mode == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.prevEventHandler();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.scrollSlot(\"up\");\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"shift+down\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"down\"));\r\n\t\t\t},\r\n\t\t\t\"shift+up\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"up\"));\r\n\t\t\t},\r\n\t\t\t\"shift+right\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"right\"));\r\n\t\t\t},\r\n\t\t\t\"shift+left\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"left\"));\r\n\t\t\t},\r\n\r\n\r\n\t\t\t\"enter\": function(){\r\n\t\t\t\tvar obj = {start_date: new Date(this.start_date), end_date: new Date(this.end_date)};\r\n\r\n\t\t\t\tvar mode = scheduler.getState().mode;\r\n\t\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\r\n\t\t\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\t\t\tobj[timeline.y_property] = this.section;\r\n\t\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\t\tvar unit = scheduler._props[mode];\r\n\t\t\t\t\tobj[unit.map_to] = this.section;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler.addEventNow(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.TimeSlot.prototype.bindAll(scheduler.$keyboardNavigation.TimeSlot.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.MinicalButton = function(div, index){\r\n\tthis.container = div;\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.MinicalButton.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar container = this.container;\r\n\t\t\treturn !!container.offsetWidth;// valid if container is visible\r\n\t\t},\r\n\r\n\t\tfallback: function(){\r\n\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(defaultSlot.isValid()){\r\n\t\t\t\treturn defaultSlot;\r\n\t\t\t}else{\r\n\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t}\r\n\t\t},\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.globalNode.disable();\r\n\t\t\tthis.container.removeAttribute(\"tabindex\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tthis.container.setAttribute(\"tabindex\", \"0\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\tif(!this.index){\r\n\t\t\t\treturn this.container.querySelector(\".dhx_cal_prev_button\");\r\n\t\t\t}else{\r\n\t\t\t\treturn this.container.querySelector(\".dhx_cal_next_button\");\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"right\": function(e){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, this.index ? 0 : 1));\r\n\t\t\t},\r\n\t\t\t\"left\": function(e){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, this.index ? 0 : 1));\r\n\t\t\t},\r\n\t\t\t\"down\": function(){\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, 0, 0);\r\n\t\t\t\tif(next && !next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"enter\": function(e){\r\n\t\t\t\tthis.getNode().click();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.MinicalButton.prototype.bindAll(scheduler.$keyboardNavigation.MinicalButton.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.MinicalCell = function(div, row, col){\r\n\tthis.container = div;\r\n\tthis.row = row || 0;\r\n\tthis.col = col || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.MinicalCell.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar grid = this._getGrid();\r\n\t\t\treturn !!(grid[this.row] && grid[this.row][this.col]);\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\tvar row = this.row;\r\n\t\t\tvar col = this.col;\r\n\t\t\tvar grid = this._getGrid();\r\n\t\t\tif(!grid[row]){\r\n\t\t\t\trow = 0;\r\n\t\t\t}\r\n\t\t\tvar dir = true;\r\n\t\t\tif(row > grid.length / 2){\r\n\t\t\t\tdir = false;\r\n\t\t\t}\r\n\r\n\t\t\tif(!grid[row]){\r\n\t\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t\tif(defaultSlot.isValid()){\r\n\t\t\t\t\treturn defaultSlot;\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(dir){\r\n\t\t\t\tfor(var c = col; grid[row] && c < grid[row].length; c++){\r\n\t\t\t\t\tif(!grid[row][c] && c == grid[row].length - 1){\r\n\t\t\t\t\t\trow++;\r\n\t\t\t\t\t\tcol = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(grid[row][c]){\r\n\t\t\t\t\t\treturn new scheduler.$keyboardNavigation.MinicalCell(this.container, row, c);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tfor(var c = col; grid[row] && c < grid[row].length; c--){\r\n\t\t\t\t\tif(!grid[row][c] && !c){\r\n\t\t\t\t\t\trow--;\r\n\t\t\t\t\t\tcol = grid[row].length - 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(grid[row][c]){\r\n\t\t\t\t\t\treturn new scheduler.$keyboardNavigation.MinicalCell(this.container, row, c);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn new scheduler.$keyboardNavigation.MinicalButton(this.container, 0);\r\n\t\t},\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.globalNode.disable();\r\n\r\n\t\t\tthis.container.removeAttribute(\"tabindex\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tthis.container.setAttribute(\"tabindex\", \"0\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\t\t_getNode: function(row, col){\r\n\t\t\treturn this.container.querySelector(\".dhx_year_body tr:nth-child(\"+(row + 1) + \") td:nth-child(\"+(col + 1)+\")\");\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\treturn this._getNode(this.row, this.col);\r\n\t\t},\r\n\r\n\t\t_getGrid: function(){\r\n\t\t\tvar rows = this.container.querySelectorAll(\".dhx_year_body tr\");\r\n\t\t\tvar grid = [];\r\n\t\t\tfor(var i = 0; i < rows.length; i++){\r\n\t\t\t\tgrid[i] = [];\r\n\t\t\t\tvar row = rows[i];\r\n\t\t\t\tvar cells = row.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var c = 0; c < cells.length; c++){\r\n\t\t\t\t\tvar cell = cells[c];\r\n\t\t\t\t\tvar enabled = true;\r\n\t\t\t\t\tvar css = scheduler._getClassName(cell);\r\n\t\t\t\t\tif(css.indexOf(\"dhx_after\") > -1 || css.indexOf(\"dhx_before\") > -1 || css.indexOf(\"dhx_scale_ignore\") > -1){\r\n\t\t\t\t\t\tenabled = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tgrid[i][c] = enabled;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn grid;\r\n\t\t},\r\n\r\n\r\n\t\tkeys: {\r\n\t\t\t\"right\": function(e){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row;\r\n\t\t\t\tvar newCol = this.col + 1;\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tif(grid[newRow + 1]){\r\n\t\t\t\t\t\tnewRow = newRow + 1;\r\n\t\t\t\t\t\tnewCol = 0;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnewCol = this.col;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"left\": function(e){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row;\r\n\t\t\t\tvar newCol = this.col - 1;\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tif(grid[newRow - 1]){\r\n\t\t\t\t\t\tnewRow = newRow - 1;\r\n\t\t\t\t\t\tnewCol = grid[newRow].length - 1;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnewCol = this.col;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"down\": function(){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row + 1;\r\n\t\t\t\tvar newCol = this.col;\r\n\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tnewRow = this.row;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"up\": function(){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row - 1;\r\n\t\t\t\tvar newCol = this.col;\r\n\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tvar index = 0;\r\n\t\t\t\t\tif(this.col > grid[this.row].length / 2){\r\n\t\t\t\t\t\tindex = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, index));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.moveTo(next);\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\t\t\t\"enter\": function(e){\r\n\t\t\t\tthis.getNode().querySelector(\".dhx_month_head\").click();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.MinicalCell.prototype.bindAll(scheduler.$keyboardNavigation.MinicalCell.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.DataArea = function(index){\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.DataArea.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\tgetNode: function(index){\r\n\t\t\treturn scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t},\r\n\r\n\t\t_handlers:null,\r\n\r\n\t\tisValid: function(){\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tfallback:function(){\r\n\t\t\treturn this;\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"up,down,right,left\":function(){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.DataArea.prototype.bindAll(scheduler.$keyboardNavigation.DataArea.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.dispatcher = {\r\n\tisActive: false,\r\n\tactiveNode: null,\r\n\tglobalNode: new scheduler.$keyboardNavigation.SchedulerNode(),\r\n\r\n\tkeepScrollPosition: function (callback) {\r\n\t\tvar top, left;\r\n\r\n\t\tvar scrollable = scheduler.$container.querySelector(\".dhx_timeline_scrollable_data\");\r\n\t\tif(!scrollable){\r\n\t\t\tscrollable = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t}\r\n\r\n\t\tif(scrollable){\r\n\t\t\ttop = scrollable.scrollTop;\r\n\t\t\tleft = scrollable.scrollLeft;\r\n\t\t}\r\n\r\n\t\tcallback();\r\n\r\n\t\tif(scrollable){\r\n\t\t\tscrollable.scrollTop = top;\r\n\t\t\tscrollable.scrollLeft = left;\r\n\t\t}\r\n\t},\r\n\tenable: function(){\r\n\t\tif(!scheduler.$container){\r\n\t\t\t// do nothing if not initialized\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.isActive = true;\r\n\t\tvar self = this;\r\n\t\tthis.keepScrollPosition(function () {\r\n\t\t\tself.globalNode.enable();\r\n\t\t\tself.setActiveNode(self.getActiveNode());\r\n\t\t});\r\n\t},\r\n\r\n\tdisable: function(){\r\n\t\tthis.isActive = false;\r\n\t\tthis.globalNode.disable();\r\n\t},\r\n\r\n\tisEnabled: function(){\r\n\t\treturn !!this.isActive;\r\n\t},\r\n\r\n\tgetDefaultNode: function(){\r\n\t\treturn this.globalNode.getDefaultNode();\r\n\t},\r\n\r\n\tsetDefaultNode: function() {\r\n\t\tthis.setActiveNode(this.getDefaultNode());\r\n\t},\r\n\r\n\tgetActiveNode: function(){\r\n\t\tvar node = this.activeNode;\r\n\t\tif(node && !node.isValid()){\r\n\t\t\tnode = node.fallback();\r\n\t\t}\r\n\t\treturn node;\r\n\t},\r\n\r\n\tfocusGlobalNode: function(){\r\n\t\tthis.blurNode(this.globalNode);\r\n\t\tthis.focusNode(this.globalNode);\r\n\t},\r\n\r\n\tsetActiveNode: function(el){\r\n\t\tif(!el || !el.isValid())\r\n\t\t\treturn;\r\n\r\n\t\tif(this.activeNode){\r\n\t\t\tif(this.activeNode.compareTo(el)){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(this.isEnabled()){\r\n\t\t\tthis.blurNode(this.activeNode);\r\n\t\t\tthis.activeNode = el;\r\n\t\t\tthis.focusNode(this.activeNode);\r\n\t\t}\r\n\t},\r\n\r\n\tfocusNode: function(el){\r\n\t\tif(el && el.focus){\r\n\t\t\tel.focus();\r\n\t\t\tif(el.getNode && document.activeElement != el.getNode()){\r\n\t\t\t\tthis.setActiveNode(new scheduler.$keyboardNavigation.DataArea());\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tblurNode: function(el){\r\n\t\tif(el && el.blur){\r\n\t\t\tel.blur();\r\n\t\t}\r\n\t},\r\n\r\n\tgetInlineEditor: function(id){\r\n\t\tvar editor = scheduler.$container.querySelector(\".dhx_cal_editor[\"+scheduler.config.event_attribute+\"='\"+id+\"'] textarea\");\r\n\t\tif(editor && editor.offsetWidth){\r\n\t\t\t// if exists and visible\r\n\t\t\treturn editor;\r\n\t\t}\r\n\t\treturn null;\r\n\t},\r\n\r\n\tkeyDownHandler: function (e) {\r\n\r\n\t\tif(e.defaultPrevented){\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar activeElement = this.getActiveNode();\r\n\r\n\t\tif(scheduler.$keyboardNavigation.isModal() &&\r\n\t\t\t!(activeElement && activeElement.container && scheduler.utils.dom.locateCss({target:activeElement.container}, \"dhx_minical_popup\", false)))\r\n\t\t\treturn;\r\n\r\n\t\tif(scheduler.getState().editor_id && this.getInlineEditor(scheduler.getState().editor_id))\r\n\t\t\treturn;\r\n\r\n\t\tif (!this.isEnabled())\r\n\t\t\treturn;\r\n\r\n\t\te = e || window.event;\r\n\r\n\t\tvar schedulerNode = this.globalNode;\r\n\r\n\t\tvar command = scheduler.$keyboardNavigation.shortcuts.getCommandFromEvent(e);\r\n\r\n\t\tif(!activeElement){\r\n\t\t\tthis.setDefaultNode();\r\n\t\t}else if(activeElement.findHandler(command)){\r\n\t\t\tactiveElement.doAction(command, e);\r\n\t\t}else if(schedulerNode.findHandler(command)){\r\n\t\t\tschedulerNode.doAction(command, e);\r\n\t\t}\r\n\r\n\t},\r\n\r\n\t_timeout: null,\r\n\tdelay: function(callback, delay){\r\n\r\n\t\tclearTimeout(this._timeout);\r\n\t\tthis._timeout = setTimeout(callback, delay || 1);\r\n\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation._minicalendars = [];\r\n\r\nscheduler.$keyboardNavigation.isMinical = function(node){\r\n\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\tif(this.isChildOf(node, minicalendars[i]))\r\n\t\t\treturn true;\r\n\t}\r\n\treturn false;\r\n};\r\n\r\nscheduler.$keyboardNavigation.isChildOf = function(child, parent){\r\n\twhile(child && child !== parent){\r\n\t\tchild = child.parentNode;\r\n\t}\r\n\r\n\treturn !!(child === parent);\r\n};\r\n\r\nscheduler.$keyboardNavigation.patchMinicalendar = function(){\r\n\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\tfunction focusMinical(e){\r\n\t\tvar target = e.target;\r\n\r\n\t\tdispatcher.enable();\r\n\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.MinicalButton(target, 0));\r\n\t}\r\n\r\n\tfunction minicalClick(e){\r\n\t\tvar target = e.target || e.srcElement;\r\n\r\n\t\tvar prev = scheduler.utils.dom.locateCss(e, \"dhx_cal_prev_button\", false);\r\n\t\tvar next = scheduler.utils.dom.locateCss(e, \"dhx_cal_next_button\", false);\r\n\t\tvar cell = scheduler.utils.dom.locateCss(e, \"dhx_year_body\", false);\r\n\r\n\t\tvar rowIndex = 0;\r\n\t\tvar cellIndex = 0;\r\n\t\tif(cell){\r\n\t\t\tvar tr;\r\n\t\t\tvar td;\r\n\t\t\tvar current = target;\r\n\t\t\twhile(current && current.tagName.toLowerCase() != \"td\"){\r\n\t\t\t\tcurrent = current.parentNode;\r\n\t\t\t}\r\n\t\t\tif(current){\r\n\t\t\t\ttd = current;\r\n\t\t\t\ttr = td.parentNode;\r\n\t\t\t}\r\n\r\n\t\t\tif(tr && td){\r\n\t\t\t\tvar rows = tr.parentNode.querySelectorAll(\"tr\");\r\n\t\t\t\tfor(var i = 0; i < rows.length; i++){\r\n\t\t\t\t\tif(rows[i] == tr){\r\n\t\t\t\t\t\trowIndex = i;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tvar cells = tr.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\t\t\tif(cells[i] == td){\r\n\t\t\t\t\t\tcellIndex = i;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tvar root = e.currentTarget;\r\n\t\tdispatcher.delay(function(){\r\n\t\t\tif(prev || next || cell){\r\n\r\n\t\t\t\tvar element;\r\n\t\t\t\tif(prev){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalButton(root, 0);\r\n\t\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.MinicalButton(root, 0));\r\n\t\t\t\t}else if(next){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalButton(root, 1);\r\n\t\t\t\t}else if(cell){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalCell(root, rowIndex, cellIndex);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(element){\r\n\r\n\t\t\t\t\tdispatcher.enable();\r\n\t\t\t\t\tif(element.isValid()){\r\n\t\t\t\t\t\tdispatcher.activeNode = null;\r\n\t\t\t\t\t\tdispatcher.setActiveNode(element);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t}\r\n\r\n\tif(scheduler.renderCalendar){\r\n\t\tvar renderMinical = scheduler.renderCalendar;\r\n\t\tscheduler.renderCalendar = function(){\r\n\t\t\tvar cal = renderMinical.apply(this, arguments);\r\n\t\t\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\r\n\t\t\tscheduler.eventRemove(cal, \"click\", minicalClick);\r\n\t\t\tscheduler.event(cal, \"click\", minicalClick);\r\n\r\n\t\t\tscheduler.eventRemove(cal, \"focus\", focusMinical);\r\n\t\t\tscheduler.event(cal, \"focus\", focusMinical);\r\n\r\n\t\t\tvar added = false;\r\n\t\t\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\t\t\tif(minicalendars[i] == cal){\r\n\t\t\t\t\tadded = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(!added)\r\n\t\t\t\tminicalendars.push(cal);\r\n\r\n\t\t\tif(dispatcher.isEnabled()){\r\n\t\t\t\tvar node = dispatcher.getActiveNode();\r\n\t\t\t\tif(node && node.container == cal){\r\n\t\t\t\t\tdispatcher.focusNode(node);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcal.setAttribute(\"tabindex\", \"0\");\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tcal.setAttribute(\"tabindex\", \"0\");\r\n\t\t\t}\r\n\t\t\treturn cal;\r\n\t\t};\r\n\t}\r\n\r\n\tif(scheduler.destroyCalendar){\r\n\t\tvar destroyMinical = scheduler.destroyCalendar;\r\n\t\tscheduler.destroyCalendar = function(cal, force){\r\n\t\t\tcal = cal || (scheduler._def_count ? scheduler._def_count.firstChild : null);\r\n\t\t\tvar res = destroyMinical.apply(this, arguments);\r\n\r\n\t\t\tif(!cal || !cal.parentNode){\r\n\t\t\t\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\t\t\t\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\t\t\t\tif(minicalendars[i] == cal){\r\n\t\t\t\t\t\tscheduler.eventRemove(minicalendars[i], \"focus\", focusMinical);\r\n\t\t\t\t\t\tminicalendars.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn res;\r\n\t\t};\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\r\n\tthis.layers.sort(function(a, b){\r\n\t\treturn a.zIndex - b.zIndex;\r\n\t});\r\n\r\n\tscheduler._dp_init=function(dp){\r\n\t\tdp._methods=[\"_set_event_text_style\",\"\",\"changeEventId\",\"deleteEvent\"];\r\n\r\n\t\tthis.attachEvent(\"onEventAdded\",function(id){\r\n\t\t\tif (!this._loading && this.validId(id) && this.getEvent(id) && this.getEvent(id).layer == dp.layer)\r\n\t\t\t\tdp.setUpdated(id,true,\"inserted\");\r\n\t\t});\r\n\t\tthis.attachEvent(\"onBeforeEventDelete\",function(id){\r\n\t\t\tif(this.getEvent(id) && this.getEvent(id).layer == dp.layer) {\r\n\t\t\t\tif (!this.validId(id)) return;\r\n\t\t\t\tvar z=dp.getState(id);\r\n\r\n\t\t\t\tif (z==\"inserted\" || this._new_event) { dp.setUpdated(id,false);\t\treturn true; }\r\n\t\t\t\tif (z==\"deleted\") return false;\r\n\t\t\t\tif (z==\"true_deleted\") return true;\r\n\r\n\t\t\t\tdp.setUpdated(id,true,\"deleted\");\r\n\t\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\telse return true;\r\n\t\t});\r\n\t\tthis.attachEvent(\"onEventChanged\",function(id){\r\n\t\t\tif (!this._loading && this.validId(id) && this.getEvent(id) && this.getEvent(id).layer == dp.layer)\r\n\t\t\t\tdp.setUpdated(id,true,\"updated\");\r\n\t\t});\r\n\r\n\t\tdp._getRowData=function(id,pref){\r\n\t\t\tvar ev=this.obj.getEvent(id);\r\n\t\t\tvar data = {};\r\n\r\n\t\t\tfor (var a in ev){\r\n\t\t\t\tif (a.indexOf(\"_\")===0) continue;\r\n\t\t\t\tif (ev[a] && ev[a].getUTCFullYear) //not very good, but will work\r\n\t\t\t\t\tdata[a] = this.obj._helpers.formatDate(ev[a]);\r\n\t\t\t\telse\r\n\t\t\t\t\tdata[a] = ev[a];\r\n\t\t\t}\r\n\t\t\treturn data;\r\n\t\t};\r\n\t\tdp._clearUpdateFlag=function(){};\r\n\r\n\t\tdp.attachEvent(\"insertCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"updateCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"deleteCallback\", function(upd, id) {\r\n\t\t\tthis.obj.setUserData(id, this.action_param, \"true_deleted\");\r\n\t\t\tthis.obj.deleteEvent(id);\r\n\t\t});\r\n\t};\r\n\r\n\t(function() {\r\n var _cloneObj = function(obj){\r\n if(obj === null || typeof(obj) != 'object')\r\n return obj;\r\n var temp = new obj.constructor();\r\n for(var key in obj)\r\n temp[key] = _cloneObj(obj[key]);\r\n return temp;\r\n };\r\n\r\n\t\tscheduler._dataprocessors = [];\r\n\t\tscheduler._layers_zindex = {};\r\n\t\tfor(var i=0; i= scheduler.config.collision_limit);\r\n\t});\r\n\r\n\tscheduler.addEvent=function(start_date,end_date,text,id,extra_data){\r\n\t\tvar ev=start_date;\r\n\t\tif (arguments.length!=1){\r\n\t\t\tev=extra_data||{};\r\n\t\t\tev.start_date=start_date;\r\n\t\t\tev.end_date=end_date;\r\n\t\t\tev.text=text;\r\n\t\t\tev.id=id;\r\n\t\t\tev.layer = this.defaultLayer;\r\n\t\t}\r\n\t\tev.id = ev.id||scheduler.uid();\r\n\t\tev.text = ev.text||\"\";\r\n\r\n\r\n\t\tif (typeof ev.start_date == \"string\") ev.start_date=this.templates.api_date(ev.start_date);\r\n\t\tif (typeof ev.end_date == \"string\") ev.end_date=this.templates.api_date(ev.end_date);\r\n\t\tev._timed=this.isOneDayEvent(ev);\r\n\r\n\t\tvar is_new=!this._events[ev.id];\r\n\t\tthis._events[ev.id]=ev;\r\n\t\tthis.event_updated(ev);\r\n\t\tif (!this._loading)\r\n\t\t\tthis.callEvent(is_new?\"onEventAdded\":\"onEventChanged\",[ev.id,ev]);\r\n\t};\r\n\r\n\tthis._evs_layer = {};\r\n\tfor (var i = 0; i < this.layers.length; i++) { // array in object for each layer\r\n\t\tthis._evs_layer[this.layers[i].name] = [];\r\n\t}\r\n\r\n\tscheduler.addEventNow=function(start,end,e){\r\n\t\tvar base = {};\r\n\t\tif (typeof start == \"object\"){\r\n\t\t\tbase = start;\r\n\t\t\tstart = null;\r\n\t\t}\r\n\r\n\t\tvar d = (this.config.event_duration||this.config.time_step)*60000;\r\n\t\tif (!start) start = Math.round((scheduler._currentDate()).valueOf()/d)*d;\r\n\t\tvar start_date = new Date(start);\r\n\t\tif (!end){\r\n\t\t\tvar start_hour = this.config.first_hour;\r\n\t\t\tif (start_hour > start_date.getHours()){\r\n\t\t\t\tstart_date.setHours(start_hour);\r\n\t\t\t\tstart = start_date.valueOf();\r\n\t\t\t}\r\n\t\t\tend = start+d;\r\n\t\t}\r\n\r\n\r\n\t\tbase.start_date = base.start_date||start_date;\r\n\t\tbase.end_date = base.end_date||new Date(end);\r\n\t\tbase.text = base.text||this.locale.labels.new_event;\r\n\t\tbase.id = this._drag_id = this.uid();\r\n\t\tbase.layer = this.defaultLayer;\r\n\t\tthis._drag_mode=\"new-size\";\r\n\r\n\t\tthis._loading=true;\r\n\t\tthis.addEvent(base);\r\n\t\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\t\tthis._loading=false;\r\n\r\n\t\tthis._drag_event={}; //dummy , to trigger correct event updating logic\r\n\t\tthis._on_mouse_up(e);\r\n\t};\r\n\r\n\tscheduler._t_render_view_data = function(events) { // helper\r\n\t\tif (this.config.multi_day && !this._table_view) {\r\n\t\t\tvar tvs = [];\r\n\t\t\tvar tvd = [];\r\n\t\t\tfor (var k = 0; k < events.length; k++) {\r\n\t\t\t\tif (events[k]._timed)\r\n\t\t\t\t\ttvs.push(events[k]);\r\n\t\t\t\telse\r\n\t\t\t\t\ttvd.push(events[k]);\r\n\t\t\t}\r\n\t\t\tthis._table_view = true;\r\n\t\t\tthis.render_data(tvd);\r\n\t\t\tthis._table_view = false;\r\n\t\t\tthis.render_data(tvs);\r\n\t\t}\r\n\t\telse\r\n\t\t\tthis.render_data(events);\r\n\t};\r\n\r\n\tscheduler.render_view_data = function(){\r\n\t\tif (this._not_render) {\r\n\t\t\tthis._render_wait = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._render_wait = false;\r\n\r\n\t\tthis.clear_view();\r\n\r\n\t\tthis._evs_layer = {};\r\n\t\tfor (var i = 0; i < this.layers.length; i++) { // array in object for each layer\r\n\t\t\tthis._evs_layer[this.layers[i].name] = [];\r\n\t\t}\r\n\r\n\t\tvar evs = this.get_visible_events();\r\n\t\tfor (var i = 0; i < evs.length; i++) { // filling layer arrays with events\r\n\t\t\tif(this._evs_layer[evs[i].layer])\r\n\t\t\t\tthis._evs_layer[evs[i].layer].push(evs[i]);\r\n\t\t}\r\n\r\n\t\tif(this._mode == 'month') { // old logic is used\r\n\t\t\tvar tevs = [];\r\n\t\t\tfor (var i = 0; i < this.layers.length; i++) {\r\n\t\t\t\tif (this.layers[i].visible)\r\n\t\t\t\t\ttevs = tevs.concat(this._evs_layer[this.layers[i].name]);\r\n\t\t\t}\r\n\t\t\tthis._t_render_view_data(tevs);\r\n\t\t}\r\n\t\telse { // week, day; should use new logic\r\n\t\t\tfor (var i = 0; i < this.layers.length; i++) {\r\n\t\t\t\tif (this.layers[i].visible) {\r\n\t\t\t\t\tvar evs_layer = this._evs_layer[this.layers[i].name];\r\n\t\t\t\t\tthis._t_render_view_data(evs_layer);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._render_v_bar=function(ev,x,y,w,h,style,contentA,contentB,bottom){\r\n\t\tvar id = ev.id;\r\n\r\n\t\tif(contentA.indexOf('
';\r\n\t\thtml+='
 
';\r\n\t\thtml+='
'+contentA+'
';\r\n\t\thtml+='
'+contentB+'
';\r\n\t\thtml+='
';\r\n\r\n\t\td.innerHTML=html;\r\n\t\td.style.zIndex = 100;\r\n\t\treturn d.firstChild;\r\n\t};\r\n\r\n\tscheduler.render_event_bar=function(ev){\r\n\t\tvar parent=this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tvar x=this._colsS[ev._sday];\r\n\t\tvar x2=this._colsS[ev._eday];\r\n\t\tif (x2==x) x2=this._colsS[ev._eday+1];\r\n\t\tvar hb = this.xy.bar_height;\r\n\r\n\t\tvar y=this._colsS.heights[ev._sweek]+(this._colsS.height?(this.xy.month_scale_height+2):2)+ev._sorder*hb;\r\n\r\n\t\tvar d=document.createElement(\"div\");\r\n\t\tvar cs = ev._timed?\"dhx_cal_event_clear\":\"dhx_cal_event_line\";\r\n\t\tvar cse = (scheduler.templates['event_class_'+ev.layer])?scheduler.templates['event_class_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_class(ev.start_date,ev.end_date,ev);\r\n\t\tif (cse) cs=cs+\" \"+cse;\r\n\r\n\t\tvar html='
';\r\n\r\n\t\tif (ev._timed)\r\n\t\t\thtml+=(scheduler.templates['event_bar_date_'+ev.layer])?scheduler.templates['event_bar_date_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_bar_date(ev.start_date,ev.end_date,ev);\r\n\t\thtml+=( (scheduler.templates['event_bar_text_'+ev.layer])?scheduler.templates['event_bar_text_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_bar_text(ev.start_date,ev.end_date,ev) + '
)');\r\n\t\thtml+='';\r\n\r\n\t\td.innerHTML=html;\r\n\r\n\t\tthis._rendered.push(d.firstChild);\r\n\t\tparent.appendChild(d.firstChild);\r\n\t};\r\n\r\n\tscheduler.render_event=function(ev){\r\n\t\tvar menu = scheduler.xy.menu_width;\r\n\t\tif(scheduler.getLayer(ev.layer).noMenu)\r\n\t\t\tmenu = 0;\r\n\r\n\t\tif (ev._sday<0) return; //can occur in case of recurring event during time shift\r\n\t\tvar parent=scheduler.locate_holder(ev._sday);\r\n\t\tif (!parent) return; //attempt to render non-visible event\r\n\t\tvar sm = ev.start_date.getHours()*60+ev.start_date.getMinutes();\r\n\t\tvar em = (ev.end_date.getHours()*60+ev.end_date.getMinutes())||(scheduler.config.last_hour*60);\r\n\r\n\t\tvar top = (Math.round((sm*60*1000-this.config.first_hour*60*60*1000)*this.config.hour_size_px/(60*60*1000)))%(this.config.hour_size_px*24)+1; //42px/hour\r\n\t\tvar height = Math.max(scheduler.xy.min_event_height,(em-sm)*this.config.hour_size_px/60)+1; //42px/hour\r\n\t\t\r\n\t\tvar width=Math.floor((parent.clientWidth-menu)/ev._count);\r\n\t\tvar left=ev._sorder*width+1;\r\n\t\tif (!ev._inner) width=width*(ev._count-ev._sorder);\r\n\r\n\r\n\r\n\t\tvar d=this._render_v_bar(ev.id,menu+left,top,width,height,ev._text_style,scheduler.templates.event_header(ev.start_date,ev.end_date,ev),scheduler.templates.event_text(ev.start_date,ev.end_date,ev));\r\n\r\n\t\tthis._rendered.push(d);\r\n\t\tparent.appendChild(d);\r\n\r\n\t\tleft=left+parseInt(parent.style.left,10)+menu;\r\n\r\n\t\ttop+=this._dy_shift; //corrupt top, to include possible multi-day shift\r\n\t\td.style.zIndex = this._layers_zindex[ev.layer];\r\n\r\n\t\tif (this._edit_id==ev.id){\r\n\t\t\td.style.zIndex = parseInt(d.style.zIndex)+1; //fix overlapping issue\r\n\t\t\tvar new_zIndex = d.style.zIndex;\r\n\t\t\twidth=Math.max(width-4,scheduler.xy.editor_width);\r\n\t\t\tvar d=document.createElement(\"div\");\r\n\t\t\td.setAttribute(\"event_id\",ev.id); // for backward compatibility\r\n\t\t\td.setAttribute(this.config.event_attribute,ev.id);\r\n\t\t\tthis.set_xy(d,width,height-20,left,top+14);\r\n\t\t\td.className=\"dhx_cal_editor\";\r\n\t\t\td.style.zIndex = new_zIndex;\r\n\t\t\tvar d2=document.createElement(\"div\");\r\n\t\t\tthis.set_xy(d2,width-6,height-26);\r\n\t\t\td2.style.cssText+=\";margin:2px 2px 2px 2px;overflow:hidden;\";\r\n\r\n\r\n\t\t\td2.style.zIndex = new_zIndex;\r\n\t\t\td.appendChild(d2);\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].appendChild(d);\r\n\t\t\tthis._rendered.push(d);\r\n\r\n\t\t\td2.innerHTML=\"\";\r\n\r\n\t\t\tthis._editor=d2.firstChild;\r\n\t\t\tthis._editor.addEventListener(\"keypress\", function(e){\r\n\t\t\t\tif (e.shiftKey) return true;\r\n\t\t\t\tvar code= e.keyCode;\r\n\t\t\t\tif (code==scheduler.keys.edit_save) scheduler.editStop(true);\r\n\t\t\t\tif (code==scheduler.keys.edit_cancel) scheduler.editStop(false);\r\n\t\t\t});\r\n\t\t\tthis._editor.addEventListener(\"selectstart\", function(e){ e.cancelBubble=true; return true; });\r\n\t\t\td2.firstChild.focus();\r\n\t\t\t//IE and opera can add x-scroll during focusing\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].scrollLeft=0;\r\n\t\t\td2.firstChild.select();\r\n\t\t}\r\n\t\tif (this._select_id==ev.id){\r\n\t\t\td.style.zIndex = parseInt(d.style.zIndex)+1; //fix overlapping issue\r\n\t\t\tvar icons=this.config[\"icons_\"+((this._edit_id==ev.id)?\"edit\":\"select\")];\r\n\t\t\tvar icons_str=\"\";\r\n\t\t\tfor (var i=0; i\";\r\n\t\t\tvar obj = this._render_v_bar(ev.id,left-menu+1,top,menu,icons.length*20+26,\"\",\"
\",icons_str,true);\r\n\t\t\tobj.style.left=left-menu+1;\r\n\t\t\tobj.style.zIndex = d.style.zIndex;\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].appendChild(obj);\r\n\t\t\tthis._rendered.push(obj);\r\n\t\t}\r\n\r\n\t};\r\n\r\n scheduler.filter_agenda = function(id, event) {\r\n var layer = scheduler.getLayer(event.layer);\r\n return (layer && layer.visible);\r\n };\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.limit_start = null;\r\nscheduler.config.limit_end = null;\r\nscheduler.config.limit_view = false;\r\nscheduler.config.check_limits = true;\r\nscheduler.config.mark_now = true;\r\nscheduler.config.display_marked_timespans = true;\r\nscheduler.config.overwrite_marked_timespans = true;\r\nscheduler._temp_limit_scope = function(){\r\n\tvar before = null;\r\n\tvar dhx_time_block = \"dhx_time_block\";\r\n\tvar default_timespan_type = \"default\";\r\n\tvar fix_options = function(options, days, zones) {\r\n\t\tif (days instanceof Date && zones instanceof Date) {\r\n\t\t\toptions.start_date = days;\r\n\t\t\toptions.end_date = zones;\r\n\t\t} else {\r\n\t\t\toptions.days = days;\r\n\t\t\toptions.zones = zones;\r\n\t\t}\r\n\t\treturn options;\r\n\t};\r\n\tvar get_resulting_options = function(days, zones, sections) {\r\n\t\tvar options = (typeof days == \"object\") ? days : { days: days };\r\n\t\toptions.type = dhx_time_block;\r\n\t\toptions.css = \"\";\r\n\t\tif (zones) {\r\n\t\t\tif (sections)\r\n\t\t\t\toptions.sections = sections;\r\n\t\t\toptions = fix_options(options, days, zones);\r\n\t\t}\r\n\t\treturn options;\r\n\t};\r\n\tscheduler.blockTime = function(days, zones, sections){\r\n\t\tvar options = get_resulting_options(days, zones, sections);\r\n\t\treturn scheduler.addMarkedTimespan(options);\r\n\t};\r\n\tscheduler.unblockTime = function(days, zones, sections) {\r\n\t\tzones = zones || \"fullday\";\r\n\t\tvar options = get_resulting_options(days, zones, sections);\r\n\t\treturn scheduler.deleteMarkedTimespan(options);\r\n\t};\r\n\tscheduler.attachEvent(\"onBeforeViewChange\",function(om,od,nm,nd){\r\n\r\n\t\tfunction isBlocked(date, mode){\r\n\t\t\tvar limit_start = scheduler.config.limit_start,\r\n\t\t\t\tlimit_end = scheduler.config.limit_end,\r\n\t\t\t\tdate_end = scheduler.date.add(date,1,mode);\r\n\r\n\t\t\treturn (date.valueOf() > limit_end.valueOf() || date_end <= limit_start.valueOf());\r\n\t\t}\r\n\r\n\t\tif (scheduler.config.limit_view){\r\n\t\t\tnd = nd||od; nm = nm||om;\r\n\t\t\tif (isBlocked(nd, nm) && !(od.valueOf() == nd.valueOf())){\r\n\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvar resetDate = !isBlocked(od, nm) ? od : scheduler.config.limit_start;\r\n\r\n\t\t\t\t\tscheduler.setCurrentView(!isBlocked(resetDate, nm) ? resetDate : null, nm);\r\n\t\t\t\t},1);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.checkInMarkedTimespan = function(ev, timespan_type, on_overlap){\r\n\t\ttimespan_type = timespan_type || default_timespan_type;\r\n\r\n\t\tvar res = true;\r\n\t\tvar temp_start_date = new Date(ev.start_date.valueOf());\r\n\t\tvar temp_end_date = scheduler.date.add(temp_start_date, 1, \"day\");\r\n\t\tvar timespans = scheduler._marked_timespans;\r\n\t\tfor (; temp_start_date < ev.end_date; temp_start_date = scheduler.date.date_part(temp_end_date), temp_end_date = scheduler.date.add(temp_start_date, 1, \"day\") ) {\r\n\t\t\tvar day_value = +scheduler.date.date_part( new Date(temp_start_date) ); // the first part of event not necessarily contains only date part\r\n\t\t\tvar day_index = temp_start_date.getDay();\r\n\r\n\t\t\tvar zones = getZones(ev, timespans, day_index, day_value, timespan_type);\r\n\t\t\tif (zones){\r\n\t\t\t\tfor (var i = 0; i < zones.length; i+=2) {\r\n\r\n\t\t\t\t\t// they may change for new event if it passes limit zone\r\n\t\t\t\t\tvar eventStart = scheduler._get_zone_minutes(temp_start_date);\r\n\t\t\t\t\tvar eventEnd = ( ev.end_date>temp_end_date || ev.end_date.getDate() != temp_start_date.getDate() ) ? 1440 : scheduler._get_zone_minutes(ev.end_date);\r\n\r\n\t\t\t\t\tvar markerStart = zones[i];\r\n\t\t\t\t\tvar markerEnd = zones[i+1];\r\n\t\t\t\t\tif (markerStarteventStart) {\r\n\t\t\t\t\t\tif(typeof on_overlap == \"function\"){\r\n\t\t\t\t\t\t\t//handler allows to cancel overlapping\r\n\t\t\t\t\t\t\t//actually needed only to keep default behavior of limits\r\n\t\t\t\t\t\t\tres = on_overlap(ev, eventStart, eventEnd, markerStart, markerEnd);//event object, event start/end minutes in 'zones' format, zone start/end minutes\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tres = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(!res)\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn !res;\r\n\t};\r\n\tvar blocker = scheduler.checkLimitViolation = function(event){\r\n\t\tif(!event)\r\n\t\t\treturn true;\r\n\t\tif (!scheduler.config.check_limits)\r\n\t\t\treturn true;\r\n\t\tvar s = scheduler;\r\n\t\tvar c = s.config;\r\n\t\tvar evs = [];\r\n\t\tif (event.rec_type) {\r\n\t\t\tvar dates = scheduler.getRecDates(event);\r\n\t\t\tfor(var i=0; i < dates.length; i++){\r\n\t\t\t\tvar ev = scheduler._copy_event(event);\r\n\t\t\t\tscheduler._lame_copy(ev, dates[i]);\r\n\t\t\t\tevs.push(ev);\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\tevs = [event];\r\n\t\t}\r\n\r\n\t\tvar complete_res = true;\r\n\t\tfor (var p=0; p= c.limit_start.valueOf() && ev.end_date.valueOf() <= c.limit_end.valueOf()) : true;\r\n\t\t\tif (res){\r\n\t\t\t\tres = !scheduler.checkInMarkedTimespan(ev, dhx_time_block, function(event, eventStart, eventEnd, markerStart, markerEnd){\r\n\t\t\t\t\t//try crop event to allow placing\r\n\t\t\t\t\tvar allow = true;\r\n\t\t\t\t\tif (eventStart<=markerEnd && eventStart >= markerStart){\r\n\t\t\t\t\t\tif (markerEnd == 24*60 || eventEnd <= markerEnd){\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(event._timed && s._drag_id && s._drag_mode == \"new-size\"){\r\n\t\t\t\t\t\t\tevent.start_date.setHours(0);\r\n\t\t\t\t\t\t\tevent.start_date.setMinutes(markerEnd);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ((eventEnd >= markerStart && eventEnd <= markerEnd) || (eventStart < markerStart && eventEnd > markerEnd)){\r\n\t\t\t\t\t\tif(event._timed && s._drag_id && s._drag_mode == \"new-size\"){\r\n\t\t\t\t\t\t\tevent.end_date.setHours(0);\r\n\t\t\t\t\t\t\tevent.end_date.setMinutes(markerStart);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn allow;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\tif (!res) {\r\n\t\t\t\tres = (s.checkEvent(\"onLimitViolation\")) ? s.callEvent(\"onLimitViolation\",[ev.id, ev]) : res;\r\n\t\t\t}\r\n\t\t\tcomplete_res = complete_res && res;\r\n\t\t}\r\n\t\tif(!complete_res){\r\n\t\t\ts._drag_id = null;\r\n\t\t\ts._drag_mode = null;\r\n\t\t}\r\n\t\treturn complete_res;\r\n\r\n\r\n\t};\r\n\tscheduler._get_blocked_zones = function(timespans, property, day_index, day_value, timespan_type){\r\n\t\tvar zones =[];\r\n\t\tif (timespans && timespans[property]) {\r\n\t\t\tvar timeline_zones = timespans[property];\r\n\t\t\tvar blocked_timeline_zones = this._get_relevant_blocked_zones(day_index, day_value, timeline_zones, timespan_type);\r\n\t\t\tfor (var i=0; i= scheduler.config.limit_end.valueOf()) {\r\n\t\t\t\tev.start_date = this.date.add(scheduler.config.limit_end, -1, \"day\");\r\n\t\t\t}\r\n\t\t\tif (ev.end_date < scheduler.config.limit_start) {\r\n\t\t\t\tev.end_date = new Date(scheduler.config.limit_start);\r\n\t\t\t}\r\n\t\t\tif (ev.end_date.valueOf() >= scheduler.config.limit_end.valueOf()) {\r\n\t\t\t\tev.end_date = this.date.add(scheduler.config.limit_end, -1, \"day\");\r\n\t\t\t}\r\n\t\t\tif (ev.start_date.valueOf() >= ev.end_date.valueOf()) {\r\n\t\t\t\tev.end_date = this.date.add(ev.start_date, (this.config.event_duration||this.config.time_step), \"minute\");\r\n\t\t\t}\r\n\t\t\tev._timed=this.isOneDayEvent(ev);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventChanged\",function(id){\r\n\t\tif (!id) return true;\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tif (!blocker(ev)){\r\n\t\t\tif (!before) return false;\r\n\t\t\tev.start_date = before[0];\r\n\t\t\tev.end_date = before[1];\r\n\t\t\tev._timed=this.isOneDayEvent(ev);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onBeforeEventChanged\",function(ev, native_object, is_new){\r\n\t\treturn blocker(ev);\r\n\t});\r\n\tscheduler.attachEvent(\"onBeforeEventCreated\", function(ev) { // native event\r\n\t\tvar start_date = scheduler.getActionData(ev).date;\r\n\t\tvar event = {\r\n\t\t\t_timed: true,\r\n\t\t\tstart_date: start_date,\r\n\t\t\tend_date: scheduler.date.add(start_date, scheduler.config.time_step, \"minute\")\r\n\t\t};\r\n\t\treturn blocker(event);\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", function(){\r\n\t\tscheduler._mark_now();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onAfterSchedulerResize\", function(){\r\n\t\twindow.setTimeout(function(){ \r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler._mark_now(); \r\n\t\t}, 1);\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\t\tscheduler._mark_now_timer = window.setInterval(function() {\r\n\t\t\tif(!scheduler._is_initialized())\r\n\t\t\t\treturn;\r\n\t\t\tscheduler._mark_now();\r\n\t\t}, 60000);\r\n\t});\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tclearInterval(scheduler._mark_now_timer);\r\n\t});\r\n\tscheduler._mark_now = function(hide) {\r\n\t\t// day, week, units views\r\n\t\tvar dhx_now_time = 'dhx_now_time';\r\n\t\tif (!this._els[dhx_now_time]) {\r\n\t\t\tthis._els[dhx_now_time] = [];\r\n\t\t}\r\n\t\tvar now = scheduler._currentDate();\r\n\t\tvar cfg = this.config;\r\n\t\tscheduler._remove_mark_now(); // delete previous marks if they exist\r\n\t\tif (!hide && cfg.mark_now && now < this._max_date && now > this._min_date && now.getHours() >= cfg.first_hour && now.getHours() 1) {\r\n\t\t\t\t\tif(view.size && view.options.length){\r\n\t\t\t\t\t\tday_index = ((view.position+ day_index) / view.options.length) * view.size;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstart_index = day_index;\r\n\t\t\t\t\tend_index = day_index + units_l;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tstart_index = 0;\r\n\t\t\t\t\tend_index = start_index + units_l;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar r_divs = [];\r\n\r\n\t\t\t\tfor (var i = start_index; i < end_index; i++) {\r\n\t\t\t\t\tvar t_day = i; // as each unit is actually considered +1 day\r\n\t\t\t\t\toptions.days = t_day;\r\n\t\t\t\t\tvar t_div = scheduler._render_marked_timespan(options, null, t_day)[0];\r\n\t\t\t\t\tr_divs.push(t_div);\r\n\t\t\t\t}\r\n\t\t\t\treturn r_divs;\r\n\t\t\t} else { // day/week views\r\n\t\t\t\toptions.days = day_index;\r\n\t\t\t\treturn scheduler._render_marked_timespan(options, null, day_index);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\toptions.days = +scheduler.date.date_part(now);\r\n\t\t\t\treturn scheduler._render_marked_timespan(options, null, null);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\tscheduler._remove_mark_now = function() {\r\n\t\tvar dhx_now_time = 'dhx_now_time';\r\n\t\tvar els = this._els[dhx_now_time];\r\n\t\tfor (var i=0; i config.start_date) || (config.days !== undefined && config.zones)) && !config.type )\r\n\t\t\treturn r_configs; // incorrect config was provided\r\n\r\n\t\tvar min = 0;\r\n\t\tvar max = 24*60;\r\n\t\tif (config.zones == \"fullday\")\r\n\t\t\tconfig.zones = [min, max];\r\n\t\tif (config.zones && config.invert_zones) {\r\n\t\t\tconfig.zones = scheduler.invertZones(config.zones);\r\n\t\t}\r\n\r\n\t\tconfig.id = scheduler.uid();\r\n\t\tconfig.css = config.css||\"\";\r\n\t\tconfig.type = config.type||default_timespan_type;\r\n\r\n\t\tvar sections = config.sections;\r\n\t\tif (sections) {\r\n\t\t\tfor (var view_key in sections) {\r\n\t\t\t\tif (sections.hasOwnProperty(view_key)) {\r\n\t\t\t\t\tvar ids = sections[view_key];\r\n\t\t\t\t\tif (!(ids instanceof Array))\r\n\t\t\t\t\t\tids = [ids];\r\n\t\t\t\t\tfor (var i=0; i t_sd) ? scheduler._get_zone_minutes(start_date) : min;\r\n\t\t\t\t\tvar zone_end = ( end_date > t_ed || end_date.getDate() != t_sd.getDate() ) ? max : scheduler._get_zone_minutes(end_date);\r\n\t\t\t\t\tt_config.zones = [zone_start, zone_end];\r\n\t\t\t\t\tr_configs.push(t_config);\r\n\r\n\t\t\t\t\tt_sd = t_ed;\r\n\t\t\t\t\tt_ed = scheduler.date.add(t_ed, 1, \"day\");\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (c_config.days instanceof Date)\r\n\t\t\t\t\tc_config.days = (scheduler.date.date_part(c_config.days)).valueOf();\r\n\t\t\t\tc_config.zones = config.zones.slice();\r\n\t\t\t\tr_configs.push(c_config);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn r_configs;\r\n\t};\r\n\tscheduler._get_dates_by_index = function(index, start, end) {\r\n\t\tvar dates = [];\r\n\t\tstart = scheduler.date.date_part(new Date(start||scheduler._min_date));\r\n\t\tend = new Date(end||scheduler._max_date);\r\n\t\tvar start_day = start.getDay();\r\n\t\tvar delta = (index-start_day >= 0) ? (index-start_day) : (7-start.getDay()+index);\r\n\t\tvar t_date = scheduler.date.add(start, delta, \"day\");\r\n\t\tfor (; t_date < end; t_date = scheduler.date.add(t_date, 1, \"week\")) {\r\n\t\t\tdates.push(t_date);\r\n\t\t}\r\n\t\treturn dates;\r\n\t};\r\n\tscheduler._get_css_classes_by_config = function(config) {\r\n\t\tvar css_classes = [];\r\n\t\tif (config.type == dhx_time_block) {\r\n\t\t\tcss_classes.push(dhx_time_block);\r\n\t\t\tif (config.css)\r\n\t\t\t\tcss_classes.push(dhx_time_block+\"_reset\");\r\n\t\t}\r\n\t\tcss_classes.push(\"dhx_marked_timespan\", config.css);\r\n\t\treturn css_classes.join(\" \");\r\n\t};\r\n\tscheduler._get_block_by_config = function(config) {\r\n\t\tvar block = document.createElement(\"div\");\r\n\t\tif (config.html) {\r\n\t\t\tif (typeof config.html == \"string\")\r\n\t\t\t\tblock.innerHTML = config.html;\r\n\t\t\telse\r\n\t\t\t\tblock.appendChild(config.html);\r\n\t\t}\r\n\t\treturn block;\r\n\t};\r\n\tscheduler._render_marked_timespan = function(options, area, day) {\r\n\t\tvar blocks = []; // resulting block which will be rendered and returned\r\n\t\tvar c = scheduler.config;\r\n\t\tvar min_date = this._min_date;\r\n\t\tvar max_date = this._max_date;\r\n\t\tvar day_value = false; // if timespan for specific date should be displayed\r\n\r\n\t\tif (!c.display_marked_timespans)\r\n\t\t\treturn blocks;\r\n\r\n\t\t// in case of markTimespan\r\n\t\tif (!day && day !== 0) {\r\n\t\t\tif (options.days < 7)\r\n\t\t\t\tday = options.days;\r\n\t\t\telse {\r\n\t\t\t\tvar date_to_display = new Date(options.days);\r\n\t\t\t\tday_value = +date_to_display;\r\n\r\n\t\t\t\t// in case of markTimespan date could be not in the viewing range, need to return\r\n\t\t\t\tif ( !(+max_date > +date_to_display && +min_date <= +date_to_display) )\r\n\t\t\t\t\treturn blocks;\r\n\r\n\t\t\t\tday = date_to_display.getDay();\r\n\t\t\t}\r\n\r\n\t\t\t// convert day default index (Sun - 0, Sat - 6) to index of hourscales (depends on week_start and config.start_on_monday)\r\n\t\t\tvar min_day = min_date.getDay();\r\n\t\t\tif (min_day > day) {\r\n\t\t\t\tday = 7 - (min_day-day);\r\n\t\t\t} else {\r\n\t\t\t\tday = day - min_day;\r\n\t\t\t}\r\n\t\t}\r\n\t\tvar zones = options.zones;\r\n\t\tvar css_classes = scheduler._get_css_classes_by_config(options);\r\n\r\n\t\tif (scheduler._table_view && scheduler._mode == \"month\") {\r\n\t\t\tvar areas = [];\r\n\t\t\tvar days = [];\r\n\r\n\r\n\t\t\tif (!area) {\r\n\t\t\t\tdays = (day_value) ? [day_value] : scheduler._get_dates_by_index(day);\r\n\t\t\t\tfor (var i=0; i < days.length; i++) {\r\n\t\t\t\t\tareas.push( this._scales[days[i]] );\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tareas.push(area);\r\n\t\t\t\tdays.push(day);\r\n\t\t\t}\r\n\r\n\t\t\tfor (var i=0; i < areas.length; i++) {\r\n\t\t\t\tarea = areas[i];\r\n\t\t\t\tday = days[i];\r\n\r\n\t\t\t\tvar sday = this.locate_holder_day(day, false) % this._cols.length;\r\n\r\n\t\t\t\tif(this._ignores[sday]) continue;\r\n\r\n\t\t\t\tvar block_proto = scheduler._get_block_by_config(options);\r\n\t\t\t\tblock_proto.className = css_classes;\r\n\t\t\t\tblock_proto.style.top = \"0px\";\r\n\t\t\t\tblock_proto.style.height = \"100%\";\r\n\t\t\t\t\r\n\t\t\t\tfor (var k=0; k < zones.length; k+=2) {\r\n\t\t\t\t\tvar start = zones[i];\r\n\t\t\t\t\tvar end = zones[i+1];\r\n\t\t\t\t\tif (end <= start)\r\n\t\t\t\t\t\treturn [];\r\n\r\n\t\t\t\t\tvar block = block_proto.cloneNode(true);\r\n\r\n\t\t\t\t\tblock.style.left = \"0px\";\r\n\t\t\t\t\tblock.style.width = \"100%\";\r\n\r\n\t\t\t\t\tarea.appendChild(block);\r\n\t\t\t\t\tblocks.push(block);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tvar index = day;\r\n\r\n\t\t\tif(this._ignores[this.locate_holder_day(day, false)]) return blocks;\r\n\r\n\t\t\tif (this._props && this._props[this._mode] && options.sections && options.sections[this._mode]) {\r\n\t\t\t\tvar view = this._props[this._mode];\r\n\t\t\t\tindex = view.order[options.sections[this._mode]];\r\n\r\n\t\t\t\tvar inner_index = view.order[options.sections[this._mode]];\r\n\t\t\t\tif(!(view.days > 1)){\r\n\t\t\t\t\tindex = inner_index;\r\n\t\t\t\t\tif (view.size && (index > view.position+view.size)) {\r\n\t\t\t\t\t\tindex = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar units_l = view.size || view.options.length;\r\n\t\t\t\t\tindex = index*units_l + inner_index;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tarea = area ? area : scheduler.locate_holder(index);\r\n\r\n\t\t\tfor (var i = 0; i < zones.length; i+=2){\r\n\t\t\t\tvar start = Math.max(zones[i], c.first_hour*60);\r\n\t\t\t\tvar end = Math.min(zones[i+1], c.last_hour*60);\r\n\t\t\t\tif (end <= start) {\r\n\t\t\t\t\tif (i+2 < zones.length)\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\treturn [];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar block = scheduler._get_block_by_config(options);\r\n\t\t\t\tblock.className = css_classes;\r\n\r\n\t\t\t\t// +1 for working with section which really takes up whole height (as % would be == 0)\r\n\t\t\t\tvar all_hours_height = this.config.hour_size_px*24 + 1;\r\n\t\t\t\tvar hour_ms = 60*60*1000;\r\n\t\t\t\tblock.style.top = (Math.round((start*60*1000-this.config.first_hour*hour_ms)*this.config.hour_size_px/hour_ms) % all_hours_height) + \"px\";\r\n\t\t\t\tblock.style.height = Math.max((Math.round(((end-start)*60*1000)*this.config.hour_size_px/hour_ms)) % all_hours_height, 1)+\"px\";\r\n\r\n\t\t\t\tarea.appendChild(block);\r\n\t\t\t\tblocks.push(block);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn blocks;\r\n\t};\r\n\r\n\tscheduler._mark_timespans = function(){\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\t\tvar divs = [];\r\n\t\tif (scheduler._table_view && scheduler._mode == \"month\"){\r\n\t\t\tfor (var day in this._scales) {\r\n\t\t\t\tvar date = new Date(+day);\r\n\t\t\t\tdivs.push.apply(divs, scheduler._on_scale_add_marker(this._scales[day],date));\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\t//manually trigger rendering of configs for each column\r\n\t\t\tvar date = new Date(scheduler._min_date);\r\n\t\t\tfor (var i = 0, len = data.childNodes.length; i < len; i++) {\r\n\t\t\t\tvar area = data.childNodes[i];\r\n\t\t\t\tif (area.firstChild && scheduler._getClassName(area.firstChild).indexOf(\"dhx_scale_hour\") > -1) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdivs.push.apply(divs, scheduler._on_scale_add_marker(area, date));\r\n\t\t\t\tdate = scheduler.date.add(date, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn divs;\r\n\t};\r\n\r\n\t// just marks timespan, will be cleaned after refresh\r\n\tscheduler.markTimespan = function(configuration) {\r\n\r\n\t\tif(!this._els){\r\n\t\t\tthrow new Error(\"`scheduler.markTimespan` can't be used before scheduler initialization. Place `scheduler.markTimespan` call after `scheduler.init`.\");\r\n\t\t}\r\n\r\n\t\tvar rebuild_els = false;\r\n\t\tif(!this._els[\"dhx_cal_data\"]){\r\n\t\t\tscheduler.get_elements();\r\n\t\t\trebuild_els = true;\r\n\t\t}\r\n\r\n\r\n\t\t// backup regular marked timespans\r\n\t\tvar timespans_ids = scheduler._marked_timespans_ids,\r\n\t\t\ttimespan_types = scheduler._marked_timespans_types,\r\n\t\t\ttimespans = scheduler._marked_timespans;\r\n\r\n\t\tscheduler.deleteMarkedTimespan();\r\n\r\n\t\t//add block to configs\r\n\t\tscheduler.addMarkedTimespan(configuration);\r\n\r\n\t\tvar divs = scheduler._mark_timespans();\r\n\r\n\t\tif(rebuild_els)\r\n\t\t\tscheduler._els = [];\r\n\r\n\t\t// restore timespan config\r\n\t\tscheduler._marked_timespans_ids = timespans_ids;\r\n\t\tscheduler._marked_timespans_types = timespan_types;\r\n\t\tscheduler._marked_timespans = timespans;\r\n\r\n\t\treturn divs;\r\n\t};\r\n\tscheduler.unmarkTimespan = function(divs) {\r\n\t\tif (!divs)\r\n\t\t\treturn;\r\n\t\tfor (var i=0; i c_zone_end && zone_start <= c_zone_end) || (zone_start < c_zone_start && zone_end >= c_zone_start)) {\r\n\t\t\t\t\tresulting_zones[i] = Math.min(c_zone_start, zone_start);\r\n\t\t\t\t\tresulting_zones[i+1] = Math.max(c_zone_end, zone_end);\r\n\t\t\t\t\ti -= 2;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (!isLast) // do nothing, maybe next current zone will match or will be last\r\n\t\t\t\t\t\tcontinue;\r\n\r\n\t\t\t\t\tvar offset = (c_zone_start > zone_start)?0:2;\r\n\t\t\t\t\tresulting_zones.splice(i+offset, 0, zone_start, zone_end); // last current zone, need to add another\r\n\t\t\t\t}\r\n\t\t\t\tzones.splice(k--,2); // zone was merged or added, need to exclude it\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn resulting_zones;\r\n\t};\r\n\tscheduler._subtract_timespan_zones = function(current_zones, zones) {\r\n\t\tvar resulting_zones = current_zones.slice();\r\n\t\tfor (var i=0; i c_zone_start && zone_start < c_zone_end) {\r\n\t\t\t\t\tvar is_modified = false;\r\n\t\t\t\t\tif (c_zone_start >= zone_start && c_zone_end <= zone_end) {\r\n\t\t\t\t\t\tresulting_zones.splice(i, 2);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (c_zone_start < zone_start) {\r\n\t\t\t\t\t\tresulting_zones.splice(i, 2, c_zone_start, zone_start);\r\n\t\t\t\t\t\tis_modified = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (c_zone_end > zone_end) {\r\n\t\t\t\t\t\tresulting_zones.splice( (is_modified)?(i+2):i, (is_modified)?0:2, zone_end, c_zone_end);\r\n\t\t\t\t\t}\r\n\t\t\t\t\ti -= 2;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn resulting_zones;\r\n\t};\r\n\tscheduler.invertZones = function(zones) {\r\n\t\treturn scheduler._subtract_timespan_zones([0, 1440], zones.slice());\r\n\t};\r\n\tscheduler._delete_marked_timespan_by_id = function(id) {\r\n\t\tvar configs = scheduler._marked_timespans_ids[id];\r\n\t\tif (configs) {\r\n\t\t\tfor (var i=0; i 1)){\r\n\t\t\t\tday = scheduler.date.date_part(new Date(this._date)); // for units view actually only 1 day is displayed yet the day variable will change, need to use this._date for all calls\r\n\t\t\t}else{\r\n\t\t\t\tvar dx = 24*60*60*1000;\r\n\t\t\t\tvar day_ind = Math.round((day - scheduler._min_date)/dx);\r\n\t\t\t\tvar unitsPerDay = view.size || units.length;\r\n\t\t\t\tday = scheduler.date.add(scheduler._min_date, Math.floor(day_ind/unitsPerDay), \"day\"); // to the \"same\" day for all sections\r\n\t\t\t\tday = scheduler.date.date_part(day);\r\n\t\t\t}\r\n\t\t\tday_index = day.getDay();\r\n\t\t\tday_value = day.valueOf();\r\n\r\n\t\t\tif (timespans[mode] && timespans[mode][unit.key]) {\r\n\t\t\t\tvar unit_zones = timespans[mode][unit.key];\r\n\t\t\t\tvar unit_types = scheduler._get_types_to_render(unit_zones[day_index], unit_zones[day_value]);\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(unit_types));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar global_data = timespans[\"global\"];\r\n\r\n\t\tif(scheduler.config.overwrite_marked_timespans){\r\n\t\t\tvar day_types = global_data[day_value]||global_data[day_index];\r\n\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(day_types));\r\n\t\t} else {\r\n\t\t\tif(global_data[day_value]){\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(global_data[day_value]));\r\n\t\t\t}\r\n\t\t\tif(global_data[day_index]){\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(global_data[day_index]));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (var i=0; i\" + ev.text + \"

\" + (ev.event_location || '') + \"

\" + scheduler.templates.marker_date(start) + \" - \" + scheduler.templates.marker_date(end) + \"\";\r\n};\r\nscheduler.dblclick_dhx_map_area = function() {\r\n\tif (!this.config.readonly && this.config.dblclick_create)\r\n\t\tthis.addEventNow({\r\n\t\t\tstart_date: scheduler._date,\r\n\t\t\tend_date: scheduler.date.add(scheduler._date, scheduler.config.time_step, \"minute\")\r\n\t\t});\r\n};\r\nscheduler.templates.map_time = function(start, end, ev) {\r\n\tif (scheduler.config.rtl && !ev._timed) {\r\n\t\treturn scheduler.templates.day_date(end) + \" – \" + scheduler.templates.day_date(start);\r\n\t} else if (ev._timed) {\r\n\t\treturn this.day_date(ev.start_date, ev.end_date, ev) + \" \" + this.event_date(start);\r\n\t} else {\r\n\t\treturn scheduler.templates.day_date(start) + \" – \" + scheduler.templates.day_date(end);\r\n\t}\r\n};\r\nscheduler.templates.map_text = function(start, end, ev) {\r\n\treturn ev.text;\r\n};\r\n\r\nscheduler.date.map_start = function(d) {\r\n\treturn d;\r\n};\r\nscheduler.date.add_map = function(date, inc, mode) {\r\n\treturn (new Date(date.valueOf()));\r\n};\r\n\r\nscheduler.templates.map_date = function(dd, ed, mode) {\r\n\treturn '';\r\n};\r\n\r\nscheduler._latLngUpdate = false; // flag for not displaying event second time in case of coordinates update\r\n\r\nscheduler.attachEvent(\"onSchedulerReady\", function() {\r\n\tscheduler._isMapPositionSet = false; // if user actual (geolocation) position was set on the map\r\n\r\n\tconst gmap = document.createElement('div');\r\n\tgmap.className = 'dhx_map';\r\n\tgmap.id = 'dhx_gmap';\r\n\tgmap.style.display = \"none\";\r\n\r\n\tscheduler._obj.appendChild(gmap);\r\n\r\n\tscheduler._els.dhx_gmap = [];\r\n\tscheduler._els.dhx_gmap.push(gmap);\r\n\r\n\t_setMapSize('dhx_gmap');\r\n\r\n\tconst mapOptions = {\r\n\t\tzoom: scheduler.config.map_initial_zoom || 10,\r\n\t\tcenter: scheduler.config.map_initial_position,\r\n\t\tmapTypeId: scheduler.config.map_type || google.maps.MapTypeId.ROADMAP\r\n\t};\r\n\tconst map = new google.maps.Map(document.getElementById('dhx_gmap'), mapOptions);\r\n\tmap.disableDefaultUI = false;\r\n\tmap.disableDoubleClickZoom = !scheduler.config.readonly;\r\n\r\n\tgoogle.maps.event.addListener(map, \"dblclick\", function(event) {\r\n\t\tconst geocoder = scheduler.ext.mapView.geocoder;\r\n\r\n\t\tif (!scheduler.config.readonly && scheduler.config.dblclick_create) {\r\n\t\t\tvar point = event.latLng;\r\n\t\t\tgeocoder.geocode(\r\n\t\t\t\t{ 'latLng': point },\r\n\t\t\t\tfunction(results, status) {\r\n\t\t\t\t\tif (status == google.maps.GeocoderStatus.OK) {\r\n\t\t\t\t\t\tpoint = results[0].geometry.location;\r\n\t\t\t\t\t\tscheduler.addEventNow({\r\n\t\t\t\t\t\t\tlat: point.lat(),\r\n\t\t\t\t\t\t\tlng: point.lng(),\r\n\t\t\t\t\t\t\tevent_location: results[0].formatted_address,\r\n\t\t\t\t\t\t\tstart_date: scheduler._date,\r\n\t\t\t\t\t\t\tend_date: scheduler.date.add(scheduler._date, scheduler.config.time_step, \"minute\")\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t}\r\n\t});\r\n\r\n\tvar infoWindowOptions = {\r\n\t\tcontent: ''\r\n\t};\r\n\r\n\tif (scheduler.config.map_infowindow_max_width) {\r\n\t\tinfoWindowOptions.maxWidth = scheduler.config.map_infowindow_max_width;\r\n\t}\r\n\r\n\tscheduler.map = {\r\n\t\t_points: [],\r\n\t\t_markers: [],\r\n\t\t_infowindow: new google.maps.InfoWindow(infoWindowOptions),\r\n\t\t_infowindows_content: [],\r\n\t\t_initialization_count: -1,\r\n\t\t_obj: map\r\n\t};\r\n\r\n\tscheduler.ext.mapView.geocoder = new google.maps.Geocoder();\r\n\tscheduler.ext.mapView.map = map;\r\n\tscheduler.ext.mapView.points = scheduler.map._points;\r\n\tscheduler.ext.mapView.markers = scheduler.map._markers;\r\n\tscheduler.ext.mapView.infoWindow = scheduler.map._infowindow;\r\n\r\n\tif (scheduler.config.map_resolve_user_location) {\r\n\t\tif (navigator.geolocation) {\r\n\t\t\tif (!scheduler._isMapPositionSet) {\r\n\t\t\t\tnavigator.geolocation.getCurrentPosition(function(position) {\r\n\t\t\t\t\tvar _userLocation = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);\r\n\t\t\t\t\tmap.setCenter(_userLocation);\r\n\t\t\t\t\tmap.setZoom(scheduler.config.map_zoom_after_resolve || 10);\r\n\t\t\t\t\tscheduler.map._infowindow.setContent(scheduler.locale.labels.marker_geo_success);\r\n\t\t\t\t\tscheduler.map._infowindow.position = map.getCenter();\r\n\t\t\t\t\tscheduler.map._infowindow.open(map);\r\n\r\n\t\t\t\t\tscheduler._isMapPositionSet = true;\r\n\t\t\t\t},\r\n\t\t\t\t\t\tfunction() {\r\n\t\t\t\t\t\t\tscheduler.map._infowindow.setContent(scheduler.locale.labels.marker_geo_fail);\r\n\t\t\t\t\t\t\tscheduler.map._infowindow.setPosition(map.getCenter());\r\n\t\t\t\t\t\t\tscheduler.map._infowindow.open(map);\r\n\t\t\t\t\t\t\tscheduler._isMapPositionSet = true;\r\n\t\t\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tgoogle.maps.event.addListener(map, \"resize\", function(event) {\r\n\t\tgmap.style.zIndex = '5';\r\n\t\tmap.setZoom(map.getZoom());\r\n\r\n\t});\r\n\tgoogle.maps.event.addListener(map, \"tilesloaded\", function(event) {\r\n\t\tgmap.style.zIndex = '5';\r\n\t});\r\n\r\n\tgmap.style.display = 'none'; // property was changed after attaching map\r\n\r\n\tconst old = scheduler.render_data;\r\n\tscheduler.render_data = function(evs, hold) {\r\n\t\tif (this._mode == \"map\") {\r\n\t\t\tfill_map_tab();\r\n\t\t\tvar events = scheduler.get_visible_events();\r\n\t\t\tfor (var i = 0; i < events.length; i++) {\r\n\t\t\t\tif (!scheduler.map._markers[events[i].id]) {\r\n\t\t\t\t\tshowAddress(events[i], false, false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else\r\n\t\t\treturn old.apply(this, arguments);\r\n\t};\r\n\r\n\tfunction set_full_view(mode) {\r\n\t\tif (mode) {\r\n\t\t\tvar l = scheduler.locale.labels;\r\n\t\t\tscheduler._els[\"dhx_cal_header\"][0].innerHTML = \"
\" + l.date + \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"
\" + l.description + \"
\";\r\n\t\t\tscheduler._table_view = true;\r\n\t\t\tscheduler.set_sizes();\r\n\t\t}\r\n\t}\r\n\r\n\tfunction clear_map_tab() {\r\n\t\tscheduler._selected_event_id = null;\r\n\t\tscheduler.map._infowindow.close();\r\n\t\tvar markers = scheduler.map._markers;\r\n\t\tfor (var key in markers) {\r\n\t\t\tif (markers.hasOwnProperty(key)) {\r\n\t\t\t\tmarkers[key].setMap(null);\r\n\t\t\t\tdelete scheduler.map._markers[key];\r\n\t\t\t\tif (scheduler.map._infowindows_content[key])\r\n\t\t\t\t\tdelete scheduler.map._infowindows_content[key];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction fill_map_tab() {\r\n\t\t//select events for which data need to be printed\r\n\t\tvar events = scheduler.get_visible_events();\r\n\t\tevents.sort(function(a, b) {\r\n\t\t\tif(a.start_date.valueOf()==b.start_date.valueOf())\r\n\t\t\t\treturn a.id>b.id?1:-1;\r\n\t\t\treturn a.start_date>b.start_date?1:-1;\r\n\t\t});\r\n\r\n\t\t//generate html for the view\r\n\t\tvar ariaAttr = scheduler._waiAria.mapAttrString();\r\n\r\n\t\tvar html = \"
\";\r\n\t\tfor (var i = 0; i < events.length; i++) {\r\n\t\t\tvar ev = events[i];\r\n\t\t\tvar event_class = (ev.id == scheduler._selected_event_id) ? 'dhx_map_line highlight' : 'dhx_map_line';\r\n\t\t\tvar bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\t\t\tvar color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\t\t\tvar ariaAttr = scheduler._waiAria.mapRowAttrString(ev);\r\n\t\t\tvar ariaButtonAttr = scheduler._waiAria.mapDetailsBtnString();\r\n\r\n\t\t\thtml += \"
\" + scheduler.templates.map_time(ev.start_date, ev.end_date, ev) + \"
\";\r\n\t\t\thtml += `
\r\n\t\t\t\r\n\t\t\t
`;\r\n\t\t\thtml += \"
\" + scheduler.templates.map_text(ev.start_date, ev.end_date, ev) + \"
\"; // -25 = icon size 20 and padding 5\r\n\t\t}\r\n\t\thtml += \"
\";\r\n\r\n\t\t//render html\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = 0; //fix flickering in FF\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t//\tscheduler._els[\"dhx_cal_data\"][0].style.width = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\r\n\t\tvar t = scheduler._els[\"dhx_cal_data\"][0].firstChild.childNodes;\r\n\r\n\t\tvar dateElement = scheduler._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML=scheduler.templates[scheduler._mode + \"_date\"](scheduler._min_date, scheduler._max_date, scheduler._mode);\r\n\t\t}\r\n\r\n\t\tscheduler._rendered = [];\r\n\t\tfor (var i = 0; i < t.length - 2; i++) {\r\n\t\t\tscheduler._rendered[i] = t[i];\r\n\t\t}\r\n\t}\r\n\r\n\tfunction _setMapSize(elem_id) { //input - map's div id\r\n\t\tvar map = document.getElementById(elem_id);\r\n\t\tconst nav_height = scheduler.$container.querySelector(\".dhx_cal_navline\").offsetHeight;\r\n\t\tvar height = scheduler._y - nav_height;\r\n\t\tif (height < 0)\r\n\t\t\theight = 0;\r\n\t\tvar width = scheduler._x - scheduler.xy.map_date_width - scheduler.xy.map_description_width - 1;\r\n\t\tif (width < 0)\r\n\t\t\twidth = 0;\r\n\t\tmap.style.height = height + 'px';\r\n\t\tmap.style.width = width + 'px';\r\n\t\tmap.style.position = \"absolute\";\r\n\t\tmap.style.top = nav_height + \"px\";\r\n\t\tif (scheduler.config.rtl) {\r\n\t\t\tmap.style.marginRight = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\t\t} else {\r\n\t\t\tmap.style.marginLeft = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\t\t}\r\n\t\tmap.style.marginTop = (scheduler.xy.nav_height + 2) + 'px';\r\n\t}\r\n\r\n\tscheduler.map_view = function(mode) {\r\n\t\tscheduler.map._initialization_count++;\r\n\t\tvar gmap = scheduler._els.dhx_gmap[0];\r\n\t\tvar temp_center;\r\n\t\t//scheduler._els.dhx_cal_data[0].style.width = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\r\n\t\tscheduler._min_date = scheduler.config.map_start || (scheduler._currentDate());\r\n\t\tscheduler._max_date = scheduler.config.map_end || scheduler.date.add(scheduler._currentDate(), 1, \"year\");\r\n\r\n\t\tscheduler._table_view = true;\r\n\t\tset_full_view(mode);\r\n\r\n\t\tif (mode) { //map tab activated\r\n\t\t\tclear_map_tab();\r\n\t\t\tfill_map_tab();\r\n\t\t\tgmap.style.display = 'block';\r\n\r\n\t\t\t// need to resize block every time window is resized\r\n\t\t\t_setMapSize('dhx_gmap');\r\n\t\t\ttemp_center = scheduler.map._obj.getCenter();\r\n\r\n\t\t\tvar events = scheduler.get_visible_events();\r\n\t\t\tfor (var i = 0; i < events.length; i++) {\r\n\t\t\t\tif (!scheduler.map._markers[events[i].id]) {\r\n\t\t\t\t\tshowAddress(events[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t} else { //map tab de-activated\r\n\t\t\tgmap.style.display = 'none';\r\n\t\t}\r\n\t\tgoogle.maps.event.trigger(scheduler.map._obj, 'resize');\r\n\r\n\t\tif (scheduler.map._initialization_count === 0 && temp_center) { // if tab is activated for the first time need to fix position\r\n\t\t\tscheduler.map._obj.setCenter(temp_center);\r\n\t\t}\r\n\r\n\t\tif (scheduler._selected_event_id) {\r\n\t\t\tselectEvent(scheduler._selected_event_id);\r\n\t\t}\r\n\t};\r\n\r\n\tvar selectEvent = function(event_id) {\r\n\t\tscheduler.map._obj.setCenter(scheduler.map._points[event_id]);\r\n\t\tscheduler.callEvent(\"onClick\", [event_id]);\r\n\t};\r\n\r\n\tvar showAddress = function(event, setCenter, performClick) { // what if event have incorrect position from the start?\r\n\t\tvar point = scheduler.config.map_error_position;\r\n\t\tif (event.lat && event.lng) {\r\n\t\t\tpoint = new google.maps.LatLng(event.lat, event.lng);\r\n\t\t}\r\n\t\tvar message = scheduler.templates.marker_text(event.start_date, event.end_date, event);\r\n\t\tif (!scheduler._new_event) {\r\n\r\n\t\t\tscheduler.map._infowindows_content[event.id] = message;\r\n\r\n\t\t\tif (scheduler.map._markers[event.id])\r\n\t\t\t\tscheduler.map._markers[event.id].setMap(null);\r\n\r\n\t\t\tscheduler.map._markers[event.id] = scheduler.ext.mapView.createMarker({\r\n\t\t\t\tposition: point,\r\n\t\t\t\tmap: scheduler.map._obj\r\n\t\t\t});\r\n\r\n\t\t\tgoogle.maps.event.addListener(scheduler.map._markers[event.id], 'click', function() {\r\n\t\t\t\tscheduler.map._infowindow.setContent(scheduler.map._infowindows_content[event.id]);\r\n\t\t\t\tscheduler.map._infowindow.open(scheduler.map._obj, scheduler.map._markers[event.id]);\r\n\t\t\t\tscheduler._selected_event_id = event.id;\r\n\t\t\t\tscheduler.render_data();\r\n\t\t\t});\r\n\t\t\tscheduler.map._points[event.id] = point;\r\n\r\n\t\t\tif (setCenter) scheduler.map._obj.setCenter(scheduler.map._points[event.id]);\r\n\t\t\tif (performClick) scheduler.callEvent(\"onClick\", [event.id]);\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onClick\", function(id, domEvent) {\r\n\t\tif (this._mode == \"map\") {\r\n\t\t\tscheduler._selected_event_id = id;\r\n\t\t\tfor (var i = 0; i < scheduler._rendered.length; i++) {\r\n\t\t\t\tscheduler._rendered[i].className = 'dhx_map_line';\r\n\t\t\t\tif (scheduler._rendered[i].getAttribute(scheduler.config.event_attribute) == id) {\r\n\t\t\t\t\tscheduler._rendered[i].className += \" highlight\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (scheduler.map._points[id] && scheduler.map._markers[id]) {\r\n\t\t\t\tscheduler.map._obj.setCenter(scheduler.map._points[id]); // was panTo\r\n\t\t\t\tgoogle.maps.event.trigger(scheduler.map._markers[id], 'click');\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tvar _displayEventOnMap = function(event) {\r\n\t\tconst geocoder = scheduler.ext.mapView.geocoder;\r\n\t\tif (event.event_location && geocoder) {\r\n\t\t\tgeocoder.geocode(\r\n\t\t\t\t{\r\n\t\t\t\t\t'address': event.event_location,\r\n\t\t\t\t\t'language': scheduler.uid().toString()\r\n\t\t\t\t},\r\n\t\t\t\tfunction(results, status) {\r\n\t\t\t\t\tvar point = {};\r\n\t\t\t\t\tif (status != google.maps.GeocoderStatus.OK) {\r\n\t\t\t\t\t\tpoint = scheduler.callEvent(\"onLocationError\", [event.id]);\r\n\t\t\t\t\t\tif (!point || point === true)\r\n\t\t\t\t\t\t\tpoint = scheduler.config.map_error_position;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tpoint = results[0].geometry.location;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tevent.lat = point.lat();\r\n\t\t\t\t\tevent.lng = point.lng();\r\n\r\n\t\t\t\t\tscheduler._selected_event_id = event.id;\r\n\r\n\t\t\t\t\tscheduler._latLngUpdate = true;\r\n\t\t\t\t\tscheduler.callEvent(\"onEventChanged\", [event.id, event]);\r\n\t\t\t\t\tshowAddress(event, true, true);\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t} else {\r\n\t\t\tshowAddress(event, true, true);\r\n\t\t}\r\n\t};\r\n\r\n\tvar _updateEventLocation = function(event) { // update lat and lng in database\r\n\t\tconst geocoder = scheduler.ext.mapView.geocoder;\r\n\t\tif (event.event_location && geocoder) {\r\n\t\t\tgeocoder.geocode(\r\n\t\t\t\t{\r\n\t\t\t\t\t'address': event.event_location,\r\n\t\t\t\t\t'language': scheduler.uid().toString()\r\n\t\t\t\t},\r\n\t\t\t\tfunction(results, status) {\r\n\t\t\t\t\tvar point = {};\r\n\t\t\t\t\tif (status != google.maps.GeocoderStatus.OK) {\r\n\t\t\t\t\t\tpoint = scheduler.callEvent(\"onLocationError\", [event.id]);\r\n\t\t\t\t\t\tif (!point || point === true)\r\n\t\t\t\t\t\t\tpoint = scheduler.config.map_error_position;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tpoint = results[0].geometry.location;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tevent.lat = point.lat();\r\n\t\t\t\t\tevent.lng = point.lng();\r\n\t\t\t\t\tscheduler._latLngUpdate = true;\r\n\t\t\t\t\tscheduler.callEvent(\"onEventChanged\", [event.id, event]);\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t}\r\n\t};\r\n\r\n\tvar _delay = function(method, object, params, delay) {\r\n\t\tsetTimeout(function() {\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tvar ret = method.apply(object, params);\r\n\t\t\tmethod = object = params = null;\r\n\t\t\treturn ret;\r\n\t\t}, delay || 1);\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onEventChanged\", function(id, event) {\r\n\t\tif (!this._latLngUpdate) {\r\n\t\t\tvar event = scheduler.getEvent(id);\r\n\t\t\tif ((event.start_date < scheduler._min_date && event.end_date > scheduler._min_date) || (event.start_date < scheduler._max_date && event.end_date > scheduler._max_date) || (event.start_date.valueOf() >= scheduler._min_date && event.end_date.valueOf() <= scheduler._max_date)) {\r\n\t\t\t\tif (scheduler.map._markers[id])\r\n\t\t\t\t\tscheduler.map._markers[id].setMap(null);\r\n\t\t\t\t_displayEventOnMap(event);\r\n\t\t\t} else { // event no longer should be displayed on the map view\r\n\t\t\t\tscheduler._selected_event_id = null;\r\n\t\t\t\tscheduler.map._infowindow.close();\r\n\t\t\t\tif (scheduler.map._markers[id])\r\n\t\t\t\t\tscheduler.map._markers[id].setMap(null);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t\tthis._latLngUpdate = false;\r\n\t\treturn true;\r\n\t});\r\n\r\n\r\n\tscheduler.attachEvent(\"onEventIdChange\", function(old_event_id, new_event_id) {\r\n\t\tvar event = scheduler.getEvent(new_event_id);\r\n\t\tif ((event.start_date < scheduler._min_date && event.end_date > scheduler._min_date) || (event.start_date < scheduler._max_date && event.end_date > scheduler._max_date) || (event.start_date.valueOf() >= scheduler._min_date && event.end_date.valueOf() <= scheduler._max_date)) {\r\n\t\t\tif (scheduler.map._markers[old_event_id]) {\r\n\t\t\t\tscheduler.map._markers[old_event_id].setMap(null);\r\n\t\t\t\tdelete scheduler.map._markers[old_event_id];\r\n\t\t\t}\r\n\t\t\tif (scheduler.map._infowindows_content[old_event_id])\r\n\t\t\t\tdelete scheduler.map._infowindows_content[old_event_id];\r\n\t\t\t_displayEventOnMap(event);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onEventAdded\", function(id, event) {\r\n\t\tif (!scheduler._dataprocessor) {\r\n\t\t\tif ((event.start_date < scheduler._min_date && event.end_date > scheduler._min_date) || (event.start_date < scheduler._max_date && event.end_date > scheduler._max_date) || (event.start_date.valueOf() >= scheduler._min_date && event.end_date.valueOf() <= scheduler._max_date)) {\r\n\t\t\t\tif (scheduler.map._markers[id])\r\n\t\t\t\t\tscheduler.map._markers[id].setMap(null);\r\n\t\t\t\t_displayEventOnMap(event);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\t/* Test/example\r\n\t scheduler.attachEvent(\"onLocationError\", function(event_id,event_object){\r\n\t return new google.maps.LatLng(8, 8);\r\n\t });\r\n\t */\r\n\r\n\tscheduler.attachEvent(\"onBeforeEventDelete\", function(id, event) {\r\n\t\tif (scheduler.map._markers[id]) {\r\n\t\t\tscheduler.map._markers[id].setMap(null); // if new event is deleted tab != map then it doesn't have marker yet\r\n\t\t}\r\n\t\tscheduler._selected_event_id = null;\r\n\t\tscheduler.map._infowindow.close();\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler._event_resolve_delay = 1500;\r\n\tscheduler.attachEvent(\"onEventLoading\", function(event) {\r\n\t\tif (scheduler.config.map_resolve_event_location && event.event_location && !event.lat && !event.lng) { // don't delete !event.lat && !event.lng as location could change\r\n\t\t\tscheduler._event_resolve_delay += 1500;\r\n\t\t\t_delay(_updateEventLocation, this, [event], scheduler._event_resolve_delay);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onEventCancel\", function(id, is_new) {\r\n\t\tif (is_new) {\r\n\t\t\tif (scheduler.map._markers[id])\r\n\t\t\t\tscheduler.map._markers[id].setMap(null);\r\n\t\t\tscheduler.map._infowindow.close();\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nconst minicalDomEvents = scheduler._createDomEventScope();\r\n\t\r\n\r\nscheduler.config.minicalendar = {\r\n\tmark_events: true\r\n};\r\nscheduler._synced_minicalendars = [];\r\nscheduler.renderCalendar = function(obj, _prev, is_refresh) {\r\n\tvar cal = null;\r\n\tvar date = obj.date || (scheduler._currentDate());\r\n\tif (typeof date == \"string\")\r\n\t\tdate = this.templates.api_date(date);\r\n\r\n\tif (!_prev) {\r\n\t\tvar cont = obj.container;\r\n\t\tvar pos = obj.position;\r\n\r\n\t\tif (typeof cont == \"string\")\r\n\t\t\tcont = document.getElementById(cont);\r\n\r\n\t\tif (typeof pos == \"string\")\r\n\t\t\tpos = document.getElementById(pos);\r\n\t\tif (pos && (typeof pos.left == \"undefined\" && typeof pos.right == \"undefined\")) {\r\n\t\t\tvar tpos = scheduler.$domHelpers.getOffset(pos);\r\n\t\t\tpos = {\r\n\t\t\t\ttop: tpos.top + pos.offsetHeight,\r\n\t\t\t\tleft: tpos.left\r\n\t\t\t};\r\n\t\t}\r\n\t\tif (!cont)\r\n\t\t\tcont = scheduler._get_def_cont(pos);\r\n\r\n\t\tcal = this._render_calendar(cont, date, obj);\r\n\t\r\n\t\tif (!cal.$_eventAttached) {\r\n\t\t\tcal.$_eventAttached = true;\r\n\t\t\tminicalDomEvents.attach(cal, \"click\", (function(e) {\r\n\t\t\t\tvar src = e.target || e.srcElement;\r\n\r\n\t\t\t\tvar $dom = scheduler.$domHelpers;\r\n\t\t\t\tif ($dom.closest(src, \".dhx_month_head\")) {\r\n\t\t\t\t\tif (!$dom.closest(src, \".dhx_after\") && !$dom.closest(src, \".dhx_before\")) {\r\n\r\n\t\t\t\t\t\tvar cellRoot = $dom.closest(src, \"[data-cell-date]\");\r\n\t\t\t\t\t\tvar dateAttribute = cellRoot.getAttribute(\"data-cell-date\");\r\n\t\t\t\t\t\tvar newDate = scheduler.templates.parse_date(dateAttribute);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tscheduler.unmarkCalendar(this);\r\n\t\t\t\t\t\tscheduler.markCalendar(this, newDate, \"dhx_calendar_click\");\r\n\t\t\t\t\t\tthis._last_date = newDate;\r\n\t\t\t\t\t\tif (this.conf.handler) this.conf.handler.call(scheduler, newDate, this);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}).bind(cal));\r\n\t\t}\r\n\t\r\n\t} else {\r\n\t\tcal = this._render_calendar(_prev.parentNode, date, obj, _prev);\r\n\t\tscheduler.unmarkCalendar(cal);\r\n\t}\r\n\r\n\tif (scheduler.config.minicalendar.mark_events) {\r\n\t\tvar start = scheduler.date.month_start(date);\r\n\t\tvar end = scheduler.date.add(start, 1, \"month\");\r\n\t\tvar evs = this.getEvents(start, end);\r\n\t\tvar filter = this[\"filter_\" + this._mode];\r\n\t\tvar markedDates = {};\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tif (filter && !filter(ev.id, ev))\r\n\t\t\t\tcontinue;\r\n\t\t\tvar d = ev.start_date;\r\n\t\t\tif (d.valueOf() < start.valueOf())\r\n\t\t\t\td = start;\r\n\t\t\td = scheduler.date.date_part(new Date(d.valueOf()));\r\n\t\t\twhile (d < ev.end_date) {\r\n\t\t\t\tif(!markedDates[+d]) {\r\n\t\t\t\t\tmarkedDates[+d] = true;\r\n\t\t\t\t\tthis.markCalendar(cal, d, \"dhx_year_event\");\r\n\t\t\t\t}\r\n\t\t\t\td = this.date.add(d, 1, \"day\");\r\n\t\t\t\tif (d.valueOf() >= end.valueOf())\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tthis._markCalendarCurrentDate(cal);\r\n\r\n\tcal.conf = obj;\r\n\tif (obj.sync && !is_refresh)\r\n\t\tthis._synced_minicalendars.push(cal);\r\n\r\n\tif(!cal.conf._on_xle_handler){\r\n\t\tcal.conf._on_xle_handler = scheduler.attachEvent(\"onXLE\", function refreshOnLoad(){\r\n\t\t\tscheduler.updateCalendar(cal, cal.conf.date);\r\n\t\t});\r\n\t}\r\n\r\n\tif(this.config.wai_aria_attributes && this.config.wai_aria_application_role){\r\n\t\tcal.setAttribute(\"role\", \"application\");\r\n\t}\r\n\r\n\treturn cal;\r\n};\r\nscheduler._get_def_cont = function(pos) {\r\n\tif (!this._def_count) {\r\n\t\tthis._def_count = document.createElement(\"div\");\r\n\t\tthis._def_count.className = \"dhx_minical_popup\";\r\n\t\tscheduler.event(this._def_count, \"click\", function(e) { e.cancelBubble = true; });\r\n\t\tdocument.body.appendChild(this._def_count);\r\n\t}\r\n\r\n\tif(pos.left){\r\n\t\tthis._def_count.style.left = pos.left + \"px\";\r\n\t}\r\n\tif(pos.right){\r\n\t\tthis._def_count.style.right = pos.right + \"px\";\r\n\t}\r\n\tif(pos.top){\r\n\t\tthis._def_count.style.top = pos.top + \"px\";\r\n\t}\r\n\tif(pos.bottom){\r\n\t\tthis._def_count.style.bottom = pos.bottom + \"px\";\r\n\t}\r\n\r\n\tthis._def_count._created = new Date();\r\n\r\n\treturn this._def_count;\r\n};\r\nscheduler._locateCalendar = function(cal, date) {\r\n\tif (typeof date == \"string\")\r\n\t\tdate = scheduler.templates.api_date(date);\r\n\r\n\tif(+date > +cal._max_date || +date < +cal._min_date)\r\n\t\treturn null;\r\n\r\n\tvar table = cal.querySelector(\".dhx_year_body\").childNodes[0];\r\n\r\n\tvar weekNum = 0;\r\n\tvar dat = new Date(cal._min_date);\r\n\twhile(+this.date.add(dat, 1, \"week\") <= +date){\r\n\t\tdat = this.date.add(dat, 1, \"week\");\r\n\t\tweekNum++;\r\n\t}\r\n\r\n\tvar sm = scheduler.config.start_on_monday;\r\n\tvar day = (date.getDay() || (sm ? 7 : 0)) - (sm ? 1 : 0);\r\n\r\n\tconst dayCell = table.querySelector(`.dhx_cal_month_row:nth-child(${weekNum + 1}) .dhx_cal_month_cell:nth-child(${day + 1})`);\r\n\tif(dayCell) {\r\n\t\treturn dayCell.firstChild;\r\n\t} else {\r\n\t\treturn null;\r\n\t}\r\n};\r\nscheduler.markCalendar = function(cal, date, css) {\r\n\tvar div = this._locateCalendar(cal, date);\r\n\tif(!div)\r\n\t\treturn;\r\n\r\n\tdiv.className += \" \" + css;\r\n};\r\nscheduler.unmarkCalendar = function(cal, date, css) {\r\n\tdate = date || cal._last_date;\r\n\tcss = css || \"dhx_calendar_click\";\r\n\tif (!date) return;\r\n\tvar el = this._locateCalendar(cal, date);\r\n\tif(!el)\r\n\t\treturn;\r\n\tel.className = (el.className || \"\").replace(RegExp(css, \"g\"));\r\n};\r\nscheduler._week_template = function(width) {\r\n\tvar summ = (width || 250);\r\n\tvar left = 0;\r\n\r\n\tvar week_template = document.createElement(\"div\");\r\n\tvar dummy_date = this.date.week_start(scheduler._currentDate());\r\n\tfor (var i = 0; i < 7; i++) {\r\n\t\tthis._cols[i] = Math.floor(summ / (7 - i));\r\n\t\tthis._render_x_header(i, left, dummy_date, week_template);\r\n\t\tdummy_date = this.date.add(dummy_date, 1, \"day\");\r\n\t\tsumm -= this._cols[i];\r\n\t\tleft += this._cols[i];\r\n\t}\r\n\tweek_template.lastChild.className += \" dhx_scale_bar_last\";\r\n\treturn week_template;\r\n};\r\nscheduler.updateCalendar = function(obj, sd) {\r\n\tobj.conf.date = sd;\r\n\tthis.renderCalendar(obj.conf, obj, true);\r\n};\r\nscheduler._mini_cal_arrows = [\" \", \" \"];\r\nscheduler._render_calendar = function(obj, sd, conf, previous) {\r\n\t/*store*/\r\n\tvar ts = scheduler.templates;\r\n\tvar temp = this._cols;\r\n\tthis._cols = [];\r\n\tvar temp2 = this._mode;\r\n\tthis._mode = \"calendar\";\r\n\tvar temp3 = this._colsS;\r\n\tthis._colsS = {height: 0};\r\n\tvar temp4 = new Date(this._min_date);\r\n\tvar temp5 = new Date(this._max_date);\r\n\tvar temp6 = new Date(scheduler._date);\r\n\tvar temp7 = ts.month_day;\r\n\tvar temp8 = this._ignores_detected; this._ignores_detected = 0;\r\n\tts.month_day = ts.calendar_date;\r\n\r\n\tsd = this.date.month_start(sd);\r\n\tvar week_template = this._week_template(obj.offsetWidth - 1 - this.config.minicalendar.padding );\r\n\r\n\tvar d;\r\n\tif (previous){\r\n\t\td = previous;\r\n\t} else {\r\n\t\td = document.createElement(\"div\");\r\n\t\td.className = \"dhx_cal_container dhx_mini_calendar\";\r\n\t}\r\n\td.setAttribute(\"date\", this._helpers.formatDate(sd));\r\n\td.innerHTML = \"
\" +\r\n\t\t\t\"
\" : \"'>\") +\r\n\t\t\t\"
\"+(week_template ? week_template.innerHTML : \"\")+\"
\" +\r\n\t\t\t\"
\" +\r\n\t\t\"
\";\r\n\tvar header = d.querySelector(\".dhx_year_month\");\r\n\tvar weekHeader = d.querySelector(\".dhx_year_week\");\r\n\tvar body = d.querySelector(\".dhx_year_body\");\r\n\r\n\theader.innerHTML = this.templates.calendar_month(sd);\r\n\tif (conf.navigation) {\r\n\t\tvar move_minicalendar_date = function(calendar, diff) {\r\n\t\t\tvar date = scheduler.date.add(calendar._date, diff, \"month\");\r\n\t\t\tscheduler.updateCalendar(calendar, date);\r\n\t\t\tif (scheduler._date.getMonth() == calendar._date.getMonth() && scheduler._date.getFullYear() == calendar._date.getFullYear()) {\r\n\t\t\t\tscheduler._markCalendarCurrentDate(calendar);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tvar css_classnames = [\"dhx_cal_prev_button\", \"dhx_cal_next_button\"];\r\n\t\tvar css_texts = [\"left:1px;top:4px;position:absolute;\", \"left:auto; right:1px;top:4px;position:absolute;\"];\r\n\t\tvar diffs = [-1, 1];\r\n\t\tvar handler = function(diff) {\r\n\t\t\treturn function() {\t\r\n\t\t\t\tif (conf.sync) {\r\n\t\t\t\t\tvar calendars = scheduler._synced_minicalendars;\r\n\t\t\t\t\tfor (var k = 0; k < calendars.length; k++) {\r\n\t\t\t\t\t\tmove_minicalendar_date(calendars[k], diff);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (scheduler.config.rtl) {\r\n\t\t\t\t\t\tdiff = -diff;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmove_minicalendar_date(d, diff);\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t};\r\n\t\tvar labels = [scheduler.locale.labels.prev, scheduler.locale.labels.next];\r\n\t\tfor (var j = 0; j < 2; j++) {\r\n\t\t\tvar arrow = document.createElement(\"div\");\r\n\t\t\t//var diff = diffs[j];\r\n\t\t\tarrow.className = css_classnames[j];\r\n\r\n\t\t\tscheduler._waiAria.headerButtonsAttributes(arrow, labels[j]);\r\n\r\n\t\t\tarrow.style.cssText = css_texts[j];\r\n\t\t\tarrow.innerHTML = this._mini_cal_arrows[j];\r\n\t\t\theader.appendChild(arrow);\r\n\t\t\tminicalDomEvents.attach(arrow, \"click\", handler(diffs[j]));\r\n\t\t}\r\n\t}\r\n\td._date = new Date(sd);\r\n\r\n\td.week_start = (sd.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) % 7;\r\n\r\n\tvar dd = d._min_date = this.date.week_start(sd);\r\n\td._max_date = this.date.add(d._min_date, 6, \"week\");\r\n\r\n\tthis._reset_month_scale(body, sd, dd, 6);\r\n\r\n\tif (!previous)\r\n\t\tobj.appendChild(d);\r\n\r\n\tweekHeader.style.height = (weekHeader.childNodes[0].offsetHeight - 1) + \"px\"; // dhx_year_week should have height property so that day dates would get correct position. dhx_year_week height = height of it's child (with the day name)\r\n\r\n\tvar headerId = scheduler.uid();\r\n\tscheduler._waiAria.minicalHeader(header, headerId);\r\n\tscheduler._waiAria.minicalGrid(d.querySelector(\".dhx_year_grid\"), headerId);\r\n\tscheduler._waiAria.minicalRow(weekHeader);\r\n\r\n\tvar dayHeaders = weekHeader.querySelectorAll(\".dhx_scale_bar\");\r\n\tfor(var i = 0; i < dayHeaders.length; i++){\r\n\t\tscheduler._waiAria.minicalHeadCell(dayHeaders[i]);\r\n\t}\r\n\tvar dayCells = body.querySelectorAll(\".dhx_cal_month_cell\");\r\n\tvar firstDate = new Date(dd);\r\n\tfor(var i = 0; i < dayCells.length; i++){\r\n\r\n\t\tscheduler._waiAria.minicalDayCell(dayCells[i], new Date(firstDate));\r\n\t\tfirstDate = scheduler.date.add(firstDate, 1, \"day\");\r\n\t}\r\n\r\n\tscheduler._waiAria.minicalHeader(header, headerId);\r\n\r\n\t/*restore*/\r\n\tthis._cols = temp;\r\n\tthis._mode = temp2;\r\n\tthis._colsS = temp3;\r\n\tthis._min_date = temp4;\r\n\tthis._max_date = temp5;\r\n\tscheduler._date = temp6;\r\n\tts.month_day = temp7;\r\n\tthis._ignores_detected = temp8;\r\n\treturn d;\r\n};\r\nscheduler.destroyCalendar = function(cal, force) {\r\n\tif (!cal && this._def_count && this._def_count.firstChild) {\r\n\t\tif (force || (new Date()).valueOf() - this._def_count._created.valueOf() > 500)\r\n\t\t\tcal = this._def_count.firstChild;\r\n\t}\r\n\tif (!cal) return;\r\n\tminicalDomEvents.detachAll();\r\n\t//cal.onclick = null;\r\n\tcal.innerHTML = \"\";\r\n\tif (cal.parentNode)\r\n\t\tcal.parentNode.removeChild(cal);\r\n\tif (this._def_count)\r\n\t\tthis._def_count.style.top = \"-1000px\";\r\n\r\n\tif(cal.conf && cal.conf._on_xle_handler)\r\n\t\tscheduler.detachEvent(cal.conf._on_xle_handler);\r\n};\r\nscheduler.isCalendarVisible = function() {\r\n\tif (this._def_count && parseInt(this._def_count.style.top, 10) > 0)\r\n\t\treturn this._def_count;\r\n\treturn false;\r\n};\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tscheduler.event(document.body, \"click\", function() { scheduler.destroyCalendar(); });\r\n}, {once: true});\r\n\r\n\r\n\r\nscheduler.form_blocks.calendar_time = {\r\n\trender: function(sns) {\r\n\t\tvar html = \"\";\r\n\r\n\t\tvar cfg = scheduler.config;\r\n\t\tvar dt = this.date.date_part(scheduler._currentDate());\r\n\r\n\t\tvar last = 24 * 60, first = 0;\r\n\t\tif (cfg.limit_time_select) {\r\n\t\t\tfirst = 60 * cfg.first_hour;\r\n\t\t\tlast = 60 * cfg.last_hour + 1; // to include \"17:00\" option if time select is limited\r\n\t\t}\r\n\t\tdt.setHours(first / 60);\r\n\r\n\t\tsns._time_values = [];\r\n\t\thtml += \" \";\r\n\r\n\t\t//var full_day = scheduler.config.full_day;\r\n\r\n\t\treturn \"
\" + html + \"  –  \" + html + \"
\";\r\n\t},\r\n\tset_value: function(node, value, ev, config) {\r\n\r\n\t\tvar inputs = node.getElementsByTagName(\"input\");\r\n\t\tvar selects = node.getElementsByTagName(\"select\");\r\n\t\tvar start_date,\r\n\t\t\tend_date;\r\n\r\n\t\tvar _init_once = function(inp, date, number) {\r\n\t\t\tscheduler.event(inp, \"click\", function() {\r\n\t\t\t\tscheduler.destroyCalendar(null, true);\r\n\t\t\t\tscheduler.renderCalendar({\r\n\t\t\t\t\tposition: inp,\r\n\t\t\t\t\tdate: new Date(this._date),\r\n\t\t\t\t\tnavigation: true,\r\n\t\t\t\t\thandler: function(new_date) {\r\n\t\t\t\t\t\tinp.value = scheduler.templates.calendar_time(new_date);\r\n\t\t\t\t\t\tinp._date = new Date(new_date);\r\n\t\t\t\t\t\tscheduler.destroyCalendar();\r\n\t\t\t\t\t\tif (scheduler.config.event_duration && scheduler.config.auto_end_date && number === 0) { //first element = start date\r\n\t\t\t\t\t\t\t_update_minical_select();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t};\r\n\r\n\t\tif (scheduler.config.full_day) {\r\n\t\t\tif (!node._full_day) {\r\n\t\t\t\tvar html = \"\";\r\n\t\t\t\tif (!scheduler.config.wide_form)\r\n\t\t\t\t\thtml = node.previousSibling.innerHTML + html;\r\n\t\t\t\tnode.previousSibling.innerHTML = html;\r\n\t\t\t\tnode._full_day = true;\r\n\t\t\t}\r\n\t\t\tvar input = node.previousSibling.getElementsByTagName(\"input\")[0];\r\n\r\n\t\t\tvar isFulldayEvent = (scheduler.date.time_part(ev.start_date) === 0 && scheduler.date.time_part(ev.end_date) === 0);\r\n\t\t\tinput.checked = isFulldayEvent;\r\n\r\n\t\t\tselects[0].disabled = input.checked;\r\n\t\t\tselects[1].disabled = input.checked;\r\n\r\n\t\t\tif (!input.$_eventAttached) {\r\n\t\t\t\tinput.$_eventAttached = true;\r\n\t\t\t\tscheduler.event(input, \"click\", function() {\r\n\t\t\t\t\tif (input.checked === true) {\r\n\t\t\t\t\t\tvar obj = {};\r\n\t\t\t\t\t\tscheduler.form_blocks.calendar_time.get_value(node, obj);\r\n\r\n\t\t\t\t\t\tstart_date = scheduler.date.date_part(obj.start_date);\r\n\t\t\t\t\t\tend_date = scheduler.date.date_part(obj.end_date);\r\n\r\n\t\t\t\t\t\tif (+end_date == +start_date || (+end_date >= +start_date && (ev.end_date.getHours() !== 0 || ev.end_date.getMinutes() !== 0)))\r\n\t\t\t\t\t\t\tend_date = scheduler.date.add(end_date, 1, \"day\");\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tvar start = start_date || ev.start_date;\r\n\t\t\t\t\tvar end = end_date || ev.end_date;\r\n\t\t\t\t\t_attach_action(inputs[0], start);\r\n\t\t\t\t\t_attach_action(inputs[1], end);\r\n\t\t\t\t\tselects[0].value = start.getHours() * 60 + start.getMinutes();\r\n\t\t\t\t\tselects[1].value = end.getHours() * 60 + end.getMinutes();\r\n\r\n\t\t\t\t\tselects[0].disabled = input.checked;\r\n\t\t\t\t\tselects[1].disabled = input.checked;\r\n\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (scheduler.config.event_duration && scheduler.config.auto_end_date) {\r\n\r\n\t\t\tvar _update_minical_select = function () {\r\n\t\t\t\tif (!(scheduler.config.auto_end_date && scheduler.config.event_duration)){\r\n\t\t\t\t\t// setting may be disabled after the handler is attached\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tstart_date = scheduler.date.add(inputs[0]._date, selects[0].value, \"minute\");\r\n\t\t\t\tend_date = new Date(start_date.getTime() + (scheduler.config.event_duration * 60 * 1000));\r\n\r\n\t\t\t\tinputs[1].value = scheduler.templates.calendar_time(end_date);\r\n\t\t\t\tinputs[1]._date = scheduler.date.date_part(new Date(end_date));\r\n\r\n\t\t\t\tselects[1].value = end_date.getHours() * 60 + end_date.getMinutes();\r\n\t\t\t};\r\n\r\n\t\t\tif(!selects[0].$_eventAttached){\r\n\t\t\t\tselects[0].addEventListener(\"change\", _update_minical_select); // only update on first select should trigger update so user could define other end date if he wishes too\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction _attach_action(inp, date, number) {\r\n\t\t\t_init_once(inp, date, number);\r\n\t\t\tinp.value = scheduler.templates.calendar_time(date);\r\n\t\t\tinp._date = scheduler.date.date_part(new Date(date));\r\n\t\t}\r\n\r\n\t\t_attach_action(inputs[0], ev.start_date, 0);\r\n\t\t_attach_action(inputs[1], ev.end_date, 1);\r\n\t\t_init_once = function() {};\r\n\r\n\t\tfunction _round_minutes(date) {\r\n\t\t\tvar time_values = config._time_values;\r\n\t\t\tvar direct_value = date.getHours() * 60 + date.getMinutes();\r\n\t\t\tvar fixed_value = direct_value;\r\n\t\t\tvar value_found = false;\r\n\r\n\t\t\tfor (var k = 0; k < time_values.length; k++) {\r\n\t\t\t\tvar t_v = time_values[k];\r\n\t\t\t\tif (t_v === direct_value) {\r\n\t\t\t\t\tvalue_found = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif (t_v < direct_value)\r\n\t\t\t\t\tfixed_value = t_v;\r\n\t\t\t}\r\n\r\n\t\t\tif(!(value_found || fixed_value))\r\n\t\t\t\treturn -1;\r\n\r\n\t\t\treturn (value_found) ? direct_value : fixed_value;\r\n\t\t}\r\n\r\n\t\tselects[0].value = _round_minutes(ev.start_date);\r\n\t\tselects[1].value = _round_minutes(ev.end_date);\r\n\r\n\t},\r\n\tget_value: function(node, ev) {\r\n\t\tvar inputs = node.getElementsByTagName(\"input\");\r\n\t\tvar selects = node.getElementsByTagName(\"select\");\r\n\r\n\t\tev.start_date = scheduler.date.add(inputs[0]._date, selects[0].value, \"minute\");\r\n\t\tev.end_date = scheduler.date.add(inputs[1]._date, selects[1].value, \"minute\");\r\n\r\n\t\tif (ev.end_date <= ev.start_date)\r\n\t\t\tev.end_date = scheduler.date.add(ev.start_date, scheduler.config.time_step, \"minute\");\r\n\t\treturn {\r\n\t\t\tstart_date: new Date(ev.start_date),\r\n\t\t\tend_date: new Date(ev.end_date)\r\n\t\t};\r\n\t},\r\n\tfocus: function(node) {\r\n\t}\r\n};\r\nscheduler.linkCalendar = function(calendar, datediff) {\r\n\tvar action = function() {\r\n\t\tvar date = scheduler._date;\r\n\t\tvar dateNew = new Date(date.valueOf());\r\n\t\tif (datediff) dateNew = datediff(dateNew);\r\n\t\tdateNew.setDate(1);\r\n\t\tscheduler.updateCalendar(calendar, dateNew);\r\n\t\treturn true;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", action);\r\n\tscheduler.attachEvent(\"onXLE\", action);\r\n\tscheduler.attachEvent(\"onEventAdded\", action);\r\n\tscheduler.attachEvent(\"onEventChanged\", action);\r\n\tscheduler.attachEvent(\"onEventDeleted\", action);\r\n\taction();\r\n};\r\n\r\nscheduler._markCalendarCurrentDate = function(calendar) {\r\n\tvar state = scheduler.getState();\r\n\tvar from = state.min_date;\r\n\tvar to = state.max_date;\r\n\tvar mode = state.mode;\r\n\r\n\tvar month_start = scheduler.date.month_start(new Date(calendar._date));\r\n\tvar month_end = scheduler.date.add(month_start, 1, \"month\");\r\n\r\n\tvar noHighlight = {\r\n\t\t\"month\":true,\r\n\t\t\"year\":true,\r\n\t\t\"agenda\":true,\r\n\t\t\"grid\":true\r\n\t};\r\n\t// no need to highlight current dates for a large range views - agenda, year, etc.\r\n\tif(noHighlight[mode] || (from.valueOf() <= month_start.valueOf() && to.valueOf() >= month_end.valueOf())){\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar current = from;\r\n\twhile(current.valueOf() < to.valueOf()){\r\n\t\tif (month_start.valueOf() <= current.valueOf() && month_end > current) {\r\n\t\t\tscheduler.markCalendar(calendar, current, \"dhx_calendar_click\");\r\n\t\t}\r\n\t\tcurrent = scheduler.date.add(current, 1, \"day\");\r\n\t}\r\n};\r\n\r\nscheduler.attachEvent(\"onEventCancel\", function(){\r\n\tscheduler.destroyCalendar(null, true);\r\n});\r\n\r\nscheduler.attachEvent(\"onDestroy\", function(){\r\n\tscheduler.destroyCalendar();\r\n});\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\tscheduler.xy.scroll_width = 0;\r\n\r\n\tvar old = scheduler.render_view_data;\r\n\tscheduler.render_view_data=function(){\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\t\tdata.firstChild._h_fix = true;\r\n\r\n\t\told.apply(scheduler,arguments);\r\n\r\n\r\n\r\n\t\tvar height = parseInt(data.style.height);\r\n\t\tdata.style.height=\"1px\";\r\n\t\tdata.style.height=data.scrollHeight+\"px\";\r\n\r\n\t\tthis._obj.style.height = this._obj.clientHeight + data.scrollHeight - height + \"px\";\r\n\t};\r\n\r\n\tvar old_s=scheduler._reset_month_scale;\r\n\tscheduler._reset_month_scale=function(a,b,c,d){\r\n\t\tvar dummy = {clientHeight:100};\r\n\t\told_s.apply(scheduler,[dummy,b,c,d]);\r\n\t\ta.innerHTML = dummy.innerHTML;\r\n\t};\r\n\r\n});\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Multisection\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\n\r\nfunction parseXMLOptions(loader, config){\r\n\tvar items = scheduler.ajax.xpath(\"//data/item\", loader.xmlDoc);\r\n\tvar ids = {};\r\n\tfor (var i = 0; i < items.length; i++) {\r\n\t\tids[items[i].getAttribute(config.map_to)] = true;\r\n\t}\r\n\treturn ids;\r\n}\r\n\r\nfunction parseJSONOptions(loader, config){\r\n\ttry{\r\n\t\tvar items = JSON.parse(loader.xmlDoc.responseText);\r\n\t\tvar ids = {};\r\n\t\tfor (var i = 0; i < items.length; i++) {\r\n\t\t\tvar option = items[i];\r\n\r\n\t\t\tids[option.value || option.key || option.id] = true;\r\n\t\t}\r\n\t\treturn ids;\r\n\t}catch(e){\r\n\t\treturn null;\r\n\t}\r\n}\r\n\r\nscheduler.form_blocks[\"multiselect\"]={\r\n\trender:function(sns) {\r\n\t\tvar css = \"dhx_multi_select_control dhx_multi_select_\"+sns.name;\r\n\t\tif(!!sns.vertical){\r\n\t\t\tcss += \" dhx_multi_select_control_vertical\";\r\n\t\t}\r\n\r\n\t\tvar _result = \"
\";\r\n\t\tfor (var i=0; i\"+sns.options[i].label+\"\";\r\n\t\t}\r\n\t\t_result += \"
\";\r\n\t\treturn _result;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\r\n\t\tvar _children = node.getElementsByTagName('input');\r\n\t\tfor(var i=0;i<_children.length;i++) {\r\n\t\t\t_children[i].checked = false; //unchecking all inputs on the form\r\n\t\t}\r\n\r\n\t\tfunction _mark_inputs(ids) { // ids = [ 0: undefined, 1: undefined, 2: true, 'custom_name': false ... ]\r\n\t\t\tvar _children = node.getElementsByTagName('input');\r\n\t\t\tfor(var i=0;i<_children.length; i++) {\r\n\t\t\t\t_children[i].checked = !! ids[_children[i].value];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar _ids = {};\r\n\t\tif (ev[config.map_to]) {\r\n\t\t\tvar results = (ev[config.map_to] + \"\").split(config.delimiter || scheduler.config.section_delimiter || \",\");\r\n\t\t\tfor (var i = 0; i < results.length; i++) {\r\n\t\t\t\t_ids[results[i]] = true;\r\n\t\t\t}\r\n\t\t\t_mark_inputs(_ids);\r\n\t\t} else {\r\n\t\t\tif (scheduler._new_event || !config.script_url)\r\n\t\t\t\treturn;\r\n\t\t\tvar divLoading = document.createElement('div');\r\n\t\t\tdivLoading.className = 'dhx_loading';\r\n\t\t\tdivLoading.style.cssText = \"position: absolute; top: 40%; left: 40%;\";\r\n\t\t\tnode.appendChild(divLoading);\r\n\r\n\t\t\tvar url = [\r\n\t\t\t\tconfig.script_url,\r\n\t\t\t\t(config.script_url.indexOf(\"?\") == -1 ? \"?\" : \"&\"),\r\n\t\t\t\t'dhx_crosslink_' + config.map_to + '=' + ev.id + '&uid=' + scheduler.uid()\r\n\t\t\t].join(\"\");\r\n\r\n\t\t\tscheduler.ajax.get(url, function(loader) {\r\n\t\t\t\tvar options = parseJSONOptions(loader, config);\r\n\t\t\t\tif(!options){\r\n\t\t\t\t\toptions = parseXMLOptions(loader, config);\r\n\t\t\t\t}\r\n\t\t\t\t_mark_inputs(options);\r\n\t\t\t\tnode.removeChild(divLoading);\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tvar _result = [];\r\n\t\tvar _children = node.getElementsByTagName(\"input\");\r\n\t\tfor(var i=0;i<_children.length;i++) {\r\n\t\t\tif(_children[i].checked)\r\n\t\t\t\t_result.push(_children[i].value);\r\n\t\t}\r\n\t\treturn _result.join(config.delimiter || scheduler.config.section_delimiter || \",\");\r\n\t},\r\n\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\r\n\tfunction backup(obj){\r\n\t\tvar t = function(){};\r\n\t\tt.prototype = obj;\r\n\t\treturn t;\r\n\t}\r\n\r\n\tvar old = scheduler._load;\r\n\tscheduler._load=function(url,from){\r\n\t\turl=url||this._load_url;\r\n\t\tif (typeof url == \"object\"){\r\n\t\t\tvar t = backup(this._loaded);\r\n\t\t\tfor (var i=0; i < url.length; i++) {\r\n\t\t\t\tthis._loaded=new t();\r\n\t\t\t\told.call(this,url[i],from);\r\n\t\t\t}\r\n\t\t} else\r\n\t\t\told.apply(this,arguments);\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\t/* global Backbone */\r\n\tvar cfg = {\r\n\t\tuse_id : false\r\n\t};\r\n\r\n\t//remove private properties\r\n\tfunction sanitize(ev){\r\n\t\tvar obj = {};\r\n\t\tfor (var key in ev)\r\n\t\t\tif (key.indexOf(\"_\") !== 0)\r\n\t\t\t\tobj[key] = ev[key];\r\n\r\n\t\tif (!cfg.use_id)\r\n\t\t\tdelete obj.id;\r\n\r\n\t\treturn obj;\r\n\t}\r\n\r\n\tvar update_timer;\r\n\tfunction update_view(){\r\n\t\tclearTimeout(update_timer);\r\n\t\tupdate_timer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler.updateView();\r\n\t\t},1);\r\n\t}\r\n\r\n\tfunction _start_ext_load(cal){\r\n\t\tcal._loading = true;\r\n\t\tcal._not_render = true;\r\n\r\n\t\tcal.callEvent(\"onXLS\", []);\r\n\t}\r\n\tfunction _finish_ext_load(cal){\r\n\t\tcal._not_render = false;\r\n\t\tif (cal._render_wait)\r\n\t\t\tcal.render_view_data();\r\n\t\tcal._loading = false;\r\n\r\n\t\tcal.callEvent(\"onXLE\", []);\r\n\t}\r\n\r\n\r\n\tfunction _get_id(model){\r\n\t\treturn cfg.use_id ? model.id : model.cid;\r\n\t}\r\n\r\nscheduler.backbone = function(events, config){\r\n\tif (config) cfg = config;\r\n\r\n\tevents.bind(\"change\", function(model, info){\r\n\t\tvar cid = _get_id(model);\r\n\t\tvar ev = scheduler._events[cid] = model.toJSON();\r\n\t\tev.id = cid;\r\n\r\n\t\tscheduler._init_event(ev);\r\n\t\tupdate_view();\r\n\t});\r\n\tevents.bind(\"remove\", function(model, changes){\r\n\t\tvar cid = _get_id(model);\r\n\t\tif (scheduler._events[cid])\r\n\t\t\tscheduler.deleteEvent(cid);\r\n\t});\r\n\r\n\tvar queue = [];\r\n\tfunction add_from_queue(){\r\n\t\tif(scheduler.$destroyed){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (queue.length){\r\n\t\t\tscheduler.parse(queue, \"json\");\r\n\t\t\tqueue = [];\r\n\t\t}\r\n\t}\r\n\r\n\tevents.bind(\"add\", function(model, changes){\r\n\t\tvar cid = _get_id(model);\r\n\t\tif (!scheduler._events[cid]){\r\n\t\t\tvar ev = model.toJSON();\r\n\t\t\tev.id = cid;\r\n\t\t\tscheduler._init_event(ev);\r\n\r\n\t\t\tqueue.push(ev);\r\n\t\t\tif (queue.length == 1)\r\n\t\t\t\tsetTimeout(add_from_queue,1);\r\n\t\t}\r\n\t});\r\n\r\n\tevents.bind(\"request\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_start_ext_load(scheduler);\r\n\t});\r\n\tevents.bind(\"sync\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_finish_ext_load(scheduler);\r\n\t});\r\n\tevents.bind(\"error\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_finish_ext_load(scheduler);\r\n\t});\r\n\r\n\r\n\tscheduler.attachEvent(\"onEventCreated\", function(id){\r\n\t\tvar ev = new events.model(scheduler.getEvent(id));\r\n\t\tscheduler._events[id] = ev.toJSON();\r\n\t\tscheduler._events[id].id = id;\r\n\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onEventAdded\", function(id){\r\n\t\tif (!events.get(id)){\r\n\t\t\tvar data = sanitize(scheduler.getEvent(id));\r\n\t\t\tvar model = new events.model(data);\r\n\r\n\t\t\tvar cid = _get_id(model);\r\n\t\t\tif (cid != id)\r\n\t\t\t\tthis.changeEventId(id, cid);\r\n\t\t\tevents.add(model);\r\n\t\t\tevents.trigger(\"scheduler:add\", model);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventChanged\", function(id){\r\n\t\tvar ev = events.get(id);\r\n\t\tvar upd = sanitize(scheduler.getEvent(id));\r\n\r\n\t\tev.set(upd);\r\n\t\tevents.trigger(\"scheduler:change\", ev);\r\n\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventDeleted\", function(id){\r\n\t\tvar model = events.get(id);\r\n\t\tif (model){\r\n\t\t\tevents.trigger(\"scheduler:remove\", model);\r\n\t\t\tevents.remove(id);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\t/* global dhtmlDragAndDropObject, dhtmlx */\r\n// lame old code doesn't provide raw event object\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\t\tvar dragger = (new dhtmlDragAndDropObject());\r\n\t\tvar old = dragger.stopDrag;\r\n\t\tvar last_event;\r\n\t\tdragger.stopDrag = function(e) {\r\n\t\t\tlast_event = e;\r\n\t\t\treturn old.apply(this, arguments);\r\n\t\t};\r\n\r\n\t\tfunction on_drop(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml) {\r\n\r\n\t\t\tif (scheduler.checkEvent(\"onBeforeExternalDragIn\") && !scheduler.callEvent(\"onBeforeExternalDragIn\", [sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml, last_event]))\r\n\t\t\t\treturn;\r\n\r\n\t\t\tvar temp = scheduler.attachEvent(\"onEventCreated\", function (id) {\r\n\t\t\t\tif (!scheduler.callEvent(\"onExternalDragIn\", [id, sourceHtmlObject, last_event])) {\r\n\t\t\t\t\tthis._drag_mode = this._drag_id = null;\r\n\t\t\t\t\tthis.deleteEvent(id);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tvar action_data = scheduler.getActionData(last_event);\r\n\t\t\tvar event_data = {\r\n\t\t\t\tstart_date: new Date(action_data.date)\r\n\t\t\t};\r\n\r\n\t\t\t// custom views, need to assign section id, fix dates\r\n\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\tvar view_options = scheduler.matrix[scheduler._mode];\r\n\t\t\t\tevent_data[view_options.y_property] = action_data.section;\r\n\r\n\t\t\t\tvar pos = scheduler._locate_cell_timeline(last_event);\r\n\t\t\t\tevent_data.start_date = view_options._trace_x[pos.x];\r\n\t\t\t\tevent_data.end_date = scheduler.date.add(event_data.start_date, view_options.x_step, view_options.x_unit);\r\n\t\t\t}\r\n\t\t\tif (scheduler._props && scheduler._props[scheduler._mode]) {\r\n\t\t\t\tevent_data[scheduler._props[scheduler._mode].map_to] = action_data.section;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler.addEventNow(event_data);\r\n\r\n\t\t\tscheduler.detachEvent(temp);\r\n\t\t}\r\n\r\n\t\tdragger.addDragLanding(scheduler._els[\"dhx_cal_data\"][0], {\r\n\t\t\t_drag: function(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml) {\r\n\t\t\t\ton_drop(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml);\r\n\t\t\t},\r\n\t\t\t_dragIn: function(htmlObject, shtmlObject) {\r\n\t\t\t\treturn htmlObject;\r\n\t\t\t},\r\n\t\t\t_dragOut: function(htmlObject) {\r\n\t\t\t\treturn this;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(dhtmlx.DragControl) {\r\n\t\t\tdhtmlx.DragControl.addDrop(scheduler._els[\"dhx_cal_data\"][0], {\r\n\t\t\t\tonDrop: function (source, target, d, e) {\r\n\t\t\t\t\tvar sourceDhtmlx = dhtmlx.DragControl.getMaster(source);\r\n\t\t\t\t\tlast_event = e;\r\n\t\t\t\t\ton_drop(source, sourceDhtmlx, target, e.target || e.srcElement);\r\n\t\t\t\t},\r\n\r\n\t\t\t\tonDragIn: function (source, target, e) {\r\n\t\t\t\t\treturn target;\r\n\t\t\t\t}\r\n\t\t\t}, true);\r\n\t\t}\r\n\t});\r\n\r\n}","export default function(scheduler){\r\n\r\n\tvar dx, dy,\r\n\t\thtml_regexp = new RegExp(\"<[^>]*>\", \"g\"),\r\n\t\tnewline_regexp = new RegExp(\"]*>\", \"g\");\r\n\r\n\tfunction clean_html(val) {\r\n\t\treturn val.replace(newline_regexp, \"\\n\").replace(html_regexp, \"\");\r\n\t}\r\n\r\n\tfunction x_norm(x, offset) {\r\n\t\tx = parseFloat(x);\r\n\t\toffset = parseFloat(offset);\r\n\t\tif (!isNaN(offset)) x -= offset;\r\n\r\n\t\tvar w = colsWidth(x);\r\n\t\tx = x - w.width + w.cols*dx;\r\n\t\treturn isNaN(x)?\"auto\":(100*x/(dx));\r\n\t}\r\n\r\n\tfunction x_norm_event(x, offset, is_left) {\r\n\t\tx = parseFloat(x);\r\n\t\toffset = parseFloat(offset);\r\n\t\tif (!isNaN(offset) && is_left) x -= offset;\r\n\r\n\t\tvar w = colsWidth(x);\r\n\t\tx = x - w.width + w.cols*dx;\r\n\t\treturn isNaN(x)?\"auto\":(100*x/(dx-(!isNaN(offset)?offset:0)));\r\n\t}\r\n\tfunction colsWidth(width) {\r\n\t\tvar r = 0;\r\n\t\tvar header = scheduler._els.dhx_cal_header[0].childNodes;\r\n\t\tvar els = header[1] ? header[1].childNodes : header[0].childNodes;\r\n\t\tfor (var i = 0; i < els.length; i++) {\r\n\t\t\tvar el = els[i].style ? els[i] : els[i].parentNode;\r\n\t\t\tvar w = parseFloat(el.style.width);\r\n\t\t\tif (width > w){\r\n\t\t\t\twidth -= (w+1);\r\n\t\t\t\tr+=(w+1);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\treturn { width: r, cols: i };\r\n\t}\r\n\r\n\tfunction y_norm(y) {\r\n\t\ty = parseFloat(y);\r\n\t\tif (isNaN(y)) return \"auto\";\r\n\t\treturn 100 * y / dy;\r\n\t}\r\n\r\n\tfunction get_style(node, style){\r\n\t\treturn (window.getComputedStyle?(window.getComputedStyle(node, null)[style]):(node.currentStyle?node.currentStyle[style]:null))||\"\";\r\n\t}\r\n\r\n\tfunction de_day(node, n) {\r\n\t\tvar x = parseInt(node.style.left, 10);\r\n\r\n\t\tfor (var dx = 0; dx < scheduler._cols.length; dx++) {\r\n\t\t\tx -= scheduler._cols[dx];\r\n\t\t\tif (x < 0) return dx;\r\n\t\t}\r\n\t\treturn n;\r\n\t}\r\n\r\n\tfunction de_week(node, n) {\r\n\t\tvar y = parseInt(node.style.top, 10);\r\n\t\tfor (var dy = 0; dy < scheduler._colsS.heights.length; dy++)\r\n\t\t\tif (scheduler._colsS.heights[dy] > y) return dy;\r\n\t\treturn n;\r\n\t}\r\n\r\n\tfunction xml_start(tag) {\r\n\t\treturn tag ? \"<\"+tag+\">\" : \"\";\r\n\t}\r\n\tfunction xml_end(tag) {\r\n\t\treturn tag ? \"\" : \"\";\r\n\t}\r\n\r\n\tfunction xml_top(tag, profile, header, footer) {\r\n\t\tvar xml = \"<\"+tag+\" profile='\" + profile + \"'\";\r\n\t\tif (header)\r\n\t\t\txml += \" header='\" + header + \"'\";\r\n\t\tif (footer)\r\n\t\t\txml += \" footer='\" + footer + \"'\";\r\n\t\txml += \">\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_body_header() {\r\n\t\tvar xml = \"\";\r\n\t\t// detects if current mode is timeline\r\n\t\tvar mode = scheduler._mode;\r\n\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode])\r\n\t\t\tmode = (scheduler.matrix[scheduler._mode].render == \"cell\") ? \"matrix\" : \"timeline\";\r\n\t\txml += \"\";\r\n\r\n\t\tif (scheduler._mode == \"week_agenda\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_data[0].getElementsByTagName(\"DIV\");\r\n\t\t\tfor (var i = 0; i < xh.length; i++)\r\n\t\t\t\tif (xh[i].className == \"dhx_wa_scale_bar\")\r\n\t\t\t\t\txml += \"\" + clean_html(xh[i].innerHTML) + \"\";\r\n\t\t} else if (scheduler._mode == \"agenda\" || scheduler._mode == \"map\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_header[0].childNodes[0].childNodes;\r\n\r\n\t\t\txml += \"\" + clean_html(xh[0].innerHTML) + \"\" + clean_html(xh[1].innerHTML) + \"\";\r\n\t\t} else if (scheduler._mode == \"year\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_data[0].childNodes;\r\n\t\t\tfor (var i = 0; i < xh.length; i++) {\r\n\t\t\t\txml += \"\";\r\n\t\t\t\txml += xml_month_scale(xh[i].querySelector(\".dhx_year_week\").childNodes);\r\n\t\t\t\txml += xml_month(xh[i].querySelector(\".dhx_year_body\"));\r\n\t\t\t\txml += \"\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\txml += \"\";\r\n\t\t\tvar xh = scheduler._els.dhx_cal_header[0].childNodes;\r\n\t\t\txml += xml_month_scale(xh);\r\n\t\t\txml += \"\";\r\n\r\n\t\t\tvar yh = scheduler._els.dhx_cal_data[0];\r\n\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tfor (var i = 0; i < yh.firstChild.rows.length; i++) {\r\n\t\t\t\t\tvar el = yh.firstChild.rows[i];\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t}\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tdy = yh.firstChild.rows[0].cells[0].offsetHeight;\r\n\t\t\t} else if (yh.firstChild.tagName == \"TABLE\") {\r\n\t\t\t\txml += xml_month(yh);\r\n\t\t\t} else {\r\n\t\t\t\tyh = yh.childNodes[yh.childNodes.length - 1];\r\n\t\t\t\twhile (yh.className.indexOf(\"dhx_scale_holder\") == -1)\r\n\t\t\t\t\tyh = yh.previousSibling;\r\n\t\t\t\tyh = yh.childNodes;\r\n\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tfor (var i = 0; i < yh.length; i++)\r\n\t\t\t\t\txml += \"\\n\";\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tdy = yh[0].offsetHeight;\r\n\t\t\t}\r\n\t\t}\r\n\t\txml += \"\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_month(yh) {\r\n\t\tvar xml = \"\";\r\n\t\tvar r = yh.querySelectorAll(\"tr\");\r\n\t\tfor (var i = 0; i < r.length; i++) {\r\n\t\t\tvar days = [];\r\n\t\t\tvar cells = r[i].querySelectorAll(\"td\");\r\n\r\n\t\t\tfor (var j = 0; j < cells.length; j++)\r\n\t\t\t\tdays.push(cells[j].querySelector(\".dhx_month_head\").innerHTML);\r\n\r\n\t\t\txml += \"\\n\";\r\n\t\t\tdy = cells[0].offsetHeight;\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_month_scale(xh) {\r\n\t\tvar xhs,\r\n\t\t\txml = \"\";\r\n\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\tif (scheduler.matrix[scheduler._mode].second_scale)\r\n\t\t\t\txhs = xh[1].childNodes;\r\n\r\n\t\t\txh = xh[0].childNodes;\r\n\t\t}\r\n\r\n\t\tfor (var i = 0; i < xh.length; i++)\r\n\t\t\txml += \"\\n\";\r\n\t\tdx = xh[0].offsetWidth;\r\n\r\n\t\tif (xhs) {\r\n\t\t\tvar width = 0;\r\n\t\t\tvar top_width = xh[0].offsetWidth;\r\n\t\t\tvar top_col = 1;\r\n\t\t\tfor (var i = 0; i < xhs.length; i++) {\r\n\t\t\t\txml += \"\\n\";\r\n\t\t\t\twidth += xhs[i].offsetWidth;\r\n\t\t\t\tif (width >= top_width) {\r\n\t\t\t\t\ttop_width += (xh[top_col] ? xh[top_col].offsetWidth : 0);\r\n\t\t\t\t\ttop_col++;\r\n\t\t\t\t}\r\n\t\t\t\tdx = xhs[0].offsetWidth;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_body(colors) {\r\n\t\tvar xml = \"\";\r\n\t\tvar evs = scheduler._rendered;\r\n\t\tvar matrix = scheduler.matrix && scheduler.matrix[scheduler._mode];\r\n\r\n\t\tif (scheduler._mode == \"agenda\" || scheduler._mode == \"map\") {\r\n\r\n\t\t\tfor (var i = 0; i < evs.length; i++)\r\n xml += \"\";\r\n\r\n\t\t} else if (scheduler._mode == \"week_agenda\") {\r\n\r\n\t\t\tfor (var i = 0; i < evs.length; i++)\r\n\t\t\t\txml += \"\" + clean_html(evs[i].innerHTML) + \"\";\r\n\r\n\t\t} else if (scheduler._mode == \"year\") {\r\n\r\n\t\t\tvar evs = scheduler.get_visible_events();\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar d = evs[i].start_date;\r\n\t\t\t\tif (d.valueOf() < scheduler._min_date.valueOf())\r\n\t\t\t\t\td = scheduler._min_date;\r\n\r\n\t\t\t\twhile (d < evs[i].end_date) {\r\n\t\t\t\t\tvar m = d.getMonth() + 12 * (d.getFullYear() - scheduler._min_date.getFullYear()) - scheduler.week_starts._month;\r\n\t\t\t\t\tvar day = scheduler.week_starts[m] + d.getDate() - 1;\r\n\t\t\t\t\tvar text_color = colors ? get_style(scheduler._get_year_cell(d), \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(scheduler._get_year_cell(d), \"backgroundColor\") : \"\";\r\n\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t\td = scheduler.date.add(d, 1, \"day\");\r\n\t\t\t\t\tif (d.valueOf() >= scheduler._max_date.valueOf())\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (matrix && matrix.render == \"cell\") {\r\n\t\t\tvar evs = scheduler._els.dhx_cal_data[0].getElementsByTagName(\"TD\");\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar text_color = colors ? get_style(evs[i], \"color\") : \"\";\r\n\t\t\t\tvar bg_color = colors ? get_style(evs[i], \"backgroundColor\") : \"\";\r\n\t\t\t\txml += \"\\n\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar zx, zdx;\r\n\t\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\t\t// logic for timeline view\r\n\t\t\t\t\tzx = x_norm(evs[i].style.left);\r\n\t\t\t\t\tzdx = x_norm(evs[i].offsetWidth)-1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// we should use specific logic for day/week/units view\r\n\t\t\t\t\tvar left_norm = scheduler.config.use_select_menu_space ? 0 : 26;\r\n\t\t\t\t\tzx = x_norm_event(evs[i].style.left, left_norm, true);\r\n\t\t\t\t\tzdx = x_norm_event(evs[i].style.width, left_norm)-1;\r\n\t\t\t\t}\r\n\t\t\t\tif (isNaN(zdx * 1)) continue;\r\n\t\t\t\tvar zy = y_norm(evs[i].style.top);\r\n\t\t\t\tvar zdy = y_norm(evs[i].style.height);\r\n\r\n\t\t\t\tvar e_type = evs[i].className.split(\" \")[0].replace(\"dhx_cal_\", \"\");\r\n\t\t\t\tif (e_type === 'dhx_tooltip_line') continue;\r\n\r\n\t\t\t\tvar dets = scheduler.getEvent(evs[i].getAttribute(scheduler.config.event_attribute));\r\n if (!dets) continue;\r\n\t\t\t\tvar day = dets._sday;\r\n\t\t\t\tvar week = dets._sweek;\r\n\t\t\t\tvar length = dets._length || 0;\r\n\r\n\t\t\t\tif (scheduler._mode == \"month\") {\r\n\t\t\t\t\tzdy = parseInt(evs[i].offsetHeight, 10);\r\n\t\t\t\t\tzy = parseInt(evs[i].style.top, 10) - scheduler.xy.month_head_height;\r\n\r\n\t\t\t\t\tday = de_day(evs[i], day);\r\n\t\t\t\t\tweek = de_week(evs[i], week);\r\n\t\t\t\t} else if (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\t\tday = 0;\r\n\t\t\t\t\tvar el = evs[i].parentNode.parentNode.parentNode;\r\n\t\t\t\t\tweek = el.rowIndex;\r\n\t\t\t\t\tvar dy_copy = dy;\r\n\t\t\t\t\tdy = evs[i].parentNode.offsetHeight;\r\n\t\t\t\t\tzy = y_norm(evs[i].style.top);\r\n\t\t\t\t\tzy -= zy * 0.2;\r\n\t\t\t\t\tdy = dy_copy;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (evs[i].parentNode == scheduler._els.dhx_cal_data[0]) continue;\r\n\t\t\t\t\tvar parent = scheduler._els[\"dhx_cal_data\"][0].childNodes[0];\r\n\t\t\t\t\tvar offset = parseFloat(parent.className.indexOf(\"dhx_scale_holder\") != -1 ? parent.style.left : 0);\r\n\t\t\t\t\tzx += x_norm(evs[i].parentNode.style.left, offset);\r\n\t\t\t\t}\r\n\r\n\t\t\t\txml += \"\\n\";\r\n\r\n\t\t\t\tif (e_type == \"event\") {\r\n\t\t\t\t\txml += \"
\";\r\n\t\t\t\t\tvar text_color = colors ? get_style(evs[i].childNodes[2], \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(evs[i].childNodes[2], \"backgroundColor\") : \"\";\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvar text_color = colors ? get_style(evs[i], \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(evs[i], \"backgroundColor\") : \"\";\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t}\r\n\t\t\t\txml += \"
\";\r\n\t\t\t}\r\n\t\t\t}\r\n\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction toXML(start, end, view, mode, header, footer){\r\n\t\tvar colors = false;\r\n\t\tif (mode == \"fullcolor\") {\r\n\t\t\tcolors = true;\r\n\t\t\tmode = \"color\";\r\n\t\t}\r\n\r\n\t\tmode = mode || \"color\";\r\n\r\n\t\tvar xml = \"\";\r\n\t\tif (start) {\r\n\r\n\t\t\tvar original_date = scheduler._date;\r\n\t\t\tvar original_mode = scheduler._mode;\r\n\t\t\tend = scheduler.date[view+\"_start\"](end);\r\n\t\t\tend = scheduler.date[\"get_\"+view+\"_end\"] ? scheduler.date[\"get_\"+view+\"_end\"](end) : scheduler.date.add(end, 1, view);\r\n\r\n\t\t\txml = xml_top(\"pages\", mode, header, footer);\r\n\t\t\tfor (var temp_date = new Date(start); +temp_date < +end; temp_date = this.date.add(temp_date, 1, view)) {\r\n\t\t\t\tthis.setCurrentView(temp_date, view);\r\n\t\t\t\txml += xml_start(\"page\") + xml_body_header().replace(\"\\u2013\", \"-\") + xml_body(colors) + xml_end(\"page\");\r\n\t\t\t}\r\n\t\t\txml += xml_end(\"pages\");\r\n\r\n\t\t\tthis.setCurrentView(original_date, original_mode);\r\n\t\t} else {\r\n\t\t\txml = xml_top(\"data\", mode, header, footer) + xml_body_header().replace(\"\\u2013\", \"-\") + xml_body(colors) + xml_end(\"data\");\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\tscheduler.getPDFData = toXML;\r\n\tfunction send_xml(xml, url){\r\n\t\tvar uid = scheduler.uid();\r\n\t\tvar d = document.createElement(\"div\");\r\n\t\td.style.display = \"none\";\r\n\t\tdocument.body.appendChild(d);\r\n\r\n\t\td.innerHTML = '
';\r\n\t\tdocument.getElementById(uid).firstChild.value = encodeURIComponent(xml);\r\n\t\tdocument.getElementById(uid).submit();\r\n\t\td.parentNode.removeChild(d);\r\n\t}\r\n\r\n\tfunction to_pdf(start, end, view, url, mode, header, footer) {\r\n\t\tvar xml = \"\";\r\n\t\tif(typeof mode == \"object\"){\r\n\t\t\txml = schedulersToPdf(mode);\r\n\t\t}else{\r\n\t\t\txml = toXML.apply(this, [start, end, view, mode, header, footer]);\r\n\t\t}\r\n\r\n\t\tsend_xml(xml, url);\r\n\t}\r\n\r\n\tfunction schedulersToPdf(objects){\r\n\t\tvar xml = \"\";\r\n\t\tfor(var i=0; i < objects.length; i++){\r\n\t\t\txml += objects[i].source.getPDFData(objects[i].start, objects[i].end, objects[i].view, objects[i].mode, objects[i].header, objects[i].footer);\r\n\t\t}\r\n\t\txml += \"\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\t/*\r\n\t * scheduler.toPDF(url, mode, header, footer) - for a single scheduler\r\n\t * scheduler.toPDF(url, [scheduler1, scheduler2,...]) - for multiple schedulers\r\n\t * example:\r\n\t * scheduler.toPDF(\"generate.ashx\", [\r\n\t * { source: scheduler1, mode: \"color\" },\r\n\t * { source: scheduler2, mode: \"gray\", view:\"week\", start:new Date(2013, 06, 1), end:new Date(2013, 06, 28) },\r\n\t * { source: scheduler3 }\r\n\t * ]);\r\n\t *\r\n\t */\r\n\tscheduler.toPDF = function(url, mode, header, footer) {\r\n\t\treturn to_pdf.apply(this, [null, null, null, url, mode, header, footer]);\r\n\t};\r\n\tscheduler.toPDFRange = function(start, end, view, url, mode, header, footer) {\r\n\t\tif (typeof start == \"string\") {\r\n\t\t\tstart = scheduler.templates.api_date(start);\r\n\t\t\tend = scheduler.templates.api_date(end);\r\n\t\t}\r\n\r\n\t\treturn to_pdf.apply(this, arguments);\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.icons_select = [\"icon_form\", \"icon_delete\"];\r\nscheduler.config.details_on_create = true;\r\nscheduler.config.show_quick_info = true;\r\nscheduler.xy.menu_width = 0;\r\n\r\nscheduler.attachEvent(\"onClick\", function(id){\r\n\tif(!scheduler.config.show_quick_info){\r\n\t\treturn;\r\n\t}\r\n\tscheduler.showQuickInfo(id);\r\n\treturn true;\r\n});\r\n\r\n(function(){\r\n\t// pass `force` argument in order to hide quick info synchronously\r\n\t// so it won't affect showQuickInfo call that can follow\r\n\tvar events = [\"onEmptyClick\", \"onViewChange\", \"onLightbox\", \"onBeforeEventDelete\", \"onBeforeDrag\"];\r\n\tvar hiding_function = function(){\r\n\t\tscheduler.hideQuickInfo(true);\r\n\t\treturn true;\r\n\t};\r\n\tfor (var i=0; i window.innerWidth){\r\n\t\t\tleft = window.innerWidth - width;\r\n\t\t}\r\n\t\tleft = Math.max(0, left);\r\n\r\n\t\tqi.style.left = left + \"px\";\r\n\t\tqi.style.top = pos.top - (pos.dy?height:-pos.height) + \"px\";\r\n\t} else {\r\n\r\n\t\tconst dataPos = scheduler.$container.querySelector('.dhx_cal_data').offsetTop;\r\n\t\tqi.style.top = dataPos + 20 + \"px\";\r\n\t\tif (pos.dx == 1){\r\n\t\t\tqi.style.right = \"auto\";\r\n\t\t\tqi.style.left = -width + \"px\";\r\n\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tqi.style.left = \"-10px\";\r\n\t\t\t},1);\r\n\t\t} else {\r\n\t\t\tqi.style.left = \"auto\";\r\n\t\t\tqi.style.right = -width + \"px\";\r\n\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tqi.style.right = \"-10px\";\r\n\t\t\t},1);\r\n\t\t}\r\n\t\tqi.className = qi.className.replace(\" dhx_qi_left\",\"\").replace(\" dhx_qi_right\",\"\")+\" dhx_qi_\"+(pos.dx==1?\"left\":\"right\");\r\n\t}\r\n};\r\nscheduler.attachEvent(\"onTemplatesReady\", function(){\r\n\tscheduler.hideQuickInfo();\r\n\tif(this._quick_info_box){\r\n\t\tvar box = this._quick_info_box;\r\n\t\tif(box.parentNode){\r\n\t\t\tbox.parentNode.removeChild(box);\r\n\t\t}\r\n\t\tthis._quick_info_box = null;\r\n\t}\r\n});\r\nscheduler._quick_info_onscroll_handler = function(e){\r\n\tscheduler.hideQuickInfo();\r\n};\r\nscheduler._init_quick_info = function(){\r\n\tif (!this._quick_info_box){\r\n\r\n\r\n\t\tvar qi = this._quick_info_box = document.createElement(\"div\");\r\n\r\n\t\tthis._waiAria.quickInfoAttr(qi);\r\n\r\n\t\tqi.className = \"dhx_cal_quick_info\";\r\n\t\tif (scheduler.$testmode)\r\n\t\t\tqi.className += \" dhx_no_animate\";\r\n\t\tif (scheduler.config.rtl) qi.className += \" dhx_quick_info_rtl\";\r\n\t//title\r\n\t\tvar ariaAttr = this._waiAria.quickInfoHeaderAttrString();\r\n\t\tvar html = `\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t\t
\r\n\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t\t
`;\r\n\r\n\t//buttons\r\n\t\thtml += \"
\";\r\n\t\tvar buttons = scheduler.config.icons_select;\r\n\t\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\t\tvar ariaAttr = this._waiAria.quickInfoButtonAttrString(this.locale.labels[buttons[i]]);\r\n\t\t\t\thtml += `
\r\n\t\t\t\t
${scheduler.locale.labels[buttons[i]]}
`;\r\n\t\t\t}\r\n\t\t// }\r\n\t\thtml += \"
\";\r\n\r\n\t\tqi.innerHTML = html;\r\n\t\tscheduler.event(qi, \"click\", function(ev){\r\n\t\t\tscheduler._qi_button_click(ev.target || ev.srcElement);\r\n\t\t});\r\n\t\tif (scheduler.config.quick_info_detached){\r\n\t\t\tscheduler._detachDomEvent(scheduler._els[\"dhx_cal_data\"][0], \"scroll\", scheduler._quick_info_onscroll_handler);\r\n\t\t\tscheduler.event(scheduler._els[\"dhx_cal_data\"][0], \"scroll\", scheduler._quick_info_onscroll_handler);\r\n\t\t}\r\n\t}\r\n\r\n\treturn this._quick_info_box;\r\n};\r\n\r\nscheduler._qi_button_click = function(node){\r\n\tvar box = scheduler._quick_info_box;\r\n\tif (!node || node == box) return;\r\n\r\n\tif(node.closest(\".dhx_cal_qi_close_btn\")){\r\n\t\tscheduler.hideQuickInfo();\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar mask = scheduler._getClassName(node);\r\n\tif (mask.indexOf(\"_icon\")!=-1){\r\n\t\tvar id = scheduler._quick_info_box_id;\r\n\t\tscheduler._click.buttons[mask.split(\" \")[1].replace(\"icon_\",\"\")](id);\r\n\t} else\r\n\t\tscheduler._qi_button_click(node.parentNode);\r\n};\r\nscheduler._get_event_counter_part = function(id){\r\n\tvar domEv = scheduler.getRenderedEvent(id);\r\n\tvar left = 0;\r\n\tvar top = 0;\r\n\r\n\tvar node = domEv;\r\n\twhile (node && node != scheduler._obj){\r\n\t\tleft += node.offsetLeft;\r\n\t\ttop += node.offsetTop-node.scrollTop;\r\n\t\tnode = node.offsetParent;\r\n\t}\r\n\tif(node){\r\n\t\tvar dx = (left + domEv.offsetWidth/2) > (scheduler._x/2) ? 1 : 0;\r\n\t\tvar dy = (top + domEv.offsetHeight/2) > (scheduler._y/2) ? 1 : 0;\r\n\r\n\t\treturn { left:left, top:top, dx:dx, dy:dy,\r\n\t\t\twidth:domEv.offsetWidth, height:domEv.offsetHeight };\r\n\t}\r\n\treturn 0;\r\n};\r\n\r\nscheduler._fill_quick_data = function(id){\r\n\tvar ev = scheduler.getEvent(id);\r\n\tvar qi = scheduler._quick_info_box;\r\n\r\n\tscheduler._quick_info_box_id = id;\r\n\r\n//title content\r\n\r\n\tvar header = {\r\n\t\tcontent: scheduler.templates.quick_info_title(ev.start_date, ev.end_date, ev),\r\n\t\tdate: scheduler.templates.quick_info_date(ev.start_date, ev.end_date, ev)\r\n\t};\r\n\tvar titleContent = qi.querySelector(\".dhx_cal_qi_tcontent\");\r\n\ttitleContent.innerHTML = `${header.content}`;\r\n\tvar titleDate = qi.querySelector(\".dhx_cal_qi_tdate\");\r\n\ttitleDate.innerHTML = header.date;\r\n\r\n\tscheduler._waiAria.quickInfoHeader(qi, [header.content, header.date].join(\" \"));\r\n\r\n//main content\r\n\tvar main = qi.querySelector(\".dhx_cal_qi_content\");\r\n\tconst mainContent = scheduler.templates.quick_info_content(ev.start_date, ev.end_date, ev);\r\n\tif(mainContent){\r\n\t\tmain.classList.remove(\"dhx_hidden\");\r\n\t\tmain.innerHTML = mainContent;\r\n\t}else{\r\n\t\tmain.classList.add(\"dhx_hidden\");\r\n\t}\r\n};\r\n\r\n\r\n}","export default function(scheduler){\r\n\t\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar originalRecurringSetValue;\r\n\tif (scheduler.form_blocks.recurring) {\r\n\t\toriginalRecurringSetValue = scheduler.form_blocks.recurring.set_value;\r\n\t}\r\n\tvar original_left_buttons = scheduler.config.buttons_left.slice();\r\n\tvar original_right_buttons = scheduler.config.buttons_right.slice();\r\n\r\n\tscheduler.attachEvent(\"onBeforeLightbox\", function(id) {\r\n\t\tif (this.config.readonly_form || this.getEvent(id).readonly) {\r\n\t\t\tthis.config.readonly_active = true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.config.readonly_active = false;\r\n\t\t\tscheduler.config.buttons_left = original_left_buttons.slice();\r\n\t\t\tscheduler.config.buttons_right = original_right_buttons.slice();\r\n\t\r\n\t\t\t// initial value\r\n\t\t\tif(scheduler.form_blocks.recurring) {\r\n\t\t\t\tscheduler.form_blocks.recurring.set_value = originalRecurringSetValue;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar sns = this.config.lightbox.sections;\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\tfor (var i = 0; i < sns.length; i++) {\r\n\t\t\t\tif (sns[i].type == 'recurring') {\r\n\t\t\t\t\tif (this.config.readonly_active && scheduler.form_blocks.recurring) {\r\n\t\t\t\t\t\tscheduler.form_blocks.recurring.set_value = function(node, value, ev) {\r\n\t\t\t\t\t\t\tvar wrapper = scheduler.$domHelpers.closest(node, \".dhx_wrap_section\");\r\n\t\t\t\t\t\t\tvar style = \"none\";\r\n\t\t\t\t\t\t\twrapper.querySelector('.dhx_cal_lsection').display = style;\r\n\t\t\t\t\t\t\twrapper.querySelector('.dhx_form_repeat').display = style;\r\n\t\t\t\t\t\t\twrapper.style.display = style;\r\n\r\n\t\t\t\t\t\t\tscheduler.setLightboxSize();\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar forbidden_buttons = [\"dhx_delete_btn\", \"dhx_save_btn\"];\r\n\t\t\tvar button_arrays = [scheduler.config.buttons_left, scheduler.config.buttons_right];\r\n\t\t\tfor (var i = 0; i < forbidden_buttons.length; i++) {\r\n\t\t\t\tvar forbidden_button = forbidden_buttons[i];\r\n\t\t\t\tfor (var k = 0; k < button_arrays.length; k++) {\r\n\t\t\t\t\tvar button_array = button_arrays[k];\r\n\t\t\t\t\tvar index = -1;\r\n\t\t\t\t\tfor (var p = 0; p < button_array.length; p++) {\r\n\t\t\t\t\t\tif (button_array[p] == forbidden_button) {\r\n\t\t\t\t\t\t\tindex = p;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (index != -1) {\r\n\t\t\t\t\t\tbutton_array.splice(index, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.resetLightbox();\r\n\r\n\t\treturn true;\r\n\t});\r\n\r\n\tfunction txt_replace(tag, d, n, text) {\r\n\t\tvar txts = d.getElementsByTagName(tag);\r\n\t\tvar txtt = n.getElementsByTagName(tag);\r\n\t\tfor (var i = txtt.length - 1; i >= 0; i--) {\r\n\t\t\tvar n = txtt[i];\r\n\t\t\tif (!text){\r\n\t\t\t\tn.disabled = true;\r\n\t\t\t\t//radio and checkboxes loses state after .cloneNode in IE\r\n\t\t\t\tif(d.checked)\r\n\t\t\t\t\tn.checked = true;\r\n\t\t\t}else {\r\n\t\t\t\tvar t = document.createElement(\"span\");\r\n\t\t\t\tt.className = \"dhx_text_disabled\";\r\n\t\t\t\tt.innerHTML = text(txts[i]);\r\n\t\t\t\tn.parentNode.insertBefore(t, n);\r\n\t\t\t\tn.parentNode.removeChild(n);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tvar old = scheduler._fill_lightbox;\r\n\tscheduler._fill_lightbox = function() {\r\n\r\n\t\tvar lb = this.getLightbox();\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\tlb.style.visibility = 'hidden';\r\n\t\t\t// lightbox should have actual sizes before rendering controls\r\n\t\t\t// currently only matters for dhtmlxCombo\r\n\t\t\tlb.style.display = 'block';\r\n\t\t}\r\n\t\tvar res = old.apply(this, arguments);\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\t//reset visibility and display\r\n\t\t\tlb.style.visibility = '';\r\n\t\t\tlb.style.display = 'none';\r\n\t\t}\r\n\r\n\t\tif (this.config.readonly_active) {\r\n\r\n\t\t\tvar originalForm = this.getLightbox();\r\n\t\t\tvar readonlyForm = this._lightbox_r = originalForm.cloneNode(true);\r\n\t\t\treadonlyForm.id = scheduler.uid();\r\n\t\t\treadonlyForm.className += \" dhx_cal_light_readonly\";\r\n\t\t\ttxt_replace(\"textarea\", originalForm, readonlyForm, function(a) {\r\n\t\t\t\treturn a.value;\r\n\t\t\t});\r\n\t\t\ttxt_replace(\"input\", originalForm, readonlyForm, false);\r\n\t\t\ttxt_replace(\"select\", originalForm, readonlyForm, function(a) {\r\n\t\t\t\tif(!a.options.length) return \"\";\r\n\t\t\t\treturn a.options[Math.max((a.selectedIndex || 0), 0)].text;\r\n\t\t\t});\r\n\r\n\t\t\toriginalForm.parentNode.insertBefore(readonlyForm, originalForm);\r\n\r\n\t\t\tthis.showCover(readonlyForm);\r\n\t\t\tif (scheduler._lightbox)\r\n\t\t\t\tscheduler._lightbox.parentNode.removeChild(scheduler._lightbox);\r\n\t\t\tthis._lightbox = readonlyForm;\r\n\r\n\t\t\tif (scheduler.config.drag_lightbox)\r\n\t\t\t\tscheduler.event(readonlyForm.firstChild, \"mousedown\", scheduler._ready_to_dnd);\r\n\t\t\t\t\r\n\t\t\tscheduler._init_lightbox_events();\r\n\t\t\tthis.setLightboxSize();\r\n\t\t}\r\n\t\treturn res;\r\n\t};\r\n\r\n\tvar hold = scheduler.hide_lightbox;\r\n\tscheduler.hide_lightbox = function() {\r\n\t\tif (this._lightbox_r) {\r\n\t\t\tthis._lightbox_r.parentNode.removeChild(this._lightbox_r);\r\n\t\t\tthis._lightbox_r = this._lightbox = null;\r\n\t\t}\r\n\r\n\t\treturn hold.apply(this, arguments);\r\n\t};\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.occurrence_timestamp_in_utc = false;\r\nscheduler.config.recurring_workdays = [1,2,3,4,5];\r\nscheduler.form_blocks[\"recurring\"] = {\r\n\t_get_node : function(node){\r\n\t\tif (typeof node == \"string\"){\r\n\t\t\tlet element = scheduler._lightbox.querySelector(`#${node}`);\r\n\t\t\tif(!element){\r\n\t\t\t\t// form is detached from lightbox \r\n\t\t\t\t// search globally, won't work in LWC\r\n\t\t\t\telement = document.getElementById(node);\r\n\t\t\t}\r\n\t\t\tnode = element;\r\n\t\t}\r\n\t\tif (node.style.display == 'none')\r\n\t\t\tnode.style.display = \"\";\r\n\t\treturn node;\r\n\t},\r\n\t_outer_html: function(node){\r\n\t\treturn node.outerHTML || getOuterHTML(node);\r\n\r\n\t\t//probably not needed, FF v10- only\r\n\t\tfunction getOuterHTML(n){\r\n\t\t\tvar div = document.createElement('div'), h;\r\n\t\t\tdiv.appendChild( n.cloneNode(true) );\r\n\t\t\th = div.innerHTML;\r\n\t\t\tdiv = null;\r\n\t\t\treturn h;\r\n\t\t}\r\n\t},\r\n\trender:function(sns) {\r\n\t\tif(sns.form){\r\n\t\t\tvar rec = scheduler.form_blocks[\"recurring\"];\r\n\t\t\tvar form = rec._get_node(sns.form);\r\n\t\t\tvar html = rec._outer_html(form);\r\n\t\t\tform.style.display = 'none';\r\n\t\t\treturn html;\r\n\t\t}\r\n\t\tvar loc = scheduler.locale.labels;\r\n\t\treturn '
'+\r\n\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t''+loc.repeat_text_week_count+'
'+\r\n\t\t\t\t\t\t\t\t' '+\r\n\t\t\t\t\t\t\t\t\t' '+\r\n\t\t\t\t\t\t\t\t\t\t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\r\n\t\tif(!col) return null;\r\n\t\tif(col.nodeName) return col;\r\n\r\n\t\tif(col.length){\r\n\t\t\tfor(var i=0; i < col.length; i++){\r\n\t\t\t\tif(col[i].value == value)\r\n\t\t\t\t\treturn col[i];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\t_get_node_value: function(els, name, multiselect){\r\n\t\tvar col = els[name];\r\n\t\tif(!col) return \"\";\r\n\t\tif(col.length){\r\n\t\t\tif(multiselect){\r\n\t\t\t\tvar res = [];\r\n\t\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\t\tif (col[i].checked) res.push(col[i].value);\r\n\r\n\t\t\t\treturn res;\r\n\t\t\t}else{\r\n\t\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\t\tif (col[i].checked) return col[i].value;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(col.value)\r\n\t\t\treturn !multiselect ? col.value : [col.value];\r\n\t},\r\n\r\n\t_get_node_numeric_value: function(els, name){\r\n\t\tvar value = scheduler.form_blocks[\"recurring\"]._get_node_value(els, name);\r\n\t\treturn ((value * 1) || 0);\r\n\t},\r\n\r\n\t_set_node_value: function(els, name, value){\r\n\t\tvar col = els[name];\r\n\t\tif(!col) return;\r\n\r\n\t\tif(col.name == name){\r\n\t\t\tcol.value = value;\r\n\t\t}else if(col.length){\r\n\t\t\tvar hash_value = typeof value == \"object\";\r\n\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\tif (hash_value || col[i].value == value){\r\n\t\t\t\t\tcol[i].checked = hash_value ? !!value[col[i].value] : !!value;\r\n\t\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t_init_set_value:function(node, value, ev) {\r\n\t\tvar block = scheduler.form_blocks[\"recurring\"];\r\n\t\tvar get_value = block._get_node_value;\r\n\t\tvar set_value = block._set_node_value;\r\n\t\tscheduler.form_blocks[\"recurring\"]._ds = {start:ev.start_date, end:ev._end_date};\r\n\r\n\t\tvar str_date_format = scheduler.date.str_to_date(scheduler.config.repeat_date, false, true);\r\n\t\tvar str_date = function(str_date) {\r\n\t\t\tvar date = str_date_format(str_date);\r\n\t\t\tif (scheduler.config.include_end_by)\r\n\t\t\t\tdate = scheduler.date.add(date, 1, 'day');\r\n\t\t\treturn date;\r\n\t\t};\r\n\r\n\t\tvar date_str = scheduler.date.date_to_str(scheduler.config.repeat_date);\r\n\r\n\t\tvar top = node.getElementsByTagName(\"FORM\")[0];\r\n\t\tvar els = {};\r\n\r\n\t\tfunction register_els(inps) {\r\n\t\t\tfor (var i = 0; i < inps.length; i++) {\r\n\t\t\t\tvar inp = inps[i];\r\n\r\n\t\t\t\tif(inp.name){\r\n\t\t\t\t\tif(!els[inp.name]){\r\n\t\t\t\t\t\tels[inp.name] = inp;\r\n\t\t\t\t\t}else if(els[inp.name].nodeType){\r\n\t\t\t\t\t\tvar node = els[inp.name];\r\n\t\t\t\t\t\tels[inp.name] = [node, inp];\r\n\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tels[inp.name].push(inp);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tregister_els(top.getElementsByTagName(\"INPUT\"));\r\n\t\tregister_els(top.getElementsByTagName(\"SELECT\"));\r\n\r\n\t\tif (!scheduler.config.repeat_date_of_end) {\r\n\t\t\tvar formatter = scheduler.date.date_to_str(scheduler.config.repeat_date);\r\n\t\t\tscheduler.config.repeat_date_of_end = formatter(scheduler.date.add(scheduler._currentDate(), 30, \"day\"));\r\n\t\t}\r\n\t\tset_value(els, \"date_of_end\", scheduler.config.repeat_date_of_end);\r\n\r\n\t\tvar $ = function(a) {\r\n\t\t\treturn scheduler._lightbox.querySelector(`#${a}`) || { style:{} };//return fake object if node not found\r\n\t\t};\r\n\r\n\t\tfunction change_current_view() {\r\n\t\t\t$(\"dhx_repeat_day\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_week\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_month\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_year\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_\" + this.value).style.display = \"\";\r\n\t\t\tscheduler.setLightboxSize();\r\n\t\t}\r\n\r\n\t\tfunction get_repeat_code(dates) {\r\n\t\t\tvar code = [get_value(els, \"repeat\")];\r\n\t\t\tget_rcode[code[0]](code, dates);\r\n\r\n\t\t\twhile (code.length < 5) code.push(\"\");\r\n\t\t\tvar repeat = \"\";\r\n\r\n\t\t\tvar end = get_end_rule(els);\r\n\r\n\t\t\tif (end == \"no\") {\r\n\t\t\t\tdates.end = new Date(9999, 1, 1);\r\n\t\t\t\trepeat = \"no\";\r\n\t\t\t}\r\n\t\t\telse if (end == \"date_of_end\") {\r\n\t\t\t\tdates.end = str_date(get_value(els, \"date_of_end\"));\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tscheduler.transpose_type(code.join(\"_\"));\r\n\t\t\t\trepeat = Math.max(1, get_value(els, \"occurences_count\"));\r\n\r\n\t\t\t\tvar transp = 0;\r\n\r\n\t\t\t\t//var transp = ((code[0] == \"week\" && code[4] && code[4].toString().indexOf(scheduler.config.start_on_monday ? 1 : 0) == -1) ? 1 : 0);\r\n\r\n\t\t\t\t// which is equal to following code, seems to produce extra instance, not clear why needed\r\n\r\n\t\t\t\t/*if(code[0] == \"week\"){\r\n\t\t\t\t\tvar days = code[4] || \"\";\r\n\t\t\t\t\tif(scheduler.config.start_on_monday){\r\n\t\t\t\t\t\tif(days.indexOf(1) == -1)\r\n\t\t\t\t\t\ttransp = 1;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(days.indexOf(0) == -1)\r\n\t\t\t\t\t\ttransp = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}*/\r\n\r\n\t\t\t//\tdates.end = scheduler.date.add(new Date(dates.start), repeat + transp, code.join(\"_\"));\r\n\r\n\t\t\t\tdates.end = scheduler.date[\"add_\" + code.join(\"_\")](new Date(dates.start), repeat + transp, {start_date: dates.start}) || dates.start;\r\n\t\t\t}\r\n\r\n\t\t\treturn code.join(\"_\") + \"#\" + repeat;\r\n\t\t}\r\n\t\tfunction get_end_rule(els){\r\n\t\t\tvar end = els[\"end\"];\r\n\t\t\tif(end.length){\r\n\t\t\t\tfor(var i =0; i < end.length; i++){\r\n\t\t\t\t\tif(end[i].checked){\r\n\t\t\t\t\t\tif(end[i].value && end[i].value != \"on\"){//seems to be default value:var input = document.createElement(\"input\"); input.type = \"radio\"; input.value\r\n\t\t\t\t\t\t\treturn end[i].value;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tif(!i){\r\n\t\t\t\t\t\t\t\treturn \"no\";\r\n\t\t\t\t\t\t\t}else if(i == 2){\r\n\t\t\t\t\t\t\t\treturn \"date_of_end\";\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\treturn \"occurences_count\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(end.value)\r\n\t\t\t\t\treturn end.value;\r\n\t\t\t}\r\n\t\t\treturn \"no\";\r\n\t\t}\r\n\t\tfunction set_end_rule(els, value){\r\n\t\t\tvar end = els[\"end\"];\r\n\r\n\t\t\tif(end.length){\r\n\t\t\t\tvar has_values = !!end[0].value && end[0].value != \"on\";\r\n\t\t\t\tif(has_values){\r\n\t\t\t\t\tfor(var i =0; i < end.length; i++){\r\n\t\t\t\t\t\tif(end[i].value == value)\r\n\t\t\t\t\t\t\tend[i].checked = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar ind = 0;\r\n\t\t\t\t\tswitch(value){\r\n\t\t\t\t\t\tcase \"no\":\r\n\t\t\t\t\t\t\tind = 0;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"date_of_end\":\r\n\t\t\t\t\t\t\tind = 2;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tind = 1;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend[ind].checked = true;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tend.value = value;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tscheduler.form_blocks[\"recurring\"]._get_repeat_code = get_repeat_code;\r\n\t\tvar get_rcode = {\r\n\t\t\tmonth:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tif (get_value(els, \"month_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_count\")));\r\n\t\t\t\t\tdates.start.setDate(get_value(els, \"month_day\"));\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_count2\")));\r\n\t\t\t\t\tcode.push( get_value(els, \"month_day2\"));\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_week2\")));\r\n\t\t\t\t\tif (!scheduler.config.repeat_precise){\r\n\t\t\t\t\t\tdates.start.setDate(1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tdates._start = true;\r\n\t\t\t},\r\n\t\t\tweek:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"week_count\")));\r\n\t\t\t\tcode.push(\"\");\r\n\t\t\t\tcode.push(\"\");\r\n\t\t\t\tvar t = [];\r\n\r\n\t\t\t\tvar col = get_value(els, \"week_day\", true);\r\n\t\t\t\t//var col = els[\"week_day\"];\r\n\t\t\t\tvar day = dates.start.getDay();\r\n\t\t\t\tvar start_exists = false;\r\n\r\n\t\t\t\tfor (var i = 0; i < col.length; i++){\r\n\t\t\t\t\tt.push(col[i]);\r\n\t\t\t\t\tstart_exists = start_exists || col[i] == day;\r\n\t\t\t\t}\r\n\t\t\t\tif (!t.length){\r\n\t\t\t\t\tt.push(day);\r\n\t\t\t\t\tstart_exists = true;\r\n\t\t\t\t}\r\n\t\t\t\tt.sort();\r\n\r\n\r\n\t\t\t\tif (!scheduler.config.repeat_precise){\r\n\t\t\t\t\tdates.start = scheduler.date.week_start(dates.start);\r\n\t\t\t\t\tdates._start = true;\r\n\t\t\t\t} else if (!start_exists){\r\n\t\t\t\t\tscheduler.transpose_day_week(dates.start, t, 1, 7);\r\n\t\t\t\t\tdates._start = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcode.push(t.join(\",\"));\r\n\t\t\t},\r\n\t\t\tday:function(code) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tif (get_value(els, \"day_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"day_count\")));\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcode.push(\"week\");\r\n\t\t\t\t\tcode.push(1);\r\n\t\t\t\t\tcode.push(\"\");\r\n\t\t\t\t\tcode.push(\"\");\r\n\t\t\t\t\tcode.push(scheduler.config.recurring_workdays.join(\",\"));\r\n\t\t\t\t\tcode.splice(0, 1);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tyear:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\r\n\t\t\t\tif (get_value(els, \"year_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(\"1\");\r\n\t\t\t\t\tdates.start.setMonth(0);\r\n\t\t\t\t\tdates.start.setDate(get_value(els, \"year_day\"));\r\n\t\t\t\t\tdates.start.setMonth(get_value(els, \"year_month\"));\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcode.push(\"1\");\r\n\t\t\t\t\tcode.push(get_value(els, \"year_day2\"));\r\n\t\t\t\t\tcode.push(get_value(els, \"year_week2\"));\r\n\t\t\t\t\tdates.start.setDate(1);\r\n\t\t\t\t\tdates.start.setMonth(get_value(els, \"year_month2\"));\r\n\t\t\t\t}\r\n\t\t\t\tdates._start = true;\r\n\t\t\t}\r\n\t\t};\r\n\t\tvar set_rcode = {\r\n\t\t\tweek:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\t\tset_value(els, \"week_count\", code[1]);\r\n\r\n\t\t\t\tvar t = code[4].split(\",\");\r\n\t\t\t\tvar d = {};\r\n\t\t\t\tfor (var i = 0; i < t.length; i++) d[t[i]] = true;\r\n\r\n\t\t\t\tset_value(els, \"week_day\", d);\r\n\r\n\t\t\t\t//for (var i = 0; i < col.length; i++)\r\n\t\t\t\t//\tcol[i].checked = (!!d[col[i].value]);\r\n\t\t\t},\r\n\t\t\tmonth:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\r\n\t\t\t\tif (code[2] === \"\") {\r\n\t\t\t\t\tset_value(els, \"month_type\", \"d\");\r\n\t\t\t\t\tset_value(els, \"month_count\", code[1]);\r\n\t\t\t\t\tset_value(els, \"month_day\", dates.start.getDate());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tset_value(els, \"month_type\", \"w\");\r\n\t\t\t\t\tset_value(els, \"month_count2\", code[1]);\r\n\t\t\t\t\tset_value(els, \"month_week2\", code[3]);\r\n\t\t\t\t\tset_value(els, \"month_day2\", code[2]);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tday:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\t\tset_value(els, \"day_type\", \"d\");\r\n\t\t\t\tset_value(els, \"day_count\", code[1]);\r\n\t\t\t},\r\n\t\t\tyear:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\r\n\t\t\t\tif (code[2] === \"\") {\r\n\t\t\t\t\tset_value(els, \"year_type\", \"d\");\r\n\t\t\t\t\tset_value(els, \"year_day\", dates.start.getDate());\r\n\t\t\t\t\tset_value(els, \"year_month\", dates.start.getMonth());\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tset_value(els, \"year_type\", \"w\");\r\n\t\t\t\t\tset_value(els, \"year_week2\", code[3]);\r\n\t\t\t\t\tset_value(els, \"year_day2\", code[2]);\r\n\t\t\t\t\tset_value(els, \"year_month2\", dates.start.getMonth());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfunction set_repeat_code(code, dates) {\r\n\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\tvar data = code.split(\"#\");\r\n\t\t\tcode = data[0].split(\"_\");\r\n\t\t\tset_rcode[code[0]](code, dates);\r\n\r\n\t\t\tswitch (data[1]) {\r\n\t\t\t\tcase \"no\":\r\n\t\t\t\t\tset_end_rule(els, \"no\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"\":\r\n\t\t\t\t\tset_end_rule(els, \"date_of_end\");\r\n\r\n\t\t\t\t\tvar end_date = dates.end;\r\n\t\t\t\t\tif (scheduler.config.include_end_by){\r\n\t\t\t\t\t\tend_date = scheduler.date.add(end_date, -1, 'day');\r\n\t\t\t\t\t}\r\n\t\t\t\t\tset_value(els, \"date_of_end\", date_str(end_date));\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tset_end_rule(els, \"occurences_count\");\r\n\t\t\t\t\tset_value(els, \"occurences_count\", data[1]);\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tset_value(els, \"repeat\", code[0]);\r\n\t\t\t//e.checked = true;\r\n\r\n\t\t\tvar node = scheduler.form_blocks[\"recurring\"]._get_form_node(els, \"repeat\", code[0]);\r\n\t\t\tif(node.nodeName == \"SELECT\"/* && node.onchange*/){\r\n\t\t\t//\tnode.onchange();\r\n\t\t\t\tnode.dispatchEvent(new Event('change'));\r\n\t\t\t\tnode.dispatchEvent(new MouseEvent('click'));\r\n\t\t\t}else{\r\n\t\t\t\tnode.dispatchEvent(new MouseEvent('click'));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tscheduler.form_blocks[\"recurring\"]._set_repeat_code = set_repeat_code;\r\n\r\n\t\tfor (var i = 0; i < top.elements.length; i++) {\r\n\t\t\tvar el = top.elements[i];\r\n\t\t\tswitch (el.name) {\r\n\t\t\t\tcase \"repeat\":\r\n\t\t\t\t\tif (el.nodeName == \"SELECT\" && !el.$_eventAttached) {\r\n\t\t\t\t\t\tel.$_eventAttached = true;\r\n\t\t\t\t\t\tel.addEventListener(\"change\", change_current_view);\r\n\t\t\t\t\t} else if(!el.$_eventAttached){\r\n\t\t\t\t\t\tel.$_eventAttached = true;\r\n\t\t\t\t\t\tel.addEventListener(\"click\", change_current_view);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tscheduler._lightbox._rec_init_done = true;\r\n\t},\r\n\tset_value:function(node, value, ev) {\r\n\t\tvar rf = scheduler.form_blocks[\"recurring\"];\r\n\t\tif (!scheduler._lightbox._rec_init_done)\r\n\t\t\trf._init_set_value(node, value, ev);\r\n\t\tnode.open = !ev.rec_type;\r\n\r\n\t\tnode.blocked = this._is_modified_occurence(ev);\r\n\r\n\t\tvar ds = rf._ds;\r\n\t\tds.start = ev.start_date;\r\n\t\tds.end = ev._end_date;\r\n\r\n\t\trf._toggle_block();\r\n\r\n\t\tif (value)\r\n\t\t\trf._set_repeat_code(value, ds);\r\n\t},\r\n\tget_value:function(node, ev) {\r\n\t\tif (node.open) {\r\n\t\t\tvar ds = scheduler.form_blocks[\"recurring\"]._ds;\r\n\t\t\tvar actual_dates = {};\r\n\r\n\t\t\tvar timeControl = getTimeSection();\r\n\r\n\t\t\ttimeControl.getValue(actual_dates);\r\n\t\t\tds.start = actual_dates.start_date;\r\n\t\t\tev.rec_type = scheduler.form_blocks[\"recurring\"]._get_repeat_code(ds);\r\n\t\t\tif (ds._start) {\r\n\t\t\t\tev.start_date = new Date(ds.start);\r\n\t\t\t\tev._start_date = new Date(ds.start);\r\n\t\t\t\tds._start = false;\r\n\t\t\t} else\r\n\t\t\t\tev._start_date = null;\r\n\r\n\t\t\tev._end_date = ds.end;\r\n\t\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\t\t} else {\r\n\t\t\tev.rec_type = ev.rec_pattern = \"\";\r\n\t\t\tev._end_date = ev.end_date;\r\n\t\t}\r\n\t\treturn ev.rec_type;\r\n\t},\r\n\t_get_button: function(){\r\n\t\tvar node = getRecurringSection().header;\r\n\t\treturn node.firstChild.firstChild;\r\n\t},\r\n\t_get_form: function(){\r\n\t\treturn getRecurringSection().node;\r\n\t},\r\n\topen:function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form();\r\n\t\tif(!cont.open)\r\n\t\t\tblock._toggle_block();\r\n\t},\r\n\tclose: function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form();\r\n\r\n\t\tif(cont.open)\r\n\t\t\tblock._toggle_block();\r\n\t},\r\n\t_toggle_block: function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form(),\r\n\t\t\tel = block._get_button();\r\n\t\tif (!cont.open && !cont.blocked) {\r\n\t\t\tcont.style.height = \"auto\";//reset to default value\r\n\t\t\tif(el){\r\n\t\t\t\tel.style.backgroundPosition = \"-5px 0px\";\r\n\t\t\t\tel.nextSibling.innerHTML = scheduler.locale.labels.button_recurring_open;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tcont.style.height = \"0px\";\r\n\t\t\tif(el){\r\n\t\t\t\tel.style.backgroundPosition = \"-5px 20px\";\r\n\t\t\t\tel.nextSibling.innerHTML = scheduler.locale.labels.button_recurring;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcont.open = !cont.open;\r\n\r\n\t\tscheduler.setLightboxSize();\r\n\t},\r\n\tfocus:function(node) {\r\n\t},\r\n\tbutton_click:function(node, button, event) {\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\t\tvar cont = block._get_form();\r\n\t\tif (!cont.blocked)\r\n\t\t\tscheduler.form_blocks.recurring._toggle_block();\r\n\t}\r\n};\r\n\r\nfunction getTimeSection(){\r\n\tvar timeControl = scheduler.formSection('time');\r\n\tif(!timeControl){\r\n\t\ttimeControl = getFirstSectionOfType('time');\r\n\t}\r\n\tif(!timeControl){\r\n\t\ttimeControl = getFirstSectionOfType('calendar_time');\r\n\t}\r\n\r\n\t\r\n\tif (!timeControl) {\r\n\t\tthrow new Error([\"Can't calculate the recurring rule, the Recurring form block can't find the Time control. Make sure you have the time control in 'scheduler.config.lightbox.sections' config.\",\r\n\"You can use either the default time control https://docs.dhtmlx.com/scheduler/time.html, or the datepicker https://docs.dhtmlx.com/scheduler/minicalendar.html, or a custom control. \",\r\n\"In the latter case, make sure the control is named \\\"time\\\":\",\r\n\"\",\r\n\"scheduler.config.lightbox.sections = [\",\r\n\"{name:\\\"time\\\", height:72, type:\\\"YOU CONTROL\\\", map_to:\\\"auto\\\" }];\"]\r\n.join(\"\\n\"));\r\n\t}\r\n\r\n\treturn timeControl;\r\n}\r\n\r\nfunction getRecurringSection(){\r\n\tvar recurringSection = scheduler.formSection('recurring');\r\n\tif(!recurringSection){\r\n\t\trecurringSection = getFirstSectionOfType('recurring');\r\n\t}\r\n\r\n\tif (!recurringSection) {\r\n\t\tthrow new Error([\"Can't locate the Recurring form section.\",\r\n\t\t\"Make sure that you have the recurring control on the lightbox configuration https://docs.dhtmlx.com/scheduler/recurring_events.html#recurringlightbox \",\r\n\t\t\"and that the recurring control has name \\\"recurring\\\":\",\r\n\"\",\r\n\"scheduler.config.lightbox.sections = [\",\r\n\"\t{name:\\\"recurring\\\", ... }\",\r\n\"];\"].join(\"\\n\"));\r\n\r\n\t}\r\n\r\n\treturn recurringSection;\r\n}\r\n\r\nfunction getFirstSectionOfType(type){\r\n\tfor(var i = 0; i < scheduler.config.lightbox.sections.length; i++){\r\n\t\tvar section = scheduler.config.lightbox.sections[i];\r\n\t\tif(section.type === type){\r\n\t\t\treturn scheduler.formSection(section.name);\r\n\t\t}\r\n\t}\r\n\treturn null;\r\n}\r\n\r\n//problem may occur if we will have two repeating events in the same moment of time\r\nscheduler._rec_markers = {};\r\nscheduler._rec_markers_pull = {};\r\nscheduler._add_rec_marker = function(ev, time) {\r\n\tev._pid_time = time;\r\n\tthis._rec_markers[ev.id] = ev;\r\n\tif (!this._rec_markers_pull[ev.event_pid]) this._rec_markers_pull[ev.event_pid] = {};\r\n\tthis._rec_markers_pull[ev.event_pid][time] = ev;\r\n};\r\nscheduler._get_rec_marker = function(time, id) {\r\n\tvar ch = this._rec_markers_pull[id];\r\n\tif (ch) return ch[time];\r\n\treturn null;\r\n};\r\nscheduler._get_rec_markers = function(id) {\r\n\treturn (this._rec_markers_pull[id] || []);\r\n};\r\n\r\nfunction clearMilliseconds(date){\r\n//\treturn date;\r\n\treturn new Date(\r\n\t\tdate.getFullYear(), \r\n\t\tdate.getMonth(), \r\n\t\tdate.getDate(), \r\n\t\tdate.getHours(), \r\n\t\tdate.getMinutes(),\r\n\t\tdate.getSeconds(),\r\n\t\t0\r\n\t);\r\n}\r\n\r\nscheduler._rec_temp = [];\r\n(function() {\r\n\tvar old_add_event = scheduler.addEvent;\r\n\tscheduler.addEvent = function(start_date, end_date, text, id, extra_data) {\r\n\t\tvar ev_id = old_add_event.apply(this, arguments);\r\n\r\n\t\tif (ev_id && scheduler.getEvent(ev_id)) {\r\n\t\t\tvar ev = scheduler.getEvent(ev_id);\r\n\t\t\t\r\n\t\t\tif(ev.start_date){\r\n\t\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t\t}\r\n\t\t\tif(ev.end_date){\r\n\t\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t\t}\r\n\t\t\tif (this._is_modified_occurence(ev))\r\n\t\t\t\tscheduler._add_rec_marker(ev, ev.event_length * 1000);\r\n\t\t\tif (ev.rec_type)\r\n\t\t\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\t\t}\r\n\t\treturn ev_id;\r\n\t};\r\n})();\r\n\r\nscheduler.attachEvent(\"onEventIdChange\", function(id, new_id) {\r\n\tif (this._ignore_call) return;\r\n\tthis._ignore_call = true;\r\n\r\n\tif(scheduler._rec_markers[id]){\r\n\t\t//important for for correct work of scheduler.getEvents(from, to) and collision detection\r\n\t\tscheduler._rec_markers[new_id] = scheduler._rec_markers[id];\r\n\t\tdelete scheduler._rec_markers[id];\r\n\t}\r\n\r\n\tif(scheduler._rec_markers_pull[id]){\r\n\t\tscheduler._rec_markers_pull[new_id] = scheduler._rec_markers_pull[id];\r\n\t\tdelete scheduler._rec_markers_pull[id];\r\n\t}\r\n\r\n\tfor (var i = 0; i < this._rec_temp.length; i++) {\r\n\t\tvar tev = this._rec_temp[i];\r\n\t\tif (tev.event_pid == id) {\r\n\t\t\ttev.event_pid = new_id;\r\n\t\t\tthis.changeEventId(tev.id, new_id + \"#\" + tev.id.split(\"#\")[1]);\r\n\t\t}\r\n\t}\r\n\r\n\tfor(var i in this._rec_markers){\r\n\t\tvar tev = this._rec_markers[i];\r\n\t\tif(tev.event_pid == id){\r\n\t\t\ttev.event_pid = new_id;\r\n\t\t\ttev._pid_changed = true;\r\n\t\t}\r\n\t}\r\n\r\n\tvar el = scheduler._rec_markers[new_id];\r\n\tif(el && el._pid_changed) {\r\n\t\tdelete el._pid_changed;\r\n\t\tsetTimeout(function() {\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler.callEvent(\"onEventChanged\", [new_id, scheduler.getEvent(new_id)]);\r\n\t\t}, 1);\r\n\t}\r\n\r\n\tdelete this._ignore_call;\r\n});\r\nscheduler.attachEvent(\"onConfirmedBeforeEventDelete\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (this._is_virtual_event(id) || (this._is_modified_occurence(ev) && ev.rec_type && ev.rec_type != 'none')) {\r\n\t\tid = id.split(\"#\");\r\n\t\tvar nid = this.uid();\r\n\t\tvar tid = (id[1]) ? id[1] : Math.round(ev._pid_time / 1000);\r\n\r\n\t\tvar nev = this._copy_event(ev);\r\n\t\tnev.id = nid;\r\n\t\tnev.event_pid = ev.event_pid || id[0];\r\n\t\tvar timestamp = tid;\r\n\t\tnev.event_length = timestamp;\r\n\t\tnev.rec_type = nev.rec_pattern = \"none\";\r\n\t\tthis.addEvent(nev);\r\n\r\n\t\tthis._add_rec_marker(nev, timestamp * 1000);\r\n\t} else {\r\n\t\tif (ev.rec_type && this._lightbox_id)\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\tvar sub = this._get_rec_markers(id);\r\n\t\tfor (var i in sub) {\r\n\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\tid = sub[i].id;\r\n\t\t\t\tif (this.getEvent(id))\r\n\t\t\t\t\tthis.deleteEvent(id, true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventDeleted\", function(id, ev){\r\n\tif(!this._is_virtual_event(id) && this._is_modified_occurence(ev)){\r\n\t\tif(!scheduler._events[id]){\r\n\t\t\tev.rec_type = ev.rec_pattern = \"none\";\r\n\t\t\tthis.setEvent(id, ev);\r\n\t\t}\r\n\t}\r\n});\r\nscheduler.attachEvent(\"onEventChanged\", function(id, event) {\r\n\tif (this._loading) return true;\r\n\r\n\tvar ev = this.getEvent(id);\r\n\r\n\tif (this._is_virtual_event(id)) {\r\n\t\tvar id = id.split(\"#\");\r\n\t\tvar nid = this.uid();\r\n\t\tthis._not_render = true;\r\n\r\n\t\tvar nev = this._copy_event(event);\r\n\t\tnev.id = nid;\r\n\t\tnev.event_pid = id[0];\r\n\t\tvar timestamp = id[1];\r\n\t\tnev.event_length = timestamp;\r\n\t\tnev.rec_type = nev.rec_pattern = \"\";\r\n\r\n\t\tthis._add_rec_marker(nev, timestamp * 1000);\r\n\t\tthis.addEvent(nev);\r\n\r\n\t\tthis._not_render = false;\r\n\r\n\t} else {\r\n\t\tif(ev.start_date){\r\n\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t}\r\n\t\tif(ev.end_date){\r\n\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t}\r\n\r\n\t\tif (ev.rec_type && this._lightbox_id){\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\t}\r\n\t\tvar sub = this._get_rec_markers(id);\r\n\t\tfor (var i in sub) {\r\n\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\tdelete this._rec_markers[sub[i].id];\r\n\t\t\t\tthis.deleteEvent(sub[i].id, true);\r\n\t\t\t}\r\n\t\t}\r\n\t\tdelete this._rec_markers_pull[id];\r\n\r\n\t\t// it's possible that after editing event is no longer exists, in such case we need to remove _select_id flag\r\n\t\tvar isEventFound = false;\r\n\t\tfor (var k = 0; k < this._rendered.length; k++) {\r\n\t\t\tif (this._rendered[k].getAttribute(this.config.event_attribute) == id)\r\n\t\t\t\tisEventFound = true;\r\n\t\t}\r\n\t\tif (!isEventFound)\r\n\t\t\tthis._select_id = null;\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventAdded\", function(id) {\r\n\tif (!this._loading) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (ev.rec_type && !ev.event_length){\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventSave\", function(id, data, is_new_event) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (!ev.rec_type && data.rec_type && !this._is_virtual_event(id))\r\n\t\tthis._select_id = null;\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventCreated\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (!ev.rec_type)\r\n\t\tev.rec_type = ev.rec_pattern = ev.event_length = ev.event_pid = \"\";\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventCancel\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (ev.rec_type) {\r\n\t\tthis._roll_back_dates(ev);\r\n\t\t// a bit expensive, but we need to be sure that event re-rendered, because view can be corrupted by resize , during edit process\r\n\t\tthis.render_view_data();\r\n\t}\r\n});\r\nscheduler._roll_back_dates = function(ev) {\r\n\tif(ev.start_date){\r\n\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t}\r\n\tif(ev.end_date){\r\n\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t}\r\n\tev.event_length = Math.round((ev.end_date.valueOf() - ev.start_date.valueOf()) / 1000);\r\n\tev.end_date = ev._end_date;\r\n\tif (ev._start_date) {\r\n\t\tev.start_date.setMonth(0);\r\n\t\tev.start_date.setDate(ev._start_date.getDate());\r\n\t\tev.start_date.setMonth(ev._start_date.getMonth());\r\n\t\tev.start_date.setFullYear(ev._start_date.getFullYear());\r\n\r\n\t}\r\n};\r\n\r\nscheduler._is_virtual_event = function(id){\r\n\treturn id.toString().indexOf(\"#\") != -1;\r\n};\r\nscheduler._is_modified_occurence = function(ev){\r\n\treturn (ev.event_pid && ev.event_pid != \"0\");\r\n};\r\n\r\nscheduler.showLightbox_rec = scheduler.showLightbox;\r\nscheduler.showLightbox = function(id) {\r\n\tvar locale = this.locale;\r\n\tvar c = scheduler.config.lightbox_recurring;\r\n\tvar ev = this.getEvent(id);\r\n\tvar pid = ev.event_pid;\r\n\tvar isVirtual = this._is_virtual_event(id);\r\n\tif (isVirtual)\r\n\t\tpid = id.split(\"#\")[0];\r\n\r\n\t// show series\r\n\tvar showSeries = function(id) {\r\n\t\tvar event = scheduler.getEvent(id);\r\n\t\tevent._end_date = event.end_date;\r\n\t\tevent.end_date = new Date(event.start_date.valueOf() + event.event_length * 1000);\r\n\t\treturn scheduler.showLightbox_rec(id); // editing series\r\n\t};\r\n\r\n\tif ( (pid || pid*1 === 0) && ev.rec_type) {\r\n\t\t// direct API call on series id\r\n\t\treturn showSeries(id);\r\n\t}\r\n\tif ( !pid || pid === '0' || ( (!locale.labels.confirm_recurring || c == 'instance') || (c == 'series' && !isVirtual)) ) {\r\n\t\t// editing instance or non recurring event\r\n\t\treturn this.showLightbox_rec(id);\r\n\t}\r\n\tif (c == 'ask') {\r\n\t\tvar that = this;\r\n\t\tscheduler.modalbox({\r\n\t\t\ttext: locale.labels.confirm_recurring,\r\n\t\t\ttitle: locale.labels.title_confirm_recurring,\r\n\t\t\twidth: \"500px\",\r\n\t\t\tposition: \"middle\",\r\n\t\t\tbuttons:[locale.labels.button_edit_series, locale.labels.button_edit_occurrence, locale.labels.icon_cancel],\r\n\t\t\tcallback: function(index) {\r\n\t\t\t\tswitch(+index) {\r\n\t\t\t\t\tcase 0:\r\n\t\t\t\t\t\treturn showSeries(pid);\r\n\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\treturn that.showLightbox_rec(id);\r\n\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t} else {\r\n\t\tshowSeries(pid);\r\n\t}\r\n};\r\n\r\n\r\nscheduler.get_visible_events_rec = scheduler.get_visible_events;\r\nscheduler.get_visible_events = function(only_timed) {\r\n\tfor (var i = 0; i < this._rec_temp.length; i++)\r\n\t\tdelete this._events[this._rec_temp[i].id];\r\n\tthis._rec_temp = [];\r\n\r\n\tvar stack = this.get_visible_events_rec(only_timed);\r\n\tvar out = [];\r\n\tfor (var i = 0; i < stack.length; i++) {\r\n\t\tif (stack[i].rec_type) {\r\n\t\t\t//deleted element of series\r\n\t\t\tif (stack[i].rec_pattern != \"none\")\r\n\t\t\t\tthis.repeat_date(stack[i], out);\r\n\t\t}\r\n\t\telse out.push(stack[i]);\r\n\t}\r\n\treturn out;\r\n};\r\n\r\n\r\n(function() {\r\n\tvar old = scheduler.isOneDayEvent;\r\n\tscheduler.isOneDayEvent = function(ev) {\r\n\t\tif (ev.rec_type) return true;\r\n\t\treturn old.call(this, ev);\r\n\t};\r\n\tvar old_update_event = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id) {\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tif(ev && ev.rec_type){\r\n\t\t\t//rec_type can be changed without the lightbox,\r\n\t\t\t// make sure rec_pattern updated as well\r\n\t\t\tev.rec_pattern = (ev.rec_type || \"\").split(\"#\")[0];\r\n\t\t}\r\n\t\tif (ev && ev.rec_type && !this._is_virtual_event(id)) {\r\n\t\t\tscheduler.update_view();\r\n\t\t} else {\r\n\t\t\told_update_event.call(this, id);\r\n\t\t}\r\n\t};\r\n})();\r\n\r\nscheduler.transponse_size = {\r\n\tday:1, week:7, month:1, year:12\r\n};\r\nscheduler.date.day_week = function(sd, day, week) {\r\n\tsd.setDate(1);\r\n\tvar originalMonth = scheduler.date.month_start(new Date(sd));\r\n\tweek = (week - 1) * 7;\r\n\tvar cday = sd.getDay();\r\n\tvar nday = day * 1 + week - cday + 1;\r\n\tsd.setDate(nday <= week ? (nday + 7) : nday);\r\n\tvar newMonth = scheduler.date.month_start(new Date(sd));\r\n\tif(originalMonth.valueOf() !== newMonth.valueOf()){\r\n\t\treturn false;\r\n\t}\r\n\treturn true;\r\n};\r\nscheduler.transpose_day_week = function(sd, list, cor, size, cor2) {\r\n\tvar cday = (sd.getDay() || (scheduler.config.start_on_monday ? 7 : 0)) - cor;\r\n\tfor (var i = 0; i < list.length; i++) {\r\n\t\tif (list[i] > cday)\r\n\t\t\treturn sd.setDate(sd.getDate() + list[i] * 1 - cday - (size ? cor : cor2));\r\n\t}\r\n\tthis.transpose_day_week(sd, list, cor + size, null, cor);\r\n};\r\nscheduler.transpose_type = function(type) {\r\n\tvar transposeRecurring = \"transpose_\" + type;\r\n\tif (!this.date[transposeRecurring]) {\r\n\t\tvar recurringParts = type.split(\"_\");\r\n\t\tvar dayDurationMs = 60 * 60 * 24 * 1000;\r\n\t\tvar addRecurring = \"add_\" + type;\r\n\t\tvar recurringStepDays = this.transponse_size[recurringParts[0]] * recurringParts[1];\r\n\r\n\t\tif (recurringParts[0] == \"day\" || recurringParts[0] == \"week\") {\r\n\t\t\tvar weekDays = null;\r\n\t\t\tif (recurringParts[4]) {\r\n\t\t\t\tweekDays = recurringParts[4].split(\",\");\r\n\t\t\t\tif (scheduler.config.start_on_monday) {\r\n\t\t\t\t\tfor (var i = 0; i < weekDays.length; i++)\r\n\t\t\t\t\t\tweekDays[i] = (weekDays[i] * 1) || 7;\r\n\t\t\t\t\tweekDays.sort();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.date[transposeRecurring] = function(nd, td) {\r\n\t\t\t\tvar delta = Math.floor((td.valueOf() - nd.valueOf()) / (dayDurationMs * recurringStepDays));\r\n\t\t\t\tif (delta > 0)\r\n\t\t\t\t\tnd.setDate(nd.getDate() + delta * recurringStepDays);\r\n\t\t\t\tif (weekDays)\r\n\t\t\t\t\tscheduler.transpose_day_week(nd, weekDays, 1, recurringStepDays);\r\n\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t\tthis.date[addRecurring] = function(sd, inc) {\r\n\t\t\t\tvar nd = new Date(sd.valueOf());\r\n\t\t\t\tif (weekDays) {\r\n\t\t\t\t\tfor (var count = 0; count < inc; count++)\r\n\t\t\t\t\t\tscheduler.transpose_day_week(nd, weekDays, 0, recurringStepDays);\r\n\t\t\t\t} else\r\n\t\t\t\t\tnd.setDate(nd.getDate() + inc * recurringStepDays);\r\n\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t}\r\n\t\telse if (recurringParts[0] == \"month\" || recurringParts[0] == \"year\") {\r\n\t\t\tthis.date[transposeRecurring] = function(nd, td, seriesInstance) {\r\n\t\t\t\tvar delta = Math.ceil(((td.getFullYear() * 12 + td.getMonth() * 1 + 1) - (nd.getFullYear() * 12 + nd.getMonth() * 1 + 1)) / (recurringStepDays) - 1);\r\n\r\n\t\t\t\tif (delta >= 0){\r\n\t\t\t\t\tnd.setDate(1);\r\n\t\t\t\t\tnd.setMonth(nd.getMonth() + delta * recurringStepDays);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn scheduler.date[addRecurring](nd, 0, seriesInstance);\r\n\t\t\t\t//if (str[3]){\r\n\t\t\t\t//\tscheduler.date.day_week(nd, str[2], str[3]);\r\n\t\t\t\t//}\r\n\t\t\t};\r\n\t\t\tthis.date[addRecurring] = function(sd, inc, seriesInstance, currentCount) {\r\n\t\t\t\tif(!currentCount){\r\n\t\t\t\t\tcurrentCount = 1;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcurrentCount++;\r\n\t\t\t\t}\r\n\t\t\t\tvar maxCount = 12;\r\n\t\t\t\tif(currentCount > maxCount){\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar nd = new Date(sd.valueOf());\r\n\t\t\t\tnd.setDate(1);\r\n\r\n\r\n\t\t\t\tnd.setMonth(nd.getMonth() + inc * recurringStepDays);\r\n\t\t\t\tvar origMonth = nd.getMonth();\r\n\t\t\t\tvar origYear = nd.getFullYear();\r\n\t\t\t\tnd.setDate(seriesInstance.start_date.getDate());\r\n\t\t\t\tif (recurringParts[3]){\r\n\t\t\t\t\tscheduler.date.day_week(nd, recurringParts[2], recurringParts[3]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar correctOverflowInstances = scheduler.config.recurring_overflow_instances;\r\n\t\t\t\tif(nd.getMonth() != origMonth && correctOverflowInstances != \"none\"){\r\n\t\t\t\t\t// no such day in a month\r\n\t\t\t\t\tif(correctOverflowInstances === \"lastDay\"){\r\n\t\t\t\t\t\t// return either last day of the month\r\n\t\t\t\t\t\tnd = new Date(origYear, origMonth + 1, 0, nd.getHours(), nd.getMinutes(), nd.getSeconds(), nd.getMilliseconds());\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t// or go to the next instance\r\n\t\t\t\t\t\tnd = scheduler.date[addRecurring](new Date(origYear, origMonth + 1, 0), inc||1, seriesInstance, currentCount);\r\n\t\t\t\t\t\t// if next instance is not possible (e.g. 'repeat on 40th day of the month') null will be returned\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.repeat_date = function(ev, stack, non_render, from, to, maxCount) {\r\n\r\n\tfrom = from || this._min_date;\r\n\tto = to || this._max_date;\r\n\tvar max = maxCount || -1;\r\n\tvar td = new Date(ev.start_date.valueOf());\r\n\r\n\tvar startHour = td.getHours();\r\n\r\n\tvar visibleCount = 0;\r\n\r\n\tif (!ev.rec_pattern && ev.rec_type)\r\n\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\r\n\tthis.transpose_type(ev.rec_pattern);\r\n\ttd = scheduler.date[\"transpose_\" + ev.rec_pattern](td, from, ev);\r\n\twhile ( td && (\r\n\t\ttd < ev.start_date ||\r\n\t\tscheduler._fix_daylight_saving_date(td,from,ev,td,new Date(td.valueOf() + ev.event_length * 1000)).valueOf() <= from.valueOf() ||\r\n\t\ttd.valueOf() + ev.event_length * 1000 <= from.valueOf())){\r\n\t\t\ttd = this.date[\"add_\" + ev.rec_pattern](td, 1, ev);\r\n\r\n\t}\r\n\twhile (td && (td < to && td < ev.end_date && (max < 0 || visibleCount < max))) {\r\n\t\ttd.setHours(startHour);\r\n\r\n\t\tvar timestamp = (scheduler.config.occurrence_timestamp_in_utc) ? Date.UTC(td.getFullYear(), td.getMonth(), td.getDate(), td.getHours(), td.getMinutes(), td.getSeconds()) : td.valueOf();\r\n\t\tvar ch = this._get_rec_marker(timestamp, ev.id);\r\n\t\tif (!ch) { // unmodified element of series\r\n\t\t\tvar ted = new Date(td.valueOf() + ev.event_length * 1000);\r\n\t\t\tvar copy = this._copy_event(ev);\r\n\t\t\t//copy._timed = ev._timed;\r\n\t\t\tcopy.text = ev.text;\r\n\t\t\tcopy.start_date = td;\r\n\t\t\tcopy.event_pid = ev.id;\r\n\t\t\tcopy.id = ev.id + \"#\" + Math.round(timestamp / 1000);\r\n\t\t\tcopy.end_date = ted;\r\n\r\n\t\t\tcopy.end_date = scheduler._fix_daylight_saving_date(copy.start_date, copy.end_date, ev, td, copy.end_date);\r\n\r\n\t\t\tcopy._timed = this.isOneDayEvent(copy);\r\n\r\n\t\t\tif (!copy._timed && !this._table_view && !this.config.multi_day) return;\r\n\t\t\tstack.push(copy);\r\n\r\n\t\t\tif (!non_render) {\r\n\t\t\t\tthis._events[copy.id] = copy;\r\n\t\t\t\tthis._rec_temp.push(copy);\r\n\t\t\t}\r\n\r\n\t\t\tvisibleCount++;\r\n\r\n\t\t} else\r\n\t\tif (non_render){\r\n\t\t\tif(ch.rec_type != \"none\"){\r\n\t\t\t\tvisibleCount++;\r\n\t\t\t}\r\n\t\t\tstack.push(ch);\r\n\t\t}\r\n\r\n\t\ttd = this.date[\"add_\" + ev.rec_pattern](td, 1, ev);\r\n\t//\tif(!scheduler.date[\"validate_add_\" + ev.rec_pattern](td, 1, ev.rec_pattern)){\r\n\t///\t\talert(\"detect add\")\r\n\t//\t}\r\n\t}\r\n};\r\nscheduler._fix_daylight_saving_date = function(start_date, end_date, ev, counter, default_date) {\r\n\tvar shift = start_date.getTimezoneOffset() - end_date.getTimezoneOffset();\r\n\tif (shift) {\r\n\t\tif (shift > 0) {\r\n\t\t\t// e.g. 24h -> 23h\r\n\t\t\treturn new Date(counter.valueOf() + ev.event_length * 1000 - shift * 60 * 1000);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// e.g. 24h -> 25h\r\n\t\t\treturn new Date(end_date.valueOf() - shift * 60 * 1000);\r\n\t\t}\r\n\t}\r\n\treturn new Date(default_date.valueOf());\r\n};\r\nscheduler.getRecDates = function(id, max) {\r\n\tvar ev = typeof id == \"object\" ? id : scheduler.getEvent(id);\r\n\tvar recurrings = [];\r\n\tmax = max || 100;\r\n\r\n\tif (!ev.rec_type) {\r\n\t\treturn [\r\n\t\t\t{ start_date: ev.start_date, end_date: ev.end_date }\r\n\t\t];\r\n\t}\r\n\tif (ev.rec_type == \"none\") {\r\n\t\treturn [];\r\n\t}\r\n\r\n\tscheduler.repeat_date(ev, recurrings, true, ev.start_date, ev.end_date, max);\r\n\r\n\tvar result = [];\r\n\tfor(var i = 0; i < recurrings.length; i++){\r\n\t\tif(recurrings[i].rec_type != \"none\"){\r\n\t\t\tresult.push({start_date: recurrings[i].start_date, end_date: recurrings[i].end_date});\r\n\t\t}\r\n\t}\r\n\r\n\treturn result;\r\n};\r\nscheduler.getEvents = function(from, to) {\r\n\tvar result = [];\r\n\tfor (var a in this._events) {\r\n\t\tvar ev = this._events[a];\r\n\t\tif (ev && ev.start_date < to && ev.end_date > from) {\r\n\t\t\tif (ev.rec_pattern) {\r\n\t\t\t\tif (ev.rec_pattern == \"none\") continue;\r\n\t\t\t\tvar sev = [];\r\n\t\t\t\tthis.repeat_date(ev, sev, true, from, to);\r\n\t\t\t\tfor (var i = 0; i < sev.length; i++) {\r\n\t\t\t\t\t// if event is in rec_markers then it will be checked by himself, here need to skip it\r\n\t\t\t\t\tif (!sev[i].rec_pattern && sev[i].start_date < to && sev[i].end_date > from && !this._rec_markers[sev[i].id]) {\r\n\t\t\t\t\t\tresult.push(sev[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if (!this._is_virtual_event(ev.id)) { // if it's virtual event we can skip it\r\n\t\t\t\tresult.push(ev);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn result;\r\n};\r\n\r\nscheduler.config.repeat_date = \"%m.%d.%Y\";\r\nscheduler.config.lightbox.sections = [\r\n\t{name:\"description\", map_to:\"text\", type:\"textarea\" , focus:true},\r\n\t{name:\"recurring\", type:\"recurring\", map_to:\"rec_type\", button:\"recurring\"},\r\n\t{name:\"time\", height:72, type:\"time\", map_to:\"auto\"}\r\n];\r\n\r\n\r\n//drop secondary attributes\r\nscheduler._copy_dummy = function(ev) {\r\n\tvar start_date = new Date(this.start_date);\r\n\tvar end_date = new Date(this.end_date);\r\n\tthis.start_date = start_date;\r\n\tthis.end_date = end_date;\r\n\tthis.event_length = this.event_pid = this.rec_pattern = this.rec_type = null;\r\n};\r\n\r\nscheduler.config.include_end_by = false;\r\nscheduler.config.lightbox_recurring = 'ask'; // series, instance\r\n\r\nscheduler.attachEvent(\"onClearAll\", function(){\r\n\tscheduler._rec_markers = {}; //clear recurring events data\r\n\tscheduler._rec_markers_pull = {};\r\n\tscheduler._rec_temp = [];\r\n});\r\n\r\n}","import getSerializator from '../core/common/get_serializable_events';\r\nexport default function(scheduler){\r\n\r\n\t\r\nconst getSerializableData = getSerializator(scheduler);\r\n\r\n//redefine this method, if you want to provide a custom set of attributes for serialization\r\nscheduler.data_attributes=function(){\r\n\tvar attrs = [];\r\n\tvar format = scheduler._helpers.formatDate;\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\t\tfor (var name in ev)\r\n\t\t\tif (name.substr(0,1) !=\"_\")\r\n\t\t\t\tattrs.push([name,((name == \"start_date\" || name == \"end_date\")?format:null)]);\r\n\t\tbreak;\r\n\t}\r\n\treturn attrs;\r\n};\r\n\r\nscheduler.toXML = function(header){\r\n\tvar xml = [];\r\n\tvar attrs = this.data_attributes();\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\r\n\t\txml.push(\"\");\r\n\t\tfor (var i=0; i < attrs.length; i++)\r\n\t\t\txml.push(\"<\"+attrs[i][0]+\">\");\r\n\r\n\t\txml.push(\"\");\r\n\t}\r\n\treturn (header||\"\")+\"\"+xml.join(\"\\n\")+\"\";\r\n};\r\n\r\nscheduler._serialize_json_value = function(value){\r\n\tif(value === null || typeof value === \"boolean\"){\r\n\t\tvalue = \"\" + value;\r\n\t}else{\r\n\t\tif(!value && value !== 0){\r\n\t\t\tvalue = \"\";\r\n\t\t}\r\n\t\tvalue = '\"' + value.toString().\r\n\t\t\treplace(/\\n/g,\"\").\r\n\t\t\treplace(/\\\\/g,\"\\\\\\\\\").\r\n\t\t\treplace(/\"/g, '\\\\\"') + '\"';\r\n\t}\r\n\treturn value;\r\n};\r\n\r\n\r\n\r\nscheduler.toJSON = function(){\r\n\treturn JSON.stringify(this.serialize());\r\n};\r\n\r\n\r\nscheduler.toICal = function(header){\r\n\tvar start = \"BEGIN:VCALENDAR\\nVERSION:2.0\\nPRODID:-//dhtmlXScheduler//NONSGML v2.2//EN\\nDESCRIPTION:\";\r\n\tvar end = \"END:VCALENDAR\";\r\n\tvar format = scheduler.date.date_to_str(\"%Y%m%dT%H%i%s\");\r\n\tvar full_day_format = scheduler.date.date_to_str(\"%Y%m%d\");\r\n\r\n\tvar ical = [];\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\r\n\r\n\t\tical.push(\"BEGIN:VEVENT\");\r\n\t\tif (!ev._timed || (!ev.start_date.getHours() && !ev.start_date.getMinutes()))\r\n\t\t\tical.push(\"DTSTART:\"+full_day_format(ev.start_date));\r\n\t\telse\r\n\t\t\tical.push(\"DTSTART:\"+format(ev.start_date));\r\n\t\tif (!ev._timed || (!ev.end_date.getHours() && !ev.end_date.getMinutes()))\r\n\t\t\tical.push(\"DTEND:\"+full_day_format(ev.end_date));\r\n\t\telse\r\n\t\t\tical.push(\"DTEND:\"+format(ev.end_date));\r\n\t\tical.push(\"SUMMARY:\"+ev.text);\r\n\t\tical.push(\"END:VEVENT\");\r\n\t}\r\n\treturn start+(header||\"\")+\"\\n\"+ical.join(\"\\n\")+\"\\n\"+end;\r\n};\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Timeline\", scheduler.assert);\r\n}","import { TooltipManager } from \"./tooltipManager\";\r\n\r\nexport default function (scheduler: any) {\r\n\r\n\tscheduler.config.tooltip_timeout = 30;\r\n\tscheduler.config.tooltip_offset_y = 20;\r\n\tscheduler.config.tooltip_offset_x = 10;\r\n\tscheduler.config.tooltip_hide_timeout = 30;\r\n\r\n\tconst tooltipManager = new TooltipManager(scheduler);\r\n\r\n\tscheduler.ext.tooltips = tooltipManager;\r\n\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function () {\r\n\r\n\t\ttooltipManager.tooltipFor({\r\n\t\t\tselector: \"[\" + scheduler.config.event_attribute + \"]\",\r\n\t\t\thtml: (event: MouseEvent) => {\r\n\t\t\t\tif (scheduler._mobile && !scheduler.config.touch_tooltip) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst targetEventId = scheduler._locate_event(event.target);\r\n\t\t\t\tif (scheduler.getEvent(targetEventId)) {\r\n\t\t\t\t\tconst event = scheduler.getEvent(targetEventId);\r\n\t\t\t\t\treturn scheduler.templates.tooltip_text(event.start_date, event.end_date, event);\r\n\t\t\t\t}\r\n\t\t\t\treturn null;\r\n\t\t\t},\r\n\t\t\tglobal: false\r\n\t\t});\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function () {\r\n\t\ttooltipManager.destructor();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onLightbox\", function () {\r\n\t\ttooltipManager.hideTooltip();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeDrag\", function() {\r\n\t\ttooltipManager.hideTooltip();\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventDeleted\", function() {\r\n\t\ttooltipManager.hideTooltip();\r\n\t\treturn true;\r\n\t});\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Tree Timeline\", scheduler.assert);\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Units\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\nscheduler._get_url_nav = function(){\r\n\tvar p = {};\r\n\tvar data = (document.location.hash || \"\").replace(\"#\", \"\").split(\",\");\r\n\tfor (var i = 0; i < data.length; i++) {\r\n\t\tvar s = data[i].split(\"=\");\r\n\t\tif (s.length == 2)\r\n\t\t\tp[s[0]] = s[1];\r\n\t}\r\n\treturn p;\r\n};\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\", function () {\r\n\tvar first = true;\r\n\tvar s2d = scheduler.date.str_to_date(\"%Y-%m-%d\");\r\n\tvar d2s = scheduler.date.date_to_str(\"%Y-%m-%d\");\r\n\tvar select_event = scheduler._get_url_nav().event || null;\r\n\r\n\tscheduler.attachEvent(\"onAfterEventDisplay\", function(ev){\r\n\t\tselect_event = null;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function (om, od, m, d) {\r\n\t\tif (first) {\r\n\t\t\tfirst = false;\r\n\t\t\tvar p = scheduler._get_url_nav();\r\n\r\n\t\t\tif (p.event){\r\n\t\t\t\ttry{\r\n\t\t\t\t\tif(scheduler.getEvent(p.event)){\r\n\t\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\t\tshowEvent(p.event);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tvar handler = scheduler.attachEvent(\"onXLE\", function(){\r\n\t\t\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\t\t\tshowEvent(p.event);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\tscheduler.detachEvent(handler);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (e){}\r\n\t\t\t}\r\n\r\n\t\t\tif (p.date || p.mode) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tthis.setCurrentView((p.date ? s2d(p.date) : null), (p.mode || null));\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\t//assuming that mode is not available anymore\r\n\t\t\t\t\tthis.setCurrentView((p.date ? s2d(p.date) : null), m);\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar values = [\r\n\t\t\t\"date=\" + d2s(d || od),\r\n\t\t\t\"mode=\" + (m || om)\r\n\t\t];\r\n\r\n\t\tif(select_event){\r\n\t\t\tvalues.push(\"event=\" + select_event);\r\n\t\t}\r\n\r\n\t\tvar text = \"#\" + values.join(\",\");\r\n\t\tdocument.location.hash = text;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tfunction showEvent(e){\r\n\t\tif(scheduler.$destroyed){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tselect_event = e;\r\n\t\tif(scheduler.getEvent(e)){\r\n\t\t\tscheduler.showEvent(e);\r\n\t\t}\r\n\t}\r\n});\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Week Agenda\", scheduler.assert);\r\n}","export default function(scheduler){\r\nscheduler.attachEvent(\"onLightBox\",function(){\r\n\tif (this._cover){\r\n\t\ttry{\r\n\t\t\tthis._cover.style.height = this.expanded ? \"100%\" : ((document.body.parentNode||document.body).scrollHeight+\"px\");\r\n\t\t} catch(e) {\r\n\r\n\t\t}\r\n\t}\r\n});\r\n\r\nscheduler.form_blocks.select.set_value=function(node,value,ev){\r\n\tif (typeof value == \"undefined\" || value === \"\")\r\n\t\tvalue = (node.firstChild.options[0]||{}).value;\r\n\tnode.firstChild.value=value||\"\";\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\t// scheduler.config.year_x = 4;\r\n\t// scheduler.config.year_y = 3;\r\n\t// scheduler.xy.year_top = 0;\r\n\r\n\tscheduler.templates.year_date = function(date) {\r\n\t\treturn scheduler.date.date_to_str(scheduler.locale.labels.year_tab + \" %Y\")(date);\r\n\t};\r\n\tscheduler.templates.year_month = scheduler.date.date_to_str(\"%F\");\r\n\tscheduler.templates.year_scale_date = scheduler.date.date_to_str(\"%D\");\r\n\tscheduler.templates.year_tooltip = function(s, e, ev) {\r\n\t\treturn ev.text;\r\n\t};\r\n\r\n\tconst isYearMode = function() {\r\n\t\treturn scheduler._mode == \"year\";\r\n\t};\r\n\t\r\n\tconst getCellDate = function(node){\r\n\t\tvar day = scheduler.$domHelpers.closest(node, \"[data-cell-date]\");\r\n\t\tif(!day || !day.hasAttribute(\"data-cell-date\")) return null;\r\n\t\treturn scheduler.templates.parse_date(day.getAttribute(\"data-cell-date\"));\r\n\t};\r\n\r\n\t// dbl click hook for scheduler._on_dbl_click\r\n\tscheduler.dblclick_dhx_month_head = function(e) {\r\n\t\tif (isYearMode()) {\r\n\t\t\tconst target = e.target;\r\n\t\t\tif(scheduler.$domHelpers.closest(target, \".dhx_before\") || scheduler.$domHelpers.closest(target, \".dhx_after\")){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tconst date = getCellDate(target);\r\n\t\t\t\r\n\t\t\tif(date){\r\n\t\t\t\tconst start = date;\r\n\t\t\t\tconst end = this.date.add(start, 1, \"day\");\r\n\t\t\t\tif (!this.config.readonly && this.config.dblclick_create){\r\n\t\t\t\t\tthis.addEventNow(start.valueOf(), end.valueOf(), e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\t\r\n\tscheduler.attachEvent(\"onEventIdChange\", function(){\r\n\t\tif (isYearMode())\r\n\t\t\tthis.year_view(true);\r\n\t});\r\n\r\n\r\n\tvar old = scheduler.render_data;\r\n\tscheduler.render_data = function(evs) {\r\n\t\tif (!isYearMode()) return old.apply(this, arguments);\r\n\t\tfor (var i = 0; i < evs.length; i++)\r\n\t\t\tthis._year_render_event(evs[i]);\r\n\t};\r\n\r\n\tvar clear = scheduler.clear_view;\r\n\tscheduler.clear_view = function() {\r\n\t\tif (!isYearMode()) return clear.apply(this, arguments);\r\n\t\tvar dates = scheduler._year_marked_cells,\r\n\t\t\tdiv = null;\r\n\t\tfor (var date in dates) {\r\n\t\t\tif (dates.hasOwnProperty(date)) {\r\n\t\t\t\tdiv = dates[date];\r\n\t\t\t\tdiv.classList.remove(\"dhx_year_event\", \"dhx_cal_datepicker_event\");\r\n\t\t\t\t// div.className = \"dhx_month_head\";\r\n\t\t\t\t// div.removeAttribute(\"date\");\r\n\t\t\t\t// div.removeAttribute(\"data-year-date\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tscheduler._year_marked_cells = {};\r\n\t};\r\n\r\n\tscheduler._hideToolTip = function() {\r\n\t\tif (this._tooltip) {\r\n\t\t\tthis._tooltip.style.display = \"none\";\r\n\t\t\tthis._tooltip.date = new Date(9999, 1, 1);\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._showToolTip = function(date, pos, e, src) {\r\n\t\tif (this._tooltip) {\r\n\t\t\tif (this._tooltip.date.valueOf() == date.valueOf()) return;\r\n\t\t\tthis._tooltip.innerHTML = \"\";\r\n\t\t} else {\r\n\t\t\tvar t = this._tooltip = document.createElement(\"div\");\r\n\t\t\tt.className = \"dhx_year_tooltip\";\r\n\t\t\tif (this.config.rtl) t.className += \" dhx_tooltip_rtl\";\r\n\t\t\tdocument.body.appendChild(t);\r\n\t\t\tt.addEventListener(\"click\", scheduler._click.dhx_cal_data);\r\n\t\t\tt.addEventListener(\"click\", function(e){\r\n\t\t\t\tif(e.target.closest(`[${scheduler.config.event_attribute}]`)){\r\n\t\t\t\t\tconst id = e.target.closest(`[${scheduler.config.event_attribute}]`).getAttribute(scheduler.config.event_attribute);\r\n\t\t\t\t\tscheduler.showLightbox(id);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\tvar evs = this.getEvents(date, this.date.add(date, 1, \"day\"));\r\n\t\tvar html = \"\";\r\n\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tif(!this.filter_event(ev.id, ev))\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\tvar bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\t\t\tvar color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\t\t\thtml += \"
\";\r\n\t\t\thtml += \"
\" + (evs[i]._timed ? this.templates.event_date(evs[i].start_date) : \"\") + \"
\";\r\n\t\t\thtml += \"
 
\";\r\n\t\t\thtml += this.templates.year_tooltip(evs[i].start_date, evs[i].end_date, evs[i]) + \"
\";\r\n\t\t}\r\n\r\n\t\tthis._tooltip.style.display = \"\";\r\n\t\tthis._tooltip.style.top = \"0px\";\r\n\r\n\r\n\t\tif (document.body.offsetWidth - pos.left - this._tooltip.offsetWidth < 0)\r\n\t\t\tthis._tooltip.style.left = pos.left - this._tooltip.offsetWidth + \"px\";\r\n\t\telse\r\n\t\t\tthis._tooltip.style.left = pos.left + src.offsetWidth + \"px\";\r\n\r\n\t\tthis._tooltip.date = date;\r\n\t\tthis._tooltip.innerHTML = html;\r\n\r\n\t\tif (document.body.offsetHeight - pos.top - this._tooltip.offsetHeight < 0)\r\n\t\t\tthis._tooltip.style.top = pos.top - this._tooltip.offsetHeight + src.offsetHeight + \"px\";\r\n\t\telse\r\n\t\t\tthis._tooltip.style.top = pos.top + \"px\";\r\n\t};\r\n\r\n\tscheduler._year_view_tooltip_handler = function(e){\r\n\t\tif (!isYearMode()) return;\r\n\r\n\t\tvar src = e.target || e.srcElement;\r\n\t\tif (src.tagName.toLowerCase() == 'a') // fix for active links extension (it adds links to the date in the cell)\r\n\t\t\tsrc = src.parentNode;\r\n\t\tif (scheduler._getClassName(src).indexOf(\"dhx_year_event\") != -1)\r\n\t\t\tscheduler._showToolTip(scheduler.templates.parse_date(src.getAttribute(\"data-year-date\")), scheduler.$domHelpers.getOffset(src), e, src);\r\n\t\telse\r\n\t\t\tscheduler._hideToolTip();\r\n\t};\r\n\tscheduler._init_year_tooltip = function() {\r\n\t\tscheduler._detachDomEvent(scheduler._els[\"dhx_cal_data\"][0], \"mouseover\", scheduler._year_view_tooltip_handler);\r\n\t\tscheduler.event(scheduler._els[\"dhx_cal_data\"][0], \"mouseover\", scheduler._year_view_tooltip_handler);\r\n\t};\r\n\r\n\tscheduler._get_year_cell = function(d) {\r\n\t\tvar dateString = scheduler.templates.format_date(d);\r\n\t\tvar cells = this.$root.querySelectorAll(`.dhx_cal_data .dhx_cal_datepicker_date[data-cell-date=\"${dateString}\"]`);\r\n\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\tif(!scheduler.$domHelpers.closest(cells[i], \".dhx_after, .dhx_before\")){\r\n\t\t\t\treturn cells[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t};\r\n\r\n\tscheduler._year_marked_cells = {};\r\n\tscheduler._mark_year_date = function(date, event) {\r\n\t\tvar dateString = scheduler.templates.format_date(date);\r\n\t\tvar cell = this._get_year_cell(date);\r\n\t\tif (!cell) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tvar ev_class = this.templates.event_class(event.start_date, event.end_date, event);\r\n\t\tif (!scheduler._year_marked_cells[dateString]) {\r\n\t\t\tcell.classList.add(\"dhx_year_event\", \"dhx_cal_datepicker_event\");// = \"dhx_month_head dhx_year_event\";\r\n\t\t\tcell.setAttribute(\"data-year-date\", dateString);\r\n\t\t\tcell.setAttribute(\"date\", dateString);\r\n\t\t\tscheduler._year_marked_cells[dateString] = cell;\r\n\t\t}\r\n\t\tif(ev_class){\r\n\t\t\tcell.classList.add(ev_class);\r\n\t\t}\r\n\t};\r\n\tscheduler._unmark_year_date = function(date) {\r\n\t\tvar cell = this._get_year_cell(date);\r\n\t\tif (!cell) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcell.classList.remove(\"dhx_year_event\", \"dhx_cal_datepicker_event\");\r\n//\t\tcell.className = \"dhx_month_head\";\r\n\t};\r\n\tscheduler._year_render_event = function(event) {\r\n\t\tvar date = event.start_date;\r\n\t\tif (date.valueOf() < this._min_date.valueOf()){\r\n\t\t\tdate = this._min_date;\r\n\t\t} else {\r\n\t\t\tdate = this.date.date_part(new Date(date));\r\n\t\t}\r\n\r\n\t\twhile (date < event.end_date) {\r\n\t\t\tthis._mark_year_date(date, event);\r\n\t\t\tdate = this.date.add(date, 1, \"day\");\r\n\t\t\tif (date.valueOf() >= this._max_date.valueOf())\r\n\t\t\t\treturn;\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler.year_view = function(mode) {\r\n\r\n\t\tscheduler.set_sizes();\r\n\r\n\t\tscheduler._table_view = mode;\r\n\r\n\t\tif (this._load_mode && this._load()) return;\r\n\r\n\t\tif (mode) {\r\n\t\t\tscheduler._init_year_tooltip();\r\n\t\t\tscheduler._reset_year_scale();\r\n\t\t\tif (scheduler._load_mode && scheduler._load()){\r\n\t\t\t\tscheduler._render_wait = true;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tscheduler.render_view_data();\r\n\t\t} else {\r\n\t\t\tscheduler._hideToolTip();\r\n\t\t}\r\n\t};\r\n\tscheduler._reset_year_scale = function() {\r\n\t\tthis._cols = [];\r\n\t\tthis._colsS = {};\r\n\t\tvar week_starts = []; //start day of first week in each month\r\n\t\tvar dataArea = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tvar c = this.config;\r\n\t\tdataArea.scrollTop = 0; //fix flickering in FF\r\n\t\tdataArea.innerHTML = \"\";\r\n\r\n\t\tvar dy = Math.floor((parseInt(dataArea.style.height) - scheduler.xy.year_top) / c.year_y);\r\n\t\tif (dy < 190) {\r\n\t\t\tdy = 190;\r\n\t\t}\r\n\r\n\t\tvar week_template = document.createElement(\"div\");\r\n\t\tvar dummy_date = this.date.week_start(scheduler._currentDate());\r\n\r\n\t\tthis._process_ignores(dummy_date, 7, \"day\", 1);\r\n\r\n\t\tfor (var i = 0; i < 7; i++) {\r\n\t\t\tif(!(this._ignores && this._ignores[i])) {\r\n\t\t\t\tthis._cols[i] = 'var(--dhx-scheduler-datepicker-cell-size)';\r\n\t\t\t\tthis._render_x_header(i, 0, dummy_date, week_template);\r\n\r\n\t\t\t}\r\n\t\t\tdummy_date = this.date.add(dummy_date, 1, \"day\");\r\n\t\t}\r\n\t\tweek_template.lastChild.className += \" dhx_scale_bar_last\";\r\n\r\n\t\tfor(var i = 0; i < week_template.childNodes.length; i++){\r\n\t\t\tthis._waiAria.yearHeadCell(week_template.childNodes[i]);\r\n\t\t}\r\n\r\n\t\tvar sd = this.date[this._mode + \"_start\"](this.date.copy(this._date));\r\n\t\tvar ssd = sd;\r\n\t\tvar yearBox = null;\r\n\t\tconst wrapper = document.createElement(\"div\");\r\n\t\twrapper.classList.add(\"dhx_year_wrapper\");\r\n\t\tfor (var i = 0; i < c.year_y; i++){\r\n\t\t\tfor (var j = 0; j < c.year_x; j++) {\r\n\t\t\t\tyearBox = document.createElement(\"div\");\r\n\t\t\t\tyearBox.className = \"dhx_year_box\";\r\n\r\n\t\t\t\tyearBox.setAttribute(\"date\", this._helpers.formatDate(sd));\r\n\t\t\t\tyearBox.setAttribute(\"data-month-date\", this._helpers.formatDate(sd));\r\n\t\t\t\tyearBox.innerHTML = \"
\" + week_template.innerHTML + \"
\";\r\n\r\n\t\t\t\tvar header = yearBox.querySelector(\".dhx_year_month\");\r\n\t\t\t\tvar grid = yearBox.querySelector(\".dhx_year_grid\");\r\n\t\t\t\tvar body = yearBox.querySelector(\".dhx_year_body\");\r\n\r\n\t\t\t\tvar headerId = scheduler.uid();\r\n\t\t\t\tthis._waiAria.yearHeader(header, headerId);\r\n\t\t\t\tthis._waiAria.yearGrid(grid, headerId);\r\n\r\n\r\n\t\t\t\theader.innerHTML = this.templates.year_month(sd);\r\n\r\n\r\n\r\n\t\t\t\tvar dd = this.date.week_start(sd);\r\n\t\t\t\tthis._reset_month_scale(body, sd, dd, 6);\r\n\r\n\t\t\t\tvar days = body.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var day = 0; day < days.length; day++){\r\n\t\t\t\t\tthis._waiAria.yearDayCell(days[day]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\twrapper.appendChild(yearBox);\r\n\r\n\t\t\t\tweek_starts[i * c.year_x + j] = (sd.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) % 7;\r\n\t\t\t\tsd = this.date.add(sd, 1, \"month\");\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdataArea.appendChild(wrapper);\r\n\r\n\t\tvar dateElement = this._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML = this.templates[this._mode + \"_date\"](ssd, sd, this._mode);\r\n\t\t}\r\n\r\n\t\tthis.week_starts = week_starts;\r\n\t\tweek_starts._month = ssd.getMonth();\r\n\t\tthis._min_date = ssd;\r\n\t\tthis._max_date = sd;\r\n\t};\r\n\r\n\tscheduler._reset_year_scale = function(){\r\n\r\n\t\tvar dataArea = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tdataArea.scrollTop = 0; //fix flickering in FF\r\n\t\tdataArea.innerHTML = \"\";\r\n\r\n\t\tlet yearStart = this.date.year_start(new Date(this._date));\r\n\t\t\r\n\t\tthis._min_date = this.date.week_start(new Date(yearStart));\r\n\r\n\t\tconst wrapper = document.createElement(\"div\");\r\n\t\twrapper.classList.add(\"dhx_year_wrapper\");\r\n\r\n\t\tlet currentDate = yearStart;\r\n\t\tfor(let i = 0; i < 12; i++){\r\n\t\t\tlet yearBox = document.createElement(\"div\");\r\n\t\t\tyearBox.className = \"dhx_year_box\";\r\n\r\n\t\t\tyearBox.setAttribute(\"date\", this._helpers.formatDate(currentDate));\r\n\t\t\tyearBox.setAttribute(\"data-month-date\", this._helpers.formatDate(currentDate));\r\n\t\t\tyearBox.innerHTML = `
${this.templates.year_month(currentDate)}
\r\n\t\t\t
`;\r\n\r\n\t\t\tconst yearGrid = yearBox.querySelector(\".dhx_year_grid\");\r\n\t\t\tconst datepicker = scheduler._createDatePicker(null, {\r\n\t\t\t\tdate: currentDate,\r\n\t\t\t\tminWeeks: 6\r\n\t\t\t});\r\n\t\t\tdatepicker._renderDayGrid(yearGrid);\r\n\t\t\tdatepicker.destructor();\r\n\r\n\t\t\twrapper.appendChild(yearBox);\r\n\r\n\t\t\tcurrentDate = this.date.add(currentDate, 1, \"month\");\r\n\r\n\t\t}\r\n\t\tdataArea.appendChild(wrapper);\r\n\r\n\t\tlet lastDate = this.date.add(yearStart, 1, \"year\");\r\n\t\tif(lastDate.valueOf() != this.date.week_start(new Date(lastDate)).valueOf()){\r\n\t\t\tlastDate = this.date.week_start(new Date(lastDate));\r\n\t\t\tlastDate = this.date.add(lastDate, 1, \"week\");\r\n\t\t}\r\n\t\tthis._max_date = lastDate;\r\n\t\tvar dateElement = this._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML = this.templates[this._mode + \"_date\"](yearStart, lastDate, this._mode);\r\n\t\t}\r\n\t};\r\n\r\n\tvar getActionData = scheduler.getActionData;\r\n\tscheduler.getActionData = function(n_ev) {\r\n\t\tif(!isYearMode()){\r\n\t\t\treturn getActionData.apply(scheduler, arguments);\r\n\t\t}\r\n\t\t\r\n\t\tvar date = getCellDate(n_ev.target);\r\n\t\treturn {\r\n\t\t\tdate:date,\r\n\t\t\tsection:null\r\n\t\t};\r\n\t};\r\n\r\n\tvar locateEvent = scheduler._locate_event;\r\n\tscheduler._locate_event = function(node) {\r\n\t\tvar id = locateEvent.apply(scheduler, arguments);\r\n\t\tif(!id){\r\n\t\t\t\r\n\t\t\tvar date = getCellDate(node);\r\n\t\t\tif(!date) return null;\r\n\t\t\tvar evs = scheduler.getEvents(date, scheduler.date.add(date, 1, \"day\"));\r\n\t\t\tif(!evs.length) return null;\r\n\r\n\t\t\t//can be multiple events in the cell, return any single one\r\n\t\t\tid = evs[0].id;\r\n\t\t}\r\n\t\treturn id;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tscheduler._hideToolTip();\r\n\t});\r\n}","import SchedulerFactory from \"./scheduler_factory\";\r\nimport gplExtensions from \"./ext/extensions_gpl\";\r\n\r\nconst factory = new SchedulerFactory(gplExtensions);\r\n\r\nconst scheduler = factory.getSchedulerInstance();\r\nconst Scheduler = {\r\n\tplugin: scheduler.bind(factory.plugin, factory)\r\n};\r\n\r\nwindow.scheduler = scheduler;\r\nwindow.Scheduler = Scheduler;\r\n\r\nif(!window.$dhx) {\r\n\twindow.$dhx = {};\r\n}\r\n\r\nwindow.$dhx.scheduler = scheduler;\r\nwindow.$dhx.Scheduler = Scheduler;\r\n\r\nexport default scheduler;export { scheduler, Scheduler };","\r\n\r\nimport dhtmlxHook from \"./dhtmlx_hook\";\r\nimport \"./css/theme.less\";\r\ndhtmlxHook();\r\n\r\nimport global from \"./global\";\r\n\r\nimport factoryMethod from \"./scheduler_factory_method\";\r\nimport ExtensionsManager from \"./ext/extension_manager\";\r\n\r\nclass SchedulerFactory {\r\n\r\n\tconstructor (extensions) {\r\n\t\tthis._seed = 0;\r\n\t\tthis._schedulerPlugins = [];\r\n\t\tthis._bundledExtensions = extensions;\r\n\t\tthis._extensionsManager = new ExtensionsManager(extensions);\r\n\t}\r\n\r\n\tplugin(code) {\r\n\t\tthis._schedulerPlugins.push(code);\r\n\r\n\t\tif(global.scheduler){\r\n\t\t\tcode(global.scheduler);\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetSchedulerInstance(initConfig) {\r\n\t\tvar scheduler = factoryMethod(this._extensionsManager);\r\n\r\n\t\tfor (var i = 0; i < this._schedulerPlugins.length; i++) {\r\n\t\t\tthis._schedulerPlugins[i](scheduler);\r\n\t\t}\r\n\t\tscheduler._internal_id = this._seed++;\r\n\t\r\n\t\tif (this.$syncFactory){\r\n\t\t\tthis.$syncFactory(scheduler);\r\n\t\t}\r\n\r\n\t\tif(initConfig){\r\n\t\t\tthis._initFromConfig(scheduler, initConfig);\r\n\t\t}\r\n\r\n\t\treturn scheduler;\r\n\t}\r\n\r\n\t_initFromConfig(scheduler, initConfig){\r\n\t\tif(initConfig.plugins){\r\n\t\t\tscheduler.plugins(initConfig.plugins);\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.config){\r\n\t\t\tscheduler.mixin(scheduler.config, initConfig.config, true);\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.templates){\r\n\t\t\tscheduler.attachEvent(\"onTemplatesReady\", function(){\r\n\t\t\t\tscheduler.mixin(scheduler.templates, initConfig.templates, true);\r\n\t\t\t}, {once: true});\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.events){\r\n\t\t\tfor(const event in initConfig.events){\r\n\t\t\t\tscheduler.attachEvent(event, initConfig.events[event]);\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.locale){\r\n\t\t\tscheduler.i18n.setLocale(initConfig.locale);\r\n\t\t}\r\n\t\r\n\t\tif(Array.isArray(initConfig.calendars)){\r\n\t\t\tinitConfig.calendars.forEach(function(calendar){\r\n\t\t\t\tscheduler.addCalendar(calendar);\r\n\t\t\t});\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.container){\r\n\t\t\tscheduler.init(initConfig.container);\r\n\t\t} else {\r\n\t\t\tscheduler.init();\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.data){\r\n\t\t\tif(typeof initConfig.data === \"string\"){\r\n\t\t\t\tscheduler.load(initConfig.data);\r\n\t\t\t}else{\r\n\t\t\t\tscheduler.parse(initConfig.data);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\r\n}\r\n\r\nexport default SchedulerFactory;"],"names":["global$1","window","global","extend","scheduler","div","className","element","document","createElement","split","forEach","cssClass","classList","add","itemTypes","rows_container","row","view","config","setAttribute","fix_tab_position","$firstTab","$lastTab","$segmentedTab","date","button","builtInButton","spacer","minicalendarButton","minicalendarDiv","click","$_eventAttached","event","isCalendarVisible","destroyCalendar","renderCalendar","position","this","getState","navigation","handler","calendar","setCurrentView","html_element","renderElement","renderer","rows","cols","css","width","value","style","height","html","innerHTML","align","justifyContent","prepareConfig","renderLayout","items","fragment","createDocumentFragment","Array","isArray","i","length","next","appendChild","_init_nav_bar","navBar","$container","querySelector","_update_nav_bar","previousHeight","container","heightChanged","newHeight","xy","nav_height","unset_actions","_els","get_elements","set_actions","display","isAttachedNode","root","body","parentNode","getWindowSize","w","innerWidth","documentElement","clientWidth","h","innerHeight","clientHeight","listenWindowResize","resizeDelay","oldSize","clearTimeout","setTimeout","$destroyed","a","b","newSize","triggerSchedulerResize","$root","callEvent","updateView","getComputedStyle","getPropertyValue","resizeWatcher","tabIndex","wai_aria_attributes","offsetHeight","previousWidth","offsetWidth","lowlevelResizeWatcher","contentWindow","removeChild","EventHost","constructor","_silent_mode","listeners","_silentStart","_silentEnd","createEventStorage","obj","handlers","index","eventStorage","combinedResult","handlerResult","apply","arguments","addEvent","settings","e","handlerId","id","once","originalHandler","removeEvent","clear","makeEventable","eventHost","attachEvent","eventName","toLowerCase","thisObject","bind","attachAll","callback","name","eventArguments","handlerName","concat","checkEvent","detachEvent","list","eventId","detachAllEvents","defaultDomEvents","el","addEventListener","eventRemove","removeEventListener","domEvents","eventScope","attach","capture","push","detach","splice","detachAll","staticArray","slice","undefined","createEventScope","_eventRemoveAll","_createDomEventScope","_trim","str","String","prototype","trim","replace","_isDate","getFullYear","getMonth","getDate","_isObject","uidSeed","Date","now","isDate","utils","uid","mixin","target","source","force","f","copy","object","result","pop","Function","toString","call","Number","Boolean","varType","Object","hasOwnProperty","defined","delay","timeout","timer","$cancelTimeout","$pending","args","$execute","getClassName","node","baseVal","indexOf","locateCss","classname","strict","trg","srcElement","ind","left","charAt","right","isVisible","visibility","currentStyle","hiddenSection","recurringSection","hasNonNegativeTabIndex","isNaN","getAttribute","hasHref","area","nodeName","loLowerCase","isEnabled","input","select","textarea","hasAttribute","isShadowDomSupported","head","createShadowRoot","attachShadow","getRootNode","ShadowRoot","host","dom_helpers","getAbsoluteLeft","htmlObject","getOffset","getAbsoluteTop","top","getOffsetSum","elem","parseInt","offsetTop","offsetLeft","offsetParent","getOffsetRect","box","getBoundingClientRect","test","navigator","userAgent","dummy","dummyBox","docElem","scrollTop","pageYOffset","scrollLeft","pageXOffset","clientTop","clientLeft","Math","round","closest","selector","insertAfter","newNode","referenceNode","nextSibling","insertBefore","remove","isChildOf","child","parent","contains","getFocusableNodes","nodes","querySelectorAll","join","nodesArray","$position","sort","hasShadowParent","getActiveElement","activeElement","shadowRoot","getSelection","focusNode","getRelativeEventPosition","ev","d","bottom","y","x","clientX","clientY","getTargetNode","tagName","composedPath","getNodePosition","Element","matches","msMatchesSelector","webkitMatchesSelector","parentElement","nodeType","isWindowAwailable","env","isIE","isOpera","isChrome","isKHTML","isFF","isIPad","search","isEdge","isNode","serialize$1","data","key","serialized","encodeURIComponent","JSON","stringify","generateStringToDate","format","utc","splt","mask","match","code","csp_str_to_date","set","temp","locale","month_short_hash","month_full_hash","UTC","cspEnabled","useCsp","csp","checkIfCSPEnabled","init","s","month_short","t","month_full","date_part","old","setHours","setMinutes","setSeconds","setMilliseconds","getHours","setTime","getTime","time_part","valueOf","getTimezoneOffset","week_start","shift","getDay","start_on_monday","month_start","setDate","year_start","setMonth","day_start","_add_days","inc","ndate","rest","hours","mode","setYear","to_fixed","num","date_to_str","getUTCDate","getUTCMonth","getUTCFullYear","day_short","getUTCDay","day_full","getUTCHours","getUTCMinutes","getMinutes","getUTCSeconds","getSeconds","getUTCISOWeek","getISOWeek","str_to_date","exactFormat","stringToDateMethod","parseExactFormat","yyyyMMddhhIIss","MMddyyyyhhIIss","ddMMyyyyhhIIss","ISO8601","parseYMD","parseMDY","parseDMY","dateString","parse_exact_format","datestr","nday","first_thursday","year_number","ordinal_date","floor","convert_to_utc","getSerializator","res","_events","_loaded","_load","url","from","_load_url","to","prevent_cache","_date","_load_mode","lf","templates","load_format","_min_date","cache_line","_max_date","temp_to","ajax","get","ajaxCallback","response","on_load","_parsers","xml","canParse","xhr","responseXML","firstChild","xmlDoc","parse","responseText","topElement","xmltop","loader","csrfToken","dhtmlx","security_key","opts","xpath","arr","serverList","itms","j","attrs","attributes","label","k","attr","nodeValue","ud","udx","_xmlNodeToJSON","_userdata","text","evs","_init_event","json","events","dhx_security","collections","collections_loaded","collection","option","option_key","ical","RegExp","c_start","c_end","incoming","event_r","e_start","e_end","exec","param","param_r","parse_param","substr","parse_date","dh","dm","utcMark","dy","dn","dd","server_utc","error","foundParser","parser","_process","status","_process_loading","_loading","_not_render","_render_wait","render_view_data","_after_call","_tagvalue","start_date","_init_date","end_date","_helpers","parseDate","getSerializableData","createSerializator","serialize","dataset","allEvents","exportedEvent","exportValue","rawValue","xml_format","format_date","type","load","setLoadMode","array","childNodes","show_loading","_x","_y","_obj","_init_touch_events","touch","MSStream","platform","maxTouchPoints","scroll_width","_mobile","touchEventsSupported","createEvent","_touch_events","touches","pageX","pageY","PointerEvent","pointerEnabled","pointerType","msPointerEnabled","MSPOINTER_TYPE_MOUSE","names","accessor","ignore","tracker","drag_mode","scroll_mode","action_mode","dblclicktime","attachTouchEvent","_is_lightbox_open","passive","drag_cancel","_hide_global_tip","_on_mouse_up","_temp_touch_block","_drag_id","_drag_mode","_drag_pos","_pointerDragId","acc","dnd","timeline","matrix","_mode","original_render","drag_id","getEvent","property","y_property","getEvents","_sorder","_count","render_data","_on_mouse_move","preventDefault","cancelBubble","_update_global_tip","abs","fake_event","pointerId","_click","dhx_cal_data","_on_dbl_click","_block_next_stop","touch_drag","actTask","_locate_event","fakeTask","sourceTask","_ignore_next_click","_getClassName","previousSibling","_on_mouse_down","for_rendered","_rendered","touch_tip","_show_global_tip","updateEvent","touch_swipe_dates","s_ev","e_ev","step","max_dy","scrollable","dx","dhx_cal_next_button","dhx_cal_prev_button","toptip","_global_tip","time","_timed","event_header","day_date","labels","drag_to_create","drag_to_move","calculatedMaterial","cachedBorderBoxValue","checkIfBorderBoxStyling","_is_material_skin","probe","boxSizing","refreshAfterLoad","_border_box_events","oldStyling","flatSkinHourScale","min","_addThemeClass","skin","_skin_settings","use_select_menu_space","wide_form","hour_size_px","displayed_event_color","displayed_event_text_color","_skin_xy","lightbox_additional_height","bar_height","_build_skin_info","clearInterval","monitorIntervalId","setInterval","csstheme","setSkin","styles","themeVar","themeName","isCssVarTheme","cssValues","oldMaterialTheme","links","getElementsByTagName","href","_theme_info","theme","cssVarTheme","values","themeVariables","_configure","col","_skin_init","render","hour_scale","hour_date","_old_month_day","month_day","old_month_day","_currentDate","dhx_cal_today_button","tab","header","tabs","specialTabs","map","tabName","find","filter","firstTab","reverse","DataProcessorEvents","dp","$scheduler","$dp","_dataProcessorHandlers","_validId","setUpdated","z","_new_event","_in_progress","_invalid","updatedRows","_waitMode","_update_callback","upd","setUserData","action_param","deleteEvent","_add_rec_marker","DataProcessor","serverProcessorURL","serverProcessor","autoUpdate","updateMode","_tMode","_headers","_payload","post_delim","messages","updated","inserted","deleted","invalid","invalid_cell","enableUTFencoding","eventable","message","boxAttribute","_dhx_msg_cfg","usercall","modalBox","hide","modal_key","which","keyCode","messageBox","keyboard","domHelpers","modality","cover","classValue","buttonAriaAttrs","_waiAria","messageButtonAttrString","getFirstDefined","_createBox","ok","cancel","contentId","messageModalAttr","inner","title","content","message_ok","message_cancel","buttons","btn","getElementById","hidden","focus","alertPopup","confirmPopup","boxPopup","box_params","params","expire","focusable","messageInfoAttr","timers","pull","seed","hideAll","popups","alert","confirm","modalbox","setTransactionMode","total","headers","payload","_tSend","_endnm","_serializeAsJson","_router","router","escape","_utf","setDataColumns","val","_columns","getSyncState","enableDataNames","enablePartialDataSend","_changed","setUpdateMode","master","rowId","state","findRow","existing","getUserData","set_invalid","is_invalid","markRow","sendData","_methods","details","getActionByState","checkBeforeUpdate","editStop","sendAllData","_beforeSendData","_getRowData","_sendData","_serializeAsJSON","serialize_one","stack","keys","pref","_applyPayload","urlSeparator","dataToSend","self","queryParams","ids","afterUpdate","urlParams","_user","_cleanupArgumentsBeforeSend","method","preprocessedData","_cleanupItemBeforeSend","action","query","_onResolvedCreateUpdate","tag","resultState","setRequestHeader","sid","tid","afterUpdateCallback","routerMode","actionPromise","create","delete","update","then","Error","catch","valid","_forEachUpdatedRow","_getAllData","out","has_one","pattern","defineAction","_uActions","btag","marker","correct","originalSid","_errorResponse","cleanUpdate","_setDefaultTransactionMode","_serverProcessor","that","finalizeUpdate","atag","_initialized","_dp_init","_is_virtual_event","_set_event_text_style","r","cssText","event_updated","rec_type","rec_pattern","_dp_change_event_id","new_id","changeEventId","_dp_hook_delete","setDp","_dp","dataProcessorEvents","_dataprocessor","setOnAfterUpdate","setOnBeforeUpdateHandler","func","setAutoUpdate","interval","user","_need_update","_update_busy","xml_node","afterAutoUpdate","fullSync","intervalId","loadUpdate","getUpdates","_getXmlNodeValue","version","vers","updates","destructor","processedData","updatedItem","output","_prepareDataItem","item","processedItem","formatDate","dataItem","ar","day_tab","week_tab","month_tab","new_event","icon_save","icon_cancel","icon_details","icon_edit","icon_delete","confirm_closing","confirm_deleting","section_description","section_time","full_day","confirm_recurring","section_recurring","button_recurring","button_recurring_open","button_edit_series","button_edit_occurrence","grid_tab","prev","year","month","day","hour","minute","be","agenda_tab","description","year_tab","week_agenda_tab","repeat_radio_day","repeat_radio_week","repeat_radio_month","repeat_radio_year","repeat_radio_day_type","repeat_text_day_count","repeat_radio_day_type2","repeat_week","repeat_text_week_count","repeat_radio_month_type","repeat_radio_month_start","repeat_text_month_day","repeat_text_month_count","repeat_text_month_count2_before","repeat_text_month_count2_after","repeat_year_label","select_year_day2","repeat_text_year_day","select_year_month","repeat_radio_end","repeat_text_occurences_count","repeat_radio_end2","repeat_radio_end3","month_for_recurring","day_for_recurring","ca","cn","cs","da","de","en","es","fi","fr","he","hu","it","jp","LocaleManager","_locales","nb","nl","no","pl","pt","ro","ru","si","sk","sv","tr","ua","DatePicker","modes","currentRange","eventDates","currentModeIndex","onStateChangeHandlers","_domEvents","onStateChange","oldState","newState","_notifyStateChange","direction","newDate","setFullYear","setState","_toggleMode","newIndex","backwardArrow","monthLabel","innerText","toLocaleString","startYear","forwardArrow","_adjustDate","_renderCalendarHeader","dataContainer","_renderDayGrid","_renderMonthGrid","_renderYearGrid","daysOfWeekContainer","currentDate","maxDate","labelFormat","dayElement","max","weeks","currWeek","minWeeks","minSchedulerDate","maxSchedulerDate","eventDaysTable","reduce","_renderDayGridHeader","firstDate","monthStart","monthEnd","lastDate","_weeksBetween","currDate","dayGridContainer","dateCell","wrapper","months","formatLabel","monthElement","doneArea","doneBtn","yearElement","factoryMethod","extensionManager","commonViews","agenda","grid","unit","week_agenda","anythingElse","requiredExtensions","limit","_commonErrorMessages","unknownView","relatedExtension","collapsedContainer","createTimelineView","createUnitsView","createGridView","addMarkedTimespan","exportToPNG","exportToPDF","common","extend$l","_detachDomEvent","_init_once","scheduler_resize_listener","layout","hasSchedulerMarkup","console","wai_aria_application_role","views","_props","_grid","viewName","log","rtl","_scroll","init_templates","set_sizes","$initialized","min_event_height","scale_width","scale_height","month_scale_height","menu_width","margin_top","margin_left","editor_width","month_head_height","event_header_height","edit_save","edit_cancel","functor","scale_x","_table_view","materialScalePlaceholder","set_xy","_lightbox","_setLbPosition","_data_width","prepareValue","prepared","els","class_name","attr_value","labelAttr","domEventsScope","getDaysDifference","startDate","endDate","start","differenceInDays","_select_id","_close_not_saved","unselect","previousSelection","min_date","max_date","editor_id","_edit_id","lightbox_id","_lightbox_id","select_id","expanded","readonly","getActionData","icon","def_step","dhx_cal_tab","deprecated_name","substring","c","_dhtmlx_confirm","title_confirm_deleting","edit","save","showLightbox","form","addEventNow","end","base","duration","event_duration","time_step","start_hour","first_hour","_drag_event","src","dblclick_create","details_on_dblclick","viewHandler","_get_column_index","x_pos","column","_cols","_ignores","_week_indexes_from_pos","pos","ceil","_mouse_coords","$env","_colsS","$domHelpers","dataArea","heights","_ignores_detected","preserve_length","_event_length","_get_real_event_length","x_step","x_unit","timestamp","confirmationText","title_confirm_closing","positive_closing","_correct_shift","back","_is_pos_changed","old_pos","new_pos","diff","old_val","new_val","has_moved","_correct_drag_start_date","len","_start_correction","_end_correction","last_hour","_get_fictional_event_length","_correct_drag_end_date","mousedownPos","_get_date_from_pos","_drag_start","fields","timeStep","custom","_dragEventBody","_move_event_shift","resize_date","_drag_from_start","resize_from_start","end_day_start","end_day_date","firstHour","maxY","precisePos","minDate","preciseDate","cursor","new_end","new_start","limit_drag_out","all_timed","_get_section_view","_get_event_sday","getView","_allow_dnd","update_render","sx","update_view","drag_event_body","_lame_clone","_get_private_properties","_clear_temporary_properties","clean","flagged_event","initial","current_state","moved","_dhx_changed","is_new","edit_on_create","details_on_create","isOneDayEvent","_lame_copy","_trigger_dyn_loading","_reset_ignores","_reset_scale","isViewExists","_set_aria_buttons_attrs","buttonGroups","group","headerButtonsAttributes","icon_form","oldClass","newClass","multidayScroll","dhx_multi_day","prev_scroll","preserve_scroll","_dy_shift","headerToggleState","_render_x_header","offset_top","left_border","columnHeaderText","dayHeaderAttr","_get_columns_num","count","count_n","_get_timeunit_start","_get_view_end","ed","_calc_scale_sizes","summ","_process_ignores","realcount","_set_scale_col_size","_render_scales","data_area","sd","today","scales","cls","firstHalf","slotDate","htmlContent","time_slot_text","time_slot_class","secondHalf","week_date_class","dayColumnAttr","_getNavDateElement","drag_resize","drag_move","_scales","navBarDateStr","scaleElement","navBarDateAttr","_reset_month_scale","_reset_hours_scale","multi_day","c1","totalWidth","col_length","offset","hiddenWidth","c2","cloneNode","cc","hourScaleAttr","scroll_hour","now_date","n","preserve","ign_date","_render_month_scale","view_start","cd","tdwidths","cell_width","getCellHeight","cellheight","table","cell","month_date_class","body_class","head_class","monthCellAttr","cellHead","cellBody","bf1","getLabel","sections","lightbox","map_to","options","updateCollection","list_name","resetLightbox","hideCover","cache","n_ev","section","_focus","endColumnIndex","eventLength","startColumnIndex","_get_date_index","last_column","check","excludedDuration","intervalStart","intervalEnd","leftCellCutOffStart","leftCellCutOffEnd","rightCellCutOffStart","rightCellCutOffEnd","ev_length","dir","per_day","days","end_slot","fd","start_slot","_get_section_property","_is_initialized","htmlTags","extraSpaces","stripHTMLLite","htmlText","singleQuotes","escapeQuotes","getAttributeString","setAttributes","role","isActive","getHeaderCellAttr","eventAttr","_eventCommonAttr","event_text","$dataprocessor_class","setEventBarAttr","_getAttributes","attributeSetter","arg","eventBarAttrString","agendaHeadAttrString","agendaHeadDateString","agendaHeadDescriptionString","agendaDataAttrString","agendaEventAttrString","agendaDetailsBtnString","gridAttrString","gridRowAttrString","gridCellAttrString","mapAttrString","mapRowAttrString","mapDetailsBtnString","minicalHeader","headerId","minicalGrid","minicalRow","minicalDayCell","selected","minicalHeadCell","weekAgendaDayCell","weekAgendaEvent","lightboxHiddenAttr","lightboxVisibleAttr","lightboxSectionButtonAttrString","tabindex","yearHeader","yearGrid","yearHeadCell","yearRow","yearDayCell","lightboxAttr","lightboxButtonAttrString","buttonName","eventMenuAttrString","iconName","lightboxHeader","headerText","lightboxSelectAttrString","time_option","buttonLabel","quickInfoAttr","quickInfoHeaderAttrString","quickInfoHeader","quickInfoButtonAttrString","tooltipAttr","tooltipVisibleAttr","tooltipHiddenAttr","dom","assert","show_errors","_createDatePicker","_getFocusableNodes","_locate_css","messageApi","$","counter","methods","Promise","clearAll","createConfig","async","serializeRequestParams","DOMParser","ActiveXObject","loadXML","parseFromString","tagname","xpathExp","docObj","selectNodes","first","ownerDocument","evaluate","XPathResult","ANY_TYPE","iterateNext","_call","onLoad","getSync","put","postData","del","post","postSync","resolve","reject","XMLHttpRequest","isQt","readyState","filePath","open","toUpperCase","send","$ajax","default_date","month_date","load_date","week_date","date_format","api_date","day_column_padding","drag_create","resize_month_events","resize_month_timed","responsive_lightbox","separate_short_events","cascade_event_display","cascade_event_count","cascade_event_margin","multi_day_height_limit","drag_lightbox","quick_info_detached","drag_highlight","icons_edit","icons_select","buttons_left","buttons_right","highlight_displayed_event","ajax_error","delay_render","timeline_swap_resize","event_attribute","$initial","xml_date","d1","d2","day_scale_date","month_scale_date","week_scale_date","time_picker","event_date","event_class","event_bar_date","event_bar_text","month_events_link","drag_marker_class","drag_marker_content","tooltip_date_format","tooltip_text","calendar_month","calendar_scale_date","calendar_date","calendar_time","clear_view","extra_data","silent","setEvent","hash","create_getter","create_setter","is_visible_events","clear_event","evFirstHour","evLastHour","lastHour","checkEndDate","get_visible_events","only_timed","filter_event","_is_main_area_event","hold","full","_recalculate_timed","tvs","tvd","_rendered_location","buffer","renderedLocation","_view_month_day","_render_month_link","toRender","_sday","_eday","curr","_sweek","_get_event_bar_pos","widt","x2","_pre_render_events","containers","render_event_bar","max_evs","max_month_events","locate_holder","real","render_event","_get_first_visible_cell","cells","hb","h_old","_pre_render_events_table","_pre_render_events_line","monthRows","cellHeight","cHeight","unshift","scrollHeight","scroll_fix","scale_settings","sum_width","row_heights","full_multi_day_height","used_multi_day_height","used_multi_day_height_css","multi_day_section","multi_day_icon","overflowY","datePart","_get_event_mapped_end_date","ev_duration","_min_mapped_duration","evs_originals","sh","eh","_inner","t_ev","slot_index","sorderSet","_is_sorder","_max_sorder","max_count","_copy_event","_time_order","_is_any_multiday_cell_visible","isAnyCellVisible","checkDate","noCells","lastDayEnd","weekCellIndex","locate_holder_day","chunks_info","first_chunk","last_chunk","chunk_info","locate_s","locate_e","_length","stack_line","_first_chunk","_last_chunk","_copy_dummy","_y_from_date","sm","_calc_event_y","min_height","em","parentWidth","menu","menu_offset","pos_y","ev_count","ev_sorder","margin","_render_v_bar","_text_style","zIndex","color","setProperty","tplClass","_editor","shiftKey","ariaAttr","icons","icons_str","currentIcon","textColor","highlightEventPosition","contentA","contentB","_","cse","boxWidth","renderEvent","inner_html","footer_class","_drag_resize","past","_get_dnd_order","order","ev_height","max_height","_orig_sorder","evTop","columns","y_event_offset","resize_handle","resizable","left_chunk","right_chunk","resize_left","resize_right","timed","bg_color","style_text","_edit_stop_event","getRenderedEvent","rendered_events","rendered_event","showEvent","original_color","original_text_color","section_delimiter","getSectionTop","posFromDate","_smartRenderingEnabled","restoreOriginalColors","scrollTo","_append_drag_marker","m","scale","lastChild","_update_marker_position","size","getLightboxRoot","cspEnvironment","salesforceEnvironment","_lightbox_controls","formSection","getLightbox","getValue","form_blocks","get_value","setValue","set_value","get_template_control","control","get_select_control","get_textarea_control","get_time_control","defaults","template","sns","placeholder","_get_input","_dhx_onchange","onchange","time_format","_time_format_order","cfg","dt","last","limit_time_select","p","selectBoxClass","range","start_year","end_year","year_range","g","tdate","_time_values","ariaAttrs","_full_day","checked","disabled","_fill_lightbox_select","auto_end_date","_update_lightbox_select","time_values","direct_value","fixed_value","value_found","t_v","selectedIndex","original","showCover","show_cover","_cover","_fill_lightbox","lightbox_header","headerContent","headerDate","headerTitle","current_sns","_get_lightbox_section_node","block","default_value","_lightbox_out","_empty_lightbox","hide_lightbox","endLightbox","hide_cover","_move_while_dnd","_finish_dnd","save_lightbox","startLightbox","_custom_lightbox","_temp_lightbox","cancel_lightbox","hideLightbox","_init_lightbox_events","buttonTarget","sectionButton","button_click","readonly_active","setLightboxSize","_init_dnd_events","_dnd_start_lb","dhx_unselectable","lb","_lb_start","_ready_to_dnd","recurring","_lightbox_template","label_name","ds","t_ds","_bindLightboxLabels","inputBlock","fallback","inputId","old_id","getRootView","hooks","didInsert","cmp","skins","jQuery","fn","dhx_scheduler","each","Scheduler","getSchedulerInstance","comp","update_view_timer","curr_view_timer","lazy_setCurrentView","oldDate","oldMode","updateFlags","lazy_updateView","ars","createDataProcessor","tMode","batchUpdate","dhtmlxError","catchError","i18n","addLocale","setLocale","localeObject","getLocale","dhx_save_btn","dhx_cancel_btn","dhx_delete_btn","ext","activePlugins","plugins","dependencies","priorities","extension","dep","dependencyName","orderA","orderB","treetimeline","daytimeline","outerdrag","legacy","extensionList","plugin","getExtension","ExtensionsManager","_extensions","attaches","attachScheduler","_genStr","attachObject","vs","av","sched","schedId","setSizes","_viewRestore","notImplemented","modals","modalsStack","isModal","afterPopup","trapFocus","currentTarget","$keyboardNavigation","_keyNavMessagePopup","focusElement","backupFocus","key_nav_legacy","_temp_key_scope","key_nav","_pasteDate","_pasteSection","isCopy","trackMousePosition","mousePointer","keyNavPointer","elementFromPoint","dispatcher","copyEvent","_make_pasted_event","event_pid","event_length","multisection","_do_paste","is_copy","modified_ev","original_ev","_is_key_nav_active","ctrlKey","metaKey","_buffer_event","_key_nav_copy_paste","getActiveNode","new_ev","scheduler_handlers","attachSchedulerHandlers","waitCall","keyDownHandler","focusHandler","keepScrollPosition","focusGlobalNode","enable","reFocusActiveNode","activeNode","isValid","MinicalButton","MinicalCell","mousedownHandler","dataAreaClick","listOfScales","some","Event","TimeSlot","nextSlot","setActiveNode","removeAttribute","evNode","prevState","lastStart","lastEnd","lastSection","getNode","Tooltip","_scheduler","_tooltipNode","_root","_isLikeMouseEvent","_calculateTooltipPosition","viewport","_getViewPortSize","tooltipNode","tooltip","offsetX","tooltip_offset_x","offsetY","tooltip_offset_y","mouse","containerPos","scrollY","_getViewPort","scrollX","$event_data","$event","TooltipManager","_listeners","_initDelayedFunctions","delayHide","watchableTarget","eventTarget","targetNode","doOnMouseEnter","onmouseenter","onmousemove","onmouseleave","listener","cloneDomEvent","clone","delayShow","utils.default","setContent","show","tooltip_timeout","tooltip_hide_timeout","gplExtensions","active_links","active_link_view","_active_link_click","s_d","do_wrapper","fullname","week_x","d_s","agenda_legacy","add_agenda_legacy","agenda_legacy_time","agenda_legacy_text","agenda_legacy_date","agenda_legacy_start","old_dblclick_dhx_cal_data","dblclick_dhx_cal_data","fill_agenda_tab","old_render_view_data","ev_class","agendaDetailsButtonAttr","agenda_time","agenda_text","_agendaScrollTop","agenda_area","dateElement","agenda_date","agenda_legacy_view","agenda_start","agenda_end","l","rowAttr","dateHeader","descriptionHeader","agenda_view","add_agenda","dayDateToStr","dayDowToStr","agenda_day","eventsInDays","anyEvents","eventStart","renderDay","calendarEvent","dates","selectedId","all_timed_month","is_event_short","_safe_copy","proto","isPrototypeOf","old_prerender_events_line","old_prerender_events_table","prerender_events","ce","_virtual","isOvernightEvent","getNextDay","setDateTime","event_changed","re","redraw","next_day","old_get_visible_events","old_mode","old_date","oldUpdate","fullRedrawNeeded","collision","temp_section","before","_setTempSection","event_id","collision_limit","checkCollision","edited_ev","_roll_back_dates","_check_sections_collision","second","evs_dates","getRecDates","tevs","concurrent","checked_mode","single","container_autoresize","month_day_min_height","min_grid_size","min_map_size","old_pre_render_event","active","total_height","multiday_height","evl","_h_fix","navHeight","headerHeight","checked_divs","updateContainterHeight","is_repaint","checked_div","maxHeight","year_y","cur_height","week_agenda_scale_height","eventsContainer","_gridView","y_unit","getSectionHeight","scrollWidth","getScrollSize","callUpdate","conditionalUpdateContainerHeight","asyncRepaint","requestAnimationFrame","autosizeEnabled","$original_scroll_width","$original_section_autoheight","section_autoheight","cookie","getCookieName","_get_url_nav","urlNavigationPlugin","schedulerCookie","unescape","newMode","cookie_param","old_load","drag_between","editors","cached_options","resetCombo","_combo","DOMParent","combo","unload","DOMelem","dhx_globalImgPath","image_path","dhtmlXCombo","options_height","setOptionHeight","enableFilteringMode","filtering","script_path","selected_id","addOption","disable","selectOption","setComboValue","all_options","single_option","getIndexByValue","getSelectedValue","getSelectedText","vertical","radiobuttons","checked_value","isChecked","check_html","o","label_html","checkbox","unchecked_value","expand","fullscreen","toggleIcon","_position","_width","_height","_overflow","overflow","_maximize","collapse","directions","prev_margin","export_api","std","getElementSizes","sizes","dhtmlxAjax","dhx4","getTimeline","orientation","dpi","zoom","_export_html","_send_to_export","exportToICal","_serialize_plain","exportToExcel","_serialize_columns","_ajax_to_export","server","info","_plain_export_copy","$text","_create_hidden_form","submit","_hidden_export_form","_get_export_size","footer","A5","A4","A3","A2","A1","A0","dataX","cSize","parseFloat","smartRendering","initialSizes","smart_rendering","style_width","style_height","timeline_scrollable","timeline_smart_rendering","grid_view","html_templates","all","getScope","scopes","minicalButton","minicalDate","SchedulerNode","DataArea","timeSlot","searchMap","key_nav_step","addShortcut","shortcut","scope","scopeObject","getShortcutHandler","commands","shortcuts","findHandler","removeShortcut","unbind","disp","setDefaultNode","_compose","parts","createCommand","modifiers","alt","ctrl","meta","expr","getExpressions","words","getWords","command","commandKeys","specialKeys","charCodeAt","getCommandFromEvent","domEvent","altKey","printableKey","fromCharCode","getHashFromEvent","getHash","junctionChar","term","combinationChar","backspace","enter","esc","space","up","down","home","pageup","pagedown","insert","plus","f1","f2","f3","f4","f5","f6","f7","f8","f9","f10","f11","f12","EventHandler","_handlers","doAction","returnValue","bindAll","initKeys","nextItem","currentFocus","currentIndex","divs","renderMultiple","currentStart","currentEnd","_modes","_getMode","units","renderVerticalMarker","renderTimelineMarker","renderYearMarker","renderMonthMarker","weekAgenda","renderWeekAgendaMarker","renderAgendaMarker","dayColumns","addWaiAriaLabel","addDataAttributes","dateToStr","dateTimeLabel","sectionObject","markerDate","_wrapDiv","_get_year_cell","opacity","view_opts","areas","round_position","blocks","_trace_x","_is_column_visible","start_pos","end_pos","set_date_part","tempStart","tempEnd","_timeline_getX","_section_height","_isRender","renderMonthCell","weekNumber","dayIndex","datatable","inner_index","all_hours_height","hour_ms","lineHeight","getDefaultNode","getMode","blur","_compareEvents","_pickEvent","startId","nextEventHandler","nextEvent","currEvent","visibleDates","nextEv","prevEventHandler","HeaderCell","getNodes","KeyNavNode","moveTo","compareTo","canStringifyThis","canStringifyThat","defaultCell","_getSection","_getNodes","eventNode","defaultElement","isScrolledIntoView","eventBox","viewPort","idSelector","inlineEditor","getInlineEditor","isMultisectionEvent","_moveToSlot","slot","movingDate","getDefaultDate","_getDefaultSection","visibleTime","nowTime","showNowTime","findVisibleColumn","timeslot","_getMultisectionView","_getNextSection","sectionId","nextIndex","defaultSlot","addMonthDate","nextMonthSlot","_alignTimeSlot","nextTimelineSlot","newPos","nextUnitsSlot","optionsCount","nextDaySlot","_moveDate","isBeforeLastHour","isStartDate","minutes","isAfterFirstHour","isInVisibleDayTime","oldStart","toNextDay","testEnd","nextWeekAgendaSlot","nextAgendaSlot","isDateVisible","nextDateColumn","current","tempSlot","extendSlot","extendUnitsSlot","extendTimelineSlot","extendMonthSlot","extendDaySlot","extendWeekAgendaSlot","extendGenericSlot","allowedDirections","moveDate","newDates","extendSlotDates","oldSlot","newSlot","dateDirection","scrollSlot","globalNode","_getGrid","_getNode","enabled","newRow","newCol","blurNode","editor","defaultPrevented","schedulerNode","_timeout","_minicalendars","isMinical","minicalendars","patchMinicalendar","focusMinical","minicalClick","rowIndex","cellIndex","td","renderMinical","cal","added","destroyMinical","_def_count","attachOnce","isSchedulerSelected","changeState","layer","layers","validId","_clearUpdateFlag","_cloneObj","_dataprocessors","_layers_zindex","initial_layer_zindex","isDefault","defaultLayer","showLayer","tlayer","toggleLayer","hideLayer","visible","getLayer","layer_name","native_event_object","noMenu","_evs_layer","_t_render_view_data","evs_layer","borderBox","borderBoxWidth","headerWidth","bodyWidth","footerWidth","bodyHeight","new_zIndex","filter_agenda","limit_start","limit_end","limit_view","check_limits","mark_now","display_marked_timespans","overwrite_marked_timespans","_temp_limit_scope","dhx_time_block","default_timespan_type","get_resulting_options","zones","blockTime","unblockTime","deleteMarkedTimespan","om","od","nm","nd","isBlocked","date_end","resetDate","checkInMarkedTimespan","timespan_type","on_overlap","temp_start_date","temp_end_date","timespans","_marked_timespans","day_value","getZones","_get_zone_minutes","eventEnd","markerStart","markerEnd","blocker","checkLimitViolation","complete_res","allow","day_index","linker","_add_timespan_zones","_get_blocked_zones","timeline_zones","blocked_timeline_zones","_get_relevant_blocked_zones","resultZones","is_new_event","data_copy","native_object","_mark_now","_mark_now_timer","dhx_now_time","_remove_mark_now","_append_mark_now","zone_start","start_index","end_index","units_l","r_divs","t_day","t_div","_render_marked_timespan","_prepare_timespan_options","r_configs","temp_configs","t_days","cloned_config","invert_zones","invertZones","view_key","t_config","c_config","t_sd","t_ed","zone_end","_get_dates_by_index","start_day","delta","t_date","_get_css_classes_by_config","css_classes","_get_block_by_config","date_to_display","min_day","sday","block_proto","_mark_timespans","_on_scale_add_marker","markTimespan","configuration","rebuild_els","timespans_ids","_marked_timespans_ids","timespan_types","_marked_timespans_types","unmarkTimespan","_addMarkerTimespanConfig","unit_id","timespans_view","day_configs","_array","configs","current_zones","resulting_zones","c_zone_start","c_zone_end","isLast","_subtract_timespan_zones","is_modified","_delete_marked_timespan_by_id","parent_array","_delete_marked_timespan_by_config","viewspans","_delete_marked_timespans_list","dayConfig","day_timespans","d_t","related_zones","types","typedConfig","_get_types_to_render","specific","types_to_render","_get_configs_to_render","_get_unit_index","day_ind","unitsPerDay","unit_zones","unit_types","global_data","day_types","dblclick_dhx_marked_timespan","map_view","mapView","geocoder","points","markers","infoWindow","createMarker","google","maps","Marker","map_date_width","map_icon_width","map_description_width","map_resolve_event_location","map_resolve_user_location","map_initial_position","LatLng","map_error_position","map_infowindow_max_width","map_type","MapTypeId","ROADMAP","map_zoom_after_resolve","marker_geo_success","marker_geo_fail","marker_date","marker_text","event_location","dblclick_dhx_map_area","map_time","map_text","map_start","add_map","map_date","_latLngUpdate","_isMapPositionSet","gmap","dhx_gmap","_setMapSize","mapOptions","map_initial_zoom","center","mapTypeId","Map","disableDefaultUI","disableDoubleClickZoom","addListener","point","latLng","geocode","results","GeocoderStatus","OK","geometry","location","lat","lng","formatted_address","infoWindowOptions","maxWidth","_points","_markers","_infowindow","InfoWindow","_infowindows_content","_initialization_count","Geocoder","geolocation","getCurrentPosition","_userLocation","coords","latitude","longitude","setCenter","setZoom","getCenter","setPosition","getZoom","fill_map_tab","_selected_event_id","ariaButtonAttr","elem_id","marginRight","marginLeft","marginTop","showAddress","temp_center","map_end","close","setMap","trigger","selectEvent","performClick","_displayEventOnMap","address","language","_updateEventLocation","old_event_id","new_event_id","_event_resolve_delay","ret","minical","minicalDomEvents","minicalendar","mark_events","_synced_minicalendars","_prev","is_refresh","_render_calendar","unmarkCalendar","cont","tpos","_get_def_cont","$dom","dateAttribute","markCalendar","_last_date","conf","markedDates","_markCalendarCurrentDate","sync","_on_xle_handler","updateCalendar","_created","_locateCalendar","weekNum","dat","dayCell","_week_template","week_template","dummy_date","_mini_cal_arrows","previous","ts","temp2","temp3","temp4","temp5","temp6","temp7","temp8","padding","weekHeader","move_minicalendar_date","css_classnames","css_texts","diffs","calendars","arrow","dayHeaders","dayCells","inputs","selects","inp","number","new_date","_update_minical_select","isFulldayEvent","_attach_action","_round_minutes","linkCalendar","datediff","dateNew","month_end","monthheight","old_s","multiselect","_result","_children","_mark_inputs","_ids","delimiter","script_url","divLoading","multisource","mvc","update_timer","use_id","sanitize","_finish_ext_load","_get_id","model","cid","backbone","toJSON","changes","queue","add_from_queue","Backbone","Collection","last_event","dragger","dhtmlDragAndDropObject","stopDrag","on_drop","sourceHtmlObject","dhtmlObject","targetHtmlObject","targetHtml","action_data","event_data","view_options","_locate_cell_timeline","addDragLanding","_drag","_dragIn","shtmlObject","_dragOut","DragControl","addDrop","onDrop","sourceDhtmlx","getMaster","onDragIn","pdf","html_regexp","newline_regexp","clean_html","x_norm","colsWidth","x_norm_event","is_left","dhx_cal_header","y_norm","get_style","de_day","de_week","xml_end","xml_top","profile","xml_body_header","dhx_cal_date","xh","xml_month_scale","xml_month","yh","xhs","second_scale","top_width","top_col","xml_body","colors","week_starts","_month","text_color","zx","zdx","left_norm","zy","zdy","e_type","dets","week","dy_copy","toXML","original_date","original_mode","temp_date","to_pdf","objects","getPDFData","toPDF","toPDFRange","quick_info","show_quick_info","showQuickInfo","hiding_function","hideQuickInfo","quick_info_title","quick_info_content","quick_info_date","_quick_info_box_id","_get_event_counter_part","_quick_info_box","_init_quick_info","_fill_quick_data","_show_quick_info","cssTimeToMs","milliseconds","forced","qi","_x_scroll","dataPos","_quick_info_onscroll_handler","$testmode","_qi_button_click","domEv","main","mainContent","originalRecurringSetValue","original_left_buttons","original_right_buttons","txt_replace","txts","txtt","readonly_form","forbidden_buttons","button_arrays","forbidden_button","button_array","originalForm","readonlyForm","_lightbox_r","getRecurringSection","getFirstSectionOfType","clearMilliseconds","old_add_event","occurrence_timestamp_in_utc","recurring_workdays","_get_node","_outer_html","outerHTML","rec","loc","repeat_date_of_end","_ds","_get_form_node","_get_node_value","_get_node_numeric_value","_set_node_value","hash_value","_init_set_value","_end_date","str_date_format","repeat_date","date_str","register_els","inps","formatter","change_current_view","set_end_rule","_get_repeat_code","get_rcode","repeat","str_date","include_end_by","transpose_type","get_numeric_value","repeat_precise","_start","start_exists","transpose_day_week","set_rcode","_set_repeat_code","dispatchEvent","MouseEvent","elements","_rec_init_done","rf","blocked","_is_modified_occurence","_toggle_block","actual_dates","timeControl","_start_date","_get_button","_get_form","backgroundPosition","_rec_markers","_rec_markers_pull","_pid_time","_get_rec_marker","ch","_get_rec_markers","_rec_temp","ev_id","_ignore_call","tev","_pid_changed","nid","nev","sub","isEventFound","showLightbox_rec","lightbox_recurring","pid","isVirtual","showSeries","title_confirm_recurring","get_visible_events_rec","old_update_event","transponse_size","day_week","originalMonth","newMonth","cor","cor2","cday","transposeRecurring","recurringParts","addRecurring","recurringStepDays","weekDays","seriesInstance","currentCount","origMonth","origYear","correctOverflowInstances","recurring_overflow_instances","getMilliseconds","non_render","maxCount","startHour","visibleCount","_fix_daylight_saving_date","ted","recurrings","sev","data_attributes","all_events","_serialize_json_value","toICal","full_day_format","tooltipManager","tooltips","tooltipFor","touch_tooltip","targetEventId","hideTooltip","s2d","d2s","select_event","wp","year_view","year_date","year_month","year_scale_date","year_tooltip","isYearMode","getCellDate","dblclick_dhx_month_head","_year_render_event","_year_marked_cells","_hideToolTip","_tooltip","_showToolTip","_year_view_tooltip_handler","_init_year_tooltip","_mark_year_date","_unmark_year_date","_reset_year_scale","year_top","ssd","yearBox","year_x","yearStart","datepicker","locateEvent","factory","extensions","_seed","_schedulerPlugins","_bundledExtensions","_extensionsManager","initConfig","_internal_id","$syncFactory","_initFromConfig","addCalendar","$dhx"],"mappings":"qOAUA,MAAAA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AAA,EAAUid,MAAM8iF,EAAW1qF,IAG7B,EAAA,CAAA,EDxFmCwnD,EAE/B78D,EAAAA,EAAYy/F,EAAQ3sC,qBAAAA,EACpBD,GAAY,CACjBuC,OAAQp1D,EAAUmJ,KAAKs2F,EAAQrqC,OAAQqqC,CAAAA,CAAAA,EAGxC5/F,OAAOG,UAAYA,EACnBH,OAAOgzD,UAAYA,GAEfhzD,OAAOugG,OACVvgG,OAAOugG,KAAO,IAGfvgG,OAAOugG,KAAKpgG,UAAYA,EACxBH,OAAOugG,KAAKvtC,UAAYA"} \ No newline at end of file diff --git a/codebase/sources/dhtmlxscheduler.es.js b/codebase/sources/dhtmlxscheduler.es.js index a71e5e1..74116e3 100644 --- a/codebase/sources/dhtmlxscheduler.es.js +++ b/codebase/sources/dhtmlxscheduler.es.js @@ -520,14 +520,14 @@ function extend$j(scheduler2) { scheduler2._init_once = function() { }; }; - var layout = { navbar: { render: function(config) { + const layout = { navbar: { render: function(config) { return scheduler2._init_nav_bar(config); } }, header: { render: function(config) { - var element = document.createElement("div"); + const element = document.createElement("div"); element.className = "dhx_cal_header"; return element; } }, dataArea: { render: function(config) { - var element = document.createElement("div"); + const element = document.createElement("div"); element.className = "dhx_cal_data"; return element; } }, html_element: { render: function(config) { @@ -537,25 +537,25 @@ function extend$j(scheduler2) { return !!(element.querySelector(".dhx_cal_header") && element.querySelector(".dhx_cal_data") && element.querySelector(".dhx_cal_navline")); } function createDefaultHeader(scheduler3) { - var views = ["day", "week", "month"]; - var date = ["date"]; - var nav = ["prev", "today", "next"]; + const views = ["day", "week", "month"]; + const date = ["date"]; + const nav = ["prev", "today", "next"]; if (scheduler3.matrix) { - for (var i in scheduler3.matrix) { + for (const i in scheduler3.matrix) { views.push(i); } } if (scheduler3._props) { - for (var i in scheduler3._props) { + for (const i in scheduler3._props) { views.push(i); } } if (scheduler3._grid && scheduler3._grid.names) { - for (var i in scheduler3._grid.names) { + for (const i in scheduler3._grid.names) { views.push(i); } } - var optionalViews = ["map", "agenda", "week_agenda", "year"]; + const optionalViews = ["map", "agenda", "week_agenda", "year"]; optionalViews.forEach(function(viewName) { if (scheduler3[viewName + "_view"]) { views.push(viewName); @@ -697,16 +697,16 @@ function extend$j(scheduler2) { } }; scheduler2.get_elements = function() { - var els = this._obj.getElementsByTagName("DIV"); - for (var i = 0; i < els.length; i++) { - var class_name = scheduler2._getClassName(els[i]); - var attr_value = els[i].getAttribute("data-tab") || els[i].getAttribute("name") || ""; + const els = this._obj.getElementsByTagName("DIV"); + for (let i = 0; i < els.length; i++) { + let class_name = scheduler2._getClassName(els[i]); + const attr_value = els[i].getAttribute("data-tab") || els[i].getAttribute("name") || ""; if (class_name) class_name = class_name.split(" ")[0]; if (!this._els[class_name]) this._els[class_name] = []; this._els[class_name].push(els[i]); - var label = scheduler2.locale.labels[attr_value + "_tab"] || scheduler2.locale.labels[attr_value || class_name]; + let label = scheduler2.locale.labels[attr_value + "_tab"] || scheduler2.locale.labels[attr_value || class_name]; if (typeof label !== "string" && attr_value && !els[i].innerHTML) label = attr_value.split("_")[0]; if (label) { @@ -715,14 +715,14 @@ function extend$j(scheduler2) { } } }; - var domEventsScope = scheduler2._createDomEventScope(); + const domEventsScope = scheduler2._createDomEventScope(); scheduler2.unset_actions = function() { domEventsScope.detachAll(); }; scheduler2.set_actions = function() { - for (var a in this._els) { + for (const a in this._els) { if (this._click[a]) { - for (var i = 0; i < this._els[a].length; i++) { + for (let i = 0; i < this._els[a].length; i++) { const element = this._els[a][i]; const handler = this._click[a].bind(element); domEventsScope.attach(element, "click", handler); @@ -748,13 +748,11 @@ function extend$j(scheduler2) { domEventsScope.attach(this._obj, "dblclick", function(e) { scheduler2._on_dbl_click(e); }); - domEventsScope.attach(this._obj, "contextmenu", function(e) { + domEventsScope.attach(this._obj, "contextmenu", function(event2) { if (scheduler2.checkEvent("onContextMenu")) { - e.preventDefault(); + event2.preventDefault(); } - var ev = e; - var src = ev.target || ev.srcElement; - var returnValue = scheduler2.callEvent("onContextMenu", [scheduler2._locate_event(src), ev]); + const returnValue = scheduler2.callEvent("onContextMenu", [scheduler2._locate_event(event2.target), event2]); return returnValue; }); }; @@ -771,13 +769,15 @@ function extend$j(scheduler2) { this.callEvent("onEventSelected", [id2]); }; scheduler2.unselect = function(id2) { - if (id2 && id2 != this._select_id) + if (id2 && id2 != this._select_id) { return; - var t = this._select_id; + } + const previousSelection = this._select_id; this._select_id = null; - if (t && this.getEvent(t)) - this.updateEvent(t); - this.callEvent("onEventUnselected", [t]); + if (previousSelection && this.getEvent(previousSelection)) { + this.updateEvent(previousSelection); + } + this.callEvent("onEventUnselected", [previousSelection]); }; scheduler2.getState = function() { return { mode: this._mode, date: new Date(this._date), min_date: new Date(this._min_date), max_date: new Date(this._max_date), editor_id: this._edit_id, lightbox_id: this._lightbox_id, new_event: this._new_event, select_id: this._select_id, expanded: this.expanded, drag_id: this._drag_id, drag_mode: this._drag_mode }; @@ -790,8 +790,7 @@ function extend$j(scheduler2) { scheduler2._ignore_next_click = false; return false; } - var trg = e.target; - var id2 = scheduler2._locate_event(trg); + const id2 = scheduler2._locate_event(e.target); if (!id2) { scheduler2.callEvent("onEmptyClick", [scheduler2.getActionData(e).date, e]); } else { @@ -800,8 +799,8 @@ function extend$j(scheduler2) { } if (id2 && scheduler2.config.select) { scheduler2.select(id2); - const icon = trg.closest(".dhx_menu_icon"); - var mask = scheduler2._getClassName(icon); + const icon = e.target.closest(".dhx_menu_icon"); + const mask = scheduler2._getClassName(icon); if (mask.indexOf("_icon") != -1) scheduler2._click.buttons[mask.split(" ")[1].replace("icon_", "")](id2); } else { @@ -813,7 +812,7 @@ function extend$j(scheduler2) { }, dhx_cal_prev_button: function() { scheduler2._click.dhx_cal_next_button(0, -1); }, dhx_cal_next_button: function(dummy, step) { - var def_step = 1; + let def_step = 1; if (scheduler2.config.rtl) { step = -step; def_step = -def_step; @@ -824,12 +823,12 @@ function extend$j(scheduler2) { scheduler2.setCurrentView(scheduler2._currentDate()); } }, dhx_cal_tab: function() { - var name = this.getAttribute("data-tab"); - var deprecated_name = this.getAttribute("name"); - var mode = name || deprecated_name.substring(0, deprecated_name.search("_tab")); + const name = this.getAttribute("data-tab"); + const deprecated_name = this.getAttribute("name"); + const mode = name || deprecated_name.substring(0, deprecated_name.search("_tab")); scheduler2.setCurrentView(scheduler2._date, mode); }, buttons: { delete: function(id2) { - var c = scheduler2.locale.labels.confirm_deleting; + const c = scheduler2.locale.labels.confirm_deleting; scheduler2._dhtmlx_confirm({ message: c, title: scheduler2.locale.labels.title_confirm_deleting, callback: function() { scheduler2.deleteEvent(id2); }, config: { ok: scheduler2.locale.labels.icon_delete } }); @@ -848,45 +847,47 @@ function extend$j(scheduler2) { if (!message2) return callback(); config = config || {}; - var opts = { ...config, text: message2 }; - if (title) + const opts = { ...config, text: message2 }; + if (title) { opts.title = title; + } if (callback) { opts.callback = function(result) { - if (result) + if (result) { callback(); + } }; } scheduler2.confirm(opts); }; scheduler2.addEventNow = function(start, end, e) { - var base = {}; + let base = {}; if (scheduler2._isObject(start) && !scheduler2._isDate(start)) { base = start; start = null; } - var d = (this.config.event_duration || this.config.time_step) * 6e4; + const duration = (this.config.event_duration || this.config.time_step) * 6e4; if (!start) - start = base.start_date || Math.round(scheduler2._currentDate().valueOf() / d) * d; - var start_date = new Date(start); + start = base.start_date || Math.round(scheduler2._currentDate().valueOf() / duration) * duration; + let start_date = new Date(start); if (!end) { - var start_hour = this.config.first_hour; + let start_hour = this.config.first_hour; if (start_hour > start_date.getHours()) { start_date.setHours(start_hour); start = start_date.valueOf(); } - end = start.valueOf() + d; + end = start.valueOf() + duration; } - var end_date = new Date(end); + let end_date = new Date(end); if (start_date.valueOf() == end_date.valueOf()) - end_date.setTime(end_date.valueOf() + d); + end_date.setTime(end_date.valueOf() + duration); base.start_date = base.start_date || start_date; base.end_date = base.end_date || end_date; base.text = base.text || this.locale.labels.new_event; base.id = this._drag_id = base.id || this.uid(); this._drag_mode = "new-size"; this._loading = true; - var eventId = this.addEvent(base); + const eventId = this.addEvent(base); this.callEvent("onEventCreated", [this._drag_id, e]); this._loading = false; this._drag_event = {}; @@ -894,10 +895,10 @@ function extend$j(scheduler2) { return eventId; }; scheduler2._on_dbl_click = function(e, src) { - src = src || (e.target || e.srcElement); + src = src || e.target; if (this.config.readonly) return; - var name = scheduler2._getClassName(src).split(" ")[0]; + const name = scheduler2._getClassName(src).split(" ")[0]; switch (name) { case "dhx_scale_holder": case "dhx_scale_holder_now": @@ -913,8 +914,8 @@ function extend$j(scheduler2) { case "dhx_cal_agenda_event_line": case "dhx_grid_event": case "dhx_cal_event_line": - case "dhx_cal_event_clear": - var id2 = this._locate_event(src); + case "dhx_cal_event_clear": { + const id2 = this._locate_event(src); if (!this.callEvent("onDblClick", [id2, e])) return; if (this.config.details_on_dblclick || this._table_view || !this.getEvent(id2)._timed || !this.config.select) @@ -922,25 +923,27 @@ function extend$j(scheduler2) { else this.edit(id2); break; + } case "dhx_time_block": case "dhx_cal_container": return; - default: - var t = this["dblclick_" + name]; - if (t) { - t.call(this, e); + default: { + const viewHandler = this["dblclick_" + name]; + if (viewHandler) { + viewHandler.call(this, e); } else { if (src.parentNode && src != this) return scheduler2._on_dbl_click(e, src.parentNode); } break; + } } }; scheduler2._get_column_index = function(x_pos) { - var column = 0; + let column = 0; if (this._cols) { - var width = 0; - var i = 0; + let width = 0; + let i = 0; while (width + this._cols[i] < x_pos && i < this._cols.length) { width += this._cols[i]; i++; @@ -960,20 +963,20 @@ function extend$j(scheduler2) { if (!this._cols) { return pos; } else { - var column = this._get_column_index(pos.x); + const column = this._get_column_index(pos.x); pos.x = Math.min(this._cols.length - 1, Math.max(0, Math.ceil(column) - 1)); pos.y = Math.max(0, Math.ceil(pos.y * 60 / (this.config.time_step * this.config.hour_size_px)) - 1) + this.config.first_hour * (60 / this.config.time_step); return pos; } }; scheduler2._mouse_coords = function(ev) { - var pos; - var b = document.body; - var d = document.documentElement; + let pos; + const body = document.body; + const documentElement = document.documentElement; if (!this.$env.isIE && (ev.pageX || ev.pageY)) pos = { x: ev.pageX, y: ev.pageY }; else - pos = { x: ev.clientX + (b.scrollLeft || d.scrollLeft || 0) - b.clientLeft, y: ev.clientY + (b.scrollTop || d.scrollTop || 0) - b.clientTop }; + pos = { x: ev.clientX + (body.scrollLeft || documentElement.scrollLeft || 0) - body.clientLeft, y: ev.clientY + (body.scrollTop || documentElement.scrollTop || 0) - body.clientTop }; if (this.config.rtl && this._colsS) { pos.x = this.$container.querySelector(".dhx_cal_data").offsetWidth - pos.x; pos.x += this.$domHelpers.getAbsoluteLeft(this._obj); @@ -983,20 +986,20 @@ function extend$j(scheduler2) { } else { pos.x -= this.$domHelpers.getAbsoluteLeft(this._obj) + (this._table_view ? 0 : this.xy.scale_width); } - var dataArea = this.$container.querySelector(".dhx_cal_data"); + const dataArea = this.$container.querySelector(".dhx_cal_data"); pos.y -= this.$domHelpers.getAbsoluteTop(dataArea) - this._els["dhx_cal_data"][0].scrollTop; pos.ev = ev; - var handler = this["mouse_" + this._mode]; + const handler = this["mouse_" + this._mode]; if (handler) { pos = handler.call(this, pos); } else { if (!this._table_view) { pos = this._week_indexes_from_pos(pos); } else { - var column = this._get_column_index(pos.x); + const column = this._get_column_index(pos.x); if (!this._cols || !this._colsS) return pos; - var dy = 0; + let dy = 0; for (dy = 1; dy < this._colsS.heights.length; dy++) if (this._colsS.heights[dy] > pos.y) break; @@ -1018,11 +1021,11 @@ function extend$j(scheduler2) { }; scheduler2._close_not_saved = function() { if ((/* @__PURE__ */ new Date()).valueOf() - (scheduler2._new_event || 0) > 500 && scheduler2._edit_id) { - var c = scheduler2.locale.labels.confirm_closing; - scheduler2._dhtmlx_confirm({ message: c, title: scheduler2.locale.labels.title_confirm_closing, callback: function() { + const confirmationText = scheduler2.locale.labels.confirm_closing; + scheduler2._dhtmlx_confirm({ message: confirmationText, title: scheduler2.locale.labels.title_confirm_closing, callback: function() { scheduler2.editStop(scheduler2.config.positive_closing); } }); - if (c) { + if (confirmationText) { this._drag_id = this._drag_pos = this._drag_mode = null; } } @@ -1037,26 +1040,28 @@ function extend$j(scheduler2) { if (!(old_pos && this._drag_pos)) { return true; } - var delay2 = 100, d_pos = 5; + const delay2 = 100; + const d_pos = 5; return !!(this._drag_pos.has_moved || !this._drag_pos.timestamp || new_pos.timestamp - this._drag_pos.timestamp > delay2 || diff(old_pos.ev.clientX, new_pos.ev.clientX, d_pos) || diff(old_pos.ev.clientY, new_pos.ev.clientY, d_pos)); }; scheduler2._correct_drag_start_date = function(start) { - var obj; + let obj; if (scheduler2.matrix) obj = scheduler2.matrix[scheduler2._mode]; obj = obj || { x_step: 1, x_unit: "day" }; start = new Date(start); - var len = 1; + let len = 1; if (obj._start_correction || obj._end_correction) len = (obj.last_hour || 0) * 60 - (start.getHours() * 60 + start.getMinutes()) || 1; return start * 1 + (scheduler2._get_fictional_event_length(start, len, obj) - len); }; scheduler2._correct_drag_end_date = function(start, duration) { - var obj; - if (scheduler2.matrix) + let obj; + if (scheduler2.matrix) { obj = scheduler2.matrix[scheduler2._mode]; + } obj = obj || { x_step: 1, x_unit: "day" }; - var end = start * 1 + scheduler2._get_fictional_event_length(start, duration, obj); + const end = start * 1 + scheduler2._get_fictional_event_length(start, duration, obj); return new Date(end * 1 - (scheduler2._get_fictional_event_length(end, -1, obj, -1) + 1)); }; scheduler2._on_mouse_move = function(e) { @@ -1980,9 +1985,9 @@ function extend$j(scheduler2) { const intervalStart = new Date(Math.max(check.valueOf(), startDate.valueOf())); const intervalEnd = endDate; const leftCellCutOffStart = new Date(intervalStart.getFullYear(), intervalStart.getMonth(), intervalStart.getDate(), config.first_hour); - const leftCellCutOffEnd = new Date(intervalStart.getFullYear(), intervalStart.getMonth(), intervalStart.getDate(), config.last_hour); + const leftCellCutOffEnd = new Date(intervalStart.getFullYear(), intervalStart.getMonth(), intervalStart.getDate(), config.last_hour || 24); const rightCellCutOffStart = new Date(endDate.getFullYear(), endDate.getMonth(), endDate.getDate(), config.first_hour); - const rightCellCutOffEnd = new Date(endDate.getFullYear(), endDate.getMonth(), endDate.getDate(), config.last_hour); + const rightCellCutOffEnd = new Date(endDate.getFullYear(), endDate.getMonth(), endDate.getDate(), config.last_hour || 24); if (intervalEnd.valueOf() > rightCellCutOffEnd.valueOf()) { excludedDuration += intervalEnd - rightCellCutOffEnd; } @@ -2695,7 +2700,7 @@ if (Element.prototype.closest) { }; } var isWindowAwailable = typeof window !== "undefined"; -const env = { isIE: isWindowAwailable && (navigator.userAgent.indexOf("MSIE") >= 0 || navigator.userAgent.indexOf("Trident") >= 0), isIE6: isWindowAwailable && (!XMLHttpRequest && navigator.userAgent.indexOf("MSIE") >= 0), isIE7: isWindowAwailable && (navigator.userAgent.indexOf("MSIE 7.0") >= 0 && navigator.userAgent.indexOf("Trident") < 0), isIE8: isWindowAwailable && (navigator.userAgent.indexOf("MSIE 8.0") >= 0 && navigator.userAgent.indexOf("Trident") >= 0), isOpera: isWindowAwailable && navigator.userAgent.indexOf("Opera") >= 0, isChrome: isWindowAwailable && navigator.userAgent.indexOf("Chrome") >= 0, isKHTML: isWindowAwailable && (navigator.userAgent.indexOf("Safari") >= 0 || navigator.userAgent.indexOf("Konqueror") >= 0), isFF: isWindowAwailable && navigator.userAgent.indexOf("Firefox") >= 0, isIPad: isWindowAwailable && navigator.userAgent.search(/iPad/gi) >= 0, isEdge: isWindowAwailable && navigator.userAgent.indexOf("Edge") != -1, isNode: !isWindowAwailable || typeof navigator == "undefined" }; +const env = { isIE: isWindowAwailable && (navigator.userAgent.indexOf("MSIE") >= 0 || navigator.userAgent.indexOf("Trident") >= 0), isOpera: isWindowAwailable && navigator.userAgent.indexOf("Opera") >= 0, isChrome: isWindowAwailable && navigator.userAgent.indexOf("Chrome") >= 0, isKHTML: isWindowAwailable && (navigator.userAgent.indexOf("Safari") >= 0 || navigator.userAgent.indexOf("Konqueror") >= 0), isFF: isWindowAwailable && navigator.userAgent.indexOf("Firefox") >= 0, isIPad: isWindowAwailable && navigator.userAgent.search(/iPad/gi) >= 0, isEdge: isWindowAwailable && navigator.userAgent.indexOf("Edge") != -1, isNode: !isWindowAwailable || typeof navigator == "undefined" }; function extend$g(scheduler2) { scheduler2.destructor = function() { scheduler2.callEvent("onDestroy", []); @@ -3017,10 +3022,10 @@ function extend$e(scheduler2) { }; }; var csp_str_to_date = function(format, utc) { + const mask = format.match(/%[a-zA-Z]/g); return function(date) { var set = [0, 0, 1, 0, 0, 0]; var temp = date.match(/[a-zA-Z]+|[0-9]+/g); - var mask = format.match(/%[a-zA-Z]/g); for (var i = 0; i < mask.length; i++) { switch (mask[i]) { case "%j": @@ -3067,18 +3072,23 @@ function extend$e(scheduler2) { return new Date(set[0], set[1], set[2], set[3], set[4], set[5]); }; }; - var canUseCsp = false; - (function() { + let cspEnabled = void 0; + function checkIfCSPEnabled() { try { - new Function("canUseCsp = false;"); + new Function("cspEnabled = false;"); + cspEnabled = false; } catch (e) { - canUseCsp = true; + cspEnabled = true; } - })(); + return cspEnabled; + } function useCsp() { var result = false; if (scheduler2.config.csp === "auto") { - result = canUseCsp; + if (cspEnabled === void 0) { + cspEnabled = checkIfCSPEnabled(); + } + result = cspEnabled; } else { result = scheduler2.config.csp; } @@ -3093,14 +3103,6 @@ function extend$e(scheduler2) { var t = scheduler2.locale.date.month_full_hash = {}; for (var i = 0; i < s.length; i++) t[s[i]] = i; - }, _bind_host_object: function(method) { - if (method.bind) { - return method.bind(scheduler2); - } else { - return function() { - return method.apply(scheduler2, arguments); - }; - } }, date_part: function(date) { var old = new Date(date); date.setHours(0); @@ -3224,7 +3226,7 @@ function extend$e(scheduler2) { if (utc) format = format.replace(/date\.get/g, "date.getUTC"); var func = new Function("date", 'return "' + format + '";'); - return scheduler2.date._bind_host_object(func); + return func.bind(scheduler2); }, str_to_date: function(format, utc, exactFormat) { var stringToDateMethod = useCsp() ? csp_str_to_date : generateStringToDate; var parseExactFormat = stringToDateMethod(format, utc); @@ -3920,6 +3922,7 @@ function extend$c(scheduler2) { ev._sweek = Math.floor((this._correct_shift(sd.valueOf(), 1) - this._min_date.valueOf()) / (60 * 60 * 1e3 * 24 * cols)); var isAnyCellVisible = scheduler2._is_any_multiday_cell_visible(sd, ed, ev); if (!isAnyCellVisible) { + start_date = null; continue; } var stack = weeks[ev._sweek]; @@ -4920,7 +4923,8 @@ function extend$6(scheduler2) { return node.innerHTML || ""; }, focus: function(node) { } }, textarea: { render: function(sns) { - return "
"; + const placeholder = sns.placeholder ? `placeholder='${sns.placeholder}'` : ""; + return `
`; }, set_value: function(node, value, ev) { scheduler2.form_blocks.textarea._get_input(node).value = value || ""; }, get_value: function(node, ev) { @@ -7612,7 +7616,7 @@ class DatePicker { } } function factoryMethod(extensionManager) { - const scheduler2 = { version: "7.0.3" }; + const scheduler2 = { version: "7.0.4" }; extend$n(scheduler2); extend$i(scheduler2); extend$j(scheduler2); @@ -8039,6 +8043,11 @@ function agenda_view(scheduler2) { scheduler2._els["dhx_cal_data"][0].innerHTML = html; } scheduler2._els["dhx_cal_data"][0].scrollTop = scrollTop; + let t = scheduler2._els["dhx_cal_data"][0].querySelectorAll(".dhx_cal_agenda_event_line"); + scheduler2._rendered = []; + for (var i = 0; i < t.length - 1; i++) { + scheduler2._rendered[i] = t[i]; + } } function renderEmptyView() { return `
${scheduler2.locale.labels.agenda_tab}
`; @@ -9332,7 +9341,7 @@ function marker(scheduler2) { div.style.width = scheduler2._cols[dayIndex] + "px"; div.style.height = (scheduler2._colsS.heights[weekNumber + 1] - top || scheduler2._colsS.height) + "px"; var container = scheduler2.$container.querySelector(".dhx_cal_data"); - var datatable = container.querySelector("table"); + var datatable = container.querySelector(".dhx_cal_month_table"); if (datatable.nextSibling) { container.insertBefore(div, datatable.nextSibling); } else { @@ -10918,7 +10927,17 @@ function scheduler_handlers(scheduler2) { function mousedownHandler(e) { if (!scheduler2.config.key_nav) return true; - var dataAreaClick = scheduler2.$keyboardNavigation.isChildOf(e.target || e.srcElement, scheduler2.$container.querySelector(".dhx_cal_data")); + const view = scheduler2.getView(); + let dataAreaClick = false; + if (scheduler2.getState().mode === "month") { + dataAreaClick = scheduler2.$keyboardNavigation.isChildOf(e.target || e.srcElement, scheduler2.$container.querySelector(".dhx_cal_month_table")); + } else if (view && view.layout === "timeline") { + dataAreaClick = scheduler2.$keyboardNavigation.isChildOf(e.target || e.srcElement, scheduler2.$container.querySelector(".dhx_timeline_data_col")); + } else { + const listOfScales = scheduler2.$container.querySelectorAll(".dhx_scale_holder"); + const arrOfScales = Array.from(listOfScales); + dataAreaClick = arrOfScales.some((scale) => scale === e.target.parentNode); + } var pos = scheduler2.getActionData(e); var focusNode; if (scheduler2._locate_event(e.target || e.srcElement)) { diff --git a/codebase/sources/dhtmlxscheduler.es.js.map b/codebase/sources/dhtmlxscheduler.es.js.map index f3d7d33..b2d9d1c 100644 --- a/codebase/sources/dhtmlxscheduler.es.js.map +++ b/codebase/sources/dhtmlxscheduler.es.js.map @@ -1 +1 @@ -{"version":3,"file":"dhtmlxscheduler.es.js","sources":["../../sources/dhtmlx_hook.js","../../sources/global.js","../../sources/core/common/assert.js","../../sources/core/common_errors.js","../../sources/core/connector.js","../../sources/core/nav_bar.js","../../sources/core/scheduler_resize_listener.js","../../sources/utils/eventable.js","../../sources/core/scheduler.js","../../sources/core/utils/event.js","../../sources/core/utils/scoped_event.js","../../sources/core/common.js","../../sources/core/wai_aria.js","../../sources/core/utils/utils.js","../../sources/core/utils/dom_helpers.js","../../sources/utils/env.js","../../sources/core/destructor.js","../../sources/core/common/url_serialize.js","../../sources/core/utils/ajax.js","../../sources/core/base.js","../../sources/core/config.js","../../sources/core/event.js","../../sources/core/event_highlight.js","../../sources/core/loaders/xml.js","../../sources/core/loaders/json.js","../../sources/core/loaders/ical.js","../../sources/core/common/get_serializable_events.js","../../sources/core/load.js","../../sources/core/lightbox.js","../../sources/core/touch.js","../../sources/core/dhtmlx/dhtmlx_suite_hooks.js","../../sources/core/skins.js","../../sources/core/jquery.js","../../sources/core/delay_render.js","../../sources/core/dataprocessor/dataprocessor_hooks.js","../../sources/core/dataprocessor/dataprocessor.js","../../sources/core/message.js","../../sources/locale/locale_ar.js","../../sources/locale/locale_be.js","../../sources/locale/locale_ca.js","../../sources/locale/locale_cn.js","../../sources/locale/locale_cs.js","../../sources/locale/locale_da.js","../../sources/locale/locale_de.js","../../sources/locale/locale_el.js","../../sources/locale/locale_en.js","../../sources/locale/locale_es.js","../../sources/locale/locale_fi.js","../../sources/locale/locale_fr.js","../../sources/locale/locale_he.js","../../sources/locale/locale_hu.js","../../sources/locale/locale_id.js","../../sources/locale/locale_it.js","../../sources/locale/locale_jp.js","../../sources/locale/locale_manager.js","../../sources/locale/locale_nb.js","../../sources/locale/locale_nl.js","../../sources/locale/locale_no.js","../../sources/locale/locale_pl.js","../../sources/locale/locale_pt.js","../../sources/locale/locale_ro.js","../../sources/locale/locale_ru.js","../../sources/locale/locale_si.js","../../sources/locale/locale_sk.js","../../sources/locale/locale_sv.js","../../sources/locale/locale_tr.js","../../sources/locale/locale_ua.js","../../sources/locale/index.js","../../sources/core/datepicker.js","../../sources/scheduler_factory_method.js","../../sources/ext/extension_manager.js","../../sources/scheduler_factory.js","../../sources/ext/active_links.js","../../sources/ext/agenda_legacy_view.js","../../sources/ext/agenda.js","../../sources/ext/all_timed.js","../../sources/ext/collision.js","../../sources/ext/container_autoresize.js","../../sources/ext/cookie.js","../../sources/ext/restricted_extensions/not_implemented_extension.js","../../sources/ext/restricted_extensions/daytimeline.js","../../sources/ext/restricted_extensions/drag_between.js","../../sources/ext/editors.js","../../sources/ext/expand.js","../../sources/ext/restricted_extensions/grid_view.js","../../sources/ext/html_templates.js","../../sources/ext/keyboard_navigation/common/keyboard_shortcuts.js","../../sources/ext/keyboard_navigation/common/eventhandler.js","../../sources/ext/keyboard_navigation/common/trap_modal_focus.js","../../sources/ext/keyboard_navigation/marker.js","../../sources/ext/keyboard_navigation/elements/scheduler_node.js","../../sources/ext/keyboard_navigation/elements/nav_node.js","../../sources/ext/keyboard_navigation/elements/header_cell.js","../../sources/ext/keyboard_navigation/elements/event.js","../../sources/ext/keyboard_navigation/elements/time_slot.js","../../sources/ext/keyboard_navigation/elements/minical_button.js","../../sources/ext/keyboard_navigation/elements/minical_cell.js","../../sources/ext/keyboard_navigation/elements/data_area.js","../../sources/ext/keyboard_navigation/modals.js","../../sources/ext/keyboard_navigation/core.js","../../sources/ext/keyboard_navigation/key_nav_legacy.js","../../sources/ext/keyboard_navigation/scheduler_handlers.js","../../sources/ext/keyboard_navigation/minical_handlers.js","../../sources/ext/key_nav.js","../../sources/ext/layer.js","../../sources/ext/limit.js","../../sources/ext/map_view.js","../../sources/ext/minical.js","../../sources/ext/monthheight.js","../../sources/ext/restricted_extensions/multisection.js","../../sources/ext/multiselect.js","../../sources/ext/multisource.js","../../sources/ext/mvc.js","../../sources/ext/outerdrag.js","../../sources/ext/pdf.js","../../sources/ext/quick_info.js","../../sources/ext/readonly.js","../../sources/ext/recurring.js","../../sources/ext/serialize.js","../../sources/ext/restricted_extensions/timeline.js","../../sources/ext/tooltip/tooltip.ts","../../sources/ext/tooltip/tooltipManager.ts","../../sources/ext/tooltip/index.ts","../../sources/ext/restricted_extensions/treetimeline.js","../../sources/ext/restricted_extensions/units.js","../../sources/ext/url.js","../../sources/ext/restricted_extensions/week_agenda.js","../../sources/ext/wp.js","../../sources/ext/year_view.js","../../sources/ext/export_api/index.js","../../sources/ext/extensions_gpl.js","../../sources/dhtmlxscheduler.gpl.js"],"sourcesContent":["\r\nexport default function(){\r\n/* global dhtmlx */\r\nif (typeof dhtmlx != \"undefined\" && dhtmlx.attaches) {\r\n\tdhtmlx.attaches.attachScheduler = function (day, mode, tabs, scheduler) {\r\n\t\tvar tabs = tabs || '
';\r\n\t\tvar obj = document.createElement(\"DIV\");\r\n\t\tobj.id = \"dhxSchedObj_\" + this._genStr(12);\r\n\t\tobj.innerHTML = '
' + tabs + '
';\r\n\t\tdocument.body.appendChild(obj.firstChild);\r\n\r\n\t\tthis.attachObject(obj.id, false, true);\r\n\r\n\t\tthis.vs[this.av].sched = scheduler;\r\n\t\tthis.vs[this.av].schedId = obj.id;\r\n\t\tscheduler.setSizes = scheduler.updateView;\r\n\t\tscheduler.destructor = function () { };\r\n\t\tscheduler.init(obj.id, day, mode);\r\n\r\n\t\treturn this.vs[this._viewRestore()].sched;\r\n\t};\r\n}\r\n\r\n}","\r\n/* eslint-disable no-restricted-globals */\r\nvar globalScope;\r\nif(typeof window !== \"undefined\"){\r\n\tglobalScope = window;\r\n}else{\r\n\tglobalScope = global;\r\n}\r\n/* eslint-enable no-restricted-globals */\r\n\r\nexport default globalScope;","export default function(scheduler){\r\n\treturn function assert(check, message){\r\n\t\tif (!check){\r\n\t\t\tif(scheduler.config.show_errors && scheduler.callEvent(\"onError\",[message]) !== false) {\r\n\t\t\t\tif (scheduler.message) {\r\n\t\t\t\t\tscheduler.message({type: \"error\", text: message, expire: -1});\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t// eslint-disable-next-line\r\n\t\t\t\t\tconsole.log(message);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// eslint-disable-next-line no-debugger\r\n\t\t\t\tdebugger;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n}","export default function extend(scheduler) {\r\n\r\nvar commonViews = {\r\n\tagenda: \"https://docs.dhtmlx.com/scheduler/agenda_view.html\",\r\n\tgrid: \"https://docs.dhtmlx.com/scheduler/grid_view.html\",\r\n\tmap: \"https://docs.dhtmlx.com/scheduler/map_view.html\",\r\n\tunit: \"https://docs.dhtmlx.com/scheduler/units_view.html\",\r\n\ttimeline: \"https://docs.dhtmlx.com/scheduler/timeline_view.html\",\r\n\tweek_agenda: \"https://docs.dhtmlx.com/scheduler/weekagenda_view.html\",\r\n\tyear: \"https://docs.dhtmlx.com/scheduler/year_view.html\",\r\n\tanythingElse: \"https://docs.dhtmlx.com/scheduler/views.html\"\r\n};\r\n\r\nvar requiredExtensions = {\r\n\tagenda: \"ext/dhtmlxscheduler_agenda_view.js\",\r\n\tgrid: \"ext/dhtmlxscheduler_grid_view.js\",\r\n\tmap: \"ext/dhtmlxscheduler_map_view.js\",\r\n\tunit: \"ext/dhtmlxscheduler_units.js\",\r\n\ttimeline: \"ext/dhtmlxscheduler_timeline.js, ext/dhtmlxscheduler_treetimeline.js, ext/dhtmlxscheduler_daytimeline.js\",\r\n\tweek_agenda: \"ext/dhtmlxscheduler_week_agenda.js\",\r\n\tyear: \"ext/dhtmlxscheduler_year_view.js\",\r\n\tlimit: \"ext/dhtmlxscheduler_limit.js\"\r\n};\r\n\r\nscheduler._commonErrorMessages = {\r\n\tunknownView: function(view){\r\n\t\tvar relatedDoc = \"Related docs: \" + (commonViews[view] || commonViews.anythingElse); \r\n\t\tvar relatedExtension = requiredExtensions[view] ? (\"You're probably missing \" + requiredExtensions[view] + \".\") : \"\";\r\n\t\treturn (\r\n\t\t\t\"`\"+view+\"` view is not defined. \\n\" +\r\n\t\t\t\"Please check parameters you pass to `scheduler.init` or `scheduler.setCurrentView` in your code and ensure you've imported appropriate extensions. \\n\" + \r\n\t\t\trelatedDoc + \"\\n\" + (relatedExtension ? (relatedExtension + \"\\n\") : \"\"));\r\n\t},\r\n\tcollapsedContainer: function(div){\r\n\t\treturn \"Scheduler container height is set to *100%* but the rendered height is zero and the scheduler is not visible. \\n\"+\r\n\t\t\"Make sure that the container has some initial height or use different units. For example:\\n\" +\r\n\t\t\"
\\n\";\r\n\t}\r\n};\r\n\r\nscheduler.createTimelineView = function() {\r\n\tthrow new Error(\"scheduler.createTimelineView is not implemented. Be sure to add the required extension: \" + requiredExtensions.timeline + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.timeline);\r\n};\r\n\r\nscheduler.createUnitsView = function() {\r\n\tthrow new Error(\"scheduler.createUnitsView is not implemented. Be sure to add the required extension: \" + requiredExtensions.unit + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.unit);\r\n};\r\n\r\nscheduler.createGridView = function() {\r\n\tthrow new Error(\"scheduler.createGridView is not implemented. Be sure to add the required extension: \" + requiredExtensions.grid + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.grid);\r\n};\r\n\r\nscheduler.addMarkedTimespan = function() {\r\n\tthrow new Error(\"scheduler.addMarkedTimespan is not implemented. Be sure to add the required extension: ext/dhtmlxscheduler_limit.js\" + \r\n\t\"\\n\" +\r\n\t\"Related docs: https://docs.dhtmlx.com/scheduler/limits.html\");\r\n};\r\n\r\nscheduler.renderCalendar = function() {\r\n\tthrow new Error(\"scheduler.renderCalendar is not implemented. Be sure to add the required extension: ext/dhtmlxscheduler_minical.js\" + \r\n\t\"\\n\" +\r\n\t\"https://docs.dhtmlx.com/scheduler/minicalendar.html\");\r\n};\r\n\r\nscheduler.exportToPNG = function() {\r\n\tthrow new Error([\r\n\t\t\"scheduler.exportToPNG is not implemented.\",\r\n\t\t\"This feature requires an additional module, be sure to check the related doc here https://docs.dhtmlx.com/scheduler/png.html\",\r\n\t\t\"Licensing info: https://dhtmlx.com/docs/products/dhtmlxScheduler/export.shtml\"\r\n\t].join(\"\\n\"));\r\n};\r\n\r\nscheduler.exportToPDF = function() {\r\n\tthrow new Error([\r\n\t\t\"scheduler.exportToPDF is not implemented.\",\r\n\t\t\"This feature requires an additional module, be sure to check the related doc here https://docs.dhtmlx.com/scheduler/pdf.html\",\r\n\t\t\"Licensing info: https://dhtmlx.com/docs/products/dhtmlxScheduler/export.shtml\"\r\n\t].join(\"\\n\"));\r\n};\r\n\r\n\r\n}","import global from \"../global\";\r\n\r\nexport default function extend(scheduler) {\r\n/*\r\nif (global.dataProcessor && !dataProcessor.prototype.init_original){\r\n\tdataProcessor.prototype.init_original=dataProcessor.prototype.init;\r\n\tdataProcessor.prototype.init=function(obj){\r\n\t\tthis.init_original(obj);\r\n\t\tobj._dataprocessor=this;\r\n\r\n\t\tthis.setTransactionMode(\"POST\",true);\r\n\t\tthis.serverProcessor+=(this.serverProcessor.indexOf(\"?\")!=-1?\"&\":\"?\")+\"editing=true\";\r\n\t};\r\n}*/\r\n\r\nscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\tif(typeof dhtmlxError !== \"undefined\") {\r\n\t\twindow.dhtmlxError.catchError(\"LoadXML\", function(a, b, c){\r\n\t\t\tvar message = c[0].responseText;\r\n\r\n\t\t\tswitch (scheduler.config.ajax_error){\r\n\t\t\t\tcase \"alert\":\r\n\t\t\t\t\tglobal.alert(message);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"console\":\r\n\t\t\t\t\tglobal.console.log(message);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n});\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nfunction div(className){\r\n\tvar element = document.createElement(\"div\");\r\n\tvar classes = (className || \"\").split(\" \");\r\n\tclasses.forEach(function(cssClass){\r\n\t\telement.classList.add(cssClass);\r\n\t});\r\n\treturn element;\r\n}\r\nvar itemTypes = {\r\n\trows_container: function(){\r\n\t\treturn div(\"dhx_cal_navbar_rows_container\");\r\n\t},\r\n\trow: function(){\r\n\t\treturn div(\"dhx_cal_navbar_row\");\r\n\t},\r\n\tview: function (config) {\r\n\t\tvar element = div(\"dhx_cal_tab\");\r\n\t\telement.setAttribute(\"name\", config.view + \"_tab\");\r\n\t\telement.setAttribute(\"data-tab\", config.view);\r\n\t\t// element.setAttribute(\"data-viewname\", config.view); // FIXME: need to remove? not used anywhere\r\n\t\tif(scheduler.config.fix_tab_position){\r\n\t\t\tif(config.$firstTab) {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_first\");\r\n\t\t\t}else if(config.$lastTab) {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_last\");\r\n\t\t\t} else if(config.view !== \"week\") {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_standalone\");\r\n\t\t\t}\r\n\r\n\t\t\tif(config.$segmentedTab) {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn element;\r\n\t},\r\n\tdate: function () {\r\n\t\treturn div(\"dhx_cal_date\");\r\n\t},\r\n\tbutton: function (config) {\r\n\t\treturn div(\"dhx_cal_nav_button dhx_cal_nav_button_custom dhx_cal_tab\");\r\n\t},\r\n\tbuiltInButton: function (config){\r\n\t\treturn div(\"dhx_cal_\" + config.view + \"_button dhx_cal_nav_button\");\r\n\t},\r\n\tspacer: function () {\r\n\t\treturn div(\"dhx_cal_line_spacer\");\r\n\t},\r\n\tminicalendarButton: function(config){\r\n\t\tvar minicalendarDiv = div('dhx_minical_icon');\r\n\t\tif(!config.click && !minicalendarDiv.$_eventAttached){\r\n\t\t\t\r\n\t\t\tscheduler.event(minicalendarDiv, \"click\", function () {\r\n\t\t\t\tif (scheduler.isCalendarVisible()) {\r\n\t\t\t\t\tscheduler.destroyCalendar();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tscheduler.renderCalendar({\r\n\t\t\t\t\t\tposition: this,\r\n\t\t\t\t\t\tdate: scheduler.getState().date,\r\n\t\t\t\t\t\tnavigation: true,\r\n\t\t\t\t\t\thandler: function (date, calendar) {\r\n\t\t\t\t\t\t\tscheduler.setCurrentView(date);\r\n\t\t\t\t\t\t\tscheduler.destroyCalendar();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn minicalendarDiv;\r\n\t},\r\n\thtml_element: function (config) {\r\n\t\treturn div(\"dhx_cal_nav_content\");\r\n\t}\r\n};\r\n\r\nfunction findRenderer(config) {\r\n\tvar renderer;\r\n\tif (config.view) {\r\n\t\tswitch (config.view){\r\n\t\t\tcase \"today\":\r\n\t\t\tcase \"next\":\r\n\t\t\tcase \"prev\":\r\n\t\t\t\trenderer = itemTypes.builtInButton;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"date\":\r\n\t\t\t\trenderer = itemTypes.date;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"spacer\":\r\n\t\t\t\trenderer = itemTypes.spacer;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"button\":\r\n\t\t\t\trenderer = itemTypes.button;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"minicalendar\":\r\n\t\t\t\trenderer = itemTypes.minicalendarButton;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\trenderer = itemTypes.view;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t} else if(config.rows) {\r\n\t\trenderer = itemTypes.rows_container;\r\n\t} else if(config.cols) {\r\n\t\trenderer = itemTypes.row;\r\n\t}\r\n\treturn renderer;\r\n}\r\n\r\nfunction renderElement(config){\r\n\tvar renderer = findRenderer(config);\r\n\tif(!renderer){\r\n\t\treturn;\r\n\t}\r\n\tvar element = renderer(config);\r\n\tif(config.css){\r\n\t\telement.classList.add(config.css);\r\n\t}\r\n\tif(config.width){\r\n\t\tvar value = config.width;\r\n\t\tif(value === value * 1){\r\n\t\t\tvalue += \"px\";\r\n\t\t}\r\n\t\telement.style.width = value;\r\n\t}\r\n\tif(config.height){\r\n\t\tvar value = config.height;\r\n\t\tif(value === value * 1){\r\n\t\t\tvalue += \"px\";\r\n\t\t}\r\n\t\telement.style.height = value;\r\n\t}\r\n\tif (config.click) {\r\n\t\tscheduler.event(element, \"click\", config.click);\r\n\t}\r\n\tif (config.html) {\r\n\t\telement.innerHTML = config.html;\r\n\t}\r\n\r\n\tif (config.align) {\r\n\t\tvar value = \"\";\r\n\t\tif (config.align == \"right\") {\r\n\t\t\tvalue = \"flex-end\";\r\n\t\t} else if(config.align == \"left\") {\r\n\t\t\tvalue = \"flex-start\";\r\n\t\t}\r\n\t\telement.style.justifyContent = value;\r\n\t}\r\n\treturn element;\r\n}\r\n\r\nfunction prepareConfig(config) {\r\n\tif (typeof config === \"string\") {\r\n\t\tconfig = {\r\n\t\t\tview: config\r\n\t\t};\r\n\t}\r\n\tif (!config.view && !config.rows && !config.cols) {\r\n\t\tconfig.view = \"button\";\r\n\t}\r\n\treturn config;\r\n}\r\n\r\nfunction renderLayout(config) {\r\n\tvar fragment = document.createDocumentFragment();\r\n\tvar items;\r\n\tif(Array.isArray(config)){\r\n\t\titems = config;\r\n\t}else{\r\n\t\titems = [config];\r\n\t}\r\n\r\n\tfor (var i = 0; i < items.length; i++) {\r\n\t\tvar view = prepareConfig(items[i]);\r\n\r\n\t\tif(view.view === \"day\" && items[i + 1]){\r\n\t\t\tvar next = prepareConfig(items[i + 1]);\r\n\t\t\tif(next.view === \"week\" || next.view === \"month\"){\r\n\t\t\t\tview.$firstTab = true;\r\n\t\t\t\tview.$segmentedTab = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(view.view === \"week\" && items[i - 1]){\r\n\t\t\tvar next = prepareConfig(items[i + 1]);\r\n\t\t\tif(next.view === \"week\" || next.view === \"month\"){\r\n\t\t\t\tview.$segmentedTab = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(view.view === \"month\" && items[i - 1]){\r\n\t\t\tvar next = prepareConfig(items[i - 1]);\r\n\t\t\tif(next.view === \"week\" || next.view === \"day\"){\r\n\t\t\t\tview.$lastTab = true;\r\n\t\t\t\tview.$segmentedTab = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar element = renderElement(view);\r\n\r\n\t\tfragment.appendChild(element);\r\n\t\tif(view.cols || view.rows){\r\n\t\t\telement.appendChild(renderLayout(view.cols || view.rows));\r\n\t\t}\r\n\t}\r\n\treturn fragment;\r\n}\r\n\r\nscheduler._init_nav_bar = function (items) {\r\n\tvar navBar = this.$container.querySelector(\".dhx_cal_navline\");\r\n\tif (!navBar){\r\n\t\tnavBar = document.createElement(\"div\");\r\n\t\tnavBar.className = \"dhx_cal_navline dhx_cal_navline_flex\";\r\n\t\tscheduler._update_nav_bar(items, navBar);\r\n\t\treturn navBar;\r\n\t}\r\n\treturn navBar;\r\n};\r\n\r\nvar previousNavbar = null;\r\nvar previousHeight = null;\r\nscheduler._update_nav_bar = function (config, container) {\r\n\r\n\tif(!config){\r\n\t\treturn;\r\n\t}\r\n\tvar heightChanged = false;\r\n\tvar configChanged = false;\r\n\r\n\tvar newHeight = config.height || scheduler.xy.nav_height;\r\n\r\n\tif(previousHeight === null ||\r\n\t\t\t(previousHeight !== newHeight)){\r\n\t\theightChanged = true;\r\n\t}\r\n\tif(!previousNavbar || JSON.stringify(config) !== previousNavbar){\r\n\t\tconfigChanged = true;\r\n\t}\r\n\r\n\tif(heightChanged){\r\n\t\tscheduler.xy.nav_height = newHeight;\r\n\t}\r\n\tif(configChanged){\r\n\t\tcontainer.innerHTML = \"\";\r\n\t\tcontainer.appendChild(renderLayout(config));\r\n\t}\r\n\r\n\tif(heightChanged || configChanged){\r\n\t\tscheduler.unset_actions();\r\n\t\tscheduler._els = [];\r\n\t\tscheduler.get_elements();\r\n\t\tscheduler.set_actions();\r\n\t}\r\n\r\n\tif(newHeight === 0){\r\n\t\tcontainer.style.display = \"none\";\r\n\t}else{\r\n\t\tcontainer.style.display = \"\";\r\n\t}\r\n\r\n\tpreviousHeight = newHeight;\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\tfunction isAttachedNode(container){\r\n\t\tvar root = document.body;\r\n\t\r\n\t\twhile(container && container != root){\r\n\t\t\tcontainer = container.parentNode;\r\n\t\t}\r\n\t\r\n\t\treturn !!(root == container);\r\n\t}\r\n\t\r\n\tfunction getWindowSize(window){\r\n\t\treturn {\r\n\t\t\tw : window.innerWidth || document.documentElement.clientWidth,\r\n\t\t\th : window.innerHeight || document.documentElement.clientHeight\r\n\t\t};\r\n\t}\r\n\tfunction equals(a,b){\r\n\t\treturn a.w == b.w && a.h == b.h;\r\n\t}\r\n\t\r\n\tfunction listenWindowResize(scheduler, window){\r\n\t\tvar oldSize = getWindowSize(window);\r\n\t\tvar resizeDelay;\r\n\t\tscheduler.event(window, \"resize\", function(){\r\n\t\t\tclearTimeout(resizeDelay);\r\n\t\t\tresizeDelay = setTimeout(function(){\r\n\r\n\t\t\t\tif (!isAttachedNode(scheduler.$container) || scheduler.$destroyed){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tvar newSize = getWindowSize(window);\r\n\t\t\t\t// element may be resized by container-autoresize exteinsion\r\n\t\t\t\t// check if the size is actually changed in order to not to get endless loop\r\n\t\t\t\tif (!equals(oldSize, newSize)) {\r\n\t\t\t\t\toldSize = newSize;\r\n\t\t\t\t\ttriggerSchedulerResize(scheduler);\r\n\t\t\t\t}\r\n\t\t\t}, 150);\r\n\t\t});\r\n\t}\r\n\t\r\n\tfunction triggerSchedulerResize(scheduler){\r\n\t\tif(scheduler.$destroyed || !scheduler.$root || !isAttachedNode(scheduler.$root)){\r\n\t\t\treturn;\t\r\n\t\t}\r\n\t\tif (scheduler.callEvent(\"onSchedulerResize\", [])) {\r\n\t\t\tscheduler.updateView();\r\n\t\t\tscheduler.callEvent(\"onAfterSchedulerResize\", []);\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction watchNodeResize(scheduler){\r\n\t\tvar previousHeight = scheduler.$root.offsetHeight;\r\n\t\tvar previousWidth = scheduler.$root.offsetWidth;\r\n\t\t\r\n\t\tfunction lowlevelResizeWatcher(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(scheduler.$root){\r\n\t\t\t\tif (scheduler.$root.offsetHeight != previousHeight ||\r\n\t\t\t\t\tscheduler.$root.offsetWidth != previousWidth){\r\n\t\t\t\t\ttriggerSchedulerResize(scheduler);\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\tpreviousHeight = scheduler.$root.offsetHeight;\r\n\t\t\t\tpreviousWidth = scheduler.$root.offsetWidth;\r\n\t\t\t}\r\n\t\r\n\t\t\tsetTimeout(lowlevelResizeWatcher, 200);\r\n\t\t}\r\n\t\t\r\n\t\tlowlevelResizeWatcher();\r\n\t}\r\n\t\r\n\tfunction addResizeListener(scheduler){\r\n\t\tvar root = scheduler.$container;\r\n\t\tvar containerStyles = window.getComputedStyle(root);\r\n\t\tif(containerStyles.getPropertyValue(\"position\") == \"static\"){\r\n\t\t\troot.style.position = \"relative\";\r\n\t\t}\r\n\t\r\n\t\tvar resizeWatcher = document.createElement('iframe');\r\n\t\tresizeWatcher.className = \"scheduler_container_resize_watcher\";\r\n\t\tresizeWatcher.tabIndex = -1;\r\n\t\tif(scheduler.config.wai_aria_attributes){\r\n\t\t\tresizeWatcher.setAttribute(\"role\", \"none\");\r\n\t\t\tresizeWatcher.setAttribute(\"aria-hidden\", true);\r\n\t\t}\r\n\t\r\n\t\t// in some environments (namely, in SalesForce) iframe.contentWindow is not available\r\n\t\tvar salesforce_environment = !!window[\"Sfdc\"] || !!window[\"$A\"] || window[\"Aura\"];\r\n\t\tif(salesforce_environment){\r\n\t\t\twatchNodeResize(scheduler);\r\n\t\t} else {\r\n\t\t\troot.appendChild(resizeWatcher);\r\n\t\t\tif (resizeWatcher.contentWindow) {\r\n\t\t\t\tlistenWindowResize(scheduler, resizeWatcher.contentWindow);\r\n\t\t\t} else {\r\n\t\t\t\t// if so - ditch the iframe and fallback to listening the main window resize\r\n\t\t\t\troot.removeChild(resizeWatcher);\r\n\t\t\t\tlistenWindowResize(scheduler, window);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\taddResizeListener(scheduler);\r\n\r\n}","class EventHost {\r\n\tconstructor(){\r\n\t\tthis._silent_mode = false;\r\n\t\tthis.listeners = {};\r\n\t}\r\n\t_silentStart(){\r\n\t\tthis._silent_mode = true;\r\n\t}\r\n\t_silentEnd() {\r\n\t\tthis._silent_mode = false;\r\n\t}\r\n}\r\n\r\nconst createEventStorage = function(obj) {\r\n\tlet handlers = {};\r\n\tlet index = 0;\r\n\tconst eventStorage = function(){\r\n\t\tlet combinedResult = true;\r\n\t\tfor(const i in handlers){\r\n\t\t\tconst handlerResult = handlers[i].apply(obj, arguments);\r\n\t\t\tcombinedResult=combinedResult && handlerResult;\r\n\t\t}\r\n\t\treturn combinedResult;\r\n\t};\r\n\teventStorage.addEvent=function(handler, settings){\r\n\t\tif (typeof (handler) == \"function\"){\r\n\t\t\tlet handlerId;\r\n\t\t\tif(settings && settings.id){\r\n\t\t\t\thandlerId = settings.id;\r\n\t\t\t}else{\r\n\t\t\t\thandlerId = index;\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\r\n\t\t\tif(settings && settings.once){\r\n\t\t\t\tconst originalHandler = handler;\r\n\t\t\t\thandler = function(){\r\n\t\t\t\t\toriginalHandler();\r\n\t\t\t\t\teventStorage.removeEvent(handlerId);\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\thandlers[handlerId] = handler;\r\n\t\t\treturn handlerId;\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\teventStorage.removeEvent=function(id){\r\n\t\tdelete handlers[id];\r\n\t};\r\n\r\n\teventStorage.clear = function(){\r\n\t\thandlers = {};\r\n\t};\r\n\r\n\treturn eventStorage;\r\n};\r\n\r\nfunction makeEventable(obj){\r\n\r\n\tconst eventHost = new EventHost();\r\n\tobj.attachEvent=function(eventName, handler, settings){\r\n\t\teventName = 'ev_'+eventName.toLowerCase();\r\n\t\tif (!eventHost.listeners[eventName]){\r\n\t\t\teventHost.listeners[eventName] = createEventStorage(this);\r\n\t\t}\r\n\r\n\t\tif(settings && settings.thisObject){\r\n\t\t\thandler = handler.bind(settings.thisObject);\r\n\t\t}\r\n\r\n\t\tconst innerId = eventHost.listeners[eventName].addEvent(handler, settings);\r\n\r\n\t\tlet handlerId = (eventName+':'+innerId); //return ID (ev_eventname:1)\r\n\t\tif(settings && settings.id){\r\n\t\t\thandlerId = settings.id;\r\n\t\t}\r\n\t\treturn handlerId;\r\n\t};\r\n\r\n\tobj.attachAll = function(callback){\r\n\t\tthis.attachEvent('listen_all', callback);\r\n\t};\r\n\r\n\tobj.callEvent=function(name, eventArguments){\r\n\t\tif (eventHost._silent_mode) return true;\r\n\r\n\t\tconst handlerName = 'ev_'+name.toLowerCase();\r\n\r\n\t\tconst listeners = eventHost.listeners;\r\n\t\tif (listeners['ev_listen_all']){\r\n\t\t\tlisteners['ev_listen_all'].apply(this, [name].concat(eventArguments));\r\n\t\t}\r\n\r\n\t\tif (listeners[handlerName])\r\n\t\t\treturn listeners[handlerName].apply(this, eventArguments);\r\n\t\treturn true;\r\n\t};\r\n\r\n\tobj.checkEvent=function(name){\r\n\t\tconst listeners = eventHost.listeners;\r\n\t\treturn (!!listeners['ev_'+name.toLowerCase()]);\r\n\t};\r\n\r\n\tobj.detachEvent=function(id){\r\n\t\tif (id){\r\n\t\t\tlet listeners = eventHost.listeners;\r\n\t\t\tfor(const i in listeners){\r\n\t\t\t\tlisteners[i].removeEvent(id); //remove event\r\n\t\t\t}\r\n\r\n\t\t\tconst list = id.split(':');//get EventName and ID\r\n\t\t\tlisteners = eventHost.listeners;\r\n\t\t\tif(list.length === 2){\r\n\t\t\t\tconst eventName = list[0];\r\n\t\t\t\tconst eventId = list[1];\r\n\t\t\t\tif(listeners[eventName]){\r\n\t\t\t\t\tlisteners[eventName].removeEvent(eventId); //remove event\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\tobj.detachAllEvents = function(){\r\n\t\tfor (const name in eventHost.listeners) {\r\n\t\t\teventHost.listeners[name].clear();\r\n\t\t}\r\n\t};\r\n\r\n}\r\n\r\nexport default makeEventable;","\r\nimport nav_bar from \"./nav_bar\";\r\nimport scheduler_resize_listener from \"./scheduler_resize_listener\";\r\nimport eventable from \"../utils/eventable\";\r\n\r\n\r\nexport default function extend(scheduler) {\r\n\r\neventable(scheduler);\r\n\r\nnav_bar(scheduler);\r\n\r\nscheduler._detachDomEvent = function(el, event, handler){\r\n\tif (el.removeEventListener){\r\n\t\tel.removeEventListener(event, handler, false);\r\n\r\n\t}else if (el.detachEvent){\r\n\t\tel.detachEvent(\"on\"+event, handler);\r\n\t}\r\n};\r\n\r\n\r\nscheduler._init_once = function(){\r\n\tscheduler_resize_listener(scheduler);\r\n\r\n\tscheduler._init_once = function(){};\r\n};\r\n\r\nvar layout = {\r\n\t\"navbar\": {\r\n\t\trender: function (config) {\r\n\t\t\treturn scheduler._init_nav_bar(config);\r\n\t\t}\r\n\t},\r\n\t\"header\": {\r\n\t\trender: function (config) {\r\n\t\t\tvar element = document.createElement(\"div\");\r\n\t\t\telement.className = \"dhx_cal_header\";\r\n\t\t\treturn element;\r\n\t\t}\r\n\t},\r\n\t\"dataArea\": {\r\n\t\trender: function (config) {\r\n\t\t\tvar element = document.createElement(\"div\");\r\n\t\t\telement.className = \"dhx_cal_data\";\r\n\t\t\treturn element;\r\n\t\t}\r\n\t},\r\n\t\"html_element\": {\r\n\t\trender: function (config) {\r\n\t\t\treturn config.html;\r\n\t\t}\r\n\t}\r\n};\r\n\r\nfunction hasSchedulerMarkup(element){\r\n\treturn !!(\r\n\t\telement.querySelector(\".dhx_cal_header\") &&\r\n\t\telement.querySelector(\".dhx_cal_data\") &&\r\n\t\telement.querySelector(\".dhx_cal_navline\")\r\n\t\t);\r\n}\r\n\r\nfunction createDefaultHeader(scheduler){\r\n\tvar views = [\r\n\t\t\"day\",\r\n\t\t\"week\",\r\n\t\t\"month\"\r\n\t];\r\n\tvar date = [\r\n\t\t\"date\"\r\n\t];\r\n\tvar nav = [\r\n\t\t\"prev\",\r\n\t\t\"today\",\r\n\t\t\"next\"\r\n\t];\r\n\r\n\tif(scheduler.matrix){\r\n\t\tfor(var i in scheduler.matrix){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\tif(scheduler._props){\r\n\t\tfor(var i in scheduler._props){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\r\n\tif(scheduler._grid && scheduler._grid.names){\r\n\t\tfor(var i in scheduler._grid.names){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\r\n\tvar optionalViews = [\r\n\t\t\"map\",\r\n\t\t\"agenda\",\r\n\t\t\"week_agenda\",\r\n\t\t\"year\"\r\n\t];\r\n\r\n\toptionalViews.forEach(function(viewName){\r\n\t\tif(scheduler[viewName + \"_view\"]){\r\n\t\t\tviews.push(viewName);\r\n\t\t}\r\n\t});\r\n\r\n\treturn views.concat(date).concat(nav);\r\n}\r\n\r\nscheduler.init=function(id,date,mode){\r\n\tif(this.$destroyed){\r\n\t\treturn; // not have errors when try to reinit destroyed scheduler\r\n\t}\r\n\tdate=date||(scheduler._currentDate());\r\n\tmode=mode||\"week\";\r\n\r\n\tif(this._obj){\r\n\t\tthis.unset_actions();\r\n\t}\r\n\r\n\tthis._obj=(typeof id == \"string\")?document.getElementById(id):id;\r\n\tthis.$container = this._obj;\r\n\tthis.$root = this._obj;\r\n\r\n\tif(!this.$container.offsetHeight && this.$container.offsetWidth && this.$container.style.height === \"100%\"){\r\n\t\t// scheduler container has zero height and non-zero width\r\n\t\twindow.console.error(scheduler._commonErrorMessages.collapsedContainer(), this.$container);\r\n\t}\r\n\r\n\tif(this.config.wai_aria_attributes && this.config.wai_aria_application_role){\r\n\t\tthis.$container.setAttribute(\"role\", \"application\");\r\n\t}\r\n\r\n\tif(!this.config.header && !hasSchedulerMarkup(this.$container)){\r\n\t\t// if no header config and no required markup - use the default header\r\n\t\t// so the scheduler could be initialized in an empty div\r\n\t\tthis.config.header = createDefaultHeader(this);\r\n\t\twindow.console.log([// jshint ignore:line\r\n\t\t\t\"Required DOM elements are missing from the scheduler container and **scheduler.config.header** is not specified.\",\r\n\t\t\t\"Using a default header configuration: \",\r\n\t\t\t\"scheduler.config.header = \" + JSON.stringify(this.config.header, null, 2),\r\n\t\t\t\"Check this article for the details: https://docs.dhtmlx.com/scheduler/initialization.html\"\r\n\t\t].join(\"\\n\"));// jshint ignore:line\r\n\t}\r\n\r\n\tif (this.config.header) {\r\n\t\tthis.$container.innerHTML = \"\";\r\n\t\tthis.$container.classList.add(\"dhx_cal_container\");\r\n\t\tif(this.config.header.height){\r\n\t\t\tthis.xy.nav_height = this.config.header.height;\r\n\t\t}\r\n\t\tthis.$container.appendChild(layout.navbar.render(this.config.header));\r\n\t\tthis.$container.appendChild(layout.header.render());\r\n\t\tthis.$container.appendChild(layout.dataArea.render());\r\n\t} else {\r\n\t\t// if no header config provided - make sure scheduler container has all necessary elements\r\n\t\tif(!hasSchedulerMarkup(this.$container)){\r\n\t\t\tthrow new Error([\r\n\t\t\t\t\"Required DOM elements are missing from the scheduler container.\",\r\n\t\t\t\t\"Be sure to either specify them manually in the markup: https://docs.dhtmlx.com/scheduler/initialization.html#initializingschedulerviamarkup\",\r\n\t\t\t\t\"Or to use **scheduler.config.header** setting so they could be created automatically: https://docs.dhtmlx.com/scheduler/initialization.html#initializingschedulerviaheaderconfig\"\r\n\t\t\t].join(\"\\n\"));\r\n\t\t}\r\n\t}\r\n\r\n\tif (this.config.rtl) this.$container.className += \" dhx_cal_container_rtl\";\r\n\r\n\t//hook for terrace skin\r\n\tif (this._skin_init)\r\n\t\tscheduler._skin_init();\r\n\r\n\tscheduler.date.init();\r\n\r\n\tthis._scroll=true;\r\n\r\n\tthis._els=[];\r\n\tthis.get_elements();\r\n\tthis.init_templates();\r\n\tthis.set_actions();\r\n\r\n\tthis._init_once();\r\n\tthis._init_touch_events();\r\n\r\n\tthis.set_sizes();\r\n\tscheduler.callEvent('onSchedulerReady', []);\r\n\tscheduler.$initialized = true;\r\n\tthis.setCurrentView(date,mode);\r\n\r\n};\r\n\r\nscheduler.xy={\r\n\tmin_event_height:20,\r\n\tbar_height: 24,\r\n\tscale_width:50,\r\n\tscroll_width:18,\r\n\tscale_height:20,\r\n\tmonth_scale_height:20,\r\n\tmenu_width:25,\r\n\tmargin_top:0,\r\n\tmargin_left:0,\r\n\teditor_width:140,\r\n\tmonth_head_height:22,\r\n\tevent_header_height: 14\r\n};\r\nscheduler.keys={\r\n\tedit_save:13,\r\n\tedit_cancel:27\r\n};\r\n\r\nscheduler.bind = function bind(functor, object){\r\n\tif(functor.bind)\r\n\t\treturn functor.bind(object);\r\n\telse\r\n\t\treturn function(){ return functor.apply(object,arguments); };\r\n};\r\n\r\nscheduler.set_sizes=function(){\r\n\r\n\tvar w = this._x = this._obj.clientWidth-this.xy.margin_left;\r\n\r\n\t//not-table mode always has scroll - need to be fixed in future\r\n\tvar scale_x=this._table_view?0:(this.xy.scale_width+this.xy.scroll_width);\r\n\r\n\tvar materialScalePlaceholder = this.$container.querySelector(\".dhx_cal_scale_placeholder\");\r\n\tif(scheduler._is_material_skin()){\r\n\t\tif(!materialScalePlaceholder) {\r\n\t\t\tmaterialScalePlaceholder = document.createElement(\"div\");\r\n\t\t\tmaterialScalePlaceholder.className = \"dhx_cal_scale_placeholder\";\r\n\t\t\tthis.$container.insertBefore(materialScalePlaceholder, this._els[\"dhx_cal_header\"][0]);\r\n\t\t}\r\n\t\tmaterialScalePlaceholder.style.display = \"block\";\r\n\r\n\t\tthis.set_xy(materialScalePlaceholder,w,this.xy.scale_height + 1,0, this._els[\"dhx_cal_header\"][0].offsetTop);\r\n\r\n\t}else{\r\n\t\tif(materialScalePlaceholder){\r\n\t\t\tmaterialScalePlaceholder.parentNode.removeChild(materialScalePlaceholder);\r\n\t\t}\r\n\t}\r\n\r\n\tif (this._lightbox) {\r\n\t\tif (scheduler.$container.offsetWidth < 1200) {\r\n\t\t} else {\r\n\t\t\tthis._setLbPosition(document.querySelector(\".dhx_cal_light\"));\r\n\t\t}\r\n\t}\r\n\r\n\tthis._data_width = w-scale_x;\r\n\r\n\tthis._els[\"dhx_cal_navline\"][0].style.width = w + \"px\";\r\n\tconst header = this._els[\"dhx_cal_header\"][0];\r\n\tthis.set_xy(header, this._data_width, this.xy.scale_height);\r\n\t// this._els[\"dhx_cal_header\"][0].style.marginLeft = `${scheduler.xy.scale_width}px`;\r\n\theader.style.left = ``;\r\n\theader.style.right = ``;\r\n\tif(!this._table_view){\r\n\t\tif(this.config.rtl){\r\n\t\t\theader.style.right = `${this.xy.scale_width}px`;\r\n\t\t}else{\r\n\t\t\theader.style.left = `${this.xy.scale_width}px`;\r\n\t\t}\r\n\t} else {\r\n\t\tif(!this.config.rtl){\r\n\t\t\theader.style.left = `-1px`;\r\n\t\t} else {\r\n\t\t\theader.style.right = `-1px`;\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.set_xy=function(node,w,h,x,y){\r\n\tfunction prepareValue(val){\r\n\t\tlet prepared = val;\r\n\t\tif(!isNaN(Number(prepared))){\r\n\t\t\tprepared = Math.max(0,prepared) + \"px\";\r\n\t\t}\r\n\t\treturn prepared;\r\n\t}\r\n\r\n\tvar direction = 'left';\r\n\r\n\tif(w !== undefined) {\r\n\t\tnode.style.width = prepareValue(w);\r\n\t}\r\n\r\n\tif(h !== undefined){\r\n\t\tnode.style.height = prepareValue(h);\r\n\t}\r\n\r\n\tif (arguments.length>3){\r\n\r\n\t\tif(x !== undefined){\r\n\t\t\tif (this.config.rtl) direction = 'right';\r\n\t\t\tnode.style[direction]=x+\"px\";\r\n\t\t}\r\n\t\tif(y !== undefined){\r\n\t\t\tnode.style.top=y+\"px\";\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.get_elements=function(){\r\n\t//get all child elements as named hash\r\n\tvar els=this._obj.getElementsByTagName(\"DIV\");\r\n\tfor (var i=0; i < els.length; i++){\r\n\t\tvar class_name= scheduler._getClassName(els[i]);\r\n\t\tvar attr_value = els[i].getAttribute(\"data-tab\") || els[i].getAttribute(\"name\") || \"\";\r\n\t\tif (class_name) class_name = class_name.split(\" \")[0];\r\n\t\tif (!this._els[class_name]) this._els[class_name]=[];\r\n\t\tthis._els[class_name].push(els[i]);\r\n\r\n\t\t//check if name need to be changed\r\n\t\t// scheduler.locale.labels[attr_value+\"_tab\"] - to fix getting labels for data-tab\r\n\t\tvar label = scheduler.locale.labels[attr_value+\"_tab\"] || scheduler.locale.labels[attr_value||class_name];\r\n\t\tif (typeof label !== \"string\" && attr_value && !els[i].innerHTML)\r\n\t\t\tlabel = attr_value.split(\"_\")[0];\r\n\t\tif (label) {\r\n\t\t\tthis._waiAria.labelAttr(els[i], label);\r\n\t\t\tels[i].innerHTML = label;\r\n\t\t}\r\n\t}\r\n};\r\n\r\n\r\nvar domEventsScope = scheduler._createDomEventScope();\r\n\r\nscheduler.unset_actions = function(){\r\n\tdomEventsScope.detachAll();\r\n\r\n};\r\n\r\nscheduler.set_actions=function(){\r\n\tfor (var a in this._els){\r\n\t\tif (this._click[a]){\r\n\t\t\tfor (var i=0; i < this._els[a].length; i++){\r\n\t\t\t\tconst element = this._els[a][i];\r\n\t\t\t\tconst handler = this._click[a].bind(element);\r\n\t\t\t\tdomEventsScope.attach(element, \"click\", handler);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tdomEventsScope.attach(this._obj, \"selectstart\", function(e){\r\n\t\te.preventDefault();\r\n\t\treturn false;\r\n\t});\r\n\t//this._obj.onselectstart=function(e){ return false; };\r\n\tdomEventsScope.attach(this._obj, \"mousemove\", function(e){\r\n\t\tif (!scheduler._temp_touch_block)\r\n\t\t\tscheduler._on_mouse_move(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"mousedown\", function(e){\r\n\t\tif (!scheduler._ignore_next_click)\r\n\t\t\tscheduler._on_mouse_down(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"mouseup\", function(e){\r\n\t\tif (!scheduler._ignore_next_click)\r\n\t\t\tscheduler._on_mouse_up(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"dblclick\", function(e){\r\n\t\tscheduler._on_dbl_click(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"contextmenu\", function(e) {\r\n\t\tif(scheduler.checkEvent(\"onContextMenu\")){\r\n\t\t\t// block the default browser context menu \r\n\t\t\te.preventDefault();\r\n\t\t}\r\n\t\tvar ev = e;\r\n\t\tvar src = ev.target||ev.srcElement;\r\n\t\tvar returnValue = scheduler.callEvent(\"onContextMenu\", [scheduler._locate_event(src), ev]);\r\n\t\treturn returnValue;\r\n\t});\r\n};\r\nscheduler.select=function(id){\r\n\tif (this._select_id==id) return;\r\n\tscheduler._close_not_saved();\r\n\tthis.editStop(false);\r\n\tif(this._select_id){\r\n\t\tthis.unselect();\r\n\t}\r\n\tthis._select_id = id;\r\n\tthis.updateEvent(id);\r\n\tthis.callEvent(\"onEventSelected\", [id]);\r\n};\r\nscheduler.unselect=function(id){\r\n\tif (id && id!=this._select_id) return;\r\n\tvar t=this._select_id;\r\n\tthis._select_id = null;\r\n\tif (t && this.getEvent(t)) this.updateEvent(t);\r\n\tthis.callEvent(\"onEventUnselected\", [t]);\r\n};\r\nscheduler.getState=function(){\r\n\treturn {\r\n\t\tmode: this._mode,\r\n\t\tdate: new Date(this._date),\r\n\t\tmin_date: new Date(this._min_date),\r\n\t\tmax_date: new Date(this._max_date),\r\n\t\teditor_id: this._edit_id,\r\n\t\tlightbox_id: this._lightbox_id,\r\n\t\tnew_event: this._new_event,\r\n\t\tselect_id: this._select_id,\r\n\t\texpanded: this.expanded,\r\n\t\tdrag_id: this._drag_id,\r\n\t\tdrag_mode: this._drag_mode\r\n\t};\r\n};\r\nscheduler._click={\r\n\tdhx_cal_data:function(e){\r\n\t\t//in case of touch disable click processing\r\n\t\tif (scheduler._ignore_next_click){\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tvar trg = e.target;\r\n\t\tvar id = scheduler._locate_event(trg);\r\n\r\n\t\tif (!id) {\r\n\t\t\tscheduler.callEvent(\"onEmptyClick\",[scheduler.getActionData(e).date, e]);\r\n\t\t} else {\r\n\t\t\tif ( !scheduler.callEvent(\"onClick\",[id,e]) || scheduler.config.readonly ) return;\r\n\t\t}\r\n\r\n\t\tif (id && scheduler.config.select) {\r\n\r\n\t\t\tscheduler.select(id);\r\n\t\t\tconst icon = trg.closest(\".dhx_menu_icon\");\r\n\r\n\t\t\tvar mask = scheduler._getClassName(icon);\r\n\t\t\tif (mask.indexOf(\"_icon\")!=-1)\r\n\t\t\t\tscheduler._click.buttons[mask.split(\" \")[1].replace(\"icon_\",\"\")](id);\r\n\t\t} else{\r\n\t\t\tscheduler._close_not_saved();\r\n\t\t\tif (scheduler.getState().select_id && new Date().valueOf()-(scheduler._new_event||0) > 500){\r\n\t\t\t\tscheduler.unselect();\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tdhx_cal_prev_button:function(){\r\n\t\tscheduler._click.dhx_cal_next_button(0,-1);\r\n\t},\r\n\tdhx_cal_next_button:function(dummy,step){\r\n\t\tvar def_step = 1;\r\n\t\tif (scheduler.config.rtl){\r\n\t\t\tstep = -step;\r\n\t\t\tdef_step = -def_step;\r\n\t\t}\r\n\t\tscheduler.setCurrentView(scheduler.date.add( //next line changes scheduler._date , but seems it has not side-effects\r\n\t\t\tscheduler.date[scheduler._mode+\"_start\"](new Date(scheduler._date)),(step||def_step),scheduler._mode));\r\n\t},\r\n\tdhx_cal_today_button:function(){\r\n\t\tif (scheduler.callEvent(\"onBeforeTodayDisplayed\", [])) {\r\n\t\t\tscheduler.setCurrentView(scheduler._currentDate());\r\n\t\t}\r\n\t},\r\n\tdhx_cal_tab:function(){\r\n\t\tvar name = this.getAttribute(\"data-tab\");\r\n\t\tvar deprecated_name = this.getAttribute(\"name\");\r\n\t\tvar mode = name || deprecated_name.substring(0, deprecated_name.search(\"_tab\"));\r\n\t\tscheduler.setCurrentView(scheduler._date,mode);\r\n\t},\r\n\tbuttons:{\r\n\t\t\"delete\":function(id){\r\n\t\t\tvar c = scheduler.locale.labels.confirm_deleting;\r\n\t\t\tscheduler._dhtmlx_confirm({message: c, title: scheduler.locale.labels.title_confirm_deleting, callback:function(){ scheduler.deleteEvent(id); },\r\n\t\t\tconfig: {ok: scheduler.locale.labels.icon_delete}\r\n\t\t});\r\n\t\t},\r\n\t\tedit:function(id){ scheduler.edit(id); },\r\n\t\tsave:function(id){ scheduler.editStop(true); },\r\n\t\tdetails:function(id){ scheduler.showLightbox(id); },\r\n\t\tform:function(id){ scheduler.showLightbox(id); },\r\n\t\tcancel:function(id){ scheduler.editStop(false); }\r\n\t}\r\n};\r\nscheduler._dhtmlx_confirm = function({message, title, callback, config}) {\r\n\tif (!message)\r\n\t\treturn callback();\r\n\r\n\tconfig = config || {};\r\n\tvar opts = { ...config, text: message };\r\n\tif (title)\r\n\t\topts.title = title;\r\n\tif (callback) {\r\n\t\topts.callback = function(result) {\r\n\t\t\tif (result)\r\n\t\t\t\tcallback();\r\n\t\t};\r\n\t}\r\n\tscheduler.confirm(opts);\r\n};\r\nscheduler.addEventNow=function(start,end,e){\r\n\tvar base = {};\r\n\tif (scheduler._isObject(start) && !scheduler._isDate(start)){\r\n\t\tbase = start;\r\n\t\tstart = null;\r\n\t}\r\n\r\n\tvar d = (this.config.event_duration||this.config.time_step)*60000;\r\n\tif (!start) start = base.start_date||Math.round((scheduler._currentDate()).valueOf()/d)*d;\r\n\tvar start_date = new Date(start);\r\n\tif (!end){\r\n\t\tvar start_hour = this.config.first_hour;\r\n\t\tif (start_hour > start_date.getHours()){\r\n\t\t\tstart_date.setHours(start_hour);\r\n\t\t\tstart = start_date.valueOf();\r\n\t\t}\r\n\t\tend = start.valueOf()+d;\r\n\t}\r\n\tvar end_date = new Date(end);\r\n\r\n\t// scheduler.addEventNow(new Date(), new Date()) + collision though get_visible events defect (such event was not retrieved)\r\n\tif(start_date.valueOf() == end_date.valueOf())\r\n\t\tend_date.setTime(end_date.valueOf()+d);\r\n\tbase.start_date = base.start_date||start_date;\r\n\tbase.end_date = base.end_date||end_date;\r\n\tbase.text = base.text||this.locale.labels.new_event;\r\n\tbase.id = this._drag_id = base.id || this.uid();\r\n\tthis._drag_mode=\"new-size\";\r\n\tthis._loading=true;\r\n\tvar eventId = this.addEvent(base);\r\n\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\tthis._loading=false;\r\n\r\n\tthis._drag_event={}; //dummy , to trigger correct event updating logic\r\n\tthis._on_mouse_up(e);\r\n\treturn eventId;\r\n};\r\nscheduler._on_dbl_click=function(e,src){\r\n\tsrc = src||(e.target||e.srcElement);\r\n\tif (this.config.readonly) return;\r\n\tvar name = scheduler._getClassName(src).split(\" \")[0];\r\n\tswitch(name){\r\n\t\tcase \"dhx_scale_holder\":\r\n\t\tcase \"dhx_scale_holder_now\":\r\n\t\tcase \"dhx_month_body\":\r\n\t\tcase \"dhx_wa_day_data\":\r\n\t\t\tif (!scheduler.config.dblclick_create) break;\r\n\t\t\tthis.addEventNow(this.getActionData(e).date,null,e);\r\n\t\t\tbreak;\r\n\t\tcase \"dhx_cal_event\":\r\n\t\tcase \"dhx_wa_ev_body\":\r\n\t\tcase \"dhx_agenda_line\":\r\n\t\tcase \"dhx_cal_agenda_event_line\":\r\n\t\tcase \"dhx_grid_event\":\r\n\t\tcase \"dhx_cal_event_line\":\r\n\t\tcase \"dhx_cal_event_clear\":\r\n\t\t\tvar id = this._locate_event(src);\r\n\t\t\tif (!this.callEvent(\"onDblClick\",[id,e])) return;\r\n\t\t\tif (this.config.details_on_dblclick || this._table_view || !this.getEvent(id)._timed || !this.config.select)\r\n\t\t\t\tthis.showLightbox(id);\r\n\t\t\telse\r\n\t\t\t\tthis.edit(id);\r\n\t\t\tbreak;\r\n\t\tcase \"dhx_time_block\":\r\n\t\tcase \"dhx_cal_container\":\r\n\t\t\treturn;\r\n\t\tdefault:\r\n\t\t\tvar t = this[\"dblclick_\"+name];\r\n\t\t\tif (t) {\r\n\t\t\t\tt.call(this,e);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif (src.parentNode && src != this)\r\n\t\t\t\t\treturn scheduler._on_dbl_click(e,src.parentNode);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t}\r\n};\r\n//column index by mouse x-coordinate\r\nscheduler._get_column_index = function(x_pos){\r\n\tvar column = 0;\r\n\tif (this._cols){\r\n\t\tvar width = 0;\r\n\t\tvar i = 0;\r\n\t\twhile (width + this._cols[i] < x_pos && i < this._cols.length){\r\n\t\t\twidth += this._cols[i];\r\n\t\t\ti++;\r\n\t\t}\r\n\t\tcolumn = i + (this._cols[i] ? ((x_pos - width)/ this._cols[i]) : 0);\r\n\r\n\t\tif (this._ignores){\r\n\t\t\tif(column >= this._cols.length){\r\n\t\t\t\twhile(column >= 1 && this._ignores[Math.floor(column)]){\r\n\t\t\t\t\tcolumn--;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n\treturn column;\r\n};\r\n\r\n//transform mouse coordinates to day-time indexes of week based view\r\nscheduler._week_indexes_from_pos = function(pos){\r\n\t//\"get position\" can be invoked before columns are loaded into the units view(e.g. by onMouseMove handler in key_nav.js)\r\n\tif(!this._cols){\r\n\t\treturn pos;\r\n\t}else{\r\n\t\tvar column = this._get_column_index(pos.x);\r\n\r\n\t\tpos.x=Math.min(this._cols.length-1, Math.max(0,Math.ceil(column)-1));\r\n\t\tpos.y=Math.max(0,Math.ceil(pos.y*60/(this.config.time_step*this.config.hour_size_px))-1)+this.config.first_hour*(60/this.config.time_step);\r\n\t\treturn pos;\r\n\t}\r\n};\r\n\r\nscheduler._mouse_coords=function(ev){\r\n\tvar pos;\r\n\tvar b=document.body;\r\n\tvar d = document.documentElement;\r\n\tif (!this.$env.isIE && (ev.pageX || ev.pageY))\r\n\t\tpos={x:ev.pageX, y:ev.pageY};\r\n\telse pos={\r\n\t\tx:ev.clientX + (b.scrollLeft||d.scrollLeft||0) - b.clientLeft,\r\n\t\ty:ev.clientY + (b.scrollTop||d.scrollTop||0) - b.clientTop\r\n\t};\r\n\t//apply layout\r\n\tif (this.config.rtl && this._colsS) {\r\n\t\tpos.x = this.$container.querySelector(\".dhx_cal_data\").offsetWidth - pos.x;\r\n\t\tpos.x += this.$domHelpers.getAbsoluteLeft(this._obj);\r\n\t\tif (this._mode !== \"month\") {\r\n\t\t\tpos.x -= this.xy.scale_width;\r\n\t\t}\r\n\t} else {\r\n\t\tpos.x-=this.$domHelpers.getAbsoluteLeft(this._obj)+(this._table_view?0:this.xy.scale_width);\r\n\t}\r\n\r\n\tvar dataArea = this.$container.querySelector(\".dhx_cal_data\");\r\n\t//pos.y-=this.$domHelpers.getAbsoluteTop(this._obj)+this.xy.nav_height+(this._dy_shift||0)+this.xy.scale_height-this._els[\"dhx_cal_data\"][0].scrollTop;\r\n\tpos.y-=this.$domHelpers.getAbsoluteTop(dataArea)-this._els[\"dhx_cal_data\"][0].scrollTop;\r\n\tpos.ev = ev;\r\n\tvar handler = this[\"mouse_\"+this._mode];\r\n\tif (handler){\r\n\t\tpos = handler.call(this,pos);\r\n\t}else{\r\n\t\t//transform to date\r\n\t\tif (!this._table_view) {\r\n\t\t\tpos = this._week_indexes_from_pos(pos);\r\n\t\t} else {\r\n\t\t\tvar column = this._get_column_index(pos.x);\r\n\t\t\tif (!this._cols || !this._colsS) // agenda/map views\r\n\t\t\t\treturn pos;\r\n\t\t\tvar dy=0;\r\n\t\t\tfor (dy=1; dy < this._colsS.heights.length; dy++)\r\n\t\t\t\tif (this._colsS.heights[dy]>pos.y) break;\r\n\r\n\t\t\tpos.y=Math.ceil( (Math.max(0, column)+Math.max(0,dy-1)*7)*24*60/this.config.time_step );\r\n\r\n\t\t\tif (scheduler._drag_mode || this._mode == \"month\")\r\n\t\t\t\tpos.y=(Math.max(0,Math.ceil(column)-1)+Math.max(0,dy-1)*7)*24*60/this.config.time_step;\r\n\r\n\t\t\t//we care about ignored days only during event moving in month view\r\n\t\t\tif (this._drag_mode == \"move\"){\r\n\t\t\t\tif (scheduler._ignores_detected && scheduler.config.preserve_length){\r\n\t\t\t\t\tpos._ignores = true;\r\n\t\t\t\t\t//get real lengtn of event\r\n\t\t\t\t\tif (!this._drag_event._event_length)\r\n\t\t\t\t\t\tthis._drag_event._event_length = this._get_real_event_length(this._drag_event.start_date, this._drag_event.end_date, { x_step:1, x_unit:\"day\"});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tpos.x=0;\r\n\t\t}\r\n\t}\r\n\tpos.timestamp = +new Date();\r\n\treturn pos;\r\n};\r\nscheduler._close_not_saved=function(){\r\n\tif (new Date().valueOf()-(scheduler._new_event||0) > 500 && scheduler._edit_id){\r\n\t\tvar c=scheduler.locale.labels.confirm_closing;\r\n\r\n\t\tscheduler._dhtmlx_confirm({message: c, title: scheduler.locale.labels.title_confirm_closing, callback: function() { scheduler.editStop(scheduler.config.positive_closing); }});\r\n\t\tif(c){\r\n\t\t\tthis._drag_id = this._drag_pos = this._drag_mode = null;\r\n\t\t}\r\n\t}\r\n};\r\nscheduler._correct_shift=function(start, back){\r\n\treturn start-=((new Date(scheduler._min_date)).getTimezoneOffset()-(new Date(start)).getTimezoneOffset())*60000*(back?-1:1);\r\n};\r\n\r\nscheduler._is_pos_changed = function(old_pos, new_pos){\r\n\tfunction diff(old_val, new_val, acc){\r\n\t\treturn !!(Math.abs(old_val - new_val) > acc);\r\n\t}\r\n\r\n\tif(!(old_pos && this._drag_pos)){\r\n\t\treturn true;\r\n\t}\r\n\tvar delay = 100,\r\n\t\td_pos = 5;\r\n\r\n\t// start drag only if passed some time since mouse down, or if mouse position changed sufficiently\r\n\treturn !!(this._drag_pos.has_moved || !this._drag_pos.timestamp || (new_pos.timestamp - this._drag_pos.timestamp > delay) || diff(old_pos.ev.clientX, new_pos.ev.clientX, d_pos) || diff(old_pos.ev.clientY, new_pos.ev.clientY, d_pos));\r\n};\r\n\r\nscheduler._correct_drag_start_date = function(start){\r\n\tvar obj;\r\n\tif (scheduler.matrix)\r\n\t\tobj = scheduler.matrix[scheduler._mode];\r\n\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\tstart = new Date(start);\r\n\tvar len = 1;\r\n\tif(obj._start_correction || obj._end_correction)\r\n\t\tlen = (obj.last_hour||0)*60 - (start.getHours()*60+start.getMinutes()) || 1;\r\n\r\n\treturn start*1 + (scheduler._get_fictional_event_length(start, len, obj) - len);\r\n};\r\nscheduler._correct_drag_end_date = function(start, duration){\r\n\tvar obj;\r\n\tif (scheduler.matrix)\r\n\t\tobj = scheduler.matrix[scheduler._mode];\r\n\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\tvar end = start*1 + scheduler._get_fictional_event_length(start, duration, obj);\r\n\treturn new Date(end*1 - (scheduler._get_fictional_event_length(end, -1, obj, -1) + 1));\r\n};\r\n\r\nscheduler._on_mouse_move=function(e){\r\n\tif (this._drag_mode){\r\n\t\tvar pos=this._mouse_coords(e);\r\n\t\tif (this._is_pos_changed(this._drag_pos, pos)){\r\n\t\t\tvar start, end;\r\n\t\t\tif (this._edit_id!=this._drag_id)\r\n\t\t\t\tthis._close_not_saved();\r\n\r\n\t\t\tif(!this._drag_mode)\r\n\t\t\t\treturn;\r\n\r\n\t\t\tvar mousedownPos = null;\r\n\t\t\tif(this._drag_pos && !this._drag_pos.has_moved){\r\n\t\t\t\tmousedownPos = this._drag_pos;\r\n\t\t\t\tmousedownPos.has_moved = true;\r\n\t\t\t}\r\n\r\n\t\t\tthis._drag_pos = pos;\r\n\r\n\t\t\tthis._drag_pos.has_moved = true;\r\n\r\n\t\t\tif (this._drag_mode==\"create\"){\r\n\r\n\t\t\t\t// use mouse down position as a starting point for drag-create\r\n\t\t\t\tif(mousedownPos){\r\n\t\t\t\t\tpos = mousedownPos;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis._close_not_saved();\r\n\t\t\t\tthis.unselect(this._select_id);\r\n\t\t\t\tthis._loading=true; //will be ignored by dataprocessor\r\n\r\n\t\t\t\tstart = this._get_date_from_pos(pos).valueOf();\r\n\r\n\t\t\t\tif (!this._drag_start) {\r\n\t\t\t\t\tvar res = this.callEvent(\"onBeforeEventCreated\", [e, this._drag_id]);\r\n\t\t\t\t\tif (!res){\r\n\t\t\t\t\t\tthis._loading=false;\r\n\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis._loading=false;\r\n\t\t\t\t\tthis._drag_start=start;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tend = start;\r\n\t\t\t\tif (end == this._drag_start) {\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar start_date = new Date(this._drag_start);\r\n\t\t\t\tvar end_date = new Date(end);\r\n\t\t\t\tif ( (this._mode == \"day\" || this._mode == \"week\") &&\r\n\t\t\t\t\t(start_date.getHours() == end_date.getHours() &&\r\n\t\t\t\t\tstart_date.getMinutes() == end_date.getMinutes()) ) {\r\n\t\t\t\t\t\tend_date = new Date(this._drag_start+1000);\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\tthis._drag_id=this.uid();\r\n\t\t\t\tthis.addEvent(start_date, end_date, this.locale.labels.new_event, this._drag_id, pos.fields);\r\n\r\n\t\t\t\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\t\t\t\tthis._loading=false;\r\n\t\t\t\tthis._drag_mode=\"new-size\";\r\n\r\n\t\t\t}\r\n\r\n\t\t\tvar timeStep = this.config.time_step;\r\n\t\t\tvar ev=this.getEvent(this._drag_id);\r\n\t\t\tvar obj;\r\n\t\t\tif (scheduler.matrix)\r\n\t\t\t\tobj = scheduler.matrix[scheduler._mode];\r\n\t\t\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\t\t\tif (this._drag_mode==\"move\"){\r\n\t\t\t\tstart = this._min_date.valueOf()+(pos.y*this.config.time_step+pos.x*24*60)*60000;\r\n\t\t\t\tif (!pos.custom && this._table_view) {\r\n\t\t\t\t\tstart += this.date.time_part(ev.start_date) * 1000;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!this._table_view && this._dragEventBody && this._drag_event._move_event_shift === undefined) {\r\n\t\t\t\t\tthis._drag_event._move_event_shift = start - ev.start_date;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (this._drag_event._move_event_shift) {\r\n\t\t\t\t\tstart -= this._drag_event._move_event_shift;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tstart = this._correct_shift(start);\r\n\r\n\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view && obj){\r\n\r\n\t\t\t\t\tstart = scheduler._correct_drag_start_date(start);\r\n\t\t\t\t\tend = scheduler._correct_drag_end_date(start,this._drag_event._event_length);\r\n\r\n\t\t\t\t} else\r\n\t\t\t\t\tend = ev.end_date.valueOf()-(ev.start_date.valueOf()-start);\r\n\t\t\t} else { // resize\r\n\t\t\t\tstart = ev.start_date.valueOf();\r\n\t\t\t\tend = ev.end_date.valueOf();\r\n\t\t\t\tif (this._table_view) {\r\n\t\t\t\t\tvar resize_date = this._min_date.valueOf()+pos.y*this.config.time_step*60000 + (pos.custom?0:24*60*60000);\r\n\t\t\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\t\t\tresize_date = this._correct_shift(resize_date, false);\r\n\t\t\t\t\t\tif( this._drag_from_start ) {\r\n\t\t\t\t\t\t\tvar day = 24*60*60000;\r\n\t\t\t\t\t\t\tif( resize_date <= scheduler.date.date_part(new Date(end+day-1)).valueOf() ) // to get end time as 23:59:59 and then the day start\r\n\t\t\t\t\t\t\t\tstart = resize_date - day;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tend = resize_date;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif(this.config.preserve_length) {\r\n\t\t\t\t\t\t\tif (pos.resize_from_start) {\r\n\t\t\t\t\t\t\t\tstart = scheduler._correct_drag_start_date(resize_date);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tend = scheduler._correct_drag_end_date(resize_date, 0);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tif (pos.resize_from_start) {\r\n\t\t\t\t\t\t\t\tstart = resize_date;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tend = resize_date;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvar end_day_start = this.date.date_part(new Date(ev.end_date.valueOf() - 1)).valueOf();\r\n\t\t\t\t\tvar end_day_date = new Date(end_day_start);\r\n\t\t\t\t\tvar firstHour = this.config.first_hour;\r\n\t\t\t\t\tvar lastHour = this.config.last_hour;\r\n\t\t\t\t\tvar maxY = (lastHour - firstHour) * (60/timeStep);\r\n\r\n\t\t\t\t\tthis.config.time_step = 1;\r\n\t\t\t\t\tvar precisePos = this._mouse_coords(e);\r\n\t\t\t\t\tthis.config.time_step = timeStep;\r\n\r\n\t\t\t\t\tvar minDate = pos.y*timeStep*60000;\r\n\t\t\t\t\tvar maxDate = Math.min(pos.y + 1, maxY)*timeStep*60000;\r\n\t\t\t\t\tvar preciseDate = precisePos.y*60000;\r\n\r\n\t\t\t\t\t// rounding end date to the closest time step\r\n\t\t\t\t\tif(Math.abs(minDate - preciseDate) > Math.abs(maxDate - preciseDate)){\r\n\t\t\t\t\t\tend = end_day_start + maxDate;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tend = end_day_start + minDate;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = end + ((new Date(end)).getTimezoneOffset() - end_day_date.getTimezoneOffset()) * 60000;\r\n\t\t\t\t\tthis._els[\"dhx_cal_data\"][0].style.cursor=\"s-resize\";\r\n\t\t\t\t\tif (this._mode == \"week\" || this._mode == \"day\")\r\n\t\t\t\t\t\tend = this._correct_shift(end);\r\n\t\t\t\t}\r\n\t\t\t\tif (this._drag_mode == \"new-size\") {\r\n\t\t\t\t\tif (end <= this._drag_start){\r\n\t\t\t\t\t\tvar shift = pos.shift||((this._table_view && !pos.custom)?24*60*60000:0);\r\n\t\t\t\t\t\tstart = end-(pos.shift?0:shift);\r\n\t\t\t\t\t\tend = this._drag_start+(shift||(timeStep*60000));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tstart = this._drag_start;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (end<=start)\r\n\t\t\t\t\t\tend=start+timeStep*60000;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar new_end = new Date(end-1);\r\n\t\t\tvar new_start = new Date(start);\r\n\t\t\t//deny drag out of visible scheduler scale in timeline view\r\n\t\t\tif(this._drag_mode==\"move\" && scheduler.config.limit_drag_out &&\r\n\t\t\t\t(+new_start < +scheduler._min_date || +end > +scheduler._max_date)){\r\n\r\n\t\t\t\tif(+ev.start_date < +scheduler._min_date || +ev.end_date > +scheduler._max_date){\r\n\t\t\t\t\t// not move event if it's already outside time scale\r\n\t\t\t\t\tnew_start = new Date(ev.start_date);\r\n\t\t\t\t\tend = new Date(ev.end_date);\r\n\t\t\t\t}else{\r\n\r\n\t\t\t\t\tvar duration = end - new_start;\r\n\r\n\t\t\t\t\tif(+new_start < +scheduler._min_date){\r\n\t\t\t\t\t\tnew_start = new Date(scheduler._min_date);\r\n\t\t\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view){\r\n\t\t\t\t\t\t\tnew_start = new Date(scheduler._correct_drag_start_date(new_start));\r\n\t\t\t\t\t\t\tif(obj._start_correction)\r\n\t\t\t\t\t\t\t\tnew_start = new Date(new_start.valueOf() + obj._start_correction);\r\n\t\t\t\t\t\t\tend = new Date(new_start*1 + this._get_fictional_event_length(new_start, this._drag_event._event_length, obj));\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tend = new Date(+new_start + duration);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tend = new Date(scheduler._max_date);\r\n\r\n\t\t\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view){\r\n\t\t\t\t\t\t\tif(obj._end_correction)\r\n\t\t\t\t\t\t\t\tend = new Date(end.valueOf() - obj._end_correction);\r\n\t\t\t\t\t\t\tend = new Date(end*1 - this._get_fictional_event_length(end, 0, obj, true));\r\n\t\t\t\t\t\t\tnew_start = new Date(end*1 - this._get_fictional_event_length(end, this._drag_event._event_length, obj, true));\r\n\t\t\t\t\t\t\tif(this._ignores_detected){\r\n\t\t\t\t\t\t\t\tnew_start = scheduler.date.add(new_start, obj.x_step, obj.x_unit);\r\n\t\t\t\t\t\t\t\tend = new Date(end*1 - this._get_fictional_event_length(end, 0, obj, true));\r\n\t\t\t\t\t\t\t\tend = scheduler.date.add(end, obj.x_step, obj.x_unit);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tnew_start = new Date(+end - duration);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t\tvar new_end = new Date(end-1);\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\t// fix event dates when resized to bottom of the column (day/week views)\r\n\t\t\tif(!this._table_view && this._dragEventBody &&\r\n\t\t\t\t!scheduler.config.all_timed &&\r\n\t\t\t\t((!scheduler._get_section_view() && pos.x != this._get_event_sday({start_date: new Date(start), end_date:new Date(start)})) || new Date(start).getHours() < this.config.first_hour)){\r\n\t\t\t\tvar duration = end - new_start;\r\n\t\t\t\tif (this._drag_mode == \"move\") {\r\n\t\t\t\t\tvar day = this._min_date.valueOf() + (pos.x * 24 * 60) * 60000;\r\n\t\t\t\t\tnew_start = new Date(day);\r\n\t\t\t\t\tnew_start.setHours(this.config.first_hour);\r\n\t\t\t\t\tend = new Date(new_start.valueOf() + duration);\r\n\t\t\t\t\tnew_end = new Date(end-1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// fix event dates when resized to bottom of the column (day/week views)\r\n\t\t\tif(!this._table_view &&\r\n\t\t\t\t!scheduler.config.all_timed &&\r\n\t\t\t\t((!scheduler.getView() && pos.x != this._get_event_sday({start_date: new Date(end), end_date:new Date(end)})) || new Date(end).getHours() >= this.config.last_hour)){\r\n\t\t\t\tvar duration = end - new_start;\r\n\t\t\t\tvar day = this._min_date.valueOf()+(pos.x*24*60)*60000;\r\n\t\t\t\tend = scheduler.date.date_part(new Date(day));\r\n\t\t\t\tend.setHours(this.config.last_hour);\r\n\t\t\t\tnew_end = new Date(end-1);\r\n\t\t\t\tif(this._drag_mode == \"move\"){\r\n\t\t\t\t\tnew_start = new Date(+end - duration);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//prevent out-of-borders situation for day|week view\r\n\t\t\tif ( this._table_view || (new_end.getDate()==new_start.getDate() && new_end.getHours()=ed)\r\n\t\t\t\tcls += ' dhx_after';\r\n\t\t\telse if (sd.valueOf()==cd.valueOf())\r\n\t\t\t\tcls += ' dhx_now';\r\n\r\n\t\t\tif (this._ignores_detected && this._ignores[j]){\r\n\t\t\t\tcls += \" dhx_scale_ignore\";\r\n\t\t\t}\r\n\r\n\t\t\tcell.className = cls + \" \" + this.templates.month_date_class(sd, cd);\r\n\r\n\t\t\tcell.setAttribute(\"data-cell-date\", scheduler.templates.format_date(sd));\r\n\t\t\tvar body_class = \"dhx_month_body\";\r\n\t\t\tvar head_class = \"dhx_month_head\";\r\n\t\t\tif (j === 0 && this.config.left_border) {\r\n\t\t\t\tbody_class += \" dhx_month_body_border\";\r\n\t\t\t\thead_class += \" dhx_month_head_border\";\r\n\t\t\t}\r\n\t\t\tif (!this._ignores_detected || !this._ignores[j]){\r\n\t\t\t\tcell.style.width = tdwidths[j];\r\n\t\t\t\tthis._waiAria.monthCellAttr(cell, sd);\r\n\r\n\t\t\t\tvar cellHead = document.createElement(\"div\");\r\n\t\t\t\tcellHead.style.height = scheduler.xy.month_head_height + \"px\";\r\n\t\t\t\tcellHead.className = head_class;\r\n\t\t\t\tcellHead.innerHTML = this.templates.month_day(sd);\r\n\t\t\t\tcell.appendChild(cellHead);\r\n\r\n\t\t\t\tvar cellBody = document.createElement(\"div\");\r\n\t\t\t\tcellBody.className = body_class;\r\n\t\t\t\t// cellBody.style.height = row_height + \"px\";\r\n\t\t\t\t// cellBody.style.width = tdwidths[j];\r\n\t\t\t\tcell.appendChild(cellBody);\r\n\r\n\t\t\t} else {\r\n\t\t\t\tcell.appendChild(document.createElement(\"div\"));\r\n\t\t\t\tcell.appendChild(document.createElement(\"div\"));\r\n\t\t\t}\r\n\t\t\trendered_dates.push(sd);\r\n\t\t\tvar bf1 = sd.getDate();\r\n\t\t\tsd=this.date.add(sd,1,\"day\");\r\n\t\t\tif (sd.getDate() - bf1 > 1)\r\n\t\t\t\tsd = new Date(sd.getFullYear(), sd.getMonth(), bf1 + 1, 12, 0);\r\n\t\t}\r\n\r\n\t\tscheduler._colsS.heights[i] = cellheight;\r\n\t\tcellheight += getCellHeight(i);\r\n\t}\r\n\r\n\tthis._min_date = view_start;\r\n\tthis._max_date = sd;\r\n\r\n\tdiv.innerHTML = \"\";\r\n\tdiv.appendChild(table);\r\n\r\n\tthis._scales = {};\r\n\tvar cells = div.querySelectorAll('[data-cell-date]');\r\n\tcells.forEach((cell) => {\r\n\t\tconst date = scheduler.templates.parse_date(cell.getAttribute(\"data-cell-date\"));\r\n\t\tconst body = cell.querySelector(\".dhx_month_body\");\r\n\t\tthis._scales[+date] = body;\r\n\t\tthis.callEvent(\"onScaleAdd\", [this._scales[+date], date]);\r\n\t});\r\n\r\n\treturn this._max_date;\r\n};\r\n\r\nscheduler._reset_month_scale=function(b,dd,sd,rows){\r\n\t//recalculates rows height and redraws month layout\r\n\tvar ed=scheduler.date.add(dd,1,\"month\");\r\n\r\n\t//trim time part for comparison reasons\r\n\tvar cd = scheduler._currentDate();\r\n\tthis.date.date_part(cd);\r\n\tthis.date.date_part(sd);\r\n\r\n\trows = rows || Math.ceil(Math.round((ed.valueOf()-sd.valueOf()) / (60*60*24*1000) ) / 7);\r\n\r\n\tvar height = (Math.floor(b.clientHeight/rows) - this.xy.month_head_height);\r\n\r\n\tthis._colsS.height = height + this.xy.month_head_height;\r\n\tthis._colsS.heights = [];\r\n\r\n\treturn scheduler._render_month_scale(b, dd, sd, rows);\r\n\r\n};\r\n\r\nscheduler.getView = function (viewName) {\r\n\tif (!viewName) {\r\n\t\tviewName = scheduler.getState().mode;\r\n\t}\r\n\tif (scheduler.matrix && scheduler.matrix[viewName]) {\r\n\t\treturn scheduler.matrix[viewName];\r\n\t}\r\n\r\n\tif (scheduler._props && scheduler._props[viewName]) {\r\n\t\treturn scheduler._props[viewName];\r\n\t}\r\n\r\n\treturn null;\r\n};\r\n\r\nscheduler.getLabel = function(property, key) {\r\n\tvar sections = this.config.lightbox.sections;\r\n\tfor (var i=0; i scheduler.getState().max_date.valueOf()){\r\n\t\t\tendColumnIndex += getDaysDifference(endDate, scheduler.getState().max_date);\r\n\t\t}\r\n\t} else{\r\n\t\tendColumnIndex = Math.round(eventLength/60/60/1000/24);\r\n\t}\r\n\r\n\tvar last_column = true;\r\n\twhile (startColumnIndex < endColumnIndex){\r\n\t\tvar check = scheduler.date.add(endDate, -config.x_step, config.x_unit);\r\n\t\tif (ignore && ignore(endDate) && (!last_column || (last_column && ignore(check) ))){\r\n\t\t\teventLength -= (endDate-check);\r\n\r\n\t\t}else{\r\n\t\t\tlet excludedDuration = 0;\r\n\t\t\tconst intervalStart = new Date(Math.max(check.valueOf(), startDate.valueOf()));\r\n\t\t\tconst intervalEnd = endDate;\r\n\t\t\tconst leftCellCutOffStart = new Date(intervalStart.getFullYear(), intervalStart.getMonth(), intervalStart.getDate(), config.first_hour);\r\n\t\t\tconst leftCellCutOffEnd = new Date(intervalStart.getFullYear(), intervalStart.getMonth(), intervalStart.getDate(), config.last_hour);\r\n\t\t\tconst rightCellCutOffStart = new Date(endDate.getFullYear(), endDate.getMonth(), endDate.getDate(), config.first_hour);\r\n\t\t\tconst rightCellCutOffEnd = new Date(endDate.getFullYear(), endDate.getMonth(), endDate.getDate(), config.last_hour);\r\n\r\n\t\t\tif(intervalEnd.valueOf() > rightCellCutOffEnd.valueOf()){\r\n\t\t\t\texcludedDuration += intervalEnd - rightCellCutOffEnd;\r\n\t\t\t}\r\n\r\n\t\t\tif(intervalEnd.valueOf() > rightCellCutOffStart.valueOf()){\r\n\t\t\t\texcludedDuration += config._start_correction;\r\n\t\t\t} else {\r\n\t\t\t\texcludedDuration += intervalEnd.getHours()*60*60*1000 + intervalEnd.getMinutes()*60*1000;\r\n\t\t\t}\r\n\r\n\t\t\tif(intervalStart.valueOf() < leftCellCutOffEnd.valueOf()){\r\n\t\t\t\texcludedDuration += config._end_correction;\r\n\t\t\t}\r\n\r\n\t\t\tif(intervalStart.valueOf() < leftCellCutOffStart.valueOf()){\r\n\t\t\t\texcludedDuration += (leftCellCutOffStart.valueOf() - intervalStart.valueOf());\r\n\t\t\t}\r\n\t\t\t\r\n\r\n\t\t\teventLength -= excludedDuration;\r\n\t\t\tlast_column = false;\r\n\t\t}\r\n\t\tendDate = check;\r\n\t\tendColumnIndex--;\r\n\t}\r\n\treturn eventLength;\r\n};\r\nscheduler._get_fictional_event_length=function(end_date, ev_length, obj, back){\r\n\tvar sd = new Date(end_date);\r\n\tvar dir = back ? -1 : 1;\r\n\r\n\t//get difference caused by first|last hour\r\n\tif (obj._start_correction || obj._end_correction){\r\n\t\tvar today;\r\n\t\tif (back)\r\n\t\t\ttoday = (sd.getHours()*60+sd.getMinutes()) - (obj.first_hour||0)*60;\r\n\t\telse\r\n\t\t\ttoday = (obj.last_hour||0)*60 - (sd.getHours()*60+sd.getMinutes());\r\n\t\tvar per_day = (obj.last_hour - obj.first_hour)*60;\r\n\t\tvar days = Math.ceil( (ev_length / (60*1000) - today ) / per_day);\r\n\t\tif(days < 0) days = 0;\r\n\t\tev_length += days * (24*60 - per_day) * 60 * 1000;\r\n\t}\r\n\r\n\tvar fd = new Date(end_date*1+ev_length*dir);\r\n\tvar ignore = this[\"ignore_\"+this._mode];\r\n\r\n\tvar start_slot = 0,\r\n\t\tend_slot;\r\n\tif (obj.render){\r\n\t\tstart_slot = this._get_date_index(obj, sd);\r\n\t\tend_slot = this._get_date_index(obj, fd);\r\n\t} else{\r\n\t\tend_slot = Math.round(ev_length/60/60/1000/24);\r\n\t}\r\n\r\n\twhile (start_slot*dir <= end_slot*dir){\r\n\t\tvar check = scheduler.date.add(sd, obj.x_step*dir, obj.x_unit);\r\n\t\tif (ignore && ignore(sd)){\r\n\t\t\tev_length += (check-sd)*dir;\r\n\t\t\tend_slot += dir;\r\n\t\t}\r\n\r\n\t\tsd = check;\r\n\t\tstart_slot+=dir;\r\n\t}\r\n\r\n\treturn ev_length;\r\n};\r\n\r\nscheduler._get_section_view = function(){\r\n\treturn this.getView();\r\n};\r\n\r\nscheduler._get_section_property = function(){\r\n\tif(this.matrix && this.matrix[this._mode]){\r\n\t\treturn this.matrix[this._mode].y_property;\r\n\t}else if(this._props && this._props[this._mode]){\r\n\t\treturn this._props[this._mode].map_to;\r\n\t}\r\n\treturn null;\r\n};\r\n\r\nscheduler._is_initialized = function(){\r\n\tvar state = this.getState();\r\n\treturn (this._obj && state.date && state.mode);\r\n};\r\nscheduler._is_lightbox_open = function(){\r\n\tvar state = this.getState();\r\n\treturn state.lightbox_id !== null && state.lightbox_id !== undefined;\r\n};\r\n\r\n}","export default {\r\n\tevent: function (el, event, handler){\r\n\t\tif (el.addEventListener)\r\n\t\t\tel.addEventListener(event, handler, false);\r\n\t\r\n\t\telse if (el.attachEvent)\r\n\t\t\tel.attachEvent(\"on\"+event, handler);\r\n\t},\r\n\teventRemove: function (el, event, handler){\r\n\t\tif (el.removeEventListener)\r\n\t\t\tel.removeEventListener(event, handler, false);\r\n\t\r\n\t\telse if (el.detachEvent)\r\n\t\t\tel.detachEvent(\"on\"+event, handler);\r\n\t}\r\n};","import defaultDomEvents from './event';\r\n\r\nexport default function(){\r\n\r\n\tvar domEvents = function (addEvent, removeEvent) {\r\n\t\taddEvent = addEvent || defaultDomEvents.event;\r\n\t\tremoveEvent = removeEvent || defaultDomEvents.eventRemove;\r\n\t\tvar handlers = [];\r\n\t\tvar eventScope = {\r\n\t\t\tattach: function(el, event, callback, capture){\r\n\t\t\t\thandlers.push({element: el, event:event, callback: callback, capture: capture});\r\n\t\t\t\taddEvent(el, event, callback, capture);\r\n\t\t\t},\r\n\t\t\tdetach: function(el, event, callback, capture){\r\n\t\t\t\tremoveEvent(el, event, callback, capture);\r\n\t\t\t\tfor(var i = 0; i < handlers.length; i++){\r\n\t\t\t\t\tvar handler = handlers[i];\r\n\t\t\t\t\tif (handler.element === el && handler.event === event && handler.callback === callback && handler.capture === capture) {\r\n\t\t\t\t\t\thandlers.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tdetachAll: function () {\r\n\t\t\t\tvar staticArray = handlers.slice();\r\n\t\t\t\t// original handlers array can be spliced on every iteration\r\n\t\t\t\tfor (var i = 0; i < staticArray.length; i++){\r\n\t\t\t\t\tvar handler = staticArray[i];\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, handler.capture);\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, undefined);\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, false);\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, true);\r\n\t\t\t\t}\r\n\t\t\t\thandlers.splice(0, handlers.length);\r\n\t\t\t},\r\n\t\t\textend: function(){\r\n\t\t\t\treturn domEvents(this.event, this.eventRemove);\r\n\t\t\t}\r\n\t\t};\r\n\t\treturn eventScope;\r\n\t};\r\n\t\r\n\treturn domEvents();\r\n}","import createEventScope from './utils/scoped_event';\r\n\r\nexport default function extend(scheduler) {\r\n\r\n\r\nvar domEvents = createEventScope();\r\n\r\nscheduler.event = domEvents.attach;\r\nscheduler.eventRemove = domEvents.detach;\r\nscheduler._eventRemoveAll = domEvents.detachAll;\r\nscheduler._createDomEventScope = domEvents.extend;\r\n\r\n\r\nscheduler._trim = function(str){\r\n\tvar func = String.prototype.trim || function(){ return this.replace(/^\\s+|\\s+$/g, \"\"); };\r\n\treturn func.apply(str);\r\n};\r\n\r\nscheduler._isDate = function(obj){\r\n\tif (obj && typeof obj == \"object\") {\r\n\t\treturn !!(obj.getFullYear && obj.getMonth && obj.getDate);\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n};\r\n\r\nscheduler._isObject = function(obj){\r\n\treturn (obj && typeof obj == \"object\");\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n(function(){\r\n\r\n\t// eslint-disable-next-line no-control-regex\r\n\tvar htmlTags = new RegExp(\"<(?:.|\\n)*?>\", \"gm\");\r\n\tvar extraSpaces = new RegExp(\" +\", \"gm\");\r\n\r\n\tfunction stripHTMLLite(htmlText){\r\n\t\treturn (htmlText + \"\")\r\n\t\t\t.replace(htmlTags, \" \").\r\n\t\t\treplace(extraSpaces, \" \");\r\n\t}\r\n\r\n\tvar singleQuotes = new RegExp(\"'\", \"gm\");\r\n\tfunction escapeQuotes(text){\r\n\t\treturn (text + \"\").replace(singleQuotes, \"'\");\r\n\t}\r\n\r\n\tscheduler._waiAria = {\r\n\t\tgetAttributeString: function(attr){\r\n\t\t\tvar attributes = [\" \"];\r\n\t\t\tfor(var i in attr){\r\n\t\t\t\tif(typeof attr[i] != \"function\" && typeof attr[i] != \"object\") {\r\n\t\t\t\t\tvar text = escapeQuotes(stripHTMLLite(attr[i]));\r\n\t\t\t\t\tattributes.push(i + \"='\" + text + \"'\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tattributes.push(\" \");\r\n\t\t\treturn attributes.join(\" \");\r\n\t\t},\r\n\t\tsetAttributes: function(div, values){\r\n\t\t\tfor(var i in values){\r\n\t\t\t\tdiv.setAttribute(i, stripHTMLLite(values[i]));\r\n\t\t\t}\r\n\t\t\treturn div;\r\n\t\t},\r\n\r\n\t\tlabelAttr: function(div, content){\r\n\t\t\treturn this.setAttributes(div, {\"aria-label\": content});\r\n\t\t},\r\n\t\tlabel: function(label){\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": label});\r\n\t\t},\r\n\r\n\t\t// day/week/units\r\n\r\n\t\thourScaleAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\r\n\t\t},\r\n\t\tmonthCellAttr: function(div, date){\r\n\t\t\tthis.labelAttr(div, scheduler.templates.day_date(date));\r\n\t\t},\r\n\r\n\t\tnavBarDateAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\t\t},\r\n\t\tdayHeaderAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\t\t},\r\n\r\n\t\tdayColumnAttr: function(div, date){\r\n\t\t\tthis.dayHeaderAttr(div, scheduler.templates.day_date(date));\r\n\t\t},\r\n\r\n\t\theaderButtonsAttributes: function(div, label){\r\n\t\t\treturn this.setAttributes(div, {\"role\":\"button\", \"aria-label\":label});\r\n\t\t},\r\n\r\n\t\theaderToggleState: function(div, isActive){\r\n\t\t\treturn this.setAttributes(div, {\"aria-pressed\": isActive ? \"true\" : \"false\"});\r\n\t\t},\r\n\r\n\r\n\t\tgetHeaderCellAttr:function(dateString){\r\n\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": dateString});\r\n\t\t},\r\n\r\n\r\n\t\teventAttr: function(event, div){\r\n\t\t\tthis._eventCommonAttr(event, div);\r\n\t\t},\r\n\r\n\r\n\t\t_eventCommonAttr: function(event, div){\r\n\t\t\tdiv.setAttribute(\"aria-label\", stripHTMLLite(scheduler.templates.event_text(event.start_date, event.end_date, event)));\r\n\r\n\t\t\tif(scheduler.config.readonly){\r\n\t\t\t\tdiv.setAttribute(\"aria-readonly\", true);\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif(event.$dataprocessor_class){\r\n\t\t\t\tdiv.setAttribute(\"aria-busy\", true);\r\n\t\t\t}\r\n\r\n\r\n\t\t\tdiv.setAttribute(\"aria-selected\",\r\n\t\t\t\t(scheduler.getState().select_id == event.id) ? \"true\" : \"false\");\r\n\t\t},\r\n\r\n\t\tsetEventBarAttr: function(event, div){\r\n\t\t\tthis._eventCommonAttr(event, div);\r\n\t\t},\r\n\r\n\t\t_getAttributes: function(attributeSetter, arg){\r\n\t\t\tvar result = {\r\n\t\t\t\tsetAttribute:function(name, value){\r\n\t\t\t\t\tthis[name] = value;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\tattributeSetter.apply(this, [arg, result]);\r\n\t\t\treturn result;\r\n\r\n\t\t},\r\n\r\n\t\teventBarAttrString: function(event){\r\n\t\t\treturn this.getAttributeString(this._getAttributes(this.setEventBarAttr, event));\r\n\t\t},\r\n\r\n\r\n\r\n\t\tagendaHeadAttrString :function(){\r\n\t\t\treturn this.getAttributeString({role: \"row\"});\r\n\t\t},\r\n\t\tagendaHeadDateString :function(label){\r\n\t\t\treturn this.getAttributeString({role: \"columnheader\", \"aria-label\": label});\r\n\t\t},\r\n\t\tagendaHeadDescriptionString :function(label){\r\n\t\t\treturn this.agendaHeadDateString(label);\r\n\t\t},\r\n\t\tagendaDataAttrString: function(){\r\n\t\t\treturn this.getAttributeString({role: \"grid\"});\r\n\t\t},\r\n\t\tagendaEventAttrString: function(event){\r\n\t\t\tvar attrs = this._getAttributes(this._eventCommonAttr, event);\r\n\r\n\t\t\tattrs[\"role\"] = \"row\";\r\n\r\n\t\t\treturn this.getAttributeString(attrs);\r\n\r\n\t\t},\r\n\t\tagendaDetailsBtnString: function(){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels.icon_details});\r\n\t\t},\r\n\r\n\r\n\t\tgridAttrString: function(){\r\n\t\t\treturn this.getAttributeString({role: \"grid\"});\r\n\t\t},\r\n\r\n\t\tgridRowAttrString: function(event){\r\n\t\t\treturn this.agendaEventAttrString(event);\r\n\t\t},\r\n\r\n\t\tgridCellAttrString: function(event, column, value){\r\n\t\t\treturn this.getAttributeString({\"role\":\"gridcell\", \"aria-label\": [\r\n\t\t\t\t(column.label === undefined ? column.id : column.label),\r\n\t\t\t\t\": \",\r\n\t\t\t\tvalue\r\n\t\t\t]});\r\n\t\t},\r\n\r\n\t\tmapAttrString: function(){\r\n\t\t\treturn this.gridAttrString();\r\n\t\t},\r\n\t\tmapRowAttrString: function(event){\r\n\t\t\treturn this.gridRowAttrString(event);\r\n\t\t},\r\n\t\tmapDetailsBtnString: function(){\r\n\t\t\treturn this.agendaDetailsBtnString();\r\n\t\t},\r\n\r\n\t\tminicalHeader: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"id\":headerId+\"\",\r\n\t\t\t\t\"aria-live\":\"assertice\",\r\n\t\t\t\t\"aria-atomic\":\"true\"\r\n\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalGrid: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"aria-labelledby\":headerId+\"\",\r\n\t\t\t\t\"role\":\"grid\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalRow: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"row\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalDayCell: function(div, date){\r\n\t\t\tvar selected = (date.valueOf() < scheduler._max_date.valueOf() && date.valueOf() >= scheduler._min_date.valueOf());\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"gridcell\",\r\n\t\t\t\t\"aria-label\": scheduler.templates.day_date(date),\r\n\t\t\t\t\"aria-selected\": selected ? \"true\" : \"false\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalHeadCell: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"columnheader\"\r\n\t\t\t});\r\n\t\t},\r\n\r\n\r\n\t\tweekAgendaDayCell: function(div, date){\r\n\t\t\tvar header = div.querySelector(\".dhx_wa_scale_bar\");\r\n\t\t\tvar content = div.querySelector(\".dhx_wa_day_data\");\r\n\t\t\tvar headerId = scheduler.uid() + \"\";\r\n\t\t\tthis.setAttributes(header, { \"id\": headerId});\r\n\t\t\tthis.setAttributes(content, { \"aria-labelledby\": headerId});\r\n\r\n\t\t},\r\n\t\tweekAgendaEvent: function(div, event){\r\n\t\t\tthis.eventAttr(event, div);\r\n\t\t},\r\n\r\n\t\tlightboxHiddenAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t},\r\n\r\n\t\tlightboxVisibleAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"false\");\r\n\t\t},\r\n\r\n\t\tlightboxSectionButtonAttrString: function(label){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":label, \"tabindex\":\"0\"});\r\n\t\t},\r\n\r\n\t\tyearHeader: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"id\":headerId+\"\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tyearGrid: function(div, headerId){\r\n\t\t\tthis.minicalGrid(div, headerId);\r\n\t\t},\r\n\t\tyearHeadCell: function(div){\r\n\t\t\treturn this.minicalHeadCell(div);\r\n\t\t},\r\n\t\tyearRow: function(div){\r\n\t\t\treturn this.minicalRow(div);\r\n\t\t},\r\n\t\tyearDayCell: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"gridcell\"\r\n\t\t\t});\r\n\t\t},\r\n\r\n\t\tlightboxAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t\tdiv.firstChild.setAttribute(\"role\", \"heading\");\r\n\t\t},\r\n\r\n\t\tlightboxButtonAttrString:function(buttonName){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels[buttonName], \"tabindex\":\"0\"});\r\n\t\t},\r\n\t\teventMenuAttrString: function(iconName){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels[iconName]});\r\n\t\t},\r\n\t\tlightboxHeader: function(div, headerText){\r\n\t\t\tdiv.setAttribute(\"aria-label\", headerText);\r\n\t\t},\r\n\r\n\t\tlightboxSelectAttrString: function(time_option){\r\n\t\t\tvar label = \"\";\r\n\r\n\t\t\tswitch (time_option) {\r\n\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.year;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%m\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.month;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%d\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.day;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%H:%i\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.hour + \" \" + scheduler.locale.labels.minute;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": label});\r\n\t\t},\r\n\r\n\r\n\t\tmessageButtonAttrString: function(buttonLabel){\r\n\t\t\treturn \"tabindex='0' role='button' aria-label='\"+buttonLabel+\"'\";\r\n\t\t},\r\n\r\n\t\tmessageInfoAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"alert\");\r\n\t\t\t//div.setAttribute(\"tabindex\", \"-1\");\r\n\t\t},\r\n\r\n\t\tmessageModalAttr: function(div, uid){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t\tif(uid){\r\n\t\t\t\tdiv.setAttribute(\"aria-labelledby\", uid);\r\n\t\t\t}\r\n\r\n\t\t\t//\tdiv.setAttribute(\"tabindex\", \"-1\");\r\n\t\t},\r\n\r\n\t\tquickInfoAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t},\r\n\r\n\t\tquickInfoHeaderAttrString: function(){\r\n\t\t\treturn \" role='heading' \";\r\n\t\t},\r\n\r\n\t\tquickInfoHeader: function(div, header){\r\n\t\t\tdiv.setAttribute(\"aria-label\", header);\r\n\t\t},\r\n\r\n\t\tquickInfoButtonAttrString: function(label){\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"role\":\"button\", \"aria-label\":label, \"tabindex\":\"0\"});\r\n\t\t},\r\n\r\n\t\ttooltipAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"tooltip\");\r\n\t\t},\r\n\r\n\t\ttooltipVisibleAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"false\");\r\n\t\t},\r\n\r\n\t\ttooltipHiddenAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t}\r\n\t};\r\n\r\n\tfunction isDisabled(){\r\n\t\treturn !scheduler.config.wai_aria_attributes;\r\n\t}\r\n\r\n\tfor(var i in scheduler._waiAria){\r\n\t\tscheduler._waiAria[i] = (function(payload){\r\n\t\t\treturn function(){\r\n\t\t\t\tif(isDisabled()){\r\n\t\t\t\t\treturn \" \";\r\n\t\t\t\t}\r\n\t\t\t\treturn payload.apply(this, arguments);\r\n\t\t\t};\r\n\t\t})(scheduler._waiAria[i]);\r\n\t}\r\n\r\n\r\n})();\r\n\r\n}","var uidSeed = Date.now();\r\nfunction uid () {\r\n\treturn uidSeed++;\r\n}\r\n\r\n// iframe-safe array type check instead of using instanceof\r\nfunction isArray(obj){\r\n\tif(Array.isArray){\r\n\t\treturn Array.isArray(obj);\r\n\t}else{\r\n\t\t// close enough\r\n\t\treturn (obj && obj.length !== undefined && obj.pop && obj.push);\r\n\t}\r\n}\r\n\r\n// non-primitive string object, e.g. new String(\"abc\")\r\nfunction isStringObject(obj){\r\n\treturn obj && typeof obj === \"object\" && \r\n\t\tFunction.prototype.toString.call(obj.constructor) === \"function String() { [native code] }\";\r\n}\r\n\r\n// non-primitive number object, e.g. new Number(5)\r\nfunction isNumberObject(obj){\r\n\treturn obj && typeof obj === \"object\" && \r\n\t\tFunction.prototype.toString.call(obj.constructor) === \"function Number() { [native code] }\";\r\n}\r\n\r\n// non-primitive number object, e.g. new Boolean(true)\r\nfunction isBooleanObject(obj){\r\n\treturn obj && typeof obj === \"object\" &&\r\n\t\tFunction.prototype.toString.call(obj.constructor) === \"function Boolean() { [native code] }\";\r\n}\r\n\r\nfunction isDate(obj) {\r\n\tif (obj && typeof obj === \"object\") {\r\n\t\treturn !!(obj.getFullYear && obj.getMonth && obj.getDate);\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n}\r\n\r\nfunction defined(obj) {\r\n\treturn typeof(obj) != \"undefined\";\r\n}\r\n\r\nfunction delay (callback, timeout){\r\n\tvar timer;\r\n\r\n\tvar result = function() {\r\n\t\tresult.$cancelTimeout();\r\n\t\tresult.$pending = true;\r\n\t\tvar args = Array.prototype.slice.call(arguments);\r\n\t\ttimer = setTimeout(function(){\r\n\t\t\tcallback.apply(this, args);\r\n\t\t\tresult.$pending = false;\r\n\t\t}, timeout);\r\n\t};\r\n\r\n\tresult.$pending = false;\r\n\tresult.$cancelTimeout = function(){\r\n\t\tclearTimeout(timer);\r\n\t\tresult.$pending = false;\r\n\t};\r\n\tresult.$execute = function(){\r\n\t\tvar args = Array.prototype.slice.call(arguments);\r\n\t\tcallback.apply(this, args);\r\n\t\tresult.$cancelTimeout();\r\n\t};\r\n\r\n\treturn result;\r\n}\r\n\r\nexport default {\r\n\tuid: uid,\r\n\tmixin: function mixin (target, source, force){\r\n\t\tfor (var f in source)\r\n\t\t\tif (((target[f] === undefined) || force)) target[f]=source[f];\r\n\t\treturn target;\r\n\t},\r\n\tcopy: function copy(object) {\r\n\t\tvar i, result; // iterator, types array, result\r\n\t\r\n\t\tif (object && typeof object == \"object\") {\r\n\t\r\n\t\t\tswitch (true){\r\n\t\t\t\tcase (isDate(object)):\r\n\t\t\t\t\tresult = new Date(object);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isArray(object)):\r\n\t\t\t\t\tresult = new Array(object.length);\r\n\t\t\t\t\tfor(i = 0; i < object.length; i++){\r\n\t\t\t\t\t\tresult[i] = copy(object[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isStringObject(object)):\r\n\t\t\t\t\tresult = new String(object);// jshint ignore:line\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isNumberObject(object)):\r\n\t\t\t\t\tresult = new Number(object);// jshint ignore:line\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isBooleanObject(object)):\r\n\t\t\t\t\tresult = new Boolean(object);// jshint ignore:line\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tresult = {};\r\n\t\t\t\t\tfor (i in object) {\r\n\t\t\t\t\t\tconst varType = typeof object[i];\r\n\r\n\t\t\t\t\t\tif (varType === \"string\" || varType === \"number\" || varType === \"boolean\" ) {\r\n\t\t\t\t\t\t\tresult[i] = object[i];\r\n\t\t\t\t\t\t} else if(isDate(object[i])){\r\n\t\t\t\t\t\t\tresult[i] = new Date(object[i]);\r\n\t\t\t\t\t\t}else if (Object.prototype.hasOwnProperty.apply(object, [i]))\r\n\t\t\t\t\t\t\tresult[i] = copy(object[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result || object;\r\n\t},\r\n\tdefined,\r\n\tisDate,\r\n\tdelay\r\n};\r\n","//returns position of html element on the page\r\nfunction elementPosition(elem) {\r\n\tvar top=0, left=0, right=0, bottom=0;\r\n\tif (elem.getBoundingClientRect) { //HTML5 method\r\n\t\tvar box = elem.getBoundingClientRect();\r\n\t\tvar body = document.body;\r\n\t\tvar docElem = (document.documentElement ||\r\n\t\t\tdocument.body.parentNode ||\r\n\t\t\tdocument.body);\r\n\r\n\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\r\n\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\r\n\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\r\n\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\r\n\t\ttop = box.top + scrollTop - clientTop;\r\n\t\tleft = box.left + scrollLeft - clientLeft;\r\n\r\n\t\tright = document.body.offsetWidth - box.right;\r\n\t\tbottom = document.body.offsetHeight - box.bottom;\r\n\t} else { //fallback to naive approach\r\n\t\twhile(elem) {\r\n\t\t\ttop = top + parseInt(elem.offsetTop,10);\r\n\t\t\tleft = left + parseInt(elem.offsetLeft,10);\r\n\t\t\telem = elem.offsetParent;\r\n\t\t}\r\n\r\n\t\tright = document.body.offsetWidth - elem.offsetWidth - left;\r\n\t\tbottom = document.body.offsetHeight - elem.offsetHeight - top;\r\n\t}\r\n\treturn { y: Math.round(top), x: Math.round(left), width:elem.offsetWidth, height:elem.offsetHeight, right: Math.round(right), bottom: Math.round(bottom) };\r\n}\r\n\r\n/*\r\nevent position relatively to DOM element\r\n */\r\nfunction getRelativeEventPosition(ev, node){\r\n\tvar d = document.documentElement;\r\n\tvar box = elementPosition(node);\r\n\r\n\treturn {\r\n\t\tx: ev.clientX + d.scrollLeft - d.clientLeft - box.x + node.scrollLeft,\r\n\t\ty: ev.clientY + d.scrollTop - d.clientTop - box.y + node.scrollTop\r\n\t};\r\n}\r\n\r\nfunction getNodePosition(elem) {\r\n\tvar top=0, left=0, right=0, bottom=0;\r\n\tif (elem.getBoundingClientRect) { //HTML5 method\r\n\t\tvar box = elem.getBoundingClientRect();\r\n\t\tvar body = document.body;\r\n\t\tvar docElem = (document.documentElement ||\r\n\t\t\tdocument.body.parentNode ||\r\n\t\t\tdocument.body);\r\n\r\n\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\r\n\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\r\n\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\r\n\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\r\n\t\ttop = box.top + scrollTop - clientTop;\r\n\t\tleft = box.left + scrollLeft - clientLeft;\r\n\r\n\t\tright = document.body.offsetWidth - box.right;\r\n\t\tbottom = document.body.offsetHeight - box.bottom;\r\n\t} else { //fallback to naive approach\r\n\t\twhile(elem) {\r\n\t\t\ttop = top + parseInt(elem.offsetTop,10);\r\n\t\t\tleft = left + parseInt(elem.offsetLeft,10);\r\n\t\t\telem = elem.offsetParent;\r\n\t\t}\r\n\r\n\t\tright = document.body.offsetWidth - elem.offsetWidth - left;\r\n\t\tbottom = document.body.offsetHeight - elem.offsetHeight - top;\r\n\t}\r\n\treturn { y: Math.round(top), x: Math.round(left), width:elem.offsetWidth, height:elem.offsetHeight, right: Math.round(right), bottom: Math.round(bottom) };\r\n}\r\n\r\nfunction getClassName(node){\r\n\tif(!node) return \"\";\r\n\r\n\tvar className = node.className || \"\";\r\n\tif(className.baseVal)//'className' exist but not a string - IE svg element in DOM\r\n\t\tclassName = className.baseVal;\r\n\r\n\tif(!className.indexOf)\r\n\t\tclassName = '';\r\n\r\n\treturn className || \"\";\r\n}\r\n\r\nfunction getTargetNode(e) {\r\n\tvar trg;\r\n\tif (e.tagName)\r\n\t\ttrg = e;\r\n\telse {\r\n\t\te = e || window.event;\r\n\t\ttrg = e.target || e.srcElement;\r\n\t\tif (trg.shadowRoot && e.composedPath) {\r\n\t\t\ttrg = e.composedPath()[0];\r\n\t\t}\r\n\t}\r\n\treturn trg;\r\n}\r\n\r\nfunction locateCss(e, classname, strict){\r\n\tif(strict === undefined)\r\n\t\tstrict = true;\r\n\r\n\tvar trg = e.target || e.srcElement;\r\n\tvar css = '';\r\n\r\n\twhile (trg){\r\n\t\tcss = getClassName(trg);\r\n\r\n\t\tif(css){\r\n\t\t\tvar ind = css.indexOf(classname);\r\n\t\t\tif (ind >= 0){\r\n\t\t\t\tif (!strict)\r\n\t\t\t\t\treturn trg;\r\n\r\n\t\t\t\t//check that we have exact match\r\n\t\t\t\tvar left = (ind === 0) || (!((css.charAt(ind - 1)||\"\").trim()));\r\n\t\t\t\tvar right = ((ind + classname.length >= css.length)) || (!((css.charAt(ind + classname.length)).trim()));\r\n\r\n\t\t\t\tif (left && right)\r\n\t\t\t\t\treturn trg;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\ttrg=trg.parentNode;\r\n\t}\r\n\treturn null;\r\n}\r\n\r\n\r\n// get focusable nodes\r\nfunction isVisible(node){\r\n\tvar display = false,\r\n\t\tvisibility = false;\r\n\tif(window.getComputedStyle){\r\n\t\tvar style = window.getComputedStyle(node, null);\r\n\t\tdisplay = style[\"display\"];\r\n\t\tvisibility = style[\"visibility\"];\r\n\t}else if(node.currentStyle){\r\n\t\tdisplay = node.currentStyle[\"display\"];\r\n\t\tvisibility = node.currentStyle[\"visibility\"];\r\n\t}\r\n\r\n\tvar hiddenSection = false;\r\n\tvar recurringSection = locateCss({target:node}, \"dhx_form_repeat\", false);\r\n\tif(recurringSection){\r\n\t\thiddenSection = !!(recurringSection.style.height == \"0px\");\r\n\t}\r\n\thiddenSection = hiddenSection || !(node.offsetHeight);\r\n\r\n\treturn (display != \"none\" && visibility != \"hidden\" && !hiddenSection);\r\n}\r\n\r\nfunction hasNonNegativeTabIndex(node){\r\n\treturn !isNaN(node.getAttribute(\"tabindex\")) && (node.getAttribute(\"tabindex\")*1 >= 0);\r\n}\r\n\r\nfunction hasHref(node){\r\n\tvar canHaveHref = {\"a\": true, \"area\": true};\r\n\tif(canHaveHref[node.nodeName.loLowerCase()]){\r\n\t\treturn !!node.getAttribute(\"href\");\r\n\t}\r\n\treturn true;\r\n}\r\n\r\nfunction isEnabled(node){\r\n\tvar canDisable = {\"input\":true, \"select\":true, \"textarea\":true, \"button\":true, \"object\":true};\r\n\tif(canDisable[node.nodeName.toLowerCase()]){\r\n\t\treturn !node.hasAttribute(\"disabled\");\r\n\t}\r\n\r\n\treturn true;\r\n}\r\n\r\n\r\nfunction getFocusableNodes(root){\r\n\tvar nodes = root.querySelectorAll([\r\n\t\t\"a[href]\",\r\n\t\t\"area[href]\",\r\n\t\t\"input\",\r\n\t\t\"select\",\r\n\t\t\"textarea\",\r\n\t\t\"button\",\r\n\t\t\"iframe\",\r\n\t\t\"object\",\r\n\t\t\"embed\",\r\n\t\t\"[tabindex]\",\r\n\t\t\"[contenteditable]\"\r\n\t].join(\", \"));\r\n\r\n\tvar nodesArray = Array.prototype.slice.call(nodes, 0);\r\n\t\r\n\tfor(var i = 0; i < nodesArray.length; i++){\r\n\t\tnodesArray[i].$position = i;\r\n\t\t// we remember original nodes order, \r\n\t\t// so when we sort them by tabindex we ensure order of nodes with same tabindex is preserved, \r\n\t\t// since some browsers do unstable sort\r\n\t}\r\n\t\r\n\tnodesArray.sort(function(a, b) {\r\n\t\tif(a.tabIndex === 0 && b.tabIndex !== 0){\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\tif(a.tabIndex !== 0 && b.tabIndex === 0){\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\t\r\n\t\tif (a.tabIndex === b.tabIndex){\r\n\t\t\t// ensure we do stable sort\r\n\t\t\treturn a.$position - b.$position;\r\n\t\t}\r\n\t\tif (a.tabIndex < b.tabIndex) {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\treturn 1;\r\n\t});\r\n\t\r\n\tfor(var i = 0; i < nodesArray.length; i++){\r\n\t\tvar node = nodesArray[i];\r\n\t\tvar isValid = (hasNonNegativeTabIndex(node) || isEnabled(node) || hasHref(node)) && isVisible(node);\r\n\t\tif(!isValid){\r\n\t\t\tnodesArray.splice(i, 1);\r\n\t\t\ti--;\r\n\t\t}\r\n\t}\r\n\treturn nodesArray;\r\n}\r\n\r\n\r\nfunction isShadowDomSupported() {\r\n\treturn document.head.createShadowRoot || document.head.attachShadow;\r\n}\r\n\r\n/**\r\n * Returns element that has the browser focus, or null if no element has focus.\r\n * Works with shadow DOM, so it's prefereed to use this function instead of document.activeElement directly.\r\n * @returns HTMLElement\r\n */\r\nfunction getActiveElement(){\r\n\tvar activeElement = document.activeElement;\r\n\tif (activeElement.shadowRoot) {\r\n\t\tactiveElement = activeElement.shadowRoot.activeElement;\r\n\t}\r\n\tif (activeElement === document.body && document.getSelection) {\r\n\t\tactiveElement = document.getSelection().focusNode || document.body;\r\n\t}\r\n\r\n\treturn activeElement;\r\n}\r\n\r\n/**\r\n * Returns document.body or the host node of the ShadowRoot, if the element is attached to ShadowDom\r\n * @param {HTMLElement} element \r\n * @returns HTMLElement\r\n */\r\nfunction getRootNode(element) {\r\n\tif (!element) {\r\n\t\treturn document.body;\r\n\t}\r\n\tif (!isShadowDomSupported()) {\r\n\t\treturn document.body;\r\n\t}\r\n\twhile (element.parentNode && (element = element.parentNode)) {\r\n\t\tif (element instanceof ShadowRoot) {\r\n\t\t\treturn element.host;\r\n\t\t}\r\n\t}\r\n\treturn document.body;\r\n}\r\n\r\nfunction hasShadowParent(element) {\r\n\treturn !!getRootNode(element);\r\n}\r\n\r\nexport default {\r\n\t/**\r\n\t * @desc: Calculate absolute position of html object\r\n\t * @type: private\r\n\t * @param: htmlObject - html object\r\n\t * @topic: 0\r\n\t */\r\n\tgetAbsoluteLeft: function getAbsoluteLeft(htmlObject){\r\n\t\treturn this.getOffset(htmlObject).left;\r\n\t},\r\n\t/**\r\n\t * @desc: Calculate absolute position of html object\r\n\t * @type: private\r\n\t * @param: htmlObject - html object\r\n\t * @topic: 0\r\n\t */\r\n\tgetAbsoluteTop: function getAbsoluteTop(htmlObject){\r\n\t\treturn this.getOffset(htmlObject).top;\r\n\t},\r\n\r\n\tgetOffsetSum: function getOffsetSum(elem) {\r\n\t\tvar top=0, left=0;\r\n\t\twhile(elem) {\r\n\t\t\ttop = top + parseInt(elem.offsetTop);\r\n\t\t\tleft = left + parseInt(elem.offsetLeft);\r\n\t\t\telem = elem.offsetParent;\r\n\t\t}\r\n\t\treturn {top: top, left: left};\r\n\t},\r\n\r\n\tgetOffsetRect: function getOffsetRect(elem) {\r\n\t\tvar box = elem.getBoundingClientRect();\r\n\r\n\t\tvar top = 0,\r\n\t\t\tleft = 0;\r\n\r\n\t\t// https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent#Mobile_Tablet_or_Desktop\r\n\t\tif (!/Mobi/.test(navigator.userAgent)) {\r\n\t\t\tvar body = document.body;\r\n\t\t\tvar docElem = document.documentElement;\r\n\t\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\r\n\t\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\r\n\t\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\r\n\t\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\r\n\r\n\t\t\ttop = box.top + scrollTop - clientTop;\r\n\t\t\tleft = box.left + scrollLeft - clientLeft;\r\n\t\t}else {\r\n\t\t\t// incorrect left coordinate on mobile zoom\r\n\t\t\t// https://bugs.chromium.org/p/chromium/issues/detail?id=489206\r\n\r\n\t\t\tvar dummy = document.createElement(\"div\");\r\n\t\t\tdummy.style.position=\"absolute\";\r\n\t\t\tdummy.style.left=\"0px\";\r\n\t\t\tdummy.style.top=\"0px\";\r\n\t\t\tdummy.style.width=\"1px\";\r\n\t\t\tdummy.style.height = \"1px\";\r\n\r\n\t\t\tdocument.body.appendChild(dummy);\r\n\t\t\tvar dummyBox = dummy.getBoundingClientRect();\r\n\t\t\ttop = box.top - dummyBox.top;\r\n\t\t\tleft = box.left - dummyBox.left;\r\n\r\n\t\t\tdummy.parentNode.removeChild(dummy);\r\n\t\t}\r\n\r\n\t\treturn { top: Math.round(top), left: Math.round(left) };\r\n\t},\r\n\r\n\tgetOffset: function getOffset(elem) {\r\n\t\tif (elem.getBoundingClientRect) {\r\n\t\t\treturn this.getOffsetRect(elem);\r\n\t\t} else {\r\n\t\t\treturn this.getOffsetSum(elem);\r\n\t\t}\r\n\t},\r\n\r\n\tclosest: function(element, selector){\r\n\t\tif(!element || !selector){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn closest(element, selector);\r\n\t},\r\n\tinsertAfter: function(newNode, referenceNode){\r\n\t\tif(referenceNode.nextSibling){\r\n\t\t\treferenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);\r\n\t\t}else{\r\n\t\t\treferenceNode.parentNode.appendChild(newNode);\r\n\t\t}\r\n\t},\r\n\tremove: function(node) {\r\n\t\tif (node && node.parentNode) {\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t}\r\n\t},\r\n\tisChildOf: function(child, parent) {\r\n\t\treturn parent.contains(child);\r\n\t},\r\n\tgetFocusableNodes,\r\n\tgetClassName,\r\n\tlocateCss,\r\n\tgetRootNode,\r\n\thasShadowParent,\r\n\tisShadowDomSupported,\r\n\tgetActiveElement,\r\n\tgetRelativeEventPosition,\r\n\tgetTargetNode,\r\n\tgetNodePosition\r\n};\r\n\r\nvar closest;\r\nif(Element.prototype.closest){\r\n\tclosest = function(element, selector){\r\n\t\treturn element.closest(selector);\r\n\t};\r\n}else{\r\n\tvar matches = Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\r\n\tclosest = function(element, selector) {\r\n\t\tvar el = element;\r\n\t\tdo {\r\n\t\t\tif (matches.call(el, selector)){\r\n\t\t\t\treturn el;\r\n\t\t\t}\r\n\t\t\tel = el.parentElement || el.parentNode;\r\n\t\t} while (el !== null && el.nodeType === 1);\r\n\t\treturn null;\r\n\t};\r\n}\r\n","/* eslint-disable no-restricted-globals */\r\nvar isWindowAwailable = typeof window !== \"undefined\";\r\n\r\n/* eslint-enable no-restricted-globals */\r\n\r\nexport default {\r\n\tisIE: isWindowAwailable && (navigator.userAgent.indexOf(\"MSIE\") >= 0 || navigator.userAgent.indexOf(\"Trident\") >= 0),\r\n\tisIE6: isWindowAwailable && (!XMLHttpRequest && navigator.userAgent.indexOf(\"MSIE\") >= 0),\r\n\tisIE7: isWindowAwailable && (navigator.userAgent.indexOf(\"MSIE 7.0\") >= 0 && navigator.userAgent.indexOf(\"Trident\") < 0),\r\n\tisIE8: isWindowAwailable && (navigator.userAgent.indexOf(\"MSIE 8.0\") >= 0 && navigator.userAgent.indexOf(\"Trident\") >= 0),\r\n\tisOpera: isWindowAwailable && (navigator.userAgent.indexOf(\"Opera\") >= 0),\r\n\tisChrome: isWindowAwailable && (navigator.userAgent.indexOf(\"Chrome\") >= 0),\r\n\tisKHTML: isWindowAwailable && (navigator.userAgent.indexOf(\"Safari\") >= 0 || navigator.userAgent.indexOf(\"Konqueror\") >= 0),\r\n\tisFF: isWindowAwailable && (navigator.userAgent.indexOf(\"Firefox\") >= 0),\r\n\tisIPad: isWindowAwailable && (navigator.userAgent.search(/iPad/gi) >= 0),\r\n\tisEdge: isWindowAwailable && (navigator.userAgent.indexOf(\"Edge\")!=-1),\r\n\tisNode: (!isWindowAwailable || typeof navigator == \"undefined\")\r\n};","export default function extend(scheduler) {\r\n\r\nscheduler.destructor = function(){\r\n\tscheduler.callEvent(\"onDestroy\", []);\r\n\tthis.clearAll();\r\n\r\n\tif(this.$container){\r\n\t\t// FIXME: clear container or remove container\r\n\t\tthis.$container.innerHTML = \"\";\r\n\t\t// scheduler.$domHelpers.remove(this.$container);\r\n\t}\r\n\r\n\tif(this._eventRemoveAll){\r\n\t\tthis._eventRemoveAll();\r\n\t}\r\n\r\n\tif(this.resetLightbox){\r\n\t\tthis.resetLightbox();\r\n\t}\r\n\r\n\tif(this._dp && this._dp.destructor){\r\n\t\tthis._dp.destructor();\r\n\t}\r\n\r\n\t// detachAllEvents should be called last, because in components may be attached events\r\n\tthis.detachAllEvents();\r\n\r\n\tfor(var i in this){\r\n\t\tif(i.indexOf(\"$\") === 0){\r\n\t\t\tdelete this[i];\r\n\t\t}\r\n\t}\r\n\tscheduler.$destroyed = true;\r\n};\r\n\r\n}","export default function(data) {\r\n\tif (typeof data === \"string\" || typeof data === \"number\") {\r\n\t\treturn data;\r\n\t}\r\n\tvar result = \"\";\r\n\tfor (var key in data) {\r\n\t\tvar serialized = \"\";\r\n\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\tif (typeof data[key] === \"string\") {\r\n\t\t\t\tserialized = encodeURIComponent(data[key]);\r\n\t\t\t} else if (typeof data[key] === \"number\") {\r\n\t\t\t\tserialized = data[key];\r\n\t\t\t} else {\r\n\t\t\t\tserialized = encodeURIComponent(JSON.stringify(data[key]));\r\n\t\t\t}\r\n\t\t\tserialized = key + \"=\" + serialized;\r\n\r\n\t\t\tif (result.length) {\r\n\t\t\t\tserialized = \"&\" + serialized;\r\n\t\t\t}\r\n\t\t\tresult += serialized;\r\n\t\t}\r\n\t}\r\n\treturn result;\r\n}","import serialize from \"../common/url_serialize.js\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler.Promise = window.Promise; \r\n\r\nfunction createConfig(method, args) {\r\n\tvar result = {\r\n\t\tmethod: method\r\n\t};\r\n\r\n\tif (args.length === 0) {\r\n\t\tthrow new Error(\"Arguments list of query is wrong.\");\r\n\t}\r\n\tif (args.length === 1) {\r\n\t\tif (typeof args[0] === \"string\") {\r\n\t\t\tresult.url = args[0];\r\n\t\t\tresult.async = true;\r\n\t\t} else {\r\n\t\t\tresult.url = args[0].url;\r\n\t\t\tresult.async = (args[0].async || true);\r\n\t\t\tresult.callback = args[0].callback;\r\n\t\t\tresult.headers = args[0].headers;\r\n\t\t}\r\n\t\tif (method === \"POST\" || \"PUT\") {\r\n\t\t\tif (args[0].data) {\r\n\t\t\t\tif (typeof args[0].data !== \"string\") {\r\n\t\t\t\t\tresult.data = serialize(args[0].data);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresult.data = args[0].data;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tresult.data = \"\";\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n\r\n\tresult.url = args[0];\r\n\tswitch(method) {\r\n\t\tcase \"GET\":\r\n\t\tcase \"DELETE\":\r\n\t\t\tresult.callback = args[1];\r\n\t\t\tresult.headers = args[2];\r\n\t\tbreak;\r\n\t\tcase \"POST\":\r\n\t\tcase \"PUT\":\r\n\t\t\tif (args[1]) {\r\n\t\t\t\tif (typeof args[1] !== \"string\") {\r\n\t\t\t\t\tresult.data = serialize(args[1]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresult.data = args[1];\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tresult.data = \"\";\r\n\t\t\t}\r\n\t\t\tresult.callback = args[2];\r\n\t\t\tresult.headers = args[3];\r\n\t\tbreak;\r\n\t}\r\n\treturn result;\r\n}\r\nscheduler.ajax = {\r\n\t// if false - dhxr param will added to prevent caching on client side (default),\r\n\t// if true - do not add extra params\r\n\tcache: true,\r\n\r\n\t// default method for load/loadStruct, post/get allowed\r\n\tmethod: \"get\",\r\n\r\n\tserializeRequestParams: serialize,\r\n\tparse: function(data) {\r\n\t\tif (typeof data !== \"string\") return data;\r\n\r\n\t\tvar obj;\r\n\t\tdata = data.replace(/^[\\s]+/,\"\");\r\n\t\tif (typeof DOMParser !== \"undefined\" && !scheduler.$env.isIE) { // ff,ie9\r\n\t\t\tobj = (new DOMParser()).parseFromString(data, \"text/xml\");\r\n\t\t} else if (typeof window.ActiveXObject !== \"undefined\") {\r\n\t\t\tobj = new window.ActiveXObject(\"Microsoft.XMLDOM\");\r\n\t\t\tobj.async = \"false\";\r\n\t\t\tobj.loadXML(data);\r\n\t\t}\r\n\t\treturn obj;\r\n\t},\r\n\txmltop: function(tagname, xhr, obj) {\r\n\t\tif (typeof xhr.status == \"undefined\" || xhr.status < 400) {\r\n\t\t\tvar xml = (!xhr.responseXML) ? this.parse(xhr.responseText || xhr) : (xhr.responseXML || xhr);\r\n\t\t\tif (xml && xml.documentElement !== null && !xml.getElementsByTagName(\"parsererror\").length) {\r\n\t\t\t\treturn xml.getElementsByTagName(tagname)[0];\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (obj !== -1) scheduler.callEvent(\"onLoadXMLError\",[\"Incorrect XML\", arguments[1], obj]);\r\n\t\treturn document.createElement(\"DIV\");\r\n\t},\r\n\txpath: function(xpathExp, docObj) {\r\n\t\tif (!docObj.nodeName) docObj = docObj.responseXML || docObj;\r\n\t\tif (scheduler.$env.isIE) {\r\n\t\t\treturn docObj.selectNodes(xpathExp)||[];\r\n\t\t} else {\r\n\t\t\tvar rows = [];\r\n\t\t\tvar first;\r\n\t\t\tvar col = (docObj.ownerDocument||docObj).evaluate(xpathExp, docObj, null, XPathResult.ANY_TYPE, null);\r\n\r\n\t\t\twhile (true){\r\n\t\t\t\tfirst = col.iterateNext();\r\n\t\t\t\tif(first){\r\n\t\t\t\t\trows.push(first);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn rows;\r\n\t\t}\r\n\t},\r\n\tquery: function(config) {\r\n\t\treturn this._call(\r\n\t\t\t(config.method || \"GET\"),\r\n\t\t\tconfig.url,\r\n\t\t\tconfig.data || \"\",\r\n\t\t\t(config.async || true),\r\n\t\t\tconfig.callback,\r\n\t\t\tconfig.headers\r\n\t\t);\r\n\t},\r\n\tget: function(url, onLoad, headers) {\r\n\t\tvar config = createConfig(\"GET\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tgetSync: function(url, headers) {\r\n\t\tvar config = createConfig(\"GET\", arguments);\r\n\t\tconfig.async = false;\r\n\t\treturn this.query(config);\r\n\t},\r\n\tput: function(url, postData, onLoad, headers) {\r\n\t\tvar config = createConfig(\"PUT\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tdel: function(url, onLoad, headers) {\r\n\t\t/**\r\n\t\t * https://tools.ietf.org/html/rfc7231#section-4.3.5\r\n\t\t * A payload within a DELETE request message has no defined semantics;\r\n\t\t * sending a payload body on a DELETE request might cause some existing\r\n\t\t * implementations to reject the request.\r\n\t\t */\r\n\t\tvar config = createConfig(\"DELETE\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tpost: function(url, postData, onLoad, headers) {\r\n\t\tif (arguments.length == 1) {\r\n\t\t\tpostData = \"\";\r\n\t\t} else if (arguments.length == 2 && typeof(postData) == \"function\") {\r\n\t\t\tonLoad = postData;\r\n\t\t\tpostData = \"\";\r\n\t\t}\r\n\t\tvar config = createConfig(\"POST\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tpostSync: function(url, postData, headers) {\r\n\t\tpostData = (postData === null ? \"\" : String(postData));\r\n\r\n\t\tvar config = createConfig(\"POST\", arguments);\r\n\t\tconfig.async = false;\r\n\t\treturn this.query(config);\r\n\t},\r\n\t_call: function(method, url, postData, async, onLoad, headers) {\r\n\t\treturn new scheduler.Promise((function(resolve, reject) {\r\n\t\t\tvar t = (typeof XMLHttpRequest !== undefined && !scheduler.$env.isIE ? new XMLHttpRequest() : new window.ActiveXObject(\"Microsoft.XMLHTTP\"));\r\n\t\t\tvar isQt = (navigator.userAgent.match(/AppleWebKit/) !== null && navigator.userAgent.match(/Qt/) !== null && navigator.userAgent.match(/Safari/) !== null);\r\n\r\n\t\t\tif (!!async) {\r\n\t\t\t\tt.addEventListener(\"readystatechange\", function() {\r\n\t\t\t\t\tif ((t.readyState == 4) || (isQt && t.readyState == 3)) { // what for long response and status 404?\r\n\t\t\t\t\t\tif (t.status != 200 || t.responseText === \"\")\r\n\t\t\t\t\t\t\tif (!scheduler.callEvent(\"onAjaxError\", [t])) return;\r\n\r\n\t\t\t\t\t\tsetTimeout(function() {\r\n\t\t\t\t\t\t\tif (typeof(onLoad) == \"function\") {\r\n\t\t\t\t\t\t\t\tonLoad.apply(window, [{xmlDoc:t, filePath:url}]); // dhtmlx-compat, response.xmlDoc.responseXML/responseText\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tresolve(t);\r\n\t\t\t\t\t\t\tif (typeof(onLoad) == \"function\") {\r\n\t\t\t\t\t\t\t\tonLoad = null;\r\n\t\t\t\t\t\t\t\tt = null;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}, 0);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif (method == \"GET\" && !this.cache) {\r\n\t\t\t\turl += (url.indexOf(\"?\")>=0?\"&\":\"?\")+\"dhxr\"+new Date().getTime()+\"=1\";\r\n\t\t\t}\r\n\r\n\t\t\tt.open(method, url, async);\r\n\r\n\t\t\tif (headers){\r\n\t\t\t\tfor (var key in headers)\r\n\t\t\t\t\tt.setRequestHeader(key, headers[key]);\r\n\t\t\t} else if (method.toUpperCase() == \"POST\" || method == \"PUT\" || method == \"DELETE\") {\r\n\t\t\t\tt.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\r\n\t\t\t} else if (method == \"GET\") {\r\n\t\t\t\tpostData = null;\r\n\t\t\t}\r\n\r\n\t\t\tt.setRequestHeader(\"X-Requested-With\", \"XMLHttpRequest\");\r\n\r\n\t\t\tt.send(postData);\r\n\r\n\t\t\tif (!async) return {xmlDoc:t, filePath:url}; // dhtmlx-compat, response.xmlDoc.responseXML/responseText\r\n\t\t}.bind(this)));\r\n\t},\r\n\turlSeparator: function(str){\r\n\t\tif (str.indexOf(\"?\") != -1)\r\n\t\t\treturn \"&\";\r\n\t\telse\r\n\t\t\treturn \"?\";\r\n\t}\r\n};\r\n\r\nscheduler.$ajax = scheduler.ajax; // for old\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nvar generateStringToDate = function (format, utc) {\r\n\tvar splt = \"var temp=date.match(/[a-zA-Z]+|[0-9]+/g);\";\r\n\tvar mask = format.match(/%[a-zA-Z]/g);\r\n\tfor (var i = 0; i < mask.length; i++) {\r\n\t\tswitch (mask[i]) {\r\n\t\t\tcase \"%j\":\r\n\t\t\tcase \"%d\": splt += \"set[2]=temp[\" + i + \"]||1;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%n\":\r\n\t\t\tcase \"%m\": splt += \"set[1]=(temp[\" + i + \"]||1)-1;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%y\": splt += \"set[0]=temp[\" + i + \"]*1+(temp[\" + i + \"]>50?1900:2000);\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%g\":\r\n\t\t\tcase \"%G\":\r\n\t\t\tcase \"%h\":\r\n\t\t\tcase \"%H\":\r\n\t\t\t\tsplt += \"set[3]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%i\":\r\n\t\t\t\tsplt += \"set[4]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%Y\": splt += \"set[0]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%a\":\r\n\t\t\tcase \"%A\": splt += \"set[3]=set[3]%12+((temp[\" + i + \"]||'').toLowerCase()=='am'?0:12);\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%s\": splt += \"set[5]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%M\": splt += \"set[1]=this.locale.date.month_short_hash[temp[\" + i + \"]]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%F\": splt += \"set[1]=this.locale.date.month_full_hash[temp[\" + i + \"]]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\tvar code = \"set[0],set[1],set[2],set[3],set[4],set[5]\";\r\n\tif (utc) code = \" Date.UTC(\" + code + \")\";\r\n\treturn new Function(\"date\", \"var set=[0,0,1,0,0,0]; \" + splt + \" return new Date(\" + code + \");\");\r\n};\r\nvar csp_date_to_str = function (format, utc) {\r\n\treturn function(date) {\r\n\t\treturn format.replace(/%[a-zA-Z]/g, function (a) {\r\n\t\t\tswitch (a) {\r\n\t\t\t\tcase \"%d\": return utc ? scheduler.date.to_fixed(date.getUTCDate()) : scheduler.date.to_fixed(date.getDate());\r\n\t\t\t\tcase \"%m\": return utc ? scheduler.date.to_fixed((date.getUTCMonth() + 1)) : scheduler.date.to_fixed((date.getMonth() + 1));\r\n\t\t\t\tcase \"%j\": return utc ? date.getUTCDate() : date.getDate();\r\n\t\t\t\tcase \"%n\": return utc ? (date.getUTCMonth() + 1) : (date.getMonth() + 1);\r\n\t\t\t\tcase \"%y\": return utc ? scheduler.date.to_fixed(date.getUTCFullYear() % 100) : scheduler.date.to_fixed(date.getFullYear() % 100);\r\n\t\t\t\tcase \"%Y\": return utc ? date.getUTCFullYear() : date.getFullYear();\r\n\t\t\t\tcase \"%D\": return utc ? scheduler.locale.date.day_short[date.getUTCDay()] : scheduler.locale.date.day_short[date.getDay()];\r\n\t\t\t\tcase \"%l\": return utc ? scheduler.locale.date.day_full[date.getUTCDay()] : scheduler.locale.date.day_full[date.getDay()];\r\n\t\t\t\tcase \"%M\": return utc ? scheduler.locale.date.month_short[date.getUTCMonth()] : scheduler.locale.date.month_short[date.getMonth()];\r\n\t\t\t\tcase \"%F\": return utc ? scheduler.locale.date.month_full[date.getUTCMonth()] : scheduler.locale.date.month_full[date.getMonth()];\r\n\t\t\t\tcase \"%h\": return utc ? scheduler.date.to_fixed((date.getUTCHours() + 11) % 12 + 1) : scheduler.date.to_fixed((date.getHours() + 11) % 12 + 1);\r\n\t\t\t\tcase \"%g\": return utc ? ((date.getUTCHours() + 11) % 12 + 1) : ((date.getHours() + 11) % 12 + 1);\r\n\t\t\t\tcase \"%G\": return utc ? date.getUTCHours() : date.getHours();\r\n\t\t\t\tcase \"%H\": return utc ? scheduler.date.to_fixed(date.getUTCHours()) : scheduler.date.to_fixed(date.getHours());\r\n\t\t\t\tcase \"%i\": return utc ? scheduler.date.to_fixed(date.getUTCMinutes()) : scheduler.date.to_fixed(date.getMinutes());\r\n\t\t\t\tcase \"%a\": return utc ? (date.getUTCHours() > 11 ? \"pm\" : \"am\") : (date.getHours() > 11 ? \"pm\" : \"am\");\r\n\t\t\t\tcase \"%A\": return utc ? (date.getUTCHours() > 11 ? \"PM\" : \"AM\") : (date.getHours() > 11 ? \"PM\" : \"AM\");\r\n\t\t\t\tcase \"%s\": return utc ? scheduler.date.to_fixed(date.getUTCSeconds()) : scheduler.date.to_fixed(date.getSeconds());\r\n\t\t\t\tcase \"%W\": return utc ? scheduler.date.to_fixed(scheduler.date.getUTCISOWeek(date)) : scheduler.date.to_fixed(scheduler.date.getISOWeek(date));\r\n\t\t\t\tdefault: return a;\r\n\t\t\t}\r\n\t\t});\r\n\t};\r\n};\r\nvar csp_str_to_date = function (format, utc) {\r\n\treturn function (date){\r\n\t\tvar set = [0, 0, 1, 0, 0, 0];\r\n\t\tvar temp = date.match(/[a-zA-Z]+|[0-9]+/g);\r\n\t\tvar mask = format.match(/%[a-zA-Z]/g);\r\n\r\n\t\tfor (var i = 0; i < mask.length; i++) {\r\n\t\t\tswitch (mask[i]) {\r\n\t\t\t\tcase \"%j\":\r\n\t\t\t\tcase \"%d\":\r\n\t\t\t\t\tset[2] = temp[i] || 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%n\":\r\n\t\t\t\tcase \"%m\":\r\n\t\t\t\t\tset[1] = (temp[i] || 1) - 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%y\":\r\n\t\t\t\t\tset[0] = temp[i] * 1 + (temp[i] > 50 ? 1900 : 2000);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%g\":\r\n\t\t\t\tcase \"%G\":\r\n\t\t\t\tcase \"%h\":\r\n\t\t\t\tcase \"%H\":\r\n\t\t\t\t\tset[3] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%i\":\r\n\t\t\t\t\tset[4] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\tset[0] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%a\":\r\n\t\t\t\tcase \"%A\":\r\n\t\t\t\t\tset[3] = set[3] % 12 + ((temp[i] || '').toLowerCase() == 'am' ? 0 : 12);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%s\":\r\n\t\t\t\t\tset[5] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%M\":\r\n\t\t\t\t\tset[1] = scheduler.locale.date.month_short_hash[temp[i]] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%F\":\r\n\t\t\t\t\tset[1] = scheduler.locale.date.month_full_hash[temp[i]] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (utc) {\r\n\t\t\treturn new Date(Date.UTC(set[0], set[1], set[2], set[3], set[4], set[5]));\r\n\t\t}\r\n\r\n\t\treturn new Date(set[0], set[1], set[2], set[3], set[4], set[5]);\r\n\t};\r\n};\r\n\r\nvar canUseCsp = false;\r\n(function() {\r\n\ttry {\r\n\t\tnew Function(\"canUseCsp = false;\");\r\n\t} catch(e) {\r\n\t\tcanUseCsp = true;\r\n\t}\r\n})();\r\nfunction useCsp() {\r\n\tvar result = false;\r\n\tif (scheduler.config.csp === \"auto\") {\r\n\t\tresult = canUseCsp;\r\n\t} else {\r\n\t\tresult = scheduler.config.csp;\r\n\t}\r\n\treturn result;\r\n}\r\nscheduler.date = {\r\n\tinit:function(){\r\n\t\tvar s = scheduler.locale.date.month_short;\r\n\t\tvar t = scheduler.locale.date.month_short_hash = {};\r\n\t\tfor (var i = 0; i < s.length; i++)\r\n\t\t\tt[s[i]]=i;\r\n\r\n\t\tvar s = scheduler.locale.date.month_full;\r\n\t\tvar t = scheduler.locale.date.month_full_hash = {};\r\n\t\tfor (var i = 0; i < s.length; i++)\r\n\t\t\tt[s[i]]=i;\r\n\t},\r\n\t_bind_host_object : function(method){\r\n\t\tif(method.bind){\r\n\t\t\treturn method.bind(scheduler);\r\n\t\t}else{\r\n\t\t\treturn function(){ return method.apply(scheduler, arguments); };\r\n\t\t}\r\n\t},\r\n\tdate_part:function(date){\r\n\t\tvar old = new Date(date);\r\n\t\tdate.setHours(0);\r\n\t\tdate.setMinutes(0);\r\n\t\tdate.setSeconds(0);\r\n\t\tdate.setMilliseconds(0);\r\n\t\tif (date.getHours() && //shift to yesterday on dst\r\n\t\t\t(date.getDate() < old.getDate() || date.getMonth() < old.getMonth() || date.getFullYear() < old.getFullYear()) )\r\n\t\t\tdate.setTime(date.getTime() + 60 * 60 * 1000 * (24 - date.getHours()));\r\n\t\treturn date;\r\n\t},\r\n\ttime_part:function(date){\r\n\t\treturn (date.valueOf()/1000 - date.getTimezoneOffset()*60)%86400;\r\n\t},\r\n\tweek_start:function(date){\r\n\t\tvar shift=date.getDay();\r\n\t\tif (scheduler.config.start_on_monday){\r\n\t\t\tif (shift===0) shift=6;\r\n\t\t\telse shift--;\r\n\t\t}\r\n\t\treturn this.date_part(this.add(date,-1*shift,\"day\"));\r\n\t},\r\n\tmonth_start:function(date){\r\n\t\tdate.setDate(1);\r\n\t\treturn this.date_part(date);\r\n\t},\r\n\tyear_start:function(date){\r\n\t\tdate.setMonth(0);\r\n\t\treturn this.month_start(date);\r\n\t},\r\n\tday_start:function(date){\r\n\t\treturn this.date_part(date);\r\n\t},\r\n\t_add_days:function(date, inc){\r\n\t\tvar ndate = new Date(date.valueOf());\r\n\r\n\t\tndate.setDate(ndate.getDate() + inc);\r\n\r\n\t\t// Workaround for Safari/iOS timezone bug, ref:OKZ-149693\r\n\t\tif(inc == Math.round(inc) && inc > 0){\r\n\t\t\tvar datesDiff = +ndate - +date,\r\n\t\t\t\trest = datesDiff % (24*60*60*1000);\r\n\t\t\tif(rest && date.getTimezoneOffset() == ndate.getTimezoneOffset()){\r\n\t\t\t\tvar hours = rest / (60* 60 * 1000);\r\n\t\t\t\tndate.setTime(ndate.getTime() + (24 - hours) * 60 * 60 * 1000);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (inc >= 0 && (!date.getHours() && ndate.getHours()) &&//shift to yesterday on dst\r\n\t\t\t(ndate.getDate() < date.getDate() || ndate.getMonth() < date.getMonth() || ndate.getFullYear() < date.getFullYear()) )\r\n\t\t\tndate.setTime(ndate.getTime() + 60 * 60 * 1000 * (24 - ndate.getHours()));\r\n\t\treturn ndate;\r\n\t},\r\n\tadd:function(date,inc,mode){\r\n\t\tvar ndate=new Date(date.valueOf());\r\n\t\tswitch(mode){\r\n\t\t\tcase \"day\":\r\n\t\t\t\tndate = scheduler.date._add_days(ndate, inc);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"week\":\r\n\t\t\t\tndate = scheduler.date._add_days(ndate, inc * 7);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"month\": ndate.setMonth(ndate.getMonth()+inc); break;\r\n\t\t\tcase \"year\": ndate.setYear(ndate.getFullYear()+inc); break;\r\n\t\t\tcase \"hour\":\r\n\t\t\t\t/*\r\n\t\t\t\t setHour(getHour() + inc) and setMinutes gives weird result when is applied on a Daylight Saving time switch\r\n\t\t\t\t setTime seems working as expected\r\n\t\t\t\t*/\r\n\t\t\t\tndate.setTime(ndate.getTime() + inc * 60 * 60 * 1000);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"minute\":\r\n\t\t\t\tndate.setTime(ndate.getTime() + inc * 60 * 1000);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\treturn scheduler.date[\"add_\"+mode](date,inc,mode);\r\n\t\t}\r\n\t\treturn ndate;\r\n\t},\r\n\tto_fixed:function(num){\r\n\t\tif (num<10)\treturn \"0\"+num;\r\n\t\treturn num;\r\n\t},\r\n\tcopy:function(date){\r\n\t\treturn new Date(date.valueOf());\r\n\t},\r\n\tdate_to_str:function(format,utc){\r\n\t\tif (useCsp()) {\r\n\t\t\treturn csp_date_to_str(format,utc);\r\n\t\t}\r\n\r\n\t\tformat=format.replace(/%[a-zA-Z]/g,function(a){\r\n\t\t\tswitch(a){\r\n\t\t\t\tcase \"%d\": return \"\\\"+this.date.to_fixed(date.getDate())+\\\"\";\r\n\t\t\t\tcase \"%m\": return \"\\\"+this.date.to_fixed((date.getMonth()+1))+\\\"\";\r\n\t\t\t\tcase \"%j\": return \"\\\"+date.getDate()+\\\"\";\r\n\t\t\t\tcase \"%n\": return \"\\\"+(date.getMonth()+1)+\\\"\";\r\n\t\t\t\tcase \"%y\": return \"\\\"+this.date.to_fixed(date.getFullYear()%100)+\\\"\";\r\n\t\t\t\tcase \"%Y\": return \"\\\"+date.getFullYear()+\\\"\";\r\n\t\t\t\tcase \"%D\": return \"\\\"+this.locale.date.day_short[date.getDay()]+\\\"\";\r\n\t\t\t\tcase \"%l\": return \"\\\"+this.locale.date.day_full[date.getDay()]+\\\"\";\r\n\t\t\t\tcase \"%M\": return \"\\\"+this.locale.date.month_short[date.getMonth()]+\\\"\";\r\n\t\t\t\tcase \"%F\": return \"\\\"+this.locale.date.month_full[date.getMonth()]+\\\"\";\r\n\t\t\t\tcase \"%h\": return \"\\\"+this.date.to_fixed((date.getHours()+11)%12+1)+\\\"\";\r\n\t\t\t\tcase \"%g\": return \"\\\"+((date.getHours()+11)%12+1)+\\\"\";\r\n\t\t\t\tcase \"%G\": return \"\\\"+date.getHours()+\\\"\";\r\n\t\t\t\tcase \"%H\": return \"\\\"+this.date.to_fixed(date.getHours())+\\\"\";\r\n\t\t\t\tcase \"%i\": return \"\\\"+this.date.to_fixed(date.getMinutes())+\\\"\";\r\n\t\t\t\tcase \"%a\": return \"\\\"+(date.getHours()>11?\\\"pm\\\":\\\"am\\\")+\\\"\";\r\n\t\t\t\tcase \"%A\": return \"\\\"+(date.getHours()>11?\\\"PM\\\":\\\"AM\\\")+\\\"\";\r\n\t\t\t\tcase \"%s\": return \"\\\"+this.date.to_fixed(date.getSeconds())+\\\"\";\r\n\t\t\t\tcase \"%W\": return \"\\\"+this.date.to_fixed(this.date.getISOWeek(date))+\\\"\";\r\n\t\t\t\tdefault: return a;\r\n\t\t\t}\r\n\t\t});\r\n\t\tif (utc) format=format.replace(/date\\.get/g,\"date.getUTC\");\r\n\t\tvar func = new Function(\"date\",\"return \\\"\"+format+\"\\\";\");\r\n\r\n\t\treturn scheduler.date._bind_host_object(func);\r\n\t},\r\n\tstr_to_date:function(format, utc, exactFormat){\r\n\t\tvar stringToDateMethod = useCsp() ? csp_str_to_date : generateStringToDate;\r\n\t\tvar parseExactFormat = stringToDateMethod(format, utc);\r\n\t\t//return scheduler.date._bind_host_object(func);\r\n\t\t// eslint-disable-next-line\r\n\t\tvar yyyyMMddhhIIss = /^[0-9]{4}(\\-|\\/)[0-9]{2}(\\-|\\/)[0-9]{2} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/;\r\n\r\n\t\t// MM/dd/yyyy - default old format for xml-date\r\n\t\t// eslint-disable-next-line\r\n\t\tvar MMddyyyyhhIIss = /^[0-9]{2}\\/[0-9]{2}\\/[0-9]{4} ?(([0-9]{1,2}:[0-9]{2})(:[0-9]{1,2})?)?$/;\r\n\t\t// dd-MM-yyyy - default old format for api-date\r\n\t\t// eslint-disable-next-line\r\n\t\tvar ddMMyyyyhhIIss = /^[0-9]{2}\\-[0-9]{2}\\-[0-9]{4} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/;\r\n\t\t// eslint-disable-next-line\r\n\t\tvar ISO8601 = /^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$/;\r\n\r\n\t\tvar isYMDDate = function (datestr) {\r\n\t\t\treturn yyyyMMddhhIIss.test(String(datestr));\r\n\t\t};\r\n\r\n\t\tvar isMDYDate = function (datestr) {\r\n\t\t\treturn MMddyyyyhhIIss.test(String(datestr));\r\n\t\t};\r\n\t\tvar isDMYDate = function (datestr) {\r\n\t\t\treturn ddMMyyyyhhIIss.test(String(datestr));\r\n\t\t};\r\n\t\tvar isISO8601 = function (datestr) {\r\n\t\t\treturn ISO8601.test(datestr);\r\n\t\t};\r\n\r\n\t\tvar parseYMD = stringToDateMethod(\"%Y-%m-%d %H:%i:%s\", utc);\r\n\t\tvar parseMDY = stringToDateMethod(\"%m/%d/%Y %H:%i:%s\", utc);\r\n\t\tvar parseDMY = stringToDateMethod(\"%d-%m-%Y %H:%i:%s\", utc);\r\n\r\n\t\treturn function (dateString) {\r\n\r\n\t\t\tif (!exactFormat && !scheduler.config.parse_exact_format) {\r\n\t\t\t\tif (dateString && dateString.getISOWeek) {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t} else if (typeof dateString === \"number\") {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t} else if (isYMDDate(dateString)) {\r\n\t\t\t\t\treturn parseYMD(dateString);\r\n\t\t\t\t} else if (isMDYDate(dateString)) {\r\n\t\t\t\t\treturn parseMDY(dateString);\r\n\t\t\t\t} else if (isDMYDate(dateString)) {\r\n\t\t\t\t\treturn parseDMY(dateString);\r\n\t\t\t\t} else if (isISO8601(dateString)) {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn parseExactFormat.call(scheduler, dateString);\r\n\t\t};\r\n\t},\r\n\tgetISOWeek: function(ndate) {\r\n\t\tif(!ndate) return false;\r\n\t\tndate = this.date_part(new Date(ndate));\r\n\t\tvar nday = ndate.getDay();\r\n\t\tif (nday === 0) {\r\n\t\t\tnday = 7;\r\n\t\t}\r\n\t\tvar first_thursday = new Date(ndate.valueOf());\r\n\t\tfirst_thursday.setDate(ndate.getDate() + (4 - nday));\r\n\t\tvar year_number = first_thursday.getFullYear(); // year of the first Thursday\r\n\t\tvar ordinal_date = Math.round( (first_thursday.getTime() - new Date(year_number, 0, 1).getTime()) / 86400000); //ordinal date of the first Thursday - 1 (so not really ordinal date)\r\n\t\tvar week_number = 1 + Math.floor( ordinal_date / 7);\r\n\t\treturn week_number;\r\n\t},\r\n\tgetUTCISOWeek: function(ndate){\r\n\t\treturn this.getISOWeek(this.convert_to_utc(ndate));\r\n\t},\r\n\tconvert_to_utc: function(date) {\r\n\t\treturn new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds());\r\n\t}\r\n};\r\n\r\n}\r\n\r\n","export default function extend(scheduler) {\r\n\r\n/*\r\n%e\tDay of the month without leading zeros (01..31)\r\n%d\tDay of the month, 2 digits with leading zeros (01..31)\r\n%j\tDay of the year, 3 digits with leading zeros (001..366)\r\n%a\tA textual representation of a day, two letters\r\n%W\tA full textual representation of the day of the week\r\n\r\n%c\tNumeric representation of a month, without leading zeros (0..12)\r\n%m\tNumeric representation of a month, with leading zeros (00..12)\r\n%b\tA short textual representation of a month, three letters (Jan..Dec)\r\n%M\tA full textual representation of a month, such as January or March (January..December)\r\n\r\n%y\tA two digit representation of a year (93..03)\r\n%Y\tA full numeric representation of a year, 4 digits (1993..03)\r\n*/\r\n\r\nscheduler.config={\r\n\tdefault_date: \"%j %M %Y\",\r\n\tmonth_date: \"%F %Y\",\r\n\tload_date: \"%Y-%m-%d\",\r\n\tweek_date: \"%l\",\r\n\tday_date: \"%D %j\",\r\n\thour_date: \"%H:%i\",\r\n\tmonth_day: \"%d\",\r\n\t//xml_date: \"%m/%d/%Y %H:%i\",\r\n\tdate_format: \"%Y-%m-%d %H:%i\",\r\n\tapi_date: \"%d-%m-%Y %H:%i\",\r\n\tparse_exact_format: false,\r\n\tpreserve_length:true,\r\n\ttime_step: 5,\r\n\tdisplayed_event_color: \"#ff4a4a\",\r\n\tdisplayed_event_text_color: \"#ffef80\",\r\n\twide_form: 0,\r\n\tday_column_padding: 8,\r\n\tuse_select_menu_space: true,\r\n\tfix_tab_position: true,\r\n\tstart_on_monday: true,\r\n\tfirst_hour: 0,\r\n\tlast_hour: 24,\r\n\treadonly: false,\r\n\tdrag_resize: true,\r\n\tdrag_move: true,\r\n\tdrag_create: true,\r\n\tdrag_event_body: true,\r\n\tdblclick_create: true,\r\n\tdetails_on_dblclick: true,\r\n\tedit_on_create: true,\r\n\tdetails_on_create: true,\r\n\theader: null,\r\n\thour_size_px: 44,\r\n\tresize_month_events:false,\r\n\tresize_month_timed:false,\r\n\t\r\n\tresponsive_lightbox: false,\r\n\tseparate_short_events: true,\r\n\trtl:false,\r\n\r\n\tcascade_event_display: false,\r\n\tcascade_event_count: 4,\r\n\tcascade_event_margin: 30,\r\n\r\n\tmulti_day:true,\r\n\tmulti_day_height_limit: 200,\r\n\r\n\tdrag_lightbox: true,\r\n\tpreserve_scroll: true,\r\n\tselect: true,\r\n\r\n\tserver_utc: false,\r\n\ttouch:true,\r\n\ttouch_tip:true,\r\n\ttouch_drag:500,\r\n\ttouch_swipe_dates: false,\r\n\tquick_info_detached:true,\r\n\r\n\tpositive_closing: false,\r\n\t//header_datepicker: true,\r\n\tdrag_highlight: true,\r\n\tlimit_drag_out: false,\r\n\ticons_edit: [\"icon_save\", \"icon_cancel\"],\r\n\ticons_select: [\"icon_details\", \"icon_edit\", \"icon_delete\"],\r\n\tbuttons_left: [\"dhx_save_btn\", \"dhx_cancel_btn\"],\r\n\tbuttons_right: [\"dhx_delete_btn\"],\r\n\tlightbox: {\r\n\t\tsections: [\r\n\t\t\t{name: \"description\", map_to: \"text\", type: \"textarea\", focus: true},\r\n\t\t\t{name: \"time\", height: 72, type: \"time\", map_to: \"auto\"}\r\n\t\t]\r\n\t},\r\n\thighlight_displayed_event: true,\r\n\tleft_border: false,\r\n\r\n\tajax_error: \"alert\",//\"ignore\"|\"console\"\r\n\tdelay_render: 0,\r\n\ttimeline_swap_resize: true,\r\n\twai_aria_attributes: true,\r\n\twai_aria_application_role: true,\r\n\r\n\tcsp: \"auto\",\r\n\tevent_attribute: \"data-event-id\",\r\n\tshow_errors: true\r\n};\r\n\r\nscheduler.config.buttons_left.$initial = scheduler.config.buttons_left.join();\r\nscheduler.config.buttons_right.$initial = scheduler.config.buttons_right.join();\r\n\r\nscheduler._helpers = {\r\n\tparseDate: function parseDate(date) {\r\n\t\tvar parse = scheduler.templates.xml_date || scheduler.templates.parse_date;\r\n\t\treturn parse(date);\r\n\t},\r\n\tformatDate: function formatDate(date) {\r\n\t\tvar format = scheduler.templates.xml_format || scheduler.templates.format_date;\r\n\t\treturn format(date);\r\n\t}\r\n};\r\n\r\nscheduler.templates={};\r\nscheduler.init_templates=function(){\r\n\r\n\r\n\r\n\tvar d=scheduler.date.date_to_str;\r\n\tvar c=scheduler.config;\r\n\tvar f = function(a,b){\r\n\t\tfor (var c in b)\r\n\t\t\tif (!a[c]) a[c]=b[c];\r\n\t};\r\n\tf(scheduler.templates,{\r\n\t\tday_date:d(c.default_date),\r\n\t\tmonth_date:d(c.month_date),\r\n\t\tweek_date:function(d1,d2){\r\n\t\t\tif(c.rtl) {\r\n\t\t\t\treturn scheduler.templates.day_date(scheduler.date.add(d2,-1,\"day\"))+\" – \"+scheduler.templates.day_date(d1);\r\n\t\t\t} \r\n\t\t\treturn scheduler.templates.day_date(d1)+\" – \"+scheduler.templates.day_date(scheduler.date.add(d2,-1,\"day\"));\r\n\t\t},\r\n\t\tday_scale_date:d(c.default_date),\r\n\t\ttime_slot_text: function(date){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\ttime_slot_class: function(date){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\r\n\t\tmonth_scale_date:d(c.week_date),\r\n\t\tweek_scale_date:d(c.day_date),\r\n\t\thour_scale:d(c.hour_date),\r\n\t\ttime_picker:d(c.hour_date),\r\n\t\tevent_date:d(c.hour_date),\r\n\t\tmonth_day:d(c.month_day),\r\n\r\n\t\tload_format: d(c.load_date),\r\n\t//\txml_date:scheduler.date.str_to_date(c.xml_date,c.server_utc),\r\n\t//\txml_format:d(c.date_format,c.server_utc),\r\n\t\tformat_date: d(c.date_format, c.server_utc),\r\n\t\tparse_date:scheduler.date.str_to_date(c.date_format,c.server_utc),\r\n\t\tapi_date:scheduler.date.str_to_date(c.api_date, false, false),\r\n\t\tevent_header:function(start,end,ev){\r\n\r\n\t\t\tif(ev._mode === \"small\" || ev._mode === \"smallest\"){\r\n\t\t\t\treturn scheduler.templates.event_date(start);\r\n\t\t\t}else{\r\n\t\t\t\treturn scheduler.templates.event_date(start)+\" - \"+scheduler.templates.event_date(end);\r\n\t\t\t}\r\n\t\t},\r\n\t\tevent_text:function(start,end,ev){\r\n\t\t\treturn ev.text;\r\n\t\t},\r\n\t\tevent_class:function(start,end,ev){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tmonth_date_class:function(d){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tweek_date_class:function(d){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tevent_bar_date:function(start,end,ev) {\r\n\t\t\treturn scheduler.templates.event_date(start);\r\n\t\t},\r\n\t\tevent_bar_text:function(start,end,ev){\r\n\t\t\treturn ev.text;\r\n\t\t},\r\n\t\tmonth_events_link : function(date, count){\r\n\t\t\treturn \"View more(\"+count+\" events)\";\r\n\t\t},\r\n\t\tdrag_marker_class : function(start, end, event){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tdrag_marker_content : function(start, end, event){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\t/* Could be redifined */\r\n\t\ttooltip_date_format: scheduler.date.date_to_str(\"%Y-%m-%d %H:%i\"),\r\n\t\ttooltip_text: function(start, end, event) {\r\n\t\t\treturn \"Event: \" + event.text + \"
Start date: \" + scheduler.templates.tooltip_date_format(start) + \"
End date: \" + scheduler.templates.tooltip_date_format(end);\r\n\t\t},\r\n\r\n\t\tcalendar_month: d(\"%F %Y\"),\r\n\t\tcalendar_scale_date: d(\"%D\"),\r\n\t\tcalendar_date: d(\"%d\"),\r\n\t\tcalendar_time: d(\"%d-%m-%Y\")\r\n\r\n\t});\r\n\tthis.callEvent(\"onTemplatesReady\",[]);\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler._events = {};\r\nscheduler.clearAll = function() {\r\n\tthis._events = {};\r\n\tthis._loaded = {};\r\n\r\n\tthis._edit_id = null;\r\n\tthis._select_id = null;\r\n\tthis._drag_id = null;\r\n\tthis._drag_mode = null;\r\n\tthis._drag_pos = null;\r\n\tthis._new_event = null;\r\n\r\n\tthis.clear_view();\r\n\tthis.callEvent(\"onClearAll\", []);\r\n};\r\nscheduler.addEvent = function(start_date, end_date, text, id, extra_data) {\r\n\tif (!arguments.length)\r\n\t\treturn this.addEventNow();\r\n\tvar ev = start_date;\r\n\tif (arguments.length != 1) {\r\n\t\tev = extra_data || {};\r\n\t\tev.start_date = start_date;\r\n\t\tev.end_date = end_date;\r\n\t\tev.text = text;\r\n\t\tev.id = id;\r\n\t}\r\n\tev.id = ev.id || scheduler.uid();\r\n\tev.text = ev.text || \"\";\r\n\r\n\tif (typeof ev.start_date == \"string\") ev.start_date = this.templates.api_date(ev.start_date);\r\n\tif (typeof ev.end_date == \"string\") ev.end_date = this.templates.api_date(ev.end_date);\r\n\tvar d = (this.config.event_duration || this.config.time_step) * 60000;\r\n\tif (ev.start_date.valueOf() == ev.end_date.valueOf())\r\n\t\tev.end_date.setTime(ev.end_date.valueOf() + d);\r\n\r\n\tev.start_date.setMilliseconds(0);\r\n\tev.end_date.setMilliseconds(0);\r\n\r\n\tev._timed = this.isOneDayEvent(ev);\r\n\r\n\tvar is_new = !this._events[ev.id];\r\n\tthis._events[ev.id] = ev;\r\n\tthis.event_updated(ev);\r\n\tif (!this._loading)\r\n\t\tthis.callEvent(is_new ? \"onEventAdded\" : \"onEventChanged\", [ev.id, ev]);\r\n\treturn ev.id;\r\n};\r\nscheduler.deleteEvent = function(id, silent) {\r\n\tvar ev = this._events[id];\r\n\tif (!silent && (!this.callEvent(\"onBeforeEventDelete\", [id, ev]) || !this.callEvent(\"onConfirmedBeforeEventDelete\", [id, ev])))\r\n\t\treturn;\r\n\tif (ev) {\r\n\t\tif(scheduler.getState().select_id == id){\r\n\t\t\tscheduler.unselect();\r\n\t\t}\r\n\t\tdelete this._events[id];\r\n\t\tthis.event_updated(ev);\r\n\r\n\t\tif(this._drag_id == ev.id){\r\n\t\t\tthis._drag_id = null;\r\n\t\t\tthis._drag_mode=null;\r\n\t\t\tthis._drag_pos=null;\r\n\t\t}\r\n\t}\r\n\r\n\tthis.callEvent(\"onEventDeleted\", [id, ev]);\r\n};\r\nscheduler.getEvent = function(id) {\r\n\treturn this._events[id];\r\n};\r\nscheduler.setEvent = function(id, hash) {\r\n\tif(!hash.id)\r\n\t\thash.id = id;\r\n\r\n\tthis._events[id] = hash;\r\n};\r\nscheduler.for_rendered = function(id, method) {\r\n\tfor (var i = this._rendered.length - 1; i >= 0; i--)\r\n\t\tif (this._rendered[i].getAttribute(this.config.event_attribute) == id)\r\n\t\t\tmethod(this._rendered[i], i);\r\n};\r\nscheduler.changeEventId = function(id, new_id) {\r\n\tif (id == new_id) return;\r\n\tvar ev = this._events[id];\r\n\tif (ev) {\r\n\t\tev.id = new_id;\r\n\t\tthis._events[new_id] = ev;\r\n\t\tdelete this._events[id];\r\n\t}\r\n\tthis.for_rendered(id, function(r) {\r\n\t\tr.setAttribute(\"event_id\", new_id); // for backward compatibility\r\n\t\tr.setAttribute(scheduler.config.event_attribute, new_id);\r\n\t});\r\n\tif (this._select_id == id) this._select_id = new_id;\r\n\tif (this._edit_id == id) this._edit_id = new_id;\r\n\t//if (this._drag_id==id) this._drag_id=new_id;\r\n\tthis.callEvent(\"onEventIdChange\", [id, new_id]);\r\n};\r\n\r\n(function() {\r\n\tvar attrs = [\"text\", \"Text\", \"start_date\", \"StartDate\", \"end_date\", \"EndDate\"];\r\n\tvar create_getter = function(name) {\r\n\t\treturn function(id) { return (scheduler.getEvent(id))[name]; };\r\n\t};\r\n\tvar create_setter = function(name) {\r\n\t\treturn function(id, value) {\r\n\t\t\tvar ev = scheduler.getEvent(id);\r\n\t\t\tev[name] = value;\r\n\t\t\tev._changed = true;\r\n\t\t\tev._timed = this.isOneDayEvent(ev);\r\n\t\t\tscheduler.event_updated(ev, true);\r\n\t\t};\r\n\t};\r\n\tfor (var i = 0; i < attrs.length; i += 2) {\r\n\t\tscheduler[\"getEvent\" + attrs[i + 1]] = create_getter(attrs[i]);\r\n\t\tscheduler[\"setEvent\" + attrs[i + 1]] = create_setter(attrs[i]);\r\n\t}\r\n})();\r\n\r\nscheduler.event_updated = function(ev, force) {\r\n\tif (this.is_visible_events(ev))\r\n\t\tthis.render_view_data();\r\n\telse\r\n\t\tthis.clear_event(ev.id);\r\n};\r\nscheduler.is_visible_events = function(ev) {\r\n\tif(!this._min_date || !this._max_date){\r\n\t\treturn false;\r\n\t}\r\n\r\n\t//if in displayed dates\r\n\tvar in_visible_range = (ev.start_date.valueOf() < this._max_date.valueOf() && this._min_date.valueOf() < ev.end_date.valueOf());\r\n\r\n\tif(in_visible_range){\r\n\r\n\t\t//end dates are not between last/first hours\r\n\t\tvar evFirstHour = ev.start_date.getHours(),\r\n\t\t\tevLastHour = ev.end_date.getHours() + (ev.end_date.getMinutes()/60),\r\n\t\t\tlastHour = this.config.last_hour,\r\n\t\t\tfirstHour = this.config.first_hour;\r\n\r\n\t\tvar end_dates_visible = (this._table_view || !((evLastHour > lastHour || evLastHour <= firstHour) && (evFirstHour >= lastHour || evFirstHour < firstHour)));\r\n\r\n\t\tif(end_dates_visible){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\r\n\t\t\t//event is bigger than area hidden between last/first hours\r\n\t\t\tvar event_duration = (ev.end_date.valueOf() - ev.start_date.valueOf()) / (1000*60*60),//hours\r\n\t\t\t\thidden_duration = 24 - (this.config.last_hour - this.config.first_hour);\r\n\r\n\t\t\treturn !!((event_duration > hidden_duration) || (evFirstHour < lastHour && evLastHour > firstHour));\r\n\r\n\t\t}\r\n\t}else{\r\n\t\treturn false;\r\n\t}\r\n};\r\nscheduler.isOneDayEvent = function(ev) {\r\n\t// decrease by one ms so events that ends on midnight on the next day were still considered one day events\r\n\t// e.g. (09-02-2018 19:00 - 10-02-2018 00:00)\r\n\t// events >= 24h long are considered multiday\r\n\tvar checkEndDate = new Date(ev.end_date.valueOf() - 1);\r\n\treturn (\r\n\t\tev.start_date.getFullYear() === checkEndDate.getFullYear() &&\r\n\t\tev.start_date.getMonth() === checkEndDate.getMonth() &&\r\n\t\tev.start_date.getDate() === checkEndDate.getDate()\r\n\t) && ((ev.end_date.valueOf() - ev.start_date.valueOf()) < (1000 * 60 * 60 * 24));\r\n};\r\n\r\nscheduler.get_visible_events = function(only_timed) {\r\n\t//not the best strategy for sure\r\n\tvar stack = [];\r\n\r\n\tfor (var id in this._events)\r\n\t\tif (this.is_visible_events(this._events[id]))\r\n\t\t\tif (!only_timed || this._events[id]._timed)\r\n\t\t\t\tif (this.filter_event(id, this._events[id]))\r\n\t\t\t\t\tstack.push(this._events[id]);\r\n\r\n\treturn stack;\r\n};\r\nscheduler.filter_event = function(id, ev) {\r\n\tvar filter = this[\"filter_\" + this._mode];\r\n\treturn (filter) ? filter(id, ev) : true;\r\n};\r\nscheduler._is_main_area_event = function(ev){\r\n\treturn !!ev._timed;\r\n};\r\nscheduler.render_view_data = function(evs, hold) {\r\n\tvar full = false;\r\n\tif (!evs) {\r\n\t\tfull = true;\r\n\t\tif (this._not_render) {\r\n\t\t\tthis._render_wait = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._render_wait = false;\r\n\r\n\t\tthis.clear_view();\r\n\t\tevs = this.get_visible_events(!(this._table_view || this.config.multi_day));\r\n\t}\r\n\tfor(var i= 0, len = evs.length; i < len; i++){\r\n\t\tthis._recalculate_timed(evs[i]);\r\n\t}\r\n\r\n\tif (this.config.multi_day && !this._table_view) {\r\n\r\n\t\tvar tvs = [];\r\n\t\tvar tvd = [];\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tif (this._is_main_area_event(evs[i]))\r\n\t\t\t\ttvs.push(evs[i]);\r\n\t\t\telse\r\n\t\t\t\ttvd.push(evs[i]);\r\n\t\t}\r\n\r\n\t\tif(!this._els['dhx_multi_day']){\r\n\t\t\tvar message = scheduler._commonErrorMessages.unknownView(this._mode);\r\n\t\t\tthrow new Error(message);\r\n\t\t}\r\n\r\n\t\t// multiday events\r\n\t\tthis._rendered_location = this._els['dhx_multi_day'][0];\r\n\t\tthis._table_view = true;\r\n\t\tthis.render_data(tvd, hold);\r\n\t\tthis._table_view = false;\r\n\r\n\t\t// normal events\r\n\t\tthis._rendered_location = this._els['dhx_cal_data'][0];\r\n\t\tthis._table_view = false;\r\n\t\tthis.render_data(tvs, hold);\r\n\r\n\t} else {\r\n\t\tvar buffer = document.createDocumentFragment();\r\n\t\tvar renderedLocation = this._els['dhx_cal_data'][0];\r\n\t\tthis._rendered_location = buffer;\r\n\t\tthis.render_data(evs, hold);\r\n\t\trenderedLocation.appendChild(buffer);\r\n\t\tthis._rendered_location = renderedLocation;\r\n\r\n\t}\r\n\r\n\tif(full){\r\n\t\tthis.callEvent(\"onDataRender\", []);\r\n\t}\r\n};\r\n\r\n\r\nscheduler._view_month_day = function(e){\r\n\tvar date = scheduler.getActionData(e).date;\r\n\tif(!scheduler.callEvent(\"onViewMoreClick\", [date]))\r\n\t\treturn;\r\n\tscheduler.setCurrentView(date, \"day\");\r\n};\r\n\r\nscheduler._render_month_link = function(ev){\r\n\tvar parent = this._rendered_location;\r\n\tvar toRender = this._lame_clone(ev);\r\n\r\n\t//render links in each cell of multiday events\r\n\tfor(var d = ev._sday; d < ev._eday; d++){\r\n\r\n\t\ttoRender._sday = d;\r\n\t\ttoRender._eday = d+1;\r\n\r\n\t\tvar date = scheduler.date;\r\n\t\tvar curr = scheduler._min_date;\r\n\t\tcurr = date.add(curr, toRender._sweek, \"week\");\r\n\t\tcurr = date.add(curr, toRender._sday, \"day\");\r\n\t\tvar count = scheduler.getEvents(curr, date.add(curr, 1, \"day\")).length;\r\n\r\n\t\tvar pos = this._get_event_bar_pos(toRender);\r\n\t\tvar widt = (pos.x2 - pos.x);\r\n\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tscheduler.event(el, \"click\", function(e){scheduler._view_month_day(e);});\r\n\t\tel.className = \"dhx_month_link\";\r\n\t\tel.style.top = pos.y + \"px\";\r\n\t\tel.style.left = pos.x + \"px\";\r\n\t\tel.style.width = widt + \"px\";\r\n\t\tel.innerHTML = scheduler.templates.month_events_link(curr, count);\r\n\t\tthis._rendered.push(el);\r\n\r\n\t\tparent.appendChild(el);\r\n\t}\r\n};\r\n\r\nscheduler._recalculate_timed = function(id){\r\n\tif(!id) return;\r\n\tvar ev;\r\n\tif(typeof(id) != \"object\")\r\n\t\tev = this._events[id];\r\n\telse\r\n\t\tev = id;\r\n\tif(!ev) return;\r\n\tev._timed = scheduler.isOneDayEvent(ev);\r\n};\r\nscheduler.attachEvent(\"onEventChanged\", scheduler._recalculate_timed);\r\nscheduler.attachEvent(\"onEventAdded\", scheduler._recalculate_timed);\r\n\r\nscheduler.render_data = function(evs, hold) {\r\n\tevs = this._pre_render_events(evs, hold);\r\n\tvar containers = {};\r\n\tfor (var i = 0; i < evs.length; i++)\r\n\t\tif (this._table_view){\r\n\t\t\tif(scheduler._mode != 'month'){\r\n\t\t\t\tthis.render_event_bar(evs[i]);//may be multiday section on other views\r\n\t\t\t}else{\r\n\r\n\t\t\t\tvar max_evs = scheduler.config.max_month_events;\r\n\t\t\t\tif(max_evs !== max_evs*1 || evs[i]._sorder < max_evs){\r\n\t\t\t\t\t//of max number events per month cell is set and event can be rendered\r\n\t\t\t\t\tthis.render_event_bar(evs[i]);\r\n\t\t\t\t}else if(max_evs !== undefined && evs[i]._sorder == max_evs){\r\n\t\t\t\t\t//render 'view more' links\r\n\t\t\t\t\tscheduler._render_month_link(evs[i]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\t//do not render events with ordinal number > maximum events per cell\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t}else{\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tvar parent = scheduler.locate_holder(ev._sday);\r\n\t\t\tif (!parent) continue; //attempt to render non-visible event\r\n\r\n\t\t\tif(!containers[ev._sday]){\r\n\t\t\t\tcontainers[ev._sday] = {\r\n\t\t\t\t\treal: parent,\r\n\t\t\t\t\tbuffer: document.createDocumentFragment(),\r\n\t\t\t\t\twidth: parent.clientWidth\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\tvar container = containers[ev._sday];\r\n\t\t\tthis.render_event(ev, container.buffer, container.width);\r\n\t\t}\r\n\r\n\t\tfor(var i in containers){\r\n\t\t\tvar container = containers[i];\r\n\t\t\tif(container.real && container.buffer){\r\n\t\t\t\tcontainer.real.appendChild(container.buffer);\r\n\t\t\t}\r\n\t\t}\r\n};\r\n\r\nscheduler._get_first_visible_cell = function(cells) {\r\n\tfor (var i = 0; i < cells.length; i++) {\r\n\t\tif ((cells[i].className || \"\").indexOf(\"dhx_scale_ignore\") == -1) {\r\n\t\t\treturn cells[i];\r\n\t\t}\r\n\t}\r\n\t// if no visible cell found, return cells[0] to be more tolerant, since it's the original logic\r\n\treturn cells[0];\r\n};\r\n\r\nscheduler._pre_render_events = function(evs, hold) {\r\n\tvar hb = this.xy.bar_height;\r\n\tvar h_old = this._colsS.heights;\r\n\tvar h = this._colsS.heights = [0, 0, 0, 0, 0, 0, 0];\r\n\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\r\n\tif (!this._table_view) {\r\n\t\tevs = this._pre_render_events_line(evs, hold); //ignore long events for now\r\n\t}\r\n\telse {\r\n\t\tevs = this._pre_render_events_table(evs, hold);\r\n\t}\r\n\tif (this._table_view) {\r\n\t\tif (hold)\r\n\t\t\tthis._colsS.heights = h_old;\r\n\t\telse {\r\n\t\t\tvar monthRows = data.querySelectorAll(\".dhx_cal_month_row\");\r\n\t\t\tif (monthRows.length) {\r\n\t\t\t\tfor (var i = 0; i < monthRows.length; i++) {\r\n\t\t\t\t\th[i]++;\r\n\t\t\t\t\tvar cells = monthRows[i].querySelectorAll(\".dhx_cal_month_cell\");\r\n\t\t\t\t\tvar cellHeight = this._colsS.height - this.xy.month_head_height;\r\n\t\t\t\t\tif ((h[i]) * hb > cellHeight) { // 22 - height of cell's header\r\n\t\t\t\t\t\t//we have overflow, update heights\r\n\r\n\t\t\t\t\t\tvar cHeight = cellHeight;\r\n\t\t\t\t\t\tif(this.config.max_month_events*1 !== this.config.max_month_events || h[i] <= this.config.max_month_events){\r\n\t\t\t\t\t\t\tcHeight = h[i] * hb;\r\n\t\t\t\t\t\t}else if( (this.config.max_month_events + 1) * hb > cellHeight){\r\n\t\t\t\t\t\t\tcHeight = (this.config.max_month_events + 1) * hb;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tmonthRows[i].style.height = (cHeight + this.xy.month_head_height) + \"px\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\th[i] = (h[i - 1] || 0) + scheduler._get_first_visible_cell(cells).offsetHeight;\r\n\t\t\t\t}\r\n\t\t\t\th.unshift(0);\r\n\t\t\t\tconst dataArea = this.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tif (dataArea.offsetHeight < dataArea.scrollHeight && !scheduler._colsS.scroll_fix && scheduler.xy.scroll_width) {\r\n\r\n\t\t\t\t\tvar scale_settings = scheduler._colsS,\r\n\t\t\t\t\t\tsum_width = scale_settings[scale_settings.col_length],\r\n\t\t\t\t\t\trow_heights = scale_settings.heights.slice();\r\n\r\n\t\t\t\t\tsum_width -= (scheduler.xy.scroll_width || 0);\r\n\t\t\t\t\tthis._calc_scale_sizes(sum_width, this._min_date, this._max_date);\r\n\t\t\t\t\tscheduler._colsS.heights = row_heights;\r\n\r\n\t\t\t\t\tthis.set_xy(this._els[\"dhx_cal_header\"][0], sum_width/*, this.xy.scale_height*/);\r\n\t\t\t\t\tscheduler._render_scales(this._els[\"dhx_cal_header\"][0]);\r\n\t\t\t\t\tscheduler._render_month_scale(this._els[\"dhx_cal_data\"][0], this._get_timeunit_start(), this._min_date);\r\n\r\n\t\t\t\t\tscale_settings.scroll_fix = true;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (!evs.length && this._els[\"dhx_multi_day\"][0].style.visibility == \"visible\")\r\n\t\t\t\t\th[0] = -1;\r\n\t\t\t\tif (evs.length || h[0] == -1) {\r\n\t\t\t\t\t//shift days to have space for multiday events\r\n\t\t\t\t\t//var childs = evl.parentNode.childNodes;\r\n\r\n\t\t\t\t\t// +1 so multiday events would have 2px from top and 2px from bottom by default\r\n\t\t\t\t\tvar full_multi_day_height = (h[0] + 1) * hb + 4;\r\n\r\n\t\t\t\t\tvar used_multi_day_height = full_multi_day_height;\r\n\t\t\t\t\tvar used_multi_day_height_css = full_multi_day_height + \"px\";\r\n\t\t\t\t\tif (this.config.multi_day_height_limit) {\r\n\t\t\t\t\t\tused_multi_day_height = Math.min(full_multi_day_height, this.config.multi_day_height_limit) ;\r\n\t\t\t\t\t\tused_multi_day_height_css = used_multi_day_height + \"px\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tvar multi_day_section = this._els[\"dhx_multi_day\"][0];\r\n\t\t\t\t\tmulti_day_section.style.height = used_multi_day_height_css;\r\n\t\t\t\t\tmulti_day_section.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\tmulti_day_section.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\r\n\t\t\t\t\t// icon\r\n\t\t\t\t\tvar multi_day_icon = this._els[\"dhx_multi_day\"][1];\r\n\t\t\t\t\tmulti_day_icon.style.height = used_multi_day_height_css;\r\n\t\t\t\t\tmulti_day_icon.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\tmulti_day_icon.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\t\t\t\t\tmulti_day_icon.className = h[0] ? \"dhx_multi_day_icon\" : \"dhx_multi_day_icon_small\";\r\n\t\t\t\t\tthis._dy_shift = (h[0] + 1) * hb;\r\n\t\t\t\t\tif(this.config.multi_day_height_limit){\r\n\t\t\t\t\t\tthis._dy_shift = Math.min(this.config.multi_day_height_limit, this._dy_shift);\r\n\t\t\t\t\t}\r\n\t\t\t\t\th[0] = 0;\r\n\r\n\t\t\t\t\tif (used_multi_day_height != full_multi_day_height) {\r\n\r\n\t\t\t\t\t\tmulti_day_section.style.overflowY = \"auto\";\r\n\t\t\t\t\t//\tmulti_day_section.style.width = (parseInt(this._els[\"dhx_cal_navline\"][0].style.width)) + \"px\";\r\n\r\n\t\t\t\t\t\tmulti_day_icon.style.position = \"fixed\";\r\n\t\t\t\t\t\tmulti_day_icon.style.top = \"\";\r\n\t\t\t\t\t\tmulti_day_icon.style.left = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn evs;\r\n};\r\nscheduler._get_event_sday = function(ev) {\r\n\t// get day in current view\r\n\t// use rounding for 23 or 25 hour days on DST\r\n\tvar datePart = this.date.day_start(new Date(ev.start_date));\r\n\treturn Math.round((datePart.valueOf() - this._min_date.valueOf()) / (24 * 60 * 60 * 1000));\r\n};\r\nscheduler._get_event_mapped_end_date = function(ev) {\r\n\tvar end_date = ev.end_date;\r\n\tif (this.config.separate_short_events) {\r\n\t\tvar ev_duration = (ev.end_date - ev.start_date) / 60000; // minutes\r\n\t\tif (ev_duration < this._min_mapped_duration) {\r\n\t\t\tend_date = this.date.add(end_date, this._min_mapped_duration - ev_duration, \"minute\");\r\n\t\t}\r\n\t}\r\n\treturn end_date;\r\n};\r\nscheduler._pre_render_events_line = function(evs, hold){\r\n\tevs.sort(function(a, b) {\r\n\t\tif (a.start_date.valueOf() == b.start_date.valueOf())\r\n\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\treturn a.start_date > b.start_date ? 1 : -1;\r\n\t});\r\n\tvar days = []; //events by weeks\r\n\tvar evs_originals = [];\r\n\r\n\tthis._min_mapped_duration = Math.floor(this.xy.min_event_height * 60 / this.config.hour_size_px); // values could change along the way\r\n\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tvar ev = evs[i];\r\n\r\n\t\t//check date overflow\r\n\t\tvar sd = ev.start_date;\r\n\t\tvar ed = ev.end_date;\r\n\t\t//check scale overflow\r\n\t\tvar sh = sd.getHours();\r\n\t\tvar eh = ed.getHours();\r\n\t\tev._sday = this._get_event_sday(ev); // sday based on event start_date\r\n\t\tif (this._ignores[ev._sday]){\r\n\t\t\t//ignore event\r\n\t\t\tevs.splice(i,1);\r\n\t\t\ti--;\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\tif (!days[ev._sday]) days[ev._sday] = [];\r\n\r\n\t\tif (!hold) {\r\n\t\t\tev._inner = false;\r\n\r\n\t\t\tvar stack = days[ev._sday];\r\n\r\n\t\t\twhile (stack.length) {\r\n\t\t\t\tvar t_ev = stack[stack.length - 1];\r\n\t\t\t\tvar t_end_date = this._get_event_mapped_end_date(t_ev);\r\n\t\t\t\tif (t_end_date.valueOf() <= ev.start_date.valueOf()) {\r\n\t\t\t\t\tstack.splice(stack.length - 1, 1);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar slot_index = stack.length;\r\n\t\t\tvar sorderSet = false;\r\n\t\t\tfor (var j = 0; j < stack.length; j++) {\r\n\t\t\t\tvar t_ev = stack[j];\r\n\t\t\t\tvar t_end_date = this._get_event_mapped_end_date(t_ev);\r\n\t\t\t\tif (t_end_date.valueOf() <= ev.start_date.valueOf()) {\r\n\t\t\t\t\tsorderSet = true;\r\n\t\t\t\t\tev._sorder = t_ev._sorder;\r\n\t\t\t\t\tslot_index = j;\r\n\t\t\t\t\tev._inner = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (stack.length)\r\n\t\t\t\tstack[stack.length - 1]._inner = true;\r\n\r\n\t\t\tif (!sorderSet) {\r\n\t\t\t\tif (stack.length) {\r\n\t\t\t\t\tif (stack.length <= stack[stack.length - 1]._sorder) {\r\n\t\t\t\t\t\tif (!stack[stack.length - 1]._sorder)\r\n\t\t\t\t\t\t\tev._sorder = 0;\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tfor (j = 0; j < stack.length; j++) {\r\n\t\t\t\t\t\t\t\tvar _is_sorder = false;\r\n\t\t\t\t\t\t\t\tfor (var k = 0; k < stack.length; k++) {\r\n\t\t\t\t\t\t\t\t\tif (stack[k]._sorder == j) {\r\n\t\t\t\t\t\t\t\t\t\t_is_sorder = true;\r\n\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (!_is_sorder) {\r\n\t\t\t\t\t\t\t\t\tev._sorder = j;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\tev._inner = true;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tvar _max_sorder = stack[0]._sorder;\r\n\t\t\t\t\t\tfor (j = 1; j < stack.length; j++) {\r\n\t\t\t\t\t\t\tif (stack[j]._sorder > _max_sorder)\r\n\t\t\t\t\t\t\t\t_max_sorder = stack[j]._sorder;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tev._sorder = _max_sorder + 1;\r\n\t\t\t\t\t\tev._inner = false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} else\r\n\t\t\t\t\tev._sorder = 0;\r\n\t\t\t}\r\n\r\n\t\t\tstack.splice(slot_index, slot_index == stack.length ? 0 : 1, ev);\r\n\r\n\t\t\tif (stack.length > (stack.max_count || 0)) {\r\n\t\t\t\tstack.max_count = stack.length;\r\n\t\t\t\tev._count = stack.length;\r\n\t\t\t} else {\r\n\t\t\t\tev._count = (ev._count) ? ev._count : 1;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (sh < this.config.first_hour || eh >= this.config.last_hour) {\r\n\t\t\t// Need to create copy of event as we will be changing it's start/end date\r\n\t\t\t// e.g. first_hour = 11 and event.start_date hours = 9. Need to preserve that info\r\n\t\t\tevs_originals.push(ev);\r\n\t\t\tevs[i] = ev = this._copy_event(ev);\r\n\r\n\t\t\tif (sh < this.config.first_hour) {\r\n\t\t\t\tev.start_date.setHours(this.config.first_hour);\r\n\t\t\t\tev.start_date.setMinutes(0);\r\n\t\t\t}\r\n\t\t\tif (eh >= this.config.last_hour) {\r\n\t\t\t\tev.end_date.setMinutes(0);\r\n\t\t\t\tev.end_date.setHours(this.config.last_hour);\r\n\t\t\t}\r\n\r\n\t\t\tif (ev.start_date > ev.end_date || sh == this.config.last_hour) {\r\n\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (!hold) {\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tevs[i]._count = days[evs[i]._sday].max_count;\r\n\t\t}\r\n\t\tfor (var i = 0; i < evs_originals.length; i++)\r\n\t\t\tevs_originals[i]._count = days[evs_originals[i]._sday].max_count;\r\n\t}\r\n\r\n\treturn evs;\r\n};\r\nscheduler._time_order = function(evs) {\r\n\tevs.sort(function(a, b) {\r\n\t\tif (a.start_date.valueOf() == b.start_date.valueOf()) {\r\n\t\t\tif (a._timed && !b._timed) return 1;\r\n\t\t\tif (!a._timed && b._timed) return -1;\r\n\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\t}\r\n\t\treturn a.start_date > b.start_date ? 1 : -1;\r\n\t});\r\n};\r\n\r\nscheduler._is_any_multiday_cell_visible = function(from, to, event){\r\n\tvar cols = this._cols.length;\r\n\tvar isAnyCellVisible = false;\r\n\tvar checkDate = from;\r\n\tvar noCells = true;\r\n\tvar lastDayEnd = new Date(to);\r\n\tif(scheduler.date.day_start(new Date(to)).valueOf() != to.valueOf()){\r\n\t\tlastDayEnd = scheduler.date.day_start(lastDayEnd);\r\n\t\tlastDayEnd = scheduler.date.add(lastDayEnd, 1, \"day\");\r\n\t}\r\n\twhile(checkDate < lastDayEnd){\r\n\t\tnoCells = false;\r\n\t\tvar cellIndex = this.locate_holder_day(checkDate, false, event);\r\n\t\tvar weekCellIndex = cellIndex % cols;\r\n\t\tif(!this._ignores[weekCellIndex]){\r\n\t\t\tisAnyCellVisible = true;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tcheckDate = scheduler.date.add(checkDate, 1, \"day\");\r\n\t}\r\n\treturn noCells || isAnyCellVisible;\r\n};\r\n\r\nscheduler._pre_render_events_table = function(evs, hold) { // max - max height of week slot\r\n\tthis._time_order(evs);\r\n\tvar out = [];\r\n\tvar weeks = [\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[]\r\n\t]; //events by weeks\r\n\tvar max = this._colsS.heights;\r\n\tvar start_date;\r\n\tvar cols = this._cols.length;\r\n\tvar chunks_info = {};\r\n\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tvar ev = evs[i];\r\n\t\tvar id = ev.id;\r\n\t\tif (!chunks_info[id]) {\r\n\t\t\tchunks_info[id] = {\r\n\t\t\t\tfirst_chunk: true,\r\n\t\t\t\tlast_chunk: true\r\n\t\t\t};\r\n\t\t}\r\n\t\tvar chunk_info = chunks_info[id];\r\n\t\tvar sd = (start_date || ev.start_date);\r\n\t\tvar ed = ev.end_date;\r\n\t\t//trim events which are crossing through current view\r\n\t\tif (sd < this._min_date) {\r\n\t\t\tchunk_info.first_chunk = false;\r\n\t\t\tsd = this._min_date;\r\n\t\t}\r\n\t\tif (ed > this._max_date) {\r\n\t\t\tchunk_info.last_chunk = false;\r\n\t\t\ted = this._max_date;\r\n\t\t}\r\n\r\n\t\tvar locate_s = this.locate_holder_day(sd, false, ev);\r\n\t\tev._sday = locate_s % cols;\r\n\t\t//skip single day events for ignored dates\r\n\t\tif (this._ignores[ev._sday] && ev._timed) continue;\r\n\r\n\t\tvar locate_e = this.locate_holder_day(ed, true, ev) || cols;\r\n\t\tev._eday = (locate_e % cols) || cols; //cols used to fill full week, when event end on monday\r\n\t\tev._length = locate_e - locate_s;\r\n\t\t//3600000 - compensate 1 hour during winter|summer time shift\r\n\t\tev._sweek = Math.floor((this._correct_shift(sd.valueOf(), 1) - this._min_date.valueOf()) / (60 * 60 * 1000 * 24 * cols));\r\n\r\n\t\tvar isAnyCellVisible = scheduler._is_any_multiday_cell_visible(sd, ed, ev);\r\n\r\n\t\tif(!isAnyCellVisible){\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\t//current slot\r\n\t\tvar stack = weeks[ev._sweek];\r\n\t\t//check order position\r\n\t\tvar stack_line;\r\n\r\n\t\tfor (stack_line = 0; stack_line < stack.length; stack_line++)\r\n\t\t\tif (stack[stack_line]._eday <= ev._sday)\r\n\t\t\t\tbreak;\r\n\r\n\t\tif (!ev._sorder || !hold) {\r\n\t\t\tev._sorder = stack_line;\r\n\t\t}\r\n\r\n\t\tif (ev._sday + ev._length <= cols) {\r\n\t\t\tstart_date = null;\r\n\t\t\tout.push(ev);\r\n\t\t\tstack[stack_line] = ev;\r\n\t\t\t//get max height of slot\r\n\t\t\tmax[ev._sweek] = stack.length - 1;\r\n\t\t\tev._first_chunk = chunk_info.first_chunk;\r\n\t\t\tev._last_chunk = chunk_info.last_chunk;\r\n\t\t} else { // split long event in chunks\r\n\t\t\tvar copy = this._copy_event(ev);\r\n\t\t\tcopy.id = ev.id;\r\n\t\t\tcopy._length = cols - ev._sday;\r\n\t\t\tcopy._eday = cols;\r\n\t\t\tcopy._sday = ev._sday;\r\n\t\t\tcopy._sweek = ev._sweek;\r\n\t\t\tcopy._sorder = ev._sorder;\r\n\t\t\tcopy.end_date = this.date.add(sd, copy._length, \"day\");\r\n\t\t\tcopy._first_chunk = chunk_info.first_chunk;\r\n\t\t\tif (chunk_info.first_chunk) {\r\n\t\t\t\tchunk_info.first_chunk = false;\r\n\t\t\t}\r\n\r\n\t\t\tout.push(copy);\r\n\t\t\tstack[stack_line] = copy;\r\n\t\t\tstart_date = copy.end_date;\r\n\t\t\t//get max height of slot\r\n\t\t\tmax[ev._sweek] = stack.length - 1;\r\n\t\t\ti--;\r\n\t\t\tcontinue; //repeat same step\r\n\t\t}\r\n\t}\r\n\treturn out;\r\n};\r\nscheduler._copy_dummy = function() {\r\n\tvar a = new Date(this.start_date);\r\n\tvar b = new Date(this.end_date);\r\n\tthis.start_date = a;\r\n\tthis.end_date = b;\r\n};\r\nscheduler._copy_event = function(ev) {\r\n\tthis._copy_dummy.prototype = ev;\r\n\treturn new this._copy_dummy();\r\n\t//return {start_date:ev.start_date, end_date:ev.end_date, text:ev.text, id:ev.id}\r\n};\r\nscheduler._rendered = [];\r\nscheduler.clear_view = function() {\r\n\tfor (var i = 0; i < this._rendered.length; i++) {\r\n\t\tvar obj = this._rendered[i];\r\n\t\tif (obj.parentNode) obj.parentNode.removeChild(obj);\r\n\t}\r\n\tthis._rendered = [];\r\n};\r\nscheduler.updateEvent = function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tthis.clear_event(id);\r\n\r\n\tif (ev && this.is_visible_events(ev) && this.filter_event(id, ev) && (this._table_view || this.config.multi_day || ev._timed)) {\r\n\t\tif (this.config.update_render){\r\n\t\t\tthis.render_view_data();\r\n\t\t}else{\r\n\t\t\tif(this.getState().mode == \"month\" && !this.getState().drag_id && !this.isOneDayEvent(ev)){\r\n\t\t\t\tthis.render_view_data();\r\n\t\t\t}else{\r\n\t\t\t\tthis.render_view_data([ev], true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.clear_event = function(id) {\r\n\tthis.for_rendered(id, function(node, i) {\r\n\t\tif (node.parentNode)\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\tscheduler._rendered.splice(i, 1);\r\n\t});\r\n};\r\nscheduler._y_from_date = function(date){\r\n\tvar sm = date.getHours() * 60 + date.getMinutes();\r\n\treturn ((Math.round((sm * 60 * 1000 - this.config.first_hour * 60 * 60 * 1000) * this.config.hour_size_px / (60 * 60 * 1000))) % (this.config.hour_size_px * 24)); //42px/hour\r\n};\r\nscheduler._calc_event_y = function(ev, min_height){\r\n\tmin_height = min_height || 0;\r\n\tvar sm = ev.start_date.getHours() * 60 + ev.start_date.getMinutes();\r\n\tvar em = (ev.end_date.getHours() * 60 + ev.end_date.getMinutes()) || (scheduler.config.last_hour * 60);\r\n\tvar top = this._y_from_date(ev.start_date);\r\n\r\n\tvar height = Math.max(min_height, (em - sm) * this.config.hour_size_px / 60); //42px/hour\r\n\treturn {\r\n\t\ttop: top,\r\n\t\theight: height\r\n\t};\r\n};\r\nscheduler.render_event = function(ev, buffer, parentWidth) {\r\n\tvar menu = scheduler.xy.menu_width;\r\n\tvar menu_offset = (this.config.use_select_menu_space) ? 0 : menu;\r\n\tif (ev._sday < 0) return; //can occur in case of recurring event during time shift\r\n\r\n\tvar parent = scheduler.locate_holder(ev._sday);\r\n\tif (!parent) return; //attempt to render non-visible event\r\n\r\n\tbuffer = buffer || parent;\r\n\r\n\tvar pos_y = this._calc_event_y(ev, scheduler.xy.min_event_height);\r\n\tvar top = pos_y.top,\r\n\t\theight = pos_y.height;\r\n\r\n\tvar ev_count = ev._count || 1;\r\n\tvar ev_sorder = ev._sorder || 0;\r\n\r\n\tparentWidth = parentWidth || parent.clientWidth;\r\n\tif(this.config.day_column_padding){\r\n\t\tparentWidth -= this.config.day_column_padding;\r\n\t}\r\n\r\n\tvar width = Math.floor((parentWidth - menu_offset) / ev_count);\r\n\tvar left = ev_sorder * width + (ev_sorder > 0 ? 2 : 1);\r\n\tif (!ev._inner) width = width * (ev_count - ev_sorder);\r\n\tif (this.config.cascade_event_display) {\r\n\t\tvar limit = this.config.cascade_event_count;\r\n\t\tvar margin = this.config.cascade_event_margin;\r\n\t\tleft = ev_sorder % limit * margin;\r\n\t\tvar right = (ev._inner) ? (ev_count - ev_sorder - 1) % limit * margin / 2 : 0;\r\n\t\twidth = Math.floor(parentWidth - menu_offset - left - right);\r\n\t}\r\n\r\n\tif(height < 30){\r\n\t\tev._mode = \"smallest\";\r\n\t}else if(height < 42){\r\n\t\tev._mode = \"small\";\r\n\t}else{\r\n\t\tev._mode = null;\r\n\t}\r\n\r\n\tvar d = this._render_v_bar(ev, menu_offset + left, top, width, height, ev._text_style, scheduler.templates.event_header(ev.start_date, ev.end_date, ev), scheduler.templates.event_text(ev.start_date, ev.end_date, ev));\r\n\t\r\n\tif(ev._mode === \"smallest\"){\r\n\t\td.classList.add(\"dhx_cal_event--xsmall\");\r\n\t}else if (ev._mode === \"small\"){\r\n\t\td.classList.add(\"dhx_cal_event--small\");\r\n\t}\r\n\r\n\tthis._waiAria.eventAttr(ev, d);\r\n\tthis._rendered.push(d);\r\n\tbuffer.appendChild(d);\r\n\r\n\tvar parentPosition = parseInt( this.config.rtl ? parent.style.right : parent.style.left, 10);\r\n\r\n\tleft = left + parentPosition + menu_offset;\r\n\r\n\tif (this._edit_id == ev.id) {\r\n\r\n\t\td.style.zIndex = 1; //fix overlapping issue\r\n\t\twidth = Math.max(width, scheduler.xy.editor_width);\r\n\t\td = document.createElement(\"div\");\r\n\t\td.setAttribute(\"event_id\", ev.id); // for backward compatibility\r\n\t\td.setAttribute(this.config.event_attribute, ev.id);\r\n\r\n\t\tthis._waiAria.eventAttr(ev, d);\r\n\r\n\t\td.className = \"dhx_cal_event dhx_cal_editor\";\r\n\t\tif (this.config.rtl) left++;\r\n\t\tthis.set_xy(d, width, height, left, top);\r\n\r\n\r\n\t\tif(ev.color){\r\n\t\t\td.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tvar tplClass = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\r\n\t\tif(tplClass){\r\n\t\t\td.className += \" \" + tplClass;\r\n\t\t}\r\n\t\tvar d2 = document.createElement(\"div\");\r\n\t\td2.style.cssText += \"overflow:hidden;height:100%\";\r\n\r\n\t\td.appendChild(d2);\r\n\t\tthis._els[\"dhx_cal_data\"][0].appendChild(d);\r\n\t\tthis._rendered.push(d);\r\n\r\n\t\td2.innerHTML = \"\";\r\n\t\tthis._editor = d2.querySelector(\"textarea\");\r\n\t\t\r\n\t\tscheduler.event(this._editor, \"keydown\", function(e) {\r\n\t\t\tif (e.shiftKey) return true;\r\n\t\t\tvar code = e.keyCode;\r\n\t\t\tif (code == scheduler.keys.edit_save) scheduler.editStop(true);\r\n\t\t\tif (code == scheduler.keys.edit_cancel) scheduler.editStop(false);\r\n\r\n\t\t\tif(code == scheduler.keys.edit_save || code == scheduler.keys.edit_cancel){\r\n\t\t\t\tif(e.preventDefault) e.preventDefault();\r\n\t\t\t}\r\n\t\t});\r\n\t\tscheduler.event(this._editor, \"selectstart\", function (e) {\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn true;\r\n\t\t});\r\n\t\tscheduler._focus(this._editor, true);\r\n\t\t//IE and opera can add x-scroll during focusing\r\n\t\tthis._els[\"dhx_cal_data\"][0].scrollLeft = 0;\r\n\t}\r\n\tif (this.xy.menu_width !== 0 && this._select_id == ev.id) {\r\n\r\n\t\tif (this.config.cascade_event_display && this._drag_mode)\r\n\t\t\td.style.zIndex = 1; //fix overlapping issue for cascade view in case of dnd of selected event\r\n\t\tvar icons = this.config[\"icons_\" + ((this._edit_id == ev.id) ? \"edit\" : \"select\")];\r\n\t\tvar icons_str = \"\";\r\n\r\n\t\tvar ariaAttr;\r\n\r\n\t\tfor (var i = 0; i < icons.length; i++) {\r\n\t\t\tconst currentIcon = icons[i];\r\n\t\t\tariaAttr = this._waiAria.eventMenuAttrString(currentIcon);\r\n\t\t\ticons_str += `
`;\r\n\t\t}\r\n\t\tvar obj = this._render_v_bar(ev, left - menu - 1, top, menu, null, \"\", \"
\", icons_str, true);\r\n\r\n\t\tif(ev.color){\r\n\t\t\tobj.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tobj.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\t//obj.style.left = left - menu + 1;\r\n\t\tthis._els[\"dhx_cal_data\"][0].appendChild(obj);\r\n\t\tthis._rendered.push(obj);\r\n\t}\r\n\tif(this.config.drag_highlight && this._drag_id == ev.id){\r\n\t\tthis.highlightEventPosition(ev);\r\n\t}\r\n};\r\nscheduler._render_v_bar = function (ev, x, y, w, h, style, contentA, contentB, bottom) {\r\n\tvar d = document.createElement(\"div\");\r\n\tvar id = ev.id;\r\n\tvar cs = (bottom) ? \"dhx_cal_event dhx_cal_select_menu\" : \"dhx_cal_event\";\r\n\r\n\tvar state = scheduler.getState();\r\n\tif(state.drag_id == ev.id){\r\n\t\tcs += \" dhx_cal_event_drag\";\r\n\t}\r\n\r\n\tif(state.select_id == ev.id){\r\n\t\tcs += \" dhx_cal_event_selected\";\r\n\t}\r\n\r\n\tvar cse = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\tif (cse) cs = cs + \" \" + cse;\r\n\r\n\tif(this.config.cascade_event_display) {\r\n\t\tcs += \" dhx_cal_event_cascade\";\r\n\t}\r\n\r\n\tvar boxWidth = w;\r\n\r\n\tvar html = '
';\r\n\td.innerHTML = html;\r\n\r\n\tvar container = d.cloneNode(true).firstChild;\r\n\r\n\tif (!bottom && scheduler.renderEvent(container, ev, w, h, contentA, contentB)) {\r\n\t\tif(ev.color){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\treturn container;\r\n\t} else {\r\n\t\tcontainer = d.firstChild;\r\n\t\tif(ev.color){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\tvar inner_html = '
 
';\r\n\t\tinner_html += '
' + contentA + '
';\r\n\t\tinner_html += '
' + contentB + '
'; // +2 css specific, moved from render_event\r\n\r\n\t\tvar footer_class = \"dhx_event_resize dhx_footer\";\r\n\t\tif (bottom || ev._drag_resize === false)\r\n\t\t\tfooter_class = \"dhx_resize_denied \" + footer_class;\r\n\r\n\t\tinner_html += '
';\r\n\r\n\t\tcontainer.innerHTML = inner_html;\r\n\t}\r\n\r\n\treturn container;\r\n};\r\nscheduler.renderEvent = function(){\r\n\treturn false;\r\n};\r\nscheduler.locate_holder = function(day) {\r\n\tif (this._mode == \"day\") return this._els[\"dhx_cal_data\"][0].firstChild; //dirty\r\n\treturn this._els[\"dhx_cal_data\"][0].childNodes[day];\r\n};\r\nscheduler.locate_holder_day = function(date, past) {\r\n\tvar day = Math.floor((this._correct_shift(date, 1) - this._min_date) / (60 * 60 * 24 * 1000));\r\n\t//when locating end data of event , we need to use next day if time part was defined\r\n\tif (past && this.date.time_part(date)) day++;\r\n\treturn day;\r\n};\r\n\r\n\r\n\r\nscheduler._get_dnd_order = function(order, ev_height, max_height){\r\n\tif(!this._drag_event)\r\n\t\treturn order;\r\n\tif(!this._drag_event._orig_sorder)\r\n\t\tthis._drag_event._orig_sorder = order;\r\n\telse\r\n\t\torder = this._drag_event._orig_sorder;\r\n\r\n\tvar evTop = ev_height * order;\r\n\twhile((evTop + ev_height) > max_height){\r\n\t\torder--;\r\n\t\tevTop -= ev_height;\r\n\t}\r\n\torder = Math.max(order, 0);\r\n\treturn order;\r\n};\r\n//scheduler._get_event_bar_pos = function(sday, eday, week, drag){\r\nscheduler._get_event_bar_pos = function(ev){\r\n\tvar rtl = this.config.rtl;\r\n\tvar columns = this._colsS;\r\n\tvar x = columns[ev._sday];\r\n\tvar x2 = columns[ev._eday];\r\n\tif (rtl) {\r\n\t\tx = columns[columns.col_length] - columns[ev._eday] + columns[0];\r\n\t\tx2 = columns[columns.col_length] - columns[ev._sday] + columns[0];\r\n\t}\r\n\r\n\tif (x2 == x) x2 = columns[ev._eday + 1];\r\n\tvar hb = this.xy.bar_height;\r\n\r\n\tvar order = ev._sorder;\r\n\tif(ev.id == this._drag_id){\r\n\t\tvar cellHeight = columns.heights[ev._sweek + 1] - columns.heights[ev._sweek]- this.xy.month_head_height;//22 for month head height\r\n\t\torder = scheduler._get_dnd_order(order, hb, cellHeight);\r\n\t}\r\n\tvar y_event_offset = order * hb;\r\n\tvar y = columns.heights[ev._sweek] + (columns.height ? (this.xy.month_scale_height + 2) : 2 ) + y_event_offset;\r\n\treturn {x:x, x2:x2, y:y};\r\n};\r\n\r\nscheduler.render_event_bar = function (ev) {\r\n\tvar parent = this._rendered_location;\r\n\tvar pos = this._get_event_bar_pos(ev);\r\n\tvar y = pos.y;\r\n\tvar x = pos.x;\r\n\tvar x2 = pos.x2;\r\n\t// resize for month mutliday events\r\n\tvar resize_handle = \"\";\r\n\r\n\t//events in ignored dates\r\n\r\n\tif (!x2) return;\r\n\r\n\tvar resizable = scheduler.config.resize_month_events && this._mode == \"month\" &&\r\n\t\t(!ev._timed || scheduler.config.resize_month_timed);\r\n\r\n\tvar d = document.createElement(\"div\");\r\n\tvar left_chunk = (ev.hasOwnProperty(\"_first_chunk\") && ev._first_chunk),\r\n\t\tright_chunk = (ev.hasOwnProperty(\"_last_chunk\") && ev._last_chunk);\r\n\r\n\tvar resize_left = resizable && (ev._timed || left_chunk);\r\n\tvar resize_right = resizable && (ev._timed || right_chunk);\r\n\r\n\tvar timed = true;\r\n\tvar cs = \"dhx_cal_event_clear\";\r\n\tif (!ev._timed || resizable) {\r\n\t\ttimed = false;\r\n\t\tcs = \"dhx_cal_event_line\";\r\n\t}\r\n\tif(left_chunk){\r\n\t\tcs += \" dhx_cal_event_line_start\";\r\n\t}\r\n\tif(right_chunk){\r\n\t\tcs += \" dhx_cal_event_line_end\";\r\n\t}\r\n\tif(resize_left){\r\n\t\tresize_handle += \"
\";\r\n\t}\r\n\tif(resize_right){\r\n\t\tresize_handle += \"
\";\r\n\t}\r\n\r\n\tvar cse = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\tif (cse){\r\n\t\tcs += \" \" + cse;\r\n\t}\r\n\r\n\tvar bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\tvar color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\tvar style_text = [\r\n\t\t\"position:absolute\",\r\n\t\t\"top:\" + y + \"px\",\r\n\t\t\"left:\" + x + \"px\",\r\n\t\t\"width:\" + (x2 - x - (timed ? 1 : 0)) + \"px\",\r\n\t\t\"height:\" + (this.xy.bar_height - 2) + \"px\",\r\n\t\tcolor,\r\n\t\tbg_color,\r\n\t\t(ev._text_style || \"\")\r\n\t].join(\";\");\r\n\r\n\tvar html = \"
\";\r\n\tif (resizable) {\r\n\t\thtml += resize_handle;\r\n\t}\r\n\tif(scheduler.getState().mode == \"month\"){\r\n\t\tev = scheduler.getEvent(ev.id); // ev at this point could be a part (row in a month view) of a larger event\r\n\t}\r\n\r\n\tif (ev._timed){\r\n\t\thtml += `${scheduler.templates.event_bar_date(ev.start_date, ev.end_date, ev)}`;\r\n\t}\r\n\r\n\thtml += \"
\";\r\n\thtml += scheduler.templates.event_bar_text(ev.start_date, ev.end_date, ev) + '
';\r\n\thtml += \"
\";\r\n\thtml += '
';\r\n\r\n\td.innerHTML = html;\r\n\r\n\tthis._rendered.push(d.firstChild);\r\n\tparent.appendChild(d.firstChild);\r\n};\r\n\r\nscheduler._locate_event = function(node) {\r\n\tvar id = null;\r\n\twhile (node && !id && node.getAttribute) {\r\n\t\tid = node.getAttribute(this.config.event_attribute);\r\n\t\tnode = node.parentNode;\r\n\t}\r\n\treturn id;\r\n};\r\n\r\nscheduler.edit = function(id) {\r\n\tif (this._edit_id == id) return;\r\n\tthis.editStop(false, id);\r\n\tthis._edit_id = id;\r\n\tthis.updateEvent(id);\r\n};\r\nscheduler.editStop = function(mode, id) {\r\n\tif (id && this._edit_id == id) return;\r\n\tvar ev = this.getEvent(this._edit_id);\r\n\tif (ev) {\r\n\t\tif (mode) ev.text = this._editor.value;\r\n\t\tthis._edit_id = null;\r\n\t\tthis._editor = null;\r\n\t\tthis.updateEvent(ev.id);\r\n\t\tthis._edit_stop_event(ev, mode);\r\n\t}\r\n};\r\nscheduler._edit_stop_event = function(ev, mode) {\r\n\tif (this._new_event) {\r\n\t\tif (!mode) {\r\n\t\t\tif (ev) // in case of custom lightbox user can already delete event\r\n\t\t\t\tthis.deleteEvent(ev.id, true);\r\n\t\t} else {\r\n\t\t\tthis.callEvent(\"onEventAdded\", [ev.id, ev]);\r\n\t\t}\r\n\t\tthis._new_event = null;\r\n\t} else {\r\n\t\tif (mode){\r\n\t\t\tthis.callEvent(\"onEventChanged\", [ev.id, ev]);\r\n\t\t}\r\n\t}\r\n};\r\n\r\nscheduler.getEvents = function(from, to) {\r\n\tvar result = [];\r\n\tfor (var a in this._events) {\r\n\t\tvar ev = this._events[a];\r\n\t\tif (ev && ( (!from && !to) || (ev.start_date < to && ev.end_date > from) ))\r\n\t\t\tresult.push(ev);\r\n\t}\r\n\treturn result;\r\n};\r\nscheduler.getRenderedEvent = function(id) {\r\n\tif (!id)\r\n\t\treturn;\r\n\tvar rendered_events = scheduler._rendered;\r\n\tfor (var i=0; i -1){\r\n\t\t\t\t\tsection = section.split(scheduler.config.section_delimiter)[0];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar top = timeline.getSectionTop(section);\r\n\t\t\tvar left = timeline.posFromDate(event.start_date);\r\n\t\t\tvar container = scheduler.$container.querySelector(\".dhx_timeline_data_wrapper\");\r\n\t\t\tleft = left - (container.offsetWidth - timeline.dx) / 2;\r\n\t\t\ttop = top - container.offsetHeight / 2 + timeline.dy/2;\r\n\r\n\t\t\tif (timeline._smartRenderingEnabled()) {\r\n\t\t\t\tvar handlerId = timeline.attachEvent(\"onScroll\", function(){\r\n\t\t\t\t\trestoreOriginalColors();\r\n\t\t\t\t\ttimeline.detachEvent(handlerId);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\ttimeline.scrollTo({\r\n\t\t\t\tleft: left,\r\n\t\t\t\ttop: top\r\n\t\t\t});\r\n\t\t\tif (!timeline._smartRenderingEnabled()) {\r\n\t\t\t\trestoreOriginalColors();\r\n\t\t\t}\r\n\t\t}\r\n\t}else{\r\n\t\trestoreOriginalColors();\r\n\t}\r\n\r\n\tscheduler.callEvent(\"onAfterEventDisplay\", [ev, mode]);\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._append_drag_marker = function(m){\r\n\tif(m.parentNode) return;\r\n\tvar zone = scheduler._els[\"dhx_cal_data\"][0];\r\n\r\n\tvar scale = zone.lastChild;\r\n\tvar className = scheduler._getClassName(scale);\r\n\tif(className.indexOf(\"dhx_scale_holder\") < 0 && scale.previousSibling){\r\n\t\tscale = scale.previousSibling;\r\n\t}\r\n\r\n\tclassName = scheduler._getClassName(scale);\r\n\tif (scale && className.indexOf(\"dhx_scale_holder\") === 0) {\r\n\t\tscale.appendChild(m);\r\n\t}\r\n};\r\n\r\nscheduler._update_marker_position = function(m, event){\r\n\tvar size = scheduler._calc_event_y(event, 0);\r\n\tm.style.top = size.top + \"px\";\r\n\tm.style.height = size.height + \"px\";\r\n};\r\n\r\nscheduler.highlightEventPosition = function(event){\r\n\tvar m = document.createElement(\"div\");\r\n\r\n\tm.setAttribute(\"event_id\", event.id); // for backward compatibility\r\n\tm.setAttribute(this.config.event_attribute, event.id);\r\n\tthis._rendered.push(m);\r\n\tthis._update_marker_position(m, event);\r\n\r\n\tvar css = this.templates.drag_marker_class(event.start_date, event.end_date, event);\r\n\tvar html = this.templates.drag_marker_content(event.start_date, event.end_date, event);\r\n\tm.className = \"dhx_drag_marker\";\r\n\tif(css)\r\n\t\tm.className += \" \" + css;\r\n\tif(html)\r\n\t\tm.innerHTML = html;\r\n\tthis._append_drag_marker(m);\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._parsers.xml = {\r\n\tcanParse: function(data, xhr){\r\n\t\t// IE returns non-empty responseXML type regardless of actual data type\r\n\t\tif(xhr.responseXML && xhr.responseXML.firstChild){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\ttry{\r\n\t\t\tvar xmlDoc = scheduler.ajax.parse(xhr.responseText);\r\n\t\t\tvar topElement = scheduler.ajax.xmltop(\"data\", xmlDoc);\r\n\t\t\tif(topElement && topElement.tagName === \"data\"){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}catch (e){\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\tparse: function(loader) {\r\n\t\tvar xml;\r\n\r\n\t\tif (!loader.xmlDoc.responseXML) { //from a string\r\n\t\t\tloader.xmlDoc.responseXML = scheduler.ajax.parse(loader.xmlDoc.responseText);\r\n\t\t}\r\n\t\r\n\t\txml = scheduler.ajax.xmltop(\"data\", loader.xmlDoc);\r\n\t\tif (xml.tagName != \"data\") return null;//not an xml\r\n\t\tvar csrfToken = xml.getAttribute(\"dhx_security\");\r\n\t\tif (csrfToken) {\r\n\t\t\tif (window.dhtmlx) {\r\n\t\t\t\twindow.dhtmlx.security_key = csrfToken;\r\n\t\t\t}\r\n\t\t\tscheduler.security_key = csrfToken;\r\n\t\t}\r\n\t\r\n\t\tvar opts = scheduler.ajax.xpath(\"//coll_options\", loader.xmlDoc);\r\n\t\tfor (var i = 0; i < opts.length; i++) {\r\n\t\t\tvar bind = opts[i].getAttribute(\"for\");\r\n\t\t\tvar arr = scheduler.serverList[bind];\r\n\t\t\tif (!arr) {\r\n\t\t\t\tscheduler.serverList[bind] = arr = [];\r\n\t\t\t}\r\n\t\t\tarr.splice(0, arr.length);\t//clear old options\r\n\t\t\tvar itms = scheduler.ajax.xpath(\".//item\", opts[i]);\r\n\t\t\tfor (var j = 0; j < itms.length; j++) {\r\n\t\t\t\tvar itm = itms[j];\r\n\t\t\t\tvar attrs = itm.attributes;\r\n\t\t\t\tvar obj = { key: itms[j].getAttribute(\"value\"), label: itms[j].getAttribute(\"label\")};\r\n\t\t\t\tfor (var k = 0; k < attrs.length; k++) {\r\n\t\t\t\t\tvar attr = attrs[k];\r\n\t\t\t\t\tif (attr.nodeName == \"value\" || attr.nodeName == \"label\")\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\tobj[attr.nodeName] = attr.nodeValue;\r\n\t\t\t\t}\r\n\t\t\t\tarr.push(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (opts.length)\r\n\t\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\t\r\n\t\tvar ud = scheduler.ajax.xpath(\"//userdata\", loader.xmlDoc);\r\n\t\tfor (var i = 0; i < ud.length; i++) {\r\n\t\t\tvar udx = scheduler._xmlNodeToJSON(ud[i]);\r\n\t\t\tscheduler._userdata[udx.name] = udx.text;\r\n\t\t}\r\n\t\r\n\t\tvar evs = [];\r\n\t\txml = scheduler.ajax.xpath(\"//event\", loader.xmlDoc);\r\n\t\r\n\t\tfor (var i = 0; i < xml.length; i++) {\r\n\t\t\tvar ev = evs[i] = scheduler._xmlNodeToJSON(xml[i]);\r\n\t\t\tscheduler._init_event(ev);\r\n\t\t}\r\n\t\treturn evs;\r\n\t}\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler.json = scheduler._parsers.json = {\r\n\tcanParse: function(data){\r\n\t\tif(data && typeof data === \"object\"){\r\n\t\t\treturn true;\r\n\t\t} else if(typeof data === \"string\"){\r\n\t\t\ttry {\r\n\t\t\t\tvar result = JSON.parse(data);\r\n\t\t\t\treturn Object.prototype.toString.call(result) === '[object Object]' || \r\n\t\t\t\t\t\tObject.prototype.toString.call(result) === '[object Array]';\r\n\t\t\t} catch (err) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\tparse: function(data) {\r\n\t\tvar events = [];\r\n\r\n\t\tif (typeof data == \"string\") {\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\t\tif (Object.prototype.toString.call(data) === '[object Array]') {\r\n\t\t\tevents = data;\r\n\t\t} else {\r\n\t\t\tif(data){\r\n\t\t\t\tif(data.events){\r\n\t\t\t\t\tevents = data.events;\r\n\t\t\t\t}else if(data.data){\r\n\t\t\t\t\tevents = data.data;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tevents = events || [];\r\n\r\n\t\tif (data.dhx_security) {\r\n\t\t\tif (window.dhtmlx) {\r\n\t\t\t\twindow.dhtmlx.security_key = data.dhx_security;\r\n\t\t\t}\r\n\t\t\tscheduler.security_key = data.dhx_security;\r\n\t\t}\r\n\r\n\t\tvar collections = (data && data.collections) ? data.collections : {};\r\n\t\tvar collections_loaded = false;\r\n\t\tfor (var key in collections) {\r\n\t\t\tif (collections.hasOwnProperty(key)) {\r\n\t\t\t\tcollections_loaded = true;\r\n\t\t\t\tvar collection = collections[key];\r\n\t\t\t\tvar arr = scheduler.serverList[key];\r\n\t\t\t\tif (!arr) {\r\n\t\t\t\t\tscheduler.serverList[key] = arr = [];\r\n\t\t\t\t}\r\n\t\t\t\tarr.splice(0, arr.length); //clear old options\r\n\t\t\t\tfor (var j = 0; j < collection.length; j++) {\r\n\t\t\t\t\tvar option = collection[j];\r\n\t\t\t\t\tvar obj = { key: option.value, label: option.label }; // resulting option object\r\n\t\t\t\t\tfor (var option_key in option) {\r\n\t\t\t\t\t\tif (option.hasOwnProperty(option_key)) {\r\n\t\t\t\t\t\t\tif (option_key == \"value\" || option_key == \"label\")\r\n\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\tobj[option_key] = option[option_key]; // obj['value'] = option['value']\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tarr.push(obj);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (collections_loaded)\r\n\t\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\r\n\t\tvar evs = [];\r\n\t\tfor (var i = 0; i < events.length; i++) {\r\n\t\t\tvar event = events[i];\r\n\t\t\tscheduler._init_event(event);\r\n\t\t\tevs.push(event);\r\n\t\t}\r\n\t\treturn evs;\r\n\t}\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler.ical = scheduler._parsers.ical = {\r\n\tcanParse: function(data){\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\treturn new RegExp(\"^BEGIN:VCALENDAR\").test(data);\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t},\r\n\tparse:function(str){\r\n\t\tvar data = str.match(RegExp(this.c_start+\"[^\\f]*\"+this.c_end,\"\"));\r\n\t\tif (!data.length) return;\r\n\r\n\t\t// mpl: handle bad unfolding\r\n\t\tdata[0]=data[0].replace(/[\\r\\n]+ /g,\"\");\r\n\r\n\t\t//unfolding \r\n\t\tdata[0]=data[0].replace(/[\\r\\n]+(?=[a-z \\t])/g,\" \");\r\n\t\t//drop property\r\n\t\tdata[0]=data[0].replace(/;[^:\\r\\n]*:/g,\":\");\r\n\t\t\r\n\t\t\r\n\t\tvar incoming=[];\r\n\t\tvar match;\r\n\t\tvar event_r = RegExp(\"(?:\"+this.e_start+\")([^\\f]*?)(?:\"+this.e_end+\")\",\"g\");\r\n\t\twhile ((match=event_r.exec(data)) !== null){\r\n\t\t\tvar e={};\r\n\t\t\tvar param;\r\n\t\t\tvar param_r = /[^\\r\\n]+[\\r\\n]+/g;\r\n\t\t\twhile ((param=param_r.exec(match[1])) !== null)\r\n\t\t\t\tthis.parse_param(param.toString(),e);\r\n\t\t\tif (e.uid && !e.id) e.id = e.uid; //fallback to UID, when ID is not defined\r\n\t\t\tincoming.push(e);\t\r\n\t\t}\r\n\t\treturn incoming;\r\n\t},\r\n\tparse_param:function(str,obj){\r\n\t\tvar d = str.indexOf(\":\"); \r\n\t\t\tif (d==-1) return;\r\n\t\t\r\n\t\tvar name = str.substr(0,d).toLowerCase();\r\n\t\tvar value = str.substr(d+1).replace(/\\\\,/g,\",\").replace(/[\\r\\n]+$/,\"\");\r\n\t\tif (name==\"summary\")\r\n\t\t\tname=\"text\";\r\n\t\telse if (name==\"dtstart\"){\r\n\t\t\tname = \"start_date\";\r\n\t\t\tvalue = this.parse_date(value,0,0);\r\n\t\t}\r\n\t\telse if (name==\"dtend\"){\r\n\t\t\tname = \"end_date\";\r\n\t\t\tvalue = this.parse_date(value,0,0);\r\n\t\t}\r\n\t\tobj[name]=value;\r\n\t},\r\n\tparse_date:function(value,dh,dm){\r\n\t\tvar t = value.split(\"T\");\r\n\r\n\t\tvar utcMark = false;\r\n\t\tif (t[1]){\r\n\t\t\tdh=t[1].substr(0,2);\r\n\t\t\tdm=t[1].substr(2,2);\r\n\t\t\tutcMark = !!(t[1][6] == \"Z\");\r\n\t\t}\r\n\t\tvar dy = t[0].substr(0,4);\r\n\t\tvar dn = parseInt(t[0].substr(4,2),10)-1;\r\n\t\tvar dd = t[0].substr(6,2);\r\n\r\n\t\tif(scheduler.config.server_utc || utcMark){\r\n\t\t\treturn new Date(Date.UTC(dy,dn,dd,dh,dm)) ;\r\n\t\t}else{\r\n\t\t\treturn new Date(dy,dn,dd,dh,dm);\r\n\t\t}\r\n\t},\r\n\tc_start:\"BEGIN:VCALENDAR\",\r\n\te_start:\"BEGIN:VEVENT\",\r\n\te_end:\"END:VEVENT\",\r\n\tc_end:\"END:VCALENDAR\"\t\r\n};\r\n\r\n}","export default function(scheduler){\r\n\treturn (function(){\r\n\t\tvar res = {};\r\n\t\tfor (var a in this._events){\r\n\t\t\tvar ev = this._events[a];\r\n\t\t\tif (ev.id.toString().indexOf(\"#\") == -1){\r\n\t\t\t\tres[ev.id] = ev;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn res;\r\n\t}).bind(scheduler);\r\n}","import xmlLoaded from \"./loaders/xml\";\r\nimport jsonLoader from \"./loaders/json\";\r\nimport iCalLoader from \"./loaders/ical\";\r\nimport createSerializator from \"../core/common/get_serializable_events\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler._loaded = {};\r\nscheduler._load = function(url, from) {\r\n\turl = url || this._load_url;\r\n\r\n\tif(!url){\r\n\t\t//if scheduler.setLoadMode is called before scheduler.init, initial rendering will invoke data loading while url is undefined\r\n\t\treturn;\r\n\t}\r\n\r\n\turl += (url.indexOf(\"?\") == -1 ? \"?\" : \"&\") + \"timeshift=\" + (new Date()).getTimezoneOffset();\r\n\tif (this.config.prevent_cache) url += \"&uid=\" + this.uid();\r\n\tvar to;\r\n\tfrom = from || this._date;\r\n\tfunction ajaxCallback(response) {\r\n\t\tscheduler.on_load(response);\r\n\t\tscheduler.callEvent(\"onLoadEnd\", []);\r\n\t}\r\n\tif (this._load_mode) {\r\n\t\tvar lf = this.templates.load_format;\r\n\r\n\t\tfrom = this.date[this._load_mode + \"_start\"](new Date(from.valueOf()));\r\n\t\twhile (from > this._min_date) from = this.date.add(from, -1, this._load_mode);\r\n\t\tto = from;\r\n\r\n\t\tvar cache_line = true;\r\n\t\twhile (to < this._max_date) {\r\n\t\t\tto = this.date.add(to, 1, this._load_mode);\r\n\t\t\tif (this._loaded[lf(from)] && cache_line)\r\n\t\t\t\tfrom = this.date.add(from, 1, this._load_mode); else cache_line = false;\r\n\t\t}\r\n\r\n\t\tvar temp_to = to;\r\n\t\tdo {\r\n\t\t\tto = temp_to;\r\n\t\t\ttemp_to = this.date.add(to, -1, this._load_mode);\r\n\t\t} while (temp_to > from && this._loaded[lf(temp_to)]);\r\n\r\n\t\tif (to <= from)\r\n\t\t\treturn false; //already loaded\r\n\r\n\t\tscheduler.ajax.get(url + \"&from=\" + lf(from) + \"&to=\" + lf(to), ajaxCallback);\r\n\r\n\t\twhile (from < to) {\r\n\t\t\tthis._loaded[lf(from)] = true;\r\n\t\t\tfrom = this.date.add(from, 1, this._load_mode);\r\n\t\t}\r\n\t} else {\r\n\t\tscheduler.ajax.get(url, ajaxCallback);\r\n\t}\r\n\r\n\t// TODO: remove onXLS\r\n\tthis.callEvent(\"onXLS\", []);\r\n\tthis.callEvent(\"onLoadStart\", []);\r\n\treturn true;\r\n};\r\n\r\nscheduler._parsers = {};\r\n\r\n\r\nxmlLoaded(scheduler);\r\njsonLoader(scheduler);\r\niCalLoader(scheduler);\r\n\r\nscheduler.on_load = function (loader) {\r\n\tthis.callEvent(\"onBeforeParse\", []);\r\n\r\n\tvar evs;\r\n\tvar error = false;\r\n\r\n\tvar foundParser = false;\r\n\tfor(var i in this._parsers){\r\n\t\tvar parser = this._parsers[i];\r\n\t\tif(parser.canParse(loader.xmlDoc.responseText, loader.xmlDoc)){\r\n\t\t\ttry{\r\n\t\t\t\tvar param = loader.xmlDoc.responseText;\r\n\t\t\t\tif(i === \"xml\"){\r\n\t\t\t\t\tparam = loader;\r\n\t\t\t\t}\r\n\t\t\t\tevs = parser.parse(param);\r\n\t\t\t\tif(!evs){\r\n\t\t\t\t\terror = true;\r\n\t\t\t\t}\r\n\t\t\t}catch(e){\r\n\t\t\t\terror = true;\r\n\t\t\t}\r\n\t\t\tfoundParser = true;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tif(!foundParser){\r\n\t\tif(this._process && this[this._process]){\r\n\t\t\ttry{\r\n\t\t\t\tevs = this[this._process].parse(loader.xmlDoc.responseText);\r\n\t\t\t}catch (e){\r\n\t\t\t\terror = true;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\terror = true;\r\n\t\t}\r\n\t}\r\n\r\n\tif(error || (loader.xmlDoc.status && loader.xmlDoc.status >= 400)){\r\n\t\tthis.callEvent(\"onLoadError\", [loader.xmlDoc]);\r\n\t\tevs = [];\r\n\t}\r\n\r\n\tthis._process_loading(evs);\r\n\r\n\t// TODO: remove onXLE\r\n\tthis.callEvent(\"onXLE\", []);\r\n\tthis.callEvent(\"onParse\", []);\r\n};\r\nscheduler._process_loading = function(evs) {\r\n\tthis._loading = true;\r\n\tthis._not_render = true;\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tif (!this.callEvent(\"onEventLoading\", [evs[i]])) continue;\r\n\t\tthis.addEvent(evs[i]);\r\n\t}\r\n\tthis._not_render = false;\r\n\tif (this._render_wait) this.render_view_data();\r\n\r\n\tthis._loading = false;\r\n\tif (this._after_call) this._after_call();\r\n\tthis._after_call = null;\r\n};\r\nscheduler._init_event = function(event) {\r\n\tevent.text = (event.text || event._tagvalue) || \"\";\r\n\tevent.start_date = scheduler._init_date(event.start_date);\r\n\tevent.end_date = scheduler._init_date(event.end_date);\r\n};\r\n\r\nscheduler._init_date = function(date){\r\n\tif(!date)\r\n\t\treturn null;\r\n\tif (typeof date == \"string\") {\r\n\t\treturn scheduler._helpers.parseDate(date);\r\n\t}\r\n\telse return new Date(date);\r\n};\r\n\r\nconst getSerializableData = createSerializator(scheduler);\r\nscheduler.serialize = function(){\r\n\tconst dataset = [];\r\n\tconst allEvents = getSerializableData();\r\n\tfor (var a in allEvents){\r\n\t\t\r\n\t\tconst exportedEvent = {};\r\n\t\tvar ev = allEvents[a];\r\n\r\n\t\tfor(var key in ev){\r\n\t\t\tif (key.charAt(0) == \"$\" || key.charAt(0) == \"_\"){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tlet exportValue;\r\n\t\t\tconst rawValue = ev[key];\r\n\t\t\tif(scheduler.utils.isDate(rawValue)){\r\n\t\t\t\texportValue = scheduler.defined(scheduler.templates.xml_format) ? scheduler.templates.xml_format(rawValue) : scheduler.templates.format_date(rawValue);\r\n\t\t\t}else{\r\n\t\t\t\texportValue = rawValue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\texportedEvent[key] = exportValue;\r\n\t\t}\r\n\r\n\t\tdataset.push(exportedEvent);\r\n\t}\r\n\treturn dataset;\r\n};\r\n\r\n/*\r\nscheduler.json = {};\r\nscheduler.json.parse = function(data) {\r\n\r\n\tvar events = [];\r\n\r\n\tif (typeof data == \"string\") {\r\n\t\tdata = JSON.parse(data);\r\n\t}\r\n\tif (Object.prototype.toString.call(data) === '[object Array]') {\r\n\t\tevents = data;\r\n\t} else {\r\n\t\tif(data){\r\n\t\t\tif(data.events){\r\n\t\t\t\tevents = data.events;\r\n\t\t\t}else if(data.data){\r\n\t\t\t\tevents = data.data;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tevents = events || [];\r\n\r\n\tif (data.dhx_security) {\r\n\t\tif (window.dhtmlx) {\r\n\t\t\twindow.dhtmlx.security_key = data.dhx_security;\r\n\t\t}\r\n\t\tscheduler.security_key = data.dhx_security;\r\n\t}\r\n\r\n\tvar collections = (data && data.collections) ? data.collections : {};\r\n\tvar collections_loaded = false;\r\n\tfor (var key in collections) {\r\n\t\tif (collections.hasOwnProperty(key)) {\r\n\t\t\tcollections_loaded = true;\r\n\t\t\tvar collection = collections[key];\r\n\t\t\tvar arr = scheduler.serverList[key];\r\n\t\t\tif (!arr) {\r\n\t\t\t\tscheduler.serverList[key] = arr = [];\r\n\t\t\t}\r\n\t\t\tarr.splice(0, arr.length); //clear old options\r\n\t\t\tfor (var j = 0; j < collection.length; j++) {\r\n\t\t\t\tvar option = collection[j];\r\n\t\t\t\tvar obj = { key: option.value, label: option.label }; // resulting option object\r\n\t\t\t\tfor (var option_key in option) {\r\n\t\t\t\t\tif (option.hasOwnProperty(option_key)) {\r\n\t\t\t\t\t\tif (option_key == \"value\" || option_key == \"label\")\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\tobj[option_key] = option[option_key]; // obj['value'] = option['value']\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tarr.push(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (collections_loaded)\r\n\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\r\n\tvar evs = [];\r\n\tfor (var i = 0; i < events.length; i++) {\r\n\t\tvar event = events[i];\r\n\t\tscheduler._init_event(event);\r\n\t\tevs.push(event);\r\n\t}\r\n\treturn evs;\r\n};*/\r\nscheduler.parse = function(data, type) {\r\n\tthis._process = type;\r\n\tthis.on_load({xmlDoc: {responseText: data}});\r\n};\r\nscheduler.load = function(url, call) {\r\n\tif (typeof call == \"string\") {\r\n\t\tthis._process = call;\r\n\t\tcall = arguments[2];\r\n\t}\r\n\r\n\tthis._load_url = url;\r\n\tthis._after_call = call;\r\n\tthis._load(url, this._date);\r\n};\r\n//possible values - day,week,month,year,all\r\nscheduler.setLoadMode = function(mode) {\r\n\tif (mode == \"all\") mode = \"\";\r\n\tthis._load_mode = mode;\r\n};\r\n\r\nscheduler.serverList = function(name, array) {\r\n\tif (array) {\r\n\t\tthis.serverList[name] = array.slice(0);\r\n\t\treturn this.serverList[name];\r\n\t}\r\n\tthis.serverList[name] = (this.serverList[name] || []);\r\n\treturn this.serverList[name];\r\n};\r\nscheduler._userdata = {};\r\n\r\nscheduler._xmlNodeToJSON = function(node) {\r\n\tvar t = {};\r\n\tfor (var i = 0; i < node.attributes.length; i++)\r\n\t\tt[node.attributes[i].name] = node.attributes[i].value;\r\n\r\n\tfor (var i = 0; i < node.childNodes.length; i++) {\r\n\t\tvar child = node.childNodes[i];\r\n\t\tif (child.nodeType == 1)\r\n\t\t\tt[child.tagName] = child.firstChild ? child.firstChild.nodeValue : \"\";\r\n\t}\r\n\r\n\tif (!t.text) t.text = node.firstChild ? node.firstChild.nodeValue : \"\";\r\n\r\n\treturn t;\r\n};\r\nscheduler.attachEvent(\"onXLS\", function() {\r\n\tif (this.config.show_loading === true) {\r\n\t\tvar t;\r\n\t\tt = this.config.show_loading = document.createElement(\"div\");\r\n\t\tt.className = 'dhx_loading';\r\n\t\tt.style.left = Math.round((this._x - 128) / 2) + \"px\";\r\n\t\tt.style.top = Math.round((this._y - 15) / 2) + \"px\";\r\n\t\tthis._obj.appendChild(t);\r\n\t}\r\n});\r\nscheduler.attachEvent(\"onXLE\", function() {\r\n\tvar t = this.config.show_loading;\r\n\tif (t && typeof t == \"object\") {\r\n\t\tif(t.parentNode) {\r\n\t\t\tt.parentNode.removeChild(t);\r\n\t\t}\r\n\t\tthis.config.show_loading = true;\r\n\t}\r\n});\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler._lightbox_controls = {};\r\nscheduler.formSection = function(name){\r\n\tvar config = this.config.lightbox.sections;\r\n\tvar i = 0;\r\n\tfor (i; i < config.length; i++) {\r\n\t\tif (config[i].name == name) {\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tif (i === config.length) {\r\n\t\t// GS-1662 section not found, should exit here instead of throwing an error\r\n\t\treturn null;\r\n\t}\r\n\r\n\tvar section = config[i];\r\n\tif (!scheduler._lightbox) {\r\n\t\tscheduler.getLightbox();\r\n\t}\r\n\tvar header = scheduler._lightbox.querySelector(`#${section.id}`);\r\n\tvar node = header.nextSibling;\r\n\r\n\tvar result = {\r\n\t\tsection: section,\r\n\t\theader: header,\r\n\t\tnode: node,\r\n\t\tgetValue:function(ev){\r\n\t\t\treturn scheduler.form_blocks[section.type].get_value(node, (ev||{}), section);\r\n\t\t},\r\n\t\tsetValue:function(value, ev){\r\n\t\t\treturn scheduler.form_blocks[section.type].set_value(node, value, (ev||{}), section);\r\n\t\t}\r\n\t};\r\n\r\n\tvar handler = scheduler._lightbox_controls[\"get_\"+section.type+\"_control\"];\r\n\treturn handler?handler(result):result;\r\n};\r\nscheduler._lightbox_controls.get_template_control = function(result) {\r\n\tresult.control = result.node;\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_select_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('select')[0];\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_textarea_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('textarea')[0];\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_time_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('select'); // array\r\n\treturn result;\r\n};\r\n\r\nscheduler._lightbox_controls.defaults = {\r\n\ttemplate: {\r\n\t\theight:30\r\n\t},\r\n\ttextarea: {\r\n\t\theight: 200\r\n\t},\r\n\tselect: {\r\n\t\theight: 23\r\n\t},\r\n\ttime: {\r\n\t\theight: 20\r\n\t}\r\n};\r\n\r\n\r\nscheduler.form_blocks={\r\n\ttemplate:{\r\n\t\trender: function(sns){\r\n\t\t\treturn \"
\";\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,config){\r\n\t\t\tnode.innerHTML = value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev,config){\r\n\t\t\treturn node.innerHTML||\"\";\r\n\t\t},\r\n\t\tfocus: function(node){\r\n\t\t}\r\n\t},\r\n\ttextarea:{\r\n\t\trender:function(sns){\r\n\t\t\treturn \"
\";\r\n\t\t},\r\n\t\tset_value:function(node,value,ev){\r\n\t\t\tscheduler.form_blocks.textarea._get_input(node).value=value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev){\r\n\t\t\treturn scheduler.form_blocks.textarea._get_input(node).value;\r\n\t\t},\r\n\t\tfocus:function(node){\r\n\t\t\tvar a = scheduler.form_blocks.textarea._get_input(node);\r\n\t\t\tscheduler._focus(a, true);\r\n\t\t},\r\n\t\t_get_input: function(node){\r\n\t\t\treturn node.getElementsByTagName(\"textarea\")[0];\r\n\t\t}\r\n\t},\r\n\tselect:{\r\n\t\trender:function(sns){\r\n\t\t\t//var defaults = scheduler._lightbox_controls.defaults.select;\r\n\t\t\tvar html=\"
\";\r\n\t\t\treturn html;\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,sns){\r\n\t\t\tvar select = node.firstChild;\r\n\t\t\tif (!select._dhx_onchange && sns.onchange) {\r\n\t\t\t\tscheduler.event(select, \"change\", sns.onchange);\r\n\t\t\t\tselect._dhx_onchange = true;\r\n\t\t\t}\r\n\t\t\tif (typeof value == \"undefined\")\r\n\t\t\t\tvalue = (select.options[0]||{}).value;\r\n\t\t\tselect.value=value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev){\r\n\t\t\treturn node.firstChild.value;\r\n\t\t},\r\n\t\tfocus:function(node){\r\n\t\t\tvar a=node.firstChild; scheduler._focus(a, true);\r\n\t\t}\r\n\t},\r\n\ttime:{\r\n\t\trender:function(sns) {\r\n\t\t\tif (!sns.time_format) {\r\n\t\t\t\t// default order\r\n\t\t\t\tsns.time_format = [\"%H:%i\", \"%d\", \"%m\", \"%Y\"];\r\n\t\t\t}\r\n\t\t\t// map: default order => real one\r\n\t\t\tsns._time_format_order = {};\r\n\t\t\tvar time_format = sns.time_format;\r\n\r\n\t\t\tvar cfg = scheduler.config;\r\n\t\t\tvar dt = scheduler.date.date_part(scheduler._currentDate());\r\n\t\t\tvar last = 24*60, first = 0;\r\n\t\t\tif(scheduler.config.limit_time_select){\r\n\t\t\t\tlast = 60*cfg.last_hour+1;\r\n\t\t\t\tfirst = 60*cfg.first_hour;\r\n\t\t\t\tdt.setHours(cfg.first_hour);\r\n\t\t\t}\r\n\t\t\tvar html = \"\";\r\n\r\n\t\t\tfor (var p = 0; p < time_format.length; p++) {\r\n\t\t\t\tvar time_option = time_format[p];\r\n\r\n\t\t\t\t// adding spaces between selects\r\n\t\t\t\tif (p > 0) {\r\n\t\t\t\t\thtml += \" \";\r\n\t\t\t\t}\r\n\t\t\t\tvar selectBoxClass = \"\";\r\n\t\t\t\tvar options = \"\";\r\n\t\t\t\tswitch (time_option) {\r\n\t\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_year_select\";\r\n\t\t\t\t\t\tsns._time_format_order[3] = p;\r\n\t\t\t\t\t\t//year\r\n\t\t\t\t\t\tvar range;\r\n\t\t\t\t\t\tvar start_year;\r\n\t\t\t\t\t\tvar end_year;\r\n\t\t\t\t\t\tif(sns.year_range){\r\n\t\t\t\t\t\t\tif (!isNaN(sns.year_range)) {\r\n\t\t\t\t\t\t\t\trange = sns.year_range;\r\n\t\t\t\t\t\t\t} else if (sns.year_range.push) {\r\n\t\t\t\t\t\t\t\t// if\r\n\t\t\t\t\t\t\t\tstart_year = sns.year_range[0];\r\n\t\t\t\t\t\t\t\tend_year = sns.year_range[1];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\trange = range || 10;\r\n\t\t\t\t\t\tvar offset = offset || Math.floor(range / 2);\r\n\t\t\t\t\t\tstart_year = start_year || dt.getFullYear() - offset;\r\n\t\t\t\t\t\tend_year = end_year || start_year + range;\r\n\r\n\t\t\t\t\t\tfor (var i = start_year; i < end_year; i++)\r\n\t\t\t\t\t\t\toptions += \"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%m\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_month_select\";\r\n\t\t\t\t\t\tsns._time_format_order[2] = p;\r\n\t\t\t\t\t\t//month\r\n\t\t\t\t\t\tfor (var i=0; i < 12; i++)\r\n\t\t\t\t\t\t\toptions+=\"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%d\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_day_select\";\r\n\t\t\t\t\t\tsns._time_format_order[1] = p;\r\n\t\t\t\t\t\t//days\r\n\t\t\t\t\t\tfor (var i=1; i < 32; i++)\r\n\t\t\t\t\t\t\toptions+=\"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%H:%i\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_time_select\";\r\n\t\t\t\t\t\tsns._time_format_order[0] = p;\r\n\t\t\t\t\t\t//hours\r\n\t\t\t\t\t\tvar i = first;\r\n\t\t\t\t\t\tvar tdate = dt.getDate();\r\n\t\t\t\t\t\tsns._time_values = [];\r\n\r\n\t\t\t\t\t\twhile(i\"+time+\"\";\r\n\t\t\t\t\t\t\tsns._time_values.push(i);\r\n\t\t\t\t\t\t\tdt.setTime(dt.valueOf()+this.config.time_step*60*1000);\r\n\t\t\t\t\t\t\tvar diff = (dt.getDate()!=tdate)?1:0; // moved or not to the next day\r\n\t\t\t\t\t\t\ti=diff*24*60+dt.getHours()*60+dt.getMinutes();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(options){\r\n\r\n\t\t\t\t\tvar ariaAttrs = scheduler._waiAria.lightboxSelectAttrString(time_option);\r\n\t\t\t\t\tvar readonly = sns.readonly ? \"disabled='disabled'\" : \"\";\r\n\t\t\t\t\thtml += \" \";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//var defaults = scheduler._lightbox_controls.defaults.select;\r\n\r\n\t\t\treturn \"
\"+html+\"  –  \"+html+\"
\";\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,config){\r\n\t\t\tvar cfg = scheduler.config;\r\n\t\t\tvar s=node.getElementsByTagName(\"select\");\r\n\t\t\tvar map = config._time_format_order;\r\n\t\t\tvar start_date, end_date;\r\n\r\n\t\t\tif(cfg.full_day) {\r\n\t\t\t\tif (!node._full_day){\r\n\t\t\t\t\tvar html = \"\";\r\n\t\t\t\t\tif (!scheduler.config.wide_form)\r\n\t\t\t\t\t\thtml = node.previousSibling.innerHTML+html;\r\n\t\t\t\t\tnode.previousSibling.innerHTML=html;\r\n\t\t\t\t\tnode._full_day=true;\r\n\t\t\t\t}\r\n\t\t\t\tvar input=node.previousSibling.getElementsByTagName(\"input\")[0];\r\n\t\t\t\tinput.checked = (scheduler.date.time_part(ev.start_date)===0 && scheduler.date.time_part(ev.end_date)===0);\r\n\r\n\t\t\t\ts[map[0]].disabled=input.checked;\r\n\t\t\t\ts[ map[0] + s.length/2 ].disabled=input.checked;\r\n\r\n\t\t\t\tif(!input.$_eventAttached){\r\n\t\t\t\t\tinput.$_eventAttached = true;\r\n\r\n\t\t\t\t\t\tscheduler.event(input, \"click\", function(){\r\n\t\t\t\t\t\tif(input.checked) {\r\n\t\t\t\t\t\t\tvar obj = {};\r\n\t\t\t\t\t\t\tscheduler.form_blocks.time.get_value(node,obj,config);\r\n\r\n\t\t\t\t\t\t\tstart_date = scheduler.date.date_part(obj.start_date);\r\n\t\t\t\t\t\t\tend_date = scheduler.date.date_part(obj.end_date);\r\n\r\n\t\t\t\t\t\t\tif (+end_date == +start_date || (+end_date >= +start_date && (ev.end_date.getHours() !== 0 || ev.end_date.getMinutes() !== 0)))\r\n\t\t\t\t\t\t\t\tend_date = scheduler.date.add(end_date, 1, \"day\");\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tstart_date = null;\r\n\t\t\t\t\t\t\tend_date = null;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\ts[map[0]].disabled=input.checked;\r\n\t\t\t\t\t\ts[ map[0] + s.length/2 ].disabled=input.checked;\r\n\r\n\t\t\t\t\t\t_fill_lightbox_select(s,0,start_date||ev.start_date);\r\n\t\t\t\t\t\t_fill_lightbox_select(s,4,end_date||ev.end_date);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(cfg.auto_end_date && cfg.event_duration) {\r\n\t\t\t\tvar _update_lightbox_select = function () {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (!(cfg.auto_end_date && cfg.event_duration)){\r\n\t\t\t\t\t\t// setting may be disabled after the handler is attached\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstart_date = new Date(s[map[3]].value,s[map[2]].value,s[map[1]].value,0,s[map[0]].value);\r\n\t\t\t\t\tend_date = new Date(start_date.getTime() + (scheduler.config.event_duration * 60 * 1000));\r\n\t\t\t\t\t_fill_lightbox_select(s, 4, end_date);\r\n\t\t\t\t};\r\n\t\t\t\tfor(var i=0; i<4; i++) {\r\n\t\t\t\t\tif(!s[i].$_eventAttached) {\r\n\t\t\t\t\t\ts[i].$_eventAttached = true;\r\n\t\t\t\t\t\tscheduler.event(s[i], \"change\", _update_lightbox_select);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfunction _fill_lightbox_select(s,i,d) {\r\n\t\t\t\tvar time_values = config._time_values;\r\n\t\t\t\tvar direct_value = d.getHours()*60+d.getMinutes();\r\n\t\t\t\tvar fixed_value = direct_value;\r\n\t\t\t\tvar value_found = false;\r\n\t\t\t\tfor (var k=0; k\";\r\n\t\tvar ariaAttr = \"\";\r\n\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\tariaAttr = this._waiAria.lightboxButtonAttrString(buttons[i]);\r\n\t\t\thtml += \"
\" + scheduler.locale.labels[buttons[i]] + \"
\";\r\n\t\t}\r\n\r\n\t\tbuttons = this.config.buttons_right;\r\n\t\tvar rtl = scheduler.config.rtl;\r\n\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\tariaAttr = this._waiAria.lightboxButtonAttrString(buttons[i]);\r\n\r\n\t\t\thtml += \"
\";\r\n\r\n\t\t\thtml += \"
\" + scheduler.locale.labels[buttons[i]] + \"
\";\r\n\t\t}\r\n\t\thtml += \"\";\r\n\t\thtml+=\"\";\r\n\t\td.innerHTML=html;\r\n\t\tif (scheduler.config.drag_lightbox){\r\n\t\t\tscheduler.event(d.firstChild, \"mousedown\", scheduler._ready_to_dnd);\r\n\t\t\tscheduler.event(d.firstChild, \"selectstart\", function(e){ \r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn false; \r\n\t\t\t});\r\n\t\t\td.firstChild.style.cursor = \"move\";\r\n\t\t\tscheduler._init_dnd_events();\r\n\r\n\t\t}\r\n\r\n\t\tthis._waiAria.lightboxAttr(d);\r\n\r\n\t\tthis.show_cover();\r\n\t\tthis._cover.insertBefore(d,this._cover.firstChild);\r\n\t\t\r\n\t\tthis._lightbox=d;\r\n\r\n\t\tvar sns=this.config.lightbox.sections;\r\n\t\thtml=\"\";\r\n\t\tfor (var i=0; i < sns.length; i++) {\r\n\t\t\tvar block=this.form_blocks[sns[i].type];\r\n\t\t\tif (!block) continue; //ignore incorrect blocks\r\n\t\t\tsns[i].id=\"area_\"+this.uid();\r\n\t\t\tvar button = \"\";\r\n\t\t\tif (sns[i].button){\r\n\t\t\t\tvar ariaAttr = scheduler._waiAria.lightboxSectionButtonAttrString(this.locale.labels[\"button_\"+sns[i].button]);\r\n\t\t\t\tbutton = \"
\"+this.locale.labels[\"button_\"+sns[i].button]+\"
\";\r\n\t\t\t}\r\n\r\n\t\t\tif (this.config.wide_form){\r\n\t\t\t\thtml+=\"
\";\r\n\t\t\t}\r\n\r\n\t\t\tvar label_name = this.locale.labels[\"section_\"+sns[i].name];\r\n\t\t\tif(typeof label_name !== \"string\"){\r\n\t\t\t\tlabel_name = sns[i].name;\r\n\t\t\t}\r\n\t\t\thtml+=\"
\"+button+ \"
\"+block.render.call(this,sns[i]);\r\n\t\t\thtml+=\"
\";\r\n\t\t}\r\n\r\n\t\tvar ds=d.getElementsByTagName(\"div\");\r\n\t\tfor (var i=0; i
 \r\n
\r\n
\r\n\r\n
`;\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._init_touch_events = function(){\r\n\tvar mobile = this.config.touch &&\r\n\t\t( ((navigator.userAgent.indexOf(\"Mobile\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"iPad\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"Android\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"Touch\")!=-1)) && !window.MSStream) ||\r\n\t\t\t((navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1));\r\n\r\n\tif(mobile){\r\n\t\tthis.xy.scroll_width = 0;\r\n\t\tthis._mobile = true;\r\n\t}\r\n\r\n\tif(this.config.touch){\r\n\r\n\t\tvar touchEventsSupported = true;\r\n\t\ttry {\r\n\t\t\tdocument.createEvent(\"TouchEvent\");\r\n\t\t} catch (e) {\r\n\t\t\ttouchEventsSupported = false;\r\n\t\t}\r\n\r\n\t\tif (touchEventsSupported) {\r\n\t\t\tthis._touch_events([\"touchmove\", \"touchstart\", \"touchend\"], function (ev) {\r\n\t\t\t\tif (ev.touches && ev.touches.length > 1) return null;\r\n\t\t\t\tif (ev.touches[0])\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\ttarget: ev.target,\r\n\t\t\t\t\t\tpageX: ev.touches[0].pageX,\r\n\t\t\t\t\t\tpageY: ev.touches[0].pageY,\r\n\t\t\t\t\t\tclientX: ev.touches[0].clientX,\r\n\t\t\t\t\t\tclientY: ev.touches[0].clientY\r\n\t\t\t\t\t};\r\n\t\t\t\telse\r\n\t\t\t\t\treturn ev;\r\n\t\t\t}, function () {\r\n\t\t\t\treturn false;\r\n\t\t\t});\r\n\t\t} else if (window.PointerEvent || window.navigator.pointerEnabled) {\r\n\t\t\tthis._touch_events([\"pointermove\", \"pointerdown\", \"pointerup\"], function (ev) {\r\n\t\t\t\tif (ev.pointerType == \"mouse\") return null;\r\n\t\t\t\treturn ev;\r\n\t\t\t}, function (ev) {\r\n\t\t\t\treturn (!ev || (ev.pointerType == \"mouse\" ));\r\n\t\t\t});\r\n\t\t} else if (window.navigator.msPointerEnabled) {\r\n\t\t\tthis._touch_events([\"MSPointerMove\", \"MSPointerDown\", \"MSPointerUp\"], function (ev) {\r\n\t\t\t\tif (ev.pointerType == ev.MSPOINTER_TYPE_MOUSE) return null;\r\n\t\t\t\treturn ev;\r\n\t\t\t}, function (ev) {\r\n\t\t\t\treturn (!ev || ev.pointerType == ev.MSPOINTER_TYPE_MOUSE);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n};\r\n\r\nscheduler._touch_events = function(names, accessor, ignore){\r\n\t//webkit on android need to be handled separately\r\n\t//var a_webkit = (navigator.userAgent.indexOf(\"Android\")!=-1) && (navigator.userAgent.indexOf(\"WebKit\")!=-1);\r\n\tvar source, tracker, timer, drag_mode, scroll_mode, action_mode;\r\n\tvar dblclicktime = 0;\r\n\r\n\tfunction attachTouchEvent(element, name, callback){\r\n\t\t//touch gestures must be disabled when ligthbox is opened\r\n\t\tscheduler.event(element, name, function(e){\r\n\t\t\tif(scheduler._is_lightbox_open()){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tif (ignore(e)) return;\r\n\t\t\t\treturn callback(e);\r\n\t\t\t}\r\n\t\t}, { passive: false });\r\n\t}\r\n\r\n\tfunction check_direction_swipe(s_ev, e_ev, step, max_dy){\r\n\t\tif (!s_ev || !e_ev) return false;\r\n\r\n\t\tvar t = s_ev.target;\r\n\t\twhile(t && t != scheduler._obj){\r\n\t\t\tt = t.parentNode;\r\n\t\t}\r\n\t\tif(t != scheduler._obj){\r\n\t\t\t//swipe outside scheduler\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// ignore swipe in horizontal timeline\r\n\t\tif(scheduler.matrix && scheduler.matrix[scheduler.getState().mode]){\r\n\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\tif(timeline.scrollable){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar dy = Math.abs(s_ev.pageY - e_ev.pageY);\r\n\t\tvar dx = Math.abs(s_ev.pageX - e_ev.pageX);\r\n\t\tif (dy < max_dy && dx>step && (!dy || (dx/dy > 3))){\r\n\t\t\tif (s_ev.pageX > e_ev.pageX) {\r\n\t\t\t\tscheduler._click.dhx_cal_next_button();\r\n\t\t\t}else {\r\n\t\t\t\tscheduler._click.dhx_cal_prev_button();\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n\tfunction doMouseMove(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tvar dnd = scheduler.getState().drag_mode,\r\n\t\t\ttimeline = scheduler.matrix ? scheduler.matrix[scheduler._mode] : false;\r\n\r\n\t\tvar original_render = scheduler.render_view_data;\r\n\t\tif(dnd == 'create' && timeline){\r\n\t\t\t//suppress full redraw of timeline on creating event\r\n\t\t\tscheduler.render_view_data = function() {\r\n\t\t\t\tvar id = scheduler.getState().drag_id;\r\n\t\t\t\tvar ev = scheduler.getEvent(id);\r\n\t\t\t\tvar property = timeline.y_property;\r\n\r\n\t\t\t\tvar evs = scheduler.getEvents(ev.start_date, ev.end_date);\r\n\t\t\t\tfor(var i = 0; i < evs.length; i++){\r\n\t\t\t\t\tif(evs[i][property] != ev[property]){\r\n\t\t\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tev._sorder = evs.length - 1;\r\n\t\t\t\tev._count = evs.length;\r\n\r\n\t\t\t\tthis.render_data([ev], scheduler.getState().mode);\r\n\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\tscheduler._on_mouse_move(e);\r\n\r\n\t\tif(dnd == 'create' && timeline){\r\n\t\t\tscheduler.render_view_data = original_render;\r\n\t\t}\r\n\r\n\t\tif (e.preventDefault)\r\n\t\t\te.preventDefault();\r\n\t\te.cancelBubble = true;\r\n\t\treturn false;\r\n\t}\r\n\r\n\t// touchmove\r\n\tattachTouchEvent(document.body, names[0], function(e){\r\n\t\tif (ignore(e)) return;\r\n\r\n\t\tvar acc = accessor(e);\r\n\t\tif(!acc) return;\r\n\t\tif (drag_mode){\r\n\t\t\tdoMouseMove(acc);\r\n\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._update_global_tip();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//if (tracker && a_webkit){\r\n\t\t//\tcheck_direction_swipe(tracker, accessor(e), 0);\r\n\t\t//}\r\n\r\n\t\ttracker = accessor(e);\r\n\t\t//ignore common and scrolling moves\r\n\t\tif (!action_mode) return;\r\n\r\n\t\t//multitouch\r\n\t\tif (!tracker){\r\n\t\t\tscroll_mode = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//target changed - probably in scroll mode\r\n\r\n\t\tif (source.target != tracker.target || (Math.abs(source.pageX - tracker.pageX) > 5) || (Math.abs(source.pageY - tracker.pageY) > 5)){\r\n\t\t\tscroll_mode = true;\r\n\t\t\tclearTimeout(timer);\r\n\t\t}\r\n\r\n\t});\r\n\r\n\t//attachTouchEvent(this._els[\"dhx_cal_data\"][0], \"scroll\", drag_cancel);\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], \"touchcancel\", drag_cancel);\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], \"contextmenu\", function(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tif (action_mode){\r\n\t\t\tif (e && e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t});\r\n\r\n\t// touchstart\r\n\tattachTouchEvent(this._obj, names[1], function(e){\r\n\t\t// block pull-to-refresh\r\n\t\tif(document && document.body){\r\n\t\t\tdocument.body.classList.add(\"dhx_cal_touch_active\");\r\n\t\t}\r\n\r\n\t\tif (ignore(e)) return;\r\n\t\tscheduler._pointerDragId = e.pointerId;\r\n\r\n\t\tvar fake_event;\r\n\t\tdrag_mode = scroll_mode = false;\r\n\t\taction_mode = true;\r\n\t\tfake_event = tracker = accessor(e);\r\n\r\n\t\tif (!fake_event){\r\n\t\t\tscroll_mode = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//dbl click\r\n\t\tvar now = new Date();\r\n\r\n\t\tif (!scroll_mode && !drag_mode && now - dblclicktime < 250){\r\n\t\t\tscheduler._click.dhx_cal_data(fake_event);\r\n\t\t\twindow.setTimeout(function(){\r\n\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t//fake_event.type = \"dblclick\";\r\n\t\t\t\tscheduler._on_dbl_click(fake_event);\r\n\t\t\t}, 50);\r\n\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._block_next_stop = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tdblclicktime = now;\r\n\r\n\t\t//drag\r\n\r\n\t\tif (scroll_mode || drag_mode || !scheduler.config.touch_drag)\r\n\t\t\treturn;\r\n\r\n\t\tvar actTask = scheduler._locate_event(document.activeElement);\r\n\t\tvar fakeTask = scheduler._locate_event(fake_event.target);\r\n\t\tvar sourceTask = source? scheduler._locate_event(source.target) : null;\r\n\r\n\t\tif(actTask && fakeTask && actTask == fakeTask && actTask != sourceTask)\r\n\t\t{\r\n\t\t\tif(e.preventDefault) {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\tscheduler._click.dhx_cal_data(fake_event);\r\n\t\t\tsource = fake_event;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//there is no target\r\n\t\ttimer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tdrag_mode = true;\r\n\t\t\tvar target = source.target;\r\n\t\t\tvar className = scheduler._getClassName(target);\r\n\t\t\tif (target && className.indexOf(\"dhx_body\") != -1)\r\n\t\t\t\ttarget = target.previousSibling;\r\n\r\n\t\t\tscheduler._on_mouse_down(source, target);\r\n\t\t\tif (scheduler._drag_mode && scheduler._drag_mode != \"create\"){\r\n\t\t\t\tscheduler.for_rendered(scheduler._drag_id, function(node, i) {\r\n\t\t\t\t\tnode.style.display='none';\r\n\t\t\t\t\tscheduler._rendered.splice(i, 1);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif (scheduler.config.touch_tip) {\r\n\t\t\t\tscheduler._show_global_tip();\r\n\t\t\t}\r\n\t\t\tscheduler.updateEvent(scheduler._drag_id);\r\n\t\t},scheduler.config.touch_drag);\r\n\r\n\t\tsource = fake_event;\r\n\t});\r\n\tfunction drag_cancel(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tscheduler._hide_global_tip();\r\n\t\tif (drag_mode){\r\n\t\t\tscheduler._on_mouse_up( accessor(e) );\r\n\t\t\tscheduler._temp_touch_block = false;\r\n\t\t}\r\n\t\tscheduler._drag_id = null;\r\n\t\tscheduler._drag_mode=null;\r\n\t\tscheduler._drag_pos=null;\r\n\t\tscheduler._pointerDragId = null;\r\n\t\tclearTimeout(timer);\r\n\t\tdrag_mode = action_mode = false;\r\n\t\tscroll_mode = true;\r\n\t}\r\n\r\n\t// touch end\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], names[2], function(e){\r\n\t\tif(document && document.body){\r\n\t\t\tdocument.body.classList.remove(\"dhx_cal_touch_active\");\r\n\t\t}\r\n\r\n\t\tif (ignore(e)) return;\r\n\r\n\t\tif(scheduler.config.touch_swipe_dates){\r\n\t\t\tif (!drag_mode && check_direction_swipe(source, tracker, 200, 100)) {\r\n\t\t\t\tscheduler._block_next_stop = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (drag_mode) {\r\n\t\t\tscheduler._ignore_next_click = true;\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\t}, 100);\r\n\t\t}\r\n\r\n\t\tdrag_cancel(e);\r\n\t\tif (scheduler._block_next_stop){\r\n\t\t\tscheduler._block_next_stop = false;\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler.event(document.body, names[2], drag_cancel);\r\n};\r\n\r\nscheduler._show_global_tip = function(){\r\n\tscheduler._hide_global_tip();\r\n\r\n\tvar toptip = scheduler._global_tip = document.createElement(\"div\");\r\n\ttoptip.className='dhx_global_tip';\r\n\r\n\tscheduler._update_global_tip(1);\r\n\r\n\tdocument.body.appendChild(toptip);\r\n};\r\nscheduler._update_global_tip = function(init){\r\n\tvar toptip = scheduler._global_tip;\r\n\tif (toptip){\r\n\t\tvar time = \"\";\r\n\t\tif (scheduler._drag_id && !init){\r\n\t\t\tvar ev = scheduler.getEvent(scheduler._drag_id);\r\n\t\t\tif (ev)\r\n\t\t\t\ttime = \"
\" + (ev._timed ? scheduler.templates.event_header(ev.start_date, ev.end_date, ev):scheduler.templates.day_date(ev.start_date, ev.end_date, ev)) + \"
\";\r\n\t\t}\r\n\r\n\t\tif (scheduler._drag_mode == \"create\" || scheduler._drag_mode == \"new-size\")\r\n\t\t\ttoptip.innerHTML = (scheduler.locale.labels.drag_to_create || \"Drag to create\")+time;\r\n\t\telse\r\n\t\t\ttoptip.innerHTML = (scheduler.locale.labels.drag_to_move || \"Drag to move\")+time;\r\n\t}\r\n};\r\nscheduler._hide_global_tip = function(){\r\n\tvar toptip = scheduler._global_tip;\r\n\tif (toptip && toptip.parentNode){\r\n\t\ttoptip.parentNode.removeChild(toptip);\r\n\t\tscheduler._global_tip = 0;\r\n\t}\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler.getRootView = function() {\r\n\treturn {\r\n\t\tview: {\r\n\t\t\trender: function(){\r\n\t\t\t\treturn {\r\n\t\t\t\t\ttag: \"div\",\r\n\t\t\t\t\ttype: 1,\r\n\t\t\t\t\tattrs: {\r\n\t\t\t\t\t\tstyle: \"width:100%;height:100%;\"\r\n\t\t\t\t\t},\r\n\t\t\t\t\thooks: {\r\n\t\t\t\t\t\t\"didInsert\": function(){\r\n\t\t\t\t\t\t\tscheduler.setCurrentView();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tbody: [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tel: this.el,\r\n\t\t\t\t\t\t\ttype: 1\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t};\r\n\t\t\t},\r\n\t\t\tinit: function(){\r\n\t\t\t\tvar container = document.createElement(\"DIV\");\r\n\t\t\t\tcontainer.id = \"scheduler_\"+ scheduler.uid();\r\n\t\t\t\tcontainer.style.width = \"100%\";\r\n\t\t\t\tcontainer.style.height = \"100%\";\r\n\t\t\t\tcontainer.classList.add(\"dhx_cal_container\");\r\n\t\t\t\tcontainer.cmp = \"grid\";\r\n\t\t\t\tcontainer.innerHTML = '
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
';\r\n\t\t\t\tscheduler.init(container);\r\n\r\n\t\t\t\tthis.el = container;\r\n\t\t\t}\r\n\t\t},\r\n\t\ttype: 4\r\n\t};\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._addThemeClass = function(){\r\n\tdocument.documentElement.setAttribute(\"data-scheduler-theme\", scheduler.skin);\r\n};\r\n\r\nscheduler._skin_settings = {\r\n\tfix_tab_position: [1,0],\r\n\tuse_select_menu_space: [1,0],\r\n\twide_form: [1,0],\r\n\r\n\thour_size_px: [44,42],\r\n\tdisplayed_event_color: [\"#ff4a4a\", \"ffc5ab\"],\r\n\tdisplayed_event_text_color: [\"#ffef80\", \"7e2727\"]\r\n};\r\n\r\nscheduler._skin_xy = {\r\n\tlightbox_additional_height: [90,50],\r\n\tnav_height: [59,22],\r\n\tbar_height: [24,20]\r\n};\r\n\r\n// material skin uses a different box sizing model than other skins, and also requires some post-processing.\r\n// In order to render events correctly, we need to know which box sizing model is used\r\n// We can detect it by styles applied, taking into account that styles may be loaded after scheduler is rendered\r\n\r\nscheduler._is_material_skin = function(){\r\n\tif(!scheduler.skin){\r\n\t\treturn checkIfMaterialSkin();\r\n\t}else{\r\n\t\treturn ((scheduler.skin + \"\").indexOf(\"material\") > -1);\r\n\t}\r\n};\r\n\r\nfunction themeNameFromFile(){\r\n\tvar links = document.getElementsByTagName(\"link\");\r\n\tfor (var i = 0; i < links.length; i++) {\r\n\t\tvar res = links[i].href.match(\"dhtmlxscheduler_([a-z]+).css\");\r\n\t\tif (res){\r\n\t\t\treturn res[1];\r\n\t\t}\r\n\t}\r\n}\r\n\r\nscheduler._build_skin_info = function() {\r\n\tmonitorThemeChange();\r\n\tconst styles = getComputedStyle(this.$container);\r\n\tconst themeVar = styles.getPropertyValue(\"--dhx-scheduler-theme\");\r\n\r\n\tlet isCssVarTheme = !!themeVar;\r\n\tlet themeName;\r\n\tlet cssValues = {};\r\n\tlet oldMaterialTheme = false;\r\n\r\n\tif(isCssVarTheme){\r\n\t\tthemeName = themeVar;\r\n\t\tfor(let i in scheduler.xy){\r\n\t\t\tcssValues[i] = styles.getPropertyValue(`--dhx-scheduler-xy-${i}`);\r\n\t\t}\r\n\r\n\t\tcssValues.hour_size_px = styles.getPropertyValue(`--dhx-scheduler-config-hour_size_px`);\r\n\t\tcssValues.wide_form = styles.getPropertyValue(`--dhx-scheduler-config-form_wide`);\r\n\r\n\t}else{\r\n\t\tthemeName = themeNameFromFile();\r\n\t\toldMaterialTheme = scheduler._is_material_skin();\r\n\t}\r\n\r\n\r\n\tscheduler._theme_info = {\r\n\t\ttheme: themeName,\r\n\t\tcssVarTheme: isCssVarTheme,\r\n\t\toldMaterialTheme: oldMaterialTheme,\r\n\t\tvalues: cssValues\r\n\t};\r\n\r\n\tif(scheduler._theme_info.cssVarTheme){\r\n\t\tconst themeVariables = this._theme_info.values;\r\n\t\tfor(let i in scheduler.xy){\r\n\t\t\tif(!isNaN(parseInt(themeVariables[i]))){\r\n\t\t\t\tscheduler.xy[i] = parseInt(themeVariables[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\n\r\nvar calculatedMaterial;\r\nfunction checkIfMaterialSkin(){\r\n\tif(calculatedMaterial === undefined){\r\n\t\tvar probe = document.createElement(\"div\");\r\n\t\tprobe.style.position = \"absolute\";\r\n\t\tprobe.style.left = \"-9999px\";\r\n\t\tprobe.style.top = \"-9999px\";\r\n\t\tprobe.innerHTML = \"
\" +\r\n\t\t\t\"
\" +\r\n\t\t\t\"
\"+\r\n\t\t\"
\";\r\n\t\tdocument.body.appendChild(probe);\r\n\t\tvar styles = window.getComputedStyle(probe.querySelector(\".dhx_cal_scale_placeholder\"));\r\n\t\tvar position = styles.getPropertyValue('position');\r\n\t\tif(position === \"absolute\"){\r\n\t\t\t// page has skins for placeholder element from material skin\r\n\t\t\tcalculatedMaterial = true;\r\n\t\t}else{\r\n\t\t\tcalculatedMaterial = false;\r\n\t\t}\r\n\r\n\t\tsetTimeout(function(){\r\n\t\t\tcalculatedMaterial = null;\r\n\t\t\tif(probe && probe.parentNode){\r\n\t\t\t\tprobe.parentNode.removeChild(probe);\r\n\t\t\t}\r\n\t\t}, 500);\r\n\t}\r\n\treturn calculatedMaterial;\r\n}\r\n\r\nvar cachedBorderBoxValue;\r\nfunction checkIfBorderBoxStyling(){\r\n\tif(scheduler._is_material_skin()){\r\n\t\treturn true;\r\n\t}else{\r\n\t\tif(cachedBorderBoxValue === undefined){\r\n\t\t\tvar probe = document.createElement(\"div\");\r\n\t\t\tprobe.style.position = \"absolute\";\r\n\t\t\tprobe.style.left = \"-9999px\";\r\n\t\t\tprobe.style.top = \"-9999px\";\r\n\t\t\tprobe.innerHTML = \"
\" +\r\n\t\t\t\t\"
\" +\r\n\t\t\t\t\t\"
\"+\r\n\t\t\t\t\"
\"+\r\n\t\t\t\"
\";\r\n\r\n\t\t\tdocument.body.appendChild(probe);\r\n\t\t\tvar styles = window.getComputedStyle(probe.querySelector(\".dhx_body\"));\r\n\t\t\tvar boxSizing = styles.getPropertyValue('box-sizing');\r\n\t\t\tdocument.body.removeChild(probe);\r\n\t\t\tcachedBorderBoxValue = !!(boxSizing === \"border-box\");\r\n\r\n\t\t\tif(!cachedBorderBoxValue){\r\n\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\tcachedBorderBoxValue = undefined;\r\n\t\t\t\t}, 1000);// recalculate in case scheduler initialized before skin is loaded\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\treturn cachedBorderBoxValue;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction refreshAfterLoad(){\r\n\tif(scheduler._is_material_skin() || scheduler._border_box_events()){\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar oldStyling = cachedBorderBoxValue;\r\n\tcachedBorderBoxValue = undefined;\r\n\tcalculatedMaterial = undefined;\r\n\tvar newStyling = checkIfBorderBoxStyling();\r\n\r\n\t// if box styling model changed - means scheduler was rendered before stylesheet was loaded or parsed inline\r\n\t// repaint scheduler in order to apply new styles\r\n\tif(oldStyling !== newStyling && scheduler.$container && scheduler.getState().mode){\r\n\t\tscheduler.setCurrentView();\r\n\t}\r\n}\r\nscheduler.event(window, 'DOMContentLoaded', refreshAfterLoad);\r\nscheduler.event(window, 'load', refreshAfterLoad);\r\n\r\nscheduler._border_box_events = function(){\r\n\treturn checkIfBorderBoxStyling();\r\n};\r\n\r\nscheduler._configure = function(col, data, skin){\r\n\tfor (var key in data)\r\n\t\tif (typeof col[key] == \"undefined\")\r\n\t\t\tcol[key] = data[key][skin];\r\n};\r\n\r\nscheduler.setSkin = function(value){\r\n\tthis.skin = value;\r\n\tscheduler._addThemeClass();\r\n\tif(scheduler.$container){\r\n\t\tthis._skin_init();\r\n\t\tthis.render();\r\n\t}\r\n\t\r\n\t//\r\n};\r\n\r\nfunction flatSkinHourScale(date){\r\n\tvar min = date.getMinutes();\r\n\tmin = min < 10 ? \"0\"+min : min;\r\n\tvar html = \"\"+ date.getHours() +\"\"+\r\n\t\t\" \"+ min +\"\";\r\n\treturn html;\r\n}\r\n\r\nlet monitorIntervalId = null;\r\nfunction monitorThemeChange(){\r\n\tconst container = scheduler.$container;\r\n\t\r\n\tclearInterval(monitorIntervalId);\r\n\tif(container){\r\n\t\tmonitorIntervalId = setInterval(() => {\r\n\t\t\tconst csstheme = getComputedStyle(container).getPropertyValue('--dhx-scheduler-theme');\r\n\t\t\tif(csstheme && csstheme !== scheduler.skin){\r\n\t\t\t\tscheduler.setSkin(csstheme);\r\n\t\t\t}\r\n\r\n\t\t}, 100);\r\n\t}\r\n}\r\nscheduler.attachEvent(\"onDestroy\", function(){\r\n\tclearInterval(monitorIntervalId);\r\n});\r\n\r\nscheduler._skin_init = function(){\r\n\tthis._build_skin_info();\r\n\r\n\tif (!this.skin){\r\n\t\tthis.skin = this._theme_info.theme;\r\n\t}\r\n\tscheduler._addThemeClass();\r\n\tif (scheduler.skin === \"flat\"){\r\n\t\t// scheduler.xy.scale_height = 35;\r\n\t\tscheduler.templates.hour_scale = flatSkinHourScale;\r\n\t}else if (scheduler.templates.hour_scale === flatSkinHourScale){\r\n\t\tscheduler.templates.hour_scale = scheduler.date.date_to_str(scheduler.config.hour_date);\r\n\t}\r\n\r\n\r\n\r\n\t//scheduler._lightbox_template=\"
 
\";\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\r\n\t\tvar date_to_str = scheduler.date.date_to_str(\"%d\");\r\n\t\tif(!scheduler.templates._old_month_day){\r\n\t\t\tscheduler.templates._old_month_day = scheduler.templates.month_day;\r\n\t\t}\r\n\t\tvar old_month_day = scheduler.templates._old_month_day;\r\n\t\tscheduler.templates.month_day = function(date) {\r\n\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\tvar label = date_to_str(date);\r\n\t\t\t\tif (date.getDate() == 1) {\r\n\t\t\t\t\tlabel = scheduler.locale.date.month_full[date.getMonth()] + \" \" + label;\r\n\t\t\t\t}\r\n\t\t\t\tif (+date == +scheduler.date.date_part(this._currentDate())) {\r\n\t\t\t\t\tlabel = scheduler.locale.labels.dhx_cal_today_button + \" \" + label;\r\n\t\t\t\t}\r\n\t\t\t\treturn label;\r\n\t\t\t} else {\r\n\t\t\t\treturn old_month_day.call(this, date);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t// tab classes\r\n\t\tif(scheduler.config.fix_tab_position){\r\n\t\t\tconst tabs = scheduler._els[\"dhx_cal_navline\"][0].querySelectorAll('[data-tab]');\r\n\t\t\ttabs.forEach((tab) => {\r\n\t\t\t\tconst view = tab.getAttribute(\"data-tab\") || tab.getAttribute(\"name\");\r\n\r\n\t\t\t\tswitch (view) {\r\n\t\t\t\t\tcase \"day\":\r\n\t\t\t\t\tcase \"day_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_first\");\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"week\":\r\n\t\t\t\t\tcase \"week_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"month\":\r\n\t\t\t\t\tcase \"month_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_last\");\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_standalone\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\treorderTabs(scheduler._els[\"dhx_cal_navline\"][0]);\r\n\r\n\t\t}\r\n\t}, {once: true});\r\n\r\n\tfunction reorderTabs(container) {\r\n\t\t// segmented tabs should go first\r\n\r\n\t\tif(scheduler.config.header){\r\n\t\t\treturn;\r\n\t\t\t// don't reorder tabs if header is defined via config\r\n\t\t}\r\n\t\tconst tabs = Array.from(container.querySelectorAll('.dhx_cal_tab'));\r\n\t\r\n\t\t// segmented tabs\r\n\t\tconst order = ['day', 'week', 'month'];\r\n\t\r\n\t\tconst specialTabs = order.map(tabName => \r\n\t\t\ttabs.find(tab => tab.getAttribute('data-tab') === tabName)\r\n\t\t).filter(tab => tab !== undefined);\r\n\t\r\n\t\tlet firstTab = tabs.length > 0 ? tabs[0] : null;\r\n\r\n\t\tspecialTabs.reverse().forEach(tab => {\r\n\t\t\tcontainer.insertBefore(tab, firstTab);\r\n\t\t\tfirstTab = tab;\r\n\t\t});\r\n\t}\r\n\r\n\t// scheduler._skin_init = function(){\r\n\t// \tthis._build_skin_info();\r\n\t// \tthis.skin = this._theme_info.theme;\r\n\t// };\r\n};\r\n\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nif (window.jQuery){\r\n\r\n(function( $ ){\r\n\tvar counter = 0;\r\n\tvar methods = [];\r\n\t$.fn.dhx_scheduler = function(config){\r\n\t\tif (typeof(config) === 'string') {\r\n\t\t\tif (methods[config] ) {\r\n\t\t\t\treturn methods[config].apply(this, []);\r\n\t\t\t}else {\r\n\t\t\t\t$.error('Method ' + config + ' does not exist on jQuery.dhx_scheduler');\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tvar views = [];\r\n\t\t\tthis.each(function() {\r\n\t\t\t\tif (this && this.getAttribute){\r\n\t\t\t\t\tif (!this.getAttribute(\"dhxscheduler\")){\r\n\t\t\t\t\t\tvar name = \"scheduler\";\r\n\t\t\t\t\t\tif (counter){\r\n\t\t\t\t\t\t\tname = \"scheduler\" + (counter+1);\r\n\t\t\t\t\t\t\twindow[name] = Scheduler.getSchedulerInstance();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tvar comp = window[name];\r\n\r\n\t\t\t\t\t\tthis.setAttribute(\"dhxscheduler\", name);\r\n\t\t\t\t\t\tfor (var key in config)\r\n\t\t\t\t\t\t\tif (key!=\"data\")\r\n\t\t\t\t\t\t\t\tcomp.config[key] = config[key];\r\n\r\n\t\t\t\t\t\tif (!this.getElementsByTagName(\"div\").length){\r\n\t\t\t\t\t\t\tthis.innerHTML = '
';\r\n\t\t\t\t\t\t\tthis.className += \" dhx_cal_container\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcomp.init(this, comp.config.date, comp.config.mode);\r\n\t\t\t\t\t\tif (config.data)\r\n\t\t\t\t\t\t\tcomp.parse(config.data);\r\n\r\n\t\t\t\t\t\tviews.push(comp);\r\n\t\t\t\t\t\tcounter++;\r\n\t\t\t\t\t} else\r\n\t\t\t\t\t\tviews.push(window[this.getAttribute(\"dhxscheduler\")]);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif (views.length === 1) return views[0];\r\n\t\t\treturn views;\r\n\t\t}\r\n\t};\r\n\r\n\r\n\r\n\r\n})(window.jQuery);\r\n\r\n}\r\n\r\n}","import global from \"../global\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\n(function(){\r\n\r\n\tvar setCurrentView = scheduler.setCurrentView,\r\n\t\tupdateView = scheduler.updateView;\r\n\tvar update_view_timer = null,\r\n\t\tcurr_view_timer = null;\r\n\r\n\tvar lazy_setCurrentView = function(date, mode){\r\n\t\tvar self = this;\r\n\t\tglobal.clearTimeout(curr_view_timer);\r\n\t\tglobal.clearTimeout(update_view_timer);\r\n\r\n\t\tvar oldDate = self._date,\r\n\t\t\toldMode = self._mode;\r\n\t\tupdateFlags(this, date, mode);\r\n\r\n\t\tcurr_view_timer = setTimeout(function(){\r\n\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif (!self.callEvent(\"onBeforeViewChange\", [oldMode, oldDate, mode || self._mode, date || self._date])){\r\n\t\t\t\tupdateFlags(self, oldDate, oldMode);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tupdateView.call(self, date, mode);\r\n\t\t\tself.callEvent(\"onViewChange\", [self._mode, self._date]);\r\n\r\n\t\t\tglobal.clearTimeout(update_view_timer);\r\n\t\t\tcurr_view_timer = 0;\r\n\t\t}, scheduler.config.delay_render);\r\n\t};\r\n\tvar lazy_updateView = function(date, mode){\r\n\t\tvar self = this,\r\n\t\t\tars = arguments;\r\n\r\n\t\tupdateFlags(this, date, mode);\r\n\r\n\t\tglobal.clearTimeout(update_view_timer);\r\n\t\tupdate_view_timer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif(curr_view_timer)\r\n\t\t\t\treturn;\r\n\r\n\t\t\tupdateView.apply(self, ars);\r\n\t\t}, scheduler.config.delay_render);\r\n\t};\r\n\tfunction updateFlags(scheduler, date, mode){\r\n\t\tif(date)\r\n\t\t\tscheduler._date = date;\r\n\t\tif(mode)\r\n\t\t\tscheduler._mode = mode;\r\n\r\n\t}\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\tif(scheduler.config.delay_render){\r\n\t\t\tscheduler.setCurrentView = lazy_setCurrentView;\r\n\t\t\tscheduler.updateView = lazy_updateView;\r\n\t\t}else{\r\n\t\t\tscheduler.setCurrentView = setCurrentView;\r\n\t\t\tscheduler.updateView = updateView;\r\n\t\t}\r\n\t});\r\n\r\n})();\r\n\r\n}","export default function DataProcessorEvents(scheduler, dp){\r\n\tthis.$scheduler = scheduler;\r\n\tthis.$dp = dp;\r\n\tthis._dataProcessorHandlers = [];\r\n\r\n\tthis.attach = function () {\r\n\t\tvar dp = this.$dp;\r\n\t\tvar scheduler = this.$scheduler;\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onEventAdded\", function(id) {\r\n\t\t\tif (!this._loading && this._validId(id))\r\n\t\t\tdp.setUpdated(id,true,\"inserted\");\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onConfirmedBeforeEventDelete\", function(id) {\r\n\t\t\tif (!this._validId(id)) return;\r\n\t\t\tvar z=dp.getState(id);\r\n\r\n\t\t\tif (z==\"inserted\" || this._new_event) { dp.setUpdated(id,false); return true; }\r\n\t\t\tif (z==\"deleted\") return false;\r\n\t\t\tif (z==\"true_deleted\") return true;\r\n\r\n\t\t\tdp.setUpdated(id,true,\"deleted\");\r\n\t\t\treturn false;\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onEventChanged\", function(id) { \r\n\t\t\tif (!this._loading && this._validId(id))\r\n\t\t\tdp.setUpdated(id,true,\"updated\");\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onClearAll\", function() { \r\n\t\t\t// clear dataprocessor state when scheduler is reset\r\n\t\t\tdp._in_progress={};\r\n\t\t\tdp._invalid={};\r\n\t\t\tdp.updatedRows = [];\r\n\t\t\tdp._waitMode = 0;\r\n\t\t}));\r\n\r\n\t\tdp.attachEvent(\"insertCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"updateCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"deleteCallback\", function(upd, id) {\r\n\t\t\tif (scheduler.getEvent(id)){\r\n\t\t\t\tscheduler.setUserData(id, this.action_param, \"true_deleted\");\r\n\t\t\t\tscheduler.deleteEvent(id);\r\n\t\t\t} else if (scheduler._add_rec_marker)\r\n\t\t\t\tscheduler._update_callback(upd, id);\r\n\t\t});\r\n\t};\r\n\r\n\tthis.detach = function () {\r\n\t\tfor (var key in this._dataProcessorHandlers) {\r\n\t\t\tvar handler = this._dataProcessorHandlers[key];\r\n\t\t\tthis.$scheduler.detachEvent(handler);\r\n\t\t}\r\n\t\tthis._dataProcessorHandlers = [];\r\n\t};\r\n}\r\n\r\nexport function extendScheduler(scheduler, dp){\r\n\tscheduler._validId=function(id){\r\n\t\tif(this._is_virtual_event){\r\n\t\t\treturn !this._is_virtual_event(id);\r\n\t\t}\r\n\t\treturn true;\r\n\t};\r\n\tscheduler.setUserData=function(id,name,value){\r\n\t\tif (id){\r\n\t\t\tvar ev = this.getEvent(id);\r\n\t\t\tif(ev) ev[name]=value;\r\n\t\t}else{\r\n\t\t\tthis._userdata[name]=value;\r\n\t\t}\r\n\t};\r\n\tscheduler.getUserData=function(id,name){\r\n\t\tif (id){\r\n\t\t\tvar ev = this.getEvent(id);\r\n\t\t\tif(ev)\r\n\t\t\t\treturn ev[name];\r\n\t\t\telse\r\n\t\t\t\treturn null;\r\n\t\t}else{\r\n\t\t\treturn this._userdata[name];\r\n\t\t}\r\n\t};\r\n\tscheduler._set_event_text_style=function(id,style){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\t\tthis.for_rendered(id,function(r){\r\n\t\t\tr.style.cssText+=\";\"+style;\r\n\t\t});\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tev[\"_text_style\"]=style;\r\n\t\tthis.event_updated(ev);\r\n\t};\r\n\tscheduler._update_callback = function(upd,id){\r\n\t\tvar data = scheduler._xmlNodeToJSON(upd.firstChild);\r\n\t\t//fix for updates of recurring events\r\n\t\tif (data.rec_type == \"none\") data.rec_pattern = \"none\";\r\n\t\tdata.text = data.text||data._tagvalue;\r\n\t\tdata.start_date = scheduler._helpers.parseDate(data.start_date);\r\n\t\tdata.end_date = scheduler._helpers.parseDate(data.end_date);\r\n\t\tscheduler.addEvent(data);\r\n\t\tif (scheduler._add_rec_marker)\r\n\t\t\tscheduler.setCurrentView();\r\n\t};\r\n\tscheduler._dp_change_event_id = function(id, new_id){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\t\tscheduler.changeEventId(id, new_id);\r\n\t};\r\n\tscheduler._dp_hook_delete = function(id, new_id){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\r\n\t\tif(new_id && id != new_id){\r\n\t\t\tif(this.getUserData(id, dp.action_param) == \"true_deleted\")\r\n\t\t\t\tthis.setUserData(id, dp.action_param, \"updated\");\r\n\r\n\t\t\tthis.changeEventId(id, new_id);\r\n\t\t}\r\n\t\treturn this.deleteEvent(new_id, true);\r\n\t};\r\n\r\n\tscheduler.setDp = function() {\r\n\t\tthis._dp = dp;\r\n\t};\r\n\tscheduler.setDp();\r\n}","import DataProcessorEvents from \"./dataprocessor_hooks\";\r\nimport { extendScheduler } from \"./dataprocessor_hooks\";\r\nimport eventable from \"../../utils/eventable\";\r\nimport global from \"../../global\";\r\n\r\n/**\r\n *\t@desc: constructor, data processor object\r\n *\t@param: serverProcessorURL - url used for update\r\n *\t@type: public\r\n */\r\nexport function DataProcessor(serverProcessorURL){\r\n\tthis.serverProcessor = serverProcessorURL;\r\n\tthis.action_param = \"!nativeeditor_status\";\r\n\r\n\tthis.object = null;\r\n\tthis.updatedRows = []; // ids of updated rows\r\n\r\n\tthis.autoUpdate = true;\r\n\tthis.updateMode = \"cell\";\r\n\tthis._tMode = \"GET\";\r\n\tthis._headers = null;\r\n\tthis._payload = null;\r\n\tthis.post_delim = \"_\";\r\n\r\n\tthis._waitMode = 0;\r\n\tthis._in_progress = {};\r\n\tthis._invalid = {};\r\n\tthis.messages = [];\r\n\r\n\tthis.styles = {\r\n\t\tupdated: \"font-weight:bold;\",\r\n\t\tinserted: \"font-weight:bold;\",\r\n\t\tdeleted: \"text-decoration : line-through;\",\r\n\t\tinvalid: \"background-color:FFE0E0;\",\r\n\t\tinvalid_cell: \"border-bottom:2px solid red;\",\r\n\t\terror: \"color:red;\",\r\n\t\tclear: \"font-weight:normal;text-decoration:none;\"\r\n\t};\r\n\tthis.enableUTFencoding(true);\r\n\teventable(this); // TODO: need to update\r\n\r\n\treturn this;\r\n}\r\nDataProcessor.prototype = {\r\n\tsetTransactionMode: function (mode, total) {\r\n\t\tif (typeof mode == \"object\") {\r\n\t\t\tthis._tMode = mode.mode || this._tMode;\r\n\r\n\t\t\tif (mode.headers !== undefined) {\r\n\t\t\t\tthis._headers = mode.headers;\r\n\t\t\t}\r\n\r\n\t\t\tif (mode.payload !== undefined) {\r\n\t\t\t\tthis._payload = mode.payload;\r\n\t\t\t}\r\n\t\t\tthis._tSend = !!total;\r\n\t\t} else {\r\n\t\t\tthis._tMode = mode;\r\n\t\t\tthis._tSend = total;\r\n\t\t}\r\n\r\n\t\tif (this._tMode == \"REST\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t}\r\n\r\n\t\tif (this._tMode === \"JSON\" || this._tMode === \"REST-JSON\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t\tthis._serializeAsJson = true;\r\n\t\t\tthis._headers = this._headers || {};\r\n\t\t\tthis._headers[\"Content-Type\"] = \"application/json\";\r\n\t\t}else{\r\n\t\t\tif(this._headers && !this._headers[\"Content-Type\"]){\r\n\t\t\t\tthis._headers[\"Content-Type\"] = \"application/x-www-form-urlencoded\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (this._tMode === \"CUSTOM\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t\tthis._router = mode.router;\r\n\t\t}\r\n\t},\r\n\tescape: function (data) {\r\n\t\tif (this._utf)\r\n\t\t\treturn encodeURIComponent(data);\r\n\t\telse\r\n\t\t\treturn escape(data);\r\n\t},\r\n\t/**\r\n\t *\t@desc: allows to set escaping mode\r\n\t *\t@param: true - utf based escaping, simple - use current page encoding\r\n\t *\t@type: public\r\n\t */\r\n\tenableUTFencoding: function (mode) {\r\n\t\tthis._utf = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: allows to define, which column may trigger update\r\n\t *\t@param: val - array or list of true/false values\r\n\t *\t@type: public\r\n\t */\r\n\tsetDataColumns: function (val) {\r\n\t\tthis._columns = (typeof val == \"string\") ? val.split(\",\") : val;\r\n\t},\r\n\t/**\r\n\t *\t@desc: get state of updating\r\n\t *\t@returns: true - all in sync with server, false - some items not updated yet.\r\n\t *\t@type: public\r\n\t */\r\n\tgetSyncState: function () {\r\n\t\treturn !this.updatedRows.length;\r\n\t},\r\n\t/**\r\n\t *\t@desc: enable/disable named field for data syncing, will use column ids for grid\r\n\t *\t@param: mode - true/false\r\n\t *\t@type: public\r\n\t */\r\n\tenableDataNames: function (mode) {\r\n\t\tthis._endnm = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: enable/disable mode , when only changed fields and row id send to the server side, instead of all fields in default mode\r\n\t *\t@param: mode - true/false\r\n\t *\t@type: public\r\n\t */\r\n\tenablePartialDataSend: function (mode) {\r\n\t\tthis._changed = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: set if rows should be send to server automatically\r\n\t *\t@param: mode - \"row\" - based on row selection changed, \"cell\" - based on cell editing finished, \"off\" - manual data sending\r\n\t *\t@type: public\r\n\t */\r\n\tsetUpdateMode: function (mode, dnd) {\r\n\t\tthis.autoUpdate = (mode == \"cell\");\r\n\t\tthis.updateMode = mode;\r\n\t\tthis.dnd = dnd;\r\n\t},\r\n\tignore: function (code, master) {\r\n\t\tthis._silent_mode = true;\r\n\t\tcode.call(master || window);\r\n\t\tthis._silent_mode = false;\r\n\t},\r\n\t/**\r\n\t *\t@desc: mark row as updated/normal. check mandatory fields,initiate autoupdate (if turned on)\r\n\t *\t@param: rowId - id of row to set update-status for\r\n\t *\t@param: state - true for \"updated\", false for \"not updated\"\r\n\t *\t@param: mode - update mode name\r\n\t *\t@type: public\r\n\t */\r\n\tsetUpdated: function (rowId, state, mode) {\r\n\t\tif (this._silent_mode) return;\r\n\t\tvar ind = this.findRow(rowId);\r\n\r\n\t\tmode = mode || \"updated\";\r\n\t\tvar existing = this.$scheduler.getUserData(rowId, this.action_param);\r\n\t\tif (existing && mode == \"updated\") mode = existing;\r\n\t\tif (state) {\r\n\t\t\tthis.set_invalid(rowId, false); //clear previous error flag\r\n\t\t\tthis.updatedRows[ind] = rowId;\r\n\t\t\tthis.$scheduler.setUserData(rowId, this.action_param, mode);\r\n\t\t\tif (this._in_progress[rowId])\r\n\t\t\t\tthis._in_progress[rowId] = \"wait\";\r\n\t\t} else {\r\n\t\t\tif (!this.is_invalid(rowId)) {\r\n\t\t\t\tthis.updatedRows.splice(ind, 1);\r\n\t\t\t\tthis.$scheduler.setUserData(rowId, this.action_param, \"\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.markRow(rowId, state, mode);\r\n\t\tif (state && this.autoUpdate) this.sendData(rowId);\r\n\t},\r\n\r\n\tmarkRow: function (id, state, mode) {\r\n\t\tvar str = \"\";\r\n\t\tvar invalid = this.is_invalid(id);\r\n\t\tif (invalid) {\r\n\t\t\tstr = this.styles[invalid];\r\n\t\t\tstate = true;\r\n\t\t}\r\n\t\tif (this.callEvent(\"onRowMark\", [id, state, mode, invalid])) {\r\n\t\t\t//default logic\r\n\t\t\tstr = this.styles[state ? mode : \"clear\"] + str;\r\n\r\n\t\t\tthis.$scheduler[this._methods[0]](id, str);\r\n\r\n\t\t\tif (invalid && invalid.details) {\r\n\t\t\t\tstr += this.styles[invalid + \"_cell\"];\r\n\t\t\t\tfor (var i = 0; i < invalid.details.length; i++)\r\n\t\t\t\t\tif (invalid.details[i])\r\n\t\t\t\t\t\tthis.$scheduler[this._methods[1]](id, i, str);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tgetActionByState: function(state) {\r\n\t\tif (state === \"inserted\") {\r\n\t\t\treturn \"create\";\r\n\t\t}\r\n\t\tif (state === \"updated\") {\r\n\t\t\treturn \"update\";\r\n\t\t}\r\n\t\tif (state === \"deleted\") {\r\n\t\t\treturn \"delete\";\r\n\t\t}\r\n\t\treturn \"update\";\r\n\t},\r\n\r\n\tgetState: function (id) {\r\n\t\treturn this.$scheduler.getUserData(id, this.action_param);\r\n\t},\r\n\tis_invalid: function (id) {\r\n\t\treturn this._invalid[id];\r\n\t},\r\n\tset_invalid: function (id, mode, details) {\r\n\t\tif (details) mode = {\r\n\t\t\tvalue: mode, details: details, toString: function () {\r\n\t\t\t\treturn this.value.toString();\r\n\t\t\t}\r\n\t\t};\r\n\t\tthis._invalid[id] = mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: check mandatory fields and varify values of cells, initiate update (if specified)\r\n\t *\t@param: rowId - id of row to set update-status for\r\n\t *\t@type: public\r\n\t */\r\n\tcheckBeforeUpdate: function (rowId) {\r\n\t\treturn true;\r\n\t},\r\n\t/**\r\n\t *\t@desc: send row(s) values to server\r\n\t *\t@param: rowId - id of row which data to send. If not specified, then all \"updated\" rows will be send\r\n\t *\t@type: public\r\n\t */\r\n\tsendData: function (rowId) {\r\n\t\tif (this.$scheduler.editStop) this.$scheduler.editStop();\r\n\r\n\t\tif (typeof rowId == \"undefined\" || this._tSend) return this.sendAllData();\r\n\t\tif (this._in_progress[rowId]) return false;\r\n\r\n\t\tthis.messages = [];\r\n\t\tif (!this.checkBeforeUpdate(rowId) && this.callEvent(\"onValidationError\", [rowId, this.messages])) return false;\r\n\t\tthis._beforeSendData(this._getRowData(rowId), rowId);\r\n\t},\r\n\t_beforeSendData: function (data, rowId) {\r\n\t\tif (!this.callEvent(\"onBeforeUpdate\", [rowId, this.getState(rowId), data])) return false;\r\n\t\tthis._sendData(data, rowId);\r\n\t},\r\n\tserialize: function (data, id) {\r\n\t\tif (this._serializeAsJson) {\r\n\t\t\treturn this._serializeAsJSON(data);\r\n\t\t}\r\n\r\n\t\tif (typeof data == \"string\")\r\n\t\t\treturn data;\r\n\t\tif (typeof id != \"undefined\")\r\n\t\t\treturn this.serialize_one(data, \"\");\r\n\t\telse {\r\n\t\t\tvar stack = [];\r\n\t\t\tvar keys = [];\r\n\t\t\tfor (var key in data)\r\n\t\t\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\t\t\tstack.push(this.serialize_one(data[key], key + this.post_delim));\r\n\t\t\t\t\tkeys.push(key);\r\n\t\t\t\t}\r\n\t\t\tstack.push(\"ids=\" + this.escape(keys.join(\",\")));\r\n\t\t\tif (this.$scheduler.security_key)\r\n\t\t\t\tstack.push(\"dhx_security=\" + (this.$scheduler.security_key));\r\n\t\t\treturn stack.join(\"&\");\r\n\t\t}\r\n\t},\r\n\tserialize_one: function (data, pref) {\r\n\t\tif (typeof data == \"string\")\r\n\t\t\treturn data;\r\n\t\tvar stack = [];\r\n\t\tvar serialized = \"\";\r\n\t\tfor (var key in data)\r\n\t\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\t\tif ((key == \"id\" || key == this.action_param) && this._tMode == \"REST\") continue;\r\n\t\t\t\tif (typeof data[key] === \"string\" || typeof data[key] === \"number\") {\r\n\t\t\t\t\tserialized = data[key];\r\n\t\t\t\t} else {\r\n\t\t\t\t\tserialized = JSON.stringify(data[key]);\r\n\t\t\t\t}\r\n\t\t\t\tstack.push(this.escape((pref || \"\") + key) + \"=\" + this.escape(serialized));\r\n\t\t\t}\r\n\t\treturn stack.join(\"&\");\r\n\t},\r\n\t_applyPayload: function (url) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tif (this._payload)\r\n\t\t\tfor (var key in this._payload)\r\n\t\t\t\turl = url + ajax.urlSeparator(url) + this.escape(key) + \"=\" + this.escape(this._payload[key]);\r\n\t\treturn url;\r\n\t},\r\n\t_sendData: function (dataToSend, rowId) {\r\n\t\tif (!dataToSend) {\r\n\t\t\treturn; // nothing to send\r\n\t\t}\r\n\t\tif (!this.callEvent(\"onBeforeDataSending\", rowId ? [rowId, this.getState(rowId), dataToSend] : [null, null, dataToSend])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (rowId) {\r\n\t\t\tthis._in_progress[rowId] = (new Date()).valueOf();\r\n\t\t}\r\n\r\n\t\tvar self = this;\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\r\n\t\tif (this._tMode === \"CUSTOM\") {\r\n\t\t\tvar state = this.getState(rowId);\r\n\t\t\tvar action = this.getActionByState(state);\r\n\t\t\tvar _onResolvedCreateUpdate = function (tag) {\r\n\t\t\t\tvar resultState = state;\r\n\t\t\t\tif(tag && tag.responseText && tag.setRequestHeader){\r\n\t\t\t\t\tif(tag.status !== 200){\r\n\t\t\t\t\t\tresultState = \"error\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\ttag = JSON.parse(tag.responseText);\r\n\t\t\t\t\t} catch (e){}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tresultState = resultState || \"updated\";\r\n\t\t\t\tvar sid = rowId;\r\n\t\t\t\tvar tid = rowId;\r\n\r\n\t\t\t\tif (tag) {\r\n\t\t\t\t\tresultState = tag.action || resultState;\r\n\t\t\t\t\tsid = tag.sid || sid;\r\n\t\t\t\t\ttid = tag.id || tag.tid || tid;\r\n\t\t\t\t}\r\n\t\t\t\tself.afterUpdateCallback(sid, tid, resultState, tag);\r\n\t\t\t};\r\n\r\n\t\t\tconst routerMode = \"event\";\r\n\t\t\tvar actionPromise;\r\n\t\t\tif (this._router instanceof Function) {\r\n\t\t\t\tactionPromise = this._router(routerMode, action, dataToSend, rowId);\r\n\t\t\t} else {\r\n\t\t\t\tswitch (state) {\r\n\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].create(dataToSend);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].delete(rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].update(dataToSend, rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(actionPromise){\r\n\t\t\t\t// neither promise nor {tid: newId} response object\r\n\t\t\t\tif(!actionPromise.then &&\r\n\t\t\t\t\t(actionPromise.id === undefined && actionPromise.tid === undefined && actionPromise.action === undefined)){\r\n\t\t\t\t\tthrow new Error(\"Incorrect router return value. A Promise or a response object is expected\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(actionPromise.then){\r\n\t\t\t\t\tactionPromise.then(_onResolvedCreateUpdate).catch(function(error) {\r\n\t\t\t\t\t\tif(error && error.action){\r\n\t\t\t\t\t\t\t_onResolvedCreateUpdate(error);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t_onResolvedCreateUpdate({ action: \"error\", value: error});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// custom method may return a response object in case of sync action\r\n\t\t\t\t\t_onResolvedCreateUpdate(actionPromise);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t_onResolvedCreateUpdate(null);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar queryParams = {\r\n\t\t\tcallback: function(xml) {\r\n\t\t\t\tvar ids = [];\r\n\r\n\t\t\t\tif (rowId) {\r\n\t\t\t\t\tids.push(rowId);\r\n\t\t\t\t} else if (dataToSend) {\r\n\t\t\t\t\tfor (var key in dataToSend) {\r\n\t\t\t\t\t\tids.push(key);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.afterUpdate(self, xml, ids);\r\n\t\t\t},\r\n\t\t\theaders: self._headers\r\n\t\t};\r\n\r\n\t\tvar urlParams = this.serverProcessor + (this._user ? (ajax.urlSeparator(this.serverProcessor) + [\"dhx_user=\" + this._user, \"dhx_version=\" + this.$scheduler.getUserData(0, \"version\")].join(\"&\")) : \"\");\r\n\t\tvar url = this._applyPayload(urlParams);\r\n\t\tvar data;\r\n\r\n\t\tswitch (this._tMode) {\r\n\t\t\tcase \"GET\":\r\n\t\t\t\tdata = this._cleanupArgumentsBeforeSend(dataToSend);\r\n\t\t\t\tqueryParams.url = url + ajax.urlSeparator(url) + this.serialize(data, rowId);\r\n\t\t\t\tqueryParams.method = \"GET\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"POST\":\r\n\t\t\t\tdata = this._cleanupArgumentsBeforeSend(dataToSend);\r\n\t\t\t\tqueryParams.url = url;\r\n\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\tqueryParams.data = this.serialize(data, rowId);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"JSON\":\r\n\t\t\t\tdata = {};\r\n\t\t\t\tvar preprocessedData = this._cleanupItemBeforeSend(dataToSend);\r\n\t\t\t\tfor (var key in preprocessedData) {\r\n\t\t\t\t\tif (key === this.action_param || key === \"id\" || key === \"gr_id\") {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdata[key] = preprocessedData[key];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tqueryParams.url = url;\r\n\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\tqueryParams.data = JSON.stringify({\r\n\t\t\t\t\tid: rowId,\r\n\t\t\t\t\taction: dataToSend[this.action_param],\r\n\t\t\t\t\tdata: data\r\n\t\t\t\t});\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"REST\":\r\n\t\t\tcase \"REST-JSON\":\r\n\t\t\t\turl = urlParams.replace(/(&|\\?)editing=true/, \"\");\r\n\t\t\t\tdata = \"\";\r\n\r\n\t\t\t\tswitch (this.getState(rowId)) {\r\n\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\t\t\tqueryParams.data = this.serialize(dataToSend, rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\tqueryParams.method = \"DELETE\";\r\n\t\t\t\t\t\turl = url + (url.slice(-1) === \"/\" ? \"\" : \"/\") + rowId;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tqueryParams.method = \"PUT\";\r\n\t\t\t\t\t\tqueryParams.data = this.serialize(dataToSend, rowId);\r\n\t\t\t\t\t\turl = url + (url.slice(-1) === \"/\" ? \"\" : \"/\") + rowId;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tqueryParams.url = this._applyPayload(url);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tthis._waitMode++;\r\n\t\treturn ajax.query(queryParams);\r\n\t},\r\n\tsendAllData: function () {\r\n\t\tif (!this.updatedRows.length || this.updateMode === \"off\") { // FIXME: need to leave checking 'this.updateMode === \"off\"'?\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.messages = [];\r\n\t\tvar valid = true;\r\n\r\n\t\tthis._forEachUpdatedRow(function(rowId) {\r\n\t\t\tvalid = valid && this.checkBeforeUpdate(rowId);\r\n\t\t});\r\n\r\n\t\tif (!valid && !this.callEvent(\"onValidationError\", [\"\", this.messages])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (this._tSend) {\r\n\t\t\tthis._sendData(this._getAllData());\r\n\t\t} else {\r\n\t\t\tthis._forEachUpdatedRow(function(rowId) {\r\n\t\t\t\tif (!this._in_progress[rowId]) {\r\n\t\t\t\t\tif (this.is_invalid(rowId)) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis._beforeSendData(this._getRowData(rowId), rowId);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\r\n\t_getAllData: function (rowId) {\r\n\t\tvar out = {};\r\n\t\tvar has_one = false;\r\n\t\tthis._forEachUpdatedRow(function(id) {\r\n\t\t\tif (this._in_progress[id] || this.is_invalid(id)){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar row = this._getRowData(id);\r\n\t\t\tif (!this.callEvent(\"onBeforeUpdate\", [id, this.getState(id), row])) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tout[id] = row;\r\n\t\t\thas_one = true;\r\n\t\t\tthis._in_progress[id] = (new Date()).valueOf();\r\n\t\t});\r\n\t\treturn has_one ? out : null;\r\n\t},\r\n\r\n\tfindRow: function (pattern) {\r\n\t\tvar i = 0;\r\n\t\tfor (i = 0; i < this.updatedRows.length; i++)\r\n\t\t\tif (pattern == this.updatedRows[i]) break;\r\n\t\treturn i;\r\n\t},\r\n\r\n\t/**\r\n\t *\t@desc: define custom actions\r\n\t *\t@param: name - name of action, same as value of action attribute\r\n\t *\t@param: handler - custom function, which receives a XMl response content for action\r\n\t *\t@type: private\r\n\t */\r\n\tdefineAction: function (name, handler) {\r\n\t\tif (!this._uActions) this._uActions = {};\r\n\t\tthis._uActions[name] = handler;\r\n\t},\r\n\r\n\t/**\r\n\t *\t @desc: used in combination with setOnBeforeUpdateHandler to create custom client-server transport system\r\n\t *\t @param: sid - id of item before update\r\n\t *\t @param: tid - id of item after up0ate\r\n\t *\t @param: action - action name\r\n\t *\t @type: public\r\n\t *\t @topic: 0\r\n\t */\r\n\tafterUpdateCallback: function (sid, tid, action, btag) {\r\n\t\tif(!this.$scheduler){\r\n\t\t\t// destructor has been called before the callback\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar marker = sid;\r\n\t\tvar correct = (action !== \"error\" && action !== \"invalid\");\r\n\t\tif (!correct) {\r\n\t\t\tthis.set_invalid(sid, action);\r\n\t\t}\r\n\t\tif ((this._uActions) && (this._uActions[action]) && (!this._uActions[action](btag))) {\r\n\t\t\treturn (delete this._in_progress[marker]);\r\n\t\t}\r\n\r\n\t\tif (this._in_progress[marker] !== \"wait\") {\r\n\t\t\tthis.setUpdated(sid, false);\r\n\t\t}\r\n\r\n\t\tvar originalSid = sid;\r\n\r\n\t\tswitch (action) {\r\n\t\t\tcase \"inserted\":\r\n\t\t\tcase \"insert\":\r\n\t\t\t\tif (tid != sid) {\r\n\t\t\t\t\tthis.setUpdated(sid, false);\r\n\t\t\t\t\tthis.$scheduler[this._methods[2]](sid, tid);\r\n\t\t\t\t\tsid = tid;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"delete\":\r\n\t\t\tcase \"deleted\":\r\n\t\t\t\tthis.$scheduler.setUserData(sid, this.action_param, \"true_deleted\");\r\n\t\t\t\tthis.$scheduler[this._methods[3]](sid, tid);\r\n\t\t\t\tdelete this._in_progress[marker];\r\n\t\t\t\treturn this.callEvent(\"onAfterUpdate\", [sid, action, tid, btag]);\r\n\t\t}\r\n\r\n\t\tif (this._in_progress[marker] !== \"wait\") {\r\n\t\t\tif (correct) {\r\n\t\t\t\tthis.$scheduler.setUserData(sid, this.action_param, \"\");\r\n\t\t\t}\r\n\t\t\tdelete this._in_progress[marker];\r\n\t\t} else {\r\n\t\t\tdelete this._in_progress[marker];\r\n\t\t\tthis.setUpdated(tid, true, this.$scheduler.getUserData(sid, this.action_param));\r\n\t\t}\r\n\r\n\t\tthis.callEvent(\"onAfterUpdate\", [originalSid, action, tid, btag]);\r\n\t},\r\n\r\n\t_errorResponse: function (xml, id){\r\n\t\tif(this.$scheduler && this.$scheduler.callEvent){\r\n\t\t\tthis.$scheduler.callEvent(\"onSaveError\", [id, xml.xmlDoc]);\r\n\t\t}\r\n\t\treturn this.cleanUpdate(id);\r\n\t},\r\n\r\n\t_setDefaultTransactionMode: function () {\r\n\t\tif (this.serverProcessor) {\r\n\t\t\tthis.setTransactionMode(\"POST\", true);\r\n\t\t\tthis.serverProcessor += (this.serverProcessor.indexOf(\"?\") !== -1 ? \"&\" : \"?\") + \"editing=true\";\r\n\t\t\tthis._serverProcessor = this.serverProcessor;\r\n\t\t}\r\n\t},\r\n\t\r\n\t/**\r\n\t *\t@desc: response from server\r\n\t *\t@param: xml - XMLLoader object with response XML\r\n\t *\t@type: private\r\n\t */\r\n\tafterUpdate: function (that, xml, id) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\r\n\t\tif (xml.xmlDoc.status !== 200){\r\n\t\t\tthis._errorResponse(xml, id);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// try to use json first\r\n\t\tvar tag;\r\n\t\ttry {\r\n\t\t\ttag = JSON.parse(xml.xmlDoc.responseText);\r\n\t\t} catch (e) {\r\n\t\t\t// empty response also can be processed by json handler\r\n\t\t\tif (!xml.xmlDoc.responseText.length) {\r\n\t\t\t\ttag = {};\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (tag) {\r\n\t\t\tvar action = tag.action || this.getState(id) || \"updated\";\r\n\t\t\tvar sid = tag.sid || id[0];\r\n\t\t\tvar tid = tag.tid || id[0];\r\n\t\t\tthat.afterUpdateCallback(sid, tid, action, tag);\r\n\t\t\tthat.finalizeUpdate();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// xml response\r\n\t\tvar top = ajax.xmltop(\"data\", xml.xmlDoc); // fix incorrect content type in IE\r\n\t\tif (!top) {\r\n\t\t\treturn this._errorResponse(xml, id);\r\n\t\t}\r\n\t\tvar atag = ajax.xpath(\"//data/action\", top);\r\n\t\tif (!atag.length) {\r\n\t\t\treturn this._errorResponse(xml, id);\r\n\t\t}\r\n\r\n\t\tfor (var i = 0; i < atag.length; i++) {\r\n\t\t\tvar btag = atag[i];\r\n\t\t\tvar action = btag.getAttribute(\"type\");\r\n\t\t\tvar sid = btag.getAttribute(\"sid\");\r\n\t\t\tvar tid = btag.getAttribute(\"tid\");\r\n\r\n\t\t\tthat.afterUpdateCallback(sid, tid, action, btag);\r\n\t\t}\r\n\t\tthat.finalizeUpdate();\r\n\t},\r\n\tcleanUpdate: function (id) {\r\n\t\tif (id)\r\n\t\t\tfor (var i = 0; i < id.length; i++)\r\n\t\t\t\tdelete this._in_progress[id[i]];\r\n\t},\r\n\tfinalizeUpdate: function () {\r\n\t\tif (this._waitMode) this._waitMode--;\r\n\r\n\t\tthis.callEvent(\"onAfterUpdateFinish\", []);\r\n\t\tif (!this.updatedRows.length)\r\n\t\t\tthis.callEvent(\"onFullSync\", []);\r\n\t},\r\n\r\n\t/**\r\n\t *\t@desc: initializes data-processor\r\n\t *\t@param: scheduler - dhtmlxScheduler object to attach this data-processor to\r\n\t *\t@type: public\r\n\t */\r\n\tinit: function (scheduler) {\r\n\t\tif (this._initialized) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.$scheduler = scheduler;\r\n\t\tif (this.$scheduler._dp_init) {\r\n\t\t\tthis.$scheduler._dp_init(this);\r\n\t\t}\r\n\r\n\t\tthis._setDefaultTransactionMode();\r\n\r\n\t\tthis._methods=this._methods||[\"_set_event_text_style\",\"\",\"_dp_change_event_id\",\"_dp_hook_delete\"];\r\n\t\textendScheduler(this.$scheduler, this);\r\n\t\tvar dataProcessorEvents = new DataProcessorEvents(this.$scheduler, this);\r\n\t\tdataProcessorEvents.attach();\r\n\t\tthis.attachEvent(\"onDestroy\", function() {\r\n\t\t\tdelete this._getRowData;\r\n\r\n\t\t\tdelete this.$scheduler._dp;\r\n\t\t\tdelete this.$scheduler._dataprocessor;\r\n\t\t\tdelete this.$scheduler._set_event_text_style;\r\n\t\t\tdelete this.$scheduler._dp_change_event_id;\r\n\t\t\tdelete this.$scheduler._dp_hook_delete;\r\n\t\t\tdelete this.$scheduler;\r\n\t\t\tdataProcessorEvents.detach();\r\n\t\t});\r\n\t\tthis.$scheduler.callEvent(\"onDataProcessorReady\", [this]);\r\n\t\tthis._initialized = true;\r\n\r\n\t\tscheduler._dataprocessor=this;\r\n\t},\r\n\r\n\tsetOnAfterUpdate: function (ev) {\r\n\t\tthis.attachEvent(\"onAfterUpdate\", ev);\r\n\t},\r\n\tsetOnBeforeUpdateHandler: function (func) {\r\n\t\tthis.attachEvent(\"onBeforeDataSending\", func);\r\n\t},\r\n\r\n\t/* starts autoupdate mode\r\n\t\t@param interval time interval for sending update requests\r\n\t*/\r\n\tsetAutoUpdate: function (interval, user) {\r\n\t\tinterval = interval || 2000;\r\n\r\n\t\tthis._user = user || (new Date()).valueOf();\r\n\t\tthis._need_update = false;\r\n\t\t//this._loader = null;\r\n\t\tthis._update_busy = false;\r\n\r\n\t\tthis.attachEvent(\"onAfterUpdate\", function (sid, action, tid, xml_node) {\r\n\t\t\tthis.afterAutoUpdate(sid, action, tid, xml_node);\r\n\t\t});\r\n\t\tthis.attachEvent(\"onFullSync\", function () {\r\n\t\t\tthis.fullSync();\r\n\t\t});\r\n\r\n\t\tvar self = this;\r\n\t\tlet intervalId = global.setInterval(function () {\r\n\t\t\tself.loadUpdate();\r\n\t\t}, interval);\r\n\t\tthis.attachEvent(\"onDestroy\", function(){\r\n\t\t\tclearInterval(intervalId);\r\n\t\t});\r\n\t},\r\n\r\n\t/* process updating request answer\r\n\t\tif status == collision version is deprecated\r\n\t\tset flag for autoupdating immediately\r\n\t*/\r\n\tafterAutoUpdate: function (sid, action, tid, xml_node) {\r\n\t\tif (action == 'collision') {\r\n\t\t\tthis._need_update = true;\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t},\r\n\r\n\t/* callback function for onFillSync event\r\n\t\tcall update function if it's need\r\n\t*/\r\n\tfullSync: function () {\r\n\t\tif (this._need_update) {\r\n\t\t\tthis._need_update = false;\r\n\t\t\tthis.loadUpdate();\r\n\t\t}\r\n\t\treturn true;\r\n\t},\r\n\r\n\t/* sends query to the server and call callback function\r\n\t*/\r\n\tgetUpdates: function (url, callback) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tif (this._update_busy)\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t\tthis._update_busy = true;\r\n\r\n\t\tajax.get(url, callback);\r\n\t},\r\n\r\n\t/* returns xml node value\r\n\t\t@param node\r\n\t\t\txml node\r\n\t*/\r\n\t_getXmlNodeValue: function(node) {\r\n\t\tif (node.firstChild) {\r\n\t\t\treturn node.firstChild.nodeValue;\r\n\t\t}\r\n\t\treturn \"\";\r\n\t},\r\n\r\n\t/* loads updates and processes them\r\n\t*/\r\n\tloadUpdate: function () {\r\n\t\tvar self = this;\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tvar version = this.$scheduler.getUserData(0, \"version\");\r\n\t\tvar url = this.serverProcessor + ajax.urlSeparator(this.serverProcessor) + [\"dhx_user=\" + this._user, \"dhx_version=\" + version].join(\"&\");\r\n\t\turl = url.replace(\"editing=true&\", \"\");\r\n\t\tthis.getUpdates(url, function (xml) {\r\n\t\t\tvar vers = ajax.xpath(\"//userdata\", xml);\r\n\t\t\tself.$scheduler.setUserData(0, \"version\", self._getXmlNodeValue(vers[0]));\r\n\r\n\t\t\tvar updates = ajax.xpath(\"//update\", xml);\r\n\t\t\tif (updates.length) {\r\n\t\t\t\tself._silent_mode = true;\r\n\r\n\t\t\t\tfor (var i = 0; i < updates.length; i++) {\r\n\t\t\t\t\tvar status = updates[i].getAttribute(\"status\");\r\n\t\t\t\t\tvar id = updates[i].getAttribute(\"id\");\r\n\t\t\t\t\tvar parent = updates[i].getAttribute(\"parent\");\r\n\t\t\t\t\tswitch (status) {\r\n\t\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"insertCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"updated\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"updateCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"deleteCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tself._silent_mode = false;\r\n\t\t\t}\r\n\t\t\tself._update_busy = false;\r\n\t\t\tself = null;\r\n\t\t});\r\n\t},\r\n\r\n\tdestructor: function() {\r\n\t\tthis.callEvent(\"onDestroy\", []);\r\n\t\tthis.detachAllEvents();\r\n\r\n\t\tthis.updatedRows = [];\r\n\t\tthis._in_progress = {};\r\n\t\tthis._invalid = {};\r\n\t\tthis._headers = null;\r\n\t\tthis._payload = null;\r\n\t\tdelete this._initialized;\r\n\t},\r\n\r\n\turl: function(url) {\r\n\t\tthis.serverProcessor = this._serverProcessor = url;\r\n\t},\r\n\r\n\t_serializeAsJSON: function(data) {\r\n\t\tif (typeof data === \"string\") {\r\n\t\t\treturn data;\r\n\t\t}\r\n\r\n\t\tvar copy = this.$scheduler.utils.copy(data);\r\n\t\tif (this._tMode === \"REST-JSON\") {\r\n\t\t\tdelete copy.id;\r\n\t\t\tdelete copy[this.action_param];\r\n\t\t}\r\n\r\n\t\treturn JSON.stringify(copy);\r\n\t},\r\n\r\n\t// GET/POST/JSON modes of the dataProcessor didn't send the whole data items in 'delete' requests\r\n\t// clear extra info from the data in order not to change the request format\r\n\t_cleanupArgumentsBeforeSend: function(dataToSend) {\r\n\t\tvar processedData;\r\n\t\tif(dataToSend[this.action_param] === undefined){// hash of updated items, and not an individual item\r\n\t\t\tprocessedData = {};\r\n\t\t\tfor(var i in dataToSend) {\r\n\t\t\t\tprocessedData[i] = this._cleanupArgumentsBeforeSend(dataToSend[i]);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tprocessedData = this._cleanupItemBeforeSend(dataToSend);\r\n\t\t}\r\n\t\treturn processedData;\r\n\t},\r\n\t_cleanupItemBeforeSend: function(updatedItem) {\r\n\t\tvar output = null;\r\n\t\tif(updatedItem){\r\n\t\t\tif(updatedItem[this.action_param] === \"deleted\"){\r\n\t\t\t\toutput = {};\r\n\t\t\t\toutput.id = updatedItem.id;\r\n\t\t\t\toutput[this.action_param] = updatedItem[this.action_param];\r\n\t\t\t}else{\r\n\t\t\t\toutput = updatedItem;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn output;\r\n\t},\r\n\r\n\t_forEachUpdatedRow: function(code) {\r\n\t\tvar updatedRows = this.updatedRows.slice();\r\n\t\tfor (var i = 0; i < updatedRows.length; i++) {\r\n\t\t\tvar rowId = updatedRows[i];\r\n\t\t\tif (this.$scheduler.getUserData(rowId, this.action_param)) {\r\n\t\t\t\tcode.call(this, rowId);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t_prepareDataItem: function(item) {\r\n\t\tvar processedItem = {};\r\n\t\tvar scheduler = this.$scheduler;\r\n\t\tvar copy = scheduler.utils.copy(item);\r\n\t\tfor (var i in copy) {\r\n\t\t\tif (i.indexOf(\"_\") === 0) {\r\n\t\t\t\tcontinue;\r\n\t\t\t} else if (copy[i]) {\r\n\t\t\t\tif(copy[i].getUTCFullYear){\r\n\t\t\t\t\tprocessedItem[i] = scheduler._helpers.formatDate(copy[i]);\r\n\t\t\t\t} else if(typeof copy[i] == \"object\") {\r\n\t\t\t\t\tprocessedItem[i] = this._prepareDataItem(copy[i]);\r\n\t\t\t\t} else if(copy[i] === null) {\r\n\t\t\t\t\tprocessedItem[i] = \"\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprocessedItem[i] = copy[i];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tprocessedItem[this.action_param] = scheduler.getUserData(item.id, this.action_param);\r\n\t\treturn processedItem;\r\n\t},\r\n\t_getRowData: function(id) {\r\n\t\tvar dataItem = this.$scheduler.getEvent(id);\r\n\t\tif (!dataItem) {\r\n\t\t\tdataItem = { id: id };\r\n\t\t}\r\n\t\treturn this._prepareDataItem(dataItem);\r\n\t}\r\n};\r\n\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler.createDataProcessor = function(config) {\r\n\tvar router;\r\n\tvar tMode;\r\n\tif (config instanceof Function) {\r\n\t\trouter = config;\r\n\t} else if (config.hasOwnProperty(\"router\")) {\r\n\t\trouter = config.router;\r\n\t} else if(config.hasOwnProperty(\"event\")){\r\n\t\trouter = config;\r\n\t}\r\n\r\n\tif (router) {\r\n\t\ttMode = \"CUSTOM\";\r\n\t} else {\r\n\t\ttMode = config.mode || \"REST-JSON\";\r\n\t}\r\n\r\n\tvar dp = new DataProcessor(config.url);\r\n\tdp.init(scheduler);\r\n\tdp.setTransactionMode({\r\n\t\tmode: tMode,\r\n\t\trouter: router\r\n\t}, config.batchUpdate); // FIXME: config.batchUpdate where it is explained?\r\n\treturn dp;\r\n};\r\n\r\nscheduler.DataProcessor = DataProcessor;\r\n\r\n}\r\n\r\n//var dataProcessor = global.dataProcessor = DataProcessor; // for old","import utils from \"./utils/utils\";\r\nimport domHelpers from \"./utils/dom_helpers\";\r\n\r\n\r\nexport default function(scheduler) {\r\n\r\n\tvar boxAttribute = \"data-dhxbox\";\r\n\r\n\tvar _dhx_msg_cfg = null;\r\n\r\n\tfunction callback(config, result) {\r\n\t\tvar usercall = config.callback;\r\n\t\tmodalBox.hide(config.box);\r\n\r\n\t\t_dhx_msg_cfg = config.box = null;\r\n\tif (usercall)\r\n\t\t\tusercall(result);\r\n\t}\r\n\r\n\tfunction modal_key(event) {\r\n\t\tif (_dhx_msg_cfg) {\r\n\r\n\t\t\tvar code = event.which || event.keyCode;\r\n\t\t\tvar preventDefault = false;\r\n\r\n\t\t\tif (messageBox.keyboard) {\r\n\t\t\t\tif (code == 13 || code == 32) {\r\n\t\t\t\t\t// default behavior is to confirm/submit popup on space/enter\r\n\t\t\t\t\t// if browser focus is set on button element - do button click instead of default behavior\r\n\t\t\t\t\tvar target = event.target || event.srcElement;\r\n\t\t\t\t\tif (domHelpers.getClassName(target).indexOf(\"scheduler_popup_button\") > -1 && target.click) {\r\n\t\t\t\t\t\ttarget.click();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcallback(_dhx_msg_cfg, true);\r\n\t\t\t\t\t\tpreventDefault = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (code == 27) {\r\n\t\t\t\t\tcallback(_dhx_msg_cfg, false);\r\n\t\t\t\t\tpreventDefault = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (preventDefault) {\r\n\t\t\t\tif (event.preventDefault){\r\n\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t}\r\n\t\t\t\treturn !(event.cancelBubble = true);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler.event(document, \"keydown\", modal_key, true);\r\n\r\n\tfunction modality(mode) {\r\n\t\tif (!modality.cover) {\r\n\t\t\tmodality.cover = document.createElement(\"div\");\r\n\t\t\t//necessary for IE only\r\n\t\t\tscheduler.event(modality.cover, \"keydown\", modal_key);\r\n\t\t\tmodality.cover.className = \"dhx_modal_cover\";\r\n\t\t\tdocument.body.appendChild(modality.cover);\r\n\t\t}\r\n\r\n\t\tmodality.cover.style.display = mode ? \"inline-block\" : \"none\";\r\n\t}\r\n\r\n\tfunction button(text, classValue, result) {\r\n\t\tvar buttonAriaAttrs = scheduler._waiAria.messageButtonAttrString(text);\r\n\t\tvar name = (classValue || \"\").toLowerCase().replace(/ /g, \"_\");\r\n\t\tvar buttonCss = `scheduler_${name}_button dhtmlx_${name}_button`; \r\n\t\treturn `
${text}
`;\r\n\t}\r\n\r\n\tfunction info(text) {\r\n\t\tif (!messageBox.area) {\r\n\t\t\tmessageBox.area = document.createElement(\"div\");\r\n\t\t\tmessageBox.area.className = \"scheduler_message_area dhtmlx_message_area\";\r\n\t\t\tmessageBox.area.style[messageBox.position] = \"5px\";\r\n\t\t\tdocument.body.appendChild(messageBox.area);\r\n\t\t}\r\n\r\n\t\tmessageBox.hide(text.id);\r\n\t\tvar message = document.createElement(\"div\");\r\n\t\tmessage.innerHTML = \"
\" + text.text + \"
\";\r\n\t\tmessage.className = \"scheduler-info dhtmlx-info scheduler-\" + text.type + \" dhtmlx-\" + text.type;\r\n\t\tscheduler.event(message, \"click\",function () {\r\n\t\t\tmessageBox.hide(text.id);\r\n\t\t\ttext = null;\r\n\t\t});\r\n\r\n\t\tscheduler._waiAria.messageInfoAttr(message);\r\n\r\n\t\tif (messageBox.position == \"bottom\" && messageBox.area.firstChild)\r\n\t\t\tmessageBox.area.insertBefore(message, messageBox.area.firstChild);\r\n\t\telse\r\n\t\t\tmessageBox.area.appendChild(message);\r\n\r\n\t\tif (text.expire > 0)\r\n\t\t\tmessageBox.timers[text.id] = window.setTimeout(function () {\r\n\t\t\t\t// GS-1213: We need that when Scheduler is destroyed\r\n\t\t\t\tif (messageBox) messageBox.hide(text.id);\r\n\t\t\t}, text.expire);\r\n\r\n\t\tmessageBox.pull[text.id] = message;\r\n\t\tmessage = null;\r\n\r\n\t\treturn text.id;\r\n\t}\r\n\r\n\tfunction getFirstDefined() {\r\n\t\tvar values = [].slice.apply(arguments, [0]);\r\n\r\n\t\tfor (var i = 0; i < values.length; i++) {\r\n\t\t\tif (values[i]) {\r\n\t\t\t\treturn values[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tfunction _boxStructure(config, ok, cancel) {\r\n\t\tvar box = document.createElement(\"div\");\r\n\r\n\t\tvar contentId = utils.uid();\r\n\t\tscheduler._waiAria.messageModalAttr(box, contentId);\r\n\r\n\r\n\t\tbox.className = \" scheduler_modal_box dhtmlx_modal_box scheduler-\" + config.type + \" dhtmlx-\" + config.type;\r\n\t\tbox.setAttribute(boxAttribute, 1);\r\n\r\n\t\tvar inner = '';\r\n\r\n\t\tif (config.width)\r\n\t\t\tbox.style.width = config.width;\r\n\t\tif (config.height)\r\n\t\t\tbox.style.height = config.height;\r\n\t\tif (config.title)\r\n\t\t\tinner += '
' + config.title + '
';\r\n\t\tinner += '
' + (config.content ? '' : config.text) + '
';\r\n\t\tif (ok)\r\n\t\t\tinner += button(getFirstDefined(config.ok, scheduler.locale.labels.message_ok, \"OK\"), \"ok\", true);\r\n\t\tif (cancel)\r\n\t\t\tinner += button(getFirstDefined(config.cancel, scheduler.locale.labels.message_cancel, \"Cancel\"), \"cancel\", false);\r\n\r\n\t\tif (config.buttons) {\r\n\t\t\tfor (var i = 0; i < config.buttons.length; i++) {\r\n\t\t\t\tvar btn = config.buttons[i];\r\n\t\t\t\tif (typeof btn == \"object\") {\r\n\t\t\t\t\t// Support { label:\"Save\", css:\"main_button\", value:\"save\" }\r\n\t\t\t\t\tvar label = btn.label;\r\n\t\t\t\t\tvar css = btn.css || (\"scheduler_\" + btn.label.toLowerCase() + \"_button dhtmlx_\" + btn.label.toLowerCase() + \"_button\");\r\n\t\t\t\t\tvar value = btn.value || i;\r\n\t\t\t\t\tinner += button(label, css, value);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tinner += button(btn, btn, i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tinner += '
';\r\n\t\tbox.innerHTML = inner;\r\n\r\n\t\tif (config.content) {\r\n\t\t\tvar node = config.content;\r\n\t\t\tif (typeof node == \"string\")\r\n\t\t\t\tnode = document.getElementById(node);\r\n\t\t\tif (node.style.display == 'none')\r\n\t\t\t\tnode.style.display = \"\";\r\n\t\t\tbox.childNodes[config.title ? 1 : 0].appendChild(node);\r\n\t\t}\r\n\r\n\t\tscheduler.event(box, \"click\", function (event) {\r\n\t\t\tvar source = event.target || event.srcElement;\r\n\t\t\tif (!source.className) source = source.parentNode;\r\n\t\t\tif (domHelpers.closest(source, \".scheduler_popup_button\")) {\r\n\t\t\t\tvar result = source.getAttribute(\"data-result\");\r\n\t\t\t\tresult = (result == \"true\") || (result == \"false\" ? false : result);\r\n\t\t\t\tcallback(config, result);\r\n\t\t\t}\r\n\t\t});\r\n\t\tconfig.box = box;\r\n\t\tif (ok || cancel)\r\n\t\t\t_dhx_msg_cfg = config;\r\n\r\n\t\treturn box;\r\n\t}\r\n\r\n\tfunction _createBox(config, ok, cancel) {\r\n\t\tvar box = config.tagName ? config : _boxStructure(config, ok, cancel);\r\n\r\n\t\tif (!config.hidden)\r\n\t\t\tmodality(true);\r\n\t\tdocument.body.appendChild(box);\r\n\t\tvar x = Math.abs(Math.floor(((window.innerWidth || document.documentElement.offsetWidth) - box.offsetWidth) / 2));\r\n\t\tvar y = Math.abs(Math.floor(((window.innerHeight || document.documentElement.offsetHeight) - box.offsetHeight) / 2));\r\n\t\tif (config.position == \"top\")\r\n\t\t\tbox.style.top = \"-3px\";\r\n\t\telse\r\n\t\t\tbox.style.top = y + 'px';\r\n\t\tbox.style.left = x + 'px';\r\n\t\t//necessary for IE only\r\n\t\tscheduler.event(box, \"keydown\", modal_key);\r\n\r\n\t\tmodalBox.focus(box);\r\n\r\n\t\tif (config.hidden)\r\n\t\t\tmodalBox.hide(box);\r\n\r\n\t\tscheduler.callEvent(\"onMessagePopup\", [box]);\r\n\t\treturn box;\r\n\t}\r\n\r\n\tfunction alertPopup(config) {\r\n\t\treturn _createBox(config, true, false);\r\n\t}\r\n\r\n\tfunction confirmPopup(config) {\r\n\t\treturn _createBox(config, true, true);\r\n\t}\r\n\r\n\tfunction boxPopup(config) {\r\n\t\treturn _createBox(config);\r\n\t}\r\n\r\n\tfunction box_params(text, type, callback) {\r\n\t\tif (typeof text != \"object\") {\r\n\t\t\tif (typeof type == \"function\") {\r\n\t\t\t\tcallback = type;\r\n\t\t\t\ttype = \"\";\r\n\t\t\t}\r\n\t\t\ttext = {text: text, type: type, callback: callback};\r\n\t\t}\r\n\t\treturn text;\r\n\t}\r\n\r\n\tfunction params(text, type, expire, id) {\r\n\t\tif (typeof text != \"object\")\r\n\t\t\ttext = {text: text, type: type, expire: expire, id: id};\r\n\t\ttext.id = text.id || utils.uid();\r\n\t\ttext.expire = text.expire || messageBox.expire;\r\n\t\treturn text;\r\n\t}\r\n\r\n\tvar alertBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"confirm\";\r\n\t\treturn alertPopup(text);\r\n\t};\r\n\tvar confirmBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"alert\";\r\n\t\treturn confirmPopup(text);\r\n\t};\r\n\tvar modalBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"alert\";\r\n\t\treturn boxPopup(text);\r\n\t};\r\n\tmodalBox.hide = function (node) {\r\n\t\twhile (node && node.getAttribute && !node.getAttribute(boxAttribute))\r\n\t\t\tnode = node.parentNode;\r\n\t\tif (node) {\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t\tmodality(false);\r\n\r\n\t\t\tscheduler.callEvent(\"onAfterMessagePopup\", [node]);\r\n\t\t}\r\n\t};\r\n\r\n\tmodalBox.focus = function (node) {\r\n\t\tsetTimeout(function () {\r\n\t\t\tvar focusable = domHelpers.getFocusableNodes(node);\r\n\t\t\tif (focusable.length) {\r\n\t\t\t\tif (focusable[0].focus) focusable[0].focus();\r\n\t\t\t}\r\n\t\t}, 1);\r\n\t};\r\n\r\n\tvar messageBox = function (text, type, expire, id) {\r\n\t\ttext = params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"info\";\r\n\r\n\t\tvar subtype = text.type.split(\"-\")[0];\r\n\t\tswitch (subtype) {\r\n\t\t\tcase \"alert\":\r\n\t\t\t\treturn alertPopup(text);\r\n\t\t\tcase \"confirm\":\r\n\t\t\t\treturn confirmPopup(text);\r\n\t\t\tcase \"modalbox\":\r\n\t\t\t\treturn boxPopup(text);\r\n\t\t\tdefault:\r\n\t\t\t\treturn info(text);\r\n\t\t}\r\n\t};\r\n\r\n\tmessageBox.seed = (new Date()).valueOf();\r\n\tmessageBox.uid = utils.uid;\r\n\tmessageBox.expire = 4000;\r\n\tmessageBox.keyboard = true;\r\n\tmessageBox.position = \"top\";\r\n\tmessageBox.pull = {};\r\n\tmessageBox.timers = {};\r\n\r\n\tmessageBox.hideAll = function () {\r\n\t\tfor (var key in messageBox.pull)\r\n\t\t\tmessageBox.hide(key);\r\n\t};\r\n\tmessageBox.hide = function (id) {\r\n\t\tvar obj = messageBox.pull[id];\r\n\t\tif (obj && obj.parentNode) {\r\n\t\t\twindow.setTimeout(function () {\r\n\t\t\t\tobj.parentNode.removeChild(obj);\r\n\t\t\t\tobj = null;\r\n\t\t\t}, 2000);\r\n\t\t\tobj.className += \" hidden\";\r\n\r\n\t\t\tif (messageBox.timers[id])\r\n\t\t\t\twindow.clearTimeout(messageBox.timers[id]);\r\n\t\t\tdelete messageBox.pull[id];\r\n\t\t}\r\n\t};\r\n\r\n\tvar popups = [];\r\n\tscheduler.attachEvent(\"onMessagePopup\", function(box){\r\n\t\tpopups.push(box);\r\n\t});\r\n\tscheduler.attachEvent(\"onAfterMessagePopup\", function(box){\r\n\t\tfor(var i = 0; i < popups.length; i++){\r\n\t\t\tif(popups[i] === box){\r\n\t\t\t\tpopups.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tif(modality.cover && modality.cover.parentNode){\r\n\t\t\tmodality.cover.parentNode.removeChild(modality.cover);\r\n\t\t}\r\n\r\n\t\tfor(var i = 0; i < popups.length; i++){\r\n\t\t\tif(popups[i].parentNode){\r\n\t\t\t\tpopups[i].parentNode.removeChild(popups[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\tpopups = null;\r\n\r\n\t\tif(messageBox.area && messageBox.area.parentNode){\r\n\t\t\tmessageBox.area.parentNode.removeChild(messageBox.area);\r\n\t\t}\r\n\t\tmessageBox = null;\r\n\t});\r\n\r\n\treturn {\r\n\t\talert: alertBox,\r\n\t\tconfirm: confirmBox,\r\n\t\tmessage: messageBox,\r\n\t\tmodalbox: modalBox\r\n\t};\r\n}","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"كانون الثاني\", \"شباط\", \"آذار\", \"نيسان\", \"أيار\", \"حزيران\", \"تموز\", \"آب\", \"أيلول\", \"تشرين الأول\", \"تشرين الثاني\", \"كانون الأول\"],\r\n\t\tmonth_short: [\"يناير\", \"فبراير\", \"مارس\", \"أبريل\", \"مايو\", \"يونيو\", \"يوليو\", \"أغسطس\", \"سبتمبر\", \"أكتوبر\", \"نوفمبر\", \"ديسمبر\"],\r\n\t\tday_full: [\"الأحد\", \"الأثنين\", \"ألثلاثاء\", \"الأربعاء\", \"ألحميس\", \"ألجمعة\", \"السبت\"],\r\n\t\tday_short: [\"احد\", \"اثنين\", \"ثلاثاء\", \"اربعاء\", \"خميس\", \"جمعة\", \"سبت\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"اليوم\",\r\n\t\tday_tab: \"يوم\",\r\n\t\tweek_tab: \"أسبوع\",\r\n\t\tmonth_tab: \"شهر\",\r\n\t\tnew_event: \"حدث جديد\",\r\n\t\ticon_save: \"اخزن\",\r\n\t\ticon_cancel: \"الغاء\",\r\n\t\ticon_details: \"تفاصيل\",\r\n\t\ticon_edit: \"تحرير\",\r\n\t\ticon_delete: \"حذف\",\r\n\t\tconfirm_closing: \"التغييرات سوف تضيع, هل انت متأكد؟\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"الحدث سيتم حذفها نهائيا ، هل أنت متأكد؟\",\r\n\t\tsection_description: \"الوصف\",\r\n\t\tsection_time: \"الفترة الزمنية\",\r\n\t\tfull_day: \"طوال اليوم\",\r\n\r\n\t\tconfirm_recurring: \"هل تريد تحرير مجموعة كاملة من الأحداث المتكررة؟\",\r\n\t\tsection_recurring: \"تكرار الحدث\",\r\n\t\tbutton_recurring: \"تعطيل\",\r\n\t\tbutton_recurring_open: \"تمكين\",\r\n\t\tbutton_edit_series: \"تحرير سلسلة\",\r\n\t\tbutton_edit_occurrence: \"تعديل نسخة\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"جدول\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};\r\n\r\n\r\n","/*\r\n Translation by Sofya Morozova\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Студзень\", \"Люты\", \"Сакавік\", \"Красавік\", \"Maй\", \"Чэрвень\", \"Ліпень\", \"Жнівень\", \"Верасень\", \"Кастрычнік\", \"Лістапад\", \"Снежань\"],\r\n\t\tmonth_short: [\"Студз\", \"Лют\", \"Сак\", \"Крас\", \"Maй\", \"Чэр\", \"Ліп\", \"Жнів\", \"Вер\", \"Каст\", \"Ліст\", \"Снеж\"],\r\n\t\tday_full: [ \"Нядзеля\", \"Панядзелак\", \"Аўторак\", \"Серада\", \"Чацвер\", \"Пятніца\", \"Субота\"],\r\n\t\tday_short: [\"Нд\", \"Пн\", \"Аўт\", \"Ср\", \"Чцв\", \"Пт\", \"Сб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сёння\",\r\n\t\tday_tab: \"Дзень\",\r\n\t\tweek_tab: \"Тыдзень\",\r\n\t\tmonth_tab: \"Месяц\",\r\n\t\tnew_event: \"Новая падзея\",\r\n\t\ticon_save: \"Захаваць\",\r\n\t\ticon_cancel: \"Адмяніць\",\r\n\t\ticon_details: \"Дэталі\",\r\n\t\ticon_edit: \"Змяніць\",\r\n\t\ticon_delete: \"Выдаліць\",\r\n\t\tconfirm_closing: \"\", //Унесеныя змены будуць страчаны, працягнуць?\r\n\t\tconfirm_deleting: \"Падзея будзе выдалена незваротна, працягнуць?\",\r\n\t\tsection_description: \"Апісанне\",\r\n\t\tsection_time: \"Перыяд часу\",\r\n\t\tfull_day: \"Увесь дзень\",\r\n\r\n\t\tconfirm_recurring: \"Вы хочаце змяніць усю серыю паўтаральных падзей?\",\r\n\t\tsection_recurring: \"Паўтарэнне\",\r\n\t\tbutton_recurring: \"Адключана\",\r\n\t\tbutton_recurring_open: \"Уключана\",\r\n\t\tbutton_edit_series: \"Рэдагаваць серыю\",\r\n\t\tbutton_edit_occurrence: \"Рэдагаваць асобнік\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Спіс\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Апісанне\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Год\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Спіс\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Спic\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Дзень\",\r\n\t\trepeat_radio_week: \"Тыдзень\",\r\n\t\trepeat_radio_month: \"Месяц\",\r\n\t\trepeat_radio_year: \"Год\",\r\n\t\trepeat_radio_day_type: \"Кожны\",\r\n\t\trepeat_text_day_count: \"дзень\",\r\n\t\trepeat_radio_day_type2: \"Кожны працоўны дзень\",\r\n\t\trepeat_week: \" Паўтараць кожны\",\r\n\t\trepeat_text_week_count: \"тыдзень\",\r\n\t\trepeat_radio_month_type: \"Паўтараць\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" чысла кожнага\",\r\n\t\trepeat_text_month_count: \"месяцу\",\r\n\t\trepeat_text_month_count2_before: \"кожны \",\r\n\t\trepeat_text_month_count2_after: \"месяц\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"дзень\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без даты заканчэння\",\r\n\t\trepeat_text_occurences_count: \"паўтораў\",\r\n\t\trepeat_radio_end2: \"\",\r\n\t\trepeat_radio_end3: \"Да \",\r\n\t\tmonth_for_recurring: [\"Студзеня\", \"Лютага\", \"Сакавіка\", \"Красавіка\", \"Мая\", \"Чэрвеня\", \"Ліпeня\", \"Жніўня\", \"Верасня\", \"Кастрычніка\", \"Лістапада\", \"Снежня\"],\r\n\t\tday_for_recurring: [\"Нядзелю\", \"Панядзелак\", \"Аўторак\", \"Сераду\", \"Чацвер\", \"Пятніцу\", \"Суботу\"]\r\n\t}\r\n};\r\n","/*\r\n @Traducido por Vicente Adria Bohigues - vicenteadria@hotmail.com\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Gener\", \"Febrer\", \"Març\", \"Abril\", \"Maig\", \"Juny\", \"Juliol\", \"Agost\", \"Setembre\", \"Octubre\", \"Novembre\", \"Desembre\"],\r\n\t\tmonth_short: [\"Gen\", \"Feb\", \"Mar\", \"Abr\", \"Mai\", \"Jun\", \"Jul\", \"Ago\", \"Set\", \"Oct\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Diumenge\", \"Dilluns\", \"Dimarts\", \"Dimecres\", \"Dijous\", \"Divendres\", \"Dissabte\"],\r\n\t\tday_short: [\"Dg\", \"Dl\", \"Dm\", \"Dc\", \"Dj\", \"Dv\", \"Ds\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hui\",\r\n\t\tday_tab: \"Dia\",\r\n\t\tweek_tab: \"Setmana\",\r\n\t\tmonth_tab: \"Mes\",\r\n\t\tnew_event: \"Nou esdeveniment\",\r\n\t\ticon_save: \"Guardar\",\r\n\t\ticon_cancel: \"Cancel·lar\",\r\n\t\ticon_details: \"Detalls\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Esborrar\",\r\n\t\tconfirm_closing: \"\", //\"Els seus canvis es perdràn, continuar ?\"\r\n\t\tconfirm_deleting: \"L'esdeveniment s'esborrarà definitivament, continuar ?\",\r\n\t\tsection_description: \"Descripció\",\r\n\t\tsection_time: \"Periode de temps\",\r\n\t\tfull_day: \"Tot el dia\",\r\n\r\n\t\tconfirm_recurring: \"¿Desitja modificar el conjunt d'esdeveniments repetits?\",\r\n\t\tsection_recurring: \"Repeteixca l'esdeveniment\",\r\n\t\tbutton_recurring: \"Impedit\",\r\n\t\tbutton_recurring_open: \"Permés\",\r\n\t\tbutton_edit_series: \"Edit sèrie\",\r\n\t\tbutton_edit_occurrence: \"Edita Instància\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descripció\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Any\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Taula\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};","/*\r\nTranslation by FreezeSoul\r\n*/\r\n//scheduler.config.day_date=\"%M %d日 %D\";\r\n//scheduler.config.default_date=\"%Y年 %M %d日\";\r\n//scheduler.config.month_date=\"%Y年 %M\";\r\n\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"一月\", \"二月\", \"三月\", \"四月\", \"五月\", \"六月\", \"七月\", \"八月\", \"九月\", \"十月\", \"十一月\", \"十二月\"],\r\n\t\tmonth_short: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tday_full: [\"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\"],\r\n\t\tday_short: [\"日\", \"一\", \"二\", \"三\", \"四\", \"五\", \"六\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"今天\",\r\n\t\tday_tab: \"日\",\r\n\t\tweek_tab: \"周\",\r\n\t\tmonth_tab: \"月\",\r\n\t\tnew_event: \"新建日程\",\r\n\t\ticon_save: \"保存\",\r\n\t\ticon_cancel: \"关闭\",\r\n\t\ticon_details: \"详细\",\r\n\t\ticon_edit: \"编辑\",\r\n\t\ticon_delete: \"删除\",\r\n\t\tconfirm_closing: \"请确认是否撤销修改!\", //Your changes will be lost, are your sure?\r\n\t\tconfirm_deleting: \"是否删除日程?\",\r\n\t\tsection_description: \"描述\",\r\n\t\tsection_time: \"时间范围\",\r\n\t\tfull_day: \"整天\",\r\n\r\n\t\tconfirm_recurring:\"请确认是否将日程设为重复模式?\",\r\n\t\tsection_recurring:\"重复周期\",\r\n\t\tbutton_recurring:\"禁用\",\r\n\t\tbutton_recurring_open:\"启用\",\r\n\t\tbutton_edit_series: \"编辑系列\",\r\n\t\tbutton_edit_occurrence: \"编辑实例\",\r\n\t\t\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"议程\",\r\n\t\tdate:\"日期\",\r\n\t\tdescription:\"说明\",\r\n\t\t\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"今年\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"议程\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab:\"电网\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"按天\",\r\n\t\trepeat_radio_week: \"按周\",\r\n\t\trepeat_radio_month: \"按月\",\r\n\t\trepeat_radio_year: \"按年\",\r\n\t\trepeat_radio_day_type: \"每\",\r\n\t\trepeat_text_day_count: \"天\",\r\n\t\trepeat_radio_day_type2: \"每个工作日\",\r\n\t\trepeat_week: \" 重复 每\",\r\n\t\trepeat_text_week_count: \"星期的:\",\r\n\t\trepeat_radio_month_type: \"重复\",\r\n\t\trepeat_radio_month_start: \"在\",\r\n\t\trepeat_text_month_day: \"日 每\",\r\n\t\trepeat_text_month_count: \"月\",\r\n\t\trepeat_text_month_count2_before: \"每\",\r\n\t\trepeat_text_month_count2_after: \"月\",\r\n\t\trepeat_year_label: \"在\",\r\n\t\tselect_year_day2: \"的\",\r\n\t\trepeat_text_year_day: \"日\",\r\n\t\tselect_year_month: \"月\",\r\n\t\trepeat_radio_end: \"无结束日期\",\r\n\t\trepeat_text_occurences_count: \"次结束\",\r\n\t\trepeat_radio_end2: \"重复\",\r\n\t\trepeat_radio_end3: \"结束于\",\r\n\t\tmonth_for_recurring: [\"一月\", \"二月\", \"三月\", \"四月\", \"五月\", \"六月\", \"七月\", \"八月\", \"九月\", \"十月\", \"十一月\", \"十二月\"],\r\n\t\tday_for_recurring: [\"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Leden\", \"Únor\", \"Březen\", \"Duben\", \"Květen\", \"Červen\", \"Červenec\", \"Srpen\", \"Září\", \"Říjen\", \"Listopad\", \"Prosinec\"],\r\n\t\tmonth_short: [\"Led\", \"Ún\", \"Bře\", \"Dub\", \"Kvě\", \"Čer\", \"Čec\", \"Srp\", \"Září\", \"Říj\", \"List\", \"Pro\"],\r\n\t\tday_full: [\"Neděle\", \"Pondělí\", \"Úterý\", \"Středa\", \"Čtvrtek\", \"Pátek\", \"Sobota\"],\r\n\t\tday_short: [\"Ne\", \"Po\", \"Út\", \"St\", \"Čt\", \"Pá\", \"So\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dnes\",\r\n\t\tday_tab: \"Den\",\r\n\t\tweek_tab: \"Týden\",\r\n\t\tmonth_tab: \"Měsíc\",\r\n\t\tnew_event: \"Nová událost\",\r\n\t\ticon_save: \"Uložit\",\r\n\t\ticon_cancel: \"Zpět\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edituj\",\r\n\t\ticon_delete: \"Smazat\",\r\n\t\tconfirm_closing: \"\", //Vaše změny budou ztraceny, opravdu ?\r\n\t\tconfirm_deleting: \"Událost bude trvale smazána, opravdu?\",\r\n\t\tsection_description: \"Poznámky\",\r\n\t\tsection_time: \"Doba platnosti\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Přejete si upravit celou řadu opakovaných událostí?\",\r\n\t\tsection_recurring: \"Opakování události\",\r\n\t\tbutton_recurring: \"Vypnuto\",\r\n\t\tbutton_recurring_open: \"Zapnuto\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Upravit instance\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Program\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Poznámka\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\t\tfull_day: \"Full day\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Program\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Mřížka\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Denně\",\r\n\t\trepeat_radio_week: \"Týdně\",\r\n\t\trepeat_radio_month: \"Měsíčně\",\r\n\t\trepeat_radio_year: \"Ročně\",\r\n\t\trepeat_radio_day_type: \"každý\",\r\n\t\trepeat_text_day_count: \"Den\",\r\n\t\trepeat_radio_day_type2: \"pracovní dny\",\r\n\t\trepeat_week: \"Opakuje každých\",\r\n\t\trepeat_text_week_count: \"Týdnů na:\",\r\n\t\trepeat_radio_month_type: \"u každého\",\r\n\t\trepeat_radio_month_start: \"na\",\r\n\t\trepeat_text_month_day: \"Den každého\",\r\n\t\trepeat_text_month_count: \"Měsíc\",\r\n\t\trepeat_text_month_count2_before: \"každý\",\r\n\t\trepeat_text_month_count2_after: \"Měsíc\",\r\n\t\trepeat_year_label: \"na\",\r\n\t\tselect_year_day2: \"v\",\r\n\t\trepeat_text_year_day: \"Den v\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"bez data ukončení\",\r\n\t\trepeat_text_occurences_count: \"Události\",\r\n\t\trepeat_radio_end2: \"po\",\r\n\t\trepeat_radio_end3: \"Konec\",\r\n\t\tmonth_for_recurring: [\"Leden\", \"Únor\", \"Březen\", \"Duben\", \"Květen\", \"Červen\", \"Červenec\", \"Srpen\", \"Září\", \"Říjen\", \"Listopad\", \"Prosinec\"],\r\n\t\tday_for_recurring: [\"Neděle \", \"Pondělí\", \"Úterý\", \"Středa\", \"Čtvrtek\", \"Pátek\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Marts\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Man\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uge\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny begivenhed\",\r\n\t\ticon_save: \"Gem\",\r\n\t\ticon_cancel: \"Fortryd\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Tilret\",\r\n\t\ticon_delete: \"Slet\",\r\n\t\tconfirm_closing: \"Dine rettelser vil gå tabt.. Er dy sikker?\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Bigivenheden vil blive slettet permanent. Er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du tilrette hele serien af gentagne begivenheder?\",\r\n\t\tsection_recurring: \"Gentag begivenhed\",\r\n\t\tbutton_recurring: \"Frakoblet\",\r\n\t\tbutton_recurring_open: \"Tilkoblet\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Rediger en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dagsorden\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dagsorden\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daglig\",\r\n\t\trepeat_radio_week: \"Ugenlig\",\r\n\t\trepeat_radio_month: \"Månedlig\",\r\n\t\trepeat_radio_year: \"Årlig\",\r\n\t\trepeat_radio_day_type: \"Hver\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"På hver arbejdsdag\",\r\n\t\trepeat_week: \" Gentager sig hver\",\r\n\t\trepeat_text_week_count: \"uge på følgende dage:\",\r\n\t\trepeat_radio_month_type: \"Hver den\",\r\n\t\trepeat_radio_month_start: \"Den\",\r\n\t\trepeat_text_month_day: \" i hver\",\r\n\t\trepeat_text_month_count: \"måned\",\r\n\t\trepeat_text_month_count2_before: \"hver\",\r\n\t\trepeat_text_month_count2_after: \"måned\",\r\n\t\trepeat_year_label: \"Den\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Ingen slutdato\",\r\n\t\trepeat_text_occurences_count: \"gentagelse\",\r\n\t\trepeat_radio_end2: \"Efter\",\r\n\t\trepeat_radio_end3: \"Slut\",\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"März\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Dezember\"],\r\n\t\tday_for_recurring: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\" Januar\", \" Februar\", \" März \", \" April\", \" Mai\", \" Juni\", \" Juli\", \" August\", \" September \", \" Oktober\", \" November \", \" Dezember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mär\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dez\"],\r\n\t\tday_full: [ \"Sonntag\", \"Montag\", \"Dienstag\", \" Mittwoch\", \" Donnerstag\", \"Freitag\", \"Samstag\"],\r\n\t\tday_short: [\"So\", \"Mo\", \"Di\", \"Mi\", \"Do\", \"Fr\", \"Sa\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Heute\",\r\n\t\tday_tab: \"Tag\",\r\n\t\tweek_tab: \"Woche\",\r\n\t\tmonth_tab: \"Monat\",\r\n\t\tnew_event: \"neuer Eintrag\",\r\n\t\ticon_save: \"Speichern\",\r\n\t\ticon_cancel: \"Abbrechen\",\r\n\t\ticon_details: \"Details\",\r\n\t\ticon_edit: \"Ändern\",\r\n\t\ticon_delete: \"Löschen\",\r\n\t\tconfirm_closing: \"\", //\"Ihre Veränderungen werden verloren sein, wollen Sie ergänzen? \"\r\n\t\tconfirm_deleting: \"Der Eintrag wird gelöscht\",\r\n\t\tsection_description: \"Beschreibung\",\r\n\t\tsection_time: \"Zeitspanne\",\r\n\t\tfull_day: \"Ganzer Tag\",\r\n\r\n\t\tconfirm_recurring: \"Wollen Sie alle Einträge bearbeiten oder nur diesen einzelnen Eintrag?\",\r\n\t\tsection_recurring: \"Wiederholung\",\r\n\t\tbutton_recurring: \"Aus\",\r\n\t\tbutton_recurring_open: \"An\",\r\n\t\tbutton_edit_series: \"Bearbeiten Sie die Serie\",\r\n\t\tbutton_edit_occurrence: \"Bearbeiten Sie eine Kopie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Beschreibung\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Jahre\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Täglich\",\r\n\t\trepeat_radio_week: \"Wöchentlich\",\r\n\t\trepeat_radio_month: \"Monatlich\",\r\n\t\trepeat_radio_year: \"Jährlich\",\r\n\t\trepeat_radio_day_type: \"jeden\",\r\n\t\trepeat_text_day_count: \"Tag\",\r\n\t\trepeat_radio_day_type2: \"an jedem Arbeitstag\",\r\n\t\trepeat_week: \" Wiederholt sich jede\",\r\n\t\trepeat_text_week_count: \"Woche am:\",\r\n\t\trepeat_radio_month_type: \"an jedem\",\r\n\t\trepeat_radio_month_start: \"am\",\r\n\t\trepeat_text_month_day: \"Tag eines jeden\",\r\n\t\trepeat_text_month_count: \"Monats\",\r\n\t\trepeat_text_month_count2_before: \"jeden\",\r\n\t\trepeat_text_month_count2_after: \"Monats\",\r\n\t\trepeat_year_label: \"am\",\r\n\t\tselect_year_day2: \"im\",\r\n\t\trepeat_text_year_day: \"Tag im\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"kein Enddatum\",\r\n\t\trepeat_text_occurences_count: \"Ereignissen\",\r\n\t\trepeat_radio_end3: \"Schluß\",\r\n\t\trepeat_radio_end2: \"nach\",\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"März\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Dezember\"],\r\n\t\tday_for_recurring: [\"Sonntag\", \"Montag\", \"Dienstag\", \"Mittwoch\", \"Donnerstag\", \"Freitag\", \"Samstag\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Ιανουάριος\", \"Φεβρουάριος\", \"Μάρτιος\", \"Απρίλιος\", \"Μάϊος\", \"Ιούνιος\", \"Ιούλιος\", \"Αύγουστος\", \"Σεπτέμβριος\", \"Οκτώβριος\", \"Νοέμβριος\", \"Δεκέμβριος\"],\r\n\t\tmonth_short: [\"ΙΑΝ\", \"ΦΕΒ\", \"ΜΑΡ\", \"ΑΠΡ\", \"ΜΑΙ\", \"ΙΟΥΝ\", \"ΙΟΥΛ\", \"ΑΥΓ\", \"ΣΕΠ\", \"ΟΚΤ\", \"ΝΟΕ\", \"ΔΕΚ\"],\r\n\t\tday_full: [\"Κυριακή\", \"Δευτέρα\", \"Τρίτη\", \"Τετάρτη\", \"Πέμπτη\", \"Παρασκευή\", \"Σάββατο\"],\r\n\t\tday_short: [\"ΚΥ\", \"ΔΕ\", \"ΤΡ\", \"ΤΕ\", \"ΠΕ\", \"ΠΑ\", \"ΣΑ\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Σήμερα\",\r\n\t\tday_tab: \"Ημέρα\",\r\n\t\tweek_tab: \"Εβδομάδα\",\r\n\t\tmonth_tab: \"Μήνας\",\r\n\t\tnew_event: \"Νέο έργο\",\r\n\t\ticon_save: \"Αποθήκευση\",\r\n\t\ticon_cancel: \"Άκυρο\",\r\n\t\ticon_details: \"Λεπτομέρειες\",\r\n\t\ticon_edit: \"Επεξεργασία\",\r\n\t\ticon_delete: \"Διαγραφή\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Το έργο θα διαγραφεί οριστικά. Θέλετε να συνεχίσετε;\",\r\n\t\tsection_description: \"Περιγραφή\",\r\n\t\tsection_time: \"Χρονική περίοδος\",\r\n\t\tfull_day: \"Πλήρης Ημέρα\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Θέλετε να επεξεργασθείτε ολόκληρη την ομάδα των επαναλαμβανόμενων έργων;\",\r\n\t\tsection_recurring: \"Επαναλαμβανόμενο έργο\",\r\n\t\tbutton_recurring: \"Ανενεργό\",\r\n\t\tbutton_recurring_open: \"Ενεργό\",\r\n\t\tbutton_edit_series: \"Επεξεργαστείτε τη σειρά\",\r\n\t\tbutton_edit_occurrence: \"Επεξεργασία ένα αντίγραφο\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Ημερήσια Διάταξη\",\r\n\t\tdate: \"Ημερομηνία\",\r\n\t\tdescription: \"Περιγραφή\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Έτος\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Ημερήσια Διάταξη\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Πλέγμα\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Ημερησίως\",\r\n\t\trepeat_radio_week: \"Εβδομαδιαίως\",\r\n\t\trepeat_radio_month: \"Μηνιαίως\",\r\n\t\trepeat_radio_year: \"Ετησίως\",\r\n\t\trepeat_radio_day_type: \"Κάθε\",\r\n\t\trepeat_text_day_count: \"ημέρα\",\r\n\t\trepeat_radio_day_type2: \"Κάθε εργάσιμη\",\r\n\t\trepeat_week: \" Επανάληψη κάθε\",\r\n\t\trepeat_text_week_count: \"εβδομάδα τις επόμενες ημέρες:\",\r\n\t\trepeat_radio_month_type: \"Επανάληψη\",\r\n\t\trepeat_radio_month_start: \"Την\",\r\n\t\trepeat_text_month_day: \"ημέρα κάθε\",\r\n\t\trepeat_text_month_count: \"μήνα\",\r\n\t\trepeat_text_month_count2_before: \"κάθε\",\r\n\t\trepeat_text_month_count2_after: \"μήνα\",\r\n\t\trepeat_year_label: \"Την\",\r\n\t\tselect_year_day2: \"του\",\r\n\t\trepeat_text_year_day: \"ημέρα\",\r\n\t\tselect_year_month: \"μήνα\",\r\n\t\trepeat_radio_end: \"Χωρίς ημερομηνία λήξεως\",\r\n\t\trepeat_text_occurences_count: \"επαναλήψεις\",\r\n\t\trepeat_radio_end3: \"Λήγει την\",\r\n\t\trepeat_radio_end2: \"Μετά από\",\r\n\t\tmonth_for_recurring: [\"Ιανουάριος\", \"Φεβρουάριος\", \"Μάρτιος\", \"Απρίλιος\", \"Μάϊος\", \"Ιούνιος\", \"Ιούλιος\", \"Αύγουστος\", \"Σεπτέμβριος\", \"Οκτώβριος\", \"Νοέμβριος\", \"Δεκέμβριος\"],\r\n\t\tday_for_recurring: [\"Κυριακή\", \"Δευτέρα\", \"Τρίτη\", \"Τετάρτη\", \"Πέμπτη\", \"Παρασκευή\", \"Σάββατο\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate:{\r\n\t\tmonth_full:[\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\r\n\t\tmonth_short:[\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\r\n\t\tday_full:[\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\r\n\t\tday_short:[\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"]\r\n\t},\r\n\tlabels:{\r\n\t\tdhx_cal_today_button:\"Today\",\r\n\t\tday_tab:\"Day\",\r\n\t\tweek_tab:\"Week\",\r\n\t\tmonth_tab:\"Month\",\r\n\t\tnew_event:\"New event\",\r\n\t\ticon_save:\"Save\",\r\n\t\ticon_cancel:\"Cancel\",\r\n\t\ticon_details:\"Details\",\r\n\t\ticon_edit:\"Edit\",\r\n\t\ticon_delete:\"Delete\",\r\n\t\tconfirm_closing:\"\",//Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting:\"Event will be deleted permanently, are you sure?\",\r\n\t\tsection_description:\"Description\",\r\n\t\tsection_time:\"Time period\",\r\n\t\tfull_day:\"Full day\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring:\"Do you want to edit the whole set of repeated events?\",\r\n\t\tsection_recurring:\"Repeat event\",\r\n\t\tbutton_recurring:\"Disabled\",\r\n\t\tbutton_recurring_open:\"Enabled\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Edit occurrence\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"Agenda\",\r\n\t\tdate:\"Date\",\r\n\t\tdescription:\"Description\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"Year\",\r\n\r\n\t\t/* week agenda extension */\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daily\",//name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Weekly\",//name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Monthly\",\r\n\t\trepeat_radio_year: \"Yearly\",\r\n\t\trepeat_radio_day_type: \"Every\",\r\n\t\trepeat_text_day_count: \"day\",\r\n\t\trepeat_radio_day_type2: \"Every workday\",\r\n\t\trepeat_week: \" Repeat every\",\r\n\t\trepeat_text_week_count: \"week next days:\",\r\n\t\trepeat_radio_month_type: \"Repeat\",\r\n\t\trepeat_radio_month_start: \"On\",\r\n\t\trepeat_text_month_day: \"day every\",\r\n\t\trepeat_text_month_count: \"month\",\r\n\t\trepeat_text_month_count2_before: \"every\",\r\n\t\trepeat_text_month_count2_after: \"month\",\r\n\t\trepeat_year_label: \"On\",\r\n\t\tselect_year_day2: \"of\",\r\n\t\trepeat_text_year_day: \"day\",\r\n\t\tselect_year_month: \"month\",\r\n\t\trepeat_radio_end: \"No end date\",\r\n\t\trepeat_text_occurences_count: \"occurrences\",\r\n\t\trepeat_radio_end2: \"After\",\r\n\t\trepeat_radio_end3: \"End by\",\r\n\t\tmonth_for_recurring: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"]//\r\n\t}\r\n};\r\n\r\n","/*\r\n @Autor Manuel Fernandez Panzuela - www.mfernandez.es\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Enero\", \"Febrero\", \"Marzo\", \"Abril\", \"Mayo\", \"Junio\", \"Julio\", \"Agosto\", \"Septiembre\", \"Octubre\", \"Noviembre\", \"Diciembre\"],\r\n\t\tmonth_short: [\"Ene\", \"Feb\", \"Mar\", \"Abr\", \"May\", \"Jun\", \"Jul\", \"Ago\", \"Sep\", \"Oct\", \"Nov\", \"Dic\"],\r\n\t\tday_full: [\"Domingo\", \"Lunes\", \"Martes\", \"Miércoles\", \"Jueves\", \"Viernes\", \"Sábado\"],\r\n\t\tday_short: [\"Dom\", \"Lun\", \"Mar\", \"Mié\", \"Jue\", \"Vie\", \"Sáb\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hoy\",\r\n\t\tday_tab: \"Día\",\r\n\t\tweek_tab: \"Semana\",\r\n\t\tmonth_tab: \"Mes\",\r\n\t\tnew_event: \"Nuevo evento\",\r\n\t\ticon_save: \"Guardar\",\r\n\t\ticon_cancel: \"Cancelar\",\r\n\t\ticon_details: \"Detalles\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Eliminar\",\r\n\t\tconfirm_closing: \"\", //\"Sus cambios se perderán, continuar ?\"\r\n\t\tconfirm_deleting: \"El evento se borrará definitivamente, ¿continuar?\",\r\n\t\tsection_description: \"Descripción\",\r\n\t\tsection_time: \"Período\",\r\n\t\tfull_day: \"Todo el día\",\r\n\r\n\t\tconfirm_recurring: \"¿Desea modificar el conjunto de eventos repetidos?\",\r\n\t\tsection_recurring: \"Repita el evento\",\r\n\t\tbutton_recurring: \"Impedido\",\r\n\t\tbutton_recurring_open: \"Permitido\",\r\n\t\tbutton_edit_series: \"Editar la serie\",\r\n\t\tbutton_edit_occurrence: \"Editar este evento\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Día\",\r\n\t\tdate: \"Fecha\",\r\n\t\tdescription: \"Descripción\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Año\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Día\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Reja\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Diariamente\",\r\n\t\trepeat_radio_week: \"Semanalmente\",\r\n\t\trepeat_radio_month: \"Mensualmente\",\r\n\t\trepeat_radio_year: \"Anualmente\",\r\n\t\trepeat_radio_day_type: \"Cada\",\r\n\t\trepeat_text_day_count: \"dia\",\r\n\t\trepeat_radio_day_type2: \"Cada jornada de trabajo\",\r\n\t\trepeat_week: \" Repetir cada\",\r\n\t\trepeat_text_week_count: \"semana:\",\r\n\t\trepeat_radio_month_type: \"Repita\",\r\n\t\trepeat_radio_month_start: \"El\",\r\n\t\trepeat_text_month_day: \"dia cada \",\r\n\t\trepeat_text_month_count: \"mes\",\r\n\t\trepeat_text_month_count2_before: \"cada\",\r\n\t\trepeat_text_month_count2_after: \"mes\",\r\n\t\trepeat_year_label: \"El\",\r\n\t\tselect_year_day2: \"del\",\r\n\t\trepeat_text_year_day: \"dia\",\r\n\t\tselect_year_month: \"mes\",\r\n\t\trepeat_radio_end: \"Sin fecha de finalización\",\r\n\t\trepeat_text_occurences_count: \"ocurrencias\",\r\n\t\trepeat_radio_end3: \"Fin\",\r\n\t\trepeat_radio_end2: \"Después de\",\r\n\t\tmonth_for_recurring: [\"Enero\", \"Febrero\", \"Маrzo\", \"Аbril\", \"Mayo\", \"Junio\", \"Julio\", \"Аgosto\", \"Setiembre\", \"Octubre\", \"Noviembre\", \"Diciembre\"],\r\n\t\tday_for_recurring: [\"Domingo\", \"Lunes\", \"Martes\", \"Miércoles\", \"Jeuves\", \"Viernes\", \"Sabado\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Tammikuu\", \"Helmikuu\", \"Maaliskuu\", \"Huhtikuu\", \"Toukokuu\", \"Kesäkuu\", \"Heinäkuu\", \"Elokuu\", \"Syyskuu\", \"Lokakuu\", \"Marraskuu\", \"Joulukuu\"],\r\n\t\tmonth_short: [\"Tam\", \"Hel\", \"Maa\", \"Huh\", \"Tou\", \"Kes\", \"Hei\", \"Elo\", \"Syy\", \"Lok\", \"Mar\", \"Jou\"],\r\n\t\tday_full: [\"Sunnuntai\", \"Maanantai\", \"Tiistai\", \"Keskiviikko\", \"Torstai\", \"Perjantai\", \"Lauantai\"],\r\n\t\tday_short: [\"Su\", \"Ma\", \"Ti\", \"Ke\", \"To\", \"Pe\", \"La\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Tänään\",\r\n\t\tday_tab: \"Päivä\",\r\n\t\tweek_tab: \"Viikko\",\r\n\t\tmonth_tab: \"Kuukausi\",\r\n\t\tnew_event: \"Uusi tapahtuma\",\r\n\t\ticon_save: \"Tallenna\",\r\n\t\ticon_cancel: \"Peru\",\r\n\t\ticon_details: \"Tiedot\",\r\n\t\ticon_edit: \"Muokkaa\",\r\n\t\ticon_delete: \"Poista\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Haluatko varmasti poistaa tapahtuman?\",\r\n\t\tsection_description: \"Kuvaus\",\r\n\t\tsection_time: \"Aikajakso\",\r\n\t\tfull_day: \"Koko päivä\",\r\n\r\n\t\tconfirm_recurring: \"Haluatko varmasti muokata toistuvan tapahtuman kaikkia jaksoja?\",\r\n\t\tsection_recurring: \"Toista tapahtuma\",\r\n\t\tbutton_recurring: \"Ei käytössä\",\r\n\t\tbutton_recurring_open: \"Käytössä\",\r\n\t\tbutton_edit_series: \"Muokkaa sarja\",\r\n\t\tbutton_edit_occurrence: \"Muokkaa kopio\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Esityslista\",\r\n\t\tdate: \"Päivämäärä\",\r\n\t\tdescription: \"Kuvaus\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Vuoden\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Esityslista\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Ritilä\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Luo uusi vetämällä\",\r\n\t\tdrag_to_move:\"Siirrä vetämällä\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Päivittäin\",\r\n\t\trepeat_radio_week: \"Viikoittain\",\r\n\t\trepeat_radio_month: \"Kuukausittain\",\r\n\t\trepeat_radio_year: \"Vuosittain\",\r\n\t\trepeat_radio_day_type: \"Joka\",\r\n\t\trepeat_text_day_count: \"päivä\",\r\n\t\trepeat_radio_day_type2: \"Joka arkipäivä\",\r\n\t\trepeat_week: \"Toista joka\",\r\n\t\trepeat_text_week_count: \"viikko näinä päivinä:\",\r\n\t\trepeat_radio_month_type: \"Toista\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \"päivänä joka\",\r\n\t\trepeat_text_month_count: \"kuukausi\",\r\n\t\trepeat_text_month_count2_before: \"joka\",\r\n\t\trepeat_text_month_count2_after: \"kuukausi\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"päivä\",\r\n\t\tselect_year_month: \"kuukausi\",\r\n\t\trepeat_radio_end: \"Ei loppumisaikaa\",\r\n\t\trepeat_text_occurences_count: \"Toiston jälkeen\",\r\n\t\trepeat_radio_end3: \"Loppuu\",\r\n\t\trepeat_radio_end2: \"\",\r\n\t\tmonth_for_recurring: [\"Tammikuu\", \"Helmikuu\", \"Maaliskuu\", \"Huhtikuu\", \"Toukokuu\", \"Kesäkuu\", \"Heinäkuu\", \"Elokuu\", \"Syyskuu\", \"Lokakuu\", \"Marraskuu\", \"Joulukuu\"],\r\n\t\tday_for_recurring: [\"Sunnuntai\", \"Maanantai\", \"Tiistai\", \"Keskiviikko\", \"Torstai\", \"Perjantai\", \"Lauantai\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Janvier\", \"Février\", \"Mars\", \"Avril\", \"Mai\", \"Juin\", \"Juillet\", \"Août\", \"Septembre\", \"Octobre\", \"Novembre\", \"Décembre\"],\r\n\t\tmonth_short: [\"Jan\", \"Fév\", \"Mar\", \"Avr\", \"Mai\", \"Juin\", \"Juil\", \"Aoû\", \"Sep\", \"Oct\", \"Nov\", \"Déc\"],\r\n\t\tday_full: [\"Dimanche\", \"Lundi\", \"Mardi\", \"Mercredi\", \"Jeudi\", \"Vendredi\", \"Samedi\"],\r\n\t\tday_short: [\"Dim\", \"Lun\", \"Mar\", \"Mer\", \"Jeu\", \"Ven\", \"Sam\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Aujourd'hui\",\r\n\t\tday_tab: \"Jour\",\r\n\t\tweek_tab: \"Semaine\",\r\n\t\tmonth_tab: \"Mois\",\r\n\t\tnew_event: \"Nouvel événement\",\r\n\t\ticon_save: \"Enregistrer\",\r\n\t\ticon_cancel: \"Annuler\",\r\n\t\ticon_details: \"Détails\",\r\n\t\ticon_edit: \"Modifier\",\r\n\t\ticon_delete: \"Effacer\",\r\n\t\tconfirm_closing: \"\", //Vos modifications seront perdus, êtes-vous sûr ?\r\n\t\tconfirm_deleting: \"L'événement sera effacé sans appel, êtes-vous sûr ?\",\r\n\t\tsection_description: \"Description\",\r\n\t\tsection_time: \"Période\",\r\n\t\tfull_day: \"Journée complète\",\r\n\r\n\t\tconfirm_recurring: \"Voulez-vous éditer toute une série d'évènements répétés?\",\r\n\t\tsection_recurring: \"Périodicité\",\r\n\t\tbutton_recurring: \"Désactivé\",\r\n\t\tbutton_recurring_open: \"Activé\",\r\n\t\tbutton_edit_series: \"Modifier la série\",\r\n\t\tbutton_edit_occurrence: \"Modifier une copie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Jour\",\r\n\t\tdate: \"Date\",\r\n\t\tdescription: \"Description\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Année\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Jour\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grille\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Quotidienne\",\r\n\t\trepeat_radio_week: \"Hebdomadaire\",\r\n\t\trepeat_radio_month: \"Mensuelle\",\r\n\t\trepeat_radio_year: \"Annuelle\",\r\n\t\trepeat_radio_day_type: \"Chaque\",\r\n\t\trepeat_text_day_count: \"jour\",\r\n\t\trepeat_radio_day_type2: \"Chaque journée de travail\",\r\n\t\trepeat_week: \" Répéter toutes les\",\r\n\t\trepeat_text_week_count: \"semaine:\",\r\n\t\trepeat_radio_month_type: \"Répéter\",\r\n\t\trepeat_radio_month_start: \"Le\",\r\n\t\trepeat_text_month_day: \"jour chaque\",\r\n\t\trepeat_text_month_count: \"mois\",\r\n\t\trepeat_text_month_count2_before: \"chaque\",\r\n\t\trepeat_text_month_count2_after: \"mois\",\r\n\t\trepeat_year_label: \"Le\",\r\n\t\tselect_year_day2: \"du\",\r\n\t\trepeat_text_year_day: \"jour\",\r\n\t\tselect_year_month: \"mois\",\r\n\t\trepeat_radio_end: \"Pas de date d"achèvement\",\r\n\t\trepeat_text_occurences_count: \"occurrences\",\r\n\t\trepeat_radio_end3: \"Fin\",\r\n\t\trepeat_radio_end2: \"Après\",\r\n\t\tmonth_for_recurring: [\"Janvier\", \"Février\", \"Mars\", \"Avril\", \"Mai\", \"Juin\", \"Juillet\", \"Août\", \"Septembre\", \"Octobre\", \"Novembre\", \"Décembre\"],\r\n\t\tday_for_recurring: [\"Dimanche\", \"Lundi\", \"Mardi\", \"Mercredi\", \"Jeudi\", \"Vendredi\", \"Samedi\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"ינואר\", \"פברואר\", \"מרץ\", \"אפריל\", \"מאי\", \"יוני\", \"יולי\", \"אוגוסט\", \"ספטמבר\", \"אוקטובר\", \"נובמבר\", \"דצמבר\"],\r\n\t\tmonth_short: [\"ינו\", \"פבר\", \"מרץ\", \"אפר\", \"מאי\", \"יונ\", \"יול\", \"אוג\", \"ספט\", \"אוק\", \"נוב\", \"דצמ\"],\r\n\t\tday_full: [\"ראשון\", \"שני\", \"שלישי\", \"רביעי\", \"חמישי\", \"שישי\", \"שבת\"],\r\n\t\tday_short: [\"א\", \"ב\", \"ג\", \"ד\", \"ה\", \"ו\", \"ש\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"היום\",\r\n\t\tday_tab: \"יום\",\r\n\t\tweek_tab: \"שבוע\",\r\n\t\tmonth_tab: \"חודש\",\r\n\t\tnew_event: \"ארוע חדש\",\r\n\t\ticon_save: \"שמור\",\r\n\t\ticon_cancel: \"בטל\",\r\n\t\ticon_details: \"פרטים\",\r\n\t\ticon_edit: \"ערוך\",\r\n\t\ticon_delete: \"מחק\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"ארוע ימחק סופית.להמשיך?\",\r\n\t\tsection_description: \"תיאור\",\r\n\t\tsection_time: \"תקופה\",\r\n\r\n\t\tconfirm_recurring: \"האם ברצונך לשנות כל סדרת ארועים מתמשכים?\",\r\n\t\tsection_recurring: \"להעתיק ארוע\",\r\n\t\tbutton_recurring: \"לא פעיל\",\r\n\t\tbutton_recurring_open: \"פעיל\",\r\n\t\tfull_day: \"יום שלם\",\r\n\t\tbutton_edit_series: \"ערוך את הסדרה\",\r\n\t\tbutton_edit_occurrence: \"עריכת עותק\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"סדר יום\",\r\n\t\tdate: \"תאריך\",\r\n\t\tdescription: \"תיאור\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"לשנה\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"סדר יום\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"סורג\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"גרור כדי להזיז\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"בטל\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"הבא\",\r\n\t\tprev: \"הקודם\",\r\n\t\tyear: \"שנה\",\r\n\t\tmonth: \"חודש\",\r\n\t\tday: \"יום\",\r\n\t\thour:\"שעה\",\r\n\t\tminute: \"דקה\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"יומי\",\r\n\t\trepeat_radio_week: \"שבועי\",\r\n\t\trepeat_radio_month: \"חודשי\",\r\n\t\trepeat_radio_year: \"שנתי\",\r\n\t\trepeat_radio_day_type: \"חזור כל\",\r\n\t\trepeat_text_day_count: \"ימים\",\r\n\t\trepeat_radio_day_type2: \"חזור כל יום עבודה\",\r\n\t\trepeat_week: \" חזור כל\",\r\n\t\trepeat_text_week_count: \"שבוע לפי ימים:\",\r\n\t\trepeat_radio_month_type: \"חזור כל\",\r\n\t\trepeat_radio_month_start: \"כל\",\r\n\t\trepeat_text_month_day: \"ימים כל\",\r\n\t\trepeat_text_month_count: \"חודשים\",\r\n\t\trepeat_text_month_count2_before: \"חזור כל\",\r\n\t\trepeat_text_month_count2_after: \"חודש\",\r\n\t\trepeat_year_label: \"כל\",\r\n\t\tselect_year_day2: \"בחודש\",\r\n\t\trepeat_text_year_day: \"ימים\",\r\n\t\tselect_year_month: \"חודש\",\r\n\t\trepeat_radio_end: \"לעולם לא מסתיים\",\r\n\t\trepeat_text_occurences_count: \"אירועים\",\r\n\t\trepeat_radio_end3: \"מסתיים ב\",\r\n\t\trepeat_radio_end2: \"אחרי\",\r\n\t\tmonth_for_recurring: [\"ינואר\", \"פברואר\", \"מרץ\", \"אפריל\", \"מאי\", \"יוני\", \"יולי\", \"אוגוסט\", \"ספטמבר\", \"אוקטובר\", \"נובמבר\", \"דצמבר\"],\r\n\t\tday_for_recurring: [\"ראשון\", \"שני\", \"שלישי\", \"רביעי\", \"חמישי\", \"שישי\", \"שבת\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Január\", \"Február\", \"Március\", \"Április\", \"Május\", \"Június\", \"Július\", \"Augusztus\", \"Szeptember\", \"Október\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Már\", \"Ápr\", \"Máj\", \"Jún\", \"Júl\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Vasárnap\", \"Hétfõ\", \"Kedd\", \"Szerda\", \"Csütörtök\", \"Péntek\", \"szombat\"],\r\n\t\tday_short: [\"Va\", \"Hé\", \"Ke\", \"Sze\", \"Csü\", \"Pé\", \"Szo\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Ma\",\r\n\t\tday_tab: \"Nap\",\r\n\t\tweek_tab: \"Hét\",\r\n\t\tmonth_tab: \"Hónap\",\r\n\t\tnew_event: \"Új esemény\",\r\n\t\ticon_save: \"Mentés\",\r\n\t\ticon_cancel: \"Mégse\",\r\n\t\ticon_details: \"Részletek\",\r\n\t\ticon_edit: \"Szerkesztés\",\r\n\t\ticon_delete: \"Törlés\",\r\n\t\tconfirm_closing: \"\", //A változások elvesznek, biztosan folytatja? \"\r\n\t\tconfirm_deleting: \"Az esemény törölve lesz, biztosan folytatja?\",\r\n\t\tsection_description: \"Leírás\",\r\n\t\tsection_time: \"Idõszak\",\r\n\t\tfull_day: \"Egesz napos\",\r\n\r\n\t\t/*ismétlõdõ események*/\r\n\t\tconfirm_recurring: \"Biztosan szerkeszteni akarod az összes ismétlõdõ esemény beállítását?\",\r\n\t\tsection_recurring: \"Esemény ismétlése\",\r\n\t\tbutton_recurring: \"Tiltás\",\r\n\t\tbutton_recurring_open: \"Engedélyezés\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Szerkesztés bíróság\",\r\n\r\n\t\t/*napirendi nézet*/\r\n\t\tagenda_tab: \"Napirend\",\r\n\t\tdate: \"Dátum\",\r\n\t\tdescription: \"Leírás\",\r\n\r\n\t\t/*éves nézet*/\r\n\t\tyear_tab: \"Év\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Maret\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Agustus\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mei\", \"Jun\", \"Jul\", \"Ags\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Minggu\", \"Senin\", \"Selasa\", \"Rabu\", \"Kamis\", \"Jumat\", \"Sabtu\"],\r\n\t\tday_short: [\"Ming\", \"Sen\", \"Sel\", \"Rab\", \"Kam\", \"Jum\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hari Ini\",\r\n\t\tday_tab: \"Hari\",\r\n\t\tweek_tab: \"Minggu\",\r\n\t\tmonth_tab: \"Bulan\",\r\n\t\tnew_event: \"Acara Baru\",\r\n\t\ticon_save: \"Simpan\",\r\n\t\ticon_cancel: \"Batal\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edit\",\r\n\t\ticon_delete: \"Hapus\",\r\n\t\tconfirm_closing: \"\", /*Perubahan tidak akan disimpan ?*/\r\n\t\tconfirm_deleting: \"Acara akan dihapus\",\r\n\t\tsection_description: \"Keterangan\",\r\n\t\tsection_time: \"Periode\",\r\n\t\tfull_day: \"Hari penuh\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Apakah acara ini akan berulang?\",\r\n\t\tsection_recurring: \"Acara Rutin\",\r\n\t\tbutton_recurring: \"Tidak Difungsikan\",\r\n\t\tbutton_recurring_open: \"Difungsikan\",\r\n\t\tbutton_edit_series: \"Mengedit seri\",\r\n\t\tbutton_edit_occurrence: \"Mengedit salinan\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Tanggal\",\r\n\t\tdescription: \"Keterangan\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Tahun\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabel\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Gennaio\", \"Febbraio\", \"Marzo\", \"Aprile\", \"Maggio\", \"Giugno\", \"Luglio\", \"Agosto\", \"Settembre\", \"Ottobre\", \"Novembre\", \"Dicembre\"],\r\n\t\tmonth_short: [\"Gen\", \"Feb\", \"Mar\", \"Apr\", \"Mag\", \"Giu\", \"Lug\", \"Ago\", \"Set\", \"Ott\", \"Nov\", \"Dic\"],\r\n\t\tday_full: [\"Domenica\", \"Lunedì\", \"Martedì\", \"Mercoledì\", \"Giovedì\", \"Venerdì\", \"Sabato\"],\r\n\t\tday_short: [\"Dom\", \"Lun\", \"Mar\", \"Mer\", \"Gio\", \"Ven\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Oggi\",\r\n\t\tday_tab: \"Giorno\",\r\n\t\tweek_tab: \"Settimana\",\r\n\t\tmonth_tab: \"Mese\",\r\n\t\tnew_event: \"Nuovo evento\",\r\n\t\ticon_save: \"Salva\",\r\n\t\ticon_cancel: \"Chiudi\",\r\n\t\ticon_details: \"Dettagli\",\r\n\t\ticon_edit: \"Modifica\",\r\n\t\ticon_delete: \"Elimina\",\r\n\t\tconfirm_closing: \"\", //Le modifiche apportate saranno perse, siete sicuri?\r\n\t\tconfirm_deleting: \"L'evento sarà eliminato, siete sicuri?\",\r\n\t\tsection_description: \"Descrizione\",\r\n\t\tsection_time: \"Periodo di tempo\",\r\n\t\tfull_day: \"Intera giornata\",\r\n\r\n\t\tconfirm_recurring: \"Vuoi modificare l'intera serie di eventi?\",\r\n\t\tsection_recurring: \"Ripetere l'evento\",\r\n\t\tbutton_recurring: \"Disattivato\",\r\n\t\tbutton_recurring_open: \"Attivato\",\r\n\t\tbutton_edit_series: \"Modificare la serie\",\r\n\t\tbutton_edit_occurrence: \"Modificare una copia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descrizione\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Anno\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Griglia\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Quotidiano\",\r\n\t\trepeat_radio_week: \"Settimanale\",\r\n\t\trepeat_radio_month: \"Mensile\",\r\n\t\trepeat_radio_year: \"Annuale\",\r\n\t\trepeat_radio_day_type: \"Ogni\",\r\n\t\trepeat_text_day_count: \"giorno\",\r\n\t\trepeat_radio_day_type2: \"Ogni giornata lavorativa\",\r\n\t\trepeat_week: \" Ripetere ogni\",\r\n\t\trepeat_text_week_count: \"settimana:\",\r\n\t\trepeat_radio_month_type: \"Ripetere\",\r\n\t\trepeat_radio_month_start: \"Il\",\r\n\t\trepeat_text_month_day: \"giorno ogni\",\r\n\t\trepeat_text_month_count: \"mese\",\r\n\t\trepeat_text_month_count2_before: \"ogni\",\r\n\t\trepeat_text_month_count2_after: \"mese\",\r\n\t\trepeat_year_label: \"Il\",\r\n\t\tselect_year_day2: \"del\",\r\n\t\trepeat_text_year_day: \"giorno\",\r\n\t\tselect_year_month: \"mese\",\r\n\t\trepeat_radio_end: \"Senza data finale\",\r\n\t\trepeat_text_occurences_count: \"occorenze\",\r\n\t\trepeat_radio_end3: \"Fine\",\r\n\t\trepeat_radio_end2: \"Dopo\",\r\n\t\tmonth_for_recurring: [\"Gennaio\", \"Febbraio\", \"Marzo\", \"Aprile\", \"Maggio\", \"Jiugno\", \"Luglio\", \"Agosto\", \"Settembre\", \"Ottobre\", \"Novembre\", \"Dicembre\"],\r\n\t\tday_for_recurring: [\"Domenica\", \"Lunedì\", \"Martedì\", \"Mercoledì\", \"Jovedì\", \"Venerdì\", \"Sabato\"]\r\n\t}\r\n};\r\n","/*\r\n Translation by Genexus Japan Inc.\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tmonth_short: [ \"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tday_full: [\"日曜日\", \"月曜日\", \"火曜日\", \"水曜日\", \"木曜日\", \"金曜日\", \"土曜日\"],\r\n\t\tday_short: [\"日\", \"月\", \"火\", \"水\", \"木\", \"金\", \"土\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"今日\",\r\n\t\tday_tab: \"日\",\r\n\t\tweek_tab: \"週\",\r\n\t\tmonth_tab: \"月\",\r\n\t\tnew_event: \"新イベント\",\r\n\t\ticon_save: \"保存\",\r\n\t\ticon_cancel: \"キャンセル\",\r\n\t\ticon_details: \"詳細\",\r\n\t\ticon_edit: \"編集\",\r\n\t\ticon_delete: \"削除\",\r\n\t\tconfirm_closing: \"\", //変更が取り消されます、宜しいですか?\r\n\t\tconfirm_deleting: \"イベント完全に削除されます、宜しいですか?\",\r\n\t\tsection_description: \"デスクリプション\",\r\n\t\tsection_time: \"期間\",\r\n\t\tconfirm_recurring: \"繰り返されているイベントを全て編集しますか?\",\r\n\t\tsection_recurring: \"イベントを繰り返す\",\r\n\t\tbutton_recurring: \"無効\",\r\n\t\tbutton_recurring_open: \"有効\",\r\n\t\tfull_day: \"終日\",\r\n\t\tbutton_edit_series: \"シリーズを編集します\",\r\n\t\tbutton_edit_occurrence: \"コピーを編集\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"議題は\",\r\n\t\tdate: \"日付\",\r\n\t\tdescription: \"説明\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"今年\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"議題は\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"グリッド\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};\r\n\r\n\r\n","export default class LocaleManager{\r\n\tconstructor(config){\r\n\t\tthis._locales = {};\r\n\t\tfor(const i in config){\r\n\t\t\tthis._locales[i] = config[i];\r\n\t\t}\r\n\t}\r\n\r\n\taddLocale(name, locale) {\r\n\t\tthis._locales[name] = locale;\r\n\t}\r\n\r\n\tgetLocale(name) {\r\n\t\treturn this._locales[name];\r\n\t}\r\n}","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Mon\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"I dag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uke\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny hendelse\",\r\n\t\ticon_save: \"Lagre\",\r\n\t\ticon_cancel: \"Avbryt\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Rediger\",\r\n\t\ticon_delete: \"Slett\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Hendelsen vil bli slettet permanent. Er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du forandre hele dette settet av repeterende hendelser?\",\r\n\t\tsection_recurring: \"Repeter hendelsen\",\r\n\t\tbutton_recurring: \"Av\",\r\n\t\tbutton_recurring_open: \"På\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Redigere en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daglig\",\r\n\t\trepeat_radio_week: \"Ukentlig\",\r\n\t\trepeat_radio_month: \"Månedlig\",\r\n\t\trepeat_radio_year: \"Årlig\",\r\n\t\trepeat_radio_day_type: \"Hver\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"Alle hverdager\",\r\n\t\trepeat_week: \" Gjentas hver\",\r\n\t\trepeat_text_week_count: \"uke på:\",\r\n\t\trepeat_radio_month_type: \"På hver\",\r\n\t\trepeat_radio_month_start: \"På\",\r\n\t\trepeat_text_month_day: \"dag hver\",\r\n\t\trepeat_text_month_count: \"måned\",\r\n\t\trepeat_text_month_count2_before: \"hver\",\r\n\t\trepeat_text_month_count2_after: \"måned\",\r\n\t\trepeat_year_label: \"på\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Ingen sluttdato\",\r\n\t\trepeat_text_occurences_count: \"forekomst\",\r\n\t\trepeat_radio_end3: \"Stop den\",\r\n\t\trepeat_radio_end2: \"Etter\",\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tday_for_recurring: [\"Sondag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Maart\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Augustus\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"mrt\", \"Apr\", \"Mei\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Zondag\", \"Maandag\", \"Dinsdag\", \"Woensdag\", \"Donderdag\", \"Vrijdag\", \"Zaterdag\"],\r\n\t\tday_short: [\"Zo\", \"Ma\", \"Di\", \"Wo\", \"Do\", \"Vr\", \"Za\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Vandaag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Week\",\r\n\t\tmonth_tab: \"Maand\",\r\n\t\tnew_event: \"Nieuw item\",\r\n\t\ticon_save: \"Opslaan\",\r\n\t\ticon_cancel: \"Annuleren\",\r\n\t\ticon_details: \"Details\",\r\n\t\ticon_edit: \"Bewerken\",\r\n\t\ticon_delete: \"Verwijderen\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Item zal permanent worden verwijderd, doorgaan?\",\r\n\t\tsection_description: \"Beschrijving\",\r\n\t\tsection_time: \"Tijd periode\",\r\n\t\tfull_day: \"Hele dag\",\r\n\r\n\t\tconfirm_recurring: \"Wilt u alle terugkerende items bijwerken?\",\r\n\t\tsection_recurring: \"Item herhalen\",\r\n\t\tbutton_recurring: \"Uit\",\r\n\t\tbutton_recurring_open: \"Aan\",\r\n\t\tbutton_edit_series: \"Bewerk de serie\",\r\n\t\tbutton_edit_occurrence: \"Bewerk een kopie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Omschrijving\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Jaar\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabel\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Dagelijks\",\r\n\t\trepeat_radio_week: \"Wekelijks\",\r\n\t\trepeat_radio_month: \"Maandelijks\",\r\n\t\trepeat_radio_year: \"Jaarlijks\",\r\n\t\trepeat_radio_day_type: \"Elke\",\r\n\t\trepeat_text_day_count: \"dag(en)\",\r\n\t\trepeat_radio_day_type2: \"Elke werkdag\",\r\n\t\trepeat_week: \" Herhaal elke\",\r\n\t\trepeat_text_week_count: \"week op de volgende dagen:\",\r\n\t\trepeat_radio_month_type: \"Herhaal\",\r\n\t\trepeat_radio_month_start: \"Op\",\r\n\t\trepeat_text_month_day: \"dag iedere\",\r\n\t\trepeat_text_month_count: \"maanden\",\r\n\t\trepeat_text_month_count2_before: \"iedere\",\r\n\t\trepeat_text_month_count2_after: \"maanden\",\r\n\t\trepeat_year_label: \"Op\",\r\n\t\tselect_year_day2: \"van\",\r\n\t\trepeat_text_year_day: \"dag\",\r\n\t\tselect_year_month: \"maand\",\r\n\t\trepeat_radio_end: \"Geen eind datum\",\r\n\t\trepeat_text_occurences_count: \"keren\",\r\n\t\trepeat_radio_end3: \"Eindigd per\",\r\n\t\trepeat_radio_end2: \"Na\",\r\n\t\tmonth_for_recurring: [\"Januari\", \"Februari\", \"Maart\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Augustus\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Zondag\", \"Maandag\", \"Dinsdag\", \"Woensdag\", \"Donderdag\", \"Vrijdag\", \"Zaterdag\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Man\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uke\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny\",\r\n\t\ticon_save: \"Lagre\",\r\n\t\ticon_cancel: \"Avbryt\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Endre\",\r\n\t\ticon_delete: \"Slett\",\r\n\t\tconfirm_closing: \"Endringer blir ikke lagret, er du sikker?\", //Endringer blir ikke lagret, er du sikker?\r\n\t\tconfirm_deleting: \"Oppføringen vil bli slettet, er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\t\tfull_day: \"Full dag\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du endre hele settet med repeterende oppføringer?\",\r\n\t\tsection_recurring: \"Repeterende oppføring\",\r\n\t\tbutton_recurring: \"Ikke aktiv\",\r\n\t\tbutton_recurring_open: \"Aktiv\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Redigere en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Styczeń\", \"Luty\", \"Marzec\", \"Kwiecień\", \"Maj\", \"Czerwiec\", \"Lipiec\", \"Sierpień\", \"Wrzesień\", \"Październik\", \"Listopad\", \"Grudzień\"],\r\n\t\tmonth_short: [\"Sty\", \"Lut\", \"Mar\", \"Kwi\", \"Maj\", \"Cze\", \"Lip\", \"Sie\", \"Wrz\", \"Paź\", \"Lis\", \"Gru\"],\r\n\t\tday_full: [\"Niedziela\", \"Poniedziałek\", \"Wtorek\", \"Środa\", \"Czwartek\", \"Piątek\", \"Sobota\"],\r\n\t\tday_short: [\"Nie\", \"Pon\", \"Wto\", \"Śro\", \"Czw\", \"Pią\", \"Sob\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dziś\",\r\n\t\tday_tab: \"Dzień\",\r\n\t\tweek_tab: \"Tydzień\",\r\n\t\tmonth_tab: \"Miesiąc\",\r\n\t\tnew_event: \"Nowe zdarzenie\",\r\n\t\ticon_save: \"Zapisz\",\r\n\t\ticon_cancel: \"Anuluj\",\r\n\t\ticon_details: \"Szczegóły\",\r\n\t\ticon_edit: \"Edytuj\",\r\n\t\ticon_delete: \"Usuń\",\r\n\t\tconfirm_closing: \"\", //Zmiany zostaną usunięte, jesteś pewien?\r\n\t\tconfirm_deleting: \"Zdarzenie zostanie usunięte na zawsze, kontynuować?\",\r\n\t\tsection_description: \"Opis\",\r\n\t\tsection_time: \"Okres czasu\",\r\n\t\tfull_day: \"Cały dzień\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Czy chcesz edytować cały zbiór powtarzających się zdarzeń?\",\r\n\t\tsection_recurring: \"Powtórz zdarzenie\",\r\n\t\tbutton_recurring: \"Nieaktywne\",\r\n\t\tbutton_recurring_open: \"Aktywne\",\r\n\t\tbutton_edit_series: \"Edytuj serię\",\r\n\t\tbutton_edit_occurrence: \"Edytuj kopię\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Opis\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabela\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Codziennie\",\r\n\t\trepeat_radio_week: \"Co tydzie\",\r\n\t\trepeat_radio_month: \"Co miesic\",\r\n\t\trepeat_radio_year: \"Co rok\",\r\n\t\trepeat_radio_day_type: \"Kadego\",\r\n\t\trepeat_text_day_count: \"dnia\",\r\n\t\trepeat_radio_day_type2: \"Kadego dnia roboczego\",\r\n\t\trepeat_week: \" Powtarzaj kadego\",\r\n\t\trepeat_text_week_count: \"tygodnia w dni:\",\r\n\t\trepeat_radio_month_type: \"Powtrz\",\r\n\t\trepeat_radio_month_start: \"W\",\r\n\t\trepeat_text_month_day: \"dnia kadego\",\r\n\t\trepeat_text_month_count: \"miesica\",\r\n\t\trepeat_text_month_count2_before: \"kadego\",\r\n\t\trepeat_text_month_count2_after: \"miesica\",\r\n\t\trepeat_year_label: \"W\",\r\n\t\tselect_year_day2: \"miesica\",\r\n\t\trepeat_text_year_day: \"dnia miesica\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Bez daty kocowej\",\r\n\t\trepeat_text_occurences_count: \"wystpieniu/ach\",\r\n\t\trepeat_radio_end3: \"Zakocz w\",\r\n\t\trepeat_radio_end2: \"Po\",\r\n\t\tmonth_for_recurring: [\"Stycznia\", \"Lutego\", \"Marca\", \"Kwietnia\", \"Maja\", \"Czerwca\", \"Lipca\", \"Sierpnia\", \"Wrzenia\", \"Padziernka\", \"Listopada\", \"Grudnia\"],\r\n\t\tday_for_recurring: [\"Niedziela\", \"Poniedziaek\", \"Wtorek\", \"roda\", \"Czwartek\", \"Pitek\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","/*\r\n\r\n TRANSLATION BY MATTHEUS PIROVANI RORIZ GONЗALVES\r\n\r\n mattheusroriz@hotmail.com / mattheus.pirovani@gmail.com /\r\n\r\n www.atrixian.com.br\r\n\r\n */\r\n\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Janeiro\", \"Fevereiro\", \"Março\", \"Abril\", \"Maio\", \"Junho\", \"Julho\", \"Agosto\", \"Setembro\", \"Outubro\", \"Novembro\", \"Dezembro\"],\r\n\t\tmonth_short: [\"Jan\", \"Fev\", \"Mar\", \"Abr\", \"Mai\", \"Jun\", \"Jul\", \"Ago\", \"Set\", \"Out\", \"Nov\", \"Dez\"],\r\n\t\tday_full: [\"Domingo\", \"Segunda\", \"Terça\", \"Quarta\", \"Quinta\", \"Sexta\", \"Sábado\"],\r\n\t\tday_short: [\"Dom\", \"Seg\", \"Ter\", \"Qua\", \"Qui\", \"Sex\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hoje\",\r\n\t\tday_tab: \"Dia\",\r\n\t\tweek_tab: \"Semana\",\r\n\t\tmonth_tab: \"Mês\",\r\n\t\tnew_event: \"Novo evento\",\r\n\t\ticon_save: \"Salvar\",\r\n\t\ticon_cancel: \"Cancelar\",\r\n\t\ticon_details: \"Detalhes\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Deletar\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Tem certeza que deseja excluir?\",\r\n\t\tsection_description: \"Descrição\",\r\n\t\tsection_time: \"Período de tempo\",\r\n\t\tfull_day: \"Dia inteiro\",\r\n\r\n\t\tconfirm_recurring: \"Deseja editar todos esses eventos repetidos?\",\r\n\t\tsection_recurring: \"Repetir evento\",\r\n\t\tbutton_recurring: \"Desabilitar\",\r\n\t\tbutton_recurring_open: \"Habilitar\",\r\n\t\tbutton_edit_series: \"Editar a série\",\r\n\t\tbutton_edit_occurrence: \"Editar uma cópia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dia\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descrição\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Ano\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dia\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grade\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Diário\",\r\n\t\trepeat_radio_week: \"Semanal\",\r\n\t\trepeat_radio_month: \"Mensal\",\r\n\t\trepeat_radio_year: \"Anual\",\r\n\t\trepeat_radio_day_type: \"Cada\",\r\n\t\trepeat_text_day_count: \"dia(s)\",\r\n\t\trepeat_radio_day_type2: \"Cada trabalho diário\",\r\n\t\trepeat_week: \" Repita cada\",\r\n\t\trepeat_text_week_count: \"semana:\",\r\n\t\trepeat_radio_month_type: \"Repetir\",\r\n\t\trepeat_radio_month_start: \"Em\",\r\n\t\trepeat_text_month_day: \"todo dia\",\r\n\t\trepeat_text_month_count: \"mês\",\r\n\t\trepeat_text_month_count2_before: \"todo\",\r\n\t\trepeat_text_month_count2_after: \"mês\",\r\n\t\trepeat_year_label: \"Em\",\r\n\t\tselect_year_day2: \"of\",\r\n\t\trepeat_text_year_day: \"dia\",\r\n\t\tselect_year_month: \"mês\",\r\n\t\trepeat_radio_end: \"Sem data final\",\r\n\t\trepeat_text_occurences_count: \"ocorrências\",\r\n\t\trepeat_radio_end3: \"Fim\",\r\n\t\trepeat_radio_end2: \"Depois\",\r\n\t\tmonth_for_recurring: [\"Janeiro\", \"Fevereiro\", \"Março\", \"Abril\", \"Maio\", \"Junho\", \"Julho\", \"Agosto\", \"Setembro\", \"Outubro\", \"Novembro\", \"Dezembro\"],\r\n\t\tday_for_recurring: [\"Domingo\", \"Segunda\", \"Terça\", \"Quarta\", \"Quinta\", \"Sexta\", \"Sábado\"]\r\n\t}\r\n};\r\n\r\n\r\n","/*\r\n\tTraducere de Ovidiu Lixandru: http://www.madball.ro\r\n */\r\n\r\nexport default {\r\n\tdate:{\r\n\t\tmonth_full:[\"Ianuarie\", \"Februarie\", \"Martie\", \"Aprilie\", \"Mai\", \"Iunie\", \"Iulie\", \"August\", \"Septembrie\", \"Octombrie\", \"November\", \"December\"],\r\n\t\tmonth_short:[\"Ian\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Iun\", \"Iul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\r\n\t\tday_full:[\"Duminica\", \"Luni\", \"Marti\", \"Miercuri\", \"Joi\", \"Vineri\", \"Sambata\"],\r\n\t\tday_short:[\"Du\", \"Lu\", \"Ma\", \"Mi\", \"Jo\", \"Vi\", \"Sa\"]\r\n\t},\r\n\tlabels:{\r\n\t\tdhx_cal_today_button:\"Astazi\",\r\n\t\tday_tab:\"Zi\",\r\n\t\tweek_tab:\"Saptamana\",\r\n\t\tmonth_tab:\"Luna\",\r\n\t\tnew_event:\"Eveniment nou\",\r\n\t\ticon_save:\"Salveaza\",\r\n\t\ticon_cancel:\"Anuleaza\",\r\n\t\ticon_details:\"Detalii\",\r\n\t\ticon_edit:\"Editeaza\",\r\n\t\ticon_delete:\"Sterge\",\r\n\t\tconfirm_closing:\"Schimbarile nu vor fi salvate, esti sigur?\",//Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting:\"Evenimentul va fi sters permanent, esti sigur?\",\r\n\t\tsection_description:\"Descriere\",\r\n\t\tsection_time:\"Interval\",\r\n\t\tfull_day:\"Toata ziua\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring:\"Vrei sa editezi toata seria de evenimente repetate?\",\r\n\t\tsection_recurring:\"Repetare\",\r\n\t\tbutton_recurring:\"Dezactivata\",\r\n\t\tbutton_recurring_open:\"Activata\",\r\n\t\tbutton_edit_series: \"Editeaza serie\",\r\n\t\tbutton_edit_occurrence: \"Editeaza doar intrare\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"Agenda\",\r\n\t\tdate:\"Data\",\r\n\t\tdescription:\"Descriere\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"An\",\r\n\r\n\t\t/* week agenda extension */\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Lista\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Zilnic\",\r\n\t\trepeat_radio_week: \"Saptamanal\",\r\n\t\trepeat_radio_month: \"Lunar\",\r\n\t\trepeat_radio_year: \"Anual\",\r\n\t\trepeat_radio_day_type: \"La fiecare\",\r\n\t\trepeat_text_day_count: \"zi(le)\",\r\n\t\trepeat_radio_day_type2: \"Fiecare zi lucratoare\",\r\n\t\trepeat_week: \" Repeta la fiecare\",\r\n\t\trepeat_text_week_count: \"saptamana in urmatoarele zile:\",\r\n\t\trepeat_radio_month_type: \"Repeta in\",\r\n\t\trepeat_radio_month_start: \"In a\",\r\n\t\trepeat_text_month_day: \"zi la fiecare\",\r\n\t\trepeat_text_month_count: \"luni\",\r\n\t\trepeat_text_month_count2_before: \"la fiecare\",\r\n\t\trepeat_text_month_count2_after: \"luni\",\r\n\t\trepeat_year_label: \"In\",\r\n\t\tselect_year_day2: \"a lunii\",\r\n\t\trepeat_text_year_day: \"zi a lunii\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Fara data de sfarsit\",\r\n\t\trepeat_text_occurences_count: \"evenimente\",\r\n\t\trepeat_radio_end3: \"La data\",\r\n\t\trepeat_radio_end2: \"Dupa\",\r\n\t\tmonth_for_recurring: [\"Ianuarie\", \"Februarie\", \"Martie\", \"Aprilie\", \"Mai\", \"Iunie\", \"Iulie\", \"August\", \"Septembrie\", \"Octombrie\", \"Noiembrie\", \"Decembrie\"],\r\n\t\tday_for_recurring: [\"Duminica\", \"Luni\", \"Marti\", \"Miercuri\", \"Joi\", \"Vineri\", \"Sambata\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Январь\", \"Февраль\", \"Март\", \"Апрель\", \"Maй\", \"Июнь\", \"Июль\", \"Август\", \"Сентябрь\", \"Oктябрь\", \"Ноябрь\", \"Декабрь\"],\r\n\t\tmonth_short: [\"Янв\", \"Фев\", \"Maр\", \"Aпр\", \"Maй\", \"Июн\", \"Июл\", \"Aвг\", \"Сен\", \"Окт\", \"Ноя\", \"Дек\"],\r\n\t\tday_full: [ \"Воскресенье\", \"Понедельник\", \"Вторник\", \"Среда\", \"Четверг\", \"Пятница\", \"Суббота\"],\r\n\t\tday_short: [\"Вс\", \"Пн\", \"Вт\", \"Ср\", \"Чт\", \"Пт\", \"Сб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сегодня\",\r\n\t\tday_tab: \"День\",\r\n\t\tweek_tab: \"Неделя\",\r\n\t\tmonth_tab: \"Месяц\",\r\n\t\tnew_event: \"Новое событие\",\r\n\t\ticon_save: \"Сохранить\",\r\n\t\ticon_cancel: \"Отменить\",\r\n\t\ticon_details: \"Детали\",\r\n\t\ticon_edit: \"Изменить\",\r\n\t\ticon_delete: \"Удалить\",\r\n\t\tconfirm_closing: \"\", //Ваши изменения будут потеряны, продолжить?\r\n\t\tconfirm_deleting: \"Событие будет удалено безвозвратно, продолжить?\",\r\n\t\tsection_description: \"Описание\",\r\n\t\tsection_time: \"Период времени\",\r\n\t\tfull_day: \"Весь день\",\r\n\r\n\t\tconfirm_recurring: \"Вы хотите изменить всю серию повторяющихся событий?\",\r\n\t\tsection_recurring: \"Повторение\",\r\n\t\tbutton_recurring: \"Отключено\",\r\n\t\tbutton_recurring_open: \"Включено\",\r\n\t\tbutton_edit_series: \"Редактировать серию\",\r\n\t\tbutton_edit_occurrence: \"Редактировать экземпляр\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Список\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Описание\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Год\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Список\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Таблица\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"День\",\r\n\t\trepeat_radio_week: \"Неделя\",\r\n\t\trepeat_radio_month: \"Месяц\",\r\n\t\trepeat_radio_year: \"Год\",\r\n\t\trepeat_radio_day_type: \"Каждый\",\r\n\t\trepeat_text_day_count: \"день\",\r\n\t\trepeat_radio_day_type2: \"Каждый рабочий день\",\r\n\t\trepeat_week: \" Повторять каждую\",\r\n\t\trepeat_text_week_count: \"неделю , в:\",\r\n\t\trepeat_radio_month_type: \"Повторять\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" числа каждый \",\r\n\t\trepeat_text_month_count: \"месяц\",\r\n\t\trepeat_text_month_count2_before: \"каждый \",\r\n\t\trepeat_text_month_count2_after: \"месяц\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"день\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без даты окончания\",\r\n\t\trepeat_text_occurences_count: \"повторений\",\r\n\t\trepeat_radio_end3: \"До \",\r\n\t\trepeat_radio_end2: \"\",\r\n\t\tmonth_for_recurring: [\"Января\", \"Февраля\", \"Марта\", \"Апреля\", \"Мая\", \"Июня\", \"Июля\", \"Августа\", \"Сентября\", \"Октября\", \"Ноября\", \"Декабря\"],\r\n\t\tday_for_recurring: [\"Воскресенье\", \"Понедельник\", \"Вторник\", \"Среду\", \"Четверг\", \"Пятницу\", \"Субботу\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Marec\", \"April\", \"Maj\", \"Junij\", \"Julij\", \"Avgust\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Nedelja\", \"Ponedeljek\", \"Torek\", \"Sreda\", \"Četrtek\", \"Petek\", \"Sobota\"],\r\n\t\tday_short: [\"Ned\", \"Pon\", \"Tor\", \"Sre\", \"Čet\", \"Pet\", \"Sob\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Danes\",\r\n\t\tday_tab: \"Dan\",\r\n\t\tweek_tab: \"Teden\",\r\n\t\tmonth_tab: \"Mesec\",\r\n\t\tnew_event: \"Nov dogodek\",\r\n\t\ticon_save: \"Shrani\",\r\n\t\ticon_cancel: \"Prekliči\",\r\n\t\ticon_details: \"Podrobnosti\",\r\n\t\ticon_edit: \"Uredi\",\r\n\t\ticon_delete: \"Izbriši\",\r\n\t\tconfirm_closing: \"\", //Spremembe ne bodo shranjene. Želite nadaljevati ?\r\n\t\tconfirm_deleting: \"Dogodek bo izbrisan. Želite nadaljevati?\",\r\n\t\tsection_description: \"Opis\",\r\n\t\tsection_time: \"Časovni okvir\",\r\n\t\tfull_day: \"Ves dan\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Želite urediti celoten set ponavljajočih dogodkov?\",\r\n\t\tsection_recurring: \"Ponovi dogodek\",\r\n\t\tbutton_recurring: \"Onemogočeno\",\r\n\t\tbutton_recurring_open: \"Omogočeno\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Edit occurrence\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Zadeva\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Opis\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Leto\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Zadeva\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Miza\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Január\", \"Február\", \"Marec\", \"Apríl\", \"Máj\", \"Jún\", \"Júl\", \"August\", \"September\", \"Október\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Máj\", \"Jún\", \"Júl\", \"Aug\", \"Sept\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Nedeľa\", \"Pondelok\", \"Utorok\", \"Streda\", \"Štvrtok\", \"Piatok\", \"Sobota\"],\r\n\t\tday_short: [\"Ne\", \"Po\", \"Ut\", \"St\", \"Št\", \"Pi\", \"So\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dnes\",\r\n\t\tday_tab: \"Deň\",\r\n\t\tweek_tab: \"Týždeň\",\r\n\t\tmonth_tab: \"Mesiac\",\r\n\t\tnew_event: \"Nová udalosť\",\r\n\t\ticon_save: \"Uložiť\",\r\n\t\ticon_cancel: \"Späť\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edituj\",\r\n\t\ticon_delete: \"Zmazať\",\r\n\t\tconfirm_closing: \"Vaše zmeny nebudú uložené. Skutočne?\", //Vaše změny budou ztraceny, opravdu ?\r\n\t\tconfirm_deleting: \"Udalosť bude natrvalo vymazaná. Skutočne?\",\r\n\t\tsection_description: \"Poznámky\",\r\n\t\tsection_time: \"Doba platnosti\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Prajete si upraviť celú radu opakovaných udalostí?\",\r\n\t\tsection_recurring: \"Opakovanie udalosti\",\r\n\t\tbutton_recurring: \"Vypnuté\",\r\n\t\tbutton_recurring_open: \"Zapnuté\",\r\n\t\tbutton_edit_series: \"Upraviť opakovania\",\r\n\t\tbutton_edit_occurrence: \"Upraviť inštancie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Program\",\r\n\t\tdate: \"Dátum\",\r\n\t\tdescription: \"Poznámka\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\t\tfull_day: \"Celý deň\", // Full day\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Program\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Mriežka\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Denne\",\r\n\t\trepeat_radio_week: \"Týždenne\",\r\n\t\trepeat_radio_month: \"Mesaène\",\r\n\t\trepeat_radio_year: \"Roène\",\r\n\t\trepeat_radio_day_type: \"Každý\",\r\n\t\trepeat_text_day_count: \"deò\",\r\n\t\trepeat_radio_day_type2: \"Každý prac. deò\",\r\n\t\trepeat_week: \"Opakova každý\",\r\n\t\trepeat_text_week_count: \"týždeò v dòoch:\",\r\n\t\trepeat_radio_month_type: \"Opakova\",\r\n\t\trepeat_radio_month_start: \"On\",\r\n\t\trepeat_text_month_day: \"deò každý\",\r\n\t\trepeat_text_month_count: \"mesiac\",\r\n\t\trepeat_text_month_count2_before: \"každý\",\r\n\t\trepeat_text_month_count2_after: \"mesiac\",\r\n\t\trepeat_year_label: \"On\",\r\n\t\tselect_year_day2: \"poèas\",\r\n\t\trepeat_text_year_day: \"deò\",\r\n\t\tselect_year_month: \"mesiac\",\r\n\t\trepeat_radio_end: \"Bez dátumu ukonèenia\",\r\n\t\trepeat_text_occurences_count: \"udalostiach\",\r\n\t\trepeat_radio_end3: \"Ukonèi\",\r\n\t\trepeat_radio_end2: \"Po\",\r\n\t\tmonth_for_recurring: [\"Január\", \"Február\", \"Marec\", \"Apríl\", \"Máj\", \"Jún\", \"Júl\", \"August\", \"September\", \"Október\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Nede¾a\", \"Pondelok\", \"Utorok\", \"Streda\", \"Štvrtok\", \"Piatok\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Mars\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"Augusti\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Söndag\", \"Måndag\", \"Tisdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lördag\"],\r\n\t\tday_short: [\"Sön\", \"Mån\", \"Tis\", \"Ons\", \"Tor\", \"Fre\", \"Lör\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Vecka\",\r\n\t\tmonth_tab: \"Månad\",\r\n\t\tnew_event: \"Ny händelse\",\r\n\t\ticon_save: \"Spara\",\r\n\t\ticon_cancel: \"Ångra\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Ändra\",\r\n\t\ticon_delete: \"Ta bort\",\r\n\t\tconfirm_closing: \"\", //Dina förändingar kommer gå förlorade, är du säker?\r\n\t\tconfirm_deleting: \"Är du säker på att du vill ta bort händelsen permanent?\",\r\n\t\tsection_description: \"Beskrivning\",\r\n\t\tsection_time: \"Tid\",\r\n\t\tfull_day: \"Hela dagen\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vill du redigera hela serien med repeterande händelser?\",\r\n\t\tsection_recurring: \"Upprepa händelse\",\r\n\t\tbutton_recurring: \"Inaktiverat\",\r\n\t\tbutton_recurring_open: \"Aktiverat\",\r\n\t\tbutton_edit_series: \"Redigera serien\",\r\n\t\tbutton_edit_occurrence: \"Redigera en kopia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dagordning\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Beskrivning\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dagordning\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Galler\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Dra för att skapa ny\",\r\n\t\tdrag_to_move:\"Dra för att flytta\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Dagligen\",\r\n\t\trepeat_radio_week: \"Veckovis\",\r\n\t\trepeat_radio_month: \"Månadsvis\",\r\n\t\trepeat_radio_year: \"Årligen\",\r\n\t\trepeat_radio_day_type: \"Var\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"Varje arbetsdag\",\r\n\t\trepeat_week: \" Upprepa var\",\r\n\t\trepeat_text_week_count: \"vecka dessa dagar:\",\r\n\t\trepeat_radio_month_type: \"Upprepa\",\r\n\t\trepeat_radio_month_start: \"Den\",\r\n\t\trepeat_text_month_day: \"dagen var\",\r\n\t\trepeat_text_month_count: \"månad\",\r\n\t\trepeat_text_month_count2_before: \"var\",\r\n\t\trepeat_text_month_count2_after: \"månad\",\r\n\t\trepeat_year_label: \"Den\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"månad\",\r\n\t\trepeat_radio_end: \"Inget slutdatum\",\r\n\t\trepeat_text_occurences_count: \"upprepningar\",\r\n\t\trepeat_radio_end3: \"Sluta efter\",\r\n\t\trepeat_radio_end2: \"Efter\",\r\n\t\tmonth_for_recurring: [\"Januari\", \"Februari\", \"Mars\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"Augusti\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Söndag\", \"Måndag\", \"Tisdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lördag\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Ocak\", \"Þubat\", \"Mart\", \"Nisan\", \"Mayýs\", \"Haziran\", \"Temmuz\", \"Aðustos\", \"Eylül\", \"Ekim\", \"Kasým\", \"Aralýk\"],\r\n\t\tmonth_short: [\"Oca\", \"Þub\", \"Mar\", \"Nis\", \"May\", \"Haz\", \"Tem\", \"Aðu\", \"Eyl\", \"Eki\", \"Kas\", \"Ara\"],\r\n\t\tday_full: [\"Pazar\", \"Pazartes,\", \"Salý\", \"Çarþamba\", \"Perþembe\", \"Cuma\", \"Cumartesi\"],\r\n\t\tday_short: [\"Paz\", \"Pts\", \"Sal\", \"Çar\", \"Per\", \"Cum\", \"Cts\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Bugün\",\r\n\t\tday_tab: \"Gün\",\r\n\t\tweek_tab: \"Hafta\",\r\n\t\tmonth_tab: \"Ay\",\r\n\t\tnew_event: \"Uygun\",\r\n\t\ticon_save: \"Kaydet\",\r\n\t\ticon_cancel: \"Ýptal\",\r\n\t\ticon_details: \"Detaylar\",\r\n\t\ticon_edit: \"Düzenle\",\r\n\t\ticon_delete: \"Sil\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Etkinlik silinecek, devam?\",\r\n\t\tsection_description: \"Açýklama\",\r\n\t\tsection_time: \"Zaman aralýðý\",\r\n\t\tfull_day: \"Tam gün\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Tüm tekrar eden etkinlikler silinecek, devam?\",\r\n\t\tsection_recurring: \"Etkinliði tekrarla\",\r\n\t\tbutton_recurring: \"Pasif\",\r\n\t\tbutton_recurring_open: \"Aktif\",\r\n\t\tbutton_edit_series: \"Dizi düzenleme\",\r\n\t\tbutton_edit_occurrence: \"Bir kopyasını düzenleyin\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Ajanda\",\r\n\t\tdate: \"Tarih\",\r\n\t\tdescription: \"Açýklama\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Yýl\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Ajanda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Izgara\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Січень\", \"Лютий\", \"Березень\", \"Квітень\", \"Травень\", \"Червень\", \"Липень\", \"Серпень\", \"Вересень\", \"Жовтень\", \"Листопад\", \"Грудень\"],\r\n\t\tmonth_short: [\"Січ\", \"Лют\", \"Бер\", \"Кві\", \"Тра\", \"Чер\", \"Лип\", \"Сер\", \"Вер\", \"Жов\", \"Лис\", \"Гру\"],\r\n\t\tday_full: [\"Неділя\", \"Понеділок\", \"Вівторок\", \"Середа\", \"Четвер\", \"П'ятниця\", \"Субота\"],\r\n\t\tday_short: [\"Нед\", \"Пон\", \"Вів\", \"Сер\", \"Чет\", \"Птн\", \"Суб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сьогодні\",\r\n\t\tday_tab: \"День\",\r\n\t\tweek_tab: \"Тиждень\",\r\n\t\tmonth_tab: \"Місяць\",\r\n\t\tnew_event: \"Нова подія\",\r\n\t\ticon_save: \"Зберегти\",\r\n\t\ticon_cancel: \"Відміна\",\r\n\t\ticon_details: \"Деталі\",\r\n\t\ticon_edit: \"Редагувати\",\r\n\t\ticon_delete: \"Вилучити\",\r\n\t\tconfirm_closing: \"\", //Ваші зміни втратяться. Ви впевнені ?\r\n\t\tconfirm_deleting: \"Подія вилучиться назавжди. Ви впевнені?\",\r\n\t\tsection_description: \"Опис\",\r\n\t\tsection_time: \"Часовий проміжок\",\r\n\t\tfull_day: \"Весь день\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Хочете редагувати весь перелік повторюваних подій?\",\r\n\t\tsection_recurring: \"Повторювана подія\",\r\n\t\tbutton_recurring: \"Відключено\",\r\n\t\tbutton_recurring_open: \"Включено\",\r\n\t\tbutton_edit_series: \"Редагувати серію\",\r\n\t\tbutton_edit_occurrence: \"Редагувати примірник\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Перелік\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Опис\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Рік\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Перелік\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Таблиця\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"День\",\r\n\t\trepeat_radio_week: \"Тиждень\",\r\n\t\trepeat_radio_month: \"Місяць\",\r\n\t\trepeat_radio_year: \"Рік\",\r\n\t\trepeat_radio_day_type: \"Кожний\",\r\n\t\trepeat_text_day_count: \"день\",\r\n\t\trepeat_radio_day_type2: \"Кожний робочий день\",\r\n\t\trepeat_week: \" Повторювати кожен\",\r\n\t\trepeat_text_week_count: \"тиждень , по:\",\r\n\t\trepeat_radio_month_type: \"Повторювати\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" числа кожний \",\r\n\t\trepeat_text_month_count: \"місяць\",\r\n\t\trepeat_text_month_count2_before: \"кожен \",\r\n\t\trepeat_text_month_count2_after: \"місяць\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"день\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без дати закінчення\",\r\n\t\trepeat_text_occurences_count: \"повторень\",\r\n\t\trepeat_radio_end3: \"До \",\r\n\t\trepeat_radio_end2: \"\",\r\n\t\tmonth_for_recurring: [\"січня\", \"лютого\", \"березня\", \"квітня\", \"травня\", \"червня\", \"липня\", \"серпня\", \"вересня\", \"жовтня\", \"листопада\", \"грудня\"],\r\n\t\tday_for_recurring: [\"Неділям\", \"Понеділкам\", \"Вівторкам\", \"Середам\", \"Четвергам\", \"П'ятницям\", \"Суботам\"]\r\n\t}\r\n};\r\n","import ar from \"./locale_ar\";\r\nimport be from \"./locale_be\";\r\nimport ca from \"./locale_ca\";\r\nimport cn from \"./locale_cn\";\r\nimport cs from \"./locale_cs\";\r\nimport da from \"./locale_da\";\r\nimport de from \"./locale_de\";\r\nimport el from \"./locale_el\";\r\nimport en from \"./locale_en\";\r\nimport es from \"./locale_es\";\r\nimport fi from \"./locale_fi\";\r\nimport fr from \"./locale_fr\";\r\nimport he from \"./locale_he\";\r\nimport hu from \"./locale_hu\";\r\nimport id from \"./locale_id\";\r\nimport it from \"./locale_it\";\r\nimport jp from \"./locale_jp\";\r\n\r\nimport LocaleManager from \"./locale_manager\";\r\n\r\nimport nb from \"./locale_nb\";\r\nimport nl from \"./locale_nl\";\r\nimport no from \"./locale_no\";\r\nimport pl from \"./locale_pl\";\r\nimport pt from \"./locale_pt\";\r\nimport ro from \"./locale_ro\";\r\nimport ru from \"./locale_ru\";\r\nimport si from \"./locale_si\";\r\nimport sk from \"./locale_sk\";\r\nimport sv from \"./locale_sv\";\r\nimport tr from \"./locale_tr\";\r\nimport ua from \"./locale_ua\";\r\n\r\nexport default function(){\r\n\treturn new LocaleManager({\r\n\t\ten,\r\n\t\tar,\r\n\t\tbe,\r\n\t\tca,\r\n\t\tcn,\r\n\t\tcs,\r\n\t\tda,\r\n\t\tde,\r\n\t\tel,\r\n\t\tes,\r\n\t\tfi,\r\n\t\tfr,\r\n\t\the,\r\n\t\thu,\r\n\t\tid,\r\n\t\tit,\r\n\t\tjp,\r\n\t\tnb,\r\n\t\tnl,\r\n\t\tno,\r\n\t\tpl,\r\n\t\tpt,\r\n\t\tro,\r\n\t\tru,\r\n\t\tsi,\r\n\t\tsk,\r\n\t\tsv,\r\n\t\ttr,\r\n\t\tua\r\n\t});\r\n}","import eventable from \"../utils/eventable\";\r\n\r\nexport class DatePicker {\r\n\tconstructor(scheduler, container, state = {}) {\r\n\t\tthis.state = {\r\n\t\t\tdate: new Date(),\r\n\t\t\tmodes: ['days', 'months', 'years'],\r\n\t\t\tcurrentRange: [],\r\n\t\t\teventDates: [],\r\n\t\t\tcurrentModeIndex: 0,\r\n\t\t\t...state\r\n\t\t};\r\n\t\tthis.container = null;\r\n\t\tthis.element = null;\r\n\t\tthis.onStateChangeHandlers = [];\r\n\t\tthis.scheduler = scheduler;\r\n\t\tthis._domEvents = scheduler._createDomEventScope();\r\n\t\tthis.state = this.getState();\r\n\t\teventable(this);\r\n\t\tif(container){\r\n\r\n\t\t\tthis.container = container;\r\n\t\t\tthis.render(this.container);\r\n\t\t}\r\n\r\n\t\tthis.onStateChange((oldState, newState) => {\r\n\t\t\tthis.callEvent(\"onStateChange\", [newState, oldState]);\r\n\t\t});\r\n\t}\r\n\r\n\tgetState() {\r\n\t\treturn { \r\n\t\t\t...this.state,\r\n\t\t\tmode: this.state.modes[this.state.currentModeIndex]\r\n\t\t};\r\n\t}\r\n\r\n\tsetState(newState) {\r\n\t\tconst oldState = { ...this.state };\r\n\t\tif(newState.mode){\r\n\t\t\tnewState.currentModeIndex = this.state.modes.indexOf(newState.mode);\r\n\t\t}\r\n\t\tthis.state = { ...this.state, ...newState };\r\n\r\n\t\tthis._notifyStateChange(oldState, this.state);\r\n\r\n\t\tif (this.container) {\r\n\t\t\tthis.render(this.container);\r\n\t\t}\r\n\t}\r\n\r\n\tonStateChange(handler) {\r\n\t\tthis.onStateChangeHandlers.push(handler);\r\n\r\n\t\t// function to remove the handler\r\n\t\treturn () => {\r\n\t\t\tconst index = this.onStateChangeHandlers.indexOf(handler);\r\n\t\t\tif (index !== -1) {\r\n\t\t\t\tthis.onStateChangeHandlers.splice(index, 1);\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n\r\n\t_notifyStateChange(oldState, newState) {\r\n\t\tthis.onStateChangeHandlers.forEach(handler => handler(oldState, newState));\r\n\t}\r\n\r\n\t_adjustDate(direction) {\r\n\r\n\t\tconst {mode, date} = this.getState();\r\n\t\tconst newDate = new Date(date);\r\n\t\tif (mode === 'days') {\r\n\t\t\tnewDate.setMonth(date.getMonth() + direction);\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tnewDate.setFullYear(date.getFullYear() + direction);\r\n\t\t} else {\r\n\t\t\tnewDate.setFullYear(date.getFullYear() + direction * 10);\r\n\t\t}\r\n\t\tthis.setState({ date: newDate });\r\n\t}\r\n\r\n\t_toggleMode() {\r\n\t\tconst newIndex = (this.state.currentModeIndex + 1) % this.state.modes.length;\r\n\t\tthis.setState({ currentModeIndex: newIndex });\r\n\t}\r\n\r\n\t_renderCalendarHeader(container) {\r\n\t\tconst {mode, date} = this.getState();\r\n\r\n\t\tconst header = document.createElement('div');\r\n\t\theader.classList.add('dhx_cal_datepicker_header');\r\n\r\n\t\tconst backwardArrow = document.createElement('button');\r\n\r\n\t\tbackwardArrow.classList.add(\"dhx_cal_datepicker_arrow\", \"scheduler_icon\", \"arrow_left\");\r\n\t\theader.appendChild(backwardArrow);\r\n\r\n\t\tconst monthLabel = document.createElement('div');\r\n\t\tmonthLabel.classList.add('dhx_cal_datepicker_title');\r\n\r\n\t\tif (mode === 'days') {\r\n\t\t\tmonthLabel.innerText = date.toLocaleString('default', { month: 'long' }) + ' ' + date.getFullYear();\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tmonthLabel.innerText = date.getFullYear();\r\n\t\t} else {\r\n\t\t\tconst startYear = Math.floor(date.getFullYear() / 10) * 10;\r\n\t\t\tmonthLabel.innerText = `${startYear} - ${startYear + 9}`;\r\n\t\t}\r\n\r\n\t\tthis._domEvents.attach(monthLabel, \"click\", this._toggleMode.bind(this));\r\n\t\theader.appendChild(monthLabel);\r\n\r\n\t\tconst forwardArrow = document.createElement('button');\r\n\r\n\t\tforwardArrow.classList.add(\"dhx_cal_datepicker_arrow\", \"scheduler_icon\", \"arrow_right\");\r\n\t\theader.appendChild(forwardArrow);\r\n\r\n\t\tcontainer.appendChild(header);\r\n\r\n\t\tthis._domEvents.attach(backwardArrow, \"click\", this._adjustDate.bind(this, -1));\r\n\t\tthis._domEvents.attach(forwardArrow, \"click\", this._adjustDate.bind(this, 1));\r\n\t}\r\n\r\n\trender(container) {\r\n\t\tthis._domEvents.detachAll();\r\n\t\tthis.container = container || this.container; \r\n\t\tthis.container.innerHTML = '';\r\n\r\n\t\tif(!this.element){\r\n\t\t\tthis.element = document.createElement(\"div\");\r\n\t\t\tthis.element.classList.add(\"dhx_cal_datepicker\");\r\n\t\t}\r\n\t\tthis.element.innerHTML = '';\r\n\t\tthis.container.appendChild(this.element);\r\n\r\n\t\tthis._renderCalendarHeader(this.element);\r\n\t\tconst dataContainer = document.createElement(\"div\");\r\n\t\tdataContainer.classList.add(\"dhx_cal_datepicker_data\");\r\n\t\tthis.element.appendChild(dataContainer);\r\n\r\n\t\tconst {mode} = this.getState();\r\n\t\tif (mode === 'days') {\r\n\t\t\tthis._renderDayGrid(dataContainer);\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tthis._renderMonthGrid(dataContainer);\r\n\t\t} else {\r\n\t\t\tthis._renderYearGrid(dataContainer);\r\n\t\t}\r\n\t}\r\n\r\n\t_renderDayGridHeader(daysOfWeekContainer) {\r\n\t\tconst {date} = this.getState();\r\n\t\tconst scheduler = this.scheduler;\r\n\r\n\t\tlet currentDate = scheduler.date.week_start(new Date(date));\r\n\t\tconst maxDate = scheduler.date.add(scheduler.date.week_start(new Date(date)), 1, 'week');\r\n\r\n\t\tdaysOfWeekContainer.classList.add('dhx_cal_datepicker_days');\r\n\r\n\t\tconst labelFormat = scheduler.date.date_to_str(\"%D\");\r\n\r\n\t\twhile (currentDate.valueOf() < maxDate.valueOf()) {\r\n\t\t\tconst label = labelFormat(currentDate);\r\n\r\n\t\t\tconst dayElement = document.createElement('div');\r\n\t\t\tdayElement.setAttribute(\"data-day\", currentDate.getDay());\r\n\t\t\tdayElement.classList.add('dhx_cal_datepicker_dayname');\r\n\t\t\tdayElement.innerText = label;\r\n\t\t\tdaysOfWeekContainer.appendChild(dayElement);\r\n\r\n\t\t\tcurrentDate = scheduler.date.add(currentDate, 1, 'day');\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t_weeksBetween(min, max) {\r\n\t\tconst scheduler = this.scheduler;\r\n\t\tlet weeks = 0;\r\n\t\tlet currWeek = new Date(min);\r\n\t\twhile(currWeek.valueOf() < max.valueOf()){\r\n\t\t\tweeks += 1;\r\n\t\t\tcurrWeek = scheduler.date.week_start(scheduler.date.add(currWeek, 1, \"week\"));\r\n\t\t}\r\n\t\treturn weeks;\r\n\t}\r\n\r\n\t_renderDayGrid(container) {\r\n\t\tconst {date, currentRange, eventDates, minWeeks} = this.getState();\r\n\r\n\t\tlet minSchedulerDate = currentRange[0];\r\n\t\tlet maxSchedulerDate = currentRange[1];\r\n\r\n\t\tconst eventDaysTable = eventDates.reduce((acc, date) => {\r\n\t\t\tconst dayStart = this.scheduler.date.day_start(new Date(date));\r\n\t\t\tacc[dayStart.valueOf()] = true;\r\n\t\t\treturn acc;\r\n\t\t}, {});\r\n\r\n\r\n\t\t// Render Days of the Week\r\n\t\tconst daysOfWeekContainer = document.createElement('div');\r\n\t\tthis._renderDayGridHeader(daysOfWeekContainer);\r\n\t\tcontainer.appendChild(daysOfWeekContainer);\r\n\r\n\t\tconst scheduler = this.scheduler;\r\n\t\tconst firstDate = scheduler.date.week_start(scheduler.date.month_start(new Date(date)));\r\n\t\tconst monthStart = scheduler.date.month_start(new Date(date));\r\n\t\tconst monthEnd = scheduler.date.add(scheduler.date.month_start(new Date(date)), 1, 'month');\r\n\t\tlet lastDate = scheduler.date.add(scheduler.date.month_start(new Date(date)), 1, 'month');\r\n\t\tif(lastDate.getDay() !== 0){\r\n\t\t\tlastDate = scheduler.date.add(scheduler.date.week_start(lastDate), 1, \"week\");\r\n\t\t}\r\n\r\n\t\tlet weeks = this._weeksBetween(firstDate, lastDate);\r\n\t\tif(minWeeks && weeks < minWeeks){\r\n\t\t\tlastDate = scheduler.date.add(lastDate, (minWeeks - weeks), \"week\");\r\n\t\t}\r\n\r\n\t\tlet currDate = firstDate;\r\n\r\n\t\tconst dayGridContainer = document.createElement('div');\r\n\t\tdayGridContainer.classList.add('dhx_cal_datepicker_days');\r\n\r\n\t\tthis._domEvents.attach(dayGridContainer, \"click\", (event) => {\r\n\t\t\tconst dateCell = event.target.closest(\"[data-cell-date]\");\r\n\t\t\tconst date = new Date(dateCell.getAttribute(\"data-cell-date\"));\r\n\t\t\tthis.callEvent(\"onDateClick\", [date, event]);\r\n\t\t});\r\n\r\n\t\twhile(currDate.valueOf() < lastDate.valueOf()){\r\n\t\t\tconst dayElement = document.createElement('div');\r\n\t\t\tdayElement.setAttribute(\"data-cell-date\", scheduler.templates.format_date(currDate));\r\n\t\t\tdayElement.setAttribute(\"data-day\", currDate.getDay());\r\n\t\t\tdayElement.innerHTML = currDate.getDate();\r\n\r\n\t\t\tif(currDate.valueOf() < monthStart.valueOf()){\r\n\t\t\t\tdayElement.classList.add('dhx_before');\r\n\t\t\t}else if(currDate.valueOf() >= monthEnd.valueOf()){\t\r\n\t\t\t\tdayElement.classList.add('dhx_after');\r\n\t\t\t}\r\n\r\n\t\t\tif(currDate.getDay() === 0 || currDate.getDay() === 6){\r\n\t\t\t\tdayElement.classList.add(\"dhx_cal_datepicker_weekend\");\r\n\t\t\t}\r\n\r\n\t\t\tif(minSchedulerDate && maxSchedulerDate){\r\n\t\t\t\tif(currDate.valueOf() >= minSchedulerDate.valueOf() && currDate.valueOf() < maxSchedulerDate.valueOf()){\r\n\t\t\t\t\tdayElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(eventDaysTable[currDate.valueOf()]){\r\n\t\t\t\tdayElement.classList.add('dhx_cal_datepicker_event');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdayElement.classList.add('dhx_cal_datepicker_date');\r\n\r\n\t\t\tdayGridContainer.appendChild(dayElement);\r\n\t\t\tcurrDate = scheduler.date.add(currDate, 1, 'day');\r\n\t\t}\r\n\r\n\t\tcontainer.appendChild(dayGridContainer);\r\n\r\n\t}\r\n\r\n\t_renderMonthGrid(container) {\r\n\t\tconst {date} = this.getState();\r\n\r\n\t\tconst wrapper = document.createElement('div');\r\n\t\twrapper.classList.add(\"dhx_cal_datepicker_months\");\r\n\r\n\t\tconst months = [];\r\n\t\tfor(let i = 0; i < 12; i++){\r\n\t\t\tmonths.push(new Date(date.getFullYear(), i, 1));\r\n\t\t}\r\n\r\n\t\tconst formatLabel = this.scheduler.date.date_to_str(\"%M\");\r\n\t\tmonths.forEach(month => {\r\n\t\t\tconst monthElement = document.createElement('div');\r\n\t\t\tmonthElement.classList.add('dhx_cal_datepicker_month');\r\n\t\t\tif(date.getMonth() === month.getMonth()){\r\n\t\t\t\tmonthElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t}\r\n\t\t\tmonthElement.setAttribute(\"data-month\", month.getMonth());\r\n\t\t\tmonthElement.innerHTML = formatLabel(month);\r\n\t\t\tthis._domEvents.attach(monthElement, \"click\", () => {\r\n\t\t\t\tconst newDate = new Date(month);\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\tdate: newDate,\r\n\t\t\t\t\tmode: 'days'\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\twrapper.appendChild(monthElement);\r\n\t\t});\r\n\t\tcontainer.appendChild(wrapper);\r\n\r\n\t\tconst doneArea = document.createElement(\"div\");\r\n\t\tdoneArea.classList.add(\"dhx_cal_datepicker_done\");\r\n\t\tconst doneBtn = document.createElement(\"button\");\r\n\t\tdoneBtn.innerText = \"Done\";\r\n\t\tdoneBtn.classList.add(\"dhx_cal_datepicker_done_btn\");\r\n\t\tthis._domEvents.attach(doneBtn, \"click\", () => {\r\n\t\t\tthis.setState({\r\n\t\t\t\tmode: 'days'\r\n\t\t\t});\r\n\t\t});\r\n\t\tdoneArea.appendChild(doneBtn);\r\n\t\tcontainer.appendChild(doneArea);\r\n\t}\r\n\r\n\t_renderYearGrid(container) {\r\n\t\tconst {date} = this.getState();\r\n\t\tconst startYear = Math.floor(date.getFullYear() / 10) * 10;\r\n\t\t\r\n\t\tconst wrapper = document.createElement('div');\r\n\t\twrapper.classList.add(\"dhx_cal_datepicker_years\");\r\n\t\tfor (let i = startYear - 1; i <= startYear + 10; i++) {\r\n\t\t\tconst yearElement = document.createElement('div');\r\n\t\t\tyearElement.innerText = i;\r\n\t\t\tyearElement.classList.add('dhx_cal_datepicker_year');\r\n\t\t\tyearElement.setAttribute(\"data-year\", i);\r\n\t\t\tif(date.getFullYear() === i){\r\n\t\t\t\tyearElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t}\r\n\t\t\tthis._domEvents.attach(yearElement, \"click\", () => {\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\tdate: new Date(i, date.getMonth(), 1),\r\n\t\t\t\t\tmode: 'months'\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\twrapper.appendChild(yearElement);\r\n\t\t\t\r\n\t\t}\r\n\t\tcontainer.appendChild(wrapper);\r\n\r\n\t\tconst doneArea = document.createElement(\"div\");\r\n\t\tdoneArea.classList.add(\"dhx_cal_datepicker_done\");\r\n\t\tconst doneBtn = document.createElement(\"button\");\r\n\t\tdoneBtn.innerText = \"Done\";\r\n\t\tdoneBtn.classList.add(\"dhx_cal_datepicker_done_btn\");\r\n\t\tthis._domEvents.attach(doneBtn, \"click\", () => {\r\n\t\t\tthis.setState({\r\n\t\t\t\tmode: 'months'\r\n\t\t\t});\r\n\t\t});\r\n\t\tdoneArea.appendChild(doneBtn);\r\n\t\tcontainer.appendChild(doneArea);\r\n\t}\r\n\r\n\tdestructor(){\r\n\t\tthis.onStateChangeHandlers = [];\r\n\t\tif(this.element){\r\n\t\t\tthis.element.innerHTML = '';\r\n\t\t\tthis.element.remove();\r\n\t\t}\r\n\r\n\t\tthis._domEvents.detachAll();\r\n\t\tthis.callEvent(\"onDestroy\", []);\r\n\t\tthis.detachAllEvents();\r\n\r\n\t\tthis.scheduler = null;\r\n\t}\r\n}","// import \"./css/dhtmlxscheduler_terrace\";\r\n// import \"./css/dhtmlxscheduler_material\";\r\n// import \"./css/dhtmlxscheduler_material_nofont\";\r\n// import \"./css/dhtmlxscheduler_flat\";\r\n// import \"./css/dhtmlxscheduler_contrast_black\";\r\n// import \"./css/dhtmlxscheduler_contrast_white\";\r\n\r\n\r\nimport assert from \"./core/common/assert\";\r\nimport common_errors from \"./core/common_errors\";\r\nimport connector from \"./core/connector\";\r\nimport schedulerCore from \"./core/scheduler\";\r\nimport common from \"./core/common\";\r\nimport wai_aria from \"./core/wai_aria\";\r\nimport utils from \"./core/utils/utils\";\r\nimport dom_helpers from \"./core/utils/dom_helpers\";\r\nimport env from \"./utils/env\";\r\nimport destructor from \"./core/destructor\";\r\nimport ajax from \"./core/utils/ajax\";\r\nimport base from \"./core/base\";\r\nimport config from \"./core/config\";\r\nimport event from \"./core/event\";\r\nimport event_highlight from \"./core/event_highlight\";\r\nimport load from \"./core/load\";\r\nimport lightbox from \"./core/lightbox\";\r\nimport touch from \"./core/touch\";\r\nimport dhtmlx_suite_hooks from \"./core/dhtmlx/dhtmlx_suite_hooks\";\r\nimport skins from \"./core/skins\";\r\nimport jquery from \"./core/jquery\";\r\nimport delay_render from \"./core/delay_render\";\r\nimport dataProcessorExtend from \"./core/dataprocessor/dataprocessor\";\r\nimport message from \"./core/message\";\r\nimport i18nFactory from \"./locale\";\r\n\r\nimport voidFirst from \"./publish_helpers/void_script_first\";\r\nimport voidSecond from \"./publish_helpers/void_script_second\";\r\nimport voidThird from \"./publish_helpers/void_script_third\";\r\n\r\n//import datepickerHeader from \"./core/clickable_header\";\r\n\r\nimport { DatePicker } from \"./core/datepicker\";\r\n\r\nexport default function(extensionManager) {\r\n\r\n\tconst scheduler = { version: VERSION };\r\n\t\r\n\tcommon_errors(scheduler);\r\n\tcommon(scheduler);\r\n\tschedulerCore(scheduler);\r\n\twai_aria(scheduler);\r\n\t//utils(scheduler);\r\n\r\n\tscheduler.utils = utils;\r\n\tscheduler.$domHelpers = dom_helpers;\r\n\tscheduler.utils.dom = dom_helpers;\r\n\tscheduler.uid = utils.uid;\r\n\tscheduler.mixin = utils.mixin;\r\n\tscheduler.defined = utils.defined;\r\n\tscheduler.assert = assert(scheduler);\r\n\tscheduler.copy = utils.copy;\r\n\r\n\tscheduler._createDatePicker = function(container, config){\r\n\t\treturn new DatePicker(scheduler, container, config);\r\n\t};\r\n\r\n\t//datepickerHeader(scheduler);\r\n\r\n\r\n\t//old api compatibility\r\n\tscheduler._getFocusableNodes = dom_helpers.getFocusableNodes;\r\n\tscheduler._getClassName = dom_helpers.getClassName;\r\n\tscheduler._locate_css = dom_helpers.locateCss;\r\n\r\n\tconst messageApi = message(scheduler);\r\n\tscheduler.utils.mixin(scheduler, messageApi);\r\n\r\n\tscheduler.env = scheduler.$env = env;\r\n\tscheduler.Promise = window.Promise;\r\n\tdestructor(scheduler);\r\n\tajax(scheduler);\r\n\tvoidFirst(scheduler);\r\n\tbase(scheduler);\r\n\tconfig(scheduler);\r\n\tevent(scheduler);\r\n\tevent_highlight(scheduler);\r\n\tload(scheduler);\r\n\tlightbox(scheduler);\r\n\ttouch(scheduler);\r\n\tdhtmlx_suite_hooks(scheduler);\r\n\tvoidSecond(scheduler);\r\n\tskins(scheduler);\r\n\tjquery(scheduler);\r\n\tdelay_render(scheduler);\r\n\tdataProcessorExtend(scheduler);\r\n\tvoidThird(scheduler);\r\n\tconnector(scheduler);\r\n\tconst i18n = i18nFactory();\r\n\tscheduler.i18n = {\r\n\t\taddLocale: i18n.addLocale,\r\n\t\tsetLocale: function(locale){\r\n\t\t\tif(typeof locale === \"string\"){\r\n\t\t\t\tvar localeObject = i18n.getLocale(locale);\r\n\t\t\t\tif(!localeObject){\r\n\t\t\t\t\tlocaleObject = i18n.getLocale(\"en\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler.locale = localeObject;\r\n\t\t\t}else if(locale){\r\n\t\t\t\tif(!scheduler.locale){\r\n\t\t\t\t\tscheduler.locale = locale;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfor(var i in locale){\r\n\t\t\t\t\t\tif(locale[i] && typeof locale[i] === \"object\"){\r\n\t\t\t\t\t\t\tif(!scheduler.locale[i]){\r\n\t\t\t\t\t\t\t\tscheduler.locale[i] = {};\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tscheduler.mixin(scheduler.locale[i], locale[i], true);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tscheduler.locale[i] = locale[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar labels = scheduler.locale.labels;\r\n\t\t\tlabels.dhx_save_btn \t= labels.icon_save;\r\n\t\t\tlabels.dhx_cancel_btn \t= labels.icon_cancel;\r\n\t\t\tlabels.dhx_delete_btn \t= labels.icon_delete;\r\n\r\n\t\t\tif(scheduler.$container){\r\n\t\t\t\tscheduler.get_elements();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t},\r\n\t\tgetLocale: i18n.getLocale\r\n\t};\r\n\tscheduler.i18n.setLocale(\"en\");\r\n\r\n\tscheduler.ext = {};\r\n\r\n\tconst activePlugins = {};\r\n\tscheduler.plugins = function(config){\r\n\t\tconst extensionList = getExtensionList(config, {\r\n\t\t\t\ttreetimeline: [\"timeline\"],\r\n\t\t\t\tdaytimeline: [\"timeline\"],\r\n\t\t\t\touterdrag: [\"legacy\"]\r\n\t\t\t}, {\r\n\t\t\t\tlegacy: 1,\r\n\t\t\t\tlimit: 1,\r\n\t\t\t\ttimeline: 2,\r\n\t\t\t\tdaytimeline: 3,\r\n\t\t\t\ttreetimeline: 3,\r\n\t\t\t\touterdrag:6\r\n\t\t\t});\r\n\r\n\t\textensionList.forEach(function(name){\r\n\t\t\tif(!activePlugins[name]){\r\n\t\t\t\tconst plugin = extensionManager.getExtension(name);\r\n\t\t\t\tif(plugin){\r\n\t\t\t\t\tplugin(scheduler);\r\n\t\t\t\t\tactivePlugins[name] = true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthrow new Error(\"unknown plugin \" + name);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t};\r\n\r\n\tfunction getExtensionList(config, dependencies, priorities){\r\n\t\tconst result = [];\r\n\r\n\t\tfor(const i in config){\r\n\t\t\tif(config[i]){\r\n\t\t\t\tconst extension = i.toLowerCase();\r\n\t\t\t\tif(dependencies[extension]){\r\n\t\t\t\t\tdependencies[extension].forEach(function(dep){\r\n\t\t\t\t\t\tconst dependencyName = dep.toLowerCase();\r\n\t\t\t\t\t\tif(!config[dependencyName]){\r\n\t\t\t\t\t\t\tresult.push(dependencyName);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\tresult.push(extension);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tresult.sort(function(a, b){\r\n\t\t\tconst orderA = priorities[a] || 0;\r\n\t\t\tconst orderB = priorities[b] || 0;\r\n\t\t\tif(orderA > orderB){\r\n\t\t\t\treturn 1;\r\n\t\t\t}else if(orderA < orderB){\r\n\t\t\t\treturn -1;\r\n\t\t\t}else{\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\treturn scheduler;\r\n\r\n}","export default class ExtensionsManager{\r\n\tconstructor(config){\r\n\t\tthis._extensions = {};\r\n\t\tfor(const i in config){\r\n\t\t\tthis._extensions[i] = config[i];\r\n\t\t}\r\n\t}\r\n\r\n\taddExtension(name, ext) {\r\n\t\tthis._extensions[name] = ext;\r\n\t}\r\n\r\n\tgetExtension(name) {\r\n\t\treturn this._extensions[name];\r\n\t}\r\n}","\r\n\r\nimport dhtmlxHook from \"./dhtmlx_hook\";\r\nimport \"./css/theme.less\";\r\ndhtmlxHook();\r\n\r\nimport global from \"./global\";\r\n\r\nimport factoryMethod from \"./scheduler_factory_method\";\r\nimport ExtensionsManager from \"./ext/extension_manager\";\r\n\r\nclass SchedulerFactory {\r\n\r\n\tconstructor (extensions) {\r\n\t\tthis._seed = 0;\r\n\t\tthis._schedulerPlugins = [];\r\n\t\tthis._bundledExtensions = extensions;\r\n\t\tthis._extensionsManager = new ExtensionsManager(extensions);\r\n\t}\r\n\r\n\tplugin(code) {\r\n\t\tthis._schedulerPlugins.push(code);\r\n\r\n\t\tif(global.scheduler){\r\n\t\t\tcode(global.scheduler);\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetSchedulerInstance(initConfig) {\r\n\t\tvar scheduler = factoryMethod(this._extensionsManager);\r\n\r\n\t\tfor (var i = 0; i < this._schedulerPlugins.length; i++) {\r\n\t\t\tthis._schedulerPlugins[i](scheduler);\r\n\t\t}\r\n\t\tscheduler._internal_id = this._seed++;\r\n\t\r\n\t\tif (this.$syncFactory){\r\n\t\t\tthis.$syncFactory(scheduler);\r\n\t\t}\r\n\r\n\t\tif(initConfig){\r\n\t\t\tthis._initFromConfig(scheduler, initConfig);\r\n\t\t}\r\n\r\n\t\treturn scheduler;\r\n\t}\r\n\r\n\t_initFromConfig(scheduler, initConfig){\r\n\t\tif(initConfig.plugins){\r\n\t\t\tscheduler.plugins(initConfig.plugins);\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.config){\r\n\t\t\tscheduler.mixin(scheduler.config, initConfig.config, true);\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.templates){\r\n\t\t\tscheduler.attachEvent(\"onTemplatesReady\", function(){\r\n\t\t\t\tscheduler.mixin(scheduler.templates, initConfig.templates, true);\r\n\t\t\t}, {once: true});\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.events){\r\n\t\t\tfor(const event in initConfig.events){\r\n\t\t\t\tscheduler.attachEvent(event, initConfig.events[event]);\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.locale){\r\n\t\t\tscheduler.i18n.setLocale(initConfig.locale);\r\n\t\t}\r\n\t\r\n\t\tif(Array.isArray(initConfig.calendars)){\r\n\t\t\tinitConfig.calendars.forEach(function(calendar){\r\n\t\t\t\tscheduler.addCalendar(calendar);\r\n\t\t\t});\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.container){\r\n\t\t\tscheduler.init(initConfig.container);\r\n\t\t} else {\r\n\t\t\tscheduler.init();\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.data){\r\n\t\t\tif(typeof initConfig.data === \"string\"){\r\n\t\t\t\tscheduler.load(initConfig.data);\r\n\t\t\t}else{\r\n\t\t\t\tscheduler.parse(initConfig.data);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\r\n}\r\n\r\nexport default SchedulerFactory;","export default function(scheduler){\r\n\r\nscheduler.config.active_link_view = \"day\";\r\nscheduler._active_link_click = function(e){\r\n\tvar start = e.target;\r\n\tvar to = start.getAttribute(\"data-link-date\");\r\n\tvar s_d = scheduler.date.str_to_date(scheduler.config.api_date, false, true);\r\n\tif (to) {\r\n\t\tscheduler.setCurrentView(s_d(to), scheduler.config.active_link_view);\r\n\t\tif (e && e.preventDefault)\r\n\t\t\te.preventDefault();\r\n\t\treturn false;\r\n\t}\r\n};\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar do_wrapper = function(key, fullname){\r\n\t\tfullname = fullname || (key+\"_scale_date\");\r\n\r\n\t\tif(!scheduler.templates['_active_links_old_'+ fullname]){\r\n\t\t\tscheduler.templates['_active_links_old_'+ fullname] = scheduler.templates[fullname];\r\n\t\t}\r\n\t\tvar week_x = scheduler.templates['_active_links_old_'+ fullname];\r\n\t\tvar d_s = scheduler.date.date_to_str(scheduler.config.api_date);\r\n\t\tscheduler.templates[fullname] = function(date) {\r\n\t\t\treturn \"\" + week_x(date) + \"\";\r\n\t\t};\r\n\t};\r\n\r\n\tdo_wrapper(\"week\");\r\n\tdo_wrapper(\"\", \"month_day\");\r\n\tif (this.matrix){\r\n\t\tfor (var key in this.matrix)\r\n\t\t\tdo_wrapper(key);\r\n\t}\r\n\r\n\tthis._detachDomEvent(this._obj, \"click\", scheduler._active_link_click);\r\n\tscheduler.event(this._obj, \"click\", scheduler._active_link_click);\r\n});\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.date.add_agenda_legacy = function(date){\r\n\treturn scheduler.date.add(date, 1, \"year\");\r\n};\r\n\r\nscheduler.templates.agenda_legacy_time = function(start,end,ev){\r\n\tif (ev._timed)\r\n\t\treturn this.day_date(ev.start_date, ev.end_date, ev)+\" \"+this.event_date(start);\r\n\telse\r\n\t\treturn scheduler.templates.day_date(start)+\" – \"+scheduler.templates.day_date(end);\r\n};\r\nscheduler.templates.agenda_legacy_text = function(start,end,event){\r\n\treturn event.text;\r\n};\r\nscheduler.templates.agenda_legacy_date = function(){ return \"\"; };\r\n\r\nscheduler.date.agenda_legacy_start=function(){ return scheduler.date.date_part(scheduler._currentDate()); };\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function() {\r\n\tvar old_dblclick_dhx_cal_data = scheduler.dblclick_dhx_cal_data;\r\n\tscheduler.dblclick_dhx_cal_data = function() {\r\n\t\tif (this._mode == \"agenda_legacy\") {\r\n\t\t\tif (!this.config.readonly && this.config.dblclick_create)\r\n\t\t\t\tthis.addEventNow();\r\n\t\t} else {\r\n\t\t\tif (old_dblclick_dhx_cal_data)\r\n\t\t\t\treturn old_dblclick_dhx_cal_data.apply(this, arguments);\r\n\t\t}\r\n\t};\r\n\r\n\r\n\tvar old = scheduler.render_data;\r\n\tscheduler.render_data=function(evs){\r\n\t\tif (this._mode == \"agenda_legacy\")\r\n\t\t\tfill_agenda_tab();\r\n\t\telse\r\n\t\t\treturn old.apply(this,arguments);\r\n\t};\r\n\r\n\tvar old_render_view_data = scheduler.render_view_data;\r\n\tscheduler.render_view_data = function(){\r\n\t\tif(this._mode == \"agenda_legacy\") {\r\n\t\t\tscheduler._agendaScrollTop = scheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop;\r\n\t\t\tscheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop = 0;\r\n\t\t}\r\n\t\treturn old_render_view_data.apply(this,arguments);\r\n\t};\r\n\r\n\r\n\r\n\tfunction set_full_view(mode){\r\n\t\tif (mode){\r\n\t\t\tvar l = scheduler.locale.labels;\r\n\r\n\t\t\tvar rowAttr = scheduler._waiAria.agendaHeadAttrString();\r\n\t\t\tvar dateHeader = scheduler._waiAria.agendaHeadDateString(l.date);\r\n\t\t\tvar descriptionHeader = scheduler._waiAria.agendaHeadDescriptionString(l.description);\r\n\r\n\t\t\tscheduler._els[\"dhx_cal_header\"][0].innerHTML=\"
\" +\r\n\t\t\t\t\"
\"+l.date+\"
\" +\r\n\t\t\t\t\"\"+l.description+\"\" +\r\n\t\t\t\t\"
\";\r\n\t\t\tscheduler._table_view=true;\r\n\t\t\tscheduler.set_sizes();\r\n\t\t}\r\n\t}\r\n\r\n\tfunction fill_agenda_tab(){\r\n\t\t//select events for which data need to be printed\r\n\r\n\t\tvar events = scheduler.get_visible_events();\r\n\t\tevents.sort(function(a,b){ return a.start_date>b.start_date?1:-1;});\r\n\r\n\t\tvar tableAttr = scheduler._waiAria.agendaDataAttrString();\r\n\t\tvar agendaEventAttrString;\r\n\t\t//generate html for the view\r\n\t\tvar html=\"
\";\r\n\t\tfor (var i=0; i
\"+\r\n\t\t\t\t\t(scheduler.config.rtl ? scheduler.templates.agenda_time(ev.end_date,ev.start_date, ev):scheduler.templates.agenda_time(ev.start_date, ev.end_date,ev))+\r\n\t\t\t\t\t\"
\";\r\n\t\t\thtml+=`
\r\n\t\t\t\r\n\t\t\t
`;\r\n\t\t\thtml+=\"\"+scheduler.templates.agenda_text(ev.start_date, ev.end_date, ev)+\"
\";\r\n\t\t}\r\n\t\thtml+=\"
\";\r\n\r\n\t\t//render html\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop = scheduler._agendaScrollTop||0;\r\n\r\n\t\t// setting up dhx_v_border size\r\n\t\tvar agenda_area = scheduler._els[\"dhx_cal_data\"][0].childNodes[0];\r\n\t\tvar v_border = agenda_area.childNodes[agenda_area.childNodes.length-1];\r\n\t\tv_border.style.height = (agenda_area.offsetHeight < scheduler._els[\"dhx_cal_data\"][0].offsetHeight) ? \"100%\" : (agenda_area.offsetHeight+\"px\");\r\n\r\n\t\tvar t=scheduler._els[\"dhx_cal_data\"][0].firstChild.childNodes;\r\n\r\n\t\tvar dateElement = scheduler._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML=scheduler.templates.agenda_date(scheduler._min_date, scheduler._max_date, scheduler._mode);\r\n\t\t}\r\n\r\n\t\tscheduler._rendered=[];\r\n\t\tfor (var i=0; i < t.length-1; i++)\r\n\t\t\tscheduler._rendered[i]=t[i];\r\n\r\n\t}\r\n\r\n\tscheduler.agenda_legacy_view=function(mode){\r\n\t\tscheduler._min_date = scheduler.config.agenda_start||scheduler.date.agenda_legacy_start(scheduler._date);\r\n\t\tscheduler._max_date = scheduler.config.agenda_end||scheduler.date.add_agenda_legacy(scheduler._min_date, 1);\r\n\r\n\t\tset_full_view(mode);\r\n\t\tif (mode){\r\n\t\t\tscheduler._cols = null;\r\n\t\t\tscheduler._colsS = null;\r\n\t\t\tscheduler._table_view = true;\r\n\t\t\t//agenda tab activated\r\n\t\t\tfill_agenda_tab();\r\n\t\t} else {\r\n\t\t\tscheduler._table_view = false;\r\n\t\t\t//agenda tab de-activated\r\n\t\t}\r\n\t};\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.date.add_agenda = function(date, inc){\r\n\t\treturn scheduler.date.add(date, 1*inc, \"month\");\r\n\t};\r\n\t\r\n\tscheduler.templates.agenda_time = function(start,end,ev){\r\n\t\tif (ev._timed){\r\n\t\t\treturn `${this.event_date(start)} - ${this.event_date(end)}`;\r\n\t\t}else{\r\n\t\t\treturn scheduler.locale.labels.full_day;\r\n\t\t}\r\n\t};\r\n\tscheduler.templates.agenda_text = function(start,end,ev){\r\n\t\treturn ev.text;\r\n\t};\r\n\r\n\tconst dayDateToStr = scheduler.date.date_to_str(\"%F %j\");\r\n\tconst dayDowToStr = scheduler.date.date_to_str(\"%l\");\r\n\r\n\tscheduler.templates.agenda_day = function(date){ \r\n\t\treturn `
${dayDateToStr(date)}
\r\n\t\t
${dayDowToStr(date)}
`;\r\n\t};\r\n\tscheduler.templates.agenda_date = function(start, end){ \r\n\t\treturn scheduler.templates.month_date(scheduler.getState().date); \r\n\t};\r\n\t\r\n\tscheduler.date.agenda_start=function(date){\r\n\t\treturn scheduler.date.month_start(new Date(date));\r\n\t};\r\n\r\n\tlet scrollTop = 0;\r\n\t\r\n\tscheduler.attachEvent(\"onTemplatesReady\",function() {\r\n\t\tvar old_dblclick_dhx_cal_data = scheduler.dblclick_dhx_cal_data;\r\n\t\tscheduler.dblclick_dhx_cal_data = function() {\r\n\t\t\tif (this._mode == \"agenda\") {\r\n\t\t\t\tif (!this.config.readonly && this.config.dblclick_create)\r\n\t\t\t\t\tthis.addEventNow();\r\n\t\t\t} else {\r\n\t\t\t\tif (old_dblclick_dhx_cal_data)\r\n\t\t\t\t\treturn old_dblclick_dhx_cal_data.apply(this, arguments);\r\n\t\t\t}\r\n\t\t};\r\n\t\r\n\t\r\n\t\tvar old = scheduler.render_data;\r\n\t\tscheduler.render_data=function(evs){\r\n\t\t\tif (this._mode == \"agenda\")\r\n\t\t\t\tfill_agenda_tab();\r\n\t\t\telse\r\n\t\t\t\treturn old.apply(this,arguments);\r\n\t\t};\r\n\t\r\n\t\tvar old_render_view_data = scheduler.render_view_data;\r\n\t\tscheduler.render_view_data = function(){\r\n\t\t\tif(this._mode == \"agenda\") {\r\n\t\t\t\tscrollTop = scheduler._els[\"dhx_cal_data\"][0].scrollTop;\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = 0;\r\n\t\t\t}\r\n\t\t\treturn old_render_view_data.apply(this,arguments);\r\n\t\t};\r\n\r\n\t\tfunction fill_agenda_tab(){\r\n\t\t\tconst events = scheduler.get_visible_events();\r\n\t\t\tevents.sort(function(a,b){ return a.start_date>b.start_date?1:-1;});\r\n\r\n\t\t\tconst eventsInDays = {};\r\n\t\t\tlet currDate = scheduler.getState().min_date;\r\n\t\t\tconst maxDate = scheduler.getState().max_date;\r\n\t\t\twhile(currDate.valueOf() < maxDate.valueOf()){\r\n\t\t\t\teventsInDays[currDate.valueOf()] = [];\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\r\n\t\t\tlet anyEvents = false;\r\n\r\n\t\t\tevents.forEach((ev) => {\r\n\t\t\t\tlet eventStart = scheduler.date.day_start(new Date(ev.start_date)); \r\n\t\t\t\twhile (eventStart.valueOf() < ev.end_date.valueOf()) {\r\n\t\t\t\t\tif (eventsInDays[eventStart.valueOf()]) {\r\n\t\t\t\t\t\teventsInDays[eventStart.valueOf()].push(ev);\r\n\t\t\t\t\t\tanyEvents = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\teventStart = scheduler.date.day_start(scheduler.date.add(eventStart, 1, \"day\"));\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(!anyEvents){\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = renderEmptyView();\r\n\t\t\t}else{\r\n\t\t\t\tlet html = \"\";\r\n\t\t\t\tfor(let day in eventsInDays){\r\n\t\t\t\t\thtml += renderDay(new Date(day*1), eventsInDays[day]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = scrollTop;\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\r\n\r\n\t\tfunction renderEmptyView(){\r\n\t\t\treturn `
${scheduler.locale.labels.agenda_tab}
`;\r\n\t\t}\r\n\r\n\t\tfunction renderDay(day, events) {\r\n\t\t\tif(!events.length){\r\n\t\t\t\treturn \"\";\r\n\t\t\t}\r\n\t\t\tlet html = `\r\n
\r\n\t
${scheduler.templates.agenda_day(day)}
\r\n\t
\r\n`;\r\n\r\n\t\t\tevents.forEach((calendarEvent) => {\r\n\t\t\t\thtml += renderOneEvent(day, calendarEvent);\r\n\t\t\t});\r\n\r\n\t\t\thtml += `
`;\r\n\t\t\treturn html;\r\n\t\t}\r\n\r\n\t\tfunction renderOneEvent(day, calendarEvent){\r\n\t\t\tconst dates = scheduler.templates.agenda_time(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\t\t\tconst selectedId = scheduler.getState().select_id;\r\n\t\t\tconst cls = scheduler.templates.event_class(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\t\t\tconst description = scheduler.templates.agenda_text(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\r\n\t\t\tlet style = \"\";\r\n\t\t\tif(calendarEvent.color || calendarEvent.textColor){\r\n\t\t\t\tconst bg = (calendarEvent.color ? (\"--dhx-scheduler-event-background:\" + calendarEvent.color + \";\") : \"\");\r\n\t\t\t\tconst color = (calendarEvent.textColor ? (\"--dhx-scheduler-event-color:\" + calendarEvent.textColor + \";\") : \"\");\r\n\t\t\t\tstyle = ` style=\"${bg}${color}\" `;\r\n\t\t\t}\r\n\r\n\t\t\treturn `
\r\n\t
\r\n\t
${dates}
\r\n\t
${description}
\r\n
`;\r\n\t\t}\r\n\t\r\n\t\tscheduler.agenda_view=function(mode){\r\n\t\t\tif (mode){\r\n\t\t\t\tscheduler._min_date = scheduler.config.agenda_start || scheduler.date.agenda_start(scheduler._date);\r\n\t\t\t\tscheduler._max_date = scheduler.config.agenda_end || scheduler.date.add_agenda(scheduler._min_date, 1);\r\n\t\t\t\tscheduler._cols = null;\r\n\t\t\t\tscheduler._colsS = null;\r\n\t\t\t\tscheduler._table_view = true;\r\n\r\n\t\t\t\tconst dateHeader = scheduler._getNavDateElement();\r\n\t\t\t\tdateHeader.innerHTML = scheduler.templates.agenda_date(scheduler._date);\r\n\t\t\t\t//agenda tab activated\r\n\t\t\t\tfill_agenda_tab();\r\n\t\t\t} else {\r\n\t\t\t\tscheduler._table_view = false;\r\n\t\t\t\t//agenda tab de-activated\r\n\t\t\t}\r\n\t\t};\r\n\t});\r\n\r\n\t// scheduler.attachEvent(\"onEventSelected\", function(id){\r\n\t// \tconst oldSelected = scheduler.$container.querySelectorAll(\".dhx_cal_agenda_event_line_selected\");\r\n\t// \toldSelected.forEach((el) => {\r\n\t// \t\tel.classList.remove(\"dhx_cal_agenda_event_line_selected\");\r\n\t// \t});\r\n\r\n\t// \tconst selected = scheduler.$container.querySelector(`[${scheduler.config.event_attribute}=\"${id}\"]`);\r\n\t// \tif(selected){\r\n\t// \t\tselected.classList.add(\"dhx_cal_agenda_event_line_selected\");\r\n\t// \t}\r\n\t// });\r\n\t\r\n\t\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.config.all_timed = \"short\";\r\n\tscheduler.config.all_timed_month = false;\r\n\r\n\tvar is_event_short = function (ev) {\r\n\t\tif(!((ev.end_date - ev.start_date)/(1000*60*60) >= 24)){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t// short event shouldn't disappear to multiday area during dnd-resize\r\n\t\tif(scheduler._drag_mode == \"resize\" && scheduler._drag_id == ev.id){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn \tfalse;\r\n\t};\r\n\r\n\t// copy of usual events and recurring instances;\r\n\t// regular copy causes problems with recurrings which have series event as a prototype\r\n\tscheduler._safe_copy = function(event){\r\n\t\tvar proto = null,\r\n\t\t\tcopy = scheduler._copy_event(event);\r\n\t\tif(event.event_pid){\r\n\t\t\tproto = scheduler.getEvent(event.event_pid);\r\n\t\t}\r\n\r\n\t\tif (proto && proto.isPrototypeOf(event)) {\r\n\t\t\tdelete copy.event_length;\r\n\t\t\tdelete copy.event_pid;\r\n\t\t\tdelete copy.rec_pattern;\r\n\t\t\tdelete copy.rec_type;\r\n\t\t}\r\n\r\n\t\treturn copy;\r\n\t};\r\n\r\n\tvar old_prerender_events_line = scheduler._pre_render_events_line;\r\n\tvar old_prerender_events_table = scheduler._pre_render_events_table;\r\n\r\n\tvar prerender_events = function (evs, hold) {\r\n\t\tif (!this._table_view) {\r\n\t\t\treturn old_prerender_events_line.call(this, evs, hold);\r\n\t\t}\r\n\r\n\t\treturn old_prerender_events_table.call(this, evs, hold);\r\n\t};\r\n\r\n\tscheduler._pre_render_events_line = scheduler._pre_render_events_table = function(evs, hold){\r\n\t\tif (!this.config.all_timed ||\r\n\t\t\t(this._table_view && this._mode != \"month\") ||\r\n\t\t\t(this._mode == \"month\" && !this.config.all_timed_month))\r\n\t\t\treturn prerender_events.call(this, evs, hold);\r\n\r\n\t\tfor (var i=0; i < evs.length; i++) {\r\n\t\t\tvar ev=evs[i];\r\n\r\n\t\t\tif (ev._timed)\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\tif (this.config.all_timed == \"short\") {\r\n\t\t\t\tif (!is_event_short(ev)) {\r\n\t\t\t\t\tif (this._mode != \"month\") {\r\n\t\t\t\t\t\tevs.splice(i--, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar ce = this._safe_copy(ev); // current event (event for one specific day) is copy of original with modified dates\r\n\t\t\tif(!ev._virtual){\r\n\t\t\t\tce._first_chunk = true;\r\n\t\t\t}else{\r\n\t\t\t\tce._first_chunk = false;\r\n\t\t\t}\r\n\t\t\tce._drag_resize = false;\r\n\t\t\tce._virtual = true;\r\n\t\t\tce.start_date = new Date(ce.start_date); // as lame copy doesn't copy date objects\r\n\r\n\t\t\tif (!isOvernightEvent(ev)) {\r\n\t\t\t\tce.end_date = new Date(ev.end_date);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tce.end_date = getNextDay(ce.start_date);\r\n\t\t\t\tif (this.config.last_hour != 24) { // if specific last_hour was set (e.g. 20)\r\n\t\t\t\t\tce.end_date = setDateTime(ce.start_date, this.config.last_hour);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar event_changed = false;\r\n\t\t\tif (ce.start_date < this._max_date && ce.end_date > this._min_date && ce.start_date < ce.end_date) {\r\n\t\t\t\tevs[i] = ce; // adding another event in collection\r\n\t\t\t\tevent_changed = true;\r\n\t\t\t}\r\n\t\t//\tif (ce.start_date > ce.end_date) {\r\n\t\t//\t\tevs.splice(i--,1);\r\n\t\t//\t}\r\n\r\n\t\t\tvar re = this._safe_copy(ev); // remaining event, copy of original with modified start_date (making range more narrow)\r\n\t\t\tre._virtual = true;\r\n\t\t\tre.end_date = new Date(re.end_date);\r\n\t\t\tif (re.start_date < this._min_date)\r\n\t\t\t\tre.start_date = setDateTime(this._min_date, this.config.first_hour);// as we are starting only with whole hours\r\n\t\t\telse\r\n\t\t\t\tre.start_date = setDateTime(getNextDay(ev.start_date), this.config.first_hour);\r\n\r\n\t\t\tif (re.start_date < this._max_date && re.start_date < re.end_date) {\r\n\t\t\t\tif (event_changed){\r\n\t\t\t\t\tevs.splice(i+1,0,re);//insert part\r\n\t\t\t\t}else {\r\n\t\t\t\t\tevs[i--] = re;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tre._last_chunk = false;\r\n\t\t\t}else{\r\n\t\t\t\tce._last_chunk = true;\r\n\t\t\t\tce._drag_resize = true;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t// in case of all_timed pre_render is not applied to the original event\r\n\t\t// so we need to force redraw in case of dnd\r\n\t\tvar redraw = (this._drag_mode == 'move')?false:hold;\r\n\t\treturn prerender_events.call(this, evs, redraw);\r\n\r\n\r\n\t\tfunction isOvernightEvent(ev){\r\n\t\t\tvar next_day = getNextDay(ev.start_date);\r\n\t\t\treturn (+ev.end_date > +next_day);\r\n\t\t}\r\n\t\tfunction getNextDay(date){\r\n\t\t\tvar next_day = scheduler.date.add(date, 1, \"day\");\r\n\t\t\tnext_day = scheduler.date.date_part(next_day);\r\n\t\t\treturn next_day;\r\n\t\t}\r\n\t\tfunction setDateTime(date, hours){\r\n\t\t\tvar val = scheduler.date.date_part(new Date(date));\r\n\t\t\tval.setHours(hours);\r\n\t\t\treturn val;\r\n\t\t}\r\n\t};\r\n\tvar old_get_visible_events = scheduler.get_visible_events;\r\n\tscheduler.get_visible_events = function(only_timed){\r\n\t\tif (!(this.config.all_timed && this.config.multi_day))\r\n\t\t\treturn old_get_visible_events.call(this, only_timed);\r\n\t\treturn old_get_visible_events.call(this, false); // only timed = false\r\n\t};\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function (old_mode, old_date, mode, date) {\r\n\t\tscheduler._allow_dnd = (mode == \"day\" || mode == \"week\" || scheduler.getView(mode));\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler._is_main_area_event = function(ev){\r\n\t\treturn !!(ev._timed || this.config.all_timed === true || (this.config.all_timed == \"short\" && is_event_short(ev)) );\r\n\t};\r\n\r\n\tvar oldUpdate = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id){\r\n\t\t// full redraw(update_render=true) messes events order while dnd.\r\n\t\t// individual redraw(update_render=false) of multiday event, which happens on select/unselect, expands event to full width of the cell and can be fixes only with full redraw.\r\n\t\t// so for now full redraw is always enabled for not-dnd updates\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tvar fullRedrawNeeded;\r\n\t\tvar initial;\r\n\t\tif(ev) {\r\n\t\t\tfullRedrawNeeded = (scheduler.config.all_timed && !(scheduler.isOneDayEvent(scheduler._events[id]) || scheduler.getState().drag_id));\r\n\t\t\tif (fullRedrawNeeded) {\r\n\t\t\t\tinitial = scheduler.config.update_render;\r\n\t\t\t\tscheduler.config.update_render = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\toldUpdate.apply(scheduler, arguments);\r\n\r\n\t\tif(ev) {\r\n\t\t\tif (fullRedrawNeeded) {\r\n\t\t\t\tscheduler.config.update_render = initial;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\r\nvar temp_section;\r\nvar before;\r\n\r\nscheduler.config.collision_limit = 1;\r\n\r\nfunction _setTempSection(event_id) { // for custom views (matrix, timeline, units)\r\n\tvar checked_mode = scheduler._get_section_view();\r\n\tif(checked_mode && event_id){\r\n\t\ttemp_section = scheduler.getEvent(event_id)[scheduler._get_section_property()];\r\n\t}\r\n}\r\n\r\nscheduler.attachEvent(\"onBeforeDrag\",function(id){\r\n\t_setTempSection(id);\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onBeforeLightbox\",function(id){\r\n\tvar ev = scheduler.getEvent(id);\r\n\tbefore = [ev.start_date, ev.end_date];\r\n\t_setTempSection(id);\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventChanged\",function(id){\r\n\tif (!id || !scheduler.getEvent(id)) return true;\r\n\tvar ev = scheduler.getEvent(id);\r\n\tif (!scheduler.checkCollision(ev)){\r\n\t\tif (!before) return false;\r\n\t\tev.start_date = before[0];\r\n\t\tev.end_date = before[1];\r\n\t\tev._timed=this.isOneDayEvent(ev);\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onBeforeEventChanged\",function(ev,e,is_new){\r\n\treturn scheduler.checkCollision(ev);\r\n});\r\nscheduler.attachEvent(\"onEventAdded\",function(id,ev) {\r\n\tvar result = scheduler.checkCollision(ev);\r\n\tif (!result)\r\n\t\tscheduler.deleteEvent(id);\r\n});\r\nscheduler.attachEvent(\"onEventSave\",function(id, edited_ev, is_new){\r\n\tedited_ev = scheduler._lame_clone(edited_ev);\r\n\tedited_ev.id = id;\r\n\r\n\t//lightbox may not have 'time' section\r\n\tif(!(edited_ev.start_date && edited_ev.end_date)){\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tedited_ev.start_date = new Date(ev.start_date);\r\n\t\tedited_ev.end_date = new Date(ev.end_date);\r\n\t}\r\n\r\n\tif(edited_ev.rec_type){\r\n\t\tscheduler._roll_back_dates(edited_ev);\r\n\t}\r\n\treturn scheduler.checkCollision(edited_ev); // in case user creates event on one date but then edited it another\r\n});\r\n\r\nscheduler._check_sections_collision = function(first, second){\r\n\tvar map_to = scheduler._get_section_property();\r\n\tif (first[map_to] == second[map_to] && first.id != second.id)\r\n\t\treturn true;\r\n\treturn false;\r\n};\r\n\r\nscheduler.checkCollision = function(ev) {\r\n\tvar evs = [];\r\n\tvar collision_limit = scheduler.config.collision_limit;\r\n\r\n\tif (ev.rec_type) {\r\n\t\tvar evs_dates = scheduler.getRecDates(ev);\r\n\t\tfor(var k=0; k= collision_limit) {\r\n\r\n\t\t\tsingle = false;\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\tif ( evs.length >= collision_limit )\r\n\t\t\tsingle = false;\r\n\t}\r\n\tif (!single) {\r\n\t\tvar res = !scheduler.callEvent(\"onEventCollision\",[ev,evs]);\r\n\t\tif (!res) {\r\n\t\t\tev[map_to] = temp_section||ev[map_to]; // from _setTempSection for custom views\r\n\t\t}\r\n\t\treturn res;\r\n\t}\r\n\treturn single;\r\n\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.config.container_autoresize = true;\r\n\tscheduler.config.month_day_min_height = 90;\r\n\tscheduler.config.min_grid_size = 25;\r\n\tscheduler.config.min_map_size = 400;\r\n\r\n\tvar old_pre_render_event = scheduler._pre_render_events;\r\n\r\n\t//need for temporary disabling without modifying public config\r\n\tvar active = true;\r\n\tvar total_height = 0;\r\n\tvar multiday_height = 0;\r\n\r\n\tscheduler._pre_render_events = function(evs, hold) {\r\n\t\tif (!(scheduler.config.container_autoresize && active)) {\r\n\t\t\treturn old_pre_render_event.apply(this, arguments);\r\n\t\t}\r\n\r\n\t\tvar hb = this.xy.bar_height;\r\n\t\tvar h_old = this._colsS.heights;\r\n\t\tvar h = this._colsS.heights = [0, 0, 0, 0, 0, 0, 0];\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tif (!this._table_view)\r\n\t\t\tevs = this._pre_render_events_line(evs, hold); //ignore long events for now\r\n\t\telse\r\n\t\t\tevs = this._pre_render_events_table(evs, hold);\r\n\r\n\t\tif (this._table_view) {\r\n\t\t\tif (hold){\r\n\t\t\t\tthis._colsS.heights = h_old;\r\n\t\t\t} else {\r\n\t\t\t\tvar evl = data.firstChild;\r\n\t\t\t\tconst rows = evl.querySelectorAll(\".dhx_cal_month_row\");\r\n\t\t\t\tif (rows) {\r\n\t\t\t\t\tfor (var i = 0; i < rows.length; i++) {\r\n\t\t\t\t\t\th[i]++;\r\n\r\n\t\t\t\t\t\tif ((h[i]) * hb > this._colsS.height - this.xy.month_head_height) { // 22 - height of cell's header\r\n\t\t\t\t\t\t\t//we have overflow, update heights\r\n\t\t\t\t\t\t\tvar cells = rows[i].querySelectorAll(\".dhx_cal_month_cell\");\r\n\r\n\t\t\t\t\t\t\tvar cHeight = this._colsS.height - this.xy.month_head_height;\r\n\t\t\t\t\t\t\tif(this.config.max_month_events*1 !== this.config.max_month_events || h[i] <= this.config.max_month_events){\r\n\t\t\t\t\t\t\t\tcHeight = h[i] * hb;\r\n\t\t\t\t\t\t\t}else if( (this.config.max_month_events + 1) * hb > this._colsS.height - this.xy.month_head_height){\r\n\t\t\t\t\t\t\t\tcHeight = (this.config.max_month_events + 1) * hb;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\trows[i].style.height = (cHeight + this.xy.month_head_height) + \"px\";\r\n\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\tfor (var j = 0; j < cells.length; j++) {\r\n\t\t\t\t\t\t\t\tcells[j].childNodes[1].style.height = cHeight + \"px\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\th[i] = (h[i - 1] || 0) + cells[0].offsetHeight;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\th[i] = (h[i - 1] || 0) + rows[i].querySelectorAll(\".dhx_cal_month_cell\")[0].offsetHeight;\r\n\t\t\t\t\t}\r\n\t\t\t\t\th.unshift(0);\r\n\t\t\t\t\tif (evl.parentNode.offsetHeight < evl.parentNode.scrollHeight && !evl._h_fix) {\r\n\t\t\t\t\t\t//we have v-scroll, decrease last day cell\r\n\r\n\t\t\t\t\t\t// NO CHECK SHOULD BE MADE ON VERTICAL SCROLL\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (!evs.length && this._els[\"dhx_multi_day\"][0].style.visibility == \"visible\")\r\n\t\t\t\t\t\th[0] = -1;\r\n\t\t\t\t\tif (evs.length || h[0] == -1) {\r\n\t\t\t\t\t\t//shift days to have space for multiday events\r\n\t\t\t\t\t\t//var childs = evl.parentNode.childNodes;\r\n\t\t\t\t\t\tvar dh = ((h[0] + 1) * hb + 1); // +1 so multiday events would have 2px from top and 2px from bottom by default\r\n\t\t\t\t\t\tif(multiday_height != dh + 1) {\r\n\t\t\t\t\t\t\tthis._obj.style.height = (total_height - multiday_height + dh - 1) + \"px\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tdh += \"px\";\r\n\t\t\t\t\t\tconst navHeight = this._els[\"dhx_cal_navline\"][0].offsetHeight;\r\n\t\t\t\t\t\tconst headerHeight = this._els[\"dhx_cal_header\"][0].offsetHeight;\r\n\t\t\t\t\t\tdata.style.height = (this._obj.offsetHeight - navHeight - headerHeight - (this.xy.margin_top || 0)) + 'px';\r\n\t\t\t\t\t\tvar last = this._els[\"dhx_multi_day\"][0];\r\n\t\t\t\t\t\tlast.style.height = dh;\r\n\t\t\t\t\t\tlast.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\t\tlast = this._els[\"dhx_multi_day\"][1];\r\n\t\t\t\t\t\tlast.style.height = dh;\r\n\t\t\t\t\t\tlast.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\t\tif(last.style.visibility == \"hidden\"){\r\n\t\t\t\t\t\t\tlast.style.display = \"none\";\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tlast.style.display = \"\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tlast.className = h[0] ? \"dhx_multi_day_icon\" : \"dhx_multi_day_icon_small\";\r\n\t\t\t\t\t\tthis._dy_shift = (h[0] + 1) * hb;\r\n\t\t\t\t\t\th[0] = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn evs;\r\n\t};\r\n\r\n\tvar checked_divs = [\"dhx_cal_navline\", \"dhx_cal_header\", \"dhx_multi_day\", \"dhx_cal_data\"];\r\n\tvar updateContainterHeight = function(is_repaint) {\r\n\t\ttotal_height = 0;\r\n\t\tfor (var i = 0; i < checked_divs.length; i++) {\r\n\r\n\t\t\tvar className = checked_divs[i];\r\n\t\t\tvar checked_div = (scheduler._els[className]) ? scheduler._els[className][0] : null;\r\n\t\t\tvar height = 0;\r\n\t\t\tswitch (className) {\r\n\t\t\t\tcase \"dhx_cal_navline\":\r\n\t\t\t\tcase \"dhx_cal_header\":\r\n\t\t\t\t\theight = checked_div.offsetHeight;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"dhx_multi_day\":\r\n\t\t\t\t\theight = (checked_div) ? checked_div.offsetHeight - 1 : 0;\r\n\t\t\t\t\tmultiday_height = height;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"dhx_cal_data\":\r\n\t\t\t\t\tvar mode = scheduler.getState().mode;\r\n\r\n\t\t\t\t\tif(checked_div.childNodes[1] && mode != \"month\") {\r\n\t\t\t\t\t\tlet maxHeight = 0;\r\n\t\t\t\t\t\tfor(let i = 0; i < checked_div.childNodes.length; i++){\r\n\t\t\t\t\t\t\tif(checked_div.childNodes[i].offsetHeight > maxHeight){\r\n\t\t\t\t\t\t\t\tmaxHeight = checked_div.childNodes[i].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\theight = maxHeight;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\theight = Math.max(checked_div.offsetHeight - 1, checked_div.scrollHeight);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (mode == \"month\") {\r\n\t\t\t\t\t\tif (scheduler.config.month_day_min_height && !is_repaint) {\r\n\t\t\t\t\t\t\tvar rows_length = checked_div.querySelectorAll(\".dhx_cal_month_row\").length;\r\n\t\t\t\t\t\t\theight = rows_length * scheduler.config.month_day_min_height;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (is_repaint) {\r\n\t\t\t\t\t\t\tchecked_div.style.height = height + \"px\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (mode == \"year\"){\r\n\t\t\t\t\t\theight = 190 * scheduler.config.year_y;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(mode == \"agenda\"){\r\n\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\tif(checked_div.childNodes && checked_div.childNodes.length){\r\n\t\t\t\t\t\t\tfor(var j = 0; j < checked_div.childNodes.length; j++){\r\n\t\t\t\t\t\t\t\theight += checked_div.childNodes[j].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(height + 2 < scheduler.config.min_grid_size){\r\n\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (mode == \"week_agenda\"){\r\n\t\t\t\t\t\tvar min_height = scheduler.xy.week_agenda_scale_height + scheduler.config.min_grid_size,\r\n\t\t\t\t\t\t\tcur_height;\r\n\r\n\t\t\t\t\t\tvar column;\r\n\t\t\t\t\t\tfor(var k = 0; k < checked_div.childNodes.length; k++){\r\n\t\t\t\t\t\t\tcolumn = checked_div.childNodes[k];\r\n\t\t\t\t\t\t\tfor(var j = 0; j < column.childNodes.length; j++) {\r\n\t\t\t\t\t\t\t\tvar innerHeight = 0,\r\n\t\t\t\t\t\t\t\t\teventsContainer = column.childNodes[j].childNodes[1];\r\n\r\n\t\t\t\t\t\t\t\tfor(var g =0; g < eventsContainer.childNodes.length; g++){\r\n\t\t\t\t\t\t\t\t\tinnerHeight += eventsContainer.childNodes[g].offsetHeight;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tcur_height = innerHeight + scheduler.xy.week_agenda_scale_height;\r\n\t\t\t\t\t\t\t\tcur_height = (k == 1 && (j == 2 || j == 3)) ? cur_height * 2 : cur_height; // for last two cells;\r\n\r\n\t\t\t\t\t\t\t\tif (cur_height > min_height) {\r\n\t\t\t\t\t\t\t\t\tmin_height = cur_height;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\theight = min_height * 3;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(mode == \"map\") {\r\n\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\tvar evs = checked_div.querySelectorAll(\".dhx_map_line\");\r\n\r\n\t\t\t\t\t\tfor (var j = 0; j < evs.length; j++) {\r\n\t\t\t\t\t\t\theight += evs[j].offsetHeight;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (height + 2 < scheduler.config.min_map_size) {\r\n\t\t\t\t\t\t\theight = scheduler.config.min_map_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(scheduler._gridView) {\r\n\t\t\t\t\t\theight = 0;\r\n\r\n\t\t\t\t\t\tif (checked_div.childNodes[1].childNodes[0].childNodes && checked_div.childNodes[1].childNodes[0].childNodes.length) {\r\n\t\t\t\t\t\t\tvar evs = checked_div.childNodes[1].childNodes[0].childNodes[0].childNodes;\r\n\r\n\t\t\t\t\t\t\tfor (var j = 0; j < evs.length; j++) {\r\n\t\t\t\t\t\t\t\theight += evs[j].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\theight += 2;\r\n\r\n\t\t\t\t\t\t\tif(height < scheduler.config.min_grid_size){\r\n\t\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (scheduler.matrix && scheduler.matrix[mode]) {\r\n\t\t\t\t\t\tif (is_repaint) {\r\n\t\t\t\t\t\t\theight += 0;\r\n\t\t\t\t\t\t\tchecked_div.style.height = height + \"px\";\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\t\tvar cfg = scheduler.matrix[mode];\r\n\t\t\t\t\t\t\tvar rows = cfg.y_unit;\r\n\t\t\t\t\t\t\tfor(var r=0; r < rows.length; r++){\r\n\t\t\t\t\t\t\t\theight += cfg.getSectionHeight(rows[r].key);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t// Check and add extra height to avoid events hiding by the horizontal scrollbar\r\n\t\t\t\t\t\t\tif(scheduler.$container.clientWidth != scheduler.$container.scrollWidth){\r\n\t\t\t\t\t\t\t\theight += getScrollSize();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\theight -= 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (mode == \"day\" || mode == \"week\" || (scheduler._props && scheduler._props[mode])) {\r\n\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\theight += 1;\r\n\t\t\ttotal_height += height;\r\n\t\t}\r\n\t\tscheduler._obj.style.height = (total_height) + \"px\";\r\n\r\n\t\tif (!is_repaint)\r\n\t\t\tscheduler.updateView();\r\n\t};\r\n\r\n\tfunction callUpdate(){\r\n\t\tactive = false;\r\n\t\tscheduler.callEvent(\"onAfterSchedulerResize\", []);\r\n\t\tactive = true;\r\n\t}\r\n\r\n\tvar conditionalUpdateContainerHeight = function() {\r\n\t\tif(!(scheduler.config.container_autoresize && active))\r\n\t\t\treturn true;\r\n\r\n\t\tvar mode = scheduler.getState().mode;\r\n\r\n\t\tif(!mode) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tvar asyncRepaint = window.requestAnimationFrame || window.setTimeout;\r\n\t\tvar scrollTop = document.documentElement.scrollTop;\r\n\r\n\t\tasyncRepaint(function() {\r\n\t\t\tif(scheduler.$destroyed || !scheduler.$initialized){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tupdateContainterHeight();\r\n\t\t});\r\n\r\n\t\tif ( (scheduler.matrix && scheduler.matrix[mode]) || mode == \"month\") {\r\n\t\t\tasyncRepaint(function() {\r\n\t\t\t\tif(scheduler.$destroyed || !scheduler.$initialized){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tupdateContainterHeight(true);\r\n\t\t\t\tdocument.documentElement.scrollTop = scrollTop;\r\n\t\t\t\tcallUpdate();\r\n\t\t\t}, 1);\r\n\t\t}else{\r\n\t\t\tcallUpdate();\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function(){\r\n\t\tvar autosizeEnabled = scheduler.config.container_autoresize;\r\n\t\tif(!scheduler.xy.$original_scroll_width){\r\n\t\t\tscheduler.xy.$original_scroll_width = scheduler.xy.scroll_width;\r\n\t\t}\r\n\r\n\t\tscheduler.xy.scroll_width = autosizeEnabled ? 0 : scheduler.xy.$original_scroll_width;\r\n\r\n\t\tif(scheduler.matrix){\r\n\t\t\tfor(var i in scheduler.matrix){\r\n\t\t\t\tvar timeline = scheduler.matrix[i];\r\n\t\t\t\tif(!timeline.$original_section_autoheight){\r\n\t\t\t\t\ttimeline.$original_section_autoheight = timeline.section_autoheight;\r\n\t\t\t\t}\r\n\t\t\t\tif(autosizeEnabled){\r\n\t\t\t\t\ttimeline.section_autoheight = false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\ttimeline.section_autoheight = timeline.$original_section_autoheight;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onXLE\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventChanged\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventCreated\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventAdded\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventDeleted\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onAfterSchedulerResize\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onClearAll\", conditionalUpdateContainerHeight);\r\n\r\n\t//disable container autoresize when expanded\r\n\tscheduler.attachEvent(\"onBeforeExpand\", function(){\r\n\t\tactive = false;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeCollapse\", function(){\r\n\t\tactive = true;\r\n\t\treturn true;\r\n\t});\r\n\t// helper function\r\n\tfunction getScrollSize() {\r\n\t\tvar div = document.createElement(\"div\");\r\n\t\tdiv.style.cssText = \"visibility:hidden;position:absolute;left:-1000px;width:100px;padding:0px;margin:0px;height:110px;min-height:100px;overflow-y:scroll;\";\r\n\r\n\t\tdocument.body.appendChild(div);\r\n\t\tvar size = div.offsetWidth - div.clientWidth;\r\n\t\tdocument.body.removeChild(div);\r\n\t\treturn size;\r\n\t}\r\n\r\n\r\n}","export default function(scheduler){\r\n\tfunction setCookie(name,cookie_param,value) {\r\n\t\tvar str = name + \"=\" + value + (cookie_param?(\"; \"+cookie_param):\"\");\r\n\t\tdocument.cookie = str;\r\n\t}\r\n\tfunction getCookie(name) {\r\n\t\tvar search = name + \"=\";\r\n\t\tif (document.cookie.length > 0) {\r\n\t\t\tvar offset = document.cookie.indexOf(search);\r\n\t\t\tif (offset != -1) {\r\n\t\t\t\toffset += search.length;\r\n\t\t\t\tvar end = document.cookie.indexOf(\";\", offset);\r\n\t\t\t\tif (end == -1)\r\n\t\t\t\t\tend = document.cookie.length;\r\n\t\t\t\treturn document.cookie.substring(offset, end);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}\r\n\r\n\tfunction getCookieName(scheduler) {\r\n\t\treturn (scheduler._obj.id || \"scheduler\") + \"_settings\";\r\n\t}\r\n\r\n\tvar first = true;\r\n\tscheduler.attachEvent(\"onBeforeViewChange\",function(oldMode,oldDate,mode,date){\r\n\t\t// if Url plugin is enabled - explicit url values should have more priority than cookies\r\n\t\tif (first && scheduler._get_url_nav){\r\n\t\t\tvar urlNavigationPlugin = scheduler._get_url_nav();\r\n\t\t\tif(urlNavigationPlugin.date || urlNavigationPlugin.mode || urlNavigationPlugin.event){\r\n\t\t\t\tfirst = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar cookie = getCookieName(scheduler);\r\n\r\n\t\tif (first){\r\n\t\t\tfirst = false;\r\n\t\t\tvar schedulerCookie = getCookie(cookie);\r\n\t\t\tif (schedulerCookie){\r\n\r\n\t\t\t\tif(!scheduler._min_date){\r\n\t\t\t\t\t//otherwise scheduler will have incorrect date until timeout\r\n\t\t\t\t\t//it can cause js error with 'onMouseMove' handler of key_nav.js\r\n\t\t\t\t\tscheduler._min_date = date;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tschedulerCookie = unescape(schedulerCookie).split(\"@\");\r\n\t\t\t\tschedulerCookie[0] = this._helpers.parseDate(schedulerCookie[0]);\r\n\t\t\t\tvar view = this.isViewExists(schedulerCookie[1]) ? schedulerCookie[1] : mode,\r\n\t\t\t\t\tdate = !isNaN(+schedulerCookie[0]) ? schedulerCookie[0] : date;\r\n\r\n\t\t\t\twindow.setTimeout(function(){\r\n\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tscheduler.setCurrentView(date,view);\r\n\t\t\t\t},1);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", function (newMode , newDate){\r\n\t\tvar cookie = getCookieName(scheduler);\r\n\t\tvar text = escape(this._helpers.formatDate(newDate)+\"@\"+(newMode));\r\n\t\tsetCookie(cookie,\"expires=Sun, 31 Jan 9999 22:00:00 GMT\",text);\r\n\t});\r\n\r\n\t// As we are blocking first render above there could be a problem in case of dynamic loading and rendering of visible data in general ('from'/'to' won't be defined)\r\n\tvar old_load = scheduler._load;\r\n\tscheduler._load = function() {\r\n\t\tvar args = arguments;\r\n\r\n\t\tif (!scheduler._date) {\r\n\t\t\tvar that = this;\r\n\t\t\twindow.setTimeout(function() {\r\n\t\t\t\told_load.apply(that, args);\r\n\t\t\t},1);\r\n\t\t} else {\r\n\t\t\told_load.apply(this, args);\r\n\t\t}\r\n\t};\r\n}","export default {\r\n\talert: (extension, assert) => {\r\n\t\tassert(false, `The ${extension} extension is not included in this version of dhtmlxScheduler.
\r\n\t\tYou may need a Professional version of the component.
\r\n\t\tContact us at https://dhtmlx.com/docs/contact.shtml if you have any questions.`);\r\n\t}\r\n};","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Day Timeline\", scheduler.assert);\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Drag Between\", scheduler.assert);\r\n}","export default function(scheduler){\r\n/* global dhtmlXCombo */\r\nscheduler.form_blocks['combo']={\r\n\trender:function(sns) {\r\n\t\tif (!sns.cached_options)\r\n\t\t\tsns.cached_options = {};\r\n\t\tvar res = '';\r\n\t\tres += \"
\";\r\n\t\treturn res;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\t(function(){\r\n\t\t\tresetCombo();\r\n\t\t\tvar id = scheduler.attachEvent(\"onAfterLightbox\",function(){\r\n\t\t\t\t// otherwise destructor will never be called after form reset(e.g. in readonly event mode)\r\n\t\t\t\tresetCombo();\r\n\t\t\t\tscheduler.detachEvent(id);\r\n\t\t\t});\r\n\t\t\tfunction resetCombo(){\r\n\t\t\t\tif(node._combo && node._combo.DOMParent) {\r\n\t\t\t\t\tvar combo = node._combo;\r\n\t\t\t\t\tif(combo.unload){\r\n\t\t\t\t\t\tcombo.unload();\r\n\t\t\t\t\t}else if(combo.destructor){\r\n\t\t\t\t\t\tcombo.destructor();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// dhtmlxCombo 4.1.0 bug\r\n\t\t\t\t\tcombo.DOMParent = combo.DOMelem = null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})();\r\n\t\twindow.dhx_globalImgPath = config.image_path||'/';\r\n\t\tnode._combo = new dhtmlXCombo(node, config.name, node.offsetWidth-8);\r\n\t\tif (config.onchange)\r\n\t\t\tnode._combo.attachEvent(\"onChange\", config.onchange);\r\n\r\n\t\tif (config.options_height)\r\n\t\t\tnode._combo.setOptionHeight(config.options_height);\r\n\t\tvar combo = node._combo;\r\n\t\tcombo.enableFilteringMode(config.filtering, config.script_path||null, !!config.cache);\r\n\r\n\t\tif (!config.script_path) { // script-side filtration is used\r\n\t\t\tvar all_options = [];\r\n\t\t\tfor (var i = 0; i < config.options.length; i++) {\r\n\t\t\t\tvar option = config.options[i];\r\n\t\t\t\tvar single_option = [\r\n\t\t\t\t\toption.key,\r\n\t\t\t\t\toption.label,\r\n\t\t\t\t\toption.css\r\n\t\t\t\t];\r\n\t\t\t\tall_options.push(single_option);\r\n\t\t\t}\r\n\t\t\tcombo.addOption(all_options);\r\n\t\t\tif (ev[config.map_to]) {\r\n\t\t\t\tvar index = combo.getIndexByValue(ev[config.map_to]);\r\n\t\t\t\tcombo.selectOption(index);\r\n\t\t\t}\r\n\t\t} else { // server-side filtration is used\r\n\t\t\tvar selected_id = ev[config.map_to];\r\n\t\t\tif (selected_id) {\r\n\t\t\t\tif (config.cached_options[selected_id]) {\r\n\t\t\t\t\tcombo.addOption(selected_id, config.cached_options[selected_id]);\r\n\t\t\t\t\tcombo.disable(1);\r\n\t\t\t\t\tcombo.selectOption(0);\r\n\t\t\t\t\tcombo.disable(0);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tscheduler.ajax.get(config.script_path+\"?id=\"+selected_id+\"&uid=\"+scheduler.uid(), function(result){\r\n\t\t\t\t\t\tvar responseText = result.xmlDoc.responseText;\r\n\t\t\t\t\t\tvar label;\r\n\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\tvar res = JSON.parse(responseText);\r\n\t\t\t\t\t\t\tlabel = res.options[0].text;\r\n\t\t\t\t\t\t}catch(e){\r\n\t\t\t\t\t\t\tvar option = scheduler.ajax.xpath(\"//option\", result.xmlDoc)[0];\r\n\t\t\t\t\t\t\tlabel = option.childNodes[0].nodeValue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tconfig.cached_options[selected_id] = label;\r\n\t\t\t\t\t\tcombo.addOption(selected_id, label);\r\n\t\t\t\t\t\tcombo.disable(1);\r\n\t\t\t\t\t\tcombo.selectOption(0);\r\n\t\t\t\t\t\tcombo.disable(0);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tcombo.setComboValue(\"\");\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config) {\r\n\t\tvar selected_id = node._combo.getSelectedValue(); // value = key\r\n\t\tif (config.script_path) {\r\n\t\t\tconfig.cached_options[selected_id] = node._combo.getSelectedText();\r\n\t\t}\r\n\t\treturn selected_id;\r\n\t},\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\nscheduler.form_blocks['radio']={\r\n\trender:function(sns) {\r\n\t\tvar res = '';\r\n\t\tres += `
`;\r\n\t\tfor (var i=0; i\"+\" \"+sns.options[i].label+\"\";\r\n\t\t}\r\n\t\tres += \"
\";\r\n\r\n\t\treturn res;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\tvar radiobuttons = node.getElementsByTagName('input');\r\n\t\tfor (var i = 0; i < radiobuttons.length; i++) {\r\n\t\t\tradiobuttons[i].checked = false;\r\n\t\t\tvar checked_value = ev[config.map_to]||value;\r\n\t\t\tif (radiobuttons[i].value == checked_value) {\r\n\t\t\t\tradiobuttons[i].checked = true;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tvar radiobuttons = node.getElementsByTagName('input');\r\n\t\tfor(var i=0; i
';\r\n\t\telse\r\n\t\t\treturn '';\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\tnode=scheduler._lightbox.querySelector(`#${config.id}`);\r\n\t\tvar id = scheduler.uid();\r\n\t\tvar isChecked = (typeof config.checked_value != \"undefined\") ? value == config.checked_value : !!value;\r\n\t\tnode.className += \" dhx_cal_checkbox\";\r\n\t\tvar check_html = \"\";\r\n\t\tvar label_html = \"\";\r\n\t\tif (scheduler.config.wide_form){\r\n\t\t\tnode.innerHTML = label_html;\r\n\t\t\tnode.nextSibling.innerHTML=check_html;\r\n\t\t} else\r\n\t\t\tnode.innerHTML=check_html+label_html;\r\n\r\n\t\tif (config.handler) {\r\n\t\t\tvar checkbox = node.getElementsByTagName('input')[0];\r\n\t\t\tif(checkbox.$_eventAttached){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tcheckbox.$_eventAttached = true;\r\n\t\t\tscheduler.event(checkbox, \"click\", config.handler);\r\n\t\t\t//checkbox.onclick = config.handler;\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tnode=scheduler._lightbox.querySelector(`#${config.id}`);\r\n\t\tvar checkbox = node.getElementsByTagName('input')[0]; // moved to the header\r\n\t\tif (!checkbox)\r\n\t\t\tcheckbox = node.nextSibling.getElementsByTagName('input')[0];\r\n\t\treturn (checkbox.checked)?(config.checked_value||true):(config.unchecked_value||false);\r\n\t},\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.ext.fullscreen = {\r\n\ttoggleIcon: null\r\n};\r\n\r\nscheduler.expand = function() {\r\n\tif(!scheduler.callEvent(\"onBeforeExpand\", []))\r\n\t\treturn;\r\n\tvar t = scheduler._obj;\r\n\tdo {\r\n\t\tt._position = t.style.position || \"\";\r\n\t\tt.style.position = \"static\";\r\n\t} while ((t = t.parentNode) && t.style);\r\n\tt = scheduler._obj;\r\n\tt.style.position = \"absolute\";\r\n\tt._width = t.style.width;\r\n\tt._height = t.style.height;\r\n\tt.style.width = t.style.height = \"100%\";\r\n\tt.style.top = t.style.left = \"0px\";\r\n\r\n\tvar top = document.body;\r\n\ttop.scrollTop = 0;\r\n\r\n\ttop = top.parentNode;\r\n\tif (top)\r\n\t\ttop.scrollTop = 0;\r\n\tdocument.body._overflow = document.body.style.overflow || \"\";\r\n\tdocument.body.style.overflow = \"hidden\";\r\n\tscheduler._maximize();\r\n\tscheduler.callEvent(\"onExpand\", []);\r\n};\r\nscheduler.collapse = function() {\r\n\tif(!scheduler.callEvent(\"onBeforeCollapse\", []))\r\n\t\treturn;\r\n\tvar t = scheduler._obj;\r\n\tdo {\r\n\t\tt.style.position = t._position;\r\n\t} while ((t = t.parentNode) && t.style);\r\n\tt = scheduler._obj;\r\n\tt.style.width = t._width;\r\n\tt.style.height = t._height;\r\n\tdocument.body.style.overflow = document.body._overflow;\r\n\tscheduler._maximize();\r\n\tscheduler.callEvent(\"onCollapse\", []);\r\n};\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar t = document.createElement(\"div\");\r\n\tt.className = \"dhx_expand_icon\";\r\n\tscheduler.ext.fullscreen.toggleIcon = t;\r\n\tt.innerHTML = `\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t`;\r\n\tscheduler._obj.appendChild(t);\r\n\tscheduler.event(t, \"click\", function() {\r\n\t\tif (!scheduler.expanded)\r\n\t\t\tscheduler.expand(); else\r\n\t\t\tscheduler.collapse();\r\n\t});\r\n});\r\nscheduler._maximize = function() {\r\n\tthis.expanded = !this.expanded;\r\n\tif(this.expanded){\r\n\t\tthis.ext.fullscreen.toggleIcon.classList.add(\"dhx_expand_icon--expanded\");\r\n\t\t\r\n\t}else{\r\n\t\tthis.ext.fullscreen.toggleIcon.classList.remove(\"dhx_expand_icon--expanded\");\r\n\t}\r\n\t\r\n\t//scheduler.ext.fullscreen.toggleIcon.style.backgroundPosition = \"0 \" + (this.expanded ? \"0\" : \"18\") + \"px\";\r\n\r\n\tvar directions = ['left', 'top'];\r\n\tfor (var i = 0; i < directions.length; i++) {\r\n\t\t//var margin = scheduler.xy['margin_' + directions[i]];\r\n\t\tvar prev_margin = scheduler['_prev_margin_' + directions[i]];\r\n\t\tif (scheduler.xy['margin_' + directions[i]]) {\r\n\t\t\tscheduler['_prev_margin_' + directions[i]] = scheduler.xy['margin_' + directions[i]];\r\n\t\t\tscheduler.xy['margin_' + directions[i]] = 0;\r\n\t\t} else {\r\n\t\t\tif (prev_margin) {\r\n\t\t\t\tscheduler.xy['margin_' + directions[i]] = scheduler['_prev_margin_' + directions[i]];\r\n\t\t\t\tdelete scheduler['_prev_margin_' + directions[i]];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler.setCurrentView();\r\n};\r\n\r\n\r\n}\r\n","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Grid\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\tvar els = document.body.getElementsByTagName(\"DIV\");\r\n\tfor (var i=0; i < els.length; i++) {\r\n\t\tvar cs = els[i].className||\"\";\r\n\t\tcs = cs.split(\":\");\r\n\t\tif (cs.length == 2 && cs[0] == \"template\"){\r\n\t\t\tvar code = \"return \\\"\"+(els[i].innerHTML||\"\").replace(/\\\\/g, \"\\\\\\\\\").replace(/\"/g,\"\\\\\\\"\").replace(/[\\n\\r]+/g,\"\")+\"\\\";\";\r\n\t\t\tcode = unescape(code).replace(/\\{event\\.([a-z]+)\\}/g,function(all,mask){\r\n\t\t\t\treturn '\"+ev.'+mask+'+\"';\r\n\t\t\t});\r\n\t\t\tscheduler.templates[cs[1]]=Function(\"start\",\"end\",\"ev\",code);\r\n\t\t\tels[i].style.display='none';\r\n\t\t}\r\n\t}\r\n});\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.shortcuts = {\r\n\tcreateCommand: function(){\r\n\t\treturn {\r\n\t\t\tmodifiers:{\r\n\t\t\t\t\"shift\": false,\r\n\t\t\t\t\"alt\": false,\r\n\t\t\t\t\"ctrl\": false,\r\n\t\t\t\t\"meta\": false\r\n\t\t\t},\r\n\t\t\tkeyCode: null\r\n\t\t};\r\n\t},\r\n\tparse: function(shortcut){\r\n\t\tvar commands = [];\r\n\r\n\t\tvar expr = this.getExpressions(this.trim(shortcut));\r\n\t\tfor(var i = 0; i < expr.length; i++){\r\n\t\t\tvar words = this.getWords(expr[i]);\r\n\r\n\t\t\tvar command = this.createCommand();\r\n\r\n\t\t\tfor(var j = 0; j < words.length; j++){\r\n\t\t\t\tif(this.commandKeys[words[j]]){\r\n\t\t\t\t\tcommand.modifiers[words[j]] = true;\r\n\t\t\t\t}else if(this.specialKeys[words[j]]){\r\n\t\t\t\t\tcommand.keyCode = this.specialKeys[words[j]];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcommand.keyCode = words[j].charCodeAt(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tcommands.push(command);\r\n\t\t}\r\n\t\treturn commands;\r\n\t},\r\n\r\n\tgetCommandFromEvent: function(domEvent){\r\n\t\tvar command = this.createCommand();\r\n\t\tcommand.modifiers.shift = !!domEvent.shiftKey;\r\n\t\tcommand.modifiers.alt = !!domEvent.altKey;\r\n\t\tcommand.modifiers.ctrl = !!domEvent.ctrlKey;\r\n\t\tcommand.modifiers.meta = !!domEvent.metaKey;\r\n\t\tcommand.keyCode = domEvent.which || domEvent.keyCode;\r\n\r\n\t\tif(command.keyCode >= 96 && command.keyCode <= 105){\r\n\t\t\t// numpad keys 96-105 -> 48-57\r\n\t\t\tcommand.keyCode -= 48;//convert numpad number code to regular number code\r\n\t\t}\r\n\r\n\t\tvar printableKey = String.fromCharCode(command.keyCode );\r\n\t\tif(printableKey){\r\n\t\t\tcommand.keyCode = printableKey.toLowerCase().charCodeAt(0);\r\n\t\t}\r\n\t\treturn command;\r\n\t},\r\n\r\n\tgetHashFromEvent: function(domEvent){\r\n\t\treturn this.getHash(this.getCommandFromEvent(domEvent));\r\n\t},\r\n\r\n\tgetHash: function(command){\r\n\t\tvar parts = [];\r\n\t\tfor(var i in command.modifiers){\r\n\t\t\tif(command.modifiers[i]){\r\n\t\t\t\tparts.push(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tparts.push(command.keyCode);\r\n\r\n\t\treturn parts.join(this.junctionChar);\r\n\t},\r\n\r\n\tgetExpressions: function(shortcut){\r\n\t\treturn shortcut.split(this.junctionChar);\r\n\t},\r\n\tgetWords: function(term){\r\n\t\treturn term.split(this.combinationChar);\r\n\t},\r\n\ttrim: function(shortcut){\r\n\t\treturn shortcut.replace(/\\s/g, \"\");\r\n\t},\r\n\tjunctionChar:\",\",\r\n\tcombinationChar:\"+\",\r\n\tcommandKeys:{\r\n\t\t\"shift\": 16,\r\n\t\t\"alt\": 18,\r\n\t\t\"ctrl\": 17,\r\n\t\t\"meta\": true\r\n\t},\r\n\tspecialKeys:{\r\n\t\t\"backspace\": 8,\r\n\t\t\"tab\": 9,\r\n\t\t\"enter\": 13,\r\n\t\t\"esc\": 27,\r\n\t\t\"space\": 32,\r\n\t\t\"up\": 38,\r\n\t\t\"down\": 40,\r\n\t\t\"left\": 37,\r\n\t\t\"right\": 39,\r\n\t\t\"home\": 36,\r\n\t\t\"end\": 35,\r\n\t\t\"pageup\": 33,\r\n\t\t\"pagedown\": 34,\r\n\t\t\"delete\": 46,\r\n\t\t\"insert\": 45,\r\n\t\t\"plus\":107,\r\n\t\t\"f1\": 112,\r\n\t\t\"f2\": 113,\r\n\t\t\"f3\": 114,\r\n\t\t\"f4\": 115,\r\n\t\t\"f5\": 116,\r\n\t\t\"f6\": 117,\r\n\t\t\"f7\": 118,\r\n\t\t\"f8\": 119,\r\n\t\t\"f9\": 120,\r\n\t\t\"f10\": 121,\r\n\t\t\"f11\": 122,\r\n\t\t\"f12\": 123\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.EventHandler = {\r\n\t_handlers: null,\r\n\tfindHandler: function(command){\r\n\t\tif(!this._handlers) this._handlers = {};\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\t\tvar hash = shortcuts.getHash(command);\r\n\r\n\t\treturn this._handlers[hash];\r\n\t},\r\n\r\n\tdoAction: function(command, e){\r\n\t\tvar handler = this.findHandler(command);\r\n\t\tif(handler){\r\n\t\t\thandler.call(this, e);\r\n\r\n\t\t\tif (e.preventDefault) e.preventDefault();\r\n\t\t\telse e.returnValue = false;\r\n\r\n\t\t}\r\n\t},\r\n\tbind: function(shortcut, handler){\r\n\t\tif(!this._handlers) this._handlers = {};\r\n\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\r\n\t\tvar commands = shortcuts.parse(shortcut);\r\n\t\tfor(var i = 0; i < commands.length; i++){\r\n\t\t\tthis._handlers[shortcuts.getHash(commands[i])] = handler;\r\n\t\t}\r\n\t},\r\n\tunbind: function(shortcut){\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\r\n\t\tvar commands = shortcuts.parse(shortcut);\r\n\t\tfor(var i = 0; i < commands.length; i++){\r\n\t\t\tif(this._handlers[shortcuts.getHash(commands[i])]){\r\n\t\t\t\tdelete this._handlers[shortcuts.getHash(commands[i])];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tbindAll: function(map){\r\n\t\tfor(var i in map){\r\n\t\t\tthis.bind(i, map[i]);\r\n\t\t}\r\n\t},\r\n\tinitKeys: function(){\r\n\t\tif(!this._handlers)\r\n\t\t\tthis._handlers = {};\r\n\t\tif(this.keys){\r\n\t\t\tthis.bindAll(this.keys);\r\n\t\t}\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n(function(){\r\n\tscheduler.$keyboardNavigation.getFocusableNodes = scheduler._getFocusableNodes;\r\n\r\n\tscheduler.$keyboardNavigation.trapFocus = function trapFocus(root, e){\r\n\t\tif(e.keyCode != 9) return false;\r\n\r\n\t\tvar focusable = scheduler.$keyboardNavigation.getFocusableNodes(root);\r\n\t\tvar currentFocus = document.activeElement;\r\n\t\tvar currentIndex = -1;\r\n\t\tfor(var i = 0; i < focusable.length; i++){\r\n\t\t\tif(focusable[i] == currentFocus){\r\n\t\t\t\tcurrentIndex = i;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar nextIndex, nextItem;\r\n\t\tif(e.shiftKey){\r\n\r\n\t\t\t// back tab\r\n\t\t\t// go to the last element if we focused on the first\r\n\t\t\tnextIndex = (currentIndex <= 0) ? (focusable.length - 1) : (currentIndex - 1);\r\n\r\n\t\t\tnextItem = focusable[nextIndex];\r\n\t\t\tif(nextItem){\r\n\t\t\t\tnextItem.focus();\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\t// forward tab\r\n\t\t\t// forward tab from last element should go back to the first element\r\n\t\t\tnextIndex = (currentIndex >= focusable.length - 1) ? 0 : (currentIndex + 1);\r\n\t\t\tnextItem = focusable[nextIndex];\r\n\t\t\tif(nextItem){\r\n\t\t\t\tnextItem.focus();\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t};\r\n})();\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.marker = {\r\n\tclear: function(){\r\n\t\tvar divs = scheduler.$container.querySelectorAll(\".dhx_focus_slot\");\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tdivs[i].parentNode.removeChild(divs[i]);\r\n\t\t}\r\n\t},\r\n\tcreateElement: function(){\r\n\t\tvar element = document.createElement(\"div\");\r\n\t\telement.setAttribute(\"tabindex\", -1);\r\n\t\telement.className = \"dhx_focus_slot\";\r\n\t\treturn element;\r\n\t},\r\n\r\n\trenderMultiple: function(start, end, method){\r\n\t\tvar divs = [];\r\n\t\tvar currentStart = new Date(start);\r\n\t\tvar currentEnd = new Date(Math.min(end.valueOf(), scheduler.date.add(scheduler.date.day_start(new Date(start)), 1, \"day\").valueOf()));\r\n\t\twhile(currentStart.valueOf() < end.valueOf()){\r\n\r\n\t\t\tdivs = divs.concat(method.call(this, currentStart, new Date(Math.min(currentEnd.valueOf(), end.valueOf()))));\r\n\t\t\tcurrentStart = scheduler.date.day_start(scheduler.date.add(currentStart, 1, \"day\"));\r\n\r\n\t\t\tcurrentEnd = scheduler.date.day_start(scheduler.date.add(currentStart, 1, \"day\"));\r\n\t\t\tcurrentEnd = new Date(Math.min(currentEnd.valueOf(), end.valueOf()));\r\n\t\t}\r\n\r\n\t\treturn divs;\r\n\t},\r\n\r\n\r\n\trender: function(start, end, section){\r\n\t\tthis.clear();\r\n\t\tvar divs = [];\r\n\r\n\t\tvar modes = scheduler.$keyboardNavigation.TimeSlot.prototype._modes;\r\n\t\tvar view = scheduler.$keyboardNavigation.TimeSlot.prototype._getMode();\r\n\t\tswitch (view){\r\n\t\t\tcase modes.units:\r\n\t\t\t\tdivs = this.renderVerticalMarker(start, end, section);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.timeline:\r\n\t\t\t\tdivs = this.renderTimelineMarker(start, end, section);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.year:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderYearMarker));\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.month:\r\n\t\t\t\tdivs = this.renderMonthMarker(start, end);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.weekAgenda:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderWeekAgendaMarker));\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.list:\r\n\t\t\t\tdivs = this.renderAgendaMarker(start, end);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.dayColumns:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderVerticalMarker));\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tthis.addWaiAriaLabel(divs, start, end, section);\r\n\t\tthis.addDataAttributes(divs, start, end, section);\r\n\r\n\t\tfor(var i = divs.length - 1; i >= 0; i--){\r\n\t\t\tif(divs[i].offsetWidth){\r\n\t\t\t\treturn divs[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t},\r\n\r\n\taddDataAttributes: function(divs, start, end, section){\r\n\t\tvar dateToStr = scheduler.date.date_to_str(scheduler.config.api_date);\r\n\r\n\t\tvar from = dateToStr(start),\r\n\t\t\tto = dateToStr(end);\r\n\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tdivs[i].setAttribute(\"data-start-date\", from);\r\n\t\t\tdivs[i].setAttribute(\"data-end-date\", to);\r\n\t\t\tif(section){\r\n\t\t\t\tdivs[i].setAttribute(\"data-section\", section);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\taddWaiAriaLabel: function(divs, start, end, section){\r\n\t\tvar label = \"\";\r\n\t\tvar state = scheduler.getState();\r\n\t\tvar mode = state.mode;\r\n\r\n\t\tvar dateTimeLabel = false;\r\n\r\n\t\tlabel += scheduler.templates.day_date(start);\r\n\r\n\t\tif((scheduler.date.day_start(new Date(start)).valueOf() != start.valueOf())){\r\n\t\t\tlabel += \" \" + scheduler.templates.hour_scale(start);\r\n\t\t\tdateTimeLabel = true;\r\n\t\t}\r\n\r\n\t\tif((scheduler.date.day_start(new Date(start)).valueOf() != scheduler.date.day_start(new Date(end)).valueOf())){\r\n\r\n\t\t\tlabel += \" - \" + scheduler.templates.day_date(end);\r\n\t\t\tif(dateTimeLabel || (scheduler.date.day_start(new Date(end)).valueOf() != end.valueOf())){\r\n\t\t\t\tlabel += \" \" + scheduler.templates.hour_scale(end);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(section){\r\n\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\t\t\t\tconst timeline = scheduler.matrix[mode];\r\n\t\t\t\tconst sectionObject = timeline.y_unit[timeline.order[section]];\r\n\t\t\t\tlabel += \", \" + scheduler.templates[mode + \"_scale_label\"](sectionObject.key, sectionObject.label, sectionObject);\r\n\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\tconst units = scheduler._props[mode];\r\n\t\t\t\tconst sectionObject = units.options[units.order[section]];\r\n\r\n\t\t\t\tlabel += \", \" + scheduler.templates[mode + \"_scale_text\"](sectionObject.key, sectionObject.label, sectionObject);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tscheduler._waiAria.setAttributes(divs[i], {\r\n\t\t\t\t\"aria-label\": label,\r\n\t\t\t\t\"aria-live\": \"polite\"\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\r\n\trenderWeekAgendaMarker: function(start_date, end_date){\r\n\t\tvar divs = scheduler.$container.querySelectorAll(\".dhx_wa_day_cont .dhx_wa_scale_bar\");\r\n\r\n\t\tvar currDate = scheduler.date.week_start(new Date(scheduler.getState().min_date));\r\n\r\n\t\tvar index = -1;\r\n\t\tvar markerDate = scheduler.date.day_start(new Date(start_date));\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tindex++;\r\n\t\t\tif(scheduler.date.day_start(new Date(currDate)).valueOf() == markerDate.valueOf()){\r\n\t\t\t\tbreak;\r\n\t\t\t}else{\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(index != -1) return this._wrapDiv(divs[index]);\r\n\t\treturn [];\r\n\t},\r\n\r\n\t_wrapDiv: function(cell){\r\n\t\tvar marker = this.createElement();\r\n\t\tmarker.style.top = cell.offsetTop + \"px\";\r\n\t\tmarker.style.left = cell.offsetLeft + \"px\";\r\n\t\tmarker.style.width = cell.offsetWidth + \"px\";\r\n\t\tmarker.style.height = cell.offsetHeight + \"px\";\r\n\t\tcell.appendChild(marker);\r\n\t\treturn [marker];\r\n\t},\r\n\trenderYearMarker: function(start_date, end_date){\r\n\t\tvar cell = scheduler._get_year_cell(start_date);\r\n\t\tcell.style.position = \"relative\";\r\n\t\tvar marker = this.createElement();\r\n\t\tmarker.style.top = \"0px\";\r\n\t\tmarker.style.left = \"0px\";\r\n\t\tmarker.style.width = \"100%\";\r\n\t\tmarker.style.height = \"100%\";\r\n\t\tcell.appendChild(marker);\r\n\t\treturn [marker];\r\n\t},\r\n\r\n\trenderAgendaMarker: function(start_date, end_date){\r\n\t\tvar block = this.createElement();\r\n\t\tblock.style.height = \"1px\";\r\n\t\tblock.style.width = \"100%\";\r\n\t\tblock.style.opacity = 1;\r\n\t\tblock.style.top = \"0px\";\r\n\t\tblock.style.left = \"0px\";\r\n\t\tscheduler.$container.querySelector(\".dhx_cal_data\").appendChild(block);\r\n\t\treturn [block];\r\n\t},\r\n\r\n\trenderTimelineMarker: function(start_date, end_date, section){\r\n\t\tvar view_opts = scheduler._lame_copy({}, scheduler.matrix[scheduler._mode]);\r\n\t\tvar areas = view_opts._scales;\r\n\t\t//timespans must always use actual position, not rounded\r\n\t\tview_opts.round_position = false;\r\n\t\tvar blocks = [];\r\n\r\n\t\tvar min_date = start_date ? new Date(start_date) : scheduler._min_date;\r\n\t\tvar max_date = end_date ? new Date(end_date) : scheduler._max_date;\r\n\r\n\t\tif(min_date.valueOf() < scheduler._min_date.valueOf())\r\n\t\t\tmin_date = new Date(scheduler._min_date);\r\n\t\tif(max_date.valueOf() > scheduler._max_date.valueOf())\r\n\t\t\tmax_date = new Date(scheduler._max_date);\r\n\r\n\t\tif(!view_opts._trace_x) return blocks;\r\n\r\n\t\tfor(var i = 0; i < view_opts._trace_x.length; i++){\r\n\t\t\tif(scheduler._is_column_visible(view_opts._trace_x[i]))\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\tif(i == view_opts._trace_x.length)\r\n\t\t\treturn blocks;\r\n\r\n\t\tvar area = areas[section];\r\n\r\n\t\tif (!(min_date < end_date && max_date > start_date))\r\n\t\t\treturn blocks;\r\n\r\n\t\tvar block = this.createElement();\r\n\r\n\t\tlet start_pos;\r\n\t\tlet end_pos;\r\n\r\n\t\tfunction set_date_part(source, target) {\r\n\t\t\t// reset to start of the month in order to prevent month change when target is on 31th day, and source month has only 30 days\r\n\t\t\ttarget.setDate(1);\r\n\r\n\t\t\ttarget.setFullYear(source.getFullYear());\r\n\t\t\ttarget.setMonth(source.getMonth());\r\n\t\t\ttarget.setDate(source.getDate());\r\n\t\t}\r\n\r\n\t\tif(!scheduler.getView().days){\r\n\t\t\tstart_pos = scheduler._timeline_getX({start_date: start_date}, false, view_opts);\r\n\t\t\tend_pos = scheduler._timeline_getX({start_date: end_date}, false, view_opts);\r\n\t\t}else{\r\n\t\t\t// daytimeline\r\n\t\t\tconst tempStart = new Date(start_date);\r\n\t\t\tset_date_part(scheduler._min_date, tempStart);\r\n\t\t\tconst tempEnd = new Date(end_date);\r\n\t\t\tset_date_part(scheduler._min_date, tempEnd);\r\n\t\t\tstart_pos = scheduler._timeline_getX({start_date: tempStart}, false, view_opts);\r\n\t\t\tend_pos = scheduler._timeline_getX({start_date: tempEnd}, false, view_opts);\r\n\t\t}\r\n\r\n\t\tvar height = ((view_opts._section_height[section]-1) || (view_opts.dy - 1));\r\n\r\n\t\tvar top = 0;\r\n\t\tif (scheduler._isRender('cell')){\r\n\t\t\ttop = area.offsetTop;\r\n\t\t\tstart_pos += view_opts.dx;\r\n\t\t\tend_pos += view_opts.dx;\r\n\t\t\tarea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t}else{\r\n\r\n\t\t}\r\n\t\tvar width = Math.max(1, end_pos - start_pos - 1);\r\n\t\tlet direction = \"left\";\r\n\t\tif(scheduler.config.rtl){\r\n\t\t\tdirection = \"right\";\r\n\t\t}\r\n\t\tblock.style.cssText = `height:${height}px; ${direction}:${start_pos}px; width:${width}px; top:${top}px;`;\r\n\r\n\t\tif(area){\r\n\t\t\tarea.appendChild(block);\r\n\t\t\tblocks.push(block);\r\n\t\t}\r\n\r\n\t\treturn blocks;\r\n\t},\r\n\r\n\trenderMonthCell: function(date){\r\n\t\tvar cells = scheduler.$container.querySelectorAll(\".dhx_month_head\");\r\n\r\n\t\tvar divs = [];\r\n\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\tdivs.push(cells[i].parentNode);\r\n\t\t}\r\n\r\n\t\tvar firstDate = scheduler.date.week_start(new Date(scheduler.getState().min_date));\r\n\r\n\t\tvar index = -1;\r\n\t\tvar weekNumber = 0;\r\n\t\tvar dayIndex = -1;\r\n\t\tvar currDate = firstDate;\r\n\t\tvar markerDate = scheduler.date.day_start(new Date(date));\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tindex++;\r\n\r\n\t\t\tif(dayIndex == 6){\r\n\t\t\t\tweekNumber++;\r\n\t\t\t\tdayIndex = 0;\r\n\t\t\t}else{\r\n\t\t\t\tdayIndex++;\r\n\t\t\t}\r\n\r\n\t\t\tif(scheduler.date.day_start(new Date(currDate)).valueOf() == markerDate.valueOf()){\r\n\t\t\t\tbreak;\r\n\t\t\t}else{\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(index == -1){\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tvar left = scheduler._colsS[dayIndex];\r\n\t\tvar top = scheduler._colsS.heights[weekNumber];\r\n\r\n\t\tvar div = this.createElement();\r\n\t\tdiv.style.top = top + \"px\";\r\n\t\tdiv.style.left = left + \"px\";\r\n\t\tdiv.style.width = scheduler._cols[dayIndex] + \"px\";\r\n\t\tdiv.style.height = ((scheduler._colsS.heights[weekNumber + 1] - top) || scheduler._colsS.height) + \"px\" ;\r\n\r\n\r\n\t\tvar container = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\r\n\t\tvar datatable = container.querySelector(\"table\");\r\n\t\tif(datatable.nextSibling){\r\n\t\t\tcontainer.insertBefore(div, datatable.nextSibling);\r\n\t\t}else{\r\n\t\t\tcontainer.appendChild(div);\r\n\t\t}\r\n\t\treturn div;\r\n\t},\r\n\trenderMonthMarker: function(start_date, end_date){\r\n\t\tvar res = [];\r\n\t\tvar currentDate = start_date;\r\n\t\twhile(currentDate.valueOf() < end_date.valueOf()){\r\n\t\t\tres.push(this.renderMonthCell(currentDate));\r\n\t\t\tcurrentDate = scheduler.date.add(currentDate, 1, \"day\");\r\n\t\t}\r\n\t\treturn res;\r\n\t},\r\n\r\n\trenderVerticalMarker: function(start_date, end_date, section){\r\n\t\tvar index = scheduler.locate_holder_day(start_date);\r\n\r\n\t\tvar divs = [];\r\n\t\tvar area = null;\r\n\r\n\t\tvar c = scheduler.config;\r\n\t\tif(scheduler._ignores[index]) return divs;\r\n\r\n\t\tif (scheduler._props && scheduler._props[scheduler._mode] && section) {\r\n\t\t\tvar view = scheduler._props[scheduler._mode];\r\n\t\t\tindex = view.order[section];\r\n\r\n\t\t\tvar inner_index = view.order[section];\r\n\t\t\tif(!(view.days > 1)){\r\n\t\t\t\tindex = inner_index;\r\n\t\t\t\tif (view.size && (index > view.position+view.size)) {\r\n\t\t\t\t\tindex = 0;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t//var units_l = view.size || view.options.length;\r\n\r\n\t\t\t\tindex = scheduler.locate_holder_day(start_date) + inner_index;\r\n\t\t\t\t//index = index*units_l + inner_index;\r\n\t\t\t}\r\n\t\t}\r\n\t\tarea = scheduler.locate_holder(index);\r\n\t\tif(!area || area.querySelector(\".dhx_scale_hour\")){\r\n\t\t\t// hour scale instead of date column\r\n\t\t\treturn document.createElement(\"div\");\r\n\t\t}\r\n\r\n\t\tvar start = Math.max((start_date.getHours()*60 + start_date.getMinutes()), c.first_hour*60);\r\n\r\n\r\n\t\tvar end = Math.min((end_date.getHours()*60 + end_date.getMinutes()), c.last_hour*60);\r\n\t\tif(!end && (scheduler.date.day_start(new Date(end_date)).valueOf() > scheduler.date.day_start(new Date(start_date)).valueOf())){\r\n\t\t\tend = c.last_hour*60;\r\n\t\t}\r\n\r\n\t\tif (end <= start) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tvar block = this.createElement();\r\n\r\n\t\t// +1 for working with section which really takes up whole height (as % would be == 0)\r\n\t\tvar all_hours_height = scheduler.config.hour_size_px*c.last_hour + 1;\r\n\t\tvar hour_ms = 60*60*1000;\r\n\t\tblock.style.top = (Math.round((start*60*1000-scheduler.config.first_hour*hour_ms)*scheduler.config.hour_size_px/hour_ms) % all_hours_height) + \"px\";\r\n\t\tblock.style.lineHeight = block.style.height = Math.max((Math.round(((end-start)*60*1000)*scheduler.config.hour_size_px/hour_ms)) % all_hours_height, 1)+\"px\";\r\n\t\tblock.style.width = \"100%\";\r\n\t\tarea.appendChild(block);\r\n\t\tdivs.push(block);\r\n\t\treturn divs[0];\r\n\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode = function(){};\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.EventHandler,\r\n\t{\r\n\t\tgetDefaultNode: function(){\r\n\t\t\tvar node = new scheduler.$keyboardNavigation.TimeSlot();\r\n\r\n\t\t\tif(!node.isValid()){\r\n\t\t\t\tnode = node.fallback();\r\n\t\t\t}\r\n\t\t\treturn node;\r\n\t\t},\r\n\r\n\t\t_modes:{\r\n\t\t\tmonth: \"month\",\r\n\t\t\tyear: \"year\",\r\n\t\t\tdayColumns: \"dayColumns\",\r\n\t\t\ttimeline:\"timeline\",\r\n\t\t\tunits:\"units\",\r\n\t\t\tweekAgenda: \"weekAgenda\",\r\n\t\t\tlist: \"list\"\r\n\t\t},\r\n\t\tgetMode: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tvar mode = state.mode;\r\n\t\t\tif((scheduler.matrix && scheduler.matrix[mode])){\r\n\t\t\t\treturn this._modes.timeline;\r\n\t\t\t} else if((scheduler._props && scheduler._props[mode])){\r\n\t\t\t\treturn this._modes.units;\r\n\t\t\t}else if(mode == \"month\"){\r\n\t\t\t\treturn this._modes.month;\r\n\t\t\t}else if(mode == \"year\"){\r\n\t\t\t\treturn this._modes.year;\r\n\t\t\t}else if(mode == \"week_agenda\"){\r\n\t\t\t\treturn this._modes.weekAgenda;\r\n\t\t\t}else if(mode == \"map\" || mode == \"agenda\" || (scheduler._grid && scheduler[\"grid_\" + mode])){\r\n\t\t\t\treturn this._modes.list;\r\n\t\t\t}else{\r\n\t\t\t\treturn this._modes.dayColumns;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.focus();\r\n\t\t},\r\n\r\n\t\tblur: function(){\r\n\r\n\t\t},\r\n\r\n\t\tdisable: function(){\r\n\t\t\tscheduler.$container.setAttribute(\"tabindex\", \"0\");\r\n\t\t},\r\n\t\tenable: function(){\r\n\t\t\tif(scheduler.$container)\r\n\t\t\t\tscheduler.$container.removeAttribute(\"tabindex\");\r\n\t\t},\r\n\t\tisEnabled: function(){\r\n\t\t\treturn scheduler.$container.hasAttribute(\"tabindex\");\r\n\t\t},\r\n\r\n\r\n\t\t_compareEvents: function(a, b){\r\n\t\t\tif (a.start_date.valueOf() == b.start_date.valueOf())\r\n\t\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\t\treturn a.start_date.valueOf() > b.start_date.valueOf() ? 1 : -1;\r\n\t\t},\r\n\r\n\t\t_pickEvent: function(from, to, startId, reverse){\r\n\t\t\tvar range = scheduler.getState();\r\n\t\t\tfrom = new Date(Math.max(range.min_date.valueOf(), from.valueOf()));\r\n\t\t\tto = new Date(Math.min(range.max_date.valueOf(), to.valueOf()));\r\n\r\n\t\t\tvar evs = scheduler.getEvents(from, to);\r\n\t\t\tevs.sort(this._compareEvents);\r\n\t\t\tif(reverse){\r\n\t\t\t\tevs = evs.reverse();\r\n\t\t\t}\r\n\r\n\t\t\tvar trim = !!startId;\r\n\t\t\tfor(var i =0; i < evs.length && trim; i++){\r\n\t\t\t\tif(evs[i].id == startId){\r\n\t\t\t\t\ttrim = false;\r\n\t\t\t\t}\r\n\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\r\n\t\t\tfor(var i = 0; i < evs.length; i++){\r\n\t\t\t\tvar eventElement = new scheduler.$keyboardNavigation.Event(evs[i].id);\r\n\t\t\t\tif(eventElement.getNode())\r\n\t\t\t\t\treturn evs[i];\r\n\t\t\t}\r\n\r\n\t\t\treturn null;\r\n\t\t},\r\n\r\n\t\tnextEventHandler: function(id){\r\n\t\t\tvar activeNode = scheduler.$keyboardNavigation.dispatcher.activeNode;\r\n\r\n\t\t\tvar startId = id || (activeNode && activeNode.eventId);\r\n\r\n\t\t\tvar nextEvent = null;\r\n\t\t\tif(startId && scheduler.getEvent(startId)){\r\n\t\t\t\tvar currEvent = scheduler.getEvent(startId);\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tcurrEvent.start_date,\r\n\t\t\t\t\tscheduler.date.add(currEvent.start_date, 1, \"year\"),\r\n\t\t\t\t\tcurrEvent.id,\r\n\t\t\t\t\tfalse\r\n\t\t\t\t);\r\n\r\n\t\t\t}\r\n\t\t\tif(!nextEvent && !id){\r\n\t\t\t\tvar visibleDates = scheduler.getState();\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tvisibleDates.min_date,\r\n\t\t\t\t\tscheduler.date.add(visibleDates.min_date, 1, \"year\"),\r\n\t\t\t\t\tnull,\r\n\t\t\t\t\tfalse\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tif(nextEvent){\r\n\r\n\t\t\t\tvar nextEv = new scheduler.$keyboardNavigation.Event(nextEvent.id);\r\n\t\t\t\tif(!nextEv.isValid()){// not visible event\r\n\t\t\t\t\tthis.nextEventHandler(nextEvent.id);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(activeNode){activeNode.blur();}\r\n\t\t\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(nextEv);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tprevEventHandler: function(id){\r\n\t\t\tvar activeNode = scheduler.$keyboardNavigation.dispatcher.activeNode;\r\n\r\n\t\t\tvar startId = id || (activeNode && activeNode.eventId);\r\n\r\n\t\t\tvar nextEvent = null;\r\n\t\t\tif(startId && scheduler.getEvent(startId)){\r\n\t\t\t\tvar currEvent = scheduler.getEvent(startId);\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tscheduler.date.add(currEvent.end_date, -1, \"year\"),\r\n\t\t\t\t\tcurrEvent.end_date,\r\n\t\t\t\t\tcurrEvent.id,\r\n\t\t\t\t\ttrue\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t\tif(!nextEvent && !id){\r\n\t\t\t\tvar visibleDates = scheduler.getState();\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tscheduler.date.add(visibleDates.max_date, -1, \"year\"),\r\n\t\t\t\t\tvisibleDates.max_date,\r\n\t\t\t\t\tnull,\r\n\t\t\t\t\ttrue\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tif(nextEvent){\r\n\t\t\t\tvar nextEv = new scheduler.$keyboardNavigation.Event(nextEvent.id);\r\n\t\t\t\tif(!nextEv.isValid()){// not visible event\r\n\t\t\t\t\tthis.prevEventHandler(nextEvent.id);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(activeNode){activeNode.blur();}\r\n\t\t\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(nextEv);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\r\n\t\t\t\"alt+1, alt+2, alt+3, alt+4, alt+5, alt+6, alt+7, alt+8, alt+9\": function(e){\r\n\t\t\t\tvar tabs = scheduler.$keyboardNavigation.HeaderCell.prototype.getNodes(\".dhx_cal_navline .dhx_cal_tab\");\r\n\t\t\t\tvar key = e.key;\r\n\t\t\t\tif(key === undefined){\r\n\t\t\t\t\tkey = e.keyCode - 48;\r\n\t\t\t\t}\r\n\t\t\t\tif(tabs[key*1 - 1]){\r\n\t\t\t\t\ttabs[key*1 - 1].click();\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+left,meta+left\": function(e){\r\n\t\t\t\tscheduler._click.dhx_cal_prev_button();\r\n\t\t\t},\r\n\t\t\t\"ctrl+right,meta+right\": function(e){\r\n\t\t\t\tscheduler._click.dhx_cal_next_button();\r\n\t\t\t},\r\n\t\t\t\"ctrl+up,meta+up\":function(e){\r\n\t\t\t\tvar dataArea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tdataArea.scrollTop -= 20;\r\n\t\t\t},\r\n\t\t\t\"ctrl+down,meta+down\": function(e){\r\n\t\t\t\tvar dataArea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tdataArea.scrollTop += 20;\r\n\t\t\t},\r\n\r\n\r\n\t\t\t\"e\": function(){\r\n\t\t\t\tthis.nextEventHandler();\r\n\t\t\t},\r\n\r\n\t\t\t\"home\": function(){\r\n\t\t\t\tscheduler.setCurrentView(new Date());\r\n\t\t\t},\r\n\r\n\t\t\t\"shift+e\": function(){\r\n\t\t\t\tthis.prevEventHandler();\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+enter,meta+enter\": function(){\r\n\t\t\t\tscheduler.addEventNow({start_date: new Date(scheduler.getState().date)});\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+c,meta+c\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t},\r\n\t\t\t\"ctrl+v,meta+v\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t},\r\n\t\t\t\"ctrl+x,meta+x\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode.prototype.bindAll(scheduler.$keyboardNavigation.SchedulerNode.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.KeyNavNode = function(){};\r\n\r\nscheduler.$keyboardNavigation.KeyNavNode.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.EventHandler,\r\n\t{\r\n\t\tisValid: function(){\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\treturn null;\r\n\t\t},\r\n\r\n\t\tmoveTo: function (element) {\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(element);\r\n\t\t},\r\n\r\n\t\tcompareTo: function(b){\r\n\t\t\t// good enough comparison of two random objects\r\n\t\t\tif(!b) return false;\r\n\t\t\tfor(var i in this){\r\n\t\t\t\tif(!!this[i] != !!b[i]) return false;\r\n\r\n\t\t\t\tvar canStringifyThis = !!(this[i] && this[i].toString);\r\n\t\t\t\tvar canStringifyThat = !!(b[i] && b[i].toString);\r\n\t\t\t\tif(canStringifyThat != canStringifyThis) return false;\r\n\t\t\t\tif(!(canStringifyThat && canStringifyThis)) {\r\n\t\t\t\t\tif(b[i] != this[i]) return false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(b[i].toString() != this[i].toString())\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\r\n\t\tgetNode: function(){},\r\n\t\tfocus: function(){\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif(node){\r\n\t\t\t\tnode.setAttribute(\"tabindex\", \"-1\");\r\n\t\t\t\t//node.className += \" scheduler_focused\";\r\n\t\t\t\tif(node.focus) node.focus();\r\n\t\t\t}\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif(node){\r\n\t\t\t\tnode.setAttribute(\"tabindex\", \"-1\");\r\n\t\t\t\t//node.className = (node.className || \"\").replace(/ ?scheduler_focused/g, \"\");\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.HeaderCell = function(index){\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.HeaderCell.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\tgetNode: function(index){\r\n\t\t\tindex = index || this.index || 0;\r\n\t\t\tvar nodes = this.getNodes();\r\n\t\t\tif(nodes[index]) return nodes[index];\r\n\t\t},\r\n\r\n\t\tgetNodes: function(selector){\r\n\t\t\tselector = selector || [\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_prev_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_next_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_today_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_tab\"\r\n\t\t\t\t].join(\", \");\r\n\r\n\t\t\tvar nodes = Array.prototype.slice.call(scheduler.$container.querySelectorAll(selector));\r\n\t\t\tnodes.sort(function(a, b){\r\n\t\t\t\treturn a.offsetLeft - b.offsetLeft;\r\n\t\t\t});\r\n\t\t\treturn nodes;\r\n\t\t},\r\n\r\n\t\t_handlers:null,\r\n\r\n\t\tisValid: function(){\r\n\t\t\treturn !!this.getNode(this.index);\r\n\t\t},\r\n\t\tfallback:function(){\r\n\t\t\tvar defaultCell = this.getNode(0);\r\n\t\t\tif(!defaultCell){\r\n\t\t\t\tdefaultCell = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}\r\n\t\t\treturn defaultCell;\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tvar newIndex = this.index - 1;\r\n\t\t\t\tif(newIndex < 0){\r\n\t\t\t\t\tnewIndex = this.getNodes().length - 1;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.HeaderCell(newIndex));\r\n\r\n\t\t\t},\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tvar newIndex = this.index + 1;\r\n\t\t\t\tif(newIndex >= this.getNodes().length){\r\n\t\t\t\t\tnewIndex = 0;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.HeaderCell(newIndex));\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t},\r\n\r\n\t\t\t\"enter\": function(){\r\n\t\t\t\tvar node = this.getNode();\r\n\t\t\t\tif(node){\r\n\t\t\t\t\tnode.click();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.HeaderCell.prototype.bindAll(scheduler.$keyboardNavigation.HeaderCell.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.Event = function(id){\r\n\tthis.eventId = null;\r\n\tif(scheduler.getEvent(id)){\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tthis.start = new Date(ev.start_date);\r\n\t\tthis.end = new Date(ev.end_date);\r\n\r\n\t\tthis.section = this._getSection(ev);\r\n\t\tthis.eventId = id;\r\n\t}\r\n};\r\n\r\nscheduler.$keyboardNavigation.Event.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\t_getNodes: function(){\r\n\t\t\treturn Array.prototype.slice.call(scheduler.$container.querySelectorAll(\"[\"+scheduler.config.event_attribute+\"]\"));\r\n\t\t},\r\n\r\n\t\t_modes: scheduler.$keyboardNavigation.SchedulerNode.prototype._modes,\r\n\r\n\t\tgetMode: scheduler.$keyboardNavigation.SchedulerNode.prototype.getMode,\r\n\r\n\t\t_handlers: null,\r\n\t\tisValid: function(){\r\n\t\t\treturn !!(scheduler.getEvent(this.eventId) && this.getNode());\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\tvar eventNode = this._getNodes()[0];\r\n\t\t\tvar defaultElement = null;\r\n\t\t\tif(!eventNode || !(scheduler._locate_event(eventNode))){\r\n\t\t\t\tdefaultElement = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}else{\r\n\t\t\t\tvar id = scheduler._locate_event(eventNode);\r\n\t\t\t\tdefaultElement = new scheduler.$keyboardNavigation.Event(id);\r\n\t\t\t}\r\n\r\n\t\t\treturn defaultElement;\r\n\t\t},\r\n\r\n\t\tisScrolledIntoView: function (el) {\r\n\t\t\tvar eventBox = el.getBoundingClientRect();\r\n\t\t\tvar viewPort = scheduler.$container.querySelector(\".dhx_cal_data\").getBoundingClientRect();\r\n\t\t\t\r\n\t\t\tif(eventBox.bottom < viewPort.top || eventBox.top > viewPort.bottom){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\r\n\t\tgetNode: function(){\r\n\r\n\t\t\tvar idSelector = \"[\"+scheduler.config.event_attribute+\"='\"+this.eventId+\"']\";\r\n\r\n\t\t\tvar inlineEditor = scheduler.$keyboardNavigation.dispatcher.getInlineEditor(this.eventId);\r\n\t\t\tif(inlineEditor){// is inline editor visible\r\n\t\t\t\treturn inlineEditor;\r\n\t\t\t}else{\r\n\t\t\t\tif(scheduler.isMultisectionEvent && scheduler.isMultisectionEvent(scheduler.getEvent(this.eventId))){\r\n\t\t\t\t\tvar nodes = scheduler.$container.querySelectorAll(idSelector);\r\n\t\t\t\t\tfor(var i = 0; i < nodes.length; i++){\r\n\t\t\t\t\t\tif(this.isScrolledIntoView(nodes[i])){\r\n\t\t\t\t\t\t\treturn nodes[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn nodes[0];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn scheduler.$container.querySelector(idSelector);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tvar event = scheduler.getEvent(this.eventId);\r\n\r\n\t\t\tvar calendar = scheduler.getState();\r\n\t\t\tif(event.start_date.valueOf() > calendar.max_date.valueOf() || event.end_date.valueOf() <= calendar.min_date.valueOf()){\r\n\t\t\t\tscheduler.setCurrentView(event.start_date);\r\n\t\t\t}\r\n\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif (this.isScrolledIntoView(node)) {\r\n\t\t\t\tscheduler.$keyboardNavigation.dispatcher.keepScrollPosition((function(){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\t\t}).bind(this));\r\n\t\t\t} else {\r\n\t\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\t}\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\r\n\r\n\t\t_getSection: function(ev){\r\n\t\t\tvar section = null;\r\n\t\t\tvar mode = scheduler.getState().mode;\r\n\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\t\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\t\tsection = ev[timeline.y_property];\r\n\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\tvar unit = scheduler._props[mode];\r\n\t\t\t\tsection = ev[unit.map_to];\r\n\t\t\t}\r\n\t\t\treturn section;\r\n\t\t},\r\n\t\t_moveToSlot: function(dir){\r\n\t\t\tvar ev = scheduler.getEvent(this.eventId);\r\n\t\t\tif(ev){\r\n\t\t\t\tvar section =this._getSection(ev);\r\n\t\t\t\tvar slot = new scheduler.$keyboardNavigation.TimeSlot(ev.start_date, null, section);\r\n\t\t\t\tthis.moveTo(slot.nextSlot(slot, dir));\r\n\t\t\t}else{\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tthis._moveToSlot(\"left\");\r\n\t\t\t},\r\n\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tthis._moveToSlot(\"right\");\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\t\t\t\tif(this.getMode() == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.nextEventHandler();\r\n\t\t\t\t}else {\r\n\t\t\t\t\tthis._moveToSlot(\"down\");\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"space\": function(){\r\n\t\t\t\tvar node = this.getNode();\r\n\t\t\t\tif(node && node.click){\r\n\t\t\t\t\tnode.click();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"up\": function () {\r\n\t\t\t\tif(this.getMode() == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.prevEventHandler();\r\n\t\t\t\t}else {\r\n\t\t\t\t\tthis._moveToSlot(\"up\");\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"delete\": function(){\r\n\t\t\t\tif(scheduler.getEvent(this.eventId)) {\r\n\t\t\t\t\tscheduler._click.buttons[\"delete\"](this.eventId);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t// open lightbox\r\n\t\t\t\"enter\": function () {\r\n\t\t\t\tif(scheduler.getEvent(this.eventId)) {\r\n\t\t\t\t\tscheduler.showLightbox(this.eventId);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\nscheduler.$keyboardNavigation.Event.prototype.bindAll(scheduler.$keyboardNavigation.Event.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.TimeSlot = function(from, to, section, movingDate){\r\n\tvar state = scheduler.getState();\r\n\tvar timeline = scheduler.matrix && scheduler.matrix[state.mode];\r\n\r\n\tif(!from){\r\n\t\tfrom = this.getDefaultDate();\r\n\t}\r\n\r\n\tif(!to){\r\n\r\n\t\tif(timeline){\r\n\t\t\tto = scheduler.date.add(from, timeline.x_step, timeline.x_unit);\r\n\t\t}else{\r\n\t\t\tto = scheduler.date.add(from, scheduler.config.key_nav_step, \"minute\");\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tthis.section = section || this._getDefaultSection();\r\n\tthis.start_date = new Date(from);\r\n\tthis.end_date = new Date(to);\r\n\tthis.movingDate = movingDate || null;\r\n};\r\n\r\nscheduler.$keyboardNavigation.TimeSlot.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\t_handlers:null,\r\n\r\n\t\tgetDefaultDate: function(){\r\n\t\t\tvar from;\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar visibleTime = new Date(state.date);\r\n\t\t\tvisibleTime.setSeconds(0);\r\n\t\t\tvisibleTime.setMilliseconds(0);\r\n\r\n\t\t\tvar nowTime = new Date();\r\n\t\t\tnowTime.setSeconds(0);\r\n\t\t\tnowTime.setMilliseconds(0);\r\n\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[state.mode];\r\n\t\t\tvar showNowTime = false;\r\n\t\t\tif(visibleTime.valueOf() === nowTime.valueOf()){\r\n\t\t\t\tshowNowTime = true;\r\n\t\t\t}\r\n\r\n\t\t\tif(timeline){\r\n\t\t\t\tif(showNowTime){\r\n\t\t\t\t\tif(timeline.x_unit === \"day\"){\r\n\t\t\t\t\t\tnowTime.setHours(0);\r\n\t\t\t\t\t\tnowTime.setMinutes(0);\r\n\t\t\t\t\t}else if(timeline.x_unit === \"hour\"){\r\n\t\t\t\t\t\tnowTime.setMinutes(0);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfrom = nowTime;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfrom = scheduler.date[timeline.name + \"_start\"](new Date(state.date));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfrom = this.findVisibleColumn(from);\r\n\t\t\t}else{\r\n\t\t\t\tfrom = new Date(scheduler.getState().min_date);\r\n\t\t\t\tif(showNowTime){\r\n\t\t\t\t\tfrom = nowTime;\r\n\t\t\t\t}\r\n\t\t\t\tfrom = this.findVisibleColumn(from);\r\n\t\t\t\tif(!showNowTime){\r\n\t\t\t\t\tfrom.setHours(scheduler.config.first_hour);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(!scheduler._table_view){\r\n\t\t\t\t\tvar dataContainer = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\t\tif(dataContainer.scrollTop){\r\n\t\t\t\t\t\tfrom.setHours(scheduler.config.first_hour + Math.ceil(dataContainer.scrollTop / scheduler.config.hour_size_px));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn from;\r\n\t\t},\r\n\r\n\t\tclone: function(timeslot){\r\n\t\t\treturn new scheduler.$keyboardNavigation.TimeSlot(timeslot.start_date, timeslot.end_date, timeslot.section, timeslot.movingDate);\r\n\t\t},\r\n\t\t_getMultisectionView: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view;\r\n\t\t\tif(scheduler._props && scheduler._props[state.mode]) {\r\n\t\t\t\tview = scheduler._props[state.mode];\r\n\t\t\t}else if(scheduler.matrix && scheduler.matrix[state.mode]){\r\n\t\t\t\tview = scheduler.matrix[state.mode];\r\n\t\t\t}\r\n\t\t\treturn view;\r\n\t\t},\r\n\r\n\t\t_getDefaultSection: function(){\r\n\t\t\tvar section = null;\r\n\t\t\tvar view = this._getMultisectionView();\r\n\t\t\tif(view && !section){\r\n\t\t\t\tsection = this._getNextSection();\r\n\t\t\t}\r\n\t\t\treturn section;\r\n\t\t},\r\n\r\n\t\t_getNextSection: function(sectionId, dir){\r\n\t\t\tvar view = this._getMultisectionView();\r\n\t\t\tvar currentIndex = view.order[sectionId];\r\n\t\t\tvar nextIndex = currentIndex;\r\n\t\t\tif(currentIndex !== undefined){\r\n\t\t\t\tnextIndex = currentIndex + dir;\r\n\t\t\t}else{\r\n\t\t\t\tnextIndex = (view.size && view.position) ? view.position : 0;\r\n\t\t\t}\r\n\r\n\t\t\tif(nextIndex < 0){\r\n\t\t\t\tnextIndex = 0;\r\n\t\t\t}\r\n\t\t\tvar options = view.options || view.y_unit;\r\n\r\n\t\t\tif(nextIndex >= options.length){\r\n\t\t\t\tnextIndex = options.length - 1;\r\n\t\t\t}\r\n\t\t\t//nextIndex = nextIndex < 0 ? nextIndex = (view.options || view.y_unit).length -1 : nextIndex;\r\n\r\n\t\t\tif(options[nextIndex]){\r\n\t\t\t\treturn options[nextIndex].key;\r\n\t\t\t}else{\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar isInRange = !(this.start_date.valueOf() < state.min_date.valueOf() || this.start_date.valueOf() >= state.max_date.valueOf());\r\n\r\n\t\t\tif(!isInRange) return false;\r\n\r\n\r\n\t\t\tif(!this.isVisible(this.start_date, this.end_date)) return false;\r\n\r\n\t\t\tvar view = this._getMultisectionView();\r\n\r\n\t\t\tif(view){\r\n\t\t\t\treturn (view.order[this.section] !== undefined);\r\n\t\t\t}else{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t},\r\n\r\n\t\tfallback:function(){\r\n\r\n\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(!defaultSlot.isValid()){\r\n\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t}else{\r\n\t\t\t\treturn defaultSlot;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tgetNodes: function(){\r\n\t\t\treturn Array.prototype.slice.call(scheduler.$container.querySelectorAll(\".dhx_focus_slot\"));\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\treturn this.getNodes()[0];\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tif(this.section && scheduler.getView() && scheduler.getView().smart_rendering && scheduler.getView().scrollTo && !scheduler.$container.querySelector(`[data-section-id=\"${this.section}\"]`)){\r\n\t\t\t\tscheduler.getView().scrollTo({section: this.section});\r\n\t\t\t}\r\n\t\t\tscheduler.$keyboardNavigation.marker.render(this.start_date, this.end_date, this.section);\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\tscheduler.$keyboardNavigation._pasteDate = this.start_date;\r\n\t\t\tscheduler.$keyboardNavigation._pasteSection = this.section;\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t\tscheduler.$keyboardNavigation.marker.clear();\r\n\t\t},\r\n\r\n\t\t_modes: scheduler.$keyboardNavigation.SchedulerNode.prototype._modes,\r\n\r\n\t\t_getMode: scheduler.$keyboardNavigation.SchedulerNode.prototype.getMode,\r\n\r\n\t\taddMonthDate: function(date, dir, extend){\r\n\t\t\tvar res;\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tres = scheduler.date.add(date, -1, \"week\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tres = scheduler.date.add(date, 1, \"week\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tres = scheduler.date.day_start(scheduler.date.add(date, -1, \"day\"));\r\n\t\t\t\t\tres = this.findVisibleColumn(res, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tres = scheduler.date.day_start(scheduler.date.add(date, 1, \"day\"));\r\n\t\t\t\t\tres = this.findVisibleColumn(res, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tres = scheduler.date.day_start(new Date(date));\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tif(date.valueOf() < state.min_date.valueOf() || (!extend && date.valueOf() >= state.max_date.valueOf())){\r\n\t\t\t\tres = new Date(state.min_date);\r\n\t\t\t}\r\n\r\n\t\t\treturn res;\r\n\t\t},\r\n\r\n\t\tnextMonthSlot: function(slot, dir, extend){\r\n\r\n\t\t\tvar start, end;\r\n\t\t\tstart = this.addMonthDate(slot.start_date, dir, extend);\r\n\r\n\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\tend = new Date(start);\r\n\t\t\tend.setHours(scheduler.config.last_hour);\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\r\n\t\t_alignTimeSlot: function(date, minDate, unit, step){\r\n\t\t\tvar currentDate = new Date(minDate);\r\n\t\t\twhile(currentDate.valueOf() < date.valueOf()){\r\n\t\t\t\tcurrentDate = scheduler.date.add(currentDate, step, unit);\r\n\t\t\t}\r\n\r\n\t\t\tif(currentDate.valueOf() > date.valueOf()){\r\n\t\t\t\tcurrentDate = scheduler.date.add(currentDate, -step, unit);\r\n\t\t\t}\r\n\r\n\t\t\treturn currentDate;\r\n\t\t},\r\n\r\n\t\tnextTimelineSlot: function(slot, dir, extend){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view = scheduler.matrix[state.mode];\r\n\r\n\t\t\tvar startDate = this._alignTimeSlot(slot.start_date, scheduler.date[view.name + \"_start\"](new Date(slot.start_date)), view.x_unit, view.x_step);\r\n\t\t\tvar endDate = this._alignTimeSlot(slot.end_date, scheduler.date[view.name + \"_start\"](new Date(slot.end_date)), view.x_unit, view.x_step);\r\n\r\n\t\t\tif(endDate.valueOf() <= startDate.valueOf()){\r\n\t\t\t\tendDate = scheduler.date.add(startDate, view.x_step, view.x_unit);\r\n\t\t\t}\r\n\t\t\tvar newPos = this.clone(slot);\r\n\t\t\tnewPos.start_date = startDate;\r\n\t\t\tnewPos.end_date = endDate;\r\n\t\t\tnewPos.section = slot.section || this._getNextSection();\r\n\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tnewPos.section = this._getNextSection(slot.section, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tnewPos.section = this._getNextSection(slot.section, +1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tnewPos.start_date = this.findVisibleColumn(scheduler.date.add(newPos.start_date, -view.x_step, view.x_unit), -1);\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tnewPos.start_date = this.findVisibleColumn(scheduler.date.add(newPos.start_date, view.x_step, view.x_unit), 1);\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(newPos.start_date.valueOf() < state.min_date.valueOf() || newPos.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tif(extend && newPos.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\t\tnewPos.start_date = new Date(state.max_date);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tnewPos.start_date = scheduler.date[state.mode + \"_start\"](scheduler.date.add(state.date, dir == \"left\" ? -1 : 1, state.mode));\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn newPos;\r\n\t\t},\r\n\r\n\t\tnextUnitsSlot: function(slot, dir, extend){\r\n\t\t\tvar newPos = this.clone(slot);\r\n\t\t\tnewPos.section = slot.section || this._getNextSection();\r\n\r\n\t\t\tvar section = slot.section || this._getNextSection();\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view = scheduler._props[state.mode];\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tsection = this._getNextSection(slot.section, -1);\r\n\t\t\t\t\tvar optionsCount = view.size ? (view.size - 1) : view.options.length;\r\n\r\n\t\t\t\t\tif(view.days > 1 && (view.order[section] == optionsCount - 1)){\r\n\t\t\t\t\t\tif(scheduler.date.add(slot.start_date, -1, \"day\").valueOf() >= state.min_date.valueOf()){\r\n\t\t\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tsection = this._getNextSection(slot.section, 1);\r\n\t\t\t\t\tif(view.days > 1 && !view.order[section]){\r\n\t\t\t\t\t\tif(scheduler.date.add(slot.start_date, 1, \"day\").valueOf() < state.max_date.valueOf()){\r\n\t\t\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\tsection = slot.section;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tnewPos.section = section;\r\n\t\t\treturn newPos;\r\n\t\t},\r\n\r\n\t\t_moveDate: function(oldDate, dir){\r\n\t\t\tvar newDate = this.findVisibleColumn(scheduler.date.add(oldDate, dir, \"day\"), dir);\r\n\t\t\tnewDate.setHours(oldDate.getHours());\r\n\t\t\tnewDate.setMinutes(oldDate.getMinutes());\r\n\t\t\treturn newDate;\r\n\t\t},\r\n\r\n\t\tisBeforeLastHour: function(date, isStartDate){\r\n\t\t\tvar minutes = date.getMinutes(),\r\n\t\t\t\thours = date.getHours(),\r\n\t\t\t\tlast_hour = scheduler.config.last_hour;\r\n\t\t\treturn (hours < last_hour || (!isStartDate && ((last_hour == 24 || hours == last_hour) && !minutes)));\r\n\t\t},\r\n\t\tisAfterFirstHour: function(date, isStartDate){\r\n\t\t\tvar minutes = date.getMinutes(),\r\n\t\t\t\thours = date.getHours(),\r\n\t\t\t\tfirst_hour = scheduler.config.first_hour,\r\n\t\t\t\tlast_hour = scheduler.config.last_hour;\r\n\t\t\treturn (hours >= first_hour || (!isStartDate && (!minutes && ((!hours && last_hour == 24) || (hours == last_hour)))));\r\n\t\t},\r\n\t\tisInVisibleDayTime: function(date, isStartDate){\r\n\t\t\treturn (this.isBeforeLastHour(date, isStartDate) && this.isAfterFirstHour(date, isStartDate));\r\n\t\t},\r\n\r\n\t\tnextDaySlot: function(slot, dir, extend){\r\n\t\t\tvar start, end;\r\n\r\n\t\t\tvar key_nav_step = scheduler.config.key_nav_step;\r\n\r\n\t\t\tvar date = this._alignTimeSlot(slot.start_date, scheduler.date.day_start(new Date(slot.start_date)), \"minute\", key_nav_step);\r\n\r\n\r\n\t\t\tvar oldStart = slot.start_date;\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tstart = scheduler.date.add(date, -key_nav_step, \"minute\");\r\n\r\n\t\t\t\t\tif(!this.isInVisibleDayTime(start, true)){\r\n\t\t\t\t\t\tif (!extend || this.isInVisibleDayTime(oldStart, true)) {\r\n\r\n\t\t\t\t\t\t\tvar toNextDay = true;\r\n\t\t\t\t\t\t\tif(extend && scheduler.date.date_part(new Date(start)).valueOf() != scheduler.date.date_part(new Date(oldStart)).valueOf())\r\n\t\t\t\t\t\t\t\ttoNextDay = false;\r\n\t\t\t\t\t\t\tif(toNextDay)\r\n\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, -1, \"day\"), -1);\r\n\r\n\t\t\t\t\t\t\tstart.setHours(scheduler.config.last_hour);\r\n\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\tstart = scheduler.date.add(start, -key_nav_step, \"minute\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tstart = scheduler.date.add(date, key_nav_step, \"minute\");\r\n\r\n\t\t\t\t\tvar testEnd = extend ? start : scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tif(!this.isInVisibleDayTime(testEnd, false)){\r\n\t\t\t\t\t\tif(!extend || this.isInVisibleDayTime(oldStart, false)) {\r\n\t\t\t\t\t\t\tif (!extend) {\r\n\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, 1, \"day\"), 1);\r\n\t\t\t\t\t\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tvar toNextDay = true;\r\n\t\t\t\t\t\t\t\tif (scheduler.date.date_part(new Date(oldStart)).valueOf() == oldStart.valueOf()) {\r\n\t\t\t\t\t\t\t\t\ttoNextDay = false;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (toNextDay) {\r\n\t\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, 1, \"day\"), 1);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\t\tstart = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tstart = this._moveDate(slot.start_date, -1);\r\n\t\t\t\t\tend = this._moveDate(slot.end_date, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tstart = this._moveDate(slot.start_date, 1);\r\n\t\t\t\t\tend = this._moveDate(slot.end_date, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tstart = date;\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\t\tnextWeekAgendaSlot: function(slot, dir){\r\n\t\t\tvar start, end;\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tstart = scheduler.date.day_start(scheduler.date.add(slot.start_date, -1, \"day\"));\r\n\t\t\t\t\tstart = this.findVisibleColumn(start, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tstart = scheduler.date.day_start(scheduler.date.add(slot.start_date, 1, \"day\"));\r\n\t\t\t\t\tstart = this.findVisibleColumn(start, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tstart = scheduler.date.day_start(slot.start_date);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif(slot.start_date.valueOf() < state.min_date.valueOf() || slot.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tstart = new Date(state.min_date);\r\n\r\n\t\t\t}\r\n\t\t\tend = new Date(start);\r\n\t\t\tend.setHours(scheduler.config.last_hour);\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\t\tnextAgendaSlot: function(slot, dir){\r\n\t\t\treturn {start_date: slot.start_date, end_date: slot.end_date};\r\n\t\t},\r\n\r\n\r\n\t\tisDateVisible: function(date){\r\n\t\t\tif(!scheduler._ignores_detected)\r\n\t\t\t\treturn true;\r\n\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[scheduler.getState().mode];\r\n\r\n\t\t\tvar index;\r\n\t\t\tif(timeline){\r\n\t\t\t\tindex = scheduler._get_date_index(timeline, date);\r\n\t\t\t}else{\r\n\t\t\t\tindex = scheduler.locate_holder_day(date);\r\n\t\t\t}\r\n\r\n\t\t\treturn !scheduler._ignores[index];\r\n\t\t},\r\n\r\n\t\tfindVisibleColumn: function(start, dir){\r\n\t\t\tvar date = start;\r\n\t\t\tdir = dir || 1;\r\n\t\t\tvar range = scheduler.getState();\r\n\r\n\t\t\twhile(!this.isDateVisible(date) && ((dir > 0 && date.valueOf() <= range.max_date.valueOf()) || (dir < 0 && date.valueOf() >= range.min_date.valueOf()))){\r\n\t\t\t\tdate = this.nextDateColumn(date, dir);\r\n\t\t\t}\r\n\r\n\t\t\treturn date;\r\n\t\t},\r\n\r\n\t\tnextDateColumn: function(start, dir){\r\n\t\t\tdir = dir || 1;\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[scheduler.getState().mode];\r\n\r\n\t\t\tvar date;\r\n\t\t\tif(timeline){\r\n\t\t\t\tdate = scheduler.date.add(start, dir * timeline.x_step, timeline.x_unit);\r\n\t\t\t}else{\r\n\t\t\t\tdate = scheduler.date.day_start(scheduler.date.add(start, dir, \"day\"));\r\n\t\t\t}\r\n\r\n\t\t\treturn date;\r\n\t\t},\r\n\r\n\t\tisVisible:function(from, to){\r\n\t\t\tif(!scheduler._ignores_detected)\r\n\t\t\t\treturn true;\r\n\r\n\t\t\tvar current = new Date(from);\r\n\r\n\t\t\twhile(current.valueOf() < to.valueOf()){\r\n\t\t\t\tif(this.isDateVisible(current)) return true;\r\n\t\t\t\tcurrent = this.nextDateColumn(current);\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t},\r\n\r\n\t\tnextSlot: function(slot, dir, view, extend){\r\n\t\t\tvar next;\r\n\t\t\tview = view || this._getMode();\r\n\r\n\t\t\tvar tempSlot = scheduler.$keyboardNavigation.TimeSlot.prototype.clone(slot);\r\n\r\n\t\t\tswitch (view){\r\n\t\t\t\tcase this._modes.units:\r\n\t\t\t\t\tnext = this.nextUnitsSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.timeline:\r\n\t\t\t\t\tnext = this.nextTimelineSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.year:\r\n\t\t\t\t\tnext = this.nextMonthSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.month:\r\n\t\t\t\t\tnext = this.nextMonthSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.weekAgenda:\r\n\t\t\t\t\tnext = this.nextWeekAgendaSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.list:\r\n\t\t\t\t\tnext = this.nextAgendaSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.dayColumns:\r\n\t\t\t\t\tnext = this.nextDaySlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(next.start_date.valueOf() >= next.end_date.valueOf()){\r\n\t\t\t\tnext = this.nextSlot(next, dir, view);\r\n\t\t\t}\r\n\r\n\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(next);\r\n\r\n\t\t},\r\n\r\n\t\textendSlot: function(slot, dir){\r\n\t\t\tvar view = this._getMode();\r\n\t\t\tvar next;\r\n\t\t\tswitch (view){\r\n\t\t\t\tcase this._modes.units:\r\n\t\t\t\t\tif(dir == \"left\" || dir == \"right\"){\r\n\t\t\t\t\t\tnext = this.nextUnitsSlot(slot, dir);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnext = this.extendUnitsSlot(slot, dir);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.timeline:\r\n\t\t\t\t\tif(dir == \"down\" || dir == \"up\"){\r\n\t\t\t\t\t\tnext = this.nextTimelineSlot(slot, dir);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnext = this.extendTimelineSlot(slot, dir);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.year:\r\n\t\t\t\t\tnext = this.extendMonthSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.month:\r\n\t\t\t\t\tnext = this.extendMonthSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.dayColumns:\r\n\t\t\t\t\tnext = this.extendDaySlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.weekAgenda:\r\n\t\t\t\t\tnext = this.extendWeekAgendaSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnext = slot;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tvar range = scheduler.getState();\r\n\t\t\tif(next.start_date.valueOf() < range.min_date.valueOf()){\r\n\t\t\t\tnext.start_date = this.findVisibleColumn(range.min_date);\r\n\t\t\t\tnext.start_date.setHours(scheduler.config.first_hour);\r\n\t\t\t}\r\n\r\n\t\t\tif(next.end_date.valueOf() > range.max_date.valueOf()){\r\n\t\t\t//\tnext.end_date = new Date(slot.end_date);\r\n\t\t\t\tnext.end_date = this.findVisibleColumn(range.max_date, -1);\r\n\t\t\t}\r\n\r\n\r\n\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(next);\r\n\t\t},\r\n\r\n\t\textendTimelineSlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"timeline\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\textendWeekAgendaSlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"weekAgenda\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\textendGenericSlot: function(allowedDirections, slot, direction, type){\r\n\t\t\tvar next;\r\n\t\t\tvar moveDate = slot.movingDate;\r\n\r\n\t\t\tif(!moveDate){\r\n\t\t\t\tmoveDate = allowedDirections[direction];\r\n\t\t\t}\r\n\r\n\t\t\tif(!moveDate || !allowedDirections[direction]){\r\n\t\t\t\treturn slot;\r\n\t\t\t}\r\n\r\n\t\t\tif(direction){\r\n\t\t\t\tnext = this.nextSlot({start_date: slot[moveDate], section: slot.section}, direction, type, true);\r\n\r\n\t\t\t\tif(next.start_date.valueOf() == slot.start_date.valueOf()){\r\n\t\t\t\t\tnext = this.nextSlot({start_date: next.start_date, section:next.section}, direction, type, true);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tnext.movingDate = moveDate;\r\n\t\t\t}else{\r\n\t\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(slot);\r\n\t\t\t}\r\n\r\n\t\t\tvar newDates = this.extendSlotDates(slot, next, next.movingDate);\r\n\r\n\t\t\tif(newDates.end_date.valueOf() <= newDates.start_date.valueOf()){\r\n\t\t\t\tnext.movingDate = next.movingDate == \"end_date\" ? \"start_date\" : \"end_date\";\r\n\t\t\t}\r\n\t\t\tnewDates = this.extendSlotDates(slot, next, next.movingDate);\r\n\r\n\t\t\tnext.start_date = newDates.start_date;\r\n\t\t\tnext.end_date = newDates.end_date;\r\n\t\t\treturn next;\r\n\t\t},\r\n\r\n\t\textendSlotDates: function(oldSlot, newSlot, dateDirection){\r\n\t\t\tvar res = {start_date:null, end_date:null};\r\n\r\n\t\t\tif(dateDirection == \"start_date\"){\r\n\t\t\t\tres.start_date = newSlot.start_date;\r\n\t\t\t\tres.end_date = oldSlot.end_date;\r\n\t\t\t}else{\r\n\t\t\t\tres.start_date = oldSlot.start_date;\r\n\t\t\t\tres.end_date = newSlot.start_date;\r\n\t\t\t}\r\n\t\t\treturn res;\r\n\r\n\t\t},\r\n\r\n\t\textendMonthSlot: function(slot, direction){\r\n\t\t\tvar slot = this.extendGenericSlot({\r\n\t\t\t\t\t\"up\":\"start_date\",\r\n\t\t\t\t\t\"down\":\"end_date\",\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"month\"\r\n\t\t\t);\r\n\r\n\t\t\tslot.start_date.setHours(scheduler.config.first_hour);\r\n\t\t\tslot.end_date = scheduler.date.add(slot.end_date, -1, \"day\");\r\n\t\t\tslot.end_date.setHours(scheduler.config.last_hour);\r\n\t\t\treturn slot;\r\n\t\t},\r\n\r\n\t\textendUnitsSlot: function(slot, direction){\r\n\t\t\tvar next;\r\n\r\n\t\t\tswitch (direction){\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tnext = this.extendDaySlot(slot, direction);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnext = slot;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tnext.section = slot.section;\r\n\t\t\treturn next;\r\n\t\t},\r\n\t\textendDaySlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\t\"up\":\"start_date\",\r\n\t\t\t\t\t\"down\":\"end_date\",\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"dayColumns\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\tscrollSlot: function(dir){\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tvar slot = this.nextSlot(this, dir);\r\n\t\t\tif(slot.start_date.valueOf() < state.min_date.valueOf() || slot.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tscheduler.setCurrentView(new Date(slot.start_date));\r\n\t\t\t}\r\n\r\n\t\t\tthis.moveTo(slot);\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tthis.scrollSlot(\"left\");\r\n\t\t\t},\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tthis.scrollSlot(\"right\");\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\r\n\t\t\t\tvar mode = this._getMode();\r\n\t\t\t\tif(mode == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.nextEventHandler();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.scrollSlot(\"down\");\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"up\": function () {\r\n\t\t\t\tvar mode = this._getMode();\r\n\t\t\t\tif(mode == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.prevEventHandler();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.scrollSlot(\"up\");\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"shift+down\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"down\"));\r\n\t\t\t},\r\n\t\t\t\"shift+up\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"up\"));\r\n\t\t\t},\r\n\t\t\t\"shift+right\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"right\"));\r\n\t\t\t},\r\n\t\t\t\"shift+left\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"left\"));\r\n\t\t\t},\r\n\r\n\r\n\t\t\t\"enter\": function(){\r\n\t\t\t\tvar obj = {start_date: new Date(this.start_date), end_date: new Date(this.end_date)};\r\n\r\n\t\t\t\tvar mode = scheduler.getState().mode;\r\n\t\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\r\n\t\t\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\t\t\tobj[timeline.y_property] = this.section;\r\n\t\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\t\tvar unit = scheduler._props[mode];\r\n\t\t\t\t\tobj[unit.map_to] = this.section;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler.addEventNow(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.TimeSlot.prototype.bindAll(scheduler.$keyboardNavigation.TimeSlot.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.MinicalButton = function(div, index){\r\n\tthis.container = div;\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.MinicalButton.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar container = this.container;\r\n\t\t\treturn !!container.offsetWidth;// valid if container is visible\r\n\t\t},\r\n\r\n\t\tfallback: function(){\r\n\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(defaultSlot.isValid()){\r\n\t\t\t\treturn defaultSlot;\r\n\t\t\t}else{\r\n\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t}\r\n\t\t},\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.globalNode.disable();\r\n\t\t\tthis.container.removeAttribute(\"tabindex\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tthis.container.setAttribute(\"tabindex\", \"0\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\tif(!this.index){\r\n\t\t\t\treturn this.container.querySelector(\".dhx_cal_prev_button\");\r\n\t\t\t}else{\r\n\t\t\t\treturn this.container.querySelector(\".dhx_cal_next_button\");\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"right\": function(e){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, this.index ? 0 : 1));\r\n\t\t\t},\r\n\t\t\t\"left\": function(e){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, this.index ? 0 : 1));\r\n\t\t\t},\r\n\t\t\t\"down\": function(){\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, 0, 0);\r\n\t\t\t\tif(next && !next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"enter\": function(e){\r\n\t\t\t\tthis.getNode().click();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.MinicalButton.prototype.bindAll(scheduler.$keyboardNavigation.MinicalButton.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.MinicalCell = function(div, row, col){\r\n\tthis.container = div;\r\n\tthis.row = row || 0;\r\n\tthis.col = col || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.MinicalCell.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar grid = this._getGrid();\r\n\t\t\treturn !!(grid[this.row] && grid[this.row][this.col]);\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\tvar row = this.row;\r\n\t\t\tvar col = this.col;\r\n\t\t\tvar grid = this._getGrid();\r\n\t\t\tif(!grid[row]){\r\n\t\t\t\trow = 0;\r\n\t\t\t}\r\n\t\t\tvar dir = true;\r\n\t\t\tif(row > grid.length / 2){\r\n\t\t\t\tdir = false;\r\n\t\t\t}\r\n\r\n\t\t\tif(!grid[row]){\r\n\t\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t\tif(defaultSlot.isValid()){\r\n\t\t\t\t\treturn defaultSlot;\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(dir){\r\n\t\t\t\tfor(var c = col; grid[row] && c < grid[row].length; c++){\r\n\t\t\t\t\tif(!grid[row][c] && c == grid[row].length - 1){\r\n\t\t\t\t\t\trow++;\r\n\t\t\t\t\t\tcol = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(grid[row][c]){\r\n\t\t\t\t\t\treturn new scheduler.$keyboardNavigation.MinicalCell(this.container, row, c);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tfor(var c = col; grid[row] && c < grid[row].length; c--){\r\n\t\t\t\t\tif(!grid[row][c] && !c){\r\n\t\t\t\t\t\trow--;\r\n\t\t\t\t\t\tcol = grid[row].length - 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(grid[row][c]){\r\n\t\t\t\t\t\treturn new scheduler.$keyboardNavigation.MinicalCell(this.container, row, c);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn new scheduler.$keyboardNavigation.MinicalButton(this.container, 0);\r\n\t\t},\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.globalNode.disable();\r\n\r\n\t\t\tthis.container.removeAttribute(\"tabindex\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tthis.container.setAttribute(\"tabindex\", \"0\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\t\t_getNode: function(row, col){\r\n\t\t\treturn this.container.querySelector(\".dhx_year_body tr:nth-child(\"+(row + 1) + \") td:nth-child(\"+(col + 1)+\")\");\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\treturn this._getNode(this.row, this.col);\r\n\t\t},\r\n\r\n\t\t_getGrid: function(){\r\n\t\t\tvar rows = this.container.querySelectorAll(\".dhx_year_body tr\");\r\n\t\t\tvar grid = [];\r\n\t\t\tfor(var i = 0; i < rows.length; i++){\r\n\t\t\t\tgrid[i] = [];\r\n\t\t\t\tvar row = rows[i];\r\n\t\t\t\tvar cells = row.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var c = 0; c < cells.length; c++){\r\n\t\t\t\t\tvar cell = cells[c];\r\n\t\t\t\t\tvar enabled = true;\r\n\t\t\t\t\tvar css = scheduler._getClassName(cell);\r\n\t\t\t\t\tif(css.indexOf(\"dhx_after\") > -1 || css.indexOf(\"dhx_before\") > -1 || css.indexOf(\"dhx_scale_ignore\") > -1){\r\n\t\t\t\t\t\tenabled = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tgrid[i][c] = enabled;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn grid;\r\n\t\t},\r\n\r\n\r\n\t\tkeys: {\r\n\t\t\t\"right\": function(e){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row;\r\n\t\t\t\tvar newCol = this.col + 1;\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tif(grid[newRow + 1]){\r\n\t\t\t\t\t\tnewRow = newRow + 1;\r\n\t\t\t\t\t\tnewCol = 0;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnewCol = this.col;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"left\": function(e){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row;\r\n\t\t\t\tvar newCol = this.col - 1;\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tif(grid[newRow - 1]){\r\n\t\t\t\t\t\tnewRow = newRow - 1;\r\n\t\t\t\t\t\tnewCol = grid[newRow].length - 1;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnewCol = this.col;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"down\": function(){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row + 1;\r\n\t\t\t\tvar newCol = this.col;\r\n\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tnewRow = this.row;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"up\": function(){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row - 1;\r\n\t\t\t\tvar newCol = this.col;\r\n\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tvar index = 0;\r\n\t\t\t\t\tif(this.col > grid[this.row].length / 2){\r\n\t\t\t\t\t\tindex = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, index));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.moveTo(next);\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\t\t\t\"enter\": function(e){\r\n\t\t\t\tthis.getNode().querySelector(\".dhx_month_head\").click();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.MinicalCell.prototype.bindAll(scheduler.$keyboardNavigation.MinicalCell.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.DataArea = function(index){\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.DataArea.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\tgetNode: function(index){\r\n\t\t\treturn scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t},\r\n\r\n\t\t_handlers:null,\r\n\r\n\t\tisValid: function(){\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tfallback:function(){\r\n\t\t\treturn this;\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"up,down,right,left\":function(){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.DataArea.prototype.bindAll(scheduler.$keyboardNavigation.DataArea.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\n\r\n\r\n(function(){\r\n\tvar modalsStack = [];\r\n\r\n\tfunction isModal(){\r\n\t\treturn !!(modalsStack.length);\r\n\t}\r\n\r\n\tfunction isChildOf(child, parent){\r\n\t\twhile(child && child != parent){\r\n\t\t\tchild = child.parentNode;\r\n\t\t}\r\n\r\n\t\treturn !!(child == parent);\r\n\t}\r\n\r\n\tfunction afterPopup(box){\r\n\t\tsetTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tif(!isModal() && !(isChildOf(document.activeElement, scheduler.$container))) {\r\n\t\t\t\tscheduler.focus();\r\n\t\t\t}\r\n\t\t}, 1);\r\n\t}\r\n\tfunction startModal(box){\r\n\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\tscheduler.event(box, \"keydown\", trapFocus);\r\n\t\tmodalsStack.push(box);\r\n\t\t//scheduler.$keyboardNavigation.dispatcher.disable();\r\n\t}\r\n\r\n\tfunction endModal(){\r\n\t\tvar box = modalsStack.pop();\r\n\t\tif(box) {\r\n\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t}\r\n\t\tafterPopup(box);\r\n\r\n\t}\r\n\r\n\tfunction isTopModal(box){\r\n\t//\tif(dhtmlx._modalsStack.length){\r\n\t//\t\treturn box == dhtmlx._modalsStack[dhtmlx._modalsStack.length - 1];\r\n\t//\t}else{\r\n\t\t\treturn box == modalsStack[modalsStack.length - 1];\r\n\t//\t}\r\n\r\n\t}\r\n\r\n\tfunction trapFocus(event){\r\n\t\tvar event = event || window.event;\r\n\t\tvar target = event.currentTarget;\r\n\t\tif(!isTopModal(target)) return;\r\n\r\n\t\tscheduler.$keyboardNavigation.trapFocus(target, event);\r\n\t}\r\n\r\n\tfunction traceLightbox(){\r\n\t\tstartModal(scheduler.getLightbox());\r\n\t}\r\n\r\n\tscheduler.attachEvent(\"onLightbox\", traceLightbox);\r\n\tscheduler.attachEvent(\"onAfterLightbox\", endModal);\r\n\r\n\tscheduler.attachEvent(\"onAfterQuickInfo\", function(){afterPopup();});\r\n\r\n\tif(!scheduler._keyNavMessagePopup) {\r\n\t\tscheduler._keyNavMessagePopup = true;\r\n\r\n\t\tvar focusElement = null;\r\n\t\tvar backupFocus = null;\r\n\t\tconst modalsStack = [];\r\n\t\tscheduler.attachEvent(\"onMessagePopup\", function(box){\r\n\t\t\tfocusElement = document.activeElement;\r\n\t\t\tbackupFocus = focusElement;\r\n\r\n\t\t\twhile(backupFocus && scheduler._getClassName(backupFocus).indexOf(\"dhx_cal_data\") < 0){\r\n\t\t\t\tbackupFocus = backupFocus.parentNode;\r\n\t\t\t}\r\n\t\t\tif(backupFocus){\r\n\t\t\t\tbackupFocus = backupFocus.parentNode;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t\tscheduler.event(box, \"keydown\", trapFocus);\r\n\t\t\tmodalsStack.push(box);\r\n\t\t});\r\n\r\n\r\n\t\tscheduler.attachEvent(\"onAfterMessagePopup\", function () {\r\n\t\t\tvar box = modalsStack.pop();\r\n\t\t\tif(box) {\r\n\t\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t\t}\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\tvar currentTarget = document.activeElement;\r\n\t\t\t\twhile(currentTarget && scheduler._getClassName(currentTarget).indexOf(\"dhx_cal_light\") < 0){\r\n\t\t\t\t\tcurrentTarget = currentTarget.parentNode;\r\n\t\t\t\t}\r\n\t\t\t\tif(currentTarget)\r\n\t\t\t\t\treturn;\r\n\r\n\r\n\t\t\t\tif(focusElement && focusElement.parentNode){\r\n\t\t\t\t\tfocusElement.focus();\r\n\r\n\t\t\t\t}else if(backupFocus && backupFocus.parentNode){\r\n\t\t\t\t\tbackupFocus.focus();\r\n\t\t\t\t}\r\n\t\t\t\tfocusElement = null;\r\n\t\t\t\tbackupFocus = null;\r\n\r\n\t\t\t}, 1);\r\n\t\t});\r\n\t}\r\n\r\n\tscheduler.$keyboardNavigation.isModal = isModal;\r\n\r\n\r\n})();\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.dispatcher = {\r\n\tisActive: false,\r\n\tactiveNode: null,\r\n\tglobalNode: new scheduler.$keyboardNavigation.SchedulerNode(),\r\n\r\n\tkeepScrollPosition: function (callback) {\r\n\t\tvar top, left;\r\n\r\n\t\tvar scrollable = scheduler.$container.querySelector(\".dhx_timeline_scrollable_data\");\r\n\t\tif(!scrollable){\r\n\t\t\tscrollable = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t}\r\n\r\n\t\tif(scrollable){\r\n\t\t\ttop = scrollable.scrollTop;\r\n\t\t\tleft = scrollable.scrollLeft;\r\n\t\t}\r\n\r\n\t\tcallback();\r\n\r\n\t\tif(scrollable){\r\n\t\t\tscrollable.scrollTop = top;\r\n\t\t\tscrollable.scrollLeft = left;\r\n\t\t}\r\n\t},\r\n\tenable: function(){\r\n\t\tif(!scheduler.$container){\r\n\t\t\t// do nothing if not initialized\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.isActive = true;\r\n\t\tvar self = this;\r\n\t\tthis.keepScrollPosition(function () {\r\n\t\t\tself.globalNode.enable();\r\n\t\t\tself.setActiveNode(self.getActiveNode());\r\n\t\t});\r\n\t},\r\n\r\n\tdisable: function(){\r\n\t\tthis.isActive = false;\r\n\t\tthis.globalNode.disable();\r\n\t},\r\n\r\n\tisEnabled: function(){\r\n\t\treturn !!this.isActive;\r\n\t},\r\n\r\n\tgetDefaultNode: function(){\r\n\t\treturn this.globalNode.getDefaultNode();\r\n\t},\r\n\r\n\tsetDefaultNode: function() {\r\n\t\tthis.setActiveNode(this.getDefaultNode());\r\n\t},\r\n\r\n\tgetActiveNode: function(){\r\n\t\tvar node = this.activeNode;\r\n\t\tif(node && !node.isValid()){\r\n\t\t\tnode = node.fallback();\r\n\t\t}\r\n\t\treturn node;\r\n\t},\r\n\r\n\tfocusGlobalNode: function(){\r\n\t\tthis.blurNode(this.globalNode);\r\n\t\tthis.focusNode(this.globalNode);\r\n\t},\r\n\r\n\tsetActiveNode: function(el){\r\n\t\tif(!el || !el.isValid())\r\n\t\t\treturn;\r\n\r\n\t\tif(this.activeNode){\r\n\t\t\tif(this.activeNode.compareTo(el)){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(this.isEnabled()){\r\n\t\t\tthis.blurNode(this.activeNode);\r\n\t\t\tthis.activeNode = el;\r\n\t\t\tthis.focusNode(this.activeNode);\r\n\t\t}\r\n\t},\r\n\r\n\tfocusNode: function(el){\r\n\t\tif(el && el.focus){\r\n\t\t\tel.focus();\r\n\t\t\tif(el.getNode && document.activeElement != el.getNode()){\r\n\t\t\t\tthis.setActiveNode(new scheduler.$keyboardNavigation.DataArea());\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tblurNode: function(el){\r\n\t\tif(el && el.blur){\r\n\t\t\tel.blur();\r\n\t\t}\r\n\t},\r\n\r\n\tgetInlineEditor: function(id){\r\n\t\tvar editor = scheduler.$container.querySelector(\".dhx_cal_editor[\"+scheduler.config.event_attribute+\"='\"+id+\"'] textarea\");\r\n\t\tif(editor && editor.offsetWidth){\r\n\t\t\t// if exists and visible\r\n\t\t\treturn editor;\r\n\t\t}\r\n\t\treturn null;\r\n\t},\r\n\r\n\tkeyDownHandler: function (e) {\r\n\r\n\t\tif(e.defaultPrevented){\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar activeElement = this.getActiveNode();\r\n\r\n\t\tif(scheduler.$keyboardNavigation.isModal() &&\r\n\t\t\t!(activeElement && activeElement.container && scheduler.utils.dom.locateCss({target:activeElement.container}, \"dhx_minical_popup\", false)))\r\n\t\t\treturn;\r\n\r\n\t\tif(scheduler.getState().editor_id && this.getInlineEditor(scheduler.getState().editor_id))\r\n\t\t\treturn;\r\n\r\n\t\tif (!this.isEnabled())\r\n\t\t\treturn;\r\n\r\n\t\te = e || window.event;\r\n\r\n\t\tvar schedulerNode = this.globalNode;\r\n\r\n\t\tvar command = scheduler.$keyboardNavigation.shortcuts.getCommandFromEvent(e);\r\n\r\n\t\tif(!activeElement){\r\n\t\t\tthis.setDefaultNode();\r\n\t\t}else if(activeElement.findHandler(command)){\r\n\t\t\tactiveElement.doAction(command, e);\r\n\t\t}else if(schedulerNode.findHandler(command)){\r\n\t\t\tschedulerNode.doAction(command, e);\r\n\t\t}\r\n\r\n\t},\r\n\r\n\t_timeout: null,\r\n\tdelay: function(callback, delay){\r\n\r\n\t\tclearTimeout(this._timeout);\r\n\t\tthis._timeout = setTimeout(callback, delay || 1);\r\n\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n//Initial idea and implementation by Steve MC\r\nscheduler._temp_key_scope = function (){\r\n\r\n\tscheduler.config.key_nav = true;\r\n\r\n\tscheduler.$keyboardNavigation._pasteDate = null; // used for copy and paste operations\r\n\tscheduler.$keyboardNavigation._pasteSection = null; // used for copy and paste operations\r\n\tvar isCopy = null;\r\n\r\n\tvar pos = {};\r\n\r\n\tif(!document.body){\r\n\t\tscheduler.event(window, \"load\", function(){\r\n\t\t\tscheduler.event(document.body, \"mousemove\", trackMousePosition);\r\n\t\t});\r\n\t}else{\r\n\t\tscheduler.event(document.body, \"mousemove\", trackMousePosition);\r\n\t}\r\n\r\n\tfunction trackMousePosition(event){\r\n\t\tevent = event || window.event;\r\n\t\tpos.x = event.clientX;\r\n\t\tpos.y = event.clientY;\r\n\t}\r\n\tfunction currentTarget(){\r\n\r\n\t\tvar mousePointer = false;\r\n\t\tvar keyNavPointer = false;\r\n\r\n\t\tvar target = document.elementFromPoint(pos.x, pos.y);\r\n\t\twhile(target && target != scheduler._obj){\r\n\t\t\ttarget = target.parentNode;\r\n\t\t}\r\n\t\tmousePointer = !!(target == scheduler._obj);\r\n\r\n\t\tkeyNavPointer = scheduler.$keyboardNavigation.dispatcher.isEnabled();\r\n\r\n\t\treturn mousePointer || keyNavPointer;\r\n\t}\r\n\r\n\tscheduler.attachEvent(\"onMouseMove\", function(id,e){\r\n\t\tvar state = scheduler.getState();\r\n\r\n\t\t// make sure scheduler is fully initialized before calling scheduler.getActionData\r\n\t\tif(!(state.mode && state.min_date)){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tvar position = scheduler.getActionData(e);\r\n\t\tscheduler.$keyboardNavigation._pasteDate = position.date;\r\n\t\tscheduler.$keyboardNavigation._pasteSection = position.section;\r\n\t});\r\n\r\n\tfunction clear_event_after(ev){\r\n\t\tdelete ev.rec_type; delete ev.rec_pattern;\r\n\t\tdelete ev.event_pid; delete ev.event_length;\r\n\t}\r\n\r\n\tfunction copyEvent(ev){\r\n\t\treturn scheduler._lame_copy({}, ev);\r\n\t}\r\n\r\n\tscheduler._make_pasted_event = function(ev){\r\n\t\tvar date = scheduler.$keyboardNavigation._pasteDate;\r\n\t\tvar section = scheduler.$keyboardNavigation._pasteSection;\r\n\r\n\t\tvar event_duration = ev.end_date-ev.start_date;\r\n\r\n\t\tvar copy = copyEvent(ev);\r\n\t\tclear_event_after(copy);\r\n\t\tcopy.start_date = new Date(date);\r\n\t\tcopy.end_date = new Date(copy.start_date.valueOf() + event_duration);\r\n\r\n\t\tif(section){\r\n\t\t\tvar property = scheduler._get_section_property();\r\n\r\n\t\t\tif(scheduler.config.multisection)\r\n\t\t\t\tcopy[property] = ev[property]; // save initial set of resources for multisection view\r\n\t\t\telse\r\n\t\t\t\tcopy[property] = section;\r\n\t\t}\r\n\t\treturn copy;\r\n\t};\r\n\tscheduler._do_paste = function(is_copy, modified_ev, original_ev){\r\n\t\tif(scheduler.callEvent(\"onBeforeEventPasted\", [is_copy, modified_ev, original_ev]) === false){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tscheduler.addEvent(modified_ev);\r\n\t\tscheduler.callEvent(\"onEventPasted\", [is_copy, modified_ev, original_ev]);\r\n\t};\r\n\r\n\tscheduler._is_key_nav_active = function(){\r\n\t\tif(this._is_initialized() && !this._is_lightbox_open() && this.config.key_nav){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\r\n\tfunction getSelectedEvent(){\r\n\t\tvar node = scheduler.$keyboardNavigation.dispatcher.getActiveNode();\r\n\t\tif(node && node.eventId) return node.eventId;\r\n\t\treturn scheduler._select_id;\r\n\t}\r\n\r\n\tscheduler.event(document, \"keydown\", function(e){\r\n\t\t// compatibility fix - scheduler focus on ctrl+v on mouse hover\r\n\t\tif(((e.ctrlKey || e.metaKey) && e.keyCode == 86) && scheduler._buffer_event && !scheduler.$keyboardNavigation.dispatcher.isEnabled()) {\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.isActive = currentTarget();\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler._key_nav_copy_paste = function(e){\r\n\t\tif(!scheduler._is_key_nav_active()) return true;\r\n\r\n\t\tif (e.keyCode == 37 || e.keyCode == 39) { // Left, Right arrows\r\n\t\t\te.cancelBubble = true;\r\n\r\n\t\t\tvar next = scheduler.date.add(scheduler._date,(e.keyCode == 37 ? -1 : 1 ),scheduler._mode);\r\n\t\t\tscheduler.setCurrentView(next);\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tvar select_id = getSelectedEvent();\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 67) { // CTRL+C\r\n\t\t\tif (select_id) {\r\n\t\t\t\tscheduler._buffer_event = copyEvent(scheduler.getEvent(select_id));\r\n\t\t\t\tisCopy = true;\r\n\t\t\t\tscheduler.callEvent(\"onEventCopied\", [scheduler.getEvent(select_id)]);\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 88) { // CTRL+X\r\n\t\t\tif (select_id) {\r\n\t\t\t\tisCopy = false;\r\n\t\t\t\tvar ev = scheduler._buffer_event = copyEvent(scheduler.getEvent(select_id));\r\n\r\n\t\t\t\tscheduler.updateEvent(ev.id);\r\n\t\t\t\tscheduler.callEvent(\"onEventCut\", [ev]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 86 && currentTarget(e)) { // CTRL+V\r\n\t\t\tvar ev = scheduler._buffer_event ? scheduler.getEvent(scheduler._buffer_event.id) : scheduler._buffer_event;\r\n\t\t\tev = ev || scheduler._buffer_event;\r\n\r\n\t\t\tif (ev) {\r\n\t\t\t\tvar new_ev = scheduler._make_pasted_event(ev);\r\n\t\t\t\tif (isCopy) {\r\n\t\t\t\t\tnew_ev.id = scheduler.uid();\r\n\t\t\t\t\tscheduler._do_paste(isCopy, new_ev, ev);\r\n\t\t\t\t}\r\n\t\t\t\telse { // cut operation\r\n\t\t\t\t\tvar res = scheduler.callEvent(\"onBeforeEventChanged\",[new_ev, e, false, ev]);\r\n\t\t\t\t\tif (res) {\r\n\t\t\t\t\t\tscheduler._do_paste(isCopy, new_ev, ev);\r\n\t\t\t\t\t\tisCopy = true; // switch to copy after first paste operation\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t};\r\n};\r\nscheduler._temp_key_scope();\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.attachSchedulerHandlers = function(){\r\n\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\tvar keyDownHandler = function(e){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\r\n\t\treturn dispatcher.keyDownHandler(e);\r\n\t};\r\n\r\n\tvar focusHandler = function () {\r\n\t\tdispatcher.keepScrollPosition(function () {\r\n\t\t\tdispatcher.focusGlobalNode();\r\n\t\t});\r\n\t};\r\n\r\n\tvar waitCall;\r\n\tscheduler.attachEvent(\"onDataRender\", function(){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\t\tif(!(dispatcher.isEnabled() && !scheduler.getState().editor_id)) return;\r\n\r\n\t\tclearTimeout(waitCall);\r\n\t\twaitCall = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tif(!dispatcher.isEnabled())\r\n\t\t\t\tdispatcher.enable();\r\n\t\t\treFocusActiveNode();\r\n\t\t});\r\n\t});\r\n\r\n\tvar reFocusActiveNode = function(){\r\n\t\tif(!dispatcher.isEnabled())\r\n\t\t\treturn;\r\n\r\n\t\tvar activeNode = dispatcher.getActiveNode();\r\n\t\tif(!activeNode)\r\n\t\t\treturn;\r\n\r\n\t\tif(!activeNode.isValid()){\r\n\t\t\tactiveNode = activeNode.fallback();\r\n\t\t}\r\n\r\n\t\tif(!activeNode || activeNode instanceof scheduler.$keyboardNavigation.MinicalButton || activeNode instanceof scheduler.$keyboardNavigation.MinicalCell)\r\n\t\t\treturn;\r\n\r\n\t\tdispatcher.keepScrollPosition(function () {\r\n\t\t\tactiveNode.focus(true);\r\n\t\t});\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\tvar container = scheduler.$container;\r\n\t\tscheduler.eventRemove(document, \"keydown\", keyDownHandler);\r\n\t\tscheduler.eventRemove(container, \"mousedown\", mousedownHandler);\r\n\t\tscheduler.eventRemove(container, \"focus\", focusHandler);\r\n\r\n\r\n\t\tif(scheduler.config.key_nav){\r\n\r\n\t\t\tscheduler.event(document, \"keydown\", keyDownHandler);\r\n\t\t\tscheduler.event(container, \"mousedown\", mousedownHandler);\r\n\t\t\tscheduler.event(container, \"focus\", focusHandler);\r\n\r\n\t\t\tcontainer.setAttribute(\"tabindex\", \"0\");\r\n\r\n\t\t}else{\r\n\t\t\tcontainer.removeAttribute(\"tabindex\");\r\n\t\t}\r\n\t});\r\n\r\n\tfunction mousedownHandler(e){\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\r\n\r\n\t\tvar dataAreaClick = scheduler.$keyboardNavigation.isChildOf(e.target || e.srcElement, scheduler.$container.querySelector(\".dhx_cal_data\"));\r\n\r\n\r\n\t\tvar pos = scheduler.getActionData(e);\r\n\r\n\t\tvar focusNode;\r\n\t\tif(scheduler._locate_event(e.target || e.srcElement)){\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.Event(scheduler._locate_event(e.target || e.srcElement));\r\n\t\t}else if(dataAreaClick){\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(pos.date && dataAreaClick){\r\n\t\t\t\tfocusNode = focusNode.nextSlot(new scheduler.$keyboardNavigation.TimeSlot(pos.date, null, pos.section));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(focusNode) {\r\n\t\t\tif (!dispatcher.isEnabled()) {\r\n\t\t\t\tdispatcher.activeNode = focusNode;\r\n\r\n\t\t\t} else {\r\n\t\t\t\tif (pos.date && dataAreaClick) {\r\n\t\t\t\t\tdispatcher.delay(function () {\r\n\t\t\t\t\t\tdispatcher.setActiveNode(focusNode);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction focusEvent(evNode){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\t\tif(!dispatcher.isEnabled()) return;\r\n\r\n\r\n\t\tvar prevState = evNode;\r\n\t\tvar focusNode = new scheduler.$keyboardNavigation.Event(prevState.eventId);\r\n\t\tif(!focusNode.isValid()){\r\n\t\t\tvar lastStart = focusNode.start || prevState.start;\r\n\t\t\tvar lastEnd = focusNode.end || prevState.end;\r\n\t\t\tvar lastSection = focusNode.section || prevState.section;\r\n\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot(lastStart, lastEnd, lastSection);\r\n\t\t\tif(!focusNode.isValid()){\r\n\t\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdispatcher.setActiveNode(focusNode);\r\n\t\tvar node = dispatcher.getActiveNode();\r\n\t\tif(node && node.getNode && document.activeElement != node.getNode()){\r\n\t\t\tdispatcher.focusNode(dispatcher.getActiveNode());\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tvar updateEvent = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id){\r\n\t\tvar res = updateEvent.apply(this, arguments);\r\n\t\tif(scheduler.config.key_nav && dispatcher.isEnabled()){\r\n\t\t\tif(scheduler.getState().select_id == id){\r\n\t\t\t\tvar element = new scheduler.$keyboardNavigation.Event(id);\r\n\r\n\t\t\t\tif(!scheduler.getState().lightbox_id){\r\n\t\t\t\t\tfocusEvent(element);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn res;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onEventDeleted\", function(id) {\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\t\tif(dispatcher.isEnabled()){\r\n\t\t\tvar activeNode = dispatcher.getActiveNode();\r\n\t\t\tif(activeNode.eventId == id){\r\n\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onClearAll\", function(){\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\t\tif(dispatcher.isEnabled()){\r\n\t\t\tif(dispatcher.getActiveNode() instanceof scheduler.$keyboardNavigation.Event){\r\n\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation._minicalendars = [];\r\n\r\nscheduler.$keyboardNavigation.isMinical = function(node){\r\n\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\tif(this.isChildOf(node, minicalendars[i]))\r\n\t\t\treturn true;\r\n\t}\r\n\treturn false;\r\n};\r\n\r\nscheduler.$keyboardNavigation.isChildOf = function(child, parent){\r\n\twhile(child && child !== parent){\r\n\t\tchild = child.parentNode;\r\n\t}\r\n\r\n\treturn !!(child === parent);\r\n};\r\n\r\nscheduler.$keyboardNavigation.patchMinicalendar = function(){\r\n\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\tfunction focusMinical(e){\r\n\t\tvar target = e.target;\r\n\r\n\t\tdispatcher.enable();\r\n\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.MinicalButton(target, 0));\r\n\t}\r\n\r\n\tfunction minicalClick(e){\r\n\t\tvar target = e.target || e.srcElement;\r\n\r\n\t\tvar prev = scheduler.utils.dom.locateCss(e, \"dhx_cal_prev_button\", false);\r\n\t\tvar next = scheduler.utils.dom.locateCss(e, \"dhx_cal_next_button\", false);\r\n\t\tvar cell = scheduler.utils.dom.locateCss(e, \"dhx_year_body\", false);\r\n\r\n\t\tvar rowIndex = 0;\r\n\t\tvar cellIndex = 0;\r\n\t\tif(cell){\r\n\t\t\tvar tr;\r\n\t\t\tvar td;\r\n\t\t\tvar current = target;\r\n\t\t\twhile(current && current.tagName.toLowerCase() != \"td\"){\r\n\t\t\t\tcurrent = current.parentNode;\r\n\t\t\t}\r\n\t\t\tif(current){\r\n\t\t\t\ttd = current;\r\n\t\t\t\ttr = td.parentNode;\r\n\t\t\t}\r\n\r\n\t\t\tif(tr && td){\r\n\t\t\t\tvar rows = tr.parentNode.querySelectorAll(\"tr\");\r\n\t\t\t\tfor(var i = 0; i < rows.length; i++){\r\n\t\t\t\t\tif(rows[i] == tr){\r\n\t\t\t\t\t\trowIndex = i;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tvar cells = tr.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\t\t\tif(cells[i] == td){\r\n\t\t\t\t\t\tcellIndex = i;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tvar root = e.currentTarget;\r\n\t\tdispatcher.delay(function(){\r\n\t\t\tif(prev || next || cell){\r\n\r\n\t\t\t\tvar element;\r\n\t\t\t\tif(prev){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalButton(root, 0);\r\n\t\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.MinicalButton(root, 0));\r\n\t\t\t\t}else if(next){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalButton(root, 1);\r\n\t\t\t\t}else if(cell){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalCell(root, rowIndex, cellIndex);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(element){\r\n\r\n\t\t\t\t\tdispatcher.enable();\r\n\t\t\t\t\tif(element.isValid()){\r\n\t\t\t\t\t\tdispatcher.activeNode = null;\r\n\t\t\t\t\t\tdispatcher.setActiveNode(element);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t}\r\n\r\n\tif(scheduler.renderCalendar){\r\n\t\tvar renderMinical = scheduler.renderCalendar;\r\n\t\tscheduler.renderCalendar = function(){\r\n\t\t\tvar cal = renderMinical.apply(this, arguments);\r\n\t\t\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\r\n\t\t\tscheduler.eventRemove(cal, \"click\", minicalClick);\r\n\t\t\tscheduler.event(cal, \"click\", minicalClick);\r\n\r\n\t\t\tscheduler.eventRemove(cal, \"focus\", focusMinical);\r\n\t\t\tscheduler.event(cal, \"focus\", focusMinical);\r\n\r\n\t\t\tvar added = false;\r\n\t\t\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\t\t\tif(minicalendars[i] == cal){\r\n\t\t\t\t\tadded = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(!added)\r\n\t\t\t\tminicalendars.push(cal);\r\n\r\n\t\t\tif(dispatcher.isEnabled()){\r\n\t\t\t\tvar node = dispatcher.getActiveNode();\r\n\t\t\t\tif(node && node.container == cal){\r\n\t\t\t\t\tdispatcher.focusNode(node);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcal.setAttribute(\"tabindex\", \"0\");\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tcal.setAttribute(\"tabindex\", \"0\");\r\n\t\t\t}\r\n\t\t\treturn cal;\r\n\t\t};\r\n\t}\r\n\r\n\tif(scheduler.destroyCalendar){\r\n\t\tvar destroyMinical = scheduler.destroyCalendar;\r\n\t\tscheduler.destroyCalendar = function(cal, force){\r\n\t\t\tcal = cal || (scheduler._def_count ? scheduler._def_count.firstChild : null);\r\n\t\t\tvar res = destroyMinical.apply(this, arguments);\r\n\r\n\t\t\tif(!cal || !cal.parentNode){\r\n\t\t\t\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\t\t\t\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\t\t\t\tif(minicalendars[i] == cal){\r\n\t\t\t\t\t\tscheduler.eventRemove(minicalendars[i], \"focus\", focusMinical);\r\n\t\t\t\t\t\tminicalendars.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn res;\r\n\t\t};\r\n\t}\r\n};\r\n\r\n}","import keyboard_shortcuts from \"./keyboard_navigation/common/keyboard_shortcuts\";\r\nimport eventhandler from \"./keyboard_navigation/common/eventhandler\";\r\nimport trap_modal_focus from \"./keyboard_navigation/common/trap_modal_focus\";\r\nimport marker from \"./keyboard_navigation/marker\";\r\nimport scheduler_node from \"./keyboard_navigation/elements/scheduler_node\";\r\nimport nav_node from \"./keyboard_navigation/elements/nav_node\";\r\nimport header_cell from \"./keyboard_navigation/elements/header_cell\";\r\nimport event from \"./keyboard_navigation/elements/event\";\r\nimport time_slot from \"./keyboard_navigation/elements/time_slot\";\r\nimport minical_button from \"./keyboard_navigation/elements/minical_button\";\r\nimport minical_cell from \"./keyboard_navigation/elements/minical_cell\";\r\nimport data_area from \"./keyboard_navigation/elements/data_area\";\r\nimport modals from \"./keyboard_navigation/modals\";\r\nimport core from \"./keyboard_navigation/core\";\r\nimport key_nav_legacy from \"./keyboard_navigation/key_nav_legacy\";\r\n\r\n\r\nimport scheduler_handlers from \"./keyboard_navigation/scheduler_handlers\";\r\nimport minical_handlers from \"./keyboard_navigation/minical_handlers\";\r\n\r\nexport default function(scheduler){\r\n\t\tscheduler.config.key_nav = true;\r\n\t\tscheduler.config.key_nav_step = 30;\r\n\t\tscheduler.addShortcut = function(shortcut, handler, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tscopeObject.prototype.bind(shortcut, handler);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.getShortcutHandler = function(shortcut, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tvar commands = scheduler.$keyboardNavigation.shortcuts.parse(shortcut);\r\n\t\t\t\tif(commands.length){\r\n\t\t\t\t\treturn scopeObject.prototype.findHandler(commands[0]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.removeShortcut = function(shortcut, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tscopeObject.prototype.unbind(shortcut);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.focus = function(){\r\n\t\t\tif(!scheduler.config.key_nav){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar disp = scheduler.$keyboardNavigation.dispatcher;\r\n\t\t\tdisp.enable();\r\n\t\t\tvar activeNode = disp.getActiveNode();\r\n\t\t\tif(!activeNode || activeNode instanceof scheduler.$keyboardNavigation.MinicalButton || activeNode instanceof scheduler.$keyboardNavigation.MinicalCell){\r\n\t\t\t\tdisp.setDefaultNode();\r\n\t\t\t}else{\r\n\t\t\t\tdisp.focusNode(disp.getActiveNode());\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfunction getScope(mode){\r\n\t\t\tvar scopes = {\r\n\t\t\t\t\"minicalButton\":scheduler.$keyboardNavigation.MinicalButton,\r\n\t\t\t\t\"minicalDate\":scheduler.$keyboardNavigation.MinicalCell,\r\n\t\t\t\t\"scheduler\":scheduler.$keyboardNavigation.SchedulerNode,\r\n\t\t\t\t\"dataArea\": scheduler.$keyboardNavigation.DataArea,\r\n\t\t\t\t\"timeSlot\": scheduler.$keyboardNavigation.TimeSlot,\r\n\t\t\t\t\"event\": scheduler.$keyboardNavigation.Event\r\n\t\t\t};\r\n\r\n\t\t\tvar searchMap = {};\r\n\t\t\tfor(var i in scopes)\r\n\t\t\t\tsearchMap[i.toLowerCase()] = scopes[i];\r\n\r\n\t\t\tmode = (mode + \"\").toLowerCase();\r\n\r\n\t\t\treturn searchMap[mode] || scopes.scheduler;\r\n\t\t}\r\n\r\n\t\tscheduler.$keyboardNavigation = {};\r\n\r\n\t\tscheduler._compose = function(){\r\n\t\t\tvar parts = Array.prototype.slice.call(arguments, 0);\r\n\t\t\tvar res = {};\r\n\t\t\tfor(var i = 0; i < parts.length; i++){\r\n\t\t\t\tvar obj = parts[i];\r\n\t\t\t\tif(typeof obj == \"function\"){\r\n\t\t\t\t\tobj = new obj();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor(var p in obj){\r\n\t\t\t\t\tres[p] = obj[p];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn res;\r\n\t\t};\r\n\r\n\t\tkeyboard_shortcuts(scheduler);\r\n\t\teventhandler(scheduler);\r\n\t\ttrap_modal_focus(scheduler);\r\n\t\tmarker(scheduler);\r\n\t\tscheduler_node(scheduler);\r\n\t\tnav_node(scheduler);\r\n\t\theader_cell(scheduler);\r\n\t\tevent(scheduler);\r\n\t\ttime_slot(scheduler);\r\n\t\tminical_button(scheduler);\r\n\t\tminical_cell(scheduler);\r\n\t\tdata_area(scheduler);\r\n\t\tmodals(scheduler);\r\n\t\tcore(scheduler);\r\n\t\tkey_nav_legacy(scheduler);\r\n\r\n\t\t(function(){\r\n\t\t\tscheduler_handlers(scheduler);\r\n\t\t\tminical_handlers(scheduler);\r\n\r\n\t\t\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\t\t\tscheduler.$keyboardNavigation.attachSchedulerHandlers();\r\n\r\n\t\t\tif(scheduler.renderCalendar){\r\n\t\t\t\t// if minical ext loaded before key nav ext - patch it now\r\n\t\t\t\tscheduler.$keyboardNavigation.patchMinicalendar();\r\n\t\t\t}else{\r\n\t\t\t\t// otherwise - wait until everything is loaded and try again\r\n\t\t\t\tvar attachOnce = scheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\t\t\t\tscheduler.detachEvent(attachOnce);\r\n\t\t\t\t\tscheduler.$keyboardNavigation.patchMinicalendar();\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\tfunction isSchedulerSelected(){\r\n\t\t\t\tif(!scheduler.config.key_nav) return;\r\n\r\n\t\t\t\tvar enable;\r\n\t\t\t\tvar focusElement = document.activeElement;\r\n\t\t\t\t// halt key nav when focus is outside scheduler or in quick info popup\r\n\t\t\t\tif(!focusElement || scheduler.utils.dom.locateCss(focusElement, \"dhx_cal_quick_info\", false)){\r\n\t\t\t\t\tenable = false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tenable = scheduler.$keyboardNavigation.isChildOf(focusElement, scheduler.$container) || scheduler.$keyboardNavigation.isMinical(focusElement);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn enable;\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\tfunction changeState(enable){\r\n\t\t\t\tif(enable && !dispatcher.isEnabled()){\r\n\t\t\t\t\tdispatcher.enable();\r\n\t\t\t\t}else if(!enable && dispatcher.isEnabled()){\r\n\t\t\t\t\tdispatcher.disable();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tconst intervalId = setInterval(function(){\r\n\t\t\t\tif(!scheduler.$container || !scheduler.$keyboardNavigation.isChildOf(scheduler.$container, document.body)){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar enable = isSchedulerSelected();\r\n\r\n\t\t\t\tif(enable){\r\n\t\t\t\t\tchangeState(enable);\r\n\t\t\t\t}else if(!enable && dispatcher.isEnabled()){\r\n\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// doublecheck in case checking is done in handler before focus element is repainted\r\n\t\t\t\t\t\tif(scheduler.config.key_nav){\r\n\t\t\t\t\t\t\tchangeState(isSchedulerSelected());\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tscheduler.$container.removeAttribute(\"tabindex\");\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}, 100);\r\n\t\t\t\t}\r\n\t\t\t}, 500);\r\n\t\t\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\t\t\tclearInterval(intervalId);\r\n\t\t\t});\r\n\t\t})();\r\n\t}\r\n\r\n\r\n","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\r\n\tthis.layers.sort(function(a, b){\r\n\t\treturn a.zIndex - b.zIndex;\r\n\t});\r\n\r\n\tscheduler._dp_init=function(dp){\r\n\t\tdp._methods=[\"_set_event_text_style\",\"\",\"changeEventId\",\"deleteEvent\"];\r\n\r\n\t\tthis.attachEvent(\"onEventAdded\",function(id){\r\n\t\t\tif (!this._loading && this.validId(id) && this.getEvent(id) && this.getEvent(id).layer == dp.layer)\r\n\t\t\t\tdp.setUpdated(id,true,\"inserted\");\r\n\t\t});\r\n\t\tthis.attachEvent(\"onBeforeEventDelete\",function(id){\r\n\t\t\tif(this.getEvent(id) && this.getEvent(id).layer == dp.layer) {\r\n\t\t\t\tif (!this.validId(id)) return;\r\n\t\t\t\tvar z=dp.getState(id);\r\n\r\n\t\t\t\tif (z==\"inserted\" || this._new_event) { dp.setUpdated(id,false);\t\treturn true; }\r\n\t\t\t\tif (z==\"deleted\") return false;\r\n\t\t\t\tif (z==\"true_deleted\") return true;\r\n\r\n\t\t\t\tdp.setUpdated(id,true,\"deleted\");\r\n\t\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\telse return true;\r\n\t\t});\r\n\t\tthis.attachEvent(\"onEventChanged\",function(id){\r\n\t\t\tif (!this._loading && this.validId(id) && this.getEvent(id) && this.getEvent(id).layer == dp.layer)\r\n\t\t\t\tdp.setUpdated(id,true,\"updated\");\r\n\t\t});\r\n\r\n\t\tdp._getRowData=function(id,pref){\r\n\t\t\tvar ev=this.obj.getEvent(id);\r\n\t\t\tvar data = {};\r\n\r\n\t\t\tfor (var a in ev){\r\n\t\t\t\tif (a.indexOf(\"_\")===0) continue;\r\n\t\t\t\tif (ev[a] && ev[a].getUTCFullYear) //not very good, but will work\r\n\t\t\t\t\tdata[a] = this.obj._helpers.formatDate(ev[a]);\r\n\t\t\t\telse\r\n\t\t\t\t\tdata[a] = ev[a];\r\n\t\t\t}\r\n\t\t\treturn data;\r\n\t\t};\r\n\t\tdp._clearUpdateFlag=function(){};\r\n\r\n\t\tdp.attachEvent(\"insertCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"updateCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"deleteCallback\", function(upd, id) {\r\n\t\t\tthis.obj.setUserData(id, this.action_param, \"true_deleted\");\r\n\t\t\tthis.obj.deleteEvent(id);\r\n\t\t});\r\n\t};\r\n\r\n\t(function() {\r\n var _cloneObj = function(obj){\r\n if(obj === null || typeof(obj) != 'object')\r\n return obj;\r\n var temp = new obj.constructor();\r\n for(var key in obj)\r\n temp[key] = _cloneObj(obj[key]);\r\n return temp;\r\n };\r\n\r\n\t\tscheduler._dataprocessors = [];\r\n\t\tscheduler._layers_zindex = {};\r\n\t\tfor(var i=0; i= scheduler.config.collision_limit);\r\n\t});\r\n\r\n\tscheduler.addEvent=function(start_date,end_date,text,id,extra_data){\r\n\t\tvar ev=start_date;\r\n\t\tif (arguments.length!=1){\r\n\t\t\tev=extra_data||{};\r\n\t\t\tev.start_date=start_date;\r\n\t\t\tev.end_date=end_date;\r\n\t\t\tev.text=text;\r\n\t\t\tev.id=id;\r\n\t\t\tev.layer = this.defaultLayer;\r\n\t\t}\r\n\t\tev.id = ev.id||scheduler.uid();\r\n\t\tev.text = ev.text||\"\";\r\n\r\n\r\n\t\tif (typeof ev.start_date == \"string\") ev.start_date=this.templates.api_date(ev.start_date);\r\n\t\tif (typeof ev.end_date == \"string\") ev.end_date=this.templates.api_date(ev.end_date);\r\n\t\tev._timed=this.isOneDayEvent(ev);\r\n\r\n\t\tvar is_new=!this._events[ev.id];\r\n\t\tthis._events[ev.id]=ev;\r\n\t\tthis.event_updated(ev);\r\n\t\tif (!this._loading)\r\n\t\t\tthis.callEvent(is_new?\"onEventAdded\":\"onEventChanged\",[ev.id,ev]);\r\n\t};\r\n\r\n\tthis._evs_layer = {};\r\n\tfor (var i = 0; i < this.layers.length; i++) { // array in object for each layer\r\n\t\tthis._evs_layer[this.layers[i].name] = [];\r\n\t}\r\n\r\n\tscheduler.addEventNow=function(start,end,e){\r\n\t\tvar base = {};\r\n\t\tif (typeof start == \"object\"){\r\n\t\t\tbase = start;\r\n\t\t\tstart = null;\r\n\t\t}\r\n\r\n\t\tvar d = (this.config.event_duration||this.config.time_step)*60000;\r\n\t\tif (!start) start = Math.round((scheduler._currentDate()).valueOf()/d)*d;\r\n\t\tvar start_date = new Date(start);\r\n\t\tif (!end){\r\n\t\t\tvar start_hour = this.config.first_hour;\r\n\t\t\tif (start_hour > start_date.getHours()){\r\n\t\t\t\tstart_date.setHours(start_hour);\r\n\t\t\t\tstart = start_date.valueOf();\r\n\t\t\t}\r\n\t\t\tend = start+d;\r\n\t\t}\r\n\r\n\r\n\t\tbase.start_date = base.start_date||start_date;\r\n\t\tbase.end_date = base.end_date||new Date(end);\r\n\t\tbase.text = base.text||this.locale.labels.new_event;\r\n\t\tbase.id = this._drag_id = this.uid();\r\n\t\tbase.layer = this.defaultLayer;\r\n\t\tthis._drag_mode=\"new-size\";\r\n\r\n\t\tthis._loading=true;\r\n\t\tthis.addEvent(base);\r\n\t\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\t\tthis._loading=false;\r\n\r\n\t\tthis._drag_event={}; //dummy , to trigger correct event updating logic\r\n\t\tthis._on_mouse_up(e);\r\n\t};\r\n\r\n\tscheduler._t_render_view_data = function(events) { // helper\r\n\t\tif (this.config.multi_day && !this._table_view) {\r\n\t\t\tvar tvs = [];\r\n\t\t\tvar tvd = [];\r\n\t\t\tfor (var k = 0; k < events.length; k++) {\r\n\t\t\t\tif (events[k]._timed)\r\n\t\t\t\t\ttvs.push(events[k]);\r\n\t\t\t\telse\r\n\t\t\t\t\ttvd.push(events[k]);\r\n\t\t\t}\r\n\t\t\tthis._table_view = true;\r\n\t\t\tthis.render_data(tvd);\r\n\t\t\tthis._table_view = false;\r\n\t\t\tthis.render_data(tvs);\r\n\t\t}\r\n\t\telse\r\n\t\t\tthis.render_data(events);\r\n\t};\r\n\r\n\tscheduler.render_view_data = function(){\r\n\t\tif (this._not_render) {\r\n\t\t\tthis._render_wait = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._render_wait = false;\r\n\r\n\t\tthis.clear_view();\r\n\r\n\t\tthis._evs_layer = {};\r\n\t\tfor (var i = 0; i < this.layers.length; i++) { // array in object for each layer\r\n\t\t\tthis._evs_layer[this.layers[i].name] = [];\r\n\t\t}\r\n\r\n\t\tvar evs = this.get_visible_events();\r\n\t\tfor (var i = 0; i < evs.length; i++) { // filling layer arrays with events\r\n\t\t\tif(this._evs_layer[evs[i].layer])\r\n\t\t\t\tthis._evs_layer[evs[i].layer].push(evs[i]);\r\n\t\t}\r\n\r\n\t\tif(this._mode == 'month') { // old logic is used\r\n\t\t\tvar tevs = [];\r\n\t\t\tfor (var i = 0; i < this.layers.length; i++) {\r\n\t\t\t\tif (this.layers[i].visible)\r\n\t\t\t\t\ttevs = tevs.concat(this._evs_layer[this.layers[i].name]);\r\n\t\t\t}\r\n\t\t\tthis._t_render_view_data(tevs);\r\n\t\t}\r\n\t\telse { // week, day; should use new logic\r\n\t\t\tfor (var i = 0; i < this.layers.length; i++) {\r\n\t\t\t\tif (this.layers[i].visible) {\r\n\t\t\t\t\tvar evs_layer = this._evs_layer[this.layers[i].name];\r\n\t\t\t\t\tthis._t_render_view_data(evs_layer);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._render_v_bar=function(ev,x,y,w,h,style,contentA,contentB,bottom){\r\n\t\tvar id = ev.id;\r\n\r\n\t\tif(contentA.indexOf('
';\r\n\t\thtml+='
 
';\r\n\t\thtml+='
'+contentA+'
';\r\n\t\thtml+='
'+contentB+'
';\r\n\t\thtml+='
';\r\n\r\n\t\td.innerHTML=html;\r\n\t\td.style.zIndex = 100;\r\n\t\treturn d.firstChild;\r\n\t};\r\n\r\n\tscheduler.render_event_bar=function(ev){\r\n\t\tvar parent=this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tvar x=this._colsS[ev._sday];\r\n\t\tvar x2=this._colsS[ev._eday];\r\n\t\tif (x2==x) x2=this._colsS[ev._eday+1];\r\n\t\tvar hb = this.xy.bar_height;\r\n\r\n\t\tvar y=this._colsS.heights[ev._sweek]+(this._colsS.height?(this.xy.month_scale_height+2):2)+ev._sorder*hb;\r\n\r\n\t\tvar d=document.createElement(\"div\");\r\n\t\tvar cs = ev._timed?\"dhx_cal_event_clear\":\"dhx_cal_event_line\";\r\n\t\tvar cse = (scheduler.templates['event_class_'+ev.layer])?scheduler.templates['event_class_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_class(ev.start_date,ev.end_date,ev);\r\n\t\tif (cse) cs=cs+\" \"+cse;\r\n\r\n\t\tvar html='
';\r\n\r\n\t\tif (ev._timed)\r\n\t\t\thtml+=(scheduler.templates['event_bar_date_'+ev.layer])?scheduler.templates['event_bar_date_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_bar_date(ev.start_date,ev.end_date,ev);\r\n\t\thtml+=( (scheduler.templates['event_bar_text_'+ev.layer])?scheduler.templates['event_bar_text_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_bar_text(ev.start_date,ev.end_date,ev) + '
)');\r\n\t\thtml+='
';\r\n\r\n\t\td.innerHTML=html;\r\n\r\n\t\tthis._rendered.push(d.firstChild);\r\n\t\tparent.appendChild(d.firstChild);\r\n\t};\r\n\r\n\tscheduler.render_event=function(ev){\r\n\t\tvar menu = scheduler.xy.menu_width;\r\n\t\tif(scheduler.getLayer(ev.layer).noMenu)\r\n\t\t\tmenu = 0;\r\n\r\n\t\tif (ev._sday<0) return; //can occur in case of recurring event during time shift\r\n\t\tvar parent=scheduler.locate_holder(ev._sday);\r\n\t\tif (!parent) return; //attempt to render non-visible event\r\n\t\tvar sm = ev.start_date.getHours()*60+ev.start_date.getMinutes();\r\n\t\tvar em = (ev.end_date.getHours()*60+ev.end_date.getMinutes())||(scheduler.config.last_hour*60);\r\n\r\n\t\tvar top = (Math.round((sm*60*1000-this.config.first_hour*60*60*1000)*this.config.hour_size_px/(60*60*1000)))%(this.config.hour_size_px*24)+1; //42px/hour\r\n\t\tvar height = Math.max(scheduler.xy.min_event_height,(em-sm)*this.config.hour_size_px/60)+1; //42px/hour\r\n\t\t\r\n\t\tvar width=Math.floor((parent.clientWidth-menu)/ev._count);\r\n\t\tvar left=ev._sorder*width+1;\r\n\t\tif (!ev._inner) width=width*(ev._count-ev._sorder);\r\n\r\n\r\n\r\n\t\tvar d=this._render_v_bar(ev.id,menu+left,top,width,height,ev._text_style,scheduler.templates.event_header(ev.start_date,ev.end_date,ev),scheduler.templates.event_text(ev.start_date,ev.end_date,ev));\r\n\r\n\t\tthis._rendered.push(d);\r\n\t\tparent.appendChild(d);\r\n\r\n\t\tleft=left+parseInt(parent.style.left,10)+menu;\r\n\r\n\t\ttop+=this._dy_shift; //corrupt top, to include possible multi-day shift\r\n\t\td.style.zIndex = this._layers_zindex[ev.layer];\r\n\r\n\t\tif (this._edit_id==ev.id){\r\n\t\t\td.style.zIndex = parseInt(d.style.zIndex)+1; //fix overlapping issue\r\n\t\t\tvar new_zIndex = d.style.zIndex;\r\n\t\t\twidth=Math.max(width-4,scheduler.xy.editor_width);\r\n\t\t\tvar d=document.createElement(\"div\");\r\n\t\t\td.setAttribute(\"event_id\",ev.id); // for backward compatibility\r\n\t\t\td.setAttribute(this.config.event_attribute,ev.id);\r\n\t\t\tthis.set_xy(d,width,height-20,left,top+14);\r\n\t\t\td.className=\"dhx_cal_editor\";\r\n\t\t\td.style.zIndex = new_zIndex;\r\n\t\t\tvar d2=document.createElement(\"div\");\r\n\t\t\tthis.set_xy(d2,width-6,height-26);\r\n\t\t\td2.style.cssText+=\";margin:2px 2px 2px 2px;overflow:hidden;\";\r\n\r\n\r\n\t\t\td2.style.zIndex = new_zIndex;\r\n\t\t\td.appendChild(d2);\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].appendChild(d);\r\n\t\t\tthis._rendered.push(d);\r\n\r\n\t\t\td2.innerHTML=\"\";\r\n\r\n\t\t\tthis._editor=d2.firstChild;\r\n\t\t\tthis._editor.addEventListener(\"keypress\", function(e){\r\n\t\t\t\tif (e.shiftKey) return true;\r\n\t\t\t\tvar code= e.keyCode;\r\n\t\t\t\tif (code==scheduler.keys.edit_save) scheduler.editStop(true);\r\n\t\t\t\tif (code==scheduler.keys.edit_cancel) scheduler.editStop(false);\r\n\t\t\t});\r\n\t\t\tthis._editor.addEventListener(\"selectstart\", function(e){ e.cancelBubble=true; return true; });\r\n\t\t\td2.firstChild.focus();\r\n\t\t\t//IE and opera can add x-scroll during focusing\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].scrollLeft=0;\r\n\t\t\td2.firstChild.select();\r\n\t\t}\r\n\t\tif (this._select_id==ev.id){\r\n\t\t\td.style.zIndex = parseInt(d.style.zIndex)+1; //fix overlapping issue\r\n\t\t\tvar icons=this.config[\"icons_\"+((this._edit_id==ev.id)?\"edit\":\"select\")];\r\n\t\t\tvar icons_str=\"\";\r\n\t\t\tfor (var i=0; i
\";\r\n\t\t\tvar obj = this._render_v_bar(ev.id,left-menu+1,top,menu,icons.length*20+26,\"\",\"
\",icons_str,true);\r\n\t\t\tobj.style.left=left-menu+1;\r\n\t\t\tobj.style.zIndex = d.style.zIndex;\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].appendChild(obj);\r\n\t\t\tthis._rendered.push(obj);\r\n\t\t}\r\n\r\n\t};\r\n\r\n scheduler.filter_agenda = function(id, event) {\r\n var layer = scheduler.getLayer(event.layer);\r\n return (layer && layer.visible);\r\n };\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.limit_start = null;\r\nscheduler.config.limit_end = null;\r\nscheduler.config.limit_view = false;\r\nscheduler.config.check_limits = true;\r\nscheduler.config.mark_now = true;\r\nscheduler.config.display_marked_timespans = true;\r\nscheduler.config.overwrite_marked_timespans = true;\r\nscheduler._temp_limit_scope = function(){\r\n\tvar before = null;\r\n\tvar dhx_time_block = \"dhx_time_block\";\r\n\tvar default_timespan_type = \"default\";\r\n\tvar fix_options = function(options, days, zones) {\r\n\t\tif (days instanceof Date && zones instanceof Date) {\r\n\t\t\toptions.start_date = days;\r\n\t\t\toptions.end_date = zones;\r\n\t\t} else {\r\n\t\t\toptions.days = days;\r\n\t\t\toptions.zones = zones;\r\n\t\t}\r\n\t\treturn options;\r\n\t};\r\n\tvar get_resulting_options = function(days, zones, sections) {\r\n\t\tvar options = (typeof days == \"object\") ? days : { days: days };\r\n\t\toptions.type = dhx_time_block;\r\n\t\toptions.css = \"\";\r\n\t\tif (zones) {\r\n\t\t\tif (sections)\r\n\t\t\t\toptions.sections = sections;\r\n\t\t\toptions = fix_options(options, days, zones);\r\n\t\t}\r\n\t\treturn options;\r\n\t};\r\n\tscheduler.blockTime = function(days, zones, sections){\r\n\t\tvar options = get_resulting_options(days, zones, sections);\r\n\t\treturn scheduler.addMarkedTimespan(options);\r\n\t};\r\n\tscheduler.unblockTime = function(days, zones, sections) {\r\n\t\tzones = zones || \"fullday\";\r\n\t\tvar options = get_resulting_options(days, zones, sections);\r\n\t\treturn scheduler.deleteMarkedTimespan(options);\r\n\t};\r\n\tscheduler.attachEvent(\"onBeforeViewChange\",function(om,od,nm,nd){\r\n\r\n\t\tfunction isBlocked(date, mode){\r\n\t\t\tvar limit_start = scheduler.config.limit_start,\r\n\t\t\t\tlimit_end = scheduler.config.limit_end,\r\n\t\t\t\tdate_end = scheduler.date.add(date,1,mode);\r\n\r\n\t\t\treturn (date.valueOf() > limit_end.valueOf() || date_end <= limit_start.valueOf());\r\n\t\t}\r\n\r\n\t\tif (scheduler.config.limit_view){\r\n\t\t\tnd = nd||od; nm = nm||om;\r\n\t\t\tif (isBlocked(nd, nm) && !(od.valueOf() == nd.valueOf())){\r\n\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvar resetDate = !isBlocked(od, nm) ? od : scheduler.config.limit_start;\r\n\r\n\t\t\t\t\tscheduler.setCurrentView(!isBlocked(resetDate, nm) ? resetDate : null, nm);\r\n\t\t\t\t},1);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.checkInMarkedTimespan = function(ev, timespan_type, on_overlap){\r\n\t\ttimespan_type = timespan_type || default_timespan_type;\r\n\r\n\t\tvar res = true;\r\n\t\tvar temp_start_date = new Date(ev.start_date.valueOf());\r\n\t\tvar temp_end_date = scheduler.date.add(temp_start_date, 1, \"day\");\r\n\t\tvar timespans = scheduler._marked_timespans;\r\n\t\tfor (; temp_start_date < ev.end_date; temp_start_date = scheduler.date.date_part(temp_end_date), temp_end_date = scheduler.date.add(temp_start_date, 1, \"day\") ) {\r\n\t\t\tvar day_value = +scheduler.date.date_part( new Date(temp_start_date) ); // the first part of event not necessarily contains only date part\r\n\t\t\tvar day_index = temp_start_date.getDay();\r\n\r\n\t\t\tvar zones = getZones(ev, timespans, day_index, day_value, timespan_type);\r\n\t\t\tif (zones){\r\n\t\t\t\tfor (var i = 0; i < zones.length; i+=2) {\r\n\r\n\t\t\t\t\t// they may change for new event if it passes limit zone\r\n\t\t\t\t\tvar eventStart = scheduler._get_zone_minutes(temp_start_date);\r\n\t\t\t\t\tvar eventEnd = ( ev.end_date>temp_end_date || ev.end_date.getDate() != temp_start_date.getDate() ) ? 1440 : scheduler._get_zone_minutes(ev.end_date);\r\n\r\n\t\t\t\t\tvar markerStart = zones[i];\r\n\t\t\t\t\tvar markerEnd = zones[i+1];\r\n\t\t\t\t\tif (markerStarteventStart) {\r\n\t\t\t\t\t\tif(typeof on_overlap == \"function\"){\r\n\t\t\t\t\t\t\t//handler allows to cancel overlapping\r\n\t\t\t\t\t\t\t//actually needed only to keep default behavior of limits\r\n\t\t\t\t\t\t\tres = on_overlap(ev, eventStart, eventEnd, markerStart, markerEnd);//event object, event start/end minutes in 'zones' format, zone start/end minutes\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tres = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(!res)\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn !res;\r\n\t};\r\n\tvar blocker = scheduler.checkLimitViolation = function(event){\r\n\t\tif(!event)\r\n\t\t\treturn true;\r\n\t\tif (!scheduler.config.check_limits)\r\n\t\t\treturn true;\r\n\t\tvar s = scheduler;\r\n\t\tvar c = s.config;\r\n\t\tvar evs = [];\r\n\t\tif (event.rec_type) {\r\n\t\t\tvar dates = scheduler.getRecDates(event);\r\n\t\t\tfor(var i=0; i < dates.length; i++){\r\n\t\t\t\tvar ev = scheduler._copy_event(event);\r\n\t\t\t\tscheduler._lame_copy(ev, dates[i]);\r\n\t\t\t\tevs.push(ev);\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\tevs = [event];\r\n\t\t}\r\n\r\n\t\tvar complete_res = true;\r\n\t\tfor (var p=0; p= c.limit_start.valueOf() && ev.end_date.valueOf() <= c.limit_end.valueOf()) : true;\r\n\t\t\tif (res){\r\n\t\t\t\tres = !scheduler.checkInMarkedTimespan(ev, dhx_time_block, function(event, eventStart, eventEnd, markerStart, markerEnd){\r\n\t\t\t\t\t//try crop event to allow placing\r\n\t\t\t\t\tvar allow = true;\r\n\t\t\t\t\tif (eventStart<=markerEnd && eventStart >= markerStart){\r\n\t\t\t\t\t\tif (markerEnd == 24*60 || eventEnd <= markerEnd){\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(event._timed && s._drag_id && s._drag_mode == \"new-size\"){\r\n\t\t\t\t\t\t\tevent.start_date.setHours(0);\r\n\t\t\t\t\t\t\tevent.start_date.setMinutes(markerEnd);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ((eventEnd >= markerStart && eventEnd <= markerEnd) || (eventStart < markerStart && eventEnd > markerEnd)){\r\n\t\t\t\t\t\tif(event._timed && s._drag_id && s._drag_mode == \"new-size\"){\r\n\t\t\t\t\t\t\tevent.end_date.setHours(0);\r\n\t\t\t\t\t\t\tevent.end_date.setMinutes(markerStart);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn allow;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\tif (!res) {\r\n\t\t\t\tres = (s.checkEvent(\"onLimitViolation\")) ? s.callEvent(\"onLimitViolation\",[ev.id, ev]) : res;\r\n\t\t\t}\r\n\t\t\tcomplete_res = complete_res && res;\r\n\t\t}\r\n\t\tif(!complete_res){\r\n\t\t\ts._drag_id = null;\r\n\t\t\ts._drag_mode = null;\r\n\t\t}\r\n\t\treturn complete_res;\r\n\r\n\r\n\t};\r\n\tscheduler._get_blocked_zones = function(timespans, property, day_index, day_value, timespan_type){\r\n\t\tvar zones =[];\r\n\t\tif (timespans && timespans[property]) {\r\n\t\t\tvar timeline_zones = timespans[property];\r\n\t\t\tvar blocked_timeline_zones = this._get_relevant_blocked_zones(day_index, day_value, timeline_zones, timespan_type);\r\n\t\t\tfor (var i=0; i= scheduler.config.limit_end.valueOf()) {\r\n\t\t\t\tev.start_date = this.date.add(scheduler.config.limit_end, -1, \"day\");\r\n\t\t\t}\r\n\t\t\tif (ev.end_date < scheduler.config.limit_start) {\r\n\t\t\t\tev.end_date = new Date(scheduler.config.limit_start);\r\n\t\t\t}\r\n\t\t\tif (ev.end_date.valueOf() >= scheduler.config.limit_end.valueOf()) {\r\n\t\t\t\tev.end_date = this.date.add(scheduler.config.limit_end, -1, \"day\");\r\n\t\t\t}\r\n\t\t\tif (ev.start_date.valueOf() >= ev.end_date.valueOf()) {\r\n\t\t\t\tev.end_date = this.date.add(ev.start_date, (this.config.event_duration||this.config.time_step), \"minute\");\r\n\t\t\t}\r\n\t\t\tev._timed=this.isOneDayEvent(ev);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventChanged\",function(id){\r\n\t\tif (!id) return true;\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tif (!blocker(ev)){\r\n\t\t\tif (!before) return false;\r\n\t\t\tev.start_date = before[0];\r\n\t\t\tev.end_date = before[1];\r\n\t\t\tev._timed=this.isOneDayEvent(ev);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onBeforeEventChanged\",function(ev, native_object, is_new){\r\n\t\treturn blocker(ev);\r\n\t});\r\n\tscheduler.attachEvent(\"onBeforeEventCreated\", function(ev) { // native event\r\n\t\tvar start_date = scheduler.getActionData(ev).date;\r\n\t\tvar event = {\r\n\t\t\t_timed: true,\r\n\t\t\tstart_date: start_date,\r\n\t\t\tend_date: scheduler.date.add(start_date, scheduler.config.time_step, \"minute\")\r\n\t\t};\r\n\t\treturn blocker(event);\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", function(){\r\n\t\tscheduler._mark_now();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onAfterSchedulerResize\", function(){\r\n\t\twindow.setTimeout(function(){ \r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler._mark_now(); \r\n\t\t}, 1);\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\t\tscheduler._mark_now_timer = window.setInterval(function() {\r\n\t\t\tif(!scheduler._is_initialized())\r\n\t\t\t\treturn;\r\n\t\t\tscheduler._mark_now();\r\n\t\t}, 60000);\r\n\t});\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tclearInterval(scheduler._mark_now_timer);\r\n\t});\r\n\tscheduler._mark_now = function(hide) {\r\n\t\t// day, week, units views\r\n\t\tvar dhx_now_time = 'dhx_now_time';\r\n\t\tif (!this._els[dhx_now_time]) {\r\n\t\t\tthis._els[dhx_now_time] = [];\r\n\t\t}\r\n\t\tvar now = scheduler._currentDate();\r\n\t\tvar cfg = this.config;\r\n\t\tscheduler._remove_mark_now(); // delete previous marks if they exist\r\n\t\tif (!hide && cfg.mark_now && now < this._max_date && now > this._min_date && now.getHours() >= cfg.first_hour && now.getHours() 1) {\r\n\t\t\t\t\tif(view.size && view.options.length){\r\n\t\t\t\t\t\tday_index = ((view.position+ day_index) / view.options.length) * view.size;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstart_index = day_index;\r\n\t\t\t\t\tend_index = day_index + units_l;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tstart_index = 0;\r\n\t\t\t\t\tend_index = start_index + units_l;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar r_divs = [];\r\n\r\n\t\t\t\tfor (var i = start_index; i < end_index; i++) {\r\n\t\t\t\t\tvar t_day = i; // as each unit is actually considered +1 day\r\n\t\t\t\t\toptions.days = t_day;\r\n\t\t\t\t\tvar t_div = scheduler._render_marked_timespan(options, null, t_day)[0];\r\n\t\t\t\t\tr_divs.push(t_div);\r\n\t\t\t\t}\r\n\t\t\t\treturn r_divs;\r\n\t\t\t} else { // day/week views\r\n\t\t\t\toptions.days = day_index;\r\n\t\t\t\treturn scheduler._render_marked_timespan(options, null, day_index);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\toptions.days = +scheduler.date.date_part(now);\r\n\t\t\t\treturn scheduler._render_marked_timespan(options, null, null);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\tscheduler._remove_mark_now = function() {\r\n\t\tvar dhx_now_time = 'dhx_now_time';\r\n\t\tvar els = this._els[dhx_now_time];\r\n\t\tfor (var i=0; i config.start_date) || (config.days !== undefined && config.zones)) && !config.type )\r\n\t\t\treturn r_configs; // incorrect config was provided\r\n\r\n\t\tvar min = 0;\r\n\t\tvar max = 24*60;\r\n\t\tif (config.zones == \"fullday\")\r\n\t\t\tconfig.zones = [min, max];\r\n\t\tif (config.zones && config.invert_zones) {\r\n\t\t\tconfig.zones = scheduler.invertZones(config.zones);\r\n\t\t}\r\n\r\n\t\tconfig.id = scheduler.uid();\r\n\t\tconfig.css = config.css||\"\";\r\n\t\tconfig.type = config.type||default_timespan_type;\r\n\r\n\t\tvar sections = config.sections;\r\n\t\tif (sections) {\r\n\t\t\tfor (var view_key in sections) {\r\n\t\t\t\tif (sections.hasOwnProperty(view_key)) {\r\n\t\t\t\t\tvar ids = sections[view_key];\r\n\t\t\t\t\tif (!(ids instanceof Array))\r\n\t\t\t\t\t\tids = [ids];\r\n\t\t\t\t\tfor (var i=0; i t_sd) ? scheduler._get_zone_minutes(start_date) : min;\r\n\t\t\t\t\tvar zone_end = ( end_date > t_ed || end_date.getDate() != t_sd.getDate() ) ? max : scheduler._get_zone_minutes(end_date);\r\n\t\t\t\t\tt_config.zones = [zone_start, zone_end];\r\n\t\t\t\t\tr_configs.push(t_config);\r\n\r\n\t\t\t\t\tt_sd = t_ed;\r\n\t\t\t\t\tt_ed = scheduler.date.add(t_ed, 1, \"day\");\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (c_config.days instanceof Date)\r\n\t\t\t\t\tc_config.days = (scheduler.date.date_part(c_config.days)).valueOf();\r\n\t\t\t\tc_config.zones = config.zones.slice();\r\n\t\t\t\tr_configs.push(c_config);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn r_configs;\r\n\t};\r\n\tscheduler._get_dates_by_index = function(index, start, end) {\r\n\t\tvar dates = [];\r\n\t\tstart = scheduler.date.date_part(new Date(start||scheduler._min_date));\r\n\t\tend = new Date(end||scheduler._max_date);\r\n\t\tvar start_day = start.getDay();\r\n\t\tvar delta = (index-start_day >= 0) ? (index-start_day) : (7-start.getDay()+index);\r\n\t\tvar t_date = scheduler.date.add(start, delta, \"day\");\r\n\t\tfor (; t_date < end; t_date = scheduler.date.add(t_date, 1, \"week\")) {\r\n\t\t\tdates.push(t_date);\r\n\t\t}\r\n\t\treturn dates;\r\n\t};\r\n\tscheduler._get_css_classes_by_config = function(config) {\r\n\t\tvar css_classes = [];\r\n\t\tif (config.type == dhx_time_block) {\r\n\t\t\tcss_classes.push(dhx_time_block);\r\n\t\t\tif (config.css)\r\n\t\t\t\tcss_classes.push(dhx_time_block+\"_reset\");\r\n\t\t}\r\n\t\tcss_classes.push(\"dhx_marked_timespan\", config.css);\r\n\t\treturn css_classes.join(\" \");\r\n\t};\r\n\tscheduler._get_block_by_config = function(config) {\r\n\t\tvar block = document.createElement(\"div\");\r\n\t\tif (config.html) {\r\n\t\t\tif (typeof config.html == \"string\")\r\n\t\t\t\tblock.innerHTML = config.html;\r\n\t\t\telse\r\n\t\t\t\tblock.appendChild(config.html);\r\n\t\t}\r\n\t\treturn block;\r\n\t};\r\n\tscheduler._render_marked_timespan = function(options, area, day) {\r\n\t\tvar blocks = []; // resulting block which will be rendered and returned\r\n\t\tvar c = scheduler.config;\r\n\t\tvar min_date = this._min_date;\r\n\t\tvar max_date = this._max_date;\r\n\t\tvar day_value = false; // if timespan for specific date should be displayed\r\n\r\n\t\tif (!c.display_marked_timespans)\r\n\t\t\treturn blocks;\r\n\r\n\t\t// in case of markTimespan\r\n\t\tif (!day && day !== 0) {\r\n\t\t\tif (options.days < 7)\r\n\t\t\t\tday = options.days;\r\n\t\t\telse {\r\n\t\t\t\tvar date_to_display = new Date(options.days);\r\n\t\t\t\tday_value = +date_to_display;\r\n\r\n\t\t\t\t// in case of markTimespan date could be not in the viewing range, need to return\r\n\t\t\t\tif ( !(+max_date > +date_to_display && +min_date <= +date_to_display) )\r\n\t\t\t\t\treturn blocks;\r\n\r\n\t\t\t\tday = date_to_display.getDay();\r\n\t\t\t}\r\n\r\n\t\t\t// convert day default index (Sun - 0, Sat - 6) to index of hourscales (depends on week_start and config.start_on_monday)\r\n\t\t\tvar min_day = min_date.getDay();\r\n\t\t\tif (min_day > day) {\r\n\t\t\t\tday = 7 - (min_day-day);\r\n\t\t\t} else {\r\n\t\t\t\tday = day - min_day;\r\n\t\t\t}\r\n\t\t}\r\n\t\tvar zones = options.zones;\r\n\t\tvar css_classes = scheduler._get_css_classes_by_config(options);\r\n\r\n\t\tif (scheduler._table_view && scheduler._mode == \"month\") {\r\n\t\t\tvar areas = [];\r\n\t\t\tvar days = [];\r\n\r\n\r\n\t\t\tif (!area) {\r\n\t\t\t\tdays = (day_value) ? [day_value] : scheduler._get_dates_by_index(day);\r\n\t\t\t\tfor (var i=0; i < days.length; i++) {\r\n\t\t\t\t\tareas.push( this._scales[days[i]] );\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tareas.push(area);\r\n\t\t\t\tdays.push(day);\r\n\t\t\t}\r\n\r\n\t\t\tfor (var i=0; i < areas.length; i++) {\r\n\t\t\t\tarea = areas[i];\r\n\t\t\t\tday = days[i];\r\n\r\n\t\t\t\tvar sday = this.locate_holder_day(day, false) % this._cols.length;\r\n\r\n\t\t\t\tif(this._ignores[sday]) continue;\r\n\r\n\t\t\t\tvar block_proto = scheduler._get_block_by_config(options);\r\n\t\t\t\tblock_proto.className = css_classes;\r\n\t\t\t\tblock_proto.style.top = \"0px\";\r\n\t\t\t\tblock_proto.style.height = \"100%\";\r\n\t\t\t\t\r\n\t\t\t\tfor (var k=0; k < zones.length; k+=2) {\r\n\t\t\t\t\tvar start = zones[i];\r\n\t\t\t\t\tvar end = zones[i+1];\r\n\t\t\t\t\tif (end <= start)\r\n\t\t\t\t\t\treturn [];\r\n\r\n\t\t\t\t\tvar block = block_proto.cloneNode(true);\r\n\r\n\t\t\t\t\tblock.style.left = \"0px\";\r\n\t\t\t\t\tblock.style.width = \"100%\";\r\n\r\n\t\t\t\t\tarea.appendChild(block);\r\n\t\t\t\t\tblocks.push(block);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tvar index = day;\r\n\r\n\t\t\tif(this._ignores[this.locate_holder_day(day, false)]) return blocks;\r\n\r\n\t\t\tif (this._props && this._props[this._mode] && options.sections && options.sections[this._mode]) {\r\n\t\t\t\tvar view = this._props[this._mode];\r\n\t\t\t\tindex = view.order[options.sections[this._mode]];\r\n\r\n\t\t\t\tvar inner_index = view.order[options.sections[this._mode]];\r\n\t\t\t\tif(!(view.days > 1)){\r\n\t\t\t\t\tindex = inner_index;\r\n\t\t\t\t\tif (view.size && (index > view.position+view.size)) {\r\n\t\t\t\t\t\tindex = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar units_l = view.size || view.options.length;\r\n\t\t\t\t\tindex = index*units_l + inner_index;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tarea = area ? area : scheduler.locate_holder(index);\r\n\r\n\t\t\tfor (var i = 0; i < zones.length; i+=2){\r\n\t\t\t\tvar start = Math.max(zones[i], c.first_hour*60);\r\n\t\t\t\tvar end = Math.min(zones[i+1], c.last_hour*60);\r\n\t\t\t\tif (end <= start) {\r\n\t\t\t\t\tif (i+2 < zones.length)\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\treturn [];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar block = scheduler._get_block_by_config(options);\r\n\t\t\t\tblock.className = css_classes;\r\n\r\n\t\t\t\t// +1 for working with section which really takes up whole height (as % would be == 0)\r\n\t\t\t\tvar all_hours_height = this.config.hour_size_px*24 + 1;\r\n\t\t\t\tvar hour_ms = 60*60*1000;\r\n\t\t\t\tblock.style.top = (Math.round((start*60*1000-this.config.first_hour*hour_ms)*this.config.hour_size_px/hour_ms) % all_hours_height) + \"px\";\r\n\t\t\t\tblock.style.height = Math.max((Math.round(((end-start)*60*1000)*this.config.hour_size_px/hour_ms)) % all_hours_height, 1)+\"px\";\r\n\r\n\t\t\t\tarea.appendChild(block);\r\n\t\t\t\tblocks.push(block);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn blocks;\r\n\t};\r\n\r\n\tscheduler._mark_timespans = function(){\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\t\tvar divs = [];\r\n\t\tif (scheduler._table_view && scheduler._mode == \"month\"){\r\n\t\t\tfor (var day in this._scales) {\r\n\t\t\t\tvar date = new Date(+day);\r\n\t\t\t\tdivs.push.apply(divs, scheduler._on_scale_add_marker(this._scales[day],date));\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\t//manually trigger rendering of configs for each column\r\n\t\t\tvar date = new Date(scheduler._min_date);\r\n\t\t\tfor (var i = 0, len = data.childNodes.length; i < len; i++) {\r\n\t\t\t\tvar area = data.childNodes[i];\r\n\t\t\t\tif (area.firstChild && scheduler._getClassName(area.firstChild).indexOf(\"dhx_scale_hour\") > -1) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdivs.push.apply(divs, scheduler._on_scale_add_marker(area, date));\r\n\t\t\t\tdate = scheduler.date.add(date, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn divs;\r\n\t};\r\n\r\n\t// just marks timespan, will be cleaned after refresh\r\n\tscheduler.markTimespan = function(configuration) {\r\n\r\n\t\tif(!this._els){\r\n\t\t\tthrow new Error(\"`scheduler.markTimespan` can't be used before scheduler initialization. Place `scheduler.markTimespan` call after `scheduler.init`.\");\r\n\t\t}\r\n\r\n\t\tvar rebuild_els = false;\r\n\t\tif(!this._els[\"dhx_cal_data\"]){\r\n\t\t\tscheduler.get_elements();\r\n\t\t\trebuild_els = true;\r\n\t\t}\r\n\r\n\r\n\t\t// backup regular marked timespans\r\n\t\tvar timespans_ids = scheduler._marked_timespans_ids,\r\n\t\t\ttimespan_types = scheduler._marked_timespans_types,\r\n\t\t\ttimespans = scheduler._marked_timespans;\r\n\r\n\t\tscheduler.deleteMarkedTimespan();\r\n\r\n\t\t//add block to configs\r\n\t\tscheduler.addMarkedTimespan(configuration);\r\n\r\n\t\tvar divs = scheduler._mark_timespans();\r\n\r\n\t\tif(rebuild_els)\r\n\t\t\tscheduler._els = [];\r\n\r\n\t\t// restore timespan config\r\n\t\tscheduler._marked_timespans_ids = timespans_ids;\r\n\t\tscheduler._marked_timespans_types = timespan_types;\r\n\t\tscheduler._marked_timespans = timespans;\r\n\r\n\t\treturn divs;\r\n\t};\r\n\tscheduler.unmarkTimespan = function(divs) {\r\n\t\tif (!divs)\r\n\t\t\treturn;\r\n\t\tfor (var i=0; i c_zone_end && zone_start <= c_zone_end) || (zone_start < c_zone_start && zone_end >= c_zone_start)) {\r\n\t\t\t\t\tresulting_zones[i] = Math.min(c_zone_start, zone_start);\r\n\t\t\t\t\tresulting_zones[i+1] = Math.max(c_zone_end, zone_end);\r\n\t\t\t\t\ti -= 2;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (!isLast) // do nothing, maybe next current zone will match or will be last\r\n\t\t\t\t\t\tcontinue;\r\n\r\n\t\t\t\t\tvar offset = (c_zone_start > zone_start)?0:2;\r\n\t\t\t\t\tresulting_zones.splice(i+offset, 0, zone_start, zone_end); // last current zone, need to add another\r\n\t\t\t\t}\r\n\t\t\t\tzones.splice(k--,2); // zone was merged or added, need to exclude it\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn resulting_zones;\r\n\t};\r\n\tscheduler._subtract_timespan_zones = function(current_zones, zones) {\r\n\t\tvar resulting_zones = current_zones.slice();\r\n\t\tfor (var i=0; i c_zone_start && zone_start < c_zone_end) {\r\n\t\t\t\t\tvar is_modified = false;\r\n\t\t\t\t\tif (c_zone_start >= zone_start && c_zone_end <= zone_end) {\r\n\t\t\t\t\t\tresulting_zones.splice(i, 2);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (c_zone_start < zone_start) {\r\n\t\t\t\t\t\tresulting_zones.splice(i, 2, c_zone_start, zone_start);\r\n\t\t\t\t\t\tis_modified = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (c_zone_end > zone_end) {\r\n\t\t\t\t\t\tresulting_zones.splice( (is_modified)?(i+2):i, (is_modified)?0:2, zone_end, c_zone_end);\r\n\t\t\t\t\t}\r\n\t\t\t\t\ti -= 2;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn resulting_zones;\r\n\t};\r\n\tscheduler.invertZones = function(zones) {\r\n\t\treturn scheduler._subtract_timespan_zones([0, 1440], zones.slice());\r\n\t};\r\n\tscheduler._delete_marked_timespan_by_id = function(id) {\r\n\t\tvar configs = scheduler._marked_timespans_ids[id];\r\n\t\tif (configs) {\r\n\t\t\tfor (var i=0; i 1)){\r\n\t\t\t\tday = scheduler.date.date_part(new Date(this._date)); // for units view actually only 1 day is displayed yet the day variable will change, need to use this._date for all calls\r\n\t\t\t}else{\r\n\t\t\t\tvar dx = 24*60*60*1000;\r\n\t\t\t\tvar day_ind = Math.round((day - scheduler._min_date)/dx);\r\n\t\t\t\tvar unitsPerDay = view.size || units.length;\r\n\t\t\t\tday = scheduler.date.add(scheduler._min_date, Math.floor(day_ind/unitsPerDay), \"day\"); // to the \"same\" day for all sections\r\n\t\t\t\tday = scheduler.date.date_part(day);\r\n\t\t\t}\r\n\t\t\tday_index = day.getDay();\r\n\t\t\tday_value = day.valueOf();\r\n\r\n\t\t\tif (timespans[mode] && timespans[mode][unit.key]) {\r\n\t\t\t\tvar unit_zones = timespans[mode][unit.key];\r\n\t\t\t\tvar unit_types = scheduler._get_types_to_render(unit_zones[day_index], unit_zones[day_value]);\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(unit_types));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar global_data = timespans[\"global\"];\r\n\r\n\t\tif(scheduler.config.overwrite_marked_timespans){\r\n\t\t\tvar day_types = global_data[day_value]||global_data[day_index];\r\n\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(day_types));\r\n\t\t} else {\r\n\t\t\tif(global_data[day_value]){\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(global_data[day_value]));\r\n\t\t\t}\r\n\t\t\tif(global_data[day_index]){\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(global_data[day_index]));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (var i=0; i\" + ev.text + \"

\" + (ev.event_location || '') + \"

\" + scheduler.templates.marker_date(start) + \" - \" + scheduler.templates.marker_date(end) + \"
\";\r\n};\r\nscheduler.dblclick_dhx_map_area = function() {\r\n\tif (!this.config.readonly && this.config.dblclick_create)\r\n\t\tthis.addEventNow({\r\n\t\t\tstart_date: scheduler._date,\r\n\t\t\tend_date: scheduler.date.add(scheduler._date, scheduler.config.time_step, \"minute\")\r\n\t\t});\r\n};\r\nscheduler.templates.map_time = function(start, end, ev) {\r\n\tif (scheduler.config.rtl && !ev._timed) {\r\n\t\treturn scheduler.templates.day_date(end) + \" – \" + scheduler.templates.day_date(start);\r\n\t} else if (ev._timed) {\r\n\t\treturn this.day_date(ev.start_date, ev.end_date, ev) + \" \" + this.event_date(start);\r\n\t} else {\r\n\t\treturn scheduler.templates.day_date(start) + \" – \" + scheduler.templates.day_date(end);\r\n\t}\r\n};\r\nscheduler.templates.map_text = function(start, end, ev) {\r\n\treturn ev.text;\r\n};\r\n\r\nscheduler.date.map_start = function(d) {\r\n\treturn d;\r\n};\r\nscheduler.date.add_map = function(date, inc, mode) {\r\n\treturn (new Date(date.valueOf()));\r\n};\r\n\r\nscheduler.templates.map_date = function(dd, ed, mode) {\r\n\treturn '';\r\n};\r\n\r\nscheduler._latLngUpdate = false; // flag for not displaying event second time in case of coordinates update\r\n\r\nscheduler.attachEvent(\"onSchedulerReady\", function() {\r\n\tscheduler._isMapPositionSet = false; // if user actual (geolocation) position was set on the map\r\n\r\n\tconst gmap = document.createElement('div');\r\n\tgmap.className = 'dhx_map';\r\n\tgmap.id = 'dhx_gmap';\r\n\tgmap.style.display = \"none\";\r\n\r\n\tscheduler._obj.appendChild(gmap);\r\n\r\n\tscheduler._els.dhx_gmap = [];\r\n\tscheduler._els.dhx_gmap.push(gmap);\r\n\r\n\t_setMapSize('dhx_gmap');\r\n\r\n\tconst mapOptions = {\r\n\t\tzoom: scheduler.config.map_initial_zoom || 10,\r\n\t\tcenter: scheduler.config.map_initial_position,\r\n\t\tmapTypeId: scheduler.config.map_type || google.maps.MapTypeId.ROADMAP\r\n\t};\r\n\tconst map = new google.maps.Map(document.getElementById('dhx_gmap'), mapOptions);\r\n\tmap.disableDefaultUI = false;\r\n\tmap.disableDoubleClickZoom = !scheduler.config.readonly;\r\n\r\n\tgoogle.maps.event.addListener(map, \"dblclick\", function(event) {\r\n\t\tconst geocoder = scheduler.ext.mapView.geocoder;\r\n\r\n\t\tif (!scheduler.config.readonly && scheduler.config.dblclick_create) {\r\n\t\t\tvar point = event.latLng;\r\n\t\t\tgeocoder.geocode(\r\n\t\t\t\t{ 'latLng': point },\r\n\t\t\t\tfunction(results, status) {\r\n\t\t\t\t\tif (status == google.maps.GeocoderStatus.OK) {\r\n\t\t\t\t\t\tpoint = results[0].geometry.location;\r\n\t\t\t\t\t\tscheduler.addEventNow({\r\n\t\t\t\t\t\t\tlat: point.lat(),\r\n\t\t\t\t\t\t\tlng: point.lng(),\r\n\t\t\t\t\t\t\tevent_location: results[0].formatted_address,\r\n\t\t\t\t\t\t\tstart_date: scheduler._date,\r\n\t\t\t\t\t\t\tend_date: scheduler.date.add(scheduler._date, scheduler.config.time_step, \"minute\")\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t}\r\n\t});\r\n\r\n\tvar infoWindowOptions = {\r\n\t\tcontent: ''\r\n\t};\r\n\r\n\tif (scheduler.config.map_infowindow_max_width) {\r\n\t\tinfoWindowOptions.maxWidth = scheduler.config.map_infowindow_max_width;\r\n\t}\r\n\r\n\tscheduler.map = {\r\n\t\t_points: [],\r\n\t\t_markers: [],\r\n\t\t_infowindow: new google.maps.InfoWindow(infoWindowOptions),\r\n\t\t_infowindows_content: [],\r\n\t\t_initialization_count: -1,\r\n\t\t_obj: map\r\n\t};\r\n\r\n\tscheduler.ext.mapView.geocoder = new google.maps.Geocoder();\r\n\tscheduler.ext.mapView.map = map;\r\n\tscheduler.ext.mapView.points = scheduler.map._points;\r\n\tscheduler.ext.mapView.markers = scheduler.map._markers;\r\n\tscheduler.ext.mapView.infoWindow = scheduler.map._infowindow;\r\n\r\n\tif (scheduler.config.map_resolve_user_location) {\r\n\t\tif (navigator.geolocation) {\r\n\t\t\tif (!scheduler._isMapPositionSet) {\r\n\t\t\t\tnavigator.geolocation.getCurrentPosition(function(position) {\r\n\t\t\t\t\tvar _userLocation = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);\r\n\t\t\t\t\tmap.setCenter(_userLocation);\r\n\t\t\t\t\tmap.setZoom(scheduler.config.map_zoom_after_resolve || 10);\r\n\t\t\t\t\tscheduler.map._infowindow.setContent(scheduler.locale.labels.marker_geo_success);\r\n\t\t\t\t\tscheduler.map._infowindow.position = map.getCenter();\r\n\t\t\t\t\tscheduler.map._infowindow.open(map);\r\n\r\n\t\t\t\t\tscheduler._isMapPositionSet = true;\r\n\t\t\t\t},\r\n\t\t\t\t\t\tfunction() {\r\n\t\t\t\t\t\t\tscheduler.map._infowindow.setContent(scheduler.locale.labels.marker_geo_fail);\r\n\t\t\t\t\t\t\tscheduler.map._infowindow.setPosition(map.getCenter());\r\n\t\t\t\t\t\t\tscheduler.map._infowindow.open(map);\r\n\t\t\t\t\t\t\tscheduler._isMapPositionSet = true;\r\n\t\t\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tgoogle.maps.event.addListener(map, \"resize\", function(event) {\r\n\t\tgmap.style.zIndex = '5';\r\n\t\tmap.setZoom(map.getZoom());\r\n\r\n\t});\r\n\tgoogle.maps.event.addListener(map, \"tilesloaded\", function(event) {\r\n\t\tgmap.style.zIndex = '5';\r\n\t});\r\n\r\n\tgmap.style.display = 'none'; // property was changed after attaching map\r\n\r\n\tconst old = scheduler.render_data;\r\n\tscheduler.render_data = function(evs, hold) {\r\n\t\tif (this._mode == \"map\") {\r\n\t\t\tfill_map_tab();\r\n\t\t\tvar events = scheduler.get_visible_events();\r\n\t\t\tfor (var i = 0; i < events.length; i++) {\r\n\t\t\t\tif (!scheduler.map._markers[events[i].id]) {\r\n\t\t\t\t\tshowAddress(events[i], false, false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else\r\n\t\t\treturn old.apply(this, arguments);\r\n\t};\r\n\r\n\tfunction set_full_view(mode) {\r\n\t\tif (mode) {\r\n\t\t\tvar l = scheduler.locale.labels;\r\n\t\t\tscheduler._els[\"dhx_cal_header\"][0].innerHTML = \"
\" + l.date + \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"
\" + l.description + \"
\";\r\n\t\t\tscheduler._table_view = true;\r\n\t\t\tscheduler.set_sizes();\r\n\t\t}\r\n\t}\r\n\r\n\tfunction clear_map_tab() {\r\n\t\tscheduler._selected_event_id = null;\r\n\t\tscheduler.map._infowindow.close();\r\n\t\tvar markers = scheduler.map._markers;\r\n\t\tfor (var key in markers) {\r\n\t\t\tif (markers.hasOwnProperty(key)) {\r\n\t\t\t\tmarkers[key].setMap(null);\r\n\t\t\t\tdelete scheduler.map._markers[key];\r\n\t\t\t\tif (scheduler.map._infowindows_content[key])\r\n\t\t\t\t\tdelete scheduler.map._infowindows_content[key];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction fill_map_tab() {\r\n\t\t//select events for which data need to be printed\r\n\t\tvar events = scheduler.get_visible_events();\r\n\t\tevents.sort(function(a, b) {\r\n\t\t\tif(a.start_date.valueOf()==b.start_date.valueOf())\r\n\t\t\t\treturn a.id>b.id?1:-1;\r\n\t\t\treturn a.start_date>b.start_date?1:-1;\r\n\t\t});\r\n\r\n\t\t//generate html for the view\r\n\t\tvar ariaAttr = scheduler._waiAria.mapAttrString();\r\n\r\n\t\tvar html = \"
\";\r\n\t\tfor (var i = 0; i < events.length; i++) {\r\n\t\t\tvar ev = events[i];\r\n\t\t\tvar event_class = (ev.id == scheduler._selected_event_id) ? 'dhx_map_line highlight' : 'dhx_map_line';\r\n\t\t\tvar bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\t\t\tvar color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\t\t\tvar ariaAttr = scheduler._waiAria.mapRowAttrString(ev);\r\n\t\t\tvar ariaButtonAttr = scheduler._waiAria.mapDetailsBtnString();\r\n\r\n\t\t\thtml += \"
\" + scheduler.templates.map_time(ev.start_date, ev.end_date, ev) + \"
\";\r\n\t\t\thtml += `
\r\n\t\t\t\r\n\t\t\t
`;\r\n\t\t\thtml += \"
\" + scheduler.templates.map_text(ev.start_date, ev.end_date, ev) + \"
\"; // -25 = icon size 20 and padding 5\r\n\t\t}\r\n\t\thtml += \"
\";\r\n\r\n\t\t//render html\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = 0; //fix flickering in FF\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t//\tscheduler._els[\"dhx_cal_data\"][0].style.width = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\r\n\t\tvar t = scheduler._els[\"dhx_cal_data\"][0].firstChild.childNodes;\r\n\r\n\t\tvar dateElement = scheduler._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML=scheduler.templates[scheduler._mode + \"_date\"](scheduler._min_date, scheduler._max_date, scheduler._mode);\r\n\t\t}\r\n\r\n\t\tscheduler._rendered = [];\r\n\t\tfor (var i = 0; i < t.length - 2; i++) {\r\n\t\t\tscheduler._rendered[i] = t[i];\r\n\t\t}\r\n\t}\r\n\r\n\tfunction _setMapSize(elem_id) { //input - map's div id\r\n\t\tvar map = document.getElementById(elem_id);\r\n\t\tconst nav_height = scheduler.$container.querySelector(\".dhx_cal_navline\").offsetHeight;\r\n\t\tvar height = scheduler._y - nav_height;\r\n\t\tif (height < 0)\r\n\t\t\theight = 0;\r\n\t\tvar width = scheduler._x - scheduler.xy.map_date_width - scheduler.xy.map_description_width - 1;\r\n\t\tif (width < 0)\r\n\t\t\twidth = 0;\r\n\t\tmap.style.height = height + 'px';\r\n\t\tmap.style.width = width + 'px';\r\n\t\tmap.style.position = \"absolute\";\r\n\t\tmap.style.top = nav_height + \"px\";\r\n\t\tif (scheduler.config.rtl) {\r\n\t\t\tmap.style.marginRight = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\t\t} else {\r\n\t\t\tmap.style.marginLeft = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\t\t}\r\n\t\tmap.style.marginTop = (scheduler.xy.nav_height + 2) + 'px';\r\n\t}\r\n\r\n\tscheduler.map_view = function(mode) {\r\n\t\tscheduler.map._initialization_count++;\r\n\t\tvar gmap = scheduler._els.dhx_gmap[0];\r\n\t\tvar temp_center;\r\n\t\t//scheduler._els.dhx_cal_data[0].style.width = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\r\n\t\tscheduler._min_date = scheduler.config.map_start || (scheduler._currentDate());\r\n\t\tscheduler._max_date = scheduler.config.map_end || scheduler.date.add(scheduler._currentDate(), 1, \"year\");\r\n\r\n\t\tscheduler._table_view = true;\r\n\t\tset_full_view(mode);\r\n\r\n\t\tif (mode) { //map tab activated\r\n\t\t\tclear_map_tab();\r\n\t\t\tfill_map_tab();\r\n\t\t\tgmap.style.display = 'block';\r\n\r\n\t\t\t// need to resize block every time window is resized\r\n\t\t\t_setMapSize('dhx_gmap');\r\n\t\t\ttemp_center = scheduler.map._obj.getCenter();\r\n\r\n\t\t\tvar events = scheduler.get_visible_events();\r\n\t\t\tfor (var i = 0; i < events.length; i++) {\r\n\t\t\t\tif (!scheduler.map._markers[events[i].id]) {\r\n\t\t\t\t\tshowAddress(events[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t} else { //map tab de-activated\r\n\t\t\tgmap.style.display = 'none';\r\n\t\t}\r\n\t\tgoogle.maps.event.trigger(scheduler.map._obj, 'resize');\r\n\r\n\t\tif (scheduler.map._initialization_count === 0 && temp_center) { // if tab is activated for the first time need to fix position\r\n\t\t\tscheduler.map._obj.setCenter(temp_center);\r\n\t\t}\r\n\r\n\t\tif (scheduler._selected_event_id) {\r\n\t\t\tselectEvent(scheduler._selected_event_id);\r\n\t\t}\r\n\t};\r\n\r\n\tvar selectEvent = function(event_id) {\r\n\t\tscheduler.map._obj.setCenter(scheduler.map._points[event_id]);\r\n\t\tscheduler.callEvent(\"onClick\", [event_id]);\r\n\t};\r\n\r\n\tvar showAddress = function(event, setCenter, performClick) { // what if event have incorrect position from the start?\r\n\t\tvar point = scheduler.config.map_error_position;\r\n\t\tif (event.lat && event.lng) {\r\n\t\t\tpoint = new google.maps.LatLng(event.lat, event.lng);\r\n\t\t}\r\n\t\tvar message = scheduler.templates.marker_text(event.start_date, event.end_date, event);\r\n\t\tif (!scheduler._new_event) {\r\n\r\n\t\t\tscheduler.map._infowindows_content[event.id] = message;\r\n\r\n\t\t\tif (scheduler.map._markers[event.id])\r\n\t\t\t\tscheduler.map._markers[event.id].setMap(null);\r\n\r\n\t\t\tscheduler.map._markers[event.id] = scheduler.ext.mapView.createMarker({\r\n\t\t\t\tposition: point,\r\n\t\t\t\tmap: scheduler.map._obj\r\n\t\t\t});\r\n\r\n\t\t\tgoogle.maps.event.addListener(scheduler.map._markers[event.id], 'click', function() {\r\n\t\t\t\tscheduler.map._infowindow.setContent(scheduler.map._infowindows_content[event.id]);\r\n\t\t\t\tscheduler.map._infowindow.open(scheduler.map._obj, scheduler.map._markers[event.id]);\r\n\t\t\t\tscheduler._selected_event_id = event.id;\r\n\t\t\t\tscheduler.render_data();\r\n\t\t\t});\r\n\t\t\tscheduler.map._points[event.id] = point;\r\n\r\n\t\t\tif (setCenter) scheduler.map._obj.setCenter(scheduler.map._points[event.id]);\r\n\t\t\tif (performClick) scheduler.callEvent(\"onClick\", [event.id]);\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onClick\", function(id, domEvent) {\r\n\t\tif (this._mode == \"map\") {\r\n\t\t\tscheduler._selected_event_id = id;\r\n\t\t\tfor (var i = 0; i < scheduler._rendered.length; i++) {\r\n\t\t\t\tscheduler._rendered[i].className = 'dhx_map_line';\r\n\t\t\t\tif (scheduler._rendered[i].getAttribute(scheduler.config.event_attribute) == id) {\r\n\t\t\t\t\tscheduler._rendered[i].className += \" highlight\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (scheduler.map._points[id] && scheduler.map._markers[id]) {\r\n\t\t\t\tscheduler.map._obj.setCenter(scheduler.map._points[id]); // was panTo\r\n\t\t\t\tgoogle.maps.event.trigger(scheduler.map._markers[id], 'click');\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tvar _displayEventOnMap = function(event) {\r\n\t\tconst geocoder = scheduler.ext.mapView.geocoder;\r\n\t\tif (event.event_location && geocoder) {\r\n\t\t\tgeocoder.geocode(\r\n\t\t\t\t{\r\n\t\t\t\t\t'address': event.event_location,\r\n\t\t\t\t\t'language': scheduler.uid().toString()\r\n\t\t\t\t},\r\n\t\t\t\tfunction(results, status) {\r\n\t\t\t\t\tvar point = {};\r\n\t\t\t\t\tif (status != google.maps.GeocoderStatus.OK) {\r\n\t\t\t\t\t\tpoint = scheduler.callEvent(\"onLocationError\", [event.id]);\r\n\t\t\t\t\t\tif (!point || point === true)\r\n\t\t\t\t\t\t\tpoint = scheduler.config.map_error_position;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tpoint = results[0].geometry.location;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tevent.lat = point.lat();\r\n\t\t\t\t\tevent.lng = point.lng();\r\n\r\n\t\t\t\t\tscheduler._selected_event_id = event.id;\r\n\r\n\t\t\t\t\tscheduler._latLngUpdate = true;\r\n\t\t\t\t\tscheduler.callEvent(\"onEventChanged\", [event.id, event]);\r\n\t\t\t\t\tshowAddress(event, true, true);\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t} else {\r\n\t\t\tshowAddress(event, true, true);\r\n\t\t}\r\n\t};\r\n\r\n\tvar _updateEventLocation = function(event) { // update lat and lng in database\r\n\t\tconst geocoder = scheduler.ext.mapView.geocoder;\r\n\t\tif (event.event_location && geocoder) {\r\n\t\t\tgeocoder.geocode(\r\n\t\t\t\t{\r\n\t\t\t\t\t'address': event.event_location,\r\n\t\t\t\t\t'language': scheduler.uid().toString()\r\n\t\t\t\t},\r\n\t\t\t\tfunction(results, status) {\r\n\t\t\t\t\tvar point = {};\r\n\t\t\t\t\tif (status != google.maps.GeocoderStatus.OK) {\r\n\t\t\t\t\t\tpoint = scheduler.callEvent(\"onLocationError\", [event.id]);\r\n\t\t\t\t\t\tif (!point || point === true)\r\n\t\t\t\t\t\t\tpoint = scheduler.config.map_error_position;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tpoint = results[0].geometry.location;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tevent.lat = point.lat();\r\n\t\t\t\t\tevent.lng = point.lng();\r\n\t\t\t\t\tscheduler._latLngUpdate = true;\r\n\t\t\t\t\tscheduler.callEvent(\"onEventChanged\", [event.id, event]);\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t}\r\n\t};\r\n\r\n\tvar _delay = function(method, object, params, delay) {\r\n\t\tsetTimeout(function() {\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tvar ret = method.apply(object, params);\r\n\t\t\tmethod = object = params = null;\r\n\t\t\treturn ret;\r\n\t\t}, delay || 1);\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onEventChanged\", function(id, event) {\r\n\t\tif (!this._latLngUpdate) {\r\n\t\t\tvar event = scheduler.getEvent(id);\r\n\t\t\tif ((event.start_date < scheduler._min_date && event.end_date > scheduler._min_date) || (event.start_date < scheduler._max_date && event.end_date > scheduler._max_date) || (event.start_date.valueOf() >= scheduler._min_date && event.end_date.valueOf() <= scheduler._max_date)) {\r\n\t\t\t\tif (scheduler.map._markers[id])\r\n\t\t\t\t\tscheduler.map._markers[id].setMap(null);\r\n\t\t\t\t_displayEventOnMap(event);\r\n\t\t\t} else { // event no longer should be displayed on the map view\r\n\t\t\t\tscheduler._selected_event_id = null;\r\n\t\t\t\tscheduler.map._infowindow.close();\r\n\t\t\t\tif (scheduler.map._markers[id])\r\n\t\t\t\t\tscheduler.map._markers[id].setMap(null);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t\tthis._latLngUpdate = false;\r\n\t\treturn true;\r\n\t});\r\n\r\n\r\n\tscheduler.attachEvent(\"onEventIdChange\", function(old_event_id, new_event_id) {\r\n\t\tvar event = scheduler.getEvent(new_event_id);\r\n\t\tif ((event.start_date < scheduler._min_date && event.end_date > scheduler._min_date) || (event.start_date < scheduler._max_date && event.end_date > scheduler._max_date) || (event.start_date.valueOf() >= scheduler._min_date && event.end_date.valueOf() <= scheduler._max_date)) {\r\n\t\t\tif (scheduler.map._markers[old_event_id]) {\r\n\t\t\t\tscheduler.map._markers[old_event_id].setMap(null);\r\n\t\t\t\tdelete scheduler.map._markers[old_event_id];\r\n\t\t\t}\r\n\t\t\tif (scheduler.map._infowindows_content[old_event_id])\r\n\t\t\t\tdelete scheduler.map._infowindows_content[old_event_id];\r\n\t\t\t_displayEventOnMap(event);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onEventAdded\", function(id, event) {\r\n\t\tif (!scheduler._dataprocessor) {\r\n\t\t\tif ((event.start_date < scheduler._min_date && event.end_date > scheduler._min_date) || (event.start_date < scheduler._max_date && event.end_date > scheduler._max_date) || (event.start_date.valueOf() >= scheduler._min_date && event.end_date.valueOf() <= scheduler._max_date)) {\r\n\t\t\t\tif (scheduler.map._markers[id])\r\n\t\t\t\t\tscheduler.map._markers[id].setMap(null);\r\n\t\t\t\t_displayEventOnMap(event);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\t/* Test/example\r\n\t scheduler.attachEvent(\"onLocationError\", function(event_id,event_object){\r\n\t return new google.maps.LatLng(8, 8);\r\n\t });\r\n\t */\r\n\r\n\tscheduler.attachEvent(\"onBeforeEventDelete\", function(id, event) {\r\n\t\tif (scheduler.map._markers[id]) {\r\n\t\t\tscheduler.map._markers[id].setMap(null); // if new event is deleted tab != map then it doesn't have marker yet\r\n\t\t}\r\n\t\tscheduler._selected_event_id = null;\r\n\t\tscheduler.map._infowindow.close();\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler._event_resolve_delay = 1500;\r\n\tscheduler.attachEvent(\"onEventLoading\", function(event) {\r\n\t\tif (scheduler.config.map_resolve_event_location && event.event_location && !event.lat && !event.lng) { // don't delete !event.lat && !event.lng as location could change\r\n\t\t\tscheduler._event_resolve_delay += 1500;\r\n\t\t\t_delay(_updateEventLocation, this, [event], scheduler._event_resolve_delay);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onEventCancel\", function(id, is_new) {\r\n\t\tif (is_new) {\r\n\t\t\tif (scheduler.map._markers[id])\r\n\t\t\t\tscheduler.map._markers[id].setMap(null);\r\n\t\t\tscheduler.map._infowindow.close();\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nconst minicalDomEvents = scheduler._createDomEventScope();\r\n\t\r\n\r\nscheduler.config.minicalendar = {\r\n\tmark_events: true\r\n};\r\nscheduler._synced_minicalendars = [];\r\nscheduler.renderCalendar = function(obj, _prev, is_refresh) {\r\n\tvar cal = null;\r\n\tvar date = obj.date || (scheduler._currentDate());\r\n\tif (typeof date == \"string\")\r\n\t\tdate = this.templates.api_date(date);\r\n\r\n\tif (!_prev) {\r\n\t\tvar cont = obj.container;\r\n\t\tvar pos = obj.position;\r\n\r\n\t\tif (typeof cont == \"string\")\r\n\t\t\tcont = document.getElementById(cont);\r\n\r\n\t\tif (typeof pos == \"string\")\r\n\t\t\tpos = document.getElementById(pos);\r\n\t\tif (pos && (typeof pos.left == \"undefined\" && typeof pos.right == \"undefined\")) {\r\n\t\t\tvar tpos = scheduler.$domHelpers.getOffset(pos);\r\n\t\t\tpos = {\r\n\t\t\t\ttop: tpos.top + pos.offsetHeight,\r\n\t\t\t\tleft: tpos.left\r\n\t\t\t};\r\n\t\t}\r\n\t\tif (!cont)\r\n\t\t\tcont = scheduler._get_def_cont(pos);\r\n\r\n\t\tcal = this._render_calendar(cont, date, obj);\r\n\t\r\n\t\tif (!cal.$_eventAttached) {\r\n\t\t\tcal.$_eventAttached = true;\r\n\t\t\tminicalDomEvents.attach(cal, \"click\", (function(e) {\r\n\t\t\t\tvar src = e.target || e.srcElement;\r\n\r\n\t\t\t\tvar $dom = scheduler.$domHelpers;\r\n\t\t\t\tif ($dom.closest(src, \".dhx_month_head\")) {\r\n\t\t\t\t\tif (!$dom.closest(src, \".dhx_after\") && !$dom.closest(src, \".dhx_before\")) {\r\n\r\n\t\t\t\t\t\tvar cellRoot = $dom.closest(src, \"[data-cell-date]\");\r\n\t\t\t\t\t\tvar dateAttribute = cellRoot.getAttribute(\"data-cell-date\");\r\n\t\t\t\t\t\tvar newDate = scheduler.templates.parse_date(dateAttribute);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tscheduler.unmarkCalendar(this);\r\n\t\t\t\t\t\tscheduler.markCalendar(this, newDate, \"dhx_calendar_click\");\r\n\t\t\t\t\t\tthis._last_date = newDate;\r\n\t\t\t\t\t\tif (this.conf.handler) this.conf.handler.call(scheduler, newDate, this);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}).bind(cal));\r\n\t\t}\r\n\t\r\n\t} else {\r\n\t\tcal = this._render_calendar(_prev.parentNode, date, obj, _prev);\r\n\t\tscheduler.unmarkCalendar(cal);\r\n\t}\r\n\r\n\tif (scheduler.config.minicalendar.mark_events) {\r\n\t\tvar start = scheduler.date.month_start(date);\r\n\t\tvar end = scheduler.date.add(start, 1, \"month\");\r\n\t\tvar evs = this.getEvents(start, end);\r\n\t\tvar filter = this[\"filter_\" + this._mode];\r\n\t\tvar markedDates = {};\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tif (filter && !filter(ev.id, ev))\r\n\t\t\t\tcontinue;\r\n\t\t\tvar d = ev.start_date;\r\n\t\t\tif (d.valueOf() < start.valueOf())\r\n\t\t\t\td = start;\r\n\t\t\td = scheduler.date.date_part(new Date(d.valueOf()));\r\n\t\t\twhile (d < ev.end_date) {\r\n\t\t\t\tif(!markedDates[+d]) {\r\n\t\t\t\t\tmarkedDates[+d] = true;\r\n\t\t\t\t\tthis.markCalendar(cal, d, \"dhx_year_event\");\r\n\t\t\t\t}\r\n\t\t\t\td = this.date.add(d, 1, \"day\");\r\n\t\t\t\tif (d.valueOf() >= end.valueOf())\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tthis._markCalendarCurrentDate(cal);\r\n\r\n\tcal.conf = obj;\r\n\tif (obj.sync && !is_refresh)\r\n\t\tthis._synced_minicalendars.push(cal);\r\n\r\n\tif(!cal.conf._on_xle_handler){\r\n\t\tcal.conf._on_xle_handler = scheduler.attachEvent(\"onXLE\", function refreshOnLoad(){\r\n\t\t\tscheduler.updateCalendar(cal, cal.conf.date);\r\n\t\t});\r\n\t}\r\n\r\n\tif(this.config.wai_aria_attributes && this.config.wai_aria_application_role){\r\n\t\tcal.setAttribute(\"role\", \"application\");\r\n\t}\r\n\r\n\treturn cal;\r\n};\r\nscheduler._get_def_cont = function(pos) {\r\n\tif (!this._def_count) {\r\n\t\tthis._def_count = document.createElement(\"div\");\r\n\t\tthis._def_count.className = \"dhx_minical_popup\";\r\n\t\tscheduler.event(this._def_count, \"click\", function(e) { e.cancelBubble = true; });\r\n\t\tdocument.body.appendChild(this._def_count);\r\n\t}\r\n\r\n\tif(pos.left){\r\n\t\tthis._def_count.style.left = pos.left + \"px\";\r\n\t}\r\n\tif(pos.right){\r\n\t\tthis._def_count.style.right = pos.right + \"px\";\r\n\t}\r\n\tif(pos.top){\r\n\t\tthis._def_count.style.top = pos.top + \"px\";\r\n\t}\r\n\tif(pos.bottom){\r\n\t\tthis._def_count.style.bottom = pos.bottom + \"px\";\r\n\t}\r\n\r\n\tthis._def_count._created = new Date();\r\n\r\n\treturn this._def_count;\r\n};\r\nscheduler._locateCalendar = function(cal, date) {\r\n\tif (typeof date == \"string\")\r\n\t\tdate = scheduler.templates.api_date(date);\r\n\r\n\tif(+date > +cal._max_date || +date < +cal._min_date)\r\n\t\treturn null;\r\n\r\n\tvar table = cal.querySelector(\".dhx_year_body\").childNodes[0];\r\n\r\n\tvar weekNum = 0;\r\n\tvar dat = new Date(cal._min_date);\r\n\twhile(+this.date.add(dat, 1, \"week\") <= +date){\r\n\t\tdat = this.date.add(dat, 1, \"week\");\r\n\t\tweekNum++;\r\n\t}\r\n\r\n\tvar sm = scheduler.config.start_on_monday;\r\n\tvar day = (date.getDay() || (sm ? 7 : 0)) - (sm ? 1 : 0);\r\n\r\n\tconst dayCell = table.querySelector(`.dhx_cal_month_row:nth-child(${weekNum + 1}) .dhx_cal_month_cell:nth-child(${day + 1})`);\r\n\tif(dayCell) {\r\n\t\treturn dayCell.firstChild;\r\n\t} else {\r\n\t\treturn null;\r\n\t}\r\n};\r\nscheduler.markCalendar = function(cal, date, css) {\r\n\tvar div = this._locateCalendar(cal, date);\r\n\tif(!div)\r\n\t\treturn;\r\n\r\n\tdiv.className += \" \" + css;\r\n};\r\nscheduler.unmarkCalendar = function(cal, date, css) {\r\n\tdate = date || cal._last_date;\r\n\tcss = css || \"dhx_calendar_click\";\r\n\tif (!date) return;\r\n\tvar el = this._locateCalendar(cal, date);\r\n\tif(!el)\r\n\t\treturn;\r\n\tel.className = (el.className || \"\").replace(RegExp(css, \"g\"));\r\n};\r\nscheduler._week_template = function(width) {\r\n\tvar summ = (width || 250);\r\n\tvar left = 0;\r\n\r\n\tvar week_template = document.createElement(\"div\");\r\n\tvar dummy_date = this.date.week_start(scheduler._currentDate());\r\n\tfor (var i = 0; i < 7; i++) {\r\n\t\tthis._cols[i] = Math.floor(summ / (7 - i));\r\n\t\tthis._render_x_header(i, left, dummy_date, week_template);\r\n\t\tdummy_date = this.date.add(dummy_date, 1, \"day\");\r\n\t\tsumm -= this._cols[i];\r\n\t\tleft += this._cols[i];\r\n\t}\r\n\tweek_template.lastChild.className += \" dhx_scale_bar_last\";\r\n\treturn week_template;\r\n};\r\nscheduler.updateCalendar = function(obj, sd) {\r\n\tobj.conf.date = sd;\r\n\tthis.renderCalendar(obj.conf, obj, true);\r\n};\r\nscheduler._mini_cal_arrows = [\" \", \" \"];\r\nscheduler._render_calendar = function(obj, sd, conf, previous) {\r\n\t/*store*/\r\n\tvar ts = scheduler.templates;\r\n\tvar temp = this._cols;\r\n\tthis._cols = [];\r\n\tvar temp2 = this._mode;\r\n\tthis._mode = \"calendar\";\r\n\tvar temp3 = this._colsS;\r\n\tthis._colsS = {height: 0};\r\n\tvar temp4 = new Date(this._min_date);\r\n\tvar temp5 = new Date(this._max_date);\r\n\tvar temp6 = new Date(scheduler._date);\r\n\tvar temp7 = ts.month_day;\r\n\tvar temp8 = this._ignores_detected; this._ignores_detected = 0;\r\n\tts.month_day = ts.calendar_date;\r\n\r\n\tsd = this.date.month_start(sd);\r\n\tvar week_template = this._week_template(obj.offsetWidth - 1 - this.config.minicalendar.padding );\r\n\r\n\tvar d;\r\n\tif (previous){\r\n\t\td = previous;\r\n\t} else {\r\n\t\td = document.createElement(\"div\");\r\n\t\td.className = \"dhx_cal_container dhx_mini_calendar\";\r\n\t}\r\n\td.setAttribute(\"date\", this._helpers.formatDate(sd));\r\n\td.innerHTML = \"
\" +\r\n\t\t\t\"
\" : \"'>\") +\r\n\t\t\t\"
\"+(week_template ? week_template.innerHTML : \"\")+\"
\" +\r\n\t\t\t\"
\" +\r\n\t\t\"
\";\r\n\tvar header = d.querySelector(\".dhx_year_month\");\r\n\tvar weekHeader = d.querySelector(\".dhx_year_week\");\r\n\tvar body = d.querySelector(\".dhx_year_body\");\r\n\r\n\theader.innerHTML = this.templates.calendar_month(sd);\r\n\tif (conf.navigation) {\r\n\t\tvar move_minicalendar_date = function(calendar, diff) {\r\n\t\t\tvar date = scheduler.date.add(calendar._date, diff, \"month\");\r\n\t\t\tscheduler.updateCalendar(calendar, date);\r\n\t\t\tif (scheduler._date.getMonth() == calendar._date.getMonth() && scheduler._date.getFullYear() == calendar._date.getFullYear()) {\r\n\t\t\t\tscheduler._markCalendarCurrentDate(calendar);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tvar css_classnames = [\"dhx_cal_prev_button\", \"dhx_cal_next_button\"];\r\n\t\tvar css_texts = [\"left:1px;top:4px;position:absolute;\", \"left:auto; right:1px;top:4px;position:absolute;\"];\r\n\t\tvar diffs = [-1, 1];\r\n\t\tvar handler = function(diff) {\r\n\t\t\treturn function() {\t\r\n\t\t\t\tif (conf.sync) {\r\n\t\t\t\t\tvar calendars = scheduler._synced_minicalendars;\r\n\t\t\t\t\tfor (var k = 0; k < calendars.length; k++) {\r\n\t\t\t\t\t\tmove_minicalendar_date(calendars[k], diff);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (scheduler.config.rtl) {\r\n\t\t\t\t\t\tdiff = -diff;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmove_minicalendar_date(d, diff);\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t};\r\n\t\tvar labels = [scheduler.locale.labels.prev, scheduler.locale.labels.next];\r\n\t\tfor (var j = 0; j < 2; j++) {\r\n\t\t\tvar arrow = document.createElement(\"div\");\r\n\t\t\t//var diff = diffs[j];\r\n\t\t\tarrow.className = css_classnames[j];\r\n\r\n\t\t\tscheduler._waiAria.headerButtonsAttributes(arrow, labels[j]);\r\n\r\n\t\t\tarrow.style.cssText = css_texts[j];\r\n\t\t\tarrow.innerHTML = this._mini_cal_arrows[j];\r\n\t\t\theader.appendChild(arrow);\r\n\t\t\tminicalDomEvents.attach(arrow, \"click\", handler(diffs[j]));\r\n\t\t}\r\n\t}\r\n\td._date = new Date(sd);\r\n\r\n\td.week_start = (sd.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) % 7;\r\n\r\n\tvar dd = d._min_date = this.date.week_start(sd);\r\n\td._max_date = this.date.add(d._min_date, 6, \"week\");\r\n\r\n\tthis._reset_month_scale(body, sd, dd, 6);\r\n\r\n\tif (!previous)\r\n\t\tobj.appendChild(d);\r\n\r\n\tweekHeader.style.height = (weekHeader.childNodes[0].offsetHeight - 1) + \"px\"; // dhx_year_week should have height property so that day dates would get correct position. dhx_year_week height = height of it's child (with the day name)\r\n\r\n\tvar headerId = scheduler.uid();\r\n\tscheduler._waiAria.minicalHeader(header, headerId);\r\n\tscheduler._waiAria.minicalGrid(d.querySelector(\".dhx_year_grid\"), headerId);\r\n\tscheduler._waiAria.minicalRow(weekHeader);\r\n\r\n\tvar dayHeaders = weekHeader.querySelectorAll(\".dhx_scale_bar\");\r\n\tfor(var i = 0; i < dayHeaders.length; i++){\r\n\t\tscheduler._waiAria.minicalHeadCell(dayHeaders[i]);\r\n\t}\r\n\tvar dayCells = body.querySelectorAll(\".dhx_cal_month_cell\");\r\n\tvar firstDate = new Date(dd);\r\n\tfor(var i = 0; i < dayCells.length; i++){\r\n\r\n\t\tscheduler._waiAria.minicalDayCell(dayCells[i], new Date(firstDate));\r\n\t\tfirstDate = scheduler.date.add(firstDate, 1, \"day\");\r\n\t}\r\n\r\n\tscheduler._waiAria.minicalHeader(header, headerId);\r\n\r\n\t/*restore*/\r\n\tthis._cols = temp;\r\n\tthis._mode = temp2;\r\n\tthis._colsS = temp3;\r\n\tthis._min_date = temp4;\r\n\tthis._max_date = temp5;\r\n\tscheduler._date = temp6;\r\n\tts.month_day = temp7;\r\n\tthis._ignores_detected = temp8;\r\n\treturn d;\r\n};\r\nscheduler.destroyCalendar = function(cal, force) {\r\n\tif (!cal && this._def_count && this._def_count.firstChild) {\r\n\t\tif (force || (new Date()).valueOf() - this._def_count._created.valueOf() > 500)\r\n\t\t\tcal = this._def_count.firstChild;\r\n\t}\r\n\tif (!cal) return;\r\n\tminicalDomEvents.detachAll();\r\n\t//cal.onclick = null;\r\n\tcal.innerHTML = \"\";\r\n\tif (cal.parentNode)\r\n\t\tcal.parentNode.removeChild(cal);\r\n\tif (this._def_count)\r\n\t\tthis._def_count.style.top = \"-1000px\";\r\n\r\n\tif(cal.conf && cal.conf._on_xle_handler)\r\n\t\tscheduler.detachEvent(cal.conf._on_xle_handler);\r\n};\r\nscheduler.isCalendarVisible = function() {\r\n\tif (this._def_count && parseInt(this._def_count.style.top, 10) > 0)\r\n\t\treturn this._def_count;\r\n\treturn false;\r\n};\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tscheduler.event(document.body, \"click\", function() { scheduler.destroyCalendar(); });\r\n}, {once: true});\r\n\r\n\r\n\r\nscheduler.form_blocks.calendar_time = {\r\n\trender: function(sns) {\r\n\t\tvar html = \"\";\r\n\r\n\t\tvar cfg = scheduler.config;\r\n\t\tvar dt = this.date.date_part(scheduler._currentDate());\r\n\r\n\t\tvar last = 24 * 60, first = 0;\r\n\t\tif (cfg.limit_time_select) {\r\n\t\t\tfirst = 60 * cfg.first_hour;\r\n\t\t\tlast = 60 * cfg.last_hour + 1; // to include \"17:00\" option if time select is limited\r\n\t\t}\r\n\t\tdt.setHours(first / 60);\r\n\r\n\t\tsns._time_values = [];\r\n\t\thtml += \" \";\r\n\r\n\t\t//var full_day = scheduler.config.full_day;\r\n\r\n\t\treturn \"
\" + html + \"  –  \" + html + \"
\";\r\n\t},\r\n\tset_value: function(node, value, ev, config) {\r\n\r\n\t\tvar inputs = node.getElementsByTagName(\"input\");\r\n\t\tvar selects = node.getElementsByTagName(\"select\");\r\n\t\tvar start_date,\r\n\t\t\tend_date;\r\n\r\n\t\tvar _init_once = function(inp, date, number) {\r\n\t\t\tscheduler.event(inp, \"click\", function() {\r\n\t\t\t\tscheduler.destroyCalendar(null, true);\r\n\t\t\t\tscheduler.renderCalendar({\r\n\t\t\t\t\tposition: inp,\r\n\t\t\t\t\tdate: new Date(this._date),\r\n\t\t\t\t\tnavigation: true,\r\n\t\t\t\t\thandler: function(new_date) {\r\n\t\t\t\t\t\tinp.value = scheduler.templates.calendar_time(new_date);\r\n\t\t\t\t\t\tinp._date = new Date(new_date);\r\n\t\t\t\t\t\tscheduler.destroyCalendar();\r\n\t\t\t\t\t\tif (scheduler.config.event_duration && scheduler.config.auto_end_date && number === 0) { //first element = start date\r\n\t\t\t\t\t\t\t_update_minical_select();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t};\r\n\r\n\t\tif (scheduler.config.full_day) {\r\n\t\t\tif (!node._full_day) {\r\n\t\t\t\tvar html = \"\";\r\n\t\t\t\tif (!scheduler.config.wide_form)\r\n\t\t\t\t\thtml = node.previousSibling.innerHTML + html;\r\n\t\t\t\tnode.previousSibling.innerHTML = html;\r\n\t\t\t\tnode._full_day = true;\r\n\t\t\t}\r\n\t\t\tvar input = node.previousSibling.getElementsByTagName(\"input\")[0];\r\n\r\n\t\t\tvar isFulldayEvent = (scheduler.date.time_part(ev.start_date) === 0 && scheduler.date.time_part(ev.end_date) === 0);\r\n\t\t\tinput.checked = isFulldayEvent;\r\n\r\n\t\t\tselects[0].disabled = input.checked;\r\n\t\t\tselects[1].disabled = input.checked;\r\n\r\n\t\t\tif (!input.$_eventAttached) {\r\n\t\t\t\tinput.$_eventAttached = true;\r\n\t\t\t\tscheduler.event(input, \"click\", function() {\r\n\t\t\t\t\tif (input.checked === true) {\r\n\t\t\t\t\t\tvar obj = {};\r\n\t\t\t\t\t\tscheduler.form_blocks.calendar_time.get_value(node, obj);\r\n\r\n\t\t\t\t\t\tstart_date = scheduler.date.date_part(obj.start_date);\r\n\t\t\t\t\t\tend_date = scheduler.date.date_part(obj.end_date);\r\n\r\n\t\t\t\t\t\tif (+end_date == +start_date || (+end_date >= +start_date && (ev.end_date.getHours() !== 0 || ev.end_date.getMinutes() !== 0)))\r\n\t\t\t\t\t\t\tend_date = scheduler.date.add(end_date, 1, \"day\");\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tvar start = start_date || ev.start_date;\r\n\t\t\t\t\tvar end = end_date || ev.end_date;\r\n\t\t\t\t\t_attach_action(inputs[0], start);\r\n\t\t\t\t\t_attach_action(inputs[1], end);\r\n\t\t\t\t\tselects[0].value = start.getHours() * 60 + start.getMinutes();\r\n\t\t\t\t\tselects[1].value = end.getHours() * 60 + end.getMinutes();\r\n\r\n\t\t\t\t\tselects[0].disabled = input.checked;\r\n\t\t\t\t\tselects[1].disabled = input.checked;\r\n\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (scheduler.config.event_duration && scheduler.config.auto_end_date) {\r\n\r\n\t\t\tvar _update_minical_select = function () {\r\n\t\t\t\tif (!(scheduler.config.auto_end_date && scheduler.config.event_duration)){\r\n\t\t\t\t\t// setting may be disabled after the handler is attached\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tstart_date = scheduler.date.add(inputs[0]._date, selects[0].value, \"minute\");\r\n\t\t\t\tend_date = new Date(start_date.getTime() + (scheduler.config.event_duration * 60 * 1000));\r\n\r\n\t\t\t\tinputs[1].value = scheduler.templates.calendar_time(end_date);\r\n\t\t\t\tinputs[1]._date = scheduler.date.date_part(new Date(end_date));\r\n\r\n\t\t\t\tselects[1].value = end_date.getHours() * 60 + end_date.getMinutes();\r\n\t\t\t};\r\n\r\n\t\t\tif(!selects[0].$_eventAttached){\r\n\t\t\t\tselects[0].addEventListener(\"change\", _update_minical_select); // only update on first select should trigger update so user could define other end date if he wishes too\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction _attach_action(inp, date, number) {\r\n\t\t\t_init_once(inp, date, number);\r\n\t\t\tinp.value = scheduler.templates.calendar_time(date);\r\n\t\t\tinp._date = scheduler.date.date_part(new Date(date));\r\n\t\t}\r\n\r\n\t\t_attach_action(inputs[0], ev.start_date, 0);\r\n\t\t_attach_action(inputs[1], ev.end_date, 1);\r\n\t\t_init_once = function() {};\r\n\r\n\t\tfunction _round_minutes(date) {\r\n\t\t\tvar time_values = config._time_values;\r\n\t\t\tvar direct_value = date.getHours() * 60 + date.getMinutes();\r\n\t\t\tvar fixed_value = direct_value;\r\n\t\t\tvar value_found = false;\r\n\r\n\t\t\tfor (var k = 0; k < time_values.length; k++) {\r\n\t\t\t\tvar t_v = time_values[k];\r\n\t\t\t\tif (t_v === direct_value) {\r\n\t\t\t\t\tvalue_found = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif (t_v < direct_value)\r\n\t\t\t\t\tfixed_value = t_v;\r\n\t\t\t}\r\n\r\n\t\t\tif(!(value_found || fixed_value))\r\n\t\t\t\treturn -1;\r\n\r\n\t\t\treturn (value_found) ? direct_value : fixed_value;\r\n\t\t}\r\n\r\n\t\tselects[0].value = _round_minutes(ev.start_date);\r\n\t\tselects[1].value = _round_minutes(ev.end_date);\r\n\r\n\t},\r\n\tget_value: function(node, ev) {\r\n\t\tvar inputs = node.getElementsByTagName(\"input\");\r\n\t\tvar selects = node.getElementsByTagName(\"select\");\r\n\r\n\t\tev.start_date = scheduler.date.add(inputs[0]._date, selects[0].value, \"minute\");\r\n\t\tev.end_date = scheduler.date.add(inputs[1]._date, selects[1].value, \"minute\");\r\n\r\n\t\tif (ev.end_date <= ev.start_date)\r\n\t\t\tev.end_date = scheduler.date.add(ev.start_date, scheduler.config.time_step, \"minute\");\r\n\t\treturn {\r\n\t\t\tstart_date: new Date(ev.start_date),\r\n\t\t\tend_date: new Date(ev.end_date)\r\n\t\t};\r\n\t},\r\n\tfocus: function(node) {\r\n\t}\r\n};\r\nscheduler.linkCalendar = function(calendar, datediff) {\r\n\tvar action = function() {\r\n\t\tvar date = scheduler._date;\r\n\t\tvar dateNew = new Date(date.valueOf());\r\n\t\tif (datediff) dateNew = datediff(dateNew);\r\n\t\tdateNew.setDate(1);\r\n\t\tscheduler.updateCalendar(calendar, dateNew);\r\n\t\treturn true;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", action);\r\n\tscheduler.attachEvent(\"onXLE\", action);\r\n\tscheduler.attachEvent(\"onEventAdded\", action);\r\n\tscheduler.attachEvent(\"onEventChanged\", action);\r\n\tscheduler.attachEvent(\"onEventDeleted\", action);\r\n\taction();\r\n};\r\n\r\nscheduler._markCalendarCurrentDate = function(calendar) {\r\n\tvar state = scheduler.getState();\r\n\tvar from = state.min_date;\r\n\tvar to = state.max_date;\r\n\tvar mode = state.mode;\r\n\r\n\tvar month_start = scheduler.date.month_start(new Date(calendar._date));\r\n\tvar month_end = scheduler.date.add(month_start, 1, \"month\");\r\n\r\n\tvar noHighlight = {\r\n\t\t\"month\":true,\r\n\t\t\"year\":true,\r\n\t\t\"agenda\":true,\r\n\t\t\"grid\":true\r\n\t};\r\n\t// no need to highlight current dates for a large range views - agenda, year, etc.\r\n\tif(noHighlight[mode] || (from.valueOf() <= month_start.valueOf() && to.valueOf() >= month_end.valueOf())){\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar current = from;\r\n\twhile(current.valueOf() < to.valueOf()){\r\n\t\tif (month_start.valueOf() <= current.valueOf() && month_end > current) {\r\n\t\t\tscheduler.markCalendar(calendar, current, \"dhx_calendar_click\");\r\n\t\t}\r\n\t\tcurrent = scheduler.date.add(current, 1, \"day\");\r\n\t}\r\n};\r\n\r\nscheduler.attachEvent(\"onEventCancel\", function(){\r\n\tscheduler.destroyCalendar(null, true);\r\n});\r\n\r\nscheduler.attachEvent(\"onDestroy\", function(){\r\n\tscheduler.destroyCalendar();\r\n});\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\tscheduler.xy.scroll_width = 0;\r\n\r\n\tvar old = scheduler.render_view_data;\r\n\tscheduler.render_view_data=function(){\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\t\tdata.firstChild._h_fix = true;\r\n\r\n\t\told.apply(scheduler,arguments);\r\n\r\n\r\n\r\n\t\tvar height = parseInt(data.style.height);\r\n\t\tdata.style.height=\"1px\";\r\n\t\tdata.style.height=data.scrollHeight+\"px\";\r\n\r\n\t\tthis._obj.style.height = this._obj.clientHeight + data.scrollHeight - height + \"px\";\r\n\t};\r\n\r\n\tvar old_s=scheduler._reset_month_scale;\r\n\tscheduler._reset_month_scale=function(a,b,c,d){\r\n\t\tvar dummy = {clientHeight:100};\r\n\t\told_s.apply(scheduler,[dummy,b,c,d]);\r\n\t\ta.innerHTML = dummy.innerHTML;\r\n\t};\r\n\r\n});\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Multisection\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\n\r\nfunction parseXMLOptions(loader, config){\r\n\tvar items = scheduler.ajax.xpath(\"//data/item\", loader.xmlDoc);\r\n\tvar ids = {};\r\n\tfor (var i = 0; i < items.length; i++) {\r\n\t\tids[items[i].getAttribute(config.map_to)] = true;\r\n\t}\r\n\treturn ids;\r\n}\r\n\r\nfunction parseJSONOptions(loader, config){\r\n\ttry{\r\n\t\tvar items = JSON.parse(loader.xmlDoc.responseText);\r\n\t\tvar ids = {};\r\n\t\tfor (var i = 0; i < items.length; i++) {\r\n\t\t\tvar option = items[i];\r\n\r\n\t\t\tids[option.value || option.key || option.id] = true;\r\n\t\t}\r\n\t\treturn ids;\r\n\t}catch(e){\r\n\t\treturn null;\r\n\t}\r\n}\r\n\r\nscheduler.form_blocks[\"multiselect\"]={\r\n\trender:function(sns) {\r\n\t\tvar css = \"dhx_multi_select_control dhx_multi_select_\"+sns.name;\r\n\t\tif(!!sns.vertical){\r\n\t\t\tcss += \" dhx_multi_select_control_vertical\";\r\n\t\t}\r\n\r\n\t\tvar _result = \"
\";\r\n\t\tfor (var i=0; i\"+sns.options[i].label+\"\";\r\n\t\t}\r\n\t\t_result += \"
\";\r\n\t\treturn _result;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\r\n\t\tvar _children = node.getElementsByTagName('input');\r\n\t\tfor(var i=0;i<_children.length;i++) {\r\n\t\t\t_children[i].checked = false; //unchecking all inputs on the form\r\n\t\t}\r\n\r\n\t\tfunction _mark_inputs(ids) { // ids = [ 0: undefined, 1: undefined, 2: true, 'custom_name': false ... ]\r\n\t\t\tvar _children = node.getElementsByTagName('input');\r\n\t\t\tfor(var i=0;i<_children.length; i++) {\r\n\t\t\t\t_children[i].checked = !! ids[_children[i].value];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar _ids = {};\r\n\t\tif (ev[config.map_to]) {\r\n\t\t\tvar results = (ev[config.map_to] + \"\").split(config.delimiter || scheduler.config.section_delimiter || \",\");\r\n\t\t\tfor (var i = 0; i < results.length; i++) {\r\n\t\t\t\t_ids[results[i]] = true;\r\n\t\t\t}\r\n\t\t\t_mark_inputs(_ids);\r\n\t\t} else {\r\n\t\t\tif (scheduler._new_event || !config.script_url)\r\n\t\t\t\treturn;\r\n\t\t\tvar divLoading = document.createElement('div');\r\n\t\t\tdivLoading.className = 'dhx_loading';\r\n\t\t\tdivLoading.style.cssText = \"position: absolute; top: 40%; left: 40%;\";\r\n\t\t\tnode.appendChild(divLoading);\r\n\r\n\t\t\tvar url = [\r\n\t\t\t\tconfig.script_url,\r\n\t\t\t\t(config.script_url.indexOf(\"?\") == -1 ? \"?\" : \"&\"),\r\n\t\t\t\t'dhx_crosslink_' + config.map_to + '=' + ev.id + '&uid=' + scheduler.uid()\r\n\t\t\t].join(\"\");\r\n\r\n\t\t\tscheduler.ajax.get(url, function(loader) {\r\n\t\t\t\tvar options = parseJSONOptions(loader, config);\r\n\t\t\t\tif(!options){\r\n\t\t\t\t\toptions = parseXMLOptions(loader, config);\r\n\t\t\t\t}\r\n\t\t\t\t_mark_inputs(options);\r\n\t\t\t\tnode.removeChild(divLoading);\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tvar _result = [];\r\n\t\tvar _children = node.getElementsByTagName(\"input\");\r\n\t\tfor(var i=0;i<_children.length;i++) {\r\n\t\t\tif(_children[i].checked)\r\n\t\t\t\t_result.push(_children[i].value);\r\n\t\t}\r\n\t\treturn _result.join(config.delimiter || scheduler.config.section_delimiter || \",\");\r\n\t},\r\n\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\r\n\tfunction backup(obj){\r\n\t\tvar t = function(){};\r\n\t\tt.prototype = obj;\r\n\t\treturn t;\r\n\t}\r\n\r\n\tvar old = scheduler._load;\r\n\tscheduler._load=function(url,from){\r\n\t\turl=url||this._load_url;\r\n\t\tif (typeof url == \"object\"){\r\n\t\t\tvar t = backup(this._loaded);\r\n\t\t\tfor (var i=0; i < url.length; i++) {\r\n\t\t\t\tthis._loaded=new t();\r\n\t\t\t\told.call(this,url[i],from);\r\n\t\t\t}\r\n\t\t} else\r\n\t\t\told.apply(this,arguments);\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\t/* global Backbone */\r\n\tvar cfg = {\r\n\t\tuse_id : false\r\n\t};\r\n\r\n\t//remove private properties\r\n\tfunction sanitize(ev){\r\n\t\tvar obj = {};\r\n\t\tfor (var key in ev)\r\n\t\t\tif (key.indexOf(\"_\") !== 0)\r\n\t\t\t\tobj[key] = ev[key];\r\n\r\n\t\tif (!cfg.use_id)\r\n\t\t\tdelete obj.id;\r\n\r\n\t\treturn obj;\r\n\t}\r\n\r\n\tvar update_timer;\r\n\tfunction update_view(){\r\n\t\tclearTimeout(update_timer);\r\n\t\tupdate_timer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler.updateView();\r\n\t\t},1);\r\n\t}\r\n\r\n\tfunction _start_ext_load(cal){\r\n\t\tcal._loading = true;\r\n\t\tcal._not_render = true;\r\n\r\n\t\tcal.callEvent(\"onXLS\", []);\r\n\t}\r\n\tfunction _finish_ext_load(cal){\r\n\t\tcal._not_render = false;\r\n\t\tif (cal._render_wait)\r\n\t\t\tcal.render_view_data();\r\n\t\tcal._loading = false;\r\n\r\n\t\tcal.callEvent(\"onXLE\", []);\r\n\t}\r\n\r\n\r\n\tfunction _get_id(model){\r\n\t\treturn cfg.use_id ? model.id : model.cid;\r\n\t}\r\n\r\nscheduler.backbone = function(events, config){\r\n\tif (config) cfg = config;\r\n\r\n\tevents.bind(\"change\", function(model, info){\r\n\t\tvar cid = _get_id(model);\r\n\t\tvar ev = scheduler._events[cid] = model.toJSON();\r\n\t\tev.id = cid;\r\n\r\n\t\tscheduler._init_event(ev);\r\n\t\tupdate_view();\r\n\t});\r\n\tevents.bind(\"remove\", function(model, changes){\r\n\t\tvar cid = _get_id(model);\r\n\t\tif (scheduler._events[cid])\r\n\t\t\tscheduler.deleteEvent(cid);\r\n\t});\r\n\r\n\tvar queue = [];\r\n\tfunction add_from_queue(){\r\n\t\tif(scheduler.$destroyed){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (queue.length){\r\n\t\t\tscheduler.parse(queue, \"json\");\r\n\t\t\tqueue = [];\r\n\t\t}\r\n\t}\r\n\r\n\tevents.bind(\"add\", function(model, changes){\r\n\t\tvar cid = _get_id(model);\r\n\t\tif (!scheduler._events[cid]){\r\n\t\t\tvar ev = model.toJSON();\r\n\t\t\tev.id = cid;\r\n\t\t\tscheduler._init_event(ev);\r\n\r\n\t\t\tqueue.push(ev);\r\n\t\t\tif (queue.length == 1)\r\n\t\t\t\tsetTimeout(add_from_queue,1);\r\n\t\t}\r\n\t});\r\n\r\n\tevents.bind(\"request\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_start_ext_load(scheduler);\r\n\t});\r\n\tevents.bind(\"sync\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_finish_ext_load(scheduler);\r\n\t});\r\n\tevents.bind(\"error\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_finish_ext_load(scheduler);\r\n\t});\r\n\r\n\r\n\tscheduler.attachEvent(\"onEventCreated\", function(id){\r\n\t\tvar ev = new events.model(scheduler.getEvent(id));\r\n\t\tscheduler._events[id] = ev.toJSON();\r\n\t\tscheduler._events[id].id = id;\r\n\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onEventAdded\", function(id){\r\n\t\tif (!events.get(id)){\r\n\t\t\tvar data = sanitize(scheduler.getEvent(id));\r\n\t\t\tvar model = new events.model(data);\r\n\r\n\t\t\tvar cid = _get_id(model);\r\n\t\t\tif (cid != id)\r\n\t\t\t\tthis.changeEventId(id, cid);\r\n\t\t\tevents.add(model);\r\n\t\t\tevents.trigger(\"scheduler:add\", model);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventChanged\", function(id){\r\n\t\tvar ev = events.get(id);\r\n\t\tvar upd = sanitize(scheduler.getEvent(id));\r\n\r\n\t\tev.set(upd);\r\n\t\tevents.trigger(\"scheduler:change\", ev);\r\n\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventDeleted\", function(id){\r\n\t\tvar model = events.get(id);\r\n\t\tif (model){\r\n\t\t\tevents.trigger(\"scheduler:remove\", model);\r\n\t\t\tevents.remove(id);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\t/* global dhtmlDragAndDropObject, dhtmlx */\r\n// lame old code doesn't provide raw event object\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\t\tvar dragger = (new dhtmlDragAndDropObject());\r\n\t\tvar old = dragger.stopDrag;\r\n\t\tvar last_event;\r\n\t\tdragger.stopDrag = function(e) {\r\n\t\t\tlast_event = e;\r\n\t\t\treturn old.apply(this, arguments);\r\n\t\t};\r\n\r\n\t\tfunction on_drop(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml) {\r\n\r\n\t\t\tif (scheduler.checkEvent(\"onBeforeExternalDragIn\") && !scheduler.callEvent(\"onBeforeExternalDragIn\", [sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml, last_event]))\r\n\t\t\t\treturn;\r\n\r\n\t\t\tvar temp = scheduler.attachEvent(\"onEventCreated\", function (id) {\r\n\t\t\t\tif (!scheduler.callEvent(\"onExternalDragIn\", [id, sourceHtmlObject, last_event])) {\r\n\t\t\t\t\tthis._drag_mode = this._drag_id = null;\r\n\t\t\t\t\tthis.deleteEvent(id);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tvar action_data = scheduler.getActionData(last_event);\r\n\t\t\tvar event_data = {\r\n\t\t\t\tstart_date: new Date(action_data.date)\r\n\t\t\t};\r\n\r\n\t\t\t// custom views, need to assign section id, fix dates\r\n\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\tvar view_options = scheduler.matrix[scheduler._mode];\r\n\t\t\t\tevent_data[view_options.y_property] = action_data.section;\r\n\r\n\t\t\t\tvar pos = scheduler._locate_cell_timeline(last_event);\r\n\t\t\t\tevent_data.start_date = view_options._trace_x[pos.x];\r\n\t\t\t\tevent_data.end_date = scheduler.date.add(event_data.start_date, view_options.x_step, view_options.x_unit);\r\n\t\t\t}\r\n\t\t\tif (scheduler._props && scheduler._props[scheduler._mode]) {\r\n\t\t\t\tevent_data[scheduler._props[scheduler._mode].map_to] = action_data.section;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler.addEventNow(event_data);\r\n\r\n\t\t\tscheduler.detachEvent(temp);\r\n\t\t}\r\n\r\n\t\tdragger.addDragLanding(scheduler._els[\"dhx_cal_data\"][0], {\r\n\t\t\t_drag: function(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml) {\r\n\t\t\t\ton_drop(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml);\r\n\t\t\t},\r\n\t\t\t_dragIn: function(htmlObject, shtmlObject) {\r\n\t\t\t\treturn htmlObject;\r\n\t\t\t},\r\n\t\t\t_dragOut: function(htmlObject) {\r\n\t\t\t\treturn this;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(dhtmlx.DragControl) {\r\n\t\t\tdhtmlx.DragControl.addDrop(scheduler._els[\"dhx_cal_data\"][0], {\r\n\t\t\t\tonDrop: function (source, target, d, e) {\r\n\t\t\t\t\tvar sourceDhtmlx = dhtmlx.DragControl.getMaster(source);\r\n\t\t\t\t\tlast_event = e;\r\n\t\t\t\t\ton_drop(source, sourceDhtmlx, target, e.target || e.srcElement);\r\n\t\t\t\t},\r\n\r\n\t\t\t\tonDragIn: function (source, target, e) {\r\n\t\t\t\t\treturn target;\r\n\t\t\t\t}\r\n\t\t\t}, true);\r\n\t\t}\r\n\t});\r\n\r\n}","export default function(scheduler){\r\n\r\n\tvar dx, dy,\r\n\t\thtml_regexp = new RegExp(\"<[^>]*>\", \"g\"),\r\n\t\tnewline_regexp = new RegExp(\"]*>\", \"g\");\r\n\r\n\tfunction clean_html(val) {\r\n\t\treturn val.replace(newline_regexp, \"\\n\").replace(html_regexp, \"\");\r\n\t}\r\n\r\n\tfunction x_norm(x, offset) {\r\n\t\tx = parseFloat(x);\r\n\t\toffset = parseFloat(offset);\r\n\t\tif (!isNaN(offset)) x -= offset;\r\n\r\n\t\tvar w = colsWidth(x);\r\n\t\tx = x - w.width + w.cols*dx;\r\n\t\treturn isNaN(x)?\"auto\":(100*x/(dx));\r\n\t}\r\n\r\n\tfunction x_norm_event(x, offset, is_left) {\r\n\t\tx = parseFloat(x);\r\n\t\toffset = parseFloat(offset);\r\n\t\tif (!isNaN(offset) && is_left) x -= offset;\r\n\r\n\t\tvar w = colsWidth(x);\r\n\t\tx = x - w.width + w.cols*dx;\r\n\t\treturn isNaN(x)?\"auto\":(100*x/(dx-(!isNaN(offset)?offset:0)));\r\n\t}\r\n\tfunction colsWidth(width) {\r\n\t\tvar r = 0;\r\n\t\tvar header = scheduler._els.dhx_cal_header[0].childNodes;\r\n\t\tvar els = header[1] ? header[1].childNodes : header[0].childNodes;\r\n\t\tfor (var i = 0; i < els.length; i++) {\r\n\t\t\tvar el = els[i].style ? els[i] : els[i].parentNode;\r\n\t\t\tvar w = parseFloat(el.style.width);\r\n\t\t\tif (width > w){\r\n\t\t\t\twidth -= (w+1);\r\n\t\t\t\tr+=(w+1);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\treturn { width: r, cols: i };\r\n\t}\r\n\r\n\tfunction y_norm(y) {\r\n\t\ty = parseFloat(y);\r\n\t\tif (isNaN(y)) return \"auto\";\r\n\t\treturn 100 * y / dy;\r\n\t}\r\n\r\n\tfunction get_style(node, style){\r\n\t\treturn (window.getComputedStyle?(window.getComputedStyle(node, null)[style]):(node.currentStyle?node.currentStyle[style]:null))||\"\";\r\n\t}\r\n\r\n\tfunction de_day(node, n) {\r\n\t\tvar x = parseInt(node.style.left, 10);\r\n\r\n\t\tfor (var dx = 0; dx < scheduler._cols.length; dx++) {\r\n\t\t\tx -= scheduler._cols[dx];\r\n\t\t\tif (x < 0) return dx;\r\n\t\t}\r\n\t\treturn n;\r\n\t}\r\n\r\n\tfunction de_week(node, n) {\r\n\t\tvar y = parseInt(node.style.top, 10);\r\n\t\tfor (var dy = 0; dy < scheduler._colsS.heights.length; dy++)\r\n\t\t\tif (scheduler._colsS.heights[dy] > y) return dy;\r\n\t\treturn n;\r\n\t}\r\n\r\n\tfunction xml_start(tag) {\r\n\t\treturn tag ? \"<\"+tag+\">\" : \"\";\r\n\t}\r\n\tfunction xml_end(tag) {\r\n\t\treturn tag ? \"\" : \"\";\r\n\t}\r\n\r\n\tfunction xml_top(tag, profile, header, footer) {\r\n\t\tvar xml = \"<\"+tag+\" profile='\" + profile + \"'\";\r\n\t\tif (header)\r\n\t\t\txml += \" header='\" + header + \"'\";\r\n\t\tif (footer)\r\n\t\t\txml += \" footer='\" + footer + \"'\";\r\n\t\txml += \">\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_body_header() {\r\n\t\tvar xml = \"\";\r\n\t\t// detects if current mode is timeline\r\n\t\tvar mode = scheduler._mode;\r\n\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode])\r\n\t\t\tmode = (scheduler.matrix[scheduler._mode].render == \"cell\") ? \"matrix\" : \"timeline\";\r\n\t\txml += \"\";\r\n\r\n\t\tif (scheduler._mode == \"week_agenda\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_data[0].getElementsByTagName(\"DIV\");\r\n\t\t\tfor (var i = 0; i < xh.length; i++)\r\n\t\t\t\tif (xh[i].className == \"dhx_wa_scale_bar\")\r\n\t\t\t\t\txml += \"\" + clean_html(xh[i].innerHTML) + \"\";\r\n\t\t} else if (scheduler._mode == \"agenda\" || scheduler._mode == \"map\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_header[0].childNodes[0].childNodes;\r\n\r\n\t\t\txml += \"\" + clean_html(xh[0].innerHTML) + \"\" + clean_html(xh[1].innerHTML) + \"\";\r\n\t\t} else if (scheduler._mode == \"year\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_data[0].childNodes;\r\n\t\t\tfor (var i = 0; i < xh.length; i++) {\r\n\t\t\t\txml += \"\";\r\n\t\t\t\txml += xml_month_scale(xh[i].querySelector(\".dhx_year_week\").childNodes);\r\n\t\t\t\txml += xml_month(xh[i].querySelector(\".dhx_year_body\"));\r\n\t\t\t\txml += \"\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\txml += \"\";\r\n\t\t\tvar xh = scheduler._els.dhx_cal_header[0].childNodes;\r\n\t\t\txml += xml_month_scale(xh);\r\n\t\t\txml += \"\";\r\n\r\n\t\t\tvar yh = scheduler._els.dhx_cal_data[0];\r\n\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tfor (var i = 0; i < yh.firstChild.rows.length; i++) {\r\n\t\t\t\t\tvar el = yh.firstChild.rows[i];\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t}\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tdy = yh.firstChild.rows[0].cells[0].offsetHeight;\r\n\t\t\t} else if (yh.firstChild.tagName == \"TABLE\") {\r\n\t\t\t\txml += xml_month(yh);\r\n\t\t\t} else {\r\n\t\t\t\tyh = yh.childNodes[yh.childNodes.length - 1];\r\n\t\t\t\twhile (yh.className.indexOf(\"dhx_scale_holder\") == -1)\r\n\t\t\t\t\tyh = yh.previousSibling;\r\n\t\t\t\tyh = yh.childNodes;\r\n\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tfor (var i = 0; i < yh.length; i++)\r\n\t\t\t\t\txml += \"\\n\";\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tdy = yh[0].offsetHeight;\r\n\t\t\t}\r\n\t\t}\r\n\t\txml += \"\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_month(yh) {\r\n\t\tvar xml = \"\";\r\n\t\tvar r = yh.querySelectorAll(\"tr\");\r\n\t\tfor (var i = 0; i < r.length; i++) {\r\n\t\t\tvar days = [];\r\n\t\t\tvar cells = r[i].querySelectorAll(\"td\");\r\n\r\n\t\t\tfor (var j = 0; j < cells.length; j++)\r\n\t\t\t\tdays.push(cells[j].querySelector(\".dhx_month_head\").innerHTML);\r\n\r\n\t\t\txml += \"\\n\";\r\n\t\t\tdy = cells[0].offsetHeight;\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_month_scale(xh) {\r\n\t\tvar xhs,\r\n\t\t\txml = \"\";\r\n\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\tif (scheduler.matrix[scheduler._mode].second_scale)\r\n\t\t\t\txhs = xh[1].childNodes;\r\n\r\n\t\t\txh = xh[0].childNodes;\r\n\t\t}\r\n\r\n\t\tfor (var i = 0; i < xh.length; i++)\r\n\t\t\txml += \"\\n\";\r\n\t\tdx = xh[0].offsetWidth;\r\n\r\n\t\tif (xhs) {\r\n\t\t\tvar width = 0;\r\n\t\t\tvar top_width = xh[0].offsetWidth;\r\n\t\t\tvar top_col = 1;\r\n\t\t\tfor (var i = 0; i < xhs.length; i++) {\r\n\t\t\t\txml += \"\\n\";\r\n\t\t\t\twidth += xhs[i].offsetWidth;\r\n\t\t\t\tif (width >= top_width) {\r\n\t\t\t\t\ttop_width += (xh[top_col] ? xh[top_col].offsetWidth : 0);\r\n\t\t\t\t\ttop_col++;\r\n\t\t\t\t}\r\n\t\t\t\tdx = xhs[0].offsetWidth;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_body(colors) {\r\n\t\tvar xml = \"\";\r\n\t\tvar evs = scheduler._rendered;\r\n\t\tvar matrix = scheduler.matrix && scheduler.matrix[scheduler._mode];\r\n\r\n\t\tif (scheduler._mode == \"agenda\" || scheduler._mode == \"map\") {\r\n\r\n\t\t\tfor (var i = 0; i < evs.length; i++)\r\n xml += \"\";\r\n\r\n\t\t} else if (scheduler._mode == \"week_agenda\") {\r\n\r\n\t\t\tfor (var i = 0; i < evs.length; i++)\r\n\t\t\t\txml += \"\" + clean_html(evs[i].innerHTML) + \"\";\r\n\r\n\t\t} else if (scheduler._mode == \"year\") {\r\n\r\n\t\t\tvar evs = scheduler.get_visible_events();\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar d = evs[i].start_date;\r\n\t\t\t\tif (d.valueOf() < scheduler._min_date.valueOf())\r\n\t\t\t\t\td = scheduler._min_date;\r\n\r\n\t\t\t\twhile (d < evs[i].end_date) {\r\n\t\t\t\t\tvar m = d.getMonth() + 12 * (d.getFullYear() - scheduler._min_date.getFullYear()) - scheduler.week_starts._month;\r\n\t\t\t\t\tvar day = scheduler.week_starts[m] + d.getDate() - 1;\r\n\t\t\t\t\tvar text_color = colors ? get_style(scheduler._get_year_cell(d), \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(scheduler._get_year_cell(d), \"backgroundColor\") : \"\";\r\n\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t\td = scheduler.date.add(d, 1, \"day\");\r\n\t\t\t\t\tif (d.valueOf() >= scheduler._max_date.valueOf())\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (matrix && matrix.render == \"cell\") {\r\n\t\t\tvar evs = scheduler._els.dhx_cal_data[0].getElementsByTagName(\"TD\");\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar text_color = colors ? get_style(evs[i], \"color\") : \"\";\r\n\t\t\t\tvar bg_color = colors ? get_style(evs[i], \"backgroundColor\") : \"\";\r\n\t\t\t\txml += \"\\n\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar zx, zdx;\r\n\t\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\t\t// logic for timeline view\r\n\t\t\t\t\tzx = x_norm(evs[i].style.left);\r\n\t\t\t\t\tzdx = x_norm(evs[i].offsetWidth)-1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// we should use specific logic for day/week/units view\r\n\t\t\t\t\tvar left_norm = scheduler.config.use_select_menu_space ? 0 : 26;\r\n\t\t\t\t\tzx = x_norm_event(evs[i].style.left, left_norm, true);\r\n\t\t\t\t\tzdx = x_norm_event(evs[i].style.width, left_norm)-1;\r\n\t\t\t\t}\r\n\t\t\t\tif (isNaN(zdx * 1)) continue;\r\n\t\t\t\tvar zy = y_norm(evs[i].style.top);\r\n\t\t\t\tvar zdy = y_norm(evs[i].style.height);\r\n\r\n\t\t\t\tvar e_type = evs[i].className.split(\" \")[0].replace(\"dhx_cal_\", \"\");\r\n\t\t\t\tif (e_type === 'dhx_tooltip_line') continue;\r\n\r\n\t\t\t\tvar dets = scheduler.getEvent(evs[i].getAttribute(scheduler.config.event_attribute));\r\n if (!dets) continue;\r\n\t\t\t\tvar day = dets._sday;\r\n\t\t\t\tvar week = dets._sweek;\r\n\t\t\t\tvar length = dets._length || 0;\r\n\r\n\t\t\t\tif (scheduler._mode == \"month\") {\r\n\t\t\t\t\tzdy = parseInt(evs[i].offsetHeight, 10);\r\n\t\t\t\t\tzy = parseInt(evs[i].style.top, 10) - scheduler.xy.month_head_height;\r\n\r\n\t\t\t\t\tday = de_day(evs[i], day);\r\n\t\t\t\t\tweek = de_week(evs[i], week);\r\n\t\t\t\t} else if (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\t\tday = 0;\r\n\t\t\t\t\tvar el = evs[i].parentNode.parentNode.parentNode;\r\n\t\t\t\t\tweek = el.rowIndex;\r\n\t\t\t\t\tvar dy_copy = dy;\r\n\t\t\t\t\tdy = evs[i].parentNode.offsetHeight;\r\n\t\t\t\t\tzy = y_norm(evs[i].style.top);\r\n\t\t\t\t\tzy -= zy * 0.2;\r\n\t\t\t\t\tdy = dy_copy;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (evs[i].parentNode == scheduler._els.dhx_cal_data[0]) continue;\r\n\t\t\t\t\tvar parent = scheduler._els[\"dhx_cal_data\"][0].childNodes[0];\r\n\t\t\t\t\tvar offset = parseFloat(parent.className.indexOf(\"dhx_scale_holder\") != -1 ? parent.style.left : 0);\r\n\t\t\t\t\tzx += x_norm(evs[i].parentNode.style.left, offset);\r\n\t\t\t\t}\r\n\r\n\t\t\t\txml += \"\\n\";\r\n\r\n\t\t\t\tif (e_type == \"event\") {\r\n\t\t\t\t\txml += \"
\";\r\n\t\t\t\t\tvar text_color = colors ? get_style(evs[i].childNodes[2], \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(evs[i].childNodes[2], \"backgroundColor\") : \"\";\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvar text_color = colors ? get_style(evs[i], \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(evs[i], \"backgroundColor\") : \"\";\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t}\r\n\t\t\t\txml += \"
\";\r\n\t\t\t}\r\n\t\t\t}\r\n\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction toXML(start, end, view, mode, header, footer){\r\n\t\tvar colors = false;\r\n\t\tif (mode == \"fullcolor\") {\r\n\t\t\tcolors = true;\r\n\t\t\tmode = \"color\";\r\n\t\t}\r\n\r\n\t\tmode = mode || \"color\";\r\n\r\n\t\tvar xml = \"\";\r\n\t\tif (start) {\r\n\r\n\t\t\tvar original_date = scheduler._date;\r\n\t\t\tvar original_mode = scheduler._mode;\r\n\t\t\tend = scheduler.date[view+\"_start\"](end);\r\n\t\t\tend = scheduler.date[\"get_\"+view+\"_end\"] ? scheduler.date[\"get_\"+view+\"_end\"](end) : scheduler.date.add(end, 1, view);\r\n\r\n\t\t\txml = xml_top(\"pages\", mode, header, footer);\r\n\t\t\tfor (var temp_date = new Date(start); +temp_date < +end; temp_date = this.date.add(temp_date, 1, view)) {\r\n\t\t\t\tthis.setCurrentView(temp_date, view);\r\n\t\t\t\txml += xml_start(\"page\") + xml_body_header().replace(\"\\u2013\", \"-\") + xml_body(colors) + xml_end(\"page\");\r\n\t\t\t}\r\n\t\t\txml += xml_end(\"pages\");\r\n\r\n\t\t\tthis.setCurrentView(original_date, original_mode);\r\n\t\t} else {\r\n\t\t\txml = xml_top(\"data\", mode, header, footer) + xml_body_header().replace(\"\\u2013\", \"-\") + xml_body(colors) + xml_end(\"data\");\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\tscheduler.getPDFData = toXML;\r\n\tfunction send_xml(xml, url){\r\n\t\tvar uid = scheduler.uid();\r\n\t\tvar d = document.createElement(\"div\");\r\n\t\td.style.display = \"none\";\r\n\t\tdocument.body.appendChild(d);\r\n\r\n\t\td.innerHTML = '
';\r\n\t\tdocument.getElementById(uid).firstChild.value = encodeURIComponent(xml);\r\n\t\tdocument.getElementById(uid).submit();\r\n\t\td.parentNode.removeChild(d);\r\n\t}\r\n\r\n\tfunction to_pdf(start, end, view, url, mode, header, footer) {\r\n\t\tvar xml = \"\";\r\n\t\tif(typeof mode == \"object\"){\r\n\t\t\txml = schedulersToPdf(mode);\r\n\t\t}else{\r\n\t\t\txml = toXML.apply(this, [start, end, view, mode, header, footer]);\r\n\t\t}\r\n\r\n\t\tsend_xml(xml, url);\r\n\t}\r\n\r\n\tfunction schedulersToPdf(objects){\r\n\t\tvar xml = \"\";\r\n\t\tfor(var i=0; i < objects.length; i++){\r\n\t\t\txml += objects[i].source.getPDFData(objects[i].start, objects[i].end, objects[i].view, objects[i].mode, objects[i].header, objects[i].footer);\r\n\t\t}\r\n\t\txml += \"\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\t/*\r\n\t * scheduler.toPDF(url, mode, header, footer) - for a single scheduler\r\n\t * scheduler.toPDF(url, [scheduler1, scheduler2,...]) - for multiple schedulers\r\n\t * example:\r\n\t * scheduler.toPDF(\"generate.ashx\", [\r\n\t * { source: scheduler1, mode: \"color\" },\r\n\t * { source: scheduler2, mode: \"gray\", view:\"week\", start:new Date(2013, 06, 1), end:new Date(2013, 06, 28) },\r\n\t * { source: scheduler3 }\r\n\t * ]);\r\n\t *\r\n\t */\r\n\tscheduler.toPDF = function(url, mode, header, footer) {\r\n\t\treturn to_pdf.apply(this, [null, null, null, url, mode, header, footer]);\r\n\t};\r\n\tscheduler.toPDFRange = function(start, end, view, url, mode, header, footer) {\r\n\t\tif (typeof start == \"string\") {\r\n\t\t\tstart = scheduler.templates.api_date(start);\r\n\t\t\tend = scheduler.templates.api_date(end);\r\n\t\t}\r\n\r\n\t\treturn to_pdf.apply(this, arguments);\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.icons_select = [\"icon_form\", \"icon_delete\"];\r\nscheduler.config.details_on_create = true;\r\nscheduler.config.show_quick_info = true;\r\nscheduler.xy.menu_width = 0;\r\n\r\nscheduler.attachEvent(\"onClick\", function(id){\r\n\tif(!scheduler.config.show_quick_info){\r\n\t\treturn;\r\n\t}\r\n\tscheduler.showQuickInfo(id);\r\n\treturn true;\r\n});\r\n\r\n(function(){\r\n\t// pass `force` argument in order to hide quick info synchronously\r\n\t// so it won't affect showQuickInfo call that can follow\r\n\tvar events = [\"onEmptyClick\", \"onViewChange\", \"onLightbox\", \"onBeforeEventDelete\", \"onBeforeDrag\"];\r\n\tvar hiding_function = function(){\r\n\t\tscheduler.hideQuickInfo(true);\r\n\t\treturn true;\r\n\t};\r\n\tfor (var i=0; i window.innerWidth){\r\n\t\t\tleft = window.innerWidth - width;\r\n\t\t}\r\n\t\tleft = Math.max(0, left);\r\n\r\n\t\tqi.style.left = left + \"px\";\r\n\t\tqi.style.top = pos.top - (pos.dy?height:-pos.height) + \"px\";\r\n\t} else {\r\n\r\n\t\tconst dataPos = scheduler.$container.querySelector('.dhx_cal_data').offsetTop;\r\n\t\tqi.style.top = dataPos + 20 + \"px\";\r\n\t\tif (pos.dx == 1){\r\n\t\t\tqi.style.right = \"auto\";\r\n\t\t\tqi.style.left = -width + \"px\";\r\n\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tqi.style.left = \"-10px\";\r\n\t\t\t},1);\r\n\t\t} else {\r\n\t\t\tqi.style.left = \"auto\";\r\n\t\t\tqi.style.right = -width + \"px\";\r\n\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tqi.style.right = \"-10px\";\r\n\t\t\t},1);\r\n\t\t}\r\n\t\tqi.className = qi.className.replace(\" dhx_qi_left\",\"\").replace(\" dhx_qi_right\",\"\")+\" dhx_qi_\"+(pos.dx==1?\"left\":\"right\");\r\n\t}\r\n};\r\nscheduler.attachEvent(\"onTemplatesReady\", function(){\r\n\tscheduler.hideQuickInfo();\r\n\tif(this._quick_info_box){\r\n\t\tvar box = this._quick_info_box;\r\n\t\tif(box.parentNode){\r\n\t\t\tbox.parentNode.removeChild(box);\r\n\t\t}\r\n\t\tthis._quick_info_box = null;\r\n\t}\r\n});\r\nscheduler._quick_info_onscroll_handler = function(e){\r\n\tscheduler.hideQuickInfo();\r\n};\r\nscheduler._init_quick_info = function(){\r\n\tif (!this._quick_info_box){\r\n\r\n\r\n\t\tvar qi = this._quick_info_box = document.createElement(\"div\");\r\n\r\n\t\tthis._waiAria.quickInfoAttr(qi);\r\n\r\n\t\tqi.className = \"dhx_cal_quick_info\";\r\n\t\tif (scheduler.$testmode)\r\n\t\t\tqi.className += \" dhx_no_animate\";\r\n\t\tif (scheduler.config.rtl) qi.className += \" dhx_quick_info_rtl\";\r\n\t//title\r\n\t\tvar ariaAttr = this._waiAria.quickInfoHeaderAttrString();\r\n\t\tvar html = `\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t\t
\r\n\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t\t
`;\r\n\r\n\t//buttons\r\n\t\thtml += \"
\";\r\n\t\tvar buttons = scheduler.config.icons_select;\r\n\t\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\t\tvar ariaAttr = this._waiAria.quickInfoButtonAttrString(this.locale.labels[buttons[i]]);\r\n\t\t\t\thtml += `
\r\n\t\t\t\t
${scheduler.locale.labels[buttons[i]]}
`;\r\n\t\t\t}\r\n\t\t// }\r\n\t\thtml += \"
\";\r\n\r\n\t\tqi.innerHTML = html;\r\n\t\tscheduler.event(qi, \"click\", function(ev){\r\n\t\t\tscheduler._qi_button_click(ev.target || ev.srcElement);\r\n\t\t});\r\n\t\tif (scheduler.config.quick_info_detached){\r\n\t\t\tscheduler._detachDomEvent(scheduler._els[\"dhx_cal_data\"][0], \"scroll\", scheduler._quick_info_onscroll_handler);\r\n\t\t\tscheduler.event(scheduler._els[\"dhx_cal_data\"][0], \"scroll\", scheduler._quick_info_onscroll_handler);\r\n\t\t}\r\n\t}\r\n\r\n\treturn this._quick_info_box;\r\n};\r\n\r\nscheduler._qi_button_click = function(node){\r\n\tvar box = scheduler._quick_info_box;\r\n\tif (!node || node == box) return;\r\n\r\n\tif(node.closest(\".dhx_cal_qi_close_btn\")){\r\n\t\tscheduler.hideQuickInfo();\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar mask = scheduler._getClassName(node);\r\n\tif (mask.indexOf(\"_icon\")!=-1){\r\n\t\tvar id = scheduler._quick_info_box_id;\r\n\t\tscheduler._click.buttons[mask.split(\" \")[1].replace(\"icon_\",\"\")](id);\r\n\t} else\r\n\t\tscheduler._qi_button_click(node.parentNode);\r\n};\r\nscheduler._get_event_counter_part = function(id){\r\n\tvar domEv = scheduler.getRenderedEvent(id);\r\n\tvar left = 0;\r\n\tvar top = 0;\r\n\r\n\tvar node = domEv;\r\n\twhile (node && node != scheduler._obj){\r\n\t\tleft += node.offsetLeft;\r\n\t\ttop += node.offsetTop-node.scrollTop;\r\n\t\tnode = node.offsetParent;\r\n\t}\r\n\tif(node){\r\n\t\tvar dx = (left + domEv.offsetWidth/2) > (scheduler._x/2) ? 1 : 0;\r\n\t\tvar dy = (top + domEv.offsetHeight/2) > (scheduler._y/2) ? 1 : 0;\r\n\r\n\t\treturn { left:left, top:top, dx:dx, dy:dy,\r\n\t\t\twidth:domEv.offsetWidth, height:domEv.offsetHeight };\r\n\t}\r\n\treturn 0;\r\n};\r\n\r\nscheduler._fill_quick_data = function(id){\r\n\tvar ev = scheduler.getEvent(id);\r\n\tvar qi = scheduler._quick_info_box;\r\n\r\n\tscheduler._quick_info_box_id = id;\r\n\r\n//title content\r\n\r\n\tvar header = {\r\n\t\tcontent: scheduler.templates.quick_info_title(ev.start_date, ev.end_date, ev),\r\n\t\tdate: scheduler.templates.quick_info_date(ev.start_date, ev.end_date, ev)\r\n\t};\r\n\tvar titleContent = qi.querySelector(\".dhx_cal_qi_tcontent\");\r\n\ttitleContent.innerHTML = `${header.content}`;\r\n\tvar titleDate = qi.querySelector(\".dhx_cal_qi_tdate\");\r\n\ttitleDate.innerHTML = header.date;\r\n\r\n\tscheduler._waiAria.quickInfoHeader(qi, [header.content, header.date].join(\" \"));\r\n\r\n//main content\r\n\tvar main = qi.querySelector(\".dhx_cal_qi_content\");\r\n\tconst mainContent = scheduler.templates.quick_info_content(ev.start_date, ev.end_date, ev);\r\n\tif(mainContent){\r\n\t\tmain.classList.remove(\"dhx_hidden\");\r\n\t\tmain.innerHTML = mainContent;\r\n\t}else{\r\n\t\tmain.classList.add(\"dhx_hidden\");\r\n\t}\r\n};\r\n\r\n\r\n}","export default function(scheduler){\r\n\t\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar originalRecurringSetValue;\r\n\tif (scheduler.form_blocks.recurring) {\r\n\t\toriginalRecurringSetValue = scheduler.form_blocks.recurring.set_value;\r\n\t}\r\n\tvar original_left_buttons = scheduler.config.buttons_left.slice();\r\n\tvar original_right_buttons = scheduler.config.buttons_right.slice();\r\n\r\n\tscheduler.attachEvent(\"onBeforeLightbox\", function(id) {\r\n\t\tif (this.config.readonly_form || this.getEvent(id).readonly) {\r\n\t\t\tthis.config.readonly_active = true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.config.readonly_active = false;\r\n\t\t\tscheduler.config.buttons_left = original_left_buttons.slice();\r\n\t\t\tscheduler.config.buttons_right = original_right_buttons.slice();\r\n\t\r\n\t\t\t// initial value\r\n\t\t\tif(scheduler.form_blocks.recurring) {\r\n\t\t\t\tscheduler.form_blocks.recurring.set_value = originalRecurringSetValue;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar sns = this.config.lightbox.sections;\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\tfor (var i = 0; i < sns.length; i++) {\r\n\t\t\t\tif (sns[i].type == 'recurring') {\r\n\t\t\t\t\tif (this.config.readonly_active && scheduler.form_blocks.recurring) {\r\n\t\t\t\t\t\tscheduler.form_blocks.recurring.set_value = function(node, value, ev) {\r\n\t\t\t\t\t\t\tvar wrapper = scheduler.$domHelpers.closest(node, \".dhx_wrap_section\");\r\n\t\t\t\t\t\t\tvar style = \"none\";\r\n\t\t\t\t\t\t\twrapper.querySelector('.dhx_cal_lsection').display = style;\r\n\t\t\t\t\t\t\twrapper.querySelector('.dhx_form_repeat').display = style;\r\n\t\t\t\t\t\t\twrapper.style.display = style;\r\n\r\n\t\t\t\t\t\t\tscheduler.setLightboxSize();\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar forbidden_buttons = [\"dhx_delete_btn\", \"dhx_save_btn\"];\r\n\t\t\tvar button_arrays = [scheduler.config.buttons_left, scheduler.config.buttons_right];\r\n\t\t\tfor (var i = 0; i < forbidden_buttons.length; i++) {\r\n\t\t\t\tvar forbidden_button = forbidden_buttons[i];\r\n\t\t\t\tfor (var k = 0; k < button_arrays.length; k++) {\r\n\t\t\t\t\tvar button_array = button_arrays[k];\r\n\t\t\t\t\tvar index = -1;\r\n\t\t\t\t\tfor (var p = 0; p < button_array.length; p++) {\r\n\t\t\t\t\t\tif (button_array[p] == forbidden_button) {\r\n\t\t\t\t\t\t\tindex = p;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (index != -1) {\r\n\t\t\t\t\t\tbutton_array.splice(index, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.resetLightbox();\r\n\r\n\t\treturn true;\r\n\t});\r\n\r\n\tfunction txt_replace(tag, d, n, text) {\r\n\t\tvar txts = d.getElementsByTagName(tag);\r\n\t\tvar txtt = n.getElementsByTagName(tag);\r\n\t\tfor (var i = txtt.length - 1; i >= 0; i--) {\r\n\t\t\tvar n = txtt[i];\r\n\t\t\tif (!text){\r\n\t\t\t\tn.disabled = true;\r\n\t\t\t\t//radio and checkboxes loses state after .cloneNode in IE\r\n\t\t\t\tif(d.checked)\r\n\t\t\t\t\tn.checked = true;\r\n\t\t\t}else {\r\n\t\t\t\tvar t = document.createElement(\"span\");\r\n\t\t\t\tt.className = \"dhx_text_disabled\";\r\n\t\t\t\tt.innerHTML = text(txts[i]);\r\n\t\t\t\tn.parentNode.insertBefore(t, n);\r\n\t\t\t\tn.parentNode.removeChild(n);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tvar old = scheduler._fill_lightbox;\r\n\tscheduler._fill_lightbox = function() {\r\n\r\n\t\tvar lb = this.getLightbox();\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\tlb.style.visibility = 'hidden';\r\n\t\t\t// lightbox should have actual sizes before rendering controls\r\n\t\t\t// currently only matters for dhtmlxCombo\r\n\t\t\tlb.style.display = 'block';\r\n\t\t}\r\n\t\tvar res = old.apply(this, arguments);\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\t//reset visibility and display\r\n\t\t\tlb.style.visibility = '';\r\n\t\t\tlb.style.display = 'none';\r\n\t\t}\r\n\r\n\t\tif (this.config.readonly_active) {\r\n\r\n\t\t\tvar originalForm = this.getLightbox();\r\n\t\t\tvar readonlyForm = this._lightbox_r = originalForm.cloneNode(true);\r\n\t\t\treadonlyForm.id = scheduler.uid();\r\n\t\t\treadonlyForm.className += \" dhx_cal_light_readonly\";\r\n\t\t\ttxt_replace(\"textarea\", originalForm, readonlyForm, function(a) {\r\n\t\t\t\treturn a.value;\r\n\t\t\t});\r\n\t\t\ttxt_replace(\"input\", originalForm, readonlyForm, false);\r\n\t\t\ttxt_replace(\"select\", originalForm, readonlyForm, function(a) {\r\n\t\t\t\tif(!a.options.length) return \"\";\r\n\t\t\t\treturn a.options[Math.max((a.selectedIndex || 0), 0)].text;\r\n\t\t\t});\r\n\r\n\t\t\toriginalForm.parentNode.insertBefore(readonlyForm, originalForm);\r\n\r\n\t\t\tthis.showCover(readonlyForm);\r\n\t\t\tif (scheduler._lightbox)\r\n\t\t\t\tscheduler._lightbox.parentNode.removeChild(scheduler._lightbox);\r\n\t\t\tthis._lightbox = readonlyForm;\r\n\r\n\t\t\tif (scheduler.config.drag_lightbox)\r\n\t\t\t\tscheduler.event(readonlyForm.firstChild, \"mousedown\", scheduler._ready_to_dnd);\r\n\t\t\t\t\r\n\t\t\tscheduler._init_lightbox_events();\r\n\t\t\tthis.setLightboxSize();\r\n\t\t}\r\n\t\treturn res;\r\n\t};\r\n\r\n\tvar hold = scheduler.hide_lightbox;\r\n\tscheduler.hide_lightbox = function() {\r\n\t\tif (this._lightbox_r) {\r\n\t\t\tthis._lightbox_r.parentNode.removeChild(this._lightbox_r);\r\n\t\t\tthis._lightbox_r = this._lightbox = null;\r\n\t\t}\r\n\r\n\t\treturn hold.apply(this, arguments);\r\n\t};\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.occurrence_timestamp_in_utc = false;\r\nscheduler.config.recurring_workdays = [1,2,3,4,5];\r\nscheduler.form_blocks[\"recurring\"] = {\r\n\t_get_node : function(node){\r\n\t\tif (typeof node == \"string\"){\r\n\t\t\tlet element = scheduler._lightbox.querySelector(`#${node}`);\r\n\t\t\tif(!element){\r\n\t\t\t\t// form is detached from lightbox \r\n\t\t\t\t// search globally, won't work in LWC\r\n\t\t\t\telement = document.getElementById(node);\r\n\t\t\t}\r\n\t\t\tnode = element;\r\n\t\t}\r\n\t\tif (node.style.display == 'none')\r\n\t\t\tnode.style.display = \"\";\r\n\t\treturn node;\r\n\t},\r\n\t_outer_html: function(node){\r\n\t\treturn node.outerHTML || getOuterHTML(node);\r\n\r\n\t\t//probably not needed, FF v10- only\r\n\t\tfunction getOuterHTML(n){\r\n\t\t\tvar div = document.createElement('div'), h;\r\n\t\t\tdiv.appendChild( n.cloneNode(true) );\r\n\t\t\th = div.innerHTML;\r\n\t\t\tdiv = null;\r\n\t\t\treturn h;\r\n\t\t}\r\n\t},\r\n\trender:function(sns) {\r\n\t\tif(sns.form){\r\n\t\t\tvar rec = scheduler.form_blocks[\"recurring\"];\r\n\t\t\tvar form = rec._get_node(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\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t''+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t''+\r\n\t\t\t\t\t\t\t\t''+\r\n\t\t\t\t\t\t\t\tloc.select_year_day2+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t''+loc.repeat_text_occurences_count+'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t'
'+\r\n\t\t\t\t'
'+\r\n\t\t\t\t'';\r\n\t},\r\n\t_ds: {},\r\n\t_get_form_node: function(els, name, value){\r\n\t\tvar col = els[name];\r\n\t\tif(!col) return null;\r\n\t\tif(col.nodeName) return col;\r\n\r\n\t\tif(col.length){\r\n\t\t\tfor(var i=0; i < col.length; i++){\r\n\t\t\t\tif(col[i].value == value)\r\n\t\t\t\t\treturn col[i];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\t_get_node_value: function(els, name, multiselect){\r\n\t\tvar col = els[name];\r\n\t\tif(!col) return \"\";\r\n\t\tif(col.length){\r\n\t\t\tif(multiselect){\r\n\t\t\t\tvar res = [];\r\n\t\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\t\tif (col[i].checked) res.push(col[i].value);\r\n\r\n\t\t\t\treturn res;\r\n\t\t\t}else{\r\n\t\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\t\tif (col[i].checked) return col[i].value;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(col.value)\r\n\t\t\treturn !multiselect ? col.value : [col.value];\r\n\t},\r\n\r\n\t_get_node_numeric_value: function(els, name){\r\n\t\tvar value = scheduler.form_blocks[\"recurring\"]._get_node_value(els, name);\r\n\t\treturn ((value * 1) || 0);\r\n\t},\r\n\r\n\t_set_node_value: function(els, name, value){\r\n\t\tvar col = els[name];\r\n\t\tif(!col) return;\r\n\r\n\t\tif(col.name == name){\r\n\t\t\tcol.value = value;\r\n\t\t}else if(col.length){\r\n\t\t\tvar hash_value = typeof value == \"object\";\r\n\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\tif (hash_value || col[i].value == value){\r\n\t\t\t\t\tcol[i].checked = hash_value ? !!value[col[i].value] : !!value;\r\n\t\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t_init_set_value:function(node, value, ev) {\r\n\t\tvar block = scheduler.form_blocks[\"recurring\"];\r\n\t\tvar get_value = block._get_node_value;\r\n\t\tvar set_value = block._set_node_value;\r\n\t\tscheduler.form_blocks[\"recurring\"]._ds = {start:ev.start_date, end:ev._end_date};\r\n\r\n\t\tvar str_date_format = scheduler.date.str_to_date(scheduler.config.repeat_date, false, true);\r\n\t\tvar str_date = function(str_date) {\r\n\t\t\tvar date = str_date_format(str_date);\r\n\t\t\tif (scheduler.config.include_end_by)\r\n\t\t\t\tdate = scheduler.date.add(date, 1, 'day');\r\n\t\t\treturn date;\r\n\t\t};\r\n\r\n\t\tvar date_str = scheduler.date.date_to_str(scheduler.config.repeat_date);\r\n\r\n\t\tvar top = node.getElementsByTagName(\"FORM\")[0];\r\n\t\tvar els = {};\r\n\r\n\t\tfunction register_els(inps) {\r\n\t\t\tfor (var i = 0; i < inps.length; i++) {\r\n\t\t\t\tvar inp = inps[i];\r\n\r\n\t\t\t\tif(inp.name){\r\n\t\t\t\t\tif(!els[inp.name]){\r\n\t\t\t\t\t\tels[inp.name] = inp;\r\n\t\t\t\t\t}else if(els[inp.name].nodeType){\r\n\t\t\t\t\t\tvar node = els[inp.name];\r\n\t\t\t\t\t\tels[inp.name] = [node, inp];\r\n\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tels[inp.name].push(inp);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tregister_els(top.getElementsByTagName(\"INPUT\"));\r\n\t\tregister_els(top.getElementsByTagName(\"SELECT\"));\r\n\r\n\t\tif (!scheduler.config.repeat_date_of_end) {\r\n\t\t\tvar formatter = scheduler.date.date_to_str(scheduler.config.repeat_date);\r\n\t\t\tscheduler.config.repeat_date_of_end = formatter(scheduler.date.add(scheduler._currentDate(), 30, \"day\"));\r\n\t\t}\r\n\t\tset_value(els, \"date_of_end\", scheduler.config.repeat_date_of_end);\r\n\r\n\t\tvar $ = function(a) {\r\n\t\t\treturn scheduler._lightbox.querySelector(`#${a}`) || { style:{} };//return fake object if node not found\r\n\t\t};\r\n\r\n\t\tfunction change_current_view() {\r\n\t\t\t$(\"dhx_repeat_day\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_week\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_month\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_year\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_\" + this.value).style.display = \"\";\r\n\t\t\tscheduler.setLightboxSize();\r\n\t\t}\r\n\r\n\t\tfunction get_repeat_code(dates) {\r\n\t\t\tvar code = [get_value(els, \"repeat\")];\r\n\t\t\tget_rcode[code[0]](code, dates);\r\n\r\n\t\t\twhile (code.length < 5) code.push(\"\");\r\n\t\t\tvar repeat = \"\";\r\n\r\n\t\t\tvar end = get_end_rule(els);\r\n\r\n\t\t\tif (end == \"no\") {\r\n\t\t\t\tdates.end = new Date(9999, 1, 1);\r\n\t\t\t\trepeat = \"no\";\r\n\t\t\t}\r\n\t\t\telse if (end == \"date_of_end\") {\r\n\t\t\t\tdates.end = str_date(get_value(els, \"date_of_end\"));\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tscheduler.transpose_type(code.join(\"_\"));\r\n\t\t\t\trepeat = Math.max(1, get_value(els, \"occurences_count\"));\r\n\r\n\t\t\t\tvar transp = 0;\r\n\r\n\t\t\t\t//var transp = ((code[0] == \"week\" && code[4] && code[4].toString().indexOf(scheduler.config.start_on_monday ? 1 : 0) == -1) ? 1 : 0);\r\n\r\n\t\t\t\t// which is equal to following code, seems to produce extra instance, not clear why needed\r\n\r\n\t\t\t\t/*if(code[0] == \"week\"){\r\n\t\t\t\t\tvar days = code[4] || \"\";\r\n\t\t\t\t\tif(scheduler.config.start_on_monday){\r\n\t\t\t\t\t\tif(days.indexOf(1) == -1)\r\n\t\t\t\t\t\ttransp = 1;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(days.indexOf(0) == -1)\r\n\t\t\t\t\t\ttransp = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}*/\r\n\r\n\t\t\t//\tdates.end = scheduler.date.add(new Date(dates.start), repeat + transp, code.join(\"_\"));\r\n\r\n\t\t\t\tdates.end = scheduler.date[\"add_\" + code.join(\"_\")](new Date(dates.start), repeat + transp, {start_date: dates.start}) || dates.start;\r\n\t\t\t}\r\n\r\n\t\t\treturn code.join(\"_\") + \"#\" + repeat;\r\n\t\t}\r\n\t\tfunction get_end_rule(els){\r\n\t\t\tvar end = els[\"end\"];\r\n\t\t\tif(end.length){\r\n\t\t\t\tfor(var i =0; i < end.length; i++){\r\n\t\t\t\t\tif(end[i].checked){\r\n\t\t\t\t\t\tif(end[i].value && end[i].value != \"on\"){//seems to be default value:var input = document.createElement(\"input\"); input.type = \"radio\"; input.value\r\n\t\t\t\t\t\t\treturn end[i].value;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tif(!i){\r\n\t\t\t\t\t\t\t\treturn \"no\";\r\n\t\t\t\t\t\t\t}else if(i == 2){\r\n\t\t\t\t\t\t\t\treturn \"date_of_end\";\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\treturn \"occurences_count\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(end.value)\r\n\t\t\t\t\treturn end.value;\r\n\t\t\t}\r\n\t\t\treturn \"no\";\r\n\t\t}\r\n\t\tfunction set_end_rule(els, value){\r\n\t\t\tvar end = els[\"end\"];\r\n\r\n\t\t\tif(end.length){\r\n\t\t\t\tvar has_values = !!end[0].value && end[0].value != \"on\";\r\n\t\t\t\tif(has_values){\r\n\t\t\t\t\tfor(var i =0; i < end.length; i++){\r\n\t\t\t\t\t\tif(end[i].value == value)\r\n\t\t\t\t\t\t\tend[i].checked = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar ind = 0;\r\n\t\t\t\t\tswitch(value){\r\n\t\t\t\t\t\tcase \"no\":\r\n\t\t\t\t\t\t\tind = 0;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"date_of_end\":\r\n\t\t\t\t\t\t\tind = 2;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tind = 1;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend[ind].checked = true;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tend.value = value;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tscheduler.form_blocks[\"recurring\"]._get_repeat_code = get_repeat_code;\r\n\t\tvar get_rcode = {\r\n\t\t\tmonth:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tif (get_value(els, \"month_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_count\")));\r\n\t\t\t\t\tdates.start.setDate(get_value(els, \"month_day\"));\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_count2\")));\r\n\t\t\t\t\tcode.push( get_value(els, \"month_day2\"));\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_week2\")));\r\n\t\t\t\t\tif (!scheduler.config.repeat_precise){\r\n\t\t\t\t\t\tdates.start.setDate(1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tdates._start = true;\r\n\t\t\t},\r\n\t\t\tweek:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"week_count\")));\r\n\t\t\t\tcode.push(\"\");\r\n\t\t\t\tcode.push(\"\");\r\n\t\t\t\tvar t = [];\r\n\r\n\t\t\t\tvar col = get_value(els, \"week_day\", true);\r\n\t\t\t\t//var col = els[\"week_day\"];\r\n\t\t\t\tvar day = dates.start.getDay();\r\n\t\t\t\tvar start_exists = false;\r\n\r\n\t\t\t\tfor (var i = 0; i < col.length; i++){\r\n\t\t\t\t\tt.push(col[i]);\r\n\t\t\t\t\tstart_exists = start_exists || col[i] == day;\r\n\t\t\t\t}\r\n\t\t\t\tif (!t.length){\r\n\t\t\t\t\tt.push(day);\r\n\t\t\t\t\tstart_exists = true;\r\n\t\t\t\t}\r\n\t\t\t\tt.sort();\r\n\r\n\r\n\t\t\t\tif (!scheduler.config.repeat_precise){\r\n\t\t\t\t\tdates.start = scheduler.date.week_start(dates.start);\r\n\t\t\t\t\tdates._start = true;\r\n\t\t\t\t} else if (!start_exists){\r\n\t\t\t\t\tscheduler.transpose_day_week(dates.start, t, 1, 7);\r\n\t\t\t\t\tdates._start = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcode.push(t.join(\",\"));\r\n\t\t\t},\r\n\t\t\tday:function(code) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tif (get_value(els, \"day_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"day_count\")));\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcode.push(\"week\");\r\n\t\t\t\t\tcode.push(1);\r\n\t\t\t\t\tcode.push(\"\");\r\n\t\t\t\t\tcode.push(\"\");\r\n\t\t\t\t\tcode.push(scheduler.config.recurring_workdays.join(\",\"));\r\n\t\t\t\t\tcode.splice(0, 1);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tyear:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\r\n\t\t\t\tif (get_value(els, \"year_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(\"1\");\r\n\t\t\t\t\tdates.start.setMonth(0);\r\n\t\t\t\t\tdates.start.setDate(get_value(els, \"year_day\"));\r\n\t\t\t\t\tdates.start.setMonth(get_value(els, \"year_month\"));\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcode.push(\"1\");\r\n\t\t\t\t\tcode.push(get_value(els, \"year_day2\"));\r\n\t\t\t\t\tcode.push(get_value(els, \"year_week2\"));\r\n\t\t\t\t\tdates.start.setDate(1);\r\n\t\t\t\t\tdates.start.setMonth(get_value(els, \"year_month2\"));\r\n\t\t\t\t}\r\n\t\t\t\tdates._start = true;\r\n\t\t\t}\r\n\t\t};\r\n\t\tvar set_rcode = {\r\n\t\t\tweek:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\t\tset_value(els, \"week_count\", code[1]);\r\n\r\n\t\t\t\tvar t = code[4].split(\",\");\r\n\t\t\t\tvar d = {};\r\n\t\t\t\tfor (var i = 0; i < t.length; i++) d[t[i]] = true;\r\n\r\n\t\t\t\tset_value(els, \"week_day\", d);\r\n\r\n\t\t\t\t//for (var i = 0; i < col.length; i++)\r\n\t\t\t\t//\tcol[i].checked = (!!d[col[i].value]);\r\n\t\t\t},\r\n\t\t\tmonth:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\r\n\t\t\t\tif (code[2] === \"\") {\r\n\t\t\t\t\tset_value(els, \"month_type\", \"d\");\r\n\t\t\t\t\tset_value(els, \"month_count\", code[1]);\r\n\t\t\t\t\tset_value(els, \"month_day\", dates.start.getDate());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tset_value(els, \"month_type\", \"w\");\r\n\t\t\t\t\tset_value(els, \"month_count2\", code[1]);\r\n\t\t\t\t\tset_value(els, \"month_week2\", code[3]);\r\n\t\t\t\t\tset_value(els, \"month_day2\", code[2]);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tday:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\t\tset_value(els, \"day_type\", \"d\");\r\n\t\t\t\tset_value(els, \"day_count\", code[1]);\r\n\t\t\t},\r\n\t\t\tyear:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\r\n\t\t\t\tif (code[2] === \"\") {\r\n\t\t\t\t\tset_value(els, \"year_type\", \"d\");\r\n\t\t\t\t\tset_value(els, \"year_day\", dates.start.getDate());\r\n\t\t\t\t\tset_value(els, \"year_month\", dates.start.getMonth());\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tset_value(els, \"year_type\", \"w\");\r\n\t\t\t\t\tset_value(els, \"year_week2\", code[3]);\r\n\t\t\t\t\tset_value(els, \"year_day2\", code[2]);\r\n\t\t\t\t\tset_value(els, \"year_month2\", dates.start.getMonth());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfunction set_repeat_code(code, dates) {\r\n\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\tvar data = code.split(\"#\");\r\n\t\t\tcode = data[0].split(\"_\");\r\n\t\t\tset_rcode[code[0]](code, dates);\r\n\r\n\t\t\tswitch (data[1]) {\r\n\t\t\t\tcase \"no\":\r\n\t\t\t\t\tset_end_rule(els, \"no\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"\":\r\n\t\t\t\t\tset_end_rule(els, \"date_of_end\");\r\n\r\n\t\t\t\t\tvar end_date = dates.end;\r\n\t\t\t\t\tif (scheduler.config.include_end_by){\r\n\t\t\t\t\t\tend_date = scheduler.date.add(end_date, -1, 'day');\r\n\t\t\t\t\t}\r\n\t\t\t\t\tset_value(els, \"date_of_end\", date_str(end_date));\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tset_end_rule(els, \"occurences_count\");\r\n\t\t\t\t\tset_value(els, \"occurences_count\", data[1]);\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tset_value(els, \"repeat\", code[0]);\r\n\t\t\t//e.checked = true;\r\n\r\n\t\t\tvar node = scheduler.form_blocks[\"recurring\"]._get_form_node(els, \"repeat\", code[0]);\r\n\t\t\tif(node.nodeName == \"SELECT\"/* && node.onchange*/){\r\n\t\t\t//\tnode.onchange();\r\n\t\t\t\tnode.dispatchEvent(new Event('change'));\r\n\t\t\t\tnode.dispatchEvent(new MouseEvent('click'));\r\n\t\t\t}else{\r\n\t\t\t\tnode.dispatchEvent(new MouseEvent('click'));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tscheduler.form_blocks[\"recurring\"]._set_repeat_code = set_repeat_code;\r\n\r\n\t\tfor (var i = 0; i < top.elements.length; i++) {\r\n\t\t\tvar el = top.elements[i];\r\n\t\t\tswitch (el.name) {\r\n\t\t\t\tcase \"repeat\":\r\n\t\t\t\t\tif (el.nodeName == \"SELECT\" && !el.$_eventAttached) {\r\n\t\t\t\t\t\tel.$_eventAttached = true;\r\n\t\t\t\t\t\tel.addEventListener(\"change\", change_current_view);\r\n\t\t\t\t\t} else if(!el.$_eventAttached){\r\n\t\t\t\t\t\tel.$_eventAttached = true;\r\n\t\t\t\t\t\tel.addEventListener(\"click\", change_current_view);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tscheduler._lightbox._rec_init_done = true;\r\n\t},\r\n\tset_value:function(node, value, ev) {\r\n\t\tvar rf = scheduler.form_blocks[\"recurring\"];\r\n\t\tif (!scheduler._lightbox._rec_init_done)\r\n\t\t\trf._init_set_value(node, value, ev);\r\n\t\tnode.open = !ev.rec_type;\r\n\r\n\t\tnode.blocked = this._is_modified_occurence(ev);\r\n\r\n\t\tvar ds = rf._ds;\r\n\t\tds.start = ev.start_date;\r\n\t\tds.end = ev._end_date;\r\n\r\n\t\trf._toggle_block();\r\n\r\n\t\tif (value)\r\n\t\t\trf._set_repeat_code(value, ds);\r\n\t},\r\n\tget_value:function(node, ev) {\r\n\t\tif (node.open) {\r\n\t\t\tvar ds = scheduler.form_blocks[\"recurring\"]._ds;\r\n\t\t\tvar actual_dates = {};\r\n\r\n\t\t\tvar timeControl = getTimeSection();\r\n\r\n\t\t\ttimeControl.getValue(actual_dates);\r\n\t\t\tds.start = actual_dates.start_date;\r\n\t\t\tev.rec_type = scheduler.form_blocks[\"recurring\"]._get_repeat_code(ds);\r\n\t\t\tif (ds._start) {\r\n\t\t\t\tev.start_date = new Date(ds.start);\r\n\t\t\t\tev._start_date = new Date(ds.start);\r\n\t\t\t\tds._start = false;\r\n\t\t\t} else\r\n\t\t\t\tev._start_date = null;\r\n\r\n\t\t\tev._end_date = ds.end;\r\n\t\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\t\t} else {\r\n\t\t\tev.rec_type = ev.rec_pattern = \"\";\r\n\t\t\tev._end_date = ev.end_date;\r\n\t\t}\r\n\t\treturn ev.rec_type;\r\n\t},\r\n\t_get_button: function(){\r\n\t\tvar node = getRecurringSection().header;\r\n\t\treturn node.firstChild.firstChild;\r\n\t},\r\n\t_get_form: function(){\r\n\t\treturn getRecurringSection().node;\r\n\t},\r\n\topen:function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form();\r\n\t\tif(!cont.open)\r\n\t\t\tblock._toggle_block();\r\n\t},\r\n\tclose: function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form();\r\n\r\n\t\tif(cont.open)\r\n\t\t\tblock._toggle_block();\r\n\t},\r\n\t_toggle_block: function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form(),\r\n\t\t\tel = block._get_button();\r\n\t\tif (!cont.open && !cont.blocked) {\r\n\t\t\tcont.style.height = \"auto\";//reset to default value\r\n\t\t\tif(el){\r\n\t\t\t\tel.style.backgroundPosition = \"-5px 0px\";\r\n\t\t\t\tel.nextSibling.innerHTML = scheduler.locale.labels.button_recurring_open;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tcont.style.height = \"0px\";\r\n\t\t\tif(el){\r\n\t\t\t\tel.style.backgroundPosition = \"-5px 20px\";\r\n\t\t\t\tel.nextSibling.innerHTML = scheduler.locale.labels.button_recurring;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcont.open = !cont.open;\r\n\r\n\t\tscheduler.setLightboxSize();\r\n\t},\r\n\tfocus:function(node) {\r\n\t},\r\n\tbutton_click:function(node, button, event) {\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\t\tvar cont = block._get_form();\r\n\t\tif (!cont.blocked)\r\n\t\t\tscheduler.form_blocks.recurring._toggle_block();\r\n\t}\r\n};\r\n\r\nfunction getTimeSection(){\r\n\tvar timeControl = scheduler.formSection('time');\r\n\tif(!timeControl){\r\n\t\ttimeControl = getFirstSectionOfType('time');\r\n\t}\r\n\tif(!timeControl){\r\n\t\ttimeControl = getFirstSectionOfType('calendar_time');\r\n\t}\r\n\r\n\t\r\n\tif (!timeControl) {\r\n\t\tthrow new Error([\"Can't calculate the recurring rule, the Recurring form block can't find the Time control. Make sure you have the time control in 'scheduler.config.lightbox.sections' config.\",\r\n\"You can use either the default time control https://docs.dhtmlx.com/scheduler/time.html, or the datepicker https://docs.dhtmlx.com/scheduler/minicalendar.html, or a custom control. \",\r\n\"In the latter case, make sure the control is named \\\"time\\\":\",\r\n\"\",\r\n\"scheduler.config.lightbox.sections = [\",\r\n\"{name:\\\"time\\\", height:72, type:\\\"YOU CONTROL\\\", map_to:\\\"auto\\\" }];\"]\r\n.join(\"\\n\"));\r\n\t}\r\n\r\n\treturn timeControl;\r\n}\r\n\r\nfunction getRecurringSection(){\r\n\tvar recurringSection = scheduler.formSection('recurring');\r\n\tif(!recurringSection){\r\n\t\trecurringSection = getFirstSectionOfType('recurring');\r\n\t}\r\n\r\n\tif (!recurringSection) {\r\n\t\tthrow new Error([\"Can't locate the Recurring form section.\",\r\n\t\t\"Make sure that you have the recurring control on the lightbox configuration https://docs.dhtmlx.com/scheduler/recurring_events.html#recurringlightbox \",\r\n\t\t\"and that the recurring control has name \\\"recurring\\\":\",\r\n\"\",\r\n\"scheduler.config.lightbox.sections = [\",\r\n\"\t{name:\\\"recurring\\\", ... }\",\r\n\"];\"].join(\"\\n\"));\r\n\r\n\t}\r\n\r\n\treturn recurringSection;\r\n}\r\n\r\nfunction getFirstSectionOfType(type){\r\n\tfor(var i = 0; i < scheduler.config.lightbox.sections.length; i++){\r\n\t\tvar section = scheduler.config.lightbox.sections[i];\r\n\t\tif(section.type === type){\r\n\t\t\treturn scheduler.formSection(section.name);\r\n\t\t}\r\n\t}\r\n\treturn null;\r\n}\r\n\r\n//problem may occur if we will have two repeating events in the same moment of time\r\nscheduler._rec_markers = {};\r\nscheduler._rec_markers_pull = {};\r\nscheduler._add_rec_marker = function(ev, time) {\r\n\tev._pid_time = time;\r\n\tthis._rec_markers[ev.id] = ev;\r\n\tif (!this._rec_markers_pull[ev.event_pid]) this._rec_markers_pull[ev.event_pid] = {};\r\n\tthis._rec_markers_pull[ev.event_pid][time] = ev;\r\n};\r\nscheduler._get_rec_marker = function(time, id) {\r\n\tvar ch = this._rec_markers_pull[id];\r\n\tif (ch) return ch[time];\r\n\treturn null;\r\n};\r\nscheduler._get_rec_markers = function(id) {\r\n\treturn (this._rec_markers_pull[id] || []);\r\n};\r\n\r\nfunction clearMilliseconds(date){\r\n//\treturn date;\r\n\treturn new Date(\r\n\t\tdate.getFullYear(), \r\n\t\tdate.getMonth(), \r\n\t\tdate.getDate(), \r\n\t\tdate.getHours(), \r\n\t\tdate.getMinutes(),\r\n\t\tdate.getSeconds(),\r\n\t\t0\r\n\t);\r\n}\r\n\r\nscheduler._rec_temp = [];\r\n(function() {\r\n\tvar old_add_event = scheduler.addEvent;\r\n\tscheduler.addEvent = function(start_date, end_date, text, id, extra_data) {\r\n\t\tvar ev_id = old_add_event.apply(this, arguments);\r\n\r\n\t\tif (ev_id && scheduler.getEvent(ev_id)) {\r\n\t\t\tvar ev = scheduler.getEvent(ev_id);\r\n\t\t\t\r\n\t\t\tif(ev.start_date){\r\n\t\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t\t}\r\n\t\t\tif(ev.end_date){\r\n\t\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t\t}\r\n\t\t\tif (this._is_modified_occurence(ev))\r\n\t\t\t\tscheduler._add_rec_marker(ev, ev.event_length * 1000);\r\n\t\t\tif (ev.rec_type)\r\n\t\t\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\t\t}\r\n\t\treturn ev_id;\r\n\t};\r\n})();\r\n\r\nscheduler.attachEvent(\"onEventIdChange\", function(id, new_id) {\r\n\tif (this._ignore_call) return;\r\n\tthis._ignore_call = true;\r\n\r\n\tif(scheduler._rec_markers[id]){\r\n\t\t//important for for correct work of scheduler.getEvents(from, to) and collision detection\r\n\t\tscheduler._rec_markers[new_id] = scheduler._rec_markers[id];\r\n\t\tdelete scheduler._rec_markers[id];\r\n\t}\r\n\r\n\tif(scheduler._rec_markers_pull[id]){\r\n\t\tscheduler._rec_markers_pull[new_id] = scheduler._rec_markers_pull[id];\r\n\t\tdelete scheduler._rec_markers_pull[id];\r\n\t}\r\n\r\n\tfor (var i = 0; i < this._rec_temp.length; i++) {\r\n\t\tvar tev = this._rec_temp[i];\r\n\t\tif (tev.event_pid == id) {\r\n\t\t\ttev.event_pid = new_id;\r\n\t\t\tthis.changeEventId(tev.id, new_id + \"#\" + tev.id.split(\"#\")[1]);\r\n\t\t}\r\n\t}\r\n\r\n\tfor(var i in this._rec_markers){\r\n\t\tvar tev = this._rec_markers[i];\r\n\t\tif(tev.event_pid == id){\r\n\t\t\ttev.event_pid = new_id;\r\n\t\t\ttev._pid_changed = true;\r\n\t\t}\r\n\t}\r\n\r\n\tvar el = scheduler._rec_markers[new_id];\r\n\tif(el && el._pid_changed) {\r\n\t\tdelete el._pid_changed;\r\n\t\tsetTimeout(function() {\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler.callEvent(\"onEventChanged\", [new_id, scheduler.getEvent(new_id)]);\r\n\t\t}, 1);\r\n\t}\r\n\r\n\tdelete this._ignore_call;\r\n});\r\nscheduler.attachEvent(\"onConfirmedBeforeEventDelete\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (this._is_virtual_event(id) || (this._is_modified_occurence(ev) && ev.rec_type && ev.rec_type != 'none')) {\r\n\t\tid = id.split(\"#\");\r\n\t\tvar nid = this.uid();\r\n\t\tvar tid = (id[1]) ? id[1] : Math.round(ev._pid_time / 1000);\r\n\r\n\t\tvar nev = this._copy_event(ev);\r\n\t\tnev.id = nid;\r\n\t\tnev.event_pid = ev.event_pid || id[0];\r\n\t\tvar timestamp = tid;\r\n\t\tnev.event_length = timestamp;\r\n\t\tnev.rec_type = nev.rec_pattern = \"none\";\r\n\t\tthis.addEvent(nev);\r\n\r\n\t\tthis._add_rec_marker(nev, timestamp * 1000);\r\n\t} else {\r\n\t\tif (ev.rec_type && this._lightbox_id)\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\tvar sub = this._get_rec_markers(id);\r\n\t\tfor (var i in sub) {\r\n\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\tid = sub[i].id;\r\n\t\t\t\tif (this.getEvent(id))\r\n\t\t\t\t\tthis.deleteEvent(id, true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventDeleted\", function(id, ev){\r\n\tif(!this._is_virtual_event(id) && this._is_modified_occurence(ev)){\r\n\t\tif(!scheduler._events[id]){\r\n\t\t\tev.rec_type = ev.rec_pattern = \"none\";\r\n\t\t\tthis.setEvent(id, ev);\r\n\t\t}\r\n\t}\r\n});\r\nscheduler.attachEvent(\"onEventChanged\", function(id, event) {\r\n\tif (this._loading) return true;\r\n\r\n\tvar ev = this.getEvent(id);\r\n\r\n\tif (this._is_virtual_event(id)) {\r\n\t\tvar id = id.split(\"#\");\r\n\t\tvar nid = this.uid();\r\n\t\tthis._not_render = true;\r\n\r\n\t\tvar nev = this._copy_event(event);\r\n\t\tnev.id = nid;\r\n\t\tnev.event_pid = id[0];\r\n\t\tvar timestamp = id[1];\r\n\t\tnev.event_length = timestamp;\r\n\t\tnev.rec_type = nev.rec_pattern = \"\";\r\n\r\n\t\tthis._add_rec_marker(nev, timestamp * 1000);\r\n\t\tthis.addEvent(nev);\r\n\r\n\t\tthis._not_render = false;\r\n\r\n\t} else {\r\n\t\tif(ev.start_date){\r\n\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t}\r\n\t\tif(ev.end_date){\r\n\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t}\r\n\r\n\t\tif (ev.rec_type && this._lightbox_id){\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\t}\r\n\t\tvar sub = this._get_rec_markers(id);\r\n\t\tfor (var i in sub) {\r\n\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\tdelete this._rec_markers[sub[i].id];\r\n\t\t\t\tthis.deleteEvent(sub[i].id, true);\r\n\t\t\t}\r\n\t\t}\r\n\t\tdelete this._rec_markers_pull[id];\r\n\r\n\t\t// it's possible that after editing event is no longer exists, in such case we need to remove _select_id flag\r\n\t\tvar isEventFound = false;\r\n\t\tfor (var k = 0; k < this._rendered.length; k++) {\r\n\t\t\tif (this._rendered[k].getAttribute(this.config.event_attribute) == id)\r\n\t\t\t\tisEventFound = true;\r\n\t\t}\r\n\t\tif (!isEventFound)\r\n\t\t\tthis._select_id = null;\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventAdded\", function(id) {\r\n\tif (!this._loading) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (ev.rec_type && !ev.event_length){\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventSave\", function(id, data, is_new_event) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (!ev.rec_type && data.rec_type && !this._is_virtual_event(id))\r\n\t\tthis._select_id = null;\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventCreated\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (!ev.rec_type)\r\n\t\tev.rec_type = ev.rec_pattern = ev.event_length = ev.event_pid = \"\";\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventCancel\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (ev.rec_type) {\r\n\t\tthis._roll_back_dates(ev);\r\n\t\t// a bit expensive, but we need to be sure that event re-rendered, because view can be corrupted by resize , during edit process\r\n\t\tthis.render_view_data();\r\n\t}\r\n});\r\nscheduler._roll_back_dates = function(ev) {\r\n\tif(ev.start_date){\r\n\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t}\r\n\tif(ev.end_date){\r\n\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t}\r\n\tev.event_length = Math.round((ev.end_date.valueOf() - ev.start_date.valueOf()) / 1000);\r\n\tev.end_date = ev._end_date;\r\n\tif (ev._start_date) {\r\n\t\tev.start_date.setMonth(0);\r\n\t\tev.start_date.setDate(ev._start_date.getDate());\r\n\t\tev.start_date.setMonth(ev._start_date.getMonth());\r\n\t\tev.start_date.setFullYear(ev._start_date.getFullYear());\r\n\r\n\t}\r\n};\r\n\r\nscheduler._is_virtual_event = function(id){\r\n\treturn id.toString().indexOf(\"#\") != -1;\r\n};\r\nscheduler._is_modified_occurence = function(ev){\r\n\treturn (ev.event_pid && ev.event_pid != \"0\");\r\n};\r\n\r\nscheduler.showLightbox_rec = scheduler.showLightbox;\r\nscheduler.showLightbox = function(id) {\r\n\tvar locale = this.locale;\r\n\tvar c = scheduler.config.lightbox_recurring;\r\n\tvar ev = this.getEvent(id);\r\n\tvar pid = ev.event_pid;\r\n\tvar isVirtual = this._is_virtual_event(id);\r\n\tif (isVirtual)\r\n\t\tpid = id.split(\"#\")[0];\r\n\r\n\t// show series\r\n\tvar showSeries = function(id) {\r\n\t\tvar event = scheduler.getEvent(id);\r\n\t\tevent._end_date = event.end_date;\r\n\t\tevent.end_date = new Date(event.start_date.valueOf() + event.event_length * 1000);\r\n\t\treturn scheduler.showLightbox_rec(id); // editing series\r\n\t};\r\n\r\n\tif ( (pid || pid*1 === 0) && ev.rec_type) {\r\n\t\t// direct API call on series id\r\n\t\treturn showSeries(id);\r\n\t}\r\n\tif ( !pid || pid === '0' || ( (!locale.labels.confirm_recurring || c == 'instance') || (c == 'series' && !isVirtual)) ) {\r\n\t\t// editing instance or non recurring event\r\n\t\treturn this.showLightbox_rec(id);\r\n\t}\r\n\tif (c == 'ask') {\r\n\t\tvar that = this;\r\n\t\tscheduler.modalbox({\r\n\t\t\ttext: locale.labels.confirm_recurring,\r\n\t\t\ttitle: locale.labels.title_confirm_recurring,\r\n\t\t\twidth: \"500px\",\r\n\t\t\tposition: \"middle\",\r\n\t\t\tbuttons:[locale.labels.button_edit_series, locale.labels.button_edit_occurrence, locale.labels.icon_cancel],\r\n\t\t\tcallback: function(index) {\r\n\t\t\t\tswitch(+index) {\r\n\t\t\t\t\tcase 0:\r\n\t\t\t\t\t\treturn showSeries(pid);\r\n\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\treturn that.showLightbox_rec(id);\r\n\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t} else {\r\n\t\tshowSeries(pid);\r\n\t}\r\n};\r\n\r\n\r\nscheduler.get_visible_events_rec = scheduler.get_visible_events;\r\nscheduler.get_visible_events = function(only_timed) {\r\n\tfor (var i = 0; i < this._rec_temp.length; i++)\r\n\t\tdelete this._events[this._rec_temp[i].id];\r\n\tthis._rec_temp = [];\r\n\r\n\tvar stack = this.get_visible_events_rec(only_timed);\r\n\tvar out = [];\r\n\tfor (var i = 0; i < stack.length; i++) {\r\n\t\tif (stack[i].rec_type) {\r\n\t\t\t//deleted element of series\r\n\t\t\tif (stack[i].rec_pattern != \"none\")\r\n\t\t\t\tthis.repeat_date(stack[i], out);\r\n\t\t}\r\n\t\telse out.push(stack[i]);\r\n\t}\r\n\treturn out;\r\n};\r\n\r\n\r\n(function() {\r\n\tvar old = scheduler.isOneDayEvent;\r\n\tscheduler.isOneDayEvent = function(ev) {\r\n\t\tif (ev.rec_type) return true;\r\n\t\treturn old.call(this, ev);\r\n\t};\r\n\tvar old_update_event = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id) {\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tif(ev && ev.rec_type){\r\n\t\t\t//rec_type can be changed without the lightbox,\r\n\t\t\t// make sure rec_pattern updated as well\r\n\t\t\tev.rec_pattern = (ev.rec_type || \"\").split(\"#\")[0];\r\n\t\t}\r\n\t\tif (ev && ev.rec_type && !this._is_virtual_event(id)) {\r\n\t\t\tscheduler.update_view();\r\n\t\t} else {\r\n\t\t\told_update_event.call(this, id);\r\n\t\t}\r\n\t};\r\n})();\r\n\r\nscheduler.transponse_size = {\r\n\tday:1, week:7, month:1, year:12\r\n};\r\nscheduler.date.day_week = function(sd, day, week) {\r\n\tsd.setDate(1);\r\n\tvar originalMonth = scheduler.date.month_start(new Date(sd));\r\n\tweek = (week - 1) * 7;\r\n\tvar cday = sd.getDay();\r\n\tvar nday = day * 1 + week - cday + 1;\r\n\tsd.setDate(nday <= week ? (nday + 7) : nday);\r\n\tvar newMonth = scheduler.date.month_start(new Date(sd));\r\n\tif(originalMonth.valueOf() !== newMonth.valueOf()){\r\n\t\treturn false;\r\n\t}\r\n\treturn true;\r\n};\r\nscheduler.transpose_day_week = function(sd, list, cor, size, cor2) {\r\n\tvar cday = (sd.getDay() || (scheduler.config.start_on_monday ? 7 : 0)) - cor;\r\n\tfor (var i = 0; i < list.length; i++) {\r\n\t\tif (list[i] > cday)\r\n\t\t\treturn sd.setDate(sd.getDate() + list[i] * 1 - cday - (size ? cor : cor2));\r\n\t}\r\n\tthis.transpose_day_week(sd, list, cor + size, null, cor);\r\n};\r\nscheduler.transpose_type = function(type) {\r\n\tvar transposeRecurring = \"transpose_\" + type;\r\n\tif (!this.date[transposeRecurring]) {\r\n\t\tvar recurringParts = type.split(\"_\");\r\n\t\tvar dayDurationMs = 60 * 60 * 24 * 1000;\r\n\t\tvar addRecurring = \"add_\" + type;\r\n\t\tvar recurringStepDays = this.transponse_size[recurringParts[0]] * recurringParts[1];\r\n\r\n\t\tif (recurringParts[0] == \"day\" || recurringParts[0] == \"week\") {\r\n\t\t\tvar weekDays = null;\r\n\t\t\tif (recurringParts[4]) {\r\n\t\t\t\tweekDays = recurringParts[4].split(\",\");\r\n\t\t\t\tif (scheduler.config.start_on_monday) {\r\n\t\t\t\t\tfor (var i = 0; i < weekDays.length; i++)\r\n\t\t\t\t\t\tweekDays[i] = (weekDays[i] * 1) || 7;\r\n\t\t\t\t\tweekDays.sort();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.date[transposeRecurring] = function(nd, td) {\r\n\t\t\t\tvar delta = Math.floor((td.valueOf() - nd.valueOf()) / (dayDurationMs * recurringStepDays));\r\n\t\t\t\tif (delta > 0)\r\n\t\t\t\t\tnd.setDate(nd.getDate() + delta * recurringStepDays);\r\n\t\t\t\tif (weekDays)\r\n\t\t\t\t\tscheduler.transpose_day_week(nd, weekDays, 1, recurringStepDays);\r\n\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t\tthis.date[addRecurring] = function(sd, inc) {\r\n\t\t\t\tvar nd = new Date(sd.valueOf());\r\n\t\t\t\tif (weekDays) {\r\n\t\t\t\t\tfor (var count = 0; count < inc; count++)\r\n\t\t\t\t\t\tscheduler.transpose_day_week(nd, weekDays, 0, recurringStepDays);\r\n\t\t\t\t} else\r\n\t\t\t\t\tnd.setDate(nd.getDate() + inc * recurringStepDays);\r\n\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t}\r\n\t\telse if (recurringParts[0] == \"month\" || recurringParts[0] == \"year\") {\r\n\t\t\tthis.date[transposeRecurring] = function(nd, td, seriesInstance) {\r\n\t\t\t\tvar delta = Math.ceil(((td.getFullYear() * 12 + td.getMonth() * 1 + 1) - (nd.getFullYear() * 12 + nd.getMonth() * 1 + 1)) / (recurringStepDays) - 1);\r\n\r\n\t\t\t\tif (delta >= 0){\r\n\t\t\t\t\tnd.setDate(1);\r\n\t\t\t\t\tnd.setMonth(nd.getMonth() + delta * recurringStepDays);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn scheduler.date[addRecurring](nd, 0, seriesInstance);\r\n\t\t\t\t//if (str[3]){\r\n\t\t\t\t//\tscheduler.date.day_week(nd, str[2], str[3]);\r\n\t\t\t\t//}\r\n\t\t\t};\r\n\t\t\tthis.date[addRecurring] = function(sd, inc, seriesInstance, currentCount) {\r\n\t\t\t\tif(!currentCount){\r\n\t\t\t\t\tcurrentCount = 1;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcurrentCount++;\r\n\t\t\t\t}\r\n\t\t\t\tvar maxCount = 12;\r\n\t\t\t\tif(currentCount > maxCount){\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar nd = new Date(sd.valueOf());\r\n\t\t\t\tnd.setDate(1);\r\n\r\n\r\n\t\t\t\tnd.setMonth(nd.getMonth() + inc * recurringStepDays);\r\n\t\t\t\tvar origMonth = nd.getMonth();\r\n\t\t\t\tvar origYear = nd.getFullYear();\r\n\t\t\t\tnd.setDate(seriesInstance.start_date.getDate());\r\n\t\t\t\tif (recurringParts[3]){\r\n\t\t\t\t\tscheduler.date.day_week(nd, recurringParts[2], recurringParts[3]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar correctOverflowInstances = scheduler.config.recurring_overflow_instances;\r\n\t\t\t\tif(nd.getMonth() != origMonth && correctOverflowInstances != \"none\"){\r\n\t\t\t\t\t// no such day in a month\r\n\t\t\t\t\tif(correctOverflowInstances === \"lastDay\"){\r\n\t\t\t\t\t\t// return either last day of the month\r\n\t\t\t\t\t\tnd = new Date(origYear, origMonth + 1, 0, nd.getHours(), nd.getMinutes(), nd.getSeconds(), nd.getMilliseconds());\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t// or go to the next instance\r\n\t\t\t\t\t\tnd = scheduler.date[addRecurring](new Date(origYear, origMonth + 1, 0), inc||1, seriesInstance, currentCount);\r\n\t\t\t\t\t\t// if next instance is not possible (e.g. 'repeat on 40th day of the month') null will be returned\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.repeat_date = function(ev, stack, non_render, from, to, maxCount) {\r\n\r\n\tfrom = from || this._min_date;\r\n\tto = to || this._max_date;\r\n\tvar max = maxCount || -1;\r\n\tvar td = new Date(ev.start_date.valueOf());\r\n\r\n\tvar startHour = td.getHours();\r\n\r\n\tvar visibleCount = 0;\r\n\r\n\tif (!ev.rec_pattern && ev.rec_type)\r\n\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\r\n\tthis.transpose_type(ev.rec_pattern);\r\n\ttd = scheduler.date[\"transpose_\" + ev.rec_pattern](td, from, ev);\r\n\twhile ( td && (\r\n\t\ttd < ev.start_date ||\r\n\t\tscheduler._fix_daylight_saving_date(td,from,ev,td,new Date(td.valueOf() + ev.event_length * 1000)).valueOf() <= from.valueOf() ||\r\n\t\ttd.valueOf() + ev.event_length * 1000 <= from.valueOf())){\r\n\t\t\ttd = this.date[\"add_\" + ev.rec_pattern](td, 1, ev);\r\n\r\n\t}\r\n\twhile (td && (td < to && td < ev.end_date && (max < 0 || visibleCount < max))) {\r\n\t\ttd.setHours(startHour);\r\n\r\n\t\tvar timestamp = (scheduler.config.occurrence_timestamp_in_utc) ? Date.UTC(td.getFullYear(), td.getMonth(), td.getDate(), td.getHours(), td.getMinutes(), td.getSeconds()) : td.valueOf();\r\n\t\tvar ch = this._get_rec_marker(timestamp, ev.id);\r\n\t\tif (!ch) { // unmodified element of series\r\n\t\t\tvar ted = new Date(td.valueOf() + ev.event_length * 1000);\r\n\t\t\tvar copy = this._copy_event(ev);\r\n\t\t\t//copy._timed = ev._timed;\r\n\t\t\tcopy.text = ev.text;\r\n\t\t\tcopy.start_date = td;\r\n\t\t\tcopy.event_pid = ev.id;\r\n\t\t\tcopy.id = ev.id + \"#\" + Math.round(timestamp / 1000);\r\n\t\t\tcopy.end_date = ted;\r\n\r\n\t\t\tcopy.end_date = scheduler._fix_daylight_saving_date(copy.start_date, copy.end_date, ev, td, copy.end_date);\r\n\r\n\t\t\tcopy._timed = this.isOneDayEvent(copy);\r\n\r\n\t\t\tif (!copy._timed && !this._table_view && !this.config.multi_day) return;\r\n\t\t\tstack.push(copy);\r\n\r\n\t\t\tif (!non_render) {\r\n\t\t\t\tthis._events[copy.id] = copy;\r\n\t\t\t\tthis._rec_temp.push(copy);\r\n\t\t\t}\r\n\r\n\t\t\tvisibleCount++;\r\n\r\n\t\t} else\r\n\t\tif (non_render){\r\n\t\t\tif(ch.rec_type != \"none\"){\r\n\t\t\t\tvisibleCount++;\r\n\t\t\t}\r\n\t\t\tstack.push(ch);\r\n\t\t}\r\n\r\n\t\ttd = this.date[\"add_\" + ev.rec_pattern](td, 1, ev);\r\n\t//\tif(!scheduler.date[\"validate_add_\" + ev.rec_pattern](td, 1, ev.rec_pattern)){\r\n\t///\t\talert(\"detect add\")\r\n\t//\t}\r\n\t}\r\n};\r\nscheduler._fix_daylight_saving_date = function(start_date, end_date, ev, counter, default_date) {\r\n\tvar shift = start_date.getTimezoneOffset() - end_date.getTimezoneOffset();\r\n\tif (shift) {\r\n\t\tif (shift > 0) {\r\n\t\t\t// e.g. 24h -> 23h\r\n\t\t\treturn new Date(counter.valueOf() + ev.event_length * 1000 - shift * 60 * 1000);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// e.g. 24h -> 25h\r\n\t\t\treturn new Date(end_date.valueOf() - shift * 60 * 1000);\r\n\t\t}\r\n\t}\r\n\treturn new Date(default_date.valueOf());\r\n};\r\nscheduler.getRecDates = function(id, max) {\r\n\tvar ev = typeof id == \"object\" ? id : scheduler.getEvent(id);\r\n\tvar recurrings = [];\r\n\tmax = max || 100;\r\n\r\n\tif (!ev.rec_type) {\r\n\t\treturn [\r\n\t\t\t{ start_date: ev.start_date, end_date: ev.end_date }\r\n\t\t];\r\n\t}\r\n\tif (ev.rec_type == \"none\") {\r\n\t\treturn [];\r\n\t}\r\n\r\n\tscheduler.repeat_date(ev, recurrings, true, ev.start_date, ev.end_date, max);\r\n\r\n\tvar result = [];\r\n\tfor(var i = 0; i < recurrings.length; i++){\r\n\t\tif(recurrings[i].rec_type != \"none\"){\r\n\t\t\tresult.push({start_date: recurrings[i].start_date, end_date: recurrings[i].end_date});\r\n\t\t}\r\n\t}\r\n\r\n\treturn result;\r\n};\r\nscheduler.getEvents = function(from, to) {\r\n\tvar result = [];\r\n\tfor (var a in this._events) {\r\n\t\tvar ev = this._events[a];\r\n\t\tif (ev && ev.start_date < to && ev.end_date > from) {\r\n\t\t\tif (ev.rec_pattern) {\r\n\t\t\t\tif (ev.rec_pattern == \"none\") continue;\r\n\t\t\t\tvar sev = [];\r\n\t\t\t\tthis.repeat_date(ev, sev, true, from, to);\r\n\t\t\t\tfor (var i = 0; i < sev.length; i++) {\r\n\t\t\t\t\t// if event is in rec_markers then it will be checked by himself, here need to skip it\r\n\t\t\t\t\tif (!sev[i].rec_pattern && sev[i].start_date < to && sev[i].end_date > from && !this._rec_markers[sev[i].id]) {\r\n\t\t\t\t\t\tresult.push(sev[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if (!this._is_virtual_event(ev.id)) { // if it's virtual event we can skip it\r\n\t\t\t\tresult.push(ev);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn result;\r\n};\r\n\r\nscheduler.config.repeat_date = \"%m.%d.%Y\";\r\nscheduler.config.lightbox.sections = [\r\n\t{name:\"description\", map_to:\"text\", type:\"textarea\" , focus:true},\r\n\t{name:\"recurring\", type:\"recurring\", map_to:\"rec_type\", button:\"recurring\"},\r\n\t{name:\"time\", height:72, type:\"time\", map_to:\"auto\"}\r\n];\r\n\r\n\r\n//drop secondary attributes\r\nscheduler._copy_dummy = function(ev) {\r\n\tvar start_date = new Date(this.start_date);\r\n\tvar end_date = new Date(this.end_date);\r\n\tthis.start_date = start_date;\r\n\tthis.end_date = end_date;\r\n\tthis.event_length = this.event_pid = this.rec_pattern = this.rec_type = null;\r\n};\r\n\r\nscheduler.config.include_end_by = false;\r\nscheduler.config.lightbox_recurring = 'ask'; // series, instance\r\n\r\nscheduler.attachEvent(\"onClearAll\", function(){\r\n\tscheduler._rec_markers = {}; //clear recurring events data\r\n\tscheduler._rec_markers_pull = {};\r\n\tscheduler._rec_temp = [];\r\n});\r\n\r\n}","import getSerializator from '../core/common/get_serializable_events';\r\nexport default function(scheduler){\r\n\r\n\t\r\nconst getSerializableData = getSerializator(scheduler);\r\n\r\n//redefine this method, if you want to provide a custom set of attributes for serialization\r\nscheduler.data_attributes=function(){\r\n\tvar attrs = [];\r\n\tvar format = scheduler._helpers.formatDate;\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\t\tfor (var name in ev)\r\n\t\t\tif (name.substr(0,1) !=\"_\")\r\n\t\t\t\tattrs.push([name,((name == \"start_date\" || name == \"end_date\")?format:null)]);\r\n\t\tbreak;\r\n\t}\r\n\treturn attrs;\r\n};\r\n\r\nscheduler.toXML = function(header){\r\n\tvar xml = [];\r\n\tvar attrs = this.data_attributes();\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\r\n\t\txml.push(\"\");\r\n\t\tfor (var i=0; i < attrs.length; i++)\r\n\t\t\txml.push(\"<\"+attrs[i][0]+\">\");\r\n\r\n\t\txml.push(\"\");\r\n\t}\r\n\treturn (header||\"\")+\"\"+xml.join(\"\\n\")+\"\";\r\n};\r\n\r\nscheduler._serialize_json_value = function(value){\r\n\tif(value === null || typeof value === \"boolean\"){\r\n\t\tvalue = \"\" + value;\r\n\t}else{\r\n\t\tif(!value && value !== 0){\r\n\t\t\tvalue = \"\";\r\n\t\t}\r\n\t\tvalue = '\"' + value.toString().\r\n\t\t\treplace(/\\n/g,\"\").\r\n\t\t\treplace(/\\\\/g,\"\\\\\\\\\").\r\n\t\t\treplace(/\"/g, '\\\\\"') + '\"';\r\n\t}\r\n\treturn value;\r\n};\r\n\r\n\r\n\r\nscheduler.toJSON = function(){\r\n\treturn JSON.stringify(this.serialize());\r\n};\r\n\r\n\r\nscheduler.toICal = function(header){\r\n\tvar start = \"BEGIN:VCALENDAR\\nVERSION:2.0\\nPRODID:-//dhtmlXScheduler//NONSGML v2.2//EN\\nDESCRIPTION:\";\r\n\tvar end = \"END:VCALENDAR\";\r\n\tvar format = scheduler.date.date_to_str(\"%Y%m%dT%H%i%s\");\r\n\tvar full_day_format = scheduler.date.date_to_str(\"%Y%m%d\");\r\n\r\n\tvar ical = [];\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\r\n\r\n\t\tical.push(\"BEGIN:VEVENT\");\r\n\t\tif (!ev._timed || (!ev.start_date.getHours() && !ev.start_date.getMinutes()))\r\n\t\t\tical.push(\"DTSTART:\"+full_day_format(ev.start_date));\r\n\t\telse\r\n\t\t\tical.push(\"DTSTART:\"+format(ev.start_date));\r\n\t\tif (!ev._timed || (!ev.end_date.getHours() && !ev.end_date.getMinutes()))\r\n\t\t\tical.push(\"DTEND:\"+full_day_format(ev.end_date));\r\n\t\telse\r\n\t\t\tical.push(\"DTEND:\"+format(ev.end_date));\r\n\t\tical.push(\"SUMMARY:\"+ev.text);\r\n\t\tical.push(\"END:VEVENT\");\r\n\t}\r\n\treturn start+(header||\"\")+\"\\n\"+ical.join(\"\\n\")+\"\\n\"+end;\r\n};\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Timeline\", scheduler.assert);\r\n}","interface IViewPosition{\r\n\ttop: number;\r\n\tleft: number;\r\n}\r\n\r\ninterface IViewBox extends IViewPosition{\r\n\twidth: number;\r\n\theight: number;\r\n\tbottom: number;\r\n\tright: number;\r\n}\r\n\r\nexport class Tooltip {\r\n\tprivate _root: HTMLElement;\r\n\tprivate _tooltipNode: HTMLElement | null;\r\n\tprivate _scheduler: any;\r\n\r\n\tconstructor(scheduler: any){\r\n\t\tthis._scheduler = scheduler;\r\n\t}\r\n\r\n\tgetNode() : HTMLElement {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tif (!this._tooltipNode){\r\n\t\t\tthis._tooltipNode = document.createElement(\"div\");\r\n\t\t\tthis._tooltipNode.className = \"dhtmlXTooltip scheduler_tooltip tooltip\";\r\n\r\n\t\t\tscheduler._waiAria.tooltipAttr(this._tooltipNode);\r\n\t\t}\r\n\t\tif(scheduler.config.rtl){\r\n\t\t\tthis._tooltipNode.classList.add(\"dhtmlXTooltip_rtl\");\r\n\t\t} else{\r\n\t\t\tthis._tooltipNode.classList.remove(\"dhtmlXTooltip_rtl\");\r\n\t\t}\r\n\t\treturn this._tooltipNode;\r\n\t}\r\n\r\n\tsetViewport(node: HTMLElement):Tooltip{\r\n\t\tthis._root = node;\r\n\t\treturn this;\r\n\t}\r\n\r\n\tshow(left: number, top: number): Tooltip;\r\n\tshow(event: MouseEvent): Tooltip;\r\n\tshow(left: number | MouseEvent, top?: number): Tooltip {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tconst container = document.body;\r\n\t\tconst node = this.getNode();\r\n\r\n\t\tif(!domHelpers.isChildOf(node, container)){\r\n\t\t\tthis.hide();\r\n\t\t\tcontainer.appendChild(node);\r\n\t\t}\r\n\r\n\t\tif (this._isLikeMouseEvent(left)) {\r\n\t\t\tconst position = this._calculateTooltipPosition(left as MouseEvent);\r\n\t\t\ttop = position.top;\r\n\t\t\tleft = position.left;\r\n\t\t}\r\n\r\n\t\tnode.style.top = top + \"px\";\r\n\t\tnode.style.left = left + \"px\";\r\n\r\n\t\tscheduler._waiAria.tooltipVisibleAttr(node);\r\n\t\treturn this;\r\n\t}\r\n\thide() : Tooltip{\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst node = this.getNode();\r\n\t\tif(node && node.parentNode){\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t}\r\n\t\tscheduler._waiAria.tooltipHiddenAttr(node);\r\n\t\treturn this;\r\n\t}\r\n\r\n\tsetContent(html: string) : Tooltip{\r\n\t\tconst node = this.getNode();\r\n\t\tnode.innerHTML = html;\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// it is for salesforce, because it proxies event to it own events\r\n\tprivate _isLikeMouseEvent(event: any): boolean {\r\n\t\tif (!event || typeof event !== \"object\") {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn \"clientX\" in event && \"clientY\" in event;\r\n\t}\r\n\r\n\tprivate _getViewPort() : HTMLElement {\r\n\t\treturn this._root || document.body;\r\n\t}\r\n\r\n\r\n\tprivate _calculateTooltipPosition(event: MouseEvent): IViewPosition{\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\t// top/left coordinates inside the viewport by mouse position\r\n\t\tconst viewport = this._getViewPortSize();\r\n\t\tconst tooltipNode = this.getNode();\r\n\t\tconst tooltip: IViewBox = {\r\n\t\t\ttop:0,\r\n\t\t\tleft: 0,\r\n\t\t\twidth: tooltipNode.offsetWidth,\r\n\t\t\theight: tooltipNode.offsetHeight,\r\n\t\t\tbottom: 0,\r\n\t\t\tright: 0\r\n\t\t};\r\n\r\n\t\tconst offsetX = scheduler.config.tooltip_offset_x;\r\n\t\tconst offsetY = scheduler.config.tooltip_offset_y;\r\n\r\n\t\tconst container = document.body;\r\n\t\tconst mouse = domHelpers.getRelativeEventPosition(event, container);\r\n\t\tconst containerPos = domHelpers.getNodePosition(container);\r\n\t\tmouse.y += containerPos.y; // to fix margin collapsing\r\n\r\n\t\ttooltip.top = mouse.y;\r\n\t\ttooltip.left = mouse.x;\r\n\t\ttooltip.top += offsetY;\r\n\t\ttooltip.left += offsetX;\r\n\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\ttooltip.right = tooltip.left + tooltip.width;\r\n\r\n\t\tconst scrollTop = window.scrollY + container.scrollTop; // to fix margin collapsing\r\n\t\t// edge cases when the tooltip element can be partially hidden by edges of the viewport\r\n\t\tif(tooltip.top < viewport.top - scrollTop){\r\n\t\t\ttooltip.top = viewport.top;\r\n\t\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\t}else if(tooltip.bottom > viewport.bottom){\r\n\t\t\ttooltip.bottom = viewport.bottom;\r\n\t\t\ttooltip.top = tooltip.bottom - tooltip.height;\r\n\t\t}\r\n\r\n\t\tif(tooltip.left < viewport.left){\r\n\t\t\ttooltip.left = viewport.left;\r\n\t\t\ttooltip.right = viewport.left + tooltip.width;\r\n\t\t}else if(tooltip.right > viewport.right){\r\n\t\t\ttooltip.right = viewport.right;\r\n\t\t\ttooltip.left = tooltip.right - tooltip.width;\r\n\t\t}\r\n\r\n\t\tif(mouse.x >= tooltip.left && mouse.x <= tooltip.right) {\r\n\t\t\ttooltip.left = mouse.x - tooltip.width - offsetX;\r\n\t\t\ttooltip.right = tooltip.left + tooltip.width;\r\n\t\t}\r\n\r\n\t\tif(mouse.y >= tooltip.top && mouse.y <= tooltip.bottom) {\r\n\t\t\ttooltip.top = mouse.y - tooltip.height - offsetY;\r\n\t\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\t}\r\n\r\n\t\treturn tooltip;\r\n\t}\r\n\r\n\tprivate _getViewPortSize() : IViewBox {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tconst container = this._getViewPort();\r\n\t\tlet viewport = container;\r\n\t\tlet scrollTop = window.scrollY + document.body.scrollTop;\r\n\t\tlet scrollLeft = window.scrollX + document.body.scrollLeft;\r\n\t\tlet pos;\r\n\t\t// support for the initial tooltip mode where the tooltip element was attached to the data area of scheduler\r\n\t\tif(container === scheduler.$event_data){\r\n\t\t\tviewport = scheduler.$event;\r\n\t\t\tscrollTop = 0;\r\n\t\t\tscrollLeft = 0;\r\n\t\t\tpos = domHelpers.getNodePosition(scheduler.$event);\r\n\t\t}else{\r\n\t\t\tpos = domHelpers.getNodePosition(viewport);\r\n\t\t}\r\n\t\treturn {\r\n\t\t\tleft:pos.x + scrollLeft,\r\n\t\t\ttop: pos.y + scrollTop,\r\n\t\t\twidth: pos.width,\r\n\t\t\theight: pos.height,\r\n\t\t\tbottom: pos.y + pos.height + scrollTop,\r\n\t\t\tright: pos.x + pos.width + scrollLeft\r\n\t\t};\r\n\t}\r\n}\r\n","import * as utils from \"../../core/utils/utils\";\r\nimport { Tooltip } from \"./tooltip\";\r\n\r\ninterface ITrackerTarget {\r\n\tselector: string;\r\n\tonmouseenter: (event: MouseEvent, node: HTMLElement) => void;\r\n\tonmousemove: (event: MouseEvent, node: HTMLElement) => void;\r\n\tonmouseleave: (event: MouseEvent, node: HTMLElement) => void;\r\n\tglobal: boolean;\r\n}\r\n\r\ninterface ITooltipConfig {\r\n\tselector: string;\r\n\thtml: (event: MouseEvent, node: HTMLElement) => string;\r\n\tglobal: boolean;\r\n}\r\n\r\nexport class TooltipManager{\r\n\ttooltip: Tooltip;\r\n\tprotected _domEvents: any;\r\n\tprivate _listeners: object = {};\r\n\tprivate _scheduler: any;\r\n\tprivate delayShow: any;\r\n\tprivate delayHide: any;\r\n\r\n\tconstructor(scheduler: any) {\r\n\t\tthis.tooltip = new Tooltip(scheduler);\r\n\t\tthis._scheduler = scheduler;\r\n\t\tthis._domEvents = scheduler._createDomEventScope();\r\n\t\tthis._initDelayedFunctions();\r\n\t}\r\n\r\n\tdestructor(): void{\r\n\t\tthis.tooltip.hide();\r\n\t\tthis._domEvents.detachAll();\r\n\t}\r\n\thideTooltip(): void{\r\n\t\tthis.delayHide();\r\n\t}\r\n\tattach(config: ITrackerTarget): void {\r\n\t\tlet root = document.body;\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tif(!config.global){\r\n\t\t\troot = scheduler.$root;\r\n\t\t}\r\n\r\n\t\tlet watchableTarget = null;\r\n\t\tconst handler = (event) => {\r\n\t\t\tconst eventTarget = domHelpers.getTargetNode(event);\r\n\t\t\tconst targetNode = domHelpers.closest(eventTarget, config.selector);\r\n\t\t\tif(domHelpers.isChildOf(eventTarget, this.tooltip.getNode())){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tconst doOnMouseEnter = () => {\r\n\t\t\t\twatchableTarget = targetNode;\r\n\t\t\t\tconfig.onmouseenter(event, targetNode);\r\n\t\t\t};\r\n\r\n\t\t\tif(watchableTarget){\r\n\t\t\t\tif(targetNode && targetNode === watchableTarget){\r\n\t\t\t\t\tconfig.onmousemove(event, targetNode);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconfig.onmouseleave(event, watchableTarget);\r\n\t\t\t\t\twatchableTarget = null;\r\n\r\n\t\t\t\t\tif(targetNode && targetNode !== watchableTarget){\r\n\t\t\t\t\t\tdoOnMouseEnter();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(targetNode){\r\n\t\t\t\t\tdoOnMouseEnter();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tthis.detach(config.selector);\r\n\t\tthis._domEvents.attach(root, \"mousemove\", handler);\r\n\t\tthis._listeners[config.selector] = {\r\n\t\t\tnode: root,\r\n\t\t\thandler\r\n\t\t};\r\n\t}\r\n\r\n\tdetach(selector: string): void {\r\n\t\tconst listener = this._listeners[selector];\r\n\t\tif(listener){\r\n\t\t\tthis._domEvents.detach(listener.node, \"mousemove\", listener.handler);\r\n\t\t}\r\n\t}\r\n\r\n\ttooltipFor(config: ITooltipConfig): void {\r\n\t\tconst cloneDomEvent = (event: MouseEvent) => {\r\n\t\t\tlet clone = event;\r\n\t\t\t// making events survive timeout in ie\r\n\t\t\t// tslint:disable-next-line no-string-literal\r\n\t\t\tif(document[\"createEventObject\"] && !document.createEvent){\r\n\t\t\t\t// tslint:disable-next-line no-string-literal\r\n\t\t\t\tclone = document[\"createEventObject\"](event);\r\n\t\t\t}\r\n\t\t\treturn clone;\r\n\t\t};\r\n\t\tthis._initDelayedFunctions();\r\n\t\tthis.attach({\r\n\t\t\tselector: config.selector,\r\n\t\t\tglobal: config.global,\r\n\t\t\tonmouseenter:(event: MouseEvent, node: HTMLElement) => {\r\n\t\t\t\tconst html = config.html(event, node);\r\n\t\t\t\tif(html){\r\n\t\t\t\t\tthis.delayShow(cloneDomEvent(event), html);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tonmousemove:(event: MouseEvent, node: HTMLElement) => {\r\n\t\t\t\tconst html = config.html(event, node);\r\n\t\t\t\tif(html){\r\n\t\t\t\t\tthis.delayShow(cloneDomEvent(event), html);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\t\t\tthis.delayHide();\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tonmouseleave:() => {\r\n\t\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\t\tthis.delayHide();\r\n\t\t\t},\r\n\t\t});\r\n\t}\r\n\r\n\tprivate _initDelayedFunctions(){\r\n\t\tconst scheduler = this._scheduler;\r\n\t\t// reset delayed functions in order to apply current values of tooltip_timeout\r\n\t\tif(this.delayShow){\r\n\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t}\r\n\t\tif(this.delayHide){\r\n\t\t\tthis.delayHide.$cancelTimeout();\r\n\t\t}\r\n\t\tthis.tooltip.hide();\r\n\t\t\r\n\t\tthis.delayShow = (utils as any).default.delay((event: MouseEvent, html: string) => {\r\n\t\t\tif(scheduler.callEvent(\"onBeforeTooltip\", [event]) === false) {\r\n\t\t\t\tthis.tooltip.hide();\r\n\t\t\t} else {\r\n\t\t\t\tthis.tooltip.setContent(html);\r\n\t\t\t\tthis.tooltip.show(event);\r\n\t\t\t}\r\n\t\t}, scheduler.config.tooltip_timeout || 1);\r\n\r\n\t\tthis.delayHide = (utils as any).default.delay(() => {\r\n\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\tthis.tooltip.hide();\r\n\t\t}, scheduler.config.tooltip_hide_timeout || 1);\r\n\t}\r\n\r\n}","import { TooltipManager } from \"./tooltipManager\";\r\n\r\nexport default function (scheduler: any) {\r\n\r\n\tscheduler.config.tooltip_timeout = 30;\r\n\tscheduler.config.tooltip_offset_y = 20;\r\n\tscheduler.config.tooltip_offset_x = 10;\r\n\tscheduler.config.tooltip_hide_timeout = 30;\r\n\r\n\tconst tooltipManager = new TooltipManager(scheduler);\r\n\r\n\tscheduler.ext.tooltips = tooltipManager;\r\n\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function () {\r\n\r\n\t\ttooltipManager.tooltipFor({\r\n\t\t\tselector: \"[\" + scheduler.config.event_attribute + \"]\",\r\n\t\t\thtml: (event: MouseEvent) => {\r\n\t\t\t\tif (scheduler._mobile && !scheduler.config.touch_tooltip) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst targetEventId = scheduler._locate_event(event.target);\r\n\t\t\t\tif (scheduler.getEvent(targetEventId)) {\r\n\t\t\t\t\tconst event = scheduler.getEvent(targetEventId);\r\n\t\t\t\t\treturn scheduler.templates.tooltip_text(event.start_date, event.end_date, event);\r\n\t\t\t\t}\r\n\t\t\t\treturn null;\r\n\t\t\t},\r\n\t\t\tglobal: false\r\n\t\t});\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function () {\r\n\t\ttooltipManager.destructor();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onLightbox\", function () {\r\n\t\ttooltipManager.hideTooltip();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeDrag\", function() {\r\n\t\ttooltipManager.hideTooltip();\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventDeleted\", function() {\r\n\t\ttooltipManager.hideTooltip();\r\n\t\treturn true;\r\n\t});\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Tree Timeline\", scheduler.assert);\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Units\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\nscheduler._get_url_nav = function(){\r\n\tvar p = {};\r\n\tvar data = (document.location.hash || \"\").replace(\"#\", \"\").split(\",\");\r\n\tfor (var i = 0; i < data.length; i++) {\r\n\t\tvar s = data[i].split(\"=\");\r\n\t\tif (s.length == 2)\r\n\t\t\tp[s[0]] = s[1];\r\n\t}\r\n\treturn p;\r\n};\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\", function () {\r\n\tvar first = true;\r\n\tvar s2d = scheduler.date.str_to_date(\"%Y-%m-%d\");\r\n\tvar d2s = scheduler.date.date_to_str(\"%Y-%m-%d\");\r\n\tvar select_event = scheduler._get_url_nav().event || null;\r\n\r\n\tscheduler.attachEvent(\"onAfterEventDisplay\", function(ev){\r\n\t\tselect_event = null;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function (om, od, m, d) {\r\n\t\tif (first) {\r\n\t\t\tfirst = false;\r\n\t\t\tvar p = scheduler._get_url_nav();\r\n\r\n\t\t\tif (p.event){\r\n\t\t\t\ttry{\r\n\t\t\t\t\tif(scheduler.getEvent(p.event)){\r\n\t\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\t\tshowEvent(p.event);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tvar handler = scheduler.attachEvent(\"onXLE\", function(){\r\n\t\t\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\t\t\tshowEvent(p.event);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\tscheduler.detachEvent(handler);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (e){}\r\n\t\t\t}\r\n\r\n\t\t\tif (p.date || p.mode) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tthis.setCurrentView((p.date ? s2d(p.date) : null), (p.mode || null));\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\t//assuming that mode is not available anymore\r\n\t\t\t\t\tthis.setCurrentView((p.date ? s2d(p.date) : null), m);\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar values = [\r\n\t\t\t\"date=\" + d2s(d || od),\r\n\t\t\t\"mode=\" + (m || om)\r\n\t\t];\r\n\r\n\t\tif(select_event){\r\n\t\t\tvalues.push(\"event=\" + select_event);\r\n\t\t}\r\n\r\n\t\tvar text = \"#\" + values.join(\",\");\r\n\t\tdocument.location.hash = text;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tfunction showEvent(e){\r\n\t\tif(scheduler.$destroyed){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tselect_event = e;\r\n\t\tif(scheduler.getEvent(e)){\r\n\t\t\tscheduler.showEvent(e);\r\n\t\t}\r\n\t}\r\n});\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Week Agenda\", scheduler.assert);\r\n}","export default function(scheduler){\r\nscheduler.attachEvent(\"onLightBox\",function(){\r\n\tif (this._cover){\r\n\t\ttry{\r\n\t\t\tthis._cover.style.height = this.expanded ? \"100%\" : ((document.body.parentNode||document.body).scrollHeight+\"px\");\r\n\t\t} catch(e) {\r\n\r\n\t\t}\r\n\t}\r\n});\r\n\r\nscheduler.form_blocks.select.set_value=function(node,value,ev){\r\n\tif (typeof value == \"undefined\" || value === \"\")\r\n\t\tvalue = (node.firstChild.options[0]||{}).value;\r\n\tnode.firstChild.value=value||\"\";\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\t// scheduler.config.year_x = 4;\r\n\t// scheduler.config.year_y = 3;\r\n\t// scheduler.xy.year_top = 0;\r\n\r\n\tscheduler.templates.year_date = function(date) {\r\n\t\treturn scheduler.date.date_to_str(scheduler.locale.labels.year_tab + \" %Y\")(date);\r\n\t};\r\n\tscheduler.templates.year_month = scheduler.date.date_to_str(\"%F\");\r\n\tscheduler.templates.year_scale_date = scheduler.date.date_to_str(\"%D\");\r\n\tscheduler.templates.year_tooltip = function(s, e, ev) {\r\n\t\treturn ev.text;\r\n\t};\r\n\r\n\tconst isYearMode = function() {\r\n\t\treturn scheduler._mode == \"year\";\r\n\t};\r\n\t\r\n\tconst getCellDate = function(node){\r\n\t\tvar day = scheduler.$domHelpers.closest(node, \"[data-cell-date]\");\r\n\t\tif(!day || !day.hasAttribute(\"data-cell-date\")) return null;\r\n\t\treturn scheduler.templates.parse_date(day.getAttribute(\"data-cell-date\"));\r\n\t};\r\n\r\n\t// dbl click hook for scheduler._on_dbl_click\r\n\tscheduler.dblclick_dhx_month_head = function(e) {\r\n\t\tif (isYearMode()) {\r\n\t\t\tconst target = e.target;\r\n\t\t\tif(scheduler.$domHelpers.closest(target, \".dhx_before\") || scheduler.$domHelpers.closest(target, \".dhx_after\")){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tconst date = getCellDate(target);\r\n\t\t\t\r\n\t\t\tif(date){\r\n\t\t\t\tconst start = date;\r\n\t\t\t\tconst end = this.date.add(start, 1, \"day\");\r\n\t\t\t\tif (!this.config.readonly && this.config.dblclick_create){\r\n\t\t\t\t\tthis.addEventNow(start.valueOf(), end.valueOf(), e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\t\r\n\tscheduler.attachEvent(\"onEventIdChange\", function(){\r\n\t\tif (isYearMode())\r\n\t\t\tthis.year_view(true);\r\n\t});\r\n\r\n\r\n\tvar old = scheduler.render_data;\r\n\tscheduler.render_data = function(evs) {\r\n\t\tif (!isYearMode()) return old.apply(this, arguments);\r\n\t\tfor (var i = 0; i < evs.length; i++)\r\n\t\t\tthis._year_render_event(evs[i]);\r\n\t};\r\n\r\n\tvar clear = scheduler.clear_view;\r\n\tscheduler.clear_view = function() {\r\n\t\tif (!isYearMode()) return clear.apply(this, arguments);\r\n\t\tvar dates = scheduler._year_marked_cells,\r\n\t\t\tdiv = null;\r\n\t\tfor (var date in dates) {\r\n\t\t\tif (dates.hasOwnProperty(date)) {\r\n\t\t\t\tdiv = dates[date];\r\n\t\t\t\tdiv.classList.remove(\"dhx_year_event\", \"dhx_cal_datepicker_event\");\r\n\t\t\t\t// div.className = \"dhx_month_head\";\r\n\t\t\t\t// div.removeAttribute(\"date\");\r\n\t\t\t\t// div.removeAttribute(\"data-year-date\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tscheduler._year_marked_cells = {};\r\n\t};\r\n\r\n\tscheduler._hideToolTip = function() {\r\n\t\tif (this._tooltip) {\r\n\t\t\tthis._tooltip.style.display = \"none\";\r\n\t\t\tthis._tooltip.date = new Date(9999, 1, 1);\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._showToolTip = function(date, pos, e, src) {\r\n\t\tif (this._tooltip) {\r\n\t\t\tif (this._tooltip.date.valueOf() == date.valueOf()) return;\r\n\t\t\tthis._tooltip.innerHTML = \"\";\r\n\t\t} else {\r\n\t\t\tvar t = this._tooltip = document.createElement(\"div\");\r\n\t\t\tt.className = \"dhx_year_tooltip\";\r\n\t\t\tif (this.config.rtl) t.className += \" dhx_tooltip_rtl\";\r\n\t\t\tdocument.body.appendChild(t);\r\n\t\t\tt.addEventListener(\"click\", scheduler._click.dhx_cal_data);\r\n\t\t\tt.addEventListener(\"click\", function(e){\r\n\t\t\t\tif(e.target.closest(`[${scheduler.config.event_attribute}]`)){\r\n\t\t\t\t\tconst id = e.target.closest(`[${scheduler.config.event_attribute}]`).getAttribute(scheduler.config.event_attribute);\r\n\t\t\t\t\tscheduler.showLightbox(id);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\tvar evs = this.getEvents(date, this.date.add(date, 1, \"day\"));\r\n\t\tvar html = \"\";\r\n\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tif(!this.filter_event(ev.id, ev))\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\tvar bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\t\t\tvar color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\t\t\thtml += \"
\";\r\n\t\t\thtml += \"
\" + (evs[i]._timed ? this.templates.event_date(evs[i].start_date) : \"\") + \"
\";\r\n\t\t\thtml += \"
 
\";\r\n\t\t\thtml += this.templates.year_tooltip(evs[i].start_date, evs[i].end_date, evs[i]) + \"
\";\r\n\t\t}\r\n\r\n\t\tthis._tooltip.style.display = \"\";\r\n\t\tthis._tooltip.style.top = \"0px\";\r\n\r\n\r\n\t\tif (document.body.offsetWidth - pos.left - this._tooltip.offsetWidth < 0)\r\n\t\t\tthis._tooltip.style.left = pos.left - this._tooltip.offsetWidth + \"px\";\r\n\t\telse\r\n\t\t\tthis._tooltip.style.left = pos.left + src.offsetWidth + \"px\";\r\n\r\n\t\tthis._tooltip.date = date;\r\n\t\tthis._tooltip.innerHTML = html;\r\n\r\n\t\tif (document.body.offsetHeight - pos.top - this._tooltip.offsetHeight < 0)\r\n\t\t\tthis._tooltip.style.top = pos.top - this._tooltip.offsetHeight + src.offsetHeight + \"px\";\r\n\t\telse\r\n\t\t\tthis._tooltip.style.top = pos.top + \"px\";\r\n\t};\r\n\r\n\tscheduler._year_view_tooltip_handler = function(e){\r\n\t\tif (!isYearMode()) return;\r\n\r\n\t\tvar src = e.target || e.srcElement;\r\n\t\tif (src.tagName.toLowerCase() == 'a') // fix for active links extension (it adds links to the date in the cell)\r\n\t\t\tsrc = src.parentNode;\r\n\t\tif (scheduler._getClassName(src).indexOf(\"dhx_year_event\") != -1)\r\n\t\t\tscheduler._showToolTip(scheduler.templates.parse_date(src.getAttribute(\"data-year-date\")), scheduler.$domHelpers.getOffset(src), e, src);\r\n\t\telse\r\n\t\t\tscheduler._hideToolTip();\r\n\t};\r\n\tscheduler._init_year_tooltip = function() {\r\n\t\tscheduler._detachDomEvent(scheduler._els[\"dhx_cal_data\"][0], \"mouseover\", scheduler._year_view_tooltip_handler);\r\n\t\tscheduler.event(scheduler._els[\"dhx_cal_data\"][0], \"mouseover\", scheduler._year_view_tooltip_handler);\r\n\t};\r\n\r\n\tscheduler._get_year_cell = function(d) {\r\n\t\tvar dateString = scheduler.templates.format_date(d);\r\n\t\tvar cells = this.$root.querySelectorAll(`.dhx_cal_data .dhx_cal_datepicker_date[data-cell-date=\"${dateString}\"]`);\r\n\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\tif(!scheduler.$domHelpers.closest(cells[i], \".dhx_after, .dhx_before\")){\r\n\t\t\t\treturn cells[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t};\r\n\r\n\tscheduler._year_marked_cells = {};\r\n\tscheduler._mark_year_date = function(date, event) {\r\n\t\tvar dateString = scheduler.templates.format_date(date);\r\n\t\tvar cell = this._get_year_cell(date);\r\n\t\tif (!cell) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tvar ev_class = this.templates.event_class(event.start_date, event.end_date, event);\r\n\t\tif (!scheduler._year_marked_cells[dateString]) {\r\n\t\t\tcell.classList.add(\"dhx_year_event\", \"dhx_cal_datepicker_event\");// = \"dhx_month_head dhx_year_event\";\r\n\t\t\tcell.setAttribute(\"data-year-date\", dateString);\r\n\t\t\tcell.setAttribute(\"date\", dateString);\r\n\t\t\tscheduler._year_marked_cells[dateString] = cell;\r\n\t\t}\r\n\t\tif(ev_class){\r\n\t\t\tcell.classList.add(ev_class);\r\n\t\t}\r\n\t};\r\n\tscheduler._unmark_year_date = function(date) {\r\n\t\tvar cell = this._get_year_cell(date);\r\n\t\tif (!cell) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcell.classList.remove(\"dhx_year_event\", \"dhx_cal_datepicker_event\");\r\n//\t\tcell.className = \"dhx_month_head\";\r\n\t};\r\n\tscheduler._year_render_event = function(event) {\r\n\t\tvar date = event.start_date;\r\n\t\tif (date.valueOf() < this._min_date.valueOf()){\r\n\t\t\tdate = this._min_date;\r\n\t\t} else {\r\n\t\t\tdate = this.date.date_part(new Date(date));\r\n\t\t}\r\n\r\n\t\twhile (date < event.end_date) {\r\n\t\t\tthis._mark_year_date(date, event);\r\n\t\t\tdate = this.date.add(date, 1, \"day\");\r\n\t\t\tif (date.valueOf() >= this._max_date.valueOf())\r\n\t\t\t\treturn;\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler.year_view = function(mode) {\r\n\r\n\t\tscheduler.set_sizes();\r\n\r\n\t\tscheduler._table_view = mode;\r\n\r\n\t\tif (this._load_mode && this._load()) return;\r\n\r\n\t\tif (mode) {\r\n\t\t\tscheduler._init_year_tooltip();\r\n\t\t\tscheduler._reset_year_scale();\r\n\t\t\tif (scheduler._load_mode && scheduler._load()){\r\n\t\t\t\tscheduler._render_wait = true;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tscheduler.render_view_data();\r\n\t\t} else {\r\n\t\t\tscheduler._hideToolTip();\r\n\t\t}\r\n\t};\r\n\tscheduler._reset_year_scale = function() {\r\n\t\tthis._cols = [];\r\n\t\tthis._colsS = {};\r\n\t\tvar week_starts = []; //start day of first week in each month\r\n\t\tvar dataArea = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tvar c = this.config;\r\n\t\tdataArea.scrollTop = 0; //fix flickering in FF\r\n\t\tdataArea.innerHTML = \"\";\r\n\r\n\t\tvar dy = Math.floor((parseInt(dataArea.style.height) - scheduler.xy.year_top) / c.year_y);\r\n\t\tif (dy < 190) {\r\n\t\t\tdy = 190;\r\n\t\t}\r\n\r\n\t\tvar week_template = document.createElement(\"div\");\r\n\t\tvar dummy_date = this.date.week_start(scheduler._currentDate());\r\n\r\n\t\tthis._process_ignores(dummy_date, 7, \"day\", 1);\r\n\r\n\t\tfor (var i = 0; i < 7; i++) {\r\n\t\t\tif(!(this._ignores && this._ignores[i])) {\r\n\t\t\t\tthis._cols[i] = 'var(--dhx-scheduler-datepicker-cell-size)';\r\n\t\t\t\tthis._render_x_header(i, 0, dummy_date, week_template);\r\n\r\n\t\t\t}\r\n\t\t\tdummy_date = this.date.add(dummy_date, 1, \"day\");\r\n\t\t}\r\n\t\tweek_template.lastChild.className += \" dhx_scale_bar_last\";\r\n\r\n\t\tfor(var i = 0; i < week_template.childNodes.length; i++){\r\n\t\t\tthis._waiAria.yearHeadCell(week_template.childNodes[i]);\r\n\t\t}\r\n\r\n\t\tvar sd = this.date[this._mode + \"_start\"](this.date.copy(this._date));\r\n\t\tvar ssd = sd;\r\n\t\tvar yearBox = null;\r\n\t\tconst wrapper = document.createElement(\"div\");\r\n\t\twrapper.classList.add(\"dhx_year_wrapper\");\r\n\t\tfor (var i = 0; i < c.year_y; i++){\r\n\t\t\tfor (var j = 0; j < c.year_x; j++) {\r\n\t\t\t\tyearBox = document.createElement(\"div\");\r\n\t\t\t\tyearBox.className = \"dhx_year_box\";\r\n\r\n\t\t\t\tyearBox.setAttribute(\"date\", this._helpers.formatDate(sd));\r\n\t\t\t\tyearBox.setAttribute(\"data-month-date\", this._helpers.formatDate(sd));\r\n\t\t\t\tyearBox.innerHTML = \"
\" + week_template.innerHTML + \"
\";\r\n\r\n\t\t\t\tvar header = yearBox.querySelector(\".dhx_year_month\");\r\n\t\t\t\tvar grid = yearBox.querySelector(\".dhx_year_grid\");\r\n\t\t\t\tvar body = yearBox.querySelector(\".dhx_year_body\");\r\n\r\n\t\t\t\tvar headerId = scheduler.uid();\r\n\t\t\t\tthis._waiAria.yearHeader(header, headerId);\r\n\t\t\t\tthis._waiAria.yearGrid(grid, headerId);\r\n\r\n\r\n\t\t\t\theader.innerHTML = this.templates.year_month(sd);\r\n\r\n\r\n\r\n\t\t\t\tvar dd = this.date.week_start(sd);\r\n\t\t\t\tthis._reset_month_scale(body, sd, dd, 6);\r\n\r\n\t\t\t\tvar days = body.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var day = 0; day < days.length; day++){\r\n\t\t\t\t\tthis._waiAria.yearDayCell(days[day]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\twrapper.appendChild(yearBox);\r\n\r\n\t\t\t\tweek_starts[i * c.year_x + j] = (sd.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) % 7;\r\n\t\t\t\tsd = this.date.add(sd, 1, \"month\");\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdataArea.appendChild(wrapper);\r\n\r\n\t\tvar dateElement = this._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML = this.templates[this._mode + \"_date\"](ssd, sd, this._mode);\r\n\t\t}\r\n\r\n\t\tthis.week_starts = week_starts;\r\n\t\tweek_starts._month = ssd.getMonth();\r\n\t\tthis._min_date = ssd;\r\n\t\tthis._max_date = sd;\r\n\t};\r\n\r\n\tscheduler._reset_year_scale = function(){\r\n\r\n\t\tvar dataArea = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tdataArea.scrollTop = 0; //fix flickering in FF\r\n\t\tdataArea.innerHTML = \"\";\r\n\r\n\t\tlet yearStart = this.date.year_start(new Date(this._date));\r\n\t\t\r\n\t\tthis._min_date = this.date.week_start(new Date(yearStart));\r\n\r\n\t\tconst wrapper = document.createElement(\"div\");\r\n\t\twrapper.classList.add(\"dhx_year_wrapper\");\r\n\r\n\t\tlet currentDate = yearStart;\r\n\t\tfor(let i = 0; i < 12; i++){\r\n\t\t\tlet yearBox = document.createElement(\"div\");\r\n\t\t\tyearBox.className = \"dhx_year_box\";\r\n\r\n\t\t\tyearBox.setAttribute(\"date\", this._helpers.formatDate(currentDate));\r\n\t\t\tyearBox.setAttribute(\"data-month-date\", this._helpers.formatDate(currentDate));\r\n\t\t\tyearBox.innerHTML = `
${this.templates.year_month(currentDate)}
\r\n\t\t\t
`;\r\n\r\n\t\t\tconst yearGrid = yearBox.querySelector(\".dhx_year_grid\");\r\n\t\t\tconst datepicker = scheduler._createDatePicker(null, {\r\n\t\t\t\tdate: currentDate,\r\n\t\t\t\tminWeeks: 6\r\n\t\t\t});\r\n\t\t\tdatepicker._renderDayGrid(yearGrid);\r\n\t\t\tdatepicker.destructor();\r\n\r\n\t\t\twrapper.appendChild(yearBox);\r\n\r\n\t\t\tcurrentDate = this.date.add(currentDate, 1, \"month\");\r\n\r\n\t\t}\r\n\t\tdataArea.appendChild(wrapper);\r\n\r\n\t\tlet lastDate = this.date.add(yearStart, 1, \"year\");\r\n\t\tif(lastDate.valueOf() != this.date.week_start(new Date(lastDate)).valueOf()){\r\n\t\t\tlastDate = this.date.week_start(new Date(lastDate));\r\n\t\t\tlastDate = this.date.add(lastDate, 1, \"week\");\r\n\t\t}\r\n\t\tthis._max_date = lastDate;\r\n\t\tvar dateElement = this._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML = this.templates[this._mode + \"_date\"](yearStart, lastDate, this._mode);\r\n\t\t}\r\n\t};\r\n\r\n\tvar getActionData = scheduler.getActionData;\r\n\tscheduler.getActionData = function(n_ev) {\r\n\t\tif(!isYearMode()){\r\n\t\t\treturn getActionData.apply(scheduler, arguments);\r\n\t\t}\r\n\t\t\r\n\t\tvar date = getCellDate(n_ev.target);\r\n\t\treturn {\r\n\t\t\tdate:date,\r\n\t\t\tsection:null\r\n\t\t};\r\n\t};\r\n\r\n\tvar locateEvent = scheduler._locate_event;\r\n\tscheduler._locate_event = function(node) {\r\n\t\tvar id = locateEvent.apply(scheduler, arguments);\r\n\t\tif(!id){\r\n\t\t\t\r\n\t\t\tvar date = getCellDate(node);\r\n\t\t\tif(!date) return null;\r\n\t\t\tvar evs = scheduler.getEvents(date, scheduler.date.add(date, 1, \"day\"));\r\n\t\t\tif(!evs.length) return null;\r\n\r\n\t\t\t//can be multiple events in the cell, return any single one\r\n\t\t\tid = evs[0].id;\r\n\t\t}\r\n\t\treturn id;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tscheduler._hideToolTip();\r\n\t});\r\n}","export default function(scheduler){\r\n\r\n\r\n(function(){\r\n\r\nfunction defaults(obj, std){\r\n\tfor (var key in std)\r\n\t\tif (!obj[key])\r\n\t\t\tobj[key] = std[key];\r\n\treturn obj;\r\n}\r\n\r\nfunction getElementSizes(element, scheduler) {\r\n\tvar sizes = {};\r\n\telement = scheduler._els[element];\r\n\tif (element && element[0]) {\r\n\t\tsizes.x = element[0].scrollWidth;\r\n\t\tsizes.y = element[0].scrollHeight;\r\n\t} else {\r\n\t\tsizes.x = 0;\r\n\t\tsizes.y = 0;\r\n\t}\r\n\treturn sizes;\r\n}\r\n\r\n//compatibility for new versions of scheduler\r\nif(!window.dhtmlxAjax){\r\n\twindow.dhtmlxAjax = {\r\n\t\tpost: function(url, data, callback){\r\n\t\t\treturn window.dhx4.ajax.post(url, data, callback);\r\n\t\t},\r\n\t\tget: function(url, callback){\r\n\t\t\treturn window.ajax.get(url, callback);\r\n\t\t}\r\n\t};\r\n}\r\n\r\nfunction add_export_methods(scheduler){\r\n\r\n\tscheduler.exportToPDF = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.pdf\",\r\n\t\t\tformat:\"A4\",\r\n\t\t\torientation:\"landscape\",\r\n\t\t\tdpi:96,\r\n\t\t\tzoom:1,\r\n\t\t\trtl: scheduler.config.rtl\r\n\t\t});\r\n\t\tconfig.html = this._export_html(config);\r\n\t\tconfig.mode = this.getState().mode;\r\n\t\tthis._send_to_export(config, \"pdf\");\r\n\t};\r\n\r\n\tscheduler.exportToPNG = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.png\",\r\n\t\t\tformat:\"A4\",\r\n\t\t\torientation:\"landscape\",\r\n\t\t\tdpi:96,\r\n\t\t\tzoom:1,\r\n\t\t\trtl: scheduler.config.rtl\r\n\t\t});\r\n\t\tconfig.html = this._export_html(config);\r\n\t\tconfig.mode = this.getState().mode;\r\n\t\tthis._send_to_export(config, \"png\");\r\n\t};\r\n\r\n\tscheduler.exportToICal = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.ical\",\r\n\t\t\tdata:this._serialize_plain(null, config)\r\n\t\t});\r\n\t\tthis._send_to_export(config, \"ical\");\r\n\t};\r\n\r\n\tscheduler.exportToExcel = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.xlsx\",\r\n\t\t\ttitle:\"Events\",\r\n\t\t\tdata:this._serialize_plain( this.templates.xml_format, config),\r\n\t\t\tcolumns:this._serialize_columns()\r\n\t\t});\r\n\t\tthis._send_to_export(config, \"excel\");\r\n\t};\r\n\r\n\tscheduler._ajax_to_export = function(data, type, callback){\r\n\t\tdelete data.callback;\r\n\t\tvar url = data.server || \"https://export.dhtmlx.com/scheduler\";\r\n\r\n\t\twindow.dhtmlxAjax.post(url,\r\n\t\t\t\"type=\"+type+\"&store=1&data=\"+encodeURIComponent(JSON.stringify(data)),\r\n\t\t\tfunction(loader){\r\n\t\t\t\tvar fail = loader.xmlDoc.status > 400;\r\n\t\t\t\tvar info = null;\r\n\r\n\t\t\t\tif (!fail){\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\tinfo = JSON.parse(loader.xmlDoc.responseText);\r\n\t\t\t\t\t}catch(e){}\r\n\t\t\t\t}\r\n\t\t\t\tcallback(info);\r\n\t\t\t}\r\n\t\t);\r\n\t};\r\n\r\n\tscheduler._plain_export_copy = function(source, format){\r\n\t\tvar target = {};\r\n\t\tfor (var key in source)\r\n\t\t\ttarget[key] = source[key];\r\n\r\n\t\ttarget.start_date = format(target.start_date);\r\n\t\ttarget.end_date = format(target.end_date);\r\n\t\ttarget.$text = this.templates.event_text(source.start_date, source.end_date, source);\r\n\r\n\t\treturn target;\r\n\t};\r\n\r\n\tscheduler._serialize_plain = function(format, config){\r\n\t\tformat = format || scheduler.date.date_to_str(\"%Y%m%dT%H%i%s\", true);\r\n\r\n\t\tvar events;\r\n\t\tif (config && config.start && config.end)\r\n\t\t\tevents = scheduler.getEvents(config.start, config.end);\r\n\t\telse\r\n\t\t\tevents = scheduler.getEvents();\r\n\r\n\t\tvar data = [];\r\n\t\tfor (var i = 0; i< events.length; i++)\r\n\t\t\tdata[i] = this._plain_export_copy(events[i], format);\r\n\r\n\t\treturn data;\r\n\t};\r\n\r\n\tscheduler._serialize_columns = function(){\r\n\t\treturn [\r\n\t\t\t{ id:\"start_date\", header:\"Start Date\", width:30 },\r\n\t\t\t{ id:\"end_date\", header:\"End Date\", width:30 },\r\n\t\t\t{ id:\"$text\", header:\"Text\", width:100 }\r\n\t\t];\r\n\t};\r\n\r\n\tscheduler._send_to_export = function(data, type){\r\n\t\tif(!data.version){\r\n\t\t\tdata.version = scheduler.version;\r\n\t\t}\r\n\r\n\t\tif(!data.skin){\r\n\t\t\tdata.skin = scheduler.skin;\r\n\t\t}\r\n\r\n\t\tif (data.callback)\r\n\t\t\t\treturn scheduler._ajax_to_export(data, type, data.callback);\r\n\r\n\t\tvar form = this._create_hidden_form();\r\n\r\n\t\tform.firstChild.action = data.server || \"https://export.dhtmlx.com/scheduler\";\r\n\t\tform.firstChild.childNodes[0].value = JSON.stringify(data);\r\n\t\tform.firstChild.childNodes[1].value = type;\r\n\t\tform.firstChild.submit();\r\n\t};\r\n\r\n\tscheduler._create_hidden_form = function(){\r\n\t\tif (!this._hidden_export_form){\r\n\t\t\tvar t = this._hidden_export_form = document.createElement(\"div\");\r\n\t\t\tt.style.display = \"none\";\r\n\t\t\tt.innerHTML = \"
\";\r\n\t\t\tdocument.body.appendChild(t);\r\n\t\t}\r\n\t\treturn this._hidden_export_form;\r\n\t};\r\n\r\n\tscheduler._get_export_size = function(format, orientation, zoom, dpi, header, footer, scales) {\r\n\r\n\t\tdpi = parseInt(dpi)/25.4 || 4;\r\n\r\n\t\tvar sizes = {\r\n\t\t\t\"A5\":{ x:148, y:210 },\r\n\t\t\t\"A4\":{ x:210, y:297 },\r\n\t\t\t\"A3\":{ x:297, y:420 },\r\n\t\t\t\"A2\":{ x:420, y:594 },\r\n\t\t\t\"A1\":{ x:594, y:841 },\r\n\t\t\t\"A0\":{ x:841, y:1189 }\r\n\t\t};\r\n\r\n\t\tvar dataX = getElementSizes(\"dhx_cal_data\", this).x;\r\n\t\tvar dataY = getElementSizes(\"dhx_cal_data\", this).y;\r\n\t\tvar headY = getElementSizes(\"dhx_cal_header\", this).y;\r\n\t\tvar multY = getElementSizes(\"dhx_multi_day\", this).y;\r\n\r\n\t\tvar cSize = {\r\n\t\t\ty: dataY + headY + multY\r\n\t\t};\r\n\r\n\t\tif (format === \"full\") {\r\n\t\t\tcSize.x = dataX;\r\n\t\t} else {\r\n\t\t\tcSize.x = Math.floor( (orientation === \"landscape\" ? sizes[format].y : sizes[format].x) * dpi );\r\n\t\t}\r\n\r\n\t\tif (scales) {\r\n\t\t\tcSize.x *= (parseFloat(scales.x) || 1);\r\n\t\t\tcSize.y *= (parseFloat(scales.y) || 1);\r\n\t\t}\r\n\r\n\t\treturn cSize;\r\n\t};\r\n\r\n\tfunction getTimeline() {\r\n\t\tvar mode = scheduler.getState().mode;\r\n\t\tif (scheduler.matrix && scheduler.matrix[mode]) {\r\n\t\t\treturn scheduler.matrix[mode];\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n\r\n\tfunction getInitialSizes() {\r\n\t\tvar smartRendering = undefined,\r\n\t\t\tscrollable = undefined;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (timeline) {\r\n\t\t\tscrollable = timeline.scrollable;\r\n\t\t\tsmartRendering = timeline.smart_rendering;\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tnav_height: scheduler.xy.nav_height,\r\n\t\t\tscroll_width: scheduler.xy.scroll_width,\r\n\t\t\tstyle_width: scheduler._obj.style.width,\r\n\t\t\tstyle_height: scheduler._obj.style.height,\r\n\t\t\ttimeline_scrollable: scrollable,\r\n\t\t\ttimeline_smart_rendering: smartRendering\r\n\t\t};\r\n\t}\r\n\r\n\tfunction setExportSizes(size, initialSizes) {\r\n\t\tscheduler._obj.style.width = size.x + \"px\";\r\n\t\tscheduler._obj.style.height = size.y + \"px\";\r\n\r\n\t\tscheduler.xy.nav_height = 0;\r\n\t\tscheduler.xy.scroll_width = 0;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (initialSizes.timeline_scrollable || initialSizes.timeline_smart_rendering) {\r\n\r\n\t\t\ttimeline.scrollable = false;\r\n\t\t\ttimeline.smart_rendering = false;\r\n\t\t}\r\n\t}\r\n\r\n\tfunction setInitialSizes(initialSizes) {\r\n\t\tscheduler.xy.scroll_width = initialSizes.scroll_width;\r\n\t\tscheduler.xy.nav_height = initialSizes.nav_height;\r\n\t\tscheduler._obj.style.width = initialSizes.style_width;\r\n\t\tscheduler._obj.style.height = initialSizes.style_height;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (initialSizes.timeline_scrollable || initialSizes.timeline_smart_rendering) {\r\n\t\t\ttimeline.scrollable = initialSizes.timeline_scrollable;\r\n\t\t\ttimeline.smart_rendering = initialSizes.timeline_smart_rendering;\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler._export_html = function (obj) {\r\n\t\tvar initialSizes = getInitialSizes();\r\n\t\tvar size = scheduler._get_export_size(obj.format, obj.orientation, obj.zoom, obj.dpi, obj.header, obj.footer, obj.scales);\r\n\r\n\t\tvar html = \"\";\r\n\t\ttry {\r\n\t\t\tsetExportSizes(size, initialSizes);\r\n\t\t\tscheduler.setCurrentView();\r\n\t\t\thtml = scheduler._obj.innerHTML;\r\n\t\t} catch (e) {\r\n\r\n\t\t\t// eslint-disable-next-line no-console\r\n\t\t\tconsole.error(e);\r\n\t\t} finally {\r\n\t\t\tsetInitialSizes(initialSizes);\r\n\t\t\tscheduler.setCurrentView();\r\n\t\t}\r\n\r\n\t\treturn html;\r\n\t};\r\n\r\n}\r\n\r\nadd_export_methods(scheduler);\r\n\r\n\r\n})();\r\n\r\n}","import active_links from \"./active_links\";\r\nimport agenda_legacy from \"./agenda_legacy_view\";\r\nimport agenda_view from \"./agenda\";\r\nimport all_timed from \"./all_timed\";\r\nimport collision from \"./collision\";\r\nimport container_autoresize from \"./container_autoresize\";\r\nimport cookie from \"./cookie\";\r\nimport daytimeline_restricted from \"./restricted_extensions/daytimeline\";\r\nimport drag_between_restricted from \"./restricted_extensions/drag_between\";\r\nimport editors from \"./editors\";\r\nimport expand from \"./expand\";\r\nimport grid_view from \"./restricted_extensions/grid_view\";\r\nimport html_templates from \"./html_templates\";\r\nimport key_nav from \"./key_nav\";\r\nimport layer from \"./layer\";\r\nimport limit from \"./limit\";\r\nimport map_view from \"./map_view\";\r\nimport minical from \"./minical\";\r\nimport monthheight from \"./monthheight\";\r\nimport multisection_restricted from \"./restricted_extensions/multisection\";\r\nimport multiselect from \"./multiselect\";\r\nimport multisource from \"./multisource\";\r\nimport mvc from \"./mvc\";\r\nimport outerdrag from \"./outerdrag\";\r\nimport pdf from \"./pdf\";\r\nimport quick_info from \"./quick_info\";\r\nimport readonly from \"./readonly\";\r\nimport recurring from \"./recurring\";\r\nimport serialize from \"./serialize\";\r\nimport timeline_restricted from \"./restricted_extensions/timeline\";\r\nimport tooltip from \"./tooltip\";\r\nimport treetimeline_restricted from \"./restricted_extensions/treetimeline\";\r\nimport units_restricted from \"./restricted_extensions/units\";\r\nimport url from \"./url\";\r\nimport week_agenda_restricted from \"./restricted_extensions/week_agenda\";\r\nimport wp from \"./wp\";\r\nimport year_view from \"./year_view\";\r\nimport export_api from \"./export_api\";\r\n\r\nexport default {\r\n\tactive_links,\r\n\tagenda_legacy,\r\n\tagenda_view,\r\n\tall_timed,\r\n\tcollision,\r\n\tcontainer_autoresize,\r\n\tcookie,\r\n\tdaytimeline: daytimeline_restricted,\r\n\tdrag_between: drag_between_restricted,\r\n\teditors,\r\n\texpand,\r\n\texport_api,\r\n\tgrid_view,\r\n\thtml_templates,\r\n\tkey_nav,\r\n\tlayer,\r\n\tlimit,\r\n\tmap_view,\r\n\tminical,\r\n\tmonthheight,\r\n\tmultisection: multisection_restricted,\r\n\tmultiselect,\r\n\tmultisource,\r\n\tmvc,\r\n\touterdrag,\r\n\tpdf,\r\n\tquick_info,\r\n\treadonly,\r\n\trecurring,\r\n\tserialize,\r\n\ttimeline: timeline_restricted,\r\n\ttooltip,\r\n\ttreetimeline: treetimeline_restricted,\r\n\tunits: units_restricted,\r\n\turl,\r\n\tweek_agenda: week_agenda_restricted,\r\n\twp,\r\n\tyear_view\r\n};","import SchedulerFactory from \"./scheduler_factory\";\r\nimport gplExtensions from \"./ext/extensions_gpl\";\r\n\r\nconst factory = new SchedulerFactory(gplExtensions);\r\n\r\nconst scheduler = factory.getSchedulerInstance();\r\nconst Scheduler = {\r\n\tplugin: scheduler.bind(factory.plugin, factory)\r\n};\r\n\r\nwindow.scheduler = scheduler;\r\nwindow.Scheduler = Scheduler;\r\n\r\nif(!window.$dhx) {\r\n\twindow.$dhx = {};\r\n}\r\n\r\nwindow.$dhx.scheduler = scheduler;\r\nwindow.$dhx.Scheduler = Scheduler;\r\n\r\nexport default scheduler;export { scheduler, Scheduler };"],"names":["dhtmlxHook","dhtmlx","attaches","attachScheduler","day","mode","tabs","scheduler","obj","document","createElement","id","this","_genStr","innerHTML","body","appendChild","firstChild","attachObject","vs","av","sched","schedId","setSizes","updateView","destructor","init","_viewRestore","globalScope","window","global","global$1","assert","check","message","config","show_errors","callEvent","type","text","expire","console","log","extend","commonViews","agenda","grid","map","unit","timeline","week_agenda","year","anythingElse","requiredExtensions","limit","_commonErrorMessages","unknownView","view","relatedDoc","relatedExtension","collapsedContainer","div","createTimelineView","Error","createUnitsView","createGridView","addMarkedTimespan","renderCalendar","exportToPNG","join","exportToPDF","attachEvent","dhtmlxError","catchError","a","b","c","responseText","ajax_error","alert","className","element","classes","split","forEach","cssClass","classList","add","itemTypes","rows_container","row","setAttribute","fix_tab_position","$firstTab","$lastTab","$segmentedTab","date","button","builtInButton","spacer","minicalendarButton","minicalendarDiv","click","$_eventAttached","event","isCalendarVisible","destroyCalendar","position","getState","navigation","handler","calendar","setCurrentView","html_element","findRenderer","renderer","rows","cols","renderElement","css","width","value","style","height","html","align","justifyContent","prepareConfig","renderLayout","fragment","createDocumentFragment","items","Array","isArray","i","length","next","_init_nav_bar","navBar","$container","querySelector","_update_nav_bar","previousHeight","container","heightChanged","configChanged","newHeight","xy","nav_height","unset_actions","_els","get_elements","set_actions","display","isAttachedNode","root","parentNode","getWindowSize","w","innerWidth","documentElement","clientWidth","h","innerHeight","clientHeight","equals","listenWindowResize","oldSize","resizeDelay","clearTimeout","setTimeout","$destroyed","newSize","triggerSchedulerResize","$root","watchNodeResize","offsetHeight","previousWidth","offsetWidth","lowlevelResizeWatcher","addResizeListener","containerStyles","getComputedStyle","getPropertyValue","resizeWatcher","tabIndex","wai_aria_attributes","salesforce_environment","contentWindow","removeChild","EventHost","constructor","_silent_mode","listeners","createEventStorage","handlers","index","eventStorage","combinedResult","handlerResult","apply","arguments","addEvent","settings","handlerId","once","originalHandler","removeEvent","clear","makeEventable","eventHost","eventName","toLowerCase","thisObject","bind","innerId","attachAll","callback","name","eventArguments","handlerName","concat","checkEvent","detachEvent","list","eventId","detachAllEvents","eventable","nav_bar","_detachDomEvent","el","removeEventListener","_init_once","scheduler_resize_listener","layout","navbar","render","header","dataArea","hasSchedulerMarkup","createDefaultHeader","views","nav","matrix","push","_props","_grid","names","optionalViews","viewName","_currentDate","_obj","getElementById","error","wai_aria_application_role","JSON","stringify","rtl","_skin_init","_scroll","init_templates","_init_touch_events","set_sizes","$initialized","min_event_height","bar_height","scale_width","scroll_width","scale_height","month_scale_height","menu_width","margin_top","margin_left","editor_width","month_head_height","event_header_height","keys","edit_save","edit_cancel","functor","object","_x","scale_x","_table_view","materialScalePlaceholder","_is_material_skin","insertBefore","set_xy","offsetTop","_lightbox","_setLbPosition","_data_width","left","right","node","x","y","prepareValue","val","prepared","isNaN","Number","Math","max","direction","undefined","top","els","getElementsByTagName","class_name","_getClassName","attr_value","getAttribute","label","locale","labels","_waiAria","labelAttr","domEventsScope","_createDomEventScope","detachAll","_click","attach","e","preventDefault","_temp_touch_block","_on_mouse_move","_ignore_next_click","_on_mouse_down","_on_mouse_up","_on_dbl_click","ev","src","target","srcElement","returnValue","_locate_event","select","_select_id","_close_not_saved","editStop","unselect","updateEvent","t","getEvent","_mode","Date","_date","min_date","_min_date","max_date","_max_date","editor_id","_edit_id","lightbox_id","_lightbox_id","new_event","_new_event","select_id","expanded","drag_id","_drag_id","drag_mode","_drag_mode","dhx_cal_data","cancelBubble","trg","getActionData","readonly","icon","closest","mask","indexOf","buttons","replace","valueOf","dhx_cal_prev_button","dhx_cal_next_button","dummy","step","def_step","dhx_cal_today_button","dhx_cal_tab","deprecated_name","substring","search","delete","confirm_deleting","_dhtmlx_confirm","title","title_confirm_deleting","deleteEvent","ok","icon_delete","edit","save","details","showLightbox","form","cancel","opts","result","confirm","addEventNow","start","end","base","_isObject","_isDate","d","event_duration","time_step","start_date","round","start_hour","first_hour","getHours","setHours","end_date","setTime","uid","_loading","_drag_event","dblclick_create","details_on_dblclick","_timed","call","_get_column_index","x_pos","column","_cols","_ignores","floor","_week_indexes_from_pos","pos","min","ceil","hour_size_px","_mouse_coords","$env","isIE","pageX","pageY","clientX","scrollLeft","clientLeft","clientY","scrollTop","clientTop","_colsS","$domHelpers","getAbsoluteLeft","getAbsoluteTop","dy","heights","_ignores_detected","preserve_length","_event_length","_get_real_event_length","x_step","x_unit","timestamp","confirm_closing","title_confirm_closing","positive_closing","_drag_pos","_correct_shift","back","getTimezoneOffset","_is_pos_changed","old_pos","new_pos","diff","old_val","new_val","acc","abs","delay","d_pos","has_moved","_correct_drag_start_date","len","_start_correction","_end_correction","last_hour","getMinutes","_get_fictional_event_length","_correct_drag_end_date","duration","mousedownPos","_get_date_from_pos","_drag_start","res","fields","timeStep","custom","time_part","_dragEventBody","_move_event_shift","resize_date","_drag_from_start","date_part","resize_from_start","end_day_start","end_day_date","firstHour","lastHour","maxY","precisePos","minDate","maxDate","preciseDate","cursor","shift","new_end","new_start","limit_drag_out","all_timed","_get_section_view","_get_event_sday","getView","getDate","_allow_dnd","update_render","sx","update_view","for_rendered","r","classname","drag_event_body","fullClass","_lame_clone","_get_private_properties","_clear_temporary_properties","clean","flagged_event","initial","current_state","_mobile","moved","_dhx_changed","is_new","_lame_copy","edit_on_create","details_on_create","isOneDayEvent","render_view_data","_trigger_dyn_loading","_load_mode","_load","_render_wait","_reset_ignores","_reset_scale","isViewExists","templates","_set_aria_buttons_attrs","buttonGroups","group","j","prev","headerButtonsAttributes","icon_form","icon_edit","oldClass","newClass","dhx_multi_day","prev_scroll","preserve_scroll","multidayScroll","_dy_shift","tab","headerToggleState","remove","_render_x_header","offset_top","head","left_border","columnHeaderText","dayHeaderAttr","_get_columns_num","from","to","count","count_n","_get_timeunit_start","_get_view_end","dd","ed","_calc_scale_sizes","summ","_process_ignores","realcount","_set_scale_col_size","_render_scales","data_area","sd","today","parseInt","scales","cls","firstHalf","slotDate","getFullYear","getMonth","format_date","htmlContent","time_slot_text","time_slot_class","secondHalf","week_date_class","dayColumnAttr","day_start","_getNavDateElement","str","drag_resize","drag_move","_scales","week_start","navBarDateStr","scaleElement","navBarDateAttr","_reset_month_scale","_reset_hours_scale","multi_day","c1","visibility","totalWidth","col_length","offset","hiddenWidth","c2","cloneNode","cc","content","hour_scale","hourScaleAttr","scroll_hour","now_date","n","preserve","ignore","ign_date","_render_month_scale","view_start","cd","tdwidths","cell_width","getCellHeight","cellheight","table","cell","month_date_class","body_class","head_class","monthCellAttr","cellHead","month_day","cellBody","bf1","cells","querySelectorAll","parse_date","getLabel","property","key","sections","lightbox","map_to","options","updateCollection","list_name","collection","serverList","splice","resetLightbox","hideCover","cache","Object","create","String","Boolean","prototype","hasOwnProperty","source","n_ev","section","_focus","focus","getDaysDifference","startDate","endDate","differenceInTime","getTime","differenceInDays","eventLength","startColumnIndex","endColumnIndex","_get_date_index","last_column","excludedDuration","intervalStart","intervalEnd","leftCellCutOffStart","leftCellCutOffEnd","rightCellCutOffStart","rightCellCutOffEnd","ev_length","dir","per_day","days","fd","start_slot","end_slot","_get_section_property","y_property","_is_initialized","state","_is_lightbox_open","defaultDomEvents","addEventListener","eventRemove","createEventScope","domEvents","eventScope","capture","detach","staticArray","slice","_eventRemoveAll","_trim","func","trim","htmlTags","RegExp","extraSpaces","stripHTMLLite","htmlText","singleQuotes","escapeQuotes","getAttributeString","attr","attributes","setAttributes","values","day_date","role","isActive","getHeaderCellAttr","dateString","eventAttr","_eventCommonAttr","event_text","$dataprocessor_class","setEventBarAttr","_getAttributes","attributeSetter","arg","eventBarAttrString","agendaHeadAttrString","agendaHeadDateString","agendaHeadDescriptionString","agendaDataAttrString","agendaEventAttrString","attrs","agendaDetailsBtnString","icon_details","gridAttrString","gridRowAttrString","gridCellAttrString","mapAttrString","mapRowAttrString","mapDetailsBtnString","minicalHeader","headerId","minicalGrid","minicalRow","minicalDayCell","selected","minicalHeadCell","weekAgendaDayCell","weekAgendaEvent","lightboxHiddenAttr","lightboxVisibleAttr","lightboxSectionButtonAttrString","tabindex","yearHeader","yearGrid","yearHeadCell","yearRow","yearDayCell","lightboxAttr","lightboxButtonAttrString","buttonName","eventMenuAttrString","iconName","lightboxHeader","headerText","lightboxSelectAttrString","time_option","month","hour","minute","messageButtonAttrString","buttonLabel","messageInfoAttr","messageModalAttr","quickInfoAttr","quickInfoHeaderAttrString","quickInfoHeader","quickInfoButtonAttrString","tooltipAttr","tooltipVisibleAttr","tooltipHiddenAttr","isDisabled","payload","uidSeed","now","pop","isStringObject","Function","toString","isNumberObject","isBooleanObject","isDate","defined","timeout","timer","$cancelTimeout","$pending","args","$execute","utils","mixin","force","f","copy","varType","elementPosition","elem","bottom","getBoundingClientRect","box","docElem","pageYOffset","pageXOffset","offsetLeft","offsetParent","getRelativeEventPosition","getNodePosition","getClassName","baseVal","getTargetNode","tagName","shadowRoot","composedPath","locateCss","strict","ind","charAt","isVisible","currentStyle","hiddenSection","recurringSection","hasNonNegativeTabIndex","hasHref","canHaveHref","area","nodeName","loLowerCase","isEnabled","canDisable","input","textarea","hasAttribute","getFocusableNodes","nodes","nodesArray","$position","sort","isValid","isShadowDomSupported","createShadowRoot","attachShadow","getActiveElement","activeElement","getSelection","focusNode","getRootNode","ShadowRoot","host","hasShadowParent","dom_helpers","htmlObject","getOffset","getOffsetSum","getOffsetRect","test","navigator","userAgent","dummyBox","selector","insertAfter","newNode","referenceNode","nextSibling","isChildOf","child","parent","contains","Element","matches","msMatchesSelector","webkitMatchesSelector","parentElement","nodeType","isWindowAwailable","env","isIE6","XMLHttpRequest","isIE7","isIE8","isOpera","isChrome","isKHTML","isFF","isIPad","isEdge","isNode","clearAll","_dp","serialize$1","data","serialized","encodeURIComponent","Promise","createConfig","method","url","async","headers","serialize","ajax","serializeRequestParams","parse","DOMParser","parseFromString","ActiveXObject","loadXML","xmltop","tagname","xhr","status","xml","responseXML","xpath","xpathExp","docObj","selectNodes","first","col","ownerDocument","evaluate","XPathResult","ANY_TYPE","iterateNext","query","_call","get","onLoad","getSync","put","postData","del","post","postSync","resolve","reject","isQt","match","readyState","xmlDoc","filePath","open","setRequestHeader","toUpperCase","send","urlSeparator","$ajax","generateStringToDate","format","utc","splt","code","csp_date_to_str","to_fixed","getUTCDate","getUTCMonth","getUTCFullYear","day_short","getUTCDay","getDay","day_full","month_short","month_full","getUTCHours","getUTCMinutes","getUTCSeconds","getSeconds","getUTCISOWeek","getISOWeek","csp_str_to_date","set","temp","month_short_hash","month_full_hash","UTC","canUseCsp","useCsp","csp","s","_bind_host_object","old","setMinutes","setSeconds","setMilliseconds","start_on_monday","month_start","setDate","year_start","setMonth","_add_days","inc","ndate","datesDiff","rest","hours","setYear","num","date_to_str","str_to_date","exactFormat","stringToDateMethod","parseExactFormat","yyyyMMddhhIIss","MMddyyyyhhIIss","ddMMyyyyhhIIss","ISO8601","isYMDDate","datestr","isMDYDate","isDMYDate","isISO8601","parseYMD","parseMDY","parseDMY","parse_exact_format","nday","first_thursday","year_number","ordinal_date","week_number","convert_to_utc","default_date","month_date","load_date","week_date","hour_date","date_format","api_date","displayed_event_color","displayed_event_text_color","wide_form","day_column_padding","use_select_menu_space","drag_create","resize_month_events","resize_month_timed","responsive_lightbox","separate_short_events","cascade_event_display","cascade_event_count","cascade_event_margin","multi_day_height_limit","drag_lightbox","server_utc","touch","touch_tip","touch_drag","touch_swipe_dates","quick_info_detached","drag_highlight","icons_edit","icons_select","buttons_left","buttons_right","highlight_displayed_event","delay_render","timeline_swap_resize","event_attribute","$initial","_helpers","parseDate","xml_date","formatDate","xml_format","d1","d2","day_scale_date","month_scale_date","week_scale_date","time_picker","event_date","load_format","event_header","event_class","event_bar_date","event_bar_text","month_events_link","drag_marker_class","drag_marker_content","tooltip_date_format","tooltip_text","calendar_month","calendar_scale_date","calendar_date","calendar_time","_events","_loaded","clear_view","extra_data","event_updated","silent","setEvent","hash","_rendered","changeEventId","new_id","create_getter","create_setter","_changed","is_visible_events","clear_event","in_visible_range","evFirstHour","evLastHour","end_dates_visible","hidden_duration","checkEndDate","get_visible_events","only_timed","stack","filter_event","filter","_is_main_area_event","evs","hold","full","_not_render","_recalculate_timed","tvs","tvd","_rendered_location","render_data","buffer","renderedLocation","_view_month_day","_render_month_link","toRender","_sday","_eday","curr","_sweek","getEvents","_get_event_bar_pos","widt","x2","_pre_render_events","containers","render_event_bar","max_evs","max_month_events","_sorder","locate_holder","real","render_event","_get_first_visible_cell","hb","h_old","_pre_render_events_line","_pre_render_events_table","monthRows","cellHeight","cHeight","unshift","scrollHeight","scroll_fix","scale_settings","sum_width","row_heights","full_multi_day_height","used_multi_day_height","used_multi_day_height_css","multi_day_section","multi_day_icon","overflowY","datePart","_get_event_mapped_end_date","ev_duration","_min_mapped_duration","evs_originals","sh","eh","_inner","t_ev","t_end_date","slot_index","sorderSet","_is_sorder","k","_max_sorder","max_count","_count","_copy_event","_time_order","_is_any_multiday_cell_visible","isAnyCellVisible","checkDate","noCells","lastDayEnd","cellIndex","locate_holder_day","weekCellIndex","out","weeks","chunks_info","first_chunk","last_chunk","chunk_info","locate_s","locate_e","_length","stack_line","_first_chunk","_last_chunk","_copy_dummy","_y_from_date","sm","_calc_event_y","min_height","em","parentWidth","menu","menu_offset","pos_y","ev_count","ev_sorder","margin","_render_v_bar","_text_style","parentPosition","zIndex","color","setProperty","tplClass","cssText","_editor","shiftKey","keyCode","icons","icons_str","ariaAttr","currentIcon","textColor","highlightEventPosition","contentA","contentB","cs","cse","boxWidth","renderEvent","inner_html","footer_class","_drag_resize","childNodes","past","_get_dnd_order","order","ev_height","max_height","_orig_sorder","evTop","columns","y_event_offset","resize_handle","resizable","left_chunk","right_chunk","resize_left","resize_right","timed","bg_color","style_text","_edit_stop_event","getRenderedEvent","rendered_events","rendered_event","showEvent","original_color","original_text_color","restoreOriginalColors","section_delimiter","getSectionTop","posFromDate","dx","_smartRenderingEnabled","scrollTo","_append_drag_marker","m","zone","scale","lastChild","previousSibling","_update_marker_position","size","_parsers","canParse","topElement","loader","csrfToken","security_key","arr","itms","itm","nodeValue","ud","udx","_xmlNodeToJSON","_userdata","_init_event","json","err","events","dhx_security","collections","collections_loaded","option","option_key","ical","c_start","c_end","incoming","event_r","e_start","e_end","exec","param","param_r","parse_param","substr","dh","dm","utcMark","dn","getSerializator","_load_url","prevent_cache","ajaxCallback","response","on_load","lf","cache_line","temp_to","xmlLoaded","jsonLoader","iCalLoader","foundParser","parser","_process","_process_loading","_after_call","_tagvalue","_init_date","getSerializableData","createSerializator","dataset","allEvents","exportedEvent","exportValue","rawValue","load","setLoadMode","array","show_loading","_y","_lightbox_controls","formSection","getLightbox","getValue","form_blocks","get_value","setValue","set_value","get_template_control","control","get_select_control","get_textarea_control","get_time_control","defaults","template","time","sns","_get_input","_dhx_onchange","onchange","time_format","_time_format_order","cfg","dt","last","limit_time_select","p","selectBoxClass","range","start_year","end_year","year_range","tdate","_time_values","ariaAttrs","full_day","_full_day","checked","disabled","_fill_lightbox_select","auto_end_date","_update_lightbox_select","time_values","direct_value","fixed_value","value_found","t_v","selectedIndex","original","getLightboxRoot","cspEnvironment","salesforceEnvironment","showCover","show_cover","_cover","_fill_lightbox","lightbox_header","headerContent","headerDate","headerTitle","current_sns","_get_lightbox_section_node","block","default_value","_lightbox_out","_empty_lightbox","hide_lightbox","endLightbox","hide_cover","_move_while_dnd","_finish_dnd","save_lightbox","startLightbox","_custom_lightbox","_temp_lightbox","cancel_lightbox","hideLightbox","_init_lightbox_events","buttonTarget","sectionButton","button_click","action","readonly_active","setLightboxSize","_init_dnd_events","_dnd_start_lb","dhx_unselectable","lb","_lb_start","_ready_to_dnd","recurring","_lightbox_template","label_name","ds","t_ds","_bindLightboxLabels","labelBlock","inputBlock","fallback","inputId","old_id","mobile","MSStream","platform","maxTouchPoints","touchEventsSupported","createEvent","_touch_events","touches","PointerEvent","pointerEnabled","pointerType","msPointerEnabled","MSPOINTER_TYPE_MOUSE","accessor","tracker","scroll_mode","action_mode","dblclicktime","attachTouchEvent","passive","check_direction_swipe","s_ev","e_ev","max_dy","scrollable","doMouseMove","dnd","original_render","_update_global_tip","drag_cancel","_pointerDragId","pointerId","fake_event","_block_next_stop","actTask","fakeTask","sourceTask","_show_global_tip","_hide_global_tip","toptip","_global_tip","drag_to_create","drag_to_move","getRootView","tag","hooks","didInsert","cmp","_addThemeClass","skin","_skin_settings","_skin_xy","lightbox_additional_height","checkIfMaterialSkin","themeNameFromFile","links","href","_build_skin_info","monitorThemeChange","styles","themeVar","isCssVarTheme","themeName","cssValues","oldMaterialTheme","_theme_info","theme","cssVarTheme","themeVariables","calculatedMaterial","probe","cachedBorderBoxValue","checkIfBorderBoxStyling","boxSizing","refreshAfterLoad","_border_box_events","oldStyling","newStyling","_configure","setSkin","flatSkinHourScale","monitorIntervalId","clearInterval","setInterval","csstheme","_old_month_day","old_month_day","reorderTabs","specialTabs","tabName","find","firstTab","reverse","jQuery","$","counter","methods","fn","dhx_scheduler","each","Scheduler","getSchedulerInstance","comp","update_view_timer","curr_view_timer","lazy_setCurrentView","self","oldDate","oldMode","updateFlags","lazy_updateView","ars","DataProcessorEvents","dp","$scheduler","$dp","_dataProcessorHandlers","_validId","setUpdated","z","_in_progress","_invalid","updatedRows","_waitMode","_update_callback","upd","setUserData","action_param","_add_rec_marker","extendScheduler","_is_virtual_event","getUserData","_set_event_text_style","rec_type","rec_pattern","_dp_change_event_id","_dp_hook_delete","setDp","DataProcessor","serverProcessorURL","serverProcessor","autoUpdate","updateMode","_tMode","_headers","_payload","post_delim","messages","updated","inserted","deleted","invalid","invalid_cell","enableUTFencoding","setTransactionMode","total","_tSend","_endnm","_serializeAsJson","_router","router","escape","_utf","setDataColumns","_columns","getSyncState","enableDataNames","enablePartialDataSend","setUpdateMode","master","rowId","findRow","existing","set_invalid","is_invalid","markRow","sendData","_methods","getActionByState","checkBeforeUpdate","sendAllData","_beforeSendData","_getRowData","_sendData","_serializeAsJSON","serialize_one","pref","_applyPayload","dataToSend","_onResolvedCreateUpdate","resultState","sid","tid","afterUpdateCallback","routerMode","actionPromise","update","then","catch","queryParams","ids","afterUpdate","urlParams","_user","_cleanupArgumentsBeforeSend","preprocessedData","_cleanupItemBeforeSend","valid","_forEachUpdatedRow","_getAllData","has_one","pattern","defineAction","_uActions","btag","marker","correct","originalSid","_errorResponse","cleanUpdate","_setDefaultTransactionMode","_serverProcessor","that","finalizeUpdate","atag","_initialized","_dp_init","dataProcessorEvents","_dataprocessor","setOnAfterUpdate","setOnBeforeUpdateHandler","setAutoUpdate","interval","user","_need_update","_update_busy","xml_node","afterAutoUpdate","fullSync","intervalId","loadUpdate","getUpdates","_getXmlNodeValue","version","vers","updates","processedData","updatedItem","output","_prepareDataItem","item","processedItem","dataItem","createDataProcessor","tMode","batchUpdate","boxAttribute","_dhx_msg_cfg","usercall","modalBox","hide","modal_key","which","messageBox","keyboard","domHelpers","modality","cover","classValue","buttonAriaAttrs","buttonCss","info","timers","pull","getFirstDefined","_boxStructure","contentId","inner","message_ok","message_cancel","btn","_createBox","hidden","alertPopup","confirmPopup","boxPopup","box_params","params","alertBox","confirmBox","focusable","subtype","seed","hideAll","popups","modalbox","ar","day_tab","week_tab","month_tab","icon_save","icon_cancel","section_description","section_time","confirm_recurring","section_recurring","button_recurring","button_recurring_open","button_edit_series","button_edit_occurrence","grid_tab","be","agenda_tab","description","year_tab","week_agenda_tab","repeat_radio_day","repeat_radio_week","repeat_radio_month","repeat_radio_year","repeat_radio_day_type","repeat_text_day_count","repeat_radio_day_type2","repeat_week","repeat_text_week_count","repeat_radio_month_type","repeat_radio_month_start","repeat_text_month_day","repeat_text_month_count","repeat_text_month_count2_before","repeat_text_month_count2_after","repeat_year_label","select_year_day2","repeat_text_year_day","select_year_month","repeat_radio_end","repeat_text_occurences_count","repeat_radio_end2","repeat_radio_end3","month_for_recurring","day_for_recurring","ca","cn","da","de","en","es","fi","fr","he","hu","it","jp","LocaleManager","_locales","nb","nl","no","pl","pt","ro","ru","si","sk","sv","tr","ua","i18nFactory","DatePicker","modes","currentRange","eventDates","currentModeIndex","onStateChangeHandlers","_domEvents","onStateChange","oldState","newState","_notifyStateChange","newDate","setFullYear","setState","_toggleMode","newIndex","backwardArrow","monthLabel","innerText","toLocaleString","startYear","forwardArrow","_adjustDate","_renderCalendarHeader","dataContainer","_renderDayGrid","_renderMonthGrid","_renderYearGrid","daysOfWeekContainer","currentDate","labelFormat","dayElement","currWeek","minWeeks","minSchedulerDate","maxSchedulerDate","eventDaysTable","reduce","dayStart","_renderDayGridHeader","firstDate","monthStart","monthEnd","lastDate","_weeksBetween","currDate","dayGridContainer","dateCell","wrapper","months","formatLabel","monthElement","doneArea","doneBtn","yearElement","factoryMethod","extensionManager","common_errors","common","schedulerCore","wai_aria","dom","_createDatePicker","_getFocusableNodes","_locate_css","messageApi","event_highlight","dhtmlx_suite_hooks","skins","jquery","dataProcessorExtend","connector","i18n","addLocale","setLocale","localeObject","getLocale","dhx_save_btn","dhx_cancel_btn","dhx_delete_btn","ext","activePlugins","plugins","extensionList","getExtensionList","treetimeline","daytimeline","outerdrag","legacy","plugin","getExtension","dependencies","priorities","extension","dep","dependencyName","orderA","orderB","ExtensionsManager","_extensions","SchedulerFactory","extensions","_seed","_schedulerPlugins","_bundledExtensions","_extensionsManager","initConfig","_internal_id","$syncFactory","_initFromConfig","calendars","addCalendar","active_links","active_link_view","_active_link_click","s_d","do_wrapper","fullname","week_x","d_s","agenda_legacy","add_agenda_legacy","agenda_legacy_time","agenda_legacy_text","agenda_legacy_date","agenda_legacy_start","old_dblclick_dhx_cal_data","dblclick_dhx_cal_data","fill_agenda_tab","old_render_view_data","_agendaScrollTop","set_full_view","l","rowAttr","dateHeader","descriptionHeader","tableAttr","ev_class","agendaDetailsButtonAttr","agenda_time","agenda_text","agenda_area","v_border","dateElement","agenda_date","agenda_legacy_view","agenda_start","agenda_end","agenda_view","add_agenda","dayDateToStr","dayDowToStr","agenda_day","eventsInDays","anyEvents","eventStart","renderEmptyView","renderDay","calendarEvent","renderOneEvent","dates","selectedId","bg","all_timed_month","is_event_short","_safe_copy","proto","event_pid","isPrototypeOf","event_length","old_prerender_events_line","old_prerender_events_table","prerender_events","ce","_virtual","isOvernightEvent","getNextDay","setDateTime","event_changed","re","redraw","next_day","old_get_visible_events","old_mode","old_date","oldUpdate","fullRedrawNeeded","collision","temp_section","before","collision_limit","_setTempSection","event_id","checked_mode","checkCollision","edited_ev","_roll_back_dates","_check_sections_collision","second","evs_dates","getRecDates","tevs","concurrent","single","container_autoresize","month_day_min_height","min_grid_size","min_map_size","old_pre_render_event","active","total_height","multiday_height","evl","_h_fix","navHeight","headerHeight","checked_divs","updateContainterHeight","is_repaint","checked_div","maxHeight","rows_length","year_y","week_agenda_scale_height","cur_height","eventsContainer","g","_gridView","y_unit","getSectionHeight","scrollWidth","getScrollSize","callUpdate","conditionalUpdateContainerHeight","asyncRepaint","requestAnimationFrame","autosizeEnabled","$original_scroll_width","$original_section_autoheight","section_autoheight","cookie","setCookie","cookie_param","getCookie","getCookieName","_get_url_nav","urlNavigationPlugin","schedulerCookie","unescape","newMode","old_load","notImplemented","daytimeline_restricted","drag_between_restricted","editors","cached_options","resetCombo","_combo","DOMParent","combo","unload","DOMelem","dhx_globalImgPath","image_path","dhtmlXCombo","options_height","setOptionHeight","enableFilteringMode","filtering","script_path","all_options","single_option","addOption","getIndexByValue","selectOption","selected_id","disable","setComboValue","getSelectedValue","getSelectedText","vertical","radiobuttons","checked_value","isChecked","check_html","label_html","checkbox","unchecked_value","expand","fullscreen","toggleIcon","_position","_width","_height","_overflow","overflow","_maximize","collapse","directions","prev_margin","grid_view","html_templates","all","keyboard_shortcuts","$keyboardNavigation","shortcuts","createCommand","modifiers","alt","ctrl","meta","shortcut","commands","expr","getExpressions","words","getWords","command","commandKeys","specialKeys","charCodeAt","getCommandFromEvent","domEvent","altKey","ctrlKey","metaKey","printableKey","fromCharCode","getHashFromEvent","getHash","parts","junctionChar","term","combinationChar","backspace","enter","esc","space","up","down","home","pageup","pagedown","insert","plus","f1","f2","f3","f4","f5","f6","f7","f8","f9","f10","f11","f12","eventhandler","EventHandler","_handlers","findHandler","doAction","unbind","bindAll","initKeys","trap_modal_focus","trapFocus","currentFocus","currentIndex","nextIndex","nextItem","divs","renderMultiple","currentStart","currentEnd","TimeSlot","_modes","_getMode","units","renderVerticalMarker","renderTimelineMarker","renderYearMarker","renderMonthMarker","weekAgenda","renderWeekAgendaMarker","renderAgendaMarker","dayColumns","addWaiAriaLabel","addDataAttributes","dateToStr","dateTimeLabel","sectionObject","markerDate","_wrapDiv","_get_year_cell","opacity","view_opts","areas","round_position","blocks","_trace_x","_is_column_visible","start_pos","end_pos","set_date_part","_timeline_getX","tempStart","tempEnd","_section_height","_isRender","renderMonthCell","weekNumber","dayIndex","datatable","inner_index","all_hours_height","hour_ms","lineHeight","scheduler_node","SchedulerNode","_compose","getDefaultNode","getMode","blur","enable","removeAttribute","_compareEvents","_pickEvent","startId","eventElement","Event","getNode","nextEventHandler","activeNode","dispatcher","nextEvent","currEvent","visibleDates","nextEv","setActiveNode","prevEventHandler","HeaderCell","getNodes","_key_nav_copy_paste","nav_node","KeyNavNode","moveTo","compareTo","canStringifyThis","canStringifyThat","header_cell","defaultCell","_getSection","_getNodes","eventNode","defaultElement","isScrolledIntoView","eventBox","viewPort","idSelector","inlineEditor","getInlineEditor","isMultisectionEvent","keepScrollPosition","_moveToSlot","slot","nextSlot","time_slot","movingDate","getDefaultDate","key_nav_step","_getDefaultSection","visibleTime","nowTime","showNowTime","findVisibleColumn","clone","timeslot","_getMultisectionView","_getNextSection","sectionId","isInRange","defaultSlot","DataArea","smart_rendering","_pasteDate","_pasteSection","addMonthDate","nextMonthSlot","_alignTimeSlot","nextTimelineSlot","newPos","nextUnitsSlot","optionsCount","nextDaySlot","_moveDate","isBeforeLastHour","isStartDate","minutes","isAfterFirstHour","isInVisibleDayTime","oldStart","toNextDay","testEnd","nextWeekAgendaSlot","nextAgendaSlot","isDateVisible","nextDateColumn","current","tempSlot","extendSlot","extendUnitsSlot","extendTimelineSlot","extendMonthSlot","extendDaySlot","extendWeekAgendaSlot","extendGenericSlot","allowedDirections","moveDate","newDates","extendSlotDates","oldSlot","newSlot","dateDirection","scrollSlot","minical_button","MinicalButton","globalNode","MinicalCell","minical_cell","_getGrid","_getNode","enabled","newRow","newCol","modals","modalsStack","isModal","afterPopup","startModal","endModal","isTopModal","currentTarget","traceLightbox","_keyNavMessagePopup","focusElement","backupFocus","core","getActiveNode","setDefaultNode","focusGlobalNode","blurNode","editor","keyDownHandler","defaultPrevented","schedulerNode","_timeout","key_nav_legacy","_temp_key_scope","key_nav","isCopy","trackMousePosition","mousePointer","keyNavPointer","elementFromPoint","clear_event_after","copyEvent","_make_pasted_event","multisection","_do_paste","is_copy","modified_ev","original_ev","_is_key_nav_active","getSelectedEvent","_buffer_event","new_ev","scheduler_handlers","attachSchedulerHandlers","focusHandler","waitCall","reFocusActiveNode","mousedownHandler","dataAreaClick","focusEvent","evNode","prevState","lastStart","lastEnd","lastSection","minical_handlers","_minicalendars","isMinical","minicalendars","patchMinicalendar","focusMinical","minicalClick","rowIndex","td","renderMinical","cal","added","destroyMinical","_def_count","addShortcut","scope","scopeObject","getScope","getShortcutHandler","removeShortcut","disp","scopes","minicalButton","minicalDate","timeSlot","searchMap","attachOnce","isSchedulerSelected","changeState","layer","layers","validId","_clearUpdateFlag","_cloneObj","_dataprocessors","_layers_zindex","initial_layer_zindex","isDefault","defaultLayer","showLayer","tlayer","toggleLayer","hideLayer","visible","getLayer","layer_name","native_event_object","noMenu","_evs_layer","_t_render_view_data","evs_layer","borderBox","borderBoxWidth","headerWidth","bodyWidth","footerWidth","bodyHeight","new_zIndex","filter_agenda","limit_start","limit_end","limit_view","check_limits","mark_now","display_marked_timespans","overwrite_marked_timespans","_temp_limit_scope","dhx_time_block","default_timespan_type","fix_options","zones","get_resulting_options","blockTime","unblockTime","deleteMarkedTimespan","om","od","nm","nd","isBlocked","date_end","resetDate","checkInMarkedTimespan","timespan_type","on_overlap","temp_start_date","temp_end_date","timespans","_marked_timespans","day_value","day_index","getZones","_get_zone_minutes","eventEnd","markerStart","markerEnd","blocker","checkLimitViolation","complete_res","allow","_get_blocked_zones","timeline_zones","blocked_timeline_zones","_get_relevant_blocked_zones","_add_timespan_zones","resultZones","view_config","linker","is_new_event","data_copy","native_object","_mark_now","_mark_now_timer","dhx_now_time","_remove_mark_now","_append_mark_now","zone_start","start_index","end_index","units_l","r_divs","t_day","t_div","_render_marked_timespan","_prepare_timespan_options","r_configs","temp_configs","t_days","cloned_config","invert_zones","invertZones","view_key","t_config","c_config","t_sd","t_ed","zone_end","_get_dates_by_index","start_day","delta","t_date","_get_css_classes_by_config","css_classes","_get_block_by_config","date_to_display","min_day","sday","block_proto","_mark_timespans","_on_scale_add_marker","markTimespan","configuration","rebuild_els","timespans_ids","_marked_timespans_ids","timespan_types","_marked_timespans_types","unmarkTimespan","_addMarkerTimespanConfig","unit_id","timespans_view","day_configs","_array","configs","current_zones","resulting_zones","c_zone_start","c_zone_end","isLast","_subtract_timespan_zones","is_modified","_delete_marked_timespan_by_id","parent_array","_delete_marked_timespan_by_config","viewspans","_delete_marked_timespans_list","dayConfig","day_timespans","d_t","related_zones","types","typedConfig","_get_types_to_render","specific","types_to_render","_get_configs_to_render","_get_unit_index","day_ind","unitsPerDay","unit_zones","unit_types","global_data","day_types","dblclick_dhx_marked_timespan","map_view","mapView","geocoder","points","markers","infoWindow","createMarker","google","maps","Marker","map_date_width","map_icon_width","map_description_width","map_resolve_event_location","map_resolve_user_location","map_initial_position","LatLng","map_error_position","map_infowindow_max_width","map_type","MapTypeId","ROADMAP","map_zoom_after_resolve","marker_geo_success","marker_geo_fail","marker_date","marker_text","event_location","dblclick_dhx_map_area","map_time","map_text","map_start","add_map","map_date","_latLngUpdate","_isMapPositionSet","gmap","dhx_gmap","_setMapSize","mapOptions","zoom","map_initial_zoom","center","mapTypeId","Map","disableDefaultUI","disableDoubleClickZoom","addListener","point","latLng","geocode","results","GeocoderStatus","OK","geometry","location","lat","lng","formatted_address","infoWindowOptions","maxWidth","_points","_markers","_infowindow","InfoWindow","_infowindows_content","_initialization_count","Geocoder","geolocation","getCurrentPosition","_userLocation","coords","latitude","longitude","setCenter","setZoom","setContent","getCenter","setPosition","getZoom","fill_map_tab","showAddress","clear_map_tab","_selected_event_id","close","setMap","ariaButtonAttr","elem_id","marginRight","marginLeft","marginTop","temp_center","map_end","trigger","selectEvent","performClick","_displayEventOnMap","address","language","_updateEventLocation","_delay","ret","old_event_id","new_event_id","_event_resolve_delay","minical","minicalDomEvents","minicalendar","mark_events","_synced_minicalendars","_prev","is_refresh","cont","tpos","_get_def_cont","_render_calendar","$dom","cellRoot","dateAttribute","unmarkCalendar","markCalendar","_last_date","conf","markedDates","_markCalendarCurrentDate","sync","_on_xle_handler","refreshOnLoad","updateCalendar","_created","_locateCalendar","weekNum","dat","dayCell","_week_template","week_template","dummy_date","_mini_cal_arrows","previous","ts","temp2","temp3","temp4","temp5","temp6","temp7","temp8","padding","weekHeader","move_minicalendar_date","css_classnames","css_texts","diffs","arrow","dayHeaders","dayCells","inputs","selects","inp","number","new_date","_update_minical_select","isFulldayEvent","_attach_action","_round_minutes","linkCalendar","datediff","dateNew","month_end","noHighlight","monthheight","old_s","multisection_restricted","multiselect","parseXMLOptions","parseJSONOptions","_result","_children","_mark_inputs","_ids","delimiter","script_url","divLoading","multisource","backup","mvc","use_id","sanitize","update_timer","_start_ext_load","_finish_ext_load","_get_id","model","cid","backbone","toJSON","changes","queue","add_from_queue","Backbone","Collection","dragger","dhtmlDragAndDropObject","stopDrag","last_event","on_drop","sourceHtmlObject","dhtmlObject","targetHtmlObject","targetHtml","action_data","event_data","view_options","_locate_cell_timeline","addDragLanding","_drag","_dragIn","shtmlObject","_dragOut","DragControl","addDrop","onDrop","sourceDhtmlx","getMaster","onDragIn","pdf","html_regexp","newline_regexp","clean_html","x_norm","parseFloat","colsWidth","x_norm_event","is_left","dhx_cal_header","y_norm","get_style","de_day","de_week","xml_start","xml_end","xml_top","profile","footer","xml_body_header","dhx_cal_date","xh","xml_month_scale","xml_month","yh","xhs","second_scale","top_width","top_col","xml_body","colors","week_starts","_month","text_color","zx","zdx","left_norm","zy","zdy","e_type","dets","week","dy_copy","toXML","original_date","original_mode","temp_date","getPDFData","send_xml","submit","to_pdf","schedulersToPdf","objects","toPDF","toPDFRange","quick_info","show_quick_info","showQuickInfo","hiding_function","hideQuickInfo","quick_info_title","quick_info_content","quick_info_date","_quick_info_box_id","_get_event_counter_part","_quick_info_box","_init_quick_info","_fill_quick_data","_show_quick_info","cssTimeToMs","milliseconds","forced","qi","_x_scroll","dataPos","_quick_info_onscroll_handler","$testmode","_qi_button_click","domEv","titleContent","titleDate","main","mainContent","originalRecurringSetValue","original_left_buttons","original_right_buttons","readonly_form","forbidden_buttons","button_arrays","forbidden_button","button_array","txt_replace","txts","txtt","originalForm","readonlyForm","_lightbox_r","occurrence_timestamp_in_utc","recurring_workdays","_get_node","_outer_html","outerHTML","getOuterHTML","rec","loc","repeat_date_of_end","_ds","_get_form_node","_get_node_value","_get_node_numeric_value","_set_node_value","hash_value","_init_set_value","_end_date","str_date_format","repeat_date","str_date","include_end_by","date_str","register_els","inps","formatter","change_current_view","get_repeat_code","get_rcode","repeat","get_end_rule","transpose_type","transp","set_end_rule","has_values","_get_repeat_code","get_numeric_value","repeat_precise","_start","start_exists","transpose_day_week","set_rcode","set_repeat_code","dispatchEvent","MouseEvent","_set_repeat_code","elements","_rec_init_done","rf","blocked","_is_modified_occurence","_toggle_block","actual_dates","timeControl","getTimeSection","_start_date","_get_button","getRecurringSection","_get_form","backgroundPosition","getFirstSectionOfType","_rec_markers","_rec_markers_pull","_pid_time","_get_rec_marker","ch","_get_rec_markers","clearMilliseconds","_rec_temp","old_add_event","ev_id","_ignore_call","tev","_pid_changed","nid","nev","sub","isEventFound","showLightbox_rec","lightbox_recurring","pid","isVirtual","showSeries","title_confirm_recurring","get_visible_events_rec","old_update_event","transponse_size","day_week","originalMonth","cday","newMonth","cor","cor2","transposeRecurring","recurringParts","dayDurationMs","addRecurring","recurringStepDays","weekDays","seriesInstance","currentCount","maxCount","origMonth","origYear","correctOverflowInstances","recurring_overflow_instances","getMilliseconds","non_render","startHour","visibleCount","_fix_daylight_saving_date","ted","recurrings","sev","data_attributes","all_events","_serialize_json_value","toICal","full_day_format","timeline_restricted","Tooltip","_scheduler","_tooltipNode","_root","_isLikeMouseEvent","_calculateTooltipPosition","viewport","_getViewPortSize","tooltipNode","tooltip","offsetX","tooltip_offset_x","offsetY","tooltip_offset_y","mouse","containerPos","scrollY","_getViewPort","scrollX","$event_data","$event","TooltipManager","_listeners","_initDelayedFunctions","delayHide","watchableTarget","eventTarget","targetNode","doOnMouseEnter","onmouseenter","onmousemove","onmouseleave","listener","cloneDomEvent","delayShow","utils.default","show","tooltip_timeout","tooltip_hide_timeout","tooltipManager","tooltips","tooltipFor","touch_tooltip","targetEventId","hideTooltip","treetimeline_restricted","units_restricted","s2d","d2s","select_event","week_agenda_restricted","wp","year_view","year_date","year_month","year_scale_date","year_tooltip","isYearMode","getCellDate","dblclick_dhx_month_head","_year_render_event","_year_marked_cells","_hideToolTip","_tooltip","_showToolTip","_year_view_tooltip_handler","_init_year_tooltip","_mark_year_date","_unmark_year_date","_reset_year_scale","year_top","ssd","yearBox","year_x","yearStart","datepicker","locateEvent","export_api","std","getElementSizes","sizes","dhtmlxAjax","dhx4","add_export_methods","orientation","dpi","_export_html","_send_to_export","exportToICal","_serialize_plain","exportToExcel","_serialize_columns","_ajax_to_export","server","fail","_plain_export_copy","$text","_create_hidden_form","_hidden_export_form","_get_export_size","A5","A4","A3","A2","A1","A0","dataX","dataY","headY","multY","cSize","getTimeline","getInitialSizes","smartRendering","style_width","style_height","timeline_scrollable","timeline_smart_rendering","setExportSizes","initialSizes","setInitialSizes","gplExtensions","drag_between","factory","$dhx"],"mappings":"AACe,SAAAA,aAEf;AAAA,MAAA,OAAWC,UAAU,eAAeA,OAAOC,UAAU;AACpDD,WAAOC,SAASC,kBAAkB,SAAUC,KAAKC,MAAMC,MAAMC,YAAAA;AAC5D,UAAID,OAAOA,QAAQ;AACnB,UAAIE,MAAMC,SAASC,cAAc,KAAA;AACjCF,UAAIG,KAAK,iBAAiBC,KAAKC,QAAQ,EAAA;AACvCL,UAAIM,YAAY,cAAcN,IAAIG,KAAK,qPAAqPL,OAAO;AACnSG,eAASM,KAAKC,YAAYR,IAAIS,UAAAA;AAE9BL,WAAKM,aAAaV,IAAIG,IAAI,OAAO,IAEjCC;AAAAA,WAAKO,GAAGP,KAAKQ,EAAIC,EAAAA,QAAQd;AACzBK,WAAKO,GAAGP,KAAKQ,EAAAA,EAAIE,UAAUd,IAAIG;AAC/BJ,MAAAA,WAAUgB,WAAWhB,WAAUiB;AAC/BjB,MAAAA,WAAUkB,aAAa;;AACvBlB,MAAAA,WAAUmB,KAAKlB,IAAIG,IAAIP,KAAKC,IAAAA;AAE5B,aAAOO,KAAKO,GAAGP,KAAKe,aAAgBN,CAAAA,EAAAA;AAAAA,IACtC;AAAA,EACA;AAEA;;ACrBA,IAAIO;AACJ,IAAA,O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5D,UAAU+M,KAAKq7F,QAAQ3uC,QAAQ2uC,OAGxC9mG,EAAAA;AAAAA,OAAOtB,YAAYA;AACnBsB,OAAO8hD,YAAYA;AAEnB,IAAI9hD,CAAAA,OAAO+mG,MAAM;AAChB/mG,SAAO+mG,OAAO;AACf;AAEA/mG,OAAO+mG,KAAKroG,YAAYA;AACxBsB,OAAO+mG,KAAKjlD,YAAYA;"} \ No newline at end of file +{"version":3,"file":"dhtmlxscheduler.es.js","sources":["../../sources/dhtmlx_hook.js","../../sources/global.js","../../sources/core/common/assert.js","../../sources/core/common_errors.js","../../sources/core/connector.js","../../sources/core/nav_bar.js","../../sources/core/scheduler_resize_listener.js","../../sources/utils/eventable.js","../../sources/core/scheduler.js","../../sources/core/utils/event.js","../../sources/core/utils/scoped_event.js","../../sources/core/common.js","../../sources/core/wai_aria.js","../../sources/core/utils/utils.js","../../sources/core/utils/dom_helpers.js","../../sources/utils/env.js","../../sources/core/destructor.js","../../sources/core/common/url_serialize.js","../../sources/core/utils/ajax.js","../../sources/core/base.js","../../sources/core/config.js","../../sources/core/event.js","../../sources/core/event_highlight.js","../../sources/core/loaders/xml.js","../../sources/core/loaders/json.js","../../sources/core/loaders/ical.js","../../sources/core/common/get_serializable_events.js","../../sources/core/load.js","../../sources/core/lightbox.js","../../sources/core/touch.js","../../sources/core/dhtmlx/dhtmlx_suite_hooks.js","../../sources/core/skins.js","../../sources/core/jquery.js","../../sources/core/delay_render.js","../../sources/core/dataprocessor/dataprocessor_hooks.js","../../sources/core/dataprocessor/dataprocessor.js","../../sources/core/message.js","../../sources/locale/locale_ar.js","../../sources/locale/locale_be.js","../../sources/locale/locale_ca.js","../../sources/locale/locale_cn.js","../../sources/locale/locale_cs.js","../../sources/locale/locale_da.js","../../sources/locale/locale_de.js","../../sources/locale/locale_el.js","../../sources/locale/locale_en.js","../../sources/locale/locale_es.js","../../sources/locale/locale_fi.js","../../sources/locale/locale_fr.js","../../sources/locale/locale_he.js","../../sources/locale/locale_hu.js","../../sources/locale/locale_id.js","../../sources/locale/locale_it.js","../../sources/locale/locale_jp.js","../../sources/locale/locale_manager.js","../../sources/locale/locale_nb.js","../../sources/locale/locale_nl.js","../../sources/locale/locale_no.js","../../sources/locale/locale_pl.js","../../sources/locale/locale_pt.js","../../sources/locale/locale_ro.js","../../sources/locale/locale_ru.js","../../sources/locale/locale_si.js","../../sources/locale/locale_sk.js","../../sources/locale/locale_sv.js","../../sources/locale/locale_tr.js","../../sources/locale/locale_ua.js","../../sources/locale/index.js","../../sources/core/datepicker.js","../../sources/scheduler_factory_method.js","../../sources/ext/extension_manager.js","../../sources/scheduler_factory.js","../../sources/ext/active_links.js","../../sources/ext/agenda_legacy_view.js","../../sources/ext/agenda.js","../../sources/ext/all_timed.js","../../sources/ext/collision.js","../../sources/ext/container_autoresize.js","../../sources/ext/cookie.js","../../sources/ext/restricted_extensions/not_implemented_extension.js","../../sources/ext/restricted_extensions/daytimeline.js","../../sources/ext/restricted_extensions/drag_between.js","../../sources/ext/editors.js","../../sources/ext/expand.js","../../sources/ext/restricted_extensions/grid_view.js","../../sources/ext/html_templates.js","../../sources/ext/keyboard_navigation/common/keyboard_shortcuts.js","../../sources/ext/keyboard_navigation/common/eventhandler.js","../../sources/ext/keyboard_navigation/common/trap_modal_focus.js","../../sources/ext/keyboard_navigation/marker.js","../../sources/ext/keyboard_navigation/elements/scheduler_node.js","../../sources/ext/keyboard_navigation/elements/nav_node.js","../../sources/ext/keyboard_navigation/elements/header_cell.js","../../sources/ext/keyboard_navigation/elements/event.js","../../sources/ext/keyboard_navigation/elements/time_slot.js","../../sources/ext/keyboard_navigation/elements/minical_button.js","../../sources/ext/keyboard_navigation/elements/minical_cell.js","../../sources/ext/keyboard_navigation/elements/data_area.js","../../sources/ext/keyboard_navigation/modals.js","../../sources/ext/keyboard_navigation/core.js","../../sources/ext/keyboard_navigation/key_nav_legacy.js","../../sources/ext/keyboard_navigation/scheduler_handlers.js","../../sources/ext/keyboard_navigation/minical_handlers.js","../../sources/ext/key_nav.js","../../sources/ext/layer.js","../../sources/ext/limit.js","../../sources/ext/map_view.js","../../sources/ext/minical.js","../../sources/ext/monthheight.js","../../sources/ext/restricted_extensions/multisection.js","../../sources/ext/multiselect.js","../../sources/ext/multisource.js","../../sources/ext/mvc.js","../../sources/ext/outerdrag.js","../../sources/ext/pdf.js","../../sources/ext/quick_info.js","../../sources/ext/readonly.js","../../sources/ext/recurring.js","../../sources/ext/serialize.js","../../sources/ext/restricted_extensions/timeline.js","../../sources/ext/tooltip/tooltip.ts","../../sources/ext/tooltip/tooltipManager.ts","../../sources/ext/tooltip/index.ts","../../sources/ext/restricted_extensions/treetimeline.js","../../sources/ext/restricted_extensions/units.js","../../sources/ext/url.js","../../sources/ext/restricted_extensions/week_agenda.js","../../sources/ext/wp.js","../../sources/ext/year_view.js","../../sources/ext/export_api/index.js","../../sources/ext/extensions_gpl.js","../../sources/dhtmlxscheduler.gpl.js"],"sourcesContent":["\r\nexport default function(){\r\n/* global dhtmlx */\r\nif (typeof dhtmlx != \"undefined\" && dhtmlx.attaches) {\r\n\tdhtmlx.attaches.attachScheduler = function (day, mode, tabs, scheduler) {\r\n\t\tvar tabs = tabs || '
';\r\n\t\tvar obj = document.createElement(\"DIV\");\r\n\t\tobj.id = \"dhxSchedObj_\" + this._genStr(12);\r\n\t\tobj.innerHTML = '
' + tabs + '
';\r\n\t\tdocument.body.appendChild(obj.firstChild);\r\n\r\n\t\tthis.attachObject(obj.id, false, true);\r\n\r\n\t\tthis.vs[this.av].sched = scheduler;\r\n\t\tthis.vs[this.av].schedId = obj.id;\r\n\t\tscheduler.setSizes = scheduler.updateView;\r\n\t\tscheduler.destructor = function () { };\r\n\t\tscheduler.init(obj.id, day, mode);\r\n\r\n\t\treturn this.vs[this._viewRestore()].sched;\r\n\t};\r\n}\r\n\r\n}","\r\n/* eslint-disable no-restricted-globals */\r\nvar globalScope;\r\nif(typeof window !== \"undefined\"){\r\n\tglobalScope = window;\r\n}else{\r\n\tglobalScope = global;\r\n}\r\n/* eslint-enable no-restricted-globals */\r\n\r\nexport default globalScope;","export default function(scheduler){\r\n\treturn function assert(check, message){\r\n\t\tif (!check){\r\n\t\t\tif(scheduler.config.show_errors && scheduler.callEvent(\"onError\",[message]) !== false) {\r\n\t\t\t\tif (scheduler.message) {\r\n\t\t\t\t\tscheduler.message({type: \"error\", text: message, expire: -1});\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t// eslint-disable-next-line\r\n\t\t\t\t\tconsole.log(message);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// eslint-disable-next-line no-debugger\r\n\t\t\t\tdebugger;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n}","export default function extend(scheduler) {\r\n\r\nvar commonViews = {\r\n\tagenda: \"https://docs.dhtmlx.com/scheduler/agenda_view.html\",\r\n\tgrid: \"https://docs.dhtmlx.com/scheduler/grid_view.html\",\r\n\tmap: \"https://docs.dhtmlx.com/scheduler/map_view.html\",\r\n\tunit: \"https://docs.dhtmlx.com/scheduler/units_view.html\",\r\n\ttimeline: \"https://docs.dhtmlx.com/scheduler/timeline_view.html\",\r\n\tweek_agenda: \"https://docs.dhtmlx.com/scheduler/weekagenda_view.html\",\r\n\tyear: \"https://docs.dhtmlx.com/scheduler/year_view.html\",\r\n\tanythingElse: \"https://docs.dhtmlx.com/scheduler/views.html\"\r\n};\r\n\r\nvar requiredExtensions = {\r\n\tagenda: \"ext/dhtmlxscheduler_agenda_view.js\",\r\n\tgrid: \"ext/dhtmlxscheduler_grid_view.js\",\r\n\tmap: \"ext/dhtmlxscheduler_map_view.js\",\r\n\tunit: \"ext/dhtmlxscheduler_units.js\",\r\n\ttimeline: \"ext/dhtmlxscheduler_timeline.js, ext/dhtmlxscheduler_treetimeline.js, ext/dhtmlxscheduler_daytimeline.js\",\r\n\tweek_agenda: \"ext/dhtmlxscheduler_week_agenda.js\",\r\n\tyear: \"ext/dhtmlxscheduler_year_view.js\",\r\n\tlimit: \"ext/dhtmlxscheduler_limit.js\"\r\n};\r\n\r\nscheduler._commonErrorMessages = {\r\n\tunknownView: function(view){\r\n\t\tvar relatedDoc = \"Related docs: \" + (commonViews[view] || commonViews.anythingElse); \r\n\t\tvar relatedExtension = requiredExtensions[view] ? (\"You're probably missing \" + requiredExtensions[view] + \".\") : \"\";\r\n\t\treturn (\r\n\t\t\t\"`\"+view+\"` view is not defined. \\n\" +\r\n\t\t\t\"Please check parameters you pass to `scheduler.init` or `scheduler.setCurrentView` in your code and ensure you've imported appropriate extensions. \\n\" + \r\n\t\t\trelatedDoc + \"\\n\" + (relatedExtension ? (relatedExtension + \"\\n\") : \"\"));\r\n\t},\r\n\tcollapsedContainer: function(div){\r\n\t\treturn \"Scheduler container height is set to *100%* but the rendered height is zero and the scheduler is not visible. \\n\"+\r\n\t\t\"Make sure that the container has some initial height or use different units. For example:\\n\" +\r\n\t\t\"
\\n\";\r\n\t}\r\n};\r\n\r\nscheduler.createTimelineView = function() {\r\n\tthrow new Error(\"scheduler.createTimelineView is not implemented. Be sure to add the required extension: \" + requiredExtensions.timeline + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.timeline);\r\n};\r\n\r\nscheduler.createUnitsView = function() {\r\n\tthrow new Error(\"scheduler.createUnitsView is not implemented. Be sure to add the required extension: \" + requiredExtensions.unit + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.unit);\r\n};\r\n\r\nscheduler.createGridView = function() {\r\n\tthrow new Error(\"scheduler.createGridView is not implemented. Be sure to add the required extension: \" + requiredExtensions.grid + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.grid);\r\n};\r\n\r\nscheduler.addMarkedTimespan = function() {\r\n\tthrow new Error(\"scheduler.addMarkedTimespan is not implemented. Be sure to add the required extension: ext/dhtmlxscheduler_limit.js\" + \r\n\t\"\\n\" +\r\n\t\"Related docs: https://docs.dhtmlx.com/scheduler/limits.html\");\r\n};\r\n\r\nscheduler.renderCalendar = function() {\r\n\tthrow new Error(\"scheduler.renderCalendar is not implemented. Be sure to add the required extension: ext/dhtmlxscheduler_minical.js\" + \r\n\t\"\\n\" +\r\n\t\"https://docs.dhtmlx.com/scheduler/minicalendar.html\");\r\n};\r\n\r\nscheduler.exportToPNG = function() {\r\n\tthrow new Error([\r\n\t\t\"scheduler.exportToPNG is not implemented.\",\r\n\t\t\"This feature requires an additional module, be sure to check the related doc here https://docs.dhtmlx.com/scheduler/png.html\",\r\n\t\t\"Licensing info: https://dhtmlx.com/docs/products/dhtmlxScheduler/export.shtml\"\r\n\t].join(\"\\n\"));\r\n};\r\n\r\nscheduler.exportToPDF = function() {\r\n\tthrow new Error([\r\n\t\t\"scheduler.exportToPDF is not implemented.\",\r\n\t\t\"This feature requires an additional module, be sure to check the related doc here https://docs.dhtmlx.com/scheduler/pdf.html\",\r\n\t\t\"Licensing info: https://dhtmlx.com/docs/products/dhtmlxScheduler/export.shtml\"\r\n\t].join(\"\\n\"));\r\n};\r\n\r\n\r\n}","import global from \"../global\";\r\n\r\nexport default function extend(scheduler) {\r\n/*\r\nif (global.dataProcessor && !dataProcessor.prototype.init_original){\r\n\tdataProcessor.prototype.init_original=dataProcessor.prototype.init;\r\n\tdataProcessor.prototype.init=function(obj){\r\n\t\tthis.init_original(obj);\r\n\t\tobj._dataprocessor=this;\r\n\r\n\t\tthis.setTransactionMode(\"POST\",true);\r\n\t\tthis.serverProcessor+=(this.serverProcessor.indexOf(\"?\")!=-1?\"&\":\"?\")+\"editing=true\";\r\n\t};\r\n}*/\r\n\r\nscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\tif(typeof dhtmlxError !== \"undefined\") {\r\n\t\twindow.dhtmlxError.catchError(\"LoadXML\", function(a, b, c){\r\n\t\t\tvar message = c[0].responseText;\r\n\r\n\t\t\tswitch (scheduler.config.ajax_error){\r\n\t\t\t\tcase \"alert\":\r\n\t\t\t\t\tglobal.alert(message);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"console\":\r\n\t\t\t\t\tglobal.console.log(message);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n});\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nfunction div(className){\r\n\tvar element = document.createElement(\"div\");\r\n\tvar classes = (className || \"\").split(\" \");\r\n\tclasses.forEach(function(cssClass){\r\n\t\telement.classList.add(cssClass);\r\n\t});\r\n\treturn element;\r\n}\r\nvar itemTypes = {\r\n\trows_container: function(){\r\n\t\treturn div(\"dhx_cal_navbar_rows_container\");\r\n\t},\r\n\trow: function(){\r\n\t\treturn div(\"dhx_cal_navbar_row\");\r\n\t},\r\n\tview: function (config) {\r\n\t\tvar element = div(\"dhx_cal_tab\");\r\n\t\telement.setAttribute(\"name\", config.view + \"_tab\");\r\n\t\telement.setAttribute(\"data-tab\", config.view);\r\n\t\t// element.setAttribute(\"data-viewname\", config.view); // FIXME: need to remove? not used anywhere\r\n\t\tif(scheduler.config.fix_tab_position){\r\n\t\t\tif(config.$firstTab) {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_first\");\r\n\t\t\t}else if(config.$lastTab) {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_last\");\r\n\t\t\t} else if(config.view !== \"week\") {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_standalone\");\r\n\t\t\t}\r\n\r\n\t\t\tif(config.$segmentedTab) {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn element;\r\n\t},\r\n\tdate: function () {\r\n\t\treturn div(\"dhx_cal_date\");\r\n\t},\r\n\tbutton: function (config) {\r\n\t\treturn div(\"dhx_cal_nav_button dhx_cal_nav_button_custom dhx_cal_tab\");\r\n\t},\r\n\tbuiltInButton: function (config){\r\n\t\treturn div(\"dhx_cal_\" + config.view + \"_button dhx_cal_nav_button\");\r\n\t},\r\n\tspacer: function () {\r\n\t\treturn div(\"dhx_cal_line_spacer\");\r\n\t},\r\n\tminicalendarButton: function(config){\r\n\t\tvar minicalendarDiv = div('dhx_minical_icon');\r\n\t\tif(!config.click && !minicalendarDiv.$_eventAttached){\r\n\t\t\t\r\n\t\t\tscheduler.event(minicalendarDiv, \"click\", function () {\r\n\t\t\t\tif (scheduler.isCalendarVisible()) {\r\n\t\t\t\t\tscheduler.destroyCalendar();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tscheduler.renderCalendar({\r\n\t\t\t\t\t\tposition: this,\r\n\t\t\t\t\t\tdate: scheduler.getState().date,\r\n\t\t\t\t\t\tnavigation: true,\r\n\t\t\t\t\t\thandler: function (date, calendar) {\r\n\t\t\t\t\t\t\tscheduler.setCurrentView(date);\r\n\t\t\t\t\t\t\tscheduler.destroyCalendar();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn minicalendarDiv;\r\n\t},\r\n\thtml_element: function (config) {\r\n\t\treturn div(\"dhx_cal_nav_content\");\r\n\t}\r\n};\r\n\r\nfunction findRenderer(config) {\r\n\tvar renderer;\r\n\tif (config.view) {\r\n\t\tswitch (config.view){\r\n\t\t\tcase \"today\":\r\n\t\t\tcase \"next\":\r\n\t\t\tcase \"prev\":\r\n\t\t\t\trenderer = itemTypes.builtInButton;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"date\":\r\n\t\t\t\trenderer = itemTypes.date;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"spacer\":\r\n\t\t\t\trenderer = itemTypes.spacer;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"button\":\r\n\t\t\t\trenderer = itemTypes.button;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"minicalendar\":\r\n\t\t\t\trenderer = itemTypes.minicalendarButton;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\trenderer = itemTypes.view;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t} else if(config.rows) {\r\n\t\trenderer = itemTypes.rows_container;\r\n\t} else if(config.cols) {\r\n\t\trenderer = itemTypes.row;\r\n\t}\r\n\treturn renderer;\r\n}\r\n\r\nfunction renderElement(config){\r\n\tvar renderer = findRenderer(config);\r\n\tif(!renderer){\r\n\t\treturn;\r\n\t}\r\n\tvar element = renderer(config);\r\n\tif(config.css){\r\n\t\telement.classList.add(config.css);\r\n\t}\r\n\tif(config.width){\r\n\t\tvar value = config.width;\r\n\t\tif(value === value * 1){\r\n\t\t\tvalue += \"px\";\r\n\t\t}\r\n\t\telement.style.width = value;\r\n\t}\r\n\tif(config.height){\r\n\t\tvar value = config.height;\r\n\t\tif(value === value * 1){\r\n\t\t\tvalue += \"px\";\r\n\t\t}\r\n\t\telement.style.height = value;\r\n\t}\r\n\tif (config.click) {\r\n\t\tscheduler.event(element, \"click\", config.click);\r\n\t}\r\n\tif (config.html) {\r\n\t\telement.innerHTML = config.html;\r\n\t}\r\n\r\n\tif (config.align) {\r\n\t\tvar value = \"\";\r\n\t\tif (config.align == \"right\") {\r\n\t\t\tvalue = \"flex-end\";\r\n\t\t} else if(config.align == \"left\") {\r\n\t\t\tvalue = \"flex-start\";\r\n\t\t}\r\n\t\telement.style.justifyContent = value;\r\n\t}\r\n\treturn element;\r\n}\r\n\r\nfunction prepareConfig(config) {\r\n\tif (typeof config === \"string\") {\r\n\t\tconfig = {\r\n\t\t\tview: config\r\n\t\t};\r\n\t}\r\n\tif (!config.view && !config.rows && !config.cols) {\r\n\t\tconfig.view = \"button\";\r\n\t}\r\n\treturn config;\r\n}\r\n\r\nfunction renderLayout(config) {\r\n\tvar fragment = document.createDocumentFragment();\r\n\tvar items;\r\n\tif(Array.isArray(config)){\r\n\t\titems = config;\r\n\t}else{\r\n\t\titems = [config];\r\n\t}\r\n\r\n\tfor (var i = 0; i < items.length; i++) {\r\n\t\tvar view = prepareConfig(items[i]);\r\n\r\n\t\tif(view.view === \"day\" && items[i + 1]){\r\n\t\t\tvar next = prepareConfig(items[i + 1]);\r\n\t\t\tif(next.view === \"week\" || next.view === \"month\"){\r\n\t\t\t\tview.$firstTab = true;\r\n\t\t\t\tview.$segmentedTab = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(view.view === \"week\" && items[i - 1]){\r\n\t\t\tvar next = prepareConfig(items[i + 1]);\r\n\t\t\tif(next.view === \"week\" || next.view === \"month\"){\r\n\t\t\t\tview.$segmentedTab = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(view.view === \"month\" && items[i - 1]){\r\n\t\t\tvar next = prepareConfig(items[i - 1]);\r\n\t\t\tif(next.view === \"week\" || next.view === \"day\"){\r\n\t\t\t\tview.$lastTab = true;\r\n\t\t\t\tview.$segmentedTab = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar element = renderElement(view);\r\n\r\n\t\tfragment.appendChild(element);\r\n\t\tif(view.cols || view.rows){\r\n\t\t\telement.appendChild(renderLayout(view.cols || view.rows));\r\n\t\t}\r\n\t}\r\n\treturn fragment;\r\n}\r\n\r\nscheduler._init_nav_bar = function (items) {\r\n\tvar navBar = this.$container.querySelector(\".dhx_cal_navline\");\r\n\tif (!navBar){\r\n\t\tnavBar = document.createElement(\"div\");\r\n\t\tnavBar.className = \"dhx_cal_navline dhx_cal_navline_flex\";\r\n\t\tscheduler._update_nav_bar(items, navBar);\r\n\t\treturn navBar;\r\n\t}\r\n\treturn navBar;\r\n};\r\n\r\nvar previousNavbar = null;\r\nvar previousHeight = null;\r\nscheduler._update_nav_bar = function (config, container) {\r\n\r\n\tif(!config){\r\n\t\treturn;\r\n\t}\r\n\tvar heightChanged = false;\r\n\tvar configChanged = false;\r\n\r\n\tvar newHeight = config.height || scheduler.xy.nav_height;\r\n\r\n\tif(previousHeight === null ||\r\n\t\t\t(previousHeight !== newHeight)){\r\n\t\theightChanged = true;\r\n\t}\r\n\tif(!previousNavbar || JSON.stringify(config) !== previousNavbar){\r\n\t\tconfigChanged = true;\r\n\t}\r\n\r\n\tif(heightChanged){\r\n\t\tscheduler.xy.nav_height = newHeight;\r\n\t}\r\n\tif(configChanged){\r\n\t\tcontainer.innerHTML = \"\";\r\n\t\tcontainer.appendChild(renderLayout(config));\r\n\t}\r\n\r\n\tif(heightChanged || configChanged){\r\n\t\tscheduler.unset_actions();\r\n\t\tscheduler._els = [];\r\n\t\tscheduler.get_elements();\r\n\t\tscheduler.set_actions();\r\n\t}\r\n\r\n\tif(newHeight === 0){\r\n\t\tcontainer.style.display = \"none\";\r\n\t}else{\r\n\t\tcontainer.style.display = \"\";\r\n\t}\r\n\r\n\tpreviousHeight = newHeight;\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\tfunction isAttachedNode(container){\r\n\t\tvar root = document.body;\r\n\t\r\n\t\twhile(container && container != root){\r\n\t\t\tcontainer = container.parentNode;\r\n\t\t}\r\n\t\r\n\t\treturn !!(root == container);\r\n\t}\r\n\t\r\n\tfunction getWindowSize(window){\r\n\t\treturn {\r\n\t\t\tw : window.innerWidth || document.documentElement.clientWidth,\r\n\t\t\th : window.innerHeight || document.documentElement.clientHeight\r\n\t\t};\r\n\t}\r\n\tfunction equals(a,b){\r\n\t\treturn a.w == b.w && a.h == b.h;\r\n\t}\r\n\t\r\n\tfunction listenWindowResize(scheduler, window){\r\n\t\tvar oldSize = getWindowSize(window);\r\n\t\tvar resizeDelay;\r\n\t\tscheduler.event(window, \"resize\", function(){\r\n\t\t\tclearTimeout(resizeDelay);\r\n\t\t\tresizeDelay = setTimeout(function(){\r\n\r\n\t\t\t\tif (!isAttachedNode(scheduler.$container) || scheduler.$destroyed){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tvar newSize = getWindowSize(window);\r\n\t\t\t\t// element may be resized by container-autoresize exteinsion\r\n\t\t\t\t// check if the size is actually changed in order to not to get endless loop\r\n\t\t\t\tif (!equals(oldSize, newSize)) {\r\n\t\t\t\t\toldSize = newSize;\r\n\t\t\t\t\ttriggerSchedulerResize(scheduler);\r\n\t\t\t\t}\r\n\t\t\t}, 150);\r\n\t\t});\r\n\t}\r\n\t\r\n\tfunction triggerSchedulerResize(scheduler){\r\n\t\tif(scheduler.$destroyed || !scheduler.$root || !isAttachedNode(scheduler.$root)){\r\n\t\t\treturn;\t\r\n\t\t}\r\n\t\tif (scheduler.callEvent(\"onSchedulerResize\", [])) {\r\n\t\t\tscheduler.updateView();\r\n\t\t\tscheduler.callEvent(\"onAfterSchedulerResize\", []);\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction watchNodeResize(scheduler){\r\n\t\tvar previousHeight = scheduler.$root.offsetHeight;\r\n\t\tvar previousWidth = scheduler.$root.offsetWidth;\r\n\t\t\r\n\t\tfunction lowlevelResizeWatcher(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(scheduler.$root){\r\n\t\t\t\tif (scheduler.$root.offsetHeight != previousHeight ||\r\n\t\t\t\t\tscheduler.$root.offsetWidth != previousWidth){\r\n\t\t\t\t\ttriggerSchedulerResize(scheduler);\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\tpreviousHeight = scheduler.$root.offsetHeight;\r\n\t\t\t\tpreviousWidth = scheduler.$root.offsetWidth;\r\n\t\t\t}\r\n\t\r\n\t\t\tsetTimeout(lowlevelResizeWatcher, 200);\r\n\t\t}\r\n\t\t\r\n\t\tlowlevelResizeWatcher();\r\n\t}\r\n\t\r\n\tfunction addResizeListener(scheduler){\r\n\t\tvar root = scheduler.$container;\r\n\t\tvar containerStyles = window.getComputedStyle(root);\r\n\t\tif(containerStyles.getPropertyValue(\"position\") == \"static\"){\r\n\t\t\troot.style.position = \"relative\";\r\n\t\t}\r\n\t\r\n\t\tvar resizeWatcher = document.createElement('iframe');\r\n\t\tresizeWatcher.className = \"scheduler_container_resize_watcher\";\r\n\t\tresizeWatcher.tabIndex = -1;\r\n\t\tif(scheduler.config.wai_aria_attributes){\r\n\t\t\tresizeWatcher.setAttribute(\"role\", \"none\");\r\n\t\t\tresizeWatcher.setAttribute(\"aria-hidden\", true);\r\n\t\t}\r\n\t\r\n\t\t// in some environments (namely, in SalesForce) iframe.contentWindow is not available\r\n\t\tvar salesforce_environment = !!window[\"Sfdc\"] || !!window[\"$A\"] || window[\"Aura\"];\r\n\t\tif(salesforce_environment){\r\n\t\t\twatchNodeResize(scheduler);\r\n\t\t} else {\r\n\t\t\troot.appendChild(resizeWatcher);\r\n\t\t\tif (resizeWatcher.contentWindow) {\r\n\t\t\t\tlistenWindowResize(scheduler, resizeWatcher.contentWindow);\r\n\t\t\t} else {\r\n\t\t\t\t// if so - ditch the iframe and fallback to listening the main window resize\r\n\t\t\t\troot.removeChild(resizeWatcher);\r\n\t\t\t\tlistenWindowResize(scheduler, window);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\taddResizeListener(scheduler);\r\n\r\n}","class EventHost {\r\n\tconstructor(){\r\n\t\tthis._silent_mode = false;\r\n\t\tthis.listeners = {};\r\n\t}\r\n\t_silentStart(){\r\n\t\tthis._silent_mode = true;\r\n\t}\r\n\t_silentEnd() {\r\n\t\tthis._silent_mode = false;\r\n\t}\r\n}\r\n\r\nconst createEventStorage = function(obj) {\r\n\tlet handlers = {};\r\n\tlet index = 0;\r\n\tconst eventStorage = function(){\r\n\t\tlet combinedResult = true;\r\n\t\tfor(const i in handlers){\r\n\t\t\tconst handlerResult = handlers[i].apply(obj, arguments);\r\n\t\t\tcombinedResult=combinedResult && handlerResult;\r\n\t\t}\r\n\t\treturn combinedResult;\r\n\t};\r\n\teventStorage.addEvent=function(handler, settings){\r\n\t\tif (typeof (handler) == \"function\"){\r\n\t\t\tlet handlerId;\r\n\t\t\tif(settings && settings.id){\r\n\t\t\t\thandlerId = settings.id;\r\n\t\t\t}else{\r\n\t\t\t\thandlerId = index;\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\r\n\t\t\tif(settings && settings.once){\r\n\t\t\t\tconst originalHandler = handler;\r\n\t\t\t\thandler = function(){\r\n\t\t\t\t\toriginalHandler();\r\n\t\t\t\t\teventStorage.removeEvent(handlerId);\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\thandlers[handlerId] = handler;\r\n\t\t\treturn handlerId;\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\teventStorage.removeEvent=function(id){\r\n\t\tdelete handlers[id];\r\n\t};\r\n\r\n\teventStorage.clear = function(){\r\n\t\thandlers = {};\r\n\t};\r\n\r\n\treturn eventStorage;\r\n};\r\n\r\nfunction makeEventable(obj){\r\n\r\n\tconst eventHost = new EventHost();\r\n\tobj.attachEvent=function(eventName, handler, settings){\r\n\t\teventName = 'ev_'+eventName.toLowerCase();\r\n\t\tif (!eventHost.listeners[eventName]){\r\n\t\t\teventHost.listeners[eventName] = createEventStorage(this);\r\n\t\t}\r\n\r\n\t\tif(settings && settings.thisObject){\r\n\t\t\thandler = handler.bind(settings.thisObject);\r\n\t\t}\r\n\r\n\t\tconst innerId = eventHost.listeners[eventName].addEvent(handler, settings);\r\n\r\n\t\tlet handlerId = (eventName+':'+innerId); //return ID (ev_eventname:1)\r\n\t\tif(settings && settings.id){\r\n\t\t\thandlerId = settings.id;\r\n\t\t}\r\n\t\treturn handlerId;\r\n\t};\r\n\r\n\tobj.attachAll = function(callback){\r\n\t\tthis.attachEvent('listen_all', callback);\r\n\t};\r\n\r\n\tobj.callEvent=function(name, eventArguments){\r\n\t\tif (eventHost._silent_mode) return true;\r\n\r\n\t\tconst handlerName = 'ev_'+name.toLowerCase();\r\n\r\n\t\tconst listeners = eventHost.listeners;\r\n\t\tif (listeners['ev_listen_all']){\r\n\t\t\tlisteners['ev_listen_all'].apply(this, [name].concat(eventArguments));\r\n\t\t}\r\n\r\n\t\tif (listeners[handlerName])\r\n\t\t\treturn listeners[handlerName].apply(this, eventArguments);\r\n\t\treturn true;\r\n\t};\r\n\r\n\tobj.checkEvent=function(name){\r\n\t\tconst listeners = eventHost.listeners;\r\n\t\treturn (!!listeners['ev_'+name.toLowerCase()]);\r\n\t};\r\n\r\n\tobj.detachEvent=function(id){\r\n\t\tif (id){\r\n\t\t\tlet listeners = eventHost.listeners;\r\n\t\t\tfor(const i in listeners){\r\n\t\t\t\tlisteners[i].removeEvent(id); //remove event\r\n\t\t\t}\r\n\r\n\t\t\tconst list = id.split(':');//get EventName and ID\r\n\t\t\tlisteners = eventHost.listeners;\r\n\t\t\tif(list.length === 2){\r\n\t\t\t\tconst eventName = list[0];\r\n\t\t\t\tconst eventId = list[1];\r\n\t\t\t\tif(listeners[eventName]){\r\n\t\t\t\t\tlisteners[eventName].removeEvent(eventId); //remove event\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\tobj.detachAllEvents = function(){\r\n\t\tfor (const name in eventHost.listeners) {\r\n\t\t\teventHost.listeners[name].clear();\r\n\t\t}\r\n\t};\r\n\r\n}\r\n\r\nexport default makeEventable;","\r\nimport nav_bar from \"./nav_bar\";\r\nimport scheduler_resize_listener from \"./scheduler_resize_listener\";\r\nimport eventable from \"../utils/eventable\";\r\n\r\n\r\nexport default function extend(scheduler) {\r\n\r\neventable(scheduler);\r\n\r\nnav_bar(scheduler);\r\n\r\nscheduler._detachDomEvent = function(el, event, handler){\r\n\tif (el.removeEventListener){\r\n\t\tel.removeEventListener(event, handler, false);\r\n\r\n\t}else if (el.detachEvent){\r\n\t\tel.detachEvent(\"on\"+event, handler);\r\n\t}\r\n};\r\n\r\n\r\nscheduler._init_once = function(){\r\n\tscheduler_resize_listener(scheduler);\r\n\r\n\tscheduler._init_once = function(){};\r\n};\r\n\r\nconst layout = {\r\n\t\"navbar\": {\r\n\t\trender: function (config) {\r\n\t\t\treturn scheduler._init_nav_bar(config);\r\n\t\t}\r\n\t},\r\n\t\"header\": {\r\n\t\trender: function (config) {\r\n\t\t\tconst element = document.createElement(\"div\");\r\n\t\t\telement.className = \"dhx_cal_header\";\r\n\t\t\treturn element;\r\n\t\t}\r\n\t},\r\n\t\"dataArea\": {\r\n\t\trender: function (config) {\r\n\t\t\tconst element = document.createElement(\"div\");\r\n\t\t\telement.className = \"dhx_cal_data\";\r\n\t\t\treturn element;\r\n\t\t}\r\n\t},\r\n\t\"html_element\": {\r\n\t\trender: function (config) {\r\n\t\t\treturn config.html;\r\n\t\t}\r\n\t}\r\n};\r\n\r\nfunction hasSchedulerMarkup(element){\r\n\treturn !!(\r\n\t\telement.querySelector(\".dhx_cal_header\") &&\r\n\t\telement.querySelector(\".dhx_cal_data\") &&\r\n\t\telement.querySelector(\".dhx_cal_navline\")\r\n\t\t);\r\n}\r\n\r\nfunction createDefaultHeader(scheduler){\r\n\tconst views = [\r\n\t\t\"day\",\r\n\t\t\"week\",\r\n\t\t\"month\"\r\n\t];\r\n\tconst date = [\r\n\t\t\"date\"\r\n\t];\r\n\tconst nav = [\r\n\t\t\"prev\",\r\n\t\t\"today\",\r\n\t\t\"next\"\r\n\t];\r\n\r\n\tif(scheduler.matrix){\r\n\t\tfor(const i in scheduler.matrix){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\tif(scheduler._props){\r\n\t\tfor(const i in scheduler._props){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\r\n\tif(scheduler._grid && scheduler._grid.names){\r\n\t\tfor(const i in scheduler._grid.names){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\r\n\tconst optionalViews = [\r\n\t\t\"map\",\r\n\t\t\"agenda\",\r\n\t\t\"week_agenda\",\r\n\t\t\"year\"\r\n\t];\r\n\r\n\toptionalViews.forEach(function(viewName){\r\n\t\tif(scheduler[viewName + \"_view\"]){\r\n\t\t\tviews.push(viewName);\r\n\t\t}\r\n\t});\r\n\r\n\treturn views.concat(date).concat(nav);\r\n}\r\n\r\nscheduler.init=function(id,date,mode){\r\n\tif(this.$destroyed){\r\n\t\treturn; // not have errors when try to reinit destroyed scheduler\r\n\t}\r\n\tdate=date||(scheduler._currentDate());\r\n\tmode=mode||\"week\";\r\n\r\n\tif(this._obj){\r\n\t\tthis.unset_actions();\r\n\t}\r\n\r\n\tthis._obj=(typeof id == \"string\")?document.getElementById(id):id;\r\n\tthis.$container = this._obj;\r\n\tthis.$root = this._obj;\r\n\r\n\tif(!this.$container.offsetHeight && this.$container.offsetWidth && this.$container.style.height === \"100%\"){\r\n\t\t// scheduler container has zero height and non-zero width\r\n\t\twindow.console.error(scheduler._commonErrorMessages.collapsedContainer(), this.$container);\r\n\t}\r\n\r\n\tif(this.config.wai_aria_attributes && this.config.wai_aria_application_role){\r\n\t\tthis.$container.setAttribute(\"role\", \"application\");\r\n\t}\r\n\r\n\tif(!this.config.header && !hasSchedulerMarkup(this.$container)){\r\n\t\t// if no header config and no required markup - use the default header\r\n\t\t// so the scheduler could be initialized in an empty div\r\n\t\tthis.config.header = createDefaultHeader(this);\r\n\t\twindow.console.log([// jshint ignore:line\r\n\t\t\t\"Required DOM elements are missing from the scheduler container and **scheduler.config.header** is not specified.\",\r\n\t\t\t\"Using a default header configuration: \",\r\n\t\t\t\"scheduler.config.header = \" + JSON.stringify(this.config.header, null, 2),\r\n\t\t\t\"Check this article for the details: https://docs.dhtmlx.com/scheduler/initialization.html\"\r\n\t\t].join(\"\\n\"));// jshint ignore:line\r\n\t}\r\n\r\n\tif (this.config.header) {\r\n\t\tthis.$container.innerHTML = \"\";\r\n\t\tthis.$container.classList.add(\"dhx_cal_container\");\r\n\t\tif(this.config.header.height){\r\n\t\t\tthis.xy.nav_height = this.config.header.height;\r\n\t\t}\r\n\t\tthis.$container.appendChild(layout.navbar.render(this.config.header));\r\n\t\tthis.$container.appendChild(layout.header.render());\r\n\t\tthis.$container.appendChild(layout.dataArea.render());\r\n\t} else {\r\n\t\t// if no header config provided - make sure scheduler container has all necessary elements\r\n\t\tif(!hasSchedulerMarkup(this.$container)){\r\n\t\t\tthrow new Error([\r\n\t\t\t\t\"Required DOM elements are missing from the scheduler container.\",\r\n\t\t\t\t\"Be sure to either specify them manually in the markup: https://docs.dhtmlx.com/scheduler/initialization.html#initializingschedulerviamarkup\",\r\n\t\t\t\t\"Or to use **scheduler.config.header** setting so they could be created automatically: https://docs.dhtmlx.com/scheduler/initialization.html#initializingschedulerviaheaderconfig\"\r\n\t\t\t].join(\"\\n\"));\r\n\t\t}\r\n\t}\r\n\r\n\tif (this.config.rtl) this.$container.className += \" dhx_cal_container_rtl\";\r\n\r\n\t//hook for terrace skin\r\n\tif (this._skin_init)\r\n\t\tscheduler._skin_init();\r\n\r\n\tscheduler.date.init();\r\n\r\n\tthis._scroll=true;\r\n\r\n\tthis._els=[];\r\n\tthis.get_elements();\r\n\tthis.init_templates();\r\n\tthis.set_actions();\r\n\r\n\tthis._init_once();\r\n\tthis._init_touch_events();\r\n\r\n\tthis.set_sizes();\r\n\tscheduler.callEvent('onSchedulerReady', []);\r\n\tscheduler.$initialized = true;\r\n\tthis.setCurrentView(date,mode);\r\n\r\n};\r\n\r\nscheduler.xy={\r\n\tmin_event_height:20,\r\n\tbar_height: 24,\r\n\tscale_width:50,\r\n\tscroll_width:18,\r\n\tscale_height:20,\r\n\tmonth_scale_height:20,\r\n\tmenu_width:25,\r\n\tmargin_top:0,\r\n\tmargin_left:0,\r\n\teditor_width:140,\r\n\tmonth_head_height:22,\r\n\tevent_header_height: 14\r\n};\r\nscheduler.keys={\r\n\tedit_save:13,\r\n\tedit_cancel:27\r\n};\r\n\r\nscheduler.bind = function bind(functor, object){\r\n\tif(functor.bind)\r\n\t\treturn functor.bind(object);\r\n\telse\r\n\t\treturn function(){ return functor.apply(object,arguments); };\r\n};\r\n\r\nscheduler.set_sizes=function(){\r\n\r\n\tvar w = this._x = this._obj.clientWidth-this.xy.margin_left;\r\n\r\n\t//not-table mode always has scroll - need to be fixed in future\r\n\tvar scale_x=this._table_view?0:(this.xy.scale_width+this.xy.scroll_width);\r\n\r\n\tvar materialScalePlaceholder = this.$container.querySelector(\".dhx_cal_scale_placeholder\");\r\n\tif(scheduler._is_material_skin()){\r\n\t\tif(!materialScalePlaceholder) {\r\n\t\t\tmaterialScalePlaceholder = document.createElement(\"div\");\r\n\t\t\tmaterialScalePlaceholder.className = \"dhx_cal_scale_placeholder\";\r\n\t\t\tthis.$container.insertBefore(materialScalePlaceholder, this._els[\"dhx_cal_header\"][0]);\r\n\t\t}\r\n\t\tmaterialScalePlaceholder.style.display = \"block\";\r\n\r\n\t\tthis.set_xy(materialScalePlaceholder,w,this.xy.scale_height + 1,0, this._els[\"dhx_cal_header\"][0].offsetTop);\r\n\r\n\t}else{\r\n\t\tif(materialScalePlaceholder){\r\n\t\t\tmaterialScalePlaceholder.parentNode.removeChild(materialScalePlaceholder);\r\n\t\t}\r\n\t}\r\n\r\n\tif (this._lightbox) {\r\n\t\tif (scheduler.$container.offsetWidth < 1200) {\r\n\t\t} else {\r\n\t\t\tthis._setLbPosition(document.querySelector(\".dhx_cal_light\"));\r\n\t\t}\r\n\t}\r\n\r\n\tthis._data_width = w-scale_x;\r\n\r\n\tthis._els[\"dhx_cal_navline\"][0].style.width = w + \"px\";\r\n\tconst header = this._els[\"dhx_cal_header\"][0];\r\n\tthis.set_xy(header, this._data_width, this.xy.scale_height);\r\n\t// this._els[\"dhx_cal_header\"][0].style.marginLeft = `${scheduler.xy.scale_width}px`;\r\n\theader.style.left = ``;\r\n\theader.style.right = ``;\r\n\tif(!this._table_view){\r\n\t\tif(this.config.rtl){\r\n\t\t\theader.style.right = `${this.xy.scale_width}px`;\r\n\t\t}else{\r\n\t\t\theader.style.left = `${this.xy.scale_width}px`;\r\n\t\t}\r\n\t} else {\r\n\t\tif(!this.config.rtl){\r\n\t\t\theader.style.left = `-1px`;\r\n\t\t} else {\r\n\t\t\theader.style.right = `-1px`;\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.set_xy=function(node,w,h,x,y){\r\n\tfunction prepareValue(val){\r\n\t\tlet prepared = val;\r\n\t\tif(!isNaN(Number(prepared))){\r\n\t\t\tprepared = Math.max(0,prepared) + \"px\";\r\n\t\t}\r\n\t\treturn prepared;\r\n\t}\r\n\r\n\tvar direction = 'left';\r\n\r\n\tif(w !== undefined) {\r\n\t\tnode.style.width = prepareValue(w);\r\n\t}\r\n\r\n\tif(h !== undefined){\r\n\t\tnode.style.height = prepareValue(h);\r\n\t}\r\n\r\n\tif (arguments.length>3){\r\n\r\n\t\tif(x !== undefined){\r\n\t\t\tif (this.config.rtl) direction = 'right';\r\n\t\t\tnode.style[direction]=x+\"px\";\r\n\t\t}\r\n\t\tif(y !== undefined){\r\n\t\t\tnode.style.top=y+\"px\";\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.get_elements=function(){\r\n\t//get all child elements as named hash\r\n\tconst els=this._obj.getElementsByTagName(\"DIV\");\r\n\tfor (let i=0; i < els.length; i++){\r\n\t\tlet class_name= scheduler._getClassName(els[i]);\r\n\t\tconst attr_value = els[i].getAttribute(\"data-tab\") || els[i].getAttribute(\"name\") || \"\";\r\n\t\tif (class_name) class_name = class_name.split(\" \")[0];\r\n\t\tif (!this._els[class_name]) this._els[class_name]=[];\r\n\t\tthis._els[class_name].push(els[i]);\r\n\r\n\t\t//check if name need to be changed\r\n\t\t// scheduler.locale.labels[attr_value+\"_tab\"] - to fix getting labels for data-tab\r\n\t\tlet label = scheduler.locale.labels[attr_value+\"_tab\"] || scheduler.locale.labels[attr_value||class_name];\r\n\t\tif (typeof label !== \"string\" && attr_value && !els[i].innerHTML)\r\n\t\t\tlabel = attr_value.split(\"_\")[0];\r\n\t\tif (label) {\r\n\t\t\tthis._waiAria.labelAttr(els[i], label);\r\n\t\t\tels[i].innerHTML = label;\r\n\t\t}\r\n\t}\r\n};\r\n\r\n\r\nconst domEventsScope = scheduler._createDomEventScope();\r\n\r\nscheduler.unset_actions = function(){\r\n\tdomEventsScope.detachAll();\r\n};\r\n\r\nscheduler.set_actions=function(){\r\n\tfor (const a in this._els){\r\n\t\tif (this._click[a]){\r\n\t\t\tfor (let i=0; i < this._els[a].length; i++){\r\n\t\t\t\tconst element = this._els[a][i];\r\n\t\t\t\tconst handler = this._click[a].bind(element);\r\n\t\t\t\tdomEventsScope.attach(element, \"click\", handler);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tdomEventsScope.attach(this._obj, \"selectstart\", function(e){\r\n\t\te.preventDefault();\r\n\t\treturn false;\r\n\t});\r\n\t//this._obj.onselectstart=function(e){ return false; };\r\n\tdomEventsScope.attach(this._obj, \"mousemove\", function(e){\r\n\t\tif (!scheduler._temp_touch_block)\r\n\t\t\tscheduler._on_mouse_move(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"mousedown\", function(e){\r\n\t\tif (!scheduler._ignore_next_click)\r\n\t\t\tscheduler._on_mouse_down(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"mouseup\", function(e){\r\n\t\tif (!scheduler._ignore_next_click)\r\n\t\t\tscheduler._on_mouse_up(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"dblclick\", function(e){\r\n\t\tscheduler._on_dbl_click(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"contextmenu\", function(event) {\r\n\t\tif(scheduler.checkEvent(\"onContextMenu\")){\r\n\t\t\t// block the default browser context menu \r\n\t\t\tevent.preventDefault();\r\n\t\t}\r\n\r\n\t\tconst returnValue = scheduler.callEvent(\"onContextMenu\", [scheduler._locate_event(event.target), event]);\r\n\t\treturn returnValue;\r\n\t});\r\n};\r\nscheduler.select=function(id){\r\n\tif (this._select_id==id) return;\r\n\tscheduler._close_not_saved();\r\n\tthis.editStop(false);\r\n\tif(this._select_id){\r\n\t\tthis.unselect();\r\n\t}\r\n\tthis._select_id = id;\r\n\tthis.updateEvent(id);\r\n\tthis.callEvent(\"onEventSelected\", [id]);\r\n};\r\nscheduler.unselect=function(id){\r\n\tif (id && id!=this._select_id) {\r\n\t\treturn;\r\n\t}\r\n\tconst previousSelection = this._select_id;\r\n\tthis._select_id = null;\r\n\tif (previousSelection && this.getEvent(previousSelection)) {\r\n\t\tthis.updateEvent(previousSelection);\r\n\t}\r\n\tthis.callEvent(\"onEventUnselected\", [previousSelection]);\r\n};\r\nscheduler.getState=function(){\r\n\treturn {\r\n\t\tmode: this._mode,\r\n\t\tdate: new Date(this._date),\r\n\t\tmin_date: new Date(this._min_date),\r\n\t\tmax_date: new Date(this._max_date),\r\n\t\teditor_id: this._edit_id,\r\n\t\tlightbox_id: this._lightbox_id,\r\n\t\tnew_event: this._new_event,\r\n\t\tselect_id: this._select_id,\r\n\t\texpanded: this.expanded,\r\n\t\tdrag_id: this._drag_id,\r\n\t\tdrag_mode: this._drag_mode\r\n\t};\r\n};\r\nscheduler._click={\r\n\tdhx_cal_data:function(e){\r\n\t\t//in case of touch disable click processing\r\n\t\tif (scheduler._ignore_next_click){\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\r\n\t\tconst id = scheduler._locate_event(e.target);\r\n\r\n\t\tif (!id) {\r\n\t\t\tscheduler.callEvent(\"onEmptyClick\",[scheduler.getActionData(e).date, e]);\r\n\t\t} else {\r\n\t\t\tif ( !scheduler.callEvent(\"onClick\",[id,e]) || scheduler.config.readonly ) return;\r\n\t\t}\r\n\r\n\t\tif (id && scheduler.config.select) {\r\n\r\n\t\t\tscheduler.select(id);\r\n\t\t\tconst icon = e.target.closest(\".dhx_menu_icon\");\r\n\r\n\t\t\tconst mask = scheduler._getClassName(icon);\r\n\t\t\tif (mask.indexOf(\"_icon\")!=-1)\r\n\t\t\t\tscheduler._click.buttons[mask.split(\" \")[1].replace(\"icon_\",\"\")](id);\r\n\t\t} else{\r\n\t\t\tscheduler._close_not_saved();\r\n\t\t\tif (scheduler.getState().select_id && new Date().valueOf()-(scheduler._new_event||0) > 500){\r\n\t\t\t\tscheduler.unselect();\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tdhx_cal_prev_button:function(){\r\n\t\tscheduler._click.dhx_cal_next_button(0,-1);\r\n\t},\r\n\tdhx_cal_next_button:function(dummy,step){\r\n\t\tlet def_step = 1;\r\n\t\tif (scheduler.config.rtl){\r\n\t\t\tstep = -step;\r\n\t\t\tdef_step = -def_step;\r\n\t\t}\r\n\t\tscheduler.setCurrentView(scheduler.date.add( //next line changes scheduler._date , but seems it has not side-effects\r\n\t\t\tscheduler.date[scheduler._mode+\"_start\"](new Date(scheduler._date)),(step||def_step),scheduler._mode));\r\n\t},\r\n\tdhx_cal_today_button:function(){\r\n\t\tif (scheduler.callEvent(\"onBeforeTodayDisplayed\", [])) {\r\n\t\t\tscheduler.setCurrentView(scheduler._currentDate());\r\n\t\t}\r\n\t},\r\n\tdhx_cal_tab:function(){\r\n\t\tconst name = this.getAttribute(\"data-tab\");\r\n\t\tconst deprecated_name = this.getAttribute(\"name\");\r\n\t\tconst mode = name || deprecated_name.substring(0, deprecated_name.search(\"_tab\"));\r\n\t\tscheduler.setCurrentView(scheduler._date,mode);\r\n\t},\r\n\tbuttons:{\r\n\t\t\"delete\":function(id){\r\n\t\t\tconst c = scheduler.locale.labels.confirm_deleting;\r\n\t\t\tscheduler._dhtmlx_confirm({message: c, title: scheduler.locale.labels.title_confirm_deleting, callback:function(){ scheduler.deleteEvent(id); },\r\n\t\t\tconfig: {ok: scheduler.locale.labels.icon_delete}\r\n\t\t});\r\n\t\t},\r\n\t\tedit:function(id){ scheduler.edit(id); },\r\n\t\tsave:function(id){ scheduler.editStop(true); },\r\n\t\tdetails:function(id){ scheduler.showLightbox(id); },\r\n\t\tform:function(id){ scheduler.showLightbox(id); },\r\n\t\tcancel:function(id){ scheduler.editStop(false); }\r\n\t}\r\n};\r\nscheduler._dhtmlx_confirm = function({message, title, callback, config}) {\r\n\tif (!message)\r\n\t\treturn callback();\r\n\r\n\tconfig = config || {};\r\n\tconst opts = { ...config, text: message };\r\n\tif (title) {\r\n\t\topts.title = title;\r\n\t}\r\n\tif (callback) {\r\n\t\topts.callback = function(result) {\r\n\t\t\tif (result) {\r\n\t\t\t\tcallback();\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n\tscheduler.confirm(opts);\r\n};\r\nscheduler.addEventNow=function(start,end,e){\r\n\tlet base = {};\r\n\tif (scheduler._isObject(start) && !scheduler._isDate(start)){\r\n\t\tbase = start;\r\n\t\tstart = null;\r\n\t}\r\n\r\n\tconst duration = (this.config.event_duration||this.config.time_step)*60000;\r\n\tif (!start) start = base.start_date||Math.round((scheduler._currentDate()).valueOf()/duration)*duration;\r\n\tlet start_date = new Date(start);\r\n\tif (!end){\r\n\t\tlet start_hour = this.config.first_hour;\r\n\t\tif (start_hour > start_date.getHours()){\r\n\t\t\tstart_date.setHours(start_hour);\r\n\t\t\tstart = start_date.valueOf();\r\n\t\t}\r\n\t\tend = start.valueOf()+duration;\r\n\t}\r\n\tlet end_date = new Date(end);\r\n\r\n\t// scheduler.addEventNow(new Date(), new Date()) + collision though get_visible events defect (such event was not retrieved)\r\n\tif(start_date.valueOf() == end_date.valueOf())\r\n\t\tend_date.setTime(end_date.valueOf()+duration);\r\n\tbase.start_date = base.start_date||start_date;\r\n\tbase.end_date = base.end_date||end_date;\r\n\tbase.text = base.text||this.locale.labels.new_event;\r\n\tbase.id = this._drag_id = base.id || this.uid();\r\n\tthis._drag_mode=\"new-size\";\r\n\tthis._loading=true;\r\n\tconst eventId = this.addEvent(base);\r\n\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\tthis._loading=false;\r\n\r\n\tthis._drag_event={}; //dummy , to trigger correct event updating logic\r\n\tthis._on_mouse_up(e);\r\n\treturn eventId;\r\n};\r\nscheduler._on_dbl_click=function(e,src){\r\n\tsrc = src || e.target;\r\n\tif (this.config.readonly) return;\r\n\tconst name = scheduler._getClassName(src).split(\" \")[0];\r\n\tswitch(name){\r\n\t\tcase \"dhx_scale_holder\":\r\n\t\tcase \"dhx_scale_holder_now\":\r\n\t\tcase \"dhx_month_body\":\r\n\t\tcase \"dhx_wa_day_data\":\r\n\t\t\tif (!scheduler.config.dblclick_create) break;\r\n\t\t\tthis.addEventNow(this.getActionData(e).date,null,e);\r\n\t\t\tbreak;\r\n\t\tcase \"dhx_cal_event\":\r\n\t\tcase \"dhx_wa_ev_body\":\r\n\t\tcase \"dhx_agenda_line\":\r\n\t\tcase \"dhx_cal_agenda_event_line\":\r\n\t\tcase \"dhx_grid_event\":\r\n\t\tcase \"dhx_cal_event_line\":\r\n\t\tcase \"dhx_cal_event_clear\": {\r\n\t\t\tconst id = this._locate_event(src);\r\n\t\t\tif (!this.callEvent(\"onDblClick\",[id,e])) return;\r\n\t\t\tif (this.config.details_on_dblclick || this._table_view || !this.getEvent(id)._timed || !this.config.select)\r\n\t\t\t\tthis.showLightbox(id);\r\n\t\t\telse\r\n\t\t\t\tthis.edit(id);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tcase \"dhx_time_block\":\r\n\t\tcase \"dhx_cal_container\":\r\n\t\t\treturn;\r\n\t\tdefault: {\r\n\t\t\tconst viewHandler = this[\"dblclick_\"+name];\r\n\t\t\tif (viewHandler) {\r\n\t\t\t\tviewHandler.call(this,e);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif (src.parentNode && src != this)\r\n\t\t\t\t\treturn scheduler._on_dbl_click(e,src.parentNode);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n};\r\n//column index by mouse x-coordinate\r\nscheduler._get_column_index = function(x_pos){\r\n\tlet column = 0;\r\n\tif (this._cols){\r\n\t\tlet width = 0;\r\n\t\tlet i = 0;\r\n\t\twhile (width + this._cols[i] < x_pos && i < this._cols.length){\r\n\t\t\twidth += this._cols[i];\r\n\t\t\ti++;\r\n\t\t}\r\n\t\tcolumn = i + (this._cols[i] ? ((x_pos - width)/ this._cols[i]) : 0);\r\n\r\n\t\tif (this._ignores){\r\n\t\t\tif(column >= this._cols.length){\r\n\t\t\t\twhile(column >= 1 && this._ignores[Math.floor(column)]){\r\n\t\t\t\t\tcolumn--;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n\treturn column;\r\n};\r\n\r\n//transform mouse coordinates to day-time indexes of week based view\r\nscheduler._week_indexes_from_pos = function(pos){\r\n\t//\"get position\" can be invoked before columns are loaded into the units view(e.g. by onMouseMove handler in key_nav.js)\r\n\tif(!this._cols){\r\n\t\treturn pos;\r\n\t}else{\r\n\t\tconst column = this._get_column_index(pos.x);\r\n\r\n\t\tpos.x=Math.min(this._cols.length-1, Math.max(0,Math.ceil(column)-1));\r\n\t\tpos.y=Math.max(0,Math.ceil(pos.y*60/(this.config.time_step*this.config.hour_size_px))-1)+this.config.first_hour*(60/this.config.time_step);\r\n\t\treturn pos;\r\n\t}\r\n};\r\n\r\nscheduler._mouse_coords=function(ev){\r\n\tlet pos;\r\n\tconst body = document.body;\r\n\tconst documentElement = document.documentElement;\r\n\tif (!this.$env.isIE && (ev.pageX || ev.pageY))\r\n\t\tpos={x:ev.pageX, y:ev.pageY};\r\n\telse pos={\r\n\t\tx:ev.clientX + (body.scrollLeft||documentElement.scrollLeft||0) - body.clientLeft,\r\n\t\ty:ev.clientY + (body.scrollTop||documentElement.scrollTop||0) - body.clientTop\r\n\t};\r\n\t//apply layout\r\n\tif (this.config.rtl && this._colsS) {\r\n\t\tpos.x = this.$container.querySelector(\".dhx_cal_data\").offsetWidth - pos.x;\r\n\t\tpos.x += this.$domHelpers.getAbsoluteLeft(this._obj);\r\n\t\tif (this._mode !== \"month\") {\r\n\t\t\tpos.x -= this.xy.scale_width;\r\n\t\t}\r\n\t} else {\r\n\t\tpos.x-=this.$domHelpers.getAbsoluteLeft(this._obj)+(this._table_view?0:this.xy.scale_width);\r\n\t}\r\n\r\n\tconst dataArea = this.$container.querySelector(\".dhx_cal_data\");\r\n\t//pos.y-=this.$domHelpers.getAbsoluteTop(this._obj)+this.xy.nav_height+(this._dy_shift||0)+this.xy.scale_height-this._els[\"dhx_cal_data\"][0].scrollTop;\r\n\tpos.y-=this.$domHelpers.getAbsoluteTop(dataArea)-this._els[\"dhx_cal_data\"][0].scrollTop;\r\n\tpos.ev = ev;\r\n\tconst handler = this[\"mouse_\"+this._mode];\r\n\tif (handler){\r\n\t\tpos = handler.call(this,pos);\r\n\t}else{\r\n\t\t//transform to date\r\n\t\tif (!this._table_view) {\r\n\t\t\tpos = this._week_indexes_from_pos(pos);\r\n\t\t} else {\r\n\t\t\tconst column = this._get_column_index(pos.x);\r\n\t\t\tif (!this._cols || !this._colsS) // agenda/map views\r\n\t\t\t\treturn pos;\r\n\t\t\tlet dy=0;\r\n\t\t\tfor (dy=1; dy < this._colsS.heights.length; dy++)\r\n\t\t\t\tif (this._colsS.heights[dy]>pos.y) break;\r\n\r\n\t\t\tpos.y=Math.ceil( (Math.max(0, column)+Math.max(0,dy-1)*7)*24*60/this.config.time_step );\r\n\r\n\t\t\tif (scheduler._drag_mode || this._mode == \"month\")\r\n\t\t\t\tpos.y=(Math.max(0,Math.ceil(column)-1)+Math.max(0,dy-1)*7)*24*60/this.config.time_step;\r\n\r\n\t\t\t//we care about ignored days only during event moving in month view\r\n\t\t\tif (this._drag_mode == \"move\"){\r\n\t\t\t\tif (scheduler._ignores_detected && scheduler.config.preserve_length){\r\n\t\t\t\t\tpos._ignores = true;\r\n\t\t\t\t\t//get real lengtn of event\r\n\t\t\t\t\tif (!this._drag_event._event_length)\r\n\t\t\t\t\t\tthis._drag_event._event_length = this._get_real_event_length(this._drag_event.start_date, this._drag_event.end_date, { x_step:1, x_unit:\"day\"});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tpos.x=0;\r\n\t\t}\r\n\t}\r\n\tpos.timestamp = +new Date();\r\n\treturn pos;\r\n};\r\nscheduler._close_not_saved=function(){\r\n\tif (new Date().valueOf()-(scheduler._new_event||0) > 500 && scheduler._edit_id){\r\n\t\tconst confirmationText=scheduler.locale.labels.confirm_closing;\r\n\r\n\t\tscheduler._dhtmlx_confirm({\r\n\t\t\tmessage: confirmationText, \r\n\t\t\ttitle: scheduler.locale.labels.title_confirm_closing, \r\n\t\t\tcallback: function() { \r\n\t\t\t\tscheduler.editStop(scheduler.config.positive_closing);\r\n\t\t\t}\r\n\t\t});\r\n\t\tif(confirmationText){\r\n\t\t\tthis._drag_id = this._drag_pos = this._drag_mode = null;\r\n\t\t}\r\n\t}\r\n};\r\nscheduler._correct_shift=function(start, back){\r\n\treturn start-=((new Date(scheduler._min_date)).getTimezoneOffset()-(new Date(start)).getTimezoneOffset())*60000*(back?-1:1);\r\n};\r\n\r\nscheduler._is_pos_changed = function(old_pos, new_pos){\r\n\tfunction diff(old_val, new_val, acc){\r\n\t\treturn !!(Math.abs(old_val - new_val) > acc);\r\n\t}\r\n\r\n\tif(!(old_pos && this._drag_pos)){\r\n\t\treturn true;\r\n\t}\r\n\tconst delay = 100;\r\n\tconst d_pos = 5;\r\n\r\n\t// start drag only if passed some time since mouse down, or if mouse position changed sufficiently\r\n\treturn !!(this._drag_pos.has_moved || !this._drag_pos.timestamp || (new_pos.timestamp - this._drag_pos.timestamp > delay) || diff(old_pos.ev.clientX, new_pos.ev.clientX, d_pos) || diff(old_pos.ev.clientY, new_pos.ev.clientY, d_pos));\r\n};\r\n\r\nscheduler._correct_drag_start_date = function(start){\r\n\tlet obj;\r\n\tif (scheduler.matrix)\r\n\t\tobj = scheduler.matrix[scheduler._mode];\r\n\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\tstart = new Date(start);\r\n\tlet len = 1;\r\n\tif(obj._start_correction || obj._end_correction)\r\n\t\tlen = (obj.last_hour||0)*60 - (start.getHours()*60+start.getMinutes()) || 1;\r\n\r\n\treturn start*1 + (scheduler._get_fictional_event_length(start, len, obj) - len);\r\n};\r\nscheduler._correct_drag_end_date = function(start, duration){\r\n\tlet obj;\r\n\tif (scheduler.matrix) {\r\n\t\tobj = scheduler.matrix[scheduler._mode];\r\n\t}\r\n\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\tconst end = start*1 + scheduler._get_fictional_event_length(start, duration, obj);\r\n\treturn new Date(end*1 - (scheduler._get_fictional_event_length(end, -1, obj, -1) + 1));\r\n};\r\n\r\nscheduler._on_mouse_move=function(e){\r\n\tif (this._drag_mode){\r\n\t\tvar pos=this._mouse_coords(e);\r\n\t\tif (this._is_pos_changed(this._drag_pos, pos)){\r\n\t\t\tvar start, end;\r\n\t\t\tif (this._edit_id!=this._drag_id)\r\n\t\t\t\tthis._close_not_saved();\r\n\r\n\t\t\tif(!this._drag_mode)\r\n\t\t\t\treturn;\r\n\r\n\t\t\tvar mousedownPos = null;\r\n\t\t\tif(this._drag_pos && !this._drag_pos.has_moved){\r\n\t\t\t\tmousedownPos = this._drag_pos;\r\n\t\t\t\tmousedownPos.has_moved = true;\r\n\t\t\t}\r\n\r\n\t\t\tthis._drag_pos = pos;\r\n\r\n\t\t\tthis._drag_pos.has_moved = true;\r\n\r\n\t\t\tif (this._drag_mode==\"create\"){\r\n\r\n\t\t\t\t// use mouse down position as a starting point for drag-create\r\n\t\t\t\tif(mousedownPos){\r\n\t\t\t\t\tpos = mousedownPos;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis._close_not_saved();\r\n\t\t\t\tthis.unselect(this._select_id);\r\n\t\t\t\tthis._loading=true; //will be ignored by dataprocessor\r\n\r\n\t\t\t\tstart = this._get_date_from_pos(pos).valueOf();\r\n\r\n\t\t\t\tif (!this._drag_start) {\r\n\t\t\t\t\tvar res = this.callEvent(\"onBeforeEventCreated\", [e, this._drag_id]);\r\n\t\t\t\t\tif (!res){\r\n\t\t\t\t\t\tthis._loading=false;\r\n\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis._loading=false;\r\n\t\t\t\t\tthis._drag_start=start;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tend = start;\r\n\t\t\t\tif (end == this._drag_start) {\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar start_date = new Date(this._drag_start);\r\n\t\t\t\tvar end_date = new Date(end);\r\n\t\t\t\tif ( (this._mode == \"day\" || this._mode == \"week\") &&\r\n\t\t\t\t\t(start_date.getHours() == end_date.getHours() &&\r\n\t\t\t\t\tstart_date.getMinutes() == end_date.getMinutes()) ) {\r\n\t\t\t\t\t\tend_date = new Date(this._drag_start+1000);\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\tthis._drag_id=this.uid();\r\n\t\t\t\tthis.addEvent(start_date, end_date, this.locale.labels.new_event, this._drag_id, pos.fields);\r\n\r\n\t\t\t\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\t\t\t\tthis._loading=false;\r\n\t\t\t\tthis._drag_mode=\"new-size\";\r\n\r\n\t\t\t}\r\n\r\n\t\t\tvar timeStep = this.config.time_step;\r\n\t\t\tvar ev=this.getEvent(this._drag_id);\r\n\t\t\tvar obj;\r\n\t\t\tif (scheduler.matrix)\r\n\t\t\t\tobj = scheduler.matrix[scheduler._mode];\r\n\t\t\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\t\t\tif (this._drag_mode==\"move\"){\r\n\t\t\t\tstart = this._min_date.valueOf()+(pos.y*this.config.time_step+pos.x*24*60)*60000;\r\n\t\t\t\tif (!pos.custom && this._table_view) {\r\n\t\t\t\t\tstart += this.date.time_part(ev.start_date) * 1000;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!this._table_view && this._dragEventBody && this._drag_event._move_event_shift === undefined) {\r\n\t\t\t\t\tthis._drag_event._move_event_shift = start - ev.start_date;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (this._drag_event._move_event_shift) {\r\n\t\t\t\t\tstart -= this._drag_event._move_event_shift;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tstart = this._correct_shift(start);\r\n\r\n\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view && obj){\r\n\r\n\t\t\t\t\tstart = scheduler._correct_drag_start_date(start);\r\n\t\t\t\t\tend = scheduler._correct_drag_end_date(start,this._drag_event._event_length);\r\n\r\n\t\t\t\t} else\r\n\t\t\t\t\tend = ev.end_date.valueOf()-(ev.start_date.valueOf()-start);\r\n\t\t\t} else { // resize\r\n\t\t\t\tstart = ev.start_date.valueOf();\r\n\t\t\t\tend = ev.end_date.valueOf();\r\n\t\t\t\tif (this._table_view) {\r\n\t\t\t\t\tvar resize_date = this._min_date.valueOf()+pos.y*this.config.time_step*60000 + (pos.custom?0:24*60*60000);\r\n\t\t\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\t\t\tresize_date = this._correct_shift(resize_date, false);\r\n\t\t\t\t\t\tif( this._drag_from_start ) {\r\n\t\t\t\t\t\t\tvar day = 24*60*60000;\r\n\t\t\t\t\t\t\tif( resize_date <= scheduler.date.date_part(new Date(end+day-1)).valueOf() ) // to get end time as 23:59:59 and then the day start\r\n\t\t\t\t\t\t\t\tstart = resize_date - day;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tend = resize_date;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif(this.config.preserve_length) {\r\n\t\t\t\t\t\t\tif (pos.resize_from_start) {\r\n\t\t\t\t\t\t\t\tstart = scheduler._correct_drag_start_date(resize_date);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tend = scheduler._correct_drag_end_date(resize_date, 0);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tif (pos.resize_from_start) {\r\n\t\t\t\t\t\t\t\tstart = resize_date;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tend = resize_date;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvar end_day_start = this.date.date_part(new Date(ev.end_date.valueOf() - 1)).valueOf();\r\n\t\t\t\t\tvar end_day_date = new Date(end_day_start);\r\n\t\t\t\t\tvar firstHour = this.config.first_hour;\r\n\t\t\t\t\tvar lastHour = this.config.last_hour;\r\n\t\t\t\t\tvar maxY = (lastHour - firstHour) * (60/timeStep);\r\n\r\n\t\t\t\t\tthis.config.time_step = 1;\r\n\t\t\t\t\tvar precisePos = this._mouse_coords(e);\r\n\t\t\t\t\tthis.config.time_step = timeStep;\r\n\r\n\t\t\t\t\tvar minDate = pos.y*timeStep*60000;\r\n\t\t\t\t\tvar maxDate = Math.min(pos.y + 1, maxY)*timeStep*60000;\r\n\t\t\t\t\tvar preciseDate = precisePos.y*60000;\r\n\r\n\t\t\t\t\t// rounding end date to the closest time step\r\n\t\t\t\t\tif(Math.abs(minDate - preciseDate) > Math.abs(maxDate - preciseDate)){\r\n\t\t\t\t\t\tend = end_day_start + maxDate;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tend = end_day_start + minDate;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = end + ((new Date(end)).getTimezoneOffset() - end_day_date.getTimezoneOffset()) * 60000;\r\n\t\t\t\t\tthis._els[\"dhx_cal_data\"][0].style.cursor=\"s-resize\";\r\n\t\t\t\t\tif (this._mode == \"week\" || this._mode == \"day\")\r\n\t\t\t\t\t\tend = this._correct_shift(end);\r\n\t\t\t\t}\r\n\t\t\t\tif (this._drag_mode == \"new-size\") {\r\n\t\t\t\t\tif (end <= this._drag_start){\r\n\t\t\t\t\t\tvar shift = pos.shift||((this._table_view && !pos.custom)?24*60*60000:0);\r\n\t\t\t\t\t\tstart = end-(pos.shift?0:shift);\r\n\t\t\t\t\t\tend = this._drag_start+(shift||(timeStep*60000));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tstart = this._drag_start;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (end<=start)\r\n\t\t\t\t\t\tend=start+timeStep*60000;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar new_end = new Date(end-1);\r\n\t\t\tvar new_start = new Date(start);\r\n\t\t\t//deny drag out of visible scheduler scale in timeline view\r\n\t\t\tif(this._drag_mode==\"move\" && scheduler.config.limit_drag_out &&\r\n\t\t\t\t(+new_start < +scheduler._min_date || +end > +scheduler._max_date)){\r\n\r\n\t\t\t\tif(+ev.start_date < +scheduler._min_date || +ev.end_date > +scheduler._max_date){\r\n\t\t\t\t\t// not move event if it's already outside time scale\r\n\t\t\t\t\tnew_start = new Date(ev.start_date);\r\n\t\t\t\t\tend = new Date(ev.end_date);\r\n\t\t\t\t}else{\r\n\r\n\t\t\t\t\tvar duration = end - new_start;\r\n\r\n\t\t\t\t\tif(+new_start < +scheduler._min_date){\r\n\t\t\t\t\t\tnew_start = new Date(scheduler._min_date);\r\n\t\t\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view){\r\n\t\t\t\t\t\t\tnew_start = new Date(scheduler._correct_drag_start_date(new_start));\r\n\t\t\t\t\t\t\tif(obj._start_correction)\r\n\t\t\t\t\t\t\t\tnew_start = new Date(new_start.valueOf() + obj._start_correction);\r\n\t\t\t\t\t\t\tend = new Date(new_start*1 + this._get_fictional_event_length(new_start, this._drag_event._event_length, obj));\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tend = new Date(+new_start + duration);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tend = new Date(scheduler._max_date);\r\n\r\n\t\t\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view){\r\n\t\t\t\t\t\t\tif(obj._end_correction)\r\n\t\t\t\t\t\t\t\tend = new Date(end.valueOf() - obj._end_correction);\r\n\t\t\t\t\t\t\tend = new Date(end*1 - this._get_fictional_event_length(end, 0, obj, true));\r\n\t\t\t\t\t\t\tnew_start = new Date(end*1 - this._get_fictional_event_length(end, this._drag_event._event_length, obj, true));\r\n\t\t\t\t\t\t\tif(this._ignores_detected){\r\n\t\t\t\t\t\t\t\tnew_start = scheduler.date.add(new_start, obj.x_step, obj.x_unit);\r\n\t\t\t\t\t\t\t\tend = new Date(end*1 - this._get_fictional_event_length(end, 0, obj, true));\r\n\t\t\t\t\t\t\t\tend = scheduler.date.add(end, obj.x_step, obj.x_unit);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tnew_start = new Date(+end - duration);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t\tvar new_end = new Date(end-1);\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\t// fix event dates when resized to bottom of the column (day/week views)\r\n\t\t\tif(!this._table_view && this._dragEventBody &&\r\n\t\t\t\t!scheduler.config.all_timed &&\r\n\t\t\t\t((!scheduler._get_section_view() && pos.x != this._get_event_sday({start_date: new Date(start), end_date:new Date(start)})) || new Date(start).getHours() < this.config.first_hour)){\r\n\t\t\t\tvar duration = end - new_start;\r\n\t\t\t\tif (this._drag_mode == \"move\") {\r\n\t\t\t\t\tvar day = this._min_date.valueOf() + (pos.x * 24 * 60) * 60000;\r\n\t\t\t\t\tnew_start = new Date(day);\r\n\t\t\t\t\tnew_start.setHours(this.config.first_hour);\r\n\t\t\t\t\tend = new Date(new_start.valueOf() + duration);\r\n\t\t\t\t\tnew_end = new Date(end-1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// fix event dates when resized to bottom of the column (day/week views)\r\n\t\t\tif(!this._table_view &&\r\n\t\t\t\t!scheduler.config.all_timed &&\r\n\t\t\t\t((!scheduler.getView() && pos.x != this._get_event_sday({start_date: new Date(end), end_date:new Date(end)})) || new Date(end).getHours() >= this.config.last_hour)){\r\n\t\t\t\tvar duration = end - new_start;\r\n\t\t\t\tvar day = this._min_date.valueOf()+(pos.x*24*60)*60000;\r\n\t\t\t\tend = scheduler.date.date_part(new Date(day));\r\n\t\t\t\tend.setHours(this.config.last_hour);\r\n\t\t\t\tnew_end = new Date(end-1);\r\n\t\t\t\tif(this._drag_mode == \"move\"){\r\n\t\t\t\t\tnew_start = new Date(+end - duration);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//prevent out-of-borders situation for day|week view\r\n\t\t\tif ( this._table_view || (new_end.getDate()==new_start.getDate() && new_end.getHours()=ed)\r\n\t\t\t\tcls += ' dhx_after';\r\n\t\t\telse if (sd.valueOf()==cd.valueOf())\r\n\t\t\t\tcls += ' dhx_now';\r\n\r\n\t\t\tif (this._ignores_detected && this._ignores[j]){\r\n\t\t\t\tcls += \" dhx_scale_ignore\";\r\n\t\t\t}\r\n\r\n\t\t\tcell.className = cls + \" \" + this.templates.month_date_class(sd, cd);\r\n\r\n\t\t\tcell.setAttribute(\"data-cell-date\", scheduler.templates.format_date(sd));\r\n\t\t\tvar body_class = \"dhx_month_body\";\r\n\t\t\tvar head_class = \"dhx_month_head\";\r\n\t\t\tif (j === 0 && this.config.left_border) {\r\n\t\t\t\tbody_class += \" dhx_month_body_border\";\r\n\t\t\t\thead_class += \" dhx_month_head_border\";\r\n\t\t\t}\r\n\t\t\tif (!this._ignores_detected || !this._ignores[j]){\r\n\t\t\t\tcell.style.width = tdwidths[j];\r\n\t\t\t\tthis._waiAria.monthCellAttr(cell, sd);\r\n\r\n\t\t\t\tvar cellHead = document.createElement(\"div\");\r\n\t\t\t\tcellHead.style.height = scheduler.xy.month_head_height + \"px\";\r\n\t\t\t\tcellHead.className = head_class;\r\n\t\t\t\tcellHead.innerHTML = this.templates.month_day(sd);\r\n\t\t\t\tcell.appendChild(cellHead);\r\n\r\n\t\t\t\tvar cellBody = document.createElement(\"div\");\r\n\t\t\t\tcellBody.className = body_class;\r\n\t\t\t\t// cellBody.style.height = row_height + \"px\";\r\n\t\t\t\t// cellBody.style.width = tdwidths[j];\r\n\t\t\t\tcell.appendChild(cellBody);\r\n\r\n\t\t\t} else {\r\n\t\t\t\tcell.appendChild(document.createElement(\"div\"));\r\n\t\t\t\tcell.appendChild(document.createElement(\"div\"));\r\n\t\t\t}\r\n\t\t\trendered_dates.push(sd);\r\n\t\t\tvar bf1 = sd.getDate();\r\n\t\t\tsd=this.date.add(sd,1,\"day\");\r\n\t\t\tif (sd.getDate() - bf1 > 1)\r\n\t\t\t\tsd = new Date(sd.getFullYear(), sd.getMonth(), bf1 + 1, 12, 0);\r\n\t\t}\r\n\r\n\t\tscheduler._colsS.heights[i] = cellheight;\r\n\t\tcellheight += getCellHeight(i);\r\n\t}\r\n\r\n\tthis._min_date = view_start;\r\n\tthis._max_date = sd;\r\n\r\n\tdiv.innerHTML = \"\";\r\n\tdiv.appendChild(table);\r\n\r\n\tthis._scales = {};\r\n\tvar cells = div.querySelectorAll('[data-cell-date]');\r\n\tcells.forEach((cell) => {\r\n\t\tconst date = scheduler.templates.parse_date(cell.getAttribute(\"data-cell-date\"));\r\n\t\tconst body = cell.querySelector(\".dhx_month_body\");\r\n\t\tthis._scales[+date] = body;\r\n\t\tthis.callEvent(\"onScaleAdd\", [this._scales[+date], date]);\r\n\t});\r\n\r\n\treturn this._max_date;\r\n};\r\n\r\nscheduler._reset_month_scale=function(b,dd,sd,rows){\r\n\t//recalculates rows height and redraws month layout\r\n\tvar ed=scheduler.date.add(dd,1,\"month\");\r\n\r\n\t//trim time part for comparison reasons\r\n\tvar cd = scheduler._currentDate();\r\n\tthis.date.date_part(cd);\r\n\tthis.date.date_part(sd);\r\n\r\n\trows = rows || Math.ceil(Math.round((ed.valueOf()-sd.valueOf()) / (60*60*24*1000) ) / 7);\r\n\r\n\tvar height = (Math.floor(b.clientHeight/rows) - this.xy.month_head_height);\r\n\r\n\tthis._colsS.height = height + this.xy.month_head_height;\r\n\tthis._colsS.heights = [];\r\n\r\n\treturn scheduler._render_month_scale(b, dd, sd, rows);\r\n\r\n};\r\n\r\nscheduler.getView = function (viewName) {\r\n\tif (!viewName) {\r\n\t\tviewName = scheduler.getState().mode;\r\n\t}\r\n\tif (scheduler.matrix && scheduler.matrix[viewName]) {\r\n\t\treturn scheduler.matrix[viewName];\r\n\t}\r\n\r\n\tif (scheduler._props && scheduler._props[viewName]) {\r\n\t\treturn scheduler._props[viewName];\r\n\t}\r\n\r\n\treturn null;\r\n};\r\n\r\nscheduler.getLabel = function(property, key) {\r\n\tvar sections = this.config.lightbox.sections;\r\n\tfor (var i=0; i scheduler.getState().max_date.valueOf()){\r\n\t\t\tendColumnIndex += getDaysDifference(endDate, scheduler.getState().max_date);\r\n\t\t}\r\n\t} else{\r\n\t\tendColumnIndex = Math.round(eventLength/60/60/1000/24);\r\n\t}\r\n\r\n\tvar last_column = true;\r\n\twhile (startColumnIndex < endColumnIndex){\r\n\t\tvar check = scheduler.date.add(endDate, -config.x_step, config.x_unit);\r\n\t\tif (ignore && ignore(endDate) && (!last_column || (last_column && ignore(check) ))){\r\n\t\t\teventLength -= (endDate-check);\r\n\r\n\t\t}else{\r\n\t\t\tlet excludedDuration = 0;\r\n\t\t\tconst intervalStart = new Date(Math.max(check.valueOf(), startDate.valueOf()));\r\n\t\t\tconst intervalEnd = endDate;\r\n\t\t\tconst leftCellCutOffStart = new Date(intervalStart.getFullYear(), intervalStart.getMonth(), intervalStart.getDate(), config.first_hour);\r\n\t\t\tconst leftCellCutOffEnd = new Date(intervalStart.getFullYear(), intervalStart.getMonth(), intervalStart.getDate(), config.last_hour||24);\r\n\t\t\tconst rightCellCutOffStart = new Date(endDate.getFullYear(), endDate.getMonth(), endDate.getDate(), config.first_hour);\r\n\t\t\tconst rightCellCutOffEnd = new Date(endDate.getFullYear(), endDate.getMonth(), endDate.getDate(), config.last_hour||24);\r\n\r\n\t\t\tif(intervalEnd.valueOf() > rightCellCutOffEnd.valueOf()){\r\n\t\t\t\texcludedDuration += intervalEnd - rightCellCutOffEnd;\r\n\t\t\t}\r\n\r\n\t\t\tif(intervalEnd.valueOf() > rightCellCutOffStart.valueOf()){\r\n\t\t\t\texcludedDuration += config._start_correction;\r\n\t\t\t} else {\r\n\t\t\t\texcludedDuration += intervalEnd.getHours()*60*60*1000 + intervalEnd.getMinutes()*60*1000;\r\n\t\t\t}\r\n\r\n\t\t\tif(intervalStart.valueOf() < leftCellCutOffEnd.valueOf()){\r\n\t\t\t\texcludedDuration += config._end_correction;\r\n\t\t\t}\r\n\r\n\t\t\tif(intervalStart.valueOf() < leftCellCutOffStart.valueOf()){\r\n\t\t\t\texcludedDuration += (leftCellCutOffStart.valueOf() - intervalStart.valueOf());\r\n\t\t\t}\r\n\t\t\t\r\n\r\n\t\t\teventLength -= excludedDuration;\r\n\t\t\tlast_column = false;\r\n\t\t}\r\n\t\tendDate = check;\r\n\t\tendColumnIndex--;\r\n\t}\r\n\treturn eventLength;\r\n};\r\nscheduler._get_fictional_event_length=function(end_date, ev_length, obj, back){\r\n\tvar sd = new Date(end_date);\r\n\tvar dir = back ? -1 : 1;\r\n\r\n\t//get difference caused by first|last hour\r\n\tif (obj._start_correction || obj._end_correction){\r\n\t\tvar today;\r\n\t\tif (back)\r\n\t\t\ttoday = (sd.getHours()*60+sd.getMinutes()) - (obj.first_hour||0)*60;\r\n\t\telse\r\n\t\t\ttoday = (obj.last_hour||0)*60 - (sd.getHours()*60+sd.getMinutes());\r\n\t\tvar per_day = (obj.last_hour - obj.first_hour)*60;\r\n\t\tvar days = Math.ceil( (ev_length / (60*1000) - today ) / per_day);\r\n\t\tif(days < 0) days = 0;\r\n\t\tev_length += days * (24*60 - per_day) * 60 * 1000;\r\n\t}\r\n\r\n\tvar fd = new Date(end_date*1+ev_length*dir);\r\n\tvar ignore = this[\"ignore_\"+this._mode];\r\n\r\n\tvar start_slot = 0,\r\n\t\tend_slot;\r\n\tif (obj.render){\r\n\t\tstart_slot = this._get_date_index(obj, sd);\r\n\t\tend_slot = this._get_date_index(obj, fd);\r\n\t} else{\r\n\t\tend_slot = Math.round(ev_length/60/60/1000/24);\r\n\t}\r\n\r\n\twhile (start_slot*dir <= end_slot*dir){\r\n\t\tvar check = scheduler.date.add(sd, obj.x_step*dir, obj.x_unit);\r\n\t\tif (ignore && ignore(sd)){\r\n\t\t\tev_length += (check-sd)*dir;\r\n\t\t\tend_slot += dir;\r\n\t\t}\r\n\r\n\t\tsd = check;\r\n\t\tstart_slot+=dir;\r\n\t}\r\n\r\n\treturn ev_length;\r\n};\r\n\r\nscheduler._get_section_view = function(){\r\n\treturn this.getView();\r\n};\r\n\r\nscheduler._get_section_property = function(){\r\n\tif(this.matrix && this.matrix[this._mode]){\r\n\t\treturn this.matrix[this._mode].y_property;\r\n\t}else if(this._props && this._props[this._mode]){\r\n\t\treturn this._props[this._mode].map_to;\r\n\t}\r\n\treturn null;\r\n};\r\n\r\nscheduler._is_initialized = function(){\r\n\tvar state = this.getState();\r\n\treturn (this._obj && state.date && state.mode);\r\n};\r\nscheduler._is_lightbox_open = function(){\r\n\tvar state = this.getState();\r\n\treturn state.lightbox_id !== null && state.lightbox_id !== undefined;\r\n};\r\n\r\n}","export default {\r\n\tevent: function (el, event, handler){\r\n\t\tif (el.addEventListener)\r\n\t\t\tel.addEventListener(event, handler, false);\r\n\t\r\n\t\telse if (el.attachEvent)\r\n\t\t\tel.attachEvent(\"on\"+event, handler);\r\n\t},\r\n\teventRemove: function (el, event, handler){\r\n\t\tif (el.removeEventListener)\r\n\t\t\tel.removeEventListener(event, handler, false);\r\n\t\r\n\t\telse if (el.detachEvent)\r\n\t\t\tel.detachEvent(\"on\"+event, handler);\r\n\t}\r\n};","import defaultDomEvents from './event';\r\n\r\nexport default function(){\r\n\r\n\tvar domEvents = function (addEvent, removeEvent) {\r\n\t\taddEvent = addEvent || defaultDomEvents.event;\r\n\t\tremoveEvent = removeEvent || defaultDomEvents.eventRemove;\r\n\t\tvar handlers = [];\r\n\t\tvar eventScope = {\r\n\t\t\tattach: function(el, event, callback, capture){\r\n\t\t\t\thandlers.push({element: el, event:event, callback: callback, capture: capture});\r\n\t\t\t\taddEvent(el, event, callback, capture);\r\n\t\t\t},\r\n\t\t\tdetach: function(el, event, callback, capture){\r\n\t\t\t\tremoveEvent(el, event, callback, capture);\r\n\t\t\t\tfor(var i = 0; i < handlers.length; i++){\r\n\t\t\t\t\tvar handler = handlers[i];\r\n\t\t\t\t\tif (handler.element === el && handler.event === event && handler.callback === callback && handler.capture === capture) {\r\n\t\t\t\t\t\thandlers.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tdetachAll: function () {\r\n\t\t\t\tvar staticArray = handlers.slice();\r\n\t\t\t\t// original handlers array can be spliced on every iteration\r\n\t\t\t\tfor (var i = 0; i < staticArray.length; i++){\r\n\t\t\t\t\tvar handler = staticArray[i];\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, handler.capture);\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, undefined);\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, false);\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, true);\r\n\t\t\t\t}\r\n\t\t\t\thandlers.splice(0, handlers.length);\r\n\t\t\t},\r\n\t\t\textend: function(){\r\n\t\t\t\treturn domEvents(this.event, this.eventRemove);\r\n\t\t\t}\r\n\t\t};\r\n\t\treturn eventScope;\r\n\t};\r\n\t\r\n\treturn domEvents();\r\n}","import createEventScope from './utils/scoped_event';\r\n\r\nexport default function extend(scheduler) {\r\n\r\n\r\nvar domEvents = createEventScope();\r\n\r\nscheduler.event = domEvents.attach;\r\nscheduler.eventRemove = domEvents.detach;\r\nscheduler._eventRemoveAll = domEvents.detachAll;\r\nscheduler._createDomEventScope = domEvents.extend;\r\n\r\n\r\nscheduler._trim = function(str){\r\n\tvar func = String.prototype.trim || function(){ return this.replace(/^\\s+|\\s+$/g, \"\"); };\r\n\treturn func.apply(str);\r\n};\r\n\r\nscheduler._isDate = function(obj){\r\n\tif (obj && typeof obj == \"object\") {\r\n\t\treturn !!(obj.getFullYear && obj.getMonth && obj.getDate);\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n};\r\n\r\nscheduler._isObject = function(obj){\r\n\treturn (obj && typeof obj == \"object\");\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n(function(){\r\n\r\n\t// eslint-disable-next-line no-control-regex\r\n\tvar htmlTags = new RegExp(\"<(?:.|\\n)*?>\", \"gm\");\r\n\tvar extraSpaces = new RegExp(\" +\", \"gm\");\r\n\r\n\tfunction stripHTMLLite(htmlText){\r\n\t\treturn (htmlText + \"\")\r\n\t\t\t.replace(htmlTags, \" \").\r\n\t\t\treplace(extraSpaces, \" \");\r\n\t}\r\n\r\n\tvar singleQuotes = new RegExp(\"'\", \"gm\");\r\n\tfunction escapeQuotes(text){\r\n\t\treturn (text + \"\").replace(singleQuotes, \"'\");\r\n\t}\r\n\r\n\tscheduler._waiAria = {\r\n\t\tgetAttributeString: function(attr){\r\n\t\t\tvar attributes = [\" \"];\r\n\t\t\tfor(var i in attr){\r\n\t\t\t\tif(typeof attr[i] != \"function\" && typeof attr[i] != \"object\") {\r\n\t\t\t\t\tvar text = escapeQuotes(stripHTMLLite(attr[i]));\r\n\t\t\t\t\tattributes.push(i + \"='\" + text + \"'\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tattributes.push(\" \");\r\n\t\t\treturn attributes.join(\" \");\r\n\t\t},\r\n\t\tsetAttributes: function(div, values){\r\n\t\t\tfor(var i in values){\r\n\t\t\t\tdiv.setAttribute(i, stripHTMLLite(values[i]));\r\n\t\t\t}\r\n\t\t\treturn div;\r\n\t\t},\r\n\r\n\t\tlabelAttr: function(div, content){\r\n\t\t\treturn this.setAttributes(div, {\"aria-label\": content});\r\n\t\t},\r\n\t\tlabel: function(label){\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": label});\r\n\t\t},\r\n\r\n\t\t// day/week/units\r\n\r\n\t\thourScaleAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\r\n\t\t},\r\n\t\tmonthCellAttr: function(div, date){\r\n\t\t\tthis.labelAttr(div, scheduler.templates.day_date(date));\r\n\t\t},\r\n\r\n\t\tnavBarDateAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\t\t},\r\n\t\tdayHeaderAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\t\t},\r\n\r\n\t\tdayColumnAttr: function(div, date){\r\n\t\t\tthis.dayHeaderAttr(div, scheduler.templates.day_date(date));\r\n\t\t},\r\n\r\n\t\theaderButtonsAttributes: function(div, label){\r\n\t\t\treturn this.setAttributes(div, {\"role\":\"button\", \"aria-label\":label});\r\n\t\t},\r\n\r\n\t\theaderToggleState: function(div, isActive){\r\n\t\t\treturn this.setAttributes(div, {\"aria-pressed\": isActive ? \"true\" : \"false\"});\r\n\t\t},\r\n\r\n\r\n\t\tgetHeaderCellAttr:function(dateString){\r\n\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": dateString});\r\n\t\t},\r\n\r\n\r\n\t\teventAttr: function(event, div){\r\n\t\t\tthis._eventCommonAttr(event, div);\r\n\t\t},\r\n\r\n\r\n\t\t_eventCommonAttr: function(event, div){\r\n\t\t\tdiv.setAttribute(\"aria-label\", stripHTMLLite(scheduler.templates.event_text(event.start_date, event.end_date, event)));\r\n\r\n\t\t\tif(scheduler.config.readonly){\r\n\t\t\t\tdiv.setAttribute(\"aria-readonly\", true);\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif(event.$dataprocessor_class){\r\n\t\t\t\tdiv.setAttribute(\"aria-busy\", true);\r\n\t\t\t}\r\n\r\n\r\n\t\t\tdiv.setAttribute(\"aria-selected\",\r\n\t\t\t\t(scheduler.getState().select_id == event.id) ? \"true\" : \"false\");\r\n\t\t},\r\n\r\n\t\tsetEventBarAttr: function(event, div){\r\n\t\t\tthis._eventCommonAttr(event, div);\r\n\t\t},\r\n\r\n\t\t_getAttributes: function(attributeSetter, arg){\r\n\t\t\tvar result = {\r\n\t\t\t\tsetAttribute:function(name, value){\r\n\t\t\t\t\tthis[name] = value;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\tattributeSetter.apply(this, [arg, result]);\r\n\t\t\treturn result;\r\n\r\n\t\t},\r\n\r\n\t\teventBarAttrString: function(event){\r\n\t\t\treturn this.getAttributeString(this._getAttributes(this.setEventBarAttr, event));\r\n\t\t},\r\n\r\n\r\n\r\n\t\tagendaHeadAttrString :function(){\r\n\t\t\treturn this.getAttributeString({role: \"row\"});\r\n\t\t},\r\n\t\tagendaHeadDateString :function(label){\r\n\t\t\treturn this.getAttributeString({role: \"columnheader\", \"aria-label\": label});\r\n\t\t},\r\n\t\tagendaHeadDescriptionString :function(label){\r\n\t\t\treturn this.agendaHeadDateString(label);\r\n\t\t},\r\n\t\tagendaDataAttrString: function(){\r\n\t\t\treturn this.getAttributeString({role: \"grid\"});\r\n\t\t},\r\n\t\tagendaEventAttrString: function(event){\r\n\t\t\tvar attrs = this._getAttributes(this._eventCommonAttr, event);\r\n\r\n\t\t\tattrs[\"role\"] = \"row\";\r\n\r\n\t\t\treturn this.getAttributeString(attrs);\r\n\r\n\t\t},\r\n\t\tagendaDetailsBtnString: function(){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels.icon_details});\r\n\t\t},\r\n\r\n\r\n\t\tgridAttrString: function(){\r\n\t\t\treturn this.getAttributeString({role: \"grid\"});\r\n\t\t},\r\n\r\n\t\tgridRowAttrString: function(event){\r\n\t\t\treturn this.agendaEventAttrString(event);\r\n\t\t},\r\n\r\n\t\tgridCellAttrString: function(event, column, value){\r\n\t\t\treturn this.getAttributeString({\"role\":\"gridcell\", \"aria-label\": [\r\n\t\t\t\t(column.label === undefined ? column.id : column.label),\r\n\t\t\t\t\": \",\r\n\t\t\t\tvalue\r\n\t\t\t]});\r\n\t\t},\r\n\r\n\t\tmapAttrString: function(){\r\n\t\t\treturn this.gridAttrString();\r\n\t\t},\r\n\t\tmapRowAttrString: function(event){\r\n\t\t\treturn this.gridRowAttrString(event);\r\n\t\t},\r\n\t\tmapDetailsBtnString: function(){\r\n\t\t\treturn this.agendaDetailsBtnString();\r\n\t\t},\r\n\r\n\t\tminicalHeader: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"id\":headerId+\"\",\r\n\t\t\t\t\"aria-live\":\"assertice\",\r\n\t\t\t\t\"aria-atomic\":\"true\"\r\n\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalGrid: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"aria-labelledby\":headerId+\"\",\r\n\t\t\t\t\"role\":\"grid\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalRow: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"row\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalDayCell: function(div, date){\r\n\t\t\tvar selected = (date.valueOf() < scheduler._max_date.valueOf() && date.valueOf() >= scheduler._min_date.valueOf());\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"gridcell\",\r\n\t\t\t\t\"aria-label\": scheduler.templates.day_date(date),\r\n\t\t\t\t\"aria-selected\": selected ? \"true\" : \"false\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalHeadCell: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"columnheader\"\r\n\t\t\t});\r\n\t\t},\r\n\r\n\r\n\t\tweekAgendaDayCell: function(div, date){\r\n\t\t\tvar header = div.querySelector(\".dhx_wa_scale_bar\");\r\n\t\t\tvar content = div.querySelector(\".dhx_wa_day_data\");\r\n\t\t\tvar headerId = scheduler.uid() + \"\";\r\n\t\t\tthis.setAttributes(header, { \"id\": headerId});\r\n\t\t\tthis.setAttributes(content, { \"aria-labelledby\": headerId});\r\n\r\n\t\t},\r\n\t\tweekAgendaEvent: function(div, event){\r\n\t\t\tthis.eventAttr(event, div);\r\n\t\t},\r\n\r\n\t\tlightboxHiddenAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t},\r\n\r\n\t\tlightboxVisibleAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"false\");\r\n\t\t},\r\n\r\n\t\tlightboxSectionButtonAttrString: function(label){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":label, \"tabindex\":\"0\"});\r\n\t\t},\r\n\r\n\t\tyearHeader: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"id\":headerId+\"\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tyearGrid: function(div, headerId){\r\n\t\t\tthis.minicalGrid(div, headerId);\r\n\t\t},\r\n\t\tyearHeadCell: function(div){\r\n\t\t\treturn this.minicalHeadCell(div);\r\n\t\t},\r\n\t\tyearRow: function(div){\r\n\t\t\treturn this.minicalRow(div);\r\n\t\t},\r\n\t\tyearDayCell: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"gridcell\"\r\n\t\t\t});\r\n\t\t},\r\n\r\n\t\tlightboxAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t\tdiv.firstChild.setAttribute(\"role\", \"heading\");\r\n\t\t},\r\n\r\n\t\tlightboxButtonAttrString:function(buttonName){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels[buttonName], \"tabindex\":\"0\"});\r\n\t\t},\r\n\t\teventMenuAttrString: function(iconName){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels[iconName]});\r\n\t\t},\r\n\t\tlightboxHeader: function(div, headerText){\r\n\t\t\tdiv.setAttribute(\"aria-label\", headerText);\r\n\t\t},\r\n\r\n\t\tlightboxSelectAttrString: function(time_option){\r\n\t\t\tvar label = \"\";\r\n\r\n\t\t\tswitch (time_option) {\r\n\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.year;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%m\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.month;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%d\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.day;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%H:%i\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.hour + \" \" + scheduler.locale.labels.minute;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": label});\r\n\t\t},\r\n\r\n\r\n\t\tmessageButtonAttrString: function(buttonLabel){\r\n\t\t\treturn \"tabindex='0' role='button' aria-label='\"+buttonLabel+\"'\";\r\n\t\t},\r\n\r\n\t\tmessageInfoAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"alert\");\r\n\t\t\t//div.setAttribute(\"tabindex\", \"-1\");\r\n\t\t},\r\n\r\n\t\tmessageModalAttr: function(div, uid){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t\tif(uid){\r\n\t\t\t\tdiv.setAttribute(\"aria-labelledby\", uid);\r\n\t\t\t}\r\n\r\n\t\t\t//\tdiv.setAttribute(\"tabindex\", \"-1\");\r\n\t\t},\r\n\r\n\t\tquickInfoAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t},\r\n\r\n\t\tquickInfoHeaderAttrString: function(){\r\n\t\t\treturn \" role='heading' \";\r\n\t\t},\r\n\r\n\t\tquickInfoHeader: function(div, header){\r\n\t\t\tdiv.setAttribute(\"aria-label\", header);\r\n\t\t},\r\n\r\n\t\tquickInfoButtonAttrString: function(label){\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"role\":\"button\", \"aria-label\":label, \"tabindex\":\"0\"});\r\n\t\t},\r\n\r\n\t\ttooltipAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"tooltip\");\r\n\t\t},\r\n\r\n\t\ttooltipVisibleAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"false\");\r\n\t\t},\r\n\r\n\t\ttooltipHiddenAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t}\r\n\t};\r\n\r\n\tfunction isDisabled(){\r\n\t\treturn !scheduler.config.wai_aria_attributes;\r\n\t}\r\n\r\n\tfor(var i in scheduler._waiAria){\r\n\t\tscheduler._waiAria[i] = (function(payload){\r\n\t\t\treturn function(){\r\n\t\t\t\tif(isDisabled()){\r\n\t\t\t\t\treturn \" \";\r\n\t\t\t\t}\r\n\t\t\t\treturn payload.apply(this, arguments);\r\n\t\t\t};\r\n\t\t})(scheduler._waiAria[i]);\r\n\t}\r\n\r\n\r\n})();\r\n\r\n}","var uidSeed = Date.now();\r\nfunction uid () {\r\n\treturn uidSeed++;\r\n}\r\n\r\n// iframe-safe array type check instead of using instanceof\r\nfunction isArray(obj){\r\n\tif(Array.isArray){\r\n\t\treturn Array.isArray(obj);\r\n\t}else{\r\n\t\t// close enough\r\n\t\treturn (obj && obj.length !== undefined && obj.pop && obj.push);\r\n\t}\r\n}\r\n\r\n// non-primitive string object, e.g. new String(\"abc\")\r\nfunction isStringObject(obj){\r\n\treturn obj && typeof obj === \"object\" && \r\n\t\tFunction.prototype.toString.call(obj.constructor) === \"function String() { [native code] }\";\r\n}\r\n\r\n// non-primitive number object, e.g. new Number(5)\r\nfunction isNumberObject(obj){\r\n\treturn obj && typeof obj === \"object\" && \r\n\t\tFunction.prototype.toString.call(obj.constructor) === \"function Number() { [native code] }\";\r\n}\r\n\r\n// non-primitive number object, e.g. new Boolean(true)\r\nfunction isBooleanObject(obj){\r\n\treturn obj && typeof obj === \"object\" &&\r\n\t\tFunction.prototype.toString.call(obj.constructor) === \"function Boolean() { [native code] }\";\r\n}\r\n\r\nfunction isDate(obj) {\r\n\tif (obj && typeof obj === \"object\") {\r\n\t\treturn !!(obj.getFullYear && obj.getMonth && obj.getDate);\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n}\r\n\r\nfunction defined(obj) {\r\n\treturn typeof(obj) != \"undefined\";\r\n}\r\n\r\nfunction delay (callback, timeout){\r\n\tvar timer;\r\n\r\n\tvar result = function() {\r\n\t\tresult.$cancelTimeout();\r\n\t\tresult.$pending = true;\r\n\t\tvar args = Array.prototype.slice.call(arguments);\r\n\t\ttimer = setTimeout(function(){\r\n\t\t\tcallback.apply(this, args);\r\n\t\t\tresult.$pending = false;\r\n\t\t}, timeout);\r\n\t};\r\n\r\n\tresult.$pending = false;\r\n\tresult.$cancelTimeout = function(){\r\n\t\tclearTimeout(timer);\r\n\t\tresult.$pending = false;\r\n\t};\r\n\tresult.$execute = function(){\r\n\t\tvar args = Array.prototype.slice.call(arguments);\r\n\t\tcallback.apply(this, args);\r\n\t\tresult.$cancelTimeout();\r\n\t};\r\n\r\n\treturn result;\r\n}\r\n\r\nexport default {\r\n\tuid: uid,\r\n\tmixin: function mixin (target, source, force){\r\n\t\tfor (var f in source)\r\n\t\t\tif (((target[f] === undefined) || force)) target[f]=source[f];\r\n\t\treturn target;\r\n\t},\r\n\tcopy: function copy(object) {\r\n\t\tvar i, result; // iterator, types array, result\r\n\t\r\n\t\tif (object && typeof object == \"object\") {\r\n\t\r\n\t\t\tswitch (true){\r\n\t\t\t\tcase (isDate(object)):\r\n\t\t\t\t\tresult = new Date(object);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isArray(object)):\r\n\t\t\t\t\tresult = new Array(object.length);\r\n\t\t\t\t\tfor(i = 0; i < object.length; i++){\r\n\t\t\t\t\t\tresult[i] = copy(object[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isStringObject(object)):\r\n\t\t\t\t\tresult = new String(object);// jshint ignore:line\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isNumberObject(object)):\r\n\t\t\t\t\tresult = new Number(object);// jshint ignore:line\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isBooleanObject(object)):\r\n\t\t\t\t\tresult = new Boolean(object);// jshint ignore:line\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tresult = {};\r\n\t\t\t\t\tfor (i in object) {\r\n\t\t\t\t\t\tconst varType = typeof object[i];\r\n\r\n\t\t\t\t\t\tif (varType === \"string\" || varType === \"number\" || varType === \"boolean\" ) {\r\n\t\t\t\t\t\t\tresult[i] = object[i];\r\n\t\t\t\t\t\t} else if(isDate(object[i])){\r\n\t\t\t\t\t\t\tresult[i] = new Date(object[i]);\r\n\t\t\t\t\t\t}else if (Object.prototype.hasOwnProperty.apply(object, [i]))\r\n\t\t\t\t\t\t\tresult[i] = copy(object[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result || object;\r\n\t},\r\n\tdefined,\r\n\tisDate,\r\n\tdelay\r\n};\r\n","//returns position of html element on the page\r\nfunction elementPosition(elem) {\r\n\tvar top=0, left=0, right=0, bottom=0;\r\n\tif (elem.getBoundingClientRect) { //HTML5 method\r\n\t\tvar box = elem.getBoundingClientRect();\r\n\t\tvar body = document.body;\r\n\t\tvar docElem = (document.documentElement ||\r\n\t\t\tdocument.body.parentNode ||\r\n\t\t\tdocument.body);\r\n\r\n\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\r\n\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\r\n\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\r\n\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\r\n\t\ttop = box.top + scrollTop - clientTop;\r\n\t\tleft = box.left + scrollLeft - clientLeft;\r\n\r\n\t\tright = document.body.offsetWidth - box.right;\r\n\t\tbottom = document.body.offsetHeight - box.bottom;\r\n\t} else { //fallback to naive approach\r\n\t\twhile(elem) {\r\n\t\t\ttop = top + parseInt(elem.offsetTop,10);\r\n\t\t\tleft = left + parseInt(elem.offsetLeft,10);\r\n\t\t\telem = elem.offsetParent;\r\n\t\t}\r\n\r\n\t\tright = document.body.offsetWidth - elem.offsetWidth - left;\r\n\t\tbottom = document.body.offsetHeight - elem.offsetHeight - top;\r\n\t}\r\n\treturn { y: Math.round(top), x: Math.round(left), width:elem.offsetWidth, height:elem.offsetHeight, right: Math.round(right), bottom: Math.round(bottom) };\r\n}\r\n\r\n/*\r\nevent position relatively to DOM element\r\n */\r\nfunction getRelativeEventPosition(ev, node){\r\n\tvar d = document.documentElement;\r\n\tvar box = elementPosition(node);\r\n\r\n\treturn {\r\n\t\tx: ev.clientX + d.scrollLeft - d.clientLeft - box.x + node.scrollLeft,\r\n\t\ty: ev.clientY + d.scrollTop - d.clientTop - box.y + node.scrollTop\r\n\t};\r\n}\r\n\r\nfunction getNodePosition(elem) {\r\n\tvar top=0, left=0, right=0, bottom=0;\r\n\tif (elem.getBoundingClientRect) { //HTML5 method\r\n\t\tvar box = elem.getBoundingClientRect();\r\n\t\tvar body = document.body;\r\n\t\tvar docElem = (document.documentElement ||\r\n\t\t\tdocument.body.parentNode ||\r\n\t\t\tdocument.body);\r\n\r\n\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\r\n\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\r\n\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\r\n\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\r\n\t\ttop = box.top + scrollTop - clientTop;\r\n\t\tleft = box.left + scrollLeft - clientLeft;\r\n\r\n\t\tright = document.body.offsetWidth - box.right;\r\n\t\tbottom = document.body.offsetHeight - box.bottom;\r\n\t} else { //fallback to naive approach\r\n\t\twhile(elem) {\r\n\t\t\ttop = top + parseInt(elem.offsetTop,10);\r\n\t\t\tleft = left + parseInt(elem.offsetLeft,10);\r\n\t\t\telem = elem.offsetParent;\r\n\t\t}\r\n\r\n\t\tright = document.body.offsetWidth - elem.offsetWidth - left;\r\n\t\tbottom = document.body.offsetHeight - elem.offsetHeight - top;\r\n\t}\r\n\treturn { y: Math.round(top), x: Math.round(left), width:elem.offsetWidth, height:elem.offsetHeight, right: Math.round(right), bottom: Math.round(bottom) };\r\n}\r\n\r\nfunction getClassName(node){\r\n\tif(!node) return \"\";\r\n\r\n\tvar className = node.className || \"\";\r\n\tif(className.baseVal)//'className' exist but not a string - IE svg element in DOM\r\n\t\tclassName = className.baseVal;\r\n\r\n\tif(!className.indexOf)\r\n\t\tclassName = '';\r\n\r\n\treturn className || \"\";\r\n}\r\n\r\nfunction getTargetNode(e) {\r\n\tvar trg;\r\n\tif (e.tagName)\r\n\t\ttrg = e;\r\n\telse {\r\n\t\te = e || window.event;\r\n\t\ttrg = e.target || e.srcElement;\r\n\t\tif (trg.shadowRoot && e.composedPath) {\r\n\t\t\ttrg = e.composedPath()[0];\r\n\t\t}\r\n\t}\r\n\treturn trg;\r\n}\r\n\r\nfunction locateCss(e, classname, strict){\r\n\tif(strict === undefined)\r\n\t\tstrict = true;\r\n\r\n\tvar trg = e.target || e.srcElement;\r\n\tvar css = '';\r\n\r\n\twhile (trg){\r\n\t\tcss = getClassName(trg);\r\n\r\n\t\tif(css){\r\n\t\t\tvar ind = css.indexOf(classname);\r\n\t\t\tif (ind >= 0){\r\n\t\t\t\tif (!strict)\r\n\t\t\t\t\treturn trg;\r\n\r\n\t\t\t\t//check that we have exact match\r\n\t\t\t\tvar left = (ind === 0) || (!((css.charAt(ind - 1)||\"\").trim()));\r\n\t\t\t\tvar right = ((ind + classname.length >= css.length)) || (!((css.charAt(ind + classname.length)).trim()));\r\n\r\n\t\t\t\tif (left && right)\r\n\t\t\t\t\treturn trg;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\ttrg=trg.parentNode;\r\n\t}\r\n\treturn null;\r\n}\r\n\r\n\r\n// get focusable nodes\r\nfunction isVisible(node){\r\n\tvar display = false,\r\n\t\tvisibility = false;\r\n\tif(window.getComputedStyle){\r\n\t\tvar style = window.getComputedStyle(node, null);\r\n\t\tdisplay = style[\"display\"];\r\n\t\tvisibility = style[\"visibility\"];\r\n\t}else if(node.currentStyle){\r\n\t\tdisplay = node.currentStyle[\"display\"];\r\n\t\tvisibility = node.currentStyle[\"visibility\"];\r\n\t}\r\n\r\n\tvar hiddenSection = false;\r\n\tvar recurringSection = locateCss({target:node}, \"dhx_form_repeat\", false);\r\n\tif(recurringSection){\r\n\t\thiddenSection = !!(recurringSection.style.height == \"0px\");\r\n\t}\r\n\thiddenSection = hiddenSection || !(node.offsetHeight);\r\n\r\n\treturn (display != \"none\" && visibility != \"hidden\" && !hiddenSection);\r\n}\r\n\r\nfunction hasNonNegativeTabIndex(node){\r\n\treturn !isNaN(node.getAttribute(\"tabindex\")) && (node.getAttribute(\"tabindex\")*1 >= 0);\r\n}\r\n\r\nfunction hasHref(node){\r\n\tvar canHaveHref = {\"a\": true, \"area\": true};\r\n\tif(canHaveHref[node.nodeName.loLowerCase()]){\r\n\t\treturn !!node.getAttribute(\"href\");\r\n\t}\r\n\treturn true;\r\n}\r\n\r\nfunction isEnabled(node){\r\n\tvar canDisable = {\"input\":true, \"select\":true, \"textarea\":true, \"button\":true, \"object\":true};\r\n\tif(canDisable[node.nodeName.toLowerCase()]){\r\n\t\treturn !node.hasAttribute(\"disabled\");\r\n\t}\r\n\r\n\treturn true;\r\n}\r\n\r\n\r\nfunction getFocusableNodes(root){\r\n\tvar nodes = root.querySelectorAll([\r\n\t\t\"a[href]\",\r\n\t\t\"area[href]\",\r\n\t\t\"input\",\r\n\t\t\"select\",\r\n\t\t\"textarea\",\r\n\t\t\"button\",\r\n\t\t\"iframe\",\r\n\t\t\"object\",\r\n\t\t\"embed\",\r\n\t\t\"[tabindex]\",\r\n\t\t\"[contenteditable]\"\r\n\t].join(\", \"));\r\n\r\n\tvar nodesArray = Array.prototype.slice.call(nodes, 0);\r\n\t\r\n\tfor(var i = 0; i < nodesArray.length; i++){\r\n\t\tnodesArray[i].$position = i;\r\n\t\t// we remember original nodes order, \r\n\t\t// so when we sort them by tabindex we ensure order of nodes with same tabindex is preserved, \r\n\t\t// since some browsers do unstable sort\r\n\t}\r\n\t\r\n\tnodesArray.sort(function(a, b) {\r\n\t\tif(a.tabIndex === 0 && b.tabIndex !== 0){\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\tif(a.tabIndex !== 0 && b.tabIndex === 0){\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\t\r\n\t\tif (a.tabIndex === b.tabIndex){\r\n\t\t\t// ensure we do stable sort\r\n\t\t\treturn a.$position - b.$position;\r\n\t\t}\r\n\t\tif (a.tabIndex < b.tabIndex) {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\treturn 1;\r\n\t});\r\n\t\r\n\tfor(var i = 0; i < nodesArray.length; i++){\r\n\t\tvar node = nodesArray[i];\r\n\t\tvar isValid = (hasNonNegativeTabIndex(node) || isEnabled(node) || hasHref(node)) && isVisible(node);\r\n\t\tif(!isValid){\r\n\t\t\tnodesArray.splice(i, 1);\r\n\t\t\ti--;\r\n\t\t}\r\n\t}\r\n\treturn nodesArray;\r\n}\r\n\r\n\r\nfunction isShadowDomSupported() {\r\n\treturn document.head.createShadowRoot || document.head.attachShadow;\r\n}\r\n\r\n/**\r\n * Returns element that has the browser focus, or null if no element has focus.\r\n * Works with shadow DOM, so it's prefereed to use this function instead of document.activeElement directly.\r\n * @returns HTMLElement\r\n */\r\nfunction getActiveElement(){\r\n\tvar activeElement = document.activeElement;\r\n\tif (activeElement.shadowRoot) {\r\n\t\tactiveElement = activeElement.shadowRoot.activeElement;\r\n\t}\r\n\tif (activeElement === document.body && document.getSelection) {\r\n\t\tactiveElement = document.getSelection().focusNode || document.body;\r\n\t}\r\n\r\n\treturn activeElement;\r\n}\r\n\r\n/**\r\n * Returns document.body or the host node of the ShadowRoot, if the element is attached to ShadowDom\r\n * @param {HTMLElement} element \r\n * @returns HTMLElement\r\n */\r\nfunction getRootNode(element) {\r\n\tif (!element) {\r\n\t\treturn document.body;\r\n\t}\r\n\tif (!isShadowDomSupported()) {\r\n\t\treturn document.body;\r\n\t}\r\n\twhile (element.parentNode && (element = element.parentNode)) {\r\n\t\tif (element instanceof ShadowRoot) {\r\n\t\t\treturn element.host;\r\n\t\t}\r\n\t}\r\n\treturn document.body;\r\n}\r\n\r\nfunction hasShadowParent(element) {\r\n\treturn !!getRootNode(element);\r\n}\r\n\r\nexport default {\r\n\t/**\r\n\t * @desc: Calculate absolute position of html object\r\n\t * @type: private\r\n\t * @param: htmlObject - html object\r\n\t * @topic: 0\r\n\t */\r\n\tgetAbsoluteLeft: function getAbsoluteLeft(htmlObject){\r\n\t\treturn this.getOffset(htmlObject).left;\r\n\t},\r\n\t/**\r\n\t * @desc: Calculate absolute position of html object\r\n\t * @type: private\r\n\t * @param: htmlObject - html object\r\n\t * @topic: 0\r\n\t */\r\n\tgetAbsoluteTop: function getAbsoluteTop(htmlObject){\r\n\t\treturn this.getOffset(htmlObject).top;\r\n\t},\r\n\r\n\tgetOffsetSum: function getOffsetSum(elem) {\r\n\t\tvar top=0, left=0;\r\n\t\twhile(elem) {\r\n\t\t\ttop = top + parseInt(elem.offsetTop);\r\n\t\t\tleft = left + parseInt(elem.offsetLeft);\r\n\t\t\telem = elem.offsetParent;\r\n\t\t}\r\n\t\treturn {top: top, left: left};\r\n\t},\r\n\r\n\tgetOffsetRect: function getOffsetRect(elem) {\r\n\t\tvar box = elem.getBoundingClientRect();\r\n\r\n\t\tvar top = 0,\r\n\t\t\tleft = 0;\r\n\r\n\t\t// https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent#Mobile_Tablet_or_Desktop\r\n\t\tif (!/Mobi/.test(navigator.userAgent)) {\r\n\t\t\tvar body = document.body;\r\n\t\t\tvar docElem = document.documentElement;\r\n\t\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\r\n\t\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\r\n\t\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\r\n\t\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\r\n\r\n\t\t\ttop = box.top + scrollTop - clientTop;\r\n\t\t\tleft = box.left + scrollLeft - clientLeft;\r\n\t\t}else {\r\n\t\t\t// incorrect left coordinate on mobile zoom\r\n\t\t\t// https://bugs.chromium.org/p/chromium/issues/detail?id=489206\r\n\r\n\t\t\tvar dummy = document.createElement(\"div\");\r\n\t\t\tdummy.style.position=\"absolute\";\r\n\t\t\tdummy.style.left=\"0px\";\r\n\t\t\tdummy.style.top=\"0px\";\r\n\t\t\tdummy.style.width=\"1px\";\r\n\t\t\tdummy.style.height = \"1px\";\r\n\r\n\t\t\tdocument.body.appendChild(dummy);\r\n\t\t\tvar dummyBox = dummy.getBoundingClientRect();\r\n\t\t\ttop = box.top - dummyBox.top;\r\n\t\t\tleft = box.left - dummyBox.left;\r\n\r\n\t\t\tdummy.parentNode.removeChild(dummy);\r\n\t\t}\r\n\r\n\t\treturn { top: Math.round(top), left: Math.round(left) };\r\n\t},\r\n\r\n\tgetOffset: function getOffset(elem) {\r\n\t\tif (elem.getBoundingClientRect) {\r\n\t\t\treturn this.getOffsetRect(elem);\r\n\t\t} else {\r\n\t\t\treturn this.getOffsetSum(elem);\r\n\t\t}\r\n\t},\r\n\r\n\tclosest: function(element, selector){\r\n\t\tif(!element || !selector){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn closest(element, selector);\r\n\t},\r\n\tinsertAfter: function(newNode, referenceNode){\r\n\t\tif(referenceNode.nextSibling){\r\n\t\t\treferenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);\r\n\t\t}else{\r\n\t\t\treferenceNode.parentNode.appendChild(newNode);\r\n\t\t}\r\n\t},\r\n\tremove: function(node) {\r\n\t\tif (node && node.parentNode) {\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t}\r\n\t},\r\n\tisChildOf: function(child, parent) {\r\n\t\treturn parent.contains(child);\r\n\t},\r\n\tgetFocusableNodes,\r\n\tgetClassName,\r\n\tlocateCss,\r\n\tgetRootNode,\r\n\thasShadowParent,\r\n\tisShadowDomSupported,\r\n\tgetActiveElement,\r\n\tgetRelativeEventPosition,\r\n\tgetTargetNode,\r\n\tgetNodePosition\r\n};\r\n\r\nvar closest;\r\nif(Element.prototype.closest){\r\n\tclosest = function(element, selector){\r\n\t\treturn element.closest(selector);\r\n\t};\r\n}else{\r\n\tvar matches = Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\r\n\tclosest = function(element, selector) {\r\n\t\tvar el = element;\r\n\t\tdo {\r\n\t\t\tif (matches.call(el, selector)){\r\n\t\t\t\treturn el;\r\n\t\t\t}\r\n\t\t\tel = el.parentElement || el.parentNode;\r\n\t\t} while (el !== null && el.nodeType === 1);\r\n\t\treturn null;\r\n\t};\r\n}\r\n","/* eslint-disable no-restricted-globals */\r\nvar isWindowAwailable = typeof window !== \"undefined\";\r\n\r\n/* eslint-enable no-restricted-globals */\r\n\r\nexport default {\r\n\tisIE: isWindowAwailable && (navigator.userAgent.indexOf(\"MSIE\") >= 0 || navigator.userAgent.indexOf(\"Trident\") >= 0),\r\n\tisOpera: isWindowAwailable && (navigator.userAgent.indexOf(\"Opera\") >= 0),\r\n\tisChrome: isWindowAwailable && (navigator.userAgent.indexOf(\"Chrome\") >= 0),\r\n\tisKHTML: isWindowAwailable && (navigator.userAgent.indexOf(\"Safari\") >= 0 || navigator.userAgent.indexOf(\"Konqueror\") >= 0),\r\n\tisFF: isWindowAwailable && (navigator.userAgent.indexOf(\"Firefox\") >= 0),\r\n\tisIPad: isWindowAwailable && (navigator.userAgent.search(/iPad/gi) >= 0),\r\n\tisEdge: isWindowAwailable && (navigator.userAgent.indexOf(\"Edge\")!=-1),\r\n\tisNode: (!isWindowAwailable || typeof navigator == \"undefined\")\r\n};","export default function extend(scheduler) {\r\n\r\nscheduler.destructor = function(){\r\n\tscheduler.callEvent(\"onDestroy\", []);\r\n\tthis.clearAll();\r\n\r\n\tif(this.$container){\r\n\t\t// FIXME: clear container or remove container\r\n\t\tthis.$container.innerHTML = \"\";\r\n\t\t// scheduler.$domHelpers.remove(this.$container);\r\n\t}\r\n\r\n\tif(this._eventRemoveAll){\r\n\t\tthis._eventRemoveAll();\r\n\t}\r\n\r\n\tif(this.resetLightbox){\r\n\t\tthis.resetLightbox();\r\n\t}\r\n\r\n\tif(this._dp && this._dp.destructor){\r\n\t\tthis._dp.destructor();\r\n\t}\r\n\r\n\t// detachAllEvents should be called last, because in components may be attached events\r\n\tthis.detachAllEvents();\r\n\r\n\tfor(var i in this){\r\n\t\tif(i.indexOf(\"$\") === 0){\r\n\t\t\tdelete this[i];\r\n\t\t}\r\n\t}\r\n\tscheduler.$destroyed = true;\r\n};\r\n\r\n}","export default function(data) {\r\n\tif (typeof data === \"string\" || typeof data === \"number\") {\r\n\t\treturn data;\r\n\t}\r\n\tvar result = \"\";\r\n\tfor (var key in data) {\r\n\t\tvar serialized = \"\";\r\n\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\tif (typeof data[key] === \"string\") {\r\n\t\t\t\tserialized = encodeURIComponent(data[key]);\r\n\t\t\t} else if (typeof data[key] === \"number\") {\r\n\t\t\t\tserialized = data[key];\r\n\t\t\t} else {\r\n\t\t\t\tserialized = encodeURIComponent(JSON.stringify(data[key]));\r\n\t\t\t}\r\n\t\t\tserialized = key + \"=\" + serialized;\r\n\r\n\t\t\tif (result.length) {\r\n\t\t\t\tserialized = \"&\" + serialized;\r\n\t\t\t}\r\n\t\t\tresult += serialized;\r\n\t\t}\r\n\t}\r\n\treturn result;\r\n}","import serialize from \"../common/url_serialize.js\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler.Promise = window.Promise; \r\n\r\nfunction createConfig(method, args) {\r\n\tvar result = {\r\n\t\tmethod: method\r\n\t};\r\n\r\n\tif (args.length === 0) {\r\n\t\tthrow new Error(\"Arguments list of query is wrong.\");\r\n\t}\r\n\tif (args.length === 1) {\r\n\t\tif (typeof args[0] === \"string\") {\r\n\t\t\tresult.url = args[0];\r\n\t\t\tresult.async = true;\r\n\t\t} else {\r\n\t\t\tresult.url = args[0].url;\r\n\t\t\tresult.async = (args[0].async || true);\r\n\t\t\tresult.callback = args[0].callback;\r\n\t\t\tresult.headers = args[0].headers;\r\n\t\t}\r\n\t\tif (method === \"POST\" || \"PUT\") {\r\n\t\t\tif (args[0].data) {\r\n\t\t\t\tif (typeof args[0].data !== \"string\") {\r\n\t\t\t\t\tresult.data = serialize(args[0].data);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresult.data = args[0].data;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tresult.data = \"\";\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n\r\n\tresult.url = args[0];\r\n\tswitch(method) {\r\n\t\tcase \"GET\":\r\n\t\tcase \"DELETE\":\r\n\t\t\tresult.callback = args[1];\r\n\t\t\tresult.headers = args[2];\r\n\t\tbreak;\r\n\t\tcase \"POST\":\r\n\t\tcase \"PUT\":\r\n\t\t\tif (args[1]) {\r\n\t\t\t\tif (typeof args[1] !== \"string\") {\r\n\t\t\t\t\tresult.data = serialize(args[1]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresult.data = args[1];\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tresult.data = \"\";\r\n\t\t\t}\r\n\t\t\tresult.callback = args[2];\r\n\t\t\tresult.headers = args[3];\r\n\t\tbreak;\r\n\t}\r\n\treturn result;\r\n}\r\nscheduler.ajax = {\r\n\t// if false - dhxr param will added to prevent caching on client side (default),\r\n\t// if true - do not add extra params\r\n\tcache: true,\r\n\r\n\t// default method for load/loadStruct, post/get allowed\r\n\tmethod: \"get\",\r\n\r\n\tserializeRequestParams: serialize,\r\n\tparse: function(data) {\r\n\t\tif (typeof data !== \"string\") return data;\r\n\r\n\t\tvar obj;\r\n\t\tdata = data.replace(/^[\\s]+/,\"\");\r\n\t\tif (typeof DOMParser !== \"undefined\" && !scheduler.$env.isIE) { // ff,ie9\r\n\t\t\tobj = (new DOMParser()).parseFromString(data, \"text/xml\");\r\n\t\t} else if (typeof window.ActiveXObject !== \"undefined\") {\r\n\t\t\tobj = new window.ActiveXObject(\"Microsoft.XMLDOM\");\r\n\t\t\tobj.async = \"false\";\r\n\t\t\tobj.loadXML(data);\r\n\t\t}\r\n\t\treturn obj;\r\n\t},\r\n\txmltop: function(tagname, xhr, obj) {\r\n\t\tif (typeof xhr.status == \"undefined\" || xhr.status < 400) {\r\n\t\t\tvar xml = (!xhr.responseXML) ? this.parse(xhr.responseText || xhr) : (xhr.responseXML || xhr);\r\n\t\t\tif (xml && xml.documentElement !== null && !xml.getElementsByTagName(\"parsererror\").length) {\r\n\t\t\t\treturn xml.getElementsByTagName(tagname)[0];\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (obj !== -1) scheduler.callEvent(\"onLoadXMLError\",[\"Incorrect XML\", arguments[1], obj]);\r\n\t\treturn document.createElement(\"DIV\");\r\n\t},\r\n\txpath: function(xpathExp, docObj) {\r\n\t\tif (!docObj.nodeName) docObj = docObj.responseXML || docObj;\r\n\t\tif (scheduler.$env.isIE) {\r\n\t\t\treturn docObj.selectNodes(xpathExp)||[];\r\n\t\t} else {\r\n\t\t\tvar rows = [];\r\n\t\t\tvar first;\r\n\t\t\tvar col = (docObj.ownerDocument||docObj).evaluate(xpathExp, docObj, null, XPathResult.ANY_TYPE, null);\r\n\r\n\t\t\twhile (true){\r\n\t\t\t\tfirst = col.iterateNext();\r\n\t\t\t\tif(first){\r\n\t\t\t\t\trows.push(first);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn rows;\r\n\t\t}\r\n\t},\r\n\tquery: function(config) {\r\n\t\treturn this._call(\r\n\t\t\t(config.method || \"GET\"),\r\n\t\t\tconfig.url,\r\n\t\t\tconfig.data || \"\",\r\n\t\t\t(config.async || true),\r\n\t\t\tconfig.callback,\r\n\t\t\tconfig.headers\r\n\t\t);\r\n\t},\r\n\tget: function(url, onLoad, headers) {\r\n\t\tvar config = createConfig(\"GET\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tgetSync: function(url, headers) {\r\n\t\tvar config = createConfig(\"GET\", arguments);\r\n\t\tconfig.async = false;\r\n\t\treturn this.query(config);\r\n\t},\r\n\tput: function(url, postData, onLoad, headers) {\r\n\t\tvar config = createConfig(\"PUT\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tdel: function(url, onLoad, headers) {\r\n\t\t/**\r\n\t\t * https://tools.ietf.org/html/rfc7231#section-4.3.5\r\n\t\t * A payload within a DELETE request message has no defined semantics;\r\n\t\t * sending a payload body on a DELETE request might cause some existing\r\n\t\t * implementations to reject the request.\r\n\t\t */\r\n\t\tvar config = createConfig(\"DELETE\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tpost: function(url, postData, onLoad, headers) {\r\n\t\tif (arguments.length == 1) {\r\n\t\t\tpostData = \"\";\r\n\t\t} else if (arguments.length == 2 && typeof(postData) == \"function\") {\r\n\t\t\tonLoad = postData;\r\n\t\t\tpostData = \"\";\r\n\t\t}\r\n\t\tvar config = createConfig(\"POST\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tpostSync: function(url, postData, headers) {\r\n\t\tpostData = (postData === null ? \"\" : String(postData));\r\n\r\n\t\tvar config = createConfig(\"POST\", arguments);\r\n\t\tconfig.async = false;\r\n\t\treturn this.query(config);\r\n\t},\r\n\t_call: function(method, url, postData, async, onLoad, headers) {\r\n\t\treturn new scheduler.Promise((function(resolve, reject) {\r\n\t\t\tvar t = (typeof XMLHttpRequest !== undefined && !scheduler.$env.isIE ? new XMLHttpRequest() : new window.ActiveXObject(\"Microsoft.XMLHTTP\"));\r\n\t\t\tvar isQt = (navigator.userAgent.match(/AppleWebKit/) !== null && navigator.userAgent.match(/Qt/) !== null && navigator.userAgent.match(/Safari/) !== null);\r\n\r\n\t\t\tif (!!async) {\r\n\t\t\t\tt.addEventListener(\"readystatechange\", function() {\r\n\t\t\t\t\tif ((t.readyState == 4) || (isQt && t.readyState == 3)) { // what for long response and status 404?\r\n\t\t\t\t\t\tif (t.status != 200 || t.responseText === \"\")\r\n\t\t\t\t\t\t\tif (!scheduler.callEvent(\"onAjaxError\", [t])) return;\r\n\r\n\t\t\t\t\t\tsetTimeout(function() {\r\n\t\t\t\t\t\t\tif (typeof(onLoad) == \"function\") {\r\n\t\t\t\t\t\t\t\tonLoad.apply(window, [{xmlDoc:t, filePath:url}]); // dhtmlx-compat, response.xmlDoc.responseXML/responseText\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tresolve(t);\r\n\t\t\t\t\t\t\tif (typeof(onLoad) == \"function\") {\r\n\t\t\t\t\t\t\t\tonLoad = null;\r\n\t\t\t\t\t\t\t\tt = null;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}, 0);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif (method == \"GET\" && !this.cache) {\r\n\t\t\t\turl += (url.indexOf(\"?\")>=0?\"&\":\"?\")+\"dhxr\"+new Date().getTime()+\"=1\";\r\n\t\t\t}\r\n\r\n\t\t\tt.open(method, url, async);\r\n\r\n\t\t\tif (headers){\r\n\t\t\t\tfor (var key in headers)\r\n\t\t\t\t\tt.setRequestHeader(key, headers[key]);\r\n\t\t\t} else if (method.toUpperCase() == \"POST\" || method == \"PUT\" || method == \"DELETE\") {\r\n\t\t\t\tt.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\r\n\t\t\t} else if (method == \"GET\") {\r\n\t\t\t\tpostData = null;\r\n\t\t\t}\r\n\r\n\t\t\tt.setRequestHeader(\"X-Requested-With\", \"XMLHttpRequest\");\r\n\r\n\t\t\tt.send(postData);\r\n\r\n\t\t\tif (!async) return {xmlDoc:t, filePath:url}; // dhtmlx-compat, response.xmlDoc.responseXML/responseText\r\n\t\t}.bind(this)));\r\n\t},\r\n\turlSeparator: function(str){\r\n\t\tif (str.indexOf(\"?\") != -1)\r\n\t\t\treturn \"&\";\r\n\t\telse\r\n\t\t\treturn \"?\";\r\n\t}\r\n};\r\n\r\nscheduler.$ajax = scheduler.ajax; // for old\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nvar generateStringToDate = function (format, utc) {\r\n\tvar splt = \"var temp=date.match(/[a-zA-Z]+|[0-9]+/g);\";\r\n\tvar mask = format.match(/%[a-zA-Z]/g);\r\n\tfor (var i = 0; i < mask.length; i++) {\r\n\t\tswitch (mask[i]) {\r\n\t\t\tcase \"%j\":\r\n\t\t\tcase \"%d\": splt += \"set[2]=temp[\" + i + \"]||1;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%n\":\r\n\t\t\tcase \"%m\": splt += \"set[1]=(temp[\" + i + \"]||1)-1;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%y\": splt += \"set[0]=temp[\" + i + \"]*1+(temp[\" + i + \"]>50?1900:2000);\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%g\":\r\n\t\t\tcase \"%G\":\r\n\t\t\tcase \"%h\":\r\n\t\t\tcase \"%H\":\r\n\t\t\t\tsplt += \"set[3]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%i\":\r\n\t\t\t\tsplt += \"set[4]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%Y\": splt += \"set[0]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%a\":\r\n\t\t\tcase \"%A\": splt += \"set[3]=set[3]%12+((temp[\" + i + \"]||'').toLowerCase()=='am'?0:12);\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%s\": splt += \"set[5]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%M\": splt += \"set[1]=this.locale.date.month_short_hash[temp[\" + i + \"]]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%F\": splt += \"set[1]=this.locale.date.month_full_hash[temp[\" + i + \"]]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\tvar code = \"set[0],set[1],set[2],set[3],set[4],set[5]\";\r\n\tif (utc) code = \" Date.UTC(\" + code + \")\";\r\n\treturn new Function(\"date\", \"var set=[0,0,1,0,0,0]; \" + splt + \" return new Date(\" + code + \");\");\r\n};\r\nvar csp_date_to_str = function (format, utc) {\r\n\treturn function(date) {\r\n\t\treturn format.replace(/%[a-zA-Z]/g, function (a) {\r\n\t\t\tswitch (a) {\r\n\t\t\t\tcase \"%d\": return utc ? scheduler.date.to_fixed(date.getUTCDate()) : scheduler.date.to_fixed(date.getDate());\r\n\t\t\t\tcase \"%m\": return utc ? scheduler.date.to_fixed((date.getUTCMonth() + 1)) : scheduler.date.to_fixed((date.getMonth() + 1));\r\n\t\t\t\tcase \"%j\": return utc ? date.getUTCDate() : date.getDate();\r\n\t\t\t\tcase \"%n\": return utc ? (date.getUTCMonth() + 1) : (date.getMonth() + 1);\r\n\t\t\t\tcase \"%y\": return utc ? scheduler.date.to_fixed(date.getUTCFullYear() % 100) : scheduler.date.to_fixed(date.getFullYear() % 100);\r\n\t\t\t\tcase \"%Y\": return utc ? date.getUTCFullYear() : date.getFullYear();\r\n\t\t\t\tcase \"%D\": return utc ? scheduler.locale.date.day_short[date.getUTCDay()] : scheduler.locale.date.day_short[date.getDay()];\r\n\t\t\t\tcase \"%l\": return utc ? scheduler.locale.date.day_full[date.getUTCDay()] : scheduler.locale.date.day_full[date.getDay()];\r\n\t\t\t\tcase \"%M\": return utc ? scheduler.locale.date.month_short[date.getUTCMonth()] : scheduler.locale.date.month_short[date.getMonth()];\r\n\t\t\t\tcase \"%F\": return utc ? scheduler.locale.date.month_full[date.getUTCMonth()] : scheduler.locale.date.month_full[date.getMonth()];\r\n\t\t\t\tcase \"%h\": return utc ? scheduler.date.to_fixed((date.getUTCHours() + 11) % 12 + 1) : scheduler.date.to_fixed((date.getHours() + 11) % 12 + 1);\r\n\t\t\t\tcase \"%g\": return utc ? ((date.getUTCHours() + 11) % 12 + 1) : ((date.getHours() + 11) % 12 + 1);\r\n\t\t\t\tcase \"%G\": return utc ? date.getUTCHours() : date.getHours();\r\n\t\t\t\tcase \"%H\": return utc ? scheduler.date.to_fixed(date.getUTCHours()) : scheduler.date.to_fixed(date.getHours());\r\n\t\t\t\tcase \"%i\": return utc ? scheduler.date.to_fixed(date.getUTCMinutes()) : scheduler.date.to_fixed(date.getMinutes());\r\n\t\t\t\tcase \"%a\": return utc ? (date.getUTCHours() > 11 ? \"pm\" : \"am\") : (date.getHours() > 11 ? \"pm\" : \"am\");\r\n\t\t\t\tcase \"%A\": return utc ? (date.getUTCHours() > 11 ? \"PM\" : \"AM\") : (date.getHours() > 11 ? \"PM\" : \"AM\");\r\n\t\t\t\tcase \"%s\": return utc ? scheduler.date.to_fixed(date.getUTCSeconds()) : scheduler.date.to_fixed(date.getSeconds());\r\n\t\t\t\tcase \"%W\": return utc ? scheduler.date.to_fixed(scheduler.date.getUTCISOWeek(date)) : scheduler.date.to_fixed(scheduler.date.getISOWeek(date));\r\n\t\t\t\tdefault: return a;\r\n\t\t\t}\r\n\t\t});\r\n\t};\r\n};\r\nvar csp_str_to_date = function (format, utc) {\r\n\tconst mask = format.match(/%[a-zA-Z]/g);\r\n\treturn function (date){\r\n\t\tvar set = [0, 0, 1, 0, 0, 0];\r\n\t\tvar temp = date.match(/[a-zA-Z]+|[0-9]+/g);\r\n\r\n\t\tfor (var i = 0; i < mask.length; i++) {\r\n\t\t\tswitch (mask[i]) {\r\n\t\t\t\tcase \"%j\":\r\n\t\t\t\tcase \"%d\":\r\n\t\t\t\t\tset[2] = temp[i] || 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%n\":\r\n\t\t\t\tcase \"%m\":\r\n\t\t\t\t\tset[1] = (temp[i] || 1) - 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%y\":\r\n\t\t\t\t\tset[0] = temp[i] * 1 + (temp[i] > 50 ? 1900 : 2000);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%g\":\r\n\t\t\t\tcase \"%G\":\r\n\t\t\t\tcase \"%h\":\r\n\t\t\t\tcase \"%H\":\r\n\t\t\t\t\tset[3] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%i\":\r\n\t\t\t\t\tset[4] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\tset[0] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%a\":\r\n\t\t\t\tcase \"%A\":\r\n\t\t\t\t\tset[3] = set[3] % 12 + ((temp[i] || '').toLowerCase() == 'am' ? 0 : 12);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%s\":\r\n\t\t\t\t\tset[5] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%M\":\r\n\t\t\t\t\tset[1] = scheduler.locale.date.month_short_hash[temp[i]] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%F\":\r\n\t\t\t\t\tset[1] = scheduler.locale.date.month_full_hash[temp[i]] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (utc) {\r\n\t\t\treturn new Date(Date.UTC(set[0], set[1], set[2], set[3], set[4], set[5]));\r\n\t\t}\r\n\r\n\t\treturn new Date(set[0], set[1], set[2], set[3], set[4], set[5]);\r\n\t};\r\n};\r\n\r\nlet cspEnabled = undefined;\r\nfunction checkIfCSPEnabled(){\r\n\ttry {\r\n\t\tnew Function(\"cspEnabled = false;\");\r\n\t\tcspEnabled = false;\r\n\t} catch(e) {\r\n\t\tcspEnabled = true;\r\n\t}\r\n\treturn cspEnabled;\r\n}\r\n\r\nfunction useCsp() {\r\n\tvar result = false;\r\n\tif (scheduler.config.csp === \"auto\") {\r\n\t\tif(cspEnabled === undefined){\r\n\t\t\tcspEnabled = checkIfCSPEnabled();\r\n\t\t}\r\n\t\tresult = cspEnabled;\r\n\t} else {\r\n\t\tresult = scheduler.config.csp;\r\n\t}\r\n\treturn result;\r\n}\r\nscheduler.date = {\r\n\tinit:function(){\r\n\t\tvar s = scheduler.locale.date.month_short;\r\n\t\tvar t = scheduler.locale.date.month_short_hash = {};\r\n\t\tfor (var i = 0; i < s.length; i++)\r\n\t\t\tt[s[i]]=i;\r\n\r\n\t\tvar s = scheduler.locale.date.month_full;\r\n\t\tvar t = scheduler.locale.date.month_full_hash = {};\r\n\t\tfor (var i = 0; i < s.length; i++)\r\n\t\t\tt[s[i]]=i;\r\n\t},\r\n\tdate_part:function(date){\r\n\t\tvar old = new Date(date);\r\n\t\tdate.setHours(0);\r\n\t\tdate.setMinutes(0);\r\n\t\tdate.setSeconds(0);\r\n\t\tdate.setMilliseconds(0);\r\n\t\tif (date.getHours() && //shift to yesterday on dst\r\n\t\t\t(date.getDate() < old.getDate() || date.getMonth() < old.getMonth() || date.getFullYear() < old.getFullYear()) )\r\n\t\t\tdate.setTime(date.getTime() + 60 * 60 * 1000 * (24 - date.getHours()));\r\n\t\treturn date;\r\n\t},\r\n\ttime_part:function(date){\r\n\t\treturn (date.valueOf()/1000 - date.getTimezoneOffset()*60)%86400;\r\n\t},\r\n\tweek_start:function(date){\r\n\t\tvar shift=date.getDay();\r\n\t\tif (scheduler.config.start_on_monday){\r\n\t\t\tif (shift===0) shift=6;\r\n\t\t\telse shift--;\r\n\t\t}\r\n\t\treturn this.date_part(this.add(date,-1*shift,\"day\"));\r\n\t},\r\n\tmonth_start:function(date){\r\n\t\tdate.setDate(1);\r\n\t\treturn this.date_part(date);\r\n\t},\r\n\tyear_start:function(date){\r\n\t\tdate.setMonth(0);\r\n\t\treturn this.month_start(date);\r\n\t},\r\n\tday_start:function(date){\r\n\t\treturn this.date_part(date);\r\n\t},\r\n\t_add_days:function(date, inc){\r\n\t\tvar ndate = new Date(date.valueOf());\r\n\r\n\t\tndate.setDate(ndate.getDate() + inc);\r\n\r\n\t\t// Workaround for Safari/iOS timezone bug, ref:OKZ-149693\r\n\t\tif(inc == Math.round(inc) && inc > 0){\r\n\t\t\tvar datesDiff = +ndate - +date,\r\n\t\t\t\trest = datesDiff % (24*60*60*1000);\r\n\t\t\tif(rest && date.getTimezoneOffset() == ndate.getTimezoneOffset()){\r\n\t\t\t\tvar hours = rest / (60* 60 * 1000);\r\n\t\t\t\tndate.setTime(ndate.getTime() + (24 - hours) * 60 * 60 * 1000);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (inc >= 0 && (!date.getHours() && ndate.getHours()) &&//shift to yesterday on dst\r\n\t\t\t(ndate.getDate() < date.getDate() || ndate.getMonth() < date.getMonth() || ndate.getFullYear() < date.getFullYear()) )\r\n\t\t\tndate.setTime(ndate.getTime() + 60 * 60 * 1000 * (24 - ndate.getHours()));\r\n\t\treturn ndate;\r\n\t},\r\n\tadd:function(date,inc,mode){\r\n\t\tvar ndate=new Date(date.valueOf());\r\n\t\tswitch(mode){\r\n\t\t\tcase \"day\":\r\n\t\t\t\tndate = scheduler.date._add_days(ndate, inc);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"week\":\r\n\t\t\t\tndate = scheduler.date._add_days(ndate, inc * 7);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"month\": ndate.setMonth(ndate.getMonth()+inc); break;\r\n\t\t\tcase \"year\": ndate.setYear(ndate.getFullYear()+inc); break;\r\n\t\t\tcase \"hour\":\r\n\t\t\t\t/*\r\n\t\t\t\t setHour(getHour() + inc) and setMinutes gives weird result when is applied on a Daylight Saving time switch\r\n\t\t\t\t setTime seems working as expected\r\n\t\t\t\t*/\r\n\t\t\t\tndate.setTime(ndate.getTime() + inc * 60 * 60 * 1000);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"minute\":\r\n\t\t\t\tndate.setTime(ndate.getTime() + inc * 60 * 1000);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\treturn scheduler.date[\"add_\"+mode](date,inc,mode);\r\n\t\t}\r\n\t\treturn ndate;\r\n\t},\r\n\tto_fixed:function(num){\r\n\t\tif (num<10)\treturn \"0\"+num;\r\n\t\treturn num;\r\n\t},\r\n\tcopy:function(date){\r\n\t\treturn new Date(date.valueOf());\r\n\t},\r\n\tdate_to_str:function(format,utc){\r\n\t\tif (useCsp()) {\r\n\t\t\treturn csp_date_to_str(format,utc);\r\n\t\t}\r\n\r\n\t\tformat=format.replace(/%[a-zA-Z]/g,function(a){\r\n\t\t\tswitch(a){\r\n\t\t\t\tcase \"%d\": return \"\\\"+this.date.to_fixed(date.getDate())+\\\"\";\r\n\t\t\t\tcase \"%m\": return \"\\\"+this.date.to_fixed((date.getMonth()+1))+\\\"\";\r\n\t\t\t\tcase \"%j\": return \"\\\"+date.getDate()+\\\"\";\r\n\t\t\t\tcase \"%n\": return \"\\\"+(date.getMonth()+1)+\\\"\";\r\n\t\t\t\tcase \"%y\": return \"\\\"+this.date.to_fixed(date.getFullYear()%100)+\\\"\";\r\n\t\t\t\tcase \"%Y\": return \"\\\"+date.getFullYear()+\\\"\";\r\n\t\t\t\tcase \"%D\": return \"\\\"+this.locale.date.day_short[date.getDay()]+\\\"\";\r\n\t\t\t\tcase \"%l\": return \"\\\"+this.locale.date.day_full[date.getDay()]+\\\"\";\r\n\t\t\t\tcase \"%M\": return \"\\\"+this.locale.date.month_short[date.getMonth()]+\\\"\";\r\n\t\t\t\tcase \"%F\": return \"\\\"+this.locale.date.month_full[date.getMonth()]+\\\"\";\r\n\t\t\t\tcase \"%h\": return \"\\\"+this.date.to_fixed((date.getHours()+11)%12+1)+\\\"\";\r\n\t\t\t\tcase \"%g\": return \"\\\"+((date.getHours()+11)%12+1)+\\\"\";\r\n\t\t\t\tcase \"%G\": return \"\\\"+date.getHours()+\\\"\";\r\n\t\t\t\tcase \"%H\": return \"\\\"+this.date.to_fixed(date.getHours())+\\\"\";\r\n\t\t\t\tcase \"%i\": return \"\\\"+this.date.to_fixed(date.getMinutes())+\\\"\";\r\n\t\t\t\tcase \"%a\": return \"\\\"+(date.getHours()>11?\\\"pm\\\":\\\"am\\\")+\\\"\";\r\n\t\t\t\tcase \"%A\": return \"\\\"+(date.getHours()>11?\\\"PM\\\":\\\"AM\\\")+\\\"\";\r\n\t\t\t\tcase \"%s\": return \"\\\"+this.date.to_fixed(date.getSeconds())+\\\"\";\r\n\t\t\t\tcase \"%W\": return \"\\\"+this.date.to_fixed(this.date.getISOWeek(date))+\\\"\";\r\n\t\t\t\tdefault: return a;\r\n\t\t\t}\r\n\t\t});\r\n\t\tif (utc) format=format.replace(/date\\.get/g,\"date.getUTC\");\r\n\t\tvar func = new Function(\"date\",\"return \\\"\"+format+\"\\\";\");\r\n\r\n\t\treturn func.bind(scheduler);\r\n\t},\r\n\tstr_to_date:function(format, utc, exactFormat){\r\n\t\tvar stringToDateMethod = useCsp() ? csp_str_to_date : generateStringToDate;\r\n\t\tvar parseExactFormat = stringToDateMethod(format, utc);\r\n\t\t// eslint-disable-next-line\r\n\t\tvar yyyyMMddhhIIss = /^[0-9]{4}(\\-|\\/)[0-9]{2}(\\-|\\/)[0-9]{2} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/;\r\n\r\n\t\t// MM/dd/yyyy - default old format for xml-date\r\n\t\t// eslint-disable-next-line\r\n\t\tvar MMddyyyyhhIIss = /^[0-9]{2}\\/[0-9]{2}\\/[0-9]{4} ?(([0-9]{1,2}:[0-9]{2})(:[0-9]{1,2})?)?$/;\r\n\t\t// dd-MM-yyyy - default old format for api-date\r\n\t\t// eslint-disable-next-line\r\n\t\tvar ddMMyyyyhhIIss = /^[0-9]{2}\\-[0-9]{2}\\-[0-9]{4} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/;\r\n\t\t// eslint-disable-next-line\r\n\t\tvar ISO8601 = /^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$/;\r\n\r\n\t\tvar isYMDDate = function (datestr) {\r\n\t\t\treturn yyyyMMddhhIIss.test(String(datestr));\r\n\t\t};\r\n\r\n\t\tvar isMDYDate = function (datestr) {\r\n\t\t\treturn MMddyyyyhhIIss.test(String(datestr));\r\n\t\t};\r\n\t\tvar isDMYDate = function (datestr) {\r\n\t\t\treturn ddMMyyyyhhIIss.test(String(datestr));\r\n\t\t};\r\n\t\tvar isISO8601 = function (datestr) {\r\n\t\t\treturn ISO8601.test(datestr);\r\n\t\t};\r\n\r\n\t\tvar parseYMD = stringToDateMethod(\"%Y-%m-%d %H:%i:%s\", utc);\r\n\t\tvar parseMDY = stringToDateMethod(\"%m/%d/%Y %H:%i:%s\", utc);\r\n\t\tvar parseDMY = stringToDateMethod(\"%d-%m-%Y %H:%i:%s\", utc);\r\n\r\n\t\treturn function (dateString) {\r\n\r\n\t\t\tif (!exactFormat && !scheduler.config.parse_exact_format) {\r\n\t\t\t\tif (dateString && dateString.getISOWeek) {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t} else if (typeof dateString === \"number\") {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t} else if (isYMDDate(dateString)) {\r\n\t\t\t\t\treturn parseYMD(dateString);\r\n\t\t\t\t} else if (isMDYDate(dateString)) {\r\n\t\t\t\t\treturn parseMDY(dateString);\r\n\t\t\t\t} else if (isDMYDate(dateString)) {\r\n\t\t\t\t\treturn parseDMY(dateString);\r\n\t\t\t\t} else if (isISO8601(dateString)) {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn parseExactFormat.call(scheduler, dateString);\r\n\t\t};\r\n\t},\r\n\tgetISOWeek: function(ndate) {\r\n\t\tif(!ndate) return false;\r\n\t\tndate = this.date_part(new Date(ndate));\r\n\t\tvar nday = ndate.getDay();\r\n\t\tif (nday === 0) {\r\n\t\t\tnday = 7;\r\n\t\t}\r\n\t\tvar first_thursday = new Date(ndate.valueOf());\r\n\t\tfirst_thursday.setDate(ndate.getDate() + (4 - nday));\r\n\t\tvar year_number = first_thursday.getFullYear(); // year of the first Thursday\r\n\t\tvar ordinal_date = Math.round( (first_thursday.getTime() - new Date(year_number, 0, 1).getTime()) / 86400000); //ordinal date of the first Thursday - 1 (so not really ordinal date)\r\n\t\tvar week_number = 1 + Math.floor( ordinal_date / 7);\r\n\t\treturn week_number;\r\n\t},\r\n\tgetUTCISOWeek: function(ndate){\r\n\t\treturn this.getISOWeek(this.convert_to_utc(ndate));\r\n\t},\r\n\tconvert_to_utc: function(date) {\r\n\t\treturn new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds());\r\n\t}\r\n};\r\n\r\n}\r\n\r\n","export default function extend(scheduler) {\r\n\r\n/*\r\n%e\tDay of the month without leading zeros (01..31)\r\n%d\tDay of the month, 2 digits with leading zeros (01..31)\r\n%j\tDay of the year, 3 digits with leading zeros (001..366)\r\n%a\tA textual representation of a day, two letters\r\n%W\tA full textual representation of the day of the week\r\n\r\n%c\tNumeric representation of a month, without leading zeros (0..12)\r\n%m\tNumeric representation of a month, with leading zeros (00..12)\r\n%b\tA short textual representation of a month, three letters (Jan..Dec)\r\n%M\tA full textual representation of a month, such as January or March (January..December)\r\n\r\n%y\tA two digit representation of a year (93..03)\r\n%Y\tA full numeric representation of a year, 4 digits (1993..03)\r\n*/\r\n\r\nscheduler.config={\r\n\tdefault_date: \"%j %M %Y\",\r\n\tmonth_date: \"%F %Y\",\r\n\tload_date: \"%Y-%m-%d\",\r\n\tweek_date: \"%l\",\r\n\tday_date: \"%D %j\",\r\n\thour_date: \"%H:%i\",\r\n\tmonth_day: \"%d\",\r\n\t//xml_date: \"%m/%d/%Y %H:%i\",\r\n\tdate_format: \"%Y-%m-%d %H:%i\",\r\n\tapi_date: \"%d-%m-%Y %H:%i\",\r\n\tparse_exact_format: false,\r\n\tpreserve_length:true,\r\n\ttime_step: 5,\r\n\tdisplayed_event_color: \"#ff4a4a\",\r\n\tdisplayed_event_text_color: \"#ffef80\",\r\n\twide_form: 0,\r\n\tday_column_padding: 8,\r\n\tuse_select_menu_space: true,\r\n\tfix_tab_position: true,\r\n\tstart_on_monday: true,\r\n\tfirst_hour: 0,\r\n\tlast_hour: 24,\r\n\treadonly: false,\r\n\tdrag_resize: true,\r\n\tdrag_move: true,\r\n\tdrag_create: true,\r\n\tdrag_event_body: true,\r\n\tdblclick_create: true,\r\n\tdetails_on_dblclick: true,\r\n\tedit_on_create: true,\r\n\tdetails_on_create: true,\r\n\theader: null,\r\n\thour_size_px: 44,\r\n\tresize_month_events:false,\r\n\tresize_month_timed:false,\r\n\t\r\n\tresponsive_lightbox: false,\r\n\tseparate_short_events: true,\r\n\trtl:false,\r\n\r\n\tcascade_event_display: false,\r\n\tcascade_event_count: 4,\r\n\tcascade_event_margin: 30,\r\n\r\n\tmulti_day:true,\r\n\tmulti_day_height_limit: 200,\r\n\r\n\tdrag_lightbox: true,\r\n\tpreserve_scroll: true,\r\n\tselect: true,\r\n\r\n\tserver_utc: false,\r\n\ttouch:true,\r\n\ttouch_tip:true,\r\n\ttouch_drag:500,\r\n\ttouch_swipe_dates: false,\r\n\tquick_info_detached:true,\r\n\r\n\tpositive_closing: false,\r\n\t//header_datepicker: true,\r\n\tdrag_highlight: true,\r\n\tlimit_drag_out: false,\r\n\ticons_edit: [\"icon_save\", \"icon_cancel\"],\r\n\ticons_select: [\"icon_details\", \"icon_edit\", \"icon_delete\"],\r\n\tbuttons_left: [\"dhx_save_btn\", \"dhx_cancel_btn\"],\r\n\tbuttons_right: [\"dhx_delete_btn\"],\r\n\tlightbox: {\r\n\t\tsections: [\r\n\t\t\t{name: \"description\", map_to: \"text\", type: \"textarea\", focus: true},\r\n\t\t\t{name: \"time\", height: 72, type: \"time\", map_to: \"auto\"}\r\n\t\t]\r\n\t},\r\n\thighlight_displayed_event: true,\r\n\tleft_border: false,\r\n\r\n\tajax_error: \"alert\",//\"ignore\"|\"console\"\r\n\tdelay_render: 0,\r\n\ttimeline_swap_resize: true,\r\n\twai_aria_attributes: true,\r\n\twai_aria_application_role: true,\r\n\r\n\tcsp: \"auto\",\r\n\tevent_attribute: \"data-event-id\",\r\n\tshow_errors: true\r\n};\r\n\r\nscheduler.config.buttons_left.$initial = scheduler.config.buttons_left.join();\r\nscheduler.config.buttons_right.$initial = scheduler.config.buttons_right.join();\r\n\r\nscheduler._helpers = {\r\n\tparseDate: function parseDate(date) {\r\n\t\tvar parse = scheduler.templates.xml_date || scheduler.templates.parse_date;\r\n\t\treturn parse(date);\r\n\t},\r\n\tformatDate: function formatDate(date) {\r\n\t\tvar format = scheduler.templates.xml_format || scheduler.templates.format_date;\r\n\t\treturn format(date);\r\n\t}\r\n};\r\n\r\nscheduler.templates={};\r\nscheduler.init_templates=function(){\r\n\r\n\r\n\r\n\tvar d=scheduler.date.date_to_str;\r\n\tvar c=scheduler.config;\r\n\tvar f = function(a,b){\r\n\t\tfor (var c in b)\r\n\t\t\tif (!a[c]) a[c]=b[c];\r\n\t};\r\n\tf(scheduler.templates,{\r\n\t\tday_date:d(c.default_date),\r\n\t\tmonth_date:d(c.month_date),\r\n\t\tweek_date:function(d1,d2){\r\n\t\t\tif(c.rtl) {\r\n\t\t\t\treturn scheduler.templates.day_date(scheduler.date.add(d2,-1,\"day\"))+\" – \"+scheduler.templates.day_date(d1);\r\n\t\t\t} \r\n\t\t\treturn scheduler.templates.day_date(d1)+\" – \"+scheduler.templates.day_date(scheduler.date.add(d2,-1,\"day\"));\r\n\t\t},\r\n\t\tday_scale_date:d(c.default_date),\r\n\t\ttime_slot_text: function(date){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\ttime_slot_class: function(date){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\r\n\t\tmonth_scale_date:d(c.week_date),\r\n\t\tweek_scale_date:d(c.day_date),\r\n\t\thour_scale:d(c.hour_date),\r\n\t\ttime_picker:d(c.hour_date),\r\n\t\tevent_date:d(c.hour_date),\r\n\t\tmonth_day:d(c.month_day),\r\n\r\n\t\tload_format: d(c.load_date),\r\n\t//\txml_date:scheduler.date.str_to_date(c.xml_date,c.server_utc),\r\n\t//\txml_format:d(c.date_format,c.server_utc),\r\n\t\tformat_date: d(c.date_format, c.server_utc),\r\n\t\tparse_date:scheduler.date.str_to_date(c.date_format,c.server_utc),\r\n\t\tapi_date:scheduler.date.str_to_date(c.api_date, false, false),\r\n\t\tevent_header:function(start,end,ev){\r\n\r\n\t\t\tif(ev._mode === \"small\" || ev._mode === \"smallest\"){\r\n\t\t\t\treturn scheduler.templates.event_date(start);\r\n\t\t\t}else{\r\n\t\t\t\treturn scheduler.templates.event_date(start)+\" - \"+scheduler.templates.event_date(end);\r\n\t\t\t}\r\n\t\t},\r\n\t\tevent_text:function(start,end,ev){\r\n\t\t\treturn ev.text;\r\n\t\t},\r\n\t\tevent_class:function(start,end,ev){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tmonth_date_class:function(d){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tweek_date_class:function(d){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tevent_bar_date:function(start,end,ev) {\r\n\t\t\treturn scheduler.templates.event_date(start);\r\n\t\t},\r\n\t\tevent_bar_text:function(start,end,ev){\r\n\t\t\treturn ev.text;\r\n\t\t},\r\n\t\tmonth_events_link : function(date, count){\r\n\t\t\treturn \"View more(\"+count+\" events)\";\r\n\t\t},\r\n\t\tdrag_marker_class : function(start, end, event){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tdrag_marker_content : function(start, end, event){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\t/* Could be redifined */\r\n\t\ttooltip_date_format: scheduler.date.date_to_str(\"%Y-%m-%d %H:%i\"),\r\n\t\ttooltip_text: function(start, end, event) {\r\n\t\t\treturn \"Event: \" + event.text + \"
Start date: \" + scheduler.templates.tooltip_date_format(start) + \"
End date: \" + scheduler.templates.tooltip_date_format(end);\r\n\t\t},\r\n\r\n\t\tcalendar_month: d(\"%F %Y\"),\r\n\t\tcalendar_scale_date: d(\"%D\"),\r\n\t\tcalendar_date: d(\"%d\"),\r\n\t\tcalendar_time: d(\"%d-%m-%Y\")\r\n\r\n\t});\r\n\tthis.callEvent(\"onTemplatesReady\",[]);\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler._events = {};\r\nscheduler.clearAll = function() {\r\n\tthis._events = {};\r\n\tthis._loaded = {};\r\n\r\n\tthis._edit_id = null;\r\n\tthis._select_id = null;\r\n\tthis._drag_id = null;\r\n\tthis._drag_mode = null;\r\n\tthis._drag_pos = null;\r\n\tthis._new_event = null;\r\n\r\n\tthis.clear_view();\r\n\tthis.callEvent(\"onClearAll\", []);\r\n};\r\nscheduler.addEvent = function(start_date, end_date, text, id, extra_data) {\r\n\tif (!arguments.length)\r\n\t\treturn this.addEventNow();\r\n\tvar ev = start_date;\r\n\tif (arguments.length != 1) {\r\n\t\tev = extra_data || {};\r\n\t\tev.start_date = start_date;\r\n\t\tev.end_date = end_date;\r\n\t\tev.text = text;\r\n\t\tev.id = id;\r\n\t}\r\n\tev.id = ev.id || scheduler.uid();\r\n\tev.text = ev.text || \"\";\r\n\r\n\tif (typeof ev.start_date == \"string\") ev.start_date = this.templates.api_date(ev.start_date);\r\n\tif (typeof ev.end_date == \"string\") ev.end_date = this.templates.api_date(ev.end_date);\r\n\tvar d = (this.config.event_duration || this.config.time_step) * 60000;\r\n\tif (ev.start_date.valueOf() == ev.end_date.valueOf())\r\n\t\tev.end_date.setTime(ev.end_date.valueOf() + d);\r\n\r\n\tev.start_date.setMilliseconds(0);\r\n\tev.end_date.setMilliseconds(0);\r\n\r\n\tev._timed = this.isOneDayEvent(ev);\r\n\r\n\tvar is_new = !this._events[ev.id];\r\n\tthis._events[ev.id] = ev;\r\n\tthis.event_updated(ev);\r\n\tif (!this._loading)\r\n\t\tthis.callEvent(is_new ? \"onEventAdded\" : \"onEventChanged\", [ev.id, ev]);\r\n\treturn ev.id;\r\n};\r\nscheduler.deleteEvent = function(id, silent) {\r\n\tvar ev = this._events[id];\r\n\tif (!silent && (!this.callEvent(\"onBeforeEventDelete\", [id, ev]) || !this.callEvent(\"onConfirmedBeforeEventDelete\", [id, ev])))\r\n\t\treturn;\r\n\tif (ev) {\r\n\t\tif(scheduler.getState().select_id == id){\r\n\t\t\tscheduler.unselect();\r\n\t\t}\r\n\t\tdelete this._events[id];\r\n\t\tthis.event_updated(ev);\r\n\r\n\t\tif(this._drag_id == ev.id){\r\n\t\t\tthis._drag_id = null;\r\n\t\t\tthis._drag_mode=null;\r\n\t\t\tthis._drag_pos=null;\r\n\t\t}\r\n\t}\r\n\r\n\tthis.callEvent(\"onEventDeleted\", [id, ev]);\r\n};\r\nscheduler.getEvent = function(id) {\r\n\treturn this._events[id];\r\n};\r\nscheduler.setEvent = function(id, hash) {\r\n\tif(!hash.id)\r\n\t\thash.id = id;\r\n\r\n\tthis._events[id] = hash;\r\n};\r\nscheduler.for_rendered = function(id, method) {\r\n\tfor (var i = this._rendered.length - 1; i >= 0; i--)\r\n\t\tif (this._rendered[i].getAttribute(this.config.event_attribute) == id)\r\n\t\t\tmethod(this._rendered[i], i);\r\n};\r\nscheduler.changeEventId = function(id, new_id) {\r\n\tif (id == new_id) return;\r\n\tvar ev = this._events[id];\r\n\tif (ev) {\r\n\t\tev.id = new_id;\r\n\t\tthis._events[new_id] = ev;\r\n\t\tdelete this._events[id];\r\n\t}\r\n\tthis.for_rendered(id, function(r) {\r\n\t\tr.setAttribute(\"event_id\", new_id); // for backward compatibility\r\n\t\tr.setAttribute(scheduler.config.event_attribute, new_id);\r\n\t});\r\n\tif (this._select_id == id) this._select_id = new_id;\r\n\tif (this._edit_id == id) this._edit_id = new_id;\r\n\t//if (this._drag_id==id) this._drag_id=new_id;\r\n\tthis.callEvent(\"onEventIdChange\", [id, new_id]);\r\n};\r\n\r\n(function() {\r\n\tvar attrs = [\"text\", \"Text\", \"start_date\", \"StartDate\", \"end_date\", \"EndDate\"];\r\n\tvar create_getter = function(name) {\r\n\t\treturn function(id) { return (scheduler.getEvent(id))[name]; };\r\n\t};\r\n\tvar create_setter = function(name) {\r\n\t\treturn function(id, value) {\r\n\t\t\tvar ev = scheduler.getEvent(id);\r\n\t\t\tev[name] = value;\r\n\t\t\tev._changed = true;\r\n\t\t\tev._timed = this.isOneDayEvent(ev);\r\n\t\t\tscheduler.event_updated(ev, true);\r\n\t\t};\r\n\t};\r\n\tfor (var i = 0; i < attrs.length; i += 2) {\r\n\t\tscheduler[\"getEvent\" + attrs[i + 1]] = create_getter(attrs[i]);\r\n\t\tscheduler[\"setEvent\" + attrs[i + 1]] = create_setter(attrs[i]);\r\n\t}\r\n})();\r\n\r\nscheduler.event_updated = function(ev, force) {\r\n\tif (this.is_visible_events(ev))\r\n\t\tthis.render_view_data();\r\n\telse\r\n\t\tthis.clear_event(ev.id);\r\n};\r\nscheduler.is_visible_events = function(ev) {\r\n\tif(!this._min_date || !this._max_date){\r\n\t\treturn false;\r\n\t}\r\n\r\n\t//if in displayed dates\r\n\tvar in_visible_range = (ev.start_date.valueOf() < this._max_date.valueOf() && this._min_date.valueOf() < ev.end_date.valueOf());\r\n\r\n\tif(in_visible_range){\r\n\r\n\t\t//end dates are not between last/first hours\r\n\t\tvar evFirstHour = ev.start_date.getHours(),\r\n\t\t\tevLastHour = ev.end_date.getHours() + (ev.end_date.getMinutes()/60),\r\n\t\t\tlastHour = this.config.last_hour,\r\n\t\t\tfirstHour = this.config.first_hour;\r\n\r\n\t\tvar end_dates_visible = (this._table_view || !((evLastHour > lastHour || evLastHour <= firstHour) && (evFirstHour >= lastHour || evFirstHour < firstHour)));\r\n\r\n\t\tif(end_dates_visible){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\r\n\t\t\t//event is bigger than area hidden between last/first hours\r\n\t\t\tvar event_duration = (ev.end_date.valueOf() - ev.start_date.valueOf()) / (1000*60*60),//hours\r\n\t\t\t\thidden_duration = 24 - (this.config.last_hour - this.config.first_hour);\r\n\r\n\t\t\treturn !!((event_duration > hidden_duration) || (evFirstHour < lastHour && evLastHour > firstHour));\r\n\r\n\t\t}\r\n\t}else{\r\n\t\treturn false;\r\n\t}\r\n};\r\nscheduler.isOneDayEvent = function(ev) {\r\n\t// decrease by one ms so events that ends on midnight on the next day were still considered one day events\r\n\t// e.g. (09-02-2018 19:00 - 10-02-2018 00:00)\r\n\t// events >= 24h long are considered multiday\r\n\tvar checkEndDate = new Date(ev.end_date.valueOf() - 1);\r\n\treturn (\r\n\t\tev.start_date.getFullYear() === checkEndDate.getFullYear() &&\r\n\t\tev.start_date.getMonth() === checkEndDate.getMonth() &&\r\n\t\tev.start_date.getDate() === checkEndDate.getDate()\r\n\t) && ((ev.end_date.valueOf() - ev.start_date.valueOf()) < (1000 * 60 * 60 * 24));\r\n};\r\n\r\nscheduler.get_visible_events = function(only_timed) {\r\n\t//not the best strategy for sure\r\n\tvar stack = [];\r\n\r\n\tfor (var id in this._events)\r\n\t\tif (this.is_visible_events(this._events[id]))\r\n\t\t\tif (!only_timed || this._events[id]._timed)\r\n\t\t\t\tif (this.filter_event(id, this._events[id]))\r\n\t\t\t\t\tstack.push(this._events[id]);\r\n\r\n\treturn stack;\r\n};\r\nscheduler.filter_event = function(id, ev) {\r\n\tvar filter = this[\"filter_\" + this._mode];\r\n\treturn (filter) ? filter(id, ev) : true;\r\n};\r\nscheduler._is_main_area_event = function(ev){\r\n\treturn !!ev._timed;\r\n};\r\nscheduler.render_view_data = function(evs, hold) {\r\n\tvar full = false;\r\n\tif (!evs) {\r\n\t\tfull = true;\r\n\t\tif (this._not_render) {\r\n\t\t\tthis._render_wait = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._render_wait = false;\r\n\r\n\t\tthis.clear_view();\r\n\t\tevs = this.get_visible_events(!(this._table_view || this.config.multi_day));\r\n\t}\r\n\tfor(var i= 0, len = evs.length; i < len; i++){\r\n\t\tthis._recalculate_timed(evs[i]);\r\n\t}\r\n\r\n\tif (this.config.multi_day && !this._table_view) {\r\n\r\n\t\tvar tvs = [];\r\n\t\tvar tvd = [];\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tif (this._is_main_area_event(evs[i]))\r\n\t\t\t\ttvs.push(evs[i]);\r\n\t\t\telse\r\n\t\t\t\ttvd.push(evs[i]);\r\n\t\t}\r\n\r\n\t\tif(!this._els['dhx_multi_day']){\r\n\t\t\tvar message = scheduler._commonErrorMessages.unknownView(this._mode);\r\n\t\t\tthrow new Error(message);\r\n\t\t}\r\n\r\n\t\t// multiday events\r\n\t\tthis._rendered_location = this._els['dhx_multi_day'][0];\r\n\t\tthis._table_view = true;\r\n\t\tthis.render_data(tvd, hold);\r\n\t\tthis._table_view = false;\r\n\r\n\t\t// normal events\r\n\t\tthis._rendered_location = this._els['dhx_cal_data'][0];\r\n\t\tthis._table_view = false;\r\n\t\tthis.render_data(tvs, hold);\r\n\r\n\t} else {\r\n\t\tvar buffer = document.createDocumentFragment();\r\n\t\tvar renderedLocation = this._els['dhx_cal_data'][0];\r\n\t\tthis._rendered_location = buffer;\r\n\t\tthis.render_data(evs, hold);\r\n\t\trenderedLocation.appendChild(buffer);\r\n\t\tthis._rendered_location = renderedLocation;\r\n\r\n\t}\r\n\r\n\tif(full){\r\n\t\tthis.callEvent(\"onDataRender\", []);\r\n\t}\r\n};\r\n\r\n\r\nscheduler._view_month_day = function(e){\r\n\tvar date = scheduler.getActionData(e).date;\r\n\tif(!scheduler.callEvent(\"onViewMoreClick\", [date]))\r\n\t\treturn;\r\n\tscheduler.setCurrentView(date, \"day\");\r\n};\r\n\r\nscheduler._render_month_link = function(ev){\r\n\tvar parent = this._rendered_location;\r\n\tvar toRender = this._lame_clone(ev);\r\n\r\n\t//render links in each cell of multiday events\r\n\tfor(var d = ev._sday; d < ev._eday; d++){\r\n\r\n\t\ttoRender._sday = d;\r\n\t\ttoRender._eday = d+1;\r\n\r\n\t\tvar date = scheduler.date;\r\n\t\tvar curr = scheduler._min_date;\r\n\t\tcurr = date.add(curr, toRender._sweek, \"week\");\r\n\t\tcurr = date.add(curr, toRender._sday, \"day\");\r\n\t\tvar count = scheduler.getEvents(curr, date.add(curr, 1, \"day\")).length;\r\n\r\n\t\tvar pos = this._get_event_bar_pos(toRender);\r\n\t\tvar widt = (pos.x2 - pos.x);\r\n\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tscheduler.event(el, \"click\", function(e){scheduler._view_month_day(e);});\r\n\t\tel.className = \"dhx_month_link\";\r\n\t\tel.style.top = pos.y + \"px\";\r\n\t\tel.style.left = pos.x + \"px\";\r\n\t\tel.style.width = widt + \"px\";\r\n\t\tel.innerHTML = scheduler.templates.month_events_link(curr, count);\r\n\t\tthis._rendered.push(el);\r\n\r\n\t\tparent.appendChild(el);\r\n\t}\r\n};\r\n\r\nscheduler._recalculate_timed = function(id){\r\n\tif(!id) return;\r\n\tvar ev;\r\n\tif(typeof(id) != \"object\")\r\n\t\tev = this._events[id];\r\n\telse\r\n\t\tev = id;\r\n\tif(!ev) return;\r\n\tev._timed = scheduler.isOneDayEvent(ev);\r\n};\r\nscheduler.attachEvent(\"onEventChanged\", scheduler._recalculate_timed);\r\nscheduler.attachEvent(\"onEventAdded\", scheduler._recalculate_timed);\r\n\r\nscheduler.render_data = function(evs, hold) {\r\n\tevs = this._pre_render_events(evs, hold);\r\n\tvar containers = {};\r\n\tfor (var i = 0; i < evs.length; i++)\r\n\t\tif (this._table_view){\r\n\t\t\tif(scheduler._mode != 'month'){\r\n\t\t\t\tthis.render_event_bar(evs[i]);//may be multiday section on other views\r\n\t\t\t}else{\r\n\r\n\t\t\t\tvar max_evs = scheduler.config.max_month_events;\r\n\t\t\t\tif(max_evs !== max_evs*1 || evs[i]._sorder < max_evs){\r\n\t\t\t\t\t//of max number events per month cell is set and event can be rendered\r\n\t\t\t\t\tthis.render_event_bar(evs[i]);\r\n\t\t\t\t}else if(max_evs !== undefined && evs[i]._sorder == max_evs){\r\n\t\t\t\t\t//render 'view more' links\r\n\t\t\t\t\tscheduler._render_month_link(evs[i]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\t//do not render events with ordinal number > maximum events per cell\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t}else{\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tvar parent = scheduler.locate_holder(ev._sday);\r\n\t\t\tif (!parent) continue; //attempt to render non-visible event\r\n\r\n\t\t\tif(!containers[ev._sday]){\r\n\t\t\t\tcontainers[ev._sday] = {\r\n\t\t\t\t\treal: parent,\r\n\t\t\t\t\tbuffer: document.createDocumentFragment(),\r\n\t\t\t\t\twidth: parent.clientWidth\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\tvar container = containers[ev._sday];\r\n\t\t\tthis.render_event(ev, container.buffer, container.width);\r\n\t\t}\r\n\r\n\t\tfor(var i in containers){\r\n\t\t\tvar container = containers[i];\r\n\t\t\tif(container.real && container.buffer){\r\n\t\t\t\tcontainer.real.appendChild(container.buffer);\r\n\t\t\t}\r\n\t\t}\r\n};\r\n\r\nscheduler._get_first_visible_cell = function(cells) {\r\n\tfor (var i = 0; i < cells.length; i++) {\r\n\t\tif ((cells[i].className || \"\").indexOf(\"dhx_scale_ignore\") == -1) {\r\n\t\t\treturn cells[i];\r\n\t\t}\r\n\t}\r\n\t// if no visible cell found, return cells[0] to be more tolerant, since it's the original logic\r\n\treturn cells[0];\r\n};\r\n\r\nscheduler._pre_render_events = function(evs, hold) {\r\n\tvar hb = this.xy.bar_height;\r\n\tvar h_old = this._colsS.heights;\r\n\tvar h = this._colsS.heights = [0, 0, 0, 0, 0, 0, 0];\r\n\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\r\n\tif (!this._table_view) {\r\n\t\tevs = this._pre_render_events_line(evs, hold); //ignore long events for now\r\n\t}\r\n\telse {\r\n\t\tevs = this._pre_render_events_table(evs, hold);\r\n\t}\r\n\tif (this._table_view) {\r\n\t\tif (hold)\r\n\t\t\tthis._colsS.heights = h_old;\r\n\t\telse {\r\n\t\t\tvar monthRows = data.querySelectorAll(\".dhx_cal_month_row\");\r\n\t\t\tif (monthRows.length) {\r\n\t\t\t\tfor (var i = 0; i < monthRows.length; i++) {\r\n\t\t\t\t\th[i]++;\r\n\t\t\t\t\tvar cells = monthRows[i].querySelectorAll(\".dhx_cal_month_cell\");\r\n\t\t\t\t\tvar cellHeight = this._colsS.height - this.xy.month_head_height;\r\n\t\t\t\t\tif ((h[i]) * hb > cellHeight) { // 22 - height of cell's header\r\n\t\t\t\t\t\t//we have overflow, update heights\r\n\r\n\t\t\t\t\t\tvar cHeight = cellHeight;\r\n\t\t\t\t\t\tif(this.config.max_month_events*1 !== this.config.max_month_events || h[i] <= this.config.max_month_events){\r\n\t\t\t\t\t\t\tcHeight = h[i] * hb;\r\n\t\t\t\t\t\t}else if( (this.config.max_month_events + 1) * hb > cellHeight){\r\n\t\t\t\t\t\t\tcHeight = (this.config.max_month_events + 1) * hb;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tmonthRows[i].style.height = (cHeight + this.xy.month_head_height) + \"px\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\th[i] = (h[i - 1] || 0) + scheduler._get_first_visible_cell(cells).offsetHeight;\r\n\t\t\t\t}\r\n\t\t\t\th.unshift(0);\r\n\t\t\t\tconst dataArea = this.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tif (dataArea.offsetHeight < dataArea.scrollHeight && !scheduler._colsS.scroll_fix && scheduler.xy.scroll_width) {\r\n\r\n\t\t\t\t\tvar scale_settings = scheduler._colsS,\r\n\t\t\t\t\t\tsum_width = scale_settings[scale_settings.col_length],\r\n\t\t\t\t\t\trow_heights = scale_settings.heights.slice();\r\n\r\n\t\t\t\t\tsum_width -= (scheduler.xy.scroll_width || 0);\r\n\t\t\t\t\tthis._calc_scale_sizes(sum_width, this._min_date, this._max_date);\r\n\t\t\t\t\tscheduler._colsS.heights = row_heights;\r\n\r\n\t\t\t\t\tthis.set_xy(this._els[\"dhx_cal_header\"][0], sum_width/*, this.xy.scale_height*/);\r\n\t\t\t\t\tscheduler._render_scales(this._els[\"dhx_cal_header\"][0]);\r\n\t\t\t\t\tscheduler._render_month_scale(this._els[\"dhx_cal_data\"][0], this._get_timeunit_start(), this._min_date);\r\n\r\n\t\t\t\t\tscale_settings.scroll_fix = true;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (!evs.length && this._els[\"dhx_multi_day\"][0].style.visibility == \"visible\")\r\n\t\t\t\t\th[0] = -1;\r\n\t\t\t\tif (evs.length || h[0] == -1) {\r\n\t\t\t\t\t//shift days to have space for multiday events\r\n\t\t\t\t\t//var childs = evl.parentNode.childNodes;\r\n\r\n\t\t\t\t\t// +1 so multiday events would have 2px from top and 2px from bottom by default\r\n\t\t\t\t\tvar full_multi_day_height = (h[0] + 1) * hb + 4;\r\n\r\n\t\t\t\t\tvar used_multi_day_height = full_multi_day_height;\r\n\t\t\t\t\tvar used_multi_day_height_css = full_multi_day_height + \"px\";\r\n\t\t\t\t\tif (this.config.multi_day_height_limit) {\r\n\t\t\t\t\t\tused_multi_day_height = Math.min(full_multi_day_height, this.config.multi_day_height_limit) ;\r\n\t\t\t\t\t\tused_multi_day_height_css = used_multi_day_height + \"px\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tvar multi_day_section = this._els[\"dhx_multi_day\"][0];\r\n\t\t\t\t\tmulti_day_section.style.height = used_multi_day_height_css;\r\n\t\t\t\t\tmulti_day_section.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\tmulti_day_section.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\r\n\t\t\t\t\t// icon\r\n\t\t\t\t\tvar multi_day_icon = this._els[\"dhx_multi_day\"][1];\r\n\t\t\t\t\tmulti_day_icon.style.height = used_multi_day_height_css;\r\n\t\t\t\t\tmulti_day_icon.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\tmulti_day_icon.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\t\t\t\t\tmulti_day_icon.className = h[0] ? \"dhx_multi_day_icon\" : \"dhx_multi_day_icon_small\";\r\n\t\t\t\t\tthis._dy_shift = (h[0] + 1) * hb;\r\n\t\t\t\t\tif(this.config.multi_day_height_limit){\r\n\t\t\t\t\t\tthis._dy_shift = Math.min(this.config.multi_day_height_limit, this._dy_shift);\r\n\t\t\t\t\t}\r\n\t\t\t\t\th[0] = 0;\r\n\r\n\t\t\t\t\tif (used_multi_day_height != full_multi_day_height) {\r\n\r\n\t\t\t\t\t\tmulti_day_section.style.overflowY = \"auto\";\r\n\t\t\t\t\t//\tmulti_day_section.style.width = (parseInt(this._els[\"dhx_cal_navline\"][0].style.width)) + \"px\";\r\n\r\n\t\t\t\t\t\tmulti_day_icon.style.position = \"fixed\";\r\n\t\t\t\t\t\tmulti_day_icon.style.top = \"\";\r\n\t\t\t\t\t\tmulti_day_icon.style.left = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn evs;\r\n};\r\nscheduler._get_event_sday = function(ev) {\r\n\t// get day in current view\r\n\t// use rounding for 23 or 25 hour days on DST\r\n\tvar datePart = this.date.day_start(new Date(ev.start_date));\r\n\treturn Math.round((datePart.valueOf() - this._min_date.valueOf()) / (24 * 60 * 60 * 1000));\r\n};\r\nscheduler._get_event_mapped_end_date = function(ev) {\r\n\tvar end_date = ev.end_date;\r\n\tif (this.config.separate_short_events) {\r\n\t\tvar ev_duration = (ev.end_date - ev.start_date) / 60000; // minutes\r\n\t\tif (ev_duration < this._min_mapped_duration) {\r\n\t\t\tend_date = this.date.add(end_date, this._min_mapped_duration - ev_duration, \"minute\");\r\n\t\t}\r\n\t}\r\n\treturn end_date;\r\n};\r\nscheduler._pre_render_events_line = function(evs, hold){\r\n\tevs.sort(function(a, b) {\r\n\t\tif (a.start_date.valueOf() == b.start_date.valueOf())\r\n\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\treturn a.start_date > b.start_date ? 1 : -1;\r\n\t});\r\n\tvar days = []; //events by weeks\r\n\tvar evs_originals = [];\r\n\r\n\tthis._min_mapped_duration = Math.floor(this.xy.min_event_height * 60 / this.config.hour_size_px); // values could change along the way\r\n\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tvar ev = evs[i];\r\n\r\n\t\t//check date overflow\r\n\t\tvar sd = ev.start_date;\r\n\t\tvar ed = ev.end_date;\r\n\t\t//check scale overflow\r\n\t\tvar sh = sd.getHours();\r\n\t\tvar eh = ed.getHours();\r\n\t\tev._sday = this._get_event_sday(ev); // sday based on event start_date\r\n\t\tif (this._ignores[ev._sday]){\r\n\t\t\t//ignore event\r\n\t\t\tevs.splice(i,1);\r\n\t\t\ti--;\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\tif (!days[ev._sday]) days[ev._sday] = [];\r\n\r\n\t\tif (!hold) {\r\n\t\t\tev._inner = false;\r\n\r\n\t\t\tvar stack = days[ev._sday];\r\n\r\n\t\t\twhile (stack.length) {\r\n\t\t\t\tvar t_ev = stack[stack.length - 1];\r\n\t\t\t\tvar t_end_date = this._get_event_mapped_end_date(t_ev);\r\n\t\t\t\tif (t_end_date.valueOf() <= ev.start_date.valueOf()) {\r\n\t\t\t\t\tstack.splice(stack.length - 1, 1);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar slot_index = stack.length;\r\n\t\t\tvar sorderSet = false;\r\n\t\t\tfor (var j = 0; j < stack.length; j++) {\r\n\t\t\t\tvar t_ev = stack[j];\r\n\t\t\t\tvar t_end_date = this._get_event_mapped_end_date(t_ev);\r\n\t\t\t\tif (t_end_date.valueOf() <= ev.start_date.valueOf()) {\r\n\t\t\t\t\tsorderSet = true;\r\n\t\t\t\t\tev._sorder = t_ev._sorder;\r\n\t\t\t\t\tslot_index = j;\r\n\t\t\t\t\tev._inner = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (stack.length)\r\n\t\t\t\tstack[stack.length - 1]._inner = true;\r\n\r\n\t\t\tif (!sorderSet) {\r\n\t\t\t\tif (stack.length) {\r\n\t\t\t\t\tif (stack.length <= stack[stack.length - 1]._sorder) {\r\n\t\t\t\t\t\tif (!stack[stack.length - 1]._sorder)\r\n\t\t\t\t\t\t\tev._sorder = 0;\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tfor (j = 0; j < stack.length; j++) {\r\n\t\t\t\t\t\t\t\tvar _is_sorder = false;\r\n\t\t\t\t\t\t\t\tfor (var k = 0; k < stack.length; k++) {\r\n\t\t\t\t\t\t\t\t\tif (stack[k]._sorder == j) {\r\n\t\t\t\t\t\t\t\t\t\t_is_sorder = true;\r\n\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (!_is_sorder) {\r\n\t\t\t\t\t\t\t\t\tev._sorder = j;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\tev._inner = true;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tvar _max_sorder = stack[0]._sorder;\r\n\t\t\t\t\t\tfor (j = 1; j < stack.length; j++) {\r\n\t\t\t\t\t\t\tif (stack[j]._sorder > _max_sorder)\r\n\t\t\t\t\t\t\t\t_max_sorder = stack[j]._sorder;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tev._sorder = _max_sorder + 1;\r\n\t\t\t\t\t\tev._inner = false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} else\r\n\t\t\t\t\tev._sorder = 0;\r\n\t\t\t}\r\n\r\n\t\t\tstack.splice(slot_index, slot_index == stack.length ? 0 : 1, ev);\r\n\r\n\t\t\tif (stack.length > (stack.max_count || 0)) {\r\n\t\t\t\tstack.max_count = stack.length;\r\n\t\t\t\tev._count = stack.length;\r\n\t\t\t} else {\r\n\t\t\t\tev._count = (ev._count) ? ev._count : 1;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (sh < this.config.first_hour || eh >= this.config.last_hour) {\r\n\t\t\t// Need to create copy of event as we will be changing it's start/end date\r\n\t\t\t// e.g. first_hour = 11 and event.start_date hours = 9. Need to preserve that info\r\n\t\t\tevs_originals.push(ev);\r\n\t\t\tevs[i] = ev = this._copy_event(ev);\r\n\r\n\t\t\tif (sh < this.config.first_hour) {\r\n\t\t\t\tev.start_date.setHours(this.config.first_hour);\r\n\t\t\t\tev.start_date.setMinutes(0);\r\n\t\t\t}\r\n\t\t\tif (eh >= this.config.last_hour) {\r\n\t\t\t\tev.end_date.setMinutes(0);\r\n\t\t\t\tev.end_date.setHours(this.config.last_hour);\r\n\t\t\t}\r\n\r\n\t\t\tif (ev.start_date > ev.end_date || sh == this.config.last_hour) {\r\n\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (!hold) {\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tevs[i]._count = days[evs[i]._sday].max_count;\r\n\t\t}\r\n\t\tfor (var i = 0; i < evs_originals.length; i++)\r\n\t\t\tevs_originals[i]._count = days[evs_originals[i]._sday].max_count;\r\n\t}\r\n\r\n\treturn evs;\r\n};\r\nscheduler._time_order = function(evs) {\r\n\tevs.sort(function(a, b) {\r\n\t\tif (a.start_date.valueOf() == b.start_date.valueOf()) {\r\n\t\t\tif (a._timed && !b._timed) return 1;\r\n\t\t\tif (!a._timed && b._timed) return -1;\r\n\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\t}\r\n\t\treturn a.start_date > b.start_date ? 1 : -1;\r\n\t});\r\n};\r\n\r\nscheduler._is_any_multiday_cell_visible = function(from, to, event){\r\n\tvar cols = this._cols.length;\r\n\tvar isAnyCellVisible = false;\r\n\tvar checkDate = from;\r\n\tvar noCells = true;\r\n\tvar lastDayEnd = new Date(to);\r\n\tif(scheduler.date.day_start(new Date(to)).valueOf() != to.valueOf()){\r\n\t\tlastDayEnd = scheduler.date.day_start(lastDayEnd);\r\n\t\tlastDayEnd = scheduler.date.add(lastDayEnd, 1, \"day\");\r\n\t}\r\n\twhile(checkDate < lastDayEnd){\r\n\t\tnoCells = false;\r\n\t\tvar cellIndex = this.locate_holder_day(checkDate, false, event);\r\n\t\tvar weekCellIndex = cellIndex % cols;\r\n\t\tif(!this._ignores[weekCellIndex]){\r\n\t\t\tisAnyCellVisible = true;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tcheckDate = scheduler.date.add(checkDate, 1, \"day\");\r\n\t}\r\n\treturn noCells || isAnyCellVisible;\r\n};\r\n\r\nscheduler._pre_render_events_table = function(evs, hold) { // max - max height of week slot\r\n\tthis._time_order(evs);\r\n\tvar out = [];\r\n\tvar weeks = [\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[]\r\n\t]; //events by weeks\r\n\tvar max = this._colsS.heights;\r\n\tvar start_date;\r\n\tvar cols = this._cols.length;\r\n\tvar chunks_info = {};\r\n\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tvar ev = evs[i];\r\n\t\tvar id = ev.id;\r\n\t\tif (!chunks_info[id]) {\r\n\t\t\tchunks_info[id] = {\r\n\t\t\t\tfirst_chunk: true,\r\n\t\t\t\tlast_chunk: true\r\n\t\t\t};\r\n\t\t}\r\n\t\tvar chunk_info = chunks_info[id];\r\n\t\tvar sd = (start_date || ev.start_date);\r\n\t\tvar ed = ev.end_date;\r\n\t\t//trim events which are crossing through current view\r\n\t\tif (sd < this._min_date) {\r\n\t\t\tchunk_info.first_chunk = false;\r\n\t\t\tsd = this._min_date;\r\n\t\t}\r\n\t\tif (ed > this._max_date) {\r\n\t\t\tchunk_info.last_chunk = false;\r\n\t\t\ted = this._max_date;\r\n\t\t}\r\n\r\n\t\tvar locate_s = this.locate_holder_day(sd, false, ev);\r\n\t\tev._sday = locate_s % cols;\r\n\t\t//skip single day events for ignored dates\r\n\t\tif (this._ignores[ev._sday] && ev._timed) continue;\r\n\r\n\t\tvar locate_e = this.locate_holder_day(ed, true, ev) || cols;\r\n\t\tev._eday = (locate_e % cols) || cols; //cols used to fill full week, when event end on monday\r\n\t\tev._length = locate_e - locate_s;\r\n\t\t//3600000 - compensate 1 hour during winter|summer time shift\r\n\t\tev._sweek = Math.floor((this._correct_shift(sd.valueOf(), 1) - this._min_date.valueOf()) / (60 * 60 * 1000 * 24 * cols));\r\n\r\n\t\tvar isAnyCellVisible = scheduler._is_any_multiday_cell_visible(sd, ed, ev);\r\n\r\n\t\tif(!isAnyCellVisible){\r\n\t\t\tstart_date = null;\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\t//current slot\r\n\t\tvar stack = weeks[ev._sweek];\r\n\t\t//check order position\r\n\t\tvar stack_line;\r\n\r\n\t\tfor (stack_line = 0; stack_line < stack.length; stack_line++)\r\n\t\t\tif (stack[stack_line]._eday <= ev._sday)\r\n\t\t\t\tbreak;\r\n\r\n\t\tif (!ev._sorder || !hold) {\r\n\t\t\tev._sorder = stack_line;\r\n\t\t}\r\n\r\n\t\tif (ev._sday + ev._length <= cols) {\r\n\t\t\tstart_date = null;\r\n\t\t\tout.push(ev);\r\n\t\t\tstack[stack_line] = ev;\r\n\t\t\t//get max height of slot\r\n\t\t\tmax[ev._sweek] = stack.length - 1;\r\n\t\t\tev._first_chunk = chunk_info.first_chunk;\r\n\t\t\tev._last_chunk = chunk_info.last_chunk;\r\n\t\t} else { // split long event in chunks\r\n\t\t\tvar copy = this._copy_event(ev);\r\n\t\t\tcopy.id = ev.id;\r\n\t\t\tcopy._length = cols - ev._sday;\r\n\t\t\tcopy._eday = cols;\r\n\t\t\tcopy._sday = ev._sday;\r\n\t\t\tcopy._sweek = ev._sweek;\r\n\t\t\tcopy._sorder = ev._sorder;\r\n\t\t\tcopy.end_date = this.date.add(sd, copy._length, \"day\");\r\n\t\t\tcopy._first_chunk = chunk_info.first_chunk;\r\n\t\t\tif (chunk_info.first_chunk) {\r\n\t\t\t\tchunk_info.first_chunk = false;\r\n\t\t\t}\r\n\r\n\t\t\tout.push(copy);\r\n\t\t\tstack[stack_line] = copy;\r\n\t\t\tstart_date = copy.end_date;\r\n\t\t\t//get max height of slot\r\n\t\t\tmax[ev._sweek] = stack.length - 1;\r\n\t\t\ti--;\r\n\t\t\tcontinue; //repeat same step\r\n\t\t}\r\n\t}\r\n\treturn out;\r\n};\r\nscheduler._copy_dummy = function() {\r\n\tvar a = new Date(this.start_date);\r\n\tvar b = new Date(this.end_date);\r\n\tthis.start_date = a;\r\n\tthis.end_date = b;\r\n};\r\nscheduler._copy_event = function(ev) {\r\n\tthis._copy_dummy.prototype = ev;\r\n\treturn new this._copy_dummy();\r\n\t//return {start_date:ev.start_date, end_date:ev.end_date, text:ev.text, id:ev.id}\r\n};\r\nscheduler._rendered = [];\r\nscheduler.clear_view = function() {\r\n\tfor (var i = 0; i < this._rendered.length; i++) {\r\n\t\tvar obj = this._rendered[i];\r\n\t\tif (obj.parentNode) obj.parentNode.removeChild(obj);\r\n\t}\r\n\tthis._rendered = [];\r\n};\r\nscheduler.updateEvent = function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tthis.clear_event(id);\r\n\r\n\tif (ev && this.is_visible_events(ev) && this.filter_event(id, ev) && (this._table_view || this.config.multi_day || ev._timed)) {\r\n\t\tif (this.config.update_render){\r\n\t\t\tthis.render_view_data();\r\n\t\t}else{\r\n\t\t\tif(this.getState().mode == \"month\" && !this.getState().drag_id && !this.isOneDayEvent(ev)){\r\n\t\t\t\tthis.render_view_data();\r\n\t\t\t}else{\r\n\t\t\t\tthis.render_view_data([ev], true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.clear_event = function(id) {\r\n\tthis.for_rendered(id, function(node, i) {\r\n\t\tif (node.parentNode)\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\tscheduler._rendered.splice(i, 1);\r\n\t});\r\n};\r\nscheduler._y_from_date = function(date){\r\n\tvar sm = date.getHours() * 60 + date.getMinutes();\r\n\treturn ((Math.round((sm * 60 * 1000 - this.config.first_hour * 60 * 60 * 1000) * this.config.hour_size_px / (60 * 60 * 1000))) % (this.config.hour_size_px * 24)); //42px/hour\r\n};\r\nscheduler._calc_event_y = function(ev, min_height){\r\n\tmin_height = min_height || 0;\r\n\tvar sm = ev.start_date.getHours() * 60 + ev.start_date.getMinutes();\r\n\tvar em = (ev.end_date.getHours() * 60 + ev.end_date.getMinutes()) || (scheduler.config.last_hour * 60);\r\n\tvar top = this._y_from_date(ev.start_date);\r\n\r\n\tvar height = Math.max(min_height, (em - sm) * this.config.hour_size_px / 60); //42px/hour\r\n\treturn {\r\n\t\ttop: top,\r\n\t\theight: height\r\n\t};\r\n};\r\nscheduler.render_event = function(ev, buffer, parentWidth) {\r\n\tvar menu = scheduler.xy.menu_width;\r\n\tvar menu_offset = (this.config.use_select_menu_space) ? 0 : menu;\r\n\tif (ev._sday < 0) return; //can occur in case of recurring event during time shift\r\n\r\n\tvar parent = scheduler.locate_holder(ev._sday);\r\n\tif (!parent) return; //attempt to render non-visible event\r\n\r\n\tbuffer = buffer || parent;\r\n\r\n\tvar pos_y = this._calc_event_y(ev, scheduler.xy.min_event_height);\r\n\tvar top = pos_y.top,\r\n\t\theight = pos_y.height;\r\n\r\n\tvar ev_count = ev._count || 1;\r\n\tvar ev_sorder = ev._sorder || 0;\r\n\r\n\tparentWidth = parentWidth || parent.clientWidth;\r\n\tif(this.config.day_column_padding){\r\n\t\tparentWidth -= this.config.day_column_padding;\r\n\t}\r\n\r\n\tvar width = Math.floor((parentWidth - menu_offset) / ev_count);\r\n\tvar left = ev_sorder * width + (ev_sorder > 0 ? 2 : 1);\r\n\tif (!ev._inner) width = width * (ev_count - ev_sorder);\r\n\tif (this.config.cascade_event_display) {\r\n\t\tvar limit = this.config.cascade_event_count;\r\n\t\tvar margin = this.config.cascade_event_margin;\r\n\t\tleft = ev_sorder % limit * margin;\r\n\t\tvar right = (ev._inner) ? (ev_count - ev_sorder - 1) % limit * margin / 2 : 0;\r\n\t\twidth = Math.floor(parentWidth - menu_offset - left - right);\r\n\t}\r\n\r\n\tif(height < 30){\r\n\t\tev._mode = \"smallest\";\r\n\t}else if(height < 42){\r\n\t\tev._mode = \"small\";\r\n\t}else{\r\n\t\tev._mode = null;\r\n\t}\r\n\r\n\tvar d = this._render_v_bar(ev, menu_offset + left, top, width, height, ev._text_style, scheduler.templates.event_header(ev.start_date, ev.end_date, ev), scheduler.templates.event_text(ev.start_date, ev.end_date, ev));\r\n\t\r\n\tif(ev._mode === \"smallest\"){\r\n\t\td.classList.add(\"dhx_cal_event--xsmall\");\r\n\t}else if (ev._mode === \"small\"){\r\n\t\td.classList.add(\"dhx_cal_event--small\");\r\n\t}\r\n\r\n\tthis._waiAria.eventAttr(ev, d);\r\n\tthis._rendered.push(d);\r\n\tbuffer.appendChild(d);\r\n\r\n\tvar parentPosition = parseInt( this.config.rtl ? parent.style.right : parent.style.left, 10);\r\n\r\n\tleft = left + parentPosition + menu_offset;\r\n\r\n\tif (this._edit_id == ev.id) {\r\n\r\n\t\td.style.zIndex = 1; //fix overlapping issue\r\n\t\twidth = Math.max(width, scheduler.xy.editor_width);\r\n\t\td = document.createElement(\"div\");\r\n\t\td.setAttribute(\"event_id\", ev.id); // for backward compatibility\r\n\t\td.setAttribute(this.config.event_attribute, ev.id);\r\n\r\n\t\tthis._waiAria.eventAttr(ev, d);\r\n\r\n\t\td.className = \"dhx_cal_event dhx_cal_editor\";\r\n\t\tif (this.config.rtl) left++;\r\n\t\tthis.set_xy(d, width, height, left, top);\r\n\r\n\r\n\t\tif(ev.color){\r\n\t\t\td.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tvar tplClass = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\r\n\t\tif(tplClass){\r\n\t\t\td.className += \" \" + tplClass;\r\n\t\t}\r\n\t\tvar d2 = document.createElement(\"div\");\r\n\t\td2.style.cssText += \"overflow:hidden;height:100%\";\r\n\r\n\t\td.appendChild(d2);\r\n\t\tthis._els[\"dhx_cal_data\"][0].appendChild(d);\r\n\t\tthis._rendered.push(d);\r\n\r\n\t\td2.innerHTML = \"\";\r\n\t\tthis._editor = d2.querySelector(\"textarea\");\r\n\t\t\r\n\t\tscheduler.event(this._editor, \"keydown\", function(e) {\r\n\t\t\tif (e.shiftKey) return true;\r\n\t\t\tvar code = e.keyCode;\r\n\t\t\tif (code == scheduler.keys.edit_save) scheduler.editStop(true);\r\n\t\t\tif (code == scheduler.keys.edit_cancel) scheduler.editStop(false);\r\n\r\n\t\t\tif(code == scheduler.keys.edit_save || code == scheduler.keys.edit_cancel){\r\n\t\t\t\tif(e.preventDefault) e.preventDefault();\r\n\t\t\t}\r\n\t\t});\r\n\t\tscheduler.event(this._editor, \"selectstart\", function (e) {\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn true;\r\n\t\t});\r\n\t\tscheduler._focus(this._editor, true);\r\n\t\t//IE and opera can add x-scroll during focusing\r\n\t\tthis._els[\"dhx_cal_data\"][0].scrollLeft = 0;\r\n\t}\r\n\tif (this.xy.menu_width !== 0 && this._select_id == ev.id) {\r\n\r\n\t\tif (this.config.cascade_event_display && this._drag_mode)\r\n\t\t\td.style.zIndex = 1; //fix overlapping issue for cascade view in case of dnd of selected event\r\n\t\tvar icons = this.config[\"icons_\" + ((this._edit_id == ev.id) ? \"edit\" : \"select\")];\r\n\t\tvar icons_str = \"\";\r\n\r\n\t\tvar ariaAttr;\r\n\r\n\t\tfor (var i = 0; i < icons.length; i++) {\r\n\t\t\tconst currentIcon = icons[i];\r\n\t\t\tariaAttr = this._waiAria.eventMenuAttrString(currentIcon);\r\n\t\t\ticons_str += `
`;\r\n\t\t}\r\n\t\tvar obj = this._render_v_bar(ev, left - menu - 1, top, menu, null, \"\", \"
\", icons_str, true);\r\n\r\n\t\tif(ev.color){\r\n\t\t\tobj.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tobj.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\t//obj.style.left = left - menu + 1;\r\n\t\tthis._els[\"dhx_cal_data\"][0].appendChild(obj);\r\n\t\tthis._rendered.push(obj);\r\n\t}\r\n\tif(this.config.drag_highlight && this._drag_id == ev.id){\r\n\t\tthis.highlightEventPosition(ev);\r\n\t}\r\n};\r\nscheduler._render_v_bar = function (ev, x, y, w, h, style, contentA, contentB, bottom) {\r\n\tvar d = document.createElement(\"div\");\r\n\tvar id = ev.id;\r\n\tvar cs = (bottom) ? \"dhx_cal_event dhx_cal_select_menu\" : \"dhx_cal_event\";\r\n\r\n\tvar state = scheduler.getState();\r\n\tif(state.drag_id == ev.id){\r\n\t\tcs += \" dhx_cal_event_drag\";\r\n\t}\r\n\r\n\tif(state.select_id == ev.id){\r\n\t\tcs += \" dhx_cal_event_selected\";\r\n\t}\r\n\r\n\tvar cse = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\tif (cse) cs = cs + \" \" + cse;\r\n\r\n\tif(this.config.cascade_event_display) {\r\n\t\tcs += \" dhx_cal_event_cascade\";\r\n\t}\r\n\r\n\tvar boxWidth = w;\r\n\r\n\tvar html = '
';\r\n\td.innerHTML = html;\r\n\r\n\tvar container = d.cloneNode(true).firstChild;\r\n\r\n\tif (!bottom && scheduler.renderEvent(container, ev, w, h, contentA, contentB)) {\r\n\t\tif(ev.color){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\treturn container;\r\n\t} else {\r\n\t\tcontainer = d.firstChild;\r\n\t\tif(ev.color){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\tvar inner_html = '
 
';\r\n\t\tinner_html += '
' + contentA + '
';\r\n\t\tinner_html += '
' + contentB + '
'; // +2 css specific, moved from render_event\r\n\r\n\t\tvar footer_class = \"dhx_event_resize dhx_footer\";\r\n\t\tif (bottom || ev._drag_resize === false)\r\n\t\t\tfooter_class = \"dhx_resize_denied \" + footer_class;\r\n\r\n\t\tinner_html += '
';\r\n\r\n\t\tcontainer.innerHTML = inner_html;\r\n\t}\r\n\r\n\treturn container;\r\n};\r\nscheduler.renderEvent = function(){\r\n\treturn false;\r\n};\r\nscheduler.locate_holder = function(day) {\r\n\tif (this._mode == \"day\") return this._els[\"dhx_cal_data\"][0].firstChild; //dirty\r\n\treturn this._els[\"dhx_cal_data\"][0].childNodes[day];\r\n};\r\nscheduler.locate_holder_day = function(date, past) {\r\n\tvar day = Math.floor((this._correct_shift(date, 1) - this._min_date) / (60 * 60 * 24 * 1000));\r\n\t//when locating end data of event , we need to use next day if time part was defined\r\n\tif (past && this.date.time_part(date)) day++;\r\n\treturn day;\r\n};\r\n\r\n\r\n\r\nscheduler._get_dnd_order = function(order, ev_height, max_height){\r\n\tif(!this._drag_event)\r\n\t\treturn order;\r\n\tif(!this._drag_event._orig_sorder)\r\n\t\tthis._drag_event._orig_sorder = order;\r\n\telse\r\n\t\torder = this._drag_event._orig_sorder;\r\n\r\n\tvar evTop = ev_height * order;\r\n\twhile((evTop + ev_height) > max_height){\r\n\t\torder--;\r\n\t\tevTop -= ev_height;\r\n\t}\r\n\torder = Math.max(order, 0);\r\n\treturn order;\r\n};\r\n//scheduler._get_event_bar_pos = function(sday, eday, week, drag){\r\nscheduler._get_event_bar_pos = function(ev){\r\n\tvar rtl = this.config.rtl;\r\n\tvar columns = this._colsS;\r\n\tvar x = columns[ev._sday];\r\n\tvar x2 = columns[ev._eday];\r\n\tif (rtl) {\r\n\t\tx = columns[columns.col_length] - columns[ev._eday] + columns[0];\r\n\t\tx2 = columns[columns.col_length] - columns[ev._sday] + columns[0];\r\n\t}\r\n\r\n\tif (x2 == x) x2 = columns[ev._eday + 1];\r\n\tvar hb = this.xy.bar_height;\r\n\r\n\tvar order = ev._sorder;\r\n\tif(ev.id == this._drag_id){\r\n\t\tvar cellHeight = columns.heights[ev._sweek + 1] - columns.heights[ev._sweek]- this.xy.month_head_height;//22 for month head height\r\n\t\torder = scheduler._get_dnd_order(order, hb, cellHeight);\r\n\t}\r\n\tvar y_event_offset = order * hb;\r\n\tvar y = columns.heights[ev._sweek] + (columns.height ? (this.xy.month_scale_height + 2) : 2 ) + y_event_offset;\r\n\treturn {x:x, x2:x2, y:y};\r\n};\r\n\r\nscheduler.render_event_bar = function (ev) {\r\n\tvar parent = this._rendered_location;\r\n\tvar pos = this._get_event_bar_pos(ev);\r\n\tvar y = pos.y;\r\n\tvar x = pos.x;\r\n\tvar x2 = pos.x2;\r\n\t// resize for month mutliday events\r\n\tvar resize_handle = \"\";\r\n\r\n\t//events in ignored dates\r\n\r\n\tif (!x2) return;\r\n\r\n\tvar resizable = scheduler.config.resize_month_events && this._mode == \"month\" &&\r\n\t\t(!ev._timed || scheduler.config.resize_month_timed);\r\n\r\n\tvar d = document.createElement(\"div\");\r\n\tvar left_chunk = (ev.hasOwnProperty(\"_first_chunk\") && ev._first_chunk),\r\n\t\tright_chunk = (ev.hasOwnProperty(\"_last_chunk\") && ev._last_chunk);\r\n\r\n\tvar resize_left = resizable && (ev._timed || left_chunk);\r\n\tvar resize_right = resizable && (ev._timed || right_chunk);\r\n\r\n\tvar timed = true;\r\n\tvar cs = \"dhx_cal_event_clear\";\r\n\tif (!ev._timed || resizable) {\r\n\t\ttimed = false;\r\n\t\tcs = \"dhx_cal_event_line\";\r\n\t}\r\n\tif(left_chunk){\r\n\t\tcs += \" dhx_cal_event_line_start\";\r\n\t}\r\n\tif(right_chunk){\r\n\t\tcs += \" dhx_cal_event_line_end\";\r\n\t}\r\n\tif(resize_left){\r\n\t\tresize_handle += \"
\";\r\n\t}\r\n\tif(resize_right){\r\n\t\tresize_handle += \"
\";\r\n\t}\r\n\r\n\tvar cse = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\tif (cse){\r\n\t\tcs += \" \" + cse;\r\n\t}\r\n\r\n\tvar bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\tvar color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\tvar style_text = [\r\n\t\t\"position:absolute\",\r\n\t\t\"top:\" + y + \"px\",\r\n\t\t\"left:\" + x + \"px\",\r\n\t\t\"width:\" + (x2 - x - (timed ? 1 : 0)) + \"px\",\r\n\t\t\"height:\" + (this.xy.bar_height - 2) + \"px\",\r\n\t\tcolor,\r\n\t\tbg_color,\r\n\t\t(ev._text_style || \"\")\r\n\t].join(\";\");\r\n\r\n\tvar html = \"
\";\r\n\tif (resizable) {\r\n\t\thtml += resize_handle;\r\n\t}\r\n\tif(scheduler.getState().mode == \"month\"){\r\n\t\tev = scheduler.getEvent(ev.id); // ev at this point could be a part (row in a month view) of a larger event\r\n\t}\r\n\r\n\tif (ev._timed){\r\n\t\thtml += `${scheduler.templates.event_bar_date(ev.start_date, ev.end_date, ev)}`;\r\n\t}\r\n\r\n\thtml += \"
\";\r\n\thtml += scheduler.templates.event_bar_text(ev.start_date, ev.end_date, ev) + '
';\r\n\thtml += \"
\";\r\n\thtml += '
';\r\n\r\n\td.innerHTML = html;\r\n\r\n\tthis._rendered.push(d.firstChild);\r\n\tparent.appendChild(d.firstChild);\r\n};\r\n\r\nscheduler._locate_event = function(node) {\r\n\tvar id = null;\r\n\twhile (node && !id && node.getAttribute) {\r\n\t\tid = node.getAttribute(this.config.event_attribute);\r\n\t\tnode = node.parentNode;\r\n\t}\r\n\treturn id;\r\n};\r\n\r\nscheduler.edit = function(id) {\r\n\tif (this._edit_id == id) return;\r\n\tthis.editStop(false, id);\r\n\tthis._edit_id = id;\r\n\tthis.updateEvent(id);\r\n};\r\nscheduler.editStop = function(mode, id) {\r\n\tif (id && this._edit_id == id) return;\r\n\tvar ev = this.getEvent(this._edit_id);\r\n\tif (ev) {\r\n\t\tif (mode) ev.text = this._editor.value;\r\n\t\tthis._edit_id = null;\r\n\t\tthis._editor = null;\r\n\t\tthis.updateEvent(ev.id);\r\n\t\tthis._edit_stop_event(ev, mode);\r\n\t}\r\n};\r\nscheduler._edit_stop_event = function(ev, mode) {\r\n\tif (this._new_event) {\r\n\t\tif (!mode) {\r\n\t\t\tif (ev) // in case of custom lightbox user can already delete event\r\n\t\t\t\tthis.deleteEvent(ev.id, true);\r\n\t\t} else {\r\n\t\t\tthis.callEvent(\"onEventAdded\", [ev.id, ev]);\r\n\t\t}\r\n\t\tthis._new_event = null;\r\n\t} else {\r\n\t\tif (mode){\r\n\t\t\tthis.callEvent(\"onEventChanged\", [ev.id, ev]);\r\n\t\t}\r\n\t}\r\n};\r\n\r\nscheduler.getEvents = function(from, to) {\r\n\tvar result = [];\r\n\tfor (var a in this._events) {\r\n\t\tvar ev = this._events[a];\r\n\t\tif (ev && ( (!from && !to) || (ev.start_date < to && ev.end_date > from) ))\r\n\t\t\tresult.push(ev);\r\n\t}\r\n\treturn result;\r\n};\r\nscheduler.getRenderedEvent = function(id) {\r\n\tif (!id)\r\n\t\treturn;\r\n\tvar rendered_events = scheduler._rendered;\r\n\tfor (var i=0; i -1){\r\n\t\t\t\t\tsection = section.split(scheduler.config.section_delimiter)[0];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar top = timeline.getSectionTop(section);\r\n\t\t\tvar left = timeline.posFromDate(event.start_date);\r\n\t\t\tvar container = scheduler.$container.querySelector(\".dhx_timeline_data_wrapper\");\r\n\t\t\tleft = left - (container.offsetWidth - timeline.dx) / 2;\r\n\t\t\ttop = top - container.offsetHeight / 2 + timeline.dy/2;\r\n\r\n\t\t\tif (timeline._smartRenderingEnabled()) {\r\n\t\t\t\tvar handlerId = timeline.attachEvent(\"onScroll\", function(){\r\n\t\t\t\t\trestoreOriginalColors();\r\n\t\t\t\t\ttimeline.detachEvent(handlerId);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\ttimeline.scrollTo({\r\n\t\t\t\tleft: left,\r\n\t\t\t\ttop: top\r\n\t\t\t});\r\n\t\t\tif (!timeline._smartRenderingEnabled()) {\r\n\t\t\t\trestoreOriginalColors();\r\n\t\t\t}\r\n\t\t}\r\n\t}else{\r\n\t\trestoreOriginalColors();\r\n\t}\r\n\r\n\tscheduler.callEvent(\"onAfterEventDisplay\", [ev, mode]);\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._append_drag_marker = function(m){\r\n\tif(m.parentNode) return;\r\n\tvar zone = scheduler._els[\"dhx_cal_data\"][0];\r\n\r\n\tvar scale = zone.lastChild;\r\n\tvar className = scheduler._getClassName(scale);\r\n\tif(className.indexOf(\"dhx_scale_holder\") < 0 && scale.previousSibling){\r\n\t\tscale = scale.previousSibling;\r\n\t}\r\n\r\n\tclassName = scheduler._getClassName(scale);\r\n\tif (scale && className.indexOf(\"dhx_scale_holder\") === 0) {\r\n\t\tscale.appendChild(m);\r\n\t}\r\n};\r\n\r\nscheduler._update_marker_position = function(m, event){\r\n\tvar size = scheduler._calc_event_y(event, 0);\r\n\tm.style.top = size.top + \"px\";\r\n\tm.style.height = size.height + \"px\";\r\n};\r\n\r\nscheduler.highlightEventPosition = function(event){\r\n\tvar m = document.createElement(\"div\");\r\n\r\n\tm.setAttribute(\"event_id\", event.id); // for backward compatibility\r\n\tm.setAttribute(this.config.event_attribute, event.id);\r\n\tthis._rendered.push(m);\r\n\tthis._update_marker_position(m, event);\r\n\r\n\tvar css = this.templates.drag_marker_class(event.start_date, event.end_date, event);\r\n\tvar html = this.templates.drag_marker_content(event.start_date, event.end_date, event);\r\n\tm.className = \"dhx_drag_marker\";\r\n\tif(css)\r\n\t\tm.className += \" \" + css;\r\n\tif(html)\r\n\t\tm.innerHTML = html;\r\n\tthis._append_drag_marker(m);\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._parsers.xml = {\r\n\tcanParse: function(data, xhr){\r\n\t\t// IE returns non-empty responseXML type regardless of actual data type\r\n\t\tif(xhr.responseXML && xhr.responseXML.firstChild){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\ttry{\r\n\t\t\tvar xmlDoc = scheduler.ajax.parse(xhr.responseText);\r\n\t\t\tvar topElement = scheduler.ajax.xmltop(\"data\", xmlDoc);\r\n\t\t\tif(topElement && topElement.tagName === \"data\"){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}catch (e){\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\tparse: function(loader) {\r\n\t\tvar xml;\r\n\r\n\t\tif (!loader.xmlDoc.responseXML) { //from a string\r\n\t\t\tloader.xmlDoc.responseXML = scheduler.ajax.parse(loader.xmlDoc.responseText);\r\n\t\t}\r\n\t\r\n\t\txml = scheduler.ajax.xmltop(\"data\", loader.xmlDoc);\r\n\t\tif (xml.tagName != \"data\") return null;//not an xml\r\n\t\tvar csrfToken = xml.getAttribute(\"dhx_security\");\r\n\t\tif (csrfToken) {\r\n\t\t\tif (window.dhtmlx) {\r\n\t\t\t\twindow.dhtmlx.security_key = csrfToken;\r\n\t\t\t}\r\n\t\t\tscheduler.security_key = csrfToken;\r\n\t\t}\r\n\t\r\n\t\tvar opts = scheduler.ajax.xpath(\"//coll_options\", loader.xmlDoc);\r\n\t\tfor (var i = 0; i < opts.length; i++) {\r\n\t\t\tvar bind = opts[i].getAttribute(\"for\");\r\n\t\t\tvar arr = scheduler.serverList[bind];\r\n\t\t\tif (!arr) {\r\n\t\t\t\tscheduler.serverList[bind] = arr = [];\r\n\t\t\t}\r\n\t\t\tarr.splice(0, arr.length);\t//clear old options\r\n\t\t\tvar itms = scheduler.ajax.xpath(\".//item\", opts[i]);\r\n\t\t\tfor (var j = 0; j < itms.length; j++) {\r\n\t\t\t\tvar itm = itms[j];\r\n\t\t\t\tvar attrs = itm.attributes;\r\n\t\t\t\tvar obj = { key: itms[j].getAttribute(\"value\"), label: itms[j].getAttribute(\"label\")};\r\n\t\t\t\tfor (var k = 0; k < attrs.length; k++) {\r\n\t\t\t\t\tvar attr = attrs[k];\r\n\t\t\t\t\tif (attr.nodeName == \"value\" || attr.nodeName == \"label\")\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\tobj[attr.nodeName] = attr.nodeValue;\r\n\t\t\t\t}\r\n\t\t\t\tarr.push(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (opts.length)\r\n\t\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\t\r\n\t\tvar ud = scheduler.ajax.xpath(\"//userdata\", loader.xmlDoc);\r\n\t\tfor (var i = 0; i < ud.length; i++) {\r\n\t\t\tvar udx = scheduler._xmlNodeToJSON(ud[i]);\r\n\t\t\tscheduler._userdata[udx.name] = udx.text;\r\n\t\t}\r\n\t\r\n\t\tvar evs = [];\r\n\t\txml = scheduler.ajax.xpath(\"//event\", loader.xmlDoc);\r\n\t\r\n\t\tfor (var i = 0; i < xml.length; i++) {\r\n\t\t\tvar ev = evs[i] = scheduler._xmlNodeToJSON(xml[i]);\r\n\t\t\tscheduler._init_event(ev);\r\n\t\t}\r\n\t\treturn evs;\r\n\t}\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler.json = scheduler._parsers.json = {\r\n\tcanParse: function(data){\r\n\t\tif(data && typeof data === \"object\"){\r\n\t\t\treturn true;\r\n\t\t} else if(typeof data === \"string\"){\r\n\t\t\ttry {\r\n\t\t\t\tvar result = JSON.parse(data);\r\n\t\t\t\treturn Object.prototype.toString.call(result) === '[object Object]' || \r\n\t\t\t\t\t\tObject.prototype.toString.call(result) === '[object Array]';\r\n\t\t\t} catch (err) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\tparse: function(data) {\r\n\t\tvar events = [];\r\n\r\n\t\tif (typeof data == \"string\") {\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\t\tif (Object.prototype.toString.call(data) === '[object Array]') {\r\n\t\t\tevents = data;\r\n\t\t} else {\r\n\t\t\tif(data){\r\n\t\t\t\tif(data.events){\r\n\t\t\t\t\tevents = data.events;\r\n\t\t\t\t}else if(data.data){\r\n\t\t\t\t\tevents = data.data;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tevents = events || [];\r\n\r\n\t\tif (data.dhx_security) {\r\n\t\t\tif (window.dhtmlx) {\r\n\t\t\t\twindow.dhtmlx.security_key = data.dhx_security;\r\n\t\t\t}\r\n\t\t\tscheduler.security_key = data.dhx_security;\r\n\t\t}\r\n\r\n\t\tvar collections = (data && data.collections) ? data.collections : {};\r\n\t\tvar collections_loaded = false;\r\n\t\tfor (var key in collections) {\r\n\t\t\tif (collections.hasOwnProperty(key)) {\r\n\t\t\t\tcollections_loaded = true;\r\n\t\t\t\tvar collection = collections[key];\r\n\t\t\t\tvar arr = scheduler.serverList[key];\r\n\t\t\t\tif (!arr) {\r\n\t\t\t\t\tscheduler.serverList[key] = arr = [];\r\n\t\t\t\t}\r\n\t\t\t\tarr.splice(0, arr.length); //clear old options\r\n\t\t\t\tfor (var j = 0; j < collection.length; j++) {\r\n\t\t\t\t\tvar option = collection[j];\r\n\t\t\t\t\tvar obj = { key: option.value, label: option.label }; // resulting option object\r\n\t\t\t\t\tfor (var option_key in option) {\r\n\t\t\t\t\t\tif (option.hasOwnProperty(option_key)) {\r\n\t\t\t\t\t\t\tif (option_key == \"value\" || option_key == \"label\")\r\n\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\tobj[option_key] = option[option_key]; // obj['value'] = option['value']\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tarr.push(obj);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (collections_loaded)\r\n\t\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\r\n\t\tvar evs = [];\r\n\t\tfor (var i = 0; i < events.length; i++) {\r\n\t\t\tvar event = events[i];\r\n\t\t\tscheduler._init_event(event);\r\n\t\t\tevs.push(event);\r\n\t\t}\r\n\t\treturn evs;\r\n\t}\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler.ical = scheduler._parsers.ical = {\r\n\tcanParse: function(data){\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\treturn new RegExp(\"^BEGIN:VCALENDAR\").test(data);\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t},\r\n\tparse:function(str){\r\n\t\tvar data = str.match(RegExp(this.c_start+\"[^\\f]*\"+this.c_end,\"\"));\r\n\t\tif (!data.length) return;\r\n\r\n\t\t// mpl: handle bad unfolding\r\n\t\tdata[0]=data[0].replace(/[\\r\\n]+ /g,\"\");\r\n\r\n\t\t//unfolding \r\n\t\tdata[0]=data[0].replace(/[\\r\\n]+(?=[a-z \\t])/g,\" \");\r\n\t\t//drop property\r\n\t\tdata[0]=data[0].replace(/;[^:\\r\\n]*:/g,\":\");\r\n\t\t\r\n\t\t\r\n\t\tvar incoming=[];\r\n\t\tvar match;\r\n\t\tvar event_r = RegExp(\"(?:\"+this.e_start+\")([^\\f]*?)(?:\"+this.e_end+\")\",\"g\");\r\n\t\twhile ((match=event_r.exec(data)) !== null){\r\n\t\t\tvar e={};\r\n\t\t\tvar param;\r\n\t\t\tvar param_r = /[^\\r\\n]+[\\r\\n]+/g;\r\n\t\t\twhile ((param=param_r.exec(match[1])) !== null)\r\n\t\t\t\tthis.parse_param(param.toString(),e);\r\n\t\t\tif (e.uid && !e.id) e.id = e.uid; //fallback to UID, when ID is not defined\r\n\t\t\tincoming.push(e);\t\r\n\t\t}\r\n\t\treturn incoming;\r\n\t},\r\n\tparse_param:function(str,obj){\r\n\t\tvar d = str.indexOf(\":\"); \r\n\t\t\tif (d==-1) return;\r\n\t\t\r\n\t\tvar name = str.substr(0,d).toLowerCase();\r\n\t\tvar value = str.substr(d+1).replace(/\\\\,/g,\",\").replace(/[\\r\\n]+$/,\"\");\r\n\t\tif (name==\"summary\")\r\n\t\t\tname=\"text\";\r\n\t\telse if (name==\"dtstart\"){\r\n\t\t\tname = \"start_date\";\r\n\t\t\tvalue = this.parse_date(value,0,0);\r\n\t\t}\r\n\t\telse if (name==\"dtend\"){\r\n\t\t\tname = \"end_date\";\r\n\t\t\tvalue = this.parse_date(value,0,0);\r\n\t\t}\r\n\t\tobj[name]=value;\r\n\t},\r\n\tparse_date:function(value,dh,dm){\r\n\t\tvar t = value.split(\"T\");\r\n\r\n\t\tvar utcMark = false;\r\n\t\tif (t[1]){\r\n\t\t\tdh=t[1].substr(0,2);\r\n\t\t\tdm=t[1].substr(2,2);\r\n\t\t\tutcMark = !!(t[1][6] == \"Z\");\r\n\t\t}\r\n\t\tvar dy = t[0].substr(0,4);\r\n\t\tvar dn = parseInt(t[0].substr(4,2),10)-1;\r\n\t\tvar dd = t[0].substr(6,2);\r\n\r\n\t\tif(scheduler.config.server_utc || utcMark){\r\n\t\t\treturn new Date(Date.UTC(dy,dn,dd,dh,dm)) ;\r\n\t\t}else{\r\n\t\t\treturn new Date(dy,dn,dd,dh,dm);\r\n\t\t}\r\n\t},\r\n\tc_start:\"BEGIN:VCALENDAR\",\r\n\te_start:\"BEGIN:VEVENT\",\r\n\te_end:\"END:VEVENT\",\r\n\tc_end:\"END:VCALENDAR\"\t\r\n};\r\n\r\n}","export default function(scheduler){\r\n\treturn (function(){\r\n\t\tvar res = {};\r\n\t\tfor (var a in this._events){\r\n\t\t\tvar ev = this._events[a];\r\n\t\t\tif (ev.id.toString().indexOf(\"#\") == -1){\r\n\t\t\t\tres[ev.id] = ev;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn res;\r\n\t}).bind(scheduler);\r\n}","import xmlLoaded from \"./loaders/xml\";\r\nimport jsonLoader from \"./loaders/json\";\r\nimport iCalLoader from \"./loaders/ical\";\r\nimport createSerializator from \"../core/common/get_serializable_events\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler._loaded = {};\r\nscheduler._load = function(url, from) {\r\n\turl = url || this._load_url;\r\n\r\n\tif(!url){\r\n\t\t//if scheduler.setLoadMode is called before scheduler.init, initial rendering will invoke data loading while url is undefined\r\n\t\treturn;\r\n\t}\r\n\r\n\turl += (url.indexOf(\"?\") == -1 ? \"?\" : \"&\") + \"timeshift=\" + (new Date()).getTimezoneOffset();\r\n\tif (this.config.prevent_cache) url += \"&uid=\" + this.uid();\r\n\tvar to;\r\n\tfrom = from || this._date;\r\n\tfunction ajaxCallback(response) {\r\n\t\tscheduler.on_load(response);\r\n\t\tscheduler.callEvent(\"onLoadEnd\", []);\r\n\t}\r\n\tif (this._load_mode) {\r\n\t\tvar lf = this.templates.load_format;\r\n\r\n\t\tfrom = this.date[this._load_mode + \"_start\"](new Date(from.valueOf()));\r\n\t\twhile (from > this._min_date) from = this.date.add(from, -1, this._load_mode);\r\n\t\tto = from;\r\n\r\n\t\tvar cache_line = true;\r\n\t\twhile (to < this._max_date) {\r\n\t\t\tto = this.date.add(to, 1, this._load_mode);\r\n\t\t\tif (this._loaded[lf(from)] && cache_line)\r\n\t\t\t\tfrom = this.date.add(from, 1, this._load_mode); else cache_line = false;\r\n\t\t}\r\n\r\n\t\tvar temp_to = to;\r\n\t\tdo {\r\n\t\t\tto = temp_to;\r\n\t\t\ttemp_to = this.date.add(to, -1, this._load_mode);\r\n\t\t} while (temp_to > from && this._loaded[lf(temp_to)]);\r\n\r\n\t\tif (to <= from)\r\n\t\t\treturn false; //already loaded\r\n\r\n\t\tscheduler.ajax.get(url + \"&from=\" + lf(from) + \"&to=\" + lf(to), ajaxCallback);\r\n\r\n\t\twhile (from < to) {\r\n\t\t\tthis._loaded[lf(from)] = true;\r\n\t\t\tfrom = this.date.add(from, 1, this._load_mode);\r\n\t\t}\r\n\t} else {\r\n\t\tscheduler.ajax.get(url, ajaxCallback);\r\n\t}\r\n\r\n\t// TODO: remove onXLS\r\n\tthis.callEvent(\"onXLS\", []);\r\n\tthis.callEvent(\"onLoadStart\", []);\r\n\treturn true;\r\n};\r\n\r\nscheduler._parsers = {};\r\n\r\n\r\nxmlLoaded(scheduler);\r\njsonLoader(scheduler);\r\niCalLoader(scheduler);\r\n\r\nscheduler.on_load = function (loader) {\r\n\tthis.callEvent(\"onBeforeParse\", []);\r\n\r\n\tvar evs;\r\n\tvar error = false;\r\n\r\n\tvar foundParser = false;\r\n\tfor(var i in this._parsers){\r\n\t\tvar parser = this._parsers[i];\r\n\t\tif(parser.canParse(loader.xmlDoc.responseText, loader.xmlDoc)){\r\n\t\t\ttry{\r\n\t\t\t\tvar param = loader.xmlDoc.responseText;\r\n\t\t\t\tif(i === \"xml\"){\r\n\t\t\t\t\tparam = loader;\r\n\t\t\t\t}\r\n\t\t\t\tevs = parser.parse(param);\r\n\t\t\t\tif(!evs){\r\n\t\t\t\t\terror = true;\r\n\t\t\t\t}\r\n\t\t\t}catch(e){\r\n\t\t\t\terror = true;\r\n\t\t\t}\r\n\t\t\tfoundParser = true;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tif(!foundParser){\r\n\t\tif(this._process && this[this._process]){\r\n\t\t\ttry{\r\n\t\t\t\tevs = this[this._process].parse(loader.xmlDoc.responseText);\r\n\t\t\t}catch (e){\r\n\t\t\t\terror = true;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\terror = true;\r\n\t\t}\r\n\t}\r\n\r\n\tif(error || (loader.xmlDoc.status && loader.xmlDoc.status >= 400)){\r\n\t\tthis.callEvent(\"onLoadError\", [loader.xmlDoc]);\r\n\t\tevs = [];\r\n\t}\r\n\r\n\tthis._process_loading(evs);\r\n\r\n\t// TODO: remove onXLE\r\n\tthis.callEvent(\"onXLE\", []);\r\n\tthis.callEvent(\"onParse\", []);\r\n};\r\nscheduler._process_loading = function(evs) {\r\n\tthis._loading = true;\r\n\tthis._not_render = true;\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tif (!this.callEvent(\"onEventLoading\", [evs[i]])) continue;\r\n\t\tthis.addEvent(evs[i]);\r\n\t}\r\n\tthis._not_render = false;\r\n\tif (this._render_wait) this.render_view_data();\r\n\r\n\tthis._loading = false;\r\n\tif (this._after_call) this._after_call();\r\n\tthis._after_call = null;\r\n};\r\nscheduler._init_event = function(event) {\r\n\tevent.text = (event.text || event._tagvalue) || \"\";\r\n\tevent.start_date = scheduler._init_date(event.start_date);\r\n\tevent.end_date = scheduler._init_date(event.end_date);\r\n};\r\n\r\nscheduler._init_date = function(date){\r\n\tif(!date)\r\n\t\treturn null;\r\n\tif (typeof date == \"string\") {\r\n\t\treturn scheduler._helpers.parseDate(date);\r\n\t}\r\n\telse return new Date(date);\r\n};\r\n\r\nconst getSerializableData = createSerializator(scheduler);\r\nscheduler.serialize = function(){\r\n\tconst dataset = [];\r\n\tconst allEvents = getSerializableData();\r\n\tfor (var a in allEvents){\r\n\t\t\r\n\t\tconst exportedEvent = {};\r\n\t\tvar ev = allEvents[a];\r\n\r\n\t\tfor(var key in ev){\r\n\t\t\tif (key.charAt(0) == \"$\" || key.charAt(0) == \"_\"){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tlet exportValue;\r\n\t\t\tconst rawValue = ev[key];\r\n\t\t\tif(scheduler.utils.isDate(rawValue)){\r\n\t\t\t\texportValue = scheduler.defined(scheduler.templates.xml_format) ? scheduler.templates.xml_format(rawValue) : scheduler.templates.format_date(rawValue);\r\n\t\t\t}else{\r\n\t\t\t\texportValue = rawValue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\texportedEvent[key] = exportValue;\r\n\t\t}\r\n\r\n\t\tdataset.push(exportedEvent);\r\n\t}\r\n\treturn dataset;\r\n};\r\n\r\n/*\r\nscheduler.json = {};\r\nscheduler.json.parse = function(data) {\r\n\r\n\tvar events = [];\r\n\r\n\tif (typeof data == \"string\") {\r\n\t\tdata = JSON.parse(data);\r\n\t}\r\n\tif (Object.prototype.toString.call(data) === '[object Array]') {\r\n\t\tevents = data;\r\n\t} else {\r\n\t\tif(data){\r\n\t\t\tif(data.events){\r\n\t\t\t\tevents = data.events;\r\n\t\t\t}else if(data.data){\r\n\t\t\t\tevents = data.data;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tevents = events || [];\r\n\r\n\tif (data.dhx_security) {\r\n\t\tif (window.dhtmlx) {\r\n\t\t\twindow.dhtmlx.security_key = data.dhx_security;\r\n\t\t}\r\n\t\tscheduler.security_key = data.dhx_security;\r\n\t}\r\n\r\n\tvar collections = (data && data.collections) ? data.collections : {};\r\n\tvar collections_loaded = false;\r\n\tfor (var key in collections) {\r\n\t\tif (collections.hasOwnProperty(key)) {\r\n\t\t\tcollections_loaded = true;\r\n\t\t\tvar collection = collections[key];\r\n\t\t\tvar arr = scheduler.serverList[key];\r\n\t\t\tif (!arr) {\r\n\t\t\t\tscheduler.serverList[key] = arr = [];\r\n\t\t\t}\r\n\t\t\tarr.splice(0, arr.length); //clear old options\r\n\t\t\tfor (var j = 0; j < collection.length; j++) {\r\n\t\t\t\tvar option = collection[j];\r\n\t\t\t\tvar obj = { key: option.value, label: option.label }; // resulting option object\r\n\t\t\t\tfor (var option_key in option) {\r\n\t\t\t\t\tif (option.hasOwnProperty(option_key)) {\r\n\t\t\t\t\t\tif (option_key == \"value\" || option_key == \"label\")\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\tobj[option_key] = option[option_key]; // obj['value'] = option['value']\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tarr.push(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (collections_loaded)\r\n\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\r\n\tvar evs = [];\r\n\tfor (var i = 0; i < events.length; i++) {\r\n\t\tvar event = events[i];\r\n\t\tscheduler._init_event(event);\r\n\t\tevs.push(event);\r\n\t}\r\n\treturn evs;\r\n};*/\r\nscheduler.parse = function(data, type) {\r\n\tthis._process = type;\r\n\tthis.on_load({xmlDoc: {responseText: data}});\r\n};\r\nscheduler.load = function(url, call) {\r\n\tif (typeof call == \"string\") {\r\n\t\tthis._process = call;\r\n\t\tcall = arguments[2];\r\n\t}\r\n\r\n\tthis._load_url = url;\r\n\tthis._after_call = call;\r\n\tthis._load(url, this._date);\r\n};\r\n//possible values - day,week,month,year,all\r\nscheduler.setLoadMode = function(mode) {\r\n\tif (mode == \"all\") mode = \"\";\r\n\tthis._load_mode = mode;\r\n};\r\n\r\nscheduler.serverList = function(name, array) {\r\n\tif (array) {\r\n\t\tthis.serverList[name] = array.slice(0);\r\n\t\treturn this.serverList[name];\r\n\t}\r\n\tthis.serverList[name] = (this.serverList[name] || []);\r\n\treturn this.serverList[name];\r\n};\r\nscheduler._userdata = {};\r\n\r\nscheduler._xmlNodeToJSON = function(node) {\r\n\tvar t = {};\r\n\tfor (var i = 0; i < node.attributes.length; i++)\r\n\t\tt[node.attributes[i].name] = node.attributes[i].value;\r\n\r\n\tfor (var i = 0; i < node.childNodes.length; i++) {\r\n\t\tvar child = node.childNodes[i];\r\n\t\tif (child.nodeType == 1)\r\n\t\t\tt[child.tagName] = child.firstChild ? child.firstChild.nodeValue : \"\";\r\n\t}\r\n\r\n\tif (!t.text) t.text = node.firstChild ? node.firstChild.nodeValue : \"\";\r\n\r\n\treturn t;\r\n};\r\nscheduler.attachEvent(\"onXLS\", function() {\r\n\tif (this.config.show_loading === true) {\r\n\t\tvar t;\r\n\t\tt = this.config.show_loading = document.createElement(\"div\");\r\n\t\tt.className = 'dhx_loading';\r\n\t\tt.style.left = Math.round((this._x - 128) / 2) + \"px\";\r\n\t\tt.style.top = Math.round((this._y - 15) / 2) + \"px\";\r\n\t\tthis._obj.appendChild(t);\r\n\t}\r\n});\r\nscheduler.attachEvent(\"onXLE\", function() {\r\n\tvar t = this.config.show_loading;\r\n\tif (t && typeof t == \"object\") {\r\n\t\tif(t.parentNode) {\r\n\t\t\tt.parentNode.removeChild(t);\r\n\t\t}\r\n\t\tthis.config.show_loading = true;\r\n\t}\r\n});\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler._lightbox_controls = {};\r\nscheduler.formSection = function(name){\r\n\tvar config = this.config.lightbox.sections;\r\n\tvar i = 0;\r\n\tfor (i; i < config.length; i++) {\r\n\t\tif (config[i].name == name) {\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tif (i === config.length) {\r\n\t\t// GS-1662 section not found, should exit here instead of throwing an error\r\n\t\treturn null;\r\n\t}\r\n\r\n\tvar section = config[i];\r\n\tif (!scheduler._lightbox) {\r\n\t\tscheduler.getLightbox();\r\n\t}\r\n\tvar header = scheduler._lightbox.querySelector(`#${section.id}`);\r\n\tvar node = header.nextSibling;\r\n\r\n\tvar result = {\r\n\t\tsection: section,\r\n\t\theader: header,\r\n\t\tnode: node,\r\n\t\tgetValue:function(ev){\r\n\t\t\treturn scheduler.form_blocks[section.type].get_value(node, (ev||{}), section);\r\n\t\t},\r\n\t\tsetValue:function(value, ev){\r\n\t\t\treturn scheduler.form_blocks[section.type].set_value(node, value, (ev||{}), section);\r\n\t\t}\r\n\t};\r\n\r\n\tvar handler = scheduler._lightbox_controls[\"get_\"+section.type+\"_control\"];\r\n\treturn handler?handler(result):result;\r\n};\r\nscheduler._lightbox_controls.get_template_control = function(result) {\r\n\tresult.control = result.node;\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_select_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('select')[0];\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_textarea_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('textarea')[0];\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_time_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('select'); // array\r\n\treturn result;\r\n};\r\n\r\nscheduler._lightbox_controls.defaults = {\r\n\ttemplate: {\r\n\t\theight:30\r\n\t},\r\n\ttextarea: {\r\n\t\theight: 200\r\n\t},\r\n\tselect: {\r\n\t\theight: 23\r\n\t},\r\n\ttime: {\r\n\t\theight: 20\r\n\t}\r\n};\r\n\r\n\r\nscheduler.form_blocks={\r\n\ttemplate:{\r\n\t\trender: function(sns){\r\n\t\t\treturn \"
\";\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,config){\r\n\t\t\tnode.innerHTML = value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev,config){\r\n\t\t\treturn node.innerHTML||\"\";\r\n\t\t},\r\n\t\tfocus: function(node){\r\n\t\t}\r\n\t},\r\n\ttextarea:{\r\n\t\trender:function(sns){\r\n\t\t\tconst placeholder = sns.placeholder ? `placeholder='${sns.placeholder}'` : \"\";\r\n\t\t\treturn `
`;\r\n\t\t},\r\n\t\tset_value:function(node,value,ev){\r\n\t\t\tscheduler.form_blocks.textarea._get_input(node).value=value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev){\r\n\t\t\treturn scheduler.form_blocks.textarea._get_input(node).value;\r\n\t\t},\r\n\t\tfocus:function(node){\r\n\t\t\tvar a = scheduler.form_blocks.textarea._get_input(node);\r\n\t\t\tscheduler._focus(a, true);\r\n\t\t},\r\n\t\t_get_input: function(node){\r\n\t\t\treturn node.getElementsByTagName(\"textarea\")[0];\r\n\t\t}\r\n\t},\r\n\tselect:{\r\n\t\trender:function(sns){\r\n\t\t\t//var defaults = scheduler._lightbox_controls.defaults.select;\r\n\t\t\tvar html=\"
\";\r\n\t\t\treturn html;\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,sns){\r\n\t\t\tvar select = node.firstChild;\r\n\t\t\tif (!select._dhx_onchange && sns.onchange) {\r\n\t\t\t\tscheduler.event(select, \"change\", sns.onchange);\r\n\t\t\t\tselect._dhx_onchange = true;\r\n\t\t\t}\r\n\t\t\tif (typeof value == \"undefined\")\r\n\t\t\t\tvalue = (select.options[0]||{}).value;\r\n\t\t\tselect.value=value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev){\r\n\t\t\treturn node.firstChild.value;\r\n\t\t},\r\n\t\tfocus:function(node){\r\n\t\t\tvar a=node.firstChild; scheduler._focus(a, true);\r\n\t\t}\r\n\t},\r\n\ttime:{\r\n\t\trender:function(sns) {\r\n\t\t\tif (!sns.time_format) {\r\n\t\t\t\t// default order\r\n\t\t\t\tsns.time_format = [\"%H:%i\", \"%d\", \"%m\", \"%Y\"];\r\n\t\t\t}\r\n\t\t\t// map: default order => real one\r\n\t\t\tsns._time_format_order = {};\r\n\t\t\tvar time_format = sns.time_format;\r\n\r\n\t\t\tvar cfg = scheduler.config;\r\n\t\t\tvar dt = scheduler.date.date_part(scheduler._currentDate());\r\n\t\t\tvar last = 24*60, first = 0;\r\n\t\t\tif(scheduler.config.limit_time_select){\r\n\t\t\t\tlast = 60*cfg.last_hour+1;\r\n\t\t\t\tfirst = 60*cfg.first_hour;\r\n\t\t\t\tdt.setHours(cfg.first_hour);\r\n\t\t\t}\r\n\t\t\tvar html = \"\";\r\n\r\n\t\t\tfor (var p = 0; p < time_format.length; p++) {\r\n\t\t\t\tvar time_option = time_format[p];\r\n\r\n\t\t\t\t// adding spaces between selects\r\n\t\t\t\tif (p > 0) {\r\n\t\t\t\t\thtml += \" \";\r\n\t\t\t\t}\r\n\t\t\t\tvar selectBoxClass = \"\";\r\n\t\t\t\tvar options = \"\";\r\n\t\t\t\tswitch (time_option) {\r\n\t\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_year_select\";\r\n\t\t\t\t\t\tsns._time_format_order[3] = p;\r\n\t\t\t\t\t\t//year\r\n\t\t\t\t\t\tvar range;\r\n\t\t\t\t\t\tvar start_year;\r\n\t\t\t\t\t\tvar end_year;\r\n\t\t\t\t\t\tif(sns.year_range){\r\n\t\t\t\t\t\t\tif (!isNaN(sns.year_range)) {\r\n\t\t\t\t\t\t\t\trange = sns.year_range;\r\n\t\t\t\t\t\t\t} else if (sns.year_range.push) {\r\n\t\t\t\t\t\t\t\t// if\r\n\t\t\t\t\t\t\t\tstart_year = sns.year_range[0];\r\n\t\t\t\t\t\t\t\tend_year = sns.year_range[1];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\trange = range || 10;\r\n\t\t\t\t\t\tvar offset = offset || Math.floor(range / 2);\r\n\t\t\t\t\t\tstart_year = start_year || dt.getFullYear() - offset;\r\n\t\t\t\t\t\tend_year = end_year || start_year + range;\r\n\r\n\t\t\t\t\t\tfor (var i = start_year; i < end_year; i++)\r\n\t\t\t\t\t\t\toptions += \"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%m\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_month_select\";\r\n\t\t\t\t\t\tsns._time_format_order[2] = p;\r\n\t\t\t\t\t\t//month\r\n\t\t\t\t\t\tfor (var i=0; i < 12; i++)\r\n\t\t\t\t\t\t\toptions+=\"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%d\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_day_select\";\r\n\t\t\t\t\t\tsns._time_format_order[1] = p;\r\n\t\t\t\t\t\t//days\r\n\t\t\t\t\t\tfor (var i=1; i < 32; i++)\r\n\t\t\t\t\t\t\toptions+=\"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%H:%i\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_time_select\";\r\n\t\t\t\t\t\tsns._time_format_order[0] = p;\r\n\t\t\t\t\t\t//hours\r\n\t\t\t\t\t\tvar i = first;\r\n\t\t\t\t\t\tvar tdate = dt.getDate();\r\n\t\t\t\t\t\tsns._time_values = [];\r\n\r\n\t\t\t\t\t\twhile(i\"+time+\"\";\r\n\t\t\t\t\t\t\tsns._time_values.push(i);\r\n\t\t\t\t\t\t\tdt.setTime(dt.valueOf()+this.config.time_step*60*1000);\r\n\t\t\t\t\t\t\tvar diff = (dt.getDate()!=tdate)?1:0; // moved or not to the next day\r\n\t\t\t\t\t\t\ti=diff*24*60+dt.getHours()*60+dt.getMinutes();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(options){\r\n\r\n\t\t\t\t\tvar ariaAttrs = scheduler._waiAria.lightboxSelectAttrString(time_option);\r\n\t\t\t\t\tvar readonly = sns.readonly ? \"disabled='disabled'\" : \"\";\r\n\t\t\t\t\thtml += \" \";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//var defaults = scheduler._lightbox_controls.defaults.select;\r\n\r\n\t\t\treturn \"
\"+html+\"  –  \"+html+\"
\";\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,config){\r\n\t\t\tvar cfg = scheduler.config;\r\n\t\t\tvar s=node.getElementsByTagName(\"select\");\r\n\t\t\tvar map = config._time_format_order;\r\n\t\t\tvar start_date, end_date;\r\n\r\n\t\t\tif(cfg.full_day) {\r\n\t\t\t\tif (!node._full_day){\r\n\t\t\t\t\tvar html = \"\";\r\n\t\t\t\t\tif (!scheduler.config.wide_form)\r\n\t\t\t\t\t\thtml = node.previousSibling.innerHTML+html;\r\n\t\t\t\t\tnode.previousSibling.innerHTML=html;\r\n\t\t\t\t\tnode._full_day=true;\r\n\t\t\t\t}\r\n\t\t\t\tvar input=node.previousSibling.getElementsByTagName(\"input\")[0];\r\n\t\t\t\tinput.checked = (scheduler.date.time_part(ev.start_date)===0 && scheduler.date.time_part(ev.end_date)===0);\r\n\r\n\t\t\t\ts[map[0]].disabled=input.checked;\r\n\t\t\t\ts[ map[0] + s.length/2 ].disabled=input.checked;\r\n\r\n\t\t\t\tif(!input.$_eventAttached){\r\n\t\t\t\t\tinput.$_eventAttached = true;\r\n\r\n\t\t\t\t\t\tscheduler.event(input, \"click\", function(){\r\n\t\t\t\t\t\tif(input.checked) {\r\n\t\t\t\t\t\t\tvar obj = {};\r\n\t\t\t\t\t\t\tscheduler.form_blocks.time.get_value(node,obj,config);\r\n\r\n\t\t\t\t\t\t\tstart_date = scheduler.date.date_part(obj.start_date);\r\n\t\t\t\t\t\t\tend_date = scheduler.date.date_part(obj.end_date);\r\n\r\n\t\t\t\t\t\t\tif (+end_date == +start_date || (+end_date >= +start_date && (ev.end_date.getHours() !== 0 || ev.end_date.getMinutes() !== 0)))\r\n\t\t\t\t\t\t\t\tend_date = scheduler.date.add(end_date, 1, \"day\");\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tstart_date = null;\r\n\t\t\t\t\t\t\tend_date = null;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\ts[map[0]].disabled=input.checked;\r\n\t\t\t\t\t\ts[ map[0] + s.length/2 ].disabled=input.checked;\r\n\r\n\t\t\t\t\t\t_fill_lightbox_select(s,0,start_date||ev.start_date);\r\n\t\t\t\t\t\t_fill_lightbox_select(s,4,end_date||ev.end_date);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(cfg.auto_end_date && cfg.event_duration) {\r\n\t\t\t\tvar _update_lightbox_select = function () {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (!(cfg.auto_end_date && cfg.event_duration)){\r\n\t\t\t\t\t\t// setting may be disabled after the handler is attached\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstart_date = new Date(s[map[3]].value,s[map[2]].value,s[map[1]].value,0,s[map[0]].value);\r\n\t\t\t\t\tend_date = new Date(start_date.getTime() + (scheduler.config.event_duration * 60 * 1000));\r\n\t\t\t\t\t_fill_lightbox_select(s, 4, end_date);\r\n\t\t\t\t};\r\n\t\t\t\tfor(var i=0; i<4; i++) {\r\n\t\t\t\t\tif(!s[i].$_eventAttached) {\r\n\t\t\t\t\t\ts[i].$_eventAttached = true;\r\n\t\t\t\t\t\tscheduler.event(s[i], \"change\", _update_lightbox_select);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfunction _fill_lightbox_select(s,i,d) {\r\n\t\t\t\tvar time_values = config._time_values;\r\n\t\t\t\tvar direct_value = d.getHours()*60+d.getMinutes();\r\n\t\t\t\tvar fixed_value = direct_value;\r\n\t\t\t\tvar value_found = false;\r\n\t\t\t\tfor (var k=0; k\";\r\n\t\tvar ariaAttr = \"\";\r\n\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\tariaAttr = this._waiAria.lightboxButtonAttrString(buttons[i]);\r\n\t\t\thtml += \"
\" + scheduler.locale.labels[buttons[i]] + \"
\";\r\n\t\t}\r\n\r\n\t\tbuttons = this.config.buttons_right;\r\n\t\tvar rtl = scheduler.config.rtl;\r\n\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\tariaAttr = this._waiAria.lightboxButtonAttrString(buttons[i]);\r\n\r\n\t\t\thtml += \"
\";\r\n\r\n\t\t\thtml += \"
\" + scheduler.locale.labels[buttons[i]] + \"
\";\r\n\t\t}\r\n\t\thtml += \"\";\r\n\t\thtml+=\"\";\r\n\t\td.innerHTML=html;\r\n\t\tif (scheduler.config.drag_lightbox){\r\n\t\t\tscheduler.event(d.firstChild, \"mousedown\", scheduler._ready_to_dnd);\r\n\t\t\tscheduler.event(d.firstChild, \"selectstart\", function(e){ \r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn false; \r\n\t\t\t});\r\n\t\t\td.firstChild.style.cursor = \"move\";\r\n\t\t\tscheduler._init_dnd_events();\r\n\r\n\t\t}\r\n\r\n\t\tthis._waiAria.lightboxAttr(d);\r\n\r\n\t\tthis.show_cover();\r\n\t\tthis._cover.insertBefore(d,this._cover.firstChild);\r\n\t\t\r\n\t\tthis._lightbox=d;\r\n\r\n\t\tvar sns=this.config.lightbox.sections;\r\n\t\thtml=\"\";\r\n\t\tfor (var i=0; i < sns.length; i++) {\r\n\t\t\tvar block=this.form_blocks[sns[i].type];\r\n\t\t\tif (!block) continue; //ignore incorrect blocks\r\n\t\t\tsns[i].id=\"area_\"+this.uid();\r\n\t\t\tvar button = \"\";\r\n\t\t\tif (sns[i].button){\r\n\t\t\t\tvar ariaAttr = scheduler._waiAria.lightboxSectionButtonAttrString(this.locale.labels[\"button_\"+sns[i].button]);\r\n\t\t\t\tbutton = \"
\"+this.locale.labels[\"button_\"+sns[i].button]+\"
\";\r\n\t\t\t}\r\n\r\n\t\t\tif (this.config.wide_form){\r\n\t\t\t\thtml+=\"
\";\r\n\t\t\t}\r\n\r\n\t\t\tvar label_name = this.locale.labels[\"section_\"+sns[i].name];\r\n\t\t\tif(typeof label_name !== \"string\"){\r\n\t\t\t\tlabel_name = sns[i].name;\r\n\t\t\t}\r\n\t\t\thtml+=\"
\"+button+ \"
\"+block.render.call(this,sns[i]);\r\n\t\t\thtml+=\"
\";\r\n\t\t}\r\n\r\n\t\tvar ds=d.getElementsByTagName(\"div\");\r\n\t\tfor (var i=0; i
 \r\n
\r\n
\r\n\r\n
`;\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._init_touch_events = function(){\r\n\tvar mobile = this.config.touch &&\r\n\t\t( ((navigator.userAgent.indexOf(\"Mobile\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"iPad\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"Android\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"Touch\")!=-1)) && !window.MSStream) ||\r\n\t\t\t((navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1));\r\n\r\n\tif(mobile){\r\n\t\tthis.xy.scroll_width = 0;\r\n\t\tthis._mobile = true;\r\n\t}\r\n\r\n\tif(this.config.touch){\r\n\r\n\t\tvar touchEventsSupported = true;\r\n\t\ttry {\r\n\t\t\tdocument.createEvent(\"TouchEvent\");\r\n\t\t} catch (e) {\r\n\t\t\ttouchEventsSupported = false;\r\n\t\t}\r\n\r\n\t\tif (touchEventsSupported) {\r\n\t\t\tthis._touch_events([\"touchmove\", \"touchstart\", \"touchend\"], function (ev) {\r\n\t\t\t\tif (ev.touches && ev.touches.length > 1) return null;\r\n\t\t\t\tif (ev.touches[0])\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\ttarget: ev.target,\r\n\t\t\t\t\t\tpageX: ev.touches[0].pageX,\r\n\t\t\t\t\t\tpageY: ev.touches[0].pageY,\r\n\t\t\t\t\t\tclientX: ev.touches[0].clientX,\r\n\t\t\t\t\t\tclientY: ev.touches[0].clientY\r\n\t\t\t\t\t};\r\n\t\t\t\telse\r\n\t\t\t\t\treturn ev;\r\n\t\t\t}, function () {\r\n\t\t\t\treturn false;\r\n\t\t\t});\r\n\t\t} else if (window.PointerEvent || window.navigator.pointerEnabled) {\r\n\t\t\tthis._touch_events([\"pointermove\", \"pointerdown\", \"pointerup\"], function (ev) {\r\n\t\t\t\tif (ev.pointerType == \"mouse\") return null;\r\n\t\t\t\treturn ev;\r\n\t\t\t}, function (ev) {\r\n\t\t\t\treturn (!ev || (ev.pointerType == \"mouse\" ));\r\n\t\t\t});\r\n\t\t} else if (window.navigator.msPointerEnabled) {\r\n\t\t\tthis._touch_events([\"MSPointerMove\", \"MSPointerDown\", \"MSPointerUp\"], function (ev) {\r\n\t\t\t\tif (ev.pointerType == ev.MSPOINTER_TYPE_MOUSE) return null;\r\n\t\t\t\treturn ev;\r\n\t\t\t}, function (ev) {\r\n\t\t\t\treturn (!ev || ev.pointerType == ev.MSPOINTER_TYPE_MOUSE);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n};\r\n\r\nscheduler._touch_events = function(names, accessor, ignore){\r\n\t//webkit on android need to be handled separately\r\n\t//var a_webkit = (navigator.userAgent.indexOf(\"Android\")!=-1) && (navigator.userAgent.indexOf(\"WebKit\")!=-1);\r\n\tvar source, tracker, timer, drag_mode, scroll_mode, action_mode;\r\n\tvar dblclicktime = 0;\r\n\r\n\tfunction attachTouchEvent(element, name, callback){\r\n\t\t//touch gestures must be disabled when ligthbox is opened\r\n\t\tscheduler.event(element, name, function(e){\r\n\t\t\tif(scheduler._is_lightbox_open()){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tif (ignore(e)) return;\r\n\t\t\t\treturn callback(e);\r\n\t\t\t}\r\n\t\t}, { passive: false });\r\n\t}\r\n\r\n\tfunction check_direction_swipe(s_ev, e_ev, step, max_dy){\r\n\t\tif (!s_ev || !e_ev) return false;\r\n\r\n\t\tvar t = s_ev.target;\r\n\t\twhile(t && t != scheduler._obj){\r\n\t\t\tt = t.parentNode;\r\n\t\t}\r\n\t\tif(t != scheduler._obj){\r\n\t\t\t//swipe outside scheduler\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// ignore swipe in horizontal timeline\r\n\t\tif(scheduler.matrix && scheduler.matrix[scheduler.getState().mode]){\r\n\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\tif(timeline.scrollable){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar dy = Math.abs(s_ev.pageY - e_ev.pageY);\r\n\t\tvar dx = Math.abs(s_ev.pageX - e_ev.pageX);\r\n\t\tif (dy < max_dy && dx>step && (!dy || (dx/dy > 3))){\r\n\t\t\tif (s_ev.pageX > e_ev.pageX) {\r\n\t\t\t\tscheduler._click.dhx_cal_next_button();\r\n\t\t\t}else {\r\n\t\t\t\tscheduler._click.dhx_cal_prev_button();\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n\tfunction doMouseMove(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tvar dnd = scheduler.getState().drag_mode,\r\n\t\t\ttimeline = scheduler.matrix ? scheduler.matrix[scheduler._mode] : false;\r\n\r\n\t\tvar original_render = scheduler.render_view_data;\r\n\t\tif(dnd == 'create' && timeline){\r\n\t\t\t//suppress full redraw of timeline on creating event\r\n\t\t\tscheduler.render_view_data = function() {\r\n\t\t\t\tvar id = scheduler.getState().drag_id;\r\n\t\t\t\tvar ev = scheduler.getEvent(id);\r\n\t\t\t\tvar property = timeline.y_property;\r\n\r\n\t\t\t\tvar evs = scheduler.getEvents(ev.start_date, ev.end_date);\r\n\t\t\t\tfor(var i = 0; i < evs.length; i++){\r\n\t\t\t\t\tif(evs[i][property] != ev[property]){\r\n\t\t\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tev._sorder = evs.length - 1;\r\n\t\t\t\tev._count = evs.length;\r\n\r\n\t\t\t\tthis.render_data([ev], scheduler.getState().mode);\r\n\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\tscheduler._on_mouse_move(e);\r\n\r\n\t\tif(dnd == 'create' && timeline){\r\n\t\t\tscheduler.render_view_data = original_render;\r\n\t\t}\r\n\r\n\t\tif (e.preventDefault)\r\n\t\t\te.preventDefault();\r\n\t\te.cancelBubble = true;\r\n\t\treturn false;\r\n\t}\r\n\r\n\t// touchmove\r\n\tattachTouchEvent(document.body, names[0], function(e){\r\n\t\tif (ignore(e)) return;\r\n\r\n\t\tvar acc = accessor(e);\r\n\t\tif(!acc) return;\r\n\t\tif (drag_mode){\r\n\t\t\tdoMouseMove(acc);\r\n\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._update_global_tip();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//if (tracker && a_webkit){\r\n\t\t//\tcheck_direction_swipe(tracker, accessor(e), 0);\r\n\t\t//}\r\n\r\n\t\ttracker = accessor(e);\r\n\t\t//ignore common and scrolling moves\r\n\t\tif (!action_mode) return;\r\n\r\n\t\t//multitouch\r\n\t\tif (!tracker){\r\n\t\t\tscroll_mode = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//target changed - probably in scroll mode\r\n\r\n\t\tif (source.target != tracker.target || (Math.abs(source.pageX - tracker.pageX) > 5) || (Math.abs(source.pageY - tracker.pageY) > 5)){\r\n\t\t\tscroll_mode = true;\r\n\t\t\tclearTimeout(timer);\r\n\t\t}\r\n\r\n\t});\r\n\r\n\t//attachTouchEvent(this._els[\"dhx_cal_data\"][0], \"scroll\", drag_cancel);\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], \"touchcancel\", drag_cancel);\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], \"contextmenu\", function(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tif (action_mode){\r\n\t\t\tif (e && e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t});\r\n\r\n\t// touchstart\r\n\tattachTouchEvent(this._obj, names[1], function(e){\r\n\t\t// block pull-to-refresh\r\n\t\tif(document && document.body){\r\n\t\t\tdocument.body.classList.add(\"dhx_cal_touch_active\");\r\n\t\t}\r\n\r\n\t\tif (ignore(e)) return;\r\n\t\tscheduler._pointerDragId = e.pointerId;\r\n\r\n\t\tvar fake_event;\r\n\t\tdrag_mode = scroll_mode = false;\r\n\t\taction_mode = true;\r\n\t\tfake_event = tracker = accessor(e);\r\n\r\n\t\tif (!fake_event){\r\n\t\t\tscroll_mode = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//dbl click\r\n\t\tvar now = new Date();\r\n\r\n\t\tif (!scroll_mode && !drag_mode && now - dblclicktime < 250){\r\n\t\t\tscheduler._click.dhx_cal_data(fake_event);\r\n\t\t\twindow.setTimeout(function(){\r\n\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t//fake_event.type = \"dblclick\";\r\n\t\t\t\tscheduler._on_dbl_click(fake_event);\r\n\t\t\t}, 50);\r\n\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._block_next_stop = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tdblclicktime = now;\r\n\r\n\t\t//drag\r\n\r\n\t\tif (scroll_mode || drag_mode || !scheduler.config.touch_drag)\r\n\t\t\treturn;\r\n\r\n\t\tvar actTask = scheduler._locate_event(document.activeElement);\r\n\t\tvar fakeTask = scheduler._locate_event(fake_event.target);\r\n\t\tvar sourceTask = source? scheduler._locate_event(source.target) : null;\r\n\r\n\t\tif(actTask && fakeTask && actTask == fakeTask && actTask != sourceTask)\r\n\t\t{\r\n\t\t\tif(e.preventDefault) {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\tscheduler._click.dhx_cal_data(fake_event);\r\n\t\t\tsource = fake_event;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//there is no target\r\n\t\ttimer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tdrag_mode = true;\r\n\t\t\tvar target = source.target;\r\n\t\t\tvar className = scheduler._getClassName(target);\r\n\t\t\tif (target && className.indexOf(\"dhx_body\") != -1)\r\n\t\t\t\ttarget = target.previousSibling;\r\n\r\n\t\t\tscheduler._on_mouse_down(source, target);\r\n\t\t\tif (scheduler._drag_mode && scheduler._drag_mode != \"create\"){\r\n\t\t\t\tscheduler.for_rendered(scheduler._drag_id, function(node, i) {\r\n\t\t\t\t\tnode.style.display='none';\r\n\t\t\t\t\tscheduler._rendered.splice(i, 1);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif (scheduler.config.touch_tip) {\r\n\t\t\t\tscheduler._show_global_tip();\r\n\t\t\t}\r\n\t\t\tscheduler.updateEvent(scheduler._drag_id);\r\n\t\t},scheduler.config.touch_drag);\r\n\r\n\t\tsource = fake_event;\r\n\t});\r\n\tfunction drag_cancel(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tscheduler._hide_global_tip();\r\n\t\tif (drag_mode){\r\n\t\t\tscheduler._on_mouse_up( accessor(e) );\r\n\t\t\tscheduler._temp_touch_block = false;\r\n\t\t}\r\n\t\tscheduler._drag_id = null;\r\n\t\tscheduler._drag_mode=null;\r\n\t\tscheduler._drag_pos=null;\r\n\t\tscheduler._pointerDragId = null;\r\n\t\tclearTimeout(timer);\r\n\t\tdrag_mode = action_mode = false;\r\n\t\tscroll_mode = true;\r\n\t}\r\n\r\n\t// touch end\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], names[2], function(e){\r\n\t\tif(document && document.body){\r\n\t\t\tdocument.body.classList.remove(\"dhx_cal_touch_active\");\r\n\t\t}\r\n\r\n\t\tif (ignore(e)) return;\r\n\r\n\t\tif(scheduler.config.touch_swipe_dates){\r\n\t\t\tif (!drag_mode && check_direction_swipe(source, tracker, 200, 100)) {\r\n\t\t\t\tscheduler._block_next_stop = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (drag_mode) {\r\n\t\t\tscheduler._ignore_next_click = true;\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\t}, 100);\r\n\t\t}\r\n\r\n\t\tdrag_cancel(e);\r\n\t\tif (scheduler._block_next_stop){\r\n\t\t\tscheduler._block_next_stop = false;\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler.event(document.body, names[2], drag_cancel);\r\n};\r\n\r\nscheduler._show_global_tip = function(){\r\n\tscheduler._hide_global_tip();\r\n\r\n\tvar toptip = scheduler._global_tip = document.createElement(\"div\");\r\n\ttoptip.className='dhx_global_tip';\r\n\r\n\tscheduler._update_global_tip(1);\r\n\r\n\tdocument.body.appendChild(toptip);\r\n};\r\nscheduler._update_global_tip = function(init){\r\n\tvar toptip = scheduler._global_tip;\r\n\tif (toptip){\r\n\t\tvar time = \"\";\r\n\t\tif (scheduler._drag_id && !init){\r\n\t\t\tvar ev = scheduler.getEvent(scheduler._drag_id);\r\n\t\t\tif (ev)\r\n\t\t\t\ttime = \"
\" + (ev._timed ? scheduler.templates.event_header(ev.start_date, ev.end_date, ev):scheduler.templates.day_date(ev.start_date, ev.end_date, ev)) + \"
\";\r\n\t\t}\r\n\r\n\t\tif (scheduler._drag_mode == \"create\" || scheduler._drag_mode == \"new-size\")\r\n\t\t\ttoptip.innerHTML = (scheduler.locale.labels.drag_to_create || \"Drag to create\")+time;\r\n\t\telse\r\n\t\t\ttoptip.innerHTML = (scheduler.locale.labels.drag_to_move || \"Drag to move\")+time;\r\n\t}\r\n};\r\nscheduler._hide_global_tip = function(){\r\n\tvar toptip = scheduler._global_tip;\r\n\tif (toptip && toptip.parentNode){\r\n\t\ttoptip.parentNode.removeChild(toptip);\r\n\t\tscheduler._global_tip = 0;\r\n\t}\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler.getRootView = function() {\r\n\treturn {\r\n\t\tview: {\r\n\t\t\trender: function(){\r\n\t\t\t\treturn {\r\n\t\t\t\t\ttag: \"div\",\r\n\t\t\t\t\ttype: 1,\r\n\t\t\t\t\tattrs: {\r\n\t\t\t\t\t\tstyle: \"width:100%;height:100%;\"\r\n\t\t\t\t\t},\r\n\t\t\t\t\thooks: {\r\n\t\t\t\t\t\t\"didInsert\": function(){\r\n\t\t\t\t\t\t\tscheduler.setCurrentView();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tbody: [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tel: this.el,\r\n\t\t\t\t\t\t\ttype: 1\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t};\r\n\t\t\t},\r\n\t\t\tinit: function(){\r\n\t\t\t\tvar container = document.createElement(\"DIV\");\r\n\t\t\t\tcontainer.id = \"scheduler_\"+ scheduler.uid();\r\n\t\t\t\tcontainer.style.width = \"100%\";\r\n\t\t\t\tcontainer.style.height = \"100%\";\r\n\t\t\t\tcontainer.classList.add(\"dhx_cal_container\");\r\n\t\t\t\tcontainer.cmp = \"grid\";\r\n\t\t\t\tcontainer.innerHTML = '
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
';\r\n\t\t\t\tscheduler.init(container);\r\n\r\n\t\t\t\tthis.el = container;\r\n\t\t\t}\r\n\t\t},\r\n\t\ttype: 4\r\n\t};\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._addThemeClass = function(){\r\n\tdocument.documentElement.setAttribute(\"data-scheduler-theme\", scheduler.skin);\r\n};\r\n\r\nscheduler._skin_settings = {\r\n\tfix_tab_position: [1,0],\r\n\tuse_select_menu_space: [1,0],\r\n\twide_form: [1,0],\r\n\r\n\thour_size_px: [44,42],\r\n\tdisplayed_event_color: [\"#ff4a4a\", \"ffc5ab\"],\r\n\tdisplayed_event_text_color: [\"#ffef80\", \"7e2727\"]\r\n};\r\n\r\nscheduler._skin_xy = {\r\n\tlightbox_additional_height: [90,50],\r\n\tnav_height: [59,22],\r\n\tbar_height: [24,20]\r\n};\r\n\r\n// material skin uses a different box sizing model than other skins, and also requires some post-processing.\r\n// In order to render events correctly, we need to know which box sizing model is used\r\n// We can detect it by styles applied, taking into account that styles may be loaded after scheduler is rendered\r\n\r\nscheduler._is_material_skin = function(){\r\n\tif(!scheduler.skin){\r\n\t\treturn checkIfMaterialSkin();\r\n\t}else{\r\n\t\treturn ((scheduler.skin + \"\").indexOf(\"material\") > -1);\r\n\t}\r\n};\r\n\r\nfunction themeNameFromFile(){\r\n\tvar links = document.getElementsByTagName(\"link\");\r\n\tfor (var i = 0; i < links.length; i++) {\r\n\t\tvar res = links[i].href.match(\"dhtmlxscheduler_([a-z]+).css\");\r\n\t\tif (res){\r\n\t\t\treturn res[1];\r\n\t\t}\r\n\t}\r\n}\r\n\r\nscheduler._build_skin_info = function() {\r\n\tmonitorThemeChange();\r\n\tconst styles = getComputedStyle(this.$container);\r\n\tconst themeVar = styles.getPropertyValue(\"--dhx-scheduler-theme\");\r\n\r\n\tlet isCssVarTheme = !!themeVar;\r\n\tlet themeName;\r\n\tlet cssValues = {};\r\n\tlet oldMaterialTheme = false;\r\n\r\n\tif(isCssVarTheme){\r\n\t\tthemeName = themeVar;\r\n\t\tfor(let i in scheduler.xy){\r\n\t\t\tcssValues[i] = styles.getPropertyValue(`--dhx-scheduler-xy-${i}`);\r\n\t\t}\r\n\r\n\t\tcssValues.hour_size_px = styles.getPropertyValue(`--dhx-scheduler-config-hour_size_px`);\r\n\t\tcssValues.wide_form = styles.getPropertyValue(`--dhx-scheduler-config-form_wide`);\r\n\r\n\t}else{\r\n\t\tthemeName = themeNameFromFile();\r\n\t\toldMaterialTheme = scheduler._is_material_skin();\r\n\t}\r\n\r\n\r\n\tscheduler._theme_info = {\r\n\t\ttheme: themeName,\r\n\t\tcssVarTheme: isCssVarTheme,\r\n\t\toldMaterialTheme: oldMaterialTheme,\r\n\t\tvalues: cssValues\r\n\t};\r\n\r\n\tif(scheduler._theme_info.cssVarTheme){\r\n\t\tconst themeVariables = this._theme_info.values;\r\n\t\tfor(let i in scheduler.xy){\r\n\t\t\tif(!isNaN(parseInt(themeVariables[i]))){\r\n\t\t\t\tscheduler.xy[i] = parseInt(themeVariables[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\n\r\nvar calculatedMaterial;\r\nfunction checkIfMaterialSkin(){\r\n\tif(calculatedMaterial === undefined){\r\n\t\tvar probe = document.createElement(\"div\");\r\n\t\tprobe.style.position = \"absolute\";\r\n\t\tprobe.style.left = \"-9999px\";\r\n\t\tprobe.style.top = \"-9999px\";\r\n\t\tprobe.innerHTML = \"
\" +\r\n\t\t\t\"
\" +\r\n\t\t\t\"
\"+\r\n\t\t\"
\";\r\n\t\tdocument.body.appendChild(probe);\r\n\t\tvar styles = window.getComputedStyle(probe.querySelector(\".dhx_cal_scale_placeholder\"));\r\n\t\tvar position = styles.getPropertyValue('position');\r\n\t\tif(position === \"absolute\"){\r\n\t\t\t// page has skins for placeholder element from material skin\r\n\t\t\tcalculatedMaterial = true;\r\n\t\t}else{\r\n\t\t\tcalculatedMaterial = false;\r\n\t\t}\r\n\r\n\t\tsetTimeout(function(){\r\n\t\t\tcalculatedMaterial = null;\r\n\t\t\tif(probe && probe.parentNode){\r\n\t\t\t\tprobe.parentNode.removeChild(probe);\r\n\t\t\t}\r\n\t\t}, 500);\r\n\t}\r\n\treturn calculatedMaterial;\r\n}\r\n\r\nvar cachedBorderBoxValue;\r\nfunction checkIfBorderBoxStyling(){\r\n\tif(scheduler._is_material_skin()){\r\n\t\treturn true;\r\n\t}else{\r\n\t\tif(cachedBorderBoxValue === undefined){\r\n\t\t\tvar probe = document.createElement(\"div\");\r\n\t\t\tprobe.style.position = \"absolute\";\r\n\t\t\tprobe.style.left = \"-9999px\";\r\n\t\t\tprobe.style.top = \"-9999px\";\r\n\t\t\tprobe.innerHTML = \"
\" +\r\n\t\t\t\t\"
\" +\r\n\t\t\t\t\t\"
\"+\r\n\t\t\t\t\"
\"+\r\n\t\t\t\"
\";\r\n\r\n\t\t\tdocument.body.appendChild(probe);\r\n\t\t\tvar styles = window.getComputedStyle(probe.querySelector(\".dhx_body\"));\r\n\t\t\tvar boxSizing = styles.getPropertyValue('box-sizing');\r\n\t\t\tdocument.body.removeChild(probe);\r\n\t\t\tcachedBorderBoxValue = !!(boxSizing === \"border-box\");\r\n\r\n\t\t\tif(!cachedBorderBoxValue){\r\n\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\tcachedBorderBoxValue = undefined;\r\n\t\t\t\t}, 1000);// recalculate in case scheduler initialized before skin is loaded\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\treturn cachedBorderBoxValue;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction refreshAfterLoad(){\r\n\tif(scheduler._is_material_skin() || scheduler._border_box_events()){\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar oldStyling = cachedBorderBoxValue;\r\n\tcachedBorderBoxValue = undefined;\r\n\tcalculatedMaterial = undefined;\r\n\tvar newStyling = checkIfBorderBoxStyling();\r\n\r\n\t// if box styling model changed - means scheduler was rendered before stylesheet was loaded or parsed inline\r\n\t// repaint scheduler in order to apply new styles\r\n\tif(oldStyling !== newStyling && scheduler.$container && scheduler.getState().mode){\r\n\t\tscheduler.setCurrentView();\r\n\t}\r\n}\r\nscheduler.event(window, 'DOMContentLoaded', refreshAfterLoad);\r\nscheduler.event(window, 'load', refreshAfterLoad);\r\n\r\nscheduler._border_box_events = function(){\r\n\treturn checkIfBorderBoxStyling();\r\n};\r\n\r\nscheduler._configure = function(col, data, skin){\r\n\tfor (var key in data)\r\n\t\tif (typeof col[key] == \"undefined\")\r\n\t\t\tcol[key] = data[key][skin];\r\n};\r\n\r\nscheduler.setSkin = function(value){\r\n\tthis.skin = value;\r\n\tscheduler._addThemeClass();\r\n\tif(scheduler.$container){\r\n\t\tthis._skin_init();\r\n\t\tthis.render();\r\n\t}\r\n\t\r\n\t//\r\n};\r\n\r\nfunction flatSkinHourScale(date){\r\n\tvar min = date.getMinutes();\r\n\tmin = min < 10 ? \"0\"+min : min;\r\n\tvar html = \"\"+ date.getHours() +\"\"+\r\n\t\t\" \"+ min +\"\";\r\n\treturn html;\r\n}\r\n\r\nlet monitorIntervalId = null;\r\nfunction monitorThemeChange(){\r\n\tconst container = scheduler.$container;\r\n\t\r\n\tclearInterval(monitorIntervalId);\r\n\tif(container){\r\n\t\tmonitorIntervalId = setInterval(() => {\r\n\t\t\tconst csstheme = getComputedStyle(container).getPropertyValue('--dhx-scheduler-theme');\r\n\t\t\tif(csstheme && csstheme !== scheduler.skin){\r\n\t\t\t\tscheduler.setSkin(csstheme);\r\n\t\t\t}\r\n\r\n\t\t}, 100);\r\n\t}\r\n}\r\nscheduler.attachEvent(\"onDestroy\", function(){\r\n\tclearInterval(monitorIntervalId);\r\n});\r\n\r\nscheduler._skin_init = function(){\r\n\tthis._build_skin_info();\r\n\r\n\tif (!this.skin){\r\n\t\tthis.skin = this._theme_info.theme;\r\n\t}\r\n\tscheduler._addThemeClass();\r\n\tif (scheduler.skin === \"flat\"){\r\n\t\t// scheduler.xy.scale_height = 35;\r\n\t\tscheduler.templates.hour_scale = flatSkinHourScale;\r\n\t}else if (scheduler.templates.hour_scale === flatSkinHourScale){\r\n\t\tscheduler.templates.hour_scale = scheduler.date.date_to_str(scheduler.config.hour_date);\r\n\t}\r\n\r\n\r\n\r\n\t//scheduler._lightbox_template=\"
 
\";\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\r\n\t\tvar date_to_str = scheduler.date.date_to_str(\"%d\");\r\n\t\tif(!scheduler.templates._old_month_day){\r\n\t\t\tscheduler.templates._old_month_day = scheduler.templates.month_day;\r\n\t\t}\r\n\t\tvar old_month_day = scheduler.templates._old_month_day;\r\n\t\tscheduler.templates.month_day = function(date) {\r\n\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\tvar label = date_to_str(date);\r\n\t\t\t\tif (date.getDate() == 1) {\r\n\t\t\t\t\tlabel = scheduler.locale.date.month_full[date.getMonth()] + \" \" + label;\r\n\t\t\t\t}\r\n\t\t\t\tif (+date == +scheduler.date.date_part(this._currentDate())) {\r\n\t\t\t\t\tlabel = scheduler.locale.labels.dhx_cal_today_button + \" \" + label;\r\n\t\t\t\t}\r\n\t\t\t\treturn label;\r\n\t\t\t} else {\r\n\t\t\t\treturn old_month_day.call(this, date);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t// tab classes\r\n\t\tif(scheduler.config.fix_tab_position){\r\n\t\t\tconst tabs = scheduler._els[\"dhx_cal_navline\"][0].querySelectorAll('[data-tab]');\r\n\t\t\ttabs.forEach((tab) => {\r\n\t\t\t\tconst view = tab.getAttribute(\"data-tab\") || tab.getAttribute(\"name\");\r\n\r\n\t\t\t\tswitch (view) {\r\n\t\t\t\t\tcase \"day\":\r\n\t\t\t\t\tcase \"day_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_first\");\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"week\":\r\n\t\t\t\t\tcase \"week_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"month\":\r\n\t\t\t\t\tcase \"month_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_last\");\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_standalone\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\treorderTabs(scheduler._els[\"dhx_cal_navline\"][0]);\r\n\r\n\t\t}\r\n\t}, {once: true});\r\n\r\n\tfunction reorderTabs(container) {\r\n\t\t// segmented tabs should go first\r\n\r\n\t\tif(scheduler.config.header){\r\n\t\t\treturn;\r\n\t\t\t// don't reorder tabs if header is defined via config\r\n\t\t}\r\n\t\tconst tabs = Array.from(container.querySelectorAll('.dhx_cal_tab'));\r\n\t\r\n\t\t// segmented tabs\r\n\t\tconst order = ['day', 'week', 'month'];\r\n\t\r\n\t\tconst specialTabs = order.map(tabName => \r\n\t\t\ttabs.find(tab => tab.getAttribute('data-tab') === tabName)\r\n\t\t).filter(tab => tab !== undefined);\r\n\t\r\n\t\tlet firstTab = tabs.length > 0 ? tabs[0] : null;\r\n\r\n\t\tspecialTabs.reverse().forEach(tab => {\r\n\t\t\tcontainer.insertBefore(tab, firstTab);\r\n\t\t\tfirstTab = tab;\r\n\t\t});\r\n\t}\r\n\r\n\t// scheduler._skin_init = function(){\r\n\t// \tthis._build_skin_info();\r\n\t// \tthis.skin = this._theme_info.theme;\r\n\t// };\r\n};\r\n\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nif (window.jQuery){\r\n\r\n(function( $ ){\r\n\tvar counter = 0;\r\n\tvar methods = [];\r\n\t$.fn.dhx_scheduler = function(config){\r\n\t\tif (typeof(config) === 'string') {\r\n\t\t\tif (methods[config] ) {\r\n\t\t\t\treturn methods[config].apply(this, []);\r\n\t\t\t}else {\r\n\t\t\t\t$.error('Method ' + config + ' does not exist on jQuery.dhx_scheduler');\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tvar views = [];\r\n\t\t\tthis.each(function() {\r\n\t\t\t\tif (this && this.getAttribute){\r\n\t\t\t\t\tif (!this.getAttribute(\"dhxscheduler\")){\r\n\t\t\t\t\t\tvar name = \"scheduler\";\r\n\t\t\t\t\t\tif (counter){\r\n\t\t\t\t\t\t\tname = \"scheduler\" + (counter+1);\r\n\t\t\t\t\t\t\twindow[name] = Scheduler.getSchedulerInstance();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tvar comp = window[name];\r\n\r\n\t\t\t\t\t\tthis.setAttribute(\"dhxscheduler\", name);\r\n\t\t\t\t\t\tfor (var key in config)\r\n\t\t\t\t\t\t\tif (key!=\"data\")\r\n\t\t\t\t\t\t\t\tcomp.config[key] = config[key];\r\n\r\n\t\t\t\t\t\tif (!this.getElementsByTagName(\"div\").length){\r\n\t\t\t\t\t\t\tthis.innerHTML = '
';\r\n\t\t\t\t\t\t\tthis.className += \" dhx_cal_container\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcomp.init(this, comp.config.date, comp.config.mode);\r\n\t\t\t\t\t\tif (config.data)\r\n\t\t\t\t\t\t\tcomp.parse(config.data);\r\n\r\n\t\t\t\t\t\tviews.push(comp);\r\n\t\t\t\t\t\tcounter++;\r\n\t\t\t\t\t} else\r\n\t\t\t\t\t\tviews.push(window[this.getAttribute(\"dhxscheduler\")]);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif (views.length === 1) return views[0];\r\n\t\t\treturn views;\r\n\t\t}\r\n\t};\r\n\r\n\r\n\r\n\r\n})(window.jQuery);\r\n\r\n}\r\n\r\n}","import global from \"../global\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\n(function(){\r\n\r\n\tvar setCurrentView = scheduler.setCurrentView,\r\n\t\tupdateView = scheduler.updateView;\r\n\tvar update_view_timer = null,\r\n\t\tcurr_view_timer = null;\r\n\r\n\tvar lazy_setCurrentView = function(date, mode){\r\n\t\tvar self = this;\r\n\t\tglobal.clearTimeout(curr_view_timer);\r\n\t\tglobal.clearTimeout(update_view_timer);\r\n\r\n\t\tvar oldDate = self._date,\r\n\t\t\toldMode = self._mode;\r\n\t\tupdateFlags(this, date, mode);\r\n\r\n\t\tcurr_view_timer = setTimeout(function(){\r\n\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif (!self.callEvent(\"onBeforeViewChange\", [oldMode, oldDate, mode || self._mode, date || self._date])){\r\n\t\t\t\tupdateFlags(self, oldDate, oldMode);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tupdateView.call(self, date, mode);\r\n\t\t\tself.callEvent(\"onViewChange\", [self._mode, self._date]);\r\n\r\n\t\t\tglobal.clearTimeout(update_view_timer);\r\n\t\t\tcurr_view_timer = 0;\r\n\t\t}, scheduler.config.delay_render);\r\n\t};\r\n\tvar lazy_updateView = function(date, mode){\r\n\t\tvar self = this,\r\n\t\t\tars = arguments;\r\n\r\n\t\tupdateFlags(this, date, mode);\r\n\r\n\t\tglobal.clearTimeout(update_view_timer);\r\n\t\tupdate_view_timer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif(curr_view_timer)\r\n\t\t\t\treturn;\r\n\r\n\t\t\tupdateView.apply(self, ars);\r\n\t\t}, scheduler.config.delay_render);\r\n\t};\r\n\tfunction updateFlags(scheduler, date, mode){\r\n\t\tif(date)\r\n\t\t\tscheduler._date = date;\r\n\t\tif(mode)\r\n\t\t\tscheduler._mode = mode;\r\n\r\n\t}\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\tif(scheduler.config.delay_render){\r\n\t\t\tscheduler.setCurrentView = lazy_setCurrentView;\r\n\t\t\tscheduler.updateView = lazy_updateView;\r\n\t\t}else{\r\n\t\t\tscheduler.setCurrentView = setCurrentView;\r\n\t\t\tscheduler.updateView = updateView;\r\n\t\t}\r\n\t});\r\n\r\n})();\r\n\r\n}","export default function DataProcessorEvents(scheduler, dp){\r\n\tthis.$scheduler = scheduler;\r\n\tthis.$dp = dp;\r\n\tthis._dataProcessorHandlers = [];\r\n\r\n\tthis.attach = function () {\r\n\t\tvar dp = this.$dp;\r\n\t\tvar scheduler = this.$scheduler;\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onEventAdded\", function(id) {\r\n\t\t\tif (!this._loading && this._validId(id))\r\n\t\t\tdp.setUpdated(id,true,\"inserted\");\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onConfirmedBeforeEventDelete\", function(id) {\r\n\t\t\tif (!this._validId(id)) return;\r\n\t\t\tvar z=dp.getState(id);\r\n\r\n\t\t\tif (z==\"inserted\" || this._new_event) { dp.setUpdated(id,false); return true; }\r\n\t\t\tif (z==\"deleted\") return false;\r\n\t\t\tif (z==\"true_deleted\") return true;\r\n\r\n\t\t\tdp.setUpdated(id,true,\"deleted\");\r\n\t\t\treturn false;\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onEventChanged\", function(id) { \r\n\t\t\tif (!this._loading && this._validId(id))\r\n\t\t\tdp.setUpdated(id,true,\"updated\");\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onClearAll\", function() { \r\n\t\t\t// clear dataprocessor state when scheduler is reset\r\n\t\t\tdp._in_progress={};\r\n\t\t\tdp._invalid={};\r\n\t\t\tdp.updatedRows = [];\r\n\t\t\tdp._waitMode = 0;\r\n\t\t}));\r\n\r\n\t\tdp.attachEvent(\"insertCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"updateCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"deleteCallback\", function(upd, id) {\r\n\t\t\tif (scheduler.getEvent(id)){\r\n\t\t\t\tscheduler.setUserData(id, this.action_param, \"true_deleted\");\r\n\t\t\t\tscheduler.deleteEvent(id);\r\n\t\t\t} else if (scheduler._add_rec_marker)\r\n\t\t\t\tscheduler._update_callback(upd, id);\r\n\t\t});\r\n\t};\r\n\r\n\tthis.detach = function () {\r\n\t\tfor (var key in this._dataProcessorHandlers) {\r\n\t\t\tvar handler = this._dataProcessorHandlers[key];\r\n\t\t\tthis.$scheduler.detachEvent(handler);\r\n\t\t}\r\n\t\tthis._dataProcessorHandlers = [];\r\n\t};\r\n}\r\n\r\nexport function extendScheduler(scheduler, dp){\r\n\tscheduler._validId=function(id){\r\n\t\tif(this._is_virtual_event){\r\n\t\t\treturn !this._is_virtual_event(id);\r\n\t\t}\r\n\t\treturn true;\r\n\t};\r\n\tscheduler.setUserData=function(id,name,value){\r\n\t\tif (id){\r\n\t\t\tvar ev = this.getEvent(id);\r\n\t\t\tif(ev) ev[name]=value;\r\n\t\t}else{\r\n\t\t\tthis._userdata[name]=value;\r\n\t\t}\r\n\t};\r\n\tscheduler.getUserData=function(id,name){\r\n\t\tif (id){\r\n\t\t\tvar ev = this.getEvent(id);\r\n\t\t\tif(ev)\r\n\t\t\t\treturn ev[name];\r\n\t\t\telse\r\n\t\t\t\treturn null;\r\n\t\t}else{\r\n\t\t\treturn this._userdata[name];\r\n\t\t}\r\n\t};\r\n\tscheduler._set_event_text_style=function(id,style){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\t\tthis.for_rendered(id,function(r){\r\n\t\t\tr.style.cssText+=\";\"+style;\r\n\t\t});\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tev[\"_text_style\"]=style;\r\n\t\tthis.event_updated(ev);\r\n\t};\r\n\tscheduler._update_callback = function(upd,id){\r\n\t\tvar data = scheduler._xmlNodeToJSON(upd.firstChild);\r\n\t\t//fix for updates of recurring events\r\n\t\tif (data.rec_type == \"none\") data.rec_pattern = \"none\";\r\n\t\tdata.text = data.text||data._tagvalue;\r\n\t\tdata.start_date = scheduler._helpers.parseDate(data.start_date);\r\n\t\tdata.end_date = scheduler._helpers.parseDate(data.end_date);\r\n\t\tscheduler.addEvent(data);\r\n\t\tif (scheduler._add_rec_marker)\r\n\t\t\tscheduler.setCurrentView();\r\n\t};\r\n\tscheduler._dp_change_event_id = function(id, new_id){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\t\tscheduler.changeEventId(id, new_id);\r\n\t};\r\n\tscheduler._dp_hook_delete = function(id, new_id){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\r\n\t\tif(new_id && id != new_id){\r\n\t\t\tif(this.getUserData(id, dp.action_param) == \"true_deleted\")\r\n\t\t\t\tthis.setUserData(id, dp.action_param, \"updated\");\r\n\r\n\t\t\tthis.changeEventId(id, new_id);\r\n\t\t}\r\n\t\treturn this.deleteEvent(new_id, true);\r\n\t};\r\n\r\n\tscheduler.setDp = function() {\r\n\t\tthis._dp = dp;\r\n\t};\r\n\tscheduler.setDp();\r\n}","import DataProcessorEvents from \"./dataprocessor_hooks\";\r\nimport { extendScheduler } from \"./dataprocessor_hooks\";\r\nimport eventable from \"../../utils/eventable\";\r\nimport global from \"../../global\";\r\n\r\n/**\r\n *\t@desc: constructor, data processor object\r\n *\t@param: serverProcessorURL - url used for update\r\n *\t@type: public\r\n */\r\nexport function DataProcessor(serverProcessorURL){\r\n\tthis.serverProcessor = serverProcessorURL;\r\n\tthis.action_param = \"!nativeeditor_status\";\r\n\r\n\tthis.object = null;\r\n\tthis.updatedRows = []; // ids of updated rows\r\n\r\n\tthis.autoUpdate = true;\r\n\tthis.updateMode = \"cell\";\r\n\tthis._tMode = \"GET\";\r\n\tthis._headers = null;\r\n\tthis._payload = null;\r\n\tthis.post_delim = \"_\";\r\n\r\n\tthis._waitMode = 0;\r\n\tthis._in_progress = {};\r\n\tthis._invalid = {};\r\n\tthis.messages = [];\r\n\r\n\tthis.styles = {\r\n\t\tupdated: \"font-weight:bold;\",\r\n\t\tinserted: \"font-weight:bold;\",\r\n\t\tdeleted: \"text-decoration : line-through;\",\r\n\t\tinvalid: \"background-color:FFE0E0;\",\r\n\t\tinvalid_cell: \"border-bottom:2px solid red;\",\r\n\t\terror: \"color:red;\",\r\n\t\tclear: \"font-weight:normal;text-decoration:none;\"\r\n\t};\r\n\tthis.enableUTFencoding(true);\r\n\teventable(this); // TODO: need to update\r\n\r\n\treturn this;\r\n}\r\nDataProcessor.prototype = {\r\n\tsetTransactionMode: function (mode, total) {\r\n\t\tif (typeof mode == \"object\") {\r\n\t\t\tthis._tMode = mode.mode || this._tMode;\r\n\r\n\t\t\tif (mode.headers !== undefined) {\r\n\t\t\t\tthis._headers = mode.headers;\r\n\t\t\t}\r\n\r\n\t\t\tif (mode.payload !== undefined) {\r\n\t\t\t\tthis._payload = mode.payload;\r\n\t\t\t}\r\n\t\t\tthis._tSend = !!total;\r\n\t\t} else {\r\n\t\t\tthis._tMode = mode;\r\n\t\t\tthis._tSend = total;\r\n\t\t}\r\n\r\n\t\tif (this._tMode == \"REST\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t}\r\n\r\n\t\tif (this._tMode === \"JSON\" || this._tMode === \"REST-JSON\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t\tthis._serializeAsJson = true;\r\n\t\t\tthis._headers = this._headers || {};\r\n\t\t\tthis._headers[\"Content-Type\"] = \"application/json\";\r\n\t\t}else{\r\n\t\t\tif(this._headers && !this._headers[\"Content-Type\"]){\r\n\t\t\t\tthis._headers[\"Content-Type\"] = \"application/x-www-form-urlencoded\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (this._tMode === \"CUSTOM\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t\tthis._router = mode.router;\r\n\t\t}\r\n\t},\r\n\tescape: function (data) {\r\n\t\tif (this._utf)\r\n\t\t\treturn encodeURIComponent(data);\r\n\t\telse\r\n\t\t\treturn escape(data);\r\n\t},\r\n\t/**\r\n\t *\t@desc: allows to set escaping mode\r\n\t *\t@param: true - utf based escaping, simple - use current page encoding\r\n\t *\t@type: public\r\n\t */\r\n\tenableUTFencoding: function (mode) {\r\n\t\tthis._utf = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: allows to define, which column may trigger update\r\n\t *\t@param: val - array or list of true/false values\r\n\t *\t@type: public\r\n\t */\r\n\tsetDataColumns: function (val) {\r\n\t\tthis._columns = (typeof val == \"string\") ? val.split(\",\") : val;\r\n\t},\r\n\t/**\r\n\t *\t@desc: get state of updating\r\n\t *\t@returns: true - all in sync with server, false - some items not updated yet.\r\n\t *\t@type: public\r\n\t */\r\n\tgetSyncState: function () {\r\n\t\treturn !this.updatedRows.length;\r\n\t},\r\n\t/**\r\n\t *\t@desc: enable/disable named field for data syncing, will use column ids for grid\r\n\t *\t@param: mode - true/false\r\n\t *\t@type: public\r\n\t */\r\n\tenableDataNames: function (mode) {\r\n\t\tthis._endnm = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: enable/disable mode , when only changed fields and row id send to the server side, instead of all fields in default mode\r\n\t *\t@param: mode - true/false\r\n\t *\t@type: public\r\n\t */\r\n\tenablePartialDataSend: function (mode) {\r\n\t\tthis._changed = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: set if rows should be send to server automatically\r\n\t *\t@param: mode - \"row\" - based on row selection changed, \"cell\" - based on cell editing finished, \"off\" - manual data sending\r\n\t *\t@type: public\r\n\t */\r\n\tsetUpdateMode: function (mode, dnd) {\r\n\t\tthis.autoUpdate = (mode == \"cell\");\r\n\t\tthis.updateMode = mode;\r\n\t\tthis.dnd = dnd;\r\n\t},\r\n\tignore: function (code, master) {\r\n\t\tthis._silent_mode = true;\r\n\t\tcode.call(master || window);\r\n\t\tthis._silent_mode = false;\r\n\t},\r\n\t/**\r\n\t *\t@desc: mark row as updated/normal. check mandatory fields,initiate autoupdate (if turned on)\r\n\t *\t@param: rowId - id of row to set update-status for\r\n\t *\t@param: state - true for \"updated\", false for \"not updated\"\r\n\t *\t@param: mode - update mode name\r\n\t *\t@type: public\r\n\t */\r\n\tsetUpdated: function (rowId, state, mode) {\r\n\t\tif (this._silent_mode) return;\r\n\t\tvar ind = this.findRow(rowId);\r\n\r\n\t\tmode = mode || \"updated\";\r\n\t\tvar existing = this.$scheduler.getUserData(rowId, this.action_param);\r\n\t\tif (existing && mode == \"updated\") mode = existing;\r\n\t\tif (state) {\r\n\t\t\tthis.set_invalid(rowId, false); //clear previous error flag\r\n\t\t\tthis.updatedRows[ind] = rowId;\r\n\t\t\tthis.$scheduler.setUserData(rowId, this.action_param, mode);\r\n\t\t\tif (this._in_progress[rowId])\r\n\t\t\t\tthis._in_progress[rowId] = \"wait\";\r\n\t\t} else {\r\n\t\t\tif (!this.is_invalid(rowId)) {\r\n\t\t\t\tthis.updatedRows.splice(ind, 1);\r\n\t\t\t\tthis.$scheduler.setUserData(rowId, this.action_param, \"\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.markRow(rowId, state, mode);\r\n\t\tif (state && this.autoUpdate) this.sendData(rowId);\r\n\t},\r\n\r\n\tmarkRow: function (id, state, mode) {\r\n\t\tvar str = \"\";\r\n\t\tvar invalid = this.is_invalid(id);\r\n\t\tif (invalid) {\r\n\t\t\tstr = this.styles[invalid];\r\n\t\t\tstate = true;\r\n\t\t}\r\n\t\tif (this.callEvent(\"onRowMark\", [id, state, mode, invalid])) {\r\n\t\t\t//default logic\r\n\t\t\tstr = this.styles[state ? mode : \"clear\"] + str;\r\n\r\n\t\t\tthis.$scheduler[this._methods[0]](id, str);\r\n\r\n\t\t\tif (invalid && invalid.details) {\r\n\t\t\t\tstr += this.styles[invalid + \"_cell\"];\r\n\t\t\t\tfor (var i = 0; i < invalid.details.length; i++)\r\n\t\t\t\t\tif (invalid.details[i])\r\n\t\t\t\t\t\tthis.$scheduler[this._methods[1]](id, i, str);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tgetActionByState: function(state) {\r\n\t\tif (state === \"inserted\") {\r\n\t\t\treturn \"create\";\r\n\t\t}\r\n\t\tif (state === \"updated\") {\r\n\t\t\treturn \"update\";\r\n\t\t}\r\n\t\tif (state === \"deleted\") {\r\n\t\t\treturn \"delete\";\r\n\t\t}\r\n\t\treturn \"update\";\r\n\t},\r\n\r\n\tgetState: function (id) {\r\n\t\treturn this.$scheduler.getUserData(id, this.action_param);\r\n\t},\r\n\tis_invalid: function (id) {\r\n\t\treturn this._invalid[id];\r\n\t},\r\n\tset_invalid: function (id, mode, details) {\r\n\t\tif (details) mode = {\r\n\t\t\tvalue: mode, details: details, toString: function () {\r\n\t\t\t\treturn this.value.toString();\r\n\t\t\t}\r\n\t\t};\r\n\t\tthis._invalid[id] = mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: check mandatory fields and varify values of cells, initiate update (if specified)\r\n\t *\t@param: rowId - id of row to set update-status for\r\n\t *\t@type: public\r\n\t */\r\n\tcheckBeforeUpdate: function (rowId) {\r\n\t\treturn true;\r\n\t},\r\n\t/**\r\n\t *\t@desc: send row(s) values to server\r\n\t *\t@param: rowId - id of row which data to send. If not specified, then all \"updated\" rows will be send\r\n\t *\t@type: public\r\n\t */\r\n\tsendData: function (rowId) {\r\n\t\tif (this.$scheduler.editStop) this.$scheduler.editStop();\r\n\r\n\t\tif (typeof rowId == \"undefined\" || this._tSend) return this.sendAllData();\r\n\t\tif (this._in_progress[rowId]) return false;\r\n\r\n\t\tthis.messages = [];\r\n\t\tif (!this.checkBeforeUpdate(rowId) && this.callEvent(\"onValidationError\", [rowId, this.messages])) return false;\r\n\t\tthis._beforeSendData(this._getRowData(rowId), rowId);\r\n\t},\r\n\t_beforeSendData: function (data, rowId) {\r\n\t\tif (!this.callEvent(\"onBeforeUpdate\", [rowId, this.getState(rowId), data])) return false;\r\n\t\tthis._sendData(data, rowId);\r\n\t},\r\n\tserialize: function (data, id) {\r\n\t\tif (this._serializeAsJson) {\r\n\t\t\treturn this._serializeAsJSON(data);\r\n\t\t}\r\n\r\n\t\tif (typeof data == \"string\")\r\n\t\t\treturn data;\r\n\t\tif (typeof id != \"undefined\")\r\n\t\t\treturn this.serialize_one(data, \"\");\r\n\t\telse {\r\n\t\t\tvar stack = [];\r\n\t\t\tvar keys = [];\r\n\t\t\tfor (var key in data)\r\n\t\t\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\t\t\tstack.push(this.serialize_one(data[key], key + this.post_delim));\r\n\t\t\t\t\tkeys.push(key);\r\n\t\t\t\t}\r\n\t\t\tstack.push(\"ids=\" + this.escape(keys.join(\",\")));\r\n\t\t\tif (this.$scheduler.security_key)\r\n\t\t\t\tstack.push(\"dhx_security=\" + (this.$scheduler.security_key));\r\n\t\t\treturn stack.join(\"&\");\r\n\t\t}\r\n\t},\r\n\tserialize_one: function (data, pref) {\r\n\t\tif (typeof data == \"string\")\r\n\t\t\treturn data;\r\n\t\tvar stack = [];\r\n\t\tvar serialized = \"\";\r\n\t\tfor (var key in data)\r\n\t\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\t\tif ((key == \"id\" || key == this.action_param) && this._tMode == \"REST\") continue;\r\n\t\t\t\tif (typeof data[key] === \"string\" || typeof data[key] === \"number\") {\r\n\t\t\t\t\tserialized = data[key];\r\n\t\t\t\t} else {\r\n\t\t\t\t\tserialized = JSON.stringify(data[key]);\r\n\t\t\t\t}\r\n\t\t\t\tstack.push(this.escape((pref || \"\") + key) + \"=\" + this.escape(serialized));\r\n\t\t\t}\r\n\t\treturn stack.join(\"&\");\r\n\t},\r\n\t_applyPayload: function (url) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tif (this._payload)\r\n\t\t\tfor (var key in this._payload)\r\n\t\t\t\turl = url + ajax.urlSeparator(url) + this.escape(key) + \"=\" + this.escape(this._payload[key]);\r\n\t\treturn url;\r\n\t},\r\n\t_sendData: function (dataToSend, rowId) {\r\n\t\tif (!dataToSend) {\r\n\t\t\treturn; // nothing to send\r\n\t\t}\r\n\t\tif (!this.callEvent(\"onBeforeDataSending\", rowId ? [rowId, this.getState(rowId), dataToSend] : [null, null, dataToSend])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (rowId) {\r\n\t\t\tthis._in_progress[rowId] = (new Date()).valueOf();\r\n\t\t}\r\n\r\n\t\tvar self = this;\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\r\n\t\tif (this._tMode === \"CUSTOM\") {\r\n\t\t\tvar state = this.getState(rowId);\r\n\t\t\tvar action = this.getActionByState(state);\r\n\t\t\tvar _onResolvedCreateUpdate = function (tag) {\r\n\t\t\t\tvar resultState = state;\r\n\t\t\t\tif(tag && tag.responseText && tag.setRequestHeader){\r\n\t\t\t\t\tif(tag.status !== 200){\r\n\t\t\t\t\t\tresultState = \"error\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\ttag = JSON.parse(tag.responseText);\r\n\t\t\t\t\t} catch (e){}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tresultState = resultState || \"updated\";\r\n\t\t\t\tvar sid = rowId;\r\n\t\t\t\tvar tid = rowId;\r\n\r\n\t\t\t\tif (tag) {\r\n\t\t\t\t\tresultState = tag.action || resultState;\r\n\t\t\t\t\tsid = tag.sid || sid;\r\n\t\t\t\t\ttid = tag.id || tag.tid || tid;\r\n\t\t\t\t}\r\n\t\t\t\tself.afterUpdateCallback(sid, tid, resultState, tag);\r\n\t\t\t};\r\n\r\n\t\t\tconst routerMode = \"event\";\r\n\t\t\tvar actionPromise;\r\n\t\t\tif (this._router instanceof Function) {\r\n\t\t\t\tactionPromise = this._router(routerMode, action, dataToSend, rowId);\r\n\t\t\t} else {\r\n\t\t\t\tswitch (state) {\r\n\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].create(dataToSend);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].delete(rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].update(dataToSend, rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(actionPromise){\r\n\t\t\t\t// neither promise nor {tid: newId} response object\r\n\t\t\t\tif(!actionPromise.then &&\r\n\t\t\t\t\t(actionPromise.id === undefined && actionPromise.tid === undefined && actionPromise.action === undefined)){\r\n\t\t\t\t\tthrow new Error(\"Incorrect router return value. A Promise or a response object is expected\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(actionPromise.then){\r\n\t\t\t\t\tactionPromise.then(_onResolvedCreateUpdate).catch(function(error) {\r\n\t\t\t\t\t\tif(error && error.action){\r\n\t\t\t\t\t\t\t_onResolvedCreateUpdate(error);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t_onResolvedCreateUpdate({ action: \"error\", value: error});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// custom method may return a response object in case of sync action\r\n\t\t\t\t\t_onResolvedCreateUpdate(actionPromise);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t_onResolvedCreateUpdate(null);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar queryParams = {\r\n\t\t\tcallback: function(xml) {\r\n\t\t\t\tvar ids = [];\r\n\r\n\t\t\t\tif (rowId) {\r\n\t\t\t\t\tids.push(rowId);\r\n\t\t\t\t} else if (dataToSend) {\r\n\t\t\t\t\tfor (var key in dataToSend) {\r\n\t\t\t\t\t\tids.push(key);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.afterUpdate(self, xml, ids);\r\n\t\t\t},\r\n\t\t\theaders: self._headers\r\n\t\t};\r\n\r\n\t\tvar urlParams = this.serverProcessor + (this._user ? (ajax.urlSeparator(this.serverProcessor) + [\"dhx_user=\" + this._user, \"dhx_version=\" + this.$scheduler.getUserData(0, \"version\")].join(\"&\")) : \"\");\r\n\t\tvar url = this._applyPayload(urlParams);\r\n\t\tvar data;\r\n\r\n\t\tswitch (this._tMode) {\r\n\t\t\tcase \"GET\":\r\n\t\t\t\tdata = this._cleanupArgumentsBeforeSend(dataToSend);\r\n\t\t\t\tqueryParams.url = url + ajax.urlSeparator(url) + this.serialize(data, rowId);\r\n\t\t\t\tqueryParams.method = \"GET\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"POST\":\r\n\t\t\t\tdata = this._cleanupArgumentsBeforeSend(dataToSend);\r\n\t\t\t\tqueryParams.url = url;\r\n\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\tqueryParams.data = this.serialize(data, rowId);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"JSON\":\r\n\t\t\t\tdata = {};\r\n\t\t\t\tvar preprocessedData = this._cleanupItemBeforeSend(dataToSend);\r\n\t\t\t\tfor (var key in preprocessedData) {\r\n\t\t\t\t\tif (key === this.action_param || key === \"id\" || key === \"gr_id\") {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdata[key] = preprocessedData[key];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tqueryParams.url = url;\r\n\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\tqueryParams.data = JSON.stringify({\r\n\t\t\t\t\tid: rowId,\r\n\t\t\t\t\taction: dataToSend[this.action_param],\r\n\t\t\t\t\tdata: data\r\n\t\t\t\t});\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"REST\":\r\n\t\t\tcase \"REST-JSON\":\r\n\t\t\t\turl = urlParams.replace(/(&|\\?)editing=true/, \"\");\r\n\t\t\t\tdata = \"\";\r\n\r\n\t\t\t\tswitch (this.getState(rowId)) {\r\n\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\t\t\tqueryParams.data = this.serialize(dataToSend, rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\tqueryParams.method = \"DELETE\";\r\n\t\t\t\t\t\turl = url + (url.slice(-1) === \"/\" ? \"\" : \"/\") + rowId;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tqueryParams.method = \"PUT\";\r\n\t\t\t\t\t\tqueryParams.data = this.serialize(dataToSend, rowId);\r\n\t\t\t\t\t\turl = url + (url.slice(-1) === \"/\" ? \"\" : \"/\") + rowId;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tqueryParams.url = this._applyPayload(url);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tthis._waitMode++;\r\n\t\treturn ajax.query(queryParams);\r\n\t},\r\n\tsendAllData: function () {\r\n\t\tif (!this.updatedRows.length || this.updateMode === \"off\") { // FIXME: need to leave checking 'this.updateMode === \"off\"'?\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.messages = [];\r\n\t\tvar valid = true;\r\n\r\n\t\tthis._forEachUpdatedRow(function(rowId) {\r\n\t\t\tvalid = valid && this.checkBeforeUpdate(rowId);\r\n\t\t});\r\n\r\n\t\tif (!valid && !this.callEvent(\"onValidationError\", [\"\", this.messages])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (this._tSend) {\r\n\t\t\tthis._sendData(this._getAllData());\r\n\t\t} else {\r\n\t\t\tthis._forEachUpdatedRow(function(rowId) {\r\n\t\t\t\tif (!this._in_progress[rowId]) {\r\n\t\t\t\t\tif (this.is_invalid(rowId)) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis._beforeSendData(this._getRowData(rowId), rowId);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\r\n\t_getAllData: function (rowId) {\r\n\t\tvar out = {};\r\n\t\tvar has_one = false;\r\n\t\tthis._forEachUpdatedRow(function(id) {\r\n\t\t\tif (this._in_progress[id] || this.is_invalid(id)){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar row = this._getRowData(id);\r\n\t\t\tif (!this.callEvent(\"onBeforeUpdate\", [id, this.getState(id), row])) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tout[id] = row;\r\n\t\t\thas_one = true;\r\n\t\t\tthis._in_progress[id] = (new Date()).valueOf();\r\n\t\t});\r\n\t\treturn has_one ? out : null;\r\n\t},\r\n\r\n\tfindRow: function (pattern) {\r\n\t\tvar i = 0;\r\n\t\tfor (i = 0; i < this.updatedRows.length; i++)\r\n\t\t\tif (pattern == this.updatedRows[i]) break;\r\n\t\treturn i;\r\n\t},\r\n\r\n\t/**\r\n\t *\t@desc: define custom actions\r\n\t *\t@param: name - name of action, same as value of action attribute\r\n\t *\t@param: handler - custom function, which receives a XMl response content for action\r\n\t *\t@type: private\r\n\t */\r\n\tdefineAction: function (name, handler) {\r\n\t\tif (!this._uActions) this._uActions = {};\r\n\t\tthis._uActions[name] = handler;\r\n\t},\r\n\r\n\t/**\r\n\t *\t @desc: used in combination with setOnBeforeUpdateHandler to create custom client-server transport system\r\n\t *\t @param: sid - id of item before update\r\n\t *\t @param: tid - id of item after up0ate\r\n\t *\t @param: action - action name\r\n\t *\t @type: public\r\n\t *\t @topic: 0\r\n\t */\r\n\tafterUpdateCallback: function (sid, tid, action, btag) {\r\n\t\tif(!this.$scheduler){\r\n\t\t\t// destructor has been called before the callback\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar marker = sid;\r\n\t\tvar correct = (action !== \"error\" && action !== \"invalid\");\r\n\t\tif (!correct) {\r\n\t\t\tthis.set_invalid(sid, action);\r\n\t\t}\r\n\t\tif ((this._uActions) && (this._uActions[action]) && (!this._uActions[action](btag))) {\r\n\t\t\treturn (delete this._in_progress[marker]);\r\n\t\t}\r\n\r\n\t\tif (this._in_progress[marker] !== \"wait\") {\r\n\t\t\tthis.setUpdated(sid, false);\r\n\t\t}\r\n\r\n\t\tvar originalSid = sid;\r\n\r\n\t\tswitch (action) {\r\n\t\t\tcase \"inserted\":\r\n\t\t\tcase \"insert\":\r\n\t\t\t\tif (tid != sid) {\r\n\t\t\t\t\tthis.setUpdated(sid, false);\r\n\t\t\t\t\tthis.$scheduler[this._methods[2]](sid, tid);\r\n\t\t\t\t\tsid = tid;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"delete\":\r\n\t\t\tcase \"deleted\":\r\n\t\t\t\tthis.$scheduler.setUserData(sid, this.action_param, \"true_deleted\");\r\n\t\t\t\tthis.$scheduler[this._methods[3]](sid, tid);\r\n\t\t\t\tdelete this._in_progress[marker];\r\n\t\t\t\treturn this.callEvent(\"onAfterUpdate\", [sid, action, tid, btag]);\r\n\t\t}\r\n\r\n\t\tif (this._in_progress[marker] !== \"wait\") {\r\n\t\t\tif (correct) {\r\n\t\t\t\tthis.$scheduler.setUserData(sid, this.action_param, \"\");\r\n\t\t\t}\r\n\t\t\tdelete this._in_progress[marker];\r\n\t\t} else {\r\n\t\t\tdelete this._in_progress[marker];\r\n\t\t\tthis.setUpdated(tid, true, this.$scheduler.getUserData(sid, this.action_param));\r\n\t\t}\r\n\r\n\t\tthis.callEvent(\"onAfterUpdate\", [originalSid, action, tid, btag]);\r\n\t},\r\n\r\n\t_errorResponse: function (xml, id){\r\n\t\tif(this.$scheduler && this.$scheduler.callEvent){\r\n\t\t\tthis.$scheduler.callEvent(\"onSaveError\", [id, xml.xmlDoc]);\r\n\t\t}\r\n\t\treturn this.cleanUpdate(id);\r\n\t},\r\n\r\n\t_setDefaultTransactionMode: function () {\r\n\t\tif (this.serverProcessor) {\r\n\t\t\tthis.setTransactionMode(\"POST\", true);\r\n\t\t\tthis.serverProcessor += (this.serverProcessor.indexOf(\"?\") !== -1 ? \"&\" : \"?\") + \"editing=true\";\r\n\t\t\tthis._serverProcessor = this.serverProcessor;\r\n\t\t}\r\n\t},\r\n\t\r\n\t/**\r\n\t *\t@desc: response from server\r\n\t *\t@param: xml - XMLLoader object with response XML\r\n\t *\t@type: private\r\n\t */\r\n\tafterUpdate: function (that, xml, id) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\r\n\t\tif (xml.xmlDoc.status !== 200){\r\n\t\t\tthis._errorResponse(xml, id);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// try to use json first\r\n\t\tvar tag;\r\n\t\ttry {\r\n\t\t\ttag = JSON.parse(xml.xmlDoc.responseText);\r\n\t\t} catch (e) {\r\n\t\t\t// empty response also can be processed by json handler\r\n\t\t\tif (!xml.xmlDoc.responseText.length) {\r\n\t\t\t\ttag = {};\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (tag) {\r\n\t\t\tvar action = tag.action || this.getState(id) || \"updated\";\r\n\t\t\tvar sid = tag.sid || id[0];\r\n\t\t\tvar tid = tag.tid || id[0];\r\n\t\t\tthat.afterUpdateCallback(sid, tid, action, tag);\r\n\t\t\tthat.finalizeUpdate();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// xml response\r\n\t\tvar top = ajax.xmltop(\"data\", xml.xmlDoc); // fix incorrect content type in IE\r\n\t\tif (!top) {\r\n\t\t\treturn this._errorResponse(xml, id);\r\n\t\t}\r\n\t\tvar atag = ajax.xpath(\"//data/action\", top);\r\n\t\tif (!atag.length) {\r\n\t\t\treturn this._errorResponse(xml, id);\r\n\t\t}\r\n\r\n\t\tfor (var i = 0; i < atag.length; i++) {\r\n\t\t\tvar btag = atag[i];\r\n\t\t\tvar action = btag.getAttribute(\"type\");\r\n\t\t\tvar sid = btag.getAttribute(\"sid\");\r\n\t\t\tvar tid = btag.getAttribute(\"tid\");\r\n\r\n\t\t\tthat.afterUpdateCallback(sid, tid, action, btag);\r\n\t\t}\r\n\t\tthat.finalizeUpdate();\r\n\t},\r\n\tcleanUpdate: function (id) {\r\n\t\tif (id)\r\n\t\t\tfor (var i = 0; i < id.length; i++)\r\n\t\t\t\tdelete this._in_progress[id[i]];\r\n\t},\r\n\tfinalizeUpdate: function () {\r\n\t\tif (this._waitMode) this._waitMode--;\r\n\r\n\t\tthis.callEvent(\"onAfterUpdateFinish\", []);\r\n\t\tif (!this.updatedRows.length)\r\n\t\t\tthis.callEvent(\"onFullSync\", []);\r\n\t},\r\n\r\n\t/**\r\n\t *\t@desc: initializes data-processor\r\n\t *\t@param: scheduler - dhtmlxScheduler object to attach this data-processor to\r\n\t *\t@type: public\r\n\t */\r\n\tinit: function (scheduler) {\r\n\t\tif (this._initialized) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.$scheduler = scheduler;\r\n\t\tif (this.$scheduler._dp_init) {\r\n\t\t\tthis.$scheduler._dp_init(this);\r\n\t\t}\r\n\r\n\t\tthis._setDefaultTransactionMode();\r\n\r\n\t\tthis._methods=this._methods||[\"_set_event_text_style\",\"\",\"_dp_change_event_id\",\"_dp_hook_delete\"];\r\n\t\textendScheduler(this.$scheduler, this);\r\n\t\tvar dataProcessorEvents = new DataProcessorEvents(this.$scheduler, this);\r\n\t\tdataProcessorEvents.attach();\r\n\t\tthis.attachEvent(\"onDestroy\", function() {\r\n\t\t\tdelete this._getRowData;\r\n\r\n\t\t\tdelete this.$scheduler._dp;\r\n\t\t\tdelete this.$scheduler._dataprocessor;\r\n\t\t\tdelete this.$scheduler._set_event_text_style;\r\n\t\t\tdelete this.$scheduler._dp_change_event_id;\r\n\t\t\tdelete this.$scheduler._dp_hook_delete;\r\n\t\t\tdelete this.$scheduler;\r\n\t\t\tdataProcessorEvents.detach();\r\n\t\t});\r\n\t\tthis.$scheduler.callEvent(\"onDataProcessorReady\", [this]);\r\n\t\tthis._initialized = true;\r\n\r\n\t\tscheduler._dataprocessor=this;\r\n\t},\r\n\r\n\tsetOnAfterUpdate: function (ev) {\r\n\t\tthis.attachEvent(\"onAfterUpdate\", ev);\r\n\t},\r\n\tsetOnBeforeUpdateHandler: function (func) {\r\n\t\tthis.attachEvent(\"onBeforeDataSending\", func);\r\n\t},\r\n\r\n\t/* starts autoupdate mode\r\n\t\t@param interval time interval for sending update requests\r\n\t*/\r\n\tsetAutoUpdate: function (interval, user) {\r\n\t\tinterval = interval || 2000;\r\n\r\n\t\tthis._user = user || (new Date()).valueOf();\r\n\t\tthis._need_update = false;\r\n\t\t//this._loader = null;\r\n\t\tthis._update_busy = false;\r\n\r\n\t\tthis.attachEvent(\"onAfterUpdate\", function (sid, action, tid, xml_node) {\r\n\t\t\tthis.afterAutoUpdate(sid, action, tid, xml_node);\r\n\t\t});\r\n\t\tthis.attachEvent(\"onFullSync\", function () {\r\n\t\t\tthis.fullSync();\r\n\t\t});\r\n\r\n\t\tvar self = this;\r\n\t\tlet intervalId = global.setInterval(function () {\r\n\t\t\tself.loadUpdate();\r\n\t\t}, interval);\r\n\t\tthis.attachEvent(\"onDestroy\", function(){\r\n\t\t\tclearInterval(intervalId);\r\n\t\t});\r\n\t},\r\n\r\n\t/* process updating request answer\r\n\t\tif status == collision version is deprecated\r\n\t\tset flag for autoupdating immediately\r\n\t*/\r\n\tafterAutoUpdate: function (sid, action, tid, xml_node) {\r\n\t\tif (action == 'collision') {\r\n\t\t\tthis._need_update = true;\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t},\r\n\r\n\t/* callback function for onFillSync event\r\n\t\tcall update function if it's need\r\n\t*/\r\n\tfullSync: function () {\r\n\t\tif (this._need_update) {\r\n\t\t\tthis._need_update = false;\r\n\t\t\tthis.loadUpdate();\r\n\t\t}\r\n\t\treturn true;\r\n\t},\r\n\r\n\t/* sends query to the server and call callback function\r\n\t*/\r\n\tgetUpdates: function (url, callback) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tif (this._update_busy)\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t\tthis._update_busy = true;\r\n\r\n\t\tajax.get(url, callback);\r\n\t},\r\n\r\n\t/* returns xml node value\r\n\t\t@param node\r\n\t\t\txml node\r\n\t*/\r\n\t_getXmlNodeValue: function(node) {\r\n\t\tif (node.firstChild) {\r\n\t\t\treturn node.firstChild.nodeValue;\r\n\t\t}\r\n\t\treturn \"\";\r\n\t},\r\n\r\n\t/* loads updates and processes them\r\n\t*/\r\n\tloadUpdate: function () {\r\n\t\tvar self = this;\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tvar version = this.$scheduler.getUserData(0, \"version\");\r\n\t\tvar url = this.serverProcessor + ajax.urlSeparator(this.serverProcessor) + [\"dhx_user=\" + this._user, \"dhx_version=\" + version].join(\"&\");\r\n\t\turl = url.replace(\"editing=true&\", \"\");\r\n\t\tthis.getUpdates(url, function (xml) {\r\n\t\t\tvar vers = ajax.xpath(\"//userdata\", xml);\r\n\t\t\tself.$scheduler.setUserData(0, \"version\", self._getXmlNodeValue(vers[0]));\r\n\r\n\t\t\tvar updates = ajax.xpath(\"//update\", xml);\r\n\t\t\tif (updates.length) {\r\n\t\t\t\tself._silent_mode = true;\r\n\r\n\t\t\t\tfor (var i = 0; i < updates.length; i++) {\r\n\t\t\t\t\tvar status = updates[i].getAttribute(\"status\");\r\n\t\t\t\t\tvar id = updates[i].getAttribute(\"id\");\r\n\t\t\t\t\tvar parent = updates[i].getAttribute(\"parent\");\r\n\t\t\t\t\tswitch (status) {\r\n\t\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"insertCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"updated\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"updateCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"deleteCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tself._silent_mode = false;\r\n\t\t\t}\r\n\t\t\tself._update_busy = false;\r\n\t\t\tself = null;\r\n\t\t});\r\n\t},\r\n\r\n\tdestructor: function() {\r\n\t\tthis.callEvent(\"onDestroy\", []);\r\n\t\tthis.detachAllEvents();\r\n\r\n\t\tthis.updatedRows = [];\r\n\t\tthis._in_progress = {};\r\n\t\tthis._invalid = {};\r\n\t\tthis._headers = null;\r\n\t\tthis._payload = null;\r\n\t\tdelete this._initialized;\r\n\t},\r\n\r\n\turl: function(url) {\r\n\t\tthis.serverProcessor = this._serverProcessor = url;\r\n\t},\r\n\r\n\t_serializeAsJSON: function(data) {\r\n\t\tif (typeof data === \"string\") {\r\n\t\t\treturn data;\r\n\t\t}\r\n\r\n\t\tvar copy = this.$scheduler.utils.copy(data);\r\n\t\tif (this._tMode === \"REST-JSON\") {\r\n\t\t\tdelete copy.id;\r\n\t\t\tdelete copy[this.action_param];\r\n\t\t}\r\n\r\n\t\treturn JSON.stringify(copy);\r\n\t},\r\n\r\n\t// GET/POST/JSON modes of the dataProcessor didn't send the whole data items in 'delete' requests\r\n\t// clear extra info from the data in order not to change the request format\r\n\t_cleanupArgumentsBeforeSend: function(dataToSend) {\r\n\t\tvar processedData;\r\n\t\tif(dataToSend[this.action_param] === undefined){// hash of updated items, and not an individual item\r\n\t\t\tprocessedData = {};\r\n\t\t\tfor(var i in dataToSend) {\r\n\t\t\t\tprocessedData[i] = this._cleanupArgumentsBeforeSend(dataToSend[i]);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tprocessedData = this._cleanupItemBeforeSend(dataToSend);\r\n\t\t}\r\n\t\treturn processedData;\r\n\t},\r\n\t_cleanupItemBeforeSend: function(updatedItem) {\r\n\t\tvar output = null;\r\n\t\tif(updatedItem){\r\n\t\t\tif(updatedItem[this.action_param] === \"deleted\"){\r\n\t\t\t\toutput = {};\r\n\t\t\t\toutput.id = updatedItem.id;\r\n\t\t\t\toutput[this.action_param] = updatedItem[this.action_param];\r\n\t\t\t}else{\r\n\t\t\t\toutput = updatedItem;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn output;\r\n\t},\r\n\r\n\t_forEachUpdatedRow: function(code) {\r\n\t\tvar updatedRows = this.updatedRows.slice();\r\n\t\tfor (var i = 0; i < updatedRows.length; i++) {\r\n\t\t\tvar rowId = updatedRows[i];\r\n\t\t\tif (this.$scheduler.getUserData(rowId, this.action_param)) {\r\n\t\t\t\tcode.call(this, rowId);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t_prepareDataItem: function(item) {\r\n\t\tvar processedItem = {};\r\n\t\tvar scheduler = this.$scheduler;\r\n\t\tvar copy = scheduler.utils.copy(item);\r\n\t\tfor (var i in copy) {\r\n\t\t\tif (i.indexOf(\"_\") === 0) {\r\n\t\t\t\tcontinue;\r\n\t\t\t} else if (copy[i]) {\r\n\t\t\t\tif(copy[i].getUTCFullYear){\r\n\t\t\t\t\tprocessedItem[i] = scheduler._helpers.formatDate(copy[i]);\r\n\t\t\t\t} else if(typeof copy[i] == \"object\") {\r\n\t\t\t\t\tprocessedItem[i] = this._prepareDataItem(copy[i]);\r\n\t\t\t\t} else if(copy[i] === null) {\r\n\t\t\t\t\tprocessedItem[i] = \"\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprocessedItem[i] = copy[i];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tprocessedItem[this.action_param] = scheduler.getUserData(item.id, this.action_param);\r\n\t\treturn processedItem;\r\n\t},\r\n\t_getRowData: function(id) {\r\n\t\tvar dataItem = this.$scheduler.getEvent(id);\r\n\t\tif (!dataItem) {\r\n\t\t\tdataItem = { id: id };\r\n\t\t}\r\n\t\treturn this._prepareDataItem(dataItem);\r\n\t}\r\n};\r\n\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler.createDataProcessor = function(config) {\r\n\tvar router;\r\n\tvar tMode;\r\n\tif (config instanceof Function) {\r\n\t\trouter = config;\r\n\t} else if (config.hasOwnProperty(\"router\")) {\r\n\t\trouter = config.router;\r\n\t} else if(config.hasOwnProperty(\"event\")){\r\n\t\trouter = config;\r\n\t}\r\n\r\n\tif (router) {\r\n\t\ttMode = \"CUSTOM\";\r\n\t} else {\r\n\t\ttMode = config.mode || \"REST-JSON\";\r\n\t}\r\n\r\n\tvar dp = new DataProcessor(config.url);\r\n\tdp.init(scheduler);\r\n\tdp.setTransactionMode({\r\n\t\tmode: tMode,\r\n\t\trouter: router\r\n\t}, config.batchUpdate); // FIXME: config.batchUpdate where it is explained?\r\n\treturn dp;\r\n};\r\n\r\nscheduler.DataProcessor = DataProcessor;\r\n\r\n}\r\n\r\n//var dataProcessor = global.dataProcessor = DataProcessor; // for old","import utils from \"./utils/utils\";\r\nimport domHelpers from \"./utils/dom_helpers\";\r\n\r\n\r\nexport default function(scheduler) {\r\n\r\n\tvar boxAttribute = \"data-dhxbox\";\r\n\r\n\tvar _dhx_msg_cfg = null;\r\n\r\n\tfunction callback(config, result) {\r\n\t\tvar usercall = config.callback;\r\n\t\tmodalBox.hide(config.box);\r\n\r\n\t\t_dhx_msg_cfg = config.box = null;\r\n\tif (usercall)\r\n\t\t\tusercall(result);\r\n\t}\r\n\r\n\tfunction modal_key(event) {\r\n\t\tif (_dhx_msg_cfg) {\r\n\r\n\t\t\tvar code = event.which || event.keyCode;\r\n\t\t\tvar preventDefault = false;\r\n\r\n\t\t\tif (messageBox.keyboard) {\r\n\t\t\t\tif (code == 13 || code == 32) {\r\n\t\t\t\t\t// default behavior is to confirm/submit popup on space/enter\r\n\t\t\t\t\t// if browser focus is set on button element - do button click instead of default behavior\r\n\t\t\t\t\tvar target = event.target || event.srcElement;\r\n\t\t\t\t\tif (domHelpers.getClassName(target).indexOf(\"scheduler_popup_button\") > -1 && target.click) {\r\n\t\t\t\t\t\ttarget.click();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcallback(_dhx_msg_cfg, true);\r\n\t\t\t\t\t\tpreventDefault = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (code == 27) {\r\n\t\t\t\t\tcallback(_dhx_msg_cfg, false);\r\n\t\t\t\t\tpreventDefault = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (preventDefault) {\r\n\t\t\t\tif (event.preventDefault){\r\n\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t}\r\n\t\t\t\treturn !(event.cancelBubble = true);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler.event(document, \"keydown\", modal_key, true);\r\n\r\n\tfunction modality(mode) {\r\n\t\tif (!modality.cover) {\r\n\t\t\tmodality.cover = document.createElement(\"div\");\r\n\t\t\t//necessary for IE only\r\n\t\t\tscheduler.event(modality.cover, \"keydown\", modal_key);\r\n\t\t\tmodality.cover.className = \"dhx_modal_cover\";\r\n\t\t\tdocument.body.appendChild(modality.cover);\r\n\t\t}\r\n\r\n\t\tmodality.cover.style.display = mode ? \"inline-block\" : \"none\";\r\n\t}\r\n\r\n\tfunction button(text, classValue, result) {\r\n\t\tvar buttonAriaAttrs = scheduler._waiAria.messageButtonAttrString(text);\r\n\t\tvar name = (classValue || \"\").toLowerCase().replace(/ /g, \"_\");\r\n\t\tvar buttonCss = `scheduler_${name}_button dhtmlx_${name}_button`; \r\n\t\treturn `
${text}
`;\r\n\t}\r\n\r\n\tfunction info(text) {\r\n\t\tif (!messageBox.area) {\r\n\t\t\tmessageBox.area = document.createElement(\"div\");\r\n\t\t\tmessageBox.area.className = \"scheduler_message_area dhtmlx_message_area\";\r\n\t\t\tmessageBox.area.style[messageBox.position] = \"5px\";\r\n\t\t\tdocument.body.appendChild(messageBox.area);\r\n\t\t}\r\n\r\n\t\tmessageBox.hide(text.id);\r\n\t\tvar message = document.createElement(\"div\");\r\n\t\tmessage.innerHTML = \"
\" + text.text + \"
\";\r\n\t\tmessage.className = \"scheduler-info dhtmlx-info scheduler-\" + text.type + \" dhtmlx-\" + text.type;\r\n\t\tscheduler.event(message, \"click\",function () {\r\n\t\t\tmessageBox.hide(text.id);\r\n\t\t\ttext = null;\r\n\t\t});\r\n\r\n\t\tscheduler._waiAria.messageInfoAttr(message);\r\n\r\n\t\tif (messageBox.position == \"bottom\" && messageBox.area.firstChild)\r\n\t\t\tmessageBox.area.insertBefore(message, messageBox.area.firstChild);\r\n\t\telse\r\n\t\t\tmessageBox.area.appendChild(message);\r\n\r\n\t\tif (text.expire > 0)\r\n\t\t\tmessageBox.timers[text.id] = window.setTimeout(function () {\r\n\t\t\t\t// GS-1213: We need that when Scheduler is destroyed\r\n\t\t\t\tif (messageBox) messageBox.hide(text.id);\r\n\t\t\t}, text.expire);\r\n\r\n\t\tmessageBox.pull[text.id] = message;\r\n\t\tmessage = null;\r\n\r\n\t\treturn text.id;\r\n\t}\r\n\r\n\tfunction getFirstDefined() {\r\n\t\tvar values = [].slice.apply(arguments, [0]);\r\n\r\n\t\tfor (var i = 0; i < values.length; i++) {\r\n\t\t\tif (values[i]) {\r\n\t\t\t\treturn values[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tfunction _boxStructure(config, ok, cancel) {\r\n\t\tvar box = document.createElement(\"div\");\r\n\r\n\t\tvar contentId = utils.uid();\r\n\t\tscheduler._waiAria.messageModalAttr(box, contentId);\r\n\r\n\r\n\t\tbox.className = \" scheduler_modal_box dhtmlx_modal_box scheduler-\" + config.type + \" dhtmlx-\" + config.type;\r\n\t\tbox.setAttribute(boxAttribute, 1);\r\n\r\n\t\tvar inner = '';\r\n\r\n\t\tif (config.width)\r\n\t\t\tbox.style.width = config.width;\r\n\t\tif (config.height)\r\n\t\t\tbox.style.height = config.height;\r\n\t\tif (config.title)\r\n\t\t\tinner += '
' + config.title + '
';\r\n\t\tinner += '
' + (config.content ? '' : config.text) + '
';\r\n\t\tif (ok)\r\n\t\t\tinner += button(getFirstDefined(config.ok, scheduler.locale.labels.message_ok, \"OK\"), \"ok\", true);\r\n\t\tif (cancel)\r\n\t\t\tinner += button(getFirstDefined(config.cancel, scheduler.locale.labels.message_cancel, \"Cancel\"), \"cancel\", false);\r\n\r\n\t\tif (config.buttons) {\r\n\t\t\tfor (var i = 0; i < config.buttons.length; i++) {\r\n\t\t\t\tvar btn = config.buttons[i];\r\n\t\t\t\tif (typeof btn == \"object\") {\r\n\t\t\t\t\t// Support { label:\"Save\", css:\"main_button\", value:\"save\" }\r\n\t\t\t\t\tvar label = btn.label;\r\n\t\t\t\t\tvar css = btn.css || (\"scheduler_\" + btn.label.toLowerCase() + \"_button dhtmlx_\" + btn.label.toLowerCase() + \"_button\");\r\n\t\t\t\t\tvar value = btn.value || i;\r\n\t\t\t\t\tinner += button(label, css, value);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tinner += button(btn, btn, i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tinner += '
';\r\n\t\tbox.innerHTML = inner;\r\n\r\n\t\tif (config.content) {\r\n\t\t\tvar node = config.content;\r\n\t\t\tif (typeof node == \"string\")\r\n\t\t\t\tnode = document.getElementById(node);\r\n\t\t\tif (node.style.display == 'none')\r\n\t\t\t\tnode.style.display = \"\";\r\n\t\t\tbox.childNodes[config.title ? 1 : 0].appendChild(node);\r\n\t\t}\r\n\r\n\t\tscheduler.event(box, \"click\", function (event) {\r\n\t\t\tvar source = event.target || event.srcElement;\r\n\t\t\tif (!source.className) source = source.parentNode;\r\n\t\t\tif (domHelpers.closest(source, \".scheduler_popup_button\")) {\r\n\t\t\t\tvar result = source.getAttribute(\"data-result\");\r\n\t\t\t\tresult = (result == \"true\") || (result == \"false\" ? false : result);\r\n\t\t\t\tcallback(config, result);\r\n\t\t\t}\r\n\t\t});\r\n\t\tconfig.box = box;\r\n\t\tif (ok || cancel)\r\n\t\t\t_dhx_msg_cfg = config;\r\n\r\n\t\treturn box;\r\n\t}\r\n\r\n\tfunction _createBox(config, ok, cancel) {\r\n\t\tvar box = config.tagName ? config : _boxStructure(config, ok, cancel);\r\n\r\n\t\tif (!config.hidden)\r\n\t\t\tmodality(true);\r\n\t\tdocument.body.appendChild(box);\r\n\t\tvar x = Math.abs(Math.floor(((window.innerWidth || document.documentElement.offsetWidth) - box.offsetWidth) / 2));\r\n\t\tvar y = Math.abs(Math.floor(((window.innerHeight || document.documentElement.offsetHeight) - box.offsetHeight) / 2));\r\n\t\tif (config.position == \"top\")\r\n\t\t\tbox.style.top = \"-3px\";\r\n\t\telse\r\n\t\t\tbox.style.top = y + 'px';\r\n\t\tbox.style.left = x + 'px';\r\n\t\t//necessary for IE only\r\n\t\tscheduler.event(box, \"keydown\", modal_key);\r\n\r\n\t\tmodalBox.focus(box);\r\n\r\n\t\tif (config.hidden)\r\n\t\t\tmodalBox.hide(box);\r\n\r\n\t\tscheduler.callEvent(\"onMessagePopup\", [box]);\r\n\t\treturn box;\r\n\t}\r\n\r\n\tfunction alertPopup(config) {\r\n\t\treturn _createBox(config, true, false);\r\n\t}\r\n\r\n\tfunction confirmPopup(config) {\r\n\t\treturn _createBox(config, true, true);\r\n\t}\r\n\r\n\tfunction boxPopup(config) {\r\n\t\treturn _createBox(config);\r\n\t}\r\n\r\n\tfunction box_params(text, type, callback) {\r\n\t\tif (typeof text != \"object\") {\r\n\t\t\tif (typeof type == \"function\") {\r\n\t\t\t\tcallback = type;\r\n\t\t\t\ttype = \"\";\r\n\t\t\t}\r\n\t\t\ttext = {text: text, type: type, callback: callback};\r\n\t\t}\r\n\t\treturn text;\r\n\t}\r\n\r\n\tfunction params(text, type, expire, id) {\r\n\t\tif (typeof text != \"object\")\r\n\t\t\ttext = {text: text, type: type, expire: expire, id: id};\r\n\t\ttext.id = text.id || utils.uid();\r\n\t\ttext.expire = text.expire || messageBox.expire;\r\n\t\treturn text;\r\n\t}\r\n\r\n\tvar alertBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"confirm\";\r\n\t\treturn alertPopup(text);\r\n\t};\r\n\tvar confirmBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"alert\";\r\n\t\treturn confirmPopup(text);\r\n\t};\r\n\tvar modalBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"alert\";\r\n\t\treturn boxPopup(text);\r\n\t};\r\n\tmodalBox.hide = function (node) {\r\n\t\twhile (node && node.getAttribute && !node.getAttribute(boxAttribute))\r\n\t\t\tnode = node.parentNode;\r\n\t\tif (node) {\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t\tmodality(false);\r\n\r\n\t\t\tscheduler.callEvent(\"onAfterMessagePopup\", [node]);\r\n\t\t}\r\n\t};\r\n\r\n\tmodalBox.focus = function (node) {\r\n\t\tsetTimeout(function () {\r\n\t\t\tvar focusable = domHelpers.getFocusableNodes(node);\r\n\t\t\tif (focusable.length) {\r\n\t\t\t\tif (focusable[0].focus) focusable[0].focus();\r\n\t\t\t}\r\n\t\t}, 1);\r\n\t};\r\n\r\n\tvar messageBox = function (text, type, expire, id) {\r\n\t\ttext = params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"info\";\r\n\r\n\t\tvar subtype = text.type.split(\"-\")[0];\r\n\t\tswitch (subtype) {\r\n\t\t\tcase \"alert\":\r\n\t\t\t\treturn alertPopup(text);\r\n\t\t\tcase \"confirm\":\r\n\t\t\t\treturn confirmPopup(text);\r\n\t\t\tcase \"modalbox\":\r\n\t\t\t\treturn boxPopup(text);\r\n\t\t\tdefault:\r\n\t\t\t\treturn info(text);\r\n\t\t}\r\n\t};\r\n\r\n\tmessageBox.seed = (new Date()).valueOf();\r\n\tmessageBox.uid = utils.uid;\r\n\tmessageBox.expire = 4000;\r\n\tmessageBox.keyboard = true;\r\n\tmessageBox.position = \"top\";\r\n\tmessageBox.pull = {};\r\n\tmessageBox.timers = {};\r\n\r\n\tmessageBox.hideAll = function () {\r\n\t\tfor (var key in messageBox.pull)\r\n\t\t\tmessageBox.hide(key);\r\n\t};\r\n\tmessageBox.hide = function (id) {\r\n\t\tvar obj = messageBox.pull[id];\r\n\t\tif (obj && obj.parentNode) {\r\n\t\t\twindow.setTimeout(function () {\r\n\t\t\t\tobj.parentNode.removeChild(obj);\r\n\t\t\t\tobj = null;\r\n\t\t\t}, 2000);\r\n\t\t\tobj.className += \" hidden\";\r\n\r\n\t\t\tif (messageBox.timers[id])\r\n\t\t\t\twindow.clearTimeout(messageBox.timers[id]);\r\n\t\t\tdelete messageBox.pull[id];\r\n\t\t}\r\n\t};\r\n\r\n\tvar popups = [];\r\n\tscheduler.attachEvent(\"onMessagePopup\", function(box){\r\n\t\tpopups.push(box);\r\n\t});\r\n\tscheduler.attachEvent(\"onAfterMessagePopup\", function(box){\r\n\t\tfor(var i = 0; i < popups.length; i++){\r\n\t\t\tif(popups[i] === box){\r\n\t\t\t\tpopups.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tif(modality.cover && modality.cover.parentNode){\r\n\t\t\tmodality.cover.parentNode.removeChild(modality.cover);\r\n\t\t}\r\n\r\n\t\tfor(var i = 0; i < popups.length; i++){\r\n\t\t\tif(popups[i].parentNode){\r\n\t\t\t\tpopups[i].parentNode.removeChild(popups[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\tpopups = null;\r\n\r\n\t\tif(messageBox.area && messageBox.area.parentNode){\r\n\t\t\tmessageBox.area.parentNode.removeChild(messageBox.area);\r\n\t\t}\r\n\t\tmessageBox = null;\r\n\t});\r\n\r\n\treturn {\r\n\t\talert: alertBox,\r\n\t\tconfirm: confirmBox,\r\n\t\tmessage: messageBox,\r\n\t\tmodalbox: modalBox\r\n\t};\r\n}","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"كانون الثاني\", \"شباط\", \"آذار\", \"نيسان\", \"أيار\", \"حزيران\", \"تموز\", \"آب\", \"أيلول\", \"تشرين الأول\", \"تشرين الثاني\", \"كانون الأول\"],\r\n\t\tmonth_short: [\"يناير\", \"فبراير\", \"مارس\", \"أبريل\", \"مايو\", \"يونيو\", \"يوليو\", \"أغسطس\", \"سبتمبر\", \"أكتوبر\", \"نوفمبر\", \"ديسمبر\"],\r\n\t\tday_full: [\"الأحد\", \"الأثنين\", \"ألثلاثاء\", \"الأربعاء\", \"ألحميس\", \"ألجمعة\", \"السبت\"],\r\n\t\tday_short: [\"احد\", \"اثنين\", \"ثلاثاء\", \"اربعاء\", \"خميس\", \"جمعة\", \"سبت\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"اليوم\",\r\n\t\tday_tab: \"يوم\",\r\n\t\tweek_tab: \"أسبوع\",\r\n\t\tmonth_tab: \"شهر\",\r\n\t\tnew_event: \"حدث جديد\",\r\n\t\ticon_save: \"اخزن\",\r\n\t\ticon_cancel: \"الغاء\",\r\n\t\ticon_details: \"تفاصيل\",\r\n\t\ticon_edit: \"تحرير\",\r\n\t\ticon_delete: \"حذف\",\r\n\t\tconfirm_closing: \"التغييرات سوف تضيع, هل انت متأكد؟\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"الحدث سيتم حذفها نهائيا ، هل أنت متأكد؟\",\r\n\t\tsection_description: \"الوصف\",\r\n\t\tsection_time: \"الفترة الزمنية\",\r\n\t\tfull_day: \"طوال اليوم\",\r\n\r\n\t\tconfirm_recurring: \"هل تريد تحرير مجموعة كاملة من الأحداث المتكررة؟\",\r\n\t\tsection_recurring: \"تكرار الحدث\",\r\n\t\tbutton_recurring: \"تعطيل\",\r\n\t\tbutton_recurring_open: \"تمكين\",\r\n\t\tbutton_edit_series: \"تحرير سلسلة\",\r\n\t\tbutton_edit_occurrence: \"تعديل نسخة\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"جدول\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};\r\n\r\n\r\n","/*\r\n Translation by Sofya Morozova\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Студзень\", \"Люты\", \"Сакавік\", \"Красавік\", \"Maй\", \"Чэрвень\", \"Ліпень\", \"Жнівень\", \"Верасень\", \"Кастрычнік\", \"Лістапад\", \"Снежань\"],\r\n\t\tmonth_short: [\"Студз\", \"Лют\", \"Сак\", \"Крас\", \"Maй\", \"Чэр\", \"Ліп\", \"Жнів\", \"Вер\", \"Каст\", \"Ліст\", \"Снеж\"],\r\n\t\tday_full: [ \"Нядзеля\", \"Панядзелак\", \"Аўторак\", \"Серада\", \"Чацвер\", \"Пятніца\", \"Субота\"],\r\n\t\tday_short: [\"Нд\", \"Пн\", \"Аўт\", \"Ср\", \"Чцв\", \"Пт\", \"Сб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сёння\",\r\n\t\tday_tab: \"Дзень\",\r\n\t\tweek_tab: \"Тыдзень\",\r\n\t\tmonth_tab: \"Месяц\",\r\n\t\tnew_event: \"Новая падзея\",\r\n\t\ticon_save: \"Захаваць\",\r\n\t\ticon_cancel: \"Адмяніць\",\r\n\t\ticon_details: \"Дэталі\",\r\n\t\ticon_edit: \"Змяніць\",\r\n\t\ticon_delete: \"Выдаліць\",\r\n\t\tconfirm_closing: \"\", //Унесеныя змены будуць страчаны, працягнуць?\r\n\t\tconfirm_deleting: \"Падзея будзе выдалена незваротна, працягнуць?\",\r\n\t\tsection_description: \"Апісанне\",\r\n\t\tsection_time: \"Перыяд часу\",\r\n\t\tfull_day: \"Увесь дзень\",\r\n\r\n\t\tconfirm_recurring: \"Вы хочаце змяніць усю серыю паўтаральных падзей?\",\r\n\t\tsection_recurring: \"Паўтарэнне\",\r\n\t\tbutton_recurring: \"Адключана\",\r\n\t\tbutton_recurring_open: \"Уключана\",\r\n\t\tbutton_edit_series: \"Рэдагаваць серыю\",\r\n\t\tbutton_edit_occurrence: \"Рэдагаваць асобнік\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Спіс\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Апісанне\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Год\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Спіс\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Спic\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Дзень\",\r\n\t\trepeat_radio_week: \"Тыдзень\",\r\n\t\trepeat_radio_month: \"Месяц\",\r\n\t\trepeat_radio_year: \"Год\",\r\n\t\trepeat_radio_day_type: \"Кожны\",\r\n\t\trepeat_text_day_count: \"дзень\",\r\n\t\trepeat_radio_day_type2: \"Кожны працоўны дзень\",\r\n\t\trepeat_week: \" Паўтараць кожны\",\r\n\t\trepeat_text_week_count: \"тыдзень\",\r\n\t\trepeat_radio_month_type: \"Паўтараць\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" чысла кожнага\",\r\n\t\trepeat_text_month_count: \"месяцу\",\r\n\t\trepeat_text_month_count2_before: \"кожны \",\r\n\t\trepeat_text_month_count2_after: \"месяц\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"дзень\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без даты заканчэння\",\r\n\t\trepeat_text_occurences_count: \"паўтораў\",\r\n\t\trepeat_radio_end2: \"\",\r\n\t\trepeat_radio_end3: \"Да \",\r\n\t\tmonth_for_recurring: [\"Студзеня\", \"Лютага\", \"Сакавіка\", \"Красавіка\", \"Мая\", \"Чэрвеня\", \"Ліпeня\", \"Жніўня\", \"Верасня\", \"Кастрычніка\", \"Лістапада\", \"Снежня\"],\r\n\t\tday_for_recurring: [\"Нядзелю\", \"Панядзелак\", \"Аўторак\", \"Сераду\", \"Чацвер\", \"Пятніцу\", \"Суботу\"]\r\n\t}\r\n};\r\n","/*\r\n @Traducido por Vicente Adria Bohigues - vicenteadria@hotmail.com\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Gener\", \"Febrer\", \"Març\", \"Abril\", \"Maig\", \"Juny\", \"Juliol\", \"Agost\", \"Setembre\", \"Octubre\", \"Novembre\", \"Desembre\"],\r\n\t\tmonth_short: [\"Gen\", \"Feb\", \"Mar\", \"Abr\", \"Mai\", \"Jun\", \"Jul\", \"Ago\", \"Set\", \"Oct\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Diumenge\", \"Dilluns\", \"Dimarts\", \"Dimecres\", \"Dijous\", \"Divendres\", \"Dissabte\"],\r\n\t\tday_short: [\"Dg\", \"Dl\", \"Dm\", \"Dc\", \"Dj\", \"Dv\", \"Ds\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hui\",\r\n\t\tday_tab: \"Dia\",\r\n\t\tweek_tab: \"Setmana\",\r\n\t\tmonth_tab: \"Mes\",\r\n\t\tnew_event: \"Nou esdeveniment\",\r\n\t\ticon_save: \"Guardar\",\r\n\t\ticon_cancel: \"Cancel·lar\",\r\n\t\ticon_details: \"Detalls\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Esborrar\",\r\n\t\tconfirm_closing: \"\", //\"Els seus canvis es perdràn, continuar ?\"\r\n\t\tconfirm_deleting: \"L'esdeveniment s'esborrarà definitivament, continuar ?\",\r\n\t\tsection_description: \"Descripció\",\r\n\t\tsection_time: \"Periode de temps\",\r\n\t\tfull_day: \"Tot el dia\",\r\n\r\n\t\tconfirm_recurring: \"¿Desitja modificar el conjunt d'esdeveniments repetits?\",\r\n\t\tsection_recurring: \"Repeteixca l'esdeveniment\",\r\n\t\tbutton_recurring: \"Impedit\",\r\n\t\tbutton_recurring_open: \"Permés\",\r\n\t\tbutton_edit_series: \"Edit sèrie\",\r\n\t\tbutton_edit_occurrence: \"Edita Instància\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descripció\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Any\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Taula\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};","/*\r\nTranslation by FreezeSoul\r\n*/\r\n//scheduler.config.day_date=\"%M %d日 %D\";\r\n//scheduler.config.default_date=\"%Y年 %M %d日\";\r\n//scheduler.config.month_date=\"%Y年 %M\";\r\n\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"一月\", \"二月\", \"三月\", \"四月\", \"五月\", \"六月\", \"七月\", \"八月\", \"九月\", \"十月\", \"十一月\", \"十二月\"],\r\n\t\tmonth_short: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tday_full: [\"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\"],\r\n\t\tday_short: [\"日\", \"一\", \"二\", \"三\", \"四\", \"五\", \"六\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"今天\",\r\n\t\tday_tab: \"日\",\r\n\t\tweek_tab: \"周\",\r\n\t\tmonth_tab: \"月\",\r\n\t\tnew_event: \"新建日程\",\r\n\t\ticon_save: \"保存\",\r\n\t\ticon_cancel: \"关闭\",\r\n\t\ticon_details: \"详细\",\r\n\t\ticon_edit: \"编辑\",\r\n\t\ticon_delete: \"删除\",\r\n\t\tconfirm_closing: \"请确认是否撤销修改!\", //Your changes will be lost, are your sure?\r\n\t\tconfirm_deleting: \"是否删除日程?\",\r\n\t\tsection_description: \"描述\",\r\n\t\tsection_time: \"时间范围\",\r\n\t\tfull_day: \"整天\",\r\n\r\n\t\tconfirm_recurring:\"请确认是否将日程设为重复模式?\",\r\n\t\tsection_recurring:\"重复周期\",\r\n\t\tbutton_recurring:\"禁用\",\r\n\t\tbutton_recurring_open:\"启用\",\r\n\t\tbutton_edit_series: \"编辑系列\",\r\n\t\tbutton_edit_occurrence: \"编辑实例\",\r\n\t\t\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"议程\",\r\n\t\tdate:\"日期\",\r\n\t\tdescription:\"说明\",\r\n\t\t\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"今年\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"议程\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab:\"电网\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"按天\",\r\n\t\trepeat_radio_week: \"按周\",\r\n\t\trepeat_radio_month: \"按月\",\r\n\t\trepeat_radio_year: \"按年\",\r\n\t\trepeat_radio_day_type: \"每\",\r\n\t\trepeat_text_day_count: \"天\",\r\n\t\trepeat_radio_day_type2: \"每个工作日\",\r\n\t\trepeat_week: \" 重复 每\",\r\n\t\trepeat_text_week_count: \"星期的:\",\r\n\t\trepeat_radio_month_type: \"重复\",\r\n\t\trepeat_radio_month_start: \"在\",\r\n\t\trepeat_text_month_day: \"日 每\",\r\n\t\trepeat_text_month_count: \"月\",\r\n\t\trepeat_text_month_count2_before: \"每\",\r\n\t\trepeat_text_month_count2_after: \"月\",\r\n\t\trepeat_year_label: \"在\",\r\n\t\tselect_year_day2: \"的\",\r\n\t\trepeat_text_year_day: \"日\",\r\n\t\tselect_year_month: \"月\",\r\n\t\trepeat_radio_end: \"无结束日期\",\r\n\t\trepeat_text_occurences_count: \"次结束\",\r\n\t\trepeat_radio_end2: \"重复\",\r\n\t\trepeat_radio_end3: \"结束于\",\r\n\t\tmonth_for_recurring: [\"一月\", \"二月\", \"三月\", \"四月\", \"五月\", \"六月\", \"七月\", \"八月\", \"九月\", \"十月\", \"十一月\", \"十二月\"],\r\n\t\tday_for_recurring: [\"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Leden\", \"Únor\", \"Březen\", \"Duben\", \"Květen\", \"Červen\", \"Červenec\", \"Srpen\", \"Září\", \"Říjen\", \"Listopad\", \"Prosinec\"],\r\n\t\tmonth_short: [\"Led\", \"Ún\", \"Bře\", \"Dub\", \"Kvě\", \"Čer\", \"Čec\", \"Srp\", \"Září\", \"Říj\", \"List\", \"Pro\"],\r\n\t\tday_full: [\"Neděle\", \"Pondělí\", \"Úterý\", \"Středa\", \"Čtvrtek\", \"Pátek\", \"Sobota\"],\r\n\t\tday_short: [\"Ne\", \"Po\", \"Út\", \"St\", \"Čt\", \"Pá\", \"So\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dnes\",\r\n\t\tday_tab: \"Den\",\r\n\t\tweek_tab: \"Týden\",\r\n\t\tmonth_tab: \"Měsíc\",\r\n\t\tnew_event: \"Nová událost\",\r\n\t\ticon_save: \"Uložit\",\r\n\t\ticon_cancel: \"Zpět\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edituj\",\r\n\t\ticon_delete: \"Smazat\",\r\n\t\tconfirm_closing: \"\", //Vaše změny budou ztraceny, opravdu ?\r\n\t\tconfirm_deleting: \"Událost bude trvale smazána, opravdu?\",\r\n\t\tsection_description: \"Poznámky\",\r\n\t\tsection_time: \"Doba platnosti\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Přejete si upravit celou řadu opakovaných událostí?\",\r\n\t\tsection_recurring: \"Opakování události\",\r\n\t\tbutton_recurring: \"Vypnuto\",\r\n\t\tbutton_recurring_open: \"Zapnuto\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Upravit instance\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Program\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Poznámka\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\t\tfull_day: \"Full day\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Program\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Mřížka\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Denně\",\r\n\t\trepeat_radio_week: \"Týdně\",\r\n\t\trepeat_radio_month: \"Měsíčně\",\r\n\t\trepeat_radio_year: \"Ročně\",\r\n\t\trepeat_radio_day_type: \"každý\",\r\n\t\trepeat_text_day_count: \"Den\",\r\n\t\trepeat_radio_day_type2: \"pracovní dny\",\r\n\t\trepeat_week: \"Opakuje každých\",\r\n\t\trepeat_text_week_count: \"Týdnů na:\",\r\n\t\trepeat_radio_month_type: \"u každého\",\r\n\t\trepeat_radio_month_start: \"na\",\r\n\t\trepeat_text_month_day: \"Den každého\",\r\n\t\trepeat_text_month_count: \"Měsíc\",\r\n\t\trepeat_text_month_count2_before: \"každý\",\r\n\t\trepeat_text_month_count2_after: \"Měsíc\",\r\n\t\trepeat_year_label: \"na\",\r\n\t\tselect_year_day2: \"v\",\r\n\t\trepeat_text_year_day: \"Den v\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"bez data ukončení\",\r\n\t\trepeat_text_occurences_count: \"Události\",\r\n\t\trepeat_radio_end2: \"po\",\r\n\t\trepeat_radio_end3: \"Konec\",\r\n\t\tmonth_for_recurring: [\"Leden\", \"Únor\", \"Březen\", \"Duben\", \"Květen\", \"Červen\", \"Červenec\", \"Srpen\", \"Září\", \"Říjen\", \"Listopad\", \"Prosinec\"],\r\n\t\tday_for_recurring: [\"Neděle \", \"Pondělí\", \"Úterý\", \"Středa\", \"Čtvrtek\", \"Pátek\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Marts\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Man\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uge\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny begivenhed\",\r\n\t\ticon_save: \"Gem\",\r\n\t\ticon_cancel: \"Fortryd\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Tilret\",\r\n\t\ticon_delete: \"Slet\",\r\n\t\tconfirm_closing: \"Dine rettelser vil gå tabt.. Er dy sikker?\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Bigivenheden vil blive slettet permanent. Er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du tilrette hele serien af gentagne begivenheder?\",\r\n\t\tsection_recurring: \"Gentag begivenhed\",\r\n\t\tbutton_recurring: \"Frakoblet\",\r\n\t\tbutton_recurring_open: \"Tilkoblet\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Rediger en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dagsorden\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dagsorden\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daglig\",\r\n\t\trepeat_radio_week: \"Ugenlig\",\r\n\t\trepeat_radio_month: \"Månedlig\",\r\n\t\trepeat_radio_year: \"Årlig\",\r\n\t\trepeat_radio_day_type: \"Hver\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"På hver arbejdsdag\",\r\n\t\trepeat_week: \" Gentager sig hver\",\r\n\t\trepeat_text_week_count: \"uge på følgende dage:\",\r\n\t\trepeat_radio_month_type: \"Hver den\",\r\n\t\trepeat_radio_month_start: \"Den\",\r\n\t\trepeat_text_month_day: \" i hver\",\r\n\t\trepeat_text_month_count: \"måned\",\r\n\t\trepeat_text_month_count2_before: \"hver\",\r\n\t\trepeat_text_month_count2_after: \"måned\",\r\n\t\trepeat_year_label: \"Den\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Ingen slutdato\",\r\n\t\trepeat_text_occurences_count: \"gentagelse\",\r\n\t\trepeat_radio_end2: \"Efter\",\r\n\t\trepeat_radio_end3: \"Slut\",\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"März\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Dezember\"],\r\n\t\tday_for_recurring: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\" Januar\", \" Februar\", \" März \", \" April\", \" Mai\", \" Juni\", \" Juli\", \" August\", \" September \", \" Oktober\", \" November \", \" Dezember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mär\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dez\"],\r\n\t\tday_full: [ \"Sonntag\", \"Montag\", \"Dienstag\", \" Mittwoch\", \" Donnerstag\", \"Freitag\", \"Samstag\"],\r\n\t\tday_short: [\"So\", \"Mo\", \"Di\", \"Mi\", \"Do\", \"Fr\", \"Sa\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Heute\",\r\n\t\tday_tab: \"Tag\",\r\n\t\tweek_tab: \"Woche\",\r\n\t\tmonth_tab: \"Monat\",\r\n\t\tnew_event: \"neuer Eintrag\",\r\n\t\ticon_save: \"Speichern\",\r\n\t\ticon_cancel: \"Abbrechen\",\r\n\t\ticon_details: \"Details\",\r\n\t\ticon_edit: \"Ändern\",\r\n\t\ticon_delete: \"Löschen\",\r\n\t\tconfirm_closing: \"\", //\"Ihre Veränderungen werden verloren sein, wollen Sie ergänzen? \"\r\n\t\tconfirm_deleting: \"Der Eintrag wird gelöscht\",\r\n\t\tsection_description: \"Beschreibung\",\r\n\t\tsection_time: \"Zeitspanne\",\r\n\t\tfull_day: \"Ganzer Tag\",\r\n\r\n\t\tconfirm_recurring: \"Wollen Sie alle Einträge bearbeiten oder nur diesen einzelnen Eintrag?\",\r\n\t\tsection_recurring: \"Wiederholung\",\r\n\t\tbutton_recurring: \"Aus\",\r\n\t\tbutton_recurring_open: \"An\",\r\n\t\tbutton_edit_series: \"Bearbeiten Sie die Serie\",\r\n\t\tbutton_edit_occurrence: \"Bearbeiten Sie eine Kopie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Beschreibung\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Jahre\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Täglich\",\r\n\t\trepeat_radio_week: \"Wöchentlich\",\r\n\t\trepeat_radio_month: \"Monatlich\",\r\n\t\trepeat_radio_year: \"Jährlich\",\r\n\t\trepeat_radio_day_type: \"jeden\",\r\n\t\trepeat_text_day_count: \"Tag\",\r\n\t\trepeat_radio_day_type2: \"an jedem Arbeitstag\",\r\n\t\trepeat_week: \" Wiederholt sich jede\",\r\n\t\trepeat_text_week_count: \"Woche am:\",\r\n\t\trepeat_radio_month_type: \"an jedem\",\r\n\t\trepeat_radio_month_start: \"am\",\r\n\t\trepeat_text_month_day: \"Tag eines jeden\",\r\n\t\trepeat_text_month_count: \"Monats\",\r\n\t\trepeat_text_month_count2_before: \"jeden\",\r\n\t\trepeat_text_month_count2_after: \"Monats\",\r\n\t\trepeat_year_label: \"am\",\r\n\t\tselect_year_day2: \"im\",\r\n\t\trepeat_text_year_day: \"Tag im\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"kein Enddatum\",\r\n\t\trepeat_text_occurences_count: \"Ereignissen\",\r\n\t\trepeat_radio_end3: \"Schluß\",\r\n\t\trepeat_radio_end2: \"nach\",\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"März\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Dezember\"],\r\n\t\tday_for_recurring: [\"Sonntag\", \"Montag\", \"Dienstag\", \"Mittwoch\", \"Donnerstag\", \"Freitag\", \"Samstag\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Ιανουάριος\", \"Φεβρουάριος\", \"Μάρτιος\", \"Απρίλιος\", \"Μάϊος\", \"Ιούνιος\", \"Ιούλιος\", \"Αύγουστος\", \"Σεπτέμβριος\", \"Οκτώβριος\", \"Νοέμβριος\", \"Δεκέμβριος\"],\r\n\t\tmonth_short: [\"ΙΑΝ\", \"ΦΕΒ\", \"ΜΑΡ\", \"ΑΠΡ\", \"ΜΑΙ\", \"ΙΟΥΝ\", \"ΙΟΥΛ\", \"ΑΥΓ\", \"ΣΕΠ\", \"ΟΚΤ\", \"ΝΟΕ\", \"ΔΕΚ\"],\r\n\t\tday_full: [\"Κυριακή\", \"Δευτέρα\", \"Τρίτη\", \"Τετάρτη\", \"Πέμπτη\", \"Παρασκευή\", \"Σάββατο\"],\r\n\t\tday_short: [\"ΚΥ\", \"ΔΕ\", \"ΤΡ\", \"ΤΕ\", \"ΠΕ\", \"ΠΑ\", \"ΣΑ\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Σήμερα\",\r\n\t\tday_tab: \"Ημέρα\",\r\n\t\tweek_tab: \"Εβδομάδα\",\r\n\t\tmonth_tab: \"Μήνας\",\r\n\t\tnew_event: \"Νέο έργο\",\r\n\t\ticon_save: \"Αποθήκευση\",\r\n\t\ticon_cancel: \"Άκυρο\",\r\n\t\ticon_details: \"Λεπτομέρειες\",\r\n\t\ticon_edit: \"Επεξεργασία\",\r\n\t\ticon_delete: \"Διαγραφή\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Το έργο θα διαγραφεί οριστικά. Θέλετε να συνεχίσετε;\",\r\n\t\tsection_description: \"Περιγραφή\",\r\n\t\tsection_time: \"Χρονική περίοδος\",\r\n\t\tfull_day: \"Πλήρης Ημέρα\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Θέλετε να επεξεργασθείτε ολόκληρη την ομάδα των επαναλαμβανόμενων έργων;\",\r\n\t\tsection_recurring: \"Επαναλαμβανόμενο έργο\",\r\n\t\tbutton_recurring: \"Ανενεργό\",\r\n\t\tbutton_recurring_open: \"Ενεργό\",\r\n\t\tbutton_edit_series: \"Επεξεργαστείτε τη σειρά\",\r\n\t\tbutton_edit_occurrence: \"Επεξεργασία ένα αντίγραφο\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Ημερήσια Διάταξη\",\r\n\t\tdate: \"Ημερομηνία\",\r\n\t\tdescription: \"Περιγραφή\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Έτος\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Ημερήσια Διάταξη\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Πλέγμα\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Ημερησίως\",\r\n\t\trepeat_radio_week: \"Εβδομαδιαίως\",\r\n\t\trepeat_radio_month: \"Μηνιαίως\",\r\n\t\trepeat_radio_year: \"Ετησίως\",\r\n\t\trepeat_radio_day_type: \"Κάθε\",\r\n\t\trepeat_text_day_count: \"ημέρα\",\r\n\t\trepeat_radio_day_type2: \"Κάθε εργάσιμη\",\r\n\t\trepeat_week: \" Επανάληψη κάθε\",\r\n\t\trepeat_text_week_count: \"εβδομάδα τις επόμενες ημέρες:\",\r\n\t\trepeat_radio_month_type: \"Επανάληψη\",\r\n\t\trepeat_radio_month_start: \"Την\",\r\n\t\trepeat_text_month_day: \"ημέρα κάθε\",\r\n\t\trepeat_text_month_count: \"μήνα\",\r\n\t\trepeat_text_month_count2_before: \"κάθε\",\r\n\t\trepeat_text_month_count2_after: \"μήνα\",\r\n\t\trepeat_year_label: \"Την\",\r\n\t\tselect_year_day2: \"του\",\r\n\t\trepeat_text_year_day: \"ημέρα\",\r\n\t\tselect_year_month: \"μήνα\",\r\n\t\trepeat_radio_end: \"Χωρίς ημερομηνία λήξεως\",\r\n\t\trepeat_text_occurences_count: \"επαναλήψεις\",\r\n\t\trepeat_radio_end3: \"Λήγει την\",\r\n\t\trepeat_radio_end2: \"Μετά από\",\r\n\t\tmonth_for_recurring: [\"Ιανουάριος\", \"Φεβρουάριος\", \"Μάρτιος\", \"Απρίλιος\", \"Μάϊος\", \"Ιούνιος\", \"Ιούλιος\", \"Αύγουστος\", \"Σεπτέμβριος\", \"Οκτώβριος\", \"Νοέμβριος\", \"Δεκέμβριος\"],\r\n\t\tday_for_recurring: [\"Κυριακή\", \"Δευτέρα\", \"Τρίτη\", \"Τετάρτη\", \"Πέμπτη\", \"Παρασκευή\", \"Σάββατο\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate:{\r\n\t\tmonth_full:[\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\r\n\t\tmonth_short:[\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\r\n\t\tday_full:[\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\r\n\t\tday_short:[\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"]\r\n\t},\r\n\tlabels:{\r\n\t\tdhx_cal_today_button:\"Today\",\r\n\t\tday_tab:\"Day\",\r\n\t\tweek_tab:\"Week\",\r\n\t\tmonth_tab:\"Month\",\r\n\t\tnew_event:\"New event\",\r\n\t\ticon_save:\"Save\",\r\n\t\ticon_cancel:\"Cancel\",\r\n\t\ticon_details:\"Details\",\r\n\t\ticon_edit:\"Edit\",\r\n\t\ticon_delete:\"Delete\",\r\n\t\tconfirm_closing:\"\",//Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting:\"Event will be deleted permanently, are you sure?\",\r\n\t\tsection_description:\"Description\",\r\n\t\tsection_time:\"Time period\",\r\n\t\tfull_day:\"Full day\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring:\"Do you want to edit the whole set of repeated events?\",\r\n\t\tsection_recurring:\"Repeat event\",\r\n\t\tbutton_recurring:\"Disabled\",\r\n\t\tbutton_recurring_open:\"Enabled\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Edit occurrence\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"Agenda\",\r\n\t\tdate:\"Date\",\r\n\t\tdescription:\"Description\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"Year\",\r\n\r\n\t\t/* week agenda extension */\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daily\",//name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Weekly\",//name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Monthly\",\r\n\t\trepeat_radio_year: \"Yearly\",\r\n\t\trepeat_radio_day_type: \"Every\",\r\n\t\trepeat_text_day_count: \"day\",\r\n\t\trepeat_radio_day_type2: \"Every workday\",\r\n\t\trepeat_week: \" Repeat every\",\r\n\t\trepeat_text_week_count: \"week next days:\",\r\n\t\trepeat_radio_month_type: \"Repeat\",\r\n\t\trepeat_radio_month_start: \"On\",\r\n\t\trepeat_text_month_day: \"day every\",\r\n\t\trepeat_text_month_count: \"month\",\r\n\t\trepeat_text_month_count2_before: \"every\",\r\n\t\trepeat_text_month_count2_after: \"month\",\r\n\t\trepeat_year_label: \"On\",\r\n\t\tselect_year_day2: \"of\",\r\n\t\trepeat_text_year_day: \"day\",\r\n\t\tselect_year_month: \"month\",\r\n\t\trepeat_radio_end: \"No end date\",\r\n\t\trepeat_text_occurences_count: \"occurrences\",\r\n\t\trepeat_radio_end2: \"After\",\r\n\t\trepeat_radio_end3: \"End by\",\r\n\t\tmonth_for_recurring: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"]//\r\n\t}\r\n};\r\n\r\n","/*\r\n @Autor Manuel Fernandez Panzuela - www.mfernandez.es\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Enero\", \"Febrero\", \"Marzo\", \"Abril\", \"Mayo\", \"Junio\", \"Julio\", \"Agosto\", \"Septiembre\", \"Octubre\", \"Noviembre\", \"Diciembre\"],\r\n\t\tmonth_short: [\"Ene\", \"Feb\", \"Mar\", \"Abr\", \"May\", \"Jun\", \"Jul\", \"Ago\", \"Sep\", \"Oct\", \"Nov\", \"Dic\"],\r\n\t\tday_full: [\"Domingo\", \"Lunes\", \"Martes\", \"Miércoles\", \"Jueves\", \"Viernes\", \"Sábado\"],\r\n\t\tday_short: [\"Dom\", \"Lun\", \"Mar\", \"Mié\", \"Jue\", \"Vie\", \"Sáb\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hoy\",\r\n\t\tday_tab: \"Día\",\r\n\t\tweek_tab: \"Semana\",\r\n\t\tmonth_tab: \"Mes\",\r\n\t\tnew_event: \"Nuevo evento\",\r\n\t\ticon_save: \"Guardar\",\r\n\t\ticon_cancel: \"Cancelar\",\r\n\t\ticon_details: \"Detalles\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Eliminar\",\r\n\t\tconfirm_closing: \"\", //\"Sus cambios se perderán, continuar ?\"\r\n\t\tconfirm_deleting: \"El evento se borrará definitivamente, ¿continuar?\",\r\n\t\tsection_description: \"Descripción\",\r\n\t\tsection_time: \"Período\",\r\n\t\tfull_day: \"Todo el día\",\r\n\r\n\t\tconfirm_recurring: \"¿Desea modificar el conjunto de eventos repetidos?\",\r\n\t\tsection_recurring: \"Repita el evento\",\r\n\t\tbutton_recurring: \"Impedido\",\r\n\t\tbutton_recurring_open: \"Permitido\",\r\n\t\tbutton_edit_series: \"Editar la serie\",\r\n\t\tbutton_edit_occurrence: \"Editar este evento\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Día\",\r\n\t\tdate: \"Fecha\",\r\n\t\tdescription: \"Descripción\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Año\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Día\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Reja\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Diariamente\",\r\n\t\trepeat_radio_week: \"Semanalmente\",\r\n\t\trepeat_radio_month: \"Mensualmente\",\r\n\t\trepeat_radio_year: \"Anualmente\",\r\n\t\trepeat_radio_day_type: \"Cada\",\r\n\t\trepeat_text_day_count: \"dia\",\r\n\t\trepeat_radio_day_type2: \"Cada jornada de trabajo\",\r\n\t\trepeat_week: \" Repetir cada\",\r\n\t\trepeat_text_week_count: \"semana:\",\r\n\t\trepeat_radio_month_type: \"Repita\",\r\n\t\trepeat_radio_month_start: \"El\",\r\n\t\trepeat_text_month_day: \"dia cada \",\r\n\t\trepeat_text_month_count: \"mes\",\r\n\t\trepeat_text_month_count2_before: \"cada\",\r\n\t\trepeat_text_month_count2_after: \"mes\",\r\n\t\trepeat_year_label: \"El\",\r\n\t\tselect_year_day2: \"del\",\r\n\t\trepeat_text_year_day: \"dia\",\r\n\t\tselect_year_month: \"mes\",\r\n\t\trepeat_radio_end: \"Sin fecha de finalización\",\r\n\t\trepeat_text_occurences_count: \"ocurrencias\",\r\n\t\trepeat_radio_end3: \"Fin\",\r\n\t\trepeat_radio_end2: \"Después de\",\r\n\t\tmonth_for_recurring: [\"Enero\", \"Febrero\", \"Маrzo\", \"Аbril\", \"Mayo\", \"Junio\", \"Julio\", \"Аgosto\", \"Setiembre\", \"Octubre\", \"Noviembre\", \"Diciembre\"],\r\n\t\tday_for_recurring: [\"Domingo\", \"Lunes\", \"Martes\", \"Miércoles\", \"Jeuves\", \"Viernes\", \"Sabado\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Tammikuu\", \"Helmikuu\", \"Maaliskuu\", \"Huhtikuu\", \"Toukokuu\", \"Kesäkuu\", \"Heinäkuu\", \"Elokuu\", \"Syyskuu\", \"Lokakuu\", \"Marraskuu\", \"Joulukuu\"],\r\n\t\tmonth_short: [\"Tam\", \"Hel\", \"Maa\", \"Huh\", \"Tou\", \"Kes\", \"Hei\", \"Elo\", \"Syy\", \"Lok\", \"Mar\", \"Jou\"],\r\n\t\tday_full: [\"Sunnuntai\", \"Maanantai\", \"Tiistai\", \"Keskiviikko\", \"Torstai\", \"Perjantai\", \"Lauantai\"],\r\n\t\tday_short: [\"Su\", \"Ma\", \"Ti\", \"Ke\", \"To\", \"Pe\", \"La\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Tänään\",\r\n\t\tday_tab: \"Päivä\",\r\n\t\tweek_tab: \"Viikko\",\r\n\t\tmonth_tab: \"Kuukausi\",\r\n\t\tnew_event: \"Uusi tapahtuma\",\r\n\t\ticon_save: \"Tallenna\",\r\n\t\ticon_cancel: \"Peru\",\r\n\t\ticon_details: \"Tiedot\",\r\n\t\ticon_edit: \"Muokkaa\",\r\n\t\ticon_delete: \"Poista\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Haluatko varmasti poistaa tapahtuman?\",\r\n\t\tsection_description: \"Kuvaus\",\r\n\t\tsection_time: \"Aikajakso\",\r\n\t\tfull_day: \"Koko päivä\",\r\n\r\n\t\tconfirm_recurring: \"Haluatko varmasti muokata toistuvan tapahtuman kaikkia jaksoja?\",\r\n\t\tsection_recurring: \"Toista tapahtuma\",\r\n\t\tbutton_recurring: \"Ei käytössä\",\r\n\t\tbutton_recurring_open: \"Käytössä\",\r\n\t\tbutton_edit_series: \"Muokkaa sarja\",\r\n\t\tbutton_edit_occurrence: \"Muokkaa kopio\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Esityslista\",\r\n\t\tdate: \"Päivämäärä\",\r\n\t\tdescription: \"Kuvaus\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Vuoden\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Esityslista\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Ritilä\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Luo uusi vetämällä\",\r\n\t\tdrag_to_move:\"Siirrä vetämällä\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Päivittäin\",\r\n\t\trepeat_radio_week: \"Viikoittain\",\r\n\t\trepeat_radio_month: \"Kuukausittain\",\r\n\t\trepeat_radio_year: \"Vuosittain\",\r\n\t\trepeat_radio_day_type: \"Joka\",\r\n\t\trepeat_text_day_count: \"päivä\",\r\n\t\trepeat_radio_day_type2: \"Joka arkipäivä\",\r\n\t\trepeat_week: \"Toista joka\",\r\n\t\trepeat_text_week_count: \"viikko näinä päivinä:\",\r\n\t\trepeat_radio_month_type: \"Toista\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \"päivänä joka\",\r\n\t\trepeat_text_month_count: \"kuukausi\",\r\n\t\trepeat_text_month_count2_before: \"joka\",\r\n\t\trepeat_text_month_count2_after: \"kuukausi\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"päivä\",\r\n\t\tselect_year_month: \"kuukausi\",\r\n\t\trepeat_radio_end: \"Ei loppumisaikaa\",\r\n\t\trepeat_text_occurences_count: \"Toiston jälkeen\",\r\n\t\trepeat_radio_end3: \"Loppuu\",\r\n\t\trepeat_radio_end2: \"\",\r\n\t\tmonth_for_recurring: [\"Tammikuu\", \"Helmikuu\", \"Maaliskuu\", \"Huhtikuu\", \"Toukokuu\", \"Kesäkuu\", \"Heinäkuu\", \"Elokuu\", \"Syyskuu\", \"Lokakuu\", \"Marraskuu\", \"Joulukuu\"],\r\n\t\tday_for_recurring: [\"Sunnuntai\", \"Maanantai\", \"Tiistai\", \"Keskiviikko\", \"Torstai\", \"Perjantai\", \"Lauantai\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Janvier\", \"Février\", \"Mars\", \"Avril\", \"Mai\", \"Juin\", \"Juillet\", \"Août\", \"Septembre\", \"Octobre\", \"Novembre\", \"Décembre\"],\r\n\t\tmonth_short: [\"Jan\", \"Fév\", \"Mar\", \"Avr\", \"Mai\", \"Juin\", \"Juil\", \"Aoû\", \"Sep\", \"Oct\", \"Nov\", \"Déc\"],\r\n\t\tday_full: [\"Dimanche\", \"Lundi\", \"Mardi\", \"Mercredi\", \"Jeudi\", \"Vendredi\", \"Samedi\"],\r\n\t\tday_short: [\"Dim\", \"Lun\", \"Mar\", \"Mer\", \"Jeu\", \"Ven\", \"Sam\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Aujourd'hui\",\r\n\t\tday_tab: \"Jour\",\r\n\t\tweek_tab: \"Semaine\",\r\n\t\tmonth_tab: \"Mois\",\r\n\t\tnew_event: \"Nouvel événement\",\r\n\t\ticon_save: \"Enregistrer\",\r\n\t\ticon_cancel: \"Annuler\",\r\n\t\ticon_details: \"Détails\",\r\n\t\ticon_edit: \"Modifier\",\r\n\t\ticon_delete: \"Effacer\",\r\n\t\tconfirm_closing: \"\", //Vos modifications seront perdus, êtes-vous sûr ?\r\n\t\tconfirm_deleting: \"L'événement sera effacé sans appel, êtes-vous sûr ?\",\r\n\t\tsection_description: \"Description\",\r\n\t\tsection_time: \"Période\",\r\n\t\tfull_day: \"Journée complète\",\r\n\r\n\t\tconfirm_recurring: \"Voulez-vous éditer toute une série d'évènements répétés?\",\r\n\t\tsection_recurring: \"Périodicité\",\r\n\t\tbutton_recurring: \"Désactivé\",\r\n\t\tbutton_recurring_open: \"Activé\",\r\n\t\tbutton_edit_series: \"Modifier la série\",\r\n\t\tbutton_edit_occurrence: \"Modifier une copie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Jour\",\r\n\t\tdate: \"Date\",\r\n\t\tdescription: \"Description\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Année\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Jour\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grille\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Quotidienne\",\r\n\t\trepeat_radio_week: \"Hebdomadaire\",\r\n\t\trepeat_radio_month: \"Mensuelle\",\r\n\t\trepeat_radio_year: \"Annuelle\",\r\n\t\trepeat_radio_day_type: \"Chaque\",\r\n\t\trepeat_text_day_count: \"jour\",\r\n\t\trepeat_radio_day_type2: \"Chaque journée de travail\",\r\n\t\trepeat_week: \" Répéter toutes les\",\r\n\t\trepeat_text_week_count: \"semaine:\",\r\n\t\trepeat_radio_month_type: \"Répéter\",\r\n\t\trepeat_radio_month_start: \"Le\",\r\n\t\trepeat_text_month_day: \"jour chaque\",\r\n\t\trepeat_text_month_count: \"mois\",\r\n\t\trepeat_text_month_count2_before: \"chaque\",\r\n\t\trepeat_text_month_count2_after: \"mois\",\r\n\t\trepeat_year_label: \"Le\",\r\n\t\tselect_year_day2: \"du\",\r\n\t\trepeat_text_year_day: \"jour\",\r\n\t\tselect_year_month: \"mois\",\r\n\t\trepeat_radio_end: \"Pas de date d"achèvement\",\r\n\t\trepeat_text_occurences_count: \"occurrences\",\r\n\t\trepeat_radio_end3: \"Fin\",\r\n\t\trepeat_radio_end2: \"Après\",\r\n\t\tmonth_for_recurring: [\"Janvier\", \"Février\", \"Mars\", \"Avril\", \"Mai\", \"Juin\", \"Juillet\", \"Août\", \"Septembre\", \"Octobre\", \"Novembre\", \"Décembre\"],\r\n\t\tday_for_recurring: [\"Dimanche\", \"Lundi\", \"Mardi\", \"Mercredi\", \"Jeudi\", \"Vendredi\", \"Samedi\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"ינואר\", \"פברואר\", \"מרץ\", \"אפריל\", \"מאי\", \"יוני\", \"יולי\", \"אוגוסט\", \"ספטמבר\", \"אוקטובר\", \"נובמבר\", \"דצמבר\"],\r\n\t\tmonth_short: [\"ינו\", \"פבר\", \"מרץ\", \"אפר\", \"מאי\", \"יונ\", \"יול\", \"אוג\", \"ספט\", \"אוק\", \"נוב\", \"דצמ\"],\r\n\t\tday_full: [\"ראשון\", \"שני\", \"שלישי\", \"רביעי\", \"חמישי\", \"שישי\", \"שבת\"],\r\n\t\tday_short: [\"א\", \"ב\", \"ג\", \"ד\", \"ה\", \"ו\", \"ש\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"היום\",\r\n\t\tday_tab: \"יום\",\r\n\t\tweek_tab: \"שבוע\",\r\n\t\tmonth_tab: \"חודש\",\r\n\t\tnew_event: \"ארוע חדש\",\r\n\t\ticon_save: \"שמור\",\r\n\t\ticon_cancel: \"בטל\",\r\n\t\ticon_details: \"פרטים\",\r\n\t\ticon_edit: \"ערוך\",\r\n\t\ticon_delete: \"מחק\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"ארוע ימחק סופית.להמשיך?\",\r\n\t\tsection_description: \"תיאור\",\r\n\t\tsection_time: \"תקופה\",\r\n\r\n\t\tconfirm_recurring: \"האם ברצונך לשנות כל סדרת ארועים מתמשכים?\",\r\n\t\tsection_recurring: \"להעתיק ארוע\",\r\n\t\tbutton_recurring: \"לא פעיל\",\r\n\t\tbutton_recurring_open: \"פעיל\",\r\n\t\tfull_day: \"יום שלם\",\r\n\t\tbutton_edit_series: \"ערוך את הסדרה\",\r\n\t\tbutton_edit_occurrence: \"עריכת עותק\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"סדר יום\",\r\n\t\tdate: \"תאריך\",\r\n\t\tdescription: \"תיאור\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"לשנה\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"סדר יום\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"סורג\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"גרור כדי להזיז\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"בטל\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"הבא\",\r\n\t\tprev: \"הקודם\",\r\n\t\tyear: \"שנה\",\r\n\t\tmonth: \"חודש\",\r\n\t\tday: \"יום\",\r\n\t\thour:\"שעה\",\r\n\t\tminute: \"דקה\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"יומי\",\r\n\t\trepeat_radio_week: \"שבועי\",\r\n\t\trepeat_radio_month: \"חודשי\",\r\n\t\trepeat_radio_year: \"שנתי\",\r\n\t\trepeat_radio_day_type: \"חזור כל\",\r\n\t\trepeat_text_day_count: \"ימים\",\r\n\t\trepeat_radio_day_type2: \"חזור כל יום עבודה\",\r\n\t\trepeat_week: \" חזור כל\",\r\n\t\trepeat_text_week_count: \"שבוע לפי ימים:\",\r\n\t\trepeat_radio_month_type: \"חזור כל\",\r\n\t\trepeat_radio_month_start: \"כל\",\r\n\t\trepeat_text_month_day: \"ימים כל\",\r\n\t\trepeat_text_month_count: \"חודשים\",\r\n\t\trepeat_text_month_count2_before: \"חזור כל\",\r\n\t\trepeat_text_month_count2_after: \"חודש\",\r\n\t\trepeat_year_label: \"כל\",\r\n\t\tselect_year_day2: \"בחודש\",\r\n\t\trepeat_text_year_day: \"ימים\",\r\n\t\tselect_year_month: \"חודש\",\r\n\t\trepeat_radio_end: \"לעולם לא מסתיים\",\r\n\t\trepeat_text_occurences_count: \"אירועים\",\r\n\t\trepeat_radio_end3: \"מסתיים ב\",\r\n\t\trepeat_radio_end2: \"אחרי\",\r\n\t\tmonth_for_recurring: [\"ינואר\", \"פברואר\", \"מרץ\", \"אפריל\", \"מאי\", \"יוני\", \"יולי\", \"אוגוסט\", \"ספטמבר\", \"אוקטובר\", \"נובמבר\", \"דצמבר\"],\r\n\t\tday_for_recurring: [\"ראשון\", \"שני\", \"שלישי\", \"רביעי\", \"חמישי\", \"שישי\", \"שבת\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Január\", \"Február\", \"Március\", \"Április\", \"Május\", \"Június\", \"Július\", \"Augusztus\", \"Szeptember\", \"Október\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Már\", \"Ápr\", \"Máj\", \"Jún\", \"Júl\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Vasárnap\", \"Hétfõ\", \"Kedd\", \"Szerda\", \"Csütörtök\", \"Péntek\", \"szombat\"],\r\n\t\tday_short: [\"Va\", \"Hé\", \"Ke\", \"Sze\", \"Csü\", \"Pé\", \"Szo\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Ma\",\r\n\t\tday_tab: \"Nap\",\r\n\t\tweek_tab: \"Hét\",\r\n\t\tmonth_tab: \"Hónap\",\r\n\t\tnew_event: \"Új esemény\",\r\n\t\ticon_save: \"Mentés\",\r\n\t\ticon_cancel: \"Mégse\",\r\n\t\ticon_details: \"Részletek\",\r\n\t\ticon_edit: \"Szerkesztés\",\r\n\t\ticon_delete: \"Törlés\",\r\n\t\tconfirm_closing: \"\", //A változások elvesznek, biztosan folytatja? \"\r\n\t\tconfirm_deleting: \"Az esemény törölve lesz, biztosan folytatja?\",\r\n\t\tsection_description: \"Leírás\",\r\n\t\tsection_time: \"Idõszak\",\r\n\t\tfull_day: \"Egesz napos\",\r\n\r\n\t\t/*ismétlõdõ események*/\r\n\t\tconfirm_recurring: \"Biztosan szerkeszteni akarod az összes ismétlõdõ esemény beállítását?\",\r\n\t\tsection_recurring: \"Esemény ismétlése\",\r\n\t\tbutton_recurring: \"Tiltás\",\r\n\t\tbutton_recurring_open: \"Engedélyezés\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Szerkesztés bíróság\",\r\n\r\n\t\t/*napirendi nézet*/\r\n\t\tagenda_tab: \"Napirend\",\r\n\t\tdate: \"Dátum\",\r\n\t\tdescription: \"Leírás\",\r\n\r\n\t\t/*éves nézet*/\r\n\t\tyear_tab: \"Év\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Maret\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Agustus\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mei\", \"Jun\", \"Jul\", \"Ags\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Minggu\", \"Senin\", \"Selasa\", \"Rabu\", \"Kamis\", \"Jumat\", \"Sabtu\"],\r\n\t\tday_short: [\"Ming\", \"Sen\", \"Sel\", \"Rab\", \"Kam\", \"Jum\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hari Ini\",\r\n\t\tday_tab: \"Hari\",\r\n\t\tweek_tab: \"Minggu\",\r\n\t\tmonth_tab: \"Bulan\",\r\n\t\tnew_event: \"Acara Baru\",\r\n\t\ticon_save: \"Simpan\",\r\n\t\ticon_cancel: \"Batal\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edit\",\r\n\t\ticon_delete: \"Hapus\",\r\n\t\tconfirm_closing: \"\", /*Perubahan tidak akan disimpan ?*/\r\n\t\tconfirm_deleting: \"Acara akan dihapus\",\r\n\t\tsection_description: \"Keterangan\",\r\n\t\tsection_time: \"Periode\",\r\n\t\tfull_day: \"Hari penuh\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Apakah acara ini akan berulang?\",\r\n\t\tsection_recurring: \"Acara Rutin\",\r\n\t\tbutton_recurring: \"Tidak Difungsikan\",\r\n\t\tbutton_recurring_open: \"Difungsikan\",\r\n\t\tbutton_edit_series: \"Mengedit seri\",\r\n\t\tbutton_edit_occurrence: \"Mengedit salinan\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Tanggal\",\r\n\t\tdescription: \"Keterangan\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Tahun\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabel\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Gennaio\", \"Febbraio\", \"Marzo\", \"Aprile\", \"Maggio\", \"Giugno\", \"Luglio\", \"Agosto\", \"Settembre\", \"Ottobre\", \"Novembre\", \"Dicembre\"],\r\n\t\tmonth_short: [\"Gen\", \"Feb\", \"Mar\", \"Apr\", \"Mag\", \"Giu\", \"Lug\", \"Ago\", \"Set\", \"Ott\", \"Nov\", \"Dic\"],\r\n\t\tday_full: [\"Domenica\", \"Lunedì\", \"Martedì\", \"Mercoledì\", \"Giovedì\", \"Venerdì\", \"Sabato\"],\r\n\t\tday_short: [\"Dom\", \"Lun\", \"Mar\", \"Mer\", \"Gio\", \"Ven\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Oggi\",\r\n\t\tday_tab: \"Giorno\",\r\n\t\tweek_tab: \"Settimana\",\r\n\t\tmonth_tab: \"Mese\",\r\n\t\tnew_event: \"Nuovo evento\",\r\n\t\ticon_save: \"Salva\",\r\n\t\ticon_cancel: \"Chiudi\",\r\n\t\ticon_details: \"Dettagli\",\r\n\t\ticon_edit: \"Modifica\",\r\n\t\ticon_delete: \"Elimina\",\r\n\t\tconfirm_closing: \"\", //Le modifiche apportate saranno perse, siete sicuri?\r\n\t\tconfirm_deleting: \"L'evento sarà eliminato, siete sicuri?\",\r\n\t\tsection_description: \"Descrizione\",\r\n\t\tsection_time: \"Periodo di tempo\",\r\n\t\tfull_day: \"Intera giornata\",\r\n\r\n\t\tconfirm_recurring: \"Vuoi modificare l'intera serie di eventi?\",\r\n\t\tsection_recurring: \"Ripetere l'evento\",\r\n\t\tbutton_recurring: \"Disattivato\",\r\n\t\tbutton_recurring_open: \"Attivato\",\r\n\t\tbutton_edit_series: \"Modificare la serie\",\r\n\t\tbutton_edit_occurrence: \"Modificare una copia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descrizione\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Anno\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Griglia\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Quotidiano\",\r\n\t\trepeat_radio_week: \"Settimanale\",\r\n\t\trepeat_radio_month: \"Mensile\",\r\n\t\trepeat_radio_year: \"Annuale\",\r\n\t\trepeat_radio_day_type: \"Ogni\",\r\n\t\trepeat_text_day_count: \"giorno\",\r\n\t\trepeat_radio_day_type2: \"Ogni giornata lavorativa\",\r\n\t\trepeat_week: \" Ripetere ogni\",\r\n\t\trepeat_text_week_count: \"settimana:\",\r\n\t\trepeat_radio_month_type: \"Ripetere\",\r\n\t\trepeat_radio_month_start: \"Il\",\r\n\t\trepeat_text_month_day: \"giorno ogni\",\r\n\t\trepeat_text_month_count: \"mese\",\r\n\t\trepeat_text_month_count2_before: \"ogni\",\r\n\t\trepeat_text_month_count2_after: \"mese\",\r\n\t\trepeat_year_label: \"Il\",\r\n\t\tselect_year_day2: \"del\",\r\n\t\trepeat_text_year_day: \"giorno\",\r\n\t\tselect_year_month: \"mese\",\r\n\t\trepeat_radio_end: \"Senza data finale\",\r\n\t\trepeat_text_occurences_count: \"occorenze\",\r\n\t\trepeat_radio_end3: \"Fine\",\r\n\t\trepeat_radio_end2: \"Dopo\",\r\n\t\tmonth_for_recurring: [\"Gennaio\", \"Febbraio\", \"Marzo\", \"Aprile\", \"Maggio\", \"Jiugno\", \"Luglio\", \"Agosto\", \"Settembre\", \"Ottobre\", \"Novembre\", \"Dicembre\"],\r\n\t\tday_for_recurring: [\"Domenica\", \"Lunedì\", \"Martedì\", \"Mercoledì\", \"Jovedì\", \"Venerdì\", \"Sabato\"]\r\n\t}\r\n};\r\n","/*\r\n Translation by Genexus Japan Inc.\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tmonth_short: [ \"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tday_full: [\"日曜日\", \"月曜日\", \"火曜日\", \"水曜日\", \"木曜日\", \"金曜日\", \"土曜日\"],\r\n\t\tday_short: [\"日\", \"月\", \"火\", \"水\", \"木\", \"金\", \"土\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"今日\",\r\n\t\tday_tab: \"日\",\r\n\t\tweek_tab: \"週\",\r\n\t\tmonth_tab: \"月\",\r\n\t\tnew_event: \"新イベント\",\r\n\t\ticon_save: \"保存\",\r\n\t\ticon_cancel: \"キャンセル\",\r\n\t\ticon_details: \"詳細\",\r\n\t\ticon_edit: \"編集\",\r\n\t\ticon_delete: \"削除\",\r\n\t\tconfirm_closing: \"\", //変更が取り消されます、宜しいですか?\r\n\t\tconfirm_deleting: \"イベント完全に削除されます、宜しいですか?\",\r\n\t\tsection_description: \"デスクリプション\",\r\n\t\tsection_time: \"期間\",\r\n\t\tconfirm_recurring: \"繰り返されているイベントを全て編集しますか?\",\r\n\t\tsection_recurring: \"イベントを繰り返す\",\r\n\t\tbutton_recurring: \"無効\",\r\n\t\tbutton_recurring_open: \"有効\",\r\n\t\tfull_day: \"終日\",\r\n\t\tbutton_edit_series: \"シリーズを編集します\",\r\n\t\tbutton_edit_occurrence: \"コピーを編集\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"議題は\",\r\n\t\tdate: \"日付\",\r\n\t\tdescription: \"説明\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"今年\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"議題は\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"グリッド\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};\r\n\r\n\r\n","export default class LocaleManager{\r\n\tconstructor(config){\r\n\t\tthis._locales = {};\r\n\t\tfor(const i in config){\r\n\t\t\tthis._locales[i] = config[i];\r\n\t\t}\r\n\t}\r\n\r\n\taddLocale(name, locale) {\r\n\t\tthis._locales[name] = locale;\r\n\t}\r\n\r\n\tgetLocale(name) {\r\n\t\treturn this._locales[name];\r\n\t}\r\n}","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Mon\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"I dag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uke\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny hendelse\",\r\n\t\ticon_save: \"Lagre\",\r\n\t\ticon_cancel: \"Avbryt\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Rediger\",\r\n\t\ticon_delete: \"Slett\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Hendelsen vil bli slettet permanent. Er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du forandre hele dette settet av repeterende hendelser?\",\r\n\t\tsection_recurring: \"Repeter hendelsen\",\r\n\t\tbutton_recurring: \"Av\",\r\n\t\tbutton_recurring_open: \"På\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Redigere en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daglig\",\r\n\t\trepeat_radio_week: \"Ukentlig\",\r\n\t\trepeat_radio_month: \"Månedlig\",\r\n\t\trepeat_radio_year: \"Årlig\",\r\n\t\trepeat_radio_day_type: \"Hver\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"Alle hverdager\",\r\n\t\trepeat_week: \" Gjentas hver\",\r\n\t\trepeat_text_week_count: \"uke på:\",\r\n\t\trepeat_radio_month_type: \"På hver\",\r\n\t\trepeat_radio_month_start: \"På\",\r\n\t\trepeat_text_month_day: \"dag hver\",\r\n\t\trepeat_text_month_count: \"måned\",\r\n\t\trepeat_text_month_count2_before: \"hver\",\r\n\t\trepeat_text_month_count2_after: \"måned\",\r\n\t\trepeat_year_label: \"på\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Ingen sluttdato\",\r\n\t\trepeat_text_occurences_count: \"forekomst\",\r\n\t\trepeat_radio_end3: \"Stop den\",\r\n\t\trepeat_radio_end2: \"Etter\",\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tday_for_recurring: [\"Sondag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Maart\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Augustus\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"mrt\", \"Apr\", \"Mei\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Zondag\", \"Maandag\", \"Dinsdag\", \"Woensdag\", \"Donderdag\", \"Vrijdag\", \"Zaterdag\"],\r\n\t\tday_short: [\"Zo\", \"Ma\", \"Di\", \"Wo\", \"Do\", \"Vr\", \"Za\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Vandaag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Week\",\r\n\t\tmonth_tab: \"Maand\",\r\n\t\tnew_event: \"Nieuw item\",\r\n\t\ticon_save: \"Opslaan\",\r\n\t\ticon_cancel: \"Annuleren\",\r\n\t\ticon_details: \"Details\",\r\n\t\ticon_edit: \"Bewerken\",\r\n\t\ticon_delete: \"Verwijderen\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Item zal permanent worden verwijderd, doorgaan?\",\r\n\t\tsection_description: \"Beschrijving\",\r\n\t\tsection_time: \"Tijd periode\",\r\n\t\tfull_day: \"Hele dag\",\r\n\r\n\t\tconfirm_recurring: \"Wilt u alle terugkerende items bijwerken?\",\r\n\t\tsection_recurring: \"Item herhalen\",\r\n\t\tbutton_recurring: \"Uit\",\r\n\t\tbutton_recurring_open: \"Aan\",\r\n\t\tbutton_edit_series: \"Bewerk de serie\",\r\n\t\tbutton_edit_occurrence: \"Bewerk een kopie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Omschrijving\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Jaar\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabel\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Dagelijks\",\r\n\t\trepeat_radio_week: \"Wekelijks\",\r\n\t\trepeat_radio_month: \"Maandelijks\",\r\n\t\trepeat_radio_year: \"Jaarlijks\",\r\n\t\trepeat_radio_day_type: \"Elke\",\r\n\t\trepeat_text_day_count: \"dag(en)\",\r\n\t\trepeat_radio_day_type2: \"Elke werkdag\",\r\n\t\trepeat_week: \" Herhaal elke\",\r\n\t\trepeat_text_week_count: \"week op de volgende dagen:\",\r\n\t\trepeat_radio_month_type: \"Herhaal\",\r\n\t\trepeat_radio_month_start: \"Op\",\r\n\t\trepeat_text_month_day: \"dag iedere\",\r\n\t\trepeat_text_month_count: \"maanden\",\r\n\t\trepeat_text_month_count2_before: \"iedere\",\r\n\t\trepeat_text_month_count2_after: \"maanden\",\r\n\t\trepeat_year_label: \"Op\",\r\n\t\tselect_year_day2: \"van\",\r\n\t\trepeat_text_year_day: \"dag\",\r\n\t\tselect_year_month: \"maand\",\r\n\t\trepeat_radio_end: \"Geen eind datum\",\r\n\t\trepeat_text_occurences_count: \"keren\",\r\n\t\trepeat_radio_end3: \"Eindigd per\",\r\n\t\trepeat_radio_end2: \"Na\",\r\n\t\tmonth_for_recurring: [\"Januari\", \"Februari\", \"Maart\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Augustus\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Zondag\", \"Maandag\", \"Dinsdag\", \"Woensdag\", \"Donderdag\", \"Vrijdag\", \"Zaterdag\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Man\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uke\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny\",\r\n\t\ticon_save: \"Lagre\",\r\n\t\ticon_cancel: \"Avbryt\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Endre\",\r\n\t\ticon_delete: \"Slett\",\r\n\t\tconfirm_closing: \"Endringer blir ikke lagret, er du sikker?\", //Endringer blir ikke lagret, er du sikker?\r\n\t\tconfirm_deleting: \"Oppføringen vil bli slettet, er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\t\tfull_day: \"Full dag\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du endre hele settet med repeterende oppføringer?\",\r\n\t\tsection_recurring: \"Repeterende oppføring\",\r\n\t\tbutton_recurring: \"Ikke aktiv\",\r\n\t\tbutton_recurring_open: \"Aktiv\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Redigere en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Styczeń\", \"Luty\", \"Marzec\", \"Kwiecień\", \"Maj\", \"Czerwiec\", \"Lipiec\", \"Sierpień\", \"Wrzesień\", \"Październik\", \"Listopad\", \"Grudzień\"],\r\n\t\tmonth_short: [\"Sty\", \"Lut\", \"Mar\", \"Kwi\", \"Maj\", \"Cze\", \"Lip\", \"Sie\", \"Wrz\", \"Paź\", \"Lis\", \"Gru\"],\r\n\t\tday_full: [\"Niedziela\", \"Poniedziałek\", \"Wtorek\", \"Środa\", \"Czwartek\", \"Piątek\", \"Sobota\"],\r\n\t\tday_short: [\"Nie\", \"Pon\", \"Wto\", \"Śro\", \"Czw\", \"Pią\", \"Sob\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dziś\",\r\n\t\tday_tab: \"Dzień\",\r\n\t\tweek_tab: \"Tydzień\",\r\n\t\tmonth_tab: \"Miesiąc\",\r\n\t\tnew_event: \"Nowe zdarzenie\",\r\n\t\ticon_save: \"Zapisz\",\r\n\t\ticon_cancel: \"Anuluj\",\r\n\t\ticon_details: \"Szczegóły\",\r\n\t\ticon_edit: \"Edytuj\",\r\n\t\ticon_delete: \"Usuń\",\r\n\t\tconfirm_closing: \"\", //Zmiany zostaną usunięte, jesteś pewien?\r\n\t\tconfirm_deleting: \"Zdarzenie zostanie usunięte na zawsze, kontynuować?\",\r\n\t\tsection_description: \"Opis\",\r\n\t\tsection_time: \"Okres czasu\",\r\n\t\tfull_day: \"Cały dzień\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Czy chcesz edytować cały zbiór powtarzających się zdarzeń?\",\r\n\t\tsection_recurring: \"Powtórz zdarzenie\",\r\n\t\tbutton_recurring: \"Nieaktywne\",\r\n\t\tbutton_recurring_open: \"Aktywne\",\r\n\t\tbutton_edit_series: \"Edytuj serię\",\r\n\t\tbutton_edit_occurrence: \"Edytuj kopię\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Opis\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabela\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Codziennie\",\r\n\t\trepeat_radio_week: \"Co tydzie\",\r\n\t\trepeat_radio_month: \"Co miesic\",\r\n\t\trepeat_radio_year: \"Co rok\",\r\n\t\trepeat_radio_day_type: \"Kadego\",\r\n\t\trepeat_text_day_count: \"dnia\",\r\n\t\trepeat_radio_day_type2: \"Kadego dnia roboczego\",\r\n\t\trepeat_week: \" Powtarzaj kadego\",\r\n\t\trepeat_text_week_count: \"tygodnia w dni:\",\r\n\t\trepeat_radio_month_type: \"Powtrz\",\r\n\t\trepeat_radio_month_start: \"W\",\r\n\t\trepeat_text_month_day: \"dnia kadego\",\r\n\t\trepeat_text_month_count: \"miesica\",\r\n\t\trepeat_text_month_count2_before: \"kadego\",\r\n\t\trepeat_text_month_count2_after: \"miesica\",\r\n\t\trepeat_year_label: \"W\",\r\n\t\tselect_year_day2: \"miesica\",\r\n\t\trepeat_text_year_day: \"dnia miesica\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Bez daty kocowej\",\r\n\t\trepeat_text_occurences_count: \"wystpieniu/ach\",\r\n\t\trepeat_radio_end3: \"Zakocz w\",\r\n\t\trepeat_radio_end2: \"Po\",\r\n\t\tmonth_for_recurring: [\"Stycznia\", \"Lutego\", \"Marca\", \"Kwietnia\", \"Maja\", \"Czerwca\", \"Lipca\", \"Sierpnia\", \"Wrzenia\", \"Padziernka\", \"Listopada\", \"Grudnia\"],\r\n\t\tday_for_recurring: [\"Niedziela\", \"Poniedziaek\", \"Wtorek\", \"roda\", \"Czwartek\", \"Pitek\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","/*\r\n\r\n TRANSLATION BY MATTHEUS PIROVANI RORIZ GONЗALVES\r\n\r\n mattheusroriz@hotmail.com / mattheus.pirovani@gmail.com /\r\n\r\n www.atrixian.com.br\r\n\r\n */\r\n\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Janeiro\", \"Fevereiro\", \"Março\", \"Abril\", \"Maio\", \"Junho\", \"Julho\", \"Agosto\", \"Setembro\", \"Outubro\", \"Novembro\", \"Dezembro\"],\r\n\t\tmonth_short: [\"Jan\", \"Fev\", \"Mar\", \"Abr\", \"Mai\", \"Jun\", \"Jul\", \"Ago\", \"Set\", \"Out\", \"Nov\", \"Dez\"],\r\n\t\tday_full: [\"Domingo\", \"Segunda\", \"Terça\", \"Quarta\", \"Quinta\", \"Sexta\", \"Sábado\"],\r\n\t\tday_short: [\"Dom\", \"Seg\", \"Ter\", \"Qua\", \"Qui\", \"Sex\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hoje\",\r\n\t\tday_tab: \"Dia\",\r\n\t\tweek_tab: \"Semana\",\r\n\t\tmonth_tab: \"Mês\",\r\n\t\tnew_event: \"Novo evento\",\r\n\t\ticon_save: \"Salvar\",\r\n\t\ticon_cancel: \"Cancelar\",\r\n\t\ticon_details: \"Detalhes\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Deletar\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Tem certeza que deseja excluir?\",\r\n\t\tsection_description: \"Descrição\",\r\n\t\tsection_time: \"Período de tempo\",\r\n\t\tfull_day: \"Dia inteiro\",\r\n\r\n\t\tconfirm_recurring: \"Deseja editar todos esses eventos repetidos?\",\r\n\t\tsection_recurring: \"Repetir evento\",\r\n\t\tbutton_recurring: \"Desabilitar\",\r\n\t\tbutton_recurring_open: \"Habilitar\",\r\n\t\tbutton_edit_series: \"Editar a série\",\r\n\t\tbutton_edit_occurrence: \"Editar uma cópia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dia\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descrição\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Ano\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dia\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grade\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Diário\",\r\n\t\trepeat_radio_week: \"Semanal\",\r\n\t\trepeat_radio_month: \"Mensal\",\r\n\t\trepeat_radio_year: \"Anual\",\r\n\t\trepeat_radio_day_type: \"Cada\",\r\n\t\trepeat_text_day_count: \"dia(s)\",\r\n\t\trepeat_radio_day_type2: \"Cada trabalho diário\",\r\n\t\trepeat_week: \" Repita cada\",\r\n\t\trepeat_text_week_count: \"semana:\",\r\n\t\trepeat_radio_month_type: \"Repetir\",\r\n\t\trepeat_radio_month_start: \"Em\",\r\n\t\trepeat_text_month_day: \"todo dia\",\r\n\t\trepeat_text_month_count: \"mês\",\r\n\t\trepeat_text_month_count2_before: \"todo\",\r\n\t\trepeat_text_month_count2_after: \"mês\",\r\n\t\trepeat_year_label: \"Em\",\r\n\t\tselect_year_day2: \"of\",\r\n\t\trepeat_text_year_day: \"dia\",\r\n\t\tselect_year_month: \"mês\",\r\n\t\trepeat_radio_end: \"Sem data final\",\r\n\t\trepeat_text_occurences_count: \"ocorrências\",\r\n\t\trepeat_radio_end3: \"Fim\",\r\n\t\trepeat_radio_end2: \"Depois\",\r\n\t\tmonth_for_recurring: [\"Janeiro\", \"Fevereiro\", \"Março\", \"Abril\", \"Maio\", \"Junho\", \"Julho\", \"Agosto\", \"Setembro\", \"Outubro\", \"Novembro\", \"Dezembro\"],\r\n\t\tday_for_recurring: [\"Domingo\", \"Segunda\", \"Terça\", \"Quarta\", \"Quinta\", \"Sexta\", \"Sábado\"]\r\n\t}\r\n};\r\n\r\n\r\n","/*\r\n\tTraducere de Ovidiu Lixandru: http://www.madball.ro\r\n */\r\n\r\nexport default {\r\n\tdate:{\r\n\t\tmonth_full:[\"Ianuarie\", \"Februarie\", \"Martie\", \"Aprilie\", \"Mai\", \"Iunie\", \"Iulie\", \"August\", \"Septembrie\", \"Octombrie\", \"November\", \"December\"],\r\n\t\tmonth_short:[\"Ian\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Iun\", \"Iul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\r\n\t\tday_full:[\"Duminica\", \"Luni\", \"Marti\", \"Miercuri\", \"Joi\", \"Vineri\", \"Sambata\"],\r\n\t\tday_short:[\"Du\", \"Lu\", \"Ma\", \"Mi\", \"Jo\", \"Vi\", \"Sa\"]\r\n\t},\r\n\tlabels:{\r\n\t\tdhx_cal_today_button:\"Astazi\",\r\n\t\tday_tab:\"Zi\",\r\n\t\tweek_tab:\"Saptamana\",\r\n\t\tmonth_tab:\"Luna\",\r\n\t\tnew_event:\"Eveniment nou\",\r\n\t\ticon_save:\"Salveaza\",\r\n\t\ticon_cancel:\"Anuleaza\",\r\n\t\ticon_details:\"Detalii\",\r\n\t\ticon_edit:\"Editeaza\",\r\n\t\ticon_delete:\"Sterge\",\r\n\t\tconfirm_closing:\"Schimbarile nu vor fi salvate, esti sigur?\",//Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting:\"Evenimentul va fi sters permanent, esti sigur?\",\r\n\t\tsection_description:\"Descriere\",\r\n\t\tsection_time:\"Interval\",\r\n\t\tfull_day:\"Toata ziua\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring:\"Vrei sa editezi toata seria de evenimente repetate?\",\r\n\t\tsection_recurring:\"Repetare\",\r\n\t\tbutton_recurring:\"Dezactivata\",\r\n\t\tbutton_recurring_open:\"Activata\",\r\n\t\tbutton_edit_series: \"Editeaza serie\",\r\n\t\tbutton_edit_occurrence: \"Editeaza doar intrare\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"Agenda\",\r\n\t\tdate:\"Data\",\r\n\t\tdescription:\"Descriere\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"An\",\r\n\r\n\t\t/* week agenda extension */\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Lista\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Zilnic\",\r\n\t\trepeat_radio_week: \"Saptamanal\",\r\n\t\trepeat_radio_month: \"Lunar\",\r\n\t\trepeat_radio_year: \"Anual\",\r\n\t\trepeat_radio_day_type: \"La fiecare\",\r\n\t\trepeat_text_day_count: \"zi(le)\",\r\n\t\trepeat_radio_day_type2: \"Fiecare zi lucratoare\",\r\n\t\trepeat_week: \" Repeta la fiecare\",\r\n\t\trepeat_text_week_count: \"saptamana in urmatoarele zile:\",\r\n\t\trepeat_radio_month_type: \"Repeta in\",\r\n\t\trepeat_radio_month_start: \"In a\",\r\n\t\trepeat_text_month_day: \"zi la fiecare\",\r\n\t\trepeat_text_month_count: \"luni\",\r\n\t\trepeat_text_month_count2_before: \"la fiecare\",\r\n\t\trepeat_text_month_count2_after: \"luni\",\r\n\t\trepeat_year_label: \"In\",\r\n\t\tselect_year_day2: \"a lunii\",\r\n\t\trepeat_text_year_day: \"zi a lunii\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Fara data de sfarsit\",\r\n\t\trepeat_text_occurences_count: \"evenimente\",\r\n\t\trepeat_radio_end3: \"La data\",\r\n\t\trepeat_radio_end2: \"Dupa\",\r\n\t\tmonth_for_recurring: [\"Ianuarie\", \"Februarie\", \"Martie\", \"Aprilie\", \"Mai\", \"Iunie\", \"Iulie\", \"August\", \"Septembrie\", \"Octombrie\", \"Noiembrie\", \"Decembrie\"],\r\n\t\tday_for_recurring: [\"Duminica\", \"Luni\", \"Marti\", \"Miercuri\", \"Joi\", \"Vineri\", \"Sambata\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Январь\", \"Февраль\", \"Март\", \"Апрель\", \"Maй\", \"Июнь\", \"Июль\", \"Август\", \"Сентябрь\", \"Oктябрь\", \"Ноябрь\", \"Декабрь\"],\r\n\t\tmonth_short: [\"Янв\", \"Фев\", \"Maр\", \"Aпр\", \"Maй\", \"Июн\", \"Июл\", \"Aвг\", \"Сен\", \"Окт\", \"Ноя\", \"Дек\"],\r\n\t\tday_full: [ \"Воскресенье\", \"Понедельник\", \"Вторник\", \"Среда\", \"Четверг\", \"Пятница\", \"Суббота\"],\r\n\t\tday_short: [\"Вс\", \"Пн\", \"Вт\", \"Ср\", \"Чт\", \"Пт\", \"Сб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сегодня\",\r\n\t\tday_tab: \"День\",\r\n\t\tweek_tab: \"Неделя\",\r\n\t\tmonth_tab: \"Месяц\",\r\n\t\tnew_event: \"Новое событие\",\r\n\t\ticon_save: \"Сохранить\",\r\n\t\ticon_cancel: \"Отменить\",\r\n\t\ticon_details: \"Детали\",\r\n\t\ticon_edit: \"Изменить\",\r\n\t\ticon_delete: \"Удалить\",\r\n\t\tconfirm_closing: \"\", //Ваши изменения будут потеряны, продолжить?\r\n\t\tconfirm_deleting: \"Событие будет удалено безвозвратно, продолжить?\",\r\n\t\tsection_description: \"Описание\",\r\n\t\tsection_time: \"Период времени\",\r\n\t\tfull_day: \"Весь день\",\r\n\r\n\t\tconfirm_recurring: \"Вы хотите изменить всю серию повторяющихся событий?\",\r\n\t\tsection_recurring: \"Повторение\",\r\n\t\tbutton_recurring: \"Отключено\",\r\n\t\tbutton_recurring_open: \"Включено\",\r\n\t\tbutton_edit_series: \"Редактировать серию\",\r\n\t\tbutton_edit_occurrence: \"Редактировать экземпляр\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Список\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Описание\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Год\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Список\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Таблица\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"День\",\r\n\t\trepeat_radio_week: \"Неделя\",\r\n\t\trepeat_radio_month: \"Месяц\",\r\n\t\trepeat_radio_year: \"Год\",\r\n\t\trepeat_radio_day_type: \"Каждый\",\r\n\t\trepeat_text_day_count: \"день\",\r\n\t\trepeat_radio_day_type2: \"Каждый рабочий день\",\r\n\t\trepeat_week: \" Повторять каждую\",\r\n\t\trepeat_text_week_count: \"неделю , в:\",\r\n\t\trepeat_radio_month_type: \"Повторять\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" числа каждый \",\r\n\t\trepeat_text_month_count: \"месяц\",\r\n\t\trepeat_text_month_count2_before: \"каждый \",\r\n\t\trepeat_text_month_count2_after: \"месяц\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"день\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без даты окончания\",\r\n\t\trepeat_text_occurences_count: \"повторений\",\r\n\t\trepeat_radio_end3: \"До \",\r\n\t\trepeat_radio_end2: \"\",\r\n\t\tmonth_for_recurring: [\"Января\", \"Февраля\", \"Марта\", \"Апреля\", \"Мая\", \"Июня\", \"Июля\", \"Августа\", \"Сентября\", \"Октября\", \"Ноября\", \"Декабря\"],\r\n\t\tday_for_recurring: [\"Воскресенье\", \"Понедельник\", \"Вторник\", \"Среду\", \"Четверг\", \"Пятницу\", \"Субботу\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Marec\", \"April\", \"Maj\", \"Junij\", \"Julij\", \"Avgust\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Nedelja\", \"Ponedeljek\", \"Torek\", \"Sreda\", \"Četrtek\", \"Petek\", \"Sobota\"],\r\n\t\tday_short: [\"Ned\", \"Pon\", \"Tor\", \"Sre\", \"Čet\", \"Pet\", \"Sob\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Danes\",\r\n\t\tday_tab: \"Dan\",\r\n\t\tweek_tab: \"Teden\",\r\n\t\tmonth_tab: \"Mesec\",\r\n\t\tnew_event: \"Nov dogodek\",\r\n\t\ticon_save: \"Shrani\",\r\n\t\ticon_cancel: \"Prekliči\",\r\n\t\ticon_details: \"Podrobnosti\",\r\n\t\ticon_edit: \"Uredi\",\r\n\t\ticon_delete: \"Izbriši\",\r\n\t\tconfirm_closing: \"\", //Spremembe ne bodo shranjene. Želite nadaljevati ?\r\n\t\tconfirm_deleting: \"Dogodek bo izbrisan. Želite nadaljevati?\",\r\n\t\tsection_description: \"Opis\",\r\n\t\tsection_time: \"Časovni okvir\",\r\n\t\tfull_day: \"Ves dan\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Želite urediti celoten set ponavljajočih dogodkov?\",\r\n\t\tsection_recurring: \"Ponovi dogodek\",\r\n\t\tbutton_recurring: \"Onemogočeno\",\r\n\t\tbutton_recurring_open: \"Omogočeno\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Edit occurrence\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Zadeva\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Opis\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Leto\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Zadeva\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Miza\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Január\", \"Február\", \"Marec\", \"Apríl\", \"Máj\", \"Jún\", \"Júl\", \"August\", \"September\", \"Október\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Máj\", \"Jún\", \"Júl\", \"Aug\", \"Sept\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Nedeľa\", \"Pondelok\", \"Utorok\", \"Streda\", \"Štvrtok\", \"Piatok\", \"Sobota\"],\r\n\t\tday_short: [\"Ne\", \"Po\", \"Ut\", \"St\", \"Št\", \"Pi\", \"So\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dnes\",\r\n\t\tday_tab: \"Deň\",\r\n\t\tweek_tab: \"Týždeň\",\r\n\t\tmonth_tab: \"Mesiac\",\r\n\t\tnew_event: \"Nová udalosť\",\r\n\t\ticon_save: \"Uložiť\",\r\n\t\ticon_cancel: \"Späť\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edituj\",\r\n\t\ticon_delete: \"Zmazať\",\r\n\t\tconfirm_closing: \"Vaše zmeny nebudú uložené. Skutočne?\", //Vaše změny budou ztraceny, opravdu ?\r\n\t\tconfirm_deleting: \"Udalosť bude natrvalo vymazaná. Skutočne?\",\r\n\t\tsection_description: \"Poznámky\",\r\n\t\tsection_time: \"Doba platnosti\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Prajete si upraviť celú radu opakovaných udalostí?\",\r\n\t\tsection_recurring: \"Opakovanie udalosti\",\r\n\t\tbutton_recurring: \"Vypnuté\",\r\n\t\tbutton_recurring_open: \"Zapnuté\",\r\n\t\tbutton_edit_series: \"Upraviť opakovania\",\r\n\t\tbutton_edit_occurrence: \"Upraviť inštancie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Program\",\r\n\t\tdate: \"Dátum\",\r\n\t\tdescription: \"Poznámka\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\t\tfull_day: \"Celý deň\", // Full day\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Program\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Mriežka\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Denne\",\r\n\t\trepeat_radio_week: \"Týždenne\",\r\n\t\trepeat_radio_month: \"Mesaène\",\r\n\t\trepeat_radio_year: \"Roène\",\r\n\t\trepeat_radio_day_type: \"Každý\",\r\n\t\trepeat_text_day_count: \"deò\",\r\n\t\trepeat_radio_day_type2: \"Každý prac. deò\",\r\n\t\trepeat_week: \"Opakova každý\",\r\n\t\trepeat_text_week_count: \"týždeò v dòoch:\",\r\n\t\trepeat_radio_month_type: \"Opakova\",\r\n\t\trepeat_radio_month_start: \"On\",\r\n\t\trepeat_text_month_day: \"deò každý\",\r\n\t\trepeat_text_month_count: \"mesiac\",\r\n\t\trepeat_text_month_count2_before: \"každý\",\r\n\t\trepeat_text_month_count2_after: \"mesiac\",\r\n\t\trepeat_year_label: \"On\",\r\n\t\tselect_year_day2: \"poèas\",\r\n\t\trepeat_text_year_day: \"deò\",\r\n\t\tselect_year_month: \"mesiac\",\r\n\t\trepeat_radio_end: \"Bez dátumu ukonèenia\",\r\n\t\trepeat_text_occurences_count: \"udalostiach\",\r\n\t\trepeat_radio_end3: \"Ukonèi\",\r\n\t\trepeat_radio_end2: \"Po\",\r\n\t\tmonth_for_recurring: [\"Január\", \"Február\", \"Marec\", \"Apríl\", \"Máj\", \"Jún\", \"Júl\", \"August\", \"September\", \"Október\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Nede¾a\", \"Pondelok\", \"Utorok\", \"Streda\", \"Štvrtok\", \"Piatok\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Mars\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"Augusti\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Söndag\", \"Måndag\", \"Tisdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lördag\"],\r\n\t\tday_short: [\"Sön\", \"Mån\", \"Tis\", \"Ons\", \"Tor\", \"Fre\", \"Lör\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Vecka\",\r\n\t\tmonth_tab: \"Månad\",\r\n\t\tnew_event: \"Ny händelse\",\r\n\t\ticon_save: \"Spara\",\r\n\t\ticon_cancel: \"Ångra\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Ändra\",\r\n\t\ticon_delete: \"Ta bort\",\r\n\t\tconfirm_closing: \"\", //Dina förändingar kommer gå förlorade, är du säker?\r\n\t\tconfirm_deleting: \"Är du säker på att du vill ta bort händelsen permanent?\",\r\n\t\tsection_description: \"Beskrivning\",\r\n\t\tsection_time: \"Tid\",\r\n\t\tfull_day: \"Hela dagen\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vill du redigera hela serien med repeterande händelser?\",\r\n\t\tsection_recurring: \"Upprepa händelse\",\r\n\t\tbutton_recurring: \"Inaktiverat\",\r\n\t\tbutton_recurring_open: \"Aktiverat\",\r\n\t\tbutton_edit_series: \"Redigera serien\",\r\n\t\tbutton_edit_occurrence: \"Redigera en kopia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dagordning\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Beskrivning\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dagordning\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Galler\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Dra för att skapa ny\",\r\n\t\tdrag_to_move:\"Dra för att flytta\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Dagligen\",\r\n\t\trepeat_radio_week: \"Veckovis\",\r\n\t\trepeat_radio_month: \"Månadsvis\",\r\n\t\trepeat_radio_year: \"Årligen\",\r\n\t\trepeat_radio_day_type: \"Var\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"Varje arbetsdag\",\r\n\t\trepeat_week: \" Upprepa var\",\r\n\t\trepeat_text_week_count: \"vecka dessa dagar:\",\r\n\t\trepeat_radio_month_type: \"Upprepa\",\r\n\t\trepeat_radio_month_start: \"Den\",\r\n\t\trepeat_text_month_day: \"dagen var\",\r\n\t\trepeat_text_month_count: \"månad\",\r\n\t\trepeat_text_month_count2_before: \"var\",\r\n\t\trepeat_text_month_count2_after: \"månad\",\r\n\t\trepeat_year_label: \"Den\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"månad\",\r\n\t\trepeat_radio_end: \"Inget slutdatum\",\r\n\t\trepeat_text_occurences_count: \"upprepningar\",\r\n\t\trepeat_radio_end3: \"Sluta efter\",\r\n\t\trepeat_radio_end2: \"Efter\",\r\n\t\tmonth_for_recurring: [\"Januari\", \"Februari\", \"Mars\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"Augusti\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Söndag\", \"Måndag\", \"Tisdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lördag\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Ocak\", \"Þubat\", \"Mart\", \"Nisan\", \"Mayýs\", \"Haziran\", \"Temmuz\", \"Aðustos\", \"Eylül\", \"Ekim\", \"Kasým\", \"Aralýk\"],\r\n\t\tmonth_short: [\"Oca\", \"Þub\", \"Mar\", \"Nis\", \"May\", \"Haz\", \"Tem\", \"Aðu\", \"Eyl\", \"Eki\", \"Kas\", \"Ara\"],\r\n\t\tday_full: [\"Pazar\", \"Pazartes,\", \"Salý\", \"Çarþamba\", \"Perþembe\", \"Cuma\", \"Cumartesi\"],\r\n\t\tday_short: [\"Paz\", \"Pts\", \"Sal\", \"Çar\", \"Per\", \"Cum\", \"Cts\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Bugün\",\r\n\t\tday_tab: \"Gün\",\r\n\t\tweek_tab: \"Hafta\",\r\n\t\tmonth_tab: \"Ay\",\r\n\t\tnew_event: \"Uygun\",\r\n\t\ticon_save: \"Kaydet\",\r\n\t\ticon_cancel: \"Ýptal\",\r\n\t\ticon_details: \"Detaylar\",\r\n\t\ticon_edit: \"Düzenle\",\r\n\t\ticon_delete: \"Sil\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Etkinlik silinecek, devam?\",\r\n\t\tsection_description: \"Açýklama\",\r\n\t\tsection_time: \"Zaman aralýðý\",\r\n\t\tfull_day: \"Tam gün\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Tüm tekrar eden etkinlikler silinecek, devam?\",\r\n\t\tsection_recurring: \"Etkinliði tekrarla\",\r\n\t\tbutton_recurring: \"Pasif\",\r\n\t\tbutton_recurring_open: \"Aktif\",\r\n\t\tbutton_edit_series: \"Dizi düzenleme\",\r\n\t\tbutton_edit_occurrence: \"Bir kopyasını düzenleyin\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Ajanda\",\r\n\t\tdate: \"Tarih\",\r\n\t\tdescription: \"Açýklama\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Yýl\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Ajanda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Izgara\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Січень\", \"Лютий\", \"Березень\", \"Квітень\", \"Травень\", \"Червень\", \"Липень\", \"Серпень\", \"Вересень\", \"Жовтень\", \"Листопад\", \"Грудень\"],\r\n\t\tmonth_short: [\"Січ\", \"Лют\", \"Бер\", \"Кві\", \"Тра\", \"Чер\", \"Лип\", \"Сер\", \"Вер\", \"Жов\", \"Лис\", \"Гру\"],\r\n\t\tday_full: [\"Неділя\", \"Понеділок\", \"Вівторок\", \"Середа\", \"Четвер\", \"П'ятниця\", \"Субота\"],\r\n\t\tday_short: [\"Нед\", \"Пон\", \"Вів\", \"Сер\", \"Чет\", \"Птн\", \"Суб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сьогодні\",\r\n\t\tday_tab: \"День\",\r\n\t\tweek_tab: \"Тиждень\",\r\n\t\tmonth_tab: \"Місяць\",\r\n\t\tnew_event: \"Нова подія\",\r\n\t\ticon_save: \"Зберегти\",\r\n\t\ticon_cancel: \"Відміна\",\r\n\t\ticon_details: \"Деталі\",\r\n\t\ticon_edit: \"Редагувати\",\r\n\t\ticon_delete: \"Вилучити\",\r\n\t\tconfirm_closing: \"\", //Ваші зміни втратяться. Ви впевнені ?\r\n\t\tconfirm_deleting: \"Подія вилучиться назавжди. Ви впевнені?\",\r\n\t\tsection_description: \"Опис\",\r\n\t\tsection_time: \"Часовий проміжок\",\r\n\t\tfull_day: \"Весь день\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Хочете редагувати весь перелік повторюваних подій?\",\r\n\t\tsection_recurring: \"Повторювана подія\",\r\n\t\tbutton_recurring: \"Відключено\",\r\n\t\tbutton_recurring_open: \"Включено\",\r\n\t\tbutton_edit_series: \"Редагувати серію\",\r\n\t\tbutton_edit_occurrence: \"Редагувати примірник\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Перелік\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Опис\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Рік\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Перелік\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Таблиця\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"День\",\r\n\t\trepeat_radio_week: \"Тиждень\",\r\n\t\trepeat_radio_month: \"Місяць\",\r\n\t\trepeat_radio_year: \"Рік\",\r\n\t\trepeat_radio_day_type: \"Кожний\",\r\n\t\trepeat_text_day_count: \"день\",\r\n\t\trepeat_radio_day_type2: \"Кожний робочий день\",\r\n\t\trepeat_week: \" Повторювати кожен\",\r\n\t\trepeat_text_week_count: \"тиждень , по:\",\r\n\t\trepeat_radio_month_type: \"Повторювати\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" числа кожний \",\r\n\t\trepeat_text_month_count: \"місяць\",\r\n\t\trepeat_text_month_count2_before: \"кожен \",\r\n\t\trepeat_text_month_count2_after: \"місяць\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"день\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без дати закінчення\",\r\n\t\trepeat_text_occurences_count: \"повторень\",\r\n\t\trepeat_radio_end3: \"До \",\r\n\t\trepeat_radio_end2: \"\",\r\n\t\tmonth_for_recurring: [\"січня\", \"лютого\", \"березня\", \"квітня\", \"травня\", \"червня\", \"липня\", \"серпня\", \"вересня\", \"жовтня\", \"листопада\", \"грудня\"],\r\n\t\tday_for_recurring: [\"Неділям\", \"Понеділкам\", \"Вівторкам\", \"Середам\", \"Четвергам\", \"П'ятницям\", \"Суботам\"]\r\n\t}\r\n};\r\n","import ar from \"./locale_ar\";\r\nimport be from \"./locale_be\";\r\nimport ca from \"./locale_ca\";\r\nimport cn from \"./locale_cn\";\r\nimport cs from \"./locale_cs\";\r\nimport da from \"./locale_da\";\r\nimport de from \"./locale_de\";\r\nimport el from \"./locale_el\";\r\nimport en from \"./locale_en\";\r\nimport es from \"./locale_es\";\r\nimport fi from \"./locale_fi\";\r\nimport fr from \"./locale_fr\";\r\nimport he from \"./locale_he\";\r\nimport hu from \"./locale_hu\";\r\nimport id from \"./locale_id\";\r\nimport it from \"./locale_it\";\r\nimport jp from \"./locale_jp\";\r\n\r\nimport LocaleManager from \"./locale_manager\";\r\n\r\nimport nb from \"./locale_nb\";\r\nimport nl from \"./locale_nl\";\r\nimport no from \"./locale_no\";\r\nimport pl from \"./locale_pl\";\r\nimport pt from \"./locale_pt\";\r\nimport ro from \"./locale_ro\";\r\nimport ru from \"./locale_ru\";\r\nimport si from \"./locale_si\";\r\nimport sk from \"./locale_sk\";\r\nimport sv from \"./locale_sv\";\r\nimport tr from \"./locale_tr\";\r\nimport ua from \"./locale_ua\";\r\n\r\nexport default function(){\r\n\treturn new LocaleManager({\r\n\t\ten,\r\n\t\tar,\r\n\t\tbe,\r\n\t\tca,\r\n\t\tcn,\r\n\t\tcs,\r\n\t\tda,\r\n\t\tde,\r\n\t\tel,\r\n\t\tes,\r\n\t\tfi,\r\n\t\tfr,\r\n\t\the,\r\n\t\thu,\r\n\t\tid,\r\n\t\tit,\r\n\t\tjp,\r\n\t\tnb,\r\n\t\tnl,\r\n\t\tno,\r\n\t\tpl,\r\n\t\tpt,\r\n\t\tro,\r\n\t\tru,\r\n\t\tsi,\r\n\t\tsk,\r\n\t\tsv,\r\n\t\ttr,\r\n\t\tua\r\n\t});\r\n}","import eventable from \"../utils/eventable\";\r\n\r\nexport class DatePicker {\r\n\tconstructor(scheduler, container, state = {}) {\r\n\t\tthis.state = {\r\n\t\t\tdate: new Date(),\r\n\t\t\tmodes: ['days', 'months', 'years'],\r\n\t\t\tcurrentRange: [],\r\n\t\t\teventDates: [],\r\n\t\t\tcurrentModeIndex: 0,\r\n\t\t\t...state\r\n\t\t};\r\n\t\tthis.container = null;\r\n\t\tthis.element = null;\r\n\t\tthis.onStateChangeHandlers = [];\r\n\t\tthis.scheduler = scheduler;\r\n\t\tthis._domEvents = scheduler._createDomEventScope();\r\n\t\tthis.state = this.getState();\r\n\t\teventable(this);\r\n\t\tif(container){\r\n\r\n\t\t\tthis.container = container;\r\n\t\t\tthis.render(this.container);\r\n\t\t}\r\n\r\n\t\tthis.onStateChange((oldState, newState) => {\r\n\t\t\tthis.callEvent(\"onStateChange\", [newState, oldState]);\r\n\t\t});\r\n\t}\r\n\r\n\tgetState() {\r\n\t\treturn { \r\n\t\t\t...this.state,\r\n\t\t\tmode: this.state.modes[this.state.currentModeIndex]\r\n\t\t};\r\n\t}\r\n\r\n\tsetState(newState) {\r\n\t\tconst oldState = { ...this.state };\r\n\t\tif(newState.mode){\r\n\t\t\tnewState.currentModeIndex = this.state.modes.indexOf(newState.mode);\r\n\t\t}\r\n\t\tthis.state = { ...this.state, ...newState };\r\n\r\n\t\tthis._notifyStateChange(oldState, this.state);\r\n\r\n\t\tif (this.container) {\r\n\t\t\tthis.render(this.container);\r\n\t\t}\r\n\t}\r\n\r\n\tonStateChange(handler) {\r\n\t\tthis.onStateChangeHandlers.push(handler);\r\n\r\n\t\t// function to remove the handler\r\n\t\treturn () => {\r\n\t\t\tconst index = this.onStateChangeHandlers.indexOf(handler);\r\n\t\t\tif (index !== -1) {\r\n\t\t\t\tthis.onStateChangeHandlers.splice(index, 1);\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n\r\n\t_notifyStateChange(oldState, newState) {\r\n\t\tthis.onStateChangeHandlers.forEach(handler => handler(oldState, newState));\r\n\t}\r\n\r\n\t_adjustDate(direction) {\r\n\r\n\t\tconst {mode, date} = this.getState();\r\n\t\tconst newDate = new Date(date);\r\n\t\tif (mode === 'days') {\r\n\t\t\tnewDate.setMonth(date.getMonth() + direction);\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tnewDate.setFullYear(date.getFullYear() + direction);\r\n\t\t} else {\r\n\t\t\tnewDate.setFullYear(date.getFullYear() + direction * 10);\r\n\t\t}\r\n\t\tthis.setState({ date: newDate });\r\n\t}\r\n\r\n\t_toggleMode() {\r\n\t\tconst newIndex = (this.state.currentModeIndex + 1) % this.state.modes.length;\r\n\t\tthis.setState({ currentModeIndex: newIndex });\r\n\t}\r\n\r\n\t_renderCalendarHeader(container) {\r\n\t\tconst {mode, date} = this.getState();\r\n\r\n\t\tconst header = document.createElement('div');\r\n\t\theader.classList.add('dhx_cal_datepicker_header');\r\n\r\n\t\tconst backwardArrow = document.createElement('button');\r\n\r\n\t\tbackwardArrow.classList.add(\"dhx_cal_datepicker_arrow\", \"scheduler_icon\", \"arrow_left\");\r\n\t\theader.appendChild(backwardArrow);\r\n\r\n\t\tconst monthLabel = document.createElement('div');\r\n\t\tmonthLabel.classList.add('dhx_cal_datepicker_title');\r\n\r\n\t\tif (mode === 'days') {\r\n\t\t\tmonthLabel.innerText = date.toLocaleString('default', { month: 'long' }) + ' ' + date.getFullYear();\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tmonthLabel.innerText = date.getFullYear();\r\n\t\t} else {\r\n\t\t\tconst startYear = Math.floor(date.getFullYear() / 10) * 10;\r\n\t\t\tmonthLabel.innerText = `${startYear} - ${startYear + 9}`;\r\n\t\t}\r\n\r\n\t\tthis._domEvents.attach(monthLabel, \"click\", this._toggleMode.bind(this));\r\n\t\theader.appendChild(monthLabel);\r\n\r\n\t\tconst forwardArrow = document.createElement('button');\r\n\r\n\t\tforwardArrow.classList.add(\"dhx_cal_datepicker_arrow\", \"scheduler_icon\", \"arrow_right\");\r\n\t\theader.appendChild(forwardArrow);\r\n\r\n\t\tcontainer.appendChild(header);\r\n\r\n\t\tthis._domEvents.attach(backwardArrow, \"click\", this._adjustDate.bind(this, -1));\r\n\t\tthis._domEvents.attach(forwardArrow, \"click\", this._adjustDate.bind(this, 1));\r\n\t}\r\n\r\n\trender(container) {\r\n\t\tthis._domEvents.detachAll();\r\n\t\tthis.container = container || this.container; \r\n\t\tthis.container.innerHTML = '';\r\n\r\n\t\tif(!this.element){\r\n\t\t\tthis.element = document.createElement(\"div\");\r\n\t\t\tthis.element.classList.add(\"dhx_cal_datepicker\");\r\n\t\t}\r\n\t\tthis.element.innerHTML = '';\r\n\t\tthis.container.appendChild(this.element);\r\n\r\n\t\tthis._renderCalendarHeader(this.element);\r\n\t\tconst dataContainer = document.createElement(\"div\");\r\n\t\tdataContainer.classList.add(\"dhx_cal_datepicker_data\");\r\n\t\tthis.element.appendChild(dataContainer);\r\n\r\n\t\tconst {mode} = this.getState();\r\n\t\tif (mode === 'days') {\r\n\t\t\tthis._renderDayGrid(dataContainer);\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tthis._renderMonthGrid(dataContainer);\r\n\t\t} else {\r\n\t\t\tthis._renderYearGrid(dataContainer);\r\n\t\t}\r\n\t}\r\n\r\n\t_renderDayGridHeader(daysOfWeekContainer) {\r\n\t\tconst {date} = this.getState();\r\n\t\tconst scheduler = this.scheduler;\r\n\r\n\t\tlet currentDate = scheduler.date.week_start(new Date(date));\r\n\t\tconst maxDate = scheduler.date.add(scheduler.date.week_start(new Date(date)), 1, 'week');\r\n\r\n\t\tdaysOfWeekContainer.classList.add('dhx_cal_datepicker_days');\r\n\r\n\t\tconst labelFormat = scheduler.date.date_to_str(\"%D\");\r\n\r\n\t\twhile (currentDate.valueOf() < maxDate.valueOf()) {\r\n\t\t\tconst label = labelFormat(currentDate);\r\n\r\n\t\t\tconst dayElement = document.createElement('div');\r\n\t\t\tdayElement.setAttribute(\"data-day\", currentDate.getDay());\r\n\t\t\tdayElement.classList.add('dhx_cal_datepicker_dayname');\r\n\t\t\tdayElement.innerText = label;\r\n\t\t\tdaysOfWeekContainer.appendChild(dayElement);\r\n\r\n\t\t\tcurrentDate = scheduler.date.add(currentDate, 1, 'day');\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t_weeksBetween(min, max) {\r\n\t\tconst scheduler = this.scheduler;\r\n\t\tlet weeks = 0;\r\n\t\tlet currWeek = new Date(min);\r\n\t\twhile(currWeek.valueOf() < max.valueOf()){\r\n\t\t\tweeks += 1;\r\n\t\t\tcurrWeek = scheduler.date.week_start(scheduler.date.add(currWeek, 1, \"week\"));\r\n\t\t}\r\n\t\treturn weeks;\r\n\t}\r\n\r\n\t_renderDayGrid(container) {\r\n\t\tconst {date, currentRange, eventDates, minWeeks} = this.getState();\r\n\r\n\t\tlet minSchedulerDate = currentRange[0];\r\n\t\tlet maxSchedulerDate = currentRange[1];\r\n\r\n\t\tconst eventDaysTable = eventDates.reduce((acc, date) => {\r\n\t\t\tconst dayStart = this.scheduler.date.day_start(new Date(date));\r\n\t\t\tacc[dayStart.valueOf()] = true;\r\n\t\t\treturn acc;\r\n\t\t}, {});\r\n\r\n\r\n\t\t// Render Days of the Week\r\n\t\tconst daysOfWeekContainer = document.createElement('div');\r\n\t\tthis._renderDayGridHeader(daysOfWeekContainer);\r\n\t\tcontainer.appendChild(daysOfWeekContainer);\r\n\r\n\t\tconst scheduler = this.scheduler;\r\n\t\tconst firstDate = scheduler.date.week_start(scheduler.date.month_start(new Date(date)));\r\n\t\tconst monthStart = scheduler.date.month_start(new Date(date));\r\n\t\tconst monthEnd = scheduler.date.add(scheduler.date.month_start(new Date(date)), 1, 'month');\r\n\t\tlet lastDate = scheduler.date.add(scheduler.date.month_start(new Date(date)), 1, 'month');\r\n\t\tif(lastDate.getDay() !== 0){\r\n\t\t\tlastDate = scheduler.date.add(scheduler.date.week_start(lastDate), 1, \"week\");\r\n\t\t}\r\n\r\n\t\tlet weeks = this._weeksBetween(firstDate, lastDate);\r\n\t\tif(minWeeks && weeks < minWeeks){\r\n\t\t\tlastDate = scheduler.date.add(lastDate, (minWeeks - weeks), \"week\");\r\n\t\t}\r\n\r\n\t\tlet currDate = firstDate;\r\n\r\n\t\tconst dayGridContainer = document.createElement('div');\r\n\t\tdayGridContainer.classList.add('dhx_cal_datepicker_days');\r\n\r\n\t\tthis._domEvents.attach(dayGridContainer, \"click\", (event) => {\r\n\t\t\tconst dateCell = event.target.closest(\"[data-cell-date]\");\r\n\t\t\tconst date = new Date(dateCell.getAttribute(\"data-cell-date\"));\r\n\t\t\tthis.callEvent(\"onDateClick\", [date, event]);\r\n\t\t});\r\n\r\n\t\twhile(currDate.valueOf() < lastDate.valueOf()){\r\n\t\t\tconst dayElement = document.createElement('div');\r\n\t\t\tdayElement.setAttribute(\"data-cell-date\", scheduler.templates.format_date(currDate));\r\n\t\t\tdayElement.setAttribute(\"data-day\", currDate.getDay());\r\n\t\t\tdayElement.innerHTML = currDate.getDate();\r\n\r\n\t\t\tif(currDate.valueOf() < monthStart.valueOf()){\r\n\t\t\t\tdayElement.classList.add('dhx_before');\r\n\t\t\t}else if(currDate.valueOf() >= monthEnd.valueOf()){\t\r\n\t\t\t\tdayElement.classList.add('dhx_after');\r\n\t\t\t}\r\n\r\n\t\t\tif(currDate.getDay() === 0 || currDate.getDay() === 6){\r\n\t\t\t\tdayElement.classList.add(\"dhx_cal_datepicker_weekend\");\r\n\t\t\t}\r\n\r\n\t\t\tif(minSchedulerDate && maxSchedulerDate){\r\n\t\t\t\tif(currDate.valueOf() >= minSchedulerDate.valueOf() && currDate.valueOf() < maxSchedulerDate.valueOf()){\r\n\t\t\t\t\tdayElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(eventDaysTable[currDate.valueOf()]){\r\n\t\t\t\tdayElement.classList.add('dhx_cal_datepicker_event');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdayElement.classList.add('dhx_cal_datepicker_date');\r\n\r\n\t\t\tdayGridContainer.appendChild(dayElement);\r\n\t\t\tcurrDate = scheduler.date.add(currDate, 1, 'day');\r\n\t\t}\r\n\r\n\t\tcontainer.appendChild(dayGridContainer);\r\n\r\n\t}\r\n\r\n\t_renderMonthGrid(container) {\r\n\t\tconst {date} = this.getState();\r\n\r\n\t\tconst wrapper = document.createElement('div');\r\n\t\twrapper.classList.add(\"dhx_cal_datepicker_months\");\r\n\r\n\t\tconst months = [];\r\n\t\tfor(let i = 0; i < 12; i++){\r\n\t\t\tmonths.push(new Date(date.getFullYear(), i, 1));\r\n\t\t}\r\n\r\n\t\tconst formatLabel = this.scheduler.date.date_to_str(\"%M\");\r\n\t\tmonths.forEach(month => {\r\n\t\t\tconst monthElement = document.createElement('div');\r\n\t\t\tmonthElement.classList.add('dhx_cal_datepicker_month');\r\n\t\t\tif(date.getMonth() === month.getMonth()){\r\n\t\t\t\tmonthElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t}\r\n\t\t\tmonthElement.setAttribute(\"data-month\", month.getMonth());\r\n\t\t\tmonthElement.innerHTML = formatLabel(month);\r\n\t\t\tthis._domEvents.attach(monthElement, \"click\", () => {\r\n\t\t\t\tconst newDate = new Date(month);\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\tdate: newDate,\r\n\t\t\t\t\tmode: 'days'\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\twrapper.appendChild(monthElement);\r\n\t\t});\r\n\t\tcontainer.appendChild(wrapper);\r\n\r\n\t\tconst doneArea = document.createElement(\"div\");\r\n\t\tdoneArea.classList.add(\"dhx_cal_datepicker_done\");\r\n\t\tconst doneBtn = document.createElement(\"button\");\r\n\t\tdoneBtn.innerText = \"Done\";\r\n\t\tdoneBtn.classList.add(\"dhx_cal_datepicker_done_btn\");\r\n\t\tthis._domEvents.attach(doneBtn, \"click\", () => {\r\n\t\t\tthis.setState({\r\n\t\t\t\tmode: 'days'\r\n\t\t\t});\r\n\t\t});\r\n\t\tdoneArea.appendChild(doneBtn);\r\n\t\tcontainer.appendChild(doneArea);\r\n\t}\r\n\r\n\t_renderYearGrid(container) {\r\n\t\tconst {date} = this.getState();\r\n\t\tconst startYear = Math.floor(date.getFullYear() / 10) * 10;\r\n\t\t\r\n\t\tconst wrapper = document.createElement('div');\r\n\t\twrapper.classList.add(\"dhx_cal_datepicker_years\");\r\n\t\tfor (let i = startYear - 1; i <= startYear + 10; i++) {\r\n\t\t\tconst yearElement = document.createElement('div');\r\n\t\t\tyearElement.innerText = i;\r\n\t\t\tyearElement.classList.add('dhx_cal_datepicker_year');\r\n\t\t\tyearElement.setAttribute(\"data-year\", i);\r\n\t\t\tif(date.getFullYear() === i){\r\n\t\t\t\tyearElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t}\r\n\t\t\tthis._domEvents.attach(yearElement, \"click\", () => {\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\tdate: new Date(i, date.getMonth(), 1),\r\n\t\t\t\t\tmode: 'months'\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\twrapper.appendChild(yearElement);\r\n\t\t\t\r\n\t\t}\r\n\t\tcontainer.appendChild(wrapper);\r\n\r\n\t\tconst doneArea = document.createElement(\"div\");\r\n\t\tdoneArea.classList.add(\"dhx_cal_datepicker_done\");\r\n\t\tconst doneBtn = document.createElement(\"button\");\r\n\t\tdoneBtn.innerText = \"Done\";\r\n\t\tdoneBtn.classList.add(\"dhx_cal_datepicker_done_btn\");\r\n\t\tthis._domEvents.attach(doneBtn, \"click\", () => {\r\n\t\t\tthis.setState({\r\n\t\t\t\tmode: 'months'\r\n\t\t\t});\r\n\t\t});\r\n\t\tdoneArea.appendChild(doneBtn);\r\n\t\tcontainer.appendChild(doneArea);\r\n\t}\r\n\r\n\tdestructor(){\r\n\t\tthis.onStateChangeHandlers = [];\r\n\t\tif(this.element){\r\n\t\t\tthis.element.innerHTML = '';\r\n\t\t\tthis.element.remove();\r\n\t\t}\r\n\r\n\t\tthis._domEvents.detachAll();\r\n\t\tthis.callEvent(\"onDestroy\", []);\r\n\t\tthis.detachAllEvents();\r\n\r\n\t\tthis.scheduler = null;\r\n\t}\r\n}","// import \"./css/dhtmlxscheduler_terrace\";\r\n// import \"./css/dhtmlxscheduler_material\";\r\n// import \"./css/dhtmlxscheduler_material_nofont\";\r\n// import \"./css/dhtmlxscheduler_flat\";\r\n// import \"./css/dhtmlxscheduler_contrast_black\";\r\n// import \"./css/dhtmlxscheduler_contrast_white\";\r\n\r\n\r\nimport assert from \"./core/common/assert\";\r\nimport common_errors from \"./core/common_errors\";\r\nimport connector from \"./core/connector\";\r\nimport schedulerCore from \"./core/scheduler\";\r\nimport common from \"./core/common\";\r\nimport wai_aria from \"./core/wai_aria\";\r\nimport utils from \"./core/utils/utils\";\r\nimport dom_helpers from \"./core/utils/dom_helpers\";\r\nimport env from \"./utils/env\";\r\nimport destructor from \"./core/destructor\";\r\nimport ajax from \"./core/utils/ajax\";\r\nimport base from \"./core/base\";\r\nimport config from \"./core/config\";\r\nimport event from \"./core/event\";\r\nimport event_highlight from \"./core/event_highlight\";\r\nimport load from \"./core/load\";\r\nimport lightbox from \"./core/lightbox\";\r\nimport touch from \"./core/touch\";\r\nimport dhtmlx_suite_hooks from \"./core/dhtmlx/dhtmlx_suite_hooks\";\r\nimport skins from \"./core/skins\";\r\nimport jquery from \"./core/jquery\";\r\nimport delay_render from \"./core/delay_render\";\r\nimport dataProcessorExtend from \"./core/dataprocessor/dataprocessor\";\r\nimport message from \"./core/message\";\r\nimport i18nFactory from \"./locale\";\r\n\r\nimport voidFirst from \"./publish_helpers/void_script_first\";\r\nimport voidSecond from \"./publish_helpers/void_script_second\";\r\nimport voidThird from \"./publish_helpers/void_script_third\";\r\n\r\n//import datepickerHeader from \"./core/clickable_header\";\r\n\r\nimport { DatePicker } from \"./core/datepicker\";\r\n\r\nexport default function(extensionManager) {\r\n\r\n\tconst scheduler = { version: VERSION };\r\n\t\r\n\tcommon_errors(scheduler);\r\n\tcommon(scheduler);\r\n\tschedulerCore(scheduler);\r\n\twai_aria(scheduler);\r\n\t//utils(scheduler);\r\n\r\n\tscheduler.utils = utils;\r\n\tscheduler.$domHelpers = dom_helpers;\r\n\tscheduler.utils.dom = dom_helpers;\r\n\tscheduler.uid = utils.uid;\r\n\tscheduler.mixin = utils.mixin;\r\n\tscheduler.defined = utils.defined;\r\n\tscheduler.assert = assert(scheduler);\r\n\tscheduler.copy = utils.copy;\r\n\r\n\tscheduler._createDatePicker = function(container, config){\r\n\t\treturn new DatePicker(scheduler, container, config);\r\n\t};\r\n\r\n\t//datepickerHeader(scheduler);\r\n\r\n\r\n\t//old api compatibility\r\n\tscheduler._getFocusableNodes = dom_helpers.getFocusableNodes;\r\n\tscheduler._getClassName = dom_helpers.getClassName;\r\n\tscheduler._locate_css = dom_helpers.locateCss;\r\n\r\n\tconst messageApi = message(scheduler);\r\n\tscheduler.utils.mixin(scheduler, messageApi);\r\n\r\n\tscheduler.env = scheduler.$env = env;\r\n\tscheduler.Promise = window.Promise;\r\n\tdestructor(scheduler);\r\n\tajax(scheduler);\r\n\tvoidFirst(scheduler);\r\n\tbase(scheduler);\r\n\tconfig(scheduler);\r\n\tevent(scheduler);\r\n\tevent_highlight(scheduler);\r\n\tload(scheduler);\r\n\tlightbox(scheduler);\r\n\ttouch(scheduler);\r\n\tdhtmlx_suite_hooks(scheduler);\r\n\tvoidSecond(scheduler);\r\n\tskins(scheduler);\r\n\tjquery(scheduler);\r\n\tdelay_render(scheduler);\r\n\tdataProcessorExtend(scheduler);\r\n\tvoidThird(scheduler);\r\n\tconnector(scheduler);\r\n\tconst i18n = i18nFactory();\r\n\tscheduler.i18n = {\r\n\t\taddLocale: i18n.addLocale,\r\n\t\tsetLocale: function(locale){\r\n\t\t\tif(typeof locale === \"string\"){\r\n\t\t\t\tvar localeObject = i18n.getLocale(locale);\r\n\t\t\t\tif(!localeObject){\r\n\t\t\t\t\tlocaleObject = i18n.getLocale(\"en\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler.locale = localeObject;\r\n\t\t\t}else if(locale){\r\n\t\t\t\tif(!scheduler.locale){\r\n\t\t\t\t\tscheduler.locale = locale;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfor(var i in locale){\r\n\t\t\t\t\t\tif(locale[i] && typeof locale[i] === \"object\"){\r\n\t\t\t\t\t\t\tif(!scheduler.locale[i]){\r\n\t\t\t\t\t\t\t\tscheduler.locale[i] = {};\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tscheduler.mixin(scheduler.locale[i], locale[i], true);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tscheduler.locale[i] = locale[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar labels = scheduler.locale.labels;\r\n\t\t\tlabels.dhx_save_btn \t= labels.icon_save;\r\n\t\t\tlabels.dhx_cancel_btn \t= labels.icon_cancel;\r\n\t\t\tlabels.dhx_delete_btn \t= labels.icon_delete;\r\n\r\n\t\t\tif(scheduler.$container){\r\n\t\t\t\tscheduler.get_elements();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t},\r\n\t\tgetLocale: i18n.getLocale\r\n\t};\r\n\tscheduler.i18n.setLocale(\"en\");\r\n\r\n\tscheduler.ext = {};\r\n\r\n\tconst activePlugins = {};\r\n\tscheduler.plugins = function(config){\r\n\t\tconst extensionList = getExtensionList(config, {\r\n\t\t\t\ttreetimeline: [\"timeline\"],\r\n\t\t\t\tdaytimeline: [\"timeline\"],\r\n\t\t\t\touterdrag: [\"legacy\"]\r\n\t\t\t}, {\r\n\t\t\t\tlegacy: 1,\r\n\t\t\t\tlimit: 1,\r\n\t\t\t\ttimeline: 2,\r\n\t\t\t\tdaytimeline: 3,\r\n\t\t\t\ttreetimeline: 3,\r\n\t\t\t\touterdrag:6\r\n\t\t\t});\r\n\r\n\t\textensionList.forEach(function(name){\r\n\t\t\tif(!activePlugins[name]){\r\n\t\t\t\tconst plugin = extensionManager.getExtension(name);\r\n\t\t\t\tif(plugin){\r\n\t\t\t\t\tplugin(scheduler);\r\n\t\t\t\t\tactivePlugins[name] = true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthrow new Error(\"unknown plugin \" + name);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t};\r\n\r\n\tfunction getExtensionList(config, dependencies, priorities){\r\n\t\tconst result = [];\r\n\r\n\t\tfor(const i in config){\r\n\t\t\tif(config[i]){\r\n\t\t\t\tconst extension = i.toLowerCase();\r\n\t\t\t\tif(dependencies[extension]){\r\n\t\t\t\t\tdependencies[extension].forEach(function(dep){\r\n\t\t\t\t\t\tconst dependencyName = dep.toLowerCase();\r\n\t\t\t\t\t\tif(!config[dependencyName]){\r\n\t\t\t\t\t\t\tresult.push(dependencyName);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\tresult.push(extension);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tresult.sort(function(a, b){\r\n\t\t\tconst orderA = priorities[a] || 0;\r\n\t\t\tconst orderB = priorities[b] || 0;\r\n\t\t\tif(orderA > orderB){\r\n\t\t\t\treturn 1;\r\n\t\t\t}else if(orderA < orderB){\r\n\t\t\t\treturn -1;\r\n\t\t\t}else{\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\treturn scheduler;\r\n\r\n}","export default class ExtensionsManager{\r\n\tconstructor(config){\r\n\t\tthis._extensions = {};\r\n\t\tfor(const i in config){\r\n\t\t\tthis._extensions[i] = config[i];\r\n\t\t}\r\n\t}\r\n\r\n\taddExtension(name, ext) {\r\n\t\tthis._extensions[name] = ext;\r\n\t}\r\n\r\n\tgetExtension(name) {\r\n\t\treturn this._extensions[name];\r\n\t}\r\n}","\r\n\r\nimport dhtmlxHook from \"./dhtmlx_hook\";\r\nimport \"./css/theme.less\";\r\ndhtmlxHook();\r\n\r\nimport global from \"./global\";\r\n\r\nimport factoryMethod from \"./scheduler_factory_method\";\r\nimport ExtensionsManager from \"./ext/extension_manager\";\r\n\r\nclass SchedulerFactory {\r\n\r\n\tconstructor (extensions) {\r\n\t\tthis._seed = 0;\r\n\t\tthis._schedulerPlugins = [];\r\n\t\tthis._bundledExtensions = extensions;\r\n\t\tthis._extensionsManager = new ExtensionsManager(extensions);\r\n\t}\r\n\r\n\tplugin(code) {\r\n\t\tthis._schedulerPlugins.push(code);\r\n\r\n\t\tif(global.scheduler){\r\n\t\t\tcode(global.scheduler);\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetSchedulerInstance(initConfig) {\r\n\t\tvar scheduler = factoryMethod(this._extensionsManager);\r\n\r\n\t\tfor (var i = 0; i < this._schedulerPlugins.length; i++) {\r\n\t\t\tthis._schedulerPlugins[i](scheduler);\r\n\t\t}\r\n\t\tscheduler._internal_id = this._seed++;\r\n\t\r\n\t\tif (this.$syncFactory){\r\n\t\t\tthis.$syncFactory(scheduler);\r\n\t\t}\r\n\r\n\t\tif(initConfig){\r\n\t\t\tthis._initFromConfig(scheduler, initConfig);\r\n\t\t}\r\n\r\n\t\treturn scheduler;\r\n\t}\r\n\r\n\t_initFromConfig(scheduler, initConfig){\r\n\t\tif(initConfig.plugins){\r\n\t\t\tscheduler.plugins(initConfig.plugins);\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.config){\r\n\t\t\tscheduler.mixin(scheduler.config, initConfig.config, true);\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.templates){\r\n\t\t\tscheduler.attachEvent(\"onTemplatesReady\", function(){\r\n\t\t\t\tscheduler.mixin(scheduler.templates, initConfig.templates, true);\r\n\t\t\t}, {once: true});\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.events){\r\n\t\t\tfor(const event in initConfig.events){\r\n\t\t\t\tscheduler.attachEvent(event, initConfig.events[event]);\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.locale){\r\n\t\t\tscheduler.i18n.setLocale(initConfig.locale);\r\n\t\t}\r\n\t\r\n\t\tif(Array.isArray(initConfig.calendars)){\r\n\t\t\tinitConfig.calendars.forEach(function(calendar){\r\n\t\t\t\tscheduler.addCalendar(calendar);\r\n\t\t\t});\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.container){\r\n\t\t\tscheduler.init(initConfig.container);\r\n\t\t} else {\r\n\t\t\tscheduler.init();\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.data){\r\n\t\t\tif(typeof initConfig.data === \"string\"){\r\n\t\t\t\tscheduler.load(initConfig.data);\r\n\t\t\t}else{\r\n\t\t\t\tscheduler.parse(initConfig.data);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\r\n}\r\n\r\nexport default SchedulerFactory;","export default function(scheduler){\r\n\r\nscheduler.config.active_link_view = \"day\";\r\nscheduler._active_link_click = function(e){\r\n\tvar start = e.target;\r\n\tvar to = start.getAttribute(\"data-link-date\");\r\n\tvar s_d = scheduler.date.str_to_date(scheduler.config.api_date, false, true);\r\n\tif (to) {\r\n\t\tscheduler.setCurrentView(s_d(to), scheduler.config.active_link_view);\r\n\t\tif (e && e.preventDefault)\r\n\t\t\te.preventDefault();\r\n\t\treturn false;\r\n\t}\r\n};\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar do_wrapper = function(key, fullname){\r\n\t\tfullname = fullname || (key+\"_scale_date\");\r\n\r\n\t\tif(!scheduler.templates['_active_links_old_'+ fullname]){\r\n\t\t\tscheduler.templates['_active_links_old_'+ fullname] = scheduler.templates[fullname];\r\n\t\t}\r\n\t\tvar week_x = scheduler.templates['_active_links_old_'+ fullname];\r\n\t\tvar d_s = scheduler.date.date_to_str(scheduler.config.api_date);\r\n\t\tscheduler.templates[fullname] = function(date) {\r\n\t\t\treturn \"\" + week_x(date) + \"\";\r\n\t\t};\r\n\t};\r\n\r\n\tdo_wrapper(\"week\");\r\n\tdo_wrapper(\"\", \"month_day\");\r\n\tif (this.matrix){\r\n\t\tfor (var key in this.matrix)\r\n\t\t\tdo_wrapper(key);\r\n\t}\r\n\r\n\tthis._detachDomEvent(this._obj, \"click\", scheduler._active_link_click);\r\n\tscheduler.event(this._obj, \"click\", scheduler._active_link_click);\r\n});\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.date.add_agenda_legacy = function(date){\r\n\treturn scheduler.date.add(date, 1, \"year\");\r\n};\r\n\r\nscheduler.templates.agenda_legacy_time = function(start,end,ev){\r\n\tif (ev._timed)\r\n\t\treturn this.day_date(ev.start_date, ev.end_date, ev)+\" \"+this.event_date(start);\r\n\telse\r\n\t\treturn scheduler.templates.day_date(start)+\" – \"+scheduler.templates.day_date(end);\r\n};\r\nscheduler.templates.agenda_legacy_text = function(start,end,event){\r\n\treturn event.text;\r\n};\r\nscheduler.templates.agenda_legacy_date = function(){ return \"\"; };\r\n\r\nscheduler.date.agenda_legacy_start=function(){ return scheduler.date.date_part(scheduler._currentDate()); };\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function() {\r\n\tvar old_dblclick_dhx_cal_data = scheduler.dblclick_dhx_cal_data;\r\n\tscheduler.dblclick_dhx_cal_data = function() {\r\n\t\tif (this._mode == \"agenda_legacy\") {\r\n\t\t\tif (!this.config.readonly && this.config.dblclick_create)\r\n\t\t\t\tthis.addEventNow();\r\n\t\t} else {\r\n\t\t\tif (old_dblclick_dhx_cal_data)\r\n\t\t\t\treturn old_dblclick_dhx_cal_data.apply(this, arguments);\r\n\t\t}\r\n\t};\r\n\r\n\r\n\tvar old = scheduler.render_data;\r\n\tscheduler.render_data=function(evs){\r\n\t\tif (this._mode == \"agenda_legacy\")\r\n\t\t\tfill_agenda_tab();\r\n\t\telse\r\n\t\t\treturn old.apply(this,arguments);\r\n\t};\r\n\r\n\tvar old_render_view_data = scheduler.render_view_data;\r\n\tscheduler.render_view_data = function(){\r\n\t\tif(this._mode == \"agenda_legacy\") {\r\n\t\t\tscheduler._agendaScrollTop = scheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop;\r\n\t\t\tscheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop = 0;\r\n\t\t}\r\n\t\treturn old_render_view_data.apply(this,arguments);\r\n\t};\r\n\r\n\r\n\r\n\tfunction set_full_view(mode){\r\n\t\tif (mode){\r\n\t\t\tvar l = scheduler.locale.labels;\r\n\r\n\t\t\tvar rowAttr = scheduler._waiAria.agendaHeadAttrString();\r\n\t\t\tvar dateHeader = scheduler._waiAria.agendaHeadDateString(l.date);\r\n\t\t\tvar descriptionHeader = scheduler._waiAria.agendaHeadDescriptionString(l.description);\r\n\r\n\t\t\tscheduler._els[\"dhx_cal_header\"][0].innerHTML=\"
\" +\r\n\t\t\t\t\"
\"+l.date+\"
\" +\r\n\t\t\t\t\"\"+l.description+\"\" +\r\n\t\t\t\t\"
\";\r\n\t\t\tscheduler._table_view=true;\r\n\t\t\tscheduler.set_sizes();\r\n\t\t}\r\n\t}\r\n\r\n\tfunction fill_agenda_tab(){\r\n\t\t//select events for which data need to be printed\r\n\r\n\t\tvar events = scheduler.get_visible_events();\r\n\t\tevents.sort(function(a,b){ return a.start_date>b.start_date?1:-1;});\r\n\r\n\t\tvar tableAttr = scheduler._waiAria.agendaDataAttrString();\r\n\t\tvar agendaEventAttrString;\r\n\t\t//generate html for the view\r\n\t\tvar html=\"
\";\r\n\t\tfor (var i=0; i
\"+\r\n\t\t\t\t\t(scheduler.config.rtl ? scheduler.templates.agenda_time(ev.end_date,ev.start_date, ev):scheduler.templates.agenda_time(ev.start_date, ev.end_date,ev))+\r\n\t\t\t\t\t\"
\";\r\n\t\t\thtml+=`
\r\n\t\t\t\r\n\t\t\t
`;\r\n\t\t\thtml+=\"\"+scheduler.templates.agenda_text(ev.start_date, ev.end_date, ev)+\"
\";\r\n\t\t}\r\n\t\thtml+=\"
\";\r\n\r\n\t\t//render html\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop = scheduler._agendaScrollTop||0;\r\n\r\n\t\t// setting up dhx_v_border size\r\n\t\tvar agenda_area = scheduler._els[\"dhx_cal_data\"][0].childNodes[0];\r\n\t\tvar v_border = agenda_area.childNodes[agenda_area.childNodes.length-1];\r\n\t\tv_border.style.height = (agenda_area.offsetHeight < scheduler._els[\"dhx_cal_data\"][0].offsetHeight) ? \"100%\" : (agenda_area.offsetHeight+\"px\");\r\n\r\n\t\tvar t=scheduler._els[\"dhx_cal_data\"][0].firstChild.childNodes;\r\n\r\n\t\tvar dateElement = scheduler._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML=scheduler.templates.agenda_date(scheduler._min_date, scheduler._max_date, scheduler._mode);\r\n\t\t}\r\n\r\n\t\tscheduler._rendered=[];\r\n\t\tfor (var i=0; i < t.length-1; i++)\r\n\t\t\tscheduler._rendered[i]=t[i];\r\n\r\n\t}\r\n\r\n\tscheduler.agenda_legacy_view=function(mode){\r\n\t\tscheduler._min_date = scheduler.config.agenda_start||scheduler.date.agenda_legacy_start(scheduler._date);\r\n\t\tscheduler._max_date = scheduler.config.agenda_end||scheduler.date.add_agenda_legacy(scheduler._min_date, 1);\r\n\r\n\t\tset_full_view(mode);\r\n\t\tif (mode){\r\n\t\t\tscheduler._cols = null;\r\n\t\t\tscheduler._colsS = null;\r\n\t\t\tscheduler._table_view = true;\r\n\t\t\t//agenda tab activated\r\n\t\t\tfill_agenda_tab();\r\n\t\t} else {\r\n\t\t\tscheduler._table_view = false;\r\n\t\t\t//agenda tab de-activated\r\n\t\t}\r\n\t};\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.date.add_agenda = function(date, inc){\r\n\t\treturn scheduler.date.add(date, 1*inc, \"month\");\r\n\t};\r\n\t\r\n\tscheduler.templates.agenda_time = function(start,end,ev){\r\n\t\tif (ev._timed){\r\n\t\t\treturn `${this.event_date(start)} - ${this.event_date(end)}`;\r\n\t\t}else{\r\n\t\t\treturn scheduler.locale.labels.full_day;\r\n\t\t}\r\n\t};\r\n\tscheduler.templates.agenda_text = function(start,end,ev){\r\n\t\treturn ev.text;\r\n\t};\r\n\r\n\tconst dayDateToStr = scheduler.date.date_to_str(\"%F %j\");\r\n\tconst dayDowToStr = scheduler.date.date_to_str(\"%l\");\r\n\r\n\tscheduler.templates.agenda_day = function(date){ \r\n\t\treturn `
${dayDateToStr(date)}
\r\n\t\t
${dayDowToStr(date)}
`;\r\n\t};\r\n\tscheduler.templates.agenda_date = function(start, end){ \r\n\t\treturn scheduler.templates.month_date(scheduler.getState().date); \r\n\t};\r\n\t\r\n\tscheduler.date.agenda_start=function(date){\r\n\t\treturn scheduler.date.month_start(new Date(date));\r\n\t};\r\n\r\n\tlet scrollTop = 0;\r\n\t\r\n\tscheduler.attachEvent(\"onTemplatesReady\",function() {\r\n\t\tvar old_dblclick_dhx_cal_data = scheduler.dblclick_dhx_cal_data;\r\n\t\tscheduler.dblclick_dhx_cal_data = function() {\r\n\t\t\tif (this._mode == \"agenda\") {\r\n\t\t\t\tif (!this.config.readonly && this.config.dblclick_create)\r\n\t\t\t\t\tthis.addEventNow();\r\n\t\t\t} else {\r\n\t\t\t\tif (old_dblclick_dhx_cal_data)\r\n\t\t\t\t\treturn old_dblclick_dhx_cal_data.apply(this, arguments);\r\n\t\t\t}\r\n\t\t};\r\n\t\r\n\t\r\n\t\tvar old = scheduler.render_data;\r\n\t\tscheduler.render_data=function(evs){\r\n\t\t\tif (this._mode == \"agenda\")\r\n\t\t\t\tfill_agenda_tab();\r\n\t\t\telse\r\n\t\t\t\treturn old.apply(this,arguments);\r\n\t\t};\r\n\t\r\n\t\tvar old_render_view_data = scheduler.render_view_data;\r\n\t\tscheduler.render_view_data = function(){\r\n\t\t\tif(this._mode == \"agenda\") {\r\n\t\t\t\tscrollTop = scheduler._els[\"dhx_cal_data\"][0].scrollTop;\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = 0;\r\n\t\t\t}\r\n\t\t\treturn old_render_view_data.apply(this,arguments);\r\n\t\t};\r\n\r\n\t\tfunction fill_agenda_tab(){\r\n\t\t\tconst events = scheduler.get_visible_events();\r\n\t\t\tevents.sort(function(a,b){ return a.start_date>b.start_date?1:-1;});\r\n\r\n\t\t\tconst eventsInDays = {};\r\n\t\t\tlet currDate = scheduler.getState().min_date;\r\n\t\t\tconst maxDate = scheduler.getState().max_date;\r\n\t\t\twhile(currDate.valueOf() < maxDate.valueOf()){\r\n\t\t\t\teventsInDays[currDate.valueOf()] = [];\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\r\n\t\t\tlet anyEvents = false;\r\n\r\n\t\t\tevents.forEach((ev) => {\r\n\t\t\t\tlet eventStart = scheduler.date.day_start(new Date(ev.start_date)); \r\n\t\t\t\twhile (eventStart.valueOf() < ev.end_date.valueOf()) {\r\n\t\t\t\t\tif (eventsInDays[eventStart.valueOf()]) {\r\n\t\t\t\t\t\teventsInDays[eventStart.valueOf()].push(ev);\r\n\t\t\t\t\t\tanyEvents = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\teventStart = scheduler.date.day_start(scheduler.date.add(eventStart, 1, \"day\"));\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(!anyEvents){\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = renderEmptyView();\r\n\t\t\t}else{\r\n\t\t\t\tlet html = \"\";\r\n\t\t\t\tfor(let day in eventsInDays){\r\n\t\t\t\t\thtml += renderDay(new Date(day*1), eventsInDays[day]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = scrollTop;\r\n\t\t\t\r\n\t\t\tlet t = scheduler._els[\"dhx_cal_data\"][0].querySelectorAll(\".dhx_cal_agenda_event_line\");\r\n\t\t\tscheduler._rendered = [];\r\n\t\t\tfor (var i = 0; i < t.length - 1; i++) {\r\n\t\t\t\tscheduler._rendered[i] = t[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\r\n\r\n\t\tfunction renderEmptyView(){\r\n\t\t\treturn `
${scheduler.locale.labels.agenda_tab}
`;\r\n\t\t}\r\n\r\n\t\tfunction renderDay(day, events) {\r\n\t\t\tif(!events.length){\r\n\t\t\t\treturn \"\";\r\n\t\t\t}\r\n\t\t\tlet html = `\r\n
\r\n\t
${scheduler.templates.agenda_day(day)}
\r\n\t
\r\n`;\r\n\r\n\t\t\tevents.forEach((calendarEvent) => {\r\n\t\t\t\thtml += renderOneEvent(day, calendarEvent);\r\n\t\t\t});\r\n\r\n\t\t\thtml += `
`;\r\n\t\t\treturn html;\r\n\t\t}\r\n\r\n\t\tfunction renderOneEvent(day, calendarEvent){\r\n\t\t\tconst dates = scheduler.templates.agenda_time(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\t\t\tconst selectedId = scheduler.getState().select_id;\r\n\t\t\tconst cls = scheduler.templates.event_class(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\t\t\tconst description = scheduler.templates.agenda_text(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\r\n\t\t\tlet style = \"\";\r\n\t\t\tif(calendarEvent.color || calendarEvent.textColor){\r\n\t\t\t\tconst bg = (calendarEvent.color ? (\"--dhx-scheduler-event-background:\" + calendarEvent.color + \";\") : \"\");\r\n\t\t\t\tconst color = (calendarEvent.textColor ? (\"--dhx-scheduler-event-color:\" + calendarEvent.textColor + \";\") : \"\");\r\n\t\t\t\tstyle = ` style=\"${bg}${color}\" `;\r\n\t\t\t}\r\n\r\n\t\t\treturn `
\r\n\t
\r\n\t
${dates}
\r\n\t
${description}
\r\n
`;\r\n\t\t}\r\n\t\r\n\t\tscheduler.agenda_view=function(mode){\r\n\t\t\tif (mode){\r\n\t\t\t\tscheduler._min_date = scheduler.config.agenda_start || scheduler.date.agenda_start(scheduler._date);\r\n\t\t\t\tscheduler._max_date = scheduler.config.agenda_end || scheduler.date.add_agenda(scheduler._min_date, 1);\r\n\t\t\t\tscheduler._cols = null;\r\n\t\t\t\tscheduler._colsS = null;\r\n\t\t\t\tscheduler._table_view = true;\r\n\r\n\t\t\t\tconst dateHeader = scheduler._getNavDateElement();\r\n\t\t\t\tdateHeader.innerHTML = scheduler.templates.agenda_date(scheduler._date);\r\n\t\t\t\t//agenda tab activated\r\n\t\t\t\tfill_agenda_tab();\r\n\t\t\t} else {\r\n\t\t\t\tscheduler._table_view = false;\r\n\t\t\t\t//agenda tab de-activated\r\n\t\t\t}\r\n\t\t};\r\n\t});\r\n\r\n\t// scheduler.attachEvent(\"onEventSelected\", function(id){\r\n\t// \tconst oldSelected = scheduler.$container.querySelectorAll(\".dhx_cal_agenda_event_line_selected\");\r\n\t// \toldSelected.forEach((el) => {\r\n\t// \t\tel.classList.remove(\"dhx_cal_agenda_event_line_selected\");\r\n\t// \t});\r\n\r\n\t// \tconst selected = scheduler.$container.querySelector(`[${scheduler.config.event_attribute}=\"${id}\"]`);\r\n\t// \tif(selected){\r\n\t// \t\tselected.classList.add(\"dhx_cal_agenda_event_line_selected\");\r\n\t// \t}\r\n\t// });\r\n\t\r\n\t\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.config.all_timed = \"short\";\r\n\tscheduler.config.all_timed_month = false;\r\n\r\n\tvar is_event_short = function (ev) {\r\n\t\tif(!((ev.end_date - ev.start_date)/(1000*60*60) >= 24)){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t// short event shouldn't disappear to multiday area during dnd-resize\r\n\t\tif(scheduler._drag_mode == \"resize\" && scheduler._drag_id == ev.id){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn \tfalse;\r\n\t};\r\n\r\n\t// copy of usual events and recurring instances;\r\n\t// regular copy causes problems with recurrings which have series event as a prototype\r\n\tscheduler._safe_copy = function(event){\r\n\t\tvar proto = null,\r\n\t\t\tcopy = scheduler._copy_event(event);\r\n\t\tif(event.event_pid){\r\n\t\t\tproto = scheduler.getEvent(event.event_pid);\r\n\t\t}\r\n\r\n\t\tif (proto && proto.isPrototypeOf(event)) {\r\n\t\t\tdelete copy.event_length;\r\n\t\t\tdelete copy.event_pid;\r\n\t\t\tdelete copy.rec_pattern;\r\n\t\t\tdelete copy.rec_type;\r\n\t\t}\r\n\r\n\t\treturn copy;\r\n\t};\r\n\r\n\tvar old_prerender_events_line = scheduler._pre_render_events_line;\r\n\tvar old_prerender_events_table = scheduler._pre_render_events_table;\r\n\r\n\tvar prerender_events = function (evs, hold) {\r\n\t\tif (!this._table_view) {\r\n\t\t\treturn old_prerender_events_line.call(this, evs, hold);\r\n\t\t}\r\n\r\n\t\treturn old_prerender_events_table.call(this, evs, hold);\r\n\t};\r\n\r\n\tscheduler._pre_render_events_line = scheduler._pre_render_events_table = function(evs, hold){\r\n\t\tif (!this.config.all_timed ||\r\n\t\t\t(this._table_view && this._mode != \"month\") ||\r\n\t\t\t(this._mode == \"month\" && !this.config.all_timed_month))\r\n\t\t\treturn prerender_events.call(this, evs, hold);\r\n\r\n\t\tfor (var i=0; i < evs.length; i++) {\r\n\t\t\tvar ev=evs[i];\r\n\r\n\t\t\tif (ev._timed)\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\tif (this.config.all_timed == \"short\") {\r\n\t\t\t\tif (!is_event_short(ev)) {\r\n\t\t\t\t\tif (this._mode != \"month\") {\r\n\t\t\t\t\t\tevs.splice(i--, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar ce = this._safe_copy(ev); // current event (event for one specific day) is copy of original with modified dates\r\n\t\t\tif(!ev._virtual){\r\n\t\t\t\tce._first_chunk = true;\r\n\t\t\t}else{\r\n\t\t\t\tce._first_chunk = false;\r\n\t\t\t}\r\n\t\t\tce._drag_resize = false;\r\n\t\t\tce._virtual = true;\r\n\t\t\tce.start_date = new Date(ce.start_date); // as lame copy doesn't copy date objects\r\n\r\n\t\t\tif (!isOvernightEvent(ev)) {\r\n\t\t\t\tce.end_date = new Date(ev.end_date);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tce.end_date = getNextDay(ce.start_date);\r\n\t\t\t\tif (this.config.last_hour != 24) { // if specific last_hour was set (e.g. 20)\r\n\t\t\t\t\tce.end_date = setDateTime(ce.start_date, this.config.last_hour);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar event_changed = false;\r\n\t\t\tif (ce.start_date < this._max_date && ce.end_date > this._min_date && ce.start_date < ce.end_date) {\r\n\t\t\t\tevs[i] = ce; // adding another event in collection\r\n\t\t\t\tevent_changed = true;\r\n\t\t\t}\r\n\t\t//\tif (ce.start_date > ce.end_date) {\r\n\t\t//\t\tevs.splice(i--,1);\r\n\t\t//\t}\r\n\r\n\t\t\tvar re = this._safe_copy(ev); // remaining event, copy of original with modified start_date (making range more narrow)\r\n\t\t\tre._virtual = true;\r\n\t\t\tre.end_date = new Date(re.end_date);\r\n\t\t\tif (re.start_date < this._min_date)\r\n\t\t\t\tre.start_date = setDateTime(this._min_date, this.config.first_hour);// as we are starting only with whole hours\r\n\t\t\telse\r\n\t\t\t\tre.start_date = setDateTime(getNextDay(ev.start_date), this.config.first_hour);\r\n\r\n\t\t\tif (re.start_date < this._max_date && re.start_date < re.end_date) {\r\n\t\t\t\tif (event_changed){\r\n\t\t\t\t\tevs.splice(i+1,0,re);//insert part\r\n\t\t\t\t}else {\r\n\t\t\t\t\tevs[i--] = re;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tre._last_chunk = false;\r\n\t\t\t}else{\r\n\t\t\t\tce._last_chunk = true;\r\n\t\t\t\tce._drag_resize = true;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t// in case of all_timed pre_render is not applied to the original event\r\n\t\t// so we need to force redraw in case of dnd\r\n\t\tvar redraw = (this._drag_mode == 'move')?false:hold;\r\n\t\treturn prerender_events.call(this, evs, redraw);\r\n\r\n\r\n\t\tfunction isOvernightEvent(ev){\r\n\t\t\tvar next_day = getNextDay(ev.start_date);\r\n\t\t\treturn (+ev.end_date > +next_day);\r\n\t\t}\r\n\t\tfunction getNextDay(date){\r\n\t\t\tvar next_day = scheduler.date.add(date, 1, \"day\");\r\n\t\t\tnext_day = scheduler.date.date_part(next_day);\r\n\t\t\treturn next_day;\r\n\t\t}\r\n\t\tfunction setDateTime(date, hours){\r\n\t\t\tvar val = scheduler.date.date_part(new Date(date));\r\n\t\t\tval.setHours(hours);\r\n\t\t\treturn val;\r\n\t\t}\r\n\t};\r\n\tvar old_get_visible_events = scheduler.get_visible_events;\r\n\tscheduler.get_visible_events = function(only_timed){\r\n\t\tif (!(this.config.all_timed && this.config.multi_day))\r\n\t\t\treturn old_get_visible_events.call(this, only_timed);\r\n\t\treturn old_get_visible_events.call(this, false); // only timed = false\r\n\t};\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function (old_mode, old_date, mode, date) {\r\n\t\tscheduler._allow_dnd = (mode == \"day\" || mode == \"week\" || scheduler.getView(mode));\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler._is_main_area_event = function(ev){\r\n\t\treturn !!(ev._timed || this.config.all_timed === true || (this.config.all_timed == \"short\" && is_event_short(ev)) );\r\n\t};\r\n\r\n\tvar oldUpdate = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id){\r\n\t\t// full redraw(update_render=true) messes events order while dnd.\r\n\t\t// individual redraw(update_render=false) of multiday event, which happens on select/unselect, expands event to full width of the cell and can be fixes only with full redraw.\r\n\t\t// so for now full redraw is always enabled for not-dnd updates\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tvar fullRedrawNeeded;\r\n\t\tvar initial;\r\n\t\tif(ev) {\r\n\t\t\tfullRedrawNeeded = (scheduler.config.all_timed && !(scheduler.isOneDayEvent(scheduler._events[id]) || scheduler.getState().drag_id));\r\n\t\t\tif (fullRedrawNeeded) {\r\n\t\t\t\tinitial = scheduler.config.update_render;\r\n\t\t\t\tscheduler.config.update_render = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\toldUpdate.apply(scheduler, arguments);\r\n\r\n\t\tif(ev) {\r\n\t\t\tif (fullRedrawNeeded) {\r\n\t\t\t\tscheduler.config.update_render = initial;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\r\nvar temp_section;\r\nvar before;\r\n\r\nscheduler.config.collision_limit = 1;\r\n\r\nfunction _setTempSection(event_id) { // for custom views (matrix, timeline, units)\r\n\tvar checked_mode = scheduler._get_section_view();\r\n\tif(checked_mode && event_id){\r\n\t\ttemp_section = scheduler.getEvent(event_id)[scheduler._get_section_property()];\r\n\t}\r\n}\r\n\r\nscheduler.attachEvent(\"onBeforeDrag\",function(id){\r\n\t_setTempSection(id);\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onBeforeLightbox\",function(id){\r\n\tvar ev = scheduler.getEvent(id);\r\n\tbefore = [ev.start_date, ev.end_date];\r\n\t_setTempSection(id);\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventChanged\",function(id){\r\n\tif (!id || !scheduler.getEvent(id)) return true;\r\n\tvar ev = scheduler.getEvent(id);\r\n\tif (!scheduler.checkCollision(ev)){\r\n\t\tif (!before) return false;\r\n\t\tev.start_date = before[0];\r\n\t\tev.end_date = before[1];\r\n\t\tev._timed=this.isOneDayEvent(ev);\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onBeforeEventChanged\",function(ev,e,is_new){\r\n\treturn scheduler.checkCollision(ev);\r\n});\r\nscheduler.attachEvent(\"onEventAdded\",function(id,ev) {\r\n\tvar result = scheduler.checkCollision(ev);\r\n\tif (!result)\r\n\t\tscheduler.deleteEvent(id);\r\n});\r\nscheduler.attachEvent(\"onEventSave\",function(id, edited_ev, is_new){\r\n\tedited_ev = scheduler._lame_clone(edited_ev);\r\n\tedited_ev.id = id;\r\n\r\n\t//lightbox may not have 'time' section\r\n\tif(!(edited_ev.start_date && edited_ev.end_date)){\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tedited_ev.start_date = new Date(ev.start_date);\r\n\t\tedited_ev.end_date = new Date(ev.end_date);\r\n\t}\r\n\r\n\tif(edited_ev.rec_type){\r\n\t\tscheduler._roll_back_dates(edited_ev);\r\n\t}\r\n\treturn scheduler.checkCollision(edited_ev); // in case user creates event on one date but then edited it another\r\n});\r\n\r\nscheduler._check_sections_collision = function(first, second){\r\n\tvar map_to = scheduler._get_section_property();\r\n\tif (first[map_to] == second[map_to] && first.id != second.id)\r\n\t\treturn true;\r\n\treturn false;\r\n};\r\n\r\nscheduler.checkCollision = function(ev) {\r\n\tvar evs = [];\r\n\tvar collision_limit = scheduler.config.collision_limit;\r\n\r\n\tif (ev.rec_type) {\r\n\t\tvar evs_dates = scheduler.getRecDates(ev);\r\n\t\tfor(var k=0; k= collision_limit) {\r\n\r\n\t\t\tsingle = false;\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\tif ( evs.length >= collision_limit )\r\n\t\t\tsingle = false;\r\n\t}\r\n\tif (!single) {\r\n\t\tvar res = !scheduler.callEvent(\"onEventCollision\",[ev,evs]);\r\n\t\tif (!res) {\r\n\t\t\tev[map_to] = temp_section||ev[map_to]; // from _setTempSection for custom views\r\n\t\t}\r\n\t\treturn res;\r\n\t}\r\n\treturn single;\r\n\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.config.container_autoresize = true;\r\n\tscheduler.config.month_day_min_height = 90;\r\n\tscheduler.config.min_grid_size = 25;\r\n\tscheduler.config.min_map_size = 400;\r\n\r\n\tvar old_pre_render_event = scheduler._pre_render_events;\r\n\r\n\t//need for temporary disabling without modifying public config\r\n\tvar active = true;\r\n\tvar total_height = 0;\r\n\tvar multiday_height = 0;\r\n\r\n\tscheduler._pre_render_events = function(evs, hold) {\r\n\t\tif (!(scheduler.config.container_autoresize && active)) {\r\n\t\t\treturn old_pre_render_event.apply(this, arguments);\r\n\t\t}\r\n\r\n\t\tvar hb = this.xy.bar_height;\r\n\t\tvar h_old = this._colsS.heights;\r\n\t\tvar h = this._colsS.heights = [0, 0, 0, 0, 0, 0, 0];\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tif (!this._table_view)\r\n\t\t\tevs = this._pre_render_events_line(evs, hold); //ignore long events for now\r\n\t\telse\r\n\t\t\tevs = this._pre_render_events_table(evs, hold);\r\n\r\n\t\tif (this._table_view) {\r\n\t\t\tif (hold){\r\n\t\t\t\tthis._colsS.heights = h_old;\r\n\t\t\t} else {\r\n\t\t\t\tvar evl = data.firstChild;\r\n\t\t\t\tconst rows = evl.querySelectorAll(\".dhx_cal_month_row\");\r\n\t\t\t\tif (rows) {\r\n\t\t\t\t\tfor (var i = 0; i < rows.length; i++) {\r\n\t\t\t\t\t\th[i]++;\r\n\r\n\t\t\t\t\t\tif ((h[i]) * hb > this._colsS.height - this.xy.month_head_height) { // 22 - height of cell's header\r\n\t\t\t\t\t\t\t//we have overflow, update heights\r\n\t\t\t\t\t\t\tvar cells = rows[i].querySelectorAll(\".dhx_cal_month_cell\");\r\n\r\n\t\t\t\t\t\t\tvar cHeight = this._colsS.height - this.xy.month_head_height;\r\n\t\t\t\t\t\t\tif(this.config.max_month_events*1 !== this.config.max_month_events || h[i] <= this.config.max_month_events){\r\n\t\t\t\t\t\t\t\tcHeight = h[i] * hb;\r\n\t\t\t\t\t\t\t}else if( (this.config.max_month_events + 1) * hb > this._colsS.height - this.xy.month_head_height){\r\n\t\t\t\t\t\t\t\tcHeight = (this.config.max_month_events + 1) * hb;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\trows[i].style.height = (cHeight + this.xy.month_head_height) + \"px\";\r\n\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\tfor (var j = 0; j < cells.length; j++) {\r\n\t\t\t\t\t\t\t\tcells[j].childNodes[1].style.height = cHeight + \"px\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\th[i] = (h[i - 1] || 0) + cells[0].offsetHeight;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\th[i] = (h[i - 1] || 0) + rows[i].querySelectorAll(\".dhx_cal_month_cell\")[0].offsetHeight;\r\n\t\t\t\t\t}\r\n\t\t\t\t\th.unshift(0);\r\n\t\t\t\t\tif (evl.parentNode.offsetHeight < evl.parentNode.scrollHeight && !evl._h_fix) {\r\n\t\t\t\t\t\t//we have v-scroll, decrease last day cell\r\n\r\n\t\t\t\t\t\t// NO CHECK SHOULD BE MADE ON VERTICAL SCROLL\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (!evs.length && this._els[\"dhx_multi_day\"][0].style.visibility == \"visible\")\r\n\t\t\t\t\t\th[0] = -1;\r\n\t\t\t\t\tif (evs.length || h[0] == -1) {\r\n\t\t\t\t\t\t//shift days to have space for multiday events\r\n\t\t\t\t\t\t//var childs = evl.parentNode.childNodes;\r\n\t\t\t\t\t\tvar dh = ((h[0] + 1) * hb + 1); // +1 so multiday events would have 2px from top and 2px from bottom by default\r\n\t\t\t\t\t\tif(multiday_height != dh + 1) {\r\n\t\t\t\t\t\t\tthis._obj.style.height = (total_height - multiday_height + dh - 1) + \"px\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tdh += \"px\";\r\n\t\t\t\t\t\tconst navHeight = this._els[\"dhx_cal_navline\"][0].offsetHeight;\r\n\t\t\t\t\t\tconst headerHeight = this._els[\"dhx_cal_header\"][0].offsetHeight;\r\n\t\t\t\t\t\tdata.style.height = (this._obj.offsetHeight - navHeight - headerHeight - (this.xy.margin_top || 0)) + 'px';\r\n\t\t\t\t\t\tvar last = this._els[\"dhx_multi_day\"][0];\r\n\t\t\t\t\t\tlast.style.height = dh;\r\n\t\t\t\t\t\tlast.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\t\tlast = this._els[\"dhx_multi_day\"][1];\r\n\t\t\t\t\t\tlast.style.height = dh;\r\n\t\t\t\t\t\tlast.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\t\tif(last.style.visibility == \"hidden\"){\r\n\t\t\t\t\t\t\tlast.style.display = \"none\";\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tlast.style.display = \"\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tlast.className = h[0] ? \"dhx_multi_day_icon\" : \"dhx_multi_day_icon_small\";\r\n\t\t\t\t\t\tthis._dy_shift = (h[0] + 1) * hb;\r\n\t\t\t\t\t\th[0] = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn evs;\r\n\t};\r\n\r\n\tvar checked_divs = [\"dhx_cal_navline\", \"dhx_cal_header\", \"dhx_multi_day\", \"dhx_cal_data\"];\r\n\tvar updateContainterHeight = function(is_repaint) {\r\n\t\ttotal_height = 0;\r\n\t\tfor (var i = 0; i < checked_divs.length; i++) {\r\n\r\n\t\t\tvar className = checked_divs[i];\r\n\t\t\tvar checked_div = (scheduler._els[className]) ? scheduler._els[className][0] : null;\r\n\t\t\tvar height = 0;\r\n\t\t\tswitch (className) {\r\n\t\t\t\tcase \"dhx_cal_navline\":\r\n\t\t\t\tcase \"dhx_cal_header\":\r\n\t\t\t\t\theight = checked_div.offsetHeight;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"dhx_multi_day\":\r\n\t\t\t\t\theight = (checked_div) ? checked_div.offsetHeight - 1 : 0;\r\n\t\t\t\t\tmultiday_height = height;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"dhx_cal_data\":\r\n\t\t\t\t\tvar mode = scheduler.getState().mode;\r\n\r\n\t\t\t\t\tif(checked_div.childNodes[1] && mode != \"month\") {\r\n\t\t\t\t\t\tlet maxHeight = 0;\r\n\t\t\t\t\t\tfor(let i = 0; i < checked_div.childNodes.length; i++){\r\n\t\t\t\t\t\t\tif(checked_div.childNodes[i].offsetHeight > maxHeight){\r\n\t\t\t\t\t\t\t\tmaxHeight = checked_div.childNodes[i].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\theight = maxHeight;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\theight = Math.max(checked_div.offsetHeight - 1, checked_div.scrollHeight);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (mode == \"month\") {\r\n\t\t\t\t\t\tif (scheduler.config.month_day_min_height && !is_repaint) {\r\n\t\t\t\t\t\t\tvar rows_length = checked_div.querySelectorAll(\".dhx_cal_month_row\").length;\r\n\t\t\t\t\t\t\theight = rows_length * scheduler.config.month_day_min_height;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (is_repaint) {\r\n\t\t\t\t\t\t\tchecked_div.style.height = height + \"px\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (mode == \"year\"){\r\n\t\t\t\t\t\theight = 190 * scheduler.config.year_y;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(mode == \"agenda\"){\r\n\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\tif(checked_div.childNodes && checked_div.childNodes.length){\r\n\t\t\t\t\t\t\tfor(var j = 0; j < checked_div.childNodes.length; j++){\r\n\t\t\t\t\t\t\t\theight += checked_div.childNodes[j].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(height + 2 < scheduler.config.min_grid_size){\r\n\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (mode == \"week_agenda\"){\r\n\t\t\t\t\t\tvar min_height = scheduler.xy.week_agenda_scale_height + scheduler.config.min_grid_size,\r\n\t\t\t\t\t\t\tcur_height;\r\n\r\n\t\t\t\t\t\tvar column;\r\n\t\t\t\t\t\tfor(var k = 0; k < checked_div.childNodes.length; k++){\r\n\t\t\t\t\t\t\tcolumn = checked_div.childNodes[k];\r\n\t\t\t\t\t\t\tfor(var j = 0; j < column.childNodes.length; j++) {\r\n\t\t\t\t\t\t\t\tvar innerHeight = 0,\r\n\t\t\t\t\t\t\t\t\teventsContainer = column.childNodes[j].childNodes[1];\r\n\r\n\t\t\t\t\t\t\t\tfor(var g =0; g < eventsContainer.childNodes.length; g++){\r\n\t\t\t\t\t\t\t\t\tinnerHeight += eventsContainer.childNodes[g].offsetHeight;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tcur_height = innerHeight + scheduler.xy.week_agenda_scale_height;\r\n\t\t\t\t\t\t\t\tcur_height = (k == 1 && (j == 2 || j == 3)) ? cur_height * 2 : cur_height; // for last two cells;\r\n\r\n\t\t\t\t\t\t\t\tif (cur_height > min_height) {\r\n\t\t\t\t\t\t\t\t\tmin_height = cur_height;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\theight = min_height * 3;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(mode == \"map\") {\r\n\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\tvar evs = checked_div.querySelectorAll(\".dhx_map_line\");\r\n\r\n\t\t\t\t\t\tfor (var j = 0; j < evs.length; j++) {\r\n\t\t\t\t\t\t\theight += evs[j].offsetHeight;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (height + 2 < scheduler.config.min_map_size) {\r\n\t\t\t\t\t\t\theight = scheduler.config.min_map_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(scheduler._gridView) {\r\n\t\t\t\t\t\theight = 0;\r\n\r\n\t\t\t\t\t\tif (checked_div.childNodes[1].childNodes[0].childNodes && checked_div.childNodes[1].childNodes[0].childNodes.length) {\r\n\t\t\t\t\t\t\tvar evs = checked_div.childNodes[1].childNodes[0].childNodes[0].childNodes;\r\n\r\n\t\t\t\t\t\t\tfor (var j = 0; j < evs.length; j++) {\r\n\t\t\t\t\t\t\t\theight += evs[j].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\theight += 2;\r\n\r\n\t\t\t\t\t\t\tif(height < scheduler.config.min_grid_size){\r\n\t\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (scheduler.matrix && scheduler.matrix[mode]) {\r\n\t\t\t\t\t\tif (is_repaint) {\r\n\t\t\t\t\t\t\theight += 0;\r\n\t\t\t\t\t\t\tchecked_div.style.height = height + \"px\";\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\t\tvar cfg = scheduler.matrix[mode];\r\n\t\t\t\t\t\t\tvar rows = cfg.y_unit;\r\n\t\t\t\t\t\t\tfor(var r=0; r < rows.length; r++){\r\n\t\t\t\t\t\t\t\theight += cfg.getSectionHeight(rows[r].key);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t// Check and add extra height to avoid events hiding by the horizontal scrollbar\r\n\t\t\t\t\t\t\tif(scheduler.$container.clientWidth != scheduler.$container.scrollWidth){\r\n\t\t\t\t\t\t\t\theight += getScrollSize();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\theight -= 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (mode == \"day\" || mode == \"week\" || (scheduler._props && scheduler._props[mode])) {\r\n\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\theight += 1;\r\n\t\t\ttotal_height += height;\r\n\t\t}\r\n\t\tscheduler._obj.style.height = (total_height) + \"px\";\r\n\r\n\t\tif (!is_repaint)\r\n\t\t\tscheduler.updateView();\r\n\t};\r\n\r\n\tfunction callUpdate(){\r\n\t\tactive = false;\r\n\t\tscheduler.callEvent(\"onAfterSchedulerResize\", []);\r\n\t\tactive = true;\r\n\t}\r\n\r\n\tvar conditionalUpdateContainerHeight = function() {\r\n\t\tif(!(scheduler.config.container_autoresize && active))\r\n\t\t\treturn true;\r\n\r\n\t\tvar mode = scheduler.getState().mode;\r\n\r\n\t\tif(!mode) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tvar asyncRepaint = window.requestAnimationFrame || window.setTimeout;\r\n\t\tvar scrollTop = document.documentElement.scrollTop;\r\n\r\n\t\tasyncRepaint(function() {\r\n\t\t\tif(scheduler.$destroyed || !scheduler.$initialized){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tupdateContainterHeight();\r\n\t\t});\r\n\r\n\t\tif ( (scheduler.matrix && scheduler.matrix[mode]) || mode == \"month\") {\r\n\t\t\tasyncRepaint(function() {\r\n\t\t\t\tif(scheduler.$destroyed || !scheduler.$initialized){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tupdateContainterHeight(true);\r\n\t\t\t\tdocument.documentElement.scrollTop = scrollTop;\r\n\t\t\t\tcallUpdate();\r\n\t\t\t}, 1);\r\n\t\t}else{\r\n\t\t\tcallUpdate();\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function(){\r\n\t\tvar autosizeEnabled = scheduler.config.container_autoresize;\r\n\t\tif(!scheduler.xy.$original_scroll_width){\r\n\t\t\tscheduler.xy.$original_scroll_width = scheduler.xy.scroll_width;\r\n\t\t}\r\n\r\n\t\tscheduler.xy.scroll_width = autosizeEnabled ? 0 : scheduler.xy.$original_scroll_width;\r\n\r\n\t\tif(scheduler.matrix){\r\n\t\t\tfor(var i in scheduler.matrix){\r\n\t\t\t\tvar timeline = scheduler.matrix[i];\r\n\t\t\t\tif(!timeline.$original_section_autoheight){\r\n\t\t\t\t\ttimeline.$original_section_autoheight = timeline.section_autoheight;\r\n\t\t\t\t}\r\n\t\t\t\tif(autosizeEnabled){\r\n\t\t\t\t\ttimeline.section_autoheight = false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\ttimeline.section_autoheight = timeline.$original_section_autoheight;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onXLE\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventChanged\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventCreated\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventAdded\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventDeleted\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onAfterSchedulerResize\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onClearAll\", conditionalUpdateContainerHeight);\r\n\r\n\t//disable container autoresize when expanded\r\n\tscheduler.attachEvent(\"onBeforeExpand\", function(){\r\n\t\tactive = false;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeCollapse\", function(){\r\n\t\tactive = true;\r\n\t\treturn true;\r\n\t});\r\n\t// helper function\r\n\tfunction getScrollSize() {\r\n\t\tvar div = document.createElement(\"div\");\r\n\t\tdiv.style.cssText = \"visibility:hidden;position:absolute;left:-1000px;width:100px;padding:0px;margin:0px;height:110px;min-height:100px;overflow-y:scroll;\";\r\n\r\n\t\tdocument.body.appendChild(div);\r\n\t\tvar size = div.offsetWidth - div.clientWidth;\r\n\t\tdocument.body.removeChild(div);\r\n\t\treturn size;\r\n\t}\r\n\r\n\r\n}","export default function(scheduler){\r\n\tfunction setCookie(name,cookie_param,value) {\r\n\t\tvar str = name + \"=\" + value + (cookie_param?(\"; \"+cookie_param):\"\");\r\n\t\tdocument.cookie = str;\r\n\t}\r\n\tfunction getCookie(name) {\r\n\t\tvar search = name + \"=\";\r\n\t\tif (document.cookie.length > 0) {\r\n\t\t\tvar offset = document.cookie.indexOf(search);\r\n\t\t\tif (offset != -1) {\r\n\t\t\t\toffset += search.length;\r\n\t\t\t\tvar end = document.cookie.indexOf(\";\", offset);\r\n\t\t\t\tif (end == -1)\r\n\t\t\t\t\tend = document.cookie.length;\r\n\t\t\t\treturn document.cookie.substring(offset, end);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}\r\n\r\n\tfunction getCookieName(scheduler) {\r\n\t\treturn (scheduler._obj.id || \"scheduler\") + \"_settings\";\r\n\t}\r\n\r\n\tvar first = true;\r\n\tscheduler.attachEvent(\"onBeforeViewChange\",function(oldMode,oldDate,mode,date){\r\n\t\t// if Url plugin is enabled - explicit url values should have more priority than cookies\r\n\t\tif (first && scheduler._get_url_nav){\r\n\t\t\tvar urlNavigationPlugin = scheduler._get_url_nav();\r\n\t\t\tif(urlNavigationPlugin.date || urlNavigationPlugin.mode || urlNavigationPlugin.event){\r\n\t\t\t\tfirst = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar cookie = getCookieName(scheduler);\r\n\r\n\t\tif (first){\r\n\t\t\tfirst = false;\r\n\t\t\tvar schedulerCookie = getCookie(cookie);\r\n\t\t\tif (schedulerCookie){\r\n\r\n\t\t\t\tif(!scheduler._min_date){\r\n\t\t\t\t\t//otherwise scheduler will have incorrect date until timeout\r\n\t\t\t\t\t//it can cause js error with 'onMouseMove' handler of key_nav.js\r\n\t\t\t\t\tscheduler._min_date = date;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tschedulerCookie = unescape(schedulerCookie).split(\"@\");\r\n\t\t\t\tschedulerCookie[0] = this._helpers.parseDate(schedulerCookie[0]);\r\n\t\t\t\tvar view = this.isViewExists(schedulerCookie[1]) ? schedulerCookie[1] : mode,\r\n\t\t\t\t\tdate = !isNaN(+schedulerCookie[0]) ? schedulerCookie[0] : date;\r\n\r\n\t\t\t\twindow.setTimeout(function(){\r\n\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tscheduler.setCurrentView(date,view);\r\n\t\t\t\t},1);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", function (newMode , newDate){\r\n\t\tvar cookie = getCookieName(scheduler);\r\n\t\tvar text = escape(this._helpers.formatDate(newDate)+\"@\"+(newMode));\r\n\t\tsetCookie(cookie,\"expires=Sun, 31 Jan 9999 22:00:00 GMT\",text);\r\n\t});\r\n\r\n\t// As we are blocking first render above there could be a problem in case of dynamic loading and rendering of visible data in general ('from'/'to' won't be defined)\r\n\tvar old_load = scheduler._load;\r\n\tscheduler._load = function() {\r\n\t\tvar args = arguments;\r\n\r\n\t\tif (!scheduler._date) {\r\n\t\t\tvar that = this;\r\n\t\t\twindow.setTimeout(function() {\r\n\t\t\t\told_load.apply(that, args);\r\n\t\t\t},1);\r\n\t\t} else {\r\n\t\t\told_load.apply(this, args);\r\n\t\t}\r\n\t};\r\n}","export default {\r\n\talert: (extension, assert) => {\r\n\t\tassert(false, `The ${extension} extension is not included in this version of dhtmlxScheduler.
\r\n\t\tYou may need a Professional version of the component.
\r\n\t\tContact us at https://dhtmlx.com/docs/contact.shtml if you have any questions.`);\r\n\t}\r\n};","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Day Timeline\", scheduler.assert);\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Drag Between\", scheduler.assert);\r\n}","export default function(scheduler){\r\n/* global dhtmlXCombo */\r\nscheduler.form_blocks['combo']={\r\n\trender:function(sns) {\r\n\t\tif (!sns.cached_options)\r\n\t\t\tsns.cached_options = {};\r\n\t\tvar res = '';\r\n\t\tres += \"
\";\r\n\t\treturn res;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\t(function(){\r\n\t\t\tresetCombo();\r\n\t\t\tvar id = scheduler.attachEvent(\"onAfterLightbox\",function(){\r\n\t\t\t\t// otherwise destructor will never be called after form reset(e.g. in readonly event mode)\r\n\t\t\t\tresetCombo();\r\n\t\t\t\tscheduler.detachEvent(id);\r\n\t\t\t});\r\n\t\t\tfunction resetCombo(){\r\n\t\t\t\tif(node._combo && node._combo.DOMParent) {\r\n\t\t\t\t\tvar combo = node._combo;\r\n\t\t\t\t\tif(combo.unload){\r\n\t\t\t\t\t\tcombo.unload();\r\n\t\t\t\t\t}else if(combo.destructor){\r\n\t\t\t\t\t\tcombo.destructor();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// dhtmlxCombo 4.1.0 bug\r\n\t\t\t\t\tcombo.DOMParent = combo.DOMelem = null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})();\r\n\t\twindow.dhx_globalImgPath = config.image_path||'/';\r\n\t\tnode._combo = new dhtmlXCombo(node, config.name, node.offsetWidth-8);\r\n\t\tif (config.onchange)\r\n\t\t\tnode._combo.attachEvent(\"onChange\", config.onchange);\r\n\r\n\t\tif (config.options_height)\r\n\t\t\tnode._combo.setOptionHeight(config.options_height);\r\n\t\tvar combo = node._combo;\r\n\t\tcombo.enableFilteringMode(config.filtering, config.script_path||null, !!config.cache);\r\n\r\n\t\tif (!config.script_path) { // script-side filtration is used\r\n\t\t\tvar all_options = [];\r\n\t\t\tfor (var i = 0; i < config.options.length; i++) {\r\n\t\t\t\tvar option = config.options[i];\r\n\t\t\t\tvar single_option = [\r\n\t\t\t\t\toption.key,\r\n\t\t\t\t\toption.label,\r\n\t\t\t\t\toption.css\r\n\t\t\t\t];\r\n\t\t\t\tall_options.push(single_option);\r\n\t\t\t}\r\n\t\t\tcombo.addOption(all_options);\r\n\t\t\tif (ev[config.map_to]) {\r\n\t\t\t\tvar index = combo.getIndexByValue(ev[config.map_to]);\r\n\t\t\t\tcombo.selectOption(index);\r\n\t\t\t}\r\n\t\t} else { // server-side filtration is used\r\n\t\t\tvar selected_id = ev[config.map_to];\r\n\t\t\tif (selected_id) {\r\n\t\t\t\tif (config.cached_options[selected_id]) {\r\n\t\t\t\t\tcombo.addOption(selected_id, config.cached_options[selected_id]);\r\n\t\t\t\t\tcombo.disable(1);\r\n\t\t\t\t\tcombo.selectOption(0);\r\n\t\t\t\t\tcombo.disable(0);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tscheduler.ajax.get(config.script_path+\"?id=\"+selected_id+\"&uid=\"+scheduler.uid(), function(result){\r\n\t\t\t\t\t\tvar responseText = result.xmlDoc.responseText;\r\n\t\t\t\t\t\tvar label;\r\n\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\tvar res = JSON.parse(responseText);\r\n\t\t\t\t\t\t\tlabel = res.options[0].text;\r\n\t\t\t\t\t\t}catch(e){\r\n\t\t\t\t\t\t\tvar option = scheduler.ajax.xpath(\"//option\", result.xmlDoc)[0];\r\n\t\t\t\t\t\t\tlabel = option.childNodes[0].nodeValue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tconfig.cached_options[selected_id] = label;\r\n\t\t\t\t\t\tcombo.addOption(selected_id, label);\r\n\t\t\t\t\t\tcombo.disable(1);\r\n\t\t\t\t\t\tcombo.selectOption(0);\r\n\t\t\t\t\t\tcombo.disable(0);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tcombo.setComboValue(\"\");\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config) {\r\n\t\tvar selected_id = node._combo.getSelectedValue(); // value = key\r\n\t\tif (config.script_path) {\r\n\t\t\tconfig.cached_options[selected_id] = node._combo.getSelectedText();\r\n\t\t}\r\n\t\treturn selected_id;\r\n\t},\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\nscheduler.form_blocks['radio']={\r\n\trender:function(sns) {\r\n\t\tvar res = '';\r\n\t\tres += `
`;\r\n\t\tfor (var i=0; i\"+\" \"+sns.options[i].label+\"\";\r\n\t\t}\r\n\t\tres += \"
\";\r\n\r\n\t\treturn res;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\tvar radiobuttons = node.getElementsByTagName('input');\r\n\t\tfor (var i = 0; i < radiobuttons.length; i++) {\r\n\t\t\tradiobuttons[i].checked = false;\r\n\t\t\tvar checked_value = ev[config.map_to]||value;\r\n\t\t\tif (radiobuttons[i].value == checked_value) {\r\n\t\t\t\tradiobuttons[i].checked = true;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tvar radiobuttons = node.getElementsByTagName('input');\r\n\t\tfor(var i=0; i
';\r\n\t\telse\r\n\t\t\treturn '';\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\tnode=scheduler._lightbox.querySelector(`#${config.id}`);\r\n\t\tvar id = scheduler.uid();\r\n\t\tvar isChecked = (typeof config.checked_value != \"undefined\") ? value == config.checked_value : !!value;\r\n\t\tnode.className += \" dhx_cal_checkbox\";\r\n\t\tvar check_html = \"\";\r\n\t\tvar label_html = \"\";\r\n\t\tif (scheduler.config.wide_form){\r\n\t\t\tnode.innerHTML = label_html;\r\n\t\t\tnode.nextSibling.innerHTML=check_html;\r\n\t\t} else\r\n\t\t\tnode.innerHTML=check_html+label_html;\r\n\r\n\t\tif (config.handler) {\r\n\t\t\tvar checkbox = node.getElementsByTagName('input')[0];\r\n\t\t\tif(checkbox.$_eventAttached){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tcheckbox.$_eventAttached = true;\r\n\t\t\tscheduler.event(checkbox, \"click\", config.handler);\r\n\t\t\t//checkbox.onclick = config.handler;\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tnode=scheduler._lightbox.querySelector(`#${config.id}`);\r\n\t\tvar checkbox = node.getElementsByTagName('input')[0]; // moved to the header\r\n\t\tif (!checkbox)\r\n\t\t\tcheckbox = node.nextSibling.getElementsByTagName('input')[0];\r\n\t\treturn (checkbox.checked)?(config.checked_value||true):(config.unchecked_value||false);\r\n\t},\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.ext.fullscreen = {\r\n\ttoggleIcon: null\r\n};\r\n\r\nscheduler.expand = function() {\r\n\tif(!scheduler.callEvent(\"onBeforeExpand\", []))\r\n\t\treturn;\r\n\tvar t = scheduler._obj;\r\n\tdo {\r\n\t\tt._position = t.style.position || \"\";\r\n\t\tt.style.position = \"static\";\r\n\t} while ((t = t.parentNode) && t.style);\r\n\tt = scheduler._obj;\r\n\tt.style.position = \"absolute\";\r\n\tt._width = t.style.width;\r\n\tt._height = t.style.height;\r\n\tt.style.width = t.style.height = \"100%\";\r\n\tt.style.top = t.style.left = \"0px\";\r\n\r\n\tvar top = document.body;\r\n\ttop.scrollTop = 0;\r\n\r\n\ttop = top.parentNode;\r\n\tif (top)\r\n\t\ttop.scrollTop = 0;\r\n\tdocument.body._overflow = document.body.style.overflow || \"\";\r\n\tdocument.body.style.overflow = \"hidden\";\r\n\tscheduler._maximize();\r\n\tscheduler.callEvent(\"onExpand\", []);\r\n};\r\nscheduler.collapse = function() {\r\n\tif(!scheduler.callEvent(\"onBeforeCollapse\", []))\r\n\t\treturn;\r\n\tvar t = scheduler._obj;\r\n\tdo {\r\n\t\tt.style.position = t._position;\r\n\t} while ((t = t.parentNode) && t.style);\r\n\tt = scheduler._obj;\r\n\tt.style.width = t._width;\r\n\tt.style.height = t._height;\r\n\tdocument.body.style.overflow = document.body._overflow;\r\n\tscheduler._maximize();\r\n\tscheduler.callEvent(\"onCollapse\", []);\r\n};\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar t = document.createElement(\"div\");\r\n\tt.className = \"dhx_expand_icon\";\r\n\tscheduler.ext.fullscreen.toggleIcon = t;\r\n\tt.innerHTML = `\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t`;\r\n\tscheduler._obj.appendChild(t);\r\n\tscheduler.event(t, \"click\", function() {\r\n\t\tif (!scheduler.expanded)\r\n\t\t\tscheduler.expand(); else\r\n\t\t\tscheduler.collapse();\r\n\t});\r\n});\r\nscheduler._maximize = function() {\r\n\tthis.expanded = !this.expanded;\r\n\tif(this.expanded){\r\n\t\tthis.ext.fullscreen.toggleIcon.classList.add(\"dhx_expand_icon--expanded\");\r\n\t\t\r\n\t}else{\r\n\t\tthis.ext.fullscreen.toggleIcon.classList.remove(\"dhx_expand_icon--expanded\");\r\n\t}\r\n\t\r\n\t//scheduler.ext.fullscreen.toggleIcon.style.backgroundPosition = \"0 \" + (this.expanded ? \"0\" : \"18\") + \"px\";\r\n\r\n\tvar directions = ['left', 'top'];\r\n\tfor (var i = 0; i < directions.length; i++) {\r\n\t\t//var margin = scheduler.xy['margin_' + directions[i]];\r\n\t\tvar prev_margin = scheduler['_prev_margin_' + directions[i]];\r\n\t\tif (scheduler.xy['margin_' + directions[i]]) {\r\n\t\t\tscheduler['_prev_margin_' + directions[i]] = scheduler.xy['margin_' + directions[i]];\r\n\t\t\tscheduler.xy['margin_' + directions[i]] = 0;\r\n\t\t} else {\r\n\t\t\tif (prev_margin) {\r\n\t\t\t\tscheduler.xy['margin_' + directions[i]] = scheduler['_prev_margin_' + directions[i]];\r\n\t\t\t\tdelete scheduler['_prev_margin_' + directions[i]];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler.setCurrentView();\r\n};\r\n\r\n\r\n}\r\n","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Grid\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\tvar els = document.body.getElementsByTagName(\"DIV\");\r\n\tfor (var i=0; i < els.length; i++) {\r\n\t\tvar cs = els[i].className||\"\";\r\n\t\tcs = cs.split(\":\");\r\n\t\tif (cs.length == 2 && cs[0] == \"template\"){\r\n\t\t\tvar code = \"return \\\"\"+(els[i].innerHTML||\"\").replace(/\\\\/g, \"\\\\\\\\\").replace(/\"/g,\"\\\\\\\"\").replace(/[\\n\\r]+/g,\"\")+\"\\\";\";\r\n\t\t\tcode = unescape(code).replace(/\\{event\\.([a-z]+)\\}/g,function(all,mask){\r\n\t\t\t\treturn '\"+ev.'+mask+'+\"';\r\n\t\t\t});\r\n\t\t\tscheduler.templates[cs[1]]=Function(\"start\",\"end\",\"ev\",code);\r\n\t\t\tels[i].style.display='none';\r\n\t\t}\r\n\t}\r\n});\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.shortcuts = {\r\n\tcreateCommand: function(){\r\n\t\treturn {\r\n\t\t\tmodifiers:{\r\n\t\t\t\t\"shift\": false,\r\n\t\t\t\t\"alt\": false,\r\n\t\t\t\t\"ctrl\": false,\r\n\t\t\t\t\"meta\": false\r\n\t\t\t},\r\n\t\t\tkeyCode: null\r\n\t\t};\r\n\t},\r\n\tparse: function(shortcut){\r\n\t\tvar commands = [];\r\n\r\n\t\tvar expr = this.getExpressions(this.trim(shortcut));\r\n\t\tfor(var i = 0; i < expr.length; i++){\r\n\t\t\tvar words = this.getWords(expr[i]);\r\n\r\n\t\t\tvar command = this.createCommand();\r\n\r\n\t\t\tfor(var j = 0; j < words.length; j++){\r\n\t\t\t\tif(this.commandKeys[words[j]]){\r\n\t\t\t\t\tcommand.modifiers[words[j]] = true;\r\n\t\t\t\t}else if(this.specialKeys[words[j]]){\r\n\t\t\t\t\tcommand.keyCode = this.specialKeys[words[j]];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcommand.keyCode = words[j].charCodeAt(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tcommands.push(command);\r\n\t\t}\r\n\t\treturn commands;\r\n\t},\r\n\r\n\tgetCommandFromEvent: function(domEvent){\r\n\t\tvar command = this.createCommand();\r\n\t\tcommand.modifiers.shift = !!domEvent.shiftKey;\r\n\t\tcommand.modifiers.alt = !!domEvent.altKey;\r\n\t\tcommand.modifiers.ctrl = !!domEvent.ctrlKey;\r\n\t\tcommand.modifiers.meta = !!domEvent.metaKey;\r\n\t\tcommand.keyCode = domEvent.which || domEvent.keyCode;\r\n\r\n\t\tif(command.keyCode >= 96 && command.keyCode <= 105){\r\n\t\t\t// numpad keys 96-105 -> 48-57\r\n\t\t\tcommand.keyCode -= 48;//convert numpad number code to regular number code\r\n\t\t}\r\n\r\n\t\tvar printableKey = String.fromCharCode(command.keyCode );\r\n\t\tif(printableKey){\r\n\t\t\tcommand.keyCode = printableKey.toLowerCase().charCodeAt(0);\r\n\t\t}\r\n\t\treturn command;\r\n\t},\r\n\r\n\tgetHashFromEvent: function(domEvent){\r\n\t\treturn this.getHash(this.getCommandFromEvent(domEvent));\r\n\t},\r\n\r\n\tgetHash: function(command){\r\n\t\tvar parts = [];\r\n\t\tfor(var i in command.modifiers){\r\n\t\t\tif(command.modifiers[i]){\r\n\t\t\t\tparts.push(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tparts.push(command.keyCode);\r\n\r\n\t\treturn parts.join(this.junctionChar);\r\n\t},\r\n\r\n\tgetExpressions: function(shortcut){\r\n\t\treturn shortcut.split(this.junctionChar);\r\n\t},\r\n\tgetWords: function(term){\r\n\t\treturn term.split(this.combinationChar);\r\n\t},\r\n\ttrim: function(shortcut){\r\n\t\treturn shortcut.replace(/\\s/g, \"\");\r\n\t},\r\n\tjunctionChar:\",\",\r\n\tcombinationChar:\"+\",\r\n\tcommandKeys:{\r\n\t\t\"shift\": 16,\r\n\t\t\"alt\": 18,\r\n\t\t\"ctrl\": 17,\r\n\t\t\"meta\": true\r\n\t},\r\n\tspecialKeys:{\r\n\t\t\"backspace\": 8,\r\n\t\t\"tab\": 9,\r\n\t\t\"enter\": 13,\r\n\t\t\"esc\": 27,\r\n\t\t\"space\": 32,\r\n\t\t\"up\": 38,\r\n\t\t\"down\": 40,\r\n\t\t\"left\": 37,\r\n\t\t\"right\": 39,\r\n\t\t\"home\": 36,\r\n\t\t\"end\": 35,\r\n\t\t\"pageup\": 33,\r\n\t\t\"pagedown\": 34,\r\n\t\t\"delete\": 46,\r\n\t\t\"insert\": 45,\r\n\t\t\"plus\":107,\r\n\t\t\"f1\": 112,\r\n\t\t\"f2\": 113,\r\n\t\t\"f3\": 114,\r\n\t\t\"f4\": 115,\r\n\t\t\"f5\": 116,\r\n\t\t\"f6\": 117,\r\n\t\t\"f7\": 118,\r\n\t\t\"f8\": 119,\r\n\t\t\"f9\": 120,\r\n\t\t\"f10\": 121,\r\n\t\t\"f11\": 122,\r\n\t\t\"f12\": 123\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.EventHandler = {\r\n\t_handlers: null,\r\n\tfindHandler: function(command){\r\n\t\tif(!this._handlers) this._handlers = {};\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\t\tvar hash = shortcuts.getHash(command);\r\n\r\n\t\treturn this._handlers[hash];\r\n\t},\r\n\r\n\tdoAction: function(command, e){\r\n\t\tvar handler = this.findHandler(command);\r\n\t\tif(handler){\r\n\t\t\thandler.call(this, e);\r\n\r\n\t\t\tif (e.preventDefault) e.preventDefault();\r\n\t\t\telse e.returnValue = false;\r\n\r\n\t\t}\r\n\t},\r\n\tbind: function(shortcut, handler){\r\n\t\tif(!this._handlers) this._handlers = {};\r\n\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\r\n\t\tvar commands = shortcuts.parse(shortcut);\r\n\t\tfor(var i = 0; i < commands.length; i++){\r\n\t\t\tthis._handlers[shortcuts.getHash(commands[i])] = handler;\r\n\t\t}\r\n\t},\r\n\tunbind: function(shortcut){\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\r\n\t\tvar commands = shortcuts.parse(shortcut);\r\n\t\tfor(var i = 0; i < commands.length; i++){\r\n\t\t\tif(this._handlers[shortcuts.getHash(commands[i])]){\r\n\t\t\t\tdelete this._handlers[shortcuts.getHash(commands[i])];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tbindAll: function(map){\r\n\t\tfor(var i in map){\r\n\t\t\tthis.bind(i, map[i]);\r\n\t\t}\r\n\t},\r\n\tinitKeys: function(){\r\n\t\tif(!this._handlers)\r\n\t\t\tthis._handlers = {};\r\n\t\tif(this.keys){\r\n\t\t\tthis.bindAll(this.keys);\r\n\t\t}\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n(function(){\r\n\tscheduler.$keyboardNavigation.getFocusableNodes = scheduler._getFocusableNodes;\r\n\r\n\tscheduler.$keyboardNavigation.trapFocus = function trapFocus(root, e){\r\n\t\tif(e.keyCode != 9) return false;\r\n\r\n\t\tvar focusable = scheduler.$keyboardNavigation.getFocusableNodes(root);\r\n\t\tvar currentFocus = document.activeElement;\r\n\t\tvar currentIndex = -1;\r\n\t\tfor(var i = 0; i < focusable.length; i++){\r\n\t\t\tif(focusable[i] == currentFocus){\r\n\t\t\t\tcurrentIndex = i;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar nextIndex, nextItem;\r\n\t\tif(e.shiftKey){\r\n\r\n\t\t\t// back tab\r\n\t\t\t// go to the last element if we focused on the first\r\n\t\t\tnextIndex = (currentIndex <= 0) ? (focusable.length - 1) : (currentIndex - 1);\r\n\r\n\t\t\tnextItem = focusable[nextIndex];\r\n\t\t\tif(nextItem){\r\n\t\t\t\tnextItem.focus();\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\t// forward tab\r\n\t\t\t// forward tab from last element should go back to the first element\r\n\t\t\tnextIndex = (currentIndex >= focusable.length - 1) ? 0 : (currentIndex + 1);\r\n\t\t\tnextItem = focusable[nextIndex];\r\n\t\t\tif(nextItem){\r\n\t\t\t\tnextItem.focus();\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t};\r\n})();\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.marker = {\r\n\tclear: function(){\r\n\t\tvar divs = scheduler.$container.querySelectorAll(\".dhx_focus_slot\");\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tdivs[i].parentNode.removeChild(divs[i]);\r\n\t\t}\r\n\t},\r\n\tcreateElement: function(){\r\n\t\tvar element = document.createElement(\"div\");\r\n\t\telement.setAttribute(\"tabindex\", -1);\r\n\t\telement.className = \"dhx_focus_slot\";\r\n\t\treturn element;\r\n\t},\r\n\r\n\trenderMultiple: function(start, end, method){\r\n\t\tvar divs = [];\r\n\t\tvar currentStart = new Date(start);\r\n\t\tvar currentEnd = new Date(Math.min(end.valueOf(), scheduler.date.add(scheduler.date.day_start(new Date(start)), 1, \"day\").valueOf()));\r\n\t\twhile(currentStart.valueOf() < end.valueOf()){\r\n\r\n\t\t\tdivs = divs.concat(method.call(this, currentStart, new Date(Math.min(currentEnd.valueOf(), end.valueOf()))));\r\n\t\t\tcurrentStart = scheduler.date.day_start(scheduler.date.add(currentStart, 1, \"day\"));\r\n\r\n\t\t\tcurrentEnd = scheduler.date.day_start(scheduler.date.add(currentStart, 1, \"day\"));\r\n\t\t\tcurrentEnd = new Date(Math.min(currentEnd.valueOf(), end.valueOf()));\r\n\t\t}\r\n\r\n\t\treturn divs;\r\n\t},\r\n\r\n\r\n\trender: function(start, end, section){\r\n\t\tthis.clear();\r\n\t\tvar divs = [];\r\n\r\n\t\tvar modes = scheduler.$keyboardNavigation.TimeSlot.prototype._modes;\r\n\t\tvar view = scheduler.$keyboardNavigation.TimeSlot.prototype._getMode();\r\n\t\tswitch (view){\r\n\t\t\tcase modes.units:\r\n\t\t\t\tdivs = this.renderVerticalMarker(start, end, section);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.timeline:\r\n\t\t\t\tdivs = this.renderTimelineMarker(start, end, section);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.year:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderYearMarker));\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.month:\r\n\t\t\t\tdivs = this.renderMonthMarker(start, end);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.weekAgenda:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderWeekAgendaMarker));\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.list:\r\n\t\t\t\tdivs = this.renderAgendaMarker(start, end);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.dayColumns:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderVerticalMarker));\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tthis.addWaiAriaLabel(divs, start, end, section);\r\n\t\tthis.addDataAttributes(divs, start, end, section);\r\n\r\n\t\tfor(var i = divs.length - 1; i >= 0; i--){\r\n\t\t\tif(divs[i].offsetWidth){\r\n\t\t\t\treturn divs[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t},\r\n\r\n\taddDataAttributes: function(divs, start, end, section){\r\n\t\tvar dateToStr = scheduler.date.date_to_str(scheduler.config.api_date);\r\n\r\n\t\tvar from = dateToStr(start),\r\n\t\t\tto = dateToStr(end);\r\n\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tdivs[i].setAttribute(\"data-start-date\", from);\r\n\t\t\tdivs[i].setAttribute(\"data-end-date\", to);\r\n\t\t\tif(section){\r\n\t\t\t\tdivs[i].setAttribute(\"data-section\", section);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\taddWaiAriaLabel: function(divs, start, end, section){\r\n\t\tvar label = \"\";\r\n\t\tvar state = scheduler.getState();\r\n\t\tvar mode = state.mode;\r\n\r\n\t\tvar dateTimeLabel = false;\r\n\r\n\t\tlabel += scheduler.templates.day_date(start);\r\n\r\n\t\tif((scheduler.date.day_start(new Date(start)).valueOf() != start.valueOf())){\r\n\t\t\tlabel += \" \" + scheduler.templates.hour_scale(start);\r\n\t\t\tdateTimeLabel = true;\r\n\t\t}\r\n\r\n\t\tif((scheduler.date.day_start(new Date(start)).valueOf() != scheduler.date.day_start(new Date(end)).valueOf())){\r\n\r\n\t\t\tlabel += \" - \" + scheduler.templates.day_date(end);\r\n\t\t\tif(dateTimeLabel || (scheduler.date.day_start(new Date(end)).valueOf() != end.valueOf())){\r\n\t\t\t\tlabel += \" \" + scheduler.templates.hour_scale(end);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(section){\r\n\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\t\t\t\tconst timeline = scheduler.matrix[mode];\r\n\t\t\t\tconst sectionObject = timeline.y_unit[timeline.order[section]];\r\n\t\t\t\tlabel += \", \" + scheduler.templates[mode + \"_scale_label\"](sectionObject.key, sectionObject.label, sectionObject);\r\n\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\tconst units = scheduler._props[mode];\r\n\t\t\t\tconst sectionObject = units.options[units.order[section]];\r\n\r\n\t\t\t\tlabel += \", \" + scheduler.templates[mode + \"_scale_text\"](sectionObject.key, sectionObject.label, sectionObject);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tscheduler._waiAria.setAttributes(divs[i], {\r\n\t\t\t\t\"aria-label\": label,\r\n\t\t\t\t\"aria-live\": \"polite\"\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\r\n\trenderWeekAgendaMarker: function(start_date, end_date){\r\n\t\tvar divs = scheduler.$container.querySelectorAll(\".dhx_wa_day_cont .dhx_wa_scale_bar\");\r\n\r\n\t\tvar currDate = scheduler.date.week_start(new Date(scheduler.getState().min_date));\r\n\r\n\t\tvar index = -1;\r\n\t\tvar markerDate = scheduler.date.day_start(new Date(start_date));\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tindex++;\r\n\t\t\tif(scheduler.date.day_start(new Date(currDate)).valueOf() == markerDate.valueOf()){\r\n\t\t\t\tbreak;\r\n\t\t\t}else{\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(index != -1) return this._wrapDiv(divs[index]);\r\n\t\treturn [];\r\n\t},\r\n\r\n\t_wrapDiv: function(cell){\r\n\t\tvar marker = this.createElement();\r\n\t\tmarker.style.top = cell.offsetTop + \"px\";\r\n\t\tmarker.style.left = cell.offsetLeft + \"px\";\r\n\t\tmarker.style.width = cell.offsetWidth + \"px\";\r\n\t\tmarker.style.height = cell.offsetHeight + \"px\";\r\n\t\tcell.appendChild(marker);\r\n\t\treturn [marker];\r\n\t},\r\n\trenderYearMarker: function(start_date, end_date){\r\n\t\tvar cell = scheduler._get_year_cell(start_date);\r\n\t\tcell.style.position = \"relative\";\r\n\t\tvar marker = this.createElement();\r\n\t\tmarker.style.top = \"0px\";\r\n\t\tmarker.style.left = \"0px\";\r\n\t\tmarker.style.width = \"100%\";\r\n\t\tmarker.style.height = \"100%\";\r\n\t\tcell.appendChild(marker);\r\n\t\treturn [marker];\r\n\t},\r\n\r\n\trenderAgendaMarker: function(start_date, end_date){\r\n\t\tvar block = this.createElement();\r\n\t\tblock.style.height = \"1px\";\r\n\t\tblock.style.width = \"100%\";\r\n\t\tblock.style.opacity = 1;\r\n\t\tblock.style.top = \"0px\";\r\n\t\tblock.style.left = \"0px\";\r\n\t\tscheduler.$container.querySelector(\".dhx_cal_data\").appendChild(block);\r\n\t\treturn [block];\r\n\t},\r\n\r\n\trenderTimelineMarker: function(start_date, end_date, section){\r\n\t\tvar view_opts = scheduler._lame_copy({}, scheduler.matrix[scheduler._mode]);\r\n\t\tvar areas = view_opts._scales;\r\n\t\t//timespans must always use actual position, not rounded\r\n\t\tview_opts.round_position = false;\r\n\t\tvar blocks = [];\r\n\r\n\t\tvar min_date = start_date ? new Date(start_date) : scheduler._min_date;\r\n\t\tvar max_date = end_date ? new Date(end_date) : scheduler._max_date;\r\n\r\n\t\tif(min_date.valueOf() < scheduler._min_date.valueOf())\r\n\t\t\tmin_date = new Date(scheduler._min_date);\r\n\t\tif(max_date.valueOf() > scheduler._max_date.valueOf())\r\n\t\t\tmax_date = new Date(scheduler._max_date);\r\n\r\n\t\tif(!view_opts._trace_x) return blocks;\r\n\r\n\t\tfor(var i = 0; i < view_opts._trace_x.length; i++){\r\n\t\t\tif(scheduler._is_column_visible(view_opts._trace_x[i]))\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\tif(i == view_opts._trace_x.length)\r\n\t\t\treturn blocks;\r\n\r\n\t\tvar area = areas[section];\r\n\r\n\t\tif (!(min_date < end_date && max_date > start_date))\r\n\t\t\treturn blocks;\r\n\r\n\t\tvar block = this.createElement();\r\n\r\n\t\tlet start_pos;\r\n\t\tlet end_pos;\r\n\r\n\t\tfunction set_date_part(source, target) {\r\n\t\t\t// reset to start of the month in order to prevent month change when target is on 31th day, and source month has only 30 days\r\n\t\t\ttarget.setDate(1);\r\n\r\n\t\t\ttarget.setFullYear(source.getFullYear());\r\n\t\t\ttarget.setMonth(source.getMonth());\r\n\t\t\ttarget.setDate(source.getDate());\r\n\t\t}\r\n\r\n\t\tif(!scheduler.getView().days){\r\n\t\t\tstart_pos = scheduler._timeline_getX({start_date: start_date}, false, view_opts);\r\n\t\t\tend_pos = scheduler._timeline_getX({start_date: end_date}, false, view_opts);\r\n\t\t}else{\r\n\t\t\t// daytimeline\r\n\t\t\tconst tempStart = new Date(start_date);\r\n\t\t\tset_date_part(scheduler._min_date, tempStart);\r\n\t\t\tconst tempEnd = new Date(end_date);\r\n\t\t\tset_date_part(scheduler._min_date, tempEnd);\r\n\t\t\tstart_pos = scheduler._timeline_getX({start_date: tempStart}, false, view_opts);\r\n\t\t\tend_pos = scheduler._timeline_getX({start_date: tempEnd}, false, view_opts);\r\n\t\t}\r\n\r\n\t\tvar height = ((view_opts._section_height[section]-1) || (view_opts.dy - 1));\r\n\r\n\t\tvar top = 0;\r\n\t\tif (scheduler._isRender('cell')){\r\n\t\t\ttop = area.offsetTop;\r\n\t\t\tstart_pos += view_opts.dx;\r\n\t\t\tend_pos += view_opts.dx;\r\n\t\t\tarea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t}else{\r\n\r\n\t\t}\r\n\t\tvar width = Math.max(1, end_pos - start_pos - 1);\r\n\t\tlet direction = \"left\";\r\n\t\tif(scheduler.config.rtl){\r\n\t\t\tdirection = \"right\";\r\n\t\t}\r\n\t\tblock.style.cssText = `height:${height}px; ${direction}:${start_pos}px; width:${width}px; top:${top}px;`;\r\n\r\n\t\tif(area){\r\n\t\t\tarea.appendChild(block);\r\n\t\t\tblocks.push(block);\r\n\t\t}\r\n\r\n\t\treturn blocks;\r\n\t},\r\n\r\n\trenderMonthCell: function(date){\r\n\t\tvar cells = scheduler.$container.querySelectorAll(\".dhx_month_head\");\r\n\r\n\t\tvar divs = [];\r\n\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\tdivs.push(cells[i].parentNode);\r\n\t\t}\r\n\r\n\t\tvar firstDate = scheduler.date.week_start(new Date(scheduler.getState().min_date));\r\n\r\n\t\tvar index = -1;\r\n\t\tvar weekNumber = 0;\r\n\t\tvar dayIndex = -1;\r\n\t\tvar currDate = firstDate;\r\n\t\tvar markerDate = scheduler.date.day_start(new Date(date));\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tindex++;\r\n\r\n\t\t\tif(dayIndex == 6){\r\n\t\t\t\tweekNumber++;\r\n\t\t\t\tdayIndex = 0;\r\n\t\t\t}else{\r\n\t\t\t\tdayIndex++;\r\n\t\t\t}\r\n\r\n\t\t\tif(scheduler.date.day_start(new Date(currDate)).valueOf() == markerDate.valueOf()){\r\n\t\t\t\tbreak;\r\n\t\t\t}else{\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(index == -1){\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tvar left = scheduler._colsS[dayIndex];\r\n\t\tvar top = scheduler._colsS.heights[weekNumber];\r\n\r\n\t\tvar div = this.createElement();\r\n\t\tdiv.style.top = top + \"px\";\r\n\t\tdiv.style.left = left + \"px\";\r\n\t\tdiv.style.width = scheduler._cols[dayIndex] + \"px\";\r\n\t\tdiv.style.height = ((scheduler._colsS.heights[weekNumber + 1] - top) || scheduler._colsS.height) + \"px\" ;\r\n\r\n\r\n\t\tvar container = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\r\n\t\tvar datatable = container.querySelector(\".dhx_cal_month_table\");\r\n\t\tif(datatable.nextSibling){\r\n\t\t\tcontainer.insertBefore(div, datatable.nextSibling);\r\n\t\t}else{\r\n\t\t\tcontainer.appendChild(div);\r\n\t\t}\r\n\t\treturn div;\r\n\t},\r\n\trenderMonthMarker: function(start_date, end_date){\r\n\t\tvar res = [];\r\n\t\tvar currentDate = start_date;\r\n\t\twhile(currentDate.valueOf() < end_date.valueOf()){\r\n\t\t\tres.push(this.renderMonthCell(currentDate));\r\n\t\t\tcurrentDate = scheduler.date.add(currentDate, 1, \"day\");\r\n\t\t}\r\n\t\treturn res;\r\n\t},\r\n\r\n\trenderVerticalMarker: function(start_date, end_date, section){\r\n\t\tvar index = scheduler.locate_holder_day(start_date);\r\n\r\n\t\tvar divs = [];\r\n\t\tvar area = null;\r\n\r\n\t\tvar c = scheduler.config;\r\n\t\tif(scheduler._ignores[index]) return divs;\r\n\r\n\t\tif (scheduler._props && scheduler._props[scheduler._mode] && section) {\r\n\t\t\tvar view = scheduler._props[scheduler._mode];\r\n\t\t\tindex = view.order[section];\r\n\r\n\t\t\tvar inner_index = view.order[section];\r\n\t\t\tif(!(view.days > 1)){\r\n\t\t\t\tindex = inner_index;\r\n\t\t\t\tif (view.size && (index > view.position+view.size)) {\r\n\t\t\t\t\tindex = 0;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t//var units_l = view.size || view.options.length;\r\n\r\n\t\t\t\tindex = scheduler.locate_holder_day(start_date) + inner_index;\r\n\t\t\t\t//index = index*units_l + inner_index;\r\n\t\t\t}\r\n\t\t}\r\n\t\tarea = scheduler.locate_holder(index);\r\n\t\tif(!area || area.querySelector(\".dhx_scale_hour\")){\r\n\t\t\t// hour scale instead of date column\r\n\t\t\treturn document.createElement(\"div\");\r\n\t\t}\r\n\r\n\t\tvar start = Math.max((start_date.getHours()*60 + start_date.getMinutes()), c.first_hour*60);\r\n\r\n\r\n\t\tvar end = Math.min((end_date.getHours()*60 + end_date.getMinutes()), c.last_hour*60);\r\n\t\tif(!end && (scheduler.date.day_start(new Date(end_date)).valueOf() > scheduler.date.day_start(new Date(start_date)).valueOf())){\r\n\t\t\tend = c.last_hour*60;\r\n\t\t}\r\n\r\n\t\tif (end <= start) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tvar block = this.createElement();\r\n\r\n\t\t// +1 for working with section which really takes up whole height (as % would be == 0)\r\n\t\tvar all_hours_height = scheduler.config.hour_size_px*c.last_hour + 1;\r\n\t\tvar hour_ms = 60*60*1000;\r\n\t\tblock.style.top = (Math.round((start*60*1000-scheduler.config.first_hour*hour_ms)*scheduler.config.hour_size_px/hour_ms) % all_hours_height) + \"px\";\r\n\t\tblock.style.lineHeight = block.style.height = Math.max((Math.round(((end-start)*60*1000)*scheduler.config.hour_size_px/hour_ms)) % all_hours_height, 1)+\"px\";\r\n\t\tblock.style.width = \"100%\";\r\n\t\tarea.appendChild(block);\r\n\t\tdivs.push(block);\r\n\t\treturn divs[0];\r\n\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode = function(){};\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.EventHandler,\r\n\t{\r\n\t\tgetDefaultNode: function(){\r\n\t\t\tvar node = new scheduler.$keyboardNavigation.TimeSlot();\r\n\r\n\t\t\tif(!node.isValid()){\r\n\t\t\t\tnode = node.fallback();\r\n\t\t\t}\r\n\t\t\treturn node;\r\n\t\t},\r\n\r\n\t\t_modes:{\r\n\t\t\tmonth: \"month\",\r\n\t\t\tyear: \"year\",\r\n\t\t\tdayColumns: \"dayColumns\",\r\n\t\t\ttimeline:\"timeline\",\r\n\t\t\tunits:\"units\",\r\n\t\t\tweekAgenda: \"weekAgenda\",\r\n\t\t\tlist: \"list\"\r\n\t\t},\r\n\t\tgetMode: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tvar mode = state.mode;\r\n\t\t\tif((scheduler.matrix && scheduler.matrix[mode])){\r\n\t\t\t\treturn this._modes.timeline;\r\n\t\t\t} else if((scheduler._props && scheduler._props[mode])){\r\n\t\t\t\treturn this._modes.units;\r\n\t\t\t}else if(mode == \"month\"){\r\n\t\t\t\treturn this._modes.month;\r\n\t\t\t}else if(mode == \"year\"){\r\n\t\t\t\treturn this._modes.year;\r\n\t\t\t}else if(mode == \"week_agenda\"){\r\n\t\t\t\treturn this._modes.weekAgenda;\r\n\t\t\t}else if(mode == \"map\" || mode == \"agenda\" || (scheduler._grid && scheduler[\"grid_\" + mode])){\r\n\t\t\t\treturn this._modes.list;\r\n\t\t\t}else{\r\n\t\t\t\treturn this._modes.dayColumns;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.focus();\r\n\t\t},\r\n\r\n\t\tblur: function(){\r\n\r\n\t\t},\r\n\r\n\t\tdisable: function(){\r\n\t\t\tscheduler.$container.setAttribute(\"tabindex\", \"0\");\r\n\t\t},\r\n\t\tenable: function(){\r\n\t\t\tif(scheduler.$container)\r\n\t\t\t\tscheduler.$container.removeAttribute(\"tabindex\");\r\n\t\t},\r\n\t\tisEnabled: function(){\r\n\t\t\treturn scheduler.$container.hasAttribute(\"tabindex\");\r\n\t\t},\r\n\r\n\r\n\t\t_compareEvents: function(a, b){\r\n\t\t\tif (a.start_date.valueOf() == b.start_date.valueOf())\r\n\t\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\t\treturn a.start_date.valueOf() > b.start_date.valueOf() ? 1 : -1;\r\n\t\t},\r\n\r\n\t\t_pickEvent: function(from, to, startId, reverse){\r\n\t\t\tvar range = scheduler.getState();\r\n\t\t\tfrom = new Date(Math.max(range.min_date.valueOf(), from.valueOf()));\r\n\t\t\tto = new Date(Math.min(range.max_date.valueOf(), to.valueOf()));\r\n\r\n\t\t\tvar evs = scheduler.getEvents(from, to);\r\n\t\t\tevs.sort(this._compareEvents);\r\n\t\t\tif(reverse){\r\n\t\t\t\tevs = evs.reverse();\r\n\t\t\t}\r\n\r\n\t\t\tvar trim = !!startId;\r\n\t\t\tfor(var i =0; i < evs.length && trim; i++){\r\n\t\t\t\tif(evs[i].id == startId){\r\n\t\t\t\t\ttrim = false;\r\n\t\t\t\t}\r\n\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\r\n\t\t\tfor(var i = 0; i < evs.length; i++){\r\n\t\t\t\tvar eventElement = new scheduler.$keyboardNavigation.Event(evs[i].id);\r\n\t\t\t\tif(eventElement.getNode())\r\n\t\t\t\t\treturn evs[i];\r\n\t\t\t}\r\n\r\n\t\t\treturn null;\r\n\t\t},\r\n\r\n\t\tnextEventHandler: function(id){\r\n\t\t\tvar activeNode = scheduler.$keyboardNavigation.dispatcher.activeNode;\r\n\r\n\t\t\tvar startId = id || (activeNode && activeNode.eventId);\r\n\r\n\t\t\tvar nextEvent = null;\r\n\t\t\tif(startId && scheduler.getEvent(startId)){\r\n\t\t\t\tvar currEvent = scheduler.getEvent(startId);\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tcurrEvent.start_date,\r\n\t\t\t\t\tscheduler.date.add(currEvent.start_date, 1, \"year\"),\r\n\t\t\t\t\tcurrEvent.id,\r\n\t\t\t\t\tfalse\r\n\t\t\t\t);\r\n\r\n\t\t\t}\r\n\t\t\tif(!nextEvent && !id){\r\n\t\t\t\tvar visibleDates = scheduler.getState();\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tvisibleDates.min_date,\r\n\t\t\t\t\tscheduler.date.add(visibleDates.min_date, 1, \"year\"),\r\n\t\t\t\t\tnull,\r\n\t\t\t\t\tfalse\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tif(nextEvent){\r\n\r\n\t\t\t\tvar nextEv = new scheduler.$keyboardNavigation.Event(nextEvent.id);\r\n\t\t\t\tif(!nextEv.isValid()){// not visible event\r\n\t\t\t\t\tthis.nextEventHandler(nextEvent.id);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(activeNode){activeNode.blur();}\r\n\t\t\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(nextEv);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tprevEventHandler: function(id){\r\n\t\t\tvar activeNode = scheduler.$keyboardNavigation.dispatcher.activeNode;\r\n\r\n\t\t\tvar startId = id || (activeNode && activeNode.eventId);\r\n\r\n\t\t\tvar nextEvent = null;\r\n\t\t\tif(startId && scheduler.getEvent(startId)){\r\n\t\t\t\tvar currEvent = scheduler.getEvent(startId);\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tscheduler.date.add(currEvent.end_date, -1, \"year\"),\r\n\t\t\t\t\tcurrEvent.end_date,\r\n\t\t\t\t\tcurrEvent.id,\r\n\t\t\t\t\ttrue\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t\tif(!nextEvent && !id){\r\n\t\t\t\tvar visibleDates = scheduler.getState();\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tscheduler.date.add(visibleDates.max_date, -1, \"year\"),\r\n\t\t\t\t\tvisibleDates.max_date,\r\n\t\t\t\t\tnull,\r\n\t\t\t\t\ttrue\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tif(nextEvent){\r\n\t\t\t\tvar nextEv = new scheduler.$keyboardNavigation.Event(nextEvent.id);\r\n\t\t\t\tif(!nextEv.isValid()){// not visible event\r\n\t\t\t\t\tthis.prevEventHandler(nextEvent.id);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(activeNode){activeNode.blur();}\r\n\t\t\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(nextEv);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\r\n\t\t\t\"alt+1, alt+2, alt+3, alt+4, alt+5, alt+6, alt+7, alt+8, alt+9\": function(e){\r\n\t\t\t\tvar tabs = scheduler.$keyboardNavigation.HeaderCell.prototype.getNodes(\".dhx_cal_navline .dhx_cal_tab\");\r\n\t\t\t\tvar key = e.key;\r\n\t\t\t\tif(key === undefined){\r\n\t\t\t\t\tkey = e.keyCode - 48;\r\n\t\t\t\t}\r\n\t\t\t\tif(tabs[key*1 - 1]){\r\n\t\t\t\t\ttabs[key*1 - 1].click();\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+left,meta+left\": function(e){\r\n\t\t\t\tscheduler._click.dhx_cal_prev_button();\r\n\t\t\t},\r\n\t\t\t\"ctrl+right,meta+right\": function(e){\r\n\t\t\t\tscheduler._click.dhx_cal_next_button();\r\n\t\t\t},\r\n\t\t\t\"ctrl+up,meta+up\":function(e){\r\n\t\t\t\tvar dataArea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tdataArea.scrollTop -= 20;\r\n\t\t\t},\r\n\t\t\t\"ctrl+down,meta+down\": function(e){\r\n\t\t\t\tvar dataArea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tdataArea.scrollTop += 20;\r\n\t\t\t},\r\n\r\n\r\n\t\t\t\"e\": function(){\r\n\t\t\t\tthis.nextEventHandler();\r\n\t\t\t},\r\n\r\n\t\t\t\"home\": function(){\r\n\t\t\t\tscheduler.setCurrentView(new Date());\r\n\t\t\t},\r\n\r\n\t\t\t\"shift+e\": function(){\r\n\t\t\t\tthis.prevEventHandler();\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+enter,meta+enter\": function(){\r\n\t\t\t\tscheduler.addEventNow({start_date: new Date(scheduler.getState().date)});\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+c,meta+c\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t},\r\n\t\t\t\"ctrl+v,meta+v\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t},\r\n\t\t\t\"ctrl+x,meta+x\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode.prototype.bindAll(scheduler.$keyboardNavigation.SchedulerNode.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.KeyNavNode = function(){};\r\n\r\nscheduler.$keyboardNavigation.KeyNavNode.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.EventHandler,\r\n\t{\r\n\t\tisValid: function(){\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\treturn null;\r\n\t\t},\r\n\r\n\t\tmoveTo: function (element) {\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(element);\r\n\t\t},\r\n\r\n\t\tcompareTo: function(b){\r\n\t\t\t// good enough comparison of two random objects\r\n\t\t\tif(!b) return false;\r\n\t\t\tfor(var i in this){\r\n\t\t\t\tif(!!this[i] != !!b[i]) return false;\r\n\r\n\t\t\t\tvar canStringifyThis = !!(this[i] && this[i].toString);\r\n\t\t\t\tvar canStringifyThat = !!(b[i] && b[i].toString);\r\n\t\t\t\tif(canStringifyThat != canStringifyThis) return false;\r\n\t\t\t\tif(!(canStringifyThat && canStringifyThis)) {\r\n\t\t\t\t\tif(b[i] != this[i]) return false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(b[i].toString() != this[i].toString())\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\r\n\t\tgetNode: function(){},\r\n\t\tfocus: function(){\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif(node){\r\n\t\t\t\tnode.setAttribute(\"tabindex\", \"-1\");\r\n\t\t\t\t//node.className += \" scheduler_focused\";\r\n\t\t\t\tif(node.focus) node.focus();\r\n\t\t\t}\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif(node){\r\n\t\t\t\tnode.setAttribute(\"tabindex\", \"-1\");\r\n\t\t\t\t//node.className = (node.className || \"\").replace(/ ?scheduler_focused/g, \"\");\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.HeaderCell = function(index){\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.HeaderCell.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\tgetNode: function(index){\r\n\t\t\tindex = index || this.index || 0;\r\n\t\t\tvar nodes = this.getNodes();\r\n\t\t\tif(nodes[index]) return nodes[index];\r\n\t\t},\r\n\r\n\t\tgetNodes: function(selector){\r\n\t\t\tselector = selector || [\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_prev_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_next_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_today_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_tab\"\r\n\t\t\t\t].join(\", \");\r\n\r\n\t\t\tvar nodes = Array.prototype.slice.call(scheduler.$container.querySelectorAll(selector));\r\n\t\t\tnodes.sort(function(a, b){\r\n\t\t\t\treturn a.offsetLeft - b.offsetLeft;\r\n\t\t\t});\r\n\t\t\treturn nodes;\r\n\t\t},\r\n\r\n\t\t_handlers:null,\r\n\r\n\t\tisValid: function(){\r\n\t\t\treturn !!this.getNode(this.index);\r\n\t\t},\r\n\t\tfallback:function(){\r\n\t\t\tvar defaultCell = this.getNode(0);\r\n\t\t\tif(!defaultCell){\r\n\t\t\t\tdefaultCell = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}\r\n\t\t\treturn defaultCell;\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tvar newIndex = this.index - 1;\r\n\t\t\t\tif(newIndex < 0){\r\n\t\t\t\t\tnewIndex = this.getNodes().length - 1;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.HeaderCell(newIndex));\r\n\r\n\t\t\t},\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tvar newIndex = this.index + 1;\r\n\t\t\t\tif(newIndex >= this.getNodes().length){\r\n\t\t\t\t\tnewIndex = 0;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.HeaderCell(newIndex));\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t},\r\n\r\n\t\t\t\"enter\": function(){\r\n\t\t\t\tvar node = this.getNode();\r\n\t\t\t\tif(node){\r\n\t\t\t\t\tnode.click();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.HeaderCell.prototype.bindAll(scheduler.$keyboardNavigation.HeaderCell.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.Event = function(id){\r\n\tthis.eventId = null;\r\n\tif(scheduler.getEvent(id)){\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tthis.start = new Date(ev.start_date);\r\n\t\tthis.end = new Date(ev.end_date);\r\n\r\n\t\tthis.section = this._getSection(ev);\r\n\t\tthis.eventId = id;\r\n\t}\r\n};\r\n\r\nscheduler.$keyboardNavigation.Event.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\t_getNodes: function(){\r\n\t\t\treturn Array.prototype.slice.call(scheduler.$container.querySelectorAll(\"[\"+scheduler.config.event_attribute+\"]\"));\r\n\t\t},\r\n\r\n\t\t_modes: scheduler.$keyboardNavigation.SchedulerNode.prototype._modes,\r\n\r\n\t\tgetMode: scheduler.$keyboardNavigation.SchedulerNode.prototype.getMode,\r\n\r\n\t\t_handlers: null,\r\n\t\tisValid: function(){\r\n\t\t\treturn !!(scheduler.getEvent(this.eventId) && this.getNode());\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\tvar eventNode = this._getNodes()[0];\r\n\t\t\tvar defaultElement = null;\r\n\t\t\tif(!eventNode || !(scheduler._locate_event(eventNode))){\r\n\t\t\t\tdefaultElement = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}else{\r\n\t\t\t\tvar id = scheduler._locate_event(eventNode);\r\n\t\t\t\tdefaultElement = new scheduler.$keyboardNavigation.Event(id);\r\n\t\t\t}\r\n\r\n\t\t\treturn defaultElement;\r\n\t\t},\r\n\r\n\t\tisScrolledIntoView: function (el) {\r\n\t\t\tvar eventBox = el.getBoundingClientRect();\r\n\t\t\tvar viewPort = scheduler.$container.querySelector(\".dhx_cal_data\").getBoundingClientRect();\r\n\t\t\t\r\n\t\t\tif(eventBox.bottom < viewPort.top || eventBox.top > viewPort.bottom){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\r\n\t\tgetNode: function(){\r\n\r\n\t\t\tvar idSelector = \"[\"+scheduler.config.event_attribute+\"='\"+this.eventId+\"']\";\r\n\r\n\t\t\tvar inlineEditor = scheduler.$keyboardNavigation.dispatcher.getInlineEditor(this.eventId);\r\n\t\t\tif(inlineEditor){// is inline editor visible\r\n\t\t\t\treturn inlineEditor;\r\n\t\t\t}else{\r\n\t\t\t\tif(scheduler.isMultisectionEvent && scheduler.isMultisectionEvent(scheduler.getEvent(this.eventId))){\r\n\t\t\t\t\tvar nodes = scheduler.$container.querySelectorAll(idSelector);\r\n\t\t\t\t\tfor(var i = 0; i < nodes.length; i++){\r\n\t\t\t\t\t\tif(this.isScrolledIntoView(nodes[i])){\r\n\t\t\t\t\t\t\treturn nodes[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn nodes[0];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn scheduler.$container.querySelector(idSelector);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tvar event = scheduler.getEvent(this.eventId);\r\n\r\n\t\t\tvar calendar = scheduler.getState();\r\n\t\t\tif(event.start_date.valueOf() > calendar.max_date.valueOf() || event.end_date.valueOf() <= calendar.min_date.valueOf()){\r\n\t\t\t\tscheduler.setCurrentView(event.start_date);\r\n\t\t\t}\r\n\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif (this.isScrolledIntoView(node)) {\r\n\t\t\t\tscheduler.$keyboardNavigation.dispatcher.keepScrollPosition((function(){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\t\t}).bind(this));\r\n\t\t\t} else {\r\n\t\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\t}\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\r\n\r\n\t\t_getSection: function(ev){\r\n\t\t\tvar section = null;\r\n\t\t\tvar mode = scheduler.getState().mode;\r\n\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\t\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\t\tsection = ev[timeline.y_property];\r\n\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\tvar unit = scheduler._props[mode];\r\n\t\t\t\tsection = ev[unit.map_to];\r\n\t\t\t}\r\n\t\t\treturn section;\r\n\t\t},\r\n\t\t_moveToSlot: function(dir){\r\n\t\t\tvar ev = scheduler.getEvent(this.eventId);\r\n\t\t\tif(ev){\r\n\t\t\t\tvar section =this._getSection(ev);\r\n\t\t\t\tvar slot = new scheduler.$keyboardNavigation.TimeSlot(ev.start_date, null, section);\r\n\t\t\t\tthis.moveTo(slot.nextSlot(slot, dir));\r\n\t\t\t}else{\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tthis._moveToSlot(\"left\");\r\n\t\t\t},\r\n\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tthis._moveToSlot(\"right\");\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\t\t\t\tif(this.getMode() == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.nextEventHandler();\r\n\t\t\t\t}else {\r\n\t\t\t\t\tthis._moveToSlot(\"down\");\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"space\": function(){\r\n\t\t\t\tvar node = this.getNode();\r\n\t\t\t\tif(node && node.click){\r\n\t\t\t\t\tnode.click();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"up\": function () {\r\n\t\t\t\tif(this.getMode() == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.prevEventHandler();\r\n\t\t\t\t}else {\r\n\t\t\t\t\tthis._moveToSlot(\"up\");\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"delete\": function(){\r\n\t\t\t\tif(scheduler.getEvent(this.eventId)) {\r\n\t\t\t\t\tscheduler._click.buttons[\"delete\"](this.eventId);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t// open lightbox\r\n\t\t\t\"enter\": function () {\r\n\t\t\t\tif(scheduler.getEvent(this.eventId)) {\r\n\t\t\t\t\tscheduler.showLightbox(this.eventId);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\nscheduler.$keyboardNavigation.Event.prototype.bindAll(scheduler.$keyboardNavigation.Event.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.TimeSlot = function(from, to, section, movingDate){\r\n\tvar state = scheduler.getState();\r\n\tvar timeline = scheduler.matrix && scheduler.matrix[state.mode];\r\n\r\n\tif(!from){\r\n\t\tfrom = this.getDefaultDate();\r\n\t}\r\n\r\n\tif(!to){\r\n\r\n\t\tif(timeline){\r\n\t\t\tto = scheduler.date.add(from, timeline.x_step, timeline.x_unit);\r\n\t\t}else{\r\n\t\t\tto = scheduler.date.add(from, scheduler.config.key_nav_step, \"minute\");\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tthis.section = section || this._getDefaultSection();\r\n\tthis.start_date = new Date(from);\r\n\tthis.end_date = new Date(to);\r\n\tthis.movingDate = movingDate || null;\r\n};\r\n\r\nscheduler.$keyboardNavigation.TimeSlot.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\t_handlers:null,\r\n\r\n\t\tgetDefaultDate: function(){\r\n\t\t\tvar from;\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar visibleTime = new Date(state.date);\r\n\t\t\tvisibleTime.setSeconds(0);\r\n\t\t\tvisibleTime.setMilliseconds(0);\r\n\r\n\t\t\tvar nowTime = new Date();\r\n\t\t\tnowTime.setSeconds(0);\r\n\t\t\tnowTime.setMilliseconds(0);\r\n\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[state.mode];\r\n\t\t\tvar showNowTime = false;\r\n\t\t\tif(visibleTime.valueOf() === nowTime.valueOf()){\r\n\t\t\t\tshowNowTime = true;\r\n\t\t\t}\r\n\r\n\t\t\tif(timeline){\r\n\t\t\t\tif(showNowTime){\r\n\t\t\t\t\tif(timeline.x_unit === \"day\"){\r\n\t\t\t\t\t\tnowTime.setHours(0);\r\n\t\t\t\t\t\tnowTime.setMinutes(0);\r\n\t\t\t\t\t}else if(timeline.x_unit === \"hour\"){\r\n\t\t\t\t\t\tnowTime.setMinutes(0);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfrom = nowTime;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfrom = scheduler.date[timeline.name + \"_start\"](new Date(state.date));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfrom = this.findVisibleColumn(from);\r\n\t\t\t}else{\r\n\t\t\t\tfrom = new Date(scheduler.getState().min_date);\r\n\t\t\t\tif(showNowTime){\r\n\t\t\t\t\tfrom = nowTime;\r\n\t\t\t\t}\r\n\t\t\t\tfrom = this.findVisibleColumn(from);\r\n\t\t\t\tif(!showNowTime){\r\n\t\t\t\t\tfrom.setHours(scheduler.config.first_hour);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(!scheduler._table_view){\r\n\t\t\t\t\tvar dataContainer = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\t\tif(dataContainer.scrollTop){\r\n\t\t\t\t\t\tfrom.setHours(scheduler.config.first_hour + Math.ceil(dataContainer.scrollTop / scheduler.config.hour_size_px));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn from;\r\n\t\t},\r\n\r\n\t\tclone: function(timeslot){\r\n\t\t\treturn new scheduler.$keyboardNavigation.TimeSlot(timeslot.start_date, timeslot.end_date, timeslot.section, timeslot.movingDate);\r\n\t\t},\r\n\t\t_getMultisectionView: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view;\r\n\t\t\tif(scheduler._props && scheduler._props[state.mode]) {\r\n\t\t\t\tview = scheduler._props[state.mode];\r\n\t\t\t}else if(scheduler.matrix && scheduler.matrix[state.mode]){\r\n\t\t\t\tview = scheduler.matrix[state.mode];\r\n\t\t\t}\r\n\t\t\treturn view;\r\n\t\t},\r\n\r\n\t\t_getDefaultSection: function(){\r\n\t\t\tvar section = null;\r\n\t\t\tvar view = this._getMultisectionView();\r\n\t\t\tif(view && !section){\r\n\t\t\t\tsection = this._getNextSection();\r\n\t\t\t}\r\n\t\t\treturn section;\r\n\t\t},\r\n\r\n\t\t_getNextSection: function(sectionId, dir){\r\n\t\t\tvar view = this._getMultisectionView();\r\n\t\t\tvar currentIndex = view.order[sectionId];\r\n\t\t\tvar nextIndex = currentIndex;\r\n\t\t\tif(currentIndex !== undefined){\r\n\t\t\t\tnextIndex = currentIndex + dir;\r\n\t\t\t}else{\r\n\t\t\t\tnextIndex = (view.size && view.position) ? view.position : 0;\r\n\t\t\t}\r\n\r\n\t\t\tif(nextIndex < 0){\r\n\t\t\t\tnextIndex = 0;\r\n\t\t\t}\r\n\t\t\tvar options = view.options || view.y_unit;\r\n\r\n\t\t\tif(nextIndex >= options.length){\r\n\t\t\t\tnextIndex = options.length - 1;\r\n\t\t\t}\r\n\t\t\t//nextIndex = nextIndex < 0 ? nextIndex = (view.options || view.y_unit).length -1 : nextIndex;\r\n\r\n\t\t\tif(options[nextIndex]){\r\n\t\t\t\treturn options[nextIndex].key;\r\n\t\t\t}else{\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar isInRange = !(this.start_date.valueOf() < state.min_date.valueOf() || this.start_date.valueOf() >= state.max_date.valueOf());\r\n\r\n\t\t\tif(!isInRange) return false;\r\n\r\n\r\n\t\t\tif(!this.isVisible(this.start_date, this.end_date)) return false;\r\n\r\n\t\t\tvar view = this._getMultisectionView();\r\n\r\n\t\t\tif(view){\r\n\t\t\t\treturn (view.order[this.section] !== undefined);\r\n\t\t\t}else{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t},\r\n\r\n\t\tfallback:function(){\r\n\r\n\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(!defaultSlot.isValid()){\r\n\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t}else{\r\n\t\t\t\treturn defaultSlot;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tgetNodes: function(){\r\n\t\t\treturn Array.prototype.slice.call(scheduler.$container.querySelectorAll(\".dhx_focus_slot\"));\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\treturn this.getNodes()[0];\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tif(this.section && scheduler.getView() && scheduler.getView().smart_rendering && scheduler.getView().scrollTo && !scheduler.$container.querySelector(`[data-section-id=\"${this.section}\"]`)){\r\n\t\t\t\tscheduler.getView().scrollTo({section: this.section});\r\n\t\t\t}\r\n\t\t\tscheduler.$keyboardNavigation.marker.render(this.start_date, this.end_date, this.section);\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\tscheduler.$keyboardNavigation._pasteDate = this.start_date;\r\n\t\t\tscheduler.$keyboardNavigation._pasteSection = this.section;\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t\tscheduler.$keyboardNavigation.marker.clear();\r\n\t\t},\r\n\r\n\t\t_modes: scheduler.$keyboardNavigation.SchedulerNode.prototype._modes,\r\n\r\n\t\t_getMode: scheduler.$keyboardNavigation.SchedulerNode.prototype.getMode,\r\n\r\n\t\taddMonthDate: function(date, dir, extend){\r\n\t\t\tvar res;\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tres = scheduler.date.add(date, -1, \"week\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tres = scheduler.date.add(date, 1, \"week\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tres = scheduler.date.day_start(scheduler.date.add(date, -1, \"day\"));\r\n\t\t\t\t\tres = this.findVisibleColumn(res, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tres = scheduler.date.day_start(scheduler.date.add(date, 1, \"day\"));\r\n\t\t\t\t\tres = this.findVisibleColumn(res, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tres = scheduler.date.day_start(new Date(date));\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tif(date.valueOf() < state.min_date.valueOf() || (!extend && date.valueOf() >= state.max_date.valueOf())){\r\n\t\t\t\tres = new Date(state.min_date);\r\n\t\t\t}\r\n\r\n\t\t\treturn res;\r\n\t\t},\r\n\r\n\t\tnextMonthSlot: function(slot, dir, extend){\r\n\r\n\t\t\tvar start, end;\r\n\t\t\tstart = this.addMonthDate(slot.start_date, dir, extend);\r\n\r\n\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\tend = new Date(start);\r\n\t\t\tend.setHours(scheduler.config.last_hour);\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\r\n\t\t_alignTimeSlot: function(date, minDate, unit, step){\r\n\t\t\tvar currentDate = new Date(minDate);\r\n\t\t\twhile(currentDate.valueOf() < date.valueOf()){\r\n\t\t\t\tcurrentDate = scheduler.date.add(currentDate, step, unit);\r\n\t\t\t}\r\n\r\n\t\t\tif(currentDate.valueOf() > date.valueOf()){\r\n\t\t\t\tcurrentDate = scheduler.date.add(currentDate, -step, unit);\r\n\t\t\t}\r\n\r\n\t\t\treturn currentDate;\r\n\t\t},\r\n\r\n\t\tnextTimelineSlot: function(slot, dir, extend){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view = scheduler.matrix[state.mode];\r\n\r\n\t\t\tvar startDate = this._alignTimeSlot(slot.start_date, scheduler.date[view.name + \"_start\"](new Date(slot.start_date)), view.x_unit, view.x_step);\r\n\t\t\tvar endDate = this._alignTimeSlot(slot.end_date, scheduler.date[view.name + \"_start\"](new Date(slot.end_date)), view.x_unit, view.x_step);\r\n\r\n\t\t\tif(endDate.valueOf() <= startDate.valueOf()){\r\n\t\t\t\tendDate = scheduler.date.add(startDate, view.x_step, view.x_unit);\r\n\t\t\t}\r\n\t\t\tvar newPos = this.clone(slot);\r\n\t\t\tnewPos.start_date = startDate;\r\n\t\t\tnewPos.end_date = endDate;\r\n\t\t\tnewPos.section = slot.section || this._getNextSection();\r\n\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tnewPos.section = this._getNextSection(slot.section, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tnewPos.section = this._getNextSection(slot.section, +1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tnewPos.start_date = this.findVisibleColumn(scheduler.date.add(newPos.start_date, -view.x_step, view.x_unit), -1);\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tnewPos.start_date = this.findVisibleColumn(scheduler.date.add(newPos.start_date, view.x_step, view.x_unit), 1);\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(newPos.start_date.valueOf() < state.min_date.valueOf() || newPos.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tif(extend && newPos.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\t\tnewPos.start_date = new Date(state.max_date);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tnewPos.start_date = scheduler.date[state.mode + \"_start\"](scheduler.date.add(state.date, dir == \"left\" ? -1 : 1, state.mode));\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn newPos;\r\n\t\t},\r\n\r\n\t\tnextUnitsSlot: function(slot, dir, extend){\r\n\t\t\tvar newPos = this.clone(slot);\r\n\t\t\tnewPos.section = slot.section || this._getNextSection();\r\n\r\n\t\t\tvar section = slot.section || this._getNextSection();\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view = scheduler._props[state.mode];\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tsection = this._getNextSection(slot.section, -1);\r\n\t\t\t\t\tvar optionsCount = view.size ? (view.size - 1) : view.options.length;\r\n\r\n\t\t\t\t\tif(view.days > 1 && (view.order[section] == optionsCount - 1)){\r\n\t\t\t\t\t\tif(scheduler.date.add(slot.start_date, -1, \"day\").valueOf() >= state.min_date.valueOf()){\r\n\t\t\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tsection = this._getNextSection(slot.section, 1);\r\n\t\t\t\t\tif(view.days > 1 && !view.order[section]){\r\n\t\t\t\t\t\tif(scheduler.date.add(slot.start_date, 1, \"day\").valueOf() < state.max_date.valueOf()){\r\n\t\t\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\tsection = slot.section;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tnewPos.section = section;\r\n\t\t\treturn newPos;\r\n\t\t},\r\n\r\n\t\t_moveDate: function(oldDate, dir){\r\n\t\t\tvar newDate = this.findVisibleColumn(scheduler.date.add(oldDate, dir, \"day\"), dir);\r\n\t\t\tnewDate.setHours(oldDate.getHours());\r\n\t\t\tnewDate.setMinutes(oldDate.getMinutes());\r\n\t\t\treturn newDate;\r\n\t\t},\r\n\r\n\t\tisBeforeLastHour: function(date, isStartDate){\r\n\t\t\tvar minutes = date.getMinutes(),\r\n\t\t\t\thours = date.getHours(),\r\n\t\t\t\tlast_hour = scheduler.config.last_hour;\r\n\t\t\treturn (hours < last_hour || (!isStartDate && ((last_hour == 24 || hours == last_hour) && !minutes)));\r\n\t\t},\r\n\t\tisAfterFirstHour: function(date, isStartDate){\r\n\t\t\tvar minutes = date.getMinutes(),\r\n\t\t\t\thours = date.getHours(),\r\n\t\t\t\tfirst_hour = scheduler.config.first_hour,\r\n\t\t\t\tlast_hour = scheduler.config.last_hour;\r\n\t\t\treturn (hours >= first_hour || (!isStartDate && (!minutes && ((!hours && last_hour == 24) || (hours == last_hour)))));\r\n\t\t},\r\n\t\tisInVisibleDayTime: function(date, isStartDate){\r\n\t\t\treturn (this.isBeforeLastHour(date, isStartDate) && this.isAfterFirstHour(date, isStartDate));\r\n\t\t},\r\n\r\n\t\tnextDaySlot: function(slot, dir, extend){\r\n\t\t\tvar start, end;\r\n\r\n\t\t\tvar key_nav_step = scheduler.config.key_nav_step;\r\n\r\n\t\t\tvar date = this._alignTimeSlot(slot.start_date, scheduler.date.day_start(new Date(slot.start_date)), \"minute\", key_nav_step);\r\n\r\n\r\n\t\t\tvar oldStart = slot.start_date;\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tstart = scheduler.date.add(date, -key_nav_step, \"minute\");\r\n\r\n\t\t\t\t\tif(!this.isInVisibleDayTime(start, true)){\r\n\t\t\t\t\t\tif (!extend || this.isInVisibleDayTime(oldStart, true)) {\r\n\r\n\t\t\t\t\t\t\tvar toNextDay = true;\r\n\t\t\t\t\t\t\tif(extend && scheduler.date.date_part(new Date(start)).valueOf() != scheduler.date.date_part(new Date(oldStart)).valueOf())\r\n\t\t\t\t\t\t\t\ttoNextDay = false;\r\n\t\t\t\t\t\t\tif(toNextDay)\r\n\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, -1, \"day\"), -1);\r\n\r\n\t\t\t\t\t\t\tstart.setHours(scheduler.config.last_hour);\r\n\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\tstart = scheduler.date.add(start, -key_nav_step, \"minute\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tstart = scheduler.date.add(date, key_nav_step, \"minute\");\r\n\r\n\t\t\t\t\tvar testEnd = extend ? start : scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tif(!this.isInVisibleDayTime(testEnd, false)){\r\n\t\t\t\t\t\tif(!extend || this.isInVisibleDayTime(oldStart, false)) {\r\n\t\t\t\t\t\t\tif (!extend) {\r\n\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, 1, \"day\"), 1);\r\n\t\t\t\t\t\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tvar toNextDay = true;\r\n\t\t\t\t\t\t\t\tif (scheduler.date.date_part(new Date(oldStart)).valueOf() == oldStart.valueOf()) {\r\n\t\t\t\t\t\t\t\t\ttoNextDay = false;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (toNextDay) {\r\n\t\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, 1, \"day\"), 1);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\t\tstart = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tstart = this._moveDate(slot.start_date, -1);\r\n\t\t\t\t\tend = this._moveDate(slot.end_date, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tstart = this._moveDate(slot.start_date, 1);\r\n\t\t\t\t\tend = this._moveDate(slot.end_date, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tstart = date;\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\t\tnextWeekAgendaSlot: function(slot, dir){\r\n\t\t\tvar start, end;\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tstart = scheduler.date.day_start(scheduler.date.add(slot.start_date, -1, \"day\"));\r\n\t\t\t\t\tstart = this.findVisibleColumn(start, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tstart = scheduler.date.day_start(scheduler.date.add(slot.start_date, 1, \"day\"));\r\n\t\t\t\t\tstart = this.findVisibleColumn(start, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tstart = scheduler.date.day_start(slot.start_date);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif(slot.start_date.valueOf() < state.min_date.valueOf() || slot.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tstart = new Date(state.min_date);\r\n\r\n\t\t\t}\r\n\t\t\tend = new Date(start);\r\n\t\t\tend.setHours(scheduler.config.last_hour);\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\t\tnextAgendaSlot: function(slot, dir){\r\n\t\t\treturn {start_date: slot.start_date, end_date: slot.end_date};\r\n\t\t},\r\n\r\n\r\n\t\tisDateVisible: function(date){\r\n\t\t\tif(!scheduler._ignores_detected)\r\n\t\t\t\treturn true;\r\n\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[scheduler.getState().mode];\r\n\r\n\t\t\tvar index;\r\n\t\t\tif(timeline){\r\n\t\t\t\tindex = scheduler._get_date_index(timeline, date);\r\n\t\t\t}else{\r\n\t\t\t\tindex = scheduler.locate_holder_day(date);\r\n\t\t\t}\r\n\r\n\t\t\treturn !scheduler._ignores[index];\r\n\t\t},\r\n\r\n\t\tfindVisibleColumn: function(start, dir){\r\n\t\t\tvar date = start;\r\n\t\t\tdir = dir || 1;\r\n\t\t\tvar range = scheduler.getState();\r\n\r\n\t\t\twhile(!this.isDateVisible(date) && ((dir > 0 && date.valueOf() <= range.max_date.valueOf()) || (dir < 0 && date.valueOf() >= range.min_date.valueOf()))){\r\n\t\t\t\tdate = this.nextDateColumn(date, dir);\r\n\t\t\t}\r\n\r\n\t\t\treturn date;\r\n\t\t},\r\n\r\n\t\tnextDateColumn: function(start, dir){\r\n\t\t\tdir = dir || 1;\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[scheduler.getState().mode];\r\n\r\n\t\t\tvar date;\r\n\t\t\tif(timeline){\r\n\t\t\t\tdate = scheduler.date.add(start, dir * timeline.x_step, timeline.x_unit);\r\n\t\t\t}else{\r\n\t\t\t\tdate = scheduler.date.day_start(scheduler.date.add(start, dir, \"day\"));\r\n\t\t\t}\r\n\r\n\t\t\treturn date;\r\n\t\t},\r\n\r\n\t\tisVisible:function(from, to){\r\n\t\t\tif(!scheduler._ignores_detected)\r\n\t\t\t\treturn true;\r\n\r\n\t\t\tvar current = new Date(from);\r\n\r\n\t\t\twhile(current.valueOf() < to.valueOf()){\r\n\t\t\t\tif(this.isDateVisible(current)) return true;\r\n\t\t\t\tcurrent = this.nextDateColumn(current);\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t},\r\n\r\n\t\tnextSlot: function(slot, dir, view, extend){\r\n\t\t\tvar next;\r\n\t\t\tview = view || this._getMode();\r\n\r\n\t\t\tvar tempSlot = scheduler.$keyboardNavigation.TimeSlot.prototype.clone(slot);\r\n\r\n\t\t\tswitch (view){\r\n\t\t\t\tcase this._modes.units:\r\n\t\t\t\t\tnext = this.nextUnitsSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.timeline:\r\n\t\t\t\t\tnext = this.nextTimelineSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.year:\r\n\t\t\t\t\tnext = this.nextMonthSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.month:\r\n\t\t\t\t\tnext = this.nextMonthSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.weekAgenda:\r\n\t\t\t\t\tnext = this.nextWeekAgendaSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.list:\r\n\t\t\t\t\tnext = this.nextAgendaSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.dayColumns:\r\n\t\t\t\t\tnext = this.nextDaySlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(next.start_date.valueOf() >= next.end_date.valueOf()){\r\n\t\t\t\tnext = this.nextSlot(next, dir, view);\r\n\t\t\t}\r\n\r\n\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(next);\r\n\r\n\t\t},\r\n\r\n\t\textendSlot: function(slot, dir){\r\n\t\t\tvar view = this._getMode();\r\n\t\t\tvar next;\r\n\t\t\tswitch (view){\r\n\t\t\t\tcase this._modes.units:\r\n\t\t\t\t\tif(dir == \"left\" || dir == \"right\"){\r\n\t\t\t\t\t\tnext = this.nextUnitsSlot(slot, dir);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnext = this.extendUnitsSlot(slot, dir);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.timeline:\r\n\t\t\t\t\tif(dir == \"down\" || dir == \"up\"){\r\n\t\t\t\t\t\tnext = this.nextTimelineSlot(slot, dir);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnext = this.extendTimelineSlot(slot, dir);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.year:\r\n\t\t\t\t\tnext = this.extendMonthSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.month:\r\n\t\t\t\t\tnext = this.extendMonthSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.dayColumns:\r\n\t\t\t\t\tnext = this.extendDaySlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.weekAgenda:\r\n\t\t\t\t\tnext = this.extendWeekAgendaSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnext = slot;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tvar range = scheduler.getState();\r\n\t\t\tif(next.start_date.valueOf() < range.min_date.valueOf()){\r\n\t\t\t\tnext.start_date = this.findVisibleColumn(range.min_date);\r\n\t\t\t\tnext.start_date.setHours(scheduler.config.first_hour);\r\n\t\t\t}\r\n\r\n\t\t\tif(next.end_date.valueOf() > range.max_date.valueOf()){\r\n\t\t\t//\tnext.end_date = new Date(slot.end_date);\r\n\t\t\t\tnext.end_date = this.findVisibleColumn(range.max_date, -1);\r\n\t\t\t}\r\n\r\n\r\n\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(next);\r\n\t\t},\r\n\r\n\t\textendTimelineSlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"timeline\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\textendWeekAgendaSlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"weekAgenda\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\textendGenericSlot: function(allowedDirections, slot, direction, type){\r\n\t\t\tvar next;\r\n\t\t\tvar moveDate = slot.movingDate;\r\n\r\n\t\t\tif(!moveDate){\r\n\t\t\t\tmoveDate = allowedDirections[direction];\r\n\t\t\t}\r\n\r\n\t\t\tif(!moveDate || !allowedDirections[direction]){\r\n\t\t\t\treturn slot;\r\n\t\t\t}\r\n\r\n\t\t\tif(direction){\r\n\t\t\t\tnext = this.nextSlot({start_date: slot[moveDate], section: slot.section}, direction, type, true);\r\n\r\n\t\t\t\tif(next.start_date.valueOf() == slot.start_date.valueOf()){\r\n\t\t\t\t\tnext = this.nextSlot({start_date: next.start_date, section:next.section}, direction, type, true);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tnext.movingDate = moveDate;\r\n\t\t\t}else{\r\n\t\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(slot);\r\n\t\t\t}\r\n\r\n\t\t\tvar newDates = this.extendSlotDates(slot, next, next.movingDate);\r\n\r\n\t\t\tif(newDates.end_date.valueOf() <= newDates.start_date.valueOf()){\r\n\t\t\t\tnext.movingDate = next.movingDate == \"end_date\" ? \"start_date\" : \"end_date\";\r\n\t\t\t}\r\n\t\t\tnewDates = this.extendSlotDates(slot, next, next.movingDate);\r\n\r\n\t\t\tnext.start_date = newDates.start_date;\r\n\t\t\tnext.end_date = newDates.end_date;\r\n\t\t\treturn next;\r\n\t\t},\r\n\r\n\t\textendSlotDates: function(oldSlot, newSlot, dateDirection){\r\n\t\t\tvar res = {start_date:null, end_date:null};\r\n\r\n\t\t\tif(dateDirection == \"start_date\"){\r\n\t\t\t\tres.start_date = newSlot.start_date;\r\n\t\t\t\tres.end_date = oldSlot.end_date;\r\n\t\t\t}else{\r\n\t\t\t\tres.start_date = oldSlot.start_date;\r\n\t\t\t\tres.end_date = newSlot.start_date;\r\n\t\t\t}\r\n\t\t\treturn res;\r\n\r\n\t\t},\r\n\r\n\t\textendMonthSlot: function(slot, direction){\r\n\t\t\tvar slot = this.extendGenericSlot({\r\n\t\t\t\t\t\"up\":\"start_date\",\r\n\t\t\t\t\t\"down\":\"end_date\",\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"month\"\r\n\t\t\t);\r\n\r\n\t\t\tslot.start_date.setHours(scheduler.config.first_hour);\r\n\t\t\tslot.end_date = scheduler.date.add(slot.end_date, -1, \"day\");\r\n\t\t\tslot.end_date.setHours(scheduler.config.last_hour);\r\n\t\t\treturn slot;\r\n\t\t},\r\n\r\n\t\textendUnitsSlot: function(slot, direction){\r\n\t\t\tvar next;\r\n\r\n\t\t\tswitch (direction){\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tnext = this.extendDaySlot(slot, direction);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnext = slot;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tnext.section = slot.section;\r\n\t\t\treturn next;\r\n\t\t},\r\n\t\textendDaySlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\t\"up\":\"start_date\",\r\n\t\t\t\t\t\"down\":\"end_date\",\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"dayColumns\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\tscrollSlot: function(dir){\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tvar slot = this.nextSlot(this, dir);\r\n\t\t\tif(slot.start_date.valueOf() < state.min_date.valueOf() || slot.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tscheduler.setCurrentView(new Date(slot.start_date));\r\n\t\t\t}\r\n\r\n\t\t\tthis.moveTo(slot);\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tthis.scrollSlot(\"left\");\r\n\t\t\t},\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tthis.scrollSlot(\"right\");\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\r\n\t\t\t\tvar mode = this._getMode();\r\n\t\t\t\tif(mode == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.nextEventHandler();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.scrollSlot(\"down\");\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"up\": function () {\r\n\t\t\t\tvar mode = this._getMode();\r\n\t\t\t\tif(mode == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.prevEventHandler();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.scrollSlot(\"up\");\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"shift+down\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"down\"));\r\n\t\t\t},\r\n\t\t\t\"shift+up\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"up\"));\r\n\t\t\t},\r\n\t\t\t\"shift+right\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"right\"));\r\n\t\t\t},\r\n\t\t\t\"shift+left\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"left\"));\r\n\t\t\t},\r\n\r\n\r\n\t\t\t\"enter\": function(){\r\n\t\t\t\tvar obj = {start_date: new Date(this.start_date), end_date: new Date(this.end_date)};\r\n\r\n\t\t\t\tvar mode = scheduler.getState().mode;\r\n\t\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\r\n\t\t\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\t\t\tobj[timeline.y_property] = this.section;\r\n\t\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\t\tvar unit = scheduler._props[mode];\r\n\t\t\t\t\tobj[unit.map_to] = this.section;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler.addEventNow(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.TimeSlot.prototype.bindAll(scheduler.$keyboardNavigation.TimeSlot.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.MinicalButton = function(div, index){\r\n\tthis.container = div;\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.MinicalButton.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar container = this.container;\r\n\t\t\treturn !!container.offsetWidth;// valid if container is visible\r\n\t\t},\r\n\r\n\t\tfallback: function(){\r\n\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(defaultSlot.isValid()){\r\n\t\t\t\treturn defaultSlot;\r\n\t\t\t}else{\r\n\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t}\r\n\t\t},\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.globalNode.disable();\r\n\t\t\tthis.container.removeAttribute(\"tabindex\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tthis.container.setAttribute(\"tabindex\", \"0\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\tif(!this.index){\r\n\t\t\t\treturn this.container.querySelector(\".dhx_cal_prev_button\");\r\n\t\t\t}else{\r\n\t\t\t\treturn this.container.querySelector(\".dhx_cal_next_button\");\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"right\": function(e){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, this.index ? 0 : 1));\r\n\t\t\t},\r\n\t\t\t\"left\": function(e){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, this.index ? 0 : 1));\r\n\t\t\t},\r\n\t\t\t\"down\": function(){\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, 0, 0);\r\n\t\t\t\tif(next && !next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"enter\": function(e){\r\n\t\t\t\tthis.getNode().click();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.MinicalButton.prototype.bindAll(scheduler.$keyboardNavigation.MinicalButton.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.MinicalCell = function(div, row, col){\r\n\tthis.container = div;\r\n\tthis.row = row || 0;\r\n\tthis.col = col || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.MinicalCell.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar grid = this._getGrid();\r\n\t\t\treturn !!(grid[this.row] && grid[this.row][this.col]);\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\tvar row = this.row;\r\n\t\t\tvar col = this.col;\r\n\t\t\tvar grid = this._getGrid();\r\n\t\t\tif(!grid[row]){\r\n\t\t\t\trow = 0;\r\n\t\t\t}\r\n\t\t\tvar dir = true;\r\n\t\t\tif(row > grid.length / 2){\r\n\t\t\t\tdir = false;\r\n\t\t\t}\r\n\r\n\t\t\tif(!grid[row]){\r\n\t\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t\tif(defaultSlot.isValid()){\r\n\t\t\t\t\treturn defaultSlot;\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(dir){\r\n\t\t\t\tfor(var c = col; grid[row] && c < grid[row].length; c++){\r\n\t\t\t\t\tif(!grid[row][c] && c == grid[row].length - 1){\r\n\t\t\t\t\t\trow++;\r\n\t\t\t\t\t\tcol = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(grid[row][c]){\r\n\t\t\t\t\t\treturn new scheduler.$keyboardNavigation.MinicalCell(this.container, row, c);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tfor(var c = col; grid[row] && c < grid[row].length; c--){\r\n\t\t\t\t\tif(!grid[row][c] && !c){\r\n\t\t\t\t\t\trow--;\r\n\t\t\t\t\t\tcol = grid[row].length - 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(grid[row][c]){\r\n\t\t\t\t\t\treturn new scheduler.$keyboardNavigation.MinicalCell(this.container, row, c);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn new scheduler.$keyboardNavigation.MinicalButton(this.container, 0);\r\n\t\t},\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.globalNode.disable();\r\n\r\n\t\t\tthis.container.removeAttribute(\"tabindex\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tthis.container.setAttribute(\"tabindex\", \"0\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\t\t_getNode: function(row, col){\r\n\t\t\treturn this.container.querySelector(\".dhx_year_body tr:nth-child(\"+(row + 1) + \") td:nth-child(\"+(col + 1)+\")\");\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\treturn this._getNode(this.row, this.col);\r\n\t\t},\r\n\r\n\t\t_getGrid: function(){\r\n\t\t\tvar rows = this.container.querySelectorAll(\".dhx_year_body tr\");\r\n\t\t\tvar grid = [];\r\n\t\t\tfor(var i = 0; i < rows.length; i++){\r\n\t\t\t\tgrid[i] = [];\r\n\t\t\t\tvar row = rows[i];\r\n\t\t\t\tvar cells = row.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var c = 0; c < cells.length; c++){\r\n\t\t\t\t\tvar cell = cells[c];\r\n\t\t\t\t\tvar enabled = true;\r\n\t\t\t\t\tvar css = scheduler._getClassName(cell);\r\n\t\t\t\t\tif(css.indexOf(\"dhx_after\") > -1 || css.indexOf(\"dhx_before\") > -1 || css.indexOf(\"dhx_scale_ignore\") > -1){\r\n\t\t\t\t\t\tenabled = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tgrid[i][c] = enabled;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn grid;\r\n\t\t},\r\n\r\n\r\n\t\tkeys: {\r\n\t\t\t\"right\": function(e){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row;\r\n\t\t\t\tvar newCol = this.col + 1;\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tif(grid[newRow + 1]){\r\n\t\t\t\t\t\tnewRow = newRow + 1;\r\n\t\t\t\t\t\tnewCol = 0;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnewCol = this.col;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"left\": function(e){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row;\r\n\t\t\t\tvar newCol = this.col - 1;\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tif(grid[newRow - 1]){\r\n\t\t\t\t\t\tnewRow = newRow - 1;\r\n\t\t\t\t\t\tnewCol = grid[newRow].length - 1;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnewCol = this.col;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"down\": function(){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row + 1;\r\n\t\t\t\tvar newCol = this.col;\r\n\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tnewRow = this.row;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"up\": function(){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row - 1;\r\n\t\t\t\tvar newCol = this.col;\r\n\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tvar index = 0;\r\n\t\t\t\t\tif(this.col > grid[this.row].length / 2){\r\n\t\t\t\t\t\tindex = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, index));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.moveTo(next);\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\t\t\t\"enter\": function(e){\r\n\t\t\t\tthis.getNode().querySelector(\".dhx_month_head\").click();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.MinicalCell.prototype.bindAll(scheduler.$keyboardNavigation.MinicalCell.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.DataArea = function(index){\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.DataArea.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\tgetNode: function(index){\r\n\t\t\treturn scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t},\r\n\r\n\t\t_handlers:null,\r\n\r\n\t\tisValid: function(){\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tfallback:function(){\r\n\t\t\treturn this;\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"up,down,right,left\":function(){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.DataArea.prototype.bindAll(scheduler.$keyboardNavigation.DataArea.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\n\r\n\r\n(function(){\r\n\tvar modalsStack = [];\r\n\r\n\tfunction isModal(){\r\n\t\treturn !!(modalsStack.length);\r\n\t}\r\n\r\n\tfunction isChildOf(child, parent){\r\n\t\twhile(child && child != parent){\r\n\t\t\tchild = child.parentNode;\r\n\t\t}\r\n\r\n\t\treturn !!(child == parent);\r\n\t}\r\n\r\n\tfunction afterPopup(box){\r\n\t\tsetTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tif(!isModal() && !(isChildOf(document.activeElement, scheduler.$container))) {\r\n\t\t\t\tscheduler.focus();\r\n\t\t\t}\r\n\t\t}, 1);\r\n\t}\r\n\tfunction startModal(box){\r\n\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\tscheduler.event(box, \"keydown\", trapFocus);\r\n\t\tmodalsStack.push(box);\r\n\t\t//scheduler.$keyboardNavigation.dispatcher.disable();\r\n\t}\r\n\r\n\tfunction endModal(){\r\n\t\tvar box = modalsStack.pop();\r\n\t\tif(box) {\r\n\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t}\r\n\t\tafterPopup(box);\r\n\r\n\t}\r\n\r\n\tfunction isTopModal(box){\r\n\t//\tif(dhtmlx._modalsStack.length){\r\n\t//\t\treturn box == dhtmlx._modalsStack[dhtmlx._modalsStack.length - 1];\r\n\t//\t}else{\r\n\t\t\treturn box == modalsStack[modalsStack.length - 1];\r\n\t//\t}\r\n\r\n\t}\r\n\r\n\tfunction trapFocus(event){\r\n\t\tvar event = event || window.event;\r\n\t\tvar target = event.currentTarget;\r\n\t\tif(!isTopModal(target)) return;\r\n\r\n\t\tscheduler.$keyboardNavigation.trapFocus(target, event);\r\n\t}\r\n\r\n\tfunction traceLightbox(){\r\n\t\tstartModal(scheduler.getLightbox());\r\n\t}\r\n\r\n\tscheduler.attachEvent(\"onLightbox\", traceLightbox);\r\n\tscheduler.attachEvent(\"onAfterLightbox\", endModal);\r\n\r\n\tscheduler.attachEvent(\"onAfterQuickInfo\", function(){afterPopup();});\r\n\r\n\tif(!scheduler._keyNavMessagePopup) {\r\n\t\tscheduler._keyNavMessagePopup = true;\r\n\r\n\t\tvar focusElement = null;\r\n\t\tvar backupFocus = null;\r\n\t\tconst modalsStack = [];\r\n\t\tscheduler.attachEvent(\"onMessagePopup\", function(box){\r\n\t\t\tfocusElement = document.activeElement;\r\n\t\t\tbackupFocus = focusElement;\r\n\r\n\t\t\twhile(backupFocus && scheduler._getClassName(backupFocus).indexOf(\"dhx_cal_data\") < 0){\r\n\t\t\t\tbackupFocus = backupFocus.parentNode;\r\n\t\t\t}\r\n\t\t\tif(backupFocus){\r\n\t\t\t\tbackupFocus = backupFocus.parentNode;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t\tscheduler.event(box, \"keydown\", trapFocus);\r\n\t\t\tmodalsStack.push(box);\r\n\t\t});\r\n\r\n\r\n\t\tscheduler.attachEvent(\"onAfterMessagePopup\", function () {\r\n\t\t\tvar box = modalsStack.pop();\r\n\t\t\tif(box) {\r\n\t\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t\t}\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\tvar currentTarget = document.activeElement;\r\n\t\t\t\twhile(currentTarget && scheduler._getClassName(currentTarget).indexOf(\"dhx_cal_light\") < 0){\r\n\t\t\t\t\tcurrentTarget = currentTarget.parentNode;\r\n\t\t\t\t}\r\n\t\t\t\tif(currentTarget)\r\n\t\t\t\t\treturn;\r\n\r\n\r\n\t\t\t\tif(focusElement && focusElement.parentNode){\r\n\t\t\t\t\tfocusElement.focus();\r\n\r\n\t\t\t\t}else if(backupFocus && backupFocus.parentNode){\r\n\t\t\t\t\tbackupFocus.focus();\r\n\t\t\t\t}\r\n\t\t\t\tfocusElement = null;\r\n\t\t\t\tbackupFocus = null;\r\n\r\n\t\t\t}, 1);\r\n\t\t});\r\n\t}\r\n\r\n\tscheduler.$keyboardNavigation.isModal = isModal;\r\n\r\n\r\n})();\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.dispatcher = {\r\n\tisActive: false,\r\n\tactiveNode: null,\r\n\tglobalNode: new scheduler.$keyboardNavigation.SchedulerNode(),\r\n\r\n\tkeepScrollPosition: function (callback) {\r\n\t\tvar top, left;\r\n\r\n\t\tvar scrollable = scheduler.$container.querySelector(\".dhx_timeline_scrollable_data\");\r\n\t\tif(!scrollable){\r\n\t\t\tscrollable = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t}\r\n\r\n\t\tif(scrollable){\r\n\t\t\ttop = scrollable.scrollTop;\r\n\t\t\tleft = scrollable.scrollLeft;\r\n\t\t}\r\n\r\n\t\tcallback();\r\n\r\n\t\tif(scrollable){\r\n\t\t\tscrollable.scrollTop = top;\r\n\t\t\tscrollable.scrollLeft = left;\r\n\t\t}\r\n\t},\r\n\tenable: function(){\r\n\t\tif(!scheduler.$container){\r\n\t\t\t// do nothing if not initialized\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.isActive = true;\r\n\t\tvar self = this;\r\n\t\tthis.keepScrollPosition(function () {\r\n\t\t\tself.globalNode.enable();\r\n\t\t\tself.setActiveNode(self.getActiveNode());\r\n\t\t});\r\n\t},\r\n\r\n\tdisable: function(){\r\n\t\tthis.isActive = false;\r\n\t\tthis.globalNode.disable();\r\n\t},\r\n\r\n\tisEnabled: function(){\r\n\t\treturn !!this.isActive;\r\n\t},\r\n\r\n\tgetDefaultNode: function(){\r\n\t\treturn this.globalNode.getDefaultNode();\r\n\t},\r\n\r\n\tsetDefaultNode: function() {\r\n\t\tthis.setActiveNode(this.getDefaultNode());\r\n\t},\r\n\r\n\tgetActiveNode: function(){\r\n\t\tvar node = this.activeNode;\r\n\t\tif(node && !node.isValid()){\r\n\t\t\tnode = node.fallback();\r\n\t\t}\r\n\t\treturn node;\r\n\t},\r\n\r\n\tfocusGlobalNode: function(){\r\n\t\tthis.blurNode(this.globalNode);\r\n\t\tthis.focusNode(this.globalNode);\r\n\t},\r\n\r\n\tsetActiveNode: function(el){\r\n\t\tif(!el || !el.isValid())\r\n\t\t\treturn;\r\n\r\n\t\tif(this.activeNode){\r\n\t\t\tif(this.activeNode.compareTo(el)){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(this.isEnabled()){\r\n\t\t\tthis.blurNode(this.activeNode);\r\n\t\t\tthis.activeNode = el;\r\n\t\t\tthis.focusNode(this.activeNode);\r\n\t\t}\r\n\t},\r\n\r\n\tfocusNode: function(el){\r\n\t\tif(el && el.focus){\r\n\t\t\tel.focus();\r\n\t\t\tif(el.getNode && document.activeElement != el.getNode()){\r\n\t\t\t\tthis.setActiveNode(new scheduler.$keyboardNavigation.DataArea());\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tblurNode: function(el){\r\n\t\tif(el && el.blur){\r\n\t\t\tel.blur();\r\n\t\t}\r\n\t},\r\n\r\n\tgetInlineEditor: function(id){\r\n\t\tvar editor = scheduler.$container.querySelector(\".dhx_cal_editor[\"+scheduler.config.event_attribute+\"='\"+id+\"'] textarea\");\r\n\t\tif(editor && editor.offsetWidth){\r\n\t\t\t// if exists and visible\r\n\t\t\treturn editor;\r\n\t\t}\r\n\t\treturn null;\r\n\t},\r\n\r\n\tkeyDownHandler: function (e) {\r\n\r\n\t\tif(e.defaultPrevented){\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar activeElement = this.getActiveNode();\r\n\r\n\t\tif(scheduler.$keyboardNavigation.isModal() &&\r\n\t\t\t!(activeElement && activeElement.container && scheduler.utils.dom.locateCss({target:activeElement.container}, \"dhx_minical_popup\", false)))\r\n\t\t\treturn;\r\n\r\n\t\tif(scheduler.getState().editor_id && this.getInlineEditor(scheduler.getState().editor_id))\r\n\t\t\treturn;\r\n\r\n\t\tif (!this.isEnabled())\r\n\t\t\treturn;\r\n\r\n\t\te = e || window.event;\r\n\r\n\t\tvar schedulerNode = this.globalNode;\r\n\r\n\t\tvar command = scheduler.$keyboardNavigation.shortcuts.getCommandFromEvent(e);\r\n\r\n\t\tif(!activeElement){\r\n\t\t\tthis.setDefaultNode();\r\n\t\t}else if(activeElement.findHandler(command)){\r\n\t\t\tactiveElement.doAction(command, e);\r\n\t\t}else if(schedulerNode.findHandler(command)){\r\n\t\t\tschedulerNode.doAction(command, e);\r\n\t\t}\r\n\r\n\t},\r\n\r\n\t_timeout: null,\r\n\tdelay: function(callback, delay){\r\n\r\n\t\tclearTimeout(this._timeout);\r\n\t\tthis._timeout = setTimeout(callback, delay || 1);\r\n\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n//Initial idea and implementation by Steve MC\r\nscheduler._temp_key_scope = function (){\r\n\r\n\tscheduler.config.key_nav = true;\r\n\r\n\tscheduler.$keyboardNavigation._pasteDate = null; // used for copy and paste operations\r\n\tscheduler.$keyboardNavigation._pasteSection = null; // used for copy and paste operations\r\n\tvar isCopy = null;\r\n\r\n\tvar pos = {};\r\n\r\n\tif(!document.body){\r\n\t\tscheduler.event(window, \"load\", function(){\r\n\t\t\tscheduler.event(document.body, \"mousemove\", trackMousePosition);\r\n\t\t});\r\n\t}else{\r\n\t\tscheduler.event(document.body, \"mousemove\", trackMousePosition);\r\n\t}\r\n\r\n\tfunction trackMousePosition(event){\r\n\t\tevent = event || window.event;\r\n\t\tpos.x = event.clientX;\r\n\t\tpos.y = event.clientY;\r\n\t}\r\n\tfunction currentTarget(){\r\n\r\n\t\tvar mousePointer = false;\r\n\t\tvar keyNavPointer = false;\r\n\r\n\t\tvar target = document.elementFromPoint(pos.x, pos.y);\r\n\t\twhile(target && target != scheduler._obj){\r\n\t\t\ttarget = target.parentNode;\r\n\t\t}\r\n\t\tmousePointer = !!(target == scheduler._obj);\r\n\r\n\t\tkeyNavPointer = scheduler.$keyboardNavigation.dispatcher.isEnabled();\r\n\r\n\t\treturn mousePointer || keyNavPointer;\r\n\t}\r\n\r\n\tscheduler.attachEvent(\"onMouseMove\", function(id,e){\r\n\t\tvar state = scheduler.getState();\r\n\r\n\t\t// make sure scheduler is fully initialized before calling scheduler.getActionData\r\n\t\tif(!(state.mode && state.min_date)){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tvar position = scheduler.getActionData(e);\r\n\t\tscheduler.$keyboardNavigation._pasteDate = position.date;\r\n\t\tscheduler.$keyboardNavigation._pasteSection = position.section;\r\n\t});\r\n\r\n\tfunction clear_event_after(ev){\r\n\t\tdelete ev.rec_type; delete ev.rec_pattern;\r\n\t\tdelete ev.event_pid; delete ev.event_length;\r\n\t}\r\n\r\n\tfunction copyEvent(ev){\r\n\t\treturn scheduler._lame_copy({}, ev);\r\n\t}\r\n\r\n\tscheduler._make_pasted_event = function(ev){\r\n\t\tvar date = scheduler.$keyboardNavigation._pasteDate;\r\n\t\tvar section = scheduler.$keyboardNavigation._pasteSection;\r\n\r\n\t\tvar event_duration = ev.end_date-ev.start_date;\r\n\r\n\t\tvar copy = copyEvent(ev);\r\n\t\tclear_event_after(copy);\r\n\t\tcopy.start_date = new Date(date);\r\n\t\tcopy.end_date = new Date(copy.start_date.valueOf() + event_duration);\r\n\r\n\t\tif(section){\r\n\t\t\tvar property = scheduler._get_section_property();\r\n\r\n\t\t\tif(scheduler.config.multisection)\r\n\t\t\t\tcopy[property] = ev[property]; // save initial set of resources for multisection view\r\n\t\t\telse\r\n\t\t\t\tcopy[property] = section;\r\n\t\t}\r\n\t\treturn copy;\r\n\t};\r\n\tscheduler._do_paste = function(is_copy, modified_ev, original_ev){\r\n\t\tif(scheduler.callEvent(\"onBeforeEventPasted\", [is_copy, modified_ev, original_ev]) === false){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tscheduler.addEvent(modified_ev);\r\n\t\tscheduler.callEvent(\"onEventPasted\", [is_copy, modified_ev, original_ev]);\r\n\t};\r\n\r\n\tscheduler._is_key_nav_active = function(){\r\n\t\tif(this._is_initialized() && !this._is_lightbox_open() && this.config.key_nav){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\r\n\tfunction getSelectedEvent(){\r\n\t\tvar node = scheduler.$keyboardNavigation.dispatcher.getActiveNode();\r\n\t\tif(node && node.eventId) return node.eventId;\r\n\t\treturn scheduler._select_id;\r\n\t}\r\n\r\n\tscheduler.event(document, \"keydown\", function(e){\r\n\t\t// compatibility fix - scheduler focus on ctrl+v on mouse hover\r\n\t\tif(((e.ctrlKey || e.metaKey) && e.keyCode == 86) && scheduler._buffer_event && !scheduler.$keyboardNavigation.dispatcher.isEnabled()) {\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.isActive = currentTarget();\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler._key_nav_copy_paste = function(e){\r\n\t\tif(!scheduler._is_key_nav_active()) return true;\r\n\r\n\t\tif (e.keyCode == 37 || e.keyCode == 39) { // Left, Right arrows\r\n\t\t\te.cancelBubble = true;\r\n\r\n\t\t\tvar next = scheduler.date.add(scheduler._date,(e.keyCode == 37 ? -1 : 1 ),scheduler._mode);\r\n\t\t\tscheduler.setCurrentView(next);\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tvar select_id = getSelectedEvent();\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 67) { // CTRL+C\r\n\t\t\tif (select_id) {\r\n\t\t\t\tscheduler._buffer_event = copyEvent(scheduler.getEvent(select_id));\r\n\t\t\t\tisCopy = true;\r\n\t\t\t\tscheduler.callEvent(\"onEventCopied\", [scheduler.getEvent(select_id)]);\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 88) { // CTRL+X\r\n\t\t\tif (select_id) {\r\n\t\t\t\tisCopy = false;\r\n\t\t\t\tvar ev = scheduler._buffer_event = copyEvent(scheduler.getEvent(select_id));\r\n\r\n\t\t\t\tscheduler.updateEvent(ev.id);\r\n\t\t\t\tscheduler.callEvent(\"onEventCut\", [ev]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 86 && currentTarget(e)) { // CTRL+V\r\n\t\t\tvar ev = scheduler._buffer_event ? scheduler.getEvent(scheduler._buffer_event.id) : scheduler._buffer_event;\r\n\t\t\tev = ev || scheduler._buffer_event;\r\n\r\n\t\t\tif (ev) {\r\n\t\t\t\tvar new_ev = scheduler._make_pasted_event(ev);\r\n\t\t\t\tif (isCopy) {\r\n\t\t\t\t\tnew_ev.id = scheduler.uid();\r\n\t\t\t\t\tscheduler._do_paste(isCopy, new_ev, ev);\r\n\t\t\t\t}\r\n\t\t\t\telse { // cut operation\r\n\t\t\t\t\tvar res = scheduler.callEvent(\"onBeforeEventChanged\",[new_ev, e, false, ev]);\r\n\t\t\t\t\tif (res) {\r\n\t\t\t\t\t\tscheduler._do_paste(isCopy, new_ev, ev);\r\n\t\t\t\t\t\tisCopy = true; // switch to copy after first paste operation\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t};\r\n};\r\nscheduler._temp_key_scope();\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.attachSchedulerHandlers = function(){\r\n\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\tvar keyDownHandler = function(e){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\r\n\t\treturn dispatcher.keyDownHandler(e);\r\n\t};\r\n\r\n\tvar focusHandler = function () {\r\n\t\tdispatcher.keepScrollPosition(function () {\r\n\t\t\tdispatcher.focusGlobalNode();\r\n\t\t});\r\n\t};\r\n\r\n\tvar waitCall;\r\n\tscheduler.attachEvent(\"onDataRender\", function(){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\t\tif(!(dispatcher.isEnabled() && !scheduler.getState().editor_id)) return;\r\n\r\n\t\tclearTimeout(waitCall);\r\n\t\twaitCall = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tif(!dispatcher.isEnabled())\r\n\t\t\t\tdispatcher.enable();\r\n\t\t\treFocusActiveNode();\r\n\t\t});\r\n\t});\r\n\r\n\tvar reFocusActiveNode = function(){\r\n\t\tif(!dispatcher.isEnabled())\r\n\t\t\treturn;\r\n\r\n\t\tvar activeNode = dispatcher.getActiveNode();\r\n\t\tif(!activeNode)\r\n\t\t\treturn;\r\n\r\n\t\tif(!activeNode.isValid()){\r\n\t\t\tactiveNode = activeNode.fallback();\r\n\t\t}\r\n\r\n\t\tif(!activeNode || activeNode instanceof scheduler.$keyboardNavigation.MinicalButton || activeNode instanceof scheduler.$keyboardNavigation.MinicalCell)\r\n\t\t\treturn;\r\n\r\n\t\tdispatcher.keepScrollPosition(function () {\r\n\t\t\tactiveNode.focus(true);\r\n\t\t});\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\tvar container = scheduler.$container;\r\n\t\tscheduler.eventRemove(document, \"keydown\", keyDownHandler);\r\n\t\tscheduler.eventRemove(container, \"mousedown\", mousedownHandler);\r\n\t\tscheduler.eventRemove(container, \"focus\", focusHandler);\r\n\r\n\r\n\t\tif(scheduler.config.key_nav){\r\n\r\n\t\t\tscheduler.event(document, \"keydown\", keyDownHandler);\r\n\t\t\tscheduler.event(container, \"mousedown\", mousedownHandler);\r\n\t\t\tscheduler.event(container, \"focus\", focusHandler);\r\n\r\n\t\t\tcontainer.setAttribute(\"tabindex\", \"0\");\r\n\r\n\t\t}else{\r\n\t\t\tcontainer.removeAttribute(\"tabindex\");\r\n\t\t}\r\n\t});\r\n\r\n\tfunction mousedownHandler(e){\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\r\n\t\tconst view = scheduler.getView();\r\n\t\tlet dataAreaClick = false;\r\n\t\tif (scheduler.getState().mode === \"month\") {\r\n\t\t\tdataAreaClick = scheduler.$keyboardNavigation.isChildOf(e.target || e.srcElement, scheduler.$container.querySelector(\".dhx_cal_month_table\"));\r\n\t\t} else if (view && view.layout === \"timeline\") {\r\n\t\t\tdataAreaClick = scheduler.$keyboardNavigation.isChildOf(e.target || e.srcElement, scheduler.$container.querySelector(\".dhx_timeline_data_col\"));\r\n\t\t} else {\r\n\t\t\tconst listOfScales = scheduler.$container.querySelectorAll(\".dhx_scale_holder\");\r\n\t\t\tconst arrOfScales = Array.from(listOfScales);\r\n\t\t\tdataAreaClick = arrOfScales.some(scale => scale === e.target.parentNode);\r\n\t\t}\r\n\r\n\t\tvar pos = scheduler.getActionData(e);\r\n\r\n\t\tvar focusNode;\r\n\t\tif(scheduler._locate_event(e.target || e.srcElement)){\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.Event(scheduler._locate_event(e.target || e.srcElement));\r\n\t\t}else if(dataAreaClick){\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(pos.date && dataAreaClick){\r\n\t\t\t\tfocusNode = focusNode.nextSlot(new scheduler.$keyboardNavigation.TimeSlot(pos.date, null, pos.section));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(focusNode) {\r\n\t\t\tif (!dispatcher.isEnabled()) {\r\n\t\t\t\tdispatcher.activeNode = focusNode;\r\n\r\n\t\t\t} else {\r\n\t\t\t\tif (pos.date && dataAreaClick) {\r\n\t\t\t\t\tdispatcher.delay(function () {\r\n\t\t\t\t\t\tdispatcher.setActiveNode(focusNode);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction focusEvent(evNode){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\t\tif(!dispatcher.isEnabled()) return;\r\n\r\n\r\n\t\tvar prevState = evNode;\r\n\t\tvar focusNode = new scheduler.$keyboardNavigation.Event(prevState.eventId);\r\n\t\tif(!focusNode.isValid()){\r\n\t\t\tvar lastStart = focusNode.start || prevState.start;\r\n\t\t\tvar lastEnd = focusNode.end || prevState.end;\r\n\t\t\tvar lastSection = focusNode.section || prevState.section;\r\n\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot(lastStart, lastEnd, lastSection);\r\n\t\t\tif(!focusNode.isValid()){\r\n\t\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdispatcher.setActiveNode(focusNode);\r\n\t\tvar node = dispatcher.getActiveNode();\r\n\t\tif(node && node.getNode && document.activeElement != node.getNode()){\r\n\t\t\tdispatcher.focusNode(dispatcher.getActiveNode());\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tvar updateEvent = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id){\r\n\t\tvar res = updateEvent.apply(this, arguments);\r\n\t\tif(scheduler.config.key_nav && dispatcher.isEnabled()){\r\n\t\t\tif(scheduler.getState().select_id == id){\r\n\t\t\t\tvar element = new scheduler.$keyboardNavigation.Event(id);\r\n\r\n\t\t\t\tif(!scheduler.getState().lightbox_id){\r\n\t\t\t\t\tfocusEvent(element);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn res;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onEventDeleted\", function(id) {\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\t\tif(dispatcher.isEnabled()){\r\n\t\t\tvar activeNode = dispatcher.getActiveNode();\r\n\t\t\tif(activeNode.eventId == id){\r\n\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onClearAll\", function(){\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\t\tif(dispatcher.isEnabled()){\r\n\t\t\tif(dispatcher.getActiveNode() instanceof scheduler.$keyboardNavigation.Event){\r\n\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation._minicalendars = [];\r\n\r\nscheduler.$keyboardNavigation.isMinical = function(node){\r\n\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\tif(this.isChildOf(node, minicalendars[i]))\r\n\t\t\treturn true;\r\n\t}\r\n\treturn false;\r\n};\r\n\r\nscheduler.$keyboardNavigation.isChildOf = function(child, parent){\r\n\twhile(child && child !== parent){\r\n\t\tchild = child.parentNode;\r\n\t}\r\n\r\n\treturn !!(child === parent);\r\n};\r\n\r\nscheduler.$keyboardNavigation.patchMinicalendar = function(){\r\n\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\tfunction focusMinical(e){\r\n\t\tvar target = e.target;\r\n\r\n\t\tdispatcher.enable();\r\n\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.MinicalButton(target, 0));\r\n\t}\r\n\r\n\tfunction minicalClick(e){\r\n\t\tvar target = e.target || e.srcElement;\r\n\r\n\t\tvar prev = scheduler.utils.dom.locateCss(e, \"dhx_cal_prev_button\", false);\r\n\t\tvar next = scheduler.utils.dom.locateCss(e, \"dhx_cal_next_button\", false);\r\n\t\tvar cell = scheduler.utils.dom.locateCss(e, \"dhx_year_body\", false);\r\n\r\n\t\tvar rowIndex = 0;\r\n\t\tvar cellIndex = 0;\r\n\t\tif(cell){\r\n\t\t\tvar tr;\r\n\t\t\tvar td;\r\n\t\t\tvar current = target;\r\n\t\t\twhile(current && current.tagName.toLowerCase() != \"td\"){\r\n\t\t\t\tcurrent = current.parentNode;\r\n\t\t\t}\r\n\t\t\tif(current){\r\n\t\t\t\ttd = current;\r\n\t\t\t\ttr = td.parentNode;\r\n\t\t\t}\r\n\r\n\t\t\tif(tr && td){\r\n\t\t\t\tvar rows = tr.parentNode.querySelectorAll(\"tr\");\r\n\t\t\t\tfor(var i = 0; i < rows.length; i++){\r\n\t\t\t\t\tif(rows[i] == tr){\r\n\t\t\t\t\t\trowIndex = i;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tvar cells = tr.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\t\t\tif(cells[i] == td){\r\n\t\t\t\t\t\tcellIndex = i;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tvar root = e.currentTarget;\r\n\t\tdispatcher.delay(function(){\r\n\t\t\tif(prev || next || cell){\r\n\r\n\t\t\t\tvar element;\r\n\t\t\t\tif(prev){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalButton(root, 0);\r\n\t\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.MinicalButton(root, 0));\r\n\t\t\t\t}else if(next){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalButton(root, 1);\r\n\t\t\t\t}else if(cell){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalCell(root, rowIndex, cellIndex);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(element){\r\n\r\n\t\t\t\t\tdispatcher.enable();\r\n\t\t\t\t\tif(element.isValid()){\r\n\t\t\t\t\t\tdispatcher.activeNode = null;\r\n\t\t\t\t\t\tdispatcher.setActiveNode(element);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t}\r\n\r\n\tif(scheduler.renderCalendar){\r\n\t\tvar renderMinical = scheduler.renderCalendar;\r\n\t\tscheduler.renderCalendar = function(){\r\n\t\t\tvar cal = renderMinical.apply(this, arguments);\r\n\t\t\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\r\n\t\t\tscheduler.eventRemove(cal, \"click\", minicalClick);\r\n\t\t\tscheduler.event(cal, \"click\", minicalClick);\r\n\r\n\t\t\tscheduler.eventRemove(cal, \"focus\", focusMinical);\r\n\t\t\tscheduler.event(cal, \"focus\", focusMinical);\r\n\r\n\t\t\tvar added = false;\r\n\t\t\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\t\t\tif(minicalendars[i] == cal){\r\n\t\t\t\t\tadded = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(!added)\r\n\t\t\t\tminicalendars.push(cal);\r\n\r\n\t\t\tif(dispatcher.isEnabled()){\r\n\t\t\t\tvar node = dispatcher.getActiveNode();\r\n\t\t\t\tif(node && node.container == cal){\r\n\t\t\t\t\tdispatcher.focusNode(node);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcal.setAttribute(\"tabindex\", \"0\");\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tcal.setAttribute(\"tabindex\", \"0\");\r\n\t\t\t}\r\n\t\t\treturn cal;\r\n\t\t};\r\n\t}\r\n\r\n\tif(scheduler.destroyCalendar){\r\n\t\tvar destroyMinical = scheduler.destroyCalendar;\r\n\t\tscheduler.destroyCalendar = function(cal, force){\r\n\t\t\tcal = cal || (scheduler._def_count ? scheduler._def_count.firstChild : null);\r\n\t\t\tvar res = destroyMinical.apply(this, arguments);\r\n\r\n\t\t\tif(!cal || !cal.parentNode){\r\n\t\t\t\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\t\t\t\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\t\t\t\tif(minicalendars[i] == cal){\r\n\t\t\t\t\t\tscheduler.eventRemove(minicalendars[i], \"focus\", focusMinical);\r\n\t\t\t\t\t\tminicalendars.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn res;\r\n\t\t};\r\n\t}\r\n};\r\n\r\n}","import keyboard_shortcuts from \"./keyboard_navigation/common/keyboard_shortcuts\";\r\nimport eventhandler from \"./keyboard_navigation/common/eventhandler\";\r\nimport trap_modal_focus from \"./keyboard_navigation/common/trap_modal_focus\";\r\nimport marker from \"./keyboard_navigation/marker\";\r\nimport scheduler_node from \"./keyboard_navigation/elements/scheduler_node\";\r\nimport nav_node from \"./keyboard_navigation/elements/nav_node\";\r\nimport header_cell from \"./keyboard_navigation/elements/header_cell\";\r\nimport event from \"./keyboard_navigation/elements/event\";\r\nimport time_slot from \"./keyboard_navigation/elements/time_slot\";\r\nimport minical_button from \"./keyboard_navigation/elements/minical_button\";\r\nimport minical_cell from \"./keyboard_navigation/elements/minical_cell\";\r\nimport data_area from \"./keyboard_navigation/elements/data_area\";\r\nimport modals from \"./keyboard_navigation/modals\";\r\nimport core from \"./keyboard_navigation/core\";\r\nimport key_nav_legacy from \"./keyboard_navigation/key_nav_legacy\";\r\n\r\n\r\nimport scheduler_handlers from \"./keyboard_navigation/scheduler_handlers\";\r\nimport minical_handlers from \"./keyboard_navigation/minical_handlers\";\r\n\r\nexport default function(scheduler){\r\n\t\tscheduler.config.key_nav = true;\r\n\t\tscheduler.config.key_nav_step = 30;\r\n\t\tscheduler.addShortcut = function(shortcut, handler, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tscopeObject.prototype.bind(shortcut, handler);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.getShortcutHandler = function(shortcut, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tvar commands = scheduler.$keyboardNavigation.shortcuts.parse(shortcut);\r\n\t\t\t\tif(commands.length){\r\n\t\t\t\t\treturn scopeObject.prototype.findHandler(commands[0]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.removeShortcut = function(shortcut, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tscopeObject.prototype.unbind(shortcut);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.focus = function(){\r\n\t\t\tif(!scheduler.config.key_nav){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar disp = scheduler.$keyboardNavigation.dispatcher;\r\n\t\t\tdisp.enable();\r\n\t\t\tvar activeNode = disp.getActiveNode();\r\n\t\t\tif(!activeNode || activeNode instanceof scheduler.$keyboardNavigation.MinicalButton || activeNode instanceof scheduler.$keyboardNavigation.MinicalCell){\r\n\t\t\t\tdisp.setDefaultNode();\r\n\t\t\t}else{\r\n\t\t\t\tdisp.focusNode(disp.getActiveNode());\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfunction getScope(mode){\r\n\t\t\tvar scopes = {\r\n\t\t\t\t\"minicalButton\":scheduler.$keyboardNavigation.MinicalButton,\r\n\t\t\t\t\"minicalDate\":scheduler.$keyboardNavigation.MinicalCell,\r\n\t\t\t\t\"scheduler\":scheduler.$keyboardNavigation.SchedulerNode,\r\n\t\t\t\t\"dataArea\": scheduler.$keyboardNavigation.DataArea,\r\n\t\t\t\t\"timeSlot\": scheduler.$keyboardNavigation.TimeSlot,\r\n\t\t\t\t\"event\": scheduler.$keyboardNavigation.Event\r\n\t\t\t};\r\n\r\n\t\t\tvar searchMap = {};\r\n\t\t\tfor(var i in scopes)\r\n\t\t\t\tsearchMap[i.toLowerCase()] = scopes[i];\r\n\r\n\t\t\tmode = (mode + \"\").toLowerCase();\r\n\r\n\t\t\treturn searchMap[mode] || scopes.scheduler;\r\n\t\t}\r\n\r\n\t\tscheduler.$keyboardNavigation = {};\r\n\r\n\t\tscheduler._compose = function(){\r\n\t\t\tvar parts = Array.prototype.slice.call(arguments, 0);\r\n\t\t\tvar res = {};\r\n\t\t\tfor(var i = 0; i < parts.length; i++){\r\n\t\t\t\tvar obj = parts[i];\r\n\t\t\t\tif(typeof obj == \"function\"){\r\n\t\t\t\t\tobj = new obj();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor(var p in obj){\r\n\t\t\t\t\tres[p] = obj[p];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn res;\r\n\t\t};\r\n\r\n\t\tkeyboard_shortcuts(scheduler);\r\n\t\teventhandler(scheduler);\r\n\t\ttrap_modal_focus(scheduler);\r\n\t\tmarker(scheduler);\r\n\t\tscheduler_node(scheduler);\r\n\t\tnav_node(scheduler);\r\n\t\theader_cell(scheduler);\r\n\t\tevent(scheduler);\r\n\t\ttime_slot(scheduler);\r\n\t\tminical_button(scheduler);\r\n\t\tminical_cell(scheduler);\r\n\t\tdata_area(scheduler);\r\n\t\tmodals(scheduler);\r\n\t\tcore(scheduler);\r\n\t\tkey_nav_legacy(scheduler);\r\n\r\n\t\t(function(){\r\n\t\t\tscheduler_handlers(scheduler);\r\n\t\t\tminical_handlers(scheduler);\r\n\r\n\t\t\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\t\t\tscheduler.$keyboardNavigation.attachSchedulerHandlers();\r\n\r\n\t\t\tif(scheduler.renderCalendar){\r\n\t\t\t\t// if minical ext loaded before key nav ext - patch it now\r\n\t\t\t\tscheduler.$keyboardNavigation.patchMinicalendar();\r\n\t\t\t}else{\r\n\t\t\t\t// otherwise - wait until everything is loaded and try again\r\n\t\t\t\tvar attachOnce = scheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\t\t\t\tscheduler.detachEvent(attachOnce);\r\n\t\t\t\t\tscheduler.$keyboardNavigation.patchMinicalendar();\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\tfunction isSchedulerSelected(){\r\n\t\t\t\tif(!scheduler.config.key_nav) return;\r\n\r\n\t\t\t\tvar enable;\r\n\t\t\t\tvar focusElement = document.activeElement;\r\n\t\t\t\t// halt key nav when focus is outside scheduler or in quick info popup\r\n\t\t\t\tif(!focusElement || scheduler.utils.dom.locateCss(focusElement, \"dhx_cal_quick_info\", false)){\r\n\t\t\t\t\tenable = false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tenable = scheduler.$keyboardNavigation.isChildOf(focusElement, scheduler.$container) || scheduler.$keyboardNavigation.isMinical(focusElement);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn enable;\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\tfunction changeState(enable){\r\n\t\t\t\tif(enable && !dispatcher.isEnabled()){\r\n\t\t\t\t\tdispatcher.enable();\r\n\t\t\t\t}else if(!enable && dispatcher.isEnabled()){\r\n\t\t\t\t\tdispatcher.disable();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tconst intervalId = setInterval(function(){\r\n\t\t\t\tif(!scheduler.$container || !scheduler.$keyboardNavigation.isChildOf(scheduler.$container, document.body)){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar enable = isSchedulerSelected();\r\n\r\n\t\t\t\tif(enable){\r\n\t\t\t\t\tchangeState(enable);\r\n\t\t\t\t}else if(!enable && dispatcher.isEnabled()){\r\n\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// doublecheck in case checking is done in handler before focus element is repainted\r\n\t\t\t\t\t\tif(scheduler.config.key_nav){\r\n\t\t\t\t\t\t\tchangeState(isSchedulerSelected());\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tscheduler.$container.removeAttribute(\"tabindex\");\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}, 100);\r\n\t\t\t\t}\r\n\t\t\t}, 500);\r\n\t\t\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\t\t\tclearInterval(intervalId);\r\n\t\t\t});\r\n\t\t})();\r\n\t}\r\n\r\n\r\n","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\r\n\tthis.layers.sort(function(a, b){\r\n\t\treturn a.zIndex - b.zIndex;\r\n\t});\r\n\r\n\tscheduler._dp_init=function(dp){\r\n\t\tdp._methods=[\"_set_event_text_style\",\"\",\"changeEventId\",\"deleteEvent\"];\r\n\r\n\t\tthis.attachEvent(\"onEventAdded\",function(id){\r\n\t\t\tif (!this._loading && this.validId(id) && this.getEvent(id) && this.getEvent(id).layer == dp.layer)\r\n\t\t\t\tdp.setUpdated(id,true,\"inserted\");\r\n\t\t});\r\n\t\tthis.attachEvent(\"onBeforeEventDelete\",function(id){\r\n\t\t\tif(this.getEvent(id) && this.getEvent(id).layer == dp.layer) {\r\n\t\t\t\tif (!this.validId(id)) return;\r\n\t\t\t\tvar z=dp.getState(id);\r\n\r\n\t\t\t\tif (z==\"inserted\" || this._new_event) { dp.setUpdated(id,false);\t\treturn true; }\r\n\t\t\t\tif (z==\"deleted\") return false;\r\n\t\t\t\tif (z==\"true_deleted\") return true;\r\n\r\n\t\t\t\tdp.setUpdated(id,true,\"deleted\");\r\n\t\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\telse return true;\r\n\t\t});\r\n\t\tthis.attachEvent(\"onEventChanged\",function(id){\r\n\t\t\tif (!this._loading && this.validId(id) && this.getEvent(id) && this.getEvent(id).layer == dp.layer)\r\n\t\t\t\tdp.setUpdated(id,true,\"updated\");\r\n\t\t});\r\n\r\n\t\tdp._getRowData=function(id,pref){\r\n\t\t\tvar ev=this.obj.getEvent(id);\r\n\t\t\tvar data = {};\r\n\r\n\t\t\tfor (var a in ev){\r\n\t\t\t\tif (a.indexOf(\"_\")===0) continue;\r\n\t\t\t\tif (ev[a] && ev[a].getUTCFullYear) //not very good, but will work\r\n\t\t\t\t\tdata[a] = this.obj._helpers.formatDate(ev[a]);\r\n\t\t\t\telse\r\n\t\t\t\t\tdata[a] = ev[a];\r\n\t\t\t}\r\n\t\t\treturn data;\r\n\t\t};\r\n\t\tdp._clearUpdateFlag=function(){};\r\n\r\n\t\tdp.attachEvent(\"insertCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"updateCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"deleteCallback\", function(upd, id) {\r\n\t\t\tthis.obj.setUserData(id, this.action_param, \"true_deleted\");\r\n\t\t\tthis.obj.deleteEvent(id);\r\n\t\t});\r\n\t};\r\n\r\n\t(function() {\r\n var _cloneObj = function(obj){\r\n if(obj === null || typeof(obj) != 'object')\r\n return obj;\r\n var temp = new obj.constructor();\r\n for(var key in obj)\r\n temp[key] = _cloneObj(obj[key]);\r\n return temp;\r\n };\r\n\r\n\t\tscheduler._dataprocessors = [];\r\n\t\tscheduler._layers_zindex = {};\r\n\t\tfor(var i=0; i= scheduler.config.collision_limit);\r\n\t});\r\n\r\n\tscheduler.addEvent=function(start_date,end_date,text,id,extra_data){\r\n\t\tvar ev=start_date;\r\n\t\tif (arguments.length!=1){\r\n\t\t\tev=extra_data||{};\r\n\t\t\tev.start_date=start_date;\r\n\t\t\tev.end_date=end_date;\r\n\t\t\tev.text=text;\r\n\t\t\tev.id=id;\r\n\t\t\tev.layer = this.defaultLayer;\r\n\t\t}\r\n\t\tev.id = ev.id||scheduler.uid();\r\n\t\tev.text = ev.text||\"\";\r\n\r\n\r\n\t\tif (typeof ev.start_date == \"string\") ev.start_date=this.templates.api_date(ev.start_date);\r\n\t\tif (typeof ev.end_date == \"string\") ev.end_date=this.templates.api_date(ev.end_date);\r\n\t\tev._timed=this.isOneDayEvent(ev);\r\n\r\n\t\tvar is_new=!this._events[ev.id];\r\n\t\tthis._events[ev.id]=ev;\r\n\t\tthis.event_updated(ev);\r\n\t\tif (!this._loading)\r\n\t\t\tthis.callEvent(is_new?\"onEventAdded\":\"onEventChanged\",[ev.id,ev]);\r\n\t};\r\n\r\n\tthis._evs_layer = {};\r\n\tfor (var i = 0; i < this.layers.length; i++) { // array in object for each layer\r\n\t\tthis._evs_layer[this.layers[i].name] = [];\r\n\t}\r\n\r\n\tscheduler.addEventNow=function(start,end,e){\r\n\t\tvar base = {};\r\n\t\tif (typeof start == \"object\"){\r\n\t\t\tbase = start;\r\n\t\t\tstart = null;\r\n\t\t}\r\n\r\n\t\tvar d = (this.config.event_duration||this.config.time_step)*60000;\r\n\t\tif (!start) start = Math.round((scheduler._currentDate()).valueOf()/d)*d;\r\n\t\tvar start_date = new Date(start);\r\n\t\tif (!end){\r\n\t\t\tvar start_hour = this.config.first_hour;\r\n\t\t\tif (start_hour > start_date.getHours()){\r\n\t\t\t\tstart_date.setHours(start_hour);\r\n\t\t\t\tstart = start_date.valueOf();\r\n\t\t\t}\r\n\t\t\tend = start+d;\r\n\t\t}\r\n\r\n\r\n\t\tbase.start_date = base.start_date||start_date;\r\n\t\tbase.end_date = base.end_date||new Date(end);\r\n\t\tbase.text = base.text||this.locale.labels.new_event;\r\n\t\tbase.id = this._drag_id = this.uid();\r\n\t\tbase.layer = this.defaultLayer;\r\n\t\tthis._drag_mode=\"new-size\";\r\n\r\n\t\tthis._loading=true;\r\n\t\tthis.addEvent(base);\r\n\t\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\t\tthis._loading=false;\r\n\r\n\t\tthis._drag_event={}; //dummy , to trigger correct event updating logic\r\n\t\tthis._on_mouse_up(e);\r\n\t};\r\n\r\n\tscheduler._t_render_view_data = function(events) { // helper\r\n\t\tif (this.config.multi_day && !this._table_view) {\r\n\t\t\tvar tvs = [];\r\n\t\t\tvar tvd = [];\r\n\t\t\tfor (var k = 0; k < events.length; k++) {\r\n\t\t\t\tif (events[k]._timed)\r\n\t\t\t\t\ttvs.push(events[k]);\r\n\t\t\t\telse\r\n\t\t\t\t\ttvd.push(events[k]);\r\n\t\t\t}\r\n\t\t\tthis._table_view = true;\r\n\t\t\tthis.render_data(tvd);\r\n\t\t\tthis._table_view = false;\r\n\t\t\tthis.render_data(tvs);\r\n\t\t}\r\n\t\telse\r\n\t\t\tthis.render_data(events);\r\n\t};\r\n\r\n\tscheduler.render_view_data = function(){\r\n\t\tif (this._not_render) {\r\n\t\t\tthis._render_wait = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._render_wait = false;\r\n\r\n\t\tthis.clear_view();\r\n\r\n\t\tthis._evs_layer = {};\r\n\t\tfor (var i = 0; i < this.layers.length; i++) { // array in object for each layer\r\n\t\t\tthis._evs_layer[this.layers[i].name] = [];\r\n\t\t}\r\n\r\n\t\tvar evs = this.get_visible_events();\r\n\t\tfor (var i = 0; i < evs.length; i++) { // filling layer arrays with events\r\n\t\t\tif(this._evs_layer[evs[i].layer])\r\n\t\t\t\tthis._evs_layer[evs[i].layer].push(evs[i]);\r\n\t\t}\r\n\r\n\t\tif(this._mode == 'month') { // old logic is used\r\n\t\t\tvar tevs = [];\r\n\t\t\tfor (var i = 0; i < this.layers.length; i++) {\r\n\t\t\t\tif (this.layers[i].visible)\r\n\t\t\t\t\ttevs = tevs.concat(this._evs_layer[this.layers[i].name]);\r\n\t\t\t}\r\n\t\t\tthis._t_render_view_data(tevs);\r\n\t\t}\r\n\t\telse { // week, day; should use new logic\r\n\t\t\tfor (var i = 0; i < this.layers.length; i++) {\r\n\t\t\t\tif (this.layers[i].visible) {\r\n\t\t\t\t\tvar evs_layer = this._evs_layer[this.layers[i].name];\r\n\t\t\t\t\tthis._t_render_view_data(evs_layer);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._render_v_bar=function(ev,x,y,w,h,style,contentA,contentB,bottom){\r\n\t\tvar id = ev.id;\r\n\r\n\t\tif(contentA.indexOf('
';\r\n\t\thtml+='
 
';\r\n\t\thtml+='
'+contentA+'
';\r\n\t\thtml+='
'+contentB+'
';\r\n\t\thtml+='
';\r\n\r\n\t\td.innerHTML=html;\r\n\t\td.style.zIndex = 100;\r\n\t\treturn d.firstChild;\r\n\t};\r\n\r\n\tscheduler.render_event_bar=function(ev){\r\n\t\tvar parent=this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tvar x=this._colsS[ev._sday];\r\n\t\tvar x2=this._colsS[ev._eday];\r\n\t\tif (x2==x) x2=this._colsS[ev._eday+1];\r\n\t\tvar hb = this.xy.bar_height;\r\n\r\n\t\tvar y=this._colsS.heights[ev._sweek]+(this._colsS.height?(this.xy.month_scale_height+2):2)+ev._sorder*hb;\r\n\r\n\t\tvar d=document.createElement(\"div\");\r\n\t\tvar cs = ev._timed?\"dhx_cal_event_clear\":\"dhx_cal_event_line\";\r\n\t\tvar cse = (scheduler.templates['event_class_'+ev.layer])?scheduler.templates['event_class_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_class(ev.start_date,ev.end_date,ev);\r\n\t\tif (cse) cs=cs+\" \"+cse;\r\n\r\n\t\tvar html='
';\r\n\r\n\t\tif (ev._timed)\r\n\t\t\thtml+=(scheduler.templates['event_bar_date_'+ev.layer])?scheduler.templates['event_bar_date_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_bar_date(ev.start_date,ev.end_date,ev);\r\n\t\thtml+=( (scheduler.templates['event_bar_text_'+ev.layer])?scheduler.templates['event_bar_text_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_bar_text(ev.start_date,ev.end_date,ev) + '
)');\r\n\t\thtml+='
';\r\n\r\n\t\td.innerHTML=html;\r\n\r\n\t\tthis._rendered.push(d.firstChild);\r\n\t\tparent.appendChild(d.firstChild);\r\n\t};\r\n\r\n\tscheduler.render_event=function(ev){\r\n\t\tvar menu = scheduler.xy.menu_width;\r\n\t\tif(scheduler.getLayer(ev.layer).noMenu)\r\n\t\t\tmenu = 0;\r\n\r\n\t\tif (ev._sday<0) return; //can occur in case of recurring event during time shift\r\n\t\tvar parent=scheduler.locate_holder(ev._sday);\r\n\t\tif (!parent) return; //attempt to render non-visible event\r\n\t\tvar sm = ev.start_date.getHours()*60+ev.start_date.getMinutes();\r\n\t\tvar em = (ev.end_date.getHours()*60+ev.end_date.getMinutes())||(scheduler.config.last_hour*60);\r\n\r\n\t\tvar top = (Math.round((sm*60*1000-this.config.first_hour*60*60*1000)*this.config.hour_size_px/(60*60*1000)))%(this.config.hour_size_px*24)+1; //42px/hour\r\n\t\tvar height = Math.max(scheduler.xy.min_event_height,(em-sm)*this.config.hour_size_px/60)+1; //42px/hour\r\n\t\t\r\n\t\tvar width=Math.floor((parent.clientWidth-menu)/ev._count);\r\n\t\tvar left=ev._sorder*width+1;\r\n\t\tif (!ev._inner) width=width*(ev._count-ev._sorder);\r\n\r\n\r\n\r\n\t\tvar d=this._render_v_bar(ev.id,menu+left,top,width,height,ev._text_style,scheduler.templates.event_header(ev.start_date,ev.end_date,ev),scheduler.templates.event_text(ev.start_date,ev.end_date,ev));\r\n\r\n\t\tthis._rendered.push(d);\r\n\t\tparent.appendChild(d);\r\n\r\n\t\tleft=left+parseInt(parent.style.left,10)+menu;\r\n\r\n\t\ttop+=this._dy_shift; //corrupt top, to include possible multi-day shift\r\n\t\td.style.zIndex = this._layers_zindex[ev.layer];\r\n\r\n\t\tif (this._edit_id==ev.id){\r\n\t\t\td.style.zIndex = parseInt(d.style.zIndex)+1; //fix overlapping issue\r\n\t\t\tvar new_zIndex = d.style.zIndex;\r\n\t\t\twidth=Math.max(width-4,scheduler.xy.editor_width);\r\n\t\t\tvar d=document.createElement(\"div\");\r\n\t\t\td.setAttribute(\"event_id\",ev.id); // for backward compatibility\r\n\t\t\td.setAttribute(this.config.event_attribute,ev.id);\r\n\t\t\tthis.set_xy(d,width,height-20,left,top+14);\r\n\t\t\td.className=\"dhx_cal_editor\";\r\n\t\t\td.style.zIndex = new_zIndex;\r\n\t\t\tvar d2=document.createElement(\"div\");\r\n\t\t\tthis.set_xy(d2,width-6,height-26);\r\n\t\t\td2.style.cssText+=\";margin:2px 2px 2px 2px;overflow:hidden;\";\r\n\r\n\r\n\t\t\td2.style.zIndex = new_zIndex;\r\n\t\t\td.appendChild(d2);\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].appendChild(d);\r\n\t\t\tthis._rendered.push(d);\r\n\r\n\t\t\td2.innerHTML=\"\";\r\n\r\n\t\t\tthis._editor=d2.firstChild;\r\n\t\t\tthis._editor.addEventListener(\"keypress\", function(e){\r\n\t\t\t\tif (e.shiftKey) return true;\r\n\t\t\t\tvar code= e.keyCode;\r\n\t\t\t\tif (code==scheduler.keys.edit_save) scheduler.editStop(true);\r\n\t\t\t\tif (code==scheduler.keys.edit_cancel) scheduler.editStop(false);\r\n\t\t\t});\r\n\t\t\tthis._editor.addEventListener(\"selectstart\", function(e){ e.cancelBubble=true; return true; });\r\n\t\t\td2.firstChild.focus();\r\n\t\t\t//IE and opera can add x-scroll during focusing\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].scrollLeft=0;\r\n\t\t\td2.firstChild.select();\r\n\t\t}\r\n\t\tif (this._select_id==ev.id){\r\n\t\t\td.style.zIndex = parseInt(d.style.zIndex)+1; //fix overlapping issue\r\n\t\t\tvar icons=this.config[\"icons_\"+((this._edit_id==ev.id)?\"edit\":\"select\")];\r\n\t\t\tvar icons_str=\"\";\r\n\t\t\tfor (var i=0; i
\";\r\n\t\t\tvar obj = this._render_v_bar(ev.id,left-menu+1,top,menu,icons.length*20+26,\"\",\"
\",icons_str,true);\r\n\t\t\tobj.style.left=left-menu+1;\r\n\t\t\tobj.style.zIndex = d.style.zIndex;\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].appendChild(obj);\r\n\t\t\tthis._rendered.push(obj);\r\n\t\t}\r\n\r\n\t};\r\n\r\n scheduler.filter_agenda = function(id, event) {\r\n var layer = scheduler.getLayer(event.layer);\r\n return (layer && layer.visible);\r\n };\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.limit_start = null;\r\nscheduler.config.limit_end = null;\r\nscheduler.config.limit_view = false;\r\nscheduler.config.check_limits = true;\r\nscheduler.config.mark_now = true;\r\nscheduler.config.display_marked_timespans = true;\r\nscheduler.config.overwrite_marked_timespans = true;\r\nscheduler._temp_limit_scope = function(){\r\n\tvar before = null;\r\n\tvar dhx_time_block = \"dhx_time_block\";\r\n\tvar default_timespan_type = \"default\";\r\n\tvar fix_options = function(options, days, zones) {\r\n\t\tif (days instanceof Date && zones instanceof Date) {\r\n\t\t\toptions.start_date = days;\r\n\t\t\toptions.end_date = zones;\r\n\t\t} else {\r\n\t\t\toptions.days = days;\r\n\t\t\toptions.zones = zones;\r\n\t\t}\r\n\t\treturn options;\r\n\t};\r\n\tvar get_resulting_options = function(days, zones, sections) {\r\n\t\tvar options = (typeof days == \"object\") ? days : { days: days };\r\n\t\toptions.type = dhx_time_block;\r\n\t\toptions.css = \"\";\r\n\t\tif (zones) {\r\n\t\t\tif (sections)\r\n\t\t\t\toptions.sections = sections;\r\n\t\t\toptions = fix_options(options, days, zones);\r\n\t\t}\r\n\t\treturn options;\r\n\t};\r\n\tscheduler.blockTime = function(days, zones, sections){\r\n\t\tvar options = get_resulting_options(days, zones, sections);\r\n\t\treturn scheduler.addMarkedTimespan(options);\r\n\t};\r\n\tscheduler.unblockTime = function(days, zones, sections) {\r\n\t\tzones = zones || \"fullday\";\r\n\t\tvar options = get_resulting_options(days, zones, sections);\r\n\t\treturn scheduler.deleteMarkedTimespan(options);\r\n\t};\r\n\tscheduler.attachEvent(\"onBeforeViewChange\",function(om,od,nm,nd){\r\n\r\n\t\tfunction isBlocked(date, mode){\r\n\t\t\tvar limit_start = scheduler.config.limit_start,\r\n\t\t\t\tlimit_end = scheduler.config.limit_end,\r\n\t\t\t\tdate_end = scheduler.date.add(date,1,mode);\r\n\r\n\t\t\treturn (date.valueOf() > limit_end.valueOf() || date_end <= limit_start.valueOf());\r\n\t\t}\r\n\r\n\t\tif (scheduler.config.limit_view){\r\n\t\t\tnd = nd||od; nm = nm||om;\r\n\t\t\tif (isBlocked(nd, nm) && !(od.valueOf() == nd.valueOf())){\r\n\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvar resetDate = !isBlocked(od, nm) ? od : scheduler.config.limit_start;\r\n\r\n\t\t\t\t\tscheduler.setCurrentView(!isBlocked(resetDate, nm) ? resetDate : null, nm);\r\n\t\t\t\t},1);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.checkInMarkedTimespan = function(ev, timespan_type, on_overlap){\r\n\t\ttimespan_type = timespan_type || default_timespan_type;\r\n\r\n\t\tvar res = true;\r\n\t\tvar temp_start_date = new Date(ev.start_date.valueOf());\r\n\t\tvar temp_end_date = scheduler.date.add(temp_start_date, 1, \"day\");\r\n\t\tvar timespans = scheduler._marked_timespans;\r\n\t\tfor (; temp_start_date < ev.end_date; temp_start_date = scheduler.date.date_part(temp_end_date), temp_end_date = scheduler.date.add(temp_start_date, 1, \"day\") ) {\r\n\t\t\tvar day_value = +scheduler.date.date_part( new Date(temp_start_date) ); // the first part of event not necessarily contains only date part\r\n\t\t\tvar day_index = temp_start_date.getDay();\r\n\r\n\t\t\tvar zones = getZones(ev, timespans, day_index, day_value, timespan_type);\r\n\t\t\tif (zones){\r\n\t\t\t\tfor (var i = 0; i < zones.length; i+=2) {\r\n\r\n\t\t\t\t\t// they may change for new event if it passes limit zone\r\n\t\t\t\t\tvar eventStart = scheduler._get_zone_minutes(temp_start_date);\r\n\t\t\t\t\tvar eventEnd = ( ev.end_date>temp_end_date || ev.end_date.getDate() != temp_start_date.getDate() ) ? 1440 : scheduler._get_zone_minutes(ev.end_date);\r\n\r\n\t\t\t\t\tvar markerStart = zones[i];\r\n\t\t\t\t\tvar markerEnd = zones[i+1];\r\n\t\t\t\t\tif (markerStarteventStart) {\r\n\t\t\t\t\t\tif(typeof on_overlap == \"function\"){\r\n\t\t\t\t\t\t\t//handler allows to cancel overlapping\r\n\t\t\t\t\t\t\t//actually needed only to keep default behavior of limits\r\n\t\t\t\t\t\t\tres = on_overlap(ev, eventStart, eventEnd, markerStart, markerEnd);//event object, event start/end minutes in 'zones' format, zone start/end minutes\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tres = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(!res)\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn !res;\r\n\t};\r\n\tvar blocker = scheduler.checkLimitViolation = function(event){\r\n\t\tif(!event)\r\n\t\t\treturn true;\r\n\t\tif (!scheduler.config.check_limits)\r\n\t\t\treturn true;\r\n\t\tvar s = scheduler;\r\n\t\tvar c = s.config;\r\n\t\tvar evs = [];\r\n\t\tif (event.rec_type) {\r\n\t\t\tvar dates = scheduler.getRecDates(event);\r\n\t\t\tfor(var i=0; i < dates.length; i++){\r\n\t\t\t\tvar ev = scheduler._copy_event(event);\r\n\t\t\t\tscheduler._lame_copy(ev, dates[i]);\r\n\t\t\t\tevs.push(ev);\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\tevs = [event];\r\n\t\t}\r\n\r\n\t\tvar complete_res = true;\r\n\t\tfor (var p=0; p= c.limit_start.valueOf() && ev.end_date.valueOf() <= c.limit_end.valueOf()) : true;\r\n\t\t\tif (res){\r\n\t\t\t\tres = !scheduler.checkInMarkedTimespan(ev, dhx_time_block, function(event, eventStart, eventEnd, markerStart, markerEnd){\r\n\t\t\t\t\t//try crop event to allow placing\r\n\t\t\t\t\tvar allow = true;\r\n\t\t\t\t\tif (eventStart<=markerEnd && eventStart >= markerStart){\r\n\t\t\t\t\t\tif (markerEnd == 24*60 || eventEnd <= markerEnd){\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(event._timed && s._drag_id && s._drag_mode == \"new-size\"){\r\n\t\t\t\t\t\t\tevent.start_date.setHours(0);\r\n\t\t\t\t\t\t\tevent.start_date.setMinutes(markerEnd);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ((eventEnd >= markerStart && eventEnd <= markerEnd) || (eventStart < markerStart && eventEnd > markerEnd)){\r\n\t\t\t\t\t\tif(event._timed && s._drag_id && s._drag_mode == \"new-size\"){\r\n\t\t\t\t\t\t\tevent.end_date.setHours(0);\r\n\t\t\t\t\t\t\tevent.end_date.setMinutes(markerStart);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn allow;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\tif (!res) {\r\n\t\t\t\tres = (s.checkEvent(\"onLimitViolation\")) ? s.callEvent(\"onLimitViolation\",[ev.id, ev]) : res;\r\n\t\t\t}\r\n\t\t\tcomplete_res = complete_res && res;\r\n\t\t}\r\n\t\tif(!complete_res){\r\n\t\t\ts._drag_id = null;\r\n\t\t\ts._drag_mode = null;\r\n\t\t}\r\n\t\treturn complete_res;\r\n\r\n\r\n\t};\r\n\tscheduler._get_blocked_zones = function(timespans, property, day_index, day_value, timespan_type){\r\n\t\tvar zones =[];\r\n\t\tif (timespans && timespans[property]) {\r\n\t\t\tvar timeline_zones = timespans[property];\r\n\t\t\tvar blocked_timeline_zones = this._get_relevant_blocked_zones(day_index, day_value, timeline_zones, timespan_type);\r\n\t\t\tfor (var i=0; i= scheduler.config.limit_end.valueOf()) {\r\n\t\t\t\tev.start_date = this.date.add(scheduler.config.limit_end, -1, \"day\");\r\n\t\t\t}\r\n\t\t\tif (ev.end_date < scheduler.config.limit_start) {\r\n\t\t\t\tev.end_date = new Date(scheduler.config.limit_start);\r\n\t\t\t}\r\n\t\t\tif (ev.end_date.valueOf() >= scheduler.config.limit_end.valueOf()) {\r\n\t\t\t\tev.end_date = this.date.add(scheduler.config.limit_end, -1, \"day\");\r\n\t\t\t}\r\n\t\t\tif (ev.start_date.valueOf() >= ev.end_date.valueOf()) {\r\n\t\t\t\tev.end_date = this.date.add(ev.start_date, (this.config.event_duration||this.config.time_step), \"minute\");\r\n\t\t\t}\r\n\t\t\tev._timed=this.isOneDayEvent(ev);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventChanged\",function(id){\r\n\t\tif (!id) return true;\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tif (!blocker(ev)){\r\n\t\t\tif (!before) return false;\r\n\t\t\tev.start_date = before[0];\r\n\t\t\tev.end_date = before[1];\r\n\t\t\tev._timed=this.isOneDayEvent(ev);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onBeforeEventChanged\",function(ev, native_object, is_new){\r\n\t\treturn blocker(ev);\r\n\t});\r\n\tscheduler.attachEvent(\"onBeforeEventCreated\", function(ev) { // native event\r\n\t\tvar start_date = scheduler.getActionData(ev).date;\r\n\t\tvar event = {\r\n\t\t\t_timed: true,\r\n\t\t\tstart_date: start_date,\r\n\t\t\tend_date: scheduler.date.add(start_date, scheduler.config.time_step, \"minute\")\r\n\t\t};\r\n\t\treturn blocker(event);\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", function(){\r\n\t\tscheduler._mark_now();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onAfterSchedulerResize\", function(){\r\n\t\twindow.setTimeout(function(){ \r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler._mark_now(); \r\n\t\t}, 1);\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\t\tscheduler._mark_now_timer = window.setInterval(function() {\r\n\t\t\tif(!scheduler._is_initialized())\r\n\t\t\t\treturn;\r\n\t\t\tscheduler._mark_now();\r\n\t\t}, 60000);\r\n\t});\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tclearInterval(scheduler._mark_now_timer);\r\n\t});\r\n\tscheduler._mark_now = function(hide) {\r\n\t\t// day, week, units views\r\n\t\tvar dhx_now_time = 'dhx_now_time';\r\n\t\tif (!this._els[dhx_now_time]) {\r\n\t\t\tthis._els[dhx_now_time] = [];\r\n\t\t}\r\n\t\tvar now = scheduler._currentDate();\r\n\t\tvar cfg = this.config;\r\n\t\tscheduler._remove_mark_now(); // delete previous marks if they exist\r\n\t\tif (!hide && cfg.mark_now && now < this._max_date && now > this._min_date && now.getHours() >= cfg.first_hour && now.getHours() 1) {\r\n\t\t\t\t\tif(view.size && view.options.length){\r\n\t\t\t\t\t\tday_index = ((view.position+ day_index) / view.options.length) * view.size;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstart_index = day_index;\r\n\t\t\t\t\tend_index = day_index + units_l;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tstart_index = 0;\r\n\t\t\t\t\tend_index = start_index + units_l;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar r_divs = [];\r\n\r\n\t\t\t\tfor (var i = start_index; i < end_index; i++) {\r\n\t\t\t\t\tvar t_day = i; // as each unit is actually considered +1 day\r\n\t\t\t\t\toptions.days = t_day;\r\n\t\t\t\t\tvar t_div = scheduler._render_marked_timespan(options, null, t_day)[0];\r\n\t\t\t\t\tr_divs.push(t_div);\r\n\t\t\t\t}\r\n\t\t\t\treturn r_divs;\r\n\t\t\t} else { // day/week views\r\n\t\t\t\toptions.days = day_index;\r\n\t\t\t\treturn scheduler._render_marked_timespan(options, null, day_index);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\toptions.days = +scheduler.date.date_part(now);\r\n\t\t\t\treturn scheduler._render_marked_timespan(options, null, null);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\tscheduler._remove_mark_now = function() {\r\n\t\tvar dhx_now_time = 'dhx_now_time';\r\n\t\tvar els = this._els[dhx_now_time];\r\n\t\tfor (var i=0; i config.start_date) || (config.days !== undefined && config.zones)) && !config.type )\r\n\t\t\treturn r_configs; // incorrect config was provided\r\n\r\n\t\tvar min = 0;\r\n\t\tvar max = 24*60;\r\n\t\tif (config.zones == \"fullday\")\r\n\t\t\tconfig.zones = [min, max];\r\n\t\tif (config.zones && config.invert_zones) {\r\n\t\t\tconfig.zones = scheduler.invertZones(config.zones);\r\n\t\t}\r\n\r\n\t\tconfig.id = scheduler.uid();\r\n\t\tconfig.css = config.css||\"\";\r\n\t\tconfig.type = config.type||default_timespan_type;\r\n\r\n\t\tvar sections = config.sections;\r\n\t\tif (sections) {\r\n\t\t\tfor (var view_key in sections) {\r\n\t\t\t\tif (sections.hasOwnProperty(view_key)) {\r\n\t\t\t\t\tvar ids = sections[view_key];\r\n\t\t\t\t\tif (!(ids instanceof Array))\r\n\t\t\t\t\t\tids = [ids];\r\n\t\t\t\t\tfor (var i=0; i t_sd) ? scheduler._get_zone_minutes(start_date) : min;\r\n\t\t\t\t\tvar zone_end = ( end_date > t_ed || end_date.getDate() != t_sd.getDate() ) ? max : scheduler._get_zone_minutes(end_date);\r\n\t\t\t\t\tt_config.zones = [zone_start, zone_end];\r\n\t\t\t\t\tr_configs.push(t_config);\r\n\r\n\t\t\t\t\tt_sd = t_ed;\r\n\t\t\t\t\tt_ed = scheduler.date.add(t_ed, 1, \"day\");\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (c_config.days instanceof Date)\r\n\t\t\t\t\tc_config.days = (scheduler.date.date_part(c_config.days)).valueOf();\r\n\t\t\t\tc_config.zones = config.zones.slice();\r\n\t\t\t\tr_configs.push(c_config);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn r_configs;\r\n\t};\r\n\tscheduler._get_dates_by_index = function(index, start, end) {\r\n\t\tvar dates = [];\r\n\t\tstart = scheduler.date.date_part(new Date(start||scheduler._min_date));\r\n\t\tend = new Date(end||scheduler._max_date);\r\n\t\tvar start_day = start.getDay();\r\n\t\tvar delta = (index-start_day >= 0) ? (index-start_day) : (7-start.getDay()+index);\r\n\t\tvar t_date = scheduler.date.add(start, delta, \"day\");\r\n\t\tfor (; t_date < end; t_date = scheduler.date.add(t_date, 1, \"week\")) {\r\n\t\t\tdates.push(t_date);\r\n\t\t}\r\n\t\treturn dates;\r\n\t};\r\n\tscheduler._get_css_classes_by_config = function(config) {\r\n\t\tvar css_classes = [];\r\n\t\tif (config.type == dhx_time_block) {\r\n\t\t\tcss_classes.push(dhx_time_block);\r\n\t\t\tif (config.css)\r\n\t\t\t\tcss_classes.push(dhx_time_block+\"_reset\");\r\n\t\t}\r\n\t\tcss_classes.push(\"dhx_marked_timespan\", config.css);\r\n\t\treturn css_classes.join(\" \");\r\n\t};\r\n\tscheduler._get_block_by_config = function(config) {\r\n\t\tvar block = document.createElement(\"div\");\r\n\t\tif (config.html) {\r\n\t\t\tif (typeof config.html == \"string\")\r\n\t\t\t\tblock.innerHTML = config.html;\r\n\t\t\telse\r\n\t\t\t\tblock.appendChild(config.html);\r\n\t\t}\r\n\t\treturn block;\r\n\t};\r\n\tscheduler._render_marked_timespan = function(options, area, day) {\r\n\t\tvar blocks = []; // resulting block which will be rendered and returned\r\n\t\tvar c = scheduler.config;\r\n\t\tvar min_date = this._min_date;\r\n\t\tvar max_date = this._max_date;\r\n\t\tvar day_value = false; // if timespan for specific date should be displayed\r\n\r\n\t\tif (!c.display_marked_timespans)\r\n\t\t\treturn blocks;\r\n\r\n\t\t// in case of markTimespan\r\n\t\tif (!day && day !== 0) {\r\n\t\t\tif (options.days < 7)\r\n\t\t\t\tday = options.days;\r\n\t\t\telse {\r\n\t\t\t\tvar date_to_display = new Date(options.days);\r\n\t\t\t\tday_value = +date_to_display;\r\n\r\n\t\t\t\t// in case of markTimespan date could be not in the viewing range, need to return\r\n\t\t\t\tif ( !(+max_date > +date_to_display && +min_date <= +date_to_display) )\r\n\t\t\t\t\treturn blocks;\r\n\r\n\t\t\t\tday = date_to_display.getDay();\r\n\t\t\t}\r\n\r\n\t\t\t// convert day default index (Sun - 0, Sat - 6) to index of hourscales (depends on week_start and config.start_on_monday)\r\n\t\t\tvar min_day = min_date.getDay();\r\n\t\t\tif (min_day > day) {\r\n\t\t\t\tday = 7 - (min_day-day);\r\n\t\t\t} else {\r\n\t\t\t\tday = day - min_day;\r\n\t\t\t}\r\n\t\t}\r\n\t\tvar zones = options.zones;\r\n\t\tvar css_classes = scheduler._get_css_classes_by_config(options);\r\n\r\n\t\tif (scheduler._table_view && scheduler._mode == \"month\") {\r\n\t\t\tvar areas = [];\r\n\t\t\tvar days = [];\r\n\r\n\r\n\t\t\tif (!area) {\r\n\t\t\t\tdays = (day_value) ? [day_value] : scheduler._get_dates_by_index(day);\r\n\t\t\t\tfor (var i=0; i < days.length; i++) {\r\n\t\t\t\t\tareas.push( this._scales[days[i]] );\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tareas.push(area);\r\n\t\t\t\tdays.push(day);\r\n\t\t\t}\r\n\r\n\t\t\tfor (var i=0; i < areas.length; i++) {\r\n\t\t\t\tarea = areas[i];\r\n\t\t\t\tday = days[i];\r\n\r\n\t\t\t\tvar sday = this.locate_holder_day(day, false) % this._cols.length;\r\n\r\n\t\t\t\tif(this._ignores[sday]) continue;\r\n\r\n\t\t\t\tvar block_proto = scheduler._get_block_by_config(options);\r\n\t\t\t\tblock_proto.className = css_classes;\r\n\t\t\t\tblock_proto.style.top = \"0px\";\r\n\t\t\t\tblock_proto.style.height = \"100%\";\r\n\t\t\t\t\r\n\t\t\t\tfor (var k=0; k < zones.length; k+=2) {\r\n\t\t\t\t\tvar start = zones[i];\r\n\t\t\t\t\tvar end = zones[i+1];\r\n\t\t\t\t\tif (end <= start)\r\n\t\t\t\t\t\treturn [];\r\n\r\n\t\t\t\t\tvar block = block_proto.cloneNode(true);\r\n\r\n\t\t\t\t\tblock.style.left = \"0px\";\r\n\t\t\t\t\tblock.style.width = \"100%\";\r\n\r\n\t\t\t\t\tarea.appendChild(block);\r\n\t\t\t\t\tblocks.push(block);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tvar index = day;\r\n\r\n\t\t\tif(this._ignores[this.locate_holder_day(day, false)]) return blocks;\r\n\r\n\t\t\tif (this._props && this._props[this._mode] && options.sections && options.sections[this._mode]) {\r\n\t\t\t\tvar view = this._props[this._mode];\r\n\t\t\t\tindex = view.order[options.sections[this._mode]];\r\n\r\n\t\t\t\tvar inner_index = view.order[options.sections[this._mode]];\r\n\t\t\t\tif(!(view.days > 1)){\r\n\t\t\t\t\tindex = inner_index;\r\n\t\t\t\t\tif (view.size && (index > view.position+view.size)) {\r\n\t\t\t\t\t\tindex = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar units_l = view.size || view.options.length;\r\n\t\t\t\t\tindex = index*units_l + inner_index;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tarea = area ? area : scheduler.locate_holder(index);\r\n\r\n\t\t\tfor (var i = 0; i < zones.length; i+=2){\r\n\t\t\t\tvar start = Math.max(zones[i], c.first_hour*60);\r\n\t\t\t\tvar end = Math.min(zones[i+1], c.last_hour*60);\r\n\t\t\t\tif (end <= start) {\r\n\t\t\t\t\tif (i+2 < zones.length)\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\treturn [];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar block = scheduler._get_block_by_config(options);\r\n\t\t\t\tblock.className = css_classes;\r\n\r\n\t\t\t\t// +1 for working with section which really takes up whole height (as % would be == 0)\r\n\t\t\t\tvar all_hours_height = this.config.hour_size_px*24 + 1;\r\n\t\t\t\tvar hour_ms = 60*60*1000;\r\n\t\t\t\tblock.style.top = (Math.round((start*60*1000-this.config.first_hour*hour_ms)*this.config.hour_size_px/hour_ms) % all_hours_height) + \"px\";\r\n\t\t\t\tblock.style.height = Math.max((Math.round(((end-start)*60*1000)*this.config.hour_size_px/hour_ms)) % all_hours_height, 1)+\"px\";\r\n\r\n\t\t\t\tarea.appendChild(block);\r\n\t\t\t\tblocks.push(block);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn blocks;\r\n\t};\r\n\r\n\tscheduler._mark_timespans = function(){\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\t\tvar divs = [];\r\n\t\tif (scheduler._table_view && scheduler._mode == \"month\"){\r\n\t\t\tfor (var day in this._scales) {\r\n\t\t\t\tvar date = new Date(+day);\r\n\t\t\t\tdivs.push.apply(divs, scheduler._on_scale_add_marker(this._scales[day],date));\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\t//manually trigger rendering of configs for each column\r\n\t\t\tvar date = new Date(scheduler._min_date);\r\n\t\t\tfor (var i = 0, len = data.childNodes.length; i < len; i++) {\r\n\t\t\t\tvar area = data.childNodes[i];\r\n\t\t\t\tif (area.firstChild && scheduler._getClassName(area.firstChild).indexOf(\"dhx_scale_hour\") > -1) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdivs.push.apply(divs, scheduler._on_scale_add_marker(area, date));\r\n\t\t\t\tdate = scheduler.date.add(date, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn divs;\r\n\t};\r\n\r\n\t// just marks timespan, will be cleaned after refresh\r\n\tscheduler.markTimespan = function(configuration) {\r\n\r\n\t\tif(!this._els){\r\n\t\t\tthrow new Error(\"`scheduler.markTimespan` can't be used before scheduler initialization. Place `scheduler.markTimespan` call after `scheduler.init`.\");\r\n\t\t}\r\n\r\n\t\tvar rebuild_els = false;\r\n\t\tif(!this._els[\"dhx_cal_data\"]){\r\n\t\t\tscheduler.get_elements();\r\n\t\t\trebuild_els = true;\r\n\t\t}\r\n\r\n\r\n\t\t// backup regular marked timespans\r\n\t\tvar timespans_ids = scheduler._marked_timespans_ids,\r\n\t\t\ttimespan_types = scheduler._marked_timespans_types,\r\n\t\t\ttimespans = scheduler._marked_timespans;\r\n\r\n\t\tscheduler.deleteMarkedTimespan();\r\n\r\n\t\t//add block to configs\r\n\t\tscheduler.addMarkedTimespan(configuration);\r\n\r\n\t\tvar divs = scheduler._mark_timespans();\r\n\r\n\t\tif(rebuild_els)\r\n\t\t\tscheduler._els = [];\r\n\r\n\t\t// restore timespan config\r\n\t\tscheduler._marked_timespans_ids = timespans_ids;\r\n\t\tscheduler._marked_timespans_types = timespan_types;\r\n\t\tscheduler._marked_timespans = timespans;\r\n\r\n\t\treturn divs;\r\n\t};\r\n\tscheduler.unmarkTimespan = function(divs) {\r\n\t\tif (!divs)\r\n\t\t\treturn;\r\n\t\tfor (var i=0; i c_zone_end && zone_start <= c_zone_end) || (zone_start < c_zone_start && zone_end >= c_zone_start)) {\r\n\t\t\t\t\tresulting_zones[i] = Math.min(c_zone_start, zone_start);\r\n\t\t\t\t\tresulting_zones[i+1] = Math.max(c_zone_end, zone_end);\r\n\t\t\t\t\ti -= 2;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (!isLast) // do nothing, maybe next current zone will match or will be last\r\n\t\t\t\t\t\tcontinue;\r\n\r\n\t\t\t\t\tvar offset = (c_zone_start > zone_start)?0:2;\r\n\t\t\t\t\tresulting_zones.splice(i+offset, 0, zone_start, zone_end); // last current zone, need to add another\r\n\t\t\t\t}\r\n\t\t\t\tzones.splice(k--,2); // zone was merged or added, need to exclude it\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn resulting_zones;\r\n\t};\r\n\tscheduler._subtract_timespan_zones = function(current_zones, zones) {\r\n\t\tvar resulting_zones = current_zones.slice();\r\n\t\tfor (var i=0; i c_zone_start && zone_start < c_zone_end) {\r\n\t\t\t\t\tvar is_modified = false;\r\n\t\t\t\t\tif (c_zone_start >= zone_start && c_zone_end <= zone_end) {\r\n\t\t\t\t\t\tresulting_zones.splice(i, 2);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (c_zone_start < zone_start) {\r\n\t\t\t\t\t\tresulting_zones.splice(i, 2, c_zone_start, zone_start);\r\n\t\t\t\t\t\tis_modified = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (c_zone_end > zone_end) {\r\n\t\t\t\t\t\tresulting_zones.splice( (is_modified)?(i+2):i, (is_modified)?0:2, zone_end, c_zone_end);\r\n\t\t\t\t\t}\r\n\t\t\t\t\ti -= 2;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn resulting_zones;\r\n\t};\r\n\tscheduler.invertZones = function(zones) {\r\n\t\treturn scheduler._subtract_timespan_zones([0, 1440], zones.slice());\r\n\t};\r\n\tscheduler._delete_marked_timespan_by_id = function(id) {\r\n\t\tvar configs = scheduler._marked_timespans_ids[id];\r\n\t\tif (configs) {\r\n\t\t\tfor (var i=0; i 1)){\r\n\t\t\t\tday = scheduler.date.date_part(new Date(this._date)); // for units view actually only 1 day is displayed yet the day variable will change, need to use this._date for all calls\r\n\t\t\t}else{\r\n\t\t\t\tvar dx = 24*60*60*1000;\r\n\t\t\t\tvar day_ind = Math.round((day - scheduler._min_date)/dx);\r\n\t\t\t\tvar unitsPerDay = view.size || units.length;\r\n\t\t\t\tday = scheduler.date.add(scheduler._min_date, Math.floor(day_ind/unitsPerDay), \"day\"); // to the \"same\" day for all sections\r\n\t\t\t\tday = scheduler.date.date_part(day);\r\n\t\t\t}\r\n\t\t\tday_index = day.getDay();\r\n\t\t\tday_value = day.valueOf();\r\n\r\n\t\t\tif (timespans[mode] && timespans[mode][unit.key]) {\r\n\t\t\t\tvar unit_zones = timespans[mode][unit.key];\r\n\t\t\t\tvar unit_types = scheduler._get_types_to_render(unit_zones[day_index], unit_zones[day_value]);\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(unit_types));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar global_data = timespans[\"global\"];\r\n\r\n\t\tif(scheduler.config.overwrite_marked_timespans){\r\n\t\t\tvar day_types = global_data[day_value]||global_data[day_index];\r\n\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(day_types));\r\n\t\t} else {\r\n\t\t\tif(global_data[day_value]){\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(global_data[day_value]));\r\n\t\t\t}\r\n\t\t\tif(global_data[day_index]){\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(global_data[day_index]));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (var i=0; i\" + ev.text + \"

\" + (ev.event_location || '') + \"

\" + scheduler.templates.marker_date(start) + \" - \" + scheduler.templates.marker_date(end) + \"
\";\r\n};\r\nscheduler.dblclick_dhx_map_area = function() {\r\n\tif (!this.config.readonly && this.config.dblclick_create)\r\n\t\tthis.addEventNow({\r\n\t\t\tstart_date: scheduler._date,\r\n\t\t\tend_date: scheduler.date.add(scheduler._date, scheduler.config.time_step, \"minute\")\r\n\t\t});\r\n};\r\nscheduler.templates.map_time = function(start, end, ev) {\r\n\tif (scheduler.config.rtl && !ev._timed) {\r\n\t\treturn scheduler.templates.day_date(end) + \" – \" + scheduler.templates.day_date(start);\r\n\t} else if (ev._timed) {\r\n\t\treturn this.day_date(ev.start_date, ev.end_date, ev) + \" \" + this.event_date(start);\r\n\t} else {\r\n\t\treturn scheduler.templates.day_date(start) + \" – \" + scheduler.templates.day_date(end);\r\n\t}\r\n};\r\nscheduler.templates.map_text = function(start, end, ev) {\r\n\treturn ev.text;\r\n};\r\n\r\nscheduler.date.map_start = function(d) {\r\n\treturn d;\r\n};\r\nscheduler.date.add_map = function(date, inc, mode) {\r\n\treturn (new Date(date.valueOf()));\r\n};\r\n\r\nscheduler.templates.map_date = function(dd, ed, mode) {\r\n\treturn '';\r\n};\r\n\r\nscheduler._latLngUpdate = false; // flag for not displaying event second time in case of coordinates update\r\n\r\nscheduler.attachEvent(\"onSchedulerReady\", function() {\r\n\tscheduler._isMapPositionSet = false; // if user actual (geolocation) position was set on the map\r\n\r\n\tconst gmap = document.createElement('div');\r\n\tgmap.className = 'dhx_map';\r\n\tgmap.id = 'dhx_gmap';\r\n\tgmap.style.display = \"none\";\r\n\r\n\tscheduler._obj.appendChild(gmap);\r\n\r\n\tscheduler._els.dhx_gmap = [];\r\n\tscheduler._els.dhx_gmap.push(gmap);\r\n\r\n\t_setMapSize('dhx_gmap');\r\n\r\n\tconst mapOptions = {\r\n\t\tzoom: scheduler.config.map_initial_zoom || 10,\r\n\t\tcenter: scheduler.config.map_initial_position,\r\n\t\tmapTypeId: scheduler.config.map_type || google.maps.MapTypeId.ROADMAP\r\n\t};\r\n\tconst map = new google.maps.Map(document.getElementById('dhx_gmap'), mapOptions);\r\n\tmap.disableDefaultUI = false;\r\n\tmap.disableDoubleClickZoom = !scheduler.config.readonly;\r\n\r\n\tgoogle.maps.event.addListener(map, \"dblclick\", function(event) {\r\n\t\tconst geocoder = scheduler.ext.mapView.geocoder;\r\n\r\n\t\tif (!scheduler.config.readonly && scheduler.config.dblclick_create) {\r\n\t\t\tvar point = event.latLng;\r\n\t\t\tgeocoder.geocode(\r\n\t\t\t\t{ 'latLng': point },\r\n\t\t\t\tfunction(results, status) {\r\n\t\t\t\t\tif (status == google.maps.GeocoderStatus.OK) {\r\n\t\t\t\t\t\tpoint = results[0].geometry.location;\r\n\t\t\t\t\t\tscheduler.addEventNow({\r\n\t\t\t\t\t\t\tlat: point.lat(),\r\n\t\t\t\t\t\t\tlng: point.lng(),\r\n\t\t\t\t\t\t\tevent_location: results[0].formatted_address,\r\n\t\t\t\t\t\t\tstart_date: scheduler._date,\r\n\t\t\t\t\t\t\tend_date: scheduler.date.add(scheduler._date, scheduler.config.time_step, \"minute\")\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t}\r\n\t});\r\n\r\n\tvar infoWindowOptions = {\r\n\t\tcontent: ''\r\n\t};\r\n\r\n\tif (scheduler.config.map_infowindow_max_width) {\r\n\t\tinfoWindowOptions.maxWidth = scheduler.config.map_infowindow_max_width;\r\n\t}\r\n\r\n\tscheduler.map = {\r\n\t\t_points: [],\r\n\t\t_markers: [],\r\n\t\t_infowindow: new google.maps.InfoWindow(infoWindowOptions),\r\n\t\t_infowindows_content: [],\r\n\t\t_initialization_count: -1,\r\n\t\t_obj: map\r\n\t};\r\n\r\n\tscheduler.ext.mapView.geocoder = new google.maps.Geocoder();\r\n\tscheduler.ext.mapView.map = map;\r\n\tscheduler.ext.mapView.points = scheduler.map._points;\r\n\tscheduler.ext.mapView.markers = scheduler.map._markers;\r\n\tscheduler.ext.mapView.infoWindow = scheduler.map._infowindow;\r\n\r\n\tif (scheduler.config.map_resolve_user_location) {\r\n\t\tif (navigator.geolocation) {\r\n\t\t\tif (!scheduler._isMapPositionSet) {\r\n\t\t\t\tnavigator.geolocation.getCurrentPosition(function(position) {\r\n\t\t\t\t\tvar _userLocation = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);\r\n\t\t\t\t\tmap.setCenter(_userLocation);\r\n\t\t\t\t\tmap.setZoom(scheduler.config.map_zoom_after_resolve || 10);\r\n\t\t\t\t\tscheduler.map._infowindow.setContent(scheduler.locale.labels.marker_geo_success);\r\n\t\t\t\t\tscheduler.map._infowindow.position = map.getCenter();\r\n\t\t\t\t\tscheduler.map._infowindow.open(map);\r\n\r\n\t\t\t\t\tscheduler._isMapPositionSet = true;\r\n\t\t\t\t},\r\n\t\t\t\t\t\tfunction() {\r\n\t\t\t\t\t\t\tscheduler.map._infowindow.setContent(scheduler.locale.labels.marker_geo_fail);\r\n\t\t\t\t\t\t\tscheduler.map._infowindow.setPosition(map.getCenter());\r\n\t\t\t\t\t\t\tscheduler.map._infowindow.open(map);\r\n\t\t\t\t\t\t\tscheduler._isMapPositionSet = true;\r\n\t\t\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tgoogle.maps.event.addListener(map, \"resize\", function(event) {\r\n\t\tgmap.style.zIndex = '5';\r\n\t\tmap.setZoom(map.getZoom());\r\n\r\n\t});\r\n\tgoogle.maps.event.addListener(map, \"tilesloaded\", function(event) {\r\n\t\tgmap.style.zIndex = '5';\r\n\t});\r\n\r\n\tgmap.style.display = 'none'; // property was changed after attaching map\r\n\r\n\tconst old = scheduler.render_data;\r\n\tscheduler.render_data = function(evs, hold) {\r\n\t\tif (this._mode == \"map\") {\r\n\t\t\tfill_map_tab();\r\n\t\t\tvar events = scheduler.get_visible_events();\r\n\t\t\tfor (var i = 0; i < events.length; i++) {\r\n\t\t\t\tif (!scheduler.map._markers[events[i].id]) {\r\n\t\t\t\t\tshowAddress(events[i], false, false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else\r\n\t\t\treturn old.apply(this, arguments);\r\n\t};\r\n\r\n\tfunction set_full_view(mode) {\r\n\t\tif (mode) {\r\n\t\t\tvar l = scheduler.locale.labels;\r\n\t\t\tscheduler._els[\"dhx_cal_header\"][0].innerHTML = \"
\" + l.date + \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"
\" + l.description + \"
\";\r\n\t\t\tscheduler._table_view = true;\r\n\t\t\tscheduler.set_sizes();\r\n\t\t}\r\n\t}\r\n\r\n\tfunction clear_map_tab() {\r\n\t\tscheduler._selected_event_id = null;\r\n\t\tscheduler.map._infowindow.close();\r\n\t\tvar markers = scheduler.map._markers;\r\n\t\tfor (var key in markers) {\r\n\t\t\tif (markers.hasOwnProperty(key)) {\r\n\t\t\t\tmarkers[key].setMap(null);\r\n\t\t\t\tdelete scheduler.map._markers[key];\r\n\t\t\t\tif (scheduler.map._infowindows_content[key])\r\n\t\t\t\t\tdelete scheduler.map._infowindows_content[key];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction fill_map_tab() {\r\n\t\t//select events for which data need to be printed\r\n\t\tvar events = scheduler.get_visible_events();\r\n\t\tevents.sort(function(a, b) {\r\n\t\t\tif(a.start_date.valueOf()==b.start_date.valueOf())\r\n\t\t\t\treturn a.id>b.id?1:-1;\r\n\t\t\treturn a.start_date>b.start_date?1:-1;\r\n\t\t});\r\n\r\n\t\t//generate html for the view\r\n\t\tvar ariaAttr = scheduler._waiAria.mapAttrString();\r\n\r\n\t\tvar html = \"
\";\r\n\t\tfor (var i = 0; i < events.length; i++) {\r\n\t\t\tvar ev = events[i];\r\n\t\t\tvar event_class = (ev.id == scheduler._selected_event_id) ? 'dhx_map_line highlight' : 'dhx_map_line';\r\n\t\t\tvar bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\t\t\tvar color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\t\t\tvar ariaAttr = scheduler._waiAria.mapRowAttrString(ev);\r\n\t\t\tvar ariaButtonAttr = scheduler._waiAria.mapDetailsBtnString();\r\n\r\n\t\t\thtml += \"
\" + scheduler.templates.map_time(ev.start_date, ev.end_date, ev) + \"
\";\r\n\t\t\thtml += `
\r\n\t\t\t\r\n\t\t\t
`;\r\n\t\t\thtml += \"
\" + scheduler.templates.map_text(ev.start_date, ev.end_date, ev) + \"
\"; // -25 = icon size 20 and padding 5\r\n\t\t}\r\n\t\thtml += \"
\";\r\n\r\n\t\t//render html\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = 0; //fix flickering in FF\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t//\tscheduler._els[\"dhx_cal_data\"][0].style.width = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\r\n\t\tvar t = scheduler._els[\"dhx_cal_data\"][0].firstChild.childNodes;\r\n\r\n\t\tvar dateElement = scheduler._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML=scheduler.templates[scheduler._mode + \"_date\"](scheduler._min_date, scheduler._max_date, scheduler._mode);\r\n\t\t}\r\n\r\n\t\tscheduler._rendered = [];\r\n\t\tfor (var i = 0; i < t.length - 2; i++) {\r\n\t\t\tscheduler._rendered[i] = t[i];\r\n\t\t}\r\n\t}\r\n\r\n\tfunction _setMapSize(elem_id) { //input - map's div id\r\n\t\tvar map = document.getElementById(elem_id);\r\n\t\tconst nav_height = scheduler.$container.querySelector(\".dhx_cal_navline\").offsetHeight;\r\n\t\tvar height = scheduler._y - nav_height;\r\n\t\tif (height < 0)\r\n\t\t\theight = 0;\r\n\t\tvar width = scheduler._x - scheduler.xy.map_date_width - scheduler.xy.map_description_width - 1;\r\n\t\tif (width < 0)\r\n\t\t\twidth = 0;\r\n\t\tmap.style.height = height + 'px';\r\n\t\tmap.style.width = width + 'px';\r\n\t\tmap.style.position = \"absolute\";\r\n\t\tmap.style.top = nav_height + \"px\";\r\n\t\tif (scheduler.config.rtl) {\r\n\t\t\tmap.style.marginRight = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\t\t} else {\r\n\t\t\tmap.style.marginLeft = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\t\t}\r\n\t\tmap.style.marginTop = (scheduler.xy.nav_height + 2) + 'px';\r\n\t}\r\n\r\n\tscheduler.map_view = function(mode) {\r\n\t\tscheduler.map._initialization_count++;\r\n\t\tvar gmap = scheduler._els.dhx_gmap[0];\r\n\t\tvar temp_center;\r\n\t\t//scheduler._els.dhx_cal_data[0].style.width = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\r\n\t\tscheduler._min_date = scheduler.config.map_start || (scheduler._currentDate());\r\n\t\tscheduler._max_date = scheduler.config.map_end || scheduler.date.add(scheduler._currentDate(), 1, \"year\");\r\n\r\n\t\tscheduler._table_view = true;\r\n\t\tset_full_view(mode);\r\n\r\n\t\tif (mode) { //map tab activated\r\n\t\t\tclear_map_tab();\r\n\t\t\tfill_map_tab();\r\n\t\t\tgmap.style.display = 'block';\r\n\r\n\t\t\t// need to resize block every time window is resized\r\n\t\t\t_setMapSize('dhx_gmap');\r\n\t\t\ttemp_center = scheduler.map._obj.getCenter();\r\n\r\n\t\t\tvar events = scheduler.get_visible_events();\r\n\t\t\tfor (var i = 0; i < events.length; i++) {\r\n\t\t\t\tif (!scheduler.map._markers[events[i].id]) {\r\n\t\t\t\t\tshowAddress(events[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t} else { //map tab de-activated\r\n\t\t\tgmap.style.display = 'none';\r\n\t\t}\r\n\t\tgoogle.maps.event.trigger(scheduler.map._obj, 'resize');\r\n\r\n\t\tif (scheduler.map._initialization_count === 0 && temp_center) { // if tab is activated for the first time need to fix position\r\n\t\t\tscheduler.map._obj.setCenter(temp_center);\r\n\t\t}\r\n\r\n\t\tif (scheduler._selected_event_id) {\r\n\t\t\tselectEvent(scheduler._selected_event_id);\r\n\t\t}\r\n\t};\r\n\r\n\tvar selectEvent = function(event_id) {\r\n\t\tscheduler.map._obj.setCenter(scheduler.map._points[event_id]);\r\n\t\tscheduler.callEvent(\"onClick\", [event_id]);\r\n\t};\r\n\r\n\tvar showAddress = function(event, setCenter, performClick) { // what if event have incorrect position from the start?\r\n\t\tvar point = scheduler.config.map_error_position;\r\n\t\tif (event.lat && event.lng) {\r\n\t\t\tpoint = new google.maps.LatLng(event.lat, event.lng);\r\n\t\t}\r\n\t\tvar message = scheduler.templates.marker_text(event.start_date, event.end_date, event);\r\n\t\tif (!scheduler._new_event) {\r\n\r\n\t\t\tscheduler.map._infowindows_content[event.id] = message;\r\n\r\n\t\t\tif (scheduler.map._markers[event.id])\r\n\t\t\t\tscheduler.map._markers[event.id].setMap(null);\r\n\r\n\t\t\tscheduler.map._markers[event.id] = scheduler.ext.mapView.createMarker({\r\n\t\t\t\tposition: point,\r\n\t\t\t\tmap: scheduler.map._obj\r\n\t\t\t});\r\n\r\n\t\t\tgoogle.maps.event.addListener(scheduler.map._markers[event.id], 'click', function() {\r\n\t\t\t\tscheduler.map._infowindow.setContent(scheduler.map._infowindows_content[event.id]);\r\n\t\t\t\tscheduler.map._infowindow.open(scheduler.map._obj, scheduler.map._markers[event.id]);\r\n\t\t\t\tscheduler._selected_event_id = event.id;\r\n\t\t\t\tscheduler.render_data();\r\n\t\t\t});\r\n\t\t\tscheduler.map._points[event.id] = point;\r\n\r\n\t\t\tif (setCenter) scheduler.map._obj.setCenter(scheduler.map._points[event.id]);\r\n\t\t\tif (performClick) scheduler.callEvent(\"onClick\", [event.id]);\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onClick\", function(id, domEvent) {\r\n\t\tif (this._mode == \"map\") {\r\n\t\t\tscheduler._selected_event_id = id;\r\n\t\t\tfor (var i = 0; i < scheduler._rendered.length; i++) {\r\n\t\t\t\tscheduler._rendered[i].className = 'dhx_map_line';\r\n\t\t\t\tif (scheduler._rendered[i].getAttribute(scheduler.config.event_attribute) == id) {\r\n\t\t\t\t\tscheduler._rendered[i].className += \" highlight\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (scheduler.map._points[id] && scheduler.map._markers[id]) {\r\n\t\t\t\tscheduler.map._obj.setCenter(scheduler.map._points[id]); // was panTo\r\n\t\t\t\tgoogle.maps.event.trigger(scheduler.map._markers[id], 'click');\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tvar _displayEventOnMap = function(event) {\r\n\t\tconst geocoder = scheduler.ext.mapView.geocoder;\r\n\t\tif (event.event_location && geocoder) {\r\n\t\t\tgeocoder.geocode(\r\n\t\t\t\t{\r\n\t\t\t\t\t'address': event.event_location,\r\n\t\t\t\t\t'language': scheduler.uid().toString()\r\n\t\t\t\t},\r\n\t\t\t\tfunction(results, status) {\r\n\t\t\t\t\tvar point = {};\r\n\t\t\t\t\tif (status != google.maps.GeocoderStatus.OK) {\r\n\t\t\t\t\t\tpoint = scheduler.callEvent(\"onLocationError\", [event.id]);\r\n\t\t\t\t\t\tif (!point || point === true)\r\n\t\t\t\t\t\t\tpoint = scheduler.config.map_error_position;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tpoint = results[0].geometry.location;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tevent.lat = point.lat();\r\n\t\t\t\t\tevent.lng = point.lng();\r\n\r\n\t\t\t\t\tscheduler._selected_event_id = event.id;\r\n\r\n\t\t\t\t\tscheduler._latLngUpdate = true;\r\n\t\t\t\t\tscheduler.callEvent(\"onEventChanged\", [event.id, event]);\r\n\t\t\t\t\tshowAddress(event, true, true);\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t} else {\r\n\t\t\tshowAddress(event, true, true);\r\n\t\t}\r\n\t};\r\n\r\n\tvar _updateEventLocation = function(event) { // update lat and lng in database\r\n\t\tconst geocoder = scheduler.ext.mapView.geocoder;\r\n\t\tif (event.event_location && geocoder) {\r\n\t\t\tgeocoder.geocode(\r\n\t\t\t\t{\r\n\t\t\t\t\t'address': event.event_location,\r\n\t\t\t\t\t'language': scheduler.uid().toString()\r\n\t\t\t\t},\r\n\t\t\t\tfunction(results, status) {\r\n\t\t\t\t\tvar point = {};\r\n\t\t\t\t\tif (status != google.maps.GeocoderStatus.OK) {\r\n\t\t\t\t\t\tpoint = scheduler.callEvent(\"onLocationError\", [event.id]);\r\n\t\t\t\t\t\tif (!point || point === true)\r\n\t\t\t\t\t\t\tpoint = scheduler.config.map_error_position;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tpoint = results[0].geometry.location;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tevent.lat = point.lat();\r\n\t\t\t\t\tevent.lng = point.lng();\r\n\t\t\t\t\tscheduler._latLngUpdate = true;\r\n\t\t\t\t\tscheduler.callEvent(\"onEventChanged\", [event.id, event]);\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t}\r\n\t};\r\n\r\n\tvar _delay = function(method, object, params, delay) {\r\n\t\tsetTimeout(function() {\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tvar ret = method.apply(object, params);\r\n\t\t\tmethod = object = params = null;\r\n\t\t\treturn ret;\r\n\t\t}, delay || 1);\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onEventChanged\", function(id, event) {\r\n\t\tif (!this._latLngUpdate) {\r\n\t\t\tvar event = scheduler.getEvent(id);\r\n\t\t\tif ((event.start_date < scheduler._min_date && event.end_date > scheduler._min_date) || (event.start_date < scheduler._max_date && event.end_date > scheduler._max_date) || (event.start_date.valueOf() >= scheduler._min_date && event.end_date.valueOf() <= scheduler._max_date)) {\r\n\t\t\t\tif (scheduler.map._markers[id])\r\n\t\t\t\t\tscheduler.map._markers[id].setMap(null);\r\n\t\t\t\t_displayEventOnMap(event);\r\n\t\t\t} else { // event no longer should be displayed on the map view\r\n\t\t\t\tscheduler._selected_event_id = null;\r\n\t\t\t\tscheduler.map._infowindow.close();\r\n\t\t\t\tif (scheduler.map._markers[id])\r\n\t\t\t\t\tscheduler.map._markers[id].setMap(null);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t\tthis._latLngUpdate = false;\r\n\t\treturn true;\r\n\t});\r\n\r\n\r\n\tscheduler.attachEvent(\"onEventIdChange\", function(old_event_id, new_event_id) {\r\n\t\tvar event = scheduler.getEvent(new_event_id);\r\n\t\tif ((event.start_date < scheduler._min_date && event.end_date > scheduler._min_date) || (event.start_date < scheduler._max_date && event.end_date > scheduler._max_date) || (event.start_date.valueOf() >= scheduler._min_date && event.end_date.valueOf() <= scheduler._max_date)) {\r\n\t\t\tif (scheduler.map._markers[old_event_id]) {\r\n\t\t\t\tscheduler.map._markers[old_event_id].setMap(null);\r\n\t\t\t\tdelete scheduler.map._markers[old_event_id];\r\n\t\t\t}\r\n\t\t\tif (scheduler.map._infowindows_content[old_event_id])\r\n\t\t\t\tdelete scheduler.map._infowindows_content[old_event_id];\r\n\t\t\t_displayEventOnMap(event);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onEventAdded\", function(id, event) {\r\n\t\tif (!scheduler._dataprocessor) {\r\n\t\t\tif ((event.start_date < scheduler._min_date && event.end_date > scheduler._min_date) || (event.start_date < scheduler._max_date && event.end_date > scheduler._max_date) || (event.start_date.valueOf() >= scheduler._min_date && event.end_date.valueOf() <= scheduler._max_date)) {\r\n\t\t\t\tif (scheduler.map._markers[id])\r\n\t\t\t\t\tscheduler.map._markers[id].setMap(null);\r\n\t\t\t\t_displayEventOnMap(event);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\t/* Test/example\r\n\t scheduler.attachEvent(\"onLocationError\", function(event_id,event_object){\r\n\t return new google.maps.LatLng(8, 8);\r\n\t });\r\n\t */\r\n\r\n\tscheduler.attachEvent(\"onBeforeEventDelete\", function(id, event) {\r\n\t\tif (scheduler.map._markers[id]) {\r\n\t\t\tscheduler.map._markers[id].setMap(null); // if new event is deleted tab != map then it doesn't have marker yet\r\n\t\t}\r\n\t\tscheduler._selected_event_id = null;\r\n\t\tscheduler.map._infowindow.close();\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler._event_resolve_delay = 1500;\r\n\tscheduler.attachEvent(\"onEventLoading\", function(event) {\r\n\t\tif (scheduler.config.map_resolve_event_location && event.event_location && !event.lat && !event.lng) { // don't delete !event.lat && !event.lng as location could change\r\n\t\t\tscheduler._event_resolve_delay += 1500;\r\n\t\t\t_delay(_updateEventLocation, this, [event], scheduler._event_resolve_delay);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onEventCancel\", function(id, is_new) {\r\n\t\tif (is_new) {\r\n\t\t\tif (scheduler.map._markers[id])\r\n\t\t\t\tscheduler.map._markers[id].setMap(null);\r\n\t\t\tscheduler.map._infowindow.close();\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nconst minicalDomEvents = scheduler._createDomEventScope();\r\n\t\r\n\r\nscheduler.config.minicalendar = {\r\n\tmark_events: true\r\n};\r\nscheduler._synced_minicalendars = [];\r\nscheduler.renderCalendar = function(obj, _prev, is_refresh) {\r\n\tvar cal = null;\r\n\tvar date = obj.date || (scheduler._currentDate());\r\n\tif (typeof date == \"string\")\r\n\t\tdate = this.templates.api_date(date);\r\n\r\n\tif (!_prev) {\r\n\t\tvar cont = obj.container;\r\n\t\tvar pos = obj.position;\r\n\r\n\t\tif (typeof cont == \"string\")\r\n\t\t\tcont = document.getElementById(cont);\r\n\r\n\t\tif (typeof pos == \"string\")\r\n\t\t\tpos = document.getElementById(pos);\r\n\t\tif (pos && (typeof pos.left == \"undefined\" && typeof pos.right == \"undefined\")) {\r\n\t\t\tvar tpos = scheduler.$domHelpers.getOffset(pos);\r\n\t\t\tpos = {\r\n\t\t\t\ttop: tpos.top + pos.offsetHeight,\r\n\t\t\t\tleft: tpos.left\r\n\t\t\t};\r\n\t\t}\r\n\t\tif (!cont)\r\n\t\t\tcont = scheduler._get_def_cont(pos);\r\n\r\n\t\tcal = this._render_calendar(cont, date, obj);\r\n\t\r\n\t\tif (!cal.$_eventAttached) {\r\n\t\t\tcal.$_eventAttached = true;\r\n\t\t\tminicalDomEvents.attach(cal, \"click\", (function(e) {\r\n\t\t\t\tvar src = e.target || e.srcElement;\r\n\r\n\t\t\t\tvar $dom = scheduler.$domHelpers;\r\n\t\t\t\tif ($dom.closest(src, \".dhx_month_head\")) {\r\n\t\t\t\t\tif (!$dom.closest(src, \".dhx_after\") && !$dom.closest(src, \".dhx_before\")) {\r\n\r\n\t\t\t\t\t\tvar cellRoot = $dom.closest(src, \"[data-cell-date]\");\r\n\t\t\t\t\t\tvar dateAttribute = cellRoot.getAttribute(\"data-cell-date\");\r\n\t\t\t\t\t\tvar newDate = scheduler.templates.parse_date(dateAttribute);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tscheduler.unmarkCalendar(this);\r\n\t\t\t\t\t\tscheduler.markCalendar(this, newDate, \"dhx_calendar_click\");\r\n\t\t\t\t\t\tthis._last_date = newDate;\r\n\t\t\t\t\t\tif (this.conf.handler) this.conf.handler.call(scheduler, newDate, this);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}).bind(cal));\r\n\t\t}\r\n\t\r\n\t} else {\r\n\t\tcal = this._render_calendar(_prev.parentNode, date, obj, _prev);\r\n\t\tscheduler.unmarkCalendar(cal);\r\n\t}\r\n\r\n\tif (scheduler.config.minicalendar.mark_events) {\r\n\t\tvar start = scheduler.date.month_start(date);\r\n\t\tvar end = scheduler.date.add(start, 1, \"month\");\r\n\t\tvar evs = this.getEvents(start, end);\r\n\t\tvar filter = this[\"filter_\" + this._mode];\r\n\t\tvar markedDates = {};\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tif (filter && !filter(ev.id, ev))\r\n\t\t\t\tcontinue;\r\n\t\t\tvar d = ev.start_date;\r\n\t\t\tif (d.valueOf() < start.valueOf())\r\n\t\t\t\td = start;\r\n\t\t\td = scheduler.date.date_part(new Date(d.valueOf()));\r\n\t\t\twhile (d < ev.end_date) {\r\n\t\t\t\tif(!markedDates[+d]) {\r\n\t\t\t\t\tmarkedDates[+d] = true;\r\n\t\t\t\t\tthis.markCalendar(cal, d, \"dhx_year_event\");\r\n\t\t\t\t}\r\n\t\t\t\td = this.date.add(d, 1, \"day\");\r\n\t\t\t\tif (d.valueOf() >= end.valueOf())\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tthis._markCalendarCurrentDate(cal);\r\n\r\n\tcal.conf = obj;\r\n\tif (obj.sync && !is_refresh)\r\n\t\tthis._synced_minicalendars.push(cal);\r\n\r\n\tif(!cal.conf._on_xle_handler){\r\n\t\tcal.conf._on_xle_handler = scheduler.attachEvent(\"onXLE\", function refreshOnLoad(){\r\n\t\t\tscheduler.updateCalendar(cal, cal.conf.date);\r\n\t\t});\r\n\t}\r\n\r\n\tif(this.config.wai_aria_attributes && this.config.wai_aria_application_role){\r\n\t\tcal.setAttribute(\"role\", \"application\");\r\n\t}\r\n\r\n\treturn cal;\r\n};\r\nscheduler._get_def_cont = function(pos) {\r\n\tif (!this._def_count) {\r\n\t\tthis._def_count = document.createElement(\"div\");\r\n\t\tthis._def_count.className = \"dhx_minical_popup\";\r\n\t\tscheduler.event(this._def_count, \"click\", function(e) { e.cancelBubble = true; });\r\n\t\tdocument.body.appendChild(this._def_count);\r\n\t}\r\n\r\n\tif(pos.left){\r\n\t\tthis._def_count.style.left = pos.left + \"px\";\r\n\t}\r\n\tif(pos.right){\r\n\t\tthis._def_count.style.right = pos.right + \"px\";\r\n\t}\r\n\tif(pos.top){\r\n\t\tthis._def_count.style.top = pos.top + \"px\";\r\n\t}\r\n\tif(pos.bottom){\r\n\t\tthis._def_count.style.bottom = pos.bottom + \"px\";\r\n\t}\r\n\r\n\tthis._def_count._created = new Date();\r\n\r\n\treturn this._def_count;\r\n};\r\nscheduler._locateCalendar = function(cal, date) {\r\n\tif (typeof date == \"string\")\r\n\t\tdate = scheduler.templates.api_date(date);\r\n\r\n\tif(+date > +cal._max_date || +date < +cal._min_date)\r\n\t\treturn null;\r\n\r\n\tvar table = cal.querySelector(\".dhx_year_body\").childNodes[0];\r\n\r\n\tvar weekNum = 0;\r\n\tvar dat = new Date(cal._min_date);\r\n\twhile(+this.date.add(dat, 1, \"week\") <= +date){\r\n\t\tdat = this.date.add(dat, 1, \"week\");\r\n\t\tweekNum++;\r\n\t}\r\n\r\n\tvar sm = scheduler.config.start_on_monday;\r\n\tvar day = (date.getDay() || (sm ? 7 : 0)) - (sm ? 1 : 0);\r\n\r\n\tconst dayCell = table.querySelector(`.dhx_cal_month_row:nth-child(${weekNum + 1}) .dhx_cal_month_cell:nth-child(${day + 1})`);\r\n\tif(dayCell) {\r\n\t\treturn dayCell.firstChild;\r\n\t} else {\r\n\t\treturn null;\r\n\t}\r\n};\r\nscheduler.markCalendar = function(cal, date, css) {\r\n\tvar div = this._locateCalendar(cal, date);\r\n\tif(!div)\r\n\t\treturn;\r\n\r\n\tdiv.className += \" \" + css;\r\n};\r\nscheduler.unmarkCalendar = function(cal, date, css) {\r\n\tdate = date || cal._last_date;\r\n\tcss = css || \"dhx_calendar_click\";\r\n\tif (!date) return;\r\n\tvar el = this._locateCalendar(cal, date);\r\n\tif(!el)\r\n\t\treturn;\r\n\tel.className = (el.className || \"\").replace(RegExp(css, \"g\"));\r\n};\r\nscheduler._week_template = function(width) {\r\n\tvar summ = (width || 250);\r\n\tvar left = 0;\r\n\r\n\tvar week_template = document.createElement(\"div\");\r\n\tvar dummy_date = this.date.week_start(scheduler._currentDate());\r\n\tfor (var i = 0; i < 7; i++) {\r\n\t\tthis._cols[i] = Math.floor(summ / (7 - i));\r\n\t\tthis._render_x_header(i, left, dummy_date, week_template);\r\n\t\tdummy_date = this.date.add(dummy_date, 1, \"day\");\r\n\t\tsumm -= this._cols[i];\r\n\t\tleft += this._cols[i];\r\n\t}\r\n\tweek_template.lastChild.className += \" dhx_scale_bar_last\";\r\n\treturn week_template;\r\n};\r\nscheduler.updateCalendar = function(obj, sd) {\r\n\tobj.conf.date = sd;\r\n\tthis.renderCalendar(obj.conf, obj, true);\r\n};\r\nscheduler._mini_cal_arrows = [\" \", \" \"];\r\nscheduler._render_calendar = function(obj, sd, conf, previous) {\r\n\t/*store*/\r\n\tvar ts = scheduler.templates;\r\n\tvar temp = this._cols;\r\n\tthis._cols = [];\r\n\tvar temp2 = this._mode;\r\n\tthis._mode = \"calendar\";\r\n\tvar temp3 = this._colsS;\r\n\tthis._colsS = {height: 0};\r\n\tvar temp4 = new Date(this._min_date);\r\n\tvar temp5 = new Date(this._max_date);\r\n\tvar temp6 = new Date(scheduler._date);\r\n\tvar temp7 = ts.month_day;\r\n\tvar temp8 = this._ignores_detected; this._ignores_detected = 0;\r\n\tts.month_day = ts.calendar_date;\r\n\r\n\tsd = this.date.month_start(sd);\r\n\tvar week_template = this._week_template(obj.offsetWidth - 1 - this.config.minicalendar.padding );\r\n\r\n\tvar d;\r\n\tif (previous){\r\n\t\td = previous;\r\n\t} else {\r\n\t\td = document.createElement(\"div\");\r\n\t\td.className = \"dhx_cal_container dhx_mini_calendar\";\r\n\t}\r\n\td.setAttribute(\"date\", this._helpers.formatDate(sd));\r\n\td.innerHTML = \"
\" +\r\n\t\t\t\"
\" : \"'>\") +\r\n\t\t\t\"
\"+(week_template ? week_template.innerHTML : \"\")+\"
\" +\r\n\t\t\t\"
\" +\r\n\t\t\"
\";\r\n\tvar header = d.querySelector(\".dhx_year_month\");\r\n\tvar weekHeader = d.querySelector(\".dhx_year_week\");\r\n\tvar body = d.querySelector(\".dhx_year_body\");\r\n\r\n\theader.innerHTML = this.templates.calendar_month(sd);\r\n\tif (conf.navigation) {\r\n\t\tvar move_minicalendar_date = function(calendar, diff) {\r\n\t\t\tvar date = scheduler.date.add(calendar._date, diff, \"month\");\r\n\t\t\tscheduler.updateCalendar(calendar, date);\r\n\t\t\tif (scheduler._date.getMonth() == calendar._date.getMonth() && scheduler._date.getFullYear() == calendar._date.getFullYear()) {\r\n\t\t\t\tscheduler._markCalendarCurrentDate(calendar);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tvar css_classnames = [\"dhx_cal_prev_button\", \"dhx_cal_next_button\"];\r\n\t\tvar css_texts = [\"left:1px;top:4px;position:absolute;\", \"left:auto; right:1px;top:4px;position:absolute;\"];\r\n\t\tvar diffs = [-1, 1];\r\n\t\tvar handler = function(diff) {\r\n\t\t\treturn function() {\t\r\n\t\t\t\tif (conf.sync) {\r\n\t\t\t\t\tvar calendars = scheduler._synced_minicalendars;\r\n\t\t\t\t\tfor (var k = 0; k < calendars.length; k++) {\r\n\t\t\t\t\t\tmove_minicalendar_date(calendars[k], diff);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (scheduler.config.rtl) {\r\n\t\t\t\t\t\tdiff = -diff;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmove_minicalendar_date(d, diff);\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t};\r\n\t\tvar labels = [scheduler.locale.labels.prev, scheduler.locale.labels.next];\r\n\t\tfor (var j = 0; j < 2; j++) {\r\n\t\t\tvar arrow = document.createElement(\"div\");\r\n\t\t\t//var diff = diffs[j];\r\n\t\t\tarrow.className = css_classnames[j];\r\n\r\n\t\t\tscheduler._waiAria.headerButtonsAttributes(arrow, labels[j]);\r\n\r\n\t\t\tarrow.style.cssText = css_texts[j];\r\n\t\t\tarrow.innerHTML = this._mini_cal_arrows[j];\r\n\t\t\theader.appendChild(arrow);\r\n\t\t\tminicalDomEvents.attach(arrow, \"click\", handler(diffs[j]));\r\n\t\t}\r\n\t}\r\n\td._date = new Date(sd);\r\n\r\n\td.week_start = (sd.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) % 7;\r\n\r\n\tvar dd = d._min_date = this.date.week_start(sd);\r\n\td._max_date = this.date.add(d._min_date, 6, \"week\");\r\n\r\n\tthis._reset_month_scale(body, sd, dd, 6);\r\n\r\n\tif (!previous)\r\n\t\tobj.appendChild(d);\r\n\r\n\tweekHeader.style.height = (weekHeader.childNodes[0].offsetHeight - 1) + \"px\"; // dhx_year_week should have height property so that day dates would get correct position. dhx_year_week height = height of it's child (with the day name)\r\n\r\n\tvar headerId = scheduler.uid();\r\n\tscheduler._waiAria.minicalHeader(header, headerId);\r\n\tscheduler._waiAria.minicalGrid(d.querySelector(\".dhx_year_grid\"), headerId);\r\n\tscheduler._waiAria.minicalRow(weekHeader);\r\n\r\n\tvar dayHeaders = weekHeader.querySelectorAll(\".dhx_scale_bar\");\r\n\tfor(var i = 0; i < dayHeaders.length; i++){\r\n\t\tscheduler._waiAria.minicalHeadCell(dayHeaders[i]);\r\n\t}\r\n\tvar dayCells = body.querySelectorAll(\".dhx_cal_month_cell\");\r\n\tvar firstDate = new Date(dd);\r\n\tfor(var i = 0; i < dayCells.length; i++){\r\n\r\n\t\tscheduler._waiAria.minicalDayCell(dayCells[i], new Date(firstDate));\r\n\t\tfirstDate = scheduler.date.add(firstDate, 1, \"day\");\r\n\t}\r\n\r\n\tscheduler._waiAria.minicalHeader(header, headerId);\r\n\r\n\t/*restore*/\r\n\tthis._cols = temp;\r\n\tthis._mode = temp2;\r\n\tthis._colsS = temp3;\r\n\tthis._min_date = temp4;\r\n\tthis._max_date = temp5;\r\n\tscheduler._date = temp6;\r\n\tts.month_day = temp7;\r\n\tthis._ignores_detected = temp8;\r\n\treturn d;\r\n};\r\nscheduler.destroyCalendar = function(cal, force) {\r\n\tif (!cal && this._def_count && this._def_count.firstChild) {\r\n\t\tif (force || (new Date()).valueOf() - this._def_count._created.valueOf() > 500)\r\n\t\t\tcal = this._def_count.firstChild;\r\n\t}\r\n\tif (!cal) return;\r\n\tminicalDomEvents.detachAll();\r\n\t//cal.onclick = null;\r\n\tcal.innerHTML = \"\";\r\n\tif (cal.parentNode)\r\n\t\tcal.parentNode.removeChild(cal);\r\n\tif (this._def_count)\r\n\t\tthis._def_count.style.top = \"-1000px\";\r\n\r\n\tif(cal.conf && cal.conf._on_xle_handler)\r\n\t\tscheduler.detachEvent(cal.conf._on_xle_handler);\r\n};\r\nscheduler.isCalendarVisible = function() {\r\n\tif (this._def_count && parseInt(this._def_count.style.top, 10) > 0)\r\n\t\treturn this._def_count;\r\n\treturn false;\r\n};\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tscheduler.event(document.body, \"click\", function() { scheduler.destroyCalendar(); });\r\n}, {once: true});\r\n\r\n\r\n\r\nscheduler.form_blocks.calendar_time = {\r\n\trender: function(sns) {\r\n\t\tvar html = \"\";\r\n\r\n\t\tvar cfg = scheduler.config;\r\n\t\tvar dt = this.date.date_part(scheduler._currentDate());\r\n\r\n\t\tvar last = 24 * 60, first = 0;\r\n\t\tif (cfg.limit_time_select) {\r\n\t\t\tfirst = 60 * cfg.first_hour;\r\n\t\t\tlast = 60 * cfg.last_hour + 1; // to include \"17:00\" option if time select is limited\r\n\t\t}\r\n\t\tdt.setHours(first / 60);\r\n\r\n\t\tsns._time_values = [];\r\n\t\thtml += \" \";\r\n\r\n\t\t//var full_day = scheduler.config.full_day;\r\n\r\n\t\treturn \"
\" + html + \"  –  \" + html + \"
\";\r\n\t},\r\n\tset_value: function(node, value, ev, config) {\r\n\r\n\t\tvar inputs = node.getElementsByTagName(\"input\");\r\n\t\tvar selects = node.getElementsByTagName(\"select\");\r\n\t\tvar start_date,\r\n\t\t\tend_date;\r\n\r\n\t\tvar _init_once = function(inp, date, number) {\r\n\t\t\tscheduler.event(inp, \"click\", function() {\r\n\t\t\t\tscheduler.destroyCalendar(null, true);\r\n\t\t\t\tscheduler.renderCalendar({\r\n\t\t\t\t\tposition: inp,\r\n\t\t\t\t\tdate: new Date(this._date),\r\n\t\t\t\t\tnavigation: true,\r\n\t\t\t\t\thandler: function(new_date) {\r\n\t\t\t\t\t\tinp.value = scheduler.templates.calendar_time(new_date);\r\n\t\t\t\t\t\tinp._date = new Date(new_date);\r\n\t\t\t\t\t\tscheduler.destroyCalendar();\r\n\t\t\t\t\t\tif (scheduler.config.event_duration && scheduler.config.auto_end_date && number === 0) { //first element = start date\r\n\t\t\t\t\t\t\t_update_minical_select();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t};\r\n\r\n\t\tif (scheduler.config.full_day) {\r\n\t\t\tif (!node._full_day) {\r\n\t\t\t\tvar html = \"\";\r\n\t\t\t\tif (!scheduler.config.wide_form)\r\n\t\t\t\t\thtml = node.previousSibling.innerHTML + html;\r\n\t\t\t\tnode.previousSibling.innerHTML = html;\r\n\t\t\t\tnode._full_day = true;\r\n\t\t\t}\r\n\t\t\tvar input = node.previousSibling.getElementsByTagName(\"input\")[0];\r\n\r\n\t\t\tvar isFulldayEvent = (scheduler.date.time_part(ev.start_date) === 0 && scheduler.date.time_part(ev.end_date) === 0);\r\n\t\t\tinput.checked = isFulldayEvent;\r\n\r\n\t\t\tselects[0].disabled = input.checked;\r\n\t\t\tselects[1].disabled = input.checked;\r\n\r\n\t\t\tif (!input.$_eventAttached) {\r\n\t\t\t\tinput.$_eventAttached = true;\r\n\t\t\t\tscheduler.event(input, \"click\", function() {\r\n\t\t\t\t\tif (input.checked === true) {\r\n\t\t\t\t\t\tvar obj = {};\r\n\t\t\t\t\t\tscheduler.form_blocks.calendar_time.get_value(node, obj);\r\n\r\n\t\t\t\t\t\tstart_date = scheduler.date.date_part(obj.start_date);\r\n\t\t\t\t\t\tend_date = scheduler.date.date_part(obj.end_date);\r\n\r\n\t\t\t\t\t\tif (+end_date == +start_date || (+end_date >= +start_date && (ev.end_date.getHours() !== 0 || ev.end_date.getMinutes() !== 0)))\r\n\t\t\t\t\t\t\tend_date = scheduler.date.add(end_date, 1, \"day\");\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tvar start = start_date || ev.start_date;\r\n\t\t\t\t\tvar end = end_date || ev.end_date;\r\n\t\t\t\t\t_attach_action(inputs[0], start);\r\n\t\t\t\t\t_attach_action(inputs[1], end);\r\n\t\t\t\t\tselects[0].value = start.getHours() * 60 + start.getMinutes();\r\n\t\t\t\t\tselects[1].value = end.getHours() * 60 + end.getMinutes();\r\n\r\n\t\t\t\t\tselects[0].disabled = input.checked;\r\n\t\t\t\t\tselects[1].disabled = input.checked;\r\n\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (scheduler.config.event_duration && scheduler.config.auto_end_date) {\r\n\r\n\t\t\tvar _update_minical_select = function () {\r\n\t\t\t\tif (!(scheduler.config.auto_end_date && scheduler.config.event_duration)){\r\n\t\t\t\t\t// setting may be disabled after the handler is attached\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tstart_date = scheduler.date.add(inputs[0]._date, selects[0].value, \"minute\");\r\n\t\t\t\tend_date = new Date(start_date.getTime() + (scheduler.config.event_duration * 60 * 1000));\r\n\r\n\t\t\t\tinputs[1].value = scheduler.templates.calendar_time(end_date);\r\n\t\t\t\tinputs[1]._date = scheduler.date.date_part(new Date(end_date));\r\n\r\n\t\t\t\tselects[1].value = end_date.getHours() * 60 + end_date.getMinutes();\r\n\t\t\t};\r\n\r\n\t\t\tif(!selects[0].$_eventAttached){\r\n\t\t\t\tselects[0].addEventListener(\"change\", _update_minical_select); // only update on first select should trigger update so user could define other end date if he wishes too\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction _attach_action(inp, date, number) {\r\n\t\t\t_init_once(inp, date, number);\r\n\t\t\tinp.value = scheduler.templates.calendar_time(date);\r\n\t\t\tinp._date = scheduler.date.date_part(new Date(date));\r\n\t\t}\r\n\r\n\t\t_attach_action(inputs[0], ev.start_date, 0);\r\n\t\t_attach_action(inputs[1], ev.end_date, 1);\r\n\t\t_init_once = function() {};\r\n\r\n\t\tfunction _round_minutes(date) {\r\n\t\t\tvar time_values = config._time_values;\r\n\t\t\tvar direct_value = date.getHours() * 60 + date.getMinutes();\r\n\t\t\tvar fixed_value = direct_value;\r\n\t\t\tvar value_found = false;\r\n\r\n\t\t\tfor (var k = 0; k < time_values.length; k++) {\r\n\t\t\t\tvar t_v = time_values[k];\r\n\t\t\t\tif (t_v === direct_value) {\r\n\t\t\t\t\tvalue_found = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif (t_v < direct_value)\r\n\t\t\t\t\tfixed_value = t_v;\r\n\t\t\t}\r\n\r\n\t\t\tif(!(value_found || fixed_value))\r\n\t\t\t\treturn -1;\r\n\r\n\t\t\treturn (value_found) ? direct_value : fixed_value;\r\n\t\t}\r\n\r\n\t\tselects[0].value = _round_minutes(ev.start_date);\r\n\t\tselects[1].value = _round_minutes(ev.end_date);\r\n\r\n\t},\r\n\tget_value: function(node, ev) {\r\n\t\tvar inputs = node.getElementsByTagName(\"input\");\r\n\t\tvar selects = node.getElementsByTagName(\"select\");\r\n\r\n\t\tev.start_date = scheduler.date.add(inputs[0]._date, selects[0].value, \"minute\");\r\n\t\tev.end_date = scheduler.date.add(inputs[1]._date, selects[1].value, \"minute\");\r\n\r\n\t\tif (ev.end_date <= ev.start_date)\r\n\t\t\tev.end_date = scheduler.date.add(ev.start_date, scheduler.config.time_step, \"minute\");\r\n\t\treturn {\r\n\t\t\tstart_date: new Date(ev.start_date),\r\n\t\t\tend_date: new Date(ev.end_date)\r\n\t\t};\r\n\t},\r\n\tfocus: function(node) {\r\n\t}\r\n};\r\nscheduler.linkCalendar = function(calendar, datediff) {\r\n\tvar action = function() {\r\n\t\tvar date = scheduler._date;\r\n\t\tvar dateNew = new Date(date.valueOf());\r\n\t\tif (datediff) dateNew = datediff(dateNew);\r\n\t\tdateNew.setDate(1);\r\n\t\tscheduler.updateCalendar(calendar, dateNew);\r\n\t\treturn true;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", action);\r\n\tscheduler.attachEvent(\"onXLE\", action);\r\n\tscheduler.attachEvent(\"onEventAdded\", action);\r\n\tscheduler.attachEvent(\"onEventChanged\", action);\r\n\tscheduler.attachEvent(\"onEventDeleted\", action);\r\n\taction();\r\n};\r\n\r\nscheduler._markCalendarCurrentDate = function(calendar) {\r\n\tvar state = scheduler.getState();\r\n\tvar from = state.min_date;\r\n\tvar to = state.max_date;\r\n\tvar mode = state.mode;\r\n\r\n\tvar month_start = scheduler.date.month_start(new Date(calendar._date));\r\n\tvar month_end = scheduler.date.add(month_start, 1, \"month\");\r\n\r\n\tvar noHighlight = {\r\n\t\t\"month\":true,\r\n\t\t\"year\":true,\r\n\t\t\"agenda\":true,\r\n\t\t\"grid\":true\r\n\t};\r\n\t// no need to highlight current dates for a large range views - agenda, year, etc.\r\n\tif(noHighlight[mode] || (from.valueOf() <= month_start.valueOf() && to.valueOf() >= month_end.valueOf())){\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar current = from;\r\n\twhile(current.valueOf() < to.valueOf()){\r\n\t\tif (month_start.valueOf() <= current.valueOf() && month_end > current) {\r\n\t\t\tscheduler.markCalendar(calendar, current, \"dhx_calendar_click\");\r\n\t\t}\r\n\t\tcurrent = scheduler.date.add(current, 1, \"day\");\r\n\t}\r\n};\r\n\r\nscheduler.attachEvent(\"onEventCancel\", function(){\r\n\tscheduler.destroyCalendar(null, true);\r\n});\r\n\r\nscheduler.attachEvent(\"onDestroy\", function(){\r\n\tscheduler.destroyCalendar();\r\n});\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\tscheduler.xy.scroll_width = 0;\r\n\r\n\tvar old = scheduler.render_view_data;\r\n\tscheduler.render_view_data=function(){\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\t\tdata.firstChild._h_fix = true;\r\n\r\n\t\told.apply(scheduler,arguments);\r\n\r\n\r\n\r\n\t\tvar height = parseInt(data.style.height);\r\n\t\tdata.style.height=\"1px\";\r\n\t\tdata.style.height=data.scrollHeight+\"px\";\r\n\r\n\t\tthis._obj.style.height = this._obj.clientHeight + data.scrollHeight - height + \"px\";\r\n\t};\r\n\r\n\tvar old_s=scheduler._reset_month_scale;\r\n\tscheduler._reset_month_scale=function(a,b,c,d){\r\n\t\tvar dummy = {clientHeight:100};\r\n\t\told_s.apply(scheduler,[dummy,b,c,d]);\r\n\t\ta.innerHTML = dummy.innerHTML;\r\n\t};\r\n\r\n});\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Multisection\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\n\r\nfunction parseXMLOptions(loader, config){\r\n\tvar items = scheduler.ajax.xpath(\"//data/item\", loader.xmlDoc);\r\n\tvar ids = {};\r\n\tfor (var i = 0; i < items.length; i++) {\r\n\t\tids[items[i].getAttribute(config.map_to)] = true;\r\n\t}\r\n\treturn ids;\r\n}\r\n\r\nfunction parseJSONOptions(loader, config){\r\n\ttry{\r\n\t\tvar items = JSON.parse(loader.xmlDoc.responseText);\r\n\t\tvar ids = {};\r\n\t\tfor (var i = 0; i < items.length; i++) {\r\n\t\t\tvar option = items[i];\r\n\r\n\t\t\tids[option.value || option.key || option.id] = true;\r\n\t\t}\r\n\t\treturn ids;\r\n\t}catch(e){\r\n\t\treturn null;\r\n\t}\r\n}\r\n\r\nscheduler.form_blocks[\"multiselect\"]={\r\n\trender:function(sns) {\r\n\t\tvar css = \"dhx_multi_select_control dhx_multi_select_\"+sns.name;\r\n\t\tif(!!sns.vertical){\r\n\t\t\tcss += \" dhx_multi_select_control_vertical\";\r\n\t\t}\r\n\r\n\t\tvar _result = \"
\";\r\n\t\tfor (var i=0; i\"+sns.options[i].label+\"\";\r\n\t\t}\r\n\t\t_result += \"
\";\r\n\t\treturn _result;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\r\n\t\tvar _children = node.getElementsByTagName('input');\r\n\t\tfor(var i=0;i<_children.length;i++) {\r\n\t\t\t_children[i].checked = false; //unchecking all inputs on the form\r\n\t\t}\r\n\r\n\t\tfunction _mark_inputs(ids) { // ids = [ 0: undefined, 1: undefined, 2: true, 'custom_name': false ... ]\r\n\t\t\tvar _children = node.getElementsByTagName('input');\r\n\t\t\tfor(var i=0;i<_children.length; i++) {\r\n\t\t\t\t_children[i].checked = !! ids[_children[i].value];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar _ids = {};\r\n\t\tif (ev[config.map_to]) {\r\n\t\t\tvar results = (ev[config.map_to] + \"\").split(config.delimiter || scheduler.config.section_delimiter || \",\");\r\n\t\t\tfor (var i = 0; i < results.length; i++) {\r\n\t\t\t\t_ids[results[i]] = true;\r\n\t\t\t}\r\n\t\t\t_mark_inputs(_ids);\r\n\t\t} else {\r\n\t\t\tif (scheduler._new_event || !config.script_url)\r\n\t\t\t\treturn;\r\n\t\t\tvar divLoading = document.createElement('div');\r\n\t\t\tdivLoading.className = 'dhx_loading';\r\n\t\t\tdivLoading.style.cssText = \"position: absolute; top: 40%; left: 40%;\";\r\n\t\t\tnode.appendChild(divLoading);\r\n\r\n\t\t\tvar url = [\r\n\t\t\t\tconfig.script_url,\r\n\t\t\t\t(config.script_url.indexOf(\"?\") == -1 ? \"?\" : \"&\"),\r\n\t\t\t\t'dhx_crosslink_' + config.map_to + '=' + ev.id + '&uid=' + scheduler.uid()\r\n\t\t\t].join(\"\");\r\n\r\n\t\t\tscheduler.ajax.get(url, function(loader) {\r\n\t\t\t\tvar options = parseJSONOptions(loader, config);\r\n\t\t\t\tif(!options){\r\n\t\t\t\t\toptions = parseXMLOptions(loader, config);\r\n\t\t\t\t}\r\n\t\t\t\t_mark_inputs(options);\r\n\t\t\t\tnode.removeChild(divLoading);\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tvar _result = [];\r\n\t\tvar _children = node.getElementsByTagName(\"input\");\r\n\t\tfor(var i=0;i<_children.length;i++) {\r\n\t\t\tif(_children[i].checked)\r\n\t\t\t\t_result.push(_children[i].value);\r\n\t\t}\r\n\t\treturn _result.join(config.delimiter || scheduler.config.section_delimiter || \",\");\r\n\t},\r\n\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\r\n\tfunction backup(obj){\r\n\t\tvar t = function(){};\r\n\t\tt.prototype = obj;\r\n\t\treturn t;\r\n\t}\r\n\r\n\tvar old = scheduler._load;\r\n\tscheduler._load=function(url,from){\r\n\t\turl=url||this._load_url;\r\n\t\tif (typeof url == \"object\"){\r\n\t\t\tvar t = backup(this._loaded);\r\n\t\t\tfor (var i=0; i < url.length; i++) {\r\n\t\t\t\tthis._loaded=new t();\r\n\t\t\t\told.call(this,url[i],from);\r\n\t\t\t}\r\n\t\t} else\r\n\t\t\told.apply(this,arguments);\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\t/* global Backbone */\r\n\tvar cfg = {\r\n\t\tuse_id : false\r\n\t};\r\n\r\n\t//remove private properties\r\n\tfunction sanitize(ev){\r\n\t\tvar obj = {};\r\n\t\tfor (var key in ev)\r\n\t\t\tif (key.indexOf(\"_\") !== 0)\r\n\t\t\t\tobj[key] = ev[key];\r\n\r\n\t\tif (!cfg.use_id)\r\n\t\t\tdelete obj.id;\r\n\r\n\t\treturn obj;\r\n\t}\r\n\r\n\tvar update_timer;\r\n\tfunction update_view(){\r\n\t\tclearTimeout(update_timer);\r\n\t\tupdate_timer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler.updateView();\r\n\t\t},1);\r\n\t}\r\n\r\n\tfunction _start_ext_load(cal){\r\n\t\tcal._loading = true;\r\n\t\tcal._not_render = true;\r\n\r\n\t\tcal.callEvent(\"onXLS\", []);\r\n\t}\r\n\tfunction _finish_ext_load(cal){\r\n\t\tcal._not_render = false;\r\n\t\tif (cal._render_wait)\r\n\t\t\tcal.render_view_data();\r\n\t\tcal._loading = false;\r\n\r\n\t\tcal.callEvent(\"onXLE\", []);\r\n\t}\r\n\r\n\r\n\tfunction _get_id(model){\r\n\t\treturn cfg.use_id ? model.id : model.cid;\r\n\t}\r\n\r\nscheduler.backbone = function(events, config){\r\n\tif (config) cfg = config;\r\n\r\n\tevents.bind(\"change\", function(model, info){\r\n\t\tvar cid = _get_id(model);\r\n\t\tvar ev = scheduler._events[cid] = model.toJSON();\r\n\t\tev.id = cid;\r\n\r\n\t\tscheduler._init_event(ev);\r\n\t\tupdate_view();\r\n\t});\r\n\tevents.bind(\"remove\", function(model, changes){\r\n\t\tvar cid = _get_id(model);\r\n\t\tif (scheduler._events[cid])\r\n\t\t\tscheduler.deleteEvent(cid);\r\n\t});\r\n\r\n\tvar queue = [];\r\n\tfunction add_from_queue(){\r\n\t\tif(scheduler.$destroyed){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (queue.length){\r\n\t\t\tscheduler.parse(queue, \"json\");\r\n\t\t\tqueue = [];\r\n\t\t}\r\n\t}\r\n\r\n\tevents.bind(\"add\", function(model, changes){\r\n\t\tvar cid = _get_id(model);\r\n\t\tif (!scheduler._events[cid]){\r\n\t\t\tvar ev = model.toJSON();\r\n\t\t\tev.id = cid;\r\n\t\t\tscheduler._init_event(ev);\r\n\r\n\t\t\tqueue.push(ev);\r\n\t\t\tif (queue.length == 1)\r\n\t\t\t\tsetTimeout(add_from_queue,1);\r\n\t\t}\r\n\t});\r\n\r\n\tevents.bind(\"request\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_start_ext_load(scheduler);\r\n\t});\r\n\tevents.bind(\"sync\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_finish_ext_load(scheduler);\r\n\t});\r\n\tevents.bind(\"error\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_finish_ext_load(scheduler);\r\n\t});\r\n\r\n\r\n\tscheduler.attachEvent(\"onEventCreated\", function(id){\r\n\t\tvar ev = new events.model(scheduler.getEvent(id));\r\n\t\tscheduler._events[id] = ev.toJSON();\r\n\t\tscheduler._events[id].id = id;\r\n\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onEventAdded\", function(id){\r\n\t\tif (!events.get(id)){\r\n\t\t\tvar data = sanitize(scheduler.getEvent(id));\r\n\t\t\tvar model = new events.model(data);\r\n\r\n\t\t\tvar cid = _get_id(model);\r\n\t\t\tif (cid != id)\r\n\t\t\t\tthis.changeEventId(id, cid);\r\n\t\t\tevents.add(model);\r\n\t\t\tevents.trigger(\"scheduler:add\", model);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventChanged\", function(id){\r\n\t\tvar ev = events.get(id);\r\n\t\tvar upd = sanitize(scheduler.getEvent(id));\r\n\r\n\t\tev.set(upd);\r\n\t\tevents.trigger(\"scheduler:change\", ev);\r\n\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventDeleted\", function(id){\r\n\t\tvar model = events.get(id);\r\n\t\tif (model){\r\n\t\t\tevents.trigger(\"scheduler:remove\", model);\r\n\t\t\tevents.remove(id);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\t/* global dhtmlDragAndDropObject, dhtmlx */\r\n// lame old code doesn't provide raw event object\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\t\tvar dragger = (new dhtmlDragAndDropObject());\r\n\t\tvar old = dragger.stopDrag;\r\n\t\tvar last_event;\r\n\t\tdragger.stopDrag = function(e) {\r\n\t\t\tlast_event = e;\r\n\t\t\treturn old.apply(this, arguments);\r\n\t\t};\r\n\r\n\t\tfunction on_drop(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml) {\r\n\r\n\t\t\tif (scheduler.checkEvent(\"onBeforeExternalDragIn\") && !scheduler.callEvent(\"onBeforeExternalDragIn\", [sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml, last_event]))\r\n\t\t\t\treturn;\r\n\r\n\t\t\tvar temp = scheduler.attachEvent(\"onEventCreated\", function (id) {\r\n\t\t\t\tif (!scheduler.callEvent(\"onExternalDragIn\", [id, sourceHtmlObject, last_event])) {\r\n\t\t\t\t\tthis._drag_mode = this._drag_id = null;\r\n\t\t\t\t\tthis.deleteEvent(id);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tvar action_data = scheduler.getActionData(last_event);\r\n\t\t\tvar event_data = {\r\n\t\t\t\tstart_date: new Date(action_data.date)\r\n\t\t\t};\r\n\r\n\t\t\t// custom views, need to assign section id, fix dates\r\n\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\tvar view_options = scheduler.matrix[scheduler._mode];\r\n\t\t\t\tevent_data[view_options.y_property] = action_data.section;\r\n\r\n\t\t\t\tvar pos = scheduler._locate_cell_timeline(last_event);\r\n\t\t\t\tevent_data.start_date = view_options._trace_x[pos.x];\r\n\t\t\t\tevent_data.end_date = scheduler.date.add(event_data.start_date, view_options.x_step, view_options.x_unit);\r\n\t\t\t}\r\n\t\t\tif (scheduler._props && scheduler._props[scheduler._mode]) {\r\n\t\t\t\tevent_data[scheduler._props[scheduler._mode].map_to] = action_data.section;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler.addEventNow(event_data);\r\n\r\n\t\t\tscheduler.detachEvent(temp);\r\n\t\t}\r\n\r\n\t\tdragger.addDragLanding(scheduler._els[\"dhx_cal_data\"][0], {\r\n\t\t\t_drag: function(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml) {\r\n\t\t\t\ton_drop(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml);\r\n\t\t\t},\r\n\t\t\t_dragIn: function(htmlObject, shtmlObject) {\r\n\t\t\t\treturn htmlObject;\r\n\t\t\t},\r\n\t\t\t_dragOut: function(htmlObject) {\r\n\t\t\t\treturn this;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(dhtmlx.DragControl) {\r\n\t\t\tdhtmlx.DragControl.addDrop(scheduler._els[\"dhx_cal_data\"][0], {\r\n\t\t\t\tonDrop: function (source, target, d, e) {\r\n\t\t\t\t\tvar sourceDhtmlx = dhtmlx.DragControl.getMaster(source);\r\n\t\t\t\t\tlast_event = e;\r\n\t\t\t\t\ton_drop(source, sourceDhtmlx, target, e.target || e.srcElement);\r\n\t\t\t\t},\r\n\r\n\t\t\t\tonDragIn: function (source, target, e) {\r\n\t\t\t\t\treturn target;\r\n\t\t\t\t}\r\n\t\t\t}, true);\r\n\t\t}\r\n\t});\r\n\r\n}","export default function(scheduler){\r\n\r\n\tvar dx, dy,\r\n\t\thtml_regexp = new RegExp(\"<[^>]*>\", \"g\"),\r\n\t\tnewline_regexp = new RegExp(\"]*>\", \"g\");\r\n\r\n\tfunction clean_html(val) {\r\n\t\treturn val.replace(newline_regexp, \"\\n\").replace(html_regexp, \"\");\r\n\t}\r\n\r\n\tfunction x_norm(x, offset) {\r\n\t\tx = parseFloat(x);\r\n\t\toffset = parseFloat(offset);\r\n\t\tif (!isNaN(offset)) x -= offset;\r\n\r\n\t\tvar w = colsWidth(x);\r\n\t\tx = x - w.width + w.cols*dx;\r\n\t\treturn isNaN(x)?\"auto\":(100*x/(dx));\r\n\t}\r\n\r\n\tfunction x_norm_event(x, offset, is_left) {\r\n\t\tx = parseFloat(x);\r\n\t\toffset = parseFloat(offset);\r\n\t\tif (!isNaN(offset) && is_left) x -= offset;\r\n\r\n\t\tvar w = colsWidth(x);\r\n\t\tx = x - w.width + w.cols*dx;\r\n\t\treturn isNaN(x)?\"auto\":(100*x/(dx-(!isNaN(offset)?offset:0)));\r\n\t}\r\n\tfunction colsWidth(width) {\r\n\t\tvar r = 0;\r\n\t\tvar header = scheduler._els.dhx_cal_header[0].childNodes;\r\n\t\tvar els = header[1] ? header[1].childNodes : header[0].childNodes;\r\n\t\tfor (var i = 0; i < els.length; i++) {\r\n\t\t\tvar el = els[i].style ? els[i] : els[i].parentNode;\r\n\t\t\tvar w = parseFloat(el.style.width);\r\n\t\t\tif (width > w){\r\n\t\t\t\twidth -= (w+1);\r\n\t\t\t\tr+=(w+1);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\treturn { width: r, cols: i };\r\n\t}\r\n\r\n\tfunction y_norm(y) {\r\n\t\ty = parseFloat(y);\r\n\t\tif (isNaN(y)) return \"auto\";\r\n\t\treturn 100 * y / dy;\r\n\t}\r\n\r\n\tfunction get_style(node, style){\r\n\t\treturn (window.getComputedStyle?(window.getComputedStyle(node, null)[style]):(node.currentStyle?node.currentStyle[style]:null))||\"\";\r\n\t}\r\n\r\n\tfunction de_day(node, n) {\r\n\t\tvar x = parseInt(node.style.left, 10);\r\n\r\n\t\tfor (var dx = 0; dx < scheduler._cols.length; dx++) {\r\n\t\t\tx -= scheduler._cols[dx];\r\n\t\t\tif (x < 0) return dx;\r\n\t\t}\r\n\t\treturn n;\r\n\t}\r\n\r\n\tfunction de_week(node, n) {\r\n\t\tvar y = parseInt(node.style.top, 10);\r\n\t\tfor (var dy = 0; dy < scheduler._colsS.heights.length; dy++)\r\n\t\t\tif (scheduler._colsS.heights[dy] > y) return dy;\r\n\t\treturn n;\r\n\t}\r\n\r\n\tfunction xml_start(tag) {\r\n\t\treturn tag ? \"<\"+tag+\">\" : \"\";\r\n\t}\r\n\tfunction xml_end(tag) {\r\n\t\treturn tag ? \"\" : \"\";\r\n\t}\r\n\r\n\tfunction xml_top(tag, profile, header, footer) {\r\n\t\tvar xml = \"<\"+tag+\" profile='\" + profile + \"'\";\r\n\t\tif (header)\r\n\t\t\txml += \" header='\" + header + \"'\";\r\n\t\tif (footer)\r\n\t\t\txml += \" footer='\" + footer + \"'\";\r\n\t\txml += \">\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_body_header() {\r\n\t\tvar xml = \"\";\r\n\t\t// detects if current mode is timeline\r\n\t\tvar mode = scheduler._mode;\r\n\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode])\r\n\t\t\tmode = (scheduler.matrix[scheduler._mode].render == \"cell\") ? \"matrix\" : \"timeline\";\r\n\t\txml += \"\";\r\n\r\n\t\tif (scheduler._mode == \"week_agenda\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_data[0].getElementsByTagName(\"DIV\");\r\n\t\t\tfor (var i = 0; i < xh.length; i++)\r\n\t\t\t\tif (xh[i].className == \"dhx_wa_scale_bar\")\r\n\t\t\t\t\txml += \"\" + clean_html(xh[i].innerHTML) + \"\";\r\n\t\t} else if (scheduler._mode == \"agenda\" || scheduler._mode == \"map\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_header[0].childNodes[0].childNodes;\r\n\r\n\t\t\txml += \"\" + clean_html(xh[0].innerHTML) + \"\" + clean_html(xh[1].innerHTML) + \"\";\r\n\t\t} else if (scheduler._mode == \"year\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_data[0].childNodes;\r\n\t\t\tfor (var i = 0; i < xh.length; i++) {\r\n\t\t\t\txml += \"\";\r\n\t\t\t\txml += xml_month_scale(xh[i].querySelector(\".dhx_year_week\").childNodes);\r\n\t\t\t\txml += xml_month(xh[i].querySelector(\".dhx_year_body\"));\r\n\t\t\t\txml += \"\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\txml += \"\";\r\n\t\t\tvar xh = scheduler._els.dhx_cal_header[0].childNodes;\r\n\t\t\txml += xml_month_scale(xh);\r\n\t\t\txml += \"\";\r\n\r\n\t\t\tvar yh = scheduler._els.dhx_cal_data[0];\r\n\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tfor (var i = 0; i < yh.firstChild.rows.length; i++) {\r\n\t\t\t\t\tvar el = yh.firstChild.rows[i];\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t}\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tdy = yh.firstChild.rows[0].cells[0].offsetHeight;\r\n\t\t\t} else if (yh.firstChild.tagName == \"TABLE\") {\r\n\t\t\t\txml += xml_month(yh);\r\n\t\t\t} else {\r\n\t\t\t\tyh = yh.childNodes[yh.childNodes.length - 1];\r\n\t\t\t\twhile (yh.className.indexOf(\"dhx_scale_holder\") == -1)\r\n\t\t\t\t\tyh = yh.previousSibling;\r\n\t\t\t\tyh = yh.childNodes;\r\n\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tfor (var i = 0; i < yh.length; i++)\r\n\t\t\t\t\txml += \"\\n\";\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tdy = yh[0].offsetHeight;\r\n\t\t\t}\r\n\t\t}\r\n\t\txml += \"\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_month(yh) {\r\n\t\tvar xml = \"\";\r\n\t\tvar r = yh.querySelectorAll(\"tr\");\r\n\t\tfor (var i = 0; i < r.length; i++) {\r\n\t\t\tvar days = [];\r\n\t\t\tvar cells = r[i].querySelectorAll(\"td\");\r\n\r\n\t\t\tfor (var j = 0; j < cells.length; j++)\r\n\t\t\t\tdays.push(cells[j].querySelector(\".dhx_month_head\").innerHTML);\r\n\r\n\t\t\txml += \"\\n\";\r\n\t\t\tdy = cells[0].offsetHeight;\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_month_scale(xh) {\r\n\t\tvar xhs,\r\n\t\t\txml = \"\";\r\n\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\tif (scheduler.matrix[scheduler._mode].second_scale)\r\n\t\t\t\txhs = xh[1].childNodes;\r\n\r\n\t\t\txh = xh[0].childNodes;\r\n\t\t}\r\n\r\n\t\tfor (var i = 0; i < xh.length; i++)\r\n\t\t\txml += \"\\n\";\r\n\t\tdx = xh[0].offsetWidth;\r\n\r\n\t\tif (xhs) {\r\n\t\t\tvar width = 0;\r\n\t\t\tvar top_width = xh[0].offsetWidth;\r\n\t\t\tvar top_col = 1;\r\n\t\t\tfor (var i = 0; i < xhs.length; i++) {\r\n\t\t\t\txml += \"\\n\";\r\n\t\t\t\twidth += xhs[i].offsetWidth;\r\n\t\t\t\tif (width >= top_width) {\r\n\t\t\t\t\ttop_width += (xh[top_col] ? xh[top_col].offsetWidth : 0);\r\n\t\t\t\t\ttop_col++;\r\n\t\t\t\t}\r\n\t\t\t\tdx = xhs[0].offsetWidth;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_body(colors) {\r\n\t\tvar xml = \"\";\r\n\t\tvar evs = scheduler._rendered;\r\n\t\tvar matrix = scheduler.matrix && scheduler.matrix[scheduler._mode];\r\n\r\n\t\tif (scheduler._mode == \"agenda\" || scheduler._mode == \"map\") {\r\n\r\n\t\t\tfor (var i = 0; i < evs.length; i++)\r\n xml += \"\";\r\n\r\n\t\t} else if (scheduler._mode == \"week_agenda\") {\r\n\r\n\t\t\tfor (var i = 0; i < evs.length; i++)\r\n\t\t\t\txml += \"\" + clean_html(evs[i].innerHTML) + \"\";\r\n\r\n\t\t} else if (scheduler._mode == \"year\") {\r\n\r\n\t\t\tvar evs = scheduler.get_visible_events();\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar d = evs[i].start_date;\r\n\t\t\t\tif (d.valueOf() < scheduler._min_date.valueOf())\r\n\t\t\t\t\td = scheduler._min_date;\r\n\r\n\t\t\t\twhile (d < evs[i].end_date) {\r\n\t\t\t\t\tvar m = d.getMonth() + 12 * (d.getFullYear() - scheduler._min_date.getFullYear()) - scheduler.week_starts._month;\r\n\t\t\t\t\tvar day = scheduler.week_starts[m] + d.getDate() - 1;\r\n\t\t\t\t\tvar text_color = colors ? get_style(scheduler._get_year_cell(d), \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(scheduler._get_year_cell(d), \"backgroundColor\") : \"\";\r\n\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t\td = scheduler.date.add(d, 1, \"day\");\r\n\t\t\t\t\tif (d.valueOf() >= scheduler._max_date.valueOf())\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (matrix && matrix.render == \"cell\") {\r\n\t\t\tvar evs = scheduler._els.dhx_cal_data[0].getElementsByTagName(\"TD\");\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar text_color = colors ? get_style(evs[i], \"color\") : \"\";\r\n\t\t\t\tvar bg_color = colors ? get_style(evs[i], \"backgroundColor\") : \"\";\r\n\t\t\t\txml += \"\\n\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar zx, zdx;\r\n\t\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\t\t// logic for timeline view\r\n\t\t\t\t\tzx = x_norm(evs[i].style.left);\r\n\t\t\t\t\tzdx = x_norm(evs[i].offsetWidth)-1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// we should use specific logic for day/week/units view\r\n\t\t\t\t\tvar left_norm = scheduler.config.use_select_menu_space ? 0 : 26;\r\n\t\t\t\t\tzx = x_norm_event(evs[i].style.left, left_norm, true);\r\n\t\t\t\t\tzdx = x_norm_event(evs[i].style.width, left_norm)-1;\r\n\t\t\t\t}\r\n\t\t\t\tif (isNaN(zdx * 1)) continue;\r\n\t\t\t\tvar zy = y_norm(evs[i].style.top);\r\n\t\t\t\tvar zdy = y_norm(evs[i].style.height);\r\n\r\n\t\t\t\tvar e_type = evs[i].className.split(\" \")[0].replace(\"dhx_cal_\", \"\");\r\n\t\t\t\tif (e_type === 'dhx_tooltip_line') continue;\r\n\r\n\t\t\t\tvar dets = scheduler.getEvent(evs[i].getAttribute(scheduler.config.event_attribute));\r\n if (!dets) continue;\r\n\t\t\t\tvar day = dets._sday;\r\n\t\t\t\tvar week = dets._sweek;\r\n\t\t\t\tvar length = dets._length || 0;\r\n\r\n\t\t\t\tif (scheduler._mode == \"month\") {\r\n\t\t\t\t\tzdy = parseInt(evs[i].offsetHeight, 10);\r\n\t\t\t\t\tzy = parseInt(evs[i].style.top, 10) - scheduler.xy.month_head_height;\r\n\r\n\t\t\t\t\tday = de_day(evs[i], day);\r\n\t\t\t\t\tweek = de_week(evs[i], week);\r\n\t\t\t\t} else if (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\t\tday = 0;\r\n\t\t\t\t\tvar el = evs[i].parentNode.parentNode.parentNode;\r\n\t\t\t\t\tweek = el.rowIndex;\r\n\t\t\t\t\tvar dy_copy = dy;\r\n\t\t\t\t\tdy = evs[i].parentNode.offsetHeight;\r\n\t\t\t\t\tzy = y_norm(evs[i].style.top);\r\n\t\t\t\t\tzy -= zy * 0.2;\r\n\t\t\t\t\tdy = dy_copy;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (evs[i].parentNode == scheduler._els.dhx_cal_data[0]) continue;\r\n\t\t\t\t\tvar parent = scheduler._els[\"dhx_cal_data\"][0].childNodes[0];\r\n\t\t\t\t\tvar offset = parseFloat(parent.className.indexOf(\"dhx_scale_holder\") != -1 ? parent.style.left : 0);\r\n\t\t\t\t\tzx += x_norm(evs[i].parentNode.style.left, offset);\r\n\t\t\t\t}\r\n\r\n\t\t\t\txml += \"\\n\";\r\n\r\n\t\t\t\tif (e_type == \"event\") {\r\n\t\t\t\t\txml += \"
\";\r\n\t\t\t\t\tvar text_color = colors ? get_style(evs[i].childNodes[2], \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(evs[i].childNodes[2], \"backgroundColor\") : \"\";\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvar text_color = colors ? get_style(evs[i], \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(evs[i], \"backgroundColor\") : \"\";\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t}\r\n\t\t\t\txml += \"
\";\r\n\t\t\t}\r\n\t\t\t}\r\n\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction toXML(start, end, view, mode, header, footer){\r\n\t\tvar colors = false;\r\n\t\tif (mode == \"fullcolor\") {\r\n\t\t\tcolors = true;\r\n\t\t\tmode = \"color\";\r\n\t\t}\r\n\r\n\t\tmode = mode || \"color\";\r\n\r\n\t\tvar xml = \"\";\r\n\t\tif (start) {\r\n\r\n\t\t\tvar original_date = scheduler._date;\r\n\t\t\tvar original_mode = scheduler._mode;\r\n\t\t\tend = scheduler.date[view+\"_start\"](end);\r\n\t\t\tend = scheduler.date[\"get_\"+view+\"_end\"] ? scheduler.date[\"get_\"+view+\"_end\"](end) : scheduler.date.add(end, 1, view);\r\n\r\n\t\t\txml = xml_top(\"pages\", mode, header, footer);\r\n\t\t\tfor (var temp_date = new Date(start); +temp_date < +end; temp_date = this.date.add(temp_date, 1, view)) {\r\n\t\t\t\tthis.setCurrentView(temp_date, view);\r\n\t\t\t\txml += xml_start(\"page\") + xml_body_header().replace(\"\\u2013\", \"-\") + xml_body(colors) + xml_end(\"page\");\r\n\t\t\t}\r\n\t\t\txml += xml_end(\"pages\");\r\n\r\n\t\t\tthis.setCurrentView(original_date, original_mode);\r\n\t\t} else {\r\n\t\t\txml = xml_top(\"data\", mode, header, footer) + xml_body_header().replace(\"\\u2013\", \"-\") + xml_body(colors) + xml_end(\"data\");\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\tscheduler.getPDFData = toXML;\r\n\tfunction send_xml(xml, url){\r\n\t\tvar uid = scheduler.uid();\r\n\t\tvar d = document.createElement(\"div\");\r\n\t\td.style.display = \"none\";\r\n\t\tdocument.body.appendChild(d);\r\n\r\n\t\td.innerHTML = '
';\r\n\t\tdocument.getElementById(uid).firstChild.value = encodeURIComponent(xml);\r\n\t\tdocument.getElementById(uid).submit();\r\n\t\td.parentNode.removeChild(d);\r\n\t}\r\n\r\n\tfunction to_pdf(start, end, view, url, mode, header, footer) {\r\n\t\tvar xml = \"\";\r\n\t\tif(typeof mode == \"object\"){\r\n\t\t\txml = schedulersToPdf(mode);\r\n\t\t}else{\r\n\t\t\txml = toXML.apply(this, [start, end, view, mode, header, footer]);\r\n\t\t}\r\n\r\n\t\tsend_xml(xml, url);\r\n\t}\r\n\r\n\tfunction schedulersToPdf(objects){\r\n\t\tvar xml = \"\";\r\n\t\tfor(var i=0; i < objects.length; i++){\r\n\t\t\txml += objects[i].source.getPDFData(objects[i].start, objects[i].end, objects[i].view, objects[i].mode, objects[i].header, objects[i].footer);\r\n\t\t}\r\n\t\txml += \"\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\t/*\r\n\t * scheduler.toPDF(url, mode, header, footer) - for a single scheduler\r\n\t * scheduler.toPDF(url, [scheduler1, scheduler2,...]) - for multiple schedulers\r\n\t * example:\r\n\t * scheduler.toPDF(\"generate.ashx\", [\r\n\t * { source: scheduler1, mode: \"color\" },\r\n\t * { source: scheduler2, mode: \"gray\", view:\"week\", start:new Date(2013, 06, 1), end:new Date(2013, 06, 28) },\r\n\t * { source: scheduler3 }\r\n\t * ]);\r\n\t *\r\n\t */\r\n\tscheduler.toPDF = function(url, mode, header, footer) {\r\n\t\treturn to_pdf.apply(this, [null, null, null, url, mode, header, footer]);\r\n\t};\r\n\tscheduler.toPDFRange = function(start, end, view, url, mode, header, footer) {\r\n\t\tif (typeof start == \"string\") {\r\n\t\t\tstart = scheduler.templates.api_date(start);\r\n\t\t\tend = scheduler.templates.api_date(end);\r\n\t\t}\r\n\r\n\t\treturn to_pdf.apply(this, arguments);\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.icons_select = [\"icon_form\", \"icon_delete\"];\r\nscheduler.config.details_on_create = true;\r\nscheduler.config.show_quick_info = true;\r\nscheduler.xy.menu_width = 0;\r\n\r\nscheduler.attachEvent(\"onClick\", function(id){\r\n\tif(!scheduler.config.show_quick_info){\r\n\t\treturn;\r\n\t}\r\n\tscheduler.showQuickInfo(id);\r\n\treturn true;\r\n});\r\n\r\n(function(){\r\n\t// pass `force` argument in order to hide quick info synchronously\r\n\t// so it won't affect showQuickInfo call that can follow\r\n\tvar events = [\"onEmptyClick\", \"onViewChange\", \"onLightbox\", \"onBeforeEventDelete\", \"onBeforeDrag\"];\r\n\tvar hiding_function = function(){\r\n\t\tscheduler.hideQuickInfo(true);\r\n\t\treturn true;\r\n\t};\r\n\tfor (var i=0; i window.innerWidth){\r\n\t\t\tleft = window.innerWidth - width;\r\n\t\t}\r\n\t\tleft = Math.max(0, left);\r\n\r\n\t\tqi.style.left = left + \"px\";\r\n\t\tqi.style.top = pos.top - (pos.dy?height:-pos.height) + \"px\";\r\n\t} else {\r\n\r\n\t\tconst dataPos = scheduler.$container.querySelector('.dhx_cal_data').offsetTop;\r\n\t\tqi.style.top = dataPos + 20 + \"px\";\r\n\t\tif (pos.dx == 1){\r\n\t\t\tqi.style.right = \"auto\";\r\n\t\t\tqi.style.left = -width + \"px\";\r\n\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tqi.style.left = \"-10px\";\r\n\t\t\t},1);\r\n\t\t} else {\r\n\t\t\tqi.style.left = \"auto\";\r\n\t\t\tqi.style.right = -width + \"px\";\r\n\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tqi.style.right = \"-10px\";\r\n\t\t\t},1);\r\n\t\t}\r\n\t\tqi.className = qi.className.replace(\" dhx_qi_left\",\"\").replace(\" dhx_qi_right\",\"\")+\" dhx_qi_\"+(pos.dx==1?\"left\":\"right\");\r\n\t}\r\n};\r\nscheduler.attachEvent(\"onTemplatesReady\", function(){\r\n\tscheduler.hideQuickInfo();\r\n\tif(this._quick_info_box){\r\n\t\tvar box = this._quick_info_box;\r\n\t\tif(box.parentNode){\r\n\t\t\tbox.parentNode.removeChild(box);\r\n\t\t}\r\n\t\tthis._quick_info_box = null;\r\n\t}\r\n});\r\nscheduler._quick_info_onscroll_handler = function(e){\r\n\tscheduler.hideQuickInfo();\r\n};\r\nscheduler._init_quick_info = function(){\r\n\tif (!this._quick_info_box){\r\n\r\n\r\n\t\tvar qi = this._quick_info_box = document.createElement(\"div\");\r\n\r\n\t\tthis._waiAria.quickInfoAttr(qi);\r\n\r\n\t\tqi.className = \"dhx_cal_quick_info\";\r\n\t\tif (scheduler.$testmode)\r\n\t\t\tqi.className += \" dhx_no_animate\";\r\n\t\tif (scheduler.config.rtl) qi.className += \" dhx_quick_info_rtl\";\r\n\t//title\r\n\t\tvar ariaAttr = this._waiAria.quickInfoHeaderAttrString();\r\n\t\tvar html = `\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t\t
\r\n\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t\t
`;\r\n\r\n\t//buttons\r\n\t\thtml += \"
\";\r\n\t\tvar buttons = scheduler.config.icons_select;\r\n\t\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\t\tvar ariaAttr = this._waiAria.quickInfoButtonAttrString(this.locale.labels[buttons[i]]);\r\n\t\t\t\thtml += `
\r\n\t\t\t\t
${scheduler.locale.labels[buttons[i]]}
`;\r\n\t\t\t}\r\n\t\t// }\r\n\t\thtml += \"
\";\r\n\r\n\t\tqi.innerHTML = html;\r\n\t\tscheduler.event(qi, \"click\", function(ev){\r\n\t\t\tscheduler._qi_button_click(ev.target || ev.srcElement);\r\n\t\t});\r\n\t\tif (scheduler.config.quick_info_detached){\r\n\t\t\tscheduler._detachDomEvent(scheduler._els[\"dhx_cal_data\"][0], \"scroll\", scheduler._quick_info_onscroll_handler);\r\n\t\t\tscheduler.event(scheduler._els[\"dhx_cal_data\"][0], \"scroll\", scheduler._quick_info_onscroll_handler);\r\n\t\t}\r\n\t}\r\n\r\n\treturn this._quick_info_box;\r\n};\r\n\r\nscheduler._qi_button_click = function(node){\r\n\tvar box = scheduler._quick_info_box;\r\n\tif (!node || node == box) return;\r\n\r\n\tif(node.closest(\".dhx_cal_qi_close_btn\")){\r\n\t\tscheduler.hideQuickInfo();\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar mask = scheduler._getClassName(node);\r\n\tif (mask.indexOf(\"_icon\")!=-1){\r\n\t\tvar id = scheduler._quick_info_box_id;\r\n\t\tscheduler._click.buttons[mask.split(\" \")[1].replace(\"icon_\",\"\")](id);\r\n\t} else\r\n\t\tscheduler._qi_button_click(node.parentNode);\r\n};\r\nscheduler._get_event_counter_part = function(id){\r\n\tvar domEv = scheduler.getRenderedEvent(id);\r\n\tvar left = 0;\r\n\tvar top = 0;\r\n\r\n\tvar node = domEv;\r\n\twhile (node && node != scheduler._obj){\r\n\t\tleft += node.offsetLeft;\r\n\t\ttop += node.offsetTop-node.scrollTop;\r\n\t\tnode = node.offsetParent;\r\n\t}\r\n\tif(node){\r\n\t\tvar dx = (left + domEv.offsetWidth/2) > (scheduler._x/2) ? 1 : 0;\r\n\t\tvar dy = (top + domEv.offsetHeight/2) > (scheduler._y/2) ? 1 : 0;\r\n\r\n\t\treturn { left:left, top:top, dx:dx, dy:dy,\r\n\t\t\twidth:domEv.offsetWidth, height:domEv.offsetHeight };\r\n\t}\r\n\treturn 0;\r\n};\r\n\r\nscheduler._fill_quick_data = function(id){\r\n\tvar ev = scheduler.getEvent(id);\r\n\tvar qi = scheduler._quick_info_box;\r\n\r\n\tscheduler._quick_info_box_id = id;\r\n\r\n//title content\r\n\r\n\tvar header = {\r\n\t\tcontent: scheduler.templates.quick_info_title(ev.start_date, ev.end_date, ev),\r\n\t\tdate: scheduler.templates.quick_info_date(ev.start_date, ev.end_date, ev)\r\n\t};\r\n\tvar titleContent = qi.querySelector(\".dhx_cal_qi_tcontent\");\r\n\ttitleContent.innerHTML = `${header.content}`;\r\n\tvar titleDate = qi.querySelector(\".dhx_cal_qi_tdate\");\r\n\ttitleDate.innerHTML = header.date;\r\n\r\n\tscheduler._waiAria.quickInfoHeader(qi, [header.content, header.date].join(\" \"));\r\n\r\n//main content\r\n\tvar main = qi.querySelector(\".dhx_cal_qi_content\");\r\n\tconst mainContent = scheduler.templates.quick_info_content(ev.start_date, ev.end_date, ev);\r\n\tif(mainContent){\r\n\t\tmain.classList.remove(\"dhx_hidden\");\r\n\t\tmain.innerHTML = mainContent;\r\n\t}else{\r\n\t\tmain.classList.add(\"dhx_hidden\");\r\n\t}\r\n};\r\n\r\n\r\n}","export default function(scheduler){\r\n\t\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar originalRecurringSetValue;\r\n\tif (scheduler.form_blocks.recurring) {\r\n\t\toriginalRecurringSetValue = scheduler.form_blocks.recurring.set_value;\r\n\t}\r\n\tvar original_left_buttons = scheduler.config.buttons_left.slice();\r\n\tvar original_right_buttons = scheduler.config.buttons_right.slice();\r\n\r\n\tscheduler.attachEvent(\"onBeforeLightbox\", function(id) {\r\n\t\tif (this.config.readonly_form || this.getEvent(id).readonly) {\r\n\t\t\tthis.config.readonly_active = true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.config.readonly_active = false;\r\n\t\t\tscheduler.config.buttons_left = original_left_buttons.slice();\r\n\t\t\tscheduler.config.buttons_right = original_right_buttons.slice();\r\n\t\r\n\t\t\t// initial value\r\n\t\t\tif(scheduler.form_blocks.recurring) {\r\n\t\t\t\tscheduler.form_blocks.recurring.set_value = originalRecurringSetValue;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar sns = this.config.lightbox.sections;\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\tfor (var i = 0; i < sns.length; i++) {\r\n\t\t\t\tif (sns[i].type == 'recurring') {\r\n\t\t\t\t\tif (this.config.readonly_active && scheduler.form_blocks.recurring) {\r\n\t\t\t\t\t\tscheduler.form_blocks.recurring.set_value = function(node, value, ev) {\r\n\t\t\t\t\t\t\tvar wrapper = scheduler.$domHelpers.closest(node, \".dhx_wrap_section\");\r\n\t\t\t\t\t\t\tvar style = \"none\";\r\n\t\t\t\t\t\t\twrapper.querySelector('.dhx_cal_lsection').display = style;\r\n\t\t\t\t\t\t\twrapper.querySelector('.dhx_form_repeat').display = style;\r\n\t\t\t\t\t\t\twrapper.style.display = style;\r\n\r\n\t\t\t\t\t\t\tscheduler.setLightboxSize();\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar forbidden_buttons = [\"dhx_delete_btn\", \"dhx_save_btn\"];\r\n\t\t\tvar button_arrays = [scheduler.config.buttons_left, scheduler.config.buttons_right];\r\n\t\t\tfor (var i = 0; i < forbidden_buttons.length; i++) {\r\n\t\t\t\tvar forbidden_button = forbidden_buttons[i];\r\n\t\t\t\tfor (var k = 0; k < button_arrays.length; k++) {\r\n\t\t\t\t\tvar button_array = button_arrays[k];\r\n\t\t\t\t\tvar index = -1;\r\n\t\t\t\t\tfor (var p = 0; p < button_array.length; p++) {\r\n\t\t\t\t\t\tif (button_array[p] == forbidden_button) {\r\n\t\t\t\t\t\t\tindex = p;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (index != -1) {\r\n\t\t\t\t\t\tbutton_array.splice(index, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.resetLightbox();\r\n\r\n\t\treturn true;\r\n\t});\r\n\r\n\tfunction txt_replace(tag, d, n, text) {\r\n\t\tvar txts = d.getElementsByTagName(tag);\r\n\t\tvar txtt = n.getElementsByTagName(tag);\r\n\t\tfor (var i = txtt.length - 1; i >= 0; i--) {\r\n\t\t\tvar n = txtt[i];\r\n\t\t\tif (!text){\r\n\t\t\t\tn.disabled = true;\r\n\t\t\t\t//radio and checkboxes loses state after .cloneNode in IE\r\n\t\t\t\tif(d.checked)\r\n\t\t\t\t\tn.checked = true;\r\n\t\t\t}else {\r\n\t\t\t\tvar t = document.createElement(\"span\");\r\n\t\t\t\tt.className = \"dhx_text_disabled\";\r\n\t\t\t\tt.innerHTML = text(txts[i]);\r\n\t\t\t\tn.parentNode.insertBefore(t, n);\r\n\t\t\t\tn.parentNode.removeChild(n);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tvar old = scheduler._fill_lightbox;\r\n\tscheduler._fill_lightbox = function() {\r\n\r\n\t\tvar lb = this.getLightbox();\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\tlb.style.visibility = 'hidden';\r\n\t\t\t// lightbox should have actual sizes before rendering controls\r\n\t\t\t// currently only matters for dhtmlxCombo\r\n\t\t\tlb.style.display = 'block';\r\n\t\t}\r\n\t\tvar res = old.apply(this, arguments);\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\t//reset visibility and display\r\n\t\t\tlb.style.visibility = '';\r\n\t\t\tlb.style.display = 'none';\r\n\t\t}\r\n\r\n\t\tif (this.config.readonly_active) {\r\n\r\n\t\t\tvar originalForm = this.getLightbox();\r\n\t\t\tvar readonlyForm = this._lightbox_r = originalForm.cloneNode(true);\r\n\t\t\treadonlyForm.id = scheduler.uid();\r\n\t\t\treadonlyForm.className += \" dhx_cal_light_readonly\";\r\n\t\t\ttxt_replace(\"textarea\", originalForm, readonlyForm, function(a) {\r\n\t\t\t\treturn a.value;\r\n\t\t\t});\r\n\t\t\ttxt_replace(\"input\", originalForm, readonlyForm, false);\r\n\t\t\ttxt_replace(\"select\", originalForm, readonlyForm, function(a) {\r\n\t\t\t\tif(!a.options.length) return \"\";\r\n\t\t\t\treturn a.options[Math.max((a.selectedIndex || 0), 0)].text;\r\n\t\t\t});\r\n\r\n\t\t\toriginalForm.parentNode.insertBefore(readonlyForm, originalForm);\r\n\r\n\t\t\tthis.showCover(readonlyForm);\r\n\t\t\tif (scheduler._lightbox)\r\n\t\t\t\tscheduler._lightbox.parentNode.removeChild(scheduler._lightbox);\r\n\t\t\tthis._lightbox = readonlyForm;\r\n\r\n\t\t\tif (scheduler.config.drag_lightbox)\r\n\t\t\t\tscheduler.event(readonlyForm.firstChild, \"mousedown\", scheduler._ready_to_dnd);\r\n\t\t\t\t\r\n\t\t\tscheduler._init_lightbox_events();\r\n\t\t\tthis.setLightboxSize();\r\n\t\t}\r\n\t\treturn res;\r\n\t};\r\n\r\n\tvar hold = scheduler.hide_lightbox;\r\n\tscheduler.hide_lightbox = function() {\r\n\t\tif (this._lightbox_r) {\r\n\t\t\tthis._lightbox_r.parentNode.removeChild(this._lightbox_r);\r\n\t\t\tthis._lightbox_r = this._lightbox = null;\r\n\t\t}\r\n\r\n\t\treturn hold.apply(this, arguments);\r\n\t};\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.occurrence_timestamp_in_utc = false;\r\nscheduler.config.recurring_workdays = [1,2,3,4,5];\r\nscheduler.form_blocks[\"recurring\"] = {\r\n\t_get_node : function(node){\r\n\t\tif (typeof node == \"string\"){\r\n\t\t\tlet element = scheduler._lightbox.querySelector(`#${node}`);\r\n\t\t\tif(!element){\r\n\t\t\t\t// form is detached from lightbox \r\n\t\t\t\t// search globally, won't work in LWC\r\n\t\t\t\telement = document.getElementById(node);\r\n\t\t\t}\r\n\t\t\tnode = element;\r\n\t\t}\r\n\t\tif (node.style.display == 'none')\r\n\t\t\tnode.style.display = \"\";\r\n\t\treturn node;\r\n\t},\r\n\t_outer_html: function(node){\r\n\t\treturn node.outerHTML || getOuterHTML(node);\r\n\r\n\t\t//probably not needed, FF v10- only\r\n\t\tfunction getOuterHTML(n){\r\n\t\t\tvar div = document.createElement('div'), h;\r\n\t\t\tdiv.appendChild( n.cloneNode(true) );\r\n\t\t\th = div.innerHTML;\r\n\t\t\tdiv = null;\r\n\t\t\treturn h;\r\n\t\t}\r\n\t},\r\n\trender:function(sns) {\r\n\t\tif(sns.form){\r\n\t\t\tvar rec = scheduler.form_blocks[\"recurring\"];\r\n\t\t\tvar form = rec._get_node(sns.form);\r\n\t\t\tvar html = rec._outer_html(form);\r\n\t\t\tform.style.display = 'none';\r\n\t\t\treturn html;\r\n\t\t}\r\n\t\tvar loc = scheduler.locale.labels;\r\n\t\treturn '
'+\r\n\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t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\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t''+loc.repeat_text_occurences_count+'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t'
'+\r\n\t\t\t\t'
'+\r\n\t\t\t\t'';\r\n\t},\r\n\t_ds: {},\r\n\t_get_form_node: function(els, name, value){\r\n\t\tvar col = els[name];\r\n\t\tif(!col) return null;\r\n\t\tif(col.nodeName) return col;\r\n\r\n\t\tif(col.length){\r\n\t\t\tfor(var i=0; i < col.length; i++){\r\n\t\t\t\tif(col[i].value == value)\r\n\t\t\t\t\treturn col[i];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\t_get_node_value: function(els, name, multiselect){\r\n\t\tvar col = els[name];\r\n\t\tif(!col) return \"\";\r\n\t\tif(col.length){\r\n\t\t\tif(multiselect){\r\n\t\t\t\tvar res = [];\r\n\t\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\t\tif (col[i].checked) res.push(col[i].value);\r\n\r\n\t\t\t\treturn res;\r\n\t\t\t}else{\r\n\t\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\t\tif (col[i].checked) return col[i].value;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(col.value)\r\n\t\t\treturn !multiselect ? col.value : [col.value];\r\n\t},\r\n\r\n\t_get_node_numeric_value: function(els, name){\r\n\t\tvar value = scheduler.form_blocks[\"recurring\"]._get_node_value(els, name);\r\n\t\treturn ((value * 1) || 0);\r\n\t},\r\n\r\n\t_set_node_value: function(els, name, value){\r\n\t\tvar col = els[name];\r\n\t\tif(!col) return;\r\n\r\n\t\tif(col.name == name){\r\n\t\t\tcol.value = value;\r\n\t\t}else if(col.length){\r\n\t\t\tvar hash_value = typeof value == \"object\";\r\n\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\tif (hash_value || col[i].value == value){\r\n\t\t\t\t\tcol[i].checked = hash_value ? !!value[col[i].value] : !!value;\r\n\t\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t_init_set_value:function(node, value, ev) {\r\n\t\tvar block = scheduler.form_blocks[\"recurring\"];\r\n\t\tvar get_value = block._get_node_value;\r\n\t\tvar set_value = block._set_node_value;\r\n\t\tscheduler.form_blocks[\"recurring\"]._ds = {start:ev.start_date, end:ev._end_date};\r\n\r\n\t\tvar str_date_format = scheduler.date.str_to_date(scheduler.config.repeat_date, false, true);\r\n\t\tvar str_date = function(str_date) {\r\n\t\t\tvar date = str_date_format(str_date);\r\n\t\t\tif (scheduler.config.include_end_by)\r\n\t\t\t\tdate = scheduler.date.add(date, 1, 'day');\r\n\t\t\treturn date;\r\n\t\t};\r\n\r\n\t\tvar date_str = scheduler.date.date_to_str(scheduler.config.repeat_date);\r\n\r\n\t\tvar top = node.getElementsByTagName(\"FORM\")[0];\r\n\t\tvar els = {};\r\n\r\n\t\tfunction register_els(inps) {\r\n\t\t\tfor (var i = 0; i < inps.length; i++) {\r\n\t\t\t\tvar inp = inps[i];\r\n\r\n\t\t\t\tif(inp.name){\r\n\t\t\t\t\tif(!els[inp.name]){\r\n\t\t\t\t\t\tels[inp.name] = inp;\r\n\t\t\t\t\t}else if(els[inp.name].nodeType){\r\n\t\t\t\t\t\tvar node = els[inp.name];\r\n\t\t\t\t\t\tels[inp.name] = [node, inp];\r\n\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tels[inp.name].push(inp);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tregister_els(top.getElementsByTagName(\"INPUT\"));\r\n\t\tregister_els(top.getElementsByTagName(\"SELECT\"));\r\n\r\n\t\tif (!scheduler.config.repeat_date_of_end) {\r\n\t\t\tvar formatter = scheduler.date.date_to_str(scheduler.config.repeat_date);\r\n\t\t\tscheduler.config.repeat_date_of_end = formatter(scheduler.date.add(scheduler._currentDate(), 30, \"day\"));\r\n\t\t}\r\n\t\tset_value(els, \"date_of_end\", scheduler.config.repeat_date_of_end);\r\n\r\n\t\tvar $ = function(a) {\r\n\t\t\treturn scheduler._lightbox.querySelector(`#${a}`) || { style:{} };//return fake object if node not found\r\n\t\t};\r\n\r\n\t\tfunction change_current_view() {\r\n\t\t\t$(\"dhx_repeat_day\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_week\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_month\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_year\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_\" + this.value).style.display = \"\";\r\n\t\t\tscheduler.setLightboxSize();\r\n\t\t}\r\n\r\n\t\tfunction get_repeat_code(dates) {\r\n\t\t\tvar code = [get_value(els, \"repeat\")];\r\n\t\t\tget_rcode[code[0]](code, dates);\r\n\r\n\t\t\twhile (code.length < 5) code.push(\"\");\r\n\t\t\tvar repeat = \"\";\r\n\r\n\t\t\tvar end = get_end_rule(els);\r\n\r\n\t\t\tif (end == \"no\") {\r\n\t\t\t\tdates.end = new Date(9999, 1, 1);\r\n\t\t\t\trepeat = \"no\";\r\n\t\t\t}\r\n\t\t\telse if (end == \"date_of_end\") {\r\n\t\t\t\tdates.end = str_date(get_value(els, \"date_of_end\"));\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tscheduler.transpose_type(code.join(\"_\"));\r\n\t\t\t\trepeat = Math.max(1, get_value(els, \"occurences_count\"));\r\n\r\n\t\t\t\tvar transp = 0;\r\n\r\n\t\t\t\t//var transp = ((code[0] == \"week\" && code[4] && code[4].toString().indexOf(scheduler.config.start_on_monday ? 1 : 0) == -1) ? 1 : 0);\r\n\r\n\t\t\t\t// which is equal to following code, seems to produce extra instance, not clear why needed\r\n\r\n\t\t\t\t/*if(code[0] == \"week\"){\r\n\t\t\t\t\tvar days = code[4] || \"\";\r\n\t\t\t\t\tif(scheduler.config.start_on_monday){\r\n\t\t\t\t\t\tif(days.indexOf(1) == -1)\r\n\t\t\t\t\t\ttransp = 1;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(days.indexOf(0) == -1)\r\n\t\t\t\t\t\ttransp = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}*/\r\n\r\n\t\t\t//\tdates.end = scheduler.date.add(new Date(dates.start), repeat + transp, code.join(\"_\"));\r\n\r\n\t\t\t\tdates.end = scheduler.date[\"add_\" + code.join(\"_\")](new Date(dates.start), repeat + transp, {start_date: dates.start}) || dates.start;\r\n\t\t\t}\r\n\r\n\t\t\treturn code.join(\"_\") + \"#\" + repeat;\r\n\t\t}\r\n\t\tfunction get_end_rule(els){\r\n\t\t\tvar end = els[\"end\"];\r\n\t\t\tif(end.length){\r\n\t\t\t\tfor(var i =0; i < end.length; i++){\r\n\t\t\t\t\tif(end[i].checked){\r\n\t\t\t\t\t\tif(end[i].value && end[i].value != \"on\"){//seems to be default value:var input = document.createElement(\"input\"); input.type = \"radio\"; input.value\r\n\t\t\t\t\t\t\treturn end[i].value;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tif(!i){\r\n\t\t\t\t\t\t\t\treturn \"no\";\r\n\t\t\t\t\t\t\t}else if(i == 2){\r\n\t\t\t\t\t\t\t\treturn \"date_of_end\";\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\treturn \"occurences_count\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(end.value)\r\n\t\t\t\t\treturn end.value;\r\n\t\t\t}\r\n\t\t\treturn \"no\";\r\n\t\t}\r\n\t\tfunction set_end_rule(els, value){\r\n\t\t\tvar end = els[\"end\"];\r\n\r\n\t\t\tif(end.length){\r\n\t\t\t\tvar has_values = !!end[0].value && end[0].value != \"on\";\r\n\t\t\t\tif(has_values){\r\n\t\t\t\t\tfor(var i =0; i < end.length; i++){\r\n\t\t\t\t\t\tif(end[i].value == value)\r\n\t\t\t\t\t\t\tend[i].checked = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar ind = 0;\r\n\t\t\t\t\tswitch(value){\r\n\t\t\t\t\t\tcase \"no\":\r\n\t\t\t\t\t\t\tind = 0;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"date_of_end\":\r\n\t\t\t\t\t\t\tind = 2;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tind = 1;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend[ind].checked = true;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tend.value = value;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tscheduler.form_blocks[\"recurring\"]._get_repeat_code = get_repeat_code;\r\n\t\tvar get_rcode = {\r\n\t\t\tmonth:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tif (get_value(els, \"month_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_count\")));\r\n\t\t\t\t\tdates.start.setDate(get_value(els, \"month_day\"));\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_count2\")));\r\n\t\t\t\t\tcode.push( get_value(els, \"month_day2\"));\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_week2\")));\r\n\t\t\t\t\tif (!scheduler.config.repeat_precise){\r\n\t\t\t\t\t\tdates.start.setDate(1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tdates._start = true;\r\n\t\t\t},\r\n\t\t\tweek:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"week_count\")));\r\n\t\t\t\tcode.push(\"\");\r\n\t\t\t\tcode.push(\"\");\r\n\t\t\t\tvar t = [];\r\n\r\n\t\t\t\tvar col = get_value(els, \"week_day\", true);\r\n\t\t\t\t//var col = els[\"week_day\"];\r\n\t\t\t\tvar day = dates.start.getDay();\r\n\t\t\t\tvar start_exists = false;\r\n\r\n\t\t\t\tfor (var i = 0; i < col.length; i++){\r\n\t\t\t\t\tt.push(col[i]);\r\n\t\t\t\t\tstart_exists = start_exists || col[i] == day;\r\n\t\t\t\t}\r\n\t\t\t\tif (!t.length){\r\n\t\t\t\t\tt.push(day);\r\n\t\t\t\t\tstart_exists = true;\r\n\t\t\t\t}\r\n\t\t\t\tt.sort();\r\n\r\n\r\n\t\t\t\tif (!scheduler.config.repeat_precise){\r\n\t\t\t\t\tdates.start = scheduler.date.week_start(dates.start);\r\n\t\t\t\t\tdates._start = true;\r\n\t\t\t\t} else if (!start_exists){\r\n\t\t\t\t\tscheduler.transpose_day_week(dates.start, t, 1, 7);\r\n\t\t\t\t\tdates._start = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcode.push(t.join(\",\"));\r\n\t\t\t},\r\n\t\t\tday:function(code) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tif (get_value(els, \"day_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"day_count\")));\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcode.push(\"week\");\r\n\t\t\t\t\tcode.push(1);\r\n\t\t\t\t\tcode.push(\"\");\r\n\t\t\t\t\tcode.push(\"\");\r\n\t\t\t\t\tcode.push(scheduler.config.recurring_workdays.join(\",\"));\r\n\t\t\t\t\tcode.splice(0, 1);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tyear:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\r\n\t\t\t\tif (get_value(els, \"year_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(\"1\");\r\n\t\t\t\t\tdates.start.setMonth(0);\r\n\t\t\t\t\tdates.start.setDate(get_value(els, \"year_day\"));\r\n\t\t\t\t\tdates.start.setMonth(get_value(els, \"year_month\"));\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcode.push(\"1\");\r\n\t\t\t\t\tcode.push(get_value(els, \"year_day2\"));\r\n\t\t\t\t\tcode.push(get_value(els, \"year_week2\"));\r\n\t\t\t\t\tdates.start.setDate(1);\r\n\t\t\t\t\tdates.start.setMonth(get_value(els, \"year_month2\"));\r\n\t\t\t\t}\r\n\t\t\t\tdates._start = true;\r\n\t\t\t}\r\n\t\t};\r\n\t\tvar set_rcode = {\r\n\t\t\tweek:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\t\tset_value(els, \"week_count\", code[1]);\r\n\r\n\t\t\t\tvar t = code[4].split(\",\");\r\n\t\t\t\tvar d = {};\r\n\t\t\t\tfor (var i = 0; i < t.length; i++) d[t[i]] = true;\r\n\r\n\t\t\t\tset_value(els, \"week_day\", d);\r\n\r\n\t\t\t\t//for (var i = 0; i < col.length; i++)\r\n\t\t\t\t//\tcol[i].checked = (!!d[col[i].value]);\r\n\t\t\t},\r\n\t\t\tmonth:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\r\n\t\t\t\tif (code[2] === \"\") {\r\n\t\t\t\t\tset_value(els, \"month_type\", \"d\");\r\n\t\t\t\t\tset_value(els, \"month_count\", code[1]);\r\n\t\t\t\t\tset_value(els, \"month_day\", dates.start.getDate());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tset_value(els, \"month_type\", \"w\");\r\n\t\t\t\t\tset_value(els, \"month_count2\", code[1]);\r\n\t\t\t\t\tset_value(els, \"month_week2\", code[3]);\r\n\t\t\t\t\tset_value(els, \"month_day2\", code[2]);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tday:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\t\tset_value(els, \"day_type\", \"d\");\r\n\t\t\t\tset_value(els, \"day_count\", code[1]);\r\n\t\t\t},\r\n\t\t\tyear:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\r\n\t\t\t\tif (code[2] === \"\") {\r\n\t\t\t\t\tset_value(els, \"year_type\", \"d\");\r\n\t\t\t\t\tset_value(els, \"year_day\", dates.start.getDate());\r\n\t\t\t\t\tset_value(els, \"year_month\", dates.start.getMonth());\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tset_value(els, \"year_type\", \"w\");\r\n\t\t\t\t\tset_value(els, \"year_week2\", code[3]);\r\n\t\t\t\t\tset_value(els, \"year_day2\", code[2]);\r\n\t\t\t\t\tset_value(els, \"year_month2\", dates.start.getMonth());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfunction set_repeat_code(code, dates) {\r\n\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\tvar data = code.split(\"#\");\r\n\t\t\tcode = data[0].split(\"_\");\r\n\t\t\tset_rcode[code[0]](code, dates);\r\n\r\n\t\t\tswitch (data[1]) {\r\n\t\t\t\tcase \"no\":\r\n\t\t\t\t\tset_end_rule(els, \"no\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"\":\r\n\t\t\t\t\tset_end_rule(els, \"date_of_end\");\r\n\r\n\t\t\t\t\tvar end_date = dates.end;\r\n\t\t\t\t\tif (scheduler.config.include_end_by){\r\n\t\t\t\t\t\tend_date = scheduler.date.add(end_date, -1, 'day');\r\n\t\t\t\t\t}\r\n\t\t\t\t\tset_value(els, \"date_of_end\", date_str(end_date));\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tset_end_rule(els, \"occurences_count\");\r\n\t\t\t\t\tset_value(els, \"occurences_count\", data[1]);\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tset_value(els, \"repeat\", code[0]);\r\n\t\t\t//e.checked = true;\r\n\r\n\t\t\tvar node = scheduler.form_blocks[\"recurring\"]._get_form_node(els, \"repeat\", code[0]);\r\n\t\t\tif(node.nodeName == \"SELECT\"/* && node.onchange*/){\r\n\t\t\t//\tnode.onchange();\r\n\t\t\t\tnode.dispatchEvent(new Event('change'));\r\n\t\t\t\tnode.dispatchEvent(new MouseEvent('click'));\r\n\t\t\t}else{\r\n\t\t\t\tnode.dispatchEvent(new MouseEvent('click'));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tscheduler.form_blocks[\"recurring\"]._set_repeat_code = set_repeat_code;\r\n\r\n\t\tfor (var i = 0; i < top.elements.length; i++) {\r\n\t\t\tvar el = top.elements[i];\r\n\t\t\tswitch (el.name) {\r\n\t\t\t\tcase \"repeat\":\r\n\t\t\t\t\tif (el.nodeName == \"SELECT\" && !el.$_eventAttached) {\r\n\t\t\t\t\t\tel.$_eventAttached = true;\r\n\t\t\t\t\t\tel.addEventListener(\"change\", change_current_view);\r\n\t\t\t\t\t} else if(!el.$_eventAttached){\r\n\t\t\t\t\t\tel.$_eventAttached = true;\r\n\t\t\t\t\t\tel.addEventListener(\"click\", change_current_view);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tscheduler._lightbox._rec_init_done = true;\r\n\t},\r\n\tset_value:function(node, value, ev) {\r\n\t\tvar rf = scheduler.form_blocks[\"recurring\"];\r\n\t\tif (!scheduler._lightbox._rec_init_done)\r\n\t\t\trf._init_set_value(node, value, ev);\r\n\t\tnode.open = !ev.rec_type;\r\n\r\n\t\tnode.blocked = this._is_modified_occurence(ev);\r\n\r\n\t\tvar ds = rf._ds;\r\n\t\tds.start = ev.start_date;\r\n\t\tds.end = ev._end_date;\r\n\r\n\t\trf._toggle_block();\r\n\r\n\t\tif (value)\r\n\t\t\trf._set_repeat_code(value, ds);\r\n\t},\r\n\tget_value:function(node, ev) {\r\n\t\tif (node.open) {\r\n\t\t\tvar ds = scheduler.form_blocks[\"recurring\"]._ds;\r\n\t\t\tvar actual_dates = {};\r\n\r\n\t\t\tvar timeControl = getTimeSection();\r\n\r\n\t\t\ttimeControl.getValue(actual_dates);\r\n\t\t\tds.start = actual_dates.start_date;\r\n\t\t\tev.rec_type = scheduler.form_blocks[\"recurring\"]._get_repeat_code(ds);\r\n\t\t\tif (ds._start) {\r\n\t\t\t\tev.start_date = new Date(ds.start);\r\n\t\t\t\tev._start_date = new Date(ds.start);\r\n\t\t\t\tds._start = false;\r\n\t\t\t} else\r\n\t\t\t\tev._start_date = null;\r\n\r\n\t\t\tev._end_date = ds.end;\r\n\t\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\t\t} else {\r\n\t\t\tev.rec_type = ev.rec_pattern = \"\";\r\n\t\t\tev._end_date = ev.end_date;\r\n\t\t}\r\n\t\treturn ev.rec_type;\r\n\t},\r\n\t_get_button: function(){\r\n\t\tvar node = getRecurringSection().header;\r\n\t\treturn node.firstChild.firstChild;\r\n\t},\r\n\t_get_form: function(){\r\n\t\treturn getRecurringSection().node;\r\n\t},\r\n\topen:function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form();\r\n\t\tif(!cont.open)\r\n\t\t\tblock._toggle_block();\r\n\t},\r\n\tclose: function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form();\r\n\r\n\t\tif(cont.open)\r\n\t\t\tblock._toggle_block();\r\n\t},\r\n\t_toggle_block: function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form(),\r\n\t\t\tel = block._get_button();\r\n\t\tif (!cont.open && !cont.blocked) {\r\n\t\t\tcont.style.height = \"auto\";//reset to default value\r\n\t\t\tif(el){\r\n\t\t\t\tel.style.backgroundPosition = \"-5px 0px\";\r\n\t\t\t\tel.nextSibling.innerHTML = scheduler.locale.labels.button_recurring_open;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tcont.style.height = \"0px\";\r\n\t\t\tif(el){\r\n\t\t\t\tel.style.backgroundPosition = \"-5px 20px\";\r\n\t\t\t\tel.nextSibling.innerHTML = scheduler.locale.labels.button_recurring;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcont.open = !cont.open;\r\n\r\n\t\tscheduler.setLightboxSize();\r\n\t},\r\n\tfocus:function(node) {\r\n\t},\r\n\tbutton_click:function(node, button, event) {\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\t\tvar cont = block._get_form();\r\n\t\tif (!cont.blocked)\r\n\t\t\tscheduler.form_blocks.recurring._toggle_block();\r\n\t}\r\n};\r\n\r\nfunction getTimeSection(){\r\n\tvar timeControl = scheduler.formSection('time');\r\n\tif(!timeControl){\r\n\t\ttimeControl = getFirstSectionOfType('time');\r\n\t}\r\n\tif(!timeControl){\r\n\t\ttimeControl = getFirstSectionOfType('calendar_time');\r\n\t}\r\n\r\n\t\r\n\tif (!timeControl) {\r\n\t\tthrow new Error([\"Can't calculate the recurring rule, the Recurring form block can't find the Time control. Make sure you have the time control in 'scheduler.config.lightbox.sections' config.\",\r\n\"You can use either the default time control https://docs.dhtmlx.com/scheduler/time.html, or the datepicker https://docs.dhtmlx.com/scheduler/minicalendar.html, or a custom control. \",\r\n\"In the latter case, make sure the control is named \\\"time\\\":\",\r\n\"\",\r\n\"scheduler.config.lightbox.sections = [\",\r\n\"{name:\\\"time\\\", height:72, type:\\\"YOU CONTROL\\\", map_to:\\\"auto\\\" }];\"]\r\n.join(\"\\n\"));\r\n\t}\r\n\r\n\treturn timeControl;\r\n}\r\n\r\nfunction getRecurringSection(){\r\n\tvar recurringSection = scheduler.formSection('recurring');\r\n\tif(!recurringSection){\r\n\t\trecurringSection = getFirstSectionOfType('recurring');\r\n\t}\r\n\r\n\tif (!recurringSection) {\r\n\t\tthrow new Error([\"Can't locate the Recurring form section.\",\r\n\t\t\"Make sure that you have the recurring control on the lightbox configuration https://docs.dhtmlx.com/scheduler/recurring_events.html#recurringlightbox \",\r\n\t\t\"and that the recurring control has name \\\"recurring\\\":\",\r\n\"\",\r\n\"scheduler.config.lightbox.sections = [\",\r\n\"\t{name:\\\"recurring\\\", ... }\",\r\n\"];\"].join(\"\\n\"));\r\n\r\n\t}\r\n\r\n\treturn recurringSection;\r\n}\r\n\r\nfunction getFirstSectionOfType(type){\r\n\tfor(var i = 0; i < scheduler.config.lightbox.sections.length; i++){\r\n\t\tvar section = scheduler.config.lightbox.sections[i];\r\n\t\tif(section.type === type){\r\n\t\t\treturn scheduler.formSection(section.name);\r\n\t\t}\r\n\t}\r\n\treturn null;\r\n}\r\n\r\n//problem may occur if we will have two repeating events in the same moment of time\r\nscheduler._rec_markers = {};\r\nscheduler._rec_markers_pull = {};\r\nscheduler._add_rec_marker = function(ev, time) {\r\n\tev._pid_time = time;\r\n\tthis._rec_markers[ev.id] = ev;\r\n\tif (!this._rec_markers_pull[ev.event_pid]) this._rec_markers_pull[ev.event_pid] = {};\r\n\tthis._rec_markers_pull[ev.event_pid][time] = ev;\r\n};\r\nscheduler._get_rec_marker = function(time, id) {\r\n\tvar ch = this._rec_markers_pull[id];\r\n\tif (ch) return ch[time];\r\n\treturn null;\r\n};\r\nscheduler._get_rec_markers = function(id) {\r\n\treturn (this._rec_markers_pull[id] || []);\r\n};\r\n\r\nfunction clearMilliseconds(date){\r\n//\treturn date;\r\n\treturn new Date(\r\n\t\tdate.getFullYear(), \r\n\t\tdate.getMonth(), \r\n\t\tdate.getDate(), \r\n\t\tdate.getHours(), \r\n\t\tdate.getMinutes(),\r\n\t\tdate.getSeconds(),\r\n\t\t0\r\n\t);\r\n}\r\n\r\nscheduler._rec_temp = [];\r\n(function() {\r\n\tvar old_add_event = scheduler.addEvent;\r\n\tscheduler.addEvent = function(start_date, end_date, text, id, extra_data) {\r\n\t\tvar ev_id = old_add_event.apply(this, arguments);\r\n\r\n\t\tif (ev_id && scheduler.getEvent(ev_id)) {\r\n\t\t\tvar ev = scheduler.getEvent(ev_id);\r\n\t\t\t\r\n\t\t\tif(ev.start_date){\r\n\t\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t\t}\r\n\t\t\tif(ev.end_date){\r\n\t\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t\t}\r\n\t\t\tif (this._is_modified_occurence(ev))\r\n\t\t\t\tscheduler._add_rec_marker(ev, ev.event_length * 1000);\r\n\t\t\tif (ev.rec_type)\r\n\t\t\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\t\t}\r\n\t\treturn ev_id;\r\n\t};\r\n})();\r\n\r\nscheduler.attachEvent(\"onEventIdChange\", function(id, new_id) {\r\n\tif (this._ignore_call) return;\r\n\tthis._ignore_call = true;\r\n\r\n\tif(scheduler._rec_markers[id]){\r\n\t\t//important for for correct work of scheduler.getEvents(from, to) and collision detection\r\n\t\tscheduler._rec_markers[new_id] = scheduler._rec_markers[id];\r\n\t\tdelete scheduler._rec_markers[id];\r\n\t}\r\n\r\n\tif(scheduler._rec_markers_pull[id]){\r\n\t\tscheduler._rec_markers_pull[new_id] = scheduler._rec_markers_pull[id];\r\n\t\tdelete scheduler._rec_markers_pull[id];\r\n\t}\r\n\r\n\tfor (var i = 0; i < this._rec_temp.length; i++) {\r\n\t\tvar tev = this._rec_temp[i];\r\n\t\tif (tev.event_pid == id) {\r\n\t\t\ttev.event_pid = new_id;\r\n\t\t\tthis.changeEventId(tev.id, new_id + \"#\" + tev.id.split(\"#\")[1]);\r\n\t\t}\r\n\t}\r\n\r\n\tfor(var i in this._rec_markers){\r\n\t\tvar tev = this._rec_markers[i];\r\n\t\tif(tev.event_pid == id){\r\n\t\t\ttev.event_pid = new_id;\r\n\t\t\ttev._pid_changed = true;\r\n\t\t}\r\n\t}\r\n\r\n\tvar el = scheduler._rec_markers[new_id];\r\n\tif(el && el._pid_changed) {\r\n\t\tdelete el._pid_changed;\r\n\t\tsetTimeout(function() {\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler.callEvent(\"onEventChanged\", [new_id, scheduler.getEvent(new_id)]);\r\n\t\t}, 1);\r\n\t}\r\n\r\n\tdelete this._ignore_call;\r\n});\r\nscheduler.attachEvent(\"onConfirmedBeforeEventDelete\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (this._is_virtual_event(id) || (this._is_modified_occurence(ev) && ev.rec_type && ev.rec_type != 'none')) {\r\n\t\tid = id.split(\"#\");\r\n\t\tvar nid = this.uid();\r\n\t\tvar tid = (id[1]) ? id[1] : Math.round(ev._pid_time / 1000);\r\n\r\n\t\tvar nev = this._copy_event(ev);\r\n\t\tnev.id = nid;\r\n\t\tnev.event_pid = ev.event_pid || id[0];\r\n\t\tvar timestamp = tid;\r\n\t\tnev.event_length = timestamp;\r\n\t\tnev.rec_type = nev.rec_pattern = \"none\";\r\n\t\tthis.addEvent(nev);\r\n\r\n\t\tthis._add_rec_marker(nev, timestamp * 1000);\r\n\t} else {\r\n\t\tif (ev.rec_type && this._lightbox_id)\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\tvar sub = this._get_rec_markers(id);\r\n\t\tfor (var i in sub) {\r\n\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\tid = sub[i].id;\r\n\t\t\t\tif (this.getEvent(id))\r\n\t\t\t\t\tthis.deleteEvent(id, true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventDeleted\", function(id, ev){\r\n\tif(!this._is_virtual_event(id) && this._is_modified_occurence(ev)){\r\n\t\tif(!scheduler._events[id]){\r\n\t\t\tev.rec_type = ev.rec_pattern = \"none\";\r\n\t\t\tthis.setEvent(id, ev);\r\n\t\t}\r\n\t}\r\n});\r\nscheduler.attachEvent(\"onEventChanged\", function(id, event) {\r\n\tif (this._loading) return true;\r\n\r\n\tvar ev = this.getEvent(id);\r\n\r\n\tif (this._is_virtual_event(id)) {\r\n\t\tvar id = id.split(\"#\");\r\n\t\tvar nid = this.uid();\r\n\t\tthis._not_render = true;\r\n\r\n\t\tvar nev = this._copy_event(event);\r\n\t\tnev.id = nid;\r\n\t\tnev.event_pid = id[0];\r\n\t\tvar timestamp = id[1];\r\n\t\tnev.event_length = timestamp;\r\n\t\tnev.rec_type = nev.rec_pattern = \"\";\r\n\r\n\t\tthis._add_rec_marker(nev, timestamp * 1000);\r\n\t\tthis.addEvent(nev);\r\n\r\n\t\tthis._not_render = false;\r\n\r\n\t} else {\r\n\t\tif(ev.start_date){\r\n\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t}\r\n\t\tif(ev.end_date){\r\n\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t}\r\n\r\n\t\tif (ev.rec_type && this._lightbox_id){\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\t}\r\n\t\tvar sub = this._get_rec_markers(id);\r\n\t\tfor (var i in sub) {\r\n\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\tdelete this._rec_markers[sub[i].id];\r\n\t\t\t\tthis.deleteEvent(sub[i].id, true);\r\n\t\t\t}\r\n\t\t}\r\n\t\tdelete this._rec_markers_pull[id];\r\n\r\n\t\t// it's possible that after editing event is no longer exists, in such case we need to remove _select_id flag\r\n\t\tvar isEventFound = false;\r\n\t\tfor (var k = 0; k < this._rendered.length; k++) {\r\n\t\t\tif (this._rendered[k].getAttribute(this.config.event_attribute) == id)\r\n\t\t\t\tisEventFound = true;\r\n\t\t}\r\n\t\tif (!isEventFound)\r\n\t\t\tthis._select_id = null;\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventAdded\", function(id) {\r\n\tif (!this._loading) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (ev.rec_type && !ev.event_length){\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventSave\", function(id, data, is_new_event) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (!ev.rec_type && data.rec_type && !this._is_virtual_event(id))\r\n\t\tthis._select_id = null;\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventCreated\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (!ev.rec_type)\r\n\t\tev.rec_type = ev.rec_pattern = ev.event_length = ev.event_pid = \"\";\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventCancel\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (ev.rec_type) {\r\n\t\tthis._roll_back_dates(ev);\r\n\t\t// a bit expensive, but we need to be sure that event re-rendered, because view can be corrupted by resize , during edit process\r\n\t\tthis.render_view_data();\r\n\t}\r\n});\r\nscheduler._roll_back_dates = function(ev) {\r\n\tif(ev.start_date){\r\n\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t}\r\n\tif(ev.end_date){\r\n\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t}\r\n\tev.event_length = Math.round((ev.end_date.valueOf() - ev.start_date.valueOf()) / 1000);\r\n\tev.end_date = ev._end_date;\r\n\tif (ev._start_date) {\r\n\t\tev.start_date.setMonth(0);\r\n\t\tev.start_date.setDate(ev._start_date.getDate());\r\n\t\tev.start_date.setMonth(ev._start_date.getMonth());\r\n\t\tev.start_date.setFullYear(ev._start_date.getFullYear());\r\n\r\n\t}\r\n};\r\n\r\nscheduler._is_virtual_event = function(id){\r\n\treturn id.toString().indexOf(\"#\") != -1;\r\n};\r\nscheduler._is_modified_occurence = function(ev){\r\n\treturn (ev.event_pid && ev.event_pid != \"0\");\r\n};\r\n\r\nscheduler.showLightbox_rec = scheduler.showLightbox;\r\nscheduler.showLightbox = function(id) {\r\n\tvar locale = this.locale;\r\n\tvar c = scheduler.config.lightbox_recurring;\r\n\tvar ev = this.getEvent(id);\r\n\tvar pid = ev.event_pid;\r\n\tvar isVirtual = this._is_virtual_event(id);\r\n\tif (isVirtual)\r\n\t\tpid = id.split(\"#\")[0];\r\n\r\n\t// show series\r\n\tvar showSeries = function(id) {\r\n\t\tvar event = scheduler.getEvent(id);\r\n\t\tevent._end_date = event.end_date;\r\n\t\tevent.end_date = new Date(event.start_date.valueOf() + event.event_length * 1000);\r\n\t\treturn scheduler.showLightbox_rec(id); // editing series\r\n\t};\r\n\r\n\tif ( (pid || pid*1 === 0) && ev.rec_type) {\r\n\t\t// direct API call on series id\r\n\t\treturn showSeries(id);\r\n\t}\r\n\tif ( !pid || pid === '0' || ( (!locale.labels.confirm_recurring || c == 'instance') || (c == 'series' && !isVirtual)) ) {\r\n\t\t// editing instance or non recurring event\r\n\t\treturn this.showLightbox_rec(id);\r\n\t}\r\n\tif (c == 'ask') {\r\n\t\tvar that = this;\r\n\t\tscheduler.modalbox({\r\n\t\t\ttext: locale.labels.confirm_recurring,\r\n\t\t\ttitle: locale.labels.title_confirm_recurring,\r\n\t\t\twidth: \"500px\",\r\n\t\t\tposition: \"middle\",\r\n\t\t\tbuttons:[locale.labels.button_edit_series, locale.labels.button_edit_occurrence, locale.labels.icon_cancel],\r\n\t\t\tcallback: function(index) {\r\n\t\t\t\tswitch(+index) {\r\n\t\t\t\t\tcase 0:\r\n\t\t\t\t\t\treturn showSeries(pid);\r\n\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\treturn that.showLightbox_rec(id);\r\n\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t} else {\r\n\t\tshowSeries(pid);\r\n\t}\r\n};\r\n\r\n\r\nscheduler.get_visible_events_rec = scheduler.get_visible_events;\r\nscheduler.get_visible_events = function(only_timed) {\r\n\tfor (var i = 0; i < this._rec_temp.length; i++)\r\n\t\tdelete this._events[this._rec_temp[i].id];\r\n\tthis._rec_temp = [];\r\n\r\n\tvar stack = this.get_visible_events_rec(only_timed);\r\n\tvar out = [];\r\n\tfor (var i = 0; i < stack.length; i++) {\r\n\t\tif (stack[i].rec_type) {\r\n\t\t\t//deleted element of series\r\n\t\t\tif (stack[i].rec_pattern != \"none\")\r\n\t\t\t\tthis.repeat_date(stack[i], out);\r\n\t\t}\r\n\t\telse out.push(stack[i]);\r\n\t}\r\n\treturn out;\r\n};\r\n\r\n\r\n(function() {\r\n\tvar old = scheduler.isOneDayEvent;\r\n\tscheduler.isOneDayEvent = function(ev) {\r\n\t\tif (ev.rec_type) return true;\r\n\t\treturn old.call(this, ev);\r\n\t};\r\n\tvar old_update_event = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id) {\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tif(ev && ev.rec_type){\r\n\t\t\t//rec_type can be changed without the lightbox,\r\n\t\t\t// make sure rec_pattern updated as well\r\n\t\t\tev.rec_pattern = (ev.rec_type || \"\").split(\"#\")[0];\r\n\t\t}\r\n\t\tif (ev && ev.rec_type && !this._is_virtual_event(id)) {\r\n\t\t\tscheduler.update_view();\r\n\t\t} else {\r\n\t\t\told_update_event.call(this, id);\r\n\t\t}\r\n\t};\r\n})();\r\n\r\nscheduler.transponse_size = {\r\n\tday:1, week:7, month:1, year:12\r\n};\r\nscheduler.date.day_week = function(sd, day, week) {\r\n\tsd.setDate(1);\r\n\tvar originalMonth = scheduler.date.month_start(new Date(sd));\r\n\tweek = (week - 1) * 7;\r\n\tvar cday = sd.getDay();\r\n\tvar nday = day * 1 + week - cday + 1;\r\n\tsd.setDate(nday <= week ? (nday + 7) : nday);\r\n\tvar newMonth = scheduler.date.month_start(new Date(sd));\r\n\tif(originalMonth.valueOf() !== newMonth.valueOf()){\r\n\t\treturn false;\r\n\t}\r\n\treturn true;\r\n};\r\nscheduler.transpose_day_week = function(sd, list, cor, size, cor2) {\r\n\tvar cday = (sd.getDay() || (scheduler.config.start_on_monday ? 7 : 0)) - cor;\r\n\tfor (var i = 0; i < list.length; i++) {\r\n\t\tif (list[i] > cday)\r\n\t\t\treturn sd.setDate(sd.getDate() + list[i] * 1 - cday - (size ? cor : cor2));\r\n\t}\r\n\tthis.transpose_day_week(sd, list, cor + size, null, cor);\r\n};\r\nscheduler.transpose_type = function(type) {\r\n\tvar transposeRecurring = \"transpose_\" + type;\r\n\tif (!this.date[transposeRecurring]) {\r\n\t\tvar recurringParts = type.split(\"_\");\r\n\t\tvar dayDurationMs = 60 * 60 * 24 * 1000;\r\n\t\tvar addRecurring = \"add_\" + type;\r\n\t\tvar recurringStepDays = this.transponse_size[recurringParts[0]] * recurringParts[1];\r\n\r\n\t\tif (recurringParts[0] == \"day\" || recurringParts[0] == \"week\") {\r\n\t\t\tvar weekDays = null;\r\n\t\t\tif (recurringParts[4]) {\r\n\t\t\t\tweekDays = recurringParts[4].split(\",\");\r\n\t\t\t\tif (scheduler.config.start_on_monday) {\r\n\t\t\t\t\tfor (var i = 0; i < weekDays.length; i++)\r\n\t\t\t\t\t\tweekDays[i] = (weekDays[i] * 1) || 7;\r\n\t\t\t\t\tweekDays.sort();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.date[transposeRecurring] = function(nd, td) {\r\n\t\t\t\tvar delta = Math.floor((td.valueOf() - nd.valueOf()) / (dayDurationMs * recurringStepDays));\r\n\t\t\t\tif (delta > 0)\r\n\t\t\t\t\tnd.setDate(nd.getDate() + delta * recurringStepDays);\r\n\t\t\t\tif (weekDays)\r\n\t\t\t\t\tscheduler.transpose_day_week(nd, weekDays, 1, recurringStepDays);\r\n\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t\tthis.date[addRecurring] = function(sd, inc) {\r\n\t\t\t\tvar nd = new Date(sd.valueOf());\r\n\t\t\t\tif (weekDays) {\r\n\t\t\t\t\tfor (var count = 0; count < inc; count++)\r\n\t\t\t\t\t\tscheduler.transpose_day_week(nd, weekDays, 0, recurringStepDays);\r\n\t\t\t\t} else\r\n\t\t\t\t\tnd.setDate(nd.getDate() + inc * recurringStepDays);\r\n\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t}\r\n\t\telse if (recurringParts[0] == \"month\" || recurringParts[0] == \"year\") {\r\n\t\t\tthis.date[transposeRecurring] = function(nd, td, seriesInstance) {\r\n\t\t\t\tvar delta = Math.ceil(((td.getFullYear() * 12 + td.getMonth() * 1 + 1) - (nd.getFullYear() * 12 + nd.getMonth() * 1 + 1)) / (recurringStepDays) - 1);\r\n\r\n\t\t\t\tif (delta >= 0){\r\n\t\t\t\t\tnd.setDate(1);\r\n\t\t\t\t\tnd.setMonth(nd.getMonth() + delta * recurringStepDays);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn scheduler.date[addRecurring](nd, 0, seriesInstance);\r\n\t\t\t\t//if (str[3]){\r\n\t\t\t\t//\tscheduler.date.day_week(nd, str[2], str[3]);\r\n\t\t\t\t//}\r\n\t\t\t};\r\n\t\t\tthis.date[addRecurring] = function(sd, inc, seriesInstance, currentCount) {\r\n\t\t\t\tif(!currentCount){\r\n\t\t\t\t\tcurrentCount = 1;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcurrentCount++;\r\n\t\t\t\t}\r\n\t\t\t\tvar maxCount = 12;\r\n\t\t\t\tif(currentCount > maxCount){\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar nd = new Date(sd.valueOf());\r\n\t\t\t\tnd.setDate(1);\r\n\r\n\r\n\t\t\t\tnd.setMonth(nd.getMonth() + inc * recurringStepDays);\r\n\t\t\t\tvar origMonth = nd.getMonth();\r\n\t\t\t\tvar origYear = nd.getFullYear();\r\n\t\t\t\tnd.setDate(seriesInstance.start_date.getDate());\r\n\t\t\t\tif (recurringParts[3]){\r\n\t\t\t\t\tscheduler.date.day_week(nd, recurringParts[2], recurringParts[3]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar correctOverflowInstances = scheduler.config.recurring_overflow_instances;\r\n\t\t\t\tif(nd.getMonth() != origMonth && correctOverflowInstances != \"none\"){\r\n\t\t\t\t\t// no such day in a month\r\n\t\t\t\t\tif(correctOverflowInstances === \"lastDay\"){\r\n\t\t\t\t\t\t// return either last day of the month\r\n\t\t\t\t\t\tnd = new Date(origYear, origMonth + 1, 0, nd.getHours(), nd.getMinutes(), nd.getSeconds(), nd.getMilliseconds());\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t// or go to the next instance\r\n\t\t\t\t\t\tnd = scheduler.date[addRecurring](new Date(origYear, origMonth + 1, 0), inc||1, seriesInstance, currentCount);\r\n\t\t\t\t\t\t// if next instance is not possible (e.g. 'repeat on 40th day of the month') null will be returned\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.repeat_date = function(ev, stack, non_render, from, to, maxCount) {\r\n\r\n\tfrom = from || this._min_date;\r\n\tto = to || this._max_date;\r\n\tvar max = maxCount || -1;\r\n\tvar td = new Date(ev.start_date.valueOf());\r\n\r\n\tvar startHour = td.getHours();\r\n\r\n\tvar visibleCount = 0;\r\n\r\n\tif (!ev.rec_pattern && ev.rec_type)\r\n\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\r\n\tthis.transpose_type(ev.rec_pattern);\r\n\ttd = scheduler.date[\"transpose_\" + ev.rec_pattern](td, from, ev);\r\n\twhile ( td && (\r\n\t\ttd < ev.start_date ||\r\n\t\tscheduler._fix_daylight_saving_date(td,from,ev,td,new Date(td.valueOf() + ev.event_length * 1000)).valueOf() <= from.valueOf() ||\r\n\t\ttd.valueOf() + ev.event_length * 1000 <= from.valueOf())){\r\n\t\t\ttd = this.date[\"add_\" + ev.rec_pattern](td, 1, ev);\r\n\r\n\t}\r\n\twhile (td && (td < to && td < ev.end_date && (max < 0 || visibleCount < max))) {\r\n\t\ttd.setHours(startHour);\r\n\r\n\t\tvar timestamp = (scheduler.config.occurrence_timestamp_in_utc) ? Date.UTC(td.getFullYear(), td.getMonth(), td.getDate(), td.getHours(), td.getMinutes(), td.getSeconds()) : td.valueOf();\r\n\t\tvar ch = this._get_rec_marker(timestamp, ev.id);\r\n\t\tif (!ch) { // unmodified element of series\r\n\t\t\tvar ted = new Date(td.valueOf() + ev.event_length * 1000);\r\n\t\t\tvar copy = this._copy_event(ev);\r\n\t\t\t//copy._timed = ev._timed;\r\n\t\t\tcopy.text = ev.text;\r\n\t\t\tcopy.start_date = td;\r\n\t\t\tcopy.event_pid = ev.id;\r\n\t\t\tcopy.id = ev.id + \"#\" + Math.round(timestamp / 1000);\r\n\t\t\tcopy.end_date = ted;\r\n\r\n\t\t\tcopy.end_date = scheduler._fix_daylight_saving_date(copy.start_date, copy.end_date, ev, td, copy.end_date);\r\n\r\n\t\t\tcopy._timed = this.isOneDayEvent(copy);\r\n\r\n\t\t\tif (!copy._timed && !this._table_view && !this.config.multi_day) return;\r\n\t\t\tstack.push(copy);\r\n\r\n\t\t\tif (!non_render) {\r\n\t\t\t\tthis._events[copy.id] = copy;\r\n\t\t\t\tthis._rec_temp.push(copy);\r\n\t\t\t}\r\n\r\n\t\t\tvisibleCount++;\r\n\r\n\t\t} else\r\n\t\tif (non_render){\r\n\t\t\tif(ch.rec_type != \"none\"){\r\n\t\t\t\tvisibleCount++;\r\n\t\t\t}\r\n\t\t\tstack.push(ch);\r\n\t\t}\r\n\r\n\t\ttd = this.date[\"add_\" + ev.rec_pattern](td, 1, ev);\r\n\t//\tif(!scheduler.date[\"validate_add_\" + ev.rec_pattern](td, 1, ev.rec_pattern)){\r\n\t///\t\talert(\"detect add\")\r\n\t//\t}\r\n\t}\r\n};\r\nscheduler._fix_daylight_saving_date = function(start_date, end_date, ev, counter, default_date) {\r\n\tvar shift = start_date.getTimezoneOffset() - end_date.getTimezoneOffset();\r\n\tif (shift) {\r\n\t\tif (shift > 0) {\r\n\t\t\t// e.g. 24h -> 23h\r\n\t\t\treturn new Date(counter.valueOf() + ev.event_length * 1000 - shift * 60 * 1000);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// e.g. 24h -> 25h\r\n\t\t\treturn new Date(end_date.valueOf() - shift * 60 * 1000);\r\n\t\t}\r\n\t}\r\n\treturn new Date(default_date.valueOf());\r\n};\r\nscheduler.getRecDates = function(id, max) {\r\n\tvar ev = typeof id == \"object\" ? id : scheduler.getEvent(id);\r\n\tvar recurrings = [];\r\n\tmax = max || 100;\r\n\r\n\tif (!ev.rec_type) {\r\n\t\treturn [\r\n\t\t\t{ start_date: ev.start_date, end_date: ev.end_date }\r\n\t\t];\r\n\t}\r\n\tif (ev.rec_type == \"none\") {\r\n\t\treturn [];\r\n\t}\r\n\r\n\tscheduler.repeat_date(ev, recurrings, true, ev.start_date, ev.end_date, max);\r\n\r\n\tvar result = [];\r\n\tfor(var i = 0; i < recurrings.length; i++){\r\n\t\tif(recurrings[i].rec_type != \"none\"){\r\n\t\t\tresult.push({start_date: recurrings[i].start_date, end_date: recurrings[i].end_date});\r\n\t\t}\r\n\t}\r\n\r\n\treturn result;\r\n};\r\nscheduler.getEvents = function(from, to) {\r\n\tvar result = [];\r\n\tfor (var a in this._events) {\r\n\t\tvar ev = this._events[a];\r\n\t\tif (ev && ev.start_date < to && ev.end_date > from) {\r\n\t\t\tif (ev.rec_pattern) {\r\n\t\t\t\tif (ev.rec_pattern == \"none\") continue;\r\n\t\t\t\tvar sev = [];\r\n\t\t\t\tthis.repeat_date(ev, sev, true, from, to);\r\n\t\t\t\tfor (var i = 0; i < sev.length; i++) {\r\n\t\t\t\t\t// if event is in rec_markers then it will be checked by himself, here need to skip it\r\n\t\t\t\t\tif (!sev[i].rec_pattern && sev[i].start_date < to && sev[i].end_date > from && !this._rec_markers[sev[i].id]) {\r\n\t\t\t\t\t\tresult.push(sev[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if (!this._is_virtual_event(ev.id)) { // if it's virtual event we can skip it\r\n\t\t\t\tresult.push(ev);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn result;\r\n};\r\n\r\nscheduler.config.repeat_date = \"%m.%d.%Y\";\r\nscheduler.config.lightbox.sections = [\r\n\t{name:\"description\", map_to:\"text\", type:\"textarea\" , focus:true},\r\n\t{name:\"recurring\", type:\"recurring\", map_to:\"rec_type\", button:\"recurring\"},\r\n\t{name:\"time\", height:72, type:\"time\", map_to:\"auto\"}\r\n];\r\n\r\n\r\n//drop secondary attributes\r\nscheduler._copy_dummy = function(ev) {\r\n\tvar start_date = new Date(this.start_date);\r\n\tvar end_date = new Date(this.end_date);\r\n\tthis.start_date = start_date;\r\n\tthis.end_date = end_date;\r\n\tthis.event_length = this.event_pid = this.rec_pattern = this.rec_type = null;\r\n};\r\n\r\nscheduler.config.include_end_by = false;\r\nscheduler.config.lightbox_recurring = 'ask'; // series, instance\r\n\r\nscheduler.attachEvent(\"onClearAll\", function(){\r\n\tscheduler._rec_markers = {}; //clear recurring events data\r\n\tscheduler._rec_markers_pull = {};\r\n\tscheduler._rec_temp = [];\r\n});\r\n\r\n}","import getSerializator from '../core/common/get_serializable_events';\r\nexport default function(scheduler){\r\n\r\n\t\r\nconst getSerializableData = getSerializator(scheduler);\r\n\r\n//redefine this method, if you want to provide a custom set of attributes for serialization\r\nscheduler.data_attributes=function(){\r\n\tvar attrs = [];\r\n\tvar format = scheduler._helpers.formatDate;\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\t\tfor (var name in ev)\r\n\t\t\tif (name.substr(0,1) !=\"_\")\r\n\t\t\t\tattrs.push([name,((name == \"start_date\" || name == \"end_date\")?format:null)]);\r\n\t\tbreak;\r\n\t}\r\n\treturn attrs;\r\n};\r\n\r\nscheduler.toXML = function(header){\r\n\tvar xml = [];\r\n\tvar attrs = this.data_attributes();\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\r\n\t\txml.push(\"\");\r\n\t\tfor (var i=0; i < attrs.length; i++)\r\n\t\t\txml.push(\"<\"+attrs[i][0]+\">\");\r\n\r\n\t\txml.push(\"\");\r\n\t}\r\n\treturn (header||\"\")+\"\"+xml.join(\"\\n\")+\"\";\r\n};\r\n\r\nscheduler._serialize_json_value = function(value){\r\n\tif(value === null || typeof value === \"boolean\"){\r\n\t\tvalue = \"\" + value;\r\n\t}else{\r\n\t\tif(!value && value !== 0){\r\n\t\t\tvalue = \"\";\r\n\t\t}\r\n\t\tvalue = '\"' + value.toString().\r\n\t\t\treplace(/\\n/g,\"\").\r\n\t\t\treplace(/\\\\/g,\"\\\\\\\\\").\r\n\t\t\treplace(/\"/g, '\\\\\"') + '\"';\r\n\t}\r\n\treturn value;\r\n};\r\n\r\n\r\n\r\nscheduler.toJSON = function(){\r\n\treturn JSON.stringify(this.serialize());\r\n};\r\n\r\n\r\nscheduler.toICal = function(header){\r\n\tvar start = \"BEGIN:VCALENDAR\\nVERSION:2.0\\nPRODID:-//dhtmlXScheduler//NONSGML v2.2//EN\\nDESCRIPTION:\";\r\n\tvar end = \"END:VCALENDAR\";\r\n\tvar format = scheduler.date.date_to_str(\"%Y%m%dT%H%i%s\");\r\n\tvar full_day_format = scheduler.date.date_to_str(\"%Y%m%d\");\r\n\r\n\tvar ical = [];\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\r\n\r\n\t\tical.push(\"BEGIN:VEVENT\");\r\n\t\tif (!ev._timed || (!ev.start_date.getHours() && !ev.start_date.getMinutes()))\r\n\t\t\tical.push(\"DTSTART:\"+full_day_format(ev.start_date));\r\n\t\telse\r\n\t\t\tical.push(\"DTSTART:\"+format(ev.start_date));\r\n\t\tif (!ev._timed || (!ev.end_date.getHours() && !ev.end_date.getMinutes()))\r\n\t\t\tical.push(\"DTEND:\"+full_day_format(ev.end_date));\r\n\t\telse\r\n\t\t\tical.push(\"DTEND:\"+format(ev.end_date));\r\n\t\tical.push(\"SUMMARY:\"+ev.text);\r\n\t\tical.push(\"END:VEVENT\");\r\n\t}\r\n\treturn start+(header||\"\")+\"\\n\"+ical.join(\"\\n\")+\"\\n\"+end;\r\n};\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Timeline\", scheduler.assert);\r\n}","interface IViewPosition{\r\n\ttop: number;\r\n\tleft: number;\r\n}\r\n\r\ninterface IViewBox extends IViewPosition{\r\n\twidth: number;\r\n\theight: number;\r\n\tbottom: number;\r\n\tright: number;\r\n}\r\n\r\nexport class Tooltip {\r\n\tprivate _root: HTMLElement;\r\n\tprivate _tooltipNode: HTMLElement | null;\r\n\tprivate _scheduler: any;\r\n\r\n\tconstructor(scheduler: any){\r\n\t\tthis._scheduler = scheduler;\r\n\t}\r\n\r\n\tgetNode() : HTMLElement {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tif (!this._tooltipNode){\r\n\t\t\tthis._tooltipNode = document.createElement(\"div\");\r\n\t\t\tthis._tooltipNode.className = \"dhtmlXTooltip scheduler_tooltip tooltip\";\r\n\r\n\t\t\tscheduler._waiAria.tooltipAttr(this._tooltipNode);\r\n\t\t}\r\n\t\tif(scheduler.config.rtl){\r\n\t\t\tthis._tooltipNode.classList.add(\"dhtmlXTooltip_rtl\");\r\n\t\t} else{\r\n\t\t\tthis._tooltipNode.classList.remove(\"dhtmlXTooltip_rtl\");\r\n\t\t}\r\n\t\treturn this._tooltipNode;\r\n\t}\r\n\r\n\tsetViewport(node: HTMLElement):Tooltip{\r\n\t\tthis._root = node;\r\n\t\treturn this;\r\n\t}\r\n\r\n\tshow(left: number, top: number): Tooltip;\r\n\tshow(event: MouseEvent): Tooltip;\r\n\tshow(left: number | MouseEvent, top?: number): Tooltip {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tconst container = document.body;\r\n\t\tconst node = this.getNode();\r\n\r\n\t\tif(!domHelpers.isChildOf(node, container)){\r\n\t\t\tthis.hide();\r\n\t\t\tcontainer.appendChild(node);\r\n\t\t}\r\n\r\n\t\tif (this._isLikeMouseEvent(left)) {\r\n\t\t\tconst position = this._calculateTooltipPosition(left as MouseEvent);\r\n\t\t\ttop = position.top;\r\n\t\t\tleft = position.left;\r\n\t\t}\r\n\r\n\t\tnode.style.top = top + \"px\";\r\n\t\tnode.style.left = left + \"px\";\r\n\r\n\t\tscheduler._waiAria.tooltipVisibleAttr(node);\r\n\t\treturn this;\r\n\t}\r\n\thide() : Tooltip{\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst node = this.getNode();\r\n\t\tif(node && node.parentNode){\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t}\r\n\t\tscheduler._waiAria.tooltipHiddenAttr(node);\r\n\t\treturn this;\r\n\t}\r\n\r\n\tsetContent(html: string) : Tooltip{\r\n\t\tconst node = this.getNode();\r\n\t\tnode.innerHTML = html;\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// it is for salesforce, because it proxies event to it own events\r\n\tprivate _isLikeMouseEvent(event: any): boolean {\r\n\t\tif (!event || typeof event !== \"object\") {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn \"clientX\" in event && \"clientY\" in event;\r\n\t}\r\n\r\n\tprivate _getViewPort() : HTMLElement {\r\n\t\treturn this._root || document.body;\r\n\t}\r\n\r\n\r\n\tprivate _calculateTooltipPosition(event: MouseEvent): IViewPosition{\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\t// top/left coordinates inside the viewport by mouse position\r\n\t\tconst viewport = this._getViewPortSize();\r\n\t\tconst tooltipNode = this.getNode();\r\n\t\tconst tooltip: IViewBox = {\r\n\t\t\ttop:0,\r\n\t\t\tleft: 0,\r\n\t\t\twidth: tooltipNode.offsetWidth,\r\n\t\t\theight: tooltipNode.offsetHeight,\r\n\t\t\tbottom: 0,\r\n\t\t\tright: 0\r\n\t\t};\r\n\r\n\t\tconst offsetX = scheduler.config.tooltip_offset_x;\r\n\t\tconst offsetY = scheduler.config.tooltip_offset_y;\r\n\r\n\t\tconst container = document.body;\r\n\t\tconst mouse = domHelpers.getRelativeEventPosition(event, container);\r\n\t\tconst containerPos = domHelpers.getNodePosition(container);\r\n\t\tmouse.y += containerPos.y; // to fix margin collapsing\r\n\r\n\t\ttooltip.top = mouse.y;\r\n\t\ttooltip.left = mouse.x;\r\n\t\ttooltip.top += offsetY;\r\n\t\ttooltip.left += offsetX;\r\n\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\ttooltip.right = tooltip.left + tooltip.width;\r\n\r\n\t\tconst scrollTop = window.scrollY + container.scrollTop; // to fix margin collapsing\r\n\t\t// edge cases when the tooltip element can be partially hidden by edges of the viewport\r\n\t\tif(tooltip.top < viewport.top - scrollTop){\r\n\t\t\ttooltip.top = viewport.top;\r\n\t\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\t}else if(tooltip.bottom > viewport.bottom){\r\n\t\t\ttooltip.bottom = viewport.bottom;\r\n\t\t\ttooltip.top = tooltip.bottom - tooltip.height;\r\n\t\t}\r\n\r\n\t\tif(tooltip.left < viewport.left){\r\n\t\t\ttooltip.left = viewport.left;\r\n\t\t\ttooltip.right = viewport.left + tooltip.width;\r\n\t\t}else if(tooltip.right > viewport.right){\r\n\t\t\ttooltip.right = viewport.right;\r\n\t\t\ttooltip.left = tooltip.right - tooltip.width;\r\n\t\t}\r\n\r\n\t\tif(mouse.x >= tooltip.left && mouse.x <= tooltip.right) {\r\n\t\t\ttooltip.left = mouse.x - tooltip.width - offsetX;\r\n\t\t\ttooltip.right = tooltip.left + tooltip.width;\r\n\t\t}\r\n\r\n\t\tif(mouse.y >= tooltip.top && mouse.y <= tooltip.bottom) {\r\n\t\t\ttooltip.top = mouse.y - tooltip.height - offsetY;\r\n\t\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\t}\r\n\r\n\t\treturn tooltip;\r\n\t}\r\n\r\n\tprivate _getViewPortSize() : IViewBox {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tconst container = this._getViewPort();\r\n\t\tlet viewport = container;\r\n\t\tlet scrollTop = window.scrollY + document.body.scrollTop;\r\n\t\tlet scrollLeft = window.scrollX + document.body.scrollLeft;\r\n\t\tlet pos;\r\n\t\t// support for the initial tooltip mode where the tooltip element was attached to the data area of scheduler\r\n\t\tif(container === scheduler.$event_data){\r\n\t\t\tviewport = scheduler.$event;\r\n\t\t\tscrollTop = 0;\r\n\t\t\tscrollLeft = 0;\r\n\t\t\tpos = domHelpers.getNodePosition(scheduler.$event);\r\n\t\t}else{\r\n\t\t\tpos = domHelpers.getNodePosition(viewport);\r\n\t\t}\r\n\t\treturn {\r\n\t\t\tleft:pos.x + scrollLeft,\r\n\t\t\ttop: pos.y + scrollTop,\r\n\t\t\twidth: pos.width,\r\n\t\t\theight: pos.height,\r\n\t\t\tbottom: pos.y + pos.height + scrollTop,\r\n\t\t\tright: pos.x + pos.width + scrollLeft\r\n\t\t};\r\n\t}\r\n}\r\n","import * as utils from \"../../core/utils/utils\";\r\nimport { Tooltip } from \"./tooltip\";\r\n\r\ninterface ITrackerTarget {\r\n\tselector: string;\r\n\tonmouseenter: (event: MouseEvent, node: HTMLElement) => void;\r\n\tonmousemove: (event: MouseEvent, node: HTMLElement) => void;\r\n\tonmouseleave: (event: MouseEvent, node: HTMLElement) => void;\r\n\tglobal: boolean;\r\n}\r\n\r\ninterface ITooltipConfig {\r\n\tselector: string;\r\n\thtml: (event: MouseEvent, node: HTMLElement) => string;\r\n\tglobal: boolean;\r\n}\r\n\r\nexport class TooltipManager{\r\n\ttooltip: Tooltip;\r\n\tprotected _domEvents: any;\r\n\tprivate _listeners: object = {};\r\n\tprivate _scheduler: any;\r\n\tprivate delayShow: any;\r\n\tprivate delayHide: any;\r\n\r\n\tconstructor(scheduler: any) {\r\n\t\tthis.tooltip = new Tooltip(scheduler);\r\n\t\tthis._scheduler = scheduler;\r\n\t\tthis._domEvents = scheduler._createDomEventScope();\r\n\t\tthis._initDelayedFunctions();\r\n\t}\r\n\r\n\tdestructor(): void{\r\n\t\tthis.tooltip.hide();\r\n\t\tthis._domEvents.detachAll();\r\n\t}\r\n\thideTooltip(): void{\r\n\t\tthis.delayHide();\r\n\t}\r\n\tattach(config: ITrackerTarget): void {\r\n\t\tlet root = document.body;\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tif(!config.global){\r\n\t\t\troot = scheduler.$root;\r\n\t\t}\r\n\r\n\t\tlet watchableTarget = null;\r\n\t\tconst handler = (event) => {\r\n\t\t\tconst eventTarget = domHelpers.getTargetNode(event);\r\n\t\t\tconst targetNode = domHelpers.closest(eventTarget, config.selector);\r\n\t\t\tif(domHelpers.isChildOf(eventTarget, this.tooltip.getNode())){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tconst doOnMouseEnter = () => {\r\n\t\t\t\twatchableTarget = targetNode;\r\n\t\t\t\tconfig.onmouseenter(event, targetNode);\r\n\t\t\t};\r\n\r\n\t\t\tif(watchableTarget){\r\n\t\t\t\tif(targetNode && targetNode === watchableTarget){\r\n\t\t\t\t\tconfig.onmousemove(event, targetNode);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconfig.onmouseleave(event, watchableTarget);\r\n\t\t\t\t\twatchableTarget = null;\r\n\r\n\t\t\t\t\tif(targetNode && targetNode !== watchableTarget){\r\n\t\t\t\t\t\tdoOnMouseEnter();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(targetNode){\r\n\t\t\t\t\tdoOnMouseEnter();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tthis.detach(config.selector);\r\n\t\tthis._domEvents.attach(root, \"mousemove\", handler);\r\n\t\tthis._listeners[config.selector] = {\r\n\t\t\tnode: root,\r\n\t\t\thandler\r\n\t\t};\r\n\t}\r\n\r\n\tdetach(selector: string): void {\r\n\t\tconst listener = this._listeners[selector];\r\n\t\tif(listener){\r\n\t\t\tthis._domEvents.detach(listener.node, \"mousemove\", listener.handler);\r\n\t\t}\r\n\t}\r\n\r\n\ttooltipFor(config: ITooltipConfig): void {\r\n\t\tconst cloneDomEvent = (event: MouseEvent) => {\r\n\t\t\tlet clone = event;\r\n\t\t\t// making events survive timeout in ie\r\n\t\t\t// tslint:disable-next-line no-string-literal\r\n\t\t\tif(document[\"createEventObject\"] && !document.createEvent){\r\n\t\t\t\t// tslint:disable-next-line no-string-literal\r\n\t\t\t\tclone = document[\"createEventObject\"](event);\r\n\t\t\t}\r\n\t\t\treturn clone;\r\n\t\t};\r\n\t\tthis._initDelayedFunctions();\r\n\t\tthis.attach({\r\n\t\t\tselector: config.selector,\r\n\t\t\tglobal: config.global,\r\n\t\t\tonmouseenter:(event: MouseEvent, node: HTMLElement) => {\r\n\t\t\t\tconst html = config.html(event, node);\r\n\t\t\t\tif(html){\r\n\t\t\t\t\tthis.delayShow(cloneDomEvent(event), html);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tonmousemove:(event: MouseEvent, node: HTMLElement) => {\r\n\t\t\t\tconst html = config.html(event, node);\r\n\t\t\t\tif(html){\r\n\t\t\t\t\tthis.delayShow(cloneDomEvent(event), html);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\t\t\tthis.delayHide();\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tonmouseleave:() => {\r\n\t\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\t\tthis.delayHide();\r\n\t\t\t},\r\n\t\t});\r\n\t}\r\n\r\n\tprivate _initDelayedFunctions(){\r\n\t\tconst scheduler = this._scheduler;\r\n\t\t// reset delayed functions in order to apply current values of tooltip_timeout\r\n\t\tif(this.delayShow){\r\n\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t}\r\n\t\tif(this.delayHide){\r\n\t\t\tthis.delayHide.$cancelTimeout();\r\n\t\t}\r\n\t\tthis.tooltip.hide();\r\n\t\t\r\n\t\tthis.delayShow = (utils as any).default.delay((event: MouseEvent, html: string) => {\r\n\t\t\tif(scheduler.callEvent(\"onBeforeTooltip\", [event]) === false) {\r\n\t\t\t\tthis.tooltip.hide();\r\n\t\t\t} else {\r\n\t\t\t\tthis.tooltip.setContent(html);\r\n\t\t\t\tthis.tooltip.show(event);\r\n\t\t\t}\r\n\t\t}, scheduler.config.tooltip_timeout || 1);\r\n\r\n\t\tthis.delayHide = (utils as any).default.delay(() => {\r\n\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\tthis.tooltip.hide();\r\n\t\t}, scheduler.config.tooltip_hide_timeout || 1);\r\n\t}\r\n\r\n}","import { TooltipManager } from \"./tooltipManager\";\r\n\r\nexport default function (scheduler: any) {\r\n\r\n\tscheduler.config.tooltip_timeout = 30;\r\n\tscheduler.config.tooltip_offset_y = 20;\r\n\tscheduler.config.tooltip_offset_x = 10;\r\n\tscheduler.config.tooltip_hide_timeout = 30;\r\n\r\n\tconst tooltipManager = new TooltipManager(scheduler);\r\n\r\n\tscheduler.ext.tooltips = tooltipManager;\r\n\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function () {\r\n\r\n\t\ttooltipManager.tooltipFor({\r\n\t\t\tselector: \"[\" + scheduler.config.event_attribute + \"]\",\r\n\t\t\thtml: (event: MouseEvent) => {\r\n\t\t\t\tif (scheduler._mobile && !scheduler.config.touch_tooltip) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst targetEventId = scheduler._locate_event(event.target);\r\n\t\t\t\tif (scheduler.getEvent(targetEventId)) {\r\n\t\t\t\t\tconst event = scheduler.getEvent(targetEventId);\r\n\t\t\t\t\treturn scheduler.templates.tooltip_text(event.start_date, event.end_date, event);\r\n\t\t\t\t}\r\n\t\t\t\treturn null;\r\n\t\t\t},\r\n\t\t\tglobal: false\r\n\t\t});\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function () {\r\n\t\ttooltipManager.destructor();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onLightbox\", function () {\r\n\t\ttooltipManager.hideTooltip();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeDrag\", function() {\r\n\t\ttooltipManager.hideTooltip();\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventDeleted\", function() {\r\n\t\ttooltipManager.hideTooltip();\r\n\t\treturn true;\r\n\t});\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Tree Timeline\", scheduler.assert);\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Units\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\nscheduler._get_url_nav = function(){\r\n\tvar p = {};\r\n\tvar data = (document.location.hash || \"\").replace(\"#\", \"\").split(\",\");\r\n\tfor (var i = 0; i < data.length; i++) {\r\n\t\tvar s = data[i].split(\"=\");\r\n\t\tif (s.length == 2)\r\n\t\t\tp[s[0]] = s[1];\r\n\t}\r\n\treturn p;\r\n};\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\", function () {\r\n\tvar first = true;\r\n\tvar s2d = scheduler.date.str_to_date(\"%Y-%m-%d\");\r\n\tvar d2s = scheduler.date.date_to_str(\"%Y-%m-%d\");\r\n\tvar select_event = scheduler._get_url_nav().event || null;\r\n\r\n\tscheduler.attachEvent(\"onAfterEventDisplay\", function(ev){\r\n\t\tselect_event = null;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function (om, od, m, d) {\r\n\t\tif (first) {\r\n\t\t\tfirst = false;\r\n\t\t\tvar p = scheduler._get_url_nav();\r\n\r\n\t\t\tif (p.event){\r\n\t\t\t\ttry{\r\n\t\t\t\t\tif(scheduler.getEvent(p.event)){\r\n\t\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\t\tshowEvent(p.event);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tvar handler = scheduler.attachEvent(\"onXLE\", function(){\r\n\t\t\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\t\t\tshowEvent(p.event);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\tscheduler.detachEvent(handler);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (e){}\r\n\t\t\t}\r\n\r\n\t\t\tif (p.date || p.mode) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tthis.setCurrentView((p.date ? s2d(p.date) : null), (p.mode || null));\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\t//assuming that mode is not available anymore\r\n\t\t\t\t\tthis.setCurrentView((p.date ? s2d(p.date) : null), m);\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar values = [\r\n\t\t\t\"date=\" + d2s(d || od),\r\n\t\t\t\"mode=\" + (m || om)\r\n\t\t];\r\n\r\n\t\tif(select_event){\r\n\t\t\tvalues.push(\"event=\" + select_event);\r\n\t\t}\r\n\r\n\t\tvar text = \"#\" + values.join(\",\");\r\n\t\tdocument.location.hash = text;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tfunction showEvent(e){\r\n\t\tif(scheduler.$destroyed){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tselect_event = e;\r\n\t\tif(scheduler.getEvent(e)){\r\n\t\t\tscheduler.showEvent(e);\r\n\t\t}\r\n\t}\r\n});\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Week Agenda\", scheduler.assert);\r\n}","export default function(scheduler){\r\nscheduler.attachEvent(\"onLightBox\",function(){\r\n\tif (this._cover){\r\n\t\ttry{\r\n\t\t\tthis._cover.style.height = this.expanded ? \"100%\" : ((document.body.parentNode||document.body).scrollHeight+\"px\");\r\n\t\t} catch(e) {\r\n\r\n\t\t}\r\n\t}\r\n});\r\n\r\nscheduler.form_blocks.select.set_value=function(node,value,ev){\r\n\tif (typeof value == \"undefined\" || value === \"\")\r\n\t\tvalue = (node.firstChild.options[0]||{}).value;\r\n\tnode.firstChild.value=value||\"\";\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\t// scheduler.config.year_x = 4;\r\n\t// scheduler.config.year_y = 3;\r\n\t// scheduler.xy.year_top = 0;\r\n\r\n\tscheduler.templates.year_date = function(date) {\r\n\t\treturn scheduler.date.date_to_str(scheduler.locale.labels.year_tab + \" %Y\")(date);\r\n\t};\r\n\tscheduler.templates.year_month = scheduler.date.date_to_str(\"%F\");\r\n\tscheduler.templates.year_scale_date = scheduler.date.date_to_str(\"%D\");\r\n\tscheduler.templates.year_tooltip = function(s, e, ev) {\r\n\t\treturn ev.text;\r\n\t};\r\n\r\n\tconst isYearMode = function() {\r\n\t\treturn scheduler._mode == \"year\";\r\n\t};\r\n\t\r\n\tconst getCellDate = function(node){\r\n\t\tvar day = scheduler.$domHelpers.closest(node, \"[data-cell-date]\");\r\n\t\tif(!day || !day.hasAttribute(\"data-cell-date\")) return null;\r\n\t\treturn scheduler.templates.parse_date(day.getAttribute(\"data-cell-date\"));\r\n\t};\r\n\r\n\t// dbl click hook for scheduler._on_dbl_click\r\n\tscheduler.dblclick_dhx_month_head = function(e) {\r\n\t\tif (isYearMode()) {\r\n\t\t\tconst target = e.target;\r\n\t\t\tif(scheduler.$domHelpers.closest(target, \".dhx_before\") || scheduler.$domHelpers.closest(target, \".dhx_after\")){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tconst date = getCellDate(target);\r\n\t\t\t\r\n\t\t\tif(date){\r\n\t\t\t\tconst start = date;\r\n\t\t\t\tconst end = this.date.add(start, 1, \"day\");\r\n\t\t\t\tif (!this.config.readonly && this.config.dblclick_create){\r\n\t\t\t\t\tthis.addEventNow(start.valueOf(), end.valueOf(), e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\t\r\n\tscheduler.attachEvent(\"onEventIdChange\", function(){\r\n\t\tif (isYearMode())\r\n\t\t\tthis.year_view(true);\r\n\t});\r\n\r\n\r\n\tvar old = scheduler.render_data;\r\n\tscheduler.render_data = function(evs) {\r\n\t\tif (!isYearMode()) return old.apply(this, arguments);\r\n\t\tfor (var i = 0; i < evs.length; i++)\r\n\t\t\tthis._year_render_event(evs[i]);\r\n\t};\r\n\r\n\tvar clear = scheduler.clear_view;\r\n\tscheduler.clear_view = function() {\r\n\t\tif (!isYearMode()) return clear.apply(this, arguments);\r\n\t\tvar dates = scheduler._year_marked_cells,\r\n\t\t\tdiv = null;\r\n\t\tfor (var date in dates) {\r\n\t\t\tif (dates.hasOwnProperty(date)) {\r\n\t\t\t\tdiv = dates[date];\r\n\t\t\t\tdiv.classList.remove(\"dhx_year_event\", \"dhx_cal_datepicker_event\");\r\n\t\t\t\t// div.className = \"dhx_month_head\";\r\n\t\t\t\t// div.removeAttribute(\"date\");\r\n\t\t\t\t// div.removeAttribute(\"data-year-date\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tscheduler._year_marked_cells = {};\r\n\t};\r\n\r\n\tscheduler._hideToolTip = function() {\r\n\t\tif (this._tooltip) {\r\n\t\t\tthis._tooltip.style.display = \"none\";\r\n\t\t\tthis._tooltip.date = new Date(9999, 1, 1);\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._showToolTip = function(date, pos, e, src) {\r\n\t\tif (this._tooltip) {\r\n\t\t\tif (this._tooltip.date.valueOf() == date.valueOf()) return;\r\n\t\t\tthis._tooltip.innerHTML = \"\";\r\n\t\t} else {\r\n\t\t\tvar t = this._tooltip = document.createElement(\"div\");\r\n\t\t\tt.className = \"dhx_year_tooltip\";\r\n\t\t\tif (this.config.rtl) t.className += \" dhx_tooltip_rtl\";\r\n\t\t\tdocument.body.appendChild(t);\r\n\t\t\tt.addEventListener(\"click\", scheduler._click.dhx_cal_data);\r\n\t\t\tt.addEventListener(\"click\", function(e){\r\n\t\t\t\tif(e.target.closest(`[${scheduler.config.event_attribute}]`)){\r\n\t\t\t\t\tconst id = e.target.closest(`[${scheduler.config.event_attribute}]`).getAttribute(scheduler.config.event_attribute);\r\n\t\t\t\t\tscheduler.showLightbox(id);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\tvar evs = this.getEvents(date, this.date.add(date, 1, \"day\"));\r\n\t\tvar html = \"\";\r\n\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tif(!this.filter_event(ev.id, ev))\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\tvar bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\t\t\tvar color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\t\t\thtml += \"
\";\r\n\t\t\thtml += \"
\" + (evs[i]._timed ? this.templates.event_date(evs[i].start_date) : \"\") + \"
\";\r\n\t\t\thtml += \"
 
\";\r\n\t\t\thtml += this.templates.year_tooltip(evs[i].start_date, evs[i].end_date, evs[i]) + \"
\";\r\n\t\t}\r\n\r\n\t\tthis._tooltip.style.display = \"\";\r\n\t\tthis._tooltip.style.top = \"0px\";\r\n\r\n\r\n\t\tif (document.body.offsetWidth - pos.left - this._tooltip.offsetWidth < 0)\r\n\t\t\tthis._tooltip.style.left = pos.left - this._tooltip.offsetWidth + \"px\";\r\n\t\telse\r\n\t\t\tthis._tooltip.style.left = pos.left + src.offsetWidth + \"px\";\r\n\r\n\t\tthis._tooltip.date = date;\r\n\t\tthis._tooltip.innerHTML = html;\r\n\r\n\t\tif (document.body.offsetHeight - pos.top - this._tooltip.offsetHeight < 0)\r\n\t\t\tthis._tooltip.style.top = pos.top - this._tooltip.offsetHeight + src.offsetHeight + \"px\";\r\n\t\telse\r\n\t\t\tthis._tooltip.style.top = pos.top + \"px\";\r\n\t};\r\n\r\n\tscheduler._year_view_tooltip_handler = function(e){\r\n\t\tif (!isYearMode()) return;\r\n\r\n\t\tvar src = e.target || e.srcElement;\r\n\t\tif (src.tagName.toLowerCase() == 'a') // fix for active links extension (it adds links to the date in the cell)\r\n\t\t\tsrc = src.parentNode;\r\n\t\tif (scheduler._getClassName(src).indexOf(\"dhx_year_event\") != -1)\r\n\t\t\tscheduler._showToolTip(scheduler.templates.parse_date(src.getAttribute(\"data-year-date\")), scheduler.$domHelpers.getOffset(src), e, src);\r\n\t\telse\r\n\t\t\tscheduler._hideToolTip();\r\n\t};\r\n\tscheduler._init_year_tooltip = function() {\r\n\t\tscheduler._detachDomEvent(scheduler._els[\"dhx_cal_data\"][0], \"mouseover\", scheduler._year_view_tooltip_handler);\r\n\t\tscheduler.event(scheduler._els[\"dhx_cal_data\"][0], \"mouseover\", scheduler._year_view_tooltip_handler);\r\n\t};\r\n\r\n\tscheduler._get_year_cell = function(d) {\r\n\t\tvar dateString = scheduler.templates.format_date(d);\r\n\t\tvar cells = this.$root.querySelectorAll(`.dhx_cal_data .dhx_cal_datepicker_date[data-cell-date=\"${dateString}\"]`);\r\n\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\tif(!scheduler.$domHelpers.closest(cells[i], \".dhx_after, .dhx_before\")){\r\n\t\t\t\treturn cells[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t};\r\n\r\n\tscheduler._year_marked_cells = {};\r\n\tscheduler._mark_year_date = function(date, event) {\r\n\t\tvar dateString = scheduler.templates.format_date(date);\r\n\t\tvar cell = this._get_year_cell(date);\r\n\t\tif (!cell) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tvar ev_class = this.templates.event_class(event.start_date, event.end_date, event);\r\n\t\tif (!scheduler._year_marked_cells[dateString]) {\r\n\t\t\tcell.classList.add(\"dhx_year_event\", \"dhx_cal_datepicker_event\");// = \"dhx_month_head dhx_year_event\";\r\n\t\t\tcell.setAttribute(\"data-year-date\", dateString);\r\n\t\t\tcell.setAttribute(\"date\", dateString);\r\n\t\t\tscheduler._year_marked_cells[dateString] = cell;\r\n\t\t}\r\n\t\tif(ev_class){\r\n\t\t\tcell.classList.add(ev_class);\r\n\t\t}\r\n\t};\r\n\tscheduler._unmark_year_date = function(date) {\r\n\t\tvar cell = this._get_year_cell(date);\r\n\t\tif (!cell) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcell.classList.remove(\"dhx_year_event\", \"dhx_cal_datepicker_event\");\r\n//\t\tcell.className = \"dhx_month_head\";\r\n\t};\r\n\tscheduler._year_render_event = function(event) {\r\n\t\tvar date = event.start_date;\r\n\t\tif (date.valueOf() < this._min_date.valueOf()){\r\n\t\t\tdate = this._min_date;\r\n\t\t} else {\r\n\t\t\tdate = this.date.date_part(new Date(date));\r\n\t\t}\r\n\r\n\t\twhile (date < event.end_date) {\r\n\t\t\tthis._mark_year_date(date, event);\r\n\t\t\tdate = this.date.add(date, 1, \"day\");\r\n\t\t\tif (date.valueOf() >= this._max_date.valueOf())\r\n\t\t\t\treturn;\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler.year_view = function(mode) {\r\n\r\n\t\tscheduler.set_sizes();\r\n\r\n\t\tscheduler._table_view = mode;\r\n\r\n\t\tif (this._load_mode && this._load()) return;\r\n\r\n\t\tif (mode) {\r\n\t\t\tscheduler._init_year_tooltip();\r\n\t\t\tscheduler._reset_year_scale();\r\n\t\t\tif (scheduler._load_mode && scheduler._load()){\r\n\t\t\t\tscheduler._render_wait = true;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tscheduler.render_view_data();\r\n\t\t} else {\r\n\t\t\tscheduler._hideToolTip();\r\n\t\t}\r\n\t};\r\n\tscheduler._reset_year_scale = function() {\r\n\t\tthis._cols = [];\r\n\t\tthis._colsS = {};\r\n\t\tvar week_starts = []; //start day of first week in each month\r\n\t\tvar dataArea = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tvar c = this.config;\r\n\t\tdataArea.scrollTop = 0; //fix flickering in FF\r\n\t\tdataArea.innerHTML = \"\";\r\n\r\n\t\tvar dy = Math.floor((parseInt(dataArea.style.height) - scheduler.xy.year_top) / c.year_y);\r\n\t\tif (dy < 190) {\r\n\t\t\tdy = 190;\r\n\t\t}\r\n\r\n\t\tvar week_template = document.createElement(\"div\");\r\n\t\tvar dummy_date = this.date.week_start(scheduler._currentDate());\r\n\r\n\t\tthis._process_ignores(dummy_date, 7, \"day\", 1);\r\n\r\n\t\tfor (var i = 0; i < 7; i++) {\r\n\t\t\tif(!(this._ignores && this._ignores[i])) {\r\n\t\t\t\tthis._cols[i] = 'var(--dhx-scheduler-datepicker-cell-size)';\r\n\t\t\t\tthis._render_x_header(i, 0, dummy_date, week_template);\r\n\r\n\t\t\t}\r\n\t\t\tdummy_date = this.date.add(dummy_date, 1, \"day\");\r\n\t\t}\r\n\t\tweek_template.lastChild.className += \" dhx_scale_bar_last\";\r\n\r\n\t\tfor(var i = 0; i < week_template.childNodes.length; i++){\r\n\t\t\tthis._waiAria.yearHeadCell(week_template.childNodes[i]);\r\n\t\t}\r\n\r\n\t\tvar sd = this.date[this._mode + \"_start\"](this.date.copy(this._date));\r\n\t\tvar ssd = sd;\r\n\t\tvar yearBox = null;\r\n\t\tconst wrapper = document.createElement(\"div\");\r\n\t\twrapper.classList.add(\"dhx_year_wrapper\");\r\n\t\tfor (var i = 0; i < c.year_y; i++){\r\n\t\t\tfor (var j = 0; j < c.year_x; j++) {\r\n\t\t\t\tyearBox = document.createElement(\"div\");\r\n\t\t\t\tyearBox.className = \"dhx_year_box\";\r\n\r\n\t\t\t\tyearBox.setAttribute(\"date\", this._helpers.formatDate(sd));\r\n\t\t\t\tyearBox.setAttribute(\"data-month-date\", this._helpers.formatDate(sd));\r\n\t\t\t\tyearBox.innerHTML = \"
\" + week_template.innerHTML + \"
\";\r\n\r\n\t\t\t\tvar header = yearBox.querySelector(\".dhx_year_month\");\r\n\t\t\t\tvar grid = yearBox.querySelector(\".dhx_year_grid\");\r\n\t\t\t\tvar body = yearBox.querySelector(\".dhx_year_body\");\r\n\r\n\t\t\t\tvar headerId = scheduler.uid();\r\n\t\t\t\tthis._waiAria.yearHeader(header, headerId);\r\n\t\t\t\tthis._waiAria.yearGrid(grid, headerId);\r\n\r\n\r\n\t\t\t\theader.innerHTML = this.templates.year_month(sd);\r\n\r\n\r\n\r\n\t\t\t\tvar dd = this.date.week_start(sd);\r\n\t\t\t\tthis._reset_month_scale(body, sd, dd, 6);\r\n\r\n\t\t\t\tvar days = body.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var day = 0; day < days.length; day++){\r\n\t\t\t\t\tthis._waiAria.yearDayCell(days[day]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\twrapper.appendChild(yearBox);\r\n\r\n\t\t\t\tweek_starts[i * c.year_x + j] = (sd.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) % 7;\r\n\t\t\t\tsd = this.date.add(sd, 1, \"month\");\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdataArea.appendChild(wrapper);\r\n\r\n\t\tvar dateElement = this._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML = this.templates[this._mode + \"_date\"](ssd, sd, this._mode);\r\n\t\t}\r\n\r\n\t\tthis.week_starts = week_starts;\r\n\t\tweek_starts._month = ssd.getMonth();\r\n\t\tthis._min_date = ssd;\r\n\t\tthis._max_date = sd;\r\n\t};\r\n\r\n\tscheduler._reset_year_scale = function(){\r\n\r\n\t\tvar dataArea = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tdataArea.scrollTop = 0; //fix flickering in FF\r\n\t\tdataArea.innerHTML = \"\";\r\n\r\n\t\tlet yearStart = this.date.year_start(new Date(this._date));\r\n\t\t\r\n\t\tthis._min_date = this.date.week_start(new Date(yearStart));\r\n\r\n\t\tconst wrapper = document.createElement(\"div\");\r\n\t\twrapper.classList.add(\"dhx_year_wrapper\");\r\n\r\n\t\tlet currentDate = yearStart;\r\n\t\tfor(let i = 0; i < 12; i++){\r\n\t\t\tlet yearBox = document.createElement(\"div\");\r\n\t\t\tyearBox.className = \"dhx_year_box\";\r\n\r\n\t\t\tyearBox.setAttribute(\"date\", this._helpers.formatDate(currentDate));\r\n\t\t\tyearBox.setAttribute(\"data-month-date\", this._helpers.formatDate(currentDate));\r\n\t\t\tyearBox.innerHTML = `
${this.templates.year_month(currentDate)}
\r\n\t\t\t
`;\r\n\r\n\t\t\tconst yearGrid = yearBox.querySelector(\".dhx_year_grid\");\r\n\t\t\tconst datepicker = scheduler._createDatePicker(null, {\r\n\t\t\t\tdate: currentDate,\r\n\t\t\t\tminWeeks: 6\r\n\t\t\t});\r\n\t\t\tdatepicker._renderDayGrid(yearGrid);\r\n\t\t\tdatepicker.destructor();\r\n\r\n\t\t\twrapper.appendChild(yearBox);\r\n\r\n\t\t\tcurrentDate = this.date.add(currentDate, 1, \"month\");\r\n\r\n\t\t}\r\n\t\tdataArea.appendChild(wrapper);\r\n\r\n\t\tlet lastDate = this.date.add(yearStart, 1, \"year\");\r\n\t\tif(lastDate.valueOf() != this.date.week_start(new Date(lastDate)).valueOf()){\r\n\t\t\tlastDate = this.date.week_start(new Date(lastDate));\r\n\t\t\tlastDate = this.date.add(lastDate, 1, \"week\");\r\n\t\t}\r\n\t\tthis._max_date = lastDate;\r\n\t\tvar dateElement = this._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML = this.templates[this._mode + \"_date\"](yearStart, lastDate, this._mode);\r\n\t\t}\r\n\t};\r\n\r\n\tvar getActionData = scheduler.getActionData;\r\n\tscheduler.getActionData = function(n_ev) {\r\n\t\tif(!isYearMode()){\r\n\t\t\treturn getActionData.apply(scheduler, arguments);\r\n\t\t}\r\n\t\t\r\n\t\tvar date = getCellDate(n_ev.target);\r\n\t\treturn {\r\n\t\t\tdate:date,\r\n\t\t\tsection:null\r\n\t\t};\r\n\t};\r\n\r\n\tvar locateEvent = scheduler._locate_event;\r\n\tscheduler._locate_event = function(node) {\r\n\t\tvar id = locateEvent.apply(scheduler, arguments);\r\n\t\tif(!id){\r\n\t\t\t\r\n\t\t\tvar date = getCellDate(node);\r\n\t\t\tif(!date) return null;\r\n\t\t\tvar evs = scheduler.getEvents(date, scheduler.date.add(date, 1, \"day\"));\r\n\t\t\tif(!evs.length) return null;\r\n\r\n\t\t\t//can be multiple events in the cell, return any single one\r\n\t\t\tid = evs[0].id;\r\n\t\t}\r\n\t\treturn id;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tscheduler._hideToolTip();\r\n\t});\r\n}","export default function(scheduler){\r\n\r\n\r\n(function(){\r\n\r\nfunction defaults(obj, std){\r\n\tfor (var key in std)\r\n\t\tif (!obj[key])\r\n\t\t\tobj[key] = std[key];\r\n\treturn obj;\r\n}\r\n\r\nfunction getElementSizes(element, scheduler) {\r\n\tvar sizes = {};\r\n\telement = scheduler._els[element];\r\n\tif (element && element[0]) {\r\n\t\tsizes.x = element[0].scrollWidth;\r\n\t\tsizes.y = element[0].scrollHeight;\r\n\t} else {\r\n\t\tsizes.x = 0;\r\n\t\tsizes.y = 0;\r\n\t}\r\n\treturn sizes;\r\n}\r\n\r\n//compatibility for new versions of scheduler\r\nif(!window.dhtmlxAjax){\r\n\twindow.dhtmlxAjax = {\r\n\t\tpost: function(url, data, callback){\r\n\t\t\treturn window.dhx4.ajax.post(url, data, callback);\r\n\t\t},\r\n\t\tget: function(url, callback){\r\n\t\t\treturn window.ajax.get(url, callback);\r\n\t\t}\r\n\t};\r\n}\r\n\r\nfunction add_export_methods(scheduler){\r\n\r\n\tscheduler.exportToPDF = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.pdf\",\r\n\t\t\tformat:\"A4\",\r\n\t\t\torientation:\"landscape\",\r\n\t\t\tdpi:96,\r\n\t\t\tzoom:1,\r\n\t\t\trtl: scheduler.config.rtl\r\n\t\t});\r\n\t\tconfig.html = this._export_html(config);\r\n\t\tconfig.mode = this.getState().mode;\r\n\t\tthis._send_to_export(config, \"pdf\");\r\n\t};\r\n\r\n\tscheduler.exportToPNG = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.png\",\r\n\t\t\tformat:\"A4\",\r\n\t\t\torientation:\"landscape\",\r\n\t\t\tdpi:96,\r\n\t\t\tzoom:1,\r\n\t\t\trtl: scheduler.config.rtl\r\n\t\t});\r\n\t\tconfig.html = this._export_html(config);\r\n\t\tconfig.mode = this.getState().mode;\r\n\t\tthis._send_to_export(config, \"png\");\r\n\t};\r\n\r\n\tscheduler.exportToICal = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.ical\",\r\n\t\t\tdata:this._serialize_plain(null, config)\r\n\t\t});\r\n\t\tthis._send_to_export(config, \"ical\");\r\n\t};\r\n\r\n\tscheduler.exportToExcel = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.xlsx\",\r\n\t\t\ttitle:\"Events\",\r\n\t\t\tdata:this._serialize_plain( this.templates.xml_format, config),\r\n\t\t\tcolumns:this._serialize_columns()\r\n\t\t});\r\n\t\tthis._send_to_export(config, \"excel\");\r\n\t};\r\n\r\n\tscheduler._ajax_to_export = function(data, type, callback){\r\n\t\tdelete data.callback;\r\n\t\tvar url = data.server || \"https://export.dhtmlx.com/scheduler\";\r\n\r\n\t\twindow.dhtmlxAjax.post(url,\r\n\t\t\t\"type=\"+type+\"&store=1&data=\"+encodeURIComponent(JSON.stringify(data)),\r\n\t\t\tfunction(loader){\r\n\t\t\t\tvar fail = loader.xmlDoc.status > 400;\r\n\t\t\t\tvar info = null;\r\n\r\n\t\t\t\tif (!fail){\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\tinfo = JSON.parse(loader.xmlDoc.responseText);\r\n\t\t\t\t\t}catch(e){}\r\n\t\t\t\t}\r\n\t\t\t\tcallback(info);\r\n\t\t\t}\r\n\t\t);\r\n\t};\r\n\r\n\tscheduler._plain_export_copy = function(source, format){\r\n\t\tvar target = {};\r\n\t\tfor (var key in source)\r\n\t\t\ttarget[key] = source[key];\r\n\r\n\t\ttarget.start_date = format(target.start_date);\r\n\t\ttarget.end_date = format(target.end_date);\r\n\t\ttarget.$text = this.templates.event_text(source.start_date, source.end_date, source);\r\n\r\n\t\treturn target;\r\n\t};\r\n\r\n\tscheduler._serialize_plain = function(format, config){\r\n\t\tformat = format || scheduler.date.date_to_str(\"%Y%m%dT%H%i%s\", true);\r\n\r\n\t\tvar events;\r\n\t\tif (config && config.start && config.end)\r\n\t\t\tevents = scheduler.getEvents(config.start, config.end);\r\n\t\telse\r\n\t\t\tevents = scheduler.getEvents();\r\n\r\n\t\tvar data = [];\r\n\t\tfor (var i = 0; i< events.length; i++)\r\n\t\t\tdata[i] = this._plain_export_copy(events[i], format);\r\n\r\n\t\treturn data;\r\n\t};\r\n\r\n\tscheduler._serialize_columns = function(){\r\n\t\treturn [\r\n\t\t\t{ id:\"start_date\", header:\"Start Date\", width:30 },\r\n\t\t\t{ id:\"end_date\", header:\"End Date\", width:30 },\r\n\t\t\t{ id:\"$text\", header:\"Text\", width:100 }\r\n\t\t];\r\n\t};\r\n\r\n\tscheduler._send_to_export = function(data, type){\r\n\t\tif(!data.version){\r\n\t\t\tdata.version = scheduler.version;\r\n\t\t}\r\n\r\n\t\tif(!data.skin){\r\n\t\t\tdata.skin = scheduler.skin;\r\n\t\t}\r\n\r\n\t\tif (data.callback)\r\n\t\t\t\treturn scheduler._ajax_to_export(data, type, data.callback);\r\n\r\n\t\tvar form = this._create_hidden_form();\r\n\r\n\t\tform.firstChild.action = data.server || \"https://export.dhtmlx.com/scheduler\";\r\n\t\tform.firstChild.childNodes[0].value = JSON.stringify(data);\r\n\t\tform.firstChild.childNodes[1].value = type;\r\n\t\tform.firstChild.submit();\r\n\t};\r\n\r\n\tscheduler._create_hidden_form = function(){\r\n\t\tif (!this._hidden_export_form){\r\n\t\t\tvar t = this._hidden_export_form = document.createElement(\"div\");\r\n\t\t\tt.style.display = \"none\";\r\n\t\t\tt.innerHTML = \"
\";\r\n\t\t\tdocument.body.appendChild(t);\r\n\t\t}\r\n\t\treturn this._hidden_export_form;\r\n\t};\r\n\r\n\tscheduler._get_export_size = function(format, orientation, zoom, dpi, header, footer, scales) {\r\n\r\n\t\tdpi = parseInt(dpi)/25.4 || 4;\r\n\r\n\t\tvar sizes = {\r\n\t\t\t\"A5\":{ x:148, y:210 },\r\n\t\t\t\"A4\":{ x:210, y:297 },\r\n\t\t\t\"A3\":{ x:297, y:420 },\r\n\t\t\t\"A2\":{ x:420, y:594 },\r\n\t\t\t\"A1\":{ x:594, y:841 },\r\n\t\t\t\"A0\":{ x:841, y:1189 }\r\n\t\t};\r\n\r\n\t\tvar dataX = getElementSizes(\"dhx_cal_data\", this).x;\r\n\t\tvar dataY = getElementSizes(\"dhx_cal_data\", this).y;\r\n\t\tvar headY = getElementSizes(\"dhx_cal_header\", this).y;\r\n\t\tvar multY = getElementSizes(\"dhx_multi_day\", this).y;\r\n\r\n\t\tvar cSize = {\r\n\t\t\ty: dataY + headY + multY\r\n\t\t};\r\n\r\n\t\tif (format === \"full\") {\r\n\t\t\tcSize.x = dataX;\r\n\t\t} else {\r\n\t\t\tcSize.x = Math.floor( (orientation === \"landscape\" ? sizes[format].y : sizes[format].x) * dpi );\r\n\t\t}\r\n\r\n\t\tif (scales) {\r\n\t\t\tcSize.x *= (parseFloat(scales.x) || 1);\r\n\t\t\tcSize.y *= (parseFloat(scales.y) || 1);\r\n\t\t}\r\n\r\n\t\treturn cSize;\r\n\t};\r\n\r\n\tfunction getTimeline() {\r\n\t\tvar mode = scheduler.getState().mode;\r\n\t\tif (scheduler.matrix && scheduler.matrix[mode]) {\r\n\t\t\treturn scheduler.matrix[mode];\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n\r\n\tfunction getInitialSizes() {\r\n\t\tvar smartRendering = undefined,\r\n\t\t\tscrollable = undefined;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (timeline) {\r\n\t\t\tscrollable = timeline.scrollable;\r\n\t\t\tsmartRendering = timeline.smart_rendering;\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tnav_height: scheduler.xy.nav_height,\r\n\t\t\tscroll_width: scheduler.xy.scroll_width,\r\n\t\t\tstyle_width: scheduler._obj.style.width,\r\n\t\t\tstyle_height: scheduler._obj.style.height,\r\n\t\t\ttimeline_scrollable: scrollable,\r\n\t\t\ttimeline_smart_rendering: smartRendering\r\n\t\t};\r\n\t}\r\n\r\n\tfunction setExportSizes(size, initialSizes) {\r\n\t\tscheduler._obj.style.width = size.x + \"px\";\r\n\t\tscheduler._obj.style.height = size.y + \"px\";\r\n\r\n\t\tscheduler.xy.nav_height = 0;\r\n\t\tscheduler.xy.scroll_width = 0;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (initialSizes.timeline_scrollable || initialSizes.timeline_smart_rendering) {\r\n\r\n\t\t\ttimeline.scrollable = false;\r\n\t\t\ttimeline.smart_rendering = false;\r\n\t\t}\r\n\t}\r\n\r\n\tfunction setInitialSizes(initialSizes) {\r\n\t\tscheduler.xy.scroll_width = initialSizes.scroll_width;\r\n\t\tscheduler.xy.nav_height = initialSizes.nav_height;\r\n\t\tscheduler._obj.style.width = initialSizes.style_width;\r\n\t\tscheduler._obj.style.height = initialSizes.style_height;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (initialSizes.timeline_scrollable || initialSizes.timeline_smart_rendering) {\r\n\t\t\ttimeline.scrollable = initialSizes.timeline_scrollable;\r\n\t\t\ttimeline.smart_rendering = initialSizes.timeline_smart_rendering;\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler._export_html = function (obj) {\r\n\t\tvar initialSizes = getInitialSizes();\r\n\t\tvar size = scheduler._get_export_size(obj.format, obj.orientation, obj.zoom, obj.dpi, obj.header, obj.footer, obj.scales);\r\n\r\n\t\tvar html = \"\";\r\n\t\ttry {\r\n\t\t\tsetExportSizes(size, initialSizes);\r\n\t\t\tscheduler.setCurrentView();\r\n\t\t\thtml = scheduler._obj.innerHTML;\r\n\t\t} catch (e) {\r\n\r\n\t\t\t// eslint-disable-next-line no-console\r\n\t\t\tconsole.error(e);\r\n\t\t} finally {\r\n\t\t\tsetInitialSizes(initialSizes);\r\n\t\t\tscheduler.setCurrentView();\r\n\t\t}\r\n\r\n\t\treturn html;\r\n\t};\r\n\r\n}\r\n\r\nadd_export_methods(scheduler);\r\n\r\n\r\n})();\r\n\r\n}","import active_links from \"./active_links\";\r\nimport agenda_legacy from \"./agenda_legacy_view\";\r\nimport agenda_view from \"./agenda\";\r\nimport all_timed from \"./all_timed\";\r\nimport collision from \"./collision\";\r\nimport container_autoresize from \"./container_autoresize\";\r\nimport cookie from \"./cookie\";\r\nimport daytimeline_restricted from \"./restricted_extensions/daytimeline\";\r\nimport drag_between_restricted from \"./restricted_extensions/drag_between\";\r\nimport editors from \"./editors\";\r\nimport expand from \"./expand\";\r\nimport grid_view from \"./restricted_extensions/grid_view\";\r\nimport html_templates from \"./html_templates\";\r\nimport key_nav from \"./key_nav\";\r\nimport layer from \"./layer\";\r\nimport limit from \"./limit\";\r\nimport map_view from \"./map_view\";\r\nimport minical from \"./minical\";\r\nimport monthheight from \"./monthheight\";\r\nimport multisection_restricted from \"./restricted_extensions/multisection\";\r\nimport multiselect from \"./multiselect\";\r\nimport multisource from \"./multisource\";\r\nimport mvc from \"./mvc\";\r\nimport outerdrag from \"./outerdrag\";\r\nimport pdf from \"./pdf\";\r\nimport quick_info from \"./quick_info\";\r\nimport readonly from \"./readonly\";\r\nimport recurring from \"./recurring\";\r\nimport serialize from \"./serialize\";\r\nimport timeline_restricted from \"./restricted_extensions/timeline\";\r\nimport tooltip from \"./tooltip\";\r\nimport treetimeline_restricted from \"./restricted_extensions/treetimeline\";\r\nimport units_restricted from \"./restricted_extensions/units\";\r\nimport url from \"./url\";\r\nimport week_agenda_restricted from \"./restricted_extensions/week_agenda\";\r\nimport wp from \"./wp\";\r\nimport year_view from \"./year_view\";\r\nimport export_api from \"./export_api\";\r\n\r\nexport default {\r\n\tactive_links,\r\n\tagenda_legacy,\r\n\tagenda_view,\r\n\tall_timed,\r\n\tcollision,\r\n\tcontainer_autoresize,\r\n\tcookie,\r\n\tdaytimeline: daytimeline_restricted,\r\n\tdrag_between: drag_between_restricted,\r\n\teditors,\r\n\texpand,\r\n\texport_api,\r\n\tgrid_view,\r\n\thtml_templates,\r\n\tkey_nav,\r\n\tlayer,\r\n\tlimit,\r\n\tmap_view,\r\n\tminical,\r\n\tmonthheight,\r\n\tmultisection: multisection_restricted,\r\n\tmultiselect,\r\n\tmultisource,\r\n\tmvc,\r\n\touterdrag,\r\n\tpdf,\r\n\tquick_info,\r\n\treadonly,\r\n\trecurring,\r\n\tserialize,\r\n\ttimeline: timeline_restricted,\r\n\ttooltip,\r\n\ttreetimeline: treetimeline_restricted,\r\n\tunits: units_restricted,\r\n\turl,\r\n\tweek_agenda: week_agenda_restricted,\r\n\twp,\r\n\tyear_view\r\n};","import SchedulerFactory from \"./scheduler_factory\";\r\nimport gplExtensions from \"./ext/extensions_gpl\";\r\n\r\nconst factory = new SchedulerFactory(gplExtensions);\r\n\r\nconst scheduler = factory.getSchedulerInstance();\r\nconst Scheduler = {\r\n\tplugin: scheduler.bind(factory.plugin, factory)\r\n};\r\n\r\nwindow.scheduler = scheduler;\r\nwindow.Scheduler = Scheduler;\r\n\r\nif(!window.$dhx) {\r\n\twindow.$dhx = {};\r\n}\r\n\r\nwindow.$dhx.scheduler = scheduler;\r\nwindow.$dhx.Scheduler = Scheduler;\r\n\r\nexport default scheduler;export { scheduler, Scheduler };"],"names":["dhtmlxHook","dhtmlx","attaches","attachScheduler","day","mode","tabs","scheduler","obj","document","createElement","id","this","_genStr","innerHTML","body","appendChild","firstChild","attachObject","vs","av","sched","schedId","setSizes","updateView","destructor","init","_viewRestore","globalScope","window","global","global$1","assert","check","message","config","show_errors","callEvent","type","text","expire","console","log","extend","commonViews","agenda","grid","map","unit","timeline","week_agenda","year","anythingElse","requiredExtensions","limit","_commonErrorMessages","unknownView","view","relatedDoc","relatedExtension","collapsedContainer","div","createTimelineView","Error","createUnitsView","createGridView","addMarkedTimespan","renderCalendar","exportToPNG","join","exportToPDF","attachEvent","dhtmlxError","catchError","a","b","c","responseText","ajax_error","alert","className","element","classes","split","forEach","cssClass","classList","add","itemTypes","rows_container","row","setAttribute","fix_tab_position","$firstTab","$lastTab","$segmentedTab","date","button","builtInButton","spacer","minicalendarButton","minicalendarDiv","click","$_eventAttached","event","isCalendarVisible","destroyCalendar","position","getState","navigation","handler","calendar","setCurrentView","html_element","findRenderer","renderer","rows","cols","renderElement","css","width","value","style","height","html","align","justifyContent","prepareConfig","renderLayout","fragment","createDocumentFragment","items","Array","isArray","i","length","next","_init_nav_bar","navBar","$container","querySelector","_update_nav_bar","previousHeight","container","heightChanged","configChanged","newHeight","xy","nav_height","unset_actions","_els","get_elements","set_actions","display","isAttachedNode","root","parentNode","getWindowSize","w","innerWidth","documentElement","clientWidth","h","innerHeight","clientHeight","equals","listenWindowResize","oldSize","resizeDelay","clearTimeout","setTimeout","$destroyed","newSize","triggerSchedulerResize","$root","watchNodeResize","offsetHeight","previousWidth","offsetWidth","lowlevelResizeWatcher","addResizeListener","containerStyles","getComputedStyle","getPropertyValue","resizeWatcher","tabIndex","wai_aria_attributes","salesforce_environment","contentWindow","removeChild","EventHost","_silent_mode","listeners","_silentStart","_silentEnd","createEventStorage","handlers","index","eventStorage","combinedResult","handlerResult","apply","arguments","addEvent","settings","handlerId","once","originalHandler","removeEvent","clear","makeEventable","eventHost","eventName","toLowerCase","thisObject","bind","innerId","attachAll","callback","name","eventArguments","handlerName","concat","checkEvent","detachEvent","list","eventId","detachAllEvents","eventable","nav_bar","_detachDomEvent","el","removeEventListener","_init_once","scheduler_resize_listener","layout","navbar","render","header","dataArea","hasSchedulerMarkup","createDefaultHeader","views","nav","matrix","push","_props","_grid","names","optionalViews","viewName","_currentDate","_obj","getElementById","error","wai_aria_application_role","JSON","stringify","rtl","_skin_init","_scroll","init_templates","_init_touch_events","set_sizes","$initialized","min_event_height","bar_height","scale_width","scroll_width","scale_height","month_scale_height","menu_width","margin_top","margin_left","editor_width","month_head_height","event_header_height","keys","edit_save","edit_cancel","functor","object","_x","scale_x","_table_view","materialScalePlaceholder","_is_material_skin","insertBefore","set_xy","offsetTop","_lightbox","_setLbPosition","_data_width","left","right","node","x","y","prepareValue","val","prepared","isNaN","Number","Math","max","direction","undefined","top","els","getElementsByTagName","class_name","_getClassName","attr_value","getAttribute","label","locale","labels","_waiAria","labelAttr","domEventsScope","_createDomEventScope","detachAll","_click","attach","e","preventDefault","_temp_touch_block","_on_mouse_move","_ignore_next_click","_on_mouse_down","_on_mouse_up","_on_dbl_click","returnValue","_locate_event","target","select","_select_id","_close_not_saved","editStop","unselect","updateEvent","previousSelection","getEvent","_mode","Date","_date","min_date","_min_date","max_date","_max_date","editor_id","_edit_id","lightbox_id","_lightbox_id","new_event","_new_event","select_id","expanded","drag_id","_drag_id","drag_mode","_drag_mode","dhx_cal_data","cancelBubble","getActionData","readonly","icon","closest","mask","indexOf","buttons","replace","valueOf","dhx_cal_prev_button","dhx_cal_next_button","dummy","step","def_step","dhx_cal_today_button","dhx_cal_tab","deprecated_name","substring","search","delete","confirm_deleting","_dhtmlx_confirm","title","title_confirm_deleting","deleteEvent","ok","icon_delete","edit","save","details","showLightbox","form","cancel","opts","result","confirm","addEventNow","start","end","base","_isObject","_isDate","duration","event_duration","time_step","start_date","round","start_hour","first_hour","getHours","setHours","end_date","setTime","uid","_loading","_drag_event","src","dblclick_create","details_on_dblclick","_timed","viewHandler","call","_get_column_index","x_pos","column","_cols","_ignores","floor","_week_indexes_from_pos","pos","min","ceil","hour_size_px","_mouse_coords","ev","$env","isIE","pageX","pageY","clientX","scrollLeft","clientLeft","clientY","scrollTop","clientTop","_colsS","$domHelpers","getAbsoluteLeft","getAbsoluteTop","dy","heights","_ignores_detected","preserve_length","_event_length","_get_real_event_length","x_step","x_unit","timestamp","confirmationText","confirm_closing","title_confirm_closing","positive_closing","_drag_pos","_correct_shift","back","getTimezoneOffset","_is_pos_changed","old_pos","new_pos","diff","old_val","new_val","acc","abs","delay","d_pos","has_moved","_correct_drag_start_date","len","_start_correction","_end_correction","last_hour","getMinutes","_get_fictional_event_length","_correct_drag_end_date","mousedownPos","_get_date_from_pos","_drag_start","res","fields","timeStep","custom","time_part","_dragEventBody","_move_event_shift","resize_date","_drag_from_start","date_part","resize_from_start","end_day_start","end_day_date","firstHour","lastHour","maxY","precisePos","minDate","maxDate","preciseDate","cursor","shift","new_end","new_start","limit_drag_out","all_timed","_get_section_view","_get_event_sday","getView","getDate","_allow_dnd","update_render","sx","update_view","for_rendered","r","srcElement","classname","drag_event_body","fullClass","_lame_clone","_get_private_properties","_clear_temporary_properties","clean","flagged_event","initial","current_state","_mobile","moved","_dhx_changed","is_new","_lame_copy","edit_on_create","details_on_create","isOneDayEvent","render_view_data","_trigger_dyn_loading","_load_mode","_load","_render_wait","_reset_ignores","_reset_scale","isViewExists","templates","_set_aria_buttons_attrs","buttonGroups","group","j","prev","headerButtonsAttributes","icon_form","icon_edit","oldClass","newClass","dhx_multi_day","prev_scroll","preserve_scroll","multidayScroll","_dy_shift","tab","headerToggleState","remove","_render_x_header","offset_top","head","left_border","columnHeaderText","dayHeaderAttr","_get_columns_num","from","to","count","count_n","_get_timeunit_start","_get_view_end","dd","ed","_calc_scale_sizes","summ","_process_ignores","realcount","_set_scale_col_size","_render_scales","data_area","sd","today","parseInt","d","scales","cls","firstHalf","slotDate","getFullYear","getMonth","format_date","htmlContent","time_slot_text","time_slot_class","secondHalf","week_date_class","dayColumnAttr","day_start","_getNavDateElement","str","drag_resize","drag_move","_scales","week_start","navBarDateStr","scaleElement","navBarDateAttr","_reset_month_scale","_reset_hours_scale","multi_day","c1","visibility","totalWidth","col_length","offset","hiddenWidth","c2","cloneNode","cc","content","hour_scale","hourScaleAttr","scroll_hour","now_date","n","preserve","ignore","ign_date","_render_month_scale","view_start","cd","tdwidths","cell_width","getCellHeight","cellheight","table","cell","month_date_class","body_class","head_class","monthCellAttr","cellHead","month_day","cellBody","bf1","cells","querySelectorAll","parse_date","getLabel","property","key","sections","lightbox","map_to","options","updateCollection","list_name","collection","serverList","splice","resetLightbox","hideCover","cache","t","Object","create","String","Boolean","prototype","hasOwnProperty","source","n_ev","section","_focus","focus","getDaysDifference","startDate","endDate","differenceInTime","getTime","differenceInDays","eventLength","startColumnIndex","endColumnIndex","_get_date_index","last_column","excludedDuration","intervalStart","intervalEnd","leftCellCutOffStart","leftCellCutOffEnd","rightCellCutOffStart","rightCellCutOffEnd","ev_length","dir","per_day","days","fd","start_slot","end_slot","_get_section_property","y_property","_is_initialized","state","_is_lightbox_open","defaultDomEvents","addEventListener","eventRemove","createEventScope","domEvents","eventScope","capture","detach","staticArray","slice","_eventRemoveAll","_trim","func","trim","htmlTags","RegExp","extraSpaces","stripHTMLLite","htmlText","singleQuotes","escapeQuotes","getAttributeString","attr","attributes","setAttributes","values","day_date","role","isActive","getHeaderCellAttr","dateString","eventAttr","_eventCommonAttr","event_text","$dataprocessor_class","setEventBarAttr","_getAttributes","attributeSetter","arg","eventBarAttrString","agendaHeadAttrString","agendaHeadDateString","agendaHeadDescriptionString","agendaDataAttrString","agendaEventAttrString","attrs","agendaDetailsBtnString","icon_details","gridAttrString","gridRowAttrString","gridCellAttrString","mapAttrString","mapRowAttrString","mapDetailsBtnString","minicalHeader","headerId","minicalGrid","minicalRow","minicalDayCell","selected","minicalHeadCell","weekAgendaDayCell","weekAgendaEvent","lightboxHiddenAttr","lightboxVisibleAttr","lightboxSectionButtonAttrString","tabindex","yearHeader","yearGrid","yearHeadCell","yearRow","yearDayCell","lightboxAttr","lightboxButtonAttrString","buttonName","eventMenuAttrString","iconName","lightboxHeader","headerText","lightboxSelectAttrString","time_option","month","hour","minute","messageButtonAttrString","buttonLabel","messageInfoAttr","messageModalAttr","quickInfoAttr","quickInfoHeaderAttrString","quickInfoHeader","quickInfoButtonAttrString","tooltipAttr","tooltipVisibleAttr","tooltipHiddenAttr","isDisabled","payload","uidSeed","now","pop","isStringObject","Function","toString","constructor","isNumberObject","isBooleanObject","isDate","defined","timeout","timer","$cancelTimeout","$pending","args","$execute","utils","mixin","force","f","copy","varType","elementPosition","elem","bottom","getBoundingClientRect","box","docElem","pageYOffset","pageXOffset","offsetLeft","offsetParent","getRelativeEventPosition","getNodePosition","getClassName","baseVal","getTargetNode","trg","tagName","shadowRoot","composedPath","locateCss","strict","ind","charAt","isVisible","currentStyle","hiddenSection","recurringSection","hasNonNegativeTabIndex","hasHref","canHaveHref","area","nodeName","loLowerCase","isEnabled","canDisable","input","textarea","hasAttribute","getFocusableNodes","nodes","nodesArray","$position","sort","isValid","isShadowDomSupported","createShadowRoot","attachShadow","getActiveElement","activeElement","getSelection","focusNode","getRootNode","ShadowRoot","host","hasShadowParent","dom_helpers","htmlObject","getOffset","getOffsetSum","getOffsetRect","test","navigator","userAgent","dummyBox","selector","insertAfter","newNode","referenceNode","nextSibling","isChildOf","child","parent","contains","Element","matches","msMatchesSelector","webkitMatchesSelector","parentElement","nodeType","isWindowAwailable","env","isOpera","isChrome","isKHTML","isFF","isIPad","isEdge","isNode","clearAll","_dp","serialize$1","data","serialized","encodeURIComponent","Promise","createConfig","method","url","async","headers","serialize","ajax","serializeRequestParams","parse","DOMParser","parseFromString","ActiveXObject","loadXML","xmltop","tagname","xhr","status","xml","responseXML","xpath","xpathExp","docObj","selectNodes","first","col","ownerDocument","evaluate","XPathResult","ANY_TYPE","iterateNext","query","_call","get","onLoad","getSync","put","postData","del","post","postSync","resolve","reject","XMLHttpRequest","isQt","match","readyState","xmlDoc","filePath","open","setRequestHeader","toUpperCase","send","urlSeparator","$ajax","generateStringToDate","format","utc","splt","code","csp_date_to_str","to_fixed","getUTCDate","getUTCMonth","getUTCFullYear","day_short","getUTCDay","getDay","day_full","month_short","month_full","getUTCHours","getUTCMinutes","getUTCSeconds","getSeconds","getUTCISOWeek","getISOWeek","csp_str_to_date","set","temp","month_short_hash","month_full_hash","UTC","cspEnabled","checkIfCSPEnabled","useCsp","csp","s","old","setMinutes","setSeconds","setMilliseconds","start_on_monday","month_start","setDate","year_start","setMonth","_add_days","inc","ndate","datesDiff","rest","hours","setYear","num","date_to_str","str_to_date","exactFormat","stringToDateMethod","parseExactFormat","yyyyMMddhhIIss","MMddyyyyhhIIss","ddMMyyyyhhIIss","ISO8601","isYMDDate","datestr","isMDYDate","isDMYDate","isISO8601","parseYMD","parseMDY","parseDMY","parse_exact_format","nday","first_thursday","year_number","ordinal_date","week_number","convert_to_utc","default_date","month_date","load_date","week_date","hour_date","date_format","api_date","displayed_event_color","displayed_event_text_color","wide_form","day_column_padding","use_select_menu_space","drag_create","resize_month_events","resize_month_timed","responsive_lightbox","separate_short_events","cascade_event_display","cascade_event_count","cascade_event_margin","multi_day_height_limit","drag_lightbox","server_utc","touch","touch_tip","touch_drag","touch_swipe_dates","quick_info_detached","drag_highlight","icons_edit","icons_select","buttons_left","buttons_right","highlight_displayed_event","delay_render","timeline_swap_resize","event_attribute","$initial","_helpers","parseDate","xml_date","formatDate","xml_format","d1","d2","day_scale_date","month_scale_date","week_scale_date","time_picker","event_date","load_format","event_header","event_class","event_bar_date","event_bar_text","month_events_link","drag_marker_class","drag_marker_content","tooltip_date_format","tooltip_text","calendar_month","calendar_scale_date","calendar_date","calendar_time","_events","_loaded","clear_view","extra_data","event_updated","silent","setEvent","hash","_rendered","changeEventId","new_id","create_getter","create_setter","_changed","is_visible_events","clear_event","in_visible_range","evFirstHour","evLastHour","end_dates_visible","hidden_duration","checkEndDate","get_visible_events","only_timed","stack","filter_event","filter","_is_main_area_event","evs","hold","full","_not_render","_recalculate_timed","tvs","tvd","_rendered_location","render_data","buffer","renderedLocation","_view_month_day","_render_month_link","toRender","_sday","_eday","curr","_sweek","getEvents","_get_event_bar_pos","widt","x2","_pre_render_events","containers","render_event_bar","max_evs","max_month_events","_sorder","locate_holder","real","render_event","_get_first_visible_cell","hb","h_old","_pre_render_events_line","_pre_render_events_table","monthRows","cellHeight","cHeight","unshift","scrollHeight","scroll_fix","scale_settings","sum_width","row_heights","full_multi_day_height","used_multi_day_height","used_multi_day_height_css","multi_day_section","multi_day_icon","overflowY","datePart","_get_event_mapped_end_date","ev_duration","_min_mapped_duration","evs_originals","sh","eh","_inner","t_ev","t_end_date","slot_index","sorderSet","_is_sorder","k","_max_sorder","max_count","_count","_copy_event","_time_order","_is_any_multiday_cell_visible","isAnyCellVisible","checkDate","noCells","lastDayEnd","cellIndex","locate_holder_day","weekCellIndex","out","weeks","chunks_info","first_chunk","last_chunk","chunk_info","locate_s","locate_e","_length","stack_line","_first_chunk","_last_chunk","_copy_dummy","_y_from_date","sm","_calc_event_y","min_height","em","parentWidth","menu","menu_offset","pos_y","ev_count","ev_sorder","margin","_render_v_bar","_text_style","parentPosition","zIndex","color","setProperty","tplClass","cssText","_editor","shiftKey","keyCode","icons","icons_str","ariaAttr","currentIcon","textColor","highlightEventPosition","contentA","contentB","cs","cse","boxWidth","renderEvent","inner_html","footer_class","_drag_resize","childNodes","past","_get_dnd_order","order","ev_height","max_height","_orig_sorder","evTop","columns","y_event_offset","resize_handle","resizable","left_chunk","right_chunk","resize_left","resize_right","timed","bg_color","style_text","_edit_stop_event","getRenderedEvent","rendered_events","rendered_event","showEvent","original_color","original_text_color","restoreOriginalColors","section_delimiter","getSectionTop","posFromDate","dx","_smartRenderingEnabled","scrollTo","_append_drag_marker","m","zone","scale","lastChild","previousSibling","_update_marker_position","size","_parsers","canParse","topElement","loader","csrfToken","security_key","arr","itms","itm","nodeValue","ud","udx","_xmlNodeToJSON","_userdata","_init_event","json","err","events","dhx_security","collections","collections_loaded","option","option_key","ical","c_start","c_end","incoming","event_r","e_start","e_end","exec","param","param_r","parse_param","substr","dh","dm","utcMark","dn","getSerializator","_load_url","prevent_cache","ajaxCallback","response","on_load","lf","cache_line","temp_to","xmlLoaded","jsonLoader","iCalLoader","foundParser","parser","_process","_process_loading","_after_call","_tagvalue","_init_date","getSerializableData","createSerializator","dataset","allEvents","exportedEvent","exportValue","rawValue","load","setLoadMode","array","show_loading","_y","_lightbox_controls","formSection","getLightbox","getValue","form_blocks","get_value","setValue","set_value","get_template_control","control","get_select_control","get_textarea_control","get_time_control","defaults","template","time","sns","placeholder","_get_input","_dhx_onchange","onchange","time_format","_time_format_order","cfg","dt","last","limit_time_select","p","selectBoxClass","range","start_year","end_year","year_range","tdate","_time_values","ariaAttrs","full_day","_full_day","checked","disabled","_fill_lightbox_select","auto_end_date","_update_lightbox_select","time_values","direct_value","fixed_value","value_found","t_v","selectedIndex","original","getLightboxRoot","cspEnvironment","salesforceEnvironment","showCover","show_cover","_cover","_fill_lightbox","lightbox_header","headerContent","headerDate","headerTitle","current_sns","_get_lightbox_section_node","block","default_value","_lightbox_out","_empty_lightbox","hide_lightbox","endLightbox","hide_cover","_move_while_dnd","_finish_dnd","save_lightbox","startLightbox","_custom_lightbox","_temp_lightbox","cancel_lightbox","hideLightbox","_init_lightbox_events","buttonTarget","sectionButton","button_click","action","readonly_active","setLightboxSize","_init_dnd_events","_dnd_start_lb","dhx_unselectable","lb","_lb_start","_ready_to_dnd","recurring","_lightbox_template","label_name","ds","t_ds","_bindLightboxLabels","labelBlock","inputBlock","fallback","inputId","old_id","mobile","MSStream","platform","maxTouchPoints","touchEventsSupported","createEvent","_touch_events","touches","PointerEvent","pointerEnabled","pointerType","msPointerEnabled","MSPOINTER_TYPE_MOUSE","accessor","tracker","scroll_mode","action_mode","dblclicktime","attachTouchEvent","passive","check_direction_swipe","s_ev","e_ev","max_dy","scrollable","doMouseMove","dnd","original_render","_update_global_tip","drag_cancel","_pointerDragId","pointerId","fake_event","_block_next_stop","actTask","fakeTask","sourceTask","_show_global_tip","_hide_global_tip","toptip","_global_tip","drag_to_create","drag_to_move","getRootView","tag","hooks","didInsert","cmp","_addThemeClass","skin","_skin_settings","_skin_xy","lightbox_additional_height","checkIfMaterialSkin","themeNameFromFile","links","href","_build_skin_info","monitorThemeChange","styles","themeVar","isCssVarTheme","themeName","cssValues","oldMaterialTheme","_theme_info","theme","cssVarTheme","themeVariables","calculatedMaterial","probe","cachedBorderBoxValue","checkIfBorderBoxStyling","boxSizing","refreshAfterLoad","_border_box_events","oldStyling","newStyling","_configure","setSkin","flatSkinHourScale","monitorIntervalId","clearInterval","setInterval","csstheme","_old_month_day","old_month_day","reorderTabs","specialTabs","tabName","find","firstTab","reverse","jQuery","$","counter","methods","fn","dhx_scheduler","each","Scheduler","getSchedulerInstance","comp","update_view_timer","curr_view_timer","lazy_setCurrentView","self","oldDate","oldMode","updateFlags","lazy_updateView","ars","DataProcessorEvents","dp","$scheduler","$dp","_dataProcessorHandlers","_validId","setUpdated","z","_in_progress","_invalid","updatedRows","_waitMode","_update_callback","upd","setUserData","action_param","_add_rec_marker","extendScheduler","_is_virtual_event","getUserData","_set_event_text_style","rec_type","rec_pattern","_dp_change_event_id","_dp_hook_delete","setDp","DataProcessor","serverProcessorURL","serverProcessor","autoUpdate","updateMode","_tMode","_headers","_payload","post_delim","messages","updated","inserted","deleted","invalid","invalid_cell","enableUTFencoding","setTransactionMode","total","_tSend","_endnm","_serializeAsJson","_router","router","escape","_utf","setDataColumns","_columns","getSyncState","enableDataNames","enablePartialDataSend","setUpdateMode","master","rowId","findRow","existing","set_invalid","is_invalid","markRow","sendData","_methods","getActionByState","checkBeforeUpdate","sendAllData","_beforeSendData","_getRowData","_sendData","_serializeAsJSON","serialize_one","pref","_applyPayload","dataToSend","_onResolvedCreateUpdate","resultState","sid","tid","afterUpdateCallback","routerMode","actionPromise","update","then","catch","queryParams","ids","afterUpdate","urlParams","_user","_cleanupArgumentsBeforeSend","preprocessedData","_cleanupItemBeforeSend","valid","_forEachUpdatedRow","_getAllData","has_one","pattern","defineAction","_uActions","btag","marker","correct","originalSid","_errorResponse","cleanUpdate","_setDefaultTransactionMode","_serverProcessor","that","finalizeUpdate","atag","_initialized","_dp_init","dataProcessorEvents","_dataprocessor","setOnAfterUpdate","setOnBeforeUpdateHandler","setAutoUpdate","interval","user","_need_update","_update_busy","xml_node","afterAutoUpdate","fullSync","intervalId","loadUpdate","getUpdates","_getXmlNodeValue","version","vers","updates","processedData","updatedItem","output","_prepareDataItem","item","processedItem","dataItem","createDataProcessor","tMode","batchUpdate","boxAttribute","_dhx_msg_cfg","usercall","modalBox","hide","modal_key","which","messageBox","keyboard","domHelpers","modality","cover","classValue","buttonAriaAttrs","buttonCss","info","timers","pull","getFirstDefined","_boxStructure","contentId","inner","message_ok","message_cancel","btn","_createBox","hidden","alertPopup","confirmPopup","boxPopup","box_params","params","alertBox","confirmBox","focusable","subtype","seed","hideAll","popups","modalbox","ar","day_tab","week_tab","month_tab","icon_save","icon_cancel","section_description","section_time","confirm_recurring","section_recurring","button_recurring","button_recurring_open","button_edit_series","button_edit_occurrence","grid_tab","be","agenda_tab","description","year_tab","week_agenda_tab","repeat_radio_day","repeat_radio_week","repeat_radio_month","repeat_radio_year","repeat_radio_day_type","repeat_text_day_count","repeat_radio_day_type2","repeat_week","repeat_text_week_count","repeat_radio_month_type","repeat_radio_month_start","repeat_text_month_day","repeat_text_month_count","repeat_text_month_count2_before","repeat_text_month_count2_after","repeat_year_label","select_year_day2","repeat_text_year_day","select_year_month","repeat_radio_end","repeat_text_occurences_count","repeat_radio_end2","repeat_radio_end3","month_for_recurring","day_for_recurring","ca","cn","da","de","en","es","fi","fr","he","hu","it","jp","LocaleManager","_locales","nb","nl","no","pl","pt","ro","ru","si","sk","sv","tr","ua","i18nFactory","DatePicker","modes","currentRange","eventDates","currentModeIndex","onStateChangeHandlers","_domEvents","onStateChange","oldState","newState","_notifyStateChange","newDate","setFullYear","setState","_toggleMode","newIndex","backwardArrow","monthLabel","innerText","toLocaleString","startYear","forwardArrow","_adjustDate","_renderCalendarHeader","dataContainer","_renderDayGrid","_renderMonthGrid","_renderYearGrid","daysOfWeekContainer","currentDate","labelFormat","dayElement","currWeek","minWeeks","minSchedulerDate","maxSchedulerDate","eventDaysTable","reduce","dayStart","_renderDayGridHeader","firstDate","monthStart","monthEnd","lastDate","_weeksBetween","currDate","dayGridContainer","dateCell","wrapper","months","formatLabel","monthElement","doneArea","doneBtn","yearElement","factoryMethod","extensionManager","common_errors","common","schedulerCore","wai_aria","dom","_createDatePicker","_getFocusableNodes","_locate_css","messageApi","event_highlight","dhtmlx_suite_hooks","skins","jquery","dataProcessorExtend","connector","i18n","addLocale","setLocale","localeObject","getLocale","dhx_save_btn","dhx_cancel_btn","dhx_delete_btn","ext","activePlugins","plugins","extensionList","getExtensionList","treetimeline","daytimeline","outerdrag","legacy","plugin","getExtension","dependencies","priorities","extension","dep","dependencyName","orderA","orderB","ExtensionsManager","_extensions","SchedulerFactory","extensions","_seed","_schedulerPlugins","_bundledExtensions","_extensionsManager","initConfig","_internal_id","$syncFactory","_initFromConfig","calendars","addCalendar","active_links","active_link_view","_active_link_click","s_d","do_wrapper","fullname","week_x","d_s","agenda_legacy","add_agenda_legacy","agenda_legacy_time","agenda_legacy_text","agenda_legacy_date","agenda_legacy_start","old_dblclick_dhx_cal_data","dblclick_dhx_cal_data","fill_agenda_tab","old_render_view_data","_agendaScrollTop","set_full_view","l","rowAttr","dateHeader","descriptionHeader","tableAttr","ev_class","agendaDetailsButtonAttr","agenda_time","agenda_text","agenda_area","v_border","dateElement","agenda_date","agenda_legacy_view","agenda_start","agenda_end","agenda_view","add_agenda","dayDateToStr","dayDowToStr","agenda_day","eventsInDays","anyEvents","eventStart","renderEmptyView","renderDay","calendarEvent","renderOneEvent","dates","selectedId","bg","all_timed_month","is_event_short","_safe_copy","proto","event_pid","isPrototypeOf","event_length","old_prerender_events_line","old_prerender_events_table","prerender_events","ce","_virtual","isOvernightEvent","getNextDay","setDateTime","event_changed","re","redraw","next_day","old_get_visible_events","old_mode","old_date","oldUpdate","fullRedrawNeeded","collision","temp_section","before","collision_limit","_setTempSection","event_id","checked_mode","checkCollision","edited_ev","_roll_back_dates","_check_sections_collision","second","evs_dates","getRecDates","tevs","concurrent","single","container_autoresize","month_day_min_height","min_grid_size","min_map_size","old_pre_render_event","active","total_height","multiday_height","evl","_h_fix","navHeight","headerHeight","checked_divs","updateContainterHeight","is_repaint","checked_div","maxHeight","rows_length","year_y","week_agenda_scale_height","cur_height","eventsContainer","g","_gridView","y_unit","getSectionHeight","scrollWidth","getScrollSize","callUpdate","conditionalUpdateContainerHeight","asyncRepaint","requestAnimationFrame","autosizeEnabled","$original_scroll_width","$original_section_autoheight","section_autoheight","cookie","setCookie","cookie_param","getCookie","getCookieName","_get_url_nav","urlNavigationPlugin","schedulerCookie","unescape","newMode","old_load","notImplemented","daytimeline_restricted","drag_between_restricted","editors","cached_options","resetCombo","_combo","DOMParent","combo","unload","DOMelem","dhx_globalImgPath","image_path","dhtmlXCombo","options_height","setOptionHeight","enableFilteringMode","filtering","script_path","all_options","single_option","addOption","getIndexByValue","selectOption","selected_id","disable","setComboValue","getSelectedValue","getSelectedText","vertical","radiobuttons","checked_value","isChecked","check_html","label_html","checkbox","unchecked_value","expand","fullscreen","toggleIcon","_position","_width","_height","_overflow","overflow","_maximize","collapse","directions","prev_margin","grid_view","html_templates","all","keyboard_shortcuts","$keyboardNavigation","shortcuts","createCommand","modifiers","alt","ctrl","meta","shortcut","commands","expr","getExpressions","words","getWords","command","commandKeys","specialKeys","charCodeAt","getCommandFromEvent","domEvent","altKey","ctrlKey","metaKey","printableKey","fromCharCode","getHashFromEvent","getHash","parts","junctionChar","term","combinationChar","backspace","enter","esc","space","up","down","home","pageup","pagedown","insert","plus","f1","f2","f3","f4","f5","f6","f7","f8","f9","f10","f11","f12","eventhandler","EventHandler","_handlers","findHandler","doAction","unbind","bindAll","initKeys","trap_modal_focus","trapFocus","currentFocus","currentIndex","nextIndex","nextItem","divs","renderMultiple","currentStart","currentEnd","TimeSlot","_modes","_getMode","units","renderVerticalMarker","renderTimelineMarker","renderYearMarker","renderMonthMarker","weekAgenda","renderWeekAgendaMarker","renderAgendaMarker","dayColumns","addWaiAriaLabel","addDataAttributes","dateToStr","dateTimeLabel","sectionObject","markerDate","_wrapDiv","_get_year_cell","opacity","view_opts","areas","round_position","blocks","_trace_x","_is_column_visible","start_pos","end_pos","set_date_part","_timeline_getX","tempStart","tempEnd","_section_height","_isRender","renderMonthCell","weekNumber","dayIndex","datatable","inner_index","all_hours_height","hour_ms","lineHeight","scheduler_node","SchedulerNode","_compose","getDefaultNode","getMode","blur","enable","removeAttribute","_compareEvents","_pickEvent","startId","eventElement","Event","getNode","nextEventHandler","activeNode","dispatcher","nextEvent","currEvent","visibleDates","nextEv","setActiveNode","prevEventHandler","HeaderCell","getNodes","_key_nav_copy_paste","nav_node","KeyNavNode","moveTo","compareTo","canStringifyThis","canStringifyThat","header_cell","defaultCell","_getSection","_getNodes","eventNode","defaultElement","isScrolledIntoView","eventBox","viewPort","idSelector","inlineEditor","getInlineEditor","isMultisectionEvent","keepScrollPosition","_moveToSlot","slot","nextSlot","time_slot","movingDate","getDefaultDate","key_nav_step","_getDefaultSection","visibleTime","nowTime","showNowTime","findVisibleColumn","clone","timeslot","_getMultisectionView","_getNextSection","sectionId","isInRange","defaultSlot","DataArea","smart_rendering","_pasteDate","_pasteSection","addMonthDate","nextMonthSlot","_alignTimeSlot","nextTimelineSlot","newPos","nextUnitsSlot","optionsCount","nextDaySlot","_moveDate","isBeforeLastHour","isStartDate","minutes","isAfterFirstHour","isInVisibleDayTime","oldStart","toNextDay","testEnd","nextWeekAgendaSlot","nextAgendaSlot","isDateVisible","nextDateColumn","current","tempSlot","extendSlot","extendUnitsSlot","extendTimelineSlot","extendMonthSlot","extendDaySlot","extendWeekAgendaSlot","extendGenericSlot","allowedDirections","moveDate","newDates","extendSlotDates","oldSlot","newSlot","dateDirection","scrollSlot","minical_button","MinicalButton","globalNode","MinicalCell","minical_cell","_getGrid","_getNode","enabled","newRow","newCol","modals","modalsStack","isModal","afterPopup","startModal","endModal","isTopModal","currentTarget","traceLightbox","_keyNavMessagePopup","focusElement","backupFocus","core","getActiveNode","setDefaultNode","focusGlobalNode","blurNode","editor","keyDownHandler","defaultPrevented","schedulerNode","_timeout","key_nav_legacy","_temp_key_scope","key_nav","isCopy","trackMousePosition","mousePointer","keyNavPointer","elementFromPoint","clear_event_after","copyEvent","_make_pasted_event","multisection","_do_paste","is_copy","modified_ev","original_ev","_is_key_nav_active","getSelectedEvent","_buffer_event","new_ev","scheduler_handlers","attachSchedulerHandlers","focusHandler","waitCall","reFocusActiveNode","mousedownHandler","dataAreaClick","listOfScales","arrOfScales","some","focusEvent","evNode","prevState","lastStart","lastEnd","lastSection","minical_handlers","_minicalendars","isMinical","minicalendars","patchMinicalendar","focusMinical","minicalClick","rowIndex","td","renderMinical","cal","added","destroyMinical","_def_count","addShortcut","scope","scopeObject","getScope","getShortcutHandler","removeShortcut","disp","scopes","minicalButton","minicalDate","timeSlot","searchMap","attachOnce","isSchedulerSelected","changeState","layer","layers","validId","_clearUpdateFlag","_cloneObj","_dataprocessors","_layers_zindex","initial_layer_zindex","isDefault","defaultLayer","showLayer","tlayer","toggleLayer","hideLayer","visible","getLayer","layer_name","native_event_object","noMenu","_evs_layer","_t_render_view_data","evs_layer","borderBox","borderBoxWidth","headerWidth","bodyWidth","footerWidth","bodyHeight","new_zIndex","filter_agenda","limit_start","limit_end","limit_view","check_limits","mark_now","display_marked_timespans","overwrite_marked_timespans","_temp_limit_scope","dhx_time_block","default_timespan_type","fix_options","zones","get_resulting_options","blockTime","unblockTime","deleteMarkedTimespan","om","od","nm","nd","isBlocked","date_end","resetDate","checkInMarkedTimespan","timespan_type","on_overlap","temp_start_date","temp_end_date","timespans","_marked_timespans","day_value","day_index","getZones","_get_zone_minutes","eventEnd","markerStart","markerEnd","blocker","checkLimitViolation","complete_res","allow","_get_blocked_zones","timeline_zones","blocked_timeline_zones","_get_relevant_blocked_zones","_add_timespan_zones","resultZones","view_config","linker","is_new_event","data_copy","native_object","_mark_now","_mark_now_timer","dhx_now_time","_remove_mark_now","_append_mark_now","zone_start","start_index","end_index","units_l","r_divs","t_day","t_div","_render_marked_timespan","_prepare_timespan_options","r_configs","temp_configs","t_days","cloned_config","invert_zones","invertZones","view_key","t_config","c_config","t_sd","t_ed","zone_end","_get_dates_by_index","start_day","delta","t_date","_get_css_classes_by_config","css_classes","_get_block_by_config","date_to_display","min_day","sday","block_proto","_mark_timespans","_on_scale_add_marker","markTimespan","configuration","rebuild_els","timespans_ids","_marked_timespans_ids","timespan_types","_marked_timespans_types","unmarkTimespan","_addMarkerTimespanConfig","unit_id","timespans_view","day_configs","_array","configs","current_zones","resulting_zones","c_zone_start","c_zone_end","isLast","_subtract_timespan_zones","is_modified","_delete_marked_timespan_by_id","parent_array","_delete_marked_timespan_by_config","viewspans","_delete_marked_timespans_list","dayConfig","day_timespans","d_t","related_zones","types","typedConfig","_get_types_to_render","specific","types_to_render","_get_configs_to_render","_get_unit_index","day_ind","unitsPerDay","unit_zones","unit_types","global_data","day_types","dblclick_dhx_marked_timespan","map_view","mapView","geocoder","points","markers","infoWindow","createMarker","google","maps","Marker","map_date_width","map_icon_width","map_description_width","map_resolve_event_location","map_resolve_user_location","map_initial_position","LatLng","map_error_position","map_infowindow_max_width","map_type","MapTypeId","ROADMAP","map_zoom_after_resolve","marker_geo_success","marker_geo_fail","marker_date","marker_text","event_location","dblclick_dhx_map_area","map_time","map_text","map_start","add_map","map_date","_latLngUpdate","_isMapPositionSet","gmap","dhx_gmap","_setMapSize","mapOptions","zoom","map_initial_zoom","center","mapTypeId","Map","disableDefaultUI","disableDoubleClickZoom","addListener","point","latLng","geocode","results","GeocoderStatus","OK","geometry","location","lat","lng","formatted_address","infoWindowOptions","maxWidth","_points","_markers","_infowindow","InfoWindow","_infowindows_content","_initialization_count","Geocoder","geolocation","getCurrentPosition","_userLocation","coords","latitude","longitude","setCenter","setZoom","setContent","getCenter","setPosition","getZoom","fill_map_tab","showAddress","clear_map_tab","_selected_event_id","close","setMap","ariaButtonAttr","elem_id","marginRight","marginLeft","marginTop","temp_center","map_end","trigger","selectEvent","performClick","_displayEventOnMap","address","language","_updateEventLocation","_delay","ret","old_event_id","new_event_id","_event_resolve_delay","minical","minicalDomEvents","minicalendar","mark_events","_synced_minicalendars","_prev","is_refresh","cont","tpos","_get_def_cont","_render_calendar","$dom","cellRoot","dateAttribute","unmarkCalendar","markCalendar","_last_date","conf","markedDates","_markCalendarCurrentDate","sync","_on_xle_handler","refreshOnLoad","updateCalendar","_created","_locateCalendar","weekNum","dat","dayCell","_week_template","week_template","dummy_date","_mini_cal_arrows","previous","ts","temp2","temp3","temp4","temp5","temp6","temp7","temp8","padding","weekHeader","move_minicalendar_date","css_classnames","css_texts","diffs","arrow","dayHeaders","dayCells","inputs","selects","inp","number","new_date","_update_minical_select","isFulldayEvent","_attach_action","_round_minutes","linkCalendar","datediff","dateNew","month_end","noHighlight","monthheight","old_s","multisection_restricted","multiselect","parseXMLOptions","parseJSONOptions","_result","_children","_mark_inputs","_ids","delimiter","script_url","divLoading","multisource","backup","mvc","use_id","sanitize","update_timer","_start_ext_load","_finish_ext_load","_get_id","model","cid","backbone","toJSON","changes","queue","add_from_queue","Backbone","Collection","dragger","dhtmlDragAndDropObject","stopDrag","last_event","on_drop","sourceHtmlObject","dhtmlObject","targetHtmlObject","targetHtml","action_data","event_data","view_options","_locate_cell_timeline","addDragLanding","_drag","_dragIn","shtmlObject","_dragOut","DragControl","addDrop","onDrop","sourceDhtmlx","getMaster","onDragIn","pdf","html_regexp","newline_regexp","clean_html","x_norm","parseFloat","colsWidth","x_norm_event","is_left","dhx_cal_header","y_norm","get_style","de_day","de_week","xml_start","xml_end","xml_top","profile","footer","xml_body_header","dhx_cal_date","xh","xml_month_scale","xml_month","yh","xhs","second_scale","top_width","top_col","xml_body","colors","week_starts","_month","text_color","zx","zdx","left_norm","zy","zdy","e_type","dets","week","dy_copy","toXML","original_date","original_mode","temp_date","getPDFData","send_xml","submit","to_pdf","schedulersToPdf","objects","toPDF","toPDFRange","quick_info","show_quick_info","showQuickInfo","hiding_function","hideQuickInfo","quick_info_title","quick_info_content","quick_info_date","_quick_info_box_id","_get_event_counter_part","_quick_info_box","_init_quick_info","_fill_quick_data","_show_quick_info","cssTimeToMs","milliseconds","forced","qi","_x_scroll","dataPos","_quick_info_onscroll_handler","$testmode","_qi_button_click","domEv","titleContent","titleDate","main","mainContent","originalRecurringSetValue","original_left_buttons","original_right_buttons","readonly_form","forbidden_buttons","button_arrays","forbidden_button","button_array","txt_replace","txts","txtt","originalForm","readonlyForm","_lightbox_r","occurrence_timestamp_in_utc","recurring_workdays","_get_node","_outer_html","outerHTML","getOuterHTML","rec","loc","repeat_date_of_end","_ds","_get_form_node","_get_node_value","_get_node_numeric_value","_set_node_value","hash_value","_init_set_value","_end_date","str_date_format","repeat_date","str_date","include_end_by","date_str","register_els","inps","formatter","change_current_view","get_repeat_code","get_rcode","repeat","get_end_rule","transpose_type","transp","set_end_rule","has_values","_get_repeat_code","get_numeric_value","repeat_precise","_start","start_exists","transpose_day_week","set_rcode","set_repeat_code","dispatchEvent","MouseEvent","_set_repeat_code","elements","_rec_init_done","rf","blocked","_is_modified_occurence","_toggle_block","actual_dates","timeControl","getTimeSection","_start_date","_get_button","getRecurringSection","_get_form","backgroundPosition","getFirstSectionOfType","_rec_markers","_rec_markers_pull","_pid_time","_get_rec_marker","ch","_get_rec_markers","clearMilliseconds","_rec_temp","old_add_event","ev_id","_ignore_call","tev","_pid_changed","nid","nev","sub","isEventFound","showLightbox_rec","lightbox_recurring","pid","isVirtual","showSeries","title_confirm_recurring","get_visible_events_rec","old_update_event","transponse_size","day_week","originalMonth","cday","newMonth","cor","cor2","transposeRecurring","recurringParts","dayDurationMs","addRecurring","recurringStepDays","weekDays","seriesInstance","currentCount","maxCount","origMonth","origYear","correctOverflowInstances","recurring_overflow_instances","getMilliseconds","non_render","startHour","visibleCount","_fix_daylight_saving_date","ted","recurrings","sev","data_attributes","all_events","_serialize_json_value","toICal","full_day_format","timeline_restricted","Tooltip","_scheduler","_tooltipNode","_root","_isLikeMouseEvent","_calculateTooltipPosition","viewport","_getViewPortSize","tooltipNode","tooltip","offsetX","tooltip_offset_x","offsetY","tooltip_offset_y","mouse","containerPos","scrollY","_getViewPort","scrollX","$event_data","$event","TooltipManager","_listeners","_initDelayedFunctions","delayHide","watchableTarget","eventTarget","targetNode","doOnMouseEnter","onmouseenter","onmousemove","onmouseleave","listener","cloneDomEvent","delayShow","utils.default","show","tooltip_timeout","tooltip_hide_timeout","tooltipManager","tooltips","tooltipFor","touch_tooltip","targetEventId","hideTooltip","treetimeline_restricted","units_restricted","s2d","d2s","select_event","week_agenda_restricted","wp","year_view","year_date","year_month","year_scale_date","year_tooltip","isYearMode","getCellDate","dblclick_dhx_month_head","_year_render_event","_year_marked_cells","_hideToolTip","_tooltip","_showToolTip","_year_view_tooltip_handler","_init_year_tooltip","_mark_year_date","_unmark_year_date","_reset_year_scale","year_top","ssd","yearBox","year_x","yearStart","datepicker","locateEvent","export_api","std","getElementSizes","sizes","dhtmlxAjax","dhx4","add_export_methods","orientation","dpi","_export_html","_send_to_export","exportToICal","_serialize_plain","exportToExcel","_serialize_columns","_ajax_to_export","server","fail","_plain_export_copy","$text","_create_hidden_form","_hidden_export_form","_get_export_size","A5","A4","A3","A2","A1","A0","dataX","dataY","headY","multY","cSize","getTimeline","getInitialSizes","smartRendering","style_width","style_height","timeline_scrollable","timeline_smart_rendering","setExportSizes","initialSizes","setInitialSizes","gplExtensions","drag_between","factory","$dhx"],"mappings":"AACe,SAAAA,aAEf;AAAA,MAAA,OAAWC,UAAU,eAAeA,OAAOC,UAAU;AACpDD,WAAOC,SAASC,kBAAkB,SAAUC,KAAKC,MAAMC,MAAMC,YAAAA;AAC5D,UAAID,OAAOA,QAAQ;AACnB,UAAIE,MAAMC,SAASC,cAAc,KAAA;AACjCF,UAAIG,KAAK,iBAAiBC,KAAKC,QAAQ,EAAA;AACvCL,UAAIM,YAAY,cAAcN,IAAIG,KAAK,qPAAqPL,OAAO;AACnSG,eAASM,KAAKC,YAAYR,IAAIS,UAAAA;AAE9BL,WAAKM,aAAaV,IAAIG,IAAI,OAAO,IAEjCC;AAAAA,WAAKO,GAAGP,KAAKQ,EAAIC,EAAAA,QAAQd;AACzBK,WAAKO,GAAGP,KAAKQ,EAAAA,EAAIE,UAAUd,IAAIG;AAC/BJ,MAAAA,WAAUgB,WAAWhB,WAAUiB;AAC/BjB,MAAAA,WAAUkB,aAAa;;AACvBlB,MAAAA,WAAUmB,KAAKlB,IAAIG,IAAIP,KAAKC,IAAAA;AAE5B,aAAOO,KAAKO,GAAGP,KAAKe,aAAgBN,CAAAA,EAAAA;AAAAA,IACtC;AAAA,EACA;AAEA;;ACrBA,IAAIO;AACJ,IAAA,OAAUC,WAAW,aAAY;AAChCD,gBAAcC;AACf,OAAK;AACJD,gBAAcE;AACf;AAGA,MAAAC,WAAeH;ACVA,SAAQI,OAACzB,YAAAA;AACvB,SAAO,SAASyB,QAAOC,OAAOC,UAC7B;AAAA,QAAA,CAAKD,OAAM;AACV,UAAG1B,WAAU4B,OAAOC,eAAe7B,WAAU8B,UAAU,WAAU,CAACH,QAAAA,CAAAA,MAAc,OAAO;AACtF,YAAI3B,WAAU2B,SAAS;AACtB3B,UAAAA,WAAU2B,QAAQ,EAACI,MAAM,SAASC,MAAML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AA,MAACD,cAAY,EACjBqW,QAAQ55D,UAAUgN,KAAK07F,QAAQ9uC,QAAQ8uC,OAGxCpnG,EAAAA;AAAAA,OAAOtB,YAAYA;AACnBsB,OAAOiiD,YAAYA;AAEnB,IAAIjiD,CAAAA,OAAOqnG,MAAM;AAChBrnG,SAAOqnG,OAAO;AACf;AAEArnG,OAAOqnG,KAAK3oG,YAAYA;AACxBsB,OAAOqnG,KAAKplD,YAAYA;"} \ No newline at end of file diff --git a/codebase/sources/dhtmlxscheduler.js b/codebase/sources/dhtmlxscheduler.js index 759e7e5..a4ee7b6 100644 --- a/codebase/sources/dhtmlxscheduler.js +++ b/codebase/sources/dhtmlxscheduler.js @@ -524,14 +524,14 @@ scheduler2._init_once = function() { }; }; - var layout = { navbar: { render: function(config) { + const layout = { navbar: { render: function(config) { return scheduler2._init_nav_bar(config); } }, header: { render: function(config) { - var element = document.createElement("div"); + const element = document.createElement("div"); element.className = "dhx_cal_header"; return element; } }, dataArea: { render: function(config) { - var element = document.createElement("div"); + const element = document.createElement("div"); element.className = "dhx_cal_data"; return element; } }, html_element: { render: function(config) { @@ -541,25 +541,25 @@ return !!(element.querySelector(".dhx_cal_header") && element.querySelector(".dhx_cal_data") && element.querySelector(".dhx_cal_navline")); } function createDefaultHeader(scheduler3) { - var views = ["day", "week", "month"]; - var date = ["date"]; - var nav = ["prev", "today", "next"]; + const views = ["day", "week", "month"]; + const date = ["date"]; + const nav = ["prev", "today", "next"]; if (scheduler3.matrix) { - for (var i in scheduler3.matrix) { + for (const i in scheduler3.matrix) { views.push(i); } } if (scheduler3._props) { - for (var i in scheduler3._props) { + for (const i in scheduler3._props) { views.push(i); } } if (scheduler3._grid && scheduler3._grid.names) { - for (var i in scheduler3._grid.names) { + for (const i in scheduler3._grid.names) { views.push(i); } } - var optionalViews = ["map", "agenda", "week_agenda", "year"]; + const optionalViews = ["map", "agenda", "week_agenda", "year"]; optionalViews.forEach(function(viewName) { if (scheduler3[viewName + "_view"]) { views.push(viewName); @@ -701,16 +701,16 @@ } }; scheduler2.get_elements = function() { - var els = this._obj.getElementsByTagName("DIV"); - for (var i = 0; i < els.length; i++) { - var class_name = scheduler2._getClassName(els[i]); - var attr_value = els[i].getAttribute("data-tab") || els[i].getAttribute("name") || ""; + const els = this._obj.getElementsByTagName("DIV"); + for (let i = 0; i < els.length; i++) { + let class_name = scheduler2._getClassName(els[i]); + const attr_value = els[i].getAttribute("data-tab") || els[i].getAttribute("name") || ""; if (class_name) class_name = class_name.split(" ")[0]; if (!this._els[class_name]) this._els[class_name] = []; this._els[class_name].push(els[i]); - var label = scheduler2.locale.labels[attr_value + "_tab"] || scheduler2.locale.labels[attr_value || class_name]; + let label = scheduler2.locale.labels[attr_value + "_tab"] || scheduler2.locale.labels[attr_value || class_name]; if (typeof label !== "string" && attr_value && !els[i].innerHTML) label = attr_value.split("_")[0]; if (label) { @@ -719,14 +719,14 @@ } } }; - var domEventsScope = scheduler2._createDomEventScope(); + const domEventsScope = scheduler2._createDomEventScope(); scheduler2.unset_actions = function() { domEventsScope.detachAll(); }; scheduler2.set_actions = function() { - for (var a in this._els) { + for (const a in this._els) { if (this._click[a]) { - for (var i = 0; i < this._els[a].length; i++) { + for (let i = 0; i < this._els[a].length; i++) { const element = this._els[a][i]; const handler = this._click[a].bind(element); domEventsScope.attach(element, "click", handler); @@ -752,13 +752,11 @@ domEventsScope.attach(this._obj, "dblclick", function(e) { scheduler2._on_dbl_click(e); }); - domEventsScope.attach(this._obj, "contextmenu", function(e) { + domEventsScope.attach(this._obj, "contextmenu", function(event2) { if (scheduler2.checkEvent("onContextMenu")) { - e.preventDefault(); + event2.preventDefault(); } - var ev = e; - var src = ev.target || ev.srcElement; - var returnValue = scheduler2.callEvent("onContextMenu", [scheduler2._locate_event(src), ev]); + const returnValue = scheduler2.callEvent("onContextMenu", [scheduler2._locate_event(event2.target), event2]); return returnValue; }); }; @@ -775,13 +773,15 @@ this.callEvent("onEventSelected", [id2]); }; scheduler2.unselect = function(id2) { - if (id2 && id2 != this._select_id) + if (id2 && id2 != this._select_id) { return; - var t = this._select_id; + } + const previousSelection = this._select_id; this._select_id = null; - if (t && this.getEvent(t)) - this.updateEvent(t); - this.callEvent("onEventUnselected", [t]); + if (previousSelection && this.getEvent(previousSelection)) { + this.updateEvent(previousSelection); + } + this.callEvent("onEventUnselected", [previousSelection]); }; scheduler2.getState = function() { return { mode: this._mode, date: new Date(this._date), min_date: new Date(this._min_date), max_date: new Date(this._max_date), editor_id: this._edit_id, lightbox_id: this._lightbox_id, new_event: this._new_event, select_id: this._select_id, expanded: this.expanded, drag_id: this._drag_id, drag_mode: this._drag_mode }; @@ -794,8 +794,7 @@ scheduler2._ignore_next_click = false; return false; } - var trg = e.target; - var id2 = scheduler2._locate_event(trg); + const id2 = scheduler2._locate_event(e.target); if (!id2) { scheduler2.callEvent("onEmptyClick", [scheduler2.getActionData(e).date, e]); } else { @@ -804,8 +803,8 @@ } if (id2 && scheduler2.config.select) { scheduler2.select(id2); - const icon = trg.closest(".dhx_menu_icon"); - var mask = scheduler2._getClassName(icon); + const icon = e.target.closest(".dhx_menu_icon"); + const mask = scheduler2._getClassName(icon); if (mask.indexOf("_icon") != -1) scheduler2._click.buttons[mask.split(" ")[1].replace("icon_", "")](id2); } else { @@ -817,7 +816,7 @@ }, dhx_cal_prev_button: function() { scheduler2._click.dhx_cal_next_button(0, -1); }, dhx_cal_next_button: function(dummy, step) { - var def_step = 1; + let def_step = 1; if (scheduler2.config.rtl) { step = -step; def_step = -def_step; @@ -828,12 +827,12 @@ scheduler2.setCurrentView(scheduler2._currentDate()); } }, dhx_cal_tab: function() { - var name = this.getAttribute("data-tab"); - var deprecated_name = this.getAttribute("name"); - var mode = name || deprecated_name.substring(0, deprecated_name.search("_tab")); + const name = this.getAttribute("data-tab"); + const deprecated_name = this.getAttribute("name"); + const mode = name || deprecated_name.substring(0, deprecated_name.search("_tab")); scheduler2.setCurrentView(scheduler2._date, mode); }, buttons: { delete: function(id2) { - var c = scheduler2.locale.labels.confirm_deleting; + const c = scheduler2.locale.labels.confirm_deleting; scheduler2._dhtmlx_confirm({ message: c, title: scheduler2.locale.labels.title_confirm_deleting, callback: function() { scheduler2.deleteEvent(id2); }, config: { ok: scheduler2.locale.labels.icon_delete } }); @@ -852,45 +851,47 @@ if (!message2) return callback(); config = config || {}; - var opts = { ...config, text: message2 }; - if (title) + const opts = { ...config, text: message2 }; + if (title) { opts.title = title; + } if (callback) { opts.callback = function(result) { - if (result) + if (result) { callback(); + } }; } scheduler2.confirm(opts); }; scheduler2.addEventNow = function(start, end, e) { - var base = {}; + let base = {}; if (scheduler2._isObject(start) && !scheduler2._isDate(start)) { base = start; start = null; } - var d = (this.config.event_duration || this.config.time_step) * 6e4; + const duration = (this.config.event_duration || this.config.time_step) * 6e4; if (!start) - start = base.start_date || Math.round(scheduler2._currentDate().valueOf() / d) * d; - var start_date = new Date(start); + start = base.start_date || Math.round(scheduler2._currentDate().valueOf() / duration) * duration; + let start_date = new Date(start); if (!end) { - var start_hour = this.config.first_hour; + let start_hour = this.config.first_hour; if (start_hour > start_date.getHours()) { start_date.setHours(start_hour); start = start_date.valueOf(); } - end = start.valueOf() + d; + end = start.valueOf() + duration; } - var end_date = new Date(end); + let end_date = new Date(end); if (start_date.valueOf() == end_date.valueOf()) - end_date.setTime(end_date.valueOf() + d); + end_date.setTime(end_date.valueOf() + duration); base.start_date = base.start_date || start_date; base.end_date = base.end_date || end_date; base.text = base.text || this.locale.labels.new_event; base.id = this._drag_id = base.id || this.uid(); this._drag_mode = "new-size"; this._loading = true; - var eventId = this.addEvent(base); + const eventId = this.addEvent(base); this.callEvent("onEventCreated", [this._drag_id, e]); this._loading = false; this._drag_event = {}; @@ -898,10 +899,10 @@ return eventId; }; scheduler2._on_dbl_click = function(e, src) { - src = src || (e.target || e.srcElement); + src = src || e.target; if (this.config.readonly) return; - var name = scheduler2._getClassName(src).split(" ")[0]; + const name = scheduler2._getClassName(src).split(" ")[0]; switch (name) { case "dhx_scale_holder": case "dhx_scale_holder_now": @@ -917,8 +918,8 @@ case "dhx_cal_agenda_event_line": case "dhx_grid_event": case "dhx_cal_event_line": - case "dhx_cal_event_clear": - var id2 = this._locate_event(src); + case "dhx_cal_event_clear": { + const id2 = this._locate_event(src); if (!this.callEvent("onDblClick", [id2, e])) return; if (this.config.details_on_dblclick || this._table_view || !this.getEvent(id2)._timed || !this.config.select) @@ -926,25 +927,27 @@ else this.edit(id2); break; + } case "dhx_time_block": case "dhx_cal_container": return; - default: - var t = this["dblclick_" + name]; - if (t) { - t.call(this, e); + default: { + const viewHandler = this["dblclick_" + name]; + if (viewHandler) { + viewHandler.call(this, e); } else { if (src.parentNode && src != this) return scheduler2._on_dbl_click(e, src.parentNode); } break; + } } }; scheduler2._get_column_index = function(x_pos) { - var column = 0; + let column = 0; if (this._cols) { - var width = 0; - var i = 0; + let width = 0; + let i = 0; while (width + this._cols[i] < x_pos && i < this._cols.length) { width += this._cols[i]; i++; @@ -964,20 +967,20 @@ if (!this._cols) { return pos; } else { - var column = this._get_column_index(pos.x); + const column = this._get_column_index(pos.x); pos.x = Math.min(this._cols.length - 1, Math.max(0, Math.ceil(column) - 1)); pos.y = Math.max(0, Math.ceil(pos.y * 60 / (this.config.time_step * this.config.hour_size_px)) - 1) + this.config.first_hour * (60 / this.config.time_step); return pos; } }; scheduler2._mouse_coords = function(ev) { - var pos; - var b = document.body; - var d = document.documentElement; + let pos; + const body = document.body; + const documentElement = document.documentElement; if (!this.$env.isIE && (ev.pageX || ev.pageY)) pos = { x: ev.pageX, y: ev.pageY }; else - pos = { x: ev.clientX + (b.scrollLeft || d.scrollLeft || 0) - b.clientLeft, y: ev.clientY + (b.scrollTop || d.scrollTop || 0) - b.clientTop }; + pos = { x: ev.clientX + (body.scrollLeft || documentElement.scrollLeft || 0) - body.clientLeft, y: ev.clientY + (body.scrollTop || documentElement.scrollTop || 0) - body.clientTop }; if (this.config.rtl && this._colsS) { pos.x = this.$container.querySelector(".dhx_cal_data").offsetWidth - pos.x; pos.x += this.$domHelpers.getAbsoluteLeft(this._obj); @@ -987,20 +990,20 @@ } else { pos.x -= this.$domHelpers.getAbsoluteLeft(this._obj) + (this._table_view ? 0 : this.xy.scale_width); } - var dataArea = this.$container.querySelector(".dhx_cal_data"); + const dataArea = this.$container.querySelector(".dhx_cal_data"); pos.y -= this.$domHelpers.getAbsoluteTop(dataArea) - this._els["dhx_cal_data"][0].scrollTop; pos.ev = ev; - var handler = this["mouse_" + this._mode]; + const handler = this["mouse_" + this._mode]; if (handler) { pos = handler.call(this, pos); } else { if (!this._table_view) { pos = this._week_indexes_from_pos(pos); } else { - var column = this._get_column_index(pos.x); + const column = this._get_column_index(pos.x); if (!this._cols || !this._colsS) return pos; - var dy = 0; + let dy = 0; for (dy = 1; dy < this._colsS.heights.length; dy++) if (this._colsS.heights[dy] > pos.y) break; @@ -1022,11 +1025,11 @@ }; scheduler2._close_not_saved = function() { if ((/* @__PURE__ */ new Date()).valueOf() - (scheduler2._new_event || 0) > 500 && scheduler2._edit_id) { - var c = scheduler2.locale.labels.confirm_closing; - scheduler2._dhtmlx_confirm({ message: c, title: scheduler2.locale.labels.title_confirm_closing, callback: function() { + const confirmationText = scheduler2.locale.labels.confirm_closing; + scheduler2._dhtmlx_confirm({ message: confirmationText, title: scheduler2.locale.labels.title_confirm_closing, callback: function() { scheduler2.editStop(scheduler2.config.positive_closing); } }); - if (c) { + if (confirmationText) { this._drag_id = this._drag_pos = this._drag_mode = null; } } @@ -1041,26 +1044,28 @@ if (!(old_pos && this._drag_pos)) { return true; } - var delay2 = 100, d_pos = 5; + const delay2 = 100; + const d_pos = 5; return !!(this._drag_pos.has_moved || !this._drag_pos.timestamp || new_pos.timestamp - this._drag_pos.timestamp > delay2 || diff(old_pos.ev.clientX, new_pos.ev.clientX, d_pos) || diff(old_pos.ev.clientY, new_pos.ev.clientY, d_pos)); }; scheduler2._correct_drag_start_date = function(start) { - var obj; + let obj; if (scheduler2.matrix) obj = scheduler2.matrix[scheduler2._mode]; obj = obj || { x_step: 1, x_unit: "day" }; start = new Date(start); - var len = 1; + let len = 1; if (obj._start_correction || obj._end_correction) len = (obj.last_hour || 0) * 60 - (start.getHours() * 60 + start.getMinutes()) || 1; return start * 1 + (scheduler2._get_fictional_event_length(start, len, obj) - len); }; scheduler2._correct_drag_end_date = function(start, duration) { - var obj; - if (scheduler2.matrix) + let obj; + if (scheduler2.matrix) { obj = scheduler2.matrix[scheduler2._mode]; + } obj = obj || { x_step: 1, x_unit: "day" }; - var end = start * 1 + scheduler2._get_fictional_event_length(start, duration, obj); + const end = start * 1 + scheduler2._get_fictional_event_length(start, duration, obj); return new Date(end * 1 - (scheduler2._get_fictional_event_length(end, -1, obj, -1) + 1)); }; scheduler2._on_mouse_move = function(e) { @@ -1984,9 +1989,9 @@ const intervalStart = new Date(Math.max(check.valueOf(), startDate.valueOf())); const intervalEnd = endDate; const leftCellCutOffStart = new Date(intervalStart.getFullYear(), intervalStart.getMonth(), intervalStart.getDate(), config.first_hour); - const leftCellCutOffEnd = new Date(intervalStart.getFullYear(), intervalStart.getMonth(), intervalStart.getDate(), config.last_hour); + const leftCellCutOffEnd = new Date(intervalStart.getFullYear(), intervalStart.getMonth(), intervalStart.getDate(), config.last_hour || 24); const rightCellCutOffStart = new Date(endDate.getFullYear(), endDate.getMonth(), endDate.getDate(), config.first_hour); - const rightCellCutOffEnd = new Date(endDate.getFullYear(), endDate.getMonth(), endDate.getDate(), config.last_hour); + const rightCellCutOffEnd = new Date(endDate.getFullYear(), endDate.getMonth(), endDate.getDate(), config.last_hour || 24); if (intervalEnd.valueOf() > rightCellCutOffEnd.valueOf()) { excludedDuration += intervalEnd - rightCellCutOffEnd; } @@ -2699,7 +2704,7 @@ }; } var isWindowAwailable = typeof window !== "undefined"; - const env = { isIE: isWindowAwailable && (navigator.userAgent.indexOf("MSIE") >= 0 || navigator.userAgent.indexOf("Trident") >= 0), isIE6: isWindowAwailable && (!XMLHttpRequest && navigator.userAgent.indexOf("MSIE") >= 0), isIE7: isWindowAwailable && (navigator.userAgent.indexOf("MSIE 7.0") >= 0 && navigator.userAgent.indexOf("Trident") < 0), isIE8: isWindowAwailable && (navigator.userAgent.indexOf("MSIE 8.0") >= 0 && navigator.userAgent.indexOf("Trident") >= 0), isOpera: isWindowAwailable && navigator.userAgent.indexOf("Opera") >= 0, isChrome: isWindowAwailable && navigator.userAgent.indexOf("Chrome") >= 0, isKHTML: isWindowAwailable && (navigator.userAgent.indexOf("Safari") >= 0 || navigator.userAgent.indexOf("Konqueror") >= 0), isFF: isWindowAwailable && navigator.userAgent.indexOf("Firefox") >= 0, isIPad: isWindowAwailable && navigator.userAgent.search(/iPad/gi) >= 0, isEdge: isWindowAwailable && navigator.userAgent.indexOf("Edge") != -1, isNode: !isWindowAwailable || typeof navigator == "undefined" }; + const env = { isIE: isWindowAwailable && (navigator.userAgent.indexOf("MSIE") >= 0 || navigator.userAgent.indexOf("Trident") >= 0), isOpera: isWindowAwailable && navigator.userAgent.indexOf("Opera") >= 0, isChrome: isWindowAwailable && navigator.userAgent.indexOf("Chrome") >= 0, isKHTML: isWindowAwailable && (navigator.userAgent.indexOf("Safari") >= 0 || navigator.userAgent.indexOf("Konqueror") >= 0), isFF: isWindowAwailable && navigator.userAgent.indexOf("Firefox") >= 0, isIPad: isWindowAwailable && navigator.userAgent.search(/iPad/gi) >= 0, isEdge: isWindowAwailable && navigator.userAgent.indexOf("Edge") != -1, isNode: !isWindowAwailable || typeof navigator == "undefined" }; function extend$g(scheduler2) { scheduler2.destructor = function() { scheduler2.callEvent("onDestroy", []); @@ -3021,10 +3026,10 @@ }; }; var csp_str_to_date = function(format, utc) { + const mask = format.match(/%[a-zA-Z]/g); return function(date) { var set = [0, 0, 1, 0, 0, 0]; var temp = date.match(/[a-zA-Z]+|[0-9]+/g); - var mask = format.match(/%[a-zA-Z]/g); for (var i = 0; i < mask.length; i++) { switch (mask[i]) { case "%j": @@ -3071,18 +3076,23 @@ return new Date(set[0], set[1], set[2], set[3], set[4], set[5]); }; }; - var canUseCsp = false; - (function() { + let cspEnabled = void 0; + function checkIfCSPEnabled() { try { - new Function("canUseCsp = false;"); + new Function("cspEnabled = false;"); + cspEnabled = false; } catch (e) { - canUseCsp = true; + cspEnabled = true; } - })(); + return cspEnabled; + } function useCsp() { var result = false; if (scheduler2.config.csp === "auto") { - result = canUseCsp; + if (cspEnabled === void 0) { + cspEnabled = checkIfCSPEnabled(); + } + result = cspEnabled; } else { result = scheduler2.config.csp; } @@ -3097,14 +3107,6 @@ var t = scheduler2.locale.date.month_full_hash = {}; for (var i = 0; i < s.length; i++) t[s[i]] = i; - }, _bind_host_object: function(method) { - if (method.bind) { - return method.bind(scheduler2); - } else { - return function() { - return method.apply(scheduler2, arguments); - }; - } }, date_part: function(date) { var old = new Date(date); date.setHours(0); @@ -3228,7 +3230,7 @@ if (utc) format = format.replace(/date\.get/g, "date.getUTC"); var func = new Function("date", 'return "' + format + '";'); - return scheduler2.date._bind_host_object(func); + return func.bind(scheduler2); }, str_to_date: function(format, utc, exactFormat) { var stringToDateMethod = useCsp() ? csp_str_to_date : generateStringToDate; var parseExactFormat = stringToDateMethod(format, utc); @@ -3924,6 +3926,7 @@ ev._sweek = Math.floor((this._correct_shift(sd.valueOf(), 1) - this._min_date.valueOf()) / (60 * 60 * 1e3 * 24 * cols)); var isAnyCellVisible = scheduler2._is_any_multiday_cell_visible(sd, ed, ev); if (!isAnyCellVisible) { + start_date = null; continue; } var stack = weeks[ev._sweek]; @@ -4924,7 +4927,8 @@ return node.innerHTML || ""; }, focus: function(node) { } }, textarea: { render: function(sns) { - return "
"; + const placeholder = sns.placeholder ? `placeholder='${sns.placeholder}'` : ""; + return `
`; }, set_value: function(node, value, ev) { scheduler2.form_blocks.textarea._get_input(node).value = value || ""; }, get_value: function(node, ev) { @@ -7616,7 +7620,7 @@ } } function factoryMethod(extensionManager) { - const scheduler2 = { version: "7.0.3" }; + const scheduler2 = { version: "7.0.4" }; extend$n(scheduler2); extend$i(scheduler2); extend$j(scheduler2); @@ -8043,6 +8047,11 @@ scheduler2._els["dhx_cal_data"][0].innerHTML = html; } scheduler2._els["dhx_cal_data"][0].scrollTop = scrollTop; + let t = scheduler2._els["dhx_cal_data"][0].querySelectorAll(".dhx_cal_agenda_event_line"); + scheduler2._rendered = []; + for (var i = 0; i < t.length - 1; i++) { + scheduler2._rendered[i] = t[i]; + } } function renderEmptyView() { return `
${scheduler2.locale.labels.agenda_tab}
`; @@ -9336,7 +9345,7 @@ div.style.width = scheduler2._cols[dayIndex] + "px"; div.style.height = (scheduler2._colsS.heights[weekNumber + 1] - top || scheduler2._colsS.height) + "px"; var container = scheduler2.$container.querySelector(".dhx_cal_data"); - var datatable = container.querySelector("table"); + var datatable = container.querySelector(".dhx_cal_month_table"); if (datatable.nextSibling) { container.insertBefore(div, datatable.nextSibling); } else { @@ -10922,7 +10931,17 @@ function mousedownHandler(e) { if (!scheduler2.config.key_nav) return true; - var dataAreaClick = scheduler2.$keyboardNavigation.isChildOf(e.target || e.srcElement, scheduler2.$container.querySelector(".dhx_cal_data")); + const view = scheduler2.getView(); + let dataAreaClick = false; + if (scheduler2.getState().mode === "month") { + dataAreaClick = scheduler2.$keyboardNavigation.isChildOf(e.target || e.srcElement, scheduler2.$container.querySelector(".dhx_cal_month_table")); + } else if (view && view.layout === "timeline") { + dataAreaClick = scheduler2.$keyboardNavigation.isChildOf(e.target || e.srcElement, scheduler2.$container.querySelector(".dhx_timeline_data_col")); + } else { + const listOfScales = scheduler2.$container.querySelectorAll(".dhx_scale_holder"); + const arrOfScales = Array.from(listOfScales); + dataAreaClick = arrOfScales.some((scale) => scale === e.target.parentNode); + } var pos = scheduler2.getActionData(e); var focusNode; if (scheduler2._locate_event(e.target || e.srcElement)) { diff --git a/codebase/sources/dhtmlxscheduler.js.map b/codebase/sources/dhtmlxscheduler.js.map index a837d3a..54edff3 100644 --- a/codebase/sources/dhtmlxscheduler.js.map +++ b/codebase/sources/dhtmlxscheduler.js.map @@ -1 +1 @@ -{"version":3,"file":"dhtmlxscheduler.js","sources":["../../sources/dhtmlx_hook.js","../../sources/global.js","../../sources/core/common/assert.js","../../sources/core/common_errors.js","../../sources/core/connector.js","../../sources/core/nav_bar.js","../../sources/core/scheduler_resize_listener.js","../../sources/utils/eventable.js","../../sources/core/scheduler.js","../../sources/core/utils/event.js","../../sources/core/utils/scoped_event.js","../../sources/core/common.js","../../sources/core/wai_aria.js","../../sources/core/utils/utils.js","../../sources/core/utils/dom_helpers.js","../../sources/utils/env.js","../../sources/core/destructor.js","../../sources/core/common/url_serialize.js","../../sources/core/utils/ajax.js","../../sources/core/base.js","../../sources/core/config.js","../../sources/core/event.js","../../sources/core/event_highlight.js","../../sources/core/loaders/xml.js","../../sources/core/loaders/json.js","../../sources/core/loaders/ical.js","../../sources/core/common/get_serializable_events.js","../../sources/core/load.js","../../sources/core/lightbox.js","../../sources/core/touch.js","../../sources/core/dhtmlx/dhtmlx_suite_hooks.js","../../sources/core/skins.js","../../sources/core/jquery.js","../../sources/core/delay_render.js","../../sources/core/dataprocessor/dataprocessor_hooks.js","../../sources/core/dataprocessor/dataprocessor.js","../../sources/core/message.js","../../sources/locale/locale_ar.js","../../sources/locale/locale_be.js","../../sources/locale/locale_ca.js","../../sources/locale/locale_cn.js","../../sources/locale/locale_cs.js","../../sources/locale/locale_da.js","../../sources/locale/locale_de.js","../../sources/locale/locale_el.js","../../sources/locale/locale_en.js","../../sources/locale/locale_es.js","../../sources/locale/locale_fi.js","../../sources/locale/locale_fr.js","../../sources/locale/locale_he.js","../../sources/locale/locale_hu.js","../../sources/locale/locale_id.js","../../sources/locale/locale_it.js","../../sources/locale/locale_jp.js","../../sources/locale/locale_manager.js","../../sources/locale/locale_nb.js","../../sources/locale/locale_nl.js","../../sources/locale/locale_no.js","../../sources/locale/locale_pl.js","../../sources/locale/locale_pt.js","../../sources/locale/locale_ro.js","../../sources/locale/locale_ru.js","../../sources/locale/locale_si.js","../../sources/locale/locale_sk.js","../../sources/locale/locale_sv.js","../../sources/locale/locale_tr.js","../../sources/locale/locale_ua.js","../../sources/locale/index.js","../../sources/core/datepicker.js","../../sources/scheduler_factory_method.js","../../sources/ext/extension_manager.js","../../sources/scheduler_factory.js","../../sources/ext/active_links.js","../../sources/ext/agenda_legacy_view.js","../../sources/ext/agenda.js","../../sources/ext/all_timed.js","../../sources/ext/collision.js","../../sources/ext/container_autoresize.js","../../sources/ext/cookie.js","../../sources/ext/restricted_extensions/not_implemented_extension.js","../../sources/ext/restricted_extensions/daytimeline.js","../../sources/ext/restricted_extensions/drag_between.js","../../sources/ext/editors.js","../../sources/ext/expand.js","../../sources/ext/restricted_extensions/grid_view.js","../../sources/ext/html_templates.js","../../sources/ext/keyboard_navigation/common/keyboard_shortcuts.js","../../sources/ext/keyboard_navigation/common/eventhandler.js","../../sources/ext/keyboard_navigation/common/trap_modal_focus.js","../../sources/ext/keyboard_navigation/marker.js","../../sources/ext/keyboard_navigation/elements/scheduler_node.js","../../sources/ext/keyboard_navigation/elements/nav_node.js","../../sources/ext/keyboard_navigation/elements/header_cell.js","../../sources/ext/keyboard_navigation/elements/event.js","../../sources/ext/keyboard_navigation/elements/time_slot.js","../../sources/ext/keyboard_navigation/elements/minical_button.js","../../sources/ext/keyboard_navigation/elements/minical_cell.js","../../sources/ext/keyboard_navigation/elements/data_area.js","../../sources/ext/keyboard_navigation/modals.js","../../sources/ext/keyboard_navigation/core.js","../../sources/ext/keyboard_navigation/key_nav_legacy.js","../../sources/ext/keyboard_navigation/scheduler_handlers.js","../../sources/ext/keyboard_navigation/minical_handlers.js","../../sources/ext/key_nav.js","../../sources/ext/layer.js","../../sources/ext/limit.js","../../sources/ext/map_view.js","../../sources/ext/minical.js","../../sources/ext/monthheight.js","../../sources/ext/restricted_extensions/multisection.js","../../sources/ext/multiselect.js","../../sources/ext/multisource.js","../../sources/ext/mvc.js","../../sources/ext/outerdrag.js","../../sources/ext/pdf.js","../../sources/ext/quick_info.js","../../sources/ext/readonly.js","../../sources/ext/recurring.js","../../sources/ext/serialize.js","../../sources/ext/restricted_extensions/timeline.js","../../sources/ext/tooltip/tooltip.ts","../../sources/ext/tooltip/tooltipManager.ts","../../sources/ext/tooltip/index.ts","../../sources/ext/restricted_extensions/treetimeline.js","../../sources/ext/restricted_extensions/units.js","../../sources/ext/url.js","../../sources/ext/restricted_extensions/week_agenda.js","../../sources/ext/wp.js","../../sources/ext/year_view.js","../../sources/ext/export_api/index.js","../../sources/ext/extensions_gpl.js","../../sources/dhtmlxscheduler.gpl.js"],"sourcesContent":["\r\nexport default function(){\r\n/* global dhtmlx */\r\nif (typeof dhtmlx != \"undefined\" && dhtmlx.attaches) {\r\n\tdhtmlx.attaches.attachScheduler = function (day, mode, tabs, scheduler) {\r\n\t\tvar tabs = tabs || '
';\r\n\t\tvar obj = document.createElement(\"DIV\");\r\n\t\tobj.id = \"dhxSchedObj_\" + this._genStr(12);\r\n\t\tobj.innerHTML = '
' + tabs + '
';\r\n\t\tdocument.body.appendChild(obj.firstChild);\r\n\r\n\t\tthis.attachObject(obj.id, false, true);\r\n\r\n\t\tthis.vs[this.av].sched = scheduler;\r\n\t\tthis.vs[this.av].schedId = obj.id;\r\n\t\tscheduler.setSizes = scheduler.updateView;\r\n\t\tscheduler.destructor = function () { };\r\n\t\tscheduler.init(obj.id, day, mode);\r\n\r\n\t\treturn this.vs[this._viewRestore()].sched;\r\n\t};\r\n}\r\n\r\n}","\r\n/* eslint-disable no-restricted-globals */\r\nvar globalScope;\r\nif(typeof window !== \"undefined\"){\r\n\tglobalScope = window;\r\n}else{\r\n\tglobalScope = global;\r\n}\r\n/* eslint-enable no-restricted-globals */\r\n\r\nexport default globalScope;","export default function(scheduler){\r\n\treturn function assert(check, message){\r\n\t\tif (!check){\r\n\t\t\tif(scheduler.config.show_errors && scheduler.callEvent(\"onError\",[message]) !== false) {\r\n\t\t\t\tif (scheduler.message) {\r\n\t\t\t\t\tscheduler.message({type: \"error\", text: message, expire: -1});\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t// eslint-disable-next-line\r\n\t\t\t\t\tconsole.log(message);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// eslint-disable-next-line no-debugger\r\n\t\t\t\tdebugger;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n}","export default function extend(scheduler) {\r\n\r\nvar commonViews = {\r\n\tagenda: \"https://docs.dhtmlx.com/scheduler/agenda_view.html\",\r\n\tgrid: \"https://docs.dhtmlx.com/scheduler/grid_view.html\",\r\n\tmap: \"https://docs.dhtmlx.com/scheduler/map_view.html\",\r\n\tunit: \"https://docs.dhtmlx.com/scheduler/units_view.html\",\r\n\ttimeline: \"https://docs.dhtmlx.com/scheduler/timeline_view.html\",\r\n\tweek_agenda: \"https://docs.dhtmlx.com/scheduler/weekagenda_view.html\",\r\n\tyear: \"https://docs.dhtmlx.com/scheduler/year_view.html\",\r\n\tanythingElse: \"https://docs.dhtmlx.com/scheduler/views.html\"\r\n};\r\n\r\nvar requiredExtensions = {\r\n\tagenda: \"ext/dhtmlxscheduler_agenda_view.js\",\r\n\tgrid: \"ext/dhtmlxscheduler_grid_view.js\",\r\n\tmap: \"ext/dhtmlxscheduler_map_view.js\",\r\n\tunit: \"ext/dhtmlxscheduler_units.js\",\r\n\ttimeline: \"ext/dhtmlxscheduler_timeline.js, ext/dhtmlxscheduler_treetimeline.js, ext/dhtmlxscheduler_daytimeline.js\",\r\n\tweek_agenda: \"ext/dhtmlxscheduler_week_agenda.js\",\r\n\tyear: \"ext/dhtmlxscheduler_year_view.js\",\r\n\tlimit: \"ext/dhtmlxscheduler_limit.js\"\r\n};\r\n\r\nscheduler._commonErrorMessages = {\r\n\tunknownView: function(view){\r\n\t\tvar relatedDoc = \"Related docs: \" + (commonViews[view] || commonViews.anythingElse); \r\n\t\tvar relatedExtension = requiredExtensions[view] ? (\"You're probably missing \" + requiredExtensions[view] + \".\") : \"\";\r\n\t\treturn (\r\n\t\t\t\"`\"+view+\"` view is not defined. \\n\" +\r\n\t\t\t\"Please check parameters you pass to `scheduler.init` or `scheduler.setCurrentView` in your code and ensure you've imported appropriate extensions. \\n\" + \r\n\t\t\trelatedDoc + \"\\n\" + (relatedExtension ? (relatedExtension + \"\\n\") : \"\"));\r\n\t},\r\n\tcollapsedContainer: function(div){\r\n\t\treturn \"Scheduler container height is set to *100%* but the rendered height is zero and the scheduler is not visible. \\n\"+\r\n\t\t\"Make sure that the container has some initial height or use different units. For example:\\n\" +\r\n\t\t\"
\\n\";\r\n\t}\r\n};\r\n\r\nscheduler.createTimelineView = function() {\r\n\tthrow new Error(\"scheduler.createTimelineView is not implemented. Be sure to add the required extension: \" + requiredExtensions.timeline + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.timeline);\r\n};\r\n\r\nscheduler.createUnitsView = function() {\r\n\tthrow new Error(\"scheduler.createUnitsView is not implemented. Be sure to add the required extension: \" + requiredExtensions.unit + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.unit);\r\n};\r\n\r\nscheduler.createGridView = function() {\r\n\tthrow new Error(\"scheduler.createGridView is not implemented. Be sure to add the required extension: \" + requiredExtensions.grid + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.grid);\r\n};\r\n\r\nscheduler.addMarkedTimespan = function() {\r\n\tthrow new Error(\"scheduler.addMarkedTimespan is not implemented. Be sure to add the required extension: ext/dhtmlxscheduler_limit.js\" + \r\n\t\"\\n\" +\r\n\t\"Related docs: https://docs.dhtmlx.com/scheduler/limits.html\");\r\n};\r\n\r\nscheduler.renderCalendar = function() {\r\n\tthrow new Error(\"scheduler.renderCalendar is not implemented. Be sure to add the required extension: ext/dhtmlxscheduler_minical.js\" + \r\n\t\"\\n\" +\r\n\t\"https://docs.dhtmlx.com/scheduler/minicalendar.html\");\r\n};\r\n\r\nscheduler.exportToPNG = function() {\r\n\tthrow new Error([\r\n\t\t\"scheduler.exportToPNG is not implemented.\",\r\n\t\t\"This feature requires an additional module, be sure to check the related doc here https://docs.dhtmlx.com/scheduler/png.html\",\r\n\t\t\"Licensing info: https://dhtmlx.com/docs/products/dhtmlxScheduler/export.shtml\"\r\n\t].join(\"\\n\"));\r\n};\r\n\r\nscheduler.exportToPDF = function() {\r\n\tthrow new Error([\r\n\t\t\"scheduler.exportToPDF is not implemented.\",\r\n\t\t\"This feature requires an additional module, be sure to check the related doc here https://docs.dhtmlx.com/scheduler/pdf.html\",\r\n\t\t\"Licensing info: https://dhtmlx.com/docs/products/dhtmlxScheduler/export.shtml\"\r\n\t].join(\"\\n\"));\r\n};\r\n\r\n\r\n}","import global from \"../global\";\r\n\r\nexport default function extend(scheduler) {\r\n/*\r\nif (global.dataProcessor && !dataProcessor.prototype.init_original){\r\n\tdataProcessor.prototype.init_original=dataProcessor.prototype.init;\r\n\tdataProcessor.prototype.init=function(obj){\r\n\t\tthis.init_original(obj);\r\n\t\tobj._dataprocessor=this;\r\n\r\n\t\tthis.setTransactionMode(\"POST\",true);\r\n\t\tthis.serverProcessor+=(this.serverProcessor.indexOf(\"?\")!=-1?\"&\":\"?\")+\"editing=true\";\r\n\t};\r\n}*/\r\n\r\nscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\tif(typeof dhtmlxError !== \"undefined\") {\r\n\t\twindow.dhtmlxError.catchError(\"LoadXML\", function(a, b, c){\r\n\t\t\tvar message = c[0].responseText;\r\n\r\n\t\t\tswitch (scheduler.config.ajax_error){\r\n\t\t\t\tcase \"alert\":\r\n\t\t\t\t\tglobal.alert(message);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"console\":\r\n\t\t\t\t\tglobal.console.log(message);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n});\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nfunction div(className){\r\n\tvar element = document.createElement(\"div\");\r\n\tvar classes = (className || \"\").split(\" \");\r\n\tclasses.forEach(function(cssClass){\r\n\t\telement.classList.add(cssClass);\r\n\t});\r\n\treturn element;\r\n}\r\nvar itemTypes = {\r\n\trows_container: function(){\r\n\t\treturn div(\"dhx_cal_navbar_rows_container\");\r\n\t},\r\n\trow: function(){\r\n\t\treturn div(\"dhx_cal_navbar_row\");\r\n\t},\r\n\tview: function (config) {\r\n\t\tvar element = div(\"dhx_cal_tab\");\r\n\t\telement.setAttribute(\"name\", config.view + \"_tab\");\r\n\t\telement.setAttribute(\"data-tab\", config.view);\r\n\t\t// element.setAttribute(\"data-viewname\", config.view); // FIXME: need to remove? not used anywhere\r\n\t\tif(scheduler.config.fix_tab_position){\r\n\t\t\tif(config.$firstTab) {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_first\");\r\n\t\t\t}else if(config.$lastTab) {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_last\");\r\n\t\t\t} else if(config.view !== \"week\") {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_standalone\");\r\n\t\t\t}\r\n\r\n\t\t\tif(config.$segmentedTab) {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn element;\r\n\t},\r\n\tdate: function () {\r\n\t\treturn div(\"dhx_cal_date\");\r\n\t},\r\n\tbutton: function (config) {\r\n\t\treturn div(\"dhx_cal_nav_button dhx_cal_nav_button_custom dhx_cal_tab\");\r\n\t},\r\n\tbuiltInButton: function (config){\r\n\t\treturn div(\"dhx_cal_\" + config.view + \"_button dhx_cal_nav_button\");\r\n\t},\r\n\tspacer: function () {\r\n\t\treturn div(\"dhx_cal_line_spacer\");\r\n\t},\r\n\tminicalendarButton: function(config){\r\n\t\tvar minicalendarDiv = div('dhx_minical_icon');\r\n\t\tif(!config.click && !minicalendarDiv.$_eventAttached){\r\n\t\t\t\r\n\t\t\tscheduler.event(minicalendarDiv, \"click\", function () {\r\n\t\t\t\tif (scheduler.isCalendarVisible()) {\r\n\t\t\t\t\tscheduler.destroyCalendar();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tscheduler.renderCalendar({\r\n\t\t\t\t\t\tposition: this,\r\n\t\t\t\t\t\tdate: scheduler.getState().date,\r\n\t\t\t\t\t\tnavigation: true,\r\n\t\t\t\t\t\thandler: function (date, calendar) {\r\n\t\t\t\t\t\t\tscheduler.setCurrentView(date);\r\n\t\t\t\t\t\t\tscheduler.destroyCalendar();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn minicalendarDiv;\r\n\t},\r\n\thtml_element: function (config) {\r\n\t\treturn div(\"dhx_cal_nav_content\");\r\n\t}\r\n};\r\n\r\nfunction findRenderer(config) {\r\n\tvar renderer;\r\n\tif (config.view) {\r\n\t\tswitch (config.view){\r\n\t\t\tcase \"today\":\r\n\t\t\tcase \"next\":\r\n\t\t\tcase \"prev\":\r\n\t\t\t\trenderer = itemTypes.builtInButton;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"date\":\r\n\t\t\t\trenderer = itemTypes.date;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"spacer\":\r\n\t\t\t\trenderer = itemTypes.spacer;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"button\":\r\n\t\t\t\trenderer = itemTypes.button;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"minicalendar\":\r\n\t\t\t\trenderer = itemTypes.minicalendarButton;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\trenderer = itemTypes.view;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t} else if(config.rows) {\r\n\t\trenderer = itemTypes.rows_container;\r\n\t} else if(config.cols) {\r\n\t\trenderer = itemTypes.row;\r\n\t}\r\n\treturn renderer;\r\n}\r\n\r\nfunction renderElement(config){\r\n\tvar renderer = findRenderer(config);\r\n\tif(!renderer){\r\n\t\treturn;\r\n\t}\r\n\tvar element = renderer(config);\r\n\tif(config.css){\r\n\t\telement.classList.add(config.css);\r\n\t}\r\n\tif(config.width){\r\n\t\tvar value = config.width;\r\n\t\tif(value === value * 1){\r\n\t\t\tvalue += \"px\";\r\n\t\t}\r\n\t\telement.style.width = value;\r\n\t}\r\n\tif(config.height){\r\n\t\tvar value = config.height;\r\n\t\tif(value === value * 1){\r\n\t\t\tvalue += \"px\";\r\n\t\t}\r\n\t\telement.style.height = value;\r\n\t}\r\n\tif (config.click) {\r\n\t\tscheduler.event(element, \"click\", config.click);\r\n\t}\r\n\tif (config.html) {\r\n\t\telement.innerHTML = config.html;\r\n\t}\r\n\r\n\tif (config.align) {\r\n\t\tvar value = \"\";\r\n\t\tif (config.align == \"right\") {\r\n\t\t\tvalue = \"flex-end\";\r\n\t\t} else if(config.align == \"left\") {\r\n\t\t\tvalue = \"flex-start\";\r\n\t\t}\r\n\t\telement.style.justifyContent = value;\r\n\t}\r\n\treturn element;\r\n}\r\n\r\nfunction prepareConfig(config) {\r\n\tif (typeof config === \"string\") {\r\n\t\tconfig = {\r\n\t\t\tview: config\r\n\t\t};\r\n\t}\r\n\tif (!config.view && !config.rows && !config.cols) {\r\n\t\tconfig.view = \"button\";\r\n\t}\r\n\treturn config;\r\n}\r\n\r\nfunction renderLayout(config) {\r\n\tvar fragment = document.createDocumentFragment();\r\n\tvar items;\r\n\tif(Array.isArray(config)){\r\n\t\titems = config;\r\n\t}else{\r\n\t\titems = [config];\r\n\t}\r\n\r\n\tfor (var i = 0; i < items.length; i++) {\r\n\t\tvar view = prepareConfig(items[i]);\r\n\r\n\t\tif(view.view === \"day\" && items[i + 1]){\r\n\t\t\tvar next = prepareConfig(items[i + 1]);\r\n\t\t\tif(next.view === \"week\" || next.view === \"month\"){\r\n\t\t\t\tview.$firstTab = true;\r\n\t\t\t\tview.$segmentedTab = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(view.view === \"week\" && items[i - 1]){\r\n\t\t\tvar next = prepareConfig(items[i + 1]);\r\n\t\t\tif(next.view === \"week\" || next.view === \"month\"){\r\n\t\t\t\tview.$segmentedTab = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(view.view === \"month\" && items[i - 1]){\r\n\t\t\tvar next = prepareConfig(items[i - 1]);\r\n\t\t\tif(next.view === \"week\" || next.view === \"day\"){\r\n\t\t\t\tview.$lastTab = true;\r\n\t\t\t\tview.$segmentedTab = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar element = renderElement(view);\r\n\r\n\t\tfragment.appendChild(element);\r\n\t\tif(view.cols || view.rows){\r\n\t\t\telement.appendChild(renderLayout(view.cols || view.rows));\r\n\t\t}\r\n\t}\r\n\treturn fragment;\r\n}\r\n\r\nscheduler._init_nav_bar = function (items) {\r\n\tvar navBar = this.$container.querySelector(\".dhx_cal_navline\");\r\n\tif (!navBar){\r\n\t\tnavBar = document.createElement(\"div\");\r\n\t\tnavBar.className = \"dhx_cal_navline dhx_cal_navline_flex\";\r\n\t\tscheduler._update_nav_bar(items, navBar);\r\n\t\treturn navBar;\r\n\t}\r\n\treturn navBar;\r\n};\r\n\r\nvar previousNavbar = null;\r\nvar previousHeight = null;\r\nscheduler._update_nav_bar = function (config, container) {\r\n\r\n\tif(!config){\r\n\t\treturn;\r\n\t}\r\n\tvar heightChanged = false;\r\n\tvar configChanged = false;\r\n\r\n\tvar newHeight = config.height || scheduler.xy.nav_height;\r\n\r\n\tif(previousHeight === null ||\r\n\t\t\t(previousHeight !== newHeight)){\r\n\t\theightChanged = true;\r\n\t}\r\n\tif(!previousNavbar || JSON.stringify(config) !== previousNavbar){\r\n\t\tconfigChanged = true;\r\n\t}\r\n\r\n\tif(heightChanged){\r\n\t\tscheduler.xy.nav_height = newHeight;\r\n\t}\r\n\tif(configChanged){\r\n\t\tcontainer.innerHTML = \"\";\r\n\t\tcontainer.appendChild(renderLayout(config));\r\n\t}\r\n\r\n\tif(heightChanged || configChanged){\r\n\t\tscheduler.unset_actions();\r\n\t\tscheduler._els = [];\r\n\t\tscheduler.get_elements();\r\n\t\tscheduler.set_actions();\r\n\t}\r\n\r\n\tif(newHeight === 0){\r\n\t\tcontainer.style.display = \"none\";\r\n\t}else{\r\n\t\tcontainer.style.display = \"\";\r\n\t}\r\n\r\n\tpreviousHeight = newHeight;\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\tfunction isAttachedNode(container){\r\n\t\tvar root = document.body;\r\n\t\r\n\t\twhile(container && container != root){\r\n\t\t\tcontainer = container.parentNode;\r\n\t\t}\r\n\t\r\n\t\treturn !!(root == container);\r\n\t}\r\n\t\r\n\tfunction getWindowSize(window){\r\n\t\treturn {\r\n\t\t\tw : window.innerWidth || document.documentElement.clientWidth,\r\n\t\t\th : window.innerHeight || document.documentElement.clientHeight\r\n\t\t};\r\n\t}\r\n\tfunction equals(a,b){\r\n\t\treturn a.w == b.w && a.h == b.h;\r\n\t}\r\n\t\r\n\tfunction listenWindowResize(scheduler, window){\r\n\t\tvar oldSize = getWindowSize(window);\r\n\t\tvar resizeDelay;\r\n\t\tscheduler.event(window, \"resize\", function(){\r\n\t\t\tclearTimeout(resizeDelay);\r\n\t\t\tresizeDelay = setTimeout(function(){\r\n\r\n\t\t\t\tif (!isAttachedNode(scheduler.$container) || scheduler.$destroyed){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tvar newSize = getWindowSize(window);\r\n\t\t\t\t// element may be resized by container-autoresize exteinsion\r\n\t\t\t\t// check if the size is actually changed in order to not to get endless loop\r\n\t\t\t\tif (!equals(oldSize, newSize)) {\r\n\t\t\t\t\toldSize = newSize;\r\n\t\t\t\t\ttriggerSchedulerResize(scheduler);\r\n\t\t\t\t}\r\n\t\t\t}, 150);\r\n\t\t});\r\n\t}\r\n\t\r\n\tfunction triggerSchedulerResize(scheduler){\r\n\t\tif(scheduler.$destroyed || !scheduler.$root || !isAttachedNode(scheduler.$root)){\r\n\t\t\treturn;\t\r\n\t\t}\r\n\t\tif (scheduler.callEvent(\"onSchedulerResize\", [])) {\r\n\t\t\tscheduler.updateView();\r\n\t\t\tscheduler.callEvent(\"onAfterSchedulerResize\", []);\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction watchNodeResize(scheduler){\r\n\t\tvar previousHeight = scheduler.$root.offsetHeight;\r\n\t\tvar previousWidth = scheduler.$root.offsetWidth;\r\n\t\t\r\n\t\tfunction lowlevelResizeWatcher(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(scheduler.$root){\r\n\t\t\t\tif (scheduler.$root.offsetHeight != previousHeight ||\r\n\t\t\t\t\tscheduler.$root.offsetWidth != previousWidth){\r\n\t\t\t\t\ttriggerSchedulerResize(scheduler);\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\tpreviousHeight = scheduler.$root.offsetHeight;\r\n\t\t\t\tpreviousWidth = scheduler.$root.offsetWidth;\r\n\t\t\t}\r\n\t\r\n\t\t\tsetTimeout(lowlevelResizeWatcher, 200);\r\n\t\t}\r\n\t\t\r\n\t\tlowlevelResizeWatcher();\r\n\t}\r\n\t\r\n\tfunction addResizeListener(scheduler){\r\n\t\tvar root = scheduler.$container;\r\n\t\tvar containerStyles = window.getComputedStyle(root);\r\n\t\tif(containerStyles.getPropertyValue(\"position\") == \"static\"){\r\n\t\t\troot.style.position = \"relative\";\r\n\t\t}\r\n\t\r\n\t\tvar resizeWatcher = document.createElement('iframe');\r\n\t\tresizeWatcher.className = \"scheduler_container_resize_watcher\";\r\n\t\tresizeWatcher.tabIndex = -1;\r\n\t\tif(scheduler.config.wai_aria_attributes){\r\n\t\t\tresizeWatcher.setAttribute(\"role\", \"none\");\r\n\t\t\tresizeWatcher.setAttribute(\"aria-hidden\", true);\r\n\t\t}\r\n\t\r\n\t\t// in some environments (namely, in SalesForce) iframe.contentWindow is not available\r\n\t\tvar salesforce_environment = !!window[\"Sfdc\"] || !!window[\"$A\"] || window[\"Aura\"];\r\n\t\tif(salesforce_environment){\r\n\t\t\twatchNodeResize(scheduler);\r\n\t\t} else {\r\n\t\t\troot.appendChild(resizeWatcher);\r\n\t\t\tif (resizeWatcher.contentWindow) {\r\n\t\t\t\tlistenWindowResize(scheduler, resizeWatcher.contentWindow);\r\n\t\t\t} else {\r\n\t\t\t\t// if so - ditch the iframe and fallback to listening the main window resize\r\n\t\t\t\troot.removeChild(resizeWatcher);\r\n\t\t\t\tlistenWindowResize(scheduler, window);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\taddResizeListener(scheduler);\r\n\r\n}","class EventHost {\r\n\tconstructor(){\r\n\t\tthis._silent_mode = false;\r\n\t\tthis.listeners = {};\r\n\t}\r\n\t_silentStart(){\r\n\t\tthis._silent_mode = true;\r\n\t}\r\n\t_silentEnd() {\r\n\t\tthis._silent_mode = false;\r\n\t}\r\n}\r\n\r\nconst createEventStorage = function(obj) {\r\n\tlet handlers = {};\r\n\tlet index = 0;\r\n\tconst eventStorage = function(){\r\n\t\tlet combinedResult = true;\r\n\t\tfor(const i in handlers){\r\n\t\t\tconst handlerResult = handlers[i].apply(obj, arguments);\r\n\t\t\tcombinedResult=combinedResult && handlerResult;\r\n\t\t}\r\n\t\treturn combinedResult;\r\n\t};\r\n\teventStorage.addEvent=function(handler, settings){\r\n\t\tif (typeof (handler) == \"function\"){\r\n\t\t\tlet handlerId;\r\n\t\t\tif(settings && settings.id){\r\n\t\t\t\thandlerId = settings.id;\r\n\t\t\t}else{\r\n\t\t\t\thandlerId = index;\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\r\n\t\t\tif(settings && settings.once){\r\n\t\t\t\tconst originalHandler = handler;\r\n\t\t\t\thandler = function(){\r\n\t\t\t\t\toriginalHandler();\r\n\t\t\t\t\teventStorage.removeEvent(handlerId);\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\thandlers[handlerId] = handler;\r\n\t\t\treturn handlerId;\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\teventStorage.removeEvent=function(id){\r\n\t\tdelete handlers[id];\r\n\t};\r\n\r\n\teventStorage.clear = function(){\r\n\t\thandlers = {};\r\n\t};\r\n\r\n\treturn eventStorage;\r\n};\r\n\r\nfunction makeEventable(obj){\r\n\r\n\tconst eventHost = new EventHost();\r\n\tobj.attachEvent=function(eventName, handler, settings){\r\n\t\teventName = 'ev_'+eventName.toLowerCase();\r\n\t\tif (!eventHost.listeners[eventName]){\r\n\t\t\teventHost.listeners[eventName] = createEventStorage(this);\r\n\t\t}\r\n\r\n\t\tif(settings && settings.thisObject){\r\n\t\t\thandler = handler.bind(settings.thisObject);\r\n\t\t}\r\n\r\n\t\tconst innerId = eventHost.listeners[eventName].addEvent(handler, settings);\r\n\r\n\t\tlet handlerId = (eventName+':'+innerId); //return ID (ev_eventname:1)\r\n\t\tif(settings && settings.id){\r\n\t\t\thandlerId = settings.id;\r\n\t\t}\r\n\t\treturn handlerId;\r\n\t};\r\n\r\n\tobj.attachAll = function(callback){\r\n\t\tthis.attachEvent('listen_all', callback);\r\n\t};\r\n\r\n\tobj.callEvent=function(name, eventArguments){\r\n\t\tif (eventHost._silent_mode) return true;\r\n\r\n\t\tconst handlerName = 'ev_'+name.toLowerCase();\r\n\r\n\t\tconst listeners = eventHost.listeners;\r\n\t\tif (listeners['ev_listen_all']){\r\n\t\t\tlisteners['ev_listen_all'].apply(this, [name].concat(eventArguments));\r\n\t\t}\r\n\r\n\t\tif (listeners[handlerName])\r\n\t\t\treturn listeners[handlerName].apply(this, eventArguments);\r\n\t\treturn true;\r\n\t};\r\n\r\n\tobj.checkEvent=function(name){\r\n\t\tconst listeners = eventHost.listeners;\r\n\t\treturn (!!listeners['ev_'+name.toLowerCase()]);\r\n\t};\r\n\r\n\tobj.detachEvent=function(id){\r\n\t\tif (id){\r\n\t\t\tlet listeners = eventHost.listeners;\r\n\t\t\tfor(const i in listeners){\r\n\t\t\t\tlisteners[i].removeEvent(id); //remove event\r\n\t\t\t}\r\n\r\n\t\t\tconst list = id.split(':');//get EventName and ID\r\n\t\t\tlisteners = eventHost.listeners;\r\n\t\t\tif(list.length === 2){\r\n\t\t\t\tconst eventName = list[0];\r\n\t\t\t\tconst eventId = list[1];\r\n\t\t\t\tif(listeners[eventName]){\r\n\t\t\t\t\tlisteners[eventName].removeEvent(eventId); //remove event\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\tobj.detachAllEvents = function(){\r\n\t\tfor (const name in eventHost.listeners) {\r\n\t\t\teventHost.listeners[name].clear();\r\n\t\t}\r\n\t};\r\n\r\n}\r\n\r\nexport default makeEventable;","\r\nimport nav_bar from \"./nav_bar\";\r\nimport scheduler_resize_listener from \"./scheduler_resize_listener\";\r\nimport eventable from \"../utils/eventable\";\r\n\r\n\r\nexport default function extend(scheduler) {\r\n\r\neventable(scheduler);\r\n\r\nnav_bar(scheduler);\r\n\r\nscheduler._detachDomEvent = function(el, event, handler){\r\n\tif (el.removeEventListener){\r\n\t\tel.removeEventListener(event, handler, false);\r\n\r\n\t}else if (el.detachEvent){\r\n\t\tel.detachEvent(\"on\"+event, handler);\r\n\t}\r\n};\r\n\r\n\r\nscheduler._init_once = function(){\r\n\tscheduler_resize_listener(scheduler);\r\n\r\n\tscheduler._init_once = function(){};\r\n};\r\n\r\nvar layout = {\r\n\t\"navbar\": {\r\n\t\trender: function (config) {\r\n\t\t\treturn scheduler._init_nav_bar(config);\r\n\t\t}\r\n\t},\r\n\t\"header\": {\r\n\t\trender: function (config) {\r\n\t\t\tvar element = document.createElement(\"div\");\r\n\t\t\telement.className = \"dhx_cal_header\";\r\n\t\t\treturn element;\r\n\t\t}\r\n\t},\r\n\t\"dataArea\": {\r\n\t\trender: function (config) {\r\n\t\t\tvar element = document.createElement(\"div\");\r\n\t\t\telement.className = \"dhx_cal_data\";\r\n\t\t\treturn element;\r\n\t\t}\r\n\t},\r\n\t\"html_element\": {\r\n\t\trender: function (config) {\r\n\t\t\treturn config.html;\r\n\t\t}\r\n\t}\r\n};\r\n\r\nfunction hasSchedulerMarkup(element){\r\n\treturn !!(\r\n\t\telement.querySelector(\".dhx_cal_header\") &&\r\n\t\telement.querySelector(\".dhx_cal_data\") &&\r\n\t\telement.querySelector(\".dhx_cal_navline\")\r\n\t\t);\r\n}\r\n\r\nfunction createDefaultHeader(scheduler){\r\n\tvar views = [\r\n\t\t\"day\",\r\n\t\t\"week\",\r\n\t\t\"month\"\r\n\t];\r\n\tvar date = [\r\n\t\t\"date\"\r\n\t];\r\n\tvar nav = [\r\n\t\t\"prev\",\r\n\t\t\"today\",\r\n\t\t\"next\"\r\n\t];\r\n\r\n\tif(scheduler.matrix){\r\n\t\tfor(var i in scheduler.matrix){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\tif(scheduler._props){\r\n\t\tfor(var i in scheduler._props){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\r\n\tif(scheduler._grid && scheduler._grid.names){\r\n\t\tfor(var i in scheduler._grid.names){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\r\n\tvar optionalViews = [\r\n\t\t\"map\",\r\n\t\t\"agenda\",\r\n\t\t\"week_agenda\",\r\n\t\t\"year\"\r\n\t];\r\n\r\n\toptionalViews.forEach(function(viewName){\r\n\t\tif(scheduler[viewName + \"_view\"]){\r\n\t\t\tviews.push(viewName);\r\n\t\t}\r\n\t});\r\n\r\n\treturn views.concat(date).concat(nav);\r\n}\r\n\r\nscheduler.init=function(id,date,mode){\r\n\tif(this.$destroyed){\r\n\t\treturn; // not have errors when try to reinit destroyed scheduler\r\n\t}\r\n\tdate=date||(scheduler._currentDate());\r\n\tmode=mode||\"week\";\r\n\r\n\tif(this._obj){\r\n\t\tthis.unset_actions();\r\n\t}\r\n\r\n\tthis._obj=(typeof id == \"string\")?document.getElementById(id):id;\r\n\tthis.$container = this._obj;\r\n\tthis.$root = this._obj;\r\n\r\n\tif(!this.$container.offsetHeight && this.$container.offsetWidth && this.$container.style.height === \"100%\"){\r\n\t\t// scheduler container has zero height and non-zero width\r\n\t\twindow.console.error(scheduler._commonErrorMessages.collapsedContainer(), this.$container);\r\n\t}\r\n\r\n\tif(this.config.wai_aria_attributes && this.config.wai_aria_application_role){\r\n\t\tthis.$container.setAttribute(\"role\", \"application\");\r\n\t}\r\n\r\n\tif(!this.config.header && !hasSchedulerMarkup(this.$container)){\r\n\t\t// if no header config and no required markup - use the default header\r\n\t\t// so the scheduler could be initialized in an empty div\r\n\t\tthis.config.header = createDefaultHeader(this);\r\n\t\twindow.console.log([// jshint ignore:line\r\n\t\t\t\"Required DOM elements are missing from the scheduler container and **scheduler.config.header** is not specified.\",\r\n\t\t\t\"Using a default header configuration: \",\r\n\t\t\t\"scheduler.config.header = \" + JSON.stringify(this.config.header, null, 2),\r\n\t\t\t\"Check this article for the details: https://docs.dhtmlx.com/scheduler/initialization.html\"\r\n\t\t].join(\"\\n\"));// jshint ignore:line\r\n\t}\r\n\r\n\tif (this.config.header) {\r\n\t\tthis.$container.innerHTML = \"\";\r\n\t\tthis.$container.classList.add(\"dhx_cal_container\");\r\n\t\tif(this.config.header.height){\r\n\t\t\tthis.xy.nav_height = this.config.header.height;\r\n\t\t}\r\n\t\tthis.$container.appendChild(layout.navbar.render(this.config.header));\r\n\t\tthis.$container.appendChild(layout.header.render());\r\n\t\tthis.$container.appendChild(layout.dataArea.render());\r\n\t} else {\r\n\t\t// if no header config provided - make sure scheduler container has all necessary elements\r\n\t\tif(!hasSchedulerMarkup(this.$container)){\r\n\t\t\tthrow new Error([\r\n\t\t\t\t\"Required DOM elements are missing from the scheduler container.\",\r\n\t\t\t\t\"Be sure to either specify them manually in the markup: https://docs.dhtmlx.com/scheduler/initialization.html#initializingschedulerviamarkup\",\r\n\t\t\t\t\"Or to use **scheduler.config.header** setting so they could be created automatically: https://docs.dhtmlx.com/scheduler/initialization.html#initializingschedulerviaheaderconfig\"\r\n\t\t\t].join(\"\\n\"));\r\n\t\t}\r\n\t}\r\n\r\n\tif (this.config.rtl) this.$container.className += \" dhx_cal_container_rtl\";\r\n\r\n\t//hook for terrace skin\r\n\tif (this._skin_init)\r\n\t\tscheduler._skin_init();\r\n\r\n\tscheduler.date.init();\r\n\r\n\tthis._scroll=true;\r\n\r\n\tthis._els=[];\r\n\tthis.get_elements();\r\n\tthis.init_templates();\r\n\tthis.set_actions();\r\n\r\n\tthis._init_once();\r\n\tthis._init_touch_events();\r\n\r\n\tthis.set_sizes();\r\n\tscheduler.callEvent('onSchedulerReady', []);\r\n\tscheduler.$initialized = true;\r\n\tthis.setCurrentView(date,mode);\r\n\r\n};\r\n\r\nscheduler.xy={\r\n\tmin_event_height:20,\r\n\tbar_height: 24,\r\n\tscale_width:50,\r\n\tscroll_width:18,\r\n\tscale_height:20,\r\n\tmonth_scale_height:20,\r\n\tmenu_width:25,\r\n\tmargin_top:0,\r\n\tmargin_left:0,\r\n\teditor_width:140,\r\n\tmonth_head_height:22,\r\n\tevent_header_height: 14\r\n};\r\nscheduler.keys={\r\n\tedit_save:13,\r\n\tedit_cancel:27\r\n};\r\n\r\nscheduler.bind = function bind(functor, object){\r\n\tif(functor.bind)\r\n\t\treturn functor.bind(object);\r\n\telse\r\n\t\treturn function(){ return functor.apply(object,arguments); };\r\n};\r\n\r\nscheduler.set_sizes=function(){\r\n\r\n\tvar w = this._x = this._obj.clientWidth-this.xy.margin_left;\r\n\r\n\t//not-table mode always has scroll - need to be fixed in future\r\n\tvar scale_x=this._table_view?0:(this.xy.scale_width+this.xy.scroll_width);\r\n\r\n\tvar materialScalePlaceholder = this.$container.querySelector(\".dhx_cal_scale_placeholder\");\r\n\tif(scheduler._is_material_skin()){\r\n\t\tif(!materialScalePlaceholder) {\r\n\t\t\tmaterialScalePlaceholder = document.createElement(\"div\");\r\n\t\t\tmaterialScalePlaceholder.className = \"dhx_cal_scale_placeholder\";\r\n\t\t\tthis.$container.insertBefore(materialScalePlaceholder, this._els[\"dhx_cal_header\"][0]);\r\n\t\t}\r\n\t\tmaterialScalePlaceholder.style.display = \"block\";\r\n\r\n\t\tthis.set_xy(materialScalePlaceholder,w,this.xy.scale_height + 1,0, this._els[\"dhx_cal_header\"][0].offsetTop);\r\n\r\n\t}else{\r\n\t\tif(materialScalePlaceholder){\r\n\t\t\tmaterialScalePlaceholder.parentNode.removeChild(materialScalePlaceholder);\r\n\t\t}\r\n\t}\r\n\r\n\tif (this._lightbox) {\r\n\t\tif (scheduler.$container.offsetWidth < 1200) {\r\n\t\t} else {\r\n\t\t\tthis._setLbPosition(document.querySelector(\".dhx_cal_light\"));\r\n\t\t}\r\n\t}\r\n\r\n\tthis._data_width = w-scale_x;\r\n\r\n\tthis._els[\"dhx_cal_navline\"][0].style.width = w + \"px\";\r\n\tconst header = this._els[\"dhx_cal_header\"][0];\r\n\tthis.set_xy(header, this._data_width, this.xy.scale_height);\r\n\t// this._els[\"dhx_cal_header\"][0].style.marginLeft = `${scheduler.xy.scale_width}px`;\r\n\theader.style.left = ``;\r\n\theader.style.right = ``;\r\n\tif(!this._table_view){\r\n\t\tif(this.config.rtl){\r\n\t\t\theader.style.right = `${this.xy.scale_width}px`;\r\n\t\t}else{\r\n\t\t\theader.style.left = `${this.xy.scale_width}px`;\r\n\t\t}\r\n\t} else {\r\n\t\tif(!this.config.rtl){\r\n\t\t\theader.style.left = `-1px`;\r\n\t\t} else {\r\n\t\t\theader.style.right = `-1px`;\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.set_xy=function(node,w,h,x,y){\r\n\tfunction prepareValue(val){\r\n\t\tlet prepared = val;\r\n\t\tif(!isNaN(Number(prepared))){\r\n\t\t\tprepared = Math.max(0,prepared) + \"px\";\r\n\t\t}\r\n\t\treturn prepared;\r\n\t}\r\n\r\n\tvar direction = 'left';\r\n\r\n\tif(w !== undefined) {\r\n\t\tnode.style.width = prepareValue(w);\r\n\t}\r\n\r\n\tif(h !== undefined){\r\n\t\tnode.style.height = prepareValue(h);\r\n\t}\r\n\r\n\tif (arguments.length>3){\r\n\r\n\t\tif(x !== undefined){\r\n\t\t\tif (this.config.rtl) direction = 'right';\r\n\t\t\tnode.style[direction]=x+\"px\";\r\n\t\t}\r\n\t\tif(y !== undefined){\r\n\t\t\tnode.style.top=y+\"px\";\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.get_elements=function(){\r\n\t//get all child elements as named hash\r\n\tvar els=this._obj.getElementsByTagName(\"DIV\");\r\n\tfor (var i=0; i < els.length; i++){\r\n\t\tvar class_name= scheduler._getClassName(els[i]);\r\n\t\tvar attr_value = els[i].getAttribute(\"data-tab\") || els[i].getAttribute(\"name\") || \"\";\r\n\t\tif (class_name) class_name = class_name.split(\" \")[0];\r\n\t\tif (!this._els[class_name]) this._els[class_name]=[];\r\n\t\tthis._els[class_name].push(els[i]);\r\n\r\n\t\t//check if name need to be changed\r\n\t\t// scheduler.locale.labels[attr_value+\"_tab\"] - to fix getting labels for data-tab\r\n\t\tvar label = scheduler.locale.labels[attr_value+\"_tab\"] || scheduler.locale.labels[attr_value||class_name];\r\n\t\tif (typeof label !== \"string\" && attr_value && !els[i].innerHTML)\r\n\t\t\tlabel = attr_value.split(\"_\")[0];\r\n\t\tif (label) {\r\n\t\t\tthis._waiAria.labelAttr(els[i], label);\r\n\t\t\tels[i].innerHTML = label;\r\n\t\t}\r\n\t}\r\n};\r\n\r\n\r\nvar domEventsScope = scheduler._createDomEventScope();\r\n\r\nscheduler.unset_actions = function(){\r\n\tdomEventsScope.detachAll();\r\n\r\n};\r\n\r\nscheduler.set_actions=function(){\r\n\tfor (var a in this._els){\r\n\t\tif (this._click[a]){\r\n\t\t\tfor (var i=0; i < this._els[a].length; i++){\r\n\t\t\t\tconst element = this._els[a][i];\r\n\t\t\t\tconst handler = this._click[a].bind(element);\r\n\t\t\t\tdomEventsScope.attach(element, \"click\", handler);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tdomEventsScope.attach(this._obj, \"selectstart\", function(e){\r\n\t\te.preventDefault();\r\n\t\treturn false;\r\n\t});\r\n\t//this._obj.onselectstart=function(e){ return false; };\r\n\tdomEventsScope.attach(this._obj, \"mousemove\", function(e){\r\n\t\tif (!scheduler._temp_touch_block)\r\n\t\t\tscheduler._on_mouse_move(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"mousedown\", function(e){\r\n\t\tif (!scheduler._ignore_next_click)\r\n\t\t\tscheduler._on_mouse_down(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"mouseup\", function(e){\r\n\t\tif (!scheduler._ignore_next_click)\r\n\t\t\tscheduler._on_mouse_up(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"dblclick\", function(e){\r\n\t\tscheduler._on_dbl_click(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"contextmenu\", function(e) {\r\n\t\tif(scheduler.checkEvent(\"onContextMenu\")){\r\n\t\t\t// block the default browser context menu \r\n\t\t\te.preventDefault();\r\n\t\t}\r\n\t\tvar ev = e;\r\n\t\tvar src = ev.target||ev.srcElement;\r\n\t\tvar returnValue = scheduler.callEvent(\"onContextMenu\", [scheduler._locate_event(src), ev]);\r\n\t\treturn returnValue;\r\n\t});\r\n};\r\nscheduler.select=function(id){\r\n\tif (this._select_id==id) return;\r\n\tscheduler._close_not_saved();\r\n\tthis.editStop(false);\r\n\tif(this._select_id){\r\n\t\tthis.unselect();\r\n\t}\r\n\tthis._select_id = id;\r\n\tthis.updateEvent(id);\r\n\tthis.callEvent(\"onEventSelected\", [id]);\r\n};\r\nscheduler.unselect=function(id){\r\n\tif (id && id!=this._select_id) return;\r\n\tvar t=this._select_id;\r\n\tthis._select_id = null;\r\n\tif (t && this.getEvent(t)) this.updateEvent(t);\r\n\tthis.callEvent(\"onEventUnselected\", [t]);\r\n};\r\nscheduler.getState=function(){\r\n\treturn {\r\n\t\tmode: this._mode,\r\n\t\tdate: new Date(this._date),\r\n\t\tmin_date: new Date(this._min_date),\r\n\t\tmax_date: new Date(this._max_date),\r\n\t\teditor_id: this._edit_id,\r\n\t\tlightbox_id: this._lightbox_id,\r\n\t\tnew_event: this._new_event,\r\n\t\tselect_id: this._select_id,\r\n\t\texpanded: this.expanded,\r\n\t\tdrag_id: this._drag_id,\r\n\t\tdrag_mode: this._drag_mode\r\n\t};\r\n};\r\nscheduler._click={\r\n\tdhx_cal_data:function(e){\r\n\t\t//in case of touch disable click processing\r\n\t\tif (scheduler._ignore_next_click){\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tvar trg = e.target;\r\n\t\tvar id = scheduler._locate_event(trg);\r\n\r\n\t\tif (!id) {\r\n\t\t\tscheduler.callEvent(\"onEmptyClick\",[scheduler.getActionData(e).date, e]);\r\n\t\t} else {\r\n\t\t\tif ( !scheduler.callEvent(\"onClick\",[id,e]) || scheduler.config.readonly ) return;\r\n\t\t}\r\n\r\n\t\tif (id && scheduler.config.select) {\r\n\r\n\t\t\tscheduler.select(id);\r\n\t\t\tconst icon = trg.closest(\".dhx_menu_icon\");\r\n\r\n\t\t\tvar mask = scheduler._getClassName(icon);\r\n\t\t\tif (mask.indexOf(\"_icon\")!=-1)\r\n\t\t\t\tscheduler._click.buttons[mask.split(\" \")[1].replace(\"icon_\",\"\")](id);\r\n\t\t} else{\r\n\t\t\tscheduler._close_not_saved();\r\n\t\t\tif (scheduler.getState().select_id && new Date().valueOf()-(scheduler._new_event||0) > 500){\r\n\t\t\t\tscheduler.unselect();\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tdhx_cal_prev_button:function(){\r\n\t\tscheduler._click.dhx_cal_next_button(0,-1);\r\n\t},\r\n\tdhx_cal_next_button:function(dummy,step){\r\n\t\tvar def_step = 1;\r\n\t\tif (scheduler.config.rtl){\r\n\t\t\tstep = -step;\r\n\t\t\tdef_step = -def_step;\r\n\t\t}\r\n\t\tscheduler.setCurrentView(scheduler.date.add( //next line changes scheduler._date , but seems it has not side-effects\r\n\t\t\tscheduler.date[scheduler._mode+\"_start\"](new Date(scheduler._date)),(step||def_step),scheduler._mode));\r\n\t},\r\n\tdhx_cal_today_button:function(){\r\n\t\tif (scheduler.callEvent(\"onBeforeTodayDisplayed\", [])) {\r\n\t\t\tscheduler.setCurrentView(scheduler._currentDate());\r\n\t\t}\r\n\t},\r\n\tdhx_cal_tab:function(){\r\n\t\tvar name = this.getAttribute(\"data-tab\");\r\n\t\tvar deprecated_name = this.getAttribute(\"name\");\r\n\t\tvar mode = name || deprecated_name.substring(0, deprecated_name.search(\"_tab\"));\r\n\t\tscheduler.setCurrentView(scheduler._date,mode);\r\n\t},\r\n\tbuttons:{\r\n\t\t\"delete\":function(id){\r\n\t\t\tvar c = scheduler.locale.labels.confirm_deleting;\r\n\t\t\tscheduler._dhtmlx_confirm({message: c, title: scheduler.locale.labels.title_confirm_deleting, callback:function(){ scheduler.deleteEvent(id); },\r\n\t\t\tconfig: {ok: scheduler.locale.labels.icon_delete}\r\n\t\t});\r\n\t\t},\r\n\t\tedit:function(id){ scheduler.edit(id); },\r\n\t\tsave:function(id){ scheduler.editStop(true); },\r\n\t\tdetails:function(id){ scheduler.showLightbox(id); },\r\n\t\tform:function(id){ scheduler.showLightbox(id); },\r\n\t\tcancel:function(id){ scheduler.editStop(false); }\r\n\t}\r\n};\r\nscheduler._dhtmlx_confirm = function({message, title, callback, config}) {\r\n\tif (!message)\r\n\t\treturn callback();\r\n\r\n\tconfig = config || {};\r\n\tvar opts = { ...config, text: message };\r\n\tif (title)\r\n\t\topts.title = title;\r\n\tif (callback) {\r\n\t\topts.callback = function(result) {\r\n\t\t\tif (result)\r\n\t\t\t\tcallback();\r\n\t\t};\r\n\t}\r\n\tscheduler.confirm(opts);\r\n};\r\nscheduler.addEventNow=function(start,end,e){\r\n\tvar base = {};\r\n\tif (scheduler._isObject(start) && !scheduler._isDate(start)){\r\n\t\tbase = start;\r\n\t\tstart = null;\r\n\t}\r\n\r\n\tvar d = (this.config.event_duration||this.config.time_step)*60000;\r\n\tif (!start) start = base.start_date||Math.round((scheduler._currentDate()).valueOf()/d)*d;\r\n\tvar start_date = new Date(start);\r\n\tif (!end){\r\n\t\tvar start_hour = this.config.first_hour;\r\n\t\tif (start_hour > start_date.getHours()){\r\n\t\t\tstart_date.setHours(start_hour);\r\n\t\t\tstart = start_date.valueOf();\r\n\t\t}\r\n\t\tend = start.valueOf()+d;\r\n\t}\r\n\tvar end_date = new Date(end);\r\n\r\n\t// scheduler.addEventNow(new Date(), new Date()) + collision though get_visible events defect (such event was not retrieved)\r\n\tif(start_date.valueOf() == end_date.valueOf())\r\n\t\tend_date.setTime(end_date.valueOf()+d);\r\n\tbase.start_date = base.start_date||start_date;\r\n\tbase.end_date = base.end_date||end_date;\r\n\tbase.text = base.text||this.locale.labels.new_event;\r\n\tbase.id = this._drag_id = base.id || this.uid();\r\n\tthis._drag_mode=\"new-size\";\r\n\tthis._loading=true;\r\n\tvar eventId = this.addEvent(base);\r\n\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\tthis._loading=false;\r\n\r\n\tthis._drag_event={}; //dummy , to trigger correct event updating logic\r\n\tthis._on_mouse_up(e);\r\n\treturn eventId;\r\n};\r\nscheduler._on_dbl_click=function(e,src){\r\n\tsrc = src||(e.target||e.srcElement);\r\n\tif (this.config.readonly) return;\r\n\tvar name = scheduler._getClassName(src).split(\" \")[0];\r\n\tswitch(name){\r\n\t\tcase \"dhx_scale_holder\":\r\n\t\tcase \"dhx_scale_holder_now\":\r\n\t\tcase \"dhx_month_body\":\r\n\t\tcase \"dhx_wa_day_data\":\r\n\t\t\tif (!scheduler.config.dblclick_create) break;\r\n\t\t\tthis.addEventNow(this.getActionData(e).date,null,e);\r\n\t\t\tbreak;\r\n\t\tcase \"dhx_cal_event\":\r\n\t\tcase \"dhx_wa_ev_body\":\r\n\t\tcase \"dhx_agenda_line\":\r\n\t\tcase \"dhx_cal_agenda_event_line\":\r\n\t\tcase \"dhx_grid_event\":\r\n\t\tcase \"dhx_cal_event_line\":\r\n\t\tcase \"dhx_cal_event_clear\":\r\n\t\t\tvar id = this._locate_event(src);\r\n\t\t\tif (!this.callEvent(\"onDblClick\",[id,e])) return;\r\n\t\t\tif (this.config.details_on_dblclick || this._table_view || !this.getEvent(id)._timed || !this.config.select)\r\n\t\t\t\tthis.showLightbox(id);\r\n\t\t\telse\r\n\t\t\t\tthis.edit(id);\r\n\t\t\tbreak;\r\n\t\tcase \"dhx_time_block\":\r\n\t\tcase \"dhx_cal_container\":\r\n\t\t\treturn;\r\n\t\tdefault:\r\n\t\t\tvar t = this[\"dblclick_\"+name];\r\n\t\t\tif (t) {\r\n\t\t\t\tt.call(this,e);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif (src.parentNode && src != this)\r\n\t\t\t\t\treturn scheduler._on_dbl_click(e,src.parentNode);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t}\r\n};\r\n//column index by mouse x-coordinate\r\nscheduler._get_column_index = function(x_pos){\r\n\tvar column = 0;\r\n\tif (this._cols){\r\n\t\tvar width = 0;\r\n\t\tvar i = 0;\r\n\t\twhile (width + this._cols[i] < x_pos && i < this._cols.length){\r\n\t\t\twidth += this._cols[i];\r\n\t\t\ti++;\r\n\t\t}\r\n\t\tcolumn = i + (this._cols[i] ? ((x_pos - width)/ this._cols[i]) : 0);\r\n\r\n\t\tif (this._ignores){\r\n\t\t\tif(column >= this._cols.length){\r\n\t\t\t\twhile(column >= 1 && this._ignores[Math.floor(column)]){\r\n\t\t\t\t\tcolumn--;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n\treturn column;\r\n};\r\n\r\n//transform mouse coordinates to day-time indexes of week based view\r\nscheduler._week_indexes_from_pos = function(pos){\r\n\t//\"get position\" can be invoked before columns are loaded into the units view(e.g. by onMouseMove handler in key_nav.js)\r\n\tif(!this._cols){\r\n\t\treturn pos;\r\n\t}else{\r\n\t\tvar column = this._get_column_index(pos.x);\r\n\r\n\t\tpos.x=Math.min(this._cols.length-1, Math.max(0,Math.ceil(column)-1));\r\n\t\tpos.y=Math.max(0,Math.ceil(pos.y*60/(this.config.time_step*this.config.hour_size_px))-1)+this.config.first_hour*(60/this.config.time_step);\r\n\t\treturn pos;\r\n\t}\r\n};\r\n\r\nscheduler._mouse_coords=function(ev){\r\n\tvar pos;\r\n\tvar b=document.body;\r\n\tvar d = document.documentElement;\r\n\tif (!this.$env.isIE && (ev.pageX || ev.pageY))\r\n\t\tpos={x:ev.pageX, y:ev.pageY};\r\n\telse pos={\r\n\t\tx:ev.clientX + (b.scrollLeft||d.scrollLeft||0) - b.clientLeft,\r\n\t\ty:ev.clientY + (b.scrollTop||d.scrollTop||0) - b.clientTop\r\n\t};\r\n\t//apply layout\r\n\tif (this.config.rtl && this._colsS) {\r\n\t\tpos.x = this.$container.querySelector(\".dhx_cal_data\").offsetWidth - pos.x;\r\n\t\tpos.x += this.$domHelpers.getAbsoluteLeft(this._obj);\r\n\t\tif (this._mode !== \"month\") {\r\n\t\t\tpos.x -= this.xy.scale_width;\r\n\t\t}\r\n\t} else {\r\n\t\tpos.x-=this.$domHelpers.getAbsoluteLeft(this._obj)+(this._table_view?0:this.xy.scale_width);\r\n\t}\r\n\r\n\tvar dataArea = this.$container.querySelector(\".dhx_cal_data\");\r\n\t//pos.y-=this.$domHelpers.getAbsoluteTop(this._obj)+this.xy.nav_height+(this._dy_shift||0)+this.xy.scale_height-this._els[\"dhx_cal_data\"][0].scrollTop;\r\n\tpos.y-=this.$domHelpers.getAbsoluteTop(dataArea)-this._els[\"dhx_cal_data\"][0].scrollTop;\r\n\tpos.ev = ev;\r\n\tvar handler = this[\"mouse_\"+this._mode];\r\n\tif (handler){\r\n\t\tpos = handler.call(this,pos);\r\n\t}else{\r\n\t\t//transform to date\r\n\t\tif (!this._table_view) {\r\n\t\t\tpos = this._week_indexes_from_pos(pos);\r\n\t\t} else {\r\n\t\t\tvar column = this._get_column_index(pos.x);\r\n\t\t\tif (!this._cols || !this._colsS) // agenda/map views\r\n\t\t\t\treturn pos;\r\n\t\t\tvar dy=0;\r\n\t\t\tfor (dy=1; dy < this._colsS.heights.length; dy++)\r\n\t\t\t\tif (this._colsS.heights[dy]>pos.y) break;\r\n\r\n\t\t\tpos.y=Math.ceil( (Math.max(0, column)+Math.max(0,dy-1)*7)*24*60/this.config.time_step );\r\n\r\n\t\t\tif (scheduler._drag_mode || this._mode == \"month\")\r\n\t\t\t\tpos.y=(Math.max(0,Math.ceil(column)-1)+Math.max(0,dy-1)*7)*24*60/this.config.time_step;\r\n\r\n\t\t\t//we care about ignored days only during event moving in month view\r\n\t\t\tif (this._drag_mode == \"move\"){\r\n\t\t\t\tif (scheduler._ignores_detected && scheduler.config.preserve_length){\r\n\t\t\t\t\tpos._ignores = true;\r\n\t\t\t\t\t//get real lengtn of event\r\n\t\t\t\t\tif (!this._drag_event._event_length)\r\n\t\t\t\t\t\tthis._drag_event._event_length = this._get_real_event_length(this._drag_event.start_date, this._drag_event.end_date, { x_step:1, x_unit:\"day\"});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tpos.x=0;\r\n\t\t}\r\n\t}\r\n\tpos.timestamp = +new Date();\r\n\treturn pos;\r\n};\r\nscheduler._close_not_saved=function(){\r\n\tif (new Date().valueOf()-(scheduler._new_event||0) > 500 && scheduler._edit_id){\r\n\t\tvar c=scheduler.locale.labels.confirm_closing;\r\n\r\n\t\tscheduler._dhtmlx_confirm({message: c, title: scheduler.locale.labels.title_confirm_closing, callback: function() { scheduler.editStop(scheduler.config.positive_closing); }});\r\n\t\tif(c){\r\n\t\t\tthis._drag_id = this._drag_pos = this._drag_mode = null;\r\n\t\t}\r\n\t}\r\n};\r\nscheduler._correct_shift=function(start, back){\r\n\treturn start-=((new Date(scheduler._min_date)).getTimezoneOffset()-(new Date(start)).getTimezoneOffset())*60000*(back?-1:1);\r\n};\r\n\r\nscheduler._is_pos_changed = function(old_pos, new_pos){\r\n\tfunction diff(old_val, new_val, acc){\r\n\t\treturn !!(Math.abs(old_val - new_val) > acc);\r\n\t}\r\n\r\n\tif(!(old_pos && this._drag_pos)){\r\n\t\treturn true;\r\n\t}\r\n\tvar delay = 100,\r\n\t\td_pos = 5;\r\n\r\n\t// start drag only if passed some time since mouse down, or if mouse position changed sufficiently\r\n\treturn !!(this._drag_pos.has_moved || !this._drag_pos.timestamp || (new_pos.timestamp - this._drag_pos.timestamp > delay) || diff(old_pos.ev.clientX, new_pos.ev.clientX, d_pos) || diff(old_pos.ev.clientY, new_pos.ev.clientY, d_pos));\r\n};\r\n\r\nscheduler._correct_drag_start_date = function(start){\r\n\tvar obj;\r\n\tif (scheduler.matrix)\r\n\t\tobj = scheduler.matrix[scheduler._mode];\r\n\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\tstart = new Date(start);\r\n\tvar len = 1;\r\n\tif(obj._start_correction || obj._end_correction)\r\n\t\tlen = (obj.last_hour||0)*60 - (start.getHours()*60+start.getMinutes()) || 1;\r\n\r\n\treturn start*1 + (scheduler._get_fictional_event_length(start, len, obj) - len);\r\n};\r\nscheduler._correct_drag_end_date = function(start, duration){\r\n\tvar obj;\r\n\tif (scheduler.matrix)\r\n\t\tobj = scheduler.matrix[scheduler._mode];\r\n\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\tvar end = start*1 + scheduler._get_fictional_event_length(start, duration, obj);\r\n\treturn new Date(end*1 - (scheduler._get_fictional_event_length(end, -1, obj, -1) + 1));\r\n};\r\n\r\nscheduler._on_mouse_move=function(e){\r\n\tif (this._drag_mode){\r\n\t\tvar pos=this._mouse_coords(e);\r\n\t\tif (this._is_pos_changed(this._drag_pos, pos)){\r\n\t\t\tvar start, end;\r\n\t\t\tif (this._edit_id!=this._drag_id)\r\n\t\t\t\tthis._close_not_saved();\r\n\r\n\t\t\tif(!this._drag_mode)\r\n\t\t\t\treturn;\r\n\r\n\t\t\tvar mousedownPos = null;\r\n\t\t\tif(this._drag_pos && !this._drag_pos.has_moved){\r\n\t\t\t\tmousedownPos = this._drag_pos;\r\n\t\t\t\tmousedownPos.has_moved = true;\r\n\t\t\t}\r\n\r\n\t\t\tthis._drag_pos = pos;\r\n\r\n\t\t\tthis._drag_pos.has_moved = true;\r\n\r\n\t\t\tif (this._drag_mode==\"create\"){\r\n\r\n\t\t\t\t// use mouse down position as a starting point for drag-create\r\n\t\t\t\tif(mousedownPos){\r\n\t\t\t\t\tpos = mousedownPos;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis._close_not_saved();\r\n\t\t\t\tthis.unselect(this._select_id);\r\n\t\t\t\tthis._loading=true; //will be ignored by dataprocessor\r\n\r\n\t\t\t\tstart = this._get_date_from_pos(pos).valueOf();\r\n\r\n\t\t\t\tif (!this._drag_start) {\r\n\t\t\t\t\tvar res = this.callEvent(\"onBeforeEventCreated\", [e, this._drag_id]);\r\n\t\t\t\t\tif (!res){\r\n\t\t\t\t\t\tthis._loading=false;\r\n\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis._loading=false;\r\n\t\t\t\t\tthis._drag_start=start;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tend = start;\r\n\t\t\t\tif (end == this._drag_start) {\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar start_date = new Date(this._drag_start);\r\n\t\t\t\tvar end_date = new Date(end);\r\n\t\t\t\tif ( (this._mode == \"day\" || this._mode == \"week\") &&\r\n\t\t\t\t\t(start_date.getHours() == end_date.getHours() &&\r\n\t\t\t\t\tstart_date.getMinutes() == end_date.getMinutes()) ) {\r\n\t\t\t\t\t\tend_date = new Date(this._drag_start+1000);\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\tthis._drag_id=this.uid();\r\n\t\t\t\tthis.addEvent(start_date, end_date, this.locale.labels.new_event, this._drag_id, pos.fields);\r\n\r\n\t\t\t\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\t\t\t\tthis._loading=false;\r\n\t\t\t\tthis._drag_mode=\"new-size\";\r\n\r\n\t\t\t}\r\n\r\n\t\t\tvar timeStep = this.config.time_step;\r\n\t\t\tvar ev=this.getEvent(this._drag_id);\r\n\t\t\tvar obj;\r\n\t\t\tif (scheduler.matrix)\r\n\t\t\t\tobj = scheduler.matrix[scheduler._mode];\r\n\t\t\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\t\t\tif (this._drag_mode==\"move\"){\r\n\t\t\t\tstart = this._min_date.valueOf()+(pos.y*this.config.time_step+pos.x*24*60)*60000;\r\n\t\t\t\tif (!pos.custom && this._table_view) {\r\n\t\t\t\t\tstart += this.date.time_part(ev.start_date) * 1000;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!this._table_view && this._dragEventBody && this._drag_event._move_event_shift === undefined) {\r\n\t\t\t\t\tthis._drag_event._move_event_shift = start - ev.start_date;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (this._drag_event._move_event_shift) {\r\n\t\t\t\t\tstart -= this._drag_event._move_event_shift;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tstart = this._correct_shift(start);\r\n\r\n\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view && obj){\r\n\r\n\t\t\t\t\tstart = scheduler._correct_drag_start_date(start);\r\n\t\t\t\t\tend = scheduler._correct_drag_end_date(start,this._drag_event._event_length);\r\n\r\n\t\t\t\t} else\r\n\t\t\t\t\tend = ev.end_date.valueOf()-(ev.start_date.valueOf()-start);\r\n\t\t\t} else { // resize\r\n\t\t\t\tstart = ev.start_date.valueOf();\r\n\t\t\t\tend = ev.end_date.valueOf();\r\n\t\t\t\tif (this._table_view) {\r\n\t\t\t\t\tvar resize_date = this._min_date.valueOf()+pos.y*this.config.time_step*60000 + (pos.custom?0:24*60*60000);\r\n\t\t\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\t\t\tresize_date = this._correct_shift(resize_date, false);\r\n\t\t\t\t\t\tif( this._drag_from_start ) {\r\n\t\t\t\t\t\t\tvar day = 24*60*60000;\r\n\t\t\t\t\t\t\tif( resize_date <= scheduler.date.date_part(new Date(end+day-1)).valueOf() ) // to get end time as 23:59:59 and then the day start\r\n\t\t\t\t\t\t\t\tstart = resize_date - day;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tend = resize_date;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif(this.config.preserve_length) {\r\n\t\t\t\t\t\t\tif (pos.resize_from_start) {\r\n\t\t\t\t\t\t\t\tstart = scheduler._correct_drag_start_date(resize_date);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tend = scheduler._correct_drag_end_date(resize_date, 0);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tif (pos.resize_from_start) {\r\n\t\t\t\t\t\t\t\tstart = resize_date;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tend = resize_date;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvar end_day_start = this.date.date_part(new Date(ev.end_date.valueOf() - 1)).valueOf();\r\n\t\t\t\t\tvar end_day_date = new Date(end_day_start);\r\n\t\t\t\t\tvar firstHour = this.config.first_hour;\r\n\t\t\t\t\tvar lastHour = this.config.last_hour;\r\n\t\t\t\t\tvar maxY = (lastHour - firstHour) * (60/timeStep);\r\n\r\n\t\t\t\t\tthis.config.time_step = 1;\r\n\t\t\t\t\tvar precisePos = this._mouse_coords(e);\r\n\t\t\t\t\tthis.config.time_step = timeStep;\r\n\r\n\t\t\t\t\tvar minDate = pos.y*timeStep*60000;\r\n\t\t\t\t\tvar maxDate = Math.min(pos.y + 1, maxY)*timeStep*60000;\r\n\t\t\t\t\tvar preciseDate = precisePos.y*60000;\r\n\r\n\t\t\t\t\t// rounding end date to the closest time step\r\n\t\t\t\t\tif(Math.abs(minDate - preciseDate) > Math.abs(maxDate - preciseDate)){\r\n\t\t\t\t\t\tend = end_day_start + maxDate;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tend = end_day_start + minDate;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = end + ((new Date(end)).getTimezoneOffset() - end_day_date.getTimezoneOffset()) * 60000;\r\n\t\t\t\t\tthis._els[\"dhx_cal_data\"][0].style.cursor=\"s-resize\";\r\n\t\t\t\t\tif (this._mode == \"week\" || this._mode == \"day\")\r\n\t\t\t\t\t\tend = this._correct_shift(end);\r\n\t\t\t\t}\r\n\t\t\t\tif (this._drag_mode == \"new-size\") {\r\n\t\t\t\t\tif (end <= this._drag_start){\r\n\t\t\t\t\t\tvar shift = pos.shift||((this._table_view && !pos.custom)?24*60*60000:0);\r\n\t\t\t\t\t\tstart = end-(pos.shift?0:shift);\r\n\t\t\t\t\t\tend = this._drag_start+(shift||(timeStep*60000));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tstart = this._drag_start;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (end<=start)\r\n\t\t\t\t\t\tend=start+timeStep*60000;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar new_end = new Date(end-1);\r\n\t\t\tvar new_start = new Date(start);\r\n\t\t\t//deny drag out of visible scheduler scale in timeline view\r\n\t\t\tif(this._drag_mode==\"move\" && scheduler.config.limit_drag_out &&\r\n\t\t\t\t(+new_start < +scheduler._min_date || +end > +scheduler._max_date)){\r\n\r\n\t\t\t\tif(+ev.start_date < +scheduler._min_date || +ev.end_date > +scheduler._max_date){\r\n\t\t\t\t\t// not move event if it's already outside time scale\r\n\t\t\t\t\tnew_start = new Date(ev.start_date);\r\n\t\t\t\t\tend = new Date(ev.end_date);\r\n\t\t\t\t}else{\r\n\r\n\t\t\t\t\tvar duration = end - new_start;\r\n\r\n\t\t\t\t\tif(+new_start < +scheduler._min_date){\r\n\t\t\t\t\t\tnew_start = new Date(scheduler._min_date);\r\n\t\t\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view){\r\n\t\t\t\t\t\t\tnew_start = new Date(scheduler._correct_drag_start_date(new_start));\r\n\t\t\t\t\t\t\tif(obj._start_correction)\r\n\t\t\t\t\t\t\t\tnew_start = new Date(new_start.valueOf() + obj._start_correction);\r\n\t\t\t\t\t\t\tend = new Date(new_start*1 + this._get_fictional_event_length(new_start, this._drag_event._event_length, obj));\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tend = new Date(+new_start + duration);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tend = new Date(scheduler._max_date);\r\n\r\n\t\t\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view){\r\n\t\t\t\t\t\t\tif(obj._end_correction)\r\n\t\t\t\t\t\t\t\tend = new Date(end.valueOf() - obj._end_correction);\r\n\t\t\t\t\t\t\tend = new Date(end*1 - this._get_fictional_event_length(end, 0, obj, true));\r\n\t\t\t\t\t\t\tnew_start = new Date(end*1 - this._get_fictional_event_length(end, this._drag_event._event_length, obj, true));\r\n\t\t\t\t\t\t\tif(this._ignores_detected){\r\n\t\t\t\t\t\t\t\tnew_start = scheduler.date.add(new_start, obj.x_step, obj.x_unit);\r\n\t\t\t\t\t\t\t\tend = new Date(end*1 - this._get_fictional_event_length(end, 0, obj, true));\r\n\t\t\t\t\t\t\t\tend = scheduler.date.add(end, obj.x_step, obj.x_unit);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tnew_start = new Date(+end - duration);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t\tvar new_end = new Date(end-1);\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\t// fix event dates when resized to bottom of the column (day/week views)\r\n\t\t\tif(!this._table_view && this._dragEventBody &&\r\n\t\t\t\t!scheduler.config.all_timed &&\r\n\t\t\t\t((!scheduler._get_section_view() && pos.x != this._get_event_sday({start_date: new Date(start), end_date:new Date(start)})) || new Date(start).getHours() < this.config.first_hour)){\r\n\t\t\t\tvar duration = end - new_start;\r\n\t\t\t\tif (this._drag_mode == \"move\") {\r\n\t\t\t\t\tvar day = this._min_date.valueOf() + (pos.x * 24 * 60) * 60000;\r\n\t\t\t\t\tnew_start = new Date(day);\r\n\t\t\t\t\tnew_start.setHours(this.config.first_hour);\r\n\t\t\t\t\tend = new Date(new_start.valueOf() + duration);\r\n\t\t\t\t\tnew_end = new Date(end-1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// fix event dates when resized to bottom of the column (day/week views)\r\n\t\t\tif(!this._table_view &&\r\n\t\t\t\t!scheduler.config.all_timed &&\r\n\t\t\t\t((!scheduler.getView() && pos.x != this._get_event_sday({start_date: new Date(end), end_date:new Date(end)})) || new Date(end).getHours() >= this.config.last_hour)){\r\n\t\t\t\tvar duration = end - new_start;\r\n\t\t\t\tvar day = this._min_date.valueOf()+(pos.x*24*60)*60000;\r\n\t\t\t\tend = scheduler.date.date_part(new Date(day));\r\n\t\t\t\tend.setHours(this.config.last_hour);\r\n\t\t\t\tnew_end = new Date(end-1);\r\n\t\t\t\tif(this._drag_mode == \"move\"){\r\n\t\t\t\t\tnew_start = new Date(+end - duration);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//prevent out-of-borders situation for day|week view\r\n\t\t\tif ( this._table_view || (new_end.getDate()==new_start.getDate() && new_end.getHours()=ed)\r\n\t\t\t\tcls += ' dhx_after';\r\n\t\t\telse if (sd.valueOf()==cd.valueOf())\r\n\t\t\t\tcls += ' dhx_now';\r\n\r\n\t\t\tif (this._ignores_detected && this._ignores[j]){\r\n\t\t\t\tcls += \" dhx_scale_ignore\";\r\n\t\t\t}\r\n\r\n\t\t\tcell.className = cls + \" \" + this.templates.month_date_class(sd, cd);\r\n\r\n\t\t\tcell.setAttribute(\"data-cell-date\", scheduler.templates.format_date(sd));\r\n\t\t\tvar body_class = \"dhx_month_body\";\r\n\t\t\tvar head_class = \"dhx_month_head\";\r\n\t\t\tif (j === 0 && this.config.left_border) {\r\n\t\t\t\tbody_class += \" dhx_month_body_border\";\r\n\t\t\t\thead_class += \" dhx_month_head_border\";\r\n\t\t\t}\r\n\t\t\tif (!this._ignores_detected || !this._ignores[j]){\r\n\t\t\t\tcell.style.width = tdwidths[j];\r\n\t\t\t\tthis._waiAria.monthCellAttr(cell, sd);\r\n\r\n\t\t\t\tvar cellHead = document.createElement(\"div\");\r\n\t\t\t\tcellHead.style.height = scheduler.xy.month_head_height + \"px\";\r\n\t\t\t\tcellHead.className = head_class;\r\n\t\t\t\tcellHead.innerHTML = this.templates.month_day(sd);\r\n\t\t\t\tcell.appendChild(cellHead);\r\n\r\n\t\t\t\tvar cellBody = document.createElement(\"div\");\r\n\t\t\t\tcellBody.className = body_class;\r\n\t\t\t\t// cellBody.style.height = row_height + \"px\";\r\n\t\t\t\t// cellBody.style.width = tdwidths[j];\r\n\t\t\t\tcell.appendChild(cellBody);\r\n\r\n\t\t\t} else {\r\n\t\t\t\tcell.appendChild(document.createElement(\"div\"));\r\n\t\t\t\tcell.appendChild(document.createElement(\"div\"));\r\n\t\t\t}\r\n\t\t\trendered_dates.push(sd);\r\n\t\t\tvar bf1 = sd.getDate();\r\n\t\t\tsd=this.date.add(sd,1,\"day\");\r\n\t\t\tif (sd.getDate() - bf1 > 1)\r\n\t\t\t\tsd = new Date(sd.getFullYear(), sd.getMonth(), bf1 + 1, 12, 0);\r\n\t\t}\r\n\r\n\t\tscheduler._colsS.heights[i] = cellheight;\r\n\t\tcellheight += getCellHeight(i);\r\n\t}\r\n\r\n\tthis._min_date = view_start;\r\n\tthis._max_date = sd;\r\n\r\n\tdiv.innerHTML = \"\";\r\n\tdiv.appendChild(table);\r\n\r\n\tthis._scales = {};\r\n\tvar cells = div.querySelectorAll('[data-cell-date]');\r\n\tcells.forEach((cell) => {\r\n\t\tconst date = scheduler.templates.parse_date(cell.getAttribute(\"data-cell-date\"));\r\n\t\tconst body = cell.querySelector(\".dhx_month_body\");\r\n\t\tthis._scales[+date] = body;\r\n\t\tthis.callEvent(\"onScaleAdd\", [this._scales[+date], date]);\r\n\t});\r\n\r\n\treturn this._max_date;\r\n};\r\n\r\nscheduler._reset_month_scale=function(b,dd,sd,rows){\r\n\t//recalculates rows height and redraws month layout\r\n\tvar ed=scheduler.date.add(dd,1,\"month\");\r\n\r\n\t//trim time part for comparison reasons\r\n\tvar cd = scheduler._currentDate();\r\n\tthis.date.date_part(cd);\r\n\tthis.date.date_part(sd);\r\n\r\n\trows = rows || Math.ceil(Math.round((ed.valueOf()-sd.valueOf()) / (60*60*24*1000) ) / 7);\r\n\r\n\tvar height = (Math.floor(b.clientHeight/rows) - this.xy.month_head_height);\r\n\r\n\tthis._colsS.height = height + this.xy.month_head_height;\r\n\tthis._colsS.heights = [];\r\n\r\n\treturn scheduler._render_month_scale(b, dd, sd, rows);\r\n\r\n};\r\n\r\nscheduler.getView = function (viewName) {\r\n\tif (!viewName) {\r\n\t\tviewName = scheduler.getState().mode;\r\n\t}\r\n\tif (scheduler.matrix && scheduler.matrix[viewName]) {\r\n\t\treturn scheduler.matrix[viewName];\r\n\t}\r\n\r\n\tif (scheduler._props && scheduler._props[viewName]) {\r\n\t\treturn scheduler._props[viewName];\r\n\t}\r\n\r\n\treturn null;\r\n};\r\n\r\nscheduler.getLabel = function(property, key) {\r\n\tvar sections = this.config.lightbox.sections;\r\n\tfor (var i=0; i scheduler.getState().max_date.valueOf()){\r\n\t\t\tendColumnIndex += getDaysDifference(endDate, scheduler.getState().max_date);\r\n\t\t}\r\n\t} else{\r\n\t\tendColumnIndex = Math.round(eventLength/60/60/1000/24);\r\n\t}\r\n\r\n\tvar last_column = true;\r\n\twhile (startColumnIndex < endColumnIndex){\r\n\t\tvar check = scheduler.date.add(endDate, -config.x_step, config.x_unit);\r\n\t\tif (ignore && ignore(endDate) && (!last_column || (last_column && ignore(check) ))){\r\n\t\t\teventLength -= (endDate-check);\r\n\r\n\t\t}else{\r\n\t\t\tlet excludedDuration = 0;\r\n\t\t\tconst intervalStart = new Date(Math.max(check.valueOf(), startDate.valueOf()));\r\n\t\t\tconst intervalEnd = endDate;\r\n\t\t\tconst leftCellCutOffStart = new Date(intervalStart.getFullYear(), intervalStart.getMonth(), intervalStart.getDate(), config.first_hour);\r\n\t\t\tconst leftCellCutOffEnd = new Date(intervalStart.getFullYear(), intervalStart.getMonth(), intervalStart.getDate(), config.last_hour);\r\n\t\t\tconst rightCellCutOffStart = new Date(endDate.getFullYear(), endDate.getMonth(), endDate.getDate(), config.first_hour);\r\n\t\t\tconst rightCellCutOffEnd = new Date(endDate.getFullYear(), endDate.getMonth(), endDate.getDate(), config.last_hour);\r\n\r\n\t\t\tif(intervalEnd.valueOf() > rightCellCutOffEnd.valueOf()){\r\n\t\t\t\texcludedDuration += intervalEnd - rightCellCutOffEnd;\r\n\t\t\t}\r\n\r\n\t\t\tif(intervalEnd.valueOf() > rightCellCutOffStart.valueOf()){\r\n\t\t\t\texcludedDuration += config._start_correction;\r\n\t\t\t} else {\r\n\t\t\t\texcludedDuration += intervalEnd.getHours()*60*60*1000 + intervalEnd.getMinutes()*60*1000;\r\n\t\t\t}\r\n\r\n\t\t\tif(intervalStart.valueOf() < leftCellCutOffEnd.valueOf()){\r\n\t\t\t\texcludedDuration += config._end_correction;\r\n\t\t\t}\r\n\r\n\t\t\tif(intervalStart.valueOf() < leftCellCutOffStart.valueOf()){\r\n\t\t\t\texcludedDuration += (leftCellCutOffStart.valueOf() - intervalStart.valueOf());\r\n\t\t\t}\r\n\t\t\t\r\n\r\n\t\t\teventLength -= excludedDuration;\r\n\t\t\tlast_column = false;\r\n\t\t}\r\n\t\tendDate = check;\r\n\t\tendColumnIndex--;\r\n\t}\r\n\treturn eventLength;\r\n};\r\nscheduler._get_fictional_event_length=function(end_date, ev_length, obj, back){\r\n\tvar sd = new Date(end_date);\r\n\tvar dir = back ? -1 : 1;\r\n\r\n\t//get difference caused by first|last hour\r\n\tif (obj._start_correction || obj._end_correction){\r\n\t\tvar today;\r\n\t\tif (back)\r\n\t\t\ttoday = (sd.getHours()*60+sd.getMinutes()) - (obj.first_hour||0)*60;\r\n\t\telse\r\n\t\t\ttoday = (obj.last_hour||0)*60 - (sd.getHours()*60+sd.getMinutes());\r\n\t\tvar per_day = (obj.last_hour - obj.first_hour)*60;\r\n\t\tvar days = Math.ceil( (ev_length / (60*1000) - today ) / per_day);\r\n\t\tif(days < 0) days = 0;\r\n\t\tev_length += days * (24*60 - per_day) * 60 * 1000;\r\n\t}\r\n\r\n\tvar fd = new Date(end_date*1+ev_length*dir);\r\n\tvar ignore = this[\"ignore_\"+this._mode];\r\n\r\n\tvar start_slot = 0,\r\n\t\tend_slot;\r\n\tif (obj.render){\r\n\t\tstart_slot = this._get_date_index(obj, sd);\r\n\t\tend_slot = this._get_date_index(obj, fd);\r\n\t} else{\r\n\t\tend_slot = Math.round(ev_length/60/60/1000/24);\r\n\t}\r\n\r\n\twhile (start_slot*dir <= end_slot*dir){\r\n\t\tvar check = scheduler.date.add(sd, obj.x_step*dir, obj.x_unit);\r\n\t\tif (ignore && ignore(sd)){\r\n\t\t\tev_length += (check-sd)*dir;\r\n\t\t\tend_slot += dir;\r\n\t\t}\r\n\r\n\t\tsd = check;\r\n\t\tstart_slot+=dir;\r\n\t}\r\n\r\n\treturn ev_length;\r\n};\r\n\r\nscheduler._get_section_view = function(){\r\n\treturn this.getView();\r\n};\r\n\r\nscheduler._get_section_property = function(){\r\n\tif(this.matrix && this.matrix[this._mode]){\r\n\t\treturn this.matrix[this._mode].y_property;\r\n\t}else if(this._props && this._props[this._mode]){\r\n\t\treturn this._props[this._mode].map_to;\r\n\t}\r\n\treturn null;\r\n};\r\n\r\nscheduler._is_initialized = function(){\r\n\tvar state = this.getState();\r\n\treturn (this._obj && state.date && state.mode);\r\n};\r\nscheduler._is_lightbox_open = function(){\r\n\tvar state = this.getState();\r\n\treturn state.lightbox_id !== null && state.lightbox_id !== undefined;\r\n};\r\n\r\n}","export default {\r\n\tevent: function (el, event, handler){\r\n\t\tif (el.addEventListener)\r\n\t\t\tel.addEventListener(event, handler, false);\r\n\t\r\n\t\telse if (el.attachEvent)\r\n\t\t\tel.attachEvent(\"on\"+event, handler);\r\n\t},\r\n\teventRemove: function (el, event, handler){\r\n\t\tif (el.removeEventListener)\r\n\t\t\tel.removeEventListener(event, handler, false);\r\n\t\r\n\t\telse if (el.detachEvent)\r\n\t\t\tel.detachEvent(\"on\"+event, handler);\r\n\t}\r\n};","import defaultDomEvents from './event';\r\n\r\nexport default function(){\r\n\r\n\tvar domEvents = function (addEvent, removeEvent) {\r\n\t\taddEvent = addEvent || defaultDomEvents.event;\r\n\t\tremoveEvent = removeEvent || defaultDomEvents.eventRemove;\r\n\t\tvar handlers = [];\r\n\t\tvar eventScope = {\r\n\t\t\tattach: function(el, event, callback, capture){\r\n\t\t\t\thandlers.push({element: el, event:event, callback: callback, capture: capture});\r\n\t\t\t\taddEvent(el, event, callback, capture);\r\n\t\t\t},\r\n\t\t\tdetach: function(el, event, callback, capture){\r\n\t\t\t\tremoveEvent(el, event, callback, capture);\r\n\t\t\t\tfor(var i = 0; i < handlers.length; i++){\r\n\t\t\t\t\tvar handler = handlers[i];\r\n\t\t\t\t\tif (handler.element === el && handler.event === event && handler.callback === callback && handler.capture === capture) {\r\n\t\t\t\t\t\thandlers.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tdetachAll: function () {\r\n\t\t\t\tvar staticArray = handlers.slice();\r\n\t\t\t\t// original handlers array can be spliced on every iteration\r\n\t\t\t\tfor (var i = 0; i < staticArray.length; i++){\r\n\t\t\t\t\tvar handler = staticArray[i];\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, handler.capture);\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, undefined);\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, false);\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, true);\r\n\t\t\t\t}\r\n\t\t\t\thandlers.splice(0, handlers.length);\r\n\t\t\t},\r\n\t\t\textend: function(){\r\n\t\t\t\treturn domEvents(this.event, this.eventRemove);\r\n\t\t\t}\r\n\t\t};\r\n\t\treturn eventScope;\r\n\t};\r\n\t\r\n\treturn domEvents();\r\n}","import createEventScope from './utils/scoped_event';\r\n\r\nexport default function extend(scheduler) {\r\n\r\n\r\nvar domEvents = createEventScope();\r\n\r\nscheduler.event = domEvents.attach;\r\nscheduler.eventRemove = domEvents.detach;\r\nscheduler._eventRemoveAll = domEvents.detachAll;\r\nscheduler._createDomEventScope = domEvents.extend;\r\n\r\n\r\nscheduler._trim = function(str){\r\n\tvar func = String.prototype.trim || function(){ return this.replace(/^\\s+|\\s+$/g, \"\"); };\r\n\treturn func.apply(str);\r\n};\r\n\r\nscheduler._isDate = function(obj){\r\n\tif (obj && typeof obj == \"object\") {\r\n\t\treturn !!(obj.getFullYear && obj.getMonth && obj.getDate);\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n};\r\n\r\nscheduler._isObject = function(obj){\r\n\treturn (obj && typeof obj == \"object\");\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n(function(){\r\n\r\n\t// eslint-disable-next-line no-control-regex\r\n\tvar htmlTags = new RegExp(\"<(?:.|\\n)*?>\", \"gm\");\r\n\tvar extraSpaces = new RegExp(\" +\", \"gm\");\r\n\r\n\tfunction stripHTMLLite(htmlText){\r\n\t\treturn (htmlText + \"\")\r\n\t\t\t.replace(htmlTags, \" \").\r\n\t\t\treplace(extraSpaces, \" \");\r\n\t}\r\n\r\n\tvar singleQuotes = new RegExp(\"'\", \"gm\");\r\n\tfunction escapeQuotes(text){\r\n\t\treturn (text + \"\").replace(singleQuotes, \"'\");\r\n\t}\r\n\r\n\tscheduler._waiAria = {\r\n\t\tgetAttributeString: function(attr){\r\n\t\t\tvar attributes = [\" \"];\r\n\t\t\tfor(var i in attr){\r\n\t\t\t\tif(typeof attr[i] != \"function\" && typeof attr[i] != \"object\") {\r\n\t\t\t\t\tvar text = escapeQuotes(stripHTMLLite(attr[i]));\r\n\t\t\t\t\tattributes.push(i + \"='\" + text + \"'\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tattributes.push(\" \");\r\n\t\t\treturn attributes.join(\" \");\r\n\t\t},\r\n\t\tsetAttributes: function(div, values){\r\n\t\t\tfor(var i in values){\r\n\t\t\t\tdiv.setAttribute(i, stripHTMLLite(values[i]));\r\n\t\t\t}\r\n\t\t\treturn div;\r\n\t\t},\r\n\r\n\t\tlabelAttr: function(div, content){\r\n\t\t\treturn this.setAttributes(div, {\"aria-label\": content});\r\n\t\t},\r\n\t\tlabel: function(label){\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": label});\r\n\t\t},\r\n\r\n\t\t// day/week/units\r\n\r\n\t\thourScaleAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\r\n\t\t},\r\n\t\tmonthCellAttr: function(div, date){\r\n\t\t\tthis.labelAttr(div, scheduler.templates.day_date(date));\r\n\t\t},\r\n\r\n\t\tnavBarDateAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\t\t},\r\n\t\tdayHeaderAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\t\t},\r\n\r\n\t\tdayColumnAttr: function(div, date){\r\n\t\t\tthis.dayHeaderAttr(div, scheduler.templates.day_date(date));\r\n\t\t},\r\n\r\n\t\theaderButtonsAttributes: function(div, label){\r\n\t\t\treturn this.setAttributes(div, {\"role\":\"button\", \"aria-label\":label});\r\n\t\t},\r\n\r\n\t\theaderToggleState: function(div, isActive){\r\n\t\t\treturn this.setAttributes(div, {\"aria-pressed\": isActive ? \"true\" : \"false\"});\r\n\t\t},\r\n\r\n\r\n\t\tgetHeaderCellAttr:function(dateString){\r\n\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": dateString});\r\n\t\t},\r\n\r\n\r\n\t\teventAttr: function(event, div){\r\n\t\t\tthis._eventCommonAttr(event, div);\r\n\t\t},\r\n\r\n\r\n\t\t_eventCommonAttr: function(event, div){\r\n\t\t\tdiv.setAttribute(\"aria-label\", stripHTMLLite(scheduler.templates.event_text(event.start_date, event.end_date, event)));\r\n\r\n\t\t\tif(scheduler.config.readonly){\r\n\t\t\t\tdiv.setAttribute(\"aria-readonly\", true);\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif(event.$dataprocessor_class){\r\n\t\t\t\tdiv.setAttribute(\"aria-busy\", true);\r\n\t\t\t}\r\n\r\n\r\n\t\t\tdiv.setAttribute(\"aria-selected\",\r\n\t\t\t\t(scheduler.getState().select_id == event.id) ? \"true\" : \"false\");\r\n\t\t},\r\n\r\n\t\tsetEventBarAttr: function(event, div){\r\n\t\t\tthis._eventCommonAttr(event, div);\r\n\t\t},\r\n\r\n\t\t_getAttributes: function(attributeSetter, arg){\r\n\t\t\tvar result = {\r\n\t\t\t\tsetAttribute:function(name, value){\r\n\t\t\t\t\tthis[name] = value;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\tattributeSetter.apply(this, [arg, result]);\r\n\t\t\treturn result;\r\n\r\n\t\t},\r\n\r\n\t\teventBarAttrString: function(event){\r\n\t\t\treturn this.getAttributeString(this._getAttributes(this.setEventBarAttr, event));\r\n\t\t},\r\n\r\n\r\n\r\n\t\tagendaHeadAttrString :function(){\r\n\t\t\treturn this.getAttributeString({role: \"row\"});\r\n\t\t},\r\n\t\tagendaHeadDateString :function(label){\r\n\t\t\treturn this.getAttributeString({role: \"columnheader\", \"aria-label\": label});\r\n\t\t},\r\n\t\tagendaHeadDescriptionString :function(label){\r\n\t\t\treturn this.agendaHeadDateString(label);\r\n\t\t},\r\n\t\tagendaDataAttrString: function(){\r\n\t\t\treturn this.getAttributeString({role: \"grid\"});\r\n\t\t},\r\n\t\tagendaEventAttrString: function(event){\r\n\t\t\tvar attrs = this._getAttributes(this._eventCommonAttr, event);\r\n\r\n\t\t\tattrs[\"role\"] = \"row\";\r\n\r\n\t\t\treturn this.getAttributeString(attrs);\r\n\r\n\t\t},\r\n\t\tagendaDetailsBtnString: function(){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels.icon_details});\r\n\t\t},\r\n\r\n\r\n\t\tgridAttrString: function(){\r\n\t\t\treturn this.getAttributeString({role: \"grid\"});\r\n\t\t},\r\n\r\n\t\tgridRowAttrString: function(event){\r\n\t\t\treturn this.agendaEventAttrString(event);\r\n\t\t},\r\n\r\n\t\tgridCellAttrString: function(event, column, value){\r\n\t\t\treturn this.getAttributeString({\"role\":\"gridcell\", \"aria-label\": [\r\n\t\t\t\t(column.label === undefined ? column.id : column.label),\r\n\t\t\t\t\": \",\r\n\t\t\t\tvalue\r\n\t\t\t]});\r\n\t\t},\r\n\r\n\t\tmapAttrString: function(){\r\n\t\t\treturn this.gridAttrString();\r\n\t\t},\r\n\t\tmapRowAttrString: function(event){\r\n\t\t\treturn this.gridRowAttrString(event);\r\n\t\t},\r\n\t\tmapDetailsBtnString: function(){\r\n\t\t\treturn this.agendaDetailsBtnString();\r\n\t\t},\r\n\r\n\t\tminicalHeader: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"id\":headerId+\"\",\r\n\t\t\t\t\"aria-live\":\"assertice\",\r\n\t\t\t\t\"aria-atomic\":\"true\"\r\n\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalGrid: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"aria-labelledby\":headerId+\"\",\r\n\t\t\t\t\"role\":\"grid\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalRow: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"row\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalDayCell: function(div, date){\r\n\t\t\tvar selected = (date.valueOf() < scheduler._max_date.valueOf() && date.valueOf() >= scheduler._min_date.valueOf());\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"gridcell\",\r\n\t\t\t\t\"aria-label\": scheduler.templates.day_date(date),\r\n\t\t\t\t\"aria-selected\": selected ? \"true\" : \"false\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalHeadCell: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"columnheader\"\r\n\t\t\t});\r\n\t\t},\r\n\r\n\r\n\t\tweekAgendaDayCell: function(div, date){\r\n\t\t\tvar header = div.querySelector(\".dhx_wa_scale_bar\");\r\n\t\t\tvar content = div.querySelector(\".dhx_wa_day_data\");\r\n\t\t\tvar headerId = scheduler.uid() + \"\";\r\n\t\t\tthis.setAttributes(header, { \"id\": headerId});\r\n\t\t\tthis.setAttributes(content, { \"aria-labelledby\": headerId});\r\n\r\n\t\t},\r\n\t\tweekAgendaEvent: function(div, event){\r\n\t\t\tthis.eventAttr(event, div);\r\n\t\t},\r\n\r\n\t\tlightboxHiddenAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t},\r\n\r\n\t\tlightboxVisibleAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"false\");\r\n\t\t},\r\n\r\n\t\tlightboxSectionButtonAttrString: function(label){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":label, \"tabindex\":\"0\"});\r\n\t\t},\r\n\r\n\t\tyearHeader: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"id\":headerId+\"\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tyearGrid: function(div, headerId){\r\n\t\t\tthis.minicalGrid(div, headerId);\r\n\t\t},\r\n\t\tyearHeadCell: function(div){\r\n\t\t\treturn this.minicalHeadCell(div);\r\n\t\t},\r\n\t\tyearRow: function(div){\r\n\t\t\treturn this.minicalRow(div);\r\n\t\t},\r\n\t\tyearDayCell: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"gridcell\"\r\n\t\t\t});\r\n\t\t},\r\n\r\n\t\tlightboxAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t\tdiv.firstChild.setAttribute(\"role\", \"heading\");\r\n\t\t},\r\n\r\n\t\tlightboxButtonAttrString:function(buttonName){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels[buttonName], \"tabindex\":\"0\"});\r\n\t\t},\r\n\t\teventMenuAttrString: function(iconName){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels[iconName]});\r\n\t\t},\r\n\t\tlightboxHeader: function(div, headerText){\r\n\t\t\tdiv.setAttribute(\"aria-label\", headerText);\r\n\t\t},\r\n\r\n\t\tlightboxSelectAttrString: function(time_option){\r\n\t\t\tvar label = \"\";\r\n\r\n\t\t\tswitch (time_option) {\r\n\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.year;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%m\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.month;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%d\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.day;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%H:%i\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.hour + \" \" + scheduler.locale.labels.minute;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": label});\r\n\t\t},\r\n\r\n\r\n\t\tmessageButtonAttrString: function(buttonLabel){\r\n\t\t\treturn \"tabindex='0' role='button' aria-label='\"+buttonLabel+\"'\";\r\n\t\t},\r\n\r\n\t\tmessageInfoAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"alert\");\r\n\t\t\t//div.setAttribute(\"tabindex\", \"-1\");\r\n\t\t},\r\n\r\n\t\tmessageModalAttr: function(div, uid){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t\tif(uid){\r\n\t\t\t\tdiv.setAttribute(\"aria-labelledby\", uid);\r\n\t\t\t}\r\n\r\n\t\t\t//\tdiv.setAttribute(\"tabindex\", \"-1\");\r\n\t\t},\r\n\r\n\t\tquickInfoAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t},\r\n\r\n\t\tquickInfoHeaderAttrString: function(){\r\n\t\t\treturn \" role='heading' \";\r\n\t\t},\r\n\r\n\t\tquickInfoHeader: function(div, header){\r\n\t\t\tdiv.setAttribute(\"aria-label\", header);\r\n\t\t},\r\n\r\n\t\tquickInfoButtonAttrString: function(label){\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"role\":\"button\", \"aria-label\":label, \"tabindex\":\"0\"});\r\n\t\t},\r\n\r\n\t\ttooltipAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"tooltip\");\r\n\t\t},\r\n\r\n\t\ttooltipVisibleAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"false\");\r\n\t\t},\r\n\r\n\t\ttooltipHiddenAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t}\r\n\t};\r\n\r\n\tfunction isDisabled(){\r\n\t\treturn !scheduler.config.wai_aria_attributes;\r\n\t}\r\n\r\n\tfor(var i in scheduler._waiAria){\r\n\t\tscheduler._waiAria[i] = (function(payload){\r\n\t\t\treturn function(){\r\n\t\t\t\tif(isDisabled()){\r\n\t\t\t\t\treturn \" \";\r\n\t\t\t\t}\r\n\t\t\t\treturn payload.apply(this, arguments);\r\n\t\t\t};\r\n\t\t})(scheduler._waiAria[i]);\r\n\t}\r\n\r\n\r\n})();\r\n\r\n}","var uidSeed = Date.now();\r\nfunction uid () {\r\n\treturn uidSeed++;\r\n}\r\n\r\n// iframe-safe array type check instead of using instanceof\r\nfunction isArray(obj){\r\n\tif(Array.isArray){\r\n\t\treturn Array.isArray(obj);\r\n\t}else{\r\n\t\t// close enough\r\n\t\treturn (obj && obj.length !== undefined && obj.pop && obj.push);\r\n\t}\r\n}\r\n\r\n// non-primitive string object, e.g. new String(\"abc\")\r\nfunction isStringObject(obj){\r\n\treturn obj && typeof obj === \"object\" && \r\n\t\tFunction.prototype.toString.call(obj.constructor) === \"function String() { [native code] }\";\r\n}\r\n\r\n// non-primitive number object, e.g. new Number(5)\r\nfunction isNumberObject(obj){\r\n\treturn obj && typeof obj === \"object\" && \r\n\t\tFunction.prototype.toString.call(obj.constructor) === \"function Number() { [native code] }\";\r\n}\r\n\r\n// non-primitive number object, e.g. new Boolean(true)\r\nfunction isBooleanObject(obj){\r\n\treturn obj && typeof obj === \"object\" &&\r\n\t\tFunction.prototype.toString.call(obj.constructor) === \"function Boolean() { [native code] }\";\r\n}\r\n\r\nfunction isDate(obj) {\r\n\tif (obj && typeof obj === \"object\") {\r\n\t\treturn !!(obj.getFullYear && obj.getMonth && obj.getDate);\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n}\r\n\r\nfunction defined(obj) {\r\n\treturn typeof(obj) != \"undefined\";\r\n}\r\n\r\nfunction delay (callback, timeout){\r\n\tvar timer;\r\n\r\n\tvar result = function() {\r\n\t\tresult.$cancelTimeout();\r\n\t\tresult.$pending = true;\r\n\t\tvar args = Array.prototype.slice.call(arguments);\r\n\t\ttimer = setTimeout(function(){\r\n\t\t\tcallback.apply(this, args);\r\n\t\t\tresult.$pending = false;\r\n\t\t}, timeout);\r\n\t};\r\n\r\n\tresult.$pending = false;\r\n\tresult.$cancelTimeout = function(){\r\n\t\tclearTimeout(timer);\r\n\t\tresult.$pending = false;\r\n\t};\r\n\tresult.$execute = function(){\r\n\t\tvar args = Array.prototype.slice.call(arguments);\r\n\t\tcallback.apply(this, args);\r\n\t\tresult.$cancelTimeout();\r\n\t};\r\n\r\n\treturn result;\r\n}\r\n\r\nexport default {\r\n\tuid: uid,\r\n\tmixin: function mixin (target, source, force){\r\n\t\tfor (var f in source)\r\n\t\t\tif (((target[f] === undefined) || force)) target[f]=source[f];\r\n\t\treturn target;\r\n\t},\r\n\tcopy: function copy(object) {\r\n\t\tvar i, result; // iterator, types array, result\r\n\t\r\n\t\tif (object && typeof object == \"object\") {\r\n\t\r\n\t\t\tswitch (true){\r\n\t\t\t\tcase (isDate(object)):\r\n\t\t\t\t\tresult = new Date(object);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isArray(object)):\r\n\t\t\t\t\tresult = new Array(object.length);\r\n\t\t\t\t\tfor(i = 0; i < object.length; i++){\r\n\t\t\t\t\t\tresult[i] = copy(object[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isStringObject(object)):\r\n\t\t\t\t\tresult = new String(object);// jshint ignore:line\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isNumberObject(object)):\r\n\t\t\t\t\tresult = new Number(object);// jshint ignore:line\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isBooleanObject(object)):\r\n\t\t\t\t\tresult = new Boolean(object);// jshint ignore:line\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tresult = {};\r\n\t\t\t\t\tfor (i in object) {\r\n\t\t\t\t\t\tconst varType = typeof object[i];\r\n\r\n\t\t\t\t\t\tif (varType === \"string\" || varType === \"number\" || varType === \"boolean\" ) {\r\n\t\t\t\t\t\t\tresult[i] = object[i];\r\n\t\t\t\t\t\t} else if(isDate(object[i])){\r\n\t\t\t\t\t\t\tresult[i] = new Date(object[i]);\r\n\t\t\t\t\t\t}else if (Object.prototype.hasOwnProperty.apply(object, [i]))\r\n\t\t\t\t\t\t\tresult[i] = copy(object[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result || object;\r\n\t},\r\n\tdefined,\r\n\tisDate,\r\n\tdelay\r\n};\r\n","//returns position of html element on the page\r\nfunction elementPosition(elem) {\r\n\tvar top=0, left=0, right=0, bottom=0;\r\n\tif (elem.getBoundingClientRect) { //HTML5 method\r\n\t\tvar box = elem.getBoundingClientRect();\r\n\t\tvar body = document.body;\r\n\t\tvar docElem = (document.documentElement ||\r\n\t\t\tdocument.body.parentNode ||\r\n\t\t\tdocument.body);\r\n\r\n\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\r\n\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\r\n\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\r\n\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\r\n\t\ttop = box.top + scrollTop - clientTop;\r\n\t\tleft = box.left + scrollLeft - clientLeft;\r\n\r\n\t\tright = document.body.offsetWidth - box.right;\r\n\t\tbottom = document.body.offsetHeight - box.bottom;\r\n\t} else { //fallback to naive approach\r\n\t\twhile(elem) {\r\n\t\t\ttop = top + parseInt(elem.offsetTop,10);\r\n\t\t\tleft = left + parseInt(elem.offsetLeft,10);\r\n\t\t\telem = elem.offsetParent;\r\n\t\t}\r\n\r\n\t\tright = document.body.offsetWidth - elem.offsetWidth - left;\r\n\t\tbottom = document.body.offsetHeight - elem.offsetHeight - top;\r\n\t}\r\n\treturn { y: Math.round(top), x: Math.round(left), width:elem.offsetWidth, height:elem.offsetHeight, right: Math.round(right), bottom: Math.round(bottom) };\r\n}\r\n\r\n/*\r\nevent position relatively to DOM element\r\n */\r\nfunction getRelativeEventPosition(ev, node){\r\n\tvar d = document.documentElement;\r\n\tvar box = elementPosition(node);\r\n\r\n\treturn {\r\n\t\tx: ev.clientX + d.scrollLeft - d.clientLeft - box.x + node.scrollLeft,\r\n\t\ty: ev.clientY + d.scrollTop - d.clientTop - box.y + node.scrollTop\r\n\t};\r\n}\r\n\r\nfunction getNodePosition(elem) {\r\n\tvar top=0, left=0, right=0, bottom=0;\r\n\tif (elem.getBoundingClientRect) { //HTML5 method\r\n\t\tvar box = elem.getBoundingClientRect();\r\n\t\tvar body = document.body;\r\n\t\tvar docElem = (document.documentElement ||\r\n\t\t\tdocument.body.parentNode ||\r\n\t\t\tdocument.body);\r\n\r\n\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\r\n\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\r\n\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\r\n\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\r\n\t\ttop = box.top + scrollTop - clientTop;\r\n\t\tleft = box.left + scrollLeft - clientLeft;\r\n\r\n\t\tright = document.body.offsetWidth - box.right;\r\n\t\tbottom = document.body.offsetHeight - box.bottom;\r\n\t} else { //fallback to naive approach\r\n\t\twhile(elem) {\r\n\t\t\ttop = top + parseInt(elem.offsetTop,10);\r\n\t\t\tleft = left + parseInt(elem.offsetLeft,10);\r\n\t\t\telem = elem.offsetParent;\r\n\t\t}\r\n\r\n\t\tright = document.body.offsetWidth - elem.offsetWidth - left;\r\n\t\tbottom = document.body.offsetHeight - elem.offsetHeight - top;\r\n\t}\r\n\treturn { y: Math.round(top), x: Math.round(left), width:elem.offsetWidth, height:elem.offsetHeight, right: Math.round(right), bottom: Math.round(bottom) };\r\n}\r\n\r\nfunction getClassName(node){\r\n\tif(!node) return \"\";\r\n\r\n\tvar className = node.className || \"\";\r\n\tif(className.baseVal)//'className' exist but not a string - IE svg element in DOM\r\n\t\tclassName = className.baseVal;\r\n\r\n\tif(!className.indexOf)\r\n\t\tclassName = '';\r\n\r\n\treturn className || \"\";\r\n}\r\n\r\nfunction getTargetNode(e) {\r\n\tvar trg;\r\n\tif (e.tagName)\r\n\t\ttrg = e;\r\n\telse {\r\n\t\te = e || window.event;\r\n\t\ttrg = e.target || e.srcElement;\r\n\t\tif (trg.shadowRoot && e.composedPath) {\r\n\t\t\ttrg = e.composedPath()[0];\r\n\t\t}\r\n\t}\r\n\treturn trg;\r\n}\r\n\r\nfunction locateCss(e, classname, strict){\r\n\tif(strict === undefined)\r\n\t\tstrict = true;\r\n\r\n\tvar trg = e.target || e.srcElement;\r\n\tvar css = '';\r\n\r\n\twhile (trg){\r\n\t\tcss = getClassName(trg);\r\n\r\n\t\tif(css){\r\n\t\t\tvar ind = css.indexOf(classname);\r\n\t\t\tif (ind >= 0){\r\n\t\t\t\tif (!strict)\r\n\t\t\t\t\treturn trg;\r\n\r\n\t\t\t\t//check that we have exact match\r\n\t\t\t\tvar left = (ind === 0) || (!((css.charAt(ind - 1)||\"\").trim()));\r\n\t\t\t\tvar right = ((ind + classname.length >= css.length)) || (!((css.charAt(ind + classname.length)).trim()));\r\n\r\n\t\t\t\tif (left && right)\r\n\t\t\t\t\treturn trg;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\ttrg=trg.parentNode;\r\n\t}\r\n\treturn null;\r\n}\r\n\r\n\r\n// get focusable nodes\r\nfunction isVisible(node){\r\n\tvar display = false,\r\n\t\tvisibility = false;\r\n\tif(window.getComputedStyle){\r\n\t\tvar style = window.getComputedStyle(node, null);\r\n\t\tdisplay = style[\"display\"];\r\n\t\tvisibility = style[\"visibility\"];\r\n\t}else if(node.currentStyle){\r\n\t\tdisplay = node.currentStyle[\"display\"];\r\n\t\tvisibility = node.currentStyle[\"visibility\"];\r\n\t}\r\n\r\n\tvar hiddenSection = false;\r\n\tvar recurringSection = locateCss({target:node}, \"dhx_form_repeat\", false);\r\n\tif(recurringSection){\r\n\t\thiddenSection = !!(recurringSection.style.height == \"0px\");\r\n\t}\r\n\thiddenSection = hiddenSection || !(node.offsetHeight);\r\n\r\n\treturn (display != \"none\" && visibility != \"hidden\" && !hiddenSection);\r\n}\r\n\r\nfunction hasNonNegativeTabIndex(node){\r\n\treturn !isNaN(node.getAttribute(\"tabindex\")) && (node.getAttribute(\"tabindex\")*1 >= 0);\r\n}\r\n\r\nfunction hasHref(node){\r\n\tvar canHaveHref = {\"a\": true, \"area\": true};\r\n\tif(canHaveHref[node.nodeName.loLowerCase()]){\r\n\t\treturn !!node.getAttribute(\"href\");\r\n\t}\r\n\treturn true;\r\n}\r\n\r\nfunction isEnabled(node){\r\n\tvar canDisable = {\"input\":true, \"select\":true, \"textarea\":true, \"button\":true, \"object\":true};\r\n\tif(canDisable[node.nodeName.toLowerCase()]){\r\n\t\treturn !node.hasAttribute(\"disabled\");\r\n\t}\r\n\r\n\treturn true;\r\n}\r\n\r\n\r\nfunction getFocusableNodes(root){\r\n\tvar nodes = root.querySelectorAll([\r\n\t\t\"a[href]\",\r\n\t\t\"area[href]\",\r\n\t\t\"input\",\r\n\t\t\"select\",\r\n\t\t\"textarea\",\r\n\t\t\"button\",\r\n\t\t\"iframe\",\r\n\t\t\"object\",\r\n\t\t\"embed\",\r\n\t\t\"[tabindex]\",\r\n\t\t\"[contenteditable]\"\r\n\t].join(\", \"));\r\n\r\n\tvar nodesArray = Array.prototype.slice.call(nodes, 0);\r\n\t\r\n\tfor(var i = 0; i < nodesArray.length; i++){\r\n\t\tnodesArray[i].$position = i;\r\n\t\t// we remember original nodes order, \r\n\t\t// so when we sort them by tabindex we ensure order of nodes with same tabindex is preserved, \r\n\t\t// since some browsers do unstable sort\r\n\t}\r\n\t\r\n\tnodesArray.sort(function(a, b) {\r\n\t\tif(a.tabIndex === 0 && b.tabIndex !== 0){\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\tif(a.tabIndex !== 0 && b.tabIndex === 0){\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\t\r\n\t\tif (a.tabIndex === b.tabIndex){\r\n\t\t\t// ensure we do stable sort\r\n\t\t\treturn a.$position - b.$position;\r\n\t\t}\r\n\t\tif (a.tabIndex < b.tabIndex) {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\treturn 1;\r\n\t});\r\n\t\r\n\tfor(var i = 0; i < nodesArray.length; i++){\r\n\t\tvar node = nodesArray[i];\r\n\t\tvar isValid = (hasNonNegativeTabIndex(node) || isEnabled(node) || hasHref(node)) && isVisible(node);\r\n\t\tif(!isValid){\r\n\t\t\tnodesArray.splice(i, 1);\r\n\t\t\ti--;\r\n\t\t}\r\n\t}\r\n\treturn nodesArray;\r\n}\r\n\r\n\r\nfunction isShadowDomSupported() {\r\n\treturn document.head.createShadowRoot || document.head.attachShadow;\r\n}\r\n\r\n/**\r\n * Returns element that has the browser focus, or null if no element has focus.\r\n * Works with shadow DOM, so it's prefereed to use this function instead of document.activeElement directly.\r\n * @returns HTMLElement\r\n */\r\nfunction getActiveElement(){\r\n\tvar activeElement = document.activeElement;\r\n\tif (activeElement.shadowRoot) {\r\n\t\tactiveElement = activeElement.shadowRoot.activeElement;\r\n\t}\r\n\tif (activeElement === document.body && document.getSelection) {\r\n\t\tactiveElement = document.getSelection().focusNode || document.body;\r\n\t}\r\n\r\n\treturn activeElement;\r\n}\r\n\r\n/**\r\n * Returns document.body or the host node of the ShadowRoot, if the element is attached to ShadowDom\r\n * @param {HTMLElement} element \r\n * @returns HTMLElement\r\n */\r\nfunction getRootNode(element) {\r\n\tif (!element) {\r\n\t\treturn document.body;\r\n\t}\r\n\tif (!isShadowDomSupported()) {\r\n\t\treturn document.body;\r\n\t}\r\n\twhile (element.parentNode && (element = element.parentNode)) {\r\n\t\tif (element instanceof ShadowRoot) {\r\n\t\t\treturn element.host;\r\n\t\t}\r\n\t}\r\n\treturn document.body;\r\n}\r\n\r\nfunction hasShadowParent(element) {\r\n\treturn !!getRootNode(element);\r\n}\r\n\r\nexport default {\r\n\t/**\r\n\t * @desc: Calculate absolute position of html object\r\n\t * @type: private\r\n\t * @param: htmlObject - html object\r\n\t * @topic: 0\r\n\t */\r\n\tgetAbsoluteLeft: function getAbsoluteLeft(htmlObject){\r\n\t\treturn this.getOffset(htmlObject).left;\r\n\t},\r\n\t/**\r\n\t * @desc: Calculate absolute position of html object\r\n\t * @type: private\r\n\t * @param: htmlObject - html object\r\n\t * @topic: 0\r\n\t */\r\n\tgetAbsoluteTop: function getAbsoluteTop(htmlObject){\r\n\t\treturn this.getOffset(htmlObject).top;\r\n\t},\r\n\r\n\tgetOffsetSum: function getOffsetSum(elem) {\r\n\t\tvar top=0, left=0;\r\n\t\twhile(elem) {\r\n\t\t\ttop = top + parseInt(elem.offsetTop);\r\n\t\t\tleft = left + parseInt(elem.offsetLeft);\r\n\t\t\telem = elem.offsetParent;\r\n\t\t}\r\n\t\treturn {top: top, left: left};\r\n\t},\r\n\r\n\tgetOffsetRect: function getOffsetRect(elem) {\r\n\t\tvar box = elem.getBoundingClientRect();\r\n\r\n\t\tvar top = 0,\r\n\t\t\tleft = 0;\r\n\r\n\t\t// https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent#Mobile_Tablet_or_Desktop\r\n\t\tif (!/Mobi/.test(navigator.userAgent)) {\r\n\t\t\tvar body = document.body;\r\n\t\t\tvar docElem = document.documentElement;\r\n\t\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\r\n\t\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\r\n\t\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\r\n\t\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\r\n\r\n\t\t\ttop = box.top + scrollTop - clientTop;\r\n\t\t\tleft = box.left + scrollLeft - clientLeft;\r\n\t\t}else {\r\n\t\t\t// incorrect left coordinate on mobile zoom\r\n\t\t\t// https://bugs.chromium.org/p/chromium/issues/detail?id=489206\r\n\r\n\t\t\tvar dummy = document.createElement(\"div\");\r\n\t\t\tdummy.style.position=\"absolute\";\r\n\t\t\tdummy.style.left=\"0px\";\r\n\t\t\tdummy.style.top=\"0px\";\r\n\t\t\tdummy.style.width=\"1px\";\r\n\t\t\tdummy.style.height = \"1px\";\r\n\r\n\t\t\tdocument.body.appendChild(dummy);\r\n\t\t\tvar dummyBox = dummy.getBoundingClientRect();\r\n\t\t\ttop = box.top - dummyBox.top;\r\n\t\t\tleft = box.left - dummyBox.left;\r\n\r\n\t\t\tdummy.parentNode.removeChild(dummy);\r\n\t\t}\r\n\r\n\t\treturn { top: Math.round(top), left: Math.round(left) };\r\n\t},\r\n\r\n\tgetOffset: function getOffset(elem) {\r\n\t\tif (elem.getBoundingClientRect) {\r\n\t\t\treturn this.getOffsetRect(elem);\r\n\t\t} else {\r\n\t\t\treturn this.getOffsetSum(elem);\r\n\t\t}\r\n\t},\r\n\r\n\tclosest: function(element, selector){\r\n\t\tif(!element || !selector){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn closest(element, selector);\r\n\t},\r\n\tinsertAfter: function(newNode, referenceNode){\r\n\t\tif(referenceNode.nextSibling){\r\n\t\t\treferenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);\r\n\t\t}else{\r\n\t\t\treferenceNode.parentNode.appendChild(newNode);\r\n\t\t}\r\n\t},\r\n\tremove: function(node) {\r\n\t\tif (node && node.parentNode) {\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t}\r\n\t},\r\n\tisChildOf: function(child, parent) {\r\n\t\treturn parent.contains(child);\r\n\t},\r\n\tgetFocusableNodes,\r\n\tgetClassName,\r\n\tlocateCss,\r\n\tgetRootNode,\r\n\thasShadowParent,\r\n\tisShadowDomSupported,\r\n\tgetActiveElement,\r\n\tgetRelativeEventPosition,\r\n\tgetTargetNode,\r\n\tgetNodePosition\r\n};\r\n\r\nvar closest;\r\nif(Element.prototype.closest){\r\n\tclosest = function(element, selector){\r\n\t\treturn element.closest(selector);\r\n\t};\r\n}else{\r\n\tvar matches = Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\r\n\tclosest = function(element, selector) {\r\n\t\tvar el = element;\r\n\t\tdo {\r\n\t\t\tif (matches.call(el, selector)){\r\n\t\t\t\treturn el;\r\n\t\t\t}\r\n\t\t\tel = el.parentElement || el.parentNode;\r\n\t\t} while (el !== null && el.nodeType === 1);\r\n\t\treturn null;\r\n\t};\r\n}\r\n","/* eslint-disable no-restricted-globals */\r\nvar isWindowAwailable = typeof window !== \"undefined\";\r\n\r\n/* eslint-enable no-restricted-globals */\r\n\r\nexport default {\r\n\tisIE: isWindowAwailable && (navigator.userAgent.indexOf(\"MSIE\") >= 0 || navigator.userAgent.indexOf(\"Trident\") >= 0),\r\n\tisIE6: isWindowAwailable && (!XMLHttpRequest && navigator.userAgent.indexOf(\"MSIE\") >= 0),\r\n\tisIE7: isWindowAwailable && (navigator.userAgent.indexOf(\"MSIE 7.0\") >= 0 && navigator.userAgent.indexOf(\"Trident\") < 0),\r\n\tisIE8: isWindowAwailable && (navigator.userAgent.indexOf(\"MSIE 8.0\") >= 0 && navigator.userAgent.indexOf(\"Trident\") >= 0),\r\n\tisOpera: isWindowAwailable && (navigator.userAgent.indexOf(\"Opera\") >= 0),\r\n\tisChrome: isWindowAwailable && (navigator.userAgent.indexOf(\"Chrome\") >= 0),\r\n\tisKHTML: isWindowAwailable && (navigator.userAgent.indexOf(\"Safari\") >= 0 || navigator.userAgent.indexOf(\"Konqueror\") >= 0),\r\n\tisFF: isWindowAwailable && (navigator.userAgent.indexOf(\"Firefox\") >= 0),\r\n\tisIPad: isWindowAwailable && (navigator.userAgent.search(/iPad/gi) >= 0),\r\n\tisEdge: isWindowAwailable && (navigator.userAgent.indexOf(\"Edge\")!=-1),\r\n\tisNode: (!isWindowAwailable || typeof navigator == \"undefined\")\r\n};","export default function extend(scheduler) {\r\n\r\nscheduler.destructor = function(){\r\n\tscheduler.callEvent(\"onDestroy\", []);\r\n\tthis.clearAll();\r\n\r\n\tif(this.$container){\r\n\t\t// FIXME: clear container or remove container\r\n\t\tthis.$container.innerHTML = \"\";\r\n\t\t// scheduler.$domHelpers.remove(this.$container);\r\n\t}\r\n\r\n\tif(this._eventRemoveAll){\r\n\t\tthis._eventRemoveAll();\r\n\t}\r\n\r\n\tif(this.resetLightbox){\r\n\t\tthis.resetLightbox();\r\n\t}\r\n\r\n\tif(this._dp && this._dp.destructor){\r\n\t\tthis._dp.destructor();\r\n\t}\r\n\r\n\t// detachAllEvents should be called last, because in components may be attached events\r\n\tthis.detachAllEvents();\r\n\r\n\tfor(var i in this){\r\n\t\tif(i.indexOf(\"$\") === 0){\r\n\t\t\tdelete this[i];\r\n\t\t}\r\n\t}\r\n\tscheduler.$destroyed = true;\r\n};\r\n\r\n}","export default function(data) {\r\n\tif (typeof data === \"string\" || typeof data === \"number\") {\r\n\t\treturn data;\r\n\t}\r\n\tvar result = \"\";\r\n\tfor (var key in data) {\r\n\t\tvar serialized = \"\";\r\n\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\tif (typeof data[key] === \"string\") {\r\n\t\t\t\tserialized = encodeURIComponent(data[key]);\r\n\t\t\t} else if (typeof data[key] === \"number\") {\r\n\t\t\t\tserialized = data[key];\r\n\t\t\t} else {\r\n\t\t\t\tserialized = encodeURIComponent(JSON.stringify(data[key]));\r\n\t\t\t}\r\n\t\t\tserialized = key + \"=\" + serialized;\r\n\r\n\t\t\tif (result.length) {\r\n\t\t\t\tserialized = \"&\" + serialized;\r\n\t\t\t}\r\n\t\t\tresult += serialized;\r\n\t\t}\r\n\t}\r\n\treturn result;\r\n}","import serialize from \"../common/url_serialize.js\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler.Promise = window.Promise; \r\n\r\nfunction createConfig(method, args) {\r\n\tvar result = {\r\n\t\tmethod: method\r\n\t};\r\n\r\n\tif (args.length === 0) {\r\n\t\tthrow new Error(\"Arguments list of query is wrong.\");\r\n\t}\r\n\tif (args.length === 1) {\r\n\t\tif (typeof args[0] === \"string\") {\r\n\t\t\tresult.url = args[0];\r\n\t\t\tresult.async = true;\r\n\t\t} else {\r\n\t\t\tresult.url = args[0].url;\r\n\t\t\tresult.async = (args[0].async || true);\r\n\t\t\tresult.callback = args[0].callback;\r\n\t\t\tresult.headers = args[0].headers;\r\n\t\t}\r\n\t\tif (method === \"POST\" || \"PUT\") {\r\n\t\t\tif (args[0].data) {\r\n\t\t\t\tif (typeof args[0].data !== \"string\") {\r\n\t\t\t\t\tresult.data = serialize(args[0].data);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresult.data = args[0].data;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tresult.data = \"\";\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n\r\n\tresult.url = args[0];\r\n\tswitch(method) {\r\n\t\tcase \"GET\":\r\n\t\tcase \"DELETE\":\r\n\t\t\tresult.callback = args[1];\r\n\t\t\tresult.headers = args[2];\r\n\t\tbreak;\r\n\t\tcase \"POST\":\r\n\t\tcase \"PUT\":\r\n\t\t\tif (args[1]) {\r\n\t\t\t\tif (typeof args[1] !== \"string\") {\r\n\t\t\t\t\tresult.data = serialize(args[1]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresult.data = args[1];\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tresult.data = \"\";\r\n\t\t\t}\r\n\t\t\tresult.callback = args[2];\r\n\t\t\tresult.headers = args[3];\r\n\t\tbreak;\r\n\t}\r\n\treturn result;\r\n}\r\nscheduler.ajax = {\r\n\t// if false - dhxr param will added to prevent caching on client side (default),\r\n\t// if true - do not add extra params\r\n\tcache: true,\r\n\r\n\t// default method for load/loadStruct, post/get allowed\r\n\tmethod: \"get\",\r\n\r\n\tserializeRequestParams: serialize,\r\n\tparse: function(data) {\r\n\t\tif (typeof data !== \"string\") return data;\r\n\r\n\t\tvar obj;\r\n\t\tdata = data.replace(/^[\\s]+/,\"\");\r\n\t\tif (typeof DOMParser !== \"undefined\" && !scheduler.$env.isIE) { // ff,ie9\r\n\t\t\tobj = (new DOMParser()).parseFromString(data, \"text/xml\");\r\n\t\t} else if (typeof window.ActiveXObject !== \"undefined\") {\r\n\t\t\tobj = new window.ActiveXObject(\"Microsoft.XMLDOM\");\r\n\t\t\tobj.async = \"false\";\r\n\t\t\tobj.loadXML(data);\r\n\t\t}\r\n\t\treturn obj;\r\n\t},\r\n\txmltop: function(tagname, xhr, obj) {\r\n\t\tif (typeof xhr.status == \"undefined\" || xhr.status < 400) {\r\n\t\t\tvar xml = (!xhr.responseXML) ? this.parse(xhr.responseText || xhr) : (xhr.responseXML || xhr);\r\n\t\t\tif (xml && xml.documentElement !== null && !xml.getElementsByTagName(\"parsererror\").length) {\r\n\t\t\t\treturn xml.getElementsByTagName(tagname)[0];\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (obj !== -1) scheduler.callEvent(\"onLoadXMLError\",[\"Incorrect XML\", arguments[1], obj]);\r\n\t\treturn document.createElement(\"DIV\");\r\n\t},\r\n\txpath: function(xpathExp, docObj) {\r\n\t\tif (!docObj.nodeName) docObj = docObj.responseXML || docObj;\r\n\t\tif (scheduler.$env.isIE) {\r\n\t\t\treturn docObj.selectNodes(xpathExp)||[];\r\n\t\t} else {\r\n\t\t\tvar rows = [];\r\n\t\t\tvar first;\r\n\t\t\tvar col = (docObj.ownerDocument||docObj).evaluate(xpathExp, docObj, null, XPathResult.ANY_TYPE, null);\r\n\r\n\t\t\twhile (true){\r\n\t\t\t\tfirst = col.iterateNext();\r\n\t\t\t\tif(first){\r\n\t\t\t\t\trows.push(first);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn rows;\r\n\t\t}\r\n\t},\r\n\tquery: function(config) {\r\n\t\treturn this._call(\r\n\t\t\t(config.method || \"GET\"),\r\n\t\t\tconfig.url,\r\n\t\t\tconfig.data || \"\",\r\n\t\t\t(config.async || true),\r\n\t\t\tconfig.callback,\r\n\t\t\tconfig.headers\r\n\t\t);\r\n\t},\r\n\tget: function(url, onLoad, headers) {\r\n\t\tvar config = createConfig(\"GET\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tgetSync: function(url, headers) {\r\n\t\tvar config = createConfig(\"GET\", arguments);\r\n\t\tconfig.async = false;\r\n\t\treturn this.query(config);\r\n\t},\r\n\tput: function(url, postData, onLoad, headers) {\r\n\t\tvar config = createConfig(\"PUT\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tdel: function(url, onLoad, headers) {\r\n\t\t/**\r\n\t\t * https://tools.ietf.org/html/rfc7231#section-4.3.5\r\n\t\t * A payload within a DELETE request message has no defined semantics;\r\n\t\t * sending a payload body on a DELETE request might cause some existing\r\n\t\t * implementations to reject the request.\r\n\t\t */\r\n\t\tvar config = createConfig(\"DELETE\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tpost: function(url, postData, onLoad, headers) {\r\n\t\tif (arguments.length == 1) {\r\n\t\t\tpostData = \"\";\r\n\t\t} else if (arguments.length == 2 && typeof(postData) == \"function\") {\r\n\t\t\tonLoad = postData;\r\n\t\t\tpostData = \"\";\r\n\t\t}\r\n\t\tvar config = createConfig(\"POST\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tpostSync: function(url, postData, headers) {\r\n\t\tpostData = (postData === null ? \"\" : String(postData));\r\n\r\n\t\tvar config = createConfig(\"POST\", arguments);\r\n\t\tconfig.async = false;\r\n\t\treturn this.query(config);\r\n\t},\r\n\t_call: function(method, url, postData, async, onLoad, headers) {\r\n\t\treturn new scheduler.Promise((function(resolve, reject) {\r\n\t\t\tvar t = (typeof XMLHttpRequest !== undefined && !scheduler.$env.isIE ? new XMLHttpRequest() : new window.ActiveXObject(\"Microsoft.XMLHTTP\"));\r\n\t\t\tvar isQt = (navigator.userAgent.match(/AppleWebKit/) !== null && navigator.userAgent.match(/Qt/) !== null && navigator.userAgent.match(/Safari/) !== null);\r\n\r\n\t\t\tif (!!async) {\r\n\t\t\t\tt.addEventListener(\"readystatechange\", function() {\r\n\t\t\t\t\tif ((t.readyState == 4) || (isQt && t.readyState == 3)) { // what for long response and status 404?\r\n\t\t\t\t\t\tif (t.status != 200 || t.responseText === \"\")\r\n\t\t\t\t\t\t\tif (!scheduler.callEvent(\"onAjaxError\", [t])) return;\r\n\r\n\t\t\t\t\t\tsetTimeout(function() {\r\n\t\t\t\t\t\t\tif (typeof(onLoad) == \"function\") {\r\n\t\t\t\t\t\t\t\tonLoad.apply(window, [{xmlDoc:t, filePath:url}]); // dhtmlx-compat, response.xmlDoc.responseXML/responseText\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tresolve(t);\r\n\t\t\t\t\t\t\tif (typeof(onLoad) == \"function\") {\r\n\t\t\t\t\t\t\t\tonLoad = null;\r\n\t\t\t\t\t\t\t\tt = null;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}, 0);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif (method == \"GET\" && !this.cache) {\r\n\t\t\t\turl += (url.indexOf(\"?\")>=0?\"&\":\"?\")+\"dhxr\"+new Date().getTime()+\"=1\";\r\n\t\t\t}\r\n\r\n\t\t\tt.open(method, url, async);\r\n\r\n\t\t\tif (headers){\r\n\t\t\t\tfor (var key in headers)\r\n\t\t\t\t\tt.setRequestHeader(key, headers[key]);\r\n\t\t\t} else if (method.toUpperCase() == \"POST\" || method == \"PUT\" || method == \"DELETE\") {\r\n\t\t\t\tt.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\r\n\t\t\t} else if (method == \"GET\") {\r\n\t\t\t\tpostData = null;\r\n\t\t\t}\r\n\r\n\t\t\tt.setRequestHeader(\"X-Requested-With\", \"XMLHttpRequest\");\r\n\r\n\t\t\tt.send(postData);\r\n\r\n\t\t\tif (!async) return {xmlDoc:t, filePath:url}; // dhtmlx-compat, response.xmlDoc.responseXML/responseText\r\n\t\t}.bind(this)));\r\n\t},\r\n\turlSeparator: function(str){\r\n\t\tif (str.indexOf(\"?\") != -1)\r\n\t\t\treturn \"&\";\r\n\t\telse\r\n\t\t\treturn \"?\";\r\n\t}\r\n};\r\n\r\nscheduler.$ajax = scheduler.ajax; // for old\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nvar generateStringToDate = function (format, utc) {\r\n\tvar splt = \"var temp=date.match(/[a-zA-Z]+|[0-9]+/g);\";\r\n\tvar mask = format.match(/%[a-zA-Z]/g);\r\n\tfor (var i = 0; i < mask.length; i++) {\r\n\t\tswitch (mask[i]) {\r\n\t\t\tcase \"%j\":\r\n\t\t\tcase \"%d\": splt += \"set[2]=temp[\" + i + \"]||1;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%n\":\r\n\t\t\tcase \"%m\": splt += \"set[1]=(temp[\" + i + \"]||1)-1;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%y\": splt += \"set[0]=temp[\" + i + \"]*1+(temp[\" + i + \"]>50?1900:2000);\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%g\":\r\n\t\t\tcase \"%G\":\r\n\t\t\tcase \"%h\":\r\n\t\t\tcase \"%H\":\r\n\t\t\t\tsplt += \"set[3]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%i\":\r\n\t\t\t\tsplt += \"set[4]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%Y\": splt += \"set[0]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%a\":\r\n\t\t\tcase \"%A\": splt += \"set[3]=set[3]%12+((temp[\" + i + \"]||'').toLowerCase()=='am'?0:12);\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%s\": splt += \"set[5]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%M\": splt += \"set[1]=this.locale.date.month_short_hash[temp[\" + i + \"]]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%F\": splt += \"set[1]=this.locale.date.month_full_hash[temp[\" + i + \"]]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\tvar code = \"set[0],set[1],set[2],set[3],set[4],set[5]\";\r\n\tif (utc) code = \" Date.UTC(\" + code + \")\";\r\n\treturn new Function(\"date\", \"var set=[0,0,1,0,0,0]; \" + splt + \" return new Date(\" + code + \");\");\r\n};\r\nvar csp_date_to_str = function (format, utc) {\r\n\treturn function(date) {\r\n\t\treturn format.replace(/%[a-zA-Z]/g, function (a) {\r\n\t\t\tswitch (a) {\r\n\t\t\t\tcase \"%d\": return utc ? scheduler.date.to_fixed(date.getUTCDate()) : scheduler.date.to_fixed(date.getDate());\r\n\t\t\t\tcase \"%m\": return utc ? scheduler.date.to_fixed((date.getUTCMonth() + 1)) : scheduler.date.to_fixed((date.getMonth() + 1));\r\n\t\t\t\tcase \"%j\": return utc ? date.getUTCDate() : date.getDate();\r\n\t\t\t\tcase \"%n\": return utc ? (date.getUTCMonth() + 1) : (date.getMonth() + 1);\r\n\t\t\t\tcase \"%y\": return utc ? scheduler.date.to_fixed(date.getUTCFullYear() % 100) : scheduler.date.to_fixed(date.getFullYear() % 100);\r\n\t\t\t\tcase \"%Y\": return utc ? date.getUTCFullYear() : date.getFullYear();\r\n\t\t\t\tcase \"%D\": return utc ? scheduler.locale.date.day_short[date.getUTCDay()] : scheduler.locale.date.day_short[date.getDay()];\r\n\t\t\t\tcase \"%l\": return utc ? scheduler.locale.date.day_full[date.getUTCDay()] : scheduler.locale.date.day_full[date.getDay()];\r\n\t\t\t\tcase \"%M\": return utc ? scheduler.locale.date.month_short[date.getUTCMonth()] : scheduler.locale.date.month_short[date.getMonth()];\r\n\t\t\t\tcase \"%F\": return utc ? scheduler.locale.date.month_full[date.getUTCMonth()] : scheduler.locale.date.month_full[date.getMonth()];\r\n\t\t\t\tcase \"%h\": return utc ? scheduler.date.to_fixed((date.getUTCHours() + 11) % 12 + 1) : scheduler.date.to_fixed((date.getHours() + 11) % 12 + 1);\r\n\t\t\t\tcase \"%g\": return utc ? ((date.getUTCHours() + 11) % 12 + 1) : ((date.getHours() + 11) % 12 + 1);\r\n\t\t\t\tcase \"%G\": return utc ? date.getUTCHours() : date.getHours();\r\n\t\t\t\tcase \"%H\": return utc ? scheduler.date.to_fixed(date.getUTCHours()) : scheduler.date.to_fixed(date.getHours());\r\n\t\t\t\tcase \"%i\": return utc ? scheduler.date.to_fixed(date.getUTCMinutes()) : scheduler.date.to_fixed(date.getMinutes());\r\n\t\t\t\tcase \"%a\": return utc ? (date.getUTCHours() > 11 ? \"pm\" : \"am\") : (date.getHours() > 11 ? \"pm\" : \"am\");\r\n\t\t\t\tcase \"%A\": return utc ? (date.getUTCHours() > 11 ? \"PM\" : \"AM\") : (date.getHours() > 11 ? \"PM\" : \"AM\");\r\n\t\t\t\tcase \"%s\": return utc ? scheduler.date.to_fixed(date.getUTCSeconds()) : scheduler.date.to_fixed(date.getSeconds());\r\n\t\t\t\tcase \"%W\": return utc ? scheduler.date.to_fixed(scheduler.date.getUTCISOWeek(date)) : scheduler.date.to_fixed(scheduler.date.getISOWeek(date));\r\n\t\t\t\tdefault: return a;\r\n\t\t\t}\r\n\t\t});\r\n\t};\r\n};\r\nvar csp_str_to_date = function (format, utc) {\r\n\treturn function (date){\r\n\t\tvar set = [0, 0, 1, 0, 0, 0];\r\n\t\tvar temp = date.match(/[a-zA-Z]+|[0-9]+/g);\r\n\t\tvar mask = format.match(/%[a-zA-Z]/g);\r\n\r\n\t\tfor (var i = 0; i < mask.length; i++) {\r\n\t\t\tswitch (mask[i]) {\r\n\t\t\t\tcase \"%j\":\r\n\t\t\t\tcase \"%d\":\r\n\t\t\t\t\tset[2] = temp[i] || 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%n\":\r\n\t\t\t\tcase \"%m\":\r\n\t\t\t\t\tset[1] = (temp[i] || 1) - 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%y\":\r\n\t\t\t\t\tset[0] = temp[i] * 1 + (temp[i] > 50 ? 1900 : 2000);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%g\":\r\n\t\t\t\tcase \"%G\":\r\n\t\t\t\tcase \"%h\":\r\n\t\t\t\tcase \"%H\":\r\n\t\t\t\t\tset[3] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%i\":\r\n\t\t\t\t\tset[4] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\tset[0] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%a\":\r\n\t\t\t\tcase \"%A\":\r\n\t\t\t\t\tset[3] = set[3] % 12 + ((temp[i] || '').toLowerCase() == 'am' ? 0 : 12);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%s\":\r\n\t\t\t\t\tset[5] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%M\":\r\n\t\t\t\t\tset[1] = scheduler.locale.date.month_short_hash[temp[i]] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%F\":\r\n\t\t\t\t\tset[1] = scheduler.locale.date.month_full_hash[temp[i]] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (utc) {\r\n\t\t\treturn new Date(Date.UTC(set[0], set[1], set[2], set[3], set[4], set[5]));\r\n\t\t}\r\n\r\n\t\treturn new Date(set[0], set[1], set[2], set[3], set[4], set[5]);\r\n\t};\r\n};\r\n\r\nvar canUseCsp = false;\r\n(function() {\r\n\ttry {\r\n\t\tnew Function(\"canUseCsp = false;\");\r\n\t} catch(e) {\r\n\t\tcanUseCsp = true;\r\n\t}\r\n})();\r\nfunction useCsp() {\r\n\tvar result = false;\r\n\tif (scheduler.config.csp === \"auto\") {\r\n\t\tresult = canUseCsp;\r\n\t} else {\r\n\t\tresult = scheduler.config.csp;\r\n\t}\r\n\treturn result;\r\n}\r\nscheduler.date = {\r\n\tinit:function(){\r\n\t\tvar s = scheduler.locale.date.month_short;\r\n\t\tvar t = scheduler.locale.date.month_short_hash = {};\r\n\t\tfor (var i = 0; i < s.length; i++)\r\n\t\t\tt[s[i]]=i;\r\n\r\n\t\tvar s = scheduler.locale.date.month_full;\r\n\t\tvar t = scheduler.locale.date.month_full_hash = {};\r\n\t\tfor (var i = 0; i < s.length; i++)\r\n\t\t\tt[s[i]]=i;\r\n\t},\r\n\t_bind_host_object : function(method){\r\n\t\tif(method.bind){\r\n\t\t\treturn method.bind(scheduler);\r\n\t\t}else{\r\n\t\t\treturn function(){ return method.apply(scheduler, arguments); };\r\n\t\t}\r\n\t},\r\n\tdate_part:function(date){\r\n\t\tvar old = new Date(date);\r\n\t\tdate.setHours(0);\r\n\t\tdate.setMinutes(0);\r\n\t\tdate.setSeconds(0);\r\n\t\tdate.setMilliseconds(0);\r\n\t\tif (date.getHours() && //shift to yesterday on dst\r\n\t\t\t(date.getDate() < old.getDate() || date.getMonth() < old.getMonth() || date.getFullYear() < old.getFullYear()) )\r\n\t\t\tdate.setTime(date.getTime() + 60 * 60 * 1000 * (24 - date.getHours()));\r\n\t\treturn date;\r\n\t},\r\n\ttime_part:function(date){\r\n\t\treturn (date.valueOf()/1000 - date.getTimezoneOffset()*60)%86400;\r\n\t},\r\n\tweek_start:function(date){\r\n\t\tvar shift=date.getDay();\r\n\t\tif (scheduler.config.start_on_monday){\r\n\t\t\tif (shift===0) shift=6;\r\n\t\t\telse shift--;\r\n\t\t}\r\n\t\treturn this.date_part(this.add(date,-1*shift,\"day\"));\r\n\t},\r\n\tmonth_start:function(date){\r\n\t\tdate.setDate(1);\r\n\t\treturn this.date_part(date);\r\n\t},\r\n\tyear_start:function(date){\r\n\t\tdate.setMonth(0);\r\n\t\treturn this.month_start(date);\r\n\t},\r\n\tday_start:function(date){\r\n\t\treturn this.date_part(date);\r\n\t},\r\n\t_add_days:function(date, inc){\r\n\t\tvar ndate = new Date(date.valueOf());\r\n\r\n\t\tndate.setDate(ndate.getDate() + inc);\r\n\r\n\t\t// Workaround for Safari/iOS timezone bug, ref:OKZ-149693\r\n\t\tif(inc == Math.round(inc) && inc > 0){\r\n\t\t\tvar datesDiff = +ndate - +date,\r\n\t\t\t\trest = datesDiff % (24*60*60*1000);\r\n\t\t\tif(rest && date.getTimezoneOffset() == ndate.getTimezoneOffset()){\r\n\t\t\t\tvar hours = rest / (60* 60 * 1000);\r\n\t\t\t\tndate.setTime(ndate.getTime() + (24 - hours) * 60 * 60 * 1000);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (inc >= 0 && (!date.getHours() && ndate.getHours()) &&//shift to yesterday on dst\r\n\t\t\t(ndate.getDate() < date.getDate() || ndate.getMonth() < date.getMonth() || ndate.getFullYear() < date.getFullYear()) )\r\n\t\t\tndate.setTime(ndate.getTime() + 60 * 60 * 1000 * (24 - ndate.getHours()));\r\n\t\treturn ndate;\r\n\t},\r\n\tadd:function(date,inc,mode){\r\n\t\tvar ndate=new Date(date.valueOf());\r\n\t\tswitch(mode){\r\n\t\t\tcase \"day\":\r\n\t\t\t\tndate = scheduler.date._add_days(ndate, inc);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"week\":\r\n\t\t\t\tndate = scheduler.date._add_days(ndate, inc * 7);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"month\": ndate.setMonth(ndate.getMonth()+inc); break;\r\n\t\t\tcase \"year\": ndate.setYear(ndate.getFullYear()+inc); break;\r\n\t\t\tcase \"hour\":\r\n\t\t\t\t/*\r\n\t\t\t\t setHour(getHour() + inc) and setMinutes gives weird result when is applied on a Daylight Saving time switch\r\n\t\t\t\t setTime seems working as expected\r\n\t\t\t\t*/\r\n\t\t\t\tndate.setTime(ndate.getTime() + inc * 60 * 60 * 1000);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"minute\":\r\n\t\t\t\tndate.setTime(ndate.getTime() + inc * 60 * 1000);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\treturn scheduler.date[\"add_\"+mode](date,inc,mode);\r\n\t\t}\r\n\t\treturn ndate;\r\n\t},\r\n\tto_fixed:function(num){\r\n\t\tif (num<10)\treturn \"0\"+num;\r\n\t\treturn num;\r\n\t},\r\n\tcopy:function(date){\r\n\t\treturn new Date(date.valueOf());\r\n\t},\r\n\tdate_to_str:function(format,utc){\r\n\t\tif (useCsp()) {\r\n\t\t\treturn csp_date_to_str(format,utc);\r\n\t\t}\r\n\r\n\t\tformat=format.replace(/%[a-zA-Z]/g,function(a){\r\n\t\t\tswitch(a){\r\n\t\t\t\tcase \"%d\": return \"\\\"+this.date.to_fixed(date.getDate())+\\\"\";\r\n\t\t\t\tcase \"%m\": return \"\\\"+this.date.to_fixed((date.getMonth()+1))+\\\"\";\r\n\t\t\t\tcase \"%j\": return \"\\\"+date.getDate()+\\\"\";\r\n\t\t\t\tcase \"%n\": return \"\\\"+(date.getMonth()+1)+\\\"\";\r\n\t\t\t\tcase \"%y\": return \"\\\"+this.date.to_fixed(date.getFullYear()%100)+\\\"\";\r\n\t\t\t\tcase \"%Y\": return \"\\\"+date.getFullYear()+\\\"\";\r\n\t\t\t\tcase \"%D\": return \"\\\"+this.locale.date.day_short[date.getDay()]+\\\"\";\r\n\t\t\t\tcase \"%l\": return \"\\\"+this.locale.date.day_full[date.getDay()]+\\\"\";\r\n\t\t\t\tcase \"%M\": return \"\\\"+this.locale.date.month_short[date.getMonth()]+\\\"\";\r\n\t\t\t\tcase \"%F\": return \"\\\"+this.locale.date.month_full[date.getMonth()]+\\\"\";\r\n\t\t\t\tcase \"%h\": return \"\\\"+this.date.to_fixed((date.getHours()+11)%12+1)+\\\"\";\r\n\t\t\t\tcase \"%g\": return \"\\\"+((date.getHours()+11)%12+1)+\\\"\";\r\n\t\t\t\tcase \"%G\": return \"\\\"+date.getHours()+\\\"\";\r\n\t\t\t\tcase \"%H\": return \"\\\"+this.date.to_fixed(date.getHours())+\\\"\";\r\n\t\t\t\tcase \"%i\": return \"\\\"+this.date.to_fixed(date.getMinutes())+\\\"\";\r\n\t\t\t\tcase \"%a\": return \"\\\"+(date.getHours()>11?\\\"pm\\\":\\\"am\\\")+\\\"\";\r\n\t\t\t\tcase \"%A\": return \"\\\"+(date.getHours()>11?\\\"PM\\\":\\\"AM\\\")+\\\"\";\r\n\t\t\t\tcase \"%s\": return \"\\\"+this.date.to_fixed(date.getSeconds())+\\\"\";\r\n\t\t\t\tcase \"%W\": return \"\\\"+this.date.to_fixed(this.date.getISOWeek(date))+\\\"\";\r\n\t\t\t\tdefault: return a;\r\n\t\t\t}\r\n\t\t});\r\n\t\tif (utc) format=format.replace(/date\\.get/g,\"date.getUTC\");\r\n\t\tvar func = new Function(\"date\",\"return \\\"\"+format+\"\\\";\");\r\n\r\n\t\treturn scheduler.date._bind_host_object(func);\r\n\t},\r\n\tstr_to_date:function(format, utc, exactFormat){\r\n\t\tvar stringToDateMethod = useCsp() ? csp_str_to_date : generateStringToDate;\r\n\t\tvar parseExactFormat = stringToDateMethod(format, utc);\r\n\t\t//return scheduler.date._bind_host_object(func);\r\n\t\t// eslint-disable-next-line\r\n\t\tvar yyyyMMddhhIIss = /^[0-9]{4}(\\-|\\/)[0-9]{2}(\\-|\\/)[0-9]{2} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/;\r\n\r\n\t\t// MM/dd/yyyy - default old format for xml-date\r\n\t\t// eslint-disable-next-line\r\n\t\tvar MMddyyyyhhIIss = /^[0-9]{2}\\/[0-9]{2}\\/[0-9]{4} ?(([0-9]{1,2}:[0-9]{2})(:[0-9]{1,2})?)?$/;\r\n\t\t// dd-MM-yyyy - default old format for api-date\r\n\t\t// eslint-disable-next-line\r\n\t\tvar ddMMyyyyhhIIss = /^[0-9]{2}\\-[0-9]{2}\\-[0-9]{4} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/;\r\n\t\t// eslint-disable-next-line\r\n\t\tvar ISO8601 = /^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$/;\r\n\r\n\t\tvar isYMDDate = function (datestr) {\r\n\t\t\treturn yyyyMMddhhIIss.test(String(datestr));\r\n\t\t};\r\n\r\n\t\tvar isMDYDate = function (datestr) {\r\n\t\t\treturn MMddyyyyhhIIss.test(String(datestr));\r\n\t\t};\r\n\t\tvar isDMYDate = function (datestr) {\r\n\t\t\treturn ddMMyyyyhhIIss.test(String(datestr));\r\n\t\t};\r\n\t\tvar isISO8601 = function (datestr) {\r\n\t\t\treturn ISO8601.test(datestr);\r\n\t\t};\r\n\r\n\t\tvar parseYMD = stringToDateMethod(\"%Y-%m-%d %H:%i:%s\", utc);\r\n\t\tvar parseMDY = stringToDateMethod(\"%m/%d/%Y %H:%i:%s\", utc);\r\n\t\tvar parseDMY = stringToDateMethod(\"%d-%m-%Y %H:%i:%s\", utc);\r\n\r\n\t\treturn function (dateString) {\r\n\r\n\t\t\tif (!exactFormat && !scheduler.config.parse_exact_format) {\r\n\t\t\t\tif (dateString && dateString.getISOWeek) {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t} else if (typeof dateString === \"number\") {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t} else if (isYMDDate(dateString)) {\r\n\t\t\t\t\treturn parseYMD(dateString);\r\n\t\t\t\t} else if (isMDYDate(dateString)) {\r\n\t\t\t\t\treturn parseMDY(dateString);\r\n\t\t\t\t} else if (isDMYDate(dateString)) {\r\n\t\t\t\t\treturn parseDMY(dateString);\r\n\t\t\t\t} else if (isISO8601(dateString)) {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn parseExactFormat.call(scheduler, dateString);\r\n\t\t};\r\n\t},\r\n\tgetISOWeek: function(ndate) {\r\n\t\tif(!ndate) return false;\r\n\t\tndate = this.date_part(new Date(ndate));\r\n\t\tvar nday = ndate.getDay();\r\n\t\tif (nday === 0) {\r\n\t\t\tnday = 7;\r\n\t\t}\r\n\t\tvar first_thursday = new Date(ndate.valueOf());\r\n\t\tfirst_thursday.setDate(ndate.getDate() + (4 - nday));\r\n\t\tvar year_number = first_thursday.getFullYear(); // year of the first Thursday\r\n\t\tvar ordinal_date = Math.round( (first_thursday.getTime() - new Date(year_number, 0, 1).getTime()) / 86400000); //ordinal date of the first Thursday - 1 (so not really ordinal date)\r\n\t\tvar week_number = 1 + Math.floor( ordinal_date / 7);\r\n\t\treturn week_number;\r\n\t},\r\n\tgetUTCISOWeek: function(ndate){\r\n\t\treturn this.getISOWeek(this.convert_to_utc(ndate));\r\n\t},\r\n\tconvert_to_utc: function(date) {\r\n\t\treturn new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds());\r\n\t}\r\n};\r\n\r\n}\r\n\r\n","export default function extend(scheduler) {\r\n\r\n/*\r\n%e\tDay of the month without leading zeros (01..31)\r\n%d\tDay of the month, 2 digits with leading zeros (01..31)\r\n%j\tDay of the year, 3 digits with leading zeros (001..366)\r\n%a\tA textual representation of a day, two letters\r\n%W\tA full textual representation of the day of the week\r\n\r\n%c\tNumeric representation of a month, without leading zeros (0..12)\r\n%m\tNumeric representation of a month, with leading zeros (00..12)\r\n%b\tA short textual representation of a month, three letters (Jan..Dec)\r\n%M\tA full textual representation of a month, such as January or March (January..December)\r\n\r\n%y\tA two digit representation of a year (93..03)\r\n%Y\tA full numeric representation of a year, 4 digits (1993..03)\r\n*/\r\n\r\nscheduler.config={\r\n\tdefault_date: \"%j %M %Y\",\r\n\tmonth_date: \"%F %Y\",\r\n\tload_date: \"%Y-%m-%d\",\r\n\tweek_date: \"%l\",\r\n\tday_date: \"%D %j\",\r\n\thour_date: \"%H:%i\",\r\n\tmonth_day: \"%d\",\r\n\t//xml_date: \"%m/%d/%Y %H:%i\",\r\n\tdate_format: \"%Y-%m-%d %H:%i\",\r\n\tapi_date: \"%d-%m-%Y %H:%i\",\r\n\tparse_exact_format: false,\r\n\tpreserve_length:true,\r\n\ttime_step: 5,\r\n\tdisplayed_event_color: \"#ff4a4a\",\r\n\tdisplayed_event_text_color: \"#ffef80\",\r\n\twide_form: 0,\r\n\tday_column_padding: 8,\r\n\tuse_select_menu_space: true,\r\n\tfix_tab_position: true,\r\n\tstart_on_monday: true,\r\n\tfirst_hour: 0,\r\n\tlast_hour: 24,\r\n\treadonly: false,\r\n\tdrag_resize: true,\r\n\tdrag_move: true,\r\n\tdrag_create: true,\r\n\tdrag_event_body: true,\r\n\tdblclick_create: true,\r\n\tdetails_on_dblclick: true,\r\n\tedit_on_create: true,\r\n\tdetails_on_create: true,\r\n\theader: null,\r\n\thour_size_px: 44,\r\n\tresize_month_events:false,\r\n\tresize_month_timed:false,\r\n\t\r\n\tresponsive_lightbox: false,\r\n\tseparate_short_events: true,\r\n\trtl:false,\r\n\r\n\tcascade_event_display: false,\r\n\tcascade_event_count: 4,\r\n\tcascade_event_margin: 30,\r\n\r\n\tmulti_day:true,\r\n\tmulti_day_height_limit: 200,\r\n\r\n\tdrag_lightbox: true,\r\n\tpreserve_scroll: true,\r\n\tselect: true,\r\n\r\n\tserver_utc: false,\r\n\ttouch:true,\r\n\ttouch_tip:true,\r\n\ttouch_drag:500,\r\n\ttouch_swipe_dates: false,\r\n\tquick_info_detached:true,\r\n\r\n\tpositive_closing: false,\r\n\t//header_datepicker: true,\r\n\tdrag_highlight: true,\r\n\tlimit_drag_out: false,\r\n\ticons_edit: [\"icon_save\", \"icon_cancel\"],\r\n\ticons_select: [\"icon_details\", \"icon_edit\", \"icon_delete\"],\r\n\tbuttons_left: [\"dhx_save_btn\", \"dhx_cancel_btn\"],\r\n\tbuttons_right: [\"dhx_delete_btn\"],\r\n\tlightbox: {\r\n\t\tsections: [\r\n\t\t\t{name: \"description\", map_to: \"text\", type: \"textarea\", focus: true},\r\n\t\t\t{name: \"time\", height: 72, type: \"time\", map_to: \"auto\"}\r\n\t\t]\r\n\t},\r\n\thighlight_displayed_event: true,\r\n\tleft_border: false,\r\n\r\n\tajax_error: \"alert\",//\"ignore\"|\"console\"\r\n\tdelay_render: 0,\r\n\ttimeline_swap_resize: true,\r\n\twai_aria_attributes: true,\r\n\twai_aria_application_role: true,\r\n\r\n\tcsp: \"auto\",\r\n\tevent_attribute: \"data-event-id\",\r\n\tshow_errors: true\r\n};\r\n\r\nscheduler.config.buttons_left.$initial = scheduler.config.buttons_left.join();\r\nscheduler.config.buttons_right.$initial = scheduler.config.buttons_right.join();\r\n\r\nscheduler._helpers = {\r\n\tparseDate: function parseDate(date) {\r\n\t\tvar parse = scheduler.templates.xml_date || scheduler.templates.parse_date;\r\n\t\treturn parse(date);\r\n\t},\r\n\tformatDate: function formatDate(date) {\r\n\t\tvar format = scheduler.templates.xml_format || scheduler.templates.format_date;\r\n\t\treturn format(date);\r\n\t}\r\n};\r\n\r\nscheduler.templates={};\r\nscheduler.init_templates=function(){\r\n\r\n\r\n\r\n\tvar d=scheduler.date.date_to_str;\r\n\tvar c=scheduler.config;\r\n\tvar f = function(a,b){\r\n\t\tfor (var c in b)\r\n\t\t\tif (!a[c]) a[c]=b[c];\r\n\t};\r\n\tf(scheduler.templates,{\r\n\t\tday_date:d(c.default_date),\r\n\t\tmonth_date:d(c.month_date),\r\n\t\tweek_date:function(d1,d2){\r\n\t\t\tif(c.rtl) {\r\n\t\t\t\treturn scheduler.templates.day_date(scheduler.date.add(d2,-1,\"day\"))+\" – \"+scheduler.templates.day_date(d1);\r\n\t\t\t} \r\n\t\t\treturn scheduler.templates.day_date(d1)+\" – \"+scheduler.templates.day_date(scheduler.date.add(d2,-1,\"day\"));\r\n\t\t},\r\n\t\tday_scale_date:d(c.default_date),\r\n\t\ttime_slot_text: function(date){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\ttime_slot_class: function(date){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\r\n\t\tmonth_scale_date:d(c.week_date),\r\n\t\tweek_scale_date:d(c.day_date),\r\n\t\thour_scale:d(c.hour_date),\r\n\t\ttime_picker:d(c.hour_date),\r\n\t\tevent_date:d(c.hour_date),\r\n\t\tmonth_day:d(c.month_day),\r\n\r\n\t\tload_format: d(c.load_date),\r\n\t//\txml_date:scheduler.date.str_to_date(c.xml_date,c.server_utc),\r\n\t//\txml_format:d(c.date_format,c.server_utc),\r\n\t\tformat_date: d(c.date_format, c.server_utc),\r\n\t\tparse_date:scheduler.date.str_to_date(c.date_format,c.server_utc),\r\n\t\tapi_date:scheduler.date.str_to_date(c.api_date, false, false),\r\n\t\tevent_header:function(start,end,ev){\r\n\r\n\t\t\tif(ev._mode === \"small\" || ev._mode === \"smallest\"){\r\n\t\t\t\treturn scheduler.templates.event_date(start);\r\n\t\t\t}else{\r\n\t\t\t\treturn scheduler.templates.event_date(start)+\" - \"+scheduler.templates.event_date(end);\r\n\t\t\t}\r\n\t\t},\r\n\t\tevent_text:function(start,end,ev){\r\n\t\t\treturn ev.text;\r\n\t\t},\r\n\t\tevent_class:function(start,end,ev){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tmonth_date_class:function(d){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tweek_date_class:function(d){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tevent_bar_date:function(start,end,ev) {\r\n\t\t\treturn scheduler.templates.event_date(start);\r\n\t\t},\r\n\t\tevent_bar_text:function(start,end,ev){\r\n\t\t\treturn ev.text;\r\n\t\t},\r\n\t\tmonth_events_link : function(date, count){\r\n\t\t\treturn \"View more(\"+count+\" events)\";\r\n\t\t},\r\n\t\tdrag_marker_class : function(start, end, event){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tdrag_marker_content : function(start, end, event){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\t/* Could be redifined */\r\n\t\ttooltip_date_format: scheduler.date.date_to_str(\"%Y-%m-%d %H:%i\"),\r\n\t\ttooltip_text: function(start, end, event) {\r\n\t\t\treturn \"Event: \" + event.text + \"
Start date: \" + scheduler.templates.tooltip_date_format(start) + \"
End date: \" + scheduler.templates.tooltip_date_format(end);\r\n\t\t},\r\n\r\n\t\tcalendar_month: d(\"%F %Y\"),\r\n\t\tcalendar_scale_date: d(\"%D\"),\r\n\t\tcalendar_date: d(\"%d\"),\r\n\t\tcalendar_time: d(\"%d-%m-%Y\")\r\n\r\n\t});\r\n\tthis.callEvent(\"onTemplatesReady\",[]);\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler._events = {};\r\nscheduler.clearAll = function() {\r\n\tthis._events = {};\r\n\tthis._loaded = {};\r\n\r\n\tthis._edit_id = null;\r\n\tthis._select_id = null;\r\n\tthis._drag_id = null;\r\n\tthis._drag_mode = null;\r\n\tthis._drag_pos = null;\r\n\tthis._new_event = null;\r\n\r\n\tthis.clear_view();\r\n\tthis.callEvent(\"onClearAll\", []);\r\n};\r\nscheduler.addEvent = function(start_date, end_date, text, id, extra_data) {\r\n\tif (!arguments.length)\r\n\t\treturn this.addEventNow();\r\n\tvar ev = start_date;\r\n\tif (arguments.length != 1) {\r\n\t\tev = extra_data || {};\r\n\t\tev.start_date = start_date;\r\n\t\tev.end_date = end_date;\r\n\t\tev.text = text;\r\n\t\tev.id = id;\r\n\t}\r\n\tev.id = ev.id || scheduler.uid();\r\n\tev.text = ev.text || \"\";\r\n\r\n\tif (typeof ev.start_date == \"string\") ev.start_date = this.templates.api_date(ev.start_date);\r\n\tif (typeof ev.end_date == \"string\") ev.end_date = this.templates.api_date(ev.end_date);\r\n\tvar d = (this.config.event_duration || this.config.time_step) * 60000;\r\n\tif (ev.start_date.valueOf() == ev.end_date.valueOf())\r\n\t\tev.end_date.setTime(ev.end_date.valueOf() + d);\r\n\r\n\tev.start_date.setMilliseconds(0);\r\n\tev.end_date.setMilliseconds(0);\r\n\r\n\tev._timed = this.isOneDayEvent(ev);\r\n\r\n\tvar is_new = !this._events[ev.id];\r\n\tthis._events[ev.id] = ev;\r\n\tthis.event_updated(ev);\r\n\tif (!this._loading)\r\n\t\tthis.callEvent(is_new ? \"onEventAdded\" : \"onEventChanged\", [ev.id, ev]);\r\n\treturn ev.id;\r\n};\r\nscheduler.deleteEvent = function(id, silent) {\r\n\tvar ev = this._events[id];\r\n\tif (!silent && (!this.callEvent(\"onBeforeEventDelete\", [id, ev]) || !this.callEvent(\"onConfirmedBeforeEventDelete\", [id, ev])))\r\n\t\treturn;\r\n\tif (ev) {\r\n\t\tif(scheduler.getState().select_id == id){\r\n\t\t\tscheduler.unselect();\r\n\t\t}\r\n\t\tdelete this._events[id];\r\n\t\tthis.event_updated(ev);\r\n\r\n\t\tif(this._drag_id == ev.id){\r\n\t\t\tthis._drag_id = null;\r\n\t\t\tthis._drag_mode=null;\r\n\t\t\tthis._drag_pos=null;\r\n\t\t}\r\n\t}\r\n\r\n\tthis.callEvent(\"onEventDeleted\", [id, ev]);\r\n};\r\nscheduler.getEvent = function(id) {\r\n\treturn this._events[id];\r\n};\r\nscheduler.setEvent = function(id, hash) {\r\n\tif(!hash.id)\r\n\t\thash.id = id;\r\n\r\n\tthis._events[id] = hash;\r\n};\r\nscheduler.for_rendered = function(id, method) {\r\n\tfor (var i = this._rendered.length - 1; i >= 0; i--)\r\n\t\tif (this._rendered[i].getAttribute(this.config.event_attribute) == id)\r\n\t\t\tmethod(this._rendered[i], i);\r\n};\r\nscheduler.changeEventId = function(id, new_id) {\r\n\tif (id == new_id) return;\r\n\tvar ev = this._events[id];\r\n\tif (ev) {\r\n\t\tev.id = new_id;\r\n\t\tthis._events[new_id] = ev;\r\n\t\tdelete this._events[id];\r\n\t}\r\n\tthis.for_rendered(id, function(r) {\r\n\t\tr.setAttribute(\"event_id\", new_id); // for backward compatibility\r\n\t\tr.setAttribute(scheduler.config.event_attribute, new_id);\r\n\t});\r\n\tif (this._select_id == id) this._select_id = new_id;\r\n\tif (this._edit_id == id) this._edit_id = new_id;\r\n\t//if (this._drag_id==id) this._drag_id=new_id;\r\n\tthis.callEvent(\"onEventIdChange\", [id, new_id]);\r\n};\r\n\r\n(function() {\r\n\tvar attrs = [\"text\", \"Text\", \"start_date\", \"StartDate\", \"end_date\", \"EndDate\"];\r\n\tvar create_getter = function(name) {\r\n\t\treturn function(id) { return (scheduler.getEvent(id))[name]; };\r\n\t};\r\n\tvar create_setter = function(name) {\r\n\t\treturn function(id, value) {\r\n\t\t\tvar ev = scheduler.getEvent(id);\r\n\t\t\tev[name] = value;\r\n\t\t\tev._changed = true;\r\n\t\t\tev._timed = this.isOneDayEvent(ev);\r\n\t\t\tscheduler.event_updated(ev, true);\r\n\t\t};\r\n\t};\r\n\tfor (var i = 0; i < attrs.length; i += 2) {\r\n\t\tscheduler[\"getEvent\" + attrs[i + 1]] = create_getter(attrs[i]);\r\n\t\tscheduler[\"setEvent\" + attrs[i + 1]] = create_setter(attrs[i]);\r\n\t}\r\n})();\r\n\r\nscheduler.event_updated = function(ev, force) {\r\n\tif (this.is_visible_events(ev))\r\n\t\tthis.render_view_data();\r\n\telse\r\n\t\tthis.clear_event(ev.id);\r\n};\r\nscheduler.is_visible_events = function(ev) {\r\n\tif(!this._min_date || !this._max_date){\r\n\t\treturn false;\r\n\t}\r\n\r\n\t//if in displayed dates\r\n\tvar in_visible_range = (ev.start_date.valueOf() < this._max_date.valueOf() && this._min_date.valueOf() < ev.end_date.valueOf());\r\n\r\n\tif(in_visible_range){\r\n\r\n\t\t//end dates are not between last/first hours\r\n\t\tvar evFirstHour = ev.start_date.getHours(),\r\n\t\t\tevLastHour = ev.end_date.getHours() + (ev.end_date.getMinutes()/60),\r\n\t\t\tlastHour = this.config.last_hour,\r\n\t\t\tfirstHour = this.config.first_hour;\r\n\r\n\t\tvar end_dates_visible = (this._table_view || !((evLastHour > lastHour || evLastHour <= firstHour) && (evFirstHour >= lastHour || evFirstHour < firstHour)));\r\n\r\n\t\tif(end_dates_visible){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\r\n\t\t\t//event is bigger than area hidden between last/first hours\r\n\t\t\tvar event_duration = (ev.end_date.valueOf() - ev.start_date.valueOf()) / (1000*60*60),//hours\r\n\t\t\t\thidden_duration = 24 - (this.config.last_hour - this.config.first_hour);\r\n\r\n\t\t\treturn !!((event_duration > hidden_duration) || (evFirstHour < lastHour && evLastHour > firstHour));\r\n\r\n\t\t}\r\n\t}else{\r\n\t\treturn false;\r\n\t}\r\n};\r\nscheduler.isOneDayEvent = function(ev) {\r\n\t// decrease by one ms so events that ends on midnight on the next day were still considered one day events\r\n\t// e.g. (09-02-2018 19:00 - 10-02-2018 00:00)\r\n\t// events >= 24h long are considered multiday\r\n\tvar checkEndDate = new Date(ev.end_date.valueOf() - 1);\r\n\treturn (\r\n\t\tev.start_date.getFullYear() === checkEndDate.getFullYear() &&\r\n\t\tev.start_date.getMonth() === checkEndDate.getMonth() &&\r\n\t\tev.start_date.getDate() === checkEndDate.getDate()\r\n\t) && ((ev.end_date.valueOf() - ev.start_date.valueOf()) < (1000 * 60 * 60 * 24));\r\n};\r\n\r\nscheduler.get_visible_events = function(only_timed) {\r\n\t//not the best strategy for sure\r\n\tvar stack = [];\r\n\r\n\tfor (var id in this._events)\r\n\t\tif (this.is_visible_events(this._events[id]))\r\n\t\t\tif (!only_timed || this._events[id]._timed)\r\n\t\t\t\tif (this.filter_event(id, this._events[id]))\r\n\t\t\t\t\tstack.push(this._events[id]);\r\n\r\n\treturn stack;\r\n};\r\nscheduler.filter_event = function(id, ev) {\r\n\tvar filter = this[\"filter_\" + this._mode];\r\n\treturn (filter) ? filter(id, ev) : true;\r\n};\r\nscheduler._is_main_area_event = function(ev){\r\n\treturn !!ev._timed;\r\n};\r\nscheduler.render_view_data = function(evs, hold) {\r\n\tvar full = false;\r\n\tif (!evs) {\r\n\t\tfull = true;\r\n\t\tif (this._not_render) {\r\n\t\t\tthis._render_wait = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._render_wait = false;\r\n\r\n\t\tthis.clear_view();\r\n\t\tevs = this.get_visible_events(!(this._table_view || this.config.multi_day));\r\n\t}\r\n\tfor(var i= 0, len = evs.length; i < len; i++){\r\n\t\tthis._recalculate_timed(evs[i]);\r\n\t}\r\n\r\n\tif (this.config.multi_day && !this._table_view) {\r\n\r\n\t\tvar tvs = [];\r\n\t\tvar tvd = [];\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tif (this._is_main_area_event(evs[i]))\r\n\t\t\t\ttvs.push(evs[i]);\r\n\t\t\telse\r\n\t\t\t\ttvd.push(evs[i]);\r\n\t\t}\r\n\r\n\t\tif(!this._els['dhx_multi_day']){\r\n\t\t\tvar message = scheduler._commonErrorMessages.unknownView(this._mode);\r\n\t\t\tthrow new Error(message);\r\n\t\t}\r\n\r\n\t\t// multiday events\r\n\t\tthis._rendered_location = this._els['dhx_multi_day'][0];\r\n\t\tthis._table_view = true;\r\n\t\tthis.render_data(tvd, hold);\r\n\t\tthis._table_view = false;\r\n\r\n\t\t// normal events\r\n\t\tthis._rendered_location = this._els['dhx_cal_data'][0];\r\n\t\tthis._table_view = false;\r\n\t\tthis.render_data(tvs, hold);\r\n\r\n\t} else {\r\n\t\tvar buffer = document.createDocumentFragment();\r\n\t\tvar renderedLocation = this._els['dhx_cal_data'][0];\r\n\t\tthis._rendered_location = buffer;\r\n\t\tthis.render_data(evs, hold);\r\n\t\trenderedLocation.appendChild(buffer);\r\n\t\tthis._rendered_location = renderedLocation;\r\n\r\n\t}\r\n\r\n\tif(full){\r\n\t\tthis.callEvent(\"onDataRender\", []);\r\n\t}\r\n};\r\n\r\n\r\nscheduler._view_month_day = function(e){\r\n\tvar date = scheduler.getActionData(e).date;\r\n\tif(!scheduler.callEvent(\"onViewMoreClick\", [date]))\r\n\t\treturn;\r\n\tscheduler.setCurrentView(date, \"day\");\r\n};\r\n\r\nscheduler._render_month_link = function(ev){\r\n\tvar parent = this._rendered_location;\r\n\tvar toRender = this._lame_clone(ev);\r\n\r\n\t//render links in each cell of multiday events\r\n\tfor(var d = ev._sday; d < ev._eday; d++){\r\n\r\n\t\ttoRender._sday = d;\r\n\t\ttoRender._eday = d+1;\r\n\r\n\t\tvar date = scheduler.date;\r\n\t\tvar curr = scheduler._min_date;\r\n\t\tcurr = date.add(curr, toRender._sweek, \"week\");\r\n\t\tcurr = date.add(curr, toRender._sday, \"day\");\r\n\t\tvar count = scheduler.getEvents(curr, date.add(curr, 1, \"day\")).length;\r\n\r\n\t\tvar pos = this._get_event_bar_pos(toRender);\r\n\t\tvar widt = (pos.x2 - pos.x);\r\n\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tscheduler.event(el, \"click\", function(e){scheduler._view_month_day(e);});\r\n\t\tel.className = \"dhx_month_link\";\r\n\t\tel.style.top = pos.y + \"px\";\r\n\t\tel.style.left = pos.x + \"px\";\r\n\t\tel.style.width = widt + \"px\";\r\n\t\tel.innerHTML = scheduler.templates.month_events_link(curr, count);\r\n\t\tthis._rendered.push(el);\r\n\r\n\t\tparent.appendChild(el);\r\n\t}\r\n};\r\n\r\nscheduler._recalculate_timed = function(id){\r\n\tif(!id) return;\r\n\tvar ev;\r\n\tif(typeof(id) != \"object\")\r\n\t\tev = this._events[id];\r\n\telse\r\n\t\tev = id;\r\n\tif(!ev) return;\r\n\tev._timed = scheduler.isOneDayEvent(ev);\r\n};\r\nscheduler.attachEvent(\"onEventChanged\", scheduler._recalculate_timed);\r\nscheduler.attachEvent(\"onEventAdded\", scheduler._recalculate_timed);\r\n\r\nscheduler.render_data = function(evs, hold) {\r\n\tevs = this._pre_render_events(evs, hold);\r\n\tvar containers = {};\r\n\tfor (var i = 0; i < evs.length; i++)\r\n\t\tif (this._table_view){\r\n\t\t\tif(scheduler._mode != 'month'){\r\n\t\t\t\tthis.render_event_bar(evs[i]);//may be multiday section on other views\r\n\t\t\t}else{\r\n\r\n\t\t\t\tvar max_evs = scheduler.config.max_month_events;\r\n\t\t\t\tif(max_evs !== max_evs*1 || evs[i]._sorder < max_evs){\r\n\t\t\t\t\t//of max number events per month cell is set and event can be rendered\r\n\t\t\t\t\tthis.render_event_bar(evs[i]);\r\n\t\t\t\t}else if(max_evs !== undefined && evs[i]._sorder == max_evs){\r\n\t\t\t\t\t//render 'view more' links\r\n\t\t\t\t\tscheduler._render_month_link(evs[i]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\t//do not render events with ordinal number > maximum events per cell\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t}else{\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tvar parent = scheduler.locate_holder(ev._sday);\r\n\t\t\tif (!parent) continue; //attempt to render non-visible event\r\n\r\n\t\t\tif(!containers[ev._sday]){\r\n\t\t\t\tcontainers[ev._sday] = {\r\n\t\t\t\t\treal: parent,\r\n\t\t\t\t\tbuffer: document.createDocumentFragment(),\r\n\t\t\t\t\twidth: parent.clientWidth\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\tvar container = containers[ev._sday];\r\n\t\t\tthis.render_event(ev, container.buffer, container.width);\r\n\t\t}\r\n\r\n\t\tfor(var i in containers){\r\n\t\t\tvar container = containers[i];\r\n\t\t\tif(container.real && container.buffer){\r\n\t\t\t\tcontainer.real.appendChild(container.buffer);\r\n\t\t\t}\r\n\t\t}\r\n};\r\n\r\nscheduler._get_first_visible_cell = function(cells) {\r\n\tfor (var i = 0; i < cells.length; i++) {\r\n\t\tif ((cells[i].className || \"\").indexOf(\"dhx_scale_ignore\") == -1) {\r\n\t\t\treturn cells[i];\r\n\t\t}\r\n\t}\r\n\t// if no visible cell found, return cells[0] to be more tolerant, since it's the original logic\r\n\treturn cells[0];\r\n};\r\n\r\nscheduler._pre_render_events = function(evs, hold) {\r\n\tvar hb = this.xy.bar_height;\r\n\tvar h_old = this._colsS.heights;\r\n\tvar h = this._colsS.heights = [0, 0, 0, 0, 0, 0, 0];\r\n\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\r\n\tif (!this._table_view) {\r\n\t\tevs = this._pre_render_events_line(evs, hold); //ignore long events for now\r\n\t}\r\n\telse {\r\n\t\tevs = this._pre_render_events_table(evs, hold);\r\n\t}\r\n\tif (this._table_view) {\r\n\t\tif (hold)\r\n\t\t\tthis._colsS.heights = h_old;\r\n\t\telse {\r\n\t\t\tvar monthRows = data.querySelectorAll(\".dhx_cal_month_row\");\r\n\t\t\tif (monthRows.length) {\r\n\t\t\t\tfor (var i = 0; i < monthRows.length; i++) {\r\n\t\t\t\t\th[i]++;\r\n\t\t\t\t\tvar cells = monthRows[i].querySelectorAll(\".dhx_cal_month_cell\");\r\n\t\t\t\t\tvar cellHeight = this._colsS.height - this.xy.month_head_height;\r\n\t\t\t\t\tif ((h[i]) * hb > cellHeight) { // 22 - height of cell's header\r\n\t\t\t\t\t\t//we have overflow, update heights\r\n\r\n\t\t\t\t\t\tvar cHeight = cellHeight;\r\n\t\t\t\t\t\tif(this.config.max_month_events*1 !== this.config.max_month_events || h[i] <= this.config.max_month_events){\r\n\t\t\t\t\t\t\tcHeight = h[i] * hb;\r\n\t\t\t\t\t\t}else if( (this.config.max_month_events + 1) * hb > cellHeight){\r\n\t\t\t\t\t\t\tcHeight = (this.config.max_month_events + 1) * hb;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tmonthRows[i].style.height = (cHeight + this.xy.month_head_height) + \"px\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\th[i] = (h[i - 1] || 0) + scheduler._get_first_visible_cell(cells).offsetHeight;\r\n\t\t\t\t}\r\n\t\t\t\th.unshift(0);\r\n\t\t\t\tconst dataArea = this.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tif (dataArea.offsetHeight < dataArea.scrollHeight && !scheduler._colsS.scroll_fix && scheduler.xy.scroll_width) {\r\n\r\n\t\t\t\t\tvar scale_settings = scheduler._colsS,\r\n\t\t\t\t\t\tsum_width = scale_settings[scale_settings.col_length],\r\n\t\t\t\t\t\trow_heights = scale_settings.heights.slice();\r\n\r\n\t\t\t\t\tsum_width -= (scheduler.xy.scroll_width || 0);\r\n\t\t\t\t\tthis._calc_scale_sizes(sum_width, this._min_date, this._max_date);\r\n\t\t\t\t\tscheduler._colsS.heights = row_heights;\r\n\r\n\t\t\t\t\tthis.set_xy(this._els[\"dhx_cal_header\"][0], sum_width/*, this.xy.scale_height*/);\r\n\t\t\t\t\tscheduler._render_scales(this._els[\"dhx_cal_header\"][0]);\r\n\t\t\t\t\tscheduler._render_month_scale(this._els[\"dhx_cal_data\"][0], this._get_timeunit_start(), this._min_date);\r\n\r\n\t\t\t\t\tscale_settings.scroll_fix = true;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (!evs.length && this._els[\"dhx_multi_day\"][0].style.visibility == \"visible\")\r\n\t\t\t\t\th[0] = -1;\r\n\t\t\t\tif (evs.length || h[0] == -1) {\r\n\t\t\t\t\t//shift days to have space for multiday events\r\n\t\t\t\t\t//var childs = evl.parentNode.childNodes;\r\n\r\n\t\t\t\t\t// +1 so multiday events would have 2px from top and 2px from bottom by default\r\n\t\t\t\t\tvar full_multi_day_height = (h[0] + 1) * hb + 4;\r\n\r\n\t\t\t\t\tvar used_multi_day_height = full_multi_day_height;\r\n\t\t\t\t\tvar used_multi_day_height_css = full_multi_day_height + \"px\";\r\n\t\t\t\t\tif (this.config.multi_day_height_limit) {\r\n\t\t\t\t\t\tused_multi_day_height = Math.min(full_multi_day_height, this.config.multi_day_height_limit) ;\r\n\t\t\t\t\t\tused_multi_day_height_css = used_multi_day_height + \"px\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tvar multi_day_section = this._els[\"dhx_multi_day\"][0];\r\n\t\t\t\t\tmulti_day_section.style.height = used_multi_day_height_css;\r\n\t\t\t\t\tmulti_day_section.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\tmulti_day_section.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\r\n\t\t\t\t\t// icon\r\n\t\t\t\t\tvar multi_day_icon = this._els[\"dhx_multi_day\"][1];\r\n\t\t\t\t\tmulti_day_icon.style.height = used_multi_day_height_css;\r\n\t\t\t\t\tmulti_day_icon.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\tmulti_day_icon.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\t\t\t\t\tmulti_day_icon.className = h[0] ? \"dhx_multi_day_icon\" : \"dhx_multi_day_icon_small\";\r\n\t\t\t\t\tthis._dy_shift = (h[0] + 1) * hb;\r\n\t\t\t\t\tif(this.config.multi_day_height_limit){\r\n\t\t\t\t\t\tthis._dy_shift = Math.min(this.config.multi_day_height_limit, this._dy_shift);\r\n\t\t\t\t\t}\r\n\t\t\t\t\th[0] = 0;\r\n\r\n\t\t\t\t\tif (used_multi_day_height != full_multi_day_height) {\r\n\r\n\t\t\t\t\t\tmulti_day_section.style.overflowY = \"auto\";\r\n\t\t\t\t\t//\tmulti_day_section.style.width = (parseInt(this._els[\"dhx_cal_navline\"][0].style.width)) + \"px\";\r\n\r\n\t\t\t\t\t\tmulti_day_icon.style.position = \"fixed\";\r\n\t\t\t\t\t\tmulti_day_icon.style.top = \"\";\r\n\t\t\t\t\t\tmulti_day_icon.style.left = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn evs;\r\n};\r\nscheduler._get_event_sday = function(ev) {\r\n\t// get day in current view\r\n\t// use rounding for 23 or 25 hour days on DST\r\n\tvar datePart = this.date.day_start(new Date(ev.start_date));\r\n\treturn Math.round((datePart.valueOf() - this._min_date.valueOf()) / (24 * 60 * 60 * 1000));\r\n};\r\nscheduler._get_event_mapped_end_date = function(ev) {\r\n\tvar end_date = ev.end_date;\r\n\tif (this.config.separate_short_events) {\r\n\t\tvar ev_duration = (ev.end_date - ev.start_date) / 60000; // minutes\r\n\t\tif (ev_duration < this._min_mapped_duration) {\r\n\t\t\tend_date = this.date.add(end_date, this._min_mapped_duration - ev_duration, \"minute\");\r\n\t\t}\r\n\t}\r\n\treturn end_date;\r\n};\r\nscheduler._pre_render_events_line = function(evs, hold){\r\n\tevs.sort(function(a, b) {\r\n\t\tif (a.start_date.valueOf() == b.start_date.valueOf())\r\n\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\treturn a.start_date > b.start_date ? 1 : -1;\r\n\t});\r\n\tvar days = []; //events by weeks\r\n\tvar evs_originals = [];\r\n\r\n\tthis._min_mapped_duration = Math.floor(this.xy.min_event_height * 60 / this.config.hour_size_px); // values could change along the way\r\n\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tvar ev = evs[i];\r\n\r\n\t\t//check date overflow\r\n\t\tvar sd = ev.start_date;\r\n\t\tvar ed = ev.end_date;\r\n\t\t//check scale overflow\r\n\t\tvar sh = sd.getHours();\r\n\t\tvar eh = ed.getHours();\r\n\t\tev._sday = this._get_event_sday(ev); // sday based on event start_date\r\n\t\tif (this._ignores[ev._sday]){\r\n\t\t\t//ignore event\r\n\t\t\tevs.splice(i,1);\r\n\t\t\ti--;\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\tif (!days[ev._sday]) days[ev._sday] = [];\r\n\r\n\t\tif (!hold) {\r\n\t\t\tev._inner = false;\r\n\r\n\t\t\tvar stack = days[ev._sday];\r\n\r\n\t\t\twhile (stack.length) {\r\n\t\t\t\tvar t_ev = stack[stack.length - 1];\r\n\t\t\t\tvar t_end_date = this._get_event_mapped_end_date(t_ev);\r\n\t\t\t\tif (t_end_date.valueOf() <= ev.start_date.valueOf()) {\r\n\t\t\t\t\tstack.splice(stack.length - 1, 1);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar slot_index = stack.length;\r\n\t\t\tvar sorderSet = false;\r\n\t\t\tfor (var j = 0; j < stack.length; j++) {\r\n\t\t\t\tvar t_ev = stack[j];\r\n\t\t\t\tvar t_end_date = this._get_event_mapped_end_date(t_ev);\r\n\t\t\t\tif (t_end_date.valueOf() <= ev.start_date.valueOf()) {\r\n\t\t\t\t\tsorderSet = true;\r\n\t\t\t\t\tev._sorder = t_ev._sorder;\r\n\t\t\t\t\tslot_index = j;\r\n\t\t\t\t\tev._inner = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (stack.length)\r\n\t\t\t\tstack[stack.length - 1]._inner = true;\r\n\r\n\t\t\tif (!sorderSet) {\r\n\t\t\t\tif (stack.length) {\r\n\t\t\t\t\tif (stack.length <= stack[stack.length - 1]._sorder) {\r\n\t\t\t\t\t\tif (!stack[stack.length - 1]._sorder)\r\n\t\t\t\t\t\t\tev._sorder = 0;\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tfor (j = 0; j < stack.length; j++) {\r\n\t\t\t\t\t\t\t\tvar _is_sorder = false;\r\n\t\t\t\t\t\t\t\tfor (var k = 0; k < stack.length; k++) {\r\n\t\t\t\t\t\t\t\t\tif (stack[k]._sorder == j) {\r\n\t\t\t\t\t\t\t\t\t\t_is_sorder = true;\r\n\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (!_is_sorder) {\r\n\t\t\t\t\t\t\t\t\tev._sorder = j;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\tev._inner = true;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tvar _max_sorder = stack[0]._sorder;\r\n\t\t\t\t\t\tfor (j = 1; j < stack.length; j++) {\r\n\t\t\t\t\t\t\tif (stack[j]._sorder > _max_sorder)\r\n\t\t\t\t\t\t\t\t_max_sorder = stack[j]._sorder;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tev._sorder = _max_sorder + 1;\r\n\t\t\t\t\t\tev._inner = false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} else\r\n\t\t\t\t\tev._sorder = 0;\r\n\t\t\t}\r\n\r\n\t\t\tstack.splice(slot_index, slot_index == stack.length ? 0 : 1, ev);\r\n\r\n\t\t\tif (stack.length > (stack.max_count || 0)) {\r\n\t\t\t\tstack.max_count = stack.length;\r\n\t\t\t\tev._count = stack.length;\r\n\t\t\t} else {\r\n\t\t\t\tev._count = (ev._count) ? ev._count : 1;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (sh < this.config.first_hour || eh >= this.config.last_hour) {\r\n\t\t\t// Need to create copy of event as we will be changing it's start/end date\r\n\t\t\t// e.g. first_hour = 11 and event.start_date hours = 9. Need to preserve that info\r\n\t\t\tevs_originals.push(ev);\r\n\t\t\tevs[i] = ev = this._copy_event(ev);\r\n\r\n\t\t\tif (sh < this.config.first_hour) {\r\n\t\t\t\tev.start_date.setHours(this.config.first_hour);\r\n\t\t\t\tev.start_date.setMinutes(0);\r\n\t\t\t}\r\n\t\t\tif (eh >= this.config.last_hour) {\r\n\t\t\t\tev.end_date.setMinutes(0);\r\n\t\t\t\tev.end_date.setHours(this.config.last_hour);\r\n\t\t\t}\r\n\r\n\t\t\tif (ev.start_date > ev.end_date || sh == this.config.last_hour) {\r\n\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (!hold) {\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tevs[i]._count = days[evs[i]._sday].max_count;\r\n\t\t}\r\n\t\tfor (var i = 0; i < evs_originals.length; i++)\r\n\t\t\tevs_originals[i]._count = days[evs_originals[i]._sday].max_count;\r\n\t}\r\n\r\n\treturn evs;\r\n};\r\nscheduler._time_order = function(evs) {\r\n\tevs.sort(function(a, b) {\r\n\t\tif (a.start_date.valueOf() == b.start_date.valueOf()) {\r\n\t\t\tif (a._timed && !b._timed) return 1;\r\n\t\t\tif (!a._timed && b._timed) return -1;\r\n\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\t}\r\n\t\treturn a.start_date > b.start_date ? 1 : -1;\r\n\t});\r\n};\r\n\r\nscheduler._is_any_multiday_cell_visible = function(from, to, event){\r\n\tvar cols = this._cols.length;\r\n\tvar isAnyCellVisible = false;\r\n\tvar checkDate = from;\r\n\tvar noCells = true;\r\n\tvar lastDayEnd = new Date(to);\r\n\tif(scheduler.date.day_start(new Date(to)).valueOf() != to.valueOf()){\r\n\t\tlastDayEnd = scheduler.date.day_start(lastDayEnd);\r\n\t\tlastDayEnd = scheduler.date.add(lastDayEnd, 1, \"day\");\r\n\t}\r\n\twhile(checkDate < lastDayEnd){\r\n\t\tnoCells = false;\r\n\t\tvar cellIndex = this.locate_holder_day(checkDate, false, event);\r\n\t\tvar weekCellIndex = cellIndex % cols;\r\n\t\tif(!this._ignores[weekCellIndex]){\r\n\t\t\tisAnyCellVisible = true;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tcheckDate = scheduler.date.add(checkDate, 1, \"day\");\r\n\t}\r\n\treturn noCells || isAnyCellVisible;\r\n};\r\n\r\nscheduler._pre_render_events_table = function(evs, hold) { // max - max height of week slot\r\n\tthis._time_order(evs);\r\n\tvar out = [];\r\n\tvar weeks = [\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[]\r\n\t]; //events by weeks\r\n\tvar max = this._colsS.heights;\r\n\tvar start_date;\r\n\tvar cols = this._cols.length;\r\n\tvar chunks_info = {};\r\n\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tvar ev = evs[i];\r\n\t\tvar id = ev.id;\r\n\t\tif (!chunks_info[id]) {\r\n\t\t\tchunks_info[id] = {\r\n\t\t\t\tfirst_chunk: true,\r\n\t\t\t\tlast_chunk: true\r\n\t\t\t};\r\n\t\t}\r\n\t\tvar chunk_info = chunks_info[id];\r\n\t\tvar sd = (start_date || ev.start_date);\r\n\t\tvar ed = ev.end_date;\r\n\t\t//trim events which are crossing through current view\r\n\t\tif (sd < this._min_date) {\r\n\t\t\tchunk_info.first_chunk = false;\r\n\t\t\tsd = this._min_date;\r\n\t\t}\r\n\t\tif (ed > this._max_date) {\r\n\t\t\tchunk_info.last_chunk = false;\r\n\t\t\ted = this._max_date;\r\n\t\t}\r\n\r\n\t\tvar locate_s = this.locate_holder_day(sd, false, ev);\r\n\t\tev._sday = locate_s % cols;\r\n\t\t//skip single day events for ignored dates\r\n\t\tif (this._ignores[ev._sday] && ev._timed) continue;\r\n\r\n\t\tvar locate_e = this.locate_holder_day(ed, true, ev) || cols;\r\n\t\tev._eday = (locate_e % cols) || cols; //cols used to fill full week, when event end on monday\r\n\t\tev._length = locate_e - locate_s;\r\n\t\t//3600000 - compensate 1 hour during winter|summer time shift\r\n\t\tev._sweek = Math.floor((this._correct_shift(sd.valueOf(), 1) - this._min_date.valueOf()) / (60 * 60 * 1000 * 24 * cols));\r\n\r\n\t\tvar isAnyCellVisible = scheduler._is_any_multiday_cell_visible(sd, ed, ev);\r\n\r\n\t\tif(!isAnyCellVisible){\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\t//current slot\r\n\t\tvar stack = weeks[ev._sweek];\r\n\t\t//check order position\r\n\t\tvar stack_line;\r\n\r\n\t\tfor (stack_line = 0; stack_line < stack.length; stack_line++)\r\n\t\t\tif (stack[stack_line]._eday <= ev._sday)\r\n\t\t\t\tbreak;\r\n\r\n\t\tif (!ev._sorder || !hold) {\r\n\t\t\tev._sorder = stack_line;\r\n\t\t}\r\n\r\n\t\tif (ev._sday + ev._length <= cols) {\r\n\t\t\tstart_date = null;\r\n\t\t\tout.push(ev);\r\n\t\t\tstack[stack_line] = ev;\r\n\t\t\t//get max height of slot\r\n\t\t\tmax[ev._sweek] = stack.length - 1;\r\n\t\t\tev._first_chunk = chunk_info.first_chunk;\r\n\t\t\tev._last_chunk = chunk_info.last_chunk;\r\n\t\t} else { // split long event in chunks\r\n\t\t\tvar copy = this._copy_event(ev);\r\n\t\t\tcopy.id = ev.id;\r\n\t\t\tcopy._length = cols - ev._sday;\r\n\t\t\tcopy._eday = cols;\r\n\t\t\tcopy._sday = ev._sday;\r\n\t\t\tcopy._sweek = ev._sweek;\r\n\t\t\tcopy._sorder = ev._sorder;\r\n\t\t\tcopy.end_date = this.date.add(sd, copy._length, \"day\");\r\n\t\t\tcopy._first_chunk = chunk_info.first_chunk;\r\n\t\t\tif (chunk_info.first_chunk) {\r\n\t\t\t\tchunk_info.first_chunk = false;\r\n\t\t\t}\r\n\r\n\t\t\tout.push(copy);\r\n\t\t\tstack[stack_line] = copy;\r\n\t\t\tstart_date = copy.end_date;\r\n\t\t\t//get max height of slot\r\n\t\t\tmax[ev._sweek] = stack.length - 1;\r\n\t\t\ti--;\r\n\t\t\tcontinue; //repeat same step\r\n\t\t}\r\n\t}\r\n\treturn out;\r\n};\r\nscheduler._copy_dummy = function() {\r\n\tvar a = new Date(this.start_date);\r\n\tvar b = new Date(this.end_date);\r\n\tthis.start_date = a;\r\n\tthis.end_date = b;\r\n};\r\nscheduler._copy_event = function(ev) {\r\n\tthis._copy_dummy.prototype = ev;\r\n\treturn new this._copy_dummy();\r\n\t//return {start_date:ev.start_date, end_date:ev.end_date, text:ev.text, id:ev.id}\r\n};\r\nscheduler._rendered = [];\r\nscheduler.clear_view = function() {\r\n\tfor (var i = 0; i < this._rendered.length; i++) {\r\n\t\tvar obj = this._rendered[i];\r\n\t\tif (obj.parentNode) obj.parentNode.removeChild(obj);\r\n\t}\r\n\tthis._rendered = [];\r\n};\r\nscheduler.updateEvent = function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tthis.clear_event(id);\r\n\r\n\tif (ev && this.is_visible_events(ev) && this.filter_event(id, ev) && (this._table_view || this.config.multi_day || ev._timed)) {\r\n\t\tif (this.config.update_render){\r\n\t\t\tthis.render_view_data();\r\n\t\t}else{\r\n\t\t\tif(this.getState().mode == \"month\" && !this.getState().drag_id && !this.isOneDayEvent(ev)){\r\n\t\t\t\tthis.render_view_data();\r\n\t\t\t}else{\r\n\t\t\t\tthis.render_view_data([ev], true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.clear_event = function(id) {\r\n\tthis.for_rendered(id, function(node, i) {\r\n\t\tif (node.parentNode)\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\tscheduler._rendered.splice(i, 1);\r\n\t});\r\n};\r\nscheduler._y_from_date = function(date){\r\n\tvar sm = date.getHours() * 60 + date.getMinutes();\r\n\treturn ((Math.round((sm * 60 * 1000 - this.config.first_hour * 60 * 60 * 1000) * this.config.hour_size_px / (60 * 60 * 1000))) % (this.config.hour_size_px * 24)); //42px/hour\r\n};\r\nscheduler._calc_event_y = function(ev, min_height){\r\n\tmin_height = min_height || 0;\r\n\tvar sm = ev.start_date.getHours() * 60 + ev.start_date.getMinutes();\r\n\tvar em = (ev.end_date.getHours() * 60 + ev.end_date.getMinutes()) || (scheduler.config.last_hour * 60);\r\n\tvar top = this._y_from_date(ev.start_date);\r\n\r\n\tvar height = Math.max(min_height, (em - sm) * this.config.hour_size_px / 60); //42px/hour\r\n\treturn {\r\n\t\ttop: top,\r\n\t\theight: height\r\n\t};\r\n};\r\nscheduler.render_event = function(ev, buffer, parentWidth) {\r\n\tvar menu = scheduler.xy.menu_width;\r\n\tvar menu_offset = (this.config.use_select_menu_space) ? 0 : menu;\r\n\tif (ev._sday < 0) return; //can occur in case of recurring event during time shift\r\n\r\n\tvar parent = scheduler.locate_holder(ev._sday);\r\n\tif (!parent) return; //attempt to render non-visible event\r\n\r\n\tbuffer = buffer || parent;\r\n\r\n\tvar pos_y = this._calc_event_y(ev, scheduler.xy.min_event_height);\r\n\tvar top = pos_y.top,\r\n\t\theight = pos_y.height;\r\n\r\n\tvar ev_count = ev._count || 1;\r\n\tvar ev_sorder = ev._sorder || 0;\r\n\r\n\tparentWidth = parentWidth || parent.clientWidth;\r\n\tif(this.config.day_column_padding){\r\n\t\tparentWidth -= this.config.day_column_padding;\r\n\t}\r\n\r\n\tvar width = Math.floor((parentWidth - menu_offset) / ev_count);\r\n\tvar left = ev_sorder * width + (ev_sorder > 0 ? 2 : 1);\r\n\tif (!ev._inner) width = width * (ev_count - ev_sorder);\r\n\tif (this.config.cascade_event_display) {\r\n\t\tvar limit = this.config.cascade_event_count;\r\n\t\tvar margin = this.config.cascade_event_margin;\r\n\t\tleft = ev_sorder % limit * margin;\r\n\t\tvar right = (ev._inner) ? (ev_count - ev_sorder - 1) % limit * margin / 2 : 0;\r\n\t\twidth = Math.floor(parentWidth - menu_offset - left - right);\r\n\t}\r\n\r\n\tif(height < 30){\r\n\t\tev._mode = \"smallest\";\r\n\t}else if(height < 42){\r\n\t\tev._mode = \"small\";\r\n\t}else{\r\n\t\tev._mode = null;\r\n\t}\r\n\r\n\tvar d = this._render_v_bar(ev, menu_offset + left, top, width, height, ev._text_style, scheduler.templates.event_header(ev.start_date, ev.end_date, ev), scheduler.templates.event_text(ev.start_date, ev.end_date, ev));\r\n\t\r\n\tif(ev._mode === \"smallest\"){\r\n\t\td.classList.add(\"dhx_cal_event--xsmall\");\r\n\t}else if (ev._mode === \"small\"){\r\n\t\td.classList.add(\"dhx_cal_event--small\");\r\n\t}\r\n\r\n\tthis._waiAria.eventAttr(ev, d);\r\n\tthis._rendered.push(d);\r\n\tbuffer.appendChild(d);\r\n\r\n\tvar parentPosition = parseInt( this.config.rtl ? parent.style.right : parent.style.left, 10);\r\n\r\n\tleft = left + parentPosition + menu_offset;\r\n\r\n\tif (this._edit_id == ev.id) {\r\n\r\n\t\td.style.zIndex = 1; //fix overlapping issue\r\n\t\twidth = Math.max(width, scheduler.xy.editor_width);\r\n\t\td = document.createElement(\"div\");\r\n\t\td.setAttribute(\"event_id\", ev.id); // for backward compatibility\r\n\t\td.setAttribute(this.config.event_attribute, ev.id);\r\n\r\n\t\tthis._waiAria.eventAttr(ev, d);\r\n\r\n\t\td.className = \"dhx_cal_event dhx_cal_editor\";\r\n\t\tif (this.config.rtl) left++;\r\n\t\tthis.set_xy(d, width, height, left, top);\r\n\r\n\r\n\t\tif(ev.color){\r\n\t\t\td.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tvar tplClass = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\r\n\t\tif(tplClass){\r\n\t\t\td.className += \" \" + tplClass;\r\n\t\t}\r\n\t\tvar d2 = document.createElement(\"div\");\r\n\t\td2.style.cssText += \"overflow:hidden;height:100%\";\r\n\r\n\t\td.appendChild(d2);\r\n\t\tthis._els[\"dhx_cal_data\"][0].appendChild(d);\r\n\t\tthis._rendered.push(d);\r\n\r\n\t\td2.innerHTML = \"\";\r\n\t\tthis._editor = d2.querySelector(\"textarea\");\r\n\t\t\r\n\t\tscheduler.event(this._editor, \"keydown\", function(e) {\r\n\t\t\tif (e.shiftKey) return true;\r\n\t\t\tvar code = e.keyCode;\r\n\t\t\tif (code == scheduler.keys.edit_save) scheduler.editStop(true);\r\n\t\t\tif (code == scheduler.keys.edit_cancel) scheduler.editStop(false);\r\n\r\n\t\t\tif(code == scheduler.keys.edit_save || code == scheduler.keys.edit_cancel){\r\n\t\t\t\tif(e.preventDefault) e.preventDefault();\r\n\t\t\t}\r\n\t\t});\r\n\t\tscheduler.event(this._editor, \"selectstart\", function (e) {\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn true;\r\n\t\t});\r\n\t\tscheduler._focus(this._editor, true);\r\n\t\t//IE and opera can add x-scroll during focusing\r\n\t\tthis._els[\"dhx_cal_data\"][0].scrollLeft = 0;\r\n\t}\r\n\tif (this.xy.menu_width !== 0 && this._select_id == ev.id) {\r\n\r\n\t\tif (this.config.cascade_event_display && this._drag_mode)\r\n\t\t\td.style.zIndex = 1; //fix overlapping issue for cascade view in case of dnd of selected event\r\n\t\tvar icons = this.config[\"icons_\" + ((this._edit_id == ev.id) ? \"edit\" : \"select\")];\r\n\t\tvar icons_str = \"\";\r\n\r\n\t\tvar ariaAttr;\r\n\r\n\t\tfor (var i = 0; i < icons.length; i++) {\r\n\t\t\tconst currentIcon = icons[i];\r\n\t\t\tariaAttr = this._waiAria.eventMenuAttrString(currentIcon);\r\n\t\t\ticons_str += `
`;\r\n\t\t}\r\n\t\tvar obj = this._render_v_bar(ev, left - menu - 1, top, menu, null, \"\", \"
\", icons_str, true);\r\n\r\n\t\tif(ev.color){\r\n\t\t\tobj.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tobj.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\t//obj.style.left = left - menu + 1;\r\n\t\tthis._els[\"dhx_cal_data\"][0].appendChild(obj);\r\n\t\tthis._rendered.push(obj);\r\n\t}\r\n\tif(this.config.drag_highlight && this._drag_id == ev.id){\r\n\t\tthis.highlightEventPosition(ev);\r\n\t}\r\n};\r\nscheduler._render_v_bar = function (ev, x, y, w, h, style, contentA, contentB, bottom) {\r\n\tvar d = document.createElement(\"div\");\r\n\tvar id = ev.id;\r\n\tvar cs = (bottom) ? \"dhx_cal_event dhx_cal_select_menu\" : \"dhx_cal_event\";\r\n\r\n\tvar state = scheduler.getState();\r\n\tif(state.drag_id == ev.id){\r\n\t\tcs += \" dhx_cal_event_drag\";\r\n\t}\r\n\r\n\tif(state.select_id == ev.id){\r\n\t\tcs += \" dhx_cal_event_selected\";\r\n\t}\r\n\r\n\tvar cse = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\tif (cse) cs = cs + \" \" + cse;\r\n\r\n\tif(this.config.cascade_event_display) {\r\n\t\tcs += \" dhx_cal_event_cascade\";\r\n\t}\r\n\r\n\tvar boxWidth = w;\r\n\r\n\tvar html = '
';\r\n\td.innerHTML = html;\r\n\r\n\tvar container = d.cloneNode(true).firstChild;\r\n\r\n\tif (!bottom && scheduler.renderEvent(container, ev, w, h, contentA, contentB)) {\r\n\t\tif(ev.color){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\treturn container;\r\n\t} else {\r\n\t\tcontainer = d.firstChild;\r\n\t\tif(ev.color){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\tvar inner_html = '
 
';\r\n\t\tinner_html += '
' + contentA + '
';\r\n\t\tinner_html += '
' + contentB + '
'; // +2 css specific, moved from render_event\r\n\r\n\t\tvar footer_class = \"dhx_event_resize dhx_footer\";\r\n\t\tif (bottom || ev._drag_resize === false)\r\n\t\t\tfooter_class = \"dhx_resize_denied \" + footer_class;\r\n\r\n\t\tinner_html += '
';\r\n\r\n\t\tcontainer.innerHTML = inner_html;\r\n\t}\r\n\r\n\treturn container;\r\n};\r\nscheduler.renderEvent = function(){\r\n\treturn false;\r\n};\r\nscheduler.locate_holder = function(day) {\r\n\tif (this._mode == \"day\") return this._els[\"dhx_cal_data\"][0].firstChild; //dirty\r\n\treturn this._els[\"dhx_cal_data\"][0].childNodes[day];\r\n};\r\nscheduler.locate_holder_day = function(date, past) {\r\n\tvar day = Math.floor((this._correct_shift(date, 1) - this._min_date) / (60 * 60 * 24 * 1000));\r\n\t//when locating end data of event , we need to use next day if time part was defined\r\n\tif (past && this.date.time_part(date)) day++;\r\n\treturn day;\r\n};\r\n\r\n\r\n\r\nscheduler._get_dnd_order = function(order, ev_height, max_height){\r\n\tif(!this._drag_event)\r\n\t\treturn order;\r\n\tif(!this._drag_event._orig_sorder)\r\n\t\tthis._drag_event._orig_sorder = order;\r\n\telse\r\n\t\torder = this._drag_event._orig_sorder;\r\n\r\n\tvar evTop = ev_height * order;\r\n\twhile((evTop + ev_height) > max_height){\r\n\t\torder--;\r\n\t\tevTop -= ev_height;\r\n\t}\r\n\torder = Math.max(order, 0);\r\n\treturn order;\r\n};\r\n//scheduler._get_event_bar_pos = function(sday, eday, week, drag){\r\nscheduler._get_event_bar_pos = function(ev){\r\n\tvar rtl = this.config.rtl;\r\n\tvar columns = this._colsS;\r\n\tvar x = columns[ev._sday];\r\n\tvar x2 = columns[ev._eday];\r\n\tif (rtl) {\r\n\t\tx = columns[columns.col_length] - columns[ev._eday] + columns[0];\r\n\t\tx2 = columns[columns.col_length] - columns[ev._sday] + columns[0];\r\n\t}\r\n\r\n\tif (x2 == x) x2 = columns[ev._eday + 1];\r\n\tvar hb = this.xy.bar_height;\r\n\r\n\tvar order = ev._sorder;\r\n\tif(ev.id == this._drag_id){\r\n\t\tvar cellHeight = columns.heights[ev._sweek + 1] - columns.heights[ev._sweek]- this.xy.month_head_height;//22 for month head height\r\n\t\torder = scheduler._get_dnd_order(order, hb, cellHeight);\r\n\t}\r\n\tvar y_event_offset = order * hb;\r\n\tvar y = columns.heights[ev._sweek] + (columns.height ? (this.xy.month_scale_height + 2) : 2 ) + y_event_offset;\r\n\treturn {x:x, x2:x2, y:y};\r\n};\r\n\r\nscheduler.render_event_bar = function (ev) {\r\n\tvar parent = this._rendered_location;\r\n\tvar pos = this._get_event_bar_pos(ev);\r\n\tvar y = pos.y;\r\n\tvar x = pos.x;\r\n\tvar x2 = pos.x2;\r\n\t// resize for month mutliday events\r\n\tvar resize_handle = \"\";\r\n\r\n\t//events in ignored dates\r\n\r\n\tif (!x2) return;\r\n\r\n\tvar resizable = scheduler.config.resize_month_events && this._mode == \"month\" &&\r\n\t\t(!ev._timed || scheduler.config.resize_month_timed);\r\n\r\n\tvar d = document.createElement(\"div\");\r\n\tvar left_chunk = (ev.hasOwnProperty(\"_first_chunk\") && ev._first_chunk),\r\n\t\tright_chunk = (ev.hasOwnProperty(\"_last_chunk\") && ev._last_chunk);\r\n\r\n\tvar resize_left = resizable && (ev._timed || left_chunk);\r\n\tvar resize_right = resizable && (ev._timed || right_chunk);\r\n\r\n\tvar timed = true;\r\n\tvar cs = \"dhx_cal_event_clear\";\r\n\tif (!ev._timed || resizable) {\r\n\t\ttimed = false;\r\n\t\tcs = \"dhx_cal_event_line\";\r\n\t}\r\n\tif(left_chunk){\r\n\t\tcs += \" dhx_cal_event_line_start\";\r\n\t}\r\n\tif(right_chunk){\r\n\t\tcs += \" dhx_cal_event_line_end\";\r\n\t}\r\n\tif(resize_left){\r\n\t\tresize_handle += \"
\";\r\n\t}\r\n\tif(resize_right){\r\n\t\tresize_handle += \"
\";\r\n\t}\r\n\r\n\tvar cse = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\tif (cse){\r\n\t\tcs += \" \" + cse;\r\n\t}\r\n\r\n\tvar bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\tvar color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\tvar style_text = [\r\n\t\t\"position:absolute\",\r\n\t\t\"top:\" + y + \"px\",\r\n\t\t\"left:\" + x + \"px\",\r\n\t\t\"width:\" + (x2 - x - (timed ? 1 : 0)) + \"px\",\r\n\t\t\"height:\" + (this.xy.bar_height - 2) + \"px\",\r\n\t\tcolor,\r\n\t\tbg_color,\r\n\t\t(ev._text_style || \"\")\r\n\t].join(\";\");\r\n\r\n\tvar html = \"
\";\r\n\tif (resizable) {\r\n\t\thtml += resize_handle;\r\n\t}\r\n\tif(scheduler.getState().mode == \"month\"){\r\n\t\tev = scheduler.getEvent(ev.id); // ev at this point could be a part (row in a month view) of a larger event\r\n\t}\r\n\r\n\tif (ev._timed){\r\n\t\thtml += `${scheduler.templates.event_bar_date(ev.start_date, ev.end_date, ev)}`;\r\n\t}\r\n\r\n\thtml += \"
\";\r\n\thtml += scheduler.templates.event_bar_text(ev.start_date, ev.end_date, ev) + '
';\r\n\thtml += \"
\";\r\n\thtml += '
';\r\n\r\n\td.innerHTML = html;\r\n\r\n\tthis._rendered.push(d.firstChild);\r\n\tparent.appendChild(d.firstChild);\r\n};\r\n\r\nscheduler._locate_event = function(node) {\r\n\tvar id = null;\r\n\twhile (node && !id && node.getAttribute) {\r\n\t\tid = node.getAttribute(this.config.event_attribute);\r\n\t\tnode = node.parentNode;\r\n\t}\r\n\treturn id;\r\n};\r\n\r\nscheduler.edit = function(id) {\r\n\tif (this._edit_id == id) return;\r\n\tthis.editStop(false, id);\r\n\tthis._edit_id = id;\r\n\tthis.updateEvent(id);\r\n};\r\nscheduler.editStop = function(mode, id) {\r\n\tif (id && this._edit_id == id) return;\r\n\tvar ev = this.getEvent(this._edit_id);\r\n\tif (ev) {\r\n\t\tif (mode) ev.text = this._editor.value;\r\n\t\tthis._edit_id = null;\r\n\t\tthis._editor = null;\r\n\t\tthis.updateEvent(ev.id);\r\n\t\tthis._edit_stop_event(ev, mode);\r\n\t}\r\n};\r\nscheduler._edit_stop_event = function(ev, mode) {\r\n\tif (this._new_event) {\r\n\t\tif (!mode) {\r\n\t\t\tif (ev) // in case of custom lightbox user can already delete event\r\n\t\t\t\tthis.deleteEvent(ev.id, true);\r\n\t\t} else {\r\n\t\t\tthis.callEvent(\"onEventAdded\", [ev.id, ev]);\r\n\t\t}\r\n\t\tthis._new_event = null;\r\n\t} else {\r\n\t\tif (mode){\r\n\t\t\tthis.callEvent(\"onEventChanged\", [ev.id, ev]);\r\n\t\t}\r\n\t}\r\n};\r\n\r\nscheduler.getEvents = function(from, to) {\r\n\tvar result = [];\r\n\tfor (var a in this._events) {\r\n\t\tvar ev = this._events[a];\r\n\t\tif (ev && ( (!from && !to) || (ev.start_date < to && ev.end_date > from) ))\r\n\t\t\tresult.push(ev);\r\n\t}\r\n\treturn result;\r\n};\r\nscheduler.getRenderedEvent = function(id) {\r\n\tif (!id)\r\n\t\treturn;\r\n\tvar rendered_events = scheduler._rendered;\r\n\tfor (var i=0; i -1){\r\n\t\t\t\t\tsection = section.split(scheduler.config.section_delimiter)[0];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar top = timeline.getSectionTop(section);\r\n\t\t\tvar left = timeline.posFromDate(event.start_date);\r\n\t\t\tvar container = scheduler.$container.querySelector(\".dhx_timeline_data_wrapper\");\r\n\t\t\tleft = left - (container.offsetWidth - timeline.dx) / 2;\r\n\t\t\ttop = top - container.offsetHeight / 2 + timeline.dy/2;\r\n\r\n\t\t\tif (timeline._smartRenderingEnabled()) {\r\n\t\t\t\tvar handlerId = timeline.attachEvent(\"onScroll\", function(){\r\n\t\t\t\t\trestoreOriginalColors();\r\n\t\t\t\t\ttimeline.detachEvent(handlerId);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\ttimeline.scrollTo({\r\n\t\t\t\tleft: left,\r\n\t\t\t\ttop: top\r\n\t\t\t});\r\n\t\t\tif (!timeline._smartRenderingEnabled()) {\r\n\t\t\t\trestoreOriginalColors();\r\n\t\t\t}\r\n\t\t}\r\n\t}else{\r\n\t\trestoreOriginalColors();\r\n\t}\r\n\r\n\tscheduler.callEvent(\"onAfterEventDisplay\", [ev, mode]);\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._append_drag_marker = function(m){\r\n\tif(m.parentNode) return;\r\n\tvar zone = scheduler._els[\"dhx_cal_data\"][0];\r\n\r\n\tvar scale = zone.lastChild;\r\n\tvar className = scheduler._getClassName(scale);\r\n\tif(className.indexOf(\"dhx_scale_holder\") < 0 && scale.previousSibling){\r\n\t\tscale = scale.previousSibling;\r\n\t}\r\n\r\n\tclassName = scheduler._getClassName(scale);\r\n\tif (scale && className.indexOf(\"dhx_scale_holder\") === 0) {\r\n\t\tscale.appendChild(m);\r\n\t}\r\n};\r\n\r\nscheduler._update_marker_position = function(m, event){\r\n\tvar size = scheduler._calc_event_y(event, 0);\r\n\tm.style.top = size.top + \"px\";\r\n\tm.style.height = size.height + \"px\";\r\n};\r\n\r\nscheduler.highlightEventPosition = function(event){\r\n\tvar m = document.createElement(\"div\");\r\n\r\n\tm.setAttribute(\"event_id\", event.id); // for backward compatibility\r\n\tm.setAttribute(this.config.event_attribute, event.id);\r\n\tthis._rendered.push(m);\r\n\tthis._update_marker_position(m, event);\r\n\r\n\tvar css = this.templates.drag_marker_class(event.start_date, event.end_date, event);\r\n\tvar html = this.templates.drag_marker_content(event.start_date, event.end_date, event);\r\n\tm.className = \"dhx_drag_marker\";\r\n\tif(css)\r\n\t\tm.className += \" \" + css;\r\n\tif(html)\r\n\t\tm.innerHTML = html;\r\n\tthis._append_drag_marker(m);\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._parsers.xml = {\r\n\tcanParse: function(data, xhr){\r\n\t\t// IE returns non-empty responseXML type regardless of actual data type\r\n\t\tif(xhr.responseXML && xhr.responseXML.firstChild){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\ttry{\r\n\t\t\tvar xmlDoc = scheduler.ajax.parse(xhr.responseText);\r\n\t\t\tvar topElement = scheduler.ajax.xmltop(\"data\", xmlDoc);\r\n\t\t\tif(topElement && topElement.tagName === \"data\"){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}catch (e){\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\tparse: function(loader) {\r\n\t\tvar xml;\r\n\r\n\t\tif (!loader.xmlDoc.responseXML) { //from a string\r\n\t\t\tloader.xmlDoc.responseXML = scheduler.ajax.parse(loader.xmlDoc.responseText);\r\n\t\t}\r\n\t\r\n\t\txml = scheduler.ajax.xmltop(\"data\", loader.xmlDoc);\r\n\t\tif (xml.tagName != \"data\") return null;//not an xml\r\n\t\tvar csrfToken = xml.getAttribute(\"dhx_security\");\r\n\t\tif (csrfToken) {\r\n\t\t\tif (window.dhtmlx) {\r\n\t\t\t\twindow.dhtmlx.security_key = csrfToken;\r\n\t\t\t}\r\n\t\t\tscheduler.security_key = csrfToken;\r\n\t\t}\r\n\t\r\n\t\tvar opts = scheduler.ajax.xpath(\"//coll_options\", loader.xmlDoc);\r\n\t\tfor (var i = 0; i < opts.length; i++) {\r\n\t\t\tvar bind = opts[i].getAttribute(\"for\");\r\n\t\t\tvar arr = scheduler.serverList[bind];\r\n\t\t\tif (!arr) {\r\n\t\t\t\tscheduler.serverList[bind] = arr = [];\r\n\t\t\t}\r\n\t\t\tarr.splice(0, arr.length);\t//clear old options\r\n\t\t\tvar itms = scheduler.ajax.xpath(\".//item\", opts[i]);\r\n\t\t\tfor (var j = 0; j < itms.length; j++) {\r\n\t\t\t\tvar itm = itms[j];\r\n\t\t\t\tvar attrs = itm.attributes;\r\n\t\t\t\tvar obj = { key: itms[j].getAttribute(\"value\"), label: itms[j].getAttribute(\"label\")};\r\n\t\t\t\tfor (var k = 0; k < attrs.length; k++) {\r\n\t\t\t\t\tvar attr = attrs[k];\r\n\t\t\t\t\tif (attr.nodeName == \"value\" || attr.nodeName == \"label\")\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\tobj[attr.nodeName] = attr.nodeValue;\r\n\t\t\t\t}\r\n\t\t\t\tarr.push(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (opts.length)\r\n\t\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\t\r\n\t\tvar ud = scheduler.ajax.xpath(\"//userdata\", loader.xmlDoc);\r\n\t\tfor (var i = 0; i < ud.length; i++) {\r\n\t\t\tvar udx = scheduler._xmlNodeToJSON(ud[i]);\r\n\t\t\tscheduler._userdata[udx.name] = udx.text;\r\n\t\t}\r\n\t\r\n\t\tvar evs = [];\r\n\t\txml = scheduler.ajax.xpath(\"//event\", loader.xmlDoc);\r\n\t\r\n\t\tfor (var i = 0; i < xml.length; i++) {\r\n\t\t\tvar ev = evs[i] = scheduler._xmlNodeToJSON(xml[i]);\r\n\t\t\tscheduler._init_event(ev);\r\n\t\t}\r\n\t\treturn evs;\r\n\t}\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler.json = scheduler._parsers.json = {\r\n\tcanParse: function(data){\r\n\t\tif(data && typeof data === \"object\"){\r\n\t\t\treturn true;\r\n\t\t} else if(typeof data === \"string\"){\r\n\t\t\ttry {\r\n\t\t\t\tvar result = JSON.parse(data);\r\n\t\t\t\treturn Object.prototype.toString.call(result) === '[object Object]' || \r\n\t\t\t\t\t\tObject.prototype.toString.call(result) === '[object Array]';\r\n\t\t\t} catch (err) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\tparse: function(data) {\r\n\t\tvar events = [];\r\n\r\n\t\tif (typeof data == \"string\") {\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\t\tif (Object.prototype.toString.call(data) === '[object Array]') {\r\n\t\t\tevents = data;\r\n\t\t} else {\r\n\t\t\tif(data){\r\n\t\t\t\tif(data.events){\r\n\t\t\t\t\tevents = data.events;\r\n\t\t\t\t}else if(data.data){\r\n\t\t\t\t\tevents = data.data;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tevents = events || [];\r\n\r\n\t\tif (data.dhx_security) {\r\n\t\t\tif (window.dhtmlx) {\r\n\t\t\t\twindow.dhtmlx.security_key = data.dhx_security;\r\n\t\t\t}\r\n\t\t\tscheduler.security_key = data.dhx_security;\r\n\t\t}\r\n\r\n\t\tvar collections = (data && data.collections) ? data.collections : {};\r\n\t\tvar collections_loaded = false;\r\n\t\tfor (var key in collections) {\r\n\t\t\tif (collections.hasOwnProperty(key)) {\r\n\t\t\t\tcollections_loaded = true;\r\n\t\t\t\tvar collection = collections[key];\r\n\t\t\t\tvar arr = scheduler.serverList[key];\r\n\t\t\t\tif (!arr) {\r\n\t\t\t\t\tscheduler.serverList[key] = arr = [];\r\n\t\t\t\t}\r\n\t\t\t\tarr.splice(0, arr.length); //clear old options\r\n\t\t\t\tfor (var j = 0; j < collection.length; j++) {\r\n\t\t\t\t\tvar option = collection[j];\r\n\t\t\t\t\tvar obj = { key: option.value, label: option.label }; // resulting option object\r\n\t\t\t\t\tfor (var option_key in option) {\r\n\t\t\t\t\t\tif (option.hasOwnProperty(option_key)) {\r\n\t\t\t\t\t\t\tif (option_key == \"value\" || option_key == \"label\")\r\n\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\tobj[option_key] = option[option_key]; // obj['value'] = option['value']\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tarr.push(obj);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (collections_loaded)\r\n\t\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\r\n\t\tvar evs = [];\r\n\t\tfor (var i = 0; i < events.length; i++) {\r\n\t\t\tvar event = events[i];\r\n\t\t\tscheduler._init_event(event);\r\n\t\t\tevs.push(event);\r\n\t\t}\r\n\t\treturn evs;\r\n\t}\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler.ical = scheduler._parsers.ical = {\r\n\tcanParse: function(data){\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\treturn new RegExp(\"^BEGIN:VCALENDAR\").test(data);\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t},\r\n\tparse:function(str){\r\n\t\tvar data = str.match(RegExp(this.c_start+\"[^\\f]*\"+this.c_end,\"\"));\r\n\t\tif (!data.length) return;\r\n\r\n\t\t// mpl: handle bad unfolding\r\n\t\tdata[0]=data[0].replace(/[\\r\\n]+ /g,\"\");\r\n\r\n\t\t//unfolding \r\n\t\tdata[0]=data[0].replace(/[\\r\\n]+(?=[a-z \\t])/g,\" \");\r\n\t\t//drop property\r\n\t\tdata[0]=data[0].replace(/;[^:\\r\\n]*:/g,\":\");\r\n\t\t\r\n\t\t\r\n\t\tvar incoming=[];\r\n\t\tvar match;\r\n\t\tvar event_r = RegExp(\"(?:\"+this.e_start+\")([^\\f]*?)(?:\"+this.e_end+\")\",\"g\");\r\n\t\twhile ((match=event_r.exec(data)) !== null){\r\n\t\t\tvar e={};\r\n\t\t\tvar param;\r\n\t\t\tvar param_r = /[^\\r\\n]+[\\r\\n]+/g;\r\n\t\t\twhile ((param=param_r.exec(match[1])) !== null)\r\n\t\t\t\tthis.parse_param(param.toString(),e);\r\n\t\t\tif (e.uid && !e.id) e.id = e.uid; //fallback to UID, when ID is not defined\r\n\t\t\tincoming.push(e);\t\r\n\t\t}\r\n\t\treturn incoming;\r\n\t},\r\n\tparse_param:function(str,obj){\r\n\t\tvar d = str.indexOf(\":\"); \r\n\t\t\tif (d==-1) return;\r\n\t\t\r\n\t\tvar name = str.substr(0,d).toLowerCase();\r\n\t\tvar value = str.substr(d+1).replace(/\\\\,/g,\",\").replace(/[\\r\\n]+$/,\"\");\r\n\t\tif (name==\"summary\")\r\n\t\t\tname=\"text\";\r\n\t\telse if (name==\"dtstart\"){\r\n\t\t\tname = \"start_date\";\r\n\t\t\tvalue = this.parse_date(value,0,0);\r\n\t\t}\r\n\t\telse if (name==\"dtend\"){\r\n\t\t\tname = \"end_date\";\r\n\t\t\tvalue = this.parse_date(value,0,0);\r\n\t\t}\r\n\t\tobj[name]=value;\r\n\t},\r\n\tparse_date:function(value,dh,dm){\r\n\t\tvar t = value.split(\"T\");\r\n\r\n\t\tvar utcMark = false;\r\n\t\tif (t[1]){\r\n\t\t\tdh=t[1].substr(0,2);\r\n\t\t\tdm=t[1].substr(2,2);\r\n\t\t\tutcMark = !!(t[1][6] == \"Z\");\r\n\t\t}\r\n\t\tvar dy = t[0].substr(0,4);\r\n\t\tvar dn = parseInt(t[0].substr(4,2),10)-1;\r\n\t\tvar dd = t[0].substr(6,2);\r\n\r\n\t\tif(scheduler.config.server_utc || utcMark){\r\n\t\t\treturn new Date(Date.UTC(dy,dn,dd,dh,dm)) ;\r\n\t\t}else{\r\n\t\t\treturn new Date(dy,dn,dd,dh,dm);\r\n\t\t}\r\n\t},\r\n\tc_start:\"BEGIN:VCALENDAR\",\r\n\te_start:\"BEGIN:VEVENT\",\r\n\te_end:\"END:VEVENT\",\r\n\tc_end:\"END:VCALENDAR\"\t\r\n};\r\n\r\n}","export default function(scheduler){\r\n\treturn (function(){\r\n\t\tvar res = {};\r\n\t\tfor (var a in this._events){\r\n\t\t\tvar ev = this._events[a];\r\n\t\t\tif (ev.id.toString().indexOf(\"#\") == -1){\r\n\t\t\t\tres[ev.id] = ev;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn res;\r\n\t}).bind(scheduler);\r\n}","import xmlLoaded from \"./loaders/xml\";\r\nimport jsonLoader from \"./loaders/json\";\r\nimport iCalLoader from \"./loaders/ical\";\r\nimport createSerializator from \"../core/common/get_serializable_events\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler._loaded = {};\r\nscheduler._load = function(url, from) {\r\n\turl = url || this._load_url;\r\n\r\n\tif(!url){\r\n\t\t//if scheduler.setLoadMode is called before scheduler.init, initial rendering will invoke data loading while url is undefined\r\n\t\treturn;\r\n\t}\r\n\r\n\turl += (url.indexOf(\"?\") == -1 ? \"?\" : \"&\") + \"timeshift=\" + (new Date()).getTimezoneOffset();\r\n\tif (this.config.prevent_cache) url += \"&uid=\" + this.uid();\r\n\tvar to;\r\n\tfrom = from || this._date;\r\n\tfunction ajaxCallback(response) {\r\n\t\tscheduler.on_load(response);\r\n\t\tscheduler.callEvent(\"onLoadEnd\", []);\r\n\t}\r\n\tif (this._load_mode) {\r\n\t\tvar lf = this.templates.load_format;\r\n\r\n\t\tfrom = this.date[this._load_mode + \"_start\"](new Date(from.valueOf()));\r\n\t\twhile (from > this._min_date) from = this.date.add(from, -1, this._load_mode);\r\n\t\tto = from;\r\n\r\n\t\tvar cache_line = true;\r\n\t\twhile (to < this._max_date) {\r\n\t\t\tto = this.date.add(to, 1, this._load_mode);\r\n\t\t\tif (this._loaded[lf(from)] && cache_line)\r\n\t\t\t\tfrom = this.date.add(from, 1, this._load_mode); else cache_line = false;\r\n\t\t}\r\n\r\n\t\tvar temp_to = to;\r\n\t\tdo {\r\n\t\t\tto = temp_to;\r\n\t\t\ttemp_to = this.date.add(to, -1, this._load_mode);\r\n\t\t} while (temp_to > from && this._loaded[lf(temp_to)]);\r\n\r\n\t\tif (to <= from)\r\n\t\t\treturn false; //already loaded\r\n\r\n\t\tscheduler.ajax.get(url + \"&from=\" + lf(from) + \"&to=\" + lf(to), ajaxCallback);\r\n\r\n\t\twhile (from < to) {\r\n\t\t\tthis._loaded[lf(from)] = true;\r\n\t\t\tfrom = this.date.add(from, 1, this._load_mode);\r\n\t\t}\r\n\t} else {\r\n\t\tscheduler.ajax.get(url, ajaxCallback);\r\n\t}\r\n\r\n\t// TODO: remove onXLS\r\n\tthis.callEvent(\"onXLS\", []);\r\n\tthis.callEvent(\"onLoadStart\", []);\r\n\treturn true;\r\n};\r\n\r\nscheduler._parsers = {};\r\n\r\n\r\nxmlLoaded(scheduler);\r\njsonLoader(scheduler);\r\niCalLoader(scheduler);\r\n\r\nscheduler.on_load = function (loader) {\r\n\tthis.callEvent(\"onBeforeParse\", []);\r\n\r\n\tvar evs;\r\n\tvar error = false;\r\n\r\n\tvar foundParser = false;\r\n\tfor(var i in this._parsers){\r\n\t\tvar parser = this._parsers[i];\r\n\t\tif(parser.canParse(loader.xmlDoc.responseText, loader.xmlDoc)){\r\n\t\t\ttry{\r\n\t\t\t\tvar param = loader.xmlDoc.responseText;\r\n\t\t\t\tif(i === \"xml\"){\r\n\t\t\t\t\tparam = loader;\r\n\t\t\t\t}\r\n\t\t\t\tevs = parser.parse(param);\r\n\t\t\t\tif(!evs){\r\n\t\t\t\t\terror = true;\r\n\t\t\t\t}\r\n\t\t\t}catch(e){\r\n\t\t\t\terror = true;\r\n\t\t\t}\r\n\t\t\tfoundParser = true;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tif(!foundParser){\r\n\t\tif(this._process && this[this._process]){\r\n\t\t\ttry{\r\n\t\t\t\tevs = this[this._process].parse(loader.xmlDoc.responseText);\r\n\t\t\t}catch (e){\r\n\t\t\t\terror = true;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\terror = true;\r\n\t\t}\r\n\t}\r\n\r\n\tif(error || (loader.xmlDoc.status && loader.xmlDoc.status >= 400)){\r\n\t\tthis.callEvent(\"onLoadError\", [loader.xmlDoc]);\r\n\t\tevs = [];\r\n\t}\r\n\r\n\tthis._process_loading(evs);\r\n\r\n\t// TODO: remove onXLE\r\n\tthis.callEvent(\"onXLE\", []);\r\n\tthis.callEvent(\"onParse\", []);\r\n};\r\nscheduler._process_loading = function(evs) {\r\n\tthis._loading = true;\r\n\tthis._not_render = true;\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tif (!this.callEvent(\"onEventLoading\", [evs[i]])) continue;\r\n\t\tthis.addEvent(evs[i]);\r\n\t}\r\n\tthis._not_render = false;\r\n\tif (this._render_wait) this.render_view_data();\r\n\r\n\tthis._loading = false;\r\n\tif (this._after_call) this._after_call();\r\n\tthis._after_call = null;\r\n};\r\nscheduler._init_event = function(event) {\r\n\tevent.text = (event.text || event._tagvalue) || \"\";\r\n\tevent.start_date = scheduler._init_date(event.start_date);\r\n\tevent.end_date = scheduler._init_date(event.end_date);\r\n};\r\n\r\nscheduler._init_date = function(date){\r\n\tif(!date)\r\n\t\treturn null;\r\n\tif (typeof date == \"string\") {\r\n\t\treturn scheduler._helpers.parseDate(date);\r\n\t}\r\n\telse return new Date(date);\r\n};\r\n\r\nconst getSerializableData = createSerializator(scheduler);\r\nscheduler.serialize = function(){\r\n\tconst dataset = [];\r\n\tconst allEvents = getSerializableData();\r\n\tfor (var a in allEvents){\r\n\t\t\r\n\t\tconst exportedEvent = {};\r\n\t\tvar ev = allEvents[a];\r\n\r\n\t\tfor(var key in ev){\r\n\t\t\tif (key.charAt(0) == \"$\" || key.charAt(0) == \"_\"){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tlet exportValue;\r\n\t\t\tconst rawValue = ev[key];\r\n\t\t\tif(scheduler.utils.isDate(rawValue)){\r\n\t\t\t\texportValue = scheduler.defined(scheduler.templates.xml_format) ? scheduler.templates.xml_format(rawValue) : scheduler.templates.format_date(rawValue);\r\n\t\t\t}else{\r\n\t\t\t\texportValue = rawValue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\texportedEvent[key] = exportValue;\r\n\t\t}\r\n\r\n\t\tdataset.push(exportedEvent);\r\n\t}\r\n\treturn dataset;\r\n};\r\n\r\n/*\r\nscheduler.json = {};\r\nscheduler.json.parse = function(data) {\r\n\r\n\tvar events = [];\r\n\r\n\tif (typeof data == \"string\") {\r\n\t\tdata = JSON.parse(data);\r\n\t}\r\n\tif (Object.prototype.toString.call(data) === '[object Array]') {\r\n\t\tevents = data;\r\n\t} else {\r\n\t\tif(data){\r\n\t\t\tif(data.events){\r\n\t\t\t\tevents = data.events;\r\n\t\t\t}else if(data.data){\r\n\t\t\t\tevents = data.data;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tevents = events || [];\r\n\r\n\tif (data.dhx_security) {\r\n\t\tif (window.dhtmlx) {\r\n\t\t\twindow.dhtmlx.security_key = data.dhx_security;\r\n\t\t}\r\n\t\tscheduler.security_key = data.dhx_security;\r\n\t}\r\n\r\n\tvar collections = (data && data.collections) ? data.collections : {};\r\n\tvar collections_loaded = false;\r\n\tfor (var key in collections) {\r\n\t\tif (collections.hasOwnProperty(key)) {\r\n\t\t\tcollections_loaded = true;\r\n\t\t\tvar collection = collections[key];\r\n\t\t\tvar arr = scheduler.serverList[key];\r\n\t\t\tif (!arr) {\r\n\t\t\t\tscheduler.serverList[key] = arr = [];\r\n\t\t\t}\r\n\t\t\tarr.splice(0, arr.length); //clear old options\r\n\t\t\tfor (var j = 0; j < collection.length; j++) {\r\n\t\t\t\tvar option = collection[j];\r\n\t\t\t\tvar obj = { key: option.value, label: option.label }; // resulting option object\r\n\t\t\t\tfor (var option_key in option) {\r\n\t\t\t\t\tif (option.hasOwnProperty(option_key)) {\r\n\t\t\t\t\t\tif (option_key == \"value\" || option_key == \"label\")\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\tobj[option_key] = option[option_key]; // obj['value'] = option['value']\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tarr.push(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (collections_loaded)\r\n\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\r\n\tvar evs = [];\r\n\tfor (var i = 0; i < events.length; i++) {\r\n\t\tvar event = events[i];\r\n\t\tscheduler._init_event(event);\r\n\t\tevs.push(event);\r\n\t}\r\n\treturn evs;\r\n};*/\r\nscheduler.parse = function(data, type) {\r\n\tthis._process = type;\r\n\tthis.on_load({xmlDoc: {responseText: data}});\r\n};\r\nscheduler.load = function(url, call) {\r\n\tif (typeof call == \"string\") {\r\n\t\tthis._process = call;\r\n\t\tcall = arguments[2];\r\n\t}\r\n\r\n\tthis._load_url = url;\r\n\tthis._after_call = call;\r\n\tthis._load(url, this._date);\r\n};\r\n//possible values - day,week,month,year,all\r\nscheduler.setLoadMode = function(mode) {\r\n\tif (mode == \"all\") mode = \"\";\r\n\tthis._load_mode = mode;\r\n};\r\n\r\nscheduler.serverList = function(name, array) {\r\n\tif (array) {\r\n\t\tthis.serverList[name] = array.slice(0);\r\n\t\treturn this.serverList[name];\r\n\t}\r\n\tthis.serverList[name] = (this.serverList[name] || []);\r\n\treturn this.serverList[name];\r\n};\r\nscheduler._userdata = {};\r\n\r\nscheduler._xmlNodeToJSON = function(node) {\r\n\tvar t = {};\r\n\tfor (var i = 0; i < node.attributes.length; i++)\r\n\t\tt[node.attributes[i].name] = node.attributes[i].value;\r\n\r\n\tfor (var i = 0; i < node.childNodes.length; i++) {\r\n\t\tvar child = node.childNodes[i];\r\n\t\tif (child.nodeType == 1)\r\n\t\t\tt[child.tagName] = child.firstChild ? child.firstChild.nodeValue : \"\";\r\n\t}\r\n\r\n\tif (!t.text) t.text = node.firstChild ? node.firstChild.nodeValue : \"\";\r\n\r\n\treturn t;\r\n};\r\nscheduler.attachEvent(\"onXLS\", function() {\r\n\tif (this.config.show_loading === true) {\r\n\t\tvar t;\r\n\t\tt = this.config.show_loading = document.createElement(\"div\");\r\n\t\tt.className = 'dhx_loading';\r\n\t\tt.style.left = Math.round((this._x - 128) / 2) + \"px\";\r\n\t\tt.style.top = Math.round((this._y - 15) / 2) + \"px\";\r\n\t\tthis._obj.appendChild(t);\r\n\t}\r\n});\r\nscheduler.attachEvent(\"onXLE\", function() {\r\n\tvar t = this.config.show_loading;\r\n\tif (t && typeof t == \"object\") {\r\n\t\tif(t.parentNode) {\r\n\t\t\tt.parentNode.removeChild(t);\r\n\t\t}\r\n\t\tthis.config.show_loading = true;\r\n\t}\r\n});\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler._lightbox_controls = {};\r\nscheduler.formSection = function(name){\r\n\tvar config = this.config.lightbox.sections;\r\n\tvar i = 0;\r\n\tfor (i; i < config.length; i++) {\r\n\t\tif (config[i].name == name) {\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tif (i === config.length) {\r\n\t\t// GS-1662 section not found, should exit here instead of throwing an error\r\n\t\treturn null;\r\n\t}\r\n\r\n\tvar section = config[i];\r\n\tif (!scheduler._lightbox) {\r\n\t\tscheduler.getLightbox();\r\n\t}\r\n\tvar header = scheduler._lightbox.querySelector(`#${section.id}`);\r\n\tvar node = header.nextSibling;\r\n\r\n\tvar result = {\r\n\t\tsection: section,\r\n\t\theader: header,\r\n\t\tnode: node,\r\n\t\tgetValue:function(ev){\r\n\t\t\treturn scheduler.form_blocks[section.type].get_value(node, (ev||{}), section);\r\n\t\t},\r\n\t\tsetValue:function(value, ev){\r\n\t\t\treturn scheduler.form_blocks[section.type].set_value(node, value, (ev||{}), section);\r\n\t\t}\r\n\t};\r\n\r\n\tvar handler = scheduler._lightbox_controls[\"get_\"+section.type+\"_control\"];\r\n\treturn handler?handler(result):result;\r\n};\r\nscheduler._lightbox_controls.get_template_control = function(result) {\r\n\tresult.control = result.node;\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_select_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('select')[0];\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_textarea_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('textarea')[0];\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_time_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('select'); // array\r\n\treturn result;\r\n};\r\n\r\nscheduler._lightbox_controls.defaults = {\r\n\ttemplate: {\r\n\t\theight:30\r\n\t},\r\n\ttextarea: {\r\n\t\theight: 200\r\n\t},\r\n\tselect: {\r\n\t\theight: 23\r\n\t},\r\n\ttime: {\r\n\t\theight: 20\r\n\t}\r\n};\r\n\r\n\r\nscheduler.form_blocks={\r\n\ttemplate:{\r\n\t\trender: function(sns){\r\n\t\t\treturn \"
\";\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,config){\r\n\t\t\tnode.innerHTML = value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev,config){\r\n\t\t\treturn node.innerHTML||\"\";\r\n\t\t},\r\n\t\tfocus: function(node){\r\n\t\t}\r\n\t},\r\n\ttextarea:{\r\n\t\trender:function(sns){\r\n\t\t\treturn \"
\";\r\n\t\t},\r\n\t\tset_value:function(node,value,ev){\r\n\t\t\tscheduler.form_blocks.textarea._get_input(node).value=value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev){\r\n\t\t\treturn scheduler.form_blocks.textarea._get_input(node).value;\r\n\t\t},\r\n\t\tfocus:function(node){\r\n\t\t\tvar a = scheduler.form_blocks.textarea._get_input(node);\r\n\t\t\tscheduler._focus(a, true);\r\n\t\t},\r\n\t\t_get_input: function(node){\r\n\t\t\treturn node.getElementsByTagName(\"textarea\")[0];\r\n\t\t}\r\n\t},\r\n\tselect:{\r\n\t\trender:function(sns){\r\n\t\t\t//var defaults = scheduler._lightbox_controls.defaults.select;\r\n\t\t\tvar html=\"
\";\r\n\t\t\treturn html;\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,sns){\r\n\t\t\tvar select = node.firstChild;\r\n\t\t\tif (!select._dhx_onchange && sns.onchange) {\r\n\t\t\t\tscheduler.event(select, \"change\", sns.onchange);\r\n\t\t\t\tselect._dhx_onchange = true;\r\n\t\t\t}\r\n\t\t\tif (typeof value == \"undefined\")\r\n\t\t\t\tvalue = (select.options[0]||{}).value;\r\n\t\t\tselect.value=value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev){\r\n\t\t\treturn node.firstChild.value;\r\n\t\t},\r\n\t\tfocus:function(node){\r\n\t\t\tvar a=node.firstChild; scheduler._focus(a, true);\r\n\t\t}\r\n\t},\r\n\ttime:{\r\n\t\trender:function(sns) {\r\n\t\t\tif (!sns.time_format) {\r\n\t\t\t\t// default order\r\n\t\t\t\tsns.time_format = [\"%H:%i\", \"%d\", \"%m\", \"%Y\"];\r\n\t\t\t}\r\n\t\t\t// map: default order => real one\r\n\t\t\tsns._time_format_order = {};\r\n\t\t\tvar time_format = sns.time_format;\r\n\r\n\t\t\tvar cfg = scheduler.config;\r\n\t\t\tvar dt = scheduler.date.date_part(scheduler._currentDate());\r\n\t\t\tvar last = 24*60, first = 0;\r\n\t\t\tif(scheduler.config.limit_time_select){\r\n\t\t\t\tlast = 60*cfg.last_hour+1;\r\n\t\t\t\tfirst = 60*cfg.first_hour;\r\n\t\t\t\tdt.setHours(cfg.first_hour);\r\n\t\t\t}\r\n\t\t\tvar html = \"\";\r\n\r\n\t\t\tfor (var p = 0; p < time_format.length; p++) {\r\n\t\t\t\tvar time_option = time_format[p];\r\n\r\n\t\t\t\t// adding spaces between selects\r\n\t\t\t\tif (p > 0) {\r\n\t\t\t\t\thtml += \" \";\r\n\t\t\t\t}\r\n\t\t\t\tvar selectBoxClass = \"\";\r\n\t\t\t\tvar options = \"\";\r\n\t\t\t\tswitch (time_option) {\r\n\t\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_year_select\";\r\n\t\t\t\t\t\tsns._time_format_order[3] = p;\r\n\t\t\t\t\t\t//year\r\n\t\t\t\t\t\tvar range;\r\n\t\t\t\t\t\tvar start_year;\r\n\t\t\t\t\t\tvar end_year;\r\n\t\t\t\t\t\tif(sns.year_range){\r\n\t\t\t\t\t\t\tif (!isNaN(sns.year_range)) {\r\n\t\t\t\t\t\t\t\trange = sns.year_range;\r\n\t\t\t\t\t\t\t} else if (sns.year_range.push) {\r\n\t\t\t\t\t\t\t\t// if\r\n\t\t\t\t\t\t\t\tstart_year = sns.year_range[0];\r\n\t\t\t\t\t\t\t\tend_year = sns.year_range[1];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\trange = range || 10;\r\n\t\t\t\t\t\tvar offset = offset || Math.floor(range / 2);\r\n\t\t\t\t\t\tstart_year = start_year || dt.getFullYear() - offset;\r\n\t\t\t\t\t\tend_year = end_year || start_year + range;\r\n\r\n\t\t\t\t\t\tfor (var i = start_year; i < end_year; i++)\r\n\t\t\t\t\t\t\toptions += \"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%m\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_month_select\";\r\n\t\t\t\t\t\tsns._time_format_order[2] = p;\r\n\t\t\t\t\t\t//month\r\n\t\t\t\t\t\tfor (var i=0; i < 12; i++)\r\n\t\t\t\t\t\t\toptions+=\"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%d\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_day_select\";\r\n\t\t\t\t\t\tsns._time_format_order[1] = p;\r\n\t\t\t\t\t\t//days\r\n\t\t\t\t\t\tfor (var i=1; i < 32; i++)\r\n\t\t\t\t\t\t\toptions+=\"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%H:%i\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_time_select\";\r\n\t\t\t\t\t\tsns._time_format_order[0] = p;\r\n\t\t\t\t\t\t//hours\r\n\t\t\t\t\t\tvar i = first;\r\n\t\t\t\t\t\tvar tdate = dt.getDate();\r\n\t\t\t\t\t\tsns._time_values = [];\r\n\r\n\t\t\t\t\t\twhile(i\"+time+\"\";\r\n\t\t\t\t\t\t\tsns._time_values.push(i);\r\n\t\t\t\t\t\t\tdt.setTime(dt.valueOf()+this.config.time_step*60*1000);\r\n\t\t\t\t\t\t\tvar diff = (dt.getDate()!=tdate)?1:0; // moved or not to the next day\r\n\t\t\t\t\t\t\ti=diff*24*60+dt.getHours()*60+dt.getMinutes();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(options){\r\n\r\n\t\t\t\t\tvar ariaAttrs = scheduler._waiAria.lightboxSelectAttrString(time_option);\r\n\t\t\t\t\tvar readonly = sns.readonly ? \"disabled='disabled'\" : \"\";\r\n\t\t\t\t\thtml += \" \";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//var defaults = scheduler._lightbox_controls.defaults.select;\r\n\r\n\t\t\treturn \"
\"+html+\"  –  \"+html+\"
\";\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,config){\r\n\t\t\tvar cfg = scheduler.config;\r\n\t\t\tvar s=node.getElementsByTagName(\"select\");\r\n\t\t\tvar map = config._time_format_order;\r\n\t\t\tvar start_date, end_date;\r\n\r\n\t\t\tif(cfg.full_day) {\r\n\t\t\t\tif (!node._full_day){\r\n\t\t\t\t\tvar html = \"\";\r\n\t\t\t\t\tif (!scheduler.config.wide_form)\r\n\t\t\t\t\t\thtml = node.previousSibling.innerHTML+html;\r\n\t\t\t\t\tnode.previousSibling.innerHTML=html;\r\n\t\t\t\t\tnode._full_day=true;\r\n\t\t\t\t}\r\n\t\t\t\tvar input=node.previousSibling.getElementsByTagName(\"input\")[0];\r\n\t\t\t\tinput.checked = (scheduler.date.time_part(ev.start_date)===0 && scheduler.date.time_part(ev.end_date)===0);\r\n\r\n\t\t\t\ts[map[0]].disabled=input.checked;\r\n\t\t\t\ts[ map[0] + s.length/2 ].disabled=input.checked;\r\n\r\n\t\t\t\tif(!input.$_eventAttached){\r\n\t\t\t\t\tinput.$_eventAttached = true;\r\n\r\n\t\t\t\t\t\tscheduler.event(input, \"click\", function(){\r\n\t\t\t\t\t\tif(input.checked) {\r\n\t\t\t\t\t\t\tvar obj = {};\r\n\t\t\t\t\t\t\tscheduler.form_blocks.time.get_value(node,obj,config);\r\n\r\n\t\t\t\t\t\t\tstart_date = scheduler.date.date_part(obj.start_date);\r\n\t\t\t\t\t\t\tend_date = scheduler.date.date_part(obj.end_date);\r\n\r\n\t\t\t\t\t\t\tif (+end_date == +start_date || (+end_date >= +start_date && (ev.end_date.getHours() !== 0 || ev.end_date.getMinutes() !== 0)))\r\n\t\t\t\t\t\t\t\tend_date = scheduler.date.add(end_date, 1, \"day\");\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tstart_date = null;\r\n\t\t\t\t\t\t\tend_date = null;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\ts[map[0]].disabled=input.checked;\r\n\t\t\t\t\t\ts[ map[0] + s.length/2 ].disabled=input.checked;\r\n\r\n\t\t\t\t\t\t_fill_lightbox_select(s,0,start_date||ev.start_date);\r\n\t\t\t\t\t\t_fill_lightbox_select(s,4,end_date||ev.end_date);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(cfg.auto_end_date && cfg.event_duration) {\r\n\t\t\t\tvar _update_lightbox_select = function () {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (!(cfg.auto_end_date && cfg.event_duration)){\r\n\t\t\t\t\t\t// setting may be disabled after the handler is attached\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstart_date = new Date(s[map[3]].value,s[map[2]].value,s[map[1]].value,0,s[map[0]].value);\r\n\t\t\t\t\tend_date = new Date(start_date.getTime() + (scheduler.config.event_duration * 60 * 1000));\r\n\t\t\t\t\t_fill_lightbox_select(s, 4, end_date);\r\n\t\t\t\t};\r\n\t\t\t\tfor(var i=0; i<4; i++) {\r\n\t\t\t\t\tif(!s[i].$_eventAttached) {\r\n\t\t\t\t\t\ts[i].$_eventAttached = true;\r\n\t\t\t\t\t\tscheduler.event(s[i], \"change\", _update_lightbox_select);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfunction _fill_lightbox_select(s,i,d) {\r\n\t\t\t\tvar time_values = config._time_values;\r\n\t\t\t\tvar direct_value = d.getHours()*60+d.getMinutes();\r\n\t\t\t\tvar fixed_value = direct_value;\r\n\t\t\t\tvar value_found = false;\r\n\t\t\t\tfor (var k=0; k\";\r\n\t\tvar ariaAttr = \"\";\r\n\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\tariaAttr = this._waiAria.lightboxButtonAttrString(buttons[i]);\r\n\t\t\thtml += \"
\" + scheduler.locale.labels[buttons[i]] + \"
\";\r\n\t\t}\r\n\r\n\t\tbuttons = this.config.buttons_right;\r\n\t\tvar rtl = scheduler.config.rtl;\r\n\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\tariaAttr = this._waiAria.lightboxButtonAttrString(buttons[i]);\r\n\r\n\t\t\thtml += \"
\";\r\n\r\n\t\t\thtml += \"
\" + scheduler.locale.labels[buttons[i]] + \"
\";\r\n\t\t}\r\n\t\thtml += \"\";\r\n\t\thtml+=\"\";\r\n\t\td.innerHTML=html;\r\n\t\tif (scheduler.config.drag_lightbox){\r\n\t\t\tscheduler.event(d.firstChild, \"mousedown\", scheduler._ready_to_dnd);\r\n\t\t\tscheduler.event(d.firstChild, \"selectstart\", function(e){ \r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn false; \r\n\t\t\t});\r\n\t\t\td.firstChild.style.cursor = \"move\";\r\n\t\t\tscheduler._init_dnd_events();\r\n\r\n\t\t}\r\n\r\n\t\tthis._waiAria.lightboxAttr(d);\r\n\r\n\t\tthis.show_cover();\r\n\t\tthis._cover.insertBefore(d,this._cover.firstChild);\r\n\t\t\r\n\t\tthis._lightbox=d;\r\n\r\n\t\tvar sns=this.config.lightbox.sections;\r\n\t\thtml=\"\";\r\n\t\tfor (var i=0; i < sns.length; i++) {\r\n\t\t\tvar block=this.form_blocks[sns[i].type];\r\n\t\t\tif (!block) continue; //ignore incorrect blocks\r\n\t\t\tsns[i].id=\"area_\"+this.uid();\r\n\t\t\tvar button = \"\";\r\n\t\t\tif (sns[i].button){\r\n\t\t\t\tvar ariaAttr = scheduler._waiAria.lightboxSectionButtonAttrString(this.locale.labels[\"button_\"+sns[i].button]);\r\n\t\t\t\tbutton = \"
\"+this.locale.labels[\"button_\"+sns[i].button]+\"
\";\r\n\t\t\t}\r\n\r\n\t\t\tif (this.config.wide_form){\r\n\t\t\t\thtml+=\"
\";\r\n\t\t\t}\r\n\r\n\t\t\tvar label_name = this.locale.labels[\"section_\"+sns[i].name];\r\n\t\t\tif(typeof label_name !== \"string\"){\r\n\t\t\t\tlabel_name = sns[i].name;\r\n\t\t\t}\r\n\t\t\thtml+=\"
\"+button+ \"
\"+block.render.call(this,sns[i]);\r\n\t\t\thtml+=\"
\";\r\n\t\t}\r\n\r\n\t\tvar ds=d.getElementsByTagName(\"div\");\r\n\t\tfor (var i=0; i
 \r\n
\r\n
\r\n\r\n
`;\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._init_touch_events = function(){\r\n\tvar mobile = this.config.touch &&\r\n\t\t( ((navigator.userAgent.indexOf(\"Mobile\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"iPad\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"Android\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"Touch\")!=-1)) && !window.MSStream) ||\r\n\t\t\t((navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1));\r\n\r\n\tif(mobile){\r\n\t\tthis.xy.scroll_width = 0;\r\n\t\tthis._mobile = true;\r\n\t}\r\n\r\n\tif(this.config.touch){\r\n\r\n\t\tvar touchEventsSupported = true;\r\n\t\ttry {\r\n\t\t\tdocument.createEvent(\"TouchEvent\");\r\n\t\t} catch (e) {\r\n\t\t\ttouchEventsSupported = false;\r\n\t\t}\r\n\r\n\t\tif (touchEventsSupported) {\r\n\t\t\tthis._touch_events([\"touchmove\", \"touchstart\", \"touchend\"], function (ev) {\r\n\t\t\t\tif (ev.touches && ev.touches.length > 1) return null;\r\n\t\t\t\tif (ev.touches[0])\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\ttarget: ev.target,\r\n\t\t\t\t\t\tpageX: ev.touches[0].pageX,\r\n\t\t\t\t\t\tpageY: ev.touches[0].pageY,\r\n\t\t\t\t\t\tclientX: ev.touches[0].clientX,\r\n\t\t\t\t\t\tclientY: ev.touches[0].clientY\r\n\t\t\t\t\t};\r\n\t\t\t\telse\r\n\t\t\t\t\treturn ev;\r\n\t\t\t}, function () {\r\n\t\t\t\treturn false;\r\n\t\t\t});\r\n\t\t} else if (window.PointerEvent || window.navigator.pointerEnabled) {\r\n\t\t\tthis._touch_events([\"pointermove\", \"pointerdown\", \"pointerup\"], function (ev) {\r\n\t\t\t\tif (ev.pointerType == \"mouse\") return null;\r\n\t\t\t\treturn ev;\r\n\t\t\t}, function (ev) {\r\n\t\t\t\treturn (!ev || (ev.pointerType == \"mouse\" ));\r\n\t\t\t});\r\n\t\t} else if (window.navigator.msPointerEnabled) {\r\n\t\t\tthis._touch_events([\"MSPointerMove\", \"MSPointerDown\", \"MSPointerUp\"], function (ev) {\r\n\t\t\t\tif (ev.pointerType == ev.MSPOINTER_TYPE_MOUSE) return null;\r\n\t\t\t\treturn ev;\r\n\t\t\t}, function (ev) {\r\n\t\t\t\treturn (!ev || ev.pointerType == ev.MSPOINTER_TYPE_MOUSE);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n};\r\n\r\nscheduler._touch_events = function(names, accessor, ignore){\r\n\t//webkit on android need to be handled separately\r\n\t//var a_webkit = (navigator.userAgent.indexOf(\"Android\")!=-1) && (navigator.userAgent.indexOf(\"WebKit\")!=-1);\r\n\tvar source, tracker, timer, drag_mode, scroll_mode, action_mode;\r\n\tvar dblclicktime = 0;\r\n\r\n\tfunction attachTouchEvent(element, name, callback){\r\n\t\t//touch gestures must be disabled when ligthbox is opened\r\n\t\tscheduler.event(element, name, function(e){\r\n\t\t\tif(scheduler._is_lightbox_open()){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tif (ignore(e)) return;\r\n\t\t\t\treturn callback(e);\r\n\t\t\t}\r\n\t\t}, { passive: false });\r\n\t}\r\n\r\n\tfunction check_direction_swipe(s_ev, e_ev, step, max_dy){\r\n\t\tif (!s_ev || !e_ev) return false;\r\n\r\n\t\tvar t = s_ev.target;\r\n\t\twhile(t && t != scheduler._obj){\r\n\t\t\tt = t.parentNode;\r\n\t\t}\r\n\t\tif(t != scheduler._obj){\r\n\t\t\t//swipe outside scheduler\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// ignore swipe in horizontal timeline\r\n\t\tif(scheduler.matrix && scheduler.matrix[scheduler.getState().mode]){\r\n\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\tif(timeline.scrollable){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar dy = Math.abs(s_ev.pageY - e_ev.pageY);\r\n\t\tvar dx = Math.abs(s_ev.pageX - e_ev.pageX);\r\n\t\tif (dy < max_dy && dx>step && (!dy || (dx/dy > 3))){\r\n\t\t\tif (s_ev.pageX > e_ev.pageX) {\r\n\t\t\t\tscheduler._click.dhx_cal_next_button();\r\n\t\t\t}else {\r\n\t\t\t\tscheduler._click.dhx_cal_prev_button();\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n\tfunction doMouseMove(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tvar dnd = scheduler.getState().drag_mode,\r\n\t\t\ttimeline = scheduler.matrix ? scheduler.matrix[scheduler._mode] : false;\r\n\r\n\t\tvar original_render = scheduler.render_view_data;\r\n\t\tif(dnd == 'create' && timeline){\r\n\t\t\t//suppress full redraw of timeline on creating event\r\n\t\t\tscheduler.render_view_data = function() {\r\n\t\t\t\tvar id = scheduler.getState().drag_id;\r\n\t\t\t\tvar ev = scheduler.getEvent(id);\r\n\t\t\t\tvar property = timeline.y_property;\r\n\r\n\t\t\t\tvar evs = scheduler.getEvents(ev.start_date, ev.end_date);\r\n\t\t\t\tfor(var i = 0; i < evs.length; i++){\r\n\t\t\t\t\tif(evs[i][property] != ev[property]){\r\n\t\t\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tev._sorder = evs.length - 1;\r\n\t\t\t\tev._count = evs.length;\r\n\r\n\t\t\t\tthis.render_data([ev], scheduler.getState().mode);\r\n\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\tscheduler._on_mouse_move(e);\r\n\r\n\t\tif(dnd == 'create' && timeline){\r\n\t\t\tscheduler.render_view_data = original_render;\r\n\t\t}\r\n\r\n\t\tif (e.preventDefault)\r\n\t\t\te.preventDefault();\r\n\t\te.cancelBubble = true;\r\n\t\treturn false;\r\n\t}\r\n\r\n\t// touchmove\r\n\tattachTouchEvent(document.body, names[0], function(e){\r\n\t\tif (ignore(e)) return;\r\n\r\n\t\tvar acc = accessor(e);\r\n\t\tif(!acc) return;\r\n\t\tif (drag_mode){\r\n\t\t\tdoMouseMove(acc);\r\n\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._update_global_tip();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//if (tracker && a_webkit){\r\n\t\t//\tcheck_direction_swipe(tracker, accessor(e), 0);\r\n\t\t//}\r\n\r\n\t\ttracker = accessor(e);\r\n\t\t//ignore common and scrolling moves\r\n\t\tif (!action_mode) return;\r\n\r\n\t\t//multitouch\r\n\t\tif (!tracker){\r\n\t\t\tscroll_mode = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//target changed - probably in scroll mode\r\n\r\n\t\tif (source.target != tracker.target || (Math.abs(source.pageX - tracker.pageX) > 5) || (Math.abs(source.pageY - tracker.pageY) > 5)){\r\n\t\t\tscroll_mode = true;\r\n\t\t\tclearTimeout(timer);\r\n\t\t}\r\n\r\n\t});\r\n\r\n\t//attachTouchEvent(this._els[\"dhx_cal_data\"][0], \"scroll\", drag_cancel);\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], \"touchcancel\", drag_cancel);\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], \"contextmenu\", function(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tif (action_mode){\r\n\t\t\tif (e && e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t});\r\n\r\n\t// touchstart\r\n\tattachTouchEvent(this._obj, names[1], function(e){\r\n\t\t// block pull-to-refresh\r\n\t\tif(document && document.body){\r\n\t\t\tdocument.body.classList.add(\"dhx_cal_touch_active\");\r\n\t\t}\r\n\r\n\t\tif (ignore(e)) return;\r\n\t\tscheduler._pointerDragId = e.pointerId;\r\n\r\n\t\tvar fake_event;\r\n\t\tdrag_mode = scroll_mode = false;\r\n\t\taction_mode = true;\r\n\t\tfake_event = tracker = accessor(e);\r\n\r\n\t\tif (!fake_event){\r\n\t\t\tscroll_mode = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//dbl click\r\n\t\tvar now = new Date();\r\n\r\n\t\tif (!scroll_mode && !drag_mode && now - dblclicktime < 250){\r\n\t\t\tscheduler._click.dhx_cal_data(fake_event);\r\n\t\t\twindow.setTimeout(function(){\r\n\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t//fake_event.type = \"dblclick\";\r\n\t\t\t\tscheduler._on_dbl_click(fake_event);\r\n\t\t\t}, 50);\r\n\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._block_next_stop = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tdblclicktime = now;\r\n\r\n\t\t//drag\r\n\r\n\t\tif (scroll_mode || drag_mode || !scheduler.config.touch_drag)\r\n\t\t\treturn;\r\n\r\n\t\tvar actTask = scheduler._locate_event(document.activeElement);\r\n\t\tvar fakeTask = scheduler._locate_event(fake_event.target);\r\n\t\tvar sourceTask = source? scheduler._locate_event(source.target) : null;\r\n\r\n\t\tif(actTask && fakeTask && actTask == fakeTask && actTask != sourceTask)\r\n\t\t{\r\n\t\t\tif(e.preventDefault) {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\tscheduler._click.dhx_cal_data(fake_event);\r\n\t\t\tsource = fake_event;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//there is no target\r\n\t\ttimer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tdrag_mode = true;\r\n\t\t\tvar target = source.target;\r\n\t\t\tvar className = scheduler._getClassName(target);\r\n\t\t\tif (target && className.indexOf(\"dhx_body\") != -1)\r\n\t\t\t\ttarget = target.previousSibling;\r\n\r\n\t\t\tscheduler._on_mouse_down(source, target);\r\n\t\t\tif (scheduler._drag_mode && scheduler._drag_mode != \"create\"){\r\n\t\t\t\tscheduler.for_rendered(scheduler._drag_id, function(node, i) {\r\n\t\t\t\t\tnode.style.display='none';\r\n\t\t\t\t\tscheduler._rendered.splice(i, 1);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif (scheduler.config.touch_tip) {\r\n\t\t\t\tscheduler._show_global_tip();\r\n\t\t\t}\r\n\t\t\tscheduler.updateEvent(scheduler._drag_id);\r\n\t\t},scheduler.config.touch_drag);\r\n\r\n\t\tsource = fake_event;\r\n\t});\r\n\tfunction drag_cancel(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tscheduler._hide_global_tip();\r\n\t\tif (drag_mode){\r\n\t\t\tscheduler._on_mouse_up( accessor(e) );\r\n\t\t\tscheduler._temp_touch_block = false;\r\n\t\t}\r\n\t\tscheduler._drag_id = null;\r\n\t\tscheduler._drag_mode=null;\r\n\t\tscheduler._drag_pos=null;\r\n\t\tscheduler._pointerDragId = null;\r\n\t\tclearTimeout(timer);\r\n\t\tdrag_mode = action_mode = false;\r\n\t\tscroll_mode = true;\r\n\t}\r\n\r\n\t// touch end\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], names[2], function(e){\r\n\t\tif(document && document.body){\r\n\t\t\tdocument.body.classList.remove(\"dhx_cal_touch_active\");\r\n\t\t}\r\n\r\n\t\tif (ignore(e)) return;\r\n\r\n\t\tif(scheduler.config.touch_swipe_dates){\r\n\t\t\tif (!drag_mode && check_direction_swipe(source, tracker, 200, 100)) {\r\n\t\t\t\tscheduler._block_next_stop = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (drag_mode) {\r\n\t\t\tscheduler._ignore_next_click = true;\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\t}, 100);\r\n\t\t}\r\n\r\n\t\tdrag_cancel(e);\r\n\t\tif (scheduler._block_next_stop){\r\n\t\t\tscheduler._block_next_stop = false;\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler.event(document.body, names[2], drag_cancel);\r\n};\r\n\r\nscheduler._show_global_tip = function(){\r\n\tscheduler._hide_global_tip();\r\n\r\n\tvar toptip = scheduler._global_tip = document.createElement(\"div\");\r\n\ttoptip.className='dhx_global_tip';\r\n\r\n\tscheduler._update_global_tip(1);\r\n\r\n\tdocument.body.appendChild(toptip);\r\n};\r\nscheduler._update_global_tip = function(init){\r\n\tvar toptip = scheduler._global_tip;\r\n\tif (toptip){\r\n\t\tvar time = \"\";\r\n\t\tif (scheduler._drag_id && !init){\r\n\t\t\tvar ev = scheduler.getEvent(scheduler._drag_id);\r\n\t\t\tif (ev)\r\n\t\t\t\ttime = \"
\" + (ev._timed ? scheduler.templates.event_header(ev.start_date, ev.end_date, ev):scheduler.templates.day_date(ev.start_date, ev.end_date, ev)) + \"
\";\r\n\t\t}\r\n\r\n\t\tif (scheduler._drag_mode == \"create\" || scheduler._drag_mode == \"new-size\")\r\n\t\t\ttoptip.innerHTML = (scheduler.locale.labels.drag_to_create || \"Drag to create\")+time;\r\n\t\telse\r\n\t\t\ttoptip.innerHTML = (scheduler.locale.labels.drag_to_move || \"Drag to move\")+time;\r\n\t}\r\n};\r\nscheduler._hide_global_tip = function(){\r\n\tvar toptip = scheduler._global_tip;\r\n\tif (toptip && toptip.parentNode){\r\n\t\ttoptip.parentNode.removeChild(toptip);\r\n\t\tscheduler._global_tip = 0;\r\n\t}\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler.getRootView = function() {\r\n\treturn {\r\n\t\tview: {\r\n\t\t\trender: function(){\r\n\t\t\t\treturn {\r\n\t\t\t\t\ttag: \"div\",\r\n\t\t\t\t\ttype: 1,\r\n\t\t\t\t\tattrs: {\r\n\t\t\t\t\t\tstyle: \"width:100%;height:100%;\"\r\n\t\t\t\t\t},\r\n\t\t\t\t\thooks: {\r\n\t\t\t\t\t\t\"didInsert\": function(){\r\n\t\t\t\t\t\t\tscheduler.setCurrentView();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tbody: [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tel: this.el,\r\n\t\t\t\t\t\t\ttype: 1\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t};\r\n\t\t\t},\r\n\t\t\tinit: function(){\r\n\t\t\t\tvar container = document.createElement(\"DIV\");\r\n\t\t\t\tcontainer.id = \"scheduler_\"+ scheduler.uid();\r\n\t\t\t\tcontainer.style.width = \"100%\";\r\n\t\t\t\tcontainer.style.height = \"100%\";\r\n\t\t\t\tcontainer.classList.add(\"dhx_cal_container\");\r\n\t\t\t\tcontainer.cmp = \"grid\";\r\n\t\t\t\tcontainer.innerHTML = '
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
';\r\n\t\t\t\tscheduler.init(container);\r\n\r\n\t\t\t\tthis.el = container;\r\n\t\t\t}\r\n\t\t},\r\n\t\ttype: 4\r\n\t};\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._addThemeClass = function(){\r\n\tdocument.documentElement.setAttribute(\"data-scheduler-theme\", scheduler.skin);\r\n};\r\n\r\nscheduler._skin_settings = {\r\n\tfix_tab_position: [1,0],\r\n\tuse_select_menu_space: [1,0],\r\n\twide_form: [1,0],\r\n\r\n\thour_size_px: [44,42],\r\n\tdisplayed_event_color: [\"#ff4a4a\", \"ffc5ab\"],\r\n\tdisplayed_event_text_color: [\"#ffef80\", \"7e2727\"]\r\n};\r\n\r\nscheduler._skin_xy = {\r\n\tlightbox_additional_height: [90,50],\r\n\tnav_height: [59,22],\r\n\tbar_height: [24,20]\r\n};\r\n\r\n// material skin uses a different box sizing model than other skins, and also requires some post-processing.\r\n// In order to render events correctly, we need to know which box sizing model is used\r\n// We can detect it by styles applied, taking into account that styles may be loaded after scheduler is rendered\r\n\r\nscheduler._is_material_skin = function(){\r\n\tif(!scheduler.skin){\r\n\t\treturn checkIfMaterialSkin();\r\n\t}else{\r\n\t\treturn ((scheduler.skin + \"\").indexOf(\"material\") > -1);\r\n\t}\r\n};\r\n\r\nfunction themeNameFromFile(){\r\n\tvar links = document.getElementsByTagName(\"link\");\r\n\tfor (var i = 0; i < links.length; i++) {\r\n\t\tvar res = links[i].href.match(\"dhtmlxscheduler_([a-z]+).css\");\r\n\t\tif (res){\r\n\t\t\treturn res[1];\r\n\t\t}\r\n\t}\r\n}\r\n\r\nscheduler._build_skin_info = function() {\r\n\tmonitorThemeChange();\r\n\tconst styles = getComputedStyle(this.$container);\r\n\tconst themeVar = styles.getPropertyValue(\"--dhx-scheduler-theme\");\r\n\r\n\tlet isCssVarTheme = !!themeVar;\r\n\tlet themeName;\r\n\tlet cssValues = {};\r\n\tlet oldMaterialTheme = false;\r\n\r\n\tif(isCssVarTheme){\r\n\t\tthemeName = themeVar;\r\n\t\tfor(let i in scheduler.xy){\r\n\t\t\tcssValues[i] = styles.getPropertyValue(`--dhx-scheduler-xy-${i}`);\r\n\t\t}\r\n\r\n\t\tcssValues.hour_size_px = styles.getPropertyValue(`--dhx-scheduler-config-hour_size_px`);\r\n\t\tcssValues.wide_form = styles.getPropertyValue(`--dhx-scheduler-config-form_wide`);\r\n\r\n\t}else{\r\n\t\tthemeName = themeNameFromFile();\r\n\t\toldMaterialTheme = scheduler._is_material_skin();\r\n\t}\r\n\r\n\r\n\tscheduler._theme_info = {\r\n\t\ttheme: themeName,\r\n\t\tcssVarTheme: isCssVarTheme,\r\n\t\toldMaterialTheme: oldMaterialTheme,\r\n\t\tvalues: cssValues\r\n\t};\r\n\r\n\tif(scheduler._theme_info.cssVarTheme){\r\n\t\tconst themeVariables = this._theme_info.values;\r\n\t\tfor(let i in scheduler.xy){\r\n\t\t\tif(!isNaN(parseInt(themeVariables[i]))){\r\n\t\t\t\tscheduler.xy[i] = parseInt(themeVariables[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\n\r\nvar calculatedMaterial;\r\nfunction checkIfMaterialSkin(){\r\n\tif(calculatedMaterial === undefined){\r\n\t\tvar probe = document.createElement(\"div\");\r\n\t\tprobe.style.position = \"absolute\";\r\n\t\tprobe.style.left = \"-9999px\";\r\n\t\tprobe.style.top = \"-9999px\";\r\n\t\tprobe.innerHTML = \"
\" +\r\n\t\t\t\"
\" +\r\n\t\t\t\"
\"+\r\n\t\t\"
\";\r\n\t\tdocument.body.appendChild(probe);\r\n\t\tvar styles = window.getComputedStyle(probe.querySelector(\".dhx_cal_scale_placeholder\"));\r\n\t\tvar position = styles.getPropertyValue('position');\r\n\t\tif(position === \"absolute\"){\r\n\t\t\t// page has skins for placeholder element from material skin\r\n\t\t\tcalculatedMaterial = true;\r\n\t\t}else{\r\n\t\t\tcalculatedMaterial = false;\r\n\t\t}\r\n\r\n\t\tsetTimeout(function(){\r\n\t\t\tcalculatedMaterial = null;\r\n\t\t\tif(probe && probe.parentNode){\r\n\t\t\t\tprobe.parentNode.removeChild(probe);\r\n\t\t\t}\r\n\t\t}, 500);\r\n\t}\r\n\treturn calculatedMaterial;\r\n}\r\n\r\nvar cachedBorderBoxValue;\r\nfunction checkIfBorderBoxStyling(){\r\n\tif(scheduler._is_material_skin()){\r\n\t\treturn true;\r\n\t}else{\r\n\t\tif(cachedBorderBoxValue === undefined){\r\n\t\t\tvar probe = document.createElement(\"div\");\r\n\t\t\tprobe.style.position = \"absolute\";\r\n\t\t\tprobe.style.left = \"-9999px\";\r\n\t\t\tprobe.style.top = \"-9999px\";\r\n\t\t\tprobe.innerHTML = \"
\" +\r\n\t\t\t\t\"
\" +\r\n\t\t\t\t\t\"
\"+\r\n\t\t\t\t\"
\"+\r\n\t\t\t\"
\";\r\n\r\n\t\t\tdocument.body.appendChild(probe);\r\n\t\t\tvar styles = window.getComputedStyle(probe.querySelector(\".dhx_body\"));\r\n\t\t\tvar boxSizing = styles.getPropertyValue('box-sizing');\r\n\t\t\tdocument.body.removeChild(probe);\r\n\t\t\tcachedBorderBoxValue = !!(boxSizing === \"border-box\");\r\n\r\n\t\t\tif(!cachedBorderBoxValue){\r\n\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\tcachedBorderBoxValue = undefined;\r\n\t\t\t\t}, 1000);// recalculate in case scheduler initialized before skin is loaded\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\treturn cachedBorderBoxValue;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction refreshAfterLoad(){\r\n\tif(scheduler._is_material_skin() || scheduler._border_box_events()){\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar oldStyling = cachedBorderBoxValue;\r\n\tcachedBorderBoxValue = undefined;\r\n\tcalculatedMaterial = undefined;\r\n\tvar newStyling = checkIfBorderBoxStyling();\r\n\r\n\t// if box styling model changed - means scheduler was rendered before stylesheet was loaded or parsed inline\r\n\t// repaint scheduler in order to apply new styles\r\n\tif(oldStyling !== newStyling && scheduler.$container && scheduler.getState().mode){\r\n\t\tscheduler.setCurrentView();\r\n\t}\r\n}\r\nscheduler.event(window, 'DOMContentLoaded', refreshAfterLoad);\r\nscheduler.event(window, 'load', refreshAfterLoad);\r\n\r\nscheduler._border_box_events = function(){\r\n\treturn checkIfBorderBoxStyling();\r\n};\r\n\r\nscheduler._configure = function(col, data, skin){\r\n\tfor (var key in data)\r\n\t\tif (typeof col[key] == \"undefined\")\r\n\t\t\tcol[key] = data[key][skin];\r\n};\r\n\r\nscheduler.setSkin = function(value){\r\n\tthis.skin = value;\r\n\tscheduler._addThemeClass();\r\n\tif(scheduler.$container){\r\n\t\tthis._skin_init();\r\n\t\tthis.render();\r\n\t}\r\n\t\r\n\t//\r\n};\r\n\r\nfunction flatSkinHourScale(date){\r\n\tvar min = date.getMinutes();\r\n\tmin = min < 10 ? \"0\"+min : min;\r\n\tvar html = \"\"+ date.getHours() +\"\"+\r\n\t\t\" \"+ min +\"\";\r\n\treturn html;\r\n}\r\n\r\nlet monitorIntervalId = null;\r\nfunction monitorThemeChange(){\r\n\tconst container = scheduler.$container;\r\n\t\r\n\tclearInterval(monitorIntervalId);\r\n\tif(container){\r\n\t\tmonitorIntervalId = setInterval(() => {\r\n\t\t\tconst csstheme = getComputedStyle(container).getPropertyValue('--dhx-scheduler-theme');\r\n\t\t\tif(csstheme && csstheme !== scheduler.skin){\r\n\t\t\t\tscheduler.setSkin(csstheme);\r\n\t\t\t}\r\n\r\n\t\t}, 100);\r\n\t}\r\n}\r\nscheduler.attachEvent(\"onDestroy\", function(){\r\n\tclearInterval(monitorIntervalId);\r\n});\r\n\r\nscheduler._skin_init = function(){\r\n\tthis._build_skin_info();\r\n\r\n\tif (!this.skin){\r\n\t\tthis.skin = this._theme_info.theme;\r\n\t}\r\n\tscheduler._addThemeClass();\r\n\tif (scheduler.skin === \"flat\"){\r\n\t\t// scheduler.xy.scale_height = 35;\r\n\t\tscheduler.templates.hour_scale = flatSkinHourScale;\r\n\t}else if (scheduler.templates.hour_scale === flatSkinHourScale){\r\n\t\tscheduler.templates.hour_scale = scheduler.date.date_to_str(scheduler.config.hour_date);\r\n\t}\r\n\r\n\r\n\r\n\t//scheduler._lightbox_template=\"
 
\";\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\r\n\t\tvar date_to_str = scheduler.date.date_to_str(\"%d\");\r\n\t\tif(!scheduler.templates._old_month_day){\r\n\t\t\tscheduler.templates._old_month_day = scheduler.templates.month_day;\r\n\t\t}\r\n\t\tvar old_month_day = scheduler.templates._old_month_day;\r\n\t\tscheduler.templates.month_day = function(date) {\r\n\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\tvar label = date_to_str(date);\r\n\t\t\t\tif (date.getDate() == 1) {\r\n\t\t\t\t\tlabel = scheduler.locale.date.month_full[date.getMonth()] + \" \" + label;\r\n\t\t\t\t}\r\n\t\t\t\tif (+date == +scheduler.date.date_part(this._currentDate())) {\r\n\t\t\t\t\tlabel = scheduler.locale.labels.dhx_cal_today_button + \" \" + label;\r\n\t\t\t\t}\r\n\t\t\t\treturn label;\r\n\t\t\t} else {\r\n\t\t\t\treturn old_month_day.call(this, date);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t// tab classes\r\n\t\tif(scheduler.config.fix_tab_position){\r\n\t\t\tconst tabs = scheduler._els[\"dhx_cal_navline\"][0].querySelectorAll('[data-tab]');\r\n\t\t\ttabs.forEach((tab) => {\r\n\t\t\t\tconst view = tab.getAttribute(\"data-tab\") || tab.getAttribute(\"name\");\r\n\r\n\t\t\t\tswitch (view) {\r\n\t\t\t\t\tcase \"day\":\r\n\t\t\t\t\tcase \"day_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_first\");\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"week\":\r\n\t\t\t\t\tcase \"week_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"month\":\r\n\t\t\t\t\tcase \"month_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_last\");\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_standalone\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\treorderTabs(scheduler._els[\"dhx_cal_navline\"][0]);\r\n\r\n\t\t}\r\n\t}, {once: true});\r\n\r\n\tfunction reorderTabs(container) {\r\n\t\t// segmented tabs should go first\r\n\r\n\t\tif(scheduler.config.header){\r\n\t\t\treturn;\r\n\t\t\t// don't reorder tabs if header is defined via config\r\n\t\t}\r\n\t\tconst tabs = Array.from(container.querySelectorAll('.dhx_cal_tab'));\r\n\t\r\n\t\t// segmented tabs\r\n\t\tconst order = ['day', 'week', 'month'];\r\n\t\r\n\t\tconst specialTabs = order.map(tabName => \r\n\t\t\ttabs.find(tab => tab.getAttribute('data-tab') === tabName)\r\n\t\t).filter(tab => tab !== undefined);\r\n\t\r\n\t\tlet firstTab = tabs.length > 0 ? tabs[0] : null;\r\n\r\n\t\tspecialTabs.reverse().forEach(tab => {\r\n\t\t\tcontainer.insertBefore(tab, firstTab);\r\n\t\t\tfirstTab = tab;\r\n\t\t});\r\n\t}\r\n\r\n\t// scheduler._skin_init = function(){\r\n\t// \tthis._build_skin_info();\r\n\t// \tthis.skin = this._theme_info.theme;\r\n\t// };\r\n};\r\n\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nif (window.jQuery){\r\n\r\n(function( $ ){\r\n\tvar counter = 0;\r\n\tvar methods = [];\r\n\t$.fn.dhx_scheduler = function(config){\r\n\t\tif (typeof(config) === 'string') {\r\n\t\t\tif (methods[config] ) {\r\n\t\t\t\treturn methods[config].apply(this, []);\r\n\t\t\t}else {\r\n\t\t\t\t$.error('Method ' + config + ' does not exist on jQuery.dhx_scheduler');\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tvar views = [];\r\n\t\t\tthis.each(function() {\r\n\t\t\t\tif (this && this.getAttribute){\r\n\t\t\t\t\tif (!this.getAttribute(\"dhxscheduler\")){\r\n\t\t\t\t\t\tvar name = \"scheduler\";\r\n\t\t\t\t\t\tif (counter){\r\n\t\t\t\t\t\t\tname = \"scheduler\" + (counter+1);\r\n\t\t\t\t\t\t\twindow[name] = Scheduler.getSchedulerInstance();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tvar comp = window[name];\r\n\r\n\t\t\t\t\t\tthis.setAttribute(\"dhxscheduler\", name);\r\n\t\t\t\t\t\tfor (var key in config)\r\n\t\t\t\t\t\t\tif (key!=\"data\")\r\n\t\t\t\t\t\t\t\tcomp.config[key] = config[key];\r\n\r\n\t\t\t\t\t\tif (!this.getElementsByTagName(\"div\").length){\r\n\t\t\t\t\t\t\tthis.innerHTML = '
';\r\n\t\t\t\t\t\t\tthis.className += \" dhx_cal_container\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcomp.init(this, comp.config.date, comp.config.mode);\r\n\t\t\t\t\t\tif (config.data)\r\n\t\t\t\t\t\t\tcomp.parse(config.data);\r\n\r\n\t\t\t\t\t\tviews.push(comp);\r\n\t\t\t\t\t\tcounter++;\r\n\t\t\t\t\t} else\r\n\t\t\t\t\t\tviews.push(window[this.getAttribute(\"dhxscheduler\")]);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif (views.length === 1) return views[0];\r\n\t\t\treturn views;\r\n\t\t}\r\n\t};\r\n\r\n\r\n\r\n\r\n})(window.jQuery);\r\n\r\n}\r\n\r\n}","import global from \"../global\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\n(function(){\r\n\r\n\tvar setCurrentView = scheduler.setCurrentView,\r\n\t\tupdateView = scheduler.updateView;\r\n\tvar update_view_timer = null,\r\n\t\tcurr_view_timer = null;\r\n\r\n\tvar lazy_setCurrentView = function(date, mode){\r\n\t\tvar self = this;\r\n\t\tglobal.clearTimeout(curr_view_timer);\r\n\t\tglobal.clearTimeout(update_view_timer);\r\n\r\n\t\tvar oldDate = self._date,\r\n\t\t\toldMode = self._mode;\r\n\t\tupdateFlags(this, date, mode);\r\n\r\n\t\tcurr_view_timer = setTimeout(function(){\r\n\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif (!self.callEvent(\"onBeforeViewChange\", [oldMode, oldDate, mode || self._mode, date || self._date])){\r\n\t\t\t\tupdateFlags(self, oldDate, oldMode);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tupdateView.call(self, date, mode);\r\n\t\t\tself.callEvent(\"onViewChange\", [self._mode, self._date]);\r\n\r\n\t\t\tglobal.clearTimeout(update_view_timer);\r\n\t\t\tcurr_view_timer = 0;\r\n\t\t}, scheduler.config.delay_render);\r\n\t};\r\n\tvar lazy_updateView = function(date, mode){\r\n\t\tvar self = this,\r\n\t\t\tars = arguments;\r\n\r\n\t\tupdateFlags(this, date, mode);\r\n\r\n\t\tglobal.clearTimeout(update_view_timer);\r\n\t\tupdate_view_timer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif(curr_view_timer)\r\n\t\t\t\treturn;\r\n\r\n\t\t\tupdateView.apply(self, ars);\r\n\t\t}, scheduler.config.delay_render);\r\n\t};\r\n\tfunction updateFlags(scheduler, date, mode){\r\n\t\tif(date)\r\n\t\t\tscheduler._date = date;\r\n\t\tif(mode)\r\n\t\t\tscheduler._mode = mode;\r\n\r\n\t}\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\tif(scheduler.config.delay_render){\r\n\t\t\tscheduler.setCurrentView = lazy_setCurrentView;\r\n\t\t\tscheduler.updateView = lazy_updateView;\r\n\t\t}else{\r\n\t\t\tscheduler.setCurrentView = setCurrentView;\r\n\t\t\tscheduler.updateView = updateView;\r\n\t\t}\r\n\t});\r\n\r\n})();\r\n\r\n}","export default function DataProcessorEvents(scheduler, dp){\r\n\tthis.$scheduler = scheduler;\r\n\tthis.$dp = dp;\r\n\tthis._dataProcessorHandlers = [];\r\n\r\n\tthis.attach = function () {\r\n\t\tvar dp = this.$dp;\r\n\t\tvar scheduler = this.$scheduler;\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onEventAdded\", function(id) {\r\n\t\t\tif (!this._loading && this._validId(id))\r\n\t\t\tdp.setUpdated(id,true,\"inserted\");\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onConfirmedBeforeEventDelete\", function(id) {\r\n\t\t\tif (!this._validId(id)) return;\r\n\t\t\tvar z=dp.getState(id);\r\n\r\n\t\t\tif (z==\"inserted\" || this._new_event) { dp.setUpdated(id,false); return true; }\r\n\t\t\tif (z==\"deleted\") return false;\r\n\t\t\tif (z==\"true_deleted\") return true;\r\n\r\n\t\t\tdp.setUpdated(id,true,\"deleted\");\r\n\t\t\treturn false;\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onEventChanged\", function(id) { \r\n\t\t\tif (!this._loading && this._validId(id))\r\n\t\t\tdp.setUpdated(id,true,\"updated\");\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onClearAll\", function() { \r\n\t\t\t// clear dataprocessor state when scheduler is reset\r\n\t\t\tdp._in_progress={};\r\n\t\t\tdp._invalid={};\r\n\t\t\tdp.updatedRows = [];\r\n\t\t\tdp._waitMode = 0;\r\n\t\t}));\r\n\r\n\t\tdp.attachEvent(\"insertCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"updateCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"deleteCallback\", function(upd, id) {\r\n\t\t\tif (scheduler.getEvent(id)){\r\n\t\t\t\tscheduler.setUserData(id, this.action_param, \"true_deleted\");\r\n\t\t\t\tscheduler.deleteEvent(id);\r\n\t\t\t} else if (scheduler._add_rec_marker)\r\n\t\t\t\tscheduler._update_callback(upd, id);\r\n\t\t});\r\n\t};\r\n\r\n\tthis.detach = function () {\r\n\t\tfor (var key in this._dataProcessorHandlers) {\r\n\t\t\tvar handler = this._dataProcessorHandlers[key];\r\n\t\t\tthis.$scheduler.detachEvent(handler);\r\n\t\t}\r\n\t\tthis._dataProcessorHandlers = [];\r\n\t};\r\n}\r\n\r\nexport function extendScheduler(scheduler, dp){\r\n\tscheduler._validId=function(id){\r\n\t\tif(this._is_virtual_event){\r\n\t\t\treturn !this._is_virtual_event(id);\r\n\t\t}\r\n\t\treturn true;\r\n\t};\r\n\tscheduler.setUserData=function(id,name,value){\r\n\t\tif (id){\r\n\t\t\tvar ev = this.getEvent(id);\r\n\t\t\tif(ev) ev[name]=value;\r\n\t\t}else{\r\n\t\t\tthis._userdata[name]=value;\r\n\t\t}\r\n\t};\r\n\tscheduler.getUserData=function(id,name){\r\n\t\tif (id){\r\n\t\t\tvar ev = this.getEvent(id);\r\n\t\t\tif(ev)\r\n\t\t\t\treturn ev[name];\r\n\t\t\telse\r\n\t\t\t\treturn null;\r\n\t\t}else{\r\n\t\t\treturn this._userdata[name];\r\n\t\t}\r\n\t};\r\n\tscheduler._set_event_text_style=function(id,style){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\t\tthis.for_rendered(id,function(r){\r\n\t\t\tr.style.cssText+=\";\"+style;\r\n\t\t});\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tev[\"_text_style\"]=style;\r\n\t\tthis.event_updated(ev);\r\n\t};\r\n\tscheduler._update_callback = function(upd,id){\r\n\t\tvar data = scheduler._xmlNodeToJSON(upd.firstChild);\r\n\t\t//fix for updates of recurring events\r\n\t\tif (data.rec_type == \"none\") data.rec_pattern = \"none\";\r\n\t\tdata.text = data.text||data._tagvalue;\r\n\t\tdata.start_date = scheduler._helpers.parseDate(data.start_date);\r\n\t\tdata.end_date = scheduler._helpers.parseDate(data.end_date);\r\n\t\tscheduler.addEvent(data);\r\n\t\tif (scheduler._add_rec_marker)\r\n\t\t\tscheduler.setCurrentView();\r\n\t};\r\n\tscheduler._dp_change_event_id = function(id, new_id){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\t\tscheduler.changeEventId(id, new_id);\r\n\t};\r\n\tscheduler._dp_hook_delete = function(id, new_id){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\r\n\t\tif(new_id && id != new_id){\r\n\t\t\tif(this.getUserData(id, dp.action_param) == \"true_deleted\")\r\n\t\t\t\tthis.setUserData(id, dp.action_param, \"updated\");\r\n\r\n\t\t\tthis.changeEventId(id, new_id);\r\n\t\t}\r\n\t\treturn this.deleteEvent(new_id, true);\r\n\t};\r\n\r\n\tscheduler.setDp = function() {\r\n\t\tthis._dp = dp;\r\n\t};\r\n\tscheduler.setDp();\r\n}","import DataProcessorEvents from \"./dataprocessor_hooks\";\r\nimport { extendScheduler } from \"./dataprocessor_hooks\";\r\nimport eventable from \"../../utils/eventable\";\r\nimport global from \"../../global\";\r\n\r\n/**\r\n *\t@desc: constructor, data processor object\r\n *\t@param: serverProcessorURL - url used for update\r\n *\t@type: public\r\n */\r\nexport function DataProcessor(serverProcessorURL){\r\n\tthis.serverProcessor = serverProcessorURL;\r\n\tthis.action_param = \"!nativeeditor_status\";\r\n\r\n\tthis.object = null;\r\n\tthis.updatedRows = []; // ids of updated rows\r\n\r\n\tthis.autoUpdate = true;\r\n\tthis.updateMode = \"cell\";\r\n\tthis._tMode = \"GET\";\r\n\tthis._headers = null;\r\n\tthis._payload = null;\r\n\tthis.post_delim = \"_\";\r\n\r\n\tthis._waitMode = 0;\r\n\tthis._in_progress = {};\r\n\tthis._invalid = {};\r\n\tthis.messages = [];\r\n\r\n\tthis.styles = {\r\n\t\tupdated: \"font-weight:bold;\",\r\n\t\tinserted: \"font-weight:bold;\",\r\n\t\tdeleted: \"text-decoration : line-through;\",\r\n\t\tinvalid: \"background-color:FFE0E0;\",\r\n\t\tinvalid_cell: \"border-bottom:2px solid red;\",\r\n\t\terror: \"color:red;\",\r\n\t\tclear: \"font-weight:normal;text-decoration:none;\"\r\n\t};\r\n\tthis.enableUTFencoding(true);\r\n\teventable(this); // TODO: need to update\r\n\r\n\treturn this;\r\n}\r\nDataProcessor.prototype = {\r\n\tsetTransactionMode: function (mode, total) {\r\n\t\tif (typeof mode == \"object\") {\r\n\t\t\tthis._tMode = mode.mode || this._tMode;\r\n\r\n\t\t\tif (mode.headers !== undefined) {\r\n\t\t\t\tthis._headers = mode.headers;\r\n\t\t\t}\r\n\r\n\t\t\tif (mode.payload !== undefined) {\r\n\t\t\t\tthis._payload = mode.payload;\r\n\t\t\t}\r\n\t\t\tthis._tSend = !!total;\r\n\t\t} else {\r\n\t\t\tthis._tMode = mode;\r\n\t\t\tthis._tSend = total;\r\n\t\t}\r\n\r\n\t\tif (this._tMode == \"REST\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t}\r\n\r\n\t\tif (this._tMode === \"JSON\" || this._tMode === \"REST-JSON\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t\tthis._serializeAsJson = true;\r\n\t\t\tthis._headers = this._headers || {};\r\n\t\t\tthis._headers[\"Content-Type\"] = \"application/json\";\r\n\t\t}else{\r\n\t\t\tif(this._headers && !this._headers[\"Content-Type\"]){\r\n\t\t\t\tthis._headers[\"Content-Type\"] = \"application/x-www-form-urlencoded\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (this._tMode === \"CUSTOM\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t\tthis._router = mode.router;\r\n\t\t}\r\n\t},\r\n\tescape: function (data) {\r\n\t\tif (this._utf)\r\n\t\t\treturn encodeURIComponent(data);\r\n\t\telse\r\n\t\t\treturn escape(data);\r\n\t},\r\n\t/**\r\n\t *\t@desc: allows to set escaping mode\r\n\t *\t@param: true - utf based escaping, simple - use current page encoding\r\n\t *\t@type: public\r\n\t */\r\n\tenableUTFencoding: function (mode) {\r\n\t\tthis._utf = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: allows to define, which column may trigger update\r\n\t *\t@param: val - array or list of true/false values\r\n\t *\t@type: public\r\n\t */\r\n\tsetDataColumns: function (val) {\r\n\t\tthis._columns = (typeof val == \"string\") ? val.split(\",\") : val;\r\n\t},\r\n\t/**\r\n\t *\t@desc: get state of updating\r\n\t *\t@returns: true - all in sync with server, false - some items not updated yet.\r\n\t *\t@type: public\r\n\t */\r\n\tgetSyncState: function () {\r\n\t\treturn !this.updatedRows.length;\r\n\t},\r\n\t/**\r\n\t *\t@desc: enable/disable named field for data syncing, will use column ids for grid\r\n\t *\t@param: mode - true/false\r\n\t *\t@type: public\r\n\t */\r\n\tenableDataNames: function (mode) {\r\n\t\tthis._endnm = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: enable/disable mode , when only changed fields and row id send to the server side, instead of all fields in default mode\r\n\t *\t@param: mode - true/false\r\n\t *\t@type: public\r\n\t */\r\n\tenablePartialDataSend: function (mode) {\r\n\t\tthis._changed = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: set if rows should be send to server automatically\r\n\t *\t@param: mode - \"row\" - based on row selection changed, \"cell\" - based on cell editing finished, \"off\" - manual data sending\r\n\t *\t@type: public\r\n\t */\r\n\tsetUpdateMode: function (mode, dnd) {\r\n\t\tthis.autoUpdate = (mode == \"cell\");\r\n\t\tthis.updateMode = mode;\r\n\t\tthis.dnd = dnd;\r\n\t},\r\n\tignore: function (code, master) {\r\n\t\tthis._silent_mode = true;\r\n\t\tcode.call(master || window);\r\n\t\tthis._silent_mode = false;\r\n\t},\r\n\t/**\r\n\t *\t@desc: mark row as updated/normal. check mandatory fields,initiate autoupdate (if turned on)\r\n\t *\t@param: rowId - id of row to set update-status for\r\n\t *\t@param: state - true for \"updated\", false for \"not updated\"\r\n\t *\t@param: mode - update mode name\r\n\t *\t@type: public\r\n\t */\r\n\tsetUpdated: function (rowId, state, mode) {\r\n\t\tif (this._silent_mode) return;\r\n\t\tvar ind = this.findRow(rowId);\r\n\r\n\t\tmode = mode || \"updated\";\r\n\t\tvar existing = this.$scheduler.getUserData(rowId, this.action_param);\r\n\t\tif (existing && mode == \"updated\") mode = existing;\r\n\t\tif (state) {\r\n\t\t\tthis.set_invalid(rowId, false); //clear previous error flag\r\n\t\t\tthis.updatedRows[ind] = rowId;\r\n\t\t\tthis.$scheduler.setUserData(rowId, this.action_param, mode);\r\n\t\t\tif (this._in_progress[rowId])\r\n\t\t\t\tthis._in_progress[rowId] = \"wait\";\r\n\t\t} else {\r\n\t\t\tif (!this.is_invalid(rowId)) {\r\n\t\t\t\tthis.updatedRows.splice(ind, 1);\r\n\t\t\t\tthis.$scheduler.setUserData(rowId, this.action_param, \"\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.markRow(rowId, state, mode);\r\n\t\tif (state && this.autoUpdate) this.sendData(rowId);\r\n\t},\r\n\r\n\tmarkRow: function (id, state, mode) {\r\n\t\tvar str = \"\";\r\n\t\tvar invalid = this.is_invalid(id);\r\n\t\tif (invalid) {\r\n\t\t\tstr = this.styles[invalid];\r\n\t\t\tstate = true;\r\n\t\t}\r\n\t\tif (this.callEvent(\"onRowMark\", [id, state, mode, invalid])) {\r\n\t\t\t//default logic\r\n\t\t\tstr = this.styles[state ? mode : \"clear\"] + str;\r\n\r\n\t\t\tthis.$scheduler[this._methods[0]](id, str);\r\n\r\n\t\t\tif (invalid && invalid.details) {\r\n\t\t\t\tstr += this.styles[invalid + \"_cell\"];\r\n\t\t\t\tfor (var i = 0; i < invalid.details.length; i++)\r\n\t\t\t\t\tif (invalid.details[i])\r\n\t\t\t\t\t\tthis.$scheduler[this._methods[1]](id, i, str);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tgetActionByState: function(state) {\r\n\t\tif (state === \"inserted\") {\r\n\t\t\treturn \"create\";\r\n\t\t}\r\n\t\tif (state === \"updated\") {\r\n\t\t\treturn \"update\";\r\n\t\t}\r\n\t\tif (state === \"deleted\") {\r\n\t\t\treturn \"delete\";\r\n\t\t}\r\n\t\treturn \"update\";\r\n\t},\r\n\r\n\tgetState: function (id) {\r\n\t\treturn this.$scheduler.getUserData(id, this.action_param);\r\n\t},\r\n\tis_invalid: function (id) {\r\n\t\treturn this._invalid[id];\r\n\t},\r\n\tset_invalid: function (id, mode, details) {\r\n\t\tif (details) mode = {\r\n\t\t\tvalue: mode, details: details, toString: function () {\r\n\t\t\t\treturn this.value.toString();\r\n\t\t\t}\r\n\t\t};\r\n\t\tthis._invalid[id] = mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: check mandatory fields and varify values of cells, initiate update (if specified)\r\n\t *\t@param: rowId - id of row to set update-status for\r\n\t *\t@type: public\r\n\t */\r\n\tcheckBeforeUpdate: function (rowId) {\r\n\t\treturn true;\r\n\t},\r\n\t/**\r\n\t *\t@desc: send row(s) values to server\r\n\t *\t@param: rowId - id of row which data to send. If not specified, then all \"updated\" rows will be send\r\n\t *\t@type: public\r\n\t */\r\n\tsendData: function (rowId) {\r\n\t\tif (this.$scheduler.editStop) this.$scheduler.editStop();\r\n\r\n\t\tif (typeof rowId == \"undefined\" || this._tSend) return this.sendAllData();\r\n\t\tif (this._in_progress[rowId]) return false;\r\n\r\n\t\tthis.messages = [];\r\n\t\tif (!this.checkBeforeUpdate(rowId) && this.callEvent(\"onValidationError\", [rowId, this.messages])) return false;\r\n\t\tthis._beforeSendData(this._getRowData(rowId), rowId);\r\n\t},\r\n\t_beforeSendData: function (data, rowId) {\r\n\t\tif (!this.callEvent(\"onBeforeUpdate\", [rowId, this.getState(rowId), data])) return false;\r\n\t\tthis._sendData(data, rowId);\r\n\t},\r\n\tserialize: function (data, id) {\r\n\t\tif (this._serializeAsJson) {\r\n\t\t\treturn this._serializeAsJSON(data);\r\n\t\t}\r\n\r\n\t\tif (typeof data == \"string\")\r\n\t\t\treturn data;\r\n\t\tif (typeof id != \"undefined\")\r\n\t\t\treturn this.serialize_one(data, \"\");\r\n\t\telse {\r\n\t\t\tvar stack = [];\r\n\t\t\tvar keys = [];\r\n\t\t\tfor (var key in data)\r\n\t\t\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\t\t\tstack.push(this.serialize_one(data[key], key + this.post_delim));\r\n\t\t\t\t\tkeys.push(key);\r\n\t\t\t\t}\r\n\t\t\tstack.push(\"ids=\" + this.escape(keys.join(\",\")));\r\n\t\t\tif (this.$scheduler.security_key)\r\n\t\t\t\tstack.push(\"dhx_security=\" + (this.$scheduler.security_key));\r\n\t\t\treturn stack.join(\"&\");\r\n\t\t}\r\n\t},\r\n\tserialize_one: function (data, pref) {\r\n\t\tif (typeof data == \"string\")\r\n\t\t\treturn data;\r\n\t\tvar stack = [];\r\n\t\tvar serialized = \"\";\r\n\t\tfor (var key in data)\r\n\t\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\t\tif ((key == \"id\" || key == this.action_param) && this._tMode == \"REST\") continue;\r\n\t\t\t\tif (typeof data[key] === \"string\" || typeof data[key] === \"number\") {\r\n\t\t\t\t\tserialized = data[key];\r\n\t\t\t\t} else {\r\n\t\t\t\t\tserialized = JSON.stringify(data[key]);\r\n\t\t\t\t}\r\n\t\t\t\tstack.push(this.escape((pref || \"\") + key) + \"=\" + this.escape(serialized));\r\n\t\t\t}\r\n\t\treturn stack.join(\"&\");\r\n\t},\r\n\t_applyPayload: function (url) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tif (this._payload)\r\n\t\t\tfor (var key in this._payload)\r\n\t\t\t\turl = url + ajax.urlSeparator(url) + this.escape(key) + \"=\" + this.escape(this._payload[key]);\r\n\t\treturn url;\r\n\t},\r\n\t_sendData: function (dataToSend, rowId) {\r\n\t\tif (!dataToSend) {\r\n\t\t\treturn; // nothing to send\r\n\t\t}\r\n\t\tif (!this.callEvent(\"onBeforeDataSending\", rowId ? [rowId, this.getState(rowId), dataToSend] : [null, null, dataToSend])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (rowId) {\r\n\t\t\tthis._in_progress[rowId] = (new Date()).valueOf();\r\n\t\t}\r\n\r\n\t\tvar self = this;\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\r\n\t\tif (this._tMode === \"CUSTOM\") {\r\n\t\t\tvar state = this.getState(rowId);\r\n\t\t\tvar action = this.getActionByState(state);\r\n\t\t\tvar _onResolvedCreateUpdate = function (tag) {\r\n\t\t\t\tvar resultState = state;\r\n\t\t\t\tif(tag && tag.responseText && tag.setRequestHeader){\r\n\t\t\t\t\tif(tag.status !== 200){\r\n\t\t\t\t\t\tresultState = \"error\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\ttag = JSON.parse(tag.responseText);\r\n\t\t\t\t\t} catch (e){}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tresultState = resultState || \"updated\";\r\n\t\t\t\tvar sid = rowId;\r\n\t\t\t\tvar tid = rowId;\r\n\r\n\t\t\t\tif (tag) {\r\n\t\t\t\t\tresultState = tag.action || resultState;\r\n\t\t\t\t\tsid = tag.sid || sid;\r\n\t\t\t\t\ttid = tag.id || tag.tid || tid;\r\n\t\t\t\t}\r\n\t\t\t\tself.afterUpdateCallback(sid, tid, resultState, tag);\r\n\t\t\t};\r\n\r\n\t\t\tconst routerMode = \"event\";\r\n\t\t\tvar actionPromise;\r\n\t\t\tif (this._router instanceof Function) {\r\n\t\t\t\tactionPromise = this._router(routerMode, action, dataToSend, rowId);\r\n\t\t\t} else {\r\n\t\t\t\tswitch (state) {\r\n\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].create(dataToSend);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].delete(rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].update(dataToSend, rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(actionPromise){\r\n\t\t\t\t// neither promise nor {tid: newId} response object\r\n\t\t\t\tif(!actionPromise.then &&\r\n\t\t\t\t\t(actionPromise.id === undefined && actionPromise.tid === undefined && actionPromise.action === undefined)){\r\n\t\t\t\t\tthrow new Error(\"Incorrect router return value. A Promise or a response object is expected\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(actionPromise.then){\r\n\t\t\t\t\tactionPromise.then(_onResolvedCreateUpdate).catch(function(error) {\r\n\t\t\t\t\t\tif(error && error.action){\r\n\t\t\t\t\t\t\t_onResolvedCreateUpdate(error);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t_onResolvedCreateUpdate({ action: \"error\", value: error});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// custom method may return a response object in case of sync action\r\n\t\t\t\t\t_onResolvedCreateUpdate(actionPromise);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t_onResolvedCreateUpdate(null);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar queryParams = {\r\n\t\t\tcallback: function(xml) {\r\n\t\t\t\tvar ids = [];\r\n\r\n\t\t\t\tif (rowId) {\r\n\t\t\t\t\tids.push(rowId);\r\n\t\t\t\t} else if (dataToSend) {\r\n\t\t\t\t\tfor (var key in dataToSend) {\r\n\t\t\t\t\t\tids.push(key);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.afterUpdate(self, xml, ids);\r\n\t\t\t},\r\n\t\t\theaders: self._headers\r\n\t\t};\r\n\r\n\t\tvar urlParams = this.serverProcessor + (this._user ? (ajax.urlSeparator(this.serverProcessor) + [\"dhx_user=\" + this._user, \"dhx_version=\" + this.$scheduler.getUserData(0, \"version\")].join(\"&\")) : \"\");\r\n\t\tvar url = this._applyPayload(urlParams);\r\n\t\tvar data;\r\n\r\n\t\tswitch (this._tMode) {\r\n\t\t\tcase \"GET\":\r\n\t\t\t\tdata = this._cleanupArgumentsBeforeSend(dataToSend);\r\n\t\t\t\tqueryParams.url = url + ajax.urlSeparator(url) + this.serialize(data, rowId);\r\n\t\t\t\tqueryParams.method = \"GET\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"POST\":\r\n\t\t\t\tdata = this._cleanupArgumentsBeforeSend(dataToSend);\r\n\t\t\t\tqueryParams.url = url;\r\n\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\tqueryParams.data = this.serialize(data, rowId);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"JSON\":\r\n\t\t\t\tdata = {};\r\n\t\t\t\tvar preprocessedData = this._cleanupItemBeforeSend(dataToSend);\r\n\t\t\t\tfor (var key in preprocessedData) {\r\n\t\t\t\t\tif (key === this.action_param || key === \"id\" || key === \"gr_id\") {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdata[key] = preprocessedData[key];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tqueryParams.url = url;\r\n\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\tqueryParams.data = JSON.stringify({\r\n\t\t\t\t\tid: rowId,\r\n\t\t\t\t\taction: dataToSend[this.action_param],\r\n\t\t\t\t\tdata: data\r\n\t\t\t\t});\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"REST\":\r\n\t\t\tcase \"REST-JSON\":\r\n\t\t\t\turl = urlParams.replace(/(&|\\?)editing=true/, \"\");\r\n\t\t\t\tdata = \"\";\r\n\r\n\t\t\t\tswitch (this.getState(rowId)) {\r\n\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\t\t\tqueryParams.data = this.serialize(dataToSend, rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\tqueryParams.method = \"DELETE\";\r\n\t\t\t\t\t\turl = url + (url.slice(-1) === \"/\" ? \"\" : \"/\") + rowId;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tqueryParams.method = \"PUT\";\r\n\t\t\t\t\t\tqueryParams.data = this.serialize(dataToSend, rowId);\r\n\t\t\t\t\t\turl = url + (url.slice(-1) === \"/\" ? \"\" : \"/\") + rowId;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tqueryParams.url = this._applyPayload(url);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tthis._waitMode++;\r\n\t\treturn ajax.query(queryParams);\r\n\t},\r\n\tsendAllData: function () {\r\n\t\tif (!this.updatedRows.length || this.updateMode === \"off\") { // FIXME: need to leave checking 'this.updateMode === \"off\"'?\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.messages = [];\r\n\t\tvar valid = true;\r\n\r\n\t\tthis._forEachUpdatedRow(function(rowId) {\r\n\t\t\tvalid = valid && this.checkBeforeUpdate(rowId);\r\n\t\t});\r\n\r\n\t\tif (!valid && !this.callEvent(\"onValidationError\", [\"\", this.messages])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (this._tSend) {\r\n\t\t\tthis._sendData(this._getAllData());\r\n\t\t} else {\r\n\t\t\tthis._forEachUpdatedRow(function(rowId) {\r\n\t\t\t\tif (!this._in_progress[rowId]) {\r\n\t\t\t\t\tif (this.is_invalid(rowId)) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis._beforeSendData(this._getRowData(rowId), rowId);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\r\n\t_getAllData: function (rowId) {\r\n\t\tvar out = {};\r\n\t\tvar has_one = false;\r\n\t\tthis._forEachUpdatedRow(function(id) {\r\n\t\t\tif (this._in_progress[id] || this.is_invalid(id)){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar row = this._getRowData(id);\r\n\t\t\tif (!this.callEvent(\"onBeforeUpdate\", [id, this.getState(id), row])) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tout[id] = row;\r\n\t\t\thas_one = true;\r\n\t\t\tthis._in_progress[id] = (new Date()).valueOf();\r\n\t\t});\r\n\t\treturn has_one ? out : null;\r\n\t},\r\n\r\n\tfindRow: function (pattern) {\r\n\t\tvar i = 0;\r\n\t\tfor (i = 0; i < this.updatedRows.length; i++)\r\n\t\t\tif (pattern == this.updatedRows[i]) break;\r\n\t\treturn i;\r\n\t},\r\n\r\n\t/**\r\n\t *\t@desc: define custom actions\r\n\t *\t@param: name - name of action, same as value of action attribute\r\n\t *\t@param: handler - custom function, which receives a XMl response content for action\r\n\t *\t@type: private\r\n\t */\r\n\tdefineAction: function (name, handler) {\r\n\t\tif (!this._uActions) this._uActions = {};\r\n\t\tthis._uActions[name] = handler;\r\n\t},\r\n\r\n\t/**\r\n\t *\t @desc: used in combination with setOnBeforeUpdateHandler to create custom client-server transport system\r\n\t *\t @param: sid - id of item before update\r\n\t *\t @param: tid - id of item after up0ate\r\n\t *\t @param: action - action name\r\n\t *\t @type: public\r\n\t *\t @topic: 0\r\n\t */\r\n\tafterUpdateCallback: function (sid, tid, action, btag) {\r\n\t\tif(!this.$scheduler){\r\n\t\t\t// destructor has been called before the callback\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar marker = sid;\r\n\t\tvar correct = (action !== \"error\" && action !== \"invalid\");\r\n\t\tif (!correct) {\r\n\t\t\tthis.set_invalid(sid, action);\r\n\t\t}\r\n\t\tif ((this._uActions) && (this._uActions[action]) && (!this._uActions[action](btag))) {\r\n\t\t\treturn (delete this._in_progress[marker]);\r\n\t\t}\r\n\r\n\t\tif (this._in_progress[marker] !== \"wait\") {\r\n\t\t\tthis.setUpdated(sid, false);\r\n\t\t}\r\n\r\n\t\tvar originalSid = sid;\r\n\r\n\t\tswitch (action) {\r\n\t\t\tcase \"inserted\":\r\n\t\t\tcase \"insert\":\r\n\t\t\t\tif (tid != sid) {\r\n\t\t\t\t\tthis.setUpdated(sid, false);\r\n\t\t\t\t\tthis.$scheduler[this._methods[2]](sid, tid);\r\n\t\t\t\t\tsid = tid;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"delete\":\r\n\t\t\tcase \"deleted\":\r\n\t\t\t\tthis.$scheduler.setUserData(sid, this.action_param, \"true_deleted\");\r\n\t\t\t\tthis.$scheduler[this._methods[3]](sid, tid);\r\n\t\t\t\tdelete this._in_progress[marker];\r\n\t\t\t\treturn this.callEvent(\"onAfterUpdate\", [sid, action, tid, btag]);\r\n\t\t}\r\n\r\n\t\tif (this._in_progress[marker] !== \"wait\") {\r\n\t\t\tif (correct) {\r\n\t\t\t\tthis.$scheduler.setUserData(sid, this.action_param, \"\");\r\n\t\t\t}\r\n\t\t\tdelete this._in_progress[marker];\r\n\t\t} else {\r\n\t\t\tdelete this._in_progress[marker];\r\n\t\t\tthis.setUpdated(tid, true, this.$scheduler.getUserData(sid, this.action_param));\r\n\t\t}\r\n\r\n\t\tthis.callEvent(\"onAfterUpdate\", [originalSid, action, tid, btag]);\r\n\t},\r\n\r\n\t_errorResponse: function (xml, id){\r\n\t\tif(this.$scheduler && this.$scheduler.callEvent){\r\n\t\t\tthis.$scheduler.callEvent(\"onSaveError\", [id, xml.xmlDoc]);\r\n\t\t}\r\n\t\treturn this.cleanUpdate(id);\r\n\t},\r\n\r\n\t_setDefaultTransactionMode: function () {\r\n\t\tif (this.serverProcessor) {\r\n\t\t\tthis.setTransactionMode(\"POST\", true);\r\n\t\t\tthis.serverProcessor += (this.serverProcessor.indexOf(\"?\") !== -1 ? \"&\" : \"?\") + \"editing=true\";\r\n\t\t\tthis._serverProcessor = this.serverProcessor;\r\n\t\t}\r\n\t},\r\n\t\r\n\t/**\r\n\t *\t@desc: response from server\r\n\t *\t@param: xml - XMLLoader object with response XML\r\n\t *\t@type: private\r\n\t */\r\n\tafterUpdate: function (that, xml, id) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\r\n\t\tif (xml.xmlDoc.status !== 200){\r\n\t\t\tthis._errorResponse(xml, id);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// try to use json first\r\n\t\tvar tag;\r\n\t\ttry {\r\n\t\t\ttag = JSON.parse(xml.xmlDoc.responseText);\r\n\t\t} catch (e) {\r\n\t\t\t// empty response also can be processed by json handler\r\n\t\t\tif (!xml.xmlDoc.responseText.length) {\r\n\t\t\t\ttag = {};\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (tag) {\r\n\t\t\tvar action = tag.action || this.getState(id) || \"updated\";\r\n\t\t\tvar sid = tag.sid || id[0];\r\n\t\t\tvar tid = tag.tid || id[0];\r\n\t\t\tthat.afterUpdateCallback(sid, tid, action, tag);\r\n\t\t\tthat.finalizeUpdate();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// xml response\r\n\t\tvar top = ajax.xmltop(\"data\", xml.xmlDoc); // fix incorrect content type in IE\r\n\t\tif (!top) {\r\n\t\t\treturn this._errorResponse(xml, id);\r\n\t\t}\r\n\t\tvar atag = ajax.xpath(\"//data/action\", top);\r\n\t\tif (!atag.length) {\r\n\t\t\treturn this._errorResponse(xml, id);\r\n\t\t}\r\n\r\n\t\tfor (var i = 0; i < atag.length; i++) {\r\n\t\t\tvar btag = atag[i];\r\n\t\t\tvar action = btag.getAttribute(\"type\");\r\n\t\t\tvar sid = btag.getAttribute(\"sid\");\r\n\t\t\tvar tid = btag.getAttribute(\"tid\");\r\n\r\n\t\t\tthat.afterUpdateCallback(sid, tid, action, btag);\r\n\t\t}\r\n\t\tthat.finalizeUpdate();\r\n\t},\r\n\tcleanUpdate: function (id) {\r\n\t\tif (id)\r\n\t\t\tfor (var i = 0; i < id.length; i++)\r\n\t\t\t\tdelete this._in_progress[id[i]];\r\n\t},\r\n\tfinalizeUpdate: function () {\r\n\t\tif (this._waitMode) this._waitMode--;\r\n\r\n\t\tthis.callEvent(\"onAfterUpdateFinish\", []);\r\n\t\tif (!this.updatedRows.length)\r\n\t\t\tthis.callEvent(\"onFullSync\", []);\r\n\t},\r\n\r\n\t/**\r\n\t *\t@desc: initializes data-processor\r\n\t *\t@param: scheduler - dhtmlxScheduler object to attach this data-processor to\r\n\t *\t@type: public\r\n\t */\r\n\tinit: function (scheduler) {\r\n\t\tif (this._initialized) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.$scheduler = scheduler;\r\n\t\tif (this.$scheduler._dp_init) {\r\n\t\t\tthis.$scheduler._dp_init(this);\r\n\t\t}\r\n\r\n\t\tthis._setDefaultTransactionMode();\r\n\r\n\t\tthis._methods=this._methods||[\"_set_event_text_style\",\"\",\"_dp_change_event_id\",\"_dp_hook_delete\"];\r\n\t\textendScheduler(this.$scheduler, this);\r\n\t\tvar dataProcessorEvents = new DataProcessorEvents(this.$scheduler, this);\r\n\t\tdataProcessorEvents.attach();\r\n\t\tthis.attachEvent(\"onDestroy\", function() {\r\n\t\t\tdelete this._getRowData;\r\n\r\n\t\t\tdelete this.$scheduler._dp;\r\n\t\t\tdelete this.$scheduler._dataprocessor;\r\n\t\t\tdelete this.$scheduler._set_event_text_style;\r\n\t\t\tdelete this.$scheduler._dp_change_event_id;\r\n\t\t\tdelete this.$scheduler._dp_hook_delete;\r\n\t\t\tdelete this.$scheduler;\r\n\t\t\tdataProcessorEvents.detach();\r\n\t\t});\r\n\t\tthis.$scheduler.callEvent(\"onDataProcessorReady\", [this]);\r\n\t\tthis._initialized = true;\r\n\r\n\t\tscheduler._dataprocessor=this;\r\n\t},\r\n\r\n\tsetOnAfterUpdate: function (ev) {\r\n\t\tthis.attachEvent(\"onAfterUpdate\", ev);\r\n\t},\r\n\tsetOnBeforeUpdateHandler: function (func) {\r\n\t\tthis.attachEvent(\"onBeforeDataSending\", func);\r\n\t},\r\n\r\n\t/* starts autoupdate mode\r\n\t\t@param interval time interval for sending update requests\r\n\t*/\r\n\tsetAutoUpdate: function (interval, user) {\r\n\t\tinterval = interval || 2000;\r\n\r\n\t\tthis._user = user || (new Date()).valueOf();\r\n\t\tthis._need_update = false;\r\n\t\t//this._loader = null;\r\n\t\tthis._update_busy = false;\r\n\r\n\t\tthis.attachEvent(\"onAfterUpdate\", function (sid, action, tid, xml_node) {\r\n\t\t\tthis.afterAutoUpdate(sid, action, tid, xml_node);\r\n\t\t});\r\n\t\tthis.attachEvent(\"onFullSync\", function () {\r\n\t\t\tthis.fullSync();\r\n\t\t});\r\n\r\n\t\tvar self = this;\r\n\t\tlet intervalId = global.setInterval(function () {\r\n\t\t\tself.loadUpdate();\r\n\t\t}, interval);\r\n\t\tthis.attachEvent(\"onDestroy\", function(){\r\n\t\t\tclearInterval(intervalId);\r\n\t\t});\r\n\t},\r\n\r\n\t/* process updating request answer\r\n\t\tif status == collision version is deprecated\r\n\t\tset flag for autoupdating immediately\r\n\t*/\r\n\tafterAutoUpdate: function (sid, action, tid, xml_node) {\r\n\t\tif (action == 'collision') {\r\n\t\t\tthis._need_update = true;\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t},\r\n\r\n\t/* callback function for onFillSync event\r\n\t\tcall update function if it's need\r\n\t*/\r\n\tfullSync: function () {\r\n\t\tif (this._need_update) {\r\n\t\t\tthis._need_update = false;\r\n\t\t\tthis.loadUpdate();\r\n\t\t}\r\n\t\treturn true;\r\n\t},\r\n\r\n\t/* sends query to the server and call callback function\r\n\t*/\r\n\tgetUpdates: function (url, callback) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tif (this._update_busy)\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t\tthis._update_busy = true;\r\n\r\n\t\tajax.get(url, callback);\r\n\t},\r\n\r\n\t/* returns xml node value\r\n\t\t@param node\r\n\t\t\txml node\r\n\t*/\r\n\t_getXmlNodeValue: function(node) {\r\n\t\tif (node.firstChild) {\r\n\t\t\treturn node.firstChild.nodeValue;\r\n\t\t}\r\n\t\treturn \"\";\r\n\t},\r\n\r\n\t/* loads updates and processes them\r\n\t*/\r\n\tloadUpdate: function () {\r\n\t\tvar self = this;\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tvar version = this.$scheduler.getUserData(0, \"version\");\r\n\t\tvar url = this.serverProcessor + ajax.urlSeparator(this.serverProcessor) + [\"dhx_user=\" + this._user, \"dhx_version=\" + version].join(\"&\");\r\n\t\turl = url.replace(\"editing=true&\", \"\");\r\n\t\tthis.getUpdates(url, function (xml) {\r\n\t\t\tvar vers = ajax.xpath(\"//userdata\", xml);\r\n\t\t\tself.$scheduler.setUserData(0, \"version\", self._getXmlNodeValue(vers[0]));\r\n\r\n\t\t\tvar updates = ajax.xpath(\"//update\", xml);\r\n\t\t\tif (updates.length) {\r\n\t\t\t\tself._silent_mode = true;\r\n\r\n\t\t\t\tfor (var i = 0; i < updates.length; i++) {\r\n\t\t\t\t\tvar status = updates[i].getAttribute(\"status\");\r\n\t\t\t\t\tvar id = updates[i].getAttribute(\"id\");\r\n\t\t\t\t\tvar parent = updates[i].getAttribute(\"parent\");\r\n\t\t\t\t\tswitch (status) {\r\n\t\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"insertCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"updated\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"updateCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"deleteCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tself._silent_mode = false;\r\n\t\t\t}\r\n\t\t\tself._update_busy = false;\r\n\t\t\tself = null;\r\n\t\t});\r\n\t},\r\n\r\n\tdestructor: function() {\r\n\t\tthis.callEvent(\"onDestroy\", []);\r\n\t\tthis.detachAllEvents();\r\n\r\n\t\tthis.updatedRows = [];\r\n\t\tthis._in_progress = {};\r\n\t\tthis._invalid = {};\r\n\t\tthis._headers = null;\r\n\t\tthis._payload = null;\r\n\t\tdelete this._initialized;\r\n\t},\r\n\r\n\turl: function(url) {\r\n\t\tthis.serverProcessor = this._serverProcessor = url;\r\n\t},\r\n\r\n\t_serializeAsJSON: function(data) {\r\n\t\tif (typeof data === \"string\") {\r\n\t\t\treturn data;\r\n\t\t}\r\n\r\n\t\tvar copy = this.$scheduler.utils.copy(data);\r\n\t\tif (this._tMode === \"REST-JSON\") {\r\n\t\t\tdelete copy.id;\r\n\t\t\tdelete copy[this.action_param];\r\n\t\t}\r\n\r\n\t\treturn JSON.stringify(copy);\r\n\t},\r\n\r\n\t// GET/POST/JSON modes of the dataProcessor didn't send the whole data items in 'delete' requests\r\n\t// clear extra info from the data in order not to change the request format\r\n\t_cleanupArgumentsBeforeSend: function(dataToSend) {\r\n\t\tvar processedData;\r\n\t\tif(dataToSend[this.action_param] === undefined){// hash of updated items, and not an individual item\r\n\t\t\tprocessedData = {};\r\n\t\t\tfor(var i in dataToSend) {\r\n\t\t\t\tprocessedData[i] = this._cleanupArgumentsBeforeSend(dataToSend[i]);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tprocessedData = this._cleanupItemBeforeSend(dataToSend);\r\n\t\t}\r\n\t\treturn processedData;\r\n\t},\r\n\t_cleanupItemBeforeSend: function(updatedItem) {\r\n\t\tvar output = null;\r\n\t\tif(updatedItem){\r\n\t\t\tif(updatedItem[this.action_param] === \"deleted\"){\r\n\t\t\t\toutput = {};\r\n\t\t\t\toutput.id = updatedItem.id;\r\n\t\t\t\toutput[this.action_param] = updatedItem[this.action_param];\r\n\t\t\t}else{\r\n\t\t\t\toutput = updatedItem;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn output;\r\n\t},\r\n\r\n\t_forEachUpdatedRow: function(code) {\r\n\t\tvar updatedRows = this.updatedRows.slice();\r\n\t\tfor (var i = 0; i < updatedRows.length; i++) {\r\n\t\t\tvar rowId = updatedRows[i];\r\n\t\t\tif (this.$scheduler.getUserData(rowId, this.action_param)) {\r\n\t\t\t\tcode.call(this, rowId);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t_prepareDataItem: function(item) {\r\n\t\tvar processedItem = {};\r\n\t\tvar scheduler = this.$scheduler;\r\n\t\tvar copy = scheduler.utils.copy(item);\r\n\t\tfor (var i in copy) {\r\n\t\t\tif (i.indexOf(\"_\") === 0) {\r\n\t\t\t\tcontinue;\r\n\t\t\t} else if (copy[i]) {\r\n\t\t\t\tif(copy[i].getUTCFullYear){\r\n\t\t\t\t\tprocessedItem[i] = scheduler._helpers.formatDate(copy[i]);\r\n\t\t\t\t} else if(typeof copy[i] == \"object\") {\r\n\t\t\t\t\tprocessedItem[i] = this._prepareDataItem(copy[i]);\r\n\t\t\t\t} else if(copy[i] === null) {\r\n\t\t\t\t\tprocessedItem[i] = \"\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprocessedItem[i] = copy[i];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tprocessedItem[this.action_param] = scheduler.getUserData(item.id, this.action_param);\r\n\t\treturn processedItem;\r\n\t},\r\n\t_getRowData: function(id) {\r\n\t\tvar dataItem = this.$scheduler.getEvent(id);\r\n\t\tif (!dataItem) {\r\n\t\t\tdataItem = { id: id };\r\n\t\t}\r\n\t\treturn this._prepareDataItem(dataItem);\r\n\t}\r\n};\r\n\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler.createDataProcessor = function(config) {\r\n\tvar router;\r\n\tvar tMode;\r\n\tif (config instanceof Function) {\r\n\t\trouter = config;\r\n\t} else if (config.hasOwnProperty(\"router\")) {\r\n\t\trouter = config.router;\r\n\t} else if(config.hasOwnProperty(\"event\")){\r\n\t\trouter = config;\r\n\t}\r\n\r\n\tif (router) {\r\n\t\ttMode = \"CUSTOM\";\r\n\t} else {\r\n\t\ttMode = config.mode || \"REST-JSON\";\r\n\t}\r\n\r\n\tvar dp = new DataProcessor(config.url);\r\n\tdp.init(scheduler);\r\n\tdp.setTransactionMode({\r\n\t\tmode: tMode,\r\n\t\trouter: router\r\n\t}, config.batchUpdate); // FIXME: config.batchUpdate where it is explained?\r\n\treturn dp;\r\n};\r\n\r\nscheduler.DataProcessor = DataProcessor;\r\n\r\n}\r\n\r\n//var dataProcessor = global.dataProcessor = DataProcessor; // for old","import utils from \"./utils/utils\";\r\nimport domHelpers from \"./utils/dom_helpers\";\r\n\r\n\r\nexport default function(scheduler) {\r\n\r\n\tvar boxAttribute = \"data-dhxbox\";\r\n\r\n\tvar _dhx_msg_cfg = null;\r\n\r\n\tfunction callback(config, result) {\r\n\t\tvar usercall = config.callback;\r\n\t\tmodalBox.hide(config.box);\r\n\r\n\t\t_dhx_msg_cfg = config.box = null;\r\n\tif (usercall)\r\n\t\t\tusercall(result);\r\n\t}\r\n\r\n\tfunction modal_key(event) {\r\n\t\tif (_dhx_msg_cfg) {\r\n\r\n\t\t\tvar code = event.which || event.keyCode;\r\n\t\t\tvar preventDefault = false;\r\n\r\n\t\t\tif (messageBox.keyboard) {\r\n\t\t\t\tif (code == 13 || code == 32) {\r\n\t\t\t\t\t// default behavior is to confirm/submit popup on space/enter\r\n\t\t\t\t\t// if browser focus is set on button element - do button click instead of default behavior\r\n\t\t\t\t\tvar target = event.target || event.srcElement;\r\n\t\t\t\t\tif (domHelpers.getClassName(target).indexOf(\"scheduler_popup_button\") > -1 && target.click) {\r\n\t\t\t\t\t\ttarget.click();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcallback(_dhx_msg_cfg, true);\r\n\t\t\t\t\t\tpreventDefault = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (code == 27) {\r\n\t\t\t\t\tcallback(_dhx_msg_cfg, false);\r\n\t\t\t\t\tpreventDefault = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (preventDefault) {\r\n\t\t\t\tif (event.preventDefault){\r\n\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t}\r\n\t\t\t\treturn !(event.cancelBubble = true);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler.event(document, \"keydown\", modal_key, true);\r\n\r\n\tfunction modality(mode) {\r\n\t\tif (!modality.cover) {\r\n\t\t\tmodality.cover = document.createElement(\"div\");\r\n\t\t\t//necessary for IE only\r\n\t\t\tscheduler.event(modality.cover, \"keydown\", modal_key);\r\n\t\t\tmodality.cover.className = \"dhx_modal_cover\";\r\n\t\t\tdocument.body.appendChild(modality.cover);\r\n\t\t}\r\n\r\n\t\tmodality.cover.style.display = mode ? \"inline-block\" : \"none\";\r\n\t}\r\n\r\n\tfunction button(text, classValue, result) {\r\n\t\tvar buttonAriaAttrs = scheduler._waiAria.messageButtonAttrString(text);\r\n\t\tvar name = (classValue || \"\").toLowerCase().replace(/ /g, \"_\");\r\n\t\tvar buttonCss = `scheduler_${name}_button dhtmlx_${name}_button`; \r\n\t\treturn `
${text}
`;\r\n\t}\r\n\r\n\tfunction info(text) {\r\n\t\tif (!messageBox.area) {\r\n\t\t\tmessageBox.area = document.createElement(\"div\");\r\n\t\t\tmessageBox.area.className = \"scheduler_message_area dhtmlx_message_area\";\r\n\t\t\tmessageBox.area.style[messageBox.position] = \"5px\";\r\n\t\t\tdocument.body.appendChild(messageBox.area);\r\n\t\t}\r\n\r\n\t\tmessageBox.hide(text.id);\r\n\t\tvar message = document.createElement(\"div\");\r\n\t\tmessage.innerHTML = \"
\" + text.text + \"
\";\r\n\t\tmessage.className = \"scheduler-info dhtmlx-info scheduler-\" + text.type + \" dhtmlx-\" + text.type;\r\n\t\tscheduler.event(message, \"click\",function () {\r\n\t\t\tmessageBox.hide(text.id);\r\n\t\t\ttext = null;\r\n\t\t});\r\n\r\n\t\tscheduler._waiAria.messageInfoAttr(message);\r\n\r\n\t\tif (messageBox.position == \"bottom\" && messageBox.area.firstChild)\r\n\t\t\tmessageBox.area.insertBefore(message, messageBox.area.firstChild);\r\n\t\telse\r\n\t\t\tmessageBox.area.appendChild(message);\r\n\r\n\t\tif (text.expire > 0)\r\n\t\t\tmessageBox.timers[text.id] = window.setTimeout(function () {\r\n\t\t\t\t// GS-1213: We need that when Scheduler is destroyed\r\n\t\t\t\tif (messageBox) messageBox.hide(text.id);\r\n\t\t\t}, text.expire);\r\n\r\n\t\tmessageBox.pull[text.id] = message;\r\n\t\tmessage = null;\r\n\r\n\t\treturn text.id;\r\n\t}\r\n\r\n\tfunction getFirstDefined() {\r\n\t\tvar values = [].slice.apply(arguments, [0]);\r\n\r\n\t\tfor (var i = 0; i < values.length; i++) {\r\n\t\t\tif (values[i]) {\r\n\t\t\t\treturn values[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tfunction _boxStructure(config, ok, cancel) {\r\n\t\tvar box = document.createElement(\"div\");\r\n\r\n\t\tvar contentId = utils.uid();\r\n\t\tscheduler._waiAria.messageModalAttr(box, contentId);\r\n\r\n\r\n\t\tbox.className = \" scheduler_modal_box dhtmlx_modal_box scheduler-\" + config.type + \" dhtmlx-\" + config.type;\r\n\t\tbox.setAttribute(boxAttribute, 1);\r\n\r\n\t\tvar inner = '';\r\n\r\n\t\tif (config.width)\r\n\t\t\tbox.style.width = config.width;\r\n\t\tif (config.height)\r\n\t\t\tbox.style.height = config.height;\r\n\t\tif (config.title)\r\n\t\t\tinner += '
' + config.title + '
';\r\n\t\tinner += '
' + (config.content ? '' : config.text) + '
';\r\n\t\tif (ok)\r\n\t\t\tinner += button(getFirstDefined(config.ok, scheduler.locale.labels.message_ok, \"OK\"), \"ok\", true);\r\n\t\tif (cancel)\r\n\t\t\tinner += button(getFirstDefined(config.cancel, scheduler.locale.labels.message_cancel, \"Cancel\"), \"cancel\", false);\r\n\r\n\t\tif (config.buttons) {\r\n\t\t\tfor (var i = 0; i < config.buttons.length; i++) {\r\n\t\t\t\tvar btn = config.buttons[i];\r\n\t\t\t\tif (typeof btn == \"object\") {\r\n\t\t\t\t\t// Support { label:\"Save\", css:\"main_button\", value:\"save\" }\r\n\t\t\t\t\tvar label = btn.label;\r\n\t\t\t\t\tvar css = btn.css || (\"scheduler_\" + btn.label.toLowerCase() + \"_button dhtmlx_\" + btn.label.toLowerCase() + \"_button\");\r\n\t\t\t\t\tvar value = btn.value || i;\r\n\t\t\t\t\tinner += button(label, css, value);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tinner += button(btn, btn, i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tinner += '
';\r\n\t\tbox.innerHTML = inner;\r\n\r\n\t\tif (config.content) {\r\n\t\t\tvar node = config.content;\r\n\t\t\tif (typeof node == \"string\")\r\n\t\t\t\tnode = document.getElementById(node);\r\n\t\t\tif (node.style.display == 'none')\r\n\t\t\t\tnode.style.display = \"\";\r\n\t\t\tbox.childNodes[config.title ? 1 : 0].appendChild(node);\r\n\t\t}\r\n\r\n\t\tscheduler.event(box, \"click\", function (event) {\r\n\t\t\tvar source = event.target || event.srcElement;\r\n\t\t\tif (!source.className) source = source.parentNode;\r\n\t\t\tif (domHelpers.closest(source, \".scheduler_popup_button\")) {\r\n\t\t\t\tvar result = source.getAttribute(\"data-result\");\r\n\t\t\t\tresult = (result == \"true\") || (result == \"false\" ? false : result);\r\n\t\t\t\tcallback(config, result);\r\n\t\t\t}\r\n\t\t});\r\n\t\tconfig.box = box;\r\n\t\tif (ok || cancel)\r\n\t\t\t_dhx_msg_cfg = config;\r\n\r\n\t\treturn box;\r\n\t}\r\n\r\n\tfunction _createBox(config, ok, cancel) {\r\n\t\tvar box = config.tagName ? config : _boxStructure(config, ok, cancel);\r\n\r\n\t\tif (!config.hidden)\r\n\t\t\tmodality(true);\r\n\t\tdocument.body.appendChild(box);\r\n\t\tvar x = Math.abs(Math.floor(((window.innerWidth || document.documentElement.offsetWidth) - box.offsetWidth) / 2));\r\n\t\tvar y = Math.abs(Math.floor(((window.innerHeight || document.documentElement.offsetHeight) - box.offsetHeight) / 2));\r\n\t\tif (config.position == \"top\")\r\n\t\t\tbox.style.top = \"-3px\";\r\n\t\telse\r\n\t\t\tbox.style.top = y + 'px';\r\n\t\tbox.style.left = x + 'px';\r\n\t\t//necessary for IE only\r\n\t\tscheduler.event(box, \"keydown\", modal_key);\r\n\r\n\t\tmodalBox.focus(box);\r\n\r\n\t\tif (config.hidden)\r\n\t\t\tmodalBox.hide(box);\r\n\r\n\t\tscheduler.callEvent(\"onMessagePopup\", [box]);\r\n\t\treturn box;\r\n\t}\r\n\r\n\tfunction alertPopup(config) {\r\n\t\treturn _createBox(config, true, false);\r\n\t}\r\n\r\n\tfunction confirmPopup(config) {\r\n\t\treturn _createBox(config, true, true);\r\n\t}\r\n\r\n\tfunction boxPopup(config) {\r\n\t\treturn _createBox(config);\r\n\t}\r\n\r\n\tfunction box_params(text, type, callback) {\r\n\t\tif (typeof text != \"object\") {\r\n\t\t\tif (typeof type == \"function\") {\r\n\t\t\t\tcallback = type;\r\n\t\t\t\ttype = \"\";\r\n\t\t\t}\r\n\t\t\ttext = {text: text, type: type, callback: callback};\r\n\t\t}\r\n\t\treturn text;\r\n\t}\r\n\r\n\tfunction params(text, type, expire, id) {\r\n\t\tif (typeof text != \"object\")\r\n\t\t\ttext = {text: text, type: type, expire: expire, id: id};\r\n\t\ttext.id = text.id || utils.uid();\r\n\t\ttext.expire = text.expire || messageBox.expire;\r\n\t\treturn text;\r\n\t}\r\n\r\n\tvar alertBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"confirm\";\r\n\t\treturn alertPopup(text);\r\n\t};\r\n\tvar confirmBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"alert\";\r\n\t\treturn confirmPopup(text);\r\n\t};\r\n\tvar modalBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"alert\";\r\n\t\treturn boxPopup(text);\r\n\t};\r\n\tmodalBox.hide = function (node) {\r\n\t\twhile (node && node.getAttribute && !node.getAttribute(boxAttribute))\r\n\t\t\tnode = node.parentNode;\r\n\t\tif (node) {\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t\tmodality(false);\r\n\r\n\t\t\tscheduler.callEvent(\"onAfterMessagePopup\", [node]);\r\n\t\t}\r\n\t};\r\n\r\n\tmodalBox.focus = function (node) {\r\n\t\tsetTimeout(function () {\r\n\t\t\tvar focusable = domHelpers.getFocusableNodes(node);\r\n\t\t\tif (focusable.length) {\r\n\t\t\t\tif (focusable[0].focus) focusable[0].focus();\r\n\t\t\t}\r\n\t\t}, 1);\r\n\t};\r\n\r\n\tvar messageBox = function (text, type, expire, id) {\r\n\t\ttext = params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"info\";\r\n\r\n\t\tvar subtype = text.type.split(\"-\")[0];\r\n\t\tswitch (subtype) {\r\n\t\t\tcase \"alert\":\r\n\t\t\t\treturn alertPopup(text);\r\n\t\t\tcase \"confirm\":\r\n\t\t\t\treturn confirmPopup(text);\r\n\t\t\tcase \"modalbox\":\r\n\t\t\t\treturn boxPopup(text);\r\n\t\t\tdefault:\r\n\t\t\t\treturn info(text);\r\n\t\t}\r\n\t};\r\n\r\n\tmessageBox.seed = (new Date()).valueOf();\r\n\tmessageBox.uid = utils.uid;\r\n\tmessageBox.expire = 4000;\r\n\tmessageBox.keyboard = true;\r\n\tmessageBox.position = \"top\";\r\n\tmessageBox.pull = {};\r\n\tmessageBox.timers = {};\r\n\r\n\tmessageBox.hideAll = function () {\r\n\t\tfor (var key in messageBox.pull)\r\n\t\t\tmessageBox.hide(key);\r\n\t};\r\n\tmessageBox.hide = function (id) {\r\n\t\tvar obj = messageBox.pull[id];\r\n\t\tif (obj && obj.parentNode) {\r\n\t\t\twindow.setTimeout(function () {\r\n\t\t\t\tobj.parentNode.removeChild(obj);\r\n\t\t\t\tobj = null;\r\n\t\t\t}, 2000);\r\n\t\t\tobj.className += \" hidden\";\r\n\r\n\t\t\tif (messageBox.timers[id])\r\n\t\t\t\twindow.clearTimeout(messageBox.timers[id]);\r\n\t\t\tdelete messageBox.pull[id];\r\n\t\t}\r\n\t};\r\n\r\n\tvar popups = [];\r\n\tscheduler.attachEvent(\"onMessagePopup\", function(box){\r\n\t\tpopups.push(box);\r\n\t});\r\n\tscheduler.attachEvent(\"onAfterMessagePopup\", function(box){\r\n\t\tfor(var i = 0; i < popups.length; i++){\r\n\t\t\tif(popups[i] === box){\r\n\t\t\t\tpopups.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tif(modality.cover && modality.cover.parentNode){\r\n\t\t\tmodality.cover.parentNode.removeChild(modality.cover);\r\n\t\t}\r\n\r\n\t\tfor(var i = 0; i < popups.length; i++){\r\n\t\t\tif(popups[i].parentNode){\r\n\t\t\t\tpopups[i].parentNode.removeChild(popups[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\tpopups = null;\r\n\r\n\t\tif(messageBox.area && messageBox.area.parentNode){\r\n\t\t\tmessageBox.area.parentNode.removeChild(messageBox.area);\r\n\t\t}\r\n\t\tmessageBox = null;\r\n\t});\r\n\r\n\treturn {\r\n\t\talert: alertBox,\r\n\t\tconfirm: confirmBox,\r\n\t\tmessage: messageBox,\r\n\t\tmodalbox: modalBox\r\n\t};\r\n}","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"كانون الثاني\", \"شباط\", \"آذار\", \"نيسان\", \"أيار\", \"حزيران\", \"تموز\", \"آب\", \"أيلول\", \"تشرين الأول\", \"تشرين الثاني\", \"كانون الأول\"],\r\n\t\tmonth_short: [\"يناير\", \"فبراير\", \"مارس\", \"أبريل\", \"مايو\", \"يونيو\", \"يوليو\", \"أغسطس\", \"سبتمبر\", \"أكتوبر\", \"نوفمبر\", \"ديسمبر\"],\r\n\t\tday_full: [\"الأحد\", \"الأثنين\", \"ألثلاثاء\", \"الأربعاء\", \"ألحميس\", \"ألجمعة\", \"السبت\"],\r\n\t\tday_short: [\"احد\", \"اثنين\", \"ثلاثاء\", \"اربعاء\", \"خميس\", \"جمعة\", \"سبت\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"اليوم\",\r\n\t\tday_tab: \"يوم\",\r\n\t\tweek_tab: \"أسبوع\",\r\n\t\tmonth_tab: \"شهر\",\r\n\t\tnew_event: \"حدث جديد\",\r\n\t\ticon_save: \"اخزن\",\r\n\t\ticon_cancel: \"الغاء\",\r\n\t\ticon_details: \"تفاصيل\",\r\n\t\ticon_edit: \"تحرير\",\r\n\t\ticon_delete: \"حذف\",\r\n\t\tconfirm_closing: \"التغييرات سوف تضيع, هل انت متأكد؟\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"الحدث سيتم حذفها نهائيا ، هل أنت متأكد؟\",\r\n\t\tsection_description: \"الوصف\",\r\n\t\tsection_time: \"الفترة الزمنية\",\r\n\t\tfull_day: \"طوال اليوم\",\r\n\r\n\t\tconfirm_recurring: \"هل تريد تحرير مجموعة كاملة من الأحداث المتكررة؟\",\r\n\t\tsection_recurring: \"تكرار الحدث\",\r\n\t\tbutton_recurring: \"تعطيل\",\r\n\t\tbutton_recurring_open: \"تمكين\",\r\n\t\tbutton_edit_series: \"تحرير سلسلة\",\r\n\t\tbutton_edit_occurrence: \"تعديل نسخة\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"جدول\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};\r\n\r\n\r\n","/*\r\n Translation by Sofya Morozova\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Студзень\", \"Люты\", \"Сакавік\", \"Красавік\", \"Maй\", \"Чэрвень\", \"Ліпень\", \"Жнівень\", \"Верасень\", \"Кастрычнік\", \"Лістапад\", \"Снежань\"],\r\n\t\tmonth_short: [\"Студз\", \"Лют\", \"Сак\", \"Крас\", \"Maй\", \"Чэр\", \"Ліп\", \"Жнів\", \"Вер\", \"Каст\", \"Ліст\", \"Снеж\"],\r\n\t\tday_full: [ \"Нядзеля\", \"Панядзелак\", \"Аўторак\", \"Серада\", \"Чацвер\", \"Пятніца\", \"Субота\"],\r\n\t\tday_short: [\"Нд\", \"Пн\", \"Аўт\", \"Ср\", \"Чцв\", \"Пт\", \"Сб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сёння\",\r\n\t\tday_tab: \"Дзень\",\r\n\t\tweek_tab: \"Тыдзень\",\r\n\t\tmonth_tab: \"Месяц\",\r\n\t\tnew_event: \"Новая падзея\",\r\n\t\ticon_save: \"Захаваць\",\r\n\t\ticon_cancel: \"Адмяніць\",\r\n\t\ticon_details: \"Дэталі\",\r\n\t\ticon_edit: \"Змяніць\",\r\n\t\ticon_delete: \"Выдаліць\",\r\n\t\tconfirm_closing: \"\", //Унесеныя змены будуць страчаны, працягнуць?\r\n\t\tconfirm_deleting: \"Падзея будзе выдалена незваротна, працягнуць?\",\r\n\t\tsection_description: \"Апісанне\",\r\n\t\tsection_time: \"Перыяд часу\",\r\n\t\tfull_day: \"Увесь дзень\",\r\n\r\n\t\tconfirm_recurring: \"Вы хочаце змяніць усю серыю паўтаральных падзей?\",\r\n\t\tsection_recurring: \"Паўтарэнне\",\r\n\t\tbutton_recurring: \"Адключана\",\r\n\t\tbutton_recurring_open: \"Уключана\",\r\n\t\tbutton_edit_series: \"Рэдагаваць серыю\",\r\n\t\tbutton_edit_occurrence: \"Рэдагаваць асобнік\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Спіс\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Апісанне\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Год\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Спіс\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Спic\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Дзень\",\r\n\t\trepeat_radio_week: \"Тыдзень\",\r\n\t\trepeat_radio_month: \"Месяц\",\r\n\t\trepeat_radio_year: \"Год\",\r\n\t\trepeat_radio_day_type: \"Кожны\",\r\n\t\trepeat_text_day_count: \"дзень\",\r\n\t\trepeat_radio_day_type2: \"Кожны працоўны дзень\",\r\n\t\trepeat_week: \" Паўтараць кожны\",\r\n\t\trepeat_text_week_count: \"тыдзень\",\r\n\t\trepeat_radio_month_type: \"Паўтараць\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" чысла кожнага\",\r\n\t\trepeat_text_month_count: \"месяцу\",\r\n\t\trepeat_text_month_count2_before: \"кожны \",\r\n\t\trepeat_text_month_count2_after: \"месяц\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"дзень\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без даты заканчэння\",\r\n\t\trepeat_text_occurences_count: \"паўтораў\",\r\n\t\trepeat_radio_end2: \"\",\r\n\t\trepeat_radio_end3: \"Да \",\r\n\t\tmonth_for_recurring: [\"Студзеня\", \"Лютага\", \"Сакавіка\", \"Красавіка\", \"Мая\", \"Чэрвеня\", \"Ліпeня\", \"Жніўня\", \"Верасня\", \"Кастрычніка\", \"Лістапада\", \"Снежня\"],\r\n\t\tday_for_recurring: [\"Нядзелю\", \"Панядзелак\", \"Аўторак\", \"Сераду\", \"Чацвер\", \"Пятніцу\", \"Суботу\"]\r\n\t}\r\n};\r\n","/*\r\n @Traducido por Vicente Adria Bohigues - vicenteadria@hotmail.com\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Gener\", \"Febrer\", \"Març\", \"Abril\", \"Maig\", \"Juny\", \"Juliol\", \"Agost\", \"Setembre\", \"Octubre\", \"Novembre\", \"Desembre\"],\r\n\t\tmonth_short: [\"Gen\", \"Feb\", \"Mar\", \"Abr\", \"Mai\", \"Jun\", \"Jul\", \"Ago\", \"Set\", \"Oct\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Diumenge\", \"Dilluns\", \"Dimarts\", \"Dimecres\", \"Dijous\", \"Divendres\", \"Dissabte\"],\r\n\t\tday_short: [\"Dg\", \"Dl\", \"Dm\", \"Dc\", \"Dj\", \"Dv\", \"Ds\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hui\",\r\n\t\tday_tab: \"Dia\",\r\n\t\tweek_tab: \"Setmana\",\r\n\t\tmonth_tab: \"Mes\",\r\n\t\tnew_event: \"Nou esdeveniment\",\r\n\t\ticon_save: \"Guardar\",\r\n\t\ticon_cancel: \"Cancel·lar\",\r\n\t\ticon_details: \"Detalls\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Esborrar\",\r\n\t\tconfirm_closing: \"\", //\"Els seus canvis es perdràn, continuar ?\"\r\n\t\tconfirm_deleting: \"L'esdeveniment s'esborrarà definitivament, continuar ?\",\r\n\t\tsection_description: \"Descripció\",\r\n\t\tsection_time: \"Periode de temps\",\r\n\t\tfull_day: \"Tot el dia\",\r\n\r\n\t\tconfirm_recurring: \"¿Desitja modificar el conjunt d'esdeveniments repetits?\",\r\n\t\tsection_recurring: \"Repeteixca l'esdeveniment\",\r\n\t\tbutton_recurring: \"Impedit\",\r\n\t\tbutton_recurring_open: \"Permés\",\r\n\t\tbutton_edit_series: \"Edit sèrie\",\r\n\t\tbutton_edit_occurrence: \"Edita Instància\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descripció\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Any\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Taula\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};","/*\r\nTranslation by FreezeSoul\r\n*/\r\n//scheduler.config.day_date=\"%M %d日 %D\";\r\n//scheduler.config.default_date=\"%Y年 %M %d日\";\r\n//scheduler.config.month_date=\"%Y年 %M\";\r\n\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"一月\", \"二月\", \"三月\", \"四月\", \"五月\", \"六月\", \"七月\", \"八月\", \"九月\", \"十月\", \"十一月\", \"十二月\"],\r\n\t\tmonth_short: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tday_full: [\"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\"],\r\n\t\tday_short: [\"日\", \"一\", \"二\", \"三\", \"四\", \"五\", \"六\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"今天\",\r\n\t\tday_tab: \"日\",\r\n\t\tweek_tab: \"周\",\r\n\t\tmonth_tab: \"月\",\r\n\t\tnew_event: \"新建日程\",\r\n\t\ticon_save: \"保存\",\r\n\t\ticon_cancel: \"关闭\",\r\n\t\ticon_details: \"详细\",\r\n\t\ticon_edit: \"编辑\",\r\n\t\ticon_delete: \"删除\",\r\n\t\tconfirm_closing: \"请确认是否撤销修改!\", //Your changes will be lost, are your sure?\r\n\t\tconfirm_deleting: \"是否删除日程?\",\r\n\t\tsection_description: \"描述\",\r\n\t\tsection_time: \"时间范围\",\r\n\t\tfull_day: \"整天\",\r\n\r\n\t\tconfirm_recurring:\"请确认是否将日程设为重复模式?\",\r\n\t\tsection_recurring:\"重复周期\",\r\n\t\tbutton_recurring:\"禁用\",\r\n\t\tbutton_recurring_open:\"启用\",\r\n\t\tbutton_edit_series: \"编辑系列\",\r\n\t\tbutton_edit_occurrence: \"编辑实例\",\r\n\t\t\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"议程\",\r\n\t\tdate:\"日期\",\r\n\t\tdescription:\"说明\",\r\n\t\t\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"今年\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"议程\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab:\"电网\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"按天\",\r\n\t\trepeat_radio_week: \"按周\",\r\n\t\trepeat_radio_month: \"按月\",\r\n\t\trepeat_radio_year: \"按年\",\r\n\t\trepeat_radio_day_type: \"每\",\r\n\t\trepeat_text_day_count: \"天\",\r\n\t\trepeat_radio_day_type2: \"每个工作日\",\r\n\t\trepeat_week: \" 重复 每\",\r\n\t\trepeat_text_week_count: \"星期的:\",\r\n\t\trepeat_radio_month_type: \"重复\",\r\n\t\trepeat_radio_month_start: \"在\",\r\n\t\trepeat_text_month_day: \"日 每\",\r\n\t\trepeat_text_month_count: \"月\",\r\n\t\trepeat_text_month_count2_before: \"每\",\r\n\t\trepeat_text_month_count2_after: \"月\",\r\n\t\trepeat_year_label: \"在\",\r\n\t\tselect_year_day2: \"的\",\r\n\t\trepeat_text_year_day: \"日\",\r\n\t\tselect_year_month: \"月\",\r\n\t\trepeat_radio_end: \"无结束日期\",\r\n\t\trepeat_text_occurences_count: \"次结束\",\r\n\t\trepeat_radio_end2: \"重复\",\r\n\t\trepeat_radio_end3: \"结束于\",\r\n\t\tmonth_for_recurring: [\"一月\", \"二月\", \"三月\", \"四月\", \"五月\", \"六月\", \"七月\", \"八月\", \"九月\", \"十月\", \"十一月\", \"十二月\"],\r\n\t\tday_for_recurring: [\"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Leden\", \"Únor\", \"Březen\", \"Duben\", \"Květen\", \"Červen\", \"Červenec\", \"Srpen\", \"Září\", \"Říjen\", \"Listopad\", \"Prosinec\"],\r\n\t\tmonth_short: [\"Led\", \"Ún\", \"Bře\", \"Dub\", \"Kvě\", \"Čer\", \"Čec\", \"Srp\", \"Září\", \"Říj\", \"List\", \"Pro\"],\r\n\t\tday_full: [\"Neděle\", \"Pondělí\", \"Úterý\", \"Středa\", \"Čtvrtek\", \"Pátek\", \"Sobota\"],\r\n\t\tday_short: [\"Ne\", \"Po\", \"Út\", \"St\", \"Čt\", \"Pá\", \"So\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dnes\",\r\n\t\tday_tab: \"Den\",\r\n\t\tweek_tab: \"Týden\",\r\n\t\tmonth_tab: \"Měsíc\",\r\n\t\tnew_event: \"Nová událost\",\r\n\t\ticon_save: \"Uložit\",\r\n\t\ticon_cancel: \"Zpět\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edituj\",\r\n\t\ticon_delete: \"Smazat\",\r\n\t\tconfirm_closing: \"\", //Vaše změny budou ztraceny, opravdu ?\r\n\t\tconfirm_deleting: \"Událost bude trvale smazána, opravdu?\",\r\n\t\tsection_description: \"Poznámky\",\r\n\t\tsection_time: \"Doba platnosti\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Přejete si upravit celou řadu opakovaných událostí?\",\r\n\t\tsection_recurring: \"Opakování události\",\r\n\t\tbutton_recurring: \"Vypnuto\",\r\n\t\tbutton_recurring_open: \"Zapnuto\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Upravit instance\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Program\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Poznámka\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\t\tfull_day: \"Full day\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Program\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Mřížka\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Denně\",\r\n\t\trepeat_radio_week: \"Týdně\",\r\n\t\trepeat_radio_month: \"Měsíčně\",\r\n\t\trepeat_radio_year: \"Ročně\",\r\n\t\trepeat_radio_day_type: \"každý\",\r\n\t\trepeat_text_day_count: \"Den\",\r\n\t\trepeat_radio_day_type2: \"pracovní dny\",\r\n\t\trepeat_week: \"Opakuje každých\",\r\n\t\trepeat_text_week_count: \"Týdnů na:\",\r\n\t\trepeat_radio_month_type: \"u každého\",\r\n\t\trepeat_radio_month_start: \"na\",\r\n\t\trepeat_text_month_day: \"Den každého\",\r\n\t\trepeat_text_month_count: \"Měsíc\",\r\n\t\trepeat_text_month_count2_before: \"každý\",\r\n\t\trepeat_text_month_count2_after: \"Měsíc\",\r\n\t\trepeat_year_label: \"na\",\r\n\t\tselect_year_day2: \"v\",\r\n\t\trepeat_text_year_day: \"Den v\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"bez data ukončení\",\r\n\t\trepeat_text_occurences_count: \"Události\",\r\n\t\trepeat_radio_end2: \"po\",\r\n\t\trepeat_radio_end3: \"Konec\",\r\n\t\tmonth_for_recurring: [\"Leden\", \"Únor\", \"Březen\", \"Duben\", \"Květen\", \"Červen\", \"Červenec\", \"Srpen\", \"Září\", \"Říjen\", \"Listopad\", \"Prosinec\"],\r\n\t\tday_for_recurring: [\"Neděle \", \"Pondělí\", \"Úterý\", \"Středa\", \"Čtvrtek\", \"Pátek\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Marts\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Man\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uge\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny begivenhed\",\r\n\t\ticon_save: \"Gem\",\r\n\t\ticon_cancel: \"Fortryd\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Tilret\",\r\n\t\ticon_delete: \"Slet\",\r\n\t\tconfirm_closing: \"Dine rettelser vil gå tabt.. Er dy sikker?\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Bigivenheden vil blive slettet permanent. Er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du tilrette hele serien af gentagne begivenheder?\",\r\n\t\tsection_recurring: \"Gentag begivenhed\",\r\n\t\tbutton_recurring: \"Frakoblet\",\r\n\t\tbutton_recurring_open: \"Tilkoblet\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Rediger en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dagsorden\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dagsorden\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daglig\",\r\n\t\trepeat_radio_week: \"Ugenlig\",\r\n\t\trepeat_radio_month: \"Månedlig\",\r\n\t\trepeat_radio_year: \"Årlig\",\r\n\t\trepeat_radio_day_type: \"Hver\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"På hver arbejdsdag\",\r\n\t\trepeat_week: \" Gentager sig hver\",\r\n\t\trepeat_text_week_count: \"uge på følgende dage:\",\r\n\t\trepeat_radio_month_type: \"Hver den\",\r\n\t\trepeat_radio_month_start: \"Den\",\r\n\t\trepeat_text_month_day: \" i hver\",\r\n\t\trepeat_text_month_count: \"måned\",\r\n\t\trepeat_text_month_count2_before: \"hver\",\r\n\t\trepeat_text_month_count2_after: \"måned\",\r\n\t\trepeat_year_label: \"Den\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Ingen slutdato\",\r\n\t\trepeat_text_occurences_count: \"gentagelse\",\r\n\t\trepeat_radio_end2: \"Efter\",\r\n\t\trepeat_radio_end3: \"Slut\",\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"März\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Dezember\"],\r\n\t\tday_for_recurring: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\" Januar\", \" Februar\", \" März \", \" April\", \" Mai\", \" Juni\", \" Juli\", \" August\", \" September \", \" Oktober\", \" November \", \" Dezember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mär\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dez\"],\r\n\t\tday_full: [ \"Sonntag\", \"Montag\", \"Dienstag\", \" Mittwoch\", \" Donnerstag\", \"Freitag\", \"Samstag\"],\r\n\t\tday_short: [\"So\", \"Mo\", \"Di\", \"Mi\", \"Do\", \"Fr\", \"Sa\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Heute\",\r\n\t\tday_tab: \"Tag\",\r\n\t\tweek_tab: \"Woche\",\r\n\t\tmonth_tab: \"Monat\",\r\n\t\tnew_event: \"neuer Eintrag\",\r\n\t\ticon_save: \"Speichern\",\r\n\t\ticon_cancel: \"Abbrechen\",\r\n\t\ticon_details: \"Details\",\r\n\t\ticon_edit: \"Ändern\",\r\n\t\ticon_delete: \"Löschen\",\r\n\t\tconfirm_closing: \"\", //\"Ihre Veränderungen werden verloren sein, wollen Sie ergänzen? \"\r\n\t\tconfirm_deleting: \"Der Eintrag wird gelöscht\",\r\n\t\tsection_description: \"Beschreibung\",\r\n\t\tsection_time: \"Zeitspanne\",\r\n\t\tfull_day: \"Ganzer Tag\",\r\n\r\n\t\tconfirm_recurring: \"Wollen Sie alle Einträge bearbeiten oder nur diesen einzelnen Eintrag?\",\r\n\t\tsection_recurring: \"Wiederholung\",\r\n\t\tbutton_recurring: \"Aus\",\r\n\t\tbutton_recurring_open: \"An\",\r\n\t\tbutton_edit_series: \"Bearbeiten Sie die Serie\",\r\n\t\tbutton_edit_occurrence: \"Bearbeiten Sie eine Kopie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Beschreibung\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Jahre\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Täglich\",\r\n\t\trepeat_radio_week: \"Wöchentlich\",\r\n\t\trepeat_radio_month: \"Monatlich\",\r\n\t\trepeat_radio_year: \"Jährlich\",\r\n\t\trepeat_radio_day_type: \"jeden\",\r\n\t\trepeat_text_day_count: \"Tag\",\r\n\t\trepeat_radio_day_type2: \"an jedem Arbeitstag\",\r\n\t\trepeat_week: \" Wiederholt sich jede\",\r\n\t\trepeat_text_week_count: \"Woche am:\",\r\n\t\trepeat_radio_month_type: \"an jedem\",\r\n\t\trepeat_radio_month_start: \"am\",\r\n\t\trepeat_text_month_day: \"Tag eines jeden\",\r\n\t\trepeat_text_month_count: \"Monats\",\r\n\t\trepeat_text_month_count2_before: \"jeden\",\r\n\t\trepeat_text_month_count2_after: \"Monats\",\r\n\t\trepeat_year_label: \"am\",\r\n\t\tselect_year_day2: \"im\",\r\n\t\trepeat_text_year_day: \"Tag im\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"kein Enddatum\",\r\n\t\trepeat_text_occurences_count: \"Ereignissen\",\r\n\t\trepeat_radio_end3: \"Schluß\",\r\n\t\trepeat_radio_end2: \"nach\",\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"März\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Dezember\"],\r\n\t\tday_for_recurring: [\"Sonntag\", \"Montag\", \"Dienstag\", \"Mittwoch\", \"Donnerstag\", \"Freitag\", \"Samstag\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Ιανουάριος\", \"Φεβρουάριος\", \"Μάρτιος\", \"Απρίλιος\", \"Μάϊος\", \"Ιούνιος\", \"Ιούλιος\", \"Αύγουστος\", \"Σεπτέμβριος\", \"Οκτώβριος\", \"Νοέμβριος\", \"Δεκέμβριος\"],\r\n\t\tmonth_short: [\"ΙΑΝ\", \"ΦΕΒ\", \"ΜΑΡ\", \"ΑΠΡ\", \"ΜΑΙ\", \"ΙΟΥΝ\", \"ΙΟΥΛ\", \"ΑΥΓ\", \"ΣΕΠ\", \"ΟΚΤ\", \"ΝΟΕ\", \"ΔΕΚ\"],\r\n\t\tday_full: [\"Κυριακή\", \"Δευτέρα\", \"Τρίτη\", \"Τετάρτη\", \"Πέμπτη\", \"Παρασκευή\", \"Σάββατο\"],\r\n\t\tday_short: [\"ΚΥ\", \"ΔΕ\", \"ΤΡ\", \"ΤΕ\", \"ΠΕ\", \"ΠΑ\", \"ΣΑ\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Σήμερα\",\r\n\t\tday_tab: \"Ημέρα\",\r\n\t\tweek_tab: \"Εβδομάδα\",\r\n\t\tmonth_tab: \"Μήνας\",\r\n\t\tnew_event: \"Νέο έργο\",\r\n\t\ticon_save: \"Αποθήκευση\",\r\n\t\ticon_cancel: \"Άκυρο\",\r\n\t\ticon_details: \"Λεπτομέρειες\",\r\n\t\ticon_edit: \"Επεξεργασία\",\r\n\t\ticon_delete: \"Διαγραφή\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Το έργο θα διαγραφεί οριστικά. Θέλετε να συνεχίσετε;\",\r\n\t\tsection_description: \"Περιγραφή\",\r\n\t\tsection_time: \"Χρονική περίοδος\",\r\n\t\tfull_day: \"Πλήρης Ημέρα\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Θέλετε να επεξεργασθείτε ολόκληρη την ομάδα των επαναλαμβανόμενων έργων;\",\r\n\t\tsection_recurring: \"Επαναλαμβανόμενο έργο\",\r\n\t\tbutton_recurring: \"Ανενεργό\",\r\n\t\tbutton_recurring_open: \"Ενεργό\",\r\n\t\tbutton_edit_series: \"Επεξεργαστείτε τη σειρά\",\r\n\t\tbutton_edit_occurrence: \"Επεξεργασία ένα αντίγραφο\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Ημερήσια Διάταξη\",\r\n\t\tdate: \"Ημερομηνία\",\r\n\t\tdescription: \"Περιγραφή\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Έτος\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Ημερήσια Διάταξη\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Πλέγμα\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Ημερησίως\",\r\n\t\trepeat_radio_week: \"Εβδομαδιαίως\",\r\n\t\trepeat_radio_month: \"Μηνιαίως\",\r\n\t\trepeat_radio_year: \"Ετησίως\",\r\n\t\trepeat_radio_day_type: \"Κάθε\",\r\n\t\trepeat_text_day_count: \"ημέρα\",\r\n\t\trepeat_radio_day_type2: \"Κάθε εργάσιμη\",\r\n\t\trepeat_week: \" Επανάληψη κάθε\",\r\n\t\trepeat_text_week_count: \"εβδομάδα τις επόμενες ημέρες:\",\r\n\t\trepeat_radio_month_type: \"Επανάληψη\",\r\n\t\trepeat_radio_month_start: \"Την\",\r\n\t\trepeat_text_month_day: \"ημέρα κάθε\",\r\n\t\trepeat_text_month_count: \"μήνα\",\r\n\t\trepeat_text_month_count2_before: \"κάθε\",\r\n\t\trepeat_text_month_count2_after: \"μήνα\",\r\n\t\trepeat_year_label: \"Την\",\r\n\t\tselect_year_day2: \"του\",\r\n\t\trepeat_text_year_day: \"ημέρα\",\r\n\t\tselect_year_month: \"μήνα\",\r\n\t\trepeat_radio_end: \"Χωρίς ημερομηνία λήξεως\",\r\n\t\trepeat_text_occurences_count: \"επαναλήψεις\",\r\n\t\trepeat_radio_end3: \"Λήγει την\",\r\n\t\trepeat_radio_end2: \"Μετά από\",\r\n\t\tmonth_for_recurring: [\"Ιανουάριος\", \"Φεβρουάριος\", \"Μάρτιος\", \"Απρίλιος\", \"Μάϊος\", \"Ιούνιος\", \"Ιούλιος\", \"Αύγουστος\", \"Σεπτέμβριος\", \"Οκτώβριος\", \"Νοέμβριος\", \"Δεκέμβριος\"],\r\n\t\tday_for_recurring: [\"Κυριακή\", \"Δευτέρα\", \"Τρίτη\", \"Τετάρτη\", \"Πέμπτη\", \"Παρασκευή\", \"Σάββατο\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate:{\r\n\t\tmonth_full:[\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\r\n\t\tmonth_short:[\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\r\n\t\tday_full:[\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\r\n\t\tday_short:[\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"]\r\n\t},\r\n\tlabels:{\r\n\t\tdhx_cal_today_button:\"Today\",\r\n\t\tday_tab:\"Day\",\r\n\t\tweek_tab:\"Week\",\r\n\t\tmonth_tab:\"Month\",\r\n\t\tnew_event:\"New event\",\r\n\t\ticon_save:\"Save\",\r\n\t\ticon_cancel:\"Cancel\",\r\n\t\ticon_details:\"Details\",\r\n\t\ticon_edit:\"Edit\",\r\n\t\ticon_delete:\"Delete\",\r\n\t\tconfirm_closing:\"\",//Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting:\"Event will be deleted permanently, are you sure?\",\r\n\t\tsection_description:\"Description\",\r\n\t\tsection_time:\"Time period\",\r\n\t\tfull_day:\"Full day\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring:\"Do you want to edit the whole set of repeated events?\",\r\n\t\tsection_recurring:\"Repeat event\",\r\n\t\tbutton_recurring:\"Disabled\",\r\n\t\tbutton_recurring_open:\"Enabled\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Edit occurrence\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"Agenda\",\r\n\t\tdate:\"Date\",\r\n\t\tdescription:\"Description\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"Year\",\r\n\r\n\t\t/* week agenda extension */\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daily\",//name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Weekly\",//name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Monthly\",\r\n\t\trepeat_radio_year: \"Yearly\",\r\n\t\trepeat_radio_day_type: \"Every\",\r\n\t\trepeat_text_day_count: \"day\",\r\n\t\trepeat_radio_day_type2: \"Every workday\",\r\n\t\trepeat_week: \" Repeat every\",\r\n\t\trepeat_text_week_count: \"week next days:\",\r\n\t\trepeat_radio_month_type: \"Repeat\",\r\n\t\trepeat_radio_month_start: \"On\",\r\n\t\trepeat_text_month_day: \"day every\",\r\n\t\trepeat_text_month_count: \"month\",\r\n\t\trepeat_text_month_count2_before: \"every\",\r\n\t\trepeat_text_month_count2_after: \"month\",\r\n\t\trepeat_year_label: \"On\",\r\n\t\tselect_year_day2: \"of\",\r\n\t\trepeat_text_year_day: \"day\",\r\n\t\tselect_year_month: \"month\",\r\n\t\trepeat_radio_end: \"No end date\",\r\n\t\trepeat_text_occurences_count: \"occurrences\",\r\n\t\trepeat_radio_end2: \"After\",\r\n\t\trepeat_radio_end3: \"End by\",\r\n\t\tmonth_for_recurring: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"]//\r\n\t}\r\n};\r\n\r\n","/*\r\n @Autor Manuel Fernandez Panzuela - www.mfernandez.es\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Enero\", \"Febrero\", \"Marzo\", \"Abril\", \"Mayo\", \"Junio\", \"Julio\", \"Agosto\", \"Septiembre\", \"Octubre\", \"Noviembre\", \"Diciembre\"],\r\n\t\tmonth_short: [\"Ene\", \"Feb\", \"Mar\", \"Abr\", \"May\", \"Jun\", \"Jul\", \"Ago\", \"Sep\", \"Oct\", \"Nov\", \"Dic\"],\r\n\t\tday_full: [\"Domingo\", \"Lunes\", \"Martes\", \"Miércoles\", \"Jueves\", \"Viernes\", \"Sábado\"],\r\n\t\tday_short: [\"Dom\", \"Lun\", \"Mar\", \"Mié\", \"Jue\", \"Vie\", \"Sáb\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hoy\",\r\n\t\tday_tab: \"Día\",\r\n\t\tweek_tab: \"Semana\",\r\n\t\tmonth_tab: \"Mes\",\r\n\t\tnew_event: \"Nuevo evento\",\r\n\t\ticon_save: \"Guardar\",\r\n\t\ticon_cancel: \"Cancelar\",\r\n\t\ticon_details: \"Detalles\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Eliminar\",\r\n\t\tconfirm_closing: \"\", //\"Sus cambios se perderán, continuar ?\"\r\n\t\tconfirm_deleting: \"El evento se borrará definitivamente, ¿continuar?\",\r\n\t\tsection_description: \"Descripción\",\r\n\t\tsection_time: \"Período\",\r\n\t\tfull_day: \"Todo el día\",\r\n\r\n\t\tconfirm_recurring: \"¿Desea modificar el conjunto de eventos repetidos?\",\r\n\t\tsection_recurring: \"Repita el evento\",\r\n\t\tbutton_recurring: \"Impedido\",\r\n\t\tbutton_recurring_open: \"Permitido\",\r\n\t\tbutton_edit_series: \"Editar la serie\",\r\n\t\tbutton_edit_occurrence: \"Editar este evento\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Día\",\r\n\t\tdate: \"Fecha\",\r\n\t\tdescription: \"Descripción\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Año\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Día\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Reja\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Diariamente\",\r\n\t\trepeat_radio_week: \"Semanalmente\",\r\n\t\trepeat_radio_month: \"Mensualmente\",\r\n\t\trepeat_radio_year: \"Anualmente\",\r\n\t\trepeat_radio_day_type: \"Cada\",\r\n\t\trepeat_text_day_count: \"dia\",\r\n\t\trepeat_radio_day_type2: \"Cada jornada de trabajo\",\r\n\t\trepeat_week: \" Repetir cada\",\r\n\t\trepeat_text_week_count: \"semana:\",\r\n\t\trepeat_radio_month_type: \"Repita\",\r\n\t\trepeat_radio_month_start: \"El\",\r\n\t\trepeat_text_month_day: \"dia cada \",\r\n\t\trepeat_text_month_count: \"mes\",\r\n\t\trepeat_text_month_count2_before: \"cada\",\r\n\t\trepeat_text_month_count2_after: \"mes\",\r\n\t\trepeat_year_label: \"El\",\r\n\t\tselect_year_day2: \"del\",\r\n\t\trepeat_text_year_day: \"dia\",\r\n\t\tselect_year_month: \"mes\",\r\n\t\trepeat_radio_end: \"Sin fecha de finalización\",\r\n\t\trepeat_text_occurences_count: \"ocurrencias\",\r\n\t\trepeat_radio_end3: \"Fin\",\r\n\t\trepeat_radio_end2: \"Después de\",\r\n\t\tmonth_for_recurring: [\"Enero\", \"Febrero\", \"Маrzo\", \"Аbril\", \"Mayo\", \"Junio\", \"Julio\", \"Аgosto\", \"Setiembre\", \"Octubre\", \"Noviembre\", \"Diciembre\"],\r\n\t\tday_for_recurring: [\"Domingo\", \"Lunes\", \"Martes\", \"Miércoles\", \"Jeuves\", \"Viernes\", \"Sabado\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Tammikuu\", \"Helmikuu\", \"Maaliskuu\", \"Huhtikuu\", \"Toukokuu\", \"Kesäkuu\", \"Heinäkuu\", \"Elokuu\", \"Syyskuu\", \"Lokakuu\", \"Marraskuu\", \"Joulukuu\"],\r\n\t\tmonth_short: [\"Tam\", \"Hel\", \"Maa\", \"Huh\", \"Tou\", \"Kes\", \"Hei\", \"Elo\", \"Syy\", \"Lok\", \"Mar\", \"Jou\"],\r\n\t\tday_full: [\"Sunnuntai\", \"Maanantai\", \"Tiistai\", \"Keskiviikko\", \"Torstai\", \"Perjantai\", \"Lauantai\"],\r\n\t\tday_short: [\"Su\", \"Ma\", \"Ti\", \"Ke\", \"To\", \"Pe\", \"La\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Tänään\",\r\n\t\tday_tab: \"Päivä\",\r\n\t\tweek_tab: \"Viikko\",\r\n\t\tmonth_tab: \"Kuukausi\",\r\n\t\tnew_event: \"Uusi tapahtuma\",\r\n\t\ticon_save: \"Tallenna\",\r\n\t\ticon_cancel: \"Peru\",\r\n\t\ticon_details: \"Tiedot\",\r\n\t\ticon_edit: \"Muokkaa\",\r\n\t\ticon_delete: \"Poista\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Haluatko varmasti poistaa tapahtuman?\",\r\n\t\tsection_description: \"Kuvaus\",\r\n\t\tsection_time: \"Aikajakso\",\r\n\t\tfull_day: \"Koko päivä\",\r\n\r\n\t\tconfirm_recurring: \"Haluatko varmasti muokata toistuvan tapahtuman kaikkia jaksoja?\",\r\n\t\tsection_recurring: \"Toista tapahtuma\",\r\n\t\tbutton_recurring: \"Ei käytössä\",\r\n\t\tbutton_recurring_open: \"Käytössä\",\r\n\t\tbutton_edit_series: \"Muokkaa sarja\",\r\n\t\tbutton_edit_occurrence: \"Muokkaa kopio\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Esityslista\",\r\n\t\tdate: \"Päivämäärä\",\r\n\t\tdescription: \"Kuvaus\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Vuoden\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Esityslista\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Ritilä\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Luo uusi vetämällä\",\r\n\t\tdrag_to_move:\"Siirrä vetämällä\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Päivittäin\",\r\n\t\trepeat_radio_week: \"Viikoittain\",\r\n\t\trepeat_radio_month: \"Kuukausittain\",\r\n\t\trepeat_radio_year: \"Vuosittain\",\r\n\t\trepeat_radio_day_type: \"Joka\",\r\n\t\trepeat_text_day_count: \"päivä\",\r\n\t\trepeat_radio_day_type2: \"Joka arkipäivä\",\r\n\t\trepeat_week: \"Toista joka\",\r\n\t\trepeat_text_week_count: \"viikko näinä päivinä:\",\r\n\t\trepeat_radio_month_type: \"Toista\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \"päivänä joka\",\r\n\t\trepeat_text_month_count: \"kuukausi\",\r\n\t\trepeat_text_month_count2_before: \"joka\",\r\n\t\trepeat_text_month_count2_after: \"kuukausi\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"päivä\",\r\n\t\tselect_year_month: \"kuukausi\",\r\n\t\trepeat_radio_end: \"Ei loppumisaikaa\",\r\n\t\trepeat_text_occurences_count: \"Toiston jälkeen\",\r\n\t\trepeat_radio_end3: \"Loppuu\",\r\n\t\trepeat_radio_end2: \"\",\r\n\t\tmonth_for_recurring: [\"Tammikuu\", \"Helmikuu\", \"Maaliskuu\", \"Huhtikuu\", \"Toukokuu\", \"Kesäkuu\", \"Heinäkuu\", \"Elokuu\", \"Syyskuu\", \"Lokakuu\", \"Marraskuu\", \"Joulukuu\"],\r\n\t\tday_for_recurring: [\"Sunnuntai\", \"Maanantai\", \"Tiistai\", \"Keskiviikko\", \"Torstai\", \"Perjantai\", \"Lauantai\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Janvier\", \"Février\", \"Mars\", \"Avril\", \"Mai\", \"Juin\", \"Juillet\", \"Août\", \"Septembre\", \"Octobre\", \"Novembre\", \"Décembre\"],\r\n\t\tmonth_short: [\"Jan\", \"Fév\", \"Mar\", \"Avr\", \"Mai\", \"Juin\", \"Juil\", \"Aoû\", \"Sep\", \"Oct\", \"Nov\", \"Déc\"],\r\n\t\tday_full: [\"Dimanche\", \"Lundi\", \"Mardi\", \"Mercredi\", \"Jeudi\", \"Vendredi\", \"Samedi\"],\r\n\t\tday_short: [\"Dim\", \"Lun\", \"Mar\", \"Mer\", \"Jeu\", \"Ven\", \"Sam\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Aujourd'hui\",\r\n\t\tday_tab: \"Jour\",\r\n\t\tweek_tab: \"Semaine\",\r\n\t\tmonth_tab: \"Mois\",\r\n\t\tnew_event: \"Nouvel événement\",\r\n\t\ticon_save: \"Enregistrer\",\r\n\t\ticon_cancel: \"Annuler\",\r\n\t\ticon_details: \"Détails\",\r\n\t\ticon_edit: \"Modifier\",\r\n\t\ticon_delete: \"Effacer\",\r\n\t\tconfirm_closing: \"\", //Vos modifications seront perdus, êtes-vous sûr ?\r\n\t\tconfirm_deleting: \"L'événement sera effacé sans appel, êtes-vous sûr ?\",\r\n\t\tsection_description: \"Description\",\r\n\t\tsection_time: \"Période\",\r\n\t\tfull_day: \"Journée complète\",\r\n\r\n\t\tconfirm_recurring: \"Voulez-vous éditer toute une série d'évènements répétés?\",\r\n\t\tsection_recurring: \"Périodicité\",\r\n\t\tbutton_recurring: \"Désactivé\",\r\n\t\tbutton_recurring_open: \"Activé\",\r\n\t\tbutton_edit_series: \"Modifier la série\",\r\n\t\tbutton_edit_occurrence: \"Modifier une copie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Jour\",\r\n\t\tdate: \"Date\",\r\n\t\tdescription: \"Description\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Année\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Jour\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grille\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Quotidienne\",\r\n\t\trepeat_radio_week: \"Hebdomadaire\",\r\n\t\trepeat_radio_month: \"Mensuelle\",\r\n\t\trepeat_radio_year: \"Annuelle\",\r\n\t\trepeat_radio_day_type: \"Chaque\",\r\n\t\trepeat_text_day_count: \"jour\",\r\n\t\trepeat_radio_day_type2: \"Chaque journée de travail\",\r\n\t\trepeat_week: \" Répéter toutes les\",\r\n\t\trepeat_text_week_count: \"semaine:\",\r\n\t\trepeat_radio_month_type: \"Répéter\",\r\n\t\trepeat_radio_month_start: \"Le\",\r\n\t\trepeat_text_month_day: \"jour chaque\",\r\n\t\trepeat_text_month_count: \"mois\",\r\n\t\trepeat_text_month_count2_before: \"chaque\",\r\n\t\trepeat_text_month_count2_after: \"mois\",\r\n\t\trepeat_year_label: \"Le\",\r\n\t\tselect_year_day2: \"du\",\r\n\t\trepeat_text_year_day: \"jour\",\r\n\t\tselect_year_month: \"mois\",\r\n\t\trepeat_radio_end: \"Pas de date d"achèvement\",\r\n\t\trepeat_text_occurences_count: \"occurrences\",\r\n\t\trepeat_radio_end3: \"Fin\",\r\n\t\trepeat_radio_end2: \"Après\",\r\n\t\tmonth_for_recurring: [\"Janvier\", \"Février\", \"Mars\", \"Avril\", \"Mai\", \"Juin\", \"Juillet\", \"Août\", \"Septembre\", \"Octobre\", \"Novembre\", \"Décembre\"],\r\n\t\tday_for_recurring: [\"Dimanche\", \"Lundi\", \"Mardi\", \"Mercredi\", \"Jeudi\", \"Vendredi\", \"Samedi\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"ינואר\", \"פברואר\", \"מרץ\", \"אפריל\", \"מאי\", \"יוני\", \"יולי\", \"אוגוסט\", \"ספטמבר\", \"אוקטובר\", \"נובמבר\", \"דצמבר\"],\r\n\t\tmonth_short: [\"ינו\", \"פבר\", \"מרץ\", \"אפר\", \"מאי\", \"יונ\", \"יול\", \"אוג\", \"ספט\", \"אוק\", \"נוב\", \"דצמ\"],\r\n\t\tday_full: [\"ראשון\", \"שני\", \"שלישי\", \"רביעי\", \"חמישי\", \"שישי\", \"שבת\"],\r\n\t\tday_short: [\"א\", \"ב\", \"ג\", \"ד\", \"ה\", \"ו\", \"ש\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"היום\",\r\n\t\tday_tab: \"יום\",\r\n\t\tweek_tab: \"שבוע\",\r\n\t\tmonth_tab: \"חודש\",\r\n\t\tnew_event: \"ארוע חדש\",\r\n\t\ticon_save: \"שמור\",\r\n\t\ticon_cancel: \"בטל\",\r\n\t\ticon_details: \"פרטים\",\r\n\t\ticon_edit: \"ערוך\",\r\n\t\ticon_delete: \"מחק\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"ארוע ימחק סופית.להמשיך?\",\r\n\t\tsection_description: \"תיאור\",\r\n\t\tsection_time: \"תקופה\",\r\n\r\n\t\tconfirm_recurring: \"האם ברצונך לשנות כל סדרת ארועים מתמשכים?\",\r\n\t\tsection_recurring: \"להעתיק ארוע\",\r\n\t\tbutton_recurring: \"לא פעיל\",\r\n\t\tbutton_recurring_open: \"פעיל\",\r\n\t\tfull_day: \"יום שלם\",\r\n\t\tbutton_edit_series: \"ערוך את הסדרה\",\r\n\t\tbutton_edit_occurrence: \"עריכת עותק\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"סדר יום\",\r\n\t\tdate: \"תאריך\",\r\n\t\tdescription: \"תיאור\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"לשנה\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"סדר יום\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"סורג\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"גרור כדי להזיז\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"בטל\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"הבא\",\r\n\t\tprev: \"הקודם\",\r\n\t\tyear: \"שנה\",\r\n\t\tmonth: \"חודש\",\r\n\t\tday: \"יום\",\r\n\t\thour:\"שעה\",\r\n\t\tminute: \"דקה\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"יומי\",\r\n\t\trepeat_radio_week: \"שבועי\",\r\n\t\trepeat_radio_month: \"חודשי\",\r\n\t\trepeat_radio_year: \"שנתי\",\r\n\t\trepeat_radio_day_type: \"חזור כל\",\r\n\t\trepeat_text_day_count: \"ימים\",\r\n\t\trepeat_radio_day_type2: \"חזור כל יום עבודה\",\r\n\t\trepeat_week: \" חזור כל\",\r\n\t\trepeat_text_week_count: \"שבוע לפי ימים:\",\r\n\t\trepeat_radio_month_type: \"חזור כל\",\r\n\t\trepeat_radio_month_start: \"כל\",\r\n\t\trepeat_text_month_day: \"ימים כל\",\r\n\t\trepeat_text_month_count: \"חודשים\",\r\n\t\trepeat_text_month_count2_before: \"חזור כל\",\r\n\t\trepeat_text_month_count2_after: \"חודש\",\r\n\t\trepeat_year_label: \"כל\",\r\n\t\tselect_year_day2: \"בחודש\",\r\n\t\trepeat_text_year_day: \"ימים\",\r\n\t\tselect_year_month: \"חודש\",\r\n\t\trepeat_radio_end: \"לעולם לא מסתיים\",\r\n\t\trepeat_text_occurences_count: \"אירועים\",\r\n\t\trepeat_radio_end3: \"מסתיים ב\",\r\n\t\trepeat_radio_end2: \"אחרי\",\r\n\t\tmonth_for_recurring: [\"ינואר\", \"פברואר\", \"מרץ\", \"אפריל\", \"מאי\", \"יוני\", \"יולי\", \"אוגוסט\", \"ספטמבר\", \"אוקטובר\", \"נובמבר\", \"דצמבר\"],\r\n\t\tday_for_recurring: [\"ראשון\", \"שני\", \"שלישי\", \"רביעי\", \"חמישי\", \"שישי\", \"שבת\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Január\", \"Február\", \"Március\", \"Április\", \"Május\", \"Június\", \"Július\", \"Augusztus\", \"Szeptember\", \"Október\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Már\", \"Ápr\", \"Máj\", \"Jún\", \"Júl\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Vasárnap\", \"Hétfõ\", \"Kedd\", \"Szerda\", \"Csütörtök\", \"Péntek\", \"szombat\"],\r\n\t\tday_short: [\"Va\", \"Hé\", \"Ke\", \"Sze\", \"Csü\", \"Pé\", \"Szo\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Ma\",\r\n\t\tday_tab: \"Nap\",\r\n\t\tweek_tab: \"Hét\",\r\n\t\tmonth_tab: \"Hónap\",\r\n\t\tnew_event: \"Új esemény\",\r\n\t\ticon_save: \"Mentés\",\r\n\t\ticon_cancel: \"Mégse\",\r\n\t\ticon_details: \"Részletek\",\r\n\t\ticon_edit: \"Szerkesztés\",\r\n\t\ticon_delete: \"Törlés\",\r\n\t\tconfirm_closing: \"\", //A változások elvesznek, biztosan folytatja? \"\r\n\t\tconfirm_deleting: \"Az esemény törölve lesz, biztosan folytatja?\",\r\n\t\tsection_description: \"Leírás\",\r\n\t\tsection_time: \"Idõszak\",\r\n\t\tfull_day: \"Egesz napos\",\r\n\r\n\t\t/*ismétlõdõ események*/\r\n\t\tconfirm_recurring: \"Biztosan szerkeszteni akarod az összes ismétlõdõ esemény beállítását?\",\r\n\t\tsection_recurring: \"Esemény ismétlése\",\r\n\t\tbutton_recurring: \"Tiltás\",\r\n\t\tbutton_recurring_open: \"Engedélyezés\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Szerkesztés bíróság\",\r\n\r\n\t\t/*napirendi nézet*/\r\n\t\tagenda_tab: \"Napirend\",\r\n\t\tdate: \"Dátum\",\r\n\t\tdescription: \"Leírás\",\r\n\r\n\t\t/*éves nézet*/\r\n\t\tyear_tab: \"Év\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Maret\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Agustus\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mei\", \"Jun\", \"Jul\", \"Ags\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Minggu\", \"Senin\", \"Selasa\", \"Rabu\", \"Kamis\", \"Jumat\", \"Sabtu\"],\r\n\t\tday_short: [\"Ming\", \"Sen\", \"Sel\", \"Rab\", \"Kam\", \"Jum\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hari Ini\",\r\n\t\tday_tab: \"Hari\",\r\n\t\tweek_tab: \"Minggu\",\r\n\t\tmonth_tab: \"Bulan\",\r\n\t\tnew_event: \"Acara Baru\",\r\n\t\ticon_save: \"Simpan\",\r\n\t\ticon_cancel: \"Batal\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edit\",\r\n\t\ticon_delete: \"Hapus\",\r\n\t\tconfirm_closing: \"\", /*Perubahan tidak akan disimpan ?*/\r\n\t\tconfirm_deleting: \"Acara akan dihapus\",\r\n\t\tsection_description: \"Keterangan\",\r\n\t\tsection_time: \"Periode\",\r\n\t\tfull_day: \"Hari penuh\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Apakah acara ini akan berulang?\",\r\n\t\tsection_recurring: \"Acara Rutin\",\r\n\t\tbutton_recurring: \"Tidak Difungsikan\",\r\n\t\tbutton_recurring_open: \"Difungsikan\",\r\n\t\tbutton_edit_series: \"Mengedit seri\",\r\n\t\tbutton_edit_occurrence: \"Mengedit salinan\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Tanggal\",\r\n\t\tdescription: \"Keterangan\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Tahun\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabel\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Gennaio\", \"Febbraio\", \"Marzo\", \"Aprile\", \"Maggio\", \"Giugno\", \"Luglio\", \"Agosto\", \"Settembre\", \"Ottobre\", \"Novembre\", \"Dicembre\"],\r\n\t\tmonth_short: [\"Gen\", \"Feb\", \"Mar\", \"Apr\", \"Mag\", \"Giu\", \"Lug\", \"Ago\", \"Set\", \"Ott\", \"Nov\", \"Dic\"],\r\n\t\tday_full: [\"Domenica\", \"Lunedì\", \"Martedì\", \"Mercoledì\", \"Giovedì\", \"Venerdì\", \"Sabato\"],\r\n\t\tday_short: [\"Dom\", \"Lun\", \"Mar\", \"Mer\", \"Gio\", \"Ven\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Oggi\",\r\n\t\tday_tab: \"Giorno\",\r\n\t\tweek_tab: \"Settimana\",\r\n\t\tmonth_tab: \"Mese\",\r\n\t\tnew_event: \"Nuovo evento\",\r\n\t\ticon_save: \"Salva\",\r\n\t\ticon_cancel: \"Chiudi\",\r\n\t\ticon_details: \"Dettagli\",\r\n\t\ticon_edit: \"Modifica\",\r\n\t\ticon_delete: \"Elimina\",\r\n\t\tconfirm_closing: \"\", //Le modifiche apportate saranno perse, siete sicuri?\r\n\t\tconfirm_deleting: \"L'evento sarà eliminato, siete sicuri?\",\r\n\t\tsection_description: \"Descrizione\",\r\n\t\tsection_time: \"Periodo di tempo\",\r\n\t\tfull_day: \"Intera giornata\",\r\n\r\n\t\tconfirm_recurring: \"Vuoi modificare l'intera serie di eventi?\",\r\n\t\tsection_recurring: \"Ripetere l'evento\",\r\n\t\tbutton_recurring: \"Disattivato\",\r\n\t\tbutton_recurring_open: \"Attivato\",\r\n\t\tbutton_edit_series: \"Modificare la serie\",\r\n\t\tbutton_edit_occurrence: \"Modificare una copia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descrizione\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Anno\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Griglia\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Quotidiano\",\r\n\t\trepeat_radio_week: \"Settimanale\",\r\n\t\trepeat_radio_month: \"Mensile\",\r\n\t\trepeat_radio_year: \"Annuale\",\r\n\t\trepeat_radio_day_type: \"Ogni\",\r\n\t\trepeat_text_day_count: \"giorno\",\r\n\t\trepeat_radio_day_type2: \"Ogni giornata lavorativa\",\r\n\t\trepeat_week: \" Ripetere ogni\",\r\n\t\trepeat_text_week_count: \"settimana:\",\r\n\t\trepeat_radio_month_type: \"Ripetere\",\r\n\t\trepeat_radio_month_start: \"Il\",\r\n\t\trepeat_text_month_day: \"giorno ogni\",\r\n\t\trepeat_text_month_count: \"mese\",\r\n\t\trepeat_text_month_count2_before: \"ogni\",\r\n\t\trepeat_text_month_count2_after: \"mese\",\r\n\t\trepeat_year_label: \"Il\",\r\n\t\tselect_year_day2: \"del\",\r\n\t\trepeat_text_year_day: \"giorno\",\r\n\t\tselect_year_month: \"mese\",\r\n\t\trepeat_radio_end: \"Senza data finale\",\r\n\t\trepeat_text_occurences_count: \"occorenze\",\r\n\t\trepeat_radio_end3: \"Fine\",\r\n\t\trepeat_radio_end2: \"Dopo\",\r\n\t\tmonth_for_recurring: [\"Gennaio\", \"Febbraio\", \"Marzo\", \"Aprile\", \"Maggio\", \"Jiugno\", \"Luglio\", \"Agosto\", \"Settembre\", \"Ottobre\", \"Novembre\", \"Dicembre\"],\r\n\t\tday_for_recurring: [\"Domenica\", \"Lunedì\", \"Martedì\", \"Mercoledì\", \"Jovedì\", \"Venerdì\", \"Sabato\"]\r\n\t}\r\n};\r\n","/*\r\n Translation by Genexus Japan Inc.\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tmonth_short: [ \"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tday_full: [\"日曜日\", \"月曜日\", \"火曜日\", \"水曜日\", \"木曜日\", \"金曜日\", \"土曜日\"],\r\n\t\tday_short: [\"日\", \"月\", \"火\", \"水\", \"木\", \"金\", \"土\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"今日\",\r\n\t\tday_tab: \"日\",\r\n\t\tweek_tab: \"週\",\r\n\t\tmonth_tab: \"月\",\r\n\t\tnew_event: \"新イベント\",\r\n\t\ticon_save: \"保存\",\r\n\t\ticon_cancel: \"キャンセル\",\r\n\t\ticon_details: \"詳細\",\r\n\t\ticon_edit: \"編集\",\r\n\t\ticon_delete: \"削除\",\r\n\t\tconfirm_closing: \"\", //変更が取り消されます、宜しいですか?\r\n\t\tconfirm_deleting: \"イベント完全に削除されます、宜しいですか?\",\r\n\t\tsection_description: \"デスクリプション\",\r\n\t\tsection_time: \"期間\",\r\n\t\tconfirm_recurring: \"繰り返されているイベントを全て編集しますか?\",\r\n\t\tsection_recurring: \"イベントを繰り返す\",\r\n\t\tbutton_recurring: \"無効\",\r\n\t\tbutton_recurring_open: \"有効\",\r\n\t\tfull_day: \"終日\",\r\n\t\tbutton_edit_series: \"シリーズを編集します\",\r\n\t\tbutton_edit_occurrence: \"コピーを編集\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"議題は\",\r\n\t\tdate: \"日付\",\r\n\t\tdescription: \"説明\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"今年\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"議題は\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"グリッド\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};\r\n\r\n\r\n","export default class LocaleManager{\r\n\tconstructor(config){\r\n\t\tthis._locales = {};\r\n\t\tfor(const i in config){\r\n\t\t\tthis._locales[i] = config[i];\r\n\t\t}\r\n\t}\r\n\r\n\taddLocale(name, locale) {\r\n\t\tthis._locales[name] = locale;\r\n\t}\r\n\r\n\tgetLocale(name) {\r\n\t\treturn this._locales[name];\r\n\t}\r\n}","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Mon\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"I dag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uke\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny hendelse\",\r\n\t\ticon_save: \"Lagre\",\r\n\t\ticon_cancel: \"Avbryt\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Rediger\",\r\n\t\ticon_delete: \"Slett\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Hendelsen vil bli slettet permanent. Er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du forandre hele dette settet av repeterende hendelser?\",\r\n\t\tsection_recurring: \"Repeter hendelsen\",\r\n\t\tbutton_recurring: \"Av\",\r\n\t\tbutton_recurring_open: \"På\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Redigere en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daglig\",\r\n\t\trepeat_radio_week: \"Ukentlig\",\r\n\t\trepeat_radio_month: \"Månedlig\",\r\n\t\trepeat_radio_year: \"Årlig\",\r\n\t\trepeat_radio_day_type: \"Hver\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"Alle hverdager\",\r\n\t\trepeat_week: \" Gjentas hver\",\r\n\t\trepeat_text_week_count: \"uke på:\",\r\n\t\trepeat_radio_month_type: \"På hver\",\r\n\t\trepeat_radio_month_start: \"På\",\r\n\t\trepeat_text_month_day: \"dag hver\",\r\n\t\trepeat_text_month_count: \"måned\",\r\n\t\trepeat_text_month_count2_before: \"hver\",\r\n\t\trepeat_text_month_count2_after: \"måned\",\r\n\t\trepeat_year_label: \"på\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Ingen sluttdato\",\r\n\t\trepeat_text_occurences_count: \"forekomst\",\r\n\t\trepeat_radio_end3: \"Stop den\",\r\n\t\trepeat_radio_end2: \"Etter\",\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tday_for_recurring: [\"Sondag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Maart\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Augustus\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"mrt\", \"Apr\", \"Mei\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Zondag\", \"Maandag\", \"Dinsdag\", \"Woensdag\", \"Donderdag\", \"Vrijdag\", \"Zaterdag\"],\r\n\t\tday_short: [\"Zo\", \"Ma\", \"Di\", \"Wo\", \"Do\", \"Vr\", \"Za\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Vandaag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Week\",\r\n\t\tmonth_tab: \"Maand\",\r\n\t\tnew_event: \"Nieuw item\",\r\n\t\ticon_save: \"Opslaan\",\r\n\t\ticon_cancel: \"Annuleren\",\r\n\t\ticon_details: \"Details\",\r\n\t\ticon_edit: \"Bewerken\",\r\n\t\ticon_delete: \"Verwijderen\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Item zal permanent worden verwijderd, doorgaan?\",\r\n\t\tsection_description: \"Beschrijving\",\r\n\t\tsection_time: \"Tijd periode\",\r\n\t\tfull_day: \"Hele dag\",\r\n\r\n\t\tconfirm_recurring: \"Wilt u alle terugkerende items bijwerken?\",\r\n\t\tsection_recurring: \"Item herhalen\",\r\n\t\tbutton_recurring: \"Uit\",\r\n\t\tbutton_recurring_open: \"Aan\",\r\n\t\tbutton_edit_series: \"Bewerk de serie\",\r\n\t\tbutton_edit_occurrence: \"Bewerk een kopie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Omschrijving\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Jaar\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabel\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Dagelijks\",\r\n\t\trepeat_radio_week: \"Wekelijks\",\r\n\t\trepeat_radio_month: \"Maandelijks\",\r\n\t\trepeat_radio_year: \"Jaarlijks\",\r\n\t\trepeat_radio_day_type: \"Elke\",\r\n\t\trepeat_text_day_count: \"dag(en)\",\r\n\t\trepeat_radio_day_type2: \"Elke werkdag\",\r\n\t\trepeat_week: \" Herhaal elke\",\r\n\t\trepeat_text_week_count: \"week op de volgende dagen:\",\r\n\t\trepeat_radio_month_type: \"Herhaal\",\r\n\t\trepeat_radio_month_start: \"Op\",\r\n\t\trepeat_text_month_day: \"dag iedere\",\r\n\t\trepeat_text_month_count: \"maanden\",\r\n\t\trepeat_text_month_count2_before: \"iedere\",\r\n\t\trepeat_text_month_count2_after: \"maanden\",\r\n\t\trepeat_year_label: \"Op\",\r\n\t\tselect_year_day2: \"van\",\r\n\t\trepeat_text_year_day: \"dag\",\r\n\t\tselect_year_month: \"maand\",\r\n\t\trepeat_radio_end: \"Geen eind datum\",\r\n\t\trepeat_text_occurences_count: \"keren\",\r\n\t\trepeat_radio_end3: \"Eindigd per\",\r\n\t\trepeat_radio_end2: \"Na\",\r\n\t\tmonth_for_recurring: [\"Januari\", \"Februari\", \"Maart\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Augustus\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Zondag\", \"Maandag\", \"Dinsdag\", \"Woensdag\", \"Donderdag\", \"Vrijdag\", \"Zaterdag\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Man\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uke\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny\",\r\n\t\ticon_save: \"Lagre\",\r\n\t\ticon_cancel: \"Avbryt\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Endre\",\r\n\t\ticon_delete: \"Slett\",\r\n\t\tconfirm_closing: \"Endringer blir ikke lagret, er du sikker?\", //Endringer blir ikke lagret, er du sikker?\r\n\t\tconfirm_deleting: \"Oppføringen vil bli slettet, er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\t\tfull_day: \"Full dag\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du endre hele settet med repeterende oppføringer?\",\r\n\t\tsection_recurring: \"Repeterende oppføring\",\r\n\t\tbutton_recurring: \"Ikke aktiv\",\r\n\t\tbutton_recurring_open: \"Aktiv\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Redigere en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Styczeń\", \"Luty\", \"Marzec\", \"Kwiecień\", \"Maj\", \"Czerwiec\", \"Lipiec\", \"Sierpień\", \"Wrzesień\", \"Październik\", \"Listopad\", \"Grudzień\"],\r\n\t\tmonth_short: [\"Sty\", \"Lut\", \"Mar\", \"Kwi\", \"Maj\", \"Cze\", \"Lip\", \"Sie\", \"Wrz\", \"Paź\", \"Lis\", \"Gru\"],\r\n\t\tday_full: [\"Niedziela\", \"Poniedziałek\", \"Wtorek\", \"Środa\", \"Czwartek\", \"Piątek\", \"Sobota\"],\r\n\t\tday_short: [\"Nie\", \"Pon\", \"Wto\", \"Śro\", \"Czw\", \"Pią\", \"Sob\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dziś\",\r\n\t\tday_tab: \"Dzień\",\r\n\t\tweek_tab: \"Tydzień\",\r\n\t\tmonth_tab: \"Miesiąc\",\r\n\t\tnew_event: \"Nowe zdarzenie\",\r\n\t\ticon_save: \"Zapisz\",\r\n\t\ticon_cancel: \"Anuluj\",\r\n\t\ticon_details: \"Szczegóły\",\r\n\t\ticon_edit: \"Edytuj\",\r\n\t\ticon_delete: \"Usuń\",\r\n\t\tconfirm_closing: \"\", //Zmiany zostaną usunięte, jesteś pewien?\r\n\t\tconfirm_deleting: \"Zdarzenie zostanie usunięte na zawsze, kontynuować?\",\r\n\t\tsection_description: \"Opis\",\r\n\t\tsection_time: \"Okres czasu\",\r\n\t\tfull_day: \"Cały dzień\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Czy chcesz edytować cały zbiór powtarzających się zdarzeń?\",\r\n\t\tsection_recurring: \"Powtórz zdarzenie\",\r\n\t\tbutton_recurring: \"Nieaktywne\",\r\n\t\tbutton_recurring_open: \"Aktywne\",\r\n\t\tbutton_edit_series: \"Edytuj serię\",\r\n\t\tbutton_edit_occurrence: \"Edytuj kopię\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Opis\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabela\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Codziennie\",\r\n\t\trepeat_radio_week: \"Co tydzie\",\r\n\t\trepeat_radio_month: \"Co miesic\",\r\n\t\trepeat_radio_year: \"Co rok\",\r\n\t\trepeat_radio_day_type: \"Kadego\",\r\n\t\trepeat_text_day_count: \"dnia\",\r\n\t\trepeat_radio_day_type2: \"Kadego dnia roboczego\",\r\n\t\trepeat_week: \" Powtarzaj kadego\",\r\n\t\trepeat_text_week_count: \"tygodnia w dni:\",\r\n\t\trepeat_radio_month_type: \"Powtrz\",\r\n\t\trepeat_radio_month_start: \"W\",\r\n\t\trepeat_text_month_day: \"dnia kadego\",\r\n\t\trepeat_text_month_count: \"miesica\",\r\n\t\trepeat_text_month_count2_before: \"kadego\",\r\n\t\trepeat_text_month_count2_after: \"miesica\",\r\n\t\trepeat_year_label: \"W\",\r\n\t\tselect_year_day2: \"miesica\",\r\n\t\trepeat_text_year_day: \"dnia miesica\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Bez daty kocowej\",\r\n\t\trepeat_text_occurences_count: \"wystpieniu/ach\",\r\n\t\trepeat_radio_end3: \"Zakocz w\",\r\n\t\trepeat_radio_end2: \"Po\",\r\n\t\tmonth_for_recurring: [\"Stycznia\", \"Lutego\", \"Marca\", \"Kwietnia\", \"Maja\", \"Czerwca\", \"Lipca\", \"Sierpnia\", \"Wrzenia\", \"Padziernka\", \"Listopada\", \"Grudnia\"],\r\n\t\tday_for_recurring: [\"Niedziela\", \"Poniedziaek\", \"Wtorek\", \"roda\", \"Czwartek\", \"Pitek\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","/*\r\n\r\n TRANSLATION BY MATTHEUS PIROVANI RORIZ GONЗALVES\r\n\r\n mattheusroriz@hotmail.com / mattheus.pirovani@gmail.com /\r\n\r\n www.atrixian.com.br\r\n\r\n */\r\n\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Janeiro\", \"Fevereiro\", \"Março\", \"Abril\", \"Maio\", \"Junho\", \"Julho\", \"Agosto\", \"Setembro\", \"Outubro\", \"Novembro\", \"Dezembro\"],\r\n\t\tmonth_short: [\"Jan\", \"Fev\", \"Mar\", \"Abr\", \"Mai\", \"Jun\", \"Jul\", \"Ago\", \"Set\", \"Out\", \"Nov\", \"Dez\"],\r\n\t\tday_full: [\"Domingo\", \"Segunda\", \"Terça\", \"Quarta\", \"Quinta\", \"Sexta\", \"Sábado\"],\r\n\t\tday_short: [\"Dom\", \"Seg\", \"Ter\", \"Qua\", \"Qui\", \"Sex\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hoje\",\r\n\t\tday_tab: \"Dia\",\r\n\t\tweek_tab: \"Semana\",\r\n\t\tmonth_tab: \"Mês\",\r\n\t\tnew_event: \"Novo evento\",\r\n\t\ticon_save: \"Salvar\",\r\n\t\ticon_cancel: \"Cancelar\",\r\n\t\ticon_details: \"Detalhes\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Deletar\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Tem certeza que deseja excluir?\",\r\n\t\tsection_description: \"Descrição\",\r\n\t\tsection_time: \"Período de tempo\",\r\n\t\tfull_day: \"Dia inteiro\",\r\n\r\n\t\tconfirm_recurring: \"Deseja editar todos esses eventos repetidos?\",\r\n\t\tsection_recurring: \"Repetir evento\",\r\n\t\tbutton_recurring: \"Desabilitar\",\r\n\t\tbutton_recurring_open: \"Habilitar\",\r\n\t\tbutton_edit_series: \"Editar a série\",\r\n\t\tbutton_edit_occurrence: \"Editar uma cópia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dia\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descrição\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Ano\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dia\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grade\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Diário\",\r\n\t\trepeat_radio_week: \"Semanal\",\r\n\t\trepeat_radio_month: \"Mensal\",\r\n\t\trepeat_radio_year: \"Anual\",\r\n\t\trepeat_radio_day_type: \"Cada\",\r\n\t\trepeat_text_day_count: \"dia(s)\",\r\n\t\trepeat_radio_day_type2: \"Cada trabalho diário\",\r\n\t\trepeat_week: \" Repita cada\",\r\n\t\trepeat_text_week_count: \"semana:\",\r\n\t\trepeat_radio_month_type: \"Repetir\",\r\n\t\trepeat_radio_month_start: \"Em\",\r\n\t\trepeat_text_month_day: \"todo dia\",\r\n\t\trepeat_text_month_count: \"mês\",\r\n\t\trepeat_text_month_count2_before: \"todo\",\r\n\t\trepeat_text_month_count2_after: \"mês\",\r\n\t\trepeat_year_label: \"Em\",\r\n\t\tselect_year_day2: \"of\",\r\n\t\trepeat_text_year_day: \"dia\",\r\n\t\tselect_year_month: \"mês\",\r\n\t\trepeat_radio_end: \"Sem data final\",\r\n\t\trepeat_text_occurences_count: \"ocorrências\",\r\n\t\trepeat_radio_end3: \"Fim\",\r\n\t\trepeat_radio_end2: \"Depois\",\r\n\t\tmonth_for_recurring: [\"Janeiro\", \"Fevereiro\", \"Março\", \"Abril\", \"Maio\", \"Junho\", \"Julho\", \"Agosto\", \"Setembro\", \"Outubro\", \"Novembro\", \"Dezembro\"],\r\n\t\tday_for_recurring: [\"Domingo\", \"Segunda\", \"Terça\", \"Quarta\", \"Quinta\", \"Sexta\", \"Sábado\"]\r\n\t}\r\n};\r\n\r\n\r\n","/*\r\n\tTraducere de Ovidiu Lixandru: http://www.madball.ro\r\n */\r\n\r\nexport default {\r\n\tdate:{\r\n\t\tmonth_full:[\"Ianuarie\", \"Februarie\", \"Martie\", \"Aprilie\", \"Mai\", \"Iunie\", \"Iulie\", \"August\", \"Septembrie\", \"Octombrie\", \"November\", \"December\"],\r\n\t\tmonth_short:[\"Ian\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Iun\", \"Iul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\r\n\t\tday_full:[\"Duminica\", \"Luni\", \"Marti\", \"Miercuri\", \"Joi\", \"Vineri\", \"Sambata\"],\r\n\t\tday_short:[\"Du\", \"Lu\", \"Ma\", \"Mi\", \"Jo\", \"Vi\", \"Sa\"]\r\n\t},\r\n\tlabels:{\r\n\t\tdhx_cal_today_button:\"Astazi\",\r\n\t\tday_tab:\"Zi\",\r\n\t\tweek_tab:\"Saptamana\",\r\n\t\tmonth_tab:\"Luna\",\r\n\t\tnew_event:\"Eveniment nou\",\r\n\t\ticon_save:\"Salveaza\",\r\n\t\ticon_cancel:\"Anuleaza\",\r\n\t\ticon_details:\"Detalii\",\r\n\t\ticon_edit:\"Editeaza\",\r\n\t\ticon_delete:\"Sterge\",\r\n\t\tconfirm_closing:\"Schimbarile nu vor fi salvate, esti sigur?\",//Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting:\"Evenimentul va fi sters permanent, esti sigur?\",\r\n\t\tsection_description:\"Descriere\",\r\n\t\tsection_time:\"Interval\",\r\n\t\tfull_day:\"Toata ziua\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring:\"Vrei sa editezi toata seria de evenimente repetate?\",\r\n\t\tsection_recurring:\"Repetare\",\r\n\t\tbutton_recurring:\"Dezactivata\",\r\n\t\tbutton_recurring_open:\"Activata\",\r\n\t\tbutton_edit_series: \"Editeaza serie\",\r\n\t\tbutton_edit_occurrence: \"Editeaza doar intrare\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"Agenda\",\r\n\t\tdate:\"Data\",\r\n\t\tdescription:\"Descriere\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"An\",\r\n\r\n\t\t/* week agenda extension */\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Lista\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Zilnic\",\r\n\t\trepeat_radio_week: \"Saptamanal\",\r\n\t\trepeat_radio_month: \"Lunar\",\r\n\t\trepeat_radio_year: \"Anual\",\r\n\t\trepeat_radio_day_type: \"La fiecare\",\r\n\t\trepeat_text_day_count: \"zi(le)\",\r\n\t\trepeat_radio_day_type2: \"Fiecare zi lucratoare\",\r\n\t\trepeat_week: \" Repeta la fiecare\",\r\n\t\trepeat_text_week_count: \"saptamana in urmatoarele zile:\",\r\n\t\trepeat_radio_month_type: \"Repeta in\",\r\n\t\trepeat_radio_month_start: \"In a\",\r\n\t\trepeat_text_month_day: \"zi la fiecare\",\r\n\t\trepeat_text_month_count: \"luni\",\r\n\t\trepeat_text_month_count2_before: \"la fiecare\",\r\n\t\trepeat_text_month_count2_after: \"luni\",\r\n\t\trepeat_year_label: \"In\",\r\n\t\tselect_year_day2: \"a lunii\",\r\n\t\trepeat_text_year_day: \"zi a lunii\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Fara data de sfarsit\",\r\n\t\trepeat_text_occurences_count: \"evenimente\",\r\n\t\trepeat_radio_end3: \"La data\",\r\n\t\trepeat_radio_end2: \"Dupa\",\r\n\t\tmonth_for_recurring: [\"Ianuarie\", \"Februarie\", \"Martie\", \"Aprilie\", \"Mai\", \"Iunie\", \"Iulie\", \"August\", \"Septembrie\", \"Octombrie\", \"Noiembrie\", \"Decembrie\"],\r\n\t\tday_for_recurring: [\"Duminica\", \"Luni\", \"Marti\", \"Miercuri\", \"Joi\", \"Vineri\", \"Sambata\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Январь\", \"Февраль\", \"Март\", \"Апрель\", \"Maй\", \"Июнь\", \"Июль\", \"Август\", \"Сентябрь\", \"Oктябрь\", \"Ноябрь\", \"Декабрь\"],\r\n\t\tmonth_short: [\"Янв\", \"Фев\", \"Maр\", \"Aпр\", \"Maй\", \"Июн\", \"Июл\", \"Aвг\", \"Сен\", \"Окт\", \"Ноя\", \"Дек\"],\r\n\t\tday_full: [ \"Воскресенье\", \"Понедельник\", \"Вторник\", \"Среда\", \"Четверг\", \"Пятница\", \"Суббота\"],\r\n\t\tday_short: [\"Вс\", \"Пн\", \"Вт\", \"Ср\", \"Чт\", \"Пт\", \"Сб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сегодня\",\r\n\t\tday_tab: \"День\",\r\n\t\tweek_tab: \"Неделя\",\r\n\t\tmonth_tab: \"Месяц\",\r\n\t\tnew_event: \"Новое событие\",\r\n\t\ticon_save: \"Сохранить\",\r\n\t\ticon_cancel: \"Отменить\",\r\n\t\ticon_details: \"Детали\",\r\n\t\ticon_edit: \"Изменить\",\r\n\t\ticon_delete: \"Удалить\",\r\n\t\tconfirm_closing: \"\", //Ваши изменения будут потеряны, продолжить?\r\n\t\tconfirm_deleting: \"Событие будет удалено безвозвратно, продолжить?\",\r\n\t\tsection_description: \"Описание\",\r\n\t\tsection_time: \"Период времени\",\r\n\t\tfull_day: \"Весь день\",\r\n\r\n\t\tconfirm_recurring: \"Вы хотите изменить всю серию повторяющихся событий?\",\r\n\t\tsection_recurring: \"Повторение\",\r\n\t\tbutton_recurring: \"Отключено\",\r\n\t\tbutton_recurring_open: \"Включено\",\r\n\t\tbutton_edit_series: \"Редактировать серию\",\r\n\t\tbutton_edit_occurrence: \"Редактировать экземпляр\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Список\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Описание\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Год\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Список\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Таблица\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"День\",\r\n\t\trepeat_radio_week: \"Неделя\",\r\n\t\trepeat_radio_month: \"Месяц\",\r\n\t\trepeat_radio_year: \"Год\",\r\n\t\trepeat_radio_day_type: \"Каждый\",\r\n\t\trepeat_text_day_count: \"день\",\r\n\t\trepeat_radio_day_type2: \"Каждый рабочий день\",\r\n\t\trepeat_week: \" Повторять каждую\",\r\n\t\trepeat_text_week_count: \"неделю , в:\",\r\n\t\trepeat_radio_month_type: \"Повторять\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" числа каждый \",\r\n\t\trepeat_text_month_count: \"месяц\",\r\n\t\trepeat_text_month_count2_before: \"каждый \",\r\n\t\trepeat_text_month_count2_after: \"месяц\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"день\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без даты окончания\",\r\n\t\trepeat_text_occurences_count: \"повторений\",\r\n\t\trepeat_radio_end3: \"До \",\r\n\t\trepeat_radio_end2: \"\",\r\n\t\tmonth_for_recurring: [\"Января\", \"Февраля\", \"Марта\", \"Апреля\", \"Мая\", \"Июня\", \"Июля\", \"Августа\", \"Сентября\", \"Октября\", \"Ноября\", \"Декабря\"],\r\n\t\tday_for_recurring: [\"Воскресенье\", \"Понедельник\", \"Вторник\", \"Среду\", \"Четверг\", \"Пятницу\", \"Субботу\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Marec\", \"April\", \"Maj\", \"Junij\", \"Julij\", \"Avgust\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Nedelja\", \"Ponedeljek\", \"Torek\", \"Sreda\", \"Četrtek\", \"Petek\", \"Sobota\"],\r\n\t\tday_short: [\"Ned\", \"Pon\", \"Tor\", \"Sre\", \"Čet\", \"Pet\", \"Sob\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Danes\",\r\n\t\tday_tab: \"Dan\",\r\n\t\tweek_tab: \"Teden\",\r\n\t\tmonth_tab: \"Mesec\",\r\n\t\tnew_event: \"Nov dogodek\",\r\n\t\ticon_save: \"Shrani\",\r\n\t\ticon_cancel: \"Prekliči\",\r\n\t\ticon_details: \"Podrobnosti\",\r\n\t\ticon_edit: \"Uredi\",\r\n\t\ticon_delete: \"Izbriši\",\r\n\t\tconfirm_closing: \"\", //Spremembe ne bodo shranjene. Želite nadaljevati ?\r\n\t\tconfirm_deleting: \"Dogodek bo izbrisan. Želite nadaljevati?\",\r\n\t\tsection_description: \"Opis\",\r\n\t\tsection_time: \"Časovni okvir\",\r\n\t\tfull_day: \"Ves dan\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Želite urediti celoten set ponavljajočih dogodkov?\",\r\n\t\tsection_recurring: \"Ponovi dogodek\",\r\n\t\tbutton_recurring: \"Onemogočeno\",\r\n\t\tbutton_recurring_open: \"Omogočeno\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Edit occurrence\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Zadeva\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Opis\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Leto\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Zadeva\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Miza\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Január\", \"Február\", \"Marec\", \"Apríl\", \"Máj\", \"Jún\", \"Júl\", \"August\", \"September\", \"Október\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Máj\", \"Jún\", \"Júl\", \"Aug\", \"Sept\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Nedeľa\", \"Pondelok\", \"Utorok\", \"Streda\", \"Štvrtok\", \"Piatok\", \"Sobota\"],\r\n\t\tday_short: [\"Ne\", \"Po\", \"Ut\", \"St\", \"Št\", \"Pi\", \"So\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dnes\",\r\n\t\tday_tab: \"Deň\",\r\n\t\tweek_tab: \"Týždeň\",\r\n\t\tmonth_tab: \"Mesiac\",\r\n\t\tnew_event: \"Nová udalosť\",\r\n\t\ticon_save: \"Uložiť\",\r\n\t\ticon_cancel: \"Späť\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edituj\",\r\n\t\ticon_delete: \"Zmazať\",\r\n\t\tconfirm_closing: \"Vaše zmeny nebudú uložené. Skutočne?\", //Vaše změny budou ztraceny, opravdu ?\r\n\t\tconfirm_deleting: \"Udalosť bude natrvalo vymazaná. Skutočne?\",\r\n\t\tsection_description: \"Poznámky\",\r\n\t\tsection_time: \"Doba platnosti\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Prajete si upraviť celú radu opakovaných udalostí?\",\r\n\t\tsection_recurring: \"Opakovanie udalosti\",\r\n\t\tbutton_recurring: \"Vypnuté\",\r\n\t\tbutton_recurring_open: \"Zapnuté\",\r\n\t\tbutton_edit_series: \"Upraviť opakovania\",\r\n\t\tbutton_edit_occurrence: \"Upraviť inštancie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Program\",\r\n\t\tdate: \"Dátum\",\r\n\t\tdescription: \"Poznámka\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\t\tfull_day: \"Celý deň\", // Full day\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Program\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Mriežka\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Denne\",\r\n\t\trepeat_radio_week: \"Týždenne\",\r\n\t\trepeat_radio_month: \"Mesaène\",\r\n\t\trepeat_radio_year: \"Roène\",\r\n\t\trepeat_radio_day_type: \"Každý\",\r\n\t\trepeat_text_day_count: \"deò\",\r\n\t\trepeat_radio_day_type2: \"Každý prac. deò\",\r\n\t\trepeat_week: \"Opakova každý\",\r\n\t\trepeat_text_week_count: \"týždeò v dòoch:\",\r\n\t\trepeat_radio_month_type: \"Opakova\",\r\n\t\trepeat_radio_month_start: \"On\",\r\n\t\trepeat_text_month_day: \"deò každý\",\r\n\t\trepeat_text_month_count: \"mesiac\",\r\n\t\trepeat_text_month_count2_before: \"každý\",\r\n\t\trepeat_text_month_count2_after: \"mesiac\",\r\n\t\trepeat_year_label: \"On\",\r\n\t\tselect_year_day2: \"poèas\",\r\n\t\trepeat_text_year_day: \"deò\",\r\n\t\tselect_year_month: \"mesiac\",\r\n\t\trepeat_radio_end: \"Bez dátumu ukonèenia\",\r\n\t\trepeat_text_occurences_count: \"udalostiach\",\r\n\t\trepeat_radio_end3: \"Ukonèi\",\r\n\t\trepeat_radio_end2: \"Po\",\r\n\t\tmonth_for_recurring: [\"Január\", \"Február\", \"Marec\", \"Apríl\", \"Máj\", \"Jún\", \"Júl\", \"August\", \"September\", \"Október\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Nede¾a\", \"Pondelok\", \"Utorok\", \"Streda\", \"Štvrtok\", \"Piatok\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Mars\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"Augusti\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Söndag\", \"Måndag\", \"Tisdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lördag\"],\r\n\t\tday_short: [\"Sön\", \"Mån\", \"Tis\", \"Ons\", \"Tor\", \"Fre\", \"Lör\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Vecka\",\r\n\t\tmonth_tab: \"Månad\",\r\n\t\tnew_event: \"Ny händelse\",\r\n\t\ticon_save: \"Spara\",\r\n\t\ticon_cancel: \"Ångra\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Ändra\",\r\n\t\ticon_delete: \"Ta bort\",\r\n\t\tconfirm_closing: \"\", //Dina förändingar kommer gå förlorade, är du säker?\r\n\t\tconfirm_deleting: \"Är du säker på att du vill ta bort händelsen permanent?\",\r\n\t\tsection_description: \"Beskrivning\",\r\n\t\tsection_time: \"Tid\",\r\n\t\tfull_day: \"Hela dagen\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vill du redigera hela serien med repeterande händelser?\",\r\n\t\tsection_recurring: \"Upprepa händelse\",\r\n\t\tbutton_recurring: \"Inaktiverat\",\r\n\t\tbutton_recurring_open: \"Aktiverat\",\r\n\t\tbutton_edit_series: \"Redigera serien\",\r\n\t\tbutton_edit_occurrence: \"Redigera en kopia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dagordning\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Beskrivning\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dagordning\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Galler\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Dra för att skapa ny\",\r\n\t\tdrag_to_move:\"Dra för att flytta\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Dagligen\",\r\n\t\trepeat_radio_week: \"Veckovis\",\r\n\t\trepeat_radio_month: \"Månadsvis\",\r\n\t\trepeat_radio_year: \"Årligen\",\r\n\t\trepeat_radio_day_type: \"Var\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"Varje arbetsdag\",\r\n\t\trepeat_week: \" Upprepa var\",\r\n\t\trepeat_text_week_count: \"vecka dessa dagar:\",\r\n\t\trepeat_radio_month_type: \"Upprepa\",\r\n\t\trepeat_radio_month_start: \"Den\",\r\n\t\trepeat_text_month_day: \"dagen var\",\r\n\t\trepeat_text_month_count: \"månad\",\r\n\t\trepeat_text_month_count2_before: \"var\",\r\n\t\trepeat_text_month_count2_after: \"månad\",\r\n\t\trepeat_year_label: \"Den\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"månad\",\r\n\t\trepeat_radio_end: \"Inget slutdatum\",\r\n\t\trepeat_text_occurences_count: \"upprepningar\",\r\n\t\trepeat_radio_end3: \"Sluta efter\",\r\n\t\trepeat_radio_end2: \"Efter\",\r\n\t\tmonth_for_recurring: [\"Januari\", \"Februari\", \"Mars\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"Augusti\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Söndag\", \"Måndag\", \"Tisdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lördag\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Ocak\", \"Þubat\", \"Mart\", \"Nisan\", \"Mayýs\", \"Haziran\", \"Temmuz\", \"Aðustos\", \"Eylül\", \"Ekim\", \"Kasým\", \"Aralýk\"],\r\n\t\tmonth_short: [\"Oca\", \"Þub\", \"Mar\", \"Nis\", \"May\", \"Haz\", \"Tem\", \"Aðu\", \"Eyl\", \"Eki\", \"Kas\", \"Ara\"],\r\n\t\tday_full: [\"Pazar\", \"Pazartes,\", \"Salý\", \"Çarþamba\", \"Perþembe\", \"Cuma\", \"Cumartesi\"],\r\n\t\tday_short: [\"Paz\", \"Pts\", \"Sal\", \"Çar\", \"Per\", \"Cum\", \"Cts\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Bugün\",\r\n\t\tday_tab: \"Gün\",\r\n\t\tweek_tab: \"Hafta\",\r\n\t\tmonth_tab: \"Ay\",\r\n\t\tnew_event: \"Uygun\",\r\n\t\ticon_save: \"Kaydet\",\r\n\t\ticon_cancel: \"Ýptal\",\r\n\t\ticon_details: \"Detaylar\",\r\n\t\ticon_edit: \"Düzenle\",\r\n\t\ticon_delete: \"Sil\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Etkinlik silinecek, devam?\",\r\n\t\tsection_description: \"Açýklama\",\r\n\t\tsection_time: \"Zaman aralýðý\",\r\n\t\tfull_day: \"Tam gün\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Tüm tekrar eden etkinlikler silinecek, devam?\",\r\n\t\tsection_recurring: \"Etkinliði tekrarla\",\r\n\t\tbutton_recurring: \"Pasif\",\r\n\t\tbutton_recurring_open: \"Aktif\",\r\n\t\tbutton_edit_series: \"Dizi düzenleme\",\r\n\t\tbutton_edit_occurrence: \"Bir kopyasını düzenleyin\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Ajanda\",\r\n\t\tdate: \"Tarih\",\r\n\t\tdescription: \"Açýklama\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Yýl\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Ajanda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Izgara\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Січень\", \"Лютий\", \"Березень\", \"Квітень\", \"Травень\", \"Червень\", \"Липень\", \"Серпень\", \"Вересень\", \"Жовтень\", \"Листопад\", \"Грудень\"],\r\n\t\tmonth_short: [\"Січ\", \"Лют\", \"Бер\", \"Кві\", \"Тра\", \"Чер\", \"Лип\", \"Сер\", \"Вер\", \"Жов\", \"Лис\", \"Гру\"],\r\n\t\tday_full: [\"Неділя\", \"Понеділок\", \"Вівторок\", \"Середа\", \"Четвер\", \"П'ятниця\", \"Субота\"],\r\n\t\tday_short: [\"Нед\", \"Пон\", \"Вів\", \"Сер\", \"Чет\", \"Птн\", \"Суб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сьогодні\",\r\n\t\tday_tab: \"День\",\r\n\t\tweek_tab: \"Тиждень\",\r\n\t\tmonth_tab: \"Місяць\",\r\n\t\tnew_event: \"Нова подія\",\r\n\t\ticon_save: \"Зберегти\",\r\n\t\ticon_cancel: \"Відміна\",\r\n\t\ticon_details: \"Деталі\",\r\n\t\ticon_edit: \"Редагувати\",\r\n\t\ticon_delete: \"Вилучити\",\r\n\t\tconfirm_closing: \"\", //Ваші зміни втратяться. Ви впевнені ?\r\n\t\tconfirm_deleting: \"Подія вилучиться назавжди. Ви впевнені?\",\r\n\t\tsection_description: \"Опис\",\r\n\t\tsection_time: \"Часовий проміжок\",\r\n\t\tfull_day: \"Весь день\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Хочете редагувати весь перелік повторюваних подій?\",\r\n\t\tsection_recurring: \"Повторювана подія\",\r\n\t\tbutton_recurring: \"Відключено\",\r\n\t\tbutton_recurring_open: \"Включено\",\r\n\t\tbutton_edit_series: \"Редагувати серію\",\r\n\t\tbutton_edit_occurrence: \"Редагувати примірник\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Перелік\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Опис\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Рік\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Перелік\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Таблиця\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"День\",\r\n\t\trepeat_radio_week: \"Тиждень\",\r\n\t\trepeat_radio_month: \"Місяць\",\r\n\t\trepeat_radio_year: \"Рік\",\r\n\t\trepeat_radio_day_type: \"Кожний\",\r\n\t\trepeat_text_day_count: \"день\",\r\n\t\trepeat_radio_day_type2: \"Кожний робочий день\",\r\n\t\trepeat_week: \" Повторювати кожен\",\r\n\t\trepeat_text_week_count: \"тиждень , по:\",\r\n\t\trepeat_radio_month_type: \"Повторювати\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" числа кожний \",\r\n\t\trepeat_text_month_count: \"місяць\",\r\n\t\trepeat_text_month_count2_before: \"кожен \",\r\n\t\trepeat_text_month_count2_after: \"місяць\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"день\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без дати закінчення\",\r\n\t\trepeat_text_occurences_count: \"повторень\",\r\n\t\trepeat_radio_end3: \"До \",\r\n\t\trepeat_radio_end2: \"\",\r\n\t\tmonth_for_recurring: [\"січня\", \"лютого\", \"березня\", \"квітня\", \"травня\", \"червня\", \"липня\", \"серпня\", \"вересня\", \"жовтня\", \"листопада\", \"грудня\"],\r\n\t\tday_for_recurring: [\"Неділям\", \"Понеділкам\", \"Вівторкам\", \"Середам\", \"Четвергам\", \"П'ятницям\", \"Суботам\"]\r\n\t}\r\n};\r\n","import ar from \"./locale_ar\";\r\nimport be from \"./locale_be\";\r\nimport ca from \"./locale_ca\";\r\nimport cn from \"./locale_cn\";\r\nimport cs from \"./locale_cs\";\r\nimport da from \"./locale_da\";\r\nimport de from \"./locale_de\";\r\nimport el from \"./locale_el\";\r\nimport en from \"./locale_en\";\r\nimport es from \"./locale_es\";\r\nimport fi from \"./locale_fi\";\r\nimport fr from \"./locale_fr\";\r\nimport he from \"./locale_he\";\r\nimport hu from \"./locale_hu\";\r\nimport id from \"./locale_id\";\r\nimport it from \"./locale_it\";\r\nimport jp from \"./locale_jp\";\r\n\r\nimport LocaleManager from \"./locale_manager\";\r\n\r\nimport nb from \"./locale_nb\";\r\nimport nl from \"./locale_nl\";\r\nimport no from \"./locale_no\";\r\nimport pl from \"./locale_pl\";\r\nimport pt from \"./locale_pt\";\r\nimport ro from \"./locale_ro\";\r\nimport ru from \"./locale_ru\";\r\nimport si from \"./locale_si\";\r\nimport sk from \"./locale_sk\";\r\nimport sv from \"./locale_sv\";\r\nimport tr from \"./locale_tr\";\r\nimport ua from \"./locale_ua\";\r\n\r\nexport default function(){\r\n\treturn new LocaleManager({\r\n\t\ten,\r\n\t\tar,\r\n\t\tbe,\r\n\t\tca,\r\n\t\tcn,\r\n\t\tcs,\r\n\t\tda,\r\n\t\tde,\r\n\t\tel,\r\n\t\tes,\r\n\t\tfi,\r\n\t\tfr,\r\n\t\the,\r\n\t\thu,\r\n\t\tid,\r\n\t\tit,\r\n\t\tjp,\r\n\t\tnb,\r\n\t\tnl,\r\n\t\tno,\r\n\t\tpl,\r\n\t\tpt,\r\n\t\tro,\r\n\t\tru,\r\n\t\tsi,\r\n\t\tsk,\r\n\t\tsv,\r\n\t\ttr,\r\n\t\tua\r\n\t});\r\n}","import eventable from \"../utils/eventable\";\r\n\r\nexport class DatePicker {\r\n\tconstructor(scheduler, container, state = {}) {\r\n\t\tthis.state = {\r\n\t\t\tdate: new Date(),\r\n\t\t\tmodes: ['days', 'months', 'years'],\r\n\t\t\tcurrentRange: [],\r\n\t\t\teventDates: [],\r\n\t\t\tcurrentModeIndex: 0,\r\n\t\t\t...state\r\n\t\t};\r\n\t\tthis.container = null;\r\n\t\tthis.element = null;\r\n\t\tthis.onStateChangeHandlers = [];\r\n\t\tthis.scheduler = scheduler;\r\n\t\tthis._domEvents = scheduler._createDomEventScope();\r\n\t\tthis.state = this.getState();\r\n\t\teventable(this);\r\n\t\tif(container){\r\n\r\n\t\t\tthis.container = container;\r\n\t\t\tthis.render(this.container);\r\n\t\t}\r\n\r\n\t\tthis.onStateChange((oldState, newState) => {\r\n\t\t\tthis.callEvent(\"onStateChange\", [newState, oldState]);\r\n\t\t});\r\n\t}\r\n\r\n\tgetState() {\r\n\t\treturn { \r\n\t\t\t...this.state,\r\n\t\t\tmode: this.state.modes[this.state.currentModeIndex]\r\n\t\t};\r\n\t}\r\n\r\n\tsetState(newState) {\r\n\t\tconst oldState = { ...this.state };\r\n\t\tif(newState.mode){\r\n\t\t\tnewState.currentModeIndex = this.state.modes.indexOf(newState.mode);\r\n\t\t}\r\n\t\tthis.state = { ...this.state, ...newState };\r\n\r\n\t\tthis._notifyStateChange(oldState, this.state);\r\n\r\n\t\tif (this.container) {\r\n\t\t\tthis.render(this.container);\r\n\t\t}\r\n\t}\r\n\r\n\tonStateChange(handler) {\r\n\t\tthis.onStateChangeHandlers.push(handler);\r\n\r\n\t\t// function to remove the handler\r\n\t\treturn () => {\r\n\t\t\tconst index = this.onStateChangeHandlers.indexOf(handler);\r\n\t\t\tif (index !== -1) {\r\n\t\t\t\tthis.onStateChangeHandlers.splice(index, 1);\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n\r\n\t_notifyStateChange(oldState, newState) {\r\n\t\tthis.onStateChangeHandlers.forEach(handler => handler(oldState, newState));\r\n\t}\r\n\r\n\t_adjustDate(direction) {\r\n\r\n\t\tconst {mode, date} = this.getState();\r\n\t\tconst newDate = new Date(date);\r\n\t\tif (mode === 'days') {\r\n\t\t\tnewDate.setMonth(date.getMonth() + direction);\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tnewDate.setFullYear(date.getFullYear() + direction);\r\n\t\t} else {\r\n\t\t\tnewDate.setFullYear(date.getFullYear() + direction * 10);\r\n\t\t}\r\n\t\tthis.setState({ date: newDate });\r\n\t}\r\n\r\n\t_toggleMode() {\r\n\t\tconst newIndex = (this.state.currentModeIndex + 1) % this.state.modes.length;\r\n\t\tthis.setState({ currentModeIndex: newIndex });\r\n\t}\r\n\r\n\t_renderCalendarHeader(container) {\r\n\t\tconst {mode, date} = this.getState();\r\n\r\n\t\tconst header = document.createElement('div');\r\n\t\theader.classList.add('dhx_cal_datepicker_header');\r\n\r\n\t\tconst backwardArrow = document.createElement('button');\r\n\r\n\t\tbackwardArrow.classList.add(\"dhx_cal_datepicker_arrow\", \"scheduler_icon\", \"arrow_left\");\r\n\t\theader.appendChild(backwardArrow);\r\n\r\n\t\tconst monthLabel = document.createElement('div');\r\n\t\tmonthLabel.classList.add('dhx_cal_datepicker_title');\r\n\r\n\t\tif (mode === 'days') {\r\n\t\t\tmonthLabel.innerText = date.toLocaleString('default', { month: 'long' }) + ' ' + date.getFullYear();\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tmonthLabel.innerText = date.getFullYear();\r\n\t\t} else {\r\n\t\t\tconst startYear = Math.floor(date.getFullYear() / 10) * 10;\r\n\t\t\tmonthLabel.innerText = `${startYear} - ${startYear + 9}`;\r\n\t\t}\r\n\r\n\t\tthis._domEvents.attach(monthLabel, \"click\", this._toggleMode.bind(this));\r\n\t\theader.appendChild(monthLabel);\r\n\r\n\t\tconst forwardArrow = document.createElement('button');\r\n\r\n\t\tforwardArrow.classList.add(\"dhx_cal_datepicker_arrow\", \"scheduler_icon\", \"arrow_right\");\r\n\t\theader.appendChild(forwardArrow);\r\n\r\n\t\tcontainer.appendChild(header);\r\n\r\n\t\tthis._domEvents.attach(backwardArrow, \"click\", this._adjustDate.bind(this, -1));\r\n\t\tthis._domEvents.attach(forwardArrow, \"click\", this._adjustDate.bind(this, 1));\r\n\t}\r\n\r\n\trender(container) {\r\n\t\tthis._domEvents.detachAll();\r\n\t\tthis.container = container || this.container; \r\n\t\tthis.container.innerHTML = '';\r\n\r\n\t\tif(!this.element){\r\n\t\t\tthis.element = document.createElement(\"div\");\r\n\t\t\tthis.element.classList.add(\"dhx_cal_datepicker\");\r\n\t\t}\r\n\t\tthis.element.innerHTML = '';\r\n\t\tthis.container.appendChild(this.element);\r\n\r\n\t\tthis._renderCalendarHeader(this.element);\r\n\t\tconst dataContainer = document.createElement(\"div\");\r\n\t\tdataContainer.classList.add(\"dhx_cal_datepicker_data\");\r\n\t\tthis.element.appendChild(dataContainer);\r\n\r\n\t\tconst {mode} = this.getState();\r\n\t\tif (mode === 'days') {\r\n\t\t\tthis._renderDayGrid(dataContainer);\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tthis._renderMonthGrid(dataContainer);\r\n\t\t} else {\r\n\t\t\tthis._renderYearGrid(dataContainer);\r\n\t\t}\r\n\t}\r\n\r\n\t_renderDayGridHeader(daysOfWeekContainer) {\r\n\t\tconst {date} = this.getState();\r\n\t\tconst scheduler = this.scheduler;\r\n\r\n\t\tlet currentDate = scheduler.date.week_start(new Date(date));\r\n\t\tconst maxDate = scheduler.date.add(scheduler.date.week_start(new Date(date)), 1, 'week');\r\n\r\n\t\tdaysOfWeekContainer.classList.add('dhx_cal_datepicker_days');\r\n\r\n\t\tconst labelFormat = scheduler.date.date_to_str(\"%D\");\r\n\r\n\t\twhile (currentDate.valueOf() < maxDate.valueOf()) {\r\n\t\t\tconst label = labelFormat(currentDate);\r\n\r\n\t\t\tconst dayElement = document.createElement('div');\r\n\t\t\tdayElement.setAttribute(\"data-day\", currentDate.getDay());\r\n\t\t\tdayElement.classList.add('dhx_cal_datepicker_dayname');\r\n\t\t\tdayElement.innerText = label;\r\n\t\t\tdaysOfWeekContainer.appendChild(dayElement);\r\n\r\n\t\t\tcurrentDate = scheduler.date.add(currentDate, 1, 'day');\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t_weeksBetween(min, max) {\r\n\t\tconst scheduler = this.scheduler;\r\n\t\tlet weeks = 0;\r\n\t\tlet currWeek = new Date(min);\r\n\t\twhile(currWeek.valueOf() < max.valueOf()){\r\n\t\t\tweeks += 1;\r\n\t\t\tcurrWeek = scheduler.date.week_start(scheduler.date.add(currWeek, 1, \"week\"));\r\n\t\t}\r\n\t\treturn weeks;\r\n\t}\r\n\r\n\t_renderDayGrid(container) {\r\n\t\tconst {date, currentRange, eventDates, minWeeks} = this.getState();\r\n\r\n\t\tlet minSchedulerDate = currentRange[0];\r\n\t\tlet maxSchedulerDate = currentRange[1];\r\n\r\n\t\tconst eventDaysTable = eventDates.reduce((acc, date) => {\r\n\t\t\tconst dayStart = this.scheduler.date.day_start(new Date(date));\r\n\t\t\tacc[dayStart.valueOf()] = true;\r\n\t\t\treturn acc;\r\n\t\t}, {});\r\n\r\n\r\n\t\t// Render Days of the Week\r\n\t\tconst daysOfWeekContainer = document.createElement('div');\r\n\t\tthis._renderDayGridHeader(daysOfWeekContainer);\r\n\t\tcontainer.appendChild(daysOfWeekContainer);\r\n\r\n\t\tconst scheduler = this.scheduler;\r\n\t\tconst firstDate = scheduler.date.week_start(scheduler.date.month_start(new Date(date)));\r\n\t\tconst monthStart = scheduler.date.month_start(new Date(date));\r\n\t\tconst monthEnd = scheduler.date.add(scheduler.date.month_start(new Date(date)), 1, 'month');\r\n\t\tlet lastDate = scheduler.date.add(scheduler.date.month_start(new Date(date)), 1, 'month');\r\n\t\tif(lastDate.getDay() !== 0){\r\n\t\t\tlastDate = scheduler.date.add(scheduler.date.week_start(lastDate), 1, \"week\");\r\n\t\t}\r\n\r\n\t\tlet weeks = this._weeksBetween(firstDate, lastDate);\r\n\t\tif(minWeeks && weeks < minWeeks){\r\n\t\t\tlastDate = scheduler.date.add(lastDate, (minWeeks - weeks), \"week\");\r\n\t\t}\r\n\r\n\t\tlet currDate = firstDate;\r\n\r\n\t\tconst dayGridContainer = document.createElement('div');\r\n\t\tdayGridContainer.classList.add('dhx_cal_datepicker_days');\r\n\r\n\t\tthis._domEvents.attach(dayGridContainer, \"click\", (event) => {\r\n\t\t\tconst dateCell = event.target.closest(\"[data-cell-date]\");\r\n\t\t\tconst date = new Date(dateCell.getAttribute(\"data-cell-date\"));\r\n\t\t\tthis.callEvent(\"onDateClick\", [date, event]);\r\n\t\t});\r\n\r\n\t\twhile(currDate.valueOf() < lastDate.valueOf()){\r\n\t\t\tconst dayElement = document.createElement('div');\r\n\t\t\tdayElement.setAttribute(\"data-cell-date\", scheduler.templates.format_date(currDate));\r\n\t\t\tdayElement.setAttribute(\"data-day\", currDate.getDay());\r\n\t\t\tdayElement.innerHTML = currDate.getDate();\r\n\r\n\t\t\tif(currDate.valueOf() < monthStart.valueOf()){\r\n\t\t\t\tdayElement.classList.add('dhx_before');\r\n\t\t\t}else if(currDate.valueOf() >= monthEnd.valueOf()){\t\r\n\t\t\t\tdayElement.classList.add('dhx_after');\r\n\t\t\t}\r\n\r\n\t\t\tif(currDate.getDay() === 0 || currDate.getDay() === 6){\r\n\t\t\t\tdayElement.classList.add(\"dhx_cal_datepicker_weekend\");\r\n\t\t\t}\r\n\r\n\t\t\tif(minSchedulerDate && maxSchedulerDate){\r\n\t\t\t\tif(currDate.valueOf() >= minSchedulerDate.valueOf() && currDate.valueOf() < maxSchedulerDate.valueOf()){\r\n\t\t\t\t\tdayElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(eventDaysTable[currDate.valueOf()]){\r\n\t\t\t\tdayElement.classList.add('dhx_cal_datepicker_event');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdayElement.classList.add('dhx_cal_datepicker_date');\r\n\r\n\t\t\tdayGridContainer.appendChild(dayElement);\r\n\t\t\tcurrDate = scheduler.date.add(currDate, 1, 'day');\r\n\t\t}\r\n\r\n\t\tcontainer.appendChild(dayGridContainer);\r\n\r\n\t}\r\n\r\n\t_renderMonthGrid(container) {\r\n\t\tconst {date} = this.getState();\r\n\r\n\t\tconst wrapper = document.createElement('div');\r\n\t\twrapper.classList.add(\"dhx_cal_datepicker_months\");\r\n\r\n\t\tconst months = [];\r\n\t\tfor(let i = 0; i < 12; i++){\r\n\t\t\tmonths.push(new Date(date.getFullYear(), i, 1));\r\n\t\t}\r\n\r\n\t\tconst formatLabel = this.scheduler.date.date_to_str(\"%M\");\r\n\t\tmonths.forEach(month => {\r\n\t\t\tconst monthElement = document.createElement('div');\r\n\t\t\tmonthElement.classList.add('dhx_cal_datepicker_month');\r\n\t\t\tif(date.getMonth() === month.getMonth()){\r\n\t\t\t\tmonthElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t}\r\n\t\t\tmonthElement.setAttribute(\"data-month\", month.getMonth());\r\n\t\t\tmonthElement.innerHTML = formatLabel(month);\r\n\t\t\tthis._domEvents.attach(monthElement, \"click\", () => {\r\n\t\t\t\tconst newDate = new Date(month);\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\tdate: newDate,\r\n\t\t\t\t\tmode: 'days'\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\twrapper.appendChild(monthElement);\r\n\t\t});\r\n\t\tcontainer.appendChild(wrapper);\r\n\r\n\t\tconst doneArea = document.createElement(\"div\");\r\n\t\tdoneArea.classList.add(\"dhx_cal_datepicker_done\");\r\n\t\tconst doneBtn = document.createElement(\"button\");\r\n\t\tdoneBtn.innerText = \"Done\";\r\n\t\tdoneBtn.classList.add(\"dhx_cal_datepicker_done_btn\");\r\n\t\tthis._domEvents.attach(doneBtn, \"click\", () => {\r\n\t\t\tthis.setState({\r\n\t\t\t\tmode: 'days'\r\n\t\t\t});\r\n\t\t});\r\n\t\tdoneArea.appendChild(doneBtn);\r\n\t\tcontainer.appendChild(doneArea);\r\n\t}\r\n\r\n\t_renderYearGrid(container) {\r\n\t\tconst {date} = this.getState();\r\n\t\tconst startYear = Math.floor(date.getFullYear() / 10) * 10;\r\n\t\t\r\n\t\tconst wrapper = document.createElement('div');\r\n\t\twrapper.classList.add(\"dhx_cal_datepicker_years\");\r\n\t\tfor (let i = startYear - 1; i <= startYear + 10; i++) {\r\n\t\t\tconst yearElement = document.createElement('div');\r\n\t\t\tyearElement.innerText = i;\r\n\t\t\tyearElement.classList.add('dhx_cal_datepicker_year');\r\n\t\t\tyearElement.setAttribute(\"data-year\", i);\r\n\t\t\tif(date.getFullYear() === i){\r\n\t\t\t\tyearElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t}\r\n\t\t\tthis._domEvents.attach(yearElement, \"click\", () => {\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\tdate: new Date(i, date.getMonth(), 1),\r\n\t\t\t\t\tmode: 'months'\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\twrapper.appendChild(yearElement);\r\n\t\t\t\r\n\t\t}\r\n\t\tcontainer.appendChild(wrapper);\r\n\r\n\t\tconst doneArea = document.createElement(\"div\");\r\n\t\tdoneArea.classList.add(\"dhx_cal_datepicker_done\");\r\n\t\tconst doneBtn = document.createElement(\"button\");\r\n\t\tdoneBtn.innerText = \"Done\";\r\n\t\tdoneBtn.classList.add(\"dhx_cal_datepicker_done_btn\");\r\n\t\tthis._domEvents.attach(doneBtn, \"click\", () => {\r\n\t\t\tthis.setState({\r\n\t\t\t\tmode: 'months'\r\n\t\t\t});\r\n\t\t});\r\n\t\tdoneArea.appendChild(doneBtn);\r\n\t\tcontainer.appendChild(doneArea);\r\n\t}\r\n\r\n\tdestructor(){\r\n\t\tthis.onStateChangeHandlers = [];\r\n\t\tif(this.element){\r\n\t\t\tthis.element.innerHTML = '';\r\n\t\t\tthis.element.remove();\r\n\t\t}\r\n\r\n\t\tthis._domEvents.detachAll();\r\n\t\tthis.callEvent(\"onDestroy\", []);\r\n\t\tthis.detachAllEvents();\r\n\r\n\t\tthis.scheduler = null;\r\n\t}\r\n}","// import \"./css/dhtmlxscheduler_terrace\";\r\n// import \"./css/dhtmlxscheduler_material\";\r\n// import \"./css/dhtmlxscheduler_material_nofont\";\r\n// import \"./css/dhtmlxscheduler_flat\";\r\n// import \"./css/dhtmlxscheduler_contrast_black\";\r\n// import \"./css/dhtmlxscheduler_contrast_white\";\r\n\r\n\r\nimport assert from \"./core/common/assert\";\r\nimport common_errors from \"./core/common_errors\";\r\nimport connector from \"./core/connector\";\r\nimport schedulerCore from \"./core/scheduler\";\r\nimport common from \"./core/common\";\r\nimport wai_aria from \"./core/wai_aria\";\r\nimport utils from \"./core/utils/utils\";\r\nimport dom_helpers from \"./core/utils/dom_helpers\";\r\nimport env from \"./utils/env\";\r\nimport destructor from \"./core/destructor\";\r\nimport ajax from \"./core/utils/ajax\";\r\nimport base from \"./core/base\";\r\nimport config from \"./core/config\";\r\nimport event from \"./core/event\";\r\nimport event_highlight from \"./core/event_highlight\";\r\nimport load from \"./core/load\";\r\nimport lightbox from \"./core/lightbox\";\r\nimport touch from \"./core/touch\";\r\nimport dhtmlx_suite_hooks from \"./core/dhtmlx/dhtmlx_suite_hooks\";\r\nimport skins from \"./core/skins\";\r\nimport jquery from \"./core/jquery\";\r\nimport delay_render from \"./core/delay_render\";\r\nimport dataProcessorExtend from \"./core/dataprocessor/dataprocessor\";\r\nimport message from \"./core/message\";\r\nimport i18nFactory from \"./locale\";\r\n\r\nimport voidFirst from \"./publish_helpers/void_script_first\";\r\nimport voidSecond from \"./publish_helpers/void_script_second\";\r\nimport voidThird from \"./publish_helpers/void_script_third\";\r\n\r\n//import datepickerHeader from \"./core/clickable_header\";\r\n\r\nimport { DatePicker } from \"./core/datepicker\";\r\n\r\nexport default function(extensionManager) {\r\n\r\n\tconst scheduler = { version: VERSION };\r\n\t\r\n\tcommon_errors(scheduler);\r\n\tcommon(scheduler);\r\n\tschedulerCore(scheduler);\r\n\twai_aria(scheduler);\r\n\t//utils(scheduler);\r\n\r\n\tscheduler.utils = utils;\r\n\tscheduler.$domHelpers = dom_helpers;\r\n\tscheduler.utils.dom = dom_helpers;\r\n\tscheduler.uid = utils.uid;\r\n\tscheduler.mixin = utils.mixin;\r\n\tscheduler.defined = utils.defined;\r\n\tscheduler.assert = assert(scheduler);\r\n\tscheduler.copy = utils.copy;\r\n\r\n\tscheduler._createDatePicker = function(container, config){\r\n\t\treturn new DatePicker(scheduler, container, config);\r\n\t};\r\n\r\n\t//datepickerHeader(scheduler);\r\n\r\n\r\n\t//old api compatibility\r\n\tscheduler._getFocusableNodes = dom_helpers.getFocusableNodes;\r\n\tscheduler._getClassName = dom_helpers.getClassName;\r\n\tscheduler._locate_css = dom_helpers.locateCss;\r\n\r\n\tconst messageApi = message(scheduler);\r\n\tscheduler.utils.mixin(scheduler, messageApi);\r\n\r\n\tscheduler.env = scheduler.$env = env;\r\n\tscheduler.Promise = window.Promise;\r\n\tdestructor(scheduler);\r\n\tajax(scheduler);\r\n\tvoidFirst(scheduler);\r\n\tbase(scheduler);\r\n\tconfig(scheduler);\r\n\tevent(scheduler);\r\n\tevent_highlight(scheduler);\r\n\tload(scheduler);\r\n\tlightbox(scheduler);\r\n\ttouch(scheduler);\r\n\tdhtmlx_suite_hooks(scheduler);\r\n\tvoidSecond(scheduler);\r\n\tskins(scheduler);\r\n\tjquery(scheduler);\r\n\tdelay_render(scheduler);\r\n\tdataProcessorExtend(scheduler);\r\n\tvoidThird(scheduler);\r\n\tconnector(scheduler);\r\n\tconst i18n = i18nFactory();\r\n\tscheduler.i18n = {\r\n\t\taddLocale: i18n.addLocale,\r\n\t\tsetLocale: function(locale){\r\n\t\t\tif(typeof locale === \"string\"){\r\n\t\t\t\tvar localeObject = i18n.getLocale(locale);\r\n\t\t\t\tif(!localeObject){\r\n\t\t\t\t\tlocaleObject = i18n.getLocale(\"en\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler.locale = localeObject;\r\n\t\t\t}else if(locale){\r\n\t\t\t\tif(!scheduler.locale){\r\n\t\t\t\t\tscheduler.locale = locale;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfor(var i in locale){\r\n\t\t\t\t\t\tif(locale[i] && typeof locale[i] === \"object\"){\r\n\t\t\t\t\t\t\tif(!scheduler.locale[i]){\r\n\t\t\t\t\t\t\t\tscheduler.locale[i] = {};\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tscheduler.mixin(scheduler.locale[i], locale[i], true);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tscheduler.locale[i] = locale[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar labels = scheduler.locale.labels;\r\n\t\t\tlabels.dhx_save_btn \t= labels.icon_save;\r\n\t\t\tlabels.dhx_cancel_btn \t= labels.icon_cancel;\r\n\t\t\tlabels.dhx_delete_btn \t= labels.icon_delete;\r\n\r\n\t\t\tif(scheduler.$container){\r\n\t\t\t\tscheduler.get_elements();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t},\r\n\t\tgetLocale: i18n.getLocale\r\n\t};\r\n\tscheduler.i18n.setLocale(\"en\");\r\n\r\n\tscheduler.ext = {};\r\n\r\n\tconst activePlugins = {};\r\n\tscheduler.plugins = function(config){\r\n\t\tconst extensionList = getExtensionList(config, {\r\n\t\t\t\ttreetimeline: [\"timeline\"],\r\n\t\t\t\tdaytimeline: [\"timeline\"],\r\n\t\t\t\touterdrag: [\"legacy\"]\r\n\t\t\t}, {\r\n\t\t\t\tlegacy: 1,\r\n\t\t\t\tlimit: 1,\r\n\t\t\t\ttimeline: 2,\r\n\t\t\t\tdaytimeline: 3,\r\n\t\t\t\ttreetimeline: 3,\r\n\t\t\t\touterdrag:6\r\n\t\t\t});\r\n\r\n\t\textensionList.forEach(function(name){\r\n\t\t\tif(!activePlugins[name]){\r\n\t\t\t\tconst plugin = extensionManager.getExtension(name);\r\n\t\t\t\tif(plugin){\r\n\t\t\t\t\tplugin(scheduler);\r\n\t\t\t\t\tactivePlugins[name] = true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthrow new Error(\"unknown plugin \" + name);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t};\r\n\r\n\tfunction getExtensionList(config, dependencies, priorities){\r\n\t\tconst result = [];\r\n\r\n\t\tfor(const i in config){\r\n\t\t\tif(config[i]){\r\n\t\t\t\tconst extension = i.toLowerCase();\r\n\t\t\t\tif(dependencies[extension]){\r\n\t\t\t\t\tdependencies[extension].forEach(function(dep){\r\n\t\t\t\t\t\tconst dependencyName = dep.toLowerCase();\r\n\t\t\t\t\t\tif(!config[dependencyName]){\r\n\t\t\t\t\t\t\tresult.push(dependencyName);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\tresult.push(extension);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tresult.sort(function(a, b){\r\n\t\t\tconst orderA = priorities[a] || 0;\r\n\t\t\tconst orderB = priorities[b] || 0;\r\n\t\t\tif(orderA > orderB){\r\n\t\t\t\treturn 1;\r\n\t\t\t}else if(orderA < orderB){\r\n\t\t\t\treturn -1;\r\n\t\t\t}else{\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\treturn scheduler;\r\n\r\n}","export default class ExtensionsManager{\r\n\tconstructor(config){\r\n\t\tthis._extensions = {};\r\n\t\tfor(const i in config){\r\n\t\t\tthis._extensions[i] = config[i];\r\n\t\t}\r\n\t}\r\n\r\n\taddExtension(name, ext) {\r\n\t\tthis._extensions[name] = ext;\r\n\t}\r\n\r\n\tgetExtension(name) {\r\n\t\treturn this._extensions[name];\r\n\t}\r\n}","\r\n\r\nimport dhtmlxHook from \"./dhtmlx_hook\";\r\nimport \"./css/theme.less\";\r\ndhtmlxHook();\r\n\r\nimport global from \"./global\";\r\n\r\nimport factoryMethod from \"./scheduler_factory_method\";\r\nimport ExtensionsManager from \"./ext/extension_manager\";\r\n\r\nclass SchedulerFactory {\r\n\r\n\tconstructor (extensions) {\r\n\t\tthis._seed = 0;\r\n\t\tthis._schedulerPlugins = [];\r\n\t\tthis._bundledExtensions = extensions;\r\n\t\tthis._extensionsManager = new ExtensionsManager(extensions);\r\n\t}\r\n\r\n\tplugin(code) {\r\n\t\tthis._schedulerPlugins.push(code);\r\n\r\n\t\tif(global.scheduler){\r\n\t\t\tcode(global.scheduler);\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetSchedulerInstance(initConfig) {\r\n\t\tvar scheduler = factoryMethod(this._extensionsManager);\r\n\r\n\t\tfor (var i = 0; i < this._schedulerPlugins.length; i++) {\r\n\t\t\tthis._schedulerPlugins[i](scheduler);\r\n\t\t}\r\n\t\tscheduler._internal_id = this._seed++;\r\n\t\r\n\t\tif (this.$syncFactory){\r\n\t\t\tthis.$syncFactory(scheduler);\r\n\t\t}\r\n\r\n\t\tif(initConfig){\r\n\t\t\tthis._initFromConfig(scheduler, initConfig);\r\n\t\t}\r\n\r\n\t\treturn scheduler;\r\n\t}\r\n\r\n\t_initFromConfig(scheduler, initConfig){\r\n\t\tif(initConfig.plugins){\r\n\t\t\tscheduler.plugins(initConfig.plugins);\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.config){\r\n\t\t\tscheduler.mixin(scheduler.config, initConfig.config, true);\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.templates){\r\n\t\t\tscheduler.attachEvent(\"onTemplatesReady\", function(){\r\n\t\t\t\tscheduler.mixin(scheduler.templates, initConfig.templates, true);\r\n\t\t\t}, {once: true});\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.events){\r\n\t\t\tfor(const event in initConfig.events){\r\n\t\t\t\tscheduler.attachEvent(event, initConfig.events[event]);\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.locale){\r\n\t\t\tscheduler.i18n.setLocale(initConfig.locale);\r\n\t\t}\r\n\t\r\n\t\tif(Array.isArray(initConfig.calendars)){\r\n\t\t\tinitConfig.calendars.forEach(function(calendar){\r\n\t\t\t\tscheduler.addCalendar(calendar);\r\n\t\t\t});\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.container){\r\n\t\t\tscheduler.init(initConfig.container);\r\n\t\t} else {\r\n\t\t\tscheduler.init();\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.data){\r\n\t\t\tif(typeof initConfig.data === \"string\"){\r\n\t\t\t\tscheduler.load(initConfig.data);\r\n\t\t\t}else{\r\n\t\t\t\tscheduler.parse(initConfig.data);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\r\n}\r\n\r\nexport default SchedulerFactory;","export default function(scheduler){\r\n\r\nscheduler.config.active_link_view = \"day\";\r\nscheduler._active_link_click = function(e){\r\n\tvar start = e.target;\r\n\tvar to = start.getAttribute(\"data-link-date\");\r\n\tvar s_d = scheduler.date.str_to_date(scheduler.config.api_date, false, true);\r\n\tif (to) {\r\n\t\tscheduler.setCurrentView(s_d(to), scheduler.config.active_link_view);\r\n\t\tif (e && e.preventDefault)\r\n\t\t\te.preventDefault();\r\n\t\treturn false;\r\n\t}\r\n};\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar do_wrapper = function(key, fullname){\r\n\t\tfullname = fullname || (key+\"_scale_date\");\r\n\r\n\t\tif(!scheduler.templates['_active_links_old_'+ fullname]){\r\n\t\t\tscheduler.templates['_active_links_old_'+ fullname] = scheduler.templates[fullname];\r\n\t\t}\r\n\t\tvar week_x = scheduler.templates['_active_links_old_'+ fullname];\r\n\t\tvar d_s = scheduler.date.date_to_str(scheduler.config.api_date);\r\n\t\tscheduler.templates[fullname] = function(date) {\r\n\t\t\treturn \"\" + week_x(date) + \"\";\r\n\t\t};\r\n\t};\r\n\r\n\tdo_wrapper(\"week\");\r\n\tdo_wrapper(\"\", \"month_day\");\r\n\tif (this.matrix){\r\n\t\tfor (var key in this.matrix)\r\n\t\t\tdo_wrapper(key);\r\n\t}\r\n\r\n\tthis._detachDomEvent(this._obj, \"click\", scheduler._active_link_click);\r\n\tscheduler.event(this._obj, \"click\", scheduler._active_link_click);\r\n});\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.date.add_agenda_legacy = function(date){\r\n\treturn scheduler.date.add(date, 1, \"year\");\r\n};\r\n\r\nscheduler.templates.agenda_legacy_time = function(start,end,ev){\r\n\tif (ev._timed)\r\n\t\treturn this.day_date(ev.start_date, ev.end_date, ev)+\" \"+this.event_date(start);\r\n\telse\r\n\t\treturn scheduler.templates.day_date(start)+\" – \"+scheduler.templates.day_date(end);\r\n};\r\nscheduler.templates.agenda_legacy_text = function(start,end,event){\r\n\treturn event.text;\r\n};\r\nscheduler.templates.agenda_legacy_date = function(){ return \"\"; };\r\n\r\nscheduler.date.agenda_legacy_start=function(){ return scheduler.date.date_part(scheduler._currentDate()); };\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function() {\r\n\tvar old_dblclick_dhx_cal_data = scheduler.dblclick_dhx_cal_data;\r\n\tscheduler.dblclick_dhx_cal_data = function() {\r\n\t\tif (this._mode == \"agenda_legacy\") {\r\n\t\t\tif (!this.config.readonly && this.config.dblclick_create)\r\n\t\t\t\tthis.addEventNow();\r\n\t\t} else {\r\n\t\t\tif (old_dblclick_dhx_cal_data)\r\n\t\t\t\treturn old_dblclick_dhx_cal_data.apply(this, arguments);\r\n\t\t}\r\n\t};\r\n\r\n\r\n\tvar old = scheduler.render_data;\r\n\tscheduler.render_data=function(evs){\r\n\t\tif (this._mode == \"agenda_legacy\")\r\n\t\t\tfill_agenda_tab();\r\n\t\telse\r\n\t\t\treturn old.apply(this,arguments);\r\n\t};\r\n\r\n\tvar old_render_view_data = scheduler.render_view_data;\r\n\tscheduler.render_view_data = function(){\r\n\t\tif(this._mode == \"agenda_legacy\") {\r\n\t\t\tscheduler._agendaScrollTop = scheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop;\r\n\t\t\tscheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop = 0;\r\n\t\t}\r\n\t\treturn old_render_view_data.apply(this,arguments);\r\n\t};\r\n\r\n\r\n\r\n\tfunction set_full_view(mode){\r\n\t\tif (mode){\r\n\t\t\tvar l = scheduler.locale.labels;\r\n\r\n\t\t\tvar rowAttr = scheduler._waiAria.agendaHeadAttrString();\r\n\t\t\tvar dateHeader = scheduler._waiAria.agendaHeadDateString(l.date);\r\n\t\t\tvar descriptionHeader = scheduler._waiAria.agendaHeadDescriptionString(l.description);\r\n\r\n\t\t\tscheduler._els[\"dhx_cal_header\"][0].innerHTML=\"
\" +\r\n\t\t\t\t\"
\"+l.date+\"
\" +\r\n\t\t\t\t\"\"+l.description+\"\" +\r\n\t\t\t\t\"
\";\r\n\t\t\tscheduler._table_view=true;\r\n\t\t\tscheduler.set_sizes();\r\n\t\t}\r\n\t}\r\n\r\n\tfunction fill_agenda_tab(){\r\n\t\t//select events for which data need to be printed\r\n\r\n\t\tvar events = scheduler.get_visible_events();\r\n\t\tevents.sort(function(a,b){ return a.start_date>b.start_date?1:-1;});\r\n\r\n\t\tvar tableAttr = scheduler._waiAria.agendaDataAttrString();\r\n\t\tvar agendaEventAttrString;\r\n\t\t//generate html for the view\r\n\t\tvar html=\"
\";\r\n\t\tfor (var i=0; i
\"+\r\n\t\t\t\t\t(scheduler.config.rtl ? scheduler.templates.agenda_time(ev.end_date,ev.start_date, ev):scheduler.templates.agenda_time(ev.start_date, ev.end_date,ev))+\r\n\t\t\t\t\t\"
\";\r\n\t\t\thtml+=`
\r\n\t\t\t\r\n\t\t\t
`;\r\n\t\t\thtml+=\"\"+scheduler.templates.agenda_text(ev.start_date, ev.end_date, ev)+\"
\";\r\n\t\t}\r\n\t\thtml+=\"
\";\r\n\r\n\t\t//render html\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop = scheduler._agendaScrollTop||0;\r\n\r\n\t\t// setting up dhx_v_border size\r\n\t\tvar agenda_area = scheduler._els[\"dhx_cal_data\"][0].childNodes[0];\r\n\t\tvar v_border = agenda_area.childNodes[agenda_area.childNodes.length-1];\r\n\t\tv_border.style.height = (agenda_area.offsetHeight < scheduler._els[\"dhx_cal_data\"][0].offsetHeight) ? \"100%\" : (agenda_area.offsetHeight+\"px\");\r\n\r\n\t\tvar t=scheduler._els[\"dhx_cal_data\"][0].firstChild.childNodes;\r\n\r\n\t\tvar dateElement = scheduler._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML=scheduler.templates.agenda_date(scheduler._min_date, scheduler._max_date, scheduler._mode);\r\n\t\t}\r\n\r\n\t\tscheduler._rendered=[];\r\n\t\tfor (var i=0; i < t.length-1; i++)\r\n\t\t\tscheduler._rendered[i]=t[i];\r\n\r\n\t}\r\n\r\n\tscheduler.agenda_legacy_view=function(mode){\r\n\t\tscheduler._min_date = scheduler.config.agenda_start||scheduler.date.agenda_legacy_start(scheduler._date);\r\n\t\tscheduler._max_date = scheduler.config.agenda_end||scheduler.date.add_agenda_legacy(scheduler._min_date, 1);\r\n\r\n\t\tset_full_view(mode);\r\n\t\tif (mode){\r\n\t\t\tscheduler._cols = null;\r\n\t\t\tscheduler._colsS = null;\r\n\t\t\tscheduler._table_view = true;\r\n\t\t\t//agenda tab activated\r\n\t\t\tfill_agenda_tab();\r\n\t\t} else {\r\n\t\t\tscheduler._table_view = false;\r\n\t\t\t//agenda tab de-activated\r\n\t\t}\r\n\t};\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.date.add_agenda = function(date, inc){\r\n\t\treturn scheduler.date.add(date, 1*inc, \"month\");\r\n\t};\r\n\t\r\n\tscheduler.templates.agenda_time = function(start,end,ev){\r\n\t\tif (ev._timed){\r\n\t\t\treturn `${this.event_date(start)} - ${this.event_date(end)}`;\r\n\t\t}else{\r\n\t\t\treturn scheduler.locale.labels.full_day;\r\n\t\t}\r\n\t};\r\n\tscheduler.templates.agenda_text = function(start,end,ev){\r\n\t\treturn ev.text;\r\n\t};\r\n\r\n\tconst dayDateToStr = scheduler.date.date_to_str(\"%F %j\");\r\n\tconst dayDowToStr = scheduler.date.date_to_str(\"%l\");\r\n\r\n\tscheduler.templates.agenda_day = function(date){ \r\n\t\treturn `
${dayDateToStr(date)}
\r\n\t\t
${dayDowToStr(date)}
`;\r\n\t};\r\n\tscheduler.templates.agenda_date = function(start, end){ \r\n\t\treturn scheduler.templates.month_date(scheduler.getState().date); \r\n\t};\r\n\t\r\n\tscheduler.date.agenda_start=function(date){\r\n\t\treturn scheduler.date.month_start(new Date(date));\r\n\t};\r\n\r\n\tlet scrollTop = 0;\r\n\t\r\n\tscheduler.attachEvent(\"onTemplatesReady\",function() {\r\n\t\tvar old_dblclick_dhx_cal_data = scheduler.dblclick_dhx_cal_data;\r\n\t\tscheduler.dblclick_dhx_cal_data = function() {\r\n\t\t\tif (this._mode == \"agenda\") {\r\n\t\t\t\tif (!this.config.readonly && this.config.dblclick_create)\r\n\t\t\t\t\tthis.addEventNow();\r\n\t\t\t} else {\r\n\t\t\t\tif (old_dblclick_dhx_cal_data)\r\n\t\t\t\t\treturn old_dblclick_dhx_cal_data.apply(this, arguments);\r\n\t\t\t}\r\n\t\t};\r\n\t\r\n\t\r\n\t\tvar old = scheduler.render_data;\r\n\t\tscheduler.render_data=function(evs){\r\n\t\t\tif (this._mode == \"agenda\")\r\n\t\t\t\tfill_agenda_tab();\r\n\t\t\telse\r\n\t\t\t\treturn old.apply(this,arguments);\r\n\t\t};\r\n\t\r\n\t\tvar old_render_view_data = scheduler.render_view_data;\r\n\t\tscheduler.render_view_data = function(){\r\n\t\t\tif(this._mode == \"agenda\") {\r\n\t\t\t\tscrollTop = scheduler._els[\"dhx_cal_data\"][0].scrollTop;\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = 0;\r\n\t\t\t}\r\n\t\t\treturn old_render_view_data.apply(this,arguments);\r\n\t\t};\r\n\r\n\t\tfunction fill_agenda_tab(){\r\n\t\t\tconst events = scheduler.get_visible_events();\r\n\t\t\tevents.sort(function(a,b){ return a.start_date>b.start_date?1:-1;});\r\n\r\n\t\t\tconst eventsInDays = {};\r\n\t\t\tlet currDate = scheduler.getState().min_date;\r\n\t\t\tconst maxDate = scheduler.getState().max_date;\r\n\t\t\twhile(currDate.valueOf() < maxDate.valueOf()){\r\n\t\t\t\teventsInDays[currDate.valueOf()] = [];\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\r\n\t\t\tlet anyEvents = false;\r\n\r\n\t\t\tevents.forEach((ev) => {\r\n\t\t\t\tlet eventStart = scheduler.date.day_start(new Date(ev.start_date)); \r\n\t\t\t\twhile (eventStart.valueOf() < ev.end_date.valueOf()) {\r\n\t\t\t\t\tif (eventsInDays[eventStart.valueOf()]) {\r\n\t\t\t\t\t\teventsInDays[eventStart.valueOf()].push(ev);\r\n\t\t\t\t\t\tanyEvents = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\teventStart = scheduler.date.day_start(scheduler.date.add(eventStart, 1, \"day\"));\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(!anyEvents){\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = renderEmptyView();\r\n\t\t\t}else{\r\n\t\t\t\tlet html = \"\";\r\n\t\t\t\tfor(let day in eventsInDays){\r\n\t\t\t\t\thtml += renderDay(new Date(day*1), eventsInDays[day]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = scrollTop;\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\r\n\r\n\t\tfunction renderEmptyView(){\r\n\t\t\treturn `
${scheduler.locale.labels.agenda_tab}
`;\r\n\t\t}\r\n\r\n\t\tfunction renderDay(day, events) {\r\n\t\t\tif(!events.length){\r\n\t\t\t\treturn \"\";\r\n\t\t\t}\r\n\t\t\tlet html = `\r\n
\r\n\t
${scheduler.templates.agenda_day(day)}
\r\n\t
\r\n`;\r\n\r\n\t\t\tevents.forEach((calendarEvent) => {\r\n\t\t\t\thtml += renderOneEvent(day, calendarEvent);\r\n\t\t\t});\r\n\r\n\t\t\thtml += `
`;\r\n\t\t\treturn html;\r\n\t\t}\r\n\r\n\t\tfunction renderOneEvent(day, calendarEvent){\r\n\t\t\tconst dates = scheduler.templates.agenda_time(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\t\t\tconst selectedId = scheduler.getState().select_id;\r\n\t\t\tconst cls = scheduler.templates.event_class(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\t\t\tconst description = scheduler.templates.agenda_text(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\r\n\t\t\tlet style = \"\";\r\n\t\t\tif(calendarEvent.color || calendarEvent.textColor){\r\n\t\t\t\tconst bg = (calendarEvent.color ? (\"--dhx-scheduler-event-background:\" + calendarEvent.color + \";\") : \"\");\r\n\t\t\t\tconst color = (calendarEvent.textColor ? (\"--dhx-scheduler-event-color:\" + calendarEvent.textColor + \";\") : \"\");\r\n\t\t\t\tstyle = ` style=\"${bg}${color}\" `;\r\n\t\t\t}\r\n\r\n\t\t\treturn `
\r\n\t
\r\n\t
${dates}
\r\n\t
${description}
\r\n
`;\r\n\t\t}\r\n\t\r\n\t\tscheduler.agenda_view=function(mode){\r\n\t\t\tif (mode){\r\n\t\t\t\tscheduler._min_date = scheduler.config.agenda_start || scheduler.date.agenda_start(scheduler._date);\r\n\t\t\t\tscheduler._max_date = scheduler.config.agenda_end || scheduler.date.add_agenda(scheduler._min_date, 1);\r\n\t\t\t\tscheduler._cols = null;\r\n\t\t\t\tscheduler._colsS = null;\r\n\t\t\t\tscheduler._table_view = true;\r\n\r\n\t\t\t\tconst dateHeader = scheduler._getNavDateElement();\r\n\t\t\t\tdateHeader.innerHTML = scheduler.templates.agenda_date(scheduler._date);\r\n\t\t\t\t//agenda tab activated\r\n\t\t\t\tfill_agenda_tab();\r\n\t\t\t} else {\r\n\t\t\t\tscheduler._table_view = false;\r\n\t\t\t\t//agenda tab de-activated\r\n\t\t\t}\r\n\t\t};\r\n\t});\r\n\r\n\t// scheduler.attachEvent(\"onEventSelected\", function(id){\r\n\t// \tconst oldSelected = scheduler.$container.querySelectorAll(\".dhx_cal_agenda_event_line_selected\");\r\n\t// \toldSelected.forEach((el) => {\r\n\t// \t\tel.classList.remove(\"dhx_cal_agenda_event_line_selected\");\r\n\t// \t});\r\n\r\n\t// \tconst selected = scheduler.$container.querySelector(`[${scheduler.config.event_attribute}=\"${id}\"]`);\r\n\t// \tif(selected){\r\n\t// \t\tselected.classList.add(\"dhx_cal_agenda_event_line_selected\");\r\n\t// \t}\r\n\t// });\r\n\t\r\n\t\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.config.all_timed = \"short\";\r\n\tscheduler.config.all_timed_month = false;\r\n\r\n\tvar is_event_short = function (ev) {\r\n\t\tif(!((ev.end_date - ev.start_date)/(1000*60*60) >= 24)){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t// short event shouldn't disappear to multiday area during dnd-resize\r\n\t\tif(scheduler._drag_mode == \"resize\" && scheduler._drag_id == ev.id){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn \tfalse;\r\n\t};\r\n\r\n\t// copy of usual events and recurring instances;\r\n\t// regular copy causes problems with recurrings which have series event as a prototype\r\n\tscheduler._safe_copy = function(event){\r\n\t\tvar proto = null,\r\n\t\t\tcopy = scheduler._copy_event(event);\r\n\t\tif(event.event_pid){\r\n\t\t\tproto = scheduler.getEvent(event.event_pid);\r\n\t\t}\r\n\r\n\t\tif (proto && proto.isPrototypeOf(event)) {\r\n\t\t\tdelete copy.event_length;\r\n\t\t\tdelete copy.event_pid;\r\n\t\t\tdelete copy.rec_pattern;\r\n\t\t\tdelete copy.rec_type;\r\n\t\t}\r\n\r\n\t\treturn copy;\r\n\t};\r\n\r\n\tvar old_prerender_events_line = scheduler._pre_render_events_line;\r\n\tvar old_prerender_events_table = scheduler._pre_render_events_table;\r\n\r\n\tvar prerender_events = function (evs, hold) {\r\n\t\tif (!this._table_view) {\r\n\t\t\treturn old_prerender_events_line.call(this, evs, hold);\r\n\t\t}\r\n\r\n\t\treturn old_prerender_events_table.call(this, evs, hold);\r\n\t};\r\n\r\n\tscheduler._pre_render_events_line = scheduler._pre_render_events_table = function(evs, hold){\r\n\t\tif (!this.config.all_timed ||\r\n\t\t\t(this._table_view && this._mode != \"month\") ||\r\n\t\t\t(this._mode == \"month\" && !this.config.all_timed_month))\r\n\t\t\treturn prerender_events.call(this, evs, hold);\r\n\r\n\t\tfor (var i=0; i < evs.length; i++) {\r\n\t\t\tvar ev=evs[i];\r\n\r\n\t\t\tif (ev._timed)\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\tif (this.config.all_timed == \"short\") {\r\n\t\t\t\tif (!is_event_short(ev)) {\r\n\t\t\t\t\tif (this._mode != \"month\") {\r\n\t\t\t\t\t\tevs.splice(i--, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar ce = this._safe_copy(ev); // current event (event for one specific day) is copy of original with modified dates\r\n\t\t\tif(!ev._virtual){\r\n\t\t\t\tce._first_chunk = true;\r\n\t\t\t}else{\r\n\t\t\t\tce._first_chunk = false;\r\n\t\t\t}\r\n\t\t\tce._drag_resize = false;\r\n\t\t\tce._virtual = true;\r\n\t\t\tce.start_date = new Date(ce.start_date); // as lame copy doesn't copy date objects\r\n\r\n\t\t\tif (!isOvernightEvent(ev)) {\r\n\t\t\t\tce.end_date = new Date(ev.end_date);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tce.end_date = getNextDay(ce.start_date);\r\n\t\t\t\tif (this.config.last_hour != 24) { // if specific last_hour was set (e.g. 20)\r\n\t\t\t\t\tce.end_date = setDateTime(ce.start_date, this.config.last_hour);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar event_changed = false;\r\n\t\t\tif (ce.start_date < this._max_date && ce.end_date > this._min_date && ce.start_date < ce.end_date) {\r\n\t\t\t\tevs[i] = ce; // adding another event in collection\r\n\t\t\t\tevent_changed = true;\r\n\t\t\t}\r\n\t\t//\tif (ce.start_date > ce.end_date) {\r\n\t\t//\t\tevs.splice(i--,1);\r\n\t\t//\t}\r\n\r\n\t\t\tvar re = this._safe_copy(ev); // remaining event, copy of original with modified start_date (making range more narrow)\r\n\t\t\tre._virtual = true;\r\n\t\t\tre.end_date = new Date(re.end_date);\r\n\t\t\tif (re.start_date < this._min_date)\r\n\t\t\t\tre.start_date = setDateTime(this._min_date, this.config.first_hour);// as we are starting only with whole hours\r\n\t\t\telse\r\n\t\t\t\tre.start_date = setDateTime(getNextDay(ev.start_date), this.config.first_hour);\r\n\r\n\t\t\tif (re.start_date < this._max_date && re.start_date < re.end_date) {\r\n\t\t\t\tif (event_changed){\r\n\t\t\t\t\tevs.splice(i+1,0,re);//insert part\r\n\t\t\t\t}else {\r\n\t\t\t\t\tevs[i--] = re;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tre._last_chunk = false;\r\n\t\t\t}else{\r\n\t\t\t\tce._last_chunk = true;\r\n\t\t\t\tce._drag_resize = true;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t// in case of all_timed pre_render is not applied to the original event\r\n\t\t// so we need to force redraw in case of dnd\r\n\t\tvar redraw = (this._drag_mode == 'move')?false:hold;\r\n\t\treturn prerender_events.call(this, evs, redraw);\r\n\r\n\r\n\t\tfunction isOvernightEvent(ev){\r\n\t\t\tvar next_day = getNextDay(ev.start_date);\r\n\t\t\treturn (+ev.end_date > +next_day);\r\n\t\t}\r\n\t\tfunction getNextDay(date){\r\n\t\t\tvar next_day = scheduler.date.add(date, 1, \"day\");\r\n\t\t\tnext_day = scheduler.date.date_part(next_day);\r\n\t\t\treturn next_day;\r\n\t\t}\r\n\t\tfunction setDateTime(date, hours){\r\n\t\t\tvar val = scheduler.date.date_part(new Date(date));\r\n\t\t\tval.setHours(hours);\r\n\t\t\treturn val;\r\n\t\t}\r\n\t};\r\n\tvar old_get_visible_events = scheduler.get_visible_events;\r\n\tscheduler.get_visible_events = function(only_timed){\r\n\t\tif (!(this.config.all_timed && this.config.multi_day))\r\n\t\t\treturn old_get_visible_events.call(this, only_timed);\r\n\t\treturn old_get_visible_events.call(this, false); // only timed = false\r\n\t};\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function (old_mode, old_date, mode, date) {\r\n\t\tscheduler._allow_dnd = (mode == \"day\" || mode == \"week\" || scheduler.getView(mode));\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler._is_main_area_event = function(ev){\r\n\t\treturn !!(ev._timed || this.config.all_timed === true || (this.config.all_timed == \"short\" && is_event_short(ev)) );\r\n\t};\r\n\r\n\tvar oldUpdate = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id){\r\n\t\t// full redraw(update_render=true) messes events order while dnd.\r\n\t\t// individual redraw(update_render=false) of multiday event, which happens on select/unselect, expands event to full width of the cell and can be fixes only with full redraw.\r\n\t\t// so for now full redraw is always enabled for not-dnd updates\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tvar fullRedrawNeeded;\r\n\t\tvar initial;\r\n\t\tif(ev) {\r\n\t\t\tfullRedrawNeeded = (scheduler.config.all_timed && !(scheduler.isOneDayEvent(scheduler._events[id]) || scheduler.getState().drag_id));\r\n\t\t\tif (fullRedrawNeeded) {\r\n\t\t\t\tinitial = scheduler.config.update_render;\r\n\t\t\t\tscheduler.config.update_render = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\toldUpdate.apply(scheduler, arguments);\r\n\r\n\t\tif(ev) {\r\n\t\t\tif (fullRedrawNeeded) {\r\n\t\t\t\tscheduler.config.update_render = initial;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\r\nvar temp_section;\r\nvar before;\r\n\r\nscheduler.config.collision_limit = 1;\r\n\r\nfunction _setTempSection(event_id) { // for custom views (matrix, timeline, units)\r\n\tvar checked_mode = scheduler._get_section_view();\r\n\tif(checked_mode && event_id){\r\n\t\ttemp_section = scheduler.getEvent(event_id)[scheduler._get_section_property()];\r\n\t}\r\n}\r\n\r\nscheduler.attachEvent(\"onBeforeDrag\",function(id){\r\n\t_setTempSection(id);\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onBeforeLightbox\",function(id){\r\n\tvar ev = scheduler.getEvent(id);\r\n\tbefore = [ev.start_date, ev.end_date];\r\n\t_setTempSection(id);\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventChanged\",function(id){\r\n\tif (!id || !scheduler.getEvent(id)) return true;\r\n\tvar ev = scheduler.getEvent(id);\r\n\tif (!scheduler.checkCollision(ev)){\r\n\t\tif (!before) return false;\r\n\t\tev.start_date = before[0];\r\n\t\tev.end_date = before[1];\r\n\t\tev._timed=this.isOneDayEvent(ev);\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onBeforeEventChanged\",function(ev,e,is_new){\r\n\treturn scheduler.checkCollision(ev);\r\n});\r\nscheduler.attachEvent(\"onEventAdded\",function(id,ev) {\r\n\tvar result = scheduler.checkCollision(ev);\r\n\tif (!result)\r\n\t\tscheduler.deleteEvent(id);\r\n});\r\nscheduler.attachEvent(\"onEventSave\",function(id, edited_ev, is_new){\r\n\tedited_ev = scheduler._lame_clone(edited_ev);\r\n\tedited_ev.id = id;\r\n\r\n\t//lightbox may not have 'time' section\r\n\tif(!(edited_ev.start_date && edited_ev.end_date)){\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tedited_ev.start_date = new Date(ev.start_date);\r\n\t\tedited_ev.end_date = new Date(ev.end_date);\r\n\t}\r\n\r\n\tif(edited_ev.rec_type){\r\n\t\tscheduler._roll_back_dates(edited_ev);\r\n\t}\r\n\treturn scheduler.checkCollision(edited_ev); // in case user creates event on one date but then edited it another\r\n});\r\n\r\nscheduler._check_sections_collision = function(first, second){\r\n\tvar map_to = scheduler._get_section_property();\r\n\tif (first[map_to] == second[map_to] && first.id != second.id)\r\n\t\treturn true;\r\n\treturn false;\r\n};\r\n\r\nscheduler.checkCollision = function(ev) {\r\n\tvar evs = [];\r\n\tvar collision_limit = scheduler.config.collision_limit;\r\n\r\n\tif (ev.rec_type) {\r\n\t\tvar evs_dates = scheduler.getRecDates(ev);\r\n\t\tfor(var k=0; k= collision_limit) {\r\n\r\n\t\t\tsingle = false;\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\tif ( evs.length >= collision_limit )\r\n\t\t\tsingle = false;\r\n\t}\r\n\tif (!single) {\r\n\t\tvar res = !scheduler.callEvent(\"onEventCollision\",[ev,evs]);\r\n\t\tif (!res) {\r\n\t\t\tev[map_to] = temp_section||ev[map_to]; // from _setTempSection for custom views\r\n\t\t}\r\n\t\treturn res;\r\n\t}\r\n\treturn single;\r\n\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.config.container_autoresize = true;\r\n\tscheduler.config.month_day_min_height = 90;\r\n\tscheduler.config.min_grid_size = 25;\r\n\tscheduler.config.min_map_size = 400;\r\n\r\n\tvar old_pre_render_event = scheduler._pre_render_events;\r\n\r\n\t//need for temporary disabling without modifying public config\r\n\tvar active = true;\r\n\tvar total_height = 0;\r\n\tvar multiday_height = 0;\r\n\r\n\tscheduler._pre_render_events = function(evs, hold) {\r\n\t\tif (!(scheduler.config.container_autoresize && active)) {\r\n\t\t\treturn old_pre_render_event.apply(this, arguments);\r\n\t\t}\r\n\r\n\t\tvar hb = this.xy.bar_height;\r\n\t\tvar h_old = this._colsS.heights;\r\n\t\tvar h = this._colsS.heights = [0, 0, 0, 0, 0, 0, 0];\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tif (!this._table_view)\r\n\t\t\tevs = this._pre_render_events_line(evs, hold); //ignore long events for now\r\n\t\telse\r\n\t\t\tevs = this._pre_render_events_table(evs, hold);\r\n\r\n\t\tif (this._table_view) {\r\n\t\t\tif (hold){\r\n\t\t\t\tthis._colsS.heights = h_old;\r\n\t\t\t} else {\r\n\t\t\t\tvar evl = data.firstChild;\r\n\t\t\t\tconst rows = evl.querySelectorAll(\".dhx_cal_month_row\");\r\n\t\t\t\tif (rows) {\r\n\t\t\t\t\tfor (var i = 0; i < rows.length; i++) {\r\n\t\t\t\t\t\th[i]++;\r\n\r\n\t\t\t\t\t\tif ((h[i]) * hb > this._colsS.height - this.xy.month_head_height) { // 22 - height of cell's header\r\n\t\t\t\t\t\t\t//we have overflow, update heights\r\n\t\t\t\t\t\t\tvar cells = rows[i].querySelectorAll(\".dhx_cal_month_cell\");\r\n\r\n\t\t\t\t\t\t\tvar cHeight = this._colsS.height - this.xy.month_head_height;\r\n\t\t\t\t\t\t\tif(this.config.max_month_events*1 !== this.config.max_month_events || h[i] <= this.config.max_month_events){\r\n\t\t\t\t\t\t\t\tcHeight = h[i] * hb;\r\n\t\t\t\t\t\t\t}else if( (this.config.max_month_events + 1) * hb > this._colsS.height - this.xy.month_head_height){\r\n\t\t\t\t\t\t\t\tcHeight = (this.config.max_month_events + 1) * hb;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\trows[i].style.height = (cHeight + this.xy.month_head_height) + \"px\";\r\n\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\tfor (var j = 0; j < cells.length; j++) {\r\n\t\t\t\t\t\t\t\tcells[j].childNodes[1].style.height = cHeight + \"px\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\th[i] = (h[i - 1] || 0) + cells[0].offsetHeight;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\th[i] = (h[i - 1] || 0) + rows[i].querySelectorAll(\".dhx_cal_month_cell\")[0].offsetHeight;\r\n\t\t\t\t\t}\r\n\t\t\t\t\th.unshift(0);\r\n\t\t\t\t\tif (evl.parentNode.offsetHeight < evl.parentNode.scrollHeight && !evl._h_fix) {\r\n\t\t\t\t\t\t//we have v-scroll, decrease last day cell\r\n\r\n\t\t\t\t\t\t// NO CHECK SHOULD BE MADE ON VERTICAL SCROLL\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (!evs.length && this._els[\"dhx_multi_day\"][0].style.visibility == \"visible\")\r\n\t\t\t\t\t\th[0] = -1;\r\n\t\t\t\t\tif (evs.length || h[0] == -1) {\r\n\t\t\t\t\t\t//shift days to have space for multiday events\r\n\t\t\t\t\t\t//var childs = evl.parentNode.childNodes;\r\n\t\t\t\t\t\tvar dh = ((h[0] + 1) * hb + 1); // +1 so multiday events would have 2px from top and 2px from bottom by default\r\n\t\t\t\t\t\tif(multiday_height != dh + 1) {\r\n\t\t\t\t\t\t\tthis._obj.style.height = (total_height - multiday_height + dh - 1) + \"px\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tdh += \"px\";\r\n\t\t\t\t\t\tconst navHeight = this._els[\"dhx_cal_navline\"][0].offsetHeight;\r\n\t\t\t\t\t\tconst headerHeight = this._els[\"dhx_cal_header\"][0].offsetHeight;\r\n\t\t\t\t\t\tdata.style.height = (this._obj.offsetHeight - navHeight - headerHeight - (this.xy.margin_top || 0)) + 'px';\r\n\t\t\t\t\t\tvar last = this._els[\"dhx_multi_day\"][0];\r\n\t\t\t\t\t\tlast.style.height = dh;\r\n\t\t\t\t\t\tlast.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\t\tlast = this._els[\"dhx_multi_day\"][1];\r\n\t\t\t\t\t\tlast.style.height = dh;\r\n\t\t\t\t\t\tlast.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\t\tif(last.style.visibility == \"hidden\"){\r\n\t\t\t\t\t\t\tlast.style.display = \"none\";\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tlast.style.display = \"\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tlast.className = h[0] ? \"dhx_multi_day_icon\" : \"dhx_multi_day_icon_small\";\r\n\t\t\t\t\t\tthis._dy_shift = (h[0] + 1) * hb;\r\n\t\t\t\t\t\th[0] = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn evs;\r\n\t};\r\n\r\n\tvar checked_divs = [\"dhx_cal_navline\", \"dhx_cal_header\", \"dhx_multi_day\", \"dhx_cal_data\"];\r\n\tvar updateContainterHeight = function(is_repaint) {\r\n\t\ttotal_height = 0;\r\n\t\tfor (var i = 0; i < checked_divs.length; i++) {\r\n\r\n\t\t\tvar className = checked_divs[i];\r\n\t\t\tvar checked_div = (scheduler._els[className]) ? scheduler._els[className][0] : null;\r\n\t\t\tvar height = 0;\r\n\t\t\tswitch (className) {\r\n\t\t\t\tcase \"dhx_cal_navline\":\r\n\t\t\t\tcase \"dhx_cal_header\":\r\n\t\t\t\t\theight = checked_div.offsetHeight;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"dhx_multi_day\":\r\n\t\t\t\t\theight = (checked_div) ? checked_div.offsetHeight - 1 : 0;\r\n\t\t\t\t\tmultiday_height = height;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"dhx_cal_data\":\r\n\t\t\t\t\tvar mode = scheduler.getState().mode;\r\n\r\n\t\t\t\t\tif(checked_div.childNodes[1] && mode != \"month\") {\r\n\t\t\t\t\t\tlet maxHeight = 0;\r\n\t\t\t\t\t\tfor(let i = 0; i < checked_div.childNodes.length; i++){\r\n\t\t\t\t\t\t\tif(checked_div.childNodes[i].offsetHeight > maxHeight){\r\n\t\t\t\t\t\t\t\tmaxHeight = checked_div.childNodes[i].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\theight = maxHeight;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\theight = Math.max(checked_div.offsetHeight - 1, checked_div.scrollHeight);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (mode == \"month\") {\r\n\t\t\t\t\t\tif (scheduler.config.month_day_min_height && !is_repaint) {\r\n\t\t\t\t\t\t\tvar rows_length = checked_div.querySelectorAll(\".dhx_cal_month_row\").length;\r\n\t\t\t\t\t\t\theight = rows_length * scheduler.config.month_day_min_height;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (is_repaint) {\r\n\t\t\t\t\t\t\tchecked_div.style.height = height + \"px\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (mode == \"year\"){\r\n\t\t\t\t\t\theight = 190 * scheduler.config.year_y;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(mode == \"agenda\"){\r\n\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\tif(checked_div.childNodes && checked_div.childNodes.length){\r\n\t\t\t\t\t\t\tfor(var j = 0; j < checked_div.childNodes.length; j++){\r\n\t\t\t\t\t\t\t\theight += checked_div.childNodes[j].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(height + 2 < scheduler.config.min_grid_size){\r\n\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (mode == \"week_agenda\"){\r\n\t\t\t\t\t\tvar min_height = scheduler.xy.week_agenda_scale_height + scheduler.config.min_grid_size,\r\n\t\t\t\t\t\t\tcur_height;\r\n\r\n\t\t\t\t\t\tvar column;\r\n\t\t\t\t\t\tfor(var k = 0; k < checked_div.childNodes.length; k++){\r\n\t\t\t\t\t\t\tcolumn = checked_div.childNodes[k];\r\n\t\t\t\t\t\t\tfor(var j = 0; j < column.childNodes.length; j++) {\r\n\t\t\t\t\t\t\t\tvar innerHeight = 0,\r\n\t\t\t\t\t\t\t\t\teventsContainer = column.childNodes[j].childNodes[1];\r\n\r\n\t\t\t\t\t\t\t\tfor(var g =0; g < eventsContainer.childNodes.length; g++){\r\n\t\t\t\t\t\t\t\t\tinnerHeight += eventsContainer.childNodes[g].offsetHeight;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tcur_height = innerHeight + scheduler.xy.week_agenda_scale_height;\r\n\t\t\t\t\t\t\t\tcur_height = (k == 1 && (j == 2 || j == 3)) ? cur_height * 2 : cur_height; // for last two cells;\r\n\r\n\t\t\t\t\t\t\t\tif (cur_height > min_height) {\r\n\t\t\t\t\t\t\t\t\tmin_height = cur_height;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\theight = min_height * 3;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(mode == \"map\") {\r\n\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\tvar evs = checked_div.querySelectorAll(\".dhx_map_line\");\r\n\r\n\t\t\t\t\t\tfor (var j = 0; j < evs.length; j++) {\r\n\t\t\t\t\t\t\theight += evs[j].offsetHeight;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (height + 2 < scheduler.config.min_map_size) {\r\n\t\t\t\t\t\t\theight = scheduler.config.min_map_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(scheduler._gridView) {\r\n\t\t\t\t\t\theight = 0;\r\n\r\n\t\t\t\t\t\tif (checked_div.childNodes[1].childNodes[0].childNodes && checked_div.childNodes[1].childNodes[0].childNodes.length) {\r\n\t\t\t\t\t\t\tvar evs = checked_div.childNodes[1].childNodes[0].childNodes[0].childNodes;\r\n\r\n\t\t\t\t\t\t\tfor (var j = 0; j < evs.length; j++) {\r\n\t\t\t\t\t\t\t\theight += evs[j].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\theight += 2;\r\n\r\n\t\t\t\t\t\t\tif(height < scheduler.config.min_grid_size){\r\n\t\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (scheduler.matrix && scheduler.matrix[mode]) {\r\n\t\t\t\t\t\tif (is_repaint) {\r\n\t\t\t\t\t\t\theight += 0;\r\n\t\t\t\t\t\t\tchecked_div.style.height = height + \"px\";\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\t\tvar cfg = scheduler.matrix[mode];\r\n\t\t\t\t\t\t\tvar rows = cfg.y_unit;\r\n\t\t\t\t\t\t\tfor(var r=0; r < rows.length; r++){\r\n\t\t\t\t\t\t\t\theight += cfg.getSectionHeight(rows[r].key);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t// Check and add extra height to avoid events hiding by the horizontal scrollbar\r\n\t\t\t\t\t\t\tif(scheduler.$container.clientWidth != scheduler.$container.scrollWidth){\r\n\t\t\t\t\t\t\t\theight += getScrollSize();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\theight -= 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (mode == \"day\" || mode == \"week\" || (scheduler._props && scheduler._props[mode])) {\r\n\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\theight += 1;\r\n\t\t\ttotal_height += height;\r\n\t\t}\r\n\t\tscheduler._obj.style.height = (total_height) + \"px\";\r\n\r\n\t\tif (!is_repaint)\r\n\t\t\tscheduler.updateView();\r\n\t};\r\n\r\n\tfunction callUpdate(){\r\n\t\tactive = false;\r\n\t\tscheduler.callEvent(\"onAfterSchedulerResize\", []);\r\n\t\tactive = true;\r\n\t}\r\n\r\n\tvar conditionalUpdateContainerHeight = function() {\r\n\t\tif(!(scheduler.config.container_autoresize && active))\r\n\t\t\treturn true;\r\n\r\n\t\tvar mode = scheduler.getState().mode;\r\n\r\n\t\tif(!mode) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tvar asyncRepaint = window.requestAnimationFrame || window.setTimeout;\r\n\t\tvar scrollTop = document.documentElement.scrollTop;\r\n\r\n\t\tasyncRepaint(function() {\r\n\t\t\tif(scheduler.$destroyed || !scheduler.$initialized){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tupdateContainterHeight();\r\n\t\t});\r\n\r\n\t\tif ( (scheduler.matrix && scheduler.matrix[mode]) || mode == \"month\") {\r\n\t\t\tasyncRepaint(function() {\r\n\t\t\t\tif(scheduler.$destroyed || !scheduler.$initialized){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tupdateContainterHeight(true);\r\n\t\t\t\tdocument.documentElement.scrollTop = scrollTop;\r\n\t\t\t\tcallUpdate();\r\n\t\t\t}, 1);\r\n\t\t}else{\r\n\t\t\tcallUpdate();\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function(){\r\n\t\tvar autosizeEnabled = scheduler.config.container_autoresize;\r\n\t\tif(!scheduler.xy.$original_scroll_width){\r\n\t\t\tscheduler.xy.$original_scroll_width = scheduler.xy.scroll_width;\r\n\t\t}\r\n\r\n\t\tscheduler.xy.scroll_width = autosizeEnabled ? 0 : scheduler.xy.$original_scroll_width;\r\n\r\n\t\tif(scheduler.matrix){\r\n\t\t\tfor(var i in scheduler.matrix){\r\n\t\t\t\tvar timeline = scheduler.matrix[i];\r\n\t\t\t\tif(!timeline.$original_section_autoheight){\r\n\t\t\t\t\ttimeline.$original_section_autoheight = timeline.section_autoheight;\r\n\t\t\t\t}\r\n\t\t\t\tif(autosizeEnabled){\r\n\t\t\t\t\ttimeline.section_autoheight = false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\ttimeline.section_autoheight = timeline.$original_section_autoheight;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onXLE\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventChanged\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventCreated\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventAdded\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventDeleted\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onAfterSchedulerResize\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onClearAll\", conditionalUpdateContainerHeight);\r\n\r\n\t//disable container autoresize when expanded\r\n\tscheduler.attachEvent(\"onBeforeExpand\", function(){\r\n\t\tactive = false;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeCollapse\", function(){\r\n\t\tactive = true;\r\n\t\treturn true;\r\n\t});\r\n\t// helper function\r\n\tfunction getScrollSize() {\r\n\t\tvar div = document.createElement(\"div\");\r\n\t\tdiv.style.cssText = \"visibility:hidden;position:absolute;left:-1000px;width:100px;padding:0px;margin:0px;height:110px;min-height:100px;overflow-y:scroll;\";\r\n\r\n\t\tdocument.body.appendChild(div);\r\n\t\tvar size = div.offsetWidth - div.clientWidth;\r\n\t\tdocument.body.removeChild(div);\r\n\t\treturn size;\r\n\t}\r\n\r\n\r\n}","export default function(scheduler){\r\n\tfunction setCookie(name,cookie_param,value) {\r\n\t\tvar str = name + \"=\" + value + (cookie_param?(\"; \"+cookie_param):\"\");\r\n\t\tdocument.cookie = str;\r\n\t}\r\n\tfunction getCookie(name) {\r\n\t\tvar search = name + \"=\";\r\n\t\tif (document.cookie.length > 0) {\r\n\t\t\tvar offset = document.cookie.indexOf(search);\r\n\t\t\tif (offset != -1) {\r\n\t\t\t\toffset += search.length;\r\n\t\t\t\tvar end = document.cookie.indexOf(\";\", offset);\r\n\t\t\t\tif (end == -1)\r\n\t\t\t\t\tend = document.cookie.length;\r\n\t\t\t\treturn document.cookie.substring(offset, end);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}\r\n\r\n\tfunction getCookieName(scheduler) {\r\n\t\treturn (scheduler._obj.id || \"scheduler\") + \"_settings\";\r\n\t}\r\n\r\n\tvar first = true;\r\n\tscheduler.attachEvent(\"onBeforeViewChange\",function(oldMode,oldDate,mode,date){\r\n\t\t// if Url plugin is enabled - explicit url values should have more priority than cookies\r\n\t\tif (first && scheduler._get_url_nav){\r\n\t\t\tvar urlNavigationPlugin = scheduler._get_url_nav();\r\n\t\t\tif(urlNavigationPlugin.date || urlNavigationPlugin.mode || urlNavigationPlugin.event){\r\n\t\t\t\tfirst = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar cookie = getCookieName(scheduler);\r\n\r\n\t\tif (first){\r\n\t\t\tfirst = false;\r\n\t\t\tvar schedulerCookie = getCookie(cookie);\r\n\t\t\tif (schedulerCookie){\r\n\r\n\t\t\t\tif(!scheduler._min_date){\r\n\t\t\t\t\t//otherwise scheduler will have incorrect date until timeout\r\n\t\t\t\t\t//it can cause js error with 'onMouseMove' handler of key_nav.js\r\n\t\t\t\t\tscheduler._min_date = date;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tschedulerCookie = unescape(schedulerCookie).split(\"@\");\r\n\t\t\t\tschedulerCookie[0] = this._helpers.parseDate(schedulerCookie[0]);\r\n\t\t\t\tvar view = this.isViewExists(schedulerCookie[1]) ? schedulerCookie[1] : mode,\r\n\t\t\t\t\tdate = !isNaN(+schedulerCookie[0]) ? schedulerCookie[0] : date;\r\n\r\n\t\t\t\twindow.setTimeout(function(){\r\n\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tscheduler.setCurrentView(date,view);\r\n\t\t\t\t},1);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", function (newMode , newDate){\r\n\t\tvar cookie = getCookieName(scheduler);\r\n\t\tvar text = escape(this._helpers.formatDate(newDate)+\"@\"+(newMode));\r\n\t\tsetCookie(cookie,\"expires=Sun, 31 Jan 9999 22:00:00 GMT\",text);\r\n\t});\r\n\r\n\t// As we are blocking first render above there could be a problem in case of dynamic loading and rendering of visible data in general ('from'/'to' won't be defined)\r\n\tvar old_load = scheduler._load;\r\n\tscheduler._load = function() {\r\n\t\tvar args = arguments;\r\n\r\n\t\tif (!scheduler._date) {\r\n\t\t\tvar that = this;\r\n\t\t\twindow.setTimeout(function() {\r\n\t\t\t\told_load.apply(that, args);\r\n\t\t\t},1);\r\n\t\t} else {\r\n\t\t\told_load.apply(this, args);\r\n\t\t}\r\n\t};\r\n}","export default {\r\n\talert: (extension, assert) => {\r\n\t\tassert(false, `The ${extension} extension is not included in this version of dhtmlxScheduler.
\r\n\t\tYou may need a Professional version of the component.
\r\n\t\tContact us at https://dhtmlx.com/docs/contact.shtml if you have any questions.`);\r\n\t}\r\n};","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Day Timeline\", scheduler.assert);\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Drag Between\", scheduler.assert);\r\n}","export default function(scheduler){\r\n/* global dhtmlXCombo */\r\nscheduler.form_blocks['combo']={\r\n\trender:function(sns) {\r\n\t\tif (!sns.cached_options)\r\n\t\t\tsns.cached_options = {};\r\n\t\tvar res = '';\r\n\t\tres += \"
\";\r\n\t\treturn res;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\t(function(){\r\n\t\t\tresetCombo();\r\n\t\t\tvar id = scheduler.attachEvent(\"onAfterLightbox\",function(){\r\n\t\t\t\t// otherwise destructor will never be called after form reset(e.g. in readonly event mode)\r\n\t\t\t\tresetCombo();\r\n\t\t\t\tscheduler.detachEvent(id);\r\n\t\t\t});\r\n\t\t\tfunction resetCombo(){\r\n\t\t\t\tif(node._combo && node._combo.DOMParent) {\r\n\t\t\t\t\tvar combo = node._combo;\r\n\t\t\t\t\tif(combo.unload){\r\n\t\t\t\t\t\tcombo.unload();\r\n\t\t\t\t\t}else if(combo.destructor){\r\n\t\t\t\t\t\tcombo.destructor();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// dhtmlxCombo 4.1.0 bug\r\n\t\t\t\t\tcombo.DOMParent = combo.DOMelem = null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})();\r\n\t\twindow.dhx_globalImgPath = config.image_path||'/';\r\n\t\tnode._combo = new dhtmlXCombo(node, config.name, node.offsetWidth-8);\r\n\t\tif (config.onchange)\r\n\t\t\tnode._combo.attachEvent(\"onChange\", config.onchange);\r\n\r\n\t\tif (config.options_height)\r\n\t\t\tnode._combo.setOptionHeight(config.options_height);\r\n\t\tvar combo = node._combo;\r\n\t\tcombo.enableFilteringMode(config.filtering, config.script_path||null, !!config.cache);\r\n\r\n\t\tif (!config.script_path) { // script-side filtration is used\r\n\t\t\tvar all_options = [];\r\n\t\t\tfor (var i = 0; i < config.options.length; i++) {\r\n\t\t\t\tvar option = config.options[i];\r\n\t\t\t\tvar single_option = [\r\n\t\t\t\t\toption.key,\r\n\t\t\t\t\toption.label,\r\n\t\t\t\t\toption.css\r\n\t\t\t\t];\r\n\t\t\t\tall_options.push(single_option);\r\n\t\t\t}\r\n\t\t\tcombo.addOption(all_options);\r\n\t\t\tif (ev[config.map_to]) {\r\n\t\t\t\tvar index = combo.getIndexByValue(ev[config.map_to]);\r\n\t\t\t\tcombo.selectOption(index);\r\n\t\t\t}\r\n\t\t} else { // server-side filtration is used\r\n\t\t\tvar selected_id = ev[config.map_to];\r\n\t\t\tif (selected_id) {\r\n\t\t\t\tif (config.cached_options[selected_id]) {\r\n\t\t\t\t\tcombo.addOption(selected_id, config.cached_options[selected_id]);\r\n\t\t\t\t\tcombo.disable(1);\r\n\t\t\t\t\tcombo.selectOption(0);\r\n\t\t\t\t\tcombo.disable(0);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tscheduler.ajax.get(config.script_path+\"?id=\"+selected_id+\"&uid=\"+scheduler.uid(), function(result){\r\n\t\t\t\t\t\tvar responseText = result.xmlDoc.responseText;\r\n\t\t\t\t\t\tvar label;\r\n\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\tvar res = JSON.parse(responseText);\r\n\t\t\t\t\t\t\tlabel = res.options[0].text;\r\n\t\t\t\t\t\t}catch(e){\r\n\t\t\t\t\t\t\tvar option = scheduler.ajax.xpath(\"//option\", result.xmlDoc)[0];\r\n\t\t\t\t\t\t\tlabel = option.childNodes[0].nodeValue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tconfig.cached_options[selected_id] = label;\r\n\t\t\t\t\t\tcombo.addOption(selected_id, label);\r\n\t\t\t\t\t\tcombo.disable(1);\r\n\t\t\t\t\t\tcombo.selectOption(0);\r\n\t\t\t\t\t\tcombo.disable(0);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tcombo.setComboValue(\"\");\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config) {\r\n\t\tvar selected_id = node._combo.getSelectedValue(); // value = key\r\n\t\tif (config.script_path) {\r\n\t\t\tconfig.cached_options[selected_id] = node._combo.getSelectedText();\r\n\t\t}\r\n\t\treturn selected_id;\r\n\t},\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\nscheduler.form_blocks['radio']={\r\n\trender:function(sns) {\r\n\t\tvar res = '';\r\n\t\tres += `
`;\r\n\t\tfor (var i=0; i\"+\" \"+sns.options[i].label+\"\";\r\n\t\t}\r\n\t\tres += \"
\";\r\n\r\n\t\treturn res;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\tvar radiobuttons = node.getElementsByTagName('input');\r\n\t\tfor (var i = 0; i < radiobuttons.length; i++) {\r\n\t\t\tradiobuttons[i].checked = false;\r\n\t\t\tvar checked_value = ev[config.map_to]||value;\r\n\t\t\tif (radiobuttons[i].value == checked_value) {\r\n\t\t\t\tradiobuttons[i].checked = true;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tvar radiobuttons = node.getElementsByTagName('input');\r\n\t\tfor(var i=0; i
';\r\n\t\telse\r\n\t\t\treturn '';\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\tnode=scheduler._lightbox.querySelector(`#${config.id}`);\r\n\t\tvar id = scheduler.uid();\r\n\t\tvar isChecked = (typeof config.checked_value != \"undefined\") ? value == config.checked_value : !!value;\r\n\t\tnode.className += \" dhx_cal_checkbox\";\r\n\t\tvar check_html = \"\";\r\n\t\tvar label_html = \"\";\r\n\t\tif (scheduler.config.wide_form){\r\n\t\t\tnode.innerHTML = label_html;\r\n\t\t\tnode.nextSibling.innerHTML=check_html;\r\n\t\t} else\r\n\t\t\tnode.innerHTML=check_html+label_html;\r\n\r\n\t\tif (config.handler) {\r\n\t\t\tvar checkbox = node.getElementsByTagName('input')[0];\r\n\t\t\tif(checkbox.$_eventAttached){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tcheckbox.$_eventAttached = true;\r\n\t\t\tscheduler.event(checkbox, \"click\", config.handler);\r\n\t\t\t//checkbox.onclick = config.handler;\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tnode=scheduler._lightbox.querySelector(`#${config.id}`);\r\n\t\tvar checkbox = node.getElementsByTagName('input')[0]; // moved to the header\r\n\t\tif (!checkbox)\r\n\t\t\tcheckbox = node.nextSibling.getElementsByTagName('input')[0];\r\n\t\treturn (checkbox.checked)?(config.checked_value||true):(config.unchecked_value||false);\r\n\t},\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.ext.fullscreen = {\r\n\ttoggleIcon: null\r\n};\r\n\r\nscheduler.expand = function() {\r\n\tif(!scheduler.callEvent(\"onBeforeExpand\", []))\r\n\t\treturn;\r\n\tvar t = scheduler._obj;\r\n\tdo {\r\n\t\tt._position = t.style.position || \"\";\r\n\t\tt.style.position = \"static\";\r\n\t} while ((t = t.parentNode) && t.style);\r\n\tt = scheduler._obj;\r\n\tt.style.position = \"absolute\";\r\n\tt._width = t.style.width;\r\n\tt._height = t.style.height;\r\n\tt.style.width = t.style.height = \"100%\";\r\n\tt.style.top = t.style.left = \"0px\";\r\n\r\n\tvar top = document.body;\r\n\ttop.scrollTop = 0;\r\n\r\n\ttop = top.parentNode;\r\n\tif (top)\r\n\t\ttop.scrollTop = 0;\r\n\tdocument.body._overflow = document.body.style.overflow || \"\";\r\n\tdocument.body.style.overflow = \"hidden\";\r\n\tscheduler._maximize();\r\n\tscheduler.callEvent(\"onExpand\", []);\r\n};\r\nscheduler.collapse = function() {\r\n\tif(!scheduler.callEvent(\"onBeforeCollapse\", []))\r\n\t\treturn;\r\n\tvar t = scheduler._obj;\r\n\tdo {\r\n\t\tt.style.position = t._position;\r\n\t} while ((t = t.parentNode) && t.style);\r\n\tt = scheduler._obj;\r\n\tt.style.width = t._width;\r\n\tt.style.height = t._height;\r\n\tdocument.body.style.overflow = document.body._overflow;\r\n\tscheduler._maximize();\r\n\tscheduler.callEvent(\"onCollapse\", []);\r\n};\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar t = document.createElement(\"div\");\r\n\tt.className = \"dhx_expand_icon\";\r\n\tscheduler.ext.fullscreen.toggleIcon = t;\r\n\tt.innerHTML = `\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t`;\r\n\tscheduler._obj.appendChild(t);\r\n\tscheduler.event(t, \"click\", function() {\r\n\t\tif (!scheduler.expanded)\r\n\t\t\tscheduler.expand(); else\r\n\t\t\tscheduler.collapse();\r\n\t});\r\n});\r\nscheduler._maximize = function() {\r\n\tthis.expanded = !this.expanded;\r\n\tif(this.expanded){\r\n\t\tthis.ext.fullscreen.toggleIcon.classList.add(\"dhx_expand_icon--expanded\");\r\n\t\t\r\n\t}else{\r\n\t\tthis.ext.fullscreen.toggleIcon.classList.remove(\"dhx_expand_icon--expanded\");\r\n\t}\r\n\t\r\n\t//scheduler.ext.fullscreen.toggleIcon.style.backgroundPosition = \"0 \" + (this.expanded ? \"0\" : \"18\") + \"px\";\r\n\r\n\tvar directions = ['left', 'top'];\r\n\tfor (var i = 0; i < directions.length; i++) {\r\n\t\t//var margin = scheduler.xy['margin_' + directions[i]];\r\n\t\tvar prev_margin = scheduler['_prev_margin_' + directions[i]];\r\n\t\tif (scheduler.xy['margin_' + directions[i]]) {\r\n\t\t\tscheduler['_prev_margin_' + directions[i]] = scheduler.xy['margin_' + directions[i]];\r\n\t\t\tscheduler.xy['margin_' + directions[i]] = 0;\r\n\t\t} else {\r\n\t\t\tif (prev_margin) {\r\n\t\t\t\tscheduler.xy['margin_' + directions[i]] = scheduler['_prev_margin_' + directions[i]];\r\n\t\t\t\tdelete scheduler['_prev_margin_' + directions[i]];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler.setCurrentView();\r\n};\r\n\r\n\r\n}\r\n","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Grid\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\tvar els = document.body.getElementsByTagName(\"DIV\");\r\n\tfor (var i=0; i < els.length; i++) {\r\n\t\tvar cs = els[i].className||\"\";\r\n\t\tcs = cs.split(\":\");\r\n\t\tif (cs.length == 2 && cs[0] == \"template\"){\r\n\t\t\tvar code = \"return \\\"\"+(els[i].innerHTML||\"\").replace(/\\\\/g, \"\\\\\\\\\").replace(/\"/g,\"\\\\\\\"\").replace(/[\\n\\r]+/g,\"\")+\"\\\";\";\r\n\t\t\tcode = unescape(code).replace(/\\{event\\.([a-z]+)\\}/g,function(all,mask){\r\n\t\t\t\treturn '\"+ev.'+mask+'+\"';\r\n\t\t\t});\r\n\t\t\tscheduler.templates[cs[1]]=Function(\"start\",\"end\",\"ev\",code);\r\n\t\t\tels[i].style.display='none';\r\n\t\t}\r\n\t}\r\n});\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.shortcuts = {\r\n\tcreateCommand: function(){\r\n\t\treturn {\r\n\t\t\tmodifiers:{\r\n\t\t\t\t\"shift\": false,\r\n\t\t\t\t\"alt\": false,\r\n\t\t\t\t\"ctrl\": false,\r\n\t\t\t\t\"meta\": false\r\n\t\t\t},\r\n\t\t\tkeyCode: null\r\n\t\t};\r\n\t},\r\n\tparse: function(shortcut){\r\n\t\tvar commands = [];\r\n\r\n\t\tvar expr = this.getExpressions(this.trim(shortcut));\r\n\t\tfor(var i = 0; i < expr.length; i++){\r\n\t\t\tvar words = this.getWords(expr[i]);\r\n\r\n\t\t\tvar command = this.createCommand();\r\n\r\n\t\t\tfor(var j = 0; j < words.length; j++){\r\n\t\t\t\tif(this.commandKeys[words[j]]){\r\n\t\t\t\t\tcommand.modifiers[words[j]] = true;\r\n\t\t\t\t}else if(this.specialKeys[words[j]]){\r\n\t\t\t\t\tcommand.keyCode = this.specialKeys[words[j]];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcommand.keyCode = words[j].charCodeAt(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tcommands.push(command);\r\n\t\t}\r\n\t\treturn commands;\r\n\t},\r\n\r\n\tgetCommandFromEvent: function(domEvent){\r\n\t\tvar command = this.createCommand();\r\n\t\tcommand.modifiers.shift = !!domEvent.shiftKey;\r\n\t\tcommand.modifiers.alt = !!domEvent.altKey;\r\n\t\tcommand.modifiers.ctrl = !!domEvent.ctrlKey;\r\n\t\tcommand.modifiers.meta = !!domEvent.metaKey;\r\n\t\tcommand.keyCode = domEvent.which || domEvent.keyCode;\r\n\r\n\t\tif(command.keyCode >= 96 && command.keyCode <= 105){\r\n\t\t\t// numpad keys 96-105 -> 48-57\r\n\t\t\tcommand.keyCode -= 48;//convert numpad number code to regular number code\r\n\t\t}\r\n\r\n\t\tvar printableKey = String.fromCharCode(command.keyCode );\r\n\t\tif(printableKey){\r\n\t\t\tcommand.keyCode = printableKey.toLowerCase().charCodeAt(0);\r\n\t\t}\r\n\t\treturn command;\r\n\t},\r\n\r\n\tgetHashFromEvent: function(domEvent){\r\n\t\treturn this.getHash(this.getCommandFromEvent(domEvent));\r\n\t},\r\n\r\n\tgetHash: function(command){\r\n\t\tvar parts = [];\r\n\t\tfor(var i in command.modifiers){\r\n\t\t\tif(command.modifiers[i]){\r\n\t\t\t\tparts.push(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tparts.push(command.keyCode);\r\n\r\n\t\treturn parts.join(this.junctionChar);\r\n\t},\r\n\r\n\tgetExpressions: function(shortcut){\r\n\t\treturn shortcut.split(this.junctionChar);\r\n\t},\r\n\tgetWords: function(term){\r\n\t\treturn term.split(this.combinationChar);\r\n\t},\r\n\ttrim: function(shortcut){\r\n\t\treturn shortcut.replace(/\\s/g, \"\");\r\n\t},\r\n\tjunctionChar:\",\",\r\n\tcombinationChar:\"+\",\r\n\tcommandKeys:{\r\n\t\t\"shift\": 16,\r\n\t\t\"alt\": 18,\r\n\t\t\"ctrl\": 17,\r\n\t\t\"meta\": true\r\n\t},\r\n\tspecialKeys:{\r\n\t\t\"backspace\": 8,\r\n\t\t\"tab\": 9,\r\n\t\t\"enter\": 13,\r\n\t\t\"esc\": 27,\r\n\t\t\"space\": 32,\r\n\t\t\"up\": 38,\r\n\t\t\"down\": 40,\r\n\t\t\"left\": 37,\r\n\t\t\"right\": 39,\r\n\t\t\"home\": 36,\r\n\t\t\"end\": 35,\r\n\t\t\"pageup\": 33,\r\n\t\t\"pagedown\": 34,\r\n\t\t\"delete\": 46,\r\n\t\t\"insert\": 45,\r\n\t\t\"plus\":107,\r\n\t\t\"f1\": 112,\r\n\t\t\"f2\": 113,\r\n\t\t\"f3\": 114,\r\n\t\t\"f4\": 115,\r\n\t\t\"f5\": 116,\r\n\t\t\"f6\": 117,\r\n\t\t\"f7\": 118,\r\n\t\t\"f8\": 119,\r\n\t\t\"f9\": 120,\r\n\t\t\"f10\": 121,\r\n\t\t\"f11\": 122,\r\n\t\t\"f12\": 123\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.EventHandler = {\r\n\t_handlers: null,\r\n\tfindHandler: function(command){\r\n\t\tif(!this._handlers) this._handlers = {};\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\t\tvar hash = shortcuts.getHash(command);\r\n\r\n\t\treturn this._handlers[hash];\r\n\t},\r\n\r\n\tdoAction: function(command, e){\r\n\t\tvar handler = this.findHandler(command);\r\n\t\tif(handler){\r\n\t\t\thandler.call(this, e);\r\n\r\n\t\t\tif (e.preventDefault) e.preventDefault();\r\n\t\t\telse e.returnValue = false;\r\n\r\n\t\t}\r\n\t},\r\n\tbind: function(shortcut, handler){\r\n\t\tif(!this._handlers) this._handlers = {};\r\n\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\r\n\t\tvar commands = shortcuts.parse(shortcut);\r\n\t\tfor(var i = 0; i < commands.length; i++){\r\n\t\t\tthis._handlers[shortcuts.getHash(commands[i])] = handler;\r\n\t\t}\r\n\t},\r\n\tunbind: function(shortcut){\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\r\n\t\tvar commands = shortcuts.parse(shortcut);\r\n\t\tfor(var i = 0; i < commands.length; i++){\r\n\t\t\tif(this._handlers[shortcuts.getHash(commands[i])]){\r\n\t\t\t\tdelete this._handlers[shortcuts.getHash(commands[i])];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tbindAll: function(map){\r\n\t\tfor(var i in map){\r\n\t\t\tthis.bind(i, map[i]);\r\n\t\t}\r\n\t},\r\n\tinitKeys: function(){\r\n\t\tif(!this._handlers)\r\n\t\t\tthis._handlers = {};\r\n\t\tif(this.keys){\r\n\t\t\tthis.bindAll(this.keys);\r\n\t\t}\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n(function(){\r\n\tscheduler.$keyboardNavigation.getFocusableNodes = scheduler._getFocusableNodes;\r\n\r\n\tscheduler.$keyboardNavigation.trapFocus = function trapFocus(root, e){\r\n\t\tif(e.keyCode != 9) return false;\r\n\r\n\t\tvar focusable = scheduler.$keyboardNavigation.getFocusableNodes(root);\r\n\t\tvar currentFocus = document.activeElement;\r\n\t\tvar currentIndex = -1;\r\n\t\tfor(var i = 0; i < focusable.length; i++){\r\n\t\t\tif(focusable[i] == currentFocus){\r\n\t\t\t\tcurrentIndex = i;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar nextIndex, nextItem;\r\n\t\tif(e.shiftKey){\r\n\r\n\t\t\t// back tab\r\n\t\t\t// go to the last element if we focused on the first\r\n\t\t\tnextIndex = (currentIndex <= 0) ? (focusable.length - 1) : (currentIndex - 1);\r\n\r\n\t\t\tnextItem = focusable[nextIndex];\r\n\t\t\tif(nextItem){\r\n\t\t\t\tnextItem.focus();\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\t// forward tab\r\n\t\t\t// forward tab from last element should go back to the first element\r\n\t\t\tnextIndex = (currentIndex >= focusable.length - 1) ? 0 : (currentIndex + 1);\r\n\t\t\tnextItem = focusable[nextIndex];\r\n\t\t\tif(nextItem){\r\n\t\t\t\tnextItem.focus();\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t};\r\n})();\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.marker = {\r\n\tclear: function(){\r\n\t\tvar divs = scheduler.$container.querySelectorAll(\".dhx_focus_slot\");\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tdivs[i].parentNode.removeChild(divs[i]);\r\n\t\t}\r\n\t},\r\n\tcreateElement: function(){\r\n\t\tvar element = document.createElement(\"div\");\r\n\t\telement.setAttribute(\"tabindex\", -1);\r\n\t\telement.className = \"dhx_focus_slot\";\r\n\t\treturn element;\r\n\t},\r\n\r\n\trenderMultiple: function(start, end, method){\r\n\t\tvar divs = [];\r\n\t\tvar currentStart = new Date(start);\r\n\t\tvar currentEnd = new Date(Math.min(end.valueOf(), scheduler.date.add(scheduler.date.day_start(new Date(start)), 1, \"day\").valueOf()));\r\n\t\twhile(currentStart.valueOf() < end.valueOf()){\r\n\r\n\t\t\tdivs = divs.concat(method.call(this, currentStart, new Date(Math.min(currentEnd.valueOf(), end.valueOf()))));\r\n\t\t\tcurrentStart = scheduler.date.day_start(scheduler.date.add(currentStart, 1, \"day\"));\r\n\r\n\t\t\tcurrentEnd = scheduler.date.day_start(scheduler.date.add(currentStart, 1, \"day\"));\r\n\t\t\tcurrentEnd = new Date(Math.min(currentEnd.valueOf(), end.valueOf()));\r\n\t\t}\r\n\r\n\t\treturn divs;\r\n\t},\r\n\r\n\r\n\trender: function(start, end, section){\r\n\t\tthis.clear();\r\n\t\tvar divs = [];\r\n\r\n\t\tvar modes = scheduler.$keyboardNavigation.TimeSlot.prototype._modes;\r\n\t\tvar view = scheduler.$keyboardNavigation.TimeSlot.prototype._getMode();\r\n\t\tswitch (view){\r\n\t\t\tcase modes.units:\r\n\t\t\t\tdivs = this.renderVerticalMarker(start, end, section);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.timeline:\r\n\t\t\t\tdivs = this.renderTimelineMarker(start, end, section);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.year:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderYearMarker));\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.month:\r\n\t\t\t\tdivs = this.renderMonthMarker(start, end);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.weekAgenda:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderWeekAgendaMarker));\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.list:\r\n\t\t\t\tdivs = this.renderAgendaMarker(start, end);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.dayColumns:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderVerticalMarker));\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tthis.addWaiAriaLabel(divs, start, end, section);\r\n\t\tthis.addDataAttributes(divs, start, end, section);\r\n\r\n\t\tfor(var i = divs.length - 1; i >= 0; i--){\r\n\t\t\tif(divs[i].offsetWidth){\r\n\t\t\t\treturn divs[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t},\r\n\r\n\taddDataAttributes: function(divs, start, end, section){\r\n\t\tvar dateToStr = scheduler.date.date_to_str(scheduler.config.api_date);\r\n\r\n\t\tvar from = dateToStr(start),\r\n\t\t\tto = dateToStr(end);\r\n\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tdivs[i].setAttribute(\"data-start-date\", from);\r\n\t\t\tdivs[i].setAttribute(\"data-end-date\", to);\r\n\t\t\tif(section){\r\n\t\t\t\tdivs[i].setAttribute(\"data-section\", section);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\taddWaiAriaLabel: function(divs, start, end, section){\r\n\t\tvar label = \"\";\r\n\t\tvar state = scheduler.getState();\r\n\t\tvar mode = state.mode;\r\n\r\n\t\tvar dateTimeLabel = false;\r\n\r\n\t\tlabel += scheduler.templates.day_date(start);\r\n\r\n\t\tif((scheduler.date.day_start(new Date(start)).valueOf() != start.valueOf())){\r\n\t\t\tlabel += \" \" + scheduler.templates.hour_scale(start);\r\n\t\t\tdateTimeLabel = true;\r\n\t\t}\r\n\r\n\t\tif((scheduler.date.day_start(new Date(start)).valueOf() != scheduler.date.day_start(new Date(end)).valueOf())){\r\n\r\n\t\t\tlabel += \" - \" + scheduler.templates.day_date(end);\r\n\t\t\tif(dateTimeLabel || (scheduler.date.day_start(new Date(end)).valueOf() != end.valueOf())){\r\n\t\t\t\tlabel += \" \" + scheduler.templates.hour_scale(end);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(section){\r\n\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\t\t\t\tconst timeline = scheduler.matrix[mode];\r\n\t\t\t\tconst sectionObject = timeline.y_unit[timeline.order[section]];\r\n\t\t\t\tlabel += \", \" + scheduler.templates[mode + \"_scale_label\"](sectionObject.key, sectionObject.label, sectionObject);\r\n\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\tconst units = scheduler._props[mode];\r\n\t\t\t\tconst sectionObject = units.options[units.order[section]];\r\n\r\n\t\t\t\tlabel += \", \" + scheduler.templates[mode + \"_scale_text\"](sectionObject.key, sectionObject.label, sectionObject);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tscheduler._waiAria.setAttributes(divs[i], {\r\n\t\t\t\t\"aria-label\": label,\r\n\t\t\t\t\"aria-live\": \"polite\"\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\r\n\trenderWeekAgendaMarker: function(start_date, end_date){\r\n\t\tvar divs = scheduler.$container.querySelectorAll(\".dhx_wa_day_cont .dhx_wa_scale_bar\");\r\n\r\n\t\tvar currDate = scheduler.date.week_start(new Date(scheduler.getState().min_date));\r\n\r\n\t\tvar index = -1;\r\n\t\tvar markerDate = scheduler.date.day_start(new Date(start_date));\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tindex++;\r\n\t\t\tif(scheduler.date.day_start(new Date(currDate)).valueOf() == markerDate.valueOf()){\r\n\t\t\t\tbreak;\r\n\t\t\t}else{\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(index != -1) return this._wrapDiv(divs[index]);\r\n\t\treturn [];\r\n\t},\r\n\r\n\t_wrapDiv: function(cell){\r\n\t\tvar marker = this.createElement();\r\n\t\tmarker.style.top = cell.offsetTop + \"px\";\r\n\t\tmarker.style.left = cell.offsetLeft + \"px\";\r\n\t\tmarker.style.width = cell.offsetWidth + \"px\";\r\n\t\tmarker.style.height = cell.offsetHeight + \"px\";\r\n\t\tcell.appendChild(marker);\r\n\t\treturn [marker];\r\n\t},\r\n\trenderYearMarker: function(start_date, end_date){\r\n\t\tvar cell = scheduler._get_year_cell(start_date);\r\n\t\tcell.style.position = \"relative\";\r\n\t\tvar marker = this.createElement();\r\n\t\tmarker.style.top = \"0px\";\r\n\t\tmarker.style.left = \"0px\";\r\n\t\tmarker.style.width = \"100%\";\r\n\t\tmarker.style.height = \"100%\";\r\n\t\tcell.appendChild(marker);\r\n\t\treturn [marker];\r\n\t},\r\n\r\n\trenderAgendaMarker: function(start_date, end_date){\r\n\t\tvar block = this.createElement();\r\n\t\tblock.style.height = \"1px\";\r\n\t\tblock.style.width = \"100%\";\r\n\t\tblock.style.opacity = 1;\r\n\t\tblock.style.top = \"0px\";\r\n\t\tblock.style.left = \"0px\";\r\n\t\tscheduler.$container.querySelector(\".dhx_cal_data\").appendChild(block);\r\n\t\treturn [block];\r\n\t},\r\n\r\n\trenderTimelineMarker: function(start_date, end_date, section){\r\n\t\tvar view_opts = scheduler._lame_copy({}, scheduler.matrix[scheduler._mode]);\r\n\t\tvar areas = view_opts._scales;\r\n\t\t//timespans must always use actual position, not rounded\r\n\t\tview_opts.round_position = false;\r\n\t\tvar blocks = [];\r\n\r\n\t\tvar min_date = start_date ? new Date(start_date) : scheduler._min_date;\r\n\t\tvar max_date = end_date ? new Date(end_date) : scheduler._max_date;\r\n\r\n\t\tif(min_date.valueOf() < scheduler._min_date.valueOf())\r\n\t\t\tmin_date = new Date(scheduler._min_date);\r\n\t\tif(max_date.valueOf() > scheduler._max_date.valueOf())\r\n\t\t\tmax_date = new Date(scheduler._max_date);\r\n\r\n\t\tif(!view_opts._trace_x) return blocks;\r\n\r\n\t\tfor(var i = 0; i < view_opts._trace_x.length; i++){\r\n\t\t\tif(scheduler._is_column_visible(view_opts._trace_x[i]))\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\tif(i == view_opts._trace_x.length)\r\n\t\t\treturn blocks;\r\n\r\n\t\tvar area = areas[section];\r\n\r\n\t\tif (!(min_date < end_date && max_date > start_date))\r\n\t\t\treturn blocks;\r\n\r\n\t\tvar block = this.createElement();\r\n\r\n\t\tlet start_pos;\r\n\t\tlet end_pos;\r\n\r\n\t\tfunction set_date_part(source, target) {\r\n\t\t\t// reset to start of the month in order to prevent month change when target is on 31th day, and source month has only 30 days\r\n\t\t\ttarget.setDate(1);\r\n\r\n\t\t\ttarget.setFullYear(source.getFullYear());\r\n\t\t\ttarget.setMonth(source.getMonth());\r\n\t\t\ttarget.setDate(source.getDate());\r\n\t\t}\r\n\r\n\t\tif(!scheduler.getView().days){\r\n\t\t\tstart_pos = scheduler._timeline_getX({start_date: start_date}, false, view_opts);\r\n\t\t\tend_pos = scheduler._timeline_getX({start_date: end_date}, false, view_opts);\r\n\t\t}else{\r\n\t\t\t// daytimeline\r\n\t\t\tconst tempStart = new Date(start_date);\r\n\t\t\tset_date_part(scheduler._min_date, tempStart);\r\n\t\t\tconst tempEnd = new Date(end_date);\r\n\t\t\tset_date_part(scheduler._min_date, tempEnd);\r\n\t\t\tstart_pos = scheduler._timeline_getX({start_date: tempStart}, false, view_opts);\r\n\t\t\tend_pos = scheduler._timeline_getX({start_date: tempEnd}, false, view_opts);\r\n\t\t}\r\n\r\n\t\tvar height = ((view_opts._section_height[section]-1) || (view_opts.dy - 1));\r\n\r\n\t\tvar top = 0;\r\n\t\tif (scheduler._isRender('cell')){\r\n\t\t\ttop = area.offsetTop;\r\n\t\t\tstart_pos += view_opts.dx;\r\n\t\t\tend_pos += view_opts.dx;\r\n\t\t\tarea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t}else{\r\n\r\n\t\t}\r\n\t\tvar width = Math.max(1, end_pos - start_pos - 1);\r\n\t\tlet direction = \"left\";\r\n\t\tif(scheduler.config.rtl){\r\n\t\t\tdirection = \"right\";\r\n\t\t}\r\n\t\tblock.style.cssText = `height:${height}px; ${direction}:${start_pos}px; width:${width}px; top:${top}px;`;\r\n\r\n\t\tif(area){\r\n\t\t\tarea.appendChild(block);\r\n\t\t\tblocks.push(block);\r\n\t\t}\r\n\r\n\t\treturn blocks;\r\n\t},\r\n\r\n\trenderMonthCell: function(date){\r\n\t\tvar cells = scheduler.$container.querySelectorAll(\".dhx_month_head\");\r\n\r\n\t\tvar divs = [];\r\n\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\tdivs.push(cells[i].parentNode);\r\n\t\t}\r\n\r\n\t\tvar firstDate = scheduler.date.week_start(new Date(scheduler.getState().min_date));\r\n\r\n\t\tvar index = -1;\r\n\t\tvar weekNumber = 0;\r\n\t\tvar dayIndex = -1;\r\n\t\tvar currDate = firstDate;\r\n\t\tvar markerDate = scheduler.date.day_start(new Date(date));\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tindex++;\r\n\r\n\t\t\tif(dayIndex == 6){\r\n\t\t\t\tweekNumber++;\r\n\t\t\t\tdayIndex = 0;\r\n\t\t\t}else{\r\n\t\t\t\tdayIndex++;\r\n\t\t\t}\r\n\r\n\t\t\tif(scheduler.date.day_start(new Date(currDate)).valueOf() == markerDate.valueOf()){\r\n\t\t\t\tbreak;\r\n\t\t\t}else{\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(index == -1){\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tvar left = scheduler._colsS[dayIndex];\r\n\t\tvar top = scheduler._colsS.heights[weekNumber];\r\n\r\n\t\tvar div = this.createElement();\r\n\t\tdiv.style.top = top + \"px\";\r\n\t\tdiv.style.left = left + \"px\";\r\n\t\tdiv.style.width = scheduler._cols[dayIndex] + \"px\";\r\n\t\tdiv.style.height = ((scheduler._colsS.heights[weekNumber + 1] - top) || scheduler._colsS.height) + \"px\" ;\r\n\r\n\r\n\t\tvar container = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\r\n\t\tvar datatable = container.querySelector(\"table\");\r\n\t\tif(datatable.nextSibling){\r\n\t\t\tcontainer.insertBefore(div, datatable.nextSibling);\r\n\t\t}else{\r\n\t\t\tcontainer.appendChild(div);\r\n\t\t}\r\n\t\treturn div;\r\n\t},\r\n\trenderMonthMarker: function(start_date, end_date){\r\n\t\tvar res = [];\r\n\t\tvar currentDate = start_date;\r\n\t\twhile(currentDate.valueOf() < end_date.valueOf()){\r\n\t\t\tres.push(this.renderMonthCell(currentDate));\r\n\t\t\tcurrentDate = scheduler.date.add(currentDate, 1, \"day\");\r\n\t\t}\r\n\t\treturn res;\r\n\t},\r\n\r\n\trenderVerticalMarker: function(start_date, end_date, section){\r\n\t\tvar index = scheduler.locate_holder_day(start_date);\r\n\r\n\t\tvar divs = [];\r\n\t\tvar area = null;\r\n\r\n\t\tvar c = scheduler.config;\r\n\t\tif(scheduler._ignores[index]) return divs;\r\n\r\n\t\tif (scheduler._props && scheduler._props[scheduler._mode] && section) {\r\n\t\t\tvar view = scheduler._props[scheduler._mode];\r\n\t\t\tindex = view.order[section];\r\n\r\n\t\t\tvar inner_index = view.order[section];\r\n\t\t\tif(!(view.days > 1)){\r\n\t\t\t\tindex = inner_index;\r\n\t\t\t\tif (view.size && (index > view.position+view.size)) {\r\n\t\t\t\t\tindex = 0;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t//var units_l = view.size || view.options.length;\r\n\r\n\t\t\t\tindex = scheduler.locate_holder_day(start_date) + inner_index;\r\n\t\t\t\t//index = index*units_l + inner_index;\r\n\t\t\t}\r\n\t\t}\r\n\t\tarea = scheduler.locate_holder(index);\r\n\t\tif(!area || area.querySelector(\".dhx_scale_hour\")){\r\n\t\t\t// hour scale instead of date column\r\n\t\t\treturn document.createElement(\"div\");\r\n\t\t}\r\n\r\n\t\tvar start = Math.max((start_date.getHours()*60 + start_date.getMinutes()), c.first_hour*60);\r\n\r\n\r\n\t\tvar end = Math.min((end_date.getHours()*60 + end_date.getMinutes()), c.last_hour*60);\r\n\t\tif(!end && (scheduler.date.day_start(new Date(end_date)).valueOf() > scheduler.date.day_start(new Date(start_date)).valueOf())){\r\n\t\t\tend = c.last_hour*60;\r\n\t\t}\r\n\r\n\t\tif (end <= start) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tvar block = this.createElement();\r\n\r\n\t\t// +1 for working with section which really takes up whole height (as % would be == 0)\r\n\t\tvar all_hours_height = scheduler.config.hour_size_px*c.last_hour + 1;\r\n\t\tvar hour_ms = 60*60*1000;\r\n\t\tblock.style.top = (Math.round((start*60*1000-scheduler.config.first_hour*hour_ms)*scheduler.config.hour_size_px/hour_ms) % all_hours_height) + \"px\";\r\n\t\tblock.style.lineHeight = block.style.height = Math.max((Math.round(((end-start)*60*1000)*scheduler.config.hour_size_px/hour_ms)) % all_hours_height, 1)+\"px\";\r\n\t\tblock.style.width = \"100%\";\r\n\t\tarea.appendChild(block);\r\n\t\tdivs.push(block);\r\n\t\treturn divs[0];\r\n\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode = function(){};\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.EventHandler,\r\n\t{\r\n\t\tgetDefaultNode: function(){\r\n\t\t\tvar node = new scheduler.$keyboardNavigation.TimeSlot();\r\n\r\n\t\t\tif(!node.isValid()){\r\n\t\t\t\tnode = node.fallback();\r\n\t\t\t}\r\n\t\t\treturn node;\r\n\t\t},\r\n\r\n\t\t_modes:{\r\n\t\t\tmonth: \"month\",\r\n\t\t\tyear: \"year\",\r\n\t\t\tdayColumns: \"dayColumns\",\r\n\t\t\ttimeline:\"timeline\",\r\n\t\t\tunits:\"units\",\r\n\t\t\tweekAgenda: \"weekAgenda\",\r\n\t\t\tlist: \"list\"\r\n\t\t},\r\n\t\tgetMode: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tvar mode = state.mode;\r\n\t\t\tif((scheduler.matrix && scheduler.matrix[mode])){\r\n\t\t\t\treturn this._modes.timeline;\r\n\t\t\t} else if((scheduler._props && scheduler._props[mode])){\r\n\t\t\t\treturn this._modes.units;\r\n\t\t\t}else if(mode == \"month\"){\r\n\t\t\t\treturn this._modes.month;\r\n\t\t\t}else if(mode == \"year\"){\r\n\t\t\t\treturn this._modes.year;\r\n\t\t\t}else if(mode == \"week_agenda\"){\r\n\t\t\t\treturn this._modes.weekAgenda;\r\n\t\t\t}else if(mode == \"map\" || mode == \"agenda\" || (scheduler._grid && scheduler[\"grid_\" + mode])){\r\n\t\t\t\treturn this._modes.list;\r\n\t\t\t}else{\r\n\t\t\t\treturn this._modes.dayColumns;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.focus();\r\n\t\t},\r\n\r\n\t\tblur: function(){\r\n\r\n\t\t},\r\n\r\n\t\tdisable: function(){\r\n\t\t\tscheduler.$container.setAttribute(\"tabindex\", \"0\");\r\n\t\t},\r\n\t\tenable: function(){\r\n\t\t\tif(scheduler.$container)\r\n\t\t\t\tscheduler.$container.removeAttribute(\"tabindex\");\r\n\t\t},\r\n\t\tisEnabled: function(){\r\n\t\t\treturn scheduler.$container.hasAttribute(\"tabindex\");\r\n\t\t},\r\n\r\n\r\n\t\t_compareEvents: function(a, b){\r\n\t\t\tif (a.start_date.valueOf() == b.start_date.valueOf())\r\n\t\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\t\treturn a.start_date.valueOf() > b.start_date.valueOf() ? 1 : -1;\r\n\t\t},\r\n\r\n\t\t_pickEvent: function(from, to, startId, reverse){\r\n\t\t\tvar range = scheduler.getState();\r\n\t\t\tfrom = new Date(Math.max(range.min_date.valueOf(), from.valueOf()));\r\n\t\t\tto = new Date(Math.min(range.max_date.valueOf(), to.valueOf()));\r\n\r\n\t\t\tvar evs = scheduler.getEvents(from, to);\r\n\t\t\tevs.sort(this._compareEvents);\r\n\t\t\tif(reverse){\r\n\t\t\t\tevs = evs.reverse();\r\n\t\t\t}\r\n\r\n\t\t\tvar trim = !!startId;\r\n\t\t\tfor(var i =0; i < evs.length && trim; i++){\r\n\t\t\t\tif(evs[i].id == startId){\r\n\t\t\t\t\ttrim = false;\r\n\t\t\t\t}\r\n\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\r\n\t\t\tfor(var i = 0; i < evs.length; i++){\r\n\t\t\t\tvar eventElement = new scheduler.$keyboardNavigation.Event(evs[i].id);\r\n\t\t\t\tif(eventElement.getNode())\r\n\t\t\t\t\treturn evs[i];\r\n\t\t\t}\r\n\r\n\t\t\treturn null;\r\n\t\t},\r\n\r\n\t\tnextEventHandler: function(id){\r\n\t\t\tvar activeNode = scheduler.$keyboardNavigation.dispatcher.activeNode;\r\n\r\n\t\t\tvar startId = id || (activeNode && activeNode.eventId);\r\n\r\n\t\t\tvar nextEvent = null;\r\n\t\t\tif(startId && scheduler.getEvent(startId)){\r\n\t\t\t\tvar currEvent = scheduler.getEvent(startId);\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tcurrEvent.start_date,\r\n\t\t\t\t\tscheduler.date.add(currEvent.start_date, 1, \"year\"),\r\n\t\t\t\t\tcurrEvent.id,\r\n\t\t\t\t\tfalse\r\n\t\t\t\t);\r\n\r\n\t\t\t}\r\n\t\t\tif(!nextEvent && !id){\r\n\t\t\t\tvar visibleDates = scheduler.getState();\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tvisibleDates.min_date,\r\n\t\t\t\t\tscheduler.date.add(visibleDates.min_date, 1, \"year\"),\r\n\t\t\t\t\tnull,\r\n\t\t\t\t\tfalse\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tif(nextEvent){\r\n\r\n\t\t\t\tvar nextEv = new scheduler.$keyboardNavigation.Event(nextEvent.id);\r\n\t\t\t\tif(!nextEv.isValid()){// not visible event\r\n\t\t\t\t\tthis.nextEventHandler(nextEvent.id);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(activeNode){activeNode.blur();}\r\n\t\t\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(nextEv);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tprevEventHandler: function(id){\r\n\t\t\tvar activeNode = scheduler.$keyboardNavigation.dispatcher.activeNode;\r\n\r\n\t\t\tvar startId = id || (activeNode && activeNode.eventId);\r\n\r\n\t\t\tvar nextEvent = null;\r\n\t\t\tif(startId && scheduler.getEvent(startId)){\r\n\t\t\t\tvar currEvent = scheduler.getEvent(startId);\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tscheduler.date.add(currEvent.end_date, -1, \"year\"),\r\n\t\t\t\t\tcurrEvent.end_date,\r\n\t\t\t\t\tcurrEvent.id,\r\n\t\t\t\t\ttrue\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t\tif(!nextEvent && !id){\r\n\t\t\t\tvar visibleDates = scheduler.getState();\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tscheduler.date.add(visibleDates.max_date, -1, \"year\"),\r\n\t\t\t\t\tvisibleDates.max_date,\r\n\t\t\t\t\tnull,\r\n\t\t\t\t\ttrue\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tif(nextEvent){\r\n\t\t\t\tvar nextEv = new scheduler.$keyboardNavigation.Event(nextEvent.id);\r\n\t\t\t\tif(!nextEv.isValid()){// not visible event\r\n\t\t\t\t\tthis.prevEventHandler(nextEvent.id);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(activeNode){activeNode.blur();}\r\n\t\t\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(nextEv);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\r\n\t\t\t\"alt+1, alt+2, alt+3, alt+4, alt+5, alt+6, alt+7, alt+8, alt+9\": function(e){\r\n\t\t\t\tvar tabs = scheduler.$keyboardNavigation.HeaderCell.prototype.getNodes(\".dhx_cal_navline .dhx_cal_tab\");\r\n\t\t\t\tvar key = e.key;\r\n\t\t\t\tif(key === undefined){\r\n\t\t\t\t\tkey = e.keyCode - 48;\r\n\t\t\t\t}\r\n\t\t\t\tif(tabs[key*1 - 1]){\r\n\t\t\t\t\ttabs[key*1 - 1].click();\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+left,meta+left\": function(e){\r\n\t\t\t\tscheduler._click.dhx_cal_prev_button();\r\n\t\t\t},\r\n\t\t\t\"ctrl+right,meta+right\": function(e){\r\n\t\t\t\tscheduler._click.dhx_cal_next_button();\r\n\t\t\t},\r\n\t\t\t\"ctrl+up,meta+up\":function(e){\r\n\t\t\t\tvar dataArea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tdataArea.scrollTop -= 20;\r\n\t\t\t},\r\n\t\t\t\"ctrl+down,meta+down\": function(e){\r\n\t\t\t\tvar dataArea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tdataArea.scrollTop += 20;\r\n\t\t\t},\r\n\r\n\r\n\t\t\t\"e\": function(){\r\n\t\t\t\tthis.nextEventHandler();\r\n\t\t\t},\r\n\r\n\t\t\t\"home\": function(){\r\n\t\t\t\tscheduler.setCurrentView(new Date());\r\n\t\t\t},\r\n\r\n\t\t\t\"shift+e\": function(){\r\n\t\t\t\tthis.prevEventHandler();\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+enter,meta+enter\": function(){\r\n\t\t\t\tscheduler.addEventNow({start_date: new Date(scheduler.getState().date)});\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+c,meta+c\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t},\r\n\t\t\t\"ctrl+v,meta+v\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t},\r\n\t\t\t\"ctrl+x,meta+x\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode.prototype.bindAll(scheduler.$keyboardNavigation.SchedulerNode.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.KeyNavNode = function(){};\r\n\r\nscheduler.$keyboardNavigation.KeyNavNode.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.EventHandler,\r\n\t{\r\n\t\tisValid: function(){\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\treturn null;\r\n\t\t},\r\n\r\n\t\tmoveTo: function (element) {\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(element);\r\n\t\t},\r\n\r\n\t\tcompareTo: function(b){\r\n\t\t\t// good enough comparison of two random objects\r\n\t\t\tif(!b) return false;\r\n\t\t\tfor(var i in this){\r\n\t\t\t\tif(!!this[i] != !!b[i]) return false;\r\n\r\n\t\t\t\tvar canStringifyThis = !!(this[i] && this[i].toString);\r\n\t\t\t\tvar canStringifyThat = !!(b[i] && b[i].toString);\r\n\t\t\t\tif(canStringifyThat != canStringifyThis) return false;\r\n\t\t\t\tif(!(canStringifyThat && canStringifyThis)) {\r\n\t\t\t\t\tif(b[i] != this[i]) return false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(b[i].toString() != this[i].toString())\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\r\n\t\tgetNode: function(){},\r\n\t\tfocus: function(){\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif(node){\r\n\t\t\t\tnode.setAttribute(\"tabindex\", \"-1\");\r\n\t\t\t\t//node.className += \" scheduler_focused\";\r\n\t\t\t\tif(node.focus) node.focus();\r\n\t\t\t}\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif(node){\r\n\t\t\t\tnode.setAttribute(\"tabindex\", \"-1\");\r\n\t\t\t\t//node.className = (node.className || \"\").replace(/ ?scheduler_focused/g, \"\");\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.HeaderCell = function(index){\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.HeaderCell.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\tgetNode: function(index){\r\n\t\t\tindex = index || this.index || 0;\r\n\t\t\tvar nodes = this.getNodes();\r\n\t\t\tif(nodes[index]) return nodes[index];\r\n\t\t},\r\n\r\n\t\tgetNodes: function(selector){\r\n\t\t\tselector = selector || [\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_prev_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_next_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_today_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_tab\"\r\n\t\t\t\t].join(\", \");\r\n\r\n\t\t\tvar nodes = Array.prototype.slice.call(scheduler.$container.querySelectorAll(selector));\r\n\t\t\tnodes.sort(function(a, b){\r\n\t\t\t\treturn a.offsetLeft - b.offsetLeft;\r\n\t\t\t});\r\n\t\t\treturn nodes;\r\n\t\t},\r\n\r\n\t\t_handlers:null,\r\n\r\n\t\tisValid: function(){\r\n\t\t\treturn !!this.getNode(this.index);\r\n\t\t},\r\n\t\tfallback:function(){\r\n\t\t\tvar defaultCell = this.getNode(0);\r\n\t\t\tif(!defaultCell){\r\n\t\t\t\tdefaultCell = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}\r\n\t\t\treturn defaultCell;\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tvar newIndex = this.index - 1;\r\n\t\t\t\tif(newIndex < 0){\r\n\t\t\t\t\tnewIndex = this.getNodes().length - 1;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.HeaderCell(newIndex));\r\n\r\n\t\t\t},\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tvar newIndex = this.index + 1;\r\n\t\t\t\tif(newIndex >= this.getNodes().length){\r\n\t\t\t\t\tnewIndex = 0;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.HeaderCell(newIndex));\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t},\r\n\r\n\t\t\t\"enter\": function(){\r\n\t\t\t\tvar node = this.getNode();\r\n\t\t\t\tif(node){\r\n\t\t\t\t\tnode.click();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.HeaderCell.prototype.bindAll(scheduler.$keyboardNavigation.HeaderCell.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.Event = function(id){\r\n\tthis.eventId = null;\r\n\tif(scheduler.getEvent(id)){\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tthis.start = new Date(ev.start_date);\r\n\t\tthis.end = new Date(ev.end_date);\r\n\r\n\t\tthis.section = this._getSection(ev);\r\n\t\tthis.eventId = id;\r\n\t}\r\n};\r\n\r\nscheduler.$keyboardNavigation.Event.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\t_getNodes: function(){\r\n\t\t\treturn Array.prototype.slice.call(scheduler.$container.querySelectorAll(\"[\"+scheduler.config.event_attribute+\"]\"));\r\n\t\t},\r\n\r\n\t\t_modes: scheduler.$keyboardNavigation.SchedulerNode.prototype._modes,\r\n\r\n\t\tgetMode: scheduler.$keyboardNavigation.SchedulerNode.prototype.getMode,\r\n\r\n\t\t_handlers: null,\r\n\t\tisValid: function(){\r\n\t\t\treturn !!(scheduler.getEvent(this.eventId) && this.getNode());\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\tvar eventNode = this._getNodes()[0];\r\n\t\t\tvar defaultElement = null;\r\n\t\t\tif(!eventNode || !(scheduler._locate_event(eventNode))){\r\n\t\t\t\tdefaultElement = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}else{\r\n\t\t\t\tvar id = scheduler._locate_event(eventNode);\r\n\t\t\t\tdefaultElement = new scheduler.$keyboardNavigation.Event(id);\r\n\t\t\t}\r\n\r\n\t\t\treturn defaultElement;\r\n\t\t},\r\n\r\n\t\tisScrolledIntoView: function (el) {\r\n\t\t\tvar eventBox = el.getBoundingClientRect();\r\n\t\t\tvar viewPort = scheduler.$container.querySelector(\".dhx_cal_data\").getBoundingClientRect();\r\n\t\t\t\r\n\t\t\tif(eventBox.bottom < viewPort.top || eventBox.top > viewPort.bottom){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\r\n\t\tgetNode: function(){\r\n\r\n\t\t\tvar idSelector = \"[\"+scheduler.config.event_attribute+\"='\"+this.eventId+\"']\";\r\n\r\n\t\t\tvar inlineEditor = scheduler.$keyboardNavigation.dispatcher.getInlineEditor(this.eventId);\r\n\t\t\tif(inlineEditor){// is inline editor visible\r\n\t\t\t\treturn inlineEditor;\r\n\t\t\t}else{\r\n\t\t\t\tif(scheduler.isMultisectionEvent && scheduler.isMultisectionEvent(scheduler.getEvent(this.eventId))){\r\n\t\t\t\t\tvar nodes = scheduler.$container.querySelectorAll(idSelector);\r\n\t\t\t\t\tfor(var i = 0; i < nodes.length; i++){\r\n\t\t\t\t\t\tif(this.isScrolledIntoView(nodes[i])){\r\n\t\t\t\t\t\t\treturn nodes[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn nodes[0];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn scheduler.$container.querySelector(idSelector);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tvar event = scheduler.getEvent(this.eventId);\r\n\r\n\t\t\tvar calendar = scheduler.getState();\r\n\t\t\tif(event.start_date.valueOf() > calendar.max_date.valueOf() || event.end_date.valueOf() <= calendar.min_date.valueOf()){\r\n\t\t\t\tscheduler.setCurrentView(event.start_date);\r\n\t\t\t}\r\n\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif (this.isScrolledIntoView(node)) {\r\n\t\t\t\tscheduler.$keyboardNavigation.dispatcher.keepScrollPosition((function(){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\t\t}).bind(this));\r\n\t\t\t} else {\r\n\t\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\t}\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\r\n\r\n\t\t_getSection: function(ev){\r\n\t\t\tvar section = null;\r\n\t\t\tvar mode = scheduler.getState().mode;\r\n\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\t\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\t\tsection = ev[timeline.y_property];\r\n\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\tvar unit = scheduler._props[mode];\r\n\t\t\t\tsection = ev[unit.map_to];\r\n\t\t\t}\r\n\t\t\treturn section;\r\n\t\t},\r\n\t\t_moveToSlot: function(dir){\r\n\t\t\tvar ev = scheduler.getEvent(this.eventId);\r\n\t\t\tif(ev){\r\n\t\t\t\tvar section =this._getSection(ev);\r\n\t\t\t\tvar slot = new scheduler.$keyboardNavigation.TimeSlot(ev.start_date, null, section);\r\n\t\t\t\tthis.moveTo(slot.nextSlot(slot, dir));\r\n\t\t\t}else{\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tthis._moveToSlot(\"left\");\r\n\t\t\t},\r\n\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tthis._moveToSlot(\"right\");\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\t\t\t\tif(this.getMode() == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.nextEventHandler();\r\n\t\t\t\t}else {\r\n\t\t\t\t\tthis._moveToSlot(\"down\");\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"space\": function(){\r\n\t\t\t\tvar node = this.getNode();\r\n\t\t\t\tif(node && node.click){\r\n\t\t\t\t\tnode.click();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"up\": function () {\r\n\t\t\t\tif(this.getMode() == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.prevEventHandler();\r\n\t\t\t\t}else {\r\n\t\t\t\t\tthis._moveToSlot(\"up\");\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"delete\": function(){\r\n\t\t\t\tif(scheduler.getEvent(this.eventId)) {\r\n\t\t\t\t\tscheduler._click.buttons[\"delete\"](this.eventId);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t// open lightbox\r\n\t\t\t\"enter\": function () {\r\n\t\t\t\tif(scheduler.getEvent(this.eventId)) {\r\n\t\t\t\t\tscheduler.showLightbox(this.eventId);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\nscheduler.$keyboardNavigation.Event.prototype.bindAll(scheduler.$keyboardNavigation.Event.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.TimeSlot = function(from, to, section, movingDate){\r\n\tvar state = scheduler.getState();\r\n\tvar timeline = scheduler.matrix && scheduler.matrix[state.mode];\r\n\r\n\tif(!from){\r\n\t\tfrom = this.getDefaultDate();\r\n\t}\r\n\r\n\tif(!to){\r\n\r\n\t\tif(timeline){\r\n\t\t\tto = scheduler.date.add(from, timeline.x_step, timeline.x_unit);\r\n\t\t}else{\r\n\t\t\tto = scheduler.date.add(from, scheduler.config.key_nav_step, \"minute\");\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tthis.section = section || this._getDefaultSection();\r\n\tthis.start_date = new Date(from);\r\n\tthis.end_date = new Date(to);\r\n\tthis.movingDate = movingDate || null;\r\n};\r\n\r\nscheduler.$keyboardNavigation.TimeSlot.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\t_handlers:null,\r\n\r\n\t\tgetDefaultDate: function(){\r\n\t\t\tvar from;\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar visibleTime = new Date(state.date);\r\n\t\t\tvisibleTime.setSeconds(0);\r\n\t\t\tvisibleTime.setMilliseconds(0);\r\n\r\n\t\t\tvar nowTime = new Date();\r\n\t\t\tnowTime.setSeconds(0);\r\n\t\t\tnowTime.setMilliseconds(0);\r\n\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[state.mode];\r\n\t\t\tvar showNowTime = false;\r\n\t\t\tif(visibleTime.valueOf() === nowTime.valueOf()){\r\n\t\t\t\tshowNowTime = true;\r\n\t\t\t}\r\n\r\n\t\t\tif(timeline){\r\n\t\t\t\tif(showNowTime){\r\n\t\t\t\t\tif(timeline.x_unit === \"day\"){\r\n\t\t\t\t\t\tnowTime.setHours(0);\r\n\t\t\t\t\t\tnowTime.setMinutes(0);\r\n\t\t\t\t\t}else if(timeline.x_unit === \"hour\"){\r\n\t\t\t\t\t\tnowTime.setMinutes(0);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfrom = nowTime;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfrom = scheduler.date[timeline.name + \"_start\"](new Date(state.date));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfrom = this.findVisibleColumn(from);\r\n\t\t\t}else{\r\n\t\t\t\tfrom = new Date(scheduler.getState().min_date);\r\n\t\t\t\tif(showNowTime){\r\n\t\t\t\t\tfrom = nowTime;\r\n\t\t\t\t}\r\n\t\t\t\tfrom = this.findVisibleColumn(from);\r\n\t\t\t\tif(!showNowTime){\r\n\t\t\t\t\tfrom.setHours(scheduler.config.first_hour);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(!scheduler._table_view){\r\n\t\t\t\t\tvar dataContainer = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\t\tif(dataContainer.scrollTop){\r\n\t\t\t\t\t\tfrom.setHours(scheduler.config.first_hour + Math.ceil(dataContainer.scrollTop / scheduler.config.hour_size_px));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn from;\r\n\t\t},\r\n\r\n\t\tclone: function(timeslot){\r\n\t\t\treturn new scheduler.$keyboardNavigation.TimeSlot(timeslot.start_date, timeslot.end_date, timeslot.section, timeslot.movingDate);\r\n\t\t},\r\n\t\t_getMultisectionView: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view;\r\n\t\t\tif(scheduler._props && scheduler._props[state.mode]) {\r\n\t\t\t\tview = scheduler._props[state.mode];\r\n\t\t\t}else if(scheduler.matrix && scheduler.matrix[state.mode]){\r\n\t\t\t\tview = scheduler.matrix[state.mode];\r\n\t\t\t}\r\n\t\t\treturn view;\r\n\t\t},\r\n\r\n\t\t_getDefaultSection: function(){\r\n\t\t\tvar section = null;\r\n\t\t\tvar view = this._getMultisectionView();\r\n\t\t\tif(view && !section){\r\n\t\t\t\tsection = this._getNextSection();\r\n\t\t\t}\r\n\t\t\treturn section;\r\n\t\t},\r\n\r\n\t\t_getNextSection: function(sectionId, dir){\r\n\t\t\tvar view = this._getMultisectionView();\r\n\t\t\tvar currentIndex = view.order[sectionId];\r\n\t\t\tvar nextIndex = currentIndex;\r\n\t\t\tif(currentIndex !== undefined){\r\n\t\t\t\tnextIndex = currentIndex + dir;\r\n\t\t\t}else{\r\n\t\t\t\tnextIndex = (view.size && view.position) ? view.position : 0;\r\n\t\t\t}\r\n\r\n\t\t\tif(nextIndex < 0){\r\n\t\t\t\tnextIndex = 0;\r\n\t\t\t}\r\n\t\t\tvar options = view.options || view.y_unit;\r\n\r\n\t\t\tif(nextIndex >= options.length){\r\n\t\t\t\tnextIndex = options.length - 1;\r\n\t\t\t}\r\n\t\t\t//nextIndex = nextIndex < 0 ? nextIndex = (view.options || view.y_unit).length -1 : nextIndex;\r\n\r\n\t\t\tif(options[nextIndex]){\r\n\t\t\t\treturn options[nextIndex].key;\r\n\t\t\t}else{\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar isInRange = !(this.start_date.valueOf() < state.min_date.valueOf() || this.start_date.valueOf() >= state.max_date.valueOf());\r\n\r\n\t\t\tif(!isInRange) return false;\r\n\r\n\r\n\t\t\tif(!this.isVisible(this.start_date, this.end_date)) return false;\r\n\r\n\t\t\tvar view = this._getMultisectionView();\r\n\r\n\t\t\tif(view){\r\n\t\t\t\treturn (view.order[this.section] !== undefined);\r\n\t\t\t}else{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t},\r\n\r\n\t\tfallback:function(){\r\n\r\n\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(!defaultSlot.isValid()){\r\n\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t}else{\r\n\t\t\t\treturn defaultSlot;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tgetNodes: function(){\r\n\t\t\treturn Array.prototype.slice.call(scheduler.$container.querySelectorAll(\".dhx_focus_slot\"));\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\treturn this.getNodes()[0];\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tif(this.section && scheduler.getView() && scheduler.getView().smart_rendering && scheduler.getView().scrollTo && !scheduler.$container.querySelector(`[data-section-id=\"${this.section}\"]`)){\r\n\t\t\t\tscheduler.getView().scrollTo({section: this.section});\r\n\t\t\t}\r\n\t\t\tscheduler.$keyboardNavigation.marker.render(this.start_date, this.end_date, this.section);\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\tscheduler.$keyboardNavigation._pasteDate = this.start_date;\r\n\t\t\tscheduler.$keyboardNavigation._pasteSection = this.section;\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t\tscheduler.$keyboardNavigation.marker.clear();\r\n\t\t},\r\n\r\n\t\t_modes: scheduler.$keyboardNavigation.SchedulerNode.prototype._modes,\r\n\r\n\t\t_getMode: scheduler.$keyboardNavigation.SchedulerNode.prototype.getMode,\r\n\r\n\t\taddMonthDate: function(date, dir, extend){\r\n\t\t\tvar res;\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tres = scheduler.date.add(date, -1, \"week\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tres = scheduler.date.add(date, 1, \"week\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tres = scheduler.date.day_start(scheduler.date.add(date, -1, \"day\"));\r\n\t\t\t\t\tres = this.findVisibleColumn(res, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tres = scheduler.date.day_start(scheduler.date.add(date, 1, \"day\"));\r\n\t\t\t\t\tres = this.findVisibleColumn(res, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tres = scheduler.date.day_start(new Date(date));\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tif(date.valueOf() < state.min_date.valueOf() || (!extend && date.valueOf() >= state.max_date.valueOf())){\r\n\t\t\t\tres = new Date(state.min_date);\r\n\t\t\t}\r\n\r\n\t\t\treturn res;\r\n\t\t},\r\n\r\n\t\tnextMonthSlot: function(slot, dir, extend){\r\n\r\n\t\t\tvar start, end;\r\n\t\t\tstart = this.addMonthDate(slot.start_date, dir, extend);\r\n\r\n\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\tend = new Date(start);\r\n\t\t\tend.setHours(scheduler.config.last_hour);\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\r\n\t\t_alignTimeSlot: function(date, minDate, unit, step){\r\n\t\t\tvar currentDate = new Date(minDate);\r\n\t\t\twhile(currentDate.valueOf() < date.valueOf()){\r\n\t\t\t\tcurrentDate = scheduler.date.add(currentDate, step, unit);\r\n\t\t\t}\r\n\r\n\t\t\tif(currentDate.valueOf() > date.valueOf()){\r\n\t\t\t\tcurrentDate = scheduler.date.add(currentDate, -step, unit);\r\n\t\t\t}\r\n\r\n\t\t\treturn currentDate;\r\n\t\t},\r\n\r\n\t\tnextTimelineSlot: function(slot, dir, extend){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view = scheduler.matrix[state.mode];\r\n\r\n\t\t\tvar startDate = this._alignTimeSlot(slot.start_date, scheduler.date[view.name + \"_start\"](new Date(slot.start_date)), view.x_unit, view.x_step);\r\n\t\t\tvar endDate = this._alignTimeSlot(slot.end_date, scheduler.date[view.name + \"_start\"](new Date(slot.end_date)), view.x_unit, view.x_step);\r\n\r\n\t\t\tif(endDate.valueOf() <= startDate.valueOf()){\r\n\t\t\t\tendDate = scheduler.date.add(startDate, view.x_step, view.x_unit);\r\n\t\t\t}\r\n\t\t\tvar newPos = this.clone(slot);\r\n\t\t\tnewPos.start_date = startDate;\r\n\t\t\tnewPos.end_date = endDate;\r\n\t\t\tnewPos.section = slot.section || this._getNextSection();\r\n\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tnewPos.section = this._getNextSection(slot.section, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tnewPos.section = this._getNextSection(slot.section, +1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tnewPos.start_date = this.findVisibleColumn(scheduler.date.add(newPos.start_date, -view.x_step, view.x_unit), -1);\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tnewPos.start_date = this.findVisibleColumn(scheduler.date.add(newPos.start_date, view.x_step, view.x_unit), 1);\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(newPos.start_date.valueOf() < state.min_date.valueOf() || newPos.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tif(extend && newPos.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\t\tnewPos.start_date = new Date(state.max_date);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tnewPos.start_date = scheduler.date[state.mode + \"_start\"](scheduler.date.add(state.date, dir == \"left\" ? -1 : 1, state.mode));\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn newPos;\r\n\t\t},\r\n\r\n\t\tnextUnitsSlot: function(slot, dir, extend){\r\n\t\t\tvar newPos = this.clone(slot);\r\n\t\t\tnewPos.section = slot.section || this._getNextSection();\r\n\r\n\t\t\tvar section = slot.section || this._getNextSection();\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view = scheduler._props[state.mode];\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tsection = this._getNextSection(slot.section, -1);\r\n\t\t\t\t\tvar optionsCount = view.size ? (view.size - 1) : view.options.length;\r\n\r\n\t\t\t\t\tif(view.days > 1 && (view.order[section] == optionsCount - 1)){\r\n\t\t\t\t\t\tif(scheduler.date.add(slot.start_date, -1, \"day\").valueOf() >= state.min_date.valueOf()){\r\n\t\t\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tsection = this._getNextSection(slot.section, 1);\r\n\t\t\t\t\tif(view.days > 1 && !view.order[section]){\r\n\t\t\t\t\t\tif(scheduler.date.add(slot.start_date, 1, \"day\").valueOf() < state.max_date.valueOf()){\r\n\t\t\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\tsection = slot.section;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tnewPos.section = section;\r\n\t\t\treturn newPos;\r\n\t\t},\r\n\r\n\t\t_moveDate: function(oldDate, dir){\r\n\t\t\tvar newDate = this.findVisibleColumn(scheduler.date.add(oldDate, dir, \"day\"), dir);\r\n\t\t\tnewDate.setHours(oldDate.getHours());\r\n\t\t\tnewDate.setMinutes(oldDate.getMinutes());\r\n\t\t\treturn newDate;\r\n\t\t},\r\n\r\n\t\tisBeforeLastHour: function(date, isStartDate){\r\n\t\t\tvar minutes = date.getMinutes(),\r\n\t\t\t\thours = date.getHours(),\r\n\t\t\t\tlast_hour = scheduler.config.last_hour;\r\n\t\t\treturn (hours < last_hour || (!isStartDate && ((last_hour == 24 || hours == last_hour) && !minutes)));\r\n\t\t},\r\n\t\tisAfterFirstHour: function(date, isStartDate){\r\n\t\t\tvar minutes = date.getMinutes(),\r\n\t\t\t\thours = date.getHours(),\r\n\t\t\t\tfirst_hour = scheduler.config.first_hour,\r\n\t\t\t\tlast_hour = scheduler.config.last_hour;\r\n\t\t\treturn (hours >= first_hour || (!isStartDate && (!minutes && ((!hours && last_hour == 24) || (hours == last_hour)))));\r\n\t\t},\r\n\t\tisInVisibleDayTime: function(date, isStartDate){\r\n\t\t\treturn (this.isBeforeLastHour(date, isStartDate) && this.isAfterFirstHour(date, isStartDate));\r\n\t\t},\r\n\r\n\t\tnextDaySlot: function(slot, dir, extend){\r\n\t\t\tvar start, end;\r\n\r\n\t\t\tvar key_nav_step = scheduler.config.key_nav_step;\r\n\r\n\t\t\tvar date = this._alignTimeSlot(slot.start_date, scheduler.date.day_start(new Date(slot.start_date)), \"minute\", key_nav_step);\r\n\r\n\r\n\t\t\tvar oldStart = slot.start_date;\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tstart = scheduler.date.add(date, -key_nav_step, \"minute\");\r\n\r\n\t\t\t\t\tif(!this.isInVisibleDayTime(start, true)){\r\n\t\t\t\t\t\tif (!extend || this.isInVisibleDayTime(oldStart, true)) {\r\n\r\n\t\t\t\t\t\t\tvar toNextDay = true;\r\n\t\t\t\t\t\t\tif(extend && scheduler.date.date_part(new Date(start)).valueOf() != scheduler.date.date_part(new Date(oldStart)).valueOf())\r\n\t\t\t\t\t\t\t\ttoNextDay = false;\r\n\t\t\t\t\t\t\tif(toNextDay)\r\n\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, -1, \"day\"), -1);\r\n\r\n\t\t\t\t\t\t\tstart.setHours(scheduler.config.last_hour);\r\n\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\tstart = scheduler.date.add(start, -key_nav_step, \"minute\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tstart = scheduler.date.add(date, key_nav_step, \"minute\");\r\n\r\n\t\t\t\t\tvar testEnd = extend ? start : scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tif(!this.isInVisibleDayTime(testEnd, false)){\r\n\t\t\t\t\t\tif(!extend || this.isInVisibleDayTime(oldStart, false)) {\r\n\t\t\t\t\t\t\tif (!extend) {\r\n\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, 1, \"day\"), 1);\r\n\t\t\t\t\t\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tvar toNextDay = true;\r\n\t\t\t\t\t\t\t\tif (scheduler.date.date_part(new Date(oldStart)).valueOf() == oldStart.valueOf()) {\r\n\t\t\t\t\t\t\t\t\ttoNextDay = false;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (toNextDay) {\r\n\t\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, 1, \"day\"), 1);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\t\tstart = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tstart = this._moveDate(slot.start_date, -1);\r\n\t\t\t\t\tend = this._moveDate(slot.end_date, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tstart = this._moveDate(slot.start_date, 1);\r\n\t\t\t\t\tend = this._moveDate(slot.end_date, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tstart = date;\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\t\tnextWeekAgendaSlot: function(slot, dir){\r\n\t\t\tvar start, end;\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tstart = scheduler.date.day_start(scheduler.date.add(slot.start_date, -1, \"day\"));\r\n\t\t\t\t\tstart = this.findVisibleColumn(start, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tstart = scheduler.date.day_start(scheduler.date.add(slot.start_date, 1, \"day\"));\r\n\t\t\t\t\tstart = this.findVisibleColumn(start, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tstart = scheduler.date.day_start(slot.start_date);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif(slot.start_date.valueOf() < state.min_date.valueOf() || slot.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tstart = new Date(state.min_date);\r\n\r\n\t\t\t}\r\n\t\t\tend = new Date(start);\r\n\t\t\tend.setHours(scheduler.config.last_hour);\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\t\tnextAgendaSlot: function(slot, dir){\r\n\t\t\treturn {start_date: slot.start_date, end_date: slot.end_date};\r\n\t\t},\r\n\r\n\r\n\t\tisDateVisible: function(date){\r\n\t\t\tif(!scheduler._ignores_detected)\r\n\t\t\t\treturn true;\r\n\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[scheduler.getState().mode];\r\n\r\n\t\t\tvar index;\r\n\t\t\tif(timeline){\r\n\t\t\t\tindex = scheduler._get_date_index(timeline, date);\r\n\t\t\t}else{\r\n\t\t\t\tindex = scheduler.locate_holder_day(date);\r\n\t\t\t}\r\n\r\n\t\t\treturn !scheduler._ignores[index];\r\n\t\t},\r\n\r\n\t\tfindVisibleColumn: function(start, dir){\r\n\t\t\tvar date = start;\r\n\t\t\tdir = dir || 1;\r\n\t\t\tvar range = scheduler.getState();\r\n\r\n\t\t\twhile(!this.isDateVisible(date) && ((dir > 0 && date.valueOf() <= range.max_date.valueOf()) || (dir < 0 && date.valueOf() >= range.min_date.valueOf()))){\r\n\t\t\t\tdate = this.nextDateColumn(date, dir);\r\n\t\t\t}\r\n\r\n\t\t\treturn date;\r\n\t\t},\r\n\r\n\t\tnextDateColumn: function(start, dir){\r\n\t\t\tdir = dir || 1;\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[scheduler.getState().mode];\r\n\r\n\t\t\tvar date;\r\n\t\t\tif(timeline){\r\n\t\t\t\tdate = scheduler.date.add(start, dir * timeline.x_step, timeline.x_unit);\r\n\t\t\t}else{\r\n\t\t\t\tdate = scheduler.date.day_start(scheduler.date.add(start, dir, \"day\"));\r\n\t\t\t}\r\n\r\n\t\t\treturn date;\r\n\t\t},\r\n\r\n\t\tisVisible:function(from, to){\r\n\t\t\tif(!scheduler._ignores_detected)\r\n\t\t\t\treturn true;\r\n\r\n\t\t\tvar current = new Date(from);\r\n\r\n\t\t\twhile(current.valueOf() < to.valueOf()){\r\n\t\t\t\tif(this.isDateVisible(current)) return true;\r\n\t\t\t\tcurrent = this.nextDateColumn(current);\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t},\r\n\r\n\t\tnextSlot: function(slot, dir, view, extend){\r\n\t\t\tvar next;\r\n\t\t\tview = view || this._getMode();\r\n\r\n\t\t\tvar tempSlot = scheduler.$keyboardNavigation.TimeSlot.prototype.clone(slot);\r\n\r\n\t\t\tswitch (view){\r\n\t\t\t\tcase this._modes.units:\r\n\t\t\t\t\tnext = this.nextUnitsSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.timeline:\r\n\t\t\t\t\tnext = this.nextTimelineSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.year:\r\n\t\t\t\t\tnext = this.nextMonthSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.month:\r\n\t\t\t\t\tnext = this.nextMonthSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.weekAgenda:\r\n\t\t\t\t\tnext = this.nextWeekAgendaSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.list:\r\n\t\t\t\t\tnext = this.nextAgendaSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.dayColumns:\r\n\t\t\t\t\tnext = this.nextDaySlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(next.start_date.valueOf() >= next.end_date.valueOf()){\r\n\t\t\t\tnext = this.nextSlot(next, dir, view);\r\n\t\t\t}\r\n\r\n\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(next);\r\n\r\n\t\t},\r\n\r\n\t\textendSlot: function(slot, dir){\r\n\t\t\tvar view = this._getMode();\r\n\t\t\tvar next;\r\n\t\t\tswitch (view){\r\n\t\t\t\tcase this._modes.units:\r\n\t\t\t\t\tif(dir == \"left\" || dir == \"right\"){\r\n\t\t\t\t\t\tnext = this.nextUnitsSlot(slot, dir);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnext = this.extendUnitsSlot(slot, dir);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.timeline:\r\n\t\t\t\t\tif(dir == \"down\" || dir == \"up\"){\r\n\t\t\t\t\t\tnext = this.nextTimelineSlot(slot, dir);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnext = this.extendTimelineSlot(slot, dir);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.year:\r\n\t\t\t\t\tnext = this.extendMonthSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.month:\r\n\t\t\t\t\tnext = this.extendMonthSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.dayColumns:\r\n\t\t\t\t\tnext = this.extendDaySlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.weekAgenda:\r\n\t\t\t\t\tnext = this.extendWeekAgendaSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnext = slot;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tvar range = scheduler.getState();\r\n\t\t\tif(next.start_date.valueOf() < range.min_date.valueOf()){\r\n\t\t\t\tnext.start_date = this.findVisibleColumn(range.min_date);\r\n\t\t\t\tnext.start_date.setHours(scheduler.config.first_hour);\r\n\t\t\t}\r\n\r\n\t\t\tif(next.end_date.valueOf() > range.max_date.valueOf()){\r\n\t\t\t//\tnext.end_date = new Date(slot.end_date);\r\n\t\t\t\tnext.end_date = this.findVisibleColumn(range.max_date, -1);\r\n\t\t\t}\r\n\r\n\r\n\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(next);\r\n\t\t},\r\n\r\n\t\textendTimelineSlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"timeline\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\textendWeekAgendaSlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"weekAgenda\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\textendGenericSlot: function(allowedDirections, slot, direction, type){\r\n\t\t\tvar next;\r\n\t\t\tvar moveDate = slot.movingDate;\r\n\r\n\t\t\tif(!moveDate){\r\n\t\t\t\tmoveDate = allowedDirections[direction];\r\n\t\t\t}\r\n\r\n\t\t\tif(!moveDate || !allowedDirections[direction]){\r\n\t\t\t\treturn slot;\r\n\t\t\t}\r\n\r\n\t\t\tif(direction){\r\n\t\t\t\tnext = this.nextSlot({start_date: slot[moveDate], section: slot.section}, direction, type, true);\r\n\r\n\t\t\t\tif(next.start_date.valueOf() == slot.start_date.valueOf()){\r\n\t\t\t\t\tnext = this.nextSlot({start_date: next.start_date, section:next.section}, direction, type, true);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tnext.movingDate = moveDate;\r\n\t\t\t}else{\r\n\t\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(slot);\r\n\t\t\t}\r\n\r\n\t\t\tvar newDates = this.extendSlotDates(slot, next, next.movingDate);\r\n\r\n\t\t\tif(newDates.end_date.valueOf() <= newDates.start_date.valueOf()){\r\n\t\t\t\tnext.movingDate = next.movingDate == \"end_date\" ? \"start_date\" : \"end_date\";\r\n\t\t\t}\r\n\t\t\tnewDates = this.extendSlotDates(slot, next, next.movingDate);\r\n\r\n\t\t\tnext.start_date = newDates.start_date;\r\n\t\t\tnext.end_date = newDates.end_date;\r\n\t\t\treturn next;\r\n\t\t},\r\n\r\n\t\textendSlotDates: function(oldSlot, newSlot, dateDirection){\r\n\t\t\tvar res = {start_date:null, end_date:null};\r\n\r\n\t\t\tif(dateDirection == \"start_date\"){\r\n\t\t\t\tres.start_date = newSlot.start_date;\r\n\t\t\t\tres.end_date = oldSlot.end_date;\r\n\t\t\t}else{\r\n\t\t\t\tres.start_date = oldSlot.start_date;\r\n\t\t\t\tres.end_date = newSlot.start_date;\r\n\t\t\t}\r\n\t\t\treturn res;\r\n\r\n\t\t},\r\n\r\n\t\textendMonthSlot: function(slot, direction){\r\n\t\t\tvar slot = this.extendGenericSlot({\r\n\t\t\t\t\t\"up\":\"start_date\",\r\n\t\t\t\t\t\"down\":\"end_date\",\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"month\"\r\n\t\t\t);\r\n\r\n\t\t\tslot.start_date.setHours(scheduler.config.first_hour);\r\n\t\t\tslot.end_date = scheduler.date.add(slot.end_date, -1, \"day\");\r\n\t\t\tslot.end_date.setHours(scheduler.config.last_hour);\r\n\t\t\treturn slot;\r\n\t\t},\r\n\r\n\t\textendUnitsSlot: function(slot, direction){\r\n\t\t\tvar next;\r\n\r\n\t\t\tswitch (direction){\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tnext = this.extendDaySlot(slot, direction);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnext = slot;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tnext.section = slot.section;\r\n\t\t\treturn next;\r\n\t\t},\r\n\t\textendDaySlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\t\"up\":\"start_date\",\r\n\t\t\t\t\t\"down\":\"end_date\",\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"dayColumns\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\tscrollSlot: function(dir){\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tvar slot = this.nextSlot(this, dir);\r\n\t\t\tif(slot.start_date.valueOf() < state.min_date.valueOf() || slot.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tscheduler.setCurrentView(new Date(slot.start_date));\r\n\t\t\t}\r\n\r\n\t\t\tthis.moveTo(slot);\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tthis.scrollSlot(\"left\");\r\n\t\t\t},\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tthis.scrollSlot(\"right\");\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\r\n\t\t\t\tvar mode = this._getMode();\r\n\t\t\t\tif(mode == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.nextEventHandler();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.scrollSlot(\"down\");\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"up\": function () {\r\n\t\t\t\tvar mode = this._getMode();\r\n\t\t\t\tif(mode == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.prevEventHandler();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.scrollSlot(\"up\");\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"shift+down\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"down\"));\r\n\t\t\t},\r\n\t\t\t\"shift+up\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"up\"));\r\n\t\t\t},\r\n\t\t\t\"shift+right\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"right\"));\r\n\t\t\t},\r\n\t\t\t\"shift+left\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"left\"));\r\n\t\t\t},\r\n\r\n\r\n\t\t\t\"enter\": function(){\r\n\t\t\t\tvar obj = {start_date: new Date(this.start_date), end_date: new Date(this.end_date)};\r\n\r\n\t\t\t\tvar mode = scheduler.getState().mode;\r\n\t\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\r\n\t\t\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\t\t\tobj[timeline.y_property] = this.section;\r\n\t\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\t\tvar unit = scheduler._props[mode];\r\n\t\t\t\t\tobj[unit.map_to] = this.section;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler.addEventNow(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.TimeSlot.prototype.bindAll(scheduler.$keyboardNavigation.TimeSlot.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.MinicalButton = function(div, index){\r\n\tthis.container = div;\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.MinicalButton.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar container = this.container;\r\n\t\t\treturn !!container.offsetWidth;// valid if container is visible\r\n\t\t},\r\n\r\n\t\tfallback: function(){\r\n\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(defaultSlot.isValid()){\r\n\t\t\t\treturn defaultSlot;\r\n\t\t\t}else{\r\n\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t}\r\n\t\t},\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.globalNode.disable();\r\n\t\t\tthis.container.removeAttribute(\"tabindex\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tthis.container.setAttribute(\"tabindex\", \"0\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\tif(!this.index){\r\n\t\t\t\treturn this.container.querySelector(\".dhx_cal_prev_button\");\r\n\t\t\t}else{\r\n\t\t\t\treturn this.container.querySelector(\".dhx_cal_next_button\");\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"right\": function(e){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, this.index ? 0 : 1));\r\n\t\t\t},\r\n\t\t\t\"left\": function(e){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, this.index ? 0 : 1));\r\n\t\t\t},\r\n\t\t\t\"down\": function(){\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, 0, 0);\r\n\t\t\t\tif(next && !next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"enter\": function(e){\r\n\t\t\t\tthis.getNode().click();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.MinicalButton.prototype.bindAll(scheduler.$keyboardNavigation.MinicalButton.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.MinicalCell = function(div, row, col){\r\n\tthis.container = div;\r\n\tthis.row = row || 0;\r\n\tthis.col = col || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.MinicalCell.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar grid = this._getGrid();\r\n\t\t\treturn !!(grid[this.row] && grid[this.row][this.col]);\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\tvar row = this.row;\r\n\t\t\tvar col = this.col;\r\n\t\t\tvar grid = this._getGrid();\r\n\t\t\tif(!grid[row]){\r\n\t\t\t\trow = 0;\r\n\t\t\t}\r\n\t\t\tvar dir = true;\r\n\t\t\tif(row > grid.length / 2){\r\n\t\t\t\tdir = false;\r\n\t\t\t}\r\n\r\n\t\t\tif(!grid[row]){\r\n\t\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t\tif(defaultSlot.isValid()){\r\n\t\t\t\t\treturn defaultSlot;\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(dir){\r\n\t\t\t\tfor(var c = col; grid[row] && c < grid[row].length; c++){\r\n\t\t\t\t\tif(!grid[row][c] && c == grid[row].length - 1){\r\n\t\t\t\t\t\trow++;\r\n\t\t\t\t\t\tcol = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(grid[row][c]){\r\n\t\t\t\t\t\treturn new scheduler.$keyboardNavigation.MinicalCell(this.container, row, c);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tfor(var c = col; grid[row] && c < grid[row].length; c--){\r\n\t\t\t\t\tif(!grid[row][c] && !c){\r\n\t\t\t\t\t\trow--;\r\n\t\t\t\t\t\tcol = grid[row].length - 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(grid[row][c]){\r\n\t\t\t\t\t\treturn new scheduler.$keyboardNavigation.MinicalCell(this.container, row, c);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn new scheduler.$keyboardNavigation.MinicalButton(this.container, 0);\r\n\t\t},\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.globalNode.disable();\r\n\r\n\t\t\tthis.container.removeAttribute(\"tabindex\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tthis.container.setAttribute(\"tabindex\", \"0\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\t\t_getNode: function(row, col){\r\n\t\t\treturn this.container.querySelector(\".dhx_year_body tr:nth-child(\"+(row + 1) + \") td:nth-child(\"+(col + 1)+\")\");\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\treturn this._getNode(this.row, this.col);\r\n\t\t},\r\n\r\n\t\t_getGrid: function(){\r\n\t\t\tvar rows = this.container.querySelectorAll(\".dhx_year_body tr\");\r\n\t\t\tvar grid = [];\r\n\t\t\tfor(var i = 0; i < rows.length; i++){\r\n\t\t\t\tgrid[i] = [];\r\n\t\t\t\tvar row = rows[i];\r\n\t\t\t\tvar cells = row.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var c = 0; c < cells.length; c++){\r\n\t\t\t\t\tvar cell = cells[c];\r\n\t\t\t\t\tvar enabled = true;\r\n\t\t\t\t\tvar css = scheduler._getClassName(cell);\r\n\t\t\t\t\tif(css.indexOf(\"dhx_after\") > -1 || css.indexOf(\"dhx_before\") > -1 || css.indexOf(\"dhx_scale_ignore\") > -1){\r\n\t\t\t\t\t\tenabled = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tgrid[i][c] = enabled;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn grid;\r\n\t\t},\r\n\r\n\r\n\t\tkeys: {\r\n\t\t\t\"right\": function(e){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row;\r\n\t\t\t\tvar newCol = this.col + 1;\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tif(grid[newRow + 1]){\r\n\t\t\t\t\t\tnewRow = newRow + 1;\r\n\t\t\t\t\t\tnewCol = 0;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnewCol = this.col;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"left\": function(e){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row;\r\n\t\t\t\tvar newCol = this.col - 1;\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tif(grid[newRow - 1]){\r\n\t\t\t\t\t\tnewRow = newRow - 1;\r\n\t\t\t\t\t\tnewCol = grid[newRow].length - 1;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnewCol = this.col;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"down\": function(){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row + 1;\r\n\t\t\t\tvar newCol = this.col;\r\n\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tnewRow = this.row;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"up\": function(){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row - 1;\r\n\t\t\t\tvar newCol = this.col;\r\n\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tvar index = 0;\r\n\t\t\t\t\tif(this.col > grid[this.row].length / 2){\r\n\t\t\t\t\t\tindex = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, index));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.moveTo(next);\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\t\t\t\"enter\": function(e){\r\n\t\t\t\tthis.getNode().querySelector(\".dhx_month_head\").click();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.MinicalCell.prototype.bindAll(scheduler.$keyboardNavigation.MinicalCell.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.DataArea = function(index){\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.DataArea.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\tgetNode: function(index){\r\n\t\t\treturn scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t},\r\n\r\n\t\t_handlers:null,\r\n\r\n\t\tisValid: function(){\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tfallback:function(){\r\n\t\t\treturn this;\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"up,down,right,left\":function(){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.DataArea.prototype.bindAll(scheduler.$keyboardNavigation.DataArea.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\n\r\n\r\n(function(){\r\n\tvar modalsStack = [];\r\n\r\n\tfunction isModal(){\r\n\t\treturn !!(modalsStack.length);\r\n\t}\r\n\r\n\tfunction isChildOf(child, parent){\r\n\t\twhile(child && child != parent){\r\n\t\t\tchild = child.parentNode;\r\n\t\t}\r\n\r\n\t\treturn !!(child == parent);\r\n\t}\r\n\r\n\tfunction afterPopup(box){\r\n\t\tsetTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tif(!isModal() && !(isChildOf(document.activeElement, scheduler.$container))) {\r\n\t\t\t\tscheduler.focus();\r\n\t\t\t}\r\n\t\t}, 1);\r\n\t}\r\n\tfunction startModal(box){\r\n\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\tscheduler.event(box, \"keydown\", trapFocus);\r\n\t\tmodalsStack.push(box);\r\n\t\t//scheduler.$keyboardNavigation.dispatcher.disable();\r\n\t}\r\n\r\n\tfunction endModal(){\r\n\t\tvar box = modalsStack.pop();\r\n\t\tif(box) {\r\n\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t}\r\n\t\tafterPopup(box);\r\n\r\n\t}\r\n\r\n\tfunction isTopModal(box){\r\n\t//\tif(dhtmlx._modalsStack.length){\r\n\t//\t\treturn box == dhtmlx._modalsStack[dhtmlx._modalsStack.length - 1];\r\n\t//\t}else{\r\n\t\t\treturn box == modalsStack[modalsStack.length - 1];\r\n\t//\t}\r\n\r\n\t}\r\n\r\n\tfunction trapFocus(event){\r\n\t\tvar event = event || window.event;\r\n\t\tvar target = event.currentTarget;\r\n\t\tif(!isTopModal(target)) return;\r\n\r\n\t\tscheduler.$keyboardNavigation.trapFocus(target, event);\r\n\t}\r\n\r\n\tfunction traceLightbox(){\r\n\t\tstartModal(scheduler.getLightbox());\r\n\t}\r\n\r\n\tscheduler.attachEvent(\"onLightbox\", traceLightbox);\r\n\tscheduler.attachEvent(\"onAfterLightbox\", endModal);\r\n\r\n\tscheduler.attachEvent(\"onAfterQuickInfo\", function(){afterPopup();});\r\n\r\n\tif(!scheduler._keyNavMessagePopup) {\r\n\t\tscheduler._keyNavMessagePopup = true;\r\n\r\n\t\tvar focusElement = null;\r\n\t\tvar backupFocus = null;\r\n\t\tconst modalsStack = [];\r\n\t\tscheduler.attachEvent(\"onMessagePopup\", function(box){\r\n\t\t\tfocusElement = document.activeElement;\r\n\t\t\tbackupFocus = focusElement;\r\n\r\n\t\t\twhile(backupFocus && scheduler._getClassName(backupFocus).indexOf(\"dhx_cal_data\") < 0){\r\n\t\t\t\tbackupFocus = backupFocus.parentNode;\r\n\t\t\t}\r\n\t\t\tif(backupFocus){\r\n\t\t\t\tbackupFocus = backupFocus.parentNode;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t\tscheduler.event(box, \"keydown\", trapFocus);\r\n\t\t\tmodalsStack.push(box);\r\n\t\t});\r\n\r\n\r\n\t\tscheduler.attachEvent(\"onAfterMessagePopup\", function () {\r\n\t\t\tvar box = modalsStack.pop();\r\n\t\t\tif(box) {\r\n\t\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t\t}\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\tvar currentTarget = document.activeElement;\r\n\t\t\t\twhile(currentTarget && scheduler._getClassName(currentTarget).indexOf(\"dhx_cal_light\") < 0){\r\n\t\t\t\t\tcurrentTarget = currentTarget.parentNode;\r\n\t\t\t\t}\r\n\t\t\t\tif(currentTarget)\r\n\t\t\t\t\treturn;\r\n\r\n\r\n\t\t\t\tif(focusElement && focusElement.parentNode){\r\n\t\t\t\t\tfocusElement.focus();\r\n\r\n\t\t\t\t}else if(backupFocus && backupFocus.parentNode){\r\n\t\t\t\t\tbackupFocus.focus();\r\n\t\t\t\t}\r\n\t\t\t\tfocusElement = null;\r\n\t\t\t\tbackupFocus = null;\r\n\r\n\t\t\t}, 1);\r\n\t\t});\r\n\t}\r\n\r\n\tscheduler.$keyboardNavigation.isModal = isModal;\r\n\r\n\r\n})();\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.dispatcher = {\r\n\tisActive: false,\r\n\tactiveNode: null,\r\n\tglobalNode: new scheduler.$keyboardNavigation.SchedulerNode(),\r\n\r\n\tkeepScrollPosition: function (callback) {\r\n\t\tvar top, left;\r\n\r\n\t\tvar scrollable = scheduler.$container.querySelector(\".dhx_timeline_scrollable_data\");\r\n\t\tif(!scrollable){\r\n\t\t\tscrollable = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t}\r\n\r\n\t\tif(scrollable){\r\n\t\t\ttop = scrollable.scrollTop;\r\n\t\t\tleft = scrollable.scrollLeft;\r\n\t\t}\r\n\r\n\t\tcallback();\r\n\r\n\t\tif(scrollable){\r\n\t\t\tscrollable.scrollTop = top;\r\n\t\t\tscrollable.scrollLeft = left;\r\n\t\t}\r\n\t},\r\n\tenable: function(){\r\n\t\tif(!scheduler.$container){\r\n\t\t\t// do nothing if not initialized\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.isActive = true;\r\n\t\tvar self = this;\r\n\t\tthis.keepScrollPosition(function () {\r\n\t\t\tself.globalNode.enable();\r\n\t\t\tself.setActiveNode(self.getActiveNode());\r\n\t\t});\r\n\t},\r\n\r\n\tdisable: function(){\r\n\t\tthis.isActive = false;\r\n\t\tthis.globalNode.disable();\r\n\t},\r\n\r\n\tisEnabled: function(){\r\n\t\treturn !!this.isActive;\r\n\t},\r\n\r\n\tgetDefaultNode: function(){\r\n\t\treturn this.globalNode.getDefaultNode();\r\n\t},\r\n\r\n\tsetDefaultNode: function() {\r\n\t\tthis.setActiveNode(this.getDefaultNode());\r\n\t},\r\n\r\n\tgetActiveNode: function(){\r\n\t\tvar node = this.activeNode;\r\n\t\tif(node && !node.isValid()){\r\n\t\t\tnode = node.fallback();\r\n\t\t}\r\n\t\treturn node;\r\n\t},\r\n\r\n\tfocusGlobalNode: function(){\r\n\t\tthis.blurNode(this.globalNode);\r\n\t\tthis.focusNode(this.globalNode);\r\n\t},\r\n\r\n\tsetActiveNode: function(el){\r\n\t\tif(!el || !el.isValid())\r\n\t\t\treturn;\r\n\r\n\t\tif(this.activeNode){\r\n\t\t\tif(this.activeNode.compareTo(el)){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(this.isEnabled()){\r\n\t\t\tthis.blurNode(this.activeNode);\r\n\t\t\tthis.activeNode = el;\r\n\t\t\tthis.focusNode(this.activeNode);\r\n\t\t}\r\n\t},\r\n\r\n\tfocusNode: function(el){\r\n\t\tif(el && el.focus){\r\n\t\t\tel.focus();\r\n\t\t\tif(el.getNode && document.activeElement != el.getNode()){\r\n\t\t\t\tthis.setActiveNode(new scheduler.$keyboardNavigation.DataArea());\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tblurNode: function(el){\r\n\t\tif(el && el.blur){\r\n\t\t\tel.blur();\r\n\t\t}\r\n\t},\r\n\r\n\tgetInlineEditor: function(id){\r\n\t\tvar editor = scheduler.$container.querySelector(\".dhx_cal_editor[\"+scheduler.config.event_attribute+\"='\"+id+\"'] textarea\");\r\n\t\tif(editor && editor.offsetWidth){\r\n\t\t\t// if exists and visible\r\n\t\t\treturn editor;\r\n\t\t}\r\n\t\treturn null;\r\n\t},\r\n\r\n\tkeyDownHandler: function (e) {\r\n\r\n\t\tif(e.defaultPrevented){\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar activeElement = this.getActiveNode();\r\n\r\n\t\tif(scheduler.$keyboardNavigation.isModal() &&\r\n\t\t\t!(activeElement && activeElement.container && scheduler.utils.dom.locateCss({target:activeElement.container}, \"dhx_minical_popup\", false)))\r\n\t\t\treturn;\r\n\r\n\t\tif(scheduler.getState().editor_id && this.getInlineEditor(scheduler.getState().editor_id))\r\n\t\t\treturn;\r\n\r\n\t\tif (!this.isEnabled())\r\n\t\t\treturn;\r\n\r\n\t\te = e || window.event;\r\n\r\n\t\tvar schedulerNode = this.globalNode;\r\n\r\n\t\tvar command = scheduler.$keyboardNavigation.shortcuts.getCommandFromEvent(e);\r\n\r\n\t\tif(!activeElement){\r\n\t\t\tthis.setDefaultNode();\r\n\t\t}else if(activeElement.findHandler(command)){\r\n\t\t\tactiveElement.doAction(command, e);\r\n\t\t}else if(schedulerNode.findHandler(command)){\r\n\t\t\tschedulerNode.doAction(command, e);\r\n\t\t}\r\n\r\n\t},\r\n\r\n\t_timeout: null,\r\n\tdelay: function(callback, delay){\r\n\r\n\t\tclearTimeout(this._timeout);\r\n\t\tthis._timeout = setTimeout(callback, delay || 1);\r\n\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n//Initial idea and implementation by Steve MC\r\nscheduler._temp_key_scope = function (){\r\n\r\n\tscheduler.config.key_nav = true;\r\n\r\n\tscheduler.$keyboardNavigation._pasteDate = null; // used for copy and paste operations\r\n\tscheduler.$keyboardNavigation._pasteSection = null; // used for copy and paste operations\r\n\tvar isCopy = null;\r\n\r\n\tvar pos = {};\r\n\r\n\tif(!document.body){\r\n\t\tscheduler.event(window, \"load\", function(){\r\n\t\t\tscheduler.event(document.body, \"mousemove\", trackMousePosition);\r\n\t\t});\r\n\t}else{\r\n\t\tscheduler.event(document.body, \"mousemove\", trackMousePosition);\r\n\t}\r\n\r\n\tfunction trackMousePosition(event){\r\n\t\tevent = event || window.event;\r\n\t\tpos.x = event.clientX;\r\n\t\tpos.y = event.clientY;\r\n\t}\r\n\tfunction currentTarget(){\r\n\r\n\t\tvar mousePointer = false;\r\n\t\tvar keyNavPointer = false;\r\n\r\n\t\tvar target = document.elementFromPoint(pos.x, pos.y);\r\n\t\twhile(target && target != scheduler._obj){\r\n\t\t\ttarget = target.parentNode;\r\n\t\t}\r\n\t\tmousePointer = !!(target == scheduler._obj);\r\n\r\n\t\tkeyNavPointer = scheduler.$keyboardNavigation.dispatcher.isEnabled();\r\n\r\n\t\treturn mousePointer || keyNavPointer;\r\n\t}\r\n\r\n\tscheduler.attachEvent(\"onMouseMove\", function(id,e){\r\n\t\tvar state = scheduler.getState();\r\n\r\n\t\t// make sure scheduler is fully initialized before calling scheduler.getActionData\r\n\t\tif(!(state.mode && state.min_date)){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tvar position = scheduler.getActionData(e);\r\n\t\tscheduler.$keyboardNavigation._pasteDate = position.date;\r\n\t\tscheduler.$keyboardNavigation._pasteSection = position.section;\r\n\t});\r\n\r\n\tfunction clear_event_after(ev){\r\n\t\tdelete ev.rec_type; delete ev.rec_pattern;\r\n\t\tdelete ev.event_pid; delete ev.event_length;\r\n\t}\r\n\r\n\tfunction copyEvent(ev){\r\n\t\treturn scheduler._lame_copy({}, ev);\r\n\t}\r\n\r\n\tscheduler._make_pasted_event = function(ev){\r\n\t\tvar date = scheduler.$keyboardNavigation._pasteDate;\r\n\t\tvar section = scheduler.$keyboardNavigation._pasteSection;\r\n\r\n\t\tvar event_duration = ev.end_date-ev.start_date;\r\n\r\n\t\tvar copy = copyEvent(ev);\r\n\t\tclear_event_after(copy);\r\n\t\tcopy.start_date = new Date(date);\r\n\t\tcopy.end_date = new Date(copy.start_date.valueOf() + event_duration);\r\n\r\n\t\tif(section){\r\n\t\t\tvar property = scheduler._get_section_property();\r\n\r\n\t\t\tif(scheduler.config.multisection)\r\n\t\t\t\tcopy[property] = ev[property]; // save initial set of resources for multisection view\r\n\t\t\telse\r\n\t\t\t\tcopy[property] = section;\r\n\t\t}\r\n\t\treturn copy;\r\n\t};\r\n\tscheduler._do_paste = function(is_copy, modified_ev, original_ev){\r\n\t\tif(scheduler.callEvent(\"onBeforeEventPasted\", [is_copy, modified_ev, original_ev]) === false){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tscheduler.addEvent(modified_ev);\r\n\t\tscheduler.callEvent(\"onEventPasted\", [is_copy, modified_ev, original_ev]);\r\n\t};\r\n\r\n\tscheduler._is_key_nav_active = function(){\r\n\t\tif(this._is_initialized() && !this._is_lightbox_open() && this.config.key_nav){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\r\n\tfunction getSelectedEvent(){\r\n\t\tvar node = scheduler.$keyboardNavigation.dispatcher.getActiveNode();\r\n\t\tif(node && node.eventId) return node.eventId;\r\n\t\treturn scheduler._select_id;\r\n\t}\r\n\r\n\tscheduler.event(document, \"keydown\", function(e){\r\n\t\t// compatibility fix - scheduler focus on ctrl+v on mouse hover\r\n\t\tif(((e.ctrlKey || e.metaKey) && e.keyCode == 86) && scheduler._buffer_event && !scheduler.$keyboardNavigation.dispatcher.isEnabled()) {\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.isActive = currentTarget();\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler._key_nav_copy_paste = function(e){\r\n\t\tif(!scheduler._is_key_nav_active()) return true;\r\n\r\n\t\tif (e.keyCode == 37 || e.keyCode == 39) { // Left, Right arrows\r\n\t\t\te.cancelBubble = true;\r\n\r\n\t\t\tvar next = scheduler.date.add(scheduler._date,(e.keyCode == 37 ? -1 : 1 ),scheduler._mode);\r\n\t\t\tscheduler.setCurrentView(next);\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tvar select_id = getSelectedEvent();\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 67) { // CTRL+C\r\n\t\t\tif (select_id) {\r\n\t\t\t\tscheduler._buffer_event = copyEvent(scheduler.getEvent(select_id));\r\n\t\t\t\tisCopy = true;\r\n\t\t\t\tscheduler.callEvent(\"onEventCopied\", [scheduler.getEvent(select_id)]);\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 88) { // CTRL+X\r\n\t\t\tif (select_id) {\r\n\t\t\t\tisCopy = false;\r\n\t\t\t\tvar ev = scheduler._buffer_event = copyEvent(scheduler.getEvent(select_id));\r\n\r\n\t\t\t\tscheduler.updateEvent(ev.id);\r\n\t\t\t\tscheduler.callEvent(\"onEventCut\", [ev]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 86 && currentTarget(e)) { // CTRL+V\r\n\t\t\tvar ev = scheduler._buffer_event ? scheduler.getEvent(scheduler._buffer_event.id) : scheduler._buffer_event;\r\n\t\t\tev = ev || scheduler._buffer_event;\r\n\r\n\t\t\tif (ev) {\r\n\t\t\t\tvar new_ev = scheduler._make_pasted_event(ev);\r\n\t\t\t\tif (isCopy) {\r\n\t\t\t\t\tnew_ev.id = scheduler.uid();\r\n\t\t\t\t\tscheduler._do_paste(isCopy, new_ev, ev);\r\n\t\t\t\t}\r\n\t\t\t\telse { // cut operation\r\n\t\t\t\t\tvar res = scheduler.callEvent(\"onBeforeEventChanged\",[new_ev, e, false, ev]);\r\n\t\t\t\t\tif (res) {\r\n\t\t\t\t\t\tscheduler._do_paste(isCopy, new_ev, ev);\r\n\t\t\t\t\t\tisCopy = true; // switch to copy after first paste operation\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t};\r\n};\r\nscheduler._temp_key_scope();\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.attachSchedulerHandlers = function(){\r\n\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\tvar keyDownHandler = function(e){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\r\n\t\treturn dispatcher.keyDownHandler(e);\r\n\t};\r\n\r\n\tvar focusHandler = function () {\r\n\t\tdispatcher.keepScrollPosition(function () {\r\n\t\t\tdispatcher.focusGlobalNode();\r\n\t\t});\r\n\t};\r\n\r\n\tvar waitCall;\r\n\tscheduler.attachEvent(\"onDataRender\", function(){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\t\tif(!(dispatcher.isEnabled() && !scheduler.getState().editor_id)) return;\r\n\r\n\t\tclearTimeout(waitCall);\r\n\t\twaitCall = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tif(!dispatcher.isEnabled())\r\n\t\t\t\tdispatcher.enable();\r\n\t\t\treFocusActiveNode();\r\n\t\t});\r\n\t});\r\n\r\n\tvar reFocusActiveNode = function(){\r\n\t\tif(!dispatcher.isEnabled())\r\n\t\t\treturn;\r\n\r\n\t\tvar activeNode = dispatcher.getActiveNode();\r\n\t\tif(!activeNode)\r\n\t\t\treturn;\r\n\r\n\t\tif(!activeNode.isValid()){\r\n\t\t\tactiveNode = activeNode.fallback();\r\n\t\t}\r\n\r\n\t\tif(!activeNode || activeNode instanceof scheduler.$keyboardNavigation.MinicalButton || activeNode instanceof scheduler.$keyboardNavigation.MinicalCell)\r\n\t\t\treturn;\r\n\r\n\t\tdispatcher.keepScrollPosition(function () {\r\n\t\t\tactiveNode.focus(true);\r\n\t\t});\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\tvar container = scheduler.$container;\r\n\t\tscheduler.eventRemove(document, \"keydown\", keyDownHandler);\r\n\t\tscheduler.eventRemove(container, \"mousedown\", mousedownHandler);\r\n\t\tscheduler.eventRemove(container, \"focus\", focusHandler);\r\n\r\n\r\n\t\tif(scheduler.config.key_nav){\r\n\r\n\t\t\tscheduler.event(document, \"keydown\", keyDownHandler);\r\n\t\t\tscheduler.event(container, \"mousedown\", mousedownHandler);\r\n\t\t\tscheduler.event(container, \"focus\", focusHandler);\r\n\r\n\t\t\tcontainer.setAttribute(\"tabindex\", \"0\");\r\n\r\n\t\t}else{\r\n\t\t\tcontainer.removeAttribute(\"tabindex\");\r\n\t\t}\r\n\t});\r\n\r\n\tfunction mousedownHandler(e){\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\r\n\r\n\t\tvar dataAreaClick = scheduler.$keyboardNavigation.isChildOf(e.target || e.srcElement, scheduler.$container.querySelector(\".dhx_cal_data\"));\r\n\r\n\r\n\t\tvar pos = scheduler.getActionData(e);\r\n\r\n\t\tvar focusNode;\r\n\t\tif(scheduler._locate_event(e.target || e.srcElement)){\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.Event(scheduler._locate_event(e.target || e.srcElement));\r\n\t\t}else if(dataAreaClick){\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(pos.date && dataAreaClick){\r\n\t\t\t\tfocusNode = focusNode.nextSlot(new scheduler.$keyboardNavigation.TimeSlot(pos.date, null, pos.section));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(focusNode) {\r\n\t\t\tif (!dispatcher.isEnabled()) {\r\n\t\t\t\tdispatcher.activeNode = focusNode;\r\n\r\n\t\t\t} else {\r\n\t\t\t\tif (pos.date && dataAreaClick) {\r\n\t\t\t\t\tdispatcher.delay(function () {\r\n\t\t\t\t\t\tdispatcher.setActiveNode(focusNode);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction focusEvent(evNode){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\t\tif(!dispatcher.isEnabled()) return;\r\n\r\n\r\n\t\tvar prevState = evNode;\r\n\t\tvar focusNode = new scheduler.$keyboardNavigation.Event(prevState.eventId);\r\n\t\tif(!focusNode.isValid()){\r\n\t\t\tvar lastStart = focusNode.start || prevState.start;\r\n\t\t\tvar lastEnd = focusNode.end || prevState.end;\r\n\t\t\tvar lastSection = focusNode.section || prevState.section;\r\n\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot(lastStart, lastEnd, lastSection);\r\n\t\t\tif(!focusNode.isValid()){\r\n\t\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdispatcher.setActiveNode(focusNode);\r\n\t\tvar node = dispatcher.getActiveNode();\r\n\t\tif(node && node.getNode && document.activeElement != node.getNode()){\r\n\t\t\tdispatcher.focusNode(dispatcher.getActiveNode());\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tvar updateEvent = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id){\r\n\t\tvar res = updateEvent.apply(this, arguments);\r\n\t\tif(scheduler.config.key_nav && dispatcher.isEnabled()){\r\n\t\t\tif(scheduler.getState().select_id == id){\r\n\t\t\t\tvar element = new scheduler.$keyboardNavigation.Event(id);\r\n\r\n\t\t\t\tif(!scheduler.getState().lightbox_id){\r\n\t\t\t\t\tfocusEvent(element);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn res;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onEventDeleted\", function(id) {\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\t\tif(dispatcher.isEnabled()){\r\n\t\t\tvar activeNode = dispatcher.getActiveNode();\r\n\t\t\tif(activeNode.eventId == id){\r\n\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onClearAll\", function(){\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\t\tif(dispatcher.isEnabled()){\r\n\t\t\tif(dispatcher.getActiveNode() instanceof scheduler.$keyboardNavigation.Event){\r\n\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation._minicalendars = [];\r\n\r\nscheduler.$keyboardNavigation.isMinical = function(node){\r\n\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\tif(this.isChildOf(node, minicalendars[i]))\r\n\t\t\treturn true;\r\n\t}\r\n\treturn false;\r\n};\r\n\r\nscheduler.$keyboardNavigation.isChildOf = function(child, parent){\r\n\twhile(child && child !== parent){\r\n\t\tchild = child.parentNode;\r\n\t}\r\n\r\n\treturn !!(child === parent);\r\n};\r\n\r\nscheduler.$keyboardNavigation.patchMinicalendar = function(){\r\n\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\tfunction focusMinical(e){\r\n\t\tvar target = e.target;\r\n\r\n\t\tdispatcher.enable();\r\n\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.MinicalButton(target, 0));\r\n\t}\r\n\r\n\tfunction minicalClick(e){\r\n\t\tvar target = e.target || e.srcElement;\r\n\r\n\t\tvar prev = scheduler.utils.dom.locateCss(e, \"dhx_cal_prev_button\", false);\r\n\t\tvar next = scheduler.utils.dom.locateCss(e, \"dhx_cal_next_button\", false);\r\n\t\tvar cell = scheduler.utils.dom.locateCss(e, \"dhx_year_body\", false);\r\n\r\n\t\tvar rowIndex = 0;\r\n\t\tvar cellIndex = 0;\r\n\t\tif(cell){\r\n\t\t\tvar tr;\r\n\t\t\tvar td;\r\n\t\t\tvar current = target;\r\n\t\t\twhile(current && current.tagName.toLowerCase() != \"td\"){\r\n\t\t\t\tcurrent = current.parentNode;\r\n\t\t\t}\r\n\t\t\tif(current){\r\n\t\t\t\ttd = current;\r\n\t\t\t\ttr = td.parentNode;\r\n\t\t\t}\r\n\r\n\t\t\tif(tr && td){\r\n\t\t\t\tvar rows = tr.parentNode.querySelectorAll(\"tr\");\r\n\t\t\t\tfor(var i = 0; i < rows.length; i++){\r\n\t\t\t\t\tif(rows[i] == tr){\r\n\t\t\t\t\t\trowIndex = i;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tvar cells = tr.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\t\t\tif(cells[i] == td){\r\n\t\t\t\t\t\tcellIndex = i;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tvar root = e.currentTarget;\r\n\t\tdispatcher.delay(function(){\r\n\t\t\tif(prev || next || cell){\r\n\r\n\t\t\t\tvar element;\r\n\t\t\t\tif(prev){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalButton(root, 0);\r\n\t\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.MinicalButton(root, 0));\r\n\t\t\t\t}else if(next){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalButton(root, 1);\r\n\t\t\t\t}else if(cell){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalCell(root, rowIndex, cellIndex);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(element){\r\n\r\n\t\t\t\t\tdispatcher.enable();\r\n\t\t\t\t\tif(element.isValid()){\r\n\t\t\t\t\t\tdispatcher.activeNode = null;\r\n\t\t\t\t\t\tdispatcher.setActiveNode(element);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t}\r\n\r\n\tif(scheduler.renderCalendar){\r\n\t\tvar renderMinical = scheduler.renderCalendar;\r\n\t\tscheduler.renderCalendar = function(){\r\n\t\t\tvar cal = renderMinical.apply(this, arguments);\r\n\t\t\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\r\n\t\t\tscheduler.eventRemove(cal, \"click\", minicalClick);\r\n\t\t\tscheduler.event(cal, \"click\", minicalClick);\r\n\r\n\t\t\tscheduler.eventRemove(cal, \"focus\", focusMinical);\r\n\t\t\tscheduler.event(cal, \"focus\", focusMinical);\r\n\r\n\t\t\tvar added = false;\r\n\t\t\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\t\t\tif(minicalendars[i] == cal){\r\n\t\t\t\t\tadded = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(!added)\r\n\t\t\t\tminicalendars.push(cal);\r\n\r\n\t\t\tif(dispatcher.isEnabled()){\r\n\t\t\t\tvar node = dispatcher.getActiveNode();\r\n\t\t\t\tif(node && node.container == cal){\r\n\t\t\t\t\tdispatcher.focusNode(node);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcal.setAttribute(\"tabindex\", \"0\");\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tcal.setAttribute(\"tabindex\", \"0\");\r\n\t\t\t}\r\n\t\t\treturn cal;\r\n\t\t};\r\n\t}\r\n\r\n\tif(scheduler.destroyCalendar){\r\n\t\tvar destroyMinical = scheduler.destroyCalendar;\r\n\t\tscheduler.destroyCalendar = function(cal, force){\r\n\t\t\tcal = cal || (scheduler._def_count ? scheduler._def_count.firstChild : null);\r\n\t\t\tvar res = destroyMinical.apply(this, arguments);\r\n\r\n\t\t\tif(!cal || !cal.parentNode){\r\n\t\t\t\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\t\t\t\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\t\t\t\tif(minicalendars[i] == cal){\r\n\t\t\t\t\t\tscheduler.eventRemove(minicalendars[i], \"focus\", focusMinical);\r\n\t\t\t\t\t\tminicalendars.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn res;\r\n\t\t};\r\n\t}\r\n};\r\n\r\n}","import keyboard_shortcuts from \"./keyboard_navigation/common/keyboard_shortcuts\";\r\nimport eventhandler from \"./keyboard_navigation/common/eventhandler\";\r\nimport trap_modal_focus from \"./keyboard_navigation/common/trap_modal_focus\";\r\nimport marker from \"./keyboard_navigation/marker\";\r\nimport scheduler_node from \"./keyboard_navigation/elements/scheduler_node\";\r\nimport nav_node from \"./keyboard_navigation/elements/nav_node\";\r\nimport header_cell from \"./keyboard_navigation/elements/header_cell\";\r\nimport event from \"./keyboard_navigation/elements/event\";\r\nimport time_slot from \"./keyboard_navigation/elements/time_slot\";\r\nimport minical_button from \"./keyboard_navigation/elements/minical_button\";\r\nimport minical_cell from \"./keyboard_navigation/elements/minical_cell\";\r\nimport data_area from \"./keyboard_navigation/elements/data_area\";\r\nimport modals from \"./keyboard_navigation/modals\";\r\nimport core from \"./keyboard_navigation/core\";\r\nimport key_nav_legacy from \"./keyboard_navigation/key_nav_legacy\";\r\n\r\n\r\nimport scheduler_handlers from \"./keyboard_navigation/scheduler_handlers\";\r\nimport minical_handlers from \"./keyboard_navigation/minical_handlers\";\r\n\r\nexport default function(scheduler){\r\n\t\tscheduler.config.key_nav = true;\r\n\t\tscheduler.config.key_nav_step = 30;\r\n\t\tscheduler.addShortcut = function(shortcut, handler, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tscopeObject.prototype.bind(shortcut, handler);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.getShortcutHandler = function(shortcut, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tvar commands = scheduler.$keyboardNavigation.shortcuts.parse(shortcut);\r\n\t\t\t\tif(commands.length){\r\n\t\t\t\t\treturn scopeObject.prototype.findHandler(commands[0]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.removeShortcut = function(shortcut, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tscopeObject.prototype.unbind(shortcut);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.focus = function(){\r\n\t\t\tif(!scheduler.config.key_nav){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar disp = scheduler.$keyboardNavigation.dispatcher;\r\n\t\t\tdisp.enable();\r\n\t\t\tvar activeNode = disp.getActiveNode();\r\n\t\t\tif(!activeNode || activeNode instanceof scheduler.$keyboardNavigation.MinicalButton || activeNode instanceof scheduler.$keyboardNavigation.MinicalCell){\r\n\t\t\t\tdisp.setDefaultNode();\r\n\t\t\t}else{\r\n\t\t\t\tdisp.focusNode(disp.getActiveNode());\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfunction getScope(mode){\r\n\t\t\tvar scopes = {\r\n\t\t\t\t\"minicalButton\":scheduler.$keyboardNavigation.MinicalButton,\r\n\t\t\t\t\"minicalDate\":scheduler.$keyboardNavigation.MinicalCell,\r\n\t\t\t\t\"scheduler\":scheduler.$keyboardNavigation.SchedulerNode,\r\n\t\t\t\t\"dataArea\": scheduler.$keyboardNavigation.DataArea,\r\n\t\t\t\t\"timeSlot\": scheduler.$keyboardNavigation.TimeSlot,\r\n\t\t\t\t\"event\": scheduler.$keyboardNavigation.Event\r\n\t\t\t};\r\n\r\n\t\t\tvar searchMap = {};\r\n\t\t\tfor(var i in scopes)\r\n\t\t\t\tsearchMap[i.toLowerCase()] = scopes[i];\r\n\r\n\t\t\tmode = (mode + \"\").toLowerCase();\r\n\r\n\t\t\treturn searchMap[mode] || scopes.scheduler;\r\n\t\t}\r\n\r\n\t\tscheduler.$keyboardNavigation = {};\r\n\r\n\t\tscheduler._compose = function(){\r\n\t\t\tvar parts = Array.prototype.slice.call(arguments, 0);\r\n\t\t\tvar res = {};\r\n\t\t\tfor(var i = 0; i < parts.length; i++){\r\n\t\t\t\tvar obj = parts[i];\r\n\t\t\t\tif(typeof obj == \"function\"){\r\n\t\t\t\t\tobj = new obj();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor(var p in obj){\r\n\t\t\t\t\tres[p] = obj[p];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn res;\r\n\t\t};\r\n\r\n\t\tkeyboard_shortcuts(scheduler);\r\n\t\teventhandler(scheduler);\r\n\t\ttrap_modal_focus(scheduler);\r\n\t\tmarker(scheduler);\r\n\t\tscheduler_node(scheduler);\r\n\t\tnav_node(scheduler);\r\n\t\theader_cell(scheduler);\r\n\t\tevent(scheduler);\r\n\t\ttime_slot(scheduler);\r\n\t\tminical_button(scheduler);\r\n\t\tminical_cell(scheduler);\r\n\t\tdata_area(scheduler);\r\n\t\tmodals(scheduler);\r\n\t\tcore(scheduler);\r\n\t\tkey_nav_legacy(scheduler);\r\n\r\n\t\t(function(){\r\n\t\t\tscheduler_handlers(scheduler);\r\n\t\t\tminical_handlers(scheduler);\r\n\r\n\t\t\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\t\t\tscheduler.$keyboardNavigation.attachSchedulerHandlers();\r\n\r\n\t\t\tif(scheduler.renderCalendar){\r\n\t\t\t\t// if minical ext loaded before key nav ext - patch it now\r\n\t\t\t\tscheduler.$keyboardNavigation.patchMinicalendar();\r\n\t\t\t}else{\r\n\t\t\t\t// otherwise - wait until everything is loaded and try again\r\n\t\t\t\tvar attachOnce = scheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\t\t\t\tscheduler.detachEvent(attachOnce);\r\n\t\t\t\t\tscheduler.$keyboardNavigation.patchMinicalendar();\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\tfunction isSchedulerSelected(){\r\n\t\t\t\tif(!scheduler.config.key_nav) return;\r\n\r\n\t\t\t\tvar enable;\r\n\t\t\t\tvar focusElement = document.activeElement;\r\n\t\t\t\t// halt key nav when focus is outside scheduler or in quick info popup\r\n\t\t\t\tif(!focusElement || scheduler.utils.dom.locateCss(focusElement, \"dhx_cal_quick_info\", false)){\r\n\t\t\t\t\tenable = false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tenable = scheduler.$keyboardNavigation.isChildOf(focusElement, scheduler.$container) || scheduler.$keyboardNavigation.isMinical(focusElement);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn enable;\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\tfunction changeState(enable){\r\n\t\t\t\tif(enable && !dispatcher.isEnabled()){\r\n\t\t\t\t\tdispatcher.enable();\r\n\t\t\t\t}else if(!enable && dispatcher.isEnabled()){\r\n\t\t\t\t\tdispatcher.disable();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tconst intervalId = setInterval(function(){\r\n\t\t\t\tif(!scheduler.$container || !scheduler.$keyboardNavigation.isChildOf(scheduler.$container, document.body)){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar enable = isSchedulerSelected();\r\n\r\n\t\t\t\tif(enable){\r\n\t\t\t\t\tchangeState(enable);\r\n\t\t\t\t}else if(!enable && dispatcher.isEnabled()){\r\n\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// doublecheck in case checking is done in handler before focus element is repainted\r\n\t\t\t\t\t\tif(scheduler.config.key_nav){\r\n\t\t\t\t\t\t\tchangeState(isSchedulerSelected());\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tscheduler.$container.removeAttribute(\"tabindex\");\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}, 100);\r\n\t\t\t\t}\r\n\t\t\t}, 500);\r\n\t\t\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\t\t\tclearInterval(intervalId);\r\n\t\t\t});\r\n\t\t})();\r\n\t}\r\n\r\n\r\n","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\r\n\tthis.layers.sort(function(a, b){\r\n\t\treturn a.zIndex - b.zIndex;\r\n\t});\r\n\r\n\tscheduler._dp_init=function(dp){\r\n\t\tdp._methods=[\"_set_event_text_style\",\"\",\"changeEventId\",\"deleteEvent\"];\r\n\r\n\t\tthis.attachEvent(\"onEventAdded\",function(id){\r\n\t\t\tif (!this._loading && this.validId(id) && this.getEvent(id) && this.getEvent(id).layer == dp.layer)\r\n\t\t\t\tdp.setUpdated(id,true,\"inserted\");\r\n\t\t});\r\n\t\tthis.attachEvent(\"onBeforeEventDelete\",function(id){\r\n\t\t\tif(this.getEvent(id) && this.getEvent(id).layer == dp.layer) {\r\n\t\t\t\tif (!this.validId(id)) return;\r\n\t\t\t\tvar z=dp.getState(id);\r\n\r\n\t\t\t\tif (z==\"inserted\" || this._new_event) { dp.setUpdated(id,false);\t\treturn true; }\r\n\t\t\t\tif (z==\"deleted\") return false;\r\n\t\t\t\tif (z==\"true_deleted\") return true;\r\n\r\n\t\t\t\tdp.setUpdated(id,true,\"deleted\");\r\n\t\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\telse return true;\r\n\t\t});\r\n\t\tthis.attachEvent(\"onEventChanged\",function(id){\r\n\t\t\tif (!this._loading && this.validId(id) && this.getEvent(id) && this.getEvent(id).layer == dp.layer)\r\n\t\t\t\tdp.setUpdated(id,true,\"updated\");\r\n\t\t});\r\n\r\n\t\tdp._getRowData=function(id,pref){\r\n\t\t\tvar ev=this.obj.getEvent(id);\r\n\t\t\tvar data = {};\r\n\r\n\t\t\tfor (var a in ev){\r\n\t\t\t\tif (a.indexOf(\"_\")===0) continue;\r\n\t\t\t\tif (ev[a] && ev[a].getUTCFullYear) //not very good, but will work\r\n\t\t\t\t\tdata[a] = this.obj._helpers.formatDate(ev[a]);\r\n\t\t\t\telse\r\n\t\t\t\t\tdata[a] = ev[a];\r\n\t\t\t}\r\n\t\t\treturn data;\r\n\t\t};\r\n\t\tdp._clearUpdateFlag=function(){};\r\n\r\n\t\tdp.attachEvent(\"insertCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"updateCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"deleteCallback\", function(upd, id) {\r\n\t\t\tthis.obj.setUserData(id, this.action_param, \"true_deleted\");\r\n\t\t\tthis.obj.deleteEvent(id);\r\n\t\t});\r\n\t};\r\n\r\n\t(function() {\r\n var _cloneObj = function(obj){\r\n if(obj === null || typeof(obj) != 'object')\r\n return obj;\r\n var temp = new obj.constructor();\r\n for(var key in obj)\r\n temp[key] = _cloneObj(obj[key]);\r\n return temp;\r\n };\r\n\r\n\t\tscheduler._dataprocessors = [];\r\n\t\tscheduler._layers_zindex = {};\r\n\t\tfor(var i=0; i= scheduler.config.collision_limit);\r\n\t});\r\n\r\n\tscheduler.addEvent=function(start_date,end_date,text,id,extra_data){\r\n\t\tvar ev=start_date;\r\n\t\tif (arguments.length!=1){\r\n\t\t\tev=extra_data||{};\r\n\t\t\tev.start_date=start_date;\r\n\t\t\tev.end_date=end_date;\r\n\t\t\tev.text=text;\r\n\t\t\tev.id=id;\r\n\t\t\tev.layer = this.defaultLayer;\r\n\t\t}\r\n\t\tev.id = ev.id||scheduler.uid();\r\n\t\tev.text = ev.text||\"\";\r\n\r\n\r\n\t\tif (typeof ev.start_date == \"string\") ev.start_date=this.templates.api_date(ev.start_date);\r\n\t\tif (typeof ev.end_date == \"string\") ev.end_date=this.templates.api_date(ev.end_date);\r\n\t\tev._timed=this.isOneDayEvent(ev);\r\n\r\n\t\tvar is_new=!this._events[ev.id];\r\n\t\tthis._events[ev.id]=ev;\r\n\t\tthis.event_updated(ev);\r\n\t\tif (!this._loading)\r\n\t\t\tthis.callEvent(is_new?\"onEventAdded\":\"onEventChanged\",[ev.id,ev]);\r\n\t};\r\n\r\n\tthis._evs_layer = {};\r\n\tfor (var i = 0; i < this.layers.length; i++) { // array in object for each layer\r\n\t\tthis._evs_layer[this.layers[i].name] = [];\r\n\t}\r\n\r\n\tscheduler.addEventNow=function(start,end,e){\r\n\t\tvar base = {};\r\n\t\tif (typeof start == \"object\"){\r\n\t\t\tbase = start;\r\n\t\t\tstart = null;\r\n\t\t}\r\n\r\n\t\tvar d = (this.config.event_duration||this.config.time_step)*60000;\r\n\t\tif (!start) start = Math.round((scheduler._currentDate()).valueOf()/d)*d;\r\n\t\tvar start_date = new Date(start);\r\n\t\tif (!end){\r\n\t\t\tvar start_hour = this.config.first_hour;\r\n\t\t\tif (start_hour > start_date.getHours()){\r\n\t\t\t\tstart_date.setHours(start_hour);\r\n\t\t\t\tstart = start_date.valueOf();\r\n\t\t\t}\r\n\t\t\tend = start+d;\r\n\t\t}\r\n\r\n\r\n\t\tbase.start_date = base.start_date||start_date;\r\n\t\tbase.end_date = base.end_date||new Date(end);\r\n\t\tbase.text = base.text||this.locale.labels.new_event;\r\n\t\tbase.id = this._drag_id = this.uid();\r\n\t\tbase.layer = this.defaultLayer;\r\n\t\tthis._drag_mode=\"new-size\";\r\n\r\n\t\tthis._loading=true;\r\n\t\tthis.addEvent(base);\r\n\t\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\t\tthis._loading=false;\r\n\r\n\t\tthis._drag_event={}; //dummy , to trigger correct event updating logic\r\n\t\tthis._on_mouse_up(e);\r\n\t};\r\n\r\n\tscheduler._t_render_view_data = function(events) { // helper\r\n\t\tif (this.config.multi_day && !this._table_view) {\r\n\t\t\tvar tvs = [];\r\n\t\t\tvar tvd = [];\r\n\t\t\tfor (var k = 0; k < events.length; k++) {\r\n\t\t\t\tif (events[k]._timed)\r\n\t\t\t\t\ttvs.push(events[k]);\r\n\t\t\t\telse\r\n\t\t\t\t\ttvd.push(events[k]);\r\n\t\t\t}\r\n\t\t\tthis._table_view = true;\r\n\t\t\tthis.render_data(tvd);\r\n\t\t\tthis._table_view = false;\r\n\t\t\tthis.render_data(tvs);\r\n\t\t}\r\n\t\telse\r\n\t\t\tthis.render_data(events);\r\n\t};\r\n\r\n\tscheduler.render_view_data = function(){\r\n\t\tif (this._not_render) {\r\n\t\t\tthis._render_wait = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._render_wait = false;\r\n\r\n\t\tthis.clear_view();\r\n\r\n\t\tthis._evs_layer = {};\r\n\t\tfor (var i = 0; i < this.layers.length; i++) { // array in object for each layer\r\n\t\t\tthis._evs_layer[this.layers[i].name] = [];\r\n\t\t}\r\n\r\n\t\tvar evs = this.get_visible_events();\r\n\t\tfor (var i = 0; i < evs.length; i++) { // filling layer arrays with events\r\n\t\t\tif(this._evs_layer[evs[i].layer])\r\n\t\t\t\tthis._evs_layer[evs[i].layer].push(evs[i]);\r\n\t\t}\r\n\r\n\t\tif(this._mode == 'month') { // old logic is used\r\n\t\t\tvar tevs = [];\r\n\t\t\tfor (var i = 0; i < this.layers.length; i++) {\r\n\t\t\t\tif (this.layers[i].visible)\r\n\t\t\t\t\ttevs = tevs.concat(this._evs_layer[this.layers[i].name]);\r\n\t\t\t}\r\n\t\t\tthis._t_render_view_data(tevs);\r\n\t\t}\r\n\t\telse { // week, day; should use new logic\r\n\t\t\tfor (var i = 0; i < this.layers.length; i++) {\r\n\t\t\t\tif (this.layers[i].visible) {\r\n\t\t\t\t\tvar evs_layer = this._evs_layer[this.layers[i].name];\r\n\t\t\t\t\tthis._t_render_view_data(evs_layer);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._render_v_bar=function(ev,x,y,w,h,style,contentA,contentB,bottom){\r\n\t\tvar id = ev.id;\r\n\r\n\t\tif(contentA.indexOf('
';\r\n\t\thtml+='
 
';\r\n\t\thtml+='
'+contentA+'
';\r\n\t\thtml+='
'+contentB+'
';\r\n\t\thtml+='
';\r\n\r\n\t\td.innerHTML=html;\r\n\t\td.style.zIndex = 100;\r\n\t\treturn d.firstChild;\r\n\t};\r\n\r\n\tscheduler.render_event_bar=function(ev){\r\n\t\tvar parent=this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tvar x=this._colsS[ev._sday];\r\n\t\tvar x2=this._colsS[ev._eday];\r\n\t\tif (x2==x) x2=this._colsS[ev._eday+1];\r\n\t\tvar hb = this.xy.bar_height;\r\n\r\n\t\tvar y=this._colsS.heights[ev._sweek]+(this._colsS.height?(this.xy.month_scale_height+2):2)+ev._sorder*hb;\r\n\r\n\t\tvar d=document.createElement(\"div\");\r\n\t\tvar cs = ev._timed?\"dhx_cal_event_clear\":\"dhx_cal_event_line\";\r\n\t\tvar cse = (scheduler.templates['event_class_'+ev.layer])?scheduler.templates['event_class_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_class(ev.start_date,ev.end_date,ev);\r\n\t\tif (cse) cs=cs+\" \"+cse;\r\n\r\n\t\tvar html='
';\r\n\r\n\t\tif (ev._timed)\r\n\t\t\thtml+=(scheduler.templates['event_bar_date_'+ev.layer])?scheduler.templates['event_bar_date_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_bar_date(ev.start_date,ev.end_date,ev);\r\n\t\thtml+=( (scheduler.templates['event_bar_text_'+ev.layer])?scheduler.templates['event_bar_text_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_bar_text(ev.start_date,ev.end_date,ev) + '
)');\r\n\t\thtml+='
';\r\n\r\n\t\td.innerHTML=html;\r\n\r\n\t\tthis._rendered.push(d.firstChild);\r\n\t\tparent.appendChild(d.firstChild);\r\n\t};\r\n\r\n\tscheduler.render_event=function(ev){\r\n\t\tvar menu = scheduler.xy.menu_width;\r\n\t\tif(scheduler.getLayer(ev.layer).noMenu)\r\n\t\t\tmenu = 0;\r\n\r\n\t\tif (ev._sday<0) return; //can occur in case of recurring event during time shift\r\n\t\tvar parent=scheduler.locate_holder(ev._sday);\r\n\t\tif (!parent) return; //attempt to render non-visible event\r\n\t\tvar sm = ev.start_date.getHours()*60+ev.start_date.getMinutes();\r\n\t\tvar em = (ev.end_date.getHours()*60+ev.end_date.getMinutes())||(scheduler.config.last_hour*60);\r\n\r\n\t\tvar top = (Math.round((sm*60*1000-this.config.first_hour*60*60*1000)*this.config.hour_size_px/(60*60*1000)))%(this.config.hour_size_px*24)+1; //42px/hour\r\n\t\tvar height = Math.max(scheduler.xy.min_event_height,(em-sm)*this.config.hour_size_px/60)+1; //42px/hour\r\n\t\t\r\n\t\tvar width=Math.floor((parent.clientWidth-menu)/ev._count);\r\n\t\tvar left=ev._sorder*width+1;\r\n\t\tif (!ev._inner) width=width*(ev._count-ev._sorder);\r\n\r\n\r\n\r\n\t\tvar d=this._render_v_bar(ev.id,menu+left,top,width,height,ev._text_style,scheduler.templates.event_header(ev.start_date,ev.end_date,ev),scheduler.templates.event_text(ev.start_date,ev.end_date,ev));\r\n\r\n\t\tthis._rendered.push(d);\r\n\t\tparent.appendChild(d);\r\n\r\n\t\tleft=left+parseInt(parent.style.left,10)+menu;\r\n\r\n\t\ttop+=this._dy_shift; //corrupt top, to include possible multi-day shift\r\n\t\td.style.zIndex = this._layers_zindex[ev.layer];\r\n\r\n\t\tif (this._edit_id==ev.id){\r\n\t\t\td.style.zIndex = parseInt(d.style.zIndex)+1; //fix overlapping issue\r\n\t\t\tvar new_zIndex = d.style.zIndex;\r\n\t\t\twidth=Math.max(width-4,scheduler.xy.editor_width);\r\n\t\t\tvar d=document.createElement(\"div\");\r\n\t\t\td.setAttribute(\"event_id\",ev.id); // for backward compatibility\r\n\t\t\td.setAttribute(this.config.event_attribute,ev.id);\r\n\t\t\tthis.set_xy(d,width,height-20,left,top+14);\r\n\t\t\td.className=\"dhx_cal_editor\";\r\n\t\t\td.style.zIndex = new_zIndex;\r\n\t\t\tvar d2=document.createElement(\"div\");\r\n\t\t\tthis.set_xy(d2,width-6,height-26);\r\n\t\t\td2.style.cssText+=\";margin:2px 2px 2px 2px;overflow:hidden;\";\r\n\r\n\r\n\t\t\td2.style.zIndex = new_zIndex;\r\n\t\t\td.appendChild(d2);\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].appendChild(d);\r\n\t\t\tthis._rendered.push(d);\r\n\r\n\t\t\td2.innerHTML=\"\";\r\n\r\n\t\t\tthis._editor=d2.firstChild;\r\n\t\t\tthis._editor.addEventListener(\"keypress\", function(e){\r\n\t\t\t\tif (e.shiftKey) return true;\r\n\t\t\t\tvar code= e.keyCode;\r\n\t\t\t\tif (code==scheduler.keys.edit_save) scheduler.editStop(true);\r\n\t\t\t\tif (code==scheduler.keys.edit_cancel) scheduler.editStop(false);\r\n\t\t\t});\r\n\t\t\tthis._editor.addEventListener(\"selectstart\", function(e){ e.cancelBubble=true; return true; });\r\n\t\t\td2.firstChild.focus();\r\n\t\t\t//IE and opera can add x-scroll during focusing\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].scrollLeft=0;\r\n\t\t\td2.firstChild.select();\r\n\t\t}\r\n\t\tif (this._select_id==ev.id){\r\n\t\t\td.style.zIndex = parseInt(d.style.zIndex)+1; //fix overlapping issue\r\n\t\t\tvar icons=this.config[\"icons_\"+((this._edit_id==ev.id)?\"edit\":\"select\")];\r\n\t\t\tvar icons_str=\"\";\r\n\t\t\tfor (var i=0; i
\";\r\n\t\t\tvar obj = this._render_v_bar(ev.id,left-menu+1,top,menu,icons.length*20+26,\"\",\"
\",icons_str,true);\r\n\t\t\tobj.style.left=left-menu+1;\r\n\t\t\tobj.style.zIndex = d.style.zIndex;\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].appendChild(obj);\r\n\t\t\tthis._rendered.push(obj);\r\n\t\t}\r\n\r\n\t};\r\n\r\n scheduler.filter_agenda = function(id, event) {\r\n var layer = scheduler.getLayer(event.layer);\r\n return (layer && layer.visible);\r\n };\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.limit_start = null;\r\nscheduler.config.limit_end = null;\r\nscheduler.config.limit_view = false;\r\nscheduler.config.check_limits = true;\r\nscheduler.config.mark_now = true;\r\nscheduler.config.display_marked_timespans = true;\r\nscheduler.config.overwrite_marked_timespans = true;\r\nscheduler._temp_limit_scope = function(){\r\n\tvar before = null;\r\n\tvar dhx_time_block = \"dhx_time_block\";\r\n\tvar default_timespan_type = \"default\";\r\n\tvar fix_options = function(options, days, zones) {\r\n\t\tif (days instanceof Date && zones instanceof Date) {\r\n\t\t\toptions.start_date = days;\r\n\t\t\toptions.end_date = zones;\r\n\t\t} else {\r\n\t\t\toptions.days = days;\r\n\t\t\toptions.zones = zones;\r\n\t\t}\r\n\t\treturn options;\r\n\t};\r\n\tvar get_resulting_options = function(days, zones, sections) {\r\n\t\tvar options = (typeof days == \"object\") ? days : { days: days };\r\n\t\toptions.type = dhx_time_block;\r\n\t\toptions.css = \"\";\r\n\t\tif (zones) {\r\n\t\t\tif (sections)\r\n\t\t\t\toptions.sections = sections;\r\n\t\t\toptions = fix_options(options, days, zones);\r\n\t\t}\r\n\t\treturn options;\r\n\t};\r\n\tscheduler.blockTime = function(days, zones, sections){\r\n\t\tvar options = get_resulting_options(days, zones, sections);\r\n\t\treturn scheduler.addMarkedTimespan(options);\r\n\t};\r\n\tscheduler.unblockTime = function(days, zones, sections) {\r\n\t\tzones = zones || \"fullday\";\r\n\t\tvar options = get_resulting_options(days, zones, sections);\r\n\t\treturn scheduler.deleteMarkedTimespan(options);\r\n\t};\r\n\tscheduler.attachEvent(\"onBeforeViewChange\",function(om,od,nm,nd){\r\n\r\n\t\tfunction isBlocked(date, mode){\r\n\t\t\tvar limit_start = scheduler.config.limit_start,\r\n\t\t\t\tlimit_end = scheduler.config.limit_end,\r\n\t\t\t\tdate_end = scheduler.date.add(date,1,mode);\r\n\r\n\t\t\treturn (date.valueOf() > limit_end.valueOf() || date_end <= limit_start.valueOf());\r\n\t\t}\r\n\r\n\t\tif (scheduler.config.limit_view){\r\n\t\t\tnd = nd||od; nm = nm||om;\r\n\t\t\tif (isBlocked(nd, nm) && !(od.valueOf() == nd.valueOf())){\r\n\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvar resetDate = !isBlocked(od, nm) ? od : scheduler.config.limit_start;\r\n\r\n\t\t\t\t\tscheduler.setCurrentView(!isBlocked(resetDate, nm) ? resetDate : null, nm);\r\n\t\t\t\t},1);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.checkInMarkedTimespan = function(ev, timespan_type, on_overlap){\r\n\t\ttimespan_type = timespan_type || default_timespan_type;\r\n\r\n\t\tvar res = true;\r\n\t\tvar temp_start_date = new Date(ev.start_date.valueOf());\r\n\t\tvar temp_end_date = scheduler.date.add(temp_start_date, 1, \"day\");\r\n\t\tvar timespans = scheduler._marked_timespans;\r\n\t\tfor (; temp_start_date < ev.end_date; temp_start_date = scheduler.date.date_part(temp_end_date), temp_end_date = scheduler.date.add(temp_start_date, 1, \"day\") ) {\r\n\t\t\tvar day_value = +scheduler.date.date_part( new Date(temp_start_date) ); // the first part of event not necessarily contains only date part\r\n\t\t\tvar day_index = temp_start_date.getDay();\r\n\r\n\t\t\tvar zones = getZones(ev, timespans, day_index, day_value, timespan_type);\r\n\t\t\tif (zones){\r\n\t\t\t\tfor (var i = 0; i < zones.length; i+=2) {\r\n\r\n\t\t\t\t\t// they may change for new event if it passes limit zone\r\n\t\t\t\t\tvar eventStart = scheduler._get_zone_minutes(temp_start_date);\r\n\t\t\t\t\tvar eventEnd = ( ev.end_date>temp_end_date || ev.end_date.getDate() != temp_start_date.getDate() ) ? 1440 : scheduler._get_zone_minutes(ev.end_date);\r\n\r\n\t\t\t\t\tvar markerStart = zones[i];\r\n\t\t\t\t\tvar markerEnd = zones[i+1];\r\n\t\t\t\t\tif (markerStarteventStart) {\r\n\t\t\t\t\t\tif(typeof on_overlap == \"function\"){\r\n\t\t\t\t\t\t\t//handler allows to cancel overlapping\r\n\t\t\t\t\t\t\t//actually needed only to keep default behavior of limits\r\n\t\t\t\t\t\t\tres = on_overlap(ev, eventStart, eventEnd, markerStart, markerEnd);//event object, event start/end minutes in 'zones' format, zone start/end minutes\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tres = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(!res)\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn !res;\r\n\t};\r\n\tvar blocker = scheduler.checkLimitViolation = function(event){\r\n\t\tif(!event)\r\n\t\t\treturn true;\r\n\t\tif (!scheduler.config.check_limits)\r\n\t\t\treturn true;\r\n\t\tvar s = scheduler;\r\n\t\tvar c = s.config;\r\n\t\tvar evs = [];\r\n\t\tif (event.rec_type) {\r\n\t\t\tvar dates = scheduler.getRecDates(event);\r\n\t\t\tfor(var i=0; i < dates.length; i++){\r\n\t\t\t\tvar ev = scheduler._copy_event(event);\r\n\t\t\t\tscheduler._lame_copy(ev, dates[i]);\r\n\t\t\t\tevs.push(ev);\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\tevs = [event];\r\n\t\t}\r\n\r\n\t\tvar complete_res = true;\r\n\t\tfor (var p=0; p= c.limit_start.valueOf() && ev.end_date.valueOf() <= c.limit_end.valueOf()) : true;\r\n\t\t\tif (res){\r\n\t\t\t\tres = !scheduler.checkInMarkedTimespan(ev, dhx_time_block, function(event, eventStart, eventEnd, markerStart, markerEnd){\r\n\t\t\t\t\t//try crop event to allow placing\r\n\t\t\t\t\tvar allow = true;\r\n\t\t\t\t\tif (eventStart<=markerEnd && eventStart >= markerStart){\r\n\t\t\t\t\t\tif (markerEnd == 24*60 || eventEnd <= markerEnd){\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(event._timed && s._drag_id && s._drag_mode == \"new-size\"){\r\n\t\t\t\t\t\t\tevent.start_date.setHours(0);\r\n\t\t\t\t\t\t\tevent.start_date.setMinutes(markerEnd);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ((eventEnd >= markerStart && eventEnd <= markerEnd) || (eventStart < markerStart && eventEnd > markerEnd)){\r\n\t\t\t\t\t\tif(event._timed && s._drag_id && s._drag_mode == \"new-size\"){\r\n\t\t\t\t\t\t\tevent.end_date.setHours(0);\r\n\t\t\t\t\t\t\tevent.end_date.setMinutes(markerStart);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn allow;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\tif (!res) {\r\n\t\t\t\tres = (s.checkEvent(\"onLimitViolation\")) ? s.callEvent(\"onLimitViolation\",[ev.id, ev]) : res;\r\n\t\t\t}\r\n\t\t\tcomplete_res = complete_res && res;\r\n\t\t}\r\n\t\tif(!complete_res){\r\n\t\t\ts._drag_id = null;\r\n\t\t\ts._drag_mode = null;\r\n\t\t}\r\n\t\treturn complete_res;\r\n\r\n\r\n\t};\r\n\tscheduler._get_blocked_zones = function(timespans, property, day_index, day_value, timespan_type){\r\n\t\tvar zones =[];\r\n\t\tif (timespans && timespans[property]) {\r\n\t\t\tvar timeline_zones = timespans[property];\r\n\t\t\tvar blocked_timeline_zones = this._get_relevant_blocked_zones(day_index, day_value, timeline_zones, timespan_type);\r\n\t\t\tfor (var i=0; i= scheduler.config.limit_end.valueOf()) {\r\n\t\t\t\tev.start_date = this.date.add(scheduler.config.limit_end, -1, \"day\");\r\n\t\t\t}\r\n\t\t\tif (ev.end_date < scheduler.config.limit_start) {\r\n\t\t\t\tev.end_date = new Date(scheduler.config.limit_start);\r\n\t\t\t}\r\n\t\t\tif (ev.end_date.valueOf() >= scheduler.config.limit_end.valueOf()) {\r\n\t\t\t\tev.end_date = this.date.add(scheduler.config.limit_end, -1, \"day\");\r\n\t\t\t}\r\n\t\t\tif (ev.start_date.valueOf() >= ev.end_date.valueOf()) {\r\n\t\t\t\tev.end_date = this.date.add(ev.start_date, (this.config.event_duration||this.config.time_step), \"minute\");\r\n\t\t\t}\r\n\t\t\tev._timed=this.isOneDayEvent(ev);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventChanged\",function(id){\r\n\t\tif (!id) return true;\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tif (!blocker(ev)){\r\n\t\t\tif (!before) return false;\r\n\t\t\tev.start_date = before[0];\r\n\t\t\tev.end_date = before[1];\r\n\t\t\tev._timed=this.isOneDayEvent(ev);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onBeforeEventChanged\",function(ev, native_object, is_new){\r\n\t\treturn blocker(ev);\r\n\t});\r\n\tscheduler.attachEvent(\"onBeforeEventCreated\", function(ev) { // native event\r\n\t\tvar start_date = scheduler.getActionData(ev).date;\r\n\t\tvar event = {\r\n\t\t\t_timed: true,\r\n\t\t\tstart_date: start_date,\r\n\t\t\tend_date: scheduler.date.add(start_date, scheduler.config.time_step, \"minute\")\r\n\t\t};\r\n\t\treturn blocker(event);\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", function(){\r\n\t\tscheduler._mark_now();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onAfterSchedulerResize\", function(){\r\n\t\twindow.setTimeout(function(){ \r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler._mark_now(); \r\n\t\t}, 1);\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\t\tscheduler._mark_now_timer = window.setInterval(function() {\r\n\t\t\tif(!scheduler._is_initialized())\r\n\t\t\t\treturn;\r\n\t\t\tscheduler._mark_now();\r\n\t\t}, 60000);\r\n\t});\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tclearInterval(scheduler._mark_now_timer);\r\n\t});\r\n\tscheduler._mark_now = function(hide) {\r\n\t\t// day, week, units views\r\n\t\tvar dhx_now_time = 'dhx_now_time';\r\n\t\tif (!this._els[dhx_now_time]) {\r\n\t\t\tthis._els[dhx_now_time] = [];\r\n\t\t}\r\n\t\tvar now = scheduler._currentDate();\r\n\t\tvar cfg = this.config;\r\n\t\tscheduler._remove_mark_now(); // delete previous marks if they exist\r\n\t\tif (!hide && cfg.mark_now && now < this._max_date && now > this._min_date && now.getHours() >= cfg.first_hour && now.getHours() 1) {\r\n\t\t\t\t\tif(view.size && view.options.length){\r\n\t\t\t\t\t\tday_index = ((view.position+ day_index) / view.options.length) * view.size;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstart_index = day_index;\r\n\t\t\t\t\tend_index = day_index + units_l;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tstart_index = 0;\r\n\t\t\t\t\tend_index = start_index + units_l;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar r_divs = [];\r\n\r\n\t\t\t\tfor (var i = start_index; i < end_index; i++) {\r\n\t\t\t\t\tvar t_day = i; // as each unit is actually considered +1 day\r\n\t\t\t\t\toptions.days = t_day;\r\n\t\t\t\t\tvar t_div = scheduler._render_marked_timespan(options, null, t_day)[0];\r\n\t\t\t\t\tr_divs.push(t_div);\r\n\t\t\t\t}\r\n\t\t\t\treturn r_divs;\r\n\t\t\t} else { // day/week views\r\n\t\t\t\toptions.days = day_index;\r\n\t\t\t\treturn scheduler._render_marked_timespan(options, null, day_index);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\toptions.days = +scheduler.date.date_part(now);\r\n\t\t\t\treturn scheduler._render_marked_timespan(options, null, null);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\tscheduler._remove_mark_now = function() {\r\n\t\tvar dhx_now_time = 'dhx_now_time';\r\n\t\tvar els = this._els[dhx_now_time];\r\n\t\tfor (var i=0; i config.start_date) || (config.days !== undefined && config.zones)) && !config.type )\r\n\t\t\treturn r_configs; // incorrect config was provided\r\n\r\n\t\tvar min = 0;\r\n\t\tvar max = 24*60;\r\n\t\tif (config.zones == \"fullday\")\r\n\t\t\tconfig.zones = [min, max];\r\n\t\tif (config.zones && config.invert_zones) {\r\n\t\t\tconfig.zones = scheduler.invertZones(config.zones);\r\n\t\t}\r\n\r\n\t\tconfig.id = scheduler.uid();\r\n\t\tconfig.css = config.css||\"\";\r\n\t\tconfig.type = config.type||default_timespan_type;\r\n\r\n\t\tvar sections = config.sections;\r\n\t\tif (sections) {\r\n\t\t\tfor (var view_key in sections) {\r\n\t\t\t\tif (sections.hasOwnProperty(view_key)) {\r\n\t\t\t\t\tvar ids = sections[view_key];\r\n\t\t\t\t\tif (!(ids instanceof Array))\r\n\t\t\t\t\t\tids = [ids];\r\n\t\t\t\t\tfor (var i=0; i t_sd) ? scheduler._get_zone_minutes(start_date) : min;\r\n\t\t\t\t\tvar zone_end = ( end_date > t_ed || end_date.getDate() != t_sd.getDate() ) ? max : scheduler._get_zone_minutes(end_date);\r\n\t\t\t\t\tt_config.zones = [zone_start, zone_end];\r\n\t\t\t\t\tr_configs.push(t_config);\r\n\r\n\t\t\t\t\tt_sd = t_ed;\r\n\t\t\t\t\tt_ed = scheduler.date.add(t_ed, 1, \"day\");\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (c_config.days instanceof Date)\r\n\t\t\t\t\tc_config.days = (scheduler.date.date_part(c_config.days)).valueOf();\r\n\t\t\t\tc_config.zones = config.zones.slice();\r\n\t\t\t\tr_configs.push(c_config);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn r_configs;\r\n\t};\r\n\tscheduler._get_dates_by_index = function(index, start, end) {\r\n\t\tvar dates = [];\r\n\t\tstart = scheduler.date.date_part(new Date(start||scheduler._min_date));\r\n\t\tend = new Date(end||scheduler._max_date);\r\n\t\tvar start_day = start.getDay();\r\n\t\tvar delta = (index-start_day >= 0) ? (index-start_day) : (7-start.getDay()+index);\r\n\t\tvar t_date = scheduler.date.add(start, delta, \"day\");\r\n\t\tfor (; t_date < end; t_date = scheduler.date.add(t_date, 1, \"week\")) {\r\n\t\t\tdates.push(t_date);\r\n\t\t}\r\n\t\treturn dates;\r\n\t};\r\n\tscheduler._get_css_classes_by_config = function(config) {\r\n\t\tvar css_classes = [];\r\n\t\tif (config.type == dhx_time_block) {\r\n\t\t\tcss_classes.push(dhx_time_block);\r\n\t\t\tif (config.css)\r\n\t\t\t\tcss_classes.push(dhx_time_block+\"_reset\");\r\n\t\t}\r\n\t\tcss_classes.push(\"dhx_marked_timespan\", config.css);\r\n\t\treturn css_classes.join(\" \");\r\n\t};\r\n\tscheduler._get_block_by_config = function(config) {\r\n\t\tvar block = document.createElement(\"div\");\r\n\t\tif (config.html) {\r\n\t\t\tif (typeof config.html == \"string\")\r\n\t\t\t\tblock.innerHTML = config.html;\r\n\t\t\telse\r\n\t\t\t\tblock.appendChild(config.html);\r\n\t\t}\r\n\t\treturn block;\r\n\t};\r\n\tscheduler._render_marked_timespan = function(options, area, day) {\r\n\t\tvar blocks = []; // resulting block which will be rendered and returned\r\n\t\tvar c = scheduler.config;\r\n\t\tvar min_date = this._min_date;\r\n\t\tvar max_date = this._max_date;\r\n\t\tvar day_value = false; // if timespan for specific date should be displayed\r\n\r\n\t\tif (!c.display_marked_timespans)\r\n\t\t\treturn blocks;\r\n\r\n\t\t// in case of markTimespan\r\n\t\tif (!day && day !== 0) {\r\n\t\t\tif (options.days < 7)\r\n\t\t\t\tday = options.days;\r\n\t\t\telse {\r\n\t\t\t\tvar date_to_display = new Date(options.days);\r\n\t\t\t\tday_value = +date_to_display;\r\n\r\n\t\t\t\t// in case of markTimespan date could be not in the viewing range, need to return\r\n\t\t\t\tif ( !(+max_date > +date_to_display && +min_date <= +date_to_display) )\r\n\t\t\t\t\treturn blocks;\r\n\r\n\t\t\t\tday = date_to_display.getDay();\r\n\t\t\t}\r\n\r\n\t\t\t// convert day default index (Sun - 0, Sat - 6) to index of hourscales (depends on week_start and config.start_on_monday)\r\n\t\t\tvar min_day = min_date.getDay();\r\n\t\t\tif (min_day > day) {\r\n\t\t\t\tday = 7 - (min_day-day);\r\n\t\t\t} else {\r\n\t\t\t\tday = day - min_day;\r\n\t\t\t}\r\n\t\t}\r\n\t\tvar zones = options.zones;\r\n\t\tvar css_classes = scheduler._get_css_classes_by_config(options);\r\n\r\n\t\tif (scheduler._table_view && scheduler._mode == \"month\") {\r\n\t\t\tvar areas = [];\r\n\t\t\tvar days = [];\r\n\r\n\r\n\t\t\tif (!area) {\r\n\t\t\t\tdays = (day_value) ? [day_value] : scheduler._get_dates_by_index(day);\r\n\t\t\t\tfor (var i=0; i < days.length; i++) {\r\n\t\t\t\t\tareas.push( this._scales[days[i]] );\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tareas.push(area);\r\n\t\t\t\tdays.push(day);\r\n\t\t\t}\r\n\r\n\t\t\tfor (var i=0; i < areas.length; i++) {\r\n\t\t\t\tarea = areas[i];\r\n\t\t\t\tday = days[i];\r\n\r\n\t\t\t\tvar sday = this.locate_holder_day(day, false) % this._cols.length;\r\n\r\n\t\t\t\tif(this._ignores[sday]) continue;\r\n\r\n\t\t\t\tvar block_proto = scheduler._get_block_by_config(options);\r\n\t\t\t\tblock_proto.className = css_classes;\r\n\t\t\t\tblock_proto.style.top = \"0px\";\r\n\t\t\t\tblock_proto.style.height = \"100%\";\r\n\t\t\t\t\r\n\t\t\t\tfor (var k=0; k < zones.length; k+=2) {\r\n\t\t\t\t\tvar start = zones[i];\r\n\t\t\t\t\tvar end = zones[i+1];\r\n\t\t\t\t\tif (end <= start)\r\n\t\t\t\t\t\treturn [];\r\n\r\n\t\t\t\t\tvar block = block_proto.cloneNode(true);\r\n\r\n\t\t\t\t\tblock.style.left = \"0px\";\r\n\t\t\t\t\tblock.style.width = \"100%\";\r\n\r\n\t\t\t\t\tarea.appendChild(block);\r\n\t\t\t\t\tblocks.push(block);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tvar index = day;\r\n\r\n\t\t\tif(this._ignores[this.locate_holder_day(day, false)]) return blocks;\r\n\r\n\t\t\tif (this._props && this._props[this._mode] && options.sections && options.sections[this._mode]) {\r\n\t\t\t\tvar view = this._props[this._mode];\r\n\t\t\t\tindex = view.order[options.sections[this._mode]];\r\n\r\n\t\t\t\tvar inner_index = view.order[options.sections[this._mode]];\r\n\t\t\t\tif(!(view.days > 1)){\r\n\t\t\t\t\tindex = inner_index;\r\n\t\t\t\t\tif (view.size && (index > view.position+view.size)) {\r\n\t\t\t\t\t\tindex = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar units_l = view.size || view.options.length;\r\n\t\t\t\t\tindex = index*units_l + inner_index;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tarea = area ? area : scheduler.locate_holder(index);\r\n\r\n\t\t\tfor (var i = 0; i < zones.length; i+=2){\r\n\t\t\t\tvar start = Math.max(zones[i], c.first_hour*60);\r\n\t\t\t\tvar end = Math.min(zones[i+1], c.last_hour*60);\r\n\t\t\t\tif (end <= start) {\r\n\t\t\t\t\tif (i+2 < zones.length)\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\treturn [];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar block = scheduler._get_block_by_config(options);\r\n\t\t\t\tblock.className = css_classes;\r\n\r\n\t\t\t\t// +1 for working with section which really takes up whole height (as % would be == 0)\r\n\t\t\t\tvar all_hours_height = this.config.hour_size_px*24 + 1;\r\n\t\t\t\tvar hour_ms = 60*60*1000;\r\n\t\t\t\tblock.style.top = (Math.round((start*60*1000-this.config.first_hour*hour_ms)*this.config.hour_size_px/hour_ms) % all_hours_height) + \"px\";\r\n\t\t\t\tblock.style.height = Math.max((Math.round(((end-start)*60*1000)*this.config.hour_size_px/hour_ms)) % all_hours_height, 1)+\"px\";\r\n\r\n\t\t\t\tarea.appendChild(block);\r\n\t\t\t\tblocks.push(block);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn blocks;\r\n\t};\r\n\r\n\tscheduler._mark_timespans = function(){\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\t\tvar divs = [];\r\n\t\tif (scheduler._table_view && scheduler._mode == \"month\"){\r\n\t\t\tfor (var day in this._scales) {\r\n\t\t\t\tvar date = new Date(+day);\r\n\t\t\t\tdivs.push.apply(divs, scheduler._on_scale_add_marker(this._scales[day],date));\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\t//manually trigger rendering of configs for each column\r\n\t\t\tvar date = new Date(scheduler._min_date);\r\n\t\t\tfor (var i = 0, len = data.childNodes.length; i < len; i++) {\r\n\t\t\t\tvar area = data.childNodes[i];\r\n\t\t\t\tif (area.firstChild && scheduler._getClassName(area.firstChild).indexOf(\"dhx_scale_hour\") > -1) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdivs.push.apply(divs, scheduler._on_scale_add_marker(area, date));\r\n\t\t\t\tdate = scheduler.date.add(date, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn divs;\r\n\t};\r\n\r\n\t// just marks timespan, will be cleaned after refresh\r\n\tscheduler.markTimespan = function(configuration) {\r\n\r\n\t\tif(!this._els){\r\n\t\t\tthrow new Error(\"`scheduler.markTimespan` can't be used before scheduler initialization. Place `scheduler.markTimespan` call after `scheduler.init`.\");\r\n\t\t}\r\n\r\n\t\tvar rebuild_els = false;\r\n\t\tif(!this._els[\"dhx_cal_data\"]){\r\n\t\t\tscheduler.get_elements();\r\n\t\t\trebuild_els = true;\r\n\t\t}\r\n\r\n\r\n\t\t// backup regular marked timespans\r\n\t\tvar timespans_ids = scheduler._marked_timespans_ids,\r\n\t\t\ttimespan_types = scheduler._marked_timespans_types,\r\n\t\t\ttimespans = scheduler._marked_timespans;\r\n\r\n\t\tscheduler.deleteMarkedTimespan();\r\n\r\n\t\t//add block to configs\r\n\t\tscheduler.addMarkedTimespan(configuration);\r\n\r\n\t\tvar divs = scheduler._mark_timespans();\r\n\r\n\t\tif(rebuild_els)\r\n\t\t\tscheduler._els = [];\r\n\r\n\t\t// restore timespan config\r\n\t\tscheduler._marked_timespans_ids = timespans_ids;\r\n\t\tscheduler._marked_timespans_types = timespan_types;\r\n\t\tscheduler._marked_timespans = timespans;\r\n\r\n\t\treturn divs;\r\n\t};\r\n\tscheduler.unmarkTimespan = function(divs) {\r\n\t\tif (!divs)\r\n\t\t\treturn;\r\n\t\tfor (var i=0; i c_zone_end && zone_start <= c_zone_end) || (zone_start < c_zone_start && zone_end >= c_zone_start)) {\r\n\t\t\t\t\tresulting_zones[i] = Math.min(c_zone_start, zone_start);\r\n\t\t\t\t\tresulting_zones[i+1] = Math.max(c_zone_end, zone_end);\r\n\t\t\t\t\ti -= 2;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (!isLast) // do nothing, maybe next current zone will match or will be last\r\n\t\t\t\t\t\tcontinue;\r\n\r\n\t\t\t\t\tvar offset = (c_zone_start > zone_start)?0:2;\r\n\t\t\t\t\tresulting_zones.splice(i+offset, 0, zone_start, zone_end); // last current zone, need to add another\r\n\t\t\t\t}\r\n\t\t\t\tzones.splice(k--,2); // zone was merged or added, need to exclude it\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn resulting_zones;\r\n\t};\r\n\tscheduler._subtract_timespan_zones = function(current_zones, zones) {\r\n\t\tvar resulting_zones = current_zones.slice();\r\n\t\tfor (var i=0; i c_zone_start && zone_start < c_zone_end) {\r\n\t\t\t\t\tvar is_modified = false;\r\n\t\t\t\t\tif (c_zone_start >= zone_start && c_zone_end <= zone_end) {\r\n\t\t\t\t\t\tresulting_zones.splice(i, 2);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (c_zone_start < zone_start) {\r\n\t\t\t\t\t\tresulting_zones.splice(i, 2, c_zone_start, zone_start);\r\n\t\t\t\t\t\tis_modified = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (c_zone_end > zone_end) {\r\n\t\t\t\t\t\tresulting_zones.splice( (is_modified)?(i+2):i, (is_modified)?0:2, zone_end, c_zone_end);\r\n\t\t\t\t\t}\r\n\t\t\t\t\ti -= 2;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn resulting_zones;\r\n\t};\r\n\tscheduler.invertZones = function(zones) {\r\n\t\treturn scheduler._subtract_timespan_zones([0, 1440], zones.slice());\r\n\t};\r\n\tscheduler._delete_marked_timespan_by_id = function(id) {\r\n\t\tvar configs = scheduler._marked_timespans_ids[id];\r\n\t\tif (configs) {\r\n\t\t\tfor (var i=0; i 1)){\r\n\t\t\t\tday = scheduler.date.date_part(new Date(this._date)); // for units view actually only 1 day is displayed yet the day variable will change, need to use this._date for all calls\r\n\t\t\t}else{\r\n\t\t\t\tvar dx = 24*60*60*1000;\r\n\t\t\t\tvar day_ind = Math.round((day - scheduler._min_date)/dx);\r\n\t\t\t\tvar unitsPerDay = view.size || units.length;\r\n\t\t\t\tday = scheduler.date.add(scheduler._min_date, Math.floor(day_ind/unitsPerDay), \"day\"); // to the \"same\" day for all sections\r\n\t\t\t\tday = scheduler.date.date_part(day);\r\n\t\t\t}\r\n\t\t\tday_index = day.getDay();\r\n\t\t\tday_value = day.valueOf();\r\n\r\n\t\t\tif (timespans[mode] && timespans[mode][unit.key]) {\r\n\t\t\t\tvar unit_zones = timespans[mode][unit.key];\r\n\t\t\t\tvar unit_types = scheduler._get_types_to_render(unit_zones[day_index], unit_zones[day_value]);\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(unit_types));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar global_data = timespans[\"global\"];\r\n\r\n\t\tif(scheduler.config.overwrite_marked_timespans){\r\n\t\t\tvar day_types = global_data[day_value]||global_data[day_index];\r\n\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(day_types));\r\n\t\t} else {\r\n\t\t\tif(global_data[day_value]){\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(global_data[day_value]));\r\n\t\t\t}\r\n\t\t\tif(global_data[day_index]){\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(global_data[day_index]));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (var i=0; i\" + ev.text + \"

\" + (ev.event_location || '') + \"

\" + scheduler.templates.marker_date(start) + \" - \" + scheduler.templates.marker_date(end) + \"
\";\r\n};\r\nscheduler.dblclick_dhx_map_area = function() {\r\n\tif (!this.config.readonly && this.config.dblclick_create)\r\n\t\tthis.addEventNow({\r\n\t\t\tstart_date: scheduler._date,\r\n\t\t\tend_date: scheduler.date.add(scheduler._date, scheduler.config.time_step, \"minute\")\r\n\t\t});\r\n};\r\nscheduler.templates.map_time = function(start, end, ev) {\r\n\tif (scheduler.config.rtl && !ev._timed) {\r\n\t\treturn scheduler.templates.day_date(end) + \" – \" + scheduler.templates.day_date(start);\r\n\t} else if (ev._timed) {\r\n\t\treturn this.day_date(ev.start_date, ev.end_date, ev) + \" \" + this.event_date(start);\r\n\t} else {\r\n\t\treturn scheduler.templates.day_date(start) + \" – \" + scheduler.templates.day_date(end);\r\n\t}\r\n};\r\nscheduler.templates.map_text = function(start, end, ev) {\r\n\treturn ev.text;\r\n};\r\n\r\nscheduler.date.map_start = function(d) {\r\n\treturn d;\r\n};\r\nscheduler.date.add_map = function(date, inc, mode) {\r\n\treturn (new Date(date.valueOf()));\r\n};\r\n\r\nscheduler.templates.map_date = function(dd, ed, mode) {\r\n\treturn '';\r\n};\r\n\r\nscheduler._latLngUpdate = false; // flag for not displaying event second time in case of coordinates update\r\n\r\nscheduler.attachEvent(\"onSchedulerReady\", function() {\r\n\tscheduler._isMapPositionSet = false; // if user actual (geolocation) position was set on the map\r\n\r\n\tconst gmap = document.createElement('div');\r\n\tgmap.className = 'dhx_map';\r\n\tgmap.id = 'dhx_gmap';\r\n\tgmap.style.display = \"none\";\r\n\r\n\tscheduler._obj.appendChild(gmap);\r\n\r\n\tscheduler._els.dhx_gmap = [];\r\n\tscheduler._els.dhx_gmap.push(gmap);\r\n\r\n\t_setMapSize('dhx_gmap');\r\n\r\n\tconst mapOptions = {\r\n\t\tzoom: scheduler.config.map_initial_zoom || 10,\r\n\t\tcenter: scheduler.config.map_initial_position,\r\n\t\tmapTypeId: scheduler.config.map_type || google.maps.MapTypeId.ROADMAP\r\n\t};\r\n\tconst map = new google.maps.Map(document.getElementById('dhx_gmap'), mapOptions);\r\n\tmap.disableDefaultUI = false;\r\n\tmap.disableDoubleClickZoom = !scheduler.config.readonly;\r\n\r\n\tgoogle.maps.event.addListener(map, \"dblclick\", function(event) {\r\n\t\tconst geocoder = scheduler.ext.mapView.geocoder;\r\n\r\n\t\tif (!scheduler.config.readonly && scheduler.config.dblclick_create) {\r\n\t\t\tvar point = event.latLng;\r\n\t\t\tgeocoder.geocode(\r\n\t\t\t\t{ 'latLng': point },\r\n\t\t\t\tfunction(results, status) {\r\n\t\t\t\t\tif (status == google.maps.GeocoderStatus.OK) {\r\n\t\t\t\t\t\tpoint = results[0].geometry.location;\r\n\t\t\t\t\t\tscheduler.addEventNow({\r\n\t\t\t\t\t\t\tlat: point.lat(),\r\n\t\t\t\t\t\t\tlng: point.lng(),\r\n\t\t\t\t\t\t\tevent_location: results[0].formatted_address,\r\n\t\t\t\t\t\t\tstart_date: scheduler._date,\r\n\t\t\t\t\t\t\tend_date: scheduler.date.add(scheduler._date, scheduler.config.time_step, \"minute\")\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t}\r\n\t});\r\n\r\n\tvar infoWindowOptions = {\r\n\t\tcontent: ''\r\n\t};\r\n\r\n\tif (scheduler.config.map_infowindow_max_width) {\r\n\t\tinfoWindowOptions.maxWidth = scheduler.config.map_infowindow_max_width;\r\n\t}\r\n\r\n\tscheduler.map = {\r\n\t\t_points: [],\r\n\t\t_markers: [],\r\n\t\t_infowindow: new google.maps.InfoWindow(infoWindowOptions),\r\n\t\t_infowindows_content: [],\r\n\t\t_initialization_count: -1,\r\n\t\t_obj: map\r\n\t};\r\n\r\n\tscheduler.ext.mapView.geocoder = new google.maps.Geocoder();\r\n\tscheduler.ext.mapView.map = map;\r\n\tscheduler.ext.mapView.points = scheduler.map._points;\r\n\tscheduler.ext.mapView.markers = scheduler.map._markers;\r\n\tscheduler.ext.mapView.infoWindow = scheduler.map._infowindow;\r\n\r\n\tif (scheduler.config.map_resolve_user_location) {\r\n\t\tif (navigator.geolocation) {\r\n\t\t\tif (!scheduler._isMapPositionSet) {\r\n\t\t\t\tnavigator.geolocation.getCurrentPosition(function(position) {\r\n\t\t\t\t\tvar _userLocation = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);\r\n\t\t\t\t\tmap.setCenter(_userLocation);\r\n\t\t\t\t\tmap.setZoom(scheduler.config.map_zoom_after_resolve || 10);\r\n\t\t\t\t\tscheduler.map._infowindow.setContent(scheduler.locale.labels.marker_geo_success);\r\n\t\t\t\t\tscheduler.map._infowindow.position = map.getCenter();\r\n\t\t\t\t\tscheduler.map._infowindow.open(map);\r\n\r\n\t\t\t\t\tscheduler._isMapPositionSet = true;\r\n\t\t\t\t},\r\n\t\t\t\t\t\tfunction() {\r\n\t\t\t\t\t\t\tscheduler.map._infowindow.setContent(scheduler.locale.labels.marker_geo_fail);\r\n\t\t\t\t\t\t\tscheduler.map._infowindow.setPosition(map.getCenter());\r\n\t\t\t\t\t\t\tscheduler.map._infowindow.open(map);\r\n\t\t\t\t\t\t\tscheduler._isMapPositionSet = true;\r\n\t\t\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tgoogle.maps.event.addListener(map, \"resize\", function(event) {\r\n\t\tgmap.style.zIndex = '5';\r\n\t\tmap.setZoom(map.getZoom());\r\n\r\n\t});\r\n\tgoogle.maps.event.addListener(map, \"tilesloaded\", function(event) {\r\n\t\tgmap.style.zIndex = '5';\r\n\t});\r\n\r\n\tgmap.style.display = 'none'; // property was changed after attaching map\r\n\r\n\tconst old = scheduler.render_data;\r\n\tscheduler.render_data = function(evs, hold) {\r\n\t\tif (this._mode == \"map\") {\r\n\t\t\tfill_map_tab();\r\n\t\t\tvar events = scheduler.get_visible_events();\r\n\t\t\tfor (var i = 0; i < events.length; i++) {\r\n\t\t\t\tif (!scheduler.map._markers[events[i].id]) {\r\n\t\t\t\t\tshowAddress(events[i], false, false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else\r\n\t\t\treturn old.apply(this, arguments);\r\n\t};\r\n\r\n\tfunction set_full_view(mode) {\r\n\t\tif (mode) {\r\n\t\t\tvar l = scheduler.locale.labels;\r\n\t\t\tscheduler._els[\"dhx_cal_header\"][0].innerHTML = \"
\" + l.date + \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"
\" + l.description + \"
\";\r\n\t\t\tscheduler._table_view = true;\r\n\t\t\tscheduler.set_sizes();\r\n\t\t}\r\n\t}\r\n\r\n\tfunction clear_map_tab() {\r\n\t\tscheduler._selected_event_id = null;\r\n\t\tscheduler.map._infowindow.close();\r\n\t\tvar markers = scheduler.map._markers;\r\n\t\tfor (var key in markers) {\r\n\t\t\tif (markers.hasOwnProperty(key)) {\r\n\t\t\t\tmarkers[key].setMap(null);\r\n\t\t\t\tdelete scheduler.map._markers[key];\r\n\t\t\t\tif (scheduler.map._infowindows_content[key])\r\n\t\t\t\t\tdelete scheduler.map._infowindows_content[key];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction fill_map_tab() {\r\n\t\t//select events for which data need to be printed\r\n\t\tvar events = scheduler.get_visible_events();\r\n\t\tevents.sort(function(a, b) {\r\n\t\t\tif(a.start_date.valueOf()==b.start_date.valueOf())\r\n\t\t\t\treturn a.id>b.id?1:-1;\r\n\t\t\treturn a.start_date>b.start_date?1:-1;\r\n\t\t});\r\n\r\n\t\t//generate html for the view\r\n\t\tvar ariaAttr = scheduler._waiAria.mapAttrString();\r\n\r\n\t\tvar html = \"
\";\r\n\t\tfor (var i = 0; i < events.length; i++) {\r\n\t\t\tvar ev = events[i];\r\n\t\t\tvar event_class = (ev.id == scheduler._selected_event_id) ? 'dhx_map_line highlight' : 'dhx_map_line';\r\n\t\t\tvar bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\t\t\tvar color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\t\t\tvar ariaAttr = scheduler._waiAria.mapRowAttrString(ev);\r\n\t\t\tvar ariaButtonAttr = scheduler._waiAria.mapDetailsBtnString();\r\n\r\n\t\t\thtml += \"
\" + scheduler.templates.map_time(ev.start_date, ev.end_date, ev) + \"
\";\r\n\t\t\thtml += `
\r\n\t\t\t\r\n\t\t\t
`;\r\n\t\t\thtml += \"
\" + scheduler.templates.map_text(ev.start_date, ev.end_date, ev) + \"
\"; // -25 = icon size 20 and padding 5\r\n\t\t}\r\n\t\thtml += \"
\";\r\n\r\n\t\t//render html\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = 0; //fix flickering in FF\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t//\tscheduler._els[\"dhx_cal_data\"][0].style.width = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\r\n\t\tvar t = scheduler._els[\"dhx_cal_data\"][0].firstChild.childNodes;\r\n\r\n\t\tvar dateElement = scheduler._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML=scheduler.templates[scheduler._mode + \"_date\"](scheduler._min_date, scheduler._max_date, scheduler._mode);\r\n\t\t}\r\n\r\n\t\tscheduler._rendered = [];\r\n\t\tfor (var i = 0; i < t.length - 2; i++) {\r\n\t\t\tscheduler._rendered[i] = t[i];\r\n\t\t}\r\n\t}\r\n\r\n\tfunction _setMapSize(elem_id) { //input - map's div id\r\n\t\tvar map = document.getElementById(elem_id);\r\n\t\tconst nav_height = scheduler.$container.querySelector(\".dhx_cal_navline\").offsetHeight;\r\n\t\tvar height = scheduler._y - nav_height;\r\n\t\tif (height < 0)\r\n\t\t\theight = 0;\r\n\t\tvar width = scheduler._x - scheduler.xy.map_date_width - scheduler.xy.map_description_width - 1;\r\n\t\tif (width < 0)\r\n\t\t\twidth = 0;\r\n\t\tmap.style.height = height + 'px';\r\n\t\tmap.style.width = width + 'px';\r\n\t\tmap.style.position = \"absolute\";\r\n\t\tmap.style.top = nav_height + \"px\";\r\n\t\tif (scheduler.config.rtl) {\r\n\t\t\tmap.style.marginRight = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\t\t} else {\r\n\t\t\tmap.style.marginLeft = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\t\t}\r\n\t\tmap.style.marginTop = (scheduler.xy.nav_height + 2) + 'px';\r\n\t}\r\n\r\n\tscheduler.map_view = function(mode) {\r\n\t\tscheduler.map._initialization_count++;\r\n\t\tvar gmap = scheduler._els.dhx_gmap[0];\r\n\t\tvar temp_center;\r\n\t\t//scheduler._els.dhx_cal_data[0].style.width = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\r\n\t\tscheduler._min_date = scheduler.config.map_start || (scheduler._currentDate());\r\n\t\tscheduler._max_date = scheduler.config.map_end || scheduler.date.add(scheduler._currentDate(), 1, \"year\");\r\n\r\n\t\tscheduler._table_view = true;\r\n\t\tset_full_view(mode);\r\n\r\n\t\tif (mode) { //map tab activated\r\n\t\t\tclear_map_tab();\r\n\t\t\tfill_map_tab();\r\n\t\t\tgmap.style.display = 'block';\r\n\r\n\t\t\t// need to resize block every time window is resized\r\n\t\t\t_setMapSize('dhx_gmap');\r\n\t\t\ttemp_center = scheduler.map._obj.getCenter();\r\n\r\n\t\t\tvar events = scheduler.get_visible_events();\r\n\t\t\tfor (var i = 0; i < events.length; i++) {\r\n\t\t\t\tif (!scheduler.map._markers[events[i].id]) {\r\n\t\t\t\t\tshowAddress(events[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t} else { //map tab de-activated\r\n\t\t\tgmap.style.display = 'none';\r\n\t\t}\r\n\t\tgoogle.maps.event.trigger(scheduler.map._obj, 'resize');\r\n\r\n\t\tif (scheduler.map._initialization_count === 0 && temp_center) { // if tab is activated for the first time need to fix position\r\n\t\t\tscheduler.map._obj.setCenter(temp_center);\r\n\t\t}\r\n\r\n\t\tif (scheduler._selected_event_id) {\r\n\t\t\tselectEvent(scheduler._selected_event_id);\r\n\t\t}\r\n\t};\r\n\r\n\tvar selectEvent = function(event_id) {\r\n\t\tscheduler.map._obj.setCenter(scheduler.map._points[event_id]);\r\n\t\tscheduler.callEvent(\"onClick\", [event_id]);\r\n\t};\r\n\r\n\tvar showAddress = function(event, setCenter, performClick) { // what if event have incorrect position from the start?\r\n\t\tvar point = scheduler.config.map_error_position;\r\n\t\tif (event.lat && event.lng) {\r\n\t\t\tpoint = new google.maps.LatLng(event.lat, event.lng);\r\n\t\t}\r\n\t\tvar message = scheduler.templates.marker_text(event.start_date, event.end_date, event);\r\n\t\tif (!scheduler._new_event) {\r\n\r\n\t\t\tscheduler.map._infowindows_content[event.id] = message;\r\n\r\n\t\t\tif (scheduler.map._markers[event.id])\r\n\t\t\t\tscheduler.map._markers[event.id].setMap(null);\r\n\r\n\t\t\tscheduler.map._markers[event.id] = scheduler.ext.mapView.createMarker({\r\n\t\t\t\tposition: point,\r\n\t\t\t\tmap: scheduler.map._obj\r\n\t\t\t});\r\n\r\n\t\t\tgoogle.maps.event.addListener(scheduler.map._markers[event.id], 'click', function() {\r\n\t\t\t\tscheduler.map._infowindow.setContent(scheduler.map._infowindows_content[event.id]);\r\n\t\t\t\tscheduler.map._infowindow.open(scheduler.map._obj, scheduler.map._markers[event.id]);\r\n\t\t\t\tscheduler._selected_event_id = event.id;\r\n\t\t\t\tscheduler.render_data();\r\n\t\t\t});\r\n\t\t\tscheduler.map._points[event.id] = point;\r\n\r\n\t\t\tif (setCenter) scheduler.map._obj.setCenter(scheduler.map._points[event.id]);\r\n\t\t\tif (performClick) scheduler.callEvent(\"onClick\", [event.id]);\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onClick\", function(id, domEvent) {\r\n\t\tif (this._mode == \"map\") {\r\n\t\t\tscheduler._selected_event_id = id;\r\n\t\t\tfor (var i = 0; i < scheduler._rendered.length; i++) {\r\n\t\t\t\tscheduler._rendered[i].className = 'dhx_map_line';\r\n\t\t\t\tif (scheduler._rendered[i].getAttribute(scheduler.config.event_attribute) == id) {\r\n\t\t\t\t\tscheduler._rendered[i].className += \" highlight\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (scheduler.map._points[id] && scheduler.map._markers[id]) {\r\n\t\t\t\tscheduler.map._obj.setCenter(scheduler.map._points[id]); // was panTo\r\n\t\t\t\tgoogle.maps.event.trigger(scheduler.map._markers[id], 'click');\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tvar _displayEventOnMap = function(event) {\r\n\t\tconst geocoder = scheduler.ext.mapView.geocoder;\r\n\t\tif (event.event_location && geocoder) {\r\n\t\t\tgeocoder.geocode(\r\n\t\t\t\t{\r\n\t\t\t\t\t'address': event.event_location,\r\n\t\t\t\t\t'language': scheduler.uid().toString()\r\n\t\t\t\t},\r\n\t\t\t\tfunction(results, status) {\r\n\t\t\t\t\tvar point = {};\r\n\t\t\t\t\tif (status != google.maps.GeocoderStatus.OK) {\r\n\t\t\t\t\t\tpoint = scheduler.callEvent(\"onLocationError\", [event.id]);\r\n\t\t\t\t\t\tif (!point || point === true)\r\n\t\t\t\t\t\t\tpoint = scheduler.config.map_error_position;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tpoint = results[0].geometry.location;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tevent.lat = point.lat();\r\n\t\t\t\t\tevent.lng = point.lng();\r\n\r\n\t\t\t\t\tscheduler._selected_event_id = event.id;\r\n\r\n\t\t\t\t\tscheduler._latLngUpdate = true;\r\n\t\t\t\t\tscheduler.callEvent(\"onEventChanged\", [event.id, event]);\r\n\t\t\t\t\tshowAddress(event, true, true);\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t} else {\r\n\t\t\tshowAddress(event, true, true);\r\n\t\t}\r\n\t};\r\n\r\n\tvar _updateEventLocation = function(event) { // update lat and lng in database\r\n\t\tconst geocoder = scheduler.ext.mapView.geocoder;\r\n\t\tif (event.event_location && geocoder) {\r\n\t\t\tgeocoder.geocode(\r\n\t\t\t\t{\r\n\t\t\t\t\t'address': event.event_location,\r\n\t\t\t\t\t'language': scheduler.uid().toString()\r\n\t\t\t\t},\r\n\t\t\t\tfunction(results, status) {\r\n\t\t\t\t\tvar point = {};\r\n\t\t\t\t\tif (status != google.maps.GeocoderStatus.OK) {\r\n\t\t\t\t\t\tpoint = scheduler.callEvent(\"onLocationError\", [event.id]);\r\n\t\t\t\t\t\tif (!point || point === true)\r\n\t\t\t\t\t\t\tpoint = scheduler.config.map_error_position;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tpoint = results[0].geometry.location;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tevent.lat = point.lat();\r\n\t\t\t\t\tevent.lng = point.lng();\r\n\t\t\t\t\tscheduler._latLngUpdate = true;\r\n\t\t\t\t\tscheduler.callEvent(\"onEventChanged\", [event.id, event]);\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t}\r\n\t};\r\n\r\n\tvar _delay = function(method, object, params, delay) {\r\n\t\tsetTimeout(function() {\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tvar ret = method.apply(object, params);\r\n\t\t\tmethod = object = params = null;\r\n\t\t\treturn ret;\r\n\t\t}, delay || 1);\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onEventChanged\", function(id, event) {\r\n\t\tif (!this._latLngUpdate) {\r\n\t\t\tvar event = scheduler.getEvent(id);\r\n\t\t\tif ((event.start_date < scheduler._min_date && event.end_date > scheduler._min_date) || (event.start_date < scheduler._max_date && event.end_date > scheduler._max_date) || (event.start_date.valueOf() >= scheduler._min_date && event.end_date.valueOf() <= scheduler._max_date)) {\r\n\t\t\t\tif (scheduler.map._markers[id])\r\n\t\t\t\t\tscheduler.map._markers[id].setMap(null);\r\n\t\t\t\t_displayEventOnMap(event);\r\n\t\t\t} else { // event no longer should be displayed on the map view\r\n\t\t\t\tscheduler._selected_event_id = null;\r\n\t\t\t\tscheduler.map._infowindow.close();\r\n\t\t\t\tif (scheduler.map._markers[id])\r\n\t\t\t\t\tscheduler.map._markers[id].setMap(null);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t\tthis._latLngUpdate = false;\r\n\t\treturn true;\r\n\t});\r\n\r\n\r\n\tscheduler.attachEvent(\"onEventIdChange\", function(old_event_id, new_event_id) {\r\n\t\tvar event = scheduler.getEvent(new_event_id);\r\n\t\tif ((event.start_date < scheduler._min_date && event.end_date > scheduler._min_date) || (event.start_date < scheduler._max_date && event.end_date > scheduler._max_date) || (event.start_date.valueOf() >= scheduler._min_date && event.end_date.valueOf() <= scheduler._max_date)) {\r\n\t\t\tif (scheduler.map._markers[old_event_id]) {\r\n\t\t\t\tscheduler.map._markers[old_event_id].setMap(null);\r\n\t\t\t\tdelete scheduler.map._markers[old_event_id];\r\n\t\t\t}\r\n\t\t\tif (scheduler.map._infowindows_content[old_event_id])\r\n\t\t\t\tdelete scheduler.map._infowindows_content[old_event_id];\r\n\t\t\t_displayEventOnMap(event);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onEventAdded\", function(id, event) {\r\n\t\tif (!scheduler._dataprocessor) {\r\n\t\t\tif ((event.start_date < scheduler._min_date && event.end_date > scheduler._min_date) || (event.start_date < scheduler._max_date && event.end_date > scheduler._max_date) || (event.start_date.valueOf() >= scheduler._min_date && event.end_date.valueOf() <= scheduler._max_date)) {\r\n\t\t\t\tif (scheduler.map._markers[id])\r\n\t\t\t\t\tscheduler.map._markers[id].setMap(null);\r\n\t\t\t\t_displayEventOnMap(event);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\t/* Test/example\r\n\t scheduler.attachEvent(\"onLocationError\", function(event_id,event_object){\r\n\t return new google.maps.LatLng(8, 8);\r\n\t });\r\n\t */\r\n\r\n\tscheduler.attachEvent(\"onBeforeEventDelete\", function(id, event) {\r\n\t\tif (scheduler.map._markers[id]) {\r\n\t\t\tscheduler.map._markers[id].setMap(null); // if new event is deleted tab != map then it doesn't have marker yet\r\n\t\t}\r\n\t\tscheduler._selected_event_id = null;\r\n\t\tscheduler.map._infowindow.close();\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler._event_resolve_delay = 1500;\r\n\tscheduler.attachEvent(\"onEventLoading\", function(event) {\r\n\t\tif (scheduler.config.map_resolve_event_location && event.event_location && !event.lat && !event.lng) { // don't delete !event.lat && !event.lng as location could change\r\n\t\t\tscheduler._event_resolve_delay += 1500;\r\n\t\t\t_delay(_updateEventLocation, this, [event], scheduler._event_resolve_delay);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onEventCancel\", function(id, is_new) {\r\n\t\tif (is_new) {\r\n\t\t\tif (scheduler.map._markers[id])\r\n\t\t\t\tscheduler.map._markers[id].setMap(null);\r\n\t\t\tscheduler.map._infowindow.close();\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nconst minicalDomEvents = scheduler._createDomEventScope();\r\n\t\r\n\r\nscheduler.config.minicalendar = {\r\n\tmark_events: true\r\n};\r\nscheduler._synced_minicalendars = [];\r\nscheduler.renderCalendar = function(obj, _prev, is_refresh) {\r\n\tvar cal = null;\r\n\tvar date = obj.date || (scheduler._currentDate());\r\n\tif (typeof date == \"string\")\r\n\t\tdate = this.templates.api_date(date);\r\n\r\n\tif (!_prev) {\r\n\t\tvar cont = obj.container;\r\n\t\tvar pos = obj.position;\r\n\r\n\t\tif (typeof cont == \"string\")\r\n\t\t\tcont = document.getElementById(cont);\r\n\r\n\t\tif (typeof pos == \"string\")\r\n\t\t\tpos = document.getElementById(pos);\r\n\t\tif (pos && (typeof pos.left == \"undefined\" && typeof pos.right == \"undefined\")) {\r\n\t\t\tvar tpos = scheduler.$domHelpers.getOffset(pos);\r\n\t\t\tpos = {\r\n\t\t\t\ttop: tpos.top + pos.offsetHeight,\r\n\t\t\t\tleft: tpos.left\r\n\t\t\t};\r\n\t\t}\r\n\t\tif (!cont)\r\n\t\t\tcont = scheduler._get_def_cont(pos);\r\n\r\n\t\tcal = this._render_calendar(cont, date, obj);\r\n\t\r\n\t\tif (!cal.$_eventAttached) {\r\n\t\t\tcal.$_eventAttached = true;\r\n\t\t\tminicalDomEvents.attach(cal, \"click\", (function(e) {\r\n\t\t\t\tvar src = e.target || e.srcElement;\r\n\r\n\t\t\t\tvar $dom = scheduler.$domHelpers;\r\n\t\t\t\tif ($dom.closest(src, \".dhx_month_head\")) {\r\n\t\t\t\t\tif (!$dom.closest(src, \".dhx_after\") && !$dom.closest(src, \".dhx_before\")) {\r\n\r\n\t\t\t\t\t\tvar cellRoot = $dom.closest(src, \"[data-cell-date]\");\r\n\t\t\t\t\t\tvar dateAttribute = cellRoot.getAttribute(\"data-cell-date\");\r\n\t\t\t\t\t\tvar newDate = scheduler.templates.parse_date(dateAttribute);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tscheduler.unmarkCalendar(this);\r\n\t\t\t\t\t\tscheduler.markCalendar(this, newDate, \"dhx_calendar_click\");\r\n\t\t\t\t\t\tthis._last_date = newDate;\r\n\t\t\t\t\t\tif (this.conf.handler) this.conf.handler.call(scheduler, newDate, this);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}).bind(cal));\r\n\t\t}\r\n\t\r\n\t} else {\r\n\t\tcal = this._render_calendar(_prev.parentNode, date, obj, _prev);\r\n\t\tscheduler.unmarkCalendar(cal);\r\n\t}\r\n\r\n\tif (scheduler.config.minicalendar.mark_events) {\r\n\t\tvar start = scheduler.date.month_start(date);\r\n\t\tvar end = scheduler.date.add(start, 1, \"month\");\r\n\t\tvar evs = this.getEvents(start, end);\r\n\t\tvar filter = this[\"filter_\" + this._mode];\r\n\t\tvar markedDates = {};\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tif (filter && !filter(ev.id, ev))\r\n\t\t\t\tcontinue;\r\n\t\t\tvar d = ev.start_date;\r\n\t\t\tif (d.valueOf() < start.valueOf())\r\n\t\t\t\td = start;\r\n\t\t\td = scheduler.date.date_part(new Date(d.valueOf()));\r\n\t\t\twhile (d < ev.end_date) {\r\n\t\t\t\tif(!markedDates[+d]) {\r\n\t\t\t\t\tmarkedDates[+d] = true;\r\n\t\t\t\t\tthis.markCalendar(cal, d, \"dhx_year_event\");\r\n\t\t\t\t}\r\n\t\t\t\td = this.date.add(d, 1, \"day\");\r\n\t\t\t\tif (d.valueOf() >= end.valueOf())\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tthis._markCalendarCurrentDate(cal);\r\n\r\n\tcal.conf = obj;\r\n\tif (obj.sync && !is_refresh)\r\n\t\tthis._synced_minicalendars.push(cal);\r\n\r\n\tif(!cal.conf._on_xle_handler){\r\n\t\tcal.conf._on_xle_handler = scheduler.attachEvent(\"onXLE\", function refreshOnLoad(){\r\n\t\t\tscheduler.updateCalendar(cal, cal.conf.date);\r\n\t\t});\r\n\t}\r\n\r\n\tif(this.config.wai_aria_attributes && this.config.wai_aria_application_role){\r\n\t\tcal.setAttribute(\"role\", \"application\");\r\n\t}\r\n\r\n\treturn cal;\r\n};\r\nscheduler._get_def_cont = function(pos) {\r\n\tif (!this._def_count) {\r\n\t\tthis._def_count = document.createElement(\"div\");\r\n\t\tthis._def_count.className = \"dhx_minical_popup\";\r\n\t\tscheduler.event(this._def_count, \"click\", function(e) { e.cancelBubble = true; });\r\n\t\tdocument.body.appendChild(this._def_count);\r\n\t}\r\n\r\n\tif(pos.left){\r\n\t\tthis._def_count.style.left = pos.left + \"px\";\r\n\t}\r\n\tif(pos.right){\r\n\t\tthis._def_count.style.right = pos.right + \"px\";\r\n\t}\r\n\tif(pos.top){\r\n\t\tthis._def_count.style.top = pos.top + \"px\";\r\n\t}\r\n\tif(pos.bottom){\r\n\t\tthis._def_count.style.bottom = pos.bottom + \"px\";\r\n\t}\r\n\r\n\tthis._def_count._created = new Date();\r\n\r\n\treturn this._def_count;\r\n};\r\nscheduler._locateCalendar = function(cal, date) {\r\n\tif (typeof date == \"string\")\r\n\t\tdate = scheduler.templates.api_date(date);\r\n\r\n\tif(+date > +cal._max_date || +date < +cal._min_date)\r\n\t\treturn null;\r\n\r\n\tvar table = cal.querySelector(\".dhx_year_body\").childNodes[0];\r\n\r\n\tvar weekNum = 0;\r\n\tvar dat = new Date(cal._min_date);\r\n\twhile(+this.date.add(dat, 1, \"week\") <= +date){\r\n\t\tdat = this.date.add(dat, 1, \"week\");\r\n\t\tweekNum++;\r\n\t}\r\n\r\n\tvar sm = scheduler.config.start_on_monday;\r\n\tvar day = (date.getDay() || (sm ? 7 : 0)) - (sm ? 1 : 0);\r\n\r\n\tconst dayCell = table.querySelector(`.dhx_cal_month_row:nth-child(${weekNum + 1}) .dhx_cal_month_cell:nth-child(${day + 1})`);\r\n\tif(dayCell) {\r\n\t\treturn dayCell.firstChild;\r\n\t} else {\r\n\t\treturn null;\r\n\t}\r\n};\r\nscheduler.markCalendar = function(cal, date, css) {\r\n\tvar div = this._locateCalendar(cal, date);\r\n\tif(!div)\r\n\t\treturn;\r\n\r\n\tdiv.className += \" \" + css;\r\n};\r\nscheduler.unmarkCalendar = function(cal, date, css) {\r\n\tdate = date || cal._last_date;\r\n\tcss = css || \"dhx_calendar_click\";\r\n\tif (!date) return;\r\n\tvar el = this._locateCalendar(cal, date);\r\n\tif(!el)\r\n\t\treturn;\r\n\tel.className = (el.className || \"\").replace(RegExp(css, \"g\"));\r\n};\r\nscheduler._week_template = function(width) {\r\n\tvar summ = (width || 250);\r\n\tvar left = 0;\r\n\r\n\tvar week_template = document.createElement(\"div\");\r\n\tvar dummy_date = this.date.week_start(scheduler._currentDate());\r\n\tfor (var i = 0; i < 7; i++) {\r\n\t\tthis._cols[i] = Math.floor(summ / (7 - i));\r\n\t\tthis._render_x_header(i, left, dummy_date, week_template);\r\n\t\tdummy_date = this.date.add(dummy_date, 1, \"day\");\r\n\t\tsumm -= this._cols[i];\r\n\t\tleft += this._cols[i];\r\n\t}\r\n\tweek_template.lastChild.className += \" dhx_scale_bar_last\";\r\n\treturn week_template;\r\n};\r\nscheduler.updateCalendar = function(obj, sd) {\r\n\tobj.conf.date = sd;\r\n\tthis.renderCalendar(obj.conf, obj, true);\r\n};\r\nscheduler._mini_cal_arrows = [\" \", \" \"];\r\nscheduler._render_calendar = function(obj, sd, conf, previous) {\r\n\t/*store*/\r\n\tvar ts = scheduler.templates;\r\n\tvar temp = this._cols;\r\n\tthis._cols = [];\r\n\tvar temp2 = this._mode;\r\n\tthis._mode = \"calendar\";\r\n\tvar temp3 = this._colsS;\r\n\tthis._colsS = {height: 0};\r\n\tvar temp4 = new Date(this._min_date);\r\n\tvar temp5 = new Date(this._max_date);\r\n\tvar temp6 = new Date(scheduler._date);\r\n\tvar temp7 = ts.month_day;\r\n\tvar temp8 = this._ignores_detected; this._ignores_detected = 0;\r\n\tts.month_day = ts.calendar_date;\r\n\r\n\tsd = this.date.month_start(sd);\r\n\tvar week_template = this._week_template(obj.offsetWidth - 1 - this.config.minicalendar.padding );\r\n\r\n\tvar d;\r\n\tif (previous){\r\n\t\td = previous;\r\n\t} else {\r\n\t\td = document.createElement(\"div\");\r\n\t\td.className = \"dhx_cal_container dhx_mini_calendar\";\r\n\t}\r\n\td.setAttribute(\"date\", this._helpers.formatDate(sd));\r\n\td.innerHTML = \"
\" +\r\n\t\t\t\"
\" : \"'>\") +\r\n\t\t\t\"
\"+(week_template ? week_template.innerHTML : \"\")+\"
\" +\r\n\t\t\t\"
\" +\r\n\t\t\"
\";\r\n\tvar header = d.querySelector(\".dhx_year_month\");\r\n\tvar weekHeader = d.querySelector(\".dhx_year_week\");\r\n\tvar body = d.querySelector(\".dhx_year_body\");\r\n\r\n\theader.innerHTML = this.templates.calendar_month(sd);\r\n\tif (conf.navigation) {\r\n\t\tvar move_minicalendar_date = function(calendar, diff) {\r\n\t\t\tvar date = scheduler.date.add(calendar._date, diff, \"month\");\r\n\t\t\tscheduler.updateCalendar(calendar, date);\r\n\t\t\tif (scheduler._date.getMonth() == calendar._date.getMonth() && scheduler._date.getFullYear() == calendar._date.getFullYear()) {\r\n\t\t\t\tscheduler._markCalendarCurrentDate(calendar);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tvar css_classnames = [\"dhx_cal_prev_button\", \"dhx_cal_next_button\"];\r\n\t\tvar css_texts = [\"left:1px;top:4px;position:absolute;\", \"left:auto; right:1px;top:4px;position:absolute;\"];\r\n\t\tvar diffs = [-1, 1];\r\n\t\tvar handler = function(diff) {\r\n\t\t\treturn function() {\t\r\n\t\t\t\tif (conf.sync) {\r\n\t\t\t\t\tvar calendars = scheduler._synced_minicalendars;\r\n\t\t\t\t\tfor (var k = 0; k < calendars.length; k++) {\r\n\t\t\t\t\t\tmove_minicalendar_date(calendars[k], diff);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (scheduler.config.rtl) {\r\n\t\t\t\t\t\tdiff = -diff;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmove_minicalendar_date(d, diff);\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t};\r\n\t\tvar labels = [scheduler.locale.labels.prev, scheduler.locale.labels.next];\r\n\t\tfor (var j = 0; j < 2; j++) {\r\n\t\t\tvar arrow = document.createElement(\"div\");\r\n\t\t\t//var diff = diffs[j];\r\n\t\t\tarrow.className = css_classnames[j];\r\n\r\n\t\t\tscheduler._waiAria.headerButtonsAttributes(arrow, labels[j]);\r\n\r\n\t\t\tarrow.style.cssText = css_texts[j];\r\n\t\t\tarrow.innerHTML = this._mini_cal_arrows[j];\r\n\t\t\theader.appendChild(arrow);\r\n\t\t\tminicalDomEvents.attach(arrow, \"click\", handler(diffs[j]));\r\n\t\t}\r\n\t}\r\n\td._date = new Date(sd);\r\n\r\n\td.week_start = (sd.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) % 7;\r\n\r\n\tvar dd = d._min_date = this.date.week_start(sd);\r\n\td._max_date = this.date.add(d._min_date, 6, \"week\");\r\n\r\n\tthis._reset_month_scale(body, sd, dd, 6);\r\n\r\n\tif (!previous)\r\n\t\tobj.appendChild(d);\r\n\r\n\tweekHeader.style.height = (weekHeader.childNodes[0].offsetHeight - 1) + \"px\"; // dhx_year_week should have height property so that day dates would get correct position. dhx_year_week height = height of it's child (with the day name)\r\n\r\n\tvar headerId = scheduler.uid();\r\n\tscheduler._waiAria.minicalHeader(header, headerId);\r\n\tscheduler._waiAria.minicalGrid(d.querySelector(\".dhx_year_grid\"), headerId);\r\n\tscheduler._waiAria.minicalRow(weekHeader);\r\n\r\n\tvar dayHeaders = weekHeader.querySelectorAll(\".dhx_scale_bar\");\r\n\tfor(var i = 0; i < dayHeaders.length; i++){\r\n\t\tscheduler._waiAria.minicalHeadCell(dayHeaders[i]);\r\n\t}\r\n\tvar dayCells = body.querySelectorAll(\".dhx_cal_month_cell\");\r\n\tvar firstDate = new Date(dd);\r\n\tfor(var i = 0; i < dayCells.length; i++){\r\n\r\n\t\tscheduler._waiAria.minicalDayCell(dayCells[i], new Date(firstDate));\r\n\t\tfirstDate = scheduler.date.add(firstDate, 1, \"day\");\r\n\t}\r\n\r\n\tscheduler._waiAria.minicalHeader(header, headerId);\r\n\r\n\t/*restore*/\r\n\tthis._cols = temp;\r\n\tthis._mode = temp2;\r\n\tthis._colsS = temp3;\r\n\tthis._min_date = temp4;\r\n\tthis._max_date = temp5;\r\n\tscheduler._date = temp6;\r\n\tts.month_day = temp7;\r\n\tthis._ignores_detected = temp8;\r\n\treturn d;\r\n};\r\nscheduler.destroyCalendar = function(cal, force) {\r\n\tif (!cal && this._def_count && this._def_count.firstChild) {\r\n\t\tif (force || (new Date()).valueOf() - this._def_count._created.valueOf() > 500)\r\n\t\t\tcal = this._def_count.firstChild;\r\n\t}\r\n\tif (!cal) return;\r\n\tminicalDomEvents.detachAll();\r\n\t//cal.onclick = null;\r\n\tcal.innerHTML = \"\";\r\n\tif (cal.parentNode)\r\n\t\tcal.parentNode.removeChild(cal);\r\n\tif (this._def_count)\r\n\t\tthis._def_count.style.top = \"-1000px\";\r\n\r\n\tif(cal.conf && cal.conf._on_xle_handler)\r\n\t\tscheduler.detachEvent(cal.conf._on_xle_handler);\r\n};\r\nscheduler.isCalendarVisible = function() {\r\n\tif (this._def_count && parseInt(this._def_count.style.top, 10) > 0)\r\n\t\treturn this._def_count;\r\n\treturn false;\r\n};\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tscheduler.event(document.body, \"click\", function() { scheduler.destroyCalendar(); });\r\n}, {once: true});\r\n\r\n\r\n\r\nscheduler.form_blocks.calendar_time = {\r\n\trender: function(sns) {\r\n\t\tvar html = \"\";\r\n\r\n\t\tvar cfg = scheduler.config;\r\n\t\tvar dt = this.date.date_part(scheduler._currentDate());\r\n\r\n\t\tvar last = 24 * 60, first = 0;\r\n\t\tif (cfg.limit_time_select) {\r\n\t\t\tfirst = 60 * cfg.first_hour;\r\n\t\t\tlast = 60 * cfg.last_hour + 1; // to include \"17:00\" option if time select is limited\r\n\t\t}\r\n\t\tdt.setHours(first / 60);\r\n\r\n\t\tsns._time_values = [];\r\n\t\thtml += \" \";\r\n\r\n\t\t//var full_day = scheduler.config.full_day;\r\n\r\n\t\treturn \"
\" + html + \"  –  \" + html + \"
\";\r\n\t},\r\n\tset_value: function(node, value, ev, config) {\r\n\r\n\t\tvar inputs = node.getElementsByTagName(\"input\");\r\n\t\tvar selects = node.getElementsByTagName(\"select\");\r\n\t\tvar start_date,\r\n\t\t\tend_date;\r\n\r\n\t\tvar _init_once = function(inp, date, number) {\r\n\t\t\tscheduler.event(inp, \"click\", function() {\r\n\t\t\t\tscheduler.destroyCalendar(null, true);\r\n\t\t\t\tscheduler.renderCalendar({\r\n\t\t\t\t\tposition: inp,\r\n\t\t\t\t\tdate: new Date(this._date),\r\n\t\t\t\t\tnavigation: true,\r\n\t\t\t\t\thandler: function(new_date) {\r\n\t\t\t\t\t\tinp.value = scheduler.templates.calendar_time(new_date);\r\n\t\t\t\t\t\tinp._date = new Date(new_date);\r\n\t\t\t\t\t\tscheduler.destroyCalendar();\r\n\t\t\t\t\t\tif (scheduler.config.event_duration && scheduler.config.auto_end_date && number === 0) { //first element = start date\r\n\t\t\t\t\t\t\t_update_minical_select();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t};\r\n\r\n\t\tif (scheduler.config.full_day) {\r\n\t\t\tif (!node._full_day) {\r\n\t\t\t\tvar html = \"\";\r\n\t\t\t\tif (!scheduler.config.wide_form)\r\n\t\t\t\t\thtml = node.previousSibling.innerHTML + html;\r\n\t\t\t\tnode.previousSibling.innerHTML = html;\r\n\t\t\t\tnode._full_day = true;\r\n\t\t\t}\r\n\t\t\tvar input = node.previousSibling.getElementsByTagName(\"input\")[0];\r\n\r\n\t\t\tvar isFulldayEvent = (scheduler.date.time_part(ev.start_date) === 0 && scheduler.date.time_part(ev.end_date) === 0);\r\n\t\t\tinput.checked = isFulldayEvent;\r\n\r\n\t\t\tselects[0].disabled = input.checked;\r\n\t\t\tselects[1].disabled = input.checked;\r\n\r\n\t\t\tif (!input.$_eventAttached) {\r\n\t\t\t\tinput.$_eventAttached = true;\r\n\t\t\t\tscheduler.event(input, \"click\", function() {\r\n\t\t\t\t\tif (input.checked === true) {\r\n\t\t\t\t\t\tvar obj = {};\r\n\t\t\t\t\t\tscheduler.form_blocks.calendar_time.get_value(node, obj);\r\n\r\n\t\t\t\t\t\tstart_date = scheduler.date.date_part(obj.start_date);\r\n\t\t\t\t\t\tend_date = scheduler.date.date_part(obj.end_date);\r\n\r\n\t\t\t\t\t\tif (+end_date == +start_date || (+end_date >= +start_date && (ev.end_date.getHours() !== 0 || ev.end_date.getMinutes() !== 0)))\r\n\t\t\t\t\t\t\tend_date = scheduler.date.add(end_date, 1, \"day\");\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tvar start = start_date || ev.start_date;\r\n\t\t\t\t\tvar end = end_date || ev.end_date;\r\n\t\t\t\t\t_attach_action(inputs[0], start);\r\n\t\t\t\t\t_attach_action(inputs[1], end);\r\n\t\t\t\t\tselects[0].value = start.getHours() * 60 + start.getMinutes();\r\n\t\t\t\t\tselects[1].value = end.getHours() * 60 + end.getMinutes();\r\n\r\n\t\t\t\t\tselects[0].disabled = input.checked;\r\n\t\t\t\t\tselects[1].disabled = input.checked;\r\n\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (scheduler.config.event_duration && scheduler.config.auto_end_date) {\r\n\r\n\t\t\tvar _update_minical_select = function () {\r\n\t\t\t\tif (!(scheduler.config.auto_end_date && scheduler.config.event_duration)){\r\n\t\t\t\t\t// setting may be disabled after the handler is attached\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tstart_date = scheduler.date.add(inputs[0]._date, selects[0].value, \"minute\");\r\n\t\t\t\tend_date = new Date(start_date.getTime() + (scheduler.config.event_duration * 60 * 1000));\r\n\r\n\t\t\t\tinputs[1].value = scheduler.templates.calendar_time(end_date);\r\n\t\t\t\tinputs[1]._date = scheduler.date.date_part(new Date(end_date));\r\n\r\n\t\t\t\tselects[1].value = end_date.getHours() * 60 + end_date.getMinutes();\r\n\t\t\t};\r\n\r\n\t\t\tif(!selects[0].$_eventAttached){\r\n\t\t\t\tselects[0].addEventListener(\"change\", _update_minical_select); // only update on first select should trigger update so user could define other end date if he wishes too\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction _attach_action(inp, date, number) {\r\n\t\t\t_init_once(inp, date, number);\r\n\t\t\tinp.value = scheduler.templates.calendar_time(date);\r\n\t\t\tinp._date = scheduler.date.date_part(new Date(date));\r\n\t\t}\r\n\r\n\t\t_attach_action(inputs[0], ev.start_date, 0);\r\n\t\t_attach_action(inputs[1], ev.end_date, 1);\r\n\t\t_init_once = function() {};\r\n\r\n\t\tfunction _round_minutes(date) {\r\n\t\t\tvar time_values = config._time_values;\r\n\t\t\tvar direct_value = date.getHours() * 60 + date.getMinutes();\r\n\t\t\tvar fixed_value = direct_value;\r\n\t\t\tvar value_found = false;\r\n\r\n\t\t\tfor (var k = 0; k < time_values.length; k++) {\r\n\t\t\t\tvar t_v = time_values[k];\r\n\t\t\t\tif (t_v === direct_value) {\r\n\t\t\t\t\tvalue_found = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif (t_v < direct_value)\r\n\t\t\t\t\tfixed_value = t_v;\r\n\t\t\t}\r\n\r\n\t\t\tif(!(value_found || fixed_value))\r\n\t\t\t\treturn -1;\r\n\r\n\t\t\treturn (value_found) ? direct_value : fixed_value;\r\n\t\t}\r\n\r\n\t\tselects[0].value = _round_minutes(ev.start_date);\r\n\t\tselects[1].value = _round_minutes(ev.end_date);\r\n\r\n\t},\r\n\tget_value: function(node, ev) {\r\n\t\tvar inputs = node.getElementsByTagName(\"input\");\r\n\t\tvar selects = node.getElementsByTagName(\"select\");\r\n\r\n\t\tev.start_date = scheduler.date.add(inputs[0]._date, selects[0].value, \"minute\");\r\n\t\tev.end_date = scheduler.date.add(inputs[1]._date, selects[1].value, \"minute\");\r\n\r\n\t\tif (ev.end_date <= ev.start_date)\r\n\t\t\tev.end_date = scheduler.date.add(ev.start_date, scheduler.config.time_step, \"minute\");\r\n\t\treturn {\r\n\t\t\tstart_date: new Date(ev.start_date),\r\n\t\t\tend_date: new Date(ev.end_date)\r\n\t\t};\r\n\t},\r\n\tfocus: function(node) {\r\n\t}\r\n};\r\nscheduler.linkCalendar = function(calendar, datediff) {\r\n\tvar action = function() {\r\n\t\tvar date = scheduler._date;\r\n\t\tvar dateNew = new Date(date.valueOf());\r\n\t\tif (datediff) dateNew = datediff(dateNew);\r\n\t\tdateNew.setDate(1);\r\n\t\tscheduler.updateCalendar(calendar, dateNew);\r\n\t\treturn true;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", action);\r\n\tscheduler.attachEvent(\"onXLE\", action);\r\n\tscheduler.attachEvent(\"onEventAdded\", action);\r\n\tscheduler.attachEvent(\"onEventChanged\", action);\r\n\tscheduler.attachEvent(\"onEventDeleted\", action);\r\n\taction();\r\n};\r\n\r\nscheduler._markCalendarCurrentDate = function(calendar) {\r\n\tvar state = scheduler.getState();\r\n\tvar from = state.min_date;\r\n\tvar to = state.max_date;\r\n\tvar mode = state.mode;\r\n\r\n\tvar month_start = scheduler.date.month_start(new Date(calendar._date));\r\n\tvar month_end = scheduler.date.add(month_start, 1, \"month\");\r\n\r\n\tvar noHighlight = {\r\n\t\t\"month\":true,\r\n\t\t\"year\":true,\r\n\t\t\"agenda\":true,\r\n\t\t\"grid\":true\r\n\t};\r\n\t// no need to highlight current dates for a large range views - agenda, year, etc.\r\n\tif(noHighlight[mode] || (from.valueOf() <= month_start.valueOf() && to.valueOf() >= month_end.valueOf())){\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar current = from;\r\n\twhile(current.valueOf() < to.valueOf()){\r\n\t\tif (month_start.valueOf() <= current.valueOf() && month_end > current) {\r\n\t\t\tscheduler.markCalendar(calendar, current, \"dhx_calendar_click\");\r\n\t\t}\r\n\t\tcurrent = scheduler.date.add(current, 1, \"day\");\r\n\t}\r\n};\r\n\r\nscheduler.attachEvent(\"onEventCancel\", function(){\r\n\tscheduler.destroyCalendar(null, true);\r\n});\r\n\r\nscheduler.attachEvent(\"onDestroy\", function(){\r\n\tscheduler.destroyCalendar();\r\n});\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\tscheduler.xy.scroll_width = 0;\r\n\r\n\tvar old = scheduler.render_view_data;\r\n\tscheduler.render_view_data=function(){\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\t\tdata.firstChild._h_fix = true;\r\n\r\n\t\told.apply(scheduler,arguments);\r\n\r\n\r\n\r\n\t\tvar height = parseInt(data.style.height);\r\n\t\tdata.style.height=\"1px\";\r\n\t\tdata.style.height=data.scrollHeight+\"px\";\r\n\r\n\t\tthis._obj.style.height = this._obj.clientHeight + data.scrollHeight - height + \"px\";\r\n\t};\r\n\r\n\tvar old_s=scheduler._reset_month_scale;\r\n\tscheduler._reset_month_scale=function(a,b,c,d){\r\n\t\tvar dummy = {clientHeight:100};\r\n\t\told_s.apply(scheduler,[dummy,b,c,d]);\r\n\t\ta.innerHTML = dummy.innerHTML;\r\n\t};\r\n\r\n});\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Multisection\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\n\r\nfunction parseXMLOptions(loader, config){\r\n\tvar items = scheduler.ajax.xpath(\"//data/item\", loader.xmlDoc);\r\n\tvar ids = {};\r\n\tfor (var i = 0; i < items.length; i++) {\r\n\t\tids[items[i].getAttribute(config.map_to)] = true;\r\n\t}\r\n\treturn ids;\r\n}\r\n\r\nfunction parseJSONOptions(loader, config){\r\n\ttry{\r\n\t\tvar items = JSON.parse(loader.xmlDoc.responseText);\r\n\t\tvar ids = {};\r\n\t\tfor (var i = 0; i < items.length; i++) {\r\n\t\t\tvar option = items[i];\r\n\r\n\t\t\tids[option.value || option.key || option.id] = true;\r\n\t\t}\r\n\t\treturn ids;\r\n\t}catch(e){\r\n\t\treturn null;\r\n\t}\r\n}\r\n\r\nscheduler.form_blocks[\"multiselect\"]={\r\n\trender:function(sns) {\r\n\t\tvar css = \"dhx_multi_select_control dhx_multi_select_\"+sns.name;\r\n\t\tif(!!sns.vertical){\r\n\t\t\tcss += \" dhx_multi_select_control_vertical\";\r\n\t\t}\r\n\r\n\t\tvar _result = \"
\";\r\n\t\tfor (var i=0; i\"+sns.options[i].label+\"\";\r\n\t\t}\r\n\t\t_result += \"
\";\r\n\t\treturn _result;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\r\n\t\tvar _children = node.getElementsByTagName('input');\r\n\t\tfor(var i=0;i<_children.length;i++) {\r\n\t\t\t_children[i].checked = false; //unchecking all inputs on the form\r\n\t\t}\r\n\r\n\t\tfunction _mark_inputs(ids) { // ids = [ 0: undefined, 1: undefined, 2: true, 'custom_name': false ... ]\r\n\t\t\tvar _children = node.getElementsByTagName('input');\r\n\t\t\tfor(var i=0;i<_children.length; i++) {\r\n\t\t\t\t_children[i].checked = !! ids[_children[i].value];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar _ids = {};\r\n\t\tif (ev[config.map_to]) {\r\n\t\t\tvar results = (ev[config.map_to] + \"\").split(config.delimiter || scheduler.config.section_delimiter || \",\");\r\n\t\t\tfor (var i = 0; i < results.length; i++) {\r\n\t\t\t\t_ids[results[i]] = true;\r\n\t\t\t}\r\n\t\t\t_mark_inputs(_ids);\r\n\t\t} else {\r\n\t\t\tif (scheduler._new_event || !config.script_url)\r\n\t\t\t\treturn;\r\n\t\t\tvar divLoading = document.createElement('div');\r\n\t\t\tdivLoading.className = 'dhx_loading';\r\n\t\t\tdivLoading.style.cssText = \"position: absolute; top: 40%; left: 40%;\";\r\n\t\t\tnode.appendChild(divLoading);\r\n\r\n\t\t\tvar url = [\r\n\t\t\t\tconfig.script_url,\r\n\t\t\t\t(config.script_url.indexOf(\"?\") == -1 ? \"?\" : \"&\"),\r\n\t\t\t\t'dhx_crosslink_' + config.map_to + '=' + ev.id + '&uid=' + scheduler.uid()\r\n\t\t\t].join(\"\");\r\n\r\n\t\t\tscheduler.ajax.get(url, function(loader) {\r\n\t\t\t\tvar options = parseJSONOptions(loader, config);\r\n\t\t\t\tif(!options){\r\n\t\t\t\t\toptions = parseXMLOptions(loader, config);\r\n\t\t\t\t}\r\n\t\t\t\t_mark_inputs(options);\r\n\t\t\t\tnode.removeChild(divLoading);\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tvar _result = [];\r\n\t\tvar _children = node.getElementsByTagName(\"input\");\r\n\t\tfor(var i=0;i<_children.length;i++) {\r\n\t\t\tif(_children[i].checked)\r\n\t\t\t\t_result.push(_children[i].value);\r\n\t\t}\r\n\t\treturn _result.join(config.delimiter || scheduler.config.section_delimiter || \",\");\r\n\t},\r\n\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\r\n\tfunction backup(obj){\r\n\t\tvar t = function(){};\r\n\t\tt.prototype = obj;\r\n\t\treturn t;\r\n\t}\r\n\r\n\tvar old = scheduler._load;\r\n\tscheduler._load=function(url,from){\r\n\t\turl=url||this._load_url;\r\n\t\tif (typeof url == \"object\"){\r\n\t\t\tvar t = backup(this._loaded);\r\n\t\t\tfor (var i=0; i < url.length; i++) {\r\n\t\t\t\tthis._loaded=new t();\r\n\t\t\t\told.call(this,url[i],from);\r\n\t\t\t}\r\n\t\t} else\r\n\t\t\told.apply(this,arguments);\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\t/* global Backbone */\r\n\tvar cfg = {\r\n\t\tuse_id : false\r\n\t};\r\n\r\n\t//remove private properties\r\n\tfunction sanitize(ev){\r\n\t\tvar obj = {};\r\n\t\tfor (var key in ev)\r\n\t\t\tif (key.indexOf(\"_\") !== 0)\r\n\t\t\t\tobj[key] = ev[key];\r\n\r\n\t\tif (!cfg.use_id)\r\n\t\t\tdelete obj.id;\r\n\r\n\t\treturn obj;\r\n\t}\r\n\r\n\tvar update_timer;\r\n\tfunction update_view(){\r\n\t\tclearTimeout(update_timer);\r\n\t\tupdate_timer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler.updateView();\r\n\t\t},1);\r\n\t}\r\n\r\n\tfunction _start_ext_load(cal){\r\n\t\tcal._loading = true;\r\n\t\tcal._not_render = true;\r\n\r\n\t\tcal.callEvent(\"onXLS\", []);\r\n\t}\r\n\tfunction _finish_ext_load(cal){\r\n\t\tcal._not_render = false;\r\n\t\tif (cal._render_wait)\r\n\t\t\tcal.render_view_data();\r\n\t\tcal._loading = false;\r\n\r\n\t\tcal.callEvent(\"onXLE\", []);\r\n\t}\r\n\r\n\r\n\tfunction _get_id(model){\r\n\t\treturn cfg.use_id ? model.id : model.cid;\r\n\t}\r\n\r\nscheduler.backbone = function(events, config){\r\n\tif (config) cfg = config;\r\n\r\n\tevents.bind(\"change\", function(model, info){\r\n\t\tvar cid = _get_id(model);\r\n\t\tvar ev = scheduler._events[cid] = model.toJSON();\r\n\t\tev.id = cid;\r\n\r\n\t\tscheduler._init_event(ev);\r\n\t\tupdate_view();\r\n\t});\r\n\tevents.bind(\"remove\", function(model, changes){\r\n\t\tvar cid = _get_id(model);\r\n\t\tif (scheduler._events[cid])\r\n\t\t\tscheduler.deleteEvent(cid);\r\n\t});\r\n\r\n\tvar queue = [];\r\n\tfunction add_from_queue(){\r\n\t\tif(scheduler.$destroyed){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (queue.length){\r\n\t\t\tscheduler.parse(queue, \"json\");\r\n\t\t\tqueue = [];\r\n\t\t}\r\n\t}\r\n\r\n\tevents.bind(\"add\", function(model, changes){\r\n\t\tvar cid = _get_id(model);\r\n\t\tif (!scheduler._events[cid]){\r\n\t\t\tvar ev = model.toJSON();\r\n\t\t\tev.id = cid;\r\n\t\t\tscheduler._init_event(ev);\r\n\r\n\t\t\tqueue.push(ev);\r\n\t\t\tif (queue.length == 1)\r\n\t\t\t\tsetTimeout(add_from_queue,1);\r\n\t\t}\r\n\t});\r\n\r\n\tevents.bind(\"request\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_start_ext_load(scheduler);\r\n\t});\r\n\tevents.bind(\"sync\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_finish_ext_load(scheduler);\r\n\t});\r\n\tevents.bind(\"error\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_finish_ext_load(scheduler);\r\n\t});\r\n\r\n\r\n\tscheduler.attachEvent(\"onEventCreated\", function(id){\r\n\t\tvar ev = new events.model(scheduler.getEvent(id));\r\n\t\tscheduler._events[id] = ev.toJSON();\r\n\t\tscheduler._events[id].id = id;\r\n\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onEventAdded\", function(id){\r\n\t\tif (!events.get(id)){\r\n\t\t\tvar data = sanitize(scheduler.getEvent(id));\r\n\t\t\tvar model = new events.model(data);\r\n\r\n\t\t\tvar cid = _get_id(model);\r\n\t\t\tif (cid != id)\r\n\t\t\t\tthis.changeEventId(id, cid);\r\n\t\t\tevents.add(model);\r\n\t\t\tevents.trigger(\"scheduler:add\", model);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventChanged\", function(id){\r\n\t\tvar ev = events.get(id);\r\n\t\tvar upd = sanitize(scheduler.getEvent(id));\r\n\r\n\t\tev.set(upd);\r\n\t\tevents.trigger(\"scheduler:change\", ev);\r\n\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventDeleted\", function(id){\r\n\t\tvar model = events.get(id);\r\n\t\tif (model){\r\n\t\t\tevents.trigger(\"scheduler:remove\", model);\r\n\t\t\tevents.remove(id);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\t/* global dhtmlDragAndDropObject, dhtmlx */\r\n// lame old code doesn't provide raw event object\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\t\tvar dragger = (new dhtmlDragAndDropObject());\r\n\t\tvar old = dragger.stopDrag;\r\n\t\tvar last_event;\r\n\t\tdragger.stopDrag = function(e) {\r\n\t\t\tlast_event = e;\r\n\t\t\treturn old.apply(this, arguments);\r\n\t\t};\r\n\r\n\t\tfunction on_drop(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml) {\r\n\r\n\t\t\tif (scheduler.checkEvent(\"onBeforeExternalDragIn\") && !scheduler.callEvent(\"onBeforeExternalDragIn\", [sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml, last_event]))\r\n\t\t\t\treturn;\r\n\r\n\t\t\tvar temp = scheduler.attachEvent(\"onEventCreated\", function (id) {\r\n\t\t\t\tif (!scheduler.callEvent(\"onExternalDragIn\", [id, sourceHtmlObject, last_event])) {\r\n\t\t\t\t\tthis._drag_mode = this._drag_id = null;\r\n\t\t\t\t\tthis.deleteEvent(id);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tvar action_data = scheduler.getActionData(last_event);\r\n\t\t\tvar event_data = {\r\n\t\t\t\tstart_date: new Date(action_data.date)\r\n\t\t\t};\r\n\r\n\t\t\t// custom views, need to assign section id, fix dates\r\n\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\tvar view_options = scheduler.matrix[scheduler._mode];\r\n\t\t\t\tevent_data[view_options.y_property] = action_data.section;\r\n\r\n\t\t\t\tvar pos = scheduler._locate_cell_timeline(last_event);\r\n\t\t\t\tevent_data.start_date = view_options._trace_x[pos.x];\r\n\t\t\t\tevent_data.end_date = scheduler.date.add(event_data.start_date, view_options.x_step, view_options.x_unit);\r\n\t\t\t}\r\n\t\t\tif (scheduler._props && scheduler._props[scheduler._mode]) {\r\n\t\t\t\tevent_data[scheduler._props[scheduler._mode].map_to] = action_data.section;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler.addEventNow(event_data);\r\n\r\n\t\t\tscheduler.detachEvent(temp);\r\n\t\t}\r\n\r\n\t\tdragger.addDragLanding(scheduler._els[\"dhx_cal_data\"][0], {\r\n\t\t\t_drag: function(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml) {\r\n\t\t\t\ton_drop(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml);\r\n\t\t\t},\r\n\t\t\t_dragIn: function(htmlObject, shtmlObject) {\r\n\t\t\t\treturn htmlObject;\r\n\t\t\t},\r\n\t\t\t_dragOut: function(htmlObject) {\r\n\t\t\t\treturn this;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(dhtmlx.DragControl) {\r\n\t\t\tdhtmlx.DragControl.addDrop(scheduler._els[\"dhx_cal_data\"][0], {\r\n\t\t\t\tonDrop: function (source, target, d, e) {\r\n\t\t\t\t\tvar sourceDhtmlx = dhtmlx.DragControl.getMaster(source);\r\n\t\t\t\t\tlast_event = e;\r\n\t\t\t\t\ton_drop(source, sourceDhtmlx, target, e.target || e.srcElement);\r\n\t\t\t\t},\r\n\r\n\t\t\t\tonDragIn: function (source, target, e) {\r\n\t\t\t\t\treturn target;\r\n\t\t\t\t}\r\n\t\t\t}, true);\r\n\t\t}\r\n\t});\r\n\r\n}","export default function(scheduler){\r\n\r\n\tvar dx, dy,\r\n\t\thtml_regexp = new RegExp(\"<[^>]*>\", \"g\"),\r\n\t\tnewline_regexp = new RegExp(\"]*>\", \"g\");\r\n\r\n\tfunction clean_html(val) {\r\n\t\treturn val.replace(newline_regexp, \"\\n\").replace(html_regexp, \"\");\r\n\t}\r\n\r\n\tfunction x_norm(x, offset) {\r\n\t\tx = parseFloat(x);\r\n\t\toffset = parseFloat(offset);\r\n\t\tif (!isNaN(offset)) x -= offset;\r\n\r\n\t\tvar w = colsWidth(x);\r\n\t\tx = x - w.width + w.cols*dx;\r\n\t\treturn isNaN(x)?\"auto\":(100*x/(dx));\r\n\t}\r\n\r\n\tfunction x_norm_event(x, offset, is_left) {\r\n\t\tx = parseFloat(x);\r\n\t\toffset = parseFloat(offset);\r\n\t\tif (!isNaN(offset) && is_left) x -= offset;\r\n\r\n\t\tvar w = colsWidth(x);\r\n\t\tx = x - w.width + w.cols*dx;\r\n\t\treturn isNaN(x)?\"auto\":(100*x/(dx-(!isNaN(offset)?offset:0)));\r\n\t}\r\n\tfunction colsWidth(width) {\r\n\t\tvar r = 0;\r\n\t\tvar header = scheduler._els.dhx_cal_header[0].childNodes;\r\n\t\tvar els = header[1] ? header[1].childNodes : header[0].childNodes;\r\n\t\tfor (var i = 0; i < els.length; i++) {\r\n\t\t\tvar el = els[i].style ? els[i] : els[i].parentNode;\r\n\t\t\tvar w = parseFloat(el.style.width);\r\n\t\t\tif (width > w){\r\n\t\t\t\twidth -= (w+1);\r\n\t\t\t\tr+=(w+1);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\treturn { width: r, cols: i };\r\n\t}\r\n\r\n\tfunction y_norm(y) {\r\n\t\ty = parseFloat(y);\r\n\t\tif (isNaN(y)) return \"auto\";\r\n\t\treturn 100 * y / dy;\r\n\t}\r\n\r\n\tfunction get_style(node, style){\r\n\t\treturn (window.getComputedStyle?(window.getComputedStyle(node, null)[style]):(node.currentStyle?node.currentStyle[style]:null))||\"\";\r\n\t}\r\n\r\n\tfunction de_day(node, n) {\r\n\t\tvar x = parseInt(node.style.left, 10);\r\n\r\n\t\tfor (var dx = 0; dx < scheduler._cols.length; dx++) {\r\n\t\t\tx -= scheduler._cols[dx];\r\n\t\t\tif (x < 0) return dx;\r\n\t\t}\r\n\t\treturn n;\r\n\t}\r\n\r\n\tfunction de_week(node, n) {\r\n\t\tvar y = parseInt(node.style.top, 10);\r\n\t\tfor (var dy = 0; dy < scheduler._colsS.heights.length; dy++)\r\n\t\t\tif (scheduler._colsS.heights[dy] > y) return dy;\r\n\t\treturn n;\r\n\t}\r\n\r\n\tfunction xml_start(tag) {\r\n\t\treturn tag ? \"<\"+tag+\">\" : \"\";\r\n\t}\r\n\tfunction xml_end(tag) {\r\n\t\treturn tag ? \"\" : \"\";\r\n\t}\r\n\r\n\tfunction xml_top(tag, profile, header, footer) {\r\n\t\tvar xml = \"<\"+tag+\" profile='\" + profile + \"'\";\r\n\t\tif (header)\r\n\t\t\txml += \" header='\" + header + \"'\";\r\n\t\tif (footer)\r\n\t\t\txml += \" footer='\" + footer + \"'\";\r\n\t\txml += \">\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_body_header() {\r\n\t\tvar xml = \"\";\r\n\t\t// detects if current mode is timeline\r\n\t\tvar mode = scheduler._mode;\r\n\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode])\r\n\t\t\tmode = (scheduler.matrix[scheduler._mode].render == \"cell\") ? \"matrix\" : \"timeline\";\r\n\t\txml += \"\";\r\n\r\n\t\tif (scheduler._mode == \"week_agenda\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_data[0].getElementsByTagName(\"DIV\");\r\n\t\t\tfor (var i = 0; i < xh.length; i++)\r\n\t\t\t\tif (xh[i].className == \"dhx_wa_scale_bar\")\r\n\t\t\t\t\txml += \"\" + clean_html(xh[i].innerHTML) + \"\";\r\n\t\t} else if (scheduler._mode == \"agenda\" || scheduler._mode == \"map\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_header[0].childNodes[0].childNodes;\r\n\r\n\t\t\txml += \"\" + clean_html(xh[0].innerHTML) + \"\" + clean_html(xh[1].innerHTML) + \"\";\r\n\t\t} else if (scheduler._mode == \"year\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_data[0].childNodes;\r\n\t\t\tfor (var i = 0; i < xh.length; i++) {\r\n\t\t\t\txml += \"\";\r\n\t\t\t\txml += xml_month_scale(xh[i].querySelector(\".dhx_year_week\").childNodes);\r\n\t\t\t\txml += xml_month(xh[i].querySelector(\".dhx_year_body\"));\r\n\t\t\t\txml += \"\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\txml += \"\";\r\n\t\t\tvar xh = scheduler._els.dhx_cal_header[0].childNodes;\r\n\t\t\txml += xml_month_scale(xh);\r\n\t\t\txml += \"\";\r\n\r\n\t\t\tvar yh = scheduler._els.dhx_cal_data[0];\r\n\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tfor (var i = 0; i < yh.firstChild.rows.length; i++) {\r\n\t\t\t\t\tvar el = yh.firstChild.rows[i];\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t}\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tdy = yh.firstChild.rows[0].cells[0].offsetHeight;\r\n\t\t\t} else if (yh.firstChild.tagName == \"TABLE\") {\r\n\t\t\t\txml += xml_month(yh);\r\n\t\t\t} else {\r\n\t\t\t\tyh = yh.childNodes[yh.childNodes.length - 1];\r\n\t\t\t\twhile (yh.className.indexOf(\"dhx_scale_holder\") == -1)\r\n\t\t\t\t\tyh = yh.previousSibling;\r\n\t\t\t\tyh = yh.childNodes;\r\n\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tfor (var i = 0; i < yh.length; i++)\r\n\t\t\t\t\txml += \"\\n\";\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tdy = yh[0].offsetHeight;\r\n\t\t\t}\r\n\t\t}\r\n\t\txml += \"\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_month(yh) {\r\n\t\tvar xml = \"\";\r\n\t\tvar r = yh.querySelectorAll(\"tr\");\r\n\t\tfor (var i = 0; i < r.length; i++) {\r\n\t\t\tvar days = [];\r\n\t\t\tvar cells = r[i].querySelectorAll(\"td\");\r\n\r\n\t\t\tfor (var j = 0; j < cells.length; j++)\r\n\t\t\t\tdays.push(cells[j].querySelector(\".dhx_month_head\").innerHTML);\r\n\r\n\t\t\txml += \"\\n\";\r\n\t\t\tdy = cells[0].offsetHeight;\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_month_scale(xh) {\r\n\t\tvar xhs,\r\n\t\t\txml = \"\";\r\n\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\tif (scheduler.matrix[scheduler._mode].second_scale)\r\n\t\t\t\txhs = xh[1].childNodes;\r\n\r\n\t\t\txh = xh[0].childNodes;\r\n\t\t}\r\n\r\n\t\tfor (var i = 0; i < xh.length; i++)\r\n\t\t\txml += \"\\n\";\r\n\t\tdx = xh[0].offsetWidth;\r\n\r\n\t\tif (xhs) {\r\n\t\t\tvar width = 0;\r\n\t\t\tvar top_width = xh[0].offsetWidth;\r\n\t\t\tvar top_col = 1;\r\n\t\t\tfor (var i = 0; i < xhs.length; i++) {\r\n\t\t\t\txml += \"\\n\";\r\n\t\t\t\twidth += xhs[i].offsetWidth;\r\n\t\t\t\tif (width >= top_width) {\r\n\t\t\t\t\ttop_width += (xh[top_col] ? xh[top_col].offsetWidth : 0);\r\n\t\t\t\t\ttop_col++;\r\n\t\t\t\t}\r\n\t\t\t\tdx = xhs[0].offsetWidth;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_body(colors) {\r\n\t\tvar xml = \"\";\r\n\t\tvar evs = scheduler._rendered;\r\n\t\tvar matrix = scheduler.matrix && scheduler.matrix[scheduler._mode];\r\n\r\n\t\tif (scheduler._mode == \"agenda\" || scheduler._mode == \"map\") {\r\n\r\n\t\t\tfor (var i = 0; i < evs.length; i++)\r\n xml += \"\";\r\n\r\n\t\t} else if (scheduler._mode == \"week_agenda\") {\r\n\r\n\t\t\tfor (var i = 0; i < evs.length; i++)\r\n\t\t\t\txml += \"\" + clean_html(evs[i].innerHTML) + \"\";\r\n\r\n\t\t} else if (scheduler._mode == \"year\") {\r\n\r\n\t\t\tvar evs = scheduler.get_visible_events();\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar d = evs[i].start_date;\r\n\t\t\t\tif (d.valueOf() < scheduler._min_date.valueOf())\r\n\t\t\t\t\td = scheduler._min_date;\r\n\r\n\t\t\t\twhile (d < evs[i].end_date) {\r\n\t\t\t\t\tvar m = d.getMonth() + 12 * (d.getFullYear() - scheduler._min_date.getFullYear()) - scheduler.week_starts._month;\r\n\t\t\t\t\tvar day = scheduler.week_starts[m] + d.getDate() - 1;\r\n\t\t\t\t\tvar text_color = colors ? get_style(scheduler._get_year_cell(d), \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(scheduler._get_year_cell(d), \"backgroundColor\") : \"\";\r\n\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t\td = scheduler.date.add(d, 1, \"day\");\r\n\t\t\t\t\tif (d.valueOf() >= scheduler._max_date.valueOf())\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (matrix && matrix.render == \"cell\") {\r\n\t\t\tvar evs = scheduler._els.dhx_cal_data[0].getElementsByTagName(\"TD\");\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar text_color = colors ? get_style(evs[i], \"color\") : \"\";\r\n\t\t\t\tvar bg_color = colors ? get_style(evs[i], \"backgroundColor\") : \"\";\r\n\t\t\t\txml += \"\\n\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar zx, zdx;\r\n\t\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\t\t// logic for timeline view\r\n\t\t\t\t\tzx = x_norm(evs[i].style.left);\r\n\t\t\t\t\tzdx = x_norm(evs[i].offsetWidth)-1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// we should use specific logic for day/week/units view\r\n\t\t\t\t\tvar left_norm = scheduler.config.use_select_menu_space ? 0 : 26;\r\n\t\t\t\t\tzx = x_norm_event(evs[i].style.left, left_norm, true);\r\n\t\t\t\t\tzdx = x_norm_event(evs[i].style.width, left_norm)-1;\r\n\t\t\t\t}\r\n\t\t\t\tif (isNaN(zdx * 1)) continue;\r\n\t\t\t\tvar zy = y_norm(evs[i].style.top);\r\n\t\t\t\tvar zdy = y_norm(evs[i].style.height);\r\n\r\n\t\t\t\tvar e_type = evs[i].className.split(\" \")[0].replace(\"dhx_cal_\", \"\");\r\n\t\t\t\tif (e_type === 'dhx_tooltip_line') continue;\r\n\r\n\t\t\t\tvar dets = scheduler.getEvent(evs[i].getAttribute(scheduler.config.event_attribute));\r\n if (!dets) continue;\r\n\t\t\t\tvar day = dets._sday;\r\n\t\t\t\tvar week = dets._sweek;\r\n\t\t\t\tvar length = dets._length || 0;\r\n\r\n\t\t\t\tif (scheduler._mode == \"month\") {\r\n\t\t\t\t\tzdy = parseInt(evs[i].offsetHeight, 10);\r\n\t\t\t\t\tzy = parseInt(evs[i].style.top, 10) - scheduler.xy.month_head_height;\r\n\r\n\t\t\t\t\tday = de_day(evs[i], day);\r\n\t\t\t\t\tweek = de_week(evs[i], week);\r\n\t\t\t\t} else if (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\t\tday = 0;\r\n\t\t\t\t\tvar el = evs[i].parentNode.parentNode.parentNode;\r\n\t\t\t\t\tweek = el.rowIndex;\r\n\t\t\t\t\tvar dy_copy = dy;\r\n\t\t\t\t\tdy = evs[i].parentNode.offsetHeight;\r\n\t\t\t\t\tzy = y_norm(evs[i].style.top);\r\n\t\t\t\t\tzy -= zy * 0.2;\r\n\t\t\t\t\tdy = dy_copy;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (evs[i].parentNode == scheduler._els.dhx_cal_data[0]) continue;\r\n\t\t\t\t\tvar parent = scheduler._els[\"dhx_cal_data\"][0].childNodes[0];\r\n\t\t\t\t\tvar offset = parseFloat(parent.className.indexOf(\"dhx_scale_holder\") != -1 ? parent.style.left : 0);\r\n\t\t\t\t\tzx += x_norm(evs[i].parentNode.style.left, offset);\r\n\t\t\t\t}\r\n\r\n\t\t\t\txml += \"\\n\";\r\n\r\n\t\t\t\tif (e_type == \"event\") {\r\n\t\t\t\t\txml += \"
\";\r\n\t\t\t\t\tvar text_color = colors ? get_style(evs[i].childNodes[2], \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(evs[i].childNodes[2], \"backgroundColor\") : \"\";\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvar text_color = colors ? get_style(evs[i], \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(evs[i], \"backgroundColor\") : \"\";\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t}\r\n\t\t\t\txml += \"
\";\r\n\t\t\t}\r\n\t\t\t}\r\n\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction toXML(start, end, view, mode, header, footer){\r\n\t\tvar colors = false;\r\n\t\tif (mode == \"fullcolor\") {\r\n\t\t\tcolors = true;\r\n\t\t\tmode = \"color\";\r\n\t\t}\r\n\r\n\t\tmode = mode || \"color\";\r\n\r\n\t\tvar xml = \"\";\r\n\t\tif (start) {\r\n\r\n\t\t\tvar original_date = scheduler._date;\r\n\t\t\tvar original_mode = scheduler._mode;\r\n\t\t\tend = scheduler.date[view+\"_start\"](end);\r\n\t\t\tend = scheduler.date[\"get_\"+view+\"_end\"] ? scheduler.date[\"get_\"+view+\"_end\"](end) : scheduler.date.add(end, 1, view);\r\n\r\n\t\t\txml = xml_top(\"pages\", mode, header, footer);\r\n\t\t\tfor (var temp_date = new Date(start); +temp_date < +end; temp_date = this.date.add(temp_date, 1, view)) {\r\n\t\t\t\tthis.setCurrentView(temp_date, view);\r\n\t\t\t\txml += xml_start(\"page\") + xml_body_header().replace(\"\\u2013\", \"-\") + xml_body(colors) + xml_end(\"page\");\r\n\t\t\t}\r\n\t\t\txml += xml_end(\"pages\");\r\n\r\n\t\t\tthis.setCurrentView(original_date, original_mode);\r\n\t\t} else {\r\n\t\t\txml = xml_top(\"data\", mode, header, footer) + xml_body_header().replace(\"\\u2013\", \"-\") + xml_body(colors) + xml_end(\"data\");\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\tscheduler.getPDFData = toXML;\r\n\tfunction send_xml(xml, url){\r\n\t\tvar uid = scheduler.uid();\r\n\t\tvar d = document.createElement(\"div\");\r\n\t\td.style.display = \"none\";\r\n\t\tdocument.body.appendChild(d);\r\n\r\n\t\td.innerHTML = '
';\r\n\t\tdocument.getElementById(uid).firstChild.value = encodeURIComponent(xml);\r\n\t\tdocument.getElementById(uid).submit();\r\n\t\td.parentNode.removeChild(d);\r\n\t}\r\n\r\n\tfunction to_pdf(start, end, view, url, mode, header, footer) {\r\n\t\tvar xml = \"\";\r\n\t\tif(typeof mode == \"object\"){\r\n\t\t\txml = schedulersToPdf(mode);\r\n\t\t}else{\r\n\t\t\txml = toXML.apply(this, [start, end, view, mode, header, footer]);\r\n\t\t}\r\n\r\n\t\tsend_xml(xml, url);\r\n\t}\r\n\r\n\tfunction schedulersToPdf(objects){\r\n\t\tvar xml = \"\";\r\n\t\tfor(var i=0; i < objects.length; i++){\r\n\t\t\txml += objects[i].source.getPDFData(objects[i].start, objects[i].end, objects[i].view, objects[i].mode, objects[i].header, objects[i].footer);\r\n\t\t}\r\n\t\txml += \"\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\t/*\r\n\t * scheduler.toPDF(url, mode, header, footer) - for a single scheduler\r\n\t * scheduler.toPDF(url, [scheduler1, scheduler2,...]) - for multiple schedulers\r\n\t * example:\r\n\t * scheduler.toPDF(\"generate.ashx\", [\r\n\t * { source: scheduler1, mode: \"color\" },\r\n\t * { source: scheduler2, mode: \"gray\", view:\"week\", start:new Date(2013, 06, 1), end:new Date(2013, 06, 28) },\r\n\t * { source: scheduler3 }\r\n\t * ]);\r\n\t *\r\n\t */\r\n\tscheduler.toPDF = function(url, mode, header, footer) {\r\n\t\treturn to_pdf.apply(this, [null, null, null, url, mode, header, footer]);\r\n\t};\r\n\tscheduler.toPDFRange = function(start, end, view, url, mode, header, footer) {\r\n\t\tif (typeof start == \"string\") {\r\n\t\t\tstart = scheduler.templates.api_date(start);\r\n\t\t\tend = scheduler.templates.api_date(end);\r\n\t\t}\r\n\r\n\t\treturn to_pdf.apply(this, arguments);\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.icons_select = [\"icon_form\", \"icon_delete\"];\r\nscheduler.config.details_on_create = true;\r\nscheduler.config.show_quick_info = true;\r\nscheduler.xy.menu_width = 0;\r\n\r\nscheduler.attachEvent(\"onClick\", function(id){\r\n\tif(!scheduler.config.show_quick_info){\r\n\t\treturn;\r\n\t}\r\n\tscheduler.showQuickInfo(id);\r\n\treturn true;\r\n});\r\n\r\n(function(){\r\n\t// pass `force` argument in order to hide quick info synchronously\r\n\t// so it won't affect showQuickInfo call that can follow\r\n\tvar events = [\"onEmptyClick\", \"onViewChange\", \"onLightbox\", \"onBeforeEventDelete\", \"onBeforeDrag\"];\r\n\tvar hiding_function = function(){\r\n\t\tscheduler.hideQuickInfo(true);\r\n\t\treturn true;\r\n\t};\r\n\tfor (var i=0; i window.innerWidth){\r\n\t\t\tleft = window.innerWidth - width;\r\n\t\t}\r\n\t\tleft = Math.max(0, left);\r\n\r\n\t\tqi.style.left = left + \"px\";\r\n\t\tqi.style.top = pos.top - (pos.dy?height:-pos.height) + \"px\";\r\n\t} else {\r\n\r\n\t\tconst dataPos = scheduler.$container.querySelector('.dhx_cal_data').offsetTop;\r\n\t\tqi.style.top = dataPos + 20 + \"px\";\r\n\t\tif (pos.dx == 1){\r\n\t\t\tqi.style.right = \"auto\";\r\n\t\t\tqi.style.left = -width + \"px\";\r\n\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tqi.style.left = \"-10px\";\r\n\t\t\t},1);\r\n\t\t} else {\r\n\t\t\tqi.style.left = \"auto\";\r\n\t\t\tqi.style.right = -width + \"px\";\r\n\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tqi.style.right = \"-10px\";\r\n\t\t\t},1);\r\n\t\t}\r\n\t\tqi.className = qi.className.replace(\" dhx_qi_left\",\"\").replace(\" dhx_qi_right\",\"\")+\" dhx_qi_\"+(pos.dx==1?\"left\":\"right\");\r\n\t}\r\n};\r\nscheduler.attachEvent(\"onTemplatesReady\", function(){\r\n\tscheduler.hideQuickInfo();\r\n\tif(this._quick_info_box){\r\n\t\tvar box = this._quick_info_box;\r\n\t\tif(box.parentNode){\r\n\t\t\tbox.parentNode.removeChild(box);\r\n\t\t}\r\n\t\tthis._quick_info_box = null;\r\n\t}\r\n});\r\nscheduler._quick_info_onscroll_handler = function(e){\r\n\tscheduler.hideQuickInfo();\r\n};\r\nscheduler._init_quick_info = function(){\r\n\tif (!this._quick_info_box){\r\n\r\n\r\n\t\tvar qi = this._quick_info_box = document.createElement(\"div\");\r\n\r\n\t\tthis._waiAria.quickInfoAttr(qi);\r\n\r\n\t\tqi.className = \"dhx_cal_quick_info\";\r\n\t\tif (scheduler.$testmode)\r\n\t\t\tqi.className += \" dhx_no_animate\";\r\n\t\tif (scheduler.config.rtl) qi.className += \" dhx_quick_info_rtl\";\r\n\t//title\r\n\t\tvar ariaAttr = this._waiAria.quickInfoHeaderAttrString();\r\n\t\tvar html = `\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t\t
\r\n\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t\t
`;\r\n\r\n\t//buttons\r\n\t\thtml += \"
\";\r\n\t\tvar buttons = scheduler.config.icons_select;\r\n\t\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\t\tvar ariaAttr = this._waiAria.quickInfoButtonAttrString(this.locale.labels[buttons[i]]);\r\n\t\t\t\thtml += `
\r\n\t\t\t\t
${scheduler.locale.labels[buttons[i]]}
`;\r\n\t\t\t}\r\n\t\t// }\r\n\t\thtml += \"
\";\r\n\r\n\t\tqi.innerHTML = html;\r\n\t\tscheduler.event(qi, \"click\", function(ev){\r\n\t\t\tscheduler._qi_button_click(ev.target || ev.srcElement);\r\n\t\t});\r\n\t\tif (scheduler.config.quick_info_detached){\r\n\t\t\tscheduler._detachDomEvent(scheduler._els[\"dhx_cal_data\"][0], \"scroll\", scheduler._quick_info_onscroll_handler);\r\n\t\t\tscheduler.event(scheduler._els[\"dhx_cal_data\"][0], \"scroll\", scheduler._quick_info_onscroll_handler);\r\n\t\t}\r\n\t}\r\n\r\n\treturn this._quick_info_box;\r\n};\r\n\r\nscheduler._qi_button_click = function(node){\r\n\tvar box = scheduler._quick_info_box;\r\n\tif (!node || node == box) return;\r\n\r\n\tif(node.closest(\".dhx_cal_qi_close_btn\")){\r\n\t\tscheduler.hideQuickInfo();\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar mask = scheduler._getClassName(node);\r\n\tif (mask.indexOf(\"_icon\")!=-1){\r\n\t\tvar id = scheduler._quick_info_box_id;\r\n\t\tscheduler._click.buttons[mask.split(\" \")[1].replace(\"icon_\",\"\")](id);\r\n\t} else\r\n\t\tscheduler._qi_button_click(node.parentNode);\r\n};\r\nscheduler._get_event_counter_part = function(id){\r\n\tvar domEv = scheduler.getRenderedEvent(id);\r\n\tvar left = 0;\r\n\tvar top = 0;\r\n\r\n\tvar node = domEv;\r\n\twhile (node && node != scheduler._obj){\r\n\t\tleft += node.offsetLeft;\r\n\t\ttop += node.offsetTop-node.scrollTop;\r\n\t\tnode = node.offsetParent;\r\n\t}\r\n\tif(node){\r\n\t\tvar dx = (left + domEv.offsetWidth/2) > (scheduler._x/2) ? 1 : 0;\r\n\t\tvar dy = (top + domEv.offsetHeight/2) > (scheduler._y/2) ? 1 : 0;\r\n\r\n\t\treturn { left:left, top:top, dx:dx, dy:dy,\r\n\t\t\twidth:domEv.offsetWidth, height:domEv.offsetHeight };\r\n\t}\r\n\treturn 0;\r\n};\r\n\r\nscheduler._fill_quick_data = function(id){\r\n\tvar ev = scheduler.getEvent(id);\r\n\tvar qi = scheduler._quick_info_box;\r\n\r\n\tscheduler._quick_info_box_id = id;\r\n\r\n//title content\r\n\r\n\tvar header = {\r\n\t\tcontent: scheduler.templates.quick_info_title(ev.start_date, ev.end_date, ev),\r\n\t\tdate: scheduler.templates.quick_info_date(ev.start_date, ev.end_date, ev)\r\n\t};\r\n\tvar titleContent = qi.querySelector(\".dhx_cal_qi_tcontent\");\r\n\ttitleContent.innerHTML = `${header.content}`;\r\n\tvar titleDate = qi.querySelector(\".dhx_cal_qi_tdate\");\r\n\ttitleDate.innerHTML = header.date;\r\n\r\n\tscheduler._waiAria.quickInfoHeader(qi, [header.content, header.date].join(\" \"));\r\n\r\n//main content\r\n\tvar main = qi.querySelector(\".dhx_cal_qi_content\");\r\n\tconst mainContent = scheduler.templates.quick_info_content(ev.start_date, ev.end_date, ev);\r\n\tif(mainContent){\r\n\t\tmain.classList.remove(\"dhx_hidden\");\r\n\t\tmain.innerHTML = mainContent;\r\n\t}else{\r\n\t\tmain.classList.add(\"dhx_hidden\");\r\n\t}\r\n};\r\n\r\n\r\n}","export default function(scheduler){\r\n\t\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar originalRecurringSetValue;\r\n\tif (scheduler.form_blocks.recurring) {\r\n\t\toriginalRecurringSetValue = scheduler.form_blocks.recurring.set_value;\r\n\t}\r\n\tvar original_left_buttons = scheduler.config.buttons_left.slice();\r\n\tvar original_right_buttons = scheduler.config.buttons_right.slice();\r\n\r\n\tscheduler.attachEvent(\"onBeforeLightbox\", function(id) {\r\n\t\tif (this.config.readonly_form || this.getEvent(id).readonly) {\r\n\t\t\tthis.config.readonly_active = true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.config.readonly_active = false;\r\n\t\t\tscheduler.config.buttons_left = original_left_buttons.slice();\r\n\t\t\tscheduler.config.buttons_right = original_right_buttons.slice();\r\n\t\r\n\t\t\t// initial value\r\n\t\t\tif(scheduler.form_blocks.recurring) {\r\n\t\t\t\tscheduler.form_blocks.recurring.set_value = originalRecurringSetValue;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar sns = this.config.lightbox.sections;\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\tfor (var i = 0; i < sns.length; i++) {\r\n\t\t\t\tif (sns[i].type == 'recurring') {\r\n\t\t\t\t\tif (this.config.readonly_active && scheduler.form_blocks.recurring) {\r\n\t\t\t\t\t\tscheduler.form_blocks.recurring.set_value = function(node, value, ev) {\r\n\t\t\t\t\t\t\tvar wrapper = scheduler.$domHelpers.closest(node, \".dhx_wrap_section\");\r\n\t\t\t\t\t\t\tvar style = \"none\";\r\n\t\t\t\t\t\t\twrapper.querySelector('.dhx_cal_lsection').display = style;\r\n\t\t\t\t\t\t\twrapper.querySelector('.dhx_form_repeat').display = style;\r\n\t\t\t\t\t\t\twrapper.style.display = style;\r\n\r\n\t\t\t\t\t\t\tscheduler.setLightboxSize();\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar forbidden_buttons = [\"dhx_delete_btn\", \"dhx_save_btn\"];\r\n\t\t\tvar button_arrays = [scheduler.config.buttons_left, scheduler.config.buttons_right];\r\n\t\t\tfor (var i = 0; i < forbidden_buttons.length; i++) {\r\n\t\t\t\tvar forbidden_button = forbidden_buttons[i];\r\n\t\t\t\tfor (var k = 0; k < button_arrays.length; k++) {\r\n\t\t\t\t\tvar button_array = button_arrays[k];\r\n\t\t\t\t\tvar index = -1;\r\n\t\t\t\t\tfor (var p = 0; p < button_array.length; p++) {\r\n\t\t\t\t\t\tif (button_array[p] == forbidden_button) {\r\n\t\t\t\t\t\t\tindex = p;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (index != -1) {\r\n\t\t\t\t\t\tbutton_array.splice(index, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.resetLightbox();\r\n\r\n\t\treturn true;\r\n\t});\r\n\r\n\tfunction txt_replace(tag, d, n, text) {\r\n\t\tvar txts = d.getElementsByTagName(tag);\r\n\t\tvar txtt = n.getElementsByTagName(tag);\r\n\t\tfor (var i = txtt.length - 1; i >= 0; i--) {\r\n\t\t\tvar n = txtt[i];\r\n\t\t\tif (!text){\r\n\t\t\t\tn.disabled = true;\r\n\t\t\t\t//radio and checkboxes loses state after .cloneNode in IE\r\n\t\t\t\tif(d.checked)\r\n\t\t\t\t\tn.checked = true;\r\n\t\t\t}else {\r\n\t\t\t\tvar t = document.createElement(\"span\");\r\n\t\t\t\tt.className = \"dhx_text_disabled\";\r\n\t\t\t\tt.innerHTML = text(txts[i]);\r\n\t\t\t\tn.parentNode.insertBefore(t, n);\r\n\t\t\t\tn.parentNode.removeChild(n);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tvar old = scheduler._fill_lightbox;\r\n\tscheduler._fill_lightbox = function() {\r\n\r\n\t\tvar lb = this.getLightbox();\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\tlb.style.visibility = 'hidden';\r\n\t\t\t// lightbox should have actual sizes before rendering controls\r\n\t\t\t// currently only matters for dhtmlxCombo\r\n\t\t\tlb.style.display = 'block';\r\n\t\t}\r\n\t\tvar res = old.apply(this, arguments);\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\t//reset visibility and display\r\n\t\t\tlb.style.visibility = '';\r\n\t\t\tlb.style.display = 'none';\r\n\t\t}\r\n\r\n\t\tif (this.config.readonly_active) {\r\n\r\n\t\t\tvar originalForm = this.getLightbox();\r\n\t\t\tvar readonlyForm = this._lightbox_r = originalForm.cloneNode(true);\r\n\t\t\treadonlyForm.id = scheduler.uid();\r\n\t\t\treadonlyForm.className += \" dhx_cal_light_readonly\";\r\n\t\t\ttxt_replace(\"textarea\", originalForm, readonlyForm, function(a) {\r\n\t\t\t\treturn a.value;\r\n\t\t\t});\r\n\t\t\ttxt_replace(\"input\", originalForm, readonlyForm, false);\r\n\t\t\ttxt_replace(\"select\", originalForm, readonlyForm, function(a) {\r\n\t\t\t\tif(!a.options.length) return \"\";\r\n\t\t\t\treturn a.options[Math.max((a.selectedIndex || 0), 0)].text;\r\n\t\t\t});\r\n\r\n\t\t\toriginalForm.parentNode.insertBefore(readonlyForm, originalForm);\r\n\r\n\t\t\tthis.showCover(readonlyForm);\r\n\t\t\tif (scheduler._lightbox)\r\n\t\t\t\tscheduler._lightbox.parentNode.removeChild(scheduler._lightbox);\r\n\t\t\tthis._lightbox = readonlyForm;\r\n\r\n\t\t\tif (scheduler.config.drag_lightbox)\r\n\t\t\t\tscheduler.event(readonlyForm.firstChild, \"mousedown\", scheduler._ready_to_dnd);\r\n\t\t\t\t\r\n\t\t\tscheduler._init_lightbox_events();\r\n\t\t\tthis.setLightboxSize();\r\n\t\t}\r\n\t\treturn res;\r\n\t};\r\n\r\n\tvar hold = scheduler.hide_lightbox;\r\n\tscheduler.hide_lightbox = function() {\r\n\t\tif (this._lightbox_r) {\r\n\t\t\tthis._lightbox_r.parentNode.removeChild(this._lightbox_r);\r\n\t\t\tthis._lightbox_r = this._lightbox = null;\r\n\t\t}\r\n\r\n\t\treturn hold.apply(this, arguments);\r\n\t};\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.occurrence_timestamp_in_utc = false;\r\nscheduler.config.recurring_workdays = [1,2,3,4,5];\r\nscheduler.form_blocks[\"recurring\"] = {\r\n\t_get_node : function(node){\r\n\t\tif (typeof node == \"string\"){\r\n\t\t\tlet element = scheduler._lightbox.querySelector(`#${node}`);\r\n\t\t\tif(!element){\r\n\t\t\t\t// form is detached from lightbox \r\n\t\t\t\t// search globally, won't work in LWC\r\n\t\t\t\telement = document.getElementById(node);\r\n\t\t\t}\r\n\t\t\tnode = element;\r\n\t\t}\r\n\t\tif (node.style.display == 'none')\r\n\t\t\tnode.style.display = \"\";\r\n\t\treturn node;\r\n\t},\r\n\t_outer_html: function(node){\r\n\t\treturn node.outerHTML || getOuterHTML(node);\r\n\r\n\t\t//probably not needed, FF v10- only\r\n\t\tfunction getOuterHTML(n){\r\n\t\t\tvar div = document.createElement('div'), h;\r\n\t\t\tdiv.appendChild( n.cloneNode(true) );\r\n\t\t\th = div.innerHTML;\r\n\t\t\tdiv = null;\r\n\t\t\treturn h;\r\n\t\t}\r\n\t},\r\n\trender:function(sns) {\r\n\t\tif(sns.form){\r\n\t\t\tvar rec = scheduler.form_blocks[\"recurring\"];\r\n\t\t\tvar form = rec._get_node(sns.form);\r\n\t\t\tvar html = rec._outer_html(form);\r\n\t\t\tform.style.display = 'none';\r\n\t\t\treturn html;\r\n\t\t}\r\n\t\tvar loc = scheduler.locale.labels;\r\n\t\treturn '
'+\r\n\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t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r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t'
'+\r\n\t\t\t\t'
'+\r\n\t\t\t\t'';\r\n\t},\r\n\t_ds: {},\r\n\t_get_form_node: function(els, name, value){\r\n\t\tvar col = els[name];\r\n\t\tif(!col) return null;\r\n\t\tif(col.nodeName) return col;\r\n\r\n\t\tif(col.length){\r\n\t\t\tfor(var i=0; i < col.length; i++){\r\n\t\t\t\tif(col[i].value == value)\r\n\t\t\t\t\treturn col[i];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\t_get_node_value: function(els, name, multiselect){\r\n\t\tvar col = els[name];\r\n\t\tif(!col) return \"\";\r\n\t\tif(col.length){\r\n\t\t\tif(multiselect){\r\n\t\t\t\tvar res = [];\r\n\t\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\t\tif (col[i].checked) res.push(col[i].value);\r\n\r\n\t\t\t\treturn res;\r\n\t\t\t}else{\r\n\t\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\t\tif (col[i].checked) return col[i].value;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(col.value)\r\n\t\t\treturn !multiselect ? col.value : [col.value];\r\n\t},\r\n\r\n\t_get_node_numeric_value: function(els, name){\r\n\t\tvar value = scheduler.form_blocks[\"recurring\"]._get_node_value(els, name);\r\n\t\treturn ((value * 1) || 0);\r\n\t},\r\n\r\n\t_set_node_value: function(els, name, value){\r\n\t\tvar col = els[name];\r\n\t\tif(!col) return;\r\n\r\n\t\tif(col.name == name){\r\n\t\t\tcol.value = value;\r\n\t\t}else if(col.length){\r\n\t\t\tvar hash_value = typeof value == \"object\";\r\n\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\tif (hash_value || col[i].value == value){\r\n\t\t\t\t\tcol[i].checked = hash_value ? !!value[col[i].value] : !!value;\r\n\t\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t_init_set_value:function(node, value, ev) {\r\n\t\tvar block = scheduler.form_blocks[\"recurring\"];\r\n\t\tvar get_value = block._get_node_value;\r\n\t\tvar set_value = block._set_node_value;\r\n\t\tscheduler.form_blocks[\"recurring\"]._ds = {start:ev.start_date, end:ev._end_date};\r\n\r\n\t\tvar str_date_format = scheduler.date.str_to_date(scheduler.config.repeat_date, false, true);\r\n\t\tvar str_date = function(str_date) {\r\n\t\t\tvar date = str_date_format(str_date);\r\n\t\t\tif (scheduler.config.include_end_by)\r\n\t\t\t\tdate = scheduler.date.add(date, 1, 'day');\r\n\t\t\treturn date;\r\n\t\t};\r\n\r\n\t\tvar date_str = scheduler.date.date_to_str(scheduler.config.repeat_date);\r\n\r\n\t\tvar top = node.getElementsByTagName(\"FORM\")[0];\r\n\t\tvar els = {};\r\n\r\n\t\tfunction register_els(inps) {\r\n\t\t\tfor (var i = 0; i < inps.length; i++) {\r\n\t\t\t\tvar inp = inps[i];\r\n\r\n\t\t\t\tif(inp.name){\r\n\t\t\t\t\tif(!els[inp.name]){\r\n\t\t\t\t\t\tels[inp.name] = inp;\r\n\t\t\t\t\t}else if(els[inp.name].nodeType){\r\n\t\t\t\t\t\tvar node = els[inp.name];\r\n\t\t\t\t\t\tels[inp.name] = [node, inp];\r\n\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tels[inp.name].push(inp);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tregister_els(top.getElementsByTagName(\"INPUT\"));\r\n\t\tregister_els(top.getElementsByTagName(\"SELECT\"));\r\n\r\n\t\tif (!scheduler.config.repeat_date_of_end) {\r\n\t\t\tvar formatter = scheduler.date.date_to_str(scheduler.config.repeat_date);\r\n\t\t\tscheduler.config.repeat_date_of_end = formatter(scheduler.date.add(scheduler._currentDate(), 30, \"day\"));\r\n\t\t}\r\n\t\tset_value(els, \"date_of_end\", scheduler.config.repeat_date_of_end);\r\n\r\n\t\tvar $ = function(a) {\r\n\t\t\treturn scheduler._lightbox.querySelector(`#${a}`) || { style:{} };//return fake object if node not found\r\n\t\t};\r\n\r\n\t\tfunction change_current_view() {\r\n\t\t\t$(\"dhx_repeat_day\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_week\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_month\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_year\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_\" + this.value).style.display = \"\";\r\n\t\t\tscheduler.setLightboxSize();\r\n\t\t}\r\n\r\n\t\tfunction get_repeat_code(dates) {\r\n\t\t\tvar code = [get_value(els, \"repeat\")];\r\n\t\t\tget_rcode[code[0]](code, dates);\r\n\r\n\t\t\twhile (code.length < 5) code.push(\"\");\r\n\t\t\tvar repeat = \"\";\r\n\r\n\t\t\tvar end = get_end_rule(els);\r\n\r\n\t\t\tif (end == \"no\") {\r\n\t\t\t\tdates.end = new Date(9999, 1, 1);\r\n\t\t\t\trepeat = \"no\";\r\n\t\t\t}\r\n\t\t\telse if (end == \"date_of_end\") {\r\n\t\t\t\tdates.end = str_date(get_value(els, \"date_of_end\"));\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tscheduler.transpose_type(code.join(\"_\"));\r\n\t\t\t\trepeat = Math.max(1, get_value(els, \"occurences_count\"));\r\n\r\n\t\t\t\tvar transp = 0;\r\n\r\n\t\t\t\t//var transp = ((code[0] == \"week\" && code[4] && code[4].toString().indexOf(scheduler.config.start_on_monday ? 1 : 0) == -1) ? 1 : 0);\r\n\r\n\t\t\t\t// which is equal to following code, seems to produce extra instance, not clear why needed\r\n\r\n\t\t\t\t/*if(code[0] == \"week\"){\r\n\t\t\t\t\tvar days = code[4] || \"\";\r\n\t\t\t\t\tif(scheduler.config.start_on_monday){\r\n\t\t\t\t\t\tif(days.indexOf(1) == -1)\r\n\t\t\t\t\t\ttransp = 1;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(days.indexOf(0) == -1)\r\n\t\t\t\t\t\ttransp = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}*/\r\n\r\n\t\t\t//\tdates.end = scheduler.date.add(new Date(dates.start), repeat + transp, code.join(\"_\"));\r\n\r\n\t\t\t\tdates.end = scheduler.date[\"add_\" + code.join(\"_\")](new Date(dates.start), repeat + transp, {start_date: dates.start}) || dates.start;\r\n\t\t\t}\r\n\r\n\t\t\treturn code.join(\"_\") + \"#\" + repeat;\r\n\t\t}\r\n\t\tfunction get_end_rule(els){\r\n\t\t\tvar end = els[\"end\"];\r\n\t\t\tif(end.length){\r\n\t\t\t\tfor(var i =0; i < end.length; i++){\r\n\t\t\t\t\tif(end[i].checked){\r\n\t\t\t\t\t\tif(end[i].value && end[i].value != \"on\"){//seems to be default value:var input = document.createElement(\"input\"); input.type = \"radio\"; input.value\r\n\t\t\t\t\t\t\treturn end[i].value;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tif(!i){\r\n\t\t\t\t\t\t\t\treturn \"no\";\r\n\t\t\t\t\t\t\t}else if(i == 2){\r\n\t\t\t\t\t\t\t\treturn \"date_of_end\";\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\treturn \"occurences_count\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(end.value)\r\n\t\t\t\t\treturn end.value;\r\n\t\t\t}\r\n\t\t\treturn \"no\";\r\n\t\t}\r\n\t\tfunction set_end_rule(els, value){\r\n\t\t\tvar end = els[\"end\"];\r\n\r\n\t\t\tif(end.length){\r\n\t\t\t\tvar has_values = !!end[0].value && end[0].value != \"on\";\r\n\t\t\t\tif(has_values){\r\n\t\t\t\t\tfor(var i =0; i < end.length; i++){\r\n\t\t\t\t\t\tif(end[i].value == value)\r\n\t\t\t\t\t\t\tend[i].checked = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar ind = 0;\r\n\t\t\t\t\tswitch(value){\r\n\t\t\t\t\t\tcase \"no\":\r\n\t\t\t\t\t\t\tind = 0;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"date_of_end\":\r\n\t\t\t\t\t\t\tind = 2;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tind = 1;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend[ind].checked = true;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tend.value = value;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tscheduler.form_blocks[\"recurring\"]._get_repeat_code = get_repeat_code;\r\n\t\tvar get_rcode = {\r\n\t\t\tmonth:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tif (get_value(els, \"month_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_count\")));\r\n\t\t\t\t\tdates.start.setDate(get_value(els, \"month_day\"));\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_count2\")));\r\n\t\t\t\t\tcode.push( get_value(els, \"month_day2\"));\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_week2\")));\r\n\t\t\t\t\tif (!scheduler.config.repeat_precise){\r\n\t\t\t\t\t\tdates.start.setDate(1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tdates._start = true;\r\n\t\t\t},\r\n\t\t\tweek:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"week_count\")));\r\n\t\t\t\tcode.push(\"\");\r\n\t\t\t\tcode.push(\"\");\r\n\t\t\t\tvar t = [];\r\n\r\n\t\t\t\tvar col = get_value(els, \"week_day\", true);\r\n\t\t\t\t//var col = els[\"week_day\"];\r\n\t\t\t\tvar day = dates.start.getDay();\r\n\t\t\t\tvar start_exists = false;\r\n\r\n\t\t\t\tfor (var i = 0; i < col.length; i++){\r\n\t\t\t\t\tt.push(col[i]);\r\n\t\t\t\t\tstart_exists = start_exists || col[i] == day;\r\n\t\t\t\t}\r\n\t\t\t\tif (!t.length){\r\n\t\t\t\t\tt.push(day);\r\n\t\t\t\t\tstart_exists = true;\r\n\t\t\t\t}\r\n\t\t\t\tt.sort();\r\n\r\n\r\n\t\t\t\tif (!scheduler.config.repeat_precise){\r\n\t\t\t\t\tdates.start = scheduler.date.week_start(dates.start);\r\n\t\t\t\t\tdates._start = true;\r\n\t\t\t\t} else if (!start_exists){\r\n\t\t\t\t\tscheduler.transpose_day_week(dates.start, t, 1, 7);\r\n\t\t\t\t\tdates._start = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcode.push(t.join(\",\"));\r\n\t\t\t},\r\n\t\t\tday:function(code) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tif (get_value(els, \"day_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"day_count\")));\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcode.push(\"week\");\r\n\t\t\t\t\tcode.push(1);\r\n\t\t\t\t\tcode.push(\"\");\r\n\t\t\t\t\tcode.push(\"\");\r\n\t\t\t\t\tcode.push(scheduler.config.recurring_workdays.join(\",\"));\r\n\t\t\t\t\tcode.splice(0, 1);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tyear:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\r\n\t\t\t\tif (get_value(els, \"year_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(\"1\");\r\n\t\t\t\t\tdates.start.setMonth(0);\r\n\t\t\t\t\tdates.start.setDate(get_value(els, \"year_day\"));\r\n\t\t\t\t\tdates.start.setMonth(get_value(els, \"year_month\"));\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcode.push(\"1\");\r\n\t\t\t\t\tcode.push(get_value(els, \"year_day2\"));\r\n\t\t\t\t\tcode.push(get_value(els, \"year_week2\"));\r\n\t\t\t\t\tdates.start.setDate(1);\r\n\t\t\t\t\tdates.start.setMonth(get_value(els, \"year_month2\"));\r\n\t\t\t\t}\r\n\t\t\t\tdates._start = true;\r\n\t\t\t}\r\n\t\t};\r\n\t\tvar set_rcode = {\r\n\t\t\tweek:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\t\tset_value(els, \"week_count\", code[1]);\r\n\r\n\t\t\t\tvar t = code[4].split(\",\");\r\n\t\t\t\tvar d = {};\r\n\t\t\t\tfor (var i = 0; i < t.length; i++) d[t[i]] = true;\r\n\r\n\t\t\t\tset_value(els, \"week_day\", d);\r\n\r\n\t\t\t\t//for (var i = 0; i < col.length; i++)\r\n\t\t\t\t//\tcol[i].checked = (!!d[col[i].value]);\r\n\t\t\t},\r\n\t\t\tmonth:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\r\n\t\t\t\tif (code[2] === \"\") {\r\n\t\t\t\t\tset_value(els, \"month_type\", \"d\");\r\n\t\t\t\t\tset_value(els, \"month_count\", code[1]);\r\n\t\t\t\t\tset_value(els, \"month_day\", dates.start.getDate());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tset_value(els, \"month_type\", \"w\");\r\n\t\t\t\t\tset_value(els, \"month_count2\", code[1]);\r\n\t\t\t\t\tset_value(els, \"month_week2\", code[3]);\r\n\t\t\t\t\tset_value(els, \"month_day2\", code[2]);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tday:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\t\tset_value(els, \"day_type\", \"d\");\r\n\t\t\t\tset_value(els, \"day_count\", code[1]);\r\n\t\t\t},\r\n\t\t\tyear:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\r\n\t\t\t\tif (code[2] === \"\") {\r\n\t\t\t\t\tset_value(els, \"year_type\", \"d\");\r\n\t\t\t\t\tset_value(els, \"year_day\", dates.start.getDate());\r\n\t\t\t\t\tset_value(els, \"year_month\", dates.start.getMonth());\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tset_value(els, \"year_type\", \"w\");\r\n\t\t\t\t\tset_value(els, \"year_week2\", code[3]);\r\n\t\t\t\t\tset_value(els, \"year_day2\", code[2]);\r\n\t\t\t\t\tset_value(els, \"year_month2\", dates.start.getMonth());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfunction set_repeat_code(code, dates) {\r\n\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\tvar data = code.split(\"#\");\r\n\t\t\tcode = data[0].split(\"_\");\r\n\t\t\tset_rcode[code[0]](code, dates);\r\n\r\n\t\t\tswitch (data[1]) {\r\n\t\t\t\tcase \"no\":\r\n\t\t\t\t\tset_end_rule(els, \"no\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"\":\r\n\t\t\t\t\tset_end_rule(els, \"date_of_end\");\r\n\r\n\t\t\t\t\tvar end_date = dates.end;\r\n\t\t\t\t\tif (scheduler.config.include_end_by){\r\n\t\t\t\t\t\tend_date = scheduler.date.add(end_date, -1, 'day');\r\n\t\t\t\t\t}\r\n\t\t\t\t\tset_value(els, \"date_of_end\", date_str(end_date));\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tset_end_rule(els, \"occurences_count\");\r\n\t\t\t\t\tset_value(els, \"occurences_count\", data[1]);\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tset_value(els, \"repeat\", code[0]);\r\n\t\t\t//e.checked = true;\r\n\r\n\t\t\tvar node = scheduler.form_blocks[\"recurring\"]._get_form_node(els, \"repeat\", code[0]);\r\n\t\t\tif(node.nodeName == \"SELECT\"/* && node.onchange*/){\r\n\t\t\t//\tnode.onchange();\r\n\t\t\t\tnode.dispatchEvent(new Event('change'));\r\n\t\t\t\tnode.dispatchEvent(new MouseEvent('click'));\r\n\t\t\t}else{\r\n\t\t\t\tnode.dispatchEvent(new MouseEvent('click'));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tscheduler.form_blocks[\"recurring\"]._set_repeat_code = set_repeat_code;\r\n\r\n\t\tfor (var i = 0; i < top.elements.length; i++) {\r\n\t\t\tvar el = top.elements[i];\r\n\t\t\tswitch (el.name) {\r\n\t\t\t\tcase \"repeat\":\r\n\t\t\t\t\tif (el.nodeName == \"SELECT\" && !el.$_eventAttached) {\r\n\t\t\t\t\t\tel.$_eventAttached = true;\r\n\t\t\t\t\t\tel.addEventListener(\"change\", change_current_view);\r\n\t\t\t\t\t} else if(!el.$_eventAttached){\r\n\t\t\t\t\t\tel.$_eventAttached = true;\r\n\t\t\t\t\t\tel.addEventListener(\"click\", change_current_view);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tscheduler._lightbox._rec_init_done = true;\r\n\t},\r\n\tset_value:function(node, value, ev) {\r\n\t\tvar rf = scheduler.form_blocks[\"recurring\"];\r\n\t\tif (!scheduler._lightbox._rec_init_done)\r\n\t\t\trf._init_set_value(node, value, ev);\r\n\t\tnode.open = !ev.rec_type;\r\n\r\n\t\tnode.blocked = this._is_modified_occurence(ev);\r\n\r\n\t\tvar ds = rf._ds;\r\n\t\tds.start = ev.start_date;\r\n\t\tds.end = ev._end_date;\r\n\r\n\t\trf._toggle_block();\r\n\r\n\t\tif (value)\r\n\t\t\trf._set_repeat_code(value, ds);\r\n\t},\r\n\tget_value:function(node, ev) {\r\n\t\tif (node.open) {\r\n\t\t\tvar ds = scheduler.form_blocks[\"recurring\"]._ds;\r\n\t\t\tvar actual_dates = {};\r\n\r\n\t\t\tvar timeControl = getTimeSection();\r\n\r\n\t\t\ttimeControl.getValue(actual_dates);\r\n\t\t\tds.start = actual_dates.start_date;\r\n\t\t\tev.rec_type = scheduler.form_blocks[\"recurring\"]._get_repeat_code(ds);\r\n\t\t\tif (ds._start) {\r\n\t\t\t\tev.start_date = new Date(ds.start);\r\n\t\t\t\tev._start_date = new Date(ds.start);\r\n\t\t\t\tds._start = false;\r\n\t\t\t} else\r\n\t\t\t\tev._start_date = null;\r\n\r\n\t\t\tev._end_date = ds.end;\r\n\t\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\t\t} else {\r\n\t\t\tev.rec_type = ev.rec_pattern = \"\";\r\n\t\t\tev._end_date = ev.end_date;\r\n\t\t}\r\n\t\treturn ev.rec_type;\r\n\t},\r\n\t_get_button: function(){\r\n\t\tvar node = getRecurringSection().header;\r\n\t\treturn node.firstChild.firstChild;\r\n\t},\r\n\t_get_form: function(){\r\n\t\treturn getRecurringSection().node;\r\n\t},\r\n\topen:function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form();\r\n\t\tif(!cont.open)\r\n\t\t\tblock._toggle_block();\r\n\t},\r\n\tclose: function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form();\r\n\r\n\t\tif(cont.open)\r\n\t\t\tblock._toggle_block();\r\n\t},\r\n\t_toggle_block: function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form(),\r\n\t\t\tel = block._get_button();\r\n\t\tif (!cont.open && !cont.blocked) {\r\n\t\t\tcont.style.height = \"auto\";//reset to default value\r\n\t\t\tif(el){\r\n\t\t\t\tel.style.backgroundPosition = \"-5px 0px\";\r\n\t\t\t\tel.nextSibling.innerHTML = scheduler.locale.labels.button_recurring_open;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tcont.style.height = \"0px\";\r\n\t\t\tif(el){\r\n\t\t\t\tel.style.backgroundPosition = \"-5px 20px\";\r\n\t\t\t\tel.nextSibling.innerHTML = scheduler.locale.labels.button_recurring;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcont.open = !cont.open;\r\n\r\n\t\tscheduler.setLightboxSize();\r\n\t},\r\n\tfocus:function(node) {\r\n\t},\r\n\tbutton_click:function(node, button, event) {\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\t\tvar cont = block._get_form();\r\n\t\tif (!cont.blocked)\r\n\t\t\tscheduler.form_blocks.recurring._toggle_block();\r\n\t}\r\n};\r\n\r\nfunction getTimeSection(){\r\n\tvar timeControl = scheduler.formSection('time');\r\n\tif(!timeControl){\r\n\t\ttimeControl = getFirstSectionOfType('time');\r\n\t}\r\n\tif(!timeControl){\r\n\t\ttimeControl = getFirstSectionOfType('calendar_time');\r\n\t}\r\n\r\n\t\r\n\tif (!timeControl) {\r\n\t\tthrow new Error([\"Can't calculate the recurring rule, the Recurring form block can't find the Time control. Make sure you have the time control in 'scheduler.config.lightbox.sections' config.\",\r\n\"You can use either the default time control https://docs.dhtmlx.com/scheduler/time.html, or the datepicker https://docs.dhtmlx.com/scheduler/minicalendar.html, or a custom control. \",\r\n\"In the latter case, make sure the control is named \\\"time\\\":\",\r\n\"\",\r\n\"scheduler.config.lightbox.sections = [\",\r\n\"{name:\\\"time\\\", height:72, type:\\\"YOU CONTROL\\\", map_to:\\\"auto\\\" }];\"]\r\n.join(\"\\n\"));\r\n\t}\r\n\r\n\treturn timeControl;\r\n}\r\n\r\nfunction getRecurringSection(){\r\n\tvar recurringSection = scheduler.formSection('recurring');\r\n\tif(!recurringSection){\r\n\t\trecurringSection = getFirstSectionOfType('recurring');\r\n\t}\r\n\r\n\tif (!recurringSection) {\r\n\t\tthrow new Error([\"Can't locate the Recurring form section.\",\r\n\t\t\"Make sure that you have the recurring control on the lightbox configuration https://docs.dhtmlx.com/scheduler/recurring_events.html#recurringlightbox \",\r\n\t\t\"and that the recurring control has name \\\"recurring\\\":\",\r\n\"\",\r\n\"scheduler.config.lightbox.sections = [\",\r\n\"\t{name:\\\"recurring\\\", ... }\",\r\n\"];\"].join(\"\\n\"));\r\n\r\n\t}\r\n\r\n\treturn recurringSection;\r\n}\r\n\r\nfunction getFirstSectionOfType(type){\r\n\tfor(var i = 0; i < scheduler.config.lightbox.sections.length; i++){\r\n\t\tvar section = scheduler.config.lightbox.sections[i];\r\n\t\tif(section.type === type){\r\n\t\t\treturn scheduler.formSection(section.name);\r\n\t\t}\r\n\t}\r\n\treturn null;\r\n}\r\n\r\n//problem may occur if we will have two repeating events in the same moment of time\r\nscheduler._rec_markers = {};\r\nscheduler._rec_markers_pull = {};\r\nscheduler._add_rec_marker = function(ev, time) {\r\n\tev._pid_time = time;\r\n\tthis._rec_markers[ev.id] = ev;\r\n\tif (!this._rec_markers_pull[ev.event_pid]) this._rec_markers_pull[ev.event_pid] = {};\r\n\tthis._rec_markers_pull[ev.event_pid][time] = ev;\r\n};\r\nscheduler._get_rec_marker = function(time, id) {\r\n\tvar ch = this._rec_markers_pull[id];\r\n\tif (ch) return ch[time];\r\n\treturn null;\r\n};\r\nscheduler._get_rec_markers = function(id) {\r\n\treturn (this._rec_markers_pull[id] || []);\r\n};\r\n\r\nfunction clearMilliseconds(date){\r\n//\treturn date;\r\n\treturn new Date(\r\n\t\tdate.getFullYear(), \r\n\t\tdate.getMonth(), \r\n\t\tdate.getDate(), \r\n\t\tdate.getHours(), \r\n\t\tdate.getMinutes(),\r\n\t\tdate.getSeconds(),\r\n\t\t0\r\n\t);\r\n}\r\n\r\nscheduler._rec_temp = [];\r\n(function() {\r\n\tvar old_add_event = scheduler.addEvent;\r\n\tscheduler.addEvent = function(start_date, end_date, text, id, extra_data) {\r\n\t\tvar ev_id = old_add_event.apply(this, arguments);\r\n\r\n\t\tif (ev_id && scheduler.getEvent(ev_id)) {\r\n\t\t\tvar ev = scheduler.getEvent(ev_id);\r\n\t\t\t\r\n\t\t\tif(ev.start_date){\r\n\t\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t\t}\r\n\t\t\tif(ev.end_date){\r\n\t\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t\t}\r\n\t\t\tif (this._is_modified_occurence(ev))\r\n\t\t\t\tscheduler._add_rec_marker(ev, ev.event_length * 1000);\r\n\t\t\tif (ev.rec_type)\r\n\t\t\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\t\t}\r\n\t\treturn ev_id;\r\n\t};\r\n})();\r\n\r\nscheduler.attachEvent(\"onEventIdChange\", function(id, new_id) {\r\n\tif (this._ignore_call) return;\r\n\tthis._ignore_call = true;\r\n\r\n\tif(scheduler._rec_markers[id]){\r\n\t\t//important for for correct work of scheduler.getEvents(from, to) and collision detection\r\n\t\tscheduler._rec_markers[new_id] = scheduler._rec_markers[id];\r\n\t\tdelete scheduler._rec_markers[id];\r\n\t}\r\n\r\n\tif(scheduler._rec_markers_pull[id]){\r\n\t\tscheduler._rec_markers_pull[new_id] = scheduler._rec_markers_pull[id];\r\n\t\tdelete scheduler._rec_markers_pull[id];\r\n\t}\r\n\r\n\tfor (var i = 0; i < this._rec_temp.length; i++) {\r\n\t\tvar tev = this._rec_temp[i];\r\n\t\tif (tev.event_pid == id) {\r\n\t\t\ttev.event_pid = new_id;\r\n\t\t\tthis.changeEventId(tev.id, new_id + \"#\" + tev.id.split(\"#\")[1]);\r\n\t\t}\r\n\t}\r\n\r\n\tfor(var i in this._rec_markers){\r\n\t\tvar tev = this._rec_markers[i];\r\n\t\tif(tev.event_pid == id){\r\n\t\t\ttev.event_pid = new_id;\r\n\t\t\ttev._pid_changed = true;\r\n\t\t}\r\n\t}\r\n\r\n\tvar el = scheduler._rec_markers[new_id];\r\n\tif(el && el._pid_changed) {\r\n\t\tdelete el._pid_changed;\r\n\t\tsetTimeout(function() {\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler.callEvent(\"onEventChanged\", [new_id, scheduler.getEvent(new_id)]);\r\n\t\t}, 1);\r\n\t}\r\n\r\n\tdelete this._ignore_call;\r\n});\r\nscheduler.attachEvent(\"onConfirmedBeforeEventDelete\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (this._is_virtual_event(id) || (this._is_modified_occurence(ev) && ev.rec_type && ev.rec_type != 'none')) {\r\n\t\tid = id.split(\"#\");\r\n\t\tvar nid = this.uid();\r\n\t\tvar tid = (id[1]) ? id[1] : Math.round(ev._pid_time / 1000);\r\n\r\n\t\tvar nev = this._copy_event(ev);\r\n\t\tnev.id = nid;\r\n\t\tnev.event_pid = ev.event_pid || id[0];\r\n\t\tvar timestamp = tid;\r\n\t\tnev.event_length = timestamp;\r\n\t\tnev.rec_type = nev.rec_pattern = \"none\";\r\n\t\tthis.addEvent(nev);\r\n\r\n\t\tthis._add_rec_marker(nev, timestamp * 1000);\r\n\t} else {\r\n\t\tif (ev.rec_type && this._lightbox_id)\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\tvar sub = this._get_rec_markers(id);\r\n\t\tfor (var i in sub) {\r\n\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\tid = sub[i].id;\r\n\t\t\t\tif (this.getEvent(id))\r\n\t\t\t\t\tthis.deleteEvent(id, true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventDeleted\", function(id, ev){\r\n\tif(!this._is_virtual_event(id) && this._is_modified_occurence(ev)){\r\n\t\tif(!scheduler._events[id]){\r\n\t\t\tev.rec_type = ev.rec_pattern = \"none\";\r\n\t\t\tthis.setEvent(id, ev);\r\n\t\t}\r\n\t}\r\n});\r\nscheduler.attachEvent(\"onEventChanged\", function(id, event) {\r\n\tif (this._loading) return true;\r\n\r\n\tvar ev = this.getEvent(id);\r\n\r\n\tif (this._is_virtual_event(id)) {\r\n\t\tvar id = id.split(\"#\");\r\n\t\tvar nid = this.uid();\r\n\t\tthis._not_render = true;\r\n\r\n\t\tvar nev = this._copy_event(event);\r\n\t\tnev.id = nid;\r\n\t\tnev.event_pid = id[0];\r\n\t\tvar timestamp = id[1];\r\n\t\tnev.event_length = timestamp;\r\n\t\tnev.rec_type = nev.rec_pattern = \"\";\r\n\r\n\t\tthis._add_rec_marker(nev, timestamp * 1000);\r\n\t\tthis.addEvent(nev);\r\n\r\n\t\tthis._not_render = false;\r\n\r\n\t} else {\r\n\t\tif(ev.start_date){\r\n\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t}\r\n\t\tif(ev.end_date){\r\n\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t}\r\n\r\n\t\tif (ev.rec_type && this._lightbox_id){\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\t}\r\n\t\tvar sub = this._get_rec_markers(id);\r\n\t\tfor (var i in sub) {\r\n\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\tdelete this._rec_markers[sub[i].id];\r\n\t\t\t\tthis.deleteEvent(sub[i].id, true);\r\n\t\t\t}\r\n\t\t}\r\n\t\tdelete this._rec_markers_pull[id];\r\n\r\n\t\t// it's possible that after editing event is no longer exists, in such case we need to remove _select_id flag\r\n\t\tvar isEventFound = false;\r\n\t\tfor (var k = 0; k < this._rendered.length; k++) {\r\n\t\t\tif (this._rendered[k].getAttribute(this.config.event_attribute) == id)\r\n\t\t\t\tisEventFound = true;\r\n\t\t}\r\n\t\tif (!isEventFound)\r\n\t\t\tthis._select_id = null;\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventAdded\", function(id) {\r\n\tif (!this._loading) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (ev.rec_type && !ev.event_length){\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventSave\", function(id, data, is_new_event) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (!ev.rec_type && data.rec_type && !this._is_virtual_event(id))\r\n\t\tthis._select_id = null;\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventCreated\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (!ev.rec_type)\r\n\t\tev.rec_type = ev.rec_pattern = ev.event_length = ev.event_pid = \"\";\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventCancel\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (ev.rec_type) {\r\n\t\tthis._roll_back_dates(ev);\r\n\t\t// a bit expensive, but we need to be sure that event re-rendered, because view can be corrupted by resize , during edit process\r\n\t\tthis.render_view_data();\r\n\t}\r\n});\r\nscheduler._roll_back_dates = function(ev) {\r\n\tif(ev.start_date){\r\n\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t}\r\n\tif(ev.end_date){\r\n\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t}\r\n\tev.event_length = Math.round((ev.end_date.valueOf() - ev.start_date.valueOf()) / 1000);\r\n\tev.end_date = ev._end_date;\r\n\tif (ev._start_date) {\r\n\t\tev.start_date.setMonth(0);\r\n\t\tev.start_date.setDate(ev._start_date.getDate());\r\n\t\tev.start_date.setMonth(ev._start_date.getMonth());\r\n\t\tev.start_date.setFullYear(ev._start_date.getFullYear());\r\n\r\n\t}\r\n};\r\n\r\nscheduler._is_virtual_event = function(id){\r\n\treturn id.toString().indexOf(\"#\") != -1;\r\n};\r\nscheduler._is_modified_occurence = function(ev){\r\n\treturn (ev.event_pid && ev.event_pid != \"0\");\r\n};\r\n\r\nscheduler.showLightbox_rec = scheduler.showLightbox;\r\nscheduler.showLightbox = function(id) {\r\n\tvar locale = this.locale;\r\n\tvar c = scheduler.config.lightbox_recurring;\r\n\tvar ev = this.getEvent(id);\r\n\tvar pid = ev.event_pid;\r\n\tvar isVirtual = this._is_virtual_event(id);\r\n\tif (isVirtual)\r\n\t\tpid = id.split(\"#\")[0];\r\n\r\n\t// show series\r\n\tvar showSeries = function(id) {\r\n\t\tvar event = scheduler.getEvent(id);\r\n\t\tevent._end_date = event.end_date;\r\n\t\tevent.end_date = new Date(event.start_date.valueOf() + event.event_length * 1000);\r\n\t\treturn scheduler.showLightbox_rec(id); // editing series\r\n\t};\r\n\r\n\tif ( (pid || pid*1 === 0) && ev.rec_type) {\r\n\t\t// direct API call on series id\r\n\t\treturn showSeries(id);\r\n\t}\r\n\tif ( !pid || pid === '0' || ( (!locale.labels.confirm_recurring || c == 'instance') || (c == 'series' && !isVirtual)) ) {\r\n\t\t// editing instance or non recurring event\r\n\t\treturn this.showLightbox_rec(id);\r\n\t}\r\n\tif (c == 'ask') {\r\n\t\tvar that = this;\r\n\t\tscheduler.modalbox({\r\n\t\t\ttext: locale.labels.confirm_recurring,\r\n\t\t\ttitle: locale.labels.title_confirm_recurring,\r\n\t\t\twidth: \"500px\",\r\n\t\t\tposition: \"middle\",\r\n\t\t\tbuttons:[locale.labels.button_edit_series, locale.labels.button_edit_occurrence, locale.labels.icon_cancel],\r\n\t\t\tcallback: function(index) {\r\n\t\t\t\tswitch(+index) {\r\n\t\t\t\t\tcase 0:\r\n\t\t\t\t\t\treturn showSeries(pid);\r\n\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\treturn that.showLightbox_rec(id);\r\n\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t} else {\r\n\t\tshowSeries(pid);\r\n\t}\r\n};\r\n\r\n\r\nscheduler.get_visible_events_rec = scheduler.get_visible_events;\r\nscheduler.get_visible_events = function(only_timed) {\r\n\tfor (var i = 0; i < this._rec_temp.length; i++)\r\n\t\tdelete this._events[this._rec_temp[i].id];\r\n\tthis._rec_temp = [];\r\n\r\n\tvar stack = this.get_visible_events_rec(only_timed);\r\n\tvar out = [];\r\n\tfor (var i = 0; i < stack.length; i++) {\r\n\t\tif (stack[i].rec_type) {\r\n\t\t\t//deleted element of series\r\n\t\t\tif (stack[i].rec_pattern != \"none\")\r\n\t\t\t\tthis.repeat_date(stack[i], out);\r\n\t\t}\r\n\t\telse out.push(stack[i]);\r\n\t}\r\n\treturn out;\r\n};\r\n\r\n\r\n(function() {\r\n\tvar old = scheduler.isOneDayEvent;\r\n\tscheduler.isOneDayEvent = function(ev) {\r\n\t\tif (ev.rec_type) return true;\r\n\t\treturn old.call(this, ev);\r\n\t};\r\n\tvar old_update_event = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id) {\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tif(ev && ev.rec_type){\r\n\t\t\t//rec_type can be changed without the lightbox,\r\n\t\t\t// make sure rec_pattern updated as well\r\n\t\t\tev.rec_pattern = (ev.rec_type || \"\").split(\"#\")[0];\r\n\t\t}\r\n\t\tif (ev && ev.rec_type && !this._is_virtual_event(id)) {\r\n\t\t\tscheduler.update_view();\r\n\t\t} else {\r\n\t\t\told_update_event.call(this, id);\r\n\t\t}\r\n\t};\r\n})();\r\n\r\nscheduler.transponse_size = {\r\n\tday:1, week:7, month:1, year:12\r\n};\r\nscheduler.date.day_week = function(sd, day, week) {\r\n\tsd.setDate(1);\r\n\tvar originalMonth = scheduler.date.month_start(new Date(sd));\r\n\tweek = (week - 1) * 7;\r\n\tvar cday = sd.getDay();\r\n\tvar nday = day * 1 + week - cday + 1;\r\n\tsd.setDate(nday <= week ? (nday + 7) : nday);\r\n\tvar newMonth = scheduler.date.month_start(new Date(sd));\r\n\tif(originalMonth.valueOf() !== newMonth.valueOf()){\r\n\t\treturn false;\r\n\t}\r\n\treturn true;\r\n};\r\nscheduler.transpose_day_week = function(sd, list, cor, size, cor2) {\r\n\tvar cday = (sd.getDay() || (scheduler.config.start_on_monday ? 7 : 0)) - cor;\r\n\tfor (var i = 0; i < list.length; i++) {\r\n\t\tif (list[i] > cday)\r\n\t\t\treturn sd.setDate(sd.getDate() + list[i] * 1 - cday - (size ? cor : cor2));\r\n\t}\r\n\tthis.transpose_day_week(sd, list, cor + size, null, cor);\r\n};\r\nscheduler.transpose_type = function(type) {\r\n\tvar transposeRecurring = \"transpose_\" + type;\r\n\tif (!this.date[transposeRecurring]) {\r\n\t\tvar recurringParts = type.split(\"_\");\r\n\t\tvar dayDurationMs = 60 * 60 * 24 * 1000;\r\n\t\tvar addRecurring = \"add_\" + type;\r\n\t\tvar recurringStepDays = this.transponse_size[recurringParts[0]] * recurringParts[1];\r\n\r\n\t\tif (recurringParts[0] == \"day\" || recurringParts[0] == \"week\") {\r\n\t\t\tvar weekDays = null;\r\n\t\t\tif (recurringParts[4]) {\r\n\t\t\t\tweekDays = recurringParts[4].split(\",\");\r\n\t\t\t\tif (scheduler.config.start_on_monday) {\r\n\t\t\t\t\tfor (var i = 0; i < weekDays.length; i++)\r\n\t\t\t\t\t\tweekDays[i] = (weekDays[i] * 1) || 7;\r\n\t\t\t\t\tweekDays.sort();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.date[transposeRecurring] = function(nd, td) {\r\n\t\t\t\tvar delta = Math.floor((td.valueOf() - nd.valueOf()) / (dayDurationMs * recurringStepDays));\r\n\t\t\t\tif (delta > 0)\r\n\t\t\t\t\tnd.setDate(nd.getDate() + delta * recurringStepDays);\r\n\t\t\t\tif (weekDays)\r\n\t\t\t\t\tscheduler.transpose_day_week(nd, weekDays, 1, recurringStepDays);\r\n\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t\tthis.date[addRecurring] = function(sd, inc) {\r\n\t\t\t\tvar nd = new Date(sd.valueOf());\r\n\t\t\t\tif (weekDays) {\r\n\t\t\t\t\tfor (var count = 0; count < inc; count++)\r\n\t\t\t\t\t\tscheduler.transpose_day_week(nd, weekDays, 0, recurringStepDays);\r\n\t\t\t\t} else\r\n\t\t\t\t\tnd.setDate(nd.getDate() + inc * recurringStepDays);\r\n\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t}\r\n\t\telse if (recurringParts[0] == \"month\" || recurringParts[0] == \"year\") {\r\n\t\t\tthis.date[transposeRecurring] = function(nd, td, seriesInstance) {\r\n\t\t\t\tvar delta = Math.ceil(((td.getFullYear() * 12 + td.getMonth() * 1 + 1) - (nd.getFullYear() * 12 + nd.getMonth() * 1 + 1)) / (recurringStepDays) - 1);\r\n\r\n\t\t\t\tif (delta >= 0){\r\n\t\t\t\t\tnd.setDate(1);\r\n\t\t\t\t\tnd.setMonth(nd.getMonth() + delta * recurringStepDays);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn scheduler.date[addRecurring](nd, 0, seriesInstance);\r\n\t\t\t\t//if (str[3]){\r\n\t\t\t\t//\tscheduler.date.day_week(nd, str[2], str[3]);\r\n\t\t\t\t//}\r\n\t\t\t};\r\n\t\t\tthis.date[addRecurring] = function(sd, inc, seriesInstance, currentCount) {\r\n\t\t\t\tif(!currentCount){\r\n\t\t\t\t\tcurrentCount = 1;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcurrentCount++;\r\n\t\t\t\t}\r\n\t\t\t\tvar maxCount = 12;\r\n\t\t\t\tif(currentCount > maxCount){\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar nd = new Date(sd.valueOf());\r\n\t\t\t\tnd.setDate(1);\r\n\r\n\r\n\t\t\t\tnd.setMonth(nd.getMonth() + inc * recurringStepDays);\r\n\t\t\t\tvar origMonth = nd.getMonth();\r\n\t\t\t\tvar origYear = nd.getFullYear();\r\n\t\t\t\tnd.setDate(seriesInstance.start_date.getDate());\r\n\t\t\t\tif (recurringParts[3]){\r\n\t\t\t\t\tscheduler.date.day_week(nd, recurringParts[2], recurringParts[3]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar correctOverflowInstances = scheduler.config.recurring_overflow_instances;\r\n\t\t\t\tif(nd.getMonth() != origMonth && correctOverflowInstances != \"none\"){\r\n\t\t\t\t\t// no such day in a month\r\n\t\t\t\t\tif(correctOverflowInstances === \"lastDay\"){\r\n\t\t\t\t\t\t// return either last day of the month\r\n\t\t\t\t\t\tnd = new Date(origYear, origMonth + 1, 0, nd.getHours(), nd.getMinutes(), nd.getSeconds(), nd.getMilliseconds());\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t// or go to the next instance\r\n\t\t\t\t\t\tnd = scheduler.date[addRecurring](new Date(origYear, origMonth + 1, 0), inc||1, seriesInstance, currentCount);\r\n\t\t\t\t\t\t// if next instance is not possible (e.g. 'repeat on 40th day of the month') null will be returned\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.repeat_date = function(ev, stack, non_render, from, to, maxCount) {\r\n\r\n\tfrom = from || this._min_date;\r\n\tto = to || this._max_date;\r\n\tvar max = maxCount || -1;\r\n\tvar td = new Date(ev.start_date.valueOf());\r\n\r\n\tvar startHour = td.getHours();\r\n\r\n\tvar visibleCount = 0;\r\n\r\n\tif (!ev.rec_pattern && ev.rec_type)\r\n\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\r\n\tthis.transpose_type(ev.rec_pattern);\r\n\ttd = scheduler.date[\"transpose_\" + ev.rec_pattern](td, from, ev);\r\n\twhile ( td && (\r\n\t\ttd < ev.start_date ||\r\n\t\tscheduler._fix_daylight_saving_date(td,from,ev,td,new Date(td.valueOf() + ev.event_length * 1000)).valueOf() <= from.valueOf() ||\r\n\t\ttd.valueOf() + ev.event_length * 1000 <= from.valueOf())){\r\n\t\t\ttd = this.date[\"add_\" + ev.rec_pattern](td, 1, ev);\r\n\r\n\t}\r\n\twhile (td && (td < to && td < ev.end_date && (max < 0 || visibleCount < max))) {\r\n\t\ttd.setHours(startHour);\r\n\r\n\t\tvar timestamp = (scheduler.config.occurrence_timestamp_in_utc) ? Date.UTC(td.getFullYear(), td.getMonth(), td.getDate(), td.getHours(), td.getMinutes(), td.getSeconds()) : td.valueOf();\r\n\t\tvar ch = this._get_rec_marker(timestamp, ev.id);\r\n\t\tif (!ch) { // unmodified element of series\r\n\t\t\tvar ted = new Date(td.valueOf() + ev.event_length * 1000);\r\n\t\t\tvar copy = this._copy_event(ev);\r\n\t\t\t//copy._timed = ev._timed;\r\n\t\t\tcopy.text = ev.text;\r\n\t\t\tcopy.start_date = td;\r\n\t\t\tcopy.event_pid = ev.id;\r\n\t\t\tcopy.id = ev.id + \"#\" + Math.round(timestamp / 1000);\r\n\t\t\tcopy.end_date = ted;\r\n\r\n\t\t\tcopy.end_date = scheduler._fix_daylight_saving_date(copy.start_date, copy.end_date, ev, td, copy.end_date);\r\n\r\n\t\t\tcopy._timed = this.isOneDayEvent(copy);\r\n\r\n\t\t\tif (!copy._timed && !this._table_view && !this.config.multi_day) return;\r\n\t\t\tstack.push(copy);\r\n\r\n\t\t\tif (!non_render) {\r\n\t\t\t\tthis._events[copy.id] = copy;\r\n\t\t\t\tthis._rec_temp.push(copy);\r\n\t\t\t}\r\n\r\n\t\t\tvisibleCount++;\r\n\r\n\t\t} else\r\n\t\tif (non_render){\r\n\t\t\tif(ch.rec_type != \"none\"){\r\n\t\t\t\tvisibleCount++;\r\n\t\t\t}\r\n\t\t\tstack.push(ch);\r\n\t\t}\r\n\r\n\t\ttd = this.date[\"add_\" + ev.rec_pattern](td, 1, ev);\r\n\t//\tif(!scheduler.date[\"validate_add_\" + ev.rec_pattern](td, 1, ev.rec_pattern)){\r\n\t///\t\talert(\"detect add\")\r\n\t//\t}\r\n\t}\r\n};\r\nscheduler._fix_daylight_saving_date = function(start_date, end_date, ev, counter, default_date) {\r\n\tvar shift = start_date.getTimezoneOffset() - end_date.getTimezoneOffset();\r\n\tif (shift) {\r\n\t\tif (shift > 0) {\r\n\t\t\t// e.g. 24h -> 23h\r\n\t\t\treturn new Date(counter.valueOf() + ev.event_length * 1000 - shift * 60 * 1000);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// e.g. 24h -> 25h\r\n\t\t\treturn new Date(end_date.valueOf() - shift * 60 * 1000);\r\n\t\t}\r\n\t}\r\n\treturn new Date(default_date.valueOf());\r\n};\r\nscheduler.getRecDates = function(id, max) {\r\n\tvar ev = typeof id == \"object\" ? id : scheduler.getEvent(id);\r\n\tvar recurrings = [];\r\n\tmax = max || 100;\r\n\r\n\tif (!ev.rec_type) {\r\n\t\treturn [\r\n\t\t\t{ start_date: ev.start_date, end_date: ev.end_date }\r\n\t\t];\r\n\t}\r\n\tif (ev.rec_type == \"none\") {\r\n\t\treturn [];\r\n\t}\r\n\r\n\tscheduler.repeat_date(ev, recurrings, true, ev.start_date, ev.end_date, max);\r\n\r\n\tvar result = [];\r\n\tfor(var i = 0; i < recurrings.length; i++){\r\n\t\tif(recurrings[i].rec_type != \"none\"){\r\n\t\t\tresult.push({start_date: recurrings[i].start_date, end_date: recurrings[i].end_date});\r\n\t\t}\r\n\t}\r\n\r\n\treturn result;\r\n};\r\nscheduler.getEvents = function(from, to) {\r\n\tvar result = [];\r\n\tfor (var a in this._events) {\r\n\t\tvar ev = this._events[a];\r\n\t\tif (ev && ev.start_date < to && ev.end_date > from) {\r\n\t\t\tif (ev.rec_pattern) {\r\n\t\t\t\tif (ev.rec_pattern == \"none\") continue;\r\n\t\t\t\tvar sev = [];\r\n\t\t\t\tthis.repeat_date(ev, sev, true, from, to);\r\n\t\t\t\tfor (var i = 0; i < sev.length; i++) {\r\n\t\t\t\t\t// if event is in rec_markers then it will be checked by himself, here need to skip it\r\n\t\t\t\t\tif (!sev[i].rec_pattern && sev[i].start_date < to && sev[i].end_date > from && !this._rec_markers[sev[i].id]) {\r\n\t\t\t\t\t\tresult.push(sev[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if (!this._is_virtual_event(ev.id)) { // if it's virtual event we can skip it\r\n\t\t\t\tresult.push(ev);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn result;\r\n};\r\n\r\nscheduler.config.repeat_date = \"%m.%d.%Y\";\r\nscheduler.config.lightbox.sections = [\r\n\t{name:\"description\", map_to:\"text\", type:\"textarea\" , focus:true},\r\n\t{name:\"recurring\", type:\"recurring\", map_to:\"rec_type\", button:\"recurring\"},\r\n\t{name:\"time\", height:72, type:\"time\", map_to:\"auto\"}\r\n];\r\n\r\n\r\n//drop secondary attributes\r\nscheduler._copy_dummy = function(ev) {\r\n\tvar start_date = new Date(this.start_date);\r\n\tvar end_date = new Date(this.end_date);\r\n\tthis.start_date = start_date;\r\n\tthis.end_date = end_date;\r\n\tthis.event_length = this.event_pid = this.rec_pattern = this.rec_type = null;\r\n};\r\n\r\nscheduler.config.include_end_by = false;\r\nscheduler.config.lightbox_recurring = 'ask'; // series, instance\r\n\r\nscheduler.attachEvent(\"onClearAll\", function(){\r\n\tscheduler._rec_markers = {}; //clear recurring events data\r\n\tscheduler._rec_markers_pull = {};\r\n\tscheduler._rec_temp = [];\r\n});\r\n\r\n}","import getSerializator from '../core/common/get_serializable_events';\r\nexport default function(scheduler){\r\n\r\n\t\r\nconst getSerializableData = getSerializator(scheduler);\r\n\r\n//redefine this method, if you want to provide a custom set of attributes for serialization\r\nscheduler.data_attributes=function(){\r\n\tvar attrs = [];\r\n\tvar format = scheduler._helpers.formatDate;\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\t\tfor (var name in ev)\r\n\t\t\tif (name.substr(0,1) !=\"_\")\r\n\t\t\t\tattrs.push([name,((name == \"start_date\" || name == \"end_date\")?format:null)]);\r\n\t\tbreak;\r\n\t}\r\n\treturn attrs;\r\n};\r\n\r\nscheduler.toXML = function(header){\r\n\tvar xml = [];\r\n\tvar attrs = this.data_attributes();\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\r\n\t\txml.push(\"\");\r\n\t\tfor (var i=0; i < attrs.length; i++)\r\n\t\t\txml.push(\"<\"+attrs[i][0]+\">\");\r\n\r\n\t\txml.push(\"\");\r\n\t}\r\n\treturn (header||\"\")+\"\"+xml.join(\"\\n\")+\"\";\r\n};\r\n\r\nscheduler._serialize_json_value = function(value){\r\n\tif(value === null || typeof value === \"boolean\"){\r\n\t\tvalue = \"\" + value;\r\n\t}else{\r\n\t\tif(!value && value !== 0){\r\n\t\t\tvalue = \"\";\r\n\t\t}\r\n\t\tvalue = '\"' + value.toString().\r\n\t\t\treplace(/\\n/g,\"\").\r\n\t\t\treplace(/\\\\/g,\"\\\\\\\\\").\r\n\t\t\treplace(/\"/g, '\\\\\"') + '\"';\r\n\t}\r\n\treturn value;\r\n};\r\n\r\n\r\n\r\nscheduler.toJSON = function(){\r\n\treturn JSON.stringify(this.serialize());\r\n};\r\n\r\n\r\nscheduler.toICal = function(header){\r\n\tvar start = \"BEGIN:VCALENDAR\\nVERSION:2.0\\nPRODID:-//dhtmlXScheduler//NONSGML v2.2//EN\\nDESCRIPTION:\";\r\n\tvar end = \"END:VCALENDAR\";\r\n\tvar format = scheduler.date.date_to_str(\"%Y%m%dT%H%i%s\");\r\n\tvar full_day_format = scheduler.date.date_to_str(\"%Y%m%d\");\r\n\r\n\tvar ical = [];\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\r\n\r\n\t\tical.push(\"BEGIN:VEVENT\");\r\n\t\tif (!ev._timed || (!ev.start_date.getHours() && !ev.start_date.getMinutes()))\r\n\t\t\tical.push(\"DTSTART:\"+full_day_format(ev.start_date));\r\n\t\telse\r\n\t\t\tical.push(\"DTSTART:\"+format(ev.start_date));\r\n\t\tif (!ev._timed || (!ev.end_date.getHours() && !ev.end_date.getMinutes()))\r\n\t\t\tical.push(\"DTEND:\"+full_day_format(ev.end_date));\r\n\t\telse\r\n\t\t\tical.push(\"DTEND:\"+format(ev.end_date));\r\n\t\tical.push(\"SUMMARY:\"+ev.text);\r\n\t\tical.push(\"END:VEVENT\");\r\n\t}\r\n\treturn start+(header||\"\")+\"\\n\"+ical.join(\"\\n\")+\"\\n\"+end;\r\n};\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Timeline\", scheduler.assert);\r\n}","interface IViewPosition{\r\n\ttop: number;\r\n\tleft: number;\r\n}\r\n\r\ninterface IViewBox extends IViewPosition{\r\n\twidth: number;\r\n\theight: number;\r\n\tbottom: number;\r\n\tright: number;\r\n}\r\n\r\nexport class Tooltip {\r\n\tprivate _root: HTMLElement;\r\n\tprivate _tooltipNode: HTMLElement | null;\r\n\tprivate _scheduler: any;\r\n\r\n\tconstructor(scheduler: any){\r\n\t\tthis._scheduler = scheduler;\r\n\t}\r\n\r\n\tgetNode() : HTMLElement {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tif (!this._tooltipNode){\r\n\t\t\tthis._tooltipNode = document.createElement(\"div\");\r\n\t\t\tthis._tooltipNode.className = \"dhtmlXTooltip scheduler_tooltip tooltip\";\r\n\r\n\t\t\tscheduler._waiAria.tooltipAttr(this._tooltipNode);\r\n\t\t}\r\n\t\tif(scheduler.config.rtl){\r\n\t\t\tthis._tooltipNode.classList.add(\"dhtmlXTooltip_rtl\");\r\n\t\t} else{\r\n\t\t\tthis._tooltipNode.classList.remove(\"dhtmlXTooltip_rtl\");\r\n\t\t}\r\n\t\treturn this._tooltipNode;\r\n\t}\r\n\r\n\tsetViewport(node: HTMLElement):Tooltip{\r\n\t\tthis._root = node;\r\n\t\treturn this;\r\n\t}\r\n\r\n\tshow(left: number, top: number): Tooltip;\r\n\tshow(event: MouseEvent): Tooltip;\r\n\tshow(left: number | MouseEvent, top?: number): Tooltip {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tconst container = document.body;\r\n\t\tconst node = this.getNode();\r\n\r\n\t\tif(!domHelpers.isChildOf(node, container)){\r\n\t\t\tthis.hide();\r\n\t\t\tcontainer.appendChild(node);\r\n\t\t}\r\n\r\n\t\tif (this._isLikeMouseEvent(left)) {\r\n\t\t\tconst position = this._calculateTooltipPosition(left as MouseEvent);\r\n\t\t\ttop = position.top;\r\n\t\t\tleft = position.left;\r\n\t\t}\r\n\r\n\t\tnode.style.top = top + \"px\";\r\n\t\tnode.style.left = left + \"px\";\r\n\r\n\t\tscheduler._waiAria.tooltipVisibleAttr(node);\r\n\t\treturn this;\r\n\t}\r\n\thide() : Tooltip{\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst node = this.getNode();\r\n\t\tif(node && node.parentNode){\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t}\r\n\t\tscheduler._waiAria.tooltipHiddenAttr(node);\r\n\t\treturn this;\r\n\t}\r\n\r\n\tsetContent(html: string) : Tooltip{\r\n\t\tconst node = this.getNode();\r\n\t\tnode.innerHTML = html;\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// it is for salesforce, because it proxies event to it own events\r\n\tprivate _isLikeMouseEvent(event: any): boolean {\r\n\t\tif (!event || typeof event !== \"object\") {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn \"clientX\" in event && \"clientY\" in event;\r\n\t}\r\n\r\n\tprivate _getViewPort() : HTMLElement {\r\n\t\treturn this._root || document.body;\r\n\t}\r\n\r\n\r\n\tprivate _calculateTooltipPosition(event: MouseEvent): IViewPosition{\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\t// top/left coordinates inside the viewport by mouse position\r\n\t\tconst viewport = this._getViewPortSize();\r\n\t\tconst tooltipNode = this.getNode();\r\n\t\tconst tooltip: IViewBox = {\r\n\t\t\ttop:0,\r\n\t\t\tleft: 0,\r\n\t\t\twidth: tooltipNode.offsetWidth,\r\n\t\t\theight: tooltipNode.offsetHeight,\r\n\t\t\tbottom: 0,\r\n\t\t\tright: 0\r\n\t\t};\r\n\r\n\t\tconst offsetX = scheduler.config.tooltip_offset_x;\r\n\t\tconst offsetY = scheduler.config.tooltip_offset_y;\r\n\r\n\t\tconst container = document.body;\r\n\t\tconst mouse = domHelpers.getRelativeEventPosition(event, container);\r\n\t\tconst containerPos = domHelpers.getNodePosition(container);\r\n\t\tmouse.y += containerPos.y; // to fix margin collapsing\r\n\r\n\t\ttooltip.top = mouse.y;\r\n\t\ttooltip.left = mouse.x;\r\n\t\ttooltip.top += offsetY;\r\n\t\ttooltip.left += offsetX;\r\n\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\ttooltip.right = tooltip.left + tooltip.width;\r\n\r\n\t\tconst scrollTop = window.scrollY + container.scrollTop; // to fix margin collapsing\r\n\t\t// edge cases when the tooltip element can be partially hidden by edges of the viewport\r\n\t\tif(tooltip.top < viewport.top - scrollTop){\r\n\t\t\ttooltip.top = viewport.top;\r\n\t\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\t}else if(tooltip.bottom > viewport.bottom){\r\n\t\t\ttooltip.bottom = viewport.bottom;\r\n\t\t\ttooltip.top = tooltip.bottom - tooltip.height;\r\n\t\t}\r\n\r\n\t\tif(tooltip.left < viewport.left){\r\n\t\t\ttooltip.left = viewport.left;\r\n\t\t\ttooltip.right = viewport.left + tooltip.width;\r\n\t\t}else if(tooltip.right > viewport.right){\r\n\t\t\ttooltip.right = viewport.right;\r\n\t\t\ttooltip.left = tooltip.right - tooltip.width;\r\n\t\t}\r\n\r\n\t\tif(mouse.x >= tooltip.left && mouse.x <= tooltip.right) {\r\n\t\t\ttooltip.left = mouse.x - tooltip.width - offsetX;\r\n\t\t\ttooltip.right = tooltip.left + tooltip.width;\r\n\t\t}\r\n\r\n\t\tif(mouse.y >= tooltip.top && mouse.y <= tooltip.bottom) {\r\n\t\t\ttooltip.top = mouse.y - tooltip.height - offsetY;\r\n\t\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\t}\r\n\r\n\t\treturn tooltip;\r\n\t}\r\n\r\n\tprivate _getViewPortSize() : IViewBox {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tconst container = this._getViewPort();\r\n\t\tlet viewport = container;\r\n\t\tlet scrollTop = window.scrollY + document.body.scrollTop;\r\n\t\tlet scrollLeft = window.scrollX + document.body.scrollLeft;\r\n\t\tlet pos;\r\n\t\t// support for the initial tooltip mode where the tooltip element was attached to the data area of scheduler\r\n\t\tif(container === scheduler.$event_data){\r\n\t\t\tviewport = scheduler.$event;\r\n\t\t\tscrollTop = 0;\r\n\t\t\tscrollLeft = 0;\r\n\t\t\tpos = domHelpers.getNodePosition(scheduler.$event);\r\n\t\t}else{\r\n\t\t\tpos = domHelpers.getNodePosition(viewport);\r\n\t\t}\r\n\t\treturn {\r\n\t\t\tleft:pos.x + scrollLeft,\r\n\t\t\ttop: pos.y + scrollTop,\r\n\t\t\twidth: pos.width,\r\n\t\t\theight: pos.height,\r\n\t\t\tbottom: pos.y + pos.height + scrollTop,\r\n\t\t\tright: pos.x + pos.width + scrollLeft\r\n\t\t};\r\n\t}\r\n}\r\n","import * as utils from \"../../core/utils/utils\";\r\nimport { Tooltip } from \"./tooltip\";\r\n\r\ninterface ITrackerTarget {\r\n\tselector: string;\r\n\tonmouseenter: (event: MouseEvent, node: HTMLElement) => void;\r\n\tonmousemove: (event: MouseEvent, node: HTMLElement) => void;\r\n\tonmouseleave: (event: MouseEvent, node: HTMLElement) => void;\r\n\tglobal: boolean;\r\n}\r\n\r\ninterface ITooltipConfig {\r\n\tselector: string;\r\n\thtml: (event: MouseEvent, node: HTMLElement) => string;\r\n\tglobal: boolean;\r\n}\r\n\r\nexport class TooltipManager{\r\n\ttooltip: Tooltip;\r\n\tprotected _domEvents: any;\r\n\tprivate _listeners: object = {};\r\n\tprivate _scheduler: any;\r\n\tprivate delayShow: any;\r\n\tprivate delayHide: any;\r\n\r\n\tconstructor(scheduler: any) {\r\n\t\tthis.tooltip = new Tooltip(scheduler);\r\n\t\tthis._scheduler = scheduler;\r\n\t\tthis._domEvents = scheduler._createDomEventScope();\r\n\t\tthis._initDelayedFunctions();\r\n\t}\r\n\r\n\tdestructor(): void{\r\n\t\tthis.tooltip.hide();\r\n\t\tthis._domEvents.detachAll();\r\n\t}\r\n\thideTooltip(): void{\r\n\t\tthis.delayHide();\r\n\t}\r\n\tattach(config: ITrackerTarget): void {\r\n\t\tlet root = document.body;\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tif(!config.global){\r\n\t\t\troot = scheduler.$root;\r\n\t\t}\r\n\r\n\t\tlet watchableTarget = null;\r\n\t\tconst handler = (event) => {\r\n\t\t\tconst eventTarget = domHelpers.getTargetNode(event);\r\n\t\t\tconst targetNode = domHelpers.closest(eventTarget, config.selector);\r\n\t\t\tif(domHelpers.isChildOf(eventTarget, this.tooltip.getNode())){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tconst doOnMouseEnter = () => {\r\n\t\t\t\twatchableTarget = targetNode;\r\n\t\t\t\tconfig.onmouseenter(event, targetNode);\r\n\t\t\t};\r\n\r\n\t\t\tif(watchableTarget){\r\n\t\t\t\tif(targetNode && targetNode === watchableTarget){\r\n\t\t\t\t\tconfig.onmousemove(event, targetNode);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconfig.onmouseleave(event, watchableTarget);\r\n\t\t\t\t\twatchableTarget = null;\r\n\r\n\t\t\t\t\tif(targetNode && targetNode !== watchableTarget){\r\n\t\t\t\t\t\tdoOnMouseEnter();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(targetNode){\r\n\t\t\t\t\tdoOnMouseEnter();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tthis.detach(config.selector);\r\n\t\tthis._domEvents.attach(root, \"mousemove\", handler);\r\n\t\tthis._listeners[config.selector] = {\r\n\t\t\tnode: root,\r\n\t\t\thandler\r\n\t\t};\r\n\t}\r\n\r\n\tdetach(selector: string): void {\r\n\t\tconst listener = this._listeners[selector];\r\n\t\tif(listener){\r\n\t\t\tthis._domEvents.detach(listener.node, \"mousemove\", listener.handler);\r\n\t\t}\r\n\t}\r\n\r\n\ttooltipFor(config: ITooltipConfig): void {\r\n\t\tconst cloneDomEvent = (event: MouseEvent) => {\r\n\t\t\tlet clone = event;\r\n\t\t\t// making events survive timeout in ie\r\n\t\t\t// tslint:disable-next-line no-string-literal\r\n\t\t\tif(document[\"createEventObject\"] && !document.createEvent){\r\n\t\t\t\t// tslint:disable-next-line no-string-literal\r\n\t\t\t\tclone = document[\"createEventObject\"](event);\r\n\t\t\t}\r\n\t\t\treturn clone;\r\n\t\t};\r\n\t\tthis._initDelayedFunctions();\r\n\t\tthis.attach({\r\n\t\t\tselector: config.selector,\r\n\t\t\tglobal: config.global,\r\n\t\t\tonmouseenter:(event: MouseEvent, node: HTMLElement) => {\r\n\t\t\t\tconst html = config.html(event, node);\r\n\t\t\t\tif(html){\r\n\t\t\t\t\tthis.delayShow(cloneDomEvent(event), html);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tonmousemove:(event: MouseEvent, node: HTMLElement) => {\r\n\t\t\t\tconst html = config.html(event, node);\r\n\t\t\t\tif(html){\r\n\t\t\t\t\tthis.delayShow(cloneDomEvent(event), html);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\t\t\tthis.delayHide();\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tonmouseleave:() => {\r\n\t\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\t\tthis.delayHide();\r\n\t\t\t},\r\n\t\t});\r\n\t}\r\n\r\n\tprivate _initDelayedFunctions(){\r\n\t\tconst scheduler = this._scheduler;\r\n\t\t// reset delayed functions in order to apply current values of tooltip_timeout\r\n\t\tif(this.delayShow){\r\n\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t}\r\n\t\tif(this.delayHide){\r\n\t\t\tthis.delayHide.$cancelTimeout();\r\n\t\t}\r\n\t\tthis.tooltip.hide();\r\n\t\t\r\n\t\tthis.delayShow = (utils as any).default.delay((event: MouseEvent, html: string) => {\r\n\t\t\tif(scheduler.callEvent(\"onBeforeTooltip\", [event]) === false) {\r\n\t\t\t\tthis.tooltip.hide();\r\n\t\t\t} else {\r\n\t\t\t\tthis.tooltip.setContent(html);\r\n\t\t\t\tthis.tooltip.show(event);\r\n\t\t\t}\r\n\t\t}, scheduler.config.tooltip_timeout || 1);\r\n\r\n\t\tthis.delayHide = (utils as any).default.delay(() => {\r\n\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\tthis.tooltip.hide();\r\n\t\t}, scheduler.config.tooltip_hide_timeout || 1);\r\n\t}\r\n\r\n}","import { TooltipManager } from \"./tooltipManager\";\r\n\r\nexport default function (scheduler: any) {\r\n\r\n\tscheduler.config.tooltip_timeout = 30;\r\n\tscheduler.config.tooltip_offset_y = 20;\r\n\tscheduler.config.tooltip_offset_x = 10;\r\n\tscheduler.config.tooltip_hide_timeout = 30;\r\n\r\n\tconst tooltipManager = new TooltipManager(scheduler);\r\n\r\n\tscheduler.ext.tooltips = tooltipManager;\r\n\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function () {\r\n\r\n\t\ttooltipManager.tooltipFor({\r\n\t\t\tselector: \"[\" + scheduler.config.event_attribute + \"]\",\r\n\t\t\thtml: (event: MouseEvent) => {\r\n\t\t\t\tif (scheduler._mobile && !scheduler.config.touch_tooltip) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst targetEventId = scheduler._locate_event(event.target);\r\n\t\t\t\tif (scheduler.getEvent(targetEventId)) {\r\n\t\t\t\t\tconst event = scheduler.getEvent(targetEventId);\r\n\t\t\t\t\treturn scheduler.templates.tooltip_text(event.start_date, event.end_date, event);\r\n\t\t\t\t}\r\n\t\t\t\treturn null;\r\n\t\t\t},\r\n\t\t\tglobal: false\r\n\t\t});\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function () {\r\n\t\ttooltipManager.destructor();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onLightbox\", function () {\r\n\t\ttooltipManager.hideTooltip();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeDrag\", function() {\r\n\t\ttooltipManager.hideTooltip();\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventDeleted\", function() {\r\n\t\ttooltipManager.hideTooltip();\r\n\t\treturn true;\r\n\t});\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Tree Timeline\", scheduler.assert);\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Units\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\nscheduler._get_url_nav = function(){\r\n\tvar p = {};\r\n\tvar data = (document.location.hash || \"\").replace(\"#\", \"\").split(\",\");\r\n\tfor (var i = 0; i < data.length; i++) {\r\n\t\tvar s = data[i].split(\"=\");\r\n\t\tif (s.length == 2)\r\n\t\t\tp[s[0]] = s[1];\r\n\t}\r\n\treturn p;\r\n};\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\", function () {\r\n\tvar first = true;\r\n\tvar s2d = scheduler.date.str_to_date(\"%Y-%m-%d\");\r\n\tvar d2s = scheduler.date.date_to_str(\"%Y-%m-%d\");\r\n\tvar select_event = scheduler._get_url_nav().event || null;\r\n\r\n\tscheduler.attachEvent(\"onAfterEventDisplay\", function(ev){\r\n\t\tselect_event = null;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function (om, od, m, d) {\r\n\t\tif (first) {\r\n\t\t\tfirst = false;\r\n\t\t\tvar p = scheduler._get_url_nav();\r\n\r\n\t\t\tif (p.event){\r\n\t\t\t\ttry{\r\n\t\t\t\t\tif(scheduler.getEvent(p.event)){\r\n\t\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\t\tshowEvent(p.event);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tvar handler = scheduler.attachEvent(\"onXLE\", function(){\r\n\t\t\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\t\t\tshowEvent(p.event);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\tscheduler.detachEvent(handler);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (e){}\r\n\t\t\t}\r\n\r\n\t\t\tif (p.date || p.mode) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tthis.setCurrentView((p.date ? s2d(p.date) : null), (p.mode || null));\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\t//assuming that mode is not available anymore\r\n\t\t\t\t\tthis.setCurrentView((p.date ? s2d(p.date) : null), m);\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar values = [\r\n\t\t\t\"date=\" + d2s(d || od),\r\n\t\t\t\"mode=\" + (m || om)\r\n\t\t];\r\n\r\n\t\tif(select_event){\r\n\t\t\tvalues.push(\"event=\" + select_event);\r\n\t\t}\r\n\r\n\t\tvar text = \"#\" + values.join(\",\");\r\n\t\tdocument.location.hash = text;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tfunction showEvent(e){\r\n\t\tif(scheduler.$destroyed){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tselect_event = e;\r\n\t\tif(scheduler.getEvent(e)){\r\n\t\t\tscheduler.showEvent(e);\r\n\t\t}\r\n\t}\r\n});\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Week Agenda\", scheduler.assert);\r\n}","export default function(scheduler){\r\nscheduler.attachEvent(\"onLightBox\",function(){\r\n\tif (this._cover){\r\n\t\ttry{\r\n\t\t\tthis._cover.style.height = this.expanded ? \"100%\" : ((document.body.parentNode||document.body).scrollHeight+\"px\");\r\n\t\t} catch(e) {\r\n\r\n\t\t}\r\n\t}\r\n});\r\n\r\nscheduler.form_blocks.select.set_value=function(node,value,ev){\r\n\tif (typeof value == \"undefined\" || value === \"\")\r\n\t\tvalue = (node.firstChild.options[0]||{}).value;\r\n\tnode.firstChild.value=value||\"\";\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\t// scheduler.config.year_x = 4;\r\n\t// scheduler.config.year_y = 3;\r\n\t// scheduler.xy.year_top = 0;\r\n\r\n\tscheduler.templates.year_date = function(date) {\r\n\t\treturn scheduler.date.date_to_str(scheduler.locale.labels.year_tab + \" %Y\")(date);\r\n\t};\r\n\tscheduler.templates.year_month = scheduler.date.date_to_str(\"%F\");\r\n\tscheduler.templates.year_scale_date = scheduler.date.date_to_str(\"%D\");\r\n\tscheduler.templates.year_tooltip = function(s, e, ev) {\r\n\t\treturn ev.text;\r\n\t};\r\n\r\n\tconst isYearMode = function() {\r\n\t\treturn scheduler._mode == \"year\";\r\n\t};\r\n\t\r\n\tconst getCellDate = function(node){\r\n\t\tvar day = scheduler.$domHelpers.closest(node, \"[data-cell-date]\");\r\n\t\tif(!day || !day.hasAttribute(\"data-cell-date\")) return null;\r\n\t\treturn scheduler.templates.parse_date(day.getAttribute(\"data-cell-date\"));\r\n\t};\r\n\r\n\t// dbl click hook for scheduler._on_dbl_click\r\n\tscheduler.dblclick_dhx_month_head = function(e) {\r\n\t\tif (isYearMode()) {\r\n\t\t\tconst target = e.target;\r\n\t\t\tif(scheduler.$domHelpers.closest(target, \".dhx_before\") || scheduler.$domHelpers.closest(target, \".dhx_after\")){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tconst date = getCellDate(target);\r\n\t\t\t\r\n\t\t\tif(date){\r\n\t\t\t\tconst start = date;\r\n\t\t\t\tconst end = this.date.add(start, 1, \"day\");\r\n\t\t\t\tif (!this.config.readonly && this.config.dblclick_create){\r\n\t\t\t\t\tthis.addEventNow(start.valueOf(), end.valueOf(), e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\t\r\n\tscheduler.attachEvent(\"onEventIdChange\", function(){\r\n\t\tif (isYearMode())\r\n\t\t\tthis.year_view(true);\r\n\t});\r\n\r\n\r\n\tvar old = scheduler.render_data;\r\n\tscheduler.render_data = function(evs) {\r\n\t\tif (!isYearMode()) return old.apply(this, arguments);\r\n\t\tfor (var i = 0; i < evs.length; i++)\r\n\t\t\tthis._year_render_event(evs[i]);\r\n\t};\r\n\r\n\tvar clear = scheduler.clear_view;\r\n\tscheduler.clear_view = function() {\r\n\t\tif (!isYearMode()) return clear.apply(this, arguments);\r\n\t\tvar dates = scheduler._year_marked_cells,\r\n\t\t\tdiv = null;\r\n\t\tfor (var date in dates) {\r\n\t\t\tif (dates.hasOwnProperty(date)) {\r\n\t\t\t\tdiv = dates[date];\r\n\t\t\t\tdiv.classList.remove(\"dhx_year_event\", \"dhx_cal_datepicker_event\");\r\n\t\t\t\t// div.className = \"dhx_month_head\";\r\n\t\t\t\t// div.removeAttribute(\"date\");\r\n\t\t\t\t// div.removeAttribute(\"data-year-date\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tscheduler._year_marked_cells = {};\r\n\t};\r\n\r\n\tscheduler._hideToolTip = function() {\r\n\t\tif (this._tooltip) {\r\n\t\t\tthis._tooltip.style.display = \"none\";\r\n\t\t\tthis._tooltip.date = new Date(9999, 1, 1);\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._showToolTip = function(date, pos, e, src) {\r\n\t\tif (this._tooltip) {\r\n\t\t\tif (this._tooltip.date.valueOf() == date.valueOf()) return;\r\n\t\t\tthis._tooltip.innerHTML = \"\";\r\n\t\t} else {\r\n\t\t\tvar t = this._tooltip = document.createElement(\"div\");\r\n\t\t\tt.className = \"dhx_year_tooltip\";\r\n\t\t\tif (this.config.rtl) t.className += \" dhx_tooltip_rtl\";\r\n\t\t\tdocument.body.appendChild(t);\r\n\t\t\tt.addEventListener(\"click\", scheduler._click.dhx_cal_data);\r\n\t\t\tt.addEventListener(\"click\", function(e){\r\n\t\t\t\tif(e.target.closest(`[${scheduler.config.event_attribute}]`)){\r\n\t\t\t\t\tconst id = e.target.closest(`[${scheduler.config.event_attribute}]`).getAttribute(scheduler.config.event_attribute);\r\n\t\t\t\t\tscheduler.showLightbox(id);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\tvar evs = this.getEvents(date, this.date.add(date, 1, \"day\"));\r\n\t\tvar html = \"\";\r\n\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tif(!this.filter_event(ev.id, ev))\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\tvar bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\t\t\tvar color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\t\t\thtml += \"
\";\r\n\t\t\thtml += \"
\" + (evs[i]._timed ? this.templates.event_date(evs[i].start_date) : \"\") + \"
\";\r\n\t\t\thtml += \"
 
\";\r\n\t\t\thtml += this.templates.year_tooltip(evs[i].start_date, evs[i].end_date, evs[i]) + \"
\";\r\n\t\t}\r\n\r\n\t\tthis._tooltip.style.display = \"\";\r\n\t\tthis._tooltip.style.top = \"0px\";\r\n\r\n\r\n\t\tif (document.body.offsetWidth - pos.left - this._tooltip.offsetWidth < 0)\r\n\t\t\tthis._tooltip.style.left = pos.left - this._tooltip.offsetWidth + \"px\";\r\n\t\telse\r\n\t\t\tthis._tooltip.style.left = pos.left + src.offsetWidth + \"px\";\r\n\r\n\t\tthis._tooltip.date = date;\r\n\t\tthis._tooltip.innerHTML = html;\r\n\r\n\t\tif (document.body.offsetHeight - pos.top - this._tooltip.offsetHeight < 0)\r\n\t\t\tthis._tooltip.style.top = pos.top - this._tooltip.offsetHeight + src.offsetHeight + \"px\";\r\n\t\telse\r\n\t\t\tthis._tooltip.style.top = pos.top + \"px\";\r\n\t};\r\n\r\n\tscheduler._year_view_tooltip_handler = function(e){\r\n\t\tif (!isYearMode()) return;\r\n\r\n\t\tvar src = e.target || e.srcElement;\r\n\t\tif (src.tagName.toLowerCase() == 'a') // fix for active links extension (it adds links to the date in the cell)\r\n\t\t\tsrc = src.parentNode;\r\n\t\tif (scheduler._getClassName(src).indexOf(\"dhx_year_event\") != -1)\r\n\t\t\tscheduler._showToolTip(scheduler.templates.parse_date(src.getAttribute(\"data-year-date\")), scheduler.$domHelpers.getOffset(src), e, src);\r\n\t\telse\r\n\t\t\tscheduler._hideToolTip();\r\n\t};\r\n\tscheduler._init_year_tooltip = function() {\r\n\t\tscheduler._detachDomEvent(scheduler._els[\"dhx_cal_data\"][0], \"mouseover\", scheduler._year_view_tooltip_handler);\r\n\t\tscheduler.event(scheduler._els[\"dhx_cal_data\"][0], \"mouseover\", scheduler._year_view_tooltip_handler);\r\n\t};\r\n\r\n\tscheduler._get_year_cell = function(d) {\r\n\t\tvar dateString = scheduler.templates.format_date(d);\r\n\t\tvar cells = this.$root.querySelectorAll(`.dhx_cal_data .dhx_cal_datepicker_date[data-cell-date=\"${dateString}\"]`);\r\n\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\tif(!scheduler.$domHelpers.closest(cells[i], \".dhx_after, .dhx_before\")){\r\n\t\t\t\treturn cells[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t};\r\n\r\n\tscheduler._year_marked_cells = {};\r\n\tscheduler._mark_year_date = function(date, event) {\r\n\t\tvar dateString = scheduler.templates.format_date(date);\r\n\t\tvar cell = this._get_year_cell(date);\r\n\t\tif (!cell) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tvar ev_class = this.templates.event_class(event.start_date, event.end_date, event);\r\n\t\tif (!scheduler._year_marked_cells[dateString]) {\r\n\t\t\tcell.classList.add(\"dhx_year_event\", \"dhx_cal_datepicker_event\");// = \"dhx_month_head dhx_year_event\";\r\n\t\t\tcell.setAttribute(\"data-year-date\", dateString);\r\n\t\t\tcell.setAttribute(\"date\", dateString);\r\n\t\t\tscheduler._year_marked_cells[dateString] = cell;\r\n\t\t}\r\n\t\tif(ev_class){\r\n\t\t\tcell.classList.add(ev_class);\r\n\t\t}\r\n\t};\r\n\tscheduler._unmark_year_date = function(date) {\r\n\t\tvar cell = this._get_year_cell(date);\r\n\t\tif (!cell) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcell.classList.remove(\"dhx_year_event\", \"dhx_cal_datepicker_event\");\r\n//\t\tcell.className = \"dhx_month_head\";\r\n\t};\r\n\tscheduler._year_render_event = function(event) {\r\n\t\tvar date = event.start_date;\r\n\t\tif (date.valueOf() < this._min_date.valueOf()){\r\n\t\t\tdate = this._min_date;\r\n\t\t} else {\r\n\t\t\tdate = this.date.date_part(new Date(date));\r\n\t\t}\r\n\r\n\t\twhile (date < event.end_date) {\r\n\t\t\tthis._mark_year_date(date, event);\r\n\t\t\tdate = this.date.add(date, 1, \"day\");\r\n\t\t\tif (date.valueOf() >= this._max_date.valueOf())\r\n\t\t\t\treturn;\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler.year_view = function(mode) {\r\n\r\n\t\tscheduler.set_sizes();\r\n\r\n\t\tscheduler._table_view = mode;\r\n\r\n\t\tif (this._load_mode && this._load()) return;\r\n\r\n\t\tif (mode) {\r\n\t\t\tscheduler._init_year_tooltip();\r\n\t\t\tscheduler._reset_year_scale();\r\n\t\t\tif (scheduler._load_mode && scheduler._load()){\r\n\t\t\t\tscheduler._render_wait = true;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tscheduler.render_view_data();\r\n\t\t} else {\r\n\t\t\tscheduler._hideToolTip();\r\n\t\t}\r\n\t};\r\n\tscheduler._reset_year_scale = function() {\r\n\t\tthis._cols = [];\r\n\t\tthis._colsS = {};\r\n\t\tvar week_starts = []; //start day of first week in each month\r\n\t\tvar dataArea = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tvar c = this.config;\r\n\t\tdataArea.scrollTop = 0; //fix flickering in FF\r\n\t\tdataArea.innerHTML = \"\";\r\n\r\n\t\tvar dy = Math.floor((parseInt(dataArea.style.height) - scheduler.xy.year_top) / c.year_y);\r\n\t\tif (dy < 190) {\r\n\t\t\tdy = 190;\r\n\t\t}\r\n\r\n\t\tvar week_template = document.createElement(\"div\");\r\n\t\tvar dummy_date = this.date.week_start(scheduler._currentDate());\r\n\r\n\t\tthis._process_ignores(dummy_date, 7, \"day\", 1);\r\n\r\n\t\tfor (var i = 0; i < 7; i++) {\r\n\t\t\tif(!(this._ignores && this._ignores[i])) {\r\n\t\t\t\tthis._cols[i] = 'var(--dhx-scheduler-datepicker-cell-size)';\r\n\t\t\t\tthis._render_x_header(i, 0, dummy_date, week_template);\r\n\r\n\t\t\t}\r\n\t\t\tdummy_date = this.date.add(dummy_date, 1, \"day\");\r\n\t\t}\r\n\t\tweek_template.lastChild.className += \" dhx_scale_bar_last\";\r\n\r\n\t\tfor(var i = 0; i < week_template.childNodes.length; i++){\r\n\t\t\tthis._waiAria.yearHeadCell(week_template.childNodes[i]);\r\n\t\t}\r\n\r\n\t\tvar sd = this.date[this._mode + \"_start\"](this.date.copy(this._date));\r\n\t\tvar ssd = sd;\r\n\t\tvar yearBox = null;\r\n\t\tconst wrapper = document.createElement(\"div\");\r\n\t\twrapper.classList.add(\"dhx_year_wrapper\");\r\n\t\tfor (var i = 0; i < c.year_y; i++){\r\n\t\t\tfor (var j = 0; j < c.year_x; j++) {\r\n\t\t\t\tyearBox = document.createElement(\"div\");\r\n\t\t\t\tyearBox.className = \"dhx_year_box\";\r\n\r\n\t\t\t\tyearBox.setAttribute(\"date\", this._helpers.formatDate(sd));\r\n\t\t\t\tyearBox.setAttribute(\"data-month-date\", this._helpers.formatDate(sd));\r\n\t\t\t\tyearBox.innerHTML = \"
\" + week_template.innerHTML + \"
\";\r\n\r\n\t\t\t\tvar header = yearBox.querySelector(\".dhx_year_month\");\r\n\t\t\t\tvar grid = yearBox.querySelector(\".dhx_year_grid\");\r\n\t\t\t\tvar body = yearBox.querySelector(\".dhx_year_body\");\r\n\r\n\t\t\t\tvar headerId = scheduler.uid();\r\n\t\t\t\tthis._waiAria.yearHeader(header, headerId);\r\n\t\t\t\tthis._waiAria.yearGrid(grid, headerId);\r\n\r\n\r\n\t\t\t\theader.innerHTML = this.templates.year_month(sd);\r\n\r\n\r\n\r\n\t\t\t\tvar dd = this.date.week_start(sd);\r\n\t\t\t\tthis._reset_month_scale(body, sd, dd, 6);\r\n\r\n\t\t\t\tvar days = body.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var day = 0; day < days.length; day++){\r\n\t\t\t\t\tthis._waiAria.yearDayCell(days[day]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\twrapper.appendChild(yearBox);\r\n\r\n\t\t\t\tweek_starts[i * c.year_x + j] = (sd.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) % 7;\r\n\t\t\t\tsd = this.date.add(sd, 1, \"month\");\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdataArea.appendChild(wrapper);\r\n\r\n\t\tvar dateElement = this._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML = this.templates[this._mode + \"_date\"](ssd, sd, this._mode);\r\n\t\t}\r\n\r\n\t\tthis.week_starts = week_starts;\r\n\t\tweek_starts._month = ssd.getMonth();\r\n\t\tthis._min_date = ssd;\r\n\t\tthis._max_date = sd;\r\n\t};\r\n\r\n\tscheduler._reset_year_scale = function(){\r\n\r\n\t\tvar dataArea = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tdataArea.scrollTop = 0; //fix flickering in FF\r\n\t\tdataArea.innerHTML = \"\";\r\n\r\n\t\tlet yearStart = this.date.year_start(new Date(this._date));\r\n\t\t\r\n\t\tthis._min_date = this.date.week_start(new Date(yearStart));\r\n\r\n\t\tconst wrapper = document.createElement(\"div\");\r\n\t\twrapper.classList.add(\"dhx_year_wrapper\");\r\n\r\n\t\tlet currentDate = yearStart;\r\n\t\tfor(let i = 0; i < 12; i++){\r\n\t\t\tlet yearBox = document.createElement(\"div\");\r\n\t\t\tyearBox.className = \"dhx_year_box\";\r\n\r\n\t\t\tyearBox.setAttribute(\"date\", this._helpers.formatDate(currentDate));\r\n\t\t\tyearBox.setAttribute(\"data-month-date\", this._helpers.formatDate(currentDate));\r\n\t\t\tyearBox.innerHTML = `
${this.templates.year_month(currentDate)}
\r\n\t\t\t
`;\r\n\r\n\t\t\tconst yearGrid = yearBox.querySelector(\".dhx_year_grid\");\r\n\t\t\tconst datepicker = scheduler._createDatePicker(null, {\r\n\t\t\t\tdate: currentDate,\r\n\t\t\t\tminWeeks: 6\r\n\t\t\t});\r\n\t\t\tdatepicker._renderDayGrid(yearGrid);\r\n\t\t\tdatepicker.destructor();\r\n\r\n\t\t\twrapper.appendChild(yearBox);\r\n\r\n\t\t\tcurrentDate = this.date.add(currentDate, 1, \"month\");\r\n\r\n\t\t}\r\n\t\tdataArea.appendChild(wrapper);\r\n\r\n\t\tlet lastDate = this.date.add(yearStart, 1, \"year\");\r\n\t\tif(lastDate.valueOf() != this.date.week_start(new Date(lastDate)).valueOf()){\r\n\t\t\tlastDate = this.date.week_start(new Date(lastDate));\r\n\t\t\tlastDate = this.date.add(lastDate, 1, \"week\");\r\n\t\t}\r\n\t\tthis._max_date = lastDate;\r\n\t\tvar dateElement = this._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML = this.templates[this._mode + \"_date\"](yearStart, lastDate, this._mode);\r\n\t\t}\r\n\t};\r\n\r\n\tvar getActionData = scheduler.getActionData;\r\n\tscheduler.getActionData = function(n_ev) {\r\n\t\tif(!isYearMode()){\r\n\t\t\treturn getActionData.apply(scheduler, arguments);\r\n\t\t}\r\n\t\t\r\n\t\tvar date = getCellDate(n_ev.target);\r\n\t\treturn {\r\n\t\t\tdate:date,\r\n\t\t\tsection:null\r\n\t\t};\r\n\t};\r\n\r\n\tvar locateEvent = scheduler._locate_event;\r\n\tscheduler._locate_event = function(node) {\r\n\t\tvar id = locateEvent.apply(scheduler, arguments);\r\n\t\tif(!id){\r\n\t\t\t\r\n\t\t\tvar date = getCellDate(node);\r\n\t\t\tif(!date) return null;\r\n\t\t\tvar evs = scheduler.getEvents(date, scheduler.date.add(date, 1, \"day\"));\r\n\t\t\tif(!evs.length) return null;\r\n\r\n\t\t\t//can be multiple events in the cell, return any single one\r\n\t\t\tid = evs[0].id;\r\n\t\t}\r\n\t\treturn id;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tscheduler._hideToolTip();\r\n\t});\r\n}","export default function(scheduler){\r\n\r\n\r\n(function(){\r\n\r\nfunction defaults(obj, std){\r\n\tfor (var key in std)\r\n\t\tif (!obj[key])\r\n\t\t\tobj[key] = std[key];\r\n\treturn obj;\r\n}\r\n\r\nfunction getElementSizes(element, scheduler) {\r\n\tvar sizes = {};\r\n\telement = scheduler._els[element];\r\n\tif (element && element[0]) {\r\n\t\tsizes.x = element[0].scrollWidth;\r\n\t\tsizes.y = element[0].scrollHeight;\r\n\t} else {\r\n\t\tsizes.x = 0;\r\n\t\tsizes.y = 0;\r\n\t}\r\n\treturn sizes;\r\n}\r\n\r\n//compatibility for new versions of scheduler\r\nif(!window.dhtmlxAjax){\r\n\twindow.dhtmlxAjax = {\r\n\t\tpost: function(url, data, callback){\r\n\t\t\treturn window.dhx4.ajax.post(url, data, callback);\r\n\t\t},\r\n\t\tget: function(url, callback){\r\n\t\t\treturn window.ajax.get(url, callback);\r\n\t\t}\r\n\t};\r\n}\r\n\r\nfunction add_export_methods(scheduler){\r\n\r\n\tscheduler.exportToPDF = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.pdf\",\r\n\t\t\tformat:\"A4\",\r\n\t\t\torientation:\"landscape\",\r\n\t\t\tdpi:96,\r\n\t\t\tzoom:1,\r\n\t\t\trtl: scheduler.config.rtl\r\n\t\t});\r\n\t\tconfig.html = this._export_html(config);\r\n\t\tconfig.mode = this.getState().mode;\r\n\t\tthis._send_to_export(config, \"pdf\");\r\n\t};\r\n\r\n\tscheduler.exportToPNG = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.png\",\r\n\t\t\tformat:\"A4\",\r\n\t\t\torientation:\"landscape\",\r\n\t\t\tdpi:96,\r\n\t\t\tzoom:1,\r\n\t\t\trtl: scheduler.config.rtl\r\n\t\t});\r\n\t\tconfig.html = this._export_html(config);\r\n\t\tconfig.mode = this.getState().mode;\r\n\t\tthis._send_to_export(config, \"png\");\r\n\t};\r\n\r\n\tscheduler.exportToICal = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.ical\",\r\n\t\t\tdata:this._serialize_plain(null, config)\r\n\t\t});\r\n\t\tthis._send_to_export(config, \"ical\");\r\n\t};\r\n\r\n\tscheduler.exportToExcel = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.xlsx\",\r\n\t\t\ttitle:\"Events\",\r\n\t\t\tdata:this._serialize_plain( this.templates.xml_format, config),\r\n\t\t\tcolumns:this._serialize_columns()\r\n\t\t});\r\n\t\tthis._send_to_export(config, \"excel\");\r\n\t};\r\n\r\n\tscheduler._ajax_to_export = function(data, type, callback){\r\n\t\tdelete data.callback;\r\n\t\tvar url = data.server || \"https://export.dhtmlx.com/scheduler\";\r\n\r\n\t\twindow.dhtmlxAjax.post(url,\r\n\t\t\t\"type=\"+type+\"&store=1&data=\"+encodeURIComponent(JSON.stringify(data)),\r\n\t\t\tfunction(loader){\r\n\t\t\t\tvar fail = loader.xmlDoc.status > 400;\r\n\t\t\t\tvar info = null;\r\n\r\n\t\t\t\tif (!fail){\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\tinfo = JSON.parse(loader.xmlDoc.responseText);\r\n\t\t\t\t\t}catch(e){}\r\n\t\t\t\t}\r\n\t\t\t\tcallback(info);\r\n\t\t\t}\r\n\t\t);\r\n\t};\r\n\r\n\tscheduler._plain_export_copy = function(source, format){\r\n\t\tvar target = {};\r\n\t\tfor (var key in source)\r\n\t\t\ttarget[key] = source[key];\r\n\r\n\t\ttarget.start_date = format(target.start_date);\r\n\t\ttarget.end_date = format(target.end_date);\r\n\t\ttarget.$text = this.templates.event_text(source.start_date, source.end_date, source);\r\n\r\n\t\treturn target;\r\n\t};\r\n\r\n\tscheduler._serialize_plain = function(format, config){\r\n\t\tformat = format || scheduler.date.date_to_str(\"%Y%m%dT%H%i%s\", true);\r\n\r\n\t\tvar events;\r\n\t\tif (config && config.start && config.end)\r\n\t\t\tevents = scheduler.getEvents(config.start, config.end);\r\n\t\telse\r\n\t\t\tevents = scheduler.getEvents();\r\n\r\n\t\tvar data = [];\r\n\t\tfor (var i = 0; i< events.length; i++)\r\n\t\t\tdata[i] = this._plain_export_copy(events[i], format);\r\n\r\n\t\treturn data;\r\n\t};\r\n\r\n\tscheduler._serialize_columns = function(){\r\n\t\treturn [\r\n\t\t\t{ id:\"start_date\", header:\"Start Date\", width:30 },\r\n\t\t\t{ id:\"end_date\", header:\"End Date\", width:30 },\r\n\t\t\t{ id:\"$text\", header:\"Text\", width:100 }\r\n\t\t];\r\n\t};\r\n\r\n\tscheduler._send_to_export = function(data, type){\r\n\t\tif(!data.version){\r\n\t\t\tdata.version = scheduler.version;\r\n\t\t}\r\n\r\n\t\tif(!data.skin){\r\n\t\t\tdata.skin = scheduler.skin;\r\n\t\t}\r\n\r\n\t\tif (data.callback)\r\n\t\t\t\treturn scheduler._ajax_to_export(data, type, data.callback);\r\n\r\n\t\tvar form = this._create_hidden_form();\r\n\r\n\t\tform.firstChild.action = data.server || \"https://export.dhtmlx.com/scheduler\";\r\n\t\tform.firstChild.childNodes[0].value = JSON.stringify(data);\r\n\t\tform.firstChild.childNodes[1].value = type;\r\n\t\tform.firstChild.submit();\r\n\t};\r\n\r\n\tscheduler._create_hidden_form = function(){\r\n\t\tif (!this._hidden_export_form){\r\n\t\t\tvar t = this._hidden_export_form = document.createElement(\"div\");\r\n\t\t\tt.style.display = \"none\";\r\n\t\t\tt.innerHTML = \"
\";\r\n\t\t\tdocument.body.appendChild(t);\r\n\t\t}\r\n\t\treturn this._hidden_export_form;\r\n\t};\r\n\r\n\tscheduler._get_export_size = function(format, orientation, zoom, dpi, header, footer, scales) {\r\n\r\n\t\tdpi = parseInt(dpi)/25.4 || 4;\r\n\r\n\t\tvar sizes = {\r\n\t\t\t\"A5\":{ x:148, y:210 },\r\n\t\t\t\"A4\":{ x:210, y:297 },\r\n\t\t\t\"A3\":{ x:297, y:420 },\r\n\t\t\t\"A2\":{ x:420, y:594 },\r\n\t\t\t\"A1\":{ x:594, y:841 },\r\n\t\t\t\"A0\":{ x:841, y:1189 }\r\n\t\t};\r\n\r\n\t\tvar dataX = getElementSizes(\"dhx_cal_data\", this).x;\r\n\t\tvar dataY = getElementSizes(\"dhx_cal_data\", this).y;\r\n\t\tvar headY = getElementSizes(\"dhx_cal_header\", this).y;\r\n\t\tvar multY = getElementSizes(\"dhx_multi_day\", this).y;\r\n\r\n\t\tvar cSize = {\r\n\t\t\ty: dataY + headY + multY\r\n\t\t};\r\n\r\n\t\tif (format === \"full\") {\r\n\t\t\tcSize.x = dataX;\r\n\t\t} else {\r\n\t\t\tcSize.x = Math.floor( (orientation === \"landscape\" ? sizes[format].y : sizes[format].x) * dpi );\r\n\t\t}\r\n\r\n\t\tif (scales) {\r\n\t\t\tcSize.x *= (parseFloat(scales.x) || 1);\r\n\t\t\tcSize.y *= (parseFloat(scales.y) || 1);\r\n\t\t}\r\n\r\n\t\treturn cSize;\r\n\t};\r\n\r\n\tfunction getTimeline() {\r\n\t\tvar mode = scheduler.getState().mode;\r\n\t\tif (scheduler.matrix && scheduler.matrix[mode]) {\r\n\t\t\treturn scheduler.matrix[mode];\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n\r\n\tfunction getInitialSizes() {\r\n\t\tvar smartRendering = undefined,\r\n\t\t\tscrollable = undefined;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (timeline) {\r\n\t\t\tscrollable = timeline.scrollable;\r\n\t\t\tsmartRendering = timeline.smart_rendering;\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tnav_height: scheduler.xy.nav_height,\r\n\t\t\tscroll_width: scheduler.xy.scroll_width,\r\n\t\t\tstyle_width: scheduler._obj.style.width,\r\n\t\t\tstyle_height: scheduler._obj.style.height,\r\n\t\t\ttimeline_scrollable: scrollable,\r\n\t\t\ttimeline_smart_rendering: smartRendering\r\n\t\t};\r\n\t}\r\n\r\n\tfunction setExportSizes(size, initialSizes) {\r\n\t\tscheduler._obj.style.width = size.x + \"px\";\r\n\t\tscheduler._obj.style.height = size.y + \"px\";\r\n\r\n\t\tscheduler.xy.nav_height = 0;\r\n\t\tscheduler.xy.scroll_width = 0;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (initialSizes.timeline_scrollable || initialSizes.timeline_smart_rendering) {\r\n\r\n\t\t\ttimeline.scrollable = false;\r\n\t\t\ttimeline.smart_rendering = false;\r\n\t\t}\r\n\t}\r\n\r\n\tfunction setInitialSizes(initialSizes) {\r\n\t\tscheduler.xy.scroll_width = initialSizes.scroll_width;\r\n\t\tscheduler.xy.nav_height = initialSizes.nav_height;\r\n\t\tscheduler._obj.style.width = initialSizes.style_width;\r\n\t\tscheduler._obj.style.height = initialSizes.style_height;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (initialSizes.timeline_scrollable || initialSizes.timeline_smart_rendering) {\r\n\t\t\ttimeline.scrollable = initialSizes.timeline_scrollable;\r\n\t\t\ttimeline.smart_rendering = initialSizes.timeline_smart_rendering;\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler._export_html = function (obj) {\r\n\t\tvar initialSizes = getInitialSizes();\r\n\t\tvar size = scheduler._get_export_size(obj.format, obj.orientation, obj.zoom, obj.dpi, obj.header, obj.footer, obj.scales);\r\n\r\n\t\tvar html = \"\";\r\n\t\ttry {\r\n\t\t\tsetExportSizes(size, initialSizes);\r\n\t\t\tscheduler.setCurrentView();\r\n\t\t\thtml = scheduler._obj.innerHTML;\r\n\t\t} catch (e) {\r\n\r\n\t\t\t// eslint-disable-next-line no-console\r\n\t\t\tconsole.error(e);\r\n\t\t} finally {\r\n\t\t\tsetInitialSizes(initialSizes);\r\n\t\t\tscheduler.setCurrentView();\r\n\t\t}\r\n\r\n\t\treturn html;\r\n\t};\r\n\r\n}\r\n\r\nadd_export_methods(scheduler);\r\n\r\n\r\n})();\r\n\r\n}","import active_links from \"./active_links\";\r\nimport agenda_legacy from \"./agenda_legacy_view\";\r\nimport agenda_view from \"./agenda\";\r\nimport all_timed from \"./all_timed\";\r\nimport collision from \"./collision\";\r\nimport container_autoresize from \"./container_autoresize\";\r\nimport cookie from \"./cookie\";\r\nimport daytimeline_restricted from \"./restricted_extensions/daytimeline\";\r\nimport drag_between_restricted from \"./restricted_extensions/drag_between\";\r\nimport editors from \"./editors\";\r\nimport expand from \"./expand\";\r\nimport grid_view from \"./restricted_extensions/grid_view\";\r\nimport html_templates from \"./html_templates\";\r\nimport key_nav from \"./key_nav\";\r\nimport layer from \"./layer\";\r\nimport limit from \"./limit\";\r\nimport map_view from \"./map_view\";\r\nimport minical from \"./minical\";\r\nimport monthheight from \"./monthheight\";\r\nimport multisection_restricted from \"./restricted_extensions/multisection\";\r\nimport multiselect from \"./multiselect\";\r\nimport multisource from \"./multisource\";\r\nimport mvc from \"./mvc\";\r\nimport outerdrag from \"./outerdrag\";\r\nimport pdf from \"./pdf\";\r\nimport quick_info from \"./quick_info\";\r\nimport readonly from \"./readonly\";\r\nimport recurring from \"./recurring\";\r\nimport serialize from \"./serialize\";\r\nimport timeline_restricted from \"./restricted_extensions/timeline\";\r\nimport tooltip from \"./tooltip\";\r\nimport treetimeline_restricted from \"./restricted_extensions/treetimeline\";\r\nimport units_restricted from \"./restricted_extensions/units\";\r\nimport url from \"./url\";\r\nimport week_agenda_restricted from \"./restricted_extensions/week_agenda\";\r\nimport wp from \"./wp\";\r\nimport year_view from \"./year_view\";\r\nimport export_api from \"./export_api\";\r\n\r\nexport default {\r\n\tactive_links,\r\n\tagenda_legacy,\r\n\tagenda_view,\r\n\tall_timed,\r\n\tcollision,\r\n\tcontainer_autoresize,\r\n\tcookie,\r\n\tdaytimeline: daytimeline_restricted,\r\n\tdrag_between: drag_between_restricted,\r\n\teditors,\r\n\texpand,\r\n\texport_api,\r\n\tgrid_view,\r\n\thtml_templates,\r\n\tkey_nav,\r\n\tlayer,\r\n\tlimit,\r\n\tmap_view,\r\n\tminical,\r\n\tmonthheight,\r\n\tmultisection: multisection_restricted,\r\n\tmultiselect,\r\n\tmultisource,\r\n\tmvc,\r\n\touterdrag,\r\n\tpdf,\r\n\tquick_info,\r\n\treadonly,\r\n\trecurring,\r\n\tserialize,\r\n\ttimeline: timeline_restricted,\r\n\ttooltip,\r\n\ttreetimeline: treetimeline_restricted,\r\n\tunits: units_restricted,\r\n\turl,\r\n\tweek_agenda: week_agenda_restricted,\r\n\twp,\r\n\tyear_view\r\n};","import SchedulerFactory from \"./scheduler_factory\";\r\nimport gplExtensions from \"./ext/extensions_gpl\";\r\n\r\nconst factory = new SchedulerFactory(gplExtensions);\r\n\r\nconst scheduler = factory.getSchedulerInstance();\r\nconst Scheduler = {\r\n\tplugin: scheduler.bind(factory.plugin, factory)\r\n};\r\n\r\nwindow.scheduler = scheduler;\r\nwindow.Scheduler = Scheduler;\r\n\r\nif(!window.$dhx) {\r\n\twindow.$dhx = {};\r\n}\r\n\r\nwindow.$dhx.scheduler = scheduler;\r\nwindow.$dhx.Scheduler = Scheduler;\r\n\r\nexport default scheduler;export { scheduler, Scheduler };"],"names":["dhtmlxHook","dhtmlx","attaches","attachScheduler","day","mode","tabs","scheduler","obj","document","createElement","id","this","_genStr","innerHTML","body","appendChild","firstChild","attachObject","vs","av","sched","schedId","setSizes","updateView","destructor","init","_viewRestore","globalScope","window","global","global$1","assert","check","message","config","show_errors","callEvent","type","text","expire","console","log","extend","commonViews","agenda","grid","map","unit","timeline","week_agenda","year","anythingElse","requiredExtensions","limit","_commonErrorMessages","unknownView","view","relatedDoc","relatedExtension","collapsedContainer","div","createTimelineView","Error","createUnitsView","createGridView","addMarkedTimespan","renderCalendar","exportToPNG","join","exportToPDF","attachEvent","dhtmlxError","catchError","a","b","c","responseText","ajax_error","alert","className","element","classes","split","forEach","cssClass","classList","add","itemTypes","rows_container","row","setAttribute","fix_tab_position","$firstTab","$lastTab","$segmentedTab","date","button","builtInButton","spacer","minicalendarButton","minicalendarDiv","click","$_eventAttached","event","isCalendarVisible","destroyCalendar","position","getState","navigation","handler","calendar","setCurrentView","html_element","findRenderer","renderer","rows","cols","renderElement","css","width","value","style","height","html","align","justifyContent","prepareConfig","renderLayout","fragment","createDocumentFragment","items","Array","isArray","i","length","next","_init_nav_bar","navBar","$container","querySelector","_update_nav_bar","previousHeight","container","heightChanged","configChanged","newHeight","xy","nav_height","unset_actions","_els","get_elements","set_actions","display","isAttachedNode","root","parentNode","getWindowSize","w","innerWidth","documentElement","clientWidth","h","innerHeight","clientHeight","equals","listenWindowResize","oldSize","resizeDelay","clearTimeout","setTimeout","$destroyed","newSize","triggerSchedulerResize","$root","watchNodeResize","offsetHeight","previousWidth","offsetWidth","lowlevelResizeWatcher","addResizeListener","containerStyles","getComputedStyle","getPropertyValue","resizeWatcher","tabIndex","wai_aria_attributes","salesforce_environment","contentWindow","removeChild","EventHost","_silent_mode","listeners","createEventStorage","handlers","index","eventStorage","combinedResult","handlerResult","apply","arguments","addEvent","settings","handlerId","once","originalHandler","removeEvent","clear","makeEventable","eventHost","eventName","toLowerCase","thisObject","bind","innerId","attachAll","callback","name","eventArguments","handlerName","concat","checkEvent","detachEvent","list","eventId","detachAllEvents","extend$l","_detachDomEvent","el","removeEventListener","_init_once","scheduler_resize_listener","layout","navbar","render","header","dataArea","hasSchedulerMarkup","createDefaultHeader","views","nav","matrix","push","_props","_grid","names","optionalViews","viewName","_currentDate","_obj","getElementById","error","wai_aria_application_role","JSON","stringify","rtl","_skin_init","_scroll","init_templates","_init_touch_events","set_sizes","$initialized","min_event_height","bar_height","scale_width","scroll_width","scale_height","month_scale_height","menu_width","margin_top","margin_left","editor_width","month_head_height","event_header_height","keys","edit_save","edit_cancel","functor","object","_x","scale_x","_table_view","materialScalePlaceholder","_is_material_skin","insertBefore","set_xy","offsetTop","_lightbox","_setLbPosition","_data_width","left","right","node","x","y","prepareValue","val","prepared","isNaN","Number","Math","max","direction","undefined","top","els","getElementsByTagName","class_name","_getClassName","attr_value","getAttribute","label","locale","labels","_waiAria","labelAttr","domEventsScope","_createDomEventScope","detachAll","_click","attach","e","preventDefault","_temp_touch_block","_on_mouse_move","_ignore_next_click","_on_mouse_down","_on_mouse_up","_on_dbl_click","ev","src","target","srcElement","returnValue","_locate_event","select","_select_id","_close_not_saved","editStop","unselect","updateEvent","t","getEvent","_mode","Date","_date","min_date","_min_date","max_date","_max_date","editor_id","_edit_id","lightbox_id","_lightbox_id","new_event","_new_event","select_id","expanded","drag_id","_drag_id","drag_mode","_drag_mode","dhx_cal_data","cancelBubble","trg","getActionData","readonly","icon","closest","mask","indexOf","buttons","replace","valueOf","dhx_cal_prev_button","dhx_cal_next_button","dummy","step","def_step","dhx_cal_today_button","dhx_cal_tab","deprecated_name","substring","search","delete","confirm_deleting","_dhtmlx_confirm","title","title_confirm_deleting","deleteEvent","ok","icon_delete","edit","save","details","showLightbox","form","cancel","opts","result","confirm","addEventNow","start","end","base","_isObject","_isDate","d","event_duration","time_step","start_date","round","start_hour","first_hour","getHours","setHours","end_date","setTime","uid","_loading","_drag_event","dblclick_create","details_on_dblclick","_timed","call","_get_column_index","x_pos","column","_cols","_ignores","floor","_week_indexes_from_pos","pos","min","ceil","hour_size_px","_mouse_coords","$env","isIE","pageX","pageY","clientX","scrollLeft","clientLeft","clientY","scrollTop","clientTop","_colsS","$domHelpers","getAbsoluteLeft","getAbsoluteTop","dy","heights","_ignores_detected","preserve_length","_event_length","_get_real_event_length","x_step","x_unit","timestamp","confirm_closing","title_confirm_closing","positive_closing","_drag_pos","_correct_shift","back","getTimezoneOffset","_is_pos_changed","old_pos","new_pos","diff","old_val","new_val","acc","abs","delay","d_pos","has_moved","_correct_drag_start_date","len","_start_correction","_end_correction","last_hour","getMinutes","_get_fictional_event_length","_correct_drag_end_date","duration","mousedownPos","_get_date_from_pos","_drag_start","res","fields","timeStep","custom","time_part","_dragEventBody","_move_event_shift","resize_date","_drag_from_start","date_part","resize_from_start","end_day_start","end_day_date","firstHour","lastHour","maxY","precisePos","minDate","maxDate","preciseDate","cursor","shift","new_end","new_start","limit_drag_out","all_timed","_get_section_view","_get_event_sday","getView","getDate","_allow_dnd","update_render","sx","update_view","for_rendered","r","classname","drag_event_body","fullClass","_lame_clone","_get_private_properties","_clear_temporary_properties","clean","flagged_event","initial","current_state","_mobile","moved","_dhx_changed","is_new","_lame_copy","edit_on_create","details_on_create","isOneDayEvent","render_view_data","_trigger_dyn_loading","_load_mode","_load","_render_wait","_reset_ignores","_reset_scale","isViewExists","templates","_set_aria_buttons_attrs","buttonGroups","group","j","prev","headerButtonsAttributes","icon_form","icon_edit","oldClass","newClass","dhx_multi_day","prev_scroll","preserve_scroll","multidayScroll","_dy_shift","tab","headerToggleState","remove","_render_x_header","offset_top","head","left_border","columnHeaderText","dayHeaderAttr","_get_columns_num","from","to","count","count_n","_get_timeunit_start","_get_view_end","dd","ed","_calc_scale_sizes","summ","_process_ignores","realcount","_set_scale_col_size","_render_scales","data_area","sd","today","parseInt","scales","cls","firstHalf","slotDate","getFullYear","getMonth","format_date","htmlContent","time_slot_text","time_slot_class","secondHalf","week_date_class","dayColumnAttr","day_start","_getNavDateElement","str","drag_resize","drag_move","_scales","week_start","navBarDateStr","scaleElement","navBarDateAttr","_reset_month_scale","_reset_hours_scale","multi_day","c1","visibility","totalWidth","col_length","offset","hiddenWidth","c2","cloneNode","cc","content","hour_scale","hourScaleAttr","scroll_hour","now_date","n","preserve","ignore","ign_date","_render_month_scale","view_start","cd","tdwidths","cell_width","getCellHeight","cellheight","table","cell","month_date_class","body_class","head_class","monthCellAttr","cellHead","month_day","cellBody","bf1","cells","querySelectorAll","parse_date","getLabel","property","key","sections","lightbox","map_to","options","updateCollection","list_name","collection","serverList","splice","resetLightbox","hideCover","cache","Object","create","String","Boolean","prototype","hasOwnProperty","source","n_ev","section","_focus","focus","getDaysDifference","startDate","endDate","differenceInTime","getTime","differenceInDays","eventLength","startColumnIndex","endColumnIndex","_get_date_index","last_column","excludedDuration","intervalStart","intervalEnd","leftCellCutOffStart","leftCellCutOffEnd","rightCellCutOffStart","rightCellCutOffEnd","ev_length","dir","per_day","days","fd","start_slot","end_slot","_get_section_property","y_property","_is_initialized","state","_is_lightbox_open","defaultDomEvents","addEventListener","eventRemove","createEventScope","domEvents","eventScope","capture","detach","staticArray","slice","_eventRemoveAll","_trim","func","trim","htmlTags","RegExp","extraSpaces","stripHTMLLite","htmlText","singleQuotes","escapeQuotes","getAttributeString","attr","attributes","setAttributes","values","day_date","role","isActive","getHeaderCellAttr","dateString","eventAttr","_eventCommonAttr","event_text","$dataprocessor_class","setEventBarAttr","_getAttributes","attributeSetter","arg","eventBarAttrString","agendaHeadAttrString","agendaHeadDateString","agendaHeadDescriptionString","agendaDataAttrString","agendaEventAttrString","attrs","agendaDetailsBtnString","icon_details","gridAttrString","gridRowAttrString","gridCellAttrString","mapAttrString","mapRowAttrString","mapDetailsBtnString","minicalHeader","headerId","minicalGrid","minicalRow","minicalDayCell","selected","minicalHeadCell","weekAgendaDayCell","weekAgendaEvent","lightboxHiddenAttr","lightboxVisibleAttr","lightboxSectionButtonAttrString","tabindex","yearHeader","yearGrid","yearHeadCell","yearRow","yearDayCell","lightboxAttr","lightboxButtonAttrString","buttonName","eventMenuAttrString","iconName","lightboxHeader","headerText","lightboxSelectAttrString","time_option","month","hour","minute","messageButtonAttrString","buttonLabel","messageInfoAttr","messageModalAttr","quickInfoAttr","quickInfoHeaderAttrString","quickInfoHeader","quickInfoButtonAttrString","tooltipAttr","tooltipVisibleAttr","tooltipHiddenAttr","isDisabled","payload","uidSeed","now","pop","isStringObject","Function","toString","constructor","isNumberObject","isBooleanObject","isDate","defined","timeout","timer","$cancelTimeout","$pending","args","$execute","utils","mixin","force","f","copy","varType","elementPosition","elem","bottom","getBoundingClientRect","box","docElem","pageYOffset","pageXOffset","offsetLeft","offsetParent","getRelativeEventPosition","getNodePosition","getClassName","baseVal","getTargetNode","tagName","shadowRoot","composedPath","locateCss","strict","ind","charAt","isVisible","currentStyle","hiddenSection","recurringSection","hasNonNegativeTabIndex","hasHref","canHaveHref","area","nodeName","loLowerCase","isEnabled","canDisable","input","textarea","hasAttribute","getFocusableNodes","nodes","nodesArray","$position","sort","isValid","isShadowDomSupported","createShadowRoot","attachShadow","getActiveElement","activeElement","getSelection","focusNode","getRootNode","ShadowRoot","host","hasShadowParent","dom_helpers","htmlObject","getOffset","getOffsetSum","getOffsetRect","test","navigator","userAgent","dummyBox","selector","insertAfter","newNode","referenceNode","nextSibling","isChildOf","child","parent","contains","Element","matches","msMatchesSelector","webkitMatchesSelector","parentElement","nodeType","isWindowAwailable","env","isIE6","XMLHttpRequest","isIE7","isIE8","isOpera","isChrome","isKHTML","isFF","isIPad","isEdge","isNode","clearAll","_dp","serialize$1","data","serialized","encodeURIComponent","Promise","createConfig","method","url","async","headers","serialize","ajax","serializeRequestParams","parse","DOMParser","parseFromString","ActiveXObject","loadXML","xmltop","tagname","xhr","status","xml","responseXML","xpath","xpathExp","docObj","selectNodes","first","col","ownerDocument","evaluate","XPathResult","ANY_TYPE","iterateNext","query","_call","get","onLoad","getSync","put","postData","del","post","postSync","resolve","reject","isQt","match","readyState","xmlDoc","filePath","open","setRequestHeader","toUpperCase","send","urlSeparator","$ajax","generateStringToDate","format","utc","splt","code","csp_date_to_str","to_fixed","getUTCDate","getUTCMonth","getUTCFullYear","day_short","getUTCDay","getDay","day_full","month_short","month_full","getUTCHours","getUTCMinutes","getUTCSeconds","getSeconds","getUTCISOWeek","getISOWeek","csp_str_to_date","set","temp","month_short_hash","month_full_hash","UTC","canUseCsp","useCsp","csp","s","_bind_host_object","old","setMinutes","setSeconds","setMilliseconds","start_on_monday","month_start","setDate","year_start","setMonth","_add_days","inc","ndate","datesDiff","rest","hours","setYear","num","date_to_str","str_to_date","exactFormat","stringToDateMethod","parseExactFormat","yyyyMMddhhIIss","MMddyyyyhhIIss","ddMMyyyyhhIIss","ISO8601","isYMDDate","datestr","isMDYDate","isDMYDate","isISO8601","parseYMD","parseMDY","parseDMY","parse_exact_format","nday","first_thursday","year_number","ordinal_date","week_number","convert_to_utc","default_date","month_date","load_date","week_date","hour_date","date_format","api_date","displayed_event_color","displayed_event_text_color","wide_form","day_column_padding","use_select_menu_space","drag_create","resize_month_events","resize_month_timed","responsive_lightbox","separate_short_events","cascade_event_display","cascade_event_count","cascade_event_margin","multi_day_height_limit","drag_lightbox","server_utc","touch","touch_tip","touch_drag","touch_swipe_dates","quick_info_detached","drag_highlight","icons_edit","icons_select","buttons_left","buttons_right","highlight_displayed_event","delay_render","timeline_swap_resize","event_attribute","$initial","_helpers","parseDate","xml_date","formatDate","xml_format","d1","d2","day_scale_date","month_scale_date","week_scale_date","time_picker","event_date","load_format","event_header","event_class","event_bar_date","event_bar_text","month_events_link","drag_marker_class","drag_marker_content","tooltip_date_format","tooltip_text","calendar_month","calendar_scale_date","calendar_date","calendar_time","_events","_loaded","clear_view","extra_data","event_updated","silent","setEvent","hash","_rendered","changeEventId","new_id","create_getter","create_setter","_changed","is_visible_events","clear_event","in_visible_range","evFirstHour","evLastHour","end_dates_visible","hidden_duration","checkEndDate","get_visible_events","only_timed","stack","filter_event","filter","_is_main_area_event","evs","hold","full","_not_render","_recalculate_timed","tvs","tvd","_rendered_location","render_data","buffer","renderedLocation","_view_month_day","_render_month_link","toRender","_sday","_eday","curr","_sweek","getEvents","_get_event_bar_pos","widt","x2","_pre_render_events","containers","render_event_bar","max_evs","max_month_events","_sorder","locate_holder","real","render_event","_get_first_visible_cell","hb","h_old","_pre_render_events_line","_pre_render_events_table","monthRows","cellHeight","cHeight","unshift","scrollHeight","scroll_fix","scale_settings","sum_width","row_heights","full_multi_day_height","used_multi_day_height","used_multi_day_height_css","multi_day_section","multi_day_icon","overflowY","datePart","_get_event_mapped_end_date","ev_duration","_min_mapped_duration","evs_originals","sh","eh","_inner","t_ev","t_end_date","slot_index","sorderSet","_is_sorder","k","_max_sorder","max_count","_count","_copy_event","_time_order","_is_any_multiday_cell_visible","isAnyCellVisible","checkDate","noCells","lastDayEnd","cellIndex","locate_holder_day","weekCellIndex","out","weeks","chunks_info","first_chunk","last_chunk","chunk_info","locate_s","locate_e","_length","stack_line","_first_chunk","_last_chunk","_copy_dummy","_y_from_date","sm","_calc_event_y","min_height","em","parentWidth","menu","menu_offset","pos_y","ev_count","ev_sorder","margin","_render_v_bar","_text_style","parentPosition","zIndex","color","setProperty","tplClass","cssText","_editor","shiftKey","keyCode","icons","icons_str","ariaAttr","currentIcon","textColor","highlightEventPosition","contentA","contentB","cs","cse","boxWidth","renderEvent","inner_html","footer_class","_drag_resize","childNodes","past","_get_dnd_order","order","ev_height","max_height","_orig_sorder","evTop","columns","y_event_offset","resize_handle","resizable","left_chunk","right_chunk","resize_left","resize_right","timed","bg_color","style_text","_edit_stop_event","getRenderedEvent","rendered_events","rendered_event","showEvent","original_color","original_text_color","restoreOriginalColors","section_delimiter","getSectionTop","posFromDate","dx","_smartRenderingEnabled","scrollTo","_append_drag_marker","m","zone","scale","lastChild","previousSibling","_update_marker_position","size","_parsers","canParse","topElement","loader","csrfToken","security_key","arr","itms","itm","nodeValue","ud","udx","_xmlNodeToJSON","_userdata","_init_event","json","err","events","dhx_security","collections","collections_loaded","option","option_key","ical","c_start","c_end","incoming","event_r","e_start","e_end","exec","param","param_r","parse_param","substr","dh","dm","utcMark","dn","getSerializator","_load_url","prevent_cache","ajaxCallback","response","on_load","lf","cache_line","temp_to","extend$a","extend$9","extend$8","foundParser","parser","_process","_process_loading","_after_call","_tagvalue","_init_date","getSerializableData","createSerializator","dataset","allEvents","exportedEvent","exportValue","rawValue","load","setLoadMode","array","show_loading","_y","_lightbox_controls","formSection","getLightbox","getValue","form_blocks","get_value","setValue","set_value","get_template_control","control","get_select_control","get_textarea_control","get_time_control","defaults","template","time","sns","_get_input","_dhx_onchange","onchange","time_format","_time_format_order","cfg","dt","last","limit_time_select","p","selectBoxClass","range","start_year","end_year","year_range","tdate","_time_values","ariaAttrs","full_day","_full_day","checked","disabled","_fill_lightbox_select","auto_end_date","_update_lightbox_select","time_values","direct_value","fixed_value","value_found","t_v","selectedIndex","original","getLightboxRoot","cspEnvironment","salesforceEnvironment","showCover","show_cover","_cover","_fill_lightbox","lightbox_header","headerContent","headerDate","headerTitle","current_sns","_get_lightbox_section_node","block","default_value","_lightbox_out","_empty_lightbox","hide_lightbox","endLightbox","hide_cover","_move_while_dnd","_finish_dnd","save_lightbox","startLightbox","_custom_lightbox","_temp_lightbox","cancel_lightbox","hideLightbox","_init_lightbox_events","buttonTarget","sectionButton","button_click","action","readonly_active","setLightboxSize","_init_dnd_events","_dnd_start_lb","dhx_unselectable","lb","_lb_start","_ready_to_dnd","recurring","_lightbox_template","label_name","ds","t_ds","_bindLightboxLabels","labelBlock","inputBlock","fallback","inputId","old_id","mobile","MSStream","platform","maxTouchPoints","touchEventsSupported","createEvent","_touch_events","touches","PointerEvent","pointerEnabled","pointerType","msPointerEnabled","MSPOINTER_TYPE_MOUSE","accessor","tracker","scroll_mode","action_mode","dblclicktime","attachTouchEvent","passive","check_direction_swipe","s_ev","e_ev","max_dy","scrollable","doMouseMove","dnd","original_render","_update_global_tip","drag_cancel","_pointerDragId","pointerId","fake_event","_block_next_stop","actTask","fakeTask","sourceTask","_show_global_tip","_hide_global_tip","toptip","_global_tip","drag_to_create","drag_to_move","getRootView","tag","hooks","didInsert","cmp","_addThemeClass","skin","_skin_settings","_skin_xy","lightbox_additional_height","checkIfMaterialSkin","themeNameFromFile","links","href","_build_skin_info","monitorThemeChange","styles","themeVar","isCssVarTheme","themeName","cssValues","oldMaterialTheme","_theme_info","theme","cssVarTheme","themeVariables","calculatedMaterial","probe","cachedBorderBoxValue","checkIfBorderBoxStyling","boxSizing","refreshAfterLoad","_border_box_events","oldStyling","newStyling","_configure","setSkin","flatSkinHourScale","monitorIntervalId","clearInterval","setInterval","csstheme","_old_month_day","old_month_day","reorderTabs","specialTabs","tabName","find","firstTab","reverse","jQuery","$","counter","methods","fn","dhx_scheduler","each","Scheduler","getSchedulerInstance","comp","update_view_timer","curr_view_timer","lazy_setCurrentView","self","oldDate","oldMode","updateFlags","lazy_updateView","ars","DataProcessorEvents","dp","$scheduler","$dp","_dataProcessorHandlers","_validId","setUpdated","z","_in_progress","_invalid","updatedRows","_waitMode","_update_callback","upd","setUserData","action_param","_add_rec_marker","extendScheduler","_is_virtual_event","getUserData","_set_event_text_style","rec_type","rec_pattern","_dp_change_event_id","_dp_hook_delete","setDp","DataProcessor","serverProcessorURL","serverProcessor","autoUpdate","updateMode","_tMode","_headers","_payload","post_delim","messages","updated","inserted","deleted","invalid","invalid_cell","enableUTFencoding","eventable","setTransactionMode","total","_tSend","_endnm","_serializeAsJson","_router","router","escape","_utf","setDataColumns","_columns","getSyncState","enableDataNames","enablePartialDataSend","setUpdateMode","master","rowId","findRow","existing","set_invalid","is_invalid","markRow","sendData","_methods","getActionByState","checkBeforeUpdate","sendAllData","_beforeSendData","_getRowData","_sendData","_serializeAsJSON","serialize_one","pref","_applyPayload","dataToSend","_onResolvedCreateUpdate","resultState","sid","tid","afterUpdateCallback","routerMode","actionPromise","update","then","catch","queryParams","ids","afterUpdate","urlParams","_user","_cleanupArgumentsBeforeSend","preprocessedData","_cleanupItemBeforeSend","valid","_forEachUpdatedRow","_getAllData","has_one","pattern","defineAction","_uActions","btag","marker","correct","originalSid","_errorResponse","cleanUpdate","_setDefaultTransactionMode","_serverProcessor","that","finalizeUpdate","atag","_initialized","_dp_init","dataProcessorEvents","_dataprocessor","setOnAfterUpdate","setOnBeforeUpdateHandler","setAutoUpdate","interval","user","_need_update","_update_busy","xml_node","afterAutoUpdate","fullSync","intervalId","loadUpdate","getUpdates","_getXmlNodeValue","version","vers","updates","processedData","updatedItem","output","_prepareDataItem","item","processedItem","dataItem","createDataProcessor","tMode","batchUpdate","boxAttribute","_dhx_msg_cfg","usercall","modalBox","hide","modal_key","which","messageBox","keyboard","domHelpers","modality","cover","classValue","buttonAriaAttrs","buttonCss","info","timers","pull","getFirstDefined","_boxStructure","contentId","inner","message_ok","message_cancel","btn","_createBox","hidden","alertPopup","confirmPopup","boxPopup","box_params","params","alertBox","confirmBox","focusable","subtype","seed","hideAll","popups","modalbox","ar","day_tab","week_tab","month_tab","icon_save","icon_cancel","section_description","section_time","confirm_recurring","section_recurring","button_recurring","button_recurring_open","button_edit_series","button_edit_occurrence","grid_tab","be","agenda_tab","description","year_tab","week_agenda_tab","repeat_radio_day","repeat_radio_week","repeat_radio_month","repeat_radio_year","repeat_radio_day_type","repeat_text_day_count","repeat_radio_day_type2","repeat_week","repeat_text_week_count","repeat_radio_month_type","repeat_radio_month_start","repeat_text_month_day","repeat_text_month_count","repeat_text_month_count2_before","repeat_text_month_count2_after","repeat_year_label","select_year_day2","repeat_text_year_day","select_year_month","repeat_radio_end","repeat_text_occurences_count","repeat_radio_end2","repeat_radio_end3","month_for_recurring","day_for_recurring","ca","cn","da","de","en","es","fi","fr","he","hu","it","jp","LocaleManager","_locales","nb","nl","no","pl","pt","ro","ru","si","sk","sv","tr","ua","i18nFactory","DatePicker","modes","currentRange","eventDates","currentModeIndex","onStateChangeHandlers","_domEvents","onStateChange","oldState","newState","_notifyStateChange","newDate","setFullYear","setState","newIndex","backwardArrow","monthLabel","innerText","toLocaleString","startYear","_toggleMode","forwardArrow","_adjustDate","_renderCalendarHeader","dataContainer","_renderDayGrid","_renderMonthGrid","_renderYearGrid","daysOfWeekContainer","currentDate","labelFormat","dayElement","currWeek","minWeeks","minSchedulerDate","maxSchedulerDate","eventDaysTable","reduce","dayStart","_renderDayGridHeader","firstDate","monthStart","monthEnd","lastDate","_weeksBetween","currDate","dayGridContainer","dateCell","wrapper","months","formatLabel","monthElement","doneArea","doneBtn","yearElement","factoryMethod","extensionManager","common_errors","common","schedulerCore","wai_aria","dom","_createDatePicker","_getFocusableNodes","_locate_css","messageApi","event_highlight","dhtmlx_suite_hooks","skins","jquery","dataProcessorExtend","connector","i18n","addLocale","setLocale","localeObject","getLocale","dhx_save_btn","dhx_cancel_btn","dhx_delete_btn","ext","activePlugins","plugins","extensionList","getExtensionList","treetimeline","daytimeline","outerdrag","legacy","plugin","getExtension","dependencies","priorities","extension","dep","dependencyName","orderA","orderB","ExtensionsManager","_extensions","SchedulerFactory","extensions","_seed","_schedulerPlugins","_bundledExtensions","_extensionsManager","initConfig","_internal_id","$syncFactory","_initFromConfig","calendars","addCalendar","active_links","active_link_view","_active_link_click","s_d","do_wrapper","fullname","week_x","d_s","agenda_legacy","add_agenda_legacy","agenda_legacy_time","agenda_legacy_text","agenda_legacy_date","agenda_legacy_start","old_dblclick_dhx_cal_data","dblclick_dhx_cal_data","fill_agenda_tab","old_render_view_data","_agendaScrollTop","set_full_view","l","rowAttr","dateHeader","descriptionHeader","tableAttr","ev_class","agendaDetailsButtonAttr","agenda_time","agenda_text","agenda_area","v_border","dateElement","agenda_date","agenda_legacy_view","agenda_start","agenda_end","agenda_view","add_agenda","dayDateToStr","dayDowToStr","agenda_day","eventsInDays","anyEvents","eventStart","renderEmptyView","renderDay","calendarEvent","renderOneEvent","dates","selectedId","bg","all_timed_month","is_event_short","_safe_copy","proto","event_pid","isPrototypeOf","event_length","old_prerender_events_line","old_prerender_events_table","prerender_events","ce","_virtual","isOvernightEvent","getNextDay","setDateTime","event_changed","re","redraw","next_day","old_get_visible_events","old_mode","old_date","oldUpdate","fullRedrawNeeded","collision","temp_section","before","collision_limit","_setTempSection","event_id","checked_mode","checkCollision","edited_ev","_roll_back_dates","_check_sections_collision","second","evs_dates","getRecDates","tevs","concurrent","single","container_autoresize","month_day_min_height","min_grid_size","min_map_size","old_pre_render_event","active","total_height","multiday_height","evl","_h_fix","navHeight","headerHeight","checked_divs","updateContainterHeight","is_repaint","checked_div","maxHeight","rows_length","year_y","week_agenda_scale_height","cur_height","eventsContainer","g","_gridView","y_unit","getSectionHeight","scrollWidth","getScrollSize","callUpdate","conditionalUpdateContainerHeight","asyncRepaint","requestAnimationFrame","autosizeEnabled","$original_scroll_width","$original_section_autoheight","section_autoheight","cookie","setCookie","cookie_param","getCookie","getCookieName","_get_url_nav","urlNavigationPlugin","schedulerCookie","unescape","newMode","old_load","notImplemented","daytimeline_restricted","drag_between_restricted","editors","cached_options","resetCombo","_combo","DOMParent","combo","unload","DOMelem","dhx_globalImgPath","image_path","dhtmlXCombo","options_height","setOptionHeight","enableFilteringMode","filtering","script_path","all_options","single_option","addOption","getIndexByValue","selectOption","selected_id","disable","setComboValue","getSelectedValue","getSelectedText","vertical","radiobuttons","checked_value","isChecked","check_html","label_html","checkbox","unchecked_value","expand","fullscreen","toggleIcon","_position","_width","_height","_overflow","overflow","_maximize","collapse","directions","prev_margin","grid_view","html_templates","all","keyboard_shortcuts","$keyboardNavigation","shortcuts","createCommand","modifiers","alt","ctrl","meta","shortcut","commands","expr","getExpressions","words","getWords","command","commandKeys","specialKeys","charCodeAt","getCommandFromEvent","domEvent","altKey","ctrlKey","metaKey","printableKey","fromCharCode","getHashFromEvent","getHash","parts","junctionChar","term","combinationChar","backspace","enter","esc","space","up","down","home","pageup","pagedown","insert","plus","f1","f2","f3","f4","f5","f6","f7","f8","f9","f10","f11","f12","eventhandler","EventHandler","_handlers","findHandler","doAction","unbind","bindAll","initKeys","trap_modal_focus","trapFocus","currentFocus","currentIndex","nextIndex","nextItem","divs","renderMultiple","currentStart","currentEnd","TimeSlot","_modes","_getMode","units","renderVerticalMarker","renderTimelineMarker","renderYearMarker","renderMonthMarker","weekAgenda","renderWeekAgendaMarker","renderAgendaMarker","dayColumns","addWaiAriaLabel","addDataAttributes","dateToStr","dateTimeLabel","sectionObject","markerDate","_wrapDiv","_get_year_cell","opacity","view_opts","areas","round_position","blocks","_trace_x","_is_column_visible","start_pos","end_pos","set_date_part","_timeline_getX","tempStart","tempEnd","_section_height","_isRender","renderMonthCell","weekNumber","dayIndex","datatable","inner_index","all_hours_height","hour_ms","lineHeight","scheduler_node","SchedulerNode","_compose","getDefaultNode","getMode","blur","enable","removeAttribute","_compareEvents","_pickEvent","startId","eventElement","Event","getNode","nextEventHandler","activeNode","dispatcher","nextEvent","currEvent","visibleDates","nextEv","setActiveNode","prevEventHandler","HeaderCell","getNodes","_key_nav_copy_paste","nav_node","KeyNavNode","moveTo","compareTo","canStringifyThis","canStringifyThat","header_cell","defaultCell","_getSection","_getNodes","eventNode","defaultElement","isScrolledIntoView","eventBox","viewPort","idSelector","inlineEditor","getInlineEditor","isMultisectionEvent","keepScrollPosition","_moveToSlot","slot","nextSlot","time_slot","movingDate","getDefaultDate","key_nav_step","_getDefaultSection","visibleTime","nowTime","showNowTime","findVisibleColumn","clone","timeslot","_getMultisectionView","_getNextSection","sectionId","isInRange","defaultSlot","DataArea","smart_rendering","_pasteDate","_pasteSection","addMonthDate","nextMonthSlot","_alignTimeSlot","nextTimelineSlot","newPos","nextUnitsSlot","optionsCount","nextDaySlot","_moveDate","isBeforeLastHour","isStartDate","minutes","isAfterFirstHour","isInVisibleDayTime","oldStart","toNextDay","testEnd","nextWeekAgendaSlot","nextAgendaSlot","isDateVisible","nextDateColumn","current","tempSlot","extendSlot","extendUnitsSlot","extendTimelineSlot","extendMonthSlot","extendDaySlot","extendWeekAgendaSlot","extendGenericSlot","allowedDirections","moveDate","newDates","extendSlotDates","oldSlot","newSlot","dateDirection","scrollSlot","minical_button","MinicalButton","globalNode","MinicalCell","minical_cell","_getGrid","_getNode","enabled","newRow","newCol","modals","modalsStack","isModal","afterPopup","startModal","endModal","isTopModal","currentTarget","traceLightbox","_keyNavMessagePopup","focusElement","backupFocus","core","getActiveNode","setDefaultNode","focusGlobalNode","blurNode","editor","keyDownHandler","defaultPrevented","schedulerNode","_timeout","key_nav_legacy","_temp_key_scope","key_nav","isCopy","trackMousePosition","mousePointer","keyNavPointer","elementFromPoint","clear_event_after","copyEvent","_make_pasted_event","multisection","_do_paste","is_copy","modified_ev","original_ev","_is_key_nav_active","getSelectedEvent","_buffer_event","new_ev","scheduler_handlers","attachSchedulerHandlers","focusHandler","waitCall","reFocusActiveNode","mousedownHandler","dataAreaClick","focusEvent","evNode","prevState","lastStart","lastEnd","lastSection","minical_handlers","_minicalendars","isMinical","minicalendars","patchMinicalendar","focusMinical","minicalClick","rowIndex","td","renderMinical","cal","added","destroyMinical","_def_count","addShortcut","scope","scopeObject","getScope","getShortcutHandler","removeShortcut","disp","scopes","minicalButton","minicalDate","timeSlot","searchMap","attachOnce","isSchedulerSelected","changeState","layer","layers","validId","_clearUpdateFlag","_cloneObj","_dataprocessors","_layers_zindex","initial_layer_zindex","isDefault","defaultLayer","showLayer","tlayer","toggleLayer","hideLayer","visible","getLayer","layer_name","native_event_object","noMenu","_evs_layer","_t_render_view_data","evs_layer","borderBox","borderBoxWidth","headerWidth","bodyWidth","footerWidth","bodyHeight","new_zIndex","filter_agenda","limit_start","limit_end","limit_view","check_limits","mark_now","display_marked_timespans","overwrite_marked_timespans","_temp_limit_scope","dhx_time_block","default_timespan_type","fix_options","zones","get_resulting_options","blockTime","unblockTime","deleteMarkedTimespan","om","od","nm","nd","isBlocked","date_end","resetDate","checkInMarkedTimespan","timespan_type","on_overlap","temp_start_date","temp_end_date","timespans","_marked_timespans","day_value","day_index","getZones","_get_zone_minutes","eventEnd","markerStart","markerEnd","blocker","checkLimitViolation","complete_res","allow","_get_blocked_zones","timeline_zones","blocked_timeline_zones","_get_relevant_blocked_zones","_add_timespan_zones","resultZones","view_config","linker","is_new_event","data_copy","native_object","_mark_now","_mark_now_timer","dhx_now_time","_remove_mark_now","_append_mark_now","zone_start","start_index","end_index","units_l","r_divs","t_day","t_div","_render_marked_timespan","_prepare_timespan_options","r_configs","temp_configs","t_days","cloned_config","invert_zones","invertZones","view_key","t_config","c_config","t_sd","t_ed","zone_end","_get_dates_by_index","start_day","delta","t_date","_get_css_classes_by_config","css_classes","_get_block_by_config","date_to_display","min_day","sday","block_proto","_mark_timespans","_on_scale_add_marker","markTimespan","configuration","rebuild_els","timespans_ids","_marked_timespans_ids","timespan_types","_marked_timespans_types","unmarkTimespan","_addMarkerTimespanConfig","unit_id","timespans_view","day_configs","_array","configs","current_zones","resulting_zones","c_zone_start","c_zone_end","isLast","_subtract_timespan_zones","is_modified","_delete_marked_timespan_by_id","parent_array","_delete_marked_timespan_by_config","viewspans","_delete_marked_timespans_list","dayConfig","day_timespans","d_t","related_zones","types","typedConfig","_get_types_to_render","specific","types_to_render","_get_configs_to_render","_get_unit_index","day_ind","unitsPerDay","unit_zones","unit_types","global_data","day_types","dblclick_dhx_marked_timespan","map_view","mapView","geocoder","points","markers","infoWindow","createMarker","google","maps","Marker","map_date_width","map_icon_width","map_description_width","map_resolve_event_location","map_resolve_user_location","map_initial_position","LatLng","map_error_position","map_infowindow_max_width","map_type","MapTypeId","ROADMAP","map_zoom_after_resolve","marker_geo_success","marker_geo_fail","marker_date","marker_text","event_location","dblclick_dhx_map_area","map_time","map_text","map_start","add_map","map_date","_latLngUpdate","_isMapPositionSet","gmap","dhx_gmap","_setMapSize","mapOptions","zoom","map_initial_zoom","center","mapTypeId","Map","disableDefaultUI","disableDoubleClickZoom","addListener","point","latLng","geocode","results","GeocoderStatus","OK","geometry","location","lat","lng","formatted_address","infoWindowOptions","maxWidth","_points","_markers","_infowindow","InfoWindow","_infowindows_content","_initialization_count","Geocoder","geolocation","getCurrentPosition","_userLocation","coords","latitude","longitude","setCenter","setZoom","setContent","getCenter","setPosition","getZoom","fill_map_tab","showAddress","clear_map_tab","_selected_event_id","close","setMap","ariaButtonAttr","elem_id","marginRight","marginLeft","marginTop","temp_center","map_end","trigger","selectEvent","performClick","_displayEventOnMap","address","language","_updateEventLocation","_delay","ret","old_event_id","new_event_id","_event_resolve_delay","minical","minicalDomEvents","minicalendar","mark_events","_synced_minicalendars","_prev","is_refresh","cont","tpos","_get_def_cont","_render_calendar","$dom","cellRoot","dateAttribute","unmarkCalendar","markCalendar","_last_date","conf","markedDates","_markCalendarCurrentDate","sync","_on_xle_handler","refreshOnLoad","updateCalendar","_created","_locateCalendar","weekNum","dat","dayCell","_week_template","week_template","dummy_date","_mini_cal_arrows","previous","ts","temp2","temp3","temp4","temp5","temp6","temp7","temp8","padding","weekHeader","move_minicalendar_date","css_classnames","css_texts","diffs","arrow","dayHeaders","dayCells","inputs","selects","inp","number","new_date","_update_minical_select","isFulldayEvent","_attach_action","_round_minutes","linkCalendar","datediff","dateNew","month_end","noHighlight","monthheight","old_s","multisection_restricted","multiselect","parseXMLOptions","parseJSONOptions","_result","_children","_mark_inputs","_ids","delimiter","script_url","divLoading","multisource","backup","mvc","use_id","sanitize","update_timer","_start_ext_load","_finish_ext_load","_get_id","model","cid","backbone","toJSON","changes","queue","add_from_queue","Backbone","Collection","dragger","dhtmlDragAndDropObject","stopDrag","last_event","on_drop","sourceHtmlObject","dhtmlObject","targetHtmlObject","targetHtml","action_data","event_data","view_options","_locate_cell_timeline","addDragLanding","_drag","_dragIn","shtmlObject","_dragOut","DragControl","addDrop","onDrop","sourceDhtmlx","getMaster","onDragIn","pdf","html_regexp","newline_regexp","clean_html","x_norm","parseFloat","colsWidth","x_norm_event","is_left","dhx_cal_header","y_norm","get_style","de_day","de_week","xml_start","xml_end","xml_top","profile","footer","xml_body_header","dhx_cal_date","xh","xml_month_scale","xml_month","yh","xhs","second_scale","top_width","top_col","xml_body","colors","week_starts","_month","text_color","zx","zdx","left_norm","zy","zdy","e_type","dets","week","dy_copy","toXML","original_date","original_mode","temp_date","getPDFData","send_xml","submit","to_pdf","schedulersToPdf","objects","toPDF","toPDFRange","quick_info","show_quick_info","showQuickInfo","hiding_function","hideQuickInfo","quick_info_title","quick_info_content","quick_info_date","_quick_info_box_id","_get_event_counter_part","_quick_info_box","_init_quick_info","_fill_quick_data","_show_quick_info","cssTimeToMs","milliseconds","forced","qi","_x_scroll","dataPos","_quick_info_onscroll_handler","$testmode","_qi_button_click","domEv","titleContent","titleDate","main","mainContent","originalRecurringSetValue","original_left_buttons","original_right_buttons","readonly_form","forbidden_buttons","button_arrays","forbidden_button","button_array","txt_replace","txts","txtt","originalForm","readonlyForm","_lightbox_r","occurrence_timestamp_in_utc","recurring_workdays","_get_node","_outer_html","outerHTML","getOuterHTML","rec","loc","repeat_date_of_end","_ds","_get_form_node","_get_node_value","_get_node_numeric_value","_set_node_value","hash_value","_init_set_value","_end_date","str_date_format","repeat_date","str_date","include_end_by","date_str","register_els","inps","formatter","change_current_view","get_repeat_code","get_rcode","repeat","get_end_rule","transpose_type","transp","set_end_rule","has_values","_get_repeat_code","get_numeric_value","repeat_precise","_start","start_exists","transpose_day_week","set_rcode","set_repeat_code","dispatchEvent","MouseEvent","_set_repeat_code","elements","_rec_init_done","rf","blocked","_is_modified_occurence","_toggle_block","actual_dates","timeControl","getTimeSection","_start_date","_get_button","getRecurringSection","_get_form","backgroundPosition","getFirstSectionOfType","_rec_markers","_rec_markers_pull","_pid_time","_get_rec_marker","ch","_get_rec_markers","clearMilliseconds","_rec_temp","old_add_event","ev_id","_ignore_call","tev","_pid_changed","nid","nev","sub","isEventFound","showLightbox_rec","lightbox_recurring","pid","isVirtual","showSeries","title_confirm_recurring","get_visible_events_rec","old_update_event","transponse_size","day_week","originalMonth","cday","newMonth","cor","cor2","transposeRecurring","recurringParts","dayDurationMs","addRecurring","recurringStepDays","weekDays","seriesInstance","currentCount","maxCount","origMonth","origYear","correctOverflowInstances","recurring_overflow_instances","getMilliseconds","non_render","startHour","visibleCount","_fix_daylight_saving_date","ted","recurrings","sev","data_attributes","all_events","_serialize_json_value","toICal","full_day_format","timeline_restricted","Tooltip","_scheduler","_tooltipNode","_root","_isLikeMouseEvent","_calculateTooltipPosition","viewport","_getViewPortSize","tooltipNode","tooltip","offsetX","tooltip_offset_x","offsetY","tooltip_offset_y","mouse","containerPos","scrollY","_getViewPort","scrollX","$event_data","$event","TooltipManager","_listeners","_initDelayedFunctions","hideTooltip","delayHide","watchableTarget","eventTarget","targetNode","doOnMouseEnter","onmouseenter","onmousemove","onmouseleave","listener","cloneDomEvent","delayShow","utils.default","show","tooltip_timeout","tooltip_hide_timeout","tooltipManager","tooltips","tooltipFor","touch_tooltip","targetEventId","treetimeline_restricted","units_restricted","s2d","d2s","select_event","week_agenda_restricted","wp","year_view","year_date","year_month","year_scale_date","year_tooltip","isYearMode","getCellDate","dblclick_dhx_month_head","_year_render_event","_year_marked_cells","_hideToolTip","_tooltip","_showToolTip","_year_view_tooltip_handler","_init_year_tooltip","_mark_year_date","_unmark_year_date","_reset_year_scale","year_top","ssd","yearBox","year_x","yearStart","datepicker","locateEvent","export_api","std","getElementSizes","sizes","dhtmlxAjax","dhx4","add_export_methods","orientation","dpi","_export_html","_send_to_export","exportToICal","_serialize_plain","exportToExcel","_serialize_columns","_ajax_to_export","server","fail","_plain_export_copy","$text","_create_hidden_form","_hidden_export_form","_get_export_size","A5","A4","A3","A2","A1","A0","dataX","dataY","headY","multY","cSize","getTimeline","getInitialSizes","smartRendering","style_width","style_height","timeline_scrollable","timeline_smart_rendering","setExportSizes","initialSizes","setInitialSizes","gplExtensions","drag_between","factory","$dhx"],"mappings":";;;;AACe,WAAAA,aAAAA;AAEf,QAAWC,OAAAA,UAAU,eAAeA,OAAOC,UAAU;AACpDD,aAAOC,SAASC,kBAAkB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ACAoC,QACA1J,aAAasK,wBACbukC,cAActkC,yBACdC,SACAkC,QACAs/B,YACA1+B,WACAC,gBACAkQ,SACA4D,OACA53E,OACAiiF,UACAyG,SACAiE,aACAlY,cAAcoY,yBACdC,aACAU,aACAE,KACAl3B,WACA05B,KACAuD,YACAjgF,UACA6lC,WACAhiB,WACA13B,UAAU89F,qBACVU,SACA7nC,cAAciqC,yBACd53B,OAAO63B,kBACPtpE,KACAt3B,aAAaghG,wBACbC,IACAC,UAAAA;AC1ED,QAAMuE,UAAU,IAAIhuC,iBAAiB8tC,aAEhC;AAAA,QAACloG,YAAYooG,QAAQhlD;AACrB,QAACD,cAAY,EACjBsW,QAAQz5D,UAAU8M,KAAKs7F,QAAQ3uC,QAAQ2uC;AAGxC9mG,SAAOtB,YAAYA;AACnBsB,SAAO6hD,YAAYA;AAEnB,MAAI7hD,CAAAA,OAAO+mG,MAAM;AAChB/mG,WAAO+mG,OAAO;EACf;AAEA/mG,SAAO+mG,KAAKroG,YAAYA;AACxBsB,SAAO+mG,KAAKllD,YAAYA;;;;;;"} \ No newline at end of file +{"version":3,"file":"dhtmlxscheduler.js","sources":["../../sources/dhtmlx_hook.js","../../sources/global.js","../../sources/core/common/assert.js","../../sources/core/common_errors.js","../../sources/core/connector.js","../../sources/core/nav_bar.js","../../sources/core/scheduler_resize_listener.js","../../sources/utils/eventable.js","../../sources/core/scheduler.js","../../sources/core/utils/event.js","../../sources/core/utils/scoped_event.js","../../sources/core/common.js","../../sources/core/wai_aria.js","../../sources/core/utils/utils.js","../../sources/core/utils/dom_helpers.js","../../sources/utils/env.js","../../sources/core/destructor.js","../../sources/core/common/url_serialize.js","../../sources/core/utils/ajax.js","../../sources/core/base.js","../../sources/core/config.js","../../sources/core/event.js","../../sources/core/event_highlight.js","../../sources/core/loaders/xml.js","../../sources/core/loaders/json.js","../../sources/core/loaders/ical.js","../../sources/core/common/get_serializable_events.js","../../sources/core/load.js","../../sources/core/lightbox.js","../../sources/core/touch.js","../../sources/core/dhtmlx/dhtmlx_suite_hooks.js","../../sources/core/skins.js","../../sources/core/jquery.js","../../sources/core/delay_render.js","../../sources/core/dataprocessor/dataprocessor_hooks.js","../../sources/core/dataprocessor/dataprocessor.js","../../sources/core/message.js","../../sources/locale/locale_ar.js","../../sources/locale/locale_be.js","../../sources/locale/locale_ca.js","../../sources/locale/locale_cn.js","../../sources/locale/locale_cs.js","../../sources/locale/locale_da.js","../../sources/locale/locale_de.js","../../sources/locale/locale_el.js","../../sources/locale/locale_en.js","../../sources/locale/locale_es.js","../../sources/locale/locale_fi.js","../../sources/locale/locale_fr.js","../../sources/locale/locale_he.js","../../sources/locale/locale_hu.js","../../sources/locale/locale_id.js","../../sources/locale/locale_it.js","../../sources/locale/locale_jp.js","../../sources/locale/locale_manager.js","../../sources/locale/locale_nb.js","../../sources/locale/locale_nl.js","../../sources/locale/locale_no.js","../../sources/locale/locale_pl.js","../../sources/locale/locale_pt.js","../../sources/locale/locale_ro.js","../../sources/locale/locale_ru.js","../../sources/locale/locale_si.js","../../sources/locale/locale_sk.js","../../sources/locale/locale_sv.js","../../sources/locale/locale_tr.js","../../sources/locale/locale_ua.js","../../sources/locale/index.js","../../sources/core/datepicker.js","../../sources/scheduler_factory_method.js","../../sources/ext/extension_manager.js","../../sources/scheduler_factory.js","../../sources/ext/active_links.js","../../sources/ext/agenda_legacy_view.js","../../sources/ext/agenda.js","../../sources/ext/all_timed.js","../../sources/ext/collision.js","../../sources/ext/container_autoresize.js","../../sources/ext/cookie.js","../../sources/ext/restricted_extensions/not_implemented_extension.js","../../sources/ext/restricted_extensions/daytimeline.js","../../sources/ext/restricted_extensions/drag_between.js","../../sources/ext/editors.js","../../sources/ext/expand.js","../../sources/ext/restricted_extensions/grid_view.js","../../sources/ext/html_templates.js","../../sources/ext/keyboard_navigation/common/keyboard_shortcuts.js","../../sources/ext/keyboard_navigation/common/eventhandler.js","../../sources/ext/keyboard_navigation/common/trap_modal_focus.js","../../sources/ext/keyboard_navigation/marker.js","../../sources/ext/keyboard_navigation/elements/scheduler_node.js","../../sources/ext/keyboard_navigation/elements/nav_node.js","../../sources/ext/keyboard_navigation/elements/header_cell.js","../../sources/ext/keyboard_navigation/elements/event.js","../../sources/ext/keyboard_navigation/elements/time_slot.js","../../sources/ext/keyboard_navigation/elements/minical_button.js","../../sources/ext/keyboard_navigation/elements/minical_cell.js","../../sources/ext/keyboard_navigation/elements/data_area.js","../../sources/ext/keyboard_navigation/modals.js","../../sources/ext/keyboard_navigation/core.js","../../sources/ext/keyboard_navigation/key_nav_legacy.js","../../sources/ext/keyboard_navigation/scheduler_handlers.js","../../sources/ext/keyboard_navigation/minical_handlers.js","../../sources/ext/key_nav.js","../../sources/ext/layer.js","../../sources/ext/limit.js","../../sources/ext/map_view.js","../../sources/ext/minical.js","../../sources/ext/monthheight.js","../../sources/ext/restricted_extensions/multisection.js","../../sources/ext/multiselect.js","../../sources/ext/multisource.js","../../sources/ext/mvc.js","../../sources/ext/outerdrag.js","../../sources/ext/pdf.js","../../sources/ext/quick_info.js","../../sources/ext/readonly.js","../../sources/ext/recurring.js","../../sources/ext/serialize.js","../../sources/ext/restricted_extensions/timeline.js","../../sources/ext/tooltip/tooltip.ts","../../sources/ext/tooltip/tooltipManager.ts","../../sources/ext/tooltip/index.ts","../../sources/ext/restricted_extensions/treetimeline.js","../../sources/ext/restricted_extensions/units.js","../../sources/ext/url.js","../../sources/ext/restricted_extensions/week_agenda.js","../../sources/ext/wp.js","../../sources/ext/year_view.js","../../sources/ext/export_api/index.js","../../sources/ext/extensions_gpl.js","../../sources/dhtmlxscheduler.gpl.js"],"sourcesContent":["\r\nexport default function(){\r\n/* global dhtmlx */\r\nif (typeof dhtmlx != \"undefined\" && dhtmlx.attaches) {\r\n\tdhtmlx.attaches.attachScheduler = function (day, mode, tabs, scheduler) {\r\n\t\tvar tabs = tabs || '
';\r\n\t\tvar obj = document.createElement(\"DIV\");\r\n\t\tobj.id = \"dhxSchedObj_\" + this._genStr(12);\r\n\t\tobj.innerHTML = '
' + tabs + '
';\r\n\t\tdocument.body.appendChild(obj.firstChild);\r\n\r\n\t\tthis.attachObject(obj.id, false, true);\r\n\r\n\t\tthis.vs[this.av].sched = scheduler;\r\n\t\tthis.vs[this.av].schedId = obj.id;\r\n\t\tscheduler.setSizes = scheduler.updateView;\r\n\t\tscheduler.destructor = function () { };\r\n\t\tscheduler.init(obj.id, day, mode);\r\n\r\n\t\treturn this.vs[this._viewRestore()].sched;\r\n\t};\r\n}\r\n\r\n}","\r\n/* eslint-disable no-restricted-globals */\r\nvar globalScope;\r\nif(typeof window !== \"undefined\"){\r\n\tglobalScope = window;\r\n}else{\r\n\tglobalScope = global;\r\n}\r\n/* eslint-enable no-restricted-globals */\r\n\r\nexport default globalScope;","export default function(scheduler){\r\n\treturn function assert(check, message){\r\n\t\tif (!check){\r\n\t\t\tif(scheduler.config.show_errors && scheduler.callEvent(\"onError\",[message]) !== false) {\r\n\t\t\t\tif (scheduler.message) {\r\n\t\t\t\t\tscheduler.message({type: \"error\", text: message, expire: -1});\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t// eslint-disable-next-line\r\n\t\t\t\t\tconsole.log(message);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// eslint-disable-next-line no-debugger\r\n\t\t\t\tdebugger;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n}","export default function extend(scheduler) {\r\n\r\nvar commonViews = {\r\n\tagenda: \"https://docs.dhtmlx.com/scheduler/agenda_view.html\",\r\n\tgrid: \"https://docs.dhtmlx.com/scheduler/grid_view.html\",\r\n\tmap: \"https://docs.dhtmlx.com/scheduler/map_view.html\",\r\n\tunit: \"https://docs.dhtmlx.com/scheduler/units_view.html\",\r\n\ttimeline: \"https://docs.dhtmlx.com/scheduler/timeline_view.html\",\r\n\tweek_agenda: \"https://docs.dhtmlx.com/scheduler/weekagenda_view.html\",\r\n\tyear: \"https://docs.dhtmlx.com/scheduler/year_view.html\",\r\n\tanythingElse: \"https://docs.dhtmlx.com/scheduler/views.html\"\r\n};\r\n\r\nvar requiredExtensions = {\r\n\tagenda: \"ext/dhtmlxscheduler_agenda_view.js\",\r\n\tgrid: \"ext/dhtmlxscheduler_grid_view.js\",\r\n\tmap: \"ext/dhtmlxscheduler_map_view.js\",\r\n\tunit: \"ext/dhtmlxscheduler_units.js\",\r\n\ttimeline: \"ext/dhtmlxscheduler_timeline.js, ext/dhtmlxscheduler_treetimeline.js, ext/dhtmlxscheduler_daytimeline.js\",\r\n\tweek_agenda: \"ext/dhtmlxscheduler_week_agenda.js\",\r\n\tyear: \"ext/dhtmlxscheduler_year_view.js\",\r\n\tlimit: \"ext/dhtmlxscheduler_limit.js\"\r\n};\r\n\r\nscheduler._commonErrorMessages = {\r\n\tunknownView: function(view){\r\n\t\tvar relatedDoc = \"Related docs: \" + (commonViews[view] || commonViews.anythingElse); \r\n\t\tvar relatedExtension = requiredExtensions[view] ? (\"You're probably missing \" + requiredExtensions[view] + \".\") : \"\";\r\n\t\treturn (\r\n\t\t\t\"`\"+view+\"` view is not defined. \\n\" +\r\n\t\t\t\"Please check parameters you pass to `scheduler.init` or `scheduler.setCurrentView` in your code and ensure you've imported appropriate extensions. \\n\" + \r\n\t\t\trelatedDoc + \"\\n\" + (relatedExtension ? (relatedExtension + \"\\n\") : \"\"));\r\n\t},\r\n\tcollapsedContainer: function(div){\r\n\t\treturn \"Scheduler container height is set to *100%* but the rendered height is zero and the scheduler is not visible. \\n\"+\r\n\t\t\"Make sure that the container has some initial height or use different units. For example:\\n\" +\r\n\t\t\"
\\n\";\r\n\t}\r\n};\r\n\r\nscheduler.createTimelineView = function() {\r\n\tthrow new Error(\"scheduler.createTimelineView is not implemented. Be sure to add the required extension: \" + requiredExtensions.timeline + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.timeline);\r\n};\r\n\r\nscheduler.createUnitsView = function() {\r\n\tthrow new Error(\"scheduler.createUnitsView is not implemented. Be sure to add the required extension: \" + requiredExtensions.unit + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.unit);\r\n};\r\n\r\nscheduler.createGridView = function() {\r\n\tthrow new Error(\"scheduler.createGridView is not implemented. Be sure to add the required extension: \" + requiredExtensions.grid + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.grid);\r\n};\r\n\r\nscheduler.addMarkedTimespan = function() {\r\n\tthrow new Error(\"scheduler.addMarkedTimespan is not implemented. Be sure to add the required extension: ext/dhtmlxscheduler_limit.js\" + \r\n\t\"\\n\" +\r\n\t\"Related docs: https://docs.dhtmlx.com/scheduler/limits.html\");\r\n};\r\n\r\nscheduler.renderCalendar = function() {\r\n\tthrow new Error(\"scheduler.renderCalendar is not implemented. Be sure to add the required extension: ext/dhtmlxscheduler_minical.js\" + \r\n\t\"\\n\" +\r\n\t\"https://docs.dhtmlx.com/scheduler/minicalendar.html\");\r\n};\r\n\r\nscheduler.exportToPNG = function() {\r\n\tthrow new Error([\r\n\t\t\"scheduler.exportToPNG is not implemented.\",\r\n\t\t\"This feature requires an additional module, be sure to check the related doc here https://docs.dhtmlx.com/scheduler/png.html\",\r\n\t\t\"Licensing info: https://dhtmlx.com/docs/products/dhtmlxScheduler/export.shtml\"\r\n\t].join(\"\\n\"));\r\n};\r\n\r\nscheduler.exportToPDF = function() {\r\n\tthrow new Error([\r\n\t\t\"scheduler.exportToPDF is not implemented.\",\r\n\t\t\"This feature requires an additional module, be sure to check the related doc here https://docs.dhtmlx.com/scheduler/pdf.html\",\r\n\t\t\"Licensing info: https://dhtmlx.com/docs/products/dhtmlxScheduler/export.shtml\"\r\n\t].join(\"\\n\"));\r\n};\r\n\r\n\r\n}","import global from \"../global\";\r\n\r\nexport default function extend(scheduler) {\r\n/*\r\nif (global.dataProcessor && !dataProcessor.prototype.init_original){\r\n\tdataProcessor.prototype.init_original=dataProcessor.prototype.init;\r\n\tdataProcessor.prototype.init=function(obj){\r\n\t\tthis.init_original(obj);\r\n\t\tobj._dataprocessor=this;\r\n\r\n\t\tthis.setTransactionMode(\"POST\",true);\r\n\t\tthis.serverProcessor+=(this.serverProcessor.indexOf(\"?\")!=-1?\"&\":\"?\")+\"editing=true\";\r\n\t};\r\n}*/\r\n\r\nscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\tif(typeof dhtmlxError !== \"undefined\") {\r\n\t\twindow.dhtmlxError.catchError(\"LoadXML\", function(a, b, c){\r\n\t\t\tvar message = c[0].responseText;\r\n\r\n\t\t\tswitch (scheduler.config.ajax_error){\r\n\t\t\t\tcase \"alert\":\r\n\t\t\t\t\tglobal.alert(message);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"console\":\r\n\t\t\t\t\tglobal.console.log(message);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n});\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nfunction div(className){\r\n\tvar element = document.createElement(\"div\");\r\n\tvar classes = (className || \"\").split(\" \");\r\n\tclasses.forEach(function(cssClass){\r\n\t\telement.classList.add(cssClass);\r\n\t});\r\n\treturn element;\r\n}\r\nvar itemTypes = {\r\n\trows_container: function(){\r\n\t\treturn div(\"dhx_cal_navbar_rows_container\");\r\n\t},\r\n\trow: function(){\r\n\t\treturn div(\"dhx_cal_navbar_row\");\r\n\t},\r\n\tview: function (config) {\r\n\t\tvar element = div(\"dhx_cal_tab\");\r\n\t\telement.setAttribute(\"name\", config.view + \"_tab\");\r\n\t\telement.setAttribute(\"data-tab\", config.view);\r\n\t\t// element.setAttribute(\"data-viewname\", config.view); // FIXME: need to remove? not used anywhere\r\n\t\tif(scheduler.config.fix_tab_position){\r\n\t\t\tif(config.$firstTab) {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_first\");\r\n\t\t\t}else if(config.$lastTab) {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_last\");\r\n\t\t\t} else if(config.view !== \"week\") {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_standalone\");\r\n\t\t\t}\r\n\r\n\t\t\tif(config.$segmentedTab) {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn element;\r\n\t},\r\n\tdate: function () {\r\n\t\treturn div(\"dhx_cal_date\");\r\n\t},\r\n\tbutton: function (config) {\r\n\t\treturn div(\"dhx_cal_nav_button dhx_cal_nav_button_custom dhx_cal_tab\");\r\n\t},\r\n\tbuiltInButton: function (config){\r\n\t\treturn div(\"dhx_cal_\" + config.view + \"_button dhx_cal_nav_button\");\r\n\t},\r\n\tspacer: function () {\r\n\t\treturn div(\"dhx_cal_line_spacer\");\r\n\t},\r\n\tminicalendarButton: function(config){\r\n\t\tvar minicalendarDiv = div('dhx_minical_icon');\r\n\t\tif(!config.click && !minicalendarDiv.$_eventAttached){\r\n\t\t\t\r\n\t\t\tscheduler.event(minicalendarDiv, \"click\", function () {\r\n\t\t\t\tif (scheduler.isCalendarVisible()) {\r\n\t\t\t\t\tscheduler.destroyCalendar();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tscheduler.renderCalendar({\r\n\t\t\t\t\t\tposition: this,\r\n\t\t\t\t\t\tdate: scheduler.getState().date,\r\n\t\t\t\t\t\tnavigation: true,\r\n\t\t\t\t\t\thandler: function (date, calendar) {\r\n\t\t\t\t\t\t\tscheduler.setCurrentView(date);\r\n\t\t\t\t\t\t\tscheduler.destroyCalendar();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn minicalendarDiv;\r\n\t},\r\n\thtml_element: function (config) {\r\n\t\treturn div(\"dhx_cal_nav_content\");\r\n\t}\r\n};\r\n\r\nfunction findRenderer(config) {\r\n\tvar renderer;\r\n\tif (config.view) {\r\n\t\tswitch (config.view){\r\n\t\t\tcase \"today\":\r\n\t\t\tcase \"next\":\r\n\t\t\tcase \"prev\":\r\n\t\t\t\trenderer = itemTypes.builtInButton;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"date\":\r\n\t\t\t\trenderer = itemTypes.date;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"spacer\":\r\n\t\t\t\trenderer = itemTypes.spacer;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"button\":\r\n\t\t\t\trenderer = itemTypes.button;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"minicalendar\":\r\n\t\t\t\trenderer = itemTypes.minicalendarButton;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\trenderer = itemTypes.view;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t} else if(config.rows) {\r\n\t\trenderer = itemTypes.rows_container;\r\n\t} else if(config.cols) {\r\n\t\trenderer = itemTypes.row;\r\n\t}\r\n\treturn renderer;\r\n}\r\n\r\nfunction renderElement(config){\r\n\tvar renderer = findRenderer(config);\r\n\tif(!renderer){\r\n\t\treturn;\r\n\t}\r\n\tvar element = renderer(config);\r\n\tif(config.css){\r\n\t\telement.classList.add(config.css);\r\n\t}\r\n\tif(config.width){\r\n\t\tvar value = config.width;\r\n\t\tif(value === value * 1){\r\n\t\t\tvalue += \"px\";\r\n\t\t}\r\n\t\telement.style.width = value;\r\n\t}\r\n\tif(config.height){\r\n\t\tvar value = config.height;\r\n\t\tif(value === value * 1){\r\n\t\t\tvalue += \"px\";\r\n\t\t}\r\n\t\telement.style.height = value;\r\n\t}\r\n\tif (config.click) {\r\n\t\tscheduler.event(element, \"click\", config.click);\r\n\t}\r\n\tif (config.html) {\r\n\t\telement.innerHTML = config.html;\r\n\t}\r\n\r\n\tif (config.align) {\r\n\t\tvar value = \"\";\r\n\t\tif (config.align == \"right\") {\r\n\t\t\tvalue = \"flex-end\";\r\n\t\t} else if(config.align == \"left\") {\r\n\t\t\tvalue = \"flex-start\";\r\n\t\t}\r\n\t\telement.style.justifyContent = value;\r\n\t}\r\n\treturn element;\r\n}\r\n\r\nfunction prepareConfig(config) {\r\n\tif (typeof config === \"string\") {\r\n\t\tconfig = {\r\n\t\t\tview: config\r\n\t\t};\r\n\t}\r\n\tif (!config.view && !config.rows && !config.cols) {\r\n\t\tconfig.view = \"button\";\r\n\t}\r\n\treturn config;\r\n}\r\n\r\nfunction renderLayout(config) {\r\n\tvar fragment = document.createDocumentFragment();\r\n\tvar items;\r\n\tif(Array.isArray(config)){\r\n\t\titems = config;\r\n\t}else{\r\n\t\titems = [config];\r\n\t}\r\n\r\n\tfor (var i = 0; i < items.length; i++) {\r\n\t\tvar view = prepareConfig(items[i]);\r\n\r\n\t\tif(view.view === \"day\" && items[i + 1]){\r\n\t\t\tvar next = prepareConfig(items[i + 1]);\r\n\t\t\tif(next.view === \"week\" || next.view === \"month\"){\r\n\t\t\t\tview.$firstTab = true;\r\n\t\t\t\tview.$segmentedTab = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(view.view === \"week\" && items[i - 1]){\r\n\t\t\tvar next = prepareConfig(items[i + 1]);\r\n\t\t\tif(next.view === \"week\" || next.view === \"month\"){\r\n\t\t\t\tview.$segmentedTab = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(view.view === \"month\" && items[i - 1]){\r\n\t\t\tvar next = prepareConfig(items[i - 1]);\r\n\t\t\tif(next.view === \"week\" || next.view === \"day\"){\r\n\t\t\t\tview.$lastTab = true;\r\n\t\t\t\tview.$segmentedTab = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar element = renderElement(view);\r\n\r\n\t\tfragment.appendChild(element);\r\n\t\tif(view.cols || view.rows){\r\n\t\t\telement.appendChild(renderLayout(view.cols || view.rows));\r\n\t\t}\r\n\t}\r\n\treturn fragment;\r\n}\r\n\r\nscheduler._init_nav_bar = function (items) {\r\n\tvar navBar = this.$container.querySelector(\".dhx_cal_navline\");\r\n\tif (!navBar){\r\n\t\tnavBar = document.createElement(\"div\");\r\n\t\tnavBar.className = \"dhx_cal_navline dhx_cal_navline_flex\";\r\n\t\tscheduler._update_nav_bar(items, navBar);\r\n\t\treturn navBar;\r\n\t}\r\n\treturn navBar;\r\n};\r\n\r\nvar previousNavbar = null;\r\nvar previousHeight = null;\r\nscheduler._update_nav_bar = function (config, container) {\r\n\r\n\tif(!config){\r\n\t\treturn;\r\n\t}\r\n\tvar heightChanged = false;\r\n\tvar configChanged = false;\r\n\r\n\tvar newHeight = config.height || scheduler.xy.nav_height;\r\n\r\n\tif(previousHeight === null ||\r\n\t\t\t(previousHeight !== newHeight)){\r\n\t\theightChanged = true;\r\n\t}\r\n\tif(!previousNavbar || JSON.stringify(config) !== previousNavbar){\r\n\t\tconfigChanged = true;\r\n\t}\r\n\r\n\tif(heightChanged){\r\n\t\tscheduler.xy.nav_height = newHeight;\r\n\t}\r\n\tif(configChanged){\r\n\t\tcontainer.innerHTML = \"\";\r\n\t\tcontainer.appendChild(renderLayout(config));\r\n\t}\r\n\r\n\tif(heightChanged || configChanged){\r\n\t\tscheduler.unset_actions();\r\n\t\tscheduler._els = [];\r\n\t\tscheduler.get_elements();\r\n\t\tscheduler.set_actions();\r\n\t}\r\n\r\n\tif(newHeight === 0){\r\n\t\tcontainer.style.display = \"none\";\r\n\t}else{\r\n\t\tcontainer.style.display = \"\";\r\n\t}\r\n\r\n\tpreviousHeight = newHeight;\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\tfunction isAttachedNode(container){\r\n\t\tvar root = document.body;\r\n\t\r\n\t\twhile(container && container != root){\r\n\t\t\tcontainer = container.parentNode;\r\n\t\t}\r\n\t\r\n\t\treturn !!(root == container);\r\n\t}\r\n\t\r\n\tfunction getWindowSize(window){\r\n\t\treturn {\r\n\t\t\tw : window.innerWidth || document.documentElement.clientWidth,\r\n\t\t\th : window.innerHeight || document.documentElement.clientHeight\r\n\t\t};\r\n\t}\r\n\tfunction equals(a,b){\r\n\t\treturn a.w == b.w && a.h == b.h;\r\n\t}\r\n\t\r\n\tfunction listenWindowResize(scheduler, window){\r\n\t\tvar oldSize = getWindowSize(window);\r\n\t\tvar resizeDelay;\r\n\t\tscheduler.event(window, \"resize\", function(){\r\n\t\t\tclearTimeout(resizeDelay);\r\n\t\t\tresizeDelay = setTimeout(function(){\r\n\r\n\t\t\t\tif (!isAttachedNode(scheduler.$container) || scheduler.$destroyed){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tvar newSize = getWindowSize(window);\r\n\t\t\t\t// element may be resized by container-autoresize exteinsion\r\n\t\t\t\t// check if the size is actually changed in order to not to get endless loop\r\n\t\t\t\tif (!equals(oldSize, newSize)) {\r\n\t\t\t\t\toldSize = newSize;\r\n\t\t\t\t\ttriggerSchedulerResize(scheduler);\r\n\t\t\t\t}\r\n\t\t\t}, 150);\r\n\t\t});\r\n\t}\r\n\t\r\n\tfunction triggerSchedulerResize(scheduler){\r\n\t\tif(scheduler.$destroyed || !scheduler.$root || !isAttachedNode(scheduler.$root)){\r\n\t\t\treturn;\t\r\n\t\t}\r\n\t\tif (scheduler.callEvent(\"onSchedulerResize\", [])) {\r\n\t\t\tscheduler.updateView();\r\n\t\t\tscheduler.callEvent(\"onAfterSchedulerResize\", []);\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction watchNodeResize(scheduler){\r\n\t\tvar previousHeight = scheduler.$root.offsetHeight;\r\n\t\tvar previousWidth = scheduler.$root.offsetWidth;\r\n\t\t\r\n\t\tfunction lowlevelResizeWatcher(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(scheduler.$root){\r\n\t\t\t\tif (scheduler.$root.offsetHeight != previousHeight ||\r\n\t\t\t\t\tscheduler.$root.offsetWidth != previousWidth){\r\n\t\t\t\t\ttriggerSchedulerResize(scheduler);\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\tpreviousHeight = scheduler.$root.offsetHeight;\r\n\t\t\t\tpreviousWidth = scheduler.$root.offsetWidth;\r\n\t\t\t}\r\n\t\r\n\t\t\tsetTimeout(lowlevelResizeWatcher, 200);\r\n\t\t}\r\n\t\t\r\n\t\tlowlevelResizeWatcher();\r\n\t}\r\n\t\r\n\tfunction addResizeListener(scheduler){\r\n\t\tvar root = scheduler.$container;\r\n\t\tvar containerStyles = window.getComputedStyle(root);\r\n\t\tif(containerStyles.getPropertyValue(\"position\") == \"static\"){\r\n\t\t\troot.style.position = \"relative\";\r\n\t\t}\r\n\t\r\n\t\tvar resizeWatcher = document.createElement('iframe');\r\n\t\tresizeWatcher.className = \"scheduler_container_resize_watcher\";\r\n\t\tresizeWatcher.tabIndex = -1;\r\n\t\tif(scheduler.config.wai_aria_attributes){\r\n\t\t\tresizeWatcher.setAttribute(\"role\", \"none\");\r\n\t\t\tresizeWatcher.setAttribute(\"aria-hidden\", true);\r\n\t\t}\r\n\t\r\n\t\t// in some environments (namely, in SalesForce) iframe.contentWindow is not available\r\n\t\tvar salesforce_environment = !!window[\"Sfdc\"] || !!window[\"$A\"] || window[\"Aura\"];\r\n\t\tif(salesforce_environment){\r\n\t\t\twatchNodeResize(scheduler);\r\n\t\t} else {\r\n\t\t\troot.appendChild(resizeWatcher);\r\n\t\t\tif (resizeWatcher.contentWindow) {\r\n\t\t\t\tlistenWindowResize(scheduler, resizeWatcher.contentWindow);\r\n\t\t\t} else {\r\n\t\t\t\t// if so - ditch the iframe and fallback to listening the main window resize\r\n\t\t\t\troot.removeChild(resizeWatcher);\r\n\t\t\t\tlistenWindowResize(scheduler, window);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\taddResizeListener(scheduler);\r\n\r\n}","class EventHost {\r\n\tconstructor(){\r\n\t\tthis._silent_mode = false;\r\n\t\tthis.listeners = {};\r\n\t}\r\n\t_silentStart(){\r\n\t\tthis._silent_mode = true;\r\n\t}\r\n\t_silentEnd() {\r\n\t\tthis._silent_mode = false;\r\n\t}\r\n}\r\n\r\nconst createEventStorage = function(obj) {\r\n\tlet handlers = {};\r\n\tlet index = 0;\r\n\tconst eventStorage = function(){\r\n\t\tlet combinedResult = true;\r\n\t\tfor(const i in handlers){\r\n\t\t\tconst handlerResult = handlers[i].apply(obj, arguments);\r\n\t\t\tcombinedResult=combinedResult && handlerResult;\r\n\t\t}\r\n\t\treturn combinedResult;\r\n\t};\r\n\teventStorage.addEvent=function(handler, settings){\r\n\t\tif (typeof (handler) == \"function\"){\r\n\t\t\tlet handlerId;\r\n\t\t\tif(settings && settings.id){\r\n\t\t\t\thandlerId = settings.id;\r\n\t\t\t}else{\r\n\t\t\t\thandlerId = index;\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\r\n\t\t\tif(settings && settings.once){\r\n\t\t\t\tconst originalHandler = handler;\r\n\t\t\t\thandler = function(){\r\n\t\t\t\t\toriginalHandler();\r\n\t\t\t\t\teventStorage.removeEvent(handlerId);\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\thandlers[handlerId] = handler;\r\n\t\t\treturn handlerId;\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\teventStorage.removeEvent=function(id){\r\n\t\tdelete handlers[id];\r\n\t};\r\n\r\n\teventStorage.clear = function(){\r\n\t\thandlers = {};\r\n\t};\r\n\r\n\treturn eventStorage;\r\n};\r\n\r\nfunction makeEventable(obj){\r\n\r\n\tconst eventHost = new EventHost();\r\n\tobj.attachEvent=function(eventName, handler, settings){\r\n\t\teventName = 'ev_'+eventName.toLowerCase();\r\n\t\tif (!eventHost.listeners[eventName]){\r\n\t\t\teventHost.listeners[eventName] = createEventStorage(this);\r\n\t\t}\r\n\r\n\t\tif(settings && settings.thisObject){\r\n\t\t\thandler = handler.bind(settings.thisObject);\r\n\t\t}\r\n\r\n\t\tconst innerId = eventHost.listeners[eventName].addEvent(handler, settings);\r\n\r\n\t\tlet handlerId = (eventName+':'+innerId); //return ID (ev_eventname:1)\r\n\t\tif(settings && settings.id){\r\n\t\t\thandlerId = settings.id;\r\n\t\t}\r\n\t\treturn handlerId;\r\n\t};\r\n\r\n\tobj.attachAll = function(callback){\r\n\t\tthis.attachEvent('listen_all', callback);\r\n\t};\r\n\r\n\tobj.callEvent=function(name, eventArguments){\r\n\t\tif (eventHost._silent_mode) return true;\r\n\r\n\t\tconst handlerName = 'ev_'+name.toLowerCase();\r\n\r\n\t\tconst listeners = eventHost.listeners;\r\n\t\tif (listeners['ev_listen_all']){\r\n\t\t\tlisteners['ev_listen_all'].apply(this, [name].concat(eventArguments));\r\n\t\t}\r\n\r\n\t\tif (listeners[handlerName])\r\n\t\t\treturn listeners[handlerName].apply(this, eventArguments);\r\n\t\treturn true;\r\n\t};\r\n\r\n\tobj.checkEvent=function(name){\r\n\t\tconst listeners = eventHost.listeners;\r\n\t\treturn (!!listeners['ev_'+name.toLowerCase()]);\r\n\t};\r\n\r\n\tobj.detachEvent=function(id){\r\n\t\tif (id){\r\n\t\t\tlet listeners = eventHost.listeners;\r\n\t\t\tfor(const i in listeners){\r\n\t\t\t\tlisteners[i].removeEvent(id); //remove event\r\n\t\t\t}\r\n\r\n\t\t\tconst list = id.split(':');//get EventName and ID\r\n\t\t\tlisteners = eventHost.listeners;\r\n\t\t\tif(list.length === 2){\r\n\t\t\t\tconst eventName = list[0];\r\n\t\t\t\tconst eventId = list[1];\r\n\t\t\t\tif(listeners[eventName]){\r\n\t\t\t\t\tlisteners[eventName].removeEvent(eventId); //remove event\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\tobj.detachAllEvents = function(){\r\n\t\tfor (const name in eventHost.listeners) {\r\n\t\t\teventHost.listeners[name].clear();\r\n\t\t}\r\n\t};\r\n\r\n}\r\n\r\nexport default makeEventable;","\r\nimport nav_bar from \"./nav_bar\";\r\nimport scheduler_resize_listener from \"./scheduler_resize_listener\";\r\nimport eventable from \"../utils/eventable\";\r\n\r\n\r\nexport default function extend(scheduler) {\r\n\r\neventable(scheduler);\r\n\r\nnav_bar(scheduler);\r\n\r\nscheduler._detachDomEvent = function(el, event, handler){\r\n\tif (el.removeEventListener){\r\n\t\tel.removeEventListener(event, handler, false);\r\n\r\n\t}else if (el.detachEvent){\r\n\t\tel.detachEvent(\"on\"+event, handler);\r\n\t}\r\n};\r\n\r\n\r\nscheduler._init_once = function(){\r\n\tscheduler_resize_listener(scheduler);\r\n\r\n\tscheduler._init_once = function(){};\r\n};\r\n\r\nconst layout = {\r\n\t\"navbar\": {\r\n\t\trender: function (config) {\r\n\t\t\treturn scheduler._init_nav_bar(config);\r\n\t\t}\r\n\t},\r\n\t\"header\": {\r\n\t\trender: function (config) {\r\n\t\t\tconst element = document.createElement(\"div\");\r\n\t\t\telement.className = \"dhx_cal_header\";\r\n\t\t\treturn element;\r\n\t\t}\r\n\t},\r\n\t\"dataArea\": {\r\n\t\trender: function (config) {\r\n\t\t\tconst element = document.createElement(\"div\");\r\n\t\t\telement.className = \"dhx_cal_data\";\r\n\t\t\treturn element;\r\n\t\t}\r\n\t},\r\n\t\"html_element\": {\r\n\t\trender: function (config) {\r\n\t\t\treturn config.html;\r\n\t\t}\r\n\t}\r\n};\r\n\r\nfunction hasSchedulerMarkup(element){\r\n\treturn !!(\r\n\t\telement.querySelector(\".dhx_cal_header\") &&\r\n\t\telement.querySelector(\".dhx_cal_data\") &&\r\n\t\telement.querySelector(\".dhx_cal_navline\")\r\n\t\t);\r\n}\r\n\r\nfunction createDefaultHeader(scheduler){\r\n\tconst views = [\r\n\t\t\"day\",\r\n\t\t\"week\",\r\n\t\t\"month\"\r\n\t];\r\n\tconst date = [\r\n\t\t\"date\"\r\n\t];\r\n\tconst nav = [\r\n\t\t\"prev\",\r\n\t\t\"today\",\r\n\t\t\"next\"\r\n\t];\r\n\r\n\tif(scheduler.matrix){\r\n\t\tfor(const i in scheduler.matrix){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\tif(scheduler._props){\r\n\t\tfor(const i in scheduler._props){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\r\n\tif(scheduler._grid && scheduler._grid.names){\r\n\t\tfor(const i in scheduler._grid.names){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\r\n\tconst optionalViews = [\r\n\t\t\"map\",\r\n\t\t\"agenda\",\r\n\t\t\"week_agenda\",\r\n\t\t\"year\"\r\n\t];\r\n\r\n\toptionalViews.forEach(function(viewName){\r\n\t\tif(scheduler[viewName + \"_view\"]){\r\n\t\t\tviews.push(viewName);\r\n\t\t}\r\n\t});\r\n\r\n\treturn views.concat(date).concat(nav);\r\n}\r\n\r\nscheduler.init=function(id,date,mode){\r\n\tif(this.$destroyed){\r\n\t\treturn; // not have errors when try to reinit destroyed scheduler\r\n\t}\r\n\tdate=date||(scheduler._currentDate());\r\n\tmode=mode||\"week\";\r\n\r\n\tif(this._obj){\r\n\t\tthis.unset_actions();\r\n\t}\r\n\r\n\tthis._obj=(typeof id == \"string\")?document.getElementById(id):id;\r\n\tthis.$container = this._obj;\r\n\tthis.$root = this._obj;\r\n\r\n\tif(!this.$container.offsetHeight && this.$container.offsetWidth && this.$container.style.height === \"100%\"){\r\n\t\t// scheduler container has zero height and non-zero width\r\n\t\twindow.console.error(scheduler._commonErrorMessages.collapsedContainer(), this.$container);\r\n\t}\r\n\r\n\tif(this.config.wai_aria_attributes && this.config.wai_aria_application_role){\r\n\t\tthis.$container.setAttribute(\"role\", \"application\");\r\n\t}\r\n\r\n\tif(!this.config.header && !hasSchedulerMarkup(this.$container)){\r\n\t\t// if no header config and no required markup - use the default header\r\n\t\t// so the scheduler could be initialized in an empty div\r\n\t\tthis.config.header = createDefaultHeader(this);\r\n\t\twindow.console.log([// jshint ignore:line\r\n\t\t\t\"Required DOM elements are missing from the scheduler container and **scheduler.config.header** is not specified.\",\r\n\t\t\t\"Using a default header configuration: \",\r\n\t\t\t\"scheduler.config.header = \" + JSON.stringify(this.config.header, null, 2),\r\n\t\t\t\"Check this article for the details: https://docs.dhtmlx.com/scheduler/initialization.html\"\r\n\t\t].join(\"\\n\"));// jshint ignore:line\r\n\t}\r\n\r\n\tif (this.config.header) {\r\n\t\tthis.$container.innerHTML = \"\";\r\n\t\tthis.$container.classList.add(\"dhx_cal_container\");\r\n\t\tif(this.config.header.height){\r\n\t\t\tthis.xy.nav_height = this.config.header.height;\r\n\t\t}\r\n\t\tthis.$container.appendChild(layout.navbar.render(this.config.header));\r\n\t\tthis.$container.appendChild(layout.header.render());\r\n\t\tthis.$container.appendChild(layout.dataArea.render());\r\n\t} else {\r\n\t\t// if no header config provided - make sure scheduler container has all necessary elements\r\n\t\tif(!hasSchedulerMarkup(this.$container)){\r\n\t\t\tthrow new Error([\r\n\t\t\t\t\"Required DOM elements are missing from the scheduler container.\",\r\n\t\t\t\t\"Be sure to either specify them manually in the markup: https://docs.dhtmlx.com/scheduler/initialization.html#initializingschedulerviamarkup\",\r\n\t\t\t\t\"Or to use **scheduler.config.header** setting so they could be created automatically: https://docs.dhtmlx.com/scheduler/initialization.html#initializingschedulerviaheaderconfig\"\r\n\t\t\t].join(\"\\n\"));\r\n\t\t}\r\n\t}\r\n\r\n\tif (this.config.rtl) this.$container.className += \" dhx_cal_container_rtl\";\r\n\r\n\t//hook for terrace skin\r\n\tif (this._skin_init)\r\n\t\tscheduler._skin_init();\r\n\r\n\tscheduler.date.init();\r\n\r\n\tthis._scroll=true;\r\n\r\n\tthis._els=[];\r\n\tthis.get_elements();\r\n\tthis.init_templates();\r\n\tthis.set_actions();\r\n\r\n\tthis._init_once();\r\n\tthis._init_touch_events();\r\n\r\n\tthis.set_sizes();\r\n\tscheduler.callEvent('onSchedulerReady', []);\r\n\tscheduler.$initialized = true;\r\n\tthis.setCurrentView(date,mode);\r\n\r\n};\r\n\r\nscheduler.xy={\r\n\tmin_event_height:20,\r\n\tbar_height: 24,\r\n\tscale_width:50,\r\n\tscroll_width:18,\r\n\tscale_height:20,\r\n\tmonth_scale_height:20,\r\n\tmenu_width:25,\r\n\tmargin_top:0,\r\n\tmargin_left:0,\r\n\teditor_width:140,\r\n\tmonth_head_height:22,\r\n\tevent_header_height: 14\r\n};\r\nscheduler.keys={\r\n\tedit_save:13,\r\n\tedit_cancel:27\r\n};\r\n\r\nscheduler.bind = function bind(functor, object){\r\n\tif(functor.bind)\r\n\t\treturn functor.bind(object);\r\n\telse\r\n\t\treturn function(){ return functor.apply(object,arguments); };\r\n};\r\n\r\nscheduler.set_sizes=function(){\r\n\r\n\tvar w = this._x = this._obj.clientWidth-this.xy.margin_left;\r\n\r\n\t//not-table mode always has scroll - need to be fixed in future\r\n\tvar scale_x=this._table_view?0:(this.xy.scale_width+this.xy.scroll_width);\r\n\r\n\tvar materialScalePlaceholder = this.$container.querySelector(\".dhx_cal_scale_placeholder\");\r\n\tif(scheduler._is_material_skin()){\r\n\t\tif(!materialScalePlaceholder) {\r\n\t\t\tmaterialScalePlaceholder = document.createElement(\"div\");\r\n\t\t\tmaterialScalePlaceholder.className = \"dhx_cal_scale_placeholder\";\r\n\t\t\tthis.$container.insertBefore(materialScalePlaceholder, this._els[\"dhx_cal_header\"][0]);\r\n\t\t}\r\n\t\tmaterialScalePlaceholder.style.display = \"block\";\r\n\r\n\t\tthis.set_xy(materialScalePlaceholder,w,this.xy.scale_height + 1,0, this._els[\"dhx_cal_header\"][0].offsetTop);\r\n\r\n\t}else{\r\n\t\tif(materialScalePlaceholder){\r\n\t\t\tmaterialScalePlaceholder.parentNode.removeChild(materialScalePlaceholder);\r\n\t\t}\r\n\t}\r\n\r\n\tif (this._lightbox) {\r\n\t\tif (scheduler.$container.offsetWidth < 1200) {\r\n\t\t} else {\r\n\t\t\tthis._setLbPosition(document.querySelector(\".dhx_cal_light\"));\r\n\t\t}\r\n\t}\r\n\r\n\tthis._data_width = w-scale_x;\r\n\r\n\tthis._els[\"dhx_cal_navline\"][0].style.width = w + \"px\";\r\n\tconst header = this._els[\"dhx_cal_header\"][0];\r\n\tthis.set_xy(header, this._data_width, this.xy.scale_height);\r\n\t// this._els[\"dhx_cal_header\"][0].style.marginLeft = `${scheduler.xy.scale_width}px`;\r\n\theader.style.left = ``;\r\n\theader.style.right = ``;\r\n\tif(!this._table_view){\r\n\t\tif(this.config.rtl){\r\n\t\t\theader.style.right = `${this.xy.scale_width}px`;\r\n\t\t}else{\r\n\t\t\theader.style.left = `${this.xy.scale_width}px`;\r\n\t\t}\r\n\t} else {\r\n\t\tif(!this.config.rtl){\r\n\t\t\theader.style.left = `-1px`;\r\n\t\t} else {\r\n\t\t\theader.style.right = `-1px`;\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.set_xy=function(node,w,h,x,y){\r\n\tfunction prepareValue(val){\r\n\t\tlet prepared = val;\r\n\t\tif(!isNaN(Number(prepared))){\r\n\t\t\tprepared = Math.max(0,prepared) + \"px\";\r\n\t\t}\r\n\t\treturn prepared;\r\n\t}\r\n\r\n\tvar direction = 'left';\r\n\r\n\tif(w !== undefined) {\r\n\t\tnode.style.width = prepareValue(w);\r\n\t}\r\n\r\n\tif(h !== undefined){\r\n\t\tnode.style.height = prepareValue(h);\r\n\t}\r\n\r\n\tif (arguments.length>3){\r\n\r\n\t\tif(x !== undefined){\r\n\t\t\tif (this.config.rtl) direction = 'right';\r\n\t\t\tnode.style[direction]=x+\"px\";\r\n\t\t}\r\n\t\tif(y !== undefined){\r\n\t\t\tnode.style.top=y+\"px\";\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.get_elements=function(){\r\n\t//get all child elements as named hash\r\n\tconst els=this._obj.getElementsByTagName(\"DIV\");\r\n\tfor (let i=0; i < els.length; i++){\r\n\t\tlet class_name= scheduler._getClassName(els[i]);\r\n\t\tconst attr_value = els[i].getAttribute(\"data-tab\") || els[i].getAttribute(\"name\") || \"\";\r\n\t\tif (class_name) class_name = class_name.split(\" \")[0];\r\n\t\tif (!this._els[class_name]) this._els[class_name]=[];\r\n\t\tthis._els[class_name].push(els[i]);\r\n\r\n\t\t//check if name need to be changed\r\n\t\t// scheduler.locale.labels[attr_value+\"_tab\"] - to fix getting labels for data-tab\r\n\t\tlet label = scheduler.locale.labels[attr_value+\"_tab\"] || scheduler.locale.labels[attr_value||class_name];\r\n\t\tif (typeof label !== \"string\" && attr_value && !els[i].innerHTML)\r\n\t\t\tlabel = attr_value.split(\"_\")[0];\r\n\t\tif (label) {\r\n\t\t\tthis._waiAria.labelAttr(els[i], label);\r\n\t\t\tels[i].innerHTML = label;\r\n\t\t}\r\n\t}\r\n};\r\n\r\n\r\nconst domEventsScope = scheduler._createDomEventScope();\r\n\r\nscheduler.unset_actions = function(){\r\n\tdomEventsScope.detachAll();\r\n};\r\n\r\nscheduler.set_actions=function(){\r\n\tfor (const a in this._els){\r\n\t\tif (this._click[a]){\r\n\t\t\tfor (let i=0; i < this._els[a].length; i++){\r\n\t\t\t\tconst element = this._els[a][i];\r\n\t\t\t\tconst handler = this._click[a].bind(element);\r\n\t\t\t\tdomEventsScope.attach(element, \"click\", handler);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tdomEventsScope.attach(this._obj, \"selectstart\", function(e){\r\n\t\te.preventDefault();\r\n\t\treturn false;\r\n\t});\r\n\t//this._obj.onselectstart=function(e){ return false; };\r\n\tdomEventsScope.attach(this._obj, \"mousemove\", function(e){\r\n\t\tif (!scheduler._temp_touch_block)\r\n\t\t\tscheduler._on_mouse_move(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"mousedown\", function(e){\r\n\t\tif (!scheduler._ignore_next_click)\r\n\t\t\tscheduler._on_mouse_down(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"mouseup\", function(e){\r\n\t\tif (!scheduler._ignore_next_click)\r\n\t\t\tscheduler._on_mouse_up(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"dblclick\", function(e){\r\n\t\tscheduler._on_dbl_click(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"contextmenu\", function(event) {\r\n\t\tif(scheduler.checkEvent(\"onContextMenu\")){\r\n\t\t\t// block the default browser context menu \r\n\t\t\tevent.preventDefault();\r\n\t\t}\r\n\r\n\t\tconst returnValue = scheduler.callEvent(\"onContextMenu\", [scheduler._locate_event(event.target), event]);\r\n\t\treturn returnValue;\r\n\t});\r\n};\r\nscheduler.select=function(id){\r\n\tif (this._select_id==id) return;\r\n\tscheduler._close_not_saved();\r\n\tthis.editStop(false);\r\n\tif(this._select_id){\r\n\t\tthis.unselect();\r\n\t}\r\n\tthis._select_id = id;\r\n\tthis.updateEvent(id);\r\n\tthis.callEvent(\"onEventSelected\", [id]);\r\n};\r\nscheduler.unselect=function(id){\r\n\tif (id && id!=this._select_id) {\r\n\t\treturn;\r\n\t}\r\n\tconst previousSelection = this._select_id;\r\n\tthis._select_id = null;\r\n\tif (previousSelection && this.getEvent(previousSelection)) {\r\n\t\tthis.updateEvent(previousSelection);\r\n\t}\r\n\tthis.callEvent(\"onEventUnselected\", [previousSelection]);\r\n};\r\nscheduler.getState=function(){\r\n\treturn {\r\n\t\tmode: this._mode,\r\n\t\tdate: new Date(this._date),\r\n\t\tmin_date: new Date(this._min_date),\r\n\t\tmax_date: new Date(this._max_date),\r\n\t\teditor_id: this._edit_id,\r\n\t\tlightbox_id: this._lightbox_id,\r\n\t\tnew_event: this._new_event,\r\n\t\tselect_id: this._select_id,\r\n\t\texpanded: this.expanded,\r\n\t\tdrag_id: this._drag_id,\r\n\t\tdrag_mode: this._drag_mode\r\n\t};\r\n};\r\nscheduler._click={\r\n\tdhx_cal_data:function(e){\r\n\t\t//in case of touch disable click processing\r\n\t\tif (scheduler._ignore_next_click){\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\r\n\t\tconst id = scheduler._locate_event(e.target);\r\n\r\n\t\tif (!id) {\r\n\t\t\tscheduler.callEvent(\"onEmptyClick\",[scheduler.getActionData(e).date, e]);\r\n\t\t} else {\r\n\t\t\tif ( !scheduler.callEvent(\"onClick\",[id,e]) || scheduler.config.readonly ) return;\r\n\t\t}\r\n\r\n\t\tif (id && scheduler.config.select) {\r\n\r\n\t\t\tscheduler.select(id);\r\n\t\t\tconst icon = e.target.closest(\".dhx_menu_icon\");\r\n\r\n\t\t\tconst mask = scheduler._getClassName(icon);\r\n\t\t\tif (mask.indexOf(\"_icon\")!=-1)\r\n\t\t\t\tscheduler._click.buttons[mask.split(\" \")[1].replace(\"icon_\",\"\")](id);\r\n\t\t} else{\r\n\t\t\tscheduler._close_not_saved();\r\n\t\t\tif (scheduler.getState().select_id && new Date().valueOf()-(scheduler._new_event||0) > 500){\r\n\t\t\t\tscheduler.unselect();\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tdhx_cal_prev_button:function(){\r\n\t\tscheduler._click.dhx_cal_next_button(0,-1);\r\n\t},\r\n\tdhx_cal_next_button:function(dummy,step){\r\n\t\tlet def_step = 1;\r\n\t\tif (scheduler.config.rtl){\r\n\t\t\tstep = -step;\r\n\t\t\tdef_step = -def_step;\r\n\t\t}\r\n\t\tscheduler.setCurrentView(scheduler.date.add( //next line changes scheduler._date , but seems it has not side-effects\r\n\t\t\tscheduler.date[scheduler._mode+\"_start\"](new Date(scheduler._date)),(step||def_step),scheduler._mode));\r\n\t},\r\n\tdhx_cal_today_button:function(){\r\n\t\tif (scheduler.callEvent(\"onBeforeTodayDisplayed\", [])) {\r\n\t\t\tscheduler.setCurrentView(scheduler._currentDate());\r\n\t\t}\r\n\t},\r\n\tdhx_cal_tab:function(){\r\n\t\tconst name = this.getAttribute(\"data-tab\");\r\n\t\tconst deprecated_name = this.getAttribute(\"name\");\r\n\t\tconst mode = name || deprecated_name.substring(0, deprecated_name.search(\"_tab\"));\r\n\t\tscheduler.setCurrentView(scheduler._date,mode);\r\n\t},\r\n\tbuttons:{\r\n\t\t\"delete\":function(id){\r\n\t\t\tconst c = scheduler.locale.labels.confirm_deleting;\r\n\t\t\tscheduler._dhtmlx_confirm({message: c, title: scheduler.locale.labels.title_confirm_deleting, callback:function(){ scheduler.deleteEvent(id); },\r\n\t\t\tconfig: {ok: scheduler.locale.labels.icon_delete}\r\n\t\t});\r\n\t\t},\r\n\t\tedit:function(id){ scheduler.edit(id); },\r\n\t\tsave:function(id){ scheduler.editStop(true); },\r\n\t\tdetails:function(id){ scheduler.showLightbox(id); },\r\n\t\tform:function(id){ scheduler.showLightbox(id); },\r\n\t\tcancel:function(id){ scheduler.editStop(false); }\r\n\t}\r\n};\r\nscheduler._dhtmlx_confirm = function({message, title, callback, config}) {\r\n\tif (!message)\r\n\t\treturn callback();\r\n\r\n\tconfig = config || {};\r\n\tconst opts = { ...config, text: message };\r\n\tif (title) {\r\n\t\topts.title = title;\r\n\t}\r\n\tif (callback) {\r\n\t\topts.callback = function(result) {\r\n\t\t\tif (result) {\r\n\t\t\t\tcallback();\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n\tscheduler.confirm(opts);\r\n};\r\nscheduler.addEventNow=function(start,end,e){\r\n\tlet base = {};\r\n\tif (scheduler._isObject(start) && !scheduler._isDate(start)){\r\n\t\tbase = start;\r\n\t\tstart = null;\r\n\t}\r\n\r\n\tconst duration = (this.config.event_duration||this.config.time_step)*60000;\r\n\tif (!start) start = base.start_date||Math.round((scheduler._currentDate()).valueOf()/duration)*duration;\r\n\tlet start_date = new Date(start);\r\n\tif (!end){\r\n\t\tlet start_hour = this.config.first_hour;\r\n\t\tif (start_hour > start_date.getHours()){\r\n\t\t\tstart_date.setHours(start_hour);\r\n\t\t\tstart = start_date.valueOf();\r\n\t\t}\r\n\t\tend = start.valueOf()+duration;\r\n\t}\r\n\tlet end_date = new Date(end);\r\n\r\n\t// scheduler.addEventNow(new Date(), new Date()) + collision though get_visible events defect (such event was not retrieved)\r\n\tif(start_date.valueOf() == end_date.valueOf())\r\n\t\tend_date.setTime(end_date.valueOf()+duration);\r\n\tbase.start_date = base.start_date||start_date;\r\n\tbase.end_date = base.end_date||end_date;\r\n\tbase.text = base.text||this.locale.labels.new_event;\r\n\tbase.id = this._drag_id = base.id || this.uid();\r\n\tthis._drag_mode=\"new-size\";\r\n\tthis._loading=true;\r\n\tconst eventId = this.addEvent(base);\r\n\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\tthis._loading=false;\r\n\r\n\tthis._drag_event={}; //dummy , to trigger correct event updating logic\r\n\tthis._on_mouse_up(e);\r\n\treturn eventId;\r\n};\r\nscheduler._on_dbl_click=function(e,src){\r\n\tsrc = src || e.target;\r\n\tif (this.config.readonly) return;\r\n\tconst name = scheduler._getClassName(src).split(\" \")[0];\r\n\tswitch(name){\r\n\t\tcase \"dhx_scale_holder\":\r\n\t\tcase \"dhx_scale_holder_now\":\r\n\t\tcase \"dhx_month_body\":\r\n\t\tcase \"dhx_wa_day_data\":\r\n\t\t\tif (!scheduler.config.dblclick_create) break;\r\n\t\t\tthis.addEventNow(this.getActionData(e).date,null,e);\r\n\t\t\tbreak;\r\n\t\tcase \"dhx_cal_event\":\r\n\t\tcase \"dhx_wa_ev_body\":\r\n\t\tcase \"dhx_agenda_line\":\r\n\t\tcase \"dhx_cal_agenda_event_line\":\r\n\t\tcase \"dhx_grid_event\":\r\n\t\tcase \"dhx_cal_event_line\":\r\n\t\tcase \"dhx_cal_event_clear\": {\r\n\t\t\tconst id = this._locate_event(src);\r\n\t\t\tif (!this.callEvent(\"onDblClick\",[id,e])) return;\r\n\t\t\tif (this.config.details_on_dblclick || this._table_view || !this.getEvent(id)._timed || !this.config.select)\r\n\t\t\t\tthis.showLightbox(id);\r\n\t\t\telse\r\n\t\t\t\tthis.edit(id);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tcase \"dhx_time_block\":\r\n\t\tcase \"dhx_cal_container\":\r\n\t\t\treturn;\r\n\t\tdefault: {\r\n\t\t\tconst viewHandler = this[\"dblclick_\"+name];\r\n\t\t\tif (viewHandler) {\r\n\t\t\t\tviewHandler.call(this,e);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif (src.parentNode && src != this)\r\n\t\t\t\t\treturn scheduler._on_dbl_click(e,src.parentNode);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n};\r\n//column index by mouse x-coordinate\r\nscheduler._get_column_index = function(x_pos){\r\n\tlet column = 0;\r\n\tif (this._cols){\r\n\t\tlet width = 0;\r\n\t\tlet i = 0;\r\n\t\twhile (width + this._cols[i] < x_pos && i < this._cols.length){\r\n\t\t\twidth += this._cols[i];\r\n\t\t\ti++;\r\n\t\t}\r\n\t\tcolumn = i + (this._cols[i] ? ((x_pos - width)/ this._cols[i]) : 0);\r\n\r\n\t\tif (this._ignores){\r\n\t\t\tif(column >= this._cols.length){\r\n\t\t\t\twhile(column >= 1 && this._ignores[Math.floor(column)]){\r\n\t\t\t\t\tcolumn--;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n\treturn column;\r\n};\r\n\r\n//transform mouse coordinates to day-time indexes of week based view\r\nscheduler._week_indexes_from_pos = function(pos){\r\n\t//\"get position\" can be invoked before columns are loaded into the units view(e.g. by onMouseMove handler in key_nav.js)\r\n\tif(!this._cols){\r\n\t\treturn pos;\r\n\t}else{\r\n\t\tconst column = this._get_column_index(pos.x);\r\n\r\n\t\tpos.x=Math.min(this._cols.length-1, Math.max(0,Math.ceil(column)-1));\r\n\t\tpos.y=Math.max(0,Math.ceil(pos.y*60/(this.config.time_step*this.config.hour_size_px))-1)+this.config.first_hour*(60/this.config.time_step);\r\n\t\treturn pos;\r\n\t}\r\n};\r\n\r\nscheduler._mouse_coords=function(ev){\r\n\tlet pos;\r\n\tconst body = document.body;\r\n\tconst documentElement = document.documentElement;\r\n\tif (!this.$env.isIE && (ev.pageX || ev.pageY))\r\n\t\tpos={x:ev.pageX, y:ev.pageY};\r\n\telse pos={\r\n\t\tx:ev.clientX + (body.scrollLeft||documentElement.scrollLeft||0) - body.clientLeft,\r\n\t\ty:ev.clientY + (body.scrollTop||documentElement.scrollTop||0) - body.clientTop\r\n\t};\r\n\t//apply layout\r\n\tif (this.config.rtl && this._colsS) {\r\n\t\tpos.x = this.$container.querySelector(\".dhx_cal_data\").offsetWidth - pos.x;\r\n\t\tpos.x += this.$domHelpers.getAbsoluteLeft(this._obj);\r\n\t\tif (this._mode !== \"month\") {\r\n\t\t\tpos.x -= this.xy.scale_width;\r\n\t\t}\r\n\t} else {\r\n\t\tpos.x-=this.$domHelpers.getAbsoluteLeft(this._obj)+(this._table_view?0:this.xy.scale_width);\r\n\t}\r\n\r\n\tconst dataArea = this.$container.querySelector(\".dhx_cal_data\");\r\n\t//pos.y-=this.$domHelpers.getAbsoluteTop(this._obj)+this.xy.nav_height+(this._dy_shift||0)+this.xy.scale_height-this._els[\"dhx_cal_data\"][0].scrollTop;\r\n\tpos.y-=this.$domHelpers.getAbsoluteTop(dataArea)-this._els[\"dhx_cal_data\"][0].scrollTop;\r\n\tpos.ev = ev;\r\n\tconst handler = this[\"mouse_\"+this._mode];\r\n\tif (handler){\r\n\t\tpos = handler.call(this,pos);\r\n\t}else{\r\n\t\t//transform to date\r\n\t\tif (!this._table_view) {\r\n\t\t\tpos = this._week_indexes_from_pos(pos);\r\n\t\t} else {\r\n\t\t\tconst column = this._get_column_index(pos.x);\r\n\t\t\tif (!this._cols || !this._colsS) // agenda/map views\r\n\t\t\t\treturn pos;\r\n\t\t\tlet dy=0;\r\n\t\t\tfor (dy=1; dy < this._colsS.heights.length; dy++)\r\n\t\t\t\tif (this._colsS.heights[dy]>pos.y) break;\r\n\r\n\t\t\tpos.y=Math.ceil( (Math.max(0, column)+Math.max(0,dy-1)*7)*24*60/this.config.time_step );\r\n\r\n\t\t\tif (scheduler._drag_mode || this._mode == \"month\")\r\n\t\t\t\tpos.y=(Math.max(0,Math.ceil(column)-1)+Math.max(0,dy-1)*7)*24*60/this.config.time_step;\r\n\r\n\t\t\t//we care about ignored days only during event moving in month view\r\n\t\t\tif (this._drag_mode == \"move\"){\r\n\t\t\t\tif (scheduler._ignores_detected && scheduler.config.preserve_length){\r\n\t\t\t\t\tpos._ignores = true;\r\n\t\t\t\t\t//get real lengtn of event\r\n\t\t\t\t\tif (!this._drag_event._event_length)\r\n\t\t\t\t\t\tthis._drag_event._event_length = this._get_real_event_length(this._drag_event.start_date, this._drag_event.end_date, { x_step:1, x_unit:\"day\"});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tpos.x=0;\r\n\t\t}\r\n\t}\r\n\tpos.timestamp = +new Date();\r\n\treturn pos;\r\n};\r\nscheduler._close_not_saved=function(){\r\n\tif (new Date().valueOf()-(scheduler._new_event||0) > 500 && scheduler._edit_id){\r\n\t\tconst confirmationText=scheduler.locale.labels.confirm_closing;\r\n\r\n\t\tscheduler._dhtmlx_confirm({\r\n\t\t\tmessage: confirmationText, \r\n\t\t\ttitle: scheduler.locale.labels.title_confirm_closing, \r\n\t\t\tcallback: function() { \r\n\t\t\t\tscheduler.editStop(scheduler.config.positive_closing);\r\n\t\t\t}\r\n\t\t});\r\n\t\tif(confirmationText){\r\n\t\t\tthis._drag_id = this._drag_pos = this._drag_mode = null;\r\n\t\t}\r\n\t}\r\n};\r\nscheduler._correct_shift=function(start, back){\r\n\treturn start-=((new Date(scheduler._min_date)).getTimezoneOffset()-(new Date(start)).getTimezoneOffset())*60000*(back?-1:1);\r\n};\r\n\r\nscheduler._is_pos_changed = function(old_pos, new_pos){\r\n\tfunction diff(old_val, new_val, acc){\r\n\t\treturn !!(Math.abs(old_val - new_val) > acc);\r\n\t}\r\n\r\n\tif(!(old_pos && this._drag_pos)){\r\n\t\treturn true;\r\n\t}\r\n\tconst delay = 100;\r\n\tconst d_pos = 5;\r\n\r\n\t// start drag only if passed some time since mouse down, or if mouse position changed sufficiently\r\n\treturn !!(this._drag_pos.has_moved || !this._drag_pos.timestamp || (new_pos.timestamp - this._drag_pos.timestamp > delay) || diff(old_pos.ev.clientX, new_pos.ev.clientX, d_pos) || diff(old_pos.ev.clientY, new_pos.ev.clientY, d_pos));\r\n};\r\n\r\nscheduler._correct_drag_start_date = function(start){\r\n\tlet obj;\r\n\tif (scheduler.matrix)\r\n\t\tobj = scheduler.matrix[scheduler._mode];\r\n\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\tstart = new Date(start);\r\n\tlet len = 1;\r\n\tif(obj._start_correction || obj._end_correction)\r\n\t\tlen = (obj.last_hour||0)*60 - (start.getHours()*60+start.getMinutes()) || 1;\r\n\r\n\treturn start*1 + (scheduler._get_fictional_event_length(start, len, obj) - len);\r\n};\r\nscheduler._correct_drag_end_date = function(start, duration){\r\n\tlet obj;\r\n\tif (scheduler.matrix) {\r\n\t\tobj = scheduler.matrix[scheduler._mode];\r\n\t}\r\n\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\tconst end = start*1 + scheduler._get_fictional_event_length(start, duration, obj);\r\n\treturn new Date(end*1 - (scheduler._get_fictional_event_length(end, -1, obj, -1) + 1));\r\n};\r\n\r\nscheduler._on_mouse_move=function(e){\r\n\tif (this._drag_mode){\r\n\t\tvar pos=this._mouse_coords(e);\r\n\t\tif (this._is_pos_changed(this._drag_pos, pos)){\r\n\t\t\tvar start, end;\r\n\t\t\tif (this._edit_id!=this._drag_id)\r\n\t\t\t\tthis._close_not_saved();\r\n\r\n\t\t\tif(!this._drag_mode)\r\n\t\t\t\treturn;\r\n\r\n\t\t\tvar mousedownPos = null;\r\n\t\t\tif(this._drag_pos && !this._drag_pos.has_moved){\r\n\t\t\t\tmousedownPos = this._drag_pos;\r\n\t\t\t\tmousedownPos.has_moved = true;\r\n\t\t\t}\r\n\r\n\t\t\tthis._drag_pos = pos;\r\n\r\n\t\t\tthis._drag_pos.has_moved = true;\r\n\r\n\t\t\tif (this._drag_mode==\"create\"){\r\n\r\n\t\t\t\t// use mouse down position as a starting point for drag-create\r\n\t\t\t\tif(mousedownPos){\r\n\t\t\t\t\tpos = mousedownPos;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis._close_not_saved();\r\n\t\t\t\tthis.unselect(this._select_id);\r\n\t\t\t\tthis._loading=true; //will be ignored by dataprocessor\r\n\r\n\t\t\t\tstart = this._get_date_from_pos(pos).valueOf();\r\n\r\n\t\t\t\tif (!this._drag_start) {\r\n\t\t\t\t\tvar res = this.callEvent(\"onBeforeEventCreated\", [e, this._drag_id]);\r\n\t\t\t\t\tif (!res){\r\n\t\t\t\t\t\tthis._loading=false;\r\n\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis._loading=false;\r\n\t\t\t\t\tthis._drag_start=start;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tend = start;\r\n\t\t\t\tif (end == this._drag_start) {\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar start_date = new Date(this._drag_start);\r\n\t\t\t\tvar end_date = new Date(end);\r\n\t\t\t\tif ( (this._mode == \"day\" || this._mode == \"week\") &&\r\n\t\t\t\t\t(start_date.getHours() == end_date.getHours() &&\r\n\t\t\t\t\tstart_date.getMinutes() == end_date.getMinutes()) ) {\r\n\t\t\t\t\t\tend_date = new Date(this._drag_start+1000);\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\tthis._drag_id=this.uid();\r\n\t\t\t\tthis.addEvent(start_date, end_date, this.locale.labels.new_event, this._drag_id, pos.fields);\r\n\r\n\t\t\t\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\t\t\t\tthis._loading=false;\r\n\t\t\t\tthis._drag_mode=\"new-size\";\r\n\r\n\t\t\t}\r\n\r\n\t\t\tvar timeStep = this.config.time_step;\r\n\t\t\tvar ev=this.getEvent(this._drag_id);\r\n\t\t\tvar obj;\r\n\t\t\tif (scheduler.matrix)\r\n\t\t\t\tobj = scheduler.matrix[scheduler._mode];\r\n\t\t\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\t\t\tif (this._drag_mode==\"move\"){\r\n\t\t\t\tstart = this._min_date.valueOf()+(pos.y*this.config.time_step+pos.x*24*60)*60000;\r\n\t\t\t\tif (!pos.custom && this._table_view) {\r\n\t\t\t\t\tstart += this.date.time_part(ev.start_date) * 1000;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!this._table_view && this._dragEventBody && this._drag_event._move_event_shift === undefined) {\r\n\t\t\t\t\tthis._drag_event._move_event_shift = start - ev.start_date;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (this._drag_event._move_event_shift) {\r\n\t\t\t\t\tstart -= this._drag_event._move_event_shift;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tstart = this._correct_shift(start);\r\n\r\n\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view && obj){\r\n\r\n\t\t\t\t\tstart = scheduler._correct_drag_start_date(start);\r\n\t\t\t\t\tend = scheduler._correct_drag_end_date(start,this._drag_event._event_length);\r\n\r\n\t\t\t\t} else\r\n\t\t\t\t\tend = ev.end_date.valueOf()-(ev.start_date.valueOf()-start);\r\n\t\t\t} else { // resize\r\n\t\t\t\tstart = ev.start_date.valueOf();\r\n\t\t\t\tend = ev.end_date.valueOf();\r\n\t\t\t\tif (this._table_view) {\r\n\t\t\t\t\tvar resize_date = this._min_date.valueOf()+pos.y*this.config.time_step*60000 + (pos.custom?0:24*60*60000);\r\n\t\t\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\t\t\tresize_date = this._correct_shift(resize_date, false);\r\n\t\t\t\t\t\tif( this._drag_from_start ) {\r\n\t\t\t\t\t\t\tvar day = 24*60*60000;\r\n\t\t\t\t\t\t\tif( resize_date <= scheduler.date.date_part(new Date(end+day-1)).valueOf() ) // to get end time as 23:59:59 and then the day start\r\n\t\t\t\t\t\t\t\tstart = resize_date - day;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tend = resize_date;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif(this.config.preserve_length) {\r\n\t\t\t\t\t\t\tif (pos.resize_from_start) {\r\n\t\t\t\t\t\t\t\tstart = scheduler._correct_drag_start_date(resize_date);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tend = scheduler._correct_drag_end_date(resize_date, 0);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tif (pos.resize_from_start) {\r\n\t\t\t\t\t\t\t\tstart = resize_date;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tend = resize_date;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvar end_day_start = this.date.date_part(new Date(ev.end_date.valueOf() - 1)).valueOf();\r\n\t\t\t\t\tvar end_day_date = new Date(end_day_start);\r\n\t\t\t\t\tvar firstHour = this.config.first_hour;\r\n\t\t\t\t\tvar lastHour = this.config.last_hour;\r\n\t\t\t\t\tvar maxY = (lastHour - firstHour) * (60/timeStep);\r\n\r\n\t\t\t\t\tthis.config.time_step = 1;\r\n\t\t\t\t\tvar precisePos = this._mouse_coords(e);\r\n\t\t\t\t\tthis.config.time_step = timeStep;\r\n\r\n\t\t\t\t\tvar minDate = pos.y*timeStep*60000;\r\n\t\t\t\t\tvar maxDate = Math.min(pos.y + 1, maxY)*timeStep*60000;\r\n\t\t\t\t\tvar preciseDate = precisePos.y*60000;\r\n\r\n\t\t\t\t\t// rounding end date to the closest time step\r\n\t\t\t\t\tif(Math.abs(minDate - preciseDate) > Math.abs(maxDate - preciseDate)){\r\n\t\t\t\t\t\tend = end_day_start + maxDate;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tend = end_day_start + minDate;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = end + ((new Date(end)).getTimezoneOffset() - end_day_date.getTimezoneOffset()) * 60000;\r\n\t\t\t\t\tthis._els[\"dhx_cal_data\"][0].style.cursor=\"s-resize\";\r\n\t\t\t\t\tif (this._mode == \"week\" || this._mode == \"day\")\r\n\t\t\t\t\t\tend = this._correct_shift(end);\r\n\t\t\t\t}\r\n\t\t\t\tif (this._drag_mode == \"new-size\") {\r\n\t\t\t\t\tif (end <= this._drag_start){\r\n\t\t\t\t\t\tvar shift = pos.shift||((this._table_view && !pos.custom)?24*60*60000:0);\r\n\t\t\t\t\t\tstart = end-(pos.shift?0:shift);\r\n\t\t\t\t\t\tend = this._drag_start+(shift||(timeStep*60000));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tstart = this._drag_start;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (end<=start)\r\n\t\t\t\t\t\tend=start+timeStep*60000;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar new_end = new Date(end-1);\r\n\t\t\tvar new_start = new Date(start);\r\n\t\t\t//deny drag out of visible scheduler scale in timeline view\r\n\t\t\tif(this._drag_mode==\"move\" && scheduler.config.limit_drag_out &&\r\n\t\t\t\t(+new_start < +scheduler._min_date || +end > +scheduler._max_date)){\r\n\r\n\t\t\t\tif(+ev.start_date < +scheduler._min_date || +ev.end_date > +scheduler._max_date){\r\n\t\t\t\t\t// not move event if it's already outside time scale\r\n\t\t\t\t\tnew_start = new Date(ev.start_date);\r\n\t\t\t\t\tend = new Date(ev.end_date);\r\n\t\t\t\t}else{\r\n\r\n\t\t\t\t\tvar duration = end - new_start;\r\n\r\n\t\t\t\t\tif(+new_start < +scheduler._min_date){\r\n\t\t\t\t\t\tnew_start = new Date(scheduler._min_date);\r\n\t\t\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view){\r\n\t\t\t\t\t\t\tnew_start = new Date(scheduler._correct_drag_start_date(new_start));\r\n\t\t\t\t\t\t\tif(obj._start_correction)\r\n\t\t\t\t\t\t\t\tnew_start = new Date(new_start.valueOf() + obj._start_correction);\r\n\t\t\t\t\t\t\tend = new Date(new_start*1 + this._get_fictional_event_length(new_start, this._drag_event._event_length, obj));\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tend = new Date(+new_start + duration);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tend = new Date(scheduler._max_date);\r\n\r\n\t\t\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view){\r\n\t\t\t\t\t\t\tif(obj._end_correction)\r\n\t\t\t\t\t\t\t\tend = new Date(end.valueOf() - obj._end_correction);\r\n\t\t\t\t\t\t\tend = new Date(end*1 - this._get_fictional_event_length(end, 0, obj, true));\r\n\t\t\t\t\t\t\tnew_start = new Date(end*1 - this._get_fictional_event_length(end, this._drag_event._event_length, obj, true));\r\n\t\t\t\t\t\t\tif(this._ignores_detected){\r\n\t\t\t\t\t\t\t\tnew_start = scheduler.date.add(new_start, obj.x_step, obj.x_unit);\r\n\t\t\t\t\t\t\t\tend = new Date(end*1 - this._get_fictional_event_length(end, 0, obj, true));\r\n\t\t\t\t\t\t\t\tend = scheduler.date.add(end, obj.x_step, obj.x_unit);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tnew_start = new Date(+end - duration);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t\tvar new_end = new Date(end-1);\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\t// fix event dates when resized to bottom of the column (day/week views)\r\n\t\t\tif(!this._table_view && this._dragEventBody &&\r\n\t\t\t\t!scheduler.config.all_timed &&\r\n\t\t\t\t((!scheduler._get_section_view() && pos.x != this._get_event_sday({start_date: new Date(start), end_date:new Date(start)})) || new Date(start).getHours() < this.config.first_hour)){\r\n\t\t\t\tvar duration = end - new_start;\r\n\t\t\t\tif (this._drag_mode == \"move\") {\r\n\t\t\t\t\tvar day = this._min_date.valueOf() + (pos.x * 24 * 60) * 60000;\r\n\t\t\t\t\tnew_start = new Date(day);\r\n\t\t\t\t\tnew_start.setHours(this.config.first_hour);\r\n\t\t\t\t\tend = new Date(new_start.valueOf() + duration);\r\n\t\t\t\t\tnew_end = new Date(end-1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// fix event dates when resized to bottom of the column (day/week views)\r\n\t\t\tif(!this._table_view &&\r\n\t\t\t\t!scheduler.config.all_timed &&\r\n\t\t\t\t((!scheduler.getView() && pos.x != this._get_event_sday({start_date: new Date(end), end_date:new Date(end)})) || new Date(end).getHours() >= this.config.last_hour)){\r\n\t\t\t\tvar duration = end - new_start;\r\n\t\t\t\tvar day = this._min_date.valueOf()+(pos.x*24*60)*60000;\r\n\t\t\t\tend = scheduler.date.date_part(new Date(day));\r\n\t\t\t\tend.setHours(this.config.last_hour);\r\n\t\t\t\tnew_end = new Date(end-1);\r\n\t\t\t\tif(this._drag_mode == \"move\"){\r\n\t\t\t\t\tnew_start = new Date(+end - duration);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//prevent out-of-borders situation for day|week view\r\n\t\t\tif ( this._table_view || (new_end.getDate()==new_start.getDate() && new_end.getHours()=ed)\r\n\t\t\t\tcls += ' dhx_after';\r\n\t\t\telse if (sd.valueOf()==cd.valueOf())\r\n\t\t\t\tcls += ' dhx_now';\r\n\r\n\t\t\tif (this._ignores_detected && this._ignores[j]){\r\n\t\t\t\tcls += \" dhx_scale_ignore\";\r\n\t\t\t}\r\n\r\n\t\t\tcell.className = cls + \" \" + this.templates.month_date_class(sd, cd);\r\n\r\n\t\t\tcell.setAttribute(\"data-cell-date\", scheduler.templates.format_date(sd));\r\n\t\t\tvar body_class = \"dhx_month_body\";\r\n\t\t\tvar head_class = \"dhx_month_head\";\r\n\t\t\tif (j === 0 && this.config.left_border) {\r\n\t\t\t\tbody_class += \" dhx_month_body_border\";\r\n\t\t\t\thead_class += \" dhx_month_head_border\";\r\n\t\t\t}\r\n\t\t\tif (!this._ignores_detected || !this._ignores[j]){\r\n\t\t\t\tcell.style.width = tdwidths[j];\r\n\t\t\t\tthis._waiAria.monthCellAttr(cell, sd);\r\n\r\n\t\t\t\tvar cellHead = document.createElement(\"div\");\r\n\t\t\t\tcellHead.style.height = scheduler.xy.month_head_height + \"px\";\r\n\t\t\t\tcellHead.className = head_class;\r\n\t\t\t\tcellHead.innerHTML = this.templates.month_day(sd);\r\n\t\t\t\tcell.appendChild(cellHead);\r\n\r\n\t\t\t\tvar cellBody = document.createElement(\"div\");\r\n\t\t\t\tcellBody.className = body_class;\r\n\t\t\t\t// cellBody.style.height = row_height + \"px\";\r\n\t\t\t\t// cellBody.style.width = tdwidths[j];\r\n\t\t\t\tcell.appendChild(cellBody);\r\n\r\n\t\t\t} else {\r\n\t\t\t\tcell.appendChild(document.createElement(\"div\"));\r\n\t\t\t\tcell.appendChild(document.createElement(\"div\"));\r\n\t\t\t}\r\n\t\t\trendered_dates.push(sd);\r\n\t\t\tvar bf1 = sd.getDate();\r\n\t\t\tsd=this.date.add(sd,1,\"day\");\r\n\t\t\tif (sd.getDate() - bf1 > 1)\r\n\t\t\t\tsd = new Date(sd.getFullYear(), sd.getMonth(), bf1 + 1, 12, 0);\r\n\t\t}\r\n\r\n\t\tscheduler._colsS.heights[i] = cellheight;\r\n\t\tcellheight += getCellHeight(i);\r\n\t}\r\n\r\n\tthis._min_date = view_start;\r\n\tthis._max_date = sd;\r\n\r\n\tdiv.innerHTML = \"\";\r\n\tdiv.appendChild(table);\r\n\r\n\tthis._scales = {};\r\n\tvar cells = div.querySelectorAll('[data-cell-date]');\r\n\tcells.forEach((cell) => {\r\n\t\tconst date = scheduler.templates.parse_date(cell.getAttribute(\"data-cell-date\"));\r\n\t\tconst body = cell.querySelector(\".dhx_month_body\");\r\n\t\tthis._scales[+date] = body;\r\n\t\tthis.callEvent(\"onScaleAdd\", [this._scales[+date], date]);\r\n\t});\r\n\r\n\treturn this._max_date;\r\n};\r\n\r\nscheduler._reset_month_scale=function(b,dd,sd,rows){\r\n\t//recalculates rows height and redraws month layout\r\n\tvar ed=scheduler.date.add(dd,1,\"month\");\r\n\r\n\t//trim time part for comparison reasons\r\n\tvar cd = scheduler._currentDate();\r\n\tthis.date.date_part(cd);\r\n\tthis.date.date_part(sd);\r\n\r\n\trows = rows || Math.ceil(Math.round((ed.valueOf()-sd.valueOf()) / (60*60*24*1000) ) / 7);\r\n\r\n\tvar height = (Math.floor(b.clientHeight/rows) - this.xy.month_head_height);\r\n\r\n\tthis._colsS.height = height + this.xy.month_head_height;\r\n\tthis._colsS.heights = [];\r\n\r\n\treturn scheduler._render_month_scale(b, dd, sd, rows);\r\n\r\n};\r\n\r\nscheduler.getView = function (viewName) {\r\n\tif (!viewName) {\r\n\t\tviewName = scheduler.getState().mode;\r\n\t}\r\n\tif (scheduler.matrix && scheduler.matrix[viewName]) {\r\n\t\treturn scheduler.matrix[viewName];\r\n\t}\r\n\r\n\tif (scheduler._props && scheduler._props[viewName]) {\r\n\t\treturn scheduler._props[viewName];\r\n\t}\r\n\r\n\treturn null;\r\n};\r\n\r\nscheduler.getLabel = function(property, key) {\r\n\tvar sections = this.config.lightbox.sections;\r\n\tfor (var i=0; i scheduler.getState().max_date.valueOf()){\r\n\t\t\tendColumnIndex += getDaysDifference(endDate, scheduler.getState().max_date);\r\n\t\t}\r\n\t} else{\r\n\t\tendColumnIndex = Math.round(eventLength/60/60/1000/24);\r\n\t}\r\n\r\n\tvar last_column = true;\r\n\twhile (startColumnIndex < endColumnIndex){\r\n\t\tvar check = scheduler.date.add(endDate, -config.x_step, config.x_unit);\r\n\t\tif (ignore && ignore(endDate) && (!last_column || (last_column && ignore(check) ))){\r\n\t\t\teventLength -= (endDate-check);\r\n\r\n\t\t}else{\r\n\t\t\tlet excludedDuration = 0;\r\n\t\t\tconst intervalStart = new Date(Math.max(check.valueOf(), startDate.valueOf()));\r\n\t\t\tconst intervalEnd = endDate;\r\n\t\t\tconst leftCellCutOffStart = new Date(intervalStart.getFullYear(), intervalStart.getMonth(), intervalStart.getDate(), config.first_hour);\r\n\t\t\tconst leftCellCutOffEnd = new Date(intervalStart.getFullYear(), intervalStart.getMonth(), intervalStart.getDate(), config.last_hour||24);\r\n\t\t\tconst rightCellCutOffStart = new Date(endDate.getFullYear(), endDate.getMonth(), endDate.getDate(), config.first_hour);\r\n\t\t\tconst rightCellCutOffEnd = new Date(endDate.getFullYear(), endDate.getMonth(), endDate.getDate(), config.last_hour||24);\r\n\r\n\t\t\tif(intervalEnd.valueOf() > rightCellCutOffEnd.valueOf()){\r\n\t\t\t\texcludedDuration += intervalEnd - rightCellCutOffEnd;\r\n\t\t\t}\r\n\r\n\t\t\tif(intervalEnd.valueOf() > rightCellCutOffStart.valueOf()){\r\n\t\t\t\texcludedDuration += config._start_correction;\r\n\t\t\t} else {\r\n\t\t\t\texcludedDuration += intervalEnd.getHours()*60*60*1000 + intervalEnd.getMinutes()*60*1000;\r\n\t\t\t}\r\n\r\n\t\t\tif(intervalStart.valueOf() < leftCellCutOffEnd.valueOf()){\r\n\t\t\t\texcludedDuration += config._end_correction;\r\n\t\t\t}\r\n\r\n\t\t\tif(intervalStart.valueOf() < leftCellCutOffStart.valueOf()){\r\n\t\t\t\texcludedDuration += (leftCellCutOffStart.valueOf() - intervalStart.valueOf());\r\n\t\t\t}\r\n\t\t\t\r\n\r\n\t\t\teventLength -= excludedDuration;\r\n\t\t\tlast_column = false;\r\n\t\t}\r\n\t\tendDate = check;\r\n\t\tendColumnIndex--;\r\n\t}\r\n\treturn eventLength;\r\n};\r\nscheduler._get_fictional_event_length=function(end_date, ev_length, obj, back){\r\n\tvar sd = new Date(end_date);\r\n\tvar dir = back ? -1 : 1;\r\n\r\n\t//get difference caused by first|last hour\r\n\tif (obj._start_correction || obj._end_correction){\r\n\t\tvar today;\r\n\t\tif (back)\r\n\t\t\ttoday = (sd.getHours()*60+sd.getMinutes()) - (obj.first_hour||0)*60;\r\n\t\telse\r\n\t\t\ttoday = (obj.last_hour||0)*60 - (sd.getHours()*60+sd.getMinutes());\r\n\t\tvar per_day = (obj.last_hour - obj.first_hour)*60;\r\n\t\tvar days = Math.ceil( (ev_length / (60*1000) - today ) / per_day);\r\n\t\tif(days < 0) days = 0;\r\n\t\tev_length += days * (24*60 - per_day) * 60 * 1000;\r\n\t}\r\n\r\n\tvar fd = new Date(end_date*1+ev_length*dir);\r\n\tvar ignore = this[\"ignore_\"+this._mode];\r\n\r\n\tvar start_slot = 0,\r\n\t\tend_slot;\r\n\tif (obj.render){\r\n\t\tstart_slot = this._get_date_index(obj, sd);\r\n\t\tend_slot = this._get_date_index(obj, fd);\r\n\t} else{\r\n\t\tend_slot = Math.round(ev_length/60/60/1000/24);\r\n\t}\r\n\r\n\twhile (start_slot*dir <= end_slot*dir){\r\n\t\tvar check = scheduler.date.add(sd, obj.x_step*dir, obj.x_unit);\r\n\t\tif (ignore && ignore(sd)){\r\n\t\t\tev_length += (check-sd)*dir;\r\n\t\t\tend_slot += dir;\r\n\t\t}\r\n\r\n\t\tsd = check;\r\n\t\tstart_slot+=dir;\r\n\t}\r\n\r\n\treturn ev_length;\r\n};\r\n\r\nscheduler._get_section_view = function(){\r\n\treturn this.getView();\r\n};\r\n\r\nscheduler._get_section_property = function(){\r\n\tif(this.matrix && this.matrix[this._mode]){\r\n\t\treturn this.matrix[this._mode].y_property;\r\n\t}else if(this._props && this._props[this._mode]){\r\n\t\treturn this._props[this._mode].map_to;\r\n\t}\r\n\treturn null;\r\n};\r\n\r\nscheduler._is_initialized = function(){\r\n\tvar state = this.getState();\r\n\treturn (this._obj && state.date && state.mode);\r\n};\r\nscheduler._is_lightbox_open = function(){\r\n\tvar state = this.getState();\r\n\treturn state.lightbox_id !== null && state.lightbox_id !== undefined;\r\n};\r\n\r\n}","export default {\r\n\tevent: function (el, event, handler){\r\n\t\tif (el.addEventListener)\r\n\t\t\tel.addEventListener(event, handler, false);\r\n\t\r\n\t\telse if (el.attachEvent)\r\n\t\t\tel.attachEvent(\"on\"+event, handler);\r\n\t},\r\n\teventRemove: function (el, event, handler){\r\n\t\tif (el.removeEventListener)\r\n\t\t\tel.removeEventListener(event, handler, false);\r\n\t\r\n\t\telse if (el.detachEvent)\r\n\t\t\tel.detachEvent(\"on\"+event, handler);\r\n\t}\r\n};","import defaultDomEvents from './event';\r\n\r\nexport default function(){\r\n\r\n\tvar domEvents = function (addEvent, removeEvent) {\r\n\t\taddEvent = addEvent || defaultDomEvents.event;\r\n\t\tremoveEvent = removeEvent || defaultDomEvents.eventRemove;\r\n\t\tvar handlers = [];\r\n\t\tvar eventScope = {\r\n\t\t\tattach: function(el, event, callback, capture){\r\n\t\t\t\thandlers.push({element: el, event:event, callback: callback, capture: capture});\r\n\t\t\t\taddEvent(el, event, callback, capture);\r\n\t\t\t},\r\n\t\t\tdetach: function(el, event, callback, capture){\r\n\t\t\t\tremoveEvent(el, event, callback, capture);\r\n\t\t\t\tfor(var i = 0; i < handlers.length; i++){\r\n\t\t\t\t\tvar handler = handlers[i];\r\n\t\t\t\t\tif (handler.element === el && handler.event === event && handler.callback === callback && handler.capture === capture) {\r\n\t\t\t\t\t\thandlers.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tdetachAll: function () {\r\n\t\t\t\tvar staticArray = handlers.slice();\r\n\t\t\t\t// original handlers array can be spliced on every iteration\r\n\t\t\t\tfor (var i = 0; i < staticArray.length; i++){\r\n\t\t\t\t\tvar handler = staticArray[i];\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, handler.capture);\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, undefined);\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, false);\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, true);\r\n\t\t\t\t}\r\n\t\t\t\thandlers.splice(0, handlers.length);\r\n\t\t\t},\r\n\t\t\textend: function(){\r\n\t\t\t\treturn domEvents(this.event, this.eventRemove);\r\n\t\t\t}\r\n\t\t};\r\n\t\treturn eventScope;\r\n\t};\r\n\t\r\n\treturn domEvents();\r\n}","import createEventScope from './utils/scoped_event';\r\n\r\nexport default function extend(scheduler) {\r\n\r\n\r\nvar domEvents = createEventScope();\r\n\r\nscheduler.event = domEvents.attach;\r\nscheduler.eventRemove = domEvents.detach;\r\nscheduler._eventRemoveAll = domEvents.detachAll;\r\nscheduler._createDomEventScope = domEvents.extend;\r\n\r\n\r\nscheduler._trim = function(str){\r\n\tvar func = String.prototype.trim || function(){ return this.replace(/^\\s+|\\s+$/g, \"\"); };\r\n\treturn func.apply(str);\r\n};\r\n\r\nscheduler._isDate = function(obj){\r\n\tif (obj && typeof obj == \"object\") {\r\n\t\treturn !!(obj.getFullYear && obj.getMonth && obj.getDate);\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n};\r\n\r\nscheduler._isObject = function(obj){\r\n\treturn (obj && typeof obj == \"object\");\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n(function(){\r\n\r\n\t// eslint-disable-next-line no-control-regex\r\n\tvar htmlTags = new RegExp(\"<(?:.|\\n)*?>\", \"gm\");\r\n\tvar extraSpaces = new RegExp(\" +\", \"gm\");\r\n\r\n\tfunction stripHTMLLite(htmlText){\r\n\t\treturn (htmlText + \"\")\r\n\t\t\t.replace(htmlTags, \" \").\r\n\t\t\treplace(extraSpaces, \" \");\r\n\t}\r\n\r\n\tvar singleQuotes = new RegExp(\"'\", \"gm\");\r\n\tfunction escapeQuotes(text){\r\n\t\treturn (text + \"\").replace(singleQuotes, \"'\");\r\n\t}\r\n\r\n\tscheduler._waiAria = {\r\n\t\tgetAttributeString: function(attr){\r\n\t\t\tvar attributes = [\" \"];\r\n\t\t\tfor(var i in attr){\r\n\t\t\t\tif(typeof attr[i] != \"function\" && typeof attr[i] != \"object\") {\r\n\t\t\t\t\tvar text = escapeQuotes(stripHTMLLite(attr[i]));\r\n\t\t\t\t\tattributes.push(i + \"='\" + text + \"'\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tattributes.push(\" \");\r\n\t\t\treturn attributes.join(\" \");\r\n\t\t},\r\n\t\tsetAttributes: function(div, values){\r\n\t\t\tfor(var i in values){\r\n\t\t\t\tdiv.setAttribute(i, stripHTMLLite(values[i]));\r\n\t\t\t}\r\n\t\t\treturn div;\r\n\t\t},\r\n\r\n\t\tlabelAttr: function(div, content){\r\n\t\t\treturn this.setAttributes(div, {\"aria-label\": content});\r\n\t\t},\r\n\t\tlabel: function(label){\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": label});\r\n\t\t},\r\n\r\n\t\t// day/week/units\r\n\r\n\t\thourScaleAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\r\n\t\t},\r\n\t\tmonthCellAttr: function(div, date){\r\n\t\t\tthis.labelAttr(div, scheduler.templates.day_date(date));\r\n\t\t},\r\n\r\n\t\tnavBarDateAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\t\t},\r\n\t\tdayHeaderAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\t\t},\r\n\r\n\t\tdayColumnAttr: function(div, date){\r\n\t\t\tthis.dayHeaderAttr(div, scheduler.templates.day_date(date));\r\n\t\t},\r\n\r\n\t\theaderButtonsAttributes: function(div, label){\r\n\t\t\treturn this.setAttributes(div, {\"role\":\"button\", \"aria-label\":label});\r\n\t\t},\r\n\r\n\t\theaderToggleState: function(div, isActive){\r\n\t\t\treturn this.setAttributes(div, {\"aria-pressed\": isActive ? \"true\" : \"false\"});\r\n\t\t},\r\n\r\n\r\n\t\tgetHeaderCellAttr:function(dateString){\r\n\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": dateString});\r\n\t\t},\r\n\r\n\r\n\t\teventAttr: function(event, div){\r\n\t\t\tthis._eventCommonAttr(event, div);\r\n\t\t},\r\n\r\n\r\n\t\t_eventCommonAttr: function(event, div){\r\n\t\t\tdiv.setAttribute(\"aria-label\", stripHTMLLite(scheduler.templates.event_text(event.start_date, event.end_date, event)));\r\n\r\n\t\t\tif(scheduler.config.readonly){\r\n\t\t\t\tdiv.setAttribute(\"aria-readonly\", true);\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif(event.$dataprocessor_class){\r\n\t\t\t\tdiv.setAttribute(\"aria-busy\", true);\r\n\t\t\t}\r\n\r\n\r\n\t\t\tdiv.setAttribute(\"aria-selected\",\r\n\t\t\t\t(scheduler.getState().select_id == event.id) ? \"true\" : \"false\");\r\n\t\t},\r\n\r\n\t\tsetEventBarAttr: function(event, div){\r\n\t\t\tthis._eventCommonAttr(event, div);\r\n\t\t},\r\n\r\n\t\t_getAttributes: function(attributeSetter, arg){\r\n\t\t\tvar result = {\r\n\t\t\t\tsetAttribute:function(name, value){\r\n\t\t\t\t\tthis[name] = value;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\tattributeSetter.apply(this, [arg, result]);\r\n\t\t\treturn result;\r\n\r\n\t\t},\r\n\r\n\t\teventBarAttrString: function(event){\r\n\t\t\treturn this.getAttributeString(this._getAttributes(this.setEventBarAttr, event));\r\n\t\t},\r\n\r\n\r\n\r\n\t\tagendaHeadAttrString :function(){\r\n\t\t\treturn this.getAttributeString({role: \"row\"});\r\n\t\t},\r\n\t\tagendaHeadDateString :function(label){\r\n\t\t\treturn this.getAttributeString({role: \"columnheader\", \"aria-label\": label});\r\n\t\t},\r\n\t\tagendaHeadDescriptionString :function(label){\r\n\t\t\treturn this.agendaHeadDateString(label);\r\n\t\t},\r\n\t\tagendaDataAttrString: function(){\r\n\t\t\treturn this.getAttributeString({role: \"grid\"});\r\n\t\t},\r\n\t\tagendaEventAttrString: function(event){\r\n\t\t\tvar attrs = this._getAttributes(this._eventCommonAttr, event);\r\n\r\n\t\t\tattrs[\"role\"] = \"row\";\r\n\r\n\t\t\treturn this.getAttributeString(attrs);\r\n\r\n\t\t},\r\n\t\tagendaDetailsBtnString: function(){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels.icon_details});\r\n\t\t},\r\n\r\n\r\n\t\tgridAttrString: function(){\r\n\t\t\treturn this.getAttributeString({role: \"grid\"});\r\n\t\t},\r\n\r\n\t\tgridRowAttrString: function(event){\r\n\t\t\treturn this.agendaEventAttrString(event);\r\n\t\t},\r\n\r\n\t\tgridCellAttrString: function(event, column, value){\r\n\t\t\treturn this.getAttributeString({\"role\":\"gridcell\", \"aria-label\": [\r\n\t\t\t\t(column.label === undefined ? column.id : column.label),\r\n\t\t\t\t\": \",\r\n\t\t\t\tvalue\r\n\t\t\t]});\r\n\t\t},\r\n\r\n\t\tmapAttrString: function(){\r\n\t\t\treturn this.gridAttrString();\r\n\t\t},\r\n\t\tmapRowAttrString: function(event){\r\n\t\t\treturn this.gridRowAttrString(event);\r\n\t\t},\r\n\t\tmapDetailsBtnString: function(){\r\n\t\t\treturn this.agendaDetailsBtnString();\r\n\t\t},\r\n\r\n\t\tminicalHeader: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"id\":headerId+\"\",\r\n\t\t\t\t\"aria-live\":\"assertice\",\r\n\t\t\t\t\"aria-atomic\":\"true\"\r\n\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalGrid: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"aria-labelledby\":headerId+\"\",\r\n\t\t\t\t\"role\":\"grid\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalRow: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"row\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalDayCell: function(div, date){\r\n\t\t\tvar selected = (date.valueOf() < scheduler._max_date.valueOf() && date.valueOf() >= scheduler._min_date.valueOf());\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"gridcell\",\r\n\t\t\t\t\"aria-label\": scheduler.templates.day_date(date),\r\n\t\t\t\t\"aria-selected\": selected ? \"true\" : \"false\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalHeadCell: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"columnheader\"\r\n\t\t\t});\r\n\t\t},\r\n\r\n\r\n\t\tweekAgendaDayCell: function(div, date){\r\n\t\t\tvar header = div.querySelector(\".dhx_wa_scale_bar\");\r\n\t\t\tvar content = div.querySelector(\".dhx_wa_day_data\");\r\n\t\t\tvar headerId = scheduler.uid() + \"\";\r\n\t\t\tthis.setAttributes(header, { \"id\": headerId});\r\n\t\t\tthis.setAttributes(content, { \"aria-labelledby\": headerId});\r\n\r\n\t\t},\r\n\t\tweekAgendaEvent: function(div, event){\r\n\t\t\tthis.eventAttr(event, div);\r\n\t\t},\r\n\r\n\t\tlightboxHiddenAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t},\r\n\r\n\t\tlightboxVisibleAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"false\");\r\n\t\t},\r\n\r\n\t\tlightboxSectionButtonAttrString: function(label){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":label, \"tabindex\":\"0\"});\r\n\t\t},\r\n\r\n\t\tyearHeader: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"id\":headerId+\"\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tyearGrid: function(div, headerId){\r\n\t\t\tthis.minicalGrid(div, headerId);\r\n\t\t},\r\n\t\tyearHeadCell: function(div){\r\n\t\t\treturn this.minicalHeadCell(div);\r\n\t\t},\r\n\t\tyearRow: function(div){\r\n\t\t\treturn this.minicalRow(div);\r\n\t\t},\r\n\t\tyearDayCell: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"gridcell\"\r\n\t\t\t});\r\n\t\t},\r\n\r\n\t\tlightboxAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t\tdiv.firstChild.setAttribute(\"role\", \"heading\");\r\n\t\t},\r\n\r\n\t\tlightboxButtonAttrString:function(buttonName){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels[buttonName], \"tabindex\":\"0\"});\r\n\t\t},\r\n\t\teventMenuAttrString: function(iconName){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels[iconName]});\r\n\t\t},\r\n\t\tlightboxHeader: function(div, headerText){\r\n\t\t\tdiv.setAttribute(\"aria-label\", headerText);\r\n\t\t},\r\n\r\n\t\tlightboxSelectAttrString: function(time_option){\r\n\t\t\tvar label = \"\";\r\n\r\n\t\t\tswitch (time_option) {\r\n\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.year;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%m\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.month;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%d\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.day;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%H:%i\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.hour + \" \" + scheduler.locale.labels.minute;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": label});\r\n\t\t},\r\n\r\n\r\n\t\tmessageButtonAttrString: function(buttonLabel){\r\n\t\t\treturn \"tabindex='0' role='button' aria-label='\"+buttonLabel+\"'\";\r\n\t\t},\r\n\r\n\t\tmessageInfoAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"alert\");\r\n\t\t\t//div.setAttribute(\"tabindex\", \"-1\");\r\n\t\t},\r\n\r\n\t\tmessageModalAttr: function(div, uid){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t\tif(uid){\r\n\t\t\t\tdiv.setAttribute(\"aria-labelledby\", uid);\r\n\t\t\t}\r\n\r\n\t\t\t//\tdiv.setAttribute(\"tabindex\", \"-1\");\r\n\t\t},\r\n\r\n\t\tquickInfoAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t},\r\n\r\n\t\tquickInfoHeaderAttrString: function(){\r\n\t\t\treturn \" role='heading' \";\r\n\t\t},\r\n\r\n\t\tquickInfoHeader: function(div, header){\r\n\t\t\tdiv.setAttribute(\"aria-label\", header);\r\n\t\t},\r\n\r\n\t\tquickInfoButtonAttrString: function(label){\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"role\":\"button\", \"aria-label\":label, \"tabindex\":\"0\"});\r\n\t\t},\r\n\r\n\t\ttooltipAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"tooltip\");\r\n\t\t},\r\n\r\n\t\ttooltipVisibleAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"false\");\r\n\t\t},\r\n\r\n\t\ttooltipHiddenAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t}\r\n\t};\r\n\r\n\tfunction isDisabled(){\r\n\t\treturn !scheduler.config.wai_aria_attributes;\r\n\t}\r\n\r\n\tfor(var i in scheduler._waiAria){\r\n\t\tscheduler._waiAria[i] = (function(payload){\r\n\t\t\treturn function(){\r\n\t\t\t\tif(isDisabled()){\r\n\t\t\t\t\treturn \" \";\r\n\t\t\t\t}\r\n\t\t\t\treturn payload.apply(this, arguments);\r\n\t\t\t};\r\n\t\t})(scheduler._waiAria[i]);\r\n\t}\r\n\r\n\r\n})();\r\n\r\n}","var uidSeed = Date.now();\r\nfunction uid () {\r\n\treturn uidSeed++;\r\n}\r\n\r\n// iframe-safe array type check instead of using instanceof\r\nfunction isArray(obj){\r\n\tif(Array.isArray){\r\n\t\treturn Array.isArray(obj);\r\n\t}else{\r\n\t\t// close enough\r\n\t\treturn (obj && obj.length !== undefined && obj.pop && obj.push);\r\n\t}\r\n}\r\n\r\n// non-primitive string object, e.g. new String(\"abc\")\r\nfunction isStringObject(obj){\r\n\treturn obj && typeof obj === \"object\" && \r\n\t\tFunction.prototype.toString.call(obj.constructor) === \"function String() { [native code] }\";\r\n}\r\n\r\n// non-primitive number object, e.g. new Number(5)\r\nfunction isNumberObject(obj){\r\n\treturn obj && typeof obj === \"object\" && \r\n\t\tFunction.prototype.toString.call(obj.constructor) === \"function Number() { [native code] }\";\r\n}\r\n\r\n// non-primitive number object, e.g. new Boolean(true)\r\nfunction isBooleanObject(obj){\r\n\treturn obj && typeof obj === \"object\" &&\r\n\t\tFunction.prototype.toString.call(obj.constructor) === \"function Boolean() { [native code] }\";\r\n}\r\n\r\nfunction isDate(obj) {\r\n\tif (obj && typeof obj === \"object\") {\r\n\t\treturn !!(obj.getFullYear && obj.getMonth && obj.getDate);\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n}\r\n\r\nfunction defined(obj) {\r\n\treturn typeof(obj) != \"undefined\";\r\n}\r\n\r\nfunction delay (callback, timeout){\r\n\tvar timer;\r\n\r\n\tvar result = function() {\r\n\t\tresult.$cancelTimeout();\r\n\t\tresult.$pending = true;\r\n\t\tvar args = Array.prototype.slice.call(arguments);\r\n\t\ttimer = setTimeout(function(){\r\n\t\t\tcallback.apply(this, args);\r\n\t\t\tresult.$pending = false;\r\n\t\t}, timeout);\r\n\t};\r\n\r\n\tresult.$pending = false;\r\n\tresult.$cancelTimeout = function(){\r\n\t\tclearTimeout(timer);\r\n\t\tresult.$pending = false;\r\n\t};\r\n\tresult.$execute = function(){\r\n\t\tvar args = Array.prototype.slice.call(arguments);\r\n\t\tcallback.apply(this, args);\r\n\t\tresult.$cancelTimeout();\r\n\t};\r\n\r\n\treturn result;\r\n}\r\n\r\nexport default {\r\n\tuid: uid,\r\n\tmixin: function mixin (target, source, force){\r\n\t\tfor (var f in source)\r\n\t\t\tif (((target[f] === undefined) || force)) target[f]=source[f];\r\n\t\treturn target;\r\n\t},\r\n\tcopy: function copy(object) {\r\n\t\tvar i, result; // iterator, types array, result\r\n\t\r\n\t\tif (object && typeof object == \"object\") {\r\n\t\r\n\t\t\tswitch (true){\r\n\t\t\t\tcase (isDate(object)):\r\n\t\t\t\t\tresult = new Date(object);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isArray(object)):\r\n\t\t\t\t\tresult = new Array(object.length);\r\n\t\t\t\t\tfor(i = 0; i < object.length; i++){\r\n\t\t\t\t\t\tresult[i] = copy(object[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isStringObject(object)):\r\n\t\t\t\t\tresult = new String(object);// jshint ignore:line\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isNumberObject(object)):\r\n\t\t\t\t\tresult = new Number(object);// jshint ignore:line\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isBooleanObject(object)):\r\n\t\t\t\t\tresult = new Boolean(object);// jshint ignore:line\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tresult = {};\r\n\t\t\t\t\tfor (i in object) {\r\n\t\t\t\t\t\tconst varType = typeof object[i];\r\n\r\n\t\t\t\t\t\tif (varType === \"string\" || varType === \"number\" || varType === \"boolean\" ) {\r\n\t\t\t\t\t\t\tresult[i] = object[i];\r\n\t\t\t\t\t\t} else if(isDate(object[i])){\r\n\t\t\t\t\t\t\tresult[i] = new Date(object[i]);\r\n\t\t\t\t\t\t}else if (Object.prototype.hasOwnProperty.apply(object, [i]))\r\n\t\t\t\t\t\t\tresult[i] = copy(object[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result || object;\r\n\t},\r\n\tdefined,\r\n\tisDate,\r\n\tdelay\r\n};\r\n","//returns position of html element on the page\r\nfunction elementPosition(elem) {\r\n\tvar top=0, left=0, right=0, bottom=0;\r\n\tif (elem.getBoundingClientRect) { //HTML5 method\r\n\t\tvar box = elem.getBoundingClientRect();\r\n\t\tvar body = document.body;\r\n\t\tvar docElem = (document.documentElement ||\r\n\t\t\tdocument.body.parentNode ||\r\n\t\t\tdocument.body);\r\n\r\n\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\r\n\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\r\n\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\r\n\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\r\n\t\ttop = box.top + scrollTop - clientTop;\r\n\t\tleft = box.left + scrollLeft - clientLeft;\r\n\r\n\t\tright = document.body.offsetWidth - box.right;\r\n\t\tbottom = document.body.offsetHeight - box.bottom;\r\n\t} else { //fallback to naive approach\r\n\t\twhile(elem) {\r\n\t\t\ttop = top + parseInt(elem.offsetTop,10);\r\n\t\t\tleft = left + parseInt(elem.offsetLeft,10);\r\n\t\t\telem = elem.offsetParent;\r\n\t\t}\r\n\r\n\t\tright = document.body.offsetWidth - elem.offsetWidth - left;\r\n\t\tbottom = document.body.offsetHeight - elem.offsetHeight - top;\r\n\t}\r\n\treturn { y: Math.round(top), x: Math.round(left), width:elem.offsetWidth, height:elem.offsetHeight, right: Math.round(right), bottom: Math.round(bottom) };\r\n}\r\n\r\n/*\r\nevent position relatively to DOM element\r\n */\r\nfunction getRelativeEventPosition(ev, node){\r\n\tvar d = document.documentElement;\r\n\tvar box = elementPosition(node);\r\n\r\n\treturn {\r\n\t\tx: ev.clientX + d.scrollLeft - d.clientLeft - box.x + node.scrollLeft,\r\n\t\ty: ev.clientY + d.scrollTop - d.clientTop - box.y + node.scrollTop\r\n\t};\r\n}\r\n\r\nfunction getNodePosition(elem) {\r\n\tvar top=0, left=0, right=0, bottom=0;\r\n\tif (elem.getBoundingClientRect) { //HTML5 method\r\n\t\tvar box = elem.getBoundingClientRect();\r\n\t\tvar body = document.body;\r\n\t\tvar docElem = (document.documentElement ||\r\n\t\t\tdocument.body.parentNode ||\r\n\t\t\tdocument.body);\r\n\r\n\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\r\n\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\r\n\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\r\n\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\r\n\t\ttop = box.top + scrollTop - clientTop;\r\n\t\tleft = box.left + scrollLeft - clientLeft;\r\n\r\n\t\tright = document.body.offsetWidth - box.right;\r\n\t\tbottom = document.body.offsetHeight - box.bottom;\r\n\t} else { //fallback to naive approach\r\n\t\twhile(elem) {\r\n\t\t\ttop = top + parseInt(elem.offsetTop,10);\r\n\t\t\tleft = left + parseInt(elem.offsetLeft,10);\r\n\t\t\telem = elem.offsetParent;\r\n\t\t}\r\n\r\n\t\tright = document.body.offsetWidth - elem.offsetWidth - left;\r\n\t\tbottom = document.body.offsetHeight - elem.offsetHeight - top;\r\n\t}\r\n\treturn { y: Math.round(top), x: Math.round(left), width:elem.offsetWidth, height:elem.offsetHeight, right: Math.round(right), bottom: Math.round(bottom) };\r\n}\r\n\r\nfunction getClassName(node){\r\n\tif(!node) return \"\";\r\n\r\n\tvar className = node.className || \"\";\r\n\tif(className.baseVal)//'className' exist but not a string - IE svg element in DOM\r\n\t\tclassName = className.baseVal;\r\n\r\n\tif(!className.indexOf)\r\n\t\tclassName = '';\r\n\r\n\treturn className || \"\";\r\n}\r\n\r\nfunction getTargetNode(e) {\r\n\tvar trg;\r\n\tif (e.tagName)\r\n\t\ttrg = e;\r\n\telse {\r\n\t\te = e || window.event;\r\n\t\ttrg = e.target || e.srcElement;\r\n\t\tif (trg.shadowRoot && e.composedPath) {\r\n\t\t\ttrg = e.composedPath()[0];\r\n\t\t}\r\n\t}\r\n\treturn trg;\r\n}\r\n\r\nfunction locateCss(e, classname, strict){\r\n\tif(strict === undefined)\r\n\t\tstrict = true;\r\n\r\n\tvar trg = e.target || e.srcElement;\r\n\tvar css = '';\r\n\r\n\twhile (trg){\r\n\t\tcss = getClassName(trg);\r\n\r\n\t\tif(css){\r\n\t\t\tvar ind = css.indexOf(classname);\r\n\t\t\tif (ind >= 0){\r\n\t\t\t\tif (!strict)\r\n\t\t\t\t\treturn trg;\r\n\r\n\t\t\t\t//check that we have exact match\r\n\t\t\t\tvar left = (ind === 0) || (!((css.charAt(ind - 1)||\"\").trim()));\r\n\t\t\t\tvar right = ((ind + classname.length >= css.length)) || (!((css.charAt(ind + classname.length)).trim()));\r\n\r\n\t\t\t\tif (left && right)\r\n\t\t\t\t\treturn trg;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\ttrg=trg.parentNode;\r\n\t}\r\n\treturn null;\r\n}\r\n\r\n\r\n// get focusable nodes\r\nfunction isVisible(node){\r\n\tvar display = false,\r\n\t\tvisibility = false;\r\n\tif(window.getComputedStyle){\r\n\t\tvar style = window.getComputedStyle(node, null);\r\n\t\tdisplay = style[\"display\"];\r\n\t\tvisibility = style[\"visibility\"];\r\n\t}else if(node.currentStyle){\r\n\t\tdisplay = node.currentStyle[\"display\"];\r\n\t\tvisibility = node.currentStyle[\"visibility\"];\r\n\t}\r\n\r\n\tvar hiddenSection = false;\r\n\tvar recurringSection = locateCss({target:node}, \"dhx_form_repeat\", false);\r\n\tif(recurringSection){\r\n\t\thiddenSection = !!(recurringSection.style.height == \"0px\");\r\n\t}\r\n\thiddenSection = hiddenSection || !(node.offsetHeight);\r\n\r\n\treturn (display != \"none\" && visibility != \"hidden\" && !hiddenSection);\r\n}\r\n\r\nfunction hasNonNegativeTabIndex(node){\r\n\treturn !isNaN(node.getAttribute(\"tabindex\")) && (node.getAttribute(\"tabindex\")*1 >= 0);\r\n}\r\n\r\nfunction hasHref(node){\r\n\tvar canHaveHref = {\"a\": true, \"area\": true};\r\n\tif(canHaveHref[node.nodeName.loLowerCase()]){\r\n\t\treturn !!node.getAttribute(\"href\");\r\n\t}\r\n\treturn true;\r\n}\r\n\r\nfunction isEnabled(node){\r\n\tvar canDisable = {\"input\":true, \"select\":true, \"textarea\":true, \"button\":true, \"object\":true};\r\n\tif(canDisable[node.nodeName.toLowerCase()]){\r\n\t\treturn !node.hasAttribute(\"disabled\");\r\n\t}\r\n\r\n\treturn true;\r\n}\r\n\r\n\r\nfunction getFocusableNodes(root){\r\n\tvar nodes = root.querySelectorAll([\r\n\t\t\"a[href]\",\r\n\t\t\"area[href]\",\r\n\t\t\"input\",\r\n\t\t\"select\",\r\n\t\t\"textarea\",\r\n\t\t\"button\",\r\n\t\t\"iframe\",\r\n\t\t\"object\",\r\n\t\t\"embed\",\r\n\t\t\"[tabindex]\",\r\n\t\t\"[contenteditable]\"\r\n\t].join(\", \"));\r\n\r\n\tvar nodesArray = Array.prototype.slice.call(nodes, 0);\r\n\t\r\n\tfor(var i = 0; i < nodesArray.length; i++){\r\n\t\tnodesArray[i].$position = i;\r\n\t\t// we remember original nodes order, \r\n\t\t// so when we sort them by tabindex we ensure order of nodes with same tabindex is preserved, \r\n\t\t// since some browsers do unstable sort\r\n\t}\r\n\t\r\n\tnodesArray.sort(function(a, b) {\r\n\t\tif(a.tabIndex === 0 && b.tabIndex !== 0){\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\tif(a.tabIndex !== 0 && b.tabIndex === 0){\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\t\r\n\t\tif (a.tabIndex === b.tabIndex){\r\n\t\t\t// ensure we do stable sort\r\n\t\t\treturn a.$position - b.$position;\r\n\t\t}\r\n\t\tif (a.tabIndex < b.tabIndex) {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\treturn 1;\r\n\t});\r\n\t\r\n\tfor(var i = 0; i < nodesArray.length; i++){\r\n\t\tvar node = nodesArray[i];\r\n\t\tvar isValid = (hasNonNegativeTabIndex(node) || isEnabled(node) || hasHref(node)) && isVisible(node);\r\n\t\tif(!isValid){\r\n\t\t\tnodesArray.splice(i, 1);\r\n\t\t\ti--;\r\n\t\t}\r\n\t}\r\n\treturn nodesArray;\r\n}\r\n\r\n\r\nfunction isShadowDomSupported() {\r\n\treturn document.head.createShadowRoot || document.head.attachShadow;\r\n}\r\n\r\n/**\r\n * Returns element that has the browser focus, or null if no element has focus.\r\n * Works with shadow DOM, so it's prefereed to use this function instead of document.activeElement directly.\r\n * @returns HTMLElement\r\n */\r\nfunction getActiveElement(){\r\n\tvar activeElement = document.activeElement;\r\n\tif (activeElement.shadowRoot) {\r\n\t\tactiveElement = activeElement.shadowRoot.activeElement;\r\n\t}\r\n\tif (activeElement === document.body && document.getSelection) {\r\n\t\tactiveElement = document.getSelection().focusNode || document.body;\r\n\t}\r\n\r\n\treturn activeElement;\r\n}\r\n\r\n/**\r\n * Returns document.body or the host node of the ShadowRoot, if the element is attached to ShadowDom\r\n * @param {HTMLElement} element \r\n * @returns HTMLElement\r\n */\r\nfunction getRootNode(element) {\r\n\tif (!element) {\r\n\t\treturn document.body;\r\n\t}\r\n\tif (!isShadowDomSupported()) {\r\n\t\treturn document.body;\r\n\t}\r\n\twhile (element.parentNode && (element = element.parentNode)) {\r\n\t\tif (element instanceof ShadowRoot) {\r\n\t\t\treturn element.host;\r\n\t\t}\r\n\t}\r\n\treturn document.body;\r\n}\r\n\r\nfunction hasShadowParent(element) {\r\n\treturn !!getRootNode(element);\r\n}\r\n\r\nexport default {\r\n\t/**\r\n\t * @desc: Calculate absolute position of html object\r\n\t * @type: private\r\n\t * @param: htmlObject - html object\r\n\t * @topic: 0\r\n\t */\r\n\tgetAbsoluteLeft: function getAbsoluteLeft(htmlObject){\r\n\t\treturn this.getOffset(htmlObject).left;\r\n\t},\r\n\t/**\r\n\t * @desc: Calculate absolute position of html object\r\n\t * @type: private\r\n\t * @param: htmlObject - html object\r\n\t * @topic: 0\r\n\t */\r\n\tgetAbsoluteTop: function getAbsoluteTop(htmlObject){\r\n\t\treturn this.getOffset(htmlObject).top;\r\n\t},\r\n\r\n\tgetOffsetSum: function getOffsetSum(elem) {\r\n\t\tvar top=0, left=0;\r\n\t\twhile(elem) {\r\n\t\t\ttop = top + parseInt(elem.offsetTop);\r\n\t\t\tleft = left + parseInt(elem.offsetLeft);\r\n\t\t\telem = elem.offsetParent;\r\n\t\t}\r\n\t\treturn {top: top, left: left};\r\n\t},\r\n\r\n\tgetOffsetRect: function getOffsetRect(elem) {\r\n\t\tvar box = elem.getBoundingClientRect();\r\n\r\n\t\tvar top = 0,\r\n\t\t\tleft = 0;\r\n\r\n\t\t// https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent#Mobile_Tablet_or_Desktop\r\n\t\tif (!/Mobi/.test(navigator.userAgent)) {\r\n\t\t\tvar body = document.body;\r\n\t\t\tvar docElem = document.documentElement;\r\n\t\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\r\n\t\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\r\n\t\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\r\n\t\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\r\n\r\n\t\t\ttop = box.top + scrollTop - clientTop;\r\n\t\t\tleft = box.left + scrollLeft - clientLeft;\r\n\t\t}else {\r\n\t\t\t// incorrect left coordinate on mobile zoom\r\n\t\t\t// https://bugs.chromium.org/p/chromium/issues/detail?id=489206\r\n\r\n\t\t\tvar dummy = document.createElement(\"div\");\r\n\t\t\tdummy.style.position=\"absolute\";\r\n\t\t\tdummy.style.left=\"0px\";\r\n\t\t\tdummy.style.top=\"0px\";\r\n\t\t\tdummy.style.width=\"1px\";\r\n\t\t\tdummy.style.height = \"1px\";\r\n\r\n\t\t\tdocument.body.appendChild(dummy);\r\n\t\t\tvar dummyBox = dummy.getBoundingClientRect();\r\n\t\t\ttop = box.top - dummyBox.top;\r\n\t\t\tleft = box.left - dummyBox.left;\r\n\r\n\t\t\tdummy.parentNode.removeChild(dummy);\r\n\t\t}\r\n\r\n\t\treturn { top: Math.round(top), left: Math.round(left) };\r\n\t},\r\n\r\n\tgetOffset: function getOffset(elem) {\r\n\t\tif (elem.getBoundingClientRect) {\r\n\t\t\treturn this.getOffsetRect(elem);\r\n\t\t} else {\r\n\t\t\treturn this.getOffsetSum(elem);\r\n\t\t}\r\n\t},\r\n\r\n\tclosest: function(element, selector){\r\n\t\tif(!element || !selector){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn closest(element, selector);\r\n\t},\r\n\tinsertAfter: function(newNode, referenceNode){\r\n\t\tif(referenceNode.nextSibling){\r\n\t\t\treferenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);\r\n\t\t}else{\r\n\t\t\treferenceNode.parentNode.appendChild(newNode);\r\n\t\t}\r\n\t},\r\n\tremove: function(node) {\r\n\t\tif (node && node.parentNode) {\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t}\r\n\t},\r\n\tisChildOf: function(child, parent) {\r\n\t\treturn parent.contains(child);\r\n\t},\r\n\tgetFocusableNodes,\r\n\tgetClassName,\r\n\tlocateCss,\r\n\tgetRootNode,\r\n\thasShadowParent,\r\n\tisShadowDomSupported,\r\n\tgetActiveElement,\r\n\tgetRelativeEventPosition,\r\n\tgetTargetNode,\r\n\tgetNodePosition\r\n};\r\n\r\nvar closest;\r\nif(Element.prototype.closest){\r\n\tclosest = function(element, selector){\r\n\t\treturn element.closest(selector);\r\n\t};\r\n}else{\r\n\tvar matches = Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\r\n\tclosest = function(element, selector) {\r\n\t\tvar el = element;\r\n\t\tdo {\r\n\t\t\tif (matches.call(el, selector)){\r\n\t\t\t\treturn el;\r\n\t\t\t}\r\n\t\t\tel = el.parentElement || el.parentNode;\r\n\t\t} while (el !== null && el.nodeType === 1);\r\n\t\treturn null;\r\n\t};\r\n}\r\n","/* eslint-disable no-restricted-globals */\r\nvar isWindowAwailable = typeof window !== \"undefined\";\r\n\r\n/* eslint-enable no-restricted-globals */\r\n\r\nexport default {\r\n\tisIE: isWindowAwailable && (navigator.userAgent.indexOf(\"MSIE\") >= 0 || navigator.userAgent.indexOf(\"Trident\") >= 0),\r\n\tisOpera: isWindowAwailable && (navigator.userAgent.indexOf(\"Opera\") >= 0),\r\n\tisChrome: isWindowAwailable && (navigator.userAgent.indexOf(\"Chrome\") >= 0),\r\n\tisKHTML: isWindowAwailable && (navigator.userAgent.indexOf(\"Safari\") >= 0 || navigator.userAgent.indexOf(\"Konqueror\") >= 0),\r\n\tisFF: isWindowAwailable && (navigator.userAgent.indexOf(\"Firefox\") >= 0),\r\n\tisIPad: isWindowAwailable && (navigator.userAgent.search(/iPad/gi) >= 0),\r\n\tisEdge: isWindowAwailable && (navigator.userAgent.indexOf(\"Edge\")!=-1),\r\n\tisNode: (!isWindowAwailable || typeof navigator == \"undefined\")\r\n};","export default function extend(scheduler) {\r\n\r\nscheduler.destructor = function(){\r\n\tscheduler.callEvent(\"onDestroy\", []);\r\n\tthis.clearAll();\r\n\r\n\tif(this.$container){\r\n\t\t// FIXME: clear container or remove container\r\n\t\tthis.$container.innerHTML = \"\";\r\n\t\t// scheduler.$domHelpers.remove(this.$container);\r\n\t}\r\n\r\n\tif(this._eventRemoveAll){\r\n\t\tthis._eventRemoveAll();\r\n\t}\r\n\r\n\tif(this.resetLightbox){\r\n\t\tthis.resetLightbox();\r\n\t}\r\n\r\n\tif(this._dp && this._dp.destructor){\r\n\t\tthis._dp.destructor();\r\n\t}\r\n\r\n\t// detachAllEvents should be called last, because in components may be attached events\r\n\tthis.detachAllEvents();\r\n\r\n\tfor(var i in this){\r\n\t\tif(i.indexOf(\"$\") === 0){\r\n\t\t\tdelete this[i];\r\n\t\t}\r\n\t}\r\n\tscheduler.$destroyed = true;\r\n};\r\n\r\n}","export default function(data) {\r\n\tif (typeof data === \"string\" || typeof data === \"number\") {\r\n\t\treturn data;\r\n\t}\r\n\tvar result = \"\";\r\n\tfor (var key in data) {\r\n\t\tvar serialized = \"\";\r\n\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\tif (typeof data[key] === \"string\") {\r\n\t\t\t\tserialized = encodeURIComponent(data[key]);\r\n\t\t\t} else if (typeof data[key] === \"number\") {\r\n\t\t\t\tserialized = data[key];\r\n\t\t\t} else {\r\n\t\t\t\tserialized = encodeURIComponent(JSON.stringify(data[key]));\r\n\t\t\t}\r\n\t\t\tserialized = key + \"=\" + serialized;\r\n\r\n\t\t\tif (result.length) {\r\n\t\t\t\tserialized = \"&\" + serialized;\r\n\t\t\t}\r\n\t\t\tresult += serialized;\r\n\t\t}\r\n\t}\r\n\treturn result;\r\n}","import serialize from \"../common/url_serialize.js\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler.Promise = window.Promise; \r\n\r\nfunction createConfig(method, args) {\r\n\tvar result = {\r\n\t\tmethod: method\r\n\t};\r\n\r\n\tif (args.length === 0) {\r\n\t\tthrow new Error(\"Arguments list of query is wrong.\");\r\n\t}\r\n\tif (args.length === 1) {\r\n\t\tif (typeof args[0] === \"string\") {\r\n\t\t\tresult.url = args[0];\r\n\t\t\tresult.async = true;\r\n\t\t} else {\r\n\t\t\tresult.url = args[0].url;\r\n\t\t\tresult.async = (args[0].async || true);\r\n\t\t\tresult.callback = args[0].callback;\r\n\t\t\tresult.headers = args[0].headers;\r\n\t\t}\r\n\t\tif (method === \"POST\" || \"PUT\") {\r\n\t\t\tif (args[0].data) {\r\n\t\t\t\tif (typeof args[0].data !== \"string\") {\r\n\t\t\t\t\tresult.data = serialize(args[0].data);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresult.data = args[0].data;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tresult.data = \"\";\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n\r\n\tresult.url = args[0];\r\n\tswitch(method) {\r\n\t\tcase \"GET\":\r\n\t\tcase \"DELETE\":\r\n\t\t\tresult.callback = args[1];\r\n\t\t\tresult.headers = args[2];\r\n\t\tbreak;\r\n\t\tcase \"POST\":\r\n\t\tcase \"PUT\":\r\n\t\t\tif (args[1]) {\r\n\t\t\t\tif (typeof args[1] !== \"string\") {\r\n\t\t\t\t\tresult.data = serialize(args[1]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresult.data = args[1];\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tresult.data = \"\";\r\n\t\t\t}\r\n\t\t\tresult.callback = args[2];\r\n\t\t\tresult.headers = args[3];\r\n\t\tbreak;\r\n\t}\r\n\treturn result;\r\n}\r\nscheduler.ajax = {\r\n\t// if false - dhxr param will added to prevent caching on client side (default),\r\n\t// if true - do not add extra params\r\n\tcache: true,\r\n\r\n\t// default method for load/loadStruct, post/get allowed\r\n\tmethod: \"get\",\r\n\r\n\tserializeRequestParams: serialize,\r\n\tparse: function(data) {\r\n\t\tif (typeof data !== \"string\") return data;\r\n\r\n\t\tvar obj;\r\n\t\tdata = data.replace(/^[\\s]+/,\"\");\r\n\t\tif (typeof DOMParser !== \"undefined\" && !scheduler.$env.isIE) { // ff,ie9\r\n\t\t\tobj = (new DOMParser()).parseFromString(data, \"text/xml\");\r\n\t\t} else if (typeof window.ActiveXObject !== \"undefined\") {\r\n\t\t\tobj = new window.ActiveXObject(\"Microsoft.XMLDOM\");\r\n\t\t\tobj.async = \"false\";\r\n\t\t\tobj.loadXML(data);\r\n\t\t}\r\n\t\treturn obj;\r\n\t},\r\n\txmltop: function(tagname, xhr, obj) {\r\n\t\tif (typeof xhr.status == \"undefined\" || xhr.status < 400) {\r\n\t\t\tvar xml = (!xhr.responseXML) ? this.parse(xhr.responseText || xhr) : (xhr.responseXML || xhr);\r\n\t\t\tif (xml && xml.documentElement !== null && !xml.getElementsByTagName(\"parsererror\").length) {\r\n\t\t\t\treturn xml.getElementsByTagName(tagname)[0];\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (obj !== -1) scheduler.callEvent(\"onLoadXMLError\",[\"Incorrect XML\", arguments[1], obj]);\r\n\t\treturn document.createElement(\"DIV\");\r\n\t},\r\n\txpath: function(xpathExp, docObj) {\r\n\t\tif (!docObj.nodeName) docObj = docObj.responseXML || docObj;\r\n\t\tif (scheduler.$env.isIE) {\r\n\t\t\treturn docObj.selectNodes(xpathExp)||[];\r\n\t\t} else {\r\n\t\t\tvar rows = [];\r\n\t\t\tvar first;\r\n\t\t\tvar col = (docObj.ownerDocument||docObj).evaluate(xpathExp, docObj, null, XPathResult.ANY_TYPE, null);\r\n\r\n\t\t\twhile (true){\r\n\t\t\t\tfirst = col.iterateNext();\r\n\t\t\t\tif(first){\r\n\t\t\t\t\trows.push(first);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn rows;\r\n\t\t}\r\n\t},\r\n\tquery: function(config) {\r\n\t\treturn this._call(\r\n\t\t\t(config.method || \"GET\"),\r\n\t\t\tconfig.url,\r\n\t\t\tconfig.data || \"\",\r\n\t\t\t(config.async || true),\r\n\t\t\tconfig.callback,\r\n\t\t\tconfig.headers\r\n\t\t);\r\n\t},\r\n\tget: function(url, onLoad, headers) {\r\n\t\tvar config = createConfig(\"GET\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tgetSync: function(url, headers) {\r\n\t\tvar config = createConfig(\"GET\", arguments);\r\n\t\tconfig.async = false;\r\n\t\treturn this.query(config);\r\n\t},\r\n\tput: function(url, postData, onLoad, headers) {\r\n\t\tvar config = createConfig(\"PUT\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tdel: function(url, onLoad, headers) {\r\n\t\t/**\r\n\t\t * https://tools.ietf.org/html/rfc7231#section-4.3.5\r\n\t\t * A payload within a DELETE request message has no defined semantics;\r\n\t\t * sending a payload body on a DELETE request might cause some existing\r\n\t\t * implementations to reject the request.\r\n\t\t */\r\n\t\tvar config = createConfig(\"DELETE\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tpost: function(url, postData, onLoad, headers) {\r\n\t\tif (arguments.length == 1) {\r\n\t\t\tpostData = \"\";\r\n\t\t} else if (arguments.length == 2 && typeof(postData) == \"function\") {\r\n\t\t\tonLoad = postData;\r\n\t\t\tpostData = \"\";\r\n\t\t}\r\n\t\tvar config = createConfig(\"POST\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tpostSync: function(url, postData, headers) {\r\n\t\tpostData = (postData === null ? \"\" : String(postData));\r\n\r\n\t\tvar config = createConfig(\"POST\", arguments);\r\n\t\tconfig.async = false;\r\n\t\treturn this.query(config);\r\n\t},\r\n\t_call: function(method, url, postData, async, onLoad, headers) {\r\n\t\treturn new scheduler.Promise((function(resolve, reject) {\r\n\t\t\tvar t = (typeof XMLHttpRequest !== undefined && !scheduler.$env.isIE ? new XMLHttpRequest() : new window.ActiveXObject(\"Microsoft.XMLHTTP\"));\r\n\t\t\tvar isQt = (navigator.userAgent.match(/AppleWebKit/) !== null && navigator.userAgent.match(/Qt/) !== null && navigator.userAgent.match(/Safari/) !== null);\r\n\r\n\t\t\tif (!!async) {\r\n\t\t\t\tt.addEventListener(\"readystatechange\", function() {\r\n\t\t\t\t\tif ((t.readyState == 4) || (isQt && t.readyState == 3)) { // what for long response and status 404?\r\n\t\t\t\t\t\tif (t.status != 200 || t.responseText === \"\")\r\n\t\t\t\t\t\t\tif (!scheduler.callEvent(\"onAjaxError\", [t])) return;\r\n\r\n\t\t\t\t\t\tsetTimeout(function() {\r\n\t\t\t\t\t\t\tif (typeof(onLoad) == \"function\") {\r\n\t\t\t\t\t\t\t\tonLoad.apply(window, [{xmlDoc:t, filePath:url}]); // dhtmlx-compat, response.xmlDoc.responseXML/responseText\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tresolve(t);\r\n\t\t\t\t\t\t\tif (typeof(onLoad) == \"function\") {\r\n\t\t\t\t\t\t\t\tonLoad = null;\r\n\t\t\t\t\t\t\t\tt = null;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}, 0);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif (method == \"GET\" && !this.cache) {\r\n\t\t\t\turl += (url.indexOf(\"?\")>=0?\"&\":\"?\")+\"dhxr\"+new Date().getTime()+\"=1\";\r\n\t\t\t}\r\n\r\n\t\t\tt.open(method, url, async);\r\n\r\n\t\t\tif (headers){\r\n\t\t\t\tfor (var key in headers)\r\n\t\t\t\t\tt.setRequestHeader(key, headers[key]);\r\n\t\t\t} else if (method.toUpperCase() == \"POST\" || method == \"PUT\" || method == \"DELETE\") {\r\n\t\t\t\tt.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\r\n\t\t\t} else if (method == \"GET\") {\r\n\t\t\t\tpostData = null;\r\n\t\t\t}\r\n\r\n\t\t\tt.setRequestHeader(\"X-Requested-With\", \"XMLHttpRequest\");\r\n\r\n\t\t\tt.send(postData);\r\n\r\n\t\t\tif (!async) return {xmlDoc:t, filePath:url}; // dhtmlx-compat, response.xmlDoc.responseXML/responseText\r\n\t\t}.bind(this)));\r\n\t},\r\n\turlSeparator: function(str){\r\n\t\tif (str.indexOf(\"?\") != -1)\r\n\t\t\treturn \"&\";\r\n\t\telse\r\n\t\t\treturn \"?\";\r\n\t}\r\n};\r\n\r\nscheduler.$ajax = scheduler.ajax; // for old\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nvar generateStringToDate = function (format, utc) {\r\n\tvar splt = \"var temp=date.match(/[a-zA-Z]+|[0-9]+/g);\";\r\n\tvar mask = format.match(/%[a-zA-Z]/g);\r\n\tfor (var i = 0; i < mask.length; i++) {\r\n\t\tswitch (mask[i]) {\r\n\t\t\tcase \"%j\":\r\n\t\t\tcase \"%d\": splt += \"set[2]=temp[\" + i + \"]||1;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%n\":\r\n\t\t\tcase \"%m\": splt += \"set[1]=(temp[\" + i + \"]||1)-1;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%y\": splt += \"set[0]=temp[\" + i + \"]*1+(temp[\" + i + \"]>50?1900:2000);\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%g\":\r\n\t\t\tcase \"%G\":\r\n\t\t\tcase \"%h\":\r\n\t\t\tcase \"%H\":\r\n\t\t\t\tsplt += \"set[3]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%i\":\r\n\t\t\t\tsplt += \"set[4]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%Y\": splt += \"set[0]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%a\":\r\n\t\t\tcase \"%A\": splt += \"set[3]=set[3]%12+((temp[\" + i + \"]||'').toLowerCase()=='am'?0:12);\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%s\": splt += \"set[5]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%M\": splt += \"set[1]=this.locale.date.month_short_hash[temp[\" + i + \"]]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%F\": splt += \"set[1]=this.locale.date.month_full_hash[temp[\" + i + \"]]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\tvar code = \"set[0],set[1],set[2],set[3],set[4],set[5]\";\r\n\tif (utc) code = \" Date.UTC(\" + code + \")\";\r\n\treturn new Function(\"date\", \"var set=[0,0,1,0,0,0]; \" + splt + \" return new Date(\" + code + \");\");\r\n};\r\nvar csp_date_to_str = function (format, utc) {\r\n\treturn function(date) {\r\n\t\treturn format.replace(/%[a-zA-Z]/g, function (a) {\r\n\t\t\tswitch (a) {\r\n\t\t\t\tcase \"%d\": return utc ? scheduler.date.to_fixed(date.getUTCDate()) : scheduler.date.to_fixed(date.getDate());\r\n\t\t\t\tcase \"%m\": return utc ? scheduler.date.to_fixed((date.getUTCMonth() + 1)) : scheduler.date.to_fixed((date.getMonth() + 1));\r\n\t\t\t\tcase \"%j\": return utc ? date.getUTCDate() : date.getDate();\r\n\t\t\t\tcase \"%n\": return utc ? (date.getUTCMonth() + 1) : (date.getMonth() + 1);\r\n\t\t\t\tcase \"%y\": return utc ? scheduler.date.to_fixed(date.getUTCFullYear() % 100) : scheduler.date.to_fixed(date.getFullYear() % 100);\r\n\t\t\t\tcase \"%Y\": return utc ? date.getUTCFullYear() : date.getFullYear();\r\n\t\t\t\tcase \"%D\": return utc ? scheduler.locale.date.day_short[date.getUTCDay()] : scheduler.locale.date.day_short[date.getDay()];\r\n\t\t\t\tcase \"%l\": return utc ? scheduler.locale.date.day_full[date.getUTCDay()] : scheduler.locale.date.day_full[date.getDay()];\r\n\t\t\t\tcase \"%M\": return utc ? scheduler.locale.date.month_short[date.getUTCMonth()] : scheduler.locale.date.month_short[date.getMonth()];\r\n\t\t\t\tcase \"%F\": return utc ? scheduler.locale.date.month_full[date.getUTCMonth()] : scheduler.locale.date.month_full[date.getMonth()];\r\n\t\t\t\tcase \"%h\": return utc ? scheduler.date.to_fixed((date.getUTCHours() + 11) % 12 + 1) : scheduler.date.to_fixed((date.getHours() + 11) % 12 + 1);\r\n\t\t\t\tcase \"%g\": return utc ? ((date.getUTCHours() + 11) % 12 + 1) : ((date.getHours() + 11) % 12 + 1);\r\n\t\t\t\tcase \"%G\": return utc ? date.getUTCHours() : date.getHours();\r\n\t\t\t\tcase \"%H\": return utc ? scheduler.date.to_fixed(date.getUTCHours()) : scheduler.date.to_fixed(date.getHours());\r\n\t\t\t\tcase \"%i\": return utc ? scheduler.date.to_fixed(date.getUTCMinutes()) : scheduler.date.to_fixed(date.getMinutes());\r\n\t\t\t\tcase \"%a\": return utc ? (date.getUTCHours() > 11 ? \"pm\" : \"am\") : (date.getHours() > 11 ? \"pm\" : \"am\");\r\n\t\t\t\tcase \"%A\": return utc ? (date.getUTCHours() > 11 ? \"PM\" : \"AM\") : (date.getHours() > 11 ? \"PM\" : \"AM\");\r\n\t\t\t\tcase \"%s\": return utc ? scheduler.date.to_fixed(date.getUTCSeconds()) : scheduler.date.to_fixed(date.getSeconds());\r\n\t\t\t\tcase \"%W\": return utc ? scheduler.date.to_fixed(scheduler.date.getUTCISOWeek(date)) : scheduler.date.to_fixed(scheduler.date.getISOWeek(date));\r\n\t\t\t\tdefault: return a;\r\n\t\t\t}\r\n\t\t});\r\n\t};\r\n};\r\nvar csp_str_to_date = function (format, utc) {\r\n\tconst mask = format.match(/%[a-zA-Z]/g);\r\n\treturn function (date){\r\n\t\tvar set = [0, 0, 1, 0, 0, 0];\r\n\t\tvar temp = date.match(/[a-zA-Z]+|[0-9]+/g);\r\n\r\n\t\tfor (var i = 0; i < mask.length; i++) {\r\n\t\t\tswitch (mask[i]) {\r\n\t\t\t\tcase \"%j\":\r\n\t\t\t\tcase \"%d\":\r\n\t\t\t\t\tset[2] = temp[i] || 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%n\":\r\n\t\t\t\tcase \"%m\":\r\n\t\t\t\t\tset[1] = (temp[i] || 1) - 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%y\":\r\n\t\t\t\t\tset[0] = temp[i] * 1 + (temp[i] > 50 ? 1900 : 2000);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%g\":\r\n\t\t\t\tcase \"%G\":\r\n\t\t\t\tcase \"%h\":\r\n\t\t\t\tcase \"%H\":\r\n\t\t\t\t\tset[3] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%i\":\r\n\t\t\t\t\tset[4] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\tset[0] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%a\":\r\n\t\t\t\tcase \"%A\":\r\n\t\t\t\t\tset[3] = set[3] % 12 + ((temp[i] || '').toLowerCase() == 'am' ? 0 : 12);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%s\":\r\n\t\t\t\t\tset[5] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%M\":\r\n\t\t\t\t\tset[1] = scheduler.locale.date.month_short_hash[temp[i]] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%F\":\r\n\t\t\t\t\tset[1] = scheduler.locale.date.month_full_hash[temp[i]] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (utc) {\r\n\t\t\treturn new Date(Date.UTC(set[0], set[1], set[2], set[3], set[4], set[5]));\r\n\t\t}\r\n\r\n\t\treturn new Date(set[0], set[1], set[2], set[3], set[4], set[5]);\r\n\t};\r\n};\r\n\r\nlet cspEnabled = undefined;\r\nfunction checkIfCSPEnabled(){\r\n\ttry {\r\n\t\tnew Function(\"cspEnabled = false;\");\r\n\t\tcspEnabled = false;\r\n\t} catch(e) {\r\n\t\tcspEnabled = true;\r\n\t}\r\n\treturn cspEnabled;\r\n}\r\n\r\nfunction useCsp() {\r\n\tvar result = false;\r\n\tif (scheduler.config.csp === \"auto\") {\r\n\t\tif(cspEnabled === undefined){\r\n\t\t\tcspEnabled = checkIfCSPEnabled();\r\n\t\t}\r\n\t\tresult = cspEnabled;\r\n\t} else {\r\n\t\tresult = scheduler.config.csp;\r\n\t}\r\n\treturn result;\r\n}\r\nscheduler.date = {\r\n\tinit:function(){\r\n\t\tvar s = scheduler.locale.date.month_short;\r\n\t\tvar t = scheduler.locale.date.month_short_hash = {};\r\n\t\tfor (var i = 0; i < s.length; i++)\r\n\t\t\tt[s[i]]=i;\r\n\r\n\t\tvar s = scheduler.locale.date.month_full;\r\n\t\tvar t = scheduler.locale.date.month_full_hash = {};\r\n\t\tfor (var i = 0; i < s.length; i++)\r\n\t\t\tt[s[i]]=i;\r\n\t},\r\n\tdate_part:function(date){\r\n\t\tvar old = new Date(date);\r\n\t\tdate.setHours(0);\r\n\t\tdate.setMinutes(0);\r\n\t\tdate.setSeconds(0);\r\n\t\tdate.setMilliseconds(0);\r\n\t\tif (date.getHours() && //shift to yesterday on dst\r\n\t\t\t(date.getDate() < old.getDate() || date.getMonth() < old.getMonth() || date.getFullYear() < old.getFullYear()) )\r\n\t\t\tdate.setTime(date.getTime() + 60 * 60 * 1000 * (24 - date.getHours()));\r\n\t\treturn date;\r\n\t},\r\n\ttime_part:function(date){\r\n\t\treturn (date.valueOf()/1000 - date.getTimezoneOffset()*60)%86400;\r\n\t},\r\n\tweek_start:function(date){\r\n\t\tvar shift=date.getDay();\r\n\t\tif (scheduler.config.start_on_monday){\r\n\t\t\tif (shift===0) shift=6;\r\n\t\t\telse shift--;\r\n\t\t}\r\n\t\treturn this.date_part(this.add(date,-1*shift,\"day\"));\r\n\t},\r\n\tmonth_start:function(date){\r\n\t\tdate.setDate(1);\r\n\t\treturn this.date_part(date);\r\n\t},\r\n\tyear_start:function(date){\r\n\t\tdate.setMonth(0);\r\n\t\treturn this.month_start(date);\r\n\t},\r\n\tday_start:function(date){\r\n\t\treturn this.date_part(date);\r\n\t},\r\n\t_add_days:function(date, inc){\r\n\t\tvar ndate = new Date(date.valueOf());\r\n\r\n\t\tndate.setDate(ndate.getDate() + inc);\r\n\r\n\t\t// Workaround for Safari/iOS timezone bug, ref:OKZ-149693\r\n\t\tif(inc == Math.round(inc) && inc > 0){\r\n\t\t\tvar datesDiff = +ndate - +date,\r\n\t\t\t\trest = datesDiff % (24*60*60*1000);\r\n\t\t\tif(rest && date.getTimezoneOffset() == ndate.getTimezoneOffset()){\r\n\t\t\t\tvar hours = rest / (60* 60 * 1000);\r\n\t\t\t\tndate.setTime(ndate.getTime() + (24 - hours) * 60 * 60 * 1000);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (inc >= 0 && (!date.getHours() && ndate.getHours()) &&//shift to yesterday on dst\r\n\t\t\t(ndate.getDate() < date.getDate() || ndate.getMonth() < date.getMonth() || ndate.getFullYear() < date.getFullYear()) )\r\n\t\t\tndate.setTime(ndate.getTime() + 60 * 60 * 1000 * (24 - ndate.getHours()));\r\n\t\treturn ndate;\r\n\t},\r\n\tadd:function(date,inc,mode){\r\n\t\tvar ndate=new Date(date.valueOf());\r\n\t\tswitch(mode){\r\n\t\t\tcase \"day\":\r\n\t\t\t\tndate = scheduler.date._add_days(ndate, inc);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"week\":\r\n\t\t\t\tndate = scheduler.date._add_days(ndate, inc * 7);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"month\": ndate.setMonth(ndate.getMonth()+inc); break;\r\n\t\t\tcase \"year\": ndate.setYear(ndate.getFullYear()+inc); break;\r\n\t\t\tcase \"hour\":\r\n\t\t\t\t/*\r\n\t\t\t\t setHour(getHour() + inc) and setMinutes gives weird result when is applied on a Daylight Saving time switch\r\n\t\t\t\t setTime seems working as expected\r\n\t\t\t\t*/\r\n\t\t\t\tndate.setTime(ndate.getTime() + inc * 60 * 60 * 1000);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"minute\":\r\n\t\t\t\tndate.setTime(ndate.getTime() + inc * 60 * 1000);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\treturn scheduler.date[\"add_\"+mode](date,inc,mode);\r\n\t\t}\r\n\t\treturn ndate;\r\n\t},\r\n\tto_fixed:function(num){\r\n\t\tif (num<10)\treturn \"0\"+num;\r\n\t\treturn num;\r\n\t},\r\n\tcopy:function(date){\r\n\t\treturn new Date(date.valueOf());\r\n\t},\r\n\tdate_to_str:function(format,utc){\r\n\t\tif (useCsp()) {\r\n\t\t\treturn csp_date_to_str(format,utc);\r\n\t\t}\r\n\r\n\t\tformat=format.replace(/%[a-zA-Z]/g,function(a){\r\n\t\t\tswitch(a){\r\n\t\t\t\tcase \"%d\": return \"\\\"+this.date.to_fixed(date.getDate())+\\\"\";\r\n\t\t\t\tcase \"%m\": return \"\\\"+this.date.to_fixed((date.getMonth()+1))+\\\"\";\r\n\t\t\t\tcase \"%j\": return \"\\\"+date.getDate()+\\\"\";\r\n\t\t\t\tcase \"%n\": return \"\\\"+(date.getMonth()+1)+\\\"\";\r\n\t\t\t\tcase \"%y\": return \"\\\"+this.date.to_fixed(date.getFullYear()%100)+\\\"\";\r\n\t\t\t\tcase \"%Y\": return \"\\\"+date.getFullYear()+\\\"\";\r\n\t\t\t\tcase \"%D\": return \"\\\"+this.locale.date.day_short[date.getDay()]+\\\"\";\r\n\t\t\t\tcase \"%l\": return \"\\\"+this.locale.date.day_full[date.getDay()]+\\\"\";\r\n\t\t\t\tcase \"%M\": return \"\\\"+this.locale.date.month_short[date.getMonth()]+\\\"\";\r\n\t\t\t\tcase \"%F\": return \"\\\"+this.locale.date.month_full[date.getMonth()]+\\\"\";\r\n\t\t\t\tcase \"%h\": return \"\\\"+this.date.to_fixed((date.getHours()+11)%12+1)+\\\"\";\r\n\t\t\t\tcase \"%g\": return \"\\\"+((date.getHours()+11)%12+1)+\\\"\";\r\n\t\t\t\tcase \"%G\": return \"\\\"+date.getHours()+\\\"\";\r\n\t\t\t\tcase \"%H\": return \"\\\"+this.date.to_fixed(date.getHours())+\\\"\";\r\n\t\t\t\tcase \"%i\": return \"\\\"+this.date.to_fixed(date.getMinutes())+\\\"\";\r\n\t\t\t\tcase \"%a\": return \"\\\"+(date.getHours()>11?\\\"pm\\\":\\\"am\\\")+\\\"\";\r\n\t\t\t\tcase \"%A\": return \"\\\"+(date.getHours()>11?\\\"PM\\\":\\\"AM\\\")+\\\"\";\r\n\t\t\t\tcase \"%s\": return \"\\\"+this.date.to_fixed(date.getSeconds())+\\\"\";\r\n\t\t\t\tcase \"%W\": return \"\\\"+this.date.to_fixed(this.date.getISOWeek(date))+\\\"\";\r\n\t\t\t\tdefault: return a;\r\n\t\t\t}\r\n\t\t});\r\n\t\tif (utc) format=format.replace(/date\\.get/g,\"date.getUTC\");\r\n\t\tvar func = new Function(\"date\",\"return \\\"\"+format+\"\\\";\");\r\n\r\n\t\treturn func.bind(scheduler);\r\n\t},\r\n\tstr_to_date:function(format, utc, exactFormat){\r\n\t\tvar stringToDateMethod = useCsp() ? csp_str_to_date : generateStringToDate;\r\n\t\tvar parseExactFormat = stringToDateMethod(format, utc);\r\n\t\t// eslint-disable-next-line\r\n\t\tvar yyyyMMddhhIIss = /^[0-9]{4}(\\-|\\/)[0-9]{2}(\\-|\\/)[0-9]{2} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/;\r\n\r\n\t\t// MM/dd/yyyy - default old format for xml-date\r\n\t\t// eslint-disable-next-line\r\n\t\tvar MMddyyyyhhIIss = /^[0-9]{2}\\/[0-9]{2}\\/[0-9]{4} ?(([0-9]{1,2}:[0-9]{2})(:[0-9]{1,2})?)?$/;\r\n\t\t// dd-MM-yyyy - default old format for api-date\r\n\t\t// eslint-disable-next-line\r\n\t\tvar ddMMyyyyhhIIss = /^[0-9]{2}\\-[0-9]{2}\\-[0-9]{4} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/;\r\n\t\t// eslint-disable-next-line\r\n\t\tvar ISO8601 = /^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$/;\r\n\r\n\t\tvar isYMDDate = function (datestr) {\r\n\t\t\treturn yyyyMMddhhIIss.test(String(datestr));\r\n\t\t};\r\n\r\n\t\tvar isMDYDate = function (datestr) {\r\n\t\t\treturn MMddyyyyhhIIss.test(String(datestr));\r\n\t\t};\r\n\t\tvar isDMYDate = function (datestr) {\r\n\t\t\treturn ddMMyyyyhhIIss.test(String(datestr));\r\n\t\t};\r\n\t\tvar isISO8601 = function (datestr) {\r\n\t\t\treturn ISO8601.test(datestr);\r\n\t\t};\r\n\r\n\t\tvar parseYMD = stringToDateMethod(\"%Y-%m-%d %H:%i:%s\", utc);\r\n\t\tvar parseMDY = stringToDateMethod(\"%m/%d/%Y %H:%i:%s\", utc);\r\n\t\tvar parseDMY = stringToDateMethod(\"%d-%m-%Y %H:%i:%s\", utc);\r\n\r\n\t\treturn function (dateString) {\r\n\r\n\t\t\tif (!exactFormat && !scheduler.config.parse_exact_format) {\r\n\t\t\t\tif (dateString && dateString.getISOWeek) {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t} else if (typeof dateString === \"number\") {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t} else if (isYMDDate(dateString)) {\r\n\t\t\t\t\treturn parseYMD(dateString);\r\n\t\t\t\t} else if (isMDYDate(dateString)) {\r\n\t\t\t\t\treturn parseMDY(dateString);\r\n\t\t\t\t} else if (isDMYDate(dateString)) {\r\n\t\t\t\t\treturn parseDMY(dateString);\r\n\t\t\t\t} else if (isISO8601(dateString)) {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn parseExactFormat.call(scheduler, dateString);\r\n\t\t};\r\n\t},\r\n\tgetISOWeek: function(ndate) {\r\n\t\tif(!ndate) return false;\r\n\t\tndate = this.date_part(new Date(ndate));\r\n\t\tvar nday = ndate.getDay();\r\n\t\tif (nday === 0) {\r\n\t\t\tnday = 7;\r\n\t\t}\r\n\t\tvar first_thursday = new Date(ndate.valueOf());\r\n\t\tfirst_thursday.setDate(ndate.getDate() + (4 - nday));\r\n\t\tvar year_number = first_thursday.getFullYear(); // year of the first Thursday\r\n\t\tvar ordinal_date = Math.round( (first_thursday.getTime() - new Date(year_number, 0, 1).getTime()) / 86400000); //ordinal date of the first Thursday - 1 (so not really ordinal date)\r\n\t\tvar week_number = 1 + Math.floor( ordinal_date / 7);\r\n\t\treturn week_number;\r\n\t},\r\n\tgetUTCISOWeek: function(ndate){\r\n\t\treturn this.getISOWeek(this.convert_to_utc(ndate));\r\n\t},\r\n\tconvert_to_utc: function(date) {\r\n\t\treturn new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds());\r\n\t}\r\n};\r\n\r\n}\r\n\r\n","export default function extend(scheduler) {\r\n\r\n/*\r\n%e\tDay of the month without leading zeros (01..31)\r\n%d\tDay of the month, 2 digits with leading zeros (01..31)\r\n%j\tDay of the year, 3 digits with leading zeros (001..366)\r\n%a\tA textual representation of a day, two letters\r\n%W\tA full textual representation of the day of the week\r\n\r\n%c\tNumeric representation of a month, without leading zeros (0..12)\r\n%m\tNumeric representation of a month, with leading zeros (00..12)\r\n%b\tA short textual representation of a month, three letters (Jan..Dec)\r\n%M\tA full textual representation of a month, such as January or March (January..December)\r\n\r\n%y\tA two digit representation of a year (93..03)\r\n%Y\tA full numeric representation of a year, 4 digits (1993..03)\r\n*/\r\n\r\nscheduler.config={\r\n\tdefault_date: \"%j %M %Y\",\r\n\tmonth_date: \"%F %Y\",\r\n\tload_date: \"%Y-%m-%d\",\r\n\tweek_date: \"%l\",\r\n\tday_date: \"%D %j\",\r\n\thour_date: \"%H:%i\",\r\n\tmonth_day: \"%d\",\r\n\t//xml_date: \"%m/%d/%Y %H:%i\",\r\n\tdate_format: \"%Y-%m-%d %H:%i\",\r\n\tapi_date: \"%d-%m-%Y %H:%i\",\r\n\tparse_exact_format: false,\r\n\tpreserve_length:true,\r\n\ttime_step: 5,\r\n\tdisplayed_event_color: \"#ff4a4a\",\r\n\tdisplayed_event_text_color: \"#ffef80\",\r\n\twide_form: 0,\r\n\tday_column_padding: 8,\r\n\tuse_select_menu_space: true,\r\n\tfix_tab_position: true,\r\n\tstart_on_monday: true,\r\n\tfirst_hour: 0,\r\n\tlast_hour: 24,\r\n\treadonly: false,\r\n\tdrag_resize: true,\r\n\tdrag_move: true,\r\n\tdrag_create: true,\r\n\tdrag_event_body: true,\r\n\tdblclick_create: true,\r\n\tdetails_on_dblclick: true,\r\n\tedit_on_create: true,\r\n\tdetails_on_create: true,\r\n\theader: null,\r\n\thour_size_px: 44,\r\n\tresize_month_events:false,\r\n\tresize_month_timed:false,\r\n\t\r\n\tresponsive_lightbox: false,\r\n\tseparate_short_events: true,\r\n\trtl:false,\r\n\r\n\tcascade_event_display: false,\r\n\tcascade_event_count: 4,\r\n\tcascade_event_margin: 30,\r\n\r\n\tmulti_day:true,\r\n\tmulti_day_height_limit: 200,\r\n\r\n\tdrag_lightbox: true,\r\n\tpreserve_scroll: true,\r\n\tselect: true,\r\n\r\n\tserver_utc: false,\r\n\ttouch:true,\r\n\ttouch_tip:true,\r\n\ttouch_drag:500,\r\n\ttouch_swipe_dates: false,\r\n\tquick_info_detached:true,\r\n\r\n\tpositive_closing: false,\r\n\t//header_datepicker: true,\r\n\tdrag_highlight: true,\r\n\tlimit_drag_out: false,\r\n\ticons_edit: [\"icon_save\", \"icon_cancel\"],\r\n\ticons_select: [\"icon_details\", \"icon_edit\", \"icon_delete\"],\r\n\tbuttons_left: [\"dhx_save_btn\", \"dhx_cancel_btn\"],\r\n\tbuttons_right: [\"dhx_delete_btn\"],\r\n\tlightbox: {\r\n\t\tsections: [\r\n\t\t\t{name: \"description\", map_to: \"text\", type: \"textarea\", focus: true},\r\n\t\t\t{name: \"time\", height: 72, type: \"time\", map_to: \"auto\"}\r\n\t\t]\r\n\t},\r\n\thighlight_displayed_event: true,\r\n\tleft_border: false,\r\n\r\n\tajax_error: \"alert\",//\"ignore\"|\"console\"\r\n\tdelay_render: 0,\r\n\ttimeline_swap_resize: true,\r\n\twai_aria_attributes: true,\r\n\twai_aria_application_role: true,\r\n\r\n\tcsp: \"auto\",\r\n\tevent_attribute: \"data-event-id\",\r\n\tshow_errors: true\r\n};\r\n\r\nscheduler.config.buttons_left.$initial = scheduler.config.buttons_left.join();\r\nscheduler.config.buttons_right.$initial = scheduler.config.buttons_right.join();\r\n\r\nscheduler._helpers = {\r\n\tparseDate: function parseDate(date) {\r\n\t\tvar parse = scheduler.templates.xml_date || scheduler.templates.parse_date;\r\n\t\treturn parse(date);\r\n\t},\r\n\tformatDate: function formatDate(date) {\r\n\t\tvar format = scheduler.templates.xml_format || scheduler.templates.format_date;\r\n\t\treturn format(date);\r\n\t}\r\n};\r\n\r\nscheduler.templates={};\r\nscheduler.init_templates=function(){\r\n\r\n\r\n\r\n\tvar d=scheduler.date.date_to_str;\r\n\tvar c=scheduler.config;\r\n\tvar f = function(a,b){\r\n\t\tfor (var c in b)\r\n\t\t\tif (!a[c]) a[c]=b[c];\r\n\t};\r\n\tf(scheduler.templates,{\r\n\t\tday_date:d(c.default_date),\r\n\t\tmonth_date:d(c.month_date),\r\n\t\tweek_date:function(d1,d2){\r\n\t\t\tif(c.rtl) {\r\n\t\t\t\treturn scheduler.templates.day_date(scheduler.date.add(d2,-1,\"day\"))+\" – \"+scheduler.templates.day_date(d1);\r\n\t\t\t} \r\n\t\t\treturn scheduler.templates.day_date(d1)+\" – \"+scheduler.templates.day_date(scheduler.date.add(d2,-1,\"day\"));\r\n\t\t},\r\n\t\tday_scale_date:d(c.default_date),\r\n\t\ttime_slot_text: function(date){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\ttime_slot_class: function(date){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\r\n\t\tmonth_scale_date:d(c.week_date),\r\n\t\tweek_scale_date:d(c.day_date),\r\n\t\thour_scale:d(c.hour_date),\r\n\t\ttime_picker:d(c.hour_date),\r\n\t\tevent_date:d(c.hour_date),\r\n\t\tmonth_day:d(c.month_day),\r\n\r\n\t\tload_format: d(c.load_date),\r\n\t//\txml_date:scheduler.date.str_to_date(c.xml_date,c.server_utc),\r\n\t//\txml_format:d(c.date_format,c.server_utc),\r\n\t\tformat_date: d(c.date_format, c.server_utc),\r\n\t\tparse_date:scheduler.date.str_to_date(c.date_format,c.server_utc),\r\n\t\tapi_date:scheduler.date.str_to_date(c.api_date, false, false),\r\n\t\tevent_header:function(start,end,ev){\r\n\r\n\t\t\tif(ev._mode === \"small\" || ev._mode === \"smallest\"){\r\n\t\t\t\treturn scheduler.templates.event_date(start);\r\n\t\t\t}else{\r\n\t\t\t\treturn scheduler.templates.event_date(start)+\" - \"+scheduler.templates.event_date(end);\r\n\t\t\t}\r\n\t\t},\r\n\t\tevent_text:function(start,end,ev){\r\n\t\t\treturn ev.text;\r\n\t\t},\r\n\t\tevent_class:function(start,end,ev){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tmonth_date_class:function(d){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tweek_date_class:function(d){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tevent_bar_date:function(start,end,ev) {\r\n\t\t\treturn scheduler.templates.event_date(start);\r\n\t\t},\r\n\t\tevent_bar_text:function(start,end,ev){\r\n\t\t\treturn ev.text;\r\n\t\t},\r\n\t\tmonth_events_link : function(date, count){\r\n\t\t\treturn \"View more(\"+count+\" events)\";\r\n\t\t},\r\n\t\tdrag_marker_class : function(start, end, event){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tdrag_marker_content : function(start, end, event){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\t/* Could be redifined */\r\n\t\ttooltip_date_format: scheduler.date.date_to_str(\"%Y-%m-%d %H:%i\"),\r\n\t\ttooltip_text: function(start, end, event) {\r\n\t\t\treturn \"Event: \" + event.text + \"
Start date: \" + scheduler.templates.tooltip_date_format(start) + \"
End date: \" + scheduler.templates.tooltip_date_format(end);\r\n\t\t},\r\n\r\n\t\tcalendar_month: d(\"%F %Y\"),\r\n\t\tcalendar_scale_date: d(\"%D\"),\r\n\t\tcalendar_date: d(\"%d\"),\r\n\t\tcalendar_time: d(\"%d-%m-%Y\")\r\n\r\n\t});\r\n\tthis.callEvent(\"onTemplatesReady\",[]);\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler._events = {};\r\nscheduler.clearAll = function() {\r\n\tthis._events = {};\r\n\tthis._loaded = {};\r\n\r\n\tthis._edit_id = null;\r\n\tthis._select_id = null;\r\n\tthis._drag_id = null;\r\n\tthis._drag_mode = null;\r\n\tthis._drag_pos = null;\r\n\tthis._new_event = null;\r\n\r\n\tthis.clear_view();\r\n\tthis.callEvent(\"onClearAll\", []);\r\n};\r\nscheduler.addEvent = function(start_date, end_date, text, id, extra_data) {\r\n\tif (!arguments.length)\r\n\t\treturn this.addEventNow();\r\n\tvar ev = start_date;\r\n\tif (arguments.length != 1) {\r\n\t\tev = extra_data || {};\r\n\t\tev.start_date = start_date;\r\n\t\tev.end_date = end_date;\r\n\t\tev.text = text;\r\n\t\tev.id = id;\r\n\t}\r\n\tev.id = ev.id || scheduler.uid();\r\n\tev.text = ev.text || \"\";\r\n\r\n\tif (typeof ev.start_date == \"string\") ev.start_date = this.templates.api_date(ev.start_date);\r\n\tif (typeof ev.end_date == \"string\") ev.end_date = this.templates.api_date(ev.end_date);\r\n\tvar d = (this.config.event_duration || this.config.time_step) * 60000;\r\n\tif (ev.start_date.valueOf() == ev.end_date.valueOf())\r\n\t\tev.end_date.setTime(ev.end_date.valueOf() + d);\r\n\r\n\tev.start_date.setMilliseconds(0);\r\n\tev.end_date.setMilliseconds(0);\r\n\r\n\tev._timed = this.isOneDayEvent(ev);\r\n\r\n\tvar is_new = !this._events[ev.id];\r\n\tthis._events[ev.id] = ev;\r\n\tthis.event_updated(ev);\r\n\tif (!this._loading)\r\n\t\tthis.callEvent(is_new ? \"onEventAdded\" : \"onEventChanged\", [ev.id, ev]);\r\n\treturn ev.id;\r\n};\r\nscheduler.deleteEvent = function(id, silent) {\r\n\tvar ev = this._events[id];\r\n\tif (!silent && (!this.callEvent(\"onBeforeEventDelete\", [id, ev]) || !this.callEvent(\"onConfirmedBeforeEventDelete\", [id, ev])))\r\n\t\treturn;\r\n\tif (ev) {\r\n\t\tif(scheduler.getState().select_id == id){\r\n\t\t\tscheduler.unselect();\r\n\t\t}\r\n\t\tdelete this._events[id];\r\n\t\tthis.event_updated(ev);\r\n\r\n\t\tif(this._drag_id == ev.id){\r\n\t\t\tthis._drag_id = null;\r\n\t\t\tthis._drag_mode=null;\r\n\t\t\tthis._drag_pos=null;\r\n\t\t}\r\n\t}\r\n\r\n\tthis.callEvent(\"onEventDeleted\", [id, ev]);\r\n};\r\nscheduler.getEvent = function(id) {\r\n\treturn this._events[id];\r\n};\r\nscheduler.setEvent = function(id, hash) {\r\n\tif(!hash.id)\r\n\t\thash.id = id;\r\n\r\n\tthis._events[id] = hash;\r\n};\r\nscheduler.for_rendered = function(id, method) {\r\n\tfor (var i = this._rendered.length - 1; i >= 0; i--)\r\n\t\tif (this._rendered[i].getAttribute(this.config.event_attribute) == id)\r\n\t\t\tmethod(this._rendered[i], i);\r\n};\r\nscheduler.changeEventId = function(id, new_id) {\r\n\tif (id == new_id) return;\r\n\tvar ev = this._events[id];\r\n\tif (ev) {\r\n\t\tev.id = new_id;\r\n\t\tthis._events[new_id] = ev;\r\n\t\tdelete this._events[id];\r\n\t}\r\n\tthis.for_rendered(id, function(r) {\r\n\t\tr.setAttribute(\"event_id\", new_id); // for backward compatibility\r\n\t\tr.setAttribute(scheduler.config.event_attribute, new_id);\r\n\t});\r\n\tif (this._select_id == id) this._select_id = new_id;\r\n\tif (this._edit_id == id) this._edit_id = new_id;\r\n\t//if (this._drag_id==id) this._drag_id=new_id;\r\n\tthis.callEvent(\"onEventIdChange\", [id, new_id]);\r\n};\r\n\r\n(function() {\r\n\tvar attrs = [\"text\", \"Text\", \"start_date\", \"StartDate\", \"end_date\", \"EndDate\"];\r\n\tvar create_getter = function(name) {\r\n\t\treturn function(id) { return (scheduler.getEvent(id))[name]; };\r\n\t};\r\n\tvar create_setter = function(name) {\r\n\t\treturn function(id, value) {\r\n\t\t\tvar ev = scheduler.getEvent(id);\r\n\t\t\tev[name] = value;\r\n\t\t\tev._changed = true;\r\n\t\t\tev._timed = this.isOneDayEvent(ev);\r\n\t\t\tscheduler.event_updated(ev, true);\r\n\t\t};\r\n\t};\r\n\tfor (var i = 0; i < attrs.length; i += 2) {\r\n\t\tscheduler[\"getEvent\" + attrs[i + 1]] = create_getter(attrs[i]);\r\n\t\tscheduler[\"setEvent\" + attrs[i + 1]] = create_setter(attrs[i]);\r\n\t}\r\n})();\r\n\r\nscheduler.event_updated = function(ev, force) {\r\n\tif (this.is_visible_events(ev))\r\n\t\tthis.render_view_data();\r\n\telse\r\n\t\tthis.clear_event(ev.id);\r\n};\r\nscheduler.is_visible_events = function(ev) {\r\n\tif(!this._min_date || !this._max_date){\r\n\t\treturn false;\r\n\t}\r\n\r\n\t//if in displayed dates\r\n\tvar in_visible_range = (ev.start_date.valueOf() < this._max_date.valueOf() && this._min_date.valueOf() < ev.end_date.valueOf());\r\n\r\n\tif(in_visible_range){\r\n\r\n\t\t//end dates are not between last/first hours\r\n\t\tvar evFirstHour = ev.start_date.getHours(),\r\n\t\t\tevLastHour = ev.end_date.getHours() + (ev.end_date.getMinutes()/60),\r\n\t\t\tlastHour = this.config.last_hour,\r\n\t\t\tfirstHour = this.config.first_hour;\r\n\r\n\t\tvar end_dates_visible = (this._table_view || !((evLastHour > lastHour || evLastHour <= firstHour) && (evFirstHour >= lastHour || evFirstHour < firstHour)));\r\n\r\n\t\tif(end_dates_visible){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\r\n\t\t\t//event is bigger than area hidden between last/first hours\r\n\t\t\tvar event_duration = (ev.end_date.valueOf() - ev.start_date.valueOf()) / (1000*60*60),//hours\r\n\t\t\t\thidden_duration = 24 - (this.config.last_hour - this.config.first_hour);\r\n\r\n\t\t\treturn !!((event_duration > hidden_duration) || (evFirstHour < lastHour && evLastHour > firstHour));\r\n\r\n\t\t}\r\n\t}else{\r\n\t\treturn false;\r\n\t}\r\n};\r\nscheduler.isOneDayEvent = function(ev) {\r\n\t// decrease by one ms so events that ends on midnight on the next day were still considered one day events\r\n\t// e.g. (09-02-2018 19:00 - 10-02-2018 00:00)\r\n\t// events >= 24h long are considered multiday\r\n\tvar checkEndDate = new Date(ev.end_date.valueOf() - 1);\r\n\treturn (\r\n\t\tev.start_date.getFullYear() === checkEndDate.getFullYear() &&\r\n\t\tev.start_date.getMonth() === checkEndDate.getMonth() &&\r\n\t\tev.start_date.getDate() === checkEndDate.getDate()\r\n\t) && ((ev.end_date.valueOf() - ev.start_date.valueOf()) < (1000 * 60 * 60 * 24));\r\n};\r\n\r\nscheduler.get_visible_events = function(only_timed) {\r\n\t//not the best strategy for sure\r\n\tvar stack = [];\r\n\r\n\tfor (var id in this._events)\r\n\t\tif (this.is_visible_events(this._events[id]))\r\n\t\t\tif (!only_timed || this._events[id]._timed)\r\n\t\t\t\tif (this.filter_event(id, this._events[id]))\r\n\t\t\t\t\tstack.push(this._events[id]);\r\n\r\n\treturn stack;\r\n};\r\nscheduler.filter_event = function(id, ev) {\r\n\tvar filter = this[\"filter_\" + this._mode];\r\n\treturn (filter) ? filter(id, ev) : true;\r\n};\r\nscheduler._is_main_area_event = function(ev){\r\n\treturn !!ev._timed;\r\n};\r\nscheduler.render_view_data = function(evs, hold) {\r\n\tvar full = false;\r\n\tif (!evs) {\r\n\t\tfull = true;\r\n\t\tif (this._not_render) {\r\n\t\t\tthis._render_wait = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._render_wait = false;\r\n\r\n\t\tthis.clear_view();\r\n\t\tevs = this.get_visible_events(!(this._table_view || this.config.multi_day));\r\n\t}\r\n\tfor(var i= 0, len = evs.length; i < len; i++){\r\n\t\tthis._recalculate_timed(evs[i]);\r\n\t}\r\n\r\n\tif (this.config.multi_day && !this._table_view) {\r\n\r\n\t\tvar tvs = [];\r\n\t\tvar tvd = [];\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tif (this._is_main_area_event(evs[i]))\r\n\t\t\t\ttvs.push(evs[i]);\r\n\t\t\telse\r\n\t\t\t\ttvd.push(evs[i]);\r\n\t\t}\r\n\r\n\t\tif(!this._els['dhx_multi_day']){\r\n\t\t\tvar message = scheduler._commonErrorMessages.unknownView(this._mode);\r\n\t\t\tthrow new Error(message);\r\n\t\t}\r\n\r\n\t\t// multiday events\r\n\t\tthis._rendered_location = this._els['dhx_multi_day'][0];\r\n\t\tthis._table_view = true;\r\n\t\tthis.render_data(tvd, hold);\r\n\t\tthis._table_view = false;\r\n\r\n\t\t// normal events\r\n\t\tthis._rendered_location = this._els['dhx_cal_data'][0];\r\n\t\tthis._table_view = false;\r\n\t\tthis.render_data(tvs, hold);\r\n\r\n\t} else {\r\n\t\tvar buffer = document.createDocumentFragment();\r\n\t\tvar renderedLocation = this._els['dhx_cal_data'][0];\r\n\t\tthis._rendered_location = buffer;\r\n\t\tthis.render_data(evs, hold);\r\n\t\trenderedLocation.appendChild(buffer);\r\n\t\tthis._rendered_location = renderedLocation;\r\n\r\n\t}\r\n\r\n\tif(full){\r\n\t\tthis.callEvent(\"onDataRender\", []);\r\n\t}\r\n};\r\n\r\n\r\nscheduler._view_month_day = function(e){\r\n\tvar date = scheduler.getActionData(e).date;\r\n\tif(!scheduler.callEvent(\"onViewMoreClick\", [date]))\r\n\t\treturn;\r\n\tscheduler.setCurrentView(date, \"day\");\r\n};\r\n\r\nscheduler._render_month_link = function(ev){\r\n\tvar parent = this._rendered_location;\r\n\tvar toRender = this._lame_clone(ev);\r\n\r\n\t//render links in each cell of multiday events\r\n\tfor(var d = ev._sday; d < ev._eday; d++){\r\n\r\n\t\ttoRender._sday = d;\r\n\t\ttoRender._eday = d+1;\r\n\r\n\t\tvar date = scheduler.date;\r\n\t\tvar curr = scheduler._min_date;\r\n\t\tcurr = date.add(curr, toRender._sweek, \"week\");\r\n\t\tcurr = date.add(curr, toRender._sday, \"day\");\r\n\t\tvar count = scheduler.getEvents(curr, date.add(curr, 1, \"day\")).length;\r\n\r\n\t\tvar pos = this._get_event_bar_pos(toRender);\r\n\t\tvar widt = (pos.x2 - pos.x);\r\n\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tscheduler.event(el, \"click\", function(e){scheduler._view_month_day(e);});\r\n\t\tel.className = \"dhx_month_link\";\r\n\t\tel.style.top = pos.y + \"px\";\r\n\t\tel.style.left = pos.x + \"px\";\r\n\t\tel.style.width = widt + \"px\";\r\n\t\tel.innerHTML = scheduler.templates.month_events_link(curr, count);\r\n\t\tthis._rendered.push(el);\r\n\r\n\t\tparent.appendChild(el);\r\n\t}\r\n};\r\n\r\nscheduler._recalculate_timed = function(id){\r\n\tif(!id) return;\r\n\tvar ev;\r\n\tif(typeof(id) != \"object\")\r\n\t\tev = this._events[id];\r\n\telse\r\n\t\tev = id;\r\n\tif(!ev) return;\r\n\tev._timed = scheduler.isOneDayEvent(ev);\r\n};\r\nscheduler.attachEvent(\"onEventChanged\", scheduler._recalculate_timed);\r\nscheduler.attachEvent(\"onEventAdded\", scheduler._recalculate_timed);\r\n\r\nscheduler.render_data = function(evs, hold) {\r\n\tevs = this._pre_render_events(evs, hold);\r\n\tvar containers = {};\r\n\tfor (var i = 0; i < evs.length; i++)\r\n\t\tif (this._table_view){\r\n\t\t\tif(scheduler._mode != 'month'){\r\n\t\t\t\tthis.render_event_bar(evs[i]);//may be multiday section on other views\r\n\t\t\t}else{\r\n\r\n\t\t\t\tvar max_evs = scheduler.config.max_month_events;\r\n\t\t\t\tif(max_evs !== max_evs*1 || evs[i]._sorder < max_evs){\r\n\t\t\t\t\t//of max number events per month cell is set and event can be rendered\r\n\t\t\t\t\tthis.render_event_bar(evs[i]);\r\n\t\t\t\t}else if(max_evs !== undefined && evs[i]._sorder == max_evs){\r\n\t\t\t\t\t//render 'view more' links\r\n\t\t\t\t\tscheduler._render_month_link(evs[i]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\t//do not render events with ordinal number > maximum events per cell\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t}else{\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tvar parent = scheduler.locate_holder(ev._sday);\r\n\t\t\tif (!parent) continue; //attempt to render non-visible event\r\n\r\n\t\t\tif(!containers[ev._sday]){\r\n\t\t\t\tcontainers[ev._sday] = {\r\n\t\t\t\t\treal: parent,\r\n\t\t\t\t\tbuffer: document.createDocumentFragment(),\r\n\t\t\t\t\twidth: parent.clientWidth\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\tvar container = containers[ev._sday];\r\n\t\t\tthis.render_event(ev, container.buffer, container.width);\r\n\t\t}\r\n\r\n\t\tfor(var i in containers){\r\n\t\t\tvar container = containers[i];\r\n\t\t\tif(container.real && container.buffer){\r\n\t\t\t\tcontainer.real.appendChild(container.buffer);\r\n\t\t\t}\r\n\t\t}\r\n};\r\n\r\nscheduler._get_first_visible_cell = function(cells) {\r\n\tfor (var i = 0; i < cells.length; i++) {\r\n\t\tif ((cells[i].className || \"\").indexOf(\"dhx_scale_ignore\") == -1) {\r\n\t\t\treturn cells[i];\r\n\t\t}\r\n\t}\r\n\t// if no visible cell found, return cells[0] to be more tolerant, since it's the original logic\r\n\treturn cells[0];\r\n};\r\n\r\nscheduler._pre_render_events = function(evs, hold) {\r\n\tvar hb = this.xy.bar_height;\r\n\tvar h_old = this._colsS.heights;\r\n\tvar h = this._colsS.heights = [0, 0, 0, 0, 0, 0, 0];\r\n\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\r\n\tif (!this._table_view) {\r\n\t\tevs = this._pre_render_events_line(evs, hold); //ignore long events for now\r\n\t}\r\n\telse {\r\n\t\tevs = this._pre_render_events_table(evs, hold);\r\n\t}\r\n\tif (this._table_view) {\r\n\t\tif (hold)\r\n\t\t\tthis._colsS.heights = h_old;\r\n\t\telse {\r\n\t\t\tvar monthRows = data.querySelectorAll(\".dhx_cal_month_row\");\r\n\t\t\tif (monthRows.length) {\r\n\t\t\t\tfor (var i = 0; i < monthRows.length; i++) {\r\n\t\t\t\t\th[i]++;\r\n\t\t\t\t\tvar cells = monthRows[i].querySelectorAll(\".dhx_cal_month_cell\");\r\n\t\t\t\t\tvar cellHeight = this._colsS.height - this.xy.month_head_height;\r\n\t\t\t\t\tif ((h[i]) * hb > cellHeight) { // 22 - height of cell's header\r\n\t\t\t\t\t\t//we have overflow, update heights\r\n\r\n\t\t\t\t\t\tvar cHeight = cellHeight;\r\n\t\t\t\t\t\tif(this.config.max_month_events*1 !== this.config.max_month_events || h[i] <= this.config.max_month_events){\r\n\t\t\t\t\t\t\tcHeight = h[i] * hb;\r\n\t\t\t\t\t\t}else if( (this.config.max_month_events + 1) * hb > cellHeight){\r\n\t\t\t\t\t\t\tcHeight = (this.config.max_month_events + 1) * hb;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tmonthRows[i].style.height = (cHeight + this.xy.month_head_height) + \"px\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\th[i] = (h[i - 1] || 0) + scheduler._get_first_visible_cell(cells).offsetHeight;\r\n\t\t\t\t}\r\n\t\t\t\th.unshift(0);\r\n\t\t\t\tconst dataArea = this.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tif (dataArea.offsetHeight < dataArea.scrollHeight && !scheduler._colsS.scroll_fix && scheduler.xy.scroll_width) {\r\n\r\n\t\t\t\t\tvar scale_settings = scheduler._colsS,\r\n\t\t\t\t\t\tsum_width = scale_settings[scale_settings.col_length],\r\n\t\t\t\t\t\trow_heights = scale_settings.heights.slice();\r\n\r\n\t\t\t\t\tsum_width -= (scheduler.xy.scroll_width || 0);\r\n\t\t\t\t\tthis._calc_scale_sizes(sum_width, this._min_date, this._max_date);\r\n\t\t\t\t\tscheduler._colsS.heights = row_heights;\r\n\r\n\t\t\t\t\tthis.set_xy(this._els[\"dhx_cal_header\"][0], sum_width/*, this.xy.scale_height*/);\r\n\t\t\t\t\tscheduler._render_scales(this._els[\"dhx_cal_header\"][0]);\r\n\t\t\t\t\tscheduler._render_month_scale(this._els[\"dhx_cal_data\"][0], this._get_timeunit_start(), this._min_date);\r\n\r\n\t\t\t\t\tscale_settings.scroll_fix = true;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (!evs.length && this._els[\"dhx_multi_day\"][0].style.visibility == \"visible\")\r\n\t\t\t\t\th[0] = -1;\r\n\t\t\t\tif (evs.length || h[0] == -1) {\r\n\t\t\t\t\t//shift days to have space for multiday events\r\n\t\t\t\t\t//var childs = evl.parentNode.childNodes;\r\n\r\n\t\t\t\t\t// +1 so multiday events would have 2px from top and 2px from bottom by default\r\n\t\t\t\t\tvar full_multi_day_height = (h[0] + 1) * hb + 4;\r\n\r\n\t\t\t\t\tvar used_multi_day_height = full_multi_day_height;\r\n\t\t\t\t\tvar used_multi_day_height_css = full_multi_day_height + \"px\";\r\n\t\t\t\t\tif (this.config.multi_day_height_limit) {\r\n\t\t\t\t\t\tused_multi_day_height = Math.min(full_multi_day_height, this.config.multi_day_height_limit) ;\r\n\t\t\t\t\t\tused_multi_day_height_css = used_multi_day_height + \"px\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tvar multi_day_section = this._els[\"dhx_multi_day\"][0];\r\n\t\t\t\t\tmulti_day_section.style.height = used_multi_day_height_css;\r\n\t\t\t\t\tmulti_day_section.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\tmulti_day_section.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\r\n\t\t\t\t\t// icon\r\n\t\t\t\t\tvar multi_day_icon = this._els[\"dhx_multi_day\"][1];\r\n\t\t\t\t\tmulti_day_icon.style.height = used_multi_day_height_css;\r\n\t\t\t\t\tmulti_day_icon.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\tmulti_day_icon.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\t\t\t\t\tmulti_day_icon.className = h[0] ? \"dhx_multi_day_icon\" : \"dhx_multi_day_icon_small\";\r\n\t\t\t\t\tthis._dy_shift = (h[0] + 1) * hb;\r\n\t\t\t\t\tif(this.config.multi_day_height_limit){\r\n\t\t\t\t\t\tthis._dy_shift = Math.min(this.config.multi_day_height_limit, this._dy_shift);\r\n\t\t\t\t\t}\r\n\t\t\t\t\th[0] = 0;\r\n\r\n\t\t\t\t\tif (used_multi_day_height != full_multi_day_height) {\r\n\r\n\t\t\t\t\t\tmulti_day_section.style.overflowY = \"auto\";\r\n\t\t\t\t\t//\tmulti_day_section.style.width = (parseInt(this._els[\"dhx_cal_navline\"][0].style.width)) + \"px\";\r\n\r\n\t\t\t\t\t\tmulti_day_icon.style.position = \"fixed\";\r\n\t\t\t\t\t\tmulti_day_icon.style.top = \"\";\r\n\t\t\t\t\t\tmulti_day_icon.style.left = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn evs;\r\n};\r\nscheduler._get_event_sday = function(ev) {\r\n\t// get day in current view\r\n\t// use rounding for 23 or 25 hour days on DST\r\n\tvar datePart = this.date.day_start(new Date(ev.start_date));\r\n\treturn Math.round((datePart.valueOf() - this._min_date.valueOf()) / (24 * 60 * 60 * 1000));\r\n};\r\nscheduler._get_event_mapped_end_date = function(ev) {\r\n\tvar end_date = ev.end_date;\r\n\tif (this.config.separate_short_events) {\r\n\t\tvar ev_duration = (ev.end_date - ev.start_date) / 60000; // minutes\r\n\t\tif (ev_duration < this._min_mapped_duration) {\r\n\t\t\tend_date = this.date.add(end_date, this._min_mapped_duration - ev_duration, \"minute\");\r\n\t\t}\r\n\t}\r\n\treturn end_date;\r\n};\r\nscheduler._pre_render_events_line = function(evs, hold){\r\n\tevs.sort(function(a, b) {\r\n\t\tif (a.start_date.valueOf() == b.start_date.valueOf())\r\n\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\treturn a.start_date > b.start_date ? 1 : -1;\r\n\t});\r\n\tvar days = []; //events by weeks\r\n\tvar evs_originals = [];\r\n\r\n\tthis._min_mapped_duration = Math.floor(this.xy.min_event_height * 60 / this.config.hour_size_px); // values could change along the way\r\n\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tvar ev = evs[i];\r\n\r\n\t\t//check date overflow\r\n\t\tvar sd = ev.start_date;\r\n\t\tvar ed = ev.end_date;\r\n\t\t//check scale overflow\r\n\t\tvar sh = sd.getHours();\r\n\t\tvar eh = ed.getHours();\r\n\t\tev._sday = this._get_event_sday(ev); // sday based on event start_date\r\n\t\tif (this._ignores[ev._sday]){\r\n\t\t\t//ignore event\r\n\t\t\tevs.splice(i,1);\r\n\t\t\ti--;\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\tif (!days[ev._sday]) days[ev._sday] = [];\r\n\r\n\t\tif (!hold) {\r\n\t\t\tev._inner = false;\r\n\r\n\t\t\tvar stack = days[ev._sday];\r\n\r\n\t\t\twhile (stack.length) {\r\n\t\t\t\tvar t_ev = stack[stack.length - 1];\r\n\t\t\t\tvar t_end_date = this._get_event_mapped_end_date(t_ev);\r\n\t\t\t\tif (t_end_date.valueOf() <= ev.start_date.valueOf()) {\r\n\t\t\t\t\tstack.splice(stack.length - 1, 1);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar slot_index = stack.length;\r\n\t\t\tvar sorderSet = false;\r\n\t\t\tfor (var j = 0; j < stack.length; j++) {\r\n\t\t\t\tvar t_ev = stack[j];\r\n\t\t\t\tvar t_end_date = this._get_event_mapped_end_date(t_ev);\r\n\t\t\t\tif (t_end_date.valueOf() <= ev.start_date.valueOf()) {\r\n\t\t\t\t\tsorderSet = true;\r\n\t\t\t\t\tev._sorder = t_ev._sorder;\r\n\t\t\t\t\tslot_index = j;\r\n\t\t\t\t\tev._inner = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (stack.length)\r\n\t\t\t\tstack[stack.length - 1]._inner = true;\r\n\r\n\t\t\tif (!sorderSet) {\r\n\t\t\t\tif (stack.length) {\r\n\t\t\t\t\tif (stack.length <= stack[stack.length - 1]._sorder) {\r\n\t\t\t\t\t\tif (!stack[stack.length - 1]._sorder)\r\n\t\t\t\t\t\t\tev._sorder = 0;\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tfor (j = 0; j < stack.length; j++) {\r\n\t\t\t\t\t\t\t\tvar _is_sorder = false;\r\n\t\t\t\t\t\t\t\tfor (var k = 0; k < stack.length; k++) {\r\n\t\t\t\t\t\t\t\t\tif (stack[k]._sorder == j) {\r\n\t\t\t\t\t\t\t\t\t\t_is_sorder = true;\r\n\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (!_is_sorder) {\r\n\t\t\t\t\t\t\t\t\tev._sorder = j;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\tev._inner = true;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tvar _max_sorder = stack[0]._sorder;\r\n\t\t\t\t\t\tfor (j = 1; j < stack.length; j++) {\r\n\t\t\t\t\t\t\tif (stack[j]._sorder > _max_sorder)\r\n\t\t\t\t\t\t\t\t_max_sorder = stack[j]._sorder;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tev._sorder = _max_sorder + 1;\r\n\t\t\t\t\t\tev._inner = false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} else\r\n\t\t\t\t\tev._sorder = 0;\r\n\t\t\t}\r\n\r\n\t\t\tstack.splice(slot_index, slot_index == stack.length ? 0 : 1, ev);\r\n\r\n\t\t\tif (stack.length > (stack.max_count || 0)) {\r\n\t\t\t\tstack.max_count = stack.length;\r\n\t\t\t\tev._count = stack.length;\r\n\t\t\t} else {\r\n\t\t\t\tev._count = (ev._count) ? ev._count : 1;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (sh < this.config.first_hour || eh >= this.config.last_hour) {\r\n\t\t\t// Need to create copy of event as we will be changing it's start/end date\r\n\t\t\t// e.g. first_hour = 11 and event.start_date hours = 9. Need to preserve that info\r\n\t\t\tevs_originals.push(ev);\r\n\t\t\tevs[i] = ev = this._copy_event(ev);\r\n\r\n\t\t\tif (sh < this.config.first_hour) {\r\n\t\t\t\tev.start_date.setHours(this.config.first_hour);\r\n\t\t\t\tev.start_date.setMinutes(0);\r\n\t\t\t}\r\n\t\t\tif (eh >= this.config.last_hour) {\r\n\t\t\t\tev.end_date.setMinutes(0);\r\n\t\t\t\tev.end_date.setHours(this.config.last_hour);\r\n\t\t\t}\r\n\r\n\t\t\tif (ev.start_date > ev.end_date || sh == this.config.last_hour) {\r\n\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (!hold) {\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tevs[i]._count = days[evs[i]._sday].max_count;\r\n\t\t}\r\n\t\tfor (var i = 0; i < evs_originals.length; i++)\r\n\t\t\tevs_originals[i]._count = days[evs_originals[i]._sday].max_count;\r\n\t}\r\n\r\n\treturn evs;\r\n};\r\nscheduler._time_order = function(evs) {\r\n\tevs.sort(function(a, b) {\r\n\t\tif (a.start_date.valueOf() == b.start_date.valueOf()) {\r\n\t\t\tif (a._timed && !b._timed) return 1;\r\n\t\t\tif (!a._timed && b._timed) return -1;\r\n\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\t}\r\n\t\treturn a.start_date > b.start_date ? 1 : -1;\r\n\t});\r\n};\r\n\r\nscheduler._is_any_multiday_cell_visible = function(from, to, event){\r\n\tvar cols = this._cols.length;\r\n\tvar isAnyCellVisible = false;\r\n\tvar checkDate = from;\r\n\tvar noCells = true;\r\n\tvar lastDayEnd = new Date(to);\r\n\tif(scheduler.date.day_start(new Date(to)).valueOf() != to.valueOf()){\r\n\t\tlastDayEnd = scheduler.date.day_start(lastDayEnd);\r\n\t\tlastDayEnd = scheduler.date.add(lastDayEnd, 1, \"day\");\r\n\t}\r\n\twhile(checkDate < lastDayEnd){\r\n\t\tnoCells = false;\r\n\t\tvar cellIndex = this.locate_holder_day(checkDate, false, event);\r\n\t\tvar weekCellIndex = cellIndex % cols;\r\n\t\tif(!this._ignores[weekCellIndex]){\r\n\t\t\tisAnyCellVisible = true;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tcheckDate = scheduler.date.add(checkDate, 1, \"day\");\r\n\t}\r\n\treturn noCells || isAnyCellVisible;\r\n};\r\n\r\nscheduler._pre_render_events_table = function(evs, hold) { // max - max height of week slot\r\n\tthis._time_order(evs);\r\n\tvar out = [];\r\n\tvar weeks = [\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[]\r\n\t]; //events by weeks\r\n\tvar max = this._colsS.heights;\r\n\tvar start_date;\r\n\tvar cols = this._cols.length;\r\n\tvar chunks_info = {};\r\n\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tvar ev = evs[i];\r\n\t\tvar id = ev.id;\r\n\t\tif (!chunks_info[id]) {\r\n\t\t\tchunks_info[id] = {\r\n\t\t\t\tfirst_chunk: true,\r\n\t\t\t\tlast_chunk: true\r\n\t\t\t};\r\n\t\t}\r\n\t\tvar chunk_info = chunks_info[id];\r\n\t\tvar sd = (start_date || ev.start_date);\r\n\t\tvar ed = ev.end_date;\r\n\t\t//trim events which are crossing through current view\r\n\t\tif (sd < this._min_date) {\r\n\t\t\tchunk_info.first_chunk = false;\r\n\t\t\tsd = this._min_date;\r\n\t\t}\r\n\t\tif (ed > this._max_date) {\r\n\t\t\tchunk_info.last_chunk = false;\r\n\t\t\ted = this._max_date;\r\n\t\t}\r\n\r\n\t\tvar locate_s = this.locate_holder_day(sd, false, ev);\r\n\t\tev._sday = locate_s % cols;\r\n\t\t//skip single day events for ignored dates\r\n\t\tif (this._ignores[ev._sday] && ev._timed) continue;\r\n\r\n\t\tvar locate_e = this.locate_holder_day(ed, true, ev) || cols;\r\n\t\tev._eday = (locate_e % cols) || cols; //cols used to fill full week, when event end on monday\r\n\t\tev._length = locate_e - locate_s;\r\n\t\t//3600000 - compensate 1 hour during winter|summer time shift\r\n\t\tev._sweek = Math.floor((this._correct_shift(sd.valueOf(), 1) - this._min_date.valueOf()) / (60 * 60 * 1000 * 24 * cols));\r\n\r\n\t\tvar isAnyCellVisible = scheduler._is_any_multiday_cell_visible(sd, ed, ev);\r\n\r\n\t\tif(!isAnyCellVisible){\r\n\t\t\tstart_date = null;\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\t//current slot\r\n\t\tvar stack = weeks[ev._sweek];\r\n\t\t//check order position\r\n\t\tvar stack_line;\r\n\r\n\t\tfor (stack_line = 0; stack_line < stack.length; stack_line++)\r\n\t\t\tif (stack[stack_line]._eday <= ev._sday)\r\n\t\t\t\tbreak;\r\n\r\n\t\tif (!ev._sorder || !hold) {\r\n\t\t\tev._sorder = stack_line;\r\n\t\t}\r\n\r\n\t\tif (ev._sday + ev._length <= cols) {\r\n\t\t\tstart_date = null;\r\n\t\t\tout.push(ev);\r\n\t\t\tstack[stack_line] = ev;\r\n\t\t\t//get max height of slot\r\n\t\t\tmax[ev._sweek] = stack.length - 1;\r\n\t\t\tev._first_chunk = chunk_info.first_chunk;\r\n\t\t\tev._last_chunk = chunk_info.last_chunk;\r\n\t\t} else { // split long event in chunks\r\n\t\t\tvar copy = this._copy_event(ev);\r\n\t\t\tcopy.id = ev.id;\r\n\t\t\tcopy._length = cols - ev._sday;\r\n\t\t\tcopy._eday = cols;\r\n\t\t\tcopy._sday = ev._sday;\r\n\t\t\tcopy._sweek = ev._sweek;\r\n\t\t\tcopy._sorder = ev._sorder;\r\n\t\t\tcopy.end_date = this.date.add(sd, copy._length, \"day\");\r\n\t\t\tcopy._first_chunk = chunk_info.first_chunk;\r\n\t\t\tif (chunk_info.first_chunk) {\r\n\t\t\t\tchunk_info.first_chunk = false;\r\n\t\t\t}\r\n\r\n\t\t\tout.push(copy);\r\n\t\t\tstack[stack_line] = copy;\r\n\t\t\tstart_date = copy.end_date;\r\n\t\t\t//get max height of slot\r\n\t\t\tmax[ev._sweek] = stack.length - 1;\r\n\t\t\ti--;\r\n\t\t\tcontinue; //repeat same step\r\n\t\t}\r\n\t}\r\n\treturn out;\r\n};\r\nscheduler._copy_dummy = function() {\r\n\tvar a = new Date(this.start_date);\r\n\tvar b = new Date(this.end_date);\r\n\tthis.start_date = a;\r\n\tthis.end_date = b;\r\n};\r\nscheduler._copy_event = function(ev) {\r\n\tthis._copy_dummy.prototype = ev;\r\n\treturn new this._copy_dummy();\r\n\t//return {start_date:ev.start_date, end_date:ev.end_date, text:ev.text, id:ev.id}\r\n};\r\nscheduler._rendered = [];\r\nscheduler.clear_view = function() {\r\n\tfor (var i = 0; i < this._rendered.length; i++) {\r\n\t\tvar obj = this._rendered[i];\r\n\t\tif (obj.parentNode) obj.parentNode.removeChild(obj);\r\n\t}\r\n\tthis._rendered = [];\r\n};\r\nscheduler.updateEvent = function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tthis.clear_event(id);\r\n\r\n\tif (ev && this.is_visible_events(ev) && this.filter_event(id, ev) && (this._table_view || this.config.multi_day || ev._timed)) {\r\n\t\tif (this.config.update_render){\r\n\t\t\tthis.render_view_data();\r\n\t\t}else{\r\n\t\t\tif(this.getState().mode == \"month\" && !this.getState().drag_id && !this.isOneDayEvent(ev)){\r\n\t\t\t\tthis.render_view_data();\r\n\t\t\t}else{\r\n\t\t\t\tthis.render_view_data([ev], true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.clear_event = function(id) {\r\n\tthis.for_rendered(id, function(node, i) {\r\n\t\tif (node.parentNode)\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\tscheduler._rendered.splice(i, 1);\r\n\t});\r\n};\r\nscheduler._y_from_date = function(date){\r\n\tvar sm = date.getHours() * 60 + date.getMinutes();\r\n\treturn ((Math.round((sm * 60 * 1000 - this.config.first_hour * 60 * 60 * 1000) * this.config.hour_size_px / (60 * 60 * 1000))) % (this.config.hour_size_px * 24)); //42px/hour\r\n};\r\nscheduler._calc_event_y = function(ev, min_height){\r\n\tmin_height = min_height || 0;\r\n\tvar sm = ev.start_date.getHours() * 60 + ev.start_date.getMinutes();\r\n\tvar em = (ev.end_date.getHours() * 60 + ev.end_date.getMinutes()) || (scheduler.config.last_hour * 60);\r\n\tvar top = this._y_from_date(ev.start_date);\r\n\r\n\tvar height = Math.max(min_height, (em - sm) * this.config.hour_size_px / 60); //42px/hour\r\n\treturn {\r\n\t\ttop: top,\r\n\t\theight: height\r\n\t};\r\n};\r\nscheduler.render_event = function(ev, buffer, parentWidth) {\r\n\tvar menu = scheduler.xy.menu_width;\r\n\tvar menu_offset = (this.config.use_select_menu_space) ? 0 : menu;\r\n\tif (ev._sday < 0) return; //can occur in case of recurring event during time shift\r\n\r\n\tvar parent = scheduler.locate_holder(ev._sday);\r\n\tif (!parent) return; //attempt to render non-visible event\r\n\r\n\tbuffer = buffer || parent;\r\n\r\n\tvar pos_y = this._calc_event_y(ev, scheduler.xy.min_event_height);\r\n\tvar top = pos_y.top,\r\n\t\theight = pos_y.height;\r\n\r\n\tvar ev_count = ev._count || 1;\r\n\tvar ev_sorder = ev._sorder || 0;\r\n\r\n\tparentWidth = parentWidth || parent.clientWidth;\r\n\tif(this.config.day_column_padding){\r\n\t\tparentWidth -= this.config.day_column_padding;\r\n\t}\r\n\r\n\tvar width = Math.floor((parentWidth - menu_offset) / ev_count);\r\n\tvar left = ev_sorder * width + (ev_sorder > 0 ? 2 : 1);\r\n\tif (!ev._inner) width = width * (ev_count - ev_sorder);\r\n\tif (this.config.cascade_event_display) {\r\n\t\tvar limit = this.config.cascade_event_count;\r\n\t\tvar margin = this.config.cascade_event_margin;\r\n\t\tleft = ev_sorder % limit * margin;\r\n\t\tvar right = (ev._inner) ? (ev_count - ev_sorder - 1) % limit * margin / 2 : 0;\r\n\t\twidth = Math.floor(parentWidth - menu_offset - left - right);\r\n\t}\r\n\r\n\tif(height < 30){\r\n\t\tev._mode = \"smallest\";\r\n\t}else if(height < 42){\r\n\t\tev._mode = \"small\";\r\n\t}else{\r\n\t\tev._mode = null;\r\n\t}\r\n\r\n\tvar d = this._render_v_bar(ev, menu_offset + left, top, width, height, ev._text_style, scheduler.templates.event_header(ev.start_date, ev.end_date, ev), scheduler.templates.event_text(ev.start_date, ev.end_date, ev));\r\n\t\r\n\tif(ev._mode === \"smallest\"){\r\n\t\td.classList.add(\"dhx_cal_event--xsmall\");\r\n\t}else if (ev._mode === \"small\"){\r\n\t\td.classList.add(\"dhx_cal_event--small\");\r\n\t}\r\n\r\n\tthis._waiAria.eventAttr(ev, d);\r\n\tthis._rendered.push(d);\r\n\tbuffer.appendChild(d);\r\n\r\n\tvar parentPosition = parseInt( this.config.rtl ? parent.style.right : parent.style.left, 10);\r\n\r\n\tleft = left + parentPosition + menu_offset;\r\n\r\n\tif (this._edit_id == ev.id) {\r\n\r\n\t\td.style.zIndex = 1; //fix overlapping issue\r\n\t\twidth = Math.max(width, scheduler.xy.editor_width);\r\n\t\td = document.createElement(\"div\");\r\n\t\td.setAttribute(\"event_id\", ev.id); // for backward compatibility\r\n\t\td.setAttribute(this.config.event_attribute, ev.id);\r\n\r\n\t\tthis._waiAria.eventAttr(ev, d);\r\n\r\n\t\td.className = \"dhx_cal_event dhx_cal_editor\";\r\n\t\tif (this.config.rtl) left++;\r\n\t\tthis.set_xy(d, width, height, left, top);\r\n\r\n\r\n\t\tif(ev.color){\r\n\t\t\td.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tvar tplClass = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\r\n\t\tif(tplClass){\r\n\t\t\td.className += \" \" + tplClass;\r\n\t\t}\r\n\t\tvar d2 = document.createElement(\"div\");\r\n\t\td2.style.cssText += \"overflow:hidden;height:100%\";\r\n\r\n\t\td.appendChild(d2);\r\n\t\tthis._els[\"dhx_cal_data\"][0].appendChild(d);\r\n\t\tthis._rendered.push(d);\r\n\r\n\t\td2.innerHTML = \"\";\r\n\t\tthis._editor = d2.querySelector(\"textarea\");\r\n\t\t\r\n\t\tscheduler.event(this._editor, \"keydown\", function(e) {\r\n\t\t\tif (e.shiftKey) return true;\r\n\t\t\tvar code = e.keyCode;\r\n\t\t\tif (code == scheduler.keys.edit_save) scheduler.editStop(true);\r\n\t\t\tif (code == scheduler.keys.edit_cancel) scheduler.editStop(false);\r\n\r\n\t\t\tif(code == scheduler.keys.edit_save || code == scheduler.keys.edit_cancel){\r\n\t\t\t\tif(e.preventDefault) e.preventDefault();\r\n\t\t\t}\r\n\t\t});\r\n\t\tscheduler.event(this._editor, \"selectstart\", function (e) {\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn true;\r\n\t\t});\r\n\t\tscheduler._focus(this._editor, true);\r\n\t\t//IE and opera can add x-scroll during focusing\r\n\t\tthis._els[\"dhx_cal_data\"][0].scrollLeft = 0;\r\n\t}\r\n\tif (this.xy.menu_width !== 0 && this._select_id == ev.id) {\r\n\r\n\t\tif (this.config.cascade_event_display && this._drag_mode)\r\n\t\t\td.style.zIndex = 1; //fix overlapping issue for cascade view in case of dnd of selected event\r\n\t\tvar icons = this.config[\"icons_\" + ((this._edit_id == ev.id) ? \"edit\" : \"select\")];\r\n\t\tvar icons_str = \"\";\r\n\r\n\t\tvar ariaAttr;\r\n\r\n\t\tfor (var i = 0; i < icons.length; i++) {\r\n\t\t\tconst currentIcon = icons[i];\r\n\t\t\tariaAttr = this._waiAria.eventMenuAttrString(currentIcon);\r\n\t\t\ticons_str += `
`;\r\n\t\t}\r\n\t\tvar obj = this._render_v_bar(ev, left - menu - 1, top, menu, null, \"\", \"
\", icons_str, true);\r\n\r\n\t\tif(ev.color){\r\n\t\t\tobj.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tobj.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\t//obj.style.left = left - menu + 1;\r\n\t\tthis._els[\"dhx_cal_data\"][0].appendChild(obj);\r\n\t\tthis._rendered.push(obj);\r\n\t}\r\n\tif(this.config.drag_highlight && this._drag_id == ev.id){\r\n\t\tthis.highlightEventPosition(ev);\r\n\t}\r\n};\r\nscheduler._render_v_bar = function (ev, x, y, w, h, style, contentA, contentB, bottom) {\r\n\tvar d = document.createElement(\"div\");\r\n\tvar id = ev.id;\r\n\tvar cs = (bottom) ? \"dhx_cal_event dhx_cal_select_menu\" : \"dhx_cal_event\";\r\n\r\n\tvar state = scheduler.getState();\r\n\tif(state.drag_id == ev.id){\r\n\t\tcs += \" dhx_cal_event_drag\";\r\n\t}\r\n\r\n\tif(state.select_id == ev.id){\r\n\t\tcs += \" dhx_cal_event_selected\";\r\n\t}\r\n\r\n\tvar cse = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\tif (cse) cs = cs + \" \" + cse;\r\n\r\n\tif(this.config.cascade_event_display) {\r\n\t\tcs += \" dhx_cal_event_cascade\";\r\n\t}\r\n\r\n\tvar boxWidth = w;\r\n\r\n\tvar html = '
';\r\n\td.innerHTML = html;\r\n\r\n\tvar container = d.cloneNode(true).firstChild;\r\n\r\n\tif (!bottom && scheduler.renderEvent(container, ev, w, h, contentA, contentB)) {\r\n\t\tif(ev.color){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\treturn container;\r\n\t} else {\r\n\t\tcontainer = d.firstChild;\r\n\t\tif(ev.color){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\tvar inner_html = '
 
';\r\n\t\tinner_html += '
' + contentA + '
';\r\n\t\tinner_html += '
' + contentB + '
'; // +2 css specific, moved from render_event\r\n\r\n\t\tvar footer_class = \"dhx_event_resize dhx_footer\";\r\n\t\tif (bottom || ev._drag_resize === false)\r\n\t\t\tfooter_class = \"dhx_resize_denied \" + footer_class;\r\n\r\n\t\tinner_html += '
';\r\n\r\n\t\tcontainer.innerHTML = inner_html;\r\n\t}\r\n\r\n\treturn container;\r\n};\r\nscheduler.renderEvent = function(){\r\n\treturn false;\r\n};\r\nscheduler.locate_holder = function(day) {\r\n\tif (this._mode == \"day\") return this._els[\"dhx_cal_data\"][0].firstChild; //dirty\r\n\treturn this._els[\"dhx_cal_data\"][0].childNodes[day];\r\n};\r\nscheduler.locate_holder_day = function(date, past) {\r\n\tvar day = Math.floor((this._correct_shift(date, 1) - this._min_date) / (60 * 60 * 24 * 1000));\r\n\t//when locating end data of event , we need to use next day if time part was defined\r\n\tif (past && this.date.time_part(date)) day++;\r\n\treturn day;\r\n};\r\n\r\n\r\n\r\nscheduler._get_dnd_order = function(order, ev_height, max_height){\r\n\tif(!this._drag_event)\r\n\t\treturn order;\r\n\tif(!this._drag_event._orig_sorder)\r\n\t\tthis._drag_event._orig_sorder = order;\r\n\telse\r\n\t\torder = this._drag_event._orig_sorder;\r\n\r\n\tvar evTop = ev_height * order;\r\n\twhile((evTop + ev_height) > max_height){\r\n\t\torder--;\r\n\t\tevTop -= ev_height;\r\n\t}\r\n\torder = Math.max(order, 0);\r\n\treturn order;\r\n};\r\n//scheduler._get_event_bar_pos = function(sday, eday, week, drag){\r\nscheduler._get_event_bar_pos = function(ev){\r\n\tvar rtl = this.config.rtl;\r\n\tvar columns = this._colsS;\r\n\tvar x = columns[ev._sday];\r\n\tvar x2 = columns[ev._eday];\r\n\tif (rtl) {\r\n\t\tx = columns[columns.col_length] - columns[ev._eday] + columns[0];\r\n\t\tx2 = columns[columns.col_length] - columns[ev._sday] + columns[0];\r\n\t}\r\n\r\n\tif (x2 == x) x2 = columns[ev._eday + 1];\r\n\tvar hb = this.xy.bar_height;\r\n\r\n\tvar order = ev._sorder;\r\n\tif(ev.id == this._drag_id){\r\n\t\tvar cellHeight = columns.heights[ev._sweek + 1] - columns.heights[ev._sweek]- this.xy.month_head_height;//22 for month head height\r\n\t\torder = scheduler._get_dnd_order(order, hb, cellHeight);\r\n\t}\r\n\tvar y_event_offset = order * hb;\r\n\tvar y = columns.heights[ev._sweek] + (columns.height ? (this.xy.month_scale_height + 2) : 2 ) + y_event_offset;\r\n\treturn {x:x, x2:x2, y:y};\r\n};\r\n\r\nscheduler.render_event_bar = function (ev) {\r\n\tvar parent = this._rendered_location;\r\n\tvar pos = this._get_event_bar_pos(ev);\r\n\tvar y = pos.y;\r\n\tvar x = pos.x;\r\n\tvar x2 = pos.x2;\r\n\t// resize for month mutliday events\r\n\tvar resize_handle = \"\";\r\n\r\n\t//events in ignored dates\r\n\r\n\tif (!x2) return;\r\n\r\n\tvar resizable = scheduler.config.resize_month_events && this._mode == \"month\" &&\r\n\t\t(!ev._timed || scheduler.config.resize_month_timed);\r\n\r\n\tvar d = document.createElement(\"div\");\r\n\tvar left_chunk = (ev.hasOwnProperty(\"_first_chunk\") && ev._first_chunk),\r\n\t\tright_chunk = (ev.hasOwnProperty(\"_last_chunk\") && ev._last_chunk);\r\n\r\n\tvar resize_left = resizable && (ev._timed || left_chunk);\r\n\tvar resize_right = resizable && (ev._timed || right_chunk);\r\n\r\n\tvar timed = true;\r\n\tvar cs = \"dhx_cal_event_clear\";\r\n\tif (!ev._timed || resizable) {\r\n\t\ttimed = false;\r\n\t\tcs = \"dhx_cal_event_line\";\r\n\t}\r\n\tif(left_chunk){\r\n\t\tcs += \" dhx_cal_event_line_start\";\r\n\t}\r\n\tif(right_chunk){\r\n\t\tcs += \" dhx_cal_event_line_end\";\r\n\t}\r\n\tif(resize_left){\r\n\t\tresize_handle += \"
\";\r\n\t}\r\n\tif(resize_right){\r\n\t\tresize_handle += \"
\";\r\n\t}\r\n\r\n\tvar cse = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\tif (cse){\r\n\t\tcs += \" \" + cse;\r\n\t}\r\n\r\n\tvar bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\tvar color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\tvar style_text = [\r\n\t\t\"position:absolute\",\r\n\t\t\"top:\" + y + \"px\",\r\n\t\t\"left:\" + x + \"px\",\r\n\t\t\"width:\" + (x2 - x - (timed ? 1 : 0)) + \"px\",\r\n\t\t\"height:\" + (this.xy.bar_height - 2) + \"px\",\r\n\t\tcolor,\r\n\t\tbg_color,\r\n\t\t(ev._text_style || \"\")\r\n\t].join(\";\");\r\n\r\n\tvar html = \"
\";\r\n\tif (resizable) {\r\n\t\thtml += resize_handle;\r\n\t}\r\n\tif(scheduler.getState().mode == \"month\"){\r\n\t\tev = scheduler.getEvent(ev.id); // ev at this point could be a part (row in a month view) of a larger event\r\n\t}\r\n\r\n\tif (ev._timed){\r\n\t\thtml += `${scheduler.templates.event_bar_date(ev.start_date, ev.end_date, ev)}`;\r\n\t}\r\n\r\n\thtml += \"
\";\r\n\thtml += scheduler.templates.event_bar_text(ev.start_date, ev.end_date, ev) + '
';\r\n\thtml += \"
\";\r\n\thtml += '
';\r\n\r\n\td.innerHTML = html;\r\n\r\n\tthis._rendered.push(d.firstChild);\r\n\tparent.appendChild(d.firstChild);\r\n};\r\n\r\nscheduler._locate_event = function(node) {\r\n\tvar id = null;\r\n\twhile (node && !id && node.getAttribute) {\r\n\t\tid = node.getAttribute(this.config.event_attribute);\r\n\t\tnode = node.parentNode;\r\n\t}\r\n\treturn id;\r\n};\r\n\r\nscheduler.edit = function(id) {\r\n\tif (this._edit_id == id) return;\r\n\tthis.editStop(false, id);\r\n\tthis._edit_id = id;\r\n\tthis.updateEvent(id);\r\n};\r\nscheduler.editStop = function(mode, id) {\r\n\tif (id && this._edit_id == id) return;\r\n\tvar ev = this.getEvent(this._edit_id);\r\n\tif (ev) {\r\n\t\tif (mode) ev.text = this._editor.value;\r\n\t\tthis._edit_id = null;\r\n\t\tthis._editor = null;\r\n\t\tthis.updateEvent(ev.id);\r\n\t\tthis._edit_stop_event(ev, mode);\r\n\t}\r\n};\r\nscheduler._edit_stop_event = function(ev, mode) {\r\n\tif (this._new_event) {\r\n\t\tif (!mode) {\r\n\t\t\tif (ev) // in case of custom lightbox user can already delete event\r\n\t\t\t\tthis.deleteEvent(ev.id, true);\r\n\t\t} else {\r\n\t\t\tthis.callEvent(\"onEventAdded\", [ev.id, ev]);\r\n\t\t}\r\n\t\tthis._new_event = null;\r\n\t} else {\r\n\t\tif (mode){\r\n\t\t\tthis.callEvent(\"onEventChanged\", [ev.id, ev]);\r\n\t\t}\r\n\t}\r\n};\r\n\r\nscheduler.getEvents = function(from, to) {\r\n\tvar result = [];\r\n\tfor (var a in this._events) {\r\n\t\tvar ev = this._events[a];\r\n\t\tif (ev && ( (!from && !to) || (ev.start_date < to && ev.end_date > from) ))\r\n\t\t\tresult.push(ev);\r\n\t}\r\n\treturn result;\r\n};\r\nscheduler.getRenderedEvent = function(id) {\r\n\tif (!id)\r\n\t\treturn;\r\n\tvar rendered_events = scheduler._rendered;\r\n\tfor (var i=0; i -1){\r\n\t\t\t\t\tsection = section.split(scheduler.config.section_delimiter)[0];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar top = timeline.getSectionTop(section);\r\n\t\t\tvar left = timeline.posFromDate(event.start_date);\r\n\t\t\tvar container = scheduler.$container.querySelector(\".dhx_timeline_data_wrapper\");\r\n\t\t\tleft = left - (container.offsetWidth - timeline.dx) / 2;\r\n\t\t\ttop = top - container.offsetHeight / 2 + timeline.dy/2;\r\n\r\n\t\t\tif (timeline._smartRenderingEnabled()) {\r\n\t\t\t\tvar handlerId = timeline.attachEvent(\"onScroll\", function(){\r\n\t\t\t\t\trestoreOriginalColors();\r\n\t\t\t\t\ttimeline.detachEvent(handlerId);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\ttimeline.scrollTo({\r\n\t\t\t\tleft: left,\r\n\t\t\t\ttop: top\r\n\t\t\t});\r\n\t\t\tif (!timeline._smartRenderingEnabled()) {\r\n\t\t\t\trestoreOriginalColors();\r\n\t\t\t}\r\n\t\t}\r\n\t}else{\r\n\t\trestoreOriginalColors();\r\n\t}\r\n\r\n\tscheduler.callEvent(\"onAfterEventDisplay\", [ev, mode]);\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._append_drag_marker = function(m){\r\n\tif(m.parentNode) return;\r\n\tvar zone = scheduler._els[\"dhx_cal_data\"][0];\r\n\r\n\tvar scale = zone.lastChild;\r\n\tvar className = scheduler._getClassName(scale);\r\n\tif(className.indexOf(\"dhx_scale_holder\") < 0 && scale.previousSibling){\r\n\t\tscale = scale.previousSibling;\r\n\t}\r\n\r\n\tclassName = scheduler._getClassName(scale);\r\n\tif (scale && className.indexOf(\"dhx_scale_holder\") === 0) {\r\n\t\tscale.appendChild(m);\r\n\t}\r\n};\r\n\r\nscheduler._update_marker_position = function(m, event){\r\n\tvar size = scheduler._calc_event_y(event, 0);\r\n\tm.style.top = size.top + \"px\";\r\n\tm.style.height = size.height + \"px\";\r\n};\r\n\r\nscheduler.highlightEventPosition = function(event){\r\n\tvar m = document.createElement(\"div\");\r\n\r\n\tm.setAttribute(\"event_id\", event.id); // for backward compatibility\r\n\tm.setAttribute(this.config.event_attribute, event.id);\r\n\tthis._rendered.push(m);\r\n\tthis._update_marker_position(m, event);\r\n\r\n\tvar css = this.templates.drag_marker_class(event.start_date, event.end_date, event);\r\n\tvar html = this.templates.drag_marker_content(event.start_date, event.end_date, event);\r\n\tm.className = \"dhx_drag_marker\";\r\n\tif(css)\r\n\t\tm.className += \" \" + css;\r\n\tif(html)\r\n\t\tm.innerHTML = html;\r\n\tthis._append_drag_marker(m);\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._parsers.xml = {\r\n\tcanParse: function(data, xhr){\r\n\t\t// IE returns non-empty responseXML type regardless of actual data type\r\n\t\tif(xhr.responseXML && xhr.responseXML.firstChild){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\ttry{\r\n\t\t\tvar xmlDoc = scheduler.ajax.parse(xhr.responseText);\r\n\t\t\tvar topElement = scheduler.ajax.xmltop(\"data\", xmlDoc);\r\n\t\t\tif(topElement && topElement.tagName === \"data\"){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}catch (e){\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\tparse: function(loader) {\r\n\t\tvar xml;\r\n\r\n\t\tif (!loader.xmlDoc.responseXML) { //from a string\r\n\t\t\tloader.xmlDoc.responseXML = scheduler.ajax.parse(loader.xmlDoc.responseText);\r\n\t\t}\r\n\t\r\n\t\txml = scheduler.ajax.xmltop(\"data\", loader.xmlDoc);\r\n\t\tif (xml.tagName != \"data\") return null;//not an xml\r\n\t\tvar csrfToken = xml.getAttribute(\"dhx_security\");\r\n\t\tif (csrfToken) {\r\n\t\t\tif (window.dhtmlx) {\r\n\t\t\t\twindow.dhtmlx.security_key = csrfToken;\r\n\t\t\t}\r\n\t\t\tscheduler.security_key = csrfToken;\r\n\t\t}\r\n\t\r\n\t\tvar opts = scheduler.ajax.xpath(\"//coll_options\", loader.xmlDoc);\r\n\t\tfor (var i = 0; i < opts.length; i++) {\r\n\t\t\tvar bind = opts[i].getAttribute(\"for\");\r\n\t\t\tvar arr = scheduler.serverList[bind];\r\n\t\t\tif (!arr) {\r\n\t\t\t\tscheduler.serverList[bind] = arr = [];\r\n\t\t\t}\r\n\t\t\tarr.splice(0, arr.length);\t//clear old options\r\n\t\t\tvar itms = scheduler.ajax.xpath(\".//item\", opts[i]);\r\n\t\t\tfor (var j = 0; j < itms.length; j++) {\r\n\t\t\t\tvar itm = itms[j];\r\n\t\t\t\tvar attrs = itm.attributes;\r\n\t\t\t\tvar obj = { key: itms[j].getAttribute(\"value\"), label: itms[j].getAttribute(\"label\")};\r\n\t\t\t\tfor (var k = 0; k < attrs.length; k++) {\r\n\t\t\t\t\tvar attr = attrs[k];\r\n\t\t\t\t\tif (attr.nodeName == \"value\" || attr.nodeName == \"label\")\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\tobj[attr.nodeName] = attr.nodeValue;\r\n\t\t\t\t}\r\n\t\t\t\tarr.push(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (opts.length)\r\n\t\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\t\r\n\t\tvar ud = scheduler.ajax.xpath(\"//userdata\", loader.xmlDoc);\r\n\t\tfor (var i = 0; i < ud.length; i++) {\r\n\t\t\tvar udx = scheduler._xmlNodeToJSON(ud[i]);\r\n\t\t\tscheduler._userdata[udx.name] = udx.text;\r\n\t\t}\r\n\t\r\n\t\tvar evs = [];\r\n\t\txml = scheduler.ajax.xpath(\"//event\", loader.xmlDoc);\r\n\t\r\n\t\tfor (var i = 0; i < xml.length; i++) {\r\n\t\t\tvar ev = evs[i] = scheduler._xmlNodeToJSON(xml[i]);\r\n\t\t\tscheduler._init_event(ev);\r\n\t\t}\r\n\t\treturn evs;\r\n\t}\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler.json = scheduler._parsers.json = {\r\n\tcanParse: function(data){\r\n\t\tif(data && typeof data === \"object\"){\r\n\t\t\treturn true;\r\n\t\t} else if(typeof data === \"string\"){\r\n\t\t\ttry {\r\n\t\t\t\tvar result = JSON.parse(data);\r\n\t\t\t\treturn Object.prototype.toString.call(result) === '[object Object]' || \r\n\t\t\t\t\t\tObject.prototype.toString.call(result) === '[object Array]';\r\n\t\t\t} catch (err) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\tparse: function(data) {\r\n\t\tvar events = [];\r\n\r\n\t\tif (typeof data == \"string\") {\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\t\tif (Object.prototype.toString.call(data) === '[object Array]') {\r\n\t\t\tevents = data;\r\n\t\t} else {\r\n\t\t\tif(data){\r\n\t\t\t\tif(data.events){\r\n\t\t\t\t\tevents = data.events;\r\n\t\t\t\t}else if(data.data){\r\n\t\t\t\t\tevents = data.data;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tevents = events || [];\r\n\r\n\t\tif (data.dhx_security) {\r\n\t\t\tif (window.dhtmlx) {\r\n\t\t\t\twindow.dhtmlx.security_key = data.dhx_security;\r\n\t\t\t}\r\n\t\t\tscheduler.security_key = data.dhx_security;\r\n\t\t}\r\n\r\n\t\tvar collections = (data && data.collections) ? data.collections : {};\r\n\t\tvar collections_loaded = false;\r\n\t\tfor (var key in collections) {\r\n\t\t\tif (collections.hasOwnProperty(key)) {\r\n\t\t\t\tcollections_loaded = true;\r\n\t\t\t\tvar collection = collections[key];\r\n\t\t\t\tvar arr = scheduler.serverList[key];\r\n\t\t\t\tif (!arr) {\r\n\t\t\t\t\tscheduler.serverList[key] = arr = [];\r\n\t\t\t\t}\r\n\t\t\t\tarr.splice(0, arr.length); //clear old options\r\n\t\t\t\tfor (var j = 0; j < collection.length; j++) {\r\n\t\t\t\t\tvar option = collection[j];\r\n\t\t\t\t\tvar obj = { key: option.value, label: option.label }; // resulting option object\r\n\t\t\t\t\tfor (var option_key in option) {\r\n\t\t\t\t\t\tif (option.hasOwnProperty(option_key)) {\r\n\t\t\t\t\t\t\tif (option_key == \"value\" || option_key == \"label\")\r\n\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\tobj[option_key] = option[option_key]; // obj['value'] = option['value']\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tarr.push(obj);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (collections_loaded)\r\n\t\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\r\n\t\tvar evs = [];\r\n\t\tfor (var i = 0; i < events.length; i++) {\r\n\t\t\tvar event = events[i];\r\n\t\t\tscheduler._init_event(event);\r\n\t\t\tevs.push(event);\r\n\t\t}\r\n\t\treturn evs;\r\n\t}\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler.ical = scheduler._parsers.ical = {\r\n\tcanParse: function(data){\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\treturn new RegExp(\"^BEGIN:VCALENDAR\").test(data);\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t},\r\n\tparse:function(str){\r\n\t\tvar data = str.match(RegExp(this.c_start+\"[^\\f]*\"+this.c_end,\"\"));\r\n\t\tif (!data.length) return;\r\n\r\n\t\t// mpl: handle bad unfolding\r\n\t\tdata[0]=data[0].replace(/[\\r\\n]+ /g,\"\");\r\n\r\n\t\t//unfolding \r\n\t\tdata[0]=data[0].replace(/[\\r\\n]+(?=[a-z \\t])/g,\" \");\r\n\t\t//drop property\r\n\t\tdata[0]=data[0].replace(/;[^:\\r\\n]*:/g,\":\");\r\n\t\t\r\n\t\t\r\n\t\tvar incoming=[];\r\n\t\tvar match;\r\n\t\tvar event_r = RegExp(\"(?:\"+this.e_start+\")([^\\f]*?)(?:\"+this.e_end+\")\",\"g\");\r\n\t\twhile ((match=event_r.exec(data)) !== null){\r\n\t\t\tvar e={};\r\n\t\t\tvar param;\r\n\t\t\tvar param_r = /[^\\r\\n]+[\\r\\n]+/g;\r\n\t\t\twhile ((param=param_r.exec(match[1])) !== null)\r\n\t\t\t\tthis.parse_param(param.toString(),e);\r\n\t\t\tif (e.uid && !e.id) e.id = e.uid; //fallback to UID, when ID is not defined\r\n\t\t\tincoming.push(e);\t\r\n\t\t}\r\n\t\treturn incoming;\r\n\t},\r\n\tparse_param:function(str,obj){\r\n\t\tvar d = str.indexOf(\":\"); \r\n\t\t\tif (d==-1) return;\r\n\t\t\r\n\t\tvar name = str.substr(0,d).toLowerCase();\r\n\t\tvar value = str.substr(d+1).replace(/\\\\,/g,\",\").replace(/[\\r\\n]+$/,\"\");\r\n\t\tif (name==\"summary\")\r\n\t\t\tname=\"text\";\r\n\t\telse if (name==\"dtstart\"){\r\n\t\t\tname = \"start_date\";\r\n\t\t\tvalue = this.parse_date(value,0,0);\r\n\t\t}\r\n\t\telse if (name==\"dtend\"){\r\n\t\t\tname = \"end_date\";\r\n\t\t\tvalue = this.parse_date(value,0,0);\r\n\t\t}\r\n\t\tobj[name]=value;\r\n\t},\r\n\tparse_date:function(value,dh,dm){\r\n\t\tvar t = value.split(\"T\");\r\n\r\n\t\tvar utcMark = false;\r\n\t\tif (t[1]){\r\n\t\t\tdh=t[1].substr(0,2);\r\n\t\t\tdm=t[1].substr(2,2);\r\n\t\t\tutcMark = !!(t[1][6] == \"Z\");\r\n\t\t}\r\n\t\tvar dy = t[0].substr(0,4);\r\n\t\tvar dn = parseInt(t[0].substr(4,2),10)-1;\r\n\t\tvar dd = t[0].substr(6,2);\r\n\r\n\t\tif(scheduler.config.server_utc || utcMark){\r\n\t\t\treturn new Date(Date.UTC(dy,dn,dd,dh,dm)) ;\r\n\t\t}else{\r\n\t\t\treturn new Date(dy,dn,dd,dh,dm);\r\n\t\t}\r\n\t},\r\n\tc_start:\"BEGIN:VCALENDAR\",\r\n\te_start:\"BEGIN:VEVENT\",\r\n\te_end:\"END:VEVENT\",\r\n\tc_end:\"END:VCALENDAR\"\t\r\n};\r\n\r\n}","export default function(scheduler){\r\n\treturn (function(){\r\n\t\tvar res = {};\r\n\t\tfor (var a in this._events){\r\n\t\t\tvar ev = this._events[a];\r\n\t\t\tif (ev.id.toString().indexOf(\"#\") == -1){\r\n\t\t\t\tres[ev.id] = ev;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn res;\r\n\t}).bind(scheduler);\r\n}","import xmlLoaded from \"./loaders/xml\";\r\nimport jsonLoader from \"./loaders/json\";\r\nimport iCalLoader from \"./loaders/ical\";\r\nimport createSerializator from \"../core/common/get_serializable_events\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler._loaded = {};\r\nscheduler._load = function(url, from) {\r\n\turl = url || this._load_url;\r\n\r\n\tif(!url){\r\n\t\t//if scheduler.setLoadMode is called before scheduler.init, initial rendering will invoke data loading while url is undefined\r\n\t\treturn;\r\n\t}\r\n\r\n\turl += (url.indexOf(\"?\") == -1 ? \"?\" : \"&\") + \"timeshift=\" + (new Date()).getTimezoneOffset();\r\n\tif (this.config.prevent_cache) url += \"&uid=\" + this.uid();\r\n\tvar to;\r\n\tfrom = from || this._date;\r\n\tfunction ajaxCallback(response) {\r\n\t\tscheduler.on_load(response);\r\n\t\tscheduler.callEvent(\"onLoadEnd\", []);\r\n\t}\r\n\tif (this._load_mode) {\r\n\t\tvar lf = this.templates.load_format;\r\n\r\n\t\tfrom = this.date[this._load_mode + \"_start\"](new Date(from.valueOf()));\r\n\t\twhile (from > this._min_date) from = this.date.add(from, -1, this._load_mode);\r\n\t\tto = from;\r\n\r\n\t\tvar cache_line = true;\r\n\t\twhile (to < this._max_date) {\r\n\t\t\tto = this.date.add(to, 1, this._load_mode);\r\n\t\t\tif (this._loaded[lf(from)] && cache_line)\r\n\t\t\t\tfrom = this.date.add(from, 1, this._load_mode); else cache_line = false;\r\n\t\t}\r\n\r\n\t\tvar temp_to = to;\r\n\t\tdo {\r\n\t\t\tto = temp_to;\r\n\t\t\ttemp_to = this.date.add(to, -1, this._load_mode);\r\n\t\t} while (temp_to > from && this._loaded[lf(temp_to)]);\r\n\r\n\t\tif (to <= from)\r\n\t\t\treturn false; //already loaded\r\n\r\n\t\tscheduler.ajax.get(url + \"&from=\" + lf(from) + \"&to=\" + lf(to), ajaxCallback);\r\n\r\n\t\twhile (from < to) {\r\n\t\t\tthis._loaded[lf(from)] = true;\r\n\t\t\tfrom = this.date.add(from, 1, this._load_mode);\r\n\t\t}\r\n\t} else {\r\n\t\tscheduler.ajax.get(url, ajaxCallback);\r\n\t}\r\n\r\n\t// TODO: remove onXLS\r\n\tthis.callEvent(\"onXLS\", []);\r\n\tthis.callEvent(\"onLoadStart\", []);\r\n\treturn true;\r\n};\r\n\r\nscheduler._parsers = {};\r\n\r\n\r\nxmlLoaded(scheduler);\r\njsonLoader(scheduler);\r\niCalLoader(scheduler);\r\n\r\nscheduler.on_load = function (loader) {\r\n\tthis.callEvent(\"onBeforeParse\", []);\r\n\r\n\tvar evs;\r\n\tvar error = false;\r\n\r\n\tvar foundParser = false;\r\n\tfor(var i in this._parsers){\r\n\t\tvar parser = this._parsers[i];\r\n\t\tif(parser.canParse(loader.xmlDoc.responseText, loader.xmlDoc)){\r\n\t\t\ttry{\r\n\t\t\t\tvar param = loader.xmlDoc.responseText;\r\n\t\t\t\tif(i === \"xml\"){\r\n\t\t\t\t\tparam = loader;\r\n\t\t\t\t}\r\n\t\t\t\tevs = parser.parse(param);\r\n\t\t\t\tif(!evs){\r\n\t\t\t\t\terror = true;\r\n\t\t\t\t}\r\n\t\t\t}catch(e){\r\n\t\t\t\terror = true;\r\n\t\t\t}\r\n\t\t\tfoundParser = true;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tif(!foundParser){\r\n\t\tif(this._process && this[this._process]){\r\n\t\t\ttry{\r\n\t\t\t\tevs = this[this._process].parse(loader.xmlDoc.responseText);\r\n\t\t\t}catch (e){\r\n\t\t\t\terror = true;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\terror = true;\r\n\t\t}\r\n\t}\r\n\r\n\tif(error || (loader.xmlDoc.status && loader.xmlDoc.status >= 400)){\r\n\t\tthis.callEvent(\"onLoadError\", [loader.xmlDoc]);\r\n\t\tevs = [];\r\n\t}\r\n\r\n\tthis._process_loading(evs);\r\n\r\n\t// TODO: remove onXLE\r\n\tthis.callEvent(\"onXLE\", []);\r\n\tthis.callEvent(\"onParse\", []);\r\n};\r\nscheduler._process_loading = function(evs) {\r\n\tthis._loading = true;\r\n\tthis._not_render = true;\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tif (!this.callEvent(\"onEventLoading\", [evs[i]])) continue;\r\n\t\tthis.addEvent(evs[i]);\r\n\t}\r\n\tthis._not_render = false;\r\n\tif (this._render_wait) this.render_view_data();\r\n\r\n\tthis._loading = false;\r\n\tif (this._after_call) this._after_call();\r\n\tthis._after_call = null;\r\n};\r\nscheduler._init_event = function(event) {\r\n\tevent.text = (event.text || event._tagvalue) || \"\";\r\n\tevent.start_date = scheduler._init_date(event.start_date);\r\n\tevent.end_date = scheduler._init_date(event.end_date);\r\n};\r\n\r\nscheduler._init_date = function(date){\r\n\tif(!date)\r\n\t\treturn null;\r\n\tif (typeof date == \"string\") {\r\n\t\treturn scheduler._helpers.parseDate(date);\r\n\t}\r\n\telse return new Date(date);\r\n};\r\n\r\nconst getSerializableData = createSerializator(scheduler);\r\nscheduler.serialize = function(){\r\n\tconst dataset = [];\r\n\tconst allEvents = getSerializableData();\r\n\tfor (var a in allEvents){\r\n\t\t\r\n\t\tconst exportedEvent = {};\r\n\t\tvar ev = allEvents[a];\r\n\r\n\t\tfor(var key in ev){\r\n\t\t\tif (key.charAt(0) == \"$\" || key.charAt(0) == \"_\"){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tlet exportValue;\r\n\t\t\tconst rawValue = ev[key];\r\n\t\t\tif(scheduler.utils.isDate(rawValue)){\r\n\t\t\t\texportValue = scheduler.defined(scheduler.templates.xml_format) ? scheduler.templates.xml_format(rawValue) : scheduler.templates.format_date(rawValue);\r\n\t\t\t}else{\r\n\t\t\t\texportValue = rawValue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\texportedEvent[key] = exportValue;\r\n\t\t}\r\n\r\n\t\tdataset.push(exportedEvent);\r\n\t}\r\n\treturn dataset;\r\n};\r\n\r\n/*\r\nscheduler.json = {};\r\nscheduler.json.parse = function(data) {\r\n\r\n\tvar events = [];\r\n\r\n\tif (typeof data == \"string\") {\r\n\t\tdata = JSON.parse(data);\r\n\t}\r\n\tif (Object.prototype.toString.call(data) === '[object Array]') {\r\n\t\tevents = data;\r\n\t} else {\r\n\t\tif(data){\r\n\t\t\tif(data.events){\r\n\t\t\t\tevents = data.events;\r\n\t\t\t}else if(data.data){\r\n\t\t\t\tevents = data.data;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tevents = events || [];\r\n\r\n\tif (data.dhx_security) {\r\n\t\tif (window.dhtmlx) {\r\n\t\t\twindow.dhtmlx.security_key = data.dhx_security;\r\n\t\t}\r\n\t\tscheduler.security_key = data.dhx_security;\r\n\t}\r\n\r\n\tvar collections = (data && data.collections) ? data.collections : {};\r\n\tvar collections_loaded = false;\r\n\tfor (var key in collections) {\r\n\t\tif (collections.hasOwnProperty(key)) {\r\n\t\t\tcollections_loaded = true;\r\n\t\t\tvar collection = collections[key];\r\n\t\t\tvar arr = scheduler.serverList[key];\r\n\t\t\tif (!arr) {\r\n\t\t\t\tscheduler.serverList[key] = arr = [];\r\n\t\t\t}\r\n\t\t\tarr.splice(0, arr.length); //clear old options\r\n\t\t\tfor (var j = 0; j < collection.length; j++) {\r\n\t\t\t\tvar option = collection[j];\r\n\t\t\t\tvar obj = { key: option.value, label: option.label }; // resulting option object\r\n\t\t\t\tfor (var option_key in option) {\r\n\t\t\t\t\tif (option.hasOwnProperty(option_key)) {\r\n\t\t\t\t\t\tif (option_key == \"value\" || option_key == \"label\")\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\tobj[option_key] = option[option_key]; // obj['value'] = option['value']\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tarr.push(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (collections_loaded)\r\n\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\r\n\tvar evs = [];\r\n\tfor (var i = 0; i < events.length; i++) {\r\n\t\tvar event = events[i];\r\n\t\tscheduler._init_event(event);\r\n\t\tevs.push(event);\r\n\t}\r\n\treturn evs;\r\n};*/\r\nscheduler.parse = function(data, type) {\r\n\tthis._process = type;\r\n\tthis.on_load({xmlDoc: {responseText: data}});\r\n};\r\nscheduler.load = function(url, call) {\r\n\tif (typeof call == \"string\") {\r\n\t\tthis._process = call;\r\n\t\tcall = arguments[2];\r\n\t}\r\n\r\n\tthis._load_url = url;\r\n\tthis._after_call = call;\r\n\tthis._load(url, this._date);\r\n};\r\n//possible values - day,week,month,year,all\r\nscheduler.setLoadMode = function(mode) {\r\n\tif (mode == \"all\") mode = \"\";\r\n\tthis._load_mode = mode;\r\n};\r\n\r\nscheduler.serverList = function(name, array) {\r\n\tif (array) {\r\n\t\tthis.serverList[name] = array.slice(0);\r\n\t\treturn this.serverList[name];\r\n\t}\r\n\tthis.serverList[name] = (this.serverList[name] || []);\r\n\treturn this.serverList[name];\r\n};\r\nscheduler._userdata = {};\r\n\r\nscheduler._xmlNodeToJSON = function(node) {\r\n\tvar t = {};\r\n\tfor (var i = 0; i < node.attributes.length; i++)\r\n\t\tt[node.attributes[i].name] = node.attributes[i].value;\r\n\r\n\tfor (var i = 0; i < node.childNodes.length; i++) {\r\n\t\tvar child = node.childNodes[i];\r\n\t\tif (child.nodeType == 1)\r\n\t\t\tt[child.tagName] = child.firstChild ? child.firstChild.nodeValue : \"\";\r\n\t}\r\n\r\n\tif (!t.text) t.text = node.firstChild ? node.firstChild.nodeValue : \"\";\r\n\r\n\treturn t;\r\n};\r\nscheduler.attachEvent(\"onXLS\", function() {\r\n\tif (this.config.show_loading === true) {\r\n\t\tvar t;\r\n\t\tt = this.config.show_loading = document.createElement(\"div\");\r\n\t\tt.className = 'dhx_loading';\r\n\t\tt.style.left = Math.round((this._x - 128) / 2) + \"px\";\r\n\t\tt.style.top = Math.round((this._y - 15) / 2) + \"px\";\r\n\t\tthis._obj.appendChild(t);\r\n\t}\r\n});\r\nscheduler.attachEvent(\"onXLE\", function() {\r\n\tvar t = this.config.show_loading;\r\n\tif (t && typeof t == \"object\") {\r\n\t\tif(t.parentNode) {\r\n\t\t\tt.parentNode.removeChild(t);\r\n\t\t}\r\n\t\tthis.config.show_loading = true;\r\n\t}\r\n});\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler._lightbox_controls = {};\r\nscheduler.formSection = function(name){\r\n\tvar config = this.config.lightbox.sections;\r\n\tvar i = 0;\r\n\tfor (i; i < config.length; i++) {\r\n\t\tif (config[i].name == name) {\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tif (i === config.length) {\r\n\t\t// GS-1662 section not found, should exit here instead of throwing an error\r\n\t\treturn null;\r\n\t}\r\n\r\n\tvar section = config[i];\r\n\tif (!scheduler._lightbox) {\r\n\t\tscheduler.getLightbox();\r\n\t}\r\n\tvar header = scheduler._lightbox.querySelector(`#${section.id}`);\r\n\tvar node = header.nextSibling;\r\n\r\n\tvar result = {\r\n\t\tsection: section,\r\n\t\theader: header,\r\n\t\tnode: node,\r\n\t\tgetValue:function(ev){\r\n\t\t\treturn scheduler.form_blocks[section.type].get_value(node, (ev||{}), section);\r\n\t\t},\r\n\t\tsetValue:function(value, ev){\r\n\t\t\treturn scheduler.form_blocks[section.type].set_value(node, value, (ev||{}), section);\r\n\t\t}\r\n\t};\r\n\r\n\tvar handler = scheduler._lightbox_controls[\"get_\"+section.type+\"_control\"];\r\n\treturn handler?handler(result):result;\r\n};\r\nscheduler._lightbox_controls.get_template_control = function(result) {\r\n\tresult.control = result.node;\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_select_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('select')[0];\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_textarea_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('textarea')[0];\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_time_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('select'); // array\r\n\treturn result;\r\n};\r\n\r\nscheduler._lightbox_controls.defaults = {\r\n\ttemplate: {\r\n\t\theight:30\r\n\t},\r\n\ttextarea: {\r\n\t\theight: 200\r\n\t},\r\n\tselect: {\r\n\t\theight: 23\r\n\t},\r\n\ttime: {\r\n\t\theight: 20\r\n\t}\r\n};\r\n\r\n\r\nscheduler.form_blocks={\r\n\ttemplate:{\r\n\t\trender: function(sns){\r\n\t\t\treturn \"
\";\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,config){\r\n\t\t\tnode.innerHTML = value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev,config){\r\n\t\t\treturn node.innerHTML||\"\";\r\n\t\t},\r\n\t\tfocus: function(node){\r\n\t\t}\r\n\t},\r\n\ttextarea:{\r\n\t\trender:function(sns){\r\n\t\t\tconst placeholder = sns.placeholder ? `placeholder='${sns.placeholder}'` : \"\";\r\n\t\t\treturn `
`;\r\n\t\t},\r\n\t\tset_value:function(node,value,ev){\r\n\t\t\tscheduler.form_blocks.textarea._get_input(node).value=value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev){\r\n\t\t\treturn scheduler.form_blocks.textarea._get_input(node).value;\r\n\t\t},\r\n\t\tfocus:function(node){\r\n\t\t\tvar a = scheduler.form_blocks.textarea._get_input(node);\r\n\t\t\tscheduler._focus(a, true);\r\n\t\t},\r\n\t\t_get_input: function(node){\r\n\t\t\treturn node.getElementsByTagName(\"textarea\")[0];\r\n\t\t}\r\n\t},\r\n\tselect:{\r\n\t\trender:function(sns){\r\n\t\t\t//var defaults = scheduler._lightbox_controls.defaults.select;\r\n\t\t\tvar html=\"
\";\r\n\t\t\treturn html;\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,sns){\r\n\t\t\tvar select = node.firstChild;\r\n\t\t\tif (!select._dhx_onchange && sns.onchange) {\r\n\t\t\t\tscheduler.event(select, \"change\", sns.onchange);\r\n\t\t\t\tselect._dhx_onchange = true;\r\n\t\t\t}\r\n\t\t\tif (typeof value == \"undefined\")\r\n\t\t\t\tvalue = (select.options[0]||{}).value;\r\n\t\t\tselect.value=value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev){\r\n\t\t\treturn node.firstChild.value;\r\n\t\t},\r\n\t\tfocus:function(node){\r\n\t\t\tvar a=node.firstChild; scheduler._focus(a, true);\r\n\t\t}\r\n\t},\r\n\ttime:{\r\n\t\trender:function(sns) {\r\n\t\t\tif (!sns.time_format) {\r\n\t\t\t\t// default order\r\n\t\t\t\tsns.time_format = [\"%H:%i\", \"%d\", \"%m\", \"%Y\"];\r\n\t\t\t}\r\n\t\t\t// map: default order => real one\r\n\t\t\tsns._time_format_order = {};\r\n\t\t\tvar time_format = sns.time_format;\r\n\r\n\t\t\tvar cfg = scheduler.config;\r\n\t\t\tvar dt = scheduler.date.date_part(scheduler._currentDate());\r\n\t\t\tvar last = 24*60, first = 0;\r\n\t\t\tif(scheduler.config.limit_time_select){\r\n\t\t\t\tlast = 60*cfg.last_hour+1;\r\n\t\t\t\tfirst = 60*cfg.first_hour;\r\n\t\t\t\tdt.setHours(cfg.first_hour);\r\n\t\t\t}\r\n\t\t\tvar html = \"\";\r\n\r\n\t\t\tfor (var p = 0; p < time_format.length; p++) {\r\n\t\t\t\tvar time_option = time_format[p];\r\n\r\n\t\t\t\t// adding spaces between selects\r\n\t\t\t\tif (p > 0) {\r\n\t\t\t\t\thtml += \" \";\r\n\t\t\t\t}\r\n\t\t\t\tvar selectBoxClass = \"\";\r\n\t\t\t\tvar options = \"\";\r\n\t\t\t\tswitch (time_option) {\r\n\t\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_year_select\";\r\n\t\t\t\t\t\tsns._time_format_order[3] = p;\r\n\t\t\t\t\t\t//year\r\n\t\t\t\t\t\tvar range;\r\n\t\t\t\t\t\tvar start_year;\r\n\t\t\t\t\t\tvar end_year;\r\n\t\t\t\t\t\tif(sns.year_range){\r\n\t\t\t\t\t\t\tif (!isNaN(sns.year_range)) {\r\n\t\t\t\t\t\t\t\trange = sns.year_range;\r\n\t\t\t\t\t\t\t} else if (sns.year_range.push) {\r\n\t\t\t\t\t\t\t\t// if\r\n\t\t\t\t\t\t\t\tstart_year = sns.year_range[0];\r\n\t\t\t\t\t\t\t\tend_year = sns.year_range[1];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\trange = range || 10;\r\n\t\t\t\t\t\tvar offset = offset || Math.floor(range / 2);\r\n\t\t\t\t\t\tstart_year = start_year || dt.getFullYear() - offset;\r\n\t\t\t\t\t\tend_year = end_year || start_year + range;\r\n\r\n\t\t\t\t\t\tfor (var i = start_year; i < end_year; i++)\r\n\t\t\t\t\t\t\toptions += \"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%m\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_month_select\";\r\n\t\t\t\t\t\tsns._time_format_order[2] = p;\r\n\t\t\t\t\t\t//month\r\n\t\t\t\t\t\tfor (var i=0; i < 12; i++)\r\n\t\t\t\t\t\t\toptions+=\"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%d\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_day_select\";\r\n\t\t\t\t\t\tsns._time_format_order[1] = p;\r\n\t\t\t\t\t\t//days\r\n\t\t\t\t\t\tfor (var i=1; i < 32; i++)\r\n\t\t\t\t\t\t\toptions+=\"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%H:%i\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_time_select\";\r\n\t\t\t\t\t\tsns._time_format_order[0] = p;\r\n\t\t\t\t\t\t//hours\r\n\t\t\t\t\t\tvar i = first;\r\n\t\t\t\t\t\tvar tdate = dt.getDate();\r\n\t\t\t\t\t\tsns._time_values = [];\r\n\r\n\t\t\t\t\t\twhile(i\"+time+\"\";\r\n\t\t\t\t\t\t\tsns._time_values.push(i);\r\n\t\t\t\t\t\t\tdt.setTime(dt.valueOf()+this.config.time_step*60*1000);\r\n\t\t\t\t\t\t\tvar diff = (dt.getDate()!=tdate)?1:0; // moved or not to the next day\r\n\t\t\t\t\t\t\ti=diff*24*60+dt.getHours()*60+dt.getMinutes();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(options){\r\n\r\n\t\t\t\t\tvar ariaAttrs = scheduler._waiAria.lightboxSelectAttrString(time_option);\r\n\t\t\t\t\tvar readonly = sns.readonly ? \"disabled='disabled'\" : \"\";\r\n\t\t\t\t\thtml += \" \";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//var defaults = scheduler._lightbox_controls.defaults.select;\r\n\r\n\t\t\treturn \"
\"+html+\"  –  \"+html+\"
\";\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,config){\r\n\t\t\tvar cfg = scheduler.config;\r\n\t\t\tvar s=node.getElementsByTagName(\"select\");\r\n\t\t\tvar map = config._time_format_order;\r\n\t\t\tvar start_date, end_date;\r\n\r\n\t\t\tif(cfg.full_day) {\r\n\t\t\t\tif (!node._full_day){\r\n\t\t\t\t\tvar html = \"\";\r\n\t\t\t\t\tif (!scheduler.config.wide_form)\r\n\t\t\t\t\t\thtml = node.previousSibling.innerHTML+html;\r\n\t\t\t\t\tnode.previousSibling.innerHTML=html;\r\n\t\t\t\t\tnode._full_day=true;\r\n\t\t\t\t}\r\n\t\t\t\tvar input=node.previousSibling.getElementsByTagName(\"input\")[0];\r\n\t\t\t\tinput.checked = (scheduler.date.time_part(ev.start_date)===0 && scheduler.date.time_part(ev.end_date)===0);\r\n\r\n\t\t\t\ts[map[0]].disabled=input.checked;\r\n\t\t\t\ts[ map[0] + s.length/2 ].disabled=input.checked;\r\n\r\n\t\t\t\tif(!input.$_eventAttached){\r\n\t\t\t\t\tinput.$_eventAttached = true;\r\n\r\n\t\t\t\t\t\tscheduler.event(input, \"click\", function(){\r\n\t\t\t\t\t\tif(input.checked) {\r\n\t\t\t\t\t\t\tvar obj = {};\r\n\t\t\t\t\t\t\tscheduler.form_blocks.time.get_value(node,obj,config);\r\n\r\n\t\t\t\t\t\t\tstart_date = scheduler.date.date_part(obj.start_date);\r\n\t\t\t\t\t\t\tend_date = scheduler.date.date_part(obj.end_date);\r\n\r\n\t\t\t\t\t\t\tif (+end_date == +start_date || (+end_date >= +start_date && (ev.end_date.getHours() !== 0 || ev.end_date.getMinutes() !== 0)))\r\n\t\t\t\t\t\t\t\tend_date = scheduler.date.add(end_date, 1, \"day\");\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tstart_date = null;\r\n\t\t\t\t\t\t\tend_date = null;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\ts[map[0]].disabled=input.checked;\r\n\t\t\t\t\t\ts[ map[0] + s.length/2 ].disabled=input.checked;\r\n\r\n\t\t\t\t\t\t_fill_lightbox_select(s,0,start_date||ev.start_date);\r\n\t\t\t\t\t\t_fill_lightbox_select(s,4,end_date||ev.end_date);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(cfg.auto_end_date && cfg.event_duration) {\r\n\t\t\t\tvar _update_lightbox_select = function () {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (!(cfg.auto_end_date && cfg.event_duration)){\r\n\t\t\t\t\t\t// setting may be disabled after the handler is attached\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstart_date = new Date(s[map[3]].value,s[map[2]].value,s[map[1]].value,0,s[map[0]].value);\r\n\t\t\t\t\tend_date = new Date(start_date.getTime() + (scheduler.config.event_duration * 60 * 1000));\r\n\t\t\t\t\t_fill_lightbox_select(s, 4, end_date);\r\n\t\t\t\t};\r\n\t\t\t\tfor(var i=0; i<4; i++) {\r\n\t\t\t\t\tif(!s[i].$_eventAttached) {\r\n\t\t\t\t\t\ts[i].$_eventAttached = true;\r\n\t\t\t\t\t\tscheduler.event(s[i], \"change\", _update_lightbox_select);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfunction _fill_lightbox_select(s,i,d) {\r\n\t\t\t\tvar time_values = config._time_values;\r\n\t\t\t\tvar direct_value = d.getHours()*60+d.getMinutes();\r\n\t\t\t\tvar fixed_value = direct_value;\r\n\t\t\t\tvar value_found = false;\r\n\t\t\t\tfor (var k=0; k\";\r\n\t\tvar ariaAttr = \"\";\r\n\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\tariaAttr = this._waiAria.lightboxButtonAttrString(buttons[i]);\r\n\t\t\thtml += \"
\" + scheduler.locale.labels[buttons[i]] + \"
\";\r\n\t\t}\r\n\r\n\t\tbuttons = this.config.buttons_right;\r\n\t\tvar rtl = scheduler.config.rtl;\r\n\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\tariaAttr = this._waiAria.lightboxButtonAttrString(buttons[i]);\r\n\r\n\t\t\thtml += \"
\";\r\n\r\n\t\t\thtml += \"
\" + scheduler.locale.labels[buttons[i]] + \"
\";\r\n\t\t}\r\n\t\thtml += \"\";\r\n\t\thtml+=\"\";\r\n\t\td.innerHTML=html;\r\n\t\tif (scheduler.config.drag_lightbox){\r\n\t\t\tscheduler.event(d.firstChild, \"mousedown\", scheduler._ready_to_dnd);\r\n\t\t\tscheduler.event(d.firstChild, \"selectstart\", function(e){ \r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn false; \r\n\t\t\t});\r\n\t\t\td.firstChild.style.cursor = \"move\";\r\n\t\t\tscheduler._init_dnd_events();\r\n\r\n\t\t}\r\n\r\n\t\tthis._waiAria.lightboxAttr(d);\r\n\r\n\t\tthis.show_cover();\r\n\t\tthis._cover.insertBefore(d,this._cover.firstChild);\r\n\t\t\r\n\t\tthis._lightbox=d;\r\n\r\n\t\tvar sns=this.config.lightbox.sections;\r\n\t\thtml=\"\";\r\n\t\tfor (var i=0; i < sns.length; i++) {\r\n\t\t\tvar block=this.form_blocks[sns[i].type];\r\n\t\t\tif (!block) continue; //ignore incorrect blocks\r\n\t\t\tsns[i].id=\"area_\"+this.uid();\r\n\t\t\tvar button = \"\";\r\n\t\t\tif (sns[i].button){\r\n\t\t\t\tvar ariaAttr = scheduler._waiAria.lightboxSectionButtonAttrString(this.locale.labels[\"button_\"+sns[i].button]);\r\n\t\t\t\tbutton = \"
\"+this.locale.labels[\"button_\"+sns[i].button]+\"
\";\r\n\t\t\t}\r\n\r\n\t\t\tif (this.config.wide_form){\r\n\t\t\t\thtml+=\"
\";\r\n\t\t\t}\r\n\r\n\t\t\tvar label_name = this.locale.labels[\"section_\"+sns[i].name];\r\n\t\t\tif(typeof label_name !== \"string\"){\r\n\t\t\t\tlabel_name = sns[i].name;\r\n\t\t\t}\r\n\t\t\thtml+=\"
\"+button+ \"
\"+block.render.call(this,sns[i]);\r\n\t\t\thtml+=\"
\";\r\n\t\t}\r\n\r\n\t\tvar ds=d.getElementsByTagName(\"div\");\r\n\t\tfor (var i=0; i
 \r\n
\r\n
\r\n\r\n
`;\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._init_touch_events = function(){\r\n\tvar mobile = this.config.touch &&\r\n\t\t( ((navigator.userAgent.indexOf(\"Mobile\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"iPad\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"Android\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"Touch\")!=-1)) && !window.MSStream) ||\r\n\t\t\t((navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1));\r\n\r\n\tif(mobile){\r\n\t\tthis.xy.scroll_width = 0;\r\n\t\tthis._mobile = true;\r\n\t}\r\n\r\n\tif(this.config.touch){\r\n\r\n\t\tvar touchEventsSupported = true;\r\n\t\ttry {\r\n\t\t\tdocument.createEvent(\"TouchEvent\");\r\n\t\t} catch (e) {\r\n\t\t\ttouchEventsSupported = false;\r\n\t\t}\r\n\r\n\t\tif (touchEventsSupported) {\r\n\t\t\tthis._touch_events([\"touchmove\", \"touchstart\", \"touchend\"], function (ev) {\r\n\t\t\t\tif (ev.touches && ev.touches.length > 1) return null;\r\n\t\t\t\tif (ev.touches[0])\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\ttarget: ev.target,\r\n\t\t\t\t\t\tpageX: ev.touches[0].pageX,\r\n\t\t\t\t\t\tpageY: ev.touches[0].pageY,\r\n\t\t\t\t\t\tclientX: ev.touches[0].clientX,\r\n\t\t\t\t\t\tclientY: ev.touches[0].clientY\r\n\t\t\t\t\t};\r\n\t\t\t\telse\r\n\t\t\t\t\treturn ev;\r\n\t\t\t}, function () {\r\n\t\t\t\treturn false;\r\n\t\t\t});\r\n\t\t} else if (window.PointerEvent || window.navigator.pointerEnabled) {\r\n\t\t\tthis._touch_events([\"pointermove\", \"pointerdown\", \"pointerup\"], function (ev) {\r\n\t\t\t\tif (ev.pointerType == \"mouse\") return null;\r\n\t\t\t\treturn ev;\r\n\t\t\t}, function (ev) {\r\n\t\t\t\treturn (!ev || (ev.pointerType == \"mouse\" ));\r\n\t\t\t});\r\n\t\t} else if (window.navigator.msPointerEnabled) {\r\n\t\t\tthis._touch_events([\"MSPointerMove\", \"MSPointerDown\", \"MSPointerUp\"], function (ev) {\r\n\t\t\t\tif (ev.pointerType == ev.MSPOINTER_TYPE_MOUSE) return null;\r\n\t\t\t\treturn ev;\r\n\t\t\t}, function (ev) {\r\n\t\t\t\treturn (!ev || ev.pointerType == ev.MSPOINTER_TYPE_MOUSE);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n};\r\n\r\nscheduler._touch_events = function(names, accessor, ignore){\r\n\t//webkit on android need to be handled separately\r\n\t//var a_webkit = (navigator.userAgent.indexOf(\"Android\")!=-1) && (navigator.userAgent.indexOf(\"WebKit\")!=-1);\r\n\tvar source, tracker, timer, drag_mode, scroll_mode, action_mode;\r\n\tvar dblclicktime = 0;\r\n\r\n\tfunction attachTouchEvent(element, name, callback){\r\n\t\t//touch gestures must be disabled when ligthbox is opened\r\n\t\tscheduler.event(element, name, function(e){\r\n\t\t\tif(scheduler._is_lightbox_open()){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tif (ignore(e)) return;\r\n\t\t\t\treturn callback(e);\r\n\t\t\t}\r\n\t\t}, { passive: false });\r\n\t}\r\n\r\n\tfunction check_direction_swipe(s_ev, e_ev, step, max_dy){\r\n\t\tif (!s_ev || !e_ev) return false;\r\n\r\n\t\tvar t = s_ev.target;\r\n\t\twhile(t && t != scheduler._obj){\r\n\t\t\tt = t.parentNode;\r\n\t\t}\r\n\t\tif(t != scheduler._obj){\r\n\t\t\t//swipe outside scheduler\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// ignore swipe in horizontal timeline\r\n\t\tif(scheduler.matrix && scheduler.matrix[scheduler.getState().mode]){\r\n\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\tif(timeline.scrollable){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar dy = Math.abs(s_ev.pageY - e_ev.pageY);\r\n\t\tvar dx = Math.abs(s_ev.pageX - e_ev.pageX);\r\n\t\tif (dy < max_dy && dx>step && (!dy || (dx/dy > 3))){\r\n\t\t\tif (s_ev.pageX > e_ev.pageX) {\r\n\t\t\t\tscheduler._click.dhx_cal_next_button();\r\n\t\t\t}else {\r\n\t\t\t\tscheduler._click.dhx_cal_prev_button();\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n\tfunction doMouseMove(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tvar dnd = scheduler.getState().drag_mode,\r\n\t\t\ttimeline = scheduler.matrix ? scheduler.matrix[scheduler._mode] : false;\r\n\r\n\t\tvar original_render = scheduler.render_view_data;\r\n\t\tif(dnd == 'create' && timeline){\r\n\t\t\t//suppress full redraw of timeline on creating event\r\n\t\t\tscheduler.render_view_data = function() {\r\n\t\t\t\tvar id = scheduler.getState().drag_id;\r\n\t\t\t\tvar ev = scheduler.getEvent(id);\r\n\t\t\t\tvar property = timeline.y_property;\r\n\r\n\t\t\t\tvar evs = scheduler.getEvents(ev.start_date, ev.end_date);\r\n\t\t\t\tfor(var i = 0; i < evs.length; i++){\r\n\t\t\t\t\tif(evs[i][property] != ev[property]){\r\n\t\t\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tev._sorder = evs.length - 1;\r\n\t\t\t\tev._count = evs.length;\r\n\r\n\t\t\t\tthis.render_data([ev], scheduler.getState().mode);\r\n\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\tscheduler._on_mouse_move(e);\r\n\r\n\t\tif(dnd == 'create' && timeline){\r\n\t\t\tscheduler.render_view_data = original_render;\r\n\t\t}\r\n\r\n\t\tif (e.preventDefault)\r\n\t\t\te.preventDefault();\r\n\t\te.cancelBubble = true;\r\n\t\treturn false;\r\n\t}\r\n\r\n\t// touchmove\r\n\tattachTouchEvent(document.body, names[0], function(e){\r\n\t\tif (ignore(e)) return;\r\n\r\n\t\tvar acc = accessor(e);\r\n\t\tif(!acc) return;\r\n\t\tif (drag_mode){\r\n\t\t\tdoMouseMove(acc);\r\n\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._update_global_tip();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//if (tracker && a_webkit){\r\n\t\t//\tcheck_direction_swipe(tracker, accessor(e), 0);\r\n\t\t//}\r\n\r\n\t\ttracker = accessor(e);\r\n\t\t//ignore common and scrolling moves\r\n\t\tif (!action_mode) return;\r\n\r\n\t\t//multitouch\r\n\t\tif (!tracker){\r\n\t\t\tscroll_mode = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//target changed - probably in scroll mode\r\n\r\n\t\tif (source.target != tracker.target || (Math.abs(source.pageX - tracker.pageX) > 5) || (Math.abs(source.pageY - tracker.pageY) > 5)){\r\n\t\t\tscroll_mode = true;\r\n\t\t\tclearTimeout(timer);\r\n\t\t}\r\n\r\n\t});\r\n\r\n\t//attachTouchEvent(this._els[\"dhx_cal_data\"][0], \"scroll\", drag_cancel);\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], \"touchcancel\", drag_cancel);\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], \"contextmenu\", function(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tif (action_mode){\r\n\t\t\tif (e && e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t});\r\n\r\n\t// touchstart\r\n\tattachTouchEvent(this._obj, names[1], function(e){\r\n\t\t// block pull-to-refresh\r\n\t\tif(document && document.body){\r\n\t\t\tdocument.body.classList.add(\"dhx_cal_touch_active\");\r\n\t\t}\r\n\r\n\t\tif (ignore(e)) return;\r\n\t\tscheduler._pointerDragId = e.pointerId;\r\n\r\n\t\tvar fake_event;\r\n\t\tdrag_mode = scroll_mode = false;\r\n\t\taction_mode = true;\r\n\t\tfake_event = tracker = accessor(e);\r\n\r\n\t\tif (!fake_event){\r\n\t\t\tscroll_mode = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//dbl click\r\n\t\tvar now = new Date();\r\n\r\n\t\tif (!scroll_mode && !drag_mode && now - dblclicktime < 250){\r\n\t\t\tscheduler._click.dhx_cal_data(fake_event);\r\n\t\t\twindow.setTimeout(function(){\r\n\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t//fake_event.type = \"dblclick\";\r\n\t\t\t\tscheduler._on_dbl_click(fake_event);\r\n\t\t\t}, 50);\r\n\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._block_next_stop = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tdblclicktime = now;\r\n\r\n\t\t//drag\r\n\r\n\t\tif (scroll_mode || drag_mode || !scheduler.config.touch_drag)\r\n\t\t\treturn;\r\n\r\n\t\tvar actTask = scheduler._locate_event(document.activeElement);\r\n\t\tvar fakeTask = scheduler._locate_event(fake_event.target);\r\n\t\tvar sourceTask = source? scheduler._locate_event(source.target) : null;\r\n\r\n\t\tif(actTask && fakeTask && actTask == fakeTask && actTask != sourceTask)\r\n\t\t{\r\n\t\t\tif(e.preventDefault) {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\tscheduler._click.dhx_cal_data(fake_event);\r\n\t\t\tsource = fake_event;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//there is no target\r\n\t\ttimer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tdrag_mode = true;\r\n\t\t\tvar target = source.target;\r\n\t\t\tvar className = scheduler._getClassName(target);\r\n\t\t\tif (target && className.indexOf(\"dhx_body\") != -1)\r\n\t\t\t\ttarget = target.previousSibling;\r\n\r\n\t\t\tscheduler._on_mouse_down(source, target);\r\n\t\t\tif (scheduler._drag_mode && scheduler._drag_mode != \"create\"){\r\n\t\t\t\tscheduler.for_rendered(scheduler._drag_id, function(node, i) {\r\n\t\t\t\t\tnode.style.display='none';\r\n\t\t\t\t\tscheduler._rendered.splice(i, 1);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif (scheduler.config.touch_tip) {\r\n\t\t\t\tscheduler._show_global_tip();\r\n\t\t\t}\r\n\t\t\tscheduler.updateEvent(scheduler._drag_id);\r\n\t\t},scheduler.config.touch_drag);\r\n\r\n\t\tsource = fake_event;\r\n\t});\r\n\tfunction drag_cancel(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tscheduler._hide_global_tip();\r\n\t\tif (drag_mode){\r\n\t\t\tscheduler._on_mouse_up( accessor(e) );\r\n\t\t\tscheduler._temp_touch_block = false;\r\n\t\t}\r\n\t\tscheduler._drag_id = null;\r\n\t\tscheduler._drag_mode=null;\r\n\t\tscheduler._drag_pos=null;\r\n\t\tscheduler._pointerDragId = null;\r\n\t\tclearTimeout(timer);\r\n\t\tdrag_mode = action_mode = false;\r\n\t\tscroll_mode = true;\r\n\t}\r\n\r\n\t// touch end\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], names[2], function(e){\r\n\t\tif(document && document.body){\r\n\t\t\tdocument.body.classList.remove(\"dhx_cal_touch_active\");\r\n\t\t}\r\n\r\n\t\tif (ignore(e)) return;\r\n\r\n\t\tif(scheduler.config.touch_swipe_dates){\r\n\t\t\tif (!drag_mode && check_direction_swipe(source, tracker, 200, 100)) {\r\n\t\t\t\tscheduler._block_next_stop = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (drag_mode) {\r\n\t\t\tscheduler._ignore_next_click = true;\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\t}, 100);\r\n\t\t}\r\n\r\n\t\tdrag_cancel(e);\r\n\t\tif (scheduler._block_next_stop){\r\n\t\t\tscheduler._block_next_stop = false;\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler.event(document.body, names[2], drag_cancel);\r\n};\r\n\r\nscheduler._show_global_tip = function(){\r\n\tscheduler._hide_global_tip();\r\n\r\n\tvar toptip = scheduler._global_tip = document.createElement(\"div\");\r\n\ttoptip.className='dhx_global_tip';\r\n\r\n\tscheduler._update_global_tip(1);\r\n\r\n\tdocument.body.appendChild(toptip);\r\n};\r\nscheduler._update_global_tip = function(init){\r\n\tvar toptip = scheduler._global_tip;\r\n\tif (toptip){\r\n\t\tvar time = \"\";\r\n\t\tif (scheduler._drag_id && !init){\r\n\t\t\tvar ev = scheduler.getEvent(scheduler._drag_id);\r\n\t\t\tif (ev)\r\n\t\t\t\ttime = \"
\" + (ev._timed ? scheduler.templates.event_header(ev.start_date, ev.end_date, ev):scheduler.templates.day_date(ev.start_date, ev.end_date, ev)) + \"
\";\r\n\t\t}\r\n\r\n\t\tif (scheduler._drag_mode == \"create\" || scheduler._drag_mode == \"new-size\")\r\n\t\t\ttoptip.innerHTML = (scheduler.locale.labels.drag_to_create || \"Drag to create\")+time;\r\n\t\telse\r\n\t\t\ttoptip.innerHTML = (scheduler.locale.labels.drag_to_move || \"Drag to move\")+time;\r\n\t}\r\n};\r\nscheduler._hide_global_tip = function(){\r\n\tvar toptip = scheduler._global_tip;\r\n\tif (toptip && toptip.parentNode){\r\n\t\ttoptip.parentNode.removeChild(toptip);\r\n\t\tscheduler._global_tip = 0;\r\n\t}\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler.getRootView = function() {\r\n\treturn {\r\n\t\tview: {\r\n\t\t\trender: function(){\r\n\t\t\t\treturn {\r\n\t\t\t\t\ttag: \"div\",\r\n\t\t\t\t\ttype: 1,\r\n\t\t\t\t\tattrs: {\r\n\t\t\t\t\t\tstyle: \"width:100%;height:100%;\"\r\n\t\t\t\t\t},\r\n\t\t\t\t\thooks: {\r\n\t\t\t\t\t\t\"didInsert\": function(){\r\n\t\t\t\t\t\t\tscheduler.setCurrentView();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tbody: [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tel: this.el,\r\n\t\t\t\t\t\t\ttype: 1\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t};\r\n\t\t\t},\r\n\t\t\tinit: function(){\r\n\t\t\t\tvar container = document.createElement(\"DIV\");\r\n\t\t\t\tcontainer.id = \"scheduler_\"+ scheduler.uid();\r\n\t\t\t\tcontainer.style.width = \"100%\";\r\n\t\t\t\tcontainer.style.height = \"100%\";\r\n\t\t\t\tcontainer.classList.add(\"dhx_cal_container\");\r\n\t\t\t\tcontainer.cmp = \"grid\";\r\n\t\t\t\tcontainer.innerHTML = '
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
';\r\n\t\t\t\tscheduler.init(container);\r\n\r\n\t\t\t\tthis.el = container;\r\n\t\t\t}\r\n\t\t},\r\n\t\ttype: 4\r\n\t};\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._addThemeClass = function(){\r\n\tdocument.documentElement.setAttribute(\"data-scheduler-theme\", scheduler.skin);\r\n};\r\n\r\nscheduler._skin_settings = {\r\n\tfix_tab_position: [1,0],\r\n\tuse_select_menu_space: [1,0],\r\n\twide_form: [1,0],\r\n\r\n\thour_size_px: [44,42],\r\n\tdisplayed_event_color: [\"#ff4a4a\", \"ffc5ab\"],\r\n\tdisplayed_event_text_color: [\"#ffef80\", \"7e2727\"]\r\n};\r\n\r\nscheduler._skin_xy = {\r\n\tlightbox_additional_height: [90,50],\r\n\tnav_height: [59,22],\r\n\tbar_height: [24,20]\r\n};\r\n\r\n// material skin uses a different box sizing model than other skins, and also requires some post-processing.\r\n// In order to render events correctly, we need to know which box sizing model is used\r\n// We can detect it by styles applied, taking into account that styles may be loaded after scheduler is rendered\r\n\r\nscheduler._is_material_skin = function(){\r\n\tif(!scheduler.skin){\r\n\t\treturn checkIfMaterialSkin();\r\n\t}else{\r\n\t\treturn ((scheduler.skin + \"\").indexOf(\"material\") > -1);\r\n\t}\r\n};\r\n\r\nfunction themeNameFromFile(){\r\n\tvar links = document.getElementsByTagName(\"link\");\r\n\tfor (var i = 0; i < links.length; i++) {\r\n\t\tvar res = links[i].href.match(\"dhtmlxscheduler_([a-z]+).css\");\r\n\t\tif (res){\r\n\t\t\treturn res[1];\r\n\t\t}\r\n\t}\r\n}\r\n\r\nscheduler._build_skin_info = function() {\r\n\tmonitorThemeChange();\r\n\tconst styles = getComputedStyle(this.$container);\r\n\tconst themeVar = styles.getPropertyValue(\"--dhx-scheduler-theme\");\r\n\r\n\tlet isCssVarTheme = !!themeVar;\r\n\tlet themeName;\r\n\tlet cssValues = {};\r\n\tlet oldMaterialTheme = false;\r\n\r\n\tif(isCssVarTheme){\r\n\t\tthemeName = themeVar;\r\n\t\tfor(let i in scheduler.xy){\r\n\t\t\tcssValues[i] = styles.getPropertyValue(`--dhx-scheduler-xy-${i}`);\r\n\t\t}\r\n\r\n\t\tcssValues.hour_size_px = styles.getPropertyValue(`--dhx-scheduler-config-hour_size_px`);\r\n\t\tcssValues.wide_form = styles.getPropertyValue(`--dhx-scheduler-config-form_wide`);\r\n\r\n\t}else{\r\n\t\tthemeName = themeNameFromFile();\r\n\t\toldMaterialTheme = scheduler._is_material_skin();\r\n\t}\r\n\r\n\r\n\tscheduler._theme_info = {\r\n\t\ttheme: themeName,\r\n\t\tcssVarTheme: isCssVarTheme,\r\n\t\toldMaterialTheme: oldMaterialTheme,\r\n\t\tvalues: cssValues\r\n\t};\r\n\r\n\tif(scheduler._theme_info.cssVarTheme){\r\n\t\tconst themeVariables = this._theme_info.values;\r\n\t\tfor(let i in scheduler.xy){\r\n\t\t\tif(!isNaN(parseInt(themeVariables[i]))){\r\n\t\t\t\tscheduler.xy[i] = parseInt(themeVariables[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\n\r\nvar calculatedMaterial;\r\nfunction checkIfMaterialSkin(){\r\n\tif(calculatedMaterial === undefined){\r\n\t\tvar probe = document.createElement(\"div\");\r\n\t\tprobe.style.position = \"absolute\";\r\n\t\tprobe.style.left = \"-9999px\";\r\n\t\tprobe.style.top = \"-9999px\";\r\n\t\tprobe.innerHTML = \"
\" +\r\n\t\t\t\"
\" +\r\n\t\t\t\"
\"+\r\n\t\t\"
\";\r\n\t\tdocument.body.appendChild(probe);\r\n\t\tvar styles = window.getComputedStyle(probe.querySelector(\".dhx_cal_scale_placeholder\"));\r\n\t\tvar position = styles.getPropertyValue('position');\r\n\t\tif(position === \"absolute\"){\r\n\t\t\t// page has skins for placeholder element from material skin\r\n\t\t\tcalculatedMaterial = true;\r\n\t\t}else{\r\n\t\t\tcalculatedMaterial = false;\r\n\t\t}\r\n\r\n\t\tsetTimeout(function(){\r\n\t\t\tcalculatedMaterial = null;\r\n\t\t\tif(probe && probe.parentNode){\r\n\t\t\t\tprobe.parentNode.removeChild(probe);\r\n\t\t\t}\r\n\t\t}, 500);\r\n\t}\r\n\treturn calculatedMaterial;\r\n}\r\n\r\nvar cachedBorderBoxValue;\r\nfunction checkIfBorderBoxStyling(){\r\n\tif(scheduler._is_material_skin()){\r\n\t\treturn true;\r\n\t}else{\r\n\t\tif(cachedBorderBoxValue === undefined){\r\n\t\t\tvar probe = document.createElement(\"div\");\r\n\t\t\tprobe.style.position = \"absolute\";\r\n\t\t\tprobe.style.left = \"-9999px\";\r\n\t\t\tprobe.style.top = \"-9999px\";\r\n\t\t\tprobe.innerHTML = \"
\" +\r\n\t\t\t\t\"
\" +\r\n\t\t\t\t\t\"
\"+\r\n\t\t\t\t\"
\"+\r\n\t\t\t\"
\";\r\n\r\n\t\t\tdocument.body.appendChild(probe);\r\n\t\t\tvar styles = window.getComputedStyle(probe.querySelector(\".dhx_body\"));\r\n\t\t\tvar boxSizing = styles.getPropertyValue('box-sizing');\r\n\t\t\tdocument.body.removeChild(probe);\r\n\t\t\tcachedBorderBoxValue = !!(boxSizing === \"border-box\");\r\n\r\n\t\t\tif(!cachedBorderBoxValue){\r\n\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\tcachedBorderBoxValue = undefined;\r\n\t\t\t\t}, 1000);// recalculate in case scheduler initialized before skin is loaded\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\treturn cachedBorderBoxValue;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction refreshAfterLoad(){\r\n\tif(scheduler._is_material_skin() || scheduler._border_box_events()){\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar oldStyling = cachedBorderBoxValue;\r\n\tcachedBorderBoxValue = undefined;\r\n\tcalculatedMaterial = undefined;\r\n\tvar newStyling = checkIfBorderBoxStyling();\r\n\r\n\t// if box styling model changed - means scheduler was rendered before stylesheet was loaded or parsed inline\r\n\t// repaint scheduler in order to apply new styles\r\n\tif(oldStyling !== newStyling && scheduler.$container && scheduler.getState().mode){\r\n\t\tscheduler.setCurrentView();\r\n\t}\r\n}\r\nscheduler.event(window, 'DOMContentLoaded', refreshAfterLoad);\r\nscheduler.event(window, 'load', refreshAfterLoad);\r\n\r\nscheduler._border_box_events = function(){\r\n\treturn checkIfBorderBoxStyling();\r\n};\r\n\r\nscheduler._configure = function(col, data, skin){\r\n\tfor (var key in data)\r\n\t\tif (typeof col[key] == \"undefined\")\r\n\t\t\tcol[key] = data[key][skin];\r\n};\r\n\r\nscheduler.setSkin = function(value){\r\n\tthis.skin = value;\r\n\tscheduler._addThemeClass();\r\n\tif(scheduler.$container){\r\n\t\tthis._skin_init();\r\n\t\tthis.render();\r\n\t}\r\n\t\r\n\t//\r\n};\r\n\r\nfunction flatSkinHourScale(date){\r\n\tvar min = date.getMinutes();\r\n\tmin = min < 10 ? \"0\"+min : min;\r\n\tvar html = \"\"+ date.getHours() +\"\"+\r\n\t\t\" \"+ min +\"\";\r\n\treturn html;\r\n}\r\n\r\nlet monitorIntervalId = null;\r\nfunction monitorThemeChange(){\r\n\tconst container = scheduler.$container;\r\n\t\r\n\tclearInterval(monitorIntervalId);\r\n\tif(container){\r\n\t\tmonitorIntervalId = setInterval(() => {\r\n\t\t\tconst csstheme = getComputedStyle(container).getPropertyValue('--dhx-scheduler-theme');\r\n\t\t\tif(csstheme && csstheme !== scheduler.skin){\r\n\t\t\t\tscheduler.setSkin(csstheme);\r\n\t\t\t}\r\n\r\n\t\t}, 100);\r\n\t}\r\n}\r\nscheduler.attachEvent(\"onDestroy\", function(){\r\n\tclearInterval(monitorIntervalId);\r\n});\r\n\r\nscheduler._skin_init = function(){\r\n\tthis._build_skin_info();\r\n\r\n\tif (!this.skin){\r\n\t\tthis.skin = this._theme_info.theme;\r\n\t}\r\n\tscheduler._addThemeClass();\r\n\tif (scheduler.skin === \"flat\"){\r\n\t\t// scheduler.xy.scale_height = 35;\r\n\t\tscheduler.templates.hour_scale = flatSkinHourScale;\r\n\t}else if (scheduler.templates.hour_scale === flatSkinHourScale){\r\n\t\tscheduler.templates.hour_scale = scheduler.date.date_to_str(scheduler.config.hour_date);\r\n\t}\r\n\r\n\r\n\r\n\t//scheduler._lightbox_template=\"
 
\";\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\r\n\t\tvar date_to_str = scheduler.date.date_to_str(\"%d\");\r\n\t\tif(!scheduler.templates._old_month_day){\r\n\t\t\tscheduler.templates._old_month_day = scheduler.templates.month_day;\r\n\t\t}\r\n\t\tvar old_month_day = scheduler.templates._old_month_day;\r\n\t\tscheduler.templates.month_day = function(date) {\r\n\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\tvar label = date_to_str(date);\r\n\t\t\t\tif (date.getDate() == 1) {\r\n\t\t\t\t\tlabel = scheduler.locale.date.month_full[date.getMonth()] + \" \" + label;\r\n\t\t\t\t}\r\n\t\t\t\tif (+date == +scheduler.date.date_part(this._currentDate())) {\r\n\t\t\t\t\tlabel = scheduler.locale.labels.dhx_cal_today_button + \" \" + label;\r\n\t\t\t\t}\r\n\t\t\t\treturn label;\r\n\t\t\t} else {\r\n\t\t\t\treturn old_month_day.call(this, date);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t// tab classes\r\n\t\tif(scheduler.config.fix_tab_position){\r\n\t\t\tconst tabs = scheduler._els[\"dhx_cal_navline\"][0].querySelectorAll('[data-tab]');\r\n\t\t\ttabs.forEach((tab) => {\r\n\t\t\t\tconst view = tab.getAttribute(\"data-tab\") || tab.getAttribute(\"name\");\r\n\r\n\t\t\t\tswitch (view) {\r\n\t\t\t\t\tcase \"day\":\r\n\t\t\t\t\tcase \"day_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_first\");\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"week\":\r\n\t\t\t\t\tcase \"week_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"month\":\r\n\t\t\t\t\tcase \"month_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_last\");\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_standalone\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\treorderTabs(scheduler._els[\"dhx_cal_navline\"][0]);\r\n\r\n\t\t}\r\n\t}, {once: true});\r\n\r\n\tfunction reorderTabs(container) {\r\n\t\t// segmented tabs should go first\r\n\r\n\t\tif(scheduler.config.header){\r\n\t\t\treturn;\r\n\t\t\t// don't reorder tabs if header is defined via config\r\n\t\t}\r\n\t\tconst tabs = Array.from(container.querySelectorAll('.dhx_cal_tab'));\r\n\t\r\n\t\t// segmented tabs\r\n\t\tconst order = ['day', 'week', 'month'];\r\n\t\r\n\t\tconst specialTabs = order.map(tabName => \r\n\t\t\ttabs.find(tab => tab.getAttribute('data-tab') === tabName)\r\n\t\t).filter(tab => tab !== undefined);\r\n\t\r\n\t\tlet firstTab = tabs.length > 0 ? tabs[0] : null;\r\n\r\n\t\tspecialTabs.reverse().forEach(tab => {\r\n\t\t\tcontainer.insertBefore(tab, firstTab);\r\n\t\t\tfirstTab = tab;\r\n\t\t});\r\n\t}\r\n\r\n\t// scheduler._skin_init = function(){\r\n\t// \tthis._build_skin_info();\r\n\t// \tthis.skin = this._theme_info.theme;\r\n\t// };\r\n};\r\n\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nif (window.jQuery){\r\n\r\n(function( $ ){\r\n\tvar counter = 0;\r\n\tvar methods = [];\r\n\t$.fn.dhx_scheduler = function(config){\r\n\t\tif (typeof(config) === 'string') {\r\n\t\t\tif (methods[config] ) {\r\n\t\t\t\treturn methods[config].apply(this, []);\r\n\t\t\t}else {\r\n\t\t\t\t$.error('Method ' + config + ' does not exist on jQuery.dhx_scheduler');\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tvar views = [];\r\n\t\t\tthis.each(function() {\r\n\t\t\t\tif (this && this.getAttribute){\r\n\t\t\t\t\tif (!this.getAttribute(\"dhxscheduler\")){\r\n\t\t\t\t\t\tvar name = \"scheduler\";\r\n\t\t\t\t\t\tif (counter){\r\n\t\t\t\t\t\t\tname = \"scheduler\" + (counter+1);\r\n\t\t\t\t\t\t\twindow[name] = Scheduler.getSchedulerInstance();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tvar comp = window[name];\r\n\r\n\t\t\t\t\t\tthis.setAttribute(\"dhxscheduler\", name);\r\n\t\t\t\t\t\tfor (var key in config)\r\n\t\t\t\t\t\t\tif (key!=\"data\")\r\n\t\t\t\t\t\t\t\tcomp.config[key] = config[key];\r\n\r\n\t\t\t\t\t\tif (!this.getElementsByTagName(\"div\").length){\r\n\t\t\t\t\t\t\tthis.innerHTML = '
';\r\n\t\t\t\t\t\t\tthis.className += \" dhx_cal_container\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcomp.init(this, comp.config.date, comp.config.mode);\r\n\t\t\t\t\t\tif (config.data)\r\n\t\t\t\t\t\t\tcomp.parse(config.data);\r\n\r\n\t\t\t\t\t\tviews.push(comp);\r\n\t\t\t\t\t\tcounter++;\r\n\t\t\t\t\t} else\r\n\t\t\t\t\t\tviews.push(window[this.getAttribute(\"dhxscheduler\")]);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif (views.length === 1) return views[0];\r\n\t\t\treturn views;\r\n\t\t}\r\n\t};\r\n\r\n\r\n\r\n\r\n})(window.jQuery);\r\n\r\n}\r\n\r\n}","import global from \"../global\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\n(function(){\r\n\r\n\tvar setCurrentView = scheduler.setCurrentView,\r\n\t\tupdateView = scheduler.updateView;\r\n\tvar update_view_timer = null,\r\n\t\tcurr_view_timer = null;\r\n\r\n\tvar lazy_setCurrentView = function(date, mode){\r\n\t\tvar self = this;\r\n\t\tglobal.clearTimeout(curr_view_timer);\r\n\t\tglobal.clearTimeout(update_view_timer);\r\n\r\n\t\tvar oldDate = self._date,\r\n\t\t\toldMode = self._mode;\r\n\t\tupdateFlags(this, date, mode);\r\n\r\n\t\tcurr_view_timer = setTimeout(function(){\r\n\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif (!self.callEvent(\"onBeforeViewChange\", [oldMode, oldDate, mode || self._mode, date || self._date])){\r\n\t\t\t\tupdateFlags(self, oldDate, oldMode);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tupdateView.call(self, date, mode);\r\n\t\t\tself.callEvent(\"onViewChange\", [self._mode, self._date]);\r\n\r\n\t\t\tglobal.clearTimeout(update_view_timer);\r\n\t\t\tcurr_view_timer = 0;\r\n\t\t}, scheduler.config.delay_render);\r\n\t};\r\n\tvar lazy_updateView = function(date, mode){\r\n\t\tvar self = this,\r\n\t\t\tars = arguments;\r\n\r\n\t\tupdateFlags(this, date, mode);\r\n\r\n\t\tglobal.clearTimeout(update_view_timer);\r\n\t\tupdate_view_timer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif(curr_view_timer)\r\n\t\t\t\treturn;\r\n\r\n\t\t\tupdateView.apply(self, ars);\r\n\t\t}, scheduler.config.delay_render);\r\n\t};\r\n\tfunction updateFlags(scheduler, date, mode){\r\n\t\tif(date)\r\n\t\t\tscheduler._date = date;\r\n\t\tif(mode)\r\n\t\t\tscheduler._mode = mode;\r\n\r\n\t}\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\tif(scheduler.config.delay_render){\r\n\t\t\tscheduler.setCurrentView = lazy_setCurrentView;\r\n\t\t\tscheduler.updateView = lazy_updateView;\r\n\t\t}else{\r\n\t\t\tscheduler.setCurrentView = setCurrentView;\r\n\t\t\tscheduler.updateView = updateView;\r\n\t\t}\r\n\t});\r\n\r\n})();\r\n\r\n}","export default function DataProcessorEvents(scheduler, dp){\r\n\tthis.$scheduler = scheduler;\r\n\tthis.$dp = dp;\r\n\tthis._dataProcessorHandlers = [];\r\n\r\n\tthis.attach = function () {\r\n\t\tvar dp = this.$dp;\r\n\t\tvar scheduler = this.$scheduler;\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onEventAdded\", function(id) {\r\n\t\t\tif (!this._loading && this._validId(id))\r\n\t\t\tdp.setUpdated(id,true,\"inserted\");\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onConfirmedBeforeEventDelete\", function(id) {\r\n\t\t\tif (!this._validId(id)) return;\r\n\t\t\tvar z=dp.getState(id);\r\n\r\n\t\t\tif (z==\"inserted\" || this._new_event) { dp.setUpdated(id,false); return true; }\r\n\t\t\tif (z==\"deleted\") return false;\r\n\t\t\tif (z==\"true_deleted\") return true;\r\n\r\n\t\t\tdp.setUpdated(id,true,\"deleted\");\r\n\t\t\treturn false;\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onEventChanged\", function(id) { \r\n\t\t\tif (!this._loading && this._validId(id))\r\n\t\t\tdp.setUpdated(id,true,\"updated\");\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onClearAll\", function() { \r\n\t\t\t// clear dataprocessor state when scheduler is reset\r\n\t\t\tdp._in_progress={};\r\n\t\t\tdp._invalid={};\r\n\t\t\tdp.updatedRows = [];\r\n\t\t\tdp._waitMode = 0;\r\n\t\t}));\r\n\r\n\t\tdp.attachEvent(\"insertCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"updateCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"deleteCallback\", function(upd, id) {\r\n\t\t\tif (scheduler.getEvent(id)){\r\n\t\t\t\tscheduler.setUserData(id, this.action_param, \"true_deleted\");\r\n\t\t\t\tscheduler.deleteEvent(id);\r\n\t\t\t} else if (scheduler._add_rec_marker)\r\n\t\t\t\tscheduler._update_callback(upd, id);\r\n\t\t});\r\n\t};\r\n\r\n\tthis.detach = function () {\r\n\t\tfor (var key in this._dataProcessorHandlers) {\r\n\t\t\tvar handler = this._dataProcessorHandlers[key];\r\n\t\t\tthis.$scheduler.detachEvent(handler);\r\n\t\t}\r\n\t\tthis._dataProcessorHandlers = [];\r\n\t};\r\n}\r\n\r\nexport function extendScheduler(scheduler, dp){\r\n\tscheduler._validId=function(id){\r\n\t\tif(this._is_virtual_event){\r\n\t\t\treturn !this._is_virtual_event(id);\r\n\t\t}\r\n\t\treturn true;\r\n\t};\r\n\tscheduler.setUserData=function(id,name,value){\r\n\t\tif (id){\r\n\t\t\tvar ev = this.getEvent(id);\r\n\t\t\tif(ev) ev[name]=value;\r\n\t\t}else{\r\n\t\t\tthis._userdata[name]=value;\r\n\t\t}\r\n\t};\r\n\tscheduler.getUserData=function(id,name){\r\n\t\tif (id){\r\n\t\t\tvar ev = this.getEvent(id);\r\n\t\t\tif(ev)\r\n\t\t\t\treturn ev[name];\r\n\t\t\telse\r\n\t\t\t\treturn null;\r\n\t\t}else{\r\n\t\t\treturn this._userdata[name];\r\n\t\t}\r\n\t};\r\n\tscheduler._set_event_text_style=function(id,style){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\t\tthis.for_rendered(id,function(r){\r\n\t\t\tr.style.cssText+=\";\"+style;\r\n\t\t});\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tev[\"_text_style\"]=style;\r\n\t\tthis.event_updated(ev);\r\n\t};\r\n\tscheduler._update_callback = function(upd,id){\r\n\t\tvar data = scheduler._xmlNodeToJSON(upd.firstChild);\r\n\t\t//fix for updates of recurring events\r\n\t\tif (data.rec_type == \"none\") data.rec_pattern = \"none\";\r\n\t\tdata.text = data.text||data._tagvalue;\r\n\t\tdata.start_date = scheduler._helpers.parseDate(data.start_date);\r\n\t\tdata.end_date = scheduler._helpers.parseDate(data.end_date);\r\n\t\tscheduler.addEvent(data);\r\n\t\tif (scheduler._add_rec_marker)\r\n\t\t\tscheduler.setCurrentView();\r\n\t};\r\n\tscheduler._dp_change_event_id = function(id, new_id){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\t\tscheduler.changeEventId(id, new_id);\r\n\t};\r\n\tscheduler._dp_hook_delete = function(id, new_id){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\r\n\t\tif(new_id && id != new_id){\r\n\t\t\tif(this.getUserData(id, dp.action_param) == \"true_deleted\")\r\n\t\t\t\tthis.setUserData(id, dp.action_param, \"updated\");\r\n\r\n\t\t\tthis.changeEventId(id, new_id);\r\n\t\t}\r\n\t\treturn this.deleteEvent(new_id, true);\r\n\t};\r\n\r\n\tscheduler.setDp = function() {\r\n\t\tthis._dp = dp;\r\n\t};\r\n\tscheduler.setDp();\r\n}","import DataProcessorEvents from \"./dataprocessor_hooks\";\r\nimport { extendScheduler } from \"./dataprocessor_hooks\";\r\nimport eventable from \"../../utils/eventable\";\r\nimport global from \"../../global\";\r\n\r\n/**\r\n *\t@desc: constructor, data processor object\r\n *\t@param: serverProcessorURL - url used for update\r\n *\t@type: public\r\n */\r\nexport function DataProcessor(serverProcessorURL){\r\n\tthis.serverProcessor = serverProcessorURL;\r\n\tthis.action_param = \"!nativeeditor_status\";\r\n\r\n\tthis.object = null;\r\n\tthis.updatedRows = []; // ids of updated rows\r\n\r\n\tthis.autoUpdate = true;\r\n\tthis.updateMode = \"cell\";\r\n\tthis._tMode = \"GET\";\r\n\tthis._headers = null;\r\n\tthis._payload = null;\r\n\tthis.post_delim = \"_\";\r\n\r\n\tthis._waitMode = 0;\r\n\tthis._in_progress = {};\r\n\tthis._invalid = {};\r\n\tthis.messages = [];\r\n\r\n\tthis.styles = {\r\n\t\tupdated: \"font-weight:bold;\",\r\n\t\tinserted: \"font-weight:bold;\",\r\n\t\tdeleted: \"text-decoration : line-through;\",\r\n\t\tinvalid: \"background-color:FFE0E0;\",\r\n\t\tinvalid_cell: \"border-bottom:2px solid red;\",\r\n\t\terror: \"color:red;\",\r\n\t\tclear: \"font-weight:normal;text-decoration:none;\"\r\n\t};\r\n\tthis.enableUTFencoding(true);\r\n\teventable(this); // TODO: need to update\r\n\r\n\treturn this;\r\n}\r\nDataProcessor.prototype = {\r\n\tsetTransactionMode: function (mode, total) {\r\n\t\tif (typeof mode == \"object\") {\r\n\t\t\tthis._tMode = mode.mode || this._tMode;\r\n\r\n\t\t\tif (mode.headers !== undefined) {\r\n\t\t\t\tthis._headers = mode.headers;\r\n\t\t\t}\r\n\r\n\t\t\tif (mode.payload !== undefined) {\r\n\t\t\t\tthis._payload = mode.payload;\r\n\t\t\t}\r\n\t\t\tthis._tSend = !!total;\r\n\t\t} else {\r\n\t\t\tthis._tMode = mode;\r\n\t\t\tthis._tSend = total;\r\n\t\t}\r\n\r\n\t\tif (this._tMode == \"REST\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t}\r\n\r\n\t\tif (this._tMode === \"JSON\" || this._tMode === \"REST-JSON\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t\tthis._serializeAsJson = true;\r\n\t\t\tthis._headers = this._headers || {};\r\n\t\t\tthis._headers[\"Content-Type\"] = \"application/json\";\r\n\t\t}else{\r\n\t\t\tif(this._headers && !this._headers[\"Content-Type\"]){\r\n\t\t\t\tthis._headers[\"Content-Type\"] = \"application/x-www-form-urlencoded\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (this._tMode === \"CUSTOM\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t\tthis._router = mode.router;\r\n\t\t}\r\n\t},\r\n\tescape: function (data) {\r\n\t\tif (this._utf)\r\n\t\t\treturn encodeURIComponent(data);\r\n\t\telse\r\n\t\t\treturn escape(data);\r\n\t},\r\n\t/**\r\n\t *\t@desc: allows to set escaping mode\r\n\t *\t@param: true - utf based escaping, simple - use current page encoding\r\n\t *\t@type: public\r\n\t */\r\n\tenableUTFencoding: function (mode) {\r\n\t\tthis._utf = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: allows to define, which column may trigger update\r\n\t *\t@param: val - array or list of true/false values\r\n\t *\t@type: public\r\n\t */\r\n\tsetDataColumns: function (val) {\r\n\t\tthis._columns = (typeof val == \"string\") ? val.split(\",\") : val;\r\n\t},\r\n\t/**\r\n\t *\t@desc: get state of updating\r\n\t *\t@returns: true - all in sync with server, false - some items not updated yet.\r\n\t *\t@type: public\r\n\t */\r\n\tgetSyncState: function () {\r\n\t\treturn !this.updatedRows.length;\r\n\t},\r\n\t/**\r\n\t *\t@desc: enable/disable named field for data syncing, will use column ids for grid\r\n\t *\t@param: mode - true/false\r\n\t *\t@type: public\r\n\t */\r\n\tenableDataNames: function (mode) {\r\n\t\tthis._endnm = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: enable/disable mode , when only changed fields and row id send to the server side, instead of all fields in default mode\r\n\t *\t@param: mode - true/false\r\n\t *\t@type: public\r\n\t */\r\n\tenablePartialDataSend: function (mode) {\r\n\t\tthis._changed = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: set if rows should be send to server automatically\r\n\t *\t@param: mode - \"row\" - based on row selection changed, \"cell\" - based on cell editing finished, \"off\" - manual data sending\r\n\t *\t@type: public\r\n\t */\r\n\tsetUpdateMode: function (mode, dnd) {\r\n\t\tthis.autoUpdate = (mode == \"cell\");\r\n\t\tthis.updateMode = mode;\r\n\t\tthis.dnd = dnd;\r\n\t},\r\n\tignore: function (code, master) {\r\n\t\tthis._silent_mode = true;\r\n\t\tcode.call(master || window);\r\n\t\tthis._silent_mode = false;\r\n\t},\r\n\t/**\r\n\t *\t@desc: mark row as updated/normal. check mandatory fields,initiate autoupdate (if turned on)\r\n\t *\t@param: rowId - id of row to set update-status for\r\n\t *\t@param: state - true for \"updated\", false for \"not updated\"\r\n\t *\t@param: mode - update mode name\r\n\t *\t@type: public\r\n\t */\r\n\tsetUpdated: function (rowId, state, mode) {\r\n\t\tif (this._silent_mode) return;\r\n\t\tvar ind = this.findRow(rowId);\r\n\r\n\t\tmode = mode || \"updated\";\r\n\t\tvar existing = this.$scheduler.getUserData(rowId, this.action_param);\r\n\t\tif (existing && mode == \"updated\") mode = existing;\r\n\t\tif (state) {\r\n\t\t\tthis.set_invalid(rowId, false); //clear previous error flag\r\n\t\t\tthis.updatedRows[ind] = rowId;\r\n\t\t\tthis.$scheduler.setUserData(rowId, this.action_param, mode);\r\n\t\t\tif (this._in_progress[rowId])\r\n\t\t\t\tthis._in_progress[rowId] = \"wait\";\r\n\t\t} else {\r\n\t\t\tif (!this.is_invalid(rowId)) {\r\n\t\t\t\tthis.updatedRows.splice(ind, 1);\r\n\t\t\t\tthis.$scheduler.setUserData(rowId, this.action_param, \"\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.markRow(rowId, state, mode);\r\n\t\tif (state && this.autoUpdate) this.sendData(rowId);\r\n\t},\r\n\r\n\tmarkRow: function (id, state, mode) {\r\n\t\tvar str = \"\";\r\n\t\tvar invalid = this.is_invalid(id);\r\n\t\tif (invalid) {\r\n\t\t\tstr = this.styles[invalid];\r\n\t\t\tstate = true;\r\n\t\t}\r\n\t\tif (this.callEvent(\"onRowMark\", [id, state, mode, invalid])) {\r\n\t\t\t//default logic\r\n\t\t\tstr = this.styles[state ? mode : \"clear\"] + str;\r\n\r\n\t\t\tthis.$scheduler[this._methods[0]](id, str);\r\n\r\n\t\t\tif (invalid && invalid.details) {\r\n\t\t\t\tstr += this.styles[invalid + \"_cell\"];\r\n\t\t\t\tfor (var i = 0; i < invalid.details.length; i++)\r\n\t\t\t\t\tif (invalid.details[i])\r\n\t\t\t\t\t\tthis.$scheduler[this._methods[1]](id, i, str);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tgetActionByState: function(state) {\r\n\t\tif (state === \"inserted\") {\r\n\t\t\treturn \"create\";\r\n\t\t}\r\n\t\tif (state === \"updated\") {\r\n\t\t\treturn \"update\";\r\n\t\t}\r\n\t\tif (state === \"deleted\") {\r\n\t\t\treturn \"delete\";\r\n\t\t}\r\n\t\treturn \"update\";\r\n\t},\r\n\r\n\tgetState: function (id) {\r\n\t\treturn this.$scheduler.getUserData(id, this.action_param);\r\n\t},\r\n\tis_invalid: function (id) {\r\n\t\treturn this._invalid[id];\r\n\t},\r\n\tset_invalid: function (id, mode, details) {\r\n\t\tif (details) mode = {\r\n\t\t\tvalue: mode, details: details, toString: function () {\r\n\t\t\t\treturn this.value.toString();\r\n\t\t\t}\r\n\t\t};\r\n\t\tthis._invalid[id] = mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: check mandatory fields and varify values of cells, initiate update (if specified)\r\n\t *\t@param: rowId - id of row to set update-status for\r\n\t *\t@type: public\r\n\t */\r\n\tcheckBeforeUpdate: function (rowId) {\r\n\t\treturn true;\r\n\t},\r\n\t/**\r\n\t *\t@desc: send row(s) values to server\r\n\t *\t@param: rowId - id of row which data to send. If not specified, then all \"updated\" rows will be send\r\n\t *\t@type: public\r\n\t */\r\n\tsendData: function (rowId) {\r\n\t\tif (this.$scheduler.editStop) this.$scheduler.editStop();\r\n\r\n\t\tif (typeof rowId == \"undefined\" || this._tSend) return this.sendAllData();\r\n\t\tif (this._in_progress[rowId]) return false;\r\n\r\n\t\tthis.messages = [];\r\n\t\tif (!this.checkBeforeUpdate(rowId) && this.callEvent(\"onValidationError\", [rowId, this.messages])) return false;\r\n\t\tthis._beforeSendData(this._getRowData(rowId), rowId);\r\n\t},\r\n\t_beforeSendData: function (data, rowId) {\r\n\t\tif (!this.callEvent(\"onBeforeUpdate\", [rowId, this.getState(rowId), data])) return false;\r\n\t\tthis._sendData(data, rowId);\r\n\t},\r\n\tserialize: function (data, id) {\r\n\t\tif (this._serializeAsJson) {\r\n\t\t\treturn this._serializeAsJSON(data);\r\n\t\t}\r\n\r\n\t\tif (typeof data == \"string\")\r\n\t\t\treturn data;\r\n\t\tif (typeof id != \"undefined\")\r\n\t\t\treturn this.serialize_one(data, \"\");\r\n\t\telse {\r\n\t\t\tvar stack = [];\r\n\t\t\tvar keys = [];\r\n\t\t\tfor (var key in data)\r\n\t\t\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\t\t\tstack.push(this.serialize_one(data[key], key + this.post_delim));\r\n\t\t\t\t\tkeys.push(key);\r\n\t\t\t\t}\r\n\t\t\tstack.push(\"ids=\" + this.escape(keys.join(\",\")));\r\n\t\t\tif (this.$scheduler.security_key)\r\n\t\t\t\tstack.push(\"dhx_security=\" + (this.$scheduler.security_key));\r\n\t\t\treturn stack.join(\"&\");\r\n\t\t}\r\n\t},\r\n\tserialize_one: function (data, pref) {\r\n\t\tif (typeof data == \"string\")\r\n\t\t\treturn data;\r\n\t\tvar stack = [];\r\n\t\tvar serialized = \"\";\r\n\t\tfor (var key in data)\r\n\t\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\t\tif ((key == \"id\" || key == this.action_param) && this._tMode == \"REST\") continue;\r\n\t\t\t\tif (typeof data[key] === \"string\" || typeof data[key] === \"number\") {\r\n\t\t\t\t\tserialized = data[key];\r\n\t\t\t\t} else {\r\n\t\t\t\t\tserialized = JSON.stringify(data[key]);\r\n\t\t\t\t}\r\n\t\t\t\tstack.push(this.escape((pref || \"\") + key) + \"=\" + this.escape(serialized));\r\n\t\t\t}\r\n\t\treturn stack.join(\"&\");\r\n\t},\r\n\t_applyPayload: function (url) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tif (this._payload)\r\n\t\t\tfor (var key in this._payload)\r\n\t\t\t\turl = url + ajax.urlSeparator(url) + this.escape(key) + \"=\" + this.escape(this._payload[key]);\r\n\t\treturn url;\r\n\t},\r\n\t_sendData: function (dataToSend, rowId) {\r\n\t\tif (!dataToSend) {\r\n\t\t\treturn; // nothing to send\r\n\t\t}\r\n\t\tif (!this.callEvent(\"onBeforeDataSending\", rowId ? [rowId, this.getState(rowId), dataToSend] : [null, null, dataToSend])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (rowId) {\r\n\t\t\tthis._in_progress[rowId] = (new Date()).valueOf();\r\n\t\t}\r\n\r\n\t\tvar self = this;\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\r\n\t\tif (this._tMode === \"CUSTOM\") {\r\n\t\t\tvar state = this.getState(rowId);\r\n\t\t\tvar action = this.getActionByState(state);\r\n\t\t\tvar _onResolvedCreateUpdate = function (tag) {\r\n\t\t\t\tvar resultState = state;\r\n\t\t\t\tif(tag && tag.responseText && tag.setRequestHeader){\r\n\t\t\t\t\tif(tag.status !== 200){\r\n\t\t\t\t\t\tresultState = \"error\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\ttag = JSON.parse(tag.responseText);\r\n\t\t\t\t\t} catch (e){}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tresultState = resultState || \"updated\";\r\n\t\t\t\tvar sid = rowId;\r\n\t\t\t\tvar tid = rowId;\r\n\r\n\t\t\t\tif (tag) {\r\n\t\t\t\t\tresultState = tag.action || resultState;\r\n\t\t\t\t\tsid = tag.sid || sid;\r\n\t\t\t\t\ttid = tag.id || tag.tid || tid;\r\n\t\t\t\t}\r\n\t\t\t\tself.afterUpdateCallback(sid, tid, resultState, tag);\r\n\t\t\t};\r\n\r\n\t\t\tconst routerMode = \"event\";\r\n\t\t\tvar actionPromise;\r\n\t\t\tif (this._router instanceof Function) {\r\n\t\t\t\tactionPromise = this._router(routerMode, action, dataToSend, rowId);\r\n\t\t\t} else {\r\n\t\t\t\tswitch (state) {\r\n\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].create(dataToSend);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].delete(rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].update(dataToSend, rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(actionPromise){\r\n\t\t\t\t// neither promise nor {tid: newId} response object\r\n\t\t\t\tif(!actionPromise.then &&\r\n\t\t\t\t\t(actionPromise.id === undefined && actionPromise.tid === undefined && actionPromise.action === undefined)){\r\n\t\t\t\t\tthrow new Error(\"Incorrect router return value. A Promise or a response object is expected\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(actionPromise.then){\r\n\t\t\t\t\tactionPromise.then(_onResolvedCreateUpdate).catch(function(error) {\r\n\t\t\t\t\t\tif(error && error.action){\r\n\t\t\t\t\t\t\t_onResolvedCreateUpdate(error);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t_onResolvedCreateUpdate({ action: \"error\", value: error});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// custom method may return a response object in case of sync action\r\n\t\t\t\t\t_onResolvedCreateUpdate(actionPromise);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t_onResolvedCreateUpdate(null);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar queryParams = {\r\n\t\t\tcallback: function(xml) {\r\n\t\t\t\tvar ids = [];\r\n\r\n\t\t\t\tif (rowId) {\r\n\t\t\t\t\tids.push(rowId);\r\n\t\t\t\t} else if (dataToSend) {\r\n\t\t\t\t\tfor (var key in dataToSend) {\r\n\t\t\t\t\t\tids.push(key);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.afterUpdate(self, xml, ids);\r\n\t\t\t},\r\n\t\t\theaders: self._headers\r\n\t\t};\r\n\r\n\t\tvar urlParams = this.serverProcessor + (this._user ? (ajax.urlSeparator(this.serverProcessor) + [\"dhx_user=\" + this._user, \"dhx_version=\" + this.$scheduler.getUserData(0, \"version\")].join(\"&\")) : \"\");\r\n\t\tvar url = this._applyPayload(urlParams);\r\n\t\tvar data;\r\n\r\n\t\tswitch (this._tMode) {\r\n\t\t\tcase \"GET\":\r\n\t\t\t\tdata = this._cleanupArgumentsBeforeSend(dataToSend);\r\n\t\t\t\tqueryParams.url = url + ajax.urlSeparator(url) + this.serialize(data, rowId);\r\n\t\t\t\tqueryParams.method = \"GET\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"POST\":\r\n\t\t\t\tdata = this._cleanupArgumentsBeforeSend(dataToSend);\r\n\t\t\t\tqueryParams.url = url;\r\n\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\tqueryParams.data = this.serialize(data, rowId);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"JSON\":\r\n\t\t\t\tdata = {};\r\n\t\t\t\tvar preprocessedData = this._cleanupItemBeforeSend(dataToSend);\r\n\t\t\t\tfor (var key in preprocessedData) {\r\n\t\t\t\t\tif (key === this.action_param || key === \"id\" || key === \"gr_id\") {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdata[key] = preprocessedData[key];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tqueryParams.url = url;\r\n\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\tqueryParams.data = JSON.stringify({\r\n\t\t\t\t\tid: rowId,\r\n\t\t\t\t\taction: dataToSend[this.action_param],\r\n\t\t\t\t\tdata: data\r\n\t\t\t\t});\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"REST\":\r\n\t\t\tcase \"REST-JSON\":\r\n\t\t\t\turl = urlParams.replace(/(&|\\?)editing=true/, \"\");\r\n\t\t\t\tdata = \"\";\r\n\r\n\t\t\t\tswitch (this.getState(rowId)) {\r\n\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\t\t\tqueryParams.data = this.serialize(dataToSend, rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\tqueryParams.method = \"DELETE\";\r\n\t\t\t\t\t\turl = url + (url.slice(-1) === \"/\" ? \"\" : \"/\") + rowId;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tqueryParams.method = \"PUT\";\r\n\t\t\t\t\t\tqueryParams.data = this.serialize(dataToSend, rowId);\r\n\t\t\t\t\t\turl = url + (url.slice(-1) === \"/\" ? \"\" : \"/\") + rowId;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tqueryParams.url = this._applyPayload(url);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tthis._waitMode++;\r\n\t\treturn ajax.query(queryParams);\r\n\t},\r\n\tsendAllData: function () {\r\n\t\tif (!this.updatedRows.length || this.updateMode === \"off\") { // FIXME: need to leave checking 'this.updateMode === \"off\"'?\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.messages = [];\r\n\t\tvar valid = true;\r\n\r\n\t\tthis._forEachUpdatedRow(function(rowId) {\r\n\t\t\tvalid = valid && this.checkBeforeUpdate(rowId);\r\n\t\t});\r\n\r\n\t\tif (!valid && !this.callEvent(\"onValidationError\", [\"\", this.messages])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (this._tSend) {\r\n\t\t\tthis._sendData(this._getAllData());\r\n\t\t} else {\r\n\t\t\tthis._forEachUpdatedRow(function(rowId) {\r\n\t\t\t\tif (!this._in_progress[rowId]) {\r\n\t\t\t\t\tif (this.is_invalid(rowId)) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis._beforeSendData(this._getRowData(rowId), rowId);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\r\n\t_getAllData: function (rowId) {\r\n\t\tvar out = {};\r\n\t\tvar has_one = false;\r\n\t\tthis._forEachUpdatedRow(function(id) {\r\n\t\t\tif (this._in_progress[id] || this.is_invalid(id)){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar row = this._getRowData(id);\r\n\t\t\tif (!this.callEvent(\"onBeforeUpdate\", [id, this.getState(id), row])) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tout[id] = row;\r\n\t\t\thas_one = true;\r\n\t\t\tthis._in_progress[id] = (new Date()).valueOf();\r\n\t\t});\r\n\t\treturn has_one ? out : null;\r\n\t},\r\n\r\n\tfindRow: function (pattern) {\r\n\t\tvar i = 0;\r\n\t\tfor (i = 0; i < this.updatedRows.length; i++)\r\n\t\t\tif (pattern == this.updatedRows[i]) break;\r\n\t\treturn i;\r\n\t},\r\n\r\n\t/**\r\n\t *\t@desc: define custom actions\r\n\t *\t@param: name - name of action, same as value of action attribute\r\n\t *\t@param: handler - custom function, which receives a XMl response content for action\r\n\t *\t@type: private\r\n\t */\r\n\tdefineAction: function (name, handler) {\r\n\t\tif (!this._uActions) this._uActions = {};\r\n\t\tthis._uActions[name] = handler;\r\n\t},\r\n\r\n\t/**\r\n\t *\t @desc: used in combination with setOnBeforeUpdateHandler to create custom client-server transport system\r\n\t *\t @param: sid - id of item before update\r\n\t *\t @param: tid - id of item after up0ate\r\n\t *\t @param: action - action name\r\n\t *\t @type: public\r\n\t *\t @topic: 0\r\n\t */\r\n\tafterUpdateCallback: function (sid, tid, action, btag) {\r\n\t\tif(!this.$scheduler){\r\n\t\t\t// destructor has been called before the callback\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar marker = sid;\r\n\t\tvar correct = (action !== \"error\" && action !== \"invalid\");\r\n\t\tif (!correct) {\r\n\t\t\tthis.set_invalid(sid, action);\r\n\t\t}\r\n\t\tif ((this._uActions) && (this._uActions[action]) && (!this._uActions[action](btag))) {\r\n\t\t\treturn (delete this._in_progress[marker]);\r\n\t\t}\r\n\r\n\t\tif (this._in_progress[marker] !== \"wait\") {\r\n\t\t\tthis.setUpdated(sid, false);\r\n\t\t}\r\n\r\n\t\tvar originalSid = sid;\r\n\r\n\t\tswitch (action) {\r\n\t\t\tcase \"inserted\":\r\n\t\t\tcase \"insert\":\r\n\t\t\t\tif (tid != sid) {\r\n\t\t\t\t\tthis.setUpdated(sid, false);\r\n\t\t\t\t\tthis.$scheduler[this._methods[2]](sid, tid);\r\n\t\t\t\t\tsid = tid;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"delete\":\r\n\t\t\tcase \"deleted\":\r\n\t\t\t\tthis.$scheduler.setUserData(sid, this.action_param, \"true_deleted\");\r\n\t\t\t\tthis.$scheduler[this._methods[3]](sid, tid);\r\n\t\t\t\tdelete this._in_progress[marker];\r\n\t\t\t\treturn this.callEvent(\"onAfterUpdate\", [sid, action, tid, btag]);\r\n\t\t}\r\n\r\n\t\tif (this._in_progress[marker] !== \"wait\") {\r\n\t\t\tif (correct) {\r\n\t\t\t\tthis.$scheduler.setUserData(sid, this.action_param, \"\");\r\n\t\t\t}\r\n\t\t\tdelete this._in_progress[marker];\r\n\t\t} else {\r\n\t\t\tdelete this._in_progress[marker];\r\n\t\t\tthis.setUpdated(tid, true, this.$scheduler.getUserData(sid, this.action_param));\r\n\t\t}\r\n\r\n\t\tthis.callEvent(\"onAfterUpdate\", [originalSid, action, tid, btag]);\r\n\t},\r\n\r\n\t_errorResponse: function (xml, id){\r\n\t\tif(this.$scheduler && this.$scheduler.callEvent){\r\n\t\t\tthis.$scheduler.callEvent(\"onSaveError\", [id, xml.xmlDoc]);\r\n\t\t}\r\n\t\treturn this.cleanUpdate(id);\r\n\t},\r\n\r\n\t_setDefaultTransactionMode: function () {\r\n\t\tif (this.serverProcessor) {\r\n\t\t\tthis.setTransactionMode(\"POST\", true);\r\n\t\t\tthis.serverProcessor += (this.serverProcessor.indexOf(\"?\") !== -1 ? \"&\" : \"?\") + \"editing=true\";\r\n\t\t\tthis._serverProcessor = this.serverProcessor;\r\n\t\t}\r\n\t},\r\n\t\r\n\t/**\r\n\t *\t@desc: response from server\r\n\t *\t@param: xml - XMLLoader object with response XML\r\n\t *\t@type: private\r\n\t */\r\n\tafterUpdate: function (that, xml, id) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\r\n\t\tif (xml.xmlDoc.status !== 200){\r\n\t\t\tthis._errorResponse(xml, id);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// try to use json first\r\n\t\tvar tag;\r\n\t\ttry {\r\n\t\t\ttag = JSON.parse(xml.xmlDoc.responseText);\r\n\t\t} catch (e) {\r\n\t\t\t// empty response also can be processed by json handler\r\n\t\t\tif (!xml.xmlDoc.responseText.length) {\r\n\t\t\t\ttag = {};\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (tag) {\r\n\t\t\tvar action = tag.action || this.getState(id) || \"updated\";\r\n\t\t\tvar sid = tag.sid || id[0];\r\n\t\t\tvar tid = tag.tid || id[0];\r\n\t\t\tthat.afterUpdateCallback(sid, tid, action, tag);\r\n\t\t\tthat.finalizeUpdate();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// xml response\r\n\t\tvar top = ajax.xmltop(\"data\", xml.xmlDoc); // fix incorrect content type in IE\r\n\t\tif (!top) {\r\n\t\t\treturn this._errorResponse(xml, id);\r\n\t\t}\r\n\t\tvar atag = ajax.xpath(\"//data/action\", top);\r\n\t\tif (!atag.length) {\r\n\t\t\treturn this._errorResponse(xml, id);\r\n\t\t}\r\n\r\n\t\tfor (var i = 0; i < atag.length; i++) {\r\n\t\t\tvar btag = atag[i];\r\n\t\t\tvar action = btag.getAttribute(\"type\");\r\n\t\t\tvar sid = btag.getAttribute(\"sid\");\r\n\t\t\tvar tid = btag.getAttribute(\"tid\");\r\n\r\n\t\t\tthat.afterUpdateCallback(sid, tid, action, btag);\r\n\t\t}\r\n\t\tthat.finalizeUpdate();\r\n\t},\r\n\tcleanUpdate: function (id) {\r\n\t\tif (id)\r\n\t\t\tfor (var i = 0; i < id.length; i++)\r\n\t\t\t\tdelete this._in_progress[id[i]];\r\n\t},\r\n\tfinalizeUpdate: function () {\r\n\t\tif (this._waitMode) this._waitMode--;\r\n\r\n\t\tthis.callEvent(\"onAfterUpdateFinish\", []);\r\n\t\tif (!this.updatedRows.length)\r\n\t\t\tthis.callEvent(\"onFullSync\", []);\r\n\t},\r\n\r\n\t/**\r\n\t *\t@desc: initializes data-processor\r\n\t *\t@param: scheduler - dhtmlxScheduler object to attach this data-processor to\r\n\t *\t@type: public\r\n\t */\r\n\tinit: function (scheduler) {\r\n\t\tif (this._initialized) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.$scheduler = scheduler;\r\n\t\tif (this.$scheduler._dp_init) {\r\n\t\t\tthis.$scheduler._dp_init(this);\r\n\t\t}\r\n\r\n\t\tthis._setDefaultTransactionMode();\r\n\r\n\t\tthis._methods=this._methods||[\"_set_event_text_style\",\"\",\"_dp_change_event_id\",\"_dp_hook_delete\"];\r\n\t\textendScheduler(this.$scheduler, this);\r\n\t\tvar dataProcessorEvents = new DataProcessorEvents(this.$scheduler, this);\r\n\t\tdataProcessorEvents.attach();\r\n\t\tthis.attachEvent(\"onDestroy\", function() {\r\n\t\t\tdelete this._getRowData;\r\n\r\n\t\t\tdelete this.$scheduler._dp;\r\n\t\t\tdelete this.$scheduler._dataprocessor;\r\n\t\t\tdelete this.$scheduler._set_event_text_style;\r\n\t\t\tdelete this.$scheduler._dp_change_event_id;\r\n\t\t\tdelete this.$scheduler._dp_hook_delete;\r\n\t\t\tdelete this.$scheduler;\r\n\t\t\tdataProcessorEvents.detach();\r\n\t\t});\r\n\t\tthis.$scheduler.callEvent(\"onDataProcessorReady\", [this]);\r\n\t\tthis._initialized = true;\r\n\r\n\t\tscheduler._dataprocessor=this;\r\n\t},\r\n\r\n\tsetOnAfterUpdate: function (ev) {\r\n\t\tthis.attachEvent(\"onAfterUpdate\", ev);\r\n\t},\r\n\tsetOnBeforeUpdateHandler: function (func) {\r\n\t\tthis.attachEvent(\"onBeforeDataSending\", func);\r\n\t},\r\n\r\n\t/* starts autoupdate mode\r\n\t\t@param interval time interval for sending update requests\r\n\t*/\r\n\tsetAutoUpdate: function (interval, user) {\r\n\t\tinterval = interval || 2000;\r\n\r\n\t\tthis._user = user || (new Date()).valueOf();\r\n\t\tthis._need_update = false;\r\n\t\t//this._loader = null;\r\n\t\tthis._update_busy = false;\r\n\r\n\t\tthis.attachEvent(\"onAfterUpdate\", function (sid, action, tid, xml_node) {\r\n\t\t\tthis.afterAutoUpdate(sid, action, tid, xml_node);\r\n\t\t});\r\n\t\tthis.attachEvent(\"onFullSync\", function () {\r\n\t\t\tthis.fullSync();\r\n\t\t});\r\n\r\n\t\tvar self = this;\r\n\t\tlet intervalId = global.setInterval(function () {\r\n\t\t\tself.loadUpdate();\r\n\t\t}, interval);\r\n\t\tthis.attachEvent(\"onDestroy\", function(){\r\n\t\t\tclearInterval(intervalId);\r\n\t\t});\r\n\t},\r\n\r\n\t/* process updating request answer\r\n\t\tif status == collision version is deprecated\r\n\t\tset flag for autoupdating immediately\r\n\t*/\r\n\tafterAutoUpdate: function (sid, action, tid, xml_node) {\r\n\t\tif (action == 'collision') {\r\n\t\t\tthis._need_update = true;\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t},\r\n\r\n\t/* callback function for onFillSync event\r\n\t\tcall update function if it's need\r\n\t*/\r\n\tfullSync: function () {\r\n\t\tif (this._need_update) {\r\n\t\t\tthis._need_update = false;\r\n\t\t\tthis.loadUpdate();\r\n\t\t}\r\n\t\treturn true;\r\n\t},\r\n\r\n\t/* sends query to the server and call callback function\r\n\t*/\r\n\tgetUpdates: function (url, callback) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tif (this._update_busy)\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t\tthis._update_busy = true;\r\n\r\n\t\tajax.get(url, callback);\r\n\t},\r\n\r\n\t/* returns xml node value\r\n\t\t@param node\r\n\t\t\txml node\r\n\t*/\r\n\t_getXmlNodeValue: function(node) {\r\n\t\tif (node.firstChild) {\r\n\t\t\treturn node.firstChild.nodeValue;\r\n\t\t}\r\n\t\treturn \"\";\r\n\t},\r\n\r\n\t/* loads updates and processes them\r\n\t*/\r\n\tloadUpdate: function () {\r\n\t\tvar self = this;\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tvar version = this.$scheduler.getUserData(0, \"version\");\r\n\t\tvar url = this.serverProcessor + ajax.urlSeparator(this.serverProcessor) + [\"dhx_user=\" + this._user, \"dhx_version=\" + version].join(\"&\");\r\n\t\turl = url.replace(\"editing=true&\", \"\");\r\n\t\tthis.getUpdates(url, function (xml) {\r\n\t\t\tvar vers = ajax.xpath(\"//userdata\", xml);\r\n\t\t\tself.$scheduler.setUserData(0, \"version\", self._getXmlNodeValue(vers[0]));\r\n\r\n\t\t\tvar updates = ajax.xpath(\"//update\", xml);\r\n\t\t\tif (updates.length) {\r\n\t\t\t\tself._silent_mode = true;\r\n\r\n\t\t\t\tfor (var i = 0; i < updates.length; i++) {\r\n\t\t\t\t\tvar status = updates[i].getAttribute(\"status\");\r\n\t\t\t\t\tvar id = updates[i].getAttribute(\"id\");\r\n\t\t\t\t\tvar parent = updates[i].getAttribute(\"parent\");\r\n\t\t\t\t\tswitch (status) {\r\n\t\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"insertCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"updated\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"updateCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"deleteCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tself._silent_mode = false;\r\n\t\t\t}\r\n\t\t\tself._update_busy = false;\r\n\t\t\tself = null;\r\n\t\t});\r\n\t},\r\n\r\n\tdestructor: function() {\r\n\t\tthis.callEvent(\"onDestroy\", []);\r\n\t\tthis.detachAllEvents();\r\n\r\n\t\tthis.updatedRows = [];\r\n\t\tthis._in_progress = {};\r\n\t\tthis._invalid = {};\r\n\t\tthis._headers = null;\r\n\t\tthis._payload = null;\r\n\t\tdelete this._initialized;\r\n\t},\r\n\r\n\turl: function(url) {\r\n\t\tthis.serverProcessor = this._serverProcessor = url;\r\n\t},\r\n\r\n\t_serializeAsJSON: function(data) {\r\n\t\tif (typeof data === \"string\") {\r\n\t\t\treturn data;\r\n\t\t}\r\n\r\n\t\tvar copy = this.$scheduler.utils.copy(data);\r\n\t\tif (this._tMode === \"REST-JSON\") {\r\n\t\t\tdelete copy.id;\r\n\t\t\tdelete copy[this.action_param];\r\n\t\t}\r\n\r\n\t\treturn JSON.stringify(copy);\r\n\t},\r\n\r\n\t// GET/POST/JSON modes of the dataProcessor didn't send the whole data items in 'delete' requests\r\n\t// clear extra info from the data in order not to change the request format\r\n\t_cleanupArgumentsBeforeSend: function(dataToSend) {\r\n\t\tvar processedData;\r\n\t\tif(dataToSend[this.action_param] === undefined){// hash of updated items, and not an individual item\r\n\t\t\tprocessedData = {};\r\n\t\t\tfor(var i in dataToSend) {\r\n\t\t\t\tprocessedData[i] = this._cleanupArgumentsBeforeSend(dataToSend[i]);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tprocessedData = this._cleanupItemBeforeSend(dataToSend);\r\n\t\t}\r\n\t\treturn processedData;\r\n\t},\r\n\t_cleanupItemBeforeSend: function(updatedItem) {\r\n\t\tvar output = null;\r\n\t\tif(updatedItem){\r\n\t\t\tif(updatedItem[this.action_param] === \"deleted\"){\r\n\t\t\t\toutput = {};\r\n\t\t\t\toutput.id = updatedItem.id;\r\n\t\t\t\toutput[this.action_param] = updatedItem[this.action_param];\r\n\t\t\t}else{\r\n\t\t\t\toutput = updatedItem;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn output;\r\n\t},\r\n\r\n\t_forEachUpdatedRow: function(code) {\r\n\t\tvar updatedRows = this.updatedRows.slice();\r\n\t\tfor (var i = 0; i < updatedRows.length; i++) {\r\n\t\t\tvar rowId = updatedRows[i];\r\n\t\t\tif (this.$scheduler.getUserData(rowId, this.action_param)) {\r\n\t\t\t\tcode.call(this, rowId);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t_prepareDataItem: function(item) {\r\n\t\tvar processedItem = {};\r\n\t\tvar scheduler = this.$scheduler;\r\n\t\tvar copy = scheduler.utils.copy(item);\r\n\t\tfor (var i in copy) {\r\n\t\t\tif (i.indexOf(\"_\") === 0) {\r\n\t\t\t\tcontinue;\r\n\t\t\t} else if (copy[i]) {\r\n\t\t\t\tif(copy[i].getUTCFullYear){\r\n\t\t\t\t\tprocessedItem[i] = scheduler._helpers.formatDate(copy[i]);\r\n\t\t\t\t} else if(typeof copy[i] == \"object\") {\r\n\t\t\t\t\tprocessedItem[i] = this._prepareDataItem(copy[i]);\r\n\t\t\t\t} else if(copy[i] === null) {\r\n\t\t\t\t\tprocessedItem[i] = \"\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprocessedItem[i] = copy[i];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tprocessedItem[this.action_param] = scheduler.getUserData(item.id, this.action_param);\r\n\t\treturn processedItem;\r\n\t},\r\n\t_getRowData: function(id) {\r\n\t\tvar dataItem = this.$scheduler.getEvent(id);\r\n\t\tif (!dataItem) {\r\n\t\t\tdataItem = { id: id };\r\n\t\t}\r\n\t\treturn this._prepareDataItem(dataItem);\r\n\t}\r\n};\r\n\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler.createDataProcessor = function(config) {\r\n\tvar router;\r\n\tvar tMode;\r\n\tif (config instanceof Function) {\r\n\t\trouter = config;\r\n\t} else if (config.hasOwnProperty(\"router\")) {\r\n\t\trouter = config.router;\r\n\t} else if(config.hasOwnProperty(\"event\")){\r\n\t\trouter = config;\r\n\t}\r\n\r\n\tif (router) {\r\n\t\ttMode = \"CUSTOM\";\r\n\t} else {\r\n\t\ttMode = config.mode || \"REST-JSON\";\r\n\t}\r\n\r\n\tvar dp = new DataProcessor(config.url);\r\n\tdp.init(scheduler);\r\n\tdp.setTransactionMode({\r\n\t\tmode: tMode,\r\n\t\trouter: router\r\n\t}, config.batchUpdate); // FIXME: config.batchUpdate where it is explained?\r\n\treturn dp;\r\n};\r\n\r\nscheduler.DataProcessor = DataProcessor;\r\n\r\n}\r\n\r\n//var dataProcessor = global.dataProcessor = DataProcessor; // for old","import utils from \"./utils/utils\";\r\nimport domHelpers from \"./utils/dom_helpers\";\r\n\r\n\r\nexport default function(scheduler) {\r\n\r\n\tvar boxAttribute = \"data-dhxbox\";\r\n\r\n\tvar _dhx_msg_cfg = null;\r\n\r\n\tfunction callback(config, result) {\r\n\t\tvar usercall = config.callback;\r\n\t\tmodalBox.hide(config.box);\r\n\r\n\t\t_dhx_msg_cfg = config.box = null;\r\n\tif (usercall)\r\n\t\t\tusercall(result);\r\n\t}\r\n\r\n\tfunction modal_key(event) {\r\n\t\tif (_dhx_msg_cfg) {\r\n\r\n\t\t\tvar code = event.which || event.keyCode;\r\n\t\t\tvar preventDefault = false;\r\n\r\n\t\t\tif (messageBox.keyboard) {\r\n\t\t\t\tif (code == 13 || code == 32) {\r\n\t\t\t\t\t// default behavior is to confirm/submit popup on space/enter\r\n\t\t\t\t\t// if browser focus is set on button element - do button click instead of default behavior\r\n\t\t\t\t\tvar target = event.target || event.srcElement;\r\n\t\t\t\t\tif (domHelpers.getClassName(target).indexOf(\"scheduler_popup_button\") > -1 && target.click) {\r\n\t\t\t\t\t\ttarget.click();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcallback(_dhx_msg_cfg, true);\r\n\t\t\t\t\t\tpreventDefault = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (code == 27) {\r\n\t\t\t\t\tcallback(_dhx_msg_cfg, false);\r\n\t\t\t\t\tpreventDefault = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (preventDefault) {\r\n\t\t\t\tif (event.preventDefault){\r\n\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t}\r\n\t\t\t\treturn !(event.cancelBubble = true);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler.event(document, \"keydown\", modal_key, true);\r\n\r\n\tfunction modality(mode) {\r\n\t\tif (!modality.cover) {\r\n\t\t\tmodality.cover = document.createElement(\"div\");\r\n\t\t\t//necessary for IE only\r\n\t\t\tscheduler.event(modality.cover, \"keydown\", modal_key);\r\n\t\t\tmodality.cover.className = \"dhx_modal_cover\";\r\n\t\t\tdocument.body.appendChild(modality.cover);\r\n\t\t}\r\n\r\n\t\tmodality.cover.style.display = mode ? \"inline-block\" : \"none\";\r\n\t}\r\n\r\n\tfunction button(text, classValue, result) {\r\n\t\tvar buttonAriaAttrs = scheduler._waiAria.messageButtonAttrString(text);\r\n\t\tvar name = (classValue || \"\").toLowerCase().replace(/ /g, \"_\");\r\n\t\tvar buttonCss = `scheduler_${name}_button dhtmlx_${name}_button`; \r\n\t\treturn `
${text}
`;\r\n\t}\r\n\r\n\tfunction info(text) {\r\n\t\tif (!messageBox.area) {\r\n\t\t\tmessageBox.area = document.createElement(\"div\");\r\n\t\t\tmessageBox.area.className = \"scheduler_message_area dhtmlx_message_area\";\r\n\t\t\tmessageBox.area.style[messageBox.position] = \"5px\";\r\n\t\t\tdocument.body.appendChild(messageBox.area);\r\n\t\t}\r\n\r\n\t\tmessageBox.hide(text.id);\r\n\t\tvar message = document.createElement(\"div\");\r\n\t\tmessage.innerHTML = \"
\" + text.text + \"
\";\r\n\t\tmessage.className = \"scheduler-info dhtmlx-info scheduler-\" + text.type + \" dhtmlx-\" + text.type;\r\n\t\tscheduler.event(message, \"click\",function () {\r\n\t\t\tmessageBox.hide(text.id);\r\n\t\t\ttext = null;\r\n\t\t});\r\n\r\n\t\tscheduler._waiAria.messageInfoAttr(message);\r\n\r\n\t\tif (messageBox.position == \"bottom\" && messageBox.area.firstChild)\r\n\t\t\tmessageBox.area.insertBefore(message, messageBox.area.firstChild);\r\n\t\telse\r\n\t\t\tmessageBox.area.appendChild(message);\r\n\r\n\t\tif (text.expire > 0)\r\n\t\t\tmessageBox.timers[text.id] = window.setTimeout(function () {\r\n\t\t\t\t// GS-1213: We need that when Scheduler is destroyed\r\n\t\t\t\tif (messageBox) messageBox.hide(text.id);\r\n\t\t\t}, text.expire);\r\n\r\n\t\tmessageBox.pull[text.id] = message;\r\n\t\tmessage = null;\r\n\r\n\t\treturn text.id;\r\n\t}\r\n\r\n\tfunction getFirstDefined() {\r\n\t\tvar values = [].slice.apply(arguments, [0]);\r\n\r\n\t\tfor (var i = 0; i < values.length; i++) {\r\n\t\t\tif (values[i]) {\r\n\t\t\t\treturn values[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tfunction _boxStructure(config, ok, cancel) {\r\n\t\tvar box = document.createElement(\"div\");\r\n\r\n\t\tvar contentId = utils.uid();\r\n\t\tscheduler._waiAria.messageModalAttr(box, contentId);\r\n\r\n\r\n\t\tbox.className = \" scheduler_modal_box dhtmlx_modal_box scheduler-\" + config.type + \" dhtmlx-\" + config.type;\r\n\t\tbox.setAttribute(boxAttribute, 1);\r\n\r\n\t\tvar inner = '';\r\n\r\n\t\tif (config.width)\r\n\t\t\tbox.style.width = config.width;\r\n\t\tif (config.height)\r\n\t\t\tbox.style.height = config.height;\r\n\t\tif (config.title)\r\n\t\t\tinner += '
' + config.title + '
';\r\n\t\tinner += '
' + (config.content ? '' : config.text) + '
';\r\n\t\tif (ok)\r\n\t\t\tinner += button(getFirstDefined(config.ok, scheduler.locale.labels.message_ok, \"OK\"), \"ok\", true);\r\n\t\tif (cancel)\r\n\t\t\tinner += button(getFirstDefined(config.cancel, scheduler.locale.labels.message_cancel, \"Cancel\"), \"cancel\", false);\r\n\r\n\t\tif (config.buttons) {\r\n\t\t\tfor (var i = 0; i < config.buttons.length; i++) {\r\n\t\t\t\tvar btn = config.buttons[i];\r\n\t\t\t\tif (typeof btn == \"object\") {\r\n\t\t\t\t\t// Support { label:\"Save\", css:\"main_button\", value:\"save\" }\r\n\t\t\t\t\tvar label = btn.label;\r\n\t\t\t\t\tvar css = btn.css || (\"scheduler_\" + btn.label.toLowerCase() + \"_button dhtmlx_\" + btn.label.toLowerCase() + \"_button\");\r\n\t\t\t\t\tvar value = btn.value || i;\r\n\t\t\t\t\tinner += button(label, css, value);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tinner += button(btn, btn, i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tinner += '
';\r\n\t\tbox.innerHTML = inner;\r\n\r\n\t\tif (config.content) {\r\n\t\t\tvar node = config.content;\r\n\t\t\tif (typeof node == \"string\")\r\n\t\t\t\tnode = document.getElementById(node);\r\n\t\t\tif (node.style.display == 'none')\r\n\t\t\t\tnode.style.display = \"\";\r\n\t\t\tbox.childNodes[config.title ? 1 : 0].appendChild(node);\r\n\t\t}\r\n\r\n\t\tscheduler.event(box, \"click\", function (event) {\r\n\t\t\tvar source = event.target || event.srcElement;\r\n\t\t\tif (!source.className) source = source.parentNode;\r\n\t\t\tif (domHelpers.closest(source, \".scheduler_popup_button\")) {\r\n\t\t\t\tvar result = source.getAttribute(\"data-result\");\r\n\t\t\t\tresult = (result == \"true\") || (result == \"false\" ? false : result);\r\n\t\t\t\tcallback(config, result);\r\n\t\t\t}\r\n\t\t});\r\n\t\tconfig.box = box;\r\n\t\tif (ok || cancel)\r\n\t\t\t_dhx_msg_cfg = config;\r\n\r\n\t\treturn box;\r\n\t}\r\n\r\n\tfunction _createBox(config, ok, cancel) {\r\n\t\tvar box = config.tagName ? config : _boxStructure(config, ok, cancel);\r\n\r\n\t\tif (!config.hidden)\r\n\t\t\tmodality(true);\r\n\t\tdocument.body.appendChild(box);\r\n\t\tvar x = Math.abs(Math.floor(((window.innerWidth || document.documentElement.offsetWidth) - box.offsetWidth) / 2));\r\n\t\tvar y = Math.abs(Math.floor(((window.innerHeight || document.documentElement.offsetHeight) - box.offsetHeight) / 2));\r\n\t\tif (config.position == \"top\")\r\n\t\t\tbox.style.top = \"-3px\";\r\n\t\telse\r\n\t\t\tbox.style.top = y + 'px';\r\n\t\tbox.style.left = x + 'px';\r\n\t\t//necessary for IE only\r\n\t\tscheduler.event(box, \"keydown\", modal_key);\r\n\r\n\t\tmodalBox.focus(box);\r\n\r\n\t\tif (config.hidden)\r\n\t\t\tmodalBox.hide(box);\r\n\r\n\t\tscheduler.callEvent(\"onMessagePopup\", [box]);\r\n\t\treturn box;\r\n\t}\r\n\r\n\tfunction alertPopup(config) {\r\n\t\treturn _createBox(config, true, false);\r\n\t}\r\n\r\n\tfunction confirmPopup(config) {\r\n\t\treturn _createBox(config, true, true);\r\n\t}\r\n\r\n\tfunction boxPopup(config) {\r\n\t\treturn _createBox(config);\r\n\t}\r\n\r\n\tfunction box_params(text, type, callback) {\r\n\t\tif (typeof text != \"object\") {\r\n\t\t\tif (typeof type == \"function\") {\r\n\t\t\t\tcallback = type;\r\n\t\t\t\ttype = \"\";\r\n\t\t\t}\r\n\t\t\ttext = {text: text, type: type, callback: callback};\r\n\t\t}\r\n\t\treturn text;\r\n\t}\r\n\r\n\tfunction params(text, type, expire, id) {\r\n\t\tif (typeof text != \"object\")\r\n\t\t\ttext = {text: text, type: type, expire: expire, id: id};\r\n\t\ttext.id = text.id || utils.uid();\r\n\t\ttext.expire = text.expire || messageBox.expire;\r\n\t\treturn text;\r\n\t}\r\n\r\n\tvar alertBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"confirm\";\r\n\t\treturn alertPopup(text);\r\n\t};\r\n\tvar confirmBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"alert\";\r\n\t\treturn confirmPopup(text);\r\n\t};\r\n\tvar modalBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"alert\";\r\n\t\treturn boxPopup(text);\r\n\t};\r\n\tmodalBox.hide = function (node) {\r\n\t\twhile (node && node.getAttribute && !node.getAttribute(boxAttribute))\r\n\t\t\tnode = node.parentNode;\r\n\t\tif (node) {\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t\tmodality(false);\r\n\r\n\t\t\tscheduler.callEvent(\"onAfterMessagePopup\", [node]);\r\n\t\t}\r\n\t};\r\n\r\n\tmodalBox.focus = function (node) {\r\n\t\tsetTimeout(function () {\r\n\t\t\tvar focusable = domHelpers.getFocusableNodes(node);\r\n\t\t\tif (focusable.length) {\r\n\t\t\t\tif (focusable[0].focus) focusable[0].focus();\r\n\t\t\t}\r\n\t\t}, 1);\r\n\t};\r\n\r\n\tvar messageBox = function (text, type, expire, id) {\r\n\t\ttext = params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"info\";\r\n\r\n\t\tvar subtype = text.type.split(\"-\")[0];\r\n\t\tswitch (subtype) {\r\n\t\t\tcase \"alert\":\r\n\t\t\t\treturn alertPopup(text);\r\n\t\t\tcase \"confirm\":\r\n\t\t\t\treturn confirmPopup(text);\r\n\t\t\tcase \"modalbox\":\r\n\t\t\t\treturn boxPopup(text);\r\n\t\t\tdefault:\r\n\t\t\t\treturn info(text);\r\n\t\t}\r\n\t};\r\n\r\n\tmessageBox.seed = (new Date()).valueOf();\r\n\tmessageBox.uid = utils.uid;\r\n\tmessageBox.expire = 4000;\r\n\tmessageBox.keyboard = true;\r\n\tmessageBox.position = \"top\";\r\n\tmessageBox.pull = {};\r\n\tmessageBox.timers = {};\r\n\r\n\tmessageBox.hideAll = function () {\r\n\t\tfor (var key in messageBox.pull)\r\n\t\t\tmessageBox.hide(key);\r\n\t};\r\n\tmessageBox.hide = function (id) {\r\n\t\tvar obj = messageBox.pull[id];\r\n\t\tif (obj && obj.parentNode) {\r\n\t\t\twindow.setTimeout(function () {\r\n\t\t\t\tobj.parentNode.removeChild(obj);\r\n\t\t\t\tobj = null;\r\n\t\t\t}, 2000);\r\n\t\t\tobj.className += \" hidden\";\r\n\r\n\t\t\tif (messageBox.timers[id])\r\n\t\t\t\twindow.clearTimeout(messageBox.timers[id]);\r\n\t\t\tdelete messageBox.pull[id];\r\n\t\t}\r\n\t};\r\n\r\n\tvar popups = [];\r\n\tscheduler.attachEvent(\"onMessagePopup\", function(box){\r\n\t\tpopups.push(box);\r\n\t});\r\n\tscheduler.attachEvent(\"onAfterMessagePopup\", function(box){\r\n\t\tfor(var i = 0; i < popups.length; i++){\r\n\t\t\tif(popups[i] === box){\r\n\t\t\t\tpopups.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tif(modality.cover && modality.cover.parentNode){\r\n\t\t\tmodality.cover.parentNode.removeChild(modality.cover);\r\n\t\t}\r\n\r\n\t\tfor(var i = 0; i < popups.length; i++){\r\n\t\t\tif(popups[i].parentNode){\r\n\t\t\t\tpopups[i].parentNode.removeChild(popups[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\tpopups = null;\r\n\r\n\t\tif(messageBox.area && messageBox.area.parentNode){\r\n\t\t\tmessageBox.area.parentNode.removeChild(messageBox.area);\r\n\t\t}\r\n\t\tmessageBox = null;\r\n\t});\r\n\r\n\treturn {\r\n\t\talert: alertBox,\r\n\t\tconfirm: confirmBox,\r\n\t\tmessage: messageBox,\r\n\t\tmodalbox: modalBox\r\n\t};\r\n}","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"كانون الثاني\", \"شباط\", \"آذار\", \"نيسان\", \"أيار\", \"حزيران\", \"تموز\", \"آب\", \"أيلول\", \"تشرين الأول\", \"تشرين الثاني\", \"كانون الأول\"],\r\n\t\tmonth_short: [\"يناير\", \"فبراير\", \"مارس\", \"أبريل\", \"مايو\", \"يونيو\", \"يوليو\", \"أغسطس\", \"سبتمبر\", \"أكتوبر\", \"نوفمبر\", \"ديسمبر\"],\r\n\t\tday_full: [\"الأحد\", \"الأثنين\", \"ألثلاثاء\", \"الأربعاء\", \"ألحميس\", \"ألجمعة\", \"السبت\"],\r\n\t\tday_short: [\"احد\", \"اثنين\", \"ثلاثاء\", \"اربعاء\", \"خميس\", \"جمعة\", \"سبت\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"اليوم\",\r\n\t\tday_tab: \"يوم\",\r\n\t\tweek_tab: \"أسبوع\",\r\n\t\tmonth_tab: \"شهر\",\r\n\t\tnew_event: \"حدث جديد\",\r\n\t\ticon_save: \"اخزن\",\r\n\t\ticon_cancel: \"الغاء\",\r\n\t\ticon_details: \"تفاصيل\",\r\n\t\ticon_edit: \"تحرير\",\r\n\t\ticon_delete: \"حذف\",\r\n\t\tconfirm_closing: \"التغييرات سوف تضيع, هل انت متأكد؟\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"الحدث سيتم حذفها نهائيا ، هل أنت متأكد؟\",\r\n\t\tsection_description: \"الوصف\",\r\n\t\tsection_time: \"الفترة الزمنية\",\r\n\t\tfull_day: \"طوال اليوم\",\r\n\r\n\t\tconfirm_recurring: \"هل تريد تحرير مجموعة كاملة من الأحداث المتكررة؟\",\r\n\t\tsection_recurring: \"تكرار الحدث\",\r\n\t\tbutton_recurring: \"تعطيل\",\r\n\t\tbutton_recurring_open: \"تمكين\",\r\n\t\tbutton_edit_series: \"تحرير سلسلة\",\r\n\t\tbutton_edit_occurrence: \"تعديل نسخة\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"جدول\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};\r\n\r\n\r\n","/*\r\n Translation by Sofya Morozova\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Студзень\", \"Люты\", \"Сакавік\", \"Красавік\", \"Maй\", \"Чэрвень\", \"Ліпень\", \"Жнівень\", \"Верасень\", \"Кастрычнік\", \"Лістапад\", \"Снежань\"],\r\n\t\tmonth_short: [\"Студз\", \"Лют\", \"Сак\", \"Крас\", \"Maй\", \"Чэр\", \"Ліп\", \"Жнів\", \"Вер\", \"Каст\", \"Ліст\", \"Снеж\"],\r\n\t\tday_full: [ \"Нядзеля\", \"Панядзелак\", \"Аўторак\", \"Серада\", \"Чацвер\", \"Пятніца\", \"Субота\"],\r\n\t\tday_short: [\"Нд\", \"Пн\", \"Аўт\", \"Ср\", \"Чцв\", \"Пт\", \"Сб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сёння\",\r\n\t\tday_tab: \"Дзень\",\r\n\t\tweek_tab: \"Тыдзень\",\r\n\t\tmonth_tab: \"Месяц\",\r\n\t\tnew_event: \"Новая падзея\",\r\n\t\ticon_save: \"Захаваць\",\r\n\t\ticon_cancel: \"Адмяніць\",\r\n\t\ticon_details: \"Дэталі\",\r\n\t\ticon_edit: \"Змяніць\",\r\n\t\ticon_delete: \"Выдаліць\",\r\n\t\tconfirm_closing: \"\", //Унесеныя змены будуць страчаны, працягнуць?\r\n\t\tconfirm_deleting: \"Падзея будзе выдалена незваротна, працягнуць?\",\r\n\t\tsection_description: \"Апісанне\",\r\n\t\tsection_time: \"Перыяд часу\",\r\n\t\tfull_day: \"Увесь дзень\",\r\n\r\n\t\tconfirm_recurring: \"Вы хочаце змяніць усю серыю паўтаральных падзей?\",\r\n\t\tsection_recurring: \"Паўтарэнне\",\r\n\t\tbutton_recurring: \"Адключана\",\r\n\t\tbutton_recurring_open: \"Уключана\",\r\n\t\tbutton_edit_series: \"Рэдагаваць серыю\",\r\n\t\tbutton_edit_occurrence: \"Рэдагаваць асобнік\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Спіс\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Апісанне\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Год\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Спіс\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Спic\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Дзень\",\r\n\t\trepeat_radio_week: \"Тыдзень\",\r\n\t\trepeat_radio_month: \"Месяц\",\r\n\t\trepeat_radio_year: \"Год\",\r\n\t\trepeat_radio_day_type: \"Кожны\",\r\n\t\trepeat_text_day_count: \"дзень\",\r\n\t\trepeat_radio_day_type2: \"Кожны працоўны дзень\",\r\n\t\trepeat_week: \" Паўтараць кожны\",\r\n\t\trepeat_text_week_count: \"тыдзень\",\r\n\t\trepeat_radio_month_type: \"Паўтараць\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" чысла кожнага\",\r\n\t\trepeat_text_month_count: \"месяцу\",\r\n\t\trepeat_text_month_count2_before: \"кожны \",\r\n\t\trepeat_text_month_count2_after: \"месяц\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"дзень\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без даты заканчэння\",\r\n\t\trepeat_text_occurences_count: \"паўтораў\",\r\n\t\trepeat_radio_end2: \"\",\r\n\t\trepeat_radio_end3: \"Да \",\r\n\t\tmonth_for_recurring: [\"Студзеня\", \"Лютага\", \"Сакавіка\", \"Красавіка\", \"Мая\", \"Чэрвеня\", \"Ліпeня\", \"Жніўня\", \"Верасня\", \"Кастрычніка\", \"Лістапада\", \"Снежня\"],\r\n\t\tday_for_recurring: [\"Нядзелю\", \"Панядзелак\", \"Аўторак\", \"Сераду\", \"Чацвер\", \"Пятніцу\", \"Суботу\"]\r\n\t}\r\n};\r\n","/*\r\n @Traducido por Vicente Adria Bohigues - vicenteadria@hotmail.com\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Gener\", \"Febrer\", \"Març\", \"Abril\", \"Maig\", \"Juny\", \"Juliol\", \"Agost\", \"Setembre\", \"Octubre\", \"Novembre\", \"Desembre\"],\r\n\t\tmonth_short: [\"Gen\", \"Feb\", \"Mar\", \"Abr\", \"Mai\", \"Jun\", \"Jul\", \"Ago\", \"Set\", \"Oct\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Diumenge\", \"Dilluns\", \"Dimarts\", \"Dimecres\", \"Dijous\", \"Divendres\", \"Dissabte\"],\r\n\t\tday_short: [\"Dg\", \"Dl\", \"Dm\", \"Dc\", \"Dj\", \"Dv\", \"Ds\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hui\",\r\n\t\tday_tab: \"Dia\",\r\n\t\tweek_tab: \"Setmana\",\r\n\t\tmonth_tab: \"Mes\",\r\n\t\tnew_event: \"Nou esdeveniment\",\r\n\t\ticon_save: \"Guardar\",\r\n\t\ticon_cancel: \"Cancel·lar\",\r\n\t\ticon_details: \"Detalls\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Esborrar\",\r\n\t\tconfirm_closing: \"\", //\"Els seus canvis es perdràn, continuar ?\"\r\n\t\tconfirm_deleting: \"L'esdeveniment s'esborrarà definitivament, continuar ?\",\r\n\t\tsection_description: \"Descripció\",\r\n\t\tsection_time: \"Periode de temps\",\r\n\t\tfull_day: \"Tot el dia\",\r\n\r\n\t\tconfirm_recurring: \"¿Desitja modificar el conjunt d'esdeveniments repetits?\",\r\n\t\tsection_recurring: \"Repeteixca l'esdeveniment\",\r\n\t\tbutton_recurring: \"Impedit\",\r\n\t\tbutton_recurring_open: \"Permés\",\r\n\t\tbutton_edit_series: \"Edit sèrie\",\r\n\t\tbutton_edit_occurrence: \"Edita Instància\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descripció\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Any\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Taula\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};","/*\r\nTranslation by FreezeSoul\r\n*/\r\n//scheduler.config.day_date=\"%M %d日 %D\";\r\n//scheduler.config.default_date=\"%Y年 %M %d日\";\r\n//scheduler.config.month_date=\"%Y年 %M\";\r\n\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"一月\", \"二月\", \"三月\", \"四月\", \"五月\", \"六月\", \"七月\", \"八月\", \"九月\", \"十月\", \"十一月\", \"十二月\"],\r\n\t\tmonth_short: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tday_full: [\"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\"],\r\n\t\tday_short: [\"日\", \"一\", \"二\", \"三\", \"四\", \"五\", \"六\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"今天\",\r\n\t\tday_tab: \"日\",\r\n\t\tweek_tab: \"周\",\r\n\t\tmonth_tab: \"月\",\r\n\t\tnew_event: \"新建日程\",\r\n\t\ticon_save: \"保存\",\r\n\t\ticon_cancel: \"关闭\",\r\n\t\ticon_details: \"详细\",\r\n\t\ticon_edit: \"编辑\",\r\n\t\ticon_delete: \"删除\",\r\n\t\tconfirm_closing: \"请确认是否撤销修改!\", //Your changes will be lost, are your sure?\r\n\t\tconfirm_deleting: \"是否删除日程?\",\r\n\t\tsection_description: \"描述\",\r\n\t\tsection_time: \"时间范围\",\r\n\t\tfull_day: \"整天\",\r\n\r\n\t\tconfirm_recurring:\"请确认是否将日程设为重复模式?\",\r\n\t\tsection_recurring:\"重复周期\",\r\n\t\tbutton_recurring:\"禁用\",\r\n\t\tbutton_recurring_open:\"启用\",\r\n\t\tbutton_edit_series: \"编辑系列\",\r\n\t\tbutton_edit_occurrence: \"编辑实例\",\r\n\t\t\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"议程\",\r\n\t\tdate:\"日期\",\r\n\t\tdescription:\"说明\",\r\n\t\t\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"今年\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"议程\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab:\"电网\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"按天\",\r\n\t\trepeat_radio_week: \"按周\",\r\n\t\trepeat_radio_month: \"按月\",\r\n\t\trepeat_radio_year: \"按年\",\r\n\t\trepeat_radio_day_type: \"每\",\r\n\t\trepeat_text_day_count: \"天\",\r\n\t\trepeat_radio_day_type2: \"每个工作日\",\r\n\t\trepeat_week: \" 重复 每\",\r\n\t\trepeat_text_week_count: \"星期的:\",\r\n\t\trepeat_radio_month_type: \"重复\",\r\n\t\trepeat_radio_month_start: \"在\",\r\n\t\trepeat_text_month_day: \"日 每\",\r\n\t\trepeat_text_month_count: \"月\",\r\n\t\trepeat_text_month_count2_before: \"每\",\r\n\t\trepeat_text_month_count2_after: \"月\",\r\n\t\trepeat_year_label: \"在\",\r\n\t\tselect_year_day2: \"的\",\r\n\t\trepeat_text_year_day: \"日\",\r\n\t\tselect_year_month: \"月\",\r\n\t\trepeat_radio_end: \"无结束日期\",\r\n\t\trepeat_text_occurences_count: \"次结束\",\r\n\t\trepeat_radio_end2: \"重复\",\r\n\t\trepeat_radio_end3: \"结束于\",\r\n\t\tmonth_for_recurring: [\"一月\", \"二月\", \"三月\", \"四月\", \"五月\", \"六月\", \"七月\", \"八月\", \"九月\", \"十月\", \"十一月\", \"十二月\"],\r\n\t\tday_for_recurring: [\"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Leden\", \"Únor\", \"Březen\", \"Duben\", \"Květen\", \"Červen\", \"Červenec\", \"Srpen\", \"Září\", \"Říjen\", \"Listopad\", \"Prosinec\"],\r\n\t\tmonth_short: [\"Led\", \"Ún\", \"Bře\", \"Dub\", \"Kvě\", \"Čer\", \"Čec\", \"Srp\", \"Září\", \"Říj\", \"List\", \"Pro\"],\r\n\t\tday_full: [\"Neděle\", \"Pondělí\", \"Úterý\", \"Středa\", \"Čtvrtek\", \"Pátek\", \"Sobota\"],\r\n\t\tday_short: [\"Ne\", \"Po\", \"Út\", \"St\", \"Čt\", \"Pá\", \"So\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dnes\",\r\n\t\tday_tab: \"Den\",\r\n\t\tweek_tab: \"Týden\",\r\n\t\tmonth_tab: \"Měsíc\",\r\n\t\tnew_event: \"Nová událost\",\r\n\t\ticon_save: \"Uložit\",\r\n\t\ticon_cancel: \"Zpět\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edituj\",\r\n\t\ticon_delete: \"Smazat\",\r\n\t\tconfirm_closing: \"\", //Vaše změny budou ztraceny, opravdu ?\r\n\t\tconfirm_deleting: \"Událost bude trvale smazána, opravdu?\",\r\n\t\tsection_description: \"Poznámky\",\r\n\t\tsection_time: \"Doba platnosti\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Přejete si upravit celou řadu opakovaných událostí?\",\r\n\t\tsection_recurring: \"Opakování události\",\r\n\t\tbutton_recurring: \"Vypnuto\",\r\n\t\tbutton_recurring_open: \"Zapnuto\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Upravit instance\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Program\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Poznámka\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\t\tfull_day: \"Full day\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Program\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Mřížka\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Denně\",\r\n\t\trepeat_radio_week: \"Týdně\",\r\n\t\trepeat_radio_month: \"Měsíčně\",\r\n\t\trepeat_radio_year: \"Ročně\",\r\n\t\trepeat_radio_day_type: \"každý\",\r\n\t\trepeat_text_day_count: \"Den\",\r\n\t\trepeat_radio_day_type2: \"pracovní dny\",\r\n\t\trepeat_week: \"Opakuje každých\",\r\n\t\trepeat_text_week_count: \"Týdnů na:\",\r\n\t\trepeat_radio_month_type: \"u každého\",\r\n\t\trepeat_radio_month_start: \"na\",\r\n\t\trepeat_text_month_day: \"Den každého\",\r\n\t\trepeat_text_month_count: \"Měsíc\",\r\n\t\trepeat_text_month_count2_before: \"každý\",\r\n\t\trepeat_text_month_count2_after: \"Měsíc\",\r\n\t\trepeat_year_label: \"na\",\r\n\t\tselect_year_day2: \"v\",\r\n\t\trepeat_text_year_day: \"Den v\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"bez data ukončení\",\r\n\t\trepeat_text_occurences_count: \"Události\",\r\n\t\trepeat_radio_end2: \"po\",\r\n\t\trepeat_radio_end3: \"Konec\",\r\n\t\tmonth_for_recurring: [\"Leden\", \"Únor\", \"Březen\", \"Duben\", \"Květen\", \"Červen\", \"Červenec\", \"Srpen\", \"Září\", \"Říjen\", \"Listopad\", \"Prosinec\"],\r\n\t\tday_for_recurring: [\"Neděle \", \"Pondělí\", \"Úterý\", \"Středa\", \"Čtvrtek\", \"Pátek\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Marts\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Man\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uge\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny begivenhed\",\r\n\t\ticon_save: \"Gem\",\r\n\t\ticon_cancel: \"Fortryd\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Tilret\",\r\n\t\ticon_delete: \"Slet\",\r\n\t\tconfirm_closing: \"Dine rettelser vil gå tabt.. Er dy sikker?\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Bigivenheden vil blive slettet permanent. Er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du tilrette hele serien af gentagne begivenheder?\",\r\n\t\tsection_recurring: \"Gentag begivenhed\",\r\n\t\tbutton_recurring: \"Frakoblet\",\r\n\t\tbutton_recurring_open: \"Tilkoblet\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Rediger en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dagsorden\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dagsorden\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daglig\",\r\n\t\trepeat_radio_week: \"Ugenlig\",\r\n\t\trepeat_radio_month: \"Månedlig\",\r\n\t\trepeat_radio_year: \"Årlig\",\r\n\t\trepeat_radio_day_type: \"Hver\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"På hver arbejdsdag\",\r\n\t\trepeat_week: \" Gentager sig hver\",\r\n\t\trepeat_text_week_count: \"uge på følgende dage:\",\r\n\t\trepeat_radio_month_type: \"Hver den\",\r\n\t\trepeat_radio_month_start: \"Den\",\r\n\t\trepeat_text_month_day: \" i hver\",\r\n\t\trepeat_text_month_count: \"måned\",\r\n\t\trepeat_text_month_count2_before: \"hver\",\r\n\t\trepeat_text_month_count2_after: \"måned\",\r\n\t\trepeat_year_label: \"Den\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Ingen slutdato\",\r\n\t\trepeat_text_occurences_count: \"gentagelse\",\r\n\t\trepeat_radio_end2: \"Efter\",\r\n\t\trepeat_radio_end3: \"Slut\",\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"März\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Dezember\"],\r\n\t\tday_for_recurring: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\" Januar\", \" Februar\", \" März \", \" April\", \" Mai\", \" Juni\", \" Juli\", \" August\", \" September \", \" Oktober\", \" November \", \" Dezember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mär\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dez\"],\r\n\t\tday_full: [ \"Sonntag\", \"Montag\", \"Dienstag\", \" Mittwoch\", \" Donnerstag\", \"Freitag\", \"Samstag\"],\r\n\t\tday_short: [\"So\", \"Mo\", \"Di\", \"Mi\", \"Do\", \"Fr\", \"Sa\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Heute\",\r\n\t\tday_tab: \"Tag\",\r\n\t\tweek_tab: \"Woche\",\r\n\t\tmonth_tab: \"Monat\",\r\n\t\tnew_event: \"neuer Eintrag\",\r\n\t\ticon_save: \"Speichern\",\r\n\t\ticon_cancel: \"Abbrechen\",\r\n\t\ticon_details: \"Details\",\r\n\t\ticon_edit: \"Ändern\",\r\n\t\ticon_delete: \"Löschen\",\r\n\t\tconfirm_closing: \"\", //\"Ihre Veränderungen werden verloren sein, wollen Sie ergänzen? \"\r\n\t\tconfirm_deleting: \"Der Eintrag wird gelöscht\",\r\n\t\tsection_description: \"Beschreibung\",\r\n\t\tsection_time: \"Zeitspanne\",\r\n\t\tfull_day: \"Ganzer Tag\",\r\n\r\n\t\tconfirm_recurring: \"Wollen Sie alle Einträge bearbeiten oder nur diesen einzelnen Eintrag?\",\r\n\t\tsection_recurring: \"Wiederholung\",\r\n\t\tbutton_recurring: \"Aus\",\r\n\t\tbutton_recurring_open: \"An\",\r\n\t\tbutton_edit_series: \"Bearbeiten Sie die Serie\",\r\n\t\tbutton_edit_occurrence: \"Bearbeiten Sie eine Kopie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Beschreibung\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Jahre\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Täglich\",\r\n\t\trepeat_radio_week: \"Wöchentlich\",\r\n\t\trepeat_radio_month: \"Monatlich\",\r\n\t\trepeat_radio_year: \"Jährlich\",\r\n\t\trepeat_radio_day_type: \"jeden\",\r\n\t\trepeat_text_day_count: \"Tag\",\r\n\t\trepeat_radio_day_type2: \"an jedem Arbeitstag\",\r\n\t\trepeat_week: \" Wiederholt sich jede\",\r\n\t\trepeat_text_week_count: \"Woche am:\",\r\n\t\trepeat_radio_month_type: \"an jedem\",\r\n\t\trepeat_radio_month_start: \"am\",\r\n\t\trepeat_text_month_day: \"Tag eines jeden\",\r\n\t\trepeat_text_month_count: \"Monats\",\r\n\t\trepeat_text_month_count2_before: \"jeden\",\r\n\t\trepeat_text_month_count2_after: \"Monats\",\r\n\t\trepeat_year_label: \"am\",\r\n\t\tselect_year_day2: \"im\",\r\n\t\trepeat_text_year_day: \"Tag im\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"kein Enddatum\",\r\n\t\trepeat_text_occurences_count: \"Ereignissen\",\r\n\t\trepeat_radio_end3: \"Schluß\",\r\n\t\trepeat_radio_end2: \"nach\",\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"März\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Dezember\"],\r\n\t\tday_for_recurring: [\"Sonntag\", \"Montag\", \"Dienstag\", \"Mittwoch\", \"Donnerstag\", \"Freitag\", \"Samstag\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Ιανουάριος\", \"Φεβρουάριος\", \"Μάρτιος\", \"Απρίλιος\", \"Μάϊος\", \"Ιούνιος\", \"Ιούλιος\", \"Αύγουστος\", \"Σεπτέμβριος\", \"Οκτώβριος\", \"Νοέμβριος\", \"Δεκέμβριος\"],\r\n\t\tmonth_short: [\"ΙΑΝ\", \"ΦΕΒ\", \"ΜΑΡ\", \"ΑΠΡ\", \"ΜΑΙ\", \"ΙΟΥΝ\", \"ΙΟΥΛ\", \"ΑΥΓ\", \"ΣΕΠ\", \"ΟΚΤ\", \"ΝΟΕ\", \"ΔΕΚ\"],\r\n\t\tday_full: [\"Κυριακή\", \"Δευτέρα\", \"Τρίτη\", \"Τετάρτη\", \"Πέμπτη\", \"Παρασκευή\", \"Σάββατο\"],\r\n\t\tday_short: [\"ΚΥ\", \"ΔΕ\", \"ΤΡ\", \"ΤΕ\", \"ΠΕ\", \"ΠΑ\", \"ΣΑ\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Σήμερα\",\r\n\t\tday_tab: \"Ημέρα\",\r\n\t\tweek_tab: \"Εβδομάδα\",\r\n\t\tmonth_tab: \"Μήνας\",\r\n\t\tnew_event: \"Νέο έργο\",\r\n\t\ticon_save: \"Αποθήκευση\",\r\n\t\ticon_cancel: \"Άκυρο\",\r\n\t\ticon_details: \"Λεπτομέρειες\",\r\n\t\ticon_edit: \"Επεξεργασία\",\r\n\t\ticon_delete: \"Διαγραφή\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Το έργο θα διαγραφεί οριστικά. Θέλετε να συνεχίσετε;\",\r\n\t\tsection_description: \"Περιγραφή\",\r\n\t\tsection_time: \"Χρονική περίοδος\",\r\n\t\tfull_day: \"Πλήρης Ημέρα\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Θέλετε να επεξεργασθείτε ολόκληρη την ομάδα των επαναλαμβανόμενων έργων;\",\r\n\t\tsection_recurring: \"Επαναλαμβανόμενο έργο\",\r\n\t\tbutton_recurring: \"Ανενεργό\",\r\n\t\tbutton_recurring_open: \"Ενεργό\",\r\n\t\tbutton_edit_series: \"Επεξεργαστείτε τη σειρά\",\r\n\t\tbutton_edit_occurrence: \"Επεξεργασία ένα αντίγραφο\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Ημερήσια Διάταξη\",\r\n\t\tdate: \"Ημερομηνία\",\r\n\t\tdescription: \"Περιγραφή\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Έτος\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Ημερήσια Διάταξη\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Πλέγμα\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Ημερησίως\",\r\n\t\trepeat_radio_week: \"Εβδομαδιαίως\",\r\n\t\trepeat_radio_month: \"Μηνιαίως\",\r\n\t\trepeat_radio_year: \"Ετησίως\",\r\n\t\trepeat_radio_day_type: \"Κάθε\",\r\n\t\trepeat_text_day_count: \"ημέρα\",\r\n\t\trepeat_radio_day_type2: \"Κάθε εργάσιμη\",\r\n\t\trepeat_week: \" Επανάληψη κάθε\",\r\n\t\trepeat_text_week_count: \"εβδομάδα τις επόμενες ημέρες:\",\r\n\t\trepeat_radio_month_type: \"Επανάληψη\",\r\n\t\trepeat_radio_month_start: \"Την\",\r\n\t\trepeat_text_month_day: \"ημέρα κάθε\",\r\n\t\trepeat_text_month_count: \"μήνα\",\r\n\t\trepeat_text_month_count2_before: \"κάθε\",\r\n\t\trepeat_text_month_count2_after: \"μήνα\",\r\n\t\trepeat_year_label: \"Την\",\r\n\t\tselect_year_day2: \"του\",\r\n\t\trepeat_text_year_day: \"ημέρα\",\r\n\t\tselect_year_month: \"μήνα\",\r\n\t\trepeat_radio_end: \"Χωρίς ημερομηνία λήξεως\",\r\n\t\trepeat_text_occurences_count: \"επαναλήψεις\",\r\n\t\trepeat_radio_end3: \"Λήγει την\",\r\n\t\trepeat_radio_end2: \"Μετά από\",\r\n\t\tmonth_for_recurring: [\"Ιανουάριος\", \"Φεβρουάριος\", \"Μάρτιος\", \"Απρίλιος\", \"Μάϊος\", \"Ιούνιος\", \"Ιούλιος\", \"Αύγουστος\", \"Σεπτέμβριος\", \"Οκτώβριος\", \"Νοέμβριος\", \"Δεκέμβριος\"],\r\n\t\tday_for_recurring: [\"Κυριακή\", \"Δευτέρα\", \"Τρίτη\", \"Τετάρτη\", \"Πέμπτη\", \"Παρασκευή\", \"Σάββατο\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate:{\r\n\t\tmonth_full:[\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\r\n\t\tmonth_short:[\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\r\n\t\tday_full:[\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\r\n\t\tday_short:[\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"]\r\n\t},\r\n\tlabels:{\r\n\t\tdhx_cal_today_button:\"Today\",\r\n\t\tday_tab:\"Day\",\r\n\t\tweek_tab:\"Week\",\r\n\t\tmonth_tab:\"Month\",\r\n\t\tnew_event:\"New event\",\r\n\t\ticon_save:\"Save\",\r\n\t\ticon_cancel:\"Cancel\",\r\n\t\ticon_details:\"Details\",\r\n\t\ticon_edit:\"Edit\",\r\n\t\ticon_delete:\"Delete\",\r\n\t\tconfirm_closing:\"\",//Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting:\"Event will be deleted permanently, are you sure?\",\r\n\t\tsection_description:\"Description\",\r\n\t\tsection_time:\"Time period\",\r\n\t\tfull_day:\"Full day\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring:\"Do you want to edit the whole set of repeated events?\",\r\n\t\tsection_recurring:\"Repeat event\",\r\n\t\tbutton_recurring:\"Disabled\",\r\n\t\tbutton_recurring_open:\"Enabled\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Edit occurrence\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"Agenda\",\r\n\t\tdate:\"Date\",\r\n\t\tdescription:\"Description\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"Year\",\r\n\r\n\t\t/* week agenda extension */\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daily\",//name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Weekly\",//name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Monthly\",\r\n\t\trepeat_radio_year: \"Yearly\",\r\n\t\trepeat_radio_day_type: \"Every\",\r\n\t\trepeat_text_day_count: \"day\",\r\n\t\trepeat_radio_day_type2: \"Every workday\",\r\n\t\trepeat_week: \" Repeat every\",\r\n\t\trepeat_text_week_count: \"week next days:\",\r\n\t\trepeat_radio_month_type: \"Repeat\",\r\n\t\trepeat_radio_month_start: \"On\",\r\n\t\trepeat_text_month_day: \"day every\",\r\n\t\trepeat_text_month_count: \"month\",\r\n\t\trepeat_text_month_count2_before: \"every\",\r\n\t\trepeat_text_month_count2_after: \"month\",\r\n\t\trepeat_year_label: \"On\",\r\n\t\tselect_year_day2: \"of\",\r\n\t\trepeat_text_year_day: \"day\",\r\n\t\tselect_year_month: \"month\",\r\n\t\trepeat_radio_end: \"No end date\",\r\n\t\trepeat_text_occurences_count: \"occurrences\",\r\n\t\trepeat_radio_end2: \"After\",\r\n\t\trepeat_radio_end3: \"End by\",\r\n\t\tmonth_for_recurring: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"]//\r\n\t}\r\n};\r\n\r\n","/*\r\n @Autor Manuel Fernandez Panzuela - www.mfernandez.es\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Enero\", \"Febrero\", \"Marzo\", \"Abril\", \"Mayo\", \"Junio\", \"Julio\", \"Agosto\", \"Septiembre\", \"Octubre\", \"Noviembre\", \"Diciembre\"],\r\n\t\tmonth_short: [\"Ene\", \"Feb\", \"Mar\", \"Abr\", \"May\", \"Jun\", \"Jul\", \"Ago\", \"Sep\", \"Oct\", \"Nov\", \"Dic\"],\r\n\t\tday_full: [\"Domingo\", \"Lunes\", \"Martes\", \"Miércoles\", \"Jueves\", \"Viernes\", \"Sábado\"],\r\n\t\tday_short: [\"Dom\", \"Lun\", \"Mar\", \"Mié\", \"Jue\", \"Vie\", \"Sáb\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hoy\",\r\n\t\tday_tab: \"Día\",\r\n\t\tweek_tab: \"Semana\",\r\n\t\tmonth_tab: \"Mes\",\r\n\t\tnew_event: \"Nuevo evento\",\r\n\t\ticon_save: \"Guardar\",\r\n\t\ticon_cancel: \"Cancelar\",\r\n\t\ticon_details: \"Detalles\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Eliminar\",\r\n\t\tconfirm_closing: \"\", //\"Sus cambios se perderán, continuar ?\"\r\n\t\tconfirm_deleting: \"El evento se borrará definitivamente, ¿continuar?\",\r\n\t\tsection_description: \"Descripción\",\r\n\t\tsection_time: \"Período\",\r\n\t\tfull_day: \"Todo el día\",\r\n\r\n\t\tconfirm_recurring: \"¿Desea modificar el conjunto de eventos repetidos?\",\r\n\t\tsection_recurring: \"Repita el evento\",\r\n\t\tbutton_recurring: \"Impedido\",\r\n\t\tbutton_recurring_open: \"Permitido\",\r\n\t\tbutton_edit_series: \"Editar la serie\",\r\n\t\tbutton_edit_occurrence: \"Editar este evento\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Día\",\r\n\t\tdate: \"Fecha\",\r\n\t\tdescription: \"Descripción\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Año\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Día\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Reja\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Diariamente\",\r\n\t\trepeat_radio_week: \"Semanalmente\",\r\n\t\trepeat_radio_month: \"Mensualmente\",\r\n\t\trepeat_radio_year: \"Anualmente\",\r\n\t\trepeat_radio_day_type: \"Cada\",\r\n\t\trepeat_text_day_count: \"dia\",\r\n\t\trepeat_radio_day_type2: \"Cada jornada de trabajo\",\r\n\t\trepeat_week: \" Repetir cada\",\r\n\t\trepeat_text_week_count: \"semana:\",\r\n\t\trepeat_radio_month_type: \"Repita\",\r\n\t\trepeat_radio_month_start: \"El\",\r\n\t\trepeat_text_month_day: \"dia cada \",\r\n\t\trepeat_text_month_count: \"mes\",\r\n\t\trepeat_text_month_count2_before: \"cada\",\r\n\t\trepeat_text_month_count2_after: \"mes\",\r\n\t\trepeat_year_label: \"El\",\r\n\t\tselect_year_day2: \"del\",\r\n\t\trepeat_text_year_day: \"dia\",\r\n\t\tselect_year_month: \"mes\",\r\n\t\trepeat_radio_end: \"Sin fecha de finalización\",\r\n\t\trepeat_text_occurences_count: \"ocurrencias\",\r\n\t\trepeat_radio_end3: \"Fin\",\r\n\t\trepeat_radio_end2: \"Después de\",\r\n\t\tmonth_for_recurring: [\"Enero\", \"Febrero\", \"Маrzo\", \"Аbril\", \"Mayo\", \"Junio\", \"Julio\", \"Аgosto\", \"Setiembre\", \"Octubre\", \"Noviembre\", \"Diciembre\"],\r\n\t\tday_for_recurring: [\"Domingo\", \"Lunes\", \"Martes\", \"Miércoles\", \"Jeuves\", \"Viernes\", \"Sabado\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Tammikuu\", \"Helmikuu\", \"Maaliskuu\", \"Huhtikuu\", \"Toukokuu\", \"Kesäkuu\", \"Heinäkuu\", \"Elokuu\", \"Syyskuu\", \"Lokakuu\", \"Marraskuu\", \"Joulukuu\"],\r\n\t\tmonth_short: [\"Tam\", \"Hel\", \"Maa\", \"Huh\", \"Tou\", \"Kes\", \"Hei\", \"Elo\", \"Syy\", \"Lok\", \"Mar\", \"Jou\"],\r\n\t\tday_full: [\"Sunnuntai\", \"Maanantai\", \"Tiistai\", \"Keskiviikko\", \"Torstai\", \"Perjantai\", \"Lauantai\"],\r\n\t\tday_short: [\"Su\", \"Ma\", \"Ti\", \"Ke\", \"To\", \"Pe\", \"La\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Tänään\",\r\n\t\tday_tab: \"Päivä\",\r\n\t\tweek_tab: \"Viikko\",\r\n\t\tmonth_tab: \"Kuukausi\",\r\n\t\tnew_event: \"Uusi tapahtuma\",\r\n\t\ticon_save: \"Tallenna\",\r\n\t\ticon_cancel: \"Peru\",\r\n\t\ticon_details: \"Tiedot\",\r\n\t\ticon_edit: \"Muokkaa\",\r\n\t\ticon_delete: \"Poista\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Haluatko varmasti poistaa tapahtuman?\",\r\n\t\tsection_description: \"Kuvaus\",\r\n\t\tsection_time: \"Aikajakso\",\r\n\t\tfull_day: \"Koko päivä\",\r\n\r\n\t\tconfirm_recurring: \"Haluatko varmasti muokata toistuvan tapahtuman kaikkia jaksoja?\",\r\n\t\tsection_recurring: \"Toista tapahtuma\",\r\n\t\tbutton_recurring: \"Ei käytössä\",\r\n\t\tbutton_recurring_open: \"Käytössä\",\r\n\t\tbutton_edit_series: \"Muokkaa sarja\",\r\n\t\tbutton_edit_occurrence: \"Muokkaa kopio\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Esityslista\",\r\n\t\tdate: \"Päivämäärä\",\r\n\t\tdescription: \"Kuvaus\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Vuoden\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Esityslista\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Ritilä\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Luo uusi vetämällä\",\r\n\t\tdrag_to_move:\"Siirrä vetämällä\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Päivittäin\",\r\n\t\trepeat_radio_week: \"Viikoittain\",\r\n\t\trepeat_radio_month: \"Kuukausittain\",\r\n\t\trepeat_radio_year: \"Vuosittain\",\r\n\t\trepeat_radio_day_type: \"Joka\",\r\n\t\trepeat_text_day_count: \"päivä\",\r\n\t\trepeat_radio_day_type2: \"Joka arkipäivä\",\r\n\t\trepeat_week: \"Toista joka\",\r\n\t\trepeat_text_week_count: \"viikko näinä päivinä:\",\r\n\t\trepeat_radio_month_type: \"Toista\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \"päivänä joka\",\r\n\t\trepeat_text_month_count: \"kuukausi\",\r\n\t\trepeat_text_month_count2_before: \"joka\",\r\n\t\trepeat_text_month_count2_after: \"kuukausi\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"päivä\",\r\n\t\tselect_year_month: \"kuukausi\",\r\n\t\trepeat_radio_end: \"Ei loppumisaikaa\",\r\n\t\trepeat_text_occurences_count: \"Toiston jälkeen\",\r\n\t\trepeat_radio_end3: \"Loppuu\",\r\n\t\trepeat_radio_end2: \"\",\r\n\t\tmonth_for_recurring: [\"Tammikuu\", \"Helmikuu\", \"Maaliskuu\", \"Huhtikuu\", \"Toukokuu\", \"Kesäkuu\", \"Heinäkuu\", \"Elokuu\", \"Syyskuu\", \"Lokakuu\", \"Marraskuu\", \"Joulukuu\"],\r\n\t\tday_for_recurring: [\"Sunnuntai\", \"Maanantai\", \"Tiistai\", \"Keskiviikko\", \"Torstai\", \"Perjantai\", \"Lauantai\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Janvier\", \"Février\", \"Mars\", \"Avril\", \"Mai\", \"Juin\", \"Juillet\", \"Août\", \"Septembre\", \"Octobre\", \"Novembre\", \"Décembre\"],\r\n\t\tmonth_short: [\"Jan\", \"Fév\", \"Mar\", \"Avr\", \"Mai\", \"Juin\", \"Juil\", \"Aoû\", \"Sep\", \"Oct\", \"Nov\", \"Déc\"],\r\n\t\tday_full: [\"Dimanche\", \"Lundi\", \"Mardi\", \"Mercredi\", \"Jeudi\", \"Vendredi\", \"Samedi\"],\r\n\t\tday_short: [\"Dim\", \"Lun\", \"Mar\", \"Mer\", \"Jeu\", \"Ven\", \"Sam\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Aujourd'hui\",\r\n\t\tday_tab: \"Jour\",\r\n\t\tweek_tab: \"Semaine\",\r\n\t\tmonth_tab: \"Mois\",\r\n\t\tnew_event: \"Nouvel événement\",\r\n\t\ticon_save: \"Enregistrer\",\r\n\t\ticon_cancel: \"Annuler\",\r\n\t\ticon_details: \"Détails\",\r\n\t\ticon_edit: \"Modifier\",\r\n\t\ticon_delete: \"Effacer\",\r\n\t\tconfirm_closing: \"\", //Vos modifications seront perdus, êtes-vous sûr ?\r\n\t\tconfirm_deleting: \"L'événement sera effacé sans appel, êtes-vous sûr ?\",\r\n\t\tsection_description: \"Description\",\r\n\t\tsection_time: \"Période\",\r\n\t\tfull_day: \"Journée complète\",\r\n\r\n\t\tconfirm_recurring: \"Voulez-vous éditer toute une série d'évènements répétés?\",\r\n\t\tsection_recurring: \"Périodicité\",\r\n\t\tbutton_recurring: \"Désactivé\",\r\n\t\tbutton_recurring_open: \"Activé\",\r\n\t\tbutton_edit_series: \"Modifier la série\",\r\n\t\tbutton_edit_occurrence: \"Modifier une copie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Jour\",\r\n\t\tdate: \"Date\",\r\n\t\tdescription: \"Description\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Année\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Jour\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grille\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Quotidienne\",\r\n\t\trepeat_radio_week: \"Hebdomadaire\",\r\n\t\trepeat_radio_month: \"Mensuelle\",\r\n\t\trepeat_radio_year: \"Annuelle\",\r\n\t\trepeat_radio_day_type: \"Chaque\",\r\n\t\trepeat_text_day_count: \"jour\",\r\n\t\trepeat_radio_day_type2: \"Chaque journée de travail\",\r\n\t\trepeat_week: \" Répéter toutes les\",\r\n\t\trepeat_text_week_count: \"semaine:\",\r\n\t\trepeat_radio_month_type: \"Répéter\",\r\n\t\trepeat_radio_month_start: \"Le\",\r\n\t\trepeat_text_month_day: \"jour chaque\",\r\n\t\trepeat_text_month_count: \"mois\",\r\n\t\trepeat_text_month_count2_before: \"chaque\",\r\n\t\trepeat_text_month_count2_after: \"mois\",\r\n\t\trepeat_year_label: \"Le\",\r\n\t\tselect_year_day2: \"du\",\r\n\t\trepeat_text_year_day: \"jour\",\r\n\t\tselect_year_month: \"mois\",\r\n\t\trepeat_radio_end: \"Pas de date d"achèvement\",\r\n\t\trepeat_text_occurences_count: \"occurrences\",\r\n\t\trepeat_radio_end3: \"Fin\",\r\n\t\trepeat_radio_end2: \"Après\",\r\n\t\tmonth_for_recurring: [\"Janvier\", \"Février\", \"Mars\", \"Avril\", \"Mai\", \"Juin\", \"Juillet\", \"Août\", \"Septembre\", \"Octobre\", \"Novembre\", \"Décembre\"],\r\n\t\tday_for_recurring: [\"Dimanche\", \"Lundi\", \"Mardi\", \"Mercredi\", \"Jeudi\", \"Vendredi\", \"Samedi\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"ינואר\", \"פברואר\", \"מרץ\", \"אפריל\", \"מאי\", \"יוני\", \"יולי\", \"אוגוסט\", \"ספטמבר\", \"אוקטובר\", \"נובמבר\", \"דצמבר\"],\r\n\t\tmonth_short: [\"ינו\", \"פבר\", \"מרץ\", \"אפר\", \"מאי\", \"יונ\", \"יול\", \"אוג\", \"ספט\", \"אוק\", \"נוב\", \"דצמ\"],\r\n\t\tday_full: [\"ראשון\", \"שני\", \"שלישי\", \"רביעי\", \"חמישי\", \"שישי\", \"שבת\"],\r\n\t\tday_short: [\"א\", \"ב\", \"ג\", \"ד\", \"ה\", \"ו\", \"ש\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"היום\",\r\n\t\tday_tab: \"יום\",\r\n\t\tweek_tab: \"שבוע\",\r\n\t\tmonth_tab: \"חודש\",\r\n\t\tnew_event: \"ארוע חדש\",\r\n\t\ticon_save: \"שמור\",\r\n\t\ticon_cancel: \"בטל\",\r\n\t\ticon_details: \"פרטים\",\r\n\t\ticon_edit: \"ערוך\",\r\n\t\ticon_delete: \"מחק\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"ארוע ימחק סופית.להמשיך?\",\r\n\t\tsection_description: \"תיאור\",\r\n\t\tsection_time: \"תקופה\",\r\n\r\n\t\tconfirm_recurring: \"האם ברצונך לשנות כל סדרת ארועים מתמשכים?\",\r\n\t\tsection_recurring: \"להעתיק ארוע\",\r\n\t\tbutton_recurring: \"לא פעיל\",\r\n\t\tbutton_recurring_open: \"פעיל\",\r\n\t\tfull_day: \"יום שלם\",\r\n\t\tbutton_edit_series: \"ערוך את הסדרה\",\r\n\t\tbutton_edit_occurrence: \"עריכת עותק\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"סדר יום\",\r\n\t\tdate: \"תאריך\",\r\n\t\tdescription: \"תיאור\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"לשנה\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"סדר יום\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"סורג\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"גרור כדי להזיז\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"בטל\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"הבא\",\r\n\t\tprev: \"הקודם\",\r\n\t\tyear: \"שנה\",\r\n\t\tmonth: \"חודש\",\r\n\t\tday: \"יום\",\r\n\t\thour:\"שעה\",\r\n\t\tminute: \"דקה\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"יומי\",\r\n\t\trepeat_radio_week: \"שבועי\",\r\n\t\trepeat_radio_month: \"חודשי\",\r\n\t\trepeat_radio_year: \"שנתי\",\r\n\t\trepeat_radio_day_type: \"חזור כל\",\r\n\t\trepeat_text_day_count: \"ימים\",\r\n\t\trepeat_radio_day_type2: \"חזור כל יום עבודה\",\r\n\t\trepeat_week: \" חזור כל\",\r\n\t\trepeat_text_week_count: \"שבוע לפי ימים:\",\r\n\t\trepeat_radio_month_type: \"חזור כל\",\r\n\t\trepeat_radio_month_start: \"כל\",\r\n\t\trepeat_text_month_day: \"ימים כל\",\r\n\t\trepeat_text_month_count: \"חודשים\",\r\n\t\trepeat_text_month_count2_before: \"חזור כל\",\r\n\t\trepeat_text_month_count2_after: \"חודש\",\r\n\t\trepeat_year_label: \"כל\",\r\n\t\tselect_year_day2: \"בחודש\",\r\n\t\trepeat_text_year_day: \"ימים\",\r\n\t\tselect_year_month: \"חודש\",\r\n\t\trepeat_radio_end: \"לעולם לא מסתיים\",\r\n\t\trepeat_text_occurences_count: \"אירועים\",\r\n\t\trepeat_radio_end3: \"מסתיים ב\",\r\n\t\trepeat_radio_end2: \"אחרי\",\r\n\t\tmonth_for_recurring: [\"ינואר\", \"פברואר\", \"מרץ\", \"אפריל\", \"מאי\", \"יוני\", \"יולי\", \"אוגוסט\", \"ספטמבר\", \"אוקטובר\", \"נובמבר\", \"דצמבר\"],\r\n\t\tday_for_recurring: [\"ראשון\", \"שני\", \"שלישי\", \"רביעי\", \"חמישי\", \"שישי\", \"שבת\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Január\", \"Február\", \"Március\", \"Április\", \"Május\", \"Június\", \"Július\", \"Augusztus\", \"Szeptember\", \"Október\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Már\", \"Ápr\", \"Máj\", \"Jún\", \"Júl\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Vasárnap\", \"Hétfõ\", \"Kedd\", \"Szerda\", \"Csütörtök\", \"Péntek\", \"szombat\"],\r\n\t\tday_short: [\"Va\", \"Hé\", \"Ke\", \"Sze\", \"Csü\", \"Pé\", \"Szo\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Ma\",\r\n\t\tday_tab: \"Nap\",\r\n\t\tweek_tab: \"Hét\",\r\n\t\tmonth_tab: \"Hónap\",\r\n\t\tnew_event: \"Új esemény\",\r\n\t\ticon_save: \"Mentés\",\r\n\t\ticon_cancel: \"Mégse\",\r\n\t\ticon_details: \"Részletek\",\r\n\t\ticon_edit: \"Szerkesztés\",\r\n\t\ticon_delete: \"Törlés\",\r\n\t\tconfirm_closing: \"\", //A változások elvesznek, biztosan folytatja? \"\r\n\t\tconfirm_deleting: \"Az esemény törölve lesz, biztosan folytatja?\",\r\n\t\tsection_description: \"Leírás\",\r\n\t\tsection_time: \"Idõszak\",\r\n\t\tfull_day: \"Egesz napos\",\r\n\r\n\t\t/*ismétlõdõ események*/\r\n\t\tconfirm_recurring: \"Biztosan szerkeszteni akarod az összes ismétlõdõ esemény beállítását?\",\r\n\t\tsection_recurring: \"Esemény ismétlése\",\r\n\t\tbutton_recurring: \"Tiltás\",\r\n\t\tbutton_recurring_open: \"Engedélyezés\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Szerkesztés bíróság\",\r\n\r\n\t\t/*napirendi nézet*/\r\n\t\tagenda_tab: \"Napirend\",\r\n\t\tdate: \"Dátum\",\r\n\t\tdescription: \"Leírás\",\r\n\r\n\t\t/*éves nézet*/\r\n\t\tyear_tab: \"Év\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Maret\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Agustus\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mei\", \"Jun\", \"Jul\", \"Ags\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Minggu\", \"Senin\", \"Selasa\", \"Rabu\", \"Kamis\", \"Jumat\", \"Sabtu\"],\r\n\t\tday_short: [\"Ming\", \"Sen\", \"Sel\", \"Rab\", \"Kam\", \"Jum\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hari Ini\",\r\n\t\tday_tab: \"Hari\",\r\n\t\tweek_tab: \"Minggu\",\r\n\t\tmonth_tab: \"Bulan\",\r\n\t\tnew_event: \"Acara Baru\",\r\n\t\ticon_save: \"Simpan\",\r\n\t\ticon_cancel: \"Batal\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edit\",\r\n\t\ticon_delete: \"Hapus\",\r\n\t\tconfirm_closing: \"\", /*Perubahan tidak akan disimpan ?*/\r\n\t\tconfirm_deleting: \"Acara akan dihapus\",\r\n\t\tsection_description: \"Keterangan\",\r\n\t\tsection_time: \"Periode\",\r\n\t\tfull_day: \"Hari penuh\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Apakah acara ini akan berulang?\",\r\n\t\tsection_recurring: \"Acara Rutin\",\r\n\t\tbutton_recurring: \"Tidak Difungsikan\",\r\n\t\tbutton_recurring_open: \"Difungsikan\",\r\n\t\tbutton_edit_series: \"Mengedit seri\",\r\n\t\tbutton_edit_occurrence: \"Mengedit salinan\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Tanggal\",\r\n\t\tdescription: \"Keterangan\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Tahun\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabel\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Gennaio\", \"Febbraio\", \"Marzo\", \"Aprile\", \"Maggio\", \"Giugno\", \"Luglio\", \"Agosto\", \"Settembre\", \"Ottobre\", \"Novembre\", \"Dicembre\"],\r\n\t\tmonth_short: [\"Gen\", \"Feb\", \"Mar\", \"Apr\", \"Mag\", \"Giu\", \"Lug\", \"Ago\", \"Set\", \"Ott\", \"Nov\", \"Dic\"],\r\n\t\tday_full: [\"Domenica\", \"Lunedì\", \"Martedì\", \"Mercoledì\", \"Giovedì\", \"Venerdì\", \"Sabato\"],\r\n\t\tday_short: [\"Dom\", \"Lun\", \"Mar\", \"Mer\", \"Gio\", \"Ven\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Oggi\",\r\n\t\tday_tab: \"Giorno\",\r\n\t\tweek_tab: \"Settimana\",\r\n\t\tmonth_tab: \"Mese\",\r\n\t\tnew_event: \"Nuovo evento\",\r\n\t\ticon_save: \"Salva\",\r\n\t\ticon_cancel: \"Chiudi\",\r\n\t\ticon_details: \"Dettagli\",\r\n\t\ticon_edit: \"Modifica\",\r\n\t\ticon_delete: \"Elimina\",\r\n\t\tconfirm_closing: \"\", //Le modifiche apportate saranno perse, siete sicuri?\r\n\t\tconfirm_deleting: \"L'evento sarà eliminato, siete sicuri?\",\r\n\t\tsection_description: \"Descrizione\",\r\n\t\tsection_time: \"Periodo di tempo\",\r\n\t\tfull_day: \"Intera giornata\",\r\n\r\n\t\tconfirm_recurring: \"Vuoi modificare l'intera serie di eventi?\",\r\n\t\tsection_recurring: \"Ripetere l'evento\",\r\n\t\tbutton_recurring: \"Disattivato\",\r\n\t\tbutton_recurring_open: \"Attivato\",\r\n\t\tbutton_edit_series: \"Modificare la serie\",\r\n\t\tbutton_edit_occurrence: \"Modificare una copia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descrizione\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Anno\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Griglia\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Quotidiano\",\r\n\t\trepeat_radio_week: \"Settimanale\",\r\n\t\trepeat_radio_month: \"Mensile\",\r\n\t\trepeat_radio_year: \"Annuale\",\r\n\t\trepeat_radio_day_type: \"Ogni\",\r\n\t\trepeat_text_day_count: \"giorno\",\r\n\t\trepeat_radio_day_type2: \"Ogni giornata lavorativa\",\r\n\t\trepeat_week: \" Ripetere ogni\",\r\n\t\trepeat_text_week_count: \"settimana:\",\r\n\t\trepeat_radio_month_type: \"Ripetere\",\r\n\t\trepeat_radio_month_start: \"Il\",\r\n\t\trepeat_text_month_day: \"giorno ogni\",\r\n\t\trepeat_text_month_count: \"mese\",\r\n\t\trepeat_text_month_count2_before: \"ogni\",\r\n\t\trepeat_text_month_count2_after: \"mese\",\r\n\t\trepeat_year_label: \"Il\",\r\n\t\tselect_year_day2: \"del\",\r\n\t\trepeat_text_year_day: \"giorno\",\r\n\t\tselect_year_month: \"mese\",\r\n\t\trepeat_radio_end: \"Senza data finale\",\r\n\t\trepeat_text_occurences_count: \"occorenze\",\r\n\t\trepeat_radio_end3: \"Fine\",\r\n\t\trepeat_radio_end2: \"Dopo\",\r\n\t\tmonth_for_recurring: [\"Gennaio\", \"Febbraio\", \"Marzo\", \"Aprile\", \"Maggio\", \"Jiugno\", \"Luglio\", \"Agosto\", \"Settembre\", \"Ottobre\", \"Novembre\", \"Dicembre\"],\r\n\t\tday_for_recurring: [\"Domenica\", \"Lunedì\", \"Martedì\", \"Mercoledì\", \"Jovedì\", \"Venerdì\", \"Sabato\"]\r\n\t}\r\n};\r\n","/*\r\n Translation by Genexus Japan Inc.\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tmonth_short: [ \"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tday_full: [\"日曜日\", \"月曜日\", \"火曜日\", \"水曜日\", \"木曜日\", \"金曜日\", \"土曜日\"],\r\n\t\tday_short: [\"日\", \"月\", \"火\", \"水\", \"木\", \"金\", \"土\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"今日\",\r\n\t\tday_tab: \"日\",\r\n\t\tweek_tab: \"週\",\r\n\t\tmonth_tab: \"月\",\r\n\t\tnew_event: \"新イベント\",\r\n\t\ticon_save: \"保存\",\r\n\t\ticon_cancel: \"キャンセル\",\r\n\t\ticon_details: \"詳細\",\r\n\t\ticon_edit: \"編集\",\r\n\t\ticon_delete: \"削除\",\r\n\t\tconfirm_closing: \"\", //変更が取り消されます、宜しいですか?\r\n\t\tconfirm_deleting: \"イベント完全に削除されます、宜しいですか?\",\r\n\t\tsection_description: \"デスクリプション\",\r\n\t\tsection_time: \"期間\",\r\n\t\tconfirm_recurring: \"繰り返されているイベントを全て編集しますか?\",\r\n\t\tsection_recurring: \"イベントを繰り返す\",\r\n\t\tbutton_recurring: \"無効\",\r\n\t\tbutton_recurring_open: \"有効\",\r\n\t\tfull_day: \"終日\",\r\n\t\tbutton_edit_series: \"シリーズを編集します\",\r\n\t\tbutton_edit_occurrence: \"コピーを編集\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"議題は\",\r\n\t\tdate: \"日付\",\r\n\t\tdescription: \"説明\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"今年\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"議題は\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"グリッド\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};\r\n\r\n\r\n","export default class LocaleManager{\r\n\tconstructor(config){\r\n\t\tthis._locales = {};\r\n\t\tfor(const i in config){\r\n\t\t\tthis._locales[i] = config[i];\r\n\t\t}\r\n\t}\r\n\r\n\taddLocale(name, locale) {\r\n\t\tthis._locales[name] = locale;\r\n\t}\r\n\r\n\tgetLocale(name) {\r\n\t\treturn this._locales[name];\r\n\t}\r\n}","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Mon\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"I dag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uke\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny hendelse\",\r\n\t\ticon_save: \"Lagre\",\r\n\t\ticon_cancel: \"Avbryt\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Rediger\",\r\n\t\ticon_delete: \"Slett\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Hendelsen vil bli slettet permanent. Er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du forandre hele dette settet av repeterende hendelser?\",\r\n\t\tsection_recurring: \"Repeter hendelsen\",\r\n\t\tbutton_recurring: \"Av\",\r\n\t\tbutton_recurring_open: \"På\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Redigere en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daglig\",\r\n\t\trepeat_radio_week: \"Ukentlig\",\r\n\t\trepeat_radio_month: \"Månedlig\",\r\n\t\trepeat_radio_year: \"Årlig\",\r\n\t\trepeat_radio_day_type: \"Hver\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"Alle hverdager\",\r\n\t\trepeat_week: \" Gjentas hver\",\r\n\t\trepeat_text_week_count: \"uke på:\",\r\n\t\trepeat_radio_month_type: \"På hver\",\r\n\t\trepeat_radio_month_start: \"På\",\r\n\t\trepeat_text_month_day: \"dag hver\",\r\n\t\trepeat_text_month_count: \"måned\",\r\n\t\trepeat_text_month_count2_before: \"hver\",\r\n\t\trepeat_text_month_count2_after: \"måned\",\r\n\t\trepeat_year_label: \"på\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Ingen sluttdato\",\r\n\t\trepeat_text_occurences_count: \"forekomst\",\r\n\t\trepeat_radio_end3: \"Stop den\",\r\n\t\trepeat_radio_end2: \"Etter\",\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tday_for_recurring: [\"Sondag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Maart\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Augustus\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"mrt\", \"Apr\", \"Mei\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Zondag\", \"Maandag\", \"Dinsdag\", \"Woensdag\", \"Donderdag\", \"Vrijdag\", \"Zaterdag\"],\r\n\t\tday_short: [\"Zo\", \"Ma\", \"Di\", \"Wo\", \"Do\", \"Vr\", \"Za\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Vandaag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Week\",\r\n\t\tmonth_tab: \"Maand\",\r\n\t\tnew_event: \"Nieuw item\",\r\n\t\ticon_save: \"Opslaan\",\r\n\t\ticon_cancel: \"Annuleren\",\r\n\t\ticon_details: \"Details\",\r\n\t\ticon_edit: \"Bewerken\",\r\n\t\ticon_delete: \"Verwijderen\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Item zal permanent worden verwijderd, doorgaan?\",\r\n\t\tsection_description: \"Beschrijving\",\r\n\t\tsection_time: \"Tijd periode\",\r\n\t\tfull_day: \"Hele dag\",\r\n\r\n\t\tconfirm_recurring: \"Wilt u alle terugkerende items bijwerken?\",\r\n\t\tsection_recurring: \"Item herhalen\",\r\n\t\tbutton_recurring: \"Uit\",\r\n\t\tbutton_recurring_open: \"Aan\",\r\n\t\tbutton_edit_series: \"Bewerk de serie\",\r\n\t\tbutton_edit_occurrence: \"Bewerk een kopie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Omschrijving\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Jaar\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabel\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Dagelijks\",\r\n\t\trepeat_radio_week: \"Wekelijks\",\r\n\t\trepeat_radio_month: \"Maandelijks\",\r\n\t\trepeat_radio_year: \"Jaarlijks\",\r\n\t\trepeat_radio_day_type: \"Elke\",\r\n\t\trepeat_text_day_count: \"dag(en)\",\r\n\t\trepeat_radio_day_type2: \"Elke werkdag\",\r\n\t\trepeat_week: \" Herhaal elke\",\r\n\t\trepeat_text_week_count: \"week op de volgende dagen:\",\r\n\t\trepeat_radio_month_type: \"Herhaal\",\r\n\t\trepeat_radio_month_start: \"Op\",\r\n\t\trepeat_text_month_day: \"dag iedere\",\r\n\t\trepeat_text_month_count: \"maanden\",\r\n\t\trepeat_text_month_count2_before: \"iedere\",\r\n\t\trepeat_text_month_count2_after: \"maanden\",\r\n\t\trepeat_year_label: \"Op\",\r\n\t\tselect_year_day2: \"van\",\r\n\t\trepeat_text_year_day: \"dag\",\r\n\t\tselect_year_month: \"maand\",\r\n\t\trepeat_radio_end: \"Geen eind datum\",\r\n\t\trepeat_text_occurences_count: \"keren\",\r\n\t\trepeat_radio_end3: \"Eindigd per\",\r\n\t\trepeat_radio_end2: \"Na\",\r\n\t\tmonth_for_recurring: [\"Januari\", \"Februari\", \"Maart\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Augustus\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Zondag\", \"Maandag\", \"Dinsdag\", \"Woensdag\", \"Donderdag\", \"Vrijdag\", \"Zaterdag\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Man\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uke\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny\",\r\n\t\ticon_save: \"Lagre\",\r\n\t\ticon_cancel: \"Avbryt\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Endre\",\r\n\t\ticon_delete: \"Slett\",\r\n\t\tconfirm_closing: \"Endringer blir ikke lagret, er du sikker?\", //Endringer blir ikke lagret, er du sikker?\r\n\t\tconfirm_deleting: \"Oppføringen vil bli slettet, er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\t\tfull_day: \"Full dag\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du endre hele settet med repeterende oppføringer?\",\r\n\t\tsection_recurring: \"Repeterende oppføring\",\r\n\t\tbutton_recurring: \"Ikke aktiv\",\r\n\t\tbutton_recurring_open: \"Aktiv\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Redigere en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Styczeń\", \"Luty\", \"Marzec\", \"Kwiecień\", \"Maj\", \"Czerwiec\", \"Lipiec\", \"Sierpień\", \"Wrzesień\", \"Październik\", \"Listopad\", \"Grudzień\"],\r\n\t\tmonth_short: [\"Sty\", \"Lut\", \"Mar\", \"Kwi\", \"Maj\", \"Cze\", \"Lip\", \"Sie\", \"Wrz\", \"Paź\", \"Lis\", \"Gru\"],\r\n\t\tday_full: [\"Niedziela\", \"Poniedziałek\", \"Wtorek\", \"Środa\", \"Czwartek\", \"Piątek\", \"Sobota\"],\r\n\t\tday_short: [\"Nie\", \"Pon\", \"Wto\", \"Śro\", \"Czw\", \"Pią\", \"Sob\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dziś\",\r\n\t\tday_tab: \"Dzień\",\r\n\t\tweek_tab: \"Tydzień\",\r\n\t\tmonth_tab: \"Miesiąc\",\r\n\t\tnew_event: \"Nowe zdarzenie\",\r\n\t\ticon_save: \"Zapisz\",\r\n\t\ticon_cancel: \"Anuluj\",\r\n\t\ticon_details: \"Szczegóły\",\r\n\t\ticon_edit: \"Edytuj\",\r\n\t\ticon_delete: \"Usuń\",\r\n\t\tconfirm_closing: \"\", //Zmiany zostaną usunięte, jesteś pewien?\r\n\t\tconfirm_deleting: \"Zdarzenie zostanie usunięte na zawsze, kontynuować?\",\r\n\t\tsection_description: \"Opis\",\r\n\t\tsection_time: \"Okres czasu\",\r\n\t\tfull_day: \"Cały dzień\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Czy chcesz edytować cały zbiór powtarzających się zdarzeń?\",\r\n\t\tsection_recurring: \"Powtórz zdarzenie\",\r\n\t\tbutton_recurring: \"Nieaktywne\",\r\n\t\tbutton_recurring_open: \"Aktywne\",\r\n\t\tbutton_edit_series: \"Edytuj serię\",\r\n\t\tbutton_edit_occurrence: \"Edytuj kopię\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Opis\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabela\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Codziennie\",\r\n\t\trepeat_radio_week: \"Co tydzie\",\r\n\t\trepeat_radio_month: \"Co miesic\",\r\n\t\trepeat_radio_year: \"Co rok\",\r\n\t\trepeat_radio_day_type: \"Kadego\",\r\n\t\trepeat_text_day_count: \"dnia\",\r\n\t\trepeat_radio_day_type2: \"Kadego dnia roboczego\",\r\n\t\trepeat_week: \" Powtarzaj kadego\",\r\n\t\trepeat_text_week_count: \"tygodnia w dni:\",\r\n\t\trepeat_radio_month_type: \"Powtrz\",\r\n\t\trepeat_radio_month_start: \"W\",\r\n\t\trepeat_text_month_day: \"dnia kadego\",\r\n\t\trepeat_text_month_count: \"miesica\",\r\n\t\trepeat_text_month_count2_before: \"kadego\",\r\n\t\trepeat_text_month_count2_after: \"miesica\",\r\n\t\trepeat_year_label: \"W\",\r\n\t\tselect_year_day2: \"miesica\",\r\n\t\trepeat_text_year_day: \"dnia miesica\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Bez daty kocowej\",\r\n\t\trepeat_text_occurences_count: \"wystpieniu/ach\",\r\n\t\trepeat_radio_end3: \"Zakocz w\",\r\n\t\trepeat_radio_end2: \"Po\",\r\n\t\tmonth_for_recurring: [\"Stycznia\", \"Lutego\", \"Marca\", \"Kwietnia\", \"Maja\", \"Czerwca\", \"Lipca\", \"Sierpnia\", \"Wrzenia\", \"Padziernka\", \"Listopada\", \"Grudnia\"],\r\n\t\tday_for_recurring: [\"Niedziela\", \"Poniedziaek\", \"Wtorek\", \"roda\", \"Czwartek\", \"Pitek\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","/*\r\n\r\n TRANSLATION BY MATTHEUS PIROVANI RORIZ GONЗALVES\r\n\r\n mattheusroriz@hotmail.com / mattheus.pirovani@gmail.com /\r\n\r\n www.atrixian.com.br\r\n\r\n */\r\n\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Janeiro\", \"Fevereiro\", \"Março\", \"Abril\", \"Maio\", \"Junho\", \"Julho\", \"Agosto\", \"Setembro\", \"Outubro\", \"Novembro\", \"Dezembro\"],\r\n\t\tmonth_short: [\"Jan\", \"Fev\", \"Mar\", \"Abr\", \"Mai\", \"Jun\", \"Jul\", \"Ago\", \"Set\", \"Out\", \"Nov\", \"Dez\"],\r\n\t\tday_full: [\"Domingo\", \"Segunda\", \"Terça\", \"Quarta\", \"Quinta\", \"Sexta\", \"Sábado\"],\r\n\t\tday_short: [\"Dom\", \"Seg\", \"Ter\", \"Qua\", \"Qui\", \"Sex\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hoje\",\r\n\t\tday_tab: \"Dia\",\r\n\t\tweek_tab: \"Semana\",\r\n\t\tmonth_tab: \"Mês\",\r\n\t\tnew_event: \"Novo evento\",\r\n\t\ticon_save: \"Salvar\",\r\n\t\ticon_cancel: \"Cancelar\",\r\n\t\ticon_details: \"Detalhes\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Deletar\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Tem certeza que deseja excluir?\",\r\n\t\tsection_description: \"Descrição\",\r\n\t\tsection_time: \"Período de tempo\",\r\n\t\tfull_day: \"Dia inteiro\",\r\n\r\n\t\tconfirm_recurring: \"Deseja editar todos esses eventos repetidos?\",\r\n\t\tsection_recurring: \"Repetir evento\",\r\n\t\tbutton_recurring: \"Desabilitar\",\r\n\t\tbutton_recurring_open: \"Habilitar\",\r\n\t\tbutton_edit_series: \"Editar a série\",\r\n\t\tbutton_edit_occurrence: \"Editar uma cópia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dia\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descrição\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Ano\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dia\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grade\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Diário\",\r\n\t\trepeat_radio_week: \"Semanal\",\r\n\t\trepeat_radio_month: \"Mensal\",\r\n\t\trepeat_radio_year: \"Anual\",\r\n\t\trepeat_radio_day_type: \"Cada\",\r\n\t\trepeat_text_day_count: \"dia(s)\",\r\n\t\trepeat_radio_day_type2: \"Cada trabalho diário\",\r\n\t\trepeat_week: \" Repita cada\",\r\n\t\trepeat_text_week_count: \"semana:\",\r\n\t\trepeat_radio_month_type: \"Repetir\",\r\n\t\trepeat_radio_month_start: \"Em\",\r\n\t\trepeat_text_month_day: \"todo dia\",\r\n\t\trepeat_text_month_count: \"mês\",\r\n\t\trepeat_text_month_count2_before: \"todo\",\r\n\t\trepeat_text_month_count2_after: \"mês\",\r\n\t\trepeat_year_label: \"Em\",\r\n\t\tselect_year_day2: \"of\",\r\n\t\trepeat_text_year_day: \"dia\",\r\n\t\tselect_year_month: \"mês\",\r\n\t\trepeat_radio_end: \"Sem data final\",\r\n\t\trepeat_text_occurences_count: \"ocorrências\",\r\n\t\trepeat_radio_end3: \"Fim\",\r\n\t\trepeat_radio_end2: \"Depois\",\r\n\t\tmonth_for_recurring: [\"Janeiro\", \"Fevereiro\", \"Março\", \"Abril\", \"Maio\", \"Junho\", \"Julho\", \"Agosto\", \"Setembro\", \"Outubro\", \"Novembro\", \"Dezembro\"],\r\n\t\tday_for_recurring: [\"Domingo\", \"Segunda\", \"Terça\", \"Quarta\", \"Quinta\", \"Sexta\", \"Sábado\"]\r\n\t}\r\n};\r\n\r\n\r\n","/*\r\n\tTraducere de Ovidiu Lixandru: http://www.madball.ro\r\n */\r\n\r\nexport default {\r\n\tdate:{\r\n\t\tmonth_full:[\"Ianuarie\", \"Februarie\", \"Martie\", \"Aprilie\", \"Mai\", \"Iunie\", \"Iulie\", \"August\", \"Septembrie\", \"Octombrie\", \"November\", \"December\"],\r\n\t\tmonth_short:[\"Ian\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Iun\", \"Iul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\r\n\t\tday_full:[\"Duminica\", \"Luni\", \"Marti\", \"Miercuri\", \"Joi\", \"Vineri\", \"Sambata\"],\r\n\t\tday_short:[\"Du\", \"Lu\", \"Ma\", \"Mi\", \"Jo\", \"Vi\", \"Sa\"]\r\n\t},\r\n\tlabels:{\r\n\t\tdhx_cal_today_button:\"Astazi\",\r\n\t\tday_tab:\"Zi\",\r\n\t\tweek_tab:\"Saptamana\",\r\n\t\tmonth_tab:\"Luna\",\r\n\t\tnew_event:\"Eveniment nou\",\r\n\t\ticon_save:\"Salveaza\",\r\n\t\ticon_cancel:\"Anuleaza\",\r\n\t\ticon_details:\"Detalii\",\r\n\t\ticon_edit:\"Editeaza\",\r\n\t\ticon_delete:\"Sterge\",\r\n\t\tconfirm_closing:\"Schimbarile nu vor fi salvate, esti sigur?\",//Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting:\"Evenimentul va fi sters permanent, esti sigur?\",\r\n\t\tsection_description:\"Descriere\",\r\n\t\tsection_time:\"Interval\",\r\n\t\tfull_day:\"Toata ziua\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring:\"Vrei sa editezi toata seria de evenimente repetate?\",\r\n\t\tsection_recurring:\"Repetare\",\r\n\t\tbutton_recurring:\"Dezactivata\",\r\n\t\tbutton_recurring_open:\"Activata\",\r\n\t\tbutton_edit_series: \"Editeaza serie\",\r\n\t\tbutton_edit_occurrence: \"Editeaza doar intrare\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"Agenda\",\r\n\t\tdate:\"Data\",\r\n\t\tdescription:\"Descriere\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"An\",\r\n\r\n\t\t/* week agenda extension */\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Lista\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Zilnic\",\r\n\t\trepeat_radio_week: \"Saptamanal\",\r\n\t\trepeat_radio_month: \"Lunar\",\r\n\t\trepeat_radio_year: \"Anual\",\r\n\t\trepeat_radio_day_type: \"La fiecare\",\r\n\t\trepeat_text_day_count: \"zi(le)\",\r\n\t\trepeat_radio_day_type2: \"Fiecare zi lucratoare\",\r\n\t\trepeat_week: \" Repeta la fiecare\",\r\n\t\trepeat_text_week_count: \"saptamana in urmatoarele zile:\",\r\n\t\trepeat_radio_month_type: \"Repeta in\",\r\n\t\trepeat_radio_month_start: \"In a\",\r\n\t\trepeat_text_month_day: \"zi la fiecare\",\r\n\t\trepeat_text_month_count: \"luni\",\r\n\t\trepeat_text_month_count2_before: \"la fiecare\",\r\n\t\trepeat_text_month_count2_after: \"luni\",\r\n\t\trepeat_year_label: \"In\",\r\n\t\tselect_year_day2: \"a lunii\",\r\n\t\trepeat_text_year_day: \"zi a lunii\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Fara data de sfarsit\",\r\n\t\trepeat_text_occurences_count: \"evenimente\",\r\n\t\trepeat_radio_end3: \"La data\",\r\n\t\trepeat_radio_end2: \"Dupa\",\r\n\t\tmonth_for_recurring: [\"Ianuarie\", \"Februarie\", \"Martie\", \"Aprilie\", \"Mai\", \"Iunie\", \"Iulie\", \"August\", \"Septembrie\", \"Octombrie\", \"Noiembrie\", \"Decembrie\"],\r\n\t\tday_for_recurring: [\"Duminica\", \"Luni\", \"Marti\", \"Miercuri\", \"Joi\", \"Vineri\", \"Sambata\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Январь\", \"Февраль\", \"Март\", \"Апрель\", \"Maй\", \"Июнь\", \"Июль\", \"Август\", \"Сентябрь\", \"Oктябрь\", \"Ноябрь\", \"Декабрь\"],\r\n\t\tmonth_short: [\"Янв\", \"Фев\", \"Maр\", \"Aпр\", \"Maй\", \"Июн\", \"Июл\", \"Aвг\", \"Сен\", \"Окт\", \"Ноя\", \"Дек\"],\r\n\t\tday_full: [ \"Воскресенье\", \"Понедельник\", \"Вторник\", \"Среда\", \"Четверг\", \"Пятница\", \"Суббота\"],\r\n\t\tday_short: [\"Вс\", \"Пн\", \"Вт\", \"Ср\", \"Чт\", \"Пт\", \"Сб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сегодня\",\r\n\t\tday_tab: \"День\",\r\n\t\tweek_tab: \"Неделя\",\r\n\t\tmonth_tab: \"Месяц\",\r\n\t\tnew_event: \"Новое событие\",\r\n\t\ticon_save: \"Сохранить\",\r\n\t\ticon_cancel: \"Отменить\",\r\n\t\ticon_details: \"Детали\",\r\n\t\ticon_edit: \"Изменить\",\r\n\t\ticon_delete: \"Удалить\",\r\n\t\tconfirm_closing: \"\", //Ваши изменения будут потеряны, продолжить?\r\n\t\tconfirm_deleting: \"Событие будет удалено безвозвратно, продолжить?\",\r\n\t\tsection_description: \"Описание\",\r\n\t\tsection_time: \"Период времени\",\r\n\t\tfull_day: \"Весь день\",\r\n\r\n\t\tconfirm_recurring: \"Вы хотите изменить всю серию повторяющихся событий?\",\r\n\t\tsection_recurring: \"Повторение\",\r\n\t\tbutton_recurring: \"Отключено\",\r\n\t\tbutton_recurring_open: \"Включено\",\r\n\t\tbutton_edit_series: \"Редактировать серию\",\r\n\t\tbutton_edit_occurrence: \"Редактировать экземпляр\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Список\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Описание\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Год\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Список\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Таблица\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"День\",\r\n\t\trepeat_radio_week: \"Неделя\",\r\n\t\trepeat_radio_month: \"Месяц\",\r\n\t\trepeat_radio_year: \"Год\",\r\n\t\trepeat_radio_day_type: \"Каждый\",\r\n\t\trepeat_text_day_count: \"день\",\r\n\t\trepeat_radio_day_type2: \"Каждый рабочий день\",\r\n\t\trepeat_week: \" Повторять каждую\",\r\n\t\trepeat_text_week_count: \"неделю , в:\",\r\n\t\trepeat_radio_month_type: \"Повторять\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" числа каждый \",\r\n\t\trepeat_text_month_count: \"месяц\",\r\n\t\trepeat_text_month_count2_before: \"каждый \",\r\n\t\trepeat_text_month_count2_after: \"месяц\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"день\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без даты окончания\",\r\n\t\trepeat_text_occurences_count: \"повторений\",\r\n\t\trepeat_radio_end3: \"До \",\r\n\t\trepeat_radio_end2: \"\",\r\n\t\tmonth_for_recurring: [\"Января\", \"Февраля\", \"Марта\", \"Апреля\", \"Мая\", \"Июня\", \"Июля\", \"Августа\", \"Сентября\", \"Октября\", \"Ноября\", \"Декабря\"],\r\n\t\tday_for_recurring: [\"Воскресенье\", \"Понедельник\", \"Вторник\", \"Среду\", \"Четверг\", \"Пятницу\", \"Субботу\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Marec\", \"April\", \"Maj\", \"Junij\", \"Julij\", \"Avgust\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Nedelja\", \"Ponedeljek\", \"Torek\", \"Sreda\", \"Četrtek\", \"Petek\", \"Sobota\"],\r\n\t\tday_short: [\"Ned\", \"Pon\", \"Tor\", \"Sre\", \"Čet\", \"Pet\", \"Sob\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Danes\",\r\n\t\tday_tab: \"Dan\",\r\n\t\tweek_tab: \"Teden\",\r\n\t\tmonth_tab: \"Mesec\",\r\n\t\tnew_event: \"Nov dogodek\",\r\n\t\ticon_save: \"Shrani\",\r\n\t\ticon_cancel: \"Prekliči\",\r\n\t\ticon_details: \"Podrobnosti\",\r\n\t\ticon_edit: \"Uredi\",\r\n\t\ticon_delete: \"Izbriši\",\r\n\t\tconfirm_closing: \"\", //Spremembe ne bodo shranjene. Želite nadaljevati ?\r\n\t\tconfirm_deleting: \"Dogodek bo izbrisan. Želite nadaljevati?\",\r\n\t\tsection_description: \"Opis\",\r\n\t\tsection_time: \"Časovni okvir\",\r\n\t\tfull_day: \"Ves dan\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Želite urediti celoten set ponavljajočih dogodkov?\",\r\n\t\tsection_recurring: \"Ponovi dogodek\",\r\n\t\tbutton_recurring: \"Onemogočeno\",\r\n\t\tbutton_recurring_open: \"Omogočeno\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Edit occurrence\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Zadeva\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Opis\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Leto\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Zadeva\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Miza\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Január\", \"Február\", \"Marec\", \"Apríl\", \"Máj\", \"Jún\", \"Júl\", \"August\", \"September\", \"Október\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Máj\", \"Jún\", \"Júl\", \"Aug\", \"Sept\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Nedeľa\", \"Pondelok\", \"Utorok\", \"Streda\", \"Štvrtok\", \"Piatok\", \"Sobota\"],\r\n\t\tday_short: [\"Ne\", \"Po\", \"Ut\", \"St\", \"Št\", \"Pi\", \"So\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dnes\",\r\n\t\tday_tab: \"Deň\",\r\n\t\tweek_tab: \"Týždeň\",\r\n\t\tmonth_tab: \"Mesiac\",\r\n\t\tnew_event: \"Nová udalosť\",\r\n\t\ticon_save: \"Uložiť\",\r\n\t\ticon_cancel: \"Späť\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edituj\",\r\n\t\ticon_delete: \"Zmazať\",\r\n\t\tconfirm_closing: \"Vaše zmeny nebudú uložené. Skutočne?\", //Vaše změny budou ztraceny, opravdu ?\r\n\t\tconfirm_deleting: \"Udalosť bude natrvalo vymazaná. Skutočne?\",\r\n\t\tsection_description: \"Poznámky\",\r\n\t\tsection_time: \"Doba platnosti\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Prajete si upraviť celú radu opakovaných udalostí?\",\r\n\t\tsection_recurring: \"Opakovanie udalosti\",\r\n\t\tbutton_recurring: \"Vypnuté\",\r\n\t\tbutton_recurring_open: \"Zapnuté\",\r\n\t\tbutton_edit_series: \"Upraviť opakovania\",\r\n\t\tbutton_edit_occurrence: \"Upraviť inštancie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Program\",\r\n\t\tdate: \"Dátum\",\r\n\t\tdescription: \"Poznámka\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\t\tfull_day: \"Celý deň\", // Full day\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Program\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Mriežka\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Denne\",\r\n\t\trepeat_radio_week: \"Týždenne\",\r\n\t\trepeat_radio_month: \"Mesaène\",\r\n\t\trepeat_radio_year: \"Roène\",\r\n\t\trepeat_radio_day_type: \"Každý\",\r\n\t\trepeat_text_day_count: \"deò\",\r\n\t\trepeat_radio_day_type2: \"Každý prac. deò\",\r\n\t\trepeat_week: \"Opakova každý\",\r\n\t\trepeat_text_week_count: \"týždeò v dòoch:\",\r\n\t\trepeat_radio_month_type: \"Opakova\",\r\n\t\trepeat_radio_month_start: \"On\",\r\n\t\trepeat_text_month_day: \"deò každý\",\r\n\t\trepeat_text_month_count: \"mesiac\",\r\n\t\trepeat_text_month_count2_before: \"každý\",\r\n\t\trepeat_text_month_count2_after: \"mesiac\",\r\n\t\trepeat_year_label: \"On\",\r\n\t\tselect_year_day2: \"poèas\",\r\n\t\trepeat_text_year_day: \"deò\",\r\n\t\tselect_year_month: \"mesiac\",\r\n\t\trepeat_radio_end: \"Bez dátumu ukonèenia\",\r\n\t\trepeat_text_occurences_count: \"udalostiach\",\r\n\t\trepeat_radio_end3: \"Ukonèi\",\r\n\t\trepeat_radio_end2: \"Po\",\r\n\t\tmonth_for_recurring: [\"Január\", \"Február\", \"Marec\", \"Apríl\", \"Máj\", \"Jún\", \"Júl\", \"August\", \"September\", \"Október\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Nede¾a\", \"Pondelok\", \"Utorok\", \"Streda\", \"Štvrtok\", \"Piatok\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Mars\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"Augusti\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Söndag\", \"Måndag\", \"Tisdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lördag\"],\r\n\t\tday_short: [\"Sön\", \"Mån\", \"Tis\", \"Ons\", \"Tor\", \"Fre\", \"Lör\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Vecka\",\r\n\t\tmonth_tab: \"Månad\",\r\n\t\tnew_event: \"Ny händelse\",\r\n\t\ticon_save: \"Spara\",\r\n\t\ticon_cancel: \"Ångra\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Ändra\",\r\n\t\ticon_delete: \"Ta bort\",\r\n\t\tconfirm_closing: \"\", //Dina förändingar kommer gå förlorade, är du säker?\r\n\t\tconfirm_deleting: \"Är du säker på att du vill ta bort händelsen permanent?\",\r\n\t\tsection_description: \"Beskrivning\",\r\n\t\tsection_time: \"Tid\",\r\n\t\tfull_day: \"Hela dagen\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vill du redigera hela serien med repeterande händelser?\",\r\n\t\tsection_recurring: \"Upprepa händelse\",\r\n\t\tbutton_recurring: \"Inaktiverat\",\r\n\t\tbutton_recurring_open: \"Aktiverat\",\r\n\t\tbutton_edit_series: \"Redigera serien\",\r\n\t\tbutton_edit_occurrence: \"Redigera en kopia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dagordning\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Beskrivning\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dagordning\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Galler\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Dra för att skapa ny\",\r\n\t\tdrag_to_move:\"Dra för att flytta\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Dagligen\",\r\n\t\trepeat_radio_week: \"Veckovis\",\r\n\t\trepeat_radio_month: \"Månadsvis\",\r\n\t\trepeat_radio_year: \"Årligen\",\r\n\t\trepeat_radio_day_type: \"Var\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"Varje arbetsdag\",\r\n\t\trepeat_week: \" Upprepa var\",\r\n\t\trepeat_text_week_count: \"vecka dessa dagar:\",\r\n\t\trepeat_radio_month_type: \"Upprepa\",\r\n\t\trepeat_radio_month_start: \"Den\",\r\n\t\trepeat_text_month_day: \"dagen var\",\r\n\t\trepeat_text_month_count: \"månad\",\r\n\t\trepeat_text_month_count2_before: \"var\",\r\n\t\trepeat_text_month_count2_after: \"månad\",\r\n\t\trepeat_year_label: \"Den\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"månad\",\r\n\t\trepeat_radio_end: \"Inget slutdatum\",\r\n\t\trepeat_text_occurences_count: \"upprepningar\",\r\n\t\trepeat_radio_end3: \"Sluta efter\",\r\n\t\trepeat_radio_end2: \"Efter\",\r\n\t\tmonth_for_recurring: [\"Januari\", \"Februari\", \"Mars\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"Augusti\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Söndag\", \"Måndag\", \"Tisdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lördag\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Ocak\", \"Þubat\", \"Mart\", \"Nisan\", \"Mayýs\", \"Haziran\", \"Temmuz\", \"Aðustos\", \"Eylül\", \"Ekim\", \"Kasým\", \"Aralýk\"],\r\n\t\tmonth_short: [\"Oca\", \"Þub\", \"Mar\", \"Nis\", \"May\", \"Haz\", \"Tem\", \"Aðu\", \"Eyl\", \"Eki\", \"Kas\", \"Ara\"],\r\n\t\tday_full: [\"Pazar\", \"Pazartes,\", \"Salý\", \"Çarþamba\", \"Perþembe\", \"Cuma\", \"Cumartesi\"],\r\n\t\tday_short: [\"Paz\", \"Pts\", \"Sal\", \"Çar\", \"Per\", \"Cum\", \"Cts\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Bugün\",\r\n\t\tday_tab: \"Gün\",\r\n\t\tweek_tab: \"Hafta\",\r\n\t\tmonth_tab: \"Ay\",\r\n\t\tnew_event: \"Uygun\",\r\n\t\ticon_save: \"Kaydet\",\r\n\t\ticon_cancel: \"Ýptal\",\r\n\t\ticon_details: \"Detaylar\",\r\n\t\ticon_edit: \"Düzenle\",\r\n\t\ticon_delete: \"Sil\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Etkinlik silinecek, devam?\",\r\n\t\tsection_description: \"Açýklama\",\r\n\t\tsection_time: \"Zaman aralýðý\",\r\n\t\tfull_day: \"Tam gün\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Tüm tekrar eden etkinlikler silinecek, devam?\",\r\n\t\tsection_recurring: \"Etkinliði tekrarla\",\r\n\t\tbutton_recurring: \"Pasif\",\r\n\t\tbutton_recurring_open: \"Aktif\",\r\n\t\tbutton_edit_series: \"Dizi düzenleme\",\r\n\t\tbutton_edit_occurrence: \"Bir kopyasını düzenleyin\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Ajanda\",\r\n\t\tdate: \"Tarih\",\r\n\t\tdescription: \"Açýklama\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Yýl\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Ajanda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Izgara\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\"\r\n\t}\r\n};","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Січень\", \"Лютий\", \"Березень\", \"Квітень\", \"Травень\", \"Червень\", \"Липень\", \"Серпень\", \"Вересень\", \"Жовтень\", \"Листопад\", \"Грудень\"],\r\n\t\tmonth_short: [\"Січ\", \"Лют\", \"Бер\", \"Кві\", \"Тра\", \"Чер\", \"Лип\", \"Сер\", \"Вер\", \"Жов\", \"Лис\", \"Гру\"],\r\n\t\tday_full: [\"Неділя\", \"Понеділок\", \"Вівторок\", \"Середа\", \"Четвер\", \"П'ятниця\", \"Субота\"],\r\n\t\tday_short: [\"Нед\", \"Пон\", \"Вів\", \"Сер\", \"Чет\", \"Птн\", \"Суб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сьогодні\",\r\n\t\tday_tab: \"День\",\r\n\t\tweek_tab: \"Тиждень\",\r\n\t\tmonth_tab: \"Місяць\",\r\n\t\tnew_event: \"Нова подія\",\r\n\t\ticon_save: \"Зберегти\",\r\n\t\ticon_cancel: \"Відміна\",\r\n\t\ticon_details: \"Деталі\",\r\n\t\ticon_edit: \"Редагувати\",\r\n\t\ticon_delete: \"Вилучити\",\r\n\t\tconfirm_closing: \"\", //Ваші зміни втратяться. Ви впевнені ?\r\n\t\tconfirm_deleting: \"Подія вилучиться назавжди. Ви впевнені?\",\r\n\t\tsection_description: \"Опис\",\r\n\t\tsection_time: \"Часовий проміжок\",\r\n\t\tfull_day: \"Весь день\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Хочете редагувати весь перелік повторюваних подій?\",\r\n\t\tsection_recurring: \"Повторювана подія\",\r\n\t\tbutton_recurring: \"Відключено\",\r\n\t\tbutton_recurring_open: \"Включено\",\r\n\t\tbutton_edit_series: \"Редагувати серію\",\r\n\t\tbutton_edit_occurrence: \"Редагувати примірник\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Перелік\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Опис\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Рік\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Перелік\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Таблиця\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"День\",\r\n\t\trepeat_radio_week: \"Тиждень\",\r\n\t\trepeat_radio_month: \"Місяць\",\r\n\t\trepeat_radio_year: \"Рік\",\r\n\t\trepeat_radio_day_type: \"Кожний\",\r\n\t\trepeat_text_day_count: \"день\",\r\n\t\trepeat_radio_day_type2: \"Кожний робочий день\",\r\n\t\trepeat_week: \" Повторювати кожен\",\r\n\t\trepeat_text_week_count: \"тиждень , по:\",\r\n\t\trepeat_radio_month_type: \"Повторювати\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" числа кожний \",\r\n\t\trepeat_text_month_count: \"місяць\",\r\n\t\trepeat_text_month_count2_before: \"кожен \",\r\n\t\trepeat_text_month_count2_after: \"місяць\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"день\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без дати закінчення\",\r\n\t\trepeat_text_occurences_count: \"повторень\",\r\n\t\trepeat_radio_end3: \"До \",\r\n\t\trepeat_radio_end2: \"\",\r\n\t\tmonth_for_recurring: [\"січня\", \"лютого\", \"березня\", \"квітня\", \"травня\", \"червня\", \"липня\", \"серпня\", \"вересня\", \"жовтня\", \"листопада\", \"грудня\"],\r\n\t\tday_for_recurring: [\"Неділям\", \"Понеділкам\", \"Вівторкам\", \"Середам\", \"Четвергам\", \"П'ятницям\", \"Суботам\"]\r\n\t}\r\n};\r\n","import ar from \"./locale_ar\";\r\nimport be from \"./locale_be\";\r\nimport ca from \"./locale_ca\";\r\nimport cn from \"./locale_cn\";\r\nimport cs from \"./locale_cs\";\r\nimport da from \"./locale_da\";\r\nimport de from \"./locale_de\";\r\nimport el from \"./locale_el\";\r\nimport en from \"./locale_en\";\r\nimport es from \"./locale_es\";\r\nimport fi from \"./locale_fi\";\r\nimport fr from \"./locale_fr\";\r\nimport he from \"./locale_he\";\r\nimport hu from \"./locale_hu\";\r\nimport id from \"./locale_id\";\r\nimport it from \"./locale_it\";\r\nimport jp from \"./locale_jp\";\r\n\r\nimport LocaleManager from \"./locale_manager\";\r\n\r\nimport nb from \"./locale_nb\";\r\nimport nl from \"./locale_nl\";\r\nimport no from \"./locale_no\";\r\nimport pl from \"./locale_pl\";\r\nimport pt from \"./locale_pt\";\r\nimport ro from \"./locale_ro\";\r\nimport ru from \"./locale_ru\";\r\nimport si from \"./locale_si\";\r\nimport sk from \"./locale_sk\";\r\nimport sv from \"./locale_sv\";\r\nimport tr from \"./locale_tr\";\r\nimport ua from \"./locale_ua\";\r\n\r\nexport default function(){\r\n\treturn new LocaleManager({\r\n\t\ten,\r\n\t\tar,\r\n\t\tbe,\r\n\t\tca,\r\n\t\tcn,\r\n\t\tcs,\r\n\t\tda,\r\n\t\tde,\r\n\t\tel,\r\n\t\tes,\r\n\t\tfi,\r\n\t\tfr,\r\n\t\the,\r\n\t\thu,\r\n\t\tid,\r\n\t\tit,\r\n\t\tjp,\r\n\t\tnb,\r\n\t\tnl,\r\n\t\tno,\r\n\t\tpl,\r\n\t\tpt,\r\n\t\tro,\r\n\t\tru,\r\n\t\tsi,\r\n\t\tsk,\r\n\t\tsv,\r\n\t\ttr,\r\n\t\tua\r\n\t});\r\n}","import eventable from \"../utils/eventable\";\r\n\r\nexport class DatePicker {\r\n\tconstructor(scheduler, container, state = {}) {\r\n\t\tthis.state = {\r\n\t\t\tdate: new Date(),\r\n\t\t\tmodes: ['days', 'months', 'years'],\r\n\t\t\tcurrentRange: [],\r\n\t\t\teventDates: [],\r\n\t\t\tcurrentModeIndex: 0,\r\n\t\t\t...state\r\n\t\t};\r\n\t\tthis.container = null;\r\n\t\tthis.element = null;\r\n\t\tthis.onStateChangeHandlers = [];\r\n\t\tthis.scheduler = scheduler;\r\n\t\tthis._domEvents = scheduler._createDomEventScope();\r\n\t\tthis.state = this.getState();\r\n\t\teventable(this);\r\n\t\tif(container){\r\n\r\n\t\t\tthis.container = container;\r\n\t\t\tthis.render(this.container);\r\n\t\t}\r\n\r\n\t\tthis.onStateChange((oldState, newState) => {\r\n\t\t\tthis.callEvent(\"onStateChange\", [newState, oldState]);\r\n\t\t});\r\n\t}\r\n\r\n\tgetState() {\r\n\t\treturn { \r\n\t\t\t...this.state,\r\n\t\t\tmode: this.state.modes[this.state.currentModeIndex]\r\n\t\t};\r\n\t}\r\n\r\n\tsetState(newState) {\r\n\t\tconst oldState = { ...this.state };\r\n\t\tif(newState.mode){\r\n\t\t\tnewState.currentModeIndex = this.state.modes.indexOf(newState.mode);\r\n\t\t}\r\n\t\tthis.state = { ...this.state, ...newState };\r\n\r\n\t\tthis._notifyStateChange(oldState, this.state);\r\n\r\n\t\tif (this.container) {\r\n\t\t\tthis.render(this.container);\r\n\t\t}\r\n\t}\r\n\r\n\tonStateChange(handler) {\r\n\t\tthis.onStateChangeHandlers.push(handler);\r\n\r\n\t\t// function to remove the handler\r\n\t\treturn () => {\r\n\t\t\tconst index = this.onStateChangeHandlers.indexOf(handler);\r\n\t\t\tif (index !== -1) {\r\n\t\t\t\tthis.onStateChangeHandlers.splice(index, 1);\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n\r\n\t_notifyStateChange(oldState, newState) {\r\n\t\tthis.onStateChangeHandlers.forEach(handler => handler(oldState, newState));\r\n\t}\r\n\r\n\t_adjustDate(direction) {\r\n\r\n\t\tconst {mode, date} = this.getState();\r\n\t\tconst newDate = new Date(date);\r\n\t\tif (mode === 'days') {\r\n\t\t\tnewDate.setMonth(date.getMonth() + direction);\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tnewDate.setFullYear(date.getFullYear() + direction);\r\n\t\t} else {\r\n\t\t\tnewDate.setFullYear(date.getFullYear() + direction * 10);\r\n\t\t}\r\n\t\tthis.setState({ date: newDate });\r\n\t}\r\n\r\n\t_toggleMode() {\r\n\t\tconst newIndex = (this.state.currentModeIndex + 1) % this.state.modes.length;\r\n\t\tthis.setState({ currentModeIndex: newIndex });\r\n\t}\r\n\r\n\t_renderCalendarHeader(container) {\r\n\t\tconst {mode, date} = this.getState();\r\n\r\n\t\tconst header = document.createElement('div');\r\n\t\theader.classList.add('dhx_cal_datepicker_header');\r\n\r\n\t\tconst backwardArrow = document.createElement('button');\r\n\r\n\t\tbackwardArrow.classList.add(\"dhx_cal_datepicker_arrow\", \"scheduler_icon\", \"arrow_left\");\r\n\t\theader.appendChild(backwardArrow);\r\n\r\n\t\tconst monthLabel = document.createElement('div');\r\n\t\tmonthLabel.classList.add('dhx_cal_datepicker_title');\r\n\r\n\t\tif (mode === 'days') {\r\n\t\t\tmonthLabel.innerText = date.toLocaleString('default', { month: 'long' }) + ' ' + date.getFullYear();\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tmonthLabel.innerText = date.getFullYear();\r\n\t\t} else {\r\n\t\t\tconst startYear = Math.floor(date.getFullYear() / 10) * 10;\r\n\t\t\tmonthLabel.innerText = `${startYear} - ${startYear + 9}`;\r\n\t\t}\r\n\r\n\t\tthis._domEvents.attach(monthLabel, \"click\", this._toggleMode.bind(this));\r\n\t\theader.appendChild(monthLabel);\r\n\r\n\t\tconst forwardArrow = document.createElement('button');\r\n\r\n\t\tforwardArrow.classList.add(\"dhx_cal_datepicker_arrow\", \"scheduler_icon\", \"arrow_right\");\r\n\t\theader.appendChild(forwardArrow);\r\n\r\n\t\tcontainer.appendChild(header);\r\n\r\n\t\tthis._domEvents.attach(backwardArrow, \"click\", this._adjustDate.bind(this, -1));\r\n\t\tthis._domEvents.attach(forwardArrow, \"click\", this._adjustDate.bind(this, 1));\r\n\t}\r\n\r\n\trender(container) {\r\n\t\tthis._domEvents.detachAll();\r\n\t\tthis.container = container || this.container; \r\n\t\tthis.container.innerHTML = '';\r\n\r\n\t\tif(!this.element){\r\n\t\t\tthis.element = document.createElement(\"div\");\r\n\t\t\tthis.element.classList.add(\"dhx_cal_datepicker\");\r\n\t\t}\r\n\t\tthis.element.innerHTML = '';\r\n\t\tthis.container.appendChild(this.element);\r\n\r\n\t\tthis._renderCalendarHeader(this.element);\r\n\t\tconst dataContainer = document.createElement(\"div\");\r\n\t\tdataContainer.classList.add(\"dhx_cal_datepicker_data\");\r\n\t\tthis.element.appendChild(dataContainer);\r\n\r\n\t\tconst {mode} = this.getState();\r\n\t\tif (mode === 'days') {\r\n\t\t\tthis._renderDayGrid(dataContainer);\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tthis._renderMonthGrid(dataContainer);\r\n\t\t} else {\r\n\t\t\tthis._renderYearGrid(dataContainer);\r\n\t\t}\r\n\t}\r\n\r\n\t_renderDayGridHeader(daysOfWeekContainer) {\r\n\t\tconst {date} = this.getState();\r\n\t\tconst scheduler = this.scheduler;\r\n\r\n\t\tlet currentDate = scheduler.date.week_start(new Date(date));\r\n\t\tconst maxDate = scheduler.date.add(scheduler.date.week_start(new Date(date)), 1, 'week');\r\n\r\n\t\tdaysOfWeekContainer.classList.add('dhx_cal_datepicker_days');\r\n\r\n\t\tconst labelFormat = scheduler.date.date_to_str(\"%D\");\r\n\r\n\t\twhile (currentDate.valueOf() < maxDate.valueOf()) {\r\n\t\t\tconst label = labelFormat(currentDate);\r\n\r\n\t\t\tconst dayElement = document.createElement('div');\r\n\t\t\tdayElement.setAttribute(\"data-day\", currentDate.getDay());\r\n\t\t\tdayElement.classList.add('dhx_cal_datepicker_dayname');\r\n\t\t\tdayElement.innerText = label;\r\n\t\t\tdaysOfWeekContainer.appendChild(dayElement);\r\n\r\n\t\t\tcurrentDate = scheduler.date.add(currentDate, 1, 'day');\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t_weeksBetween(min, max) {\r\n\t\tconst scheduler = this.scheduler;\r\n\t\tlet weeks = 0;\r\n\t\tlet currWeek = new Date(min);\r\n\t\twhile(currWeek.valueOf() < max.valueOf()){\r\n\t\t\tweeks += 1;\r\n\t\t\tcurrWeek = scheduler.date.week_start(scheduler.date.add(currWeek, 1, \"week\"));\r\n\t\t}\r\n\t\treturn weeks;\r\n\t}\r\n\r\n\t_renderDayGrid(container) {\r\n\t\tconst {date, currentRange, eventDates, minWeeks} = this.getState();\r\n\r\n\t\tlet minSchedulerDate = currentRange[0];\r\n\t\tlet maxSchedulerDate = currentRange[1];\r\n\r\n\t\tconst eventDaysTable = eventDates.reduce((acc, date) => {\r\n\t\t\tconst dayStart = this.scheduler.date.day_start(new Date(date));\r\n\t\t\tacc[dayStart.valueOf()] = true;\r\n\t\t\treturn acc;\r\n\t\t}, {});\r\n\r\n\r\n\t\t// Render Days of the Week\r\n\t\tconst daysOfWeekContainer = document.createElement('div');\r\n\t\tthis._renderDayGridHeader(daysOfWeekContainer);\r\n\t\tcontainer.appendChild(daysOfWeekContainer);\r\n\r\n\t\tconst scheduler = this.scheduler;\r\n\t\tconst firstDate = scheduler.date.week_start(scheduler.date.month_start(new Date(date)));\r\n\t\tconst monthStart = scheduler.date.month_start(new Date(date));\r\n\t\tconst monthEnd = scheduler.date.add(scheduler.date.month_start(new Date(date)), 1, 'month');\r\n\t\tlet lastDate = scheduler.date.add(scheduler.date.month_start(new Date(date)), 1, 'month');\r\n\t\tif(lastDate.getDay() !== 0){\r\n\t\t\tlastDate = scheduler.date.add(scheduler.date.week_start(lastDate), 1, \"week\");\r\n\t\t}\r\n\r\n\t\tlet weeks = this._weeksBetween(firstDate, lastDate);\r\n\t\tif(minWeeks && weeks < minWeeks){\r\n\t\t\tlastDate = scheduler.date.add(lastDate, (minWeeks - weeks), \"week\");\r\n\t\t}\r\n\r\n\t\tlet currDate = firstDate;\r\n\r\n\t\tconst dayGridContainer = document.createElement('div');\r\n\t\tdayGridContainer.classList.add('dhx_cal_datepicker_days');\r\n\r\n\t\tthis._domEvents.attach(dayGridContainer, \"click\", (event) => {\r\n\t\t\tconst dateCell = event.target.closest(\"[data-cell-date]\");\r\n\t\t\tconst date = new Date(dateCell.getAttribute(\"data-cell-date\"));\r\n\t\t\tthis.callEvent(\"onDateClick\", [date, event]);\r\n\t\t});\r\n\r\n\t\twhile(currDate.valueOf() < lastDate.valueOf()){\r\n\t\t\tconst dayElement = document.createElement('div');\r\n\t\t\tdayElement.setAttribute(\"data-cell-date\", scheduler.templates.format_date(currDate));\r\n\t\t\tdayElement.setAttribute(\"data-day\", currDate.getDay());\r\n\t\t\tdayElement.innerHTML = currDate.getDate();\r\n\r\n\t\t\tif(currDate.valueOf() < monthStart.valueOf()){\r\n\t\t\t\tdayElement.classList.add('dhx_before');\r\n\t\t\t}else if(currDate.valueOf() >= monthEnd.valueOf()){\t\r\n\t\t\t\tdayElement.classList.add('dhx_after');\r\n\t\t\t}\r\n\r\n\t\t\tif(currDate.getDay() === 0 || currDate.getDay() === 6){\r\n\t\t\t\tdayElement.classList.add(\"dhx_cal_datepicker_weekend\");\r\n\t\t\t}\r\n\r\n\t\t\tif(minSchedulerDate && maxSchedulerDate){\r\n\t\t\t\tif(currDate.valueOf() >= minSchedulerDate.valueOf() && currDate.valueOf() < maxSchedulerDate.valueOf()){\r\n\t\t\t\t\tdayElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(eventDaysTable[currDate.valueOf()]){\r\n\t\t\t\tdayElement.classList.add('dhx_cal_datepicker_event');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdayElement.classList.add('dhx_cal_datepicker_date');\r\n\r\n\t\t\tdayGridContainer.appendChild(dayElement);\r\n\t\t\tcurrDate = scheduler.date.add(currDate, 1, 'day');\r\n\t\t}\r\n\r\n\t\tcontainer.appendChild(dayGridContainer);\r\n\r\n\t}\r\n\r\n\t_renderMonthGrid(container) {\r\n\t\tconst {date} = this.getState();\r\n\r\n\t\tconst wrapper = document.createElement('div');\r\n\t\twrapper.classList.add(\"dhx_cal_datepicker_months\");\r\n\r\n\t\tconst months = [];\r\n\t\tfor(let i = 0; i < 12; i++){\r\n\t\t\tmonths.push(new Date(date.getFullYear(), i, 1));\r\n\t\t}\r\n\r\n\t\tconst formatLabel = this.scheduler.date.date_to_str(\"%M\");\r\n\t\tmonths.forEach(month => {\r\n\t\t\tconst monthElement = document.createElement('div');\r\n\t\t\tmonthElement.classList.add('dhx_cal_datepicker_month');\r\n\t\t\tif(date.getMonth() === month.getMonth()){\r\n\t\t\t\tmonthElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t}\r\n\t\t\tmonthElement.setAttribute(\"data-month\", month.getMonth());\r\n\t\t\tmonthElement.innerHTML = formatLabel(month);\r\n\t\t\tthis._domEvents.attach(monthElement, \"click\", () => {\r\n\t\t\t\tconst newDate = new Date(month);\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\tdate: newDate,\r\n\t\t\t\t\tmode: 'days'\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\twrapper.appendChild(monthElement);\r\n\t\t});\r\n\t\tcontainer.appendChild(wrapper);\r\n\r\n\t\tconst doneArea = document.createElement(\"div\");\r\n\t\tdoneArea.classList.add(\"dhx_cal_datepicker_done\");\r\n\t\tconst doneBtn = document.createElement(\"button\");\r\n\t\tdoneBtn.innerText = \"Done\";\r\n\t\tdoneBtn.classList.add(\"dhx_cal_datepicker_done_btn\");\r\n\t\tthis._domEvents.attach(doneBtn, \"click\", () => {\r\n\t\t\tthis.setState({\r\n\t\t\t\tmode: 'days'\r\n\t\t\t});\r\n\t\t});\r\n\t\tdoneArea.appendChild(doneBtn);\r\n\t\tcontainer.appendChild(doneArea);\r\n\t}\r\n\r\n\t_renderYearGrid(container) {\r\n\t\tconst {date} = this.getState();\r\n\t\tconst startYear = Math.floor(date.getFullYear() / 10) * 10;\r\n\t\t\r\n\t\tconst wrapper = document.createElement('div');\r\n\t\twrapper.classList.add(\"dhx_cal_datepicker_years\");\r\n\t\tfor (let i = startYear - 1; i <= startYear + 10; i++) {\r\n\t\t\tconst yearElement = document.createElement('div');\r\n\t\t\tyearElement.innerText = i;\r\n\t\t\tyearElement.classList.add('dhx_cal_datepicker_year');\r\n\t\t\tyearElement.setAttribute(\"data-year\", i);\r\n\t\t\tif(date.getFullYear() === i){\r\n\t\t\t\tyearElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t}\r\n\t\t\tthis._domEvents.attach(yearElement, \"click\", () => {\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\tdate: new Date(i, date.getMonth(), 1),\r\n\t\t\t\t\tmode: 'months'\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\twrapper.appendChild(yearElement);\r\n\t\t\t\r\n\t\t}\r\n\t\tcontainer.appendChild(wrapper);\r\n\r\n\t\tconst doneArea = document.createElement(\"div\");\r\n\t\tdoneArea.classList.add(\"dhx_cal_datepicker_done\");\r\n\t\tconst doneBtn = document.createElement(\"button\");\r\n\t\tdoneBtn.innerText = \"Done\";\r\n\t\tdoneBtn.classList.add(\"dhx_cal_datepicker_done_btn\");\r\n\t\tthis._domEvents.attach(doneBtn, \"click\", () => {\r\n\t\t\tthis.setState({\r\n\t\t\t\tmode: 'months'\r\n\t\t\t});\r\n\t\t});\r\n\t\tdoneArea.appendChild(doneBtn);\r\n\t\tcontainer.appendChild(doneArea);\r\n\t}\r\n\r\n\tdestructor(){\r\n\t\tthis.onStateChangeHandlers = [];\r\n\t\tif(this.element){\r\n\t\t\tthis.element.innerHTML = '';\r\n\t\t\tthis.element.remove();\r\n\t\t}\r\n\r\n\t\tthis._domEvents.detachAll();\r\n\t\tthis.callEvent(\"onDestroy\", []);\r\n\t\tthis.detachAllEvents();\r\n\r\n\t\tthis.scheduler = null;\r\n\t}\r\n}","// import \"./css/dhtmlxscheduler_terrace\";\r\n// import \"./css/dhtmlxscheduler_material\";\r\n// import \"./css/dhtmlxscheduler_material_nofont\";\r\n// import \"./css/dhtmlxscheduler_flat\";\r\n// import \"./css/dhtmlxscheduler_contrast_black\";\r\n// import \"./css/dhtmlxscheduler_contrast_white\";\r\n\r\n\r\nimport assert from \"./core/common/assert\";\r\nimport common_errors from \"./core/common_errors\";\r\nimport connector from \"./core/connector\";\r\nimport schedulerCore from \"./core/scheduler\";\r\nimport common from \"./core/common\";\r\nimport wai_aria from \"./core/wai_aria\";\r\nimport utils from \"./core/utils/utils\";\r\nimport dom_helpers from \"./core/utils/dom_helpers\";\r\nimport env from \"./utils/env\";\r\nimport destructor from \"./core/destructor\";\r\nimport ajax from \"./core/utils/ajax\";\r\nimport base from \"./core/base\";\r\nimport config from \"./core/config\";\r\nimport event from \"./core/event\";\r\nimport event_highlight from \"./core/event_highlight\";\r\nimport load from \"./core/load\";\r\nimport lightbox from \"./core/lightbox\";\r\nimport touch from \"./core/touch\";\r\nimport dhtmlx_suite_hooks from \"./core/dhtmlx/dhtmlx_suite_hooks\";\r\nimport skins from \"./core/skins\";\r\nimport jquery from \"./core/jquery\";\r\nimport delay_render from \"./core/delay_render\";\r\nimport dataProcessorExtend from \"./core/dataprocessor/dataprocessor\";\r\nimport message from \"./core/message\";\r\nimport i18nFactory from \"./locale\";\r\n\r\nimport voidFirst from \"./publish_helpers/void_script_first\";\r\nimport voidSecond from \"./publish_helpers/void_script_second\";\r\nimport voidThird from \"./publish_helpers/void_script_third\";\r\n\r\n//import datepickerHeader from \"./core/clickable_header\";\r\n\r\nimport { DatePicker } from \"./core/datepicker\";\r\n\r\nexport default function(extensionManager) {\r\n\r\n\tconst scheduler = { version: VERSION };\r\n\t\r\n\tcommon_errors(scheduler);\r\n\tcommon(scheduler);\r\n\tschedulerCore(scheduler);\r\n\twai_aria(scheduler);\r\n\t//utils(scheduler);\r\n\r\n\tscheduler.utils = utils;\r\n\tscheduler.$domHelpers = dom_helpers;\r\n\tscheduler.utils.dom = dom_helpers;\r\n\tscheduler.uid = utils.uid;\r\n\tscheduler.mixin = utils.mixin;\r\n\tscheduler.defined = utils.defined;\r\n\tscheduler.assert = assert(scheduler);\r\n\tscheduler.copy = utils.copy;\r\n\r\n\tscheduler._createDatePicker = function(container, config){\r\n\t\treturn new DatePicker(scheduler, container, config);\r\n\t};\r\n\r\n\t//datepickerHeader(scheduler);\r\n\r\n\r\n\t//old api compatibility\r\n\tscheduler._getFocusableNodes = dom_helpers.getFocusableNodes;\r\n\tscheduler._getClassName = dom_helpers.getClassName;\r\n\tscheduler._locate_css = dom_helpers.locateCss;\r\n\r\n\tconst messageApi = message(scheduler);\r\n\tscheduler.utils.mixin(scheduler, messageApi);\r\n\r\n\tscheduler.env = scheduler.$env = env;\r\n\tscheduler.Promise = window.Promise;\r\n\tdestructor(scheduler);\r\n\tajax(scheduler);\r\n\tvoidFirst(scheduler);\r\n\tbase(scheduler);\r\n\tconfig(scheduler);\r\n\tevent(scheduler);\r\n\tevent_highlight(scheduler);\r\n\tload(scheduler);\r\n\tlightbox(scheduler);\r\n\ttouch(scheduler);\r\n\tdhtmlx_suite_hooks(scheduler);\r\n\tvoidSecond(scheduler);\r\n\tskins(scheduler);\r\n\tjquery(scheduler);\r\n\tdelay_render(scheduler);\r\n\tdataProcessorExtend(scheduler);\r\n\tvoidThird(scheduler);\r\n\tconnector(scheduler);\r\n\tconst i18n = i18nFactory();\r\n\tscheduler.i18n = {\r\n\t\taddLocale: i18n.addLocale,\r\n\t\tsetLocale: function(locale){\r\n\t\t\tif(typeof locale === \"string\"){\r\n\t\t\t\tvar localeObject = i18n.getLocale(locale);\r\n\t\t\t\tif(!localeObject){\r\n\t\t\t\t\tlocaleObject = i18n.getLocale(\"en\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler.locale = localeObject;\r\n\t\t\t}else if(locale){\r\n\t\t\t\tif(!scheduler.locale){\r\n\t\t\t\t\tscheduler.locale = locale;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfor(var i in locale){\r\n\t\t\t\t\t\tif(locale[i] && typeof locale[i] === \"object\"){\r\n\t\t\t\t\t\t\tif(!scheduler.locale[i]){\r\n\t\t\t\t\t\t\t\tscheduler.locale[i] = {};\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tscheduler.mixin(scheduler.locale[i], locale[i], true);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tscheduler.locale[i] = locale[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar labels = scheduler.locale.labels;\r\n\t\t\tlabels.dhx_save_btn \t= labels.icon_save;\r\n\t\t\tlabels.dhx_cancel_btn \t= labels.icon_cancel;\r\n\t\t\tlabels.dhx_delete_btn \t= labels.icon_delete;\r\n\r\n\t\t\tif(scheduler.$container){\r\n\t\t\t\tscheduler.get_elements();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t},\r\n\t\tgetLocale: i18n.getLocale\r\n\t};\r\n\tscheduler.i18n.setLocale(\"en\");\r\n\r\n\tscheduler.ext = {};\r\n\r\n\tconst activePlugins = {};\r\n\tscheduler.plugins = function(config){\r\n\t\tconst extensionList = getExtensionList(config, {\r\n\t\t\t\ttreetimeline: [\"timeline\"],\r\n\t\t\t\tdaytimeline: [\"timeline\"],\r\n\t\t\t\touterdrag: [\"legacy\"]\r\n\t\t\t}, {\r\n\t\t\t\tlegacy: 1,\r\n\t\t\t\tlimit: 1,\r\n\t\t\t\ttimeline: 2,\r\n\t\t\t\tdaytimeline: 3,\r\n\t\t\t\ttreetimeline: 3,\r\n\t\t\t\touterdrag:6\r\n\t\t\t});\r\n\r\n\t\textensionList.forEach(function(name){\r\n\t\t\tif(!activePlugins[name]){\r\n\t\t\t\tconst plugin = extensionManager.getExtension(name);\r\n\t\t\t\tif(plugin){\r\n\t\t\t\t\tplugin(scheduler);\r\n\t\t\t\t\tactivePlugins[name] = true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthrow new Error(\"unknown plugin \" + name);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t};\r\n\r\n\tfunction getExtensionList(config, dependencies, priorities){\r\n\t\tconst result = [];\r\n\r\n\t\tfor(const i in config){\r\n\t\t\tif(config[i]){\r\n\t\t\t\tconst extension = i.toLowerCase();\r\n\t\t\t\tif(dependencies[extension]){\r\n\t\t\t\t\tdependencies[extension].forEach(function(dep){\r\n\t\t\t\t\t\tconst dependencyName = dep.toLowerCase();\r\n\t\t\t\t\t\tif(!config[dependencyName]){\r\n\t\t\t\t\t\t\tresult.push(dependencyName);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\tresult.push(extension);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tresult.sort(function(a, b){\r\n\t\t\tconst orderA = priorities[a] || 0;\r\n\t\t\tconst orderB = priorities[b] || 0;\r\n\t\t\tif(orderA > orderB){\r\n\t\t\t\treturn 1;\r\n\t\t\t}else if(orderA < orderB){\r\n\t\t\t\treturn -1;\r\n\t\t\t}else{\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\treturn scheduler;\r\n\r\n}","export default class ExtensionsManager{\r\n\tconstructor(config){\r\n\t\tthis._extensions = {};\r\n\t\tfor(const i in config){\r\n\t\t\tthis._extensions[i] = config[i];\r\n\t\t}\r\n\t}\r\n\r\n\taddExtension(name, ext) {\r\n\t\tthis._extensions[name] = ext;\r\n\t}\r\n\r\n\tgetExtension(name) {\r\n\t\treturn this._extensions[name];\r\n\t}\r\n}","\r\n\r\nimport dhtmlxHook from \"./dhtmlx_hook\";\r\nimport \"./css/theme.less\";\r\ndhtmlxHook();\r\n\r\nimport global from \"./global\";\r\n\r\nimport factoryMethod from \"./scheduler_factory_method\";\r\nimport ExtensionsManager from \"./ext/extension_manager\";\r\n\r\nclass SchedulerFactory {\r\n\r\n\tconstructor (extensions) {\r\n\t\tthis._seed = 0;\r\n\t\tthis._schedulerPlugins = [];\r\n\t\tthis._bundledExtensions = extensions;\r\n\t\tthis._extensionsManager = new ExtensionsManager(extensions);\r\n\t}\r\n\r\n\tplugin(code) {\r\n\t\tthis._schedulerPlugins.push(code);\r\n\r\n\t\tif(global.scheduler){\r\n\t\t\tcode(global.scheduler);\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetSchedulerInstance(initConfig) {\r\n\t\tvar scheduler = factoryMethod(this._extensionsManager);\r\n\r\n\t\tfor (var i = 0; i < this._schedulerPlugins.length; i++) {\r\n\t\t\tthis._schedulerPlugins[i](scheduler);\r\n\t\t}\r\n\t\tscheduler._internal_id = this._seed++;\r\n\t\r\n\t\tif (this.$syncFactory){\r\n\t\t\tthis.$syncFactory(scheduler);\r\n\t\t}\r\n\r\n\t\tif(initConfig){\r\n\t\t\tthis._initFromConfig(scheduler, initConfig);\r\n\t\t}\r\n\r\n\t\treturn scheduler;\r\n\t}\r\n\r\n\t_initFromConfig(scheduler, initConfig){\r\n\t\tif(initConfig.plugins){\r\n\t\t\tscheduler.plugins(initConfig.plugins);\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.config){\r\n\t\t\tscheduler.mixin(scheduler.config, initConfig.config, true);\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.templates){\r\n\t\t\tscheduler.attachEvent(\"onTemplatesReady\", function(){\r\n\t\t\t\tscheduler.mixin(scheduler.templates, initConfig.templates, true);\r\n\t\t\t}, {once: true});\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.events){\r\n\t\t\tfor(const event in initConfig.events){\r\n\t\t\t\tscheduler.attachEvent(event, initConfig.events[event]);\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.locale){\r\n\t\t\tscheduler.i18n.setLocale(initConfig.locale);\r\n\t\t}\r\n\t\r\n\t\tif(Array.isArray(initConfig.calendars)){\r\n\t\t\tinitConfig.calendars.forEach(function(calendar){\r\n\t\t\t\tscheduler.addCalendar(calendar);\r\n\t\t\t});\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.container){\r\n\t\t\tscheduler.init(initConfig.container);\r\n\t\t} else {\r\n\t\t\tscheduler.init();\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.data){\r\n\t\t\tif(typeof initConfig.data === \"string\"){\r\n\t\t\t\tscheduler.load(initConfig.data);\r\n\t\t\t}else{\r\n\t\t\t\tscheduler.parse(initConfig.data);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\r\n}\r\n\r\nexport default SchedulerFactory;","export default function(scheduler){\r\n\r\nscheduler.config.active_link_view = \"day\";\r\nscheduler._active_link_click = function(e){\r\n\tvar start = e.target;\r\n\tvar to = start.getAttribute(\"data-link-date\");\r\n\tvar s_d = scheduler.date.str_to_date(scheduler.config.api_date, false, true);\r\n\tif (to) {\r\n\t\tscheduler.setCurrentView(s_d(to), scheduler.config.active_link_view);\r\n\t\tif (e && e.preventDefault)\r\n\t\t\te.preventDefault();\r\n\t\treturn false;\r\n\t}\r\n};\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar do_wrapper = function(key, fullname){\r\n\t\tfullname = fullname || (key+\"_scale_date\");\r\n\r\n\t\tif(!scheduler.templates['_active_links_old_'+ fullname]){\r\n\t\t\tscheduler.templates['_active_links_old_'+ fullname] = scheduler.templates[fullname];\r\n\t\t}\r\n\t\tvar week_x = scheduler.templates['_active_links_old_'+ fullname];\r\n\t\tvar d_s = scheduler.date.date_to_str(scheduler.config.api_date);\r\n\t\tscheduler.templates[fullname] = function(date) {\r\n\t\t\treturn \"\" + week_x(date) + \"\";\r\n\t\t};\r\n\t};\r\n\r\n\tdo_wrapper(\"week\");\r\n\tdo_wrapper(\"\", \"month_day\");\r\n\tif (this.matrix){\r\n\t\tfor (var key in this.matrix)\r\n\t\t\tdo_wrapper(key);\r\n\t}\r\n\r\n\tthis._detachDomEvent(this._obj, \"click\", scheduler._active_link_click);\r\n\tscheduler.event(this._obj, \"click\", scheduler._active_link_click);\r\n});\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.date.add_agenda_legacy = function(date){\r\n\treturn scheduler.date.add(date, 1, \"year\");\r\n};\r\n\r\nscheduler.templates.agenda_legacy_time = function(start,end,ev){\r\n\tif (ev._timed)\r\n\t\treturn this.day_date(ev.start_date, ev.end_date, ev)+\" \"+this.event_date(start);\r\n\telse\r\n\t\treturn scheduler.templates.day_date(start)+\" – \"+scheduler.templates.day_date(end);\r\n};\r\nscheduler.templates.agenda_legacy_text = function(start,end,event){\r\n\treturn event.text;\r\n};\r\nscheduler.templates.agenda_legacy_date = function(){ return \"\"; };\r\n\r\nscheduler.date.agenda_legacy_start=function(){ return scheduler.date.date_part(scheduler._currentDate()); };\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function() {\r\n\tvar old_dblclick_dhx_cal_data = scheduler.dblclick_dhx_cal_data;\r\n\tscheduler.dblclick_dhx_cal_data = function() {\r\n\t\tif (this._mode == \"agenda_legacy\") {\r\n\t\t\tif (!this.config.readonly && this.config.dblclick_create)\r\n\t\t\t\tthis.addEventNow();\r\n\t\t} else {\r\n\t\t\tif (old_dblclick_dhx_cal_data)\r\n\t\t\t\treturn old_dblclick_dhx_cal_data.apply(this, arguments);\r\n\t\t}\r\n\t};\r\n\r\n\r\n\tvar old = scheduler.render_data;\r\n\tscheduler.render_data=function(evs){\r\n\t\tif (this._mode == \"agenda_legacy\")\r\n\t\t\tfill_agenda_tab();\r\n\t\telse\r\n\t\t\treturn old.apply(this,arguments);\r\n\t};\r\n\r\n\tvar old_render_view_data = scheduler.render_view_data;\r\n\tscheduler.render_view_data = function(){\r\n\t\tif(this._mode == \"agenda_legacy\") {\r\n\t\t\tscheduler._agendaScrollTop = scheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop;\r\n\t\t\tscheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop = 0;\r\n\t\t}\r\n\t\treturn old_render_view_data.apply(this,arguments);\r\n\t};\r\n\r\n\r\n\r\n\tfunction set_full_view(mode){\r\n\t\tif (mode){\r\n\t\t\tvar l = scheduler.locale.labels;\r\n\r\n\t\t\tvar rowAttr = scheduler._waiAria.agendaHeadAttrString();\r\n\t\t\tvar dateHeader = scheduler._waiAria.agendaHeadDateString(l.date);\r\n\t\t\tvar descriptionHeader = scheduler._waiAria.agendaHeadDescriptionString(l.description);\r\n\r\n\t\t\tscheduler._els[\"dhx_cal_header\"][0].innerHTML=\"
\" +\r\n\t\t\t\t\"
\"+l.date+\"
\" +\r\n\t\t\t\t\"\"+l.description+\"\" +\r\n\t\t\t\t\"
\";\r\n\t\t\tscheduler._table_view=true;\r\n\t\t\tscheduler.set_sizes();\r\n\t\t}\r\n\t}\r\n\r\n\tfunction fill_agenda_tab(){\r\n\t\t//select events for which data need to be printed\r\n\r\n\t\tvar events = scheduler.get_visible_events();\r\n\t\tevents.sort(function(a,b){ return a.start_date>b.start_date?1:-1;});\r\n\r\n\t\tvar tableAttr = scheduler._waiAria.agendaDataAttrString();\r\n\t\tvar agendaEventAttrString;\r\n\t\t//generate html for the view\r\n\t\tvar html=\"
\";\r\n\t\tfor (var i=0; i
\"+\r\n\t\t\t\t\t(scheduler.config.rtl ? scheduler.templates.agenda_time(ev.end_date,ev.start_date, ev):scheduler.templates.agenda_time(ev.start_date, ev.end_date,ev))+\r\n\t\t\t\t\t\"
\";\r\n\t\t\thtml+=`
\r\n\t\t\t\r\n\t\t\t
`;\r\n\t\t\thtml+=\"\"+scheduler.templates.agenda_text(ev.start_date, ev.end_date, ev)+\"
\";\r\n\t\t}\r\n\t\thtml+=\"
\";\r\n\r\n\t\t//render html\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop = scheduler._agendaScrollTop||0;\r\n\r\n\t\t// setting up dhx_v_border size\r\n\t\tvar agenda_area = scheduler._els[\"dhx_cal_data\"][0].childNodes[0];\r\n\t\tvar v_border = agenda_area.childNodes[agenda_area.childNodes.length-1];\r\n\t\tv_border.style.height = (agenda_area.offsetHeight < scheduler._els[\"dhx_cal_data\"][0].offsetHeight) ? \"100%\" : (agenda_area.offsetHeight+\"px\");\r\n\r\n\t\tvar t=scheduler._els[\"dhx_cal_data\"][0].firstChild.childNodes;\r\n\r\n\t\tvar dateElement = scheduler._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML=scheduler.templates.agenda_date(scheduler._min_date, scheduler._max_date, scheduler._mode);\r\n\t\t}\r\n\r\n\t\tscheduler._rendered=[];\r\n\t\tfor (var i=0; i < t.length-1; i++)\r\n\t\t\tscheduler._rendered[i]=t[i];\r\n\r\n\t}\r\n\r\n\tscheduler.agenda_legacy_view=function(mode){\r\n\t\tscheduler._min_date = scheduler.config.agenda_start||scheduler.date.agenda_legacy_start(scheduler._date);\r\n\t\tscheduler._max_date = scheduler.config.agenda_end||scheduler.date.add_agenda_legacy(scheduler._min_date, 1);\r\n\r\n\t\tset_full_view(mode);\r\n\t\tif (mode){\r\n\t\t\tscheduler._cols = null;\r\n\t\t\tscheduler._colsS = null;\r\n\t\t\tscheduler._table_view = true;\r\n\t\t\t//agenda tab activated\r\n\t\t\tfill_agenda_tab();\r\n\t\t} else {\r\n\t\t\tscheduler._table_view = false;\r\n\t\t\t//agenda tab de-activated\r\n\t\t}\r\n\t};\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.date.add_agenda = function(date, inc){\r\n\t\treturn scheduler.date.add(date, 1*inc, \"month\");\r\n\t};\r\n\t\r\n\tscheduler.templates.agenda_time = function(start,end,ev){\r\n\t\tif (ev._timed){\r\n\t\t\treturn `${this.event_date(start)} - ${this.event_date(end)}`;\r\n\t\t}else{\r\n\t\t\treturn scheduler.locale.labels.full_day;\r\n\t\t}\r\n\t};\r\n\tscheduler.templates.agenda_text = function(start,end,ev){\r\n\t\treturn ev.text;\r\n\t};\r\n\r\n\tconst dayDateToStr = scheduler.date.date_to_str(\"%F %j\");\r\n\tconst dayDowToStr = scheduler.date.date_to_str(\"%l\");\r\n\r\n\tscheduler.templates.agenda_day = function(date){ \r\n\t\treturn `
${dayDateToStr(date)}
\r\n\t\t
${dayDowToStr(date)}
`;\r\n\t};\r\n\tscheduler.templates.agenda_date = function(start, end){ \r\n\t\treturn scheduler.templates.month_date(scheduler.getState().date); \r\n\t};\r\n\t\r\n\tscheduler.date.agenda_start=function(date){\r\n\t\treturn scheduler.date.month_start(new Date(date));\r\n\t};\r\n\r\n\tlet scrollTop = 0;\r\n\t\r\n\tscheduler.attachEvent(\"onTemplatesReady\",function() {\r\n\t\tvar old_dblclick_dhx_cal_data = scheduler.dblclick_dhx_cal_data;\r\n\t\tscheduler.dblclick_dhx_cal_data = function() {\r\n\t\t\tif (this._mode == \"agenda\") {\r\n\t\t\t\tif (!this.config.readonly && this.config.dblclick_create)\r\n\t\t\t\t\tthis.addEventNow();\r\n\t\t\t} else {\r\n\t\t\t\tif (old_dblclick_dhx_cal_data)\r\n\t\t\t\t\treturn old_dblclick_dhx_cal_data.apply(this, arguments);\r\n\t\t\t}\r\n\t\t};\r\n\t\r\n\t\r\n\t\tvar old = scheduler.render_data;\r\n\t\tscheduler.render_data=function(evs){\r\n\t\t\tif (this._mode == \"agenda\")\r\n\t\t\t\tfill_agenda_tab();\r\n\t\t\telse\r\n\t\t\t\treturn old.apply(this,arguments);\r\n\t\t};\r\n\t\r\n\t\tvar old_render_view_data = scheduler.render_view_data;\r\n\t\tscheduler.render_view_data = function(){\r\n\t\t\tif(this._mode == \"agenda\") {\r\n\t\t\t\tscrollTop = scheduler._els[\"dhx_cal_data\"][0].scrollTop;\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = 0;\r\n\t\t\t}\r\n\t\t\treturn old_render_view_data.apply(this,arguments);\r\n\t\t};\r\n\r\n\t\tfunction fill_agenda_tab(){\r\n\t\t\tconst events = scheduler.get_visible_events();\r\n\t\t\tevents.sort(function(a,b){ return a.start_date>b.start_date?1:-1;});\r\n\r\n\t\t\tconst eventsInDays = {};\r\n\t\t\tlet currDate = scheduler.getState().min_date;\r\n\t\t\tconst maxDate = scheduler.getState().max_date;\r\n\t\t\twhile(currDate.valueOf() < maxDate.valueOf()){\r\n\t\t\t\teventsInDays[currDate.valueOf()] = [];\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\r\n\t\t\tlet anyEvents = false;\r\n\r\n\t\t\tevents.forEach((ev) => {\r\n\t\t\t\tlet eventStart = scheduler.date.day_start(new Date(ev.start_date)); \r\n\t\t\t\twhile (eventStart.valueOf() < ev.end_date.valueOf()) {\r\n\t\t\t\t\tif (eventsInDays[eventStart.valueOf()]) {\r\n\t\t\t\t\t\teventsInDays[eventStart.valueOf()].push(ev);\r\n\t\t\t\t\t\tanyEvents = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\teventStart = scheduler.date.day_start(scheduler.date.add(eventStart, 1, \"day\"));\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(!anyEvents){\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = renderEmptyView();\r\n\t\t\t}else{\r\n\t\t\t\tlet html = \"\";\r\n\t\t\t\tfor(let day in eventsInDays){\r\n\t\t\t\t\thtml += renderDay(new Date(day*1), eventsInDays[day]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = scrollTop;\r\n\t\t\t\r\n\t\t\tlet t = scheduler._els[\"dhx_cal_data\"][0].querySelectorAll(\".dhx_cal_agenda_event_line\");\r\n\t\t\tscheduler._rendered = [];\r\n\t\t\tfor (var i = 0; i < t.length - 1; i++) {\r\n\t\t\t\tscheduler._rendered[i] = t[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\r\n\r\n\t\tfunction renderEmptyView(){\r\n\t\t\treturn `
${scheduler.locale.labels.agenda_tab}
`;\r\n\t\t}\r\n\r\n\t\tfunction renderDay(day, events) {\r\n\t\t\tif(!events.length){\r\n\t\t\t\treturn \"\";\r\n\t\t\t}\r\n\t\t\tlet html = `\r\n
\r\n\t
${scheduler.templates.agenda_day(day)}
\r\n\t
\r\n`;\r\n\r\n\t\t\tevents.forEach((calendarEvent) => {\r\n\t\t\t\thtml += renderOneEvent(day, calendarEvent);\r\n\t\t\t});\r\n\r\n\t\t\thtml += `
`;\r\n\t\t\treturn html;\r\n\t\t}\r\n\r\n\t\tfunction renderOneEvent(day, calendarEvent){\r\n\t\t\tconst dates = scheduler.templates.agenda_time(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\t\t\tconst selectedId = scheduler.getState().select_id;\r\n\t\t\tconst cls = scheduler.templates.event_class(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\t\t\tconst description = scheduler.templates.agenda_text(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\r\n\t\t\tlet style = \"\";\r\n\t\t\tif(calendarEvent.color || calendarEvent.textColor){\r\n\t\t\t\tconst bg = (calendarEvent.color ? (\"--dhx-scheduler-event-background:\" + calendarEvent.color + \";\") : \"\");\r\n\t\t\t\tconst color = (calendarEvent.textColor ? (\"--dhx-scheduler-event-color:\" + calendarEvent.textColor + \";\") : \"\");\r\n\t\t\t\tstyle = ` style=\"${bg}${color}\" `;\r\n\t\t\t}\r\n\r\n\t\t\treturn `
\r\n\t
\r\n\t
${dates}
\r\n\t
${description}
\r\n
`;\r\n\t\t}\r\n\t\r\n\t\tscheduler.agenda_view=function(mode){\r\n\t\t\tif (mode){\r\n\t\t\t\tscheduler._min_date = scheduler.config.agenda_start || scheduler.date.agenda_start(scheduler._date);\r\n\t\t\t\tscheduler._max_date = scheduler.config.agenda_end || scheduler.date.add_agenda(scheduler._min_date, 1);\r\n\t\t\t\tscheduler._cols = null;\r\n\t\t\t\tscheduler._colsS = null;\r\n\t\t\t\tscheduler._table_view = true;\r\n\r\n\t\t\t\tconst dateHeader = scheduler._getNavDateElement();\r\n\t\t\t\tdateHeader.innerHTML = scheduler.templates.agenda_date(scheduler._date);\r\n\t\t\t\t//agenda tab activated\r\n\t\t\t\tfill_agenda_tab();\r\n\t\t\t} else {\r\n\t\t\t\tscheduler._table_view = false;\r\n\t\t\t\t//agenda tab de-activated\r\n\t\t\t}\r\n\t\t};\r\n\t});\r\n\r\n\t// scheduler.attachEvent(\"onEventSelected\", function(id){\r\n\t// \tconst oldSelected = scheduler.$container.querySelectorAll(\".dhx_cal_agenda_event_line_selected\");\r\n\t// \toldSelected.forEach((el) => {\r\n\t// \t\tel.classList.remove(\"dhx_cal_agenda_event_line_selected\");\r\n\t// \t});\r\n\r\n\t// \tconst selected = scheduler.$container.querySelector(`[${scheduler.config.event_attribute}=\"${id}\"]`);\r\n\t// \tif(selected){\r\n\t// \t\tselected.classList.add(\"dhx_cal_agenda_event_line_selected\");\r\n\t// \t}\r\n\t// });\r\n\t\r\n\t\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.config.all_timed = \"short\";\r\n\tscheduler.config.all_timed_month = false;\r\n\r\n\tvar is_event_short = function (ev) {\r\n\t\tif(!((ev.end_date - ev.start_date)/(1000*60*60) >= 24)){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t// short event shouldn't disappear to multiday area during dnd-resize\r\n\t\tif(scheduler._drag_mode == \"resize\" && scheduler._drag_id == ev.id){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn \tfalse;\r\n\t};\r\n\r\n\t// copy of usual events and recurring instances;\r\n\t// regular copy causes problems with recurrings which have series event as a prototype\r\n\tscheduler._safe_copy = function(event){\r\n\t\tvar proto = null,\r\n\t\t\tcopy = scheduler._copy_event(event);\r\n\t\tif(event.event_pid){\r\n\t\t\tproto = scheduler.getEvent(event.event_pid);\r\n\t\t}\r\n\r\n\t\tif (proto && proto.isPrototypeOf(event)) {\r\n\t\t\tdelete copy.event_length;\r\n\t\t\tdelete copy.event_pid;\r\n\t\t\tdelete copy.rec_pattern;\r\n\t\t\tdelete copy.rec_type;\r\n\t\t}\r\n\r\n\t\treturn copy;\r\n\t};\r\n\r\n\tvar old_prerender_events_line = scheduler._pre_render_events_line;\r\n\tvar old_prerender_events_table = scheduler._pre_render_events_table;\r\n\r\n\tvar prerender_events = function (evs, hold) {\r\n\t\tif (!this._table_view) {\r\n\t\t\treturn old_prerender_events_line.call(this, evs, hold);\r\n\t\t}\r\n\r\n\t\treturn old_prerender_events_table.call(this, evs, hold);\r\n\t};\r\n\r\n\tscheduler._pre_render_events_line = scheduler._pre_render_events_table = function(evs, hold){\r\n\t\tif (!this.config.all_timed ||\r\n\t\t\t(this._table_view && this._mode != \"month\") ||\r\n\t\t\t(this._mode == \"month\" && !this.config.all_timed_month))\r\n\t\t\treturn prerender_events.call(this, evs, hold);\r\n\r\n\t\tfor (var i=0; i < evs.length; i++) {\r\n\t\t\tvar ev=evs[i];\r\n\r\n\t\t\tif (ev._timed)\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\tif (this.config.all_timed == \"short\") {\r\n\t\t\t\tif (!is_event_short(ev)) {\r\n\t\t\t\t\tif (this._mode != \"month\") {\r\n\t\t\t\t\t\tevs.splice(i--, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar ce = this._safe_copy(ev); // current event (event for one specific day) is copy of original with modified dates\r\n\t\t\tif(!ev._virtual){\r\n\t\t\t\tce._first_chunk = true;\r\n\t\t\t}else{\r\n\t\t\t\tce._first_chunk = false;\r\n\t\t\t}\r\n\t\t\tce._drag_resize = false;\r\n\t\t\tce._virtual = true;\r\n\t\t\tce.start_date = new Date(ce.start_date); // as lame copy doesn't copy date objects\r\n\r\n\t\t\tif (!isOvernightEvent(ev)) {\r\n\t\t\t\tce.end_date = new Date(ev.end_date);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tce.end_date = getNextDay(ce.start_date);\r\n\t\t\t\tif (this.config.last_hour != 24) { // if specific last_hour was set (e.g. 20)\r\n\t\t\t\t\tce.end_date = setDateTime(ce.start_date, this.config.last_hour);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar event_changed = false;\r\n\t\t\tif (ce.start_date < this._max_date && ce.end_date > this._min_date && ce.start_date < ce.end_date) {\r\n\t\t\t\tevs[i] = ce; // adding another event in collection\r\n\t\t\t\tevent_changed = true;\r\n\t\t\t}\r\n\t\t//\tif (ce.start_date > ce.end_date) {\r\n\t\t//\t\tevs.splice(i--,1);\r\n\t\t//\t}\r\n\r\n\t\t\tvar re = this._safe_copy(ev); // remaining event, copy of original with modified start_date (making range more narrow)\r\n\t\t\tre._virtual = true;\r\n\t\t\tre.end_date = new Date(re.end_date);\r\n\t\t\tif (re.start_date < this._min_date)\r\n\t\t\t\tre.start_date = setDateTime(this._min_date, this.config.first_hour);// as we are starting only with whole hours\r\n\t\t\telse\r\n\t\t\t\tre.start_date = setDateTime(getNextDay(ev.start_date), this.config.first_hour);\r\n\r\n\t\t\tif (re.start_date < this._max_date && re.start_date < re.end_date) {\r\n\t\t\t\tif (event_changed){\r\n\t\t\t\t\tevs.splice(i+1,0,re);//insert part\r\n\t\t\t\t}else {\r\n\t\t\t\t\tevs[i--] = re;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tre._last_chunk = false;\r\n\t\t\t}else{\r\n\t\t\t\tce._last_chunk = true;\r\n\t\t\t\tce._drag_resize = true;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t// in case of all_timed pre_render is not applied to the original event\r\n\t\t// so we need to force redraw in case of dnd\r\n\t\tvar redraw = (this._drag_mode == 'move')?false:hold;\r\n\t\treturn prerender_events.call(this, evs, redraw);\r\n\r\n\r\n\t\tfunction isOvernightEvent(ev){\r\n\t\t\tvar next_day = getNextDay(ev.start_date);\r\n\t\t\treturn (+ev.end_date > +next_day);\r\n\t\t}\r\n\t\tfunction getNextDay(date){\r\n\t\t\tvar next_day = scheduler.date.add(date, 1, \"day\");\r\n\t\t\tnext_day = scheduler.date.date_part(next_day);\r\n\t\t\treturn next_day;\r\n\t\t}\r\n\t\tfunction setDateTime(date, hours){\r\n\t\t\tvar val = scheduler.date.date_part(new Date(date));\r\n\t\t\tval.setHours(hours);\r\n\t\t\treturn val;\r\n\t\t}\r\n\t};\r\n\tvar old_get_visible_events = scheduler.get_visible_events;\r\n\tscheduler.get_visible_events = function(only_timed){\r\n\t\tif (!(this.config.all_timed && this.config.multi_day))\r\n\t\t\treturn old_get_visible_events.call(this, only_timed);\r\n\t\treturn old_get_visible_events.call(this, false); // only timed = false\r\n\t};\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function (old_mode, old_date, mode, date) {\r\n\t\tscheduler._allow_dnd = (mode == \"day\" || mode == \"week\" || scheduler.getView(mode));\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler._is_main_area_event = function(ev){\r\n\t\treturn !!(ev._timed || this.config.all_timed === true || (this.config.all_timed == \"short\" && is_event_short(ev)) );\r\n\t};\r\n\r\n\tvar oldUpdate = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id){\r\n\t\t// full redraw(update_render=true) messes events order while dnd.\r\n\t\t// individual redraw(update_render=false) of multiday event, which happens on select/unselect, expands event to full width of the cell and can be fixes only with full redraw.\r\n\t\t// so for now full redraw is always enabled for not-dnd updates\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tvar fullRedrawNeeded;\r\n\t\tvar initial;\r\n\t\tif(ev) {\r\n\t\t\tfullRedrawNeeded = (scheduler.config.all_timed && !(scheduler.isOneDayEvent(scheduler._events[id]) || scheduler.getState().drag_id));\r\n\t\t\tif (fullRedrawNeeded) {\r\n\t\t\t\tinitial = scheduler.config.update_render;\r\n\t\t\t\tscheduler.config.update_render = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\toldUpdate.apply(scheduler, arguments);\r\n\r\n\t\tif(ev) {\r\n\t\t\tif (fullRedrawNeeded) {\r\n\t\t\t\tscheduler.config.update_render = initial;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\r\nvar temp_section;\r\nvar before;\r\n\r\nscheduler.config.collision_limit = 1;\r\n\r\nfunction _setTempSection(event_id) { // for custom views (matrix, timeline, units)\r\n\tvar checked_mode = scheduler._get_section_view();\r\n\tif(checked_mode && event_id){\r\n\t\ttemp_section = scheduler.getEvent(event_id)[scheduler._get_section_property()];\r\n\t}\r\n}\r\n\r\nscheduler.attachEvent(\"onBeforeDrag\",function(id){\r\n\t_setTempSection(id);\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onBeforeLightbox\",function(id){\r\n\tvar ev = scheduler.getEvent(id);\r\n\tbefore = [ev.start_date, ev.end_date];\r\n\t_setTempSection(id);\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventChanged\",function(id){\r\n\tif (!id || !scheduler.getEvent(id)) return true;\r\n\tvar ev = scheduler.getEvent(id);\r\n\tif (!scheduler.checkCollision(ev)){\r\n\t\tif (!before) return false;\r\n\t\tev.start_date = before[0];\r\n\t\tev.end_date = before[1];\r\n\t\tev._timed=this.isOneDayEvent(ev);\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onBeforeEventChanged\",function(ev,e,is_new){\r\n\treturn scheduler.checkCollision(ev);\r\n});\r\nscheduler.attachEvent(\"onEventAdded\",function(id,ev) {\r\n\tvar result = scheduler.checkCollision(ev);\r\n\tif (!result)\r\n\t\tscheduler.deleteEvent(id);\r\n});\r\nscheduler.attachEvent(\"onEventSave\",function(id, edited_ev, is_new){\r\n\tedited_ev = scheduler._lame_clone(edited_ev);\r\n\tedited_ev.id = id;\r\n\r\n\t//lightbox may not have 'time' section\r\n\tif(!(edited_ev.start_date && edited_ev.end_date)){\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tedited_ev.start_date = new Date(ev.start_date);\r\n\t\tedited_ev.end_date = new Date(ev.end_date);\r\n\t}\r\n\r\n\tif(edited_ev.rec_type){\r\n\t\tscheduler._roll_back_dates(edited_ev);\r\n\t}\r\n\treturn scheduler.checkCollision(edited_ev); // in case user creates event on one date but then edited it another\r\n});\r\n\r\nscheduler._check_sections_collision = function(first, second){\r\n\tvar map_to = scheduler._get_section_property();\r\n\tif (first[map_to] == second[map_to] && first.id != second.id)\r\n\t\treturn true;\r\n\treturn false;\r\n};\r\n\r\nscheduler.checkCollision = function(ev) {\r\n\tvar evs = [];\r\n\tvar collision_limit = scheduler.config.collision_limit;\r\n\r\n\tif (ev.rec_type) {\r\n\t\tvar evs_dates = scheduler.getRecDates(ev);\r\n\t\tfor(var k=0; k= collision_limit) {\r\n\r\n\t\t\tsingle = false;\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\tif ( evs.length >= collision_limit )\r\n\t\t\tsingle = false;\r\n\t}\r\n\tif (!single) {\r\n\t\tvar res = !scheduler.callEvent(\"onEventCollision\",[ev,evs]);\r\n\t\tif (!res) {\r\n\t\t\tev[map_to] = temp_section||ev[map_to]; // from _setTempSection for custom views\r\n\t\t}\r\n\t\treturn res;\r\n\t}\r\n\treturn single;\r\n\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.config.container_autoresize = true;\r\n\tscheduler.config.month_day_min_height = 90;\r\n\tscheduler.config.min_grid_size = 25;\r\n\tscheduler.config.min_map_size = 400;\r\n\r\n\tvar old_pre_render_event = scheduler._pre_render_events;\r\n\r\n\t//need for temporary disabling without modifying public config\r\n\tvar active = true;\r\n\tvar total_height = 0;\r\n\tvar multiday_height = 0;\r\n\r\n\tscheduler._pre_render_events = function(evs, hold) {\r\n\t\tif (!(scheduler.config.container_autoresize && active)) {\r\n\t\t\treturn old_pre_render_event.apply(this, arguments);\r\n\t\t}\r\n\r\n\t\tvar hb = this.xy.bar_height;\r\n\t\tvar h_old = this._colsS.heights;\r\n\t\tvar h = this._colsS.heights = [0, 0, 0, 0, 0, 0, 0];\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tif (!this._table_view)\r\n\t\t\tevs = this._pre_render_events_line(evs, hold); //ignore long events for now\r\n\t\telse\r\n\t\t\tevs = this._pre_render_events_table(evs, hold);\r\n\r\n\t\tif (this._table_view) {\r\n\t\t\tif (hold){\r\n\t\t\t\tthis._colsS.heights = h_old;\r\n\t\t\t} else {\r\n\t\t\t\tvar evl = data.firstChild;\r\n\t\t\t\tconst rows = evl.querySelectorAll(\".dhx_cal_month_row\");\r\n\t\t\t\tif (rows) {\r\n\t\t\t\t\tfor (var i = 0; i < rows.length; i++) {\r\n\t\t\t\t\t\th[i]++;\r\n\r\n\t\t\t\t\t\tif ((h[i]) * hb > this._colsS.height - this.xy.month_head_height) { // 22 - height of cell's header\r\n\t\t\t\t\t\t\t//we have overflow, update heights\r\n\t\t\t\t\t\t\tvar cells = rows[i].querySelectorAll(\".dhx_cal_month_cell\");\r\n\r\n\t\t\t\t\t\t\tvar cHeight = this._colsS.height - this.xy.month_head_height;\r\n\t\t\t\t\t\t\tif(this.config.max_month_events*1 !== this.config.max_month_events || h[i] <= this.config.max_month_events){\r\n\t\t\t\t\t\t\t\tcHeight = h[i] * hb;\r\n\t\t\t\t\t\t\t}else if( (this.config.max_month_events + 1) * hb > this._colsS.height - this.xy.month_head_height){\r\n\t\t\t\t\t\t\t\tcHeight = (this.config.max_month_events + 1) * hb;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\trows[i].style.height = (cHeight + this.xy.month_head_height) + \"px\";\r\n\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\tfor (var j = 0; j < cells.length; j++) {\r\n\t\t\t\t\t\t\t\tcells[j].childNodes[1].style.height = cHeight + \"px\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\th[i] = (h[i - 1] || 0) + cells[0].offsetHeight;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\th[i] = (h[i - 1] || 0) + rows[i].querySelectorAll(\".dhx_cal_month_cell\")[0].offsetHeight;\r\n\t\t\t\t\t}\r\n\t\t\t\t\th.unshift(0);\r\n\t\t\t\t\tif (evl.parentNode.offsetHeight < evl.parentNode.scrollHeight && !evl._h_fix) {\r\n\t\t\t\t\t\t//we have v-scroll, decrease last day cell\r\n\r\n\t\t\t\t\t\t// NO CHECK SHOULD BE MADE ON VERTICAL SCROLL\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (!evs.length && this._els[\"dhx_multi_day\"][0].style.visibility == \"visible\")\r\n\t\t\t\t\t\th[0] = -1;\r\n\t\t\t\t\tif (evs.length || h[0] == -1) {\r\n\t\t\t\t\t\t//shift days to have space for multiday events\r\n\t\t\t\t\t\t//var childs = evl.parentNode.childNodes;\r\n\t\t\t\t\t\tvar dh = ((h[0] + 1) * hb + 1); // +1 so multiday events would have 2px from top and 2px from bottom by default\r\n\t\t\t\t\t\tif(multiday_height != dh + 1) {\r\n\t\t\t\t\t\t\tthis._obj.style.height = (total_height - multiday_height + dh - 1) + \"px\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tdh += \"px\";\r\n\t\t\t\t\t\tconst navHeight = this._els[\"dhx_cal_navline\"][0].offsetHeight;\r\n\t\t\t\t\t\tconst headerHeight = this._els[\"dhx_cal_header\"][0].offsetHeight;\r\n\t\t\t\t\t\tdata.style.height = (this._obj.offsetHeight - navHeight - headerHeight - (this.xy.margin_top || 0)) + 'px';\r\n\t\t\t\t\t\tvar last = this._els[\"dhx_multi_day\"][0];\r\n\t\t\t\t\t\tlast.style.height = dh;\r\n\t\t\t\t\t\tlast.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\t\tlast = this._els[\"dhx_multi_day\"][1];\r\n\t\t\t\t\t\tlast.style.height = dh;\r\n\t\t\t\t\t\tlast.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\t\tif(last.style.visibility == \"hidden\"){\r\n\t\t\t\t\t\t\tlast.style.display = \"none\";\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tlast.style.display = \"\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tlast.className = h[0] ? \"dhx_multi_day_icon\" : \"dhx_multi_day_icon_small\";\r\n\t\t\t\t\t\tthis._dy_shift = (h[0] + 1) * hb;\r\n\t\t\t\t\t\th[0] = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn evs;\r\n\t};\r\n\r\n\tvar checked_divs = [\"dhx_cal_navline\", \"dhx_cal_header\", \"dhx_multi_day\", \"dhx_cal_data\"];\r\n\tvar updateContainterHeight = function(is_repaint) {\r\n\t\ttotal_height = 0;\r\n\t\tfor (var i = 0; i < checked_divs.length; i++) {\r\n\r\n\t\t\tvar className = checked_divs[i];\r\n\t\t\tvar checked_div = (scheduler._els[className]) ? scheduler._els[className][0] : null;\r\n\t\t\tvar height = 0;\r\n\t\t\tswitch (className) {\r\n\t\t\t\tcase \"dhx_cal_navline\":\r\n\t\t\t\tcase \"dhx_cal_header\":\r\n\t\t\t\t\theight = checked_div.offsetHeight;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"dhx_multi_day\":\r\n\t\t\t\t\theight = (checked_div) ? checked_div.offsetHeight - 1 : 0;\r\n\t\t\t\t\tmultiday_height = height;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"dhx_cal_data\":\r\n\t\t\t\t\tvar mode = scheduler.getState().mode;\r\n\r\n\t\t\t\t\tif(checked_div.childNodes[1] && mode != \"month\") {\r\n\t\t\t\t\t\tlet maxHeight = 0;\r\n\t\t\t\t\t\tfor(let i = 0; i < checked_div.childNodes.length; i++){\r\n\t\t\t\t\t\t\tif(checked_div.childNodes[i].offsetHeight > maxHeight){\r\n\t\t\t\t\t\t\t\tmaxHeight = checked_div.childNodes[i].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\theight = maxHeight;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\theight = Math.max(checked_div.offsetHeight - 1, checked_div.scrollHeight);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (mode == \"month\") {\r\n\t\t\t\t\t\tif (scheduler.config.month_day_min_height && !is_repaint) {\r\n\t\t\t\t\t\t\tvar rows_length = checked_div.querySelectorAll(\".dhx_cal_month_row\").length;\r\n\t\t\t\t\t\t\theight = rows_length * scheduler.config.month_day_min_height;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (is_repaint) {\r\n\t\t\t\t\t\t\tchecked_div.style.height = height + \"px\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (mode == \"year\"){\r\n\t\t\t\t\t\theight = 190 * scheduler.config.year_y;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(mode == \"agenda\"){\r\n\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\tif(checked_div.childNodes && checked_div.childNodes.length){\r\n\t\t\t\t\t\t\tfor(var j = 0; j < checked_div.childNodes.length; j++){\r\n\t\t\t\t\t\t\t\theight += checked_div.childNodes[j].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(height + 2 < scheduler.config.min_grid_size){\r\n\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (mode == \"week_agenda\"){\r\n\t\t\t\t\t\tvar min_height = scheduler.xy.week_agenda_scale_height + scheduler.config.min_grid_size,\r\n\t\t\t\t\t\t\tcur_height;\r\n\r\n\t\t\t\t\t\tvar column;\r\n\t\t\t\t\t\tfor(var k = 0; k < checked_div.childNodes.length; k++){\r\n\t\t\t\t\t\t\tcolumn = checked_div.childNodes[k];\r\n\t\t\t\t\t\t\tfor(var j = 0; j < column.childNodes.length; j++) {\r\n\t\t\t\t\t\t\t\tvar innerHeight = 0,\r\n\t\t\t\t\t\t\t\t\teventsContainer = column.childNodes[j].childNodes[1];\r\n\r\n\t\t\t\t\t\t\t\tfor(var g =0; g < eventsContainer.childNodes.length; g++){\r\n\t\t\t\t\t\t\t\t\tinnerHeight += eventsContainer.childNodes[g].offsetHeight;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tcur_height = innerHeight + scheduler.xy.week_agenda_scale_height;\r\n\t\t\t\t\t\t\t\tcur_height = (k == 1 && (j == 2 || j == 3)) ? cur_height * 2 : cur_height; // for last two cells;\r\n\r\n\t\t\t\t\t\t\t\tif (cur_height > min_height) {\r\n\t\t\t\t\t\t\t\t\tmin_height = cur_height;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\theight = min_height * 3;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(mode == \"map\") {\r\n\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\tvar evs = checked_div.querySelectorAll(\".dhx_map_line\");\r\n\r\n\t\t\t\t\t\tfor (var j = 0; j < evs.length; j++) {\r\n\t\t\t\t\t\t\theight += evs[j].offsetHeight;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (height + 2 < scheduler.config.min_map_size) {\r\n\t\t\t\t\t\t\theight = scheduler.config.min_map_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(scheduler._gridView) {\r\n\t\t\t\t\t\theight = 0;\r\n\r\n\t\t\t\t\t\tif (checked_div.childNodes[1].childNodes[0].childNodes && checked_div.childNodes[1].childNodes[0].childNodes.length) {\r\n\t\t\t\t\t\t\tvar evs = checked_div.childNodes[1].childNodes[0].childNodes[0].childNodes;\r\n\r\n\t\t\t\t\t\t\tfor (var j = 0; j < evs.length; j++) {\r\n\t\t\t\t\t\t\t\theight += evs[j].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\theight += 2;\r\n\r\n\t\t\t\t\t\t\tif(height < scheduler.config.min_grid_size){\r\n\t\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (scheduler.matrix && scheduler.matrix[mode]) {\r\n\t\t\t\t\t\tif (is_repaint) {\r\n\t\t\t\t\t\t\theight += 0;\r\n\t\t\t\t\t\t\tchecked_div.style.height = height + \"px\";\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\t\tvar cfg = scheduler.matrix[mode];\r\n\t\t\t\t\t\t\tvar rows = cfg.y_unit;\r\n\t\t\t\t\t\t\tfor(var r=0; r < rows.length; r++){\r\n\t\t\t\t\t\t\t\theight += cfg.getSectionHeight(rows[r].key);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t// Check and add extra height to avoid events hiding by the horizontal scrollbar\r\n\t\t\t\t\t\t\tif(scheduler.$container.clientWidth != scheduler.$container.scrollWidth){\r\n\t\t\t\t\t\t\t\theight += getScrollSize();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\theight -= 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (mode == \"day\" || mode == \"week\" || (scheduler._props && scheduler._props[mode])) {\r\n\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\theight += 1;\r\n\t\t\ttotal_height += height;\r\n\t\t}\r\n\t\tscheduler._obj.style.height = (total_height) + \"px\";\r\n\r\n\t\tif (!is_repaint)\r\n\t\t\tscheduler.updateView();\r\n\t};\r\n\r\n\tfunction callUpdate(){\r\n\t\tactive = false;\r\n\t\tscheduler.callEvent(\"onAfterSchedulerResize\", []);\r\n\t\tactive = true;\r\n\t}\r\n\r\n\tvar conditionalUpdateContainerHeight = function() {\r\n\t\tif(!(scheduler.config.container_autoresize && active))\r\n\t\t\treturn true;\r\n\r\n\t\tvar mode = scheduler.getState().mode;\r\n\r\n\t\tif(!mode) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tvar asyncRepaint = window.requestAnimationFrame || window.setTimeout;\r\n\t\tvar scrollTop = document.documentElement.scrollTop;\r\n\r\n\t\tasyncRepaint(function() {\r\n\t\t\tif(scheduler.$destroyed || !scheduler.$initialized){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tupdateContainterHeight();\r\n\t\t});\r\n\r\n\t\tif ( (scheduler.matrix && scheduler.matrix[mode]) || mode == \"month\") {\r\n\t\t\tasyncRepaint(function() {\r\n\t\t\t\tif(scheduler.$destroyed || !scheduler.$initialized){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tupdateContainterHeight(true);\r\n\t\t\t\tdocument.documentElement.scrollTop = scrollTop;\r\n\t\t\t\tcallUpdate();\r\n\t\t\t}, 1);\r\n\t\t}else{\r\n\t\t\tcallUpdate();\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function(){\r\n\t\tvar autosizeEnabled = scheduler.config.container_autoresize;\r\n\t\tif(!scheduler.xy.$original_scroll_width){\r\n\t\t\tscheduler.xy.$original_scroll_width = scheduler.xy.scroll_width;\r\n\t\t}\r\n\r\n\t\tscheduler.xy.scroll_width = autosizeEnabled ? 0 : scheduler.xy.$original_scroll_width;\r\n\r\n\t\tif(scheduler.matrix){\r\n\t\t\tfor(var i in scheduler.matrix){\r\n\t\t\t\tvar timeline = scheduler.matrix[i];\r\n\t\t\t\tif(!timeline.$original_section_autoheight){\r\n\t\t\t\t\ttimeline.$original_section_autoheight = timeline.section_autoheight;\r\n\t\t\t\t}\r\n\t\t\t\tif(autosizeEnabled){\r\n\t\t\t\t\ttimeline.section_autoheight = false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\ttimeline.section_autoheight = timeline.$original_section_autoheight;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onXLE\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventChanged\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventCreated\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventAdded\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventDeleted\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onAfterSchedulerResize\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onClearAll\", conditionalUpdateContainerHeight);\r\n\r\n\t//disable container autoresize when expanded\r\n\tscheduler.attachEvent(\"onBeforeExpand\", function(){\r\n\t\tactive = false;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeCollapse\", function(){\r\n\t\tactive = true;\r\n\t\treturn true;\r\n\t});\r\n\t// helper function\r\n\tfunction getScrollSize() {\r\n\t\tvar div = document.createElement(\"div\");\r\n\t\tdiv.style.cssText = \"visibility:hidden;position:absolute;left:-1000px;width:100px;padding:0px;margin:0px;height:110px;min-height:100px;overflow-y:scroll;\";\r\n\r\n\t\tdocument.body.appendChild(div);\r\n\t\tvar size = div.offsetWidth - div.clientWidth;\r\n\t\tdocument.body.removeChild(div);\r\n\t\treturn size;\r\n\t}\r\n\r\n\r\n}","export default function(scheduler){\r\n\tfunction setCookie(name,cookie_param,value) {\r\n\t\tvar str = name + \"=\" + value + (cookie_param?(\"; \"+cookie_param):\"\");\r\n\t\tdocument.cookie = str;\r\n\t}\r\n\tfunction getCookie(name) {\r\n\t\tvar search = name + \"=\";\r\n\t\tif (document.cookie.length > 0) {\r\n\t\t\tvar offset = document.cookie.indexOf(search);\r\n\t\t\tif (offset != -1) {\r\n\t\t\t\toffset += search.length;\r\n\t\t\t\tvar end = document.cookie.indexOf(\";\", offset);\r\n\t\t\t\tif (end == -1)\r\n\t\t\t\t\tend = document.cookie.length;\r\n\t\t\t\treturn document.cookie.substring(offset, end);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}\r\n\r\n\tfunction getCookieName(scheduler) {\r\n\t\treturn (scheduler._obj.id || \"scheduler\") + \"_settings\";\r\n\t}\r\n\r\n\tvar first = true;\r\n\tscheduler.attachEvent(\"onBeforeViewChange\",function(oldMode,oldDate,mode,date){\r\n\t\t// if Url plugin is enabled - explicit url values should have more priority than cookies\r\n\t\tif (first && scheduler._get_url_nav){\r\n\t\t\tvar urlNavigationPlugin = scheduler._get_url_nav();\r\n\t\t\tif(urlNavigationPlugin.date || urlNavigationPlugin.mode || urlNavigationPlugin.event){\r\n\t\t\t\tfirst = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar cookie = getCookieName(scheduler);\r\n\r\n\t\tif (first){\r\n\t\t\tfirst = false;\r\n\t\t\tvar schedulerCookie = getCookie(cookie);\r\n\t\t\tif (schedulerCookie){\r\n\r\n\t\t\t\tif(!scheduler._min_date){\r\n\t\t\t\t\t//otherwise scheduler will have incorrect date until timeout\r\n\t\t\t\t\t//it can cause js error with 'onMouseMove' handler of key_nav.js\r\n\t\t\t\t\tscheduler._min_date = date;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tschedulerCookie = unescape(schedulerCookie).split(\"@\");\r\n\t\t\t\tschedulerCookie[0] = this._helpers.parseDate(schedulerCookie[0]);\r\n\t\t\t\tvar view = this.isViewExists(schedulerCookie[1]) ? schedulerCookie[1] : mode,\r\n\t\t\t\t\tdate = !isNaN(+schedulerCookie[0]) ? schedulerCookie[0] : date;\r\n\r\n\t\t\t\twindow.setTimeout(function(){\r\n\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tscheduler.setCurrentView(date,view);\r\n\t\t\t\t},1);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", function (newMode , newDate){\r\n\t\tvar cookie = getCookieName(scheduler);\r\n\t\tvar text = escape(this._helpers.formatDate(newDate)+\"@\"+(newMode));\r\n\t\tsetCookie(cookie,\"expires=Sun, 31 Jan 9999 22:00:00 GMT\",text);\r\n\t});\r\n\r\n\t// As we are blocking first render above there could be a problem in case of dynamic loading and rendering of visible data in general ('from'/'to' won't be defined)\r\n\tvar old_load = scheduler._load;\r\n\tscheduler._load = function() {\r\n\t\tvar args = arguments;\r\n\r\n\t\tif (!scheduler._date) {\r\n\t\t\tvar that = this;\r\n\t\t\twindow.setTimeout(function() {\r\n\t\t\t\told_load.apply(that, args);\r\n\t\t\t},1);\r\n\t\t} else {\r\n\t\t\told_load.apply(this, args);\r\n\t\t}\r\n\t};\r\n}","export default {\r\n\talert: (extension, assert) => {\r\n\t\tassert(false, `The ${extension} extension is not included in this version of dhtmlxScheduler.
\r\n\t\tYou may need a Professional version of the component.
\r\n\t\tContact us at https://dhtmlx.com/docs/contact.shtml if you have any questions.`);\r\n\t}\r\n};","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Day Timeline\", scheduler.assert);\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Drag Between\", scheduler.assert);\r\n}","export default function(scheduler){\r\n/* global dhtmlXCombo */\r\nscheduler.form_blocks['combo']={\r\n\trender:function(sns) {\r\n\t\tif (!sns.cached_options)\r\n\t\t\tsns.cached_options = {};\r\n\t\tvar res = '';\r\n\t\tres += \"
\";\r\n\t\treturn res;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\t(function(){\r\n\t\t\tresetCombo();\r\n\t\t\tvar id = scheduler.attachEvent(\"onAfterLightbox\",function(){\r\n\t\t\t\t// otherwise destructor will never be called after form reset(e.g. in readonly event mode)\r\n\t\t\t\tresetCombo();\r\n\t\t\t\tscheduler.detachEvent(id);\r\n\t\t\t});\r\n\t\t\tfunction resetCombo(){\r\n\t\t\t\tif(node._combo && node._combo.DOMParent) {\r\n\t\t\t\t\tvar combo = node._combo;\r\n\t\t\t\t\tif(combo.unload){\r\n\t\t\t\t\t\tcombo.unload();\r\n\t\t\t\t\t}else if(combo.destructor){\r\n\t\t\t\t\t\tcombo.destructor();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// dhtmlxCombo 4.1.0 bug\r\n\t\t\t\t\tcombo.DOMParent = combo.DOMelem = null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})();\r\n\t\twindow.dhx_globalImgPath = config.image_path||'/';\r\n\t\tnode._combo = new dhtmlXCombo(node, config.name, node.offsetWidth-8);\r\n\t\tif (config.onchange)\r\n\t\t\tnode._combo.attachEvent(\"onChange\", config.onchange);\r\n\r\n\t\tif (config.options_height)\r\n\t\t\tnode._combo.setOptionHeight(config.options_height);\r\n\t\tvar combo = node._combo;\r\n\t\tcombo.enableFilteringMode(config.filtering, config.script_path||null, !!config.cache);\r\n\r\n\t\tif (!config.script_path) { // script-side filtration is used\r\n\t\t\tvar all_options = [];\r\n\t\t\tfor (var i = 0; i < config.options.length; i++) {\r\n\t\t\t\tvar option = config.options[i];\r\n\t\t\t\tvar single_option = [\r\n\t\t\t\t\toption.key,\r\n\t\t\t\t\toption.label,\r\n\t\t\t\t\toption.css\r\n\t\t\t\t];\r\n\t\t\t\tall_options.push(single_option);\r\n\t\t\t}\r\n\t\t\tcombo.addOption(all_options);\r\n\t\t\tif (ev[config.map_to]) {\r\n\t\t\t\tvar index = combo.getIndexByValue(ev[config.map_to]);\r\n\t\t\t\tcombo.selectOption(index);\r\n\t\t\t}\r\n\t\t} else { // server-side filtration is used\r\n\t\t\tvar selected_id = ev[config.map_to];\r\n\t\t\tif (selected_id) {\r\n\t\t\t\tif (config.cached_options[selected_id]) {\r\n\t\t\t\t\tcombo.addOption(selected_id, config.cached_options[selected_id]);\r\n\t\t\t\t\tcombo.disable(1);\r\n\t\t\t\t\tcombo.selectOption(0);\r\n\t\t\t\t\tcombo.disable(0);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tscheduler.ajax.get(config.script_path+\"?id=\"+selected_id+\"&uid=\"+scheduler.uid(), function(result){\r\n\t\t\t\t\t\tvar responseText = result.xmlDoc.responseText;\r\n\t\t\t\t\t\tvar label;\r\n\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\tvar res = JSON.parse(responseText);\r\n\t\t\t\t\t\t\tlabel = res.options[0].text;\r\n\t\t\t\t\t\t}catch(e){\r\n\t\t\t\t\t\t\tvar option = scheduler.ajax.xpath(\"//option\", result.xmlDoc)[0];\r\n\t\t\t\t\t\t\tlabel = option.childNodes[0].nodeValue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tconfig.cached_options[selected_id] = label;\r\n\t\t\t\t\t\tcombo.addOption(selected_id, label);\r\n\t\t\t\t\t\tcombo.disable(1);\r\n\t\t\t\t\t\tcombo.selectOption(0);\r\n\t\t\t\t\t\tcombo.disable(0);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tcombo.setComboValue(\"\");\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config) {\r\n\t\tvar selected_id = node._combo.getSelectedValue(); // value = key\r\n\t\tif (config.script_path) {\r\n\t\t\tconfig.cached_options[selected_id] = node._combo.getSelectedText();\r\n\t\t}\r\n\t\treturn selected_id;\r\n\t},\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\nscheduler.form_blocks['radio']={\r\n\trender:function(sns) {\r\n\t\tvar res = '';\r\n\t\tres += `
`;\r\n\t\tfor (var i=0; i\"+\" \"+sns.options[i].label+\"\";\r\n\t\t}\r\n\t\tres += \"
\";\r\n\r\n\t\treturn res;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\tvar radiobuttons = node.getElementsByTagName('input');\r\n\t\tfor (var i = 0; i < radiobuttons.length; i++) {\r\n\t\t\tradiobuttons[i].checked = false;\r\n\t\t\tvar checked_value = ev[config.map_to]||value;\r\n\t\t\tif (radiobuttons[i].value == checked_value) {\r\n\t\t\t\tradiobuttons[i].checked = true;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tvar radiobuttons = node.getElementsByTagName('input');\r\n\t\tfor(var i=0; i
';\r\n\t\telse\r\n\t\t\treturn '';\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\tnode=scheduler._lightbox.querySelector(`#${config.id}`);\r\n\t\tvar id = scheduler.uid();\r\n\t\tvar isChecked = (typeof config.checked_value != \"undefined\") ? value == config.checked_value : !!value;\r\n\t\tnode.className += \" dhx_cal_checkbox\";\r\n\t\tvar check_html = \"\";\r\n\t\tvar label_html = \"\";\r\n\t\tif (scheduler.config.wide_form){\r\n\t\t\tnode.innerHTML = label_html;\r\n\t\t\tnode.nextSibling.innerHTML=check_html;\r\n\t\t} else\r\n\t\t\tnode.innerHTML=check_html+label_html;\r\n\r\n\t\tif (config.handler) {\r\n\t\t\tvar checkbox = node.getElementsByTagName('input')[0];\r\n\t\t\tif(checkbox.$_eventAttached){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tcheckbox.$_eventAttached = true;\r\n\t\t\tscheduler.event(checkbox, \"click\", config.handler);\r\n\t\t\t//checkbox.onclick = config.handler;\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tnode=scheduler._lightbox.querySelector(`#${config.id}`);\r\n\t\tvar checkbox = node.getElementsByTagName('input')[0]; // moved to the header\r\n\t\tif (!checkbox)\r\n\t\t\tcheckbox = node.nextSibling.getElementsByTagName('input')[0];\r\n\t\treturn (checkbox.checked)?(config.checked_value||true):(config.unchecked_value||false);\r\n\t},\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.ext.fullscreen = {\r\n\ttoggleIcon: null\r\n};\r\n\r\nscheduler.expand = function() {\r\n\tif(!scheduler.callEvent(\"onBeforeExpand\", []))\r\n\t\treturn;\r\n\tvar t = scheduler._obj;\r\n\tdo {\r\n\t\tt._position = t.style.position || \"\";\r\n\t\tt.style.position = \"static\";\r\n\t} while ((t = t.parentNode) && t.style);\r\n\tt = scheduler._obj;\r\n\tt.style.position = \"absolute\";\r\n\tt._width = t.style.width;\r\n\tt._height = t.style.height;\r\n\tt.style.width = t.style.height = \"100%\";\r\n\tt.style.top = t.style.left = \"0px\";\r\n\r\n\tvar top = document.body;\r\n\ttop.scrollTop = 0;\r\n\r\n\ttop = top.parentNode;\r\n\tif (top)\r\n\t\ttop.scrollTop = 0;\r\n\tdocument.body._overflow = document.body.style.overflow || \"\";\r\n\tdocument.body.style.overflow = \"hidden\";\r\n\tscheduler._maximize();\r\n\tscheduler.callEvent(\"onExpand\", []);\r\n};\r\nscheduler.collapse = function() {\r\n\tif(!scheduler.callEvent(\"onBeforeCollapse\", []))\r\n\t\treturn;\r\n\tvar t = scheduler._obj;\r\n\tdo {\r\n\t\tt.style.position = t._position;\r\n\t} while ((t = t.parentNode) && t.style);\r\n\tt = scheduler._obj;\r\n\tt.style.width = t._width;\r\n\tt.style.height = t._height;\r\n\tdocument.body.style.overflow = document.body._overflow;\r\n\tscheduler._maximize();\r\n\tscheduler.callEvent(\"onCollapse\", []);\r\n};\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar t = document.createElement(\"div\");\r\n\tt.className = \"dhx_expand_icon\";\r\n\tscheduler.ext.fullscreen.toggleIcon = t;\r\n\tt.innerHTML = `\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t`;\r\n\tscheduler._obj.appendChild(t);\r\n\tscheduler.event(t, \"click\", function() {\r\n\t\tif (!scheduler.expanded)\r\n\t\t\tscheduler.expand(); else\r\n\t\t\tscheduler.collapse();\r\n\t});\r\n});\r\nscheduler._maximize = function() {\r\n\tthis.expanded = !this.expanded;\r\n\tif(this.expanded){\r\n\t\tthis.ext.fullscreen.toggleIcon.classList.add(\"dhx_expand_icon--expanded\");\r\n\t\t\r\n\t}else{\r\n\t\tthis.ext.fullscreen.toggleIcon.classList.remove(\"dhx_expand_icon--expanded\");\r\n\t}\r\n\t\r\n\t//scheduler.ext.fullscreen.toggleIcon.style.backgroundPosition = \"0 \" + (this.expanded ? \"0\" : \"18\") + \"px\";\r\n\r\n\tvar directions = ['left', 'top'];\r\n\tfor (var i = 0; i < directions.length; i++) {\r\n\t\t//var margin = scheduler.xy['margin_' + directions[i]];\r\n\t\tvar prev_margin = scheduler['_prev_margin_' + directions[i]];\r\n\t\tif (scheduler.xy['margin_' + directions[i]]) {\r\n\t\t\tscheduler['_prev_margin_' + directions[i]] = scheduler.xy['margin_' + directions[i]];\r\n\t\t\tscheduler.xy['margin_' + directions[i]] = 0;\r\n\t\t} else {\r\n\t\t\tif (prev_margin) {\r\n\t\t\t\tscheduler.xy['margin_' + directions[i]] = scheduler['_prev_margin_' + directions[i]];\r\n\t\t\t\tdelete scheduler['_prev_margin_' + directions[i]];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler.setCurrentView();\r\n};\r\n\r\n\r\n}\r\n","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Grid\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\tvar els = document.body.getElementsByTagName(\"DIV\");\r\n\tfor (var i=0; i < els.length; i++) {\r\n\t\tvar cs = els[i].className||\"\";\r\n\t\tcs = cs.split(\":\");\r\n\t\tif (cs.length == 2 && cs[0] == \"template\"){\r\n\t\t\tvar code = \"return \\\"\"+(els[i].innerHTML||\"\").replace(/\\\\/g, \"\\\\\\\\\").replace(/\"/g,\"\\\\\\\"\").replace(/[\\n\\r]+/g,\"\")+\"\\\";\";\r\n\t\t\tcode = unescape(code).replace(/\\{event\\.([a-z]+)\\}/g,function(all,mask){\r\n\t\t\t\treturn '\"+ev.'+mask+'+\"';\r\n\t\t\t});\r\n\t\t\tscheduler.templates[cs[1]]=Function(\"start\",\"end\",\"ev\",code);\r\n\t\t\tels[i].style.display='none';\r\n\t\t}\r\n\t}\r\n});\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.shortcuts = {\r\n\tcreateCommand: function(){\r\n\t\treturn {\r\n\t\t\tmodifiers:{\r\n\t\t\t\t\"shift\": false,\r\n\t\t\t\t\"alt\": false,\r\n\t\t\t\t\"ctrl\": false,\r\n\t\t\t\t\"meta\": false\r\n\t\t\t},\r\n\t\t\tkeyCode: null\r\n\t\t};\r\n\t},\r\n\tparse: function(shortcut){\r\n\t\tvar commands = [];\r\n\r\n\t\tvar expr = this.getExpressions(this.trim(shortcut));\r\n\t\tfor(var i = 0; i < expr.length; i++){\r\n\t\t\tvar words = this.getWords(expr[i]);\r\n\r\n\t\t\tvar command = this.createCommand();\r\n\r\n\t\t\tfor(var j = 0; j < words.length; j++){\r\n\t\t\t\tif(this.commandKeys[words[j]]){\r\n\t\t\t\t\tcommand.modifiers[words[j]] = true;\r\n\t\t\t\t}else if(this.specialKeys[words[j]]){\r\n\t\t\t\t\tcommand.keyCode = this.specialKeys[words[j]];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcommand.keyCode = words[j].charCodeAt(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tcommands.push(command);\r\n\t\t}\r\n\t\treturn commands;\r\n\t},\r\n\r\n\tgetCommandFromEvent: function(domEvent){\r\n\t\tvar command = this.createCommand();\r\n\t\tcommand.modifiers.shift = !!domEvent.shiftKey;\r\n\t\tcommand.modifiers.alt = !!domEvent.altKey;\r\n\t\tcommand.modifiers.ctrl = !!domEvent.ctrlKey;\r\n\t\tcommand.modifiers.meta = !!domEvent.metaKey;\r\n\t\tcommand.keyCode = domEvent.which || domEvent.keyCode;\r\n\r\n\t\tif(command.keyCode >= 96 && command.keyCode <= 105){\r\n\t\t\t// numpad keys 96-105 -> 48-57\r\n\t\t\tcommand.keyCode -= 48;//convert numpad number code to regular number code\r\n\t\t}\r\n\r\n\t\tvar printableKey = String.fromCharCode(command.keyCode );\r\n\t\tif(printableKey){\r\n\t\t\tcommand.keyCode = printableKey.toLowerCase().charCodeAt(0);\r\n\t\t}\r\n\t\treturn command;\r\n\t},\r\n\r\n\tgetHashFromEvent: function(domEvent){\r\n\t\treturn this.getHash(this.getCommandFromEvent(domEvent));\r\n\t},\r\n\r\n\tgetHash: function(command){\r\n\t\tvar parts = [];\r\n\t\tfor(var i in command.modifiers){\r\n\t\t\tif(command.modifiers[i]){\r\n\t\t\t\tparts.push(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tparts.push(command.keyCode);\r\n\r\n\t\treturn parts.join(this.junctionChar);\r\n\t},\r\n\r\n\tgetExpressions: function(shortcut){\r\n\t\treturn shortcut.split(this.junctionChar);\r\n\t},\r\n\tgetWords: function(term){\r\n\t\treturn term.split(this.combinationChar);\r\n\t},\r\n\ttrim: function(shortcut){\r\n\t\treturn shortcut.replace(/\\s/g, \"\");\r\n\t},\r\n\tjunctionChar:\",\",\r\n\tcombinationChar:\"+\",\r\n\tcommandKeys:{\r\n\t\t\"shift\": 16,\r\n\t\t\"alt\": 18,\r\n\t\t\"ctrl\": 17,\r\n\t\t\"meta\": true\r\n\t},\r\n\tspecialKeys:{\r\n\t\t\"backspace\": 8,\r\n\t\t\"tab\": 9,\r\n\t\t\"enter\": 13,\r\n\t\t\"esc\": 27,\r\n\t\t\"space\": 32,\r\n\t\t\"up\": 38,\r\n\t\t\"down\": 40,\r\n\t\t\"left\": 37,\r\n\t\t\"right\": 39,\r\n\t\t\"home\": 36,\r\n\t\t\"end\": 35,\r\n\t\t\"pageup\": 33,\r\n\t\t\"pagedown\": 34,\r\n\t\t\"delete\": 46,\r\n\t\t\"insert\": 45,\r\n\t\t\"plus\":107,\r\n\t\t\"f1\": 112,\r\n\t\t\"f2\": 113,\r\n\t\t\"f3\": 114,\r\n\t\t\"f4\": 115,\r\n\t\t\"f5\": 116,\r\n\t\t\"f6\": 117,\r\n\t\t\"f7\": 118,\r\n\t\t\"f8\": 119,\r\n\t\t\"f9\": 120,\r\n\t\t\"f10\": 121,\r\n\t\t\"f11\": 122,\r\n\t\t\"f12\": 123\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.EventHandler = {\r\n\t_handlers: null,\r\n\tfindHandler: function(command){\r\n\t\tif(!this._handlers) this._handlers = {};\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\t\tvar hash = shortcuts.getHash(command);\r\n\r\n\t\treturn this._handlers[hash];\r\n\t},\r\n\r\n\tdoAction: function(command, e){\r\n\t\tvar handler = this.findHandler(command);\r\n\t\tif(handler){\r\n\t\t\thandler.call(this, e);\r\n\r\n\t\t\tif (e.preventDefault) e.preventDefault();\r\n\t\t\telse e.returnValue = false;\r\n\r\n\t\t}\r\n\t},\r\n\tbind: function(shortcut, handler){\r\n\t\tif(!this._handlers) this._handlers = {};\r\n\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\r\n\t\tvar commands = shortcuts.parse(shortcut);\r\n\t\tfor(var i = 0; i < commands.length; i++){\r\n\t\t\tthis._handlers[shortcuts.getHash(commands[i])] = handler;\r\n\t\t}\r\n\t},\r\n\tunbind: function(shortcut){\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\r\n\t\tvar commands = shortcuts.parse(shortcut);\r\n\t\tfor(var i = 0; i < commands.length; i++){\r\n\t\t\tif(this._handlers[shortcuts.getHash(commands[i])]){\r\n\t\t\t\tdelete this._handlers[shortcuts.getHash(commands[i])];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tbindAll: function(map){\r\n\t\tfor(var i in map){\r\n\t\t\tthis.bind(i, map[i]);\r\n\t\t}\r\n\t},\r\n\tinitKeys: function(){\r\n\t\tif(!this._handlers)\r\n\t\t\tthis._handlers = {};\r\n\t\tif(this.keys){\r\n\t\t\tthis.bindAll(this.keys);\r\n\t\t}\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n(function(){\r\n\tscheduler.$keyboardNavigation.getFocusableNodes = scheduler._getFocusableNodes;\r\n\r\n\tscheduler.$keyboardNavigation.trapFocus = function trapFocus(root, e){\r\n\t\tif(e.keyCode != 9) return false;\r\n\r\n\t\tvar focusable = scheduler.$keyboardNavigation.getFocusableNodes(root);\r\n\t\tvar currentFocus = document.activeElement;\r\n\t\tvar currentIndex = -1;\r\n\t\tfor(var i = 0; i < focusable.length; i++){\r\n\t\t\tif(focusable[i] == currentFocus){\r\n\t\t\t\tcurrentIndex = i;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar nextIndex, nextItem;\r\n\t\tif(e.shiftKey){\r\n\r\n\t\t\t// back tab\r\n\t\t\t// go to the last element if we focused on the first\r\n\t\t\tnextIndex = (currentIndex <= 0) ? (focusable.length - 1) : (currentIndex - 1);\r\n\r\n\t\t\tnextItem = focusable[nextIndex];\r\n\t\t\tif(nextItem){\r\n\t\t\t\tnextItem.focus();\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\t// forward tab\r\n\t\t\t// forward tab from last element should go back to the first element\r\n\t\t\tnextIndex = (currentIndex >= focusable.length - 1) ? 0 : (currentIndex + 1);\r\n\t\t\tnextItem = focusable[nextIndex];\r\n\t\t\tif(nextItem){\r\n\t\t\t\tnextItem.focus();\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t};\r\n})();\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.marker = {\r\n\tclear: function(){\r\n\t\tvar divs = scheduler.$container.querySelectorAll(\".dhx_focus_slot\");\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tdivs[i].parentNode.removeChild(divs[i]);\r\n\t\t}\r\n\t},\r\n\tcreateElement: function(){\r\n\t\tvar element = document.createElement(\"div\");\r\n\t\telement.setAttribute(\"tabindex\", -1);\r\n\t\telement.className = \"dhx_focus_slot\";\r\n\t\treturn element;\r\n\t},\r\n\r\n\trenderMultiple: function(start, end, method){\r\n\t\tvar divs = [];\r\n\t\tvar currentStart = new Date(start);\r\n\t\tvar currentEnd = new Date(Math.min(end.valueOf(), scheduler.date.add(scheduler.date.day_start(new Date(start)), 1, \"day\").valueOf()));\r\n\t\twhile(currentStart.valueOf() < end.valueOf()){\r\n\r\n\t\t\tdivs = divs.concat(method.call(this, currentStart, new Date(Math.min(currentEnd.valueOf(), end.valueOf()))));\r\n\t\t\tcurrentStart = scheduler.date.day_start(scheduler.date.add(currentStart, 1, \"day\"));\r\n\r\n\t\t\tcurrentEnd = scheduler.date.day_start(scheduler.date.add(currentStart, 1, \"day\"));\r\n\t\t\tcurrentEnd = new Date(Math.min(currentEnd.valueOf(), end.valueOf()));\r\n\t\t}\r\n\r\n\t\treturn divs;\r\n\t},\r\n\r\n\r\n\trender: function(start, end, section){\r\n\t\tthis.clear();\r\n\t\tvar divs = [];\r\n\r\n\t\tvar modes = scheduler.$keyboardNavigation.TimeSlot.prototype._modes;\r\n\t\tvar view = scheduler.$keyboardNavigation.TimeSlot.prototype._getMode();\r\n\t\tswitch (view){\r\n\t\t\tcase modes.units:\r\n\t\t\t\tdivs = this.renderVerticalMarker(start, end, section);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.timeline:\r\n\t\t\t\tdivs = this.renderTimelineMarker(start, end, section);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.year:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderYearMarker));\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.month:\r\n\t\t\t\tdivs = this.renderMonthMarker(start, end);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.weekAgenda:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderWeekAgendaMarker));\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.list:\r\n\t\t\t\tdivs = this.renderAgendaMarker(start, end);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.dayColumns:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderVerticalMarker));\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tthis.addWaiAriaLabel(divs, start, end, section);\r\n\t\tthis.addDataAttributes(divs, start, end, section);\r\n\r\n\t\tfor(var i = divs.length - 1; i >= 0; i--){\r\n\t\t\tif(divs[i].offsetWidth){\r\n\t\t\t\treturn divs[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t},\r\n\r\n\taddDataAttributes: function(divs, start, end, section){\r\n\t\tvar dateToStr = scheduler.date.date_to_str(scheduler.config.api_date);\r\n\r\n\t\tvar from = dateToStr(start),\r\n\t\t\tto = dateToStr(end);\r\n\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tdivs[i].setAttribute(\"data-start-date\", from);\r\n\t\t\tdivs[i].setAttribute(\"data-end-date\", to);\r\n\t\t\tif(section){\r\n\t\t\t\tdivs[i].setAttribute(\"data-section\", section);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\taddWaiAriaLabel: function(divs, start, end, section){\r\n\t\tvar label = \"\";\r\n\t\tvar state = scheduler.getState();\r\n\t\tvar mode = state.mode;\r\n\r\n\t\tvar dateTimeLabel = false;\r\n\r\n\t\tlabel += scheduler.templates.day_date(start);\r\n\r\n\t\tif((scheduler.date.day_start(new Date(start)).valueOf() != start.valueOf())){\r\n\t\t\tlabel += \" \" + scheduler.templates.hour_scale(start);\r\n\t\t\tdateTimeLabel = true;\r\n\t\t}\r\n\r\n\t\tif((scheduler.date.day_start(new Date(start)).valueOf() != scheduler.date.day_start(new Date(end)).valueOf())){\r\n\r\n\t\t\tlabel += \" - \" + scheduler.templates.day_date(end);\r\n\t\t\tif(dateTimeLabel || (scheduler.date.day_start(new Date(end)).valueOf() != end.valueOf())){\r\n\t\t\t\tlabel += \" \" + scheduler.templates.hour_scale(end);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(section){\r\n\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\t\t\t\tconst timeline = scheduler.matrix[mode];\r\n\t\t\t\tconst sectionObject = timeline.y_unit[timeline.order[section]];\r\n\t\t\t\tlabel += \", \" + scheduler.templates[mode + \"_scale_label\"](sectionObject.key, sectionObject.label, sectionObject);\r\n\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\tconst units = scheduler._props[mode];\r\n\t\t\t\tconst sectionObject = units.options[units.order[section]];\r\n\r\n\t\t\t\tlabel += \", \" + scheduler.templates[mode + \"_scale_text\"](sectionObject.key, sectionObject.label, sectionObject);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tscheduler._waiAria.setAttributes(divs[i], {\r\n\t\t\t\t\"aria-label\": label,\r\n\t\t\t\t\"aria-live\": \"polite\"\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\r\n\trenderWeekAgendaMarker: function(start_date, end_date){\r\n\t\tvar divs = scheduler.$container.querySelectorAll(\".dhx_wa_day_cont .dhx_wa_scale_bar\");\r\n\r\n\t\tvar currDate = scheduler.date.week_start(new Date(scheduler.getState().min_date));\r\n\r\n\t\tvar index = -1;\r\n\t\tvar markerDate = scheduler.date.day_start(new Date(start_date));\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tindex++;\r\n\t\t\tif(scheduler.date.day_start(new Date(currDate)).valueOf() == markerDate.valueOf()){\r\n\t\t\t\tbreak;\r\n\t\t\t}else{\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(index != -1) return this._wrapDiv(divs[index]);\r\n\t\treturn [];\r\n\t},\r\n\r\n\t_wrapDiv: function(cell){\r\n\t\tvar marker = this.createElement();\r\n\t\tmarker.style.top = cell.offsetTop + \"px\";\r\n\t\tmarker.style.left = cell.offsetLeft + \"px\";\r\n\t\tmarker.style.width = cell.offsetWidth + \"px\";\r\n\t\tmarker.style.height = cell.offsetHeight + \"px\";\r\n\t\tcell.appendChild(marker);\r\n\t\treturn [marker];\r\n\t},\r\n\trenderYearMarker: function(start_date, end_date){\r\n\t\tvar cell = scheduler._get_year_cell(start_date);\r\n\t\tcell.style.position = \"relative\";\r\n\t\tvar marker = this.createElement();\r\n\t\tmarker.style.top = \"0px\";\r\n\t\tmarker.style.left = \"0px\";\r\n\t\tmarker.style.width = \"100%\";\r\n\t\tmarker.style.height = \"100%\";\r\n\t\tcell.appendChild(marker);\r\n\t\treturn [marker];\r\n\t},\r\n\r\n\trenderAgendaMarker: function(start_date, end_date){\r\n\t\tvar block = this.createElement();\r\n\t\tblock.style.height = \"1px\";\r\n\t\tblock.style.width = \"100%\";\r\n\t\tblock.style.opacity = 1;\r\n\t\tblock.style.top = \"0px\";\r\n\t\tblock.style.left = \"0px\";\r\n\t\tscheduler.$container.querySelector(\".dhx_cal_data\").appendChild(block);\r\n\t\treturn [block];\r\n\t},\r\n\r\n\trenderTimelineMarker: function(start_date, end_date, section){\r\n\t\tvar view_opts = scheduler._lame_copy({}, scheduler.matrix[scheduler._mode]);\r\n\t\tvar areas = view_opts._scales;\r\n\t\t//timespans must always use actual position, not rounded\r\n\t\tview_opts.round_position = false;\r\n\t\tvar blocks = [];\r\n\r\n\t\tvar min_date = start_date ? new Date(start_date) : scheduler._min_date;\r\n\t\tvar max_date = end_date ? new Date(end_date) : scheduler._max_date;\r\n\r\n\t\tif(min_date.valueOf() < scheduler._min_date.valueOf())\r\n\t\t\tmin_date = new Date(scheduler._min_date);\r\n\t\tif(max_date.valueOf() > scheduler._max_date.valueOf())\r\n\t\t\tmax_date = new Date(scheduler._max_date);\r\n\r\n\t\tif(!view_opts._trace_x) return blocks;\r\n\r\n\t\tfor(var i = 0; i < view_opts._trace_x.length; i++){\r\n\t\t\tif(scheduler._is_column_visible(view_opts._trace_x[i]))\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\tif(i == view_opts._trace_x.length)\r\n\t\t\treturn blocks;\r\n\r\n\t\tvar area = areas[section];\r\n\r\n\t\tif (!(min_date < end_date && max_date > start_date))\r\n\t\t\treturn blocks;\r\n\r\n\t\tvar block = this.createElement();\r\n\r\n\t\tlet start_pos;\r\n\t\tlet end_pos;\r\n\r\n\t\tfunction set_date_part(source, target) {\r\n\t\t\t// reset to start of the month in order to prevent month change when target is on 31th day, and source month has only 30 days\r\n\t\t\ttarget.setDate(1);\r\n\r\n\t\t\ttarget.setFullYear(source.getFullYear());\r\n\t\t\ttarget.setMonth(source.getMonth());\r\n\t\t\ttarget.setDate(source.getDate());\r\n\t\t}\r\n\r\n\t\tif(!scheduler.getView().days){\r\n\t\t\tstart_pos = scheduler._timeline_getX({start_date: start_date}, false, view_opts);\r\n\t\t\tend_pos = scheduler._timeline_getX({start_date: end_date}, false, view_opts);\r\n\t\t}else{\r\n\t\t\t// daytimeline\r\n\t\t\tconst tempStart = new Date(start_date);\r\n\t\t\tset_date_part(scheduler._min_date, tempStart);\r\n\t\t\tconst tempEnd = new Date(end_date);\r\n\t\t\tset_date_part(scheduler._min_date, tempEnd);\r\n\t\t\tstart_pos = scheduler._timeline_getX({start_date: tempStart}, false, view_opts);\r\n\t\t\tend_pos = scheduler._timeline_getX({start_date: tempEnd}, false, view_opts);\r\n\t\t}\r\n\r\n\t\tvar height = ((view_opts._section_height[section]-1) || (view_opts.dy - 1));\r\n\r\n\t\tvar top = 0;\r\n\t\tif (scheduler._isRender('cell')){\r\n\t\t\ttop = area.offsetTop;\r\n\t\t\tstart_pos += view_opts.dx;\r\n\t\t\tend_pos += view_opts.dx;\r\n\t\t\tarea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t}else{\r\n\r\n\t\t}\r\n\t\tvar width = Math.max(1, end_pos - start_pos - 1);\r\n\t\tlet direction = \"left\";\r\n\t\tif(scheduler.config.rtl){\r\n\t\t\tdirection = \"right\";\r\n\t\t}\r\n\t\tblock.style.cssText = `height:${height}px; ${direction}:${start_pos}px; width:${width}px; top:${top}px;`;\r\n\r\n\t\tif(area){\r\n\t\t\tarea.appendChild(block);\r\n\t\t\tblocks.push(block);\r\n\t\t}\r\n\r\n\t\treturn blocks;\r\n\t},\r\n\r\n\trenderMonthCell: function(date){\r\n\t\tvar cells = scheduler.$container.querySelectorAll(\".dhx_month_head\");\r\n\r\n\t\tvar divs = [];\r\n\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\tdivs.push(cells[i].parentNode);\r\n\t\t}\r\n\r\n\t\tvar firstDate = scheduler.date.week_start(new Date(scheduler.getState().min_date));\r\n\r\n\t\tvar index = -1;\r\n\t\tvar weekNumber = 0;\r\n\t\tvar dayIndex = -1;\r\n\t\tvar currDate = firstDate;\r\n\t\tvar markerDate = scheduler.date.day_start(new Date(date));\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tindex++;\r\n\r\n\t\t\tif(dayIndex == 6){\r\n\t\t\t\tweekNumber++;\r\n\t\t\t\tdayIndex = 0;\r\n\t\t\t}else{\r\n\t\t\t\tdayIndex++;\r\n\t\t\t}\r\n\r\n\t\t\tif(scheduler.date.day_start(new Date(currDate)).valueOf() == markerDate.valueOf()){\r\n\t\t\t\tbreak;\r\n\t\t\t}else{\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(index == -1){\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tvar left = scheduler._colsS[dayIndex];\r\n\t\tvar top = scheduler._colsS.heights[weekNumber];\r\n\r\n\t\tvar div = this.createElement();\r\n\t\tdiv.style.top = top + \"px\";\r\n\t\tdiv.style.left = left + \"px\";\r\n\t\tdiv.style.width = scheduler._cols[dayIndex] + \"px\";\r\n\t\tdiv.style.height = ((scheduler._colsS.heights[weekNumber + 1] - top) || scheduler._colsS.height) + \"px\" ;\r\n\r\n\r\n\t\tvar container = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\r\n\t\tvar datatable = container.querySelector(\".dhx_cal_month_table\");\r\n\t\tif(datatable.nextSibling){\r\n\t\t\tcontainer.insertBefore(div, datatable.nextSibling);\r\n\t\t}else{\r\n\t\t\tcontainer.appendChild(div);\r\n\t\t}\r\n\t\treturn div;\r\n\t},\r\n\trenderMonthMarker: function(start_date, end_date){\r\n\t\tvar res = [];\r\n\t\tvar currentDate = start_date;\r\n\t\twhile(currentDate.valueOf() < end_date.valueOf()){\r\n\t\t\tres.push(this.renderMonthCell(currentDate));\r\n\t\t\tcurrentDate = scheduler.date.add(currentDate, 1, \"day\");\r\n\t\t}\r\n\t\treturn res;\r\n\t},\r\n\r\n\trenderVerticalMarker: function(start_date, end_date, section){\r\n\t\tvar index = scheduler.locate_holder_day(start_date);\r\n\r\n\t\tvar divs = [];\r\n\t\tvar area = null;\r\n\r\n\t\tvar c = scheduler.config;\r\n\t\tif(scheduler._ignores[index]) return divs;\r\n\r\n\t\tif (scheduler._props && scheduler._props[scheduler._mode] && section) {\r\n\t\t\tvar view = scheduler._props[scheduler._mode];\r\n\t\t\tindex = view.order[section];\r\n\r\n\t\t\tvar inner_index = view.order[section];\r\n\t\t\tif(!(view.days > 1)){\r\n\t\t\t\tindex = inner_index;\r\n\t\t\t\tif (view.size && (index > view.position+view.size)) {\r\n\t\t\t\t\tindex = 0;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t//var units_l = view.size || view.options.length;\r\n\r\n\t\t\t\tindex = scheduler.locate_holder_day(start_date) + inner_index;\r\n\t\t\t\t//index = index*units_l + inner_index;\r\n\t\t\t}\r\n\t\t}\r\n\t\tarea = scheduler.locate_holder(index);\r\n\t\tif(!area || area.querySelector(\".dhx_scale_hour\")){\r\n\t\t\t// hour scale instead of date column\r\n\t\t\treturn document.createElement(\"div\");\r\n\t\t}\r\n\r\n\t\tvar start = Math.max((start_date.getHours()*60 + start_date.getMinutes()), c.first_hour*60);\r\n\r\n\r\n\t\tvar end = Math.min((end_date.getHours()*60 + end_date.getMinutes()), c.last_hour*60);\r\n\t\tif(!end && (scheduler.date.day_start(new Date(end_date)).valueOf() > scheduler.date.day_start(new Date(start_date)).valueOf())){\r\n\t\t\tend = c.last_hour*60;\r\n\t\t}\r\n\r\n\t\tif (end <= start) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tvar block = this.createElement();\r\n\r\n\t\t// +1 for working with section which really takes up whole height (as % would be == 0)\r\n\t\tvar all_hours_height = scheduler.config.hour_size_px*c.last_hour + 1;\r\n\t\tvar hour_ms = 60*60*1000;\r\n\t\tblock.style.top = (Math.round((start*60*1000-scheduler.config.first_hour*hour_ms)*scheduler.config.hour_size_px/hour_ms) % all_hours_height) + \"px\";\r\n\t\tblock.style.lineHeight = block.style.height = Math.max((Math.round(((end-start)*60*1000)*scheduler.config.hour_size_px/hour_ms)) % all_hours_height, 1)+\"px\";\r\n\t\tblock.style.width = \"100%\";\r\n\t\tarea.appendChild(block);\r\n\t\tdivs.push(block);\r\n\t\treturn divs[0];\r\n\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode = function(){};\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.EventHandler,\r\n\t{\r\n\t\tgetDefaultNode: function(){\r\n\t\t\tvar node = new scheduler.$keyboardNavigation.TimeSlot();\r\n\r\n\t\t\tif(!node.isValid()){\r\n\t\t\t\tnode = node.fallback();\r\n\t\t\t}\r\n\t\t\treturn node;\r\n\t\t},\r\n\r\n\t\t_modes:{\r\n\t\t\tmonth: \"month\",\r\n\t\t\tyear: \"year\",\r\n\t\t\tdayColumns: \"dayColumns\",\r\n\t\t\ttimeline:\"timeline\",\r\n\t\t\tunits:\"units\",\r\n\t\t\tweekAgenda: \"weekAgenda\",\r\n\t\t\tlist: \"list\"\r\n\t\t},\r\n\t\tgetMode: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tvar mode = state.mode;\r\n\t\t\tif((scheduler.matrix && scheduler.matrix[mode])){\r\n\t\t\t\treturn this._modes.timeline;\r\n\t\t\t} else if((scheduler._props && scheduler._props[mode])){\r\n\t\t\t\treturn this._modes.units;\r\n\t\t\t}else if(mode == \"month\"){\r\n\t\t\t\treturn this._modes.month;\r\n\t\t\t}else if(mode == \"year\"){\r\n\t\t\t\treturn this._modes.year;\r\n\t\t\t}else if(mode == \"week_agenda\"){\r\n\t\t\t\treturn this._modes.weekAgenda;\r\n\t\t\t}else if(mode == \"map\" || mode == \"agenda\" || (scheduler._grid && scheduler[\"grid_\" + mode])){\r\n\t\t\t\treturn this._modes.list;\r\n\t\t\t}else{\r\n\t\t\t\treturn this._modes.dayColumns;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.focus();\r\n\t\t},\r\n\r\n\t\tblur: function(){\r\n\r\n\t\t},\r\n\r\n\t\tdisable: function(){\r\n\t\t\tscheduler.$container.setAttribute(\"tabindex\", \"0\");\r\n\t\t},\r\n\t\tenable: function(){\r\n\t\t\tif(scheduler.$container)\r\n\t\t\t\tscheduler.$container.removeAttribute(\"tabindex\");\r\n\t\t},\r\n\t\tisEnabled: function(){\r\n\t\t\treturn scheduler.$container.hasAttribute(\"tabindex\");\r\n\t\t},\r\n\r\n\r\n\t\t_compareEvents: function(a, b){\r\n\t\t\tif (a.start_date.valueOf() == b.start_date.valueOf())\r\n\t\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\t\treturn a.start_date.valueOf() > b.start_date.valueOf() ? 1 : -1;\r\n\t\t},\r\n\r\n\t\t_pickEvent: function(from, to, startId, reverse){\r\n\t\t\tvar range = scheduler.getState();\r\n\t\t\tfrom = new Date(Math.max(range.min_date.valueOf(), from.valueOf()));\r\n\t\t\tto = new Date(Math.min(range.max_date.valueOf(), to.valueOf()));\r\n\r\n\t\t\tvar evs = scheduler.getEvents(from, to);\r\n\t\t\tevs.sort(this._compareEvents);\r\n\t\t\tif(reverse){\r\n\t\t\t\tevs = evs.reverse();\r\n\t\t\t}\r\n\r\n\t\t\tvar trim = !!startId;\r\n\t\t\tfor(var i =0; i < evs.length && trim; i++){\r\n\t\t\t\tif(evs[i].id == startId){\r\n\t\t\t\t\ttrim = false;\r\n\t\t\t\t}\r\n\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\r\n\t\t\tfor(var i = 0; i < evs.length; i++){\r\n\t\t\t\tvar eventElement = new scheduler.$keyboardNavigation.Event(evs[i].id);\r\n\t\t\t\tif(eventElement.getNode())\r\n\t\t\t\t\treturn evs[i];\r\n\t\t\t}\r\n\r\n\t\t\treturn null;\r\n\t\t},\r\n\r\n\t\tnextEventHandler: function(id){\r\n\t\t\tvar activeNode = scheduler.$keyboardNavigation.dispatcher.activeNode;\r\n\r\n\t\t\tvar startId = id || (activeNode && activeNode.eventId);\r\n\r\n\t\t\tvar nextEvent = null;\r\n\t\t\tif(startId && scheduler.getEvent(startId)){\r\n\t\t\t\tvar currEvent = scheduler.getEvent(startId);\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tcurrEvent.start_date,\r\n\t\t\t\t\tscheduler.date.add(currEvent.start_date, 1, \"year\"),\r\n\t\t\t\t\tcurrEvent.id,\r\n\t\t\t\t\tfalse\r\n\t\t\t\t);\r\n\r\n\t\t\t}\r\n\t\t\tif(!nextEvent && !id){\r\n\t\t\t\tvar visibleDates = scheduler.getState();\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tvisibleDates.min_date,\r\n\t\t\t\t\tscheduler.date.add(visibleDates.min_date, 1, \"year\"),\r\n\t\t\t\t\tnull,\r\n\t\t\t\t\tfalse\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tif(nextEvent){\r\n\r\n\t\t\t\tvar nextEv = new scheduler.$keyboardNavigation.Event(nextEvent.id);\r\n\t\t\t\tif(!nextEv.isValid()){// not visible event\r\n\t\t\t\t\tthis.nextEventHandler(nextEvent.id);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(activeNode){activeNode.blur();}\r\n\t\t\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(nextEv);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tprevEventHandler: function(id){\r\n\t\t\tvar activeNode = scheduler.$keyboardNavigation.dispatcher.activeNode;\r\n\r\n\t\t\tvar startId = id || (activeNode && activeNode.eventId);\r\n\r\n\t\t\tvar nextEvent = null;\r\n\t\t\tif(startId && scheduler.getEvent(startId)){\r\n\t\t\t\tvar currEvent = scheduler.getEvent(startId);\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tscheduler.date.add(currEvent.end_date, -1, \"year\"),\r\n\t\t\t\t\tcurrEvent.end_date,\r\n\t\t\t\t\tcurrEvent.id,\r\n\t\t\t\t\ttrue\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t\tif(!nextEvent && !id){\r\n\t\t\t\tvar visibleDates = scheduler.getState();\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tscheduler.date.add(visibleDates.max_date, -1, \"year\"),\r\n\t\t\t\t\tvisibleDates.max_date,\r\n\t\t\t\t\tnull,\r\n\t\t\t\t\ttrue\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tif(nextEvent){\r\n\t\t\t\tvar nextEv = new scheduler.$keyboardNavigation.Event(nextEvent.id);\r\n\t\t\t\tif(!nextEv.isValid()){// not visible event\r\n\t\t\t\t\tthis.prevEventHandler(nextEvent.id);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(activeNode){activeNode.blur();}\r\n\t\t\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(nextEv);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\r\n\t\t\t\"alt+1, alt+2, alt+3, alt+4, alt+5, alt+6, alt+7, alt+8, alt+9\": function(e){\r\n\t\t\t\tvar tabs = scheduler.$keyboardNavigation.HeaderCell.prototype.getNodes(\".dhx_cal_navline .dhx_cal_tab\");\r\n\t\t\t\tvar key = e.key;\r\n\t\t\t\tif(key === undefined){\r\n\t\t\t\t\tkey = e.keyCode - 48;\r\n\t\t\t\t}\r\n\t\t\t\tif(tabs[key*1 - 1]){\r\n\t\t\t\t\ttabs[key*1 - 1].click();\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+left,meta+left\": function(e){\r\n\t\t\t\tscheduler._click.dhx_cal_prev_button();\r\n\t\t\t},\r\n\t\t\t\"ctrl+right,meta+right\": function(e){\r\n\t\t\t\tscheduler._click.dhx_cal_next_button();\r\n\t\t\t},\r\n\t\t\t\"ctrl+up,meta+up\":function(e){\r\n\t\t\t\tvar dataArea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tdataArea.scrollTop -= 20;\r\n\t\t\t},\r\n\t\t\t\"ctrl+down,meta+down\": function(e){\r\n\t\t\t\tvar dataArea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tdataArea.scrollTop += 20;\r\n\t\t\t},\r\n\r\n\r\n\t\t\t\"e\": function(){\r\n\t\t\t\tthis.nextEventHandler();\r\n\t\t\t},\r\n\r\n\t\t\t\"home\": function(){\r\n\t\t\t\tscheduler.setCurrentView(new Date());\r\n\t\t\t},\r\n\r\n\t\t\t\"shift+e\": function(){\r\n\t\t\t\tthis.prevEventHandler();\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+enter,meta+enter\": function(){\r\n\t\t\t\tscheduler.addEventNow({start_date: new Date(scheduler.getState().date)});\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+c,meta+c\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t},\r\n\t\t\t\"ctrl+v,meta+v\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t},\r\n\t\t\t\"ctrl+x,meta+x\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode.prototype.bindAll(scheduler.$keyboardNavigation.SchedulerNode.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.KeyNavNode = function(){};\r\n\r\nscheduler.$keyboardNavigation.KeyNavNode.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.EventHandler,\r\n\t{\r\n\t\tisValid: function(){\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\treturn null;\r\n\t\t},\r\n\r\n\t\tmoveTo: function (element) {\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(element);\r\n\t\t},\r\n\r\n\t\tcompareTo: function(b){\r\n\t\t\t// good enough comparison of two random objects\r\n\t\t\tif(!b) return false;\r\n\t\t\tfor(var i in this){\r\n\t\t\t\tif(!!this[i] != !!b[i]) return false;\r\n\r\n\t\t\t\tvar canStringifyThis = !!(this[i] && this[i].toString);\r\n\t\t\t\tvar canStringifyThat = !!(b[i] && b[i].toString);\r\n\t\t\t\tif(canStringifyThat != canStringifyThis) return false;\r\n\t\t\t\tif(!(canStringifyThat && canStringifyThis)) {\r\n\t\t\t\t\tif(b[i] != this[i]) return false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(b[i].toString() != this[i].toString())\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\r\n\t\tgetNode: function(){},\r\n\t\tfocus: function(){\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif(node){\r\n\t\t\t\tnode.setAttribute(\"tabindex\", \"-1\");\r\n\t\t\t\t//node.className += \" scheduler_focused\";\r\n\t\t\t\tif(node.focus) node.focus();\r\n\t\t\t}\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif(node){\r\n\t\t\t\tnode.setAttribute(\"tabindex\", \"-1\");\r\n\t\t\t\t//node.className = (node.className || \"\").replace(/ ?scheduler_focused/g, \"\");\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.HeaderCell = function(index){\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.HeaderCell.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\tgetNode: function(index){\r\n\t\t\tindex = index || this.index || 0;\r\n\t\t\tvar nodes = this.getNodes();\r\n\t\t\tif(nodes[index]) return nodes[index];\r\n\t\t},\r\n\r\n\t\tgetNodes: function(selector){\r\n\t\t\tselector = selector || [\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_prev_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_next_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_today_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_tab\"\r\n\t\t\t\t].join(\", \");\r\n\r\n\t\t\tvar nodes = Array.prototype.slice.call(scheduler.$container.querySelectorAll(selector));\r\n\t\t\tnodes.sort(function(a, b){\r\n\t\t\t\treturn a.offsetLeft - b.offsetLeft;\r\n\t\t\t});\r\n\t\t\treturn nodes;\r\n\t\t},\r\n\r\n\t\t_handlers:null,\r\n\r\n\t\tisValid: function(){\r\n\t\t\treturn !!this.getNode(this.index);\r\n\t\t},\r\n\t\tfallback:function(){\r\n\t\t\tvar defaultCell = this.getNode(0);\r\n\t\t\tif(!defaultCell){\r\n\t\t\t\tdefaultCell = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}\r\n\t\t\treturn defaultCell;\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tvar newIndex = this.index - 1;\r\n\t\t\t\tif(newIndex < 0){\r\n\t\t\t\t\tnewIndex = this.getNodes().length - 1;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.HeaderCell(newIndex));\r\n\r\n\t\t\t},\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tvar newIndex = this.index + 1;\r\n\t\t\t\tif(newIndex >= this.getNodes().length){\r\n\t\t\t\t\tnewIndex = 0;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.HeaderCell(newIndex));\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t},\r\n\r\n\t\t\t\"enter\": function(){\r\n\t\t\t\tvar node = this.getNode();\r\n\t\t\t\tif(node){\r\n\t\t\t\t\tnode.click();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.HeaderCell.prototype.bindAll(scheduler.$keyboardNavigation.HeaderCell.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.Event = function(id){\r\n\tthis.eventId = null;\r\n\tif(scheduler.getEvent(id)){\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tthis.start = new Date(ev.start_date);\r\n\t\tthis.end = new Date(ev.end_date);\r\n\r\n\t\tthis.section = this._getSection(ev);\r\n\t\tthis.eventId = id;\r\n\t}\r\n};\r\n\r\nscheduler.$keyboardNavigation.Event.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\t_getNodes: function(){\r\n\t\t\treturn Array.prototype.slice.call(scheduler.$container.querySelectorAll(\"[\"+scheduler.config.event_attribute+\"]\"));\r\n\t\t},\r\n\r\n\t\t_modes: scheduler.$keyboardNavigation.SchedulerNode.prototype._modes,\r\n\r\n\t\tgetMode: scheduler.$keyboardNavigation.SchedulerNode.prototype.getMode,\r\n\r\n\t\t_handlers: null,\r\n\t\tisValid: function(){\r\n\t\t\treturn !!(scheduler.getEvent(this.eventId) && this.getNode());\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\tvar eventNode = this._getNodes()[0];\r\n\t\t\tvar defaultElement = null;\r\n\t\t\tif(!eventNode || !(scheduler._locate_event(eventNode))){\r\n\t\t\t\tdefaultElement = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}else{\r\n\t\t\t\tvar id = scheduler._locate_event(eventNode);\r\n\t\t\t\tdefaultElement = new scheduler.$keyboardNavigation.Event(id);\r\n\t\t\t}\r\n\r\n\t\t\treturn defaultElement;\r\n\t\t},\r\n\r\n\t\tisScrolledIntoView: function (el) {\r\n\t\t\tvar eventBox = el.getBoundingClientRect();\r\n\t\t\tvar viewPort = scheduler.$container.querySelector(\".dhx_cal_data\").getBoundingClientRect();\r\n\t\t\t\r\n\t\t\tif(eventBox.bottom < viewPort.top || eventBox.top > viewPort.bottom){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\r\n\t\tgetNode: function(){\r\n\r\n\t\t\tvar idSelector = \"[\"+scheduler.config.event_attribute+\"='\"+this.eventId+\"']\";\r\n\r\n\t\t\tvar inlineEditor = scheduler.$keyboardNavigation.dispatcher.getInlineEditor(this.eventId);\r\n\t\t\tif(inlineEditor){// is inline editor visible\r\n\t\t\t\treturn inlineEditor;\r\n\t\t\t}else{\r\n\t\t\t\tif(scheduler.isMultisectionEvent && scheduler.isMultisectionEvent(scheduler.getEvent(this.eventId))){\r\n\t\t\t\t\tvar nodes = scheduler.$container.querySelectorAll(idSelector);\r\n\t\t\t\t\tfor(var i = 0; i < nodes.length; i++){\r\n\t\t\t\t\t\tif(this.isScrolledIntoView(nodes[i])){\r\n\t\t\t\t\t\t\treturn nodes[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn nodes[0];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn scheduler.$container.querySelector(idSelector);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tvar event = scheduler.getEvent(this.eventId);\r\n\r\n\t\t\tvar calendar = scheduler.getState();\r\n\t\t\tif(event.start_date.valueOf() > calendar.max_date.valueOf() || event.end_date.valueOf() <= calendar.min_date.valueOf()){\r\n\t\t\t\tscheduler.setCurrentView(event.start_date);\r\n\t\t\t}\r\n\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif (this.isScrolledIntoView(node)) {\r\n\t\t\t\tscheduler.$keyboardNavigation.dispatcher.keepScrollPosition((function(){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\t\t}).bind(this));\r\n\t\t\t} else {\r\n\t\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\t}\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\r\n\r\n\t\t_getSection: function(ev){\r\n\t\t\tvar section = null;\r\n\t\t\tvar mode = scheduler.getState().mode;\r\n\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\t\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\t\tsection = ev[timeline.y_property];\r\n\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\tvar unit = scheduler._props[mode];\r\n\t\t\t\tsection = ev[unit.map_to];\r\n\t\t\t}\r\n\t\t\treturn section;\r\n\t\t},\r\n\t\t_moveToSlot: function(dir){\r\n\t\t\tvar ev = scheduler.getEvent(this.eventId);\r\n\t\t\tif(ev){\r\n\t\t\t\tvar section =this._getSection(ev);\r\n\t\t\t\tvar slot = new scheduler.$keyboardNavigation.TimeSlot(ev.start_date, null, section);\r\n\t\t\t\tthis.moveTo(slot.nextSlot(slot, dir));\r\n\t\t\t}else{\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tthis._moveToSlot(\"left\");\r\n\t\t\t},\r\n\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tthis._moveToSlot(\"right\");\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\t\t\t\tif(this.getMode() == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.nextEventHandler();\r\n\t\t\t\t}else {\r\n\t\t\t\t\tthis._moveToSlot(\"down\");\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"space\": function(){\r\n\t\t\t\tvar node = this.getNode();\r\n\t\t\t\tif(node && node.click){\r\n\t\t\t\t\tnode.click();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"up\": function () {\r\n\t\t\t\tif(this.getMode() == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.prevEventHandler();\r\n\t\t\t\t}else {\r\n\t\t\t\t\tthis._moveToSlot(\"up\");\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"delete\": function(){\r\n\t\t\t\tif(scheduler.getEvent(this.eventId)) {\r\n\t\t\t\t\tscheduler._click.buttons[\"delete\"](this.eventId);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t// open lightbox\r\n\t\t\t\"enter\": function () {\r\n\t\t\t\tif(scheduler.getEvent(this.eventId)) {\r\n\t\t\t\t\tscheduler.showLightbox(this.eventId);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\nscheduler.$keyboardNavigation.Event.prototype.bindAll(scheduler.$keyboardNavigation.Event.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.TimeSlot = function(from, to, section, movingDate){\r\n\tvar state = scheduler.getState();\r\n\tvar timeline = scheduler.matrix && scheduler.matrix[state.mode];\r\n\r\n\tif(!from){\r\n\t\tfrom = this.getDefaultDate();\r\n\t}\r\n\r\n\tif(!to){\r\n\r\n\t\tif(timeline){\r\n\t\t\tto = scheduler.date.add(from, timeline.x_step, timeline.x_unit);\r\n\t\t}else{\r\n\t\t\tto = scheduler.date.add(from, scheduler.config.key_nav_step, \"minute\");\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tthis.section = section || this._getDefaultSection();\r\n\tthis.start_date = new Date(from);\r\n\tthis.end_date = new Date(to);\r\n\tthis.movingDate = movingDate || null;\r\n};\r\n\r\nscheduler.$keyboardNavigation.TimeSlot.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\t_handlers:null,\r\n\r\n\t\tgetDefaultDate: function(){\r\n\t\t\tvar from;\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar visibleTime = new Date(state.date);\r\n\t\t\tvisibleTime.setSeconds(0);\r\n\t\t\tvisibleTime.setMilliseconds(0);\r\n\r\n\t\t\tvar nowTime = new Date();\r\n\t\t\tnowTime.setSeconds(0);\r\n\t\t\tnowTime.setMilliseconds(0);\r\n\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[state.mode];\r\n\t\t\tvar showNowTime = false;\r\n\t\t\tif(visibleTime.valueOf() === nowTime.valueOf()){\r\n\t\t\t\tshowNowTime = true;\r\n\t\t\t}\r\n\r\n\t\t\tif(timeline){\r\n\t\t\t\tif(showNowTime){\r\n\t\t\t\t\tif(timeline.x_unit === \"day\"){\r\n\t\t\t\t\t\tnowTime.setHours(0);\r\n\t\t\t\t\t\tnowTime.setMinutes(0);\r\n\t\t\t\t\t}else if(timeline.x_unit === \"hour\"){\r\n\t\t\t\t\t\tnowTime.setMinutes(0);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfrom = nowTime;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfrom = scheduler.date[timeline.name + \"_start\"](new Date(state.date));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfrom = this.findVisibleColumn(from);\r\n\t\t\t}else{\r\n\t\t\t\tfrom = new Date(scheduler.getState().min_date);\r\n\t\t\t\tif(showNowTime){\r\n\t\t\t\t\tfrom = nowTime;\r\n\t\t\t\t}\r\n\t\t\t\tfrom = this.findVisibleColumn(from);\r\n\t\t\t\tif(!showNowTime){\r\n\t\t\t\t\tfrom.setHours(scheduler.config.first_hour);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(!scheduler._table_view){\r\n\t\t\t\t\tvar dataContainer = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\t\tif(dataContainer.scrollTop){\r\n\t\t\t\t\t\tfrom.setHours(scheduler.config.first_hour + Math.ceil(dataContainer.scrollTop / scheduler.config.hour_size_px));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn from;\r\n\t\t},\r\n\r\n\t\tclone: function(timeslot){\r\n\t\t\treturn new scheduler.$keyboardNavigation.TimeSlot(timeslot.start_date, timeslot.end_date, timeslot.section, timeslot.movingDate);\r\n\t\t},\r\n\t\t_getMultisectionView: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view;\r\n\t\t\tif(scheduler._props && scheduler._props[state.mode]) {\r\n\t\t\t\tview = scheduler._props[state.mode];\r\n\t\t\t}else if(scheduler.matrix && scheduler.matrix[state.mode]){\r\n\t\t\t\tview = scheduler.matrix[state.mode];\r\n\t\t\t}\r\n\t\t\treturn view;\r\n\t\t},\r\n\r\n\t\t_getDefaultSection: function(){\r\n\t\t\tvar section = null;\r\n\t\t\tvar view = this._getMultisectionView();\r\n\t\t\tif(view && !section){\r\n\t\t\t\tsection = this._getNextSection();\r\n\t\t\t}\r\n\t\t\treturn section;\r\n\t\t},\r\n\r\n\t\t_getNextSection: function(sectionId, dir){\r\n\t\t\tvar view = this._getMultisectionView();\r\n\t\t\tvar currentIndex = view.order[sectionId];\r\n\t\t\tvar nextIndex = currentIndex;\r\n\t\t\tif(currentIndex !== undefined){\r\n\t\t\t\tnextIndex = currentIndex + dir;\r\n\t\t\t}else{\r\n\t\t\t\tnextIndex = (view.size && view.position) ? view.position : 0;\r\n\t\t\t}\r\n\r\n\t\t\tif(nextIndex < 0){\r\n\t\t\t\tnextIndex = 0;\r\n\t\t\t}\r\n\t\t\tvar options = view.options || view.y_unit;\r\n\r\n\t\t\tif(nextIndex >= options.length){\r\n\t\t\t\tnextIndex = options.length - 1;\r\n\t\t\t}\r\n\t\t\t//nextIndex = nextIndex < 0 ? nextIndex = (view.options || view.y_unit).length -1 : nextIndex;\r\n\r\n\t\t\tif(options[nextIndex]){\r\n\t\t\t\treturn options[nextIndex].key;\r\n\t\t\t}else{\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar isInRange = !(this.start_date.valueOf() < state.min_date.valueOf() || this.start_date.valueOf() >= state.max_date.valueOf());\r\n\r\n\t\t\tif(!isInRange) return false;\r\n\r\n\r\n\t\t\tif(!this.isVisible(this.start_date, this.end_date)) return false;\r\n\r\n\t\t\tvar view = this._getMultisectionView();\r\n\r\n\t\t\tif(view){\r\n\t\t\t\treturn (view.order[this.section] !== undefined);\r\n\t\t\t}else{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t},\r\n\r\n\t\tfallback:function(){\r\n\r\n\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(!defaultSlot.isValid()){\r\n\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t}else{\r\n\t\t\t\treturn defaultSlot;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tgetNodes: function(){\r\n\t\t\treturn Array.prototype.slice.call(scheduler.$container.querySelectorAll(\".dhx_focus_slot\"));\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\treturn this.getNodes()[0];\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tif(this.section && scheduler.getView() && scheduler.getView().smart_rendering && scheduler.getView().scrollTo && !scheduler.$container.querySelector(`[data-section-id=\"${this.section}\"]`)){\r\n\t\t\t\tscheduler.getView().scrollTo({section: this.section});\r\n\t\t\t}\r\n\t\t\tscheduler.$keyboardNavigation.marker.render(this.start_date, this.end_date, this.section);\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\tscheduler.$keyboardNavigation._pasteDate = this.start_date;\r\n\t\t\tscheduler.$keyboardNavigation._pasteSection = this.section;\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t\tscheduler.$keyboardNavigation.marker.clear();\r\n\t\t},\r\n\r\n\t\t_modes: scheduler.$keyboardNavigation.SchedulerNode.prototype._modes,\r\n\r\n\t\t_getMode: scheduler.$keyboardNavigation.SchedulerNode.prototype.getMode,\r\n\r\n\t\taddMonthDate: function(date, dir, extend){\r\n\t\t\tvar res;\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tres = scheduler.date.add(date, -1, \"week\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tres = scheduler.date.add(date, 1, \"week\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tres = scheduler.date.day_start(scheduler.date.add(date, -1, \"day\"));\r\n\t\t\t\t\tres = this.findVisibleColumn(res, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tres = scheduler.date.day_start(scheduler.date.add(date, 1, \"day\"));\r\n\t\t\t\t\tres = this.findVisibleColumn(res, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tres = scheduler.date.day_start(new Date(date));\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tif(date.valueOf() < state.min_date.valueOf() || (!extend && date.valueOf() >= state.max_date.valueOf())){\r\n\t\t\t\tres = new Date(state.min_date);\r\n\t\t\t}\r\n\r\n\t\t\treturn res;\r\n\t\t},\r\n\r\n\t\tnextMonthSlot: function(slot, dir, extend){\r\n\r\n\t\t\tvar start, end;\r\n\t\t\tstart = this.addMonthDate(slot.start_date, dir, extend);\r\n\r\n\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\tend = new Date(start);\r\n\t\t\tend.setHours(scheduler.config.last_hour);\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\r\n\t\t_alignTimeSlot: function(date, minDate, unit, step){\r\n\t\t\tvar currentDate = new Date(minDate);\r\n\t\t\twhile(currentDate.valueOf() < date.valueOf()){\r\n\t\t\t\tcurrentDate = scheduler.date.add(currentDate, step, unit);\r\n\t\t\t}\r\n\r\n\t\t\tif(currentDate.valueOf() > date.valueOf()){\r\n\t\t\t\tcurrentDate = scheduler.date.add(currentDate, -step, unit);\r\n\t\t\t}\r\n\r\n\t\t\treturn currentDate;\r\n\t\t},\r\n\r\n\t\tnextTimelineSlot: function(slot, dir, extend){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view = scheduler.matrix[state.mode];\r\n\r\n\t\t\tvar startDate = this._alignTimeSlot(slot.start_date, scheduler.date[view.name + \"_start\"](new Date(slot.start_date)), view.x_unit, view.x_step);\r\n\t\t\tvar endDate = this._alignTimeSlot(slot.end_date, scheduler.date[view.name + \"_start\"](new Date(slot.end_date)), view.x_unit, view.x_step);\r\n\r\n\t\t\tif(endDate.valueOf() <= startDate.valueOf()){\r\n\t\t\t\tendDate = scheduler.date.add(startDate, view.x_step, view.x_unit);\r\n\t\t\t}\r\n\t\t\tvar newPos = this.clone(slot);\r\n\t\t\tnewPos.start_date = startDate;\r\n\t\t\tnewPos.end_date = endDate;\r\n\t\t\tnewPos.section = slot.section || this._getNextSection();\r\n\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tnewPos.section = this._getNextSection(slot.section, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tnewPos.section = this._getNextSection(slot.section, +1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tnewPos.start_date = this.findVisibleColumn(scheduler.date.add(newPos.start_date, -view.x_step, view.x_unit), -1);\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tnewPos.start_date = this.findVisibleColumn(scheduler.date.add(newPos.start_date, view.x_step, view.x_unit), 1);\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(newPos.start_date.valueOf() < state.min_date.valueOf() || newPos.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tif(extend && newPos.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\t\tnewPos.start_date = new Date(state.max_date);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tnewPos.start_date = scheduler.date[state.mode + \"_start\"](scheduler.date.add(state.date, dir == \"left\" ? -1 : 1, state.mode));\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn newPos;\r\n\t\t},\r\n\r\n\t\tnextUnitsSlot: function(slot, dir, extend){\r\n\t\t\tvar newPos = this.clone(slot);\r\n\t\t\tnewPos.section = slot.section || this._getNextSection();\r\n\r\n\t\t\tvar section = slot.section || this._getNextSection();\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view = scheduler._props[state.mode];\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tsection = this._getNextSection(slot.section, -1);\r\n\t\t\t\t\tvar optionsCount = view.size ? (view.size - 1) : view.options.length;\r\n\r\n\t\t\t\t\tif(view.days > 1 && (view.order[section] == optionsCount - 1)){\r\n\t\t\t\t\t\tif(scheduler.date.add(slot.start_date, -1, \"day\").valueOf() >= state.min_date.valueOf()){\r\n\t\t\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tsection = this._getNextSection(slot.section, 1);\r\n\t\t\t\t\tif(view.days > 1 && !view.order[section]){\r\n\t\t\t\t\t\tif(scheduler.date.add(slot.start_date, 1, \"day\").valueOf() < state.max_date.valueOf()){\r\n\t\t\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\tsection = slot.section;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tnewPos.section = section;\r\n\t\t\treturn newPos;\r\n\t\t},\r\n\r\n\t\t_moveDate: function(oldDate, dir){\r\n\t\t\tvar newDate = this.findVisibleColumn(scheduler.date.add(oldDate, dir, \"day\"), dir);\r\n\t\t\tnewDate.setHours(oldDate.getHours());\r\n\t\t\tnewDate.setMinutes(oldDate.getMinutes());\r\n\t\t\treturn newDate;\r\n\t\t},\r\n\r\n\t\tisBeforeLastHour: function(date, isStartDate){\r\n\t\t\tvar minutes = date.getMinutes(),\r\n\t\t\t\thours = date.getHours(),\r\n\t\t\t\tlast_hour = scheduler.config.last_hour;\r\n\t\t\treturn (hours < last_hour || (!isStartDate && ((last_hour == 24 || hours == last_hour) && !minutes)));\r\n\t\t},\r\n\t\tisAfterFirstHour: function(date, isStartDate){\r\n\t\t\tvar minutes = date.getMinutes(),\r\n\t\t\t\thours = date.getHours(),\r\n\t\t\t\tfirst_hour = scheduler.config.first_hour,\r\n\t\t\t\tlast_hour = scheduler.config.last_hour;\r\n\t\t\treturn (hours >= first_hour || (!isStartDate && (!minutes && ((!hours && last_hour == 24) || (hours == last_hour)))));\r\n\t\t},\r\n\t\tisInVisibleDayTime: function(date, isStartDate){\r\n\t\t\treturn (this.isBeforeLastHour(date, isStartDate) && this.isAfterFirstHour(date, isStartDate));\r\n\t\t},\r\n\r\n\t\tnextDaySlot: function(slot, dir, extend){\r\n\t\t\tvar start, end;\r\n\r\n\t\t\tvar key_nav_step = scheduler.config.key_nav_step;\r\n\r\n\t\t\tvar date = this._alignTimeSlot(slot.start_date, scheduler.date.day_start(new Date(slot.start_date)), \"minute\", key_nav_step);\r\n\r\n\r\n\t\t\tvar oldStart = slot.start_date;\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tstart = scheduler.date.add(date, -key_nav_step, \"minute\");\r\n\r\n\t\t\t\t\tif(!this.isInVisibleDayTime(start, true)){\r\n\t\t\t\t\t\tif (!extend || this.isInVisibleDayTime(oldStart, true)) {\r\n\r\n\t\t\t\t\t\t\tvar toNextDay = true;\r\n\t\t\t\t\t\t\tif(extend && scheduler.date.date_part(new Date(start)).valueOf() != scheduler.date.date_part(new Date(oldStart)).valueOf())\r\n\t\t\t\t\t\t\t\ttoNextDay = false;\r\n\t\t\t\t\t\t\tif(toNextDay)\r\n\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, -1, \"day\"), -1);\r\n\r\n\t\t\t\t\t\t\tstart.setHours(scheduler.config.last_hour);\r\n\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\tstart = scheduler.date.add(start, -key_nav_step, \"minute\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tstart = scheduler.date.add(date, key_nav_step, \"minute\");\r\n\r\n\t\t\t\t\tvar testEnd = extend ? start : scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tif(!this.isInVisibleDayTime(testEnd, false)){\r\n\t\t\t\t\t\tif(!extend || this.isInVisibleDayTime(oldStart, false)) {\r\n\t\t\t\t\t\t\tif (!extend) {\r\n\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, 1, \"day\"), 1);\r\n\t\t\t\t\t\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tvar toNextDay = true;\r\n\t\t\t\t\t\t\t\tif (scheduler.date.date_part(new Date(oldStart)).valueOf() == oldStart.valueOf()) {\r\n\t\t\t\t\t\t\t\t\ttoNextDay = false;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (toNextDay) {\r\n\t\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, 1, \"day\"), 1);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\t\tstart = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tstart = this._moveDate(slot.start_date, -1);\r\n\t\t\t\t\tend = this._moveDate(slot.end_date, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tstart = this._moveDate(slot.start_date, 1);\r\n\t\t\t\t\tend = this._moveDate(slot.end_date, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tstart = date;\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\t\tnextWeekAgendaSlot: function(slot, dir){\r\n\t\t\tvar start, end;\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tstart = scheduler.date.day_start(scheduler.date.add(slot.start_date, -1, \"day\"));\r\n\t\t\t\t\tstart = this.findVisibleColumn(start, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tstart = scheduler.date.day_start(scheduler.date.add(slot.start_date, 1, \"day\"));\r\n\t\t\t\t\tstart = this.findVisibleColumn(start, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tstart = scheduler.date.day_start(slot.start_date);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif(slot.start_date.valueOf() < state.min_date.valueOf() || slot.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tstart = new Date(state.min_date);\r\n\r\n\t\t\t}\r\n\t\t\tend = new Date(start);\r\n\t\t\tend.setHours(scheduler.config.last_hour);\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\t\tnextAgendaSlot: function(slot, dir){\r\n\t\t\treturn {start_date: slot.start_date, end_date: slot.end_date};\r\n\t\t},\r\n\r\n\r\n\t\tisDateVisible: function(date){\r\n\t\t\tif(!scheduler._ignores_detected)\r\n\t\t\t\treturn true;\r\n\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[scheduler.getState().mode];\r\n\r\n\t\t\tvar index;\r\n\t\t\tif(timeline){\r\n\t\t\t\tindex = scheduler._get_date_index(timeline, date);\r\n\t\t\t}else{\r\n\t\t\t\tindex = scheduler.locate_holder_day(date);\r\n\t\t\t}\r\n\r\n\t\t\treturn !scheduler._ignores[index];\r\n\t\t},\r\n\r\n\t\tfindVisibleColumn: function(start, dir){\r\n\t\t\tvar date = start;\r\n\t\t\tdir = dir || 1;\r\n\t\t\tvar range = scheduler.getState();\r\n\r\n\t\t\twhile(!this.isDateVisible(date) && ((dir > 0 && date.valueOf() <= range.max_date.valueOf()) || (dir < 0 && date.valueOf() >= range.min_date.valueOf()))){\r\n\t\t\t\tdate = this.nextDateColumn(date, dir);\r\n\t\t\t}\r\n\r\n\t\t\treturn date;\r\n\t\t},\r\n\r\n\t\tnextDateColumn: function(start, dir){\r\n\t\t\tdir = dir || 1;\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[scheduler.getState().mode];\r\n\r\n\t\t\tvar date;\r\n\t\t\tif(timeline){\r\n\t\t\t\tdate = scheduler.date.add(start, dir * timeline.x_step, timeline.x_unit);\r\n\t\t\t}else{\r\n\t\t\t\tdate = scheduler.date.day_start(scheduler.date.add(start, dir, \"day\"));\r\n\t\t\t}\r\n\r\n\t\t\treturn date;\r\n\t\t},\r\n\r\n\t\tisVisible:function(from, to){\r\n\t\t\tif(!scheduler._ignores_detected)\r\n\t\t\t\treturn true;\r\n\r\n\t\t\tvar current = new Date(from);\r\n\r\n\t\t\twhile(current.valueOf() < to.valueOf()){\r\n\t\t\t\tif(this.isDateVisible(current)) return true;\r\n\t\t\t\tcurrent = this.nextDateColumn(current);\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t},\r\n\r\n\t\tnextSlot: function(slot, dir, view, extend){\r\n\t\t\tvar next;\r\n\t\t\tview = view || this._getMode();\r\n\r\n\t\t\tvar tempSlot = scheduler.$keyboardNavigation.TimeSlot.prototype.clone(slot);\r\n\r\n\t\t\tswitch (view){\r\n\t\t\t\tcase this._modes.units:\r\n\t\t\t\t\tnext = this.nextUnitsSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.timeline:\r\n\t\t\t\t\tnext = this.nextTimelineSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.year:\r\n\t\t\t\t\tnext = this.nextMonthSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.month:\r\n\t\t\t\t\tnext = this.nextMonthSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.weekAgenda:\r\n\t\t\t\t\tnext = this.nextWeekAgendaSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.list:\r\n\t\t\t\t\tnext = this.nextAgendaSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.dayColumns:\r\n\t\t\t\t\tnext = this.nextDaySlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(next.start_date.valueOf() >= next.end_date.valueOf()){\r\n\t\t\t\tnext = this.nextSlot(next, dir, view);\r\n\t\t\t}\r\n\r\n\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(next);\r\n\r\n\t\t},\r\n\r\n\t\textendSlot: function(slot, dir){\r\n\t\t\tvar view = this._getMode();\r\n\t\t\tvar next;\r\n\t\t\tswitch (view){\r\n\t\t\t\tcase this._modes.units:\r\n\t\t\t\t\tif(dir == \"left\" || dir == \"right\"){\r\n\t\t\t\t\t\tnext = this.nextUnitsSlot(slot, dir);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnext = this.extendUnitsSlot(slot, dir);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.timeline:\r\n\t\t\t\t\tif(dir == \"down\" || dir == \"up\"){\r\n\t\t\t\t\t\tnext = this.nextTimelineSlot(slot, dir);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnext = this.extendTimelineSlot(slot, dir);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.year:\r\n\t\t\t\t\tnext = this.extendMonthSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.month:\r\n\t\t\t\t\tnext = this.extendMonthSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.dayColumns:\r\n\t\t\t\t\tnext = this.extendDaySlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.weekAgenda:\r\n\t\t\t\t\tnext = this.extendWeekAgendaSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnext = slot;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tvar range = scheduler.getState();\r\n\t\t\tif(next.start_date.valueOf() < range.min_date.valueOf()){\r\n\t\t\t\tnext.start_date = this.findVisibleColumn(range.min_date);\r\n\t\t\t\tnext.start_date.setHours(scheduler.config.first_hour);\r\n\t\t\t}\r\n\r\n\t\t\tif(next.end_date.valueOf() > range.max_date.valueOf()){\r\n\t\t\t//\tnext.end_date = new Date(slot.end_date);\r\n\t\t\t\tnext.end_date = this.findVisibleColumn(range.max_date, -1);\r\n\t\t\t}\r\n\r\n\r\n\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(next);\r\n\t\t},\r\n\r\n\t\textendTimelineSlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"timeline\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\textendWeekAgendaSlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"weekAgenda\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\textendGenericSlot: function(allowedDirections, slot, direction, type){\r\n\t\t\tvar next;\r\n\t\t\tvar moveDate = slot.movingDate;\r\n\r\n\t\t\tif(!moveDate){\r\n\t\t\t\tmoveDate = allowedDirections[direction];\r\n\t\t\t}\r\n\r\n\t\t\tif(!moveDate || !allowedDirections[direction]){\r\n\t\t\t\treturn slot;\r\n\t\t\t}\r\n\r\n\t\t\tif(direction){\r\n\t\t\t\tnext = this.nextSlot({start_date: slot[moveDate], section: slot.section}, direction, type, true);\r\n\r\n\t\t\t\tif(next.start_date.valueOf() == slot.start_date.valueOf()){\r\n\t\t\t\t\tnext = this.nextSlot({start_date: next.start_date, section:next.section}, direction, type, true);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tnext.movingDate = moveDate;\r\n\t\t\t}else{\r\n\t\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(slot);\r\n\t\t\t}\r\n\r\n\t\t\tvar newDates = this.extendSlotDates(slot, next, next.movingDate);\r\n\r\n\t\t\tif(newDates.end_date.valueOf() <= newDates.start_date.valueOf()){\r\n\t\t\t\tnext.movingDate = next.movingDate == \"end_date\" ? \"start_date\" : \"end_date\";\r\n\t\t\t}\r\n\t\t\tnewDates = this.extendSlotDates(slot, next, next.movingDate);\r\n\r\n\t\t\tnext.start_date = newDates.start_date;\r\n\t\t\tnext.end_date = newDates.end_date;\r\n\t\t\treturn next;\r\n\t\t},\r\n\r\n\t\textendSlotDates: function(oldSlot, newSlot, dateDirection){\r\n\t\t\tvar res = {start_date:null, end_date:null};\r\n\r\n\t\t\tif(dateDirection == \"start_date\"){\r\n\t\t\t\tres.start_date = newSlot.start_date;\r\n\t\t\t\tres.end_date = oldSlot.end_date;\r\n\t\t\t}else{\r\n\t\t\t\tres.start_date = oldSlot.start_date;\r\n\t\t\t\tres.end_date = newSlot.start_date;\r\n\t\t\t}\r\n\t\t\treturn res;\r\n\r\n\t\t},\r\n\r\n\t\textendMonthSlot: function(slot, direction){\r\n\t\t\tvar slot = this.extendGenericSlot({\r\n\t\t\t\t\t\"up\":\"start_date\",\r\n\t\t\t\t\t\"down\":\"end_date\",\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"month\"\r\n\t\t\t);\r\n\r\n\t\t\tslot.start_date.setHours(scheduler.config.first_hour);\r\n\t\t\tslot.end_date = scheduler.date.add(slot.end_date, -1, \"day\");\r\n\t\t\tslot.end_date.setHours(scheduler.config.last_hour);\r\n\t\t\treturn slot;\r\n\t\t},\r\n\r\n\t\textendUnitsSlot: function(slot, direction){\r\n\t\t\tvar next;\r\n\r\n\t\t\tswitch (direction){\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tnext = this.extendDaySlot(slot, direction);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnext = slot;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tnext.section = slot.section;\r\n\t\t\treturn next;\r\n\t\t},\r\n\t\textendDaySlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\t\"up\":\"start_date\",\r\n\t\t\t\t\t\"down\":\"end_date\",\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"dayColumns\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\tscrollSlot: function(dir){\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tvar slot = this.nextSlot(this, dir);\r\n\t\t\tif(slot.start_date.valueOf() < state.min_date.valueOf() || slot.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tscheduler.setCurrentView(new Date(slot.start_date));\r\n\t\t\t}\r\n\r\n\t\t\tthis.moveTo(slot);\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tthis.scrollSlot(\"left\");\r\n\t\t\t},\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tthis.scrollSlot(\"right\");\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\r\n\t\t\t\tvar mode = this._getMode();\r\n\t\t\t\tif(mode == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.nextEventHandler();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.scrollSlot(\"down\");\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"up\": function () {\r\n\t\t\t\tvar mode = this._getMode();\r\n\t\t\t\tif(mode == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.prevEventHandler();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.scrollSlot(\"up\");\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"shift+down\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"down\"));\r\n\t\t\t},\r\n\t\t\t\"shift+up\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"up\"));\r\n\t\t\t},\r\n\t\t\t\"shift+right\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"right\"));\r\n\t\t\t},\r\n\t\t\t\"shift+left\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"left\"));\r\n\t\t\t},\r\n\r\n\r\n\t\t\t\"enter\": function(){\r\n\t\t\t\tvar obj = {start_date: new Date(this.start_date), end_date: new Date(this.end_date)};\r\n\r\n\t\t\t\tvar mode = scheduler.getState().mode;\r\n\t\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\r\n\t\t\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\t\t\tobj[timeline.y_property] = this.section;\r\n\t\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\t\tvar unit = scheduler._props[mode];\r\n\t\t\t\t\tobj[unit.map_to] = this.section;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler.addEventNow(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.TimeSlot.prototype.bindAll(scheduler.$keyboardNavigation.TimeSlot.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.MinicalButton = function(div, index){\r\n\tthis.container = div;\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.MinicalButton.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar container = this.container;\r\n\t\t\treturn !!container.offsetWidth;// valid if container is visible\r\n\t\t},\r\n\r\n\t\tfallback: function(){\r\n\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(defaultSlot.isValid()){\r\n\t\t\t\treturn defaultSlot;\r\n\t\t\t}else{\r\n\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t}\r\n\t\t},\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.globalNode.disable();\r\n\t\t\tthis.container.removeAttribute(\"tabindex\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tthis.container.setAttribute(\"tabindex\", \"0\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\tif(!this.index){\r\n\t\t\t\treturn this.container.querySelector(\".dhx_cal_prev_button\");\r\n\t\t\t}else{\r\n\t\t\t\treturn this.container.querySelector(\".dhx_cal_next_button\");\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"right\": function(e){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, this.index ? 0 : 1));\r\n\t\t\t},\r\n\t\t\t\"left\": function(e){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, this.index ? 0 : 1));\r\n\t\t\t},\r\n\t\t\t\"down\": function(){\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, 0, 0);\r\n\t\t\t\tif(next && !next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"enter\": function(e){\r\n\t\t\t\tthis.getNode().click();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.MinicalButton.prototype.bindAll(scheduler.$keyboardNavigation.MinicalButton.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.MinicalCell = function(div, row, col){\r\n\tthis.container = div;\r\n\tthis.row = row || 0;\r\n\tthis.col = col || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.MinicalCell.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar grid = this._getGrid();\r\n\t\t\treturn !!(grid[this.row] && grid[this.row][this.col]);\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\tvar row = this.row;\r\n\t\t\tvar col = this.col;\r\n\t\t\tvar grid = this._getGrid();\r\n\t\t\tif(!grid[row]){\r\n\t\t\t\trow = 0;\r\n\t\t\t}\r\n\t\t\tvar dir = true;\r\n\t\t\tif(row > grid.length / 2){\r\n\t\t\t\tdir = false;\r\n\t\t\t}\r\n\r\n\t\t\tif(!grid[row]){\r\n\t\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t\tif(defaultSlot.isValid()){\r\n\t\t\t\t\treturn defaultSlot;\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(dir){\r\n\t\t\t\tfor(var c = col; grid[row] && c < grid[row].length; c++){\r\n\t\t\t\t\tif(!grid[row][c] && c == grid[row].length - 1){\r\n\t\t\t\t\t\trow++;\r\n\t\t\t\t\t\tcol = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(grid[row][c]){\r\n\t\t\t\t\t\treturn new scheduler.$keyboardNavigation.MinicalCell(this.container, row, c);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tfor(var c = col; grid[row] && c < grid[row].length; c--){\r\n\t\t\t\t\tif(!grid[row][c] && !c){\r\n\t\t\t\t\t\trow--;\r\n\t\t\t\t\t\tcol = grid[row].length - 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(grid[row][c]){\r\n\t\t\t\t\t\treturn new scheduler.$keyboardNavigation.MinicalCell(this.container, row, c);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn new scheduler.$keyboardNavigation.MinicalButton(this.container, 0);\r\n\t\t},\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.globalNode.disable();\r\n\r\n\t\t\tthis.container.removeAttribute(\"tabindex\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tthis.container.setAttribute(\"tabindex\", \"0\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\t\t_getNode: function(row, col){\r\n\t\t\treturn this.container.querySelector(\".dhx_year_body tr:nth-child(\"+(row + 1) + \") td:nth-child(\"+(col + 1)+\")\");\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\treturn this._getNode(this.row, this.col);\r\n\t\t},\r\n\r\n\t\t_getGrid: function(){\r\n\t\t\tvar rows = this.container.querySelectorAll(\".dhx_year_body tr\");\r\n\t\t\tvar grid = [];\r\n\t\t\tfor(var i = 0; i < rows.length; i++){\r\n\t\t\t\tgrid[i] = [];\r\n\t\t\t\tvar row = rows[i];\r\n\t\t\t\tvar cells = row.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var c = 0; c < cells.length; c++){\r\n\t\t\t\t\tvar cell = cells[c];\r\n\t\t\t\t\tvar enabled = true;\r\n\t\t\t\t\tvar css = scheduler._getClassName(cell);\r\n\t\t\t\t\tif(css.indexOf(\"dhx_after\") > -1 || css.indexOf(\"dhx_before\") > -1 || css.indexOf(\"dhx_scale_ignore\") > -1){\r\n\t\t\t\t\t\tenabled = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tgrid[i][c] = enabled;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn grid;\r\n\t\t},\r\n\r\n\r\n\t\tkeys: {\r\n\t\t\t\"right\": function(e){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row;\r\n\t\t\t\tvar newCol = this.col + 1;\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tif(grid[newRow + 1]){\r\n\t\t\t\t\t\tnewRow = newRow + 1;\r\n\t\t\t\t\t\tnewCol = 0;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnewCol = this.col;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"left\": function(e){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row;\r\n\t\t\t\tvar newCol = this.col - 1;\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tif(grid[newRow - 1]){\r\n\t\t\t\t\t\tnewRow = newRow - 1;\r\n\t\t\t\t\t\tnewCol = grid[newRow].length - 1;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnewCol = this.col;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"down\": function(){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row + 1;\r\n\t\t\t\tvar newCol = this.col;\r\n\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tnewRow = this.row;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"up\": function(){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row - 1;\r\n\t\t\t\tvar newCol = this.col;\r\n\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tvar index = 0;\r\n\t\t\t\t\tif(this.col > grid[this.row].length / 2){\r\n\t\t\t\t\t\tindex = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, index));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.moveTo(next);\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\t\t\t\"enter\": function(e){\r\n\t\t\t\tthis.getNode().querySelector(\".dhx_month_head\").click();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.MinicalCell.prototype.bindAll(scheduler.$keyboardNavigation.MinicalCell.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.DataArea = function(index){\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.DataArea.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\tgetNode: function(index){\r\n\t\t\treturn scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t},\r\n\r\n\t\t_handlers:null,\r\n\r\n\t\tisValid: function(){\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tfallback:function(){\r\n\t\t\treturn this;\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"up,down,right,left\":function(){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.DataArea.prototype.bindAll(scheduler.$keyboardNavigation.DataArea.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\n\r\n\r\n(function(){\r\n\tvar modalsStack = [];\r\n\r\n\tfunction isModal(){\r\n\t\treturn !!(modalsStack.length);\r\n\t}\r\n\r\n\tfunction isChildOf(child, parent){\r\n\t\twhile(child && child != parent){\r\n\t\t\tchild = child.parentNode;\r\n\t\t}\r\n\r\n\t\treturn !!(child == parent);\r\n\t}\r\n\r\n\tfunction afterPopup(box){\r\n\t\tsetTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tif(!isModal() && !(isChildOf(document.activeElement, scheduler.$container))) {\r\n\t\t\t\tscheduler.focus();\r\n\t\t\t}\r\n\t\t}, 1);\r\n\t}\r\n\tfunction startModal(box){\r\n\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\tscheduler.event(box, \"keydown\", trapFocus);\r\n\t\tmodalsStack.push(box);\r\n\t\t//scheduler.$keyboardNavigation.dispatcher.disable();\r\n\t}\r\n\r\n\tfunction endModal(){\r\n\t\tvar box = modalsStack.pop();\r\n\t\tif(box) {\r\n\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t}\r\n\t\tafterPopup(box);\r\n\r\n\t}\r\n\r\n\tfunction isTopModal(box){\r\n\t//\tif(dhtmlx._modalsStack.length){\r\n\t//\t\treturn box == dhtmlx._modalsStack[dhtmlx._modalsStack.length - 1];\r\n\t//\t}else{\r\n\t\t\treturn box == modalsStack[modalsStack.length - 1];\r\n\t//\t}\r\n\r\n\t}\r\n\r\n\tfunction trapFocus(event){\r\n\t\tvar event = event || window.event;\r\n\t\tvar target = event.currentTarget;\r\n\t\tif(!isTopModal(target)) return;\r\n\r\n\t\tscheduler.$keyboardNavigation.trapFocus(target, event);\r\n\t}\r\n\r\n\tfunction traceLightbox(){\r\n\t\tstartModal(scheduler.getLightbox());\r\n\t}\r\n\r\n\tscheduler.attachEvent(\"onLightbox\", traceLightbox);\r\n\tscheduler.attachEvent(\"onAfterLightbox\", endModal);\r\n\r\n\tscheduler.attachEvent(\"onAfterQuickInfo\", function(){afterPopup();});\r\n\r\n\tif(!scheduler._keyNavMessagePopup) {\r\n\t\tscheduler._keyNavMessagePopup = true;\r\n\r\n\t\tvar focusElement = null;\r\n\t\tvar backupFocus = null;\r\n\t\tconst modalsStack = [];\r\n\t\tscheduler.attachEvent(\"onMessagePopup\", function(box){\r\n\t\t\tfocusElement = document.activeElement;\r\n\t\t\tbackupFocus = focusElement;\r\n\r\n\t\t\twhile(backupFocus && scheduler._getClassName(backupFocus).indexOf(\"dhx_cal_data\") < 0){\r\n\t\t\t\tbackupFocus = backupFocus.parentNode;\r\n\t\t\t}\r\n\t\t\tif(backupFocus){\r\n\t\t\t\tbackupFocus = backupFocus.parentNode;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t\tscheduler.event(box, \"keydown\", trapFocus);\r\n\t\t\tmodalsStack.push(box);\r\n\t\t});\r\n\r\n\r\n\t\tscheduler.attachEvent(\"onAfterMessagePopup\", function () {\r\n\t\t\tvar box = modalsStack.pop();\r\n\t\t\tif(box) {\r\n\t\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t\t}\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\tvar currentTarget = document.activeElement;\r\n\t\t\t\twhile(currentTarget && scheduler._getClassName(currentTarget).indexOf(\"dhx_cal_light\") < 0){\r\n\t\t\t\t\tcurrentTarget = currentTarget.parentNode;\r\n\t\t\t\t}\r\n\t\t\t\tif(currentTarget)\r\n\t\t\t\t\treturn;\r\n\r\n\r\n\t\t\t\tif(focusElement && focusElement.parentNode){\r\n\t\t\t\t\tfocusElement.focus();\r\n\r\n\t\t\t\t}else if(backupFocus && backupFocus.parentNode){\r\n\t\t\t\t\tbackupFocus.focus();\r\n\t\t\t\t}\r\n\t\t\t\tfocusElement = null;\r\n\t\t\t\tbackupFocus = null;\r\n\r\n\t\t\t}, 1);\r\n\t\t});\r\n\t}\r\n\r\n\tscheduler.$keyboardNavigation.isModal = isModal;\r\n\r\n\r\n})();\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.dispatcher = {\r\n\tisActive: false,\r\n\tactiveNode: null,\r\n\tglobalNode: new scheduler.$keyboardNavigation.SchedulerNode(),\r\n\r\n\tkeepScrollPosition: function (callback) {\r\n\t\tvar top, left;\r\n\r\n\t\tvar scrollable = scheduler.$container.querySelector(\".dhx_timeline_scrollable_data\");\r\n\t\tif(!scrollable){\r\n\t\t\tscrollable = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t}\r\n\r\n\t\tif(scrollable){\r\n\t\t\ttop = scrollable.scrollTop;\r\n\t\t\tleft = scrollable.scrollLeft;\r\n\t\t}\r\n\r\n\t\tcallback();\r\n\r\n\t\tif(scrollable){\r\n\t\t\tscrollable.scrollTop = top;\r\n\t\t\tscrollable.scrollLeft = left;\r\n\t\t}\r\n\t},\r\n\tenable: function(){\r\n\t\tif(!scheduler.$container){\r\n\t\t\t// do nothing if not initialized\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.isActive = true;\r\n\t\tvar self = this;\r\n\t\tthis.keepScrollPosition(function () {\r\n\t\t\tself.globalNode.enable();\r\n\t\t\tself.setActiveNode(self.getActiveNode());\r\n\t\t});\r\n\t},\r\n\r\n\tdisable: function(){\r\n\t\tthis.isActive = false;\r\n\t\tthis.globalNode.disable();\r\n\t},\r\n\r\n\tisEnabled: function(){\r\n\t\treturn !!this.isActive;\r\n\t},\r\n\r\n\tgetDefaultNode: function(){\r\n\t\treturn this.globalNode.getDefaultNode();\r\n\t},\r\n\r\n\tsetDefaultNode: function() {\r\n\t\tthis.setActiveNode(this.getDefaultNode());\r\n\t},\r\n\r\n\tgetActiveNode: function(){\r\n\t\tvar node = this.activeNode;\r\n\t\tif(node && !node.isValid()){\r\n\t\t\tnode = node.fallback();\r\n\t\t}\r\n\t\treturn node;\r\n\t},\r\n\r\n\tfocusGlobalNode: function(){\r\n\t\tthis.blurNode(this.globalNode);\r\n\t\tthis.focusNode(this.globalNode);\r\n\t},\r\n\r\n\tsetActiveNode: function(el){\r\n\t\tif(!el || !el.isValid())\r\n\t\t\treturn;\r\n\r\n\t\tif(this.activeNode){\r\n\t\t\tif(this.activeNode.compareTo(el)){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(this.isEnabled()){\r\n\t\t\tthis.blurNode(this.activeNode);\r\n\t\t\tthis.activeNode = el;\r\n\t\t\tthis.focusNode(this.activeNode);\r\n\t\t}\r\n\t},\r\n\r\n\tfocusNode: function(el){\r\n\t\tif(el && el.focus){\r\n\t\t\tel.focus();\r\n\t\t\tif(el.getNode && document.activeElement != el.getNode()){\r\n\t\t\t\tthis.setActiveNode(new scheduler.$keyboardNavigation.DataArea());\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tblurNode: function(el){\r\n\t\tif(el && el.blur){\r\n\t\t\tel.blur();\r\n\t\t}\r\n\t},\r\n\r\n\tgetInlineEditor: function(id){\r\n\t\tvar editor = scheduler.$container.querySelector(\".dhx_cal_editor[\"+scheduler.config.event_attribute+\"='\"+id+\"'] textarea\");\r\n\t\tif(editor && editor.offsetWidth){\r\n\t\t\t// if exists and visible\r\n\t\t\treturn editor;\r\n\t\t}\r\n\t\treturn null;\r\n\t},\r\n\r\n\tkeyDownHandler: function (e) {\r\n\r\n\t\tif(e.defaultPrevented){\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar activeElement = this.getActiveNode();\r\n\r\n\t\tif(scheduler.$keyboardNavigation.isModal() &&\r\n\t\t\t!(activeElement && activeElement.container && scheduler.utils.dom.locateCss({target:activeElement.container}, \"dhx_minical_popup\", false)))\r\n\t\t\treturn;\r\n\r\n\t\tif(scheduler.getState().editor_id && this.getInlineEditor(scheduler.getState().editor_id))\r\n\t\t\treturn;\r\n\r\n\t\tif (!this.isEnabled())\r\n\t\t\treturn;\r\n\r\n\t\te = e || window.event;\r\n\r\n\t\tvar schedulerNode = this.globalNode;\r\n\r\n\t\tvar command = scheduler.$keyboardNavigation.shortcuts.getCommandFromEvent(e);\r\n\r\n\t\tif(!activeElement){\r\n\t\t\tthis.setDefaultNode();\r\n\t\t}else if(activeElement.findHandler(command)){\r\n\t\t\tactiveElement.doAction(command, e);\r\n\t\t}else if(schedulerNode.findHandler(command)){\r\n\t\t\tschedulerNode.doAction(command, e);\r\n\t\t}\r\n\r\n\t},\r\n\r\n\t_timeout: null,\r\n\tdelay: function(callback, delay){\r\n\r\n\t\tclearTimeout(this._timeout);\r\n\t\tthis._timeout = setTimeout(callback, delay || 1);\r\n\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n//Initial idea and implementation by Steve MC\r\nscheduler._temp_key_scope = function (){\r\n\r\n\tscheduler.config.key_nav = true;\r\n\r\n\tscheduler.$keyboardNavigation._pasteDate = null; // used for copy and paste operations\r\n\tscheduler.$keyboardNavigation._pasteSection = null; // used for copy and paste operations\r\n\tvar isCopy = null;\r\n\r\n\tvar pos = {};\r\n\r\n\tif(!document.body){\r\n\t\tscheduler.event(window, \"load\", function(){\r\n\t\t\tscheduler.event(document.body, \"mousemove\", trackMousePosition);\r\n\t\t});\r\n\t}else{\r\n\t\tscheduler.event(document.body, \"mousemove\", trackMousePosition);\r\n\t}\r\n\r\n\tfunction trackMousePosition(event){\r\n\t\tevent = event || window.event;\r\n\t\tpos.x = event.clientX;\r\n\t\tpos.y = event.clientY;\r\n\t}\r\n\tfunction currentTarget(){\r\n\r\n\t\tvar mousePointer = false;\r\n\t\tvar keyNavPointer = false;\r\n\r\n\t\tvar target = document.elementFromPoint(pos.x, pos.y);\r\n\t\twhile(target && target != scheduler._obj){\r\n\t\t\ttarget = target.parentNode;\r\n\t\t}\r\n\t\tmousePointer = !!(target == scheduler._obj);\r\n\r\n\t\tkeyNavPointer = scheduler.$keyboardNavigation.dispatcher.isEnabled();\r\n\r\n\t\treturn mousePointer || keyNavPointer;\r\n\t}\r\n\r\n\tscheduler.attachEvent(\"onMouseMove\", function(id,e){\r\n\t\tvar state = scheduler.getState();\r\n\r\n\t\t// make sure scheduler is fully initialized before calling scheduler.getActionData\r\n\t\tif(!(state.mode && state.min_date)){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tvar position = scheduler.getActionData(e);\r\n\t\tscheduler.$keyboardNavigation._pasteDate = position.date;\r\n\t\tscheduler.$keyboardNavigation._pasteSection = position.section;\r\n\t});\r\n\r\n\tfunction clear_event_after(ev){\r\n\t\tdelete ev.rec_type; delete ev.rec_pattern;\r\n\t\tdelete ev.event_pid; delete ev.event_length;\r\n\t}\r\n\r\n\tfunction copyEvent(ev){\r\n\t\treturn scheduler._lame_copy({}, ev);\r\n\t}\r\n\r\n\tscheduler._make_pasted_event = function(ev){\r\n\t\tvar date = scheduler.$keyboardNavigation._pasteDate;\r\n\t\tvar section = scheduler.$keyboardNavigation._pasteSection;\r\n\r\n\t\tvar event_duration = ev.end_date-ev.start_date;\r\n\r\n\t\tvar copy = copyEvent(ev);\r\n\t\tclear_event_after(copy);\r\n\t\tcopy.start_date = new Date(date);\r\n\t\tcopy.end_date = new Date(copy.start_date.valueOf() + event_duration);\r\n\r\n\t\tif(section){\r\n\t\t\tvar property = scheduler._get_section_property();\r\n\r\n\t\t\tif(scheduler.config.multisection)\r\n\t\t\t\tcopy[property] = ev[property]; // save initial set of resources for multisection view\r\n\t\t\telse\r\n\t\t\t\tcopy[property] = section;\r\n\t\t}\r\n\t\treturn copy;\r\n\t};\r\n\tscheduler._do_paste = function(is_copy, modified_ev, original_ev){\r\n\t\tif(scheduler.callEvent(\"onBeforeEventPasted\", [is_copy, modified_ev, original_ev]) === false){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tscheduler.addEvent(modified_ev);\r\n\t\tscheduler.callEvent(\"onEventPasted\", [is_copy, modified_ev, original_ev]);\r\n\t};\r\n\r\n\tscheduler._is_key_nav_active = function(){\r\n\t\tif(this._is_initialized() && !this._is_lightbox_open() && this.config.key_nav){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\r\n\tfunction getSelectedEvent(){\r\n\t\tvar node = scheduler.$keyboardNavigation.dispatcher.getActiveNode();\r\n\t\tif(node && node.eventId) return node.eventId;\r\n\t\treturn scheduler._select_id;\r\n\t}\r\n\r\n\tscheduler.event(document, \"keydown\", function(e){\r\n\t\t// compatibility fix - scheduler focus on ctrl+v on mouse hover\r\n\t\tif(((e.ctrlKey || e.metaKey) && e.keyCode == 86) && scheduler._buffer_event && !scheduler.$keyboardNavigation.dispatcher.isEnabled()) {\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.isActive = currentTarget();\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler._key_nav_copy_paste = function(e){\r\n\t\tif(!scheduler._is_key_nav_active()) return true;\r\n\r\n\t\tif (e.keyCode == 37 || e.keyCode == 39) { // Left, Right arrows\r\n\t\t\te.cancelBubble = true;\r\n\r\n\t\t\tvar next = scheduler.date.add(scheduler._date,(e.keyCode == 37 ? -1 : 1 ),scheduler._mode);\r\n\t\t\tscheduler.setCurrentView(next);\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tvar select_id = getSelectedEvent();\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 67) { // CTRL+C\r\n\t\t\tif (select_id) {\r\n\t\t\t\tscheduler._buffer_event = copyEvent(scheduler.getEvent(select_id));\r\n\t\t\t\tisCopy = true;\r\n\t\t\t\tscheduler.callEvent(\"onEventCopied\", [scheduler.getEvent(select_id)]);\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 88) { // CTRL+X\r\n\t\t\tif (select_id) {\r\n\t\t\t\tisCopy = false;\r\n\t\t\t\tvar ev = scheduler._buffer_event = copyEvent(scheduler.getEvent(select_id));\r\n\r\n\t\t\t\tscheduler.updateEvent(ev.id);\r\n\t\t\t\tscheduler.callEvent(\"onEventCut\", [ev]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 86 && currentTarget(e)) { // CTRL+V\r\n\t\t\tvar ev = scheduler._buffer_event ? scheduler.getEvent(scheduler._buffer_event.id) : scheduler._buffer_event;\r\n\t\t\tev = ev || scheduler._buffer_event;\r\n\r\n\t\t\tif (ev) {\r\n\t\t\t\tvar new_ev = scheduler._make_pasted_event(ev);\r\n\t\t\t\tif (isCopy) {\r\n\t\t\t\t\tnew_ev.id = scheduler.uid();\r\n\t\t\t\t\tscheduler._do_paste(isCopy, new_ev, ev);\r\n\t\t\t\t}\r\n\t\t\t\telse { // cut operation\r\n\t\t\t\t\tvar res = scheduler.callEvent(\"onBeforeEventChanged\",[new_ev, e, false, ev]);\r\n\t\t\t\t\tif (res) {\r\n\t\t\t\t\t\tscheduler._do_paste(isCopy, new_ev, ev);\r\n\t\t\t\t\t\tisCopy = true; // switch to copy after first paste operation\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t};\r\n};\r\nscheduler._temp_key_scope();\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.attachSchedulerHandlers = function(){\r\n\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\tvar keyDownHandler = function(e){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\r\n\t\treturn dispatcher.keyDownHandler(e);\r\n\t};\r\n\r\n\tvar focusHandler = function () {\r\n\t\tdispatcher.keepScrollPosition(function () {\r\n\t\t\tdispatcher.focusGlobalNode();\r\n\t\t});\r\n\t};\r\n\r\n\tvar waitCall;\r\n\tscheduler.attachEvent(\"onDataRender\", function(){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\t\tif(!(dispatcher.isEnabled() && !scheduler.getState().editor_id)) return;\r\n\r\n\t\tclearTimeout(waitCall);\r\n\t\twaitCall = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tif(!dispatcher.isEnabled())\r\n\t\t\t\tdispatcher.enable();\r\n\t\t\treFocusActiveNode();\r\n\t\t});\r\n\t});\r\n\r\n\tvar reFocusActiveNode = function(){\r\n\t\tif(!dispatcher.isEnabled())\r\n\t\t\treturn;\r\n\r\n\t\tvar activeNode = dispatcher.getActiveNode();\r\n\t\tif(!activeNode)\r\n\t\t\treturn;\r\n\r\n\t\tif(!activeNode.isValid()){\r\n\t\t\tactiveNode = activeNode.fallback();\r\n\t\t}\r\n\r\n\t\tif(!activeNode || activeNode instanceof scheduler.$keyboardNavigation.MinicalButton || activeNode instanceof scheduler.$keyboardNavigation.MinicalCell)\r\n\t\t\treturn;\r\n\r\n\t\tdispatcher.keepScrollPosition(function () {\r\n\t\t\tactiveNode.focus(true);\r\n\t\t});\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\tvar container = scheduler.$container;\r\n\t\tscheduler.eventRemove(document, \"keydown\", keyDownHandler);\r\n\t\tscheduler.eventRemove(container, \"mousedown\", mousedownHandler);\r\n\t\tscheduler.eventRemove(container, \"focus\", focusHandler);\r\n\r\n\r\n\t\tif(scheduler.config.key_nav){\r\n\r\n\t\t\tscheduler.event(document, \"keydown\", keyDownHandler);\r\n\t\t\tscheduler.event(container, \"mousedown\", mousedownHandler);\r\n\t\t\tscheduler.event(container, \"focus\", focusHandler);\r\n\r\n\t\t\tcontainer.setAttribute(\"tabindex\", \"0\");\r\n\r\n\t\t}else{\r\n\t\t\tcontainer.removeAttribute(\"tabindex\");\r\n\t\t}\r\n\t});\r\n\r\n\tfunction mousedownHandler(e){\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\r\n\t\tconst view = scheduler.getView();\r\n\t\tlet dataAreaClick = false;\r\n\t\tif (scheduler.getState().mode === \"month\") {\r\n\t\t\tdataAreaClick = scheduler.$keyboardNavigation.isChildOf(e.target || e.srcElement, scheduler.$container.querySelector(\".dhx_cal_month_table\"));\r\n\t\t} else if (view && view.layout === \"timeline\") {\r\n\t\t\tdataAreaClick = scheduler.$keyboardNavigation.isChildOf(e.target || e.srcElement, scheduler.$container.querySelector(\".dhx_timeline_data_col\"));\r\n\t\t} else {\r\n\t\t\tconst listOfScales = scheduler.$container.querySelectorAll(\".dhx_scale_holder\");\r\n\t\t\tconst arrOfScales = Array.from(listOfScales);\r\n\t\t\tdataAreaClick = arrOfScales.some(scale => scale === e.target.parentNode);\r\n\t\t}\r\n\r\n\t\tvar pos = scheduler.getActionData(e);\r\n\r\n\t\tvar focusNode;\r\n\t\tif(scheduler._locate_event(e.target || e.srcElement)){\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.Event(scheduler._locate_event(e.target || e.srcElement));\r\n\t\t}else if(dataAreaClick){\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(pos.date && dataAreaClick){\r\n\t\t\t\tfocusNode = focusNode.nextSlot(new scheduler.$keyboardNavigation.TimeSlot(pos.date, null, pos.section));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(focusNode) {\r\n\t\t\tif (!dispatcher.isEnabled()) {\r\n\t\t\t\tdispatcher.activeNode = focusNode;\r\n\r\n\t\t\t} else {\r\n\t\t\t\tif (pos.date && dataAreaClick) {\r\n\t\t\t\t\tdispatcher.delay(function () {\r\n\t\t\t\t\t\tdispatcher.setActiveNode(focusNode);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction focusEvent(evNode){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\t\tif(!dispatcher.isEnabled()) return;\r\n\r\n\r\n\t\tvar prevState = evNode;\r\n\t\tvar focusNode = new scheduler.$keyboardNavigation.Event(prevState.eventId);\r\n\t\tif(!focusNode.isValid()){\r\n\t\t\tvar lastStart = focusNode.start || prevState.start;\r\n\t\t\tvar lastEnd = focusNode.end || prevState.end;\r\n\t\t\tvar lastSection = focusNode.section || prevState.section;\r\n\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot(lastStart, lastEnd, lastSection);\r\n\t\t\tif(!focusNode.isValid()){\r\n\t\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdispatcher.setActiveNode(focusNode);\r\n\t\tvar node = dispatcher.getActiveNode();\r\n\t\tif(node && node.getNode && document.activeElement != node.getNode()){\r\n\t\t\tdispatcher.focusNode(dispatcher.getActiveNode());\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tvar updateEvent = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id){\r\n\t\tvar res = updateEvent.apply(this, arguments);\r\n\t\tif(scheduler.config.key_nav && dispatcher.isEnabled()){\r\n\t\t\tif(scheduler.getState().select_id == id){\r\n\t\t\t\tvar element = new scheduler.$keyboardNavigation.Event(id);\r\n\r\n\t\t\t\tif(!scheduler.getState().lightbox_id){\r\n\t\t\t\t\tfocusEvent(element);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn res;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onEventDeleted\", function(id) {\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\t\tif(dispatcher.isEnabled()){\r\n\t\t\tvar activeNode = dispatcher.getActiveNode();\r\n\t\t\tif(activeNode.eventId == id){\r\n\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onClearAll\", function(){\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\t\tif(dispatcher.isEnabled()){\r\n\t\t\tif(dispatcher.getActiveNode() instanceof scheduler.$keyboardNavigation.Event){\r\n\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation._minicalendars = [];\r\n\r\nscheduler.$keyboardNavigation.isMinical = function(node){\r\n\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\tif(this.isChildOf(node, minicalendars[i]))\r\n\t\t\treturn true;\r\n\t}\r\n\treturn false;\r\n};\r\n\r\nscheduler.$keyboardNavigation.isChildOf = function(child, parent){\r\n\twhile(child && child !== parent){\r\n\t\tchild = child.parentNode;\r\n\t}\r\n\r\n\treturn !!(child === parent);\r\n};\r\n\r\nscheduler.$keyboardNavigation.patchMinicalendar = function(){\r\n\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\tfunction focusMinical(e){\r\n\t\tvar target = e.target;\r\n\r\n\t\tdispatcher.enable();\r\n\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.MinicalButton(target, 0));\r\n\t}\r\n\r\n\tfunction minicalClick(e){\r\n\t\tvar target = e.target || e.srcElement;\r\n\r\n\t\tvar prev = scheduler.utils.dom.locateCss(e, \"dhx_cal_prev_button\", false);\r\n\t\tvar next = scheduler.utils.dom.locateCss(e, \"dhx_cal_next_button\", false);\r\n\t\tvar cell = scheduler.utils.dom.locateCss(e, \"dhx_year_body\", false);\r\n\r\n\t\tvar rowIndex = 0;\r\n\t\tvar cellIndex = 0;\r\n\t\tif(cell){\r\n\t\t\tvar tr;\r\n\t\t\tvar td;\r\n\t\t\tvar current = target;\r\n\t\t\twhile(current && current.tagName.toLowerCase() != \"td\"){\r\n\t\t\t\tcurrent = current.parentNode;\r\n\t\t\t}\r\n\t\t\tif(current){\r\n\t\t\t\ttd = current;\r\n\t\t\t\ttr = td.parentNode;\r\n\t\t\t}\r\n\r\n\t\t\tif(tr && td){\r\n\t\t\t\tvar rows = tr.parentNode.querySelectorAll(\"tr\");\r\n\t\t\t\tfor(var i = 0; i < rows.length; i++){\r\n\t\t\t\t\tif(rows[i] == tr){\r\n\t\t\t\t\t\trowIndex = i;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tvar cells = tr.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\t\t\tif(cells[i] == td){\r\n\t\t\t\t\t\tcellIndex = i;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tvar root = e.currentTarget;\r\n\t\tdispatcher.delay(function(){\r\n\t\t\tif(prev || next || cell){\r\n\r\n\t\t\t\tvar element;\r\n\t\t\t\tif(prev){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalButton(root, 0);\r\n\t\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.MinicalButton(root, 0));\r\n\t\t\t\t}else if(next){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalButton(root, 1);\r\n\t\t\t\t}else if(cell){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalCell(root, rowIndex, cellIndex);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(element){\r\n\r\n\t\t\t\t\tdispatcher.enable();\r\n\t\t\t\t\tif(element.isValid()){\r\n\t\t\t\t\t\tdispatcher.activeNode = null;\r\n\t\t\t\t\t\tdispatcher.setActiveNode(element);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t}\r\n\r\n\tif(scheduler.renderCalendar){\r\n\t\tvar renderMinical = scheduler.renderCalendar;\r\n\t\tscheduler.renderCalendar = function(){\r\n\t\t\tvar cal = renderMinical.apply(this, arguments);\r\n\t\t\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\r\n\t\t\tscheduler.eventRemove(cal, \"click\", minicalClick);\r\n\t\t\tscheduler.event(cal, \"click\", minicalClick);\r\n\r\n\t\t\tscheduler.eventRemove(cal, \"focus\", focusMinical);\r\n\t\t\tscheduler.event(cal, \"focus\", focusMinical);\r\n\r\n\t\t\tvar added = false;\r\n\t\t\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\t\t\tif(minicalendars[i] == cal){\r\n\t\t\t\t\tadded = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(!added)\r\n\t\t\t\tminicalendars.push(cal);\r\n\r\n\t\t\tif(dispatcher.isEnabled()){\r\n\t\t\t\tvar node = dispatcher.getActiveNode();\r\n\t\t\t\tif(node && node.container == cal){\r\n\t\t\t\t\tdispatcher.focusNode(node);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcal.setAttribute(\"tabindex\", \"0\");\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tcal.setAttribute(\"tabindex\", \"0\");\r\n\t\t\t}\r\n\t\t\treturn cal;\r\n\t\t};\r\n\t}\r\n\r\n\tif(scheduler.destroyCalendar){\r\n\t\tvar destroyMinical = scheduler.destroyCalendar;\r\n\t\tscheduler.destroyCalendar = function(cal, force){\r\n\t\t\tcal = cal || (scheduler._def_count ? scheduler._def_count.firstChild : null);\r\n\t\t\tvar res = destroyMinical.apply(this, arguments);\r\n\r\n\t\t\tif(!cal || !cal.parentNode){\r\n\t\t\t\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\t\t\t\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\t\t\t\tif(minicalendars[i] == cal){\r\n\t\t\t\t\t\tscheduler.eventRemove(minicalendars[i], \"focus\", focusMinical);\r\n\t\t\t\t\t\tminicalendars.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn res;\r\n\t\t};\r\n\t}\r\n};\r\n\r\n}","import keyboard_shortcuts from \"./keyboard_navigation/common/keyboard_shortcuts\";\r\nimport eventhandler from \"./keyboard_navigation/common/eventhandler\";\r\nimport trap_modal_focus from \"./keyboard_navigation/common/trap_modal_focus\";\r\nimport marker from \"./keyboard_navigation/marker\";\r\nimport scheduler_node from \"./keyboard_navigation/elements/scheduler_node\";\r\nimport nav_node from \"./keyboard_navigation/elements/nav_node\";\r\nimport header_cell from \"./keyboard_navigation/elements/header_cell\";\r\nimport event from \"./keyboard_navigation/elements/event\";\r\nimport time_slot from \"./keyboard_navigation/elements/time_slot\";\r\nimport minical_button from \"./keyboard_navigation/elements/minical_button\";\r\nimport minical_cell from \"./keyboard_navigation/elements/minical_cell\";\r\nimport data_area from \"./keyboard_navigation/elements/data_area\";\r\nimport modals from \"./keyboard_navigation/modals\";\r\nimport core from \"./keyboard_navigation/core\";\r\nimport key_nav_legacy from \"./keyboard_navigation/key_nav_legacy\";\r\n\r\n\r\nimport scheduler_handlers from \"./keyboard_navigation/scheduler_handlers\";\r\nimport minical_handlers from \"./keyboard_navigation/minical_handlers\";\r\n\r\nexport default function(scheduler){\r\n\t\tscheduler.config.key_nav = true;\r\n\t\tscheduler.config.key_nav_step = 30;\r\n\t\tscheduler.addShortcut = function(shortcut, handler, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tscopeObject.prototype.bind(shortcut, handler);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.getShortcutHandler = function(shortcut, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tvar commands = scheduler.$keyboardNavigation.shortcuts.parse(shortcut);\r\n\t\t\t\tif(commands.length){\r\n\t\t\t\t\treturn scopeObject.prototype.findHandler(commands[0]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.removeShortcut = function(shortcut, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tscopeObject.prototype.unbind(shortcut);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.focus = function(){\r\n\t\t\tif(!scheduler.config.key_nav){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar disp = scheduler.$keyboardNavigation.dispatcher;\r\n\t\t\tdisp.enable();\r\n\t\t\tvar activeNode = disp.getActiveNode();\r\n\t\t\tif(!activeNode || activeNode instanceof scheduler.$keyboardNavigation.MinicalButton || activeNode instanceof scheduler.$keyboardNavigation.MinicalCell){\r\n\t\t\t\tdisp.setDefaultNode();\r\n\t\t\t}else{\r\n\t\t\t\tdisp.focusNode(disp.getActiveNode());\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfunction getScope(mode){\r\n\t\t\tvar scopes = {\r\n\t\t\t\t\"minicalButton\":scheduler.$keyboardNavigation.MinicalButton,\r\n\t\t\t\t\"minicalDate\":scheduler.$keyboardNavigation.MinicalCell,\r\n\t\t\t\t\"scheduler\":scheduler.$keyboardNavigation.SchedulerNode,\r\n\t\t\t\t\"dataArea\": scheduler.$keyboardNavigation.DataArea,\r\n\t\t\t\t\"timeSlot\": scheduler.$keyboardNavigation.TimeSlot,\r\n\t\t\t\t\"event\": scheduler.$keyboardNavigation.Event\r\n\t\t\t};\r\n\r\n\t\t\tvar searchMap = {};\r\n\t\t\tfor(var i in scopes)\r\n\t\t\t\tsearchMap[i.toLowerCase()] = scopes[i];\r\n\r\n\t\t\tmode = (mode + \"\").toLowerCase();\r\n\r\n\t\t\treturn searchMap[mode] || scopes.scheduler;\r\n\t\t}\r\n\r\n\t\tscheduler.$keyboardNavigation = {};\r\n\r\n\t\tscheduler._compose = function(){\r\n\t\t\tvar parts = Array.prototype.slice.call(arguments, 0);\r\n\t\t\tvar res = {};\r\n\t\t\tfor(var i = 0; i < parts.length; i++){\r\n\t\t\t\tvar obj = parts[i];\r\n\t\t\t\tif(typeof obj == \"function\"){\r\n\t\t\t\t\tobj = new obj();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor(var p in obj){\r\n\t\t\t\t\tres[p] = obj[p];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn res;\r\n\t\t};\r\n\r\n\t\tkeyboard_shortcuts(scheduler);\r\n\t\teventhandler(scheduler);\r\n\t\ttrap_modal_focus(scheduler);\r\n\t\tmarker(scheduler);\r\n\t\tscheduler_node(scheduler);\r\n\t\tnav_node(scheduler);\r\n\t\theader_cell(scheduler);\r\n\t\tevent(scheduler);\r\n\t\ttime_slot(scheduler);\r\n\t\tminical_button(scheduler);\r\n\t\tminical_cell(scheduler);\r\n\t\tdata_area(scheduler);\r\n\t\tmodals(scheduler);\r\n\t\tcore(scheduler);\r\n\t\tkey_nav_legacy(scheduler);\r\n\r\n\t\t(function(){\r\n\t\t\tscheduler_handlers(scheduler);\r\n\t\t\tminical_handlers(scheduler);\r\n\r\n\t\t\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\t\t\tscheduler.$keyboardNavigation.attachSchedulerHandlers();\r\n\r\n\t\t\tif(scheduler.renderCalendar){\r\n\t\t\t\t// if minical ext loaded before key nav ext - patch it now\r\n\t\t\t\tscheduler.$keyboardNavigation.patchMinicalendar();\r\n\t\t\t}else{\r\n\t\t\t\t// otherwise - wait until everything is loaded and try again\r\n\t\t\t\tvar attachOnce = scheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\t\t\t\tscheduler.detachEvent(attachOnce);\r\n\t\t\t\t\tscheduler.$keyboardNavigation.patchMinicalendar();\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\tfunction isSchedulerSelected(){\r\n\t\t\t\tif(!scheduler.config.key_nav) return;\r\n\r\n\t\t\t\tvar enable;\r\n\t\t\t\tvar focusElement = document.activeElement;\r\n\t\t\t\t// halt key nav when focus is outside scheduler or in quick info popup\r\n\t\t\t\tif(!focusElement || scheduler.utils.dom.locateCss(focusElement, \"dhx_cal_quick_info\", false)){\r\n\t\t\t\t\tenable = false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tenable = scheduler.$keyboardNavigation.isChildOf(focusElement, scheduler.$container) || scheduler.$keyboardNavigation.isMinical(focusElement);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn enable;\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\tfunction changeState(enable){\r\n\t\t\t\tif(enable && !dispatcher.isEnabled()){\r\n\t\t\t\t\tdispatcher.enable();\r\n\t\t\t\t}else if(!enable && dispatcher.isEnabled()){\r\n\t\t\t\t\tdispatcher.disable();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tconst intervalId = setInterval(function(){\r\n\t\t\t\tif(!scheduler.$container || !scheduler.$keyboardNavigation.isChildOf(scheduler.$container, document.body)){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar enable = isSchedulerSelected();\r\n\r\n\t\t\t\tif(enable){\r\n\t\t\t\t\tchangeState(enable);\r\n\t\t\t\t}else if(!enable && dispatcher.isEnabled()){\r\n\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// doublecheck in case checking is done in handler before focus element is repainted\r\n\t\t\t\t\t\tif(scheduler.config.key_nav){\r\n\t\t\t\t\t\t\tchangeState(isSchedulerSelected());\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tscheduler.$container.removeAttribute(\"tabindex\");\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}, 100);\r\n\t\t\t\t}\r\n\t\t\t}, 500);\r\n\t\t\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\t\t\tclearInterval(intervalId);\r\n\t\t\t});\r\n\t\t})();\r\n\t}\r\n\r\n\r\n","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\r\n\tthis.layers.sort(function(a, b){\r\n\t\treturn a.zIndex - b.zIndex;\r\n\t});\r\n\r\n\tscheduler._dp_init=function(dp){\r\n\t\tdp._methods=[\"_set_event_text_style\",\"\",\"changeEventId\",\"deleteEvent\"];\r\n\r\n\t\tthis.attachEvent(\"onEventAdded\",function(id){\r\n\t\t\tif (!this._loading && this.validId(id) && this.getEvent(id) && this.getEvent(id).layer == dp.layer)\r\n\t\t\t\tdp.setUpdated(id,true,\"inserted\");\r\n\t\t});\r\n\t\tthis.attachEvent(\"onBeforeEventDelete\",function(id){\r\n\t\t\tif(this.getEvent(id) && this.getEvent(id).layer == dp.layer) {\r\n\t\t\t\tif (!this.validId(id)) return;\r\n\t\t\t\tvar z=dp.getState(id);\r\n\r\n\t\t\t\tif (z==\"inserted\" || this._new_event) { dp.setUpdated(id,false);\t\treturn true; }\r\n\t\t\t\tif (z==\"deleted\") return false;\r\n\t\t\t\tif (z==\"true_deleted\") return true;\r\n\r\n\t\t\t\tdp.setUpdated(id,true,\"deleted\");\r\n\t\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\telse return true;\r\n\t\t});\r\n\t\tthis.attachEvent(\"onEventChanged\",function(id){\r\n\t\t\tif (!this._loading && this.validId(id) && this.getEvent(id) && this.getEvent(id).layer == dp.layer)\r\n\t\t\t\tdp.setUpdated(id,true,\"updated\");\r\n\t\t});\r\n\r\n\t\tdp._getRowData=function(id,pref){\r\n\t\t\tvar ev=this.obj.getEvent(id);\r\n\t\t\tvar data = {};\r\n\r\n\t\t\tfor (var a in ev){\r\n\t\t\t\tif (a.indexOf(\"_\")===0) continue;\r\n\t\t\t\tif (ev[a] && ev[a].getUTCFullYear) //not very good, but will work\r\n\t\t\t\t\tdata[a] = this.obj._helpers.formatDate(ev[a]);\r\n\t\t\t\telse\r\n\t\t\t\t\tdata[a] = ev[a];\r\n\t\t\t}\r\n\t\t\treturn data;\r\n\t\t};\r\n\t\tdp._clearUpdateFlag=function(){};\r\n\r\n\t\tdp.attachEvent(\"insertCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"updateCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"deleteCallback\", function(upd, id) {\r\n\t\t\tthis.obj.setUserData(id, this.action_param, \"true_deleted\");\r\n\t\t\tthis.obj.deleteEvent(id);\r\n\t\t});\r\n\t};\r\n\r\n\t(function() {\r\n var _cloneObj = function(obj){\r\n if(obj === null || typeof(obj) != 'object')\r\n return obj;\r\n var temp = new obj.constructor();\r\n for(var key in obj)\r\n temp[key] = _cloneObj(obj[key]);\r\n return temp;\r\n };\r\n\r\n\t\tscheduler._dataprocessors = [];\r\n\t\tscheduler._layers_zindex = {};\r\n\t\tfor(var i=0; i= scheduler.config.collision_limit);\r\n\t});\r\n\r\n\tscheduler.addEvent=function(start_date,end_date,text,id,extra_data){\r\n\t\tvar ev=start_date;\r\n\t\tif (arguments.length!=1){\r\n\t\t\tev=extra_data||{};\r\n\t\t\tev.start_date=start_date;\r\n\t\t\tev.end_date=end_date;\r\n\t\t\tev.text=text;\r\n\t\t\tev.id=id;\r\n\t\t\tev.layer = this.defaultLayer;\r\n\t\t}\r\n\t\tev.id = ev.id||scheduler.uid();\r\n\t\tev.text = ev.text||\"\";\r\n\r\n\r\n\t\tif (typeof ev.start_date == \"string\") ev.start_date=this.templates.api_date(ev.start_date);\r\n\t\tif (typeof ev.end_date == \"string\") ev.end_date=this.templates.api_date(ev.end_date);\r\n\t\tev._timed=this.isOneDayEvent(ev);\r\n\r\n\t\tvar is_new=!this._events[ev.id];\r\n\t\tthis._events[ev.id]=ev;\r\n\t\tthis.event_updated(ev);\r\n\t\tif (!this._loading)\r\n\t\t\tthis.callEvent(is_new?\"onEventAdded\":\"onEventChanged\",[ev.id,ev]);\r\n\t};\r\n\r\n\tthis._evs_layer = {};\r\n\tfor (var i = 0; i < this.layers.length; i++) { // array in object for each layer\r\n\t\tthis._evs_layer[this.layers[i].name] = [];\r\n\t}\r\n\r\n\tscheduler.addEventNow=function(start,end,e){\r\n\t\tvar base = {};\r\n\t\tif (typeof start == \"object\"){\r\n\t\t\tbase = start;\r\n\t\t\tstart = null;\r\n\t\t}\r\n\r\n\t\tvar d = (this.config.event_duration||this.config.time_step)*60000;\r\n\t\tif (!start) start = Math.round((scheduler._currentDate()).valueOf()/d)*d;\r\n\t\tvar start_date = new Date(start);\r\n\t\tif (!end){\r\n\t\t\tvar start_hour = this.config.first_hour;\r\n\t\t\tif (start_hour > start_date.getHours()){\r\n\t\t\t\tstart_date.setHours(start_hour);\r\n\t\t\t\tstart = start_date.valueOf();\r\n\t\t\t}\r\n\t\t\tend = start+d;\r\n\t\t}\r\n\r\n\r\n\t\tbase.start_date = base.start_date||start_date;\r\n\t\tbase.end_date = base.end_date||new Date(end);\r\n\t\tbase.text = base.text||this.locale.labels.new_event;\r\n\t\tbase.id = this._drag_id = this.uid();\r\n\t\tbase.layer = this.defaultLayer;\r\n\t\tthis._drag_mode=\"new-size\";\r\n\r\n\t\tthis._loading=true;\r\n\t\tthis.addEvent(base);\r\n\t\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\t\tthis._loading=false;\r\n\r\n\t\tthis._drag_event={}; //dummy , to trigger correct event updating logic\r\n\t\tthis._on_mouse_up(e);\r\n\t};\r\n\r\n\tscheduler._t_render_view_data = function(events) { // helper\r\n\t\tif (this.config.multi_day && !this._table_view) {\r\n\t\t\tvar tvs = [];\r\n\t\t\tvar tvd = [];\r\n\t\t\tfor (var k = 0; k < events.length; k++) {\r\n\t\t\t\tif (events[k]._timed)\r\n\t\t\t\t\ttvs.push(events[k]);\r\n\t\t\t\telse\r\n\t\t\t\t\ttvd.push(events[k]);\r\n\t\t\t}\r\n\t\t\tthis._table_view = true;\r\n\t\t\tthis.render_data(tvd);\r\n\t\t\tthis._table_view = false;\r\n\t\t\tthis.render_data(tvs);\r\n\t\t}\r\n\t\telse\r\n\t\t\tthis.render_data(events);\r\n\t};\r\n\r\n\tscheduler.render_view_data = function(){\r\n\t\tif (this._not_render) {\r\n\t\t\tthis._render_wait = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._render_wait = false;\r\n\r\n\t\tthis.clear_view();\r\n\r\n\t\tthis._evs_layer = {};\r\n\t\tfor (var i = 0; i < this.layers.length; i++) { // array in object for each layer\r\n\t\t\tthis._evs_layer[this.layers[i].name] = [];\r\n\t\t}\r\n\r\n\t\tvar evs = this.get_visible_events();\r\n\t\tfor (var i = 0; i < evs.length; i++) { // filling layer arrays with events\r\n\t\t\tif(this._evs_layer[evs[i].layer])\r\n\t\t\t\tthis._evs_layer[evs[i].layer].push(evs[i]);\r\n\t\t}\r\n\r\n\t\tif(this._mode == 'month') { // old logic is used\r\n\t\t\tvar tevs = [];\r\n\t\t\tfor (var i = 0; i < this.layers.length; i++) {\r\n\t\t\t\tif (this.layers[i].visible)\r\n\t\t\t\t\ttevs = tevs.concat(this._evs_layer[this.layers[i].name]);\r\n\t\t\t}\r\n\t\t\tthis._t_render_view_data(tevs);\r\n\t\t}\r\n\t\telse { // week, day; should use new logic\r\n\t\t\tfor (var i = 0; i < this.layers.length; i++) {\r\n\t\t\t\tif (this.layers[i].visible) {\r\n\t\t\t\t\tvar evs_layer = this._evs_layer[this.layers[i].name];\r\n\t\t\t\t\tthis._t_render_view_data(evs_layer);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._render_v_bar=function(ev,x,y,w,h,style,contentA,contentB,bottom){\r\n\t\tvar id = ev.id;\r\n\r\n\t\tif(contentA.indexOf('
';\r\n\t\thtml+='
 
';\r\n\t\thtml+='
'+contentA+'
';\r\n\t\thtml+='
'+contentB+'
';\r\n\t\thtml+='
';\r\n\r\n\t\td.innerHTML=html;\r\n\t\td.style.zIndex = 100;\r\n\t\treturn d.firstChild;\r\n\t};\r\n\r\n\tscheduler.render_event_bar=function(ev){\r\n\t\tvar parent=this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tvar x=this._colsS[ev._sday];\r\n\t\tvar x2=this._colsS[ev._eday];\r\n\t\tif (x2==x) x2=this._colsS[ev._eday+1];\r\n\t\tvar hb = this.xy.bar_height;\r\n\r\n\t\tvar y=this._colsS.heights[ev._sweek]+(this._colsS.height?(this.xy.month_scale_height+2):2)+ev._sorder*hb;\r\n\r\n\t\tvar d=document.createElement(\"div\");\r\n\t\tvar cs = ev._timed?\"dhx_cal_event_clear\":\"dhx_cal_event_line\";\r\n\t\tvar cse = (scheduler.templates['event_class_'+ev.layer])?scheduler.templates['event_class_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_class(ev.start_date,ev.end_date,ev);\r\n\t\tif (cse) cs=cs+\" \"+cse;\r\n\r\n\t\tvar html='
';\r\n\r\n\t\tif (ev._timed)\r\n\t\t\thtml+=(scheduler.templates['event_bar_date_'+ev.layer])?scheduler.templates['event_bar_date_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_bar_date(ev.start_date,ev.end_date,ev);\r\n\t\thtml+=( (scheduler.templates['event_bar_text_'+ev.layer])?scheduler.templates['event_bar_text_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_bar_text(ev.start_date,ev.end_date,ev) + '
)');\r\n\t\thtml+='
';\r\n\r\n\t\td.innerHTML=html;\r\n\r\n\t\tthis._rendered.push(d.firstChild);\r\n\t\tparent.appendChild(d.firstChild);\r\n\t};\r\n\r\n\tscheduler.render_event=function(ev){\r\n\t\tvar menu = scheduler.xy.menu_width;\r\n\t\tif(scheduler.getLayer(ev.layer).noMenu)\r\n\t\t\tmenu = 0;\r\n\r\n\t\tif (ev._sday<0) return; //can occur in case of recurring event during time shift\r\n\t\tvar parent=scheduler.locate_holder(ev._sday);\r\n\t\tif (!parent) return; //attempt to render non-visible event\r\n\t\tvar sm = ev.start_date.getHours()*60+ev.start_date.getMinutes();\r\n\t\tvar em = (ev.end_date.getHours()*60+ev.end_date.getMinutes())||(scheduler.config.last_hour*60);\r\n\r\n\t\tvar top = (Math.round((sm*60*1000-this.config.first_hour*60*60*1000)*this.config.hour_size_px/(60*60*1000)))%(this.config.hour_size_px*24)+1; //42px/hour\r\n\t\tvar height = Math.max(scheduler.xy.min_event_height,(em-sm)*this.config.hour_size_px/60)+1; //42px/hour\r\n\t\t\r\n\t\tvar width=Math.floor((parent.clientWidth-menu)/ev._count);\r\n\t\tvar left=ev._sorder*width+1;\r\n\t\tif (!ev._inner) width=width*(ev._count-ev._sorder);\r\n\r\n\r\n\r\n\t\tvar d=this._render_v_bar(ev.id,menu+left,top,width,height,ev._text_style,scheduler.templates.event_header(ev.start_date,ev.end_date,ev),scheduler.templates.event_text(ev.start_date,ev.end_date,ev));\r\n\r\n\t\tthis._rendered.push(d);\r\n\t\tparent.appendChild(d);\r\n\r\n\t\tleft=left+parseInt(parent.style.left,10)+menu;\r\n\r\n\t\ttop+=this._dy_shift; //corrupt top, to include possible multi-day shift\r\n\t\td.style.zIndex = this._layers_zindex[ev.layer];\r\n\r\n\t\tif (this._edit_id==ev.id){\r\n\t\t\td.style.zIndex = parseInt(d.style.zIndex)+1; //fix overlapping issue\r\n\t\t\tvar new_zIndex = d.style.zIndex;\r\n\t\t\twidth=Math.max(width-4,scheduler.xy.editor_width);\r\n\t\t\tvar d=document.createElement(\"div\");\r\n\t\t\td.setAttribute(\"event_id\",ev.id); // for backward compatibility\r\n\t\t\td.setAttribute(this.config.event_attribute,ev.id);\r\n\t\t\tthis.set_xy(d,width,height-20,left,top+14);\r\n\t\t\td.className=\"dhx_cal_editor\";\r\n\t\t\td.style.zIndex = new_zIndex;\r\n\t\t\tvar d2=document.createElement(\"div\");\r\n\t\t\tthis.set_xy(d2,width-6,height-26);\r\n\t\t\td2.style.cssText+=\";margin:2px 2px 2px 2px;overflow:hidden;\";\r\n\r\n\r\n\t\t\td2.style.zIndex = new_zIndex;\r\n\t\t\td.appendChild(d2);\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].appendChild(d);\r\n\t\t\tthis._rendered.push(d);\r\n\r\n\t\t\td2.innerHTML=\"\";\r\n\r\n\t\t\tthis._editor=d2.firstChild;\r\n\t\t\tthis._editor.addEventListener(\"keypress\", function(e){\r\n\t\t\t\tif (e.shiftKey) return true;\r\n\t\t\t\tvar code= e.keyCode;\r\n\t\t\t\tif (code==scheduler.keys.edit_save) scheduler.editStop(true);\r\n\t\t\t\tif (code==scheduler.keys.edit_cancel) scheduler.editStop(false);\r\n\t\t\t});\r\n\t\t\tthis._editor.addEventListener(\"selectstart\", function(e){ e.cancelBubble=true; return true; });\r\n\t\t\td2.firstChild.focus();\r\n\t\t\t//IE and opera can add x-scroll during focusing\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].scrollLeft=0;\r\n\t\t\td2.firstChild.select();\r\n\t\t}\r\n\t\tif (this._select_id==ev.id){\r\n\t\t\td.style.zIndex = parseInt(d.style.zIndex)+1; //fix overlapping issue\r\n\t\t\tvar icons=this.config[\"icons_\"+((this._edit_id==ev.id)?\"edit\":\"select\")];\r\n\t\t\tvar icons_str=\"\";\r\n\t\t\tfor (var i=0; i
\";\r\n\t\t\tvar obj = this._render_v_bar(ev.id,left-menu+1,top,menu,icons.length*20+26,\"\",\"
\",icons_str,true);\r\n\t\t\tobj.style.left=left-menu+1;\r\n\t\t\tobj.style.zIndex = d.style.zIndex;\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].appendChild(obj);\r\n\t\t\tthis._rendered.push(obj);\r\n\t\t}\r\n\r\n\t};\r\n\r\n scheduler.filter_agenda = function(id, event) {\r\n var layer = scheduler.getLayer(event.layer);\r\n return (layer && layer.visible);\r\n };\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.limit_start = null;\r\nscheduler.config.limit_end = null;\r\nscheduler.config.limit_view = false;\r\nscheduler.config.check_limits = true;\r\nscheduler.config.mark_now = true;\r\nscheduler.config.display_marked_timespans = true;\r\nscheduler.config.overwrite_marked_timespans = true;\r\nscheduler._temp_limit_scope = function(){\r\n\tvar before = null;\r\n\tvar dhx_time_block = \"dhx_time_block\";\r\n\tvar default_timespan_type = \"default\";\r\n\tvar fix_options = function(options, days, zones) {\r\n\t\tif (days instanceof Date && zones instanceof Date) {\r\n\t\t\toptions.start_date = days;\r\n\t\t\toptions.end_date = zones;\r\n\t\t} else {\r\n\t\t\toptions.days = days;\r\n\t\t\toptions.zones = zones;\r\n\t\t}\r\n\t\treturn options;\r\n\t};\r\n\tvar get_resulting_options = function(days, zones, sections) {\r\n\t\tvar options = (typeof days == \"object\") ? days : { days: days };\r\n\t\toptions.type = dhx_time_block;\r\n\t\toptions.css = \"\";\r\n\t\tif (zones) {\r\n\t\t\tif (sections)\r\n\t\t\t\toptions.sections = sections;\r\n\t\t\toptions = fix_options(options, days, zones);\r\n\t\t}\r\n\t\treturn options;\r\n\t};\r\n\tscheduler.blockTime = function(days, zones, sections){\r\n\t\tvar options = get_resulting_options(days, zones, sections);\r\n\t\treturn scheduler.addMarkedTimespan(options);\r\n\t};\r\n\tscheduler.unblockTime = function(days, zones, sections) {\r\n\t\tzones = zones || \"fullday\";\r\n\t\tvar options = get_resulting_options(days, zones, sections);\r\n\t\treturn scheduler.deleteMarkedTimespan(options);\r\n\t};\r\n\tscheduler.attachEvent(\"onBeforeViewChange\",function(om,od,nm,nd){\r\n\r\n\t\tfunction isBlocked(date, mode){\r\n\t\t\tvar limit_start = scheduler.config.limit_start,\r\n\t\t\t\tlimit_end = scheduler.config.limit_end,\r\n\t\t\t\tdate_end = scheduler.date.add(date,1,mode);\r\n\r\n\t\t\treturn (date.valueOf() > limit_end.valueOf() || date_end <= limit_start.valueOf());\r\n\t\t}\r\n\r\n\t\tif (scheduler.config.limit_view){\r\n\t\t\tnd = nd||od; nm = nm||om;\r\n\t\t\tif (isBlocked(nd, nm) && !(od.valueOf() == nd.valueOf())){\r\n\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvar resetDate = !isBlocked(od, nm) ? od : scheduler.config.limit_start;\r\n\r\n\t\t\t\t\tscheduler.setCurrentView(!isBlocked(resetDate, nm) ? resetDate : null, nm);\r\n\t\t\t\t},1);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.checkInMarkedTimespan = function(ev, timespan_type, on_overlap){\r\n\t\ttimespan_type = timespan_type || default_timespan_type;\r\n\r\n\t\tvar res = true;\r\n\t\tvar temp_start_date = new Date(ev.start_date.valueOf());\r\n\t\tvar temp_end_date = scheduler.date.add(temp_start_date, 1, \"day\");\r\n\t\tvar timespans = scheduler._marked_timespans;\r\n\t\tfor (; temp_start_date < ev.end_date; temp_start_date = scheduler.date.date_part(temp_end_date), temp_end_date = scheduler.date.add(temp_start_date, 1, \"day\") ) {\r\n\t\t\tvar day_value = +scheduler.date.date_part( new Date(temp_start_date) ); // the first part of event not necessarily contains only date part\r\n\t\t\tvar day_index = temp_start_date.getDay();\r\n\r\n\t\t\tvar zones = getZones(ev, timespans, day_index, day_value, timespan_type);\r\n\t\t\tif (zones){\r\n\t\t\t\tfor (var i = 0; i < zones.length; i+=2) {\r\n\r\n\t\t\t\t\t// they may change for new event if it passes limit zone\r\n\t\t\t\t\tvar eventStart = scheduler._get_zone_minutes(temp_start_date);\r\n\t\t\t\t\tvar eventEnd = ( ev.end_date>temp_end_date || ev.end_date.getDate() != temp_start_date.getDate() ) ? 1440 : scheduler._get_zone_minutes(ev.end_date);\r\n\r\n\t\t\t\t\tvar markerStart = zones[i];\r\n\t\t\t\t\tvar markerEnd = zones[i+1];\r\n\t\t\t\t\tif (markerStarteventStart) {\r\n\t\t\t\t\t\tif(typeof on_overlap == \"function\"){\r\n\t\t\t\t\t\t\t//handler allows to cancel overlapping\r\n\t\t\t\t\t\t\t//actually needed only to keep default behavior of limits\r\n\t\t\t\t\t\t\tres = on_overlap(ev, eventStart, eventEnd, markerStart, markerEnd);//event object, event start/end minutes in 'zones' format, zone start/end minutes\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tres = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(!res)\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn !res;\r\n\t};\r\n\tvar blocker = scheduler.checkLimitViolation = function(event){\r\n\t\tif(!event)\r\n\t\t\treturn true;\r\n\t\tif (!scheduler.config.check_limits)\r\n\t\t\treturn true;\r\n\t\tvar s = scheduler;\r\n\t\tvar c = s.config;\r\n\t\tvar evs = [];\r\n\t\tif (event.rec_type) {\r\n\t\t\tvar dates = scheduler.getRecDates(event);\r\n\t\t\tfor(var i=0; i < dates.length; i++){\r\n\t\t\t\tvar ev = scheduler._copy_event(event);\r\n\t\t\t\tscheduler._lame_copy(ev, dates[i]);\r\n\t\t\t\tevs.push(ev);\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\tevs = [event];\r\n\t\t}\r\n\r\n\t\tvar complete_res = true;\r\n\t\tfor (var p=0; p= c.limit_start.valueOf() && ev.end_date.valueOf() <= c.limit_end.valueOf()) : true;\r\n\t\t\tif (res){\r\n\t\t\t\tres = !scheduler.checkInMarkedTimespan(ev, dhx_time_block, function(event, eventStart, eventEnd, markerStart, markerEnd){\r\n\t\t\t\t\t//try crop event to allow placing\r\n\t\t\t\t\tvar allow = true;\r\n\t\t\t\t\tif (eventStart<=markerEnd && eventStart >= markerStart){\r\n\t\t\t\t\t\tif (markerEnd == 24*60 || eventEnd <= markerEnd){\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(event._timed && s._drag_id && s._drag_mode == \"new-size\"){\r\n\t\t\t\t\t\t\tevent.start_date.setHours(0);\r\n\t\t\t\t\t\t\tevent.start_date.setMinutes(markerEnd);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ((eventEnd >= markerStart && eventEnd <= markerEnd) || (eventStart < markerStart && eventEnd > markerEnd)){\r\n\t\t\t\t\t\tif(event._timed && s._drag_id && s._drag_mode == \"new-size\"){\r\n\t\t\t\t\t\t\tevent.end_date.setHours(0);\r\n\t\t\t\t\t\t\tevent.end_date.setMinutes(markerStart);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn allow;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\tif (!res) {\r\n\t\t\t\tres = (s.checkEvent(\"onLimitViolation\")) ? s.callEvent(\"onLimitViolation\",[ev.id, ev]) : res;\r\n\t\t\t}\r\n\t\t\tcomplete_res = complete_res && res;\r\n\t\t}\r\n\t\tif(!complete_res){\r\n\t\t\ts._drag_id = null;\r\n\t\t\ts._drag_mode = null;\r\n\t\t}\r\n\t\treturn complete_res;\r\n\r\n\r\n\t};\r\n\tscheduler._get_blocked_zones = function(timespans, property, day_index, day_value, timespan_type){\r\n\t\tvar zones =[];\r\n\t\tif (timespans && timespans[property]) {\r\n\t\t\tvar timeline_zones = timespans[property];\r\n\t\t\tvar blocked_timeline_zones = this._get_relevant_blocked_zones(day_index, day_value, timeline_zones, timespan_type);\r\n\t\t\tfor (var i=0; i= scheduler.config.limit_end.valueOf()) {\r\n\t\t\t\tev.start_date = this.date.add(scheduler.config.limit_end, -1, \"day\");\r\n\t\t\t}\r\n\t\t\tif (ev.end_date < scheduler.config.limit_start) {\r\n\t\t\t\tev.end_date = new Date(scheduler.config.limit_start);\r\n\t\t\t}\r\n\t\t\tif (ev.end_date.valueOf() >= scheduler.config.limit_end.valueOf()) {\r\n\t\t\t\tev.end_date = this.date.add(scheduler.config.limit_end, -1, \"day\");\r\n\t\t\t}\r\n\t\t\tif (ev.start_date.valueOf() >= ev.end_date.valueOf()) {\r\n\t\t\t\tev.end_date = this.date.add(ev.start_date, (this.config.event_duration||this.config.time_step), \"minute\");\r\n\t\t\t}\r\n\t\t\tev._timed=this.isOneDayEvent(ev);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventChanged\",function(id){\r\n\t\tif (!id) return true;\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tif (!blocker(ev)){\r\n\t\t\tif (!before) return false;\r\n\t\t\tev.start_date = before[0];\r\n\t\t\tev.end_date = before[1];\r\n\t\t\tev._timed=this.isOneDayEvent(ev);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onBeforeEventChanged\",function(ev, native_object, is_new){\r\n\t\treturn blocker(ev);\r\n\t});\r\n\tscheduler.attachEvent(\"onBeforeEventCreated\", function(ev) { // native event\r\n\t\tvar start_date = scheduler.getActionData(ev).date;\r\n\t\tvar event = {\r\n\t\t\t_timed: true,\r\n\t\t\tstart_date: start_date,\r\n\t\t\tend_date: scheduler.date.add(start_date, scheduler.config.time_step, \"minute\")\r\n\t\t};\r\n\t\treturn blocker(event);\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", function(){\r\n\t\tscheduler._mark_now();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onAfterSchedulerResize\", function(){\r\n\t\twindow.setTimeout(function(){ \r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler._mark_now(); \r\n\t\t}, 1);\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\t\tscheduler._mark_now_timer = window.setInterval(function() {\r\n\t\t\tif(!scheduler._is_initialized())\r\n\t\t\t\treturn;\r\n\t\t\tscheduler._mark_now();\r\n\t\t}, 60000);\r\n\t});\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tclearInterval(scheduler._mark_now_timer);\r\n\t});\r\n\tscheduler._mark_now = function(hide) {\r\n\t\t// day, week, units views\r\n\t\tvar dhx_now_time = 'dhx_now_time';\r\n\t\tif (!this._els[dhx_now_time]) {\r\n\t\t\tthis._els[dhx_now_time] = [];\r\n\t\t}\r\n\t\tvar now = scheduler._currentDate();\r\n\t\tvar cfg = this.config;\r\n\t\tscheduler._remove_mark_now(); // delete previous marks if they exist\r\n\t\tif (!hide && cfg.mark_now && now < this._max_date && now > this._min_date && now.getHours() >= cfg.first_hour && now.getHours() 1) {\r\n\t\t\t\t\tif(view.size && view.options.length){\r\n\t\t\t\t\t\tday_index = ((view.position+ day_index) / view.options.length) * view.size;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstart_index = day_index;\r\n\t\t\t\t\tend_index = day_index + units_l;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tstart_index = 0;\r\n\t\t\t\t\tend_index = start_index + units_l;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar r_divs = [];\r\n\r\n\t\t\t\tfor (var i = start_index; i < end_index; i++) {\r\n\t\t\t\t\tvar t_day = i; // as each unit is actually considered +1 day\r\n\t\t\t\t\toptions.days = t_day;\r\n\t\t\t\t\tvar t_div = scheduler._render_marked_timespan(options, null, t_day)[0];\r\n\t\t\t\t\tr_divs.push(t_div);\r\n\t\t\t\t}\r\n\t\t\t\treturn r_divs;\r\n\t\t\t} else { // day/week views\r\n\t\t\t\toptions.days = day_index;\r\n\t\t\t\treturn scheduler._render_marked_timespan(options, null, day_index);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\toptions.days = +scheduler.date.date_part(now);\r\n\t\t\t\treturn scheduler._render_marked_timespan(options, null, null);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\tscheduler._remove_mark_now = function() {\r\n\t\tvar dhx_now_time = 'dhx_now_time';\r\n\t\tvar els = this._els[dhx_now_time];\r\n\t\tfor (var i=0; i config.start_date) || (config.days !== undefined && config.zones)) && !config.type )\r\n\t\t\treturn r_configs; // incorrect config was provided\r\n\r\n\t\tvar min = 0;\r\n\t\tvar max = 24*60;\r\n\t\tif (config.zones == \"fullday\")\r\n\t\t\tconfig.zones = [min, max];\r\n\t\tif (config.zones && config.invert_zones) {\r\n\t\t\tconfig.zones = scheduler.invertZones(config.zones);\r\n\t\t}\r\n\r\n\t\tconfig.id = scheduler.uid();\r\n\t\tconfig.css = config.css||\"\";\r\n\t\tconfig.type = config.type||default_timespan_type;\r\n\r\n\t\tvar sections = config.sections;\r\n\t\tif (sections) {\r\n\t\t\tfor (var view_key in sections) {\r\n\t\t\t\tif (sections.hasOwnProperty(view_key)) {\r\n\t\t\t\t\tvar ids = sections[view_key];\r\n\t\t\t\t\tif (!(ids instanceof Array))\r\n\t\t\t\t\t\tids = [ids];\r\n\t\t\t\t\tfor (var i=0; i t_sd) ? scheduler._get_zone_minutes(start_date) : min;\r\n\t\t\t\t\tvar zone_end = ( end_date > t_ed || end_date.getDate() != t_sd.getDate() ) ? max : scheduler._get_zone_minutes(end_date);\r\n\t\t\t\t\tt_config.zones = [zone_start, zone_end];\r\n\t\t\t\t\tr_configs.push(t_config);\r\n\r\n\t\t\t\t\tt_sd = t_ed;\r\n\t\t\t\t\tt_ed = scheduler.date.add(t_ed, 1, \"day\");\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (c_config.days instanceof Date)\r\n\t\t\t\t\tc_config.days = (scheduler.date.date_part(c_config.days)).valueOf();\r\n\t\t\t\tc_config.zones = config.zones.slice();\r\n\t\t\t\tr_configs.push(c_config);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn r_configs;\r\n\t};\r\n\tscheduler._get_dates_by_index = function(index, start, end) {\r\n\t\tvar dates = [];\r\n\t\tstart = scheduler.date.date_part(new Date(start||scheduler._min_date));\r\n\t\tend = new Date(end||scheduler._max_date);\r\n\t\tvar start_day = start.getDay();\r\n\t\tvar delta = (index-start_day >= 0) ? (index-start_day) : (7-start.getDay()+index);\r\n\t\tvar t_date = scheduler.date.add(start, delta, \"day\");\r\n\t\tfor (; t_date < end; t_date = scheduler.date.add(t_date, 1, \"week\")) {\r\n\t\t\tdates.push(t_date);\r\n\t\t}\r\n\t\treturn dates;\r\n\t};\r\n\tscheduler._get_css_classes_by_config = function(config) {\r\n\t\tvar css_classes = [];\r\n\t\tif (config.type == dhx_time_block) {\r\n\t\t\tcss_classes.push(dhx_time_block);\r\n\t\t\tif (config.css)\r\n\t\t\t\tcss_classes.push(dhx_time_block+\"_reset\");\r\n\t\t}\r\n\t\tcss_classes.push(\"dhx_marked_timespan\", config.css);\r\n\t\treturn css_classes.join(\" \");\r\n\t};\r\n\tscheduler._get_block_by_config = function(config) {\r\n\t\tvar block = document.createElement(\"div\");\r\n\t\tif (config.html) {\r\n\t\t\tif (typeof config.html == \"string\")\r\n\t\t\t\tblock.innerHTML = config.html;\r\n\t\t\telse\r\n\t\t\t\tblock.appendChild(config.html);\r\n\t\t}\r\n\t\treturn block;\r\n\t};\r\n\tscheduler._render_marked_timespan = function(options, area, day) {\r\n\t\tvar blocks = []; // resulting block which will be rendered and returned\r\n\t\tvar c = scheduler.config;\r\n\t\tvar min_date = this._min_date;\r\n\t\tvar max_date = this._max_date;\r\n\t\tvar day_value = false; // if timespan for specific date should be displayed\r\n\r\n\t\tif (!c.display_marked_timespans)\r\n\t\t\treturn blocks;\r\n\r\n\t\t// in case of markTimespan\r\n\t\tif (!day && day !== 0) {\r\n\t\t\tif (options.days < 7)\r\n\t\t\t\tday = options.days;\r\n\t\t\telse {\r\n\t\t\t\tvar date_to_display = new Date(options.days);\r\n\t\t\t\tday_value = +date_to_display;\r\n\r\n\t\t\t\t// in case of markTimespan date could be not in the viewing range, need to return\r\n\t\t\t\tif ( !(+max_date > +date_to_display && +min_date <= +date_to_display) )\r\n\t\t\t\t\treturn blocks;\r\n\r\n\t\t\t\tday = date_to_display.getDay();\r\n\t\t\t}\r\n\r\n\t\t\t// convert day default index (Sun - 0, Sat - 6) to index of hourscales (depends on week_start and config.start_on_monday)\r\n\t\t\tvar min_day = min_date.getDay();\r\n\t\t\tif (min_day > day) {\r\n\t\t\t\tday = 7 - (min_day-day);\r\n\t\t\t} else {\r\n\t\t\t\tday = day - min_day;\r\n\t\t\t}\r\n\t\t}\r\n\t\tvar zones = options.zones;\r\n\t\tvar css_classes = scheduler._get_css_classes_by_config(options);\r\n\r\n\t\tif (scheduler._table_view && scheduler._mode == \"month\") {\r\n\t\t\tvar areas = [];\r\n\t\t\tvar days = [];\r\n\r\n\r\n\t\t\tif (!area) {\r\n\t\t\t\tdays = (day_value) ? [day_value] : scheduler._get_dates_by_index(day);\r\n\t\t\t\tfor (var i=0; i < days.length; i++) {\r\n\t\t\t\t\tareas.push( this._scales[days[i]] );\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tareas.push(area);\r\n\t\t\t\tdays.push(day);\r\n\t\t\t}\r\n\r\n\t\t\tfor (var i=0; i < areas.length; i++) {\r\n\t\t\t\tarea = areas[i];\r\n\t\t\t\tday = days[i];\r\n\r\n\t\t\t\tvar sday = this.locate_holder_day(day, false) % this._cols.length;\r\n\r\n\t\t\t\tif(this._ignores[sday]) continue;\r\n\r\n\t\t\t\tvar block_proto = scheduler._get_block_by_config(options);\r\n\t\t\t\tblock_proto.className = css_classes;\r\n\t\t\t\tblock_proto.style.top = \"0px\";\r\n\t\t\t\tblock_proto.style.height = \"100%\";\r\n\t\t\t\t\r\n\t\t\t\tfor (var k=0; k < zones.length; k+=2) {\r\n\t\t\t\t\tvar start = zones[i];\r\n\t\t\t\t\tvar end = zones[i+1];\r\n\t\t\t\t\tif (end <= start)\r\n\t\t\t\t\t\treturn [];\r\n\r\n\t\t\t\t\tvar block = block_proto.cloneNode(true);\r\n\r\n\t\t\t\t\tblock.style.left = \"0px\";\r\n\t\t\t\t\tblock.style.width = \"100%\";\r\n\r\n\t\t\t\t\tarea.appendChild(block);\r\n\t\t\t\t\tblocks.push(block);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tvar index = day;\r\n\r\n\t\t\tif(this._ignores[this.locate_holder_day(day, false)]) return blocks;\r\n\r\n\t\t\tif (this._props && this._props[this._mode] && options.sections && options.sections[this._mode]) {\r\n\t\t\t\tvar view = this._props[this._mode];\r\n\t\t\t\tindex = view.order[options.sections[this._mode]];\r\n\r\n\t\t\t\tvar inner_index = view.order[options.sections[this._mode]];\r\n\t\t\t\tif(!(view.days > 1)){\r\n\t\t\t\t\tindex = inner_index;\r\n\t\t\t\t\tif (view.size && (index > view.position+view.size)) {\r\n\t\t\t\t\t\tindex = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar units_l = view.size || view.options.length;\r\n\t\t\t\t\tindex = index*units_l + inner_index;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tarea = area ? area : scheduler.locate_holder(index);\r\n\r\n\t\t\tfor (var i = 0; i < zones.length; i+=2){\r\n\t\t\t\tvar start = Math.max(zones[i], c.first_hour*60);\r\n\t\t\t\tvar end = Math.min(zones[i+1], c.last_hour*60);\r\n\t\t\t\tif (end <= start) {\r\n\t\t\t\t\tif (i+2 < zones.length)\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\treturn [];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar block = scheduler._get_block_by_config(options);\r\n\t\t\t\tblock.className = css_classes;\r\n\r\n\t\t\t\t// +1 for working with section which really takes up whole height (as % would be == 0)\r\n\t\t\t\tvar all_hours_height = this.config.hour_size_px*24 + 1;\r\n\t\t\t\tvar hour_ms = 60*60*1000;\r\n\t\t\t\tblock.style.top = (Math.round((start*60*1000-this.config.first_hour*hour_ms)*this.config.hour_size_px/hour_ms) % all_hours_height) + \"px\";\r\n\t\t\t\tblock.style.height = Math.max((Math.round(((end-start)*60*1000)*this.config.hour_size_px/hour_ms)) % all_hours_height, 1)+\"px\";\r\n\r\n\t\t\t\tarea.appendChild(block);\r\n\t\t\t\tblocks.push(block);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn blocks;\r\n\t};\r\n\r\n\tscheduler._mark_timespans = function(){\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\t\tvar divs = [];\r\n\t\tif (scheduler._table_view && scheduler._mode == \"month\"){\r\n\t\t\tfor (var day in this._scales) {\r\n\t\t\t\tvar date = new Date(+day);\r\n\t\t\t\tdivs.push.apply(divs, scheduler._on_scale_add_marker(this._scales[day],date));\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\t//manually trigger rendering of configs for each column\r\n\t\t\tvar date = new Date(scheduler._min_date);\r\n\t\t\tfor (var i = 0, len = data.childNodes.length; i < len; i++) {\r\n\t\t\t\tvar area = data.childNodes[i];\r\n\t\t\t\tif (area.firstChild && scheduler._getClassName(area.firstChild).indexOf(\"dhx_scale_hour\") > -1) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdivs.push.apply(divs, scheduler._on_scale_add_marker(area, date));\r\n\t\t\t\tdate = scheduler.date.add(date, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn divs;\r\n\t};\r\n\r\n\t// just marks timespan, will be cleaned after refresh\r\n\tscheduler.markTimespan = function(configuration) {\r\n\r\n\t\tif(!this._els){\r\n\t\t\tthrow new Error(\"`scheduler.markTimespan` can't be used before scheduler initialization. Place `scheduler.markTimespan` call after `scheduler.init`.\");\r\n\t\t}\r\n\r\n\t\tvar rebuild_els = false;\r\n\t\tif(!this._els[\"dhx_cal_data\"]){\r\n\t\t\tscheduler.get_elements();\r\n\t\t\trebuild_els = true;\r\n\t\t}\r\n\r\n\r\n\t\t// backup regular marked timespans\r\n\t\tvar timespans_ids = scheduler._marked_timespans_ids,\r\n\t\t\ttimespan_types = scheduler._marked_timespans_types,\r\n\t\t\ttimespans = scheduler._marked_timespans;\r\n\r\n\t\tscheduler.deleteMarkedTimespan();\r\n\r\n\t\t//add block to configs\r\n\t\tscheduler.addMarkedTimespan(configuration);\r\n\r\n\t\tvar divs = scheduler._mark_timespans();\r\n\r\n\t\tif(rebuild_els)\r\n\t\t\tscheduler._els = [];\r\n\r\n\t\t// restore timespan config\r\n\t\tscheduler._marked_timespans_ids = timespans_ids;\r\n\t\tscheduler._marked_timespans_types = timespan_types;\r\n\t\tscheduler._marked_timespans = timespans;\r\n\r\n\t\treturn divs;\r\n\t};\r\n\tscheduler.unmarkTimespan = function(divs) {\r\n\t\tif (!divs)\r\n\t\t\treturn;\r\n\t\tfor (var i=0; i c_zone_end && zone_start <= c_zone_end) || (zone_start < c_zone_start && zone_end >= c_zone_start)) {\r\n\t\t\t\t\tresulting_zones[i] = Math.min(c_zone_start, zone_start);\r\n\t\t\t\t\tresulting_zones[i+1] = Math.max(c_zone_end, zone_end);\r\n\t\t\t\t\ti -= 2;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (!isLast) // do nothing, maybe next current zone will match or will be last\r\n\t\t\t\t\t\tcontinue;\r\n\r\n\t\t\t\t\tvar offset = (c_zone_start > zone_start)?0:2;\r\n\t\t\t\t\tresulting_zones.splice(i+offset, 0, zone_start, zone_end); // last current zone, need to add another\r\n\t\t\t\t}\r\n\t\t\t\tzones.splice(k--,2); // zone was merged or added, need to exclude it\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn resulting_zones;\r\n\t};\r\n\tscheduler._subtract_timespan_zones = function(current_zones, zones) {\r\n\t\tvar resulting_zones = current_zones.slice();\r\n\t\tfor (var i=0; i c_zone_start && zone_start < c_zone_end) {\r\n\t\t\t\t\tvar is_modified = false;\r\n\t\t\t\t\tif (c_zone_start >= zone_start && c_zone_end <= zone_end) {\r\n\t\t\t\t\t\tresulting_zones.splice(i, 2);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (c_zone_start < zone_start) {\r\n\t\t\t\t\t\tresulting_zones.splice(i, 2, c_zone_start, zone_start);\r\n\t\t\t\t\t\tis_modified = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (c_zone_end > zone_end) {\r\n\t\t\t\t\t\tresulting_zones.splice( (is_modified)?(i+2):i, (is_modified)?0:2, zone_end, c_zone_end);\r\n\t\t\t\t\t}\r\n\t\t\t\t\ti -= 2;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn resulting_zones;\r\n\t};\r\n\tscheduler.invertZones = function(zones) {\r\n\t\treturn scheduler._subtract_timespan_zones([0, 1440], zones.slice());\r\n\t};\r\n\tscheduler._delete_marked_timespan_by_id = function(id) {\r\n\t\tvar configs = scheduler._marked_timespans_ids[id];\r\n\t\tif (configs) {\r\n\t\t\tfor (var i=0; i 1)){\r\n\t\t\t\tday = scheduler.date.date_part(new Date(this._date)); // for units view actually only 1 day is displayed yet the day variable will change, need to use this._date for all calls\r\n\t\t\t}else{\r\n\t\t\t\tvar dx = 24*60*60*1000;\r\n\t\t\t\tvar day_ind = Math.round((day - scheduler._min_date)/dx);\r\n\t\t\t\tvar unitsPerDay = view.size || units.length;\r\n\t\t\t\tday = scheduler.date.add(scheduler._min_date, Math.floor(day_ind/unitsPerDay), \"day\"); // to the \"same\" day for all sections\r\n\t\t\t\tday = scheduler.date.date_part(day);\r\n\t\t\t}\r\n\t\t\tday_index = day.getDay();\r\n\t\t\tday_value = day.valueOf();\r\n\r\n\t\t\tif (timespans[mode] && timespans[mode][unit.key]) {\r\n\t\t\t\tvar unit_zones = timespans[mode][unit.key];\r\n\t\t\t\tvar unit_types = scheduler._get_types_to_render(unit_zones[day_index], unit_zones[day_value]);\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(unit_types));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar global_data = timespans[\"global\"];\r\n\r\n\t\tif(scheduler.config.overwrite_marked_timespans){\r\n\t\t\tvar day_types = global_data[day_value]||global_data[day_index];\r\n\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(day_types));\r\n\t\t} else {\r\n\t\t\tif(global_data[day_value]){\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(global_data[day_value]));\r\n\t\t\t}\r\n\t\t\tif(global_data[day_index]){\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(global_data[day_index]));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (var i=0; i\" + ev.text + \"

\" + (ev.event_location || '') + \"

\" + scheduler.templates.marker_date(start) + \" - \" + scheduler.templates.marker_date(end) + \"
\";\r\n};\r\nscheduler.dblclick_dhx_map_area = function() {\r\n\tif (!this.config.readonly && this.config.dblclick_create)\r\n\t\tthis.addEventNow({\r\n\t\t\tstart_date: scheduler._date,\r\n\t\t\tend_date: scheduler.date.add(scheduler._date, scheduler.config.time_step, \"minute\")\r\n\t\t});\r\n};\r\nscheduler.templates.map_time = function(start, end, ev) {\r\n\tif (scheduler.config.rtl && !ev._timed) {\r\n\t\treturn scheduler.templates.day_date(end) + \" – \" + scheduler.templates.day_date(start);\r\n\t} else if (ev._timed) {\r\n\t\treturn this.day_date(ev.start_date, ev.end_date, ev) + \" \" + this.event_date(start);\r\n\t} else {\r\n\t\treturn scheduler.templates.day_date(start) + \" – \" + scheduler.templates.day_date(end);\r\n\t}\r\n};\r\nscheduler.templates.map_text = function(start, end, ev) {\r\n\treturn ev.text;\r\n};\r\n\r\nscheduler.date.map_start = function(d) {\r\n\treturn d;\r\n};\r\nscheduler.date.add_map = function(date, inc, mode) {\r\n\treturn (new Date(date.valueOf()));\r\n};\r\n\r\nscheduler.templates.map_date = function(dd, ed, mode) {\r\n\treturn '';\r\n};\r\n\r\nscheduler._latLngUpdate = false; // flag for not displaying event second time in case of coordinates update\r\n\r\nscheduler.attachEvent(\"onSchedulerReady\", function() {\r\n\tscheduler._isMapPositionSet = false; // if user actual (geolocation) position was set on the map\r\n\r\n\tconst gmap = document.createElement('div');\r\n\tgmap.className = 'dhx_map';\r\n\tgmap.id = 'dhx_gmap';\r\n\tgmap.style.display = \"none\";\r\n\r\n\tscheduler._obj.appendChild(gmap);\r\n\r\n\tscheduler._els.dhx_gmap = [];\r\n\tscheduler._els.dhx_gmap.push(gmap);\r\n\r\n\t_setMapSize('dhx_gmap');\r\n\r\n\tconst mapOptions = {\r\n\t\tzoom: scheduler.config.map_initial_zoom || 10,\r\n\t\tcenter: scheduler.config.map_initial_position,\r\n\t\tmapTypeId: scheduler.config.map_type || google.maps.MapTypeId.ROADMAP\r\n\t};\r\n\tconst map = new google.maps.Map(document.getElementById('dhx_gmap'), mapOptions);\r\n\tmap.disableDefaultUI = false;\r\n\tmap.disableDoubleClickZoom = !scheduler.config.readonly;\r\n\r\n\tgoogle.maps.event.addListener(map, \"dblclick\", function(event) {\r\n\t\tconst geocoder = scheduler.ext.mapView.geocoder;\r\n\r\n\t\tif (!scheduler.config.readonly && scheduler.config.dblclick_create) {\r\n\t\t\tvar point = event.latLng;\r\n\t\t\tgeocoder.geocode(\r\n\t\t\t\t{ 'latLng': point },\r\n\t\t\t\tfunction(results, status) {\r\n\t\t\t\t\tif (status == google.maps.GeocoderStatus.OK) {\r\n\t\t\t\t\t\tpoint = results[0].geometry.location;\r\n\t\t\t\t\t\tscheduler.addEventNow({\r\n\t\t\t\t\t\t\tlat: point.lat(),\r\n\t\t\t\t\t\t\tlng: point.lng(),\r\n\t\t\t\t\t\t\tevent_location: results[0].formatted_address,\r\n\t\t\t\t\t\t\tstart_date: scheduler._date,\r\n\t\t\t\t\t\t\tend_date: scheduler.date.add(scheduler._date, scheduler.config.time_step, \"minute\")\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t}\r\n\t});\r\n\r\n\tvar infoWindowOptions = {\r\n\t\tcontent: ''\r\n\t};\r\n\r\n\tif (scheduler.config.map_infowindow_max_width) {\r\n\t\tinfoWindowOptions.maxWidth = scheduler.config.map_infowindow_max_width;\r\n\t}\r\n\r\n\tscheduler.map = {\r\n\t\t_points: [],\r\n\t\t_markers: [],\r\n\t\t_infowindow: new google.maps.InfoWindow(infoWindowOptions),\r\n\t\t_infowindows_content: [],\r\n\t\t_initialization_count: -1,\r\n\t\t_obj: map\r\n\t};\r\n\r\n\tscheduler.ext.mapView.geocoder = new google.maps.Geocoder();\r\n\tscheduler.ext.mapView.map = map;\r\n\tscheduler.ext.mapView.points = scheduler.map._points;\r\n\tscheduler.ext.mapView.markers = scheduler.map._markers;\r\n\tscheduler.ext.mapView.infoWindow = scheduler.map._infowindow;\r\n\r\n\tif (scheduler.config.map_resolve_user_location) {\r\n\t\tif (navigator.geolocation) {\r\n\t\t\tif (!scheduler._isMapPositionSet) {\r\n\t\t\t\tnavigator.geolocation.getCurrentPosition(function(position) {\r\n\t\t\t\t\tvar _userLocation = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);\r\n\t\t\t\t\tmap.setCenter(_userLocation);\r\n\t\t\t\t\tmap.setZoom(scheduler.config.map_zoom_after_resolve || 10);\r\n\t\t\t\t\tscheduler.map._infowindow.setContent(scheduler.locale.labels.marker_geo_success);\r\n\t\t\t\t\tscheduler.map._infowindow.position = map.getCenter();\r\n\t\t\t\t\tscheduler.map._infowindow.open(map);\r\n\r\n\t\t\t\t\tscheduler._isMapPositionSet = true;\r\n\t\t\t\t},\r\n\t\t\t\t\t\tfunction() {\r\n\t\t\t\t\t\t\tscheduler.map._infowindow.setContent(scheduler.locale.labels.marker_geo_fail);\r\n\t\t\t\t\t\t\tscheduler.map._infowindow.setPosition(map.getCenter());\r\n\t\t\t\t\t\t\tscheduler.map._infowindow.open(map);\r\n\t\t\t\t\t\t\tscheduler._isMapPositionSet = true;\r\n\t\t\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tgoogle.maps.event.addListener(map, \"resize\", function(event) {\r\n\t\tgmap.style.zIndex = '5';\r\n\t\tmap.setZoom(map.getZoom());\r\n\r\n\t});\r\n\tgoogle.maps.event.addListener(map, \"tilesloaded\", function(event) {\r\n\t\tgmap.style.zIndex = '5';\r\n\t});\r\n\r\n\tgmap.style.display = 'none'; // property was changed after attaching map\r\n\r\n\tconst old = scheduler.render_data;\r\n\tscheduler.render_data = function(evs, hold) {\r\n\t\tif (this._mode == \"map\") {\r\n\t\t\tfill_map_tab();\r\n\t\t\tvar events = scheduler.get_visible_events();\r\n\t\t\tfor (var i = 0; i < events.length; i++) {\r\n\t\t\t\tif (!scheduler.map._markers[events[i].id]) {\r\n\t\t\t\t\tshowAddress(events[i], false, false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else\r\n\t\t\treturn old.apply(this, arguments);\r\n\t};\r\n\r\n\tfunction set_full_view(mode) {\r\n\t\tif (mode) {\r\n\t\t\tvar l = scheduler.locale.labels;\r\n\t\t\tscheduler._els[\"dhx_cal_header\"][0].innerHTML = \"
\" + l.date + \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"
\" + l.description + \"
\";\r\n\t\t\tscheduler._table_view = true;\r\n\t\t\tscheduler.set_sizes();\r\n\t\t}\r\n\t}\r\n\r\n\tfunction clear_map_tab() {\r\n\t\tscheduler._selected_event_id = null;\r\n\t\tscheduler.map._infowindow.close();\r\n\t\tvar markers = scheduler.map._markers;\r\n\t\tfor (var key in markers) {\r\n\t\t\tif (markers.hasOwnProperty(key)) {\r\n\t\t\t\tmarkers[key].setMap(null);\r\n\t\t\t\tdelete scheduler.map._markers[key];\r\n\t\t\t\tif (scheduler.map._infowindows_content[key])\r\n\t\t\t\t\tdelete scheduler.map._infowindows_content[key];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction fill_map_tab() {\r\n\t\t//select events for which data need to be printed\r\n\t\tvar events = scheduler.get_visible_events();\r\n\t\tevents.sort(function(a, b) {\r\n\t\t\tif(a.start_date.valueOf()==b.start_date.valueOf())\r\n\t\t\t\treturn a.id>b.id?1:-1;\r\n\t\t\treturn a.start_date>b.start_date?1:-1;\r\n\t\t});\r\n\r\n\t\t//generate html for the view\r\n\t\tvar ariaAttr = scheduler._waiAria.mapAttrString();\r\n\r\n\t\tvar html = \"
\";\r\n\t\tfor (var i = 0; i < events.length; i++) {\r\n\t\t\tvar ev = events[i];\r\n\t\t\tvar event_class = (ev.id == scheduler._selected_event_id) ? 'dhx_map_line highlight' : 'dhx_map_line';\r\n\t\t\tvar bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\t\t\tvar color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\t\t\tvar ariaAttr = scheduler._waiAria.mapRowAttrString(ev);\r\n\t\t\tvar ariaButtonAttr = scheduler._waiAria.mapDetailsBtnString();\r\n\r\n\t\t\thtml += \"
\" + scheduler.templates.map_time(ev.start_date, ev.end_date, ev) + \"
\";\r\n\t\t\thtml += `
\r\n\t\t\t\r\n\t\t\t
`;\r\n\t\t\thtml += \"
\" + scheduler.templates.map_text(ev.start_date, ev.end_date, ev) + \"
\"; // -25 = icon size 20 and padding 5\r\n\t\t}\r\n\t\thtml += \"
\";\r\n\r\n\t\t//render html\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = 0; //fix flickering in FF\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t//\tscheduler._els[\"dhx_cal_data\"][0].style.width = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\r\n\t\tvar t = scheduler._els[\"dhx_cal_data\"][0].firstChild.childNodes;\r\n\r\n\t\tvar dateElement = scheduler._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML=scheduler.templates[scheduler._mode + \"_date\"](scheduler._min_date, scheduler._max_date, scheduler._mode);\r\n\t\t}\r\n\r\n\t\tscheduler._rendered = [];\r\n\t\tfor (var i = 0; i < t.length - 2; i++) {\r\n\t\t\tscheduler._rendered[i] = t[i];\r\n\t\t}\r\n\t}\r\n\r\n\tfunction _setMapSize(elem_id) { //input - map's div id\r\n\t\tvar map = document.getElementById(elem_id);\r\n\t\tconst nav_height = scheduler.$container.querySelector(\".dhx_cal_navline\").offsetHeight;\r\n\t\tvar height = scheduler._y - nav_height;\r\n\t\tif (height < 0)\r\n\t\t\theight = 0;\r\n\t\tvar width = scheduler._x - scheduler.xy.map_date_width - scheduler.xy.map_description_width - 1;\r\n\t\tif (width < 0)\r\n\t\t\twidth = 0;\r\n\t\tmap.style.height = height + 'px';\r\n\t\tmap.style.width = width + 'px';\r\n\t\tmap.style.position = \"absolute\";\r\n\t\tmap.style.top = nav_height + \"px\";\r\n\t\tif (scheduler.config.rtl) {\r\n\t\t\tmap.style.marginRight = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\t\t} else {\r\n\t\t\tmap.style.marginLeft = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\t\t}\r\n\t\tmap.style.marginTop = (scheduler.xy.nav_height + 2) + 'px';\r\n\t}\r\n\r\n\tscheduler.map_view = function(mode) {\r\n\t\tscheduler.map._initialization_count++;\r\n\t\tvar gmap = scheduler._els.dhx_gmap[0];\r\n\t\tvar temp_center;\r\n\t\t//scheduler._els.dhx_cal_data[0].style.width = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\r\n\t\tscheduler._min_date = scheduler.config.map_start || (scheduler._currentDate());\r\n\t\tscheduler._max_date = scheduler.config.map_end || scheduler.date.add(scheduler._currentDate(), 1, \"year\");\r\n\r\n\t\tscheduler._table_view = true;\r\n\t\tset_full_view(mode);\r\n\r\n\t\tif (mode) { //map tab activated\r\n\t\t\tclear_map_tab();\r\n\t\t\tfill_map_tab();\r\n\t\t\tgmap.style.display = 'block';\r\n\r\n\t\t\t// need to resize block every time window is resized\r\n\t\t\t_setMapSize('dhx_gmap');\r\n\t\t\ttemp_center = scheduler.map._obj.getCenter();\r\n\r\n\t\t\tvar events = scheduler.get_visible_events();\r\n\t\t\tfor (var i = 0; i < events.length; i++) {\r\n\t\t\t\tif (!scheduler.map._markers[events[i].id]) {\r\n\t\t\t\t\tshowAddress(events[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t} else { //map tab de-activated\r\n\t\t\tgmap.style.display = 'none';\r\n\t\t}\r\n\t\tgoogle.maps.event.trigger(scheduler.map._obj, 'resize');\r\n\r\n\t\tif (scheduler.map._initialization_count === 0 && temp_center) { // if tab is activated for the first time need to fix position\r\n\t\t\tscheduler.map._obj.setCenter(temp_center);\r\n\t\t}\r\n\r\n\t\tif (scheduler._selected_event_id) {\r\n\t\t\tselectEvent(scheduler._selected_event_id);\r\n\t\t}\r\n\t};\r\n\r\n\tvar selectEvent = function(event_id) {\r\n\t\tscheduler.map._obj.setCenter(scheduler.map._points[event_id]);\r\n\t\tscheduler.callEvent(\"onClick\", [event_id]);\r\n\t};\r\n\r\n\tvar showAddress = function(event, setCenter, performClick) { // what if event have incorrect position from the start?\r\n\t\tvar point = scheduler.config.map_error_position;\r\n\t\tif (event.lat && event.lng) {\r\n\t\t\tpoint = new google.maps.LatLng(event.lat, event.lng);\r\n\t\t}\r\n\t\tvar message = scheduler.templates.marker_text(event.start_date, event.end_date, event);\r\n\t\tif (!scheduler._new_event) {\r\n\r\n\t\t\tscheduler.map._infowindows_content[event.id] = message;\r\n\r\n\t\t\tif (scheduler.map._markers[event.id])\r\n\t\t\t\tscheduler.map._markers[event.id].setMap(null);\r\n\r\n\t\t\tscheduler.map._markers[event.id] = scheduler.ext.mapView.createMarker({\r\n\t\t\t\tposition: point,\r\n\t\t\t\tmap: scheduler.map._obj\r\n\t\t\t});\r\n\r\n\t\t\tgoogle.maps.event.addListener(scheduler.map._markers[event.id], 'click', function() {\r\n\t\t\t\tscheduler.map._infowindow.setContent(scheduler.map._infowindows_content[event.id]);\r\n\t\t\t\tscheduler.map._infowindow.open(scheduler.map._obj, scheduler.map._markers[event.id]);\r\n\t\t\t\tscheduler._selected_event_id = event.id;\r\n\t\t\t\tscheduler.render_data();\r\n\t\t\t});\r\n\t\t\tscheduler.map._points[event.id] = point;\r\n\r\n\t\t\tif (setCenter) scheduler.map._obj.setCenter(scheduler.map._points[event.id]);\r\n\t\t\tif (performClick) scheduler.callEvent(\"onClick\", [event.id]);\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onClick\", function(id, domEvent) {\r\n\t\tif (this._mode == \"map\") {\r\n\t\t\tscheduler._selected_event_id = id;\r\n\t\t\tfor (var i = 0; i < scheduler._rendered.length; i++) {\r\n\t\t\t\tscheduler._rendered[i].className = 'dhx_map_line';\r\n\t\t\t\tif (scheduler._rendered[i].getAttribute(scheduler.config.event_attribute) == id) {\r\n\t\t\t\t\tscheduler._rendered[i].className += \" highlight\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (scheduler.map._points[id] && scheduler.map._markers[id]) {\r\n\t\t\t\tscheduler.map._obj.setCenter(scheduler.map._points[id]); // was panTo\r\n\t\t\t\tgoogle.maps.event.trigger(scheduler.map._markers[id], 'click');\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tvar _displayEventOnMap = function(event) {\r\n\t\tconst geocoder = scheduler.ext.mapView.geocoder;\r\n\t\tif (event.event_location && geocoder) {\r\n\t\t\tgeocoder.geocode(\r\n\t\t\t\t{\r\n\t\t\t\t\t'address': event.event_location,\r\n\t\t\t\t\t'language': scheduler.uid().toString()\r\n\t\t\t\t},\r\n\t\t\t\tfunction(results, status) {\r\n\t\t\t\t\tvar point = {};\r\n\t\t\t\t\tif (status != google.maps.GeocoderStatus.OK) {\r\n\t\t\t\t\t\tpoint = scheduler.callEvent(\"onLocationError\", [event.id]);\r\n\t\t\t\t\t\tif (!point || point === true)\r\n\t\t\t\t\t\t\tpoint = scheduler.config.map_error_position;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tpoint = results[0].geometry.location;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tevent.lat = point.lat();\r\n\t\t\t\t\tevent.lng = point.lng();\r\n\r\n\t\t\t\t\tscheduler._selected_event_id = event.id;\r\n\r\n\t\t\t\t\tscheduler._latLngUpdate = true;\r\n\t\t\t\t\tscheduler.callEvent(\"onEventChanged\", [event.id, event]);\r\n\t\t\t\t\tshowAddress(event, true, true);\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t} else {\r\n\t\t\tshowAddress(event, true, true);\r\n\t\t}\r\n\t};\r\n\r\n\tvar _updateEventLocation = function(event) { // update lat and lng in database\r\n\t\tconst geocoder = scheduler.ext.mapView.geocoder;\r\n\t\tif (event.event_location && geocoder) {\r\n\t\t\tgeocoder.geocode(\r\n\t\t\t\t{\r\n\t\t\t\t\t'address': event.event_location,\r\n\t\t\t\t\t'language': scheduler.uid().toString()\r\n\t\t\t\t},\r\n\t\t\t\tfunction(results, status) {\r\n\t\t\t\t\tvar point = {};\r\n\t\t\t\t\tif (status != google.maps.GeocoderStatus.OK) {\r\n\t\t\t\t\t\tpoint = scheduler.callEvent(\"onLocationError\", [event.id]);\r\n\t\t\t\t\t\tif (!point || point === true)\r\n\t\t\t\t\t\t\tpoint = scheduler.config.map_error_position;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tpoint = results[0].geometry.location;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tevent.lat = point.lat();\r\n\t\t\t\t\tevent.lng = point.lng();\r\n\t\t\t\t\tscheduler._latLngUpdate = true;\r\n\t\t\t\t\tscheduler.callEvent(\"onEventChanged\", [event.id, event]);\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t}\r\n\t};\r\n\r\n\tvar _delay = function(method, object, params, delay) {\r\n\t\tsetTimeout(function() {\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tvar ret = method.apply(object, params);\r\n\t\t\tmethod = object = params = null;\r\n\t\t\treturn ret;\r\n\t\t}, delay || 1);\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onEventChanged\", function(id, event) {\r\n\t\tif (!this._latLngUpdate) {\r\n\t\t\tvar event = scheduler.getEvent(id);\r\n\t\t\tif ((event.start_date < scheduler._min_date && event.end_date > scheduler._min_date) || (event.start_date < scheduler._max_date && event.end_date > scheduler._max_date) || (event.start_date.valueOf() >= scheduler._min_date && event.end_date.valueOf() <= scheduler._max_date)) {\r\n\t\t\t\tif (scheduler.map._markers[id])\r\n\t\t\t\t\tscheduler.map._markers[id].setMap(null);\r\n\t\t\t\t_displayEventOnMap(event);\r\n\t\t\t} else { // event no longer should be displayed on the map view\r\n\t\t\t\tscheduler._selected_event_id = null;\r\n\t\t\t\tscheduler.map._infowindow.close();\r\n\t\t\t\tif (scheduler.map._markers[id])\r\n\t\t\t\t\tscheduler.map._markers[id].setMap(null);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t\tthis._latLngUpdate = false;\r\n\t\treturn true;\r\n\t});\r\n\r\n\r\n\tscheduler.attachEvent(\"onEventIdChange\", function(old_event_id, new_event_id) {\r\n\t\tvar event = scheduler.getEvent(new_event_id);\r\n\t\tif ((event.start_date < scheduler._min_date && event.end_date > scheduler._min_date) || (event.start_date < scheduler._max_date && event.end_date > scheduler._max_date) || (event.start_date.valueOf() >= scheduler._min_date && event.end_date.valueOf() <= scheduler._max_date)) {\r\n\t\t\tif (scheduler.map._markers[old_event_id]) {\r\n\t\t\t\tscheduler.map._markers[old_event_id].setMap(null);\r\n\t\t\t\tdelete scheduler.map._markers[old_event_id];\r\n\t\t\t}\r\n\t\t\tif (scheduler.map._infowindows_content[old_event_id])\r\n\t\t\t\tdelete scheduler.map._infowindows_content[old_event_id];\r\n\t\t\t_displayEventOnMap(event);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onEventAdded\", function(id, event) {\r\n\t\tif (!scheduler._dataprocessor) {\r\n\t\t\tif ((event.start_date < scheduler._min_date && event.end_date > scheduler._min_date) || (event.start_date < scheduler._max_date && event.end_date > scheduler._max_date) || (event.start_date.valueOf() >= scheduler._min_date && event.end_date.valueOf() <= scheduler._max_date)) {\r\n\t\t\t\tif (scheduler.map._markers[id])\r\n\t\t\t\t\tscheduler.map._markers[id].setMap(null);\r\n\t\t\t\t_displayEventOnMap(event);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\t/* Test/example\r\n\t scheduler.attachEvent(\"onLocationError\", function(event_id,event_object){\r\n\t return new google.maps.LatLng(8, 8);\r\n\t });\r\n\t */\r\n\r\n\tscheduler.attachEvent(\"onBeforeEventDelete\", function(id, event) {\r\n\t\tif (scheduler.map._markers[id]) {\r\n\t\t\tscheduler.map._markers[id].setMap(null); // if new event is deleted tab != map then it doesn't have marker yet\r\n\t\t}\r\n\t\tscheduler._selected_event_id = null;\r\n\t\tscheduler.map._infowindow.close();\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler._event_resolve_delay = 1500;\r\n\tscheduler.attachEvent(\"onEventLoading\", function(event) {\r\n\t\tif (scheduler.config.map_resolve_event_location && event.event_location && !event.lat && !event.lng) { // don't delete !event.lat && !event.lng as location could change\r\n\t\t\tscheduler._event_resolve_delay += 1500;\r\n\t\t\t_delay(_updateEventLocation, this, [event], scheduler._event_resolve_delay);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onEventCancel\", function(id, is_new) {\r\n\t\tif (is_new) {\r\n\t\t\tif (scheduler.map._markers[id])\r\n\t\t\t\tscheduler.map._markers[id].setMap(null);\r\n\t\t\tscheduler.map._infowindow.close();\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nconst minicalDomEvents = scheduler._createDomEventScope();\r\n\t\r\n\r\nscheduler.config.minicalendar = {\r\n\tmark_events: true\r\n};\r\nscheduler._synced_minicalendars = [];\r\nscheduler.renderCalendar = function(obj, _prev, is_refresh) {\r\n\tvar cal = null;\r\n\tvar date = obj.date || (scheduler._currentDate());\r\n\tif (typeof date == \"string\")\r\n\t\tdate = this.templates.api_date(date);\r\n\r\n\tif (!_prev) {\r\n\t\tvar cont = obj.container;\r\n\t\tvar pos = obj.position;\r\n\r\n\t\tif (typeof cont == \"string\")\r\n\t\t\tcont = document.getElementById(cont);\r\n\r\n\t\tif (typeof pos == \"string\")\r\n\t\t\tpos = document.getElementById(pos);\r\n\t\tif (pos && (typeof pos.left == \"undefined\" && typeof pos.right == \"undefined\")) {\r\n\t\t\tvar tpos = scheduler.$domHelpers.getOffset(pos);\r\n\t\t\tpos = {\r\n\t\t\t\ttop: tpos.top + pos.offsetHeight,\r\n\t\t\t\tleft: tpos.left\r\n\t\t\t};\r\n\t\t}\r\n\t\tif (!cont)\r\n\t\t\tcont = scheduler._get_def_cont(pos);\r\n\r\n\t\tcal = this._render_calendar(cont, date, obj);\r\n\t\r\n\t\tif (!cal.$_eventAttached) {\r\n\t\t\tcal.$_eventAttached = true;\r\n\t\t\tminicalDomEvents.attach(cal, \"click\", (function(e) {\r\n\t\t\t\tvar src = e.target || e.srcElement;\r\n\r\n\t\t\t\tvar $dom = scheduler.$domHelpers;\r\n\t\t\t\tif ($dom.closest(src, \".dhx_month_head\")) {\r\n\t\t\t\t\tif (!$dom.closest(src, \".dhx_after\") && !$dom.closest(src, \".dhx_before\")) {\r\n\r\n\t\t\t\t\t\tvar cellRoot = $dom.closest(src, \"[data-cell-date]\");\r\n\t\t\t\t\t\tvar dateAttribute = cellRoot.getAttribute(\"data-cell-date\");\r\n\t\t\t\t\t\tvar newDate = scheduler.templates.parse_date(dateAttribute);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tscheduler.unmarkCalendar(this);\r\n\t\t\t\t\t\tscheduler.markCalendar(this, newDate, \"dhx_calendar_click\");\r\n\t\t\t\t\t\tthis._last_date = newDate;\r\n\t\t\t\t\t\tif (this.conf.handler) this.conf.handler.call(scheduler, newDate, this);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}).bind(cal));\r\n\t\t}\r\n\t\r\n\t} else {\r\n\t\tcal = this._render_calendar(_prev.parentNode, date, obj, _prev);\r\n\t\tscheduler.unmarkCalendar(cal);\r\n\t}\r\n\r\n\tif (scheduler.config.minicalendar.mark_events) {\r\n\t\tvar start = scheduler.date.month_start(date);\r\n\t\tvar end = scheduler.date.add(start, 1, \"month\");\r\n\t\tvar evs = this.getEvents(start, end);\r\n\t\tvar filter = this[\"filter_\" + this._mode];\r\n\t\tvar markedDates = {};\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tif (filter && !filter(ev.id, ev))\r\n\t\t\t\tcontinue;\r\n\t\t\tvar d = ev.start_date;\r\n\t\t\tif (d.valueOf() < start.valueOf())\r\n\t\t\t\td = start;\r\n\t\t\td = scheduler.date.date_part(new Date(d.valueOf()));\r\n\t\t\twhile (d < ev.end_date) {\r\n\t\t\t\tif(!markedDates[+d]) {\r\n\t\t\t\t\tmarkedDates[+d] = true;\r\n\t\t\t\t\tthis.markCalendar(cal, d, \"dhx_year_event\");\r\n\t\t\t\t}\r\n\t\t\t\td = this.date.add(d, 1, \"day\");\r\n\t\t\t\tif (d.valueOf() >= end.valueOf())\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tthis._markCalendarCurrentDate(cal);\r\n\r\n\tcal.conf = obj;\r\n\tif (obj.sync && !is_refresh)\r\n\t\tthis._synced_minicalendars.push(cal);\r\n\r\n\tif(!cal.conf._on_xle_handler){\r\n\t\tcal.conf._on_xle_handler = scheduler.attachEvent(\"onXLE\", function refreshOnLoad(){\r\n\t\t\tscheduler.updateCalendar(cal, cal.conf.date);\r\n\t\t});\r\n\t}\r\n\r\n\tif(this.config.wai_aria_attributes && this.config.wai_aria_application_role){\r\n\t\tcal.setAttribute(\"role\", \"application\");\r\n\t}\r\n\r\n\treturn cal;\r\n};\r\nscheduler._get_def_cont = function(pos) {\r\n\tif (!this._def_count) {\r\n\t\tthis._def_count = document.createElement(\"div\");\r\n\t\tthis._def_count.className = \"dhx_minical_popup\";\r\n\t\tscheduler.event(this._def_count, \"click\", function(e) { e.cancelBubble = true; });\r\n\t\tdocument.body.appendChild(this._def_count);\r\n\t}\r\n\r\n\tif(pos.left){\r\n\t\tthis._def_count.style.left = pos.left + \"px\";\r\n\t}\r\n\tif(pos.right){\r\n\t\tthis._def_count.style.right = pos.right + \"px\";\r\n\t}\r\n\tif(pos.top){\r\n\t\tthis._def_count.style.top = pos.top + \"px\";\r\n\t}\r\n\tif(pos.bottom){\r\n\t\tthis._def_count.style.bottom = pos.bottom + \"px\";\r\n\t}\r\n\r\n\tthis._def_count._created = new Date();\r\n\r\n\treturn this._def_count;\r\n};\r\nscheduler._locateCalendar = function(cal, date) {\r\n\tif (typeof date == \"string\")\r\n\t\tdate = scheduler.templates.api_date(date);\r\n\r\n\tif(+date > +cal._max_date || +date < +cal._min_date)\r\n\t\treturn null;\r\n\r\n\tvar table = cal.querySelector(\".dhx_year_body\").childNodes[0];\r\n\r\n\tvar weekNum = 0;\r\n\tvar dat = new Date(cal._min_date);\r\n\twhile(+this.date.add(dat, 1, \"week\") <= +date){\r\n\t\tdat = this.date.add(dat, 1, \"week\");\r\n\t\tweekNum++;\r\n\t}\r\n\r\n\tvar sm = scheduler.config.start_on_monday;\r\n\tvar day = (date.getDay() || (sm ? 7 : 0)) - (sm ? 1 : 0);\r\n\r\n\tconst dayCell = table.querySelector(`.dhx_cal_month_row:nth-child(${weekNum + 1}) .dhx_cal_month_cell:nth-child(${day + 1})`);\r\n\tif(dayCell) {\r\n\t\treturn dayCell.firstChild;\r\n\t} else {\r\n\t\treturn null;\r\n\t}\r\n};\r\nscheduler.markCalendar = function(cal, date, css) {\r\n\tvar div = this._locateCalendar(cal, date);\r\n\tif(!div)\r\n\t\treturn;\r\n\r\n\tdiv.className += \" \" + css;\r\n};\r\nscheduler.unmarkCalendar = function(cal, date, css) {\r\n\tdate = date || cal._last_date;\r\n\tcss = css || \"dhx_calendar_click\";\r\n\tif (!date) return;\r\n\tvar el = this._locateCalendar(cal, date);\r\n\tif(!el)\r\n\t\treturn;\r\n\tel.className = (el.className || \"\").replace(RegExp(css, \"g\"));\r\n};\r\nscheduler._week_template = function(width) {\r\n\tvar summ = (width || 250);\r\n\tvar left = 0;\r\n\r\n\tvar week_template = document.createElement(\"div\");\r\n\tvar dummy_date = this.date.week_start(scheduler._currentDate());\r\n\tfor (var i = 0; i < 7; i++) {\r\n\t\tthis._cols[i] = Math.floor(summ / (7 - i));\r\n\t\tthis._render_x_header(i, left, dummy_date, week_template);\r\n\t\tdummy_date = this.date.add(dummy_date, 1, \"day\");\r\n\t\tsumm -= this._cols[i];\r\n\t\tleft += this._cols[i];\r\n\t}\r\n\tweek_template.lastChild.className += \" dhx_scale_bar_last\";\r\n\treturn week_template;\r\n};\r\nscheduler.updateCalendar = function(obj, sd) {\r\n\tobj.conf.date = sd;\r\n\tthis.renderCalendar(obj.conf, obj, true);\r\n};\r\nscheduler._mini_cal_arrows = [\" \", \" \"];\r\nscheduler._render_calendar = function(obj, sd, conf, previous) {\r\n\t/*store*/\r\n\tvar ts = scheduler.templates;\r\n\tvar temp = this._cols;\r\n\tthis._cols = [];\r\n\tvar temp2 = this._mode;\r\n\tthis._mode = \"calendar\";\r\n\tvar temp3 = this._colsS;\r\n\tthis._colsS = {height: 0};\r\n\tvar temp4 = new Date(this._min_date);\r\n\tvar temp5 = new Date(this._max_date);\r\n\tvar temp6 = new Date(scheduler._date);\r\n\tvar temp7 = ts.month_day;\r\n\tvar temp8 = this._ignores_detected; this._ignores_detected = 0;\r\n\tts.month_day = ts.calendar_date;\r\n\r\n\tsd = this.date.month_start(sd);\r\n\tvar week_template = this._week_template(obj.offsetWidth - 1 - this.config.minicalendar.padding );\r\n\r\n\tvar d;\r\n\tif (previous){\r\n\t\td = previous;\r\n\t} else {\r\n\t\td = document.createElement(\"div\");\r\n\t\td.className = \"dhx_cal_container dhx_mini_calendar\";\r\n\t}\r\n\td.setAttribute(\"date\", this._helpers.formatDate(sd));\r\n\td.innerHTML = \"
\" +\r\n\t\t\t\"
\" : \"'>\") +\r\n\t\t\t\"
\"+(week_template ? week_template.innerHTML : \"\")+\"
\" +\r\n\t\t\t\"
\" +\r\n\t\t\"
\";\r\n\tvar header = d.querySelector(\".dhx_year_month\");\r\n\tvar weekHeader = d.querySelector(\".dhx_year_week\");\r\n\tvar body = d.querySelector(\".dhx_year_body\");\r\n\r\n\theader.innerHTML = this.templates.calendar_month(sd);\r\n\tif (conf.navigation) {\r\n\t\tvar move_minicalendar_date = function(calendar, diff) {\r\n\t\t\tvar date = scheduler.date.add(calendar._date, diff, \"month\");\r\n\t\t\tscheduler.updateCalendar(calendar, date);\r\n\t\t\tif (scheduler._date.getMonth() == calendar._date.getMonth() && scheduler._date.getFullYear() == calendar._date.getFullYear()) {\r\n\t\t\t\tscheduler._markCalendarCurrentDate(calendar);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tvar css_classnames = [\"dhx_cal_prev_button\", \"dhx_cal_next_button\"];\r\n\t\tvar css_texts = [\"left:1px;top:4px;position:absolute;\", \"left:auto; right:1px;top:4px;position:absolute;\"];\r\n\t\tvar diffs = [-1, 1];\r\n\t\tvar handler = function(diff) {\r\n\t\t\treturn function() {\t\r\n\t\t\t\tif (conf.sync) {\r\n\t\t\t\t\tvar calendars = scheduler._synced_minicalendars;\r\n\t\t\t\t\tfor (var k = 0; k < calendars.length; k++) {\r\n\t\t\t\t\t\tmove_minicalendar_date(calendars[k], diff);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (scheduler.config.rtl) {\r\n\t\t\t\t\t\tdiff = -diff;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmove_minicalendar_date(d, diff);\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t};\r\n\t\tvar labels = [scheduler.locale.labels.prev, scheduler.locale.labels.next];\r\n\t\tfor (var j = 0; j < 2; j++) {\r\n\t\t\tvar arrow = document.createElement(\"div\");\r\n\t\t\t//var diff = diffs[j];\r\n\t\t\tarrow.className = css_classnames[j];\r\n\r\n\t\t\tscheduler._waiAria.headerButtonsAttributes(arrow, labels[j]);\r\n\r\n\t\t\tarrow.style.cssText = css_texts[j];\r\n\t\t\tarrow.innerHTML = this._mini_cal_arrows[j];\r\n\t\t\theader.appendChild(arrow);\r\n\t\t\tminicalDomEvents.attach(arrow, \"click\", handler(diffs[j]));\r\n\t\t}\r\n\t}\r\n\td._date = new Date(sd);\r\n\r\n\td.week_start = (sd.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) % 7;\r\n\r\n\tvar dd = d._min_date = this.date.week_start(sd);\r\n\td._max_date = this.date.add(d._min_date, 6, \"week\");\r\n\r\n\tthis._reset_month_scale(body, sd, dd, 6);\r\n\r\n\tif (!previous)\r\n\t\tobj.appendChild(d);\r\n\r\n\tweekHeader.style.height = (weekHeader.childNodes[0].offsetHeight - 1) + \"px\"; // dhx_year_week should have height property so that day dates would get correct position. dhx_year_week height = height of it's child (with the day name)\r\n\r\n\tvar headerId = scheduler.uid();\r\n\tscheduler._waiAria.minicalHeader(header, headerId);\r\n\tscheduler._waiAria.minicalGrid(d.querySelector(\".dhx_year_grid\"), headerId);\r\n\tscheduler._waiAria.minicalRow(weekHeader);\r\n\r\n\tvar dayHeaders = weekHeader.querySelectorAll(\".dhx_scale_bar\");\r\n\tfor(var i = 0; i < dayHeaders.length; i++){\r\n\t\tscheduler._waiAria.minicalHeadCell(dayHeaders[i]);\r\n\t}\r\n\tvar dayCells = body.querySelectorAll(\".dhx_cal_month_cell\");\r\n\tvar firstDate = new Date(dd);\r\n\tfor(var i = 0; i < dayCells.length; i++){\r\n\r\n\t\tscheduler._waiAria.minicalDayCell(dayCells[i], new Date(firstDate));\r\n\t\tfirstDate = scheduler.date.add(firstDate, 1, \"day\");\r\n\t}\r\n\r\n\tscheduler._waiAria.minicalHeader(header, headerId);\r\n\r\n\t/*restore*/\r\n\tthis._cols = temp;\r\n\tthis._mode = temp2;\r\n\tthis._colsS = temp3;\r\n\tthis._min_date = temp4;\r\n\tthis._max_date = temp5;\r\n\tscheduler._date = temp6;\r\n\tts.month_day = temp7;\r\n\tthis._ignores_detected = temp8;\r\n\treturn d;\r\n};\r\nscheduler.destroyCalendar = function(cal, force) {\r\n\tif (!cal && this._def_count && this._def_count.firstChild) {\r\n\t\tif (force || (new Date()).valueOf() - this._def_count._created.valueOf() > 500)\r\n\t\t\tcal = this._def_count.firstChild;\r\n\t}\r\n\tif (!cal) return;\r\n\tminicalDomEvents.detachAll();\r\n\t//cal.onclick = null;\r\n\tcal.innerHTML = \"\";\r\n\tif (cal.parentNode)\r\n\t\tcal.parentNode.removeChild(cal);\r\n\tif (this._def_count)\r\n\t\tthis._def_count.style.top = \"-1000px\";\r\n\r\n\tif(cal.conf && cal.conf._on_xle_handler)\r\n\t\tscheduler.detachEvent(cal.conf._on_xle_handler);\r\n};\r\nscheduler.isCalendarVisible = function() {\r\n\tif (this._def_count && parseInt(this._def_count.style.top, 10) > 0)\r\n\t\treturn this._def_count;\r\n\treturn false;\r\n};\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tscheduler.event(document.body, \"click\", function() { scheduler.destroyCalendar(); });\r\n}, {once: true});\r\n\r\n\r\n\r\nscheduler.form_blocks.calendar_time = {\r\n\trender: function(sns) {\r\n\t\tvar html = \"\";\r\n\r\n\t\tvar cfg = scheduler.config;\r\n\t\tvar dt = this.date.date_part(scheduler._currentDate());\r\n\r\n\t\tvar last = 24 * 60, first = 0;\r\n\t\tif (cfg.limit_time_select) {\r\n\t\t\tfirst = 60 * cfg.first_hour;\r\n\t\t\tlast = 60 * cfg.last_hour + 1; // to include \"17:00\" option if time select is limited\r\n\t\t}\r\n\t\tdt.setHours(first / 60);\r\n\r\n\t\tsns._time_values = [];\r\n\t\thtml += \" \";\r\n\r\n\t\t//var full_day = scheduler.config.full_day;\r\n\r\n\t\treturn \"
\" + html + \"  –  \" + html + \"
\";\r\n\t},\r\n\tset_value: function(node, value, ev, config) {\r\n\r\n\t\tvar inputs = node.getElementsByTagName(\"input\");\r\n\t\tvar selects = node.getElementsByTagName(\"select\");\r\n\t\tvar start_date,\r\n\t\t\tend_date;\r\n\r\n\t\tvar _init_once = function(inp, date, number) {\r\n\t\t\tscheduler.event(inp, \"click\", function() {\r\n\t\t\t\tscheduler.destroyCalendar(null, true);\r\n\t\t\t\tscheduler.renderCalendar({\r\n\t\t\t\t\tposition: inp,\r\n\t\t\t\t\tdate: new Date(this._date),\r\n\t\t\t\t\tnavigation: true,\r\n\t\t\t\t\thandler: function(new_date) {\r\n\t\t\t\t\t\tinp.value = scheduler.templates.calendar_time(new_date);\r\n\t\t\t\t\t\tinp._date = new Date(new_date);\r\n\t\t\t\t\t\tscheduler.destroyCalendar();\r\n\t\t\t\t\t\tif (scheduler.config.event_duration && scheduler.config.auto_end_date && number === 0) { //first element = start date\r\n\t\t\t\t\t\t\t_update_minical_select();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t};\r\n\r\n\t\tif (scheduler.config.full_day) {\r\n\t\t\tif (!node._full_day) {\r\n\t\t\t\tvar html = \"\";\r\n\t\t\t\tif (!scheduler.config.wide_form)\r\n\t\t\t\t\thtml = node.previousSibling.innerHTML + html;\r\n\t\t\t\tnode.previousSibling.innerHTML = html;\r\n\t\t\t\tnode._full_day = true;\r\n\t\t\t}\r\n\t\t\tvar input = node.previousSibling.getElementsByTagName(\"input\")[0];\r\n\r\n\t\t\tvar isFulldayEvent = (scheduler.date.time_part(ev.start_date) === 0 && scheduler.date.time_part(ev.end_date) === 0);\r\n\t\t\tinput.checked = isFulldayEvent;\r\n\r\n\t\t\tselects[0].disabled = input.checked;\r\n\t\t\tselects[1].disabled = input.checked;\r\n\r\n\t\t\tif (!input.$_eventAttached) {\r\n\t\t\t\tinput.$_eventAttached = true;\r\n\t\t\t\tscheduler.event(input, \"click\", function() {\r\n\t\t\t\t\tif (input.checked === true) {\r\n\t\t\t\t\t\tvar obj = {};\r\n\t\t\t\t\t\tscheduler.form_blocks.calendar_time.get_value(node, obj);\r\n\r\n\t\t\t\t\t\tstart_date = scheduler.date.date_part(obj.start_date);\r\n\t\t\t\t\t\tend_date = scheduler.date.date_part(obj.end_date);\r\n\r\n\t\t\t\t\t\tif (+end_date == +start_date || (+end_date >= +start_date && (ev.end_date.getHours() !== 0 || ev.end_date.getMinutes() !== 0)))\r\n\t\t\t\t\t\t\tend_date = scheduler.date.add(end_date, 1, \"day\");\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tvar start = start_date || ev.start_date;\r\n\t\t\t\t\tvar end = end_date || ev.end_date;\r\n\t\t\t\t\t_attach_action(inputs[0], start);\r\n\t\t\t\t\t_attach_action(inputs[1], end);\r\n\t\t\t\t\tselects[0].value = start.getHours() * 60 + start.getMinutes();\r\n\t\t\t\t\tselects[1].value = end.getHours() * 60 + end.getMinutes();\r\n\r\n\t\t\t\t\tselects[0].disabled = input.checked;\r\n\t\t\t\t\tselects[1].disabled = input.checked;\r\n\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (scheduler.config.event_duration && scheduler.config.auto_end_date) {\r\n\r\n\t\t\tvar _update_minical_select = function () {\r\n\t\t\t\tif (!(scheduler.config.auto_end_date && scheduler.config.event_duration)){\r\n\t\t\t\t\t// setting may be disabled after the handler is attached\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tstart_date = scheduler.date.add(inputs[0]._date, selects[0].value, \"minute\");\r\n\t\t\t\tend_date = new Date(start_date.getTime() + (scheduler.config.event_duration * 60 * 1000));\r\n\r\n\t\t\t\tinputs[1].value = scheduler.templates.calendar_time(end_date);\r\n\t\t\t\tinputs[1]._date = scheduler.date.date_part(new Date(end_date));\r\n\r\n\t\t\t\tselects[1].value = end_date.getHours() * 60 + end_date.getMinutes();\r\n\t\t\t};\r\n\r\n\t\t\tif(!selects[0].$_eventAttached){\r\n\t\t\t\tselects[0].addEventListener(\"change\", _update_minical_select); // only update on first select should trigger update so user could define other end date if he wishes too\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction _attach_action(inp, date, number) {\r\n\t\t\t_init_once(inp, date, number);\r\n\t\t\tinp.value = scheduler.templates.calendar_time(date);\r\n\t\t\tinp._date = scheduler.date.date_part(new Date(date));\r\n\t\t}\r\n\r\n\t\t_attach_action(inputs[0], ev.start_date, 0);\r\n\t\t_attach_action(inputs[1], ev.end_date, 1);\r\n\t\t_init_once = function() {};\r\n\r\n\t\tfunction _round_minutes(date) {\r\n\t\t\tvar time_values = config._time_values;\r\n\t\t\tvar direct_value = date.getHours() * 60 + date.getMinutes();\r\n\t\t\tvar fixed_value = direct_value;\r\n\t\t\tvar value_found = false;\r\n\r\n\t\t\tfor (var k = 0; k < time_values.length; k++) {\r\n\t\t\t\tvar t_v = time_values[k];\r\n\t\t\t\tif (t_v === direct_value) {\r\n\t\t\t\t\tvalue_found = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif (t_v < direct_value)\r\n\t\t\t\t\tfixed_value = t_v;\r\n\t\t\t}\r\n\r\n\t\t\tif(!(value_found || fixed_value))\r\n\t\t\t\treturn -1;\r\n\r\n\t\t\treturn (value_found) ? direct_value : fixed_value;\r\n\t\t}\r\n\r\n\t\tselects[0].value = _round_minutes(ev.start_date);\r\n\t\tselects[1].value = _round_minutes(ev.end_date);\r\n\r\n\t},\r\n\tget_value: function(node, ev) {\r\n\t\tvar inputs = node.getElementsByTagName(\"input\");\r\n\t\tvar selects = node.getElementsByTagName(\"select\");\r\n\r\n\t\tev.start_date = scheduler.date.add(inputs[0]._date, selects[0].value, \"minute\");\r\n\t\tev.end_date = scheduler.date.add(inputs[1]._date, selects[1].value, \"minute\");\r\n\r\n\t\tif (ev.end_date <= ev.start_date)\r\n\t\t\tev.end_date = scheduler.date.add(ev.start_date, scheduler.config.time_step, \"minute\");\r\n\t\treturn {\r\n\t\t\tstart_date: new Date(ev.start_date),\r\n\t\t\tend_date: new Date(ev.end_date)\r\n\t\t};\r\n\t},\r\n\tfocus: function(node) {\r\n\t}\r\n};\r\nscheduler.linkCalendar = function(calendar, datediff) {\r\n\tvar action = function() {\r\n\t\tvar date = scheduler._date;\r\n\t\tvar dateNew = new Date(date.valueOf());\r\n\t\tif (datediff) dateNew = datediff(dateNew);\r\n\t\tdateNew.setDate(1);\r\n\t\tscheduler.updateCalendar(calendar, dateNew);\r\n\t\treturn true;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", action);\r\n\tscheduler.attachEvent(\"onXLE\", action);\r\n\tscheduler.attachEvent(\"onEventAdded\", action);\r\n\tscheduler.attachEvent(\"onEventChanged\", action);\r\n\tscheduler.attachEvent(\"onEventDeleted\", action);\r\n\taction();\r\n};\r\n\r\nscheduler._markCalendarCurrentDate = function(calendar) {\r\n\tvar state = scheduler.getState();\r\n\tvar from = state.min_date;\r\n\tvar to = state.max_date;\r\n\tvar mode = state.mode;\r\n\r\n\tvar month_start = scheduler.date.month_start(new Date(calendar._date));\r\n\tvar month_end = scheduler.date.add(month_start, 1, \"month\");\r\n\r\n\tvar noHighlight = {\r\n\t\t\"month\":true,\r\n\t\t\"year\":true,\r\n\t\t\"agenda\":true,\r\n\t\t\"grid\":true\r\n\t};\r\n\t// no need to highlight current dates for a large range views - agenda, year, etc.\r\n\tif(noHighlight[mode] || (from.valueOf() <= month_start.valueOf() && to.valueOf() >= month_end.valueOf())){\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar current = from;\r\n\twhile(current.valueOf() < to.valueOf()){\r\n\t\tif (month_start.valueOf() <= current.valueOf() && month_end > current) {\r\n\t\t\tscheduler.markCalendar(calendar, current, \"dhx_calendar_click\");\r\n\t\t}\r\n\t\tcurrent = scheduler.date.add(current, 1, \"day\");\r\n\t}\r\n};\r\n\r\nscheduler.attachEvent(\"onEventCancel\", function(){\r\n\tscheduler.destroyCalendar(null, true);\r\n});\r\n\r\nscheduler.attachEvent(\"onDestroy\", function(){\r\n\tscheduler.destroyCalendar();\r\n});\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\tscheduler.xy.scroll_width = 0;\r\n\r\n\tvar old = scheduler.render_view_data;\r\n\tscheduler.render_view_data=function(){\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\t\tdata.firstChild._h_fix = true;\r\n\r\n\t\told.apply(scheduler,arguments);\r\n\r\n\r\n\r\n\t\tvar height = parseInt(data.style.height);\r\n\t\tdata.style.height=\"1px\";\r\n\t\tdata.style.height=data.scrollHeight+\"px\";\r\n\r\n\t\tthis._obj.style.height = this._obj.clientHeight + data.scrollHeight - height + \"px\";\r\n\t};\r\n\r\n\tvar old_s=scheduler._reset_month_scale;\r\n\tscheduler._reset_month_scale=function(a,b,c,d){\r\n\t\tvar dummy = {clientHeight:100};\r\n\t\told_s.apply(scheduler,[dummy,b,c,d]);\r\n\t\ta.innerHTML = dummy.innerHTML;\r\n\t};\r\n\r\n});\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Multisection\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\n\r\nfunction parseXMLOptions(loader, config){\r\n\tvar items = scheduler.ajax.xpath(\"//data/item\", loader.xmlDoc);\r\n\tvar ids = {};\r\n\tfor (var i = 0; i < items.length; i++) {\r\n\t\tids[items[i].getAttribute(config.map_to)] = true;\r\n\t}\r\n\treturn ids;\r\n}\r\n\r\nfunction parseJSONOptions(loader, config){\r\n\ttry{\r\n\t\tvar items = JSON.parse(loader.xmlDoc.responseText);\r\n\t\tvar ids = {};\r\n\t\tfor (var i = 0; i < items.length; i++) {\r\n\t\t\tvar option = items[i];\r\n\r\n\t\t\tids[option.value || option.key || option.id] = true;\r\n\t\t}\r\n\t\treturn ids;\r\n\t}catch(e){\r\n\t\treturn null;\r\n\t}\r\n}\r\n\r\nscheduler.form_blocks[\"multiselect\"]={\r\n\trender:function(sns) {\r\n\t\tvar css = \"dhx_multi_select_control dhx_multi_select_\"+sns.name;\r\n\t\tif(!!sns.vertical){\r\n\t\t\tcss += \" dhx_multi_select_control_vertical\";\r\n\t\t}\r\n\r\n\t\tvar _result = \"
\";\r\n\t\tfor (var i=0; i\"+sns.options[i].label+\"\";\r\n\t\t}\r\n\t\t_result += \"
\";\r\n\t\treturn _result;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\r\n\t\tvar _children = node.getElementsByTagName('input');\r\n\t\tfor(var i=0;i<_children.length;i++) {\r\n\t\t\t_children[i].checked = false; //unchecking all inputs on the form\r\n\t\t}\r\n\r\n\t\tfunction _mark_inputs(ids) { // ids = [ 0: undefined, 1: undefined, 2: true, 'custom_name': false ... ]\r\n\t\t\tvar _children = node.getElementsByTagName('input');\r\n\t\t\tfor(var i=0;i<_children.length; i++) {\r\n\t\t\t\t_children[i].checked = !! ids[_children[i].value];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar _ids = {};\r\n\t\tif (ev[config.map_to]) {\r\n\t\t\tvar results = (ev[config.map_to] + \"\").split(config.delimiter || scheduler.config.section_delimiter || \",\");\r\n\t\t\tfor (var i = 0; i < results.length; i++) {\r\n\t\t\t\t_ids[results[i]] = true;\r\n\t\t\t}\r\n\t\t\t_mark_inputs(_ids);\r\n\t\t} else {\r\n\t\t\tif (scheduler._new_event || !config.script_url)\r\n\t\t\t\treturn;\r\n\t\t\tvar divLoading = document.createElement('div');\r\n\t\t\tdivLoading.className = 'dhx_loading';\r\n\t\t\tdivLoading.style.cssText = \"position: absolute; top: 40%; left: 40%;\";\r\n\t\t\tnode.appendChild(divLoading);\r\n\r\n\t\t\tvar url = [\r\n\t\t\t\tconfig.script_url,\r\n\t\t\t\t(config.script_url.indexOf(\"?\") == -1 ? \"?\" : \"&\"),\r\n\t\t\t\t'dhx_crosslink_' + config.map_to + '=' + ev.id + '&uid=' + scheduler.uid()\r\n\t\t\t].join(\"\");\r\n\r\n\t\t\tscheduler.ajax.get(url, function(loader) {\r\n\t\t\t\tvar options = parseJSONOptions(loader, config);\r\n\t\t\t\tif(!options){\r\n\t\t\t\t\toptions = parseXMLOptions(loader, config);\r\n\t\t\t\t}\r\n\t\t\t\t_mark_inputs(options);\r\n\t\t\t\tnode.removeChild(divLoading);\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tvar _result = [];\r\n\t\tvar _children = node.getElementsByTagName(\"input\");\r\n\t\tfor(var i=0;i<_children.length;i++) {\r\n\t\t\tif(_children[i].checked)\r\n\t\t\t\t_result.push(_children[i].value);\r\n\t\t}\r\n\t\treturn _result.join(config.delimiter || scheduler.config.section_delimiter || \",\");\r\n\t},\r\n\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\r\n\tfunction backup(obj){\r\n\t\tvar t = function(){};\r\n\t\tt.prototype = obj;\r\n\t\treturn t;\r\n\t}\r\n\r\n\tvar old = scheduler._load;\r\n\tscheduler._load=function(url,from){\r\n\t\turl=url||this._load_url;\r\n\t\tif (typeof url == \"object\"){\r\n\t\t\tvar t = backup(this._loaded);\r\n\t\t\tfor (var i=0; i < url.length; i++) {\r\n\t\t\t\tthis._loaded=new t();\r\n\t\t\t\told.call(this,url[i],from);\r\n\t\t\t}\r\n\t\t} else\r\n\t\t\told.apply(this,arguments);\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\t/* global Backbone */\r\n\tvar cfg = {\r\n\t\tuse_id : false\r\n\t};\r\n\r\n\t//remove private properties\r\n\tfunction sanitize(ev){\r\n\t\tvar obj = {};\r\n\t\tfor (var key in ev)\r\n\t\t\tif (key.indexOf(\"_\") !== 0)\r\n\t\t\t\tobj[key] = ev[key];\r\n\r\n\t\tif (!cfg.use_id)\r\n\t\t\tdelete obj.id;\r\n\r\n\t\treturn obj;\r\n\t}\r\n\r\n\tvar update_timer;\r\n\tfunction update_view(){\r\n\t\tclearTimeout(update_timer);\r\n\t\tupdate_timer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler.updateView();\r\n\t\t},1);\r\n\t}\r\n\r\n\tfunction _start_ext_load(cal){\r\n\t\tcal._loading = true;\r\n\t\tcal._not_render = true;\r\n\r\n\t\tcal.callEvent(\"onXLS\", []);\r\n\t}\r\n\tfunction _finish_ext_load(cal){\r\n\t\tcal._not_render = false;\r\n\t\tif (cal._render_wait)\r\n\t\t\tcal.render_view_data();\r\n\t\tcal._loading = false;\r\n\r\n\t\tcal.callEvent(\"onXLE\", []);\r\n\t}\r\n\r\n\r\n\tfunction _get_id(model){\r\n\t\treturn cfg.use_id ? model.id : model.cid;\r\n\t}\r\n\r\nscheduler.backbone = function(events, config){\r\n\tif (config) cfg = config;\r\n\r\n\tevents.bind(\"change\", function(model, info){\r\n\t\tvar cid = _get_id(model);\r\n\t\tvar ev = scheduler._events[cid] = model.toJSON();\r\n\t\tev.id = cid;\r\n\r\n\t\tscheduler._init_event(ev);\r\n\t\tupdate_view();\r\n\t});\r\n\tevents.bind(\"remove\", function(model, changes){\r\n\t\tvar cid = _get_id(model);\r\n\t\tif (scheduler._events[cid])\r\n\t\t\tscheduler.deleteEvent(cid);\r\n\t});\r\n\r\n\tvar queue = [];\r\n\tfunction add_from_queue(){\r\n\t\tif(scheduler.$destroyed){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (queue.length){\r\n\t\t\tscheduler.parse(queue, \"json\");\r\n\t\t\tqueue = [];\r\n\t\t}\r\n\t}\r\n\r\n\tevents.bind(\"add\", function(model, changes){\r\n\t\tvar cid = _get_id(model);\r\n\t\tif (!scheduler._events[cid]){\r\n\t\t\tvar ev = model.toJSON();\r\n\t\t\tev.id = cid;\r\n\t\t\tscheduler._init_event(ev);\r\n\r\n\t\t\tqueue.push(ev);\r\n\t\t\tif (queue.length == 1)\r\n\t\t\t\tsetTimeout(add_from_queue,1);\r\n\t\t}\r\n\t});\r\n\r\n\tevents.bind(\"request\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_start_ext_load(scheduler);\r\n\t});\r\n\tevents.bind(\"sync\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_finish_ext_load(scheduler);\r\n\t});\r\n\tevents.bind(\"error\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_finish_ext_load(scheduler);\r\n\t});\r\n\r\n\r\n\tscheduler.attachEvent(\"onEventCreated\", function(id){\r\n\t\tvar ev = new events.model(scheduler.getEvent(id));\r\n\t\tscheduler._events[id] = ev.toJSON();\r\n\t\tscheduler._events[id].id = id;\r\n\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onEventAdded\", function(id){\r\n\t\tif (!events.get(id)){\r\n\t\t\tvar data = sanitize(scheduler.getEvent(id));\r\n\t\t\tvar model = new events.model(data);\r\n\r\n\t\t\tvar cid = _get_id(model);\r\n\t\t\tif (cid != id)\r\n\t\t\t\tthis.changeEventId(id, cid);\r\n\t\t\tevents.add(model);\r\n\t\t\tevents.trigger(\"scheduler:add\", model);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventChanged\", function(id){\r\n\t\tvar ev = events.get(id);\r\n\t\tvar upd = sanitize(scheduler.getEvent(id));\r\n\r\n\t\tev.set(upd);\r\n\t\tevents.trigger(\"scheduler:change\", ev);\r\n\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventDeleted\", function(id){\r\n\t\tvar model = events.get(id);\r\n\t\tif (model){\r\n\t\t\tevents.trigger(\"scheduler:remove\", model);\r\n\t\t\tevents.remove(id);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\t/* global dhtmlDragAndDropObject, dhtmlx */\r\n// lame old code doesn't provide raw event object\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\t\tvar dragger = (new dhtmlDragAndDropObject());\r\n\t\tvar old = dragger.stopDrag;\r\n\t\tvar last_event;\r\n\t\tdragger.stopDrag = function(e) {\r\n\t\t\tlast_event = e;\r\n\t\t\treturn old.apply(this, arguments);\r\n\t\t};\r\n\r\n\t\tfunction on_drop(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml) {\r\n\r\n\t\t\tif (scheduler.checkEvent(\"onBeforeExternalDragIn\") && !scheduler.callEvent(\"onBeforeExternalDragIn\", [sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml, last_event]))\r\n\t\t\t\treturn;\r\n\r\n\t\t\tvar temp = scheduler.attachEvent(\"onEventCreated\", function (id) {\r\n\t\t\t\tif (!scheduler.callEvent(\"onExternalDragIn\", [id, sourceHtmlObject, last_event])) {\r\n\t\t\t\t\tthis._drag_mode = this._drag_id = null;\r\n\t\t\t\t\tthis.deleteEvent(id);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tvar action_data = scheduler.getActionData(last_event);\r\n\t\t\tvar event_data = {\r\n\t\t\t\tstart_date: new Date(action_data.date)\r\n\t\t\t};\r\n\r\n\t\t\t// custom views, need to assign section id, fix dates\r\n\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\tvar view_options = scheduler.matrix[scheduler._mode];\r\n\t\t\t\tevent_data[view_options.y_property] = action_data.section;\r\n\r\n\t\t\t\tvar pos = scheduler._locate_cell_timeline(last_event);\r\n\t\t\t\tevent_data.start_date = view_options._trace_x[pos.x];\r\n\t\t\t\tevent_data.end_date = scheduler.date.add(event_data.start_date, view_options.x_step, view_options.x_unit);\r\n\t\t\t}\r\n\t\t\tif (scheduler._props && scheduler._props[scheduler._mode]) {\r\n\t\t\t\tevent_data[scheduler._props[scheduler._mode].map_to] = action_data.section;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler.addEventNow(event_data);\r\n\r\n\t\t\tscheduler.detachEvent(temp);\r\n\t\t}\r\n\r\n\t\tdragger.addDragLanding(scheduler._els[\"dhx_cal_data\"][0], {\r\n\t\t\t_drag: function(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml) {\r\n\t\t\t\ton_drop(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml);\r\n\t\t\t},\r\n\t\t\t_dragIn: function(htmlObject, shtmlObject) {\r\n\t\t\t\treturn htmlObject;\r\n\t\t\t},\r\n\t\t\t_dragOut: function(htmlObject) {\r\n\t\t\t\treturn this;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(dhtmlx.DragControl) {\r\n\t\t\tdhtmlx.DragControl.addDrop(scheduler._els[\"dhx_cal_data\"][0], {\r\n\t\t\t\tonDrop: function (source, target, d, e) {\r\n\t\t\t\t\tvar sourceDhtmlx = dhtmlx.DragControl.getMaster(source);\r\n\t\t\t\t\tlast_event = e;\r\n\t\t\t\t\ton_drop(source, sourceDhtmlx, target, e.target || e.srcElement);\r\n\t\t\t\t},\r\n\r\n\t\t\t\tonDragIn: function (source, target, e) {\r\n\t\t\t\t\treturn target;\r\n\t\t\t\t}\r\n\t\t\t}, true);\r\n\t\t}\r\n\t});\r\n\r\n}","export default function(scheduler){\r\n\r\n\tvar dx, dy,\r\n\t\thtml_regexp = new RegExp(\"<[^>]*>\", \"g\"),\r\n\t\tnewline_regexp = new RegExp(\"]*>\", \"g\");\r\n\r\n\tfunction clean_html(val) {\r\n\t\treturn val.replace(newline_regexp, \"\\n\").replace(html_regexp, \"\");\r\n\t}\r\n\r\n\tfunction x_norm(x, offset) {\r\n\t\tx = parseFloat(x);\r\n\t\toffset = parseFloat(offset);\r\n\t\tif (!isNaN(offset)) x -= offset;\r\n\r\n\t\tvar w = colsWidth(x);\r\n\t\tx = x - w.width + w.cols*dx;\r\n\t\treturn isNaN(x)?\"auto\":(100*x/(dx));\r\n\t}\r\n\r\n\tfunction x_norm_event(x, offset, is_left) {\r\n\t\tx = parseFloat(x);\r\n\t\toffset = parseFloat(offset);\r\n\t\tif (!isNaN(offset) && is_left) x -= offset;\r\n\r\n\t\tvar w = colsWidth(x);\r\n\t\tx = x - w.width + w.cols*dx;\r\n\t\treturn isNaN(x)?\"auto\":(100*x/(dx-(!isNaN(offset)?offset:0)));\r\n\t}\r\n\tfunction colsWidth(width) {\r\n\t\tvar r = 0;\r\n\t\tvar header = scheduler._els.dhx_cal_header[0].childNodes;\r\n\t\tvar els = header[1] ? header[1].childNodes : header[0].childNodes;\r\n\t\tfor (var i = 0; i < els.length; i++) {\r\n\t\t\tvar el = els[i].style ? els[i] : els[i].parentNode;\r\n\t\t\tvar w = parseFloat(el.style.width);\r\n\t\t\tif (width > w){\r\n\t\t\t\twidth -= (w+1);\r\n\t\t\t\tr+=(w+1);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\treturn { width: r, cols: i };\r\n\t}\r\n\r\n\tfunction y_norm(y) {\r\n\t\ty = parseFloat(y);\r\n\t\tif (isNaN(y)) return \"auto\";\r\n\t\treturn 100 * y / dy;\r\n\t}\r\n\r\n\tfunction get_style(node, style){\r\n\t\treturn (window.getComputedStyle?(window.getComputedStyle(node, null)[style]):(node.currentStyle?node.currentStyle[style]:null))||\"\";\r\n\t}\r\n\r\n\tfunction de_day(node, n) {\r\n\t\tvar x = parseInt(node.style.left, 10);\r\n\r\n\t\tfor (var dx = 0; dx < scheduler._cols.length; dx++) {\r\n\t\t\tx -= scheduler._cols[dx];\r\n\t\t\tif (x < 0) return dx;\r\n\t\t}\r\n\t\treturn n;\r\n\t}\r\n\r\n\tfunction de_week(node, n) {\r\n\t\tvar y = parseInt(node.style.top, 10);\r\n\t\tfor (var dy = 0; dy < scheduler._colsS.heights.length; dy++)\r\n\t\t\tif (scheduler._colsS.heights[dy] > y) return dy;\r\n\t\treturn n;\r\n\t}\r\n\r\n\tfunction xml_start(tag) {\r\n\t\treturn tag ? \"<\"+tag+\">\" : \"\";\r\n\t}\r\n\tfunction xml_end(tag) {\r\n\t\treturn tag ? \"\" : \"\";\r\n\t}\r\n\r\n\tfunction xml_top(tag, profile, header, footer) {\r\n\t\tvar xml = \"<\"+tag+\" profile='\" + profile + \"'\";\r\n\t\tif (header)\r\n\t\t\txml += \" header='\" + header + \"'\";\r\n\t\tif (footer)\r\n\t\t\txml += \" footer='\" + footer + \"'\";\r\n\t\txml += \">\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_body_header() {\r\n\t\tvar xml = \"\";\r\n\t\t// detects if current mode is timeline\r\n\t\tvar mode = scheduler._mode;\r\n\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode])\r\n\t\t\tmode = (scheduler.matrix[scheduler._mode].render == \"cell\") ? \"matrix\" : \"timeline\";\r\n\t\txml += \"\";\r\n\r\n\t\tif (scheduler._mode == \"week_agenda\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_data[0].getElementsByTagName(\"DIV\");\r\n\t\t\tfor (var i = 0; i < xh.length; i++)\r\n\t\t\t\tif (xh[i].className == \"dhx_wa_scale_bar\")\r\n\t\t\t\t\txml += \"\" + clean_html(xh[i].innerHTML) + \"\";\r\n\t\t} else if (scheduler._mode == \"agenda\" || scheduler._mode == \"map\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_header[0].childNodes[0].childNodes;\r\n\r\n\t\t\txml += \"\" + clean_html(xh[0].innerHTML) + \"\" + clean_html(xh[1].innerHTML) + \"\";\r\n\t\t} else if (scheduler._mode == \"year\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_data[0].childNodes;\r\n\t\t\tfor (var i = 0; i < xh.length; i++) {\r\n\t\t\t\txml += \"\";\r\n\t\t\t\txml += xml_month_scale(xh[i].querySelector(\".dhx_year_week\").childNodes);\r\n\t\t\t\txml += xml_month(xh[i].querySelector(\".dhx_year_body\"));\r\n\t\t\t\txml += \"\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\txml += \"\";\r\n\t\t\tvar xh = scheduler._els.dhx_cal_header[0].childNodes;\r\n\t\t\txml += xml_month_scale(xh);\r\n\t\t\txml += \"\";\r\n\r\n\t\t\tvar yh = scheduler._els.dhx_cal_data[0];\r\n\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tfor (var i = 0; i < yh.firstChild.rows.length; i++) {\r\n\t\t\t\t\tvar el = yh.firstChild.rows[i];\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t}\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tdy = yh.firstChild.rows[0].cells[0].offsetHeight;\r\n\t\t\t} else if (yh.firstChild.tagName == \"TABLE\") {\r\n\t\t\t\txml += xml_month(yh);\r\n\t\t\t} else {\r\n\t\t\t\tyh = yh.childNodes[yh.childNodes.length - 1];\r\n\t\t\t\twhile (yh.className.indexOf(\"dhx_scale_holder\") == -1)\r\n\t\t\t\t\tyh = yh.previousSibling;\r\n\t\t\t\tyh = yh.childNodes;\r\n\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tfor (var i = 0; i < yh.length; i++)\r\n\t\t\t\t\txml += \"\\n\";\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tdy = yh[0].offsetHeight;\r\n\t\t\t}\r\n\t\t}\r\n\t\txml += \"\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_month(yh) {\r\n\t\tvar xml = \"\";\r\n\t\tvar r = yh.querySelectorAll(\"tr\");\r\n\t\tfor (var i = 0; i < r.length; i++) {\r\n\t\t\tvar days = [];\r\n\t\t\tvar cells = r[i].querySelectorAll(\"td\");\r\n\r\n\t\t\tfor (var j = 0; j < cells.length; j++)\r\n\t\t\t\tdays.push(cells[j].querySelector(\".dhx_month_head\").innerHTML);\r\n\r\n\t\t\txml += \"\\n\";\r\n\t\t\tdy = cells[0].offsetHeight;\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_month_scale(xh) {\r\n\t\tvar xhs,\r\n\t\t\txml = \"\";\r\n\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\tif (scheduler.matrix[scheduler._mode].second_scale)\r\n\t\t\t\txhs = xh[1].childNodes;\r\n\r\n\t\t\txh = xh[0].childNodes;\r\n\t\t}\r\n\r\n\t\tfor (var i = 0; i < xh.length; i++)\r\n\t\t\txml += \"\\n\";\r\n\t\tdx = xh[0].offsetWidth;\r\n\r\n\t\tif (xhs) {\r\n\t\t\tvar width = 0;\r\n\t\t\tvar top_width = xh[0].offsetWidth;\r\n\t\t\tvar top_col = 1;\r\n\t\t\tfor (var i = 0; i < xhs.length; i++) {\r\n\t\t\t\txml += \"\\n\";\r\n\t\t\t\twidth += xhs[i].offsetWidth;\r\n\t\t\t\tif (width >= top_width) {\r\n\t\t\t\t\ttop_width += (xh[top_col] ? xh[top_col].offsetWidth : 0);\r\n\t\t\t\t\ttop_col++;\r\n\t\t\t\t}\r\n\t\t\t\tdx = xhs[0].offsetWidth;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_body(colors) {\r\n\t\tvar xml = \"\";\r\n\t\tvar evs = scheduler._rendered;\r\n\t\tvar matrix = scheduler.matrix && scheduler.matrix[scheduler._mode];\r\n\r\n\t\tif (scheduler._mode == \"agenda\" || scheduler._mode == \"map\") {\r\n\r\n\t\t\tfor (var i = 0; i < evs.length; i++)\r\n xml += \"\";\r\n\r\n\t\t} else if (scheduler._mode == \"week_agenda\") {\r\n\r\n\t\t\tfor (var i = 0; i < evs.length; i++)\r\n\t\t\t\txml += \"\" + clean_html(evs[i].innerHTML) + \"\";\r\n\r\n\t\t} else if (scheduler._mode == \"year\") {\r\n\r\n\t\t\tvar evs = scheduler.get_visible_events();\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar d = evs[i].start_date;\r\n\t\t\t\tif (d.valueOf() < scheduler._min_date.valueOf())\r\n\t\t\t\t\td = scheduler._min_date;\r\n\r\n\t\t\t\twhile (d < evs[i].end_date) {\r\n\t\t\t\t\tvar m = d.getMonth() + 12 * (d.getFullYear() - scheduler._min_date.getFullYear()) - scheduler.week_starts._month;\r\n\t\t\t\t\tvar day = scheduler.week_starts[m] + d.getDate() - 1;\r\n\t\t\t\t\tvar text_color = colors ? get_style(scheduler._get_year_cell(d), \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(scheduler._get_year_cell(d), \"backgroundColor\") : \"\";\r\n\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t\td = scheduler.date.add(d, 1, \"day\");\r\n\t\t\t\t\tif (d.valueOf() >= scheduler._max_date.valueOf())\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (matrix && matrix.render == \"cell\") {\r\n\t\t\tvar evs = scheduler._els.dhx_cal_data[0].getElementsByTagName(\"TD\");\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar text_color = colors ? get_style(evs[i], \"color\") : \"\";\r\n\t\t\t\tvar bg_color = colors ? get_style(evs[i], \"backgroundColor\") : \"\";\r\n\t\t\t\txml += \"\\n\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar zx, zdx;\r\n\t\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\t\t// logic for timeline view\r\n\t\t\t\t\tzx = x_norm(evs[i].style.left);\r\n\t\t\t\t\tzdx = x_norm(evs[i].offsetWidth)-1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// we should use specific logic for day/week/units view\r\n\t\t\t\t\tvar left_norm = scheduler.config.use_select_menu_space ? 0 : 26;\r\n\t\t\t\t\tzx = x_norm_event(evs[i].style.left, left_norm, true);\r\n\t\t\t\t\tzdx = x_norm_event(evs[i].style.width, left_norm)-1;\r\n\t\t\t\t}\r\n\t\t\t\tif (isNaN(zdx * 1)) continue;\r\n\t\t\t\tvar zy = y_norm(evs[i].style.top);\r\n\t\t\t\tvar zdy = y_norm(evs[i].style.height);\r\n\r\n\t\t\t\tvar e_type = evs[i].className.split(\" \")[0].replace(\"dhx_cal_\", \"\");\r\n\t\t\t\tif (e_type === 'dhx_tooltip_line') continue;\r\n\r\n\t\t\t\tvar dets = scheduler.getEvent(evs[i].getAttribute(scheduler.config.event_attribute));\r\n if (!dets) continue;\r\n\t\t\t\tvar day = dets._sday;\r\n\t\t\t\tvar week = dets._sweek;\r\n\t\t\t\tvar length = dets._length || 0;\r\n\r\n\t\t\t\tif (scheduler._mode == \"month\") {\r\n\t\t\t\t\tzdy = parseInt(evs[i].offsetHeight, 10);\r\n\t\t\t\t\tzy = parseInt(evs[i].style.top, 10) - scheduler.xy.month_head_height;\r\n\r\n\t\t\t\t\tday = de_day(evs[i], day);\r\n\t\t\t\t\tweek = de_week(evs[i], week);\r\n\t\t\t\t} else if (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\t\tday = 0;\r\n\t\t\t\t\tvar el = evs[i].parentNode.parentNode.parentNode;\r\n\t\t\t\t\tweek = el.rowIndex;\r\n\t\t\t\t\tvar dy_copy = dy;\r\n\t\t\t\t\tdy = evs[i].parentNode.offsetHeight;\r\n\t\t\t\t\tzy = y_norm(evs[i].style.top);\r\n\t\t\t\t\tzy -= zy * 0.2;\r\n\t\t\t\t\tdy = dy_copy;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (evs[i].parentNode == scheduler._els.dhx_cal_data[0]) continue;\r\n\t\t\t\t\tvar parent = scheduler._els[\"dhx_cal_data\"][0].childNodes[0];\r\n\t\t\t\t\tvar offset = parseFloat(parent.className.indexOf(\"dhx_scale_holder\") != -1 ? parent.style.left : 0);\r\n\t\t\t\t\tzx += x_norm(evs[i].parentNode.style.left, offset);\r\n\t\t\t\t}\r\n\r\n\t\t\t\txml += \"\\n\";\r\n\r\n\t\t\t\tif (e_type == \"event\") {\r\n\t\t\t\t\txml += \"
\";\r\n\t\t\t\t\tvar text_color = colors ? get_style(evs[i].childNodes[2], \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(evs[i].childNodes[2], \"backgroundColor\") : \"\";\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvar text_color = colors ? get_style(evs[i], \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(evs[i], \"backgroundColor\") : \"\";\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t}\r\n\t\t\t\txml += \"
\";\r\n\t\t\t}\r\n\t\t\t}\r\n\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction toXML(start, end, view, mode, header, footer){\r\n\t\tvar colors = false;\r\n\t\tif (mode == \"fullcolor\") {\r\n\t\t\tcolors = true;\r\n\t\t\tmode = \"color\";\r\n\t\t}\r\n\r\n\t\tmode = mode || \"color\";\r\n\r\n\t\tvar xml = \"\";\r\n\t\tif (start) {\r\n\r\n\t\t\tvar original_date = scheduler._date;\r\n\t\t\tvar original_mode = scheduler._mode;\r\n\t\t\tend = scheduler.date[view+\"_start\"](end);\r\n\t\t\tend = scheduler.date[\"get_\"+view+\"_end\"] ? scheduler.date[\"get_\"+view+\"_end\"](end) : scheduler.date.add(end, 1, view);\r\n\r\n\t\t\txml = xml_top(\"pages\", mode, header, footer);\r\n\t\t\tfor (var temp_date = new Date(start); +temp_date < +end; temp_date = this.date.add(temp_date, 1, view)) {\r\n\t\t\t\tthis.setCurrentView(temp_date, view);\r\n\t\t\t\txml += xml_start(\"page\") + xml_body_header().replace(\"\\u2013\", \"-\") + xml_body(colors) + xml_end(\"page\");\r\n\t\t\t}\r\n\t\t\txml += xml_end(\"pages\");\r\n\r\n\t\t\tthis.setCurrentView(original_date, original_mode);\r\n\t\t} else {\r\n\t\t\txml = xml_top(\"data\", mode, header, footer) + xml_body_header().replace(\"\\u2013\", \"-\") + xml_body(colors) + xml_end(\"data\");\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\tscheduler.getPDFData = toXML;\r\n\tfunction send_xml(xml, url){\r\n\t\tvar uid = scheduler.uid();\r\n\t\tvar d = document.createElement(\"div\");\r\n\t\td.style.display = \"none\";\r\n\t\tdocument.body.appendChild(d);\r\n\r\n\t\td.innerHTML = '
';\r\n\t\tdocument.getElementById(uid).firstChild.value = encodeURIComponent(xml);\r\n\t\tdocument.getElementById(uid).submit();\r\n\t\td.parentNode.removeChild(d);\r\n\t}\r\n\r\n\tfunction to_pdf(start, end, view, url, mode, header, footer) {\r\n\t\tvar xml = \"\";\r\n\t\tif(typeof mode == \"object\"){\r\n\t\t\txml = schedulersToPdf(mode);\r\n\t\t}else{\r\n\t\t\txml = toXML.apply(this, [start, end, view, mode, header, footer]);\r\n\t\t}\r\n\r\n\t\tsend_xml(xml, url);\r\n\t}\r\n\r\n\tfunction schedulersToPdf(objects){\r\n\t\tvar xml = \"\";\r\n\t\tfor(var i=0; i < objects.length; i++){\r\n\t\t\txml += objects[i].source.getPDFData(objects[i].start, objects[i].end, objects[i].view, objects[i].mode, objects[i].header, objects[i].footer);\r\n\t\t}\r\n\t\txml += \"\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\t/*\r\n\t * scheduler.toPDF(url, mode, header, footer) - for a single scheduler\r\n\t * scheduler.toPDF(url, [scheduler1, scheduler2,...]) - for multiple schedulers\r\n\t * example:\r\n\t * scheduler.toPDF(\"generate.ashx\", [\r\n\t * { source: scheduler1, mode: \"color\" },\r\n\t * { source: scheduler2, mode: \"gray\", view:\"week\", start:new Date(2013, 06, 1), end:new Date(2013, 06, 28) },\r\n\t * { source: scheduler3 }\r\n\t * ]);\r\n\t *\r\n\t */\r\n\tscheduler.toPDF = function(url, mode, header, footer) {\r\n\t\treturn to_pdf.apply(this, [null, null, null, url, mode, header, footer]);\r\n\t};\r\n\tscheduler.toPDFRange = function(start, end, view, url, mode, header, footer) {\r\n\t\tif (typeof start == \"string\") {\r\n\t\t\tstart = scheduler.templates.api_date(start);\r\n\t\t\tend = scheduler.templates.api_date(end);\r\n\t\t}\r\n\r\n\t\treturn to_pdf.apply(this, arguments);\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.icons_select = [\"icon_form\", \"icon_delete\"];\r\nscheduler.config.details_on_create = true;\r\nscheduler.config.show_quick_info = true;\r\nscheduler.xy.menu_width = 0;\r\n\r\nscheduler.attachEvent(\"onClick\", function(id){\r\n\tif(!scheduler.config.show_quick_info){\r\n\t\treturn;\r\n\t}\r\n\tscheduler.showQuickInfo(id);\r\n\treturn true;\r\n});\r\n\r\n(function(){\r\n\t// pass `force` argument in order to hide quick info synchronously\r\n\t// so it won't affect showQuickInfo call that can follow\r\n\tvar events = [\"onEmptyClick\", \"onViewChange\", \"onLightbox\", \"onBeforeEventDelete\", \"onBeforeDrag\"];\r\n\tvar hiding_function = function(){\r\n\t\tscheduler.hideQuickInfo(true);\r\n\t\treturn true;\r\n\t};\r\n\tfor (var i=0; i window.innerWidth){\r\n\t\t\tleft = window.innerWidth - width;\r\n\t\t}\r\n\t\tleft = Math.max(0, left);\r\n\r\n\t\tqi.style.left = left + \"px\";\r\n\t\tqi.style.top = pos.top - (pos.dy?height:-pos.height) + \"px\";\r\n\t} else {\r\n\r\n\t\tconst dataPos = scheduler.$container.querySelector('.dhx_cal_data').offsetTop;\r\n\t\tqi.style.top = dataPos + 20 + \"px\";\r\n\t\tif (pos.dx == 1){\r\n\t\t\tqi.style.right = \"auto\";\r\n\t\t\tqi.style.left = -width + \"px\";\r\n\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tqi.style.left = \"-10px\";\r\n\t\t\t},1);\r\n\t\t} else {\r\n\t\t\tqi.style.left = \"auto\";\r\n\t\t\tqi.style.right = -width + \"px\";\r\n\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tqi.style.right = \"-10px\";\r\n\t\t\t},1);\r\n\t\t}\r\n\t\tqi.className = qi.className.replace(\" dhx_qi_left\",\"\").replace(\" dhx_qi_right\",\"\")+\" dhx_qi_\"+(pos.dx==1?\"left\":\"right\");\r\n\t}\r\n};\r\nscheduler.attachEvent(\"onTemplatesReady\", function(){\r\n\tscheduler.hideQuickInfo();\r\n\tif(this._quick_info_box){\r\n\t\tvar box = this._quick_info_box;\r\n\t\tif(box.parentNode){\r\n\t\t\tbox.parentNode.removeChild(box);\r\n\t\t}\r\n\t\tthis._quick_info_box = null;\r\n\t}\r\n});\r\nscheduler._quick_info_onscroll_handler = function(e){\r\n\tscheduler.hideQuickInfo();\r\n};\r\nscheduler._init_quick_info = function(){\r\n\tif (!this._quick_info_box){\r\n\r\n\r\n\t\tvar qi = this._quick_info_box = document.createElement(\"div\");\r\n\r\n\t\tthis._waiAria.quickInfoAttr(qi);\r\n\r\n\t\tqi.className = \"dhx_cal_quick_info\";\r\n\t\tif (scheduler.$testmode)\r\n\t\t\tqi.className += \" dhx_no_animate\";\r\n\t\tif (scheduler.config.rtl) qi.className += \" dhx_quick_info_rtl\";\r\n\t//title\r\n\t\tvar ariaAttr = this._waiAria.quickInfoHeaderAttrString();\r\n\t\tvar html = `\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t\t
\r\n\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t\t
`;\r\n\r\n\t//buttons\r\n\t\thtml += \"
\";\r\n\t\tvar buttons = scheduler.config.icons_select;\r\n\t\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\t\tvar ariaAttr = this._waiAria.quickInfoButtonAttrString(this.locale.labels[buttons[i]]);\r\n\t\t\t\thtml += `
\r\n\t\t\t\t
${scheduler.locale.labels[buttons[i]]}
`;\r\n\t\t\t}\r\n\t\t// }\r\n\t\thtml += \"
\";\r\n\r\n\t\tqi.innerHTML = html;\r\n\t\tscheduler.event(qi, \"click\", function(ev){\r\n\t\t\tscheduler._qi_button_click(ev.target || ev.srcElement);\r\n\t\t});\r\n\t\tif (scheduler.config.quick_info_detached){\r\n\t\t\tscheduler._detachDomEvent(scheduler._els[\"dhx_cal_data\"][0], \"scroll\", scheduler._quick_info_onscroll_handler);\r\n\t\t\tscheduler.event(scheduler._els[\"dhx_cal_data\"][0], \"scroll\", scheduler._quick_info_onscroll_handler);\r\n\t\t}\r\n\t}\r\n\r\n\treturn this._quick_info_box;\r\n};\r\n\r\nscheduler._qi_button_click = function(node){\r\n\tvar box = scheduler._quick_info_box;\r\n\tif (!node || node == box) return;\r\n\r\n\tif(node.closest(\".dhx_cal_qi_close_btn\")){\r\n\t\tscheduler.hideQuickInfo();\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar mask = scheduler._getClassName(node);\r\n\tif (mask.indexOf(\"_icon\")!=-1){\r\n\t\tvar id = scheduler._quick_info_box_id;\r\n\t\tscheduler._click.buttons[mask.split(\" \")[1].replace(\"icon_\",\"\")](id);\r\n\t} else\r\n\t\tscheduler._qi_button_click(node.parentNode);\r\n};\r\nscheduler._get_event_counter_part = function(id){\r\n\tvar domEv = scheduler.getRenderedEvent(id);\r\n\tvar left = 0;\r\n\tvar top = 0;\r\n\r\n\tvar node = domEv;\r\n\twhile (node && node != scheduler._obj){\r\n\t\tleft += node.offsetLeft;\r\n\t\ttop += node.offsetTop-node.scrollTop;\r\n\t\tnode = node.offsetParent;\r\n\t}\r\n\tif(node){\r\n\t\tvar dx = (left + domEv.offsetWidth/2) > (scheduler._x/2) ? 1 : 0;\r\n\t\tvar dy = (top + domEv.offsetHeight/2) > (scheduler._y/2) ? 1 : 0;\r\n\r\n\t\treturn { left:left, top:top, dx:dx, dy:dy,\r\n\t\t\twidth:domEv.offsetWidth, height:domEv.offsetHeight };\r\n\t}\r\n\treturn 0;\r\n};\r\n\r\nscheduler._fill_quick_data = function(id){\r\n\tvar ev = scheduler.getEvent(id);\r\n\tvar qi = scheduler._quick_info_box;\r\n\r\n\tscheduler._quick_info_box_id = id;\r\n\r\n//title content\r\n\r\n\tvar header = {\r\n\t\tcontent: scheduler.templates.quick_info_title(ev.start_date, ev.end_date, ev),\r\n\t\tdate: scheduler.templates.quick_info_date(ev.start_date, ev.end_date, ev)\r\n\t};\r\n\tvar titleContent = qi.querySelector(\".dhx_cal_qi_tcontent\");\r\n\ttitleContent.innerHTML = `${header.content}`;\r\n\tvar titleDate = qi.querySelector(\".dhx_cal_qi_tdate\");\r\n\ttitleDate.innerHTML = header.date;\r\n\r\n\tscheduler._waiAria.quickInfoHeader(qi, [header.content, header.date].join(\" \"));\r\n\r\n//main content\r\n\tvar main = qi.querySelector(\".dhx_cal_qi_content\");\r\n\tconst mainContent = scheduler.templates.quick_info_content(ev.start_date, ev.end_date, ev);\r\n\tif(mainContent){\r\n\t\tmain.classList.remove(\"dhx_hidden\");\r\n\t\tmain.innerHTML = mainContent;\r\n\t}else{\r\n\t\tmain.classList.add(\"dhx_hidden\");\r\n\t}\r\n};\r\n\r\n\r\n}","export default function(scheduler){\r\n\t\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar originalRecurringSetValue;\r\n\tif (scheduler.form_blocks.recurring) {\r\n\t\toriginalRecurringSetValue = scheduler.form_blocks.recurring.set_value;\r\n\t}\r\n\tvar original_left_buttons = scheduler.config.buttons_left.slice();\r\n\tvar original_right_buttons = scheduler.config.buttons_right.slice();\r\n\r\n\tscheduler.attachEvent(\"onBeforeLightbox\", function(id) {\r\n\t\tif (this.config.readonly_form || this.getEvent(id).readonly) {\r\n\t\t\tthis.config.readonly_active = true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.config.readonly_active = false;\r\n\t\t\tscheduler.config.buttons_left = original_left_buttons.slice();\r\n\t\t\tscheduler.config.buttons_right = original_right_buttons.slice();\r\n\t\r\n\t\t\t// initial value\r\n\t\t\tif(scheduler.form_blocks.recurring) {\r\n\t\t\t\tscheduler.form_blocks.recurring.set_value = originalRecurringSetValue;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar sns = this.config.lightbox.sections;\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\tfor (var i = 0; i < sns.length; i++) {\r\n\t\t\t\tif (sns[i].type == 'recurring') {\r\n\t\t\t\t\tif (this.config.readonly_active && scheduler.form_blocks.recurring) {\r\n\t\t\t\t\t\tscheduler.form_blocks.recurring.set_value = function(node, value, ev) {\r\n\t\t\t\t\t\t\tvar wrapper = scheduler.$domHelpers.closest(node, \".dhx_wrap_section\");\r\n\t\t\t\t\t\t\tvar style = \"none\";\r\n\t\t\t\t\t\t\twrapper.querySelector('.dhx_cal_lsection').display = style;\r\n\t\t\t\t\t\t\twrapper.querySelector('.dhx_form_repeat').display = style;\r\n\t\t\t\t\t\t\twrapper.style.display = style;\r\n\r\n\t\t\t\t\t\t\tscheduler.setLightboxSize();\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar forbidden_buttons = [\"dhx_delete_btn\", \"dhx_save_btn\"];\r\n\t\t\tvar button_arrays = [scheduler.config.buttons_left, scheduler.config.buttons_right];\r\n\t\t\tfor (var i = 0; i < forbidden_buttons.length; i++) {\r\n\t\t\t\tvar forbidden_button = forbidden_buttons[i];\r\n\t\t\t\tfor (var k = 0; k < button_arrays.length; k++) {\r\n\t\t\t\t\tvar button_array = button_arrays[k];\r\n\t\t\t\t\tvar index = -1;\r\n\t\t\t\t\tfor (var p = 0; p < button_array.length; p++) {\r\n\t\t\t\t\t\tif (button_array[p] == forbidden_button) {\r\n\t\t\t\t\t\t\tindex = p;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (index != -1) {\r\n\t\t\t\t\t\tbutton_array.splice(index, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.resetLightbox();\r\n\r\n\t\treturn true;\r\n\t});\r\n\r\n\tfunction txt_replace(tag, d, n, text) {\r\n\t\tvar txts = d.getElementsByTagName(tag);\r\n\t\tvar txtt = n.getElementsByTagName(tag);\r\n\t\tfor (var i = txtt.length - 1; i >= 0; i--) {\r\n\t\t\tvar n = txtt[i];\r\n\t\t\tif (!text){\r\n\t\t\t\tn.disabled = true;\r\n\t\t\t\t//radio and checkboxes loses state after .cloneNode in IE\r\n\t\t\t\tif(d.checked)\r\n\t\t\t\t\tn.checked = true;\r\n\t\t\t}else {\r\n\t\t\t\tvar t = document.createElement(\"span\");\r\n\t\t\t\tt.className = \"dhx_text_disabled\";\r\n\t\t\t\tt.innerHTML = text(txts[i]);\r\n\t\t\t\tn.parentNode.insertBefore(t, n);\r\n\t\t\t\tn.parentNode.removeChild(n);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tvar old = scheduler._fill_lightbox;\r\n\tscheduler._fill_lightbox = function() {\r\n\r\n\t\tvar lb = this.getLightbox();\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\tlb.style.visibility = 'hidden';\r\n\t\t\t// lightbox should have actual sizes before rendering controls\r\n\t\t\t// currently only matters for dhtmlxCombo\r\n\t\t\tlb.style.display = 'block';\r\n\t\t}\r\n\t\tvar res = old.apply(this, arguments);\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\t//reset visibility and display\r\n\t\t\tlb.style.visibility = '';\r\n\t\t\tlb.style.display = 'none';\r\n\t\t}\r\n\r\n\t\tif (this.config.readonly_active) {\r\n\r\n\t\t\tvar originalForm = this.getLightbox();\r\n\t\t\tvar readonlyForm = this._lightbox_r = originalForm.cloneNode(true);\r\n\t\t\treadonlyForm.id = scheduler.uid();\r\n\t\t\treadonlyForm.className += \" dhx_cal_light_readonly\";\r\n\t\t\ttxt_replace(\"textarea\", originalForm, readonlyForm, function(a) {\r\n\t\t\t\treturn a.value;\r\n\t\t\t});\r\n\t\t\ttxt_replace(\"input\", originalForm, readonlyForm, false);\r\n\t\t\ttxt_replace(\"select\", originalForm, readonlyForm, function(a) {\r\n\t\t\t\tif(!a.options.length) return \"\";\r\n\t\t\t\treturn a.options[Math.max((a.selectedIndex || 0), 0)].text;\r\n\t\t\t});\r\n\r\n\t\t\toriginalForm.parentNode.insertBefore(readonlyForm, originalForm);\r\n\r\n\t\t\tthis.showCover(readonlyForm);\r\n\t\t\tif (scheduler._lightbox)\r\n\t\t\t\tscheduler._lightbox.parentNode.removeChild(scheduler._lightbox);\r\n\t\t\tthis._lightbox = readonlyForm;\r\n\r\n\t\t\tif (scheduler.config.drag_lightbox)\r\n\t\t\t\tscheduler.event(readonlyForm.firstChild, \"mousedown\", scheduler._ready_to_dnd);\r\n\t\t\t\t\r\n\t\t\tscheduler._init_lightbox_events();\r\n\t\t\tthis.setLightboxSize();\r\n\t\t}\r\n\t\treturn res;\r\n\t};\r\n\r\n\tvar hold = scheduler.hide_lightbox;\r\n\tscheduler.hide_lightbox = function() {\r\n\t\tif (this._lightbox_r) {\r\n\t\t\tthis._lightbox_r.parentNode.removeChild(this._lightbox_r);\r\n\t\t\tthis._lightbox_r = this._lightbox = null;\r\n\t\t}\r\n\r\n\t\treturn hold.apply(this, arguments);\r\n\t};\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.occurrence_timestamp_in_utc = false;\r\nscheduler.config.recurring_workdays = [1,2,3,4,5];\r\nscheduler.form_blocks[\"recurring\"] = {\r\n\t_get_node : function(node){\r\n\t\tif (typeof node == \"string\"){\r\n\t\t\tlet element = scheduler._lightbox.querySelector(`#${node}`);\r\n\t\t\tif(!element){\r\n\t\t\t\t// form is detached from lightbox \r\n\t\t\t\t// search globally, won't work in LWC\r\n\t\t\t\telement = document.getElementById(node);\r\n\t\t\t}\r\n\t\t\tnode = element;\r\n\t\t}\r\n\t\tif (node.style.display == 'none')\r\n\t\t\tnode.style.display = \"\";\r\n\t\treturn node;\r\n\t},\r\n\t_outer_html: function(node){\r\n\t\treturn node.outerHTML || getOuterHTML(node);\r\n\r\n\t\t//probably not needed, FF v10- only\r\n\t\tfunction getOuterHTML(n){\r\n\t\t\tvar div = document.createElement('div'), h;\r\n\t\t\tdiv.appendChild( n.cloneNode(true) );\r\n\t\t\th = div.innerHTML;\r\n\t\t\tdiv = null;\r\n\t\t\treturn h;\r\n\t\t}\r\n\t},\r\n\trender:function(sns) {\r\n\t\tif(sns.form){\r\n\t\t\tvar rec = scheduler.form_blocks[\"recurring\"];\r\n\t\t\tvar form = rec._get_node(sns.form);\r\n\t\t\tvar html = rec._outer_html(form);\r\n\t\t\tform.style.display = 'none';\r\n\t\t\treturn html;\r\n\t\t}\r\n\t\tvar loc = scheduler.locale.labels;\r\n\t\treturn '
'+\r\n\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t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t\t'
'+\r\n\t\t\t\t'
'+\r\n\t\t\t\t'';\r\n\t},\r\n\t_ds: {},\r\n\t_get_form_node: function(els, name, value){\r\n\t\tvar col = els[name];\r\n\t\tif(!col) return null;\r\n\t\tif(col.nodeName) return col;\r\n\r\n\t\tif(col.length){\r\n\t\t\tfor(var i=0; i < col.length; i++){\r\n\t\t\t\tif(col[i].value == value)\r\n\t\t\t\t\treturn col[i];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\t_get_node_value: function(els, name, multiselect){\r\n\t\tvar col = els[name];\r\n\t\tif(!col) return \"\";\r\n\t\tif(col.length){\r\n\t\t\tif(multiselect){\r\n\t\t\t\tvar res = [];\r\n\t\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\t\tif (col[i].checked) res.push(col[i].value);\r\n\r\n\t\t\t\treturn res;\r\n\t\t\t}else{\r\n\t\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\t\tif (col[i].checked) return col[i].value;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(col.value)\r\n\t\t\treturn !multiselect ? col.value : [col.value];\r\n\t},\r\n\r\n\t_get_node_numeric_value: function(els, name){\r\n\t\tvar value = scheduler.form_blocks[\"recurring\"]._get_node_value(els, name);\r\n\t\treturn ((value * 1) || 0);\r\n\t},\r\n\r\n\t_set_node_value: function(els, name, value){\r\n\t\tvar col = els[name];\r\n\t\tif(!col) return;\r\n\r\n\t\tif(col.name == name){\r\n\t\t\tcol.value = value;\r\n\t\t}else if(col.length){\r\n\t\t\tvar hash_value = typeof value == \"object\";\r\n\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\tif (hash_value || col[i].value == value){\r\n\t\t\t\t\tcol[i].checked = hash_value ? !!value[col[i].value] : !!value;\r\n\t\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t_init_set_value:function(node, value, ev) {\r\n\t\tvar block = scheduler.form_blocks[\"recurring\"];\r\n\t\tvar get_value = block._get_node_value;\r\n\t\tvar set_value = block._set_node_value;\r\n\t\tscheduler.form_blocks[\"recurring\"]._ds = {start:ev.start_date, end:ev._end_date};\r\n\r\n\t\tvar str_date_format = scheduler.date.str_to_date(scheduler.config.repeat_date, false, true);\r\n\t\tvar str_date = function(str_date) {\r\n\t\t\tvar date = str_date_format(str_date);\r\n\t\t\tif (scheduler.config.include_end_by)\r\n\t\t\t\tdate = scheduler.date.add(date, 1, 'day');\r\n\t\t\treturn date;\r\n\t\t};\r\n\r\n\t\tvar date_str = scheduler.date.date_to_str(scheduler.config.repeat_date);\r\n\r\n\t\tvar top = node.getElementsByTagName(\"FORM\")[0];\r\n\t\tvar els = {};\r\n\r\n\t\tfunction register_els(inps) {\r\n\t\t\tfor (var i = 0; i < inps.length; i++) {\r\n\t\t\t\tvar inp = inps[i];\r\n\r\n\t\t\t\tif(inp.name){\r\n\t\t\t\t\tif(!els[inp.name]){\r\n\t\t\t\t\t\tels[inp.name] = inp;\r\n\t\t\t\t\t}else if(els[inp.name].nodeType){\r\n\t\t\t\t\t\tvar node = els[inp.name];\r\n\t\t\t\t\t\tels[inp.name] = [node, inp];\r\n\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tels[inp.name].push(inp);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tregister_els(top.getElementsByTagName(\"INPUT\"));\r\n\t\tregister_els(top.getElementsByTagName(\"SELECT\"));\r\n\r\n\t\tif (!scheduler.config.repeat_date_of_end) {\r\n\t\t\tvar formatter = scheduler.date.date_to_str(scheduler.config.repeat_date);\r\n\t\t\tscheduler.config.repeat_date_of_end = formatter(scheduler.date.add(scheduler._currentDate(), 30, \"day\"));\r\n\t\t}\r\n\t\tset_value(els, \"date_of_end\", scheduler.config.repeat_date_of_end);\r\n\r\n\t\tvar $ = function(a) {\r\n\t\t\treturn scheduler._lightbox.querySelector(`#${a}`) || { style:{} };//return fake object if node not found\r\n\t\t};\r\n\r\n\t\tfunction change_current_view() {\r\n\t\t\t$(\"dhx_repeat_day\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_week\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_month\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_year\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_\" + this.value).style.display = \"\";\r\n\t\t\tscheduler.setLightboxSize();\r\n\t\t}\r\n\r\n\t\tfunction get_repeat_code(dates) {\r\n\t\t\tvar code = [get_value(els, \"repeat\")];\r\n\t\t\tget_rcode[code[0]](code, dates);\r\n\r\n\t\t\twhile (code.length < 5) code.push(\"\");\r\n\t\t\tvar repeat = \"\";\r\n\r\n\t\t\tvar end = get_end_rule(els);\r\n\r\n\t\t\tif (end == \"no\") {\r\n\t\t\t\tdates.end = new Date(9999, 1, 1);\r\n\t\t\t\trepeat = \"no\";\r\n\t\t\t}\r\n\t\t\telse if (end == \"date_of_end\") {\r\n\t\t\t\tdates.end = str_date(get_value(els, \"date_of_end\"));\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tscheduler.transpose_type(code.join(\"_\"));\r\n\t\t\t\trepeat = Math.max(1, get_value(els, \"occurences_count\"));\r\n\r\n\t\t\t\tvar transp = 0;\r\n\r\n\t\t\t\t//var transp = ((code[0] == \"week\" && code[4] && code[4].toString().indexOf(scheduler.config.start_on_monday ? 1 : 0) == -1) ? 1 : 0);\r\n\r\n\t\t\t\t// which is equal to following code, seems to produce extra instance, not clear why needed\r\n\r\n\t\t\t\t/*if(code[0] == \"week\"){\r\n\t\t\t\t\tvar days = code[4] || \"\";\r\n\t\t\t\t\tif(scheduler.config.start_on_monday){\r\n\t\t\t\t\t\tif(days.indexOf(1) == -1)\r\n\t\t\t\t\t\ttransp = 1;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(days.indexOf(0) == -1)\r\n\t\t\t\t\t\ttransp = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}*/\r\n\r\n\t\t\t//\tdates.end = scheduler.date.add(new Date(dates.start), repeat + transp, code.join(\"_\"));\r\n\r\n\t\t\t\tdates.end = scheduler.date[\"add_\" + code.join(\"_\")](new Date(dates.start), repeat + transp, {start_date: dates.start}) || dates.start;\r\n\t\t\t}\r\n\r\n\t\t\treturn code.join(\"_\") + \"#\" + repeat;\r\n\t\t}\r\n\t\tfunction get_end_rule(els){\r\n\t\t\tvar end = els[\"end\"];\r\n\t\t\tif(end.length){\r\n\t\t\t\tfor(var i =0; i < end.length; i++){\r\n\t\t\t\t\tif(end[i].checked){\r\n\t\t\t\t\t\tif(end[i].value && end[i].value != \"on\"){//seems to be default value:var input = document.createElement(\"input\"); input.type = \"radio\"; input.value\r\n\t\t\t\t\t\t\treturn end[i].value;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tif(!i){\r\n\t\t\t\t\t\t\t\treturn \"no\";\r\n\t\t\t\t\t\t\t}else if(i == 2){\r\n\t\t\t\t\t\t\t\treturn \"date_of_end\";\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\treturn \"occurences_count\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(end.value)\r\n\t\t\t\t\treturn end.value;\r\n\t\t\t}\r\n\t\t\treturn \"no\";\r\n\t\t}\r\n\t\tfunction set_end_rule(els, value){\r\n\t\t\tvar end = els[\"end\"];\r\n\r\n\t\t\tif(end.length){\r\n\t\t\t\tvar has_values = !!end[0].value && end[0].value != \"on\";\r\n\t\t\t\tif(has_values){\r\n\t\t\t\t\tfor(var i =0; i < end.length; i++){\r\n\t\t\t\t\t\tif(end[i].value == value)\r\n\t\t\t\t\t\t\tend[i].checked = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar ind = 0;\r\n\t\t\t\t\tswitch(value){\r\n\t\t\t\t\t\tcase \"no\":\r\n\t\t\t\t\t\t\tind = 0;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"date_of_end\":\r\n\t\t\t\t\t\t\tind = 2;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tind = 1;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend[ind].checked = true;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tend.value = value;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tscheduler.form_blocks[\"recurring\"]._get_repeat_code = get_repeat_code;\r\n\t\tvar get_rcode = {\r\n\t\t\tmonth:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tif (get_value(els, \"month_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_count\")));\r\n\t\t\t\t\tdates.start.setDate(get_value(els, \"month_day\"));\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_count2\")));\r\n\t\t\t\t\tcode.push( get_value(els, \"month_day2\"));\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_week2\")));\r\n\t\t\t\t\tif (!scheduler.config.repeat_precise){\r\n\t\t\t\t\t\tdates.start.setDate(1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tdates._start = true;\r\n\t\t\t},\r\n\t\t\tweek:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"week_count\")));\r\n\t\t\t\tcode.push(\"\");\r\n\t\t\t\tcode.push(\"\");\r\n\t\t\t\tvar t = [];\r\n\r\n\t\t\t\tvar col = get_value(els, \"week_day\", true);\r\n\t\t\t\t//var col = els[\"week_day\"];\r\n\t\t\t\tvar day = dates.start.getDay();\r\n\t\t\t\tvar start_exists = false;\r\n\r\n\t\t\t\tfor (var i = 0; i < col.length; i++){\r\n\t\t\t\t\tt.push(col[i]);\r\n\t\t\t\t\tstart_exists = start_exists || col[i] == day;\r\n\t\t\t\t}\r\n\t\t\t\tif (!t.length){\r\n\t\t\t\t\tt.push(day);\r\n\t\t\t\t\tstart_exists = true;\r\n\t\t\t\t}\r\n\t\t\t\tt.sort();\r\n\r\n\r\n\t\t\t\tif (!scheduler.config.repeat_precise){\r\n\t\t\t\t\tdates.start = scheduler.date.week_start(dates.start);\r\n\t\t\t\t\tdates._start = true;\r\n\t\t\t\t} else if (!start_exists){\r\n\t\t\t\t\tscheduler.transpose_day_week(dates.start, t, 1, 7);\r\n\t\t\t\t\tdates._start = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcode.push(t.join(\",\"));\r\n\t\t\t},\r\n\t\t\tday:function(code) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tif (get_value(els, \"day_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"day_count\")));\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcode.push(\"week\");\r\n\t\t\t\t\tcode.push(1);\r\n\t\t\t\t\tcode.push(\"\");\r\n\t\t\t\t\tcode.push(\"\");\r\n\t\t\t\t\tcode.push(scheduler.config.recurring_workdays.join(\",\"));\r\n\t\t\t\t\tcode.splice(0, 1);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tyear:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\r\n\t\t\t\tif (get_value(els, \"year_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(\"1\");\r\n\t\t\t\t\tdates.start.setMonth(0);\r\n\t\t\t\t\tdates.start.setDate(get_value(els, \"year_day\"));\r\n\t\t\t\t\tdates.start.setMonth(get_value(els, \"year_month\"));\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcode.push(\"1\");\r\n\t\t\t\t\tcode.push(get_value(els, \"year_day2\"));\r\n\t\t\t\t\tcode.push(get_value(els, \"year_week2\"));\r\n\t\t\t\t\tdates.start.setDate(1);\r\n\t\t\t\t\tdates.start.setMonth(get_value(els, \"year_month2\"));\r\n\t\t\t\t}\r\n\t\t\t\tdates._start = true;\r\n\t\t\t}\r\n\t\t};\r\n\t\tvar set_rcode = {\r\n\t\t\tweek:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\t\tset_value(els, \"week_count\", code[1]);\r\n\r\n\t\t\t\tvar t = code[4].split(\",\");\r\n\t\t\t\tvar d = {};\r\n\t\t\t\tfor (var i = 0; i < t.length; i++) d[t[i]] = true;\r\n\r\n\t\t\t\tset_value(els, \"week_day\", d);\r\n\r\n\t\t\t\t//for (var i = 0; i < col.length; i++)\r\n\t\t\t\t//\tcol[i].checked = (!!d[col[i].value]);\r\n\t\t\t},\r\n\t\t\tmonth:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\r\n\t\t\t\tif (code[2] === \"\") {\r\n\t\t\t\t\tset_value(els, \"month_type\", \"d\");\r\n\t\t\t\t\tset_value(els, \"month_count\", code[1]);\r\n\t\t\t\t\tset_value(els, \"month_day\", dates.start.getDate());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tset_value(els, \"month_type\", \"w\");\r\n\t\t\t\t\tset_value(els, \"month_count2\", code[1]);\r\n\t\t\t\t\tset_value(els, \"month_week2\", code[3]);\r\n\t\t\t\t\tset_value(els, \"month_day2\", code[2]);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tday:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\t\tset_value(els, \"day_type\", \"d\");\r\n\t\t\t\tset_value(els, \"day_count\", code[1]);\r\n\t\t\t},\r\n\t\t\tyear:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\r\n\t\t\t\tif (code[2] === \"\") {\r\n\t\t\t\t\tset_value(els, \"year_type\", \"d\");\r\n\t\t\t\t\tset_value(els, \"year_day\", dates.start.getDate());\r\n\t\t\t\t\tset_value(els, \"year_month\", dates.start.getMonth());\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tset_value(els, \"year_type\", \"w\");\r\n\t\t\t\t\tset_value(els, \"year_week2\", code[3]);\r\n\t\t\t\t\tset_value(els, \"year_day2\", code[2]);\r\n\t\t\t\t\tset_value(els, \"year_month2\", dates.start.getMonth());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfunction set_repeat_code(code, dates) {\r\n\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\tvar data = code.split(\"#\");\r\n\t\t\tcode = data[0].split(\"_\");\r\n\t\t\tset_rcode[code[0]](code, dates);\r\n\r\n\t\t\tswitch (data[1]) {\r\n\t\t\t\tcase \"no\":\r\n\t\t\t\t\tset_end_rule(els, \"no\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"\":\r\n\t\t\t\t\tset_end_rule(els, \"date_of_end\");\r\n\r\n\t\t\t\t\tvar end_date = dates.end;\r\n\t\t\t\t\tif (scheduler.config.include_end_by){\r\n\t\t\t\t\t\tend_date = scheduler.date.add(end_date, -1, 'day');\r\n\t\t\t\t\t}\r\n\t\t\t\t\tset_value(els, \"date_of_end\", date_str(end_date));\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tset_end_rule(els, \"occurences_count\");\r\n\t\t\t\t\tset_value(els, \"occurences_count\", data[1]);\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tset_value(els, \"repeat\", code[0]);\r\n\t\t\t//e.checked = true;\r\n\r\n\t\t\tvar node = scheduler.form_blocks[\"recurring\"]._get_form_node(els, \"repeat\", code[0]);\r\n\t\t\tif(node.nodeName == \"SELECT\"/* && node.onchange*/){\r\n\t\t\t//\tnode.onchange();\r\n\t\t\t\tnode.dispatchEvent(new Event('change'));\r\n\t\t\t\tnode.dispatchEvent(new MouseEvent('click'));\r\n\t\t\t}else{\r\n\t\t\t\tnode.dispatchEvent(new MouseEvent('click'));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tscheduler.form_blocks[\"recurring\"]._set_repeat_code = set_repeat_code;\r\n\r\n\t\tfor (var i = 0; i < top.elements.length; i++) {\r\n\t\t\tvar el = top.elements[i];\r\n\t\t\tswitch (el.name) {\r\n\t\t\t\tcase \"repeat\":\r\n\t\t\t\t\tif (el.nodeName == \"SELECT\" && !el.$_eventAttached) {\r\n\t\t\t\t\t\tel.$_eventAttached = true;\r\n\t\t\t\t\t\tel.addEventListener(\"change\", change_current_view);\r\n\t\t\t\t\t} else if(!el.$_eventAttached){\r\n\t\t\t\t\t\tel.$_eventAttached = true;\r\n\t\t\t\t\t\tel.addEventListener(\"click\", change_current_view);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tscheduler._lightbox._rec_init_done = true;\r\n\t},\r\n\tset_value:function(node, value, ev) {\r\n\t\tvar rf = scheduler.form_blocks[\"recurring\"];\r\n\t\tif (!scheduler._lightbox._rec_init_done)\r\n\t\t\trf._init_set_value(node, value, ev);\r\n\t\tnode.open = !ev.rec_type;\r\n\r\n\t\tnode.blocked = this._is_modified_occurence(ev);\r\n\r\n\t\tvar ds = rf._ds;\r\n\t\tds.start = ev.start_date;\r\n\t\tds.end = ev._end_date;\r\n\r\n\t\trf._toggle_block();\r\n\r\n\t\tif (value)\r\n\t\t\trf._set_repeat_code(value, ds);\r\n\t},\r\n\tget_value:function(node, ev) {\r\n\t\tif (node.open) {\r\n\t\t\tvar ds = scheduler.form_blocks[\"recurring\"]._ds;\r\n\t\t\tvar actual_dates = {};\r\n\r\n\t\t\tvar timeControl = getTimeSection();\r\n\r\n\t\t\ttimeControl.getValue(actual_dates);\r\n\t\t\tds.start = actual_dates.start_date;\r\n\t\t\tev.rec_type = scheduler.form_blocks[\"recurring\"]._get_repeat_code(ds);\r\n\t\t\tif (ds._start) {\r\n\t\t\t\tev.start_date = new Date(ds.start);\r\n\t\t\t\tev._start_date = new Date(ds.start);\r\n\t\t\t\tds._start = false;\r\n\t\t\t} else\r\n\t\t\t\tev._start_date = null;\r\n\r\n\t\t\tev._end_date = ds.end;\r\n\t\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\t\t} else {\r\n\t\t\tev.rec_type = ev.rec_pattern = \"\";\r\n\t\t\tev._end_date = ev.end_date;\r\n\t\t}\r\n\t\treturn ev.rec_type;\r\n\t},\r\n\t_get_button: function(){\r\n\t\tvar node = getRecurringSection().header;\r\n\t\treturn node.firstChild.firstChild;\r\n\t},\r\n\t_get_form: function(){\r\n\t\treturn getRecurringSection().node;\r\n\t},\r\n\topen:function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form();\r\n\t\tif(!cont.open)\r\n\t\t\tblock._toggle_block();\r\n\t},\r\n\tclose: function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form();\r\n\r\n\t\tif(cont.open)\r\n\t\t\tblock._toggle_block();\r\n\t},\r\n\t_toggle_block: function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form(),\r\n\t\t\tel = block._get_button();\r\n\t\tif (!cont.open && !cont.blocked) {\r\n\t\t\tcont.style.height = \"auto\";//reset to default value\r\n\t\t\tif(el){\r\n\t\t\t\tel.style.backgroundPosition = \"-5px 0px\";\r\n\t\t\t\tel.nextSibling.innerHTML = scheduler.locale.labels.button_recurring_open;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tcont.style.height = \"0px\";\r\n\t\t\tif(el){\r\n\t\t\t\tel.style.backgroundPosition = \"-5px 20px\";\r\n\t\t\t\tel.nextSibling.innerHTML = scheduler.locale.labels.button_recurring;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcont.open = !cont.open;\r\n\r\n\t\tscheduler.setLightboxSize();\r\n\t},\r\n\tfocus:function(node) {\r\n\t},\r\n\tbutton_click:function(node, button, event) {\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\t\tvar cont = block._get_form();\r\n\t\tif (!cont.blocked)\r\n\t\t\tscheduler.form_blocks.recurring._toggle_block();\r\n\t}\r\n};\r\n\r\nfunction getTimeSection(){\r\n\tvar timeControl = scheduler.formSection('time');\r\n\tif(!timeControl){\r\n\t\ttimeControl = getFirstSectionOfType('time');\r\n\t}\r\n\tif(!timeControl){\r\n\t\ttimeControl = getFirstSectionOfType('calendar_time');\r\n\t}\r\n\r\n\t\r\n\tif (!timeControl) {\r\n\t\tthrow new Error([\"Can't calculate the recurring rule, the Recurring form block can't find the Time control. Make sure you have the time control in 'scheduler.config.lightbox.sections' config.\",\r\n\"You can use either the default time control https://docs.dhtmlx.com/scheduler/time.html, or the datepicker https://docs.dhtmlx.com/scheduler/minicalendar.html, or a custom control. \",\r\n\"In the latter case, make sure the control is named \\\"time\\\":\",\r\n\"\",\r\n\"scheduler.config.lightbox.sections = [\",\r\n\"{name:\\\"time\\\", height:72, type:\\\"YOU CONTROL\\\", map_to:\\\"auto\\\" }];\"]\r\n.join(\"\\n\"));\r\n\t}\r\n\r\n\treturn timeControl;\r\n}\r\n\r\nfunction getRecurringSection(){\r\n\tvar recurringSection = scheduler.formSection('recurring');\r\n\tif(!recurringSection){\r\n\t\trecurringSection = getFirstSectionOfType('recurring');\r\n\t}\r\n\r\n\tif (!recurringSection) {\r\n\t\tthrow new Error([\"Can't locate the Recurring form section.\",\r\n\t\t\"Make sure that you have the recurring control on the lightbox configuration https://docs.dhtmlx.com/scheduler/recurring_events.html#recurringlightbox \",\r\n\t\t\"and that the recurring control has name \\\"recurring\\\":\",\r\n\"\",\r\n\"scheduler.config.lightbox.sections = [\",\r\n\"\t{name:\\\"recurring\\\", ... }\",\r\n\"];\"].join(\"\\n\"));\r\n\r\n\t}\r\n\r\n\treturn recurringSection;\r\n}\r\n\r\nfunction getFirstSectionOfType(type){\r\n\tfor(var i = 0; i < scheduler.config.lightbox.sections.length; i++){\r\n\t\tvar section = scheduler.config.lightbox.sections[i];\r\n\t\tif(section.type === type){\r\n\t\t\treturn scheduler.formSection(section.name);\r\n\t\t}\r\n\t}\r\n\treturn null;\r\n}\r\n\r\n//problem may occur if we will have two repeating events in the same moment of time\r\nscheduler._rec_markers = {};\r\nscheduler._rec_markers_pull = {};\r\nscheduler._add_rec_marker = function(ev, time) {\r\n\tev._pid_time = time;\r\n\tthis._rec_markers[ev.id] = ev;\r\n\tif (!this._rec_markers_pull[ev.event_pid]) this._rec_markers_pull[ev.event_pid] = {};\r\n\tthis._rec_markers_pull[ev.event_pid][time] = ev;\r\n};\r\nscheduler._get_rec_marker = function(time, id) {\r\n\tvar ch = this._rec_markers_pull[id];\r\n\tif (ch) return ch[time];\r\n\treturn null;\r\n};\r\nscheduler._get_rec_markers = function(id) {\r\n\treturn (this._rec_markers_pull[id] || []);\r\n};\r\n\r\nfunction clearMilliseconds(date){\r\n//\treturn date;\r\n\treturn new Date(\r\n\t\tdate.getFullYear(), \r\n\t\tdate.getMonth(), \r\n\t\tdate.getDate(), \r\n\t\tdate.getHours(), \r\n\t\tdate.getMinutes(),\r\n\t\tdate.getSeconds(),\r\n\t\t0\r\n\t);\r\n}\r\n\r\nscheduler._rec_temp = [];\r\n(function() {\r\n\tvar old_add_event = scheduler.addEvent;\r\n\tscheduler.addEvent = function(start_date, end_date, text, id, extra_data) {\r\n\t\tvar ev_id = old_add_event.apply(this, arguments);\r\n\r\n\t\tif (ev_id && scheduler.getEvent(ev_id)) {\r\n\t\t\tvar ev = scheduler.getEvent(ev_id);\r\n\t\t\t\r\n\t\t\tif(ev.start_date){\r\n\t\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t\t}\r\n\t\t\tif(ev.end_date){\r\n\t\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t\t}\r\n\t\t\tif (this._is_modified_occurence(ev))\r\n\t\t\t\tscheduler._add_rec_marker(ev, ev.event_length * 1000);\r\n\t\t\tif (ev.rec_type)\r\n\t\t\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\t\t}\r\n\t\treturn ev_id;\r\n\t};\r\n})();\r\n\r\nscheduler.attachEvent(\"onEventIdChange\", function(id, new_id) {\r\n\tif (this._ignore_call) return;\r\n\tthis._ignore_call = true;\r\n\r\n\tif(scheduler._rec_markers[id]){\r\n\t\t//important for for correct work of scheduler.getEvents(from, to) and collision detection\r\n\t\tscheduler._rec_markers[new_id] = scheduler._rec_markers[id];\r\n\t\tdelete scheduler._rec_markers[id];\r\n\t}\r\n\r\n\tif(scheduler._rec_markers_pull[id]){\r\n\t\tscheduler._rec_markers_pull[new_id] = scheduler._rec_markers_pull[id];\r\n\t\tdelete scheduler._rec_markers_pull[id];\r\n\t}\r\n\r\n\tfor (var i = 0; i < this._rec_temp.length; i++) {\r\n\t\tvar tev = this._rec_temp[i];\r\n\t\tif (tev.event_pid == id) {\r\n\t\t\ttev.event_pid = new_id;\r\n\t\t\tthis.changeEventId(tev.id, new_id + \"#\" + tev.id.split(\"#\")[1]);\r\n\t\t}\r\n\t}\r\n\r\n\tfor(var i in this._rec_markers){\r\n\t\tvar tev = this._rec_markers[i];\r\n\t\tif(tev.event_pid == id){\r\n\t\t\ttev.event_pid = new_id;\r\n\t\t\ttev._pid_changed = true;\r\n\t\t}\r\n\t}\r\n\r\n\tvar el = scheduler._rec_markers[new_id];\r\n\tif(el && el._pid_changed) {\r\n\t\tdelete el._pid_changed;\r\n\t\tsetTimeout(function() {\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler.callEvent(\"onEventChanged\", [new_id, scheduler.getEvent(new_id)]);\r\n\t\t}, 1);\r\n\t}\r\n\r\n\tdelete this._ignore_call;\r\n});\r\nscheduler.attachEvent(\"onConfirmedBeforeEventDelete\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (this._is_virtual_event(id) || (this._is_modified_occurence(ev) && ev.rec_type && ev.rec_type != 'none')) {\r\n\t\tid = id.split(\"#\");\r\n\t\tvar nid = this.uid();\r\n\t\tvar tid = (id[1]) ? id[1] : Math.round(ev._pid_time / 1000);\r\n\r\n\t\tvar nev = this._copy_event(ev);\r\n\t\tnev.id = nid;\r\n\t\tnev.event_pid = ev.event_pid || id[0];\r\n\t\tvar timestamp = tid;\r\n\t\tnev.event_length = timestamp;\r\n\t\tnev.rec_type = nev.rec_pattern = \"none\";\r\n\t\tthis.addEvent(nev);\r\n\r\n\t\tthis._add_rec_marker(nev, timestamp * 1000);\r\n\t} else {\r\n\t\tif (ev.rec_type && this._lightbox_id)\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\tvar sub = this._get_rec_markers(id);\r\n\t\tfor (var i in sub) {\r\n\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\tid = sub[i].id;\r\n\t\t\t\tif (this.getEvent(id))\r\n\t\t\t\t\tthis.deleteEvent(id, true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventDeleted\", function(id, ev){\r\n\tif(!this._is_virtual_event(id) && this._is_modified_occurence(ev)){\r\n\t\tif(!scheduler._events[id]){\r\n\t\t\tev.rec_type = ev.rec_pattern = \"none\";\r\n\t\t\tthis.setEvent(id, ev);\r\n\t\t}\r\n\t}\r\n});\r\nscheduler.attachEvent(\"onEventChanged\", function(id, event) {\r\n\tif (this._loading) return true;\r\n\r\n\tvar ev = this.getEvent(id);\r\n\r\n\tif (this._is_virtual_event(id)) {\r\n\t\tvar id = id.split(\"#\");\r\n\t\tvar nid = this.uid();\r\n\t\tthis._not_render = true;\r\n\r\n\t\tvar nev = this._copy_event(event);\r\n\t\tnev.id = nid;\r\n\t\tnev.event_pid = id[0];\r\n\t\tvar timestamp = id[1];\r\n\t\tnev.event_length = timestamp;\r\n\t\tnev.rec_type = nev.rec_pattern = \"\";\r\n\r\n\t\tthis._add_rec_marker(nev, timestamp * 1000);\r\n\t\tthis.addEvent(nev);\r\n\r\n\t\tthis._not_render = false;\r\n\r\n\t} else {\r\n\t\tif(ev.start_date){\r\n\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t}\r\n\t\tif(ev.end_date){\r\n\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t}\r\n\r\n\t\tif (ev.rec_type && this._lightbox_id){\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\t}\r\n\t\tvar sub = this._get_rec_markers(id);\r\n\t\tfor (var i in sub) {\r\n\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\tdelete this._rec_markers[sub[i].id];\r\n\t\t\t\tthis.deleteEvent(sub[i].id, true);\r\n\t\t\t}\r\n\t\t}\r\n\t\tdelete this._rec_markers_pull[id];\r\n\r\n\t\t// it's possible that after editing event is no longer exists, in such case we need to remove _select_id flag\r\n\t\tvar isEventFound = false;\r\n\t\tfor (var k = 0; k < this._rendered.length; k++) {\r\n\t\t\tif (this._rendered[k].getAttribute(this.config.event_attribute) == id)\r\n\t\t\t\tisEventFound = true;\r\n\t\t}\r\n\t\tif (!isEventFound)\r\n\t\t\tthis._select_id = null;\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventAdded\", function(id) {\r\n\tif (!this._loading) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (ev.rec_type && !ev.event_length){\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventSave\", function(id, data, is_new_event) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (!ev.rec_type && data.rec_type && !this._is_virtual_event(id))\r\n\t\tthis._select_id = null;\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventCreated\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (!ev.rec_type)\r\n\t\tev.rec_type = ev.rec_pattern = ev.event_length = ev.event_pid = \"\";\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventCancel\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (ev.rec_type) {\r\n\t\tthis._roll_back_dates(ev);\r\n\t\t// a bit expensive, but we need to be sure that event re-rendered, because view can be corrupted by resize , during edit process\r\n\t\tthis.render_view_data();\r\n\t}\r\n});\r\nscheduler._roll_back_dates = function(ev) {\r\n\tif(ev.start_date){\r\n\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t}\r\n\tif(ev.end_date){\r\n\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t}\r\n\tev.event_length = Math.round((ev.end_date.valueOf() - ev.start_date.valueOf()) / 1000);\r\n\tev.end_date = ev._end_date;\r\n\tif (ev._start_date) {\r\n\t\tev.start_date.setMonth(0);\r\n\t\tev.start_date.setDate(ev._start_date.getDate());\r\n\t\tev.start_date.setMonth(ev._start_date.getMonth());\r\n\t\tev.start_date.setFullYear(ev._start_date.getFullYear());\r\n\r\n\t}\r\n};\r\n\r\nscheduler._is_virtual_event = function(id){\r\n\treturn id.toString().indexOf(\"#\") != -1;\r\n};\r\nscheduler._is_modified_occurence = function(ev){\r\n\treturn (ev.event_pid && ev.event_pid != \"0\");\r\n};\r\n\r\nscheduler.showLightbox_rec = scheduler.showLightbox;\r\nscheduler.showLightbox = function(id) {\r\n\tvar locale = this.locale;\r\n\tvar c = scheduler.config.lightbox_recurring;\r\n\tvar ev = this.getEvent(id);\r\n\tvar pid = ev.event_pid;\r\n\tvar isVirtual = this._is_virtual_event(id);\r\n\tif (isVirtual)\r\n\t\tpid = id.split(\"#\")[0];\r\n\r\n\t// show series\r\n\tvar showSeries = function(id) {\r\n\t\tvar event = scheduler.getEvent(id);\r\n\t\tevent._end_date = event.end_date;\r\n\t\tevent.end_date = new Date(event.start_date.valueOf() + event.event_length * 1000);\r\n\t\treturn scheduler.showLightbox_rec(id); // editing series\r\n\t};\r\n\r\n\tif ( (pid || pid*1 === 0) && ev.rec_type) {\r\n\t\t// direct API call on series id\r\n\t\treturn showSeries(id);\r\n\t}\r\n\tif ( !pid || pid === '0' || ( (!locale.labels.confirm_recurring || c == 'instance') || (c == 'series' && !isVirtual)) ) {\r\n\t\t// editing instance or non recurring event\r\n\t\treturn this.showLightbox_rec(id);\r\n\t}\r\n\tif (c == 'ask') {\r\n\t\tvar that = this;\r\n\t\tscheduler.modalbox({\r\n\t\t\ttext: locale.labels.confirm_recurring,\r\n\t\t\ttitle: locale.labels.title_confirm_recurring,\r\n\t\t\twidth: \"500px\",\r\n\t\t\tposition: \"middle\",\r\n\t\t\tbuttons:[locale.labels.button_edit_series, locale.labels.button_edit_occurrence, locale.labels.icon_cancel],\r\n\t\t\tcallback: function(index) {\r\n\t\t\t\tswitch(+index) {\r\n\t\t\t\t\tcase 0:\r\n\t\t\t\t\t\treturn showSeries(pid);\r\n\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\treturn that.showLightbox_rec(id);\r\n\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t} else {\r\n\t\tshowSeries(pid);\r\n\t}\r\n};\r\n\r\n\r\nscheduler.get_visible_events_rec = scheduler.get_visible_events;\r\nscheduler.get_visible_events = function(only_timed) {\r\n\tfor (var i = 0; i < this._rec_temp.length; i++)\r\n\t\tdelete this._events[this._rec_temp[i].id];\r\n\tthis._rec_temp = [];\r\n\r\n\tvar stack = this.get_visible_events_rec(only_timed);\r\n\tvar out = [];\r\n\tfor (var i = 0; i < stack.length; i++) {\r\n\t\tif (stack[i].rec_type) {\r\n\t\t\t//deleted element of series\r\n\t\t\tif (stack[i].rec_pattern != \"none\")\r\n\t\t\t\tthis.repeat_date(stack[i], out);\r\n\t\t}\r\n\t\telse out.push(stack[i]);\r\n\t}\r\n\treturn out;\r\n};\r\n\r\n\r\n(function() {\r\n\tvar old = scheduler.isOneDayEvent;\r\n\tscheduler.isOneDayEvent = function(ev) {\r\n\t\tif (ev.rec_type) return true;\r\n\t\treturn old.call(this, ev);\r\n\t};\r\n\tvar old_update_event = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id) {\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tif(ev && ev.rec_type){\r\n\t\t\t//rec_type can be changed without the lightbox,\r\n\t\t\t// make sure rec_pattern updated as well\r\n\t\t\tev.rec_pattern = (ev.rec_type || \"\").split(\"#\")[0];\r\n\t\t}\r\n\t\tif (ev && ev.rec_type && !this._is_virtual_event(id)) {\r\n\t\t\tscheduler.update_view();\r\n\t\t} else {\r\n\t\t\told_update_event.call(this, id);\r\n\t\t}\r\n\t};\r\n})();\r\n\r\nscheduler.transponse_size = {\r\n\tday:1, week:7, month:1, year:12\r\n};\r\nscheduler.date.day_week = function(sd, day, week) {\r\n\tsd.setDate(1);\r\n\tvar originalMonth = scheduler.date.month_start(new Date(sd));\r\n\tweek = (week - 1) * 7;\r\n\tvar cday = sd.getDay();\r\n\tvar nday = day * 1 + week - cday + 1;\r\n\tsd.setDate(nday <= week ? (nday + 7) : nday);\r\n\tvar newMonth = scheduler.date.month_start(new Date(sd));\r\n\tif(originalMonth.valueOf() !== newMonth.valueOf()){\r\n\t\treturn false;\r\n\t}\r\n\treturn true;\r\n};\r\nscheduler.transpose_day_week = function(sd, list, cor, size, cor2) {\r\n\tvar cday = (sd.getDay() || (scheduler.config.start_on_monday ? 7 : 0)) - cor;\r\n\tfor (var i = 0; i < list.length; i++) {\r\n\t\tif (list[i] > cday)\r\n\t\t\treturn sd.setDate(sd.getDate() + list[i] * 1 - cday - (size ? cor : cor2));\r\n\t}\r\n\tthis.transpose_day_week(sd, list, cor + size, null, cor);\r\n};\r\nscheduler.transpose_type = function(type) {\r\n\tvar transposeRecurring = \"transpose_\" + type;\r\n\tif (!this.date[transposeRecurring]) {\r\n\t\tvar recurringParts = type.split(\"_\");\r\n\t\tvar dayDurationMs = 60 * 60 * 24 * 1000;\r\n\t\tvar addRecurring = \"add_\" + type;\r\n\t\tvar recurringStepDays = this.transponse_size[recurringParts[0]] * recurringParts[1];\r\n\r\n\t\tif (recurringParts[0] == \"day\" || recurringParts[0] == \"week\") {\r\n\t\t\tvar weekDays = null;\r\n\t\t\tif (recurringParts[4]) {\r\n\t\t\t\tweekDays = recurringParts[4].split(\",\");\r\n\t\t\t\tif (scheduler.config.start_on_monday) {\r\n\t\t\t\t\tfor (var i = 0; i < weekDays.length; i++)\r\n\t\t\t\t\t\tweekDays[i] = (weekDays[i] * 1) || 7;\r\n\t\t\t\t\tweekDays.sort();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.date[transposeRecurring] = function(nd, td) {\r\n\t\t\t\tvar delta = Math.floor((td.valueOf() - nd.valueOf()) / (dayDurationMs * recurringStepDays));\r\n\t\t\t\tif (delta > 0)\r\n\t\t\t\t\tnd.setDate(nd.getDate() + delta * recurringStepDays);\r\n\t\t\t\tif (weekDays)\r\n\t\t\t\t\tscheduler.transpose_day_week(nd, weekDays, 1, recurringStepDays);\r\n\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t\tthis.date[addRecurring] = function(sd, inc) {\r\n\t\t\t\tvar nd = new Date(sd.valueOf());\r\n\t\t\t\tif (weekDays) {\r\n\t\t\t\t\tfor (var count = 0; count < inc; count++)\r\n\t\t\t\t\t\tscheduler.transpose_day_week(nd, weekDays, 0, recurringStepDays);\r\n\t\t\t\t} else\r\n\t\t\t\t\tnd.setDate(nd.getDate() + inc * recurringStepDays);\r\n\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t}\r\n\t\telse if (recurringParts[0] == \"month\" || recurringParts[0] == \"year\") {\r\n\t\t\tthis.date[transposeRecurring] = function(nd, td, seriesInstance) {\r\n\t\t\t\tvar delta = Math.ceil(((td.getFullYear() * 12 + td.getMonth() * 1 + 1) - (nd.getFullYear() * 12 + nd.getMonth() * 1 + 1)) / (recurringStepDays) - 1);\r\n\r\n\t\t\t\tif (delta >= 0){\r\n\t\t\t\t\tnd.setDate(1);\r\n\t\t\t\t\tnd.setMonth(nd.getMonth() + delta * recurringStepDays);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn scheduler.date[addRecurring](nd, 0, seriesInstance);\r\n\t\t\t\t//if (str[3]){\r\n\t\t\t\t//\tscheduler.date.day_week(nd, str[2], str[3]);\r\n\t\t\t\t//}\r\n\t\t\t};\r\n\t\t\tthis.date[addRecurring] = function(sd, inc, seriesInstance, currentCount) {\r\n\t\t\t\tif(!currentCount){\r\n\t\t\t\t\tcurrentCount = 1;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcurrentCount++;\r\n\t\t\t\t}\r\n\t\t\t\tvar maxCount = 12;\r\n\t\t\t\tif(currentCount > maxCount){\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar nd = new Date(sd.valueOf());\r\n\t\t\t\tnd.setDate(1);\r\n\r\n\r\n\t\t\t\tnd.setMonth(nd.getMonth() + inc * recurringStepDays);\r\n\t\t\t\tvar origMonth = nd.getMonth();\r\n\t\t\t\tvar origYear = nd.getFullYear();\r\n\t\t\t\tnd.setDate(seriesInstance.start_date.getDate());\r\n\t\t\t\tif (recurringParts[3]){\r\n\t\t\t\t\tscheduler.date.day_week(nd, recurringParts[2], recurringParts[3]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar correctOverflowInstances = scheduler.config.recurring_overflow_instances;\r\n\t\t\t\tif(nd.getMonth() != origMonth && correctOverflowInstances != \"none\"){\r\n\t\t\t\t\t// no such day in a month\r\n\t\t\t\t\tif(correctOverflowInstances === \"lastDay\"){\r\n\t\t\t\t\t\t// return either last day of the month\r\n\t\t\t\t\t\tnd = new Date(origYear, origMonth + 1, 0, nd.getHours(), nd.getMinutes(), nd.getSeconds(), nd.getMilliseconds());\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t// or go to the next instance\r\n\t\t\t\t\t\tnd = scheduler.date[addRecurring](new Date(origYear, origMonth + 1, 0), inc||1, seriesInstance, currentCount);\r\n\t\t\t\t\t\t// if next instance is not possible (e.g. 'repeat on 40th day of the month') null will be returned\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.repeat_date = function(ev, stack, non_render, from, to, maxCount) {\r\n\r\n\tfrom = from || this._min_date;\r\n\tto = to || this._max_date;\r\n\tvar max = maxCount || -1;\r\n\tvar td = new Date(ev.start_date.valueOf());\r\n\r\n\tvar startHour = td.getHours();\r\n\r\n\tvar visibleCount = 0;\r\n\r\n\tif (!ev.rec_pattern && ev.rec_type)\r\n\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\r\n\tthis.transpose_type(ev.rec_pattern);\r\n\ttd = scheduler.date[\"transpose_\" + ev.rec_pattern](td, from, ev);\r\n\twhile ( td && (\r\n\t\ttd < ev.start_date ||\r\n\t\tscheduler._fix_daylight_saving_date(td,from,ev,td,new Date(td.valueOf() + ev.event_length * 1000)).valueOf() <= from.valueOf() ||\r\n\t\ttd.valueOf() + ev.event_length * 1000 <= from.valueOf())){\r\n\t\t\ttd = this.date[\"add_\" + ev.rec_pattern](td, 1, ev);\r\n\r\n\t}\r\n\twhile (td && (td < to && td < ev.end_date && (max < 0 || visibleCount < max))) {\r\n\t\ttd.setHours(startHour);\r\n\r\n\t\tvar timestamp = (scheduler.config.occurrence_timestamp_in_utc) ? Date.UTC(td.getFullYear(), td.getMonth(), td.getDate(), td.getHours(), td.getMinutes(), td.getSeconds()) : td.valueOf();\r\n\t\tvar ch = this._get_rec_marker(timestamp, ev.id);\r\n\t\tif (!ch) { // unmodified element of series\r\n\t\t\tvar ted = new Date(td.valueOf() + ev.event_length * 1000);\r\n\t\t\tvar copy = this._copy_event(ev);\r\n\t\t\t//copy._timed = ev._timed;\r\n\t\t\tcopy.text = ev.text;\r\n\t\t\tcopy.start_date = td;\r\n\t\t\tcopy.event_pid = ev.id;\r\n\t\t\tcopy.id = ev.id + \"#\" + Math.round(timestamp / 1000);\r\n\t\t\tcopy.end_date = ted;\r\n\r\n\t\t\tcopy.end_date = scheduler._fix_daylight_saving_date(copy.start_date, copy.end_date, ev, td, copy.end_date);\r\n\r\n\t\t\tcopy._timed = this.isOneDayEvent(copy);\r\n\r\n\t\t\tif (!copy._timed && !this._table_view && !this.config.multi_day) return;\r\n\t\t\tstack.push(copy);\r\n\r\n\t\t\tif (!non_render) {\r\n\t\t\t\tthis._events[copy.id] = copy;\r\n\t\t\t\tthis._rec_temp.push(copy);\r\n\t\t\t}\r\n\r\n\t\t\tvisibleCount++;\r\n\r\n\t\t} else\r\n\t\tif (non_render){\r\n\t\t\tif(ch.rec_type != \"none\"){\r\n\t\t\t\tvisibleCount++;\r\n\t\t\t}\r\n\t\t\tstack.push(ch);\r\n\t\t}\r\n\r\n\t\ttd = this.date[\"add_\" + ev.rec_pattern](td, 1, ev);\r\n\t//\tif(!scheduler.date[\"validate_add_\" + ev.rec_pattern](td, 1, ev.rec_pattern)){\r\n\t///\t\talert(\"detect add\")\r\n\t//\t}\r\n\t}\r\n};\r\nscheduler._fix_daylight_saving_date = function(start_date, end_date, ev, counter, default_date) {\r\n\tvar shift = start_date.getTimezoneOffset() - end_date.getTimezoneOffset();\r\n\tif (shift) {\r\n\t\tif (shift > 0) {\r\n\t\t\t// e.g. 24h -> 23h\r\n\t\t\treturn new Date(counter.valueOf() + ev.event_length * 1000 - shift * 60 * 1000);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// e.g. 24h -> 25h\r\n\t\t\treturn new Date(end_date.valueOf() - shift * 60 * 1000);\r\n\t\t}\r\n\t}\r\n\treturn new Date(default_date.valueOf());\r\n};\r\nscheduler.getRecDates = function(id, max) {\r\n\tvar ev = typeof id == \"object\" ? id : scheduler.getEvent(id);\r\n\tvar recurrings = [];\r\n\tmax = max || 100;\r\n\r\n\tif (!ev.rec_type) {\r\n\t\treturn [\r\n\t\t\t{ start_date: ev.start_date, end_date: ev.end_date }\r\n\t\t];\r\n\t}\r\n\tif (ev.rec_type == \"none\") {\r\n\t\treturn [];\r\n\t}\r\n\r\n\tscheduler.repeat_date(ev, recurrings, true, ev.start_date, ev.end_date, max);\r\n\r\n\tvar result = [];\r\n\tfor(var i = 0; i < recurrings.length; i++){\r\n\t\tif(recurrings[i].rec_type != \"none\"){\r\n\t\t\tresult.push({start_date: recurrings[i].start_date, end_date: recurrings[i].end_date});\r\n\t\t}\r\n\t}\r\n\r\n\treturn result;\r\n};\r\nscheduler.getEvents = function(from, to) {\r\n\tvar result = [];\r\n\tfor (var a in this._events) {\r\n\t\tvar ev = this._events[a];\r\n\t\tif (ev && ev.start_date < to && ev.end_date > from) {\r\n\t\t\tif (ev.rec_pattern) {\r\n\t\t\t\tif (ev.rec_pattern == \"none\") continue;\r\n\t\t\t\tvar sev = [];\r\n\t\t\t\tthis.repeat_date(ev, sev, true, from, to);\r\n\t\t\t\tfor (var i = 0; i < sev.length; i++) {\r\n\t\t\t\t\t// if event is in rec_markers then it will be checked by himself, here need to skip it\r\n\t\t\t\t\tif (!sev[i].rec_pattern && sev[i].start_date < to && sev[i].end_date > from && !this._rec_markers[sev[i].id]) {\r\n\t\t\t\t\t\tresult.push(sev[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if (!this._is_virtual_event(ev.id)) { // if it's virtual event we can skip it\r\n\t\t\t\tresult.push(ev);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn result;\r\n};\r\n\r\nscheduler.config.repeat_date = \"%m.%d.%Y\";\r\nscheduler.config.lightbox.sections = [\r\n\t{name:\"description\", map_to:\"text\", type:\"textarea\" , focus:true},\r\n\t{name:\"recurring\", type:\"recurring\", map_to:\"rec_type\", button:\"recurring\"},\r\n\t{name:\"time\", height:72, type:\"time\", map_to:\"auto\"}\r\n];\r\n\r\n\r\n//drop secondary attributes\r\nscheduler._copy_dummy = function(ev) {\r\n\tvar start_date = new Date(this.start_date);\r\n\tvar end_date = new Date(this.end_date);\r\n\tthis.start_date = start_date;\r\n\tthis.end_date = end_date;\r\n\tthis.event_length = this.event_pid = this.rec_pattern = this.rec_type = null;\r\n};\r\n\r\nscheduler.config.include_end_by = false;\r\nscheduler.config.lightbox_recurring = 'ask'; // series, instance\r\n\r\nscheduler.attachEvent(\"onClearAll\", function(){\r\n\tscheduler._rec_markers = {}; //clear recurring events data\r\n\tscheduler._rec_markers_pull = {};\r\n\tscheduler._rec_temp = [];\r\n});\r\n\r\n}","import getSerializator from '../core/common/get_serializable_events';\r\nexport default function(scheduler){\r\n\r\n\t\r\nconst getSerializableData = getSerializator(scheduler);\r\n\r\n//redefine this method, if you want to provide a custom set of attributes for serialization\r\nscheduler.data_attributes=function(){\r\n\tvar attrs = [];\r\n\tvar format = scheduler._helpers.formatDate;\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\t\tfor (var name in ev)\r\n\t\t\tif (name.substr(0,1) !=\"_\")\r\n\t\t\t\tattrs.push([name,((name == \"start_date\" || name == \"end_date\")?format:null)]);\r\n\t\tbreak;\r\n\t}\r\n\treturn attrs;\r\n};\r\n\r\nscheduler.toXML = function(header){\r\n\tvar xml = [];\r\n\tvar attrs = this.data_attributes();\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\r\n\t\txml.push(\"\");\r\n\t\tfor (var i=0; i < attrs.length; i++)\r\n\t\t\txml.push(\"<\"+attrs[i][0]+\">\");\r\n\r\n\t\txml.push(\"\");\r\n\t}\r\n\treturn (header||\"\")+\"\"+xml.join(\"\\n\")+\"\";\r\n};\r\n\r\nscheduler._serialize_json_value = function(value){\r\n\tif(value === null || typeof value === \"boolean\"){\r\n\t\tvalue = \"\" + value;\r\n\t}else{\r\n\t\tif(!value && value !== 0){\r\n\t\t\tvalue = \"\";\r\n\t\t}\r\n\t\tvalue = '\"' + value.toString().\r\n\t\t\treplace(/\\n/g,\"\").\r\n\t\t\treplace(/\\\\/g,\"\\\\\\\\\").\r\n\t\t\treplace(/\"/g, '\\\\\"') + '\"';\r\n\t}\r\n\treturn value;\r\n};\r\n\r\n\r\n\r\nscheduler.toJSON = function(){\r\n\treturn JSON.stringify(this.serialize());\r\n};\r\n\r\n\r\nscheduler.toICal = function(header){\r\n\tvar start = \"BEGIN:VCALENDAR\\nVERSION:2.0\\nPRODID:-//dhtmlXScheduler//NONSGML v2.2//EN\\nDESCRIPTION:\";\r\n\tvar end = \"END:VCALENDAR\";\r\n\tvar format = scheduler.date.date_to_str(\"%Y%m%dT%H%i%s\");\r\n\tvar full_day_format = scheduler.date.date_to_str(\"%Y%m%d\");\r\n\r\n\tvar ical = [];\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\r\n\r\n\t\tical.push(\"BEGIN:VEVENT\");\r\n\t\tif (!ev._timed || (!ev.start_date.getHours() && !ev.start_date.getMinutes()))\r\n\t\t\tical.push(\"DTSTART:\"+full_day_format(ev.start_date));\r\n\t\telse\r\n\t\t\tical.push(\"DTSTART:\"+format(ev.start_date));\r\n\t\tif (!ev._timed || (!ev.end_date.getHours() && !ev.end_date.getMinutes()))\r\n\t\t\tical.push(\"DTEND:\"+full_day_format(ev.end_date));\r\n\t\telse\r\n\t\t\tical.push(\"DTEND:\"+format(ev.end_date));\r\n\t\tical.push(\"SUMMARY:\"+ev.text);\r\n\t\tical.push(\"END:VEVENT\");\r\n\t}\r\n\treturn start+(header||\"\")+\"\\n\"+ical.join(\"\\n\")+\"\\n\"+end;\r\n};\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Timeline\", scheduler.assert);\r\n}","interface IViewPosition{\r\n\ttop: number;\r\n\tleft: number;\r\n}\r\n\r\ninterface IViewBox extends IViewPosition{\r\n\twidth: number;\r\n\theight: number;\r\n\tbottom: number;\r\n\tright: number;\r\n}\r\n\r\nexport class Tooltip {\r\n\tprivate _root: HTMLElement;\r\n\tprivate _tooltipNode: HTMLElement | null;\r\n\tprivate _scheduler: any;\r\n\r\n\tconstructor(scheduler: any){\r\n\t\tthis._scheduler = scheduler;\r\n\t}\r\n\r\n\tgetNode() : HTMLElement {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tif (!this._tooltipNode){\r\n\t\t\tthis._tooltipNode = document.createElement(\"div\");\r\n\t\t\tthis._tooltipNode.className = \"dhtmlXTooltip scheduler_tooltip tooltip\";\r\n\r\n\t\t\tscheduler._waiAria.tooltipAttr(this._tooltipNode);\r\n\t\t}\r\n\t\tif(scheduler.config.rtl){\r\n\t\t\tthis._tooltipNode.classList.add(\"dhtmlXTooltip_rtl\");\r\n\t\t} else{\r\n\t\t\tthis._tooltipNode.classList.remove(\"dhtmlXTooltip_rtl\");\r\n\t\t}\r\n\t\treturn this._tooltipNode;\r\n\t}\r\n\r\n\tsetViewport(node: HTMLElement):Tooltip{\r\n\t\tthis._root = node;\r\n\t\treturn this;\r\n\t}\r\n\r\n\tshow(left: number, top: number): Tooltip;\r\n\tshow(event: MouseEvent): Tooltip;\r\n\tshow(left: number | MouseEvent, top?: number): Tooltip {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tconst container = document.body;\r\n\t\tconst node = this.getNode();\r\n\r\n\t\tif(!domHelpers.isChildOf(node, container)){\r\n\t\t\tthis.hide();\r\n\t\t\tcontainer.appendChild(node);\r\n\t\t}\r\n\r\n\t\tif (this._isLikeMouseEvent(left)) {\r\n\t\t\tconst position = this._calculateTooltipPosition(left as MouseEvent);\r\n\t\t\ttop = position.top;\r\n\t\t\tleft = position.left;\r\n\t\t}\r\n\r\n\t\tnode.style.top = top + \"px\";\r\n\t\tnode.style.left = left + \"px\";\r\n\r\n\t\tscheduler._waiAria.tooltipVisibleAttr(node);\r\n\t\treturn this;\r\n\t}\r\n\thide() : Tooltip{\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst node = this.getNode();\r\n\t\tif(node && node.parentNode){\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t}\r\n\t\tscheduler._waiAria.tooltipHiddenAttr(node);\r\n\t\treturn this;\r\n\t}\r\n\r\n\tsetContent(html: string) : Tooltip{\r\n\t\tconst node = this.getNode();\r\n\t\tnode.innerHTML = html;\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// it is for salesforce, because it proxies event to it own events\r\n\tprivate _isLikeMouseEvent(event: any): boolean {\r\n\t\tif (!event || typeof event !== \"object\") {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn \"clientX\" in event && \"clientY\" in event;\r\n\t}\r\n\r\n\tprivate _getViewPort() : HTMLElement {\r\n\t\treturn this._root || document.body;\r\n\t}\r\n\r\n\r\n\tprivate _calculateTooltipPosition(event: MouseEvent): IViewPosition{\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\t// top/left coordinates inside the viewport by mouse position\r\n\t\tconst viewport = this._getViewPortSize();\r\n\t\tconst tooltipNode = this.getNode();\r\n\t\tconst tooltip: IViewBox = {\r\n\t\t\ttop:0,\r\n\t\t\tleft: 0,\r\n\t\t\twidth: tooltipNode.offsetWidth,\r\n\t\t\theight: tooltipNode.offsetHeight,\r\n\t\t\tbottom: 0,\r\n\t\t\tright: 0\r\n\t\t};\r\n\r\n\t\tconst offsetX = scheduler.config.tooltip_offset_x;\r\n\t\tconst offsetY = scheduler.config.tooltip_offset_y;\r\n\r\n\t\tconst container = document.body;\r\n\t\tconst mouse = domHelpers.getRelativeEventPosition(event, container);\r\n\t\tconst containerPos = domHelpers.getNodePosition(container);\r\n\t\tmouse.y += containerPos.y; // to fix margin collapsing\r\n\r\n\t\ttooltip.top = mouse.y;\r\n\t\ttooltip.left = mouse.x;\r\n\t\ttooltip.top += offsetY;\r\n\t\ttooltip.left += offsetX;\r\n\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\ttooltip.right = tooltip.left + tooltip.width;\r\n\r\n\t\tconst scrollTop = window.scrollY + container.scrollTop; // to fix margin collapsing\r\n\t\t// edge cases when the tooltip element can be partially hidden by edges of the viewport\r\n\t\tif(tooltip.top < viewport.top - scrollTop){\r\n\t\t\ttooltip.top = viewport.top;\r\n\t\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\t}else if(tooltip.bottom > viewport.bottom){\r\n\t\t\ttooltip.bottom = viewport.bottom;\r\n\t\t\ttooltip.top = tooltip.bottom - tooltip.height;\r\n\t\t}\r\n\r\n\t\tif(tooltip.left < viewport.left){\r\n\t\t\ttooltip.left = viewport.left;\r\n\t\t\ttooltip.right = viewport.left + tooltip.width;\r\n\t\t}else if(tooltip.right > viewport.right){\r\n\t\t\ttooltip.right = viewport.right;\r\n\t\t\ttooltip.left = tooltip.right - tooltip.width;\r\n\t\t}\r\n\r\n\t\tif(mouse.x >= tooltip.left && mouse.x <= tooltip.right) {\r\n\t\t\ttooltip.left = mouse.x - tooltip.width - offsetX;\r\n\t\t\ttooltip.right = tooltip.left + tooltip.width;\r\n\t\t}\r\n\r\n\t\tif(mouse.y >= tooltip.top && mouse.y <= tooltip.bottom) {\r\n\t\t\ttooltip.top = mouse.y - tooltip.height - offsetY;\r\n\t\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\t}\r\n\r\n\t\treturn tooltip;\r\n\t}\r\n\r\n\tprivate _getViewPortSize() : IViewBox {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tconst container = this._getViewPort();\r\n\t\tlet viewport = container;\r\n\t\tlet scrollTop = window.scrollY + document.body.scrollTop;\r\n\t\tlet scrollLeft = window.scrollX + document.body.scrollLeft;\r\n\t\tlet pos;\r\n\t\t// support for the initial tooltip mode where the tooltip element was attached to the data area of scheduler\r\n\t\tif(container === scheduler.$event_data){\r\n\t\t\tviewport = scheduler.$event;\r\n\t\t\tscrollTop = 0;\r\n\t\t\tscrollLeft = 0;\r\n\t\t\tpos = domHelpers.getNodePosition(scheduler.$event);\r\n\t\t}else{\r\n\t\t\tpos = domHelpers.getNodePosition(viewport);\r\n\t\t}\r\n\t\treturn {\r\n\t\t\tleft:pos.x + scrollLeft,\r\n\t\t\ttop: pos.y + scrollTop,\r\n\t\t\twidth: pos.width,\r\n\t\t\theight: pos.height,\r\n\t\t\tbottom: pos.y + pos.height + scrollTop,\r\n\t\t\tright: pos.x + pos.width + scrollLeft\r\n\t\t};\r\n\t}\r\n}\r\n","import * as utils from \"../../core/utils/utils\";\r\nimport { Tooltip } from \"./tooltip\";\r\n\r\ninterface ITrackerTarget {\r\n\tselector: string;\r\n\tonmouseenter: (event: MouseEvent, node: HTMLElement) => void;\r\n\tonmousemove: (event: MouseEvent, node: HTMLElement) => void;\r\n\tonmouseleave: (event: MouseEvent, node: HTMLElement) => void;\r\n\tglobal: boolean;\r\n}\r\n\r\ninterface ITooltipConfig {\r\n\tselector: string;\r\n\thtml: (event: MouseEvent, node: HTMLElement) => string;\r\n\tglobal: boolean;\r\n}\r\n\r\nexport class TooltipManager{\r\n\ttooltip: Tooltip;\r\n\tprotected _domEvents: any;\r\n\tprivate _listeners: object = {};\r\n\tprivate _scheduler: any;\r\n\tprivate delayShow: any;\r\n\tprivate delayHide: any;\r\n\r\n\tconstructor(scheduler: any) {\r\n\t\tthis.tooltip = new Tooltip(scheduler);\r\n\t\tthis._scheduler = scheduler;\r\n\t\tthis._domEvents = scheduler._createDomEventScope();\r\n\t\tthis._initDelayedFunctions();\r\n\t}\r\n\r\n\tdestructor(): void{\r\n\t\tthis.tooltip.hide();\r\n\t\tthis._domEvents.detachAll();\r\n\t}\r\n\thideTooltip(): void{\r\n\t\tthis.delayHide();\r\n\t}\r\n\tattach(config: ITrackerTarget): void {\r\n\t\tlet root = document.body;\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tif(!config.global){\r\n\t\t\troot = scheduler.$root;\r\n\t\t}\r\n\r\n\t\tlet watchableTarget = null;\r\n\t\tconst handler = (event) => {\r\n\t\t\tconst eventTarget = domHelpers.getTargetNode(event);\r\n\t\t\tconst targetNode = domHelpers.closest(eventTarget, config.selector);\r\n\t\t\tif(domHelpers.isChildOf(eventTarget, this.tooltip.getNode())){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tconst doOnMouseEnter = () => {\r\n\t\t\t\twatchableTarget = targetNode;\r\n\t\t\t\tconfig.onmouseenter(event, targetNode);\r\n\t\t\t};\r\n\r\n\t\t\tif(watchableTarget){\r\n\t\t\t\tif(targetNode && targetNode === watchableTarget){\r\n\t\t\t\t\tconfig.onmousemove(event, targetNode);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconfig.onmouseleave(event, watchableTarget);\r\n\t\t\t\t\twatchableTarget = null;\r\n\r\n\t\t\t\t\tif(targetNode && targetNode !== watchableTarget){\r\n\t\t\t\t\t\tdoOnMouseEnter();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(targetNode){\r\n\t\t\t\t\tdoOnMouseEnter();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tthis.detach(config.selector);\r\n\t\tthis._domEvents.attach(root, \"mousemove\", handler);\r\n\t\tthis._listeners[config.selector] = {\r\n\t\t\tnode: root,\r\n\t\t\thandler\r\n\t\t};\r\n\t}\r\n\r\n\tdetach(selector: string): void {\r\n\t\tconst listener = this._listeners[selector];\r\n\t\tif(listener){\r\n\t\t\tthis._domEvents.detach(listener.node, \"mousemove\", listener.handler);\r\n\t\t}\r\n\t}\r\n\r\n\ttooltipFor(config: ITooltipConfig): void {\r\n\t\tconst cloneDomEvent = (event: MouseEvent) => {\r\n\t\t\tlet clone = event;\r\n\t\t\t// making events survive timeout in ie\r\n\t\t\t// tslint:disable-next-line no-string-literal\r\n\t\t\tif(document[\"createEventObject\"] && !document.createEvent){\r\n\t\t\t\t// tslint:disable-next-line no-string-literal\r\n\t\t\t\tclone = document[\"createEventObject\"](event);\r\n\t\t\t}\r\n\t\t\treturn clone;\r\n\t\t};\r\n\t\tthis._initDelayedFunctions();\r\n\t\tthis.attach({\r\n\t\t\tselector: config.selector,\r\n\t\t\tglobal: config.global,\r\n\t\t\tonmouseenter:(event: MouseEvent, node: HTMLElement) => {\r\n\t\t\t\tconst html = config.html(event, node);\r\n\t\t\t\tif(html){\r\n\t\t\t\t\tthis.delayShow(cloneDomEvent(event), html);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tonmousemove:(event: MouseEvent, node: HTMLElement) => {\r\n\t\t\t\tconst html = config.html(event, node);\r\n\t\t\t\tif(html){\r\n\t\t\t\t\tthis.delayShow(cloneDomEvent(event), html);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\t\t\tthis.delayHide();\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tonmouseleave:() => {\r\n\t\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\t\tthis.delayHide();\r\n\t\t\t},\r\n\t\t});\r\n\t}\r\n\r\n\tprivate _initDelayedFunctions(){\r\n\t\tconst scheduler = this._scheduler;\r\n\t\t// reset delayed functions in order to apply current values of tooltip_timeout\r\n\t\tif(this.delayShow){\r\n\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t}\r\n\t\tif(this.delayHide){\r\n\t\t\tthis.delayHide.$cancelTimeout();\r\n\t\t}\r\n\t\tthis.tooltip.hide();\r\n\t\t\r\n\t\tthis.delayShow = (utils as any).default.delay((event: MouseEvent, html: string) => {\r\n\t\t\tif(scheduler.callEvent(\"onBeforeTooltip\", [event]) === false) {\r\n\t\t\t\tthis.tooltip.hide();\r\n\t\t\t} else {\r\n\t\t\t\tthis.tooltip.setContent(html);\r\n\t\t\t\tthis.tooltip.show(event);\r\n\t\t\t}\r\n\t\t}, scheduler.config.tooltip_timeout || 1);\r\n\r\n\t\tthis.delayHide = (utils as any).default.delay(() => {\r\n\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\tthis.tooltip.hide();\r\n\t\t}, scheduler.config.tooltip_hide_timeout || 1);\r\n\t}\r\n\r\n}","import { TooltipManager } from \"./tooltipManager\";\r\n\r\nexport default function (scheduler: any) {\r\n\r\n\tscheduler.config.tooltip_timeout = 30;\r\n\tscheduler.config.tooltip_offset_y = 20;\r\n\tscheduler.config.tooltip_offset_x = 10;\r\n\tscheduler.config.tooltip_hide_timeout = 30;\r\n\r\n\tconst tooltipManager = new TooltipManager(scheduler);\r\n\r\n\tscheduler.ext.tooltips = tooltipManager;\r\n\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function () {\r\n\r\n\t\ttooltipManager.tooltipFor({\r\n\t\t\tselector: \"[\" + scheduler.config.event_attribute + \"]\",\r\n\t\t\thtml: (event: MouseEvent) => {\r\n\t\t\t\tif (scheduler._mobile && !scheduler.config.touch_tooltip) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst targetEventId = scheduler._locate_event(event.target);\r\n\t\t\t\tif (scheduler.getEvent(targetEventId)) {\r\n\t\t\t\t\tconst event = scheduler.getEvent(targetEventId);\r\n\t\t\t\t\treturn scheduler.templates.tooltip_text(event.start_date, event.end_date, event);\r\n\t\t\t\t}\r\n\t\t\t\treturn null;\r\n\t\t\t},\r\n\t\t\tglobal: false\r\n\t\t});\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function () {\r\n\t\ttooltipManager.destructor();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onLightbox\", function () {\r\n\t\ttooltipManager.hideTooltip();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeDrag\", function() {\r\n\t\ttooltipManager.hideTooltip();\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventDeleted\", function() {\r\n\t\ttooltipManager.hideTooltip();\r\n\t\treturn true;\r\n\t});\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Tree Timeline\", scheduler.assert);\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Units\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\nscheduler._get_url_nav = function(){\r\n\tvar p = {};\r\n\tvar data = (document.location.hash || \"\").replace(\"#\", \"\").split(\",\");\r\n\tfor (var i = 0; i < data.length; i++) {\r\n\t\tvar s = data[i].split(\"=\");\r\n\t\tif (s.length == 2)\r\n\t\t\tp[s[0]] = s[1];\r\n\t}\r\n\treturn p;\r\n};\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\", function () {\r\n\tvar first = true;\r\n\tvar s2d = scheduler.date.str_to_date(\"%Y-%m-%d\");\r\n\tvar d2s = scheduler.date.date_to_str(\"%Y-%m-%d\");\r\n\tvar select_event = scheduler._get_url_nav().event || null;\r\n\r\n\tscheduler.attachEvent(\"onAfterEventDisplay\", function(ev){\r\n\t\tselect_event = null;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function (om, od, m, d) {\r\n\t\tif (first) {\r\n\t\t\tfirst = false;\r\n\t\t\tvar p = scheduler._get_url_nav();\r\n\r\n\t\t\tif (p.event){\r\n\t\t\t\ttry{\r\n\t\t\t\t\tif(scheduler.getEvent(p.event)){\r\n\t\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\t\tshowEvent(p.event);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tvar handler = scheduler.attachEvent(\"onXLE\", function(){\r\n\t\t\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\t\t\tshowEvent(p.event);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\tscheduler.detachEvent(handler);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (e){}\r\n\t\t\t}\r\n\r\n\t\t\tif (p.date || p.mode) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tthis.setCurrentView((p.date ? s2d(p.date) : null), (p.mode || null));\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\t//assuming that mode is not available anymore\r\n\t\t\t\t\tthis.setCurrentView((p.date ? s2d(p.date) : null), m);\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar values = [\r\n\t\t\t\"date=\" + d2s(d || od),\r\n\t\t\t\"mode=\" + (m || om)\r\n\t\t];\r\n\r\n\t\tif(select_event){\r\n\t\t\tvalues.push(\"event=\" + select_event);\r\n\t\t}\r\n\r\n\t\tvar text = \"#\" + values.join(\",\");\r\n\t\tdocument.location.hash = text;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tfunction showEvent(e){\r\n\t\tif(scheduler.$destroyed){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tselect_event = e;\r\n\t\tif(scheduler.getEvent(e)){\r\n\t\t\tscheduler.showEvent(e);\r\n\t\t}\r\n\t}\r\n});\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Week Agenda\", scheduler.assert);\r\n}","export default function(scheduler){\r\nscheduler.attachEvent(\"onLightBox\",function(){\r\n\tif (this._cover){\r\n\t\ttry{\r\n\t\t\tthis._cover.style.height = this.expanded ? \"100%\" : ((document.body.parentNode||document.body).scrollHeight+\"px\");\r\n\t\t} catch(e) {\r\n\r\n\t\t}\r\n\t}\r\n});\r\n\r\nscheduler.form_blocks.select.set_value=function(node,value,ev){\r\n\tif (typeof value == \"undefined\" || value === \"\")\r\n\t\tvalue = (node.firstChild.options[0]||{}).value;\r\n\tnode.firstChild.value=value||\"\";\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\t// scheduler.config.year_x = 4;\r\n\t// scheduler.config.year_y = 3;\r\n\t// scheduler.xy.year_top = 0;\r\n\r\n\tscheduler.templates.year_date = function(date) {\r\n\t\treturn scheduler.date.date_to_str(scheduler.locale.labels.year_tab + \" %Y\")(date);\r\n\t};\r\n\tscheduler.templates.year_month = scheduler.date.date_to_str(\"%F\");\r\n\tscheduler.templates.year_scale_date = scheduler.date.date_to_str(\"%D\");\r\n\tscheduler.templates.year_tooltip = function(s, e, ev) {\r\n\t\treturn ev.text;\r\n\t};\r\n\r\n\tconst isYearMode = function() {\r\n\t\treturn scheduler._mode == \"year\";\r\n\t};\r\n\t\r\n\tconst getCellDate = function(node){\r\n\t\tvar day = scheduler.$domHelpers.closest(node, \"[data-cell-date]\");\r\n\t\tif(!day || !day.hasAttribute(\"data-cell-date\")) return null;\r\n\t\treturn scheduler.templates.parse_date(day.getAttribute(\"data-cell-date\"));\r\n\t};\r\n\r\n\t// dbl click hook for scheduler._on_dbl_click\r\n\tscheduler.dblclick_dhx_month_head = function(e) {\r\n\t\tif (isYearMode()) {\r\n\t\t\tconst target = e.target;\r\n\t\t\tif(scheduler.$domHelpers.closest(target, \".dhx_before\") || scheduler.$domHelpers.closest(target, \".dhx_after\")){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tconst date = getCellDate(target);\r\n\t\t\t\r\n\t\t\tif(date){\r\n\t\t\t\tconst start = date;\r\n\t\t\t\tconst end = this.date.add(start, 1, \"day\");\r\n\t\t\t\tif (!this.config.readonly && this.config.dblclick_create){\r\n\t\t\t\t\tthis.addEventNow(start.valueOf(), end.valueOf(), e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\t\r\n\tscheduler.attachEvent(\"onEventIdChange\", function(){\r\n\t\tif (isYearMode())\r\n\t\t\tthis.year_view(true);\r\n\t});\r\n\r\n\r\n\tvar old = scheduler.render_data;\r\n\tscheduler.render_data = function(evs) {\r\n\t\tif (!isYearMode()) return old.apply(this, arguments);\r\n\t\tfor (var i = 0; i < evs.length; i++)\r\n\t\t\tthis._year_render_event(evs[i]);\r\n\t};\r\n\r\n\tvar clear = scheduler.clear_view;\r\n\tscheduler.clear_view = function() {\r\n\t\tif (!isYearMode()) return clear.apply(this, arguments);\r\n\t\tvar dates = scheduler._year_marked_cells,\r\n\t\t\tdiv = null;\r\n\t\tfor (var date in dates) {\r\n\t\t\tif (dates.hasOwnProperty(date)) {\r\n\t\t\t\tdiv = dates[date];\r\n\t\t\t\tdiv.classList.remove(\"dhx_year_event\", \"dhx_cal_datepicker_event\");\r\n\t\t\t\t// div.className = \"dhx_month_head\";\r\n\t\t\t\t// div.removeAttribute(\"date\");\r\n\t\t\t\t// div.removeAttribute(\"data-year-date\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tscheduler._year_marked_cells = {};\r\n\t};\r\n\r\n\tscheduler._hideToolTip = function() {\r\n\t\tif (this._tooltip) {\r\n\t\t\tthis._tooltip.style.display = \"none\";\r\n\t\t\tthis._tooltip.date = new Date(9999, 1, 1);\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._showToolTip = function(date, pos, e, src) {\r\n\t\tif (this._tooltip) {\r\n\t\t\tif (this._tooltip.date.valueOf() == date.valueOf()) return;\r\n\t\t\tthis._tooltip.innerHTML = \"\";\r\n\t\t} else {\r\n\t\t\tvar t = this._tooltip = document.createElement(\"div\");\r\n\t\t\tt.className = \"dhx_year_tooltip\";\r\n\t\t\tif (this.config.rtl) t.className += \" dhx_tooltip_rtl\";\r\n\t\t\tdocument.body.appendChild(t);\r\n\t\t\tt.addEventListener(\"click\", scheduler._click.dhx_cal_data);\r\n\t\t\tt.addEventListener(\"click\", function(e){\r\n\t\t\t\tif(e.target.closest(`[${scheduler.config.event_attribute}]`)){\r\n\t\t\t\t\tconst id = e.target.closest(`[${scheduler.config.event_attribute}]`).getAttribute(scheduler.config.event_attribute);\r\n\t\t\t\t\tscheduler.showLightbox(id);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\tvar evs = this.getEvents(date, this.date.add(date, 1, \"day\"));\r\n\t\tvar html = \"\";\r\n\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tif(!this.filter_event(ev.id, ev))\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\tvar bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\t\t\tvar color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\t\t\thtml += \"
\";\r\n\t\t\thtml += \"
\" + (evs[i]._timed ? this.templates.event_date(evs[i].start_date) : \"\") + \"
\";\r\n\t\t\thtml += \"
 
\";\r\n\t\t\thtml += this.templates.year_tooltip(evs[i].start_date, evs[i].end_date, evs[i]) + \"
\";\r\n\t\t}\r\n\r\n\t\tthis._tooltip.style.display = \"\";\r\n\t\tthis._tooltip.style.top = \"0px\";\r\n\r\n\r\n\t\tif (document.body.offsetWidth - pos.left - this._tooltip.offsetWidth < 0)\r\n\t\t\tthis._tooltip.style.left = pos.left - this._tooltip.offsetWidth + \"px\";\r\n\t\telse\r\n\t\t\tthis._tooltip.style.left = pos.left + src.offsetWidth + \"px\";\r\n\r\n\t\tthis._tooltip.date = date;\r\n\t\tthis._tooltip.innerHTML = html;\r\n\r\n\t\tif (document.body.offsetHeight - pos.top - this._tooltip.offsetHeight < 0)\r\n\t\t\tthis._tooltip.style.top = pos.top - this._tooltip.offsetHeight + src.offsetHeight + \"px\";\r\n\t\telse\r\n\t\t\tthis._tooltip.style.top = pos.top + \"px\";\r\n\t};\r\n\r\n\tscheduler._year_view_tooltip_handler = function(e){\r\n\t\tif (!isYearMode()) return;\r\n\r\n\t\tvar src = e.target || e.srcElement;\r\n\t\tif (src.tagName.toLowerCase() == 'a') // fix for active links extension (it adds links to the date in the cell)\r\n\t\t\tsrc = src.parentNode;\r\n\t\tif (scheduler._getClassName(src).indexOf(\"dhx_year_event\") != -1)\r\n\t\t\tscheduler._showToolTip(scheduler.templates.parse_date(src.getAttribute(\"data-year-date\")), scheduler.$domHelpers.getOffset(src), e, src);\r\n\t\telse\r\n\t\t\tscheduler._hideToolTip();\r\n\t};\r\n\tscheduler._init_year_tooltip = function() {\r\n\t\tscheduler._detachDomEvent(scheduler._els[\"dhx_cal_data\"][0], \"mouseover\", scheduler._year_view_tooltip_handler);\r\n\t\tscheduler.event(scheduler._els[\"dhx_cal_data\"][0], \"mouseover\", scheduler._year_view_tooltip_handler);\r\n\t};\r\n\r\n\tscheduler._get_year_cell = function(d) {\r\n\t\tvar dateString = scheduler.templates.format_date(d);\r\n\t\tvar cells = this.$root.querySelectorAll(`.dhx_cal_data .dhx_cal_datepicker_date[data-cell-date=\"${dateString}\"]`);\r\n\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\tif(!scheduler.$domHelpers.closest(cells[i], \".dhx_after, .dhx_before\")){\r\n\t\t\t\treturn cells[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t};\r\n\r\n\tscheduler._year_marked_cells = {};\r\n\tscheduler._mark_year_date = function(date, event) {\r\n\t\tvar dateString = scheduler.templates.format_date(date);\r\n\t\tvar cell = this._get_year_cell(date);\r\n\t\tif (!cell) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tvar ev_class = this.templates.event_class(event.start_date, event.end_date, event);\r\n\t\tif (!scheduler._year_marked_cells[dateString]) {\r\n\t\t\tcell.classList.add(\"dhx_year_event\", \"dhx_cal_datepicker_event\");// = \"dhx_month_head dhx_year_event\";\r\n\t\t\tcell.setAttribute(\"data-year-date\", dateString);\r\n\t\t\tcell.setAttribute(\"date\", dateString);\r\n\t\t\tscheduler._year_marked_cells[dateString] = cell;\r\n\t\t}\r\n\t\tif(ev_class){\r\n\t\t\tcell.classList.add(ev_class);\r\n\t\t}\r\n\t};\r\n\tscheduler._unmark_year_date = function(date) {\r\n\t\tvar cell = this._get_year_cell(date);\r\n\t\tif (!cell) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcell.classList.remove(\"dhx_year_event\", \"dhx_cal_datepicker_event\");\r\n//\t\tcell.className = \"dhx_month_head\";\r\n\t};\r\n\tscheduler._year_render_event = function(event) {\r\n\t\tvar date = event.start_date;\r\n\t\tif (date.valueOf() < this._min_date.valueOf()){\r\n\t\t\tdate = this._min_date;\r\n\t\t} else {\r\n\t\t\tdate = this.date.date_part(new Date(date));\r\n\t\t}\r\n\r\n\t\twhile (date < event.end_date) {\r\n\t\t\tthis._mark_year_date(date, event);\r\n\t\t\tdate = this.date.add(date, 1, \"day\");\r\n\t\t\tif (date.valueOf() >= this._max_date.valueOf())\r\n\t\t\t\treturn;\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler.year_view = function(mode) {\r\n\r\n\t\tscheduler.set_sizes();\r\n\r\n\t\tscheduler._table_view = mode;\r\n\r\n\t\tif (this._load_mode && this._load()) return;\r\n\r\n\t\tif (mode) {\r\n\t\t\tscheduler._init_year_tooltip();\r\n\t\t\tscheduler._reset_year_scale();\r\n\t\t\tif (scheduler._load_mode && scheduler._load()){\r\n\t\t\t\tscheduler._render_wait = true;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tscheduler.render_view_data();\r\n\t\t} else {\r\n\t\t\tscheduler._hideToolTip();\r\n\t\t}\r\n\t};\r\n\tscheduler._reset_year_scale = function() {\r\n\t\tthis._cols = [];\r\n\t\tthis._colsS = {};\r\n\t\tvar week_starts = []; //start day of first week in each month\r\n\t\tvar dataArea = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tvar c = this.config;\r\n\t\tdataArea.scrollTop = 0; //fix flickering in FF\r\n\t\tdataArea.innerHTML = \"\";\r\n\r\n\t\tvar dy = Math.floor((parseInt(dataArea.style.height) - scheduler.xy.year_top) / c.year_y);\r\n\t\tif (dy < 190) {\r\n\t\t\tdy = 190;\r\n\t\t}\r\n\r\n\t\tvar week_template = document.createElement(\"div\");\r\n\t\tvar dummy_date = this.date.week_start(scheduler._currentDate());\r\n\r\n\t\tthis._process_ignores(dummy_date, 7, \"day\", 1);\r\n\r\n\t\tfor (var i = 0; i < 7; i++) {\r\n\t\t\tif(!(this._ignores && this._ignores[i])) {\r\n\t\t\t\tthis._cols[i] = 'var(--dhx-scheduler-datepicker-cell-size)';\r\n\t\t\t\tthis._render_x_header(i, 0, dummy_date, week_template);\r\n\r\n\t\t\t}\r\n\t\t\tdummy_date = this.date.add(dummy_date, 1, \"day\");\r\n\t\t}\r\n\t\tweek_template.lastChild.className += \" dhx_scale_bar_last\";\r\n\r\n\t\tfor(var i = 0; i < week_template.childNodes.length; i++){\r\n\t\t\tthis._waiAria.yearHeadCell(week_template.childNodes[i]);\r\n\t\t}\r\n\r\n\t\tvar sd = this.date[this._mode + \"_start\"](this.date.copy(this._date));\r\n\t\tvar ssd = sd;\r\n\t\tvar yearBox = null;\r\n\t\tconst wrapper = document.createElement(\"div\");\r\n\t\twrapper.classList.add(\"dhx_year_wrapper\");\r\n\t\tfor (var i = 0; i < c.year_y; i++){\r\n\t\t\tfor (var j = 0; j < c.year_x; j++) {\r\n\t\t\t\tyearBox = document.createElement(\"div\");\r\n\t\t\t\tyearBox.className = \"dhx_year_box\";\r\n\r\n\t\t\t\tyearBox.setAttribute(\"date\", this._helpers.formatDate(sd));\r\n\t\t\t\tyearBox.setAttribute(\"data-month-date\", this._helpers.formatDate(sd));\r\n\t\t\t\tyearBox.innerHTML = \"
\" + week_template.innerHTML + \"
\";\r\n\r\n\t\t\t\tvar header = yearBox.querySelector(\".dhx_year_month\");\r\n\t\t\t\tvar grid = yearBox.querySelector(\".dhx_year_grid\");\r\n\t\t\t\tvar body = yearBox.querySelector(\".dhx_year_body\");\r\n\r\n\t\t\t\tvar headerId = scheduler.uid();\r\n\t\t\t\tthis._waiAria.yearHeader(header, headerId);\r\n\t\t\t\tthis._waiAria.yearGrid(grid, headerId);\r\n\r\n\r\n\t\t\t\theader.innerHTML = this.templates.year_month(sd);\r\n\r\n\r\n\r\n\t\t\t\tvar dd = this.date.week_start(sd);\r\n\t\t\t\tthis._reset_month_scale(body, sd, dd, 6);\r\n\r\n\t\t\t\tvar days = body.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var day = 0; day < days.length; day++){\r\n\t\t\t\t\tthis._waiAria.yearDayCell(days[day]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\twrapper.appendChild(yearBox);\r\n\r\n\t\t\t\tweek_starts[i * c.year_x + j] = (sd.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) % 7;\r\n\t\t\t\tsd = this.date.add(sd, 1, \"month\");\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdataArea.appendChild(wrapper);\r\n\r\n\t\tvar dateElement = this._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML = this.templates[this._mode + \"_date\"](ssd, sd, this._mode);\r\n\t\t}\r\n\r\n\t\tthis.week_starts = week_starts;\r\n\t\tweek_starts._month = ssd.getMonth();\r\n\t\tthis._min_date = ssd;\r\n\t\tthis._max_date = sd;\r\n\t};\r\n\r\n\tscheduler._reset_year_scale = function(){\r\n\r\n\t\tvar dataArea = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tdataArea.scrollTop = 0; //fix flickering in FF\r\n\t\tdataArea.innerHTML = \"\";\r\n\r\n\t\tlet yearStart = this.date.year_start(new Date(this._date));\r\n\t\t\r\n\t\tthis._min_date = this.date.week_start(new Date(yearStart));\r\n\r\n\t\tconst wrapper = document.createElement(\"div\");\r\n\t\twrapper.classList.add(\"dhx_year_wrapper\");\r\n\r\n\t\tlet currentDate = yearStart;\r\n\t\tfor(let i = 0; i < 12; i++){\r\n\t\t\tlet yearBox = document.createElement(\"div\");\r\n\t\t\tyearBox.className = \"dhx_year_box\";\r\n\r\n\t\t\tyearBox.setAttribute(\"date\", this._helpers.formatDate(currentDate));\r\n\t\t\tyearBox.setAttribute(\"data-month-date\", this._helpers.formatDate(currentDate));\r\n\t\t\tyearBox.innerHTML = `
${this.templates.year_month(currentDate)}
\r\n\t\t\t
`;\r\n\r\n\t\t\tconst yearGrid = yearBox.querySelector(\".dhx_year_grid\");\r\n\t\t\tconst datepicker = scheduler._createDatePicker(null, {\r\n\t\t\t\tdate: currentDate,\r\n\t\t\t\tminWeeks: 6\r\n\t\t\t});\r\n\t\t\tdatepicker._renderDayGrid(yearGrid);\r\n\t\t\tdatepicker.destructor();\r\n\r\n\t\t\twrapper.appendChild(yearBox);\r\n\r\n\t\t\tcurrentDate = this.date.add(currentDate, 1, \"month\");\r\n\r\n\t\t}\r\n\t\tdataArea.appendChild(wrapper);\r\n\r\n\t\tlet lastDate = this.date.add(yearStart, 1, \"year\");\r\n\t\tif(lastDate.valueOf() != this.date.week_start(new Date(lastDate)).valueOf()){\r\n\t\t\tlastDate = this.date.week_start(new Date(lastDate));\r\n\t\t\tlastDate = this.date.add(lastDate, 1, \"week\");\r\n\t\t}\r\n\t\tthis._max_date = lastDate;\r\n\t\tvar dateElement = this._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML = this.templates[this._mode + \"_date\"](yearStart, lastDate, this._mode);\r\n\t\t}\r\n\t};\r\n\r\n\tvar getActionData = scheduler.getActionData;\r\n\tscheduler.getActionData = function(n_ev) {\r\n\t\tif(!isYearMode()){\r\n\t\t\treturn getActionData.apply(scheduler, arguments);\r\n\t\t}\r\n\t\t\r\n\t\tvar date = getCellDate(n_ev.target);\r\n\t\treturn {\r\n\t\t\tdate:date,\r\n\t\t\tsection:null\r\n\t\t};\r\n\t};\r\n\r\n\tvar locateEvent = scheduler._locate_event;\r\n\tscheduler._locate_event = function(node) {\r\n\t\tvar id = locateEvent.apply(scheduler, arguments);\r\n\t\tif(!id){\r\n\t\t\t\r\n\t\t\tvar date = getCellDate(node);\r\n\t\t\tif(!date) return null;\r\n\t\t\tvar evs = scheduler.getEvents(date, scheduler.date.add(date, 1, \"day\"));\r\n\t\t\tif(!evs.length) return null;\r\n\r\n\t\t\t//can be multiple events in the cell, return any single one\r\n\t\t\tid = evs[0].id;\r\n\t\t}\r\n\t\treturn id;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tscheduler._hideToolTip();\r\n\t});\r\n}","export default function(scheduler){\r\n\r\n\r\n(function(){\r\n\r\nfunction defaults(obj, std){\r\n\tfor (var key in std)\r\n\t\tif (!obj[key])\r\n\t\t\tobj[key] = std[key];\r\n\treturn obj;\r\n}\r\n\r\nfunction getElementSizes(element, scheduler) {\r\n\tvar sizes = {};\r\n\telement = scheduler._els[element];\r\n\tif (element && element[0]) {\r\n\t\tsizes.x = element[0].scrollWidth;\r\n\t\tsizes.y = element[0].scrollHeight;\r\n\t} else {\r\n\t\tsizes.x = 0;\r\n\t\tsizes.y = 0;\r\n\t}\r\n\treturn sizes;\r\n}\r\n\r\n//compatibility for new versions of scheduler\r\nif(!window.dhtmlxAjax){\r\n\twindow.dhtmlxAjax = {\r\n\t\tpost: function(url, data, callback){\r\n\t\t\treturn window.dhx4.ajax.post(url, data, callback);\r\n\t\t},\r\n\t\tget: function(url, callback){\r\n\t\t\treturn window.ajax.get(url, callback);\r\n\t\t}\r\n\t};\r\n}\r\n\r\nfunction add_export_methods(scheduler){\r\n\r\n\tscheduler.exportToPDF = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.pdf\",\r\n\t\t\tformat:\"A4\",\r\n\t\t\torientation:\"landscape\",\r\n\t\t\tdpi:96,\r\n\t\t\tzoom:1,\r\n\t\t\trtl: scheduler.config.rtl\r\n\t\t});\r\n\t\tconfig.html = this._export_html(config);\r\n\t\tconfig.mode = this.getState().mode;\r\n\t\tthis._send_to_export(config, \"pdf\");\r\n\t};\r\n\r\n\tscheduler.exportToPNG = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.png\",\r\n\t\t\tformat:\"A4\",\r\n\t\t\torientation:\"landscape\",\r\n\t\t\tdpi:96,\r\n\t\t\tzoom:1,\r\n\t\t\trtl: scheduler.config.rtl\r\n\t\t});\r\n\t\tconfig.html = this._export_html(config);\r\n\t\tconfig.mode = this.getState().mode;\r\n\t\tthis._send_to_export(config, \"png\");\r\n\t};\r\n\r\n\tscheduler.exportToICal = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.ical\",\r\n\t\t\tdata:this._serialize_plain(null, config)\r\n\t\t});\r\n\t\tthis._send_to_export(config, \"ical\");\r\n\t};\r\n\r\n\tscheduler.exportToExcel = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.xlsx\",\r\n\t\t\ttitle:\"Events\",\r\n\t\t\tdata:this._serialize_plain( this.templates.xml_format, config),\r\n\t\t\tcolumns:this._serialize_columns()\r\n\t\t});\r\n\t\tthis._send_to_export(config, \"excel\");\r\n\t};\r\n\r\n\tscheduler._ajax_to_export = function(data, type, callback){\r\n\t\tdelete data.callback;\r\n\t\tvar url = data.server || \"https://export.dhtmlx.com/scheduler\";\r\n\r\n\t\twindow.dhtmlxAjax.post(url,\r\n\t\t\t\"type=\"+type+\"&store=1&data=\"+encodeURIComponent(JSON.stringify(data)),\r\n\t\t\tfunction(loader){\r\n\t\t\t\tvar fail = loader.xmlDoc.status > 400;\r\n\t\t\t\tvar info = null;\r\n\r\n\t\t\t\tif (!fail){\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\tinfo = JSON.parse(loader.xmlDoc.responseText);\r\n\t\t\t\t\t}catch(e){}\r\n\t\t\t\t}\r\n\t\t\t\tcallback(info);\r\n\t\t\t}\r\n\t\t);\r\n\t};\r\n\r\n\tscheduler._plain_export_copy = function(source, format){\r\n\t\tvar target = {};\r\n\t\tfor (var key in source)\r\n\t\t\ttarget[key] = source[key];\r\n\r\n\t\ttarget.start_date = format(target.start_date);\r\n\t\ttarget.end_date = format(target.end_date);\r\n\t\ttarget.$text = this.templates.event_text(source.start_date, source.end_date, source);\r\n\r\n\t\treturn target;\r\n\t};\r\n\r\n\tscheduler._serialize_plain = function(format, config){\r\n\t\tformat = format || scheduler.date.date_to_str(\"%Y%m%dT%H%i%s\", true);\r\n\r\n\t\tvar events;\r\n\t\tif (config && config.start && config.end)\r\n\t\t\tevents = scheduler.getEvents(config.start, config.end);\r\n\t\telse\r\n\t\t\tevents = scheduler.getEvents();\r\n\r\n\t\tvar data = [];\r\n\t\tfor (var i = 0; i< events.length; i++)\r\n\t\t\tdata[i] = this._plain_export_copy(events[i], format);\r\n\r\n\t\treturn data;\r\n\t};\r\n\r\n\tscheduler._serialize_columns = function(){\r\n\t\treturn [\r\n\t\t\t{ id:\"start_date\", header:\"Start Date\", width:30 },\r\n\t\t\t{ id:\"end_date\", header:\"End Date\", width:30 },\r\n\t\t\t{ id:\"$text\", header:\"Text\", width:100 }\r\n\t\t];\r\n\t};\r\n\r\n\tscheduler._send_to_export = function(data, type){\r\n\t\tif(!data.version){\r\n\t\t\tdata.version = scheduler.version;\r\n\t\t}\r\n\r\n\t\tif(!data.skin){\r\n\t\t\tdata.skin = scheduler.skin;\r\n\t\t}\r\n\r\n\t\tif (data.callback)\r\n\t\t\t\treturn scheduler._ajax_to_export(data, type, data.callback);\r\n\r\n\t\tvar form = this._create_hidden_form();\r\n\r\n\t\tform.firstChild.action = data.server || \"https://export.dhtmlx.com/scheduler\";\r\n\t\tform.firstChild.childNodes[0].value = JSON.stringify(data);\r\n\t\tform.firstChild.childNodes[1].value = type;\r\n\t\tform.firstChild.submit();\r\n\t};\r\n\r\n\tscheduler._create_hidden_form = function(){\r\n\t\tif (!this._hidden_export_form){\r\n\t\t\tvar t = this._hidden_export_form = document.createElement(\"div\");\r\n\t\t\tt.style.display = \"none\";\r\n\t\t\tt.innerHTML = \"
\";\r\n\t\t\tdocument.body.appendChild(t);\r\n\t\t}\r\n\t\treturn this._hidden_export_form;\r\n\t};\r\n\r\n\tscheduler._get_export_size = function(format, orientation, zoom, dpi, header, footer, scales) {\r\n\r\n\t\tdpi = parseInt(dpi)/25.4 || 4;\r\n\r\n\t\tvar sizes = {\r\n\t\t\t\"A5\":{ x:148, y:210 },\r\n\t\t\t\"A4\":{ x:210, y:297 },\r\n\t\t\t\"A3\":{ x:297, y:420 },\r\n\t\t\t\"A2\":{ x:420, y:594 },\r\n\t\t\t\"A1\":{ x:594, y:841 },\r\n\t\t\t\"A0\":{ x:841, y:1189 }\r\n\t\t};\r\n\r\n\t\tvar dataX = getElementSizes(\"dhx_cal_data\", this).x;\r\n\t\tvar dataY = getElementSizes(\"dhx_cal_data\", this).y;\r\n\t\tvar headY = getElementSizes(\"dhx_cal_header\", this).y;\r\n\t\tvar multY = getElementSizes(\"dhx_multi_day\", this).y;\r\n\r\n\t\tvar cSize = {\r\n\t\t\ty: dataY + headY + multY\r\n\t\t};\r\n\r\n\t\tif (format === \"full\") {\r\n\t\t\tcSize.x = dataX;\r\n\t\t} else {\r\n\t\t\tcSize.x = Math.floor( (orientation === \"landscape\" ? sizes[format].y : sizes[format].x) * dpi );\r\n\t\t}\r\n\r\n\t\tif (scales) {\r\n\t\t\tcSize.x *= (parseFloat(scales.x) || 1);\r\n\t\t\tcSize.y *= (parseFloat(scales.y) || 1);\r\n\t\t}\r\n\r\n\t\treturn cSize;\r\n\t};\r\n\r\n\tfunction getTimeline() {\r\n\t\tvar mode = scheduler.getState().mode;\r\n\t\tif (scheduler.matrix && scheduler.matrix[mode]) {\r\n\t\t\treturn scheduler.matrix[mode];\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n\r\n\tfunction getInitialSizes() {\r\n\t\tvar smartRendering = undefined,\r\n\t\t\tscrollable = undefined;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (timeline) {\r\n\t\t\tscrollable = timeline.scrollable;\r\n\t\t\tsmartRendering = timeline.smart_rendering;\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tnav_height: scheduler.xy.nav_height,\r\n\t\t\tscroll_width: scheduler.xy.scroll_width,\r\n\t\t\tstyle_width: scheduler._obj.style.width,\r\n\t\t\tstyle_height: scheduler._obj.style.height,\r\n\t\t\ttimeline_scrollable: scrollable,\r\n\t\t\ttimeline_smart_rendering: smartRendering\r\n\t\t};\r\n\t}\r\n\r\n\tfunction setExportSizes(size, initialSizes) {\r\n\t\tscheduler._obj.style.width = size.x + \"px\";\r\n\t\tscheduler._obj.style.height = size.y + \"px\";\r\n\r\n\t\tscheduler.xy.nav_height = 0;\r\n\t\tscheduler.xy.scroll_width = 0;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (initialSizes.timeline_scrollable || initialSizes.timeline_smart_rendering) {\r\n\r\n\t\t\ttimeline.scrollable = false;\r\n\t\t\ttimeline.smart_rendering = false;\r\n\t\t}\r\n\t}\r\n\r\n\tfunction setInitialSizes(initialSizes) {\r\n\t\tscheduler.xy.scroll_width = initialSizes.scroll_width;\r\n\t\tscheduler.xy.nav_height = initialSizes.nav_height;\r\n\t\tscheduler._obj.style.width = initialSizes.style_width;\r\n\t\tscheduler._obj.style.height = initialSizes.style_height;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (initialSizes.timeline_scrollable || initialSizes.timeline_smart_rendering) {\r\n\t\t\ttimeline.scrollable = initialSizes.timeline_scrollable;\r\n\t\t\ttimeline.smart_rendering = initialSizes.timeline_smart_rendering;\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler._export_html = function (obj) {\r\n\t\tvar initialSizes = getInitialSizes();\r\n\t\tvar size = scheduler._get_export_size(obj.format, obj.orientation, obj.zoom, obj.dpi, obj.header, obj.footer, obj.scales);\r\n\r\n\t\tvar html = \"\";\r\n\t\ttry {\r\n\t\t\tsetExportSizes(size, initialSizes);\r\n\t\t\tscheduler.setCurrentView();\r\n\t\t\thtml = scheduler._obj.innerHTML;\r\n\t\t} catch (e) {\r\n\r\n\t\t\t// eslint-disable-next-line no-console\r\n\t\t\tconsole.error(e);\r\n\t\t} finally {\r\n\t\t\tsetInitialSizes(initialSizes);\r\n\t\t\tscheduler.setCurrentView();\r\n\t\t}\r\n\r\n\t\treturn html;\r\n\t};\r\n\r\n}\r\n\r\nadd_export_methods(scheduler);\r\n\r\n\r\n})();\r\n\r\n}","import active_links from \"./active_links\";\r\nimport agenda_legacy from \"./agenda_legacy_view\";\r\nimport agenda_view from \"./agenda\";\r\nimport all_timed from \"./all_timed\";\r\nimport collision from \"./collision\";\r\nimport container_autoresize from \"./container_autoresize\";\r\nimport cookie from \"./cookie\";\r\nimport daytimeline_restricted from \"./restricted_extensions/daytimeline\";\r\nimport drag_between_restricted from \"./restricted_extensions/drag_between\";\r\nimport editors from \"./editors\";\r\nimport expand from \"./expand\";\r\nimport grid_view from \"./restricted_extensions/grid_view\";\r\nimport html_templates from \"./html_templates\";\r\nimport key_nav from \"./key_nav\";\r\nimport layer from \"./layer\";\r\nimport limit from \"./limit\";\r\nimport map_view from \"./map_view\";\r\nimport minical from \"./minical\";\r\nimport monthheight from \"./monthheight\";\r\nimport multisection_restricted from \"./restricted_extensions/multisection\";\r\nimport multiselect from \"./multiselect\";\r\nimport multisource from \"./multisource\";\r\nimport mvc from \"./mvc\";\r\nimport outerdrag from \"./outerdrag\";\r\nimport pdf from \"./pdf\";\r\nimport quick_info from \"./quick_info\";\r\nimport readonly from \"./readonly\";\r\nimport recurring from \"./recurring\";\r\nimport serialize from \"./serialize\";\r\nimport timeline_restricted from \"./restricted_extensions/timeline\";\r\nimport tooltip from \"./tooltip\";\r\nimport treetimeline_restricted from \"./restricted_extensions/treetimeline\";\r\nimport units_restricted from \"./restricted_extensions/units\";\r\nimport url from \"./url\";\r\nimport week_agenda_restricted from \"./restricted_extensions/week_agenda\";\r\nimport wp from \"./wp\";\r\nimport year_view from \"./year_view\";\r\nimport export_api from \"./export_api\";\r\n\r\nexport default {\r\n\tactive_links,\r\n\tagenda_legacy,\r\n\tagenda_view,\r\n\tall_timed,\r\n\tcollision,\r\n\tcontainer_autoresize,\r\n\tcookie,\r\n\tdaytimeline: daytimeline_restricted,\r\n\tdrag_between: drag_between_restricted,\r\n\teditors,\r\n\texpand,\r\n\texport_api,\r\n\tgrid_view,\r\n\thtml_templates,\r\n\tkey_nav,\r\n\tlayer,\r\n\tlimit,\r\n\tmap_view,\r\n\tminical,\r\n\tmonthheight,\r\n\tmultisection: multisection_restricted,\r\n\tmultiselect,\r\n\tmultisource,\r\n\tmvc,\r\n\touterdrag,\r\n\tpdf,\r\n\tquick_info,\r\n\treadonly,\r\n\trecurring,\r\n\tserialize,\r\n\ttimeline: timeline_restricted,\r\n\ttooltip,\r\n\ttreetimeline: treetimeline_restricted,\r\n\tunits: units_restricted,\r\n\turl,\r\n\tweek_agenda: week_agenda_restricted,\r\n\twp,\r\n\tyear_view\r\n};","import SchedulerFactory from \"./scheduler_factory\";\r\nimport gplExtensions from \"./ext/extensions_gpl\";\r\n\r\nconst factory = new SchedulerFactory(gplExtensions);\r\n\r\nconst scheduler = factory.getSchedulerInstance();\r\nconst Scheduler = {\r\n\tplugin: scheduler.bind(factory.plugin, factory)\r\n};\r\n\r\nwindow.scheduler = scheduler;\r\nwindow.Scheduler = Scheduler;\r\n\r\nif(!window.$dhx) {\r\n\twindow.$dhx = {};\r\n}\r\n\r\nwindow.$dhx.scheduler = scheduler;\r\nwindow.$dhx.Scheduler = Scheduler;\r\n\r\nexport default scheduler;export { scheduler, Scheduler };"],"names":["dhtmlxHook","dhtmlx","attaches","attachScheduler","day","mode","tabs","scheduler","obj","document","createElement","id","this","_genStr","innerHTML","body","appendChild","firstChild","attachObject","vs","av","sched","schedId","setSizes","updateView","destructor","init","_viewRestore","globalScope","window","global","global$1","assert","check","message","config","show_errors","callEvent","type","text","expire","console","log","extend","commonViews","agenda","grid","map","unit","timeline","week_agenda","year","anythingElse","requiredExtensions","limit","_commonErrorMessages","unknownView","view","relatedDoc","relatedExtension","collapsedContainer","div","createTimelineView","Error","createUnitsView","createGridView","addMarkedTimespan","renderCalendar","exportToPNG","join","exportToPDF","attachEvent","dhtmlxError","catchError","a","b","c","responseText","ajax_error","alert","className","element","classes","split","forEach","cssClass","classList","add","itemTypes","rows_container","row","setAttribute","fix_tab_position","$firstTab","$lastTab","$segmentedTab","date","button","builtInButton","spacer","minicalendarButton","minicalendarDiv","click","$_eventAttached","event","isCalendarVisible","destroyCalendar","position","getState","navigation","handler","calendar","setCurrentView","html_element","findRenderer","renderer","rows","cols","renderElement","css","width","value","style","height","html","align","justifyContent","prepareConfig","renderLayout","fragment","createDocumentFragment","items","Array","isArray","i","length","next","_init_nav_bar","navBar","$container","querySelector","_update_nav_bar","previousHeight","container","heightChanged","configChanged","newHeight","xy","nav_height","unset_actions","_els","get_elements","set_actions","display","isAttachedNode","root","parentNode","getWindowSize","w","innerWidth","documentElement","clientWidth","h","innerHeight","clientHeight","equals","listenWindowResize","oldSize","resizeDelay","clearTimeout","setTimeout","$destroyed","newSize","triggerSchedulerResize","$root","watchNodeResize","offsetHeight","previousWidth","offsetWidth","lowlevelResizeWatcher","addResizeListener","containerStyles","getComputedStyle","getPropertyValue","resizeWatcher","tabIndex","wai_aria_attributes","salesforce_environment","contentWindow","removeChild","EventHost","_silent_mode","listeners","_silentStart","createEventStorage","handlers","index","eventStorage","combinedResult","handlerResult","apply","arguments","addEvent","settings","handlerId","once","originalHandler","removeEvent","clear","makeEventable","eventHost","eventName","toLowerCase","thisObject","bind","innerId","attachAll","callback","name","eventArguments","handlerName","concat","checkEvent","detachEvent","list","eventId","detachAllEvents","extend$l","_detachDomEvent","el","removeEventListener","_init_once","scheduler_resize_listener","layout","navbar","render","header","dataArea","hasSchedulerMarkup","createDefaultHeader","views","nav","matrix","push","_props","_grid","names","optionalViews","viewName","_currentDate","_obj","getElementById","error","wai_aria_application_role","JSON","stringify","rtl","_skin_init","_scroll","init_templates","_init_touch_events","set_sizes","$initialized","min_event_height","bar_height","scale_width","scroll_width","scale_height","month_scale_height","menu_width","margin_top","margin_left","editor_width","month_head_height","event_header_height","keys","edit_save","edit_cancel","functor","object","_x","scale_x","_table_view","materialScalePlaceholder","_is_material_skin","insertBefore","set_xy","offsetTop","_lightbox","_setLbPosition","_data_width","left","right","node","x","y","prepareValue","val","prepared","isNaN","Number","Math","max","direction","undefined","top","els","getElementsByTagName","class_name","_getClassName","attr_value","getAttribute","label","locale","labels","_waiAria","labelAttr","domEventsScope","_createDomEventScope","detachAll","_click","attach","e","preventDefault","_temp_touch_block","_on_mouse_move","_ignore_next_click","_on_mouse_down","_on_mouse_up","_on_dbl_click","returnValue","_locate_event","target","select","_select_id","_close_not_saved","editStop","unselect","updateEvent","previousSelection","getEvent","_mode","Date","_date","min_date","_min_date","max_date","_max_date","editor_id","_edit_id","lightbox_id","_lightbox_id","new_event","_new_event","select_id","expanded","drag_id","_drag_id","drag_mode","_drag_mode","dhx_cal_data","cancelBubble","getActionData","readonly","icon","closest","mask","indexOf","buttons","replace","valueOf","dhx_cal_prev_button","dhx_cal_next_button","dummy","step","def_step","dhx_cal_today_button","dhx_cal_tab","deprecated_name","substring","search","delete","confirm_deleting","_dhtmlx_confirm","title","title_confirm_deleting","deleteEvent","ok","icon_delete","edit","save","details","showLightbox","form","cancel","opts","result","confirm","addEventNow","start","end","base","_isObject","_isDate","duration","event_duration","time_step","start_date","round","start_hour","first_hour","getHours","setHours","end_date","setTime","uid","_loading","_drag_event","src","dblclick_create","details_on_dblclick","_timed","viewHandler","call","_get_column_index","x_pos","column","_cols","_ignores","floor","_week_indexes_from_pos","pos","min","ceil","hour_size_px","_mouse_coords","ev","$env","isIE","pageX","pageY","clientX","scrollLeft","clientLeft","clientY","scrollTop","clientTop","_colsS","$domHelpers","getAbsoluteLeft","getAbsoluteTop","dy","heights","_ignores_detected","preserve_length","_event_length","_get_real_event_length","x_step","x_unit","timestamp","confirmationText","confirm_closing","title_confirm_closing","positive_closing","_drag_pos","_correct_shift","back","getTimezoneOffset","_is_pos_changed","old_pos","new_pos","diff","old_val","new_val","acc","abs","delay","d_pos","has_moved","_correct_drag_start_date","len","_start_correction","_end_correction","last_hour","getMinutes","_get_fictional_event_length","_correct_drag_end_date","mousedownPos","_get_date_from_pos","_drag_start","res","fields","timeStep","custom","time_part","_dragEventBody","_move_event_shift","resize_date","_drag_from_start","date_part","resize_from_start","end_day_start","end_day_date","firstHour","lastHour","maxY","precisePos","minDate","maxDate","preciseDate","cursor","shift","new_end","new_start","limit_drag_out","all_timed","_get_section_view","_get_event_sday","getView","getDate","_allow_dnd","update_render","sx","update_view","for_rendered","r","srcElement","classname","drag_event_body","fullClass","_lame_clone","_get_private_properties","_clear_temporary_properties","clean","flagged_event","initial","current_state","_mobile","moved","_dhx_changed","is_new","_lame_copy","edit_on_create","details_on_create","isOneDayEvent","render_view_data","_trigger_dyn_loading","_load_mode","_load","_render_wait","_reset_ignores","_reset_scale","isViewExists","templates","_set_aria_buttons_attrs","buttonGroups","group","j","prev","headerButtonsAttributes","icon_form","icon_edit","oldClass","newClass","dhx_multi_day","prev_scroll","preserve_scroll","multidayScroll","_dy_shift","tab","headerToggleState","remove","_render_x_header","offset_top","head","left_border","columnHeaderText","dayHeaderAttr","_get_columns_num","from","to","count","count_n","_get_timeunit_start","_get_view_end","dd","ed","_calc_scale_sizes","summ","_process_ignores","realcount","_set_scale_col_size","_render_scales","data_area","sd","today","parseInt","d","scales","cls","firstHalf","slotDate","getFullYear","getMonth","format_date","htmlContent","time_slot_text","time_slot_class","secondHalf","week_date_class","dayColumnAttr","day_start","_getNavDateElement","str","drag_resize","drag_move","_scales","week_start","navBarDateStr","scaleElement","navBarDateAttr","_reset_month_scale","_reset_hours_scale","multi_day","c1","visibility","totalWidth","col_length","offset","hiddenWidth","c2","cloneNode","cc","content","hour_scale","hourScaleAttr","scroll_hour","now_date","n","preserve","ignore","ign_date","_render_month_scale","view_start","cd","tdwidths","cell_width","getCellHeight","cellheight","table","cell","month_date_class","body_class","head_class","monthCellAttr","cellHead","month_day","cellBody","bf1","cells","querySelectorAll","parse_date","getLabel","property","key","sections","lightbox","map_to","options","updateCollection","list_name","collection","serverList","splice","resetLightbox","hideCover","cache","t","Object","create","String","Boolean","prototype","hasOwnProperty","source","n_ev","section","_focus","focus","getDaysDifference","startDate","endDate","differenceInTime","getTime","differenceInDays","eventLength","startColumnIndex","endColumnIndex","_get_date_index","last_column","excludedDuration","intervalStart","intervalEnd","leftCellCutOffStart","leftCellCutOffEnd","rightCellCutOffStart","rightCellCutOffEnd","ev_length","dir","per_day","days","fd","start_slot","end_slot","_get_section_property","y_property","_is_initialized","state","_is_lightbox_open","defaultDomEvents","addEventListener","eventRemove","createEventScope","domEvents","eventScope","capture","detach","staticArray","slice","_eventRemoveAll","_trim","func","trim","htmlTags","RegExp","extraSpaces","stripHTMLLite","htmlText","singleQuotes","escapeQuotes","getAttributeString","attr","attributes","setAttributes","values","day_date","role","isActive","getHeaderCellAttr","dateString","eventAttr","_eventCommonAttr","event_text","$dataprocessor_class","setEventBarAttr","_getAttributes","attributeSetter","arg","eventBarAttrString","agendaHeadAttrString","agendaHeadDateString","agendaHeadDescriptionString","agendaDataAttrString","agendaEventAttrString","attrs","agendaDetailsBtnString","icon_details","gridAttrString","gridRowAttrString","gridCellAttrString","mapAttrString","mapRowAttrString","mapDetailsBtnString","minicalHeader","headerId","minicalGrid","minicalRow","minicalDayCell","selected","minicalHeadCell","weekAgendaDayCell","weekAgendaEvent","lightboxHiddenAttr","lightboxVisibleAttr","lightboxSectionButtonAttrString","tabindex","yearHeader","yearGrid","yearHeadCell","yearRow","yearDayCell","lightboxAttr","lightboxButtonAttrString","buttonName","eventMenuAttrString","iconName","lightboxHeader","headerText","lightboxSelectAttrString","time_option","month","hour","minute","messageButtonAttrString","buttonLabel","messageInfoAttr","messageModalAttr","quickInfoAttr","quickInfoHeaderAttrString","quickInfoHeader","quickInfoButtonAttrString","tooltipAttr","tooltipVisibleAttr","tooltipHiddenAttr","isDisabled","payload","uidSeed","now","pop","isStringObject","Function","toString","constructor","isNumberObject","isBooleanObject","isDate","defined","timeout","timer","$cancelTimeout","$pending","args","$execute","utils","mixin","force","f","copy","varType","elementPosition","elem","bottom","getBoundingClientRect","box","docElem","pageYOffset","pageXOffset","offsetLeft","offsetParent","getRelativeEventPosition","getNodePosition","getClassName","baseVal","getTargetNode","trg","tagName","shadowRoot","composedPath","locateCss","strict","ind","charAt","isVisible","currentStyle","hiddenSection","recurringSection","hasNonNegativeTabIndex","hasHref","canHaveHref","area","nodeName","loLowerCase","isEnabled","canDisable","input","textarea","hasAttribute","getFocusableNodes","nodes","nodesArray","$position","sort","isValid","isShadowDomSupported","createShadowRoot","attachShadow","getActiveElement","activeElement","getSelection","focusNode","getRootNode","ShadowRoot","host","hasShadowParent","dom_helpers","htmlObject","getOffset","getOffsetSum","getOffsetRect","test","navigator","userAgent","dummyBox","selector","insertAfter","newNode","referenceNode","nextSibling","isChildOf","child","parent","contains","Element","matches","msMatchesSelector","webkitMatchesSelector","parentElement","nodeType","isWindowAwailable","env","isOpera","isChrome","isKHTML","isFF","isIPad","isEdge","isNode","clearAll","_dp","serialize$1","data","serialized","encodeURIComponent","Promise","createConfig","method","url","async","headers","serialize","ajax","serializeRequestParams","parse","DOMParser","parseFromString","ActiveXObject","loadXML","xmltop","tagname","xhr","status","xml","responseXML","xpath","xpathExp","docObj","selectNodes","first","col","ownerDocument","evaluate","XPathResult","ANY_TYPE","iterateNext","query","_call","get","onLoad","getSync","put","postData","del","post","postSync","resolve","reject","XMLHttpRequest","isQt","match","readyState","xmlDoc","filePath","open","setRequestHeader","toUpperCase","send","urlSeparator","$ajax","generateStringToDate","format","utc","splt","code","csp_date_to_str","to_fixed","getUTCDate","getUTCMonth","getUTCFullYear","day_short","getUTCDay","getDay","day_full","month_short","month_full","getUTCHours","getUTCMinutes","getUTCSeconds","getSeconds","getUTCISOWeek","getISOWeek","csp_str_to_date","set","temp","month_short_hash","month_full_hash","UTC","cspEnabled","checkIfCSPEnabled","useCsp","csp","s","old","setMinutes","setSeconds","setMilliseconds","start_on_monday","month_start","setDate","year_start","setMonth","_add_days","inc","ndate","datesDiff","rest","hours","setYear","num","date_to_str","str_to_date","exactFormat","stringToDateMethod","parseExactFormat","yyyyMMddhhIIss","MMddyyyyhhIIss","ddMMyyyyhhIIss","ISO8601","isYMDDate","datestr","isMDYDate","isDMYDate","isISO8601","parseYMD","parseMDY","parseDMY","parse_exact_format","nday","first_thursday","year_number","ordinal_date","week_number","convert_to_utc","default_date","month_date","load_date","week_date","hour_date","date_format","api_date","displayed_event_color","displayed_event_text_color","wide_form","day_column_padding","use_select_menu_space","drag_create","resize_month_events","resize_month_timed","responsive_lightbox","separate_short_events","cascade_event_display","cascade_event_count","cascade_event_margin","multi_day_height_limit","drag_lightbox","server_utc","touch","touch_tip","touch_drag","touch_swipe_dates","quick_info_detached","drag_highlight","icons_edit","icons_select","buttons_left","buttons_right","highlight_displayed_event","delay_render","timeline_swap_resize","event_attribute","$initial","_helpers","parseDate","xml_date","formatDate","xml_format","d1","d2","day_scale_date","month_scale_date","week_scale_date","time_picker","event_date","load_format","event_header","event_class","event_bar_date","event_bar_text","month_events_link","drag_marker_class","drag_marker_content","tooltip_date_format","tooltip_text","calendar_month","calendar_scale_date","calendar_date","calendar_time","_events","_loaded","clear_view","extra_data","event_updated","silent","setEvent","hash","_rendered","changeEventId","new_id","create_getter","create_setter","_changed","is_visible_events","clear_event","in_visible_range","evFirstHour","evLastHour","end_dates_visible","hidden_duration","checkEndDate","get_visible_events","only_timed","stack","filter_event","filter","_is_main_area_event","evs","hold","full","_not_render","_recalculate_timed","tvs","tvd","_rendered_location","render_data","buffer","renderedLocation","_view_month_day","_render_month_link","toRender","_sday","_eday","curr","_sweek","getEvents","_get_event_bar_pos","widt","x2","_pre_render_events","containers","render_event_bar","max_evs","max_month_events","_sorder","locate_holder","real","render_event","_get_first_visible_cell","hb","h_old","_pre_render_events_line","_pre_render_events_table","monthRows","cellHeight","cHeight","unshift","scrollHeight","scroll_fix","scale_settings","sum_width","row_heights","full_multi_day_height","used_multi_day_height","used_multi_day_height_css","multi_day_section","multi_day_icon","overflowY","datePart","_get_event_mapped_end_date","ev_duration","_min_mapped_duration","evs_originals","sh","eh","_inner","t_ev","t_end_date","slot_index","sorderSet","_is_sorder","k","_max_sorder","max_count","_count","_copy_event","_time_order","_is_any_multiday_cell_visible","isAnyCellVisible","checkDate","noCells","lastDayEnd","cellIndex","locate_holder_day","weekCellIndex","out","weeks","chunks_info","first_chunk","last_chunk","chunk_info","locate_s","locate_e","_length","stack_line","_first_chunk","_last_chunk","_copy_dummy","_y_from_date","sm","_calc_event_y","min_height","em","parentWidth","menu","menu_offset","pos_y","ev_count","ev_sorder","margin","_render_v_bar","_text_style","parentPosition","zIndex","color","setProperty","tplClass","cssText","_editor","shiftKey","keyCode","icons","icons_str","ariaAttr","currentIcon","textColor","highlightEventPosition","contentA","contentB","cs","cse","boxWidth","renderEvent","inner_html","footer_class","_drag_resize","childNodes","past","_get_dnd_order","order","ev_height","max_height","_orig_sorder","evTop","columns","y_event_offset","resize_handle","resizable","left_chunk","right_chunk","resize_left","resize_right","timed","bg_color","style_text","_edit_stop_event","getRenderedEvent","rendered_events","rendered_event","showEvent","original_color","original_text_color","restoreOriginalColors","section_delimiter","getSectionTop","posFromDate","dx","_smartRenderingEnabled","scrollTo","_append_drag_marker","m","zone","scale","lastChild","previousSibling","_update_marker_position","size","_parsers","canParse","topElement","loader","csrfToken","security_key","arr","itms","itm","nodeValue","ud","udx","_xmlNodeToJSON","_userdata","_init_event","json","err","events","dhx_security","collections","collections_loaded","option","option_key","ical","c_start","c_end","incoming","event_r","e_start","e_end","exec","param","param_r","parse_param","substr","dh","dm","utcMark","dn","getSerializator","_load_url","prevent_cache","ajaxCallback","response","on_load","lf","cache_line","temp_to","extend$a","extend$9","extend$8","foundParser","parser","_process","_process_loading","_after_call","_tagvalue","_init_date","getSerializableData","createSerializator","dataset","allEvents","exportedEvent","exportValue","rawValue","load","setLoadMode","array","show_loading","_y","_lightbox_controls","formSection","getLightbox","getValue","form_blocks","get_value","setValue","set_value","get_template_control","control","get_select_control","get_textarea_control","get_time_control","defaults","template","time","sns","placeholder","_get_input","_dhx_onchange","onchange","time_format","_time_format_order","cfg","dt","last","limit_time_select","p","selectBoxClass","range","start_year","end_year","year_range","tdate","_time_values","ariaAttrs","full_day","_full_day","checked","disabled","_fill_lightbox_select","auto_end_date","_update_lightbox_select","time_values","direct_value","fixed_value","value_found","t_v","selectedIndex","original","getLightboxRoot","cspEnvironment","salesforceEnvironment","showCover","show_cover","_cover","_fill_lightbox","lightbox_header","headerContent","headerDate","headerTitle","current_sns","_get_lightbox_section_node","block","default_value","_lightbox_out","_empty_lightbox","hide_lightbox","endLightbox","hide_cover","_move_while_dnd","_finish_dnd","save_lightbox","startLightbox","_custom_lightbox","_temp_lightbox","cancel_lightbox","hideLightbox","_init_lightbox_events","buttonTarget","sectionButton","button_click","action","readonly_active","setLightboxSize","_init_dnd_events","_dnd_start_lb","dhx_unselectable","lb","_lb_start","_ready_to_dnd","recurring","_lightbox_template","label_name","ds","t_ds","_bindLightboxLabels","labelBlock","inputBlock","fallback","inputId","old_id","mobile","MSStream","platform","maxTouchPoints","touchEventsSupported","createEvent","_touch_events","touches","PointerEvent","pointerEnabled","pointerType","msPointerEnabled","MSPOINTER_TYPE_MOUSE","accessor","tracker","scroll_mode","action_mode","dblclicktime","attachTouchEvent","passive","check_direction_swipe","s_ev","e_ev","max_dy","scrollable","doMouseMove","dnd","original_render","_update_global_tip","drag_cancel","_pointerDragId","pointerId","fake_event","_block_next_stop","actTask","fakeTask","sourceTask","_show_global_tip","_hide_global_tip","toptip","_global_tip","drag_to_create","drag_to_move","getRootView","tag","hooks","didInsert","cmp","_addThemeClass","skin","_skin_settings","_skin_xy","lightbox_additional_height","checkIfMaterialSkin","themeNameFromFile","links","href","_build_skin_info","monitorThemeChange","styles","themeVar","isCssVarTheme","themeName","cssValues","oldMaterialTheme","_theme_info","theme","cssVarTheme","themeVariables","calculatedMaterial","probe","cachedBorderBoxValue","checkIfBorderBoxStyling","boxSizing","refreshAfterLoad","_border_box_events","oldStyling","newStyling","_configure","setSkin","flatSkinHourScale","monitorIntervalId","clearInterval","setInterval","csstheme","_old_month_day","old_month_day","reorderTabs","specialTabs","tabName","find","firstTab","reverse","jQuery","$","counter","methods","fn","dhx_scheduler","each","Scheduler","getSchedulerInstance","comp","update_view_timer","curr_view_timer","lazy_setCurrentView","self","oldDate","oldMode","updateFlags","lazy_updateView","ars","DataProcessorEvents","dp","$scheduler","$dp","_dataProcessorHandlers","_validId","setUpdated","z","_in_progress","_invalid","updatedRows","_waitMode","_update_callback","upd","setUserData","action_param","_add_rec_marker","extendScheduler","_is_virtual_event","getUserData","_set_event_text_style","rec_type","rec_pattern","_dp_change_event_id","_dp_hook_delete","setDp","DataProcessor","serverProcessorURL","serverProcessor","autoUpdate","updateMode","_tMode","_headers","_payload","post_delim","messages","updated","inserted","deleted","invalid","invalid_cell","enableUTFencoding","eventable","setTransactionMode","total","_tSend","_endnm","_serializeAsJson","_router","router","escape","_utf","setDataColumns","_columns","getSyncState","enableDataNames","enablePartialDataSend","setUpdateMode","master","rowId","findRow","existing","set_invalid","is_invalid","markRow","sendData","_methods","getActionByState","checkBeforeUpdate","sendAllData","_beforeSendData","_getRowData","_sendData","_serializeAsJSON","serialize_one","pref","_applyPayload","dataToSend","_onResolvedCreateUpdate","resultState","sid","tid","afterUpdateCallback","routerMode","actionPromise","update","then","catch","queryParams","ids","afterUpdate","urlParams","_user","_cleanupArgumentsBeforeSend","preprocessedData","_cleanupItemBeforeSend","valid","_forEachUpdatedRow","_getAllData","has_one","pattern","defineAction","_uActions","btag","marker","correct","originalSid","_errorResponse","cleanUpdate","_setDefaultTransactionMode","_serverProcessor","that","finalizeUpdate","atag","_initialized","_dp_init","dataProcessorEvents","_dataprocessor","setOnAfterUpdate","setOnBeforeUpdateHandler","setAutoUpdate","interval","user","_need_update","_update_busy","xml_node","afterAutoUpdate","fullSync","intervalId","loadUpdate","getUpdates","_getXmlNodeValue","version","vers","updates","processedData","updatedItem","output","_prepareDataItem","item","processedItem","dataItem","createDataProcessor","tMode","batchUpdate","boxAttribute","_dhx_msg_cfg","usercall","modalBox","hide","modal_key","which","messageBox","keyboard","domHelpers","modality","cover","classValue","buttonAriaAttrs","buttonCss","info","timers","pull","getFirstDefined","_boxStructure","contentId","inner","message_ok","message_cancel","btn","_createBox","hidden","alertPopup","confirmPopup","boxPopup","box_params","params","alertBox","confirmBox","focusable","subtype","seed","hideAll","popups","modalbox","ar","day_tab","week_tab","month_tab","icon_save","icon_cancel","section_description","section_time","confirm_recurring","section_recurring","button_recurring","button_recurring_open","button_edit_series","button_edit_occurrence","grid_tab","be","agenda_tab","description","year_tab","week_agenda_tab","repeat_radio_day","repeat_radio_week","repeat_radio_month","repeat_radio_year","repeat_radio_day_type","repeat_text_day_count","repeat_radio_day_type2","repeat_week","repeat_text_week_count","repeat_radio_month_type","repeat_radio_month_start","repeat_text_month_day","repeat_text_month_count","repeat_text_month_count2_before","repeat_text_month_count2_after","repeat_year_label","select_year_day2","repeat_text_year_day","select_year_month","repeat_radio_end","repeat_text_occurences_count","repeat_radio_end2","repeat_radio_end3","month_for_recurring","day_for_recurring","ca","cn","da","de","en","es","fi","fr","he","hu","it","jp","LocaleManager","_locales","nb","nl","no","pl","pt","ro","ru","si","sk","sv","tr","ua","i18nFactory","DatePicker","modes","currentRange","eventDates","currentModeIndex","onStateChangeHandlers","_domEvents","onStateChange","oldState","newState","_notifyStateChange","newDate","setFullYear","setState","_toggleMode","newIndex","backwardArrow","monthLabel","innerText","toLocaleString","startYear","forwardArrow","_adjustDate","_renderCalendarHeader","dataContainer","_renderDayGrid","_renderMonthGrid","_renderYearGrid","daysOfWeekContainer","currentDate","labelFormat","dayElement","currWeek","minWeeks","minSchedulerDate","maxSchedulerDate","eventDaysTable","reduce","dayStart","_renderDayGridHeader","firstDate","monthStart","monthEnd","lastDate","_weeksBetween","currDate","dayGridContainer","dateCell","wrapper","months","formatLabel","monthElement","doneArea","doneBtn","yearElement","factoryMethod","extensionManager","common_errors","common","schedulerCore","wai_aria","dom","_createDatePicker","_getFocusableNodes","_locate_css","messageApi","event_highlight","dhtmlx_suite_hooks","skins","jquery","dataProcessorExtend","connector","i18n","addLocale","setLocale","localeObject","getLocale","dhx_save_btn","dhx_cancel_btn","dhx_delete_btn","ext","activePlugins","plugins","extensionList","getExtensionList","treetimeline","daytimeline","outerdrag","legacy","plugin","getExtension","dependencies","priorities","extension","dep","dependencyName","orderA","orderB","ExtensionsManager","_extensions","SchedulerFactory","extensions","_seed","_schedulerPlugins","_bundledExtensions","_extensionsManager","initConfig","_internal_id","$syncFactory","_initFromConfig","calendars","addCalendar","active_links","active_link_view","_active_link_click","s_d","do_wrapper","fullname","week_x","d_s","agenda_legacy","add_agenda_legacy","agenda_legacy_time","agenda_legacy_text","agenda_legacy_date","agenda_legacy_start","old_dblclick_dhx_cal_data","dblclick_dhx_cal_data","fill_agenda_tab","old_render_view_data","_agendaScrollTop","set_full_view","l","rowAttr","dateHeader","descriptionHeader","tableAttr","ev_class","agendaDetailsButtonAttr","agenda_time","agenda_text","agenda_area","v_border","dateElement","agenda_date","agenda_legacy_view","agenda_start","agenda_end","agenda_view","add_agenda","dayDateToStr","dayDowToStr","agenda_day","eventsInDays","anyEvents","eventStart","renderEmptyView","renderDay","calendarEvent","renderOneEvent","dates","selectedId","bg","all_timed_month","is_event_short","_safe_copy","proto","event_pid","isPrototypeOf","event_length","old_prerender_events_line","old_prerender_events_table","prerender_events","ce","_virtual","isOvernightEvent","getNextDay","setDateTime","event_changed","re","redraw","next_day","old_get_visible_events","old_mode","old_date","oldUpdate","fullRedrawNeeded","collision","temp_section","before","collision_limit","_setTempSection","event_id","checked_mode","checkCollision","edited_ev","_roll_back_dates","_check_sections_collision","second","evs_dates","getRecDates","tevs","concurrent","single","container_autoresize","month_day_min_height","min_grid_size","min_map_size","old_pre_render_event","active","total_height","multiday_height","evl","_h_fix","navHeight","headerHeight","checked_divs","updateContainterHeight","is_repaint","checked_div","maxHeight","rows_length","year_y","week_agenda_scale_height","cur_height","eventsContainer","g","_gridView","y_unit","getSectionHeight","scrollWidth","getScrollSize","callUpdate","conditionalUpdateContainerHeight","asyncRepaint","requestAnimationFrame","autosizeEnabled","$original_scroll_width","$original_section_autoheight","section_autoheight","cookie","setCookie","cookie_param","getCookie","getCookieName","_get_url_nav","urlNavigationPlugin","schedulerCookie","unescape","newMode","old_load","notImplemented","daytimeline_restricted","drag_between_restricted","editors","cached_options","resetCombo","_combo","DOMParent","combo","unload","DOMelem","dhx_globalImgPath","image_path","dhtmlXCombo","options_height","setOptionHeight","enableFilteringMode","filtering","script_path","all_options","single_option","addOption","getIndexByValue","selectOption","selected_id","disable","setComboValue","getSelectedValue","getSelectedText","vertical","radiobuttons","checked_value","isChecked","check_html","label_html","checkbox","unchecked_value","expand","fullscreen","toggleIcon","_position","_width","_height","_overflow","overflow","_maximize","collapse","directions","prev_margin","grid_view","html_templates","all","keyboard_shortcuts","$keyboardNavigation","shortcuts","createCommand","modifiers","alt","ctrl","meta","shortcut","commands","expr","getExpressions","words","getWords","command","commandKeys","specialKeys","charCodeAt","getCommandFromEvent","domEvent","altKey","ctrlKey","metaKey","printableKey","fromCharCode","getHashFromEvent","getHash","parts","junctionChar","term","combinationChar","backspace","enter","esc","space","up","down","home","pageup","pagedown","insert","plus","f1","f2","f3","f4","f5","f6","f7","f8","f9","f10","f11","f12","eventhandler","EventHandler","_handlers","findHandler","doAction","unbind","bindAll","initKeys","trap_modal_focus","trapFocus","currentFocus","currentIndex","nextIndex","nextItem","divs","renderMultiple","currentStart","currentEnd","TimeSlot","_modes","_getMode","units","renderVerticalMarker","renderTimelineMarker","renderYearMarker","renderMonthMarker","weekAgenda","renderWeekAgendaMarker","renderAgendaMarker","dayColumns","addWaiAriaLabel","addDataAttributes","dateToStr","dateTimeLabel","sectionObject","markerDate","_wrapDiv","_get_year_cell","opacity","view_opts","areas","round_position","blocks","_trace_x","_is_column_visible","start_pos","end_pos","set_date_part","_timeline_getX","tempStart","tempEnd","_section_height","_isRender","renderMonthCell","weekNumber","dayIndex","datatable","inner_index","all_hours_height","hour_ms","lineHeight","scheduler_node","SchedulerNode","_compose","getDefaultNode","getMode","blur","enable","removeAttribute","_compareEvents","_pickEvent","startId","eventElement","Event","getNode","nextEventHandler","activeNode","dispatcher","nextEvent","currEvent","visibleDates","nextEv","setActiveNode","prevEventHandler","HeaderCell","getNodes","_key_nav_copy_paste","nav_node","KeyNavNode","moveTo","compareTo","canStringifyThis","canStringifyThat","header_cell","defaultCell","_getSection","_getNodes","eventNode","defaultElement","isScrolledIntoView","eventBox","viewPort","idSelector","inlineEditor","getInlineEditor","isMultisectionEvent","keepScrollPosition","_moveToSlot","slot","nextSlot","time_slot","movingDate","getDefaultDate","key_nav_step","_getDefaultSection","visibleTime","nowTime","showNowTime","findVisibleColumn","clone","timeslot","_getMultisectionView","_getNextSection","sectionId","isInRange","defaultSlot","DataArea","smart_rendering","_pasteDate","_pasteSection","addMonthDate","nextMonthSlot","_alignTimeSlot","nextTimelineSlot","newPos","nextUnitsSlot","optionsCount","nextDaySlot","_moveDate","isBeforeLastHour","isStartDate","minutes","isAfterFirstHour","isInVisibleDayTime","oldStart","toNextDay","testEnd","nextWeekAgendaSlot","nextAgendaSlot","isDateVisible","nextDateColumn","current","tempSlot","extendSlot","extendUnitsSlot","extendTimelineSlot","extendMonthSlot","extendDaySlot","extendWeekAgendaSlot","extendGenericSlot","allowedDirections","moveDate","newDates","extendSlotDates","oldSlot","newSlot","dateDirection","scrollSlot","minical_button","MinicalButton","globalNode","MinicalCell","minical_cell","_getGrid","_getNode","enabled","newRow","newCol","modals","modalsStack","isModal","afterPopup","startModal","endModal","isTopModal","currentTarget","traceLightbox","_keyNavMessagePopup","focusElement","backupFocus","core","getActiveNode","setDefaultNode","focusGlobalNode","blurNode","editor","keyDownHandler","defaultPrevented","schedulerNode","_timeout","key_nav_legacy","_temp_key_scope","key_nav","isCopy","trackMousePosition","mousePointer","keyNavPointer","elementFromPoint","clear_event_after","copyEvent","_make_pasted_event","multisection","_do_paste","is_copy","modified_ev","original_ev","_is_key_nav_active","getSelectedEvent","_buffer_event","new_ev","scheduler_handlers","attachSchedulerHandlers","focusHandler","waitCall","reFocusActiveNode","mousedownHandler","dataAreaClick","listOfScales","arrOfScales","some","focusEvent","evNode","prevState","lastStart","lastEnd","lastSection","minical_handlers","_minicalendars","isMinical","minicalendars","patchMinicalendar","focusMinical","minicalClick","rowIndex","td","renderMinical","cal","added","destroyMinical","_def_count","addShortcut","scope","scopeObject","getScope","getShortcutHandler","removeShortcut","disp","scopes","minicalButton","minicalDate","timeSlot","searchMap","attachOnce","isSchedulerSelected","changeState","layer","layers","validId","_clearUpdateFlag","_cloneObj","_dataprocessors","_layers_zindex","initial_layer_zindex","isDefault","defaultLayer","showLayer","tlayer","toggleLayer","hideLayer","visible","getLayer","layer_name","native_event_object","noMenu","_evs_layer","_t_render_view_data","evs_layer","borderBox","borderBoxWidth","headerWidth","bodyWidth","footerWidth","bodyHeight","new_zIndex","filter_agenda","limit_start","limit_end","limit_view","check_limits","mark_now","display_marked_timespans","overwrite_marked_timespans","_temp_limit_scope","dhx_time_block","default_timespan_type","fix_options","zones","get_resulting_options","blockTime","unblockTime","deleteMarkedTimespan","om","od","nm","nd","isBlocked","date_end","resetDate","checkInMarkedTimespan","timespan_type","on_overlap","temp_start_date","temp_end_date","timespans","_marked_timespans","day_value","day_index","getZones","_get_zone_minutes","eventEnd","markerStart","markerEnd","blocker","checkLimitViolation","complete_res","allow","_get_blocked_zones","timeline_zones","blocked_timeline_zones","_get_relevant_blocked_zones","_add_timespan_zones","resultZones","view_config","linker","is_new_event","data_copy","native_object","_mark_now","_mark_now_timer","dhx_now_time","_remove_mark_now","_append_mark_now","zone_start","start_index","end_index","units_l","r_divs","t_day","t_div","_render_marked_timespan","_prepare_timespan_options","r_configs","temp_configs","t_days","cloned_config","invert_zones","invertZones","view_key","t_config","c_config","t_sd","t_ed","zone_end","_get_dates_by_index","start_day","delta","t_date","_get_css_classes_by_config","css_classes","_get_block_by_config","date_to_display","min_day","sday","block_proto","_mark_timespans","_on_scale_add_marker","markTimespan","configuration","rebuild_els","timespans_ids","_marked_timespans_ids","timespan_types","_marked_timespans_types","unmarkTimespan","_addMarkerTimespanConfig","unit_id","timespans_view","day_configs","_array","configs","current_zones","resulting_zones","c_zone_start","c_zone_end","isLast","_subtract_timespan_zones","is_modified","_delete_marked_timespan_by_id","parent_array","_delete_marked_timespan_by_config","viewspans","_delete_marked_timespans_list","dayConfig","day_timespans","d_t","related_zones","types","typedConfig","_get_types_to_render","specific","types_to_render","_get_configs_to_render","_get_unit_index","day_ind","unitsPerDay","unit_zones","unit_types","global_data","day_types","dblclick_dhx_marked_timespan","map_view","mapView","geocoder","points","markers","infoWindow","createMarker","google","maps","Marker","map_date_width","map_icon_width","map_description_width","map_resolve_event_location","map_resolve_user_location","map_initial_position","LatLng","map_error_position","map_infowindow_max_width","map_type","MapTypeId","ROADMAP","map_zoom_after_resolve","marker_geo_success","marker_geo_fail","marker_date","marker_text","event_location","dblclick_dhx_map_area","map_time","map_text","map_start","add_map","map_date","_latLngUpdate","_isMapPositionSet","gmap","dhx_gmap","_setMapSize","mapOptions","zoom","map_initial_zoom","center","mapTypeId","Map","disableDefaultUI","disableDoubleClickZoom","addListener","point","latLng","geocode","results","GeocoderStatus","OK","geometry","location","lat","lng","formatted_address","infoWindowOptions","maxWidth","_points","_markers","_infowindow","InfoWindow","_infowindows_content","_initialization_count","Geocoder","geolocation","getCurrentPosition","_userLocation","coords","latitude","longitude","setCenter","setZoom","setContent","getCenter","setPosition","getZoom","fill_map_tab","showAddress","clear_map_tab","_selected_event_id","close","setMap","ariaButtonAttr","elem_id","marginRight","marginLeft","marginTop","temp_center","map_end","trigger","selectEvent","performClick","_displayEventOnMap","address","language","_updateEventLocation","_delay","ret","old_event_id","new_event_id","_event_resolve_delay","minical","minicalDomEvents","minicalendar","mark_events","_synced_minicalendars","_prev","is_refresh","cont","tpos","_get_def_cont","_render_calendar","$dom","cellRoot","dateAttribute","unmarkCalendar","markCalendar","_last_date","conf","markedDates","_markCalendarCurrentDate","sync","_on_xle_handler","refreshOnLoad","updateCalendar","_created","_locateCalendar","weekNum","dat","dayCell","_week_template","week_template","dummy_date","_mini_cal_arrows","previous","ts","temp2","temp3","temp4","temp5","temp6","temp7","temp8","padding","weekHeader","move_minicalendar_date","css_classnames","css_texts","diffs","arrow","dayHeaders","dayCells","inputs","selects","inp","number","new_date","_update_minical_select","isFulldayEvent","_attach_action","_round_minutes","linkCalendar","datediff","dateNew","month_end","noHighlight","monthheight","old_s","multisection_restricted","multiselect","parseXMLOptions","parseJSONOptions","_result","_children","_mark_inputs","_ids","delimiter","script_url","divLoading","multisource","backup","mvc","use_id","sanitize","update_timer","_start_ext_load","_finish_ext_load","_get_id","model","cid","backbone","toJSON","changes","queue","add_from_queue","Backbone","Collection","dragger","dhtmlDragAndDropObject","stopDrag","last_event","on_drop","sourceHtmlObject","dhtmlObject","targetHtmlObject","targetHtml","action_data","event_data","view_options","_locate_cell_timeline","addDragLanding","_drag","_dragIn","shtmlObject","_dragOut","DragControl","addDrop","onDrop","sourceDhtmlx","getMaster","onDragIn","pdf","html_regexp","newline_regexp","clean_html","x_norm","parseFloat","colsWidth","x_norm_event","is_left","dhx_cal_header","y_norm","get_style","de_day","de_week","xml_start","xml_end","xml_top","profile","footer","xml_body_header","dhx_cal_date","xh","xml_month_scale","xml_month","yh","xhs","second_scale","top_width","top_col","xml_body","colors","week_starts","_month","text_color","zx","zdx","left_norm","zy","zdy","e_type","dets","week","dy_copy","toXML","original_date","original_mode","temp_date","getPDFData","send_xml","submit","to_pdf","schedulersToPdf","objects","toPDF","toPDFRange","quick_info","show_quick_info","showQuickInfo","hiding_function","hideQuickInfo","quick_info_title","quick_info_content","quick_info_date","_quick_info_box_id","_get_event_counter_part","_quick_info_box","_init_quick_info","_fill_quick_data","_show_quick_info","cssTimeToMs","milliseconds","forced","qi","_x_scroll","dataPos","_quick_info_onscroll_handler","$testmode","_qi_button_click","domEv","titleContent","titleDate","main","mainContent","originalRecurringSetValue","original_left_buttons","original_right_buttons","readonly_form","forbidden_buttons","button_arrays","forbidden_button","button_array","txt_replace","txts","txtt","originalForm","readonlyForm","_lightbox_r","occurrence_timestamp_in_utc","recurring_workdays","_get_node","_outer_html","outerHTML","getOuterHTML","rec","loc","repeat_date_of_end","_ds","_get_form_node","_get_node_value","_get_node_numeric_value","_set_node_value","hash_value","_init_set_value","_end_date","str_date_format","repeat_date","str_date","include_end_by","date_str","register_els","inps","formatter","change_current_view","get_repeat_code","get_rcode","repeat","get_end_rule","transpose_type","transp","set_end_rule","has_values","_get_repeat_code","get_numeric_value","repeat_precise","_start","start_exists","transpose_day_week","set_rcode","set_repeat_code","dispatchEvent","MouseEvent","_set_repeat_code","elements","_rec_init_done","rf","blocked","_is_modified_occurence","_toggle_block","actual_dates","timeControl","getTimeSection","_start_date","_get_button","getRecurringSection","_get_form","backgroundPosition","getFirstSectionOfType","_rec_markers","_rec_markers_pull","_pid_time","_get_rec_marker","ch","_get_rec_markers","clearMilliseconds","_rec_temp","old_add_event","ev_id","_ignore_call","tev","_pid_changed","nid","nev","sub","isEventFound","showLightbox_rec","lightbox_recurring","pid","isVirtual","showSeries","title_confirm_recurring","get_visible_events_rec","old_update_event","transponse_size","day_week","originalMonth","cday","newMonth","cor","cor2","transposeRecurring","recurringParts","dayDurationMs","addRecurring","recurringStepDays","weekDays","seriesInstance","currentCount","maxCount","origMonth","origYear","correctOverflowInstances","recurring_overflow_instances","getMilliseconds","non_render","startHour","visibleCount","_fix_daylight_saving_date","ted","recurrings","sev","data_attributes","all_events","_serialize_json_value","toICal","full_day_format","timeline_restricted","Tooltip","_scheduler","_tooltipNode","_root","_isLikeMouseEvent","_calculateTooltipPosition","viewport","_getViewPortSize","tooltipNode","tooltip","offsetX","tooltip_offset_x","offsetY","tooltip_offset_y","mouse","containerPos","scrollY","_getViewPort","scrollX","$event_data","$event","TooltipManager","_listeners","_initDelayedFunctions","hideTooltip","delayHide","watchableTarget","eventTarget","targetNode","doOnMouseEnter","onmouseenter","onmousemove","onmouseleave","listener","cloneDomEvent","delayShow","utils.default","show","tooltip_timeout","tooltip_hide_timeout","tooltipManager","tooltips","tooltipFor","touch_tooltip","targetEventId","treetimeline_restricted","units_restricted","s2d","d2s","select_event","week_agenda_restricted","wp","year_view","year_date","year_month","year_scale_date","year_tooltip","isYearMode","getCellDate","dblclick_dhx_month_head","_year_render_event","_year_marked_cells","_hideToolTip","_tooltip","_showToolTip","_year_view_tooltip_handler","_init_year_tooltip","_mark_year_date","_unmark_year_date","_reset_year_scale","year_top","ssd","yearBox","year_x","yearStart","datepicker","locateEvent","export_api","std","getElementSizes","sizes","dhtmlxAjax","dhx4","add_export_methods","orientation","dpi","_export_html","_send_to_export","exportToICal","_serialize_plain","exportToExcel","_serialize_columns","_ajax_to_export","server","fail","_plain_export_copy","$text","_create_hidden_form","_hidden_export_form","_get_export_size","A5","A4","A3","A2","A1","A0","dataX","dataY","headY","multY","cSize","getTimeline","getInitialSizes","smartRendering","style_width","style_height","timeline_scrollable","timeline_smart_rendering","setExportSizes","initialSizes","setInitialSizes","gplExtensions","drag_between","factory","$dhx"],"mappings":";;;;AACe,WAAAA,aAAAA;AAEf,QAAWC,OAAAA,UAAU,eAAeA,OAAOC,UAAU;AACpDD,aAAOC,SAASC,kBA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AAQ8uC;AAGxCnnG,SAAOtB,YAAYA;AACnBsB,SAAO+hD,YAAYA;AAEnB,MAAI/hD,CAAAA,OAAOonG,MAAM;AAChBpnG,WAAOonG,OAAO;EACf;AAEApnG,SAAOonG,KAAK1oG,YAAYA;AACxBsB,SAAOonG,KAAKrlD,YAAYA;;;;;;"} \ No newline at end of file diff --git a/codebase/sources/less/package.json b/codebase/sources/less/package.json index 340e872..bbd6c11 100644 --- a/codebase/sources/less/package.json +++ b/codebase/sources/less/package.json @@ -1,6 +1,6 @@ { "name": "dhtmlx-scheduler-skins", - "version": "7.0.3", + "version": "7.0.4", "description": "Less sources and a build tool for DHTMLXScheduler skins", "scripts": { "build": "node scripts.js --file=theme", diff --git a/package.json b/package.json index e5d8da8..7e87d99 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dhtmlx-scheduler", - "version": "7.0.3", + "version": "7.0.4", "description": "JavaScript event calendar. Allows to manage events and appointments in different views", "main": "codebase/dhtmlxscheduler.es.js", "types": "codebase/dhtmlxscheduler.es.d.ts", diff --git a/whatsnew.md b/whatsnew.md index f0e599e..bbf07dc 100644 --- a/whatsnew.md +++ b/whatsnew.md @@ -1,3 +1,11 @@ +### 7.0.4 + +Add the placeholder setting for the textarea control +Fix incorrect cell selection in Keyboard Navigation +Fix the Quick Info popup in Agenda view +Fix type definitions for the Agenda view templates +Fix the incorrect display of multi-day events in Month view when start_on_monday is disabled and several columns are hidden from the view + ### 7.0.3 Issue with textColor property not applying in the Month view has been resolved