{"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":["\n/* eslint-disable no-restricted-globals */\nvar globalScope;\nif(typeof window !== \"undefined\"){\n\tglobalScope = window;\n}else{\n\tglobalScope = global;\n}\n/* eslint-enable no-restricted-globals */\n\nexport default globalScope;","export default function extend(scheduler) {\n\nfunction div(className){\n\tvar element = document.createElement(\"div\");\n\tvar classes = (className || \"\").split(\" \");\n\tclasses.forEach(function(cssClass){\n\t\telement.classList.add(cssClass);\n\t});\n\treturn element;\n}\nvar itemTypes = {\n\trows_container: function(){\n\t\treturn div(\"dhx_cal_navbar_rows_container\");\n\t},\n\trow: function(){\n\t\treturn div(\"dhx_cal_navbar_row\");\n\t},\n\tview: function (config) {\n\t\tvar element = div(\"dhx_cal_tab\");\n\t\telement.setAttribute(\"name\", config.view + \"_tab\");\n\t\telement.setAttribute(\"data-tab\", config.view);\n\t\t// element.setAttribute(\"data-viewname\", config.view); // FIXME: need to remove? not used anywhere\n\t\tif(scheduler.config.fix_tab_position){\n\t\t\tif(config.$firstTab) {\n\t\t\t\telement.classList.add(\"dhx_cal_tab_first\");\n\t\t\t}else if(config.$lastTab) {\n\t\t\t\telement.classList.add(\"dhx_cal_tab_last\");\n\t\t\t} else if(config.view !== \"week\") {\n\t\t\t\telement.classList.add(\"dhx_cal_tab_standalone\");\n\t\t\t}\n\n\t\t\tif(config.$segmentedTab) {\n\t\t\t\telement.classList.add(\"dhx_cal_tab_segmented\");\n\t\t\t}\n\t\t}\n\t\treturn element;\n\t},\n\tdate: function () {\n\t\treturn div(\"dhx_cal_date\");\n\t},\n\tbutton: function (config) {\n\t\treturn div(\"dhx_cal_nav_button dhx_cal_nav_button_custom dhx_cal_tab\");\n\t},\n\tbuiltInButton: function (config){\n\t\treturn div(\"dhx_cal_\" + config.view + \"_button dhx_cal_nav_button\");\n\t},\n\tspacer: function () {\n\t\treturn div(\"dhx_cal_line_spacer\");\n\t},\n\tminicalendarButton: function(config){\n\t\tvar minicalendarDiv = div('dhx_minical_icon');\n\t\tif(!config.click && !minicalendarDiv.$_eventAttached){\n\t\t\t\n\t\t\tscheduler.event(minicalendarDiv, \"click\", function () {\n\t\t\t\tif (scheduler.isCalendarVisible()) {\n\t\t\t\t\tscheduler.destroyCalendar();\n\t\t\t\t} else {\n\t\t\t\t\tscheduler.renderCalendar({\n\t\t\t\t\t\tposition: this,\n\t\t\t\t\t\tdate: scheduler.getState().date,\n\t\t\t\t\t\tnavigation: true,\n\t\t\t\t\t\thandler: function (date, calendar) {\n\t\t\t\t\t\t\tscheduler.setCurrentView(date);\n\t\t\t\t\t\t\tscheduler.destroyCalendar();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn minicalendarDiv;\n\t},\n\thtml_element: function (config) {\n\t\treturn div(\"dhx_cal_nav_content\");\n\t}\n};\n\nfunction findRenderer(config) {\n\tvar renderer;\n\tif (config.view) {\n\t\tswitch (config.view){\n\t\t\tcase \"today\":\n\t\t\tcase \"next\":\n\t\t\tcase \"prev\":\n\t\t\t\trenderer = itemTypes.builtInButton;\n\t\t\t\tbreak;\n\t\t\tcase \"date\":\n\t\t\t\trenderer = itemTypes.date;\n\t\t\t\tbreak;\n\t\t\tcase \"spacer\":\n\t\t\t\trenderer = itemTypes.spacer;\n\t\t\t\tbreak;\n\t\t\tcase \"button\":\n\t\t\t\trenderer = itemTypes.button;\n\t\t\t\tbreak;\n\t\t\tcase \"minicalendar\":\n\t\t\t\trenderer = itemTypes.minicalendarButton;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\trenderer = itemTypes.view;\n\t\t\t\tbreak;\n\t\t}\n\t} else if(config.rows) {\n\t\trenderer = itemTypes.rows_container;\n\t} else if(config.cols) {\n\t\trenderer = itemTypes.row;\n\t}\n\treturn renderer;\n}\n\nfunction renderElement(config){\n\tvar renderer = findRenderer(config);\n\tif(!renderer){\n\t\treturn;\n\t}\n\tvar element = renderer(config);\n\tif(config.css){\n\t\telement.classList.add(config.css);\n\t}\n\tif(config.width){\n\t\tvar value = config.width;\n\t\tif(value === value * 1){\n\t\t\tvalue += \"px\";\n\t\t}\n\t\telement.style.width = value;\n\t}\n\tif(config.height){\n\t\tvar value = config.height;\n\t\tif(value === value * 1){\n\t\t\tvalue += \"px\";\n\t\t}\n\t\telement.style.height = value;\n\t}\n\tif (config.click) {\n\t\tscheduler.event(element, \"click\", config.click);\n\t}\n\tif (config.html) {\n\t\telement.innerHTML = config.html;\n\t}\n\n\tif (config.align) {\n\t\tvar value = \"\";\n\t\tif (config.align == \"right\") {\n\t\t\tvalue = \"flex-end\";\n\t\t} else if(config.align == \"left\") {\n\t\t\tvalue = \"flex-start\";\n\t\t}\n\t\telement.style.justifyContent = value;\n\t}\n\treturn element;\n}\n\nfunction prepareConfig(config) {\n\tif (typeof config === \"string\") {\n\t\tconfig = {\n\t\t\tview: config\n\t\t};\n\t}\n\tif (!config.view && !config.rows && !config.cols) {\n\t\tconfig.view = \"button\";\n\t}\n\treturn config;\n}\n\nfunction renderLayout(config) {\n\tvar fragment = document.createDocumentFragment();\n\tvar items;\n\tif(Array.isArray(config)){\n\t\titems = config;\n\t}else{\n\t\titems = [config];\n\t}\n\n\tfor (var i = 0; i < items.length; i++) {\n\t\tvar view = prepareConfig(items[i]);\n\n\t\tif(view.view === \"day\" && items[i + 1]){\n\t\t\tvar next = prepareConfig(items[i + 1]);\n\t\t\tif(next.view === \"week\" || next.view === \"month\"){\n\t\t\t\tview.$firstTab = true;\n\t\t\t\tview.$segmentedTab = true;\n\t\t\t}\n\t\t}\n\n\t\tif(view.view === \"week\" && items[i - 1]){\n\t\t\tvar next = prepareConfig(items[i + 1]);\n\t\t\tif(next.view === \"week\" || next.view === \"month\"){\n\t\t\t\tview.$segmentedTab = true;\n\t\t\t}\n\t\t}\n\n\t\tif(view.view === \"month\" && items[i - 1]){\n\t\t\tvar next = prepareConfig(items[i - 1]);\n\t\t\tif(next.view === \"week\" || next.view === \"day\"){\n\t\t\t\tview.$lastTab = true;\n\t\t\t\tview.$segmentedTab = true;\n\t\t\t}\n\t\t}\n\n\t\tvar element = renderElement(view);\n\n\t\tfragment.appendChild(element);\n\t\tif(view.cols || view.rows){\n\t\t\telement.appendChild(renderLayout(view.cols || view.rows));\n\t\t}\n\t}\n\treturn fragment;\n}\n\nscheduler._init_nav_bar = function (items) {\n\tvar navBar = this.$container.querySelector(\".dhx_cal_navline\");\n\tif (!navBar){\n\t\tnavBar = document.createElement(\"div\");\n\t\tnavBar.className = \"dhx_cal_navline dhx_cal_navline_flex\";\n\t\tscheduler._update_nav_bar(items, navBar);\n\t\treturn navBar;\n\t}\n\treturn navBar;\n};\n\nvar previousNavbar = null;\nvar previousHeight = null;\nscheduler._update_nav_bar = function (config, container) {\n\n\tif(!config){\n\t\treturn;\n\t}\n\tvar heightChanged = false;\n\tvar configChanged = false;\n\n\tvar newHeight = config.height || scheduler.xy.nav_height;\n\n\tif(previousHeight === null ||\n\t\t\t(previousHeight !== newHeight)){\n\t\theightChanged = true;\n\t}\n\tif(!previousNavbar || JSON.stringify(config) !== previousNavbar){\n\t\tconfigChanged = true;\n\t}\n\n\tif(heightChanged){\n\t\tscheduler.xy.nav_height = newHeight;\n\t}\n\tif(configChanged){\n\t\tcontainer.innerHTML = \"\";\n\t\tcontainer.appendChild(renderLayout(config));\n\t}\n\n\tif(heightChanged || configChanged){\n\t\tscheduler.unset_actions();\n\t\tscheduler._els = [];\n\t\tscheduler.get_elements();\n\t\tscheduler.set_actions();\n\t}\n\n\tif(newHeight === 0){\n\t\tcontainer.style.display = \"none\";\n\t}else{\n\t\tcontainer.style.display = \"\";\n\t}\n\n\tpreviousHeight = newHeight;\n};\n\n}","export default function extend(scheduler) {\n\n\tfunction isAttachedNode(container){\n\t\tvar root = document.body;\n\t\n\t\twhile(container && container != root){\n\t\t\tcontainer = container.parentNode;\n\t\t}\n\t\n\t\treturn !!(root == container);\n\t}\n\t\n\tfunction getWindowSize(window){\n\t\treturn {\n\t\t\tw : window.innerWidth || document.documentElement.clientWidth,\n\t\t\th : window.innerHeight || document.documentElement.clientHeight\n\t\t};\n\t}\n\tfunction equals(a,b){\n\t\treturn a.w == b.w && a.h == b.h;\n\t}\n\t\n\tfunction listenWindowResize(scheduler, window){\n\t\tvar oldSize = getWindowSize(window);\n\t\tvar resizeDelay;\n\t\tscheduler.event(window, \"resize\", function(){\n\t\t\tclearTimeout(resizeDelay);\n\t\t\tresizeDelay = setTimeout(function(){\n\n\t\t\t\tif (!isAttachedNode(scheduler.$container) || scheduler.$destroyed){\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tvar newSize = getWindowSize(window);\n\t\t\t\t// element may be resized by container-autoresize exteinsion\n\t\t\t\t// check if the size is actually changed in order to not to get endless loop\n\t\t\t\tif (!equals(oldSize, newSize)) {\n\t\t\t\t\toldSize = newSize;\n\t\t\t\t\ttriggerSchedulerResize(scheduler);\n\t\t\t\t}\n\t\t\t}, 150);\n\t\t});\n\t}\n\t\n\tfunction triggerSchedulerResize(scheduler){\n\t\tif(scheduler.$destroyed || !scheduler.$root || !isAttachedNode(scheduler.$root)){\n\t\t\treturn;\t\n\t\t}\n\t\tif (scheduler.callEvent(\"onSchedulerResize\", [])) {\n\t\t\tscheduler.updateView();\n\t\t\tscheduler.callEvent(\"onAfterSchedulerResize\", []);\n\t\t}\n\t}\n\t\n\tfunction watchNodeResize(scheduler){\n\t\tvar previousHeight = scheduler.$root.offsetHeight;\n\t\tvar previousWidth = scheduler.$root.offsetWidth;\n\t\t\n\t\tfunction lowlevelResizeWatcher(){\n\t\t\tif(scheduler.$destroyed){\n\t\t\t\treturn;\t\n\t\t\t}\n\t\t\t\n\t\t\tif(scheduler.$root){\n\t\t\t\tif (scheduler.$root.offsetHeight != previousHeight ||\n\t\t\t\t\tscheduler.$root.offsetWidth != previousWidth){\n\t\t\t\t\ttriggerSchedulerResize(scheduler);\n\t\t\t\t}\n\t\n\t\t\t\tpreviousHeight = scheduler.$root.offsetHeight;\n\t\t\t\tpreviousWidth = scheduler.$root.offsetWidth;\n\t\t\t}\n\t\n\t\t\tsetTimeout(lowlevelResizeWatcher, 200);\n\t\t}\n\t\t\n\t\tlowlevelResizeWatcher();\n\t}\n\t\n\tfunction addResizeListener(scheduler){\n\t\tvar root = scheduler.$container;\n\t\tvar containerStyles = window.getComputedStyle(root);\n\t\tif(containerStyles.getPropertyValue(\"position\") == \"static\"){\n\t\t\troot.style.position = \"relative\";\n\t\t}\n\t\n\t\tvar resizeWatcher = document.createElement('iframe');\n\t\tresizeWatcher.className = \"scheduler_container_resize_watcher\";\n\t\tresizeWatcher.tabIndex = -1;\n\t\tif(scheduler.config.wai_aria_attributes){\n\t\t\tresizeWatcher.setAttribute(\"role\", \"none\");\n\t\t\tresizeWatcher.setAttribute(\"aria-hidden\", true);\n\t\t}\n\t\n\t\t// in some environments (namely, in SalesForce) iframe.contentWindow is not available\n\t\tvar salesforce_environment = !!window[\"Sfdc\"] || !!window[\"$A\"] || window[\"Aura\"];\n\t\tif(salesforce_environment){\n\t\t\twatchNodeResize(scheduler);\n\t\t} else {\n\t\t\troot.appendChild(resizeWatcher);\n\t\t\tif (resizeWatcher.contentWindow) {\n\t\t\t\tlistenWindowResize(scheduler, resizeWatcher.contentWindow);\n\t\t\t} else {\n\t\t\t\t// if so - ditch the iframe and fallback to listening the main window resize\n\t\t\t\troot.removeChild(resizeWatcher);\n\t\t\t\tlistenWindowResize(scheduler, window);\n\t\t\t}\n\t\t}\n\t}\n\t\n\taddResizeListener(scheduler);\n\n}","class EventHost {\n\tconstructor(){\n\t\tthis._silent_mode = false;\n\t\tthis.listeners = {};\n\t}\n\t_silentStart(){\n\t\tthis._silent_mode = true;\n\t}\n\t_silentEnd() {\n\t\tthis._silent_mode = false;\n\t}\n}\n\nconst createEventStorage = function(obj) {\n\tlet handlers = {};\n\tlet index = 0;\n\tconst eventStorage = function(){\n\t\tlet combinedResult = true;\n\t\tfor(const i in handlers){\n\t\t\tconst handlerResult = handlers[i].apply(obj, arguments);\n\t\t\tcombinedResult=combinedResult && handlerResult;\n\t\t}\n\t\treturn combinedResult;\n\t};\n\teventStorage.addEvent=function(handler, settings){\n\t\tif (typeof (handler) == \"function\"){\n\t\t\tlet handlerId;\n\t\t\tif(settings && settings.id){\n\t\t\t\thandlerId = settings.id;\n\t\t\t}else{\n\t\t\t\thandlerId = index;\n\t\t\t\tindex++;\n\t\t\t}\n\n\t\t\tif(settings && settings.once){\n\t\t\t\tconst originalHandler = handler;\n\t\t\t\thandler = function(){\n\t\t\t\t\toriginalHandler();\n\t\t\t\t\teventStorage.removeEvent(handlerId);\n\t\t\t\t};\n\t\t\t}\n\n\t\t\thandlers[handlerId] = handler;\n\t\t\treturn handlerId;\n\t\t}\n\t\treturn false;\n\t};\n\teventStorage.removeEvent=function(id){\n\t\tdelete handlers[id];\n\t};\n\n\teventStorage.clear = function(){\n\t\thandlers = {};\n\t};\n\n\treturn eventStorage;\n};\n\nfunction makeEventable(obj){\n\n\tconst eventHost = new EventHost();\n\tobj.attachEvent=function(eventName, handler, settings){\n\t\teventName = 'ev_'+eventName.toLowerCase();\n\t\tif (!eventHost.listeners[eventName]){\n\t\t\teventHost.listeners[eventName] = createEventStorage(this);\n\t\t}\n\n\t\tif(settings && settings.thisObject){\n\t\t\thandler = handler.bind(settings.thisObject);\n\t\t}\n\n\t\tconst innerId = eventHost.listeners[eventName].addEvent(handler, settings);\n\n\t\tlet handlerId = (eventName+':'+innerId); //return ID (ev_eventname:1)\n\t\tif(settings && settings.id){\n\t\t\thandlerId = settings.id;\n\t\t}\n\t\treturn handlerId;\n\t};\n\n\tobj.attachAll = function(callback){\n\t\tthis.attachEvent('listen_all', callback);\n\t};\n\n\tobj.callEvent=function(name, eventArguments){\n\t\tif (eventHost._silent_mode) return true;\n\n\t\tconst handlerName = 'ev_'+name.toLowerCase();\n\n\t\tconst listeners = eventHost.listeners;\n\t\tif (listeners['ev_listen_all']){\n\t\t\tlisteners['ev_listen_all'].apply(this, [name].concat(eventArguments));\n\t\t}\n\n\t\tif (listeners[handlerName])\n\t\t\treturn listeners[handlerName].apply(this, eventArguments);\n\t\treturn true;\n\t};\n\n\tobj.checkEvent=function(name){\n\t\tconst listeners = eventHost.listeners;\n\t\treturn (!!listeners['ev_'+name.toLowerCase()]);\n\t};\n\n\tobj.detachEvent=function(id){\n\t\tif (id){\n\t\t\tlet listeners = eventHost.listeners;\n\t\t\tfor(const i in listeners){\n\t\t\t\tlisteners[i].removeEvent(id); //remove event\n\t\t\t}\n\n\t\t\tconst list = id.split(':');//get EventName and ID\n\t\t\tlisteners = eventHost.listeners;\n\t\t\tif(list.length === 2){\n\t\t\t\tconst eventName = list[0];\n\t\t\t\tconst eventId = list[1];\n\t\t\t\tif(listeners[eventName]){\n\t\t\t\t\tlisteners[eventName].removeEvent(eventId); //remove event\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\tobj.detachAllEvents = function(){\n\t\tfor (const name in eventHost.listeners) {\n\t\t\teventHost.listeners[name].clear();\n\t\t}\n\t};\n\n}\n\nexport default makeEventable;","export default {\n\tevent: function (el, event, handler){\n\t\tif (el.addEventListener)\n\t\t\tel.addEventListener(event, handler, false);\n\t\n\t\telse if (el.attachEvent)\n\t\t\tel.attachEvent(\"on\"+event, handler);\n\t},\n\teventRemove: function (el, event, handler){\n\t\tif (el.removeEventListener)\n\t\t\tel.removeEventListener(event, handler, false);\n\t\n\t\telse if (el.detachEvent)\n\t\t\tel.detachEvent(\"on\"+event, handler);\n\t}\n};","import createEventScope from './utils/scoped_event';\n\nexport default function extend(scheduler) {\n\n\nvar domEvents = createEventScope();\n\nscheduler.event = domEvents.attach;\nscheduler.eventRemove = domEvents.detach;\nscheduler._eventRemoveAll = domEvents.detachAll;\nscheduler._createDomEventScope = domEvents.extend;\n\n\nscheduler._trim = function(str){\n\tvar func = String.prototype.trim || function(){ return this.replace(/^\\s+|\\s+$/g, \"\"); };\n\treturn func.apply(str);\n};\n\nscheduler._isDate = function(obj){\n\tif (obj && typeof obj == \"object\") {\n\t\treturn !!(obj.getFullYear && obj.getMonth && obj.getDate);\n\t} else {\n\t\treturn false;\n\t}\n};\n\nscheduler._isObject = function(obj){\n\treturn (obj && typeof obj == \"object\");\n};\n\n}","import defaultDomEvents from './event';\n\nexport default function(){\n\n\tvar domEvents = function (addEvent, removeEvent) {\n\t\taddEvent = addEvent || defaultDomEvents.event;\n\t\tremoveEvent = removeEvent || defaultDomEvents.eventRemove;\n\t\tvar handlers = [];\n\t\tvar eventScope = {\n\t\t\tattach: function(el, event, callback, capture){\n\t\t\t\thandlers.push({element: el, event:event, callback: callback, capture: capture});\n\t\t\t\taddEvent(el, event, callback, capture);\n\t\t\t},\n\t\t\tdetach: function(el, event, callback, capture){\n\t\t\t\tremoveEvent(el, event, callback, capture);\n\t\t\t\tfor(var i = 0; i < handlers.length; i++){\n\t\t\t\t\tvar handler = handlers[i];\n\t\t\t\t\tif (handler.element === el && handler.event === event && handler.callback === callback && handler.capture === capture) {\n\t\t\t\t\t\thandlers.splice(i, 1);\n\t\t\t\t\t\ti--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tdetachAll: function () {\n\t\t\t\tvar staticArray = handlers.slice();\n\t\t\t\t// original handlers array can be spliced on every iteration\n\t\t\t\tfor (var i = 0; i < staticArray.length; i++){\n\t\t\t\t\tvar handler = staticArray[i];\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, handler.capture);\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, undefined);\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, false);\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, true);\n\t\t\t\t}\n\t\t\t\thandlers.splice(0, handlers.length);\n\t\t\t},\n\t\t\textend: function(){\n\t\t\t\treturn domEvents(this.event, this.eventRemove);\n\t\t\t}\n\t\t};\n\t\treturn eventScope;\n\t};\n\t\n\treturn domEvents();\n}","var uidSeed = Date.now();\nfunction uid () {\n\treturn uidSeed++;\n}\n\n// iframe-safe array type check instead of using instanceof\nfunction isArray(obj){\n\tif(Array.isArray){\n\t\treturn Array.isArray(obj);\n\t}else{\n\t\t// close enough\n\t\treturn (obj && obj.length !== undefined && obj.pop && obj.push);\n\t}\n}\n\n// non-primitive string object, e.g. new String(\"abc\")\nfunction isStringObject(obj){\n\treturn obj && typeof obj === \"object\" && \n\t\tFunction.prototype.toString.call(obj.constructor) === \"function String() { [native code] }\";\n}\n\n// non-primitive number object, e.g. new Number(5)\nfunction isNumberObject(obj){\n\treturn obj && typeof obj === \"object\" && \n\t\tFunction.prototype.toString.call(obj.constructor) === \"function Number() { [native code] }\";\n}\n\n// non-primitive number object, e.g. new Boolean(true)\nfunction isBooleanObject(obj){\n\treturn obj && typeof obj === \"object\" &&\n\t\tFunction.prototype.toString.call(obj.constructor) === \"function Boolean() { [native code] }\";\n}\n\nfunction isDate(obj) {\n\tif (obj && typeof obj === \"object\") {\n\t\treturn !!(obj.getFullYear && obj.getMonth && obj.getDate);\n\t} else {\n\t\treturn false;\n\t}\n}\n\nfunction defined(obj) {\n\treturn typeof(obj) != \"undefined\";\n}\n\nfunction delay (callback, timeout){\n\tvar timer;\n\n\tvar result = function() {\n\t\tresult.$cancelTimeout();\n\t\tresult.$pending = true;\n\t\tvar args = Array.prototype.slice.call(arguments);\n\t\ttimer = setTimeout(function(){\n\t\t\tcallback.apply(this, args);\n\t\t\tresult.$pending = false;\n\t\t}, timeout);\n\t};\n\n\tresult.$pending = false;\n\tresult.$cancelTimeout = function(){\n\t\tclearTimeout(timer);\n\t\tresult.$pending = false;\n\t};\n\tresult.$execute = function(){\n\t\tvar args = Array.prototype.slice.call(arguments);\n\t\tcallback.apply(this, args);\n\t\tresult.$cancelTimeout();\n\t};\n\n\treturn result;\n}\n\nexport default {\n\tuid: uid,\n\tmixin: function mixin (target, source, force){\n\t\tfor (var f in source)\n\t\t\tif (((target[f] === undefined) || force)) target[f]=source[f];\n\t\treturn target;\n\t},\n\tcopy: function copy(object) {\n\t\tvar i, result; // iterator, types array, result\n\t\n\t\tif (object && typeof object == \"object\") {\n\t\n\t\t\tswitch (true){\n\t\t\t\tcase (isDate(object)):\n\t\t\t\t\tresult = new Date(object);\n\t\t\t\t\tbreak;\n\t\t\t\tcase (isArray(object)):\n\t\t\t\t\tresult = new Array(object.length);\n\t\t\t\t\tfor(i = 0; i < object.length; i++){\n\t\t\t\t\t\tresult[i] = copy(object[i]);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase (isStringObject(object)):\n\t\t\t\t\tresult = new String(object);// jshint ignore:line\n\t\t\t\t\tbreak;\n\t\t\t\tcase (isNumberObject(object)):\n\t\t\t\t\tresult = new Number(object);// jshint ignore:line\n\t\t\t\t\tbreak;\n\t\t\t\tcase (isBooleanObject(object)):\n\t\t\t\t\tresult = new Boolean(object);// jshint ignore:line\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tresult = {};\n\t\t\t\t\tfor (i in object) {\n\t\t\t\t\t\tconst varType = typeof object[i];\n\n\t\t\t\t\t\tif (varType === \"string\" || varType === \"number\" || varType === \"boolean\" ) {\n\t\t\t\t\t\t\tresult[i] = object[i];\n\t\t\t\t\t\t} else if(isDate(object[i])){\n\t\t\t\t\t\t\tresult[i] = new Date(object[i]);\n\t\t\t\t\t\t}else if (Object.prototype.hasOwnProperty.apply(object, [i]))\n\t\t\t\t\t\t\tresult[i] = copy(object[i]);\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn result || object;\n\t},\n\tdefined,\n\tisDate,\n\tdelay\n};\n","//returns position of html element on the page\nfunction elementPosition(elem) {\n\tvar top=0, left=0, right=0, bottom=0;\n\tif (elem.getBoundingClientRect) { //HTML5 method\n\t\tvar box = elem.getBoundingClientRect();\n\t\tvar body = document.body;\n\t\tvar docElem = (document.documentElement ||\n\t\t\tdocument.body.parentNode ||\n\t\t\tdocument.body);\n\n\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\n\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\n\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\n\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\n\t\ttop = box.top + scrollTop - clientTop;\n\t\tleft = box.left + scrollLeft - clientLeft;\n\n\t\tright = document.body.offsetWidth - box.right;\n\t\tbottom = document.body.offsetHeight - box.bottom;\n\t} else { //fallback to naive approach\n\t\twhile(elem) {\n\t\t\ttop = top + parseInt(elem.offsetTop,10);\n\t\t\tleft = left + parseInt(elem.offsetLeft,10);\n\t\t\telem = elem.offsetParent;\n\t\t}\n\n\t\tright = document.body.offsetWidth - elem.offsetWidth - left;\n\t\tbottom = document.body.offsetHeight - elem.offsetHeight - top;\n\t}\n\treturn { y: Math.round(top), x: Math.round(left), width:elem.offsetWidth, height:elem.offsetHeight, right: Math.round(right), bottom: Math.round(bottom) };\n}\n\n/*\nevent position relatively to DOM element\n */\nfunction getRelativeEventPosition(ev, node){\n\tvar d = document.documentElement;\n\tvar box = elementPosition(node);\n\n\treturn {\n\t\tx: ev.clientX + d.scrollLeft - d.clientLeft - box.x + node.scrollLeft,\n\t\ty: ev.clientY + d.scrollTop - d.clientTop - box.y + node.scrollTop\n\t};\n}\n\nfunction getNodePosition(elem) {\n\tvar top=0, left=0, right=0, bottom=0;\n\tif (elem.getBoundingClientRect) { //HTML5 method\n\t\tvar box = elem.getBoundingClientRect();\n\t\tvar body = document.body;\n\t\tvar docElem = (document.documentElement ||\n\t\t\tdocument.body.parentNode ||\n\t\t\tdocument.body);\n\n\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\n\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\n\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\n\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\n\t\ttop = box.top + scrollTop - clientTop;\n\t\tleft = box.left + scrollLeft - clientLeft;\n\n\t\tright = document.body.offsetWidth - box.right;\n\t\tbottom = document.body.offsetHeight - box.bottom;\n\t} else { //fallback to naive approach\n\t\twhile(elem) {\n\t\t\ttop = top + parseInt(elem.offsetTop,10);\n\t\t\tleft = left + parseInt(elem.offsetLeft,10);\n\t\t\telem = elem.offsetParent;\n\t\t}\n\n\t\tright = document.body.offsetWidth - elem.offsetWidth - left;\n\t\tbottom = document.body.offsetHeight - elem.offsetHeight - top;\n\t}\n\treturn { y: Math.round(top), x: Math.round(left), width:elem.offsetWidth, height:elem.offsetHeight, right: Math.round(right), bottom: Math.round(bottom) };\n}\n\nfunction getClassName(node){\n\tif(!node) return \"\";\n\n\tvar className = node.className || \"\";\n\tif(className.baseVal)//'className' exist but not a string - IE svg element in DOM\n\t\tclassName = className.baseVal;\n\n\tif(!className.indexOf)\n\t\tclassName = '';\n\n\treturn className || \"\";\n}\n\nfunction getTargetNode(e) {\n\tvar trg;\n\tif (e.tagName)\n\t\ttrg = e;\n\telse {\n\t\te = e || window.event;\n\t\ttrg = e.target || e.srcElement;\n\t\tif (trg.shadowRoot && e.composedPath) {\n\t\t\ttrg = e.composedPath()[0];\n\t\t}\n\t}\n\treturn trg;\n}\n\nfunction locateCss(e, classname, strict){\n\tif(strict === undefined)\n\t\tstrict = true;\n\n\tvar trg = e.target || e.srcElement;\n\tvar css = '';\n\n\twhile (trg){\n\t\tcss = getClassName(trg);\n\n\t\tif(css){\n\t\t\tvar ind = css.indexOf(classname);\n\t\t\tif (ind >= 0){\n\t\t\t\tif (!strict)\n\t\t\t\t\treturn trg;\n\n\t\t\t\t//check that we have exact match\n\t\t\t\tvar left = (ind === 0) || (!((css.charAt(ind - 1)||\"\").trim()));\n\t\t\t\tvar right = ((ind + classname.length >= css.length)) || (!((css.charAt(ind + classname.length)).trim()));\n\n\t\t\t\tif (left && right)\n\t\t\t\t\treturn trg;\n\t\t\t}\n\t\t}\n\n\t\ttrg=trg.parentNode;\n\t}\n\treturn null;\n}\n\n\n// get focusable nodes\nfunction isVisible(node){\n\tvar display = false,\n\t\tvisibility = false;\n\tif(window.getComputedStyle){\n\t\tvar style = window.getComputedStyle(node, null);\n\t\tdisplay = style[\"display\"];\n\t\tvisibility = style[\"visibility\"];\n\t}else if(node.currentStyle){\n\t\tdisplay = node.currentStyle[\"display\"];\n\t\tvisibility = node.currentStyle[\"visibility\"];\n\t}\n\n\tvar hiddenSection = false;\n\tvar recurringSection = locateCss({target:node}, \"dhx_form_repeat\", false);\n\tif(recurringSection){\n\t\thiddenSection = !!(recurringSection.style.height == \"0px\");\n\t}\n\thiddenSection = hiddenSection || !(node.offsetHeight);\n\n\treturn (display != \"none\" && visibility != \"hidden\" && !hiddenSection);\n}\n\nfunction hasNonNegativeTabIndex(node){\n\treturn !isNaN(node.getAttribute(\"tabindex\")) && (node.getAttribute(\"tabindex\")*1 >= 0);\n}\n\nfunction hasHref(node){\n\tvar canHaveHref = {\"a\": true, \"area\": true};\n\tif(canHaveHref[node.nodeName.loLowerCase()]){\n\t\treturn !!node.getAttribute(\"href\");\n\t}\n\treturn true;\n}\n\nfunction isEnabled(node){\n\tvar canDisable = {\"input\":true, \"select\":true, \"textarea\":true, \"button\":true, \"object\":true};\n\tif(canDisable[node.nodeName.toLowerCase()]){\n\t\treturn !node.hasAttribute(\"disabled\");\n\t}\n\n\treturn true;\n}\n\n\nfunction getFocusableNodes(root){\n\tvar nodes = root.querySelectorAll([\n\t\t\"a[href]\",\n\t\t\"area[href]\",\n\t\t\"input\",\n\t\t\"select\",\n\t\t\"textarea\",\n\t\t\"button\",\n\t\t\"iframe\",\n\t\t\"object\",\n\t\t\"embed\",\n\t\t\"[tabindex]\",\n\t\t\"[contenteditable]\"\n\t].join(\", \"));\n\n\tvar nodesArray = Array.prototype.slice.call(nodes, 0);\n\t\n\tfor(var i = 0; i < nodesArray.length; i++){\n\t\tnodesArray[i].$position = i;\n\t\t// we remember original nodes order, \n\t\t// so when we sort them by tabindex we ensure order of nodes with same tabindex is preserved, \n\t\t// since some browsers do unstable sort\n\t}\n\t\n\tnodesArray.sort(function(a, b) {\n\t\tif(a.tabIndex === 0 && b.tabIndex !== 0){\n\t\t\treturn 1;\n\t\t}\n\t\tif(a.tabIndex !== 0 && b.tabIndex === 0){\n\t\t\treturn -1;\n\t\t}\n\t\t\n\t\tif (a.tabIndex === b.tabIndex){\n\t\t\t// ensure we do stable sort\n\t\t\treturn a.$position - b.$position;\n\t\t}\n\t\tif (a.tabIndex < b.tabIndex) {\n\t\t\treturn -1;\n\t\t}\n\t\treturn 1;\n\t});\n\t\n\tfor(var i = 0; i < nodesArray.length; i++){\n\t\tvar node = nodesArray[i];\n\t\tvar isValid = (hasNonNegativeTabIndex(node) || isEnabled(node) || hasHref(node)) && isVisible(node);\n\t\tif(!isValid){\n\t\t\tnodesArray.splice(i, 1);\n\t\t\ti--;\n\t\t}\n\t}\n\treturn nodesArray;\n}\n\n\nfunction isShadowDomSupported() {\n\treturn document.head.createShadowRoot || document.head.attachShadow;\n}\n\n/**\n * Returns element that has the browser focus, or null if no element has focus.\n * Works with shadow DOM, so it's prefereed to use this function instead of document.activeElement directly.\n * @returns HTMLElement\n */\nfunction getActiveElement(){\n\tvar activeElement = document.activeElement;\n\tif (activeElement.shadowRoot) {\n\t\tactiveElement = activeElement.shadowRoot.activeElement;\n\t}\n\tif (activeElement === document.body && document.getSelection) {\n\t\tactiveElement = document.getSelection().focusNode || document.body;\n\t}\n\n\treturn activeElement;\n}\n\n/**\n * Returns document.body or the host node of the ShadowRoot, if the element is attached to ShadowDom\n * @param {HTMLElement} element \n * @returns HTMLElement\n */\nfunction getRootNode(element) {\n\tif (!element) {\n\t\treturn document.body;\n\t}\n\tif (!isShadowDomSupported()) {\n\t\treturn document.body;\n\t}\n\twhile (element.parentNode && (element = element.parentNode)) {\n\t\tif (element instanceof ShadowRoot) {\n\t\t\treturn element.host;\n\t\t}\n\t}\n\treturn document.body;\n}\n\nfunction hasShadowParent(element) {\n\treturn !!getRootNode(element);\n}\n\nexport default {\n\t/**\n\t * @desc: Calculate absolute position of html object\n\t * @type: private\n\t * @param: htmlObject - html object\n\t * @topic: 0\n\t */\n\tgetAbsoluteLeft: function getAbsoluteLeft(htmlObject){\n\t\treturn this.getOffset(htmlObject).left;\n\t},\n\t/**\n\t * @desc: Calculate absolute position of html object\n\t * @type: private\n\t * @param: htmlObject - html object\n\t * @topic: 0\n\t */\n\tgetAbsoluteTop: function getAbsoluteTop(htmlObject){\n\t\treturn this.getOffset(htmlObject).top;\n\t},\n\n\tgetOffsetSum: function getOffsetSum(elem) {\n\t\tvar top=0, left=0;\n\t\twhile(elem) {\n\t\t\ttop = top + parseInt(elem.offsetTop);\n\t\t\tleft = left + parseInt(elem.offsetLeft);\n\t\t\telem = elem.offsetParent;\n\t\t}\n\t\treturn {top: top, left: left};\n\t},\n\n\tgetOffsetRect: function getOffsetRect(elem) {\n\t\tvar box = elem.getBoundingClientRect();\n\n\t\tvar top = 0,\n\t\t\tleft = 0;\n\n\t\t// https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent#Mobile_Tablet_or_Desktop\n\t\tif (!/Mobi/.test(navigator.userAgent)) {\n\t\t\tvar body = document.body;\n\t\t\tvar docElem = document.documentElement;\n\t\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\n\t\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\n\t\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\n\t\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\n\n\t\t\ttop = box.top + scrollTop - clientTop;\n\t\t\tleft = box.left + scrollLeft - clientLeft;\n\t\t}else {\n\t\t\t// incorrect left coordinate on mobile zoom\n\t\t\t// https://bugs.chromium.org/p/chromium/issues/detail?id=489206\n\n\t\t\tvar dummy = document.createElement(\"div\");\n\t\t\tdummy.style.position=\"absolute\";\n\t\t\tdummy.style.left=\"0px\";\n\t\t\tdummy.style.top=\"0px\";\n\t\t\tdummy.style.width=\"1px\";\n\t\t\tdummy.style.height = \"1px\";\n\n\t\t\tdocument.body.appendChild(dummy);\n\t\t\tvar dummyBox = dummy.getBoundingClientRect();\n\t\t\ttop = box.top - dummyBox.top;\n\t\t\tleft = box.left - dummyBox.left;\n\n\t\t\tdummy.parentNode.removeChild(dummy);\n\t\t}\n\n\t\treturn { top: Math.round(top), left: Math.round(left) };\n\t},\n\n\tgetOffset: function getOffset(elem) {\n\t\tif (elem.getBoundingClientRect) {\n\t\t\treturn this.getOffsetRect(elem);\n\t\t} else {\n\t\t\treturn this.getOffsetSum(elem);\n\t\t}\n\t},\n\n\tclosest: function(element, selector){\n\t\tif(!element || !selector){\n\t\t\treturn null;\n\t\t}\n\t\treturn closest(element, selector);\n\t},\n\tinsertAfter: function(newNode, referenceNode){\n\t\tif(referenceNode.nextSibling){\n\t\t\treferenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);\n\t\t}else{\n\t\t\treferenceNode.parentNode.appendChild(newNode);\n\t\t}\n\t},\n\tremove: function(node) {\n\t\tif (node && node.parentNode) {\n\t\t\tnode.parentNode.removeChild(node);\n\t\t}\n\t},\n\tisChildOf: function(child, parent) {\n\t\treturn parent.contains(child);\n\t},\n\tgetFocusableNodes,\n\tgetClassName,\n\tlocateCss,\n\tgetRootNode,\n\thasShadowParent,\n\tisShadowDomSupported,\n\tgetActiveElement,\n\tgetRelativeEventPosition,\n\tgetTargetNode,\n\tgetNodePosition\n};\n\nvar closest;\nif(Element.prototype.closest){\n\tclosest = function(element, selector){\n\t\treturn element.closest(selector);\n\t};\n}else{\n\tvar matches = Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\n\tclosest = function(element, selector) {\n\t\tvar el = element;\n\t\tdo {\n\t\t\tif (matches.call(el, selector)){\n\t\t\t\treturn el;\n\t\t\t}\n\t\t\tel = el.parentElement || el.parentNode;\n\t\t} while (el !== null && el.nodeType === 1);\n\t\treturn null;\n\t};\n}\n","/* eslint-disable no-restricted-globals */\nvar isWindowAwailable = typeof window !== \"undefined\";\n\n/* eslint-enable no-restricted-globals */\n\nexport default {\n\tisIE: isWindowAwailable && (navigator.userAgent.indexOf(\"MSIE\") >= 0 || navigator.userAgent.indexOf(\"Trident\") >= 0),\n\tisIE6: isWindowAwailable && (!XMLHttpRequest && navigator.userAgent.indexOf(\"MSIE\") >= 0),\n\tisIE7: isWindowAwailable && (navigator.userAgent.indexOf(\"MSIE 7.0\") >= 0 && navigator.userAgent.indexOf(\"Trident\") < 0),\n\tisIE8: isWindowAwailable && (navigator.userAgent.indexOf(\"MSIE 8.0\") >= 0 && navigator.userAgent.indexOf(\"Trident\") >= 0),\n\tisOpera: isWindowAwailable && (navigator.userAgent.indexOf(\"Opera\") >= 0),\n\tisChrome: isWindowAwailable && (navigator.userAgent.indexOf(\"Chrome\") >= 0),\n\tisKHTML: isWindowAwailable && (navigator.userAgent.indexOf(\"Safari\") >= 0 || navigator.userAgent.indexOf(\"Konqueror\") >= 0),\n\tisFF: isWindowAwailable && (navigator.userAgent.indexOf(\"Firefox\") >= 0),\n\tisIPad: isWindowAwailable && (navigator.userAgent.search(/iPad/gi) >= 0),\n\tisEdge: isWindowAwailable && (navigator.userAgent.indexOf(\"Edge\")!=-1),\n\tisNode: (!isWindowAwailable || typeof navigator == \"undefined\")\n};","export default function(data) {\n\tif (typeof data === \"string\" || typeof data === \"number\") {\n\t\treturn data;\n\t}\n\tvar result = \"\";\n\tfor (var key in data) {\n\t\tvar serialized = \"\";\n\t\tif (data.hasOwnProperty(key)) {\n\t\t\tif (typeof data[key] === \"string\") {\n\t\t\t\tserialized = encodeURIComponent(data[key]);\n\t\t\t} else if (typeof data[key] === \"number\") {\n\t\t\t\tserialized = data[key];\n\t\t\t} else {\n\t\t\t\tserialized = encodeURIComponent(JSON.stringify(data[key]));\n\t\t\t}\n\t\t\tserialized = key + \"=\" + serialized;\n\n\t\t\tif (result.length) {\n\t\t\t\tserialized = \"&\" + serialized;\n\t\t\t}\n\t\t\tresult += serialized;\n\t\t}\n\t}\n\treturn result;\n}","export default function extend(scheduler) {\n\nvar generateStringToDate = function (format, utc) {\n\tvar splt = \"var temp=date.match(/[a-zA-Z]+|[0-9]+/g);\";\n\tvar mask = format.match(/%[a-zA-Z]/g);\n\tfor (var i = 0; i < mask.length; i++) {\n\t\tswitch (mask[i]) {\n\t\t\tcase \"%j\":\n\t\t\tcase \"%d\": splt += \"set[2]=temp[\" + i + \"]||1;\";\n\t\t\t\tbreak;\n\t\t\tcase \"%n\":\n\t\t\tcase \"%m\": splt += \"set[1]=(temp[\" + i + \"]||1)-1;\";\n\t\t\t\tbreak;\n\t\t\tcase \"%y\": splt += \"set[0]=temp[\" + i + \"]*1+(temp[\" + i + \"]>50?1900:2000);\";\n\t\t\t\tbreak;\n\t\t\tcase \"%g\":\n\t\t\tcase \"%G\":\n\t\t\tcase \"%h\":\n\t\t\tcase \"%H\":\n\t\t\t\tsplt += \"set[3]=temp[\" + i + \"]||0;\";\n\t\t\t\tbreak;\n\t\t\tcase \"%i\":\n\t\t\t\tsplt += \"set[4]=temp[\" + i + \"]||0;\";\n\t\t\t\tbreak;\n\t\t\tcase \"%Y\": splt += \"set[0]=temp[\" + i + \"]||0;\";\n\t\t\t\tbreak;\n\t\t\tcase \"%a\":\n\t\t\tcase \"%A\": splt += \"set[3]=set[3]%12+((temp[\" + i + \"]||'').toLowerCase()=='am'?0:12);\";\n\t\t\t\tbreak;\n\t\t\tcase \"%s\": splt += \"set[5]=temp[\" + i + \"]||0;\";\n\t\t\t\tbreak;\n\t\t\tcase \"%M\": splt += \"set[1]=this.locale.date.month_short_hash[temp[\" + i + \"]]||0;\";\n\t\t\t\tbreak;\n\t\t\tcase \"%F\": splt += \"set[1]=this.locale.date.month_full_hash[temp[\" + i + \"]]||0;\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t}\n\tvar code = \"set[0],set[1],set[2],set[3],set[4],set[5]\";\n\tif (utc) code = \" Date.UTC(\" + code + \")\";\n\treturn new Function(\"date\", \"var set=[0,0,1,0,0,0]; \" + splt + \" return new Date(\" + code + \");\");\n};\nvar csp_date_to_str = function (format, utc) {\n\treturn function(date) {\n\t\treturn format.replace(/%[a-zA-Z]/g, function (a) {\n\t\t\tswitch (a) {\n\t\t\t\tcase \"%d\": return utc ? scheduler.date.to_fixed(date.getUTCDate()) : scheduler.date.to_fixed(date.getDate());\n\t\t\t\tcase \"%m\": return utc ? scheduler.date.to_fixed((date.getUTCMonth() + 1)) : scheduler.date.to_fixed((date.getMonth() + 1));\n\t\t\t\tcase \"%j\": return utc ? date.getUTCDate() : date.getDate();\n\t\t\t\tcase \"%n\": return utc ? (date.getUTCMonth() + 1) : (date.getMonth() + 1);\n\t\t\t\tcase \"%y\": return utc ? scheduler.date.to_fixed(date.getUTCFullYear() % 100) : scheduler.date.to_fixed(date.getFullYear() % 100);\n\t\t\t\tcase \"%Y\": return utc ? date.getUTCFullYear() : date.getFullYear();\n\t\t\t\tcase \"%D\": return utc ? scheduler.locale.date.day_short[date.getUTCDay()] : scheduler.locale.date.day_short[date.getDay()];\n\t\t\t\tcase \"%l\": return utc ? scheduler.locale.date.day_full[date.getUTCDay()] : scheduler.locale.date.day_full[date.getDay()];\n\t\t\t\tcase \"%M\": return utc ? scheduler.locale.date.month_short[date.getUTCMonth()] : scheduler.locale.date.month_short[date.getMonth()];\n\t\t\t\tcase \"%F\": return utc ? scheduler.locale.date.month_full[date.getUTCMonth()] : scheduler.locale.date.month_full[date.getMonth()];\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);\n\t\t\t\tcase \"%g\": return utc ? ((date.getUTCHours() + 11) % 12 + 1) : ((date.getHours() + 11) % 12 + 1);\n\t\t\t\tcase \"%G\": return utc ? date.getUTCHours() : date.getHours();\n\t\t\t\tcase \"%H\": return utc ? scheduler.date.to_fixed(date.getUTCHours()) : scheduler.date.to_fixed(date.getHours());\n\t\t\t\tcase \"%i\": return utc ? scheduler.date.to_fixed(date.getUTCMinutes()) : scheduler.date.to_fixed(date.getMinutes());\n\t\t\t\tcase \"%a\": return utc ? (date.getUTCHours() > 11 ? \"pm\" : \"am\") : (date.getHours() > 11 ? \"pm\" : \"am\");\n\t\t\t\tcase \"%A\": return utc ? (date.getUTCHours() > 11 ? \"PM\" : \"AM\") : (date.getHours() > 11 ? \"PM\" : \"AM\");\n\t\t\t\tcase \"%s\": return utc ? scheduler.date.to_fixed(date.getUTCSeconds()) : scheduler.date.to_fixed(date.getSeconds());\n\t\t\t\tcase \"%W\": return utc ? scheduler.date.to_fixed(scheduler.date.getUTCISOWeek(date)) : scheduler.date.to_fixed(scheduler.date.getISOWeek(date));\n\t\t\t\tdefault: return a;\n\t\t\t}\n\t\t});\n\t};\n};\nvar csp_str_to_date = function (format, utc) {\n\treturn function (date){\n\t\tvar set = [0, 0, 1, 0, 0, 0];\n\t\tvar temp = date.match(/[a-zA-Z]+|[0-9]+/g);\n\t\tvar mask = format.match(/%[a-zA-Z]/g);\n\n\t\tfor (var i = 0; i < mask.length; i++) {\n\t\t\tswitch (mask[i]) {\n\t\t\t\tcase \"%j\":\n\t\t\t\tcase \"%d\":\n\t\t\t\t\tset[2] = temp[i] || 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"%n\":\n\t\t\t\tcase \"%m\":\n\t\t\t\t\tset[1] = (temp[i] || 1) - 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"%y\":\n\t\t\t\t\tset[0] = temp[i] * 1 + (temp[i] > 50 ? 1900 : 2000);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"%g\":\n\t\t\t\tcase \"%G\":\n\t\t\t\tcase \"%h\":\n\t\t\t\tcase \"%H\":\n\t\t\t\t\tset[3] = temp[i] || 0;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"%i\":\n\t\t\t\t\tset[4] = temp[i] || 0;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"%Y\":\n\t\t\t\t\tset[0] = temp[i] || 0;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"%a\":\n\t\t\t\tcase \"%A\":\n\t\t\t\t\tset[3] = set[3] % 12 + ((temp[i] || '').toLowerCase() == 'am' ? 0 : 12);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"%s\":\n\t\t\t\t\tset[5] = temp[i] || 0;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"%M\":\n\t\t\t\t\tset[1] = scheduler.locale.date.month_short_hash[temp[i]] || 0;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"%F\":\n\t\t\t\t\tset[1] = scheduler.locale.date.month_full_hash[temp[i]] || 0;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (utc) {\n\t\t\treturn new Date(Date.UTC(set[0], set[1], set[2], set[3], set[4], set[5]));\n\t\t}\n\n\t\treturn new Date(set[0], set[1], set[2], set[3], set[4], set[5]);\n\t};\n};\n\nvar canUseCsp = false;\n(function() {\n\ttry {\n\t\tnew Function(\"canUseCsp = false;\");\n\t} catch(e) {\n\t\tcanUseCsp = true;\n\t}\n})();\nfunction useCsp() {\n\tvar result = false;\n\tif (scheduler.config.csp === \"auto\") {\n\t\tresult = canUseCsp;\n\t} else {\n\t\tresult = scheduler.config.csp;\n\t}\n\treturn result;\n}\nscheduler.date = {\n\tinit:function(){\n\t\tvar s = scheduler.locale.date.month_short;\n\t\tvar t = scheduler.locale.date.month_short_hash = {};\n\t\tfor (var i = 0; i < s.length; i++)\n\t\t\tt[s[i]]=i;\n\n\t\tvar s = scheduler.locale.date.month_full;\n\t\tvar t = scheduler.locale.date.month_full_hash = {};\n\t\tfor (var i = 0; i < s.length; i++)\n\t\t\tt[s[i]]=i;\n\t},\n\t_bind_host_object : function(method){\n\t\tif(method.bind){\n\t\t\treturn method.bind(scheduler);\n\t\t}else{\n\t\t\treturn function(){ return method.apply(scheduler, arguments); };\n\t\t}\n\t},\n\tdate_part:function(date){\n\t\tvar old = new Date(date);\n\t\tdate.setHours(0);\n\t\tdate.setMinutes(0);\n\t\tdate.setSeconds(0);\n\t\tdate.setMilliseconds(0);\n\t\tif (date.getHours() && //shift to yesterday on dst\n\t\t\t(date.getDate() < old.getDate() || date.getMonth() < old.getMonth() || date.getFullYear() < old.getFullYear()) )\n\t\t\tdate.setTime(date.getTime() + 60 * 60 * 1000 * (24 - date.getHours()));\n\t\treturn date;\n\t},\n\ttime_part:function(date){\n\t\treturn (date.valueOf()/1000 - date.getTimezoneOffset()*60)%86400;\n\t},\n\tweek_start:function(date){\n\t\tvar shift=date.getDay();\n\t\tif (scheduler.config.start_on_monday){\n\t\t\tif (shift===0) shift=6;\n\t\t\telse shift--;\n\t\t}\n\t\treturn this.date_part(this.add(date,-1*shift,\"day\"));\n\t},\n\tmonth_start:function(date){\n\t\tdate.setDate(1);\n\t\treturn this.date_part(date);\n\t},\n\tyear_start:function(date){\n\t\tdate.setMonth(0);\n\t\treturn this.month_start(date);\n\t},\n\tday_start:function(date){\n\t\treturn this.date_part(date);\n\t},\n\t_add_days:function(date, inc){\n\t\tvar ndate = new Date(date.valueOf());\n\n\t\tndate.setDate(ndate.getDate() + inc);\n\n\t\t// Workaround for Safari/iOS timezone bug, ref:OKZ-149693\n\t\tif(inc == Math.round(inc) && inc > 0){\n\t\t\tvar datesDiff = +ndate - +date,\n\t\t\t\trest = datesDiff % (24*60*60*1000);\n\t\t\tif(rest && date.getTimezoneOffset() == ndate.getTimezoneOffset()){\n\t\t\t\tvar hours = rest / (60* 60 * 1000);\n\t\t\t\tndate.setTime(ndate.getTime() + (24 - hours) * 60 * 60 * 1000);\n\t\t\t}\n\t\t}\n\n\t\tif (inc >= 0 && (!date.getHours() && ndate.getHours()) &&//shift to yesterday on dst\n\t\t\t(ndate.getDate() < date.getDate() || ndate.getMonth() < date.getMonth() || ndate.getFullYear() < date.getFullYear()) )\n\t\t\tndate.setTime(ndate.getTime() + 60 * 60 * 1000 * (24 - ndate.getHours()));\n\t\treturn ndate;\n\t},\n\tadd:function(date,inc,mode){\n\t\tvar ndate=new Date(date.valueOf());\n\t\tswitch(mode){\n\t\t\tcase \"day\":\n\t\t\t\tndate = scheduler.date._add_days(ndate, inc);\n\t\t\t\tbreak;\n\t\t\tcase \"week\":\n\t\t\t\tndate = scheduler.date._add_days(ndate, inc * 7);\n\t\t\t\tbreak;\n\t\t\tcase \"month\": ndate.setMonth(ndate.getMonth()+inc); break;\n\t\t\tcase \"year\": ndate.setYear(ndate.getFullYear()+inc); break;\n\t\t\tcase \"hour\":\n\t\t\t\t/*\n\t\t\t\t setHour(getHour() + inc) and setMinutes gives weird result when is applied on a Daylight Saving time switch\n\t\t\t\t setTime seems working as expected\n\t\t\t\t*/\n\t\t\t\tndate.setTime(ndate.getTime() + inc * 60 * 60 * 1000);\n\t\t\t\tbreak;\n\t\t\tcase \"minute\":\n\t\t\t\tndate.setTime(ndate.getTime() + inc * 60 * 1000);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn scheduler.date[\"add_\"+mode](date,inc,mode);\n\t\t}\n\t\treturn ndate;\n\t},\n\tto_fixed:function(num){\n\t\tif (num<10)\treturn \"0\"+num;\n\t\treturn num;\n\t},\n\tcopy:function(date){\n\t\treturn new Date(date.valueOf());\n\t},\n\tdate_to_str:function(format,utc){\n\t\tif (useCsp()) {\n\t\t\treturn csp_date_to_str(format,utc);\n\t\t}\n\n\t\tformat=format.replace(/%[a-zA-Z]/g,function(a){\n\t\t\tswitch(a){\n\t\t\t\tcase \"%d\": return \"\\\"+this.date.to_fixed(date.getDate())+\\\"\";\n\t\t\t\tcase \"%m\": return \"\\\"+this.date.to_fixed((date.getMonth()+1))+\\\"\";\n\t\t\t\tcase \"%j\": return \"\\\"+date.getDate()+\\\"\";\n\t\t\t\tcase \"%n\": return \"\\\"+(date.getMonth()+1)+\\\"\";\n\t\t\t\tcase \"%y\": return \"\\\"+this.date.to_fixed(date.getFullYear()%100)+\\\"\";\n\t\t\t\tcase \"%Y\": return \"\\\"+date.getFullYear()+\\\"\";\n\t\t\t\tcase \"%D\": return \"\\\"+this.locale.date.day_short[date.getDay()]+\\\"\";\n\t\t\t\tcase \"%l\": return \"\\\"+this.locale.date.day_full[date.getDay()]+\\\"\";\n\t\t\t\tcase \"%M\": return \"\\\"+this.locale.date.month_short[date.getMonth()]+\\\"\";\n\t\t\t\tcase \"%F\": return \"\\\"+this.locale.date.month_full[date.getMonth()]+\\\"\";\n\t\t\t\tcase \"%h\": return \"\\\"+this.date.to_fixed((date.getHours()+11)%12+1)+\\\"\";\n\t\t\t\tcase \"%g\": return \"\\\"+((date.getHours()+11)%12+1)+\\\"\";\n\t\t\t\tcase \"%G\": return \"\\\"+date.getHours()+\\\"\";\n\t\t\t\tcase \"%H\": return \"\\\"+this.date.to_fixed(date.getHours())+\\\"\";\n\t\t\t\tcase \"%i\": return \"\\\"+this.date.to_fixed(date.getMinutes())+\\\"\";\n\t\t\t\tcase \"%a\": return \"\\\"+(date.getHours()>11?\\\"pm\\\":\\\"am\\\")+\\\"\";\n\t\t\t\tcase \"%A\": return \"\\\"+(date.getHours()>11?\\\"PM\\\":\\\"AM\\\")+\\\"\";\n\t\t\t\tcase \"%s\": return \"\\\"+this.date.to_fixed(date.getSeconds())+\\\"\";\n\t\t\t\tcase \"%W\": return \"\\\"+this.date.to_fixed(this.date.getISOWeek(date))+\\\"\";\n\t\t\t\tdefault: return a;\n\t\t\t}\n\t\t});\n\t\tif (utc) format=format.replace(/date\\.get/g,\"date.getUTC\");\n\t\tvar func = new Function(\"date\",\"return \\\"\"+format+\"\\\";\");\n\n\t\treturn scheduler.date._bind_host_object(func);\n\t},\n\tstr_to_date:function(format, utc, exactFormat){\n\t\tvar stringToDateMethod = useCsp() ? csp_str_to_date : generateStringToDate;\n\t\tvar parseExactFormat = stringToDateMethod(format, utc);\n\t\t//return scheduler.date._bind_host_object(func);\n\t\t// eslint-disable-next-line\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})?)?$/;\n\n\t\t// MM/dd/yyyy - default old format for xml-date\n\t\t// eslint-disable-next-line\n\t\tvar MMddyyyyhhIIss = /^[0-9]{2}\\/[0-9]{2}\\/[0-9]{4} ?(([0-9]{1,2}:[0-9]{2})(:[0-9]{1,2})?)?$/;\n\t\t// dd-MM-yyyy - default old format for api-date\n\t\t// eslint-disable-next-line\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})?)?$/;\n\t\t// eslint-disable-next-line\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)?)?)?)?$/;\n\n\t\tvar isYMDDate = function (datestr) {\n\t\t\treturn yyyyMMddhhIIss.test(String(datestr));\n\t\t};\n\n\t\tvar isMDYDate = function (datestr) {\n\t\t\treturn MMddyyyyhhIIss.test(String(datestr));\n\t\t};\n\t\tvar isDMYDate = function (datestr) {\n\t\t\treturn ddMMyyyyhhIIss.test(String(datestr));\n\t\t};\n\t\tvar isISO8601 = function (datestr) {\n\t\t\treturn ISO8601.test(datestr);\n\t\t};\n\n\t\tvar parseYMD = stringToDateMethod(\"%Y-%m-%d %H:%i:%s\", utc);\n\t\tvar parseMDY = stringToDateMethod(\"%m/%d/%Y %H:%i:%s\", utc);\n\t\tvar parseDMY = stringToDateMethod(\"%d-%m-%Y %H:%i:%s\", utc);\n\n\t\treturn function (dateString) {\n\n\t\t\tif (!exactFormat && !scheduler.config.parse_exact_format) {\n\t\t\t\tif (dateString && dateString.getISOWeek) {\n\t\t\t\t\treturn new Date(dateString);\n\t\t\t\t} else if (typeof dateString === \"number\") {\n\t\t\t\t\treturn new Date(dateString);\n\t\t\t\t} else if (isYMDDate(dateString)) {\n\t\t\t\t\treturn parseYMD(dateString);\n\t\t\t\t} else if (isMDYDate(dateString)) {\n\t\t\t\t\treturn parseMDY(dateString);\n\t\t\t\t} else if (isDMYDate(dateString)) {\n\t\t\t\t\treturn parseDMY(dateString);\n\t\t\t\t} else if (isISO8601(dateString)) {\n\t\t\t\t\treturn new Date(dateString);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn parseExactFormat.call(scheduler, dateString);\n\t\t};\n\t},\n\tgetISOWeek: function(ndate) {\n\t\tif(!ndate) return false;\n\t\tndate = this.date_part(new Date(ndate));\n\t\tvar nday = ndate.getDay();\n\t\tif (nday === 0) {\n\t\t\tnday = 7;\n\t\t}\n\t\tvar first_thursday = new Date(ndate.valueOf());\n\t\tfirst_thursday.setDate(ndate.getDate() + (4 - nday));\n\t\tvar year_number = first_thursday.getFullYear(); // year of the first Thursday\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)\n\t\tvar week_number = 1 + Math.floor( ordinal_date / 7);\n\t\treturn week_number;\n\t},\n\tgetUTCISOWeek: function(ndate){\n\t\treturn this.getISOWeek(this.convert_to_utc(ndate));\n\t},\n\tconvert_to_utc: function(date) {\n\t\treturn new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds());\n\t}\n};\n\n}\n\n","export default function(scheduler){\n\treturn (function(){\n\t\tvar res = {};\n\t\tfor (var a in this._events){\n\t\t\tvar ev = this._events[a];\n\t\t\tif (ev.id.toString().indexOf(\"#\") == -1){\n\t\t\t\tres[ev.id] = ev;\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}).bind(scheduler);\n}","import xmlLoaded from \"./loaders/xml\";\nimport jsonLoader from \"./loaders/json\";\nimport iCalLoader from \"./loaders/ical\";\nimport createSerializator from \"../core/common/get_serializable_events\";\n\nexport default function extend(scheduler) {\n\nscheduler._loaded = {};\nscheduler._load = function(url, from) {\n\turl = url || this._load_url;\n\n\tif(!url){\n\t\t//if scheduler.setLoadMode is called before scheduler.init, initial rendering will invoke data loading while url is undefined\n\t\treturn;\n\t}\n\n\turl += (url.indexOf(\"?\") == -1 ? \"?\" : \"&\") + \"timeshift=\" + (new Date()).getTimezoneOffset();\n\tif (this.config.prevent_cache) url += \"&uid=\" + this.uid();\n\tvar to;\n\tfrom = from || this._date;\n\tfunction ajaxCallback(response) {\n\t\tscheduler.on_load(response);\n\t\tscheduler.callEvent(\"onLoadEnd\", []);\n\t}\n\tif (this._load_mode) {\n\t\tvar lf = this.templates.load_format;\n\n\t\tfrom = this.date[this._load_mode + \"_start\"](new Date(from.valueOf()));\n\t\twhile (from > this._min_date) from = this.date.add(from, -1, this._load_mode);\n\t\tto = from;\n\n\t\tvar cache_line = true;\n\t\twhile (to < this._max_date) {\n\t\t\tto = this.date.add(to, 1, this._load_mode);\n\t\t\tif (this._loaded[lf(from)] && cache_line)\n\t\t\t\tfrom = this.date.add(from, 1, this._load_mode); else cache_line = false;\n\t\t}\n\n\t\tvar temp_to = to;\n\t\tdo {\n\t\t\tto = temp_to;\n\t\t\ttemp_to = this.date.add(to, -1, this._load_mode);\n\t\t} while (temp_to > from && this._loaded[lf(temp_to)]);\n\n\t\tif (to <= from)\n\t\t\treturn false; //already loaded\n\n\t\tscheduler.ajax.get(url + \"&from=\" + lf(from) + \"&to=\" + lf(to), ajaxCallback);\n\n\t\twhile (from < to) {\n\t\t\tthis._loaded[lf(from)] = true;\n\t\t\tfrom = this.date.add(from, 1, this._load_mode);\n\t\t}\n\t} else {\n\t\tscheduler.ajax.get(url, ajaxCallback);\n\t}\n\n\t// TODO: remove onXLS\n\tthis.callEvent(\"onXLS\", []);\n\tthis.callEvent(\"onLoadStart\", []);\n\treturn true;\n};\n\nscheduler._parsers = {};\n\n\nxmlLoaded(scheduler);\njsonLoader(scheduler);\niCalLoader(scheduler);\n\nscheduler.on_load = function (loader) {\n\tthis.callEvent(\"onBeforeParse\", []);\n\n\tvar evs;\n\tvar error = false;\n\n\tvar foundParser = false;\n\tfor(var i in this._parsers){\n\t\tvar parser = this._parsers[i];\n\t\tif(parser.canParse(loader.xmlDoc.responseText, loader.xmlDoc)){\n\t\t\ttry{\n\t\t\t\tvar param = loader.xmlDoc.responseText;\n\t\t\t\tif(i === \"xml\"){\n\t\t\t\t\tparam = loader;\n\t\t\t\t}\n\t\t\t\tevs = parser.parse(param);\n\t\t\t\tif(!evs){\n\t\t\t\t\terror = true;\n\t\t\t\t}\n\t\t\t}catch(e){\n\t\t\t\terror = true;\n\t\t\t}\n\t\t\tfoundParser = true;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif(!foundParser){\n\t\tif(this._process && this[this._process]){\n\t\t\ttry{\n\t\t\t\tevs = this[this._process].parse(loader.xmlDoc.responseText);\n\t\t\t}catch (e){\n\t\t\t\terror = true;\n\t\t\t}\n\t\t}else{\n\t\t\terror = true;\n\t\t}\n\t}\n\n\tif(error || (loader.xmlDoc.status && loader.xmlDoc.status >= 400)){\n\t\tthis.callEvent(\"onLoadError\", [loader.xmlDoc]);\n\t\tevs = [];\n\t}\n\n\tthis._process_loading(evs);\n\n\t// TODO: remove onXLE\n\tthis.callEvent(\"onXLE\", []);\n\tthis.callEvent(\"onParse\", []);\n};\nscheduler._process_loading = function(evs) {\n\tthis._loading = true;\n\tthis._not_render = true;\n\tfor (var i = 0; i < evs.length; i++) {\n\t\tif (!this.callEvent(\"onEventLoading\", [evs[i]])) continue;\n\t\tthis.addEvent(evs[i]);\n\t}\n\tthis._not_render = false;\n\tif (this._render_wait) this.render_view_data();\n\n\tthis._loading = false;\n\tif (this._after_call) this._after_call();\n\tthis._after_call = null;\n};\nscheduler._init_event = function(event) {\n\tevent.text = (event.text || event._tagvalue) || \"\";\n\tevent.start_date = scheduler._init_date(event.start_date);\n\tevent.end_date = scheduler._init_date(event.end_date);\n};\n\nscheduler._init_date = function(date){\n\tif(!date)\n\t\treturn null;\n\tif (typeof date == \"string\") {\n\t\treturn scheduler._helpers.parseDate(date);\n\t}\n\telse return new Date(date);\n};\n\nconst getSerializableData = createSerializator(scheduler);\nscheduler.serialize = function(){\n\tconst dataset = [];\n\tconst allEvents = getSerializableData();\n\tfor (var a in allEvents){\n\t\t\n\t\tconst exportedEvent = {};\n\t\tvar ev = allEvents[a];\n\n\t\tfor(var key in ev){\n\t\t\tif (key.charAt(0) == \"$\" || key.charAt(0) == \"_\"){\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tlet exportValue;\n\t\t\tconst rawValue = ev[key];\n\t\t\tif(scheduler.utils.isDate(rawValue)){\n\t\t\t\texportValue = scheduler.defined(scheduler.templates.xml_format) ? scheduler.templates.xml_format(rawValue) : scheduler.templates.format_date(rawValue);\n\t\t\t}else{\n\t\t\t\texportValue = rawValue;\n\t\t\t}\n\t\t\t\n\t\t\texportedEvent[key] = exportValue;\n\t\t}\n\n\t\tdataset.push(exportedEvent);\n\t}\n\treturn dataset;\n};\n\n/*\nscheduler.json = {};\nscheduler.json.parse = function(data) {\n\n\tvar events = [];\n\n\tif (typeof data == \"string\") {\n\t\tdata = JSON.parse(data);\n\t}\n\tif (Object.prototype.toString.call(data) === '[object Array]') {\n\t\tevents = data;\n\t} else {\n\t\tif(data){\n\t\t\tif(data.events){\n\t\t\t\tevents = data.events;\n\t\t\t}else if(data.data){\n\t\t\t\tevents = data.data;\n\t\t\t}\n\t\t}\n\t}\n\tevents = events || [];\n\n\tif (data.dhx_security) {\n\t\tif (window.dhtmlx) {\n\t\t\twindow.dhtmlx.security_key = data.dhx_security;\n\t\t}\n\t\tscheduler.security_key = data.dhx_security;\n\t}\n\n\tvar collections = (data && data.collections) ? data.collections : {};\n\tvar collections_loaded = false;\n\tfor (var key in collections) {\n\t\tif (collections.hasOwnProperty(key)) {\n\t\t\tcollections_loaded = true;\n\t\t\tvar collection = collections[key];\n\t\t\tvar arr = scheduler.serverList[key];\n\t\t\tif (!arr) {\n\t\t\t\tscheduler.serverList[key] = arr = [];\n\t\t\t}\n\t\t\tarr.splice(0, arr.length); //clear old options\n\t\t\tfor (var j = 0; j < collection.length; j++) {\n\t\t\t\tvar option = collection[j];\n\t\t\t\tvar obj = { key: option.value, label: option.label }; // resulting option object\n\t\t\t\tfor (var option_key in option) {\n\t\t\t\t\tif (option.hasOwnProperty(option_key)) {\n\t\t\t\t\t\tif (option_key == \"value\" || option_key == \"label\")\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\tobj[option_key] = option[option_key]; // obj['value'] = option['value']\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tarr.push(obj);\n\t\t\t}\n\t\t}\n\t}\n\tif (collections_loaded)\n\t\tscheduler.callEvent(\"onOptionsLoad\", []);\n\n\tvar evs = [];\n\tfor (var i = 0; i < events.length; i++) {\n\t\tvar event = events[i];\n\t\tscheduler._init_event(event);\n\t\tevs.push(event);\n\t}\n\treturn evs;\n};*/\nscheduler.parse = function(data, type) {\n\tthis._process = type;\n\tthis.on_load({xmlDoc: {responseText: data}});\n};\nscheduler.load = function(url, call) {\n\tif (typeof call == \"string\") {\n\t\tthis._process = call;\n\t\tcall = arguments[2];\n\t}\n\n\tthis._load_url = url;\n\tthis._after_call = call;\n\tthis._load(url, this._date);\n};\n//possible values - day,week,month,year,all\nscheduler.setLoadMode = function(mode) {\n\tif (mode == \"all\") mode = \"\";\n\tthis._load_mode = mode;\n};\n\nscheduler.serverList = function(name, array) {\n\tif (array) {\n\t\tthis.serverList[name] = array.slice(0);\n\t\treturn this.serverList[name];\n\t}\n\tthis.serverList[name] = (this.serverList[name] || []);\n\treturn this.serverList[name];\n};\nscheduler._userdata = {};\n\nscheduler._xmlNodeToJSON = function(node) {\n\tvar t = {};\n\tfor (var i = 0; i < node.attributes.length; i++)\n\t\tt[node.attributes[i].name] = node.attributes[i].value;\n\n\tfor (var i = 0; i < node.childNodes.length; i++) {\n\t\tvar child = node.childNodes[i];\n\t\tif (child.nodeType == 1)\n\t\t\tt[child.tagName] = child.firstChild ? child.firstChild.nodeValue : \"\";\n\t}\n\n\tif (!t.text) t.text = node.firstChild ? node.firstChild.nodeValue : \"\";\n\n\treturn t;\n};\nscheduler.attachEvent(\"onXLS\", function() {\n\tif (this.config.show_loading === true) {\n\t\tvar t;\n\t\tt = this.config.show_loading = document.createElement(\"div\");\n\t\tt.className = 'dhx_loading';\n\t\tt.style.left = Math.round((this._x - 128) / 2) + \"px\";\n\t\tt.style.top = Math.round((this._y - 15) / 2) + \"px\";\n\t\tthis._obj.appendChild(t);\n\t}\n});\nscheduler.attachEvent(\"onXLE\", function() {\n\tvar t = this.config.show_loading;\n\tif (t && typeof t == \"object\") {\n\t\tif(t.parentNode) {\n\t\t\tt.parentNode.removeChild(t);\n\t\t}\n\t\tthis.config.show_loading = true;\n\t}\n});\n\n\n}","export default function extend(scheduler) {\n\n\nscheduler._parsers.xml = {\n\tcanParse: function(data, xhr){\n\t\t// IE returns non-empty responseXML type regardless of actual data type\n\t\tif(xhr.responseXML && xhr.responseXML.firstChild){\n\t\t\treturn true;\n\t\t}\n\n\t\ttry{\n\t\t\tvar xmlDoc = scheduler.ajax.parse(xhr.responseText);\n\t\t\tvar topElement = scheduler.ajax.xmltop(\"data\", xmlDoc);\n\t\t\tif(topElement && topElement.tagName === \"data\"){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}catch (e){\n\t\t}\n\t\treturn false;\n\t},\n\tparse: function(loader) {\n\t\tvar xml;\n\n\t\tif (!loader.xmlDoc.responseXML) { //from a string\n\t\t\tloader.xmlDoc.responseXML = scheduler.ajax.parse(loader.xmlDoc.responseText);\n\t\t}\n\t\n\t\txml = scheduler.ajax.xmltop(\"data\", loader.xmlDoc);\n\t\tif (xml.tagName != \"data\") return null;//not an xml\n\t\tvar csrfToken = xml.getAttribute(\"dhx_security\");\n\t\tif (csrfToken) {\n\t\t\tif (window.dhtmlx) {\n\t\t\t\twindow.dhtmlx.security_key = csrfToken;\n\t\t\t}\n\t\t\tscheduler.security_key = csrfToken;\n\t\t}\n\t\n\t\tvar opts = scheduler.ajax.xpath(\"//coll_options\", loader.xmlDoc);\n\t\tfor (var i = 0; i < opts.length; i++) {\n\t\t\tvar bind = opts[i].getAttribute(\"for\");\n\t\t\tvar arr = scheduler.serverList[bind];\n\t\t\tif (!arr) {\n\t\t\t\tscheduler.serverList[bind] = arr = [];\n\t\t\t}\n\t\t\tarr.splice(0, arr.length);\t//clear old options\n\t\t\tvar itms = scheduler.ajax.xpath(\".//item\", opts[i]);\n\t\t\tfor (var j = 0; j < itms.length; j++) {\n\t\t\t\tvar itm = itms[j];\n\t\t\t\tvar attrs = itm.attributes;\n\t\t\t\tvar obj = { key: itms[j].getAttribute(\"value\"), label: itms[j].getAttribute(\"label\")};\n\t\t\t\tfor (var k = 0; k < attrs.length; k++) {\n\t\t\t\t\tvar attr = attrs[k];\n\t\t\t\t\tif (attr.nodeName == \"value\" || attr.nodeName == \"label\")\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tobj[attr.nodeName] = attr.nodeValue;\n\t\t\t\t}\n\t\t\t\tarr.push(obj);\n\t\t\t}\n\t\t}\n\t\tif (opts.length)\n\t\t\tscheduler.callEvent(\"onOptionsLoad\", []);\n\t\n\t\tvar ud = scheduler.ajax.xpath(\"//userdata\", loader.xmlDoc);\n\t\tfor (var i = 0; i < ud.length; i++) {\n\t\t\tvar udx = scheduler._xmlNodeToJSON(ud[i]);\n\t\t\tscheduler._userdata[udx.name] = udx.text;\n\t\t}\n\t\n\t\tvar evs = [];\n\t\txml = scheduler.ajax.xpath(\"//event\", loader.xmlDoc);\n\t\n\t\tfor (var i = 0; i < xml.length; i++) {\n\t\t\tvar ev = evs[i] = scheduler._xmlNodeToJSON(xml[i]);\n\t\t\tscheduler._init_event(ev);\n\t\t}\n\t\treturn evs;\n\t}\n};\n\n}","export default function extend(scheduler) {\n\n\nscheduler.json = scheduler._parsers.json = {\n\tcanParse: function(data){\n\t\tif(data && typeof data === \"object\"){\n\t\t\treturn true;\n\t\t} else if(typeof data === \"string\"){\n\t\t\ttry {\n\t\t\t\tvar result = JSON.parse(data);\n\t\t\t\treturn Object.prototype.toString.call(result) === '[object Object]' || \n\t\t\t\t\t\tObject.prototype.toString.call(result) === '[object Array]';\n\t\t\t} catch (err) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t},\n\tparse: function(data) {\n\t\tvar events = [];\n\n\t\tif (typeof data == \"string\") {\n\t\t\tdata = JSON.parse(data);\n\t\t}\n\t\tif (Object.prototype.toString.call(data) === '[object Array]') {\n\t\t\tevents = data;\n\t\t} else {\n\t\t\tif(data){\n\t\t\t\tif(data.events){\n\t\t\t\t\tevents = data.events;\n\t\t\t\t}else if(data.data){\n\t\t\t\t\tevents = data.data;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tevents = events || [];\n\n\t\tif (data.dhx_security) {\n\t\t\tif (window.dhtmlx) {\n\t\t\t\twindow.dhtmlx.security_key = data.dhx_security;\n\t\t\t}\n\t\t\tscheduler.security_key = data.dhx_security;\n\t\t}\n\n\t\tvar collections = (data && data.collections) ? data.collections : {};\n\t\tvar collections_loaded = false;\n\t\tfor (var key in collections) {\n\t\t\tif (collections.hasOwnProperty(key)) {\n\t\t\t\tcollections_loaded = true;\n\t\t\t\tvar collection = collections[key];\n\t\t\t\tvar arr = scheduler.serverList[key];\n\t\t\t\tif (!arr) {\n\t\t\t\t\tscheduler.serverList[key] = arr = [];\n\t\t\t\t}\n\t\t\t\tarr.splice(0, arr.length); //clear old options\n\t\t\t\tfor (var j = 0; j < collection.length; j++) {\n\t\t\t\t\tvar option = collection[j];\n\t\t\t\t\tvar obj = { key: option.value, label: option.label }; // resulting option object\n\t\t\t\t\tfor (var option_key in option) {\n\t\t\t\t\t\tif (option.hasOwnProperty(option_key)) {\n\t\t\t\t\t\t\tif (option_key == \"value\" || option_key == \"label\")\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\tobj[option_key] = option[option_key]; // obj['value'] = option['value']\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tarr.push(obj);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (collections_loaded)\n\t\t\tscheduler.callEvent(\"onOptionsLoad\", []);\n\n\t\tvar evs = [];\n\t\tfor (var i = 0; i < events.length; i++) {\n\t\t\tvar event = events[i];\n\t\t\tscheduler._init_event(event);\n\t\t\tevs.push(event);\n\t\t}\n\t\treturn evs;\n\t}\n};\n\n}","export default function extend(scheduler) {\n\n\nscheduler.ical = scheduler._parsers.ical = {\n\tcanParse: function(data){\n\t\tif(typeof data === \"string\"){\n\t\t\treturn new RegExp(\"^BEGIN:VCALENDAR\").test(data);\n\t\t}\n\n\t\treturn false;\n\t},\n\tparse:function(str){\n\t\tvar data = str.match(RegExp(this.c_start+\"[^\\f]*\"+this.c_end,\"\"));\n\t\tif (!data.length) return;\n\n\t\t// mpl: handle bad unfolding\n\t\tdata[0]=data[0].replace(/[\\r\\n]+ /g,\"\");\n\n\t\t//unfolding \n\t\tdata[0]=data[0].replace(/[\\r\\n]+(?=[a-z \\t])/g,\" \");\n\t\t//drop property\n\t\tdata[0]=data[0].replace(/;[^:\\r\\n]*:/g,\":\");\n\t\t\n\t\t\n\t\tvar incoming=[];\n\t\tvar match;\n\t\tvar event_r = RegExp(\"(?:\"+this.e_start+\")([^\\f]*?)(?:\"+this.e_end+\")\",\"g\");\n\t\twhile ((match=event_r.exec(data)) !== null){\n\t\t\tvar e={};\n\t\t\tvar param;\n\t\t\tvar param_r = /[^\\r\\n]+[\\r\\n]+/g;\n\t\t\twhile ((param=param_r.exec(match[1])) !== null)\n\t\t\t\tthis.parse_param(param.toString(),e);\n\t\t\tif (e.uid && !e.id) e.id = e.uid; //fallback to UID, when ID is not defined\n\t\t\tincoming.push(e);\t\n\t\t}\n\t\treturn incoming;\n\t},\n\tparse_param:function(str,obj){\n\t\tvar d = str.indexOf(\":\"); \n\t\t\tif (d==-1) return;\n\t\t\n\t\tvar name = str.substr(0,d).toLowerCase();\n\t\tvar value = str.substr(d+1).replace(/\\\\,/g,\",\").replace(/[\\r\\n]+$/,\"\");\n\t\tif (name==\"summary\")\n\t\t\tname=\"text\";\n\t\telse if (name==\"dtstart\"){\n\t\t\tname = \"start_date\";\n\t\t\tvalue = this.parse_date(value,0,0);\n\t\t}\n\t\telse if (name==\"dtend\"){\n\t\t\tname = \"end_date\";\n\t\t\tvalue = this.parse_date(value,0,0);\n\t\t}\n\t\tobj[name]=value;\n\t},\n\tparse_date:function(value,dh,dm){\n\t\tvar t = value.split(\"T\");\n\n\t\tvar utcMark = false;\n\t\tif (t[1]){\n\t\t\tdh=t[1].substr(0,2);\n\t\t\tdm=t[1].substr(2,2);\n\t\t\tutcMark = !!(t[1][6] == \"Z\");\n\t\t}\n\t\tvar dy = t[0].substr(0,4);\n\t\tvar dn = parseInt(t[0].substr(4,2),10)-1;\n\t\tvar dd = t[0].substr(6,2);\n\n\t\tif(scheduler.config.server_utc || utcMark){\n\t\t\treturn new Date(Date.UTC(dy,dn,dd,dh,dm)) ;\n\t\t}else{\n\t\t\treturn new Date(dy,dn,dd,dh,dm);\n\t\t}\n\t},\n\tc_start:\"BEGIN:VCALENDAR\",\n\te_start:\"BEGIN:VEVENT\",\n\te_end:\"END:VEVENT\",\n\tc_end:\"END:VCALENDAR\"\t\n};\n\n}","export default function extend(scheduler) {\n\n\nscheduler._init_touch_events = function(){\n\tvar mobile = this.config.touch &&\n\t\t( ((navigator.userAgent.indexOf(\"Mobile\")!=-1) ||\n\t\t\t(navigator.userAgent.indexOf(\"iPad\")!=-1) ||\n\t\t\t(navigator.userAgent.indexOf(\"Android\")!=-1) ||\n\t\t\t(navigator.userAgent.indexOf(\"Touch\")!=-1)) && !window.MSStream) ||\n\t\t\t((navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1));\n\n\tif(mobile){\n\t\tthis.xy.scroll_width = 0;\n\t\tthis._mobile = true;\n\t}\n\n\tif(this.config.touch){\n\n\t\tvar touchEventsSupported = true;\n\t\ttry {\n\t\t\tdocument.createEvent(\"TouchEvent\");\n\t\t} catch (e) {\n\t\t\ttouchEventsSupported = false;\n\t\t}\n\n\t\tif (touchEventsSupported) {\n\t\t\tthis._touch_events([\"touchmove\", \"touchstart\", \"touchend\"], function (ev) {\n\t\t\t\tif (ev.touches && ev.touches.length > 1) return null;\n\t\t\t\tif (ev.touches[0])\n\t\t\t\t\treturn {\n\t\t\t\t\t\ttarget: ev.target,\n\t\t\t\t\t\tpageX: ev.touches[0].pageX,\n\t\t\t\t\t\tpageY: ev.touches[0].pageY,\n\t\t\t\t\t\tclientX: ev.touches[0].clientX,\n\t\t\t\t\t\tclientY: ev.touches[0].clientY\n\t\t\t\t\t};\n\t\t\t\telse\n\t\t\t\t\treturn ev;\n\t\t\t}, function () {\n\t\t\t\treturn false;\n\t\t\t});\n\t\t} else if (window.PointerEvent || window.navigator.pointerEnabled) {\n\t\t\tthis._touch_events([\"pointermove\", \"pointerdown\", \"pointerup\"], function (ev) {\n\t\t\t\tif (ev.pointerType == \"mouse\") return null;\n\t\t\t\treturn ev;\n\t\t\t}, function (ev) {\n\t\t\t\treturn (!ev || (ev.pointerType == \"mouse\" ));\n\t\t\t});\n\t\t} else if (window.navigator.msPointerEnabled) {\n\t\t\tthis._touch_events([\"MSPointerMove\", \"MSPointerDown\", \"MSPointerUp\"], function (ev) {\n\t\t\t\tif (ev.pointerType == ev.MSPOINTER_TYPE_MOUSE) return null;\n\t\t\t\treturn ev;\n\t\t\t}, function (ev) {\n\t\t\t\treturn (!ev || ev.pointerType == ev.MSPOINTER_TYPE_MOUSE);\n\t\t\t});\n\t\t}\n\t}\n};\n\nscheduler._touch_events = function(names, accessor, ignore){\n\t//webkit on android need to be handled separately\n\t//var a_webkit = (navigator.userAgent.indexOf(\"Android\")!=-1) && (navigator.userAgent.indexOf(\"WebKit\")!=-1);\n\tvar source, tracker, timer, drag_mode, scroll_mode, action_mode;\n\tvar dblclicktime = 0;\n\n\tfunction attachTouchEvent(element, name, callback){\n\t\t//touch gestures must be disabled when ligthbox is opened\n\t\tscheduler.event(element, name, function(e){\n\t\t\tif(scheduler._is_lightbox_open()){\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\tif (ignore(e)) return;\n\t\t\t\treturn callback(e);\n\t\t\t}\n\t\t}, { passive: false });\n\t}\n\n\tfunction check_direction_swipe(s_ev, e_ev, step, max_dy){\n\t\tif (!s_ev || !e_ev) return false;\n\n\t\tvar t = s_ev.target;\n\t\twhile(t && t != scheduler._obj){\n\t\t\tt = t.parentNode;\n\t\t}\n\t\tif(t != scheduler._obj){\n\t\t\t//swipe outside scheduler\n\t\t\treturn false;\n\t\t}\n\n\t\t// ignore swipe in horizontal timeline\n\t\tif(scheduler.matrix && scheduler.matrix[scheduler.getState().mode]){\n\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\n\t\t\tif(timeline.scrollable){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tvar dy = Math.abs(s_ev.pageY - e_ev.pageY);\n\t\tvar dx = Math.abs(s_ev.pageX - e_ev.pageX);\n\t\tif (dy < max_dy && dx>step && (!dy || (dx/dy > 3))){\n\t\t\tif (s_ev.pageX > e_ev.pageX) {\n\t\t\t\tscheduler._click.dhx_cal_next_button();\n\t\t\t}else {\n\t\t\t\tscheduler._click.dhx_cal_prev_button();\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tfunction doMouseMove(e){\n\t\tif (ignore(e)) return;\n\t\tvar dnd = scheduler.getState().drag_mode,\n\t\t\ttimeline = scheduler.matrix ? scheduler.matrix[scheduler._mode] : false;\n\n\t\tvar original_render = scheduler.render_view_data;\n\t\tif(dnd == 'create' && timeline){\n\t\t\t//suppress full redraw of timeline on creating event\n\t\t\tscheduler.render_view_data = function() {\n\t\t\t\tvar id = scheduler.getState().drag_id;\n\t\t\t\tvar ev = scheduler.getEvent(id);\n\t\t\t\tvar property = timeline.y_property;\n\n\t\t\t\tvar evs = scheduler.getEvents(ev.start_date, ev.end_date);\n\t\t\t\tfor(var i = 0; i < evs.length; i++){\n\t\t\t\t\tif(evs[i][property] != ev[property]){\n\t\t\t\t\t\tevs.splice(i, 1);\n\t\t\t\t\t\ti--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tev._sorder = evs.length - 1;\n\t\t\t\tev._count = evs.length;\n\n\t\t\t\tthis.render_data([ev], scheduler.getState().mode);\n\n\t\t\t};\n\t\t}\n\n\t\tscheduler._on_mouse_move(e);\n\n\t\tif(dnd == 'create' && timeline){\n\t\t\tscheduler.render_view_data = original_render;\n\t\t}\n\n\t\tif (e.preventDefault)\n\t\t\te.preventDefault();\n\t\te.cancelBubble = true;\n\t\treturn false;\n\t}\n\n\t// touchmove\n\tattachTouchEvent(document.body, names[0], function(e){\n\t\tif (ignore(e)) return;\n\n\t\tvar acc = accessor(e);\n\t\tif(!acc) return;\n\t\tif (drag_mode){\n\t\t\tdoMouseMove(acc);\n\n\t\t\tif (e.preventDefault)\n\t\t\t\te.preventDefault();\n\t\t\te.cancelBubble = true;\n\t\t\tscheduler._update_global_tip();\n\t\t\treturn false;\n\t\t}\n\t\t//if (tracker && a_webkit){\n\t\t//\tcheck_direction_swipe(tracker, accessor(e), 0);\n\t\t//}\n\n\t\ttracker = accessor(e);\n\t\t//ignore common and scrolling moves\n\t\tif (!action_mode) return;\n\n\t\t//multitouch\n\t\tif (!tracker){\n\t\t\tscroll_mode = true;\n\t\t\treturn;\n\t\t}\n\n\t\t//target changed - probably in scroll mode\n\n\t\tif (source.target != tracker.target || (Math.abs(source.pageX - tracker.pageX) > 5) || (Math.abs(source.pageY - tracker.pageY) > 5)){\n\t\t\tscroll_mode = true;\n\t\t\tclearTimeout(timer);\n\t\t}\n\n\t});\n\n\t//attachTouchEvent(this._els[\"dhx_cal_data\"][0], \"scroll\", drag_cancel);\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], \"touchcancel\", drag_cancel);\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], \"contextmenu\", function(e){\n\t\tif (ignore(e)) return;\n\t\tif (action_mode){\n\t\t\tif (e && e.preventDefault)\n\t\t\t\te.preventDefault();\n\t\t\te.cancelBubble = true;\n\t\t\treturn false;\n\t\t}\n\t});\n\n\t// touchstart\n\tattachTouchEvent(this._obj, names[1], function(e){\n\t\t// block pull-to-refresh\n\t\tif(document && document.body){\n\t\t\tdocument.body.classList.add(\"dhx_cal_touch_active\");\n\t\t}\n\n\t\tif (ignore(e)) return;\n\t\tscheduler._pointerDragId = e.pointerId;\n\n\t\tvar fake_event;\n\t\tdrag_mode = scroll_mode = false;\n\t\taction_mode = true;\n\t\tfake_event = tracker = accessor(e);\n\n\t\tif (!fake_event){\n\t\t\tscroll_mode = true;\n\t\t\treturn;\n\t\t}\n\n\t\t//dbl click\n\t\tvar now = new Date();\n\n\t\tif (!scroll_mode && !drag_mode && now - dblclicktime < 250){\n\t\t\tscheduler._click.dhx_cal_data(fake_event);\n\t\t\twindow.setTimeout(function(){\n\t\t\t\tif(scheduler.$destroyed){\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t//fake_event.type = \"dblclick\";\n\t\t\t\tscheduler._on_dbl_click(fake_event);\n\t\t\t}, 50);\n\n\t\t\tif (e.preventDefault)\n\t\t\t\te.preventDefault();\n\t\t\te.cancelBubble = true;\n\t\t\tscheduler._block_next_stop = true;\n\t\t\treturn false;\n\t\t}\n\t\tdblclicktime = now;\n\n\t\t//drag\n\n\t\tif (scroll_mode || drag_mode || !scheduler.config.touch_drag)\n\t\t\treturn;\n\n\t\tvar actTask = scheduler._locate_event(document.activeElement);\n\t\tvar fakeTask = scheduler._locate_event(fake_event.target);\n\t\tvar sourceTask = source? scheduler._locate_event(source.target) : null;\n\n\t\tif(actTask && fakeTask && actTask == fakeTask && actTask != sourceTask)\n\t\t{\n\t\t\tif(e.preventDefault) {\n\t\t\t\te.preventDefault();\n\t\t\t}\n\t\t\te.cancelBubble = true;\n\t\t\tscheduler._ignore_next_click = false;\n\t\t\tscheduler._click.dhx_cal_data(fake_event);\n\t\t\tsource = fake_event;\n\t\t\treturn false;\n\t\t}\n\t\t//there is no target\n\t\ttimer = setTimeout(function(){\n\t\t\tif(scheduler.$destroyed){\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tdrag_mode = true;\n\t\t\tvar target = source.target;\n\t\t\tvar className = scheduler._getClassName(target);\n\t\t\tif (target && className.indexOf(\"dhx_body\") != -1)\n\t\t\t\ttarget = target.previousSibling;\n\n\t\t\tscheduler._on_mouse_down(source, target);\n\t\t\tif (scheduler._drag_mode && scheduler._drag_mode != \"create\"){\n\t\t\t\tscheduler.for_rendered(scheduler._drag_id, function(node, i) {\n\t\t\t\t\tnode.style.display='none';\n\t\t\t\t\tscheduler._rendered.splice(i, 1);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (scheduler.config.touch_tip) {\n\t\t\t\tscheduler._show_global_tip();\n\t\t\t}\n\t\t\tscheduler.updateEvent(scheduler._drag_id);\n\t\t},scheduler.config.touch_drag);\n\n\t\tsource = fake_event;\n\t});\n\tfunction drag_cancel(e){\n\t\tif (ignore(e)) return;\n\t\tscheduler._hide_global_tip();\n\t\tif (drag_mode){\n\t\t\tscheduler._on_mouse_up( accessor(e) );\n\t\t\tscheduler._temp_touch_block = false;\n\t\t}\n\t\tscheduler._drag_id = null;\n\t\tscheduler._drag_mode=null;\n\t\tscheduler._drag_pos=null;\n\t\tscheduler._pointerDragId = null;\n\t\tclearTimeout(timer);\n\t\tdrag_mode = action_mode = false;\n\t\tscroll_mode = true;\n\t}\n\n\t// touch end\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], names[2], function(e){\n\t\tif(document && document.body){\n\t\t\tdocument.body.classList.remove(\"dhx_cal_touch_active\");\n\t\t}\n\n\t\tif (ignore(e)) return;\n\n\t\tif(scheduler.config.touch_swipe_dates){\n\t\t\tif (!drag_mode && check_direction_swipe(source, tracker, 200, 100)) {\n\t\t\t\tscheduler._block_next_stop = true;\n\t\t\t}\n\t\t}\n\n\t\tif (drag_mode) {\n\t\t\tscheduler._ignore_next_click = true;\n\t\t\tsetTimeout(function(){\n\t\t\t\tscheduler._ignore_next_click = false;\n\t\t\t}, 100);\n\t\t}\n\n\t\tdrag_cancel(e);\n\t\tif (scheduler._block_next_stop){\n\t\t\tscheduler._block_next_stop = false;\n\t\t\tif (e.preventDefault)\n\t\t\t\te.preventDefault();\n\t\t\te.cancelBubble = true;\n\t\t\treturn false;\n\t\t}\n\t});\n\n\tscheduler.event(document.body, names[2], drag_cancel);\n};\n\nscheduler._show_global_tip = function(){\n\tscheduler._hide_global_tip();\n\n\tvar toptip = scheduler._global_tip = document.createElement(\"div\");\n\ttoptip.className='dhx_global_tip';\n\n\tscheduler._update_global_tip(1);\n\n\tdocument.body.appendChild(toptip);\n};\nscheduler._update_global_tip = function(init){\n\tvar toptip = scheduler._global_tip;\n\tif (toptip){\n\t\tvar time = \"\";\n\t\tif (scheduler._drag_id && !init){\n\t\t\tvar ev = scheduler.getEvent(scheduler._drag_id);\n\t\t\tif (ev)\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)) + \"
\";\n\t\t}\n\n\t\tif (scheduler._drag_mode == \"create\" || scheduler._drag_mode == \"new-size\")\n\t\t\ttoptip.innerHTML = (scheduler.locale.labels.drag_to_create || \"Drag to create\")+time;\n\t\telse\n\t\t\ttoptip.innerHTML = (scheduler.locale.labels.drag_to_move || \"Drag to move\")+time;\n\t}\n};\nscheduler._hide_global_tip = function(){\n\tvar toptip = scheduler._global_tip;\n\tif (toptip && toptip.parentNode){\n\t\ttoptip.parentNode.removeChild(toptip);\n\t\tscheduler._global_tip = 0;\n\t}\n};\n\n\n}","export default function extend(scheduler) {\n\n\nscheduler._addThemeClass = function(){\n\tdocument.documentElement.setAttribute(\"data-scheduler-theme\", scheduler.skin);\n};\n\nscheduler._skin_settings = {\n\tfix_tab_position: [1,0],\n\tuse_select_menu_space: [1,0],\n\twide_form: [1,0],\n\n\thour_size_px: [44,42],\n\tdisplayed_event_color: [\"#ff4a4a\", \"ffc5ab\"],\n\tdisplayed_event_text_color: [\"#ffef80\", \"7e2727\"]\n};\n\nscheduler._skin_xy = {\n\tlightbox_additional_height: [90,50],\n\tnav_height: [59,22],\n\tbar_height: [24,20]\n};\n\n// material skin uses a different box sizing model than other skins, and also requires some post-processing.\n// In order to render events correctly, we need to know which box sizing model is used\n// We can detect it by styles applied, taking into account that styles may be loaded after scheduler is rendered\n\nscheduler._is_material_skin = function(){\n\tif(!scheduler.skin){\n\t\treturn checkIfMaterialSkin();\n\t}else{\n\t\treturn ((scheduler.skin + \"\").indexOf(\"material\") > -1);\n\t}\n};\n\nfunction themeNameFromFile(){\n\tvar links = document.getElementsByTagName(\"link\");\n\tfor (var i = 0; i < links.length; i++) {\n\t\tvar res = links[i].href.match(\"dhtmlxscheduler_([a-z]+).css\");\n\t\tif (res){\n\t\t\treturn res[1];\n\t\t}\n\t}\n}\n\nscheduler._build_skin_info = function() {\n\tmonitorThemeChange();\n\tconst styles = getComputedStyle(this.$container);\n\tconst themeVar = styles.getPropertyValue(\"--dhx-scheduler-theme\");\n\n\tlet isCssVarTheme = !!themeVar;\n\tlet themeName;\n\tlet cssValues = {};\n\tlet oldMaterialTheme = false;\n\n\tif(isCssVarTheme){\n\t\tthemeName = themeVar;\n\t\tfor(let i in scheduler.xy){\n\t\t\tcssValues[i] = styles.getPropertyValue(`--dhx-scheduler-xy-${i}`);\n\t\t}\n\n\t\tcssValues.hour_size_px = styles.getPropertyValue(`--dhx-scheduler-config-hour_size_px`);\n\t\tcssValues.wide_form = styles.getPropertyValue(`--dhx-scheduler-config-form_wide`);\n\n\t}else{\n\t\tthemeName = themeNameFromFile();\n\t\toldMaterialTheme = scheduler._is_material_skin();\n\t}\n\n\n\tscheduler._theme_info = {\n\t\ttheme: themeName,\n\t\tcssVarTheme: isCssVarTheme,\n\t\toldMaterialTheme: oldMaterialTheme,\n\t\tvalues: cssValues\n\t};\n\n\tif(scheduler._theme_info.cssVarTheme){\n\t\tconst themeVariables = this._theme_info.values;\n\t\tfor(let i in scheduler.xy){\n\t\t\tif(!isNaN(parseInt(themeVariables[i]))){\n\t\t\t\tscheduler.xy[i] = parseInt(themeVariables[i]);\n\t\t\t}\n\t\t}\n\t}\n};\n\nvar calculatedMaterial;\nfunction checkIfMaterialSkin(){\n\tif(calculatedMaterial === undefined){\n\t\tvar probe = document.createElement(\"div\");\n\t\tprobe.style.position = \"absolute\";\n\t\tprobe.style.left = \"-9999px\";\n\t\tprobe.style.top = \"-9999px\";\n\t\tprobe.innerHTML = \"
\" +\n\t\t\t\"
\" +\n\t\t\t\"
\"+\n\t\t\"
\";\n\t\tdocument.body.appendChild(probe);\n\t\tvar styles = window.getComputedStyle(probe.querySelector(\".dhx_cal_scale_placeholder\"));\n\t\tvar position = styles.getPropertyValue('position');\n\t\tif(position === \"absolute\"){\n\t\t\t// page has skins for placeholder element from material skin\n\t\t\tcalculatedMaterial = true;\n\t\t}else{\n\t\t\tcalculatedMaterial = false;\n\t\t}\n\n\t\tsetTimeout(function(){\n\t\t\tcalculatedMaterial = null;\n\t\t\tif(probe && probe.parentNode){\n\t\t\t\tprobe.parentNode.removeChild(probe);\n\t\t\t}\n\t\t}, 500);\n\t}\n\treturn calculatedMaterial;\n}\n\nvar cachedBorderBoxValue;\nfunction checkIfBorderBoxStyling(){\n\tif(scheduler._is_material_skin()){\n\t\treturn true;\n\t}else{\n\t\tif(cachedBorderBoxValue === undefined){\n\t\t\tvar probe = document.createElement(\"div\");\n\t\t\tprobe.style.position = \"absolute\";\n\t\t\tprobe.style.left = \"-9999px\";\n\t\t\tprobe.style.top = \"-9999px\";\n\t\t\tprobe.innerHTML = \"
\" +\n\t\t\t\t\"
\" +\n\t\t\t\t\t\"
\"+\n\t\t\t\t\"
\"+\n\t\t\t\"
\";\n\n\t\t\tdocument.body.appendChild(probe);\n\t\t\tvar styles = window.getComputedStyle(probe.querySelector(\".dhx_body\"));\n\t\t\tvar boxSizing = styles.getPropertyValue('box-sizing');\n\t\t\tdocument.body.removeChild(probe);\n\t\t\tcachedBorderBoxValue = !!(boxSizing === \"border-box\");\n\n\t\t\tif(!cachedBorderBoxValue){\n\t\t\t\tsetTimeout(function(){\n\t\t\t\t\tcachedBorderBoxValue = undefined;\n\t\t\t\t}, 1000);// recalculate in case scheduler initialized before skin is loaded\n\t\t\t}\n\t\t}else{\n\t\t\treturn cachedBorderBoxValue;\n\t\t}\n\t}\n}\n\nfunction refreshAfterLoad(){\n\tif(scheduler._is_material_skin() || scheduler._border_box_events()){\n\t\treturn;\n\t}\n\n\tvar oldStyling = cachedBorderBoxValue;\n\tcachedBorderBoxValue = undefined;\n\tcalculatedMaterial = undefined;\n\tvar newStyling = checkIfBorderBoxStyling();\n\n\t// if box styling model changed - means scheduler was rendered before stylesheet was loaded or parsed inline\n\t// repaint scheduler in order to apply new styles\n\tif(oldStyling !== newStyling && scheduler.$container && scheduler.getState().mode){\n\t\tscheduler.setCurrentView();\n\t}\n}\nscheduler.event(window, 'DOMContentLoaded', refreshAfterLoad);\nscheduler.event(window, 'load', refreshAfterLoad);\n\nscheduler._border_box_events = function(){\n\treturn checkIfBorderBoxStyling();\n};\n\nscheduler._configure = function(col, data, skin){\n\tfor (var key in data)\n\t\tif (typeof col[key] == \"undefined\")\n\t\t\tcol[key] = data[key][skin];\n};\n\nscheduler.setSkin = function(value){\n\tthis.skin = value;\n\tscheduler._addThemeClass();\n\tif(scheduler.$container){\n\t\tthis._skin_init();\n\t\tthis.render();\n\t}\n\t\n\t//\n};\n\nfunction flatSkinHourScale(date){\n\tvar min = date.getMinutes();\n\tmin = min < 10 ? \"0\"+min : min;\n\tvar html = \"\"+ date.getHours() +\"\"+\n\t\t\" \"+ min +\"\";\n\treturn html;\n}\n\nlet monitorIntervalId = null;\nfunction monitorThemeChange(){\n\tconst container = scheduler.$container;\n\t\n\tclearInterval(monitorIntervalId);\n\tif(container){\n\t\tmonitorIntervalId = setInterval(() => {\n\t\t\tconst csstheme = getComputedStyle(container).getPropertyValue('--dhx-scheduler-theme');\n\t\t\tif(csstheme && csstheme !== scheduler.skin){\n\t\t\t\tscheduler.setSkin(csstheme);\n\t\t\t}\n\n\t\t}, 100);\n\t}\n}\nscheduler.attachEvent(\"onDestroy\", function(){\n\tclearInterval(monitorIntervalId);\n});\n\nscheduler._skin_init = function(){\n\tthis._build_skin_info();\n\n\tif (!this.skin){\n\t\tthis.skin = this._theme_info.theme;\n\t}\n\tscheduler._addThemeClass();\n\tif (scheduler.skin === \"flat\"){\n\t\t// scheduler.xy.scale_height = 35;\n\t\tscheduler.templates.hour_scale = flatSkinHourScale;\n\t}else if (scheduler.templates.hour_scale === flatSkinHourScale){\n\t\tscheduler.templates.hour_scale = scheduler.date.date_to_str(scheduler.config.hour_date);\n\t}\n\n\n\n\t//scheduler._lightbox_template=\"
 
\";\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\n\n\t\tvar date_to_str = scheduler.date.date_to_str(\"%d\");\n\t\tif(!scheduler.templates._old_month_day){\n\t\t\tscheduler.templates._old_month_day = scheduler.templates.month_day;\n\t\t}\n\t\tvar old_month_day = scheduler.templates._old_month_day;\n\t\tscheduler.templates.month_day = function(date) {\n\t\t\tif (this._mode == \"month\") {\n\t\t\t\tvar label = date_to_str(date);\n\t\t\t\tif (date.getDate() == 1) {\n\t\t\t\t\tlabel = scheduler.locale.date.month_full[date.getMonth()] + \" \" + label;\n\t\t\t\t}\n\t\t\t\tif (+date == +scheduler.date.date_part(this._currentDate())) {\n\t\t\t\t\tlabel = scheduler.locale.labels.dhx_cal_today_button + \" \" + label;\n\t\t\t\t}\n\t\t\t\treturn label;\n\t\t\t} else {\n\t\t\t\treturn old_month_day.call(this, date);\n\t\t\t}\n\t\t};\n\n\t\t// tab classes\n\t\tif(scheduler.config.fix_tab_position){\n\t\t\tconst tabs = scheduler._els[\"dhx_cal_navline\"][0].querySelectorAll('[data-tab]');\n\t\t\ttabs.forEach((tab) => {\n\t\t\t\tconst view = tab.getAttribute(\"data-tab\") || tab.getAttribute(\"name\");\n\n\t\t\t\tswitch (view) {\n\t\t\t\t\tcase \"day\":\n\t\t\t\t\tcase \"day_tab\":\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_first\");\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"week\":\n\t\t\t\t\tcase \"week_tab\":\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"month\":\n\t\t\t\t\tcase \"month_tab\":\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_last\");\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_standalone\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treorderTabs(scheduler._els[\"dhx_cal_navline\"][0]);\n\n\t\t}\n\t}, {once: true});\n\n\tfunction reorderTabs(container) {\n\t\t// segmented tabs should go first\n\n\t\tif(scheduler.config.header){\n\t\t\treturn;\n\t\t\t// don't reorder tabs if header is defined via config\n\t\t}\n\t\tconst tabs = Array.from(container.querySelectorAll('.dhx_cal_tab'));\n\t\n\t\t// segmented tabs\n\t\tconst order = ['day', 'week', 'month'];\n\t\n\t\tconst specialTabs = order.map(tabName => \n\t\t\ttabs.find(tab => tab.getAttribute('data-tab') === tabName)\n\t\t).filter(tab => tab !== undefined);\n\t\n\t\tlet firstTab = tabs.length > 0 ? tabs[0] : null;\n\n\t\tspecialTabs.reverse().forEach(tab => {\n\t\t\tcontainer.insertBefore(tab, firstTab);\n\t\t\tfirstTab = tab;\n\t\t});\n\t}\n\n\t// scheduler._skin_init = function(){\n\t// \tthis._build_skin_info();\n\t// \tthis.skin = this._theme_info.theme;\n\t// };\n};\n\n\n\n}","export default function DataProcessorEvents(scheduler, dp){\n\tthis.$scheduler = scheduler;\n\tthis.$dp = dp;\n\tthis._dataProcessorHandlers = [];\n\n\tthis.attach = function () {\n\t\tvar dp = this.$dp;\n\t\tvar scheduler = this.$scheduler;\n\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onEventAdded\", function(id) {\n\t\t\tif (!this._loading && this._validId(id))\n\t\t\tdp.setUpdated(id,true,\"inserted\");\n\t\t}));\n\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onConfirmedBeforeEventDelete\", function(id) {\n\t\t\tif (!this._validId(id)) return;\n\t\t\tvar z=dp.getState(id);\n\n\t\t\tif (z==\"inserted\" || this._new_event) { dp.setUpdated(id,false); return true; }\n\t\t\tif (z==\"deleted\") return false;\n\t\t\tif (z==\"true_deleted\") return true;\n\n\t\t\tdp.setUpdated(id,true,\"deleted\");\n\t\t\treturn false;\n\t\t}));\n\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onEventChanged\", function(id) { \n\t\t\tif (!this._loading && this._validId(id))\n\t\t\tdp.setUpdated(id,true,\"updated\");\n\t\t}));\n\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onClearAll\", function() { \n\t\t\t// clear dataprocessor state when scheduler is reset\n\t\t\tdp._in_progress={};\n\t\t\tdp._invalid={};\n\t\t\tdp.updatedRows = [];\n\t\t\tdp._waitMode = 0;\n\t\t}));\n\n\t\tdp.attachEvent(\"insertCallback\", scheduler._update_callback);\n\t\tdp.attachEvent(\"updateCallback\", scheduler._update_callback);\n\t\tdp.attachEvent(\"deleteCallback\", function(upd, id) {\n\t\t\tif (scheduler.getEvent(id)){\n\t\t\t\tscheduler.setUserData(id, this.action_param, \"true_deleted\");\n\t\t\t\tscheduler.deleteEvent(id);\n\t\t\t} else if (scheduler._add_rec_marker)\n\t\t\t\tscheduler._update_callback(upd, id);\n\t\t});\n\t};\n\n\tthis.detach = function () {\n\t\tfor (var key in this._dataProcessorHandlers) {\n\t\t\tvar handler = this._dataProcessorHandlers[key];\n\t\t\tthis.$scheduler.detachEvent(handler);\n\t\t}\n\t\tthis._dataProcessorHandlers = [];\n\t};\n}\n\nexport function extendScheduler(scheduler, dp){\n\tscheduler._validId=function(id){\n\t\tif(this._is_virtual_event){\n\t\t\treturn !this._is_virtual_event(id);\n\t\t}\n\t\treturn true;\n\t};\n\tscheduler.setUserData=function(id,name,value){\n\t\tif (id){\n\t\t\tvar ev = this.getEvent(id);\n\t\t\tif(ev) ev[name]=value;\n\t\t}else{\n\t\t\tthis._userdata[name]=value;\n\t\t}\n\t};\n\tscheduler.getUserData=function(id,name){\n\t\tif (id){\n\t\t\tvar ev = this.getEvent(id);\n\t\t\tif(ev)\n\t\t\t\treturn ev[name];\n\t\t\telse\n\t\t\t\treturn null;\n\t\t}else{\n\t\t\treturn this._userdata[name];\n\t\t}\n\t};\n\tscheduler._set_event_text_style=function(id,style){\n\t\tif(!scheduler.getEvent(id))\n\t\t\treturn;\n\t\tthis.for_rendered(id,function(r){\n\t\t\tr.style.cssText+=\";\"+style;\n\t\t});\n\t\tvar ev = this.getEvent(id);\n\t\tev[\"_text_style\"]=style;\n\t\tthis.event_updated(ev);\n\t};\n\tscheduler._update_callback = function(upd,id){\n\t\tvar data = scheduler._xmlNodeToJSON(upd.firstChild);\n\t\t//fix for updates of recurring events\n\t\tif (data.rec_type == \"none\") data.rec_pattern = \"none\";\n\t\tdata.text = data.text||data._tagvalue;\n\t\tdata.start_date = scheduler._helpers.parseDate(data.start_date);\n\t\tdata.end_date = scheduler._helpers.parseDate(data.end_date);\n\t\tscheduler.addEvent(data);\n\t\tif (scheduler._add_rec_marker)\n\t\t\tscheduler.setCurrentView();\n\t};\n\tscheduler._dp_change_event_id = function(id, new_id){\n\t\tif(!scheduler.getEvent(id))\n\t\t\treturn;\n\t\tscheduler.changeEventId(id, new_id);\n\t};\n\tscheduler._dp_hook_delete = function(id, new_id){\n\t\tif(!scheduler.getEvent(id))\n\t\t\treturn;\n\n\t\tif(new_id && id != new_id){\n\t\t\tif(this.getUserData(id, dp.action_param) == \"true_deleted\")\n\t\t\t\tthis.setUserData(id, dp.action_param, \"updated\");\n\n\t\t\tthis.changeEventId(id, new_id);\n\t\t}\n\t\treturn this.deleteEvent(new_id, true);\n\t};\n\n\tscheduler.setDp = function() {\n\t\tthis._dp = dp;\n\t};\n\tscheduler.setDp();\n}","import DataProcessorEvents from \"./dataprocessor_hooks\";\nimport { extendScheduler } from \"./dataprocessor_hooks\";\nimport eventable from \"../../utils/eventable\";\nimport global from \"../../global\";\n\n/**\n *\t@desc: constructor, data processor object\n *\t@param: serverProcessorURL - url used for update\n *\t@type: public\n */\nexport function DataProcessor(serverProcessorURL){\n\tthis.serverProcessor = serverProcessorURL;\n\tthis.action_param = \"!nativeeditor_status\";\n\n\tthis.object = null;\n\tthis.updatedRows = []; // ids of updated rows\n\n\tthis.autoUpdate = true;\n\tthis.updateMode = \"cell\";\n\tthis._tMode = \"GET\";\n\tthis._headers = null;\n\tthis._payload = null;\n\tthis.post_delim = \"_\";\n\n\tthis._waitMode = 0;\n\tthis._in_progress = {};\n\tthis._invalid = {};\n\tthis.messages = [];\n\n\tthis.styles = {\n\t\tupdated: \"font-weight:bold;\",\n\t\tinserted: \"font-weight:bold;\",\n\t\tdeleted: \"text-decoration : line-through;\",\n\t\tinvalid: \"background-color:FFE0E0;\",\n\t\tinvalid_cell: \"border-bottom:2px solid red;\",\n\t\terror: \"color:red;\",\n\t\tclear: \"font-weight:normal;text-decoration:none;\"\n\t};\n\tthis.enableUTFencoding(true);\n\teventable(this); // TODO: need to update\n\n\treturn this;\n}\nDataProcessor.prototype = {\n\tsetTransactionMode: function (mode, total) {\n\t\tif (typeof mode == \"object\") {\n\t\t\tthis._tMode = mode.mode || this._tMode;\n\n\t\t\tif (mode.headers !== undefined) {\n\t\t\t\tthis._headers = mode.headers;\n\t\t\t}\n\n\t\t\tif (mode.payload !== undefined) {\n\t\t\t\tthis._payload = mode.payload;\n\t\t\t}\n\t\t\tthis._tSend = !!total;\n\t\t} else {\n\t\t\tthis._tMode = mode;\n\t\t\tthis._tSend = total;\n\t\t}\n\n\t\tif (this._tMode == \"REST\") {\n\t\t\tthis._tSend = false;\n\t\t\tthis._endnm = true;\n\t\t}\n\n\t\tif (this._tMode === \"JSON\" || this._tMode === \"REST-JSON\") {\n\t\t\tthis._tSend = false;\n\t\t\tthis._endnm = true;\n\t\t\tthis._serializeAsJson = true;\n\t\t\tthis._headers = this._headers || {};\n\t\t\tthis._headers[\"Content-Type\"] = \"application/json\";\n\t\t}else{\n\t\t\tif(this._headers && !this._headers[\"Content-Type\"]){\n\t\t\t\tthis._headers[\"Content-Type\"] = \"application/x-www-form-urlencoded\";\n\t\t\t}\n\t\t}\n\n\t\tif (this._tMode === \"CUSTOM\") {\n\t\t\tthis._tSend = false;\n\t\t\tthis._endnm = true;\n\t\t\tthis._router = mode.router;\n\t\t}\n\t},\n\tescape: function (data) {\n\t\tif (this._utf)\n\t\t\treturn encodeURIComponent(data);\n\t\telse\n\t\t\treturn escape(data);\n\t},\n\t/**\n\t *\t@desc: allows to set escaping mode\n\t *\t@param: true - utf based escaping, simple - use current page encoding\n\t *\t@type: public\n\t */\n\tenableUTFencoding: function (mode) {\n\t\tthis._utf = !!mode;\n\t},\n\t/**\n\t *\t@desc: allows to define, which column may trigger update\n\t *\t@param: val - array or list of true/false values\n\t *\t@type: public\n\t */\n\tsetDataColumns: function (val) {\n\t\tthis._columns = (typeof val == \"string\") ? val.split(\",\") : val;\n\t},\n\t/**\n\t *\t@desc: get state of updating\n\t *\t@returns: true - all in sync with server, false - some items not updated yet.\n\t *\t@type: public\n\t */\n\tgetSyncState: function () {\n\t\treturn !this.updatedRows.length;\n\t},\n\t/**\n\t *\t@desc: enable/disable named field for data syncing, will use column ids for grid\n\t *\t@param: mode - true/false\n\t *\t@type: public\n\t */\n\tenableDataNames: function (mode) {\n\t\tthis._endnm = !!mode;\n\t},\n\t/**\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\n\t *\t@param: mode - true/false\n\t *\t@type: public\n\t */\n\tenablePartialDataSend: function (mode) {\n\t\tthis._changed = !!mode;\n\t},\n\t/**\n\t *\t@desc: set if rows should be send to server automatically\n\t *\t@param: mode - \"row\" - based on row selection changed, \"cell\" - based on cell editing finished, \"off\" - manual data sending\n\t *\t@type: public\n\t */\n\tsetUpdateMode: function (mode, dnd) {\n\t\tthis.autoUpdate = (mode == \"cell\");\n\t\tthis.updateMode = mode;\n\t\tthis.dnd = dnd;\n\t},\n\tignore: function (code, master) {\n\t\tthis._silent_mode = true;\n\t\tcode.call(master || window);\n\t\tthis._silent_mode = false;\n\t},\n\t/**\n\t *\t@desc: mark row as updated/normal. check mandatory fields,initiate autoupdate (if turned on)\n\t *\t@param: rowId - id of row to set update-status for\n\t *\t@param: state - true for \"updated\", false for \"not updated\"\n\t *\t@param: mode - update mode name\n\t *\t@type: public\n\t */\n\tsetUpdated: function (rowId, state, mode) {\n\t\tif (this._silent_mode) return;\n\t\tvar ind = this.findRow(rowId);\n\n\t\tmode = mode || \"updated\";\n\t\tvar existing = this.$scheduler.getUserData(rowId, this.action_param);\n\t\tif (existing && mode == \"updated\") mode = existing;\n\t\tif (state) {\n\t\t\tthis.set_invalid(rowId, false); //clear previous error flag\n\t\t\tthis.updatedRows[ind] = rowId;\n\t\t\tthis.$scheduler.setUserData(rowId, this.action_param, mode);\n\t\t\tif (this._in_progress[rowId])\n\t\t\t\tthis._in_progress[rowId] = \"wait\";\n\t\t} else {\n\t\t\tif (!this.is_invalid(rowId)) {\n\t\t\t\tthis.updatedRows.splice(ind, 1);\n\t\t\t\tthis.$scheduler.setUserData(rowId, this.action_param, \"\");\n\t\t\t}\n\t\t}\n\n\t\tthis.markRow(rowId, state, mode);\n\t\tif (state && this.autoUpdate) this.sendData(rowId);\n\t},\n\n\tmarkRow: function (id, state, mode) {\n\t\tvar str = \"\";\n\t\tvar invalid = this.is_invalid(id);\n\t\tif (invalid) {\n\t\t\tstr = this.styles[invalid];\n\t\t\tstate = true;\n\t\t}\n\t\tif (this.callEvent(\"onRowMark\", [id, state, mode, invalid])) {\n\t\t\t//default logic\n\t\t\tstr = this.styles[state ? mode : \"clear\"] + str;\n\n\t\t\tthis.$scheduler[this._methods[0]](id, str);\n\n\t\t\tif (invalid && invalid.details) {\n\t\t\t\tstr += this.styles[invalid + \"_cell\"];\n\t\t\t\tfor (var i = 0; i < invalid.details.length; i++)\n\t\t\t\t\tif (invalid.details[i])\n\t\t\t\t\t\tthis.$scheduler[this._methods[1]](id, i, str);\n\t\t\t}\n\t\t}\n\t},\n\tgetActionByState: function(state) {\n\t\tif (state === \"inserted\") {\n\t\t\treturn \"create\";\n\t\t}\n\t\tif (state === \"updated\") {\n\t\t\treturn \"update\";\n\t\t}\n\t\tif (state === \"deleted\") {\n\t\t\treturn \"delete\";\n\t\t}\n\t\treturn \"update\";\n\t},\n\n\tgetState: function (id) {\n\t\treturn this.$scheduler.getUserData(id, this.action_param);\n\t},\n\tis_invalid: function (id) {\n\t\treturn this._invalid[id];\n\t},\n\tset_invalid: function (id, mode, details) {\n\t\tif (details) mode = {\n\t\t\tvalue: mode, details: details, toString: function () {\n\t\t\t\treturn this.value.toString();\n\t\t\t}\n\t\t};\n\t\tthis._invalid[id] = mode;\n\t},\n\t/**\n\t *\t@desc: check mandatory fields and varify values of cells, initiate update (if specified)\n\t *\t@param: rowId - id of row to set update-status for\n\t *\t@type: public\n\t */\n\tcheckBeforeUpdate: function (rowId) {\n\t\treturn true;\n\t},\n\t/**\n\t *\t@desc: send row(s) values to server\n\t *\t@param: rowId - id of row which data to send. If not specified, then all \"updated\" rows will be send\n\t *\t@type: public\n\t */\n\tsendData: function (rowId) {\n\t\tif (this.$scheduler.editStop) this.$scheduler.editStop();\n\n\t\tif (typeof rowId == \"undefined\" || this._tSend) return this.sendAllData();\n\t\tif (this._in_progress[rowId]) return false;\n\n\t\tthis.messages = [];\n\t\tif (!this.checkBeforeUpdate(rowId) && this.callEvent(\"onValidationError\", [rowId, this.messages])) return false;\n\t\tthis._beforeSendData(this._getRowData(rowId), rowId);\n\t},\n\t_beforeSendData: function (data, rowId) {\n\t\tif (!this.callEvent(\"onBeforeUpdate\", [rowId, this.getState(rowId), data])) return false;\n\t\tthis._sendData(data, rowId);\n\t},\n\tserialize: function (data, id) {\n\t\tif (this._serializeAsJson) {\n\t\t\treturn this._serializeAsJSON(data);\n\t\t}\n\n\t\tif (typeof data == \"string\")\n\t\t\treturn data;\n\t\tif (typeof id != \"undefined\")\n\t\t\treturn this.serialize_one(data, \"\");\n\t\telse {\n\t\t\tvar stack = [];\n\t\t\tvar keys = [];\n\t\t\tfor (var key in data)\n\t\t\t\tif (data.hasOwnProperty(key)) {\n\t\t\t\t\tstack.push(this.serialize_one(data[key], key + this.post_delim));\n\t\t\t\t\tkeys.push(key);\n\t\t\t\t}\n\t\t\tstack.push(\"ids=\" + this.escape(keys.join(\",\")));\n\t\t\tif (this.$scheduler.security_key)\n\t\t\t\tstack.push(\"dhx_security=\" + (this.$scheduler.security_key));\n\t\t\treturn stack.join(\"&\");\n\t\t}\n\t},\n\tserialize_one: function (data, pref) {\n\t\tif (typeof data == \"string\")\n\t\t\treturn data;\n\t\tvar stack = [];\n\t\tvar serialized = \"\";\n\t\tfor (var key in data)\n\t\t\tif (data.hasOwnProperty(key)) {\n\t\t\t\tif ((key == \"id\" || key == this.action_param) && this._tMode == \"REST\") continue;\n\t\t\t\tif (typeof data[key] === \"string\" || typeof data[key] === \"number\") {\n\t\t\t\t\tserialized = data[key];\n\t\t\t\t} else {\n\t\t\t\t\tserialized = JSON.stringify(data[key]);\n\t\t\t\t}\n\t\t\t\tstack.push(this.escape((pref || \"\") + key) + \"=\" + this.escape(serialized));\n\t\t\t}\n\t\treturn stack.join(\"&\");\n\t},\n\t_applyPayload: function (url) {\n\t\tvar ajax = this.$scheduler.ajax;\n\t\tif (this._payload)\n\t\t\tfor (var key in this._payload)\n\t\t\t\turl = url + ajax.urlSeparator(url) + this.escape(key) + \"=\" + this.escape(this._payload[key]);\n\t\treturn url;\n\t},\n\t_sendData: function (dataToSend, rowId) {\n\t\tif (!dataToSend) {\n\t\t\treturn; // nothing to send\n\t\t}\n\t\tif (!this.callEvent(\"onBeforeDataSending\", rowId ? [rowId, this.getState(rowId), dataToSend] : [null, null, dataToSend])) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (rowId) {\n\t\t\tthis._in_progress[rowId] = (new Date()).valueOf();\n\t\t}\n\n\t\tvar self = this;\n\t\tvar ajax = this.$scheduler.ajax;\n\n\t\tif (this._tMode === \"CUSTOM\") {\n\t\t\tvar state = this.getState(rowId);\n\t\t\tvar action = this.getActionByState(state);\n\t\t\tvar _onResolvedCreateUpdate = function (tag) {\n\t\t\t\tvar resultState = state;\n\t\t\t\tif(tag && tag.responseText && tag.setRequestHeader){\n\t\t\t\t\tif(tag.status !== 200){\n\t\t\t\t\t\tresultState = \"error\";\n\t\t\t\t\t}\n\t\t\t\t\ttry{\n\t\t\t\t\t\ttag = JSON.parse(tag.responseText);\n\t\t\t\t\t} catch (e){}\n\t\t\t\t}\n\n\t\t\t\tresultState = resultState || \"updated\";\n\t\t\t\tvar sid = rowId;\n\t\t\t\tvar tid = rowId;\n\n\t\t\t\tif (tag) {\n\t\t\t\t\tresultState = tag.action || resultState;\n\t\t\t\t\tsid = tag.sid || sid;\n\t\t\t\t\ttid = tag.id || tag.tid || tid;\n\t\t\t\t}\n\t\t\t\tself.afterUpdateCallback(sid, tid, resultState, tag);\n\t\t\t};\n\n\t\t\tconst routerMode = \"event\";\n\t\t\tvar actionPromise;\n\t\t\tif (this._router instanceof Function) {\n\t\t\t\tactionPromise = this._router(routerMode, action, dataToSend, rowId);\n\t\t\t} else {\n\t\t\t\tswitch (state) {\n\t\t\t\t\tcase \"inserted\":\n\t\t\t\t\t\tactionPromise = this._router[routerMode].create(dataToSend);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"deleted\":\n\t\t\t\t\t\tactionPromise = this._router[routerMode].delete(rowId);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tactionPromise = this._router[routerMode].update(dataToSend, rowId);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(actionPromise){\n\t\t\t\t// neither promise nor {tid: newId} response object\n\t\t\t\tif(!actionPromise.then &&\n\t\t\t\t\t(actionPromise.id === undefined && actionPromise.tid === undefined && actionPromise.action === undefined)){\n\t\t\t\t\tthrow new Error(\"Incorrect router return value. A Promise or a response object is expected\");\n\t\t\t\t}\n\n\t\t\t\tif(actionPromise.then){\n\t\t\t\t\tactionPromise.then(_onResolvedCreateUpdate).catch(function(error) {\n\t\t\t\t\t\tif(error && error.action){\n\t\t\t\t\t\t\t_onResolvedCreateUpdate(error);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t_onResolvedCreateUpdate({ action: \"error\", value: error});\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}else{\n\t\t\t\t\t// custom method may return a response object in case of sync action\n\t\t\t\t\t_onResolvedCreateUpdate(actionPromise);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t_onResolvedCreateUpdate(null);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tvar queryParams = {\n\t\t\tcallback: function(xml) {\n\t\t\t\tvar ids = [];\n\n\t\t\t\tif (rowId) {\n\t\t\t\t\tids.push(rowId);\n\t\t\t\t} else if (dataToSend) {\n\t\t\t\t\tfor (var key in dataToSend) {\n\t\t\t\t\t\tids.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn self.afterUpdate(self, xml, ids);\n\t\t\t},\n\t\t\theaders: self._headers\n\t\t};\n\n\t\tvar urlParams = this.serverProcessor + (this._user ? (ajax.urlSeparator(this.serverProcessor) + [\"dhx_user=\" + this._user, \"dhx_version=\" + this.$scheduler.getUserData(0, \"version\")].join(\"&\")) : \"\");\n\t\tvar url = this._applyPayload(urlParams);\n\t\tvar data;\n\n\t\tswitch (this._tMode) {\n\t\t\tcase \"GET\":\n\t\t\t\tdata = this._cleanupArgumentsBeforeSend(dataToSend);\n\t\t\t\tqueryParams.url = url + ajax.urlSeparator(url) + this.serialize(data, rowId);\n\t\t\t\tqueryParams.method = \"GET\";\n\t\t\t\tbreak;\n\t\t\tcase \"POST\":\n\t\t\t\tdata = this._cleanupArgumentsBeforeSend(dataToSend);\n\t\t\t\tqueryParams.url = url;\n\t\t\t\tqueryParams.method = \"POST\";\n\t\t\t\tqueryParams.data = this.serialize(data, rowId);\n\t\t\t\tbreak;\n\t\t\tcase \"JSON\":\n\t\t\t\tdata = {};\n\t\t\t\tvar preprocessedData = this._cleanupItemBeforeSend(dataToSend);\n\t\t\t\tfor (var key in preprocessedData) {\n\t\t\t\t\tif (key === this.action_param || key === \"id\" || key === \"gr_id\") {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tdata[key] = preprocessedData[key];\n\t\t\t\t}\n\n\t\t\t\tqueryParams.url = url;\n\t\t\t\tqueryParams.method = \"POST\";\n\t\t\t\tqueryParams.data = JSON.stringify({\n\t\t\t\t\tid: rowId,\n\t\t\t\t\taction: dataToSend[this.action_param],\n\t\t\t\t\tdata: data\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase \"REST\":\n\t\t\tcase \"REST-JSON\":\n\t\t\t\turl = urlParams.replace(/(&|\\?)editing=true/, \"\");\n\t\t\t\tdata = \"\";\n\n\t\t\t\tswitch (this.getState(rowId)) {\n\t\t\t\t\tcase \"inserted\":\n\t\t\t\t\t\tqueryParams.method = \"POST\";\n\t\t\t\t\t\tqueryParams.data = this.serialize(dataToSend, rowId);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"deleted\":\n\t\t\t\t\t\tqueryParams.method = \"DELETE\";\n\t\t\t\t\t\turl = url + (url.slice(-1) === \"/\" ? \"\" : \"/\") + rowId;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tqueryParams.method = \"PUT\";\n\t\t\t\t\t\tqueryParams.data = this.serialize(dataToSend, rowId);\n\t\t\t\t\t\turl = url + (url.slice(-1) === \"/\" ? \"\" : \"/\") + rowId;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tqueryParams.url = this._applyPayload(url);\n\t\t\t\tbreak;\n\t\t}\n\n\t\tthis._waitMode++;\n\t\treturn ajax.query(queryParams);\n\t},\n\tsendAllData: function () {\n\t\tif (!this.updatedRows.length || this.updateMode === \"off\") { // FIXME: need to leave checking 'this.updateMode === \"off\"'?\n\t\t\treturn;\n\t\t}\n\n\t\tthis.messages = [];\n\t\tvar valid = true;\n\n\t\tthis._forEachUpdatedRow(function(rowId) {\n\t\t\tvalid = valid && this.checkBeforeUpdate(rowId);\n\t\t});\n\n\t\tif (!valid && !this.callEvent(\"onValidationError\", [\"\", this.messages])) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (this._tSend) {\n\t\t\tthis._sendData(this._getAllData());\n\t\t} else {\n\t\t\tthis._forEachUpdatedRow(function(rowId) {\n\t\t\t\tif (!this._in_progress[rowId]) {\n\t\t\t\t\tif (this.is_invalid(rowId)) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tthis._beforeSendData(this._getRowData(rowId), rowId);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t},\n\n\t_getAllData: function (rowId) {\n\t\tvar out = {};\n\t\tvar has_one = false;\n\t\tthis._forEachUpdatedRow(function(id) {\n\t\t\tif (this._in_progress[id] || this.is_invalid(id)){\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar row = this._getRowData(id);\n\t\t\tif (!this.callEvent(\"onBeforeUpdate\", [id, this.getState(id), row])) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tout[id] = row;\n\t\t\thas_one = true;\n\t\t\tthis._in_progress[id] = (new Date()).valueOf();\n\t\t});\n\t\treturn has_one ? out : null;\n\t},\n\n\tfindRow: function (pattern) {\n\t\tvar i = 0;\n\t\tfor (i = 0; i < this.updatedRows.length; i++)\n\t\t\tif (pattern == this.updatedRows[i]) break;\n\t\treturn i;\n\t},\n\n\t/**\n\t *\t@desc: define custom actions\n\t *\t@param: name - name of action, same as value of action attribute\n\t *\t@param: handler - custom function, which receives a XMl response content for action\n\t *\t@type: private\n\t */\n\tdefineAction: function (name, handler) {\n\t\tif (!this._uActions) this._uActions = {};\n\t\tthis._uActions[name] = handler;\n\t},\n\n\t/**\n\t *\t @desc: used in combination with setOnBeforeUpdateHandler to create custom client-server transport system\n\t *\t @param: sid - id of item before update\n\t *\t @param: tid - id of item after up0ate\n\t *\t @param: action - action name\n\t *\t @type: public\n\t *\t @topic: 0\n\t */\n\tafterUpdateCallback: function (sid, tid, action, btag) {\n\t\tif(!this.$scheduler){\n\t\t\t// destructor has been called before the callback\n\t\t\treturn;\n\t\t}\n\n\t\tvar marker = sid;\n\t\tvar correct = (action !== \"error\" && action !== \"invalid\");\n\t\tif (!correct) {\n\t\t\tthis.set_invalid(sid, action);\n\t\t}\n\t\tif ((this._uActions) && (this._uActions[action]) && (!this._uActions[action](btag))) {\n\t\t\treturn (delete this._in_progress[marker]);\n\t\t}\n\n\t\tif (this._in_progress[marker] !== \"wait\") {\n\t\t\tthis.setUpdated(sid, false);\n\t\t}\n\n\t\tvar originalSid = sid;\n\n\t\tswitch (action) {\n\t\t\tcase \"inserted\":\n\t\t\tcase \"insert\":\n\t\t\t\tif (tid != sid) {\n\t\t\t\t\tthis.setUpdated(sid, false);\n\t\t\t\t\tthis.$scheduler[this._methods[2]](sid, tid);\n\t\t\t\t\tsid = tid;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"delete\":\n\t\t\tcase \"deleted\":\n\t\t\t\tthis.$scheduler.setUserData(sid, this.action_param, \"true_deleted\");\n\t\t\t\tthis.$scheduler[this._methods[3]](sid, tid);\n\t\t\t\tdelete this._in_progress[marker];\n\t\t\t\treturn this.callEvent(\"onAfterUpdate\", [sid, action, tid, btag]);\n\t\t}\n\n\t\tif (this._in_progress[marker] !== \"wait\") {\n\t\t\tif (correct) {\n\t\t\t\tthis.$scheduler.setUserData(sid, this.action_param, \"\");\n\t\t\t}\n\t\t\tdelete this._in_progress[marker];\n\t\t} else {\n\t\t\tdelete this._in_progress[marker];\n\t\t\tthis.setUpdated(tid, true, this.$scheduler.getUserData(sid, this.action_param));\n\t\t}\n\n\t\tthis.callEvent(\"onAfterUpdate\", [originalSid, action, tid, btag]);\n\t},\n\n\t_errorResponse: function (xml, id){\n\t\tif(this.$scheduler && this.$scheduler.callEvent){\n\t\t\tthis.$scheduler.callEvent(\"onSaveError\", [id, xml.xmlDoc]);\n\t\t}\n\t\treturn this.cleanUpdate(id);\n\t},\n\n\t_setDefaultTransactionMode: function () {\n\t\tif (this.serverProcessor) {\n\t\t\tthis.setTransactionMode(\"POST\", true);\n\t\t\tthis.serverProcessor += (this.serverProcessor.indexOf(\"?\") !== -1 ? \"&\" : \"?\") + \"editing=true\";\n\t\t\tthis._serverProcessor = this.serverProcessor;\n\t\t}\n\t},\n\t\n\t/**\n\t *\t@desc: response from server\n\t *\t@param: xml - XMLLoader object with response XML\n\t *\t@type: private\n\t */\n\tafterUpdate: function (that, xml, id) {\n\t\tvar ajax = this.$scheduler.ajax;\n\n\t\tif (xml.xmlDoc.status !== 200){\n\t\t\tthis._errorResponse(xml, id);\n\t\t\treturn;\n\t\t}\n\n\t\t// try to use json first\n\t\tvar tag;\n\t\ttry {\n\t\t\ttag = JSON.parse(xml.xmlDoc.responseText);\n\t\t} catch (e) {\n\t\t\t// empty response also can be processed by json handler\n\t\t\tif (!xml.xmlDoc.responseText.length) {\n\t\t\t\ttag = {};\n\t\t\t}\n\t\t}\n\n\t\tif (tag) {\n\t\t\tvar action = tag.action || this.getState(id) || \"updated\";\n\t\t\tvar sid = tag.sid || id[0];\n\t\t\tvar tid = tag.tid || id[0];\n\t\t\tthat.afterUpdateCallback(sid, tid, action, tag);\n\t\t\tthat.finalizeUpdate();\n\t\t\treturn;\n\t\t}\n\n\t\t// xml response\n\t\tvar top = ajax.xmltop(\"data\", xml.xmlDoc); // fix incorrect content type in IE\n\t\tif (!top) {\n\t\t\treturn this._errorResponse(xml, id);\n\t\t}\n\t\tvar atag = ajax.xpath(\"//data/action\", top);\n\t\tif (!atag.length) {\n\t\t\treturn this._errorResponse(xml, id);\n\t\t}\n\n\t\tfor (var i = 0; i < atag.length; i++) {\n\t\t\tvar btag = atag[i];\n\t\t\tvar action = btag.getAttribute(\"type\");\n\t\t\tvar sid = btag.getAttribute(\"sid\");\n\t\t\tvar tid = btag.getAttribute(\"tid\");\n\n\t\t\tthat.afterUpdateCallback(sid, tid, action, btag);\n\t\t}\n\t\tthat.finalizeUpdate();\n\t},\n\tcleanUpdate: function (id) {\n\t\tif (id)\n\t\t\tfor (var i = 0; i < id.length; i++)\n\t\t\t\tdelete this._in_progress[id[i]];\n\t},\n\tfinalizeUpdate: function () {\n\t\tif (this._waitMode) this._waitMode--;\n\n\t\tthis.callEvent(\"onAfterUpdateFinish\", []);\n\t\tif (!this.updatedRows.length)\n\t\t\tthis.callEvent(\"onFullSync\", []);\n\t},\n\n\t/**\n\t *\t@desc: initializes data-processor\n\t *\t@param: scheduler - dhtmlxScheduler object to attach this data-processor to\n\t *\t@type: public\n\t */\n\tinit: function (scheduler) {\n\t\tif (this._initialized) {\n\t\t\treturn;\n\t\t}\n\t\tthis.$scheduler = scheduler;\n\t\tif (this.$scheduler._dp_init) {\n\t\t\tthis.$scheduler._dp_init(this);\n\t\t}\n\n\t\tthis._setDefaultTransactionMode();\n\n\t\tthis._methods=this._methods||[\"_set_event_text_style\",\"\",\"_dp_change_event_id\",\"_dp_hook_delete\"];\n\t\textendScheduler(this.$scheduler, this);\n\t\tvar dataProcessorEvents = new DataProcessorEvents(this.$scheduler, this);\n\t\tdataProcessorEvents.attach();\n\t\tthis.attachEvent(\"onDestroy\", function() {\n\t\t\tdelete this._getRowData;\n\n\t\t\tdelete this.$scheduler._dp;\n\t\t\tdelete this.$scheduler._dataprocessor;\n\t\t\tdelete this.$scheduler._set_event_text_style;\n\t\t\tdelete this.$scheduler._dp_change_event_id;\n\t\t\tdelete this.$scheduler._dp_hook_delete;\n\t\t\tdelete this.$scheduler;\n\t\t\tdataProcessorEvents.detach();\n\t\t});\n\t\tthis.$scheduler.callEvent(\"onDataProcessorReady\", [this]);\n\t\tthis._initialized = true;\n\n\t\tscheduler._dataprocessor=this;\n\t},\n\n\tsetOnAfterUpdate: function (ev) {\n\t\tthis.attachEvent(\"onAfterUpdate\", ev);\n\t},\n\tsetOnBeforeUpdateHandler: function (func) {\n\t\tthis.attachEvent(\"onBeforeDataSending\", func);\n\t},\n\n\t/* starts autoupdate mode\n\t\t@param interval time interval for sending update requests\n\t*/\n\tsetAutoUpdate: function (interval, user) {\n\t\tinterval = interval || 2000;\n\n\t\tthis._user = user || (new Date()).valueOf();\n\t\tthis._need_update = false;\n\t\t//this._loader = null;\n\t\tthis._update_busy = false;\n\n\t\tthis.attachEvent(\"onAfterUpdate\", function (sid, action, tid, xml_node) {\n\t\t\tthis.afterAutoUpdate(sid, action, tid, xml_node);\n\t\t});\n\t\tthis.attachEvent(\"onFullSync\", function () {\n\t\t\tthis.fullSync();\n\t\t});\n\n\t\tvar self = this;\n\t\tlet intervalId = global.setInterval(function () {\n\t\t\tself.loadUpdate();\n\t\t}, interval);\n\t\tthis.attachEvent(\"onDestroy\", function(){\n\t\t\tclearInterval(intervalId);\n\t\t});\n\t},\n\n\t/* process updating request answer\n\t\tif status == collision version is deprecated\n\t\tset flag for autoupdating immediately\n\t*/\n\tafterAutoUpdate: function (sid, action, tid, xml_node) {\n\t\tif (action == 'collision') {\n\t\t\tthis._need_update = true;\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t},\n\n\t/* callback function for onFillSync event\n\t\tcall update function if it's need\n\t*/\n\tfullSync: function () {\n\t\tif (this._need_update) {\n\t\t\tthis._need_update = false;\n\t\t\tthis.loadUpdate();\n\t\t}\n\t\treturn true;\n\t},\n\n\t/* sends query to the server and call callback function\n\t*/\n\tgetUpdates: function (url, callback) {\n\t\tvar ajax = this.$scheduler.ajax;\n\t\tif (this._update_busy)\n\t\t\treturn false;\n\t\telse\n\t\t\tthis._update_busy = true;\n\n\t\tajax.get(url, callback);\n\t},\n\n\t/* returns xml node value\n\t\t@param node\n\t\t\txml node\n\t*/\n\t_getXmlNodeValue: function(node) {\n\t\tif (node.firstChild) {\n\t\t\treturn node.firstChild.nodeValue;\n\t\t}\n\t\treturn \"\";\n\t},\n\n\t/* loads updates and processes them\n\t*/\n\tloadUpdate: function () {\n\t\tvar self = this;\n\t\tvar ajax = this.$scheduler.ajax;\n\t\tvar version = this.$scheduler.getUserData(0, \"version\");\n\t\tvar url = this.serverProcessor + ajax.urlSeparator(this.serverProcessor) + [\"dhx_user=\" + this._user, \"dhx_version=\" + version].join(\"&\");\n\t\turl = url.replace(\"editing=true&\", \"\");\n\t\tthis.getUpdates(url, function (xml) {\n\t\t\tvar vers = ajax.xpath(\"//userdata\", xml);\n\t\t\tself.$scheduler.setUserData(0, \"version\", self._getXmlNodeValue(vers[0]));\n\n\t\t\tvar updates = ajax.xpath(\"//update\", xml);\n\t\t\tif (updates.length) {\n\t\t\t\tself._silent_mode = true;\n\n\t\t\t\tfor (var i = 0; i < updates.length; i++) {\n\t\t\t\t\tvar status = updates[i].getAttribute(\"status\");\n\t\t\t\t\tvar id = updates[i].getAttribute(\"id\");\n\t\t\t\t\tvar parent = updates[i].getAttribute(\"parent\");\n\t\t\t\t\tswitch (status) {\n\t\t\t\t\t\tcase \"inserted\":\n\t\t\t\t\t\t\tthis.callEvent(\"insertCallback\", [updates[i], id, parent]);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"updated\":\n\t\t\t\t\t\t\tthis.callEvent(\"updateCallback\", [updates[i], id, parent]);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"deleted\":\n\t\t\t\t\t\t\tthis.callEvent(\"deleteCallback\", [updates[i], id, parent]);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tself._silent_mode = false;\n\t\t\t}\n\t\t\tself._update_busy = false;\n\t\t\tself = null;\n\t\t});\n\t},\n\n\tdestructor: function() {\n\t\tthis.callEvent(\"onDestroy\", []);\n\t\tthis.detachAllEvents();\n\n\t\tthis.updatedRows = [];\n\t\tthis._in_progress = {};\n\t\tthis._invalid = {};\n\t\tthis._headers = null;\n\t\tthis._payload = null;\n\t\tdelete this._initialized;\n\t},\n\n\turl: function(url) {\n\t\tthis.serverProcessor = this._serverProcessor = url;\n\t},\n\n\t_serializeAsJSON: function(data) {\n\t\tif (typeof data === \"string\") {\n\t\t\treturn data;\n\t\t}\n\n\t\tvar copy = this.$scheduler.utils.copy(data);\n\t\tif (this._tMode === \"REST-JSON\") {\n\t\t\tdelete copy.id;\n\t\t\tdelete copy[this.action_param];\n\t\t}\n\n\t\treturn JSON.stringify(copy);\n\t},\n\n\t// GET/POST/JSON modes of the dataProcessor didn't send the whole data items in 'delete' requests\n\t// clear extra info from the data in order not to change the request format\n\t_cleanupArgumentsBeforeSend: function(dataToSend) {\n\t\tvar processedData;\n\t\tif(dataToSend[this.action_param] === undefined){// hash of updated items, and not an individual item\n\t\t\tprocessedData = {};\n\t\t\tfor(var i in dataToSend) {\n\t\t\t\tprocessedData[i] = this._cleanupArgumentsBeforeSend(dataToSend[i]);\n\t\t\t}\n\t\t} else {\n\t\t\tprocessedData = this._cleanupItemBeforeSend(dataToSend);\n\t\t}\n\t\treturn processedData;\n\t},\n\t_cleanupItemBeforeSend: function(updatedItem) {\n\t\tvar output = null;\n\t\tif(updatedItem){\n\t\t\tif(updatedItem[this.action_param] === \"deleted\"){\n\t\t\t\toutput = {};\n\t\t\t\toutput.id = updatedItem.id;\n\t\t\t\toutput[this.action_param] = updatedItem[this.action_param];\n\t\t\t}else{\n\t\t\t\toutput = updatedItem;\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t},\n\n\t_forEachUpdatedRow: function(code) {\n\t\tvar updatedRows = this.updatedRows.slice();\n\t\tfor (var i = 0; i < updatedRows.length; i++) {\n\t\t\tvar rowId = updatedRows[i];\n\t\t\tif (this.$scheduler.getUserData(rowId, this.action_param)) {\n\t\t\t\tcode.call(this, rowId);\n\t\t\t}\n\t\t}\n\t},\n\n\t_prepareDataItem: function(item) {\n\t\tvar processedItem = {};\n\t\tvar scheduler = this.$scheduler;\n\t\tvar copy = scheduler.utils.copy(item);\n\t\tfor (var i in copy) {\n\t\t\tif (i.indexOf(\"_\") === 0) {\n\t\t\t\tcontinue;\n\t\t\t} else if (copy[i]) {\n\t\t\t\tif(copy[i].getUTCFullYear){\n\t\t\t\t\tprocessedItem[i] = scheduler._helpers.formatDate(copy[i]);\n\t\t\t\t} else if(typeof copy[i] == \"object\") {\n\t\t\t\t\tprocessedItem[i] = this._prepareDataItem(copy[i]);\n\t\t\t\t} else if(copy[i] === null) {\n\t\t\t\t\tprocessedItem[i] = \"\";\n\t\t\t\t} else {\n\t\t\t\t\tprocessedItem[i] = copy[i];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tprocessedItem[this.action_param] = scheduler.getUserData(item.id, this.action_param);\n\t\treturn processedItem;\n\t},\n\t_getRowData: function(id) {\n\t\tvar dataItem = this.$scheduler.getEvent(id);\n\t\tif (!dataItem) {\n\t\t\tdataItem = { id: id };\n\t\t}\n\t\treturn this._prepareDataItem(dataItem);\n\t}\n};\n\n\nexport default function extend(scheduler) {\n\nscheduler.createDataProcessor = function(config) {\n\tvar router;\n\tvar tMode;\n\tif (config instanceof Function) {\n\t\trouter = config;\n\t} else if (config.hasOwnProperty(\"router\")) {\n\t\trouter = config.router;\n\t} else if(config.hasOwnProperty(\"event\")){\n\t\trouter = config;\n\t}\n\n\tif (router) {\n\t\ttMode = \"CUSTOM\";\n\t} else {\n\t\ttMode = config.mode || \"REST-JSON\";\n\t}\n\n\tvar dp = new DataProcessor(config.url);\n\tdp.init(scheduler);\n\tdp.setTransactionMode({\n\t\tmode: tMode,\n\t\trouter: router\n\t}, config.batchUpdate); // FIXME: config.batchUpdate where it is explained?\n\treturn dp;\n};\n\nscheduler.DataProcessor = DataProcessor;\n\n}\n\n//var dataProcessor = global.dataProcessor = DataProcessor; // for old","import utils from \"./utils/utils\";\nimport domHelpers from \"./utils/dom_helpers\";\n\n\nexport default function(scheduler) {\n\n\tvar boxAttribute = \"data-dhxbox\";\n\n\tvar _dhx_msg_cfg = null;\n\n\tfunction callback(config, result) {\n\t\tvar usercall = config.callback;\n\t\tmodalBox.hide(config.box);\n\n\t\t_dhx_msg_cfg = config.box = null;\n\tif (usercall)\n\t\t\tusercall(result);\n\t}\n\n\tfunction modal_key(event) {\n\t\tif (_dhx_msg_cfg) {\n\n\t\t\tvar code = event.which || event.keyCode;\n\t\t\tvar preventDefault = false;\n\n\t\t\tif (messageBox.keyboard) {\n\t\t\t\tif (code == 13 || code == 32) {\n\t\t\t\t\t// default behavior is to confirm/submit popup on space/enter\n\t\t\t\t\t// if browser focus is set on button element - do button click instead of default behavior\n\t\t\t\t\tvar target = event.target || event.srcElement;\n\t\t\t\t\tif (domHelpers.getClassName(target).indexOf(\"scheduler_popup_button\") > -1 && target.click) {\n\t\t\t\t\t\ttarget.click();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcallback(_dhx_msg_cfg, true);\n\t\t\t\t\t\tpreventDefault = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (code == 27) {\n\t\t\t\t\tcallback(_dhx_msg_cfg, false);\n\t\t\t\t\tpreventDefault = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (preventDefault) {\n\t\t\t\tif (event.preventDefault){\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t\treturn !(event.cancelBubble = true);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t}\n\n\tscheduler.event(document, \"keydown\", modal_key, true);\n\n\tfunction modality(mode) {\n\t\tif (!modality.cover) {\n\t\t\tmodality.cover = document.createElement(\"div\");\n\t\t\t//necessary for IE only\n\t\t\tscheduler.event(modality.cover, \"keydown\", modal_key);\n\t\t\tmodality.cover.className = \"dhx_modal_cover\";\n\t\t\tdocument.body.appendChild(modality.cover);\n\t\t}\n\n\t\tmodality.cover.style.display = mode ? \"inline-block\" : \"none\";\n\t}\n\n\tfunction button(text, classValue, result) {\n\t\tvar buttonAriaAttrs = scheduler._waiAria.messageButtonAttrString(text);\n\t\tvar name = (classValue || \"\").toLowerCase().replace(/ /g, \"_\");\n\t\tvar buttonCss = `scheduler_${name}_button dhtmlx_${name}_button`; \n\t\treturn `
${text}
`;\n\t}\n\n\tfunction info(text) {\n\t\tif (!messageBox.area) {\n\t\t\tmessageBox.area = document.createElement(\"div\");\n\t\t\tmessageBox.area.className = \"scheduler_message_area dhtmlx_message_area\";\n\t\t\tmessageBox.area.style[messageBox.position] = \"5px\";\n\t\t\tdocument.body.appendChild(messageBox.area);\n\t\t}\n\n\t\tmessageBox.hide(text.id);\n\t\tvar message = document.createElement(\"div\");\n\t\tmessage.innerHTML = \"
\" + text.text + \"
\";\n\t\tmessage.className = \"scheduler-info dhtmlx-info scheduler-\" + text.type + \" dhtmlx-\" + text.type;\n\t\tscheduler.event(message, \"click\",function () {\n\t\t\tmessageBox.hide(text.id);\n\t\t\ttext = null;\n\t\t});\n\n\t\tscheduler._waiAria.messageInfoAttr(message);\n\n\t\tif (messageBox.position == \"bottom\" && messageBox.area.firstChild)\n\t\t\tmessageBox.area.insertBefore(message, messageBox.area.firstChild);\n\t\telse\n\t\t\tmessageBox.area.appendChild(message);\n\n\t\tif (text.expire > 0)\n\t\t\tmessageBox.timers[text.id] = window.setTimeout(function () {\n\t\t\t\t// GS-1213: We need that when Scheduler is destroyed\n\t\t\t\tif (messageBox) messageBox.hide(text.id);\n\t\t\t}, text.expire);\n\n\t\tmessageBox.pull[text.id] = message;\n\t\tmessage = null;\n\n\t\treturn text.id;\n\t}\n\n\tfunction getFirstDefined() {\n\t\tvar values = [].slice.apply(arguments, [0]);\n\n\t\tfor (var i = 0; i < values.length; i++) {\n\t\t\tif (values[i]) {\n\t\t\t\treturn values[i];\n\t\t\t}\n\t\t}\n\n\t}\n\n\tfunction _boxStructure(config, ok, cancel) {\n\t\tvar box = document.createElement(\"div\");\n\n\t\tvar contentId = utils.uid();\n\t\tscheduler._waiAria.messageModalAttr(box, contentId);\n\n\n\t\tbox.className = \" scheduler_modal_box dhtmlx_modal_box scheduler-\" + config.type + \" dhtmlx-\" + config.type;\n\t\tbox.setAttribute(boxAttribute, 1);\n\n\t\tvar inner = '';\n\n\t\tif (config.width)\n\t\t\tbox.style.width = config.width;\n\t\tif (config.height)\n\t\t\tbox.style.height = config.height;\n\t\tif (config.title)\n\t\t\tinner += '
' + config.title + '
';\n\t\tinner += '
' + (config.content ? '' : config.text) + '
';\n\t\tif (ok)\n\t\t\tinner += button(getFirstDefined(config.ok, scheduler.locale.labels.message_ok, \"OK\"), \"ok\", true);\n\t\tif (cancel)\n\t\t\tinner += button(getFirstDefined(config.cancel, scheduler.locale.labels.message_cancel, \"Cancel\"), \"cancel\", false);\n\n\t\tif (config.buttons) {\n\t\t\tfor (var i = 0; i < config.buttons.length; i++) {\n\t\t\t\tvar btn = config.buttons[i];\n\t\t\t\tif (typeof btn == \"object\") {\n\t\t\t\t\t// Support { label:\"Save\", css:\"main_button\", value:\"save\" }\n\t\t\t\t\tvar label = btn.label;\n\t\t\t\t\tvar css = btn.css || (\"scheduler_\" + btn.label.toLowerCase() + \"_button dhtmlx_\" + btn.label.toLowerCase() + \"_button\");\n\t\t\t\t\tvar value = btn.value || i;\n\t\t\t\t\tinner += button(label, css, value);\n\t\t\t\t} else {\n\t\t\t\t\tinner += button(btn, btn, i);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tinner += '
';\n\t\tbox.innerHTML = inner;\n\n\t\tif (config.content) {\n\t\t\tvar node = config.content;\n\t\t\tif (typeof node == \"string\")\n\t\t\t\tnode = document.getElementById(node);\n\t\t\tif (node.style.display == 'none')\n\t\t\t\tnode.style.display = \"\";\n\t\t\tbox.childNodes[config.title ? 1 : 0].appendChild(node);\n\t\t}\n\n\t\tscheduler.event(box, \"click\", function (event) {\n\t\t\tvar source = event.target || event.srcElement;\n\t\t\tif (!source.className) source = source.parentNode;\n\t\t\tif (domHelpers.closest(source, \".scheduler_popup_button\")) {\n\t\t\t\tvar result = source.getAttribute(\"data-result\");\n\t\t\t\tresult = (result == \"true\") || (result == \"false\" ? false : result);\n\t\t\t\tcallback(config, result);\n\t\t\t}\n\t\t});\n\t\tconfig.box = box;\n\t\tif (ok || cancel)\n\t\t\t_dhx_msg_cfg = config;\n\n\t\treturn box;\n\t}\n\n\tfunction _createBox(config, ok, cancel) {\n\t\tvar box = config.tagName ? config : _boxStructure(config, ok, cancel);\n\n\t\tif (!config.hidden)\n\t\t\tmodality(true);\n\t\tdocument.body.appendChild(box);\n\t\tvar x = Math.abs(Math.floor(((window.innerWidth || document.documentElement.offsetWidth) - box.offsetWidth) / 2));\n\t\tvar y = Math.abs(Math.floor(((window.innerHeight || document.documentElement.offsetHeight) - box.offsetHeight) / 2));\n\t\tif (config.position == \"top\")\n\t\t\tbox.style.top = \"-3px\";\n\t\telse\n\t\t\tbox.style.top = y + 'px';\n\t\tbox.style.left = x + 'px';\n\t\t//necessary for IE only\n\t\tscheduler.event(box, \"keydown\", modal_key);\n\n\t\tmodalBox.focus(box);\n\n\t\tif (config.hidden)\n\t\t\tmodalBox.hide(box);\n\n\t\tscheduler.callEvent(\"onMessagePopup\", [box]);\n\t\treturn box;\n\t}\n\n\tfunction alertPopup(config) {\n\t\treturn _createBox(config, true, false);\n\t}\n\n\tfunction confirmPopup(config) {\n\t\treturn _createBox(config, true, true);\n\t}\n\n\tfunction boxPopup(config) {\n\t\treturn _createBox(config);\n\t}\n\n\tfunction box_params(text, type, callback) {\n\t\tif (typeof text != \"object\") {\n\t\t\tif (typeof type == \"function\") {\n\t\t\t\tcallback = type;\n\t\t\t\ttype = \"\";\n\t\t\t}\n\t\t\ttext = {text: text, type: type, callback: callback};\n\t\t}\n\t\treturn text;\n\t}\n\n\tfunction params(text, type, expire, id) {\n\t\tif (typeof text != \"object\")\n\t\t\ttext = {text: text, type: type, expire: expire, id: id};\n\t\ttext.id = text.id || utils.uid();\n\t\ttext.expire = text.expire || messageBox.expire;\n\t\treturn text;\n\t}\n\n\tvar alertBox = function () {\n\t\tvar text = box_params.apply(this, arguments);\n\t\ttext.type = text.type || \"confirm\";\n\t\treturn alertPopup(text);\n\t};\n\tvar confirmBox = function () {\n\t\tvar text = box_params.apply(this, arguments);\n\t\ttext.type = text.type || \"alert\";\n\t\treturn confirmPopup(text);\n\t};\n\tvar modalBox = function () {\n\t\tvar text = box_params.apply(this, arguments);\n\t\ttext.type = text.type || \"alert\";\n\t\treturn boxPopup(text);\n\t};\n\tmodalBox.hide = function (node) {\n\t\twhile (node && node.getAttribute && !node.getAttribute(boxAttribute))\n\t\t\tnode = node.parentNode;\n\t\tif (node) {\n\t\t\tnode.parentNode.removeChild(node);\n\t\t\tmodality(false);\n\n\t\t\tscheduler.callEvent(\"onAfterMessagePopup\", [node]);\n\t\t}\n\t};\n\n\tmodalBox.focus = function (node) {\n\t\tsetTimeout(function () {\n\t\t\tvar focusable = domHelpers.getFocusableNodes(node);\n\t\t\tif (focusable.length) {\n\t\t\t\tif (focusable[0].focus) focusable[0].focus();\n\t\t\t}\n\t\t}, 1);\n\t};\n\n\tvar messageBox = function (text, type, expire, id) {\n\t\ttext = params.apply(this, arguments);\n\t\ttext.type = text.type || \"info\";\n\n\t\tvar subtype = text.type.split(\"-\")[0];\n\t\tswitch (subtype) {\n\t\t\tcase \"alert\":\n\t\t\t\treturn alertPopup(text);\n\t\t\tcase \"confirm\":\n\t\t\t\treturn confirmPopup(text);\n\t\t\tcase \"modalbox\":\n\t\t\t\treturn boxPopup(text);\n\t\t\tdefault:\n\t\t\t\treturn info(text);\n\t\t}\n\t};\n\n\tmessageBox.seed = (new Date()).valueOf();\n\tmessageBox.uid = utils.uid;\n\tmessageBox.expire = 4000;\n\tmessageBox.keyboard = true;\n\tmessageBox.position = \"top\";\n\tmessageBox.pull = {};\n\tmessageBox.timers = {};\n\n\tmessageBox.hideAll = function () {\n\t\tfor (var key in messageBox.pull)\n\t\t\tmessageBox.hide(key);\n\t};\n\tmessageBox.hide = function (id) {\n\t\tvar obj = messageBox.pull[id];\n\t\tif (obj && obj.parentNode) {\n\t\t\twindow.setTimeout(function () {\n\t\t\t\tobj.parentNode.removeChild(obj);\n\t\t\t\tobj = null;\n\t\t\t}, 2000);\n\t\t\tobj.className += \" hidden\";\n\n\t\t\tif (messageBox.timers[id])\n\t\t\t\twindow.clearTimeout(messageBox.timers[id]);\n\t\t\tdelete messageBox.pull[id];\n\t\t}\n\t};\n\n\tvar popups = [];\n\tscheduler.attachEvent(\"onMessagePopup\", function(box){\n\t\tpopups.push(box);\n\t});\n\tscheduler.attachEvent(\"onAfterMessagePopup\", function(box){\n\t\tfor(var i = 0; i < popups.length; i++){\n\t\t\tif(popups[i] === box){\n\t\t\t\tpopups.splice(i, 1);\n\t\t\t\ti--;\n\t\t\t}\n\t\t}\n\t});\n\n\tscheduler.attachEvent(\"onDestroy\", function(){\n\t\tif(modality.cover && modality.cover.parentNode){\n\t\t\tmodality.cover.parentNode.removeChild(modality.cover);\n\t\t}\n\n\t\tfor(var i = 0; i < popups.length; i++){\n\t\t\tif(popups[i].parentNode){\n\t\t\t\tpopups[i].parentNode.removeChild(popups[i]);\n\t\t\t}\n\t\t}\n\t\tpopups = null;\n\n\t\tif(messageBox.area && messageBox.area.parentNode){\n\t\t\tmessageBox.area.parentNode.removeChild(messageBox.area);\n\t\t}\n\t\tmessageBox = null;\n\t});\n\n\treturn {\n\t\talert: alertBox,\n\t\tconfirm: confirmBox,\n\t\tmessage: messageBox,\n\t\tmodalbox: modalBox\n\t};\n}","export default {\n\tdate: {\n\t\tmonth_full: [\"كانون الثاني\", \"شباط\", \"آذار\", \"نيسان\", \"أيار\", \"حزيران\", \"تموز\", \"آب\", \"أيلول\", \"تشرين الأول\", \"تشرين الثاني\", \"كانون الأول\"],\n\t\tmonth_short: [\"يناير\", \"فبراير\", \"مارس\", \"أبريل\", \"مايو\", \"يونيو\", \"يوليو\", \"أغسطس\", \"سبتمبر\", \"أكتوبر\", \"نوفمبر\", \"ديسمبر\"],\n\t\tday_full: [\"الأحد\", \"الأثنين\", \"ألثلاثاء\", \"الأربعاء\", \"ألحميس\", \"ألجمعة\", \"السبت\"],\n\t\tday_short: [\"احد\", \"اثنين\", \"ثلاثاء\", \"اربعاء\", \"خميس\", \"جمعة\", \"سبت\"]\n\t},\n\tlabels: {\n\t\tdhx_cal_today_button: \"اليوم\",\n\t\tday_tab: \"يوم\",\n\t\tweek_tab: \"أسبوع\",\n\t\tmonth_tab: \"شهر\",\n\t\tnew_event: \"حدث جديد\",\n\t\ticon_save: \"اخزن\",\n\t\ticon_cancel: \"الغاء\",\n\t\ticon_details: \"تفاصيل\",\n\t\ticon_edit: \"تحرير\",\n\t\ticon_delete: \"حذف\",\n\t\tconfirm_closing: \"التغييرات سوف تضيع, هل انت متأكد؟\", //Your changes will be lost, are your sure ?\n\t\tconfirm_deleting: \"الحدث سيتم حذفها نهائيا ، هل أنت متأكد؟\",\n\t\tsection_description: \"الوصف\",\n\t\tsection_time: \"الفترة الزمنية\",\n\t\tfull_day: \"طوال اليوم\",\n\n\t\tconfirm_recurring: \"هل تريد تحرير مجموعة كاملة من الأحداث المتكررة؟\",\n\t\tsection_recurring: \"تكرار الحدث\",\n\t\tbutton_recurring: \"تعطيل\",\n\t\tbutton_recurring_open: \"تمكين\",\n\t\tbutton_edit_series: \"تحرير سلسلة\",\n\t\tbutton_edit_occurrence: \"تعديل نسخة\",\n\n\t\t/*grid view extension*/\n\t\tgrid_tab: \"جدول\",\n\n\t\t/* touch tooltip*/\n\t\tdrag_to_create:\"Drag to create\",\n\t\tdrag_to_move:\"Drag to move\",\n\n\t\t/* dhtmlx message default buttons */\n\t\tmessage_ok:\"OK\",\n\t\tmessage_cancel:\"Cancel\",\n\n\t\t/* wai aria labels for non-text controls */\n\t\tnext: \"Next\",\n\t\tprev: \"Previous\",\n\t\tyear: \"Year\",\n\t\tmonth: \"Month\",\n\t\tday: \"Day\",\n\t\thour:\"Hour\",\n\t\tminute: \"Minute\"\n\t}\n};\n\n\n","/*\n Translation by Sofya Morozova\n */\nexport default {\n\tdate: {\n\t\tmonth_full: [\"Студзень\", \"Люты\", \"Сакавік\", \"Красавік\", \"Maй\", \"Чэрвень\", \"Ліпень\", \"Жнівень\", \"Верасень\", \"Кастрычнік\", \"Лістапад\", \"Снежань\"],\n\t\tmonth_short: [\"Студз\", \"Лют\", \"Сак\", \"Крас\", \"Maй\", \"Чэр\", \"Ліп\", \"Жнів\", \"Вер\", \"Каст\", \"Ліст\", \"Снеж\"],\n\t\tday_full: [ \"Нядзеля\", \"Панядзелак\", \"Аўторак\", \"Серада\", \"Чацвер\", \"Пятніца\", \"Субота\"],\n\t\tday_short: [\"Нд\", \"Пн\", \"Аўт\", \"Ср\", \"Чцв\", \"Пт\", \"Сб\"]\n\t},\n\tlabels: {\n\t\tdhx_cal_today_button: \"Сёння\",\n\t\tday_tab: \"Дзень\",\n\t\tweek_tab: \"Тыдзень\",\n\t\tmonth_tab: \"Месяц\",\n\t\tnew_event: \"Новая падзея\",\n\t\ticon_save: \"Захаваць\",\n\t\ticon_cancel: \"Адмяніць\",\n\t\ticon_details: \"Дэталі\",\n\t\ticon_edit: \"Змяніць\",\n\t\ticon_delete: \"Выдаліць\",\n\t\tconfirm_closing: \"\", //Унесеныя змены будуць страчаны, працягнуць?\n\t\tconfirm_deleting: \"Падзея будзе выдалена незваротна, працягнуць?\",\n\t\tsection_description: \"Апісанне\",\n\t\tsection_time: \"Перыяд часу\",\n\t\tfull_day: \"Увесь дзень\",\n\n\t\tconfirm_recurring: \"Вы хочаце змяніць усю серыю паўтаральных падзей?\",\n\t\tsection_recurring: \"Паўтарэнне\",\n\t\tbutton_recurring: \"Адключана\",\n\t\tbutton_recurring_open: \"Уключана\",\n\t\tbutton_edit_series: \"Рэдагаваць серыю\",\n\t\tbutton_edit_occurrence: \"Рэдагаваць асобнік\",\n\n\t\t/*agenda view extension*/\n\t\tagenda_tab: \"Спіс\",\n\t\tdate: \"Дата\",\n\t\tdescription: \"Апісанне\",\n\n\t\t/*year view extension*/\n\t\tyear_tab: \"Год\",\n\n\t\t/*week agenda view extension*/\n\t\tweek_agenda_tab: \"Спіс\",\n\n\t\t/*grid view extension*/\n\t\tgrid_tab: \"Спic\",\n\n\t\t/* touch tooltip*/\n\t\tdrag_to_create:\"Drag to create\",\n\t\tdrag_to_move:\"Drag to move\",\n\n\t\t/* dhtmlx message default buttons */\n\t\tmessage_ok:\"OK\",\n\t\tmessage_cancel:\"Cancel\",\n\n\t\t/* wai aria labels for non-text controls */\n\t\tnext: \"Next\",\n\t\tprev: \"Previous\",\n\t\tyear: \"Year\",\n\t\tmonth: \"Month\",\n\t\tday: \"Day\",\n\t\thour:\"Hour\",\n\t\tminute: \"Minute\",\n\n\t\t/* recurring event components */\n\t\trepeat_radio_day: \"Дзень\",\n\t\trepeat_radio_week: \"Тыдзень\",\n\t\trepeat_radio_month: \"Месяц\",\n\t\trepeat_radio_year: \"Год\",\n\t\trepeat_radio_day_type: \"Кожны\",\n\t\trepeat_text_day_count: \"дзень\",\n\t\trepeat_radio_day_type2: \"Кожны працоўны дзень\",\n\t\trepeat_week: \" Паўтараць кожны\",\n\t\trepeat_text_week_count: \"тыдзень\",\n\t\trepeat_radio_month_type: \"Паўтараць\",\n\t\trepeat_radio_month_start: \"\",\n\t\trepeat_text_month_day: \" чысла кожнага\",\n\t\trepeat_text_month_count: \"месяцу\",\n\t\trepeat_text_month_count2_before: \"кожны \",\n\t\trepeat_text_month_count2_after: \"месяц\",\n\t\trepeat_year_label: \"\",\n\t\tselect_year_day2: \"\",\n\t\trepeat_text_year_day: \"дзень\",\n\t\tselect_year_month: \"\",\n\t\trepeat_radio_end: \"Без даты заканчэння\",\n\t\trepeat_text_occurences_count: \"паўтораў\",\n\t\trepeat_radio_end2: \"\",\n\t\trepeat_radio_end3: \"Да \",\n\t\tmonth_for_recurring: [\"Студзеня\", \"Лютага\", \"Сакавіка\", \"Красавіка\", \"Мая\", \"Чэрвеня\", \"Ліпeня\", \"Жніўня\", \"Верасня\", \"Кастрычніка\", \"Лістапада\", \"Снежня\"],\n\t\tday_for_recurring: [\"Нядзелю\", \"Панядзелак\", \"Аўторак\", \"Сераду\", \"Чацвер\", \"Пятніцу\", \"Суботу\"]\n\t}\n};\n","/*\n @Traducido por Vicente Adria Bohigues - vicenteadria@hotmail.com\n */\nexport default {\n\tdate: {\n\t\tmonth_full: [\"Gener\", \"Febrer\", \"Març\", \"Abril\", \"Maig\", \"Juny\", \"Juliol\", \"Agost\", \"Setembre\", \"Octubre\", \"Novembre\", \"Desembre\"],\n\t\tmonth_short: [\"Gen\", \"Feb\", \"Mar\", \"Abr\", \"Mai\", \"Jun\", \"Jul\", \"Ago\", \"Set\", \"Oct\", \"Nov\", \"Des\"],\n\t\tday_full: [\"Diumenge\", \"Dilluns\", \"Dimarts\", \"Dimecres\", \"Dijous\", \"Divendres\", \"Dissabte\"],\n\t\tday_short: [\"Dg\", \"Dl\", \"Dm\", \"Dc\", \"Dj\", \"Dv\", \"Ds\"]\n\t},\n\tlabels: {\n\t\tdhx_cal_today_button: \"Hui\",\n\t\tday_tab: \"Dia\",\n\t\tweek_tab: \"Setmana\",\n\t\tmonth_tab: \"Mes\",\n\t\tnew_event: \"Nou esdeveniment\",\n\t\ticon_save: \"Guardar\",\n\t\ticon_cancel: \"Cancel·lar\",\n\t\ticon_details: \"Detalls\",\n\t\ticon_edit: \"Editar\",\n\t\ticon_delete: \"Esborrar\",\n\t\tconfirm_closing: \"\", //\"Els seus canvis es perdràn, continuar ?\"\n\t\tconfirm_deleting: \"L'esdeveniment s'esborrarà definitivament, continuar ?\",\n\t\tsection_description: \"Descripció\",\n\t\tsection_time: \"Periode de temps\",\n\t\tfull_day: \"Tot el dia\",\n\n\t\tconfirm_recurring: \"¿Desitja modificar el conjunt d'esdeveniments repetits?\",\n\t\tsection_recurring: \"Repeteixca l'esdeveniment\",\n\t\tbutton_recurring: \"Impedit\",\n\t\tbutton_recurring_open: \"Permés\",\n\t\tbutton_edit_series: \"Edit sèrie\",\n\t\tbutton_edit_occurrence: \"Edita Instància\",\n\n\t\t/*agenda view extension*/\n\t\tagenda_tab: \"Agenda\",\n\t\tdate: \"Data\",\n\t\tdescription: \"Descripció\",\n\n\t\t/*year view extension*/\n\t\tyear_tab: \"Any\",\n\n\t\t/*week agenda view extension*/\n\t\tweek_agenda_tab: \"Agenda\",\n\n\t\t/*grid view extension*/\n\t\tgrid_tab: \"Taula\",\n\n\t\t/* touch tooltip*/\n\t\tdrag_to_create:\"Drag to create\",\n\t\tdrag_to_move:\"Drag to move\",\n\n\t\t/* dhtmlx message default buttons */\n\t\tmessage_ok:\"OK\",\n\t\tmessage_cancel:\"Cancel\",\n\n\t\t/* wai aria labels for non-text controls */\n\t\tnext: \"Next\",\n\t\tprev: \"Previous\",\n\t\tyear: \"Year\",\n\t\tmonth: \"Month\",\n\t\tday: \"Day\",\n\t\thour:\"Hour\",\n\t\tminute: \"Minute\"\n\t}\n};","/*\nTranslation by FreezeSoul\n*/\n//scheduler.config.day_date=\"%M %d日 %D\";\n//scheduler.config.default_date=\"%Y年 %M %d日\";\n//scheduler.config.month_date=\"%Y年 %M\";\n\nexport default {\n\tdate: {\n\t\tmonth_full: [\"一月\", \"二月\", \"三月\", \"四月\", \"五月\", \"六月\", \"七月\", \"八月\", \"九月\", \"十月\", \"十一月\", \"十二月\"],\n\t\tmonth_short: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\n\t\tday_full: [\"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\"],\n\t\tday_short: [\"日\", \"一\", \"二\", \"三\", \"四\", \"五\", \"六\"]\n\t},\n\tlabels: {\n\t\tdhx_cal_today_button: \"今天\",\n\t\tday_tab: \"日\",\n\t\tweek_tab: \"周\",\n\t\tmonth_tab: \"月\",\n\t\tnew_event: \"新建日程\",\n\t\ticon_save: \"保存\",\n\t\ticon_cancel: \"关闭\",\n\t\ticon_details: \"详细\",\n\t\ticon_edit: \"编辑\",\n\t\ticon_delete: \"删除\",\n\t\tconfirm_closing: \"请确认是否撤销修改!\", //Your changes will be lost, are your sure?\n\t\tconfirm_deleting: \"是否删除日程?\",\n\t\tsection_description: \"描述\",\n\t\tsection_time: \"时间范围\",\n\t\tfull_day: \"整天\",\n\n\t\tconfirm_recurring:\"请确认是否将日程设为重复模式?\",\n\t\tsection_recurring:\"重复周期\",\n\t\tbutton_recurring:\"禁用\",\n\t\tbutton_recurring_open:\"启用\",\n\t\tbutton_edit_series: \"编辑系列\",\n\t\tbutton_edit_occurrence: \"编辑实例\",\n\t\t\n\t\t/*agenda view extension*/\n\t\tagenda_tab:\"议程\",\n\t\tdate:\"日期\",\n\t\tdescription:\"说明\",\n\t\t\n\t\t/*year view extension*/\n\t\tyear_tab:\"今年\",\n\n\t\t/*week agenda view extension*/\n\t\tweek_agenda_tab: \"议程\",\n\n\t\t/*grid view extension*/\n\t\tgrid_tab:\"电网\",\n\n\t\t/* touch tooltip*/\n\t\tdrag_to_create:\"Drag to create\",\n\t\tdrag_to_move:\"Drag to move\",\n\n\t\t/* dhtmlx message default buttons */\n\t\tmessage_ok:\"OK\",\n\t\tmessage_cancel:\"Cancel\",\n\n\t\t/* wai aria labels for non-text controls */\n\t\tnext: \"Next\",\n\t\tprev: \"Previous\",\n\t\tyear: \"Year\",\n\t\tmonth: \"Month\",\n\t\tday: \"Day\",\n\t\thour:\"Hour\",\n\t\tminute: \"Minute\",\n\n\t\t/* recurring event components */\n\t\trepeat_radio_day: \"按天\",\n\t\trepeat_radio_week: \"按周\",\n\t\trepeat_radio_month: \"按月\",\n\t\trepeat_radio_year: \"按年\",\n\t\trepeat_radio_day_type: \"每\",\n\t\trepeat_text_day_count: \"天\",\n\t\trepeat_radio_day_type2: \"每个工作日\",\n\t\trepeat_week: \" 重复 每\",\n\t\trepeat_text_week_count: \"星期的:\",\n\t\trepeat_radio_month_type: \"重复\",\n\t\trepeat_radio_month_start: \"在\",\n\t\trepeat_text_month_day: \"日 每\",\n\t\trepeat_text_month_count: \"月\",\n\t\trepeat_text_month_count2_before: \"每\",\n\t\trepeat_text_month_count2_after: \"月\",\n\t\trepeat_year_label: \"在\",\n\t\tselect_year_day2: \"的\",\n\t\trepeat_text_year_day: \"日\",\n\t\tselect_year_month: \"月\",\n\t\trepeat_radio_end: \"无结束日期\",\n\t\trepeat_text_occurences_count: \"次结束\",\n\t\trepeat_radio_end2: \"重复\",\n\t\trepeat_radio_end3: \"结束于\",\n\t\tmonth_for_recurring: [\"一月\", \"二月\", \"三月\", \"四月\", \"五月\", \"六月\", \"七月\", \"八月\", \"九月\", \"十月\", \"十一月\", \"十二月\"],\n\t\tday_for_recurring: [\"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\"]\n\t}\n};\n\n","export default {\n\tdate: {\n\t\tmonth_full: [\"Leden\", \"Únor\", \"Březen\", \"Duben\", \"Květen\", \"Červen\", \"Červenec\", \"Srpen\", \"Září\", \"Říjen\", \"Listopad\", \"Prosinec\"],\n\t\tmonth_short: [\"Led\", \"Ún\", \"Bře\", \"Dub\", \"Kvě\", \"Čer\", \"Čec\", \"Srp\", \"Září\", \"Říj\", \"List\", \"Pro\"],\n\t\tday_full: [\"Neděle\", \"Pondělí\", \"Úterý\", \"Středa\", \"Čtvrtek\", \"Pátek\", \"Sobota\"],\n\t\tday_short: [\"Ne\", \"Po\", \"Út\", \"St\", \"Čt\", \"Pá\", \"So\"]\n\t},\n\tlabels: {\n\t\tdhx_cal_today_button: \"Dnes\",\n\t\tday_tab: \"Den\",\n\t\tweek_tab: \"Týden\",\n\t\tmonth_tab: \"Měsíc\",\n\t\tnew_event: \"Nová událost\",\n\t\ticon_save: \"Uložit\",\n\t\ticon_cancel: \"Zpět\",\n\t\ticon_details: \"Detail\",\n\t\ticon_edit: \"Edituj\",\n\t\ticon_delete: \"Smazat\",\n\t\tconfirm_closing: \"\", //Vaše změny budou ztraceny, opravdu ?\n\t\tconfirm_deleting: \"Událost bude trvale smazána, opravdu?\",\n\t\tsection_description: \"Poznámky\",\n\t\tsection_time: \"Doba platnosti\",\n\n\t\t/*recurring events*/\n\t\tconfirm_recurring: \"Přejete si upravit celou řadu opakovaných událostí?\",\n\t\tsection_recurring: \"Opakování události\",\n\t\tbutton_recurring: \"Vypnuto\",\n\t\tbutton_recurring_open: \"Zapnuto\",\n\t\tbutton_edit_series: \"Edit series\",\n\t\tbutton_edit_occurrence: \"Upravit instance\",\n\n\t\t/*agenda view extension*/\n\t\tagenda_tab: \"Program\",\n\t\tdate: \"Datum\",\n\t\tdescription: \"Poznámka\",\n\n\t\t/*year view extension*/\n\t\tyear_tab: \"Rok\",\n\t\tfull_day: \"Full day\",\n\n\t\t/*week agenda view extension*/\n\t\tweek_agenda_tab: \"Program\",\n\n\t\t/*grid view extension*/\n\t\tgrid_tab: \"Mřížka\",\n\n\t\t/* touch tooltip*/\n\t\tdrag_to_create:\"Drag to create\",\n\t\tdrag_to_move:\"Drag to move\",\n\n\t\t/* dhtmlx message default buttons */\n\t\tmessage_ok:\"OK\",\n\t\tmessage_cancel:\"Cancel\",\n\n\t\t/* wai aria labels for non-text controls */\n\t\tnext: \"Next\",\n\t\tprev: \"Previous\",\n\t\tyear: \"Year\",\n\t\tmonth: \"Month\",\n\t\tday: \"Day\",\n\t\thour:\"Hour\",\n\t\tminute: \"Minute\",\n\n\t\t/* recurring event components */\n\t\trepeat_radio_day: \"Denně\",\n\t\trepeat_radio_week: \"Týdně\",\n\t\trepeat_radio_month: \"Měsíčně\",\n\t\trepeat_radio_year: \"Ročně\",\n\t\trepeat_radio_day_type: \"každý\",\n\t\trepeat_text_day_count: \"Den\",\n\t\trepeat_radio_day_type2: \"pracovní dny\",\n\t\trepeat_week: \"Opakuje každých\",\n\t\trepeat_text_week_count: \"Týdnů na:\",\n\t\trepeat_radio_month_type: \"u každého\",\n\t\trepeat_radio_month_start: \"na\",\n\t\trepeat_text_month_day: \"Den každého\",\n\t\trepeat_text_month_count: \"Měsíc\",\n\t\trepeat_text_month_count2_before: \"každý\",\n\t\trepeat_text_month_count2_after: \"Měsíc\",\n\t\trepeat_year_label: \"na\",\n\t\tselect_year_day2: \"v\",\n\t\trepeat_text_year_day: \"Den v\",\n\t\tselect_year_month: \"\",\n\t\trepeat_radio_end: \"bez data ukončení\",\n\t\trepeat_text_occurences_count: \"Události\",\n\t\trepeat_radio_end2: \"po\",\n\t\trepeat_radio_end3: \"Konec\",\n\t\tmonth_for_recurring: [\"Leden\", \"Únor\", \"Březen\", \"Duben\", \"Květen\", \"Červen\", \"Červenec\", \"Srpen\", \"Září\", \"Říjen\", \"Listopad\", \"Prosinec\"],\n\t\tday_for_recurring: [\"Neděle \", \"Pondělí\", \"Úterý\", \"Středa\", \"Čtvrtek\", \"Pátek\", \"Sobota\"]\n\t}\n};\n\n","export default {\n\tdate: {\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Marts\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"December\"],\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\n\t\tday_short: [\"Søn\", \"Man\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\n\t},\n\tlabels: {\n\t\tdhx_cal_today_button: \"Idag\",\n\t\tday_tab: \"Dag\",\n\t\tweek_tab: \"Uge\",\n\t\tmonth_tab: \"Måned\",\n\t\tnew_event: \"Ny begivenhed\",\n\t\ticon_save: \"Gem\",\n\t\ticon_cancel: \"Fortryd\",\n\t\ticon_details: \"Detaljer\",\n\t\ticon_edit: \"Tilret\",\n\t\ticon_delete: \"Slet\",\n\t\tconfirm_closing: \"Dine rettelser vil gå tabt.. Er dy sikker?\", //Your changes will be lost, are your sure ?\n\t\tconfirm_deleting: \"Bigivenheden vil blive slettet permanent. Er du sikker?\",\n\t\tsection_description: \"Beskrivelse\",\n\t\tsection_time: \"Tidsperiode\",\n\n\t\t/*recurring events*/\n\t\tconfirm_recurring: \"Vil du tilrette hele serien af gentagne begivenheder?\",\n\t\tsection_recurring: \"Gentag begivenhed\",\n\t\tbutton_recurring: \"Frakoblet\",\n\t\tbutton_recurring_open: \"Tilkoblet\",\n\t\tbutton_edit_series: \"Rediger serien\",\n\t\tbutton_edit_occurrence: \"Rediger en kopi\",\n\n\t\t/*agenda view extension*/\n\t\tagenda_tab: \"Dagsorden\",\n\t\tdate: \"Dato\",\n\t\tdescription: \"Beskrivelse\",\n\n\t\t/*year view extension*/\n\t\tyear_tab: \"År\",\n\n\t\t/*week agenda view extension*/\n\t\tweek_agenda_tab: \"Dagsorden\",\n\n\t\t/*grid view extension*/\n\t\tgrid_tab: \"Grid\",\n\n\t\t/* touch tooltip*/\n\t\tdrag_to_create:\"Drag to create\",\n\t\tdrag_to_move:\"Drag to move\",\n\n\t\t/* dhtmlx message default buttons */\n\t\tmessage_ok:\"OK\",\n\t\tmessage_cancel:\"Cancel\",\n\n\t\t/* wai aria labels for non-text controls */\n\t\tnext: \"Next\",\n\t\tprev: \"Previous\",\n\t\tyear: \"Year\",\n\t\tmonth: \"Month\",\n\t\tday: \"Day\",\n\t\thour:\"Hour\",\n\t\tminute: \"Minute\",\n\n\t\t/* recurring event components */\n\t\trepeat_radio_day: \"Daglig\",\n\t\trepeat_radio_week: \"Ugenlig\",\n\t\trepeat_radio_month: \"Månedlig\",\n\t\trepeat_radio_year: \"Årlig\",\n\t\trepeat_radio_day_type: \"Hver\",\n\t\trepeat_text_day_count: \"dag\",\n\t\trepeat_radio_day_type2: \"På hver arbejdsdag\",\n\t\trepeat_week: \" Gentager sig hver\",\n\t\trepeat_text_week_count: \"uge på følgende dage:\",\n\t\trepeat_radio_month_type: \"Hver den\",\n\t\trepeat_radio_month_start: \"Den\",\n\t\trepeat_text_month_day: \" i hver\",\n\t\trepeat_text_month_count: \"måned\",\n\t\trepeat_text_month_count2_before: \"hver\",\n\t\trepeat_text_month_count2_after: \"måned\",\n\t\trepeat_year_label: \"Den\",\n\t\tselect_year_day2: \"i\",\n\t\trepeat_text_year_day: \"dag i\",\n\t\tselect_year_month: \"\",\n\t\trepeat_radio_end: \"Ingen slutdato\",\n\t\trepeat_text_occurences_count: \"gentagelse\",\n\t\trepeat_radio_end2: \"Efter\",\n\t\trepeat_radio_end3: \"Slut\",\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"März\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Dezember\"],\n\t\tday_for_recurring: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"]\n\t}\n};\n\n","export default {\n\tdate: {\n\t\tmonth_full: [\" Januar\", \" Februar\", \" März \", \" April\", \" Mai\", \" Juni\", \" Juli\", \" August\", \" September \", \" Oktober\", \" November \", \" Dezember\"],\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mär\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dez\"],\n\t\tday_full: [ \"Sonntag\", \"Montag\", \"Dienstag\", \" Mittwoch\", \" Donnerstag\", \"Freitag\", \"Samstag\"],\n\t\tday_short: [\"So\", \"Mo\", \"Di\", \"Mi\", \"Do\", \"Fr\", \"Sa\"]\n\t},\n\tlabels: {\n\t\tdhx_cal_today_button: \"Heute\",\n\t\tday_tab: \"Tag\",\n\t\tweek_tab: \"Woche\",\n\t\tmonth_tab: \"Monat\",\n\t\tnew_event: \"neuer Eintrag\",\n\t\ticon_save: \"Speichern\",\n\t\ticon_cancel: \"Abbrechen\",\n\t\ticon_details: \"Details\",\n\t\ticon_edit: \"Ändern\",\n\t\ticon_delete: \"Löschen\",\n\t\tconfirm_closing: \"\", //\"Ihre Veränderungen werden verloren sein, wollen Sie ergänzen? \"\n\t\tconfirm_deleting: \"Der Eintrag wird gelöscht\",\n\t\tsection_description: \"Beschreibung\",\n\t\tsection_time: \"Zeitspanne\",\n\t\tfull_day: \"Ganzer Tag\",\n\n\t\tconfirm_recurring: \"Wollen Sie alle Einträge bearbeiten oder nur diesen einzelnen Eintrag?\",\n\t\tsection_recurring: \"Wiederholung\",\n\t\tbutton_recurring: \"Aus\",\n\t\tbutton_recurring_open: \"An\",\n\t\tbutton_edit_series: \"Bearbeiten Sie die Serie\",\n\t\tbutton_edit_occurrence: \"Bearbeiten Sie eine Kopie\",\n\n\t\t/*agenda view extension*/\n\t\tagenda_tab: \"Agenda\",\n\t\tdate: \"Datum\",\n\t\tdescription: \"Beschreibung\",\n\n\t\t/*year view extension*/\n\t\tyear_tab: \"Jahre\",\n\n\t\t/*week agenda view extension*/\n\t\tweek_agenda_tab: \"Agenda\",\n\n\t\t/*grid view extension*/\n\t\tgrid_tab: \"Grid\",\n\n\t\t/* touch tooltip*/\n\t\tdrag_to_create:\"Drag to create\",\n\t\tdrag_to_move:\"Drag to move\",\n\n\t\t/* dhtmlx message default buttons */\n\t\tmessage_ok:\"OK\",\n\t\tmessage_cancel:\"Cancel\",\n\n\t\t/* wai aria labels for non-text controls */\n\t\tnext: \"Next\",\n\t\tprev: \"Previous\",\n\t\tyear: \"Year\",\n\t\tmonth: \"Month\",\n\t\tday: \"Day\",\n\t\thour:\"Hour\",\n\t\tminute: \"Minute\",\n\n\t\t/* recurring event components */\n\t\trepeat_radio_day: \"Täglich\",\n\t\trepeat_radio_week: \"Wöchentlich\",\n\t\trepeat_radio_month: \"Monatlich\",\n\t\trepeat_radio_year: \"Jährlich\",\n\t\trepeat_radio_day_type: \"jeden\",\n\t\trepeat_text_day_count: \"Tag\",\n\t\trepeat_radio_day_type2: \"an jedem Arbeitstag\",\n\t\trepeat_week: \" Wiederholt sich jede\",\n\t\trepeat_text_week_count: \"Woche am:\",\n\t\trepeat_radio_month_type: \"an jedem\",\n\t\trepeat_radio_month_start: \"am\",\n\t\trepeat_text_month_day: \"Tag eines jeden\",\n\t\trepeat_text_month_count: \"Monats\",\n\t\trepeat_text_month_count2_before: \"jeden\",\n\t\trepeat_text_month_count2_after: \"Monats\",\n\t\trepeat_year_label: \"am\",\n\t\tselect_year_day2: \"im\",\n\t\trepeat_text_year_day: \"Tag im\",\n\t\tselect_year_month: \"\",\n\t\trepeat_radio_end: \"kein Enddatum\",\n\t\trepeat_text_occurences_count: \"Ereignissen\",\n\t\trepeat_radio_end3: \"Schluß\",\n\t\trepeat_radio_end2: \"nach\",\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"März\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Dezember\"],\n\t\tday_for_recurring: [\"Sonntag\", \"Montag\", \"Dienstag\", \"Mittwoch\", \"Donnerstag\", \"Freitag\", \"Samstag\"]\n\t}\n};\n\n","export default {\n\tdate: {\n\t\tmonth_full: [\"Ιανουάριος\", \"Φεβρουάριος\", \"Μάρτιος\", \"Απρίλιος\", \"Μάϊος\", \"Ιούνιος\", \"Ιούλιος\", \"Αύγουστος\", \"Σεπτέμβριος\", \"Οκτώβριος\", \"Νοέμβριος\", \"Δεκέμβριος\"],\n\t\tmonth_short: [\"ΙΑΝ\", \"ΦΕΒ\", \"ΜΑΡ\", \"ΑΠΡ\", \"ΜΑΙ\", \"ΙΟΥΝ\", \"ΙΟΥΛ\", \"ΑΥΓ\", \"ΣΕΠ\", \"ΟΚΤ\", \"ΝΟΕ\", \"ΔΕΚ\"],\n\t\tday_full: [\"Κυριακή\", \"Δευτέρα\", \"Τρίτη\", \"Τετάρτη\", \"Πέμπτη\", \"Παρασκευή\", \"Σάββατο\"],\n\t\tday_short: [\"ΚΥ\", \"ΔΕ\", \"ΤΡ\", \"ΤΕ\", \"ΠΕ\", \"ΠΑ\", \"ΣΑ\"]\n\t},\n\tlabels: {\n\t\tdhx_cal_today_button: \"Σήμερα\",\n\t\tday_tab: \"Ημέρα\",\n\t\tweek_tab: \"Εβδομάδα\",\n\t\tmonth_tab: \"Μήνας\",\n\t\tnew_event: \"Νέο έργο\",\n\t\ticon_save: \"Αποθήκευση\",\n\t\ticon_cancel: \"Άκυρο\",\n\t\ticon_details: \"Λεπτομέρειες\",\n\t\ticon_edit: \"Επεξεργασία\",\n\t\ticon_delete: \"Διαγραφή\",\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\n\t\tconfirm_deleting: \"Το έργο θα διαγραφεί οριστικά. Θέλετε να συνεχίσετε;\",\n\t\tsection_description: \"Περιγραφή\",\n\t\tsection_time: \"Χρονική περίοδος\",\n\t\tfull_day: \"Πλήρης Ημέρα\",\n\n\t\t/*recurring events*/\n\t\tconfirm_recurring: \"Θέλετε να επεξεργασθείτε ολόκληρη την ομάδα των επαναλαμβανόμενων έργων;\",\n\t\tsection_recurring: \"Επαναλαμβανόμενο έργο\",\n\t\tbutton_recurring: \"Ανενεργό\",\n\t\tbutton_recurring_open: \"Ενεργό\",\n\t\tbutton_edit_series: \"Επεξεργαστείτε τη σειρά\",\n\t\tbutton_edit_occurrence: \"Επεξεργασία ένα αντίγραφο\",\n\n\t\t/*agenda view extension*/\n\t\tagenda_tab: \"Ημερήσια Διάταξη\",\n\t\tdate: \"Ημερομηνία\",\n\t\tdescription: \"Περιγραφή\",\n\n\t\t/*year view extension*/\n\t\tyear_tab: \"Έτος\",\n\n\t\t/*week agenda view extension*/\n\t\tweek_agenda_tab: \"Ημερήσια Διάταξη\",\n\n\t\t/*grid view extension*/\n\t\tgrid_tab: \"Πλέγμα\",\n\n\t\t/* touch tooltip*/\n\t\tdrag_to_create:\"Drag to create\",\n\t\tdrag_to_move:\"Drag to move\",\n\n\t\t/* dhtmlx message default buttons */\n\t\tmessage_ok:\"OK\",\n\t\tmessage_cancel:\"Cancel\",\n\n\t\t/* wai aria labels for non-text controls */\n\t\tnext: \"Next\",\n\t\tprev: \"Previous\",\n\t\tyear: \"Year\",\n\t\tmonth: \"Month\",\n\t\tday: \"Day\",\n\t\thour:\"Hour\",\n\t\tminute: \"Minute\",\n\n\t\t/* recurring event components */\n\t\trepeat_radio_day: \"Ημερησίως\",\n\t\trepeat_radio_week: \"Εβδομαδιαίως\",\n\t\trepeat_radio_month: \"Μηνιαίως\",\n\t\trepeat_radio_year: \"Ετησίως\",\n\t\trepeat_radio_day_type: \"Κάθε\",\n\t\trepeat_text_day_count: \"ημέρα\",\n\t\trepeat_radio_day_type2: \"Κάθε εργάσιμη\",\n\t\trepeat_week: \" Επανάληψη κάθε\",\n\t\trepeat_text_week_count: \"εβδομάδα τις επόμενες ημέρες:\",\n\t\trepeat_radio_month_type: \"Επανάληψη\",\n\t\trepeat_radio_month_start: \"Την\",\n\t\trepeat_text_month_day: \"ημέρα κάθε\",\n\t\trepeat_text_month_count: \"μήνα\",\n\t\trepeat_text_month_count2_before: \"κάθε\",\n\t\trepeat_text_month_count2_after: \"μήνα\",\n\t\trepeat_year_label: \"Την\",\n\t\tselect_year_day2: \"του\",\n\t\trepeat_text_year_day: \"ημέρα\",\n\t\tselect_year_month: \"μήνα\",\n\t\trepeat_radio_end: \"Χωρίς ημερομηνία λήξεως\",\n\t\trepeat_text_occurences_count: \"επαναλήψεις\",\n\t\trepeat_radio_end3: \"Λήγει την\",\n\t\trepeat_radio_end2: \"Μετά από\",\n\t\tmonth_for_recurring: [\"Ιανουάριος\", \"Φεβρουάριος\", \"Μάρτιος\", \"Απρίλιος\", \"Μάϊος\", \"Ιούνιος\", \"Ιούλιος\", \"Αύγουστος\", \"Σεπτέμβριος\", \"Οκτώβριος\", \"Νοέμβριος\", \"Δεκέμβριος\"],\n\t\tday_for_recurring: [\"Κυριακή\", \"Δευτέρα\", \"Τρίτη\", \"Τετάρτη\", \"Πέμπτη\", \"Παρασκευή\", \"Σάββατο\"]\n\t}\n};\n\n","export default {\n\tdate:{\n\t\tmonth_full:[\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n\t\tmonth_short:[\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\n\t\tday_full:[\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n\t\tday_short:[\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"]\n\t},\n\tlabels:{\n\t\tdhx_cal_today_button:\"Today\",\n\t\tday_tab:\"Day\",\n\t\tweek_tab:\"Week\",\n\t\tmonth_tab:\"Month\",\n\t\tnew_event:\"New event\",\n\t\ticon_save:\"Save\",\n\t\ticon_cancel:\"Cancel\",\n\t\ticon_details:\"Details\",\n\t\ticon_edit:\"Edit\",\n\t\ticon_delete:\"Delete\",\n\t\tconfirm_closing:\"\",//Your changes will be lost, are your sure ?\n\t\tconfirm_deleting:\"Event will be deleted permanently, are you sure?\",\n\t\tsection_description:\"Description\",\n\t\tsection_time:\"Time period\",\n\t\tfull_day:\"Full day\",\n\n\t\t/*recurring events*/\n\t\tconfirm_recurring:\"Do you want to edit the whole set of repeated events?\",\n\t\tsection_recurring:\"Repeat event\",\n\t\tbutton_recurring:\"Disabled\",\n\t\tbutton_recurring_open:\"Enabled\",\n\t\tbutton_edit_series: \"Edit series\",\n\t\tbutton_edit_occurrence: \"Edit occurrence\",\n\n\t\t/*agenda view extension*/\n\t\tagenda_tab:\"Agenda\",\n\t\tdate:\"Date\",\n\t\tdescription:\"Description\",\n\n\t\t/*year view extension*/\n\t\tyear_tab:\"Year\",\n\n\t\t/* week agenda extension */\n\t\tweek_agenda_tab: \"Agenda\",\n\n\t\t/*grid view extension*/\n\t\tgrid_tab: \"Grid\",\n\n\t\t/* touch tooltip*/\n\t\tdrag_to_create:\"Drag to create\",\n\t\tdrag_to_move:\"Drag to move\",\n\n\t\t/* dhtmlx message default buttons */\n\t\tmessage_ok:\"OK\",\n\t\tmessage_cancel:\"Cancel\",\n\n\t\t/* wai aria labels for non-text controls */\n\t\tnext: \"Next\",\n\t\tprev: \"Previous\",\n\t\tyear: \"Year\",\n\t\tmonth: \"Month\",\n\t\tday: \"Day\",\n\t\thour:\"Hour\",\n\t\tminute: \"Minute\",\n\n\t\t/* recurring event components */\n\t\trepeat_radio_day: \"Daily\",//name=\"repeat\" value=\"day\"\n\t\trepeat_radio_week: \"Weekly\",//name=\"repeat\" value=\"week\n\t\trepeat_radio_month: \"Monthly\",\n\t\trepeat_radio_year: \"Yearly\",\n\t\trepeat_radio_day_type: \"Every\",\n\t\trepeat_text_day_count: \"day\",\n\t\trepeat_radio_day_type2: \"Every workday\",\n\t\trepeat_week: \" Repeat every\",\n\t\trepeat_text_week_count: \"week next days:\",\n\t\trepeat_radio_month_type: \"Repeat\",\n\t\trepeat_radio_month_start: \"On\",\n\t\trepeat_text_month_day: \"day every\",\n\t\trepeat_text_month_count: \"month\",\n\t\trepeat_text_month_count2_before: \"every\",\n\t\trepeat_text_month_count2_after: \"month\",\n\t\trepeat_year_label: \"On\",\n\t\tselect_year_day2: \"of\",\n\t\trepeat_text_year_day: \"day\",\n\t\tselect_year_month: \"month\",\n\t\trepeat_radio_end: \"No end date\",\n\t\trepeat_text_occurences_count: \"occurrences\",\n\t\trepeat_radio_end2: \"After\",\n\t\trepeat_radio_end3: \"End by\",\n\t\tmonth_for_recurring: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n\t\tday_for_recurring: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"]//\n\t}\n};\n\n","/*\n @Autor Manuel Fernandez Panzuela - www.mfernandez.es\n */\nexport default {\n\tdate: {\n\t\tmonth_full: [\"Enero\", \"Febrero\", \"Marzo\", \"Abril\", \"Mayo\", \"Junio\", \"Julio\", \"Agosto\", \"Septiembre\", \"Octubre\", \"Noviembre\", \"Diciembre\"],\n\t\tmonth_short: [\"Ene\", \"Feb\", \"Mar\", \"Abr\", \"May\", \"Jun\", \"Jul\", \"Ago\", \"Sep\", \"Oct\", \"Nov\", \"Dic\"],\n\t\tday_full: [\"Domingo\", \"Lunes\", \"Martes\", \"Miércoles\", \"Jueves\", \"Viernes\", \"Sábado\"],\n\t\tday_short: [\"Dom\", \"Lun\", \"Mar\", \"Mié\", \"Jue\", \"Vie\", \"Sáb\"]\n\t},\n\tlabels: {\n\t\tdhx_cal_today_button: \"Hoy\",\n\t\tday_tab: \"Día\",\n\t\tweek_tab: \"Semana\",\n\t\tmonth_tab: \"Mes\",\n\t\tnew_event: \"Nuevo evento\",\n\t\ticon_save: \"Guardar\",\n\t\ticon_cancel: \"Cancelar\",\n\t\ticon_details: \"Detalles\",\n\t\ticon_edit: \"Editar\",\n\t\ticon_delete: \"Eliminar\",\n\t\tconfirm_closing: \"\", //\"Sus cambios se perderán, continuar ?\"\n\t\tconfirm_deleting: \"El evento se borrará definitivamente, ¿continuar?\",\n\t\tsection_description: \"Descripción\",\n\t\tsection_time: \"Período\",\n\t\tfull_day: \"Todo el día\",\n\n\t\tconfirm_recurring: \"¿Desea modificar el conjunto de eventos repetidos?\",\n\t\tsection_recurring: \"Repita el evento\",\n\t\tbutton_recurring: \"Impedido\",\n\t\tbutton_recurring_open: \"Permitido\",\n\t\tbutton_edit_series: \"Editar la serie\",\n\t\tbutton_edit_occurrence: \"Editar este evento\",\n\n\t\t/*agenda view extension*/\n\t\tagenda_tab: \"Día\",\n\t\tdate: \"Fecha\",\n\t\tdescription: \"Descripción\",\n\n\t\t/*year view extension*/\n\t\tyear_tab: \"Año\",\n\n\t\t/*week agenda view extension*/\n\t\tweek_agenda_tab: \"Día\",\n\n\t\t/*grid view extension*/\n\t\tgrid_tab: \"Reja\",\n\n\t\t/* touch tooltip*/\n\t\tdrag_to_create:\"Drag to create\",\n\t\tdrag_to_move:\"Drag to move\",\n\n\t\t/* dhtmlx message default buttons */\n\t\tmessage_ok:\"OK\",\n\t\tmessage_cancel:\"Cancel\",\n\n\t\t/* wai aria labels for non-text controls */\n\t\tnext: \"Next\",\n\t\tprev: \"Previous\",\n\t\tyear: \"Year\",\n\t\tmonth: \"Month\",\n\t\tday: \"Day\",\n\t\thour:\"Hour\",\n\t\tminute: \"Minute\",\n\n\t\t/* recurring event components */\n\t\trepeat_radio_day: \"Diariamente\",\n\t\trepeat_radio_week: \"Semanalmente\",\n\t\trepeat_radio_month: \"Mensualmente\",\n\t\trepeat_radio_year: \"Anualmente\",\n\t\trepeat_radio_day_type: \"Cada\",\n\t\trepeat_text_day_count: \"dia\",\n\t\trepeat_radio_day_type2: \"Cada jornada de trabajo\",\n\t\trepeat_week: \" Repetir cada\",\n\t\trepeat_text_week_count: \"semana:\",\n\t\trepeat_radio_month_type: \"Repita\",\n\t\trepeat_radio_month_start: \"El\",\n\t\trepeat_text_month_day: \"dia cada \",\n\t\trepeat_text_month_count: \"mes\",\n\t\trepeat_text_month_count2_before: \"cada\",\n\t\trepeat_text_month_count2_after: \"mes\",\n\t\trepeat_year_label: \"El\",\n\t\tselect_year_day2: \"del\",\n\t\trepeat_text_year_day: \"dia\",\n\t\tselect_year_month: \"mes\",\n\t\trepeat_radio_end: \"Sin fecha de finalización\",\n\t\trepeat_text_occurences_count: \"ocurrencias\",\n\t\trepeat_radio_end3: \"Fin\",\n\t\trepeat_radio_end2: \"Después de\",\n\t\tmonth_for_recurring: [\"Enero\", \"Febrero\", \"Маrzo\", \"Аbril\", \"Mayo\", \"Junio\", \"Julio\", \"Аgosto\", \"Setiembre\", \"Octubre\", \"Noviembre\", \"Diciembre\"],\n\t\tday_for_recurring: [\"Domingo\", \"Lunes\", \"Martes\", \"Miércoles\", \"Jeuves\", \"Viernes\", \"Sabado\"]\n\t}\n};\n","export default {\n\tdate: {\n\t\tmonth_full: [\"Tammikuu\", \"Helmikuu\", \"Maaliskuu\", \"Huhtikuu\", \"Toukokuu\", \"Kesäkuu\", \"Heinäkuu\", \"Elokuu\", \"Syyskuu\", \"Lokakuu\", \"Marraskuu\", \"Joulukuu\"],\n\t\tmonth_short: [\"Tam\", \"Hel\", \"Maa\", \"Huh\", \"Tou\", \"Kes\", \"Hei\", \"Elo\", \"Syy\", \"Lok\", \"Mar\", \"Jou\"],\n\t\tday_full: [\"Sunnuntai\", \"Maanantai\", \"Tiistai\", \"Keskiviikko\", \"Torstai\", \"Perjantai\", \"Lauantai\"],\n\t\tday_short: [\"Su\", \"Ma\", \"Ti\", \"Ke\", \"To\", \"Pe\", \"La\"]\n\t},\n\tlabels: {\n\t\tdhx_cal_today_button: \"Tänään\",\n\t\tday_tab: \"Päivä\",\n\t\tweek_tab: \"Viikko\",\n\t\tmonth_tab: \"Kuukausi\",\n\t\tnew_event: \"Uusi tapahtuma\",\n\t\ticon_save: \"Tallenna\",\n\t\ticon_cancel: \"Peru\",\n\t\ticon_details: \"Tiedot\",\n\t\ticon_edit: \"Muokkaa\",\n\t\ticon_delete: \"Poista\",\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\n\t\tconfirm_deleting: \"Haluatko varmasti poistaa tapahtuman?\",\n\t\tsection_description: \"Kuvaus\",\n\t\tsection_time: \"Aikajakso\",\n\t\tfull_day: \"Koko päivä\",\n\n\t\tconfirm_recurring: \"Haluatko varmasti muokata toistuvan tapahtuman kaikkia jaksoja?\",\n\t\tsection_recurring: \"Toista tapahtuma\",\n\t\tbutton_recurring: \"Ei käytössä\",\n\t\tbutton_recurring_open: \"Käytössä\",\n\t\tbutton_edit_series: \"Muokkaa sarja\",\n\t\tbutton_edit_occurrence: \"Muokkaa kopio\",\n\n\t\t/*agenda view extension*/\n\t\tagenda_tab: \"Esityslista\",\n\t\tdate: \"Päivämäärä\",\n\t\tdescription: \"Kuvaus\",\n\n\t\t/*year view extension*/\n\t\tyear_tab: \"Vuoden\",\n\n\t\t/*week agenda view extension*/\n\t\tweek_agenda_tab: \"Esityslista\",\n\n\t\t/*grid view extension*/\n\t\tgrid_tab: \"Ritilä\",\n\n\t\t/* touch tooltip*/\n\t\tdrag_to_create:\"Luo uusi vetämällä\",\n\t\tdrag_to_move:\"Siirrä vetämällä\",\n\n\t\t/* dhtmlx message default buttons */\n\t\tmessage_ok:\"OK\",\n\t\tmessage_cancel:\"Cancel\",\n\n\t\t/* wai aria labels for non-text controls */\n\t\tnext: \"Next\",\n\t\tprev: \"Previous\",\n\t\tyear: \"Year\",\n\t\tmonth: \"Month\",\n\t\tday: \"Day\",\n\t\thour:\"Hour\",\n\t\tminute: \"Minute\",\n\n\t\t/* recurring event components */\n\t\trepeat_radio_day: \"Päivittäin\",\n\t\trepeat_radio_week: \"Viikoittain\",\n\t\trepeat_radio_month: \"Kuukausittain\",\n\t\trepeat_radio_year: \"Vuosittain\",\n\t\trepeat_radio_day_type: \"Joka\",\n\t\trepeat_text_day_count: \"päivä\",\n\t\trepeat_radio_day_type2: \"Joka arkipäivä\",\n\t\trepeat_week: \"Toista joka\",\n\t\trepeat_text_week_count: \"viikko näinä päivinä:\",\n\t\trepeat_radio_month_type: \"Toista\",\n\t\trepeat_radio_month_start: \"\",\n\t\trepeat_text_month_day: \"päivänä joka\",\n\t\trepeat_text_month_count: \"kuukausi\",\n\t\trepeat_text_month_count2_before: \"joka\",\n\t\trepeat_text_month_count2_after: \"kuukausi\",\n\t\trepeat_year_label: \"\",\n\t\tselect_year_day2: \"\",\n\t\trepeat_text_year_day: \"päivä\",\n\t\tselect_year_month: \"kuukausi\",\n\t\trepeat_radio_end: \"Ei loppumisaikaa\",\n\t\trepeat_text_occurences_count: \"Toiston jälkeen\",\n\t\trepeat_radio_end3: \"Loppuu\",\n\t\trepeat_radio_end2: \"\",\n\t\tmonth_for_recurring: [\"Tammikuu\", \"Helmikuu\", \"Maaliskuu\", \"Huhtikuu\", \"Toukokuu\", \"Kesäkuu\", \"Heinäkuu\", \"Elokuu\", \"Syyskuu\", \"Lokakuu\", \"Marraskuu\", \"Joulukuu\"],\n\t\tday_for_recurring: [\"Sunnuntai\", \"Maanantai\", \"Tiistai\", \"Keskiviikko\", \"Torstai\", \"Perjantai\", \"Lauantai\"]\n\t}\n};\n\n\n","export default {\n\tdate: {\n\t\tmonth_full: [\"Janvier\", \"Février\", \"Mars\", \"Avril\", \"Mai\", \"Juin\", \"Juillet\", \"Août\", \"Septembre\", \"Octobre\", \"Novembre\", \"Décembre\"],\n\t\tmonth_short: [\"Jan\", \"Fév\", \"Mar\", \"Avr\", \"Mai\", \"Juin\", \"Juil\", \"Aoû\", \"Sep\", \"Oct\", \"Nov\", \"Déc\"],\n\t\tday_full: [\"Dimanche\", \"Lundi\", \"Mardi\", \"Mercredi\", \"Jeudi\", \"Vendredi\", \"Samedi\"],\n\t\tday_short: [\"Dim\", \"Lun\", \"Mar\", \"Mer\", \"Jeu\", \"Ven\", \"Sam\"]\n\t},\n\tlabels: {\n\t\tdhx_cal_today_button: \"Aujourd'hui\",\n\t\tday_tab: \"Jour\",\n\t\tweek_tab: \"Semaine\",\n\t\tmonth_tab: \"Mois\",\n\t\tnew_event: \"Nouvel événement\",\n\t\ticon_save: \"Enregistrer\",\n\t\ticon_cancel: \"Annuler\",\n\t\ticon_details: \"Détails\",\n\t\ticon_edit: \"Modifier\",\n\t\ticon_delete: \"Effacer\",\n\t\tconfirm_closing: \"\", //Vos modifications seront perdus, êtes-vous sûr ?\n\t\tconfirm_deleting: \"L'événement sera effacé sans appel, êtes-vous sûr ?\",\n\t\tsection_description: \"Description\",\n\t\tsection_time: \"Période\",\n\t\tfull_day: \"Journée complète\",\n\n\t\tconfirm_recurring: \"Voulez-vous éditer toute une série d'évènements répétés?\",\n\t\tsection_recurring: \"Périodicité\",\n\t\tbutton_recurring: \"Désactivé\",\n\t\tbutton_recurring_open: \"Activé\",\n\t\tbutton_edit_series: \"Modifier la série\",\n\t\tbutton_edit_occurrence: \"Modifier une copie\",\n\n\t\t/*agenda view extension*/\n\t\tagenda_tab: \"Jour\",\n\t\tdate: \"Date\",\n\t\tdescription: \"Description\",\n\n\t\t/*year view extension*/\n\t\tyear_tab: \"Année\",\n\n\t\t/*week agenda view extension*/\n\t\tweek_agenda_tab: \"Jour\",\n\n\t\t/*grid view extension*/\n\t\tgrid_tab: \"Grille\",\n\n\t\t/* touch tooltip*/\n\t\tdrag_to_create:\"Drag to create\",\n\t\tdrag_to_move:\"Drag to move\",\n\n\t\t/* dhtmlx message default buttons */\n\t\tmessage_ok:\"OK\",\n\t\tmessage_cancel:\"Cancel\",\n\n\t\t/* wai aria labels for non-text controls */\n\t\tnext: \"Next\",\n\t\tprev: \"Previous\",\n\t\tyear: \"Year\",\n\t\tmonth: \"Month\",\n\t\tday: \"Day\",\n\t\thour:\"Hour\",\n\t\tminute: \"Minute\",\n\n\t\t/* recurring event components */\n\t\trepeat_radio_day: \"Quotidienne\",\n\t\trepeat_radio_week: \"Hebdomadaire\",\n\t\trepeat_radio_month: \"Mensuelle\",\n\t\trepeat_radio_year: \"Annuelle\",\n\t\trepeat_radio_day_type: \"Chaque\",\n\t\trepeat_text_day_count: \"jour\",\n\t\trepeat_radio_day_type2: \"Chaque journée de travail\",\n\t\trepeat_week: \" Répéter toutes les\",\n\t\trepeat_text_week_count: \"semaine:\",\n\t\trepeat_radio_month_type: \"Répéter\",\n\t\trepeat_radio_month_start: \"Le\",\n\t\trepeat_text_month_day: \"jour chaque\",\n\t\trepeat_text_month_count: \"mois\",\n\t\trepeat_text_month_count2_before: \"chaque\",\n\t\trepeat_text_month_count2_after: \"mois\",\n\t\trepeat_year_label: \"Le\",\n\t\tselect_year_day2: \"du\",\n\t\trepeat_text_year_day: \"jour\",\n\t\tselect_year_month: \"mois\",\n\t\trepeat_radio_end: \"Pas de date d"achèvement\",\n\t\trepeat_text_occurences_count: \"occurrences\",\n\t\trepeat_radio_end3: \"Fin\",\n\t\trepeat_radio_end2: \"Après\",\n\t\tmonth_for_recurring: [\"Janvier\", \"Février\", \"Mars\", \"Avril\", \"Mai\", \"Juin\", \"Juillet\", \"Août\", \"Septembre\", \"Octobre\", \"Novembre\", \"Décembre\"],\n\t\tday_for_recurring: [\"Dimanche\", \"Lundi\", \"Mardi\", \"Mercredi\", \"Jeudi\", \"Vendredi\", \"Samedi\"]\n\t}\n};\n","export default {\n\tdate: {\n\t\tmonth_full: [\"ינואר\", \"פברואר\", \"מרץ\", \"אפריל\", \"מאי\", \"יוני\", \"יולי\", \"אוגוסט\", \"ספטמבר\", \"אוקטובר\", \"נובמבר\", \"דצמבר\"],\n\t\tmonth_short: [\"ינו\", \"פבר\", \"מרץ\", \"אפר\", \"מאי\", \"יונ\", \"יול\", \"אוג\", \"ספט\", \"אוק\", \"נוב\", \"דצמ\"],\n\t\tday_full: [\"ראשון\", \"שני\", \"שלישי\", \"רביעי\", \"חמישי\", \"שישי\", \"שבת\"],\n\t\tday_short: [\"א\", \"ב\", \"ג\", \"ד\", \"ה\", \"ו\", \"ש\"]\n\t},\n\tlabels: {\n\t\tdhx_cal_today_button: \"היום\",\n\t\tday_tab: \"יום\",\n\t\tweek_tab: \"שבוע\",\n\t\tmonth_tab: \"חודש\",\n\t\tnew_event: \"ארוע חדש\",\n\t\ticon_save: \"שמור\",\n\t\ticon_cancel: \"בטל\",\n\t\ticon_details: \"פרטים\",\n\t\ticon_edit: \"ערוך\",\n\t\ticon_delete: \"מחק\",\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\n\t\tconfirm_deleting: \"ארוע ימחק סופית.להמשיך?\",\n\t\tsection_description: \"תיאור\",\n\t\tsection_time: \"תקופה\",\n\n\t\tconfirm_recurring: \"האם ברצונך לשנות כל סדרת ארועים מתמשכים?\",\n\t\tsection_recurring: \"להעתיק ארוע\",\n\t\tbutton_recurring: \"לא פעיל\",\n\t\tbutton_recurring_open: \"פעיל\",\n\t\tfull_day: \"יום שלם\",\n\t\tbutton_edit_series: \"ערוך את הסדרה\",\n\t\tbutton_edit_occurrence: \"עריכת עותק\",\n\n\t\t/*agenda view extension*/\n\t\tagenda_tab: \"סדר יום\",\n\t\tdate: \"תאריך\",\n\t\tdescription: \"תיאור\",\n\n\t\t/*year view extension*/\n\t\tyear_tab: \"לשנה\",\n\n\t\t/*week agenda view extension*/\n\t\tweek_agenda_tab: \"סדר יום\",\n\n\t\t/*grid view extension*/\n\t\tgrid_tab: \"סורג\",\n\n\t\t/* touch tooltip*/\n\t\tdrag_to_create:\"Drag to create\",\n\t\tdrag_to_move:\"גרור כדי להזיז\",\n\n\t\t/* dhtmlx message default buttons */\n\t\tmessage_ok:\"OK\",\n\t\tmessage_cancel:\"בטל\",\n\n\t\t/* wai aria labels for non-text controls */\n\t\tnext: \"הבא\",\n\t\tprev: \"הקודם\",\n\t\tyear: \"שנה\",\n\t\tmonth: \"חודש\",\n\t\tday: \"יום\",\n\t\thour:\"שעה\",\n\t\tminute: \"דקה\",\n\n\t\t/* recurring event components */\n\t\trepeat_radio_day: \"יומי\",\n\t\trepeat_radio_week: \"שבועי\",\n\t\trepeat_radio_month: \"חודשי\",\n\t\trepeat_radio_year: \"שנתי\",\n\t\trepeat_radio_day_type: \"חזור כל\",\n\t\trepeat_text_day_count: \"ימים\",\n\t\trepeat_radio_day_type2: \"חזור כל יום עבודה\",\n\t\trepeat_week: \" חזור כל\",\n\t\trepeat_text_week_count: \"שבוע לפי ימים:\",\n\t\trepeat_radio_month_type: \"חזור כל\",\n\t\trepeat_radio_month_start: \"כל\",\n\t\trepeat_text_month_day: \"ימים כל\",\n\t\trepeat_text_month_count: \"חודשים\",\n\t\trepeat_text_month_count2_before: \"חזור כל\",\n\t\trepeat_text_month_count2_after: \"חודש\",\n\t\trepeat_year_label: \"כל\",\n\t\tselect_year_day2: \"בחודש\",\n\t\trepeat_text_year_day: \"ימים\",\n\t\tselect_year_month: \"חודש\",\n\t\trepeat_radio_end: \"לעולם לא מסתיים\",\n\t\trepeat_text_occurences_count: \"אירועים\",\n\t\trepeat_radio_end3: \"מסתיים ב\",\n\t\trepeat_radio_end2: \"אחרי\",\n\t\tmonth_for_recurring: [\"ינואר\", \"פברואר\", \"מרץ\", \"אפריל\", \"מאי\", \"יוני\", \"יולי\", \"אוגוסט\", \"ספטמבר\", \"אוקטובר\", \"נובמבר\", \"דצמבר\"],\n\t\tday_for_recurring: [\"ראשון\", \"שני\", \"שלישי\", \"רביעי\", \"חמישי\", \"שישי\", \"שבת\"]\n\t}\n};\n\n\n","export default {\n\tdate: {\n\t\tmonth_full: [\"Január\", \"Február\", \"Március\", \"Április\", \"Május\", \"Június\", \"Július\", \"Augusztus\", \"Szeptember\", \"Október\", \"November\", \"December\"],\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Már\", \"Ápr\", \"Máj\", \"Jún\", \"Júl\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\n\t\tday_full: [\"Vasárnap\", \"Hétfõ\", \"Kedd\", \"Szerda\", \"Csütörtök\", \"Péntek\", \"szombat\"],\n\t\tday_short: [\"Va\", \"Hé\", \"Ke\", \"Sze\", \"Csü\", \"Pé\", \"Szo\"]\n\t},\n\tlabels: {\n\t\tdhx_cal_today_button: \"Ma\",\n\t\tday_tab: \"Nap\",\n\t\tweek_tab: \"Hét\",\n\t\tmonth_tab: \"Hónap\",\n\t\tnew_event: \"Új esemény\",\n\t\ticon_save: \"Mentés\",\n\t\ticon_cancel: \"Mégse\",\n\t\ticon_details: \"Részletek\",\n\t\ticon_edit: \"Szerkesztés\",\n\t\ticon_delete: \"Törlés\",\n\t\tconfirm_closing: \"\", //A változások elvesznek, biztosan folytatja? \"\n\t\tconfirm_deleting: \"Az esemény törölve lesz, biztosan folytatja?\",\n\t\tsection_description: \"Leírás\",\n\t\tsection_time: \"Idõszak\",\n\t\tfull_day: \"Egesz napos\",\n\n\t\t/*ismétlõdõ események*/\n\t\tconfirm_recurring: \"Biztosan szerkeszteni akarod az összes ismétlõdõ esemény beállítását?\",\n\t\tsection_recurring: \"Esemény ismétlése\",\n\t\tbutton_recurring: \"Tiltás\",\n\t\tbutton_recurring_open: \"Engedélyezés\",\n\t\tbutton_edit_series: \"Edit series\",\n\t\tbutton_edit_occurrence: \"Szerkesztés bíróság\",\n\n\t\t/*napirendi nézet*/\n\t\tagenda_tab: \"Napirend\",\n\t\tdate: \"Dátum\",\n\t\tdescription: \"Leírás\",\n\n\t\t/*éves nézet*/\n\t\tyear_tab: \"Év\",\n\n\t\t/* touch tooltip*/\n\t\tdrag_to_create:\"Drag to create\",\n\t\tdrag_to_move:\"Drag to move\",\n\n\t\t/* dhtmlx message default buttons */\n\t\tmessage_ok:\"OK\",\n\t\tmessage_cancel:\"Cancel\",\n\n\t\t/* wai aria labels for non-text controls */\n\t\tnext: \"Next\",\n\t\tprev: \"Previous\",\n\t\tyear: \"Year\",\n\t\tmonth: \"Month\",\n\t\tday: \"Day\",\n\t\thour:\"Hour\",\n\t\tminute: \"Minute\"\n\t}\n};\n\n","export default {\n\tdate: {\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Maret\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Agustus\", \"September\", \"Oktober\", \"November\", \"Desember\"],\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mei\", \"Jun\", \"Jul\", \"Ags\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\n\t\tday_full: [\"Minggu\", \"Senin\", \"Selasa\", \"Rabu\", \"Kamis\", \"Jumat\", \"Sabtu\"],\n\t\tday_short: [\"Ming\", \"Sen\", \"Sel\", \"Rab\", \"Kam\", \"Jum\", \"Sab\"]\n\t},\n\tlabels: {\n\t\tdhx_cal_today_button: \"Hari Ini\",\n\t\tday_tab: \"Hari\",\n\t\tweek_tab: \"Minggu\",\n\t\tmonth_tab: \"Bulan\",\n\t\tnew_event: \"Acara Baru\",\n\t\ticon_save: \"Simpan\",\n\t\ticon_cancel: \"Batal\",\n\t\ticon_details: \"Detail\",\n\t\ticon_edit: \"Edit\",\n\t\ticon_delete: \"Hapus\",\n\t\tconfirm_closing: \"\", /*Perubahan tidak akan disimpan ?*/\n\t\tconfirm_deleting: \"Acara akan dihapus\",\n\t\tsection_description: \"Keterangan\",\n\t\tsection_time: \"Periode\",\n\t\tfull_day: \"Hari penuh\",\n\n\t\t/*recurring events*/\n\t\tconfirm_recurring: \"Apakah acara ini akan berulang?\",\n\t\tsection_recurring: \"Acara Rutin\",\n\t\tbutton_recurring: \"Tidak Difungsikan\",\n\t\tbutton_recurring_open: \"Difungsikan\",\n\t\tbutton_edit_series: \"Mengedit seri\",\n\t\tbutton_edit_occurrence: \"Mengedit salinan\",\n\n\t\t/*agenda view extension*/\n\t\tagenda_tab: \"Agenda\",\n\t\tdate: \"Tanggal\",\n\t\tdescription: \"Keterangan\",\n\n\t\t/*year view extension*/\n\t\tyear_tab: \"Tahun\",\n\n\t\t/*week agenda view extension*/\n\t\tweek_agenda_tab: \"Agenda\",\n\n\t\t/*grid view extension*/\n\t\tgrid_tab: \"Tabel\",\n\n\t\t/* touch tooltip*/\n\t\tdrag_to_create:\"Drag to create\",\n\t\tdrag_to_move:\"Drag to move\",\n\n\t\t/* dhtmlx message default buttons */\n\t\tmessage_ok:\"OK\",\n\t\tmessage_cancel:\"Cancel\",\n\n\t\t/* wai aria labels for non-text controls */\n\t\tnext: \"Next\",\n\t\tprev: \"Previous\",\n\t\tyear: \"Year\",\n\t\tmonth: \"Month\",\n\t\tday: \"Day\",\n\t\thour:\"Hour\",\n\t\tminute: \"Minute\"\n\t}\n};","export default {\n\tdate: {\n\t\tmonth_full: [\"Gennaio\", \"Febbraio\", \"Marzo\", \"Aprile\", \"Maggio\", \"Giugno\", \"Luglio\", \"Agosto\", \"Settembre\", \"Ottobre\", \"Novembre\", \"Dicembre\"],\n\t\tmonth_short: [\"Gen\", \"Feb\", \"Mar\", \"Apr\", \"Mag\", \"Giu\", \"Lug\", \"Ago\", \"Set\", \"Ott\", \"Nov\", \"Dic\"],\n\t\tday_full: [\"Domenica\", \"Lunedì\", \"Martedì\", \"Mercoledì\", \"Giovedì\", \"Venerdì\", \"Sabato\"],\n\t\tday_short: [\"Dom\", \"Lun\", \"Mar\", \"Mer\", \"Gio\", \"Ven\", \"Sab\"]\n\t},\n\tlabels: {\n\t\tdhx_cal_today_button: \"Oggi\",\n\t\tday_tab: \"Giorno\",\n\t\tweek_tab: \"Settimana\",\n\t\tmonth_tab: \"Mese\",\n\t\tnew_event: \"Nuovo evento\",\n\t\ticon_save: \"Salva\",\n\t\ticon_cancel: \"Chiudi\",\n\t\ticon_details: \"Dettagli\",\n\t\ticon_edit: \"Modifica\",\n\t\ticon_delete: \"Elimina\",\n\t\tconfirm_closing: \"\", //Le modifiche apportate saranno perse, siete sicuri?\n\t\tconfirm_deleting: \"L'evento sarà eliminato, siete sicuri?\",\n\t\tsection_description: \"Descrizione\",\n\t\tsection_time: \"Periodo di tempo\",\n\t\tfull_day: \"Intera giornata\",\n\n\t\tconfirm_recurring: \"Vuoi modificare l'intera serie di eventi?\",\n\t\tsection_recurring: \"Ripetere l'evento\",\n\t\tbutton_recurring: \"Disattivato\",\n\t\tbutton_recurring_open: \"Attivato\",\n\t\tbutton_edit_series: \"Modificare la serie\",\n\t\tbutton_edit_occurrence: \"Modificare una copia\",\n\n\t\t/*agenda view extension*/\n\t\tagenda_tab: \"Agenda\",\n\t\tdate: \"Data\",\n\t\tdescription: \"Descrizione\",\n\n\t\t/*year view extension*/\n\t\tyear_tab: \"Anno\",\n\n\t\t/*week agenda view extension*/\n\t\tweek_agenda_tab: \"Agenda\",\n\n\t\t/*grid view extension*/\n\t\tgrid_tab: \"Griglia\",\n\n\t\t/* touch tooltip*/\n\t\tdrag_to_create:\"Drag to create\",\n\t\tdrag_to_move:\"Drag to move\",\n\n\t\t/* dhtmlx message default buttons */\n\t\tmessage_ok:\"OK\",\n\t\tmessage_cancel:\"Cancel\",\n\n\t\t/* wai aria labels for non-text controls */\n\t\tnext: \"Next\",\n\t\tprev: \"Previous\",\n\t\tyear: \"Year\",\n\t\tmonth: \"Month\",\n\t\tday: \"Day\",\n\t\thour:\"Hour\",\n\t\tminute: \"Minute\",\n\n\t\t/* recurring event components */\n\t\trepeat_radio_day: \"Quotidiano\",\n\t\trepeat_radio_week: \"Settimanale\",\n\t\trepeat_radio_month: \"Mensile\",\n\t\trepeat_radio_year: \"Annuale\",\n\t\trepeat_radio_day_type: \"Ogni\",\n\t\trepeat_text_day_count: \"giorno\",\n\t\trepeat_radio_day_type2: \"Ogni giornata lavorativa\",\n\t\trepeat_week: \" Ripetere ogni\",\n\t\trepeat_text_week_count: \"settimana:\",\n\t\trepeat_radio_month_type: \"Ripetere\",\n\t\trepeat_radio_month_start: \"Il\",\n\t\trepeat_text_month_day: \"giorno ogni\",\n\t\trepeat_text_month_count: \"mese\",\n\t\trepeat_text_month_count2_before: \"ogni\",\n\t\trepeat_text_month_count2_after: \"mese\",\n\t\trepeat_year_label: \"Il\",\n\t\tselect_year_day2: \"del\",\n\t\trepeat_text_year_day: \"giorno\",\n\t\tselect_year_month: \"mese\",\n\t\trepeat_radio_end: \"Senza data finale\",\n\t\trepeat_text_occurences_count: \"occorenze\",\n\t\trepeat_radio_end3: \"Fine\",\n\t\trepeat_radio_end2: \"Dopo\",\n\t\tmonth_for_recurring: [\"Gennaio\", \"Febbraio\", \"Marzo\", \"Aprile\", \"Maggio\", \"Jiugno\", \"Luglio\", \"Agosto\", \"Settembre\", \"Ottobre\", \"Novembre\", \"Dicembre\"],\n\t\tday_for_recurring: [\"Domenica\", \"Lunedì\", \"Martedì\", \"Mercoledì\", \"Jovedì\", \"Venerdì\", \"Sabato\"]\n\t}\n};\n","/*\n Translation by Genexus Japan Inc.\n */\nexport default {\n\tdate: {\n\t\tmonth_full: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\n\t\tmonth_short: [ \"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\n\t\tday_full: [\"日曜日\", \"月曜日\", \"火曜日\", \"水曜日\", \"木曜日\", \"金曜日\", \"土曜日\"],\n\t\tday_short: [\"日\", \"月\", \"火\", \"水\", \"木\", \"金\", \"土\"]\n\t},\n\tlabels: {\n\t\tdhx_cal_today_button: \"今日\",\n\t\tday_tab: \"日\",\n\t\tweek_tab: \"週\",\n\t\tmonth_tab: \"月\",\n\t\tnew_event: \"新イベント\",\n\t\ticon_save: \"保存\",\n\t\ticon_cancel: \"キャンセル\",\n\t\ticon_details: \"詳細\",\n\t\ticon_edit: \"編集\",\n\t\ticon_delete: \"削除\",\n\t\tconfirm_closing: \"\", //変更が取り消されます、宜しいですか?\n\t\tconfirm_deleting: \"イベント完全に削除されます、宜しいですか?\",\n\t\tsection_description: \"デスクリプション\",\n\t\tsection_time: \"期間\",\n\t\tconfirm_recurring: \"繰り返されているイベントを全て編集しますか?\",\n\t\tsection_recurring: \"イベントを繰り返す\",\n\t\tbutton_recurring: \"無効\",\n\t\tbutton_recurring_open: \"有効\",\n\t\tfull_day: \"終日\",\n\t\tbutton_edit_series: \"シリーズを編集します\",\n\t\tbutton_edit_occurrence: \"コピーを編集\",\n\n\t\t/*agenda view extension*/\n\t\tagenda_tab: \"議題は\",\n\t\tdate: \"日付\",\n\t\tdescription: \"説明\",\n\n\t\t/*year view extension*/\n\t\tyear_tab: \"今年\",\n\n\t\t/*week agenda view extension*/\n\t\tweek_agenda_tab: \"議題は\",\n\n\t\t/*grid view extension*/\n\t\tgrid_tab: \"グリッド\",\n\n\t\t/* touch tooltip*/\n\t\tdrag_to_create:\"Drag to create\",\n\t\tdrag_to_move:\"Drag to move\",\n\n\t\t/* dhtmlx message default buttons */\n\t\tmessage_ok:\"OK\",\n\t\tmessage_cancel:\"Cancel\",\n\n\t\t/* wai aria labels for non-text controls */\n\t\tnext: \"Next\",\n\t\tprev: \"Previous\",\n\t\tyear: \"Year\",\n\t\tmonth: \"Month\",\n\t\tday: \"Day\",\n\t\thour:\"Hour\",\n\t\tminute: \"Minute\"\n\t}\n};\n\n\n","export default class LocaleManager{\n\tconstructor(config){\n\t\tthis._locales = {};\n\t\tfor(const i in config){\n\t\t\tthis._locales[i] = config[i];\n\t\t}\n\t}\n\n\taddLocale(name, locale) {\n\t\tthis._locales[name] = locale;\n\t}\n\n\tgetLocale(name) {\n\t\treturn this._locales[name];\n\t}\n}","export default {\n\tdate: {\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\n\t\tday_short: [\"Søn\", \"Mon\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\n\t},\n\tlabels: {\n\t\tdhx_cal_today_button: \"I dag\",\n\t\tday_tab: \"Dag\",\n\t\tweek_tab: \"Uke\",\n\t\tmonth_tab: \"Måned\",\n\t\tnew_event: \"Ny hendelse\",\n\t\ticon_save: \"Lagre\",\n\t\ticon_cancel: \"Avbryt\",\n\t\ticon_details: \"Detaljer\",\n\t\ticon_edit: \"Rediger\",\n\t\ticon_delete: \"Slett\",\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\n\t\tconfirm_deleting: \"Hendelsen vil bli slettet permanent. Er du sikker?\",\n\t\tsection_description: \"Beskrivelse\",\n\t\tsection_time: \"Tidsperiode\",\n\n\t\t/*recurring events*/\n\t\tconfirm_recurring: \"Vil du forandre hele dette settet av repeterende hendelser?\",\n\t\tsection_recurring: \"Repeter hendelsen\",\n\t\tbutton_recurring: \"Av\",\n\t\tbutton_recurring_open: \"På\",\n\t\tbutton_edit_series: \"Rediger serien\",\n\t\tbutton_edit_occurrence: \"Redigere en kopi\",\n\n\t\t/*agenda view extension*/\n\t\tagenda_tab: \"Agenda\",\n\t\tdate: \"Dato\",\n\t\tdescription: \"Beskrivelse\",\n\n\t\t/*year view extension*/\n\t\tyear_tab: \"År\",\n\n\t\t/*week agenda view extension*/\n\t\tweek_agenda_tab: \"Agenda\",\n\n\t\t/*grid view extension*/\n\t\tgrid_tab: \"Grid\",\n\n\t\t/* touch tooltip*/\n\t\tdrag_to_create:\"Drag to create\",\n\t\tdrag_to_move:\"Drag to move\",\n\n\t\t/* dhtmlx message default buttons */\n\t\tmessage_ok:\"OK\",\n\t\tmessage_cancel:\"Cancel\",\n\n\t\t/* wai aria labels for non-text controls */\n\t\tnext: \"Next\",\n\t\tprev: \"Previous\",\n\t\tyear: \"Year\",\n\t\tmonth: \"Month\",\n\t\tday: \"Day\",\n\t\thour:\"Hour\",\n\t\tminute: \"Minute\",\n\n\t\t/* recurring event components */\n\t\trepeat_radio_day: \"Daglig\",\n\t\trepeat_radio_week: \"Ukentlig\",\n\t\trepeat_radio_month: \"Månedlig\",\n\t\trepeat_radio_year: \"Årlig\",\n\t\trepeat_radio_day_type: \"Hver\",\n\t\trepeat_text_day_count: \"dag\",\n\t\trepeat_radio_day_type2: \"Alle hverdager\",\n\t\trepeat_week: \" Gjentas hver\",\n\t\trepeat_text_week_count: \"uke på:\",\n\t\trepeat_radio_month_type: \"På hver\",\n\t\trepeat_radio_month_start: \"På\",\n\t\trepeat_text_month_day: \"dag hver\",\n\t\trepeat_text_month_count: \"måned\",\n\t\trepeat_text_month_count2_before: \"hver\",\n\t\trepeat_text_month_count2_after: \"måned\",\n\t\trepeat_year_label: \"på\",\n\t\tselect_year_day2: \"i\",\n\t\trepeat_text_year_day: \"dag i\",\n\t\tselect_year_month: \"\",\n\t\trepeat_radio_end: \"Ingen sluttdato\",\n\t\trepeat_text_occurences_count: \"forekomst\",\n\t\trepeat_radio_end3: \"Stop den\",\n\t\trepeat_radio_end2: \"Etter\",\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\n\t\tday_for_recurring: [\"Sondag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"]\n\t}\n};\n","export default {\n\tdate: {\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Maart\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Augustus\", \"September\", \"Oktober\", \"November\", \"December\"],\n\t\tmonth_short: [\"Jan\", \"Feb\", \"mrt\", \"Apr\", \"Mei\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\n\t\tday_full: [\"Zondag\", \"Maandag\", \"Dinsdag\", \"Woensdag\", \"Donderdag\", \"Vrijdag\", \"Zaterdag\"],\n\t\tday_short: [\"Zo\", \"Ma\", \"Di\", \"Wo\", \"Do\", \"Vr\", \"Za\"]\n\t},\n\tlabels: {\n\t\tdhx_cal_today_button: \"Vandaag\",\n\t\tday_tab: \"Dag\",\n\t\tweek_tab: \"Week\",\n\t\tmonth_tab: \"Maand\",\n\t\tnew_event: \"Nieuw item\",\n\t\ticon_save: \"Opslaan\",\n\t\ticon_cancel: \"Annuleren\",\n\t\ticon_details: \"Details\",\n\t\ticon_edit: \"Bewerken\",\n\t\ticon_delete: \"Verwijderen\",\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\n\t\tconfirm_deleting: \"Item zal permanent worden verwijderd, doorgaan?\",\n\t\tsection_description: \"Beschrijving\",\n\t\tsection_time: \"Tijd periode\",\n\t\tfull_day: \"Hele dag\",\n\n\t\tconfirm_recurring: \"Wilt u alle terugkerende items bijwerken?\",\n\t\tsection_recurring: \"Item herhalen\",\n\t\tbutton_recurring: \"Uit\",\n\t\tbutton_recurring_open: \"Aan\",\n\t\tbutton_edit_series: \"Bewerk de serie\",\n\t\tbutton_edit_occurrence: \"Bewerk een kopie\",\n\n\t\t/*agenda view extension*/\n\t\tagenda_tab: \"Agenda\",\n\t\tdate: \"Datum\",\n\t\tdescription: \"Omschrijving\",\n\n\t\t/*year view extension*/\n\t\tyear_tab: \"Jaar\",\n\n\t\t/*week agenda view extension*/\n\t\tweek_agenda_tab: \"Agenda\",\n\n\t\t/*grid view extension*/\n\t\tgrid_tab: \"Tabel\",\n\n\t\t/* touch tooltip*/\n\t\tdrag_to_create:\"Drag to create\",\n\t\tdrag_to_move:\"Drag to move\",\n\n\t\t/* dhtmlx message default buttons */\n\t\tmessage_ok:\"OK\",\n\t\tmessage_cancel:\"Cancel\",\n\n\t\t/* wai aria labels for non-text controls */\n\t\tnext: \"Next\",\n\t\tprev: \"Previous\",\n\t\tyear: \"Year\",\n\t\tmonth: \"Month\",\n\t\tday: \"Day\",\n\t\thour:\"Hour\",\n\t\tminute: \"Minute\",\n\n\t\t/* recurring event components */\n\t\trepeat_radio_day: \"Dagelijks\",\n\t\trepeat_radio_week: \"Wekelijks\",\n\t\trepeat_radio_month: \"Maandelijks\",\n\t\trepeat_radio_year: \"Jaarlijks\",\n\t\trepeat_radio_day_type: \"Elke\",\n\t\trepeat_text_day_count: \"dag(en)\",\n\t\trepeat_radio_day_type2: \"Elke werkdag\",\n\t\trepeat_week: \" Herhaal elke\",\n\t\trepeat_text_week_count: \"week op de volgende dagen:\",\n\t\trepeat_radio_month_type: \"Herhaal\",\n\t\trepeat_radio_month_start: \"Op\",\n\t\trepeat_text_month_day: \"dag iedere\",\n\t\trepeat_text_month_count: \"maanden\",\n\t\trepeat_text_month_count2_before: \"iedere\",\n\t\trepeat_text_month_count2_after: \"maanden\",\n\t\trepeat_year_label: \"Op\",\n\t\tselect_year_day2: \"van\",\n\t\trepeat_text_year_day: \"dag\",\n\t\tselect_year_month: \"maand\",\n\t\trepeat_radio_end: \"Geen eind datum\",\n\t\trepeat_text_occurences_count: \"keren\",\n\t\trepeat_radio_end3: \"Eindigd per\",\n\t\trepeat_radio_end2: \"Na\",\n\t\tmonth_for_recurring: [\"Januari\", \"Februari\", \"Maart\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Augustus\", \"September\", \"Oktober\", \"November\", \"December\"],\n\t\tday_for_recurring: [\"Zondag\", \"Maandag\", \"Dinsdag\", \"Woensdag\", \"Donderdag\", \"Vrijdag\", \"Zaterdag\"]\n\t}\n};\n\n\n","export default {\n\tdate: {\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\n\t\tday_short: [\"Søn\", \"Man\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\n\t},\n\tlabels: {\n\t\tdhx_cal_today_button: \"Idag\",\n\t\tday_tab: \"Dag\",\n\t\tweek_tab: \"Uke\",\n\t\tmonth_tab: \"Måned\",\n\t\tnew_event: \"Ny\",\n\t\ticon_save: \"Lagre\",\n\t\ticon_cancel: \"Avbryt\",\n\t\ticon_details: \"Detaljer\",\n\t\ticon_edit: \"Endre\",\n\t\ticon_delete: \"Slett\",\n\t\tconfirm_closing: \"Endringer blir ikke lagret, er du sikker?\", //Endringer blir ikke lagret, er du sikker?\n\t\tconfirm_deleting: \"Oppføringen vil bli slettet, er du sikker?\",\n\t\tsection_description: \"Beskrivelse\",\n\t\tsection_time: \"Tidsperiode\",\n\t\tfull_day: \"Full dag\",\n\n\t\t/*recurring events*/\n\t\tconfirm_recurring: \"Vil du endre hele settet med repeterende oppføringer?\",\n\t\tsection_recurring: \"Repeterende oppføring\",\n\t\tbutton_recurring: \"Ikke aktiv\",\n\t\tbutton_recurring_open: \"Aktiv\",\n\t\tbutton_edit_series: \"Rediger serien\",\n\t\tbutton_edit_occurrence: \"Redigere en kopi\",\n\n\t\t/*agenda view extension*/\n\t\tagenda_tab: \"Agenda\",\n\t\tdate: \"Dato\",\n\t\tdescription: \"Beskrivelse\",\n\n\t\t/*year view extension*/\n\t\tyear_tab: \"År\",\n\n\t\t/*week agenda view extension*/\n\t\tweek_agenda_tab: \"Agenda\",\n\n\t\t/*grid view extension*/\n\t\tgrid_tab: \"Grid\",\n\n\t\t/* touch tooltip*/\n\t\tdrag_to_create:\"Drag to create\",\n\t\tdrag_to_move:\"Drag to move\",\n\n\t\t/* dhtmlx message default buttons */\n\t\tmessage_ok:\"OK\",\n\t\tmessage_cancel:\"Cancel\",\n\n\t\t/* wai aria labels for non-text controls */\n\t\tnext: \"Next\",\n\t\tprev: \"Previous\",\n\t\tyear: \"Year\",\n\t\tmonth: \"Month\",\n\t\tday: \"Day\",\n\t\thour:\"Hour\",\n\t\tminute: \"Minute\"\n\t}\n};\n\n","export default {\n\tdate: {\n\t\tmonth_full: [\"Styczeń\", \"Luty\", \"Marzec\", \"Kwiecień\", \"Maj\", \"Czerwiec\", \"Lipiec\", \"Sierpień\", \"Wrzesień\", \"Październik\", \"Listopad\", \"Grudzień\"],\n\t\tmonth_short: [\"Sty\", \"Lut\", \"Mar\", \"Kwi\", \"Maj\", \"Cze\", \"Lip\", \"Sie\", \"Wrz\", \"Paź\", \"Lis\", \"Gru\"],\n\t\tday_full: [\"Niedziela\", \"Poniedziałek\", \"Wtorek\", \"Środa\", \"Czwartek\", \"Piątek\", \"Sobota\"],\n\t\tday_short: [\"Nie\", \"Pon\", \"Wto\", \"Śro\", \"Czw\", \"Pią\", \"Sob\"]\n\t},\n\tlabels: {\n\t\tdhx_cal_today_button: \"Dziś\",\n\t\tday_tab: \"Dzień\",\n\t\tweek_tab: \"Tydzień\",\n\t\tmonth_tab: \"Miesiąc\",\n\t\tnew_event: \"Nowe zdarzenie\",\n\t\ticon_save: \"Zapisz\",\n\t\ticon_cancel: \"Anuluj\",\n\t\ticon_details: \"Szczegóły\",\n\t\ticon_edit: \"Edytuj\",\n\t\ticon_delete: \"Usuń\",\n\t\tconfirm_closing: \"\", //Zmiany zostaną usunięte, jesteś pewien?\n\t\tconfirm_deleting: \"Zdarzenie zostanie usunięte na zawsze, kontynuować?\",\n\t\tsection_description: \"Opis\",\n\t\tsection_time: \"Okres czasu\",\n\t\tfull_day: \"Cały dzień\",\n\n\t\t/*recurring events*/\n\t\tconfirm_recurring: \"Czy chcesz edytować cały zbiór powtarzających się zdarzeń?\",\n\t\tsection_recurring: \"Powtórz zdarzenie\",\n\t\tbutton_recurring: \"Nieaktywne\",\n\t\tbutton_recurring_open: \"Aktywne\",\n\t\tbutton_edit_series: \"Edytuj serię\",\n\t\tbutton_edit_occurrence: \"Edytuj kopię\",\n\n\t\t/*agenda view extension*/\n\t\tagenda_tab: \"Agenda\",\n\t\tdate: \"Data\",\n\t\tdescription: \"Opis\",\n\n\t\t/*year view extension*/\n\t\tyear_tab: \"Rok\",\n\n\t\t/*week agenda view extension*/\n\t\tweek_agenda_tab: \"Agenda\",\n\n\t\t/*grid view extension*/\n\t\tgrid_tab: \"Tabela\",\n\n\t\t/* touch tooltip*/\n\t\tdrag_to_create:\"Drag to create\",\n\t\tdrag_to_move:\"Drag to move\",\n\n\t\t/* dhtmlx message default buttons */\n\t\tmessage_ok:\"OK\",\n\t\tmessage_cancel:\"Cancel\",\n\n\t\t/* wai aria labels for non-text controls */\n\t\tnext: \"Next\",\n\t\tprev: \"Previous\",\n\t\tyear: \"Year\",\n\t\tmonth: \"Month\",\n\t\tday: \"Day\",\n\t\thour:\"Hour\",\n\t\tminute: \"Minute\",\n\n\t\t/* recurring event components */\n\t\trepeat_radio_day: \"Codziennie\",\n\t\trepeat_radio_week: \"Co tydzie\",\n\t\trepeat_radio_month: \"Co miesic\",\n\t\trepeat_radio_year: \"Co rok\",\n\t\trepeat_radio_day_type: \"Kadego\",\n\t\trepeat_text_day_count: \"dnia\",\n\t\trepeat_radio_day_type2: \"Kadego dnia roboczego\",\n\t\trepeat_week: \" Powtarzaj kadego\",\n\t\trepeat_text_week_count: \"tygodnia w dni:\",\n\t\trepeat_radio_month_type: \"Powtrz\",\n\t\trepeat_radio_month_start: \"W\",\n\t\trepeat_text_month_day: \"dnia kadego\",\n\t\trepeat_text_month_count: \"miesica\",\n\t\trepeat_text_month_count2_before: \"kadego\",\n\t\trepeat_text_month_count2_after: \"miesica\",\n\t\trepeat_year_label: \"W\",\n\t\tselect_year_day2: \"miesica\",\n\t\trepeat_text_year_day: \"dnia miesica\",\n\t\tselect_year_month: \"\",\n\t\trepeat_radio_end: \"Bez daty kocowej\",\n\t\trepeat_text_occurences_count: \"wystpieniu/ach\",\n\t\trepeat_radio_end3: \"Zakocz w\",\n\t\trepeat_radio_end2: \"Po\",\n\t\tmonth_for_recurring: [\"Stycznia\", \"Lutego\", \"Marca\", \"Kwietnia\", \"Maja\", \"Czerwca\", \"Lipca\", \"Sierpnia\", \"Wrzenia\", \"Padziernka\", \"Listopada\", \"Grudnia\"],\n\t\tday_for_recurring: [\"Niedziela\", \"Poniedziaek\", \"Wtorek\", \"roda\", \"Czwartek\", \"Pitek\", \"Sobota\"]\n\t}\n};\n\n","/*\n\n TRANSLATION BY MATTHEUS PIROVANI RORIZ GONЗALVES\n\n mattheusroriz@hotmail.com / mattheus.pirovani@gmail.com /\n\n www.atrixian.com.br\n\n */\n\nexport default {\n\tdate: {\n\t\tmonth_full: [\"Janeiro\", \"Fevereiro\", \"Março\", \"Abril\", \"Maio\", \"Junho\", \"Julho\", \"Agosto\", \"Setembro\", \"Outubro\", \"Novembro\", \"Dezembro\"],\n\t\tmonth_short: [\"Jan\", \"Fev\", \"Mar\", \"Abr\", \"Mai\", \"Jun\", \"Jul\", \"Ago\", \"Set\", \"Out\", \"Nov\", \"Dez\"],\n\t\tday_full: [\"Domingo\", \"Segunda\", \"Terça\", \"Quarta\", \"Quinta\", \"Sexta\", \"Sábado\"],\n\t\tday_short: [\"Dom\", \"Seg\", \"Ter\", \"Qua\", \"Qui\", \"Sex\", \"Sab\"]\n\t},\n\tlabels: {\n\t\tdhx_cal_today_button: \"Hoje\",\n\t\tday_tab: \"Dia\",\n\t\tweek_tab: \"Semana\",\n\t\tmonth_tab: \"Mês\",\n\t\tnew_event: \"Novo evento\",\n\t\ticon_save: \"Salvar\",\n\t\ticon_cancel: \"Cancelar\",\n\t\ticon_details: \"Detalhes\",\n\t\ticon_edit: \"Editar\",\n\t\ticon_delete: \"Deletar\",\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\n\t\tconfirm_deleting: \"Tem certeza que deseja excluir?\",\n\t\tsection_description: \"Descrição\",\n\t\tsection_time: \"Período de tempo\",\n\t\tfull_day: \"Dia inteiro\",\n\n\t\tconfirm_recurring: \"Deseja editar todos esses eventos repetidos?\",\n\t\tsection_recurring: \"Repetir evento\",\n\t\tbutton_recurring: \"Desabilitar\",\n\t\tbutton_recurring_open: \"Habilitar\",\n\t\tbutton_edit_series: \"Editar a série\",\n\t\tbutton_edit_occurrence: \"Editar uma cópia\",\n\n\t\t/*agenda view extension*/\n\t\tagenda_tab: \"Dia\",\n\t\tdate: \"Data\",\n\t\tdescription: \"Descrição\",\n\n\t\t/*year view extension*/\n\t\tyear_tab: \"Ano\",\n\n\t\t/*week agenda view extension*/\n\t\tweek_agenda_tab: \"Dia\",\n\n\t\t/*grid view extension*/\n\t\tgrid_tab: \"Grade\",\n\n\t\t/* touch tooltip*/\n\t\tdrag_to_create:\"Drag to create\",\n\t\tdrag_to_move:\"Drag to move\",\n\n\t\t/* dhtmlx message default buttons */\n\t\tmessage_ok:\"OK\",\n\t\tmessage_cancel:\"Cancel\",\n\n\t\t/* wai aria labels for non-text controls */\n\t\tnext: \"Next\",\n\t\tprev: \"Previous\",\n\t\tyear: \"Year\",\n\t\tmonth: \"Month\",\n\t\tday: \"Day\",\n\t\thour:\"Hour\",\n\t\tminute: \"Minute\",\n\n\t\t/* recurring event components */\n\t\trepeat_radio_day: \"Diário\",\n\t\trepeat_radio_week: \"Semanal\",\n\t\trepeat_radio_month: \"Mensal\",\n\t\trepeat_radio_year: \"Anual\",\n\t\trepeat_radio_day_type: \"Cada\",\n\t\trepeat_text_day_count: \"dia(s)\",\n\t\trepeat_radio_day_type2: \"Cada trabalho diário\",\n\t\trepeat_week: \" Repita cada\",\n\t\trepeat_text_week_count: \"semana:\",\n\t\trepeat_radio_month_type: \"Repetir\",\n\t\trepeat_radio_month_start: \"Em\",\n\t\trepeat_text_month_day: \"todo dia\",\n\t\trepeat_text_month_count: \"mês\",\n\t\trepeat_text_month_count2_before: \"todo\",\n\t\trepeat_text_month_count2_after: \"mês\",\n\t\trepeat_year_label: \"Em\",\n\t\tselect_year_day2: \"of\",\n\t\trepeat_text_year_day: \"dia\",\n\t\tselect_year_month: \"mês\",\n\t\trepeat_radio_end: \"Sem data final\",\n\t\trepeat_text_occurences_count: \"ocorrências\",\n\t\trepeat_radio_end3: \"Fim\",\n\t\trepeat_radio_end2: \"Depois\",\n\t\tmonth_for_recurring: [\"Janeiro\", \"Fevereiro\", \"Março\", \"Abril\", \"Maio\", \"Junho\", \"Julho\", \"Agosto\", \"Setembro\", \"Outubro\", \"Novembro\", \"Dezembro\"],\n\t\tday_for_recurring: [\"Domingo\", \"Segunda\", \"Terça\", \"Quarta\", \"Quinta\", \"Sexta\", \"Sábado\"]\n\t}\n};\n\n\n","/*\n\tTraducere de Ovidiu Lixandru: http://www.madball.ro\n */\n\nexport default {\n\tdate:{\n\t\tmonth_full:[\"Ianuarie\", \"Februarie\", \"Martie\", \"Aprilie\", \"Mai\", \"Iunie\", \"Iulie\", \"August\", \"Septembrie\", \"Octombrie\", \"November\", \"December\"],\n\t\tmonth_short:[\"Ian\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Iun\", \"Iul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\n\t\tday_full:[\"Duminica\", \"Luni\", \"Marti\", \"Miercuri\", \"Joi\", \"Vineri\", \"Sambata\"],\n\t\tday_short:[\"Du\", \"Lu\", \"Ma\", \"Mi\", \"Jo\", \"Vi\", \"Sa\"]\n\t},\n\tlabels:{\n\t\tdhx_cal_today_button:\"Astazi\",\n\t\tday_tab:\"Zi\",\n\t\tweek_tab:\"Saptamana\",\n\t\tmonth_tab:\"Luna\",\n\t\tnew_event:\"Eveniment nou\",\n\t\ticon_save:\"Salveaza\",\n\t\ticon_cancel:\"Anuleaza\",\n\t\ticon_details:\"Detalii\",\n\t\ticon_edit:\"Editeaza\",\n\t\ticon_delete:\"Sterge\",\n\t\tconfirm_closing:\"Schimbarile nu vor fi salvate, esti sigur?\",//Your changes will be lost, are your sure ?\n\t\tconfirm_deleting:\"Evenimentul va fi sters permanent, esti sigur?\",\n\t\tsection_description:\"Descriere\",\n\t\tsection_time:\"Interval\",\n\t\tfull_day:\"Toata ziua\",\n\n\t\t/*recurring events*/\n\t\tconfirm_recurring:\"Vrei sa editezi toata seria de evenimente repetate?\",\n\t\tsection_recurring:\"Repetare\",\n\t\tbutton_recurring:\"Dezactivata\",\n\t\tbutton_recurring_open:\"Activata\",\n\t\tbutton_edit_series: \"Editeaza serie\",\n\t\tbutton_edit_occurrence: \"Editeaza doar intrare\",\n\n\t\t/*agenda view extension*/\n\t\tagenda_tab:\"Agenda\",\n\t\tdate:\"Data\",\n\t\tdescription:\"Descriere\",\n\n\t\t/*year view extension*/\n\t\tyear_tab:\"An\",\n\n\t\t/* week agenda extension */\n\t\tweek_agenda_tab: \"Agenda\",\n\n\t\t/*grid view extension*/\n\t\tgrid_tab: \"Lista\",\n\n\t\t/* touch tooltip*/\n\t\tdrag_to_create:\"Drag to create\",\n\t\tdrag_to_move:\"Drag to move\",\n\n\t\t/* dhtmlx message default buttons */\n\t\tmessage_ok:\"OK\",\n\t\tmessage_cancel:\"Cancel\",\n\n\t\t/* wai aria labels for non-text controls */\n\t\tnext: \"Next\",\n\t\tprev: \"Previous\",\n\t\tyear: \"Year\",\n\t\tmonth: \"Month\",\n\t\tday: \"Day\",\n\t\thour:\"Hour\",\n\t\tminute: \"Minute\",\n\n\t\t/* recurring event components */\n\t\trepeat_radio_day: \"Zilnic\",\n\t\trepeat_radio_week: \"Saptamanal\",\n\t\trepeat_radio_month: \"Lunar\",\n\t\trepeat_radio_year: \"Anual\",\n\t\trepeat_radio_day_type: \"La fiecare\",\n\t\trepeat_text_day_count: \"zi(le)\",\n\t\trepeat_radio_day_type2: \"Fiecare zi lucratoare\",\n\t\trepeat_week: \" Repeta la fiecare\",\n\t\trepeat_text_week_count: \"saptamana in urmatoarele zile:\",\n\t\trepeat_radio_month_type: \"Repeta in\",\n\t\trepeat_radio_month_start: \"In a\",\n\t\trepeat_text_month_day: \"zi la fiecare\",\n\t\trepeat_text_month_count: \"luni\",\n\t\trepeat_text_month_count2_before: \"la fiecare\",\n\t\trepeat_text_month_count2_after: \"luni\",\n\t\trepeat_year_label: \"In\",\n\t\tselect_year_day2: \"a lunii\",\n\t\trepeat_text_year_day: \"zi a lunii\",\n\t\tselect_year_month: \"\",\n\t\trepeat_radio_end: \"Fara data de sfarsit\",\n\t\trepeat_text_occurences_count: \"evenimente\",\n\t\trepeat_radio_end3: \"La data\",\n\t\trepeat_radio_end2: \"Dupa\",\n\t\tmonth_for_recurring: [\"Ianuarie\", \"Februarie\", \"Martie\", \"Aprilie\", \"Mai\", \"Iunie\", \"Iulie\", \"August\", \"Septembrie\", \"Octombrie\", \"Noiembrie\", \"Decembrie\"],\n\t\tday_for_recurring: [\"Duminica\", \"Luni\", \"Marti\", \"Miercuri\", \"Joi\", \"Vineri\", \"Sambata\"]\n\t}\n};\n\n","export default {\n\tdate: {\n\t\tmonth_full: [\"Январь\", \"Февраль\", \"Март\", \"Апрель\", \"Maй\", \"Июнь\", \"Июль\", \"Август\", \"Сентябрь\", \"Oктябрь\", \"Ноябрь\", \"Декабрь\"],\n\t\tmonth_short: [\"Янв\", \"Фев\", \"Maр\", \"Aпр\", \"Maй\", \"Июн\", \"Июл\", \"Aвг\", \"Сен\", \"Окт\", \"Ноя\", \"Дек\"],\n\t\tday_full: [ \"Воскресенье\", \"Понедельник\", \"Вторник\", \"Среда\", \"Четверг\", \"Пятница\", \"Суббота\"],\n\t\tday_short: [\"Вс\", \"Пн\", \"Вт\", \"Ср\", \"Чт\", \"Пт\", \"Сб\"]\n\t},\n\tlabels: {\n\t\tdhx_cal_today_button: \"Сегодня\",\n\t\tday_tab: \"День\",\n\t\tweek_tab: \"Неделя\",\n\t\tmonth_tab: \"Месяц\",\n\t\tnew_event: \"Новое событие\",\n\t\ticon_save: \"Сохранить\",\n\t\ticon_cancel: \"Отменить\",\n\t\ticon_details: \"Детали\",\n\t\ticon_edit: \"Изменить\",\n\t\ticon_delete: \"Удалить\",\n\t\tconfirm_closing: \"\", //Ваши изменения будут потеряны, продолжить?\n\t\tconfirm_deleting: \"Событие будет удалено безвозвратно, продолжить?\",\n\t\tsection_description: \"Описание\",\n\t\tsection_time: \"Период времени\",\n\t\tfull_day: \"Весь день\",\n\n\t\tconfirm_recurring: \"Вы хотите изменить всю серию повторяющихся событий?\",\n\t\tsection_recurring: \"Повторение\",\n\t\tbutton_recurring: \"Отключено\",\n\t\tbutton_recurring_open: \"Включено\",\n\t\tbutton_edit_series: \"Редактировать серию\",\n\t\tbutton_edit_occurrence: \"Редактировать экземпляр\",\n\n\t\t/*agenda view extension*/\n\t\tagenda_tab: \"Список\",\n\t\tdate: \"Дата\",\n\t\tdescription: \"Описание\",\n\n\t\t/*year view extension*/\n\t\tyear_tab: \"Год\",\n\n\t\t/*week agenda view extension*/\n\t\tweek_agenda_tab: \"Список\",\n\n\t\t/*grid view extension*/\n\t\tgrid_tab: \"Таблица\",\n\n\t\t/* touch tooltip*/\n\t\tdrag_to_create:\"Drag to create\",\n\t\tdrag_to_move:\"Drag to move\",\n\n\t\t/* dhtmlx message default buttons */\n\t\tmessage_ok:\"OK\",\n\t\tmessage_cancel:\"Cancel\",\n\n\t\t/* wai aria labels for non-text controls */\n\t\tnext: \"Next\",\n\t\tprev: \"Previous\",\n\t\tyear: \"Year\",\n\t\tmonth: \"Month\",\n\t\tday: \"Day\",\n\t\thour:\"Hour\",\n\t\tminute: \"Minute\",\n\n\t\t/* recurring event components */\n\t\trepeat_radio_day: \"День\",\n\t\trepeat_radio_week: \"Неделя\",\n\t\trepeat_radio_month: \"Месяц\",\n\t\trepeat_radio_year: \"Год\",\n\t\trepeat_radio_day_type: \"Каждый\",\n\t\trepeat_text_day_count: \"день\",\n\t\trepeat_radio_day_type2: \"Каждый рабочий день\",\n\t\trepeat_week: \" Повторять каждую\",\n\t\trepeat_text_week_count: \"неделю , в:\",\n\t\trepeat_radio_month_type: \"Повторять\",\n\t\trepeat_radio_month_start: \"\",\n\t\trepeat_text_month_day: \" числа каждый \",\n\t\trepeat_text_month_count: \"месяц\",\n\t\trepeat_text_month_count2_before: \"каждый \",\n\t\trepeat_text_month_count2_after: \"месяц\",\n\t\trepeat_year_label: \"\",\n\t\tselect_year_day2: \"\",\n\t\trepeat_text_year_day: \"день\",\n\t\tselect_year_month: \"\",\n\t\trepeat_radio_end: \"Без даты окончания\",\n\t\trepeat_text_occurences_count: \"повторений\",\n\t\trepeat_radio_end3: \"До \",\n\t\trepeat_radio_end2: \"\",\n\t\tmonth_for_recurring: [\"Января\", \"Февраля\", \"Марта\", \"Апреля\", \"Мая\", \"Июня\", \"Июля\", \"Августа\", \"Сентября\", \"Октября\", \"Ноября\", \"Декабря\"],\n\t\tday_for_recurring: [\"Воскресенье\", \"Понедельник\", \"Вторник\", \"Среду\", \"Четверг\", \"Пятницу\", \"Субботу\"]\n\t}\n};\n","export default {\n\tdate: {\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Marec\", \"April\", \"Maj\", \"Junij\", \"Julij\", \"Avgust\", \"September\", \"Oktober\", \"November\", \"December\"],\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\n\t\tday_full: [\"Nedelja\", \"Ponedeljek\", \"Torek\", \"Sreda\", \"Četrtek\", \"Petek\", \"Sobota\"],\n\t\tday_short: [\"Ned\", \"Pon\", \"Tor\", \"Sre\", \"Čet\", \"Pet\", \"Sob\"]\n\t},\n\tlabels: {\n\t\tdhx_cal_today_button: \"Danes\",\n\t\tday_tab: \"Dan\",\n\t\tweek_tab: \"Teden\",\n\t\tmonth_tab: \"Mesec\",\n\t\tnew_event: \"Nov dogodek\",\n\t\ticon_save: \"Shrani\",\n\t\ticon_cancel: \"Prekliči\",\n\t\ticon_details: \"Podrobnosti\",\n\t\ticon_edit: \"Uredi\",\n\t\ticon_delete: \"Izbriši\",\n\t\tconfirm_closing: \"\", //Spremembe ne bodo shranjene. Želite nadaljevati ?\n\t\tconfirm_deleting: \"Dogodek bo izbrisan. Želite nadaljevati?\",\n\t\tsection_description: \"Opis\",\n\t\tsection_time: \"Časovni okvir\",\n\t\tfull_day: \"Ves dan\",\n\n\t\t/*recurring events*/\n\t\tconfirm_recurring: \"Želite urediti celoten set ponavljajočih dogodkov?\",\n\t\tsection_recurring: \"Ponovi dogodek\",\n\t\tbutton_recurring: \"Onemogočeno\",\n\t\tbutton_recurring_open: \"Omogočeno\",\n\t\tbutton_edit_series: \"Edit series\",\n\t\tbutton_edit_occurrence: \"Edit occurrence\",\n\n\t\t/*agenda view extension*/\n\t\tagenda_tab: \"Zadeva\",\n\t\tdate: \"Datum\",\n\t\tdescription: \"Opis\",\n\n\t\t/*year view extension*/\n\t\tyear_tab: \"Leto\",\n\n\t\t/*week agenda view extension*/\n\t\tweek_agenda_tab: \"Zadeva\",\n\n\t\t/*grid view extension*/\n\t\tgrid_tab: \"Miza\",\n\n\t\t/* touch tooltip*/\n\t\tdrag_to_create:\"Drag to create\",\n\t\tdrag_to_move:\"Drag to move\",\n\n\t\t/* dhtmlx message default buttons */\n\t\tmessage_ok:\"OK\",\n\t\tmessage_cancel:\"Cancel\",\n\n\t\t/* wai aria labels for non-text controls */\n\t\tnext: \"Next\",\n\t\tprev: \"Previous\",\n\t\tyear: \"Year\",\n\t\tmonth: \"Month\",\n\t\tday: \"Day\",\n\t\thour:\"Hour\",\n\t\tminute: \"Minute\"\n\t}\n};\n\n","export default {\n\tdate: {\n\t\tmonth_full: [\"Január\", \"Február\", \"Marec\", \"Apríl\", \"Máj\", \"Jún\", \"Júl\", \"August\", \"September\", \"Október\", \"November\", \"December\"],\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Máj\", \"Jún\", \"Júl\", \"Aug\", \"Sept\", \"Okt\", \"Nov\", \"Dec\"],\n\t\tday_full: [\"Nedeľa\", \"Pondelok\", \"Utorok\", \"Streda\", \"Štvrtok\", \"Piatok\", \"Sobota\"],\n\t\tday_short: [\"Ne\", \"Po\", \"Ut\", \"St\", \"Št\", \"Pi\", \"So\"]\n\t},\n\tlabels: {\n\t\tdhx_cal_today_button: \"Dnes\",\n\t\tday_tab: \"Deň\",\n\t\tweek_tab: \"Týždeň\",\n\t\tmonth_tab: \"Mesiac\",\n\t\tnew_event: \"Nová udalosť\",\n\t\ticon_save: \"Uložiť\",\n\t\ticon_cancel: \"Späť\",\n\t\ticon_details: \"Detail\",\n\t\ticon_edit: \"Edituj\",\n\t\ticon_delete: \"Zmazať\",\n\t\tconfirm_closing: \"Vaše zmeny nebudú uložené. Skutočne?\", //Vaše změny budou ztraceny, opravdu ?\n\t\tconfirm_deleting: \"Udalosť bude natrvalo vymazaná. Skutočne?\",\n\t\tsection_description: \"Poznámky\",\n\t\tsection_time: \"Doba platnosti\",\n\n\t\t/*recurring events*/\n\t\tconfirm_recurring: \"Prajete si upraviť celú radu opakovaných udalostí?\",\n\t\tsection_recurring: \"Opakovanie udalosti\",\n\t\tbutton_recurring: \"Vypnuté\",\n\t\tbutton_recurring_open: \"Zapnuté\",\n\t\tbutton_edit_series: \"Upraviť opakovania\",\n\t\tbutton_edit_occurrence: \"Upraviť inštancie\",\n\n\t\t/*agenda view extension*/\n\t\tagenda_tab: \"Program\",\n\t\tdate: \"Dátum\",\n\t\tdescription: \"Poznámka\",\n\n\t\t/*year view extension*/\n\t\tyear_tab: \"Rok\",\n\t\tfull_day: \"Celý deň\", // Full day\n\n\t\t/*week agenda view extension*/\n\t\tweek_agenda_tab: \"Program\",\n\n\t\t/*grid view extension*/\n\t\tgrid_tab: \"Mriežka\",\n\n\t\t/* touch tooltip*/\n\t\tdrag_to_create:\"Drag to create\",\n\t\tdrag_to_move:\"Drag to move\",\n\n\t\t/* dhtmlx message default buttons */\n\t\tmessage_ok:\"OK\",\n\t\tmessage_cancel:\"Cancel\",\n\n\t\t/* wai aria labels for non-text controls */\n\t\tnext: \"Next\",\n\t\tprev: \"Previous\",\n\t\tyear: \"Year\",\n\t\tmonth: \"Month\",\n\t\tday: \"Day\",\n\t\thour:\"Hour\",\n\t\tminute: \"Minute\",\n\n\t\t/* recurring event components */\n\t\trepeat_radio_day: \"Denne\",\n\t\trepeat_radio_week: \"Týždenne\",\n\t\trepeat_radio_month: \"Mesaène\",\n\t\trepeat_radio_year: \"Roène\",\n\t\trepeat_radio_day_type: \"Každý\",\n\t\trepeat_text_day_count: \"deò\",\n\t\trepeat_radio_day_type2: \"Každý prac. deò\",\n\t\trepeat_week: \"Opakova každý\",\n\t\trepeat_text_week_count: \"týždeò v dòoch:\",\n\t\trepeat_radio_month_type: \"Opakova\",\n\t\trepeat_radio_month_start: \"On\",\n\t\trepeat_text_month_day: \"deò každý\",\n\t\trepeat_text_month_count: \"mesiac\",\n\t\trepeat_text_month_count2_before: \"každý\",\n\t\trepeat_text_month_count2_after: \"mesiac\",\n\t\trepeat_year_label: \"On\",\n\t\tselect_year_day2: \"poèas\",\n\t\trepeat_text_year_day: \"deò\",\n\t\tselect_year_month: \"mesiac\",\n\t\trepeat_radio_end: \"Bez dátumu ukonèenia\",\n\t\trepeat_text_occurences_count: \"udalostiach\",\n\t\trepeat_radio_end3: \"Ukonèi\",\n\t\trepeat_radio_end2: \"Po\",\n\t\tmonth_for_recurring: [\"Január\", \"Február\", \"Marec\", \"Apríl\", \"Máj\", \"Jún\", \"Júl\", \"August\", \"September\", \"Október\", \"November\", \"December\"],\n\t\tday_for_recurring: [\"Nede¾a\", \"Pondelok\", \"Utorok\", \"Streda\", \"Štvrtok\", \"Piatok\", \"Sobota\"]\n\t}\n};\n\n","export default {\n\tdate: {\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Mars\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"Augusti\", \"September\", \"Oktober\", \"November\", \"December\"],\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\n\t\tday_full: [\"Söndag\", \"Måndag\", \"Tisdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lördag\"],\n\t\tday_short: [\"Sön\", \"Mån\", \"Tis\", \"Ons\", \"Tor\", \"Fre\", \"Lör\"]\n\t},\n\tlabels: {\n\t\tdhx_cal_today_button: \"Idag\",\n\t\tday_tab: \"Dag\",\n\t\tweek_tab: \"Vecka\",\n\t\tmonth_tab: \"Månad\",\n\t\tnew_event: \"Ny händelse\",\n\t\ticon_save: \"Spara\",\n\t\ticon_cancel: \"Ångra\",\n\t\ticon_details: \"Detaljer\",\n\t\ticon_edit: \"Ändra\",\n\t\ticon_delete: \"Ta bort\",\n\t\tconfirm_closing: \"\", //Dina förändingar kommer gå förlorade, är du säker?\n\t\tconfirm_deleting: \"Är du säker på att du vill ta bort händelsen permanent?\",\n\t\tsection_description: \"Beskrivning\",\n\t\tsection_time: \"Tid\",\n\t\tfull_day: \"Hela dagen\",\n\n\t\t/*recurring events*/\n\t\tconfirm_recurring: \"Vill du redigera hela serien med repeterande händelser?\",\n\t\tsection_recurring: \"Upprepa händelse\",\n\t\tbutton_recurring: \"Inaktiverat\",\n\t\tbutton_recurring_open: \"Aktiverat\",\n\t\tbutton_edit_series: \"Redigera serien\",\n\t\tbutton_edit_occurrence: \"Redigera en kopia\",\n\n\t\t/*agenda view extension*/\n\t\tagenda_tab: \"Dagordning\",\n\t\tdate: \"Datum\",\n\t\tdescription: \"Beskrivning\",\n\n\t\t/*year view extension*/\n\t\tyear_tab: \"År\",\n\n\t\t/*week agenda view extension*/\n\t\tweek_agenda_tab: \"Dagordning\",\n\n\t\t/*grid view extension*/\n\t\tgrid_tab: \"Galler\",\n\n\t\t/* touch tooltip*/\n\t\tdrag_to_create:\"Dra för att skapa ny\",\n\t\tdrag_to_move:\"Dra för att flytta\",\n\n\t\t/* dhtmlx message default buttons */\n\t\tmessage_ok:\"OK\",\n\t\tmessage_cancel:\"Cancel\",\n\n\t\t/* wai aria labels for non-text controls */\n\t\tnext: \"Next\",\n\t\tprev: \"Previous\",\n\t\tyear: \"Year\",\n\t\tmonth: \"Month\",\n\t\tday: \"Day\",\n\t\thour:\"Hour\",\n\t\tminute: \"Minute\",\n\n\t\t/* recurring event components */\n\t\trepeat_radio_day: \"Dagligen\",\n\t\trepeat_radio_week: \"Veckovis\",\n\t\trepeat_radio_month: \"Månadsvis\",\n\t\trepeat_radio_year: \"Årligen\",\n\t\trepeat_radio_day_type: \"Var\",\n\t\trepeat_text_day_count: \"dag\",\n\t\trepeat_radio_day_type2: \"Varje arbetsdag\",\n\t\trepeat_week: \" Upprepa var\",\n\t\trepeat_text_week_count: \"vecka dessa dagar:\",\n\t\trepeat_radio_month_type: \"Upprepa\",\n\t\trepeat_radio_month_start: \"Den\",\n\t\trepeat_text_month_day: \"dagen var\",\n\t\trepeat_text_month_count: \"månad\",\n\t\trepeat_text_month_count2_before: \"var\",\n\t\trepeat_text_month_count2_after: \"månad\",\n\t\trepeat_year_label: \"Den\",\n\t\tselect_year_day2: \"i\",\n\t\trepeat_text_year_day: \"dag i\",\n\t\tselect_year_month: \"månad\",\n\t\trepeat_radio_end: \"Inget slutdatum\",\n\t\trepeat_text_occurences_count: \"upprepningar\",\n\t\trepeat_radio_end3: \"Sluta efter\",\n\t\trepeat_radio_end2: \"Efter\",\n\t\tmonth_for_recurring: [\"Januari\", \"Februari\", \"Mars\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"Augusti\", \"September\", \"Oktober\", \"November\", \"December\"],\n\t\tday_for_recurring: [\"Söndag\", \"Måndag\", \"Tisdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lördag\"]\n\t}\n};\n","export default {\n\tdate: {\n\t\tmonth_full: [\"Ocak\", \"Þubat\", \"Mart\", \"Nisan\", \"Mayýs\", \"Haziran\", \"Temmuz\", \"Aðustos\", \"Eylül\", \"Ekim\", \"Kasým\", \"Aralýk\"],\n\t\tmonth_short: [\"Oca\", \"Þub\", \"Mar\", \"Nis\", \"May\", \"Haz\", \"Tem\", \"Aðu\", \"Eyl\", \"Eki\", \"Kas\", \"Ara\"],\n\t\tday_full: [\"Pazar\", \"Pazartes,\", \"Salý\", \"Çarþamba\", \"Perþembe\", \"Cuma\", \"Cumartesi\"],\n\t\tday_short: [\"Paz\", \"Pts\", \"Sal\", \"Çar\", \"Per\", \"Cum\", \"Cts\"]\n\t},\n\tlabels: {\n\t\tdhx_cal_today_button: \"Bugün\",\n\t\tday_tab: \"Gün\",\n\t\tweek_tab: \"Hafta\",\n\t\tmonth_tab: \"Ay\",\n\t\tnew_event: \"Uygun\",\n\t\ticon_save: \"Kaydet\",\n\t\ticon_cancel: \"Ýptal\",\n\t\ticon_details: \"Detaylar\",\n\t\ticon_edit: \"Düzenle\",\n\t\ticon_delete: \"Sil\",\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\n\t\tconfirm_deleting: \"Etkinlik silinecek, devam?\",\n\t\tsection_description: \"Açýklama\",\n\t\tsection_time: \"Zaman aralýðý\",\n\t\tfull_day: \"Tam gün\",\n\n\t\t/*recurring events*/\n\t\tconfirm_recurring: \"Tüm tekrar eden etkinlikler silinecek, devam?\",\n\t\tsection_recurring: \"Etkinliði tekrarla\",\n\t\tbutton_recurring: \"Pasif\",\n\t\tbutton_recurring_open: \"Aktif\",\n\t\tbutton_edit_series: \"Dizi düzenleme\",\n\t\tbutton_edit_occurrence: \"Bir kopyasını düzenleyin\",\n\n\t\t/*agenda view extension*/\n\t\tagenda_tab: \"Ajanda\",\n\t\tdate: \"Tarih\",\n\t\tdescription: \"Açýklama\",\n\n\t\t/*year view extension*/\n\t\tyear_tab: \"Yýl\",\n\n\t\t/*week agenda view extension*/\n\t\tweek_agenda_tab: \"Ajanda\",\n\n\t\t/*grid view extension*/\n\t\tgrid_tab: \"Izgara\",\n\n\t\t/* touch tooltip*/\n\t\tdrag_to_create:\"Drag to create\",\n\t\tdrag_to_move:\"Drag to move\",\n\n\t\t/* dhtmlx message default buttons */\n\t\tmessage_ok:\"OK\",\n\t\tmessage_cancel:\"Cancel\",\n\n\t\t/* wai aria labels for non-text controls */\n\t\tnext: \"Next\",\n\t\tprev: \"Previous\",\n\t\tyear: \"Year\",\n\t\tmonth: \"Month\",\n\t\tday: \"Day\",\n\t\thour:\"Hour\",\n\t\tminute: \"Minute\"\n\t}\n};","export default {\n\tdate: {\n\t\tmonth_full: [\"Січень\", \"Лютий\", \"Березень\", \"Квітень\", \"Травень\", \"Червень\", \"Липень\", \"Серпень\", \"Вересень\", \"Жовтень\", \"Листопад\", \"Грудень\"],\n\t\tmonth_short: [\"Січ\", \"Лют\", \"Бер\", \"Кві\", \"Тра\", \"Чер\", \"Лип\", \"Сер\", \"Вер\", \"Жов\", \"Лис\", \"Гру\"],\n\t\tday_full: [\"Неділя\", \"Понеділок\", \"Вівторок\", \"Середа\", \"Четвер\", \"П'ятниця\", \"Субота\"],\n\t\tday_short: [\"Нед\", \"Пон\", \"Вів\", \"Сер\", \"Чет\", \"Птн\", \"Суб\"]\n\t},\n\tlabels: {\n\t\tdhx_cal_today_button: \"Сьогодні\",\n\t\tday_tab: \"День\",\n\t\tweek_tab: \"Тиждень\",\n\t\tmonth_tab: \"Місяць\",\n\t\tnew_event: \"Нова подія\",\n\t\ticon_save: \"Зберегти\",\n\t\ticon_cancel: \"Відміна\",\n\t\ticon_details: \"Деталі\",\n\t\ticon_edit: \"Редагувати\",\n\t\ticon_delete: \"Вилучити\",\n\t\tconfirm_closing: \"\", //Ваші зміни втратяться. Ви впевнені ?\n\t\tconfirm_deleting: \"Подія вилучиться назавжди. Ви впевнені?\",\n\t\tsection_description: \"Опис\",\n\t\tsection_time: \"Часовий проміжок\",\n\t\tfull_day: \"Весь день\",\n\n\t\t/*recurring events*/\n\t\tconfirm_recurring: \"Хочете редагувати весь перелік повторюваних подій?\",\n\t\tsection_recurring: \"Повторювана подія\",\n\t\tbutton_recurring: \"Відключено\",\n\t\tbutton_recurring_open: \"Включено\",\n\t\tbutton_edit_series: \"Редагувати серію\",\n\t\tbutton_edit_occurrence: \"Редагувати примірник\",\n\n\t\t/*agenda view extension*/\n\t\tagenda_tab: \"Перелік\",\n\t\tdate: \"Дата\",\n\t\tdescription: \"Опис\",\n\n\t\t/*year view extension*/\n\t\tyear_tab: \"Рік\",\n\n\t\t/*week agenda view extension*/\n\t\tweek_agenda_tab: \"Перелік\",\n\n\t\t/*grid view extension*/\n\t\tgrid_tab: \"Таблиця\",\n\n\t\t/* touch tooltip*/\n\t\tdrag_to_create:\"Drag to create\",\n\t\tdrag_to_move:\"Drag to move\",\n\n\t\t/* dhtmlx message default buttons */\n\t\tmessage_ok:\"OK\",\n\t\tmessage_cancel:\"Cancel\",\n\n\t\t/* wai aria labels for non-text controls */\n\t\tnext: \"Next\",\n\t\tprev: \"Previous\",\n\t\tyear: \"Year\",\n\t\tmonth: \"Month\",\n\t\tday: \"Day\",\n\t\thour:\"Hour\",\n\t\tminute: \"Minute\",\n\n\t\t/* recurring event components */\n\t\trepeat_radio_day: \"День\",\n\t\trepeat_radio_week: \"Тиждень\",\n\t\trepeat_radio_month: \"Місяць\",\n\t\trepeat_radio_year: \"Рік\",\n\t\trepeat_radio_day_type: \"Кожний\",\n\t\trepeat_text_day_count: \"день\",\n\t\trepeat_radio_day_type2: \"Кожний робочий день\",\n\t\trepeat_week: \" Повторювати кожен\",\n\t\trepeat_text_week_count: \"тиждень , по:\",\n\t\trepeat_radio_month_type: \"Повторювати\",\n\t\trepeat_radio_month_start: \"\",\n\t\trepeat_text_month_day: \" числа кожний \",\n\t\trepeat_text_month_count: \"місяць\",\n\t\trepeat_text_month_count2_before: \"кожен \",\n\t\trepeat_text_month_count2_after: \"місяць\",\n\t\trepeat_year_label: \"\",\n\t\tselect_year_day2: \"\",\n\t\trepeat_text_year_day: \"день\",\n\t\tselect_year_month: \"\",\n\t\trepeat_radio_end: \"Без дати закінчення\",\n\t\trepeat_text_occurences_count: \"повторень\",\n\t\trepeat_radio_end3: \"До \",\n\t\trepeat_radio_end2: \"\",\n\t\tmonth_for_recurring: [\"січня\", \"лютого\", \"березня\", \"квітня\", \"травня\", \"червня\", \"липня\", \"серпня\", \"вересня\", \"жовтня\", \"листопада\", \"грудня\"],\n\t\tday_for_recurring: [\"Неділям\", \"Понеділкам\", \"Вівторкам\", \"Середам\", \"Четвергам\", \"П'ятницям\", \"Суботам\"]\n\t}\n};\n","import eventable from \"../utils/eventable\";\n\nexport class DatePicker {\n\tconstructor(scheduler, container, state = {}) {\n\t\tthis.state = {\n\t\t\tdate: new Date(),\n\t\t\tmodes: ['days', 'months', 'years'],\n\t\t\tcurrentRange: [],\n\t\t\teventDates: [],\n\t\t\tcurrentModeIndex: 0,\n\t\t\t...state\n\t\t};\n\t\tthis.container = null;\n\t\tthis.element = null;\n\t\tthis.onStateChangeHandlers = [];\n\t\tthis.scheduler = scheduler;\n\t\tthis._domEvents = scheduler._createDomEventScope();\n\t\tthis.state = this.getState();\n\t\teventable(this);\n\t\tif(container){\n\n\t\t\tthis.container = container;\n\t\t\tthis.render(this.container);\n\t\t}\n\n\t\tthis.onStateChange((oldState, newState) => {\n\t\t\tthis.callEvent(\"onStateChange\", [newState, oldState]);\n\t\t});\n\t}\n\n\tgetState() {\n\t\treturn { \n\t\t\t...this.state,\n\t\t\tmode: this.state.modes[this.state.currentModeIndex]\n\t\t};\n\t}\n\n\tsetState(newState) {\n\t\tconst oldState = { ...this.state };\n\t\tif(newState.mode){\n\t\t\tnewState.currentModeIndex = this.state.modes.indexOf(newState.mode);\n\t\t}\n\t\tthis.state = { ...this.state, ...newState };\n\n\t\tthis._notifyStateChange(oldState, this.state);\n\n\t\tif (this.container) {\n\t\t\tthis.render(this.container);\n\t\t}\n\t}\n\n\tonStateChange(handler) {\n\t\tthis.onStateChangeHandlers.push(handler);\n\n\t\t// function to remove the handler\n\t\treturn () => {\n\t\t\tconst index = this.onStateChangeHandlers.indexOf(handler);\n\t\t\tif (index !== -1) {\n\t\t\t\tthis.onStateChangeHandlers.splice(index, 1);\n\t\t\t}\n\t\t};\n\t}\n\n\t_notifyStateChange(oldState, newState) {\n\t\tthis.onStateChangeHandlers.forEach(handler => handler(oldState, newState));\n\t}\n\n\t_adjustDate(direction) {\n\n\t\tconst {mode, date} = this.getState();\n\t\tconst newDate = new Date(date);\n\t\tif (mode === 'days') {\n\t\t\tnewDate.setMonth(date.getMonth() + direction);\n\t\t} else if (mode === 'months') {\n\t\t\tnewDate.setFullYear(date.getFullYear() + direction);\n\t\t} else {\n\t\t\tnewDate.setFullYear(date.getFullYear() + direction * 10);\n\t\t}\n\t\tthis.setState({ date: newDate });\n\t}\n\n\t_toggleMode() {\n\t\tconst newIndex = (this.state.currentModeIndex + 1) % this.state.modes.length;\n\t\tthis.setState({ currentModeIndex: newIndex });\n\t}\n\n\t_renderCalendarHeader(container) {\n\t\tconst {mode, date} = this.getState();\n\n\t\tconst header = document.createElement('div');\n\t\theader.classList.add('dhx_cal_datepicker_header');\n\n\t\tconst backwardArrow = document.createElement('button');\n\n\t\tbackwardArrow.classList.add(\"dhx_cal_datepicker_arrow\", \"scheduler_icon\", \"arrow_left\");\n\t\theader.appendChild(backwardArrow);\n\n\t\tconst monthLabel = document.createElement('div');\n\t\tmonthLabel.classList.add('dhx_cal_datepicker_title');\n\n\t\tif (mode === 'days') {\n\t\t\tmonthLabel.innerText = date.toLocaleString('default', { month: 'long' }) + ' ' + date.getFullYear();\n\t\t} else if (mode === 'months') {\n\t\t\tmonthLabel.innerText = date.getFullYear();\n\t\t} else {\n\t\t\tconst startYear = Math.floor(date.getFullYear() / 10) * 10;\n\t\t\tmonthLabel.innerText = `${startYear} - ${startYear + 9}`;\n\t\t}\n\n\t\tthis._domEvents.attach(monthLabel, \"click\", this._toggleMode.bind(this));\n\t\theader.appendChild(monthLabel);\n\n\t\tconst forwardArrow = document.createElement('button');\n\n\t\tforwardArrow.classList.add(\"dhx_cal_datepicker_arrow\", \"scheduler_icon\", \"arrow_right\");\n\t\theader.appendChild(forwardArrow);\n\n\t\tcontainer.appendChild(header);\n\n\t\tthis._domEvents.attach(backwardArrow, \"click\", this._adjustDate.bind(this, -1));\n\t\tthis._domEvents.attach(forwardArrow, \"click\", this._adjustDate.bind(this, 1));\n\t}\n\n\trender(container) {\n\t\tthis._domEvents.detachAll();\n\t\tthis.container = container || this.container; \n\t\tthis.container.innerHTML = '';\n\n\t\tif(!this.element){\n\t\t\tthis.element = document.createElement(\"div\");\n\t\t\tthis.element.classList.add(\"dhx_cal_datepicker\");\n\t\t}\n\t\tthis.element.innerHTML = '';\n\t\tthis.container.appendChild(this.element);\n\n\t\tthis._renderCalendarHeader(this.element);\n\t\tconst dataContainer = document.createElement(\"div\");\n\t\tdataContainer.classList.add(\"dhx_cal_datepicker_data\");\n\t\tthis.element.appendChild(dataContainer);\n\n\t\tconst {mode} = this.getState();\n\t\tif (mode === 'days') {\n\t\t\tthis._renderDayGrid(dataContainer);\n\t\t} else if (mode === 'months') {\n\t\t\tthis._renderMonthGrid(dataContainer);\n\t\t} else {\n\t\t\tthis._renderYearGrid(dataContainer);\n\t\t}\n\t}\n\n\t_renderDayGridHeader(daysOfWeekContainer) {\n\t\tconst {date} = this.getState();\n\t\tconst scheduler = this.scheduler;\n\n\t\tlet currentDate = scheduler.date.week_start(new Date(date));\n\t\tconst maxDate = scheduler.date.add(scheduler.date.week_start(new Date(date)), 1, 'week');\n\n\t\tdaysOfWeekContainer.classList.add('dhx_cal_datepicker_days');\n\n\t\tconst labelFormat = scheduler.date.date_to_str(\"%D\");\n\n\t\twhile (currentDate.valueOf() < maxDate.valueOf()) {\n\t\t\tconst label = labelFormat(currentDate);\n\n\t\t\tconst dayElement = document.createElement('div');\n\t\t\tdayElement.setAttribute(\"data-day\", currentDate.getDay());\n\t\t\tdayElement.classList.add('dhx_cal_datepicker_dayname');\n\t\t\tdayElement.innerText = label;\n\t\t\tdaysOfWeekContainer.appendChild(dayElement);\n\n\t\t\tcurrentDate = scheduler.date.add(currentDate, 1, 'day');\n\t\t}\n\n\t}\n\n\t_weeksBetween(min, max) {\n\t\tconst scheduler = this.scheduler;\n\t\tlet weeks = 0;\n\t\tlet currWeek = new Date(min);\n\t\twhile(currWeek.valueOf() < max.valueOf()){\n\t\t\tweeks += 1;\n\t\t\tcurrWeek = scheduler.date.week_start(scheduler.date.add(currWeek, 1, \"week\"));\n\t\t}\n\t\treturn weeks;\n\t}\n\n\t_renderDayGrid(container) {\n\t\tconst {date, currentRange, eventDates, minWeeks} = this.getState();\n\n\t\tlet minSchedulerDate = currentRange[0];\n\t\tlet maxSchedulerDate = currentRange[1];\n\n\t\tconst eventDaysTable = eventDates.reduce((acc, date) => {\n\t\t\tconst dayStart = this.scheduler.date.day_start(new Date(date));\n\t\t\tacc[dayStart.valueOf()] = true;\n\t\t\treturn acc;\n\t\t}, {});\n\n\n\t\t// Render Days of the Week\n\t\tconst daysOfWeekContainer = document.createElement('div');\n\t\tthis._renderDayGridHeader(daysOfWeekContainer);\n\t\tcontainer.appendChild(daysOfWeekContainer);\n\n\t\tconst scheduler = this.scheduler;\n\t\tconst firstDate = scheduler.date.week_start(scheduler.date.month_start(new Date(date)));\n\t\tconst monthStart = scheduler.date.month_start(new Date(date));\n\t\tconst monthEnd = scheduler.date.add(scheduler.date.month_start(new Date(date)), 1, 'month');\n\t\tlet lastDate = scheduler.date.add(scheduler.date.month_start(new Date(date)), 1, 'month');\n\t\tif(lastDate.getDay() !== 0){\n\t\t\tlastDate = scheduler.date.add(scheduler.date.week_start(lastDate), 1, \"week\");\n\t\t}\n\n\t\tlet weeks = this._weeksBetween(firstDate, lastDate);\n\t\tif(minWeeks && weeks < minWeeks){\n\t\t\tlastDate = scheduler.date.add(lastDate, (minWeeks - weeks), \"week\");\n\t\t}\n\n\t\tlet currDate = firstDate;\n\n\t\tconst dayGridContainer = document.createElement('div');\n\t\tdayGridContainer.classList.add('dhx_cal_datepicker_days');\n\n\t\tthis._domEvents.attach(dayGridContainer, \"click\", (event) => {\n\t\t\tconst dateCell = event.target.closest(\"[data-cell-date]\");\n\t\t\tconst date = new Date(dateCell.getAttribute(\"data-cell-date\"));\n\t\t\tthis.callEvent(\"onDateClick\", [date, event]);\n\t\t});\n\n\t\twhile(currDate.valueOf() < lastDate.valueOf()){\n\t\t\tconst dayElement = document.createElement('div');\n\t\t\tdayElement.setAttribute(\"data-cell-date\", scheduler.templates.format_date(currDate));\n\t\t\tdayElement.setAttribute(\"data-day\", currDate.getDay());\n\t\t\tdayElement.innerHTML = currDate.getDate();\n\n\t\t\tif(currDate.valueOf() < monthStart.valueOf()){\n\t\t\t\tdayElement.classList.add('dhx_before');\n\t\t\t}else if(currDate.valueOf() >= monthEnd.valueOf()){\t\n\t\t\t\tdayElement.classList.add('dhx_after');\n\t\t\t}\n\n\t\t\tif(currDate.getDay() === 0 || currDate.getDay() === 6){\n\t\t\t\tdayElement.classList.add(\"dhx_cal_datepicker_weekend\");\n\t\t\t}\n\n\t\t\tif(minSchedulerDate && maxSchedulerDate){\n\t\t\t\tif(currDate.valueOf() >= minSchedulerDate.valueOf() && currDate.valueOf() < maxSchedulerDate.valueOf()){\n\t\t\t\t\tdayElement.classList.add('dhx_cal_datepicker_current');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(eventDaysTable[currDate.valueOf()]){\n\t\t\t\tdayElement.classList.add('dhx_cal_datepicker_event');\n\t\t\t}\n\t\t\t\n\t\t\tdayElement.classList.add('dhx_cal_datepicker_date');\n\n\t\t\tdayGridContainer.appendChild(dayElement);\n\t\t\tcurrDate = scheduler.date.add(currDate, 1, 'day');\n\t\t}\n\n\t\tcontainer.appendChild(dayGridContainer);\n\n\t}\n\n\t_renderMonthGrid(container) {\n\t\tconst {date} = this.getState();\n\n\t\tconst wrapper = document.createElement('div');\n\t\twrapper.classList.add(\"dhx_cal_datepicker_months\");\n\n\t\tconst months = [];\n\t\tfor(let i = 0; i < 12; i++){\n\t\t\tmonths.push(new Date(date.getFullYear(), i, 1));\n\t\t}\n\n\t\tconst formatLabel = this.scheduler.date.date_to_str(\"%M\");\n\t\tmonths.forEach(month => {\n\t\t\tconst monthElement = document.createElement('div');\n\t\t\tmonthElement.classList.add('dhx_cal_datepicker_month');\n\t\t\tif(date.getMonth() === month.getMonth()){\n\t\t\t\tmonthElement.classList.add('dhx_cal_datepicker_current');\n\t\t\t}\n\t\t\tmonthElement.setAttribute(\"data-month\", month.getMonth());\n\t\t\tmonthElement.innerHTML = formatLabel(month);\n\t\t\tthis._domEvents.attach(monthElement, \"click\", () => {\n\t\t\t\tconst newDate = new Date(month);\n\t\t\t\tthis.setState({\n\t\t\t\t\tdate: newDate,\n\t\t\t\t\tmode: 'days'\n\t\t\t\t});\n\t\t\t});\n\t\t\twrapper.appendChild(monthElement);\n\t\t});\n\t\tcontainer.appendChild(wrapper);\n\n\t\tconst doneArea = document.createElement(\"div\");\n\t\tdoneArea.classList.add(\"dhx_cal_datepicker_done\");\n\t\tconst doneBtn = document.createElement(\"button\");\n\t\tdoneBtn.innerText = \"Done\";\n\t\tdoneBtn.classList.add(\"dhx_cal_datepicker_done_btn\");\n\t\tthis._domEvents.attach(doneBtn, \"click\", () => {\n\t\t\tthis.setState({\n\t\t\t\tmode: 'days'\n\t\t\t});\n\t\t});\n\t\tdoneArea.appendChild(doneBtn);\n\t\tcontainer.appendChild(doneArea);\n\t}\n\n\t_renderYearGrid(container) {\n\t\tconst {date} = this.getState();\n\t\tconst startYear = Math.floor(date.getFullYear() / 10) * 10;\n\t\t\n\t\tconst wrapper = document.createElement('div');\n\t\twrapper.classList.add(\"dhx_cal_datepicker_years\");\n\t\tfor (let i = startYear - 1; i <= startYear + 10; i++) {\n\t\t\tconst yearElement = document.createElement('div');\n\t\t\tyearElement.innerText = i;\n\t\t\tyearElement.classList.add('dhx_cal_datepicker_year');\n\t\t\tyearElement.setAttribute(\"data-year\", i);\n\t\t\tif(date.getFullYear() === i){\n\t\t\t\tyearElement.classList.add('dhx_cal_datepicker_current');\n\t\t\t}\n\t\t\tthis._domEvents.attach(yearElement, \"click\", () => {\n\t\t\t\tthis.setState({\n\t\t\t\t\tdate: new Date(i, date.getMonth(), 1),\n\t\t\t\t\tmode: 'months'\n\t\t\t\t});\n\t\t\t});\n\t\t\twrapper.appendChild(yearElement);\n\t\t\t\n\t\t}\n\t\tcontainer.appendChild(wrapper);\n\n\t\tconst doneArea = document.createElement(\"div\");\n\t\tdoneArea.classList.add(\"dhx_cal_datepicker_done\");\n\t\tconst doneBtn = document.createElement(\"button\");\n\t\tdoneBtn.innerText = \"Done\";\n\t\tdoneBtn.classList.add(\"dhx_cal_datepicker_done_btn\");\n\t\tthis._domEvents.attach(doneBtn, \"click\", () => {\n\t\t\tthis.setState({\n\t\t\t\tmode: 'months'\n\t\t\t});\n\t\t});\n\t\tdoneArea.appendChild(doneBtn);\n\t\tcontainer.appendChild(doneArea);\n\t}\n\n\tdestructor(){\n\t\tthis.onStateChangeHandlers = [];\n\t\tif(this.element){\n\t\t\tthis.element.innerHTML = '';\n\t\t\tthis.element.remove();\n\t\t}\n\n\t\tthis._domEvents.detachAll();\n\t\tthis.callEvent(\"onDestroy\", []);\n\t\tthis.detachAllEvents();\n\n\t\tthis.scheduler = null;\n\t}\n}","// import \"./css/dhtmlxscheduler_terrace\";\n// import \"./css/dhtmlxscheduler_material\";\n// import \"./css/dhtmlxscheduler_material_nofont\";\n// import \"./css/dhtmlxscheduler_flat\";\n// import \"./css/dhtmlxscheduler_contrast_black\";\n// import \"./css/dhtmlxscheduler_contrast_white\";\n\n\nimport assert from \"./core/common/assert\";\nimport common_errors from \"./core/common_errors\";\nimport connector from \"./core/connector\";\nimport schedulerCore from \"./core/scheduler\";\nimport common from \"./core/common\";\nimport wai_aria from \"./core/wai_aria\";\nimport utils from \"./core/utils/utils\";\nimport dom_helpers from \"./core/utils/dom_helpers\";\nimport env from \"./utils/env\";\nimport destructor from \"./core/destructor\";\nimport ajax from \"./core/utils/ajax\";\nimport base from \"./core/base\";\nimport config from \"./core/config\";\nimport event from \"./core/event\";\nimport event_highlight from \"./core/event_highlight\";\nimport load from \"./core/load\";\nimport lightbox from \"./core/lightbox\";\nimport touch from \"./core/touch\";\nimport dhtmlx_suite_hooks from \"./core/dhtmlx/dhtmlx_suite_hooks\";\nimport skins from \"./core/skins\";\nimport jquery from \"./core/jquery\";\nimport delay_render from \"./core/delay_render\";\nimport dataProcessorExtend from \"./core/dataprocessor/dataprocessor\";\nimport message from \"./core/message\";\nimport i18nFactory from \"./locale\";\n\nimport voidFirst from \"./publish_helpers/void_script_first\";\nimport voidSecond from \"./publish_helpers/void_script_second\";\nimport voidThird from \"./publish_helpers/void_script_third\";\n\n//import datepickerHeader from \"./core/clickable_header\";\n\nimport { DatePicker } from \"./core/datepicker\";\n\nexport default function(extensionManager) {\n\n\tconst scheduler = { version: VERSION };\n\t\n\tcommon_errors(scheduler);\n\tcommon(scheduler);\n\tschedulerCore(scheduler);\n\twai_aria(scheduler);\n\t//utils(scheduler);\n\n\tscheduler.utils = utils;\n\tscheduler.$domHelpers = dom_helpers;\n\tscheduler.utils.dom = dom_helpers;\n\tscheduler.uid = utils.uid;\n\tscheduler.mixin = utils.mixin;\n\tscheduler.defined = utils.defined;\n\tscheduler.assert = assert(scheduler);\n\tscheduler.copy = utils.copy;\n\n\tscheduler._createDatePicker = function(container, config){\n\t\treturn new DatePicker(scheduler, container, config);\n\t};\n\n\t//datepickerHeader(scheduler);\n\n\n\t//old api compatibility\n\tscheduler._getFocusableNodes = dom_helpers.getFocusableNodes;\n\tscheduler._getClassName = dom_helpers.getClassName;\n\tscheduler._locate_css = dom_helpers.locateCss;\n\n\tconst messageApi = message(scheduler);\n\tscheduler.utils.mixin(scheduler, messageApi);\n\n\tscheduler.env = scheduler.$env = env;\n\tscheduler.Promise = window.Promise;\n\tdestructor(scheduler);\n\tajax(scheduler);\n\tvoidFirst(scheduler);\n\tbase(scheduler);\n\tconfig(scheduler);\n\tevent(scheduler);\n\tevent_highlight(scheduler);\n\tload(scheduler);\n\tlightbox(scheduler);\n\ttouch(scheduler);\n\tdhtmlx_suite_hooks(scheduler);\n\tvoidSecond(scheduler);\n\tskins(scheduler);\n\tjquery(scheduler);\n\tdelay_render(scheduler);\n\tdataProcessorExtend(scheduler);\n\tvoidThird(scheduler);\n\tconnector(scheduler);\n\tconst i18n = i18nFactory();\n\tscheduler.i18n = {\n\t\taddLocale: i18n.addLocale,\n\t\tsetLocale: function(locale){\n\t\t\tif(typeof locale === \"string\"){\n\t\t\t\tvar localeObject = i18n.getLocale(locale);\n\t\t\t\tif(!localeObject){\n\t\t\t\t\tlocaleObject = i18n.getLocale(\"en\");\n\t\t\t\t}\n\n\t\t\t\tscheduler.locale = localeObject;\n\t\t\t}else if(locale){\n\t\t\t\tif(!scheduler.locale){\n\t\t\t\t\tscheduler.locale = locale;\n\t\t\t\t}else{\n\t\t\t\t\tfor(var i in locale){\n\t\t\t\t\t\tif(locale[i] && typeof locale[i] === \"object\"){\n\t\t\t\t\t\t\tif(!scheduler.locale[i]){\n\t\t\t\t\t\t\t\tscheduler.locale[i] = {};\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tscheduler.mixin(scheduler.locale[i], locale[i], true);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tscheduler.locale[i] = locale[i];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar labels = scheduler.locale.labels;\n\t\t\tlabels.dhx_save_btn \t= labels.icon_save;\n\t\t\tlabels.dhx_cancel_btn \t= labels.icon_cancel;\n\t\t\tlabels.dhx_delete_btn \t= labels.icon_delete;\n\n\t\t\tif(scheduler.$container){\n\t\t\t\tscheduler.get_elements();\n\t\t\t}\n\t\t\t\n\t\t},\n\t\tgetLocale: i18n.getLocale\n\t};\n\tscheduler.i18n.setLocale(\"en\");\n\n\tscheduler.ext = {};\n\n\tconst activePlugins = {};\n\tscheduler.plugins = function(config){\n\t\tconst extensionList = getExtensionList(config, {\n\t\t\t\ttreetimeline: [\"timeline\"],\n\t\t\t\tdaytimeline: [\"timeline\"],\n\t\t\t\touterdrag: [\"legacy\"]\n\t\t\t}, {\n\t\t\t\tlegacy: 1,\n\t\t\t\tlimit: 1,\n\t\t\t\ttimeline: 2,\n\t\t\t\tdaytimeline: 3,\n\t\t\t\ttreetimeline: 3,\n\t\t\t\touterdrag:6\n\t\t\t});\n\n\t\textensionList.forEach(function(name){\n\t\t\tif(!activePlugins[name]){\n\t\t\t\tconst plugin = extensionManager.getExtension(name);\n\t\t\t\tif(plugin){\n\t\t\t\t\tplugin(scheduler);\n\t\t\t\t\tactivePlugins[name] = true;\n\t\t\t\t}else{\n\t\t\t\t\tthrow new Error(\"unknown plugin \" + name);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t};\n\n\tfunction getExtensionList(config, dependencies, priorities){\n\t\tconst result = [];\n\n\t\tfor(const i in config){\n\t\t\tif(config[i]){\n\t\t\t\tconst extension = i.toLowerCase();\n\t\t\t\tif(dependencies[extension]){\n\t\t\t\t\tdependencies[extension].forEach(function(dep){\n\t\t\t\t\t\tconst dependencyName = dep.toLowerCase();\n\t\t\t\t\t\tif(!config[dependencyName]){\n\t\t\t\t\t\t\tresult.push(dependencyName);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tresult.push(extension);\n\t\t\t}\n\t\t}\n\t\t\n\t\tresult.sort(function(a, b){\n\t\t\tconst orderA = priorities[a] || 0;\n\t\t\tconst orderB = priorities[b] || 0;\n\t\t\tif(orderA > orderB){\n\t\t\t\treturn 1;\n\t\t\t}else if(orderA < orderB){\n\t\t\t\treturn -1;\n\t\t\t}else{\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t});\n\n\t\treturn result;\n\t}\n\n\treturn scheduler;\n\n}","export default function extend(scheduler) {\n\nvar commonViews = {\n\tagenda: \"https://docs.dhtmlx.com/scheduler/agenda_view.html\",\n\tgrid: \"https://docs.dhtmlx.com/scheduler/grid_view.html\",\n\tmap: \"https://docs.dhtmlx.com/scheduler/map_view.html\",\n\tunit: \"https://docs.dhtmlx.com/scheduler/units_view.html\",\n\ttimeline: \"https://docs.dhtmlx.com/scheduler/timeline_view.html\",\n\tweek_agenda: \"https://docs.dhtmlx.com/scheduler/weekagenda_view.html\",\n\tyear: \"https://docs.dhtmlx.com/scheduler/year_view.html\",\n\tanythingElse: \"https://docs.dhtmlx.com/scheduler/views.html\"\n};\n\nvar requiredExtensions = {\n\tagenda: \"ext/dhtmlxscheduler_agenda_view.js\",\n\tgrid: \"ext/dhtmlxscheduler_grid_view.js\",\n\tmap: \"ext/dhtmlxscheduler_map_view.js\",\n\tunit: \"ext/dhtmlxscheduler_units.js\",\n\ttimeline: \"ext/dhtmlxscheduler_timeline.js, ext/dhtmlxscheduler_treetimeline.js, ext/dhtmlxscheduler_daytimeline.js\",\n\tweek_agenda: \"ext/dhtmlxscheduler_week_agenda.js\",\n\tyear: \"ext/dhtmlxscheduler_year_view.js\",\n\tlimit: \"ext/dhtmlxscheduler_limit.js\"\n};\n\nscheduler._commonErrorMessages = {\n\tunknownView: function(view){\n\t\tvar relatedDoc = \"Related docs: \" + (commonViews[view] || commonViews.anythingElse); \n\t\tvar relatedExtension = requiredExtensions[view] ? (\"You're probably missing \" + requiredExtensions[view] + \".\") : \"\";\n\t\treturn (\n\t\t\t\"`\"+view+\"` view is not defined. \\n\" +\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\" + \n\t\t\trelatedDoc + \"\\n\" + (relatedExtension ? (relatedExtension + \"\\n\") : \"\"));\n\t},\n\tcollapsedContainer: function(div){\n\t\treturn \"Scheduler container height is set to *100%* but the rendered height is zero and the scheduler is not visible. \\n\"+\n\t\t\"Make sure that the container has some initial height or use different units. For example:\\n\" +\n\t\t\"
\\n\";\n\t}\n};\n\nscheduler.createTimelineView = function() {\n\tthrow new Error(\"scheduler.createTimelineView is not implemented. Be sure to add the required extension: \" + requiredExtensions.timeline + \n\t\"\\n\" +\n\t\"Related docs: \" + commonViews.timeline);\n};\n\nscheduler.createUnitsView = function() {\n\tthrow new Error(\"scheduler.createUnitsView is not implemented. Be sure to add the required extension: \" + requiredExtensions.unit + \n\t\"\\n\" +\n\t\"Related docs: \" + commonViews.unit);\n};\n\nscheduler.createGridView = function() {\n\tthrow new Error(\"scheduler.createGridView is not implemented. Be sure to add the required extension: \" + requiredExtensions.grid + \n\t\"\\n\" +\n\t\"Related docs: \" + commonViews.grid);\n};\n\nscheduler.addMarkedTimespan = function() {\n\tthrow new Error(\"scheduler.addMarkedTimespan is not implemented. Be sure to add the required extension: ext/dhtmlxscheduler_limit.js\" + \n\t\"\\n\" +\n\t\"Related docs: https://docs.dhtmlx.com/scheduler/limits.html\");\n};\n\nscheduler.renderCalendar = function() {\n\tthrow new Error(\"scheduler.renderCalendar is not implemented. Be sure to add the required extension: ext/dhtmlxscheduler_minical.js\" + \n\t\"\\n\" +\n\t\"https://docs.dhtmlx.com/scheduler/minicalendar.html\");\n};\n\nscheduler.exportToPNG = function() {\n\tthrow new Error([\n\t\t\"scheduler.exportToPNG is not implemented.\",\n\t\t\"This feature requires an additional module, be sure to check the related doc here https://docs.dhtmlx.com/scheduler/png.html\",\n\t\t\"Licensing info: https://dhtmlx.com/docs/products/dhtmlxScheduler/export.shtml\"\n\t].join(\"\\n\"));\n};\n\nscheduler.exportToPDF = function() {\n\tthrow new Error([\n\t\t\"scheduler.exportToPDF is not implemented.\",\n\t\t\"This feature requires an additional module, be sure to check the related doc here https://docs.dhtmlx.com/scheduler/pdf.html\",\n\t\t\"Licensing info: https://dhtmlx.com/docs/products/dhtmlxScheduler/export.shtml\"\n\t].join(\"\\n\"));\n};\n\n\n}","\nimport nav_bar from \"./nav_bar\";\nimport scheduler_resize_listener from \"./scheduler_resize_listener\";\nimport eventable from \"../utils/eventable\";\n\n\nexport default function extend(scheduler) {\n\neventable(scheduler);\n\nnav_bar(scheduler);\n\nscheduler._detachDomEvent = function(el, event, handler){\n\tif (el.removeEventListener){\n\t\tel.removeEventListener(event, handler, false);\n\n\t}else if (el.detachEvent){\n\t\tel.detachEvent(\"on\"+event, handler);\n\t}\n};\n\n\nscheduler._init_once = function(){\n\tscheduler_resize_listener(scheduler);\n\n\tscheduler._init_once = function(){};\n};\n\nvar layout = {\n\t\"navbar\": {\n\t\trender: function (config) {\n\t\t\treturn scheduler._init_nav_bar(config);\n\t\t}\n\t},\n\t\"header\": {\n\t\trender: function (config) {\n\t\t\tvar element = document.createElement(\"div\");\n\t\t\telement.className = \"dhx_cal_header\";\n\t\t\treturn element;\n\t\t}\n\t},\n\t\"dataArea\": {\n\t\trender: function (config) {\n\t\t\tvar element = document.createElement(\"div\");\n\t\t\telement.className = \"dhx_cal_data\";\n\t\t\treturn element;\n\t\t}\n\t},\n\t\"html_element\": {\n\t\trender: function (config) {\n\t\t\treturn config.html;\n\t\t}\n\t}\n};\n\nfunction hasSchedulerMarkup(element){\n\treturn !!(\n\t\telement.querySelector(\".dhx_cal_header\") &&\n\t\telement.querySelector(\".dhx_cal_data\") &&\n\t\telement.querySelector(\".dhx_cal_navline\")\n\t\t);\n}\n\nfunction createDefaultHeader(scheduler){\n\tvar views = [\n\t\t\"day\",\n\t\t\"week\",\n\t\t\"month\"\n\t];\n\tvar date = [\n\t\t\"date\"\n\t];\n\tvar nav = [\n\t\t\"prev\",\n\t\t\"today\",\n\t\t\"next\"\n\t];\n\n\tif(scheduler.matrix){\n\t\tfor(var i in scheduler.matrix){\n\t\t\tviews.push(i);\n\t\t}\n\t}\n\tif(scheduler._props){\n\t\tfor(var i in scheduler._props){\n\t\t\tviews.push(i);\n\t\t}\n\t}\n\n\tif(scheduler._grid && scheduler._grid.names){\n\t\tfor(var i in scheduler._grid.names){\n\t\t\tviews.push(i);\n\t\t}\n\t}\n\n\tvar optionalViews = [\n\t\t\"map\",\n\t\t\"agenda\",\n\t\t\"week_agenda\",\n\t\t\"year\"\n\t];\n\n\toptionalViews.forEach(function(viewName){\n\t\tif(scheduler[viewName + \"_view\"]){\n\t\t\tviews.push(viewName);\n\t\t}\n\t});\n\n\treturn views.concat(date).concat(nav);\n}\n\nscheduler.init=function(id,date,mode){\n\tif(this.$destroyed){\n\t\treturn; // not have errors when try to reinit destroyed scheduler\n\t}\n\tdate=date||(scheduler._currentDate());\n\tmode=mode||\"week\";\n\n\tif(this._obj){\n\t\tthis.unset_actions();\n\t}\n\n\tthis._obj=(typeof id == \"string\")?document.getElementById(id):id;\n\tthis.$container = this._obj;\n\tthis.$root = this._obj;\n\n\tif(!this.$container.offsetHeight && this.$container.offsetWidth && this.$container.style.height === \"100%\"){\n\t\t// scheduler container has zero height and non-zero width\n\t\twindow.console.error(scheduler._commonErrorMessages.collapsedContainer(), this.$container);\n\t}\n\n\tif(this.config.wai_aria_attributes && this.config.wai_aria_application_role){\n\t\tthis.$container.setAttribute(\"role\", \"application\");\n\t}\n\n\tif(!this.config.header && !hasSchedulerMarkup(this.$container)){\n\t\t// if no header config and no required markup - use the default header\n\t\t// so the scheduler could be initialized in an empty div\n\t\tthis.config.header = createDefaultHeader(this);\n\t\twindow.console.log([// jshint ignore:line\n\t\t\t\"Required DOM elements are missing from the scheduler container and **scheduler.config.header** is not specified.\",\n\t\t\t\"Using a default header configuration: \",\n\t\t\t\"scheduler.config.header = \" + JSON.stringify(this.config.header, null, 2),\n\t\t\t\"Check this article for the details: https://docs.dhtmlx.com/scheduler/initialization.html\"\n\t\t].join(\"\\n\"));// jshint ignore:line\n\t}\n\n\tif (this.config.header) {\n\t\tthis.$container.innerHTML = \"\";\n\t\tthis.$container.classList.add(\"dhx_cal_container\");\n\t\tif(this.config.header.height){\n\t\t\tthis.xy.nav_height = this.config.header.height;\n\t\t}\n\t\tthis.$container.appendChild(layout.navbar.render(this.config.header));\n\t\tthis.$container.appendChild(layout.header.render());\n\t\tthis.$container.appendChild(layout.dataArea.render());\n\t} else {\n\t\t// if no header config provided - make sure scheduler container has all necessary elements\n\t\tif(!hasSchedulerMarkup(this.$container)){\n\t\t\tthrow new Error([\n\t\t\t\t\"Required DOM elements are missing from the scheduler container.\",\n\t\t\t\t\"Be sure to either specify them manually in the markup: https://docs.dhtmlx.com/scheduler/initialization.html#initializingschedulerviamarkup\",\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\"\n\t\t\t].join(\"\\n\"));\n\t\t}\n\t}\n\n\tif (this.config.rtl) this.$container.className += \" dhx_cal_container_rtl\";\n\n\t//hook for terrace skin\n\tif (this._skin_init)\n\t\tscheduler._skin_init();\n\n\tscheduler.date.init();\n\n\tthis._scroll=true;\n\n\tthis._els=[];\n\tthis.get_elements();\n\tthis.init_templates();\n\tthis.set_actions();\n\n\tthis._init_once();\n\tthis._init_touch_events();\n\n\tthis.set_sizes();\n\tscheduler.callEvent('onSchedulerReady', []);\n\tscheduler.$initialized = true;\n\tthis.setCurrentView(date,mode);\n\n};\n\nscheduler.xy={\n\tmin_event_height:20,\n\tbar_height: 24,\n\tscale_width:50,\n\tscroll_width:18,\n\tscale_height:20,\n\tmonth_scale_height:20,\n\tmenu_width:25,\n\tmargin_top:0,\n\tmargin_left:0,\n\teditor_width:140,\n\tmonth_head_height:22,\n\tevent_header_height: 14\n};\nscheduler.keys={\n\tedit_save:13,\n\tedit_cancel:27\n};\n\nscheduler.bind = function bind(functor, object){\n\tif(functor.bind)\n\t\treturn functor.bind(object);\n\telse\n\t\treturn function(){ return functor.apply(object,arguments); };\n};\n\nscheduler.set_sizes=function(){\n\n\tvar w = this._x = this._obj.clientWidth-this.xy.margin_left;\n\n\t//not-table mode always has scroll - need to be fixed in future\n\tvar scale_x=this._table_view?0:(this.xy.scale_width+this.xy.scroll_width);\n\n\tvar materialScalePlaceholder = this.$container.querySelector(\".dhx_cal_scale_placeholder\");\n\tif(scheduler._is_material_skin()){\n\t\tif(!materialScalePlaceholder) {\n\t\t\tmaterialScalePlaceholder = document.createElement(\"div\");\n\t\t\tmaterialScalePlaceholder.className = \"dhx_cal_scale_placeholder\";\n\t\t\tthis.$container.insertBefore(materialScalePlaceholder, this._els[\"dhx_cal_header\"][0]);\n\t\t}\n\t\tmaterialScalePlaceholder.style.display = \"block\";\n\n\t\tthis.set_xy(materialScalePlaceholder,w,this.xy.scale_height + 1,0, this._els[\"dhx_cal_header\"][0].offsetTop);\n\n\t}else{\n\t\tif(materialScalePlaceholder){\n\t\t\tmaterialScalePlaceholder.parentNode.removeChild(materialScalePlaceholder);\n\t\t}\n\t}\n\n\tif (this._lightbox) {\n\t\tif (scheduler.$container.offsetWidth < 1200) {\n\t\t} else {\n\t\t\tthis._setLbPosition(document.querySelector(\".dhx_cal_light\"));\n\t\t}\n\t}\n\n\tthis._data_width = w-scale_x;\n\n\tthis._els[\"dhx_cal_navline\"][0].style.width = w + \"px\";\n\tconst header = this._els[\"dhx_cal_header\"][0];\n\tthis.set_xy(header, this._data_width, this.xy.scale_height);\n\t// this._els[\"dhx_cal_header\"][0].style.marginLeft = `${scheduler.xy.scale_width}px`;\n\theader.style.left = ``;\n\theader.style.right = ``;\n\tif(!this._table_view){\n\t\tif(this.config.rtl){\n\t\t\theader.style.right = `${this.xy.scale_width}px`;\n\t\t}else{\n\t\t\theader.style.left = `${this.xy.scale_width}px`;\n\t\t}\n\t} else {\n\t\tif(!this.config.rtl){\n\t\t\theader.style.left = `-1px`;\n\t\t} else {\n\t\t\theader.style.right = `-1px`;\n\t\t}\n\t}\n};\nscheduler.set_xy=function(node,w,h,x,y){\n\tfunction prepareValue(val){\n\t\tlet prepared = val;\n\t\tif(!isNaN(Number(prepared))){\n\t\t\tprepared = Math.max(0,prepared) + \"px\";\n\t\t}\n\t\treturn prepared;\n\t}\n\n\tvar direction = 'left';\n\n\tif(w !== undefined) {\n\t\tnode.style.width = prepareValue(w);\n\t}\n\n\tif(h !== undefined){\n\t\tnode.style.height = prepareValue(h);\n\t}\n\n\tif (arguments.length>3){\n\n\t\tif(x !== undefined){\n\t\t\tif (this.config.rtl) direction = 'right';\n\t\t\tnode.style[direction]=x+\"px\";\n\t\t}\n\t\tif(y !== undefined){\n\t\t\tnode.style.top=y+\"px\";\n\t\t}\n\t}\n};\nscheduler.get_elements=function(){\n\t//get all child elements as named hash\n\tvar els=this._obj.getElementsByTagName(\"DIV\");\n\tfor (var i=0; i < els.length; i++){\n\t\tvar class_name= scheduler._getClassName(els[i]);\n\t\tvar attr_value = els[i].getAttribute(\"data-tab\") || els[i].getAttribute(\"name\") || \"\";\n\t\tif (class_name) class_name = class_name.split(\" \")[0];\n\t\tif (!this._els[class_name]) this._els[class_name]=[];\n\t\tthis._els[class_name].push(els[i]);\n\n\t\t//check if name need to be changed\n\t\t// scheduler.locale.labels[attr_value+\"_tab\"] - to fix getting labels for data-tab\n\t\tvar label = scheduler.locale.labels[attr_value+\"_tab\"] || scheduler.locale.labels[attr_value||class_name];\n\t\tif (typeof label !== \"string\" && attr_value && !els[i].innerHTML)\n\t\t\tlabel = attr_value.split(\"_\")[0];\n\t\tif (label) {\n\t\t\tthis._waiAria.labelAttr(els[i], label);\n\t\t\tels[i].innerHTML = label;\n\t\t}\n\t}\n};\n\n\nvar domEventsScope = scheduler._createDomEventScope();\n\nscheduler.unset_actions = function(){\n\tdomEventsScope.detachAll();\n\n};\n\nscheduler.set_actions=function(){\n\tfor (var a in this._els){\n\t\tif (this._click[a]){\n\t\t\tfor (var i=0; i < this._els[a].length; i++){\n\t\t\t\tconst element = this._els[a][i];\n\t\t\t\tconst handler = this._click[a].bind(element);\n\t\t\t\tdomEventsScope.attach(element, \"click\", handler);\n\t\t\t}\n\t\t}\n\t}\n\n\tdomEventsScope.attach(this._obj, \"selectstart\", function(e){\n\t\te.preventDefault();\n\t\treturn false;\n\t});\n\t//this._obj.onselectstart=function(e){ return false; };\n\tdomEventsScope.attach(this._obj, \"mousemove\", function(e){\n\t\tif (!scheduler._temp_touch_block)\n\t\t\tscheduler._on_mouse_move(e);\n\t});\n\tdomEventsScope.attach(this._obj, \"mousedown\", function(e){\n\t\tif (!scheduler._ignore_next_click)\n\t\t\tscheduler._on_mouse_down(e);\n\t});\n\tdomEventsScope.attach(this._obj, \"mouseup\", function(e){\n\t\tif (!scheduler._ignore_next_click)\n\t\t\tscheduler._on_mouse_up(e);\n\t});\n\tdomEventsScope.attach(this._obj, \"dblclick\", function(e){\n\t\tscheduler._on_dbl_click(e);\n\t});\n\tdomEventsScope.attach(this._obj, \"contextmenu\", function(e) {\n\t\tif(scheduler.checkEvent(\"onContextMenu\")){\n\t\t\t// block the default browser context menu \n\t\t\te.preventDefault();\n\t\t}\n\t\tvar ev = e;\n\t\tvar src = ev.target||ev.srcElement;\n\t\tvar returnValue = scheduler.callEvent(\"onContextMenu\", [scheduler._locate_event(src), ev]);\n\t\treturn returnValue;\n\t});\n};\nscheduler.select=function(id){\n\tif (this._select_id==id) return;\n\tscheduler._close_not_saved();\n\tthis.editStop(false);\n\tif(this._select_id){\n\t\tthis.unselect();\n\t}\n\tthis._select_id = id;\n\tthis.updateEvent(id);\n\tthis.callEvent(\"onEventSelected\", [id]);\n};\nscheduler.unselect=function(id){\n\tif (id && id!=this._select_id) return;\n\tvar t=this._select_id;\n\tthis._select_id = null;\n\tif (t && this.getEvent(t)) this.updateEvent(t);\n\tthis.callEvent(\"onEventUnselected\", [t]);\n};\nscheduler.getState=function(){\n\treturn {\n\t\tmode: this._mode,\n\t\tdate: new Date(this._date),\n\t\tmin_date: new Date(this._min_date),\n\t\tmax_date: new Date(this._max_date),\n\t\teditor_id: this._edit_id,\n\t\tlightbox_id: this._lightbox_id,\n\t\tnew_event: this._new_event,\n\t\tselect_id: this._select_id,\n\t\texpanded: this.expanded,\n\t\tdrag_id: this._drag_id,\n\t\tdrag_mode: this._drag_mode\n\t};\n};\nscheduler._click={\n\tdhx_cal_data:function(e){\n\t\t//in case of touch disable click processing\n\t\tif (scheduler._ignore_next_click){\n\t\t\tif (e.preventDefault)\n\t\t\t\te.preventDefault();\n\t\t\te.cancelBubble = true;\n\t\t\tscheduler._ignore_next_click = false;\n\t\t\treturn false;\n\t\t}\n\n\t\tvar trg = e.target;\n\t\tvar id = scheduler._locate_event(trg);\n\n\t\tif (!id) {\n\t\t\tscheduler.callEvent(\"onEmptyClick\",[scheduler.getActionData(e).date, e]);\n\t\t} else {\n\t\t\tif ( !scheduler.callEvent(\"onClick\",[id,e]) || scheduler.config.readonly ) return;\n\t\t}\n\n\t\tif (id && scheduler.config.select) {\n\n\t\t\tscheduler.select(id);\n\t\t\tconst icon = trg.closest(\".dhx_menu_icon\");\n\n\t\t\tvar mask = scheduler._getClassName(icon);\n\t\t\tif (mask.indexOf(\"_icon\")!=-1)\n\t\t\t\tscheduler._click.buttons[mask.split(\" \")[1].replace(\"icon_\",\"\")](id);\n\t\t} else{\n\t\t\tscheduler._close_not_saved();\n\t\t\tif (scheduler.getState().select_id && new Date().valueOf()-(scheduler._new_event||0) > 500){\n\t\t\t\tscheduler.unselect();\n\t\t\t}\n\t\t}\n\t},\n\tdhx_cal_prev_button:function(){\n\t\tscheduler._click.dhx_cal_next_button(0,-1);\n\t},\n\tdhx_cal_next_button:function(dummy,step){\n\t\tvar def_step = 1;\n\t\tif (scheduler.config.rtl){\n\t\t\tstep = -step;\n\t\t\tdef_step = -def_step;\n\t\t}\n\t\tscheduler.setCurrentView(scheduler.date.add( //next line changes scheduler._date , but seems it has not side-effects\n\t\t\tscheduler.date[scheduler._mode+\"_start\"](new Date(scheduler._date)),(step||def_step),scheduler._mode));\n\t},\n\tdhx_cal_today_button:function(){\n\t\tif (scheduler.callEvent(\"onBeforeTodayDisplayed\", [])) {\n\t\t\tscheduler.setCurrentView(scheduler._currentDate());\n\t\t}\n\t},\n\tdhx_cal_tab:function(){\n\t\tvar name = this.getAttribute(\"data-tab\");\n\t\tvar deprecated_name = this.getAttribute(\"name\");\n\t\tvar mode = name || deprecated_name.substring(0, deprecated_name.search(\"_tab\"));\n\t\tscheduler.setCurrentView(scheduler._date,mode);\n\t},\n\tbuttons:{\n\t\t\"delete\":function(id){\n\t\t\tvar c = scheduler.locale.labels.confirm_deleting;\n\t\t\tscheduler._dhtmlx_confirm({message: c, title: scheduler.locale.labels.title_confirm_deleting, callback:function(){ scheduler.deleteEvent(id); },\n\t\t\tconfig: {ok: scheduler.locale.labels.icon_delete}\n\t\t});\n\t\t},\n\t\tedit:function(id){ scheduler.edit(id); },\n\t\tsave:function(id){ scheduler.editStop(true); },\n\t\tdetails:function(id){ scheduler.showLightbox(id); },\n\t\tform:function(id){ scheduler.showLightbox(id); },\n\t\tcancel:function(id){ scheduler.editStop(false); }\n\t}\n};\nscheduler._dhtmlx_confirm = function({message, title, callback, config}) {\n\tif (!message)\n\t\treturn callback();\n\n\tconfig = config || {};\n\tvar opts = { ...config, text: message };\n\tif (title)\n\t\topts.title = title;\n\tif (callback) {\n\t\topts.callback = function(result) {\n\t\t\tif (result)\n\t\t\t\tcallback();\n\t\t};\n\t}\n\tscheduler.confirm(opts);\n};\nscheduler.addEventNow=function(start,end,e){\n\tvar base = {};\n\tif (scheduler._isObject(start) && !scheduler._isDate(start)){\n\t\tbase = start;\n\t\tstart = null;\n\t}\n\n\tvar d = (this.config.event_duration||this.config.time_step)*60000;\n\tif (!start) start = base.start_date||Math.round((scheduler._currentDate()).valueOf()/d)*d;\n\tvar start_date = new Date(start);\n\tif (!end){\n\t\tvar start_hour = this.config.first_hour;\n\t\tif (start_hour > start_date.getHours()){\n\t\t\tstart_date.setHours(start_hour);\n\t\t\tstart = start_date.valueOf();\n\t\t}\n\t\tend = start.valueOf()+d;\n\t}\n\tvar end_date = new Date(end);\n\n\t// scheduler.addEventNow(new Date(), new Date()) + collision though get_visible events defect (such event was not retrieved)\n\tif(start_date.valueOf() == end_date.valueOf())\n\t\tend_date.setTime(end_date.valueOf()+d);\n\tbase.start_date = base.start_date||start_date;\n\tbase.end_date = base.end_date||end_date;\n\tbase.text = base.text||this.locale.labels.new_event;\n\tbase.id = this._drag_id = base.id || this.uid();\n\tthis._drag_mode=\"new-size\";\n\tthis._loading=true;\n\tvar eventId = this.addEvent(base);\n\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\n\tthis._loading=false;\n\n\tthis._drag_event={}; //dummy , to trigger correct event updating logic\n\tthis._on_mouse_up(e);\n\treturn eventId;\n};\nscheduler._on_dbl_click=function(e,src){\n\tsrc = src||(e.target||e.srcElement);\n\tif (this.config.readonly) return;\n\tvar name = scheduler._getClassName(src).split(\" \")[0];\n\tswitch(name){\n\t\tcase \"dhx_scale_holder\":\n\t\tcase \"dhx_scale_holder_now\":\n\t\tcase \"dhx_month_body\":\n\t\tcase \"dhx_wa_day_data\":\n\t\t\tif (!scheduler.config.dblclick_create) break;\n\t\t\tthis.addEventNow(this.getActionData(e).date,null,e);\n\t\t\tbreak;\n\t\tcase \"dhx_cal_event\":\n\t\tcase \"dhx_wa_ev_body\":\n\t\tcase \"dhx_agenda_line\":\n\t\tcase \"dhx_cal_agenda_event_line\":\n\t\tcase \"dhx_grid_event\":\n\t\tcase \"dhx_cal_event_line\":\n\t\tcase \"dhx_cal_event_clear\":\n\t\t\tvar id = this._locate_event(src);\n\t\t\tif (!this.callEvent(\"onDblClick\",[id,e])) return;\n\t\t\tif (this.config.details_on_dblclick || this._table_view || !this.getEvent(id)._timed || !this.config.select)\n\t\t\t\tthis.showLightbox(id);\n\t\t\telse\n\t\t\t\tthis.edit(id);\n\t\t\tbreak;\n\t\tcase \"dhx_time_block\":\n\t\tcase \"dhx_cal_container\":\n\t\t\treturn;\n\t\tdefault:\n\t\t\tvar t = this[\"dblclick_\"+name];\n\t\t\tif (t) {\n\t\t\t\tt.call(this,e);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (src.parentNode && src != this)\n\t\t\t\t\treturn scheduler._on_dbl_click(e,src.parentNode);\n\t\t\t}\n\t\t\tbreak;\n\t}\n};\n//column index by mouse x-coordinate\nscheduler._get_column_index = function(x_pos){\n\tvar column = 0;\n\tif (this._cols){\n\t\tvar width = 0;\n\t\tvar i = 0;\n\t\twhile (width + this._cols[i] < x_pos && i < this._cols.length){\n\t\t\twidth += this._cols[i];\n\t\t\ti++;\n\t\t}\n\t\tcolumn = i + (this._cols[i] ? ((x_pos - width)/ this._cols[i]) : 0);\n\n\t\tif (this._ignores){\n\t\t\tif(column >= this._cols.length){\n\t\t\t\twhile(column >= 1 && this._ignores[Math.floor(column)]){\n\t\t\t\t\tcolumn--;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t}\n\treturn column;\n};\n\n//transform mouse coordinates to day-time indexes of week based view\nscheduler._week_indexes_from_pos = function(pos){\n\t//\"get position\" can be invoked before columns are loaded into the units view(e.g. by onMouseMove handler in key_nav.js)\n\tif(!this._cols){\n\t\treturn pos;\n\t}else{\n\t\tvar column = this._get_column_index(pos.x);\n\n\t\tpos.x=Math.min(this._cols.length-1, Math.max(0,Math.ceil(column)-1));\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);\n\t\treturn pos;\n\t}\n};\n\nscheduler._mouse_coords=function(ev){\n\tvar pos;\n\tvar b=document.body;\n\tvar d = document.documentElement;\n\tif (!this.$env.isIE && (ev.pageX || ev.pageY))\n\t\tpos={x:ev.pageX, y:ev.pageY};\n\telse pos={\n\t\tx:ev.clientX + (b.scrollLeft||d.scrollLeft||0) - b.clientLeft,\n\t\ty:ev.clientY + (b.scrollTop||d.scrollTop||0) - b.clientTop\n\t};\n\t//apply layout\n\tif (this.config.rtl && this._colsS) {\n\t\tpos.x = this.$container.querySelector(\".dhx_cal_data\").offsetWidth - pos.x;\n\t\tpos.x += this.$domHelpers.getAbsoluteLeft(this._obj);\n\t\tif (this._mode !== \"month\") {\n\t\t\tpos.x -= this.xy.scale_width;\n\t\t}\n\t} else {\n\t\tpos.x-=this.$domHelpers.getAbsoluteLeft(this._obj)+(this._table_view?0:this.xy.scale_width);\n\t}\n\n\tvar dataArea = this.$container.querySelector(\".dhx_cal_data\");\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;\n\tpos.y-=this.$domHelpers.getAbsoluteTop(dataArea)-this._els[\"dhx_cal_data\"][0].scrollTop;\n\tpos.ev = ev;\n\tvar handler = this[\"mouse_\"+this._mode];\n\tif (handler){\n\t\tpos = handler.call(this,pos);\n\t}else{\n\t\t//transform to date\n\t\tif (!this._table_view) {\n\t\t\tpos = this._week_indexes_from_pos(pos);\n\t\t} else {\n\t\t\tvar column = this._get_column_index(pos.x);\n\t\t\tif (!this._cols || !this._colsS) // agenda/map views\n\t\t\t\treturn pos;\n\t\t\tvar dy=0;\n\t\t\tfor (dy=1; dy < this._colsS.heights.length; dy++)\n\t\t\t\tif (this._colsS.heights[dy]>pos.y) break;\n\n\t\t\tpos.y=Math.ceil( (Math.max(0, column)+Math.max(0,dy-1)*7)*24*60/this.config.time_step );\n\n\t\t\tif (scheduler._drag_mode || this._mode == \"month\")\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;\n\n\t\t\t//we care about ignored days only during event moving in month view\n\t\t\tif (this._drag_mode == \"move\"){\n\t\t\t\tif (scheduler._ignores_detected && scheduler.config.preserve_length){\n\t\t\t\t\tpos._ignores = true;\n\t\t\t\t\t//get real lengtn of event\n\t\t\t\t\tif (!this._drag_event._event_length)\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\"});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpos.x=0;\n\t\t}\n\t}\n\tpos.timestamp = +new Date();\n\treturn pos;\n};\nscheduler._close_not_saved=function(){\n\tif (new Date().valueOf()-(scheduler._new_event||0) > 500 && scheduler._edit_id){\n\t\tvar c=scheduler.locale.labels.confirm_closing;\n\n\t\tscheduler._dhtmlx_confirm({message: c, title: scheduler.locale.labels.title_confirm_closing, callback: function() { scheduler.editStop(scheduler.config.positive_closing); }});\n\t\tif(c){\n\t\t\tthis._drag_id = this._drag_pos = this._drag_mode = null;\n\t\t}\n\t}\n};\nscheduler._correct_shift=function(start, back){\n\treturn start-=((new Date(scheduler._min_date)).getTimezoneOffset()-(new Date(start)).getTimezoneOffset())*60000*(back?-1:1);\n};\n\nscheduler._is_pos_changed = function(old_pos, new_pos){\n\tfunction diff(old_val, new_val, acc){\n\t\treturn !!(Math.abs(old_val - new_val) > acc);\n\t}\n\n\tif(!(old_pos && this._drag_pos)){\n\t\treturn true;\n\t}\n\tvar delay = 100,\n\t\td_pos = 5;\n\n\t// start drag only if passed some time since mouse down, or if mouse position changed sufficiently\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));\n};\n\nscheduler._correct_drag_start_date = function(start){\n\tvar obj;\n\tif (scheduler.matrix)\n\t\tobj = scheduler.matrix[scheduler._mode];\n\tobj = obj || { x_step:1, x_unit:\"day\" };\n\n\tstart = new Date(start);\n\tvar len = 1;\n\tif(obj._start_correction || obj._end_correction)\n\t\tlen = (obj.last_hour||0)*60 - (start.getHours()*60+start.getMinutes()) || 1;\n\n\treturn start*1 + (scheduler._get_fictional_event_length(start, len, obj) - len);\n};\nscheduler._correct_drag_end_date = function(start, duration){\n\tvar obj;\n\tif (scheduler.matrix)\n\t\tobj = scheduler.matrix[scheduler._mode];\n\tobj = obj || { x_step:1, x_unit:\"day\" };\n\n\tvar end = start*1 + scheduler._get_fictional_event_length(start, duration, obj);\n\treturn new Date(end*1 - (scheduler._get_fictional_event_length(end, -1, obj, -1) + 1));\n};\n\nscheduler._on_mouse_move=function(e){\n\tif (this._drag_mode){\n\t\tvar pos=this._mouse_coords(e);\n\t\tif (this._is_pos_changed(this._drag_pos, pos)){\n\t\t\tvar start, end;\n\t\t\tif (this._edit_id!=this._drag_id)\n\t\t\t\tthis._close_not_saved();\n\n\t\t\tif(!this._drag_mode)\n\t\t\t\treturn;\n\n\t\t\tvar mousedownPos = null;\n\t\t\tif(this._drag_pos && !this._drag_pos.has_moved){\n\t\t\t\tmousedownPos = this._drag_pos;\n\t\t\t\tmousedownPos.has_moved = true;\n\t\t\t}\n\n\t\t\tthis._drag_pos = pos;\n\n\t\t\tthis._drag_pos.has_moved = true;\n\n\t\t\tif (this._drag_mode==\"create\"){\n\n\t\t\t\t// use mouse down position as a starting point for drag-create\n\t\t\t\tif(mousedownPos){\n\t\t\t\t\tpos = mousedownPos;\n\t\t\t\t}\n\n\t\t\t\tthis._close_not_saved();\n\t\t\t\tthis.unselect(this._select_id);\n\t\t\t\tthis._loading=true; //will be ignored by dataprocessor\n\n\t\t\t\tstart = this._get_date_from_pos(pos).valueOf();\n\n\t\t\t\tif (!this._drag_start) {\n\t\t\t\t\tvar res = this.callEvent(\"onBeforeEventCreated\", [e, this._drag_id]);\n\t\t\t\t\tif (!res){\n\t\t\t\t\t\tthis._loading=false;\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._loading=false;\n\t\t\t\t\tthis._drag_start=start;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tend = start;\n\t\t\t\tif (end == this._drag_start) {\n\t\t\t\t}\n\n\t\t\t\tvar start_date = new Date(this._drag_start);\n\t\t\t\tvar end_date = new Date(end);\n\t\t\t\tif ( (this._mode == \"day\" || this._mode == \"week\") &&\n\t\t\t\t\t(start_date.getHours() == end_date.getHours() &&\n\t\t\t\t\tstart_date.getMinutes() == end_date.getMinutes()) ) {\n\t\t\t\t\t\tend_date = new Date(this._drag_start+1000);\n\t\t\t\t}\n\n\n\t\t\t\tthis._drag_id=this.uid();\n\t\t\t\tthis.addEvent(start_date, end_date, this.locale.labels.new_event, this._drag_id, pos.fields);\n\n\t\t\t\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\n\t\t\t\tthis._loading=false;\n\t\t\t\tthis._drag_mode=\"new-size\";\n\n\t\t\t}\n\n\t\t\tvar timeStep = this.config.time_step;\n\t\t\tvar ev=this.getEvent(this._drag_id);\n\t\t\tvar obj;\n\t\t\tif (scheduler.matrix)\n\t\t\t\tobj = scheduler.matrix[scheduler._mode];\n\t\t\tobj = obj || { x_step:1, x_unit:\"day\" };\n\n\t\t\tif (this._drag_mode==\"move\"){\n\t\t\t\tstart = this._min_date.valueOf()+(pos.y*this.config.time_step+pos.x*24*60)*60000;\n\t\t\t\tif (!pos.custom && this._table_view) {\n\t\t\t\t\tstart += this.date.time_part(ev.start_date) * 1000;\n\t\t\t\t}\n\n\t\t\t\tif (!this._table_view && this._dragEventBody && this._drag_event._move_event_shift === undefined) {\n\t\t\t\t\tthis._drag_event._move_event_shift = start - ev.start_date;\n\t\t\t\t}\n\n\t\t\t\tif (this._drag_event._move_event_shift) {\n\t\t\t\t\tstart -= this._drag_event._move_event_shift;\n\t\t\t\t}\n\n\t\t\t\tstart = this._correct_shift(start);\n\n\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view && obj){\n\n\t\t\t\t\tstart = scheduler._correct_drag_start_date(start);\n\t\t\t\t\tend = scheduler._correct_drag_end_date(start,this._drag_event._event_length);\n\n\t\t\t\t} else\n\t\t\t\t\tend = ev.end_date.valueOf()-(ev.start_date.valueOf()-start);\n\t\t\t} else { // resize\n\t\t\t\tstart = ev.start_date.valueOf();\n\t\t\t\tend = ev.end_date.valueOf();\n\t\t\t\tif (this._table_view) {\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);\n\t\t\t\t\tif (this._mode == \"month\") {\n\t\t\t\t\t\tresize_date = this._correct_shift(resize_date, false);\n\t\t\t\t\t\tif( this._drag_from_start ) {\n\t\t\t\t\t\t\tvar day = 24*60*60000;\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\n\t\t\t\t\t\t\t\tstart = resize_date - day;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tend = resize_date;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif(this.config.preserve_length) {\n\t\t\t\t\t\t\tif (pos.resize_from_start) {\n\t\t\t\t\t\t\t\tstart = scheduler._correct_drag_start_date(resize_date);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tend = scheduler._correct_drag_end_date(resize_date, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tif (pos.resize_from_start) {\n\t\t\t\t\t\t\t\tstart = resize_date;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tend = resize_date;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tvar end_day_start = this.date.date_part(new Date(ev.end_date.valueOf() - 1)).valueOf();\n\t\t\t\t\tvar end_day_date = new Date(end_day_start);\n\t\t\t\t\tvar firstHour = this.config.first_hour;\n\t\t\t\t\tvar lastHour = this.config.last_hour;\n\t\t\t\t\tvar maxY = (lastHour - firstHour) * (60/timeStep);\n\n\t\t\t\t\tthis.config.time_step = 1;\n\t\t\t\t\tvar precisePos = this._mouse_coords(e);\n\t\t\t\t\tthis.config.time_step = timeStep;\n\n\t\t\t\t\tvar minDate = pos.y*timeStep*60000;\n\t\t\t\t\tvar maxDate = Math.min(pos.y + 1, maxY)*timeStep*60000;\n\t\t\t\t\tvar preciseDate = precisePos.y*60000;\n\n\t\t\t\t\t// rounding end date to the closest time step\n\t\t\t\t\tif(Math.abs(minDate - preciseDate) > Math.abs(maxDate - preciseDate)){\n\t\t\t\t\t\tend = end_day_start + maxDate;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tend = end_day_start + minDate;\n\t\t\t\t\t}\n\t\t\t\t\tend = end + ((new Date(end)).getTimezoneOffset() - end_day_date.getTimezoneOffset()) * 60000;\n\t\t\t\t\tthis._els[\"dhx_cal_data\"][0].style.cursor=\"s-resize\";\n\t\t\t\t\tif (this._mode == \"week\" || this._mode == \"day\")\n\t\t\t\t\t\tend = this._correct_shift(end);\n\t\t\t\t}\n\t\t\t\tif (this._drag_mode == \"new-size\") {\n\t\t\t\t\tif (end <= this._drag_start){\n\t\t\t\t\t\tvar shift = pos.shift||((this._table_view && !pos.custom)?24*60*60000:0);\n\t\t\t\t\t\tstart = end-(pos.shift?0:shift);\n\t\t\t\t\t\tend = this._drag_start+(shift||(timeStep*60000));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstart = this._drag_start;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (end<=start)\n\t\t\t\t\t\tend=start+timeStep*60000;\n\t\t\t\t}\n\t\t\t}\n\t\t\tvar new_end = new Date(end-1);\n\t\t\tvar new_start = new Date(start);\n\t\t\t//deny drag out of visible scheduler scale in timeline view\n\t\t\tif(this._drag_mode==\"move\" && scheduler.config.limit_drag_out &&\n\t\t\t\t(+new_start < +scheduler._min_date || +end > +scheduler._max_date)){\n\n\t\t\t\tif(+ev.start_date < +scheduler._min_date || +ev.end_date > +scheduler._max_date){\n\t\t\t\t\t// not move event if it's already outside time scale\n\t\t\t\t\tnew_start = new Date(ev.start_date);\n\t\t\t\t\tend = new Date(ev.end_date);\n\t\t\t\t}else{\n\n\t\t\t\t\tvar duration = end - new_start;\n\n\t\t\t\t\tif(+new_start < +scheduler._min_date){\n\t\t\t\t\t\tnew_start = new Date(scheduler._min_date);\n\t\t\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view){\n\t\t\t\t\t\t\tnew_start = new Date(scheduler._correct_drag_start_date(new_start));\n\t\t\t\t\t\t\tif(obj._start_correction)\n\t\t\t\t\t\t\t\tnew_start = new Date(new_start.valueOf() + obj._start_correction);\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));\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tend = new Date(+new_start + duration);\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tend = new Date(scheduler._max_date);\n\n\t\t\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view){\n\t\t\t\t\t\t\tif(obj._end_correction)\n\t\t\t\t\t\t\t\tend = new Date(end.valueOf() - obj._end_correction);\n\t\t\t\t\t\t\tend = new Date(end*1 - this._get_fictional_event_length(end, 0, obj, true));\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));\n\t\t\t\t\t\t\tif(this._ignores_detected){\n\t\t\t\t\t\t\t\tnew_start = scheduler.date.add(new_start, obj.x_step, obj.x_unit);\n\t\t\t\t\t\t\t\tend = new Date(end*1 - this._get_fictional_event_length(end, 0, obj, true));\n\t\t\t\t\t\t\t\tend = scheduler.date.add(end, obj.x_step, obj.x_unit);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tnew_start = new Date(+end - duration);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tvar new_end = new Date(end-1);\n\t\t\t}\n\n\n\n\t\t\t// fix event dates when resized to bottom of the column (day/week views)\n\t\t\tif(!this._table_view && this._dragEventBody &&\n\t\t\t\t!scheduler.config.all_timed &&\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)){\n\t\t\t\tvar duration = end - new_start;\n\t\t\t\tif (this._drag_mode == \"move\") {\n\t\t\t\t\tvar day = this._min_date.valueOf() + (pos.x * 24 * 60) * 60000;\n\t\t\t\t\tnew_start = new Date(day);\n\t\t\t\t\tnew_start.setHours(this.config.first_hour);\n\t\t\t\t\tend = new Date(new_start.valueOf() + duration);\n\t\t\t\t\tnew_end = new Date(end-1);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// fix event dates when resized to bottom of the column (day/week views)\n\t\t\tif(!this._table_view &&\n\t\t\t\t!scheduler.config.all_timed &&\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)){\n\t\t\t\tvar duration = end - new_start;\n\t\t\t\tvar day = this._min_date.valueOf()+(pos.x*24*60)*60000;\n\t\t\t\tend = scheduler.date.date_part(new Date(day));\n\t\t\t\tend.setHours(this.config.last_hour);\n\t\t\t\tnew_end = new Date(end-1);\n\t\t\t\tif(this._drag_mode == \"move\"){\n\t\t\t\t\tnew_start = new Date(+end - duration);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//prevent out-of-borders situation for day|week view\n\t\t\tif ( this._table_view || (new_end.getDate()==new_start.getDate() && new_end.getHours()=ed)\n\t\t\t\tcls += ' dhx_after';\n\t\t\telse if (sd.valueOf()==cd.valueOf())\n\t\t\t\tcls += ' dhx_now';\n\n\t\t\tif (this._ignores_detected && this._ignores[j]){\n\t\t\t\tcls += \" dhx_scale_ignore\";\n\t\t\t}\n\n\t\t\tcell.className = cls + \" \" + this.templates.month_date_class(sd, cd);\n\n\t\t\tcell.setAttribute(\"data-cell-date\", scheduler.templates.format_date(sd));\n\t\t\tvar body_class = \"dhx_month_body\";\n\t\t\tvar head_class = \"dhx_month_head\";\n\t\t\tif (j === 0 && this.config.left_border) {\n\t\t\t\tbody_class += \" dhx_month_body_border\";\n\t\t\t\thead_class += \" dhx_month_head_border\";\n\t\t\t}\n\t\t\tif (!this._ignores_detected || !this._ignores[j]){\n\t\t\t\tcell.style.width = tdwidths[j];\n\t\t\t\tthis._waiAria.monthCellAttr(cell, sd);\n\n\t\t\t\tvar cellHead = document.createElement(\"div\");\n\t\t\t\tcellHead.style.height = scheduler.xy.month_head_height + \"px\";\n\t\t\t\tcellHead.className = head_class;\n\t\t\t\tcellHead.innerHTML = this.templates.month_day(sd);\n\t\t\t\tcell.appendChild(cellHead);\n\n\t\t\t\tvar cellBody = document.createElement(\"div\");\n\t\t\t\tcellBody.className = body_class;\n\t\t\t\t// cellBody.style.height = row_height + \"px\";\n\t\t\t\t// cellBody.style.width = tdwidths[j];\n\t\t\t\tcell.appendChild(cellBody);\n\n\t\t\t} else {\n\t\t\t\tcell.appendChild(document.createElement(\"div\"));\n\t\t\t\tcell.appendChild(document.createElement(\"div\"));\n\t\t\t}\n\t\t\trendered_dates.push(sd);\n\t\t\tvar bf1 = sd.getDate();\n\t\t\tsd=this.date.add(sd,1,\"day\");\n\t\t\tif (sd.getDate() - bf1 > 1)\n\t\t\t\tsd = new Date(sd.getFullYear(), sd.getMonth(), bf1 + 1, 12, 0);\n\t\t}\n\n\t\tscheduler._colsS.heights[i] = cellheight;\n\t\tcellheight += getCellHeight(i);\n\t}\n\n\tthis._min_date = view_start;\n\tthis._max_date = sd;\n\n\tdiv.innerHTML = \"\";\n\tdiv.appendChild(table);\n\n\tthis._scales = {};\n\tvar cells = div.querySelectorAll('[data-cell-date]');\n\tcells.forEach((cell) => {\n\t\tconst date = scheduler.templates.parse_date(cell.getAttribute(\"data-cell-date\"));\n\t\tconst body = cell.querySelector(\".dhx_month_body\");\n\t\tthis._scales[+date] = body;\n\t\tthis.callEvent(\"onScaleAdd\", [this._scales[+date], date]);\n\t});\n\n\treturn this._max_date;\n};\n\nscheduler._reset_month_scale=function(b,dd,sd,rows){\n\t//recalculates rows height and redraws month layout\n\tvar ed=scheduler.date.add(dd,1,\"month\");\n\n\t//trim time part for comparison reasons\n\tvar cd = scheduler._currentDate();\n\tthis.date.date_part(cd);\n\tthis.date.date_part(sd);\n\n\trows = rows || Math.ceil(Math.round((ed.valueOf()-sd.valueOf()) / (60*60*24*1000) ) / 7);\n\n\tvar height = (Math.floor(b.clientHeight/rows) - this.xy.month_head_height);\n\n\tthis._colsS.height = height + this.xy.month_head_height;\n\tthis._colsS.heights = [];\n\n\treturn scheduler._render_month_scale(b, dd, sd, rows);\n\n};\n\nscheduler.getView = function (viewName) {\n\tif (!viewName) {\n\t\tviewName = scheduler.getState().mode;\n\t}\n\tif (scheduler.matrix && scheduler.matrix[viewName]) {\n\t\treturn scheduler.matrix[viewName];\n\t}\n\n\tif (scheduler._props && scheduler._props[viewName]) {\n\t\treturn scheduler._props[viewName];\n\t}\n\n\treturn null;\n};\n\nscheduler.getLabel = function(property, key) {\n\tvar sections = this.config.lightbox.sections;\n\tfor (var i=0; i scheduler.getState().max_date.valueOf()){\n\t\t\tendColumnIndex += getDaysDifference(endDate, scheduler.getState().max_date);\n\t\t}\n\t} else{\n\t\tendColumnIndex = Math.round(eventLength/60/60/1000/24);\n\t}\n\n\tvar last_column = true;\n\twhile (startColumnIndex < endColumnIndex){\n\t\tvar check = scheduler.date.add(endDate, -config.x_step, config.x_unit);\n\t\tif (ignore && ignore(endDate) && (!last_column || (last_column && ignore(check) ))){\n\t\t\teventLength -= (endDate-check);\n\n\t\t}else{\n\t\t\tlet excludedDuration = 0;\n\t\t\tconst intervalStart = new Date(Math.max(check.valueOf(), startDate.valueOf()));\n\t\t\tconst intervalEnd = endDate;\n\t\t\tconst leftCellCutOffStart = new Date(intervalStart.getFullYear(), intervalStart.getMonth(), intervalStart.getDate(), config.first_hour);\n\t\t\tconst leftCellCutOffEnd = new Date(intervalStart.getFullYear(), intervalStart.getMonth(), intervalStart.getDate(), config.last_hour);\n\t\t\tconst rightCellCutOffStart = new Date(endDate.getFullYear(), endDate.getMonth(), endDate.getDate(), config.first_hour);\n\t\t\tconst rightCellCutOffEnd = new Date(endDate.getFullYear(), endDate.getMonth(), endDate.getDate(), config.last_hour);\n\n\t\t\tif(intervalEnd.valueOf() > rightCellCutOffEnd.valueOf()){\n\t\t\t\texcludedDuration += intervalEnd - rightCellCutOffEnd;\n\t\t\t}\n\n\t\t\tif(intervalEnd.valueOf() > rightCellCutOffStart.valueOf()){\n\t\t\t\texcludedDuration += config._start_correction;\n\t\t\t} else {\n\t\t\t\texcludedDuration += intervalEnd.getHours()*60*60*1000 + intervalEnd.getMinutes()*60*1000;\n\t\t\t}\n\n\t\t\tif(intervalStart.valueOf() < leftCellCutOffEnd.valueOf()){\n\t\t\t\texcludedDuration += config._end_correction;\n\t\t\t}\n\n\t\t\tif(intervalStart.valueOf() < leftCellCutOffStart.valueOf()){\n\t\t\t\texcludedDuration += (leftCellCutOffStart.valueOf() - intervalStart.valueOf());\n\t\t\t}\n\t\t\t\n\n\t\t\teventLength -= excludedDuration;\n\t\t\tlast_column = false;\n\t\t}\n\t\tendDate = check;\n\t\tendColumnIndex--;\n\t}\n\treturn eventLength;\n};\nscheduler._get_fictional_event_length=function(end_date, ev_length, obj, back){\n\tvar sd = new Date(end_date);\n\tvar dir = back ? -1 : 1;\n\n\t//get difference caused by first|last hour\n\tif (obj._start_correction || obj._end_correction){\n\t\tvar today;\n\t\tif (back)\n\t\t\ttoday = (sd.getHours()*60+sd.getMinutes()) - (obj.first_hour||0)*60;\n\t\telse\n\t\t\ttoday = (obj.last_hour||0)*60 - (sd.getHours()*60+sd.getMinutes());\n\t\tvar per_day = (obj.last_hour - obj.first_hour)*60;\n\t\tvar days = Math.ceil( (ev_length / (60*1000) - today ) / per_day);\n\t\tif(days < 0) days = 0;\n\t\tev_length += days * (24*60 - per_day) * 60 * 1000;\n\t}\n\n\tvar fd = new Date(end_date*1+ev_length*dir);\n\tvar ignore = this[\"ignore_\"+this._mode];\n\n\tvar start_slot = 0,\n\t\tend_slot;\n\tif (obj.render){\n\t\tstart_slot = this._get_date_index(obj, sd);\n\t\tend_slot = this._get_date_index(obj, fd);\n\t} else{\n\t\tend_slot = Math.round(ev_length/60/60/1000/24);\n\t}\n\n\twhile (start_slot*dir <= end_slot*dir){\n\t\tvar check = scheduler.date.add(sd, obj.x_step*dir, obj.x_unit);\n\t\tif (ignore && ignore(sd)){\n\t\t\tev_length += (check-sd)*dir;\n\t\t\tend_slot += dir;\n\t\t}\n\n\t\tsd = check;\n\t\tstart_slot+=dir;\n\t}\n\n\treturn ev_length;\n};\n\nscheduler._get_section_view = function(){\n\treturn this.getView();\n};\n\nscheduler._get_section_property = function(){\n\tif(this.matrix && this.matrix[this._mode]){\n\t\treturn this.matrix[this._mode].y_property;\n\t}else if(this._props && this._props[this._mode]){\n\t\treturn this._props[this._mode].map_to;\n\t}\n\treturn null;\n};\n\nscheduler._is_initialized = function(){\n\tvar state = this.getState();\n\treturn (this._obj && state.date && state.mode);\n};\nscheduler._is_lightbox_open = function(){\n\tvar state = this.getState();\n\treturn state.lightbox_id !== null && state.lightbox_id !== undefined;\n};\n\n}","export default function extend(scheduler) {\n\n(function(){\n\n\t// eslint-disable-next-line no-control-regex\n\tvar htmlTags = new RegExp(\"<(?:.|\\n)*?>\", \"gm\");\n\tvar extraSpaces = new RegExp(\" +\", \"gm\");\n\n\tfunction stripHTMLLite(htmlText){\n\t\treturn (htmlText + \"\")\n\t\t\t.replace(htmlTags, \" \").\n\t\t\treplace(extraSpaces, \" \");\n\t}\n\n\tvar singleQuotes = new RegExp(\"'\", \"gm\");\n\tfunction escapeQuotes(text){\n\t\treturn (text + \"\").replace(singleQuotes, \"'\");\n\t}\n\n\tscheduler._waiAria = {\n\t\tgetAttributeString: function(attr){\n\t\t\tvar attributes = [\" \"];\n\t\t\tfor(var i in attr){\n\t\t\t\tif(typeof attr[i] != \"function\" && typeof attr[i] != \"object\") {\n\t\t\t\t\tvar text = escapeQuotes(stripHTMLLite(attr[i]));\n\t\t\t\t\tattributes.push(i + \"='\" + text + \"'\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tattributes.push(\" \");\n\t\t\treturn attributes.join(\" \");\n\t\t},\n\t\tsetAttributes: function(div, values){\n\t\t\tfor(var i in values){\n\t\t\t\tdiv.setAttribute(i, stripHTMLLite(values[i]));\n\t\t\t}\n\t\t\treturn div;\n\t\t},\n\n\t\tlabelAttr: function(div, content){\n\t\t\treturn this.setAttributes(div, {\"aria-label\": content});\n\t\t},\n\t\tlabel: function(label){\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": label});\n\t\t},\n\n\t\t// day/week/units\n\n\t\thourScaleAttr: function(div, content){\n\t\t\tthis.labelAttr(div, content);\n\n\t\t},\n\t\tmonthCellAttr: function(div, date){\n\t\t\tthis.labelAttr(div, scheduler.templates.day_date(date));\n\t\t},\n\n\t\tnavBarDateAttr: function(div, content){\n\t\t\tthis.labelAttr(div, content);\n\t\t},\n\t\tdayHeaderAttr: function(div, content){\n\t\t\tthis.labelAttr(div, content);\n\t\t},\n\n\t\tdayColumnAttr: function(div, date){\n\t\t\tthis.dayHeaderAttr(div, scheduler.templates.day_date(date));\n\t\t},\n\n\t\theaderButtonsAttributes: function(div, label){\n\t\t\treturn this.setAttributes(div, {\"role\":\"button\", \"aria-label\":label});\n\t\t},\n\n\t\theaderToggleState: function(div, isActive){\n\t\t\treturn this.setAttributes(div, {\"aria-pressed\": isActive ? \"true\" : \"false\"});\n\t\t},\n\n\n\t\tgetHeaderCellAttr:function(dateString){\n\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": dateString});\n\t\t},\n\n\n\t\teventAttr: function(event, div){\n\t\t\tthis._eventCommonAttr(event, div);\n\t\t},\n\n\n\t\t_eventCommonAttr: function(event, div){\n\t\t\tdiv.setAttribute(\"aria-label\", stripHTMLLite(scheduler.templates.event_text(event.start_date, event.end_date, event)));\n\n\t\t\tif(scheduler.config.readonly){\n\t\t\t\tdiv.setAttribute(\"aria-readonly\", true);\n\n\t\t\t}\n\n\t\t\tif(event.$dataprocessor_class){\n\t\t\t\tdiv.setAttribute(\"aria-busy\", true);\n\t\t\t}\n\n\n\t\t\tdiv.setAttribute(\"aria-selected\",\n\t\t\t\t(scheduler.getState().select_id == event.id) ? \"true\" : \"false\");\n\t\t},\n\n\t\tsetEventBarAttr: function(event, div){\n\t\t\tthis._eventCommonAttr(event, div);\n\t\t},\n\n\t\t_getAttributes: function(attributeSetter, arg){\n\t\t\tvar result = {\n\t\t\t\tsetAttribute:function(name, value){\n\t\t\t\t\tthis[name] = value;\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tattributeSetter.apply(this, [arg, result]);\n\t\t\treturn result;\n\n\t\t},\n\n\t\teventBarAttrString: function(event){\n\t\t\treturn this.getAttributeString(this._getAttributes(this.setEventBarAttr, event));\n\t\t},\n\n\n\n\t\tagendaHeadAttrString :function(){\n\t\t\treturn this.getAttributeString({role: \"row\"});\n\t\t},\n\t\tagendaHeadDateString :function(label){\n\t\t\treturn this.getAttributeString({role: \"columnheader\", \"aria-label\": label});\n\t\t},\n\t\tagendaHeadDescriptionString :function(label){\n\t\t\treturn this.agendaHeadDateString(label);\n\t\t},\n\t\tagendaDataAttrString: function(){\n\t\t\treturn this.getAttributeString({role: \"grid\"});\n\t\t},\n\t\tagendaEventAttrString: function(event){\n\t\t\tvar attrs = this._getAttributes(this._eventCommonAttr, event);\n\n\t\t\tattrs[\"role\"] = \"row\";\n\n\t\t\treturn this.getAttributeString(attrs);\n\n\t\t},\n\t\tagendaDetailsBtnString: function(){\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels.icon_details});\n\t\t},\n\n\n\t\tgridAttrString: function(){\n\t\t\treturn this.getAttributeString({role: \"grid\"});\n\t\t},\n\n\t\tgridRowAttrString: function(event){\n\t\t\treturn this.agendaEventAttrString(event);\n\t\t},\n\n\t\tgridCellAttrString: function(event, column, value){\n\t\t\treturn this.getAttributeString({\"role\":\"gridcell\", \"aria-label\": [\n\t\t\t\t(column.label === undefined ? column.id : column.label),\n\t\t\t\t\": \",\n\t\t\t\tvalue\n\t\t\t]});\n\t\t},\n\n\t\tmapAttrString: function(){\n\t\t\treturn this.gridAttrString();\n\t\t},\n\t\tmapRowAttrString: function(event){\n\t\t\treturn this.gridRowAttrString(event);\n\t\t},\n\t\tmapDetailsBtnString: function(){\n\t\t\treturn this.agendaDetailsBtnString();\n\t\t},\n\n\t\tminicalHeader: function(div, headerId){\n\t\t\tthis.setAttributes(div, {\n\t\t\t\t\"id\":headerId+\"\",\n\t\t\t\t\"aria-live\":\"assertice\",\n\t\t\t\t\"aria-atomic\":\"true\"\n\n\t\t\t});\n\t\t},\n\t\tminicalGrid: function(div, headerId){\n\t\t\tthis.setAttributes(div, {\n\t\t\t\t\"aria-labelledby\":headerId+\"\",\n\t\t\t\t\"role\":\"grid\"\n\t\t\t});\n\t\t},\n\t\tminicalRow: function(div){\n\t\t\tthis.setAttributes(div, {\n\t\t\t\t\"role\":\"row\"\n\t\t\t});\n\t\t},\n\t\tminicalDayCell: function(div, date){\n\t\t\tvar selected = (date.valueOf() < scheduler._max_date.valueOf() && date.valueOf() >= scheduler._min_date.valueOf());\n\t\t\tthis.setAttributes(div, {\n\t\t\t\t\"role\":\"gridcell\",\n\t\t\t\t\"aria-label\": scheduler.templates.day_date(date),\n\t\t\t\t\"aria-selected\": selected ? \"true\" : \"false\"\n\t\t\t});\n\t\t},\n\t\tminicalHeadCell: function(div){\n\t\t\tthis.setAttributes(div, {\n\t\t\t\t\"role\":\"columnheader\"\n\t\t\t});\n\t\t},\n\n\n\t\tweekAgendaDayCell: function(div, date){\n\t\t\tvar header = div.querySelector(\".dhx_wa_scale_bar\");\n\t\t\tvar content = div.querySelector(\".dhx_wa_day_data\");\n\t\t\tvar headerId = scheduler.uid() + \"\";\n\t\t\tthis.setAttributes(header, { \"id\": headerId});\n\t\t\tthis.setAttributes(content, { \"aria-labelledby\": headerId});\n\n\t\t},\n\t\tweekAgendaEvent: function(div, event){\n\t\t\tthis.eventAttr(event, div);\n\t\t},\n\n\t\tlightboxHiddenAttr: function(div){\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\n\t\t},\n\n\t\tlightboxVisibleAttr: function(div){\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"false\");\n\t\t},\n\n\t\tlightboxSectionButtonAttrString: function(label){\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":label, \"tabindex\":\"0\"});\n\t\t},\n\n\t\tyearHeader: function(div, headerId){\n\t\t\tthis.setAttributes(div, {\n\t\t\t\t\"id\":headerId+\"\"\n\t\t\t});\n\t\t},\n\t\tyearGrid: function(div, headerId){\n\t\t\tthis.minicalGrid(div, headerId);\n\t\t},\n\t\tyearHeadCell: function(div){\n\t\t\treturn this.minicalHeadCell(div);\n\t\t},\n\t\tyearRow: function(div){\n\t\t\treturn this.minicalRow(div);\n\t\t},\n\t\tyearDayCell: function(div){\n\t\t\tthis.setAttributes(div, {\n\t\t\t\t\"role\":\"gridcell\"\n\t\t\t});\n\t\t},\n\n\t\tlightboxAttr: function(div){\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\n\t\t\tdiv.firstChild.setAttribute(\"role\", \"heading\");\n\t\t},\n\n\t\tlightboxButtonAttrString:function(buttonName){\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels[buttonName], \"tabindex\":\"0\"});\n\t\t},\n\t\teventMenuAttrString: function(iconName){\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels[iconName]});\n\t\t},\n\t\tlightboxHeader: function(div, headerText){\n\t\t\tdiv.setAttribute(\"aria-label\", headerText);\n\t\t},\n\n\t\tlightboxSelectAttrString: function(time_option){\n\t\t\tvar label = \"\";\n\n\t\t\tswitch (time_option) {\n\t\t\t\tcase \"%Y\":\n\t\t\t\t\tlabel = scheduler.locale.labels.year;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"%m\":\n\t\t\t\t\tlabel = scheduler.locale.labels.month;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"%d\":\n\t\t\t\t\tlabel = scheduler.locale.labels.day;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"%H:%i\":\n\t\t\t\t\tlabel = scheduler.locale.labels.hour + \" \" + scheduler.locale.labels.minute;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": label});\n\t\t},\n\n\n\t\tmessageButtonAttrString: function(buttonLabel){\n\t\t\treturn \"tabindex='0' role='button' aria-label='\"+buttonLabel+\"'\";\n\t\t},\n\n\t\tmessageInfoAttr: function(div){\n\t\t\tdiv.setAttribute(\"role\", \"alert\");\n\t\t\t//div.setAttribute(\"tabindex\", \"-1\");\n\t\t},\n\n\t\tmessageModalAttr: function(div, uid){\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\n\t\t\tif(uid){\n\t\t\t\tdiv.setAttribute(\"aria-labelledby\", uid);\n\t\t\t}\n\n\t\t\t//\tdiv.setAttribute(\"tabindex\", \"-1\");\n\t\t},\n\n\t\tquickInfoAttr: function(div){\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\n\t\t},\n\n\t\tquickInfoHeaderAttrString: function(){\n\t\t\treturn \" role='heading' \";\n\t\t},\n\n\t\tquickInfoHeader: function(div, header){\n\t\t\tdiv.setAttribute(\"aria-label\", header);\n\t\t},\n\n\t\tquickInfoButtonAttrString: function(label){\n\t\t\treturn scheduler._waiAria.getAttributeString({\"role\":\"button\", \"aria-label\":label, \"tabindex\":\"0\"});\n\t\t},\n\n\t\ttooltipAttr: function(div){\n\t\t\tdiv.setAttribute(\"role\", \"tooltip\");\n\t\t},\n\n\t\ttooltipVisibleAttr: function(div){\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"false\");\n\t\t},\n\n\t\ttooltipHiddenAttr: function(div){\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\n\t\t}\n\t};\n\n\tfunction isDisabled(){\n\t\treturn !scheduler.config.wai_aria_attributes;\n\t}\n\n\tfor(var i in scheduler._waiAria){\n\t\tscheduler._waiAria[i] = (function(payload){\n\t\t\treturn function(){\n\t\t\t\tif(isDisabled()){\n\t\t\t\t\treturn \" \";\n\t\t\t\t}\n\t\t\t\treturn payload.apply(this, arguments);\n\t\t\t};\n\t\t})(scheduler._waiAria[i]);\n\t}\n\n\n})();\n\n}","export default function(scheduler){\n\treturn function assert(check, message){\n\t\tif (!check){\n\t\t\tif(scheduler.config.show_errors && scheduler.callEvent(\"onError\",[message]) !== false) {\n\t\t\t\tif (scheduler.message) {\n\t\t\t\t\tscheduler.message({type: \"error\", text: message, expire: -1});\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// eslint-disable-next-line\n\t\t\t\t\tconsole.log(message);\n\t\t\t\t}\n\n\t\t\t\t// eslint-disable-next-line no-debugger\n\t\t\t\tdebugger;\n\t\t\t}\n\t\t}\n\t};\n}","export default function extend(scheduler) {\n\nif (window.jQuery){\n\n(function( $ ){\n\tvar counter = 0;\n\tvar methods = [];\n\t$.fn.dhx_scheduler = function(config){\n\t\tif (typeof(config) === 'string') {\n\t\t\tif (methods[config] ) {\n\t\t\t\treturn methods[config].apply(this, []);\n\t\t\t}else {\n\t\t\t\t$.error('Method ' + config + ' does not exist on jQuery.dhx_scheduler');\n\t\t\t}\n\t\t} else {\n\t\t\tvar views = [];\n\t\t\tthis.each(function() {\n\t\t\t\tif (this && this.getAttribute){\n\t\t\t\t\tif (!this.getAttribute(\"dhxscheduler\")){\n\t\t\t\t\t\tvar name = \"scheduler\";\n\t\t\t\t\t\tif (counter){\n\t\t\t\t\t\t\tname = \"scheduler\" + (counter+1);\n\t\t\t\t\t\t\twindow[name] = Scheduler.getSchedulerInstance();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar comp = window[name];\n\n\t\t\t\t\t\tthis.setAttribute(\"dhxscheduler\", name);\n\t\t\t\t\t\tfor (var key in config)\n\t\t\t\t\t\t\tif (key!=\"data\")\n\t\t\t\t\t\t\t\tcomp.config[key] = config[key];\n\n\t\t\t\t\t\tif (!this.getElementsByTagName(\"div\").length){\n\t\t\t\t\t\t\tthis.innerHTML = '
';\n\t\t\t\t\t\t\tthis.className += \" dhx_cal_container\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcomp.init(this, comp.config.date, comp.config.mode);\n\t\t\t\t\t\tif (config.data)\n\t\t\t\t\t\t\tcomp.parse(config.data);\n\n\t\t\t\t\t\tviews.push(comp);\n\t\t\t\t\t\tcounter++;\n\t\t\t\t\t} else\n\t\t\t\t\t\tviews.push(window[this.getAttribute(\"dhxscheduler\")]);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif (views.length === 1) return views[0];\n\t\t\treturn views;\n\t\t}\n\t};\n\n\n\n\n})(window.jQuery);\n\n}\n\n}","export default function extend(scheduler) {\n\nscheduler.destructor = function(){\n\tscheduler.callEvent(\"onDestroy\", []);\n\tthis.clearAll();\n\n\tif(this.$container){\n\t\t// FIXME: clear container or remove container\n\t\tthis.$container.innerHTML = \"\";\n\t\t// scheduler.$domHelpers.remove(this.$container);\n\t}\n\n\tif(this._eventRemoveAll){\n\t\tthis._eventRemoveAll();\n\t}\n\n\tif(this.resetLightbox){\n\t\tthis.resetLightbox();\n\t}\n\n\tif(this._dp && this._dp.destructor){\n\t\tthis._dp.destructor();\n\t}\n\n\t// detachAllEvents should be called last, because in components may be attached events\n\tthis.detachAllEvents();\n\n\tfor(var i in this){\n\t\tif(i.indexOf(\"$\") === 0){\n\t\t\tdelete this[i];\n\t\t}\n\t}\n\tscheduler.$destroyed = true;\n};\n\n}","import serialize from \"../common/url_serialize.js\";\n\nexport default function extend(scheduler) {\n\nscheduler.Promise = window.Promise; \n\nfunction createConfig(method, args) {\n\tvar result = {\n\t\tmethod: method\n\t};\n\n\tif (args.length === 0) {\n\t\tthrow new Error(\"Arguments list of query is wrong.\");\n\t}\n\tif (args.length === 1) {\n\t\tif (typeof args[0] === \"string\") {\n\t\t\tresult.url = args[0];\n\t\t\tresult.async = true;\n\t\t} else {\n\t\t\tresult.url = args[0].url;\n\t\t\tresult.async = (args[0].async || true);\n\t\t\tresult.callback = args[0].callback;\n\t\t\tresult.headers = args[0].headers;\n\t\t}\n\t\tif (method === \"POST\" || \"PUT\") {\n\t\t\tif (args[0].data) {\n\t\t\t\tif (typeof args[0].data !== \"string\") {\n\t\t\t\t\tresult.data = serialize(args[0].data);\n\t\t\t\t} else {\n\t\t\t\t\tresult.data = args[0].data;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tresult.data = \"\";\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\tresult.url = args[0];\n\tswitch(method) {\n\t\tcase \"GET\":\n\t\tcase \"DELETE\":\n\t\t\tresult.callback = args[1];\n\t\t\tresult.headers = args[2];\n\t\tbreak;\n\t\tcase \"POST\":\n\t\tcase \"PUT\":\n\t\t\tif (args[1]) {\n\t\t\t\tif (typeof args[1] !== \"string\") {\n\t\t\t\t\tresult.data = serialize(args[1]);\n\t\t\t\t} else {\n\t\t\t\t\tresult.data = args[1];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tresult.data = \"\";\n\t\t\t}\n\t\t\tresult.callback = args[2];\n\t\t\tresult.headers = args[3];\n\t\tbreak;\n\t}\n\treturn result;\n}\nscheduler.ajax = {\n\t// if false - dhxr param will added to prevent caching on client side (default),\n\t// if true - do not add extra params\n\tcache: true,\n\n\t// default method for load/loadStruct, post/get allowed\n\tmethod: \"get\",\n\n\tserializeRequestParams: serialize,\n\tparse: function(data) {\n\t\tif (typeof data !== \"string\") return data;\n\n\t\tvar obj;\n\t\tdata = data.replace(/^[\\s]+/,\"\");\n\t\tif (typeof DOMParser !== \"undefined\" && !scheduler.$env.isIE) { // ff,ie9\n\t\t\tobj = (new DOMParser()).parseFromString(data, \"text/xml\");\n\t\t} else if (typeof window.ActiveXObject !== \"undefined\") {\n\t\t\tobj = new window.ActiveXObject(\"Microsoft.XMLDOM\");\n\t\t\tobj.async = \"false\";\n\t\t\tobj.loadXML(data);\n\t\t}\n\t\treturn obj;\n\t},\n\txmltop: function(tagname, xhr, obj) {\n\t\tif (typeof xhr.status == \"undefined\" || xhr.status < 400) {\n\t\t\tvar xml = (!xhr.responseXML) ? this.parse(xhr.responseText || xhr) : (xhr.responseXML || xhr);\n\t\t\tif (xml && xml.documentElement !== null && !xml.getElementsByTagName(\"parsererror\").length) {\n\t\t\t\treturn xml.getElementsByTagName(tagname)[0];\n\t\t\t}\n\t\t}\n\t\tif (obj !== -1) scheduler.callEvent(\"onLoadXMLError\",[\"Incorrect XML\", arguments[1], obj]);\n\t\treturn document.createElement(\"DIV\");\n\t},\n\txpath: function(xpathExp, docObj) {\n\t\tif (!docObj.nodeName) docObj = docObj.responseXML || docObj;\n\t\tif (scheduler.$env.isIE) {\n\t\t\treturn docObj.selectNodes(xpathExp)||[];\n\t\t} else {\n\t\t\tvar rows = [];\n\t\t\tvar first;\n\t\t\tvar col = (docObj.ownerDocument||docObj).evaluate(xpathExp, docObj, null, XPathResult.ANY_TYPE, null);\n\n\t\t\twhile (true){\n\t\t\t\tfirst = col.iterateNext();\n\t\t\t\tif(first){\n\t\t\t\t\trows.push(first);\n\t\t\t\t}else{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn rows;\n\t\t}\n\t},\n\tquery: function(config) {\n\t\treturn this._call(\n\t\t\t(config.method || \"GET\"),\n\t\t\tconfig.url,\n\t\t\tconfig.data || \"\",\n\t\t\t(config.async || true),\n\t\t\tconfig.callback,\n\t\t\tconfig.headers\n\t\t);\n\t},\n\tget: function(url, onLoad, headers) {\n\t\tvar config = createConfig(\"GET\", arguments);\n\t\treturn this.query(config);\n\t},\n\tgetSync: function(url, headers) {\n\t\tvar config = createConfig(\"GET\", arguments);\n\t\tconfig.async = false;\n\t\treturn this.query(config);\n\t},\n\tput: function(url, postData, onLoad, headers) {\n\t\tvar config = createConfig(\"PUT\", arguments);\n\t\treturn this.query(config);\n\t},\n\tdel: function(url, onLoad, headers) {\n\t\t/**\n\t\t * https://tools.ietf.org/html/rfc7231#section-4.3.5\n\t\t * A payload within a DELETE request message has no defined semantics;\n\t\t * sending a payload body on a DELETE request might cause some existing\n\t\t * implementations to reject the request.\n\t\t */\n\t\tvar config = createConfig(\"DELETE\", arguments);\n\t\treturn this.query(config);\n\t},\n\tpost: function(url, postData, onLoad, headers) {\n\t\tif (arguments.length == 1) {\n\t\t\tpostData = \"\";\n\t\t} else if (arguments.length == 2 && typeof(postData) == \"function\") {\n\t\t\tonLoad = postData;\n\t\t\tpostData = \"\";\n\t\t}\n\t\tvar config = createConfig(\"POST\", arguments);\n\t\treturn this.query(config);\n\t},\n\tpostSync: function(url, postData, headers) {\n\t\tpostData = (postData === null ? \"\" : String(postData));\n\n\t\tvar config = createConfig(\"POST\", arguments);\n\t\tconfig.async = false;\n\t\treturn this.query(config);\n\t},\n\t_call: function(method, url, postData, async, onLoad, headers) {\n\t\treturn new scheduler.Promise((function(resolve, reject) {\n\t\t\tvar t = (typeof XMLHttpRequest !== undefined && !scheduler.$env.isIE ? new XMLHttpRequest() : new window.ActiveXObject(\"Microsoft.XMLHTTP\"));\n\t\t\tvar isQt = (navigator.userAgent.match(/AppleWebKit/) !== null && navigator.userAgent.match(/Qt/) !== null && navigator.userAgent.match(/Safari/) !== null);\n\n\t\t\tif (!!async) {\n\t\t\t\tt.addEventListener(\"readystatechange\", function() {\n\t\t\t\t\tif ((t.readyState == 4) || (isQt && t.readyState == 3)) { // what for long response and status 404?\n\t\t\t\t\t\tif (t.status != 200 || t.responseText === \"\")\n\t\t\t\t\t\t\tif (!scheduler.callEvent(\"onAjaxError\", [t])) return;\n\n\t\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\t\tif (typeof(onLoad) == \"function\") {\n\t\t\t\t\t\t\t\tonLoad.apply(window, [{xmlDoc:t, filePath:url}]); // dhtmlx-compat, response.xmlDoc.responseXML/responseText\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tresolve(t);\n\t\t\t\t\t\t\tif (typeof(onLoad) == \"function\") {\n\t\t\t\t\t\t\t\tonLoad = null;\n\t\t\t\t\t\t\t\tt = null;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, 0);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (method == \"GET\" && !this.cache) {\n\t\t\t\turl += (url.indexOf(\"?\")>=0?\"&\":\"?\")+\"dhxr\"+new Date().getTime()+\"=1\";\n\t\t\t}\n\n\t\t\tt.open(method, url, async);\n\n\t\t\tif (headers){\n\t\t\t\tfor (var key in headers)\n\t\t\t\t\tt.setRequestHeader(key, headers[key]);\n\t\t\t} else if (method.toUpperCase() == \"POST\" || method == \"PUT\" || method == \"DELETE\") {\n\t\t\t\tt.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\t\t\t} else if (method == \"GET\") {\n\t\t\t\tpostData = null;\n\t\t\t}\n\n\t\t\tt.setRequestHeader(\"X-Requested-With\", \"XMLHttpRequest\");\n\n\t\t\tt.send(postData);\n\n\t\t\tif (!async) return {xmlDoc:t, filePath:url}; // dhtmlx-compat, response.xmlDoc.responseXML/responseText\n\t\t}.bind(this)));\n\t},\n\turlSeparator: function(str){\n\t\tif (str.indexOf(\"?\") != -1)\n\t\t\treturn \"&\";\n\t\telse\n\t\t\treturn \"?\";\n\t}\n};\n\nscheduler.$ajax = scheduler.ajax; // for old\n\n}","export default function extend(scheduler) {\n\n/*\n%e\tDay of the month without leading zeros (01..31)\n%d\tDay of the month, 2 digits with leading zeros (01..31)\n%j\tDay of the year, 3 digits with leading zeros (001..366)\n%a\tA textual representation of a day, two letters\n%W\tA full textual representation of the day of the week\n\n%c\tNumeric representation of a month, without leading zeros (0..12)\n%m\tNumeric representation of a month, with leading zeros (00..12)\n%b\tA short textual representation of a month, three letters (Jan..Dec)\n%M\tA full textual representation of a month, such as January or March (January..December)\n\n%y\tA two digit representation of a year (93..03)\n%Y\tA full numeric representation of a year, 4 digits (1993..03)\n*/\n\nscheduler.config={\n\tdefault_date: \"%j %M %Y\",\n\tmonth_date: \"%F %Y\",\n\tload_date: \"%Y-%m-%d\",\n\tweek_date: \"%l\",\n\tday_date: \"%D %j\",\n\thour_date: \"%H:%i\",\n\tmonth_day: \"%d\",\n\t//xml_date: \"%m/%d/%Y %H:%i\",\n\tdate_format: \"%Y-%m-%d %H:%i\",\n\tapi_date: \"%d-%m-%Y %H:%i\",\n\tparse_exact_format: false,\n\tpreserve_length:true,\n\ttime_step: 5,\n\tdisplayed_event_color: \"#ff4a4a\",\n\tdisplayed_event_text_color: \"#ffef80\",\n\twide_form: 0,\n\tday_column_padding: 8,\n\tuse_select_menu_space: true,\n\tfix_tab_position: true,\n\tstart_on_monday: true,\n\tfirst_hour: 0,\n\tlast_hour: 24,\n\treadonly: false,\n\tdrag_resize: true,\n\tdrag_move: true,\n\tdrag_create: true,\n\tdrag_event_body: true,\n\tdblclick_create: true,\n\tdetails_on_dblclick: true,\n\tedit_on_create: true,\n\tdetails_on_create: true,\n\theader: null,\n\thour_size_px: 44,\n\tresize_month_events:false,\n\tresize_month_timed:false,\n\t\n\tresponsive_lightbox: false,\n\tseparate_short_events: true,\n\trtl:false,\n\n\tcascade_event_display: false,\n\tcascade_event_count: 4,\n\tcascade_event_margin: 30,\n\n\tmulti_day:true,\n\tmulti_day_height_limit: 200,\n\n\tdrag_lightbox: true,\n\tpreserve_scroll: true,\n\tselect: true,\n\n\tserver_utc: false,\n\ttouch:true,\n\ttouch_tip:true,\n\ttouch_drag:500,\n\ttouch_swipe_dates: false,\n\tquick_info_detached:true,\n\n\tpositive_closing: false,\n\t//header_datepicker: true,\n\tdrag_highlight: true,\n\tlimit_drag_out: false,\n\ticons_edit: [\"icon_save\", \"icon_cancel\"],\n\ticons_select: [\"icon_details\", \"icon_edit\", \"icon_delete\"],\n\tbuttons_left: [\"dhx_save_btn\", \"dhx_cancel_btn\"],\n\tbuttons_right: [\"dhx_delete_btn\"],\n\tlightbox: {\n\t\tsections: [\n\t\t\t{name: \"description\", map_to: \"text\", type: \"textarea\", focus: true},\n\t\t\t{name: \"time\", height: 72, type: \"time\", map_to: \"auto\"}\n\t\t]\n\t},\n\thighlight_displayed_event: true,\n\tleft_border: false,\n\n\tajax_error: \"alert\",//\"ignore\"|\"console\"\n\tdelay_render: 0,\n\ttimeline_swap_resize: true,\n\twai_aria_attributes: true,\n\twai_aria_application_role: true,\n\n\tcsp: \"auto\",\n\tevent_attribute: \"data-event-id\",\n\tshow_errors: true\n};\n\nscheduler.config.buttons_left.$initial = scheduler.config.buttons_left.join();\nscheduler.config.buttons_right.$initial = scheduler.config.buttons_right.join();\n\nscheduler._helpers = {\n\tparseDate: function parseDate(date) {\n\t\tvar parse = scheduler.templates.xml_date || scheduler.templates.parse_date;\n\t\treturn parse(date);\n\t},\n\tformatDate: function formatDate(date) {\n\t\tvar format = scheduler.templates.xml_format || scheduler.templates.format_date;\n\t\treturn format(date);\n\t}\n};\n\nscheduler.templates={};\nscheduler.init_templates=function(){\n\n\n\n\tvar d=scheduler.date.date_to_str;\n\tvar c=scheduler.config;\n\tvar f = function(a,b){\n\t\tfor (var c in b)\n\t\t\tif (!a[c]) a[c]=b[c];\n\t};\n\tf(scheduler.templates,{\n\t\tday_date:d(c.default_date),\n\t\tmonth_date:d(c.month_date),\n\t\tweek_date:function(d1,d2){\n\t\t\tif(c.rtl) {\n\t\t\t\treturn scheduler.templates.day_date(scheduler.date.add(d2,-1,\"day\"))+\" – \"+scheduler.templates.day_date(d1);\n\t\t\t} \n\t\t\treturn scheduler.templates.day_date(d1)+\" – \"+scheduler.templates.day_date(scheduler.date.add(d2,-1,\"day\"));\n\t\t},\n\t\tday_scale_date:d(c.default_date),\n\t\ttime_slot_text: function(date){\n\t\t\treturn \"\";\n\t\t},\n\t\ttime_slot_class: function(date){\n\t\t\treturn \"\";\n\t\t},\n\n\t\tmonth_scale_date:d(c.week_date),\n\t\tweek_scale_date:d(c.day_date),\n\t\thour_scale:d(c.hour_date),\n\t\ttime_picker:d(c.hour_date),\n\t\tevent_date:d(c.hour_date),\n\t\tmonth_day:d(c.month_day),\n\n\t\tload_format: d(c.load_date),\n\t//\txml_date:scheduler.date.str_to_date(c.xml_date,c.server_utc),\n\t//\txml_format:d(c.date_format,c.server_utc),\n\t\tformat_date: d(c.date_format, c.server_utc),\n\t\tparse_date:scheduler.date.str_to_date(c.date_format,c.server_utc),\n\t\tapi_date:scheduler.date.str_to_date(c.api_date, false, false),\n\t\tevent_header:function(start,end,ev){\n\n\t\t\tif(ev._mode === \"small\" || ev._mode === \"smallest\"){\n\t\t\t\treturn scheduler.templates.event_date(start);\n\t\t\t}else{\n\t\t\t\treturn scheduler.templates.event_date(start)+\" - \"+scheduler.templates.event_date(end);\n\t\t\t}\n\t\t},\n\t\tevent_text:function(start,end,ev){\n\t\t\treturn ev.text;\n\t\t},\n\t\tevent_class:function(start,end,ev){\n\t\t\treturn \"\";\n\t\t},\n\t\tmonth_date_class:function(d){\n\t\t\treturn \"\";\n\t\t},\n\t\tweek_date_class:function(d){\n\t\t\treturn \"\";\n\t\t},\n\t\tevent_bar_date:function(start,end,ev) {\n\t\t\treturn scheduler.templates.event_date(start);\n\t\t},\n\t\tevent_bar_text:function(start,end,ev){\n\t\t\treturn ev.text;\n\t\t},\n\t\tmonth_events_link : function(date, count){\n\t\t\treturn \"View more(\"+count+\" events)\";\n\t\t},\n\t\tdrag_marker_class : function(start, end, event){\n\t\t\treturn \"\";\n\t\t},\n\t\tdrag_marker_content : function(start, end, event){\n\t\t\treturn \"\";\n\t\t},\n\t\t/* Could be redifined */\n\t\ttooltip_date_format: scheduler.date.date_to_str(\"%Y-%m-%d %H:%i\"),\n\t\ttooltip_text: function(start, end, event) {\n\t\t\treturn \"Event: \" + event.text + \"
Start date: \" + scheduler.templates.tooltip_date_format(start) + \"
End date: \" + scheduler.templates.tooltip_date_format(end);\n\t\t},\n\n\t\tcalendar_month: d(\"%F %Y\"),\n\t\tcalendar_scale_date: d(\"%D\"),\n\t\tcalendar_date: d(\"%d\"),\n\t\tcalendar_time: d(\"%d-%m-%Y\")\n\n\t});\n\tthis.callEvent(\"onTemplatesReady\",[]);\n};\n\n\n}","export default function extend(scheduler) {\n\nscheduler._events = {};\nscheduler.clearAll = function() {\n\tthis._events = {};\n\tthis._loaded = {};\n\n\tthis._edit_id = null;\n\tthis._select_id = null;\n\tthis._drag_id = null;\n\tthis._drag_mode = null;\n\tthis._drag_pos = null;\n\tthis._new_event = null;\n\n\tthis.clear_view();\n\tthis.callEvent(\"onClearAll\", []);\n};\nscheduler.addEvent = function(start_date, end_date, text, id, extra_data) {\n\tif (!arguments.length)\n\t\treturn this.addEventNow();\n\tvar ev = start_date;\n\tif (arguments.length != 1) {\n\t\tev = extra_data || {};\n\t\tev.start_date = start_date;\n\t\tev.end_date = end_date;\n\t\tev.text = text;\n\t\tev.id = id;\n\t}\n\tev.id = ev.id || scheduler.uid();\n\tev.text = ev.text || \"\";\n\n\tif (typeof ev.start_date == \"string\") ev.start_date = this.templates.api_date(ev.start_date);\n\tif (typeof ev.end_date == \"string\") ev.end_date = this.templates.api_date(ev.end_date);\n\tvar d = (this.config.event_duration || this.config.time_step) * 60000;\n\tif (ev.start_date.valueOf() == ev.end_date.valueOf())\n\t\tev.end_date.setTime(ev.end_date.valueOf() + d);\n\n\tev.start_date.setMilliseconds(0);\n\tev.end_date.setMilliseconds(0);\n\n\tev._timed = this.isOneDayEvent(ev);\n\n\tvar is_new = !this._events[ev.id];\n\tthis._events[ev.id] = ev;\n\tthis.event_updated(ev);\n\tif (!this._loading)\n\t\tthis.callEvent(is_new ? \"onEventAdded\" : \"onEventChanged\", [ev.id, ev]);\n\treturn ev.id;\n};\nscheduler.deleteEvent = function(id, silent) {\n\tvar ev = this._events[id];\n\tif (!silent && (!this.callEvent(\"onBeforeEventDelete\", [id, ev]) || !this.callEvent(\"onConfirmedBeforeEventDelete\", [id, ev])))\n\t\treturn;\n\tif (ev) {\n\t\tif(scheduler.getState().select_id == id){\n\t\t\tscheduler.unselect();\n\t\t}\n\t\tdelete this._events[id];\n\t\tthis.event_updated(ev);\n\n\t\tif(this._drag_id == ev.id){\n\t\t\tthis._drag_id = null;\n\t\t\tthis._drag_mode=null;\n\t\t\tthis._drag_pos=null;\n\t\t}\n\t}\n\n\tthis.callEvent(\"onEventDeleted\", [id, ev]);\n};\nscheduler.getEvent = function(id) {\n\treturn this._events[id];\n};\nscheduler.setEvent = function(id, hash) {\n\tif(!hash.id)\n\t\thash.id = id;\n\n\tthis._events[id] = hash;\n};\nscheduler.for_rendered = function(id, method) {\n\tfor (var i = this._rendered.length - 1; i >= 0; i--)\n\t\tif (this._rendered[i].getAttribute(this.config.event_attribute) == id)\n\t\t\tmethod(this._rendered[i], i);\n};\nscheduler.changeEventId = function(id, new_id) {\n\tif (id == new_id) return;\n\tvar ev = this._events[id];\n\tif (ev) {\n\t\tev.id = new_id;\n\t\tthis._events[new_id] = ev;\n\t\tdelete this._events[id];\n\t}\n\tthis.for_rendered(id, function(r) {\n\t\tr.setAttribute(\"event_id\", new_id); // for backward compatibility\n\t\tr.setAttribute(scheduler.config.event_attribute, new_id);\n\t});\n\tif (this._select_id == id) this._select_id = new_id;\n\tif (this._edit_id == id) this._edit_id = new_id;\n\t//if (this._drag_id==id) this._drag_id=new_id;\n\tthis.callEvent(\"onEventIdChange\", [id, new_id]);\n};\n\n(function() {\n\tvar attrs = [\"text\", \"Text\", \"start_date\", \"StartDate\", \"end_date\", \"EndDate\"];\n\tvar create_getter = function(name) {\n\t\treturn function(id) { return (scheduler.getEvent(id))[name]; };\n\t};\n\tvar create_setter = function(name) {\n\t\treturn function(id, value) {\n\t\t\tvar ev = scheduler.getEvent(id);\n\t\t\tev[name] = value;\n\t\t\tev._changed = true;\n\t\t\tev._timed = this.isOneDayEvent(ev);\n\t\t\tscheduler.event_updated(ev, true);\n\t\t};\n\t};\n\tfor (var i = 0; i < attrs.length; i += 2) {\n\t\tscheduler[\"getEvent\" + attrs[i + 1]] = create_getter(attrs[i]);\n\t\tscheduler[\"setEvent\" + attrs[i + 1]] = create_setter(attrs[i]);\n\t}\n})();\n\nscheduler.event_updated = function(ev, force) {\n\tif (this.is_visible_events(ev))\n\t\tthis.render_view_data();\n\telse\n\t\tthis.clear_event(ev.id);\n};\nscheduler.is_visible_events = function(ev) {\n\tif(!this._min_date || !this._max_date){\n\t\treturn false;\n\t}\n\n\t//if in displayed dates\n\tvar in_visible_range = (ev.start_date.valueOf() < this._max_date.valueOf() && this._min_date.valueOf() < ev.end_date.valueOf());\n\n\tif(in_visible_range){\n\n\t\t//end dates are not between last/first hours\n\t\tvar evFirstHour = ev.start_date.getHours(),\n\t\t\tevLastHour = ev.end_date.getHours() + (ev.end_date.getMinutes()/60),\n\t\t\tlastHour = this.config.last_hour,\n\t\t\tfirstHour = this.config.first_hour;\n\n\t\tvar end_dates_visible = (this._table_view || !((evLastHour > lastHour || evLastHour <= firstHour) && (evFirstHour >= lastHour || evFirstHour < firstHour)));\n\n\t\tif(end_dates_visible){\n\t\t\treturn true;\n\t\t}else{\n\n\t\t\t//event is bigger than area hidden between last/first hours\n\t\t\tvar event_duration = (ev.end_date.valueOf() - ev.start_date.valueOf()) / (1000*60*60),//hours\n\t\t\t\thidden_duration = 24 - (this.config.last_hour - this.config.first_hour);\n\n\t\t\treturn !!((event_duration > hidden_duration) || (evFirstHour < lastHour && evLastHour > firstHour));\n\n\t\t}\n\t}else{\n\t\treturn false;\n\t}\n};\nscheduler.isOneDayEvent = function(ev) {\n\t// decrease by one ms so events that ends on midnight on the next day were still considered one day events\n\t// e.g. (09-02-2018 19:00 - 10-02-2018 00:00)\n\t// events >= 24h long are considered multiday\n\tvar checkEndDate = new Date(ev.end_date.valueOf() - 1);\n\treturn (\n\t\tev.start_date.getFullYear() === checkEndDate.getFullYear() &&\n\t\tev.start_date.getMonth() === checkEndDate.getMonth() &&\n\t\tev.start_date.getDate() === checkEndDate.getDate()\n\t) && ((ev.end_date.valueOf() - ev.start_date.valueOf()) < (1000 * 60 * 60 * 24));\n};\n\nscheduler.get_visible_events = function(only_timed) {\n\t//not the best strategy for sure\n\tvar stack = [];\n\n\tfor (var id in this._events)\n\t\tif (this.is_visible_events(this._events[id]))\n\t\t\tif (!only_timed || this._events[id]._timed)\n\t\t\t\tif (this.filter_event(id, this._events[id]))\n\t\t\t\t\tstack.push(this._events[id]);\n\n\treturn stack;\n};\nscheduler.filter_event = function(id, ev) {\n\tvar filter = this[\"filter_\" + this._mode];\n\treturn (filter) ? filter(id, ev) : true;\n};\nscheduler._is_main_area_event = function(ev){\n\treturn !!ev._timed;\n};\nscheduler.render_view_data = function(evs, hold) {\n\tvar full = false;\n\tif (!evs) {\n\t\tfull = true;\n\t\tif (this._not_render) {\n\t\t\tthis._render_wait = true;\n\t\t\treturn;\n\t\t}\n\t\tthis._render_wait = false;\n\n\t\tthis.clear_view();\n\t\tevs = this.get_visible_events(!(this._table_view || this.config.multi_day));\n\t}\n\tfor(var i= 0, len = evs.length; i < len; i++){\n\t\tthis._recalculate_timed(evs[i]);\n\t}\n\n\tif (this.config.multi_day && !this._table_view) {\n\n\t\tvar tvs = [];\n\t\tvar tvd = [];\n\t\tfor (var i = 0; i < evs.length; i++) {\n\t\t\tif (this._is_main_area_event(evs[i]))\n\t\t\t\ttvs.push(evs[i]);\n\t\t\telse\n\t\t\t\ttvd.push(evs[i]);\n\t\t}\n\n\t\tif(!this._els['dhx_multi_day']){\n\t\t\tvar message = scheduler._commonErrorMessages.unknownView(this._mode);\n\t\t\tthrow new Error(message);\n\t\t}\n\n\t\t// multiday events\n\t\tthis._rendered_location = this._els['dhx_multi_day'][0];\n\t\tthis._table_view = true;\n\t\tthis.render_data(tvd, hold);\n\t\tthis._table_view = false;\n\n\t\t// normal events\n\t\tthis._rendered_location = this._els['dhx_cal_data'][0];\n\t\tthis._table_view = false;\n\t\tthis.render_data(tvs, hold);\n\n\t} else {\n\t\tvar buffer = document.createDocumentFragment();\n\t\tvar renderedLocation = this._els['dhx_cal_data'][0];\n\t\tthis._rendered_location = buffer;\n\t\tthis.render_data(evs, hold);\n\t\trenderedLocation.appendChild(buffer);\n\t\tthis._rendered_location = renderedLocation;\n\n\t}\n\n\tif(full){\n\t\tthis.callEvent(\"onDataRender\", []);\n\t}\n};\n\n\nscheduler._view_month_day = function(e){\n\tvar date = scheduler.getActionData(e).date;\n\tif(!scheduler.callEvent(\"onViewMoreClick\", [date]))\n\t\treturn;\n\tscheduler.setCurrentView(date, \"day\");\n};\n\nscheduler._render_month_link = function(ev){\n\tvar parent = this._rendered_location;\n\tvar toRender = this._lame_clone(ev);\n\n\t//render links in each cell of multiday events\n\tfor(var d = ev._sday; d < ev._eday; d++){\n\n\t\ttoRender._sday = d;\n\t\ttoRender._eday = d+1;\n\n\t\tvar date = scheduler.date;\n\t\tvar curr = scheduler._min_date;\n\t\tcurr = date.add(curr, toRender._sweek, \"week\");\n\t\tcurr = date.add(curr, toRender._sday, \"day\");\n\t\tvar count = scheduler.getEvents(curr, date.add(curr, 1, \"day\")).length;\n\n\t\tvar pos = this._get_event_bar_pos(toRender);\n\t\tvar widt = (pos.x2 - pos.x);\n\n\t\tvar el = document.createElement(\"div\");\n\t\tscheduler.event(el, \"click\", function(e){scheduler._view_month_day(e);});\n\t\tel.className = \"dhx_month_link\";\n\t\tel.style.top = pos.y + \"px\";\n\t\tel.style.left = pos.x + \"px\";\n\t\tel.style.width = widt + \"px\";\n\t\tel.innerHTML = scheduler.templates.month_events_link(curr, count);\n\t\tthis._rendered.push(el);\n\n\t\tparent.appendChild(el);\n\t}\n};\n\nscheduler._recalculate_timed = function(id){\n\tif(!id) return;\n\tvar ev;\n\tif(typeof(id) != \"object\")\n\t\tev = this._events[id];\n\telse\n\t\tev = id;\n\tif(!ev) return;\n\tev._timed = scheduler.isOneDayEvent(ev);\n};\nscheduler.attachEvent(\"onEventChanged\", scheduler._recalculate_timed);\nscheduler.attachEvent(\"onEventAdded\", scheduler._recalculate_timed);\n\nscheduler.render_data = function(evs, hold) {\n\tevs = this._pre_render_events(evs, hold);\n\tvar containers = {};\n\tfor (var i = 0; i < evs.length; i++)\n\t\tif (this._table_view){\n\t\t\tif(scheduler._mode != 'month'){\n\t\t\t\tthis.render_event_bar(evs[i]);//may be multiday section on other views\n\t\t\t}else{\n\n\t\t\t\tvar max_evs = scheduler.config.max_month_events;\n\t\t\t\tif(max_evs !== max_evs*1 || evs[i]._sorder < max_evs){\n\t\t\t\t\t//of max number events per month cell is set and event can be rendered\n\t\t\t\t\tthis.render_event_bar(evs[i]);\n\t\t\t\t}else if(max_evs !== undefined && evs[i]._sorder == max_evs){\n\t\t\t\t\t//render 'view more' links\n\t\t\t\t\tscheduler._render_month_link(evs[i]);\n\t\t\t\t}else{\n\t\t\t\t\t//do not render events with ordinal number > maximum events per cell\n\t\t\t\t}\n\t\t\t}\n\n\n\n\t\t}else{\n\t\t\tvar ev = evs[i];\n\t\t\tvar parent = scheduler.locate_holder(ev._sday);\n\t\t\tif (!parent) continue; //attempt to render non-visible event\n\n\t\t\tif(!containers[ev._sday]){\n\t\t\t\tcontainers[ev._sday] = {\n\t\t\t\t\treal: parent,\n\t\t\t\t\tbuffer: document.createDocumentFragment(),\n\t\t\t\t\twidth: parent.clientWidth\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tvar container = containers[ev._sday];\n\t\t\tthis.render_event(ev, container.buffer, container.width);\n\t\t}\n\n\t\tfor(var i in containers){\n\t\t\tvar container = containers[i];\n\t\t\tif(container.real && container.buffer){\n\t\t\t\tcontainer.real.appendChild(container.buffer);\n\t\t\t}\n\t\t}\n};\n\nscheduler._get_first_visible_cell = function(cells) {\n\tfor (var i = 0; i < cells.length; i++) {\n\t\tif ((cells[i].className || \"\").indexOf(\"dhx_scale_ignore\") == -1) {\n\t\t\treturn cells[i];\n\t\t}\n\t}\n\t// if no visible cell found, return cells[0] to be more tolerant, since it's the original logic\n\treturn cells[0];\n};\n\nscheduler._pre_render_events = function(evs, hold) {\n\tvar hb = this.xy.bar_height;\n\tvar h_old = this._colsS.heights;\n\tvar h = this._colsS.heights = [0, 0, 0, 0, 0, 0, 0];\n\tvar data = this._els[\"dhx_cal_data\"][0];\n\n\tif (!this._table_view) {\n\t\tevs = this._pre_render_events_line(evs, hold); //ignore long events for now\n\t}\n\telse {\n\t\tevs = this._pre_render_events_table(evs, hold);\n\t}\n\tif (this._table_view) {\n\t\tif (hold)\n\t\t\tthis._colsS.heights = h_old;\n\t\telse {\n\t\t\tvar monthRows = data.querySelectorAll(\".dhx_cal_month_row\");\n\t\t\tif (monthRows.length) {\n\t\t\t\tfor (var i = 0; i < monthRows.length; i++) {\n\t\t\t\t\th[i]++;\n\t\t\t\t\tvar cells = monthRows[i].querySelectorAll(\".dhx_cal_month_cell\");\n\t\t\t\t\tvar cellHeight = this._colsS.height - this.xy.month_head_height;\n\t\t\t\t\tif ((h[i]) * hb > cellHeight) { // 22 - height of cell's header\n\t\t\t\t\t\t//we have overflow, update heights\n\n\t\t\t\t\t\tvar cHeight = cellHeight;\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){\n\t\t\t\t\t\t\tcHeight = h[i] * hb;\n\t\t\t\t\t\t}else if( (this.config.max_month_events + 1) * hb > cellHeight){\n\t\t\t\t\t\t\tcHeight = (this.config.max_month_events + 1) * hb;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tmonthRows[i].style.height = (cHeight + this.xy.month_head_height) + \"px\";\n\t\t\t\t\t}\n\n\t\t\t\t\th[i] = (h[i - 1] || 0) + scheduler._get_first_visible_cell(cells).offsetHeight;\n\t\t\t\t}\n\t\t\t\th.unshift(0);\n\t\t\t\tconst dataArea = this.$container.querySelector(\".dhx_cal_data\");\n\t\t\t\tif (dataArea.offsetHeight < dataArea.scrollHeight && !scheduler._colsS.scroll_fix && scheduler.xy.scroll_width) {\n\n\t\t\t\t\tvar scale_settings = scheduler._colsS,\n\t\t\t\t\t\tsum_width = scale_settings[scale_settings.col_length],\n\t\t\t\t\t\trow_heights = scale_settings.heights.slice();\n\n\t\t\t\t\tsum_width -= (scheduler.xy.scroll_width || 0);\n\t\t\t\t\tthis._calc_scale_sizes(sum_width, this._min_date, this._max_date);\n\t\t\t\t\tscheduler._colsS.heights = row_heights;\n\n\t\t\t\t\tthis.set_xy(this._els[\"dhx_cal_header\"][0], sum_width/*, this.xy.scale_height*/);\n\t\t\t\t\tscheduler._render_scales(this._els[\"dhx_cal_header\"][0]);\n\t\t\t\t\tscheduler._render_month_scale(this._els[\"dhx_cal_data\"][0], this._get_timeunit_start(), this._min_date);\n\n\t\t\t\t\tscale_settings.scroll_fix = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (!evs.length && this._els[\"dhx_multi_day\"][0].style.visibility == \"visible\")\n\t\t\t\t\th[0] = -1;\n\t\t\t\tif (evs.length || h[0] == -1) {\n\t\t\t\t\t//shift days to have space for multiday events\n\t\t\t\t\t//var childs = evl.parentNode.childNodes;\n\n\t\t\t\t\t// +1 so multiday events would have 2px from top and 2px from bottom by default\n\t\t\t\t\tvar full_multi_day_height = (h[0] + 1) * hb + 4;\n\n\t\t\t\t\tvar used_multi_day_height = full_multi_day_height;\n\t\t\t\t\tvar used_multi_day_height_css = full_multi_day_height + \"px\";\n\t\t\t\t\tif (this.config.multi_day_height_limit) {\n\t\t\t\t\t\tused_multi_day_height = Math.min(full_multi_day_height, this.config.multi_day_height_limit) ;\n\t\t\t\t\t\tused_multi_day_height_css = used_multi_day_height + \"px\";\n\t\t\t\t\t}\n\n\t\t\t\t\tvar multi_day_section = this._els[\"dhx_multi_day\"][0];\n\t\t\t\t\tmulti_day_section.style.height = used_multi_day_height_css;\n\t\t\t\t\tmulti_day_section.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\n\t\t\t\t\tmulti_day_section.style.display = (h[0] == -1 ? \"none\" : \"\");\n\n\t\t\t\t\t// icon\n\t\t\t\t\tvar multi_day_icon = this._els[\"dhx_multi_day\"][1];\n\t\t\t\t\tmulti_day_icon.style.height = used_multi_day_height_css;\n\t\t\t\t\tmulti_day_icon.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\n\t\t\t\t\tmulti_day_icon.style.display = (h[0] == -1 ? \"none\" : \"\");\n\t\t\t\t\tmulti_day_icon.className = h[0] ? \"dhx_multi_day_icon\" : \"dhx_multi_day_icon_small\";\n\t\t\t\t\tthis._dy_shift = (h[0] + 1) * hb;\n\t\t\t\t\tif(this.config.multi_day_height_limit){\n\t\t\t\t\t\tthis._dy_shift = Math.min(this.config.multi_day_height_limit, this._dy_shift);\n\t\t\t\t\t}\n\t\t\t\t\th[0] = 0;\n\n\t\t\t\t\tif (used_multi_day_height != full_multi_day_height) {\n\n\t\t\t\t\t\tmulti_day_section.style.overflowY = \"auto\";\n\t\t\t\t\t//\tmulti_day_section.style.width = (parseInt(this._els[\"dhx_cal_navline\"][0].style.width)) + \"px\";\n\n\t\t\t\t\t\tmulti_day_icon.style.position = \"fixed\";\n\t\t\t\t\t\tmulti_day_icon.style.top = \"\";\n\t\t\t\t\t\tmulti_day_icon.style.left = \"\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn evs;\n};\nscheduler._get_event_sday = function(ev) {\n\t// get day in current view\n\t// use rounding for 23 or 25 hour days on DST\n\tvar datePart = this.date.day_start(new Date(ev.start_date));\n\treturn Math.round((datePart.valueOf() - this._min_date.valueOf()) / (24 * 60 * 60 * 1000));\n};\nscheduler._get_event_mapped_end_date = function(ev) {\n\tvar end_date = ev.end_date;\n\tif (this.config.separate_short_events) {\n\t\tvar ev_duration = (ev.end_date - ev.start_date) / 60000; // minutes\n\t\tif (ev_duration < this._min_mapped_duration) {\n\t\t\tend_date = this.date.add(end_date, this._min_mapped_duration - ev_duration, \"minute\");\n\t\t}\n\t}\n\treturn end_date;\n};\nscheduler._pre_render_events_line = function(evs, hold){\n\tevs.sort(function(a, b) {\n\t\tif (a.start_date.valueOf() == b.start_date.valueOf())\n\t\t\treturn a.id > b.id ? 1 : -1;\n\t\treturn a.start_date > b.start_date ? 1 : -1;\n\t});\n\tvar days = []; //events by weeks\n\tvar evs_originals = [];\n\n\tthis._min_mapped_duration = Math.floor(this.xy.min_event_height * 60 / this.config.hour_size_px); // values could change along the way\n\n\tfor (var i = 0; i < evs.length; i++) {\n\t\tvar ev = evs[i];\n\n\t\t//check date overflow\n\t\tvar sd = ev.start_date;\n\t\tvar ed = ev.end_date;\n\t\t//check scale overflow\n\t\tvar sh = sd.getHours();\n\t\tvar eh = ed.getHours();\n\t\tev._sday = this._get_event_sday(ev); // sday based on event start_date\n\t\tif (this._ignores[ev._sday]){\n\t\t\t//ignore event\n\t\t\tevs.splice(i,1);\n\t\t\ti--;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (!days[ev._sday]) days[ev._sday] = [];\n\n\t\tif (!hold) {\n\t\t\tev._inner = false;\n\n\t\t\tvar stack = days[ev._sday];\n\n\t\t\twhile (stack.length) {\n\t\t\t\tvar t_ev = stack[stack.length - 1];\n\t\t\t\tvar t_end_date = this._get_event_mapped_end_date(t_ev);\n\t\t\t\tif (t_end_date.valueOf() <= ev.start_date.valueOf()) {\n\t\t\t\t\tstack.splice(stack.length - 1, 1);\n\t\t\t\t} else {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tvar slot_index = stack.length;\n\t\t\tvar sorderSet = false;\n\t\t\tfor (var j = 0; j < stack.length; j++) {\n\t\t\t\tvar t_ev = stack[j];\n\t\t\t\tvar t_end_date = this._get_event_mapped_end_date(t_ev);\n\t\t\t\tif (t_end_date.valueOf() <= ev.start_date.valueOf()) {\n\t\t\t\t\tsorderSet = true;\n\t\t\t\t\tev._sorder = t_ev._sorder;\n\t\t\t\t\tslot_index = j;\n\t\t\t\t\tev._inner = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (stack.length)\n\t\t\t\tstack[stack.length - 1]._inner = true;\n\n\t\t\tif (!sorderSet) {\n\t\t\t\tif (stack.length) {\n\t\t\t\t\tif (stack.length <= stack[stack.length - 1]._sorder) {\n\t\t\t\t\t\tif (!stack[stack.length - 1]._sorder)\n\t\t\t\t\t\t\tev._sorder = 0;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tfor (j = 0; j < stack.length; j++) {\n\t\t\t\t\t\t\t\tvar _is_sorder = false;\n\t\t\t\t\t\t\t\tfor (var k = 0; k < stack.length; k++) {\n\t\t\t\t\t\t\t\t\tif (stack[k]._sorder == j) {\n\t\t\t\t\t\t\t\t\t\t_is_sorder = true;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (!_is_sorder) {\n\t\t\t\t\t\t\t\t\tev._sorder = j;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tev._inner = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar _max_sorder = stack[0]._sorder;\n\t\t\t\t\t\tfor (j = 1; j < stack.length; j++) {\n\t\t\t\t\t\t\tif (stack[j]._sorder > _max_sorder)\n\t\t\t\t\t\t\t\t_max_sorder = stack[j]._sorder;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tev._sorder = _max_sorder + 1;\n\t\t\t\t\t\tev._inner = false;\n\t\t\t\t\t}\n\n\t\t\t\t} else\n\t\t\t\t\tev._sorder = 0;\n\t\t\t}\n\n\t\t\tstack.splice(slot_index, slot_index == stack.length ? 0 : 1, ev);\n\n\t\t\tif (stack.length > (stack.max_count || 0)) {\n\t\t\t\tstack.max_count = stack.length;\n\t\t\t\tev._count = stack.length;\n\t\t\t} else {\n\t\t\t\tev._count = (ev._count) ? ev._count : 1;\n\t\t\t}\n\t\t}\n\n\t\tif (sh < this.config.first_hour || eh >= this.config.last_hour) {\n\t\t\t// Need to create copy of event as we will be changing it's start/end date\n\t\t\t// e.g. first_hour = 11 and event.start_date hours = 9. Need to preserve that info\n\t\t\tevs_originals.push(ev);\n\t\t\tevs[i] = ev = this._copy_event(ev);\n\n\t\t\tif (sh < this.config.first_hour) {\n\t\t\t\tev.start_date.setHours(this.config.first_hour);\n\t\t\t\tev.start_date.setMinutes(0);\n\t\t\t}\n\t\t\tif (eh >= this.config.last_hour) {\n\t\t\t\tev.end_date.setMinutes(0);\n\t\t\t\tev.end_date.setHours(this.config.last_hour);\n\t\t\t}\n\n\t\t\tif (ev.start_date > ev.end_date || sh == this.config.last_hour) {\n\t\t\t\tevs.splice(i, 1);\n\t\t\t\ti--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t}\n\tif (!hold) {\n\t\tfor (var i = 0; i < evs.length; i++) {\n\t\t\tevs[i]._count = days[evs[i]._sday].max_count;\n\t\t}\n\t\tfor (var i = 0; i < evs_originals.length; i++)\n\t\t\tevs_originals[i]._count = days[evs_originals[i]._sday].max_count;\n\t}\n\n\treturn evs;\n};\nscheduler._time_order = function(evs) {\n\tevs.sort(function(a, b) {\n\t\tif (a.start_date.valueOf() == b.start_date.valueOf()) {\n\t\t\tif (a._timed && !b._timed) return 1;\n\t\t\tif (!a._timed && b._timed) return -1;\n\t\t\treturn a.id > b.id ? 1 : -1;\n\t\t}\n\t\treturn a.start_date > b.start_date ? 1 : -1;\n\t});\n};\n\nscheduler._is_any_multiday_cell_visible = function(from, to, event){\n\tvar cols = this._cols.length;\n\tvar isAnyCellVisible = false;\n\tvar checkDate = from;\n\tvar noCells = true;\n\tvar lastDayEnd = new Date(to);\n\tif(scheduler.date.day_start(new Date(to)).valueOf() != to.valueOf()){\n\t\tlastDayEnd = scheduler.date.day_start(lastDayEnd);\n\t\tlastDayEnd = scheduler.date.add(lastDayEnd, 1, \"day\");\n\t}\n\twhile(checkDate < lastDayEnd){\n\t\tnoCells = false;\n\t\tvar cellIndex = this.locate_holder_day(checkDate, false, event);\n\t\tvar weekCellIndex = cellIndex % cols;\n\t\tif(!this._ignores[weekCellIndex]){\n\t\t\tisAnyCellVisible = true;\n\t\t\tbreak;\n\t\t}\n\t\tcheckDate = scheduler.date.add(checkDate, 1, \"day\");\n\t}\n\treturn noCells || isAnyCellVisible;\n};\n\nscheduler._pre_render_events_table = function(evs, hold) { // max - max height of week slot\n\tthis._time_order(evs);\n\tvar out = [];\n\tvar weeks = [\n\t\t[],\n\t\t[],\n\t\t[],\n\t\t[],\n\t\t[],\n\t\t[],\n\t\t[]\n\t]; //events by weeks\n\tvar max = this._colsS.heights;\n\tvar start_date;\n\tvar cols = this._cols.length;\n\tvar chunks_info = {};\n\n\tfor (var i = 0; i < evs.length; i++) {\n\t\tvar ev = evs[i];\n\t\tvar id = ev.id;\n\t\tif (!chunks_info[id]) {\n\t\t\tchunks_info[id] = {\n\t\t\t\tfirst_chunk: true,\n\t\t\t\tlast_chunk: true\n\t\t\t};\n\t\t}\n\t\tvar chunk_info = chunks_info[id];\n\t\tvar sd = (start_date || ev.start_date);\n\t\tvar ed = ev.end_date;\n\t\t//trim events which are crossing through current view\n\t\tif (sd < this._min_date) {\n\t\t\tchunk_info.first_chunk = false;\n\t\t\tsd = this._min_date;\n\t\t}\n\t\tif (ed > this._max_date) {\n\t\t\tchunk_info.last_chunk = false;\n\t\t\ted = this._max_date;\n\t\t}\n\n\t\tvar locate_s = this.locate_holder_day(sd, false, ev);\n\t\tev._sday = locate_s % cols;\n\t\t//skip single day events for ignored dates\n\t\tif (this._ignores[ev._sday] && ev._timed) continue;\n\n\t\tvar locate_e = this.locate_holder_day(ed, true, ev) || cols;\n\t\tev._eday = (locate_e % cols) || cols; //cols used to fill full week, when event end on monday\n\t\tev._length = locate_e - locate_s;\n\t\t//3600000 - compensate 1 hour during winter|summer time shift\n\t\tev._sweek = Math.floor((this._correct_shift(sd.valueOf(), 1) - this._min_date.valueOf()) / (60 * 60 * 1000 * 24 * cols));\n\n\t\tvar isAnyCellVisible = scheduler._is_any_multiday_cell_visible(sd, ed, ev);\n\n\t\tif(!isAnyCellVisible){\n\t\t\tcontinue;\n\t\t}\n\n\t\t//current slot\n\t\tvar stack = weeks[ev._sweek];\n\t\t//check order position\n\t\tvar stack_line;\n\n\t\tfor (stack_line = 0; stack_line < stack.length; stack_line++)\n\t\t\tif (stack[stack_line]._eday <= ev._sday)\n\t\t\t\tbreak;\n\n\t\tif (!ev._sorder || !hold) {\n\t\t\tev._sorder = stack_line;\n\t\t}\n\n\t\tif (ev._sday + ev._length <= cols) {\n\t\t\tstart_date = null;\n\t\t\tout.push(ev);\n\t\t\tstack[stack_line] = ev;\n\t\t\t//get max height of slot\n\t\t\tmax[ev._sweek] = stack.length - 1;\n\t\t\tev._first_chunk = chunk_info.first_chunk;\n\t\t\tev._last_chunk = chunk_info.last_chunk;\n\t\t} else { // split long event in chunks\n\t\t\tvar copy = this._copy_event(ev);\n\t\t\tcopy.id = ev.id;\n\t\t\tcopy._length = cols - ev._sday;\n\t\t\tcopy._eday = cols;\n\t\t\tcopy._sday = ev._sday;\n\t\t\tcopy._sweek = ev._sweek;\n\t\t\tcopy._sorder = ev._sorder;\n\t\t\tcopy.end_date = this.date.add(sd, copy._length, \"day\");\n\t\t\tcopy._first_chunk = chunk_info.first_chunk;\n\t\t\tif (chunk_info.first_chunk) {\n\t\t\t\tchunk_info.first_chunk = false;\n\t\t\t}\n\n\t\t\tout.push(copy);\n\t\t\tstack[stack_line] = copy;\n\t\t\tstart_date = copy.end_date;\n\t\t\t//get max height of slot\n\t\t\tmax[ev._sweek] = stack.length - 1;\n\t\t\ti--;\n\t\t\tcontinue; //repeat same step\n\t\t}\n\t}\n\treturn out;\n};\nscheduler._copy_dummy = function() {\n\tvar a = new Date(this.start_date);\n\tvar b = new Date(this.end_date);\n\tthis.start_date = a;\n\tthis.end_date = b;\n};\nscheduler._copy_event = function(ev) {\n\tthis._copy_dummy.prototype = ev;\n\treturn new this._copy_dummy();\n\t//return {start_date:ev.start_date, end_date:ev.end_date, text:ev.text, id:ev.id}\n};\nscheduler._rendered = [];\nscheduler.clear_view = function() {\n\tfor (var i = 0; i < this._rendered.length; i++) {\n\t\tvar obj = this._rendered[i];\n\t\tif (obj.parentNode) obj.parentNode.removeChild(obj);\n\t}\n\tthis._rendered = [];\n};\nscheduler.updateEvent = function(id) {\n\tvar ev = this.getEvent(id);\n\tthis.clear_event(id);\n\n\tif (ev && this.is_visible_events(ev) && this.filter_event(id, ev) && (this._table_view || this.config.multi_day || ev._timed)) {\n\t\tif (this.config.update_render){\n\t\t\tthis.render_view_data();\n\t\t}else{\n\t\t\tif(this.getState().mode == \"month\" && !this.getState().drag_id && !this.isOneDayEvent(ev)){\n\t\t\t\tthis.render_view_data();\n\t\t\t}else{\n\t\t\t\tthis.render_view_data([ev], true);\n\t\t\t}\n\t\t}\n\t}\n};\nscheduler.clear_event = function(id) {\n\tthis.for_rendered(id, function(node, i) {\n\t\tif (node.parentNode)\n\t\t\tnode.parentNode.removeChild(node);\n\t\tscheduler._rendered.splice(i, 1);\n\t});\n};\nscheduler._y_from_date = function(date){\n\tvar sm = date.getHours() * 60 + date.getMinutes();\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\n};\nscheduler._calc_event_y = function(ev, min_height){\n\tmin_height = min_height || 0;\n\tvar sm = ev.start_date.getHours() * 60 + ev.start_date.getMinutes();\n\tvar em = (ev.end_date.getHours() * 60 + ev.end_date.getMinutes()) || (scheduler.config.last_hour * 60);\n\tvar top = this._y_from_date(ev.start_date);\n\n\tvar height = Math.max(min_height, (em - sm) * this.config.hour_size_px / 60); //42px/hour\n\treturn {\n\t\ttop: top,\n\t\theight: height\n\t};\n};\nscheduler.render_event = function(ev, buffer, parentWidth) {\n\tvar menu = scheduler.xy.menu_width;\n\tvar menu_offset = (this.config.use_select_menu_space) ? 0 : menu;\n\tif (ev._sday < 0) return; //can occur in case of recurring event during time shift\n\n\tvar parent = scheduler.locate_holder(ev._sday);\n\tif (!parent) return; //attempt to render non-visible event\n\n\tbuffer = buffer || parent;\n\n\tvar pos_y = this._calc_event_y(ev, scheduler.xy.min_event_height);\n\tvar top = pos_y.top,\n\t\theight = pos_y.height;\n\n\tvar ev_count = ev._count || 1;\n\tvar ev_sorder = ev._sorder || 0;\n\n\tparentWidth = parentWidth || parent.clientWidth;\n\tif(this.config.day_column_padding){\n\t\tparentWidth -= this.config.day_column_padding;\n\t}\n\n\tvar width = Math.floor((parentWidth - menu_offset) / ev_count);\n\tvar left = ev_sorder * width + (ev_sorder > 0 ? 2 : 1);\n\tif (!ev._inner) width = width * (ev_count - ev_sorder);\n\tif (this.config.cascade_event_display) {\n\t\tvar limit = this.config.cascade_event_count;\n\t\tvar margin = this.config.cascade_event_margin;\n\t\tleft = ev_sorder % limit * margin;\n\t\tvar right = (ev._inner) ? (ev_count - ev_sorder - 1) % limit * margin / 2 : 0;\n\t\twidth = Math.floor(parentWidth - menu_offset - left - right);\n\t}\n\n\tif(height < 30){\n\t\tev._mode = \"smallest\";\n\t}else if(height < 42){\n\t\tev._mode = \"small\";\n\t}else{\n\t\tev._mode = null;\n\t}\n\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));\n\t\n\tif(ev._mode === \"smallest\"){\n\t\td.classList.add(\"dhx_cal_event--xsmall\");\n\t}else if (ev._mode === \"small\"){\n\t\td.classList.add(\"dhx_cal_event--small\");\n\t}\n\n\tthis._waiAria.eventAttr(ev, d);\n\tthis._rendered.push(d);\n\tbuffer.appendChild(d);\n\n\tvar parentPosition = parseInt( this.config.rtl ? parent.style.right : parent.style.left, 10);\n\n\tleft = left + parentPosition + menu_offset;\n\n\tif (this._edit_id == ev.id) {\n\n\t\td.style.zIndex = 1; //fix overlapping issue\n\t\twidth = Math.max(width, scheduler.xy.editor_width);\n\t\td = document.createElement(\"div\");\n\t\td.setAttribute(\"event_id\", ev.id); // for backward compatibility\n\t\td.setAttribute(this.config.event_attribute, ev.id);\n\n\t\tthis._waiAria.eventAttr(ev, d);\n\n\t\td.className = \"dhx_cal_event dhx_cal_editor\";\n\t\tif (this.config.rtl) left++;\n\t\tthis.set_xy(d, width, height, left, top);\n\n\n\t\tif(ev.color){\n\t\t\td.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\n\t\t}\n\t\tvar tplClass = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\n\n\t\tif(tplClass){\n\t\t\td.className += \" \" + tplClass;\n\t\t}\n\t\tvar d2 = document.createElement(\"div\");\n\t\td2.style.cssText += \"overflow:hidden;height:100%\";\n\n\t\td.appendChild(d2);\n\t\tthis._els[\"dhx_cal_data\"][0].appendChild(d);\n\t\tthis._rendered.push(d);\n\n\t\td2.innerHTML = \"\";\n\t\tthis._editor = d2.querySelector(\"textarea\");\n\t\t\n\t\tscheduler.event(this._editor, \"keydown\", function(e) {\n\t\t\tif (e.shiftKey) return true;\n\t\t\tvar code = e.keyCode;\n\t\t\tif (code == scheduler.keys.edit_save) scheduler.editStop(true);\n\t\t\tif (code == scheduler.keys.edit_cancel) scheduler.editStop(false);\n\n\t\t\tif(code == scheduler.keys.edit_save || code == scheduler.keys.edit_cancel){\n\t\t\t\tif(e.preventDefault) e.preventDefault();\n\t\t\t}\n\t\t});\n\t\tscheduler.event(this._editor, \"selectstart\", function (e) {\n\t\t\te.cancelBubble = true;\n\t\t\treturn true;\n\t\t});\n\t\tscheduler._focus(this._editor, true);\n\t\t//IE and opera can add x-scroll during focusing\n\t\tthis._els[\"dhx_cal_data\"][0].scrollLeft = 0;\n\t}\n\tif (this.xy.menu_width !== 0 && this._select_id == ev.id) {\n\n\t\tif (this.config.cascade_event_display && this._drag_mode)\n\t\t\td.style.zIndex = 1; //fix overlapping issue for cascade view in case of dnd of selected event\n\t\tvar icons = this.config[\"icons_\" + ((this._edit_id == ev.id) ? \"edit\" : \"select\")];\n\t\tvar icons_str = \"\";\n\n\t\tvar ariaAttr;\n\n\t\tfor (var i = 0; i < icons.length; i++) {\n\t\t\tconst currentIcon = icons[i];\n\t\t\tariaAttr = this._waiAria.eventMenuAttrString(currentIcon);\n\t\t\ticons_str += `
`;\n\t\t}\n\t\tvar obj = this._render_v_bar(ev, left - menu - 1, top, menu, null, \"\", \"
\", icons_str, true);\n\n\t\tif(ev.color){\n\t\t\tobj.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\n\t\t}\n\t\tif(ev.textColor){\n\t\t\tobj.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\n\t\t}\n\n\t\t//obj.style.left = left - menu + 1;\n\t\tthis._els[\"dhx_cal_data\"][0].appendChild(obj);\n\t\tthis._rendered.push(obj);\n\t}\n\tif(this.config.drag_highlight && this._drag_id == ev.id){\n\t\tthis.highlightEventPosition(ev);\n\t}\n};\nscheduler._render_v_bar = function (ev, x, y, w, h, style, contentA, contentB, bottom) {\n\tvar d = document.createElement(\"div\");\n\tvar id = ev.id;\n\tvar cs = (bottom) ? \"dhx_cal_event dhx_cal_select_menu\" : \"dhx_cal_event\";\n\n\tvar state = scheduler.getState();\n\tif(state.drag_id == ev.id){\n\t\tcs += \" dhx_cal_event_drag\";\n\t}\n\n\tif(state.select_id == ev.id){\n\t\tcs += \" dhx_cal_event_selected\";\n\t}\n\n\tvar cse = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\n\tif (cse) cs = cs + \" \" + cse;\n\n\tif(this.config.cascade_event_display) {\n\t\tcs += \" dhx_cal_event_cascade\";\n\t}\n\n\tvar boxWidth = w;\n\n\tvar html = '
';\n\td.innerHTML = html;\n\n\tvar container = d.cloneNode(true).firstChild;\n\n\tif (!bottom && scheduler.renderEvent(container, ev, w, h, contentA, contentB)) {\n\t\tif(ev.color){\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\n\t\t}\n\t\tif(ev.textColor){\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\n\t\t}\n\n\t\treturn container;\n\t} else {\n\t\tcontainer = d.firstChild;\n\t\tif(ev.color){\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\n\t\t}\n\t\tif(ev.textColor){\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\n\t\t}\n\n\t\tvar inner_html = '
 
';\n\t\tinner_html += '
' + contentA + '
';\n\t\tinner_html += '
' + contentB + '
'; // +2 css specific, moved from render_event\n\n\t\tvar footer_class = \"dhx_event_resize dhx_footer\";\n\t\tif (bottom || ev._drag_resize === false)\n\t\t\tfooter_class = \"dhx_resize_denied \" + footer_class;\n\n\t\tinner_html += '
';\n\n\t\tcontainer.innerHTML = inner_html;\n\t}\n\n\treturn container;\n};\nscheduler.renderEvent = function(){\n\treturn false;\n};\nscheduler.locate_holder = function(day) {\n\tif (this._mode == \"day\") return this._els[\"dhx_cal_data\"][0].firstChild; //dirty\n\treturn this._els[\"dhx_cal_data\"][0].childNodes[day];\n};\nscheduler.locate_holder_day = function(date, past) {\n\tvar day = Math.floor((this._correct_shift(date, 1) - this._min_date) / (60 * 60 * 24 * 1000));\n\t//when locating end data of event , we need to use next day if time part was defined\n\tif (past && this.date.time_part(date)) day++;\n\treturn day;\n};\n\n\n\nscheduler._get_dnd_order = function(order, ev_height, max_height){\n\tif(!this._drag_event)\n\t\treturn order;\n\tif(!this._drag_event._orig_sorder)\n\t\tthis._drag_event._orig_sorder = order;\n\telse\n\t\torder = this._drag_event._orig_sorder;\n\n\tvar evTop = ev_height * order;\n\twhile((evTop + ev_height) > max_height){\n\t\torder--;\n\t\tevTop -= ev_height;\n\t}\n\torder = Math.max(order, 0);\n\treturn order;\n};\n//scheduler._get_event_bar_pos = function(sday, eday, week, drag){\nscheduler._get_event_bar_pos = function(ev){\n\tvar rtl = this.config.rtl;\n\tvar columns = this._colsS;\n\tvar x = columns[ev._sday];\n\tvar x2 = columns[ev._eday];\n\tif (rtl) {\n\t\tx = columns[columns.col_length] - columns[ev._eday] + columns[0];\n\t\tx2 = columns[columns.col_length] - columns[ev._sday] + columns[0];\n\t}\n\n\tif (x2 == x) x2 = columns[ev._eday + 1];\n\tvar hb = this.xy.bar_height;\n\n\tvar order = ev._sorder;\n\tif(ev.id == this._drag_id){\n\t\tvar cellHeight = columns.heights[ev._sweek + 1] - columns.heights[ev._sweek]- this.xy.month_head_height;//22 for month head height\n\t\torder = scheduler._get_dnd_order(order, hb, cellHeight);\n\t}\n\tvar y_event_offset = order * hb;\n\tvar y = columns.heights[ev._sweek] + (columns.height ? (this.xy.month_scale_height + 2) : 2 ) + y_event_offset;\n\treturn {x:x, x2:x2, y:y};\n};\n\nscheduler.render_event_bar = function (ev) {\n\tvar parent = this._rendered_location;\n\tvar pos = this._get_event_bar_pos(ev);\n\tvar y = pos.y;\n\tvar x = pos.x;\n\tvar x2 = pos.x2;\n\t// resize for month mutliday events\n\tvar resize_handle = \"\";\n\n\t//events in ignored dates\n\n\tif (!x2) return;\n\n\tvar resizable = scheduler.config.resize_month_events && this._mode == \"month\" &&\n\t\t(!ev._timed || scheduler.config.resize_month_timed);\n\n\tvar d = document.createElement(\"div\");\n\tvar left_chunk = (ev.hasOwnProperty(\"_first_chunk\") && ev._first_chunk),\n\t\tright_chunk = (ev.hasOwnProperty(\"_last_chunk\") && ev._last_chunk);\n\n\tvar resize_left = resizable && (ev._timed || left_chunk);\n\tvar resize_right = resizable && (ev._timed || right_chunk);\n\n\tvar timed = true;\n\tvar cs = \"dhx_cal_event_clear\";\n\tif (!ev._timed || resizable) {\n\t\ttimed = false;\n\t\tcs = \"dhx_cal_event_line\";\n\t}\n\tif(left_chunk){\n\t\tcs += \" dhx_cal_event_line_start\";\n\t}\n\tif(right_chunk){\n\t\tcs += \" dhx_cal_event_line_end\";\n\t}\n\tif(resize_left){\n\t\tresize_handle += \"
\";\n\t}\n\tif(resize_right){\n\t\tresize_handle += \"
\";\n\t}\n\n\tvar cse = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\n\tif (cse){\n\t\tcs += \" \" + cse;\n\t}\n\n\tvar bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\n\tvar color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\n\n\tvar style_text = [\n\t\t\"position:absolute\",\n\t\t\"top:\" + y + \"px\",\n\t\t\"left:\" + x + \"px\",\n\t\t\"width:\" + (x2 - x - (timed ? 1 : 0)) + \"px\",\n\t\t\"height:\" + (this.xy.bar_height - 2) + \"px\",\n\t\tcolor,\n\t\tbg_color,\n\t\t(ev._text_style || \"\")\n\t].join(\";\");\n\n\tvar html = \"
\";\n\tif (resizable) {\n\t\thtml += resize_handle;\n\t}\n\tif(scheduler.getState().mode == \"month\"){\n\t\tev = scheduler.getEvent(ev.id); // ev at this point could be a part (row in a month view) of a larger event\n\t}\n\n\tif (ev._timed){\n\t\thtml += `${scheduler.templates.event_bar_date(ev.start_date, ev.end_date, ev)}`;\n\t}\n\n\thtml += \"
\";\n\thtml += scheduler.templates.event_bar_text(ev.start_date, ev.end_date, ev) + '
';\n\thtml += \"
\";\n\thtml += '
';\n\n\td.innerHTML = html;\n\n\tthis._rendered.push(d.firstChild);\n\tparent.appendChild(d.firstChild);\n};\n\nscheduler._locate_event = function(node) {\n\tvar id = null;\n\twhile (node && !id && node.getAttribute) {\n\t\tid = node.getAttribute(this.config.event_attribute);\n\t\tnode = node.parentNode;\n\t}\n\treturn id;\n};\n\nscheduler.edit = function(id) {\n\tif (this._edit_id == id) return;\n\tthis.editStop(false, id);\n\tthis._edit_id = id;\n\tthis.updateEvent(id);\n};\nscheduler.editStop = function(mode, id) {\n\tif (id && this._edit_id == id) return;\n\tvar ev = this.getEvent(this._edit_id);\n\tif (ev) {\n\t\tif (mode) ev.text = this._editor.value;\n\t\tthis._edit_id = null;\n\t\tthis._editor = null;\n\t\tthis.updateEvent(ev.id);\n\t\tthis._edit_stop_event(ev, mode);\n\t}\n};\nscheduler._edit_stop_event = function(ev, mode) {\n\tif (this._new_event) {\n\t\tif (!mode) {\n\t\t\tif (ev) // in case of custom lightbox user can already delete event\n\t\t\t\tthis.deleteEvent(ev.id, true);\n\t\t} else {\n\t\t\tthis.callEvent(\"onEventAdded\", [ev.id, ev]);\n\t\t}\n\t\tthis._new_event = null;\n\t} else {\n\t\tif (mode){\n\t\t\tthis.callEvent(\"onEventChanged\", [ev.id, ev]);\n\t\t}\n\t}\n};\n\nscheduler.getEvents = function(from, to) {\n\tvar result = [];\n\tfor (var a in this._events) {\n\t\tvar ev = this._events[a];\n\t\tif (ev && ( (!from && !to) || (ev.start_date < to && ev.end_date > from) ))\n\t\t\tresult.push(ev);\n\t}\n\treturn result;\n};\nscheduler.getRenderedEvent = function(id) {\n\tif (!id)\n\t\treturn;\n\tvar rendered_events = scheduler._rendered;\n\tfor (var i=0; i -1){\n\t\t\t\t\tsection = section.split(scheduler.config.section_delimiter)[0];\n\t\t\t\t}\n\t\t\t}\n\t\t\tvar top = timeline.getSectionTop(section);\n\t\t\tvar left = timeline.posFromDate(event.start_date);\n\t\t\tvar container = scheduler.$container.querySelector(\".dhx_timeline_data_wrapper\");\n\t\t\tleft = left - (container.offsetWidth - timeline.dx) / 2;\n\t\t\ttop = top - container.offsetHeight / 2 + timeline.dy/2;\n\n\t\t\tif (timeline._smartRenderingEnabled()) {\n\t\t\t\tvar handlerId = timeline.attachEvent(\"onScroll\", function(){\n\t\t\t\t\trestoreOriginalColors();\n\t\t\t\t\ttimeline.detachEvent(handlerId);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\ttimeline.scrollTo({\n\t\t\t\tleft: left,\n\t\t\t\ttop: top\n\t\t\t});\n\t\t\tif (!timeline._smartRenderingEnabled()) {\n\t\t\t\trestoreOriginalColors();\n\t\t\t}\n\t\t}\n\t}else{\n\t\trestoreOriginalColors();\n\t}\n\n\tscheduler.callEvent(\"onAfterEventDisplay\", [ev, mode]);\n};\n\n\n}","export default function extend(scheduler) {\n\n\nscheduler._append_drag_marker = function(m){\n\tif(m.parentNode) return;\n\tvar zone = scheduler._els[\"dhx_cal_data\"][0];\n\n\tvar scale = zone.lastChild;\n\tvar className = scheduler._getClassName(scale);\n\tif(className.indexOf(\"dhx_scale_holder\") < 0 && scale.previousSibling){\n\t\tscale = scale.previousSibling;\n\t}\n\n\tclassName = scheduler._getClassName(scale);\n\tif (scale && className.indexOf(\"dhx_scale_holder\") === 0) {\n\t\tscale.appendChild(m);\n\t}\n};\n\nscheduler._update_marker_position = function(m, event){\n\tvar size = scheduler._calc_event_y(event, 0);\n\tm.style.top = size.top + \"px\";\n\tm.style.height = size.height + \"px\";\n};\n\nscheduler.highlightEventPosition = function(event){\n\tvar m = document.createElement(\"div\");\n\n\tm.setAttribute(\"event_id\", event.id); // for backward compatibility\n\tm.setAttribute(this.config.event_attribute, event.id);\n\tthis._rendered.push(m);\n\tthis._update_marker_position(m, event);\n\n\tvar css = this.templates.drag_marker_class(event.start_date, event.end_date, event);\n\tvar html = this.templates.drag_marker_content(event.start_date, event.end_date, event);\n\tm.className = \"dhx_drag_marker\";\n\tif(css)\n\t\tm.className += \" \" + css;\n\tif(html)\n\t\tm.innerHTML = html;\n\tthis._append_drag_marker(m);\n};\n\n}","export default function extend(scheduler) {\n\nscheduler._lightbox_controls = {};\nscheduler.formSection = function(name){\n\tvar config = this.config.lightbox.sections;\n\tvar i = 0;\n\tfor (i; i < config.length; i++) {\n\t\tif (config[i].name == name) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif (i === config.length) {\n\t\t// GS-1662 section not found, should exit here instead of throwing an error\n\t\treturn null;\n\t}\n\n\tvar section = config[i];\n\tif (!scheduler._lightbox) {\n\t\tscheduler.getLightbox();\n\t}\n\tvar header = scheduler._lightbox.querySelector(`#${section.id}`);\n\tvar node = header.nextSibling;\n\n\tvar result = {\n\t\tsection: section,\n\t\theader: header,\n\t\tnode: node,\n\t\tgetValue:function(ev){\n\t\t\treturn scheduler.form_blocks[section.type].get_value(node, (ev||{}), section);\n\t\t},\n\t\tsetValue:function(value, ev){\n\t\t\treturn scheduler.form_blocks[section.type].set_value(node, value, (ev||{}), section);\n\t\t}\n\t};\n\n\tvar handler = scheduler._lightbox_controls[\"get_\"+section.type+\"_control\"];\n\treturn handler?handler(result):result;\n};\nscheduler._lightbox_controls.get_template_control = function(result) {\n\tresult.control = result.node;\n\treturn result;\n};\nscheduler._lightbox_controls.get_select_control = function(result) {\n\tresult.control = result.node.getElementsByTagName('select')[0];\n\treturn result;\n};\nscheduler._lightbox_controls.get_textarea_control = function(result) {\n\tresult.control = result.node.getElementsByTagName('textarea')[0];\n\treturn result;\n};\nscheduler._lightbox_controls.get_time_control = function(result) {\n\tresult.control = result.node.getElementsByTagName('select'); // array\n\treturn result;\n};\n\nscheduler._lightbox_controls.defaults = {\n\ttemplate: {\n\t\theight:30\n\t},\n\ttextarea: {\n\t\theight: 200\n\t},\n\tselect: {\n\t\theight: 23\n\t},\n\ttime: {\n\t\theight: 20\n\t}\n};\n\n\nscheduler.form_blocks={\n\ttemplate:{\n\t\trender: function(sns){\n\t\t\treturn \"
\";\n\t\t},\n\t\tset_value:function(node,value,ev,config){\n\t\t\tnode.innerHTML = value||\"\";\n\t\t},\n\t\tget_value:function(node,ev,config){\n\t\t\treturn node.innerHTML||\"\";\n\t\t},\n\t\tfocus: function(node){\n\t\t}\n\t},\n\ttextarea:{\n\t\trender:function(sns){\n\t\t\treturn \"
\";\n\t\t},\n\t\tset_value:function(node,value,ev){\n\t\t\tscheduler.form_blocks.textarea._get_input(node).value=value||\"\";\n\t\t},\n\t\tget_value:function(node,ev){\n\t\t\treturn scheduler.form_blocks.textarea._get_input(node).value;\n\t\t},\n\t\tfocus:function(node){\n\t\t\tvar a = scheduler.form_blocks.textarea._get_input(node);\n\t\t\tscheduler._focus(a, true);\n\t\t},\n\t\t_get_input: function(node){\n\t\t\treturn node.getElementsByTagName(\"textarea\")[0];\n\t\t}\n\t},\n\tselect:{\n\t\trender:function(sns){\n\t\t\t//var defaults = scheduler._lightbox_controls.defaults.select;\n\t\t\tvar html=\"
\";\n\t\t\treturn html;\n\t\t},\n\t\tset_value:function(node,value,ev,sns){\n\t\t\tvar select = node.firstChild;\n\t\t\tif (!select._dhx_onchange && sns.onchange) {\n\t\t\t\tscheduler.event(select, \"change\", sns.onchange);\n\t\t\t\tselect._dhx_onchange = true;\n\t\t\t}\n\t\t\tif (typeof value == \"undefined\")\n\t\t\t\tvalue = (select.options[0]||{}).value;\n\t\t\tselect.value=value||\"\";\n\t\t},\n\t\tget_value:function(node,ev){\n\t\t\treturn node.firstChild.value;\n\t\t},\n\t\tfocus:function(node){\n\t\t\tvar a=node.firstChild; scheduler._focus(a, true);\n\t\t}\n\t},\n\ttime:{\n\t\trender:function(sns) {\n\t\t\tif (!sns.time_format) {\n\t\t\t\t// default order\n\t\t\t\tsns.time_format = [\"%H:%i\", \"%d\", \"%m\", \"%Y\"];\n\t\t\t}\n\t\t\t// map: default order => real one\n\t\t\tsns._time_format_order = {};\n\t\t\tvar time_format = sns.time_format;\n\n\t\t\tvar cfg = scheduler.config;\n\t\t\tvar dt = scheduler.date.date_part(scheduler._currentDate());\n\t\t\tvar last = 24*60, first = 0;\n\t\t\tif(scheduler.config.limit_time_select){\n\t\t\t\tlast = 60*cfg.last_hour+1;\n\t\t\t\tfirst = 60*cfg.first_hour;\n\t\t\t\tdt.setHours(cfg.first_hour);\n\t\t\t}\n\t\t\tvar html = \"\";\n\n\t\t\tfor (var p = 0; p < time_format.length; p++) {\n\t\t\t\tvar time_option = time_format[p];\n\n\t\t\t\t// adding spaces between selects\n\t\t\t\tif (p > 0) {\n\t\t\t\t\thtml += \" \";\n\t\t\t\t}\n\t\t\t\tvar selectBoxClass = \"\";\n\t\t\t\tvar options = \"\";\n\t\t\t\tswitch (time_option) {\n\t\t\t\t\tcase \"%Y\":\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_year_select\";\n\t\t\t\t\t\tsns._time_format_order[3] = p;\n\t\t\t\t\t\t//year\n\t\t\t\t\t\tvar range;\n\t\t\t\t\t\tvar start_year;\n\t\t\t\t\t\tvar end_year;\n\t\t\t\t\t\tif(sns.year_range){\n\t\t\t\t\t\t\tif (!isNaN(sns.year_range)) {\n\t\t\t\t\t\t\t\trange = sns.year_range;\n\t\t\t\t\t\t\t} else if (sns.year_range.push) {\n\t\t\t\t\t\t\t\t// if\n\t\t\t\t\t\t\t\tstart_year = sns.year_range[0];\n\t\t\t\t\t\t\t\tend_year = sns.year_range[1];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\trange = range || 10;\n\t\t\t\t\t\tvar offset = offset || Math.floor(range / 2);\n\t\t\t\t\t\tstart_year = start_year || dt.getFullYear() - offset;\n\t\t\t\t\t\tend_year = end_year || start_year + range;\n\n\t\t\t\t\t\tfor (var i = start_year; i < end_year; i++)\n\t\t\t\t\t\t\toptions += \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"%m\":\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_month_select\";\n\t\t\t\t\t\tsns._time_format_order[2] = p;\n\t\t\t\t\t\t//month\n\t\t\t\t\t\tfor (var i=0; i < 12; i++)\n\t\t\t\t\t\t\toptions+=\"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"%d\":\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_day_select\";\n\t\t\t\t\t\tsns._time_format_order[1] = p;\n\t\t\t\t\t\t//days\n\t\t\t\t\t\tfor (var i=1; i < 32; i++)\n\t\t\t\t\t\t\toptions+=\"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"%H:%i\":\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_time_select\";\n\t\t\t\t\t\tsns._time_format_order[0] = p;\n\t\t\t\t\t\t//hours\n\t\t\t\t\t\tvar i = first;\n\t\t\t\t\t\tvar tdate = dt.getDate();\n\t\t\t\t\t\tsns._time_values = [];\n\n\t\t\t\t\t\twhile(i\"+time+\"\";\n\t\t\t\t\t\t\tsns._time_values.push(i);\n\t\t\t\t\t\t\tdt.setTime(dt.valueOf()+this.config.time_step*60*1000);\n\t\t\t\t\t\t\tvar diff = (dt.getDate()!=tdate)?1:0; // moved or not to the next day\n\t\t\t\t\t\t\ti=diff*24*60+dt.getHours()*60+dt.getMinutes();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif(options){\n\n\t\t\t\t\tvar ariaAttrs = scheduler._waiAria.lightboxSelectAttrString(time_option);\n\t\t\t\t\tvar readonly = sns.readonly ? \"disabled='disabled'\" : \"\";\n\t\t\t\t\thtml += \" \";\n\t\t\t\t}\n\t\t\t}\n\t\t\t//var defaults = scheduler._lightbox_controls.defaults.select;\n\n\t\t\treturn \"
\"+html+\"  –  \"+html+\"
\";\n\t\t},\n\t\tset_value:function(node,value,ev,config){\n\t\t\tvar cfg = scheduler.config;\n\t\t\tvar s=node.getElementsByTagName(\"select\");\n\t\t\tvar map = config._time_format_order;\n\t\t\tvar start_date, end_date;\n\n\t\t\tif(cfg.full_day) {\n\t\t\t\tif (!node._full_day){\n\t\t\t\t\tvar html = \"\";\n\t\t\t\t\tif (!scheduler.config.wide_form)\n\t\t\t\t\t\thtml = node.previousSibling.innerHTML+html;\n\t\t\t\t\tnode.previousSibling.innerHTML=html;\n\t\t\t\t\tnode._full_day=true;\n\t\t\t\t}\n\t\t\t\tvar input=node.previousSibling.getElementsByTagName(\"input\")[0];\n\t\t\t\tinput.checked = (scheduler.date.time_part(ev.start_date)===0 && scheduler.date.time_part(ev.end_date)===0);\n\n\t\t\t\ts[map[0]].disabled=input.checked;\n\t\t\t\ts[ map[0] + s.length/2 ].disabled=input.checked;\n\n\t\t\t\tif(!input.$_eventAttached){\n\t\t\t\t\tinput.$_eventAttached = true;\n\n\t\t\t\t\t\tscheduler.event(input, \"click\", function(){\n\t\t\t\t\t\tif(input.checked) {\n\t\t\t\t\t\t\tvar obj = {};\n\t\t\t\t\t\t\tscheduler.form_blocks.time.get_value(node,obj,config);\n\n\t\t\t\t\t\t\tstart_date = scheduler.date.date_part(obj.start_date);\n\t\t\t\t\t\t\tend_date = scheduler.date.date_part(obj.end_date);\n\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)))\n\t\t\t\t\t\t\t\tend_date = scheduler.date.add(end_date, 1, \"day\");\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tstart_date = null;\n\t\t\t\t\t\t\tend_date = null;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ts[map[0]].disabled=input.checked;\n\t\t\t\t\t\ts[ map[0] + s.length/2 ].disabled=input.checked;\n\n\t\t\t\t\t\t_fill_lightbox_select(s,0,start_date||ev.start_date);\n\t\t\t\t\t\t_fill_lightbox_select(s,4,end_date||ev.end_date);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(cfg.auto_end_date && cfg.event_duration) {\n\t\t\t\tvar _update_lightbox_select = function () {\n\t\t\t\t\t\n\t\t\t\t\tif (!(cfg.auto_end_date && cfg.event_duration)){\n\t\t\t\t\t\t// setting may be disabled after the handler is attached\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\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);\n\t\t\t\t\tend_date = new Date(start_date.getTime() + (scheduler.config.event_duration * 60 * 1000));\n\t\t\t\t\t_fill_lightbox_select(s, 4, end_date);\n\t\t\t\t};\n\t\t\t\tfor(var i=0; i<4; i++) {\n\t\t\t\t\tif(!s[i].$_eventAttached) {\n\t\t\t\t\t\ts[i].$_eventAttached = true;\n\t\t\t\t\t\tscheduler.event(s[i], \"change\", _update_lightbox_select);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction _fill_lightbox_select(s,i,d) {\n\t\t\t\tvar time_values = config._time_values;\n\t\t\t\tvar direct_value = d.getHours()*60+d.getMinutes();\n\t\t\t\tvar fixed_value = direct_value;\n\t\t\t\tvar value_found = false;\n\t\t\t\tfor (var k=0; k\";\n\t\tvar ariaAttr = \"\";\n\t\tfor (var i = 0; i < buttons.length; i++) {\n\t\t\tariaAttr = this._waiAria.lightboxButtonAttrString(buttons[i]);\n\t\t\thtml += \"
\" + scheduler.locale.labels[buttons[i]] + \"
\";\n\t\t}\n\n\t\tbuttons = this.config.buttons_right;\n\t\tvar rtl = scheduler.config.rtl;\n\t\tfor (var i = 0; i < buttons.length; i++) {\n\t\t\tariaAttr = this._waiAria.lightboxButtonAttrString(buttons[i]);\n\n\t\t\thtml += \"
\";\n\n\t\t\thtml += \"
\" + scheduler.locale.labels[buttons[i]] + \"
\";\n\t\t}\n\t\thtml += \"
\";\n\t\thtml+=\"
\";\n\t\td.innerHTML=html;\n\t\tif (scheduler.config.drag_lightbox){\n\t\t\tscheduler.event(d.firstChild, \"mousedown\", scheduler._ready_to_dnd);\n\t\t\tscheduler.event(d.firstChild, \"selectstart\", function(e){ \n\t\t\t\te.preventDefault();\n\t\t\t\treturn false; \n\t\t\t});\n\t\t\td.firstChild.style.cursor = \"move\";\n\t\t\tscheduler._init_dnd_events();\n\n\t\t}\n\n\t\tthis._waiAria.lightboxAttr(d);\n\n\t\tthis.show_cover();\n\t\tthis._cover.insertBefore(d,this._cover.firstChild);\n\t\t\n\t\tthis._lightbox=d;\n\n\t\tvar sns=this.config.lightbox.sections;\n\t\thtml=\"\";\n\t\tfor (var i=0; i < sns.length; i++) {\n\t\t\tvar block=this.form_blocks[sns[i].type];\n\t\t\tif (!block) continue; //ignore incorrect blocks\n\t\t\tsns[i].id=\"area_\"+this.uid();\n\t\t\tvar button = \"\";\n\t\t\tif (sns[i].button){\n\t\t\t\tvar ariaAttr = scheduler._waiAria.lightboxSectionButtonAttrString(this.locale.labels[\"button_\"+sns[i].button]);\n\t\t\t\tbutton = \"
\"+this.locale.labels[\"button_\"+sns[i].button]+\"
\";\n\t\t\t}\n\n\t\t\tif (this.config.wide_form){\n\t\t\t\thtml+=\"
\";\n\t\t\t}\n\n\t\t\tvar label_name = this.locale.labels[\"section_\"+sns[i].name];\n\t\t\tif(typeof label_name !== \"string\"){\n\t\t\t\tlabel_name = sns[i].name;\n\t\t\t}\n\t\t\thtml+=\"
\"+button+ \"
\"+block.render.call(this,sns[i]);\n\t\t\thtml+=\"
\";\n\t\t}\n\n\t\tvar ds=d.getElementsByTagName(\"div\");\n\t\tfor (var i=0; i
 \n
\n
\n\n
`;\n\n\n}","export default function extend(scheduler) {\n\nscheduler.getRootView = function() {\n\treturn {\n\t\tview: {\n\t\t\trender: function(){\n\t\t\t\treturn {\n\t\t\t\t\ttag: \"div\",\n\t\t\t\t\ttype: 1,\n\t\t\t\t\tattrs: {\n\t\t\t\t\t\tstyle: \"width:100%;height:100%;\"\n\t\t\t\t\t},\n\t\t\t\t\thooks: {\n\t\t\t\t\t\t\"didInsert\": function(){\n\t\t\t\t\t\t\tscheduler.setCurrentView();\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tbody: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tel: this.el,\n\t\t\t\t\t\t\ttype: 1\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t};\n\t\t\t},\n\t\t\tinit: function(){\n\t\t\t\tvar container = document.createElement(\"DIV\");\n\t\t\t\tcontainer.id = \"scheduler_\"+ scheduler.uid();\n\t\t\t\tcontainer.style.width = \"100%\";\n\t\t\t\tcontainer.style.height = \"100%\";\n\t\t\t\tcontainer.classList.add(\"dhx_cal_container\");\n\t\t\t\tcontainer.cmp = \"grid\";\n\t\t\t\tcontainer.innerHTML = '
' +\n\t\t\t\t\t'
' +\n\t\t\t\t\t'
' +\n\t\t\t\t\t'
' +\n\t\t\t\t\t'
' +\n\t\t\t\t\t'
' +\n\t\t\t\t\t'
' +\n\t\t\t\t\t'
' +\n\t\t\t\t\t'
' +\n\t\t\t\t\t'
' +\n\t\t\t\t\t'
' +\n\t\t\t\t\t'
' +\n\t\t\t\t\t'
';\n\t\t\t\tscheduler.init(container);\n\n\t\t\t\tthis.el = container;\n\t\t\t}\n\t\t},\n\t\ttype: 4\n\t};\n};\n\n}","import global from \"../global\";\n\nexport default function extend(scheduler) {\n\n(function(){\n\n\tvar setCurrentView = scheduler.setCurrentView,\n\t\tupdateView = scheduler.updateView;\n\tvar update_view_timer = null,\n\t\tcurr_view_timer = null;\n\n\tvar lazy_setCurrentView = function(date, mode){\n\t\tvar self = this;\n\t\tglobal.clearTimeout(curr_view_timer);\n\t\tglobal.clearTimeout(update_view_timer);\n\n\t\tvar oldDate = self._date,\n\t\t\toldMode = self._mode;\n\t\tupdateFlags(this, date, mode);\n\n\t\tcurr_view_timer = setTimeout(function(){\n\n\t\t\tif(scheduler.$destroyed){\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (!self.callEvent(\"onBeforeViewChange\", [oldMode, oldDate, mode || self._mode, date || self._date])){\n\t\t\t\tupdateFlags(self, oldDate, oldMode);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tupdateView.call(self, date, mode);\n\t\t\tself.callEvent(\"onViewChange\", [self._mode, self._date]);\n\n\t\t\tglobal.clearTimeout(update_view_timer);\n\t\t\tcurr_view_timer = 0;\n\t\t}, scheduler.config.delay_render);\n\t};\n\tvar lazy_updateView = function(date, mode){\n\t\tvar self = this,\n\t\t\tars = arguments;\n\n\t\tupdateFlags(this, date, mode);\n\n\t\tglobal.clearTimeout(update_view_timer);\n\t\tupdate_view_timer = setTimeout(function(){\n\t\t\tif(scheduler.$destroyed){\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif(curr_view_timer)\n\t\t\t\treturn;\n\n\t\t\tupdateView.apply(self, ars);\n\t\t}, scheduler.config.delay_render);\n\t};\n\tfunction updateFlags(scheduler, date, mode){\n\t\tif(date)\n\t\t\tscheduler._date = date;\n\t\tif(mode)\n\t\t\tscheduler._mode = mode;\n\n\t}\n\tscheduler.attachEvent(\"onSchedulerReady\", function(){\n\t\tif(scheduler.config.delay_render){\n\t\t\tscheduler.setCurrentView = lazy_setCurrentView;\n\t\t\tscheduler.updateView = lazy_updateView;\n\t\t}else{\n\t\t\tscheduler.setCurrentView = setCurrentView;\n\t\t\tscheduler.updateView = updateView;\n\t\t}\n\t});\n\n})();\n\n}","import global from \"../global\";\n\nexport default function extend(scheduler) {\n/*\nif (global.dataProcessor && !dataProcessor.prototype.init_original){\n\tdataProcessor.prototype.init_original=dataProcessor.prototype.init;\n\tdataProcessor.prototype.init=function(obj){\n\t\tthis.init_original(obj);\n\t\tobj._dataprocessor=this;\n\n\t\tthis.setTransactionMode(\"POST\",true);\n\t\tthis.serverProcessor+=(this.serverProcessor.indexOf(\"?\")!=-1?\"&\":\"?\")+\"editing=true\";\n\t};\n}*/\n\nscheduler.attachEvent(\"onSchedulerReady\", function(){\n\tif(typeof dhtmlxError !== \"undefined\") {\n\t\twindow.dhtmlxError.catchError(\"LoadXML\", function(a, b, c){\n\t\t\tvar message = c[0].responseText;\n\n\t\t\tswitch (scheduler.config.ajax_error){\n\t\t\t\tcase \"alert\":\n\t\t\t\t\tglobal.alert(message);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"console\":\n\t\t\t\t\tglobal.console.log(message);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t});\n\t}\n});\n\n\n}","import ar from \"./locale_ar\";\nimport be from \"./locale_be\";\nimport ca from \"./locale_ca\";\nimport cn from \"./locale_cn\";\nimport cs from \"./locale_cs\";\nimport da from \"./locale_da\";\nimport de from \"./locale_de\";\nimport el from \"./locale_el\";\nimport en from \"./locale_en\";\nimport es from \"./locale_es\";\nimport fi from \"./locale_fi\";\nimport fr from \"./locale_fr\";\nimport he from \"./locale_he\";\nimport hu from \"./locale_hu\";\nimport id from \"./locale_id\";\nimport it from \"./locale_it\";\nimport jp from \"./locale_jp\";\n\nimport LocaleManager from \"./locale_manager\";\n\nimport nb from \"./locale_nb\";\nimport nl from \"./locale_nl\";\nimport no from \"./locale_no\";\nimport pl from \"./locale_pl\";\nimport pt from \"./locale_pt\";\nimport ro from \"./locale_ro\";\nimport ru from \"./locale_ru\";\nimport si from \"./locale_si\";\nimport sk from \"./locale_sk\";\nimport sv from \"./locale_sv\";\nimport tr from \"./locale_tr\";\nimport ua from \"./locale_ua\";\n\nexport default function(){\n\treturn new LocaleManager({\n\t\ten,\n\t\tar,\n\t\tbe,\n\t\tca,\n\t\tcn,\n\t\tcs,\n\t\tda,\n\t\tde,\n\t\tel,\n\t\tes,\n\t\tfi,\n\t\tfr,\n\t\the,\n\t\thu,\n\t\tid,\n\t\tit,\n\t\tjp,\n\t\tnb,\n\t\tnl,\n\t\tno,\n\t\tpl,\n\t\tpt,\n\t\tro,\n\t\tru,\n\t\tsi,\n\t\tsk,\n\t\tsv,\n\t\ttr,\n\t\tua\n\t});\n}","export default class ExtensionsManager{\n\tconstructor(config){\n\t\tthis._extensions = {};\n\t\tfor(const i in config){\n\t\t\tthis._extensions[i] = config[i];\n\t\t}\n\t}\n\n\taddExtension(name, ext) {\n\t\tthis._extensions[name] = ext;\n\t}\n\n\tgetExtension(name) {\n\t\treturn this._extensions[name];\n\t}\n}","\nexport default function(){\n/* global dhtmlx */\nif (typeof dhtmlx != \"undefined\" && dhtmlx.attaches) {\n\tdhtmlx.attaches.attachScheduler = function (day, mode, tabs, scheduler) {\n\t\tvar tabs = tabs || '
';\n\t\tvar obj = document.createElement(\"DIV\");\n\t\tobj.id = \"dhxSchedObj_\" + this._genStr(12);\n\t\tobj.innerHTML = '
' + tabs + '
';\n\t\tdocument.body.appendChild(obj.firstChild);\n\n\t\tthis.attachObject(obj.id, false, true);\n\n\t\tthis.vs[this.av].sched = scheduler;\n\t\tthis.vs[this.av].schedId = obj.id;\n\t\tscheduler.setSizes = scheduler.updateView;\n\t\tscheduler.destructor = function () { };\n\t\tscheduler.init(obj.id, day, mode);\n\n\t\treturn this.vs[this._viewRestore()].sched;\n\t};\n}\n\n}","export default {\n\talert: (extension, assert) => {\n\t\tassert(false, `The ${extension} extension is not included in this version of dhtmlxScheduler.
\n\t\tYou may need a Professional version of the component.
\n\t\tContact us at https://dhtmlx.com/docs/contact.shtml if you have any questions.`);\n\t}\n};","export default function(scheduler){\n\n\n\n(function(){\n\tvar modalsStack = [];\n\n\tfunction isModal(){\n\t\treturn !!(modalsStack.length);\n\t}\n\n\tfunction isChildOf(child, parent){\n\t\twhile(child && child != parent){\n\t\t\tchild = child.parentNode;\n\t\t}\n\n\t\treturn !!(child == parent);\n\t}\n\n\tfunction afterPopup(box){\n\t\tsetTimeout(function(){\n\t\t\tif(scheduler.$destroyed){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif(!isModal() && !(isChildOf(document.activeElement, scheduler.$container))) {\n\t\t\t\tscheduler.focus();\n\t\t\t}\n\t\t}, 1);\n\t}\n\tfunction startModal(box){\n\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\n\t\tscheduler.event(box, \"keydown\", trapFocus);\n\t\tmodalsStack.push(box);\n\t\t//scheduler.$keyboardNavigation.dispatcher.disable();\n\t}\n\n\tfunction endModal(){\n\t\tvar box = modalsStack.pop();\n\t\tif(box) {\n\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\n\t\t}\n\t\tafterPopup(box);\n\n\t}\n\n\tfunction isTopModal(box){\n\t//\tif(dhtmlx._modalsStack.length){\n\t//\t\treturn box == dhtmlx._modalsStack[dhtmlx._modalsStack.length - 1];\n\t//\t}else{\n\t\t\treturn box == modalsStack[modalsStack.length - 1];\n\t//\t}\n\n\t}\n\n\tfunction trapFocus(event){\n\t\tvar event = event || window.event;\n\t\tvar target = event.currentTarget;\n\t\tif(!isTopModal(target)) return;\n\n\t\tscheduler.$keyboardNavigation.trapFocus(target, event);\n\t}\n\n\tfunction traceLightbox(){\n\t\tstartModal(scheduler.getLightbox());\n\t}\n\n\tscheduler.attachEvent(\"onLightbox\", traceLightbox);\n\tscheduler.attachEvent(\"onAfterLightbox\", endModal);\n\n\tscheduler.attachEvent(\"onAfterQuickInfo\", function(){afterPopup();});\n\n\tif(!scheduler._keyNavMessagePopup) {\n\t\tscheduler._keyNavMessagePopup = true;\n\n\t\tvar focusElement = null;\n\t\tvar backupFocus = null;\n\t\tconst modalsStack = [];\n\t\tscheduler.attachEvent(\"onMessagePopup\", function(box){\n\t\t\tfocusElement = document.activeElement;\n\t\t\tbackupFocus = focusElement;\n\n\t\t\twhile(backupFocus && scheduler._getClassName(backupFocus).indexOf(\"dhx_cal_data\") < 0){\n\t\t\t\tbackupFocus = backupFocus.parentNode;\n\t\t\t}\n\t\t\tif(backupFocus){\n\t\t\t\tbackupFocus = backupFocus.parentNode;\n\t\t\t}\n\n\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\n\t\t\tscheduler.event(box, \"keydown\", trapFocus);\n\t\t\tmodalsStack.push(box);\n\t\t});\n\n\n\t\tscheduler.attachEvent(\"onAfterMessagePopup\", function () {\n\t\t\tvar box = modalsStack.pop();\n\t\t\tif(box) {\n\t\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\n\t\t\t}\n\t\t\tsetTimeout(function(){\n\t\t\t\tif(scheduler.$destroyed){\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tvar currentTarget = document.activeElement;\n\t\t\t\twhile(currentTarget && scheduler._getClassName(currentTarget).indexOf(\"dhx_cal_light\") < 0){\n\t\t\t\t\tcurrentTarget = currentTarget.parentNode;\n\t\t\t\t}\n\t\t\t\tif(currentTarget)\n\t\t\t\t\treturn;\n\n\n\t\t\t\tif(focusElement && focusElement.parentNode){\n\t\t\t\t\tfocusElement.focus();\n\n\t\t\t\t}else if(backupFocus && backupFocus.parentNode){\n\t\t\t\t\tbackupFocus.focus();\n\t\t\t\t}\n\t\t\t\tfocusElement = null;\n\t\t\t\tbackupFocus = null;\n\n\t\t\t}, 1);\n\t\t});\n\t}\n\n\tscheduler.$keyboardNavigation.isModal = isModal;\n\n\n})();\n\n}","export default function(scheduler){\n\n//Initial idea and implementation by Steve MC\nscheduler._temp_key_scope = function (){\n\n\tscheduler.config.key_nav = true;\n\n\tscheduler.$keyboardNavigation._pasteDate = null; // used for copy and paste operations\n\tscheduler.$keyboardNavigation._pasteSection = null; // used for copy and paste operations\n\tvar isCopy = null;\n\n\tvar pos = {};\n\n\tif(!document.body){\n\t\tscheduler.event(window, \"load\", function(){\n\t\t\tscheduler.event(document.body, \"mousemove\", trackMousePosition);\n\t\t});\n\t}else{\n\t\tscheduler.event(document.body, \"mousemove\", trackMousePosition);\n\t}\n\n\tfunction trackMousePosition(event){\n\t\tevent = event || window.event;\n\t\tpos.x = event.clientX;\n\t\tpos.y = event.clientY;\n\t}\n\tfunction currentTarget(){\n\n\t\tvar mousePointer = false;\n\t\tvar keyNavPointer = false;\n\n\t\tvar target = document.elementFromPoint(pos.x, pos.y);\n\t\twhile(target && target != scheduler._obj){\n\t\t\ttarget = target.parentNode;\n\t\t}\n\t\tmousePointer = !!(target == scheduler._obj);\n\n\t\tkeyNavPointer = scheduler.$keyboardNavigation.dispatcher.isEnabled();\n\n\t\treturn mousePointer || keyNavPointer;\n\t}\n\n\tscheduler.attachEvent(\"onMouseMove\", function(id,e){\n\t\tvar state = scheduler.getState();\n\n\t\t// make sure scheduler is fully initialized before calling scheduler.getActionData\n\t\tif(!(state.mode && state.min_date)){\n\t\t\treturn;\n\t\t}\n\t\tvar position = scheduler.getActionData(e);\n\t\tscheduler.$keyboardNavigation._pasteDate = position.date;\n\t\tscheduler.$keyboardNavigation._pasteSection = position.section;\n\t});\n\n\tfunction clear_event_after(ev){\n\t\tdelete ev.rec_type; delete ev.rec_pattern;\n\t\tdelete ev.event_pid; delete ev.event_length;\n\t}\n\n\tfunction copyEvent(ev){\n\t\treturn scheduler._lame_copy({}, ev);\n\t}\n\n\tscheduler._make_pasted_event = function(ev){\n\t\tvar date = scheduler.$keyboardNavigation._pasteDate;\n\t\tvar section = scheduler.$keyboardNavigation._pasteSection;\n\n\t\tvar event_duration = ev.end_date-ev.start_date;\n\n\t\tvar copy = copyEvent(ev);\n\t\tclear_event_after(copy);\n\t\tcopy.start_date = new Date(date);\n\t\tcopy.end_date = new Date(copy.start_date.valueOf() + event_duration);\n\n\t\tif(section){\n\t\t\tvar property = scheduler._get_section_property();\n\n\t\t\tif(scheduler.config.multisection)\n\t\t\t\tcopy[property] = ev[property]; // save initial set of resources for multisection view\n\t\t\telse\n\t\t\t\tcopy[property] = section;\n\t\t}\n\t\treturn copy;\n\t};\n\tscheduler._do_paste = function(is_copy, modified_ev, original_ev){\n\t\tif(scheduler.callEvent(\"onBeforeEventPasted\", [is_copy, modified_ev, original_ev]) === false){\n\t\t\treturn;\n\t\t}\n\t\tscheduler.addEvent(modified_ev);\n\t\tscheduler.callEvent(\"onEventPasted\", [is_copy, modified_ev, original_ev]);\n\t};\n\n\tscheduler._is_key_nav_active = function(){\n\t\tif(this._is_initialized() && !this._is_lightbox_open() && this.config.key_nav){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t};\n\n\tfunction getSelectedEvent(){\n\t\tvar node = scheduler.$keyboardNavigation.dispatcher.getActiveNode();\n\t\tif(node && node.eventId) return node.eventId;\n\t\treturn scheduler._select_id;\n\t}\n\n\tscheduler.event(document, \"keydown\", function(e){\n\t\t// compatibility fix - scheduler focus on ctrl+v on mouse hover\n\t\tif(((e.ctrlKey || e.metaKey) && e.keyCode == 86) && scheduler._buffer_event && !scheduler.$keyboardNavigation.dispatcher.isEnabled()) {\n\t\t\tscheduler.$keyboardNavigation.dispatcher.isActive = currentTarget();\n\t\t}\n\t});\n\n\tscheduler._key_nav_copy_paste = function(e){\n\t\tif(!scheduler._is_key_nav_active()) return true;\n\n\t\tif (e.keyCode == 37 || e.keyCode == 39) { // Left, Right arrows\n\t\t\te.cancelBubble = true;\n\n\t\t\tvar next = scheduler.date.add(scheduler._date,(e.keyCode == 37 ? -1 : 1 ),scheduler._mode);\n\t\t\tscheduler.setCurrentView(next);\n\t\t\treturn true;\n\t\t}\n\n\t\tvar select_id = getSelectedEvent();\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 67) { // CTRL+C\n\t\t\tif (select_id) {\n\t\t\t\tscheduler._buffer_event = copyEvent(scheduler.getEvent(select_id));\n\t\t\t\tisCopy = true;\n\t\t\t\tscheduler.callEvent(\"onEventCopied\", [scheduler.getEvent(select_id)]);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 88) { // CTRL+X\n\t\t\tif (select_id) {\n\t\t\t\tisCopy = false;\n\t\t\t\tvar ev = scheduler._buffer_event = copyEvent(scheduler.getEvent(select_id));\n\n\t\t\t\tscheduler.updateEvent(ev.id);\n\t\t\t\tscheduler.callEvent(\"onEventCut\", [ev]);\n\t\t\t}\n\t\t}\n\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 86 && currentTarget(e)) { // CTRL+V\n\t\t\tvar ev = scheduler._buffer_event ? scheduler.getEvent(scheduler._buffer_event.id) : scheduler._buffer_event;\n\t\t\tev = ev || scheduler._buffer_event;\n\n\t\t\tif (ev) {\n\t\t\t\tvar new_ev = scheduler._make_pasted_event(ev);\n\t\t\t\tif (isCopy) {\n\t\t\t\t\tnew_ev.id = scheduler.uid();\n\t\t\t\t\tscheduler._do_paste(isCopy, new_ev, ev);\n\t\t\t\t}\n\t\t\t\telse { // cut operation\n\t\t\t\t\tvar res = scheduler.callEvent(\"onBeforeEventChanged\",[new_ev, e, false, ev]);\n\t\t\t\t\tif (res) {\n\t\t\t\t\t\tscheduler._do_paste(isCopy, new_ev, ev);\n\t\t\t\t\t\tisCopy = true; // switch to copy after first paste operation\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t};\n};\nscheduler._temp_key_scope();\n\n}","export default function(scheduler){\n\nscheduler.$keyboardNavigation.attachSchedulerHandlers = function(){\n\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\n\n\tvar keyDownHandler = function(e){\n\t\tif(!scheduler.config.key_nav) return;\n\n\t\treturn dispatcher.keyDownHandler(e);\n\t};\n\n\tvar focusHandler = function () {\n\t\tdispatcher.keepScrollPosition(function () {\n\t\t\tdispatcher.focusGlobalNode();\n\t\t});\n\t};\n\n\tvar waitCall;\n\tscheduler.attachEvent(\"onDataRender\", function(){\n\t\tif(!scheduler.config.key_nav) return;\n\t\tif(!(dispatcher.isEnabled() && !scheduler.getState().editor_id)) return;\n\n\t\tclearTimeout(waitCall);\n\t\twaitCall = setTimeout(function(){\n\t\t\tif(scheduler.$destroyed){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif(!dispatcher.isEnabled())\n\t\t\t\tdispatcher.enable();\n\t\t\treFocusActiveNode();\n\t\t});\n\t});\n\n\tvar reFocusActiveNode = function(){\n\t\tif(!dispatcher.isEnabled())\n\t\t\treturn;\n\n\t\tvar activeNode = dispatcher.getActiveNode();\n\t\tif(!activeNode)\n\t\t\treturn;\n\n\t\tif(!activeNode.isValid()){\n\t\t\tactiveNode = activeNode.fallback();\n\t\t}\n\n\t\tif(!activeNode || activeNode instanceof scheduler.$keyboardNavigation.MinicalButton || activeNode instanceof scheduler.$keyboardNavigation.MinicalCell)\n\t\t\treturn;\n\n\t\tdispatcher.keepScrollPosition(function () {\n\t\t\tactiveNode.focus(true);\n\t\t});\n\t};\n\n\tscheduler.attachEvent(\"onSchedulerReady\", function(){\n\t\tvar container = scheduler.$container;\n\t\tscheduler.eventRemove(document, \"keydown\", keyDownHandler);\n\t\tscheduler.eventRemove(container, \"mousedown\", mousedownHandler);\n\t\tscheduler.eventRemove(container, \"focus\", focusHandler);\n\n\n\t\tif(scheduler.config.key_nav){\n\n\t\t\tscheduler.event(document, \"keydown\", keyDownHandler);\n\t\t\tscheduler.event(container, \"mousedown\", mousedownHandler);\n\t\t\tscheduler.event(container, \"focus\", focusHandler);\n\n\t\t\tcontainer.setAttribute(\"tabindex\", \"0\");\n\n\t\t}else{\n\t\t\tcontainer.removeAttribute(\"tabindex\");\n\t\t}\n\t});\n\n\tfunction mousedownHandler(e){\n\t\tif(!scheduler.config.key_nav) return true;\n\n\n\t\tvar dataAreaClick = scheduler.$keyboardNavigation.isChildOf(e.target || e.srcElement, scheduler.$container.querySelector(\".dhx_cal_data\"));\n\n\n\t\tvar pos = scheduler.getActionData(e);\n\n\t\tvar focusNode;\n\t\tif(scheduler._locate_event(e.target || e.srcElement)){\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.Event(scheduler._locate_event(e.target || e.srcElement));\n\t\t}else if(dataAreaClick){\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot();\n\t\t\tif(pos.date && dataAreaClick){\n\t\t\t\tfocusNode = focusNode.nextSlot(new scheduler.$keyboardNavigation.TimeSlot(pos.date, null, pos.section));\n\t\t\t}\n\t\t}\n\n\t\tif(focusNode) {\n\t\t\tif (!dispatcher.isEnabled()) {\n\t\t\t\tdispatcher.activeNode = focusNode;\n\n\t\t\t} else {\n\t\t\t\tif (pos.date && dataAreaClick) {\n\t\t\t\t\tdispatcher.delay(function () {\n\t\t\t\t\t\tdispatcher.setActiveNode(focusNode);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction focusEvent(evNode){\n\t\tif(!scheduler.config.key_nav) return;\n\t\tif(!dispatcher.isEnabled()) return;\n\n\n\t\tvar prevState = evNode;\n\t\tvar focusNode = new scheduler.$keyboardNavigation.Event(prevState.eventId);\n\t\tif(!focusNode.isValid()){\n\t\t\tvar lastStart = focusNode.start || prevState.start;\n\t\t\tvar lastEnd = focusNode.end || prevState.end;\n\t\t\tvar lastSection = focusNode.section || prevState.section;\n\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot(lastStart, lastEnd, lastSection);\n\t\t\tif(!focusNode.isValid()){\n\t\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot();\n\t\t\t}\n\t\t}\n\n\t\tdispatcher.setActiveNode(focusNode);\n\t\tvar node = dispatcher.getActiveNode();\n\t\tif(node && node.getNode && document.activeElement != node.getNode()){\n\t\t\tdispatcher.focusNode(dispatcher.getActiveNode());\n\t\t}\n\t}\n\n\n\tvar updateEvent = scheduler.updateEvent;\n\tscheduler.updateEvent = function(id){\n\t\tvar res = updateEvent.apply(this, arguments);\n\t\tif(scheduler.config.key_nav && dispatcher.isEnabled()){\n\t\t\tif(scheduler.getState().select_id == id){\n\t\t\t\tvar element = new scheduler.$keyboardNavigation.Event(id);\n\n\t\t\t\tif(!scheduler.getState().lightbox_id){\n\t\t\t\t\tfocusEvent(element);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t};\n\n\tscheduler.attachEvent(\"onEventDeleted\", function(id) {\n\t\tif(!scheduler.config.key_nav) return true;\n\t\tif(dispatcher.isEnabled()){\n\t\t\tvar activeNode = dispatcher.getActiveNode();\n\t\t\tif(activeNode.eventId == id){\n\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.TimeSlot());\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t});\n\n\tscheduler.attachEvent(\"onClearAll\", function(){\n\t\tif(!scheduler.config.key_nav) return true;\n\t\tif(dispatcher.isEnabled()){\n\t\t\tif(dispatcher.getActiveNode() instanceof scheduler.$keyboardNavigation.Event){\n\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.TimeSlot());\n\t\t\t}\n\t\t}\n\t});\n\n};\n\n}","interface IViewPosition{\n\ttop: number;\n\tleft: number;\n}\n\ninterface IViewBox extends IViewPosition{\n\twidth: number;\n\theight: number;\n\tbottom: number;\n\tright: number;\n}\n\nexport class Tooltip {\n\tprivate _root: HTMLElement;\n\tprivate _tooltipNode: HTMLElement | null;\n\tprivate _scheduler: any;\n\n\tconstructor(scheduler: any){\n\t\tthis._scheduler = scheduler;\n\t}\n\n\tgetNode() : HTMLElement {\n\t\tconst scheduler = this._scheduler;\n\t\tif (!this._tooltipNode){\n\t\t\tthis._tooltipNode = document.createElement(\"div\");\n\t\t\tthis._tooltipNode.className = \"dhtmlXTooltip scheduler_tooltip tooltip\";\n\n\t\t\tscheduler._waiAria.tooltipAttr(this._tooltipNode);\n\t\t}\n\t\tif(scheduler.config.rtl){\n\t\t\tthis._tooltipNode.classList.add(\"dhtmlXTooltip_rtl\");\n\t\t} else{\n\t\t\tthis._tooltipNode.classList.remove(\"dhtmlXTooltip_rtl\");\n\t\t}\n\t\treturn this._tooltipNode;\n\t}\n\n\tsetViewport(node: HTMLElement):Tooltip{\n\t\tthis._root = node;\n\t\treturn this;\n\t}\n\n\tshow(left: number, top: number): Tooltip;\n\tshow(event: MouseEvent): Tooltip;\n\tshow(left: number | MouseEvent, top?: number): Tooltip {\n\t\tconst scheduler = this._scheduler;\n\t\tconst domHelpers = scheduler.$domHelpers;\n\t\tconst container = document.body;\n\t\tconst node = this.getNode();\n\n\t\tif(!domHelpers.isChildOf(node, container)){\n\t\t\tthis.hide();\n\t\t\tcontainer.appendChild(node);\n\t\t}\n\n\t\tif (this._isLikeMouseEvent(left)) {\n\t\t\tconst position = this._calculateTooltipPosition(left as MouseEvent);\n\t\t\ttop = position.top;\n\t\t\tleft = position.left;\n\t\t}\n\n\t\tnode.style.top = top + \"px\";\n\t\tnode.style.left = left + \"px\";\n\n\t\tscheduler._waiAria.tooltipVisibleAttr(node);\n\t\treturn this;\n\t}\n\thide() : Tooltip{\n\t\tconst scheduler = this._scheduler;\n\t\tconst node = this.getNode();\n\t\tif(node && node.parentNode){\n\t\t\tnode.parentNode.removeChild(node);\n\t\t}\n\t\tscheduler._waiAria.tooltipHiddenAttr(node);\n\t\treturn this;\n\t}\n\n\tsetContent(html: string) : Tooltip{\n\t\tconst node = this.getNode();\n\t\tnode.innerHTML = html;\n\t\treturn this;\n\t}\n\n\t// it is for salesforce, because it proxies event to it own events\n\tprivate _isLikeMouseEvent(event: any): boolean {\n\t\tif (!event || typeof event !== \"object\") {\n\t\t\treturn false;\n\t\t}\n\t\treturn \"clientX\" in event && \"clientY\" in event;\n\t}\n\n\tprivate _getViewPort() : HTMLElement {\n\t\treturn this._root || document.body;\n\t}\n\n\n\tprivate _calculateTooltipPosition(event: MouseEvent): IViewPosition{\n\t\tconst scheduler = this._scheduler;\n\t\tconst domHelpers = scheduler.$domHelpers;\n\t\t// top/left coordinates inside the viewport by mouse position\n\t\tconst viewport = this._getViewPortSize();\n\t\tconst tooltipNode = this.getNode();\n\t\tconst tooltip: IViewBox = {\n\t\t\ttop:0,\n\t\t\tleft: 0,\n\t\t\twidth: tooltipNode.offsetWidth,\n\t\t\theight: tooltipNode.offsetHeight,\n\t\t\tbottom: 0,\n\t\t\tright: 0\n\t\t};\n\n\t\tconst offsetX = scheduler.config.tooltip_offset_x;\n\t\tconst offsetY = scheduler.config.tooltip_offset_y;\n\n\t\tconst container = document.body;\n\t\tconst mouse = domHelpers.getRelativeEventPosition(event, container);\n\t\tconst containerPos = domHelpers.getNodePosition(container);\n\t\tmouse.y += containerPos.y; // to fix margin collapsing\n\n\t\ttooltip.top = mouse.y;\n\t\ttooltip.left = mouse.x;\n\t\ttooltip.top += offsetY;\n\t\ttooltip.left += offsetX;\n\t\ttooltip.bottom = tooltip.top + tooltip.height;\n\t\ttooltip.right = tooltip.left + tooltip.width;\n\n\t\tconst scrollTop = window.scrollY + container.scrollTop; // to fix margin collapsing\n\t\t// edge cases when the tooltip element can be partially hidden by edges of the viewport\n\t\tif(tooltip.top < viewport.top - scrollTop){\n\t\t\ttooltip.top = viewport.top;\n\t\t\ttooltip.bottom = tooltip.top + tooltip.height;\n\t\t}else if(tooltip.bottom > viewport.bottom){\n\t\t\ttooltip.bottom = viewport.bottom;\n\t\t\ttooltip.top = tooltip.bottom - tooltip.height;\n\t\t}\n\n\t\tif(tooltip.left < viewport.left){\n\t\t\ttooltip.left = viewport.left;\n\t\t\ttooltip.right = viewport.left + tooltip.width;\n\t\t}else if(tooltip.right > viewport.right){\n\t\t\ttooltip.right = viewport.right;\n\t\t\ttooltip.left = tooltip.right - tooltip.width;\n\t\t}\n\n\t\tif(mouse.x >= tooltip.left && mouse.x <= tooltip.right) {\n\t\t\ttooltip.left = mouse.x - tooltip.width - offsetX;\n\t\t\ttooltip.right = tooltip.left + tooltip.width;\n\t\t}\n\n\t\tif(mouse.y >= tooltip.top && mouse.y <= tooltip.bottom) {\n\t\t\ttooltip.top = mouse.y - tooltip.height - offsetY;\n\t\t\ttooltip.bottom = tooltip.top + tooltip.height;\n\t\t}\n\n\t\treturn tooltip;\n\t}\n\n\tprivate _getViewPortSize() : IViewBox {\n\t\tconst scheduler = this._scheduler;\n\t\tconst domHelpers = scheduler.$domHelpers;\n\t\tconst container = this._getViewPort();\n\t\tlet viewport = container;\n\t\tlet scrollTop = window.scrollY + document.body.scrollTop;\n\t\tlet scrollLeft = window.scrollX + document.body.scrollLeft;\n\t\tlet pos;\n\t\t// support for the initial tooltip mode where the tooltip element was attached to the data area of scheduler\n\t\tif(container === scheduler.$event_data){\n\t\t\tviewport = scheduler.$event;\n\t\t\tscrollTop = 0;\n\t\t\tscrollLeft = 0;\n\t\t\tpos = domHelpers.getNodePosition(scheduler.$event);\n\t\t}else{\n\t\t\tpos = domHelpers.getNodePosition(viewport);\n\t\t}\n\t\treturn {\n\t\t\tleft:pos.x + scrollLeft,\n\t\t\ttop: pos.y + scrollTop,\n\t\t\twidth: pos.width,\n\t\t\theight: pos.height,\n\t\t\tbottom: pos.y + pos.height + scrollTop,\n\t\t\tright: pos.x + pos.width + scrollLeft\n\t\t};\n\t}\n}\n","import * as utils from \"../../core/utils/utils\";\nimport { Tooltip } from \"./tooltip\";\n\ninterface ITrackerTarget {\n\tselector: string;\n\tonmouseenter: (event: MouseEvent, node: HTMLElement) => void;\n\tonmousemove: (event: MouseEvent, node: HTMLElement) => void;\n\tonmouseleave: (event: MouseEvent, node: HTMLElement) => void;\n\tglobal: boolean;\n}\n\ninterface ITooltipConfig {\n\tselector: string;\n\thtml: (event: MouseEvent, node: HTMLElement) => string;\n\tglobal: boolean;\n}\n\nexport class TooltipManager{\n\ttooltip: Tooltip;\n\tprotected _domEvents: any;\n\tprivate _listeners: object = {};\n\tprivate _scheduler: any;\n\tprivate delayShow: any;\n\tprivate delayHide: any;\n\n\tconstructor(scheduler: any) {\n\t\tthis.tooltip = new Tooltip(scheduler);\n\t\tthis._scheduler = scheduler;\n\t\tthis._domEvents = scheduler._createDomEventScope();\n\t\tthis._initDelayedFunctions();\n\t}\n\n\tdestructor(): void{\n\t\tthis.tooltip.hide();\n\t\tthis._domEvents.detachAll();\n\t}\n\thideTooltip(): void{\n\t\tthis.delayHide();\n\t}\n\tattach(config: ITrackerTarget): void {\n\t\tlet root = document.body;\n\t\tconst scheduler = this._scheduler;\n\t\tconst domHelpers = scheduler.$domHelpers;\n\t\tif(!config.global){\n\t\t\troot = scheduler.$root;\n\t\t}\n\n\t\tlet watchableTarget = null;\n\t\tconst handler = (event) => {\n\t\t\tconst eventTarget = domHelpers.getTargetNode(event);\n\t\t\tconst targetNode = domHelpers.closest(eventTarget, config.selector);\n\t\t\tif(domHelpers.isChildOf(eventTarget, this.tooltip.getNode())){\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst doOnMouseEnter = () => {\n\t\t\t\twatchableTarget = targetNode;\n\t\t\t\tconfig.onmouseenter(event, targetNode);\n\t\t\t};\n\n\t\t\tif(watchableTarget){\n\t\t\t\tif(targetNode && targetNode === watchableTarget){\n\t\t\t\t\tconfig.onmousemove(event, targetNode);\n\t\t\t\t}else{\n\t\t\t\t\tconfig.onmouseleave(event, watchableTarget);\n\t\t\t\t\twatchableTarget = null;\n\n\t\t\t\t\tif(targetNode && targetNode !== watchableTarget){\n\t\t\t\t\t\tdoOnMouseEnter();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif(targetNode){\n\t\t\t\t\tdoOnMouseEnter();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tthis.detach(config.selector);\n\t\tthis._domEvents.attach(root, \"mousemove\", handler);\n\t\tthis._listeners[config.selector] = {\n\t\t\tnode: root,\n\t\t\thandler\n\t\t};\n\t}\n\n\tdetach(selector: string): void {\n\t\tconst listener = this._listeners[selector];\n\t\tif(listener){\n\t\t\tthis._domEvents.detach(listener.node, \"mousemove\", listener.handler);\n\t\t}\n\t}\n\n\ttooltipFor(config: ITooltipConfig): void {\n\t\tconst cloneDomEvent = (event: MouseEvent) => {\n\t\t\tlet clone = event;\n\t\t\t// making events survive timeout in ie\n\t\t\t// tslint:disable-next-line no-string-literal\n\t\t\tif(document[\"createEventObject\"] && !document.createEvent){\n\t\t\t\t// tslint:disable-next-line no-string-literal\n\t\t\t\tclone = document[\"createEventObject\"](event);\n\t\t\t}\n\t\t\treturn clone;\n\t\t};\n\t\tthis._initDelayedFunctions();\n\t\tthis.attach({\n\t\t\tselector: config.selector,\n\t\t\tglobal: config.global,\n\t\t\tonmouseenter:(event: MouseEvent, node: HTMLElement) => {\n\t\t\t\tconst html = config.html(event, node);\n\t\t\t\tif(html){\n\t\t\t\t\tthis.delayShow(cloneDomEvent(event), html);\n\t\t\t\t}\n\t\t\t},\n\t\t\tonmousemove:(event: MouseEvent, node: HTMLElement) => {\n\t\t\t\tconst html = config.html(event, node);\n\t\t\t\tif(html){\n\t\t\t\t\tthis.delayShow(cloneDomEvent(event), html);\n\t\t\t\t}else{\n\t\t\t\t\tthis.delayShow.$cancelTimeout();\n\t\t\t\t\tthis.delayHide();\n\t\t\t\t}\n\t\t\t},\n\t\t\tonmouseleave:() => {\n\t\t\t\tthis.delayShow.$cancelTimeout();\n\t\t\t\tthis.delayHide();\n\t\t\t},\n\t\t});\n\t}\n\n\tprivate _initDelayedFunctions(){\n\t\tconst scheduler = this._scheduler;\n\t\t// reset delayed functions in order to apply current values of tooltip_timeout\n\t\tif(this.delayShow){\n\t\t\tthis.delayShow.$cancelTimeout();\n\t\t}\n\t\tif(this.delayHide){\n\t\t\tthis.delayHide.$cancelTimeout();\n\t\t}\n\t\tthis.tooltip.hide();\n\t\t\n\t\tthis.delayShow = (utils as any).default.delay((event: MouseEvent, html: string) => {\n\t\t\tif(scheduler.callEvent(\"onBeforeTooltip\", [event]) === false) {\n\t\t\t\tthis.tooltip.hide();\n\t\t\t} else {\n\t\t\t\tthis.tooltip.setContent(html);\n\t\t\t\tthis.tooltip.show(event);\n\t\t\t}\n\t\t}, scheduler.config.tooltip_timeout || 1);\n\n\t\tthis.delayHide = (utils as any).default.delay(() => {\n\t\t\tthis.delayShow.$cancelTimeout();\n\t\t\tthis.tooltip.hide();\n\t\t}, scheduler.config.tooltip_hide_timeout || 1);\n\t}\n\n}","import active_links from \"./active_links\";\nimport agenda_legacy from \"./agenda_legacy_view\";\nimport agenda_view from \"./agenda\";\nimport all_timed from \"./all_timed\";\nimport collision from \"./collision\";\nimport container_autoresize from \"./container_autoresize\";\nimport cookie from \"./cookie\";\nimport daytimeline_restricted from \"./restricted_extensions/daytimeline\";\nimport drag_between_restricted from \"./restricted_extensions/drag_between\";\nimport editors from \"./editors\";\nimport expand from \"./expand\";\nimport grid_view from \"./restricted_extensions/grid_view\";\nimport html_templates from \"./html_templates\";\nimport key_nav from \"./key_nav\";\nimport layer from \"./layer\";\nimport limit from \"./limit\";\nimport map_view from \"./map_view\";\nimport minical from \"./minical\";\nimport monthheight from \"./monthheight\";\nimport multisection_restricted from \"./restricted_extensions/multisection\";\nimport multiselect from \"./multiselect\";\nimport multisource from \"./multisource\";\nimport mvc from \"./mvc\";\nimport outerdrag from \"./outerdrag\";\nimport pdf from \"./pdf\";\nimport quick_info from \"./quick_info\";\nimport readonly from \"./readonly\";\nimport recurring from \"./recurring\";\nimport serialize from \"./serialize\";\nimport timeline_restricted from \"./restricted_extensions/timeline\";\nimport tooltip from \"./tooltip\";\nimport treetimeline_restricted from \"./restricted_extensions/treetimeline\";\nimport units_restricted from \"./restricted_extensions/units\";\nimport url from \"./url\";\nimport week_agenda_restricted from \"./restricted_extensions/week_agenda\";\nimport wp from \"./wp\";\nimport year_view from \"./year_view\";\nimport export_api from \"./export_api\";\n\nexport default {\n\tactive_links,\n\tagenda_legacy,\n\tagenda_view,\n\tall_timed,\n\tcollision,\n\tcontainer_autoresize,\n\tcookie,\n\tdaytimeline: daytimeline_restricted,\n\tdrag_between: drag_between_restricted,\n\teditors,\n\texpand,\n\texport_api,\n\tgrid_view,\n\thtml_templates,\n\tkey_nav,\n\tlayer,\n\tlimit,\n\tmap_view,\n\tminical,\n\tmonthheight,\n\tmultisection: multisection_restricted,\n\tmultiselect,\n\tmultisource,\n\tmvc,\n\touterdrag,\n\tpdf,\n\tquick_info,\n\treadonly,\n\trecurring,\n\tserialize,\n\ttimeline: timeline_restricted,\n\ttooltip,\n\ttreetimeline: treetimeline_restricted,\n\tunits: units_restricted,\n\turl,\n\tweek_agenda: week_agenda_restricted,\n\twp,\n\tyear_view\n};","export default function(scheduler){\n\nscheduler.config.active_link_view = \"day\";\nscheduler._active_link_click = function(e){\n\tvar start = e.target;\n\tvar to = start.getAttribute(\"data-link-date\");\n\tvar s_d = scheduler.date.str_to_date(scheduler.config.api_date, false, true);\n\tif (to) {\n\t\tscheduler.setCurrentView(s_d(to), scheduler.config.active_link_view);\n\t\tif (e && e.preventDefault)\n\t\t\te.preventDefault();\n\t\treturn false;\n\t}\n};\nscheduler.attachEvent(\"onTemplatesReady\", function() {\n\tvar do_wrapper = function(key, fullname){\n\t\tfullname = fullname || (key+\"_scale_date\");\n\n\t\tif(!scheduler.templates['_active_links_old_'+ fullname]){\n\t\t\tscheduler.templates['_active_links_old_'+ fullname] = scheduler.templates[fullname];\n\t\t}\n\t\tvar week_x = scheduler.templates['_active_links_old_'+ fullname];\n\t\tvar d_s = scheduler.date.date_to_str(scheduler.config.api_date);\n\t\tscheduler.templates[fullname] = function(date) {\n\t\t\treturn \"\" + week_x(date) + \"\";\n\t\t};\n\t};\n\n\tdo_wrapper(\"week\");\n\tdo_wrapper(\"\", \"month_day\");\n\tif (this.matrix){\n\t\tfor (var key in this.matrix)\n\t\t\tdo_wrapper(key);\n\t}\n\n\tthis._detachDomEvent(this._obj, \"click\", scheduler._active_link_click);\n\tscheduler.event(this._obj, \"click\", scheduler._active_link_click);\n});\n\n}","export default function(scheduler){\n\nscheduler.date.add_agenda_legacy = function(date){\n\treturn scheduler.date.add(date, 1, \"year\");\n};\n\nscheduler.templates.agenda_legacy_time = function(start,end,ev){\n\tif (ev._timed)\n\t\treturn this.day_date(ev.start_date, ev.end_date, ev)+\" \"+this.event_date(start);\n\telse\n\t\treturn scheduler.templates.day_date(start)+\" – \"+scheduler.templates.day_date(end);\n};\nscheduler.templates.agenda_legacy_text = function(start,end,event){\n\treturn event.text;\n};\nscheduler.templates.agenda_legacy_date = function(){ return \"\"; };\n\nscheduler.date.agenda_legacy_start=function(){ return scheduler.date.date_part(scheduler._currentDate()); };\n\nscheduler.attachEvent(\"onTemplatesReady\",function() {\n\tvar old_dblclick_dhx_cal_data = scheduler.dblclick_dhx_cal_data;\n\tscheduler.dblclick_dhx_cal_data = function() {\n\t\tif (this._mode == \"agenda_legacy\") {\n\t\t\tif (!this.config.readonly && this.config.dblclick_create)\n\t\t\t\tthis.addEventNow();\n\t\t} else {\n\t\t\tif (old_dblclick_dhx_cal_data)\n\t\t\t\treturn old_dblclick_dhx_cal_data.apply(this, arguments);\n\t\t}\n\t};\n\n\n\tvar old = scheduler.render_data;\n\tscheduler.render_data=function(evs){\n\t\tif (this._mode == \"agenda_legacy\")\n\t\t\tfill_agenda_tab();\n\t\telse\n\t\t\treturn old.apply(this,arguments);\n\t};\n\n\tvar old_render_view_data = scheduler.render_view_data;\n\tscheduler.render_view_data = function(){\n\t\tif(this._mode == \"agenda_legacy\") {\n\t\t\tscheduler._agendaScrollTop = scheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop;\n\t\t\tscheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop = 0;\n\t\t}\n\t\treturn old_render_view_data.apply(this,arguments);\n\t};\n\n\n\n\tfunction set_full_view(mode){\n\t\tif (mode){\n\t\t\tvar l = scheduler.locale.labels;\n\n\t\t\tvar rowAttr = scheduler._waiAria.agendaHeadAttrString();\n\t\t\tvar dateHeader = scheduler._waiAria.agendaHeadDateString(l.date);\n\t\t\tvar descriptionHeader = scheduler._waiAria.agendaHeadDescriptionString(l.description);\n\n\t\t\tscheduler._els[\"dhx_cal_header\"][0].innerHTML=\"
\" +\n\t\t\t\t\"
\"+l.date+\"
\" +\n\t\t\t\t\"\"+l.description+\"\" +\n\t\t\t\t\"
\";\n\t\t\tscheduler._table_view=true;\n\t\t\tscheduler.set_sizes();\n\t\t}\n\t}\n\n\tfunction fill_agenda_tab(){\n\t\t//select events for which data need to be printed\n\n\t\tvar events = scheduler.get_visible_events();\n\t\tevents.sort(function(a,b){ return a.start_date>b.start_date?1:-1;});\n\n\t\tvar tableAttr = scheduler._waiAria.agendaDataAttrString();\n\t\tvar agendaEventAttrString;\n\t\t//generate html for the view\n\t\tvar html=\"
\";\n\t\tfor (var i=0; i
\"+\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))+\n\t\t\t\t\t\"
\";\n\t\t\thtml+=`
\n\t\t\t\n\t\t\t
`;\n\t\t\thtml+=\"\"+scheduler.templates.agenda_text(ev.start_date, ev.end_date, ev)+\"
\";\n\t\t}\n\t\thtml+=\"
\";\n\n\t\t//render html\n\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\n\t\tscheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop = scheduler._agendaScrollTop||0;\n\n\t\t// setting up dhx_v_border size\n\t\tvar agenda_area = scheduler._els[\"dhx_cal_data\"][0].childNodes[0];\n\t\tvar v_border = agenda_area.childNodes[agenda_area.childNodes.length-1];\n\t\tv_border.style.height = (agenda_area.offsetHeight < scheduler._els[\"dhx_cal_data\"][0].offsetHeight) ? \"100%\" : (agenda_area.offsetHeight+\"px\");\n\n\t\tvar t=scheduler._els[\"dhx_cal_data\"][0].firstChild.childNodes;\n\n\t\tvar dateElement = scheduler._getNavDateElement();\n\t\tif(dateElement){\n\t\t\tdateElement.innerHTML=scheduler.templates.agenda_date(scheduler._min_date, scheduler._max_date, scheduler._mode);\n\t\t}\n\n\t\tscheduler._rendered=[];\n\t\tfor (var i=0; i < t.length-1; i++)\n\t\t\tscheduler._rendered[i]=t[i];\n\n\t}\n\n\tscheduler.agenda_legacy_view=function(mode){\n\t\tscheduler._min_date = scheduler.config.agenda_start||scheduler.date.agenda_legacy_start(scheduler._date);\n\t\tscheduler._max_date = scheduler.config.agenda_end||scheduler.date.add_agenda_legacy(scheduler._min_date, 1);\n\n\t\tset_full_view(mode);\n\t\tif (mode){\n\t\t\tscheduler._cols = null;\n\t\t\tscheduler._colsS = null;\n\t\t\tscheduler._table_view = true;\n\t\t\t//agenda tab activated\n\t\t\tfill_agenda_tab();\n\t\t} else {\n\t\t\tscheduler._table_view = false;\n\t\t\t//agenda tab de-activated\n\t\t}\n\t};\n});\n\n\n}","export default function(scheduler){\n\n\tscheduler.date.add_agenda = function(date, inc){\n\t\treturn scheduler.date.add(date, 1*inc, \"month\");\n\t};\n\t\n\tscheduler.templates.agenda_time = function(start,end,ev){\n\t\tif (ev._timed){\n\t\t\treturn `${this.event_date(start)} - ${this.event_date(end)}`;\n\t\t}else{\n\t\t\treturn scheduler.locale.labels.full_day;\n\t\t}\n\t};\n\tscheduler.templates.agenda_text = function(start,end,ev){\n\t\treturn ev.text;\n\t};\n\n\tconst dayDateToStr = scheduler.date.date_to_str(\"%F %j\");\n\tconst dayDowToStr = scheduler.date.date_to_str(\"%l\");\n\n\tscheduler.templates.agenda_day = function(date){ \n\t\treturn `
${dayDateToStr(date)}
\n\t\t
${dayDowToStr(date)}
`;\n\t};\n\tscheduler.templates.agenda_date = function(start, end){ \n\t\treturn scheduler.templates.month_date(scheduler.getState().date); \n\t};\n\t\n\tscheduler.date.agenda_start=function(date){\n\t\treturn scheduler.date.month_start(new Date(date));\n\t};\n\n\tlet scrollTop = 0;\n\t\n\tscheduler.attachEvent(\"onTemplatesReady\",function() {\n\t\tvar old_dblclick_dhx_cal_data = scheduler.dblclick_dhx_cal_data;\n\t\tscheduler.dblclick_dhx_cal_data = function() {\n\t\t\tif (this._mode == \"agenda\") {\n\t\t\t\tif (!this.config.readonly && this.config.dblclick_create)\n\t\t\t\t\tthis.addEventNow();\n\t\t\t} else {\n\t\t\t\tif (old_dblclick_dhx_cal_data)\n\t\t\t\t\treturn old_dblclick_dhx_cal_data.apply(this, arguments);\n\t\t\t}\n\t\t};\n\t\n\t\n\t\tvar old = scheduler.render_data;\n\t\tscheduler.render_data=function(evs){\n\t\t\tif (this._mode == \"agenda\")\n\t\t\t\tfill_agenda_tab();\n\t\t\telse\n\t\t\t\treturn old.apply(this,arguments);\n\t\t};\n\t\n\t\tvar old_render_view_data = scheduler.render_view_data;\n\t\tscheduler.render_view_data = function(){\n\t\t\tif(this._mode == \"agenda\") {\n\t\t\t\tscrollTop = scheduler._els[\"dhx_cal_data\"][0].scrollTop;\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = 0;\n\t\t\t}\n\t\t\treturn old_render_view_data.apply(this,arguments);\n\t\t};\n\n\t\tfunction fill_agenda_tab(){\n\t\t\tconst events = scheduler.get_visible_events();\n\t\t\tevents.sort(function(a,b){ return a.start_date>b.start_date?1:-1;});\n\n\t\t\tconst eventsInDays = {};\n\t\t\tlet currDate = scheduler.getState().min_date;\n\t\t\tconst maxDate = scheduler.getState().max_date;\n\t\t\twhile(currDate.valueOf() < maxDate.valueOf()){\n\t\t\t\teventsInDays[currDate.valueOf()] = [];\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\n\t\t\t}\n\n\t\t\tlet anyEvents = false;\n\n\t\t\tevents.forEach((ev) => {\n\t\t\t\tlet eventStart = scheduler.date.day_start(new Date(ev.start_date)); \n\t\t\t\twhile (eventStart.valueOf() < ev.end_date.valueOf()) {\n\t\t\t\t\tif (eventsInDays[eventStart.valueOf()]) {\n\t\t\t\t\t\teventsInDays[eventStart.valueOf()].push(ev);\n\t\t\t\t\t\tanyEvents = true;\n\t\t\t\t\t}\n\t\t\t\t\teventStart = scheduler.date.day_start(scheduler.date.add(eventStart, 1, \"day\"));\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif(!anyEvents){\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = renderEmptyView();\n\t\t\t}else{\n\t\t\t\tlet html = \"\";\n\t\t\t\tfor(let day in eventsInDays){\n\t\t\t\t\thtml += renderDay(new Date(day*1), eventsInDays[day]);\n\t\t\t\t}\n\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\n\t\t\t}\n\n\t\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = scrollTop;\n\t\t\t\n\t\t}\n\n\t\n\n\t\tfunction renderEmptyView(){\n\t\t\treturn `
${scheduler.locale.labels.agenda_tab}
`;\n\t\t}\n\n\t\tfunction renderDay(day, events) {\n\t\t\tif(!events.length){\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t\tlet html = `\n
\n\t
${scheduler.templates.agenda_day(day)}
\n\t
\n`;\n\n\t\t\tevents.forEach((calendarEvent) => {\n\t\t\t\thtml += renderOneEvent(day, calendarEvent);\n\t\t\t});\n\n\t\t\thtml += `
`;\n\t\t\treturn html;\n\t\t}\n\n\t\tfunction renderOneEvent(day, calendarEvent){\n\t\t\tconst dates = scheduler.templates.agenda_time(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\n\t\t\tconst selectedId = scheduler.getState().select_id;\n\t\t\tconst cls = scheduler.templates.event_class(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\n\t\t\tconst description = scheduler.templates.agenda_text(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\n\n\t\t\tlet style = \"\";\n\t\t\tif(calendarEvent.color || calendarEvent.textColor){\n\t\t\t\tconst bg = (calendarEvent.color ? (\"--dhx-scheduler-event-background:\" + calendarEvent.color + \";\") : \"\");\n\t\t\t\tconst color = (calendarEvent.textColor ? (\"--dhx-scheduler-event-color:\" + calendarEvent.textColor + \";\") : \"\");\n\t\t\t\tstyle = ` style=\"${bg}${color}\" `;\n\t\t\t}\n\n\t\t\treturn `
\n\t
\n\t
${dates}
\n\t
${description}
\n
`;\n\t\t}\n\t\n\t\tscheduler.agenda_view=function(mode){\n\t\t\tif (mode){\n\t\t\t\tscheduler._min_date = scheduler.config.agenda_start || scheduler.date.agenda_start(scheduler._date);\n\t\t\t\tscheduler._max_date = scheduler.config.agenda_end || scheduler.date.add_agenda(scheduler._min_date, 1);\n\t\t\t\tscheduler._cols = null;\n\t\t\t\tscheduler._colsS = null;\n\t\t\t\tscheduler._table_view = true;\n\n\t\t\t\tconst dateHeader = scheduler._getNavDateElement();\n\t\t\t\tdateHeader.innerHTML = scheduler.templates.agenda_date(scheduler._date);\n\t\t\t\t//agenda tab activated\n\t\t\t\tfill_agenda_tab();\n\t\t\t} else {\n\t\t\t\tscheduler._table_view = false;\n\t\t\t\t//agenda tab de-activated\n\t\t\t}\n\t\t};\n\t});\n\n\t// scheduler.attachEvent(\"onEventSelected\", function(id){\n\t// \tconst oldSelected = scheduler.$container.querySelectorAll(\".dhx_cal_agenda_event_line_selected\");\n\t// \toldSelected.forEach((el) => {\n\t// \t\tel.classList.remove(\"dhx_cal_agenda_event_line_selected\");\n\t// \t});\n\n\t// \tconst selected = scheduler.$container.querySelector(`[${scheduler.config.event_attribute}=\"${id}\"]`);\n\t// \tif(selected){\n\t// \t\tselected.classList.add(\"dhx_cal_agenda_event_line_selected\");\n\t// \t}\n\t// });\n\t\n\t\n}","export default function(scheduler){\n\n\tscheduler.config.all_timed = \"short\";\n\tscheduler.config.all_timed_month = false;\n\n\tvar is_event_short = function (ev) {\n\t\tif(!((ev.end_date - ev.start_date)/(1000*60*60) >= 24)){\n\t\t\treturn true;\n\t\t}\n\n\t\t// short event shouldn't disappear to multiday area during dnd-resize\n\t\tif(scheduler._drag_mode == \"resize\" && scheduler._drag_id == ev.id){\n\t\t\treturn true;\n\t\t}\n\t\treturn \tfalse;\n\t};\n\n\t// copy of usual events and recurring instances;\n\t// regular copy causes problems with recurrings which have series event as a prototype\n\tscheduler._safe_copy = function(event){\n\t\tvar proto = null,\n\t\t\tcopy = scheduler._copy_event(event);\n\t\tif(event.event_pid){\n\t\t\tproto = scheduler.getEvent(event.event_pid);\n\t\t}\n\n\t\tif (proto && proto.isPrototypeOf(event)) {\n\t\t\tdelete copy.event_length;\n\t\t\tdelete copy.event_pid;\n\t\t\tdelete copy.rec_pattern;\n\t\t\tdelete copy.rec_type;\n\t\t}\n\n\t\treturn copy;\n\t};\n\n\tvar old_prerender_events_line = scheduler._pre_render_events_line;\n\tvar old_prerender_events_table = scheduler._pre_render_events_table;\n\n\tvar prerender_events = function (evs, hold) {\n\t\tif (!this._table_view) {\n\t\t\treturn old_prerender_events_line.call(this, evs, hold);\n\t\t}\n\n\t\treturn old_prerender_events_table.call(this, evs, hold);\n\t};\n\n\tscheduler._pre_render_events_line = scheduler._pre_render_events_table = function(evs, hold){\n\t\tif (!this.config.all_timed ||\n\t\t\t(this._table_view && this._mode != \"month\") ||\n\t\t\t(this._mode == \"month\" && !this.config.all_timed_month))\n\t\t\treturn prerender_events.call(this, evs, hold);\n\n\t\tfor (var i=0; i < evs.length; i++) {\n\t\t\tvar ev=evs[i];\n\n\t\t\tif (ev._timed)\n\t\t\t\tcontinue;\n\n\t\t\tif (this.config.all_timed == \"short\") {\n\t\t\t\tif (!is_event_short(ev)) {\n\t\t\t\t\tif (this._mode != \"month\") {\n\t\t\t\t\t\tevs.splice(i--, 1);\n\t\t\t\t\t}\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar ce = this._safe_copy(ev); // current event (event for one specific day) is copy of original with modified dates\n\t\t\tif(!ev._virtual){\n\t\t\t\tce._first_chunk = true;\n\t\t\t}else{\n\t\t\t\tce._first_chunk = false;\n\t\t\t}\n\t\t\tce._drag_resize = false;\n\t\t\tce._virtual = true;\n\t\t\tce.start_date = new Date(ce.start_date); // as lame copy doesn't copy date objects\n\n\t\t\tif (!isOvernightEvent(ev)) {\n\t\t\t\tce.end_date = new Date(ev.end_date);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tce.end_date = getNextDay(ce.start_date);\n\t\t\t\tif (this.config.last_hour != 24) { // if specific last_hour was set (e.g. 20)\n\t\t\t\t\tce.end_date = setDateTime(ce.start_date, this.config.last_hour);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar event_changed = false;\n\t\t\tif (ce.start_date < this._max_date && ce.end_date > this._min_date && ce.start_date < ce.end_date) {\n\t\t\t\tevs[i] = ce; // adding another event in collection\n\t\t\t\tevent_changed = true;\n\t\t\t}\n\t\t//\tif (ce.start_date > ce.end_date) {\n\t\t//\t\tevs.splice(i--,1);\n\t\t//\t}\n\n\t\t\tvar re = this._safe_copy(ev); // remaining event, copy of original with modified start_date (making range more narrow)\n\t\t\tre._virtual = true;\n\t\t\tre.end_date = new Date(re.end_date);\n\t\t\tif (re.start_date < this._min_date)\n\t\t\t\tre.start_date = setDateTime(this._min_date, this.config.first_hour);// as we are starting only with whole hours\n\t\t\telse\n\t\t\t\tre.start_date = setDateTime(getNextDay(ev.start_date), this.config.first_hour);\n\n\t\t\tif (re.start_date < this._max_date && re.start_date < re.end_date) {\n\t\t\t\tif (event_changed){\n\t\t\t\t\tevs.splice(i+1,0,re);//insert part\n\t\t\t\t}else {\n\t\t\t\t\tevs[i--] = re;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tre._last_chunk = false;\n\t\t\t}else{\n\t\t\t\tce._last_chunk = true;\n\t\t\t\tce._drag_resize = true;\n\t\t\t}\n\n\t\t}\n\t\t// in case of all_timed pre_render is not applied to the original event\n\t\t// so we need to force redraw in case of dnd\n\t\tvar redraw = (this._drag_mode == 'move')?false:hold;\n\t\treturn prerender_events.call(this, evs, redraw);\n\n\n\t\tfunction isOvernightEvent(ev){\n\t\t\tvar next_day = getNextDay(ev.start_date);\n\t\t\treturn (+ev.end_date > +next_day);\n\t\t}\n\t\tfunction getNextDay(date){\n\t\t\tvar next_day = scheduler.date.add(date, 1, \"day\");\n\t\t\tnext_day = scheduler.date.date_part(next_day);\n\t\t\treturn next_day;\n\t\t}\n\t\tfunction setDateTime(date, hours){\n\t\t\tvar val = scheduler.date.date_part(new Date(date));\n\t\t\tval.setHours(hours);\n\t\t\treturn val;\n\t\t}\n\t};\n\tvar old_get_visible_events = scheduler.get_visible_events;\n\tscheduler.get_visible_events = function(only_timed){\n\t\tif (!(this.config.all_timed && this.config.multi_day))\n\t\t\treturn old_get_visible_events.call(this, only_timed);\n\t\treturn old_get_visible_events.call(this, false); // only timed = false\n\t};\n\tscheduler.attachEvent(\"onBeforeViewChange\", function (old_mode, old_date, mode, date) {\n\t\tscheduler._allow_dnd = (mode == \"day\" || mode == \"week\" || scheduler.getView(mode));\n\t\treturn true;\n\t});\n\n\tscheduler._is_main_area_event = function(ev){\n\t\treturn !!(ev._timed || this.config.all_timed === true || (this.config.all_timed == \"short\" && is_event_short(ev)) );\n\t};\n\n\tvar oldUpdate = scheduler.updateEvent;\n\tscheduler.updateEvent = function(id){\n\t\t// full redraw(update_render=true) messes events order while dnd.\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.\n\t\t// so for now full redraw is always enabled for not-dnd updates\n\t\tvar ev = scheduler.getEvent(id);\n\t\tvar fullRedrawNeeded;\n\t\tvar initial;\n\t\tif(ev) {\n\t\t\tfullRedrawNeeded = (scheduler.config.all_timed && !(scheduler.isOneDayEvent(scheduler._events[id]) || scheduler.getState().drag_id));\n\t\t\tif (fullRedrawNeeded) {\n\t\t\t\tinitial = scheduler.config.update_render;\n\t\t\t\tscheduler.config.update_render = true;\n\t\t\t}\n\t\t}\n\t\toldUpdate.apply(scheduler, arguments);\n\n\t\tif(ev) {\n\t\t\tif (fullRedrawNeeded) {\n\t\t\t\tscheduler.config.update_render = initial;\n\t\t\t}\n\t\t}\n\t};\n\n}","export default function(scheduler){\n\nvar temp_section;\nvar before;\n\nscheduler.config.collision_limit = 1;\n\nfunction _setTempSection(event_id) { // for custom views (matrix, timeline, units)\n\tvar checked_mode = scheduler._get_section_view();\n\tif(checked_mode && event_id){\n\t\ttemp_section = scheduler.getEvent(event_id)[scheduler._get_section_property()];\n\t}\n}\n\nscheduler.attachEvent(\"onBeforeDrag\",function(id){\n\t_setTempSection(id);\n\treturn true;\n});\nscheduler.attachEvent(\"onBeforeLightbox\",function(id){\n\tvar ev = scheduler.getEvent(id);\n\tbefore = [ev.start_date, ev.end_date];\n\t_setTempSection(id);\n\treturn true;\n});\nscheduler.attachEvent(\"onEventChanged\",function(id){\n\tif (!id || !scheduler.getEvent(id)) return true;\n\tvar ev = scheduler.getEvent(id);\n\tif (!scheduler.checkCollision(ev)){\n\t\tif (!before) return false;\n\t\tev.start_date = before[0];\n\t\tev.end_date = before[1];\n\t\tev._timed=this.isOneDayEvent(ev);\n\t}\n\treturn true;\n});\nscheduler.attachEvent(\"onBeforeEventChanged\",function(ev,e,is_new){\n\treturn scheduler.checkCollision(ev);\n});\nscheduler.attachEvent(\"onEventAdded\",function(id,ev) {\n\tvar result = scheduler.checkCollision(ev);\n\tif (!result)\n\t\tscheduler.deleteEvent(id);\n});\nscheduler.attachEvent(\"onEventSave\",function(id, edited_ev, is_new){\n\tedited_ev = scheduler._lame_clone(edited_ev);\n\tedited_ev.id = id;\n\n\t//lightbox may not have 'time' section\n\tif(!(edited_ev.start_date && edited_ev.end_date)){\n\t\tvar ev = scheduler.getEvent(id);\n\t\tedited_ev.start_date = new Date(ev.start_date);\n\t\tedited_ev.end_date = new Date(ev.end_date);\n\t}\n\n\tif(edited_ev.rec_type){\n\t\tscheduler._roll_back_dates(edited_ev);\n\t}\n\treturn scheduler.checkCollision(edited_ev); // in case user creates event on one date but then edited it another\n});\n\nscheduler._check_sections_collision = function(first, second){\n\tvar map_to = scheduler._get_section_property();\n\tif (first[map_to] == second[map_to] && first.id != second.id)\n\t\treturn true;\n\treturn false;\n};\n\nscheduler.checkCollision = function(ev) {\n\tvar evs = [];\n\tvar collision_limit = scheduler.config.collision_limit;\n\n\tif (ev.rec_type) {\n\t\tvar evs_dates = scheduler.getRecDates(ev);\n\t\tfor(var k=0; k= collision_limit) {\n\n\t\t\tsingle = false;\n\t\t}\n\t}\n\telse {\n\t\tif ( evs.length >= collision_limit )\n\t\t\tsingle = false;\n\t}\n\tif (!single) {\n\t\tvar res = !scheduler.callEvent(\"onEventCollision\",[ev,evs]);\n\t\tif (!res) {\n\t\t\tev[map_to] = temp_section||ev[map_to]; // from _setTempSection for custom views\n\t\t}\n\t\treturn res;\n\t}\n\treturn single;\n\n};\n\n}","export default function(scheduler){\n\n\tscheduler.config.container_autoresize = true;\n\tscheduler.config.month_day_min_height = 90;\n\tscheduler.config.min_grid_size = 25;\n\tscheduler.config.min_map_size = 400;\n\n\tvar old_pre_render_event = scheduler._pre_render_events;\n\n\t//need for temporary disabling without modifying public config\n\tvar active = true;\n\tvar total_height = 0;\n\tvar multiday_height = 0;\n\n\tscheduler._pre_render_events = function(evs, hold) {\n\t\tif (!(scheduler.config.container_autoresize && active)) {\n\t\t\treturn old_pre_render_event.apply(this, arguments);\n\t\t}\n\n\t\tvar hb = this.xy.bar_height;\n\t\tvar h_old = this._colsS.heights;\n\t\tvar h = this._colsS.heights = [0, 0, 0, 0, 0, 0, 0];\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\n\n\t\tif (!this._table_view)\n\t\t\tevs = this._pre_render_events_line(evs, hold); //ignore long events for now\n\t\telse\n\t\t\tevs = this._pre_render_events_table(evs, hold);\n\n\t\tif (this._table_view) {\n\t\t\tif (hold){\n\t\t\t\tthis._colsS.heights = h_old;\n\t\t\t} else {\n\t\t\t\tvar evl = data.firstChild;\n\t\t\t\tconst rows = evl.querySelectorAll(\".dhx_cal_month_row\");\n\t\t\t\tif (rows) {\n\t\t\t\t\tfor (var i = 0; i < rows.length; i++) {\n\t\t\t\t\t\th[i]++;\n\n\t\t\t\t\t\tif ((h[i]) * hb > this._colsS.height - this.xy.month_head_height) { // 22 - height of cell's header\n\t\t\t\t\t\t\t//we have overflow, update heights\n\t\t\t\t\t\t\tvar cells = rows[i].querySelectorAll(\".dhx_cal_month_cell\");\n\n\t\t\t\t\t\t\tvar cHeight = this._colsS.height - this.xy.month_head_height;\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){\n\t\t\t\t\t\t\t\tcHeight = h[i] * hb;\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){\n\t\t\t\t\t\t\t\tcHeight = (this.config.max_month_events + 1) * hb;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\trows[i].style.height = (cHeight + this.xy.month_head_height) + \"px\";\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\tfor (var j = 0; j < cells.length; j++) {\n\t\t\t\t\t\t\t\tcells[j].childNodes[1].style.height = cHeight + \"px\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\th[i] = (h[i - 1] || 0) + cells[0].offsetHeight;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\th[i] = (h[i - 1] || 0) + rows[i].querySelectorAll(\".dhx_cal_month_cell\")[0].offsetHeight;\n\t\t\t\t\t}\n\t\t\t\t\th.unshift(0);\n\t\t\t\t\tif (evl.parentNode.offsetHeight < evl.parentNode.scrollHeight && !evl._h_fix) {\n\t\t\t\t\t\t//we have v-scroll, decrease last day cell\n\n\t\t\t\t\t\t// NO CHECK SHOULD BE MADE ON VERTICAL SCROLL\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (!evs.length && this._els[\"dhx_multi_day\"][0].style.visibility == \"visible\")\n\t\t\t\t\t\th[0] = -1;\n\t\t\t\t\tif (evs.length || h[0] == -1) {\n\t\t\t\t\t\t//shift days to have space for multiday events\n\t\t\t\t\t\t//var childs = evl.parentNode.childNodes;\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\n\t\t\t\t\t\tif(multiday_height != dh + 1) {\n\t\t\t\t\t\t\tthis._obj.style.height = (total_height - multiday_height + dh - 1) + \"px\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdh += \"px\";\n\t\t\t\t\t\tconst navHeight = this._els[\"dhx_cal_navline\"][0].offsetHeight;\n\t\t\t\t\t\tconst headerHeight = this._els[\"dhx_cal_header\"][0].offsetHeight;\n\t\t\t\t\t\tdata.style.height = (this._obj.offsetHeight - navHeight - headerHeight - (this.xy.margin_top || 0)) + 'px';\n\t\t\t\t\t\tvar last = this._els[\"dhx_multi_day\"][0];\n\t\t\t\t\t\tlast.style.height = dh;\n\t\t\t\t\t\tlast.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\n\t\t\t\t\t\tlast = this._els[\"dhx_multi_day\"][1];\n\t\t\t\t\t\tlast.style.height = dh;\n\t\t\t\t\t\tlast.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\n\t\t\t\t\t\tif(last.style.visibility == \"hidden\"){\n\t\t\t\t\t\t\tlast.style.display = \"none\";\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tlast.style.display = \"\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlast.className = h[0] ? \"dhx_multi_day_icon\" : \"dhx_multi_day_icon_small\";\n\t\t\t\t\t\tthis._dy_shift = (h[0] + 1) * hb;\n\t\t\t\t\t\th[0] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn evs;\n\t};\n\n\tvar checked_divs = [\"dhx_cal_navline\", \"dhx_cal_header\", \"dhx_multi_day\", \"dhx_cal_data\"];\n\tvar updateContainterHeight = function(is_repaint) {\n\t\ttotal_height = 0;\n\t\tfor (var i = 0; i < checked_divs.length; i++) {\n\n\t\t\tvar className = checked_divs[i];\n\t\t\tvar checked_div = (scheduler._els[className]) ? scheduler._els[className][0] : null;\n\t\t\tvar height = 0;\n\t\t\tswitch (className) {\n\t\t\t\tcase \"dhx_cal_navline\":\n\t\t\t\tcase \"dhx_cal_header\":\n\t\t\t\t\theight = checked_div.offsetHeight;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"dhx_multi_day\":\n\t\t\t\t\theight = (checked_div) ? checked_div.offsetHeight - 1 : 0;\n\t\t\t\t\tmultiday_height = height;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"dhx_cal_data\":\n\t\t\t\t\tvar mode = scheduler.getState().mode;\n\n\t\t\t\t\tif(checked_div.childNodes[1] && mode != \"month\") {\n\t\t\t\t\t\tlet maxHeight = 0;\n\t\t\t\t\t\tfor(let i = 0; i < checked_div.childNodes.length; i++){\n\t\t\t\t\t\t\tif(checked_div.childNodes[i].offsetHeight > maxHeight){\n\t\t\t\t\t\t\t\tmaxHeight = checked_div.childNodes[i].offsetHeight;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\theight = maxHeight;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\theight = Math.max(checked_div.offsetHeight - 1, checked_div.scrollHeight);\n\t\t\t\t\t}\n\t\t\t\t\tif (mode == \"month\") {\n\t\t\t\t\t\tif (scheduler.config.month_day_min_height && !is_repaint) {\n\t\t\t\t\t\t\tvar rows_length = checked_div.querySelectorAll(\".dhx_cal_month_row\").length;\n\t\t\t\t\t\t\theight = rows_length * scheduler.config.month_day_min_height;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (is_repaint) {\n\t\t\t\t\t\t\tchecked_div.style.height = height + \"px\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (mode == \"year\"){\n\t\t\t\t\t\theight = 190 * scheduler.config.year_y;\n\t\t\t\t\t}\n\t\t\t\t\telse if(mode == \"agenda\"){\n\t\t\t\t\t\theight = 0;\n\t\t\t\t\t\tif(checked_div.childNodes && checked_div.childNodes.length){\n\t\t\t\t\t\t\tfor(var j = 0; j < checked_div.childNodes.length; j++){\n\t\t\t\t\t\t\t\theight += checked_div.childNodes[j].offsetHeight;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif(height + 2 < scheduler.config.min_grid_size){\n\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\theight += 2;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (mode == \"week_agenda\"){\n\t\t\t\t\t\tvar min_height = scheduler.xy.week_agenda_scale_height + scheduler.config.min_grid_size,\n\t\t\t\t\t\t\tcur_height;\n\n\t\t\t\t\t\tvar column;\n\t\t\t\t\t\tfor(var k = 0; k < checked_div.childNodes.length; k++){\n\t\t\t\t\t\t\tcolumn = checked_div.childNodes[k];\n\t\t\t\t\t\t\tfor(var j = 0; j < column.childNodes.length; j++) {\n\t\t\t\t\t\t\t\tvar innerHeight = 0,\n\t\t\t\t\t\t\t\t\teventsContainer = column.childNodes[j].childNodes[1];\n\n\t\t\t\t\t\t\t\tfor(var g =0; g < eventsContainer.childNodes.length; g++){\n\t\t\t\t\t\t\t\t\tinnerHeight += eventsContainer.childNodes[g].offsetHeight;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tcur_height = innerHeight + scheduler.xy.week_agenda_scale_height;\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;\n\n\t\t\t\t\t\t\t\tif (cur_height > min_height) {\n\t\t\t\t\t\t\t\t\tmin_height = cur_height;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\theight = min_height * 3;\n\t\t\t\t\t}\n\t\t\t\t\telse if(mode == \"map\") {\n\t\t\t\t\t\theight = 0;\n\t\t\t\t\t\tvar evs = checked_div.querySelectorAll(\".dhx_map_line\");\n\n\t\t\t\t\t\tfor (var j = 0; j < evs.length; j++) {\n\t\t\t\t\t\t\theight += evs[j].offsetHeight;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (height + 2 < scheduler.config.min_map_size) {\n\t\t\t\t\t\t\theight = scheduler.config.min_map_size;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\theight += 2;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if(scheduler._gridView) {\n\t\t\t\t\t\theight = 0;\n\n\t\t\t\t\t\tif (checked_div.childNodes[1].childNodes[0].childNodes && checked_div.childNodes[1].childNodes[0].childNodes.length) {\n\t\t\t\t\t\t\tvar evs = checked_div.childNodes[1].childNodes[0].childNodes[0].childNodes;\n\n\t\t\t\t\t\t\tfor (var j = 0; j < evs.length; j++) {\n\t\t\t\t\t\t\t\theight += evs[j].offsetHeight;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\theight += 2;\n\n\t\t\t\t\t\t\tif(height < scheduler.config.min_grid_size){\n\t\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (scheduler.matrix && scheduler.matrix[mode]) {\n\t\t\t\t\t\tif (is_repaint) {\n\t\t\t\t\t\t\theight += 0;\n\t\t\t\t\t\t\tchecked_div.style.height = height + \"px\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\theight = 0;\n\t\t\t\t\t\t\tvar cfg = scheduler.matrix[mode];\n\t\t\t\t\t\t\tvar rows = cfg.y_unit;\n\t\t\t\t\t\t\tfor(var r=0; r < rows.length; r++){\n\t\t\t\t\t\t\t\theight += cfg.getSectionHeight(rows[r].key);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Check and add extra height to avoid events hiding by the horizontal scrollbar\n\t\t\t\t\t\t\tif(scheduler.$container.clientWidth != scheduler.$container.scrollWidth){\n\t\t\t\t\t\t\t\theight += getScrollSize();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\theight -= 1;\n\t\t\t\t\t}\n\t\t\t\t\tif (mode == \"day\" || mode == \"week\" || (scheduler._props && scheduler._props[mode])) {\n\t\t\t\t\t\theight += 2;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\theight += 1;\n\t\t\ttotal_height += height;\n\t\t}\n\t\tscheduler._obj.style.height = (total_height) + \"px\";\n\n\t\tif (!is_repaint)\n\t\t\tscheduler.updateView();\n\t};\n\n\tfunction callUpdate(){\n\t\tactive = false;\n\t\tscheduler.callEvent(\"onAfterSchedulerResize\", []);\n\t\tactive = true;\n\t}\n\n\tvar conditionalUpdateContainerHeight = function() {\n\t\tif(!(scheduler.config.container_autoresize && active))\n\t\t\treturn true;\n\n\t\tvar mode = scheduler.getState().mode;\n\n\t\tif(!mode) {\n\t\t\treturn true;\n\t\t}\n\n\t\tvar asyncRepaint = window.requestAnimationFrame || window.setTimeout;\n\t\tvar scrollTop = document.documentElement.scrollTop;\n\n\t\tasyncRepaint(function() {\n\t\t\tif(scheduler.$destroyed || !scheduler.$initialized){\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tupdateContainterHeight();\n\t\t});\n\n\t\tif ( (scheduler.matrix && scheduler.matrix[mode]) || mode == \"month\") {\n\t\t\tasyncRepaint(function() {\n\t\t\t\tif(scheduler.$destroyed || !scheduler.$initialized){\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tupdateContainterHeight(true);\n\t\t\t\tdocument.documentElement.scrollTop = scrollTop;\n\t\t\t\tcallUpdate();\n\t\t\t}, 1);\n\t\t}else{\n\t\t\tcallUpdate();\n\t\t}\n\t};\n\n\tscheduler.attachEvent(\"onBeforeViewChange\", function(){\n\t\tvar autosizeEnabled = scheduler.config.container_autoresize;\n\t\tif(!scheduler.xy.$original_scroll_width){\n\t\t\tscheduler.xy.$original_scroll_width = scheduler.xy.scroll_width;\n\t\t}\n\n\t\tscheduler.xy.scroll_width = autosizeEnabled ? 0 : scheduler.xy.$original_scroll_width;\n\n\t\tif(scheduler.matrix){\n\t\t\tfor(var i in scheduler.matrix){\n\t\t\t\tvar timeline = scheduler.matrix[i];\n\t\t\t\tif(!timeline.$original_section_autoheight){\n\t\t\t\t\ttimeline.$original_section_autoheight = timeline.section_autoheight;\n\t\t\t\t}\n\t\t\t\tif(autosizeEnabled){\n\t\t\t\t\ttimeline.section_autoheight = false;\n\t\t\t\t}else{\n\t\t\t\t\ttimeline.section_autoheight = timeline.$original_section_autoheight;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t});\n\n\tscheduler.attachEvent(\"onViewChange\", conditionalUpdateContainerHeight);\n\tscheduler.attachEvent(\"onXLE\", conditionalUpdateContainerHeight);\n\tscheduler.attachEvent(\"onEventChanged\", conditionalUpdateContainerHeight);\n\tscheduler.attachEvent(\"onEventCreated\", conditionalUpdateContainerHeight);\n\tscheduler.attachEvent(\"onEventAdded\", conditionalUpdateContainerHeight);\n\tscheduler.attachEvent(\"onEventDeleted\", conditionalUpdateContainerHeight);\n\tscheduler.attachEvent(\"onAfterSchedulerResize\", conditionalUpdateContainerHeight);\n\tscheduler.attachEvent(\"onClearAll\", conditionalUpdateContainerHeight);\n\n\t//disable container autoresize when expanded\n\tscheduler.attachEvent(\"onBeforeExpand\", function(){\n\t\tactive = false;\n\t\treturn true;\n\t});\n\n\tscheduler.attachEvent(\"onBeforeCollapse\", function(){\n\t\tactive = true;\n\t\treturn true;\n\t});\n\t// helper function\n\tfunction getScrollSize() {\n\t\tvar div = document.createElement(\"div\");\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;\";\n\n\t\tdocument.body.appendChild(div);\n\t\tvar size = div.offsetWidth - div.clientWidth;\n\t\tdocument.body.removeChild(div);\n\t\treturn size;\n\t}\n\n\n}","export default function(scheduler){\n\tfunction setCookie(name,cookie_param,value) {\n\t\tvar str = name + \"=\" + value + (cookie_param?(\"; \"+cookie_param):\"\");\n\t\tdocument.cookie = str;\n\t}\n\tfunction getCookie(name) {\n\t\tvar search = name + \"=\";\n\t\tif (document.cookie.length > 0) {\n\t\t\tvar offset = document.cookie.indexOf(search);\n\t\t\tif (offset != -1) {\n\t\t\t\toffset += search.length;\n\t\t\t\tvar end = document.cookie.indexOf(\";\", offset);\n\t\t\t\tif (end == -1)\n\t\t\t\t\tend = document.cookie.length;\n\t\t\t\treturn document.cookie.substring(offset, end);\n\t\t\t}\n\t\t}\n\t\treturn \"\";\n\t}\n\n\tfunction getCookieName(scheduler) {\n\t\treturn (scheduler._obj.id || \"scheduler\") + \"_settings\";\n\t}\n\n\tvar first = true;\n\tscheduler.attachEvent(\"onBeforeViewChange\",function(oldMode,oldDate,mode,date){\n\t\t// if Url plugin is enabled - explicit url values should have more priority than cookies\n\t\tif (first && scheduler._get_url_nav){\n\t\t\tvar urlNavigationPlugin = scheduler._get_url_nav();\n\t\t\tif(urlNavigationPlugin.date || urlNavigationPlugin.mode || urlNavigationPlugin.event){\n\t\t\t\tfirst = false;\n\t\t\t}\n\t\t}\n\n\t\tvar cookie = getCookieName(scheduler);\n\n\t\tif (first){\n\t\t\tfirst = false;\n\t\t\tvar schedulerCookie = getCookie(cookie);\n\t\t\tif (schedulerCookie){\n\n\t\t\t\tif(!scheduler._min_date){\n\t\t\t\t\t//otherwise scheduler will have incorrect date until timeout\n\t\t\t\t\t//it can cause js error with 'onMouseMove' handler of key_nav.js\n\t\t\t\t\tscheduler._min_date = date;\n\t\t\t\t}\n\n\t\t\t\tschedulerCookie = unescape(schedulerCookie).split(\"@\");\n\t\t\t\tschedulerCookie[0] = this._helpers.parseDate(schedulerCookie[0]);\n\t\t\t\tvar view = this.isViewExists(schedulerCookie[1]) ? schedulerCookie[1] : mode,\n\t\t\t\t\tdate = !isNaN(+schedulerCookie[0]) ? schedulerCookie[0] : date;\n\n\t\t\t\twindow.setTimeout(function(){\n\t\t\t\t\tif(scheduler.$destroyed){\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tscheduler.setCurrentView(date,view);\n\t\t\t\t},1);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t});\n\n\tscheduler.attachEvent(\"onViewChange\", function (newMode , newDate){\n\t\tvar cookie = getCookieName(scheduler);\n\t\tvar text = escape(this._helpers.formatDate(newDate)+\"@\"+(newMode));\n\t\tsetCookie(cookie,\"expires=Sun, 31 Jan 9999 22:00:00 GMT\",text);\n\t});\n\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)\n\tvar old_load = scheduler._load;\n\tscheduler._load = function() {\n\t\tvar args = arguments;\n\n\t\tif (!scheduler._date) {\n\t\t\tvar that = this;\n\t\t\twindow.setTimeout(function() {\n\t\t\t\told_load.apply(that, args);\n\t\t\t},1);\n\t\t} else {\n\t\t\told_load.apply(this, args);\n\t\t}\n\t};\n}","import notImplemented from \"./not_implemented_extension\";\n\nexport default function(scheduler){\n\tnotImplemented.alert(\"Day Timeline\", scheduler.assert);\n}","import notImplemented from \"./not_implemented_extension\";\n\nexport default function(scheduler){\n\tnotImplemented.alert(\"Drag Between\", scheduler.assert);\n}","export default function(scheduler){\n/* global dhtmlXCombo */\nscheduler.form_blocks['combo']={\n\trender:function(sns) {\n\t\tif (!sns.cached_options)\n\t\t\tsns.cached_options = {};\n\t\tvar res = '';\n\t\tres += \"
\";\n\t\treturn res;\n\t},\n\tset_value:function(node,value,ev,config){\n\t\t(function(){\n\t\t\tresetCombo();\n\t\t\tvar id = scheduler.attachEvent(\"onAfterLightbox\",function(){\n\t\t\t\t// otherwise destructor will never be called after form reset(e.g. in readonly event mode)\n\t\t\t\tresetCombo();\n\t\t\t\tscheduler.detachEvent(id);\n\t\t\t});\n\t\t\tfunction resetCombo(){\n\t\t\t\tif(node._combo && node._combo.DOMParent) {\n\t\t\t\t\tvar combo = node._combo;\n\t\t\t\t\tif(combo.unload){\n\t\t\t\t\t\tcombo.unload();\n\t\t\t\t\t}else if(combo.destructor){\n\t\t\t\t\t\tcombo.destructor();\n\t\t\t\t\t}\n\t\t\t\t\t// dhtmlxCombo 4.1.0 bug\n\t\t\t\t\tcombo.DOMParent = combo.DOMelem = null;\n\t\t\t\t}\n\t\t\t}\n\t\t})();\n\t\twindow.dhx_globalImgPath = config.image_path||'/';\n\t\tnode._combo = new dhtmlXCombo(node, config.name, node.offsetWidth-8);\n\t\tif (config.onchange)\n\t\t\tnode._combo.attachEvent(\"onChange\", config.onchange);\n\n\t\tif (config.options_height)\n\t\t\tnode._combo.setOptionHeight(config.options_height);\n\t\tvar combo = node._combo;\n\t\tcombo.enableFilteringMode(config.filtering, config.script_path||null, !!config.cache);\n\n\t\tif (!config.script_path) { // script-side filtration is used\n\t\t\tvar all_options = [];\n\t\t\tfor (var i = 0; i < config.options.length; i++) {\n\t\t\t\tvar option = config.options[i];\n\t\t\t\tvar single_option = [\n\t\t\t\t\toption.key,\n\t\t\t\t\toption.label,\n\t\t\t\t\toption.css\n\t\t\t\t];\n\t\t\t\tall_options.push(single_option);\n\t\t\t}\n\t\t\tcombo.addOption(all_options);\n\t\t\tif (ev[config.map_to]) {\n\t\t\t\tvar index = combo.getIndexByValue(ev[config.map_to]);\n\t\t\t\tcombo.selectOption(index);\n\t\t\t}\n\t\t} else { // server-side filtration is used\n\t\t\tvar selected_id = ev[config.map_to];\n\t\t\tif (selected_id) {\n\t\t\t\tif (config.cached_options[selected_id]) {\n\t\t\t\t\tcombo.addOption(selected_id, config.cached_options[selected_id]);\n\t\t\t\t\tcombo.disable(1);\n\t\t\t\t\tcombo.selectOption(0);\n\t\t\t\t\tcombo.disable(0);\n\t\t\t\t} else {\n\t\t\t\t\tscheduler.ajax.get(config.script_path+\"?id=\"+selected_id+\"&uid=\"+scheduler.uid(), function(result){\n\t\t\t\t\t\tvar responseText = result.xmlDoc.responseText;\n\t\t\t\t\t\tvar label;\n\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\tvar res = JSON.parse(responseText);\n\t\t\t\t\t\t\tlabel = res.options[0].text;\n\t\t\t\t\t\t}catch(e){\n\t\t\t\t\t\t\tvar option = scheduler.ajax.xpath(\"//option\", result.xmlDoc)[0];\n\t\t\t\t\t\t\tlabel = option.childNodes[0].nodeValue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconfig.cached_options[selected_id] = label;\n\t\t\t\t\t\tcombo.addOption(selected_id, label);\n\t\t\t\t\t\tcombo.disable(1);\n\t\t\t\t\t\tcombo.selectOption(0);\n\t\t\t\t\t\tcombo.disable(0);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcombo.setComboValue(\"\");\n\t\t\t}\n\t\t}\n\t},\n\tget_value:function(node,ev,config) {\n\t\tvar selected_id = node._combo.getSelectedValue(); // value = key\n\t\tif (config.script_path) {\n\t\t\tconfig.cached_options[selected_id] = node._combo.getSelectedText();\n\t\t}\n\t\treturn selected_id;\n\t},\n\tfocus:function(node){\n\t}\n};\n\nscheduler.form_blocks['radio']={\n\trender:function(sns) {\n\t\tvar res = '';\n\t\tres += `
`;\n\t\tfor (var i=0; i\"+\" \"+sns.options[i].label+\"\";\n\t\t}\n\t\tres += \"
\";\n\n\t\treturn res;\n\t},\n\tset_value:function(node,value,ev,config){\n\t\tvar radiobuttons = node.getElementsByTagName('input');\n\t\tfor (var i = 0; i < radiobuttons.length; i++) {\n\t\t\tradiobuttons[i].checked = false;\n\t\t\tvar checked_value = ev[config.map_to]||value;\n\t\t\tif (radiobuttons[i].value == checked_value) {\n\t\t\t\tradiobuttons[i].checked = true;\n\t\t\t}\n\t\t}\n\t},\n\tget_value:function(node,ev,config){\n\t\tvar radiobuttons = node.getElementsByTagName('input');\n\t\tfor(var i=0; i
';\n\t\telse\n\t\t\treturn '';\n\t},\n\tset_value:function(node,value,ev,config){\n\t\tnode=scheduler._lightbox.querySelector(`#${config.id}`);\n\t\tvar id = scheduler.uid();\n\t\tvar isChecked = (typeof config.checked_value != \"undefined\") ? value == config.checked_value : !!value;\n\t\tnode.className += \" dhx_cal_checkbox\";\n\t\tvar check_html = \"\";\n\t\tvar label_html = \"\";\n\t\tif (scheduler.config.wide_form){\n\t\t\tnode.innerHTML = label_html;\n\t\t\tnode.nextSibling.innerHTML=check_html;\n\t\t} else\n\t\t\tnode.innerHTML=check_html+label_html;\n\n\t\tif (config.handler) {\n\t\t\tvar checkbox = node.getElementsByTagName('input')[0];\n\t\t\tif(checkbox.$_eventAttached){\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tcheckbox.$_eventAttached = true;\n\t\t\tscheduler.event(checkbox, \"click\", config.handler);\n\t\t\t//checkbox.onclick = config.handler;\n\t\t}\n\t},\n\tget_value:function(node,ev,config){\n\t\tnode=scheduler._lightbox.querySelector(`#${config.id}`);\n\t\tvar checkbox = node.getElementsByTagName('input')[0]; // moved to the header\n\t\tif (!checkbox)\n\t\t\tcheckbox = node.nextSibling.getElementsByTagName('input')[0];\n\t\treturn (checkbox.checked)?(config.checked_value||true):(config.unchecked_value||false);\n\t},\n\tfocus:function(node){\n\t}\n};\n\n\n}","export default function(scheduler){\n\nscheduler.ext.fullscreen = {\n\ttoggleIcon: null\n};\n\nscheduler.expand = function() {\n\tif(!scheduler.callEvent(\"onBeforeExpand\", []))\n\t\treturn;\n\tvar t = scheduler._obj;\n\tdo {\n\t\tt._position = t.style.position || \"\";\n\t\tt.style.position = \"static\";\n\t} while ((t = t.parentNode) && t.style);\n\tt = scheduler._obj;\n\tt.style.position = \"absolute\";\n\tt._width = t.style.width;\n\tt._height = t.style.height;\n\tt.style.width = t.style.height = \"100%\";\n\tt.style.top = t.style.left = \"0px\";\n\n\tvar top = document.body;\n\ttop.scrollTop = 0;\n\n\ttop = top.parentNode;\n\tif (top)\n\t\ttop.scrollTop = 0;\n\tdocument.body._overflow = document.body.style.overflow || \"\";\n\tdocument.body.style.overflow = \"hidden\";\n\tscheduler._maximize();\n\tscheduler.callEvent(\"onExpand\", []);\n};\nscheduler.collapse = function() {\n\tif(!scheduler.callEvent(\"onBeforeCollapse\", []))\n\t\treturn;\n\tvar t = scheduler._obj;\n\tdo {\n\t\tt.style.position = t._position;\n\t} while ((t = t.parentNode) && t.style);\n\tt = scheduler._obj;\n\tt.style.width = t._width;\n\tt.style.height = t._height;\n\tdocument.body.style.overflow = document.body._overflow;\n\tscheduler._maximize();\n\tscheduler.callEvent(\"onCollapse\", []);\n};\nscheduler.attachEvent(\"onTemplatesReady\", function() {\n\tvar t = document.createElement(\"div\");\n\tt.className = \"dhx_expand_icon\";\n\tscheduler.ext.fullscreen.toggleIcon = t;\n\tt.innerHTML = `\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t`;\n\tscheduler._obj.appendChild(t);\n\tscheduler.event(t, \"click\", function() {\n\t\tif (!scheduler.expanded)\n\t\t\tscheduler.expand(); else\n\t\t\tscheduler.collapse();\n\t});\n});\nscheduler._maximize = function() {\n\tthis.expanded = !this.expanded;\n\tif(this.expanded){\n\t\tthis.ext.fullscreen.toggleIcon.classList.add(\"dhx_expand_icon--expanded\");\n\t\t\n\t}else{\n\t\tthis.ext.fullscreen.toggleIcon.classList.remove(\"dhx_expand_icon--expanded\");\n\t}\n\t\n\t//scheduler.ext.fullscreen.toggleIcon.style.backgroundPosition = \"0 \" + (this.expanded ? \"0\" : \"18\") + \"px\";\n\n\tvar directions = ['left', 'top'];\n\tfor (var i = 0; i < directions.length; i++) {\n\t\t//var margin = scheduler.xy['margin_' + directions[i]];\n\t\tvar prev_margin = scheduler['_prev_margin_' + directions[i]];\n\t\tif (scheduler.xy['margin_' + directions[i]]) {\n\t\t\tscheduler['_prev_margin_' + directions[i]] = scheduler.xy['margin_' + directions[i]];\n\t\t\tscheduler.xy['margin_' + directions[i]] = 0;\n\t\t} else {\n\t\t\tif (prev_margin) {\n\t\t\t\tscheduler.xy['margin_' + directions[i]] = scheduler['_prev_margin_' + directions[i]];\n\t\t\t\tdelete scheduler['_prev_margin_' + directions[i]];\n\t\t\t}\n\t\t}\n\t}\n\n\tscheduler.setCurrentView();\n};\n\n\n}\n","export default function(scheduler){\n\n\n(function(){\n\nfunction defaults(obj, std){\n\tfor (var key in std)\n\t\tif (!obj[key])\n\t\t\tobj[key] = std[key];\n\treturn obj;\n}\n\nfunction getElementSizes(element, scheduler) {\n\tvar sizes = {};\n\telement = scheduler._els[element];\n\tif (element && element[0]) {\n\t\tsizes.x = element[0].scrollWidth;\n\t\tsizes.y = element[0].scrollHeight;\n\t} else {\n\t\tsizes.x = 0;\n\t\tsizes.y = 0;\n\t}\n\treturn sizes;\n}\n\n//compatibility for new versions of scheduler\nif(!window.dhtmlxAjax){\n\twindow.dhtmlxAjax = {\n\t\tpost: function(url, data, callback){\n\t\t\treturn window.dhx4.ajax.post(url, data, callback);\n\t\t},\n\t\tget: function(url, callback){\n\t\t\treturn window.ajax.get(url, callback);\n\t\t}\n\t};\n}\n\nfunction add_export_methods(scheduler){\n\n\tscheduler.exportToPDF = function(config){\n\t\tconfig = defaults((config || {}), {\n\t\t\tname:\"calendar.pdf\",\n\t\t\tformat:\"A4\",\n\t\t\torientation:\"landscape\",\n\t\t\tdpi:96,\n\t\t\tzoom:1,\n\t\t\trtl: scheduler.config.rtl\n\t\t});\n\t\tconfig.html = this._export_html(config);\n\t\tconfig.mode = this.getState().mode;\n\t\tthis._send_to_export(config, \"pdf\");\n\t};\n\n\tscheduler.exportToPNG = function(config){\n\t\tconfig = defaults((config || {}), {\n\t\t\tname:\"calendar.png\",\n\t\t\tformat:\"A4\",\n\t\t\torientation:\"landscape\",\n\t\t\tdpi:96,\n\t\t\tzoom:1,\n\t\t\trtl: scheduler.config.rtl\n\t\t});\n\t\tconfig.html = this._export_html(config);\n\t\tconfig.mode = this.getState().mode;\n\t\tthis._send_to_export(config, \"png\");\n\t};\n\n\tscheduler.exportToICal = function(config){\n\t\tconfig = defaults((config || {}), {\n\t\t\tname:\"calendar.ical\",\n\t\t\tdata:this._serialize_plain(null, config)\n\t\t});\n\t\tthis._send_to_export(config, \"ical\");\n\t};\n\n\tscheduler.exportToExcel = function(config){\n\t\tconfig = defaults((config || {}), {\n\t\t\tname:\"calendar.xlsx\",\n\t\t\ttitle:\"Events\",\n\t\t\tdata:this._serialize_plain( this.templates.xml_format, config),\n\t\t\tcolumns:this._serialize_columns()\n\t\t});\n\t\tthis._send_to_export(config, \"excel\");\n\t};\n\n\tscheduler._ajax_to_export = function(data, type, callback){\n\t\tdelete data.callback;\n\t\tvar url = data.server || \"https://export.dhtmlx.com/scheduler\";\n\n\t\twindow.dhtmlxAjax.post(url,\n\t\t\t\"type=\"+type+\"&store=1&data=\"+encodeURIComponent(JSON.stringify(data)),\n\t\t\tfunction(loader){\n\t\t\t\tvar fail = loader.xmlDoc.status > 400;\n\t\t\t\tvar info = null;\n\n\t\t\t\tif (!fail){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tinfo = JSON.parse(loader.xmlDoc.responseText);\n\t\t\t\t\t}catch(e){}\n\t\t\t\t}\n\t\t\t\tcallback(info);\n\t\t\t}\n\t\t);\n\t};\n\n\tscheduler._plain_export_copy = function(source, format){\n\t\tvar target = {};\n\t\tfor (var key in source)\n\t\t\ttarget[key] = source[key];\n\n\t\ttarget.start_date = format(target.start_date);\n\t\ttarget.end_date = format(target.end_date);\n\t\ttarget.$text = this.templates.event_text(source.start_date, source.end_date, source);\n\n\t\treturn target;\n\t};\n\n\tscheduler._serialize_plain = function(format, config){\n\t\tformat = format || scheduler.date.date_to_str(\"%Y%m%dT%H%i%s\", true);\n\n\t\tvar events;\n\t\tif (config && config.start && config.end)\n\t\t\tevents = scheduler.getEvents(config.start, config.end);\n\t\telse\n\t\t\tevents = scheduler.getEvents();\n\n\t\tvar data = [];\n\t\tfor (var i = 0; i< events.length; i++)\n\t\t\tdata[i] = this._plain_export_copy(events[i], format);\n\n\t\treturn data;\n\t};\n\n\tscheduler._serialize_columns = function(){\n\t\treturn [\n\t\t\t{ id:\"start_date\", header:\"Start Date\", width:30 },\n\t\t\t{ id:\"end_date\", header:\"End Date\", width:30 },\n\t\t\t{ id:\"$text\", header:\"Text\", width:100 }\n\t\t];\n\t};\n\n\tscheduler._send_to_export = function(data, type){\n\t\tif(!data.version){\n\t\t\tdata.version = scheduler.version;\n\t\t}\n\n\t\tif(!data.skin){\n\t\t\tdata.skin = scheduler.skin;\n\t\t}\n\n\t\tif (data.callback)\n\t\t\t\treturn scheduler._ajax_to_export(data, type, data.callback);\n\n\t\tvar form = this._create_hidden_form();\n\n\t\tform.firstChild.action = data.server || \"https://export.dhtmlx.com/scheduler\";\n\t\tform.firstChild.childNodes[0].value = JSON.stringify(data);\n\t\tform.firstChild.childNodes[1].value = type;\n\t\tform.firstChild.submit();\n\t};\n\n\tscheduler._create_hidden_form = function(){\n\t\tif (!this._hidden_export_form){\n\t\t\tvar t = this._hidden_export_form = document.createElement(\"div\");\n\t\t\tt.style.display = \"none\";\n\t\t\tt.innerHTML = \"
\";\n\t\t\tdocument.body.appendChild(t);\n\t\t}\n\t\treturn this._hidden_export_form;\n\t};\n\n\tscheduler._get_export_size = function(format, orientation, zoom, dpi, header, footer, scales) {\n\n\t\tdpi = parseInt(dpi)/25.4 || 4;\n\n\t\tvar sizes = {\n\t\t\t\"A5\":{ x:148, y:210 },\n\t\t\t\"A4\":{ x:210, y:297 },\n\t\t\t\"A3\":{ x:297, y:420 },\n\t\t\t\"A2\":{ x:420, y:594 },\n\t\t\t\"A1\":{ x:594, y:841 },\n\t\t\t\"A0\":{ x:841, y:1189 }\n\t\t};\n\n\t\tvar dataX = getElementSizes(\"dhx_cal_data\", this).x;\n\t\tvar dataY = getElementSizes(\"dhx_cal_data\", this).y;\n\t\tvar headY = getElementSizes(\"dhx_cal_header\", this).y;\n\t\tvar multY = getElementSizes(\"dhx_multi_day\", this).y;\n\n\t\tvar cSize = {\n\t\t\ty: dataY + headY + multY\n\t\t};\n\n\t\tif (format === \"full\") {\n\t\t\tcSize.x = dataX;\n\t\t} else {\n\t\t\tcSize.x = Math.floor( (orientation === \"landscape\" ? sizes[format].y : sizes[format].x) * dpi );\n\t\t}\n\n\t\tif (scales) {\n\t\t\tcSize.x *= (parseFloat(scales.x) || 1);\n\t\t\tcSize.y *= (parseFloat(scales.y) || 1);\n\t\t}\n\n\t\treturn cSize;\n\t};\n\n\tfunction getTimeline() {\n\t\tvar mode = scheduler.getState().mode;\n\t\tif (scheduler.matrix && scheduler.matrix[mode]) {\n\t\t\treturn scheduler.matrix[mode];\n\t\t}\n\t\treturn null;\n\t}\n\n\tfunction getInitialSizes() {\n\t\tvar smartRendering = undefined,\n\t\t\tscrollable = undefined;\n\n\t\tvar timeline = getTimeline();\n\t\tif (timeline) {\n\t\t\tscrollable = timeline.scrollable;\n\t\t\tsmartRendering = timeline.smart_rendering;\n\t\t}\n\n\t\treturn {\n\t\t\tnav_height: scheduler.xy.nav_height,\n\t\t\tscroll_width: scheduler.xy.scroll_width,\n\t\t\tstyle_width: scheduler._obj.style.width,\n\t\t\tstyle_height: scheduler._obj.style.height,\n\t\t\ttimeline_scrollable: scrollable,\n\t\t\ttimeline_smart_rendering: smartRendering\n\t\t};\n\t}\n\n\tfunction setExportSizes(size, initialSizes) {\n\t\tscheduler._obj.style.width = size.x + \"px\";\n\t\tscheduler._obj.style.height = size.y + \"px\";\n\n\t\tscheduler.xy.nav_height = 0;\n\t\tscheduler.xy.scroll_width = 0;\n\n\t\tvar timeline = getTimeline();\n\t\tif (initialSizes.timeline_scrollable || initialSizes.timeline_smart_rendering) {\n\n\t\t\ttimeline.scrollable = false;\n\t\t\ttimeline.smart_rendering = false;\n\t\t}\n\t}\n\n\tfunction setInitialSizes(initialSizes) {\n\t\tscheduler.xy.scroll_width = initialSizes.scroll_width;\n\t\tscheduler.xy.nav_height = initialSizes.nav_height;\n\t\tscheduler._obj.style.width = initialSizes.style_width;\n\t\tscheduler._obj.style.height = initialSizes.style_height;\n\n\t\tvar timeline = getTimeline();\n\t\tif (initialSizes.timeline_scrollable || initialSizes.timeline_smart_rendering) {\n\t\t\ttimeline.scrollable = initialSizes.timeline_scrollable;\n\t\t\ttimeline.smart_rendering = initialSizes.timeline_smart_rendering;\n\t\t}\n\t}\n\n\tscheduler._export_html = function (obj) {\n\t\tvar initialSizes = getInitialSizes();\n\t\tvar size = scheduler._get_export_size(obj.format, obj.orientation, obj.zoom, obj.dpi, obj.header, obj.footer, obj.scales);\n\n\t\tvar html = \"\";\n\t\ttry {\n\t\t\tsetExportSizes(size, initialSizes);\n\t\t\tscheduler.setCurrentView();\n\t\t\thtml = scheduler._obj.innerHTML;\n\t\t} catch (e) {\n\n\t\t\t// eslint-disable-next-line no-console\n\t\t\tconsole.error(e);\n\t\t} finally {\n\t\t\tsetInitialSizes(initialSizes);\n\t\t\tscheduler.setCurrentView();\n\t\t}\n\n\t\treturn html;\n\t};\n\n}\n\nadd_export_methods(scheduler);\n\n\n})();\n\n}","import notImplemented from \"./not_implemented_extension\";\n\nexport default function(scheduler){\n\tnotImplemented.alert(\"Grid\", scheduler.assert);\n}","export default function(scheduler){\n\nscheduler.attachEvent(\"onTemplatesReady\",function(){\n\tvar els = document.body.getElementsByTagName(\"DIV\");\n\tfor (var i=0; i < els.length; i++) {\n\t\tvar cs = els[i].className||\"\";\n\t\tcs = cs.split(\":\");\n\t\tif (cs.length == 2 && cs[0] == \"template\"){\n\t\t\tvar code = \"return \\\"\"+(els[i].innerHTML||\"\").replace(/\\\\/g, \"\\\\\\\\\").replace(/\"/g,\"\\\\\\\"\").replace(/[\\n\\r]+/g,\"\")+\"\\\";\";\n\t\t\tcode = unescape(code).replace(/\\{event\\.([a-z]+)\\}/g,function(all,mask){\n\t\t\t\treturn '\"+ev.'+mask+'+\"';\n\t\t\t});\n\t\t\tscheduler.templates[cs[1]]=Function(\"start\",\"end\",\"ev\",code);\n\t\t\tels[i].style.display='none';\n\t\t}\n\t}\n});\n\n}","import keyboard_shortcuts from \"./keyboard_navigation/common/keyboard_shortcuts\";\nimport eventhandler from \"./keyboard_navigation/common/eventhandler\";\nimport trap_modal_focus from \"./keyboard_navigation/common/trap_modal_focus\";\nimport marker from \"./keyboard_navigation/marker\";\nimport scheduler_node from \"./keyboard_navigation/elements/scheduler_node\";\nimport nav_node from \"./keyboard_navigation/elements/nav_node\";\nimport header_cell from \"./keyboard_navigation/elements/header_cell\";\nimport event from \"./keyboard_navigation/elements/event\";\nimport time_slot from \"./keyboard_navigation/elements/time_slot\";\nimport minical_button from \"./keyboard_navigation/elements/minical_button\";\nimport minical_cell from \"./keyboard_navigation/elements/minical_cell\";\nimport data_area from \"./keyboard_navigation/elements/data_area\";\nimport modals from \"./keyboard_navigation/modals\";\nimport core from \"./keyboard_navigation/core\";\nimport key_nav_legacy from \"./keyboard_navigation/key_nav_legacy\";\n\n\nimport scheduler_handlers from \"./keyboard_navigation/scheduler_handlers\";\nimport minical_handlers from \"./keyboard_navigation/minical_handlers\";\n\nexport default function(scheduler){\n\t\tscheduler.config.key_nav = true;\n\t\tscheduler.config.key_nav_step = 30;\n\t\tscheduler.addShortcut = function(shortcut, handler, scope){\n\t\t\tvar scopeObject = getScope(scope);\n\t\t\tif(scopeObject){\n\t\t\t\tscopeObject.prototype.bind(shortcut, handler);\n\t\t\t}\n\t\t};\n\n\t\tscheduler.getShortcutHandler = function(shortcut, scope){\n\t\t\tvar scopeObject = getScope(scope);\n\t\t\tif(scopeObject){\n\t\t\t\tvar commands = scheduler.$keyboardNavigation.shortcuts.parse(shortcut);\n\t\t\t\tif(commands.length){\n\t\t\t\t\treturn scopeObject.prototype.findHandler(commands[0]);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tscheduler.removeShortcut = function(shortcut, scope){\n\t\t\tvar scopeObject = getScope(scope);\n\t\t\tif(scopeObject){\n\t\t\t\tscopeObject.prototype.unbind(shortcut);\n\t\t\t}\n\t\t};\n\n\t\tscheduler.focus = function(){\n\t\t\tif(!scheduler.config.key_nav){\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar disp = scheduler.$keyboardNavigation.dispatcher;\n\t\t\tdisp.enable();\n\t\t\tvar activeNode = disp.getActiveNode();\n\t\t\tif(!activeNode || activeNode instanceof scheduler.$keyboardNavigation.MinicalButton || activeNode instanceof scheduler.$keyboardNavigation.MinicalCell){\n\t\t\t\tdisp.setDefaultNode();\n\t\t\t}else{\n\t\t\t\tdisp.focusNode(disp.getActiveNode());\n\t\t\t}\n\t\t};\n\n\t\tfunction getScope(mode){\n\t\t\tvar scopes = {\n\t\t\t\t\"minicalButton\":scheduler.$keyboardNavigation.MinicalButton,\n\t\t\t\t\"minicalDate\":scheduler.$keyboardNavigation.MinicalCell,\n\t\t\t\t\"scheduler\":scheduler.$keyboardNavigation.SchedulerNode,\n\t\t\t\t\"dataArea\": scheduler.$keyboardNavigation.DataArea,\n\t\t\t\t\"timeSlot\": scheduler.$keyboardNavigation.TimeSlot,\n\t\t\t\t\"event\": scheduler.$keyboardNavigation.Event\n\t\t\t};\n\n\t\t\tvar searchMap = {};\n\t\t\tfor(var i in scopes)\n\t\t\t\tsearchMap[i.toLowerCase()] = scopes[i];\n\n\t\t\tmode = (mode + \"\").toLowerCase();\n\n\t\t\treturn searchMap[mode] || scopes.scheduler;\n\t\t}\n\n\t\tscheduler.$keyboardNavigation = {};\n\n\t\tscheduler._compose = function(){\n\t\t\tvar parts = Array.prototype.slice.call(arguments, 0);\n\t\t\tvar res = {};\n\t\t\tfor(var i = 0; i < parts.length; i++){\n\t\t\t\tvar obj = parts[i];\n\t\t\t\tif(typeof obj == \"function\"){\n\t\t\t\t\tobj = new obj();\n\t\t\t\t}\n\n\t\t\t\tfor(var p in obj){\n\t\t\t\t\tres[p] = obj[p];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn res;\n\t\t};\n\n\t\tkeyboard_shortcuts(scheduler);\n\t\teventhandler(scheduler);\n\t\ttrap_modal_focus(scheduler);\n\t\tmarker(scheduler);\n\t\tscheduler_node(scheduler);\n\t\tnav_node(scheduler);\n\t\theader_cell(scheduler);\n\t\tevent(scheduler);\n\t\ttime_slot(scheduler);\n\t\tminical_button(scheduler);\n\t\tminical_cell(scheduler);\n\t\tdata_area(scheduler);\n\t\tmodals(scheduler);\n\t\tcore(scheduler);\n\t\tkey_nav_legacy(scheduler);\n\n\t\t(function(){\n\t\t\tscheduler_handlers(scheduler);\n\t\t\tminical_handlers(scheduler);\n\n\t\t\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\n\n\t\t\tscheduler.$keyboardNavigation.attachSchedulerHandlers();\n\n\t\t\tif(scheduler.renderCalendar){\n\t\t\t\t// if minical ext loaded before key nav ext - patch it now\n\t\t\t\tscheduler.$keyboardNavigation.patchMinicalendar();\n\t\t\t}else{\n\t\t\t\t// otherwise - wait until everything is loaded and try again\n\t\t\t\tvar attachOnce = scheduler.attachEvent(\"onSchedulerReady\", function(){\n\t\t\t\t\tscheduler.detachEvent(attachOnce);\n\t\t\t\t\tscheduler.$keyboardNavigation.patchMinicalendar();\n\t\t\t\t});\n\t\t\t}\n\n\n\n\t\t\tfunction isSchedulerSelected(){\n\t\t\t\tif(!scheduler.config.key_nav) return;\n\n\t\t\t\tvar enable;\n\t\t\t\tvar focusElement = document.activeElement;\n\t\t\t\t// halt key nav when focus is outside scheduler or in quick info popup\n\t\t\t\tif(!focusElement || scheduler.utils.dom.locateCss(focusElement, \"dhx_cal_quick_info\", false)){\n\t\t\t\t\tenable = false;\n\t\t\t\t}else{\n\t\t\t\t\tenable = scheduler.$keyboardNavigation.isChildOf(focusElement, scheduler.$container) || scheduler.$keyboardNavigation.isMinical(focusElement);\n\t\t\t\t}\n\n\t\t\t\treturn enable;\n\t\t\t}\n\n\n\n\t\t\tfunction changeState(enable){\n\t\t\t\tif(enable && !dispatcher.isEnabled()){\n\t\t\t\t\tdispatcher.enable();\n\t\t\t\t}else if(!enable && dispatcher.isEnabled()){\n\t\t\t\t\tdispatcher.disable();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst intervalId = setInterval(function(){\n\t\t\t\tif(!scheduler.$container || !scheduler.$keyboardNavigation.isChildOf(scheduler.$container, document.body)){\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar enable = isSchedulerSelected();\n\n\t\t\t\tif(enable){\n\t\t\t\t\tchangeState(enable);\n\t\t\t\t}else if(!enable && dispatcher.isEnabled()){\n\t\t\t\t\tsetTimeout(function(){\n\t\t\t\t\t\tif(scheduler.$destroyed){\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// doublecheck in case checking is done in handler before focus element is repainted\n\t\t\t\t\t\tif(scheduler.config.key_nav){\n\t\t\t\t\t\t\tchangeState(isSchedulerSelected());\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tscheduler.$container.removeAttribute(\"tabindex\");\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}, 100);\n\t\t\t\t}\n\t\t\t}, 500);\n\t\t\tscheduler.attachEvent(\"onDestroy\", function(){\n\t\t\t\tclearInterval(intervalId);\n\t\t\t});\n\t\t})();\n\t}\n\n\n","export default function(scheduler){\n\nscheduler.$keyboardNavigation.shortcuts = {\n\tcreateCommand: function(){\n\t\treturn {\n\t\t\tmodifiers:{\n\t\t\t\t\"shift\": false,\n\t\t\t\t\"alt\": false,\n\t\t\t\t\"ctrl\": false,\n\t\t\t\t\"meta\": false\n\t\t\t},\n\t\t\tkeyCode: null\n\t\t};\n\t},\n\tparse: function(shortcut){\n\t\tvar commands = [];\n\n\t\tvar expr = this.getExpressions(this.trim(shortcut));\n\t\tfor(var i = 0; i < expr.length; i++){\n\t\t\tvar words = this.getWords(expr[i]);\n\n\t\t\tvar command = this.createCommand();\n\n\t\t\tfor(var j = 0; j < words.length; j++){\n\t\t\t\tif(this.commandKeys[words[j]]){\n\t\t\t\t\tcommand.modifiers[words[j]] = true;\n\t\t\t\t}else if(this.specialKeys[words[j]]){\n\t\t\t\t\tcommand.keyCode = this.specialKeys[words[j]];\n\t\t\t\t}else{\n\t\t\t\t\tcommand.keyCode = words[j].charCodeAt(0);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcommands.push(command);\n\t\t}\n\t\treturn commands;\n\t},\n\n\tgetCommandFromEvent: function(domEvent){\n\t\tvar command = this.createCommand();\n\t\tcommand.modifiers.shift = !!domEvent.shiftKey;\n\t\tcommand.modifiers.alt = !!domEvent.altKey;\n\t\tcommand.modifiers.ctrl = !!domEvent.ctrlKey;\n\t\tcommand.modifiers.meta = !!domEvent.metaKey;\n\t\tcommand.keyCode = domEvent.which || domEvent.keyCode;\n\n\t\tif(command.keyCode >= 96 && command.keyCode <= 105){\n\t\t\t// numpad keys 96-105 -> 48-57\n\t\t\tcommand.keyCode -= 48;//convert numpad number code to regular number code\n\t\t}\n\n\t\tvar printableKey = String.fromCharCode(command.keyCode );\n\t\tif(printableKey){\n\t\t\tcommand.keyCode = printableKey.toLowerCase().charCodeAt(0);\n\t\t}\n\t\treturn command;\n\t},\n\n\tgetHashFromEvent: function(domEvent){\n\t\treturn this.getHash(this.getCommandFromEvent(domEvent));\n\t},\n\n\tgetHash: function(command){\n\t\tvar parts = [];\n\t\tfor(var i in command.modifiers){\n\t\t\tif(command.modifiers[i]){\n\t\t\t\tparts.push(i);\n\t\t\t}\n\t\t}\n\t\tparts.push(command.keyCode);\n\n\t\treturn parts.join(this.junctionChar);\n\t},\n\n\tgetExpressions: function(shortcut){\n\t\treturn shortcut.split(this.junctionChar);\n\t},\n\tgetWords: function(term){\n\t\treturn term.split(this.combinationChar);\n\t},\n\ttrim: function(shortcut){\n\t\treturn shortcut.replace(/\\s/g, \"\");\n\t},\n\tjunctionChar:\",\",\n\tcombinationChar:\"+\",\n\tcommandKeys:{\n\t\t\"shift\": 16,\n\t\t\"alt\": 18,\n\t\t\"ctrl\": 17,\n\t\t\"meta\": true\n\t},\n\tspecialKeys:{\n\t\t\"backspace\": 8,\n\t\t\"tab\": 9,\n\t\t\"enter\": 13,\n\t\t\"esc\": 27,\n\t\t\"space\": 32,\n\t\t\"up\": 38,\n\t\t\"down\": 40,\n\t\t\"left\": 37,\n\t\t\"right\": 39,\n\t\t\"home\": 36,\n\t\t\"end\": 35,\n\t\t\"pageup\": 33,\n\t\t\"pagedown\": 34,\n\t\t\"delete\": 46,\n\t\t\"insert\": 45,\n\t\t\"plus\":107,\n\t\t\"f1\": 112,\n\t\t\"f2\": 113,\n\t\t\"f3\": 114,\n\t\t\"f4\": 115,\n\t\t\"f5\": 116,\n\t\t\"f6\": 117,\n\t\t\"f7\": 118,\n\t\t\"f8\": 119,\n\t\t\"f9\": 120,\n\t\t\"f10\": 121,\n\t\t\"f11\": 122,\n\t\t\"f12\": 123\n\t}\n};\n\n}","export default function(scheduler){\n\nscheduler.$keyboardNavigation.EventHandler = {\n\t_handlers: null,\n\tfindHandler: function(command){\n\t\tif(!this._handlers) this._handlers = {};\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\n\t\tvar hash = shortcuts.getHash(command);\n\n\t\treturn this._handlers[hash];\n\t},\n\n\tdoAction: function(command, e){\n\t\tvar handler = this.findHandler(command);\n\t\tif(handler){\n\t\t\thandler.call(this, e);\n\n\t\t\tif (e.preventDefault) e.preventDefault();\n\t\t\telse e.returnValue = false;\n\n\t\t}\n\t},\n\tbind: function(shortcut, handler){\n\t\tif(!this._handlers) this._handlers = {};\n\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\n\n\t\tvar commands = shortcuts.parse(shortcut);\n\t\tfor(var i = 0; i < commands.length; i++){\n\t\t\tthis._handlers[shortcuts.getHash(commands[i])] = handler;\n\t\t}\n\t},\n\tunbind: function(shortcut){\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\n\n\t\tvar commands = shortcuts.parse(shortcut);\n\t\tfor(var i = 0; i < commands.length; i++){\n\t\t\tif(this._handlers[shortcuts.getHash(commands[i])]){\n\t\t\t\tdelete this._handlers[shortcuts.getHash(commands[i])];\n\t\t\t}\n\t\t}\n\t},\n\n\tbindAll: function(map){\n\t\tfor(var i in map){\n\t\t\tthis.bind(i, map[i]);\n\t\t}\n\t},\n\tinitKeys: function(){\n\t\tif(!this._handlers)\n\t\t\tthis._handlers = {};\n\t\tif(this.keys){\n\t\t\tthis.bindAll(this.keys);\n\t\t}\n\t}\n};\n\n}","export default function(scheduler){\n\n(function(){\n\tscheduler.$keyboardNavigation.getFocusableNodes = scheduler._getFocusableNodes;\n\n\tscheduler.$keyboardNavigation.trapFocus = function trapFocus(root, e){\n\t\tif(e.keyCode != 9) return false;\n\n\t\tvar focusable = scheduler.$keyboardNavigation.getFocusableNodes(root);\n\t\tvar currentFocus = document.activeElement;\n\t\tvar currentIndex = -1;\n\t\tfor(var i = 0; i < focusable.length; i++){\n\t\t\tif(focusable[i] == currentFocus){\n\t\t\t\tcurrentIndex = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tvar nextIndex, nextItem;\n\t\tif(e.shiftKey){\n\n\t\t\t// back tab\n\t\t\t// go to the last element if we focused on the first\n\t\t\tnextIndex = (currentIndex <= 0) ? (focusable.length - 1) : (currentIndex - 1);\n\n\t\t\tnextItem = focusable[nextIndex];\n\t\t\tif(nextItem){\n\t\t\t\tnextItem.focus();\n\t\t\t\te.preventDefault();\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t}else{\n\t\t\t// forward tab\n\t\t\t// forward tab from last element should go back to the first element\n\t\t\tnextIndex = (currentIndex >= focusable.length - 1) ? 0 : (currentIndex + 1);\n\t\t\tnextItem = focusable[nextIndex];\n\t\t\tif(nextItem){\n\t\t\t\tnextItem.focus();\n\t\t\t\te.preventDefault();\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t}\n\n\t\treturn false;\n\t};\n})();\n\n}","export default function(scheduler){\n\nscheduler.$keyboardNavigation.marker = {\n\tclear: function(){\n\t\tvar divs = scheduler.$container.querySelectorAll(\".dhx_focus_slot\");\n\t\tfor(var i = 0; i < divs.length; i++){\n\t\t\tdivs[i].parentNode.removeChild(divs[i]);\n\t\t}\n\t},\n\tcreateElement: function(){\n\t\tvar element = document.createElement(\"div\");\n\t\telement.setAttribute(\"tabindex\", -1);\n\t\telement.className = \"dhx_focus_slot\";\n\t\treturn element;\n\t},\n\n\trenderMultiple: function(start, end, method){\n\t\tvar divs = [];\n\t\tvar currentStart = new Date(start);\n\t\tvar currentEnd = new Date(Math.min(end.valueOf(), scheduler.date.add(scheduler.date.day_start(new Date(start)), 1, \"day\").valueOf()));\n\t\twhile(currentStart.valueOf() < end.valueOf()){\n\n\t\t\tdivs = divs.concat(method.call(this, currentStart, new Date(Math.min(currentEnd.valueOf(), end.valueOf()))));\n\t\t\tcurrentStart = scheduler.date.day_start(scheduler.date.add(currentStart, 1, \"day\"));\n\n\t\t\tcurrentEnd = scheduler.date.day_start(scheduler.date.add(currentStart, 1, \"day\"));\n\t\t\tcurrentEnd = new Date(Math.min(currentEnd.valueOf(), end.valueOf()));\n\t\t}\n\n\t\treturn divs;\n\t},\n\n\n\trender: function(start, end, section){\n\t\tthis.clear();\n\t\tvar divs = [];\n\n\t\tvar modes = scheduler.$keyboardNavigation.TimeSlot.prototype._modes;\n\t\tvar view = scheduler.$keyboardNavigation.TimeSlot.prototype._getMode();\n\t\tswitch (view){\n\t\t\tcase modes.units:\n\t\t\t\tdivs = this.renderVerticalMarker(start, end, section);\n\t\t\t\tbreak;\n\t\t\tcase modes.timeline:\n\t\t\t\tdivs = this.renderTimelineMarker(start, end, section);\n\t\t\t\tbreak;\n\t\t\tcase modes.year:\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderYearMarker));\n\t\t\t\tbreak;\n\t\t\tcase modes.month:\n\t\t\t\tdivs = this.renderMonthMarker(start, end);\n\t\t\t\tbreak;\n\t\t\tcase modes.weekAgenda:\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderWeekAgendaMarker));\n\t\t\t\tbreak;\n\t\t\tcase modes.list:\n\t\t\t\tdivs = this.renderAgendaMarker(start, end);\n\t\t\t\tbreak;\n\t\t\tcase modes.dayColumns:\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderVerticalMarker));\n\t\t\t\tbreak;\n\t\t}\n\n\t\tthis.addWaiAriaLabel(divs, start, end, section);\n\t\tthis.addDataAttributes(divs, start, end, section);\n\n\t\tfor(var i = divs.length - 1; i >= 0; i--){\n\t\t\tif(divs[i].offsetWidth){\n\t\t\t\treturn divs[i];\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t},\n\n\taddDataAttributes: function(divs, start, end, section){\n\t\tvar dateToStr = scheduler.date.date_to_str(scheduler.config.api_date);\n\n\t\tvar from = dateToStr(start),\n\t\t\tto = dateToStr(end);\n\n\t\tfor(var i = 0; i < divs.length; i++){\n\t\t\tdivs[i].setAttribute(\"data-start-date\", from);\n\t\t\tdivs[i].setAttribute(\"data-end-date\", to);\n\t\t\tif(section){\n\t\t\t\tdivs[i].setAttribute(\"data-section\", section);\n\t\t\t}\n\t\t}\n\t},\n\n\taddWaiAriaLabel: function(divs, start, end, section){\n\t\tvar label = \"\";\n\t\tvar state = scheduler.getState();\n\t\tvar mode = state.mode;\n\n\t\tvar dateTimeLabel = false;\n\n\t\tlabel += scheduler.templates.day_date(start);\n\n\t\tif((scheduler.date.day_start(new Date(start)).valueOf() != start.valueOf())){\n\t\t\tlabel += \" \" + scheduler.templates.hour_scale(start);\n\t\t\tdateTimeLabel = true;\n\t\t}\n\n\t\tif((scheduler.date.day_start(new Date(start)).valueOf() != scheduler.date.day_start(new Date(end)).valueOf())){\n\n\t\t\tlabel += \" - \" + scheduler.templates.day_date(end);\n\t\t\tif(dateTimeLabel || (scheduler.date.day_start(new Date(end)).valueOf() != end.valueOf())){\n\t\t\t\tlabel += \" \" + scheduler.templates.hour_scale(end);\n\t\t\t}\n\t\t}\n\n\t\tif(section){\n\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\n\t\t\t\tconst timeline = scheduler.matrix[mode];\n\t\t\t\tconst sectionObject = timeline.y_unit[timeline.order[section]];\n\t\t\t\tlabel += \", \" + scheduler.templates[mode + \"_scale_label\"](sectionObject.key, sectionObject.label, sectionObject);\n\t\t\t}else if(scheduler._props && scheduler._props[mode]){\n\t\t\t\tconst units = scheduler._props[mode];\n\t\t\t\tconst sectionObject = units.options[units.order[section]];\n\n\t\t\t\tlabel += \", \" + scheduler.templates[mode + \"_scale_text\"](sectionObject.key, sectionObject.label, sectionObject);\n\t\t\t}\n\t\t}\n\n\n\t\tfor(var i = 0; i < divs.length; i++){\n\t\t\tscheduler._waiAria.setAttributes(divs[i], {\n\t\t\t\t\"aria-label\": label,\n\t\t\t\t\"aria-live\": \"polite\"\n\t\t\t});\n\t\t}\n\t},\n\n\trenderWeekAgendaMarker: function(start_date, end_date){\n\t\tvar divs = scheduler.$container.querySelectorAll(\".dhx_wa_day_cont .dhx_wa_scale_bar\");\n\n\t\tvar currDate = scheduler.date.week_start(new Date(scheduler.getState().min_date));\n\n\t\tvar index = -1;\n\t\tvar markerDate = scheduler.date.day_start(new Date(start_date));\n\t\tfor(var i = 0; i < divs.length; i++){\n\t\t\tindex++;\n\t\t\tif(scheduler.date.day_start(new Date(currDate)).valueOf() == markerDate.valueOf()){\n\t\t\t\tbreak;\n\t\t\t}else{\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\n\t\t\t}\n\t\t}\n\t\tif(index != -1) return this._wrapDiv(divs[index]);\n\t\treturn [];\n\t},\n\n\t_wrapDiv: function(cell){\n\t\tvar marker = this.createElement();\n\t\tmarker.style.top = cell.offsetTop + \"px\";\n\t\tmarker.style.left = cell.offsetLeft + \"px\";\n\t\tmarker.style.width = cell.offsetWidth + \"px\";\n\t\tmarker.style.height = cell.offsetHeight + \"px\";\n\t\tcell.appendChild(marker);\n\t\treturn [marker];\n\t},\n\trenderYearMarker: function(start_date, end_date){\n\t\tvar cell = scheduler._get_year_cell(start_date);\n\t\tcell.style.position = \"relative\";\n\t\tvar marker = this.createElement();\n\t\tmarker.style.top = \"0px\";\n\t\tmarker.style.left = \"0px\";\n\t\tmarker.style.width = \"100%\";\n\t\tmarker.style.height = \"100%\";\n\t\tcell.appendChild(marker);\n\t\treturn [marker];\n\t},\n\n\trenderAgendaMarker: function(start_date, end_date){\n\t\tvar block = this.createElement();\n\t\tblock.style.height = \"1px\";\n\t\tblock.style.width = \"100%\";\n\t\tblock.style.opacity = 1;\n\t\tblock.style.top = \"0px\";\n\t\tblock.style.left = \"0px\";\n\t\tscheduler.$container.querySelector(\".dhx_cal_data\").appendChild(block);\n\t\treturn [block];\n\t},\n\n\trenderTimelineMarker: function(start_date, end_date, section){\n\t\tvar view_opts = scheduler._lame_copy({}, scheduler.matrix[scheduler._mode]);\n\t\tvar areas = view_opts._scales;\n\t\t//timespans must always use actual position, not rounded\n\t\tview_opts.round_position = false;\n\t\tvar blocks = [];\n\n\t\tvar min_date = start_date ? new Date(start_date) : scheduler._min_date;\n\t\tvar max_date = end_date ? new Date(end_date) : scheduler._max_date;\n\n\t\tif(min_date.valueOf() < scheduler._min_date.valueOf())\n\t\t\tmin_date = new Date(scheduler._min_date);\n\t\tif(max_date.valueOf() > scheduler._max_date.valueOf())\n\t\t\tmax_date = new Date(scheduler._max_date);\n\n\t\tif(!view_opts._trace_x) return blocks;\n\n\t\tfor(var i = 0; i < view_opts._trace_x.length; i++){\n\t\t\tif(scheduler._is_column_visible(view_opts._trace_x[i]))\n\t\t\t\tbreak;\n\t\t}\n\t\tif(i == view_opts._trace_x.length)\n\t\t\treturn blocks;\n\n\t\tvar area = areas[section];\n\n\t\tif (!(min_date < end_date && max_date > start_date))\n\t\t\treturn blocks;\n\n\t\tvar block = this.createElement();\n\n\t\tlet start_pos;\n\t\tlet end_pos;\n\n\t\tfunction set_date_part(source, target) {\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\n\t\t\ttarget.setDate(1);\n\n\t\t\ttarget.setFullYear(source.getFullYear());\n\t\t\ttarget.setMonth(source.getMonth());\n\t\t\ttarget.setDate(source.getDate());\n\t\t}\n\n\t\tif(!scheduler.getView().days){\n\t\t\tstart_pos = scheduler._timeline_getX({start_date: start_date}, false, view_opts);\n\t\t\tend_pos = scheduler._timeline_getX({start_date: end_date}, false, view_opts);\n\t\t}else{\n\t\t\t// daytimeline\n\t\t\tconst tempStart = new Date(start_date);\n\t\t\tset_date_part(scheduler._min_date, tempStart);\n\t\t\tconst tempEnd = new Date(end_date);\n\t\t\tset_date_part(scheduler._min_date, tempEnd);\n\t\t\tstart_pos = scheduler._timeline_getX({start_date: tempStart}, false, view_opts);\n\t\t\tend_pos = scheduler._timeline_getX({start_date: tempEnd}, false, view_opts);\n\t\t}\n\n\t\tvar height = ((view_opts._section_height[section]-1) || (view_opts.dy - 1));\n\n\t\tvar top = 0;\n\t\tif (scheduler._isRender('cell')){\n\t\t\ttop = area.offsetTop;\n\t\t\tstart_pos += view_opts.dx;\n\t\t\tend_pos += view_opts.dx;\n\t\t\tarea = scheduler.$container.querySelector(\".dhx_cal_data\");\n\t\t}else{\n\n\t\t}\n\t\tvar width = Math.max(1, end_pos - start_pos - 1);\n\t\tlet direction = \"left\";\n\t\tif(scheduler.config.rtl){\n\t\t\tdirection = \"right\";\n\t\t}\n\t\tblock.style.cssText = `height:${height}px; ${direction}:${start_pos}px; width:${width}px; top:${top}px;`;\n\n\t\tif(area){\n\t\t\tarea.appendChild(block);\n\t\t\tblocks.push(block);\n\t\t}\n\n\t\treturn blocks;\n\t},\n\n\trenderMonthCell: function(date){\n\t\tvar cells = scheduler.$container.querySelectorAll(\".dhx_month_head\");\n\n\t\tvar divs = [];\n\t\tfor(var i = 0; i < cells.length; i++){\n\t\t\tdivs.push(cells[i].parentNode);\n\t\t}\n\n\t\tvar firstDate = scheduler.date.week_start(new Date(scheduler.getState().min_date));\n\n\t\tvar index = -1;\n\t\tvar weekNumber = 0;\n\t\tvar dayIndex = -1;\n\t\tvar currDate = firstDate;\n\t\tvar markerDate = scheduler.date.day_start(new Date(date));\n\t\tfor(var i = 0; i < divs.length; i++){\n\t\t\tindex++;\n\n\t\t\tif(dayIndex == 6){\n\t\t\t\tweekNumber++;\n\t\t\t\tdayIndex = 0;\n\t\t\t}else{\n\t\t\t\tdayIndex++;\n\t\t\t}\n\n\t\t\tif(scheduler.date.day_start(new Date(currDate)).valueOf() == markerDate.valueOf()){\n\t\t\t\tbreak;\n\t\t\t}else{\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\n\t\t\t}\n\t\t}\n\n\t\tif(index == -1){\n\t\t\treturn [];\n\t\t}\n\n\t\tvar left = scheduler._colsS[dayIndex];\n\t\tvar top = scheduler._colsS.heights[weekNumber];\n\n\t\tvar div = this.createElement();\n\t\tdiv.style.top = top + \"px\";\n\t\tdiv.style.left = left + \"px\";\n\t\tdiv.style.width = scheduler._cols[dayIndex] + \"px\";\n\t\tdiv.style.height = ((scheduler._colsS.heights[weekNumber + 1] - top) || scheduler._colsS.height) + \"px\" ;\n\n\n\t\tvar container = scheduler.$container.querySelector(\".dhx_cal_data\");\n\n\t\tvar datatable = container.querySelector(\"table\");\n\t\tif(datatable.nextSibling){\n\t\t\tcontainer.insertBefore(div, datatable.nextSibling);\n\t\t}else{\n\t\t\tcontainer.appendChild(div);\n\t\t}\n\t\treturn div;\n\t},\n\trenderMonthMarker: function(start_date, end_date){\n\t\tvar res = [];\n\t\tvar currentDate = start_date;\n\t\twhile(currentDate.valueOf() < end_date.valueOf()){\n\t\t\tres.push(this.renderMonthCell(currentDate));\n\t\t\tcurrentDate = scheduler.date.add(currentDate, 1, \"day\");\n\t\t}\n\t\treturn res;\n\t},\n\n\trenderVerticalMarker: function(start_date, end_date, section){\n\t\tvar index = scheduler.locate_holder_day(start_date);\n\n\t\tvar divs = [];\n\t\tvar area = null;\n\n\t\tvar c = scheduler.config;\n\t\tif(scheduler._ignores[index]) return divs;\n\n\t\tif (scheduler._props && scheduler._props[scheduler._mode] && section) {\n\t\t\tvar view = scheduler._props[scheduler._mode];\n\t\t\tindex = view.order[section];\n\n\t\t\tvar inner_index = view.order[section];\n\t\t\tif(!(view.days > 1)){\n\t\t\t\tindex = inner_index;\n\t\t\t\tif (view.size && (index > view.position+view.size)) {\n\t\t\t\t\tindex = 0;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t//var units_l = view.size || view.options.length;\n\n\t\t\t\tindex = scheduler.locate_holder_day(start_date) + inner_index;\n\t\t\t\t//index = index*units_l + inner_index;\n\t\t\t}\n\t\t}\n\t\tarea = scheduler.locate_holder(index);\n\t\tif(!area || area.querySelector(\".dhx_scale_hour\")){\n\t\t\t// hour scale instead of date column\n\t\t\treturn document.createElement(\"div\");\n\t\t}\n\n\t\tvar start = Math.max((start_date.getHours()*60 + start_date.getMinutes()), c.first_hour*60);\n\n\n\t\tvar end = Math.min((end_date.getHours()*60 + end_date.getMinutes()), c.last_hour*60);\n\t\tif(!end && (scheduler.date.day_start(new Date(end_date)).valueOf() > scheduler.date.day_start(new Date(start_date)).valueOf())){\n\t\t\tend = c.last_hour*60;\n\t\t}\n\n\t\tif (end <= start) {\n\t\t\treturn [];\n\t\t}\n\n\t\tvar block = this.createElement();\n\n\t\t// +1 for working with section which really takes up whole height (as % would be == 0)\n\t\tvar all_hours_height = scheduler.config.hour_size_px*c.last_hour + 1;\n\t\tvar hour_ms = 60*60*1000;\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\";\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\";\n\t\tblock.style.width = \"100%\";\n\t\tarea.appendChild(block);\n\t\tdivs.push(block);\n\t\treturn divs[0];\n\n\t}\n};\n\n}","export default function(scheduler){\n\nscheduler.$keyboardNavigation.SchedulerNode = function(){};\n\nscheduler.$keyboardNavigation.SchedulerNode.prototype = scheduler._compose(\n\tscheduler.$keyboardNavigation.EventHandler,\n\t{\n\t\tgetDefaultNode: function(){\n\t\t\tvar node = new scheduler.$keyboardNavigation.TimeSlot();\n\n\t\t\tif(!node.isValid()){\n\t\t\t\tnode = node.fallback();\n\t\t\t}\n\t\t\treturn node;\n\t\t},\n\n\t\t_modes:{\n\t\t\tmonth: \"month\",\n\t\t\tyear: \"year\",\n\t\t\tdayColumns: \"dayColumns\",\n\t\t\ttimeline:\"timeline\",\n\t\t\tunits:\"units\",\n\t\t\tweekAgenda: \"weekAgenda\",\n\t\t\tlist: \"list\"\n\t\t},\n\t\tgetMode: function(){\n\t\t\tvar state = scheduler.getState();\n\n\t\t\tvar mode = state.mode;\n\t\t\tif((scheduler.matrix && scheduler.matrix[mode])){\n\t\t\t\treturn this._modes.timeline;\n\t\t\t} else if((scheduler._props && scheduler._props[mode])){\n\t\t\t\treturn this._modes.units;\n\t\t\t}else if(mode == \"month\"){\n\t\t\t\treturn this._modes.month;\n\t\t\t}else if(mode == \"year\"){\n\t\t\t\treturn this._modes.year;\n\t\t\t}else if(mode == \"week_agenda\"){\n\t\t\t\treturn this._modes.weekAgenda;\n\t\t\t}else if(mode == \"map\" || mode == \"agenda\" || (scheduler._grid && scheduler[\"grid_\" + mode])){\n\t\t\t\treturn this._modes.list;\n\t\t\t}else{\n\t\t\t\treturn this._modes.dayColumns;\n\t\t\t}\n\t\t},\n\n\t\tfocus: function(){\n\t\t\tscheduler.focus();\n\t\t},\n\n\t\tblur: function(){\n\n\t\t},\n\n\t\tdisable: function(){\n\t\t\tscheduler.$container.setAttribute(\"tabindex\", \"0\");\n\t\t},\n\t\tenable: function(){\n\t\t\tif(scheduler.$container)\n\t\t\t\tscheduler.$container.removeAttribute(\"tabindex\");\n\t\t},\n\t\tisEnabled: function(){\n\t\t\treturn scheduler.$container.hasAttribute(\"tabindex\");\n\t\t},\n\n\n\t\t_compareEvents: function(a, b){\n\t\t\tif (a.start_date.valueOf() == b.start_date.valueOf())\n\t\t\t\treturn a.id > b.id ? 1 : -1;\n\t\t\treturn a.start_date.valueOf() > b.start_date.valueOf() ? 1 : -1;\n\t\t},\n\n\t\t_pickEvent: function(from, to, startId, reverse){\n\t\t\tvar range = scheduler.getState();\n\t\t\tfrom = new Date(Math.max(range.min_date.valueOf(), from.valueOf()));\n\t\t\tto = new Date(Math.min(range.max_date.valueOf(), to.valueOf()));\n\n\t\t\tvar evs = scheduler.getEvents(from, to);\n\t\t\tevs.sort(this._compareEvents);\n\t\t\tif(reverse){\n\t\t\t\tevs = evs.reverse();\n\t\t\t}\n\n\t\t\tvar trim = !!startId;\n\t\t\tfor(var i =0; i < evs.length && trim; i++){\n\t\t\t\tif(evs[i].id == startId){\n\t\t\t\t\ttrim = false;\n\t\t\t\t}\n\t\t\t\tevs.splice(i, 1);\n\t\t\t\ti--;\n\t\t\t}\n\n\t\t\tfor(var i = 0; i < evs.length; i++){\n\t\t\t\tvar eventElement = new scheduler.$keyboardNavigation.Event(evs[i].id);\n\t\t\t\tif(eventElement.getNode())\n\t\t\t\t\treturn evs[i];\n\t\t\t}\n\n\t\t\treturn null;\n\t\t},\n\n\t\tnextEventHandler: function(id){\n\t\t\tvar activeNode = scheduler.$keyboardNavigation.dispatcher.activeNode;\n\n\t\t\tvar startId = id || (activeNode && activeNode.eventId);\n\n\t\t\tvar nextEvent = null;\n\t\t\tif(startId && scheduler.getEvent(startId)){\n\t\t\t\tvar currEvent = scheduler.getEvent(startId);\n\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\n\t\t\t\t\tcurrEvent.start_date,\n\t\t\t\t\tscheduler.date.add(currEvent.start_date, 1, \"year\"),\n\t\t\t\t\tcurrEvent.id,\n\t\t\t\t\tfalse\n\t\t\t\t);\n\n\t\t\t}\n\t\t\tif(!nextEvent && !id){\n\t\t\t\tvar visibleDates = scheduler.getState();\n\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\n\t\t\t\t\tvisibleDates.min_date,\n\t\t\t\t\tscheduler.date.add(visibleDates.min_date, 1, \"year\"),\n\t\t\t\t\tnull,\n\t\t\t\t\tfalse\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif(nextEvent){\n\n\t\t\t\tvar nextEv = new scheduler.$keyboardNavigation.Event(nextEvent.id);\n\t\t\t\tif(!nextEv.isValid()){// not visible event\n\t\t\t\t\tthis.nextEventHandler(nextEvent.id);\n\t\t\t\t}else{\n\t\t\t\t\tif(activeNode){activeNode.blur();}\n\t\t\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(nextEv);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tprevEventHandler: function(id){\n\t\t\tvar activeNode = scheduler.$keyboardNavigation.dispatcher.activeNode;\n\n\t\t\tvar startId = id || (activeNode && activeNode.eventId);\n\n\t\t\tvar nextEvent = null;\n\t\t\tif(startId && scheduler.getEvent(startId)){\n\t\t\t\tvar currEvent = scheduler.getEvent(startId);\n\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\n\t\t\t\t\tscheduler.date.add(currEvent.end_date, -1, \"year\"),\n\t\t\t\t\tcurrEvent.end_date,\n\t\t\t\t\tcurrEvent.id,\n\t\t\t\t\ttrue\n\t\t\t\t);\n\t\t\t}\n\t\t\tif(!nextEvent && !id){\n\t\t\t\tvar visibleDates = scheduler.getState();\n\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\n\t\t\t\t\tscheduler.date.add(visibleDates.max_date, -1, \"year\"),\n\t\t\t\t\tvisibleDates.max_date,\n\t\t\t\t\tnull,\n\t\t\t\t\ttrue\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif(nextEvent){\n\t\t\t\tvar nextEv = new scheduler.$keyboardNavigation.Event(nextEvent.id);\n\t\t\t\tif(!nextEv.isValid()){// not visible event\n\t\t\t\t\tthis.prevEventHandler(nextEvent.id);\n\t\t\t\t}else{\n\t\t\t\t\tif(activeNode){activeNode.blur();}\n\t\t\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(nextEv);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tkeys: {\n\n\t\t\t\"alt+1, alt+2, alt+3, alt+4, alt+5, alt+6, alt+7, alt+8, alt+9\": function(e){\n\t\t\t\tvar tabs = scheduler.$keyboardNavigation.HeaderCell.prototype.getNodes(\".dhx_cal_navline .dhx_cal_tab\");\n\t\t\t\tvar key = e.key;\n\t\t\t\tif(key === undefined){\n\t\t\t\t\tkey = e.keyCode - 48;\n\t\t\t\t}\n\t\t\t\tif(tabs[key*1 - 1]){\n\t\t\t\t\ttabs[key*1 - 1].click();\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t\"ctrl+left,meta+left\": function(e){\n\t\t\t\tscheduler._click.dhx_cal_prev_button();\n\t\t\t},\n\t\t\t\"ctrl+right,meta+right\": function(e){\n\t\t\t\tscheduler._click.dhx_cal_next_button();\n\t\t\t},\n\t\t\t\"ctrl+up,meta+up\":function(e){\n\t\t\t\tvar dataArea = scheduler.$container.querySelector(\".dhx_cal_data\");\n\t\t\t\tdataArea.scrollTop -= 20;\n\t\t\t},\n\t\t\t\"ctrl+down,meta+down\": function(e){\n\t\t\t\tvar dataArea = scheduler.$container.querySelector(\".dhx_cal_data\");\n\t\t\t\tdataArea.scrollTop += 20;\n\t\t\t},\n\n\n\t\t\t\"e\": function(){\n\t\t\t\tthis.nextEventHandler();\n\t\t\t},\n\n\t\t\t\"home\": function(){\n\t\t\t\tscheduler.setCurrentView(new Date());\n\t\t\t},\n\n\t\t\t\"shift+e\": function(){\n\t\t\t\tthis.prevEventHandler();\n\t\t\t},\n\n\t\t\t\"ctrl+enter,meta+enter\": function(){\n\t\t\t\tscheduler.addEventNow({start_date: new Date(scheduler.getState().date)});\n\t\t\t},\n\n\t\t\t\"ctrl+c,meta+c\": function(e){\n\t\t\t\tscheduler._key_nav_copy_paste(e);\n\t\t\t},\n\t\t\t\"ctrl+v,meta+v\": function(e){\n\t\t\t\tscheduler._key_nav_copy_paste(e);\n\t\t\t},\n\t\t\t\"ctrl+x,meta+x\": function(e){\n\t\t\t\tscheduler._key_nav_copy_paste(e);\n\t\t\t}\n\n\t\t}\n\t}\n);\n\nscheduler.$keyboardNavigation.SchedulerNode.prototype.bindAll(scheduler.$keyboardNavigation.SchedulerNode.prototype.keys);\n\n}","export default function(scheduler){\n\nscheduler.$keyboardNavigation.KeyNavNode = function(){};\n\nscheduler.$keyboardNavigation.KeyNavNode.prototype = scheduler._compose(\n\tscheduler.$keyboardNavigation.EventHandler,\n\t{\n\t\tisValid: function(){\n\t\t\treturn true;\n\t\t},\n\t\tfallback: function(){\n\t\t\treturn null;\n\t\t},\n\n\t\tmoveTo: function (element) {\n\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(element);\n\t\t},\n\n\t\tcompareTo: function(b){\n\t\t\t// good enough comparison of two random objects\n\t\t\tif(!b) return false;\n\t\t\tfor(var i in this){\n\t\t\t\tif(!!this[i] != !!b[i]) return false;\n\n\t\t\t\tvar canStringifyThis = !!(this[i] && this[i].toString);\n\t\t\t\tvar canStringifyThat = !!(b[i] && b[i].toString);\n\t\t\t\tif(canStringifyThat != canStringifyThis) return false;\n\t\t\t\tif(!(canStringifyThat && canStringifyThis)) {\n\t\t\t\t\tif(b[i] != this[i]) return false;\n\t\t\t\t}else{\n\t\t\t\t\tif(b[i].toString() != this[i].toString())\n\t\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\n\t\tgetNode: function(){},\n\t\tfocus: function(){\n\t\t\tvar node = this.getNode();\n\t\t\tif(node){\n\t\t\t\tnode.setAttribute(\"tabindex\", \"-1\");\n\t\t\t\t//node.className += \" scheduler_focused\";\n\t\t\t\tif(node.focus) node.focus();\n\t\t\t}\n\n\t\t},\n\t\tblur: function(){\n\t\t\tvar node = this.getNode();\n\t\t\tif(node){\n\t\t\t\tnode.setAttribute(\"tabindex\", \"-1\");\n\t\t\t\t//node.className = (node.className || \"\").replace(/ ?scheduler_focused/g, \"\");\n\t\t\t}\n\t\t}\n\t}\n\n);\n\n}","export default function(scheduler){\n\nscheduler.$keyboardNavigation.HeaderCell = function(index){\n\tthis.index = index || 0;\n};\n\nscheduler.$keyboardNavigation.HeaderCell.prototype = scheduler._compose(\n\tscheduler.$keyboardNavigation.KeyNavNode,\n\t{\n\t\tgetNode: function(index){\n\t\t\tindex = index || this.index || 0;\n\t\t\tvar nodes = this.getNodes();\n\t\t\tif(nodes[index]) return nodes[index];\n\t\t},\n\n\t\tgetNodes: function(selector){\n\t\t\tselector = selector || [\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_prev_button\",\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_next_button\",\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_today_button\",\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_tab\"\n\t\t\t\t].join(\", \");\n\n\t\t\tvar nodes = Array.prototype.slice.call(scheduler.$container.querySelectorAll(selector));\n\t\t\tnodes.sort(function(a, b){\n\t\t\t\treturn a.offsetLeft - b.offsetLeft;\n\t\t\t});\n\t\t\treturn nodes;\n\t\t},\n\n\t\t_handlers:null,\n\n\t\tisValid: function(){\n\t\t\treturn !!this.getNode(this.index);\n\t\t},\n\t\tfallback:function(){\n\t\t\tvar defaultCell = this.getNode(0);\n\t\t\tif(!defaultCell){\n\t\t\t\tdefaultCell = new scheduler.$keyboardNavigation.TimeSlot();\n\t\t\t}\n\t\t\treturn defaultCell;\n\t\t},\n\n\t\tkeys: {\n\t\t\t\"left\": function(){\n\t\t\t\tvar newIndex = this.index - 1;\n\t\t\t\tif(newIndex < 0){\n\t\t\t\t\tnewIndex = this.getNodes().length - 1;\n\t\t\t\t}\n\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.HeaderCell(newIndex));\n\n\t\t\t},\n\t\t\t\"right\": function () {\n\t\t\t\tvar newIndex = this.index + 1;\n\t\t\t\tif(newIndex >= this.getNodes().length){\n\t\t\t\t\tnewIndex = 0;\n\t\t\t\t}\n\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.HeaderCell(newIndex));\n\t\t\t},\n\t\t\t\"down\": function () {\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\n\t\t\t},\n\n\t\t\t\"enter\": function(){\n\t\t\t\tvar node = this.getNode();\n\t\t\t\tif(node){\n\t\t\t\t\tnode.click();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n);\n\nscheduler.$keyboardNavigation.HeaderCell.prototype.bindAll(scheduler.$keyboardNavigation.HeaderCell.prototype.keys);\n\n}","export default function(scheduler){\n\nscheduler.$keyboardNavigation.Event = function(id){\n\tthis.eventId = null;\n\tif(scheduler.getEvent(id)){\n\t\tvar ev = scheduler.getEvent(id);\n\t\tthis.start = new Date(ev.start_date);\n\t\tthis.end = new Date(ev.end_date);\n\n\t\tthis.section = this._getSection(ev);\n\t\tthis.eventId = id;\n\t}\n};\n\nscheduler.$keyboardNavigation.Event.prototype = scheduler._compose(\n\tscheduler.$keyboardNavigation.KeyNavNode,\n\t{\n\t\t_getNodes: function(){\n\t\t\treturn Array.prototype.slice.call(scheduler.$container.querySelectorAll(\"[\"+scheduler.config.event_attribute+\"]\"));\n\t\t},\n\n\t\t_modes: scheduler.$keyboardNavigation.SchedulerNode.prototype._modes,\n\n\t\tgetMode: scheduler.$keyboardNavigation.SchedulerNode.prototype.getMode,\n\n\t\t_handlers: null,\n\t\tisValid: function(){\n\t\t\treturn !!(scheduler.getEvent(this.eventId) && this.getNode());\n\t\t},\n\t\tfallback: function(){\n\t\t\tvar eventNode = this._getNodes()[0];\n\t\t\tvar defaultElement = null;\n\t\t\tif(!eventNode || !(scheduler._locate_event(eventNode))){\n\t\t\t\tdefaultElement = new scheduler.$keyboardNavigation.TimeSlot();\n\t\t\t}else{\n\t\t\t\tvar id = scheduler._locate_event(eventNode);\n\t\t\t\tdefaultElement = new scheduler.$keyboardNavigation.Event(id);\n\t\t\t}\n\n\t\t\treturn defaultElement;\n\t\t},\n\n\t\tisScrolledIntoView: function (el) {\n\t\t\tvar eventBox = el.getBoundingClientRect();\n\t\t\tvar viewPort = scheduler.$container.querySelector(\".dhx_cal_data\").getBoundingClientRect();\n\t\t\t\n\t\t\tif(eventBox.bottom < viewPort.top || eventBox.top > viewPort.bottom){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\n\t\tgetNode: function(){\n\n\t\t\tvar idSelector = \"[\"+scheduler.config.event_attribute+\"='\"+this.eventId+\"']\";\n\n\t\t\tvar inlineEditor = scheduler.$keyboardNavigation.dispatcher.getInlineEditor(this.eventId);\n\t\t\tif(inlineEditor){// is inline editor visible\n\t\t\t\treturn inlineEditor;\n\t\t\t}else{\n\t\t\t\tif(scheduler.isMultisectionEvent && scheduler.isMultisectionEvent(scheduler.getEvent(this.eventId))){\n\t\t\t\t\tvar nodes = scheduler.$container.querySelectorAll(idSelector);\n\t\t\t\t\tfor(var i = 0; i < nodes.length; i++){\n\t\t\t\t\t\tif(this.isScrolledIntoView(nodes[i])){\n\t\t\t\t\t\t\treturn nodes[i];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn nodes[0];\n\t\t\t\t}else{\n\t\t\t\t\treturn scheduler.$container.querySelector(idSelector);\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t}\n\n\t\t},\n\n\t\tfocus: function(){\n\t\t\tvar event = scheduler.getEvent(this.eventId);\n\n\t\t\tvar calendar = scheduler.getState();\n\t\t\tif(event.start_date.valueOf() > calendar.max_date.valueOf() || event.end_date.valueOf() <= calendar.min_date.valueOf()){\n\t\t\t\tscheduler.setCurrentView(event.start_date);\n\t\t\t}\n\n\t\t\tvar node = this.getNode();\n\t\t\tif (this.isScrolledIntoView(node)) {\n\t\t\t\tscheduler.$keyboardNavigation.dispatcher.keepScrollPosition((function(){\n\t\t\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\n\t\t\t\t}).bind(this));\n\t\t\t} else {\n\t\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\n\t\t\t}\n\n\t\t},\n\t\tblur: function(){\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\n\t\t},\n\n\n\t\t_getSection: function(ev){\n\t\t\tvar section = null;\n\t\t\tvar mode = scheduler.getState().mode;\n\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\n\t\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\n\t\t\t\tsection = ev[timeline.y_property];\n\t\t\t}else if(scheduler._props && scheduler._props[mode]){\n\t\t\t\tvar unit = scheduler._props[mode];\n\t\t\t\tsection = ev[unit.map_to];\n\t\t\t}\n\t\t\treturn section;\n\t\t},\n\t\t_moveToSlot: function(dir){\n\t\t\tvar ev = scheduler.getEvent(this.eventId);\n\t\t\tif(ev){\n\t\t\t\tvar section =this._getSection(ev);\n\t\t\t\tvar slot = new scheduler.$keyboardNavigation.TimeSlot(ev.start_date, null, section);\n\t\t\t\tthis.moveTo(slot.nextSlot(slot, dir));\n\t\t\t}else{\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\n\t\t\t}\n\t\t},\n\n\t\tkeys: {\n\t\t\t\"left\": function(){\n\t\t\t\tthis._moveToSlot(\"left\");\n\t\t\t},\n\n\t\t\t\"right\": function () {\n\t\t\t\tthis._moveToSlot(\"right\");\n\t\t\t},\n\t\t\t\"down\": function () {\n\t\t\t\tif(this.getMode() == this._modes.list){\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.nextEventHandler();\n\t\t\t\t}else {\n\t\t\t\t\tthis._moveToSlot(\"down\");\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t\"space\": function(){\n\t\t\t\tvar node = this.getNode();\n\t\t\t\tif(node && node.click){\n\t\t\t\t\tnode.click();\n\t\t\t\t}else{\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\t\"up\": function () {\n\t\t\t\tif(this.getMode() == this._modes.list){\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.prevEventHandler();\n\t\t\t\t}else {\n\t\t\t\t\tthis._moveToSlot(\"up\");\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t\"delete\": function(){\n\t\t\t\tif(scheduler.getEvent(this.eventId)) {\n\t\t\t\t\tscheduler._click.buttons[\"delete\"](this.eventId);\n\t\t\t\t}else{\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t// open lightbox\n\t\t\t\"enter\": function () {\n\t\t\t\tif(scheduler.getEvent(this.eventId)) {\n\t\t\t\t\tscheduler.showLightbox(this.eventId);\n\t\t\t\t}else{\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n);\nscheduler.$keyboardNavigation.Event.prototype.bindAll(scheduler.$keyboardNavigation.Event.prototype.keys);\n\n}","export default function(scheduler){\n\nscheduler.$keyboardNavigation.TimeSlot = function(from, to, section, movingDate){\n\tvar state = scheduler.getState();\n\tvar timeline = scheduler.matrix && scheduler.matrix[state.mode];\n\n\tif(!from){\n\t\tfrom = this.getDefaultDate();\n\t}\n\n\tif(!to){\n\n\t\tif(timeline){\n\t\t\tto = scheduler.date.add(from, timeline.x_step, timeline.x_unit);\n\t\t}else{\n\t\t\tto = scheduler.date.add(from, scheduler.config.key_nav_step, \"minute\");\n\t\t}\n\n\t}\n\n\tthis.section = section || this._getDefaultSection();\n\tthis.start_date = new Date(from);\n\tthis.end_date = new Date(to);\n\tthis.movingDate = movingDate || null;\n};\n\nscheduler.$keyboardNavigation.TimeSlot.prototype = scheduler._compose(\n\tscheduler.$keyboardNavigation.KeyNavNode,\n\t{\n\t\t_handlers:null,\n\n\t\tgetDefaultDate: function(){\n\t\t\tvar from;\n\t\t\tvar state = scheduler.getState();\n\t\t\tvar visibleTime = new Date(state.date);\n\t\t\tvisibleTime.setSeconds(0);\n\t\t\tvisibleTime.setMilliseconds(0);\n\n\t\t\tvar nowTime = new Date();\n\t\t\tnowTime.setSeconds(0);\n\t\t\tnowTime.setMilliseconds(0);\n\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[state.mode];\n\t\t\tvar showNowTime = false;\n\t\t\tif(visibleTime.valueOf() === nowTime.valueOf()){\n\t\t\t\tshowNowTime = true;\n\t\t\t}\n\n\t\t\tif(timeline){\n\t\t\t\tif(showNowTime){\n\t\t\t\t\tif(timeline.x_unit === \"day\"){\n\t\t\t\t\t\tnowTime.setHours(0);\n\t\t\t\t\t\tnowTime.setMinutes(0);\n\t\t\t\t\t}else if(timeline.x_unit === \"hour\"){\n\t\t\t\t\t\tnowTime.setMinutes(0);\n\t\t\t\t\t}\n\t\t\t\t\tfrom = nowTime;\n\t\t\t\t}else{\n\t\t\t\t\tfrom = scheduler.date[timeline.name + \"_start\"](new Date(state.date));\n\t\t\t\t}\n\n\t\t\t\tfrom = this.findVisibleColumn(from);\n\t\t\t}else{\n\t\t\t\tfrom = new Date(scheduler.getState().min_date);\n\t\t\t\tif(showNowTime){\n\t\t\t\t\tfrom = nowTime;\n\t\t\t\t}\n\t\t\t\tfrom = this.findVisibleColumn(from);\n\t\t\t\tif(!showNowTime){\n\t\t\t\t\tfrom.setHours(scheduler.config.first_hour);\n\t\t\t\t}\n\n\t\t\t\tif(!scheduler._table_view){\n\t\t\t\t\tvar dataContainer = scheduler.$container.querySelector(\".dhx_cal_data\");\n\t\t\t\t\tif(dataContainer.scrollTop){\n\t\t\t\t\t\tfrom.setHours(scheduler.config.first_hour + Math.ceil(dataContainer.scrollTop / scheduler.config.hour_size_px));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn from;\n\t\t},\n\n\t\tclone: function(timeslot){\n\t\t\treturn new scheduler.$keyboardNavigation.TimeSlot(timeslot.start_date, timeslot.end_date, timeslot.section, timeslot.movingDate);\n\t\t},\n\t\t_getMultisectionView: function(){\n\t\t\tvar state = scheduler.getState();\n\t\t\tvar view;\n\t\t\tif(scheduler._props && scheduler._props[state.mode]) {\n\t\t\t\tview = scheduler._props[state.mode];\n\t\t\t}else if(scheduler.matrix && scheduler.matrix[state.mode]){\n\t\t\t\tview = scheduler.matrix[state.mode];\n\t\t\t}\n\t\t\treturn view;\n\t\t},\n\n\t\t_getDefaultSection: function(){\n\t\t\tvar section = null;\n\t\t\tvar view = this._getMultisectionView();\n\t\t\tif(view && !section){\n\t\t\t\tsection = this._getNextSection();\n\t\t\t}\n\t\t\treturn section;\n\t\t},\n\n\t\t_getNextSection: function(sectionId, dir){\n\t\t\tvar view = this._getMultisectionView();\n\t\t\tvar currentIndex = view.order[sectionId];\n\t\t\tvar nextIndex = currentIndex;\n\t\t\tif(currentIndex !== undefined){\n\t\t\t\tnextIndex = currentIndex + dir;\n\t\t\t}else{\n\t\t\t\tnextIndex = (view.size && view.position) ? view.position : 0;\n\t\t\t}\n\n\t\t\tif(nextIndex < 0){\n\t\t\t\tnextIndex = 0;\n\t\t\t}\n\t\t\tvar options = view.options || view.y_unit;\n\n\t\t\tif(nextIndex >= options.length){\n\t\t\t\tnextIndex = options.length - 1;\n\t\t\t}\n\t\t\t//nextIndex = nextIndex < 0 ? nextIndex = (view.options || view.y_unit).length -1 : nextIndex;\n\n\t\t\tif(options[nextIndex]){\n\t\t\t\treturn options[nextIndex].key;\n\t\t\t}else{\n\t\t\t\treturn null;\n\t\t\t}\n\t\t},\n\n\n\t\tisValid: function(){\n\t\t\tvar state = scheduler.getState();\n\t\t\tvar isInRange = !(this.start_date.valueOf() < state.min_date.valueOf() || this.start_date.valueOf() >= state.max_date.valueOf());\n\n\t\t\tif(!isInRange) return false;\n\n\n\t\t\tif(!this.isVisible(this.start_date, this.end_date)) return false;\n\n\t\t\tvar view = this._getMultisectionView();\n\n\t\t\tif(view){\n\t\t\t\treturn (view.order[this.section] !== undefined);\n\t\t\t}else{\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t},\n\n\t\tfallback:function(){\n\n\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\n\t\t\tif(!defaultSlot.isValid()){\n\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\n\t\t\t}else{\n\t\t\t\treturn defaultSlot;\n\t\t\t}\n\t\t},\n\n\t\tgetNodes: function(){\n\t\t\treturn Array.prototype.slice.call(scheduler.$container.querySelectorAll(\".dhx_focus_slot\"));\n\t\t},\n\t\tgetNode: function(){\n\t\t\treturn this.getNodes()[0];\n\t\t},\n\n\t\tfocus: function(){\n\t\t\tif(this.section && scheduler.getView() && scheduler.getView().smart_rendering && scheduler.getView().scrollTo && !scheduler.$container.querySelector(`[data-section-id=\"${this.section}\"]`)){\n\t\t\t\tscheduler.getView().scrollTo({section: this.section});\n\t\t\t}\n\t\t\tscheduler.$keyboardNavigation.marker.render(this.start_date, this.end_date, this.section);\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\n\t\t\tscheduler.$keyboardNavigation._pasteDate = this.start_date;\n\t\t\tscheduler.$keyboardNavigation._pasteSection = this.section;\n\n\t\t},\n\t\tblur: function(){\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\n\t\t\tscheduler.$keyboardNavigation.marker.clear();\n\t\t},\n\n\t\t_modes: scheduler.$keyboardNavigation.SchedulerNode.prototype._modes,\n\n\t\t_getMode: scheduler.$keyboardNavigation.SchedulerNode.prototype.getMode,\n\n\t\taddMonthDate: function(date, dir, extend){\n\t\t\tvar res;\n\t\t\tswitch (dir){\n\t\t\t\tcase \"up\":\n\t\t\t\t\tres = scheduler.date.add(date, -1, \"week\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"down\":\n\t\t\t\t\tres = scheduler.date.add(date, 1, \"week\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"left\":\n\t\t\t\t\tres = scheduler.date.day_start(scheduler.date.add(date, -1, \"day\"));\n\t\t\t\t\tres = this.findVisibleColumn(res, -1);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"right\":\n\t\t\t\t\tres = scheduler.date.day_start(scheduler.date.add(date, 1, \"day\"));\n\t\t\t\t\tres = this.findVisibleColumn(res, 1);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tres = scheduler.date.day_start(new Date(date));\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tvar state = scheduler.getState();\n\t\t\tif(date.valueOf() < state.min_date.valueOf() || (!extend && date.valueOf() >= state.max_date.valueOf())){\n\t\t\t\tres = new Date(state.min_date);\n\t\t\t}\n\n\t\t\treturn res;\n\t\t},\n\n\t\tnextMonthSlot: function(slot, dir, extend){\n\n\t\t\tvar start, end;\n\t\t\tstart = this.addMonthDate(slot.start_date, dir, extend);\n\n\t\t\tstart.setHours(scheduler.config.first_hour);\n\t\t\tend = new Date(start);\n\t\t\tend.setHours(scheduler.config.last_hour);\n\t\t\treturn {start_date: start, end_date: end};\n\t\t},\n\n\t\t_alignTimeSlot: function(date, minDate, unit, step){\n\t\t\tvar currentDate = new Date(minDate);\n\t\t\twhile(currentDate.valueOf() < date.valueOf()){\n\t\t\t\tcurrentDate = scheduler.date.add(currentDate, step, unit);\n\t\t\t}\n\n\t\t\tif(currentDate.valueOf() > date.valueOf()){\n\t\t\t\tcurrentDate = scheduler.date.add(currentDate, -step, unit);\n\t\t\t}\n\n\t\t\treturn currentDate;\n\t\t},\n\n\t\tnextTimelineSlot: function(slot, dir, extend){\n\t\t\tvar state = scheduler.getState();\n\t\t\tvar view = scheduler.matrix[state.mode];\n\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);\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);\n\n\t\t\tif(endDate.valueOf() <= startDate.valueOf()){\n\t\t\t\tendDate = scheduler.date.add(startDate, view.x_step, view.x_unit);\n\t\t\t}\n\t\t\tvar newPos = this.clone(slot);\n\t\t\tnewPos.start_date = startDate;\n\t\t\tnewPos.end_date = endDate;\n\t\t\tnewPos.section = slot.section || this._getNextSection();\n\n\n\t\t\tswitch (dir){\n\t\t\t\tcase \"up\":\n\t\t\t\t\tnewPos.section = this._getNextSection(slot.section, -1);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"down\":\n\t\t\t\t\tnewPos.section = this._getNextSection(slot.section, +1);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"left\":\n\t\t\t\t\tnewPos.start_date = this.findVisibleColumn(scheduler.date.add(newPos.start_date, -view.x_step, view.x_unit), -1);\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"right\":\n\t\t\t\t\tnewPos.start_date = this.findVisibleColumn(scheduler.date.add(newPos.start_date, view.x_step, view.x_unit), 1);\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\n\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif(newPos.start_date.valueOf() < state.min_date.valueOf() || newPos.start_date.valueOf() >= state.max_date.valueOf()){\n\t\t\t\tif(extend && newPos.start_date.valueOf() >= state.max_date.valueOf()){\n\t\t\t\t\tnewPos.start_date = new Date(state.max_date);\n\t\t\t\t}else{\n\t\t\t\t\tnewPos.start_date = scheduler.date[state.mode + \"_start\"](scheduler.date.add(state.date, dir == \"left\" ? -1 : 1, state.mode));\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn newPos;\n\t\t},\n\n\t\tnextUnitsSlot: function(slot, dir, extend){\n\t\t\tvar newPos = this.clone(slot);\n\t\t\tnewPos.section = slot.section || this._getNextSection();\n\n\t\t\tvar section = slot.section || this._getNextSection();\n\t\t\tvar state = scheduler.getState();\n\t\t\tvar view = scheduler._props[state.mode];\n\t\t\tswitch (dir){\n\t\t\t\tcase \"left\":\n\t\t\t\t\tsection = this._getNextSection(slot.section, -1);\n\t\t\t\t\tvar optionsCount = view.size ? (view.size - 1) : view.options.length;\n\n\t\t\t\t\tif(view.days > 1 && (view.order[section] == optionsCount - 1)){\n\t\t\t\t\t\tif(scheduler.date.add(slot.start_date, -1, \"day\").valueOf() >= state.min_date.valueOf()){\n\t\t\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"right\":\n\t\t\t\t\tsection = this._getNextSection(slot.section, 1);\n\t\t\t\t\tif(view.days > 1 && !view.order[section]){\n\t\t\t\t\t\tif(scheduler.date.add(slot.start_date, 1, \"day\").valueOf() < state.max_date.valueOf()){\n\t\t\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\n\t\t\t\t\tsection = slot.section;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tnewPos.section = section;\n\t\t\treturn newPos;\n\t\t},\n\n\t\t_moveDate: function(oldDate, dir){\n\t\t\tvar newDate = this.findVisibleColumn(scheduler.date.add(oldDate, dir, \"day\"), dir);\n\t\t\tnewDate.setHours(oldDate.getHours());\n\t\t\tnewDate.setMinutes(oldDate.getMinutes());\n\t\t\treturn newDate;\n\t\t},\n\n\t\tisBeforeLastHour: function(date, isStartDate){\n\t\t\tvar minutes = date.getMinutes(),\n\t\t\t\thours = date.getHours(),\n\t\t\t\tlast_hour = scheduler.config.last_hour;\n\t\t\treturn (hours < last_hour || (!isStartDate && ((last_hour == 24 || hours == last_hour) && !minutes)));\n\t\t},\n\t\tisAfterFirstHour: function(date, isStartDate){\n\t\t\tvar minutes = date.getMinutes(),\n\t\t\t\thours = date.getHours(),\n\t\t\t\tfirst_hour = scheduler.config.first_hour,\n\t\t\t\tlast_hour = scheduler.config.last_hour;\n\t\t\treturn (hours >= first_hour || (!isStartDate && (!minutes && ((!hours && last_hour == 24) || (hours == last_hour)))));\n\t\t},\n\t\tisInVisibleDayTime: function(date, isStartDate){\n\t\t\treturn (this.isBeforeLastHour(date, isStartDate) && this.isAfterFirstHour(date, isStartDate));\n\t\t},\n\n\t\tnextDaySlot: function(slot, dir, extend){\n\t\t\tvar start, end;\n\n\t\t\tvar key_nav_step = scheduler.config.key_nav_step;\n\n\t\t\tvar date = this._alignTimeSlot(slot.start_date, scheduler.date.day_start(new Date(slot.start_date)), \"minute\", key_nav_step);\n\n\n\t\t\tvar oldStart = slot.start_date;\n\n\t\t\tswitch (dir){\n\t\t\t\tcase \"up\":\n\t\t\t\t\tstart = scheduler.date.add(date, -key_nav_step, \"minute\");\n\n\t\t\t\t\tif(!this.isInVisibleDayTime(start, true)){\n\t\t\t\t\t\tif (!extend || this.isInVisibleDayTime(oldStart, true)) {\n\n\t\t\t\t\t\t\tvar toNextDay = true;\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())\n\t\t\t\t\t\t\t\ttoNextDay = false;\n\t\t\t\t\t\t\tif(toNextDay)\n\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, -1, \"day\"), -1);\n\n\t\t\t\t\t\t\tstart.setHours(scheduler.config.last_hour);\n\t\t\t\t\t\t\tstart.setMinutes(0);\n\t\t\t\t\t\t\tstart = scheduler.date.add(start, -key_nav_step, \"minute\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"down\":\n\t\t\t\t\tstart = scheduler.date.add(date, key_nav_step, \"minute\");\n\n\t\t\t\t\tvar testEnd = extend ? start : scheduler.date.add(start, key_nav_step, \"minute\");\n\t\t\t\t\tif(!this.isInVisibleDayTime(testEnd, false)){\n\t\t\t\t\t\tif(!extend || this.isInVisibleDayTime(oldStart, false)) {\n\t\t\t\t\t\t\tif (!extend) {\n\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, 1, \"day\"), 1);\n\t\t\t\t\t\t\t\tstart.setHours(scheduler.config.first_hour);\n\t\t\t\t\t\t\t\tstart.setMinutes(0);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tvar toNextDay = true;\n\t\t\t\t\t\t\t\tif (scheduler.date.date_part(new Date(oldStart)).valueOf() == oldStart.valueOf()) {\n\t\t\t\t\t\t\t\t\ttoNextDay = false;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (toNextDay) {\n\t\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, 1, \"day\"), 1);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tstart.setHours(scheduler.config.first_hour);\n\t\t\t\t\t\t\t\tstart.setMinutes(0);\n\t\t\t\t\t\t\t\tstart = scheduler.date.add(start, key_nav_step, \"minute\");\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"left\":\n\t\t\t\t\tstart = this._moveDate(slot.start_date, -1);\n\t\t\t\t\tend = this._moveDate(slot.end_date, -1);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"right\":\n\t\t\t\t\tstart = this._moveDate(slot.start_date, 1);\n\t\t\t\t\tend = this._moveDate(slot.end_date, 1);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tstart = date;\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\treturn {start_date: start, end_date: end};\n\t\t},\n\t\tnextWeekAgendaSlot: function(slot, dir){\n\t\t\tvar start, end;\n\t\t\tvar state = scheduler.getState();\n\n\t\t\tswitch (dir){\n\t\t\t\tcase \"down\":\n\t\t\t\tcase \"left\":\n\t\t\t\t\tstart = scheduler.date.day_start(scheduler.date.add(slot.start_date, -1, \"day\"));\n\t\t\t\t\tstart = this.findVisibleColumn(start, -1);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"up\":\n\t\t\t\tcase \"right\":\n\t\t\t\t\tstart = scheduler.date.day_start(scheduler.date.add(slot.start_date, 1, \"day\"));\n\t\t\t\t\tstart = this.findVisibleColumn(start, 1);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tstart = scheduler.date.day_start(slot.start_date);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(slot.start_date.valueOf() < state.min_date.valueOf() || slot.start_date.valueOf() >= state.max_date.valueOf()){\n\t\t\t\tstart = new Date(state.min_date);\n\n\t\t\t}\n\t\t\tend = new Date(start);\n\t\t\tend.setHours(scheduler.config.last_hour);\n\t\t\treturn {start_date: start, end_date: end};\n\t\t},\n\t\tnextAgendaSlot: function(slot, dir){\n\t\t\treturn {start_date: slot.start_date, end_date: slot.end_date};\n\t\t},\n\n\n\t\tisDateVisible: function(date){\n\t\t\tif(!scheduler._ignores_detected)\n\t\t\t\treturn true;\n\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[scheduler.getState().mode];\n\n\t\t\tvar index;\n\t\t\tif(timeline){\n\t\t\t\tindex = scheduler._get_date_index(timeline, date);\n\t\t\t}else{\n\t\t\t\tindex = scheduler.locate_holder_day(date);\n\t\t\t}\n\n\t\t\treturn !scheduler._ignores[index];\n\t\t},\n\n\t\tfindVisibleColumn: function(start, dir){\n\t\t\tvar date = start;\n\t\t\tdir = dir || 1;\n\t\t\tvar range = scheduler.getState();\n\n\t\t\twhile(!this.isDateVisible(date) && ((dir > 0 && date.valueOf() <= range.max_date.valueOf()) || (dir < 0 && date.valueOf() >= range.min_date.valueOf()))){\n\t\t\t\tdate = this.nextDateColumn(date, dir);\n\t\t\t}\n\n\t\t\treturn date;\n\t\t},\n\n\t\tnextDateColumn: function(start, dir){\n\t\t\tdir = dir || 1;\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[scheduler.getState().mode];\n\n\t\t\tvar date;\n\t\t\tif(timeline){\n\t\t\t\tdate = scheduler.date.add(start, dir * timeline.x_step, timeline.x_unit);\n\t\t\t}else{\n\t\t\t\tdate = scheduler.date.day_start(scheduler.date.add(start, dir, \"day\"));\n\t\t\t}\n\n\t\t\treturn date;\n\t\t},\n\n\t\tisVisible:function(from, to){\n\t\t\tif(!scheduler._ignores_detected)\n\t\t\t\treturn true;\n\n\t\t\tvar current = new Date(from);\n\n\t\t\twhile(current.valueOf() < to.valueOf()){\n\t\t\t\tif(this.isDateVisible(current)) return true;\n\t\t\t\tcurrent = this.nextDateColumn(current);\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\n\t\tnextSlot: function(slot, dir, view, extend){\n\t\t\tvar next;\n\t\t\tview = view || this._getMode();\n\n\t\t\tvar tempSlot = scheduler.$keyboardNavigation.TimeSlot.prototype.clone(slot);\n\n\t\t\tswitch (view){\n\t\t\t\tcase this._modes.units:\n\t\t\t\t\tnext = this.nextUnitsSlot(tempSlot, dir, extend);\n\t\t\t\t\tbreak;\n\t\t\t\tcase this._modes.timeline:\n\t\t\t\t\tnext = this.nextTimelineSlot(tempSlot, dir, extend);\n\t\t\t\t\tbreak;\n\t\t\t\tcase this._modes.year:\n\t\t\t\t\tnext = this.nextMonthSlot(tempSlot, dir, extend);\n\t\t\t\t\tbreak;\n\t\t\t\tcase this._modes.month:\n\t\t\t\t\tnext = this.nextMonthSlot(tempSlot, dir, extend);\n\t\t\t\t\tbreak;\n\t\t\t\tcase this._modes.weekAgenda:\n\t\t\t\t\tnext = this.nextWeekAgendaSlot(tempSlot, dir, extend);\n\t\t\t\t\tbreak;\n\t\t\t\tcase this._modes.list:\n\t\t\t\t\tnext = this.nextAgendaSlot(tempSlot, dir, extend);\n\t\t\t\t\tbreak;\n\t\t\t\tcase this._modes.dayColumns:\n\t\t\t\t\tnext = this.nextDaySlot(tempSlot, dir, extend);\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif(next.start_date.valueOf() >= next.end_date.valueOf()){\n\t\t\t\tnext = this.nextSlot(next, dir, view);\n\t\t\t}\n\n\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(next);\n\n\t\t},\n\n\t\textendSlot: function(slot, dir){\n\t\t\tvar view = this._getMode();\n\t\t\tvar next;\n\t\t\tswitch (view){\n\t\t\t\tcase this._modes.units:\n\t\t\t\t\tif(dir == \"left\" || dir == \"right\"){\n\t\t\t\t\t\tnext = this.nextUnitsSlot(slot, dir);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tnext = this.extendUnitsSlot(slot, dir);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase this._modes.timeline:\n\t\t\t\t\tif(dir == \"down\" || dir == \"up\"){\n\t\t\t\t\t\tnext = this.nextTimelineSlot(slot, dir);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tnext = this.extendTimelineSlot(slot, dir);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase this._modes.year:\n\t\t\t\t\tnext = this.extendMonthSlot(slot, dir);\n\t\t\t\t\tbreak;\n\t\t\t\tcase this._modes.month:\n\t\t\t\t\tnext = this.extendMonthSlot(slot, dir);\n\t\t\t\t\tbreak;\n\t\t\t\tcase this._modes.dayColumns:\n\t\t\t\t\tnext = this.extendDaySlot(slot, dir);\n\t\t\t\t\tbreak;\n\t\t\t\tcase this._modes.weekAgenda:\n\t\t\t\t\tnext = this.extendWeekAgendaSlot(slot, dir);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tnext = slot;\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tvar range = scheduler.getState();\n\t\t\tif(next.start_date.valueOf() < range.min_date.valueOf()){\n\t\t\t\tnext.start_date = this.findVisibleColumn(range.min_date);\n\t\t\t\tnext.start_date.setHours(scheduler.config.first_hour);\n\t\t\t}\n\n\t\t\tif(next.end_date.valueOf() > range.max_date.valueOf()){\n\t\t\t//\tnext.end_date = new Date(slot.end_date);\n\t\t\t\tnext.end_date = this.findVisibleColumn(range.max_date, -1);\n\t\t\t}\n\n\n\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(next);\n\t\t},\n\n\t\textendTimelineSlot: function(slot, direction){\n\t\t\treturn this.extendGenericSlot({\n\t\t\t\t\"left\":\"start_date\",\n\t\t\t\t\"right\":\"end_date\"\n\t\t\t\t},\n\t\t\t\tslot,\n\t\t\t\tdirection,\n\t\t\t\t\"timeline\"\n\t\t\t);\n\t\t},\n\n\t\textendWeekAgendaSlot: function(slot, direction){\n\t\t\treturn this.extendGenericSlot({\n\t\t\t\t\t\"left\":\"start_date\",\n\t\t\t\t\t\"right\":\"end_date\"\n\t\t\t\t},\n\t\t\t\tslot,\n\t\t\t\tdirection,\n\t\t\t\t\"weekAgenda\"\n\t\t\t);\n\t\t},\n\n\t\textendGenericSlot: function(allowedDirections, slot, direction, type){\n\t\t\tvar next;\n\t\t\tvar moveDate = slot.movingDate;\n\n\t\t\tif(!moveDate){\n\t\t\t\tmoveDate = allowedDirections[direction];\n\t\t\t}\n\n\t\t\tif(!moveDate || !allowedDirections[direction]){\n\t\t\t\treturn slot;\n\t\t\t}\n\n\t\t\tif(direction){\n\t\t\t\tnext = this.nextSlot({start_date: slot[moveDate], section: slot.section}, direction, type, true);\n\n\t\t\t\tif(next.start_date.valueOf() == slot.start_date.valueOf()){\n\t\t\t\t\tnext = this.nextSlot({start_date: next.start_date, section:next.section}, direction, type, true);\n\t\t\t\t}\n\n\t\t\t\tnext.movingDate = moveDate;\n\t\t\t}else{\n\t\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(slot);\n\t\t\t}\n\n\t\t\tvar newDates = this.extendSlotDates(slot, next, next.movingDate);\n\n\t\t\tif(newDates.end_date.valueOf() <= newDates.start_date.valueOf()){\n\t\t\t\tnext.movingDate = next.movingDate == \"end_date\" ? \"start_date\" : \"end_date\";\n\t\t\t}\n\t\t\tnewDates = this.extendSlotDates(slot, next, next.movingDate);\n\n\t\t\tnext.start_date = newDates.start_date;\n\t\t\tnext.end_date = newDates.end_date;\n\t\t\treturn next;\n\t\t},\n\n\t\textendSlotDates: function(oldSlot, newSlot, dateDirection){\n\t\t\tvar res = {start_date:null, end_date:null};\n\n\t\t\tif(dateDirection == \"start_date\"){\n\t\t\t\tres.start_date = newSlot.start_date;\n\t\t\t\tres.end_date = oldSlot.end_date;\n\t\t\t}else{\n\t\t\t\tres.start_date = oldSlot.start_date;\n\t\t\t\tres.end_date = newSlot.start_date;\n\t\t\t}\n\t\t\treturn res;\n\n\t\t},\n\n\t\textendMonthSlot: function(slot, direction){\n\t\t\tvar slot = this.extendGenericSlot({\n\t\t\t\t\t\"up\":\"start_date\",\n\t\t\t\t\t\"down\":\"end_date\",\n\t\t\t\t\t\"left\":\"start_date\",\n\t\t\t\t\t\"right\":\"end_date\"\n\t\t\t\t},\n\t\t\t\tslot,\n\t\t\t\tdirection,\n\t\t\t\t\"month\"\n\t\t\t);\n\n\t\t\tslot.start_date.setHours(scheduler.config.first_hour);\n\t\t\tslot.end_date = scheduler.date.add(slot.end_date, -1, \"day\");\n\t\t\tslot.end_date.setHours(scheduler.config.last_hour);\n\t\t\treturn slot;\n\t\t},\n\n\t\textendUnitsSlot: function(slot, direction){\n\t\t\tvar next;\n\n\t\t\tswitch (direction){\n\t\t\t\tcase \"down\":\n\t\t\t\tcase \"up\":\n\t\t\t\t\tnext = this.extendDaySlot(slot, direction);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tnext = slot;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tnext.section = slot.section;\n\t\t\treturn next;\n\t\t},\n\t\textendDaySlot: function(slot, direction){\n\t\t\treturn this.extendGenericSlot({\n\t\t\t\t\t\"up\":\"start_date\",\n\t\t\t\t\t\"down\":\"end_date\",\n\t\t\t\t\t\"left\":\"start_date\",\n\t\t\t\t\t\"right\":\"end_date\"\n\t\t\t\t},\n\t\t\t\tslot,\n\t\t\t\tdirection,\n\t\t\t\t\"dayColumns\"\n\t\t\t);\n\t\t},\n\n\t\tscrollSlot: function(dir){\n\t\t\tvar state = scheduler.getState();\n\n\t\t\tvar slot = this.nextSlot(this, dir);\n\t\t\tif(slot.start_date.valueOf() < state.min_date.valueOf() || slot.start_date.valueOf() >= state.max_date.valueOf()){\n\t\t\t\tscheduler.setCurrentView(new Date(slot.start_date));\n\t\t\t}\n\n\t\t\tthis.moveTo(slot);\n\t\t},\n\n\t\tkeys: {\n\t\t\t\"left\": function(){\n\t\t\t\tthis.scrollSlot(\"left\");\n\t\t\t},\n\t\t\t\"right\": function () {\n\t\t\t\tthis.scrollSlot(\"right\");\n\t\t\t},\n\t\t\t\"down\": function () {\n\n\t\t\t\tvar mode = this._getMode();\n\t\t\t\tif(mode == this._modes.list){\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.nextEventHandler();\n\t\t\t\t}else{\n\t\t\t\t\tthis.scrollSlot(\"down\");\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\t\"up\": function () {\n\t\t\t\tvar mode = this._getMode();\n\t\t\t\tif(mode == this._modes.list){\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.prevEventHandler();\n\t\t\t\t}else{\n\t\t\t\t\tthis.scrollSlot(\"up\");\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\t\"shift+down\":function(){\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"down\"));\n\t\t\t},\n\t\t\t\"shift+up\":function(){\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"up\"));\n\t\t\t},\n\t\t\t\"shift+right\":function(){\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"right\"));\n\t\t\t},\n\t\t\t\"shift+left\":function(){\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"left\"));\n\t\t\t},\n\n\n\t\t\t\"enter\": function(){\n\t\t\t\tvar obj = {start_date: new Date(this.start_date), end_date: new Date(this.end_date)};\n\n\t\t\t\tvar mode = scheduler.getState().mode;\n\t\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\n\n\t\t\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\n\t\t\t\t\tobj[timeline.y_property] = this.section;\n\t\t\t\t}else if(scheduler._props && scheduler._props[mode]){\n\t\t\t\t\tvar unit = scheduler._props[mode];\n\t\t\t\t\tobj[unit.map_to] = this.section;\n\t\t\t\t}\n\n\t\t\t\tscheduler.addEventNow(obj);\n\t\t\t}\n\t\t}\n\t}\n);\n\nscheduler.$keyboardNavigation.TimeSlot.prototype.bindAll(scheduler.$keyboardNavigation.TimeSlot.prototype.keys);\n\n}","export default function(scheduler){\n\nscheduler.$keyboardNavigation.MinicalButton = function(div, index){\n\tthis.container = div;\n\tthis.index = index || 0;\n};\n\nscheduler.$keyboardNavigation.MinicalButton.prototype = scheduler._compose(\n\tscheduler.$keyboardNavigation.KeyNavNode,\n\t{\n\n\t\tisValid: function(){\n\t\t\tvar container = this.container;\n\t\t\treturn !!container.offsetWidth;// valid if container is visible\n\t\t},\n\n\t\tfallback: function(){\n\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\n\t\t\tif(defaultSlot.isValid()){\n\t\t\t\treturn defaultSlot;\n\t\t\t}else{\n\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\n\t\t\t}\n\t\t},\n\t\tfocus: function(){\n\t\t\tscheduler.$keyboardNavigation.dispatcher.globalNode.disable();\n\t\t\tthis.container.removeAttribute(\"tabindex\");\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\n\n\t\t},\n\t\tblur: function(){\n\t\t\tthis.container.setAttribute(\"tabindex\", \"0\");\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\n\t\t},\n\t\tgetNode: function(){\n\t\t\tif(!this.index){\n\t\t\t\treturn this.container.querySelector(\".dhx_cal_prev_button\");\n\t\t\t}else{\n\t\t\t\treturn this.container.querySelector(\".dhx_cal_next_button\");\n\t\t\t}\n\t\t},\n\n\t\tkeys: {\n\t\t\t\"right\": function(e){\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, this.index ? 0 : 1));\n\t\t\t},\n\t\t\t\"left\": function(e){\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, this.index ? 0 : 1));\n\t\t\t},\n\t\t\t\"down\": function(){\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, 0, 0);\n\t\t\t\tif(next && !next.isValid()){\n\t\t\t\t\tnext = next.fallback();\n\t\t\t\t}\n\n\t\t\t\tthis.moveTo(next);\n\t\t\t},\n\t\t\t\"enter\": function(e){\n\t\t\t\tthis.getNode().click();\n\t\t\t}\n\t\t}\n\t}\n);\n\nscheduler.$keyboardNavigation.MinicalButton.prototype.bindAll(scheduler.$keyboardNavigation.MinicalButton.prototype.keys);\n\n}","export default function(scheduler){\n\nscheduler.$keyboardNavigation.MinicalCell = function(div, row, col){\n\tthis.container = div;\n\tthis.row = row || 0;\n\tthis.col = col || 0;\n};\n\nscheduler.$keyboardNavigation.MinicalCell.prototype = scheduler._compose(\n\tscheduler.$keyboardNavigation.KeyNavNode,\n\t{\n\n\t\tisValid: function(){\n\t\t\tvar grid = this._getGrid();\n\t\t\treturn !!(grid[this.row] && grid[this.row][this.col]);\n\t\t},\n\t\tfallback: function(){\n\t\t\tvar row = this.row;\n\t\t\tvar col = this.col;\n\t\t\tvar grid = this._getGrid();\n\t\t\tif(!grid[row]){\n\t\t\t\trow = 0;\n\t\t\t}\n\t\t\tvar dir = true;\n\t\t\tif(row > grid.length / 2){\n\t\t\t\tdir = false;\n\t\t\t}\n\n\t\t\tif(!grid[row]){\n\t\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\n\t\t\t\tif(defaultSlot.isValid()){\n\t\t\t\t\treturn defaultSlot;\n\t\t\t\t}else{\n\t\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(dir){\n\t\t\t\tfor(var c = col; grid[row] && c < grid[row].length; c++){\n\t\t\t\t\tif(!grid[row][c] && c == grid[row].length - 1){\n\t\t\t\t\t\trow++;\n\t\t\t\t\t\tcol = 0;\n\t\t\t\t\t}\n\t\t\t\t\tif(grid[row][c]){\n\t\t\t\t\t\treturn new scheduler.$keyboardNavigation.MinicalCell(this.container, row, c);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tfor(var c = col; grid[row] && c < grid[row].length; c--){\n\t\t\t\t\tif(!grid[row][c] && !c){\n\t\t\t\t\t\trow--;\n\t\t\t\t\t\tcol = grid[row].length - 1;\n\t\t\t\t\t}\n\t\t\t\t\tif(grid[row][c]){\n\t\t\t\t\t\treturn new scheduler.$keyboardNavigation.MinicalCell(this.container, row, c);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn new scheduler.$keyboardNavigation.MinicalButton(this.container, 0);\n\t\t},\n\t\tfocus: function(){\n\t\t\tscheduler.$keyboardNavigation.dispatcher.globalNode.disable();\n\n\t\t\tthis.container.removeAttribute(\"tabindex\");\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\n\t\t},\n\t\tblur: function(){\n\t\t\tthis.container.setAttribute(\"tabindex\", \"0\");\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\n\t\t},\n\t\t_getNode: function(row, col){\n\t\t\treturn this.container.querySelector(\".dhx_year_body tr:nth-child(\"+(row + 1) + \") td:nth-child(\"+(col + 1)+\")\");\n\t\t},\n\t\tgetNode: function(){\n\t\t\treturn this._getNode(this.row, this.col);\n\t\t},\n\n\t\t_getGrid: function(){\n\t\t\tvar rows = this.container.querySelectorAll(\".dhx_year_body tr\");\n\t\t\tvar grid = [];\n\t\t\tfor(var i = 0; i < rows.length; i++){\n\t\t\t\tgrid[i] = [];\n\t\t\t\tvar row = rows[i];\n\t\t\t\tvar cells = row.querySelectorAll(\"td\");\n\t\t\t\tfor(var c = 0; c < cells.length; c++){\n\t\t\t\t\tvar cell = cells[c];\n\t\t\t\t\tvar enabled = true;\n\t\t\t\t\tvar css = scheduler._getClassName(cell);\n\t\t\t\t\tif(css.indexOf(\"dhx_after\") > -1 || css.indexOf(\"dhx_before\") > -1 || css.indexOf(\"dhx_scale_ignore\") > -1){\n\t\t\t\t\t\tenabled = false;\n\t\t\t\t\t}\n\t\t\t\t\tgrid[i][c] = enabled;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn grid;\n\t\t},\n\n\n\t\tkeys: {\n\t\t\t\"right\": function(e){\n\t\t\t\tvar grid = this._getGrid();\n\t\t\t\tvar newRow = this.row;\n\t\t\t\tvar newCol = this.col + 1;\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\n\t\t\t\t\tif(grid[newRow + 1]){\n\t\t\t\t\t\tnewRow = newRow + 1;\n\t\t\t\t\t\tnewCol = 0;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tnewCol = this.col;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\n\t\t\t\tif(!next.isValid()){\n\t\t\t\t\tnext = next.fallback();\n\t\t\t\t}\n\n\t\t\t\tthis.moveTo(next);\n\t\t\t},\n\t\t\t\"left\": function(e){\n\t\t\t\tvar grid = this._getGrid();\n\t\t\t\tvar newRow = this.row;\n\t\t\t\tvar newCol = this.col - 1;\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\n\t\t\t\t\tif(grid[newRow - 1]){\n\t\t\t\t\t\tnewRow = newRow - 1;\n\t\t\t\t\t\tnewCol = grid[newRow].length - 1;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tnewCol = this.col;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\n\t\t\t\tif(!next.isValid()){\n\t\t\t\t\tnext = next.fallback();\n\t\t\t\t}\n\n\t\t\t\tthis.moveTo(next);\n\t\t\t},\n\t\t\t\"down\": function(){\n\t\t\t\tvar grid = this._getGrid();\n\t\t\t\tvar newRow = this.row + 1;\n\t\t\t\tvar newCol = this.col;\n\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\n\t\t\t\t\tnewRow = this.row;\n\t\t\t\t}\n\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\n\t\t\t\tif(!next.isValid()){\n\t\t\t\t\tnext = next.fallback();\n\t\t\t\t}\n\n\t\t\t\tthis.moveTo(next);\n\t\t\t},\n\t\t\t\"up\": function(){\n\t\t\t\tvar grid = this._getGrid();\n\t\t\t\tvar newRow = this.row - 1;\n\t\t\t\tvar newCol = this.col;\n\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\n\t\t\t\t\tvar index = 0;\n\t\t\t\t\tif(this.col > grid[this.row].length / 2){\n\t\t\t\t\t\tindex = 1;\n\t\t\t\t\t}\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, index));\n\t\t\t\t}else{\n\t\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\n\t\t\t\t\tif(!next.isValid()){\n\t\t\t\t\t\tnext = next.fallback();\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.moveTo(next);\n\t\t\t\t}\n\n\t\t\t},\n\t\t\t\"enter\": function(e){\n\t\t\t\tthis.getNode().querySelector(\".dhx_month_head\").click();\n\t\t\t}\n\t\t}\n\t}\n);\n\nscheduler.$keyboardNavigation.MinicalCell.prototype.bindAll(scheduler.$keyboardNavigation.MinicalCell.prototype.keys);\n\n}","export default function(scheduler){\n\nscheduler.$keyboardNavigation.DataArea = function(index){\n\tthis.index = index || 0;\n};\n\nscheduler.$keyboardNavigation.DataArea.prototype = scheduler._compose(\n\tscheduler.$keyboardNavigation.KeyNavNode,\n\t{\n\t\tgetNode: function(index){\n\t\t\treturn scheduler.$container.querySelector(\".dhx_cal_data\");\n\t\t},\n\n\t\t_handlers:null,\n\n\t\tisValid: function(){\n\t\t\treturn true;\n\t\t},\n\t\tfallback:function(){\n\t\t\treturn this;\n\t\t},\n\n\t\tkeys: {\n\t\t\t\"up,down,right,left\":function(){\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\n\t\t\t}\n\t\t}\n\t}\n);\n\nscheduler.$keyboardNavigation.DataArea.prototype.bindAll(scheduler.$keyboardNavigation.DataArea.prototype.keys);\n\n}","export default function(scheduler){\n\nscheduler.$keyboardNavigation.dispatcher = {\n\tisActive: false,\n\tactiveNode: null,\n\tglobalNode: new scheduler.$keyboardNavigation.SchedulerNode(),\n\n\tkeepScrollPosition: function (callback) {\n\t\tvar top, left;\n\n\t\tvar scrollable = scheduler.$container.querySelector(\".dhx_timeline_scrollable_data\");\n\t\tif(!scrollable){\n\t\t\tscrollable = scheduler.$container.querySelector(\".dhx_cal_data\");\n\t\t}\n\n\t\tif(scrollable){\n\t\t\ttop = scrollable.scrollTop;\n\t\t\tleft = scrollable.scrollLeft;\n\t\t}\n\n\t\tcallback();\n\n\t\tif(scrollable){\n\t\t\tscrollable.scrollTop = top;\n\t\t\tscrollable.scrollLeft = left;\n\t\t}\n\t},\n\tenable: function(){\n\t\tif(!scheduler.$container){\n\t\t\t// do nothing if not initialized\n\t\t\treturn;\n\t\t}\n\n\t\tthis.isActive = true;\n\t\tvar self = this;\n\t\tthis.keepScrollPosition(function () {\n\t\t\tself.globalNode.enable();\n\t\t\tself.setActiveNode(self.getActiveNode());\n\t\t});\n\t},\n\n\tdisable: function(){\n\t\tthis.isActive = false;\n\t\tthis.globalNode.disable();\n\t},\n\n\tisEnabled: function(){\n\t\treturn !!this.isActive;\n\t},\n\n\tgetDefaultNode: function(){\n\t\treturn this.globalNode.getDefaultNode();\n\t},\n\n\tsetDefaultNode: function() {\n\t\tthis.setActiveNode(this.getDefaultNode());\n\t},\n\n\tgetActiveNode: function(){\n\t\tvar node = this.activeNode;\n\t\tif(node && !node.isValid()){\n\t\t\tnode = node.fallback();\n\t\t}\n\t\treturn node;\n\t},\n\n\tfocusGlobalNode: function(){\n\t\tthis.blurNode(this.globalNode);\n\t\tthis.focusNode(this.globalNode);\n\t},\n\n\tsetActiveNode: function(el){\n\t\tif(!el || !el.isValid())\n\t\t\treturn;\n\n\t\tif(this.activeNode){\n\t\t\tif(this.activeNode.compareTo(el)){\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif(this.isEnabled()){\n\t\t\tthis.blurNode(this.activeNode);\n\t\t\tthis.activeNode = el;\n\t\t\tthis.focusNode(this.activeNode);\n\t\t}\n\t},\n\n\tfocusNode: function(el){\n\t\tif(el && el.focus){\n\t\t\tel.focus();\n\t\t\tif(el.getNode && document.activeElement != el.getNode()){\n\t\t\t\tthis.setActiveNode(new scheduler.$keyboardNavigation.DataArea());\n\t\t\t}\n\t\t}\n\t},\n\tblurNode: function(el){\n\t\tif(el && el.blur){\n\t\t\tel.blur();\n\t\t}\n\t},\n\n\tgetInlineEditor: function(id){\n\t\tvar editor = scheduler.$container.querySelector(\".dhx_cal_editor[\"+scheduler.config.event_attribute+\"='\"+id+\"'] textarea\");\n\t\tif(editor && editor.offsetWidth){\n\t\t\t// if exists and visible\n\t\t\treturn editor;\n\t\t}\n\t\treturn null;\n\t},\n\n\tkeyDownHandler: function (e) {\n\n\t\tif(e.defaultPrevented){\n\t\t\treturn;\n\t\t}\n\n\t\tvar activeElement = this.getActiveNode();\n\n\t\tif(scheduler.$keyboardNavigation.isModal() &&\n\t\t\t!(activeElement && activeElement.container && scheduler.utils.dom.locateCss({target:activeElement.container}, \"dhx_minical_popup\", false)))\n\t\t\treturn;\n\n\t\tif(scheduler.getState().editor_id && this.getInlineEditor(scheduler.getState().editor_id))\n\t\t\treturn;\n\n\t\tif (!this.isEnabled())\n\t\t\treturn;\n\n\t\te = e || window.event;\n\n\t\tvar schedulerNode = this.globalNode;\n\n\t\tvar command = scheduler.$keyboardNavigation.shortcuts.getCommandFromEvent(e);\n\n\t\tif(!activeElement){\n\t\t\tthis.setDefaultNode();\n\t\t}else if(activeElement.findHandler(command)){\n\t\t\tactiveElement.doAction(command, e);\n\t\t}else if(schedulerNode.findHandler(command)){\n\t\t\tschedulerNode.doAction(command, e);\n\t\t}\n\n\t},\n\n\t_timeout: null,\n\tdelay: function(callback, delay){\n\n\t\tclearTimeout(this._timeout);\n\t\tthis._timeout = setTimeout(callback, delay || 1);\n\n\t}\n};\n\n}","export default function(scheduler){\n\nscheduler.$keyboardNavigation._minicalendars = [];\n\nscheduler.$keyboardNavigation.isMinical = function(node){\n\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\n\tfor(var i = 0; i < minicalendars.length; i++){\n\t\tif(this.isChildOf(node, minicalendars[i]))\n\t\t\treturn true;\n\t}\n\treturn false;\n};\n\nscheduler.$keyboardNavigation.isChildOf = function(child, parent){\n\twhile(child && child !== parent){\n\t\tchild = child.parentNode;\n\t}\n\n\treturn !!(child === parent);\n};\n\nscheduler.$keyboardNavigation.patchMinicalendar = function(){\n\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\n\n\tfunction focusMinical(e){\n\t\tvar target = e.target;\n\n\t\tdispatcher.enable();\n\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.MinicalButton(target, 0));\n\t}\n\n\tfunction minicalClick(e){\n\t\tvar target = e.target || e.srcElement;\n\n\t\tvar prev = scheduler.utils.dom.locateCss(e, \"dhx_cal_prev_button\", false);\n\t\tvar next = scheduler.utils.dom.locateCss(e, \"dhx_cal_next_button\", false);\n\t\tvar cell = scheduler.utils.dom.locateCss(e, \"dhx_year_body\", false);\n\n\t\tvar rowIndex = 0;\n\t\tvar cellIndex = 0;\n\t\tif(cell){\n\t\t\tvar tr;\n\t\t\tvar td;\n\t\t\tvar current = target;\n\t\t\twhile(current && current.tagName.toLowerCase() != \"td\"){\n\t\t\t\tcurrent = current.parentNode;\n\t\t\t}\n\t\t\tif(current){\n\t\t\t\ttd = current;\n\t\t\t\ttr = td.parentNode;\n\t\t\t}\n\n\t\t\tif(tr && td){\n\t\t\t\tvar rows = tr.parentNode.querySelectorAll(\"tr\");\n\t\t\t\tfor(var i = 0; i < rows.length; i++){\n\t\t\t\t\tif(rows[i] == tr){\n\t\t\t\t\t\trowIndex = i;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tvar cells = tr.querySelectorAll(\"td\");\n\t\t\t\tfor(var i = 0; i < cells.length; i++){\n\t\t\t\t\tif(cells[i] == td){\n\t\t\t\t\t\tcellIndex = i;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tvar root = e.currentTarget;\n\t\tdispatcher.delay(function(){\n\t\t\tif(prev || next || cell){\n\n\t\t\t\tvar element;\n\t\t\t\tif(prev){\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalButton(root, 0);\n\t\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.MinicalButton(root, 0));\n\t\t\t\t}else if(next){\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalButton(root, 1);\n\t\t\t\t}else if(cell){\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalCell(root, rowIndex, cellIndex);\n\n\t\t\t\t}\n\n\t\t\t\tif(element){\n\n\t\t\t\t\tdispatcher.enable();\n\t\t\t\t\tif(element.isValid()){\n\t\t\t\t\t\tdispatcher.activeNode = null;\n\t\t\t\t\t\tdispatcher.setActiveNode(element);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t});\n\t}\n\n\tif(scheduler.renderCalendar){\n\t\tvar renderMinical = scheduler.renderCalendar;\n\t\tscheduler.renderCalendar = function(){\n\t\t\tvar cal = renderMinical.apply(this, arguments);\n\t\t\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\n\n\t\t\tscheduler.eventRemove(cal, \"click\", minicalClick);\n\t\t\tscheduler.event(cal, \"click\", minicalClick);\n\n\t\t\tscheduler.eventRemove(cal, \"focus\", focusMinical);\n\t\t\tscheduler.event(cal, \"focus\", focusMinical);\n\n\t\t\tvar added = false;\n\t\t\tfor(var i = 0; i < minicalendars.length; i++){\n\t\t\t\tif(minicalendars[i] == cal){\n\t\t\t\t\tadded = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(!added)\n\t\t\t\tminicalendars.push(cal);\n\n\t\t\tif(dispatcher.isEnabled()){\n\t\t\t\tvar node = dispatcher.getActiveNode();\n\t\t\t\tif(node && node.container == cal){\n\t\t\t\t\tdispatcher.focusNode(node);\n\t\t\t\t}else{\n\t\t\t\t\tcal.setAttribute(\"tabindex\", \"0\");\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tcal.setAttribute(\"tabindex\", \"0\");\n\t\t\t}\n\t\t\treturn cal;\n\t\t};\n\t}\n\n\tif(scheduler.destroyCalendar){\n\t\tvar destroyMinical = scheduler.destroyCalendar;\n\t\tscheduler.destroyCalendar = function(cal, force){\n\t\t\tcal = cal || (scheduler._def_count ? scheduler._def_count.firstChild : null);\n\t\t\tvar res = destroyMinical.apply(this, arguments);\n\n\t\t\tif(!cal || !cal.parentNode){\n\t\t\t\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\n\t\t\t\tfor(var i = 0; i < minicalendars.length; i++){\n\t\t\t\t\tif(minicalendars[i] == cal){\n\t\t\t\t\t\tscheduler.eventRemove(minicalendars[i], \"focus\", focusMinical);\n\t\t\t\t\t\tminicalendars.splice(i, 1);\n\t\t\t\t\t\ti--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn res;\n\t\t};\n\t}\n};\n\n}","export default function(scheduler){\n\nscheduler.attachEvent(\"onTemplatesReady\",function(){\n\n\tthis.layers.sort(function(a, b){\n\t\treturn a.zIndex - b.zIndex;\n\t});\n\n\tscheduler._dp_init=function(dp){\n\t\tdp._methods=[\"_set_event_text_style\",\"\",\"changeEventId\",\"deleteEvent\"];\n\n\t\tthis.attachEvent(\"onEventAdded\",function(id){\n\t\t\tif (!this._loading && this.validId(id) && this.getEvent(id) && this.getEvent(id).layer == dp.layer)\n\t\t\t\tdp.setUpdated(id,true,\"inserted\");\n\t\t});\n\t\tthis.attachEvent(\"onBeforeEventDelete\",function(id){\n\t\t\tif(this.getEvent(id) && this.getEvent(id).layer == dp.layer) {\n\t\t\t\tif (!this.validId(id)) return;\n\t\t\t\tvar z=dp.getState(id);\n\n\t\t\t\tif (z==\"inserted\" || this._new_event) { dp.setUpdated(id,false);\t\treturn true; }\n\t\t\t\tif (z==\"deleted\") return false;\n\t\t\t\tif (z==\"true_deleted\") return true;\n\n\t\t\t\tdp.setUpdated(id,true,\"deleted\");\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse return true;\n\t\t});\n\t\tthis.attachEvent(\"onEventChanged\",function(id){\n\t\t\tif (!this._loading && this.validId(id) && this.getEvent(id) && this.getEvent(id).layer == dp.layer)\n\t\t\t\tdp.setUpdated(id,true,\"updated\");\n\t\t});\n\n\t\tdp._getRowData=function(id,pref){\n\t\t\tvar ev=this.obj.getEvent(id);\n\t\t\tvar data = {};\n\n\t\t\tfor (var a in ev){\n\t\t\t\tif (a.indexOf(\"_\")===0) continue;\n\t\t\t\tif (ev[a] && ev[a].getUTCFullYear) //not very good, but will work\n\t\t\t\t\tdata[a] = this.obj._helpers.formatDate(ev[a]);\n\t\t\t\telse\n\t\t\t\t\tdata[a] = ev[a];\n\t\t\t}\n\t\t\treturn data;\n\t\t};\n\t\tdp._clearUpdateFlag=function(){};\n\n\t\tdp.attachEvent(\"insertCallback\", scheduler._update_callback);\n\t\tdp.attachEvent(\"updateCallback\", scheduler._update_callback);\n\t\tdp.attachEvent(\"deleteCallback\", function(upd, id) {\n\t\t\tthis.obj.setUserData(id, this.action_param, \"true_deleted\");\n\t\t\tthis.obj.deleteEvent(id);\n\t\t});\n\t};\n\n\t(function() {\n var _cloneObj = function(obj){\n if(obj === null || typeof(obj) != 'object')\n return obj;\n var temp = new obj.constructor();\n for(var key in obj)\n temp[key] = _cloneObj(obj[key]);\n return temp;\n };\n\n\t\tscheduler._dataprocessors = [];\n\t\tscheduler._layers_zindex = {};\n\t\tfor(var i=0; i= scheduler.config.collision_limit);\n\t});\n\n\tscheduler.addEvent=function(start_date,end_date,text,id,extra_data){\n\t\tvar ev=start_date;\n\t\tif (arguments.length!=1){\n\t\t\tev=extra_data||{};\n\t\t\tev.start_date=start_date;\n\t\t\tev.end_date=end_date;\n\t\t\tev.text=text;\n\t\t\tev.id=id;\n\t\t\tev.layer = this.defaultLayer;\n\t\t}\n\t\tev.id = ev.id||scheduler.uid();\n\t\tev.text = ev.text||\"\";\n\n\n\t\tif (typeof ev.start_date == \"string\") ev.start_date=this.templates.api_date(ev.start_date);\n\t\tif (typeof ev.end_date == \"string\") ev.end_date=this.templates.api_date(ev.end_date);\n\t\tev._timed=this.isOneDayEvent(ev);\n\n\t\tvar is_new=!this._events[ev.id];\n\t\tthis._events[ev.id]=ev;\n\t\tthis.event_updated(ev);\n\t\tif (!this._loading)\n\t\t\tthis.callEvent(is_new?\"onEventAdded\":\"onEventChanged\",[ev.id,ev]);\n\t};\n\n\tthis._evs_layer = {};\n\tfor (var i = 0; i < this.layers.length; i++) { // array in object for each layer\n\t\tthis._evs_layer[this.layers[i].name] = [];\n\t}\n\n\tscheduler.addEventNow=function(start,end,e){\n\t\tvar base = {};\n\t\tif (typeof start == \"object\"){\n\t\t\tbase = start;\n\t\t\tstart = null;\n\t\t}\n\n\t\tvar d = (this.config.event_duration||this.config.time_step)*60000;\n\t\tif (!start) start = Math.round((scheduler._currentDate()).valueOf()/d)*d;\n\t\tvar start_date = new Date(start);\n\t\tif (!end){\n\t\t\tvar start_hour = this.config.first_hour;\n\t\t\tif (start_hour > start_date.getHours()){\n\t\t\t\tstart_date.setHours(start_hour);\n\t\t\t\tstart = start_date.valueOf();\n\t\t\t}\n\t\t\tend = start+d;\n\t\t}\n\n\n\t\tbase.start_date = base.start_date||start_date;\n\t\tbase.end_date = base.end_date||new Date(end);\n\t\tbase.text = base.text||this.locale.labels.new_event;\n\t\tbase.id = this._drag_id = this.uid();\n\t\tbase.layer = this.defaultLayer;\n\t\tthis._drag_mode=\"new-size\";\n\n\t\tthis._loading=true;\n\t\tthis.addEvent(base);\n\t\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\n\t\tthis._loading=false;\n\n\t\tthis._drag_event={}; //dummy , to trigger correct event updating logic\n\t\tthis._on_mouse_up(e);\n\t};\n\n\tscheduler._t_render_view_data = function(events) { // helper\n\t\tif (this.config.multi_day && !this._table_view) {\n\t\t\tvar tvs = [];\n\t\t\tvar tvd = [];\n\t\t\tfor (var k = 0; k < events.length; k++) {\n\t\t\t\tif (events[k]._timed)\n\t\t\t\t\ttvs.push(events[k]);\n\t\t\t\telse\n\t\t\t\t\ttvd.push(events[k]);\n\t\t\t}\n\t\t\tthis._table_view = true;\n\t\t\tthis.render_data(tvd);\n\t\t\tthis._table_view = false;\n\t\t\tthis.render_data(tvs);\n\t\t}\n\t\telse\n\t\t\tthis.render_data(events);\n\t};\n\n\tscheduler.render_view_data = function(){\n\t\tif (this._not_render) {\n\t\t\tthis._render_wait = true;\n\t\t\treturn;\n\t\t}\n\t\tthis._render_wait = false;\n\n\t\tthis.clear_view();\n\n\t\tthis._evs_layer = {};\n\t\tfor (var i = 0; i < this.layers.length; i++) { // array in object for each layer\n\t\t\tthis._evs_layer[this.layers[i].name] = [];\n\t\t}\n\n\t\tvar evs = this.get_visible_events();\n\t\tfor (var i = 0; i < evs.length; i++) { // filling layer arrays with events\n\t\t\tif(this._evs_layer[evs[i].layer])\n\t\t\t\tthis._evs_layer[evs[i].layer].push(evs[i]);\n\t\t}\n\n\t\tif(this._mode == 'month') { // old logic is used\n\t\t\tvar tevs = [];\n\t\t\tfor (var i = 0; i < this.layers.length; i++) {\n\t\t\t\tif (this.layers[i].visible)\n\t\t\t\t\ttevs = tevs.concat(this._evs_layer[this.layers[i].name]);\n\t\t\t}\n\t\t\tthis._t_render_view_data(tevs);\n\t\t}\n\t\telse { // week, day; should use new logic\n\t\t\tfor (var i = 0; i < this.layers.length; i++) {\n\t\t\t\tif (this.layers[i].visible) {\n\t\t\t\t\tvar evs_layer = this._evs_layer[this.layers[i].name];\n\t\t\t\t\tthis._t_render_view_data(evs_layer);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n\tscheduler._render_v_bar=function(ev,x,y,w,h,style,contentA,contentB,bottom){\n\t\tvar id = ev.id;\n\n\t\tif(contentA.indexOf('
';\n\t\thtml+='
 
';\n\t\thtml+='
'+contentA+'
';\n\t\thtml+='
'+contentB+'
';\n\t\thtml+='
';\n\n\t\td.innerHTML=html;\n\t\td.style.zIndex = 100;\n\t\treturn d.firstChild;\n\t};\n\n\tscheduler.render_event_bar=function(ev){\n\t\tvar parent=this._els[\"dhx_cal_data\"][0];\n\n\t\tvar x=this._colsS[ev._sday];\n\t\tvar x2=this._colsS[ev._eday];\n\t\tif (x2==x) x2=this._colsS[ev._eday+1];\n\t\tvar hb = this.xy.bar_height;\n\n\t\tvar y=this._colsS.heights[ev._sweek]+(this._colsS.height?(this.xy.month_scale_height+2):2)+ev._sorder*hb;\n\n\t\tvar d=document.createElement(\"div\");\n\t\tvar cs = ev._timed?\"dhx_cal_event_clear\":\"dhx_cal_event_line\";\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);\n\t\tif (cse) cs=cs+\" \"+cse;\n\n\t\tvar html='
';\n\n\t\tif (ev._timed)\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);\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) + '
)');\n\t\thtml+='';\n\n\t\td.innerHTML=html;\n\n\t\tthis._rendered.push(d.firstChild);\n\t\tparent.appendChild(d.firstChild);\n\t};\n\n\tscheduler.render_event=function(ev){\n\t\tvar menu = scheduler.xy.menu_width;\n\t\tif(scheduler.getLayer(ev.layer).noMenu)\n\t\t\tmenu = 0;\n\n\t\tif (ev._sday<0) return; //can occur in case of recurring event during time shift\n\t\tvar parent=scheduler.locate_holder(ev._sday);\n\t\tif (!parent) return; //attempt to render non-visible event\n\t\tvar sm = ev.start_date.getHours()*60+ev.start_date.getMinutes();\n\t\tvar em = (ev.end_date.getHours()*60+ev.end_date.getMinutes())||(scheduler.config.last_hour*60);\n\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\n\t\tvar height = Math.max(scheduler.xy.min_event_height,(em-sm)*this.config.hour_size_px/60)+1; //42px/hour\n\t\t\n\t\tvar width=Math.floor((parent.clientWidth-menu)/ev._count);\n\t\tvar left=ev._sorder*width+1;\n\t\tif (!ev._inner) width=width*(ev._count-ev._sorder);\n\n\n\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));\n\n\t\tthis._rendered.push(d);\n\t\tparent.appendChild(d);\n\n\t\tleft=left+parseInt(parent.style.left,10)+menu;\n\n\t\ttop+=this._dy_shift; //corrupt top, to include possible multi-day shift\n\t\td.style.zIndex = this._layers_zindex[ev.layer];\n\n\t\tif (this._edit_id==ev.id){\n\t\t\td.style.zIndex = parseInt(d.style.zIndex)+1; //fix overlapping issue\n\t\t\tvar new_zIndex = d.style.zIndex;\n\t\t\twidth=Math.max(width-4,scheduler.xy.editor_width);\n\t\t\tvar d=document.createElement(\"div\");\n\t\t\td.setAttribute(\"event_id\",ev.id); // for backward compatibility\n\t\t\td.setAttribute(this.config.event_attribute,ev.id);\n\t\t\tthis.set_xy(d,width,height-20,left,top+14);\n\t\t\td.className=\"dhx_cal_editor\";\n\t\t\td.style.zIndex = new_zIndex;\n\t\t\tvar d2=document.createElement(\"div\");\n\t\t\tthis.set_xy(d2,width-6,height-26);\n\t\t\td2.style.cssText+=\";margin:2px 2px 2px 2px;overflow:hidden;\";\n\n\n\t\t\td2.style.zIndex = new_zIndex;\n\t\t\td.appendChild(d2);\n\t\t\tthis._els[\"dhx_cal_data\"][0].appendChild(d);\n\t\t\tthis._rendered.push(d);\n\n\t\t\td2.innerHTML=\"\";\n\n\t\t\tthis._editor=d2.firstChild;\n\t\t\tthis._editor.addEventListener(\"keypress\", function(e){\n\t\t\t\tif (e.shiftKey) return true;\n\t\t\t\tvar code= e.keyCode;\n\t\t\t\tif (code==scheduler.keys.edit_save) scheduler.editStop(true);\n\t\t\t\tif (code==scheduler.keys.edit_cancel) scheduler.editStop(false);\n\t\t\t});\n\t\t\tthis._editor.addEventListener(\"selectstart\", function(e){ e.cancelBubble=true; return true; });\n\t\t\td2.firstChild.focus();\n\t\t\t//IE and opera can add x-scroll during focusing\n\t\t\tthis._els[\"dhx_cal_data\"][0].scrollLeft=0;\n\t\t\td2.firstChild.select();\n\t\t}\n\t\tif (this._select_id==ev.id){\n\t\t\td.style.zIndex = parseInt(d.style.zIndex)+1; //fix overlapping issue\n\t\t\tvar icons=this.config[\"icons_\"+((this._edit_id==ev.id)?\"edit\":\"select\")];\n\t\t\tvar icons_str=\"\";\n\t\t\tfor (var i=0; i\";\n\t\t\tvar obj = this._render_v_bar(ev.id,left-menu+1,top,menu,icons.length*20+26,\"\",\"
\",icons_str,true);\n\t\t\tobj.style.left=left-menu+1;\n\t\t\tobj.style.zIndex = d.style.zIndex;\n\t\t\tthis._els[\"dhx_cal_data\"][0].appendChild(obj);\n\t\t\tthis._rendered.push(obj);\n\t\t}\n\n\t};\n\n scheduler.filter_agenda = function(id, event) {\n var layer = scheduler.getLayer(event.layer);\n return (layer && layer.visible);\n };\n});\n\n\n}","export default function(scheduler){\n\nscheduler.config.limit_start = null;\nscheduler.config.limit_end = null;\nscheduler.config.limit_view = false;\nscheduler.config.check_limits = true;\nscheduler.config.mark_now = true;\nscheduler.config.display_marked_timespans = true;\nscheduler.config.overwrite_marked_timespans = true;\nscheduler._temp_limit_scope = function(){\n\tvar before = null;\n\tvar dhx_time_block = \"dhx_time_block\";\n\tvar default_timespan_type = \"default\";\n\tvar fix_options = function(options, days, zones) {\n\t\tif (days instanceof Date && zones instanceof Date) {\n\t\t\toptions.start_date = days;\n\t\t\toptions.end_date = zones;\n\t\t} else {\n\t\t\toptions.days = days;\n\t\t\toptions.zones = zones;\n\t\t}\n\t\treturn options;\n\t};\n\tvar get_resulting_options = function(days, zones, sections) {\n\t\tvar options = (typeof days == \"object\") ? days : { days: days };\n\t\toptions.type = dhx_time_block;\n\t\toptions.css = \"\";\n\t\tif (zones) {\n\t\t\tif (sections)\n\t\t\t\toptions.sections = sections;\n\t\t\toptions = fix_options(options, days, zones);\n\t\t}\n\t\treturn options;\n\t};\n\tscheduler.blockTime = function(days, zones, sections){\n\t\tvar options = get_resulting_options(days, zones, sections);\n\t\treturn scheduler.addMarkedTimespan(options);\n\t};\n\tscheduler.unblockTime = function(days, zones, sections) {\n\t\tzones = zones || \"fullday\";\n\t\tvar options = get_resulting_options(days, zones, sections);\n\t\treturn scheduler.deleteMarkedTimespan(options);\n\t};\n\tscheduler.attachEvent(\"onBeforeViewChange\",function(om,od,nm,nd){\n\n\t\tfunction isBlocked(date, mode){\n\t\t\tvar limit_start = scheduler.config.limit_start,\n\t\t\t\tlimit_end = scheduler.config.limit_end,\n\t\t\t\tdate_end = scheduler.date.add(date,1,mode);\n\n\t\t\treturn (date.valueOf() > limit_end.valueOf() || date_end <= limit_start.valueOf());\n\t\t}\n\n\t\tif (scheduler.config.limit_view){\n\t\t\tnd = nd||od; nm = nm||om;\n\t\t\tif (isBlocked(nd, nm) && !(od.valueOf() == nd.valueOf())){\n\t\t\t\tsetTimeout(function(){\n\t\t\t\t\tif(scheduler.$destroyed){\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tvar resetDate = !isBlocked(od, nm) ? od : scheduler.config.limit_start;\n\n\t\t\t\t\tscheduler.setCurrentView(!isBlocked(resetDate, nm) ? resetDate : null, nm);\n\t\t\t\t},1);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t});\n\tscheduler.checkInMarkedTimespan = function(ev, timespan_type, on_overlap){\n\t\ttimespan_type = timespan_type || default_timespan_type;\n\n\t\tvar res = true;\n\t\tvar temp_start_date = new Date(ev.start_date.valueOf());\n\t\tvar temp_end_date = scheduler.date.add(temp_start_date, 1, \"day\");\n\t\tvar timespans = scheduler._marked_timespans;\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\") ) {\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\n\t\t\tvar day_index = temp_start_date.getDay();\n\n\t\t\tvar zones = getZones(ev, timespans, day_index, day_value, timespan_type);\n\t\t\tif (zones){\n\t\t\t\tfor (var i = 0; i < zones.length; i+=2) {\n\n\t\t\t\t\t// they may change for new event if it passes limit zone\n\t\t\t\t\tvar eventStart = scheduler._get_zone_minutes(temp_start_date);\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);\n\n\t\t\t\t\tvar markerStart = zones[i];\n\t\t\t\t\tvar markerEnd = zones[i+1];\n\t\t\t\t\tif (markerStarteventStart) {\n\t\t\t\t\t\tif(typeof on_overlap == \"function\"){\n\t\t\t\t\t\t\t//handler allows to cancel overlapping\n\t\t\t\t\t\t\t//actually needed only to keep default behavior of limits\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\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tres = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(!res)\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn !res;\n\t};\n\tvar blocker = scheduler.checkLimitViolation = function(event){\n\t\tif(!event)\n\t\t\treturn true;\n\t\tif (!scheduler.config.check_limits)\n\t\t\treturn true;\n\t\tvar s = scheduler;\n\t\tvar c = s.config;\n\t\tvar evs = [];\n\t\tif (event.rec_type) {\n\t\t\tvar dates = scheduler.getRecDates(event);\n\t\t\tfor(var i=0; i < dates.length; i++){\n\t\t\t\tvar ev = scheduler._copy_event(event);\n\t\t\t\tscheduler._lame_copy(ev, dates[i]);\n\t\t\t\tevs.push(ev);\n\t\t\t}\n\n\t\t} else {\n\t\t\tevs = [event];\n\t\t}\n\n\t\tvar complete_res = true;\n\t\tfor (var p=0; p= c.limit_start.valueOf() && ev.end_date.valueOf() <= c.limit_end.valueOf()) : true;\n\t\t\tif (res){\n\t\t\t\tres = !scheduler.checkInMarkedTimespan(ev, dhx_time_block, function(event, eventStart, eventEnd, markerStart, markerEnd){\n\t\t\t\t\t//try crop event to allow placing\n\t\t\t\t\tvar allow = true;\n\t\t\t\t\tif (eventStart<=markerEnd && eventStart >= markerStart){\n\t\t\t\t\t\tif (markerEnd == 24*60 || eventEnd <= markerEnd){\n\t\t\t\t\t\t\tallow = false;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif(event._timed && s._drag_id && s._drag_mode == \"new-size\"){\n\t\t\t\t\t\t\tevent.start_date.setHours(0);\n\t\t\t\t\t\t\tevent.start_date.setMinutes(markerEnd);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tallow = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ((eventEnd >= markerStart && eventEnd <= markerEnd) || (eventStart < markerStart && eventEnd > markerEnd)){\n\t\t\t\t\t\tif(event._timed && s._drag_id && s._drag_mode == \"new-size\"){\n\t\t\t\t\t\t\tevent.end_date.setHours(0);\n\t\t\t\t\t\t\tevent.end_date.setMinutes(markerStart);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tallow = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn allow;\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (!res) {\n\t\t\t\tres = (s.checkEvent(\"onLimitViolation\")) ? s.callEvent(\"onLimitViolation\",[ev.id, ev]) : res;\n\t\t\t}\n\t\t\tcomplete_res = complete_res && res;\n\t\t}\n\t\tif(!complete_res){\n\t\t\ts._drag_id = null;\n\t\t\ts._drag_mode = null;\n\t\t}\n\t\treturn complete_res;\n\n\n\t};\n\tscheduler._get_blocked_zones = function(timespans, property, day_index, day_value, timespan_type){\n\t\tvar zones =[];\n\t\tif (timespans && timespans[property]) {\n\t\t\tvar timeline_zones = timespans[property];\n\t\t\tvar blocked_timeline_zones = this._get_relevant_blocked_zones(day_index, day_value, timeline_zones, timespan_type);\n\t\t\tfor (var i=0; i= scheduler.config.limit_end.valueOf()) {\n\t\t\t\tev.start_date = this.date.add(scheduler.config.limit_end, -1, \"day\");\n\t\t\t}\n\t\t\tif (ev.end_date < scheduler.config.limit_start) {\n\t\t\t\tev.end_date = new Date(scheduler.config.limit_start);\n\t\t\t}\n\t\t\tif (ev.end_date.valueOf() >= scheduler.config.limit_end.valueOf()) {\n\t\t\t\tev.end_date = this.date.add(scheduler.config.limit_end, -1, \"day\");\n\t\t\t}\n\t\t\tif (ev.start_date.valueOf() >= ev.end_date.valueOf()) {\n\t\t\t\tev.end_date = this.date.add(ev.start_date, (this.config.event_duration||this.config.time_step), \"minute\");\n\t\t\t}\n\t\t\tev._timed=this.isOneDayEvent(ev);\n\t\t}\n\t\treturn true;\n\t});\n\tscheduler.attachEvent(\"onEventChanged\",function(id){\n\t\tif (!id) return true;\n\t\tvar ev = scheduler.getEvent(id);\n\t\tif (!blocker(ev)){\n\t\t\tif (!before) return false;\n\t\t\tev.start_date = before[0];\n\t\t\tev.end_date = before[1];\n\t\t\tev._timed=this.isOneDayEvent(ev);\n\t\t}\n\t\treturn true;\n\t});\n\tscheduler.attachEvent(\"onBeforeEventChanged\",function(ev, native_object, is_new){\n\t\treturn blocker(ev);\n\t});\n\tscheduler.attachEvent(\"onBeforeEventCreated\", function(ev) { // native event\n\t\tvar start_date = scheduler.getActionData(ev).date;\n\t\tvar event = {\n\t\t\t_timed: true,\n\t\t\tstart_date: start_date,\n\t\t\tend_date: scheduler.date.add(start_date, scheduler.config.time_step, \"minute\")\n\t\t};\n\t\treturn blocker(event);\n\t});\n\n\tscheduler.attachEvent(\"onViewChange\", function(){\n\t\tscheduler._mark_now();\n\t});\n\n\tscheduler.attachEvent(\"onAfterSchedulerResize\", function(){\n\t\twindow.setTimeout(function(){ \n\t\t\tif(scheduler.$destroyed){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tscheduler._mark_now(); \n\t\t}, 1);\n\t\treturn true;\n\t});\n\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\n\t\tscheduler._mark_now_timer = window.setInterval(function() {\n\t\t\tif(!scheduler._is_initialized())\n\t\t\t\treturn;\n\t\t\tscheduler._mark_now();\n\t\t}, 60000);\n\t});\n\tscheduler.attachEvent(\"onDestroy\", function(){\n\t\tclearInterval(scheduler._mark_now_timer);\n\t});\n\tscheduler._mark_now = function(hide) {\n\t\t// day, week, units views\n\t\tvar dhx_now_time = 'dhx_now_time';\n\t\tif (!this._els[dhx_now_time]) {\n\t\t\tthis._els[dhx_now_time] = [];\n\t\t}\n\t\tvar now = scheduler._currentDate();\n\t\tvar cfg = this.config;\n\t\tscheduler._remove_mark_now(); // delete previous marks if they exist\n\t\tif (!hide && cfg.mark_now && now < this._max_date && now > this._min_date && now.getHours() >= cfg.first_hour && now.getHours() 1) {\n\t\t\t\t\tif(view.size && view.options.length){\n\t\t\t\t\t\tday_index = ((view.position+ day_index) / view.options.length) * view.size;\n\t\t\t\t\t}\n\t\t\t\t\tstart_index = day_index;\n\t\t\t\t\tend_index = day_index + units_l;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tstart_index = 0;\n\t\t\t\t\tend_index = start_index + units_l;\n\t\t\t\t}\n\n\t\t\t\tvar r_divs = [];\n\n\t\t\t\tfor (var i = start_index; i < end_index; i++) {\n\t\t\t\t\tvar t_day = i; // as each unit is actually considered +1 day\n\t\t\t\t\toptions.days = t_day;\n\t\t\t\t\tvar t_div = scheduler._render_marked_timespan(options, null, t_day)[0];\n\t\t\t\t\tr_divs.push(t_div);\n\t\t\t\t}\n\t\t\t\treturn r_divs;\n\t\t\t} else { // day/week views\n\t\t\t\toptions.days = day_index;\n\t\t\t\treturn scheduler._render_marked_timespan(options, null, day_index);\n\t\t\t}\n\t\t} else {\n\t\t\tif (this._mode == \"month\") {\n\t\t\t\toptions.days = +scheduler.date.date_part(now);\n\t\t\t\treturn scheduler._render_marked_timespan(options, null, null);\n\t\t\t}\n\t\t}\n\t};\n\tscheduler._remove_mark_now = function() {\n\t\tvar dhx_now_time = 'dhx_now_time';\n\t\tvar els = this._els[dhx_now_time];\n\t\tfor (var i=0; i config.start_date) || (config.days !== undefined && config.zones)) && !config.type )\n\t\t\treturn r_configs; // incorrect config was provided\n\n\t\tvar min = 0;\n\t\tvar max = 24*60;\n\t\tif (config.zones == \"fullday\")\n\t\t\tconfig.zones = [min, max];\n\t\tif (config.zones && config.invert_zones) {\n\t\t\tconfig.zones = scheduler.invertZones(config.zones);\n\t\t}\n\n\t\tconfig.id = scheduler.uid();\n\t\tconfig.css = config.css||\"\";\n\t\tconfig.type = config.type||default_timespan_type;\n\n\t\tvar sections = config.sections;\n\t\tif (sections) {\n\t\t\tfor (var view_key in sections) {\n\t\t\t\tif (sections.hasOwnProperty(view_key)) {\n\t\t\t\t\tvar ids = sections[view_key];\n\t\t\t\t\tif (!(ids instanceof Array))\n\t\t\t\t\t\tids = [ids];\n\t\t\t\t\tfor (var i=0; i t_sd) ? scheduler._get_zone_minutes(start_date) : min;\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);\n\t\t\t\t\tt_config.zones = [zone_start, zone_end];\n\t\t\t\t\tr_configs.push(t_config);\n\n\t\t\t\t\tt_sd = t_ed;\n\t\t\t\t\tt_ed = scheduler.date.add(t_ed, 1, \"day\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (c_config.days instanceof Date)\n\t\t\t\t\tc_config.days = (scheduler.date.date_part(c_config.days)).valueOf();\n\t\t\t\tc_config.zones = config.zones.slice();\n\t\t\t\tr_configs.push(c_config);\n\t\t\t}\n\t\t}\n\t\treturn r_configs;\n\t};\n\tscheduler._get_dates_by_index = function(index, start, end) {\n\t\tvar dates = [];\n\t\tstart = scheduler.date.date_part(new Date(start||scheduler._min_date));\n\t\tend = new Date(end||scheduler._max_date);\n\t\tvar start_day = start.getDay();\n\t\tvar delta = (index-start_day >= 0) ? (index-start_day) : (7-start.getDay()+index);\n\t\tvar t_date = scheduler.date.add(start, delta, \"day\");\n\t\tfor (; t_date < end; t_date = scheduler.date.add(t_date, 1, \"week\")) {\n\t\t\tdates.push(t_date);\n\t\t}\n\t\treturn dates;\n\t};\n\tscheduler._get_css_classes_by_config = function(config) {\n\t\tvar css_classes = [];\n\t\tif (config.type == dhx_time_block) {\n\t\t\tcss_classes.push(dhx_time_block);\n\t\t\tif (config.css)\n\t\t\t\tcss_classes.push(dhx_time_block+\"_reset\");\n\t\t}\n\t\tcss_classes.push(\"dhx_marked_timespan\", config.css);\n\t\treturn css_classes.join(\" \");\n\t};\n\tscheduler._get_block_by_config = function(config) {\n\t\tvar block = document.createElement(\"div\");\n\t\tif (config.html) {\n\t\t\tif (typeof config.html == \"string\")\n\t\t\t\tblock.innerHTML = config.html;\n\t\t\telse\n\t\t\t\tblock.appendChild(config.html);\n\t\t}\n\t\treturn block;\n\t};\n\tscheduler._render_marked_timespan = function(options, area, day) {\n\t\tvar blocks = []; // resulting block which will be rendered and returned\n\t\tvar c = scheduler.config;\n\t\tvar min_date = this._min_date;\n\t\tvar max_date = this._max_date;\n\t\tvar day_value = false; // if timespan for specific date should be displayed\n\n\t\tif (!c.display_marked_timespans)\n\t\t\treturn blocks;\n\n\t\t// in case of markTimespan\n\t\tif (!day && day !== 0) {\n\t\t\tif (options.days < 7)\n\t\t\t\tday = options.days;\n\t\t\telse {\n\t\t\t\tvar date_to_display = new Date(options.days);\n\t\t\t\tday_value = +date_to_display;\n\n\t\t\t\t// in case of markTimespan date could be not in the viewing range, need to return\n\t\t\t\tif ( !(+max_date > +date_to_display && +min_date <= +date_to_display) )\n\t\t\t\t\treturn blocks;\n\n\t\t\t\tday = date_to_display.getDay();\n\t\t\t}\n\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)\n\t\t\tvar min_day = min_date.getDay();\n\t\t\tif (min_day > day) {\n\t\t\t\tday = 7 - (min_day-day);\n\t\t\t} else {\n\t\t\t\tday = day - min_day;\n\t\t\t}\n\t\t}\n\t\tvar zones = options.zones;\n\t\tvar css_classes = scheduler._get_css_classes_by_config(options);\n\n\t\tif (scheduler._table_view && scheduler._mode == \"month\") {\n\t\t\tvar areas = [];\n\t\t\tvar days = [];\n\n\n\t\t\tif (!area) {\n\t\t\t\tdays = (day_value) ? [day_value] : scheduler._get_dates_by_index(day);\n\t\t\t\tfor (var i=0; i < days.length; i++) {\n\t\t\t\t\tareas.push( this._scales[days[i]] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tareas.push(area);\n\t\t\t\tdays.push(day);\n\t\t\t}\n\n\t\t\tfor (var i=0; i < areas.length; i++) {\n\t\t\t\tarea = areas[i];\n\t\t\t\tday = days[i];\n\n\t\t\t\tvar sday = this.locate_holder_day(day, false) % this._cols.length;\n\n\t\t\t\tif(this._ignores[sday]) continue;\n\n\t\t\t\tvar block_proto = scheduler._get_block_by_config(options);\n\t\t\t\tblock_proto.className = css_classes;\n\t\t\t\tblock_proto.style.top = \"0px\";\n\t\t\t\tblock_proto.style.height = \"100%\";\n\t\t\t\t\n\t\t\t\tfor (var k=0; k < zones.length; k+=2) {\n\t\t\t\t\tvar start = zones[i];\n\t\t\t\t\tvar end = zones[i+1];\n\t\t\t\t\tif (end <= start)\n\t\t\t\t\t\treturn [];\n\n\t\t\t\t\tvar block = block_proto.cloneNode(true);\n\n\t\t\t\t\tblock.style.left = \"0px\";\n\t\t\t\t\tblock.style.width = \"100%\";\n\n\t\t\t\t\tarea.appendChild(block);\n\t\t\t\t\tblocks.push(block);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tvar index = day;\n\n\t\t\tif(this._ignores[this.locate_holder_day(day, false)]) return blocks;\n\n\t\t\tif (this._props && this._props[this._mode] && options.sections && options.sections[this._mode]) {\n\t\t\t\tvar view = this._props[this._mode];\n\t\t\t\tindex = view.order[options.sections[this._mode]];\n\n\t\t\t\tvar inner_index = view.order[options.sections[this._mode]];\n\t\t\t\tif(!(view.days > 1)){\n\t\t\t\t\tindex = inner_index;\n\t\t\t\t\tif (view.size && (index > view.position+view.size)) {\n\t\t\t\t\t\tindex = 0;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tvar units_l = view.size || view.options.length;\n\t\t\t\t\tindex = index*units_l + inner_index;\n\t\t\t\t}\n\t\t\t}\n\t\t\tarea = area ? area : scheduler.locate_holder(index);\n\n\t\t\tfor (var i = 0; i < zones.length; i+=2){\n\t\t\t\tvar start = Math.max(zones[i], c.first_hour*60);\n\t\t\t\tvar end = Math.min(zones[i+1], c.last_hour*60);\n\t\t\t\tif (end <= start) {\n\t\t\t\t\tif (i+2 < zones.length)\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\telse\n\t\t\t\t\t\treturn [];\n\t\t\t\t}\n\n\t\t\t\tvar block = scheduler._get_block_by_config(options);\n\t\t\t\tblock.className = css_classes;\n\n\t\t\t\t// +1 for working with section which really takes up whole height (as % would be == 0)\n\t\t\t\tvar all_hours_height = this.config.hour_size_px*24 + 1;\n\t\t\t\tvar hour_ms = 60*60*1000;\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\";\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\";\n\n\t\t\t\tarea.appendChild(block);\n\t\t\t\tblocks.push(block);\n\t\t\t}\n\t\t}\n\t\treturn blocks;\n\t};\n\n\tscheduler._mark_timespans = function(){\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\n\t\tvar divs = [];\n\t\tif (scheduler._table_view && scheduler._mode == \"month\"){\n\t\t\tfor (var day in this._scales) {\n\t\t\t\tvar date = new Date(+day);\n\t\t\t\tdivs.push.apply(divs, scheduler._on_scale_add_marker(this._scales[day],date));\n\t\t\t}\n\t\t}else {\n\t\t\t//manually trigger rendering of configs for each column\n\t\t\tvar date = new Date(scheduler._min_date);\n\t\t\tfor (var i = 0, len = data.childNodes.length; i < len; i++) {\n\t\t\t\tvar area = data.childNodes[i];\n\t\t\t\tif (area.firstChild && scheduler._getClassName(area.firstChild).indexOf(\"dhx_scale_hour\") > -1) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tdivs.push.apply(divs, scheduler._on_scale_add_marker(area, date));\n\t\t\t\tdate = scheduler.date.add(date, 1, \"day\");\n\t\t\t}\n\t\t}\n\t\treturn divs;\n\t};\n\n\t// just marks timespan, will be cleaned after refresh\n\tscheduler.markTimespan = function(configuration) {\n\n\t\tif(!this._els){\n\t\t\tthrow new Error(\"`scheduler.markTimespan` can't be used before scheduler initialization. Place `scheduler.markTimespan` call after `scheduler.init`.\");\n\t\t}\n\n\t\tvar rebuild_els = false;\n\t\tif(!this._els[\"dhx_cal_data\"]){\n\t\t\tscheduler.get_elements();\n\t\t\trebuild_els = true;\n\t\t}\n\n\n\t\t// backup regular marked timespans\n\t\tvar timespans_ids = scheduler._marked_timespans_ids,\n\t\t\ttimespan_types = scheduler._marked_timespans_types,\n\t\t\ttimespans = scheduler._marked_timespans;\n\n\t\tscheduler.deleteMarkedTimespan();\n\n\t\t//add block to configs\n\t\tscheduler.addMarkedTimespan(configuration);\n\n\t\tvar divs = scheduler._mark_timespans();\n\n\t\tif(rebuild_els)\n\t\t\tscheduler._els = [];\n\n\t\t// restore timespan config\n\t\tscheduler._marked_timespans_ids = timespans_ids;\n\t\tscheduler._marked_timespans_types = timespan_types;\n\t\tscheduler._marked_timespans = timespans;\n\n\t\treturn divs;\n\t};\n\tscheduler.unmarkTimespan = function(divs) {\n\t\tif (!divs)\n\t\t\treturn;\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)) {\n\t\t\t\t\tresulting_zones[i] = Math.min(c_zone_start, zone_start);\n\t\t\t\t\tresulting_zones[i+1] = Math.max(c_zone_end, zone_end);\n\t\t\t\t\ti -= 2;\n\t\t\t\t} else {\n\t\t\t\t\tif (!isLast) // do nothing, maybe next current zone will match or will be last\n\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\tvar offset = (c_zone_start > zone_start)?0:2;\n\t\t\t\t\tresulting_zones.splice(i+offset, 0, zone_start, zone_end); // last current zone, need to add another\n\t\t\t\t}\n\t\t\t\tzones.splice(k--,2); // zone was merged or added, need to exclude it\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn resulting_zones;\n\t};\n\tscheduler._subtract_timespan_zones = function(current_zones, zones) {\n\t\tvar resulting_zones = current_zones.slice();\n\t\tfor (var i=0; i c_zone_start && zone_start < c_zone_end) {\n\t\t\t\t\tvar is_modified = false;\n\t\t\t\t\tif (c_zone_start >= zone_start && c_zone_end <= zone_end) {\n\t\t\t\t\t\tresulting_zones.splice(i, 2);\n\t\t\t\t\t}\n\t\t\t\t\tif (c_zone_start < zone_start) {\n\t\t\t\t\t\tresulting_zones.splice(i, 2, c_zone_start, zone_start);\n\t\t\t\t\t\tis_modified = true;\n\t\t\t\t\t}\n\t\t\t\t\tif (c_zone_end > zone_end) {\n\t\t\t\t\t\tresulting_zones.splice( (is_modified)?(i+2):i, (is_modified)?0:2, zone_end, c_zone_end);\n\t\t\t\t\t}\n\t\t\t\t\ti -= 2;\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn resulting_zones;\n\t};\n\tscheduler.invertZones = function(zones) {\n\t\treturn scheduler._subtract_timespan_zones([0, 1440], zones.slice());\n\t};\n\tscheduler._delete_marked_timespan_by_id = function(id) {\n\t\tvar configs = scheduler._marked_timespans_ids[id];\n\t\tif (configs) {\n\t\t\tfor (var i=0; i 1)){\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\n\t\t\t}else{\n\t\t\t\tvar dx = 24*60*60*1000;\n\t\t\t\tvar day_ind = Math.round((day - scheduler._min_date)/dx);\n\t\t\t\tvar unitsPerDay = view.size || units.length;\n\t\t\t\tday = scheduler.date.add(scheduler._min_date, Math.floor(day_ind/unitsPerDay), \"day\"); // to the \"same\" day for all sections\n\t\t\t\tday = scheduler.date.date_part(day);\n\t\t\t}\n\t\t\tday_index = day.getDay();\n\t\t\tday_value = day.valueOf();\n\n\t\t\tif (timespans[mode] && timespans[mode][unit.key]) {\n\t\t\t\tvar unit_zones = timespans[mode][unit.key];\n\t\t\t\tvar unit_types = scheduler._get_types_to_render(unit_zones[day_index], unit_zones[day_value]);\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(unit_types));\n\t\t\t}\n\t\t}\n\n\t\tvar global_data = timespans[\"global\"];\n\n\t\tif(scheduler.config.overwrite_marked_timespans){\n\t\t\tvar day_types = global_data[day_value]||global_data[day_index];\n\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(day_types));\n\t\t} else {\n\t\t\tif(global_data[day_value]){\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(global_data[day_value]));\n\t\t\t}\n\t\t\tif(global_data[day_index]){\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(global_data[day_index]));\n\t\t\t}\n\t\t}\n\n\t\tfor (var i=0; i\" + ev.text + \"

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

\" + scheduler.templates.marker_date(start) + \" - \" + scheduler.templates.marker_date(end) + \"\";\n};\nscheduler.dblclick_dhx_map_area = function() {\n\tif (!this.config.readonly && this.config.dblclick_create)\n\t\tthis.addEventNow({\n\t\t\tstart_date: scheduler._date,\n\t\t\tend_date: scheduler.date.add(scheduler._date, scheduler.config.time_step, \"minute\")\n\t\t});\n};\nscheduler.templates.map_time = function(start, end, ev) {\n\tif (scheduler.config.rtl && !ev._timed) {\n\t\treturn scheduler.templates.day_date(end) + \" – \" + scheduler.templates.day_date(start);\n\t} else if (ev._timed) {\n\t\treturn this.day_date(ev.start_date, ev.end_date, ev) + \" \" + this.event_date(start);\n\t} else {\n\t\treturn scheduler.templates.day_date(start) + \" – \" + scheduler.templates.day_date(end);\n\t}\n};\nscheduler.templates.map_text = function(start, end, ev) {\n\treturn ev.text;\n};\n\nscheduler.date.map_start = function(d) {\n\treturn d;\n};\nscheduler.date.add_map = function(date, inc, mode) {\n\treturn (new Date(date.valueOf()));\n};\n\nscheduler.templates.map_date = function(dd, ed, mode) {\n\treturn '';\n};\n\nscheduler._latLngUpdate = false; // flag for not displaying event second time in case of coordinates update\n\nscheduler.attachEvent(\"onSchedulerReady\", function() {\n\tscheduler._isMapPositionSet = false; // if user actual (geolocation) position was set on the map\n\n\tconst gmap = document.createElement('div');\n\tgmap.className = 'dhx_map';\n\tgmap.id = 'dhx_gmap';\n\tgmap.style.display = \"none\";\n\n\tscheduler._obj.appendChild(gmap);\n\n\tscheduler._els.dhx_gmap = [];\n\tscheduler._els.dhx_gmap.push(gmap);\n\n\t_setMapSize('dhx_gmap');\n\n\tconst mapOptions = {\n\t\tzoom: scheduler.config.map_initial_zoom || 10,\n\t\tcenter: scheduler.config.map_initial_position,\n\t\tmapTypeId: scheduler.config.map_type || google.maps.MapTypeId.ROADMAP\n\t};\n\tconst map = new google.maps.Map(document.getElementById('dhx_gmap'), mapOptions);\n\tmap.disableDefaultUI = false;\n\tmap.disableDoubleClickZoom = !scheduler.config.readonly;\n\n\tgoogle.maps.event.addListener(map, \"dblclick\", function(event) {\n\t\tconst geocoder = scheduler.ext.mapView.geocoder;\n\n\t\tif (!scheduler.config.readonly && scheduler.config.dblclick_create) {\n\t\t\tvar point = event.latLng;\n\t\t\tgeocoder.geocode(\n\t\t\t\t{ 'latLng': point },\n\t\t\t\tfunction(results, status) {\n\t\t\t\t\tif (status == google.maps.GeocoderStatus.OK) {\n\t\t\t\t\t\tpoint = results[0].geometry.location;\n\t\t\t\t\t\tscheduler.addEventNow({\n\t\t\t\t\t\t\tlat: point.lat(),\n\t\t\t\t\t\t\tlng: point.lng(),\n\t\t\t\t\t\t\tevent_location: results[0].formatted_address,\n\t\t\t\t\t\t\tstart_date: scheduler._date,\n\t\t\t\t\t\t\tend_date: scheduler.date.add(scheduler._date, scheduler.config.time_step, \"minute\")\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t});\n\n\tvar infoWindowOptions = {\n\t\tcontent: ''\n\t};\n\n\tif (scheduler.config.map_infowindow_max_width) {\n\t\tinfoWindowOptions.maxWidth = scheduler.config.map_infowindow_max_width;\n\t}\n\n\tscheduler.map = {\n\t\t_points: [],\n\t\t_markers: [],\n\t\t_infowindow: new google.maps.InfoWindow(infoWindowOptions),\n\t\t_infowindows_content: [],\n\t\t_initialization_count: -1,\n\t\t_obj: map\n\t};\n\n\tscheduler.ext.mapView.geocoder = new google.maps.Geocoder();\n\tscheduler.ext.mapView.map = map;\n\tscheduler.ext.mapView.points = scheduler.map._points;\n\tscheduler.ext.mapView.markers = scheduler.map._markers;\n\tscheduler.ext.mapView.infoWindow = scheduler.map._infowindow;\n\n\tif (scheduler.config.map_resolve_user_location) {\n\t\tif (navigator.geolocation) {\n\t\t\tif (!scheduler._isMapPositionSet) {\n\t\t\t\tnavigator.geolocation.getCurrentPosition(function(position) {\n\t\t\t\t\tvar _userLocation = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);\n\t\t\t\t\tmap.setCenter(_userLocation);\n\t\t\t\t\tmap.setZoom(scheduler.config.map_zoom_after_resolve || 10);\n\t\t\t\t\tscheduler.map._infowindow.setContent(scheduler.locale.labels.marker_geo_success);\n\t\t\t\t\tscheduler.map._infowindow.position = map.getCenter();\n\t\t\t\t\tscheduler.map._infowindow.open(map);\n\n\t\t\t\t\tscheduler._isMapPositionSet = true;\n\t\t\t\t},\n\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\tscheduler.map._infowindow.setContent(scheduler.locale.labels.marker_geo_fail);\n\t\t\t\t\t\t\tscheduler.map._infowindow.setPosition(map.getCenter());\n\t\t\t\t\t\t\tscheduler.map._infowindow.open(map);\n\t\t\t\t\t\t\tscheduler._isMapPositionSet = true;\n\t\t\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\tgoogle.maps.event.addListener(map, \"resize\", function(event) {\n\t\tgmap.style.zIndex = '5';\n\t\tmap.setZoom(map.getZoom());\n\n\t});\n\tgoogle.maps.event.addListener(map, \"tilesloaded\", function(event) {\n\t\tgmap.style.zIndex = '5';\n\t});\n\n\tgmap.style.display = 'none'; // property was changed after attaching map\n\n\tconst old = scheduler.render_data;\n\tscheduler.render_data = function(evs, hold) {\n\t\tif (this._mode == \"map\") {\n\t\t\tfill_map_tab();\n\t\t\tvar events = scheduler.get_visible_events();\n\t\t\tfor (var i = 0; i < events.length; i++) {\n\t\t\t\tif (!scheduler.map._markers[events[i].id]) {\n\t\t\t\t\tshowAddress(events[i], false, false);\n\t\t\t\t}\n\t\t\t}\n\t\t} else\n\t\t\treturn old.apply(this, arguments);\n\t};\n\n\tfunction set_full_view(mode) {\n\t\tif (mode) {\n\t\t\tvar l = scheduler.locale.labels;\n\t\t\tscheduler._els[\"dhx_cal_header\"][0].innerHTML = \"
\" + l.date + \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"
\" + l.description + \"
\";\n\t\t\tscheduler._table_view = true;\n\t\t\tscheduler.set_sizes();\n\t\t}\n\t}\n\n\tfunction clear_map_tab() {\n\t\tscheduler._selected_event_id = null;\n\t\tscheduler.map._infowindow.close();\n\t\tvar markers = scheduler.map._markers;\n\t\tfor (var key in markers) {\n\t\t\tif (markers.hasOwnProperty(key)) {\n\t\t\t\tmarkers[key].setMap(null);\n\t\t\t\tdelete scheduler.map._markers[key];\n\t\t\t\tif (scheduler.map._infowindows_content[key])\n\t\t\t\t\tdelete scheduler.map._infowindows_content[key];\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction fill_map_tab() {\n\t\t//select events for which data need to be printed\n\t\tvar events = scheduler.get_visible_events();\n\t\tevents.sort(function(a, b) {\n\t\t\tif(a.start_date.valueOf()==b.start_date.valueOf())\n\t\t\t\treturn a.id>b.id?1:-1;\n\t\t\treturn a.start_date>b.start_date?1:-1;\n\t\t});\n\n\t\t//generate html for the view\n\t\tvar ariaAttr = scheduler._waiAria.mapAttrString();\n\n\t\tvar html = \"
\";\n\t\tfor (var i = 0; i < events.length; i++) {\n\t\t\tvar ev = events[i];\n\t\t\tvar event_class = (ev.id == scheduler._selected_event_id) ? 'dhx_map_line highlight' : 'dhx_map_line';\n\t\t\tvar bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\n\t\t\tvar color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\n\n\t\t\tvar ariaAttr = scheduler._waiAria.mapRowAttrString(ev);\n\t\t\tvar ariaButtonAttr = scheduler._waiAria.mapDetailsBtnString();\n\n\t\t\thtml += \"
\" + scheduler.templates.map_time(ev.start_date, ev.end_date, ev) + \"
\";\n\t\t\thtml += `
\n\t\t\t\n\t\t\t
`;\n\t\t\thtml += \"
\" + scheduler.templates.map_text(ev.start_date, ev.end_date, ev) + \"
\"; // -25 = icon size 20 and padding 5\n\t\t}\n\t\thtml += \"
\";\n\n\t\t//render html\n\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = 0; //fix flickering in FF\n\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\n\t//\tscheduler._els[\"dhx_cal_data\"][0].style.width = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\n\n\t\tvar t = scheduler._els[\"dhx_cal_data\"][0].firstChild.childNodes;\n\n\t\tvar dateElement = scheduler._getNavDateElement();\n\t\tif(dateElement){\n\t\t\tdateElement.innerHTML=scheduler.templates[scheduler._mode + \"_date\"](scheduler._min_date, scheduler._max_date, scheduler._mode);\n\t\t}\n\n\t\tscheduler._rendered = [];\n\t\tfor (var i = 0; i < t.length - 2; i++) {\n\t\t\tscheduler._rendered[i] = t[i];\n\t\t}\n\t}\n\n\tfunction _setMapSize(elem_id) { //input - map's div id\n\t\tvar map = document.getElementById(elem_id);\n\t\tconst nav_height = scheduler.$container.querySelector(\".dhx_cal_navline\").offsetHeight;\n\t\tvar height = scheduler._y - nav_height;\n\t\tif (height < 0)\n\t\t\theight = 0;\n\t\tvar width = scheduler._x - scheduler.xy.map_date_width - scheduler.xy.map_description_width - 1;\n\t\tif (width < 0)\n\t\t\twidth = 0;\n\t\tmap.style.height = height + 'px';\n\t\tmap.style.width = width + 'px';\n\t\tmap.style.position = \"absolute\";\n\t\tmap.style.top = nav_height + \"px\";\n\t\tif (scheduler.config.rtl) {\n\t\t\tmap.style.marginRight = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\n\t\t} else {\n\t\t\tmap.style.marginLeft = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\n\t\t}\n\t\tmap.style.marginTop = (scheduler.xy.nav_height + 2) + 'px';\n\t}\n\n\tscheduler.map_view = function(mode) {\n\t\tscheduler.map._initialization_count++;\n\t\tvar gmap = scheduler._els.dhx_gmap[0];\n\t\tvar temp_center;\n\t\t//scheduler._els.dhx_cal_data[0].style.width = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\n\n\t\tscheduler._min_date = scheduler.config.map_start || (scheduler._currentDate());\n\t\tscheduler._max_date = scheduler.config.map_end || scheduler.date.add(scheduler._currentDate(), 1, \"year\");\n\n\t\tscheduler._table_view = true;\n\t\tset_full_view(mode);\n\n\t\tif (mode) { //map tab activated\n\t\t\tclear_map_tab();\n\t\t\tfill_map_tab();\n\t\t\tgmap.style.display = 'block';\n\n\t\t\t// need to resize block every time window is resized\n\t\t\t_setMapSize('dhx_gmap');\n\t\t\ttemp_center = scheduler.map._obj.getCenter();\n\n\t\t\tvar events = scheduler.get_visible_events();\n\t\t\tfor (var i = 0; i < events.length; i++) {\n\t\t\t\tif (!scheduler.map._markers[events[i].id]) {\n\t\t\t\t\tshowAddress(events[i]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else { //map tab de-activated\n\t\t\tgmap.style.display = 'none';\n\t\t}\n\t\tgoogle.maps.event.trigger(scheduler.map._obj, 'resize');\n\n\t\tif (scheduler.map._initialization_count === 0 && temp_center) { // if tab is activated for the first time need to fix position\n\t\t\tscheduler.map._obj.setCenter(temp_center);\n\t\t}\n\n\t\tif (scheduler._selected_event_id) {\n\t\t\tselectEvent(scheduler._selected_event_id);\n\t\t}\n\t};\n\n\tvar selectEvent = function(event_id) {\n\t\tscheduler.map._obj.setCenter(scheduler.map._points[event_id]);\n\t\tscheduler.callEvent(\"onClick\", [event_id]);\n\t};\n\n\tvar showAddress = function(event, setCenter, performClick) { // what if event have incorrect position from the start?\n\t\tvar point = scheduler.config.map_error_position;\n\t\tif (event.lat && event.lng) {\n\t\t\tpoint = new google.maps.LatLng(event.lat, event.lng);\n\t\t}\n\t\tvar message = scheduler.templates.marker_text(event.start_date, event.end_date, event);\n\t\tif (!scheduler._new_event) {\n\n\t\t\tscheduler.map._infowindows_content[event.id] = message;\n\n\t\t\tif (scheduler.map._markers[event.id])\n\t\t\t\tscheduler.map._markers[event.id].setMap(null);\n\n\t\t\tscheduler.map._markers[event.id] = scheduler.ext.mapView.createMarker({\n\t\t\t\tposition: point,\n\t\t\t\tmap: scheduler.map._obj\n\t\t\t});\n\n\t\t\tgoogle.maps.event.addListener(scheduler.map._markers[event.id], 'click', function() {\n\t\t\t\tscheduler.map._infowindow.setContent(scheduler.map._infowindows_content[event.id]);\n\t\t\t\tscheduler.map._infowindow.open(scheduler.map._obj, scheduler.map._markers[event.id]);\n\t\t\t\tscheduler._selected_event_id = event.id;\n\t\t\t\tscheduler.render_data();\n\t\t\t});\n\t\t\tscheduler.map._points[event.id] = point;\n\n\t\t\tif (setCenter) scheduler.map._obj.setCenter(scheduler.map._points[event.id]);\n\t\t\tif (performClick) scheduler.callEvent(\"onClick\", [event.id]);\n\t\t}\n\t};\n\n\tscheduler.attachEvent(\"onClick\", function(id, domEvent) {\n\t\tif (this._mode == \"map\") {\n\t\t\tscheduler._selected_event_id = id;\n\t\t\tfor (var i = 0; i < scheduler._rendered.length; i++) {\n\t\t\t\tscheduler._rendered[i].className = 'dhx_map_line';\n\t\t\t\tif (scheduler._rendered[i].getAttribute(scheduler.config.event_attribute) == id) {\n\t\t\t\t\tscheduler._rendered[i].className += \" highlight\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (scheduler.map._points[id] && scheduler.map._markers[id]) {\n\t\t\t\tscheduler.map._obj.setCenter(scheduler.map._points[id]); // was panTo\n\t\t\t\tgoogle.maps.event.trigger(scheduler.map._markers[id], 'click');\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t});\n\n\tvar _displayEventOnMap = function(event) {\n\t\tconst geocoder = scheduler.ext.mapView.geocoder;\n\t\tif (event.event_location && geocoder) {\n\t\t\tgeocoder.geocode(\n\t\t\t\t{\n\t\t\t\t\t'address': event.event_location,\n\t\t\t\t\t'language': scheduler.uid().toString()\n\t\t\t\t},\n\t\t\t\tfunction(results, status) {\n\t\t\t\t\tvar point = {};\n\t\t\t\t\tif (status != google.maps.GeocoderStatus.OK) {\n\t\t\t\t\t\tpoint = scheduler.callEvent(\"onLocationError\", [event.id]);\n\t\t\t\t\t\tif (!point || point === true)\n\t\t\t\t\t\t\tpoint = scheduler.config.map_error_position;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpoint = results[0].geometry.location;\n\t\t\t\t\t}\n\t\t\t\t\tevent.lat = point.lat();\n\t\t\t\t\tevent.lng = point.lng();\n\n\t\t\t\t\tscheduler._selected_event_id = event.id;\n\n\t\t\t\t\tscheduler._latLngUpdate = true;\n\t\t\t\t\tscheduler.callEvent(\"onEventChanged\", [event.id, event]);\n\t\t\t\t\tshowAddress(event, true, true);\n\t\t\t\t}\n\t\t\t);\n\t\t} else {\n\t\t\tshowAddress(event, true, true);\n\t\t}\n\t};\n\n\tvar _updateEventLocation = function(event) { // update lat and lng in database\n\t\tconst geocoder = scheduler.ext.mapView.geocoder;\n\t\tif (event.event_location && geocoder) {\n\t\t\tgeocoder.geocode(\n\t\t\t\t{\n\t\t\t\t\t'address': event.event_location,\n\t\t\t\t\t'language': scheduler.uid().toString()\n\t\t\t\t},\n\t\t\t\tfunction(results, status) {\n\t\t\t\t\tvar point = {};\n\t\t\t\t\tif (status != google.maps.GeocoderStatus.OK) {\n\t\t\t\t\t\tpoint = scheduler.callEvent(\"onLocationError\", [event.id]);\n\t\t\t\t\t\tif (!point || point === true)\n\t\t\t\t\t\t\tpoint = scheduler.config.map_error_position;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpoint = results[0].geometry.location;\n\t\t\t\t\t}\n\t\t\t\t\tevent.lat = point.lat();\n\t\t\t\t\tevent.lng = point.lng();\n\t\t\t\t\tscheduler._latLngUpdate = true;\n\t\t\t\t\tscheduler.callEvent(\"onEventChanged\", [event.id, event]);\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t};\n\n\tvar _delay = function(method, object, params, delay) {\n\t\tsetTimeout(function() {\n\t\t\tif(scheduler.$destroyed){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tvar ret = method.apply(object, params);\n\t\t\tmethod = object = params = null;\n\t\t\treturn ret;\n\t\t}, delay || 1);\n\t};\n\n\tscheduler.attachEvent(\"onEventChanged\", function(id, event) {\n\t\tif (!this._latLngUpdate) {\n\t\t\tvar event = scheduler.getEvent(id);\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)) {\n\t\t\t\tif (scheduler.map._markers[id])\n\t\t\t\t\tscheduler.map._markers[id].setMap(null);\n\t\t\t\t_displayEventOnMap(event);\n\t\t\t} else { // event no longer should be displayed on the map view\n\t\t\t\tscheduler._selected_event_id = null;\n\t\t\t\tscheduler.map._infowindow.close();\n\t\t\t\tif (scheduler.map._markers[id])\n\t\t\t\t\tscheduler.map._markers[id].setMap(null);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t\tthis._latLngUpdate = false;\n\t\treturn true;\n\t});\n\n\n\tscheduler.attachEvent(\"onEventIdChange\", function(old_event_id, new_event_id) {\n\t\tvar event = scheduler.getEvent(new_event_id);\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)) {\n\t\t\tif (scheduler.map._markers[old_event_id]) {\n\t\t\t\tscheduler.map._markers[old_event_id].setMap(null);\n\t\t\t\tdelete scheduler.map._markers[old_event_id];\n\t\t\t}\n\t\t\tif (scheduler.map._infowindows_content[old_event_id])\n\t\t\t\tdelete scheduler.map._infowindows_content[old_event_id];\n\t\t\t_displayEventOnMap(event);\n\t\t}\n\t\treturn true;\n\t});\n\n\tscheduler.attachEvent(\"onEventAdded\", function(id, event) {\n\t\tif (!scheduler._dataprocessor) {\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)) {\n\t\t\t\tif (scheduler.map._markers[id])\n\t\t\t\t\tscheduler.map._markers[id].setMap(null);\n\t\t\t\t_displayEventOnMap(event);\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t});\n\n\t/* Test/example\n\t scheduler.attachEvent(\"onLocationError\", function(event_id,event_object){\n\t return new google.maps.LatLng(8, 8);\n\t });\n\t */\n\n\tscheduler.attachEvent(\"onBeforeEventDelete\", function(id, event) {\n\t\tif (scheduler.map._markers[id]) {\n\t\t\tscheduler.map._markers[id].setMap(null); // if new event is deleted tab != map then it doesn't have marker yet\n\t\t}\n\t\tscheduler._selected_event_id = null;\n\t\tscheduler.map._infowindow.close();\n\t\treturn true;\n\t});\n\n\tscheduler._event_resolve_delay = 1500;\n\tscheduler.attachEvent(\"onEventLoading\", function(event) {\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\n\t\t\tscheduler._event_resolve_delay += 1500;\n\t\t\t_delay(_updateEventLocation, this, [event], scheduler._event_resolve_delay);\n\t\t}\n\t\treturn true;\n\t});\n\n\tscheduler.attachEvent(\"onEventCancel\", function(id, is_new) {\n\t\tif (is_new) {\n\t\t\tif (scheduler.map._markers[id])\n\t\t\t\tscheduler.map._markers[id].setMap(null);\n\t\t\tscheduler.map._infowindow.close();\n\t\t}\n\t\treturn true;\n\t});\n});\n\n\n}","export default function(scheduler){\n\nconst minicalDomEvents = scheduler._createDomEventScope();\n\t\n\nscheduler.config.minicalendar = {\n\tmark_events: true\n};\nscheduler._synced_minicalendars = [];\nscheduler.renderCalendar = function(obj, _prev, is_refresh) {\n\tvar cal = null;\n\tvar date = obj.date || (scheduler._currentDate());\n\tif (typeof date == \"string\")\n\t\tdate = this.templates.api_date(date);\n\n\tif (!_prev) {\n\t\tvar cont = obj.container;\n\t\tvar pos = obj.position;\n\n\t\tif (typeof cont == \"string\")\n\t\t\tcont = document.getElementById(cont);\n\n\t\tif (typeof pos == \"string\")\n\t\t\tpos = document.getElementById(pos);\n\t\tif (pos && (typeof pos.left == \"undefined\" && typeof pos.right == \"undefined\")) {\n\t\t\tvar tpos = scheduler.$domHelpers.getOffset(pos);\n\t\t\tpos = {\n\t\t\t\ttop: tpos.top + pos.offsetHeight,\n\t\t\t\tleft: tpos.left\n\t\t\t};\n\t\t}\n\t\tif (!cont)\n\t\t\tcont = scheduler._get_def_cont(pos);\n\n\t\tcal = this._render_calendar(cont, date, obj);\n\t\n\t\tif (!cal.$_eventAttached) {\n\t\t\tcal.$_eventAttached = true;\n\t\t\tminicalDomEvents.attach(cal, \"click\", (function(e) {\n\t\t\t\tvar src = e.target || e.srcElement;\n\n\t\t\t\tvar $dom = scheduler.$domHelpers;\n\t\t\t\tif ($dom.closest(src, \".dhx_month_head\")) {\n\t\t\t\t\tif (!$dom.closest(src, \".dhx_after\") && !$dom.closest(src, \".dhx_before\")) {\n\n\t\t\t\t\t\tvar cellRoot = $dom.closest(src, \"[data-cell-date]\");\n\t\t\t\t\t\tvar dateAttribute = cellRoot.getAttribute(\"data-cell-date\");\n\t\t\t\t\t\tvar newDate = scheduler.templates.parse_date(dateAttribute);\n\t\t\t\t\t\n\t\t\t\t\t\tscheduler.unmarkCalendar(this);\n\t\t\t\t\t\tscheduler.markCalendar(this, newDate, \"dhx_calendar_click\");\n\t\t\t\t\t\tthis._last_date = newDate;\n\t\t\t\t\t\tif (this.conf.handler) this.conf.handler.call(scheduler, newDate, this);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}).bind(cal));\n\t\t}\n\t\n\t} else {\n\t\tcal = this._render_calendar(_prev.parentNode, date, obj, _prev);\n\t\tscheduler.unmarkCalendar(cal);\n\t}\n\n\tif (scheduler.config.minicalendar.mark_events) {\n\t\tvar start = scheduler.date.month_start(date);\n\t\tvar end = scheduler.date.add(start, 1, \"month\");\n\t\tvar evs = this.getEvents(start, end);\n\t\tvar filter = this[\"filter_\" + this._mode];\n\t\tvar markedDates = {};\n\t\tfor (var i = 0; i < evs.length; i++) {\n\t\t\tvar ev = evs[i];\n\t\t\tif (filter && !filter(ev.id, ev))\n\t\t\t\tcontinue;\n\t\t\tvar d = ev.start_date;\n\t\t\tif (d.valueOf() < start.valueOf())\n\t\t\t\td = start;\n\t\t\td = scheduler.date.date_part(new Date(d.valueOf()));\n\t\t\twhile (d < ev.end_date) {\n\t\t\t\tif(!markedDates[+d]) {\n\t\t\t\t\tmarkedDates[+d] = true;\n\t\t\t\t\tthis.markCalendar(cal, d, \"dhx_year_event\");\n\t\t\t\t}\n\t\t\t\td = this.date.add(d, 1, \"day\");\n\t\t\t\tif (d.valueOf() >= end.valueOf())\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tthis._markCalendarCurrentDate(cal);\n\n\tcal.conf = obj;\n\tif (obj.sync && !is_refresh)\n\t\tthis._synced_minicalendars.push(cal);\n\n\tif(!cal.conf._on_xle_handler){\n\t\tcal.conf._on_xle_handler = scheduler.attachEvent(\"onXLE\", function refreshOnLoad(){\n\t\t\tscheduler.updateCalendar(cal, cal.conf.date);\n\t\t});\n\t}\n\n\tif(this.config.wai_aria_attributes && this.config.wai_aria_application_role){\n\t\tcal.setAttribute(\"role\", \"application\");\n\t}\n\n\treturn cal;\n};\nscheduler._get_def_cont = function(pos) {\n\tif (!this._def_count) {\n\t\tthis._def_count = document.createElement(\"div\");\n\t\tthis._def_count.className = \"dhx_minical_popup\";\n\t\tscheduler.event(this._def_count, \"click\", function(e) { e.cancelBubble = true; });\n\t\tdocument.body.appendChild(this._def_count);\n\t}\n\n\tif(pos.left){\n\t\tthis._def_count.style.left = pos.left + \"px\";\n\t}\n\tif(pos.right){\n\t\tthis._def_count.style.right = pos.right + \"px\";\n\t}\n\tif(pos.top){\n\t\tthis._def_count.style.top = pos.top + \"px\";\n\t}\n\tif(pos.bottom){\n\t\tthis._def_count.style.bottom = pos.bottom + \"px\";\n\t}\n\n\tthis._def_count._created = new Date();\n\n\treturn this._def_count;\n};\nscheduler._locateCalendar = function(cal, date) {\n\tif (typeof date == \"string\")\n\t\tdate = scheduler.templates.api_date(date);\n\n\tif(+date > +cal._max_date || +date < +cal._min_date)\n\t\treturn null;\n\n\tvar table = cal.querySelector(\".dhx_year_body\").childNodes[0];\n\n\tvar weekNum = 0;\n\tvar dat = new Date(cal._min_date);\n\twhile(+this.date.add(dat, 1, \"week\") <= +date){\n\t\tdat = this.date.add(dat, 1, \"week\");\n\t\tweekNum++;\n\t}\n\n\tvar sm = scheduler.config.start_on_monday;\n\tvar day = (date.getDay() || (sm ? 7 : 0)) - (sm ? 1 : 0);\n\n\tconst dayCell = table.querySelector(`.dhx_cal_month_row:nth-child(${weekNum + 1}) .dhx_cal_month_cell:nth-child(${day + 1})`);\n\tif(dayCell) {\n\t\treturn dayCell.firstChild;\n\t} else {\n\t\treturn null;\n\t}\n};\nscheduler.markCalendar = function(cal, date, css) {\n\tvar div = this._locateCalendar(cal, date);\n\tif(!div)\n\t\treturn;\n\n\tdiv.className += \" \" + css;\n};\nscheduler.unmarkCalendar = function(cal, date, css) {\n\tdate = date || cal._last_date;\n\tcss = css || \"dhx_calendar_click\";\n\tif (!date) return;\n\tvar el = this._locateCalendar(cal, date);\n\tif(!el)\n\t\treturn;\n\tel.className = (el.className || \"\").replace(RegExp(css, \"g\"));\n};\nscheduler._week_template = function(width) {\n\tvar summ = (width || 250);\n\tvar left = 0;\n\n\tvar week_template = document.createElement(\"div\");\n\tvar dummy_date = this.date.week_start(scheduler._currentDate());\n\tfor (var i = 0; i < 7; i++) {\n\t\tthis._cols[i] = Math.floor(summ / (7 - i));\n\t\tthis._render_x_header(i, left, dummy_date, week_template);\n\t\tdummy_date = this.date.add(dummy_date, 1, \"day\");\n\t\tsumm -= this._cols[i];\n\t\tleft += this._cols[i];\n\t}\n\tweek_template.lastChild.className += \" dhx_scale_bar_last\";\n\treturn week_template;\n};\nscheduler.updateCalendar = function(obj, sd) {\n\tobj.conf.date = sd;\n\tthis.renderCalendar(obj.conf, obj, true);\n};\nscheduler._mini_cal_arrows = [\" \", \" \"];\nscheduler._render_calendar = function(obj, sd, conf, previous) {\n\t/*store*/\n\tvar ts = scheduler.templates;\n\tvar temp = this._cols;\n\tthis._cols = [];\n\tvar temp2 = this._mode;\n\tthis._mode = \"calendar\";\n\tvar temp3 = this._colsS;\n\tthis._colsS = {height: 0};\n\tvar temp4 = new Date(this._min_date);\n\tvar temp5 = new Date(this._max_date);\n\tvar temp6 = new Date(scheduler._date);\n\tvar temp7 = ts.month_day;\n\tvar temp8 = this._ignores_detected; this._ignores_detected = 0;\n\tts.month_day = ts.calendar_date;\n\n\tsd = this.date.month_start(sd);\n\tvar week_template = this._week_template(obj.offsetWidth - 1 - this.config.minicalendar.padding );\n\n\tvar d;\n\tif (previous){\n\t\td = previous;\n\t} else {\n\t\td = document.createElement(\"div\");\n\t\td.className = \"dhx_cal_container dhx_mini_calendar\";\n\t}\n\td.setAttribute(\"date\", this._helpers.formatDate(sd));\n\td.innerHTML = \"
\" +\n\t\t\t\"
\" : \"'>\") +\n\t\t\t\"
\"+(week_template ? week_template.innerHTML : \"\")+\"
\" +\n\t\t\t\"
\" +\n\t\t\"
\";\n\tvar header = d.querySelector(\".dhx_year_month\");\n\tvar weekHeader = d.querySelector(\".dhx_year_week\");\n\tvar body = d.querySelector(\".dhx_year_body\");\n\n\theader.innerHTML = this.templates.calendar_month(sd);\n\tif (conf.navigation) {\n\t\tvar move_minicalendar_date = function(calendar, diff) {\n\t\t\tvar date = scheduler.date.add(calendar._date, diff, \"month\");\n\t\t\tscheduler.updateCalendar(calendar, date);\n\t\t\tif (scheduler._date.getMonth() == calendar._date.getMonth() && scheduler._date.getFullYear() == calendar._date.getFullYear()) {\n\t\t\t\tscheduler._markCalendarCurrentDate(calendar);\n\t\t\t}\n\t\t};\n\n\t\tvar css_classnames = [\"dhx_cal_prev_button\", \"dhx_cal_next_button\"];\n\t\tvar css_texts = [\"left:1px;top:4px;position:absolute;\", \"left:auto; right:1px;top:4px;position:absolute;\"];\n\t\tvar diffs = [-1, 1];\n\t\tvar handler = function(diff) {\n\t\t\treturn function() {\t\n\t\t\t\tif (conf.sync) {\n\t\t\t\t\tvar calendars = scheduler._synced_minicalendars;\n\t\t\t\t\tfor (var k = 0; k < calendars.length; k++) {\n\t\t\t\t\t\tmove_minicalendar_date(calendars[k], diff);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (scheduler.config.rtl) {\n\t\t\t\t\t\tdiff = -diff;\n\t\t\t\t\t}\n\t\t\t\t\tmove_minicalendar_date(d, diff);\n\t\t\t\t}\n\t\t\t};\n\t\t};\n\t\tvar labels = [scheduler.locale.labels.prev, scheduler.locale.labels.next];\n\t\tfor (var j = 0; j < 2; j++) {\n\t\t\tvar arrow = document.createElement(\"div\");\n\t\t\t//var diff = diffs[j];\n\t\t\tarrow.className = css_classnames[j];\n\n\t\t\tscheduler._waiAria.headerButtonsAttributes(arrow, labels[j]);\n\n\t\t\tarrow.style.cssText = css_texts[j];\n\t\t\tarrow.innerHTML = this._mini_cal_arrows[j];\n\t\t\theader.appendChild(arrow);\n\t\t\tminicalDomEvents.attach(arrow, \"click\", handler(diffs[j]));\n\t\t}\n\t}\n\td._date = new Date(sd);\n\n\td.week_start = (sd.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) % 7;\n\n\tvar dd = d._min_date = this.date.week_start(sd);\n\td._max_date = this.date.add(d._min_date, 6, \"week\");\n\n\tthis._reset_month_scale(body, sd, dd, 6);\n\n\tif (!previous)\n\t\tobj.appendChild(d);\n\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)\n\n\tvar headerId = scheduler.uid();\n\tscheduler._waiAria.minicalHeader(header, headerId);\n\tscheduler._waiAria.minicalGrid(d.querySelector(\".dhx_year_grid\"), headerId);\n\tscheduler._waiAria.minicalRow(weekHeader);\n\n\tvar dayHeaders = weekHeader.querySelectorAll(\".dhx_scale_bar\");\n\tfor(var i = 0; i < dayHeaders.length; i++){\n\t\tscheduler._waiAria.minicalHeadCell(dayHeaders[i]);\n\t}\n\tvar dayCells = body.querySelectorAll(\".dhx_cal_month_cell\");\n\tvar firstDate = new Date(dd);\n\tfor(var i = 0; i < dayCells.length; i++){\n\n\t\tscheduler._waiAria.minicalDayCell(dayCells[i], new Date(firstDate));\n\t\tfirstDate = scheduler.date.add(firstDate, 1, \"day\");\n\t}\n\n\tscheduler._waiAria.minicalHeader(header, headerId);\n\n\t/*restore*/\n\tthis._cols = temp;\n\tthis._mode = temp2;\n\tthis._colsS = temp3;\n\tthis._min_date = temp4;\n\tthis._max_date = temp5;\n\tscheduler._date = temp6;\n\tts.month_day = temp7;\n\tthis._ignores_detected = temp8;\n\treturn d;\n};\nscheduler.destroyCalendar = function(cal, force) {\n\tif (!cal && this._def_count && this._def_count.firstChild) {\n\t\tif (force || (new Date()).valueOf() - this._def_count._created.valueOf() > 500)\n\t\t\tcal = this._def_count.firstChild;\n\t}\n\tif (!cal) return;\n\tminicalDomEvents.detachAll();\n\t//cal.onclick = null;\n\tcal.innerHTML = \"\";\n\tif (cal.parentNode)\n\t\tcal.parentNode.removeChild(cal);\n\tif (this._def_count)\n\t\tthis._def_count.style.top = \"-1000px\";\n\n\tif(cal.conf && cal.conf._on_xle_handler)\n\t\tscheduler.detachEvent(cal.conf._on_xle_handler);\n};\nscheduler.isCalendarVisible = function() {\n\tif (this._def_count && parseInt(this._def_count.style.top, 10) > 0)\n\t\treturn this._def_count;\n\treturn false;\n};\n\nscheduler.attachEvent(\"onTemplatesReady\", function() {\n\tscheduler.event(document.body, \"click\", function() { scheduler.destroyCalendar(); });\n}, {once: true});\n\n\n\nscheduler.form_blocks.calendar_time = {\n\trender: function(sns) {\n\t\tvar html = \"\";\n\n\t\tvar cfg = scheduler.config;\n\t\tvar dt = this.date.date_part(scheduler._currentDate());\n\n\t\tvar last = 24 * 60, first = 0;\n\t\tif (cfg.limit_time_select) {\n\t\t\tfirst = 60 * cfg.first_hour;\n\t\t\tlast = 60 * cfg.last_hour + 1; // to include \"17:00\" option if time select is limited\n\t\t}\n\t\tdt.setHours(first / 60);\n\n\t\tsns._time_values = [];\n\t\thtml += \" \";\n\n\t\t//var full_day = scheduler.config.full_day;\n\n\t\treturn \"
\" + html + \"  –  \" + html + \"
\";\n\t},\n\tset_value: function(node, value, ev, config) {\n\n\t\tvar inputs = node.getElementsByTagName(\"input\");\n\t\tvar selects = node.getElementsByTagName(\"select\");\n\t\tvar start_date,\n\t\t\tend_date;\n\n\t\tvar _init_once = function(inp, date, number) {\n\t\t\tscheduler.event(inp, \"click\", function() {\n\t\t\t\tscheduler.destroyCalendar(null, true);\n\t\t\t\tscheduler.renderCalendar({\n\t\t\t\t\tposition: inp,\n\t\t\t\t\tdate: new Date(this._date),\n\t\t\t\t\tnavigation: true,\n\t\t\t\t\thandler: function(new_date) {\n\t\t\t\t\t\tinp.value = scheduler.templates.calendar_time(new_date);\n\t\t\t\t\t\tinp._date = new Date(new_date);\n\t\t\t\t\t\tscheduler.destroyCalendar();\n\t\t\t\t\t\tif (scheduler.config.event_duration && scheduler.config.auto_end_date && number === 0) { //first element = start date\n\t\t\t\t\t\t\t_update_minical_select();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t};\n\n\t\tif (scheduler.config.full_day) {\n\t\t\tif (!node._full_day) {\n\t\t\t\tvar html = \"\";\n\t\t\t\tif (!scheduler.config.wide_form)\n\t\t\t\t\thtml = node.previousSibling.innerHTML + html;\n\t\t\t\tnode.previousSibling.innerHTML = html;\n\t\t\t\tnode._full_day = true;\n\t\t\t}\n\t\t\tvar input = node.previousSibling.getElementsByTagName(\"input\")[0];\n\n\t\t\tvar isFulldayEvent = (scheduler.date.time_part(ev.start_date) === 0 && scheduler.date.time_part(ev.end_date) === 0);\n\t\t\tinput.checked = isFulldayEvent;\n\n\t\t\tselects[0].disabled = input.checked;\n\t\t\tselects[1].disabled = input.checked;\n\n\t\t\tif (!input.$_eventAttached) {\n\t\t\t\tinput.$_eventAttached = true;\n\t\t\t\tscheduler.event(input, \"click\", function() {\n\t\t\t\t\tif (input.checked === true) {\n\t\t\t\t\t\tvar obj = {};\n\t\t\t\t\t\tscheduler.form_blocks.calendar_time.get_value(node, obj);\n\n\t\t\t\t\t\tstart_date = scheduler.date.date_part(obj.start_date);\n\t\t\t\t\t\tend_date = scheduler.date.date_part(obj.end_date);\n\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)))\n\t\t\t\t\t\t\tend_date = scheduler.date.add(end_date, 1, \"day\");\n\t\t\t\t\t}\n\n\t\t\t\t\tvar start = start_date || ev.start_date;\n\t\t\t\t\tvar end = end_date || ev.end_date;\n\t\t\t\t\t_attach_action(inputs[0], start);\n\t\t\t\t\t_attach_action(inputs[1], end);\n\t\t\t\t\tselects[0].value = start.getHours() * 60 + start.getMinutes();\n\t\t\t\t\tselects[1].value = end.getHours() * 60 + end.getMinutes();\n\n\t\t\t\t\tselects[0].disabled = input.checked;\n\t\t\t\t\tselects[1].disabled = input.checked;\n\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\tif (scheduler.config.event_duration && scheduler.config.auto_end_date) {\n\n\t\t\tvar _update_minical_select = function () {\n\t\t\t\tif (!(scheduler.config.auto_end_date && scheduler.config.event_duration)){\n\t\t\t\t\t// setting may be disabled after the handler is attached\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tstart_date = scheduler.date.add(inputs[0]._date, selects[0].value, \"minute\");\n\t\t\t\tend_date = new Date(start_date.getTime() + (scheduler.config.event_duration * 60 * 1000));\n\n\t\t\t\tinputs[1].value = scheduler.templates.calendar_time(end_date);\n\t\t\t\tinputs[1]._date = scheduler.date.date_part(new Date(end_date));\n\n\t\t\t\tselects[1].value = end_date.getHours() * 60 + end_date.getMinutes();\n\t\t\t};\n\n\t\t\tif(!selects[0].$_eventAttached){\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\n\t\t\t}\n\t\t}\n\n\t\tfunction _attach_action(inp, date, number) {\n\t\t\t_init_once(inp, date, number);\n\t\t\tinp.value = scheduler.templates.calendar_time(date);\n\t\t\tinp._date = scheduler.date.date_part(new Date(date));\n\t\t}\n\n\t\t_attach_action(inputs[0], ev.start_date, 0);\n\t\t_attach_action(inputs[1], ev.end_date, 1);\n\t\t_init_once = function() {};\n\n\t\tfunction _round_minutes(date) {\n\t\t\tvar time_values = config._time_values;\n\t\t\tvar direct_value = date.getHours() * 60 + date.getMinutes();\n\t\t\tvar fixed_value = direct_value;\n\t\t\tvar value_found = false;\n\n\t\t\tfor (var k = 0; k < time_values.length; k++) {\n\t\t\t\tvar t_v = time_values[k];\n\t\t\t\tif (t_v === direct_value) {\n\t\t\t\t\tvalue_found = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (t_v < direct_value)\n\t\t\t\t\tfixed_value = t_v;\n\t\t\t}\n\n\t\t\tif(!(value_found || fixed_value))\n\t\t\t\treturn -1;\n\n\t\t\treturn (value_found) ? direct_value : fixed_value;\n\t\t}\n\n\t\tselects[0].value = _round_minutes(ev.start_date);\n\t\tselects[1].value = _round_minutes(ev.end_date);\n\n\t},\n\tget_value: function(node, ev) {\n\t\tvar inputs = node.getElementsByTagName(\"input\");\n\t\tvar selects = node.getElementsByTagName(\"select\");\n\n\t\tev.start_date = scheduler.date.add(inputs[0]._date, selects[0].value, \"minute\");\n\t\tev.end_date = scheduler.date.add(inputs[1]._date, selects[1].value, \"minute\");\n\n\t\tif (ev.end_date <= ev.start_date)\n\t\t\tev.end_date = scheduler.date.add(ev.start_date, scheduler.config.time_step, \"minute\");\n\t\treturn {\n\t\t\tstart_date: new Date(ev.start_date),\n\t\t\tend_date: new Date(ev.end_date)\n\t\t};\n\t},\n\tfocus: function(node) {\n\t}\n};\nscheduler.linkCalendar = function(calendar, datediff) {\n\tvar action = function() {\n\t\tvar date = scheduler._date;\n\t\tvar dateNew = new Date(date.valueOf());\n\t\tif (datediff) dateNew = datediff(dateNew);\n\t\tdateNew.setDate(1);\n\t\tscheduler.updateCalendar(calendar, dateNew);\n\t\treturn true;\n\t};\n\n\tscheduler.attachEvent(\"onViewChange\", action);\n\tscheduler.attachEvent(\"onXLE\", action);\n\tscheduler.attachEvent(\"onEventAdded\", action);\n\tscheduler.attachEvent(\"onEventChanged\", action);\n\tscheduler.attachEvent(\"onEventDeleted\", action);\n\taction();\n};\n\nscheduler._markCalendarCurrentDate = function(calendar) {\n\tvar state = scheduler.getState();\n\tvar from = state.min_date;\n\tvar to = state.max_date;\n\tvar mode = state.mode;\n\n\tvar month_start = scheduler.date.month_start(new Date(calendar._date));\n\tvar month_end = scheduler.date.add(month_start, 1, \"month\");\n\n\tvar noHighlight = {\n\t\t\"month\":true,\n\t\t\"year\":true,\n\t\t\"agenda\":true,\n\t\t\"grid\":true\n\t};\n\t// no need to highlight current dates for a large range views - agenda, year, etc.\n\tif(noHighlight[mode] || (from.valueOf() <= month_start.valueOf() && to.valueOf() >= month_end.valueOf())){\n\t\treturn;\n\t}\n\n\tvar current = from;\n\twhile(current.valueOf() < to.valueOf()){\n\t\tif (month_start.valueOf() <= current.valueOf() && month_end > current) {\n\t\t\tscheduler.markCalendar(calendar, current, \"dhx_calendar_click\");\n\t\t}\n\t\tcurrent = scheduler.date.add(current, 1, \"day\");\n\t}\n};\n\nscheduler.attachEvent(\"onEventCancel\", function(){\n\tscheduler.destroyCalendar(null, true);\n});\n\nscheduler.attachEvent(\"onDestroy\", function(){\n\tscheduler.destroyCalendar();\n});\n\n}","export default function(scheduler){\n\nscheduler.attachEvent(\"onTemplatesReady\",function(){\n\tscheduler.xy.scroll_width = 0;\n\n\tvar old = scheduler.render_view_data;\n\tscheduler.render_view_data=function(){\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\n\t\tdata.firstChild._h_fix = true;\n\n\t\told.apply(scheduler,arguments);\n\n\n\n\t\tvar height = parseInt(data.style.height);\n\t\tdata.style.height=\"1px\";\n\t\tdata.style.height=data.scrollHeight+\"px\";\n\n\t\tthis._obj.style.height = this._obj.clientHeight + data.scrollHeight - height + \"px\";\n\t};\n\n\tvar old_s=scheduler._reset_month_scale;\n\tscheduler._reset_month_scale=function(a,b,c,d){\n\t\tvar dummy = {clientHeight:100};\n\t\told_s.apply(scheduler,[dummy,b,c,d]);\n\t\ta.innerHTML = dummy.innerHTML;\n\t};\n\n});\n\n}","import notImplemented from \"./not_implemented_extension\";\n\nexport default function(scheduler){\n\tnotImplemented.alert(\"Multisection\", scheduler.assert);\n}","export default function(scheduler){\n\n\nfunction parseXMLOptions(loader, config){\n\tvar items = scheduler.ajax.xpath(\"//data/item\", loader.xmlDoc);\n\tvar ids = {};\n\tfor (var i = 0; i < items.length; i++) {\n\t\tids[items[i].getAttribute(config.map_to)] = true;\n\t}\n\treturn ids;\n}\n\nfunction parseJSONOptions(loader, config){\n\ttry{\n\t\tvar items = JSON.parse(loader.xmlDoc.responseText);\n\t\tvar ids = {};\n\t\tfor (var i = 0; i < items.length; i++) {\n\t\t\tvar option = items[i];\n\n\t\t\tids[option.value || option.key || option.id] = true;\n\t\t}\n\t\treturn ids;\n\t}catch(e){\n\t\treturn null;\n\t}\n}\n\nscheduler.form_blocks[\"multiselect\"]={\n\trender:function(sns) {\n\t\tvar css = \"dhx_multi_select_control dhx_multi_select_\"+sns.name;\n\t\tif(!!sns.vertical){\n\t\t\tcss += \" dhx_multi_select_control_vertical\";\n\t\t}\n\n\t\tvar _result = \"
\";\n\t\tfor (var i=0; i\"+sns.options[i].label+\"\";\n\t\t}\n\t\t_result += \"
\";\n\t\treturn _result;\n\t},\n\tset_value:function(node,value,ev,config){\n\n\t\tvar _children = node.getElementsByTagName('input');\n\t\tfor(var i=0;i<_children.length;i++) {\n\t\t\t_children[i].checked = false; //unchecking all inputs on the form\n\t\t}\n\n\t\tfunction _mark_inputs(ids) { // ids = [ 0: undefined, 1: undefined, 2: true, 'custom_name': false ... ]\n\t\t\tvar _children = node.getElementsByTagName('input');\n\t\t\tfor(var i=0;i<_children.length; i++) {\n\t\t\t\t_children[i].checked = !! ids[_children[i].value];\n\t\t\t}\n\t\t}\n\n\t\tvar _ids = {};\n\t\tif (ev[config.map_to]) {\n\t\t\tvar results = (ev[config.map_to] + \"\").split(config.delimiter || scheduler.config.section_delimiter || \",\");\n\t\t\tfor (var i = 0; i < results.length; i++) {\n\t\t\t\t_ids[results[i]] = true;\n\t\t\t}\n\t\t\t_mark_inputs(_ids);\n\t\t} else {\n\t\t\tif (scheduler._new_event || !config.script_url)\n\t\t\t\treturn;\n\t\t\tvar divLoading = document.createElement('div');\n\t\t\tdivLoading.className = 'dhx_loading';\n\t\t\tdivLoading.style.cssText = \"position: absolute; top: 40%; left: 40%;\";\n\t\t\tnode.appendChild(divLoading);\n\n\t\t\tvar url = [\n\t\t\t\tconfig.script_url,\n\t\t\t\t(config.script_url.indexOf(\"?\") == -1 ? \"?\" : \"&\"),\n\t\t\t\t'dhx_crosslink_' + config.map_to + '=' + ev.id + '&uid=' + scheduler.uid()\n\t\t\t].join(\"\");\n\n\t\t\tscheduler.ajax.get(url, function(loader) {\n\t\t\t\tvar options = parseJSONOptions(loader, config);\n\t\t\t\tif(!options){\n\t\t\t\t\toptions = parseXMLOptions(loader, config);\n\t\t\t\t}\n\t\t\t\t_mark_inputs(options);\n\t\t\t\tnode.removeChild(divLoading);\n\t\t\t});\n\t\t}\n\t},\n\tget_value:function(node,ev,config){\n\t\tvar _result = [];\n\t\tvar _children = node.getElementsByTagName(\"input\");\n\t\tfor(var i=0;i<_children.length;i++) {\n\t\t\tif(_children[i].checked)\n\t\t\t\t_result.push(_children[i].value);\n\t\t}\n\t\treturn _result.join(config.delimiter || scheduler.config.section_delimiter || \",\");\n\t},\n\n\tfocus:function(node){\n\t}\n};\n\n}","export default function(scheduler){\n\n\n\tfunction backup(obj){\n\t\tvar t = function(){};\n\t\tt.prototype = obj;\n\t\treturn t;\n\t}\n\n\tvar old = scheduler._load;\n\tscheduler._load=function(url,from){\n\t\turl=url||this._load_url;\n\t\tif (typeof url == \"object\"){\n\t\t\tvar t = backup(this._loaded);\n\t\t\tfor (var i=0; i < url.length; i++) {\n\t\t\t\tthis._loaded=new t();\n\t\t\t\told.call(this,url[i],from);\n\t\t\t}\n\t\t} else\n\t\t\told.apply(this,arguments);\n\t};\n\n}","export default function(scheduler){\n\t/* global Backbone */\n\tvar cfg = {\n\t\tuse_id : false\n\t};\n\n\t//remove private properties\n\tfunction sanitize(ev){\n\t\tvar obj = {};\n\t\tfor (var key in ev)\n\t\t\tif (key.indexOf(\"_\") !== 0)\n\t\t\t\tobj[key] = ev[key];\n\n\t\tif (!cfg.use_id)\n\t\t\tdelete obj.id;\n\n\t\treturn obj;\n\t}\n\n\tvar update_timer;\n\tfunction update_view(){\n\t\tclearTimeout(update_timer);\n\t\tupdate_timer = setTimeout(function(){\n\t\t\tif(scheduler.$destroyed){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tscheduler.updateView();\n\t\t},1);\n\t}\n\n\tfunction _start_ext_load(cal){\n\t\tcal._loading = true;\n\t\tcal._not_render = true;\n\n\t\tcal.callEvent(\"onXLS\", []);\n\t}\n\tfunction _finish_ext_load(cal){\n\t\tcal._not_render = false;\n\t\tif (cal._render_wait)\n\t\t\tcal.render_view_data();\n\t\tcal._loading = false;\n\n\t\tcal.callEvent(\"onXLE\", []);\n\t}\n\n\n\tfunction _get_id(model){\n\t\treturn cfg.use_id ? model.id : model.cid;\n\t}\n\nscheduler.backbone = function(events, config){\n\tif (config) cfg = config;\n\n\tevents.bind(\"change\", function(model, info){\n\t\tvar cid = _get_id(model);\n\t\tvar ev = scheduler._events[cid] = model.toJSON();\n\t\tev.id = cid;\n\n\t\tscheduler._init_event(ev);\n\t\tupdate_view();\n\t});\n\tevents.bind(\"remove\", function(model, changes){\n\t\tvar cid = _get_id(model);\n\t\tif (scheduler._events[cid])\n\t\t\tscheduler.deleteEvent(cid);\n\t});\n\n\tvar queue = [];\n\tfunction add_from_queue(){\n\t\tif(scheduler.$destroyed){\n\t\t\treturn true;\n\t\t}\n\t\tif (queue.length){\n\t\t\tscheduler.parse(queue, \"json\");\n\t\t\tqueue = [];\n\t\t}\n\t}\n\n\tevents.bind(\"add\", function(model, changes){\n\t\tvar cid = _get_id(model);\n\t\tif (!scheduler._events[cid]){\n\t\t\tvar ev = model.toJSON();\n\t\t\tev.id = cid;\n\t\t\tscheduler._init_event(ev);\n\n\t\t\tqueue.push(ev);\n\t\t\tif (queue.length == 1)\n\t\t\t\tsetTimeout(add_from_queue,1);\n\t\t}\n\t});\n\n\tevents.bind(\"request\", function(obj){\n\t\tif (obj instanceof Backbone.Collection)\n\t\t\t_start_ext_load(scheduler);\n\t});\n\tevents.bind(\"sync\", function(obj){\n\t\tif (obj instanceof Backbone.Collection)\n\t\t\t_finish_ext_load(scheduler);\n\t});\n\tevents.bind(\"error\", function(obj){\n\t\tif (obj instanceof Backbone.Collection)\n\t\t\t_finish_ext_load(scheduler);\n\t});\n\n\n\tscheduler.attachEvent(\"onEventCreated\", function(id){\n\t\tvar ev = new events.model(scheduler.getEvent(id));\n\t\tscheduler._events[id] = ev.toJSON();\n\t\tscheduler._events[id].id = id;\n\n\t\treturn true;\n\t});\n\n\tscheduler.attachEvent(\"onEventAdded\", function(id){\n\t\tif (!events.get(id)){\n\t\t\tvar data = sanitize(scheduler.getEvent(id));\n\t\t\tvar model = new events.model(data);\n\n\t\t\tvar cid = _get_id(model);\n\t\t\tif (cid != id)\n\t\t\t\tthis.changeEventId(id, cid);\n\t\t\tevents.add(model);\n\t\t\tevents.trigger(\"scheduler:add\", model);\n\t\t}\n\t\treturn true;\n\t});\n\tscheduler.attachEvent(\"onEventChanged\", function(id){\n\t\tvar ev = events.get(id);\n\t\tvar upd = sanitize(scheduler.getEvent(id));\n\n\t\tev.set(upd);\n\t\tevents.trigger(\"scheduler:change\", ev);\n\n\t\treturn true;\n\t});\n\tscheduler.attachEvent(\"onEventDeleted\", function(id){\n\t\tvar model = events.get(id);\n\t\tif (model){\n\t\t\tevents.trigger(\"scheduler:remove\", model);\n\t\t\tevents.remove(id);\n\t\t}\n\t\treturn true;\n\t});\n};\n\n}","export default function(scheduler){\n\n\t/* global dhtmlDragAndDropObject, dhtmlx */\n// lame old code doesn't provide raw event object\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\n\t\tvar dragger = (new dhtmlDragAndDropObject());\n\t\tvar old = dragger.stopDrag;\n\t\tvar last_event;\n\t\tdragger.stopDrag = function(e) {\n\t\t\tlast_event = e;\n\t\t\treturn old.apply(this, arguments);\n\t\t};\n\n\t\tfunction on_drop(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml) {\n\n\t\t\tif (scheduler.checkEvent(\"onBeforeExternalDragIn\") && !scheduler.callEvent(\"onBeforeExternalDragIn\", [sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml, last_event]))\n\t\t\t\treturn;\n\n\t\t\tvar temp = scheduler.attachEvent(\"onEventCreated\", function (id) {\n\t\t\t\tif (!scheduler.callEvent(\"onExternalDragIn\", [id, sourceHtmlObject, last_event])) {\n\t\t\t\t\tthis._drag_mode = this._drag_id = null;\n\t\t\t\t\tthis.deleteEvent(id);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tvar action_data = scheduler.getActionData(last_event);\n\t\t\tvar event_data = {\n\t\t\t\tstart_date: new Date(action_data.date)\n\t\t\t};\n\n\t\t\t// custom views, need to assign section id, fix dates\n\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\n\t\t\t\tvar view_options = scheduler.matrix[scheduler._mode];\n\t\t\t\tevent_data[view_options.y_property] = action_data.section;\n\n\t\t\t\tvar pos = scheduler._locate_cell_timeline(last_event);\n\t\t\t\tevent_data.start_date = view_options._trace_x[pos.x];\n\t\t\t\tevent_data.end_date = scheduler.date.add(event_data.start_date, view_options.x_step, view_options.x_unit);\n\t\t\t}\n\t\t\tif (scheduler._props && scheduler._props[scheduler._mode]) {\n\t\t\t\tevent_data[scheduler._props[scheduler._mode].map_to] = action_data.section;\n\t\t\t}\n\n\t\t\tscheduler.addEventNow(event_data);\n\n\t\t\tscheduler.detachEvent(temp);\n\t\t}\n\n\t\tdragger.addDragLanding(scheduler._els[\"dhx_cal_data\"][0], {\n\t\t\t_drag: function(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml) {\n\t\t\t\ton_drop(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml);\n\t\t\t},\n\t\t\t_dragIn: function(htmlObject, shtmlObject) {\n\t\t\t\treturn htmlObject;\n\t\t\t},\n\t\t\t_dragOut: function(htmlObject) {\n\t\t\t\treturn this;\n\t\t\t}\n\t\t});\n\n\t\tif(dhtmlx.DragControl) {\n\t\t\tdhtmlx.DragControl.addDrop(scheduler._els[\"dhx_cal_data\"][0], {\n\t\t\t\tonDrop: function (source, target, d, e) {\n\t\t\t\t\tvar sourceDhtmlx = dhtmlx.DragControl.getMaster(source);\n\t\t\t\t\tlast_event = e;\n\t\t\t\t\ton_drop(source, sourceDhtmlx, target, e.target || e.srcElement);\n\t\t\t\t},\n\n\t\t\t\tonDragIn: function (source, target, e) {\n\t\t\t\t\treturn target;\n\t\t\t\t}\n\t\t\t}, true);\n\t\t}\n\t});\n\n}","export default function(scheduler){\n\n\tvar dx, dy,\n\t\thtml_regexp = new RegExp(\"<[^>]*>\", \"g\"),\n\t\tnewline_regexp = new RegExp(\"]*>\", \"g\");\n\n\tfunction clean_html(val) {\n\t\treturn val.replace(newline_regexp, \"\\n\").replace(html_regexp, \"\");\n\t}\n\n\tfunction x_norm(x, offset) {\n\t\tx = parseFloat(x);\n\t\toffset = parseFloat(offset);\n\t\tif (!isNaN(offset)) x -= offset;\n\n\t\tvar w = colsWidth(x);\n\t\tx = x - w.width + w.cols*dx;\n\t\treturn isNaN(x)?\"auto\":(100*x/(dx));\n\t}\n\n\tfunction x_norm_event(x, offset, is_left) {\n\t\tx = parseFloat(x);\n\t\toffset = parseFloat(offset);\n\t\tif (!isNaN(offset) && is_left) x -= offset;\n\n\t\tvar w = colsWidth(x);\n\t\tx = x - w.width + w.cols*dx;\n\t\treturn isNaN(x)?\"auto\":(100*x/(dx-(!isNaN(offset)?offset:0)));\n\t}\n\tfunction colsWidth(width) {\n\t\tvar r = 0;\n\t\tvar header = scheduler._els.dhx_cal_header[0].childNodes;\n\t\tvar els = header[1] ? header[1].childNodes : header[0].childNodes;\n\t\tfor (var i = 0; i < els.length; i++) {\n\t\t\tvar el = els[i].style ? els[i] : els[i].parentNode;\n\t\t\tvar w = parseFloat(el.style.width);\n\t\t\tif (width > w){\n\t\t\t\twidth -= (w+1);\n\t\t\t\tr+=(w+1);\n\t\t\t}\n\t\t\telse\n\t\t\t\tbreak;\n\t\t}\n\t\treturn { width: r, cols: i };\n\t}\n\n\tfunction y_norm(y) {\n\t\ty = parseFloat(y);\n\t\tif (isNaN(y)) return \"auto\";\n\t\treturn 100 * y / dy;\n\t}\n\n\tfunction get_style(node, style){\n\t\treturn (window.getComputedStyle?(window.getComputedStyle(node, null)[style]):(node.currentStyle?node.currentStyle[style]:null))||\"\";\n\t}\n\n\tfunction de_day(node, n) {\n\t\tvar x = parseInt(node.style.left, 10);\n\n\t\tfor (var dx = 0; dx < scheduler._cols.length; dx++) {\n\t\t\tx -= scheduler._cols[dx];\n\t\t\tif (x < 0) return dx;\n\t\t}\n\t\treturn n;\n\t}\n\n\tfunction de_week(node, n) {\n\t\tvar y = parseInt(node.style.top, 10);\n\t\tfor (var dy = 0; dy < scheduler._colsS.heights.length; dy++)\n\t\t\tif (scheduler._colsS.heights[dy] > y) return dy;\n\t\treturn n;\n\t}\n\n\tfunction xml_start(tag) {\n\t\treturn tag ? \"<\"+tag+\">\" : \"\";\n\t}\n\tfunction xml_end(tag) {\n\t\treturn tag ? \"\" : \"\";\n\t}\n\n\tfunction xml_top(tag, profile, header, footer) {\n\t\tvar xml = \"<\"+tag+\" profile='\" + profile + \"'\";\n\t\tif (header)\n\t\t\txml += \" header='\" + header + \"'\";\n\t\tif (footer)\n\t\t\txml += \" footer='\" + footer + \"'\";\n\t\txml += \">\";\n\t\treturn xml;\n\t}\n\n\tfunction xml_body_header() {\n\t\tvar xml = \"\";\n\t\t// detects if current mode is timeline\n\t\tvar mode = scheduler._mode;\n\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode])\n\t\t\tmode = (scheduler.matrix[scheduler._mode].render == \"cell\") ? \"matrix\" : \"timeline\";\n\t\txml += \"\";\n\n\t\tif (scheduler._mode == \"week_agenda\") {\n\t\t\tvar xh = scheduler._els.dhx_cal_data[0].getElementsByTagName(\"DIV\");\n\t\t\tfor (var i = 0; i < xh.length; i++)\n\t\t\t\tif (xh[i].className == \"dhx_wa_scale_bar\")\n\t\t\t\t\txml += \"\" + clean_html(xh[i].innerHTML) + \"\";\n\t\t} else if (scheduler._mode == \"agenda\" || scheduler._mode == \"map\") {\n\t\t\tvar xh = scheduler._els.dhx_cal_header[0].childNodes[0].childNodes;\n\n\t\t\txml += \"\" + clean_html(xh[0].innerHTML) + \"\" + clean_html(xh[1].innerHTML) + \"\";\n\t\t} else if (scheduler._mode == \"year\") {\n\t\t\tvar xh = scheduler._els.dhx_cal_data[0].childNodes;\n\t\t\tfor (var i = 0; i < xh.length; i++) {\n\t\t\t\txml += \"\";\n\t\t\t\txml += xml_month_scale(xh[i].querySelector(\".dhx_year_week\").childNodes);\n\t\t\t\txml += xml_month(xh[i].querySelector(\".dhx_year_body\"));\n\t\t\t\txml += \"\";\n\t\t\t}\n\t\t} else {\n\t\t\txml += \"\";\n\t\t\tvar xh = scheduler._els.dhx_cal_header[0].childNodes;\n\t\t\txml += xml_month_scale(xh);\n\t\t\txml += \"\";\n\n\t\t\tvar yh = scheduler._els.dhx_cal_data[0];\n\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\n\t\t\t\txml += \"\";\n\t\t\t\tfor (var i = 0; i < yh.firstChild.rows.length; i++) {\n\t\t\t\t\tvar el = yh.firstChild.rows[i];\n\t\t\t\t\txml += \"\";\n\t\t\t\t}\n\t\t\t\txml += \"\";\n\t\t\t\tdy = yh.firstChild.rows[0].cells[0].offsetHeight;\n\t\t\t} else if (yh.firstChild.tagName == \"TABLE\") {\n\t\t\t\txml += xml_month(yh);\n\t\t\t} else {\n\t\t\t\tyh = yh.childNodes[yh.childNodes.length - 1];\n\t\t\t\twhile (yh.className.indexOf(\"dhx_scale_holder\") == -1)\n\t\t\t\t\tyh = yh.previousSibling;\n\t\t\t\tyh = yh.childNodes;\n\n\t\t\t\txml += \"\";\n\t\t\t\tfor (var i = 0; i < yh.length; i++)\n\t\t\t\t\txml += \"\\n\";\n\t\t\t\txml += \"\";\n\t\t\t\tdy = yh[0].offsetHeight;\n\t\t\t}\n\t\t}\n\t\txml += \"\";\n\t\treturn xml;\n\t}\n\n\tfunction xml_month(yh) {\n\t\tvar xml = \"\";\n\t\tvar r = yh.querySelectorAll(\"tr\");\n\t\tfor (var i = 0; i < r.length; i++) {\n\t\t\tvar days = [];\n\t\t\tvar cells = r[i].querySelectorAll(\"td\");\n\n\t\t\tfor (var j = 0; j < cells.length; j++)\n\t\t\t\tdays.push(cells[j].querySelector(\".dhx_month_head\").innerHTML);\n\n\t\t\txml += \"\\n\";\n\t\t\tdy = cells[0].offsetHeight;\n\t\t}\n\t\treturn xml;\n\t}\n\n\tfunction xml_month_scale(xh) {\n\t\tvar xhs,\n\t\t\txml = \"\";\n\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\n\t\t\tif (scheduler.matrix[scheduler._mode].second_scale)\n\t\t\t\txhs = xh[1].childNodes;\n\n\t\t\txh = xh[0].childNodes;\n\t\t}\n\n\t\tfor (var i = 0; i < xh.length; i++)\n\t\t\txml += \"\\n\";\n\t\tdx = xh[0].offsetWidth;\n\n\t\tif (xhs) {\n\t\t\tvar width = 0;\n\t\t\tvar top_width = xh[0].offsetWidth;\n\t\t\tvar top_col = 1;\n\t\t\tfor (var i = 0; i < xhs.length; i++) {\n\t\t\t\txml += \"\\n\";\n\t\t\t\twidth += xhs[i].offsetWidth;\n\t\t\t\tif (width >= top_width) {\n\t\t\t\t\ttop_width += (xh[top_col] ? xh[top_col].offsetWidth : 0);\n\t\t\t\t\ttop_col++;\n\t\t\t\t}\n\t\t\t\tdx = xhs[0].offsetWidth;\n\t\t\t}\n\t\t}\n\t\treturn xml;\n\t}\n\n\tfunction xml_body(colors) {\n\t\tvar xml = \"\";\n\t\tvar evs = scheduler._rendered;\n\t\tvar matrix = scheduler.matrix && scheduler.matrix[scheduler._mode];\n\n\t\tif (scheduler._mode == \"agenda\" || scheduler._mode == \"map\") {\n\n\t\t\tfor (var i = 0; i < evs.length; i++)\n xml += \"\";\n\n\t\t} else if (scheduler._mode == \"week_agenda\") {\n\n\t\t\tfor (var i = 0; i < evs.length; i++)\n\t\t\t\txml += \"\" + clean_html(evs[i].innerHTML) + \"\";\n\n\t\t} else if (scheduler._mode == \"year\") {\n\n\t\t\tvar evs = scheduler.get_visible_events();\n\t\t\tfor (var i = 0; i < evs.length; i++) {\n\t\t\t\tvar d = evs[i].start_date;\n\t\t\t\tif (d.valueOf() < scheduler._min_date.valueOf())\n\t\t\t\t\td = scheduler._min_date;\n\n\t\t\t\twhile (d < evs[i].end_date) {\n\t\t\t\t\tvar m = d.getMonth() + 12 * (d.getFullYear() - scheduler._min_date.getFullYear()) - scheduler.week_starts._month;\n\t\t\t\t\tvar day = scheduler.week_starts[m] + d.getDate() - 1;\n\t\t\t\t\tvar text_color = colors ? get_style(scheduler._get_year_cell(d), \"color\") : \"\";\n\t\t\t\t\tvar bg_color = colors ? get_style(scheduler._get_year_cell(d), \"backgroundColor\") : \"\";\n\n\t\t\t\t\txml += \"\";\n\t\t\t\t\td = scheduler.date.add(d, 1, \"day\");\n\t\t\t\t\tif (d.valueOf() >= scheduler._max_date.valueOf())\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (matrix && matrix.render == \"cell\") {\n\t\t\tvar evs = scheduler._els.dhx_cal_data[0].getElementsByTagName(\"TD\");\n\t\t\tfor (var i = 0; i < evs.length; i++) {\n\t\t\t\tvar text_color = colors ? get_style(evs[i], \"color\") : \"\";\n\t\t\t\tvar bg_color = colors ? get_style(evs[i], \"backgroundColor\") : \"\";\n\t\t\t\txml += \"\\n\";\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var i = 0; i < evs.length; i++) {\n\t\t\t\tvar zx, zdx;\n\t\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\n\t\t\t\t\t// logic for timeline view\n\t\t\t\t\tzx = x_norm(evs[i].style.left);\n\t\t\t\t\tzdx = x_norm(evs[i].offsetWidth)-1;\n\t\t\t\t} else {\n\t\t\t\t\t// we should use specific logic for day/week/units view\n\t\t\t\t\tvar left_norm = scheduler.config.use_select_menu_space ? 0 : 26;\n\t\t\t\t\tzx = x_norm_event(evs[i].style.left, left_norm, true);\n\t\t\t\t\tzdx = x_norm_event(evs[i].style.width, left_norm)-1;\n\t\t\t\t}\n\t\t\t\tif (isNaN(zdx * 1)) continue;\n\t\t\t\tvar zy = y_norm(evs[i].style.top);\n\t\t\t\tvar zdy = y_norm(evs[i].style.height);\n\n\t\t\t\tvar e_type = evs[i].className.split(\" \")[0].replace(\"dhx_cal_\", \"\");\n\t\t\t\tif (e_type === 'dhx_tooltip_line') continue;\n\n\t\t\t\tvar dets = scheduler.getEvent(evs[i].getAttribute(scheduler.config.event_attribute));\n if (!dets) continue;\n\t\t\t\tvar day = dets._sday;\n\t\t\t\tvar week = dets._sweek;\n\t\t\t\tvar length = dets._length || 0;\n\n\t\t\t\tif (scheduler._mode == \"month\") {\n\t\t\t\t\tzdy = parseInt(evs[i].offsetHeight, 10);\n\t\t\t\t\tzy = parseInt(evs[i].style.top, 10) - scheduler.xy.month_head_height;\n\n\t\t\t\t\tday = de_day(evs[i], day);\n\t\t\t\t\tweek = de_week(evs[i], week);\n\t\t\t\t} else if (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\n\t\t\t\t\tday = 0;\n\t\t\t\t\tvar el = evs[i].parentNode.parentNode.parentNode;\n\t\t\t\t\tweek = el.rowIndex;\n\t\t\t\t\tvar dy_copy = dy;\n\t\t\t\t\tdy = evs[i].parentNode.offsetHeight;\n\t\t\t\t\tzy = y_norm(evs[i].style.top);\n\t\t\t\t\tzy -= zy * 0.2;\n\t\t\t\t\tdy = dy_copy;\n\t\t\t\t} else {\n\t\t\t\t\tif (evs[i].parentNode == scheduler._els.dhx_cal_data[0]) continue;\n\t\t\t\t\tvar parent = scheduler._els[\"dhx_cal_data\"][0].childNodes[0];\n\t\t\t\t\tvar offset = parseFloat(parent.className.indexOf(\"dhx_scale_holder\") != -1 ? parent.style.left : 0);\n\t\t\t\t\tzx += x_norm(evs[i].parentNode.style.left, offset);\n\t\t\t\t}\n\n\t\t\t\txml += \"\\n\";\n\n\t\t\t\tif (e_type == \"event\") {\n\t\t\t\t\txml += \"
\";\n\t\t\t\t\tvar text_color = colors ? get_style(evs[i].childNodes[2], \"color\") : \"\";\n\t\t\t\t\tvar bg_color = colors ? get_style(evs[i].childNodes[2], \"backgroundColor\") : \"\";\n\t\t\t\t\txml += \"\";\n\t\t\t\t} else {\n\t\t\t\t\tvar text_color = colors ? get_style(evs[i], \"color\") : \"\";\n\t\t\t\t\tvar bg_color = colors ? get_style(evs[i], \"backgroundColor\") : \"\";\n\t\t\t\t\txml += \"\";\n\t\t\t\t}\n\t\t\t\txml += \"
\";\n\t\t\t}\n\t\t\t}\n\n\t\treturn xml;\n\t}\n\n\tfunction toXML(start, end, view, mode, header, footer){\n\t\tvar colors = false;\n\t\tif (mode == \"fullcolor\") {\n\t\t\tcolors = true;\n\t\t\tmode = \"color\";\n\t\t}\n\n\t\tmode = mode || \"color\";\n\n\t\tvar xml = \"\";\n\t\tif (start) {\n\n\t\t\tvar original_date = scheduler._date;\n\t\t\tvar original_mode = scheduler._mode;\n\t\t\tend = scheduler.date[view+\"_start\"](end);\n\t\t\tend = scheduler.date[\"get_\"+view+\"_end\"] ? scheduler.date[\"get_\"+view+\"_end\"](end) : scheduler.date.add(end, 1, view);\n\n\t\t\txml = xml_top(\"pages\", mode, header, footer);\n\t\t\tfor (var temp_date = new Date(start); +temp_date < +end; temp_date = this.date.add(temp_date, 1, view)) {\n\t\t\t\tthis.setCurrentView(temp_date, view);\n\t\t\t\txml += xml_start(\"page\") + xml_body_header().replace(\"\\u2013\", \"-\") + xml_body(colors) + xml_end(\"page\");\n\t\t\t}\n\t\t\txml += xml_end(\"pages\");\n\n\t\t\tthis.setCurrentView(original_date, original_mode);\n\t\t} else {\n\t\t\txml = xml_top(\"data\", mode, header, footer) + xml_body_header().replace(\"\\u2013\", \"-\") + xml_body(colors) + xml_end(\"data\");\n\t\t}\n\t\treturn xml;\n\t}\n\tscheduler.getPDFData = toXML;\n\tfunction send_xml(xml, url){\n\t\tvar uid = scheduler.uid();\n\t\tvar d = document.createElement(\"div\");\n\t\td.style.display = \"none\";\n\t\tdocument.body.appendChild(d);\n\n\t\td.innerHTML = '
';\n\t\tdocument.getElementById(uid).firstChild.value = encodeURIComponent(xml);\n\t\tdocument.getElementById(uid).submit();\n\t\td.parentNode.removeChild(d);\n\t}\n\n\tfunction to_pdf(start, end, view, url, mode, header, footer) {\n\t\tvar xml = \"\";\n\t\tif(typeof mode == \"object\"){\n\t\t\txml = schedulersToPdf(mode);\n\t\t}else{\n\t\t\txml = toXML.apply(this, [start, end, view, mode, header, footer]);\n\t\t}\n\n\t\tsend_xml(xml, url);\n\t}\n\n\tfunction schedulersToPdf(objects){\n\t\tvar xml = \"\";\n\t\tfor(var i=0; i < objects.length; i++){\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);\n\t\t}\n\t\txml += \"\";\n\t\treturn xml;\n\t}\n\n\t/*\n\t * scheduler.toPDF(url, mode, header, footer) - for a single scheduler\n\t * scheduler.toPDF(url, [scheduler1, scheduler2,...]) - for multiple schedulers\n\t * example:\n\t * scheduler.toPDF(\"generate.ashx\", [\n\t * { source: scheduler1, mode: \"color\" },\n\t * { source: scheduler2, mode: \"gray\", view:\"week\", start:new Date(2013, 06, 1), end:new Date(2013, 06, 28) },\n\t * { source: scheduler3 }\n\t * ]);\n\t *\n\t */\n\tscheduler.toPDF = function(url, mode, header, footer) {\n\t\treturn to_pdf.apply(this, [null, null, null, url, mode, header, footer]);\n\t};\n\tscheduler.toPDFRange = function(start, end, view, url, mode, header, footer) {\n\t\tif (typeof start == \"string\") {\n\t\t\tstart = scheduler.templates.api_date(start);\n\t\t\tend = scheduler.templates.api_date(end);\n\t\t}\n\n\t\treturn to_pdf.apply(this, arguments);\n\t};\n\n}","export default function(scheduler){\n\nscheduler.config.icons_select = [\"icon_form\", \"icon_delete\"];\nscheduler.config.details_on_create = true;\nscheduler.config.show_quick_info = true;\nscheduler.xy.menu_width = 0;\n\nscheduler.attachEvent(\"onClick\", function(id){\n\tif(!scheduler.config.show_quick_info){\n\t\treturn;\n\t}\n\tscheduler.showQuickInfo(id);\n\treturn true;\n});\n\n(function(){\n\t// pass `force` argument in order to hide quick info synchronously\n\t// so it won't affect showQuickInfo call that can follow\n\tvar events = [\"onEmptyClick\", \"onViewChange\", \"onLightbox\", \"onBeforeEventDelete\", \"onBeforeDrag\"];\n\tvar hiding_function = function(){\n\t\tscheduler.hideQuickInfo(true);\n\t\treturn true;\n\t};\n\tfor (var i=0; i window.innerWidth){\n\t\t\tleft = window.innerWidth - width;\n\t\t}\n\t\tleft = Math.max(0, left);\n\n\t\tqi.style.left = left + \"px\";\n\t\tqi.style.top = pos.top - (pos.dy?height:-pos.height) + \"px\";\n\t} else {\n\n\t\tconst dataPos = scheduler.$container.querySelector('.dhx_cal_data').offsetTop;\n\t\tqi.style.top = dataPos + 20 + \"px\";\n\t\tif (pos.dx == 1){\n\t\t\tqi.style.right = \"auto\";\n\t\t\tqi.style.left = -width + \"px\";\n\n\t\t\tsetTimeout(function(){\n\t\t\t\tqi.style.left = \"-10px\";\n\t\t\t},1);\n\t\t} else {\n\t\t\tqi.style.left = \"auto\";\n\t\t\tqi.style.right = -width + \"px\";\n\n\t\t\tsetTimeout(function(){\n\t\t\t\tqi.style.right = \"-10px\";\n\t\t\t},1);\n\t\t}\n\t\tqi.className = qi.className.replace(\" dhx_qi_left\",\"\").replace(\" dhx_qi_right\",\"\")+\" dhx_qi_\"+(pos.dx==1?\"left\":\"right\");\n\t}\n};\nscheduler.attachEvent(\"onTemplatesReady\", function(){\n\tscheduler.hideQuickInfo();\n\tif(this._quick_info_box){\n\t\tvar box = this._quick_info_box;\n\t\tif(box.parentNode){\n\t\t\tbox.parentNode.removeChild(box);\n\t\t}\n\t\tthis._quick_info_box = null;\n\t}\n});\nscheduler._quick_info_onscroll_handler = function(e){\n\tscheduler.hideQuickInfo();\n};\nscheduler._init_quick_info = function(){\n\tif (!this._quick_info_box){\n\n\n\t\tvar qi = this._quick_info_box = document.createElement(\"div\");\n\n\t\tthis._waiAria.quickInfoAttr(qi);\n\n\t\tqi.className = \"dhx_cal_quick_info\";\n\t\tif (scheduler.$testmode)\n\t\t\tqi.className += \" dhx_no_animate\";\n\t\tif (scheduler.config.rtl) qi.className += \" dhx_quick_info_rtl\";\n\t//title\n\t\tvar ariaAttr = this._waiAria.quickInfoHeaderAttrString();\n\t\tvar html = `\n\t\t
\n\t\t\t\n\t\t
\n\t\t
\n\t\t\t\t\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t\t
`;\n\n\t//buttons\n\t\thtml += \"
\";\n\t\tvar buttons = scheduler.config.icons_select;\n\t\t\tfor (var i = 0; i < buttons.length; i++) {\n\t\t\t\tvar ariaAttr = this._waiAria.quickInfoButtonAttrString(this.locale.labels[buttons[i]]);\n\t\t\t\thtml += `
\n\t\t\t\t
${scheduler.locale.labels[buttons[i]]}
`;\n\t\t\t}\n\t\t// }\n\t\thtml += \"
\";\n\n\t\tqi.innerHTML = html;\n\t\tscheduler.event(qi, \"click\", function(ev){\n\t\t\tscheduler._qi_button_click(ev.target || ev.srcElement);\n\t\t});\n\t\tif (scheduler.config.quick_info_detached){\n\t\t\tscheduler._detachDomEvent(scheduler._els[\"dhx_cal_data\"][0], \"scroll\", scheduler._quick_info_onscroll_handler);\n\t\t\tscheduler.event(scheduler._els[\"dhx_cal_data\"][0], \"scroll\", scheduler._quick_info_onscroll_handler);\n\t\t}\n\t}\n\n\treturn this._quick_info_box;\n};\n\nscheduler._qi_button_click = function(node){\n\tvar box = scheduler._quick_info_box;\n\tif (!node || node == box) return;\n\n\tif(node.closest(\".dhx_cal_qi_close_btn\")){\n\t\tscheduler.hideQuickInfo();\n\t\treturn;\n\t}\n\n\tvar mask = scheduler._getClassName(node);\n\tif (mask.indexOf(\"_icon\")!=-1){\n\t\tvar id = scheduler._quick_info_box_id;\n\t\tscheduler._click.buttons[mask.split(\" \")[1].replace(\"icon_\",\"\")](id);\n\t} else\n\t\tscheduler._qi_button_click(node.parentNode);\n};\nscheduler._get_event_counter_part = function(id){\n\tvar domEv = scheduler.getRenderedEvent(id);\n\tvar left = 0;\n\tvar top = 0;\n\n\tvar node = domEv;\n\twhile (node && node != scheduler._obj){\n\t\tleft += node.offsetLeft;\n\t\ttop += node.offsetTop-node.scrollTop;\n\t\tnode = node.offsetParent;\n\t}\n\tif(node){\n\t\tvar dx = (left + domEv.offsetWidth/2) > (scheduler._x/2) ? 1 : 0;\n\t\tvar dy = (top + domEv.offsetHeight/2) > (scheduler._y/2) ? 1 : 0;\n\n\t\treturn { left:left, top:top, dx:dx, dy:dy,\n\t\t\twidth:domEv.offsetWidth, height:domEv.offsetHeight };\n\t}\n\treturn 0;\n};\n\nscheduler._fill_quick_data = function(id){\n\tvar ev = scheduler.getEvent(id);\n\tvar qi = scheduler._quick_info_box;\n\n\tscheduler._quick_info_box_id = id;\n\n//title content\n\n\tvar header = {\n\t\tcontent: scheduler.templates.quick_info_title(ev.start_date, ev.end_date, ev),\n\t\tdate: scheduler.templates.quick_info_date(ev.start_date, ev.end_date, ev)\n\t};\n\tvar titleContent = qi.querySelector(\".dhx_cal_qi_tcontent\");\n\ttitleContent.innerHTML = `${header.content}`;\n\tvar titleDate = qi.querySelector(\".dhx_cal_qi_tdate\");\n\ttitleDate.innerHTML = header.date;\n\n\tscheduler._waiAria.quickInfoHeader(qi, [header.content, header.date].join(\" \"));\n\n//main content\n\tvar main = qi.querySelector(\".dhx_cal_qi_content\");\n\tconst mainContent = scheduler.templates.quick_info_content(ev.start_date, ev.end_date, ev);\n\tif(mainContent){\n\t\tmain.classList.remove(\"dhx_hidden\");\n\t\tmain.innerHTML = mainContent;\n\t}else{\n\t\tmain.classList.add(\"dhx_hidden\");\n\t}\n};\n\n\n}","export default function(scheduler){\n\t\nscheduler.attachEvent(\"onTemplatesReady\", function() {\n\tvar originalRecurringSetValue;\n\tif (scheduler.form_blocks.recurring) {\n\t\toriginalRecurringSetValue = scheduler.form_blocks.recurring.set_value;\n\t}\n\tvar original_left_buttons = scheduler.config.buttons_left.slice();\n\tvar original_right_buttons = scheduler.config.buttons_right.slice();\n\n\tscheduler.attachEvent(\"onBeforeLightbox\", function(id) {\n\t\tif (this.config.readonly_form || this.getEvent(id).readonly) {\n\t\t\tthis.config.readonly_active = true;\n\t\t}\n\t\telse {\n\t\t\tthis.config.readonly_active = false;\n\t\t\tscheduler.config.buttons_left = original_left_buttons.slice();\n\t\t\tscheduler.config.buttons_right = original_right_buttons.slice();\n\t\n\t\t\t// initial value\n\t\t\tif(scheduler.form_blocks.recurring) {\n\t\t\t\tscheduler.form_blocks.recurring.set_value = originalRecurringSetValue;\n\t\t\t}\n\t\t}\n\n\t\tvar sns = this.config.lightbox.sections;\n\t\tif (this.config.readonly_active) {\n\t\t\tfor (var i = 0; i < sns.length; i++) {\n\t\t\t\tif (sns[i].type == 'recurring') {\n\t\t\t\t\tif (this.config.readonly_active && scheduler.form_blocks.recurring) {\n\t\t\t\t\t\tscheduler.form_blocks.recurring.set_value = function(node, value, ev) {\n\t\t\t\t\t\t\tvar wrapper = scheduler.$domHelpers.closest(node, \".dhx_wrap_section\");\n\t\t\t\t\t\t\tvar style = \"none\";\n\t\t\t\t\t\t\twrapper.querySelector('.dhx_cal_lsection').display = style;\n\t\t\t\t\t\t\twrapper.querySelector('.dhx_form_repeat').display = style;\n\t\t\t\t\t\t\twrapper.style.display = style;\n\n\t\t\t\t\t\t\tscheduler.setLightboxSize();\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar forbidden_buttons = [\"dhx_delete_btn\", \"dhx_save_btn\"];\n\t\t\tvar button_arrays = [scheduler.config.buttons_left, scheduler.config.buttons_right];\n\t\t\tfor (var i = 0; i < forbidden_buttons.length; i++) {\n\t\t\t\tvar forbidden_button = forbidden_buttons[i];\n\t\t\t\tfor (var k = 0; k < button_arrays.length; k++) {\n\t\t\t\t\tvar button_array = button_arrays[k];\n\t\t\t\t\tvar index = -1;\n\t\t\t\t\tfor (var p = 0; p < button_array.length; p++) {\n\t\t\t\t\t\tif (button_array[p] == forbidden_button) {\n\t\t\t\t\t\t\tindex = p;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (index != -1) {\n\t\t\t\t\t\tbutton_array.splice(index, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.resetLightbox();\n\n\t\treturn true;\n\t});\n\n\tfunction txt_replace(tag, d, n, text) {\n\t\tvar txts = d.getElementsByTagName(tag);\n\t\tvar txtt = n.getElementsByTagName(tag);\n\t\tfor (var i = txtt.length - 1; i >= 0; i--) {\n\t\t\tvar n = txtt[i];\n\t\t\tif (!text){\n\t\t\t\tn.disabled = true;\n\t\t\t\t//radio and checkboxes loses state after .cloneNode in IE\n\t\t\t\tif(d.checked)\n\t\t\t\t\tn.checked = true;\n\t\t\t}else {\n\t\t\t\tvar t = document.createElement(\"span\");\n\t\t\t\tt.className = \"dhx_text_disabled\";\n\t\t\t\tt.innerHTML = text(txts[i]);\n\t\t\t\tn.parentNode.insertBefore(t, n);\n\t\t\t\tn.parentNode.removeChild(n);\n\t\t\t}\n\t\t}\n\t}\n\n\tvar old = scheduler._fill_lightbox;\n\tscheduler._fill_lightbox = function() {\n\n\t\tvar lb = this.getLightbox();\n\t\tif (this.config.readonly_active) {\n\t\t\tlb.style.visibility = 'hidden';\n\t\t\t// lightbox should have actual sizes before rendering controls\n\t\t\t// currently only matters for dhtmlxCombo\n\t\t\tlb.style.display = 'block';\n\t\t}\n\t\tvar res = old.apply(this, arguments);\n\t\tif (this.config.readonly_active) {\n\t\t\t//reset visibility and display\n\t\t\tlb.style.visibility = '';\n\t\t\tlb.style.display = 'none';\n\t\t}\n\n\t\tif (this.config.readonly_active) {\n\n\t\t\tvar originalForm = this.getLightbox();\n\t\t\tvar readonlyForm = this._lightbox_r = originalForm.cloneNode(true);\n\t\t\treadonlyForm.id = scheduler.uid();\n\t\t\treadonlyForm.className += \" dhx_cal_light_readonly\";\n\t\t\ttxt_replace(\"textarea\", originalForm, readonlyForm, function(a) {\n\t\t\t\treturn a.value;\n\t\t\t});\n\t\t\ttxt_replace(\"input\", originalForm, readonlyForm, false);\n\t\t\ttxt_replace(\"select\", originalForm, readonlyForm, function(a) {\n\t\t\t\tif(!a.options.length) return \"\";\n\t\t\t\treturn a.options[Math.max((a.selectedIndex || 0), 0)].text;\n\t\t\t});\n\n\t\t\toriginalForm.parentNode.insertBefore(readonlyForm, originalForm);\n\n\t\t\tthis.showCover(readonlyForm);\n\t\t\tif (scheduler._lightbox)\n\t\t\t\tscheduler._lightbox.parentNode.removeChild(scheduler._lightbox);\n\t\t\tthis._lightbox = readonlyForm;\n\n\t\t\tif (scheduler.config.drag_lightbox)\n\t\t\t\tscheduler.event(readonlyForm.firstChild, \"mousedown\", scheduler._ready_to_dnd);\n\t\t\t\t\n\t\t\tscheduler._init_lightbox_events();\n\t\t\tthis.setLightboxSize();\n\t\t}\n\t\treturn res;\n\t};\n\n\tvar hold = scheduler.hide_lightbox;\n\tscheduler.hide_lightbox = function() {\n\t\tif (this._lightbox_r) {\n\t\t\tthis._lightbox_r.parentNode.removeChild(this._lightbox_r);\n\t\t\tthis._lightbox_r = this._lightbox = null;\n\t\t}\n\n\t\treturn hold.apply(this, arguments);\n\t};\n});\n\n\n}","export default function(scheduler){\n\nscheduler.config.occurrence_timestamp_in_utc = false;\nscheduler.config.recurring_workdays = [1,2,3,4,5];\nscheduler.form_blocks[\"recurring\"] = {\n\t_get_node : function(node){\n\t\tif (typeof node == \"string\"){\n\t\t\tlet element = scheduler._lightbox.querySelector(`#${node}`);\n\t\t\tif(!element){\n\t\t\t\t// form is detached from lightbox \n\t\t\t\t// search globally, won't work in LWC\n\t\t\t\telement = document.getElementById(node);\n\t\t\t}\n\t\t\tnode = element;\n\t\t}\n\t\tif (node.style.display == 'none')\n\t\t\tnode.style.display = \"\";\n\t\treturn node;\n\t},\n\t_outer_html: function(node){\n\t\treturn node.outerHTML || getOuterHTML(node);\n\n\t\t//probably not needed, FF v10- only\n\t\tfunction getOuterHTML(n){\n\t\t\tvar div = document.createElement('div'), h;\n\t\t\tdiv.appendChild( n.cloneNode(true) );\n\t\t\th = div.innerHTML;\n\t\t\tdiv = null;\n\t\t\treturn h;\n\t\t}\n\t},\n\trender:function(sns) {\n\t\tif(sns.form){\n\t\t\tvar rec = scheduler.form_blocks[\"recurring\"];\n\t\t\tvar form = rec._get_node(sns.form);\n\t\t\tvar html = rec._outer_html(form);\n\t\t\tform.style.display = 'none';\n\t\t\treturn html;\n\t\t}\n\t\tvar loc = scheduler.locale.labels;\n\t\treturn '
'+\n\t\t\t\t\t'
'+\n\t\t\t\t\t\t'
'+\n\t\t\t\t\t\t\t'
'+\n\t\t\t\t\t\t\t'
'+\n\t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\t\t'
'+\n\t\t\t\t\t\t'
'+\n\t\t\t\t\t\t'
'+\n\t\t\t\t\t\t\t'
'+\n\t\t\t\t\t\t\t'
'+\n\t\t\t\t\t\t\t''+loc.repeat_text_occurences_count+'
'+\n\t\t\t\t\t\t\t'
'+\n\t\t\t\t\t\t\t'
'+\n\t\t\t\t\t\t'
'+\n\t\t\t\t\t'
'+\n\t\t\t\t'
'+\n\t\t\t\t'';\n\t},\n\t_ds: {},\n\t_get_form_node: function(els, name, value){\n\t\tvar col = els[name];\n\t\tif(!col) return null;\n\t\tif(col.nodeName) return col;\n\n\t\tif(col.length){\n\t\t\tfor(var i=0; i < col.length; i++){\n\t\t\t\tif(col[i].value == value)\n\t\t\t\t\treturn col[i];\n\t\t\t}\n\t\t}\n\t},\n\t_get_node_value: function(els, name, multiselect){\n\t\tvar col = els[name];\n\t\tif(!col) return \"\";\n\t\tif(col.length){\n\t\t\tif(multiselect){\n\t\t\t\tvar res = [];\n\t\t\t\tfor (var i = 0; i < col.length; i++)\n\t\t\t\t\tif (col[i].checked) res.push(col[i].value);\n\n\t\t\t\treturn res;\n\t\t\t}else{\n\t\t\t\tfor (var i = 0; i < col.length; i++)\n\t\t\t\t\tif (col[i].checked) return col[i].value;\n\t\t\t}\n\t\t}\n\n\t\tif(col.value)\n\t\t\treturn !multiselect ? col.value : [col.value];\n\t},\n\n\t_get_node_numeric_value: function(els, name){\n\t\tvar value = scheduler.form_blocks[\"recurring\"]._get_node_value(els, name);\n\t\treturn ((value * 1) || 0);\n\t},\n\n\t_set_node_value: function(els, name, value){\n\t\tvar col = els[name];\n\t\tif(!col) return;\n\n\t\tif(col.name == name){\n\t\t\tcol.value = value;\n\t\t}else if(col.length){\n\t\t\tvar hash_value = typeof value == \"object\";\n\t\t\tfor (var i = 0; i < col.length; i++)\n\t\t\t\tif (hash_value || col[i].value == value){\n\t\t\t\t\tcol[i].checked = hash_value ? !!value[col[i].value] : !!value;\n\t\t\t\t}\n\t\t}\n\t},\n\n\t_init_set_value:function(node, value, ev) {\n\t\tvar block = scheduler.form_blocks[\"recurring\"];\n\t\tvar get_value = block._get_node_value;\n\t\tvar set_value = block._set_node_value;\n\t\tscheduler.form_blocks[\"recurring\"]._ds = {start:ev.start_date, end:ev._end_date};\n\n\t\tvar str_date_format = scheduler.date.str_to_date(scheduler.config.repeat_date, false, true);\n\t\tvar str_date = function(str_date) {\n\t\t\tvar date = str_date_format(str_date);\n\t\t\tif (scheduler.config.include_end_by)\n\t\t\t\tdate = scheduler.date.add(date, 1, 'day');\n\t\t\treturn date;\n\t\t};\n\n\t\tvar date_str = scheduler.date.date_to_str(scheduler.config.repeat_date);\n\n\t\tvar top = node.getElementsByTagName(\"FORM\")[0];\n\t\tvar els = {};\n\n\t\tfunction register_els(inps) {\n\t\t\tfor (var i = 0; i < inps.length; i++) {\n\t\t\t\tvar inp = inps[i];\n\n\t\t\t\tif(inp.name){\n\t\t\t\t\tif(!els[inp.name]){\n\t\t\t\t\t\tels[inp.name] = inp;\n\t\t\t\t\t}else if(els[inp.name].nodeType){\n\t\t\t\t\t\tvar node = els[inp.name];\n\t\t\t\t\t\tels[inp.name] = [node, inp];\n\n\t\t\t\t\t}else{\n\t\t\t\t\t\tels[inp.name].push(inp);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tregister_els(top.getElementsByTagName(\"INPUT\"));\n\t\tregister_els(top.getElementsByTagName(\"SELECT\"));\n\n\t\tif (!scheduler.config.repeat_date_of_end) {\n\t\t\tvar formatter = scheduler.date.date_to_str(scheduler.config.repeat_date);\n\t\t\tscheduler.config.repeat_date_of_end = formatter(scheduler.date.add(scheduler._currentDate(), 30, \"day\"));\n\t\t}\n\t\tset_value(els, \"date_of_end\", scheduler.config.repeat_date_of_end);\n\n\t\tvar $ = function(a) {\n\t\t\treturn scheduler._lightbox.querySelector(`#${a}`) || { style:{} };//return fake object if node not found\n\t\t};\n\n\t\tfunction change_current_view() {\n\t\t\t$(\"dhx_repeat_day\").style.display = \"none\";\n\t\t\t$(\"dhx_repeat_week\").style.display = \"none\";\n\t\t\t$(\"dhx_repeat_month\").style.display = \"none\";\n\t\t\t$(\"dhx_repeat_year\").style.display = \"none\";\n\t\t\t$(\"dhx_repeat_\" + this.value).style.display = \"\";\n\t\t\tscheduler.setLightboxSize();\n\t\t}\n\n\t\tfunction get_repeat_code(dates) {\n\t\t\tvar code = [get_value(els, \"repeat\")];\n\t\t\tget_rcode[code[0]](code, dates);\n\n\t\t\twhile (code.length < 5) code.push(\"\");\n\t\t\tvar repeat = \"\";\n\n\t\t\tvar end = get_end_rule(els);\n\n\t\t\tif (end == \"no\") {\n\t\t\t\tdates.end = new Date(9999, 1, 1);\n\t\t\t\trepeat = \"no\";\n\t\t\t}\n\t\t\telse if (end == \"date_of_end\") {\n\t\t\t\tdates.end = str_date(get_value(els, \"date_of_end\"));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tscheduler.transpose_type(code.join(\"_\"));\n\t\t\t\trepeat = Math.max(1, get_value(els, \"occurences_count\"));\n\n\t\t\t\tvar transp = 0;\n\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);\n\n\t\t\t\t// which is equal to following code, seems to produce extra instance, not clear why needed\n\n\t\t\t\t/*if(code[0] == \"week\"){\n\t\t\t\t\tvar days = code[4] || \"\";\n\t\t\t\t\tif(scheduler.config.start_on_monday){\n\t\t\t\t\t\tif(days.indexOf(1) == -1)\n\t\t\t\t\t\ttransp = 1;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif(days.indexOf(0) == -1)\n\t\t\t\t\t\ttransp = 1;\n\t\t\t\t\t}\n\t\t\t\t}*/\n\n\t\t\t//\tdates.end = scheduler.date.add(new Date(dates.start), repeat + transp, code.join(\"_\"));\n\n\t\t\t\tdates.end = scheduler.date[\"add_\" + code.join(\"_\")](new Date(dates.start), repeat + transp, {start_date: dates.start}) || dates.start;\n\t\t\t}\n\n\t\t\treturn code.join(\"_\") + \"#\" + repeat;\n\t\t}\n\t\tfunction get_end_rule(els){\n\t\t\tvar end = els[\"end\"];\n\t\t\tif(end.length){\n\t\t\t\tfor(var i =0; i < end.length; i++){\n\t\t\t\t\tif(end[i].checked){\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\n\t\t\t\t\t\t\treturn end[i].value;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tif(!i){\n\t\t\t\t\t\t\t\treturn \"no\";\n\t\t\t\t\t\t\t}else if(i == 2){\n\t\t\t\t\t\t\t\treturn \"date_of_end\";\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\treturn \"occurences_count\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif(end.value)\n\t\t\t\t\treturn end.value;\n\t\t\t}\n\t\t\treturn \"no\";\n\t\t}\n\t\tfunction set_end_rule(els, value){\n\t\t\tvar end = els[\"end\"];\n\n\t\t\tif(end.length){\n\t\t\t\tvar has_values = !!end[0].value && end[0].value != \"on\";\n\t\t\t\tif(has_values){\n\t\t\t\t\tfor(var i =0; i < end.length; i++){\n\t\t\t\t\t\tif(end[i].value == value)\n\t\t\t\t\t\t\tend[i].checked = true;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tvar ind = 0;\n\t\t\t\t\tswitch(value){\n\t\t\t\t\t\tcase \"no\":\n\t\t\t\t\t\t\tind = 0;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"date_of_end\":\n\t\t\t\t\t\t\tind = 2;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tind = 1;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tend[ind].checked = true;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tend.value = value;\n\t\t\t}\n\t\t}\n\n\n\t\tscheduler.form_blocks[\"recurring\"]._get_repeat_code = get_repeat_code;\n\t\tvar get_rcode = {\n\t\t\tmonth:function(code, dates) {\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\n\n\t\t\t\tif (get_value(els, \"month_type\") == \"d\") {\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_count\")));\n\t\t\t\t\tdates.start.setDate(get_value(els, \"month_day\"));\n\t\t\t\t} else {\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_count2\")));\n\t\t\t\t\tcode.push( get_value(els, \"month_day2\"));\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_week2\")));\n\t\t\t\t\tif (!scheduler.config.repeat_precise){\n\t\t\t\t\t\tdates.start.setDate(1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdates._start = true;\n\t\t\t},\n\t\t\tweek:function(code, dates) {\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\n\n\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"week_count\")));\n\t\t\t\tcode.push(\"\");\n\t\t\t\tcode.push(\"\");\n\t\t\t\tvar t = [];\n\n\t\t\t\tvar col = get_value(els, \"week_day\", true);\n\t\t\t\t//var col = els[\"week_day\"];\n\t\t\t\tvar day = dates.start.getDay();\n\t\t\t\tvar start_exists = false;\n\n\t\t\t\tfor (var i = 0; i < col.length; i++){\n\t\t\t\t\tt.push(col[i]);\n\t\t\t\t\tstart_exists = start_exists || col[i] == day;\n\t\t\t\t}\n\t\t\t\tif (!t.length){\n\t\t\t\t\tt.push(day);\n\t\t\t\t\tstart_exists = true;\n\t\t\t\t}\n\t\t\t\tt.sort();\n\n\n\t\t\t\tif (!scheduler.config.repeat_precise){\n\t\t\t\t\tdates.start = scheduler.date.week_start(dates.start);\n\t\t\t\t\tdates._start = true;\n\t\t\t\t} else if (!start_exists){\n\t\t\t\t\tscheduler.transpose_day_week(dates.start, t, 1, 7);\n\t\t\t\t\tdates._start = true;\n\t\t\t\t}\n\n\t\t\t\tcode.push(t.join(\",\"));\n\t\t\t},\n\t\t\tday:function(code) {\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\n\n\t\t\t\tif (get_value(els, \"day_type\") == \"d\") {\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"day_count\")));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcode.push(\"week\");\n\t\t\t\t\tcode.push(1);\n\t\t\t\t\tcode.push(\"\");\n\t\t\t\t\tcode.push(\"\");\n\t\t\t\t\tcode.push(scheduler.config.recurring_workdays.join(\",\"));\n\t\t\t\t\tcode.splice(0, 1);\n\t\t\t\t}\n\t\t\t},\n\t\t\tyear:function(code, dates) {\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\n\n\t\t\t\tif (get_value(els, \"year_type\") == \"d\") {\n\t\t\t\t\tcode.push(\"1\");\n\t\t\t\t\tdates.start.setMonth(0);\n\t\t\t\t\tdates.start.setDate(get_value(els, \"year_day\"));\n\t\t\t\t\tdates.start.setMonth(get_value(els, \"year_month\"));\n\n\t\t\t\t} else {\n\t\t\t\t\tcode.push(\"1\");\n\t\t\t\t\tcode.push(get_value(els, \"year_day2\"));\n\t\t\t\t\tcode.push(get_value(els, \"year_week2\"));\n\t\t\t\t\tdates.start.setDate(1);\n\t\t\t\t\tdates.start.setMonth(get_value(els, \"year_month2\"));\n\t\t\t\t}\n\t\t\t\tdates._start = true;\n\t\t\t}\n\t\t};\n\t\tvar set_rcode = {\n\t\t\tweek:function(code, dates) {\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\n\t\t\t\tset_value(els, \"week_count\", code[1]);\n\n\t\t\t\tvar t = code[4].split(\",\");\n\t\t\t\tvar d = {};\n\t\t\t\tfor (var i = 0; i < t.length; i++) d[t[i]] = true;\n\n\t\t\t\tset_value(els, \"week_day\", d);\n\n\t\t\t\t//for (var i = 0; i < col.length; i++)\n\t\t\t\t//\tcol[i].checked = (!!d[col[i].value]);\n\t\t\t},\n\t\t\tmonth:function(code, dates) {\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\n\n\t\t\t\tif (code[2] === \"\") {\n\t\t\t\t\tset_value(els, \"month_type\", \"d\");\n\t\t\t\t\tset_value(els, \"month_count\", code[1]);\n\t\t\t\t\tset_value(els, \"month_day\", dates.start.getDate());\n\t\t\t\t} else {\n\t\t\t\t\tset_value(els, \"month_type\", \"w\");\n\t\t\t\t\tset_value(els, \"month_count2\", code[1]);\n\t\t\t\t\tset_value(els, \"month_week2\", code[3]);\n\t\t\t\t\tset_value(els, \"month_day2\", code[2]);\n\t\t\t\t}\n\t\t\t},\n\t\t\tday:function(code, dates) {\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\n\t\t\t\tset_value(els, \"day_type\", \"d\");\n\t\t\t\tset_value(els, \"day_count\", code[1]);\n\t\t\t},\n\t\t\tyear:function(code, dates) {\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\n\n\t\t\t\tif (code[2] === \"\") {\n\t\t\t\t\tset_value(els, \"year_type\", \"d\");\n\t\t\t\t\tset_value(els, \"year_day\", dates.start.getDate());\n\t\t\t\t\tset_value(els, \"year_month\", dates.start.getMonth());\n\n\t\t\t\t} else {\n\t\t\t\t\tset_value(els, \"year_type\", \"w\");\n\t\t\t\t\tset_value(els, \"year_week2\", code[3]);\n\t\t\t\t\tset_value(els, \"year_day2\", code[2]);\n\t\t\t\t\tset_value(els, \"year_month2\", dates.start.getMonth());\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tfunction set_repeat_code(code, dates) {\n\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\n\t\t\tvar data = code.split(\"#\");\n\t\t\tcode = data[0].split(\"_\");\n\t\t\tset_rcode[code[0]](code, dates);\n\n\t\t\tswitch (data[1]) {\n\t\t\t\tcase \"no\":\n\t\t\t\t\tset_end_rule(els, \"no\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"\":\n\t\t\t\t\tset_end_rule(els, \"date_of_end\");\n\n\t\t\t\t\tvar end_date = dates.end;\n\t\t\t\t\tif (scheduler.config.include_end_by){\n\t\t\t\t\t\tend_date = scheduler.date.add(end_date, -1, 'day');\n\t\t\t\t\t}\n\t\t\t\t\tset_value(els, \"date_of_end\", date_str(end_date));\n\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tset_end_rule(els, \"occurences_count\");\n\t\t\t\t\tset_value(els, \"occurences_count\", data[1]);\n\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tset_value(els, \"repeat\", code[0]);\n\t\t\t//e.checked = true;\n\n\t\t\tvar node = scheduler.form_blocks[\"recurring\"]._get_form_node(els, \"repeat\", code[0]);\n\t\t\tif(node.nodeName == \"SELECT\"/* && node.onchange*/){\n\t\t\t//\tnode.onchange();\n\t\t\t\tnode.dispatchEvent(new Event('change'));\n\t\t\t\tnode.dispatchEvent(new MouseEvent('click'));\n\t\t\t}else{\n\t\t\t\tnode.dispatchEvent(new MouseEvent('click'));\n\t\t\t}\n\t\t}\n\n\t\tscheduler.form_blocks[\"recurring\"]._set_repeat_code = set_repeat_code;\n\n\t\tfor (var i = 0; i < top.elements.length; i++) {\n\t\t\tvar el = top.elements[i];\n\t\t\tswitch (el.name) {\n\t\t\t\tcase \"repeat\":\n\t\t\t\t\tif (el.nodeName == \"SELECT\" && !el.$_eventAttached) {\n\t\t\t\t\t\tel.$_eventAttached = true;\n\t\t\t\t\t\tel.addEventListener(\"change\", change_current_view);\n\t\t\t\t\t} else if(!el.$_eventAttached){\n\t\t\t\t\t\tel.$_eventAttached = true;\n\t\t\t\t\t\tel.addEventListener(\"click\", change_current_view);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tscheduler._lightbox._rec_init_done = true;\n\t},\n\tset_value:function(node, value, ev) {\n\t\tvar rf = scheduler.form_blocks[\"recurring\"];\n\t\tif (!scheduler._lightbox._rec_init_done)\n\t\t\trf._init_set_value(node, value, ev);\n\t\tnode.open = !ev.rec_type;\n\n\t\tnode.blocked = this._is_modified_occurence(ev);\n\n\t\tvar ds = rf._ds;\n\t\tds.start = ev.start_date;\n\t\tds.end = ev._end_date;\n\n\t\trf._toggle_block();\n\n\t\tif (value)\n\t\t\trf._set_repeat_code(value, ds);\n\t},\n\tget_value:function(node, ev) {\n\t\tif (node.open) {\n\t\t\tvar ds = scheduler.form_blocks[\"recurring\"]._ds;\n\t\t\tvar actual_dates = {};\n\n\t\t\tvar timeControl = getTimeSection();\n\n\t\t\ttimeControl.getValue(actual_dates);\n\t\t\tds.start = actual_dates.start_date;\n\t\t\tev.rec_type = scheduler.form_blocks[\"recurring\"]._get_repeat_code(ds);\n\t\t\tif (ds._start) {\n\t\t\t\tev.start_date = new Date(ds.start);\n\t\t\t\tev._start_date = new Date(ds.start);\n\t\t\t\tds._start = false;\n\t\t\t} else\n\t\t\t\tev._start_date = null;\n\n\t\t\tev._end_date = ds.end;\n\t\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\n\t\t} else {\n\t\t\tev.rec_type = ev.rec_pattern = \"\";\n\t\t\tev._end_date = ev.end_date;\n\t\t}\n\t\treturn ev.rec_type;\n\t},\n\t_get_button: function(){\n\t\tvar node = getRecurringSection().header;\n\t\treturn node.firstChild.firstChild;\n\t},\n\t_get_form: function(){\n\t\treturn getRecurringSection().node;\n\t},\n\topen:function(){\n\t\tvar block = scheduler.form_blocks.recurring;\n\n\t\tvar cont = block._get_form();\n\t\tif(!cont.open)\n\t\t\tblock._toggle_block();\n\t},\n\tclose: function(){\n\t\tvar block = scheduler.form_blocks.recurring;\n\n\t\tvar cont = block._get_form();\n\n\t\tif(cont.open)\n\t\t\tblock._toggle_block();\n\t},\n\t_toggle_block: function(){\n\t\tvar block = scheduler.form_blocks.recurring;\n\n\t\tvar cont = block._get_form(),\n\t\t\tel = block._get_button();\n\t\tif (!cont.open && !cont.blocked) {\n\t\t\tcont.style.height = \"auto\";//reset to default value\n\t\t\tif(el){\n\t\t\t\tel.style.backgroundPosition = \"-5px 0px\";\n\t\t\t\tel.nextSibling.innerHTML = scheduler.locale.labels.button_recurring_open;\n\t\t\t}\n\t\t} else {\n\t\t\tcont.style.height = \"0px\";\n\t\t\tif(el){\n\t\t\t\tel.style.backgroundPosition = \"-5px 20px\";\n\t\t\t\tel.nextSibling.innerHTML = scheduler.locale.labels.button_recurring;\n\t\t\t}\n\t\t}\n\t\tcont.open = !cont.open;\n\n\t\tscheduler.setLightboxSize();\n\t},\n\tfocus:function(node) {\n\t},\n\tbutton_click:function(node, button, event) {\n\t\tvar block = scheduler.form_blocks.recurring;\n\t\tvar cont = block._get_form();\n\t\tif (!cont.blocked)\n\t\t\tscheduler.form_blocks.recurring._toggle_block();\n\t}\n};\n\nfunction getTimeSection(){\n\tvar timeControl = scheduler.formSection('time');\n\tif(!timeControl){\n\t\ttimeControl = getFirstSectionOfType('time');\n\t}\n\tif(!timeControl){\n\t\ttimeControl = getFirstSectionOfType('calendar_time');\n\t}\n\n\t\n\tif (!timeControl) {\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.\",\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. \",\n\"In the latter case, make sure the control is named \\\"time\\\":\",\n\"\",\n\"scheduler.config.lightbox.sections = [\",\n\"{name:\\\"time\\\", height:72, type:\\\"YOU CONTROL\\\", map_to:\\\"auto\\\" }];\"]\n.join(\"\\n\"));\n\t}\n\n\treturn timeControl;\n}\n\nfunction getRecurringSection(){\n\tvar recurringSection = scheduler.formSection('recurring');\n\tif(!recurringSection){\n\t\trecurringSection = getFirstSectionOfType('recurring');\n\t}\n\n\tif (!recurringSection) {\n\t\tthrow new Error([\"Can't locate the Recurring form section.\",\n\t\t\"Make sure that you have the recurring control on the lightbox configuration https://docs.dhtmlx.com/scheduler/recurring_events.html#recurringlightbox \",\n\t\t\"and that the recurring control has name \\\"recurring\\\":\",\n\"\",\n\"scheduler.config.lightbox.sections = [\",\n\"\t{name:\\\"recurring\\\", ... }\",\n\"];\"].join(\"\\n\"));\n\n\t}\n\n\treturn recurringSection;\n}\n\nfunction getFirstSectionOfType(type){\n\tfor(var i = 0; i < scheduler.config.lightbox.sections.length; i++){\n\t\tvar section = scheduler.config.lightbox.sections[i];\n\t\tif(section.type === type){\n\t\t\treturn scheduler.formSection(section.name);\n\t\t}\n\t}\n\treturn null;\n}\n\n//problem may occur if we will have two repeating events in the same moment of time\nscheduler._rec_markers = {};\nscheduler._rec_markers_pull = {};\nscheduler._add_rec_marker = function(ev, time) {\n\tev._pid_time = time;\n\tthis._rec_markers[ev.id] = ev;\n\tif (!this._rec_markers_pull[ev.event_pid]) this._rec_markers_pull[ev.event_pid] = {};\n\tthis._rec_markers_pull[ev.event_pid][time] = ev;\n};\nscheduler._get_rec_marker = function(time, id) {\n\tvar ch = this._rec_markers_pull[id];\n\tif (ch) return ch[time];\n\treturn null;\n};\nscheduler._get_rec_markers = function(id) {\n\treturn (this._rec_markers_pull[id] || []);\n};\n\nfunction clearMilliseconds(date){\n//\treturn date;\n\treturn new Date(\n\t\tdate.getFullYear(), \n\t\tdate.getMonth(), \n\t\tdate.getDate(), \n\t\tdate.getHours(), \n\t\tdate.getMinutes(),\n\t\tdate.getSeconds(),\n\t\t0\n\t);\n}\n\nscheduler._rec_temp = [];\n(function() {\n\tvar old_add_event = scheduler.addEvent;\n\tscheduler.addEvent = function(start_date, end_date, text, id, extra_data) {\n\t\tvar ev_id = old_add_event.apply(this, arguments);\n\n\t\tif (ev_id && scheduler.getEvent(ev_id)) {\n\t\t\tvar ev = scheduler.getEvent(ev_id);\n\t\t\t\n\t\t\tif(ev.start_date){\n\t\t\t\tev.start_date = clearMilliseconds(ev.start_date);\n\t\t\t}\n\t\t\tif(ev.end_date){\n\t\t\t\tev.end_date = clearMilliseconds(ev.end_date);\n\t\t\t}\n\t\t\tif (this._is_modified_occurence(ev))\n\t\t\t\tscheduler._add_rec_marker(ev, ev.event_length * 1000);\n\t\t\tif (ev.rec_type)\n\t\t\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\n\t\t}\n\t\treturn ev_id;\n\t};\n})();\n\nscheduler.attachEvent(\"onEventIdChange\", function(id, new_id) {\n\tif (this._ignore_call) return;\n\tthis._ignore_call = true;\n\n\tif(scheduler._rec_markers[id]){\n\t\t//important for for correct work of scheduler.getEvents(from, to) and collision detection\n\t\tscheduler._rec_markers[new_id] = scheduler._rec_markers[id];\n\t\tdelete scheduler._rec_markers[id];\n\t}\n\n\tif(scheduler._rec_markers_pull[id]){\n\t\tscheduler._rec_markers_pull[new_id] = scheduler._rec_markers_pull[id];\n\t\tdelete scheduler._rec_markers_pull[id];\n\t}\n\n\tfor (var i = 0; i < this._rec_temp.length; i++) {\n\t\tvar tev = this._rec_temp[i];\n\t\tif (tev.event_pid == id) {\n\t\t\ttev.event_pid = new_id;\n\t\t\tthis.changeEventId(tev.id, new_id + \"#\" + tev.id.split(\"#\")[1]);\n\t\t}\n\t}\n\n\tfor(var i in this._rec_markers){\n\t\tvar tev = this._rec_markers[i];\n\t\tif(tev.event_pid == id){\n\t\t\ttev.event_pid = new_id;\n\t\t\ttev._pid_changed = true;\n\t\t}\n\t}\n\n\tvar el = scheduler._rec_markers[new_id];\n\tif(el && el._pid_changed) {\n\t\tdelete el._pid_changed;\n\t\tsetTimeout(function() {\n\t\t\tif(scheduler.$destroyed){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tscheduler.callEvent(\"onEventChanged\", [new_id, scheduler.getEvent(new_id)]);\n\t\t}, 1);\n\t}\n\n\tdelete this._ignore_call;\n});\nscheduler.attachEvent(\"onConfirmedBeforeEventDelete\", function(id) {\n\tvar ev = this.getEvent(id);\n\tif (this._is_virtual_event(id) || (this._is_modified_occurence(ev) && ev.rec_type && ev.rec_type != 'none')) {\n\t\tid = id.split(\"#\");\n\t\tvar nid = this.uid();\n\t\tvar tid = (id[1]) ? id[1] : Math.round(ev._pid_time / 1000);\n\n\t\tvar nev = this._copy_event(ev);\n\t\tnev.id = nid;\n\t\tnev.event_pid = ev.event_pid || id[0];\n\t\tvar timestamp = tid;\n\t\tnev.event_length = timestamp;\n\t\tnev.rec_type = nev.rec_pattern = \"none\";\n\t\tthis.addEvent(nev);\n\n\t\tthis._add_rec_marker(nev, timestamp * 1000);\n\t} else {\n\t\tif (ev.rec_type && this._lightbox_id)\n\t\t\tthis._roll_back_dates(ev);\n\t\tvar sub = this._get_rec_markers(id);\n\t\tfor (var i in sub) {\n\t\t\tif (sub.hasOwnProperty(i)) {\n\t\t\t\tid = sub[i].id;\n\t\t\t\tif (this.getEvent(id))\n\t\t\t\t\tthis.deleteEvent(id, true);\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n});\nscheduler.attachEvent(\"onEventDeleted\", function(id, ev){\n\tif(!this._is_virtual_event(id) && this._is_modified_occurence(ev)){\n\t\tif(!scheduler._events[id]){\n\t\t\tev.rec_type = ev.rec_pattern = \"none\";\n\t\t\tthis.setEvent(id, ev);\n\t\t}\n\t}\n});\nscheduler.attachEvent(\"onEventChanged\", function(id, event) {\n\tif (this._loading) return true;\n\n\tvar ev = this.getEvent(id);\n\n\tif (this._is_virtual_event(id)) {\n\t\tvar id = id.split(\"#\");\n\t\tvar nid = this.uid();\n\t\tthis._not_render = true;\n\n\t\tvar nev = this._copy_event(event);\n\t\tnev.id = nid;\n\t\tnev.event_pid = id[0];\n\t\tvar timestamp = id[1];\n\t\tnev.event_length = timestamp;\n\t\tnev.rec_type = nev.rec_pattern = \"\";\n\n\t\tthis._add_rec_marker(nev, timestamp * 1000);\n\t\tthis.addEvent(nev);\n\n\t\tthis._not_render = false;\n\n\t} else {\n\t\tif(ev.start_date){\n\t\t\tev.start_date = clearMilliseconds(ev.start_date);\n\t\t}\n\t\tif(ev.end_date){\n\t\t\tev.end_date = clearMilliseconds(ev.end_date);\n\t\t}\n\n\t\tif (ev.rec_type && this._lightbox_id){\n\t\t\tthis._roll_back_dates(ev);\n\t\t}\n\t\tvar sub = this._get_rec_markers(id);\n\t\tfor (var i in sub) {\n\t\t\tif (sub.hasOwnProperty(i)) {\n\t\t\t\tdelete this._rec_markers[sub[i].id];\n\t\t\t\tthis.deleteEvent(sub[i].id, true);\n\t\t\t}\n\t\t}\n\t\tdelete this._rec_markers_pull[id];\n\n\t\t// it's possible that after editing event is no longer exists, in such case we need to remove _select_id flag\n\t\tvar isEventFound = false;\n\t\tfor (var k = 0; k < this._rendered.length; k++) {\n\t\t\tif (this._rendered[k].getAttribute(this.config.event_attribute) == id)\n\t\t\t\tisEventFound = true;\n\t\t}\n\t\tif (!isEventFound)\n\t\t\tthis._select_id = null;\n\t}\n\treturn true;\n});\nscheduler.attachEvent(\"onEventAdded\", function(id) {\n\tif (!this._loading) {\n\t\tvar ev = this.getEvent(id);\n\t\tif (ev.rec_type && !ev.event_length){\n\t\t\tthis._roll_back_dates(ev);\n\t\t}\n\t}\n\treturn true;\n});\nscheduler.attachEvent(\"onEventSave\", function(id, data, is_new_event) {\n\tvar ev = this.getEvent(id);\n\tif (!ev.rec_type && data.rec_type && !this._is_virtual_event(id))\n\t\tthis._select_id = null;\n\treturn true;\n});\nscheduler.attachEvent(\"onEventCreated\", function(id) {\n\tvar ev = this.getEvent(id);\n\tif (!ev.rec_type)\n\t\tev.rec_type = ev.rec_pattern = ev.event_length = ev.event_pid = \"\";\n\treturn true;\n});\nscheduler.attachEvent(\"onEventCancel\", function(id) {\n\tvar ev = this.getEvent(id);\n\tif (ev.rec_type) {\n\t\tthis._roll_back_dates(ev);\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\n\t\tthis.render_view_data();\n\t}\n});\nscheduler._roll_back_dates = function(ev) {\n\tif(ev.start_date){\n\t\tev.start_date = clearMilliseconds(ev.start_date);\n\t}\n\tif(ev.end_date){\n\t\tev.end_date = clearMilliseconds(ev.end_date);\n\t}\n\tev.event_length = Math.round((ev.end_date.valueOf() - ev.start_date.valueOf()) / 1000);\n\tev.end_date = ev._end_date;\n\tif (ev._start_date) {\n\t\tev.start_date.setMonth(0);\n\t\tev.start_date.setDate(ev._start_date.getDate());\n\t\tev.start_date.setMonth(ev._start_date.getMonth());\n\t\tev.start_date.setFullYear(ev._start_date.getFullYear());\n\n\t}\n};\n\nscheduler._is_virtual_event = function(id){\n\treturn id.toString().indexOf(\"#\") != -1;\n};\nscheduler._is_modified_occurence = function(ev){\n\treturn (ev.event_pid && ev.event_pid != \"0\");\n};\n\nscheduler.showLightbox_rec = scheduler.showLightbox;\nscheduler.showLightbox = function(id) {\n\tvar locale = this.locale;\n\tvar c = scheduler.config.lightbox_recurring;\n\tvar ev = this.getEvent(id);\n\tvar pid = ev.event_pid;\n\tvar isVirtual = this._is_virtual_event(id);\n\tif (isVirtual)\n\t\tpid = id.split(\"#\")[0];\n\n\t// show series\n\tvar showSeries = function(id) {\n\t\tvar event = scheduler.getEvent(id);\n\t\tevent._end_date = event.end_date;\n\t\tevent.end_date = new Date(event.start_date.valueOf() + event.event_length * 1000);\n\t\treturn scheduler.showLightbox_rec(id); // editing series\n\t};\n\n\tif ( (pid || pid*1 === 0) && ev.rec_type) {\n\t\t// direct API call on series id\n\t\treturn showSeries(id);\n\t}\n\tif ( !pid || pid === '0' || ( (!locale.labels.confirm_recurring || c == 'instance') || (c == 'series' && !isVirtual)) ) {\n\t\t// editing instance or non recurring event\n\t\treturn this.showLightbox_rec(id);\n\t}\n\tif (c == 'ask') {\n\t\tvar that = this;\n\t\tscheduler.modalbox({\n\t\t\ttext: locale.labels.confirm_recurring,\n\t\t\ttitle: locale.labels.title_confirm_recurring,\n\t\t\twidth: \"500px\",\n\t\t\tposition: \"middle\",\n\t\t\tbuttons:[locale.labels.button_edit_series, locale.labels.button_edit_occurrence, locale.labels.icon_cancel],\n\t\t\tcallback: function(index) {\n\t\t\t\tswitch(+index) {\n\t\t\t\t\tcase 0:\n\t\t\t\t\t\treturn showSeries(pid);\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\treturn that.showLightbox_rec(id);\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t} else {\n\t\tshowSeries(pid);\n\t}\n};\n\n\nscheduler.get_visible_events_rec = scheduler.get_visible_events;\nscheduler.get_visible_events = function(only_timed) {\n\tfor (var i = 0; i < this._rec_temp.length; i++)\n\t\tdelete this._events[this._rec_temp[i].id];\n\tthis._rec_temp = [];\n\n\tvar stack = this.get_visible_events_rec(only_timed);\n\tvar out = [];\n\tfor (var i = 0; i < stack.length; i++) {\n\t\tif (stack[i].rec_type) {\n\t\t\t//deleted element of series\n\t\t\tif (stack[i].rec_pattern != \"none\")\n\t\t\t\tthis.repeat_date(stack[i], out);\n\t\t}\n\t\telse out.push(stack[i]);\n\t}\n\treturn out;\n};\n\n\n(function() {\n\tvar old = scheduler.isOneDayEvent;\n\tscheduler.isOneDayEvent = function(ev) {\n\t\tif (ev.rec_type) return true;\n\t\treturn old.call(this, ev);\n\t};\n\tvar old_update_event = scheduler.updateEvent;\n\tscheduler.updateEvent = function(id) {\n\t\tvar ev = scheduler.getEvent(id);\n\t\tif(ev && ev.rec_type){\n\t\t\t//rec_type can be changed without the lightbox,\n\t\t\t// make sure rec_pattern updated as well\n\t\t\tev.rec_pattern = (ev.rec_type || \"\").split(\"#\")[0];\n\t\t}\n\t\tif (ev && ev.rec_type && !this._is_virtual_event(id)) {\n\t\t\tscheduler.update_view();\n\t\t} else {\n\t\t\told_update_event.call(this, id);\n\t\t}\n\t};\n})();\n\nscheduler.transponse_size = {\n\tday:1, week:7, month:1, year:12\n};\nscheduler.date.day_week = function(sd, day, week) {\n\tsd.setDate(1);\n\tvar originalMonth = scheduler.date.month_start(new Date(sd));\n\tweek = (week - 1) * 7;\n\tvar cday = sd.getDay();\n\tvar nday = day * 1 + week - cday + 1;\n\tsd.setDate(nday <= week ? (nday + 7) : nday);\n\tvar newMonth = scheduler.date.month_start(new Date(sd));\n\tif(originalMonth.valueOf() !== newMonth.valueOf()){\n\t\treturn false;\n\t}\n\treturn true;\n};\nscheduler.transpose_day_week = function(sd, list, cor, size, cor2) {\n\tvar cday = (sd.getDay() || (scheduler.config.start_on_monday ? 7 : 0)) - cor;\n\tfor (var i = 0; i < list.length; i++) {\n\t\tif (list[i] > cday)\n\t\t\treturn sd.setDate(sd.getDate() + list[i] * 1 - cday - (size ? cor : cor2));\n\t}\n\tthis.transpose_day_week(sd, list, cor + size, null, cor);\n};\nscheduler.transpose_type = function(type) {\n\tvar transposeRecurring = \"transpose_\" + type;\n\tif (!this.date[transposeRecurring]) {\n\t\tvar recurringParts = type.split(\"_\");\n\t\tvar dayDurationMs = 60 * 60 * 24 * 1000;\n\t\tvar addRecurring = \"add_\" + type;\n\t\tvar recurringStepDays = this.transponse_size[recurringParts[0]] * recurringParts[1];\n\n\t\tif (recurringParts[0] == \"day\" || recurringParts[0] == \"week\") {\n\t\t\tvar weekDays = null;\n\t\t\tif (recurringParts[4]) {\n\t\t\t\tweekDays = recurringParts[4].split(\",\");\n\t\t\t\tif (scheduler.config.start_on_monday) {\n\t\t\t\t\tfor (var i = 0; i < weekDays.length; i++)\n\t\t\t\t\t\tweekDays[i] = (weekDays[i] * 1) || 7;\n\t\t\t\t\tweekDays.sort();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.date[transposeRecurring] = function(nd, td) {\n\t\t\t\tvar delta = Math.floor((td.valueOf() - nd.valueOf()) / (dayDurationMs * recurringStepDays));\n\t\t\t\tif (delta > 0)\n\t\t\t\t\tnd.setDate(nd.getDate() + delta * recurringStepDays);\n\t\t\t\tif (weekDays)\n\t\t\t\t\tscheduler.transpose_day_week(nd, weekDays, 1, recurringStepDays);\n\n\t\t\t\treturn nd;\n\t\t\t};\n\t\t\tthis.date[addRecurring] = function(sd, inc) {\n\t\t\t\tvar nd = new Date(sd.valueOf());\n\t\t\t\tif (weekDays) {\n\t\t\t\t\tfor (var count = 0; count < inc; count++)\n\t\t\t\t\t\tscheduler.transpose_day_week(nd, weekDays, 0, recurringStepDays);\n\t\t\t\t} else\n\t\t\t\t\tnd.setDate(nd.getDate() + inc * recurringStepDays);\n\n\t\t\t\treturn nd;\n\t\t\t};\n\t\t}\n\t\telse if (recurringParts[0] == \"month\" || recurringParts[0] == \"year\") {\n\t\t\tthis.date[transposeRecurring] = function(nd, td, seriesInstance) {\n\t\t\t\tvar delta = Math.ceil(((td.getFullYear() * 12 + td.getMonth() * 1 + 1) - (nd.getFullYear() * 12 + nd.getMonth() * 1 + 1)) / (recurringStepDays) - 1);\n\n\t\t\t\tif (delta >= 0){\n\t\t\t\t\tnd.setDate(1);\n\t\t\t\t\tnd.setMonth(nd.getMonth() + delta * recurringStepDays);\n\t\t\t\t}\n\n\t\t\t\treturn scheduler.date[addRecurring](nd, 0, seriesInstance);\n\t\t\t\t//if (str[3]){\n\t\t\t\t//\tscheduler.date.day_week(nd, str[2], str[3]);\n\t\t\t\t//}\n\t\t\t};\n\t\t\tthis.date[addRecurring] = function(sd, inc, seriesInstance, currentCount) {\n\t\t\t\tif(!currentCount){\n\t\t\t\t\tcurrentCount = 1;\n\t\t\t\t}else{\n\t\t\t\t\tcurrentCount++;\n\t\t\t\t}\n\t\t\t\tvar maxCount = 12;\n\t\t\t\tif(currentCount > maxCount){\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\tvar nd = new Date(sd.valueOf());\n\t\t\t\tnd.setDate(1);\n\n\n\t\t\t\tnd.setMonth(nd.getMonth() + inc * recurringStepDays);\n\t\t\t\tvar origMonth = nd.getMonth();\n\t\t\t\tvar origYear = nd.getFullYear();\n\t\t\t\tnd.setDate(seriesInstance.start_date.getDate());\n\t\t\t\tif (recurringParts[3]){\n\t\t\t\t\tscheduler.date.day_week(nd, recurringParts[2], recurringParts[3]);\n\t\t\t\t}\n\n\t\t\t\tvar correctOverflowInstances = scheduler.config.recurring_overflow_instances;\n\t\t\t\tif(nd.getMonth() != origMonth && correctOverflowInstances != \"none\"){\n\t\t\t\t\t// no such day in a month\n\t\t\t\t\tif(correctOverflowInstances === \"lastDay\"){\n\t\t\t\t\t\t// return either last day of the month\n\t\t\t\t\t\tnd = new Date(origYear, origMonth + 1, 0, nd.getHours(), nd.getMinutes(), nd.getSeconds(), nd.getMilliseconds());\n\t\t\t\t\t}else{\n\t\t\t\t\t\t// or go to the next instance\n\t\t\t\t\t\tnd = scheduler.date[addRecurring](new Date(origYear, origMonth + 1, 0), inc||1, seriesInstance, currentCount);\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\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn nd;\n\t\t\t};\n\t\t}\n\t}\n};\nscheduler.repeat_date = function(ev, stack, non_render, from, to, maxCount) {\n\n\tfrom = from || this._min_date;\n\tto = to || this._max_date;\n\tvar max = maxCount || -1;\n\tvar td = new Date(ev.start_date.valueOf());\n\n\tvar startHour = td.getHours();\n\n\tvar visibleCount = 0;\n\n\tif (!ev.rec_pattern && ev.rec_type)\n\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\n\n\tthis.transpose_type(ev.rec_pattern);\n\ttd = scheduler.date[\"transpose_\" + ev.rec_pattern](td, from, ev);\n\twhile ( td && (\n\t\ttd < ev.start_date ||\n\t\tscheduler._fix_daylight_saving_date(td,from,ev,td,new Date(td.valueOf() + ev.event_length * 1000)).valueOf() <= from.valueOf() ||\n\t\ttd.valueOf() + ev.event_length * 1000 <= from.valueOf())){\n\t\t\ttd = this.date[\"add_\" + ev.rec_pattern](td, 1, ev);\n\n\t}\n\twhile (td && (td < to && td < ev.end_date && (max < 0 || visibleCount < max))) {\n\t\ttd.setHours(startHour);\n\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();\n\t\tvar ch = this._get_rec_marker(timestamp, ev.id);\n\t\tif (!ch) { // unmodified element of series\n\t\t\tvar ted = new Date(td.valueOf() + ev.event_length * 1000);\n\t\t\tvar copy = this._copy_event(ev);\n\t\t\t//copy._timed = ev._timed;\n\t\t\tcopy.text = ev.text;\n\t\t\tcopy.start_date = td;\n\t\t\tcopy.event_pid = ev.id;\n\t\t\tcopy.id = ev.id + \"#\" + Math.round(timestamp / 1000);\n\t\t\tcopy.end_date = ted;\n\n\t\t\tcopy.end_date = scheduler._fix_daylight_saving_date(copy.start_date, copy.end_date, ev, td, copy.end_date);\n\n\t\t\tcopy._timed = this.isOneDayEvent(copy);\n\n\t\t\tif (!copy._timed && !this._table_view && !this.config.multi_day) return;\n\t\t\tstack.push(copy);\n\n\t\t\tif (!non_render) {\n\t\t\t\tthis._events[copy.id] = copy;\n\t\t\t\tthis._rec_temp.push(copy);\n\t\t\t}\n\n\t\t\tvisibleCount++;\n\n\t\t} else\n\t\tif (non_render){\n\t\t\tif(ch.rec_type != \"none\"){\n\t\t\t\tvisibleCount++;\n\t\t\t}\n\t\t\tstack.push(ch);\n\t\t}\n\n\t\ttd = this.date[\"add_\" + ev.rec_pattern](td, 1, ev);\n\t//\tif(!scheduler.date[\"validate_add_\" + ev.rec_pattern](td, 1, ev.rec_pattern)){\n\t///\t\talert(\"detect add\")\n\t//\t}\n\t}\n};\nscheduler._fix_daylight_saving_date = function(start_date, end_date, ev, counter, default_date) {\n\tvar shift = start_date.getTimezoneOffset() - end_date.getTimezoneOffset();\n\tif (shift) {\n\t\tif (shift > 0) {\n\t\t\t// e.g. 24h -> 23h\n\t\t\treturn new Date(counter.valueOf() + ev.event_length * 1000 - shift * 60 * 1000);\n\t\t}\n\t\telse {\n\t\t\t// e.g. 24h -> 25h\n\t\t\treturn new Date(end_date.valueOf() - shift * 60 * 1000);\n\t\t}\n\t}\n\treturn new Date(default_date.valueOf());\n};\nscheduler.getRecDates = function(id, max) {\n\tvar ev = typeof id == \"object\" ? id : scheduler.getEvent(id);\n\tvar recurrings = [];\n\tmax = max || 100;\n\n\tif (!ev.rec_type) {\n\t\treturn [\n\t\t\t{ start_date: ev.start_date, end_date: ev.end_date }\n\t\t];\n\t}\n\tif (ev.rec_type == \"none\") {\n\t\treturn [];\n\t}\n\n\tscheduler.repeat_date(ev, recurrings, true, ev.start_date, ev.end_date, max);\n\n\tvar result = [];\n\tfor(var i = 0; i < recurrings.length; i++){\n\t\tif(recurrings[i].rec_type != \"none\"){\n\t\t\tresult.push({start_date: recurrings[i].start_date, end_date: recurrings[i].end_date});\n\t\t}\n\t}\n\n\treturn result;\n};\nscheduler.getEvents = function(from, to) {\n\tvar result = [];\n\tfor (var a in this._events) {\n\t\tvar ev = this._events[a];\n\t\tif (ev && ev.start_date < to && ev.end_date > from) {\n\t\t\tif (ev.rec_pattern) {\n\t\t\t\tif (ev.rec_pattern == \"none\") continue;\n\t\t\t\tvar sev = [];\n\t\t\t\tthis.repeat_date(ev, sev, true, from, to);\n\t\t\t\tfor (var i = 0; i < sev.length; i++) {\n\t\t\t\t\t// if event is in rec_markers then it will be checked by himself, here need to skip it\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]) {\n\t\t\t\t\t\tresult.push(sev[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (!this._is_virtual_event(ev.id)) { // if it's virtual event we can skip it\n\t\t\t\tresult.push(ev);\n\t\t\t}\n\t\t}\n\t}\n\treturn result;\n};\n\nscheduler.config.repeat_date = \"%m.%d.%Y\";\nscheduler.config.lightbox.sections = [\n\t{name:\"description\", map_to:\"text\", type:\"textarea\" , focus:true},\n\t{name:\"recurring\", type:\"recurring\", map_to:\"rec_type\", button:\"recurring\"},\n\t{name:\"time\", height:72, type:\"time\", map_to:\"auto\"}\n];\n\n\n//drop secondary attributes\nscheduler._copy_dummy = function(ev) {\n\tvar start_date = new Date(this.start_date);\n\tvar end_date = new Date(this.end_date);\n\tthis.start_date = start_date;\n\tthis.end_date = end_date;\n\tthis.event_length = this.event_pid = this.rec_pattern = this.rec_type = null;\n};\n\nscheduler.config.include_end_by = false;\nscheduler.config.lightbox_recurring = 'ask'; // series, instance\n\nscheduler.attachEvent(\"onClearAll\", function(){\n\tscheduler._rec_markers = {}; //clear recurring events data\n\tscheduler._rec_markers_pull = {};\n\tscheduler._rec_temp = [];\n});\n\n}","import getSerializator from '../core/common/get_serializable_events';\nexport default function(scheduler){\n\n\t\nconst getSerializableData = getSerializator(scheduler);\n\n//redefine this method, if you want to provide a custom set of attributes for serialization\nscheduler.data_attributes=function(){\n\tvar attrs = [];\n\tvar format = scheduler._helpers.formatDate;\n\tvar all_events = getSerializableData();\n\tfor (var a in all_events){\n\t\tvar ev = all_events[a];\n\t\tfor (var name in ev)\n\t\t\tif (name.substr(0,1) !=\"_\")\n\t\t\t\tattrs.push([name,((name == \"start_date\" || name == \"end_date\")?format:null)]);\n\t\tbreak;\n\t}\n\treturn attrs;\n};\n\nscheduler.toXML = function(header){\n\tvar xml = [];\n\tvar attrs = this.data_attributes();\n\tvar all_events = getSerializableData();\n\tfor (var a in all_events){\n\t\tvar ev = all_events[a];\n\n\t\txml.push(\"\");\n\t\tfor (var i=0; i < attrs.length; i++)\n\t\t\txml.push(\"<\"+attrs[i][0]+\">\");\n\n\t\txml.push(\"\");\n\t}\n\treturn (header||\"\")+\"\"+xml.join(\"\\n\")+\"\";\n};\n\nscheduler._serialize_json_value = function(value){\n\tif(value === null || typeof value === \"boolean\"){\n\t\tvalue = \"\" + value;\n\t}else{\n\t\tif(!value && value !== 0){\n\t\t\tvalue = \"\";\n\t\t}\n\t\tvalue = '\"' + value.toString().\n\t\t\treplace(/\\n/g,\"\").\n\t\t\treplace(/\\\\/g,\"\\\\\\\\\").\n\t\t\treplace(/\"/g, '\\\\\"') + '\"';\n\t}\n\treturn value;\n};\n\n\n\nscheduler.toJSON = function(){\n\treturn JSON.stringify(this.serialize());\n};\n\n\nscheduler.toICal = function(header){\n\tvar start = \"BEGIN:VCALENDAR\\nVERSION:2.0\\nPRODID:-//dhtmlXScheduler//NONSGML v2.2//EN\\nDESCRIPTION:\";\n\tvar end = \"END:VCALENDAR\";\n\tvar format = scheduler.date.date_to_str(\"%Y%m%dT%H%i%s\");\n\tvar full_day_format = scheduler.date.date_to_str(\"%Y%m%d\");\n\n\tvar ical = [];\n\tvar all_events = getSerializableData();\n\tfor (var a in all_events){\n\t\tvar ev = all_events[a];\n\n\n\t\tical.push(\"BEGIN:VEVENT\");\n\t\tif (!ev._timed || (!ev.start_date.getHours() && !ev.start_date.getMinutes()))\n\t\t\tical.push(\"DTSTART:\"+full_day_format(ev.start_date));\n\t\telse\n\t\t\tical.push(\"DTSTART:\"+format(ev.start_date));\n\t\tif (!ev._timed || (!ev.end_date.getHours() && !ev.end_date.getMinutes()))\n\t\t\tical.push(\"DTEND:\"+full_day_format(ev.end_date));\n\t\telse\n\t\t\tical.push(\"DTEND:\"+format(ev.end_date));\n\t\tical.push(\"SUMMARY:\"+ev.text);\n\t\tical.push(\"END:VEVENT\");\n\t}\n\treturn start+(header||\"\")+\"\\n\"+ical.join(\"\\n\")+\"\\n\"+end;\n};\n\n}","import notImplemented from \"./not_implemented_extension\";\n\nexport default function(scheduler){\n\tnotImplemented.alert(\"Timeline\", scheduler.assert);\n}","import { TooltipManager } from \"./tooltipManager\";\n\nexport default function (scheduler: any) {\n\n\tscheduler.config.tooltip_timeout = 30;\n\tscheduler.config.tooltip_offset_y = 20;\n\tscheduler.config.tooltip_offset_x = 10;\n\tscheduler.config.tooltip_hide_timeout = 30;\n\n\tconst tooltipManager = new TooltipManager(scheduler);\n\n\tscheduler.ext.tooltips = tooltipManager;\n\n\tscheduler.attachEvent(\"onSchedulerReady\", function () {\n\n\t\ttooltipManager.tooltipFor({\n\t\t\tselector: \"[\" + scheduler.config.event_attribute + \"]\",\n\t\t\thtml: (event: MouseEvent) => {\n\t\t\t\tif (scheduler._mobile && !scheduler.config.touch_tooltip) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst targetEventId = scheduler._locate_event(event.target);\n\t\t\t\tif (scheduler.getEvent(targetEventId)) {\n\t\t\t\t\tconst event = scheduler.getEvent(targetEventId);\n\t\t\t\t\treturn scheduler.templates.tooltip_text(event.start_date, event.end_date, event);\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t},\n\t\t\tglobal: false\n\t\t});\n\t});\n\n\tscheduler.attachEvent(\"onDestroy\", function () {\n\t\ttooltipManager.destructor();\n\t});\n\n\tscheduler.attachEvent(\"onLightbox\", function () {\n\t\ttooltipManager.hideTooltip();\n\t});\n\n\tscheduler.attachEvent(\"onBeforeDrag\", function() {\n\t\ttooltipManager.hideTooltip();\n\t\treturn true;\n\t});\n\tscheduler.attachEvent(\"onEventDeleted\", function() {\n\t\ttooltipManager.hideTooltip();\n\t\treturn true;\n\t});\n\n}","import notImplemented from \"./not_implemented_extension\";\n\nexport default function(scheduler){\n\tnotImplemented.alert(\"Tree Timeline\", scheduler.assert);\n}","import notImplemented from \"./not_implemented_extension\";\n\nexport default function(scheduler){\n\tnotImplemented.alert(\"Units\", scheduler.assert);\n}","export default function(scheduler){\n\nscheduler._get_url_nav = function(){\n\tvar p = {};\n\tvar data = (document.location.hash || \"\").replace(\"#\", \"\").split(\",\");\n\tfor (var i = 0; i < data.length; i++) {\n\t\tvar s = data[i].split(\"=\");\n\t\tif (s.length == 2)\n\t\t\tp[s[0]] = s[1];\n\t}\n\treturn p;\n};\n\nscheduler.attachEvent(\"onTemplatesReady\", function () {\n\tvar first = true;\n\tvar s2d = scheduler.date.str_to_date(\"%Y-%m-%d\");\n\tvar d2s = scheduler.date.date_to_str(\"%Y-%m-%d\");\n\tvar select_event = scheduler._get_url_nav().event || null;\n\n\tscheduler.attachEvent(\"onAfterEventDisplay\", function(ev){\n\t\tselect_event = null;\n\t\treturn true;\n\t});\n\n\tscheduler.attachEvent(\"onBeforeViewChange\", function (om, od, m, d) {\n\t\tif (first) {\n\t\t\tfirst = false;\n\t\t\tvar p = scheduler._get_url_nav();\n\n\t\t\tif (p.event){\n\t\t\t\ttry{\n\t\t\t\t\tif(scheduler.getEvent(p.event)){\n\t\t\t\t\t\tsetTimeout(function(){\n\t\t\t\t\t\t\tshowEvent(p.event);\n\t\t\t\t\t\t});\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tvar handler = scheduler.attachEvent(\"onXLE\", function(){\n\t\t\t\t\t\t\tsetTimeout(function(){\n\t\t\t\t\t\t\t\tshowEvent(p.event);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tscheduler.detachEvent(handler);\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} catch (e){}\n\t\t\t}\n\n\t\t\tif (p.date || p.mode) {\n\t\t\t\ttry {\n\t\t\t\t\tthis.setCurrentView((p.date ? s2d(p.date) : null), (p.mode || null));\n\t\t\t\t} catch (e) {\n\t\t\t\t\t//assuming that mode is not available anymore\n\t\t\t\t\tthis.setCurrentView((p.date ? s2d(p.date) : null), m);\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tvar values = [\n\t\t\t\"date=\" + d2s(d || od),\n\t\t\t\"mode=\" + (m || om)\n\t\t];\n\n\t\tif(select_event){\n\t\t\tvalues.push(\"event=\" + select_event);\n\t\t}\n\n\t\tvar text = \"#\" + values.join(\",\");\n\t\tdocument.location.hash = text;\n\t\treturn true;\n\t});\n\n\tfunction showEvent(e){\n\t\tif(scheduler.$destroyed){\n\t\t\treturn true;\n\t\t}\n\t\tselect_event = e;\n\t\tif(scheduler.getEvent(e)){\n\t\t\tscheduler.showEvent(e);\n\t\t}\n\t}\n});\n}","import notImplemented from \"./not_implemented_extension\";\n\nexport default function(scheduler){\n\tnotImplemented.alert(\"Week Agenda\", scheduler.assert);\n}","export default function(scheduler){\nscheduler.attachEvent(\"onLightBox\",function(){\n\tif (this._cover){\n\t\ttry{\n\t\t\tthis._cover.style.height = this.expanded ? \"100%\" : ((document.body.parentNode||document.body).scrollHeight+\"px\");\n\t\t} catch(e) {\n\n\t\t}\n\t}\n});\n\nscheduler.form_blocks.select.set_value=function(node,value,ev){\n\tif (typeof value == \"undefined\" || value === \"\")\n\t\tvalue = (node.firstChild.options[0]||{}).value;\n\tnode.firstChild.value=value||\"\";\n};\n\n}","export default function(scheduler){\n\n\t// scheduler.config.year_x = 4;\n\t// scheduler.config.year_y = 3;\n\t// scheduler.xy.year_top = 0;\n\n\tscheduler.templates.year_date = function(date) {\n\t\treturn scheduler.date.date_to_str(scheduler.locale.labels.year_tab + \" %Y\")(date);\n\t};\n\tscheduler.templates.year_month = scheduler.date.date_to_str(\"%F\");\n\tscheduler.templates.year_scale_date = scheduler.date.date_to_str(\"%D\");\n\tscheduler.templates.year_tooltip = function(s, e, ev) {\n\t\treturn ev.text;\n\t};\n\n\tconst isYearMode = function() {\n\t\treturn scheduler._mode == \"year\";\n\t};\n\t\n\tconst getCellDate = function(node){\n\t\tvar day = scheduler.$domHelpers.closest(node, \"[data-cell-date]\");\n\t\tif(!day || !day.hasAttribute(\"data-cell-date\")) return null;\n\t\treturn scheduler.templates.parse_date(day.getAttribute(\"data-cell-date\"));\n\t};\n\n\t// dbl click hook for scheduler._on_dbl_click\n\tscheduler.dblclick_dhx_month_head = function(e) {\n\t\tif (isYearMode()) {\n\t\t\tconst target = e.target;\n\t\t\tif(scheduler.$domHelpers.closest(target, \".dhx_before\") || scheduler.$domHelpers.closest(target, \".dhx_after\")){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\tconst date = getCellDate(target);\n\t\t\t\n\t\t\tif(date){\n\t\t\t\tconst start = date;\n\t\t\t\tconst end = this.date.add(start, 1, \"day\");\n\t\t\t\tif (!this.config.readonly && this.config.dblclick_create){\n\t\t\t\t\tthis.addEventNow(start.valueOf(), end.valueOf(), e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\t\n\tscheduler.attachEvent(\"onEventIdChange\", function(){\n\t\tif (isYearMode())\n\t\t\tthis.year_view(true);\n\t});\n\n\n\tvar old = scheduler.render_data;\n\tscheduler.render_data = function(evs) {\n\t\tif (!isYearMode()) return old.apply(this, arguments);\n\t\tfor (var i = 0; i < evs.length; i++)\n\t\t\tthis._year_render_event(evs[i]);\n\t};\n\n\tvar clear = scheduler.clear_view;\n\tscheduler.clear_view = function() {\n\t\tif (!isYearMode()) return clear.apply(this, arguments);\n\t\tvar dates = scheduler._year_marked_cells,\n\t\t\tdiv = null;\n\t\tfor (var date in dates) {\n\t\t\tif (dates.hasOwnProperty(date)) {\n\t\t\t\tdiv = dates[date];\n\t\t\t\tdiv.classList.remove(\"dhx_year_event\", \"dhx_cal_datepicker_event\");\n\t\t\t\t// div.className = \"dhx_month_head\";\n\t\t\t\t// div.removeAttribute(\"date\");\n\t\t\t\t// div.removeAttribute(\"data-year-date\");\n\t\t\t}\n\t\t}\n\t\tscheduler._year_marked_cells = {};\n\t};\n\n\tscheduler._hideToolTip = function() {\n\t\tif (this._tooltip) {\n\t\t\tthis._tooltip.style.display = \"none\";\n\t\t\tthis._tooltip.date = new Date(9999, 1, 1);\n\t\t}\n\t};\n\n\tscheduler._showToolTip = function(date, pos, e, src) {\n\t\tif (this._tooltip) {\n\t\t\tif (this._tooltip.date.valueOf() == date.valueOf()) return;\n\t\t\tthis._tooltip.innerHTML = \"\";\n\t\t} else {\n\t\t\tvar t = this._tooltip = document.createElement(\"div\");\n\t\t\tt.className = \"dhx_year_tooltip\";\n\t\t\tif (this.config.rtl) t.className += \" dhx_tooltip_rtl\";\n\t\t\tdocument.body.appendChild(t);\n\t\t\tt.addEventListener(\"click\", scheduler._click.dhx_cal_data);\n\t\t\tt.addEventListener(\"click\", function(e){\n\t\t\t\tif(e.target.closest(`[${scheduler.config.event_attribute}]`)){\n\t\t\t\t\tconst id = e.target.closest(`[${scheduler.config.event_attribute}]`).getAttribute(scheduler.config.event_attribute);\n\t\t\t\t\tscheduler.showLightbox(id);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tvar evs = this.getEvents(date, this.date.add(date, 1, \"day\"));\n\t\tvar html = \"\";\n\n\t\tfor (var i = 0; i < evs.length; i++) {\n\t\t\tvar ev = evs[i];\n\t\t\tif(!this.filter_event(ev.id, ev))\n\t\t\t\tcontinue;\n\n\t\t\tvar bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\n\t\t\tvar color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\n\n\t\t\thtml += \"
\";\n\t\t\thtml += \"
\" + (evs[i]._timed ? this.templates.event_date(evs[i].start_date) : \"\") + \"
\";\n\t\t\thtml += \"
 
\";\n\t\t\thtml += this.templates.year_tooltip(evs[i].start_date, evs[i].end_date, evs[i]) + \"
\";\n\t\t}\n\n\t\tthis._tooltip.style.display = \"\";\n\t\tthis._tooltip.style.top = \"0px\";\n\n\n\t\tif (document.body.offsetWidth - pos.left - this._tooltip.offsetWidth < 0)\n\t\t\tthis._tooltip.style.left = pos.left - this._tooltip.offsetWidth + \"px\";\n\t\telse\n\t\t\tthis._tooltip.style.left = pos.left + src.offsetWidth + \"px\";\n\n\t\tthis._tooltip.date = date;\n\t\tthis._tooltip.innerHTML = html;\n\n\t\tif (document.body.offsetHeight - pos.top - this._tooltip.offsetHeight < 0)\n\t\t\tthis._tooltip.style.top = pos.top - this._tooltip.offsetHeight + src.offsetHeight + \"px\";\n\t\telse\n\t\t\tthis._tooltip.style.top = pos.top + \"px\";\n\t};\n\n\tscheduler._year_view_tooltip_handler = function(e){\n\t\tif (!isYearMode()) return;\n\n\t\tvar src = e.target || e.srcElement;\n\t\tif (src.tagName.toLowerCase() == 'a') // fix for active links extension (it adds links to the date in the cell)\n\t\t\tsrc = src.parentNode;\n\t\tif (scheduler._getClassName(src).indexOf(\"dhx_year_event\") != -1)\n\t\t\tscheduler._showToolTip(scheduler.templates.parse_date(src.getAttribute(\"data-year-date\")), scheduler.$domHelpers.getOffset(src), e, src);\n\t\telse\n\t\t\tscheduler._hideToolTip();\n\t};\n\tscheduler._init_year_tooltip = function() {\n\t\tscheduler._detachDomEvent(scheduler._els[\"dhx_cal_data\"][0], \"mouseover\", scheduler._year_view_tooltip_handler);\n\t\tscheduler.event(scheduler._els[\"dhx_cal_data\"][0], \"mouseover\", scheduler._year_view_tooltip_handler);\n\t};\n\n\tscheduler._get_year_cell = function(d) {\n\t\tvar dateString = scheduler.templates.format_date(d);\n\t\tvar cells = this.$root.querySelectorAll(`.dhx_cal_data .dhx_cal_datepicker_date[data-cell-date=\"${dateString}\"]`);\n\t\tfor(var i = 0; i < cells.length; i++){\n\t\t\tif(!scheduler.$domHelpers.closest(cells[i], \".dhx_after, .dhx_before\")){\n\t\t\t\treturn cells[i];\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t};\n\n\tscheduler._year_marked_cells = {};\n\tscheduler._mark_year_date = function(date, event) {\n\t\tvar dateString = scheduler.templates.format_date(date);\n\t\tvar cell = this._get_year_cell(date);\n\t\tif (!cell) {\n\t\t\treturn;\n\t\t}\n\t\tvar ev_class = this.templates.event_class(event.start_date, event.end_date, event);\n\t\tif (!scheduler._year_marked_cells[dateString]) {\n\t\t\tcell.classList.add(\"dhx_year_event\", \"dhx_cal_datepicker_event\");// = \"dhx_month_head dhx_year_event\";\n\t\t\tcell.setAttribute(\"data-year-date\", dateString);\n\t\t\tcell.setAttribute(\"date\", dateString);\n\t\t\tscheduler._year_marked_cells[dateString] = cell;\n\t\t}\n\t\tif(ev_class){\n\t\t\tcell.classList.add(ev_class);\n\t\t}\n\t};\n\tscheduler._unmark_year_date = function(date) {\n\t\tvar cell = this._get_year_cell(date);\n\t\tif (!cell) {\n\t\t\treturn;\n\t\t}\n\t\tcell.classList.remove(\"dhx_year_event\", \"dhx_cal_datepicker_event\");\n//\t\tcell.className = \"dhx_month_head\";\n\t};\n\tscheduler._year_render_event = function(event) {\n\t\tvar date = event.start_date;\n\t\tif (date.valueOf() < this._min_date.valueOf()){\n\t\t\tdate = this._min_date;\n\t\t} else {\n\t\t\tdate = this.date.date_part(new Date(date));\n\t\t}\n\n\t\twhile (date < event.end_date) {\n\t\t\tthis._mark_year_date(date, event);\n\t\t\tdate = this.date.add(date, 1, \"day\");\n\t\t\tif (date.valueOf() >= this._max_date.valueOf())\n\t\t\t\treturn;\n\t\t}\n\t};\n\n\tscheduler.year_view = function(mode) {\n\n\t\tscheduler.set_sizes();\n\n\t\tscheduler._table_view = mode;\n\n\t\tif (this._load_mode && this._load()) return;\n\n\t\tif (mode) {\n\t\t\tscheduler._init_year_tooltip();\n\t\t\tscheduler._reset_year_scale();\n\t\t\tif (scheduler._load_mode && scheduler._load()){\n\t\t\t\tscheduler._render_wait = true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tscheduler.render_view_data();\n\t\t} else {\n\t\t\tscheduler._hideToolTip();\n\t\t}\n\t};\n\tscheduler._reset_year_scale = function() {\n\t\tthis._cols = [];\n\t\tthis._colsS = {};\n\t\tvar week_starts = []; //start day of first week in each month\n\t\tvar dataArea = this._els[\"dhx_cal_data\"][0];\n\n\t\tvar c = this.config;\n\t\tdataArea.scrollTop = 0; //fix flickering in FF\n\t\tdataArea.innerHTML = \"\";\n\n\t\tvar dy = Math.floor((parseInt(dataArea.style.height) - scheduler.xy.year_top) / c.year_y);\n\t\tif (dy < 190) {\n\t\t\tdy = 190;\n\t\t}\n\n\t\tvar week_template = document.createElement(\"div\");\n\t\tvar dummy_date = this.date.week_start(scheduler._currentDate());\n\n\t\tthis._process_ignores(dummy_date, 7, \"day\", 1);\n\n\t\tfor (var i = 0; i < 7; i++) {\n\t\t\tif(!(this._ignores && this._ignores[i])) {\n\t\t\t\tthis._cols[i] = 'var(--dhx-scheduler-datepicker-cell-size)';\n\t\t\t\tthis._render_x_header(i, 0, dummy_date, week_template);\n\n\t\t\t}\n\t\t\tdummy_date = this.date.add(dummy_date, 1, \"day\");\n\t\t}\n\t\tweek_template.lastChild.className += \" dhx_scale_bar_last\";\n\n\t\tfor(var i = 0; i < week_template.childNodes.length; i++){\n\t\t\tthis._waiAria.yearHeadCell(week_template.childNodes[i]);\n\t\t}\n\n\t\tvar sd = this.date[this._mode + \"_start\"](this.date.copy(this._date));\n\t\tvar ssd = sd;\n\t\tvar yearBox = null;\n\t\tconst wrapper = document.createElement(\"div\");\n\t\twrapper.classList.add(\"dhx_year_wrapper\");\n\t\tfor (var i = 0; i < c.year_y; i++){\n\t\t\tfor (var j = 0; j < c.year_x; j++) {\n\t\t\t\tyearBox = document.createElement(\"div\");\n\t\t\t\tyearBox.className = \"dhx_year_box\";\n\n\t\t\t\tyearBox.setAttribute(\"date\", this._helpers.formatDate(sd));\n\t\t\t\tyearBox.setAttribute(\"data-month-date\", this._helpers.formatDate(sd));\n\t\t\t\tyearBox.innerHTML = \"
\" + week_template.innerHTML + \"
\";\n\n\t\t\t\tvar header = yearBox.querySelector(\".dhx_year_month\");\n\t\t\t\tvar grid = yearBox.querySelector(\".dhx_year_grid\");\n\t\t\t\tvar body = yearBox.querySelector(\".dhx_year_body\");\n\n\t\t\t\tvar headerId = scheduler.uid();\n\t\t\t\tthis._waiAria.yearHeader(header, headerId);\n\t\t\t\tthis._waiAria.yearGrid(grid, headerId);\n\n\n\t\t\t\theader.innerHTML = this.templates.year_month(sd);\n\n\n\n\t\t\t\tvar dd = this.date.week_start(sd);\n\t\t\t\tthis._reset_month_scale(body, sd, dd, 6);\n\n\t\t\t\tvar days = body.querySelectorAll(\"td\");\n\t\t\t\tfor(var day = 0; day < days.length; day++){\n\t\t\t\t\tthis._waiAria.yearDayCell(days[day]);\n\t\t\t\t}\n\n\t\t\t\twrapper.appendChild(yearBox);\n\n\t\t\t\tweek_starts[i * c.year_x + j] = (sd.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) % 7;\n\t\t\t\tsd = this.date.add(sd, 1, \"month\");\n\n\t\t\t}\n\t\t}\n\n\t\tdataArea.appendChild(wrapper);\n\n\t\tvar dateElement = this._getNavDateElement();\n\t\tif(dateElement){\n\t\t\tdateElement.innerHTML = this.templates[this._mode + \"_date\"](ssd, sd, this._mode);\n\t\t}\n\n\t\tthis.week_starts = week_starts;\n\t\tweek_starts._month = ssd.getMonth();\n\t\tthis._min_date = ssd;\n\t\tthis._max_date = sd;\n\t};\n\n\tscheduler._reset_year_scale = function(){\n\n\t\tvar dataArea = this._els[\"dhx_cal_data\"][0];\n\n\t\tdataArea.scrollTop = 0; //fix flickering in FF\n\t\tdataArea.innerHTML = \"\";\n\n\t\tlet yearStart = this.date.year_start(new Date(this._date));\n\t\t\n\t\tthis._min_date = this.date.week_start(new Date(yearStart));\n\n\t\tconst wrapper = document.createElement(\"div\");\n\t\twrapper.classList.add(\"dhx_year_wrapper\");\n\n\t\tlet currentDate = yearStart;\n\t\tfor(let i = 0; i < 12; i++){\n\t\t\tlet yearBox = document.createElement(\"div\");\n\t\t\tyearBox.className = \"dhx_year_box\";\n\n\t\t\tyearBox.setAttribute(\"date\", this._helpers.formatDate(currentDate));\n\t\t\tyearBox.setAttribute(\"data-month-date\", this._helpers.formatDate(currentDate));\n\t\t\tyearBox.innerHTML = `
${this.templates.year_month(currentDate)}
\n\t\t\t
`;\n\n\t\t\tconst yearGrid = yearBox.querySelector(\".dhx_year_grid\");\n\t\t\tconst datepicker = scheduler._createDatePicker(null, {\n\t\t\t\tdate: currentDate,\n\t\t\t\tminWeeks: 6\n\t\t\t});\n\t\t\tdatepicker._renderDayGrid(yearGrid);\n\t\t\tdatepicker.destructor();\n\n\t\t\twrapper.appendChild(yearBox);\n\n\t\t\tcurrentDate = this.date.add(currentDate, 1, \"month\");\n\n\t\t}\n\t\tdataArea.appendChild(wrapper);\n\n\t\tlet lastDate = this.date.add(yearStart, 1, \"year\");\n\t\tif(lastDate.valueOf() != this.date.week_start(new Date(lastDate)).valueOf()){\n\t\t\tlastDate = this.date.week_start(new Date(lastDate));\n\t\t\tlastDate = this.date.add(lastDate, 1, \"week\");\n\t\t}\n\t\tthis._max_date = lastDate;\n\t\tvar dateElement = this._getNavDateElement();\n\t\tif(dateElement){\n\t\t\tdateElement.innerHTML = this.templates[this._mode + \"_date\"](yearStart, lastDate, this._mode);\n\t\t}\n\t};\n\n\tvar getActionData = scheduler.getActionData;\n\tscheduler.getActionData = function(n_ev) {\n\t\tif(!isYearMode()){\n\t\t\treturn getActionData.apply(scheduler, arguments);\n\t\t}\n\t\t\n\t\tvar date = getCellDate(n_ev.target);\n\t\treturn {\n\t\t\tdate:date,\n\t\t\tsection:null\n\t\t};\n\t};\n\n\tvar locateEvent = scheduler._locate_event;\n\tscheduler._locate_event = function(node) {\n\t\tvar id = locateEvent.apply(scheduler, arguments);\n\t\tif(!id){\n\t\t\t\n\t\t\tvar date = getCellDate(node);\n\t\t\tif(!date) return null;\n\t\t\tvar evs = scheduler.getEvents(date, scheduler.date.add(date, 1, \"day\"));\n\t\t\tif(!evs.length) return null;\n\n\t\t\t//can be multiple events in the cell, return any single one\n\t\t\tid = evs[0].id;\n\t\t}\n\t\treturn id;\n\t};\n\n\tscheduler.attachEvent(\"onDestroy\", function(){\n\t\tscheduler._hideToolTip();\n\t});\n}","import SchedulerFactory from \"./scheduler_factory\";\nimport gplExtensions from \"./ext/extensions_gpl\";\n\nconst factory = new SchedulerFactory(gplExtensions);\n\nconst scheduler = factory.getSchedulerInstance();\nconst Scheduler = {\n\tplugin: scheduler.bind(factory.plugin, factory)\n};\n\nwindow.scheduler = scheduler;\nwindow.Scheduler = Scheduler;\n\nif(!window.$dhx) {\n\twindow.$dhx = {};\n}\n\nwindow.$dhx.scheduler = scheduler;\nwindow.$dhx.Scheduler = Scheduler;\n\nexport default scheduler;export { scheduler, Scheduler };","\n\nimport dhtmlxHook from \"./dhtmlx_hook\";\nimport \"./css/theme.less\";\ndhtmlxHook();\n\nimport global from \"./global\";\n\nimport factoryMethod from \"./scheduler_factory_method\";\nimport ExtensionsManager from \"./ext/extension_manager\";\n\nclass SchedulerFactory {\n\n\tconstructor (extensions) {\n\t\tthis._seed = 0;\n\t\tthis._schedulerPlugins = [];\n\t\tthis._bundledExtensions = extensions;\n\t\tthis._extensionsManager = new ExtensionsManager(extensions);\n\t}\n\n\tplugin(code) {\n\t\tthis._schedulerPlugins.push(code);\n\n\t\tif(global.scheduler){\n\t\t\tcode(global.scheduler);\n\t\t}\n\t}\n\t\n\tgetSchedulerInstance(initConfig) {\n\t\tvar scheduler = factoryMethod(this._extensionsManager);\n\n\t\tfor (var i = 0; i < this._schedulerPlugins.length; i++) {\n\t\t\tthis._schedulerPlugins[i](scheduler);\n\t\t}\n\t\tscheduler._internal_id = this._seed++;\n\t\n\t\tif (this.$syncFactory){\n\t\t\tthis.$syncFactory(scheduler);\n\t\t}\n\n\t\tif(initConfig){\n\t\t\tthis._initFromConfig(scheduler, initConfig);\n\t\t}\n\n\t\treturn scheduler;\n\t}\n\n\t_initFromConfig(scheduler, initConfig){\n\t\tif(initConfig.plugins){\n\t\t\tscheduler.plugins(initConfig.plugins);\n\t\t}\n\t\n\t\tif(initConfig.config){\n\t\t\tscheduler.mixin(scheduler.config, initConfig.config, true);\n\t\t}\n\t\n\t\tif(initConfig.templates){\n\t\t\tscheduler.attachEvent(\"onTemplatesReady\", function(){\n\t\t\t\tscheduler.mixin(scheduler.templates, initConfig.templates, true);\n\t\t\t}, {once: true});\n\t\t}\n\t\n\t\tif(initConfig.events){\n\t\t\tfor(const event in initConfig.events){\n\t\t\t\tscheduler.attachEvent(event, initConfig.events[event]);\n\t\t\t}\n\t\t}\n\t\n\t\tif(initConfig.locale){\n\t\t\tscheduler.i18n.setLocale(initConfig.locale);\n\t\t}\n\t\n\t\tif(Array.isArray(initConfig.calendars)){\n\t\t\tinitConfig.calendars.forEach(function(calendar){\n\t\t\t\tscheduler.addCalendar(calendar);\n\t\t\t});\n\t\t}\n\t\n\t\tif(initConfig.container){\n\t\t\tscheduler.init(initConfig.container);\n\t\t} else {\n\t\t\tscheduler.init();\n\t\t}\n\t\n\t\tif(initConfig.data){\n\t\t\tif(typeof initConfig.data === \"string\"){\n\t\t\t\tscheduler.load(initConfig.data);\n\t\t\t}else{\n\t\t\t\tscheduler.parse(initConfig.data);\n\t\t\t}\n\t\t}\n\t}\n\t\n\n}\n\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,UA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