{"version":3,"sources":["kendo.scheduler.timelineview.js"],"names":["f","define","$","undefined","toInvariantTime","date","staticDate","Date","setTime","getMilliseconds","getWorkDays","options","workDays","dayIndex","workWeekEnd","length","workWeekStart","Math","abs","push","setColspan","columnLevel","i","count","columns","colspan","collidingEvents","elements","left","right","idx","startPosition","overlaps","endPosition","rectLeft","rectRight","eventsForSlot","event","events","TimelineView","kendo","window","ui","SchedulerView","outerWidth","_outerWidth","outerHeight","_outerHeight","extend","proxy","getDate","MS_PER_DAY","MS_PER_MINUTE","CURRENT_TIME_MARKER_CLASS","CURRENT_TIME_MARKER_ARROW_CLASS","SCHEDULER_HEADER_WRAP_CLASS","INVERSE_COLOR_CLASS","BORDER_SIZE_COEFF","NS","EVENT_TEMPLATE","template","DATA_HEADER_TEMPLATE","EVENT_WRAPPER_STRING","TimelineGroupedView","Class","init","view","this","_view","_getTimeSlotByPosition","x","y","groupIndex","group","groups","timeSlotByPosition","_hideHeaders","timesHeader","find","hide","datesHeader","_setColspan","timeColumn","_createRowsLayout","resources","rows","groupHeaderTemplate","_createVerticalColumnsLayout","_createColumnsLayout","_getRowCount","_groupCount","_getGroupsCount","_addContent","dates","columnCount","groupsCount","rowCount","start","end","slotTemplate","isVerticalGrouped","rowIdx","groupIdx","html","appendRow","tmplDate","content","classes","_resourceBySlot","isToday","workDayStart","workDayEnd","_isWorkDay","_forTimeRange","_addTimeSlotsCollections","groupCount","datesCount","tableRows","interval","isVerticallyGrouped","rowMultiplier","time","rowIndex","cellMultiplier","cells","cellsPerGroup","cellsPerDay","dateIndex","cellOffset","cellIndex","floor","children","startTime","_addTimeSlotToCollection","_getVerticalGroupCount","_getVerticalRowCount","eventGroups","maxRowCount","_isVerticallyGrouped","_renderEvent","eventGroup","adjustedEvent","range","container","eventObject","element","_createEventElement","occurrence","head","tail","appendTo","css","top","height","eventHeight","_startTime","_endTime","uid","slotRange","offsetTop","_inverseEventColor","addContinuousEvent","isAllDay","_arrangeRows","_verticalCountForLevel","level","_rowCountForLevel","_horizontalCountForLevel","_columnCountForLevel","_updateCurrentVerticalTimeMarker","ranges","currentTime","elementHtml","headerWrap","round","innerRect","getTime","timesTableMarker","prependTo","addClass","_adjustLeftPosition","prev","position","width","scrollHeight","_changeGroup","_prevGroupSlot","slot","isDay","collection","_collection","last","_nextGroupSlot","first","_verticalSlots","selection","reverse","_verticalMethod","_normalizeVerticalSelection","_horizontalSlots","method","startSlot","endSlot","multiple","result","_isHorizontallyGrouped","_changeVerticalViewPeriod","_changeHorizontalViewPeriod","slots","shift","_changeViewPeriod","_updateDirection","_createMoveHint","rect","hint","snap","offsetHeight","inverseColor","_appendMoveHint","_isRtl","scrollWidth","clientWidth","TimelineGroupedByDateView","times","eq","_createDateLayout","subColumns","isMajorTickColumn","isMiddleColumn","isLastSlotColumn","minorTickColumns","workDateIndex","tempStart","minorTickCount","msMajorInterval","majorTick","msInterval","_dates","startIndex","endIndex","currentSlot","dateRange","eventObjects","index","_timeSlotCollections","_slots","timeSlotRanges","firstTimesCell","lastTimesCell","markerTopPosition","timesTableMarkerCss","previous","_changeDate","collections","_getCollections","tempSlot","slotIdx","startEnd","offsetLeft","offsetWidth","scheduler","that","fn","call","_groupedView","_getGroupedView","title","name","_workDays","_templates","_editable","calculateDateRange","_groups","_currentTime","_isVirtualized","_isGroupedByDate","_getNextEventIndexBySlot","sortedEvents","tempIndex","startDate","_getSelectedSlot","pad","_getSortedEvents","uniqueAllEvents","sort","second","isDaySlot","_currentTimeMarkerUpdater","_updateCurrentTimeMarker","timezone","timezoneOffset","currentGroup","utcCurrentTime","slotElement","remove","_isInDateSlot","currentTimeMarker","useLocalTimezone","dataSource","schema","offset","convert","getTimezoneOffset","orientation","toUtcTime","slotByStartDate","setUpdateTimer","markerOptions","updateInterval","_currentTimeUpdateTimer","setInterval","editable","_isMobile","_touchEditable","_mouseEditable","on","e","trigger","closest","attr","preventDefault","create","resourceInfo","_slotByPosition","pageX","pageY","eventInfo","endDate","update","threshold","support","mobileOS","android","_addUserEvents","UserEvents","useClickAsTap","browser","edge","filter","tap","_scrolling","location","_editUserEvents","eventElement","touchElement","target","touch","initialTouch","hasClass","mozilla","scrollLeft","msie","webkit","scrollTop","ceil","selectedDateFormat","selectedShortDateFormat","selectedMobileDateFormat","today","endTime","showWorkHours","eventMinWidth","columnWidth","majorTimeHeaderTemplate","eventTemplate","dateHeaderTemplate","footer","command","messages","defaultRowText","showFullDay","showWorkDay","settings","Template","templateSettings","_eventTmpl","_render","_startDate","_endDate","_calculateSlotRanges","createLayout","_layout","_content","_footer","_setContentWidth","refreshLayout","th","currentTarget","contentWidth","contentTable","minWidth","calculatedWidth","add","slotRanges","rangeStart","rangeEnd","slotStartTime","slotEndTime","_slotRanges","min","max","action","verticalByDate","msMin","msMax","majorTickDivider","isLastMajorSlot","minorTickIndex","timeColumns","text","groupedView","minorTickSlots","className","minorTicks","middleColumn","lastSlotColumn","minorSlotsCount","slice","groupedResources","_groupOrientation","isWorkDay","currentDate","columnLevels","rowLevel","rowLevels","day","getDay","append","_addResourceView","addTimeSlotCollection","addDays","_timeSlotGroups","_timeSlotInterval","cell","getTimeSlotCollection","UTC","getFullYear","getMonth","setAttribute","addTimeSlot","visibleEndDate","nextDate","nextDay","previousDate","previousDay","render","eventsByResource","_headerColumnCount","data","Query","field","dir","toArray","_eventsByResource","_renderEvents","_setRowsHeight","_positionEvents","eventsForGroup","eventUid","eventIndex","isArray","_positionEvent","rowsCount","rowHeight","timesRow","row","eventBottomOffset","_getBottomRowOffset","verticalGroupCount","_refreshSlots","minOffset","maxOffset","isMobile","slotsCollection","lastSlot","offsetRight","refresh","itemIdx","value","eventsFilteredByResource","resource","_resourceValue","operator","groupEqFilter","_isInTimeSlot","slotIndex","_adjustEvent","eventStartTime","_time","eventEndTime","adjustedStartDate","adjustedEndDate","clone","isMultiDayEvent","duration","_continuousEvents","showDelete","destroy","resizable","resize","eventStartDate","eventEndDate","eventResources","apply","ns","singleDay","angular","dataItem","rowEvents","j","eventLength","addEvent","createRows","_updateEventForSelection","_eventOptionsForMove","_updateEventForResize","set","_updateMoveHint","distance","rangeIndex","clonedEvent","eventDuraton","_removeMoveHint","_moveHint","_updateResizeHint","startRect","format","_removeResizeHint","_createResizeHint","_resizeHint","toString","toLocalDate","selectionByElement","vertical","collectionIndex","backward","prevGroupSlot","nextGroupSlot","newStart","newEnd","_isInRange","move","key","handled","keys","DOWN","UP","LEFT","RIGHT","off","clearInterval","TimelineWeekView","selectedDate","dayOfWeek","calendarInfo","firstDay","TimelineWorkWeekView","weekStart","map","indexOf","TimelineMonthView","firstDayOfMonth","lastDayOfMonth","jQuery","amd","a1","a2","a3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;CAwBC,SAAUA,EAAGC,QACVA,OAAO,gCAAiC,wBAAyBD,IACnE,WAq4DE,MA53DC,UAAUE,EAAGC,GAGV,QAASC,GAAgBC,GACrB,GAAIC,GAAa,GAAIC,MAAK,KAAM,EAAG,EAAG,EAAG,EAAG,EAE5C,OADAC,GAAQF,EAAYG,EAAgBJ,IAC7BC,EAEX,QAASI,GAAYC,GAArB,GAIQC,GACAC,EACAC,CALJ,IAAIH,EAAQC,UAAYD,EAAQC,SAASG,OACrC,MAAOJ,GAAQC,QAMnB,KAJIA,KACAC,EAAWF,EAAQK,cAAgB,EACnCF,EAAcG,KAAKC,IAAIP,EAAQG,YAAc,GACjDF,EAASO,KAAKN,GACPC,GAAeD,GACdA,EAAW,EACXA,GAAY,EAEZA,IAEJD,EAASO,KAAKN,EAElB,OAAOD,GAEX,QAASQ,GAAWC,GAApB,GAGiBC,GAFTC,EAAQ,CACZ,IAAIF,EAAYG,QAAS,CACrB,IAASF,EAAI,EAAGA,EAAID,EAAYG,QAAQT,OAAQO,IAC5CC,GAASH,EAAWC,EAAYG,QAAQF,GAG5C,OADAD,GAAYI,QAAUF,EACfA,EAGP,MADAF,GAAYI,QAAU,EACf,EAGf,QAASC,GAAgBC,EAAUC,EAAMC,GACrC,GAAIC,GAAKC,EAAeC,EAAUC,CA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n\n*/\n(function (f, define) {\n define('kendo.scheduler.timelineview', ['kendo.scheduler.view'], f);\n}(function () {\n var __meta__ = {\n id: 'scheduler.timelineview',\n name: 'Scheduler Timeline View',\n category: 'web',\n description: 'The Scheduler Timeline View',\n depends: ['scheduler.view'],\n hidden: true\n };\n (function ($, undefined) {\n var kendo = window.kendo, ui = kendo.ui, setTime = kendo.date.setTime, SchedulerView = ui.SchedulerView, outerWidth = kendo._outerWidth, outerHeight = kendo._outerHeight, extend = $.extend, proxy = $.proxy, getDate = kendo.date.getDate, getMilliseconds = kendo.date.getMilliseconds, MS_PER_DAY = kendo.date.MS_PER_DAY, MS_PER_MINUTE = kendo.date.MS_PER_MINUTE, CURRENT_TIME_MARKER_CLASS = 'k-current-time', CURRENT_TIME_MARKER_ARROW_CLASS = 'k-current-time-arrow', SCHEDULER_HEADER_WRAP_CLASS = 'k-scheduler-header-wrap', INVERSE_COLOR_CLASS = 'k-event-inverse', BORDER_SIZE_COEFF = 0.8666, NS = '.kendoTimelineView';\n var EVENT_TEMPLATE = kendo.template('
' + '
#:kendo.format(\"{0:t} - {1:t}\", start, end)#
' + '
${title}
'), DATA_HEADER_TEMPLATE = kendo.template('#=kendo.format(\\'{0:m}\\', date)#'), EVENT_WRAPPER_STRING = '
' + '' + '# if(data.tail) {#' + '' + '#}#' + '# if(data.isException()) {#' + '' + '# } else if(data.isRecurring()) {#' + '' + '# } #' + '' + '{0}' + '' + '#if (showDelete) {#' + '' + '#}#' + '# if(data.head) {#' + '' + '#}#' + '' + '#if(resizable && !data.tail){#' + '' + '#}#' + '#if(resizable && !data.head){#' + '' + '#}#' + '
';\n function toInvariantTime(date) {\n var staticDate = new Date(1980, 1, 1, 0, 0, 0);\n setTime(staticDate, getMilliseconds(date));\n return staticDate;\n }\n function getWorkDays(options) {\n if (options.workDays && options.workDays.length) {\n return options.workDays;\n }\n var workDays = [];\n var dayIndex = options.workWeekStart % 7;\n var workWeekEnd = Math.abs(options.workWeekEnd % 7);\n workDays.push(dayIndex);\n while (workWeekEnd != dayIndex) {\n if (dayIndex > 6) {\n dayIndex -= 7;\n } else {\n dayIndex++;\n }\n workDays.push(dayIndex);\n }\n return workDays;\n }\n function setColspan(columnLevel) {\n var count = 0;\n if (columnLevel.columns) {\n for (var i = 0; i < columnLevel.columns.length; i++) {\n count += setColspan(columnLevel.columns[i]);\n }\n columnLevel.colspan = count;\n return count;\n } else {\n columnLevel.colspan = 1;\n return 1;\n }\n }\n function collidingEvents(elements, left, right) {\n var idx, startPosition, overlaps, endPosition;\n for (idx = elements.length - 1; idx >= 0; idx--) {\n startPosition = elements[idx].rectLeft;\n endPosition = elements[idx].rectRight;\n overlaps = startPosition <= left && endPosition >= left;\n if (overlaps || startPosition >= left && endPosition <= right || left <= startPosition && right >= startPosition) {\n if (startPosition < left) {\n left = startPosition;\n }\n if (endPosition > right) {\n right = endPosition;\n }\n }\n }\n return eventsForSlot(elements, left, right);\n }\n function eventsForSlot(elements, left, right) {\n var events = [];\n for (var idx = 0; idx < elements.length; idx++) {\n var event = {\n rectLeft: elements[idx].rectLeft,\n rectRight: elements[idx].rectRight\n };\n if (event.rectLeft < left && event.rectRight > left || event.rectLeft >= left && event.rectRight <= right) {\n events.push(elements[idx]);\n }\n }\n return events;\n }\n var TimelineGroupedView = kendo.Class.extend({\n init: function (view) {\n this._view = view;\n },\n _getTimeSlotByPosition: function (x, y, groupIndex) {\n var group = this._view.groups[groupIndex];\n return group.timeSlotByPosition(x, y);\n },\n _hideHeaders: function () {\n var view = this._view;\n view.timesHeader.find('table tr:last').hide();\n view.datesHeader.find('table tr:last').hide();\n },\n _setColspan: function (timeColumn) {\n setColspan(timeColumn);\n },\n _createRowsLayout: function (resources, rows, groupHeaderTemplate) {\n var view = this._view;\n return view._createRowsLayout(resources, rows, groupHeaderTemplate);\n },\n _createVerticalColumnsLayout: function (resources, rows, groupHeaderTemplate, columns) {\n return columns;\n },\n _createColumnsLayout: function (resources, columns, groupHeaderTemplate) {\n var view = this._view;\n return view._createColumnsLayout(resources, columns, groupHeaderTemplate);\n },\n _getRowCount: function () {\n var view = this._view;\n return view._groupCount();\n },\n _getGroupsCount: function () {\n return 1;\n },\n _addContent: function (dates, columnCount, groupsCount, rowCount, start, end, slotTemplate, isVerticalGrouped) {\n var view = this._view;\n var html = '';\n var options = view.options;\n var appendRow = function (date) {\n var content = '';\n var classes = '';\n var tmplDate;\n var resources = function (groupIndex) {\n return function () {\n return view._resourceBySlot({ groupIndex: groupIndex });\n };\n };\n if (kendo.date.isToday(dates[idx])) {\n classes += 'k-today';\n }\n if (kendo.date.getMilliseconds(date) < kendo.date.getMilliseconds(options.workDayStart) || kendo.date.getMilliseconds(date) >= kendo.date.getMilliseconds(options.workDayEnd) || !view._isWorkDay(dates[idx])) {\n classes += ' k-nonwork-hour';\n }\n content += '';\n tmplDate = kendo.date.getDate(dates[idx]);\n kendo.date.setTime(tmplDate, kendo.date.getMilliseconds(date));\n content += slotTemplate({\n date: tmplDate,\n resources: resources(isVerticalGrouped ? rowIdx : groupIdx)\n });\n content += '';\n return content;\n };\n for (var rowIdx = 0; rowIdx < rowCount; rowIdx++) {\n html += '';\n for (var groupIdx = 0; groupIdx < groupsCount; groupIdx++) {\n for (var idx = 0, length = columnCount; idx < length; idx++) {\n html += view._forTimeRange(start, end, appendRow);\n }\n }\n html += '';\n }\n return html;\n },\n _addTimeSlotsCollections: function (groupCount, datesCount, tableRows, interval, isVerticallyGrouped) {\n var view = this._view;\n var rowCount = tableRows.length;\n if (isVerticallyGrouped) {\n rowCount = Math.floor(rowCount / groupCount);\n }\n for (var groupIndex = 0; groupIndex < groupCount; groupIndex++) {\n var rowMultiplier = 0;\n var group = view.groups[groupIndex];\n var time;\n if (isVerticallyGrouped) {\n rowMultiplier = groupIndex;\n }\n var rowIndex = rowMultiplier * rowCount;\n var cellMultiplier = 0;\n if (!isVerticallyGrouped) {\n cellMultiplier = groupIndex;\n }\n var cells = tableRows[rowIndex].children;\n var cellsPerGroup = cells.length / (!isVerticallyGrouped ? groupCount : 1);\n var cellsPerDay = cellsPerGroup / datesCount;\n for (var dateIndex = 0; dateIndex < datesCount; dateIndex++) {\n var cellOffset = dateIndex * cellsPerDay + cellsPerGroup * cellMultiplier;\n time = getMilliseconds(new Date(+view.startTime()));\n for (var cellIndex = 0; cellIndex < cellsPerDay; cellIndex++) {\n view._addTimeSlotToCollection(group, cells, cellIndex, cellOffset, dateIndex, time, interval);\n time += interval;\n }\n }\n }\n },\n _getVerticalGroupCount: function (groupsCount) {\n return groupsCount;\n },\n _getVerticalRowCount: function (eventGroups, groupIndex, maxRowCount) {\n var view = this._view;\n return view._isVerticallyGrouped() ? eventGroups[groupIndex].maxRowCount : maxRowCount;\n },\n _renderEvent: function (eventGroup, event, adjustedEvent, group, range, container) {\n var view = this._view;\n var element;\n element = view._createEventElement(adjustedEvent.occurrence, event, range.head || adjustedEvent.head, range.tail || adjustedEvent.tail);\n element.appendTo(container).css({\n top: 0,\n height: view.options.eventHeight\n });\n var eventObject = {\n start: adjustedEvent.occurrence._startTime || adjustedEvent.occurrence.start,\n end: adjustedEvent.occurrence._endTime || adjustedEvent.occurrence.end,\n element: element,\n uid: event.uid,\n slotRange: range,\n rowIndex: 0,\n offsetTop: 0\n };\n eventGroup.events[event.uid] = eventObject;\n view._inverseEventColor(element);\n view.addContinuousEvent(group, range, element, event.isAllDay);\n view._arrangeRows(eventObject, range, eventGroup);\n },\n _verticalCountForLevel: function (level) {\n var view = this._view;\n return view._rowCountForLevel(level);\n },\n _horizontalCountForLevel: function (level) {\n var view = this._view;\n return view._columnCountForLevel(level);\n },\n _updateCurrentVerticalTimeMarker: function (ranges, currentTime) {\n var view = this._view;\n var elementHtml = '
';\n var headerWrap = view.datesHeader.find('.' + SCHEDULER_HEADER_WRAP_CLASS);\n var left = Math.round(ranges[0].innerRect(currentTime, new Date(currentTime.getTime() + 1), false).left);\n var timesTableMarker = $(elementHtml).prependTo(headerWrap).addClass(CURRENT_TIME_MARKER_ARROW_CLASS + '-down');\n timesTableMarker.css({\n left: view._adjustLeftPosition(left - outerWidth(timesTableMarker) * BORDER_SIZE_COEFF / 2),\n top: headerWrap.find('tr:last').prev().position().top\n });\n $(elementHtml).prependTo(view.content).css({\n left: view._adjustLeftPosition(left),\n width: '1px',\n height: view.content[0].scrollHeight - 1,\n top: 0\n });\n },\n _changeGroup: function () {\n return undefined;\n },\n _prevGroupSlot: function (slot, group, isDay) {\n var view = this._view;\n if (view._isVerticallyGrouped()) {\n return slot;\n } else {\n var collection = group._collection(0, isDay);\n return collection.last();\n }\n },\n _nextGroupSlot: function (slot, group, isDay) {\n var view = this._view;\n if (view._isVerticallyGrouped()) {\n return slot;\n } else {\n var collection = group._collection(0, isDay);\n return collection.first();\n }\n },\n _verticalSlots: function (selection, reverse) {\n var view = this._view;\n return view._changeGroup(selection, reverse);\n },\n _verticalMethod: function (reverse) {\n return reverse ? 'leftSlot' : 'rightSlot';\n },\n _normalizeVerticalSelection: function () {\n return undefined;\n },\n _horizontalSlots: function (selection, group, method, startSlot, endSlot, multiple, reverse) {\n var view = this._view;\n var result = {};\n result.startSlot = group[method](startSlot);\n result.endSlot = group[method](endSlot);\n if (!multiple && view._isHorizontallyGrouped() && (!result.startSlot || !result.endSlot)) {\n result.startSlot = result.endSlot = view._changeGroup(selection, reverse);\n }\n return result;\n },\n _changeVerticalViewPeriod: function () {\n return false;\n },\n _changeHorizontalViewPeriod: function (slots, shift, selection, reverse) {\n var view = this._view;\n if ((!slots.startSlot || !slots.endSlot) && !shift && view._changeViewPeriod(selection, reverse, false)) {\n return true;\n }\n return false;\n },\n _updateDirection: function (selection, ranges, shift, reverse) {\n var view = this._view;\n view._updateDirection(selection, ranges, shift, reverse, true);\n },\n _createMoveHint: function (range, adjustedEvent) {\n var view = this._view;\n var startSlot = range.start;\n var hint = view._createEventElement(adjustedEvent.occurrence, adjustedEvent.occurrence, false, false);\n hint.addClass('k-event-drag-hint');\n var rect = range.innerRect(adjustedEvent.occurrence.start, adjustedEvent.occurrence.end, view.options.snap);\n var width = rect.right - rect.left;\n if (width < 0) {\n width = 0;\n }\n var left = view._adjustLeftPosition(rect.left);\n var css = {\n left: left,\n top: startSlot.offsetTop,\n height: startSlot.offsetHeight,\n width: width\n };\n hint.css(css);\n if (adjustedEvent.occurrence.inverseColor) {\n hint.addClass(INVERSE_COLOR_CLASS);\n }\n view._appendMoveHint(hint);\n },\n _adjustLeftPosition: function (left) {\n var view = this._view;\n if (view._isRtl) {\n left -= view.content[0].scrollWidth - view.content[0].clientWidth;\n }\n return left;\n }\n });\n var TimelineGroupedByDateView = kendo.Class.extend({\n init: function (view) {\n this._view = view;\n },\n _getTimeSlotByPosition: function (x, y, groupIndex) {\n var group = this._view.groups[groupIndex];\n return group.timeSlotByPosition(x, y, true);\n },\n _hideHeaders: function () {\n var view = this._view;\n if (!view._isVerticallyGrouped()) {\n view.timesHeader.find('table tr').eq(2).hide();\n view.datesHeader.find('table tr').eq(2).hide();\n } else {\n view.times.find('.k-last').hide();\n }\n },\n _setColspan: function () {\n },\n _createRowsLayout: function (resources, rows, groupHeaderTemplate, columns) {\n var view = this._view;\n return view._createDateLayout(columns, null, true);\n },\n _createVerticalColumnsLayout: function (resources, rows, groupHeaderTemplate) {\n var view = this._view;\n return view._createColumnsLayout(resources, null, groupHeaderTemplate);\n },\n _createColumnsLayout: function (resources, columns, groupHeaderTemplate, subColumns) {\n var view = this._view;\n return view._createColumnsLayout(resources, columns, groupHeaderTemplate, subColumns, true);\n },\n _getRowCount: function (level) {\n var view = this._view;\n return view._rowCountForLevel(level);\n },\n _getGroupsCount: function () {\n var view = this._view;\n return view._groupCount();\n },\n _addContent: function (dates, columnCount, groupsCount, rowCount, start, end, slotTemplate, isVerticalGrouped) {\n var view = this._view;\n var html = '';\n var options = view.options;\n var appendRow = function (date, isMajorTickColumn, isMiddleColumn, isLastSlotColumn, minorTickColumns, groupIdx) {\n var content = '';\n var classes = '';\n var tmplDate;\n var workDateIndex = view._isVerticallyGrouped() ? dateIndex : idx;\n var resources = function (groupIndex) {\n return function () {\n return view._resourceBySlot({ groupIndex: groupIndex });\n };\n };\n if (kendo.date.isToday(dates[idx])) {\n classes += 'k-today';\n }\n if (kendo.date.getMilliseconds(date) < kendo.date.getMilliseconds(options.workDayStart) || kendo.date.getMilliseconds(date) >= kendo.date.getMilliseconds(options.workDayEnd) || !view._isWorkDay(dates[workDateIndex])) {\n classes += ' k-nonwork-hour';\n }\n content += '';\n tmplDate = kendo.date.getDate(dates[idx]);\n kendo.date.setTime(tmplDate, kendo.date.getMilliseconds(date));\n content += slotTemplate({\n date: tmplDate,\n resources: resources(groupIdx)\n });\n content += '';\n return content;\n };\n var tempStart = new Date(start), minorTickCount = view.options.minorTickCount, msMajorInterval = view.options.majorTick * MS_PER_MINUTE, msInterval = msMajorInterval / minorTickCount || 1, dateIndex;\n for (var rowIdx = 0; rowIdx < rowCount; rowIdx++) {\n html += '';\n if (rowIdx % (rowCount / view._dates.length) === 0) {\n dateIndex = rowIdx / (rowCount / view._dates.length);\n tempStart = new Date(view._dates[dateIndex]);\n kendo.date.setTime(tempStart, kendo.date.getMilliseconds(start));\n }\n for (var idx = 0, length = columnCount; idx < length; idx++) {\n html += view._forTimeRange(tempStart, end, appendRow, isVerticalGrouped, groupsCount);\n if (isVerticalGrouped) {\n setTime(tempStart, msInterval, false);\n break;\n }\n }\n html += '';\n }\n return html;\n },\n _addTimeSlotsCollections: function (groupCount, datesCount, tableRows, interval, isVerticallyGrouped) {\n var view = this._view;\n var rowCount = tableRows.length;\n if (isVerticallyGrouped) {\n rowCount = rowCount / datesCount;\n }\n for (var dateIndex = 0; dateIndex < datesCount; dateIndex++) {\n var rowMultiplier = 0;\n var time;\n if (isVerticallyGrouped) {\n rowMultiplier = dateIndex;\n }\n var rowIndex = rowMultiplier * rowCount;\n var cellMultiplier = 0;\n var cells = tableRows[rowIndex].children;\n var cellsPerGroup = isVerticallyGrouped ? rowCount : cells.length / (datesCount * groupCount);\n var cellsPerDay = cells.length / datesCount;\n var cellOffset;\n time = getMilliseconds(new Date(+view.startTime()));\n for (var cellIndex = 0; cellIndex < cellsPerGroup; cellIndex++) {\n if (!isVerticallyGrouped) {\n cellOffset = dateIndex * cellsPerDay + groupCount * cellIndex;\n cellMultiplier++;\n } else {\n cellOffset = 0;\n cells = tableRows[cellIndex + cellsPerGroup * dateIndex].children;\n }\n for (var groupIndex = 0; groupIndex < groupCount; groupIndex++) {\n var group = view.groups[groupIndex];\n view._addTimeSlotToCollection(group, cells, groupIndex, cellOffset, dateIndex, time, interval);\n }\n time += interval;\n }\n }\n },\n _getVerticalGroupCount: function () {\n var view = this._view;\n return view.content.find('tr').length;\n },\n _getVerticalRowCount: function (eventGroups, groupIndex, maxRowCount) {\n return maxRowCount;\n },\n _renderEvent: function (eventGroup, event, adjustedEvent, group, range, container, startIndex, endIndex) {\n var view = this._view;\n var element;\n var eventObjects = [];\n for (var i = range.start.index; i <= range.end.index; i++) {\n element = view._createEventElement(adjustedEvent.occurrence, event, i !== endIndex, i !== startIndex);\n element.appendTo(container).css({\n top: 0,\n height: view.options.eventHeight\n });\n var currentSlot = group._timeSlotCollections[0]._slots[i];\n var dateRange = group.timeSlotRanges(currentSlot.start, currentSlot.end, false)[0];\n var eventObject = {\n start: i === startIndex ? adjustedEvent.occurrence._startTime || adjustedEvent.occurrence.start : currentSlot.start,\n end: i === endIndex ? adjustedEvent.occurrence._endTime || adjustedEvent.occurrence.end : currentSlot.end,\n element: element,\n uid: event.uid,\n slotRange: dateRange,\n rowIndex: 0,\n offsetTop: 0\n };\n eventGroup.events[event.uid] = eventObject;\n eventObjects.push(eventObject);\n view.addContinuousEvent(group, dateRange, element, event.isAllDay);\n view._arrangeRows(eventObject, dateRange, eventGroup);\n }\n eventGroup.events[event.uid] = eventObjects;\n },\n _verticalCountForLevel: function (level) {\n var view = this._view;\n return view._columnCountForLevel(level);\n },\n _horizontalCountForLevel: function (level, columnLevel) {\n var view = this._view;\n return view._columnCountForLevel(columnLevel) / view._columnCountForLevel(2);\n },\n _updateCurrentVerticalTimeMarker: function (ranges, currentTime) {\n var view = this._view;\n var firstTimesCell = view.times.find('tr:first th:first');\n var lastTimesCell = view.times.find('tr:first th:last');\n var elementHtml = '
';\n var timesTableMarker = $(elementHtml).prependTo(view.times);\n var markerTopPosition = Math.round(ranges[0].innerRect(currentTime, new Date(currentTime.getTime() + 1), false).top);\n var timesTableMarkerCss = {};\n if (this._isRtl) {\n timesTableMarkerCss.right = firstTimesCell.position().left + outerHeight(firstTimesCell) - outerHeight(lastTimesCell);\n timesTableMarker.addClass(CURRENT_TIME_MARKER_ARROW_CLASS + '-left');\n } else {\n timesTableMarkerCss.left = lastTimesCell.position().left;\n timesTableMarker.addClass(CURRENT_TIME_MARKER_ARROW_CLASS + '-right');\n }\n timesTableMarkerCss.top = markerTopPosition - outerWidth(timesTableMarker) * BORDER_SIZE_COEFF / 2;\n timesTableMarker.css(timesTableMarkerCss);\n $(elementHtml).prependTo(view.content).css({\n top: markerTopPosition,\n height: '1px',\n right: '1px',\n width: view.content[0].scrollWidth,\n left: 0\n });\n },\n _changeGroup: function (selection, previous, slot) {\n var view = this._view;\n if (!slot) {\n selection.groupIndex = previous ? view.groups.length - 1 : 0;\n }\n },\n _prevGroupSlot: function (slot) {\n return slot;\n },\n _nextGroupSlot: function (slot) {\n return slot;\n },\n _changeDate: function (selection, reverse, slot) {\n var view = this._view;\n var group = view.groups[selection.groupIndex];\n var collections, index;\n if (reverse) {\n collections = group._getCollections(false);\n index = slot.index - 1;\n if (index >= 0) {\n return collections[0]._slots[index];\n }\n } else {\n collections = group._getCollections(false);\n index = slot.index + 1;\n if (collections[0] && collections[0]._slots[index]) {\n return collections[0]._slots[index];\n }\n }\n },\n _verticalSlots: function (selection, reverse, slot) {\n return this._changeDate(selection, reverse, slot);\n },\n _verticalMethod: function (reverse, multiple) {\n if (multiple) {\n return reverse ? 'upSlot' : 'downSlot';\n } else {\n return reverse ? 'leftSlot' : 'rightSlot';\n }\n },\n _normalizeVerticalSelection: function (selection, ranges, reverse, multiple) {\n var view = this._view;\n if (!multiple) {\n return view._normalizeVerticalSelection(selection, ranges, reverse);\n }\n return undefined;\n },\n _horizontalSlots: function (selection, group, method, startSlot, endSlot, multiple, reverse) {\n var view = this._view;\n var tempSlot = view._changeGroup(selection, reverse);\n var result = {};\n if (!tempSlot) {\n if (!view._isVerticallyGrouped()) {\n result.startSlot = group[method](startSlot);\n result.endSlot = group[method](endSlot);\n }\n } else {\n result.startSlot = result.endSlot = tempSlot;\n }\n return result;\n },\n _changeVerticalViewPeriod: function (slots, shift, selection, reverse) {\n var view = this._view;\n if ((!slots.startSlot || !slots.endSlot) && !shift && view._changeViewPeriod(selection, reverse, view._isVerticallyGrouped())) {\n return true;\n }\n return false;\n },\n _changeHorizontalViewPeriod: function (slots, shift, selection, reverse) {\n var view = this._view;\n if (view._isVerticallyGrouped()) {\n return false;\n }\n if ((!slots.startSlot || !slots.endSlot) && !shift && view._changeViewPeriod(selection, reverse, false)) {\n return true;\n }\n return false;\n },\n _updateDirection: function (selection, ranges, shift, reverse) {\n var view = this._view;\n view._updateDirection(selection, ranges, shift, reverse, !view._isVerticallyGrouped());\n },\n _createMoveHint: function (range, adjustedEvent) {\n var view = this._view;\n var startSlot = range.start;\n var startEnd = range.end;\n for (var slotIdx = startSlot.index; slotIdx <= startEnd.index; slotIdx++) {\n var slot = range.collection._slots[slotIdx];\n var hint = view._createEventElement(adjustedEvent.occurrence, adjustedEvent.occurrence, false, false);\n hint.addClass('k-event-drag-hint');\n var css = {\n left: slot.offsetLeft + 2,\n top: slot.offsetTop,\n height: view.options.eventHeight,\n width: slot.offsetWidth\n };\n hint.css(css);\n if (adjustedEvent.occurrence.inverseColor) {\n hint.addClass(INVERSE_COLOR_CLASS);\n }\n view._appendMoveHint(hint);\n }\n },\n _adjustLeftPosition: function (left) {\n var view = this._view;\n if (view._isRtl && !view._isVerticallyGrouped()) {\n left -= view.content[0].scrollWidth - view.content[0].offsetWidth;\n }\n return left;\n }\n });\n kendo.ui.scheduler.TimelineGroupedView = TimelineGroupedView;\n kendo.ui.scheduler.TimelineGroupedByDateView = TimelineGroupedByDateView;\n var TimelineView = SchedulerView.extend({\n init: function (element, options) {\n var that = this;\n SchedulerView.fn.init.call(that, element, options);\n that._groupedView = that._getGroupedView();\n that.title = that.options.title || that.options.name;\n that._workDays = getWorkDays(that.options);\n that._templates();\n that._editable();\n that.calculateDateRange();\n that._groups();\n that._currentTime(true);\n },\n name: 'timeline',\n _isVirtualized: function () {\n return false;\n },\n _getGroupedView: function () {\n if (this._isGroupedByDate()) {\n return new kendo.ui.scheduler.TimelineGroupedByDateView(this);\n } else {\n return new kendo.ui.scheduler.TimelineGroupedView(this);\n }\n },\n _getNextEventIndexBySlot: function (slot, sortedEvents, groupIndex) {\n if (this._isVerticallyGrouped()) {\n return kendo.ui.SchedulerView.fn._getNextEventIndexBySlot.call(this, slot, sortedEvents, groupIndex);\n }\n var tempIndex = 0;\n for (var i = 0; i < sortedEvents.length; i++) {\n if (slot.startDate() > sortedEvents[i].start.startDate()) {\n tempIndex++;\n continue;\n }\n if (slot.startDate().getTime() === sortedEvents[i].start.startDate().getTime() && groupIndex > sortedEvents[i].start.groupIndex) {\n tempIndex++;\n continue;\n }\n break;\n }\n return tempIndex;\n },\n _getSelectedSlot: function (slot, sortedEvents, event, idx, pad, prev) {\n if (this._isVerticallyGrouped()) {\n return kendo.ui.SchedulerView.fn._getSelectedSlot.call(this, slot, sortedEvents, event, idx, pad, prev);\n }\n return slot;\n },\n _getSortedEvents: function (uniqueAllEvents) {\n if (this._isVerticallyGrouped()) {\n return kendo.ui.SchedulerView.fn._getSortedEvents.call(this, uniqueAllEvents);\n }\n return uniqueAllEvents.sort(function (first, second) {\n var result = first.start.startDate().getTime() - second.start.startDate().getTime();\n if (result === 0) {\n if (first.start.isDaySlot && !second.start.isDaySlot) {\n result = -1;\n }\n if (!first.start.isDaySlot && second.start.isDaySlot) {\n result = 1;\n }\n }\n if (result === 0) {\n result = first.start.groupIndex - second.start.groupIndex;\n }\n if (result === 0) {\n result = $(first.element).index() - $(second.element).index();\n }\n return result;\n });\n },\n _currentTimeMarkerUpdater: function () {\n this._updateCurrentTimeMarker(new Date());\n },\n _updateCurrentTimeMarker: function (currentTime) {\n var options = this.options;\n this.datesHeader.find('.' + CURRENT_TIME_MARKER_CLASS).remove();\n this.times.find('.' + CURRENT_TIME_MARKER_CLASS).remove();\n this.content.find('.' + CURRENT_TIME_MARKER_CLASS).remove();\n if (!this._isInDateSlot({\n start: currentTime,\n end: currentTime\n })) {\n return;\n }\n if (options.currentTimeMarker.useLocalTimezone === false) {\n var timezone = options.dataSource.options.schema.timezone;\n if (options.dataSource && timezone) {\n var timezoneOffset = kendo.timezone.offset(currentTime, timezone);\n currentTime = kendo.timezone.convert(currentTime, currentTime.getTimezoneOffset(), timezoneOffset);\n }\n }\n var groupsCount = !options.group || options.group.orientation == 'vertical' ? 1 : this.groups.length;\n for (var groupIndex = 0; groupIndex < groupsCount; groupIndex++) {\n var currentGroup = this.groups[groupIndex];\n if (!currentGroup) {\n return;\n }\n var utcCurrentTime = kendo.date.toUtcTime(currentTime);\n var ranges = currentGroup.timeSlotRanges(utcCurrentTime, utcCurrentTime + 1);\n if (ranges.length === 0) {\n return;\n }\n var collection = ranges[0].collection;\n var slotElement = collection.slotByStartDate(currentTime);\n if (slotElement) {\n if (this._isVerticallyGrouped()) {\n this._groupedView._updateCurrentVerticalTimeMarker(ranges, currentTime);\n } else {\n var elementHtml = '
';\n var headerWrap = this.datesHeader.find('.' + SCHEDULER_HEADER_WRAP_CLASS);\n var left = Math.round(ranges[0].innerRect(currentTime, new Date(currentTime.getTime() + 1), false).left);\n var timesTableMarker = $(elementHtml).prependTo(headerWrap).addClass(CURRENT_TIME_MARKER_ARROW_CLASS + '-down');\n timesTableMarker.css({\n left: this._adjustLeftPosition(left - outerWidth(timesTableMarker) * BORDER_SIZE_COEFF / 2),\n top: headerWrap.find('tr:last').prev().position().top\n });\n $(elementHtml).prependTo(this.content).css({\n left: this._adjustLeftPosition(left),\n width: '1px',\n height: this.content[0].scrollHeight - 1,\n top: 0\n });\n }\n }\n }\n },\n _adjustLeftPosition: function (left) {\n return this._groupedView._adjustLeftPosition(left);\n },\n _currentTime: function (setUpdateTimer) {\n var that = this;\n var markerOptions = that.options.currentTimeMarker;\n if (markerOptions !== false && markerOptions.updateInterval !== undefined) {\n that._currentTimeMarkerUpdater();\n if (setUpdateTimer) {\n that._currentTimeUpdateTimer = setInterval(proxy(this._currentTimeMarkerUpdater, that), markerOptions.updateInterval);\n }\n }\n },\n _editable: function () {\n if (this.options.editable) {\n if (this._isMobile()) {\n this._touchEditable();\n } else {\n this._mouseEditable();\n }\n }\n },\n _mouseEditable: function () {\n var that = this;\n that.element.on('click' + NS, '.k-event a:has(.k-i-close)', function (e) {\n that.trigger('remove', { uid: $(this).closest('.k-event').attr(kendo.attr('uid')) });\n e.preventDefault();\n });\n if (that.options.editable.create !== false) {\n that.element.on('dblclick' + NS, '.k-scheduler-content td', function (e) {\n var slot = that._slotByPosition(e.pageX, e.pageY);\n if (slot) {\n var resourceInfo = that._resourceBySlot(slot);\n that.trigger('add', {\n eventInfo: extend({\n start: slot.startDate(),\n end: slot.endDate()\n }, resourceInfo)\n });\n }\n e.preventDefault();\n });\n }\n if (that.options.editable.update !== false) {\n that.element.on('dblclick' + NS, '.k-event', function (e) {\n that.trigger('edit', { uid: $(this).closest('.k-event').attr(kendo.attr('uid')) });\n e.preventDefault();\n });\n }\n },\n _touchEditable: function () {\n var that = this;\n var threshold = 0;\n if (kendo.support.mobileOS.android) {\n threshold = 5;\n }\n if (that.options.editable.create !== false) {\n that._addUserEvents = new kendo.UserEvents(that.element, {\n threshold: threshold,\n useClickAsTap: !kendo.support.browser.edge,\n filter: '.k-scheduler-content td',\n tap: function (e) {\n if (that._scrolling) {\n return;\n }\n var x = e.x.location !== undefined ? e.x.location : e.x;\n var y = e.y.location !== undefined ? e.y.location : e.y;\n var slot = that._slotByPosition(x, y);\n if (slot) {\n var resourceInfo = that._resourceBySlot(slot);\n that.trigger('add', {\n eventInfo: extend({\n start: slot.startDate(),\n end: slot.endDate()\n }, resourceInfo)\n });\n }\n e.preventDefault();\n }\n });\n }\n if (that.options.editable.update !== false) {\n that._editUserEvents = new kendo.UserEvents(that.element, {\n threshold: threshold,\n useClickAsTap: !kendo.support.browser.edge,\n filter: '.k-event',\n tap: function (e) {\n if (that._scrolling) {\n return;\n }\n var eventElement = $(e.target).closest('.k-event');\n var touchElement = $(e.touch.initialTouch);\n if (touchElement.hasClass('k-i-close')) {\n that.trigger('remove', { uid: eventElement.attr(kendo.attr('uid')) });\n } else if (!eventElement.hasClass('k-event-active')) {\n that.trigger('edit', { uid: eventElement.attr(kendo.attr('uid')) });\n }\n e.preventDefault();\n }\n });\n }\n },\n _slotByPosition: function (x, y) {\n var slot;\n var content = this.content;\n var offset = content.offset();\n var groupIndex;\n x -= offset.left;\n y -= offset.top;\n if (this._isRtl) {\n var browser = kendo.support.browser;\n if (browser.mozilla) {\n x += content[0].scrollWidth - content[0].offsetWidth;\n x += content[0].scrollLeft;\n } else if (browser.msie) {\n x -= content.scrollLeft();\n x += content[0].scrollWidth - content[0].offsetWidth;\n } else if (browser.webkit) {\n x += content[0].scrollLeft;\n }\n } else {\n x += content[0].scrollLeft;\n }\n y += content[0].scrollTop;\n x = Math.ceil(x);\n y = Math.ceil(y);\n for (groupIndex = 0; groupIndex < this.groups.length; groupIndex++) {\n slot = this._groupedView._getTimeSlotByPosition(x, y, groupIndex);\n if (slot) {\n return slot;\n }\n }\n return null;\n },\n options: {\n name: 'TimelineView',\n title: 'Timeline',\n selectedDateFormat: '{0:D}',\n selectedShortDateFormat: '{0:d}',\n selectedMobileDateFormat: '{0:MMM dd}',\n date: kendo.date.today(),\n startTime: kendo.date.today(),\n endTime: kendo.date.today(),\n showWorkHours: false,\n minorTickCount: 2,\n editable: true,\n workDayStart: new Date(1980, 1, 1, 8, 0, 0),\n workDayEnd: new Date(1980, 1, 1, 17, 0, 0),\n workWeekStart: 1,\n workWeekEnd: 5,\n majorTick: 60,\n eventHeight: 25,\n eventMinWidth: 0,\n columnWidth: 100,\n groupHeaderTemplate: '#=text#',\n majorTimeHeaderTemplate: '#=kendo.toString(date, \\'t\\')#',\n slotTemplate: ' ',\n eventTemplate: EVENT_TEMPLATE,\n dateHeaderTemplate: DATA_HEADER_TEMPLATE,\n footer: { command: 'workDay' },\n currentTimeMarker: {\n updateInterval: 10000,\n useLocalTimezone: true\n },\n messages: {\n defaultRowText: 'All events',\n showFullDay: 'Show full day',\n showWorkDay: 'Show business hours'\n }\n },\n events: [\n 'remove',\n 'add',\n 'edit'\n ],\n _templates: function () {\n var options = this.options, settings = extend({}, kendo.Template, options.templateSettings);\n this.eventTemplate = this._eventTmpl(options.eventTemplate, EVENT_WRAPPER_STRING);\n this.majorTimeHeaderTemplate = kendo.template(options.majorTimeHeaderTemplate, settings);\n this.dateHeaderTemplate = kendo.template(options.dateHeaderTemplate, settings);\n this.slotTemplate = kendo.template(options.slotTemplate, settings);\n this.groupHeaderTemplate = kendo.template(options.groupHeaderTemplate, settings);\n },\n _render: function (dates) {\n var that = this;\n dates = dates || [];\n that._dates = dates;\n that._startDate = dates[0];\n that._endDate = dates[dates.length - 1 || 0];\n that._calculateSlotRanges();\n that.createLayout(that._layout(dates));\n that._content(dates);\n that._footer();\n that._setContentWidth();\n that.refreshLayout();\n that.datesHeader.on('click' + NS, '.k-nav-day', function (e) {\n var th = $(e.currentTarget).closest('th');\n var slot = that._slotByPosition(th.offset().left, that.content.offset().top);\n that.trigger('navigate', {\n view: 'timeline',\n date: slot.startDate()\n });\n });\n that._groupedView._hideHeaders();\n },\n _setContentWidth: function () {\n var content = this.content;\n var contentWidth = content.width();\n var contentTable = this.content.find('table');\n var columnCount = contentTable.find('tr:first').children().length;\n var minWidth = 100;\n var calculatedWidth = columnCount * this.options.columnWidth;\n if (contentWidth < calculatedWidth) {\n minWidth = Math.ceil(calculatedWidth / contentWidth * 100);\n }\n contentTable.add(this.datesHeader.find('table')).css('width', minWidth + '%');\n },\n _calculateSlotRanges: function () {\n var dates = this._dates;\n var slotStartTime = this.startTime();\n var slotEndTime = this.endTime();\n slotEndTime = getMilliseconds(slotEndTime);\n slotStartTime = getMilliseconds(slotStartTime);\n if (slotEndTime === slotStartTime) {\n slotEndTime += MS_PER_DAY - 1;\n } else if (slotEndTime < slotStartTime) {\n slotEndTime += MS_PER_DAY;\n }\n var slotRanges = [];\n for (var i = 0; i < dates.length; i++) {\n var rangeStart = getDate(dates[i]);\n setTime(rangeStart, slotStartTime);\n var rangeEnd = getDate(dates[i]);\n setTime(rangeEnd, slotEndTime);\n slotRanges.push({\n start: kendo.date.toUtcTime(rangeStart),\n end: kendo.date.toUtcTime(rangeEnd)\n });\n }\n this._slotRanges = slotRanges;\n },\n _forTimeRange: function (min, max, action, verticalByDate, groupsCount) {\n min = toInvariantTime(min);\n max = toInvariantTime(max);\n var that = this, msMin = getMilliseconds(min), msMax = getMilliseconds(max), minorTickCount = that.options.minorTickCount, msMajorInterval = that.options.majorTick * MS_PER_MINUTE, msInterval = msMajorInterval / minorTickCount || 1, start = new Date(+min), idx = 0, length, html = '';\n length = MS_PER_DAY / msInterval;\n if (msMin != msMax) {\n if (msMin > msMax) {\n msMax += MS_PER_DAY;\n }\n length = (msMax - msMin) / msInterval;\n }\n length = verticalByDate ? 1 : Math.round(length);\n if (groupsCount) {\n length = length * groupsCount;\n }\n for (; idx < length; idx++) {\n var majorTickDivider = idx % (msMajorInterval / msInterval);\n var isMajorTickColumn = majorTickDivider === 0;\n var isMiddleColumn = majorTickDivider < minorTickCount - 1;\n var isLastSlotColumn = majorTickDivider === minorTickCount - 1;\n var minorTickColumns = minorTickCount;\n if (length % minorTickCount !== 0) {\n var isLastMajorSlot = length - (idx + 1) < minorTickCount;\n if (isMajorTickColumn && isLastMajorSlot) {\n minorTickColumns = length % minorTickCount;\n }\n }\n html += action(start, isMajorTickColumn, isMiddleColumn, isLastSlotColumn, minorTickColumns, idx % groupsCount);\n if (!verticalByDate) {\n if (groupsCount) {\n if (idx % groupsCount === groupsCount - 1) {\n setTime(start, msInterval, false);\n }\n } else {\n setTime(start, msInterval, false);\n }\n }\n }\n return html;\n },\n _layout: function (dates) {\n var timeColumns = [];\n var columns = [];\n var that = this;\n var rows = [{ text: that.options.messages.defaultRowText }];\n var groupedView = that._groupedView;\n var minorTickSlots = [];\n for (var minorTickIndex = 0; minorTickIndex < that.options.minorTickCount; minorTickIndex++) {\n minorTickSlots.push({\n text: '​',\n className: 'k-last',\n minorTicks: true\n });\n }\n this._forTimeRange(that.startTime(), that.endTime(), function (date, majorTick, middleColumn, lastSlotColumn, minorSlotsCount) {\n var template = that.majorTimeHeaderTemplate;\n if (majorTick) {\n var timeColumn = {\n text: template({ date: date }),\n className: lastSlotColumn ? 'k-slot-cell' : '',\n columns: minorTickSlots.slice(0, minorSlotsCount)\n };\n groupedView._setColspan(timeColumn);\n timeColumns.push(timeColumn);\n }\n });\n for (var idx = 0; idx < dates.length; idx++) {\n columns.push({\n text: that.dateHeaderTemplate({ date: dates[idx] }),\n className: 'k-slot-cell',\n columns: timeColumns.slice(0)\n });\n }\n var resources = this.groupedResources;\n if (resources.length) {\n if (this._groupOrientation() === 'vertical') {\n rows = groupedView._createRowsLayout(resources, null, this.groupHeaderTemplate, columns);\n columns = groupedView._createVerticalColumnsLayout(resources, null, this.groupHeaderTemplate, columns);\n } else {\n columns = groupedView._createColumnsLayout(resources, columns, this.groupHeaderTemplate, columns);\n }\n }\n return {\n columns: columns,\n rows: rows\n };\n },\n _footer: function () {\n var options = this.options;\n if (options.footer !== false) {\n var html = '';\n this.footer = $(html).appendTo(this.element);\n var that = this;\n this.footer.on('click' + NS, '.k-scheduler-fullday', function (e) {\n e.preventDefault();\n that.trigger('navigate', {\n view: that.name || options.name,\n date: that.startDate(),\n isWorkDay: !options.showWorkHours\n });\n });\n this.footer.on('click' + NS, '.k-scheduler-today', function (e) {\n e.preventDefault();\n var timezone = that.options.timezone;\n var action = 'today';\n var currentDate = new Date();\n var date;\n if (timezone) {\n var timezoneOffset = kendo.timezone.offset(currentDate, timezone);\n date = kendo.timezone.convert(currentDate, currentDate.getTimezoneOffset(), timezoneOffset);\n } else {\n date = currentDate;\n }\n that.trigger('navigate', {\n view: that.name || options.name,\n action: action,\n date: date\n });\n });\n }\n },\n _columnCountForLevel: function (level) {\n var columnLevel = this.columnLevels[level];\n return columnLevel ? columnLevel.length : 0;\n },\n _rowCountForLevel: function (level) {\n var rowLevel = this.rowLevels[level];\n return rowLevel ? rowLevel.length : 0;\n },\n _isWorkDay: function (date) {\n var day = date.getDay();\n var workDays = this._workDays;\n for (var i = 0; i < workDays.length; i++) {\n if (workDays[i] === day) {\n return true;\n }\n }\n return false;\n },\n _content: function (dates) {\n var that = this;\n var start = that.startTime();\n var end = this.endTime();\n var groupsCount = 1;\n var rowCount = 1;\n var columnCount = dates.length;\n var html = '';\n var resources = this.groupedResources;\n var slotTemplate = this.slotTemplate;\n var isVerticalGrouped = false;\n if (resources.length) {\n isVerticalGrouped = that._groupOrientation() === 'vertical';\n if (isVerticalGrouped) {\n rowCount = that._groupedView._getRowCount(this.rowLevels.length - 1);\n groupsCount = that._groupedView._getGroupsCount();\n } else {\n groupsCount = that._groupCount();\n }\n }\n html += '';\n html += that._groupedView._addContent(dates, columnCount, groupsCount, rowCount, start, end, slotTemplate, isVerticalGrouped);\n html += '';\n this.content.find('table').append(html);\n },\n _groups: function () {\n var groupCount = this._groupCount();\n var dates = this._dates;\n var columnCount = dates.length;\n this.groups = [];\n for (var idx = 0; idx < groupCount; idx++) {\n var view = this._addResourceView(idx);\n var start = dates[0];\n var end = dates[dates.length - 1 || 0];\n var startTime = getMilliseconds(this.startTime());\n var endTime = getMilliseconds(this.endTime());\n if (startTime !== 0 && endTime <= startTime) {\n start = getDate(start);\n setTime(start, startTime);\n end = getDate(end);\n setTime(end, endTime);\n }\n view.addTimeSlotCollection(start, kendo.date.addDays(end, 1));\n }\n this._timeSlotGroups(groupCount, columnCount);\n },\n _isHorizontallyGrouped: function () {\n return this.groupedResources.length && this._groupOrientation() === 'horizontal';\n },\n _timeSlotGroups: function (groupCount, datesCount) {\n var interval = this._timeSlotInterval();\n var isVerticallyGrouped = this._isVerticallyGrouped();\n var tableRows = this.content.find('tr');\n tableRows.attr('role', 'row');\n this._groupedView._addTimeSlotsCollections(groupCount, datesCount, tableRows, interval, isVerticallyGrouped);\n },\n _addTimeSlotToCollection: function (group, cells, cellIndex, cellOffset, dateIndex, time, interval) {\n var cell = cells[cellIndex + cellOffset];\n var collection = group.getTimeSlotCollection(0);\n var currentDate = this._dates[dateIndex];\n var currentTime = Date.UTC(currentDate.getFullYear(), currentDate.getMonth(), currentDate.getDate());\n var start = currentTime + time;\n var end = start + interval;\n cell.setAttribute('role', 'gridcell');\n cell.setAttribute('aria-selected', false);\n collection.addTimeSlot(cell, start, end, true);\n },\n startDate: function () {\n return this._startDate;\n },\n endDate: function () {\n return this._endDate;\n },\n visibleEndDate: function () {\n var startTime = getMilliseconds(this.startTime());\n var endTime = getMilliseconds(this.endTime());\n var endDate = this.endDate();\n if (startTime !== 0 && endTime <= startTime) {\n endDate = kendo.date.addDays(endDate, 1);\n }\n return endDate;\n },\n startTime: function () {\n var options = this.options;\n return options.showWorkHours ? options.workDayStart : options.startTime;\n },\n endTime: function () {\n var options = this.options;\n return options.showWorkHours ? options.workDayEnd : options.endTime;\n },\n _timeSlotInterval: function () {\n var options = this.options;\n return options.majorTick / options.minorTickCount * MS_PER_MINUTE;\n },\n nextDate: function () {\n return kendo.date.nextDay(this.endDate());\n },\n previousDate: function () {\n return kendo.date.previousDay(this.startDate());\n },\n calculateDateRange: function () {\n this._render([this.options.date]);\n },\n render: function (events) {\n this._headerColumnCount = 0;\n this._groups();\n this.element.find('.k-event').remove();\n events = new kendo.data.Query(events).sort([\n {\n field: 'start',\n dir: 'asc'\n },\n {\n field: 'end',\n dir: 'desc'\n }\n ]).toArray();\n var eventsByResource = [];\n this._eventsByResource(events, this.groupedResources, eventsByResource);\n var eventGroups = [];\n var maxRowCount = 0;\n for (var groupIndex = 0; groupIndex < eventsByResource.length; groupIndex++) {\n var eventGroup = {\n groupIndex: groupIndex,\n maxRowCount: 0,\n events: {}\n };\n eventGroups.push(eventGroup);\n this._renderEvents(eventsByResource[groupIndex], groupIndex, eventGroup);\n if (maxRowCount < eventGroup.maxRowCount) {\n maxRowCount = eventGroup.maxRowCount;\n }\n }\n this._setRowsHeight(eventGroups, eventsByResource.length, maxRowCount);\n this._positionEvents(eventGroups, eventsByResource.length);\n this._currentTime(false);\n this.trigger('activate');\n },\n _positionEvents: function (eventGroups, groupsCount) {\n for (var groupIndex = 0; groupIndex < groupsCount; groupIndex++) {\n var eventsForGroup = eventGroups[groupIndex].events;\n for (var eventUid in eventsForGroup) {\n var eventObject = eventsForGroup[eventUid];\n if ($.isArray(eventObject)) {\n for (var eventIndex = 0; eventIndex < eventObject.length; eventIndex++) {\n this._positionEvent(eventObject[eventIndex]);\n }\n } else {\n this._positionEvent(eventObject);\n }\n }\n }\n },\n _setRowsHeight: function (eventGroups, groupsCount, maxRowCount) {\n var eventHeight = this.options.eventHeight;\n var eventBottomOffset = this._getBottomRowOffset();\n var groupedView = this._groupedView;\n var verticalGroupCount = groupedView._getVerticalGroupCount(groupsCount);\n groupsCount = this._isVerticallyGrouped() ? verticalGroupCount : 1;\n for (var groupIndex = 0; groupIndex < groupsCount; groupIndex++) {\n var rowsCount = groupedView._getVerticalRowCount(eventGroups, groupIndex, maxRowCount);\n rowsCount = rowsCount ? rowsCount : 1;\n var rowHeight = (eventHeight + 2) * rowsCount + eventBottomOffset;\n var timesRow = $(this.times.find('tr')[groupIndex]);\n var row = $(this.content.find('tr')[groupIndex]);\n timesRow.height(rowHeight);\n row.height(rowHeight);\n }\n this._setContentWidth();\n this.refreshLayout();\n this._refreshSlots();\n },\n _getBottomRowOffset: function () {\n var eventBottomOffset = this.options.eventHeight * 0.5;\n var isMobile = this._isMobile();\n var minOffset;\n var maxOffset;\n if (isMobile) {\n minOffset = 30;\n maxOffset = 60;\n } else {\n minOffset = 15;\n maxOffset = 30;\n }\n if (eventBottomOffset > maxOffset) {\n eventBottomOffset = maxOffset;\n } else if (eventBottomOffset < minOffset) {\n eventBottomOffset = minOffset;\n }\n return eventBottomOffset;\n },\n _positionEvent: function (eventObject) {\n var eventHeight = this.options.eventHeight + 2;\n var rect = eventObject.slotRange.innerRect(eventObject.start, eventObject.end, false);\n var left = this._adjustLeftPosition(rect.left);\n var width = rect.right - rect.left;\n if (width < 0) {\n width = 0;\n }\n if (width < this.options.eventMinWidth) {\n var slotsCollection = eventObject.slotRange.collection;\n var lastSlot = slotsCollection._slots[slotsCollection._slots.length - 1];\n var offsetRight = lastSlot.offsetLeft + lastSlot.offsetWidth;\n width = this.options.eventMinWidth;\n if (offsetRight < left + width) {\n width = offsetRight - rect.left;\n }\n }\n eventObject.element.css({\n top: eventObject.slotRange.start.offsetTop + eventObject.rowIndex * (eventHeight + 2) + 'px',\n left: left,\n width: width\n });\n },\n _refreshSlots: function () {\n for (var groupIndex = 0; groupIndex < this.groups.length; groupIndex++) {\n this.groups[groupIndex].refresh();\n }\n },\n _eventsByResource: function (events, resources, result) {\n var resource = resources[0];\n if (resource) {\n var view = resource.dataSource.view();\n for (var itemIdx = 0; itemIdx < view.length; itemIdx++) {\n var value = this._resourceValue(resource, view[itemIdx]);\n var eventsFilteredByResource = new kendo.data.Query(events).filter({\n field: resource.field,\n operator: SchedulerView.groupEqFilter(value)\n }).toArray();\n if (resources.length > 1) {\n this._eventsByResource(eventsFilteredByResource, resources.slice(1), result);\n } else {\n result.push(eventsFilteredByResource);\n }\n }\n } else {\n result.push(events);\n }\n },\n _isInDateSlot: function (event) {\n var startTime = event.start;\n var endTime = event.end;\n var rangeStart = getDate(this._startDate);\n var rangeEnd = kendo.date.addDays(getDate(this.visibleEndDate()), 1);\n if (startTime < rangeEnd && rangeStart <= endTime) {\n return true;\n }\n return false;\n },\n _isInTimeSlot: function (event) {\n var startTime = event._startTime || kendo.date.toUtcTime(event.start);\n var endTime = event._endTime || kendo.date.toUtcTime(event.end);\n var slotRanges = this._slotRanges;\n if (startTime === endTime) {\n endTime = endTime + 1;\n }\n for (var slotIndex = 0; slotIndex < slotRanges.length; slotIndex++) {\n if (startTime < slotRanges[slotIndex].end && slotRanges[slotIndex].start < endTime) {\n return true;\n }\n }\n return false;\n },\n _adjustEvent: function (event) {\n var start = event.start;\n var end = event.end;\n var eventStartTime = event._time('start');\n var eventEndTime = event._time('end');\n var startTime = getMilliseconds(this.startTime());\n var endTime = getMilliseconds(this.endTime());\n var adjustedStartDate = null;\n var adjustedEndDate = null;\n var occurrence;\n var head = false;\n var tail = false;\n if (event.isAllDay) {\n start = getDate(start);\n eventStartTime = 0;\n end = getDate(end);\n eventEndTime = MS_PER_DAY;\n adjustedEndDate = kendo.date.addDays(end, 1);\n }\n if (endTime === 0) {\n endTime = MS_PER_DAY;\n }\n if (endTime <= startTime) {\n if (eventStartTime < startTime && eventStartTime >= endTime) {\n adjustedStartDate = getDate(start);\n setTime(adjustedStartDate, startTime);\n tail = true;\n }\n if (eventEndTime > endTime && eventEndTime <= startTime) {\n adjustedEndDate = getDate(end);\n setTime(adjustedEndDate, endTime);\n head = true;\n }\n } else {\n if (startTime > eventStartTime) {\n adjustedStartDate = getDate(start);\n setTime(adjustedStartDate, startTime);\n tail = true;\n } else if (endTime <= eventStartTime) {\n adjustedStartDate = getDate(start);\n adjustedStartDate = kendo.date.addDays(adjustedStartDate, 1);\n setTime(adjustedStartDate, startTime);\n tail = true;\n }\n if (endTime < eventEndTime) {\n adjustedEndDate = getDate(end);\n setTime(adjustedEndDate, endTime);\n head = true;\n } else if (startTime > eventEndTime) {\n adjustedEndDate = getDate(end);\n adjustedEndDate = kendo.date.addDays(adjustedEndDate, -1);\n setTime(adjustedEndDate, endTime);\n head = true;\n }\n }\n occurrence = event.clone({\n start: adjustedStartDate ? adjustedStartDate : start,\n end: adjustedEndDate ? adjustedEndDate : end,\n _startTime: adjustedStartDate ? kendo.date.toUtcTime(adjustedStartDate) : event._startTime,\n _endTime: adjustedEndDate ? kendo.date.toUtcTime(adjustedEndDate) : event._endTime,\n isAllDay: false\n });\n return {\n occurrence: occurrence,\n head: head,\n tail: tail\n };\n },\n _renderEvents: function (events, groupIndex, eventGroup) {\n var event;\n var idx;\n var length;\n for (idx = 0, length = events.length; idx < length; idx++) {\n event = events[idx];\n if (this._isInDateSlot(event)) {\n var isMultiDayEvent = event.isAllDay || event.duration() >= MS_PER_DAY;\n var container = this.content;\n if (isMultiDayEvent || this._isInTimeSlot(event)) {\n var adjustedEvent = this._adjustEvent(event);\n var group = this.groups[groupIndex];\n if (!group._continuousEvents) {\n group._continuousEvents = [];\n }\n if (this._isInTimeSlot(adjustedEvent.occurrence)) {\n var ranges = group.slotRanges(adjustedEvent.occurrence, false);\n var range = ranges[0];\n var startIndex = range.start.index;\n var endIndex = range.end.index;\n this._groupedView._renderEvent(eventGroup, event, adjustedEvent, group, range, container, startIndex, endIndex);\n }\n }\n }\n }\n },\n addContinuousEvent: function (group, range, element, isAllDay) {\n var events = group._continuousEvents;\n events.push({\n element: element,\n isAllDay: isAllDay,\n uid: element.attr(kendo.attr('uid')),\n start: range.start,\n end: range.end\n });\n },\n _createEventElement: function (occurrence, event, head, tail) {\n var template = this.eventTemplate;\n var editable = this.options.editable;\n var isMobile = this._isMobile();\n var showDelete = editable && editable.destroy !== false && !isMobile;\n var resizable = editable && editable.resize !== false;\n var eventStartTime = event._time('start');\n var eventEndTime = event._time('end');\n var eventStartDate = event.start;\n var eventEndDate = event.end;\n var resources = this.eventResources(event);\n if (event._startTime && eventStartTime !== kendo.date.getMilliseconds(event.start)) {\n eventStartDate = new Date(eventStartTime);\n eventStartDate = kendo.timezone.apply(eventStartDate, 'Etc/UTC');\n }\n if (event._endTime && eventEndTime !== kendo.date.getMilliseconds(event.end)) {\n eventEndDate = new Date(eventEndTime);\n eventEndDate = kendo.timezone.apply(eventEndDate, 'Etc/UTC');\n }\n var data = extend({}, {\n ns: kendo.ns,\n resizable: resizable,\n showDelete: showDelete,\n head: head,\n tail: tail,\n singleDay: this._dates.length == 1,\n resources: resources,\n inverseColor: false,\n messages: this.options.messages\n }, event, {\n start: eventStartDate,\n end: eventEndDate\n });\n var element = $(template(data));\n this.angular('compile', function () {\n return {\n elements: element,\n data: [{ dataItem: data }]\n };\n });\n return element;\n },\n _arrangeRows: function (eventObject, slotRange, eventGroup) {\n var startIndex = slotRange.start.index;\n var endIndex = slotRange.end.index;\n var rect = eventObject.slotRange.innerRect(eventObject.start, eventObject.end, false);\n var rectRight = rect.right + this.options.eventMinWidth;\n var events = collidingEvents(slotRange.events(), rect.left, rectRight);\n slotRange.addEvent({\n slotIndex: startIndex,\n start: startIndex,\n end: endIndex,\n rectLeft: rect.left,\n rectRight: rectRight,\n element: eventObject.element,\n uid: eventObject.uid\n });\n events.push({\n start: startIndex,\n end: endIndex,\n uid: eventObject.uid\n });\n var rows = SchedulerView.createRows(events);\n if (eventGroup.maxRowCount < rows.length) {\n eventGroup.maxRowCount = rows.length;\n }\n for (var idx = 0, length = rows.length; idx < length; idx++) {\n var rowEvents = rows[idx].events;\n for (var j = 0, eventLength = rowEvents.length; j < eventLength; j++) {\n eventGroup.events[rowEvents[j].uid].rowIndex = idx;\n }\n }\n },\n _groupCount: function () {\n var resources = this.groupedResources;\n var groupedView = this._groupedView;\n if (resources.length) {\n if (this._groupOrientation() === 'vertical') {\n return groupedView._verticalCountForLevel(resources.length - 1);\n } else {\n return groupedView._horizontalCountForLevel(resources.length - 1, this.columnLevels.length - 1);\n }\n }\n return 1;\n },\n _updateEventForSelection: function (event) {\n var adjustedEvent = this._adjustEvent(event.clone());\n return adjustedEvent.occurrence;\n },\n _eventOptionsForMove: function (event) {\n if (event.isAllDay) {\n return { isAllDay: false };\n }\n return {};\n },\n _updateEventForResize: function (event) {\n if (event.isAllDay) {\n event.set('isAllDay', false);\n }\n },\n _updateMoveHint: function (event, groupIndex, distance) {\n var group = this.groups[groupIndex];\n var clonedEvent = event.clone({\n start: event.start,\n end: event.end\n });\n var eventDuraton = clonedEvent.duration();\n clonedEvent.start = new Date(clonedEvent.start.getTime() + distance);\n clonedEvent.end = new Date(+clonedEvent.start + eventDuraton);\n this._removeMoveHint(event.uid);\n if (this._isInDateSlot(clonedEvent)) {\n if (clonedEvent.isAllDay || clonedEvent.duration() >= MS_PER_DAY || this._isInTimeSlot(clonedEvent)) {\n var adjustedEvent = this._adjustEvent(clonedEvent);\n var ranges = group.slotRanges(adjustedEvent.occurrence, false);\n for (var rangeIndex = 0; rangeIndex < ranges.length; rangeIndex++) {\n this._groupedView._createMoveHint(ranges[rangeIndex], adjustedEvent);\n }\n }\n }\n },\n _appendMoveHint: function (hint) {\n hint.appendTo(this.content);\n this._moveHint = this._moveHint.add(hint);\n },\n _updateResizeHint: function (event, groupIndex, startTime, endTime) {\n var group = this.groups[groupIndex];\n var ranges = group.ranges(startTime, endTime, false, false);\n this._removeResizeHint();\n for (var rangeIndex = 0; rangeIndex < ranges.length; rangeIndex++) {\n var range = ranges[rangeIndex];\n var start = range.startSlot();\n var startRect = range.innerRect(startTime, endTime, false);\n startRect.top = start.offsetTop;\n var width = startRect.right - startRect.left;\n if (width < 0) {\n for (var i = 0; i < range.events().length; i++) {\n if (range.events()[i].uid === event.uid) {\n width = range.events()[i].rectRight - startRect.left;\n break;\n }\n }\n }\n var height = range.endSlot().offsetTop + start.offsetHeight - startRect.top;\n var left = this._adjustLeftPosition(startRect.left);\n var hint = SchedulerView.fn._createResizeHint.call(this, left, startRect.top, width, height);\n this._resizeHint = this._resizeHint.add(hint);\n }\n var format = 't';\n var container = this.content;\n this._resizeHint.appendTo(container);\n this._resizeHint.find('.k-label-top,.k-label-bottom').text('');\n this._resizeHint.first().addClass('k-first').find('.k-label-top').text(kendo.toString(kendo.timezone.toLocalDate(startTime), format));\n this._resizeHint.last().addClass('k-last').find('.k-label-bottom').text(kendo.toString(kendo.timezone.toLocalDate(endTime), format));\n },\n selectionByElement: function (cell) {\n var offset = cell.offset();\n return this._slotByPosition(offset.left, offset.top);\n },\n _updateDirection: function (selection, ranges, multiple, reverse, vertical) {\n var startSlot = ranges[0].start;\n var endSlot = ranges[ranges.length - 1].end;\n if (multiple && !vertical) {\n if (startSlot.index === endSlot.index && startSlot.collectionIndex === endSlot.collectionIndex) {\n selection.backward = reverse;\n }\n }\n },\n _changeGroup: function (selection, previous) {\n var method = previous ? 'prevGroupSlot' : 'nextGroupSlot';\n var slot = this[method](selection.start, selection.groupIndex, false);\n if (slot) {\n selection.groupIndex += previous ? -1 : 1;\n }\n this._groupedView._changeGroup(selection, previous, slot);\n return slot;\n },\n prevGroupSlot: function (date, groupIndex, isDay) {\n var group = this.groups[groupIndex];\n var slot = group.ranges(date, date, isDay, false)[0].start;\n if (groupIndex <= 0) {\n return;\n }\n return this._groupedView._prevGroupSlot(slot, group, isDay);\n },\n nextGroupSlot: function (date, groupIndex, isDay) {\n var group = this.groups[groupIndex];\n var slot = group.ranges(date, date, isDay, false)[0].start;\n if (groupIndex >= this.groups.length - 1) {\n return;\n }\n return this._groupedView._nextGroupSlot(slot, group, isDay);\n },\n _verticalSlots: function (selection, ranges, multiple, reverse) {\n var groupedView = this._groupedView;\n var method = groupedView._verticalMethod(reverse, multiple);\n var startSlot = ranges[0].start;\n var endSlot = ranges[ranges.length - 1].end;\n var group = this.groups[selection.groupIndex];\n var slot = groupedView._normalizeVerticalSelection(selection, ranges, reverse, multiple);\n if (slot) {\n startSlot = endSlot = slot;\n }\n startSlot = group[method](startSlot);\n endSlot = group[method](endSlot);\n if (!multiple && this._isVerticallyGrouped() && (!startSlot || !endSlot)) {\n startSlot = endSlot = groupedView._verticalSlots(selection, reverse, slot);\n }\n return {\n startSlot: startSlot,\n endSlot: endSlot\n };\n },\n _horizontalSlots: function (selection, ranges, multiple, reverse) {\n var method = reverse ? 'upSlot' : 'downSlot';\n var startSlot = ranges[0].start;\n var endSlot = ranges[ranges.length - 1].end;\n var group = this.groups[selection.groupIndex];\n var result = {};\n if (!multiple) {\n result = this._groupedView._horizontalSlots(selection, group, method, startSlot, endSlot, multiple, reverse);\n } else {\n result.startSlot = group[method](startSlot);\n result.endSlot = group[method](endSlot);\n if (!multiple && this._isHorizontallyGrouped() && (!startSlot || !endSlot)) {\n result.startSlot = result.endSlot = this._changeGroup(selection, reverse);\n }\n }\n return result;\n },\n _changeViewPeriod: function (selection, reverse) {\n var date = reverse ? this.previousDate() : this.nextDate();\n var start = selection.start;\n var end = selection.end;\n var newStart, newEnd;\n newStart = new Date(date);\n newEnd = new Date(date);\n if (this._isInRange(newStart, newEnd)) {\n return false;\n }\n selection.start = newStart;\n selection.end = newEnd;\n if (this._isHorizontallyGrouped()) {\n selection.groupIndex = reverse ? this.groups.length - 1 : 0;\n }\n var duration = end - start;\n if (reverse) {\n end = getMilliseconds(this.endTime());\n end = end === 0 ? MS_PER_DAY : end;\n setTime(selection.start, end - duration);\n setTime(selection.end, end);\n } else {\n start = getMilliseconds(this.startTime());\n setTime(selection.start, start);\n setTime(selection.end, start + duration);\n }\n selection.events = [];\n return true;\n },\n move: function (selection, key, shift) {\n var handled = false;\n var group = this.groups[selection.groupIndex];\n var keys = kendo.keys;\n var groupedView = this._groupedView;\n var ranges = group.ranges(selection.start, selection.end, false, false);\n var startSlot, endSlot, reverse, slots;\n if (key === keys.DOWN || key === keys.UP) {\n handled = true;\n reverse = key === keys.UP;\n groupedView._updateDirection(selection, ranges, shift, reverse);\n slots = this._verticalSlots(selection, ranges, shift, reverse);\n if (groupedView._changeVerticalViewPeriod(slots, shift, selection, reverse)) {\n return handled;\n }\n } else if (key === keys.LEFT || key === keys.RIGHT) {\n handled = true;\n reverse = key === keys.LEFT;\n this._updateDirection(selection, ranges, shift, reverse, false);\n slots = this._horizontalSlots(selection, ranges, shift, reverse);\n if (groupedView._changeHorizontalViewPeriod(slots, shift, selection, reverse)) {\n return handled;\n }\n }\n if (handled) {\n startSlot = slots.startSlot;\n endSlot = slots.endSlot;\n if (shift) {\n var backward = selection.backward;\n if (backward && startSlot) {\n selection.start = startSlot.startDate();\n } else if (!backward && endSlot) {\n selection.end = endSlot.endDate();\n }\n } else if (startSlot && endSlot) {\n selection.start = startSlot.startDate();\n selection.end = endSlot.endDate();\n }\n selection.events = [];\n }\n return handled;\n },\n destroy: function () {\n var that = this;\n if (that.element) {\n that.element.off(NS);\n }\n if (that.footer) {\n that.footer.remove();\n }\n if (that._currentTimeUpdateTimer) {\n clearInterval(that._currentTimeUpdateTimer);\n }\n SchedulerView.fn.destroy.call(this);\n if (this._isMobile() && that.options.editable) {\n if (that.options.editable.create !== false) {\n that._addUserEvents.destroy();\n }\n if (that.options.editable.update !== false) {\n that._editUserEvents.destroy();\n }\n }\n }\n });\n extend(true, ui, {\n TimelineView: TimelineView,\n TimelineWeekView: TimelineView.extend({\n options: {\n name: 'TimelineWeekView',\n title: 'Timeline Week',\n selectedDateFormat: '{0:D} - {1:D}',\n selectedShortDateFormat: '{0:d} - {1:d}',\n selectedMobileDateFormat: '{0:MMM dd} - {1:dd}',\n majorTick: 120\n },\n name: 'timelineWeek',\n calculateDateRange: function () {\n var selectedDate = this.options.date, start = kendo.date.dayOfWeek(selectedDate, this.calendarInfo().firstDay, -1), idx, length, dates = [];\n for (idx = 0, length = 7; idx < length; idx++) {\n dates.push(start);\n start = kendo.date.nextDay(start);\n }\n this._render(dates);\n }\n }),\n TimelineWorkWeekView: TimelineView.extend({\n options: {\n name: 'TimelineWorkWeekView',\n title: 'Timeline Work Week',\n selectedDateFormat: '{0:D} - {1:D}',\n selectedShortDateFormat: '{0:d} - {1:d}',\n selectedMobileDateFormat: '{0:MMM dd} - {1:dd}',\n majorTick: 120\n },\n name: 'timelineWorkWeek',\n nextDate: function () {\n var weekStart = kendo.date.dayOfWeek(kendo.date.nextDay(this.endDate()), this.calendarInfo().firstDay, 1);\n return kendo.date.addDays(weekStart, this._workDays[0]);\n },\n previousDate: function () {\n var weekStart = kendo.date.dayOfWeek(this.startDate(), this.calendarInfo().firstDay, -1);\n var workDays = this._workDays;\n return kendo.date.addDays(weekStart, workDays[workDays.length - 1] - 7);\n },\n calculateDateRange: function () {\n var options = this.options, selectedDate = options.date, dayOfWeek = kendo.date.dayOfWeek, weekStart = dayOfWeek(selectedDate, this.calendarInfo().firstDay, -1), start = dayOfWeek(weekStart, options.workWeekStart, 1), end = dayOfWeek(start, options.workWeekEnd, 1), dates = [], workDays = options.workDays && options.workDays.length ? options.workDays.map(function (day) {\n return dayOfWeek(weekStart, day, 1).getTime();\n }) : null;\n if (workDays) {\n start = weekStart;\n end = dayOfWeek(start, 6, 1);\n }\n while (start <= end) {\n if (workDays && workDays.indexOf(start.getTime()) > -1) {\n dates.push(start);\n } else if (!workDays) {\n dates.push(start);\n }\n start = kendo.date.nextDay(start);\n }\n this._render(dates);\n }\n }),\n TimelineMonthView: TimelineView.extend({\n options: {\n name: 'TimelineMonthView',\n title: 'Timeline Month',\n selectedDateFormat: '{0:D} - {1:D}',\n selectedShortDateFormat: '{0:d} - {1:d}',\n workDayStart: new Date(1980, 1, 1, 0, 0, 0),\n workDayEnd: new Date(1980, 1, 1, 23, 59, 59),\n footer: false,\n majorTick: 1440,\n minorTickCount: 1\n },\n name: 'timelineMonth',\n calculateDateRange: function () {\n var selectedDate = this.options.date, start = kendo.date.firstDayOfMonth(selectedDate), end = kendo.date.lastDayOfMonth(selectedDate), idx, length, dates = [];\n for (idx = 0, length = end.getDate(); idx < length; idx++) {\n dates.push(start);\n start = kendo.date.nextDay(start);\n }\n this._render(dates);\n }\n })\n });\n }(window.kendo.jQuery));\n return window.kendo;\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));"]}