UNPKG

@progress/kendo-ui

Version:

This package is part of the [Kendo UI for jQuery](http://www.telerik.com/kendo-ui) suite.

3 lines 40.3 kB
/* @license */ (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`kendo.core.min.js`),require(`kendo.toolbar.min.js`)):typeof define==`function`&&define.amd?define([`exports`,`kendo.core.min`,`kendo.toolbar.min`],t):(e=typeof globalThis<`u`?globalThis:e||self,t((e.kendo=e.kendo||{},e.kendo._globals=e.kendo._globals||{},e.kendo._globals.SchedulerView={}),e.kendo._globals.Core,e.kendo._globals.Toolbar))})(this,function(e,t,n){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});let r={id:`scheduler.view`,name:`Scheduler View`,category:`web`,description:`The Scheduler Common View`,depends:[`core`,`toolbar`],hidden:!0};kendo.ui.scheduler={},(function(e){var t=window.kendo,n=t.ui,r=t.date.getDate,i=n.Widget,a=t._outerHeight,o=t.keys,s=`.kendoSchedulerView`,c=`k-event-inverse`,l=`k-event-ongoing`,u=1024,d=Math,f=` `,p=`.`;function m(e,t){var n=[];function r(e,i){if(i=i[t],i)for(var a=n[e]=n[e]||[],o=0;o<i.length;o++)a.push(i[o]),r(e+1,i[o])}return r(0,e),n}function h(e,n){return e.length?`<table role="presentation" class="`+t.trim(`k-scheduler-table `+(n||``))+`"><tr>`+e.join(`</tr><tr>`)+`</tr></table>`:``}function g(e,n){return e.length?`<div ${t.attr(`style-position`)}="relative">${h(e,n)}</div>`:``}function _(t,n,r){var i=[];if(r>0)for(var a=0;a<t;a++)i.push(`<th class='k-scheduler-cell'>&#8203;</th>`);return n&&i.push(`<th class="k-scheduler-times-all-day k-scheduler-cell">`+n.text+`</th>`),r<1?e():e(`<div class="k-scheduler-times">`+h(i)+`</div>`)}function v(){return e(`<div class="k-scheduler-content"><table role="presentation" class="k-scheduler-table"></table></div>`)}var y=`<div class="k-marquee k-scheduler-marquee"><div class="k-marquee-color"></div><div class="k-marquee-text"><div class="k-label-top"></div><div class="k-label-bottom"></div></div></div>`,b=t.Class.extend({init:function(e,t,n){this._index=e,this._timeSlotCollections=[],this._daySlotCollections=[],this._isRtl=t,this._enforceAllDaySlot=n},addTimeSlotCollection:function(e,t){return this._addCollection(e,t,this._timeSlotCollections)},addDaySlotCollection:function(e,t){return this._addCollection(e,t,this._daySlotCollections)},_addCollection:function(e,t,n){var r=new w(e,t,this._index,n.length);return n.push(r),r},timeSlotCollectionCount:function(){return this._timeSlotCollections.length},daySlotCollectionCount:function(){return this._daySlotCollections.length},_refreshSlotCollections:function(){for(var e=[this._timeSlotCollections||[],this._daySlotCollections||[]],t=0;t<e.length;t++)for(var n=e[t],r=0;r<n.length;r++)n[r].refresh()},daySlotByPosition:function(e,t,n){return this._slotByPosition(e,t,this._daySlotCollections,n)},timeSlotByPosition:function(e,t,n){return this._slotByPosition(e,t,this._timeSlotCollections,n)},_slotByPosition:function(e,t,n,r){for(var i=0;i<n.length;i++)for(var a=n[i],o=0;o<a.count();o++){var s=a.at(o),c=s.offsetWidth,l=s.offsetHeight,u,d=s.offsetLeft+c,f=s.offsetTop+l;if(r||(u=a.at(o+1)),u&&(u.offsetLeft==s.offsetLeft?f=u.offsetTop:d=this._isRtl?s.offsetLeft+(s.offsetLeft-u.offsetLeft):u.offsetLeft),e>=s.offsetLeft&&e<d&&t>=s.offsetTop&&t<f)return s}},refresh:function(){var e;for(e=0;e<this._daySlotCollections.length;e++)this._daySlotCollections[e].refresh();for(e=0;e<this._timeSlotCollections.length;e++)this._timeSlotCollections[e].refresh()},timeSlotRanges:function(e,n){var r=this._timeSlotCollections,i=this._startSlot(e,r),a,o;!i.inRange&&e>=i.slot.end&&(a=i.slot.collectionIndex+1,i=null);var s=i;if(e<n&&(s=this._endSlot(n,r)),s&&!s.inRange&&n<=s.slot.start&&(o=s.slot.collectionIndex,n===s.slot.start&&(i&&o>i.slot.collectionIndex||o>a)&&--o,s=null),i===null&&s===null){if(n-e<t.date.MS_PER_DAY)return[];i={inRange:!0,slot:r[a].first()},s={inRange:!0,slot:r[o].last()}}if(i===null){if(s.slot.end<=e)return[];i={inRange:!0,slot:(r[a]||r[s.slot.collectionIndex]).first()}}if(s===null){if(i.slot.start>=n)return[];s={inRange:!0,slot:(r[o]||r[i.slot.collectionIndex]).last()}}return this._continuousRange(S,r,i,s)},daySlotRanges:function(e,n,r){var i=this._daySlotCollections,a=this._startSlot(e,i,r);!a.inRange&&e>=a.slot.end&&(a=null);var o=a;if(e<n&&(o=this._endSlot(n,i,r)),o&&!o.inRange&&n<=o.slot.start&&(o=null),a===null&&o===null)return[];if(a===null){if(o.slot.end<=e)return[];do e+=t.date.MS_PER_DAY,a=this._startSlot(e,i,r);while(!a.inRange&&e>=a.slot.end)}if(o===null){if(a.slot.start>=n)return[];do n-=t.date.MS_PER_DAY,o=this._endSlot(n,i,r);while(!o.inRange&&n<=o.slot.start)}return this._continuousRange(C,i,a,o)},_continuousRange:function(e,t,n,r){for(var i=n.slot,a=r.slot,o=i.collectionIndex,s=a.collectionIndex,c=[],l=o;l<=s;l++){var u=t[l],d=u.first(),f=u.last(),p=!1,m=!1;l==o&&(m=!n.inRange),l==s&&(p=!r.inRange),d.start<i.start&&(d=i),f.start>a.start&&(f=a),o<s&&(l==o?p=!0:l==s?m=!0:p=m=!0),c.push(new e({start:d,end:f,collection:u,head:p,tail:m}))}return c},slotRanges:function(e,n){var r=e._startTime||t.date.toUtcTime(e.start),i=e._endTime||t.date.toUtcTime(e.end);return n===void 0&&(n=this._enforceAllDaySlot?e.isMultiDay():e.isAllDay),n?this.daySlotRanges(r,i,e.isAllDay):this.timeSlotRanges(r,i)},ranges:function(e,n,r,i){return typeof e!=`number`&&(e=t.date.toUtcTime(e)),typeof n!=`number`&&(n=t.date.toUtcTime(n)),r?this.daySlotRanges(e,n,i):this.timeSlotRanges(e,n)},_startCollection:function(e,t){for(var n=0;n<t.length;n++){var r=t[n];if(r.startInRange(e))return r}return null},_endCollection:function(e,t,n){for(var r=0;r<t.length;r++){var i=t[r];if(i.endInRange(e,n))return i}return null},_getCollections:function(e){return e?this._daySlotCollections:this._timeSlotCollections},continuousSlot:function(e,t){var n=t?-1:1,r=this._getCollections(e.isDaySlot)[e.collectionIndex+n];return r?r[t?`last`:`first`]():void 0},firstSlot:function(){return this._getCollections(this.daySlotCollectionCount())[0].first()},lastSlot:function(){var e=this._getCollections(this.daySlotCollectionCount());return e[e.length-1].last()},upSlot:function(e,t,n){var r=this;return this.timeSlotCollectionCount()||(t=!0),this._verticalSlot(e,-1,function(e,n,i){if(!t&&!e&&i===0&&r.daySlotCollectionCount())return r._daySlotCollections[0].at(n)},n)},downSlot:function(e,t,n){var r=this;return this.timeSlotCollectionCount()||(t=!0),this._verticalSlot(e,1,function(e,n,i){if(!t&&e&&r.timeSlotCollectionCount())return r._timeSlotCollections[i].at(0)},n)},leftSlot:function(e,t){return this._horizontalSlot(e,-1,t)},rightSlot:function(e,t){return this._horizontalSlot(e,1,t)},_horizontalSlot:function(e,t,n){var r=e.index,i=e.isDaySlot,a=e.collectionIndex,o=this._getCollections(i);i=n?!1:i,i?r+=t:a+=t;var s=o[a];return s?s.at(r):void 0},_verticalSlot:function(e,t,n,r){var i=e.index,a=e.isDaySlot,o=e.collectionIndex,s=this._getCollections(a);if(e=n(a,o,i),e)return e;a=r?!1:a,a?o+=t:i+=t;var c=s[o];return c?c.at(i):void 0},_collection:function(e,t){return(t?this._daySlotCollections:this._timeSlotCollections)[e]},_startSlot:function(e,t,n){var r=this._startCollection(e,t),i=!0,a=0;if(!r){for(r=t[a];a<t.length-1&&r._start<e;)a++,r=t[a];i=!1}var o=r.slotByStartDate(e,n);return o||(o=r.first(),i=!1),{slot:o,inRange:i}},_endSlot:function(e,t,n){var r=this._endCollection(e,t,n),i=!0,a=t.length-1;if(!r){for(r=t[a];a>0&&r._start>e;)a--,r=t[a];i=!1}var o=r.slotByEndDate(e,n);return o||(o=e<=r.first().start?r.first():r.last(),i=!1),{slot:o,inRange:i}},getSlotCollection:function(e,t){return this[t?`getDaySlotCollection`:`getTimeSlotCollection`](e)},getTimeSlotCollection:function(e){return this._timeSlotCollections[e]},getDaySlotCollection:function(e){return this._daySlotCollections[e]}}),x=t.Class.extend({init:function(t){e.extend(this,t)},innerHeight:function(){for(var e=this.collection,t=this.start.index,n=this.end.index,r=0,i=t;i<=n;i++)r+=e.at(i).offsetHeight;return r},events:function(){return this.collection.events()},addEvent:function(e){this.events().push(e)},startSlot:function(){return this.start.offsetLeft>this.end.offsetLeft?this.end:this.start},endSlot:function(){return this.start.offsetLeft>this.end.offsetLeft?this.start:this.end}}),S=x.extend({innerHeight:function(){for(var e=this.collection,t=this.start.index,n=this.end.index,r=0,i=t;i<=n;i++)r+=e.at(i).offsetHeight;return r},outerRect:function(e,t,n){return this._rect(`offset`,e,t,n)},_rect:function(e,n,r,i){var a,o,s,c,l=this.start,u=this.end,d=t.support.isRtl(l.element);if(typeof n!=`number`&&(n=t.date.toUtcTime(n)),typeof r!=`number`&&(r=t.date.toUtcTime(r)),i)a=l.offsetTop,o=u.offsetTop+u[e+`Height`],d?(s=u.offsetLeft,c=l.offsetLeft+l[e+`Width`]):(s=l.offsetLeft,c=u.offsetLeft+u[e+`Width`]);else{var f=n-l.start;f<0&&(f=0);var p=l.end-l.start;a=l.offsetTop+l[e+`Height`]*f/p;var m=u.end-r;m<0&&(m=0);var h=u.end-u.start;o=u.offsetTop+u[e+`Height`]-u[e+`Height`]*m/h,d?(s=Math.round(u.offsetLeft+u[e+`Width`]*m/h),c=Math.round(l.offsetLeft+l[e+`Width`]-l[e+`Width`]*f/p)):(s=Math.round(l.offsetLeft+l[e+`Width`]*f/p),c=Math.round(u.offsetLeft+u[e+`Width`]-u[e+`Width`]*m/h))}return{top:a,bottom:o,left:s===0?s:s+1,right:c}},innerRect:function(e,t,n){return this._rect(`client`,e,t,n)}}),C=x.extend({innerWidth:function(){for(var e=this.collection,t=this.start.index,n=this.end.index,r=0,i=t===n?`clientWidth`:`offsetWidth`,a=t;a<=n;a++)r+=e.at(a)[i];return r}}),w=t.Class.extend({init:function(e,n,r,i){this._slots=[],this._events=[],this._start=t.date.toUtcTime(e),this._end=t.date.toUtcTime(n),this._groupIndex=r,this._collectionIndex=i},refresh:function(){for(var e=0;e<this._slots.length;e++)this._slots[e].refresh()},startInRange:function(e){return this._start<=e&&e<this._end},endInRange:function(e,t){var n=t?e<this._end:e<=this._end;return this._start<=e&&n},slotByStartDate:function(e){var n=e;typeof n!=`number`&&(n=t.date.toUtcTime(e));for(var r=0;r<this._slots.length;r++){var i=this._slots[r];if(i.startInRange(n))return i}return null},slotByEndDate:function(e,n){var r=e;if(typeof r!=`number`&&(r=t.date.toUtcTime(e)),n)return this.slotByStartDate(e,!1);for(var i=0;i<this._slots.length;i++){var a=this._slots[i];if(a.endInRange(r))return a}return null},count:function(){return this._slots.length},events:function(){return this._events},addTimeSlot:function(e,t,n,r){var i=new E(e,t,n,this._groupIndex,this._collectionIndex,this._slots.length,r);this._slots.push(i)},addDaySlot:function(e,t,n,r){var i=new D(e,t,n,this._groupIndex,this._collectionIndex,this._slots.length,r);this._slots.push(i)},first:function(){return this._slots[0]},last:function(){return this._slots[this._slots.length-1]},at:function(e){return this._slots[e]}}),T=t.Class.extend({init:function(e,t,n,r,i,a){this.element=e,this.clientWidth=e.clientWidth,this.clientHeight=e.clientHeight,this.offsetWidth=e.offsetWidth,this.offsetHeight=e.offsetHeight,this.offsetTop=e.offsetTop,this.offsetLeft=e.offsetLeft,this.start=t,this.end=n,this.element=e,this.groupIndex=r,this.collectionIndex=i,this.index=a,this.isDaySlot=!1},refresh:function(){var e=this.element;this.clientWidth=e.clientWidth,this.clientHeight=e.clientHeight,this.offsetWidth=e.offsetWidth,this.offsetHeight=e.offsetHeight,this.offsetTop=e.offsetTop,this.offsetLeft=e.offsetLeft},startDate:function(){return t.timezone.toLocalDate(this.start)},endDate:function(){return t.timezone.toLocalDate(this.end)},startInRange:function(e){return this.start<=e&&e<this.end},endInRange:function(e){return this.start<e&&e<=this.end},startOffset:function(){return this.start},endOffset:function(){return this.end}}),E=T.extend({init:function(e,t,n,r,i,a,o){T.fn.init.apply(this,arguments),this.isHorizontal=!!o},offsetX:function(e,t){return this.offsetLeft+t},startInRange:function(e){return this.start<=e&&e<this.end},endInRange:function(e){return this.start<e&&e<=this.end},startOffset:function(n,r,i){if(i)return this.start;var a=e(this.element).offset(),o=this.end-this.start,s,c;if(this.isHorizontal){var l=t.support.isRtl(this.element);if(s=n-a.left,c=Math.floor(o*(s/this.offsetWidth)),l)return this.start+o-c}else s=r-a.top,c=Math.floor(o*(s/this.offsetHeight));return this.start+c},endOffset:function(n,r,i){if(i)return this.end;var a=e(this.element).offset(),o=this.end-this.start,s,c;if(this.isHorizontal){var l=t.support.isRtl(this.element);if(s=n-a.left,c=Math.floor(o*(s/this.offsetWidth)),l)return this.start+o-c}else s=r-a.top,c=Math.floor(o*(s/this.offsetHeight));return this.start+c}}),D=T.extend({init:function(e,t,n,r,i,a,o){if(T.fn.init.apply(this,arguments),this.eventCount=o,this.isDaySlot=!0,this.element.children.length){var s=this.element.children[0];this.firstChildHeight=s.offsetHeight,this.firstChildTop=s.offsetTop}else this.firstChildHeight=3,this.firstChildTop=0},startDate:function(){var e=new Date(this.start);return t.timezone.apply(e,`Etc/UTC`)},endDate:function(){var e=new Date(this.end);return t.timezone.apply(e,`Etc/UTC`)},startInRange:function(e){return this.start<=e&&e<this.end},endInRange:function(e){return this.start<e&&e<=this.end}});t.ui.SchedulerView=i.extend({init:function(n,r){i.fn.init.call(this,n,e.extend({},this.options,r)),this._normalizeOptions(),this._initDefaultTools(),this._scrollbar=t.support.scrollbar(),this._isRtl=t.support.isRtl(n),this._resizeHint=e(),this._moveHint=e(),this._cellId=t.guid(),this._resourcesForGroups(),this._selectedSlots=[],this.element.attr(`role`,`application`)},options:{messages:{ariaEventLabel:{on:`on`,at:`at`,to:`to`,allDay:`(all day)`,prefix:``}}},visibleEndDate:function(){return this.endDate()},_initDefaultTools:function(){this._defaultTools={todayMobile:{type:`button`,fillMode:`flat`,text:this.options.messages.today,click:this._footerTodayClickHandler.bind(this),attributes:{class:`k-scheduler-today`}},fulldayDesktop:{type:`button`,icon:`clock`,text:this.options.showWorkHours?this.options.messages.showFullDay:this.options.messages.showWorkDay,click:this.toggleFullDay?this.toggleFullDay.bind(this):e.noop,attributes:{class:`k-scheduler-fullday`}},fulldayMobile:{type:`button`,fillMode:`flat`,text:this.options.showWorkHours?this.options.messages.showFullDay:this.options.messages.showWorkDay,click:this.toggleFullDay?this.toggleFullDay.bind(this):e.noop,attributes:{class:`k-scheduler-fullday`}}}},_normalizeOptions:function(){var e=this.options;e.startTime&&e.startTime.setMilliseconds(0),e.endTime&&e.endTime.setMilliseconds(0),e.workDayStart&&e.workDayStart.setMilliseconds(0),e.workDayEnd&&e.workDayEnd.setMilliseconds(0)},_isMobile:function(){var e=this.options;return e.mobile===!0&&t.support.mobileOS||e.mobile===`phone`||e.mobile===`tablet`},_addResourceView:function(){var e=new b(this.groups.length,this._isRtl,this.options.enforceAllDaySlot);return this.groups.push(e),e},_refreshResourceViews:function(){var e=this.groups;if(e)for(var t=0;t<e.length;t++)e[t]._refreshSlotCollections()},dateForTitle:function(){return t.format(this.options.selectedDateFormat,this.startDate(),this.endDate())},shortDateForTitle:function(){return t.format(this.options.selectedShortDateFormat,this.startDate(),this.endDate())},mobileDateForTitle:function(){return t.format(this.options.selectedMobileDateFormat||this.options.selectedShortDateFormat,this.startDate(),this.endDate())},_changeGroup:function(e,t){var n=this[t?`prevGroupSlot`:`nextGroupSlot`](e.start,e.groupIndex,e.isAllDay);return n&&(e.groupIndex+=t?-1:1),this._isGroupedByDate()&&!n&&(e.groupIndex=t?this.groups.length-1:0),n},_changeDate:function(e,t,n){var r=this.groups[e.groupIndex],i,a;if(n){if(i=r._getCollections(!1),a=r.daySlotCollectionCount()?t.index-1:t.collectionIndex-1,a>=0)return i[a]._slots[i[a]._slots.length-1]}else{i=r._getCollections(r.daySlotCollectionCount()),a=r.daySlotCollectionCount()?0:t.collectionIndex+1;var o=r.daySlotCollectionCount()?t.collectionIndex+1:0;if(i[a]&&i[a]._slots[o])return i[a]._slots[o]}},_changeGroupContinuously:function(){return null},_changeViewPeriod:function(){return!1},_isInRange:function(e,t){return!e||!t||!this.options.min||!this.options.max?!1:r(e)<=r(this.options.min)||r(t)>=r(this.options.max)},_horizontalSlots:function(e,t,n,r){var i=r?`leftSlot`:`rightSlot`,a={startSlot:t[0].start,endSlot:t[t.length-1].end},o=this.groups[e.groupIndex],s=this._isVerticallyGrouped();if(!n){var c=this._normalizeHorizontalSelection(e,t,r);c&&(a.startSlot=a.endSlot=c)}if(this._isGroupedByDate()&&!n){var l=this._changeGroup(e,r);l?a.startSlot=a.endSlot=l:a=this._getNextHorizontalRange(o,i,a)}else a.startSlot=o[i](a.startSlot),a.endSlot=o[i](a.endSlot),!n&&!s&&(!a.startSlot||!a.endSlot)&&(a.startSlot=a.endSlot=this._changeGroup(e,r));var u;return(!a.startSlot||!a.endSlot)&&!this._isGroupedByDate()&&(u=this._continuousSlot(e,t,r),u=this._changeGroupContinuously(e,u,n,r),u&&(a.startSlot=a.endSlot=u)),a},_getNextHorizontalRange:function(e,t,n){return this._isVerticallyGrouped()||(n.startSlot=e[t](n.startSlot),n.endSlot=e[t](n.endSlot)),n},_verticalSlots:function(e,t,n,r){var i=this.groups[e.groupIndex],a,o={startSlot:t[0].start,endSlot:t[t.length-1].end};n||(a=this._normalizeVerticalSelection(e,t,r),a&&(o.startSlot=o.endSlot=a));var s=r?`upSlot`:`downSlot`;return o=this._getNextVerticalRange(i,s,o,n),!n&&this._isVerticallyGrouped()&&(!o.startSlot||!o.endSlot)&&(this._isGroupedByDate()?o.startSlot=o.endSlot=this._changeDate(e,a,r):o.startSlot=o.endSlot=this._changeGroup(e,r)),o},_getNextVerticalRange:function(e,t,n,r){return n.startSlot=e[t](n.startSlot,r),n.endSlot=e[t](n.endSlot,r),n},_normalizeHorizontalSelection:function(){return null},_normalizeVerticalSelection:function(e,t,n){return n?t[0].start:t[t.length-1].end},_continuousSlot:function(){return null},_footerTodayClickHandler:function(e){e.preventDefault();var n=this,r=n.options,i=n.options.timezone,a=`today`,o=new Date,s;if(i){var c=t.timezone.offset(o,i);s=t.timezone.convert(o,o.getTimezoneOffset(),c)}else s=o;n.trigger(`navigate`,{view:n.name||r.name,action:a,date:s})},_footerItems:function(){var e=this,t=[],n=this.options;return e._isMobile()&&t.push({type:`button`,fillMode:`flat`,text:n.messages.today,click:e._footerTodayClickHandler.bind(e),attributes:{class:`k-scheduler-today`}}),t},_footer:function(){if(this.options.footer!==!1){var t=this,n=t._footerItems();n.length>0&&(t.footer=e(`<div class="k-scheduler-footer">`).appendTo(t.element),t.footer.kendoToolBar({resizable:!1,items:n}))}},constrainSelection:function(e){var t=this.groups[0],n;this.inRange(e)?t.daySlotCollectionCount()?t.timeSlotCollectionCount()||(e.isAllDay=!0):e.isAllDay=!1:(n=t.firstSlot(),e.isAllDay=n.isDaySlot,e.start=n.startDate(),e.end=n.endDate()),this.groups[e.groupIndex]||(e.groupIndex=0)},move:function(e,t,n){var r=!1,i=this.groups[e.groupIndex],a=this._isGroupedByDate()&&this._isVerticallyGrouped();i.timeSlotCollectionCount()||(e.isAllDay=!0);var s=i.ranges(e.start,e.end,e.isAllDay,!1),c,l,u,d;if(t===o.DOWN||t===o.UP){if(r=!0,u=t===o.UP,this._updateDirection(e,s,n,u,!0),d=this._verticalSlots(e,s,n,u),!d.startSlot&&!n&&this._changeViewPeriod(e,u,!a))return r}else if((t===o.LEFT||t===o.RIGHT)&&(r=!0,u=t===o.LEFT,this._updateDirection(e,s,n,u,!1),d=this._horizontalSlots(e,s,n,u),!d.startSlot&&!n&&this._changeViewPeriod(e,u,a)))return r;if(r){if(c=d.startSlot,l=d.endSlot,n){var f=e.backward;f&&c?e.start=c.startDate():!f&&l&&(e.end=l.endDate())}else c&&l&&(e.isAllDay=c.isDaySlot,e.start=c.startDate(),e.end=l.endDate());e.events=[]}return r},moveToEventInGroup:function(t,n,r,i){var a=t._continuousEvents||[],o,s=i?-1:1,c=a.length,l=i?c-1:0,u,d;if(r.length)if(d=r[r.length-1],i)for(u=0;u<a.length;u++)a[u].uid===d&&(l=u+s);else for(u=a.length-1;u>-1;u--)a[u].uid===d&&(l=u+s);for(;l<c&&l>-1&&(o=a[l],!((!i&&o.start.startDate()>=n.startDate()||i&&o.start.startDate()<=n.startDate())&&o&&e.inArray(o.uid,r)===-1));)l+=s;return o},moveToEvent:function(e,t){var n=e.groupIndex,r=this.groups[n],i=r.ranges(e.start,e.end,this.name===`month`||e.isAllDay,!1)[0].start,a=this.groups.length,o=t?-1:1,s=e.events,c;if(this._isGroupedByDate()){var l=this._getAllEvents(),u=this._getUniqueEvents(l),d=this._getSortedEvents(u);if(s.length===0){var f=this._getNextEventIndexBySlot(i,d,n);t&&f--,c=d[f]}else for(var p=this._getStartIdx(s,d);p<d.length&&p>-1&&(s.length>0&&(i=this._getSelectedSlot(i,d,c,p,o,t)),i);){if((!t&&d[p].start.startDate()>=i.startDate()||t&&d[p].start.startDate()<=i.startDate())&&s[0]!=d[p].uid){c=d[p];break}p+=o}}else for(;n<a&&n>-1&&(c=this.moveToEventInGroup(r,i,s,t),n+=o,r=this.groups[n],!(!r||c));)s=[],i=t?r.lastSlot():r.firstSlot(!0);return c&&(e.events=[c.uid],e.start=c.start.startDate(),e.end=c.end.endDate(),e.isAllDay=c.start.isDaySlot,e.groupIndex=c.start.groupIndex,e.eventElement=c.element[0]),!!c},current:function(e){if(e!==void 0)this._current=e,this.content.has(e)&&this._scrollTo(e,this.content[0]);else return this._current},select:function(e){this.clearSelection(),this._selectEvents(e)||this._selectSlots(e)},_getNextEventIndexBySlot:function(e,n,r){for(var i=0,a=t.date.getDate(e.startDate()),o=0;o<n.length;o++){var s=t.date.getDate(n[o].start.startDate());if(a>s){i++;continue}if(a.getTime()===s.getTime()&&r>n[o].start.groupIndex){i++;continue}if(a.getTime()===s.getTime()&&r>=n[o].start.groupIndex&&e.startDate()>n[o].start.startDate()){i++;continue}break}return i},_getSelectedSlot:function(e,t,n,r,i,a){if(t[r+i]&&t[r].start.groupIndex!==t[r+i].start.groupIndex){var o=t[r+i].start.groupIndex,s=this.groups[o];(!s||n)&&(e=null),e=a?s.lastSlot():s.firstSlot(!0)}return e},_getStartIdx:function(t,n){var r=0;return e.each(n,function(){if(this.uid===t[0])return!1;r++}),r},_getAllEvents:function(){for(var e=[],t=this.groups,n=0;n<t.length;n++)t[n]._continuousEvents&&(e=e.concat(t[n]._continuousEvents));return e},_getUniqueEvents:function(e){for(var t=[],n=0;n<e.length;n++){for(var r=!1,i=0;i<t.length;i++)if(e[n].uid===t[i].uid){r=!0;break}r||t.push(e[n])}return t},_getSortedEvents:function(n){return n.sort(function(n,r){var i=n.start.startDate(),a=r.start.startDate(),o=t.date.getDate(i)-t.date.getDate(a);return o===0&&(o=n.start.groupIndex-r.start.groupIndex),o===0&&(o=i.getTime()-a.getTime()),o===0&&(n.start.isDaySlot&&!r.start.isDaySlot&&(o=-1),!n.start.isDaySlot&&r.start.isDaySlot&&(o=1)),o===0&&(o=e(n.element).index()-e(r.element).index()),o})},_selectSlots:function(e){var t=e.isAllDay,n=this.groups[e.groupIndex];n.timeSlotCollectionCount()||(t=!0),this._selectedSlots=[];for(var r=n.ranges(e.start,e.end,t,!1),i,a,o=0;o<r.length;o++)for(var s=r[o],c=s.collection,l=s.start.index;l<=s.end.index;l++)a=c.at(l),i=a.element,z(i),this._selectedSlots.push({start:a.startDate(),end:a.endDate(),element:i});e.backward&&(i=r[0].start.element),this.current(i)},_selectEvents:function(t){var n=!1,r=t.events,i=this._getAllEvents(),a,o,s=i.length;if(!r[0]||!i[0])return n;var c=e();for(t.events=[],a=0;a<s;a++)e.inArray(i[a].uid,r)>-1&&(o=i[a],c=c.add(o.element),t.events.indexOf(o.uid)===-1&&t.events.push(o.uid));return c[0]&&(c.addClass(`k-selected`),t.eventElement?this.current(t.eventElement):this.current(c.last()[0]),this._selectedSlots=[],n=!0),n},inRange:function(e){var n=this.startDate(),r=t.date.addDays(this.endDate(),1),i=e.start,a=e.end;return n<=i&&i<r&&n<a&&a<=r},_resourceValue:function(e,n){return e.valuePrimitive&&(n=t.getter(e.dataValueField)(n)),n},_setResourceValue:function(e,n,r){var i=e.value,a;n.multiple&&(i=[i]),a=t.setter(n.field),a(r,i)},_resourceBySlot:function(e){var t=this.groupedResources,n={};if(t.length){var r=e.groupIndex,i=this.options.group,a=i.date||i.orientation===`horizontal`?`columns`:`rows`,o=a===`rows`?this.rowLevels:this.columnLevels,s=i.date&&i.orientation===`horizontal`?1:0,c=o[t.length-1+s],l=t[t.length-1],u=c[r],d,f,p,m;for(this._setResourceValue(u,l,n),p=t.length-2;p>=0;p--)for(c=o[p+s],l=t[p],d=0,m=0;m<c.length;m++)if(u=c[m],f=u[a].length,f>r-d){this._setResourceValue(u,l,n);break}else d+=f}return n},_createResizeHint:function(t,n,r,i){return e(y).css({left:t,top:n,width:r,height:i})},_removeResizeHint:function(){this._resizeHint.remove(),this._resizeHint=e()},_removeMoveHint:function(t){t?(this._moveHint.filter(`[data-uid='`+t+`']`).remove(),this._moveHint=this._moveHint.filter(`[data-uid!='`+t+`']`)):(this._moveHint.remove(),this._moveHint=e())},_scrollTo:function(e,t){var n=e.offsetTop,r=e.offsetHeight,i=t.scrollTop,a=t.clientHeight,o=n+r,s=0;s=i>n?n:o>i+a?r<=a?o-a:n:i,t.scrollTop=s},_inverseEventColor:function(e){new N(e.css(`color`)).isDark()==new N(e.css(`background-color`)).isDark()&&e.addClass(c)},_eventTmpl:function(n,r){var i=this.options,a=e.extend({},t.Template,i.templateSettings),o=a.paramName,s=``,c=typeof n,l={storage:{},count:0};c===`function`?(l.storage[`tmpl`+l.count]=n,s+=`#=this.tmpl`+l.count+`(`+o+`)#`,l.count++):c===`string`&&(s+=n);var u=t.template(t.format(r,s),a);return l.count>0&&(u=u.bind(l.storage)),u},eventResources:function(e){var n=[],r=this.options;if(!r.resources)return n;for(var i=0;i<r.resources.length;i++){var a=r.resources[i],o=a.field,s=t.getter(o)(e);if(s!=null){a.multiple||(s=[s]);for(var c=a.dataSource.view(),l=0;l<s.length;l++){var u=null,d=s[l];a.valuePrimitive||(d=t.getter(a.dataValueField)(d));for(var f=0;f<c.length;f++)if(c[f].get(a.dataValueField)==d){u=c[f];break}if(u!==null){var p=t.getter(a.dataColorField)(u);n.push({field:a.field,title:a.title,name:a.name,text:t.getter(a.dataTextField)(u),value:d,color:p})}}}}return n},createLayout:function(n){var r=-1;n.rows||=[];for(var i=0;i<n.rows.length;i++)if(n.rows[i].allDay){r=i;break}var a=n.rows[r];r>=0&&n.rows.splice(r,1);var o=this.columnLevels=m(n,`columns`),s=this.rowLevels=m(n,`rows`);this._isVirtualized()&&this._trimRowLevels(s),this.table=e(`<table role="presentation" class="k-scheduler-layout k-scheduler-`+this.name+`view"><tbody></tbody></table>`);var c=s[s.length-1].length;this.table.find(`tbody`).first().append(this._topSection(o,a,c)),this.table.find(`tbody`).first().append(this._bottomSection(s,c)),this.element.append(this.table),this._isVirtualized()&&this._updateDomRowLevels(),this._isMobile()&&o.length>1&&this._groupOrientation()===`horizontal`&&t._outerWidth(e(window))<u&&(this.table.find(`.k-scheduler-content .k-scheduler-table`).width(o[o.length-2].length*100+`%`),this.table.find(`.k-scheduler-header .k-scheduler-table`).width(o[o.length-2].length*100+`%`)),this._scroller()},_isVirtualized:function(){return this.options.virtual&&this.rowLevels.length>1&&this._isVerticallyGrouped()},_trimRowLevels:function(e){var t=e[e.length-2],n=this.cachedRowLevels||[],r;this._hasContentToRender=!0;for(var i=function(e,t){var n=e[t-1].length>0,r,i;return n?(r=e[t-1][0],i=e[t][0].parentValue,r.value!==i):!0},a=e.length-2;a>=0;a--){var o=!1;if(a>0&&i(e,a)&&(o=!0,r=a),n[a]=e[a].splice(1),a<e.length-2&&e[a][0].rows.length!=1&&(e[a][0].rows=e[a+1]),o)break}return n[e.length-1]=e[e.length-1].splice(t[0].rows.length),this.cachedRowLevels=n,n[n.length-1].length||(this._hasContentToRender=!1),{levelMarker:r||0,rowLevels:e}},createNextLayout:function(){for(var e=[],t,n,r,i,a=0;a<this.cachedRowLevels.length;a++)e[a]=this.cachedRowLevels[a];t=this._trimRowLevels(e),n=t.rowLevels.splice(t.levelMarker),r=t.levelMarker,i=n[n.length-1].length,delete this._height;for(var o=r;o<this.rowLevels.length;o++)this.rowLevels[o]=this.rowLevels[o].concat(n[o-r]);if(this._cachedVirtualSlotIndex=this.rowLevels[0].length,this.table.find(`.k-scheduler-times`).last().find(`tbody`).append(this._times(n,i,this._isMobile()).find(`tr`)),this._updateDomRowLevels(),r>0)for(o=0;o<r;o++){var s=this.table.find(`[data-row-level=`+o+`]`).last(),c=parseInt(s.attr(`rowspan`),10)+i;s.attr(`rowspan`,c)}this._virtualContent(n,this.columnLevels),this.render(this._cachedEvents)},_tryRenderContent:function(){for(var e=this,t=e.table.innerHeight(),n=e.content.find(`table`).innerHeight(),r=e.content.scrollTop();e._hasContentToRender&&n-t<r;)e.createNextLayout(),n=e.content.find(`table`).innerHeight()},_isSchedulerHeightSet:function(){var e=this.element,t,n;return e[0].style.height?!0:(t=e.height(),e.height(`auto`),n=e.height(),t==n?(e.height(``),!1):(e.height(``),!0))},_updateDomRowLevels:function(){var t=this.times.find(`.k-group-cell:not([data-row-level])`);if(!this._rowLevelIndices){this._rowLevelIndices=t.map(function(t,n){return e(n).attr(`data-row-level`,t),t}).toArray().reverse();return}t=t.toArray().reverse();for(var n=0;n<=t.length;n++)e(t[n]).attr(`data-row-level`,this._rowLevelIndices[n])},refreshLayout:function(){for(var n=this,r=n.element.find(`> .k-scheduler-toolbar`),i=n.element.innerHeight(),o=n._scrollbar=t.support.scrollbar(!0),s=0,c=this._isRtl?`left`:`right`,l=0;l<r.length;l++)i-=a(r.eq(l));if(n.datesHeader&&(s=a(n.datesHeader)),n.timesHeader&&a(n.timesHeader)>s&&(s=a(n.timesHeader)),n.content&&n.content.find(`.k-scheduler-table td`).addClass(`k-scheduler-cell`),n.datesHeader&&n.timesHeader){var u=n.datesHeader.find(`table`).first().find(`tr`);n.timesHeader.find(`tr`).height(function(t){e(this).height(u.eq(t).height())})}s&&(i-=s),n.footer&&(i-=a(n.footer));var d=n.content[0],f=t.support.kineticScrollNeeded?0:o;if(this._isSchedulerHeightSet()&&(i>o*2?n.content.height(i):n.content.height(o*2+1),n.times)){n.times.height(d.clientHeight);var p=n.times.find(`table`);p.length&&p.height(n.content.find(`table`)[0].clientHeight)}n.table&&(d.offsetWidth-d.clientWidth>0?(n.table.addClass(`k-scrollbar-v`),n.datesHeader.css(`padding-`+c,f-parseInt(n.datesHeader.children().css(`border-`+c+`-width`),10))):n.datesHeader.css(`padding-`+c,`0`),d.offsetHeight-d.clientHeight>0||d.clientHeight>n.content.children(`.k-scheduler-table`).height()?n.table.addClass(`k-scrollbar-h`):n.table.removeClass(`k-scrollbar-h`)),n._refreshResourceViews()},_topSection:function(t,n,r){var i=e(`<tr class='k-scheduler-head'>`);this.timesHeader=_(t.length,n,r),this.datesHeader=this._datesHeader(t,n);var a=this.datesHeader.find(`.k-nav-day`);return a.length&&a.closest(`tr`).addClass(`k-scheduler-date-group`),this._isMobile()&&(i.addClass(`k-mobile-header`),i.addClass(`k-mobile-`+this._groupOrientation()+`-header`)),e(i).append(this.timesHeader.add(this.datesHeader).wrap(`<td>`).parent())},_bottomSection:function(t,n){return this.times=this._times(t,n,this._isMobile()),this.content=v(),e(`<tr class='k-scheduler-body'>`).append(this.times.add(this.content).wrap(`<td>`).parent())},_scroller:function(){var n=this;this.content.on(`scroll`+s,function(){t.scrollLeft(n.datesHeader.find(`>.k-scheduler-header-wrap`),this.scrollLeft),n.times.scrollTop(this.scrollTop),n._isVirtualized()&&n._tryRenderContent()});var r=t.touchScroller(this.content,{avoidScrolling:function(t){return e(t.event.target).closest(`.k-event.k-event-active`).length>0}});r&&r.movable&&(this._touchScroller=r,this.content=r.scrollElement,r.movable.bind(`change`,function(e){t.scrollLeft(n.datesHeader.find(`>.k-scheduler-header-wrap`),-e.sender.x),n.times.scrollTop(-e.sender.y),n._isVirtualized()&&n._tryRenderContent()}))},_resourcesForGroups:function(){var e=[],t=this.options.group,n=this.options.resources;if(t=t&&t.resources?t.resources:[],n&&t.length)for(var r=0,i=n.length;r<i;r++)for(var a=0,o=t.length;a<o;a++)n[r].name===t[a]&&e.push(n[r]);this.groupedResources=e},_createDateLayout:function(e,t,n){return F(`rows`,e,t,n)},_createColumnsLayout:function(e,t,n,r,i,a){return I(`columns`,e,t,n,r,i,a)},_groupOrientation:function(){var e=this.options.group;return e&&e.resources?e.orientation:`horizontal`},_isGroupedByDate:function(){return this.options.group&&this.options.group.date},_isVerticallyGrouped:function(){return this.groupedResources.length&&this._groupOrientation()===`vertical`},_createRowsLayout:function(e,t,n,r){return I(`rows`,e,t,n,r)},selectionByElement:function(){return null},clearSelection:function(){this.content.find(`.k-selected`).removeAttr(`id`).removeClass(`k-selected`)},destroy:function(){var e=this;i.fn.destroy.call(this),e._ongoingTimer&&=(clearInterval(e._ongoingTimer),null),e.table&&(t.destroy(e.table),e.table.remove()),e.footer&&(e.footer.getKendoToolBar().destroy(),e.footer.remove()),e.groups=null,e.table=null,e.content=null,e.times=null,e.datesHeader=null,e.timesHeader=null,e.footer=null,e._resizeHint=null,e._moveHint=null},calendarInfo:function(){return t.getCulture().calendars.standard},prevGroupSlot:function(e,t,n){var r,i=this.groups[t],a=i.ranges(e,e,n,!1)[0].start;if(!(t<=0))return this._isGroupedByDate()?a:this._isVerticallyGrouped()?i.timeSlotCollectionCount()?(r=i._collection(n?a.index:a.collectionIndex,!1),r.last()):(r=i._collection(i.daySlotCollectionCount()-1,!0),r.at(a.index)):i.timeSlotCollectionCount()?(r=i._collection(n?0:i.timeSlotCollectionCount()-1,n),n?r.last():r.at(a.index)):(r=i._collection(a.collectionIndex,!0),r.last())},nextGroupSlot:function(e,t,n){var r,i=this.groups[t],a=i.ranges(e,e,n,!1)[0].start,o;if(!(t>=this.groups.length-1))return this._isGroupedByDate()?a:this._isVerticallyGrouped()?i.timeSlotCollectionCount()?(o=i.daySlotCollectionCount(),r=i._collection(o?0:a.collectionIndex,o),n?r.first():r.at(a.collectionIndex)):(r=i._collection(0,!0),r.at(a.index)):i.timeSlotCollectionCount()?(r=i._collection(0,n),n?r.first():r.at(a.index)):(r=i._collection(a.collectionIndex,!0),r.first())},_eventOptionsForMove:function(){return{}},_updateEventForResize:function(){},_updateEventForSelection:function(e){return e},_innerElements:function(e,t,n){var r=0,i=function(e){var a=e[n],o=e[t],s,c,l;if(a){r+=a;return}if(!o||o.length===0){r+=1;return}for(l=0;l<o.length;l++)s=o[l],c=s[t],c&&c[0]?!c[0][t]||c[0][t].length===0?r+=c.length:i(s):r+=1};return i(e),r},_times:function(t,n,r){for(var i=this,a=Array(n).join().split(`,`),o=[],s,c=0;c<t.length;c++){var l=t[c],u=0;for(s=0;s<l.length;s++){var d=l[s],f=d.className||``,p=d.text,m=i._innerElements(d,`rows`);u+=m,d.allDay&&(f=`k-scheduler-times-all-day`),r&&f.indexOf(`k-group-cell`)!==-1&&(p=`<span class="k-scheduler-group-text">`+p+`</span>`),a[u-m]+=`<th class="k-scheduler-cell `+f+`" rowspan="`+m+`">`+p+`</th>`}}for(s=0;s<n;s++)o.push(a[s]);return n<1?e():e(`<div class="k-scheduler-times">`+h(o)+`</div>`)},_datesHeader:function(n,r){for(var i=this,a=[],o,s,c=0;c<n.length;c++){var l=n[c],u=[];for(o=0;o<l.length;o++){var d=l[o],f=i._innerElements(d,`columns`,`colspan`);u.push(`<th colspan="`+(d.colspan||f)+`" class="k-scheduler-cell `+(d.className||``)+`">`+d.text+`</th>`)}a.push(u.join(``))}var p=[];if(r){var m=n[n.length-1],_=[],v=r.cellContent;for(o=0;o<m.length;o++)_.push(`<td class="k-scheduler-cell `+(m[o].className||``)+`">`+(v?v(o):`&nbsp;`)+`</td>`);p.push(_.join(``))}return s=e(`<div class="k-scheduler-header"><div class="k-scheduler-header-wrap">`+h(a)+g(p,`k-scheduler-header-all-day`)+`</div></div>`),t.applyStylesFromKendoAttributes(s,[`position`]),s},_formatEventAriaLabel:function(e,n,r,i){var a=this.options.messages.ariaEventLabel,o=t.date.getDate(n).getTime()===t.date.getDate(r).getTime(),s;return typeof a==`string`?t.format(a,e,n,n):(s=(a.prefix+f+e+f+a.on+f+t.toString(n,`D`)).trim(),i&&o?s+f+a.allDay:i?s+f+a.to+f+t.toString(r,`D`)+f+a.allDay:(s=s+f+a.at+f+t.toString(n,`t`)+f+a.to+f,o?s+t.toString(r,`t`):s+t.toString(r,`D`)+f+a.at+f+t.toString(r,`t`)))},_ongoingEvents:function(e){var t=this,n=t.options.ongoingEvents,r=!!n&&(n===!0||n.enabled),i;r&&(t._ongoingUpdater(e),i=n.updateInterval||6e4,t._ongoingTimer&&=(clearInterval(t._ongoingTimer),null),isNaN(i)||(t._ongoingTimer=setInterval(this._ongoingUpdater.bind(t,e),i)))},_ongoingUpdater:function(e){var t=new Date,n=this.options.ongoingEvents.cssClass||l;this.content.find(p+n).removeClass(n),this.groups&&this.groups.length>0&&this._updateOngoing(t,e)},_updateOngoing:function(e,n){var r=this,i=r.element,a=r.options.ongoingEvents,o=a.cssClass||l,s=a.useLocalTimezone,c=r.options.timezone,u,e;n&&(s===!1&&c&&(u=t.timezone.offset(e,c),e=t.timezone.convert(e,e.getTimezoneOffset(),u)),n.forEach(t=>{var n,r=t.start,a=t.end;t.isAllDay&&(a=new Date(a.getTime()+1e3*60*60*24-1)),r<=e&&a>=e&&(n=t.uid,i.find(`[data-uid=`+n+`]`).addClass(o))}))}});function O(e,t,n){var r,i,a,o,s;for(r=e.length-1;r>=0;r--)i=k(e[r]),a=i.start,s=i.end,o=a<=t&&s>=t,(o||a>=t&&s<=n||t<=a&&n>=a)&&(a<t&&(t=a),s>n&&(n=s));return A(e,t,n)}function k(e){return{start:e.start,end:e.end,slotIndex:e.slotIndex,slotIndexEnd:e.slotIndexEnd}}function A(e,t,n){for(var r=[],i=0;i<e.length;i++){var a=k(e[i]);(a.start<t&&a.end>t||a.start>=t&&a.end<=n)&&r.push(e[i])}return r}function j(e){return P(e)}function M(e){return P(e)}var N=function(e){var t=this,n=N.formats,r,i,a,o,s;if(arguments.length===1)for(e=t.resolveColor(e),o=0;o<n.length;o++)r=n[o].re,i=n[o].process,a=r.exec(e),a&&(s=i(a),t.r=s[0],t.g=s[1],t.b=s[2]);else t.r=arguments[0],t.g=arguments[1],t.b=arguments[2];t.r=t.normalizeByte(t.r),t.g=t.normalizeByte(t.g),t.b=t.normalizeByte(t.b)};N.prototype={resolveColor:function(e){return e||=`#000`,e.charAt(0)==`#`&&(e=e.substr(1,6)),e=e.replace(/ /g,``),e=e.toLowerCase(),e=N.namedColors[e]||e,e},normalizeByte:function(e){return e<0||isNaN(e)?0:e>255?255:e},percBrightness:function(){var e=this;return d.sqrt(.241*e.r*e.r+.691*e.g*e.g+.068*e.b*e.b)},isDark:function(){return this.percBrightness()<180}},N.formats=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,process:function(e){return[parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3],10)]}},{re:/^(\w{2})(\w{2})(\w{2})$/,process:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,process:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}}],N.namedColors={aqua:`00ffff`,azure:`f0ffff`,beige:`f5f5dc`,black:`000000`,blue:`0000ff`,brown:`a52a2a`,coral:`ff7f50`,cyan:`00ffff`,darkblue:`00008b`,darkcyan:`008b8b`,darkgray:`a9a9a9`,darkgreen:`006400`,darkorange:`ff8c00`,darkred:`8b0000`,dimgray:`696969`,fuchsia:`ff00ff`,gold:`ffd700`,goldenrod:`daa520`,gray:`808080`,green:`008000`,greenyellow:`adff2f`,indigo:`4b0082`,ivory:`fffff0`,khaki:`f0e68c`,lightblue:`add8e6`,lightgrey:`d3d3d3`,lightgreen:`90ee90`,lightpink:`ffb6c1`,lightyellow:`ffffe0`,lime:`00ff00`,limegreen:`32cd32`,linen:`faf0e6`,magenta:`ff00ff`,maroon:`800000`,mediumblue:`0000cd`,navy:`000080`,olive:`808000`,orange:`ffa500`,orangered:`ff4500`,orchid:`da70d6`,pink:`ffc0cb`,plum:`dda0dd`,purple:`800080`,red:`ff0000`,royalblue:`4169e1`,salmon:`fa8072`,silver:`c0c0c0`,skyblue:`87ceeb`,slateblue:`6a5acd`,slategray:`708090`,snow:`fffafa`,steelblue:`4682b4`,tan:`d2b48c`,teal:`008080`,tomato:`ff6347`,turquoise:`40e0d0`,violet:`ee82ee`,wheat:`f5deb3`,white:`ffffff`,whitesmoke:`f5f5f5`,yellow:`ffff00`,yellowgreen:`9acd32`};function P(e){for(var t=[],n=0;n<e.length;n++){var r=e[n],i=k(r),a=null;r.zeroWidthEventOffset&&i.end-i.start<r.zeroWidthEventOffset&&(i.end=i.start+r.zeroWidthEventOffset);for(var o=0,s=t.length;o<s;o++){var c=i.start>t[o].end||i.slotIndex>t[o].slotIndexEnd;if(i.start<t[o].start||i.slotIndex<t[o].slotIndex||c){a=t[o],a.end<i.end&&(a.end=i.end),a.slotIndexEnd<i.slotIndexEnd&&(a.slotIndexEnd=i.slotIndexEnd);break}}a||(a={slotIndex:i.slotIndex,slotIndexEnd:i.slotIndexEnd,start:i.start,end:i.end,events:[]},t.push(a)),a.events.push(r)}return t}function F(t,n,r,i){var a=[];return e.each(n,function(e,n){var o=n.className?`k-slot-cell `+n.className:`k-slot-cell`,s={text:n.text,className:o};i&&!n.minorTicks?s[t]=F(t,n.columns,r,i):s[t]=r,a.push(s)}),a}function I(n,r,i,a,o,s,c){var l=r[0],u=[];if(l){if(o&&i)e.each(o,function(e,t){s&&!t.minorTicks?t[n]=I(n,r,t.columns,a,t.columns,s,c):t[n]=I(n,r,null,a,null,null,c)}),u=o;else{var d=l.dataSource.view();d=d.filter(function(e){var n=t.getter(l.dataParentValueField)(e);return n==null||n===c});for(var f=0;f<d.length;f++){var p=t.getter(l.dataValueField)(d[f]),m={text:a({text:t.htmlEncode(t.getter(l.dataTextField)(d[f])),color:t.getter(l.dataColorField)(d[f]),field:l.field,title:l.title,name:l.name,value:p}),className:`k-slot-cell k-group-cell`,parentValue:c,value:p};m[n]=I(n,r.slice(1),i,a,o,s,p),u.push(m)}}return u}return i}function L(e){return function(n){if(Array.isArray(n)||n instanceof t.data.ObservableArray){for(var r=0;r<n.length;r++)if(n[r]==e)return!0;return!1}return n==e}}var R=/\s*k-selected/;function z(e){e.className=e.className.replace(R,``)+` k-selected`}e.extend(n.SchedulerView,{createColumns:j,createRows:M,rangeIndex:k,collidingEvents:O,groupEqFilter:L})})(window.kendo.jQuery);var i=kendo;e.__meta__=r,e.default=i}); //# sourceMappingURL=kendo.scheduler.view.min.js.map