{"version":3,"sources":["kendo.menu.js"],"names":["f","define","$","undefined","getEffectDirection","direction","root","split","replace","parseDirection","isRtl","output","origin","position","horizontal","test","kendo","directions","reverse","join","contains","parent","child","e","updateItemClasses","item","addClass","children","IMG","IMAGE","LINK","filter","DEFAULTSTATE","removeClass","empty","append","DISABLEDSTATE","removeAttr","attr","length","LINK_SELECTOR","contents","this","nodeName","match","excludedNodesRegExp","nodeType","trim","nodeValue","wrapAll","updateArrow","updateFirstLast","find","remove","each","arrowCssClass","getArrowCssClass","support","hasClass","MENU","FIRST","LAST","updateHasAriaPopup","parents","index","parentLi","eq","getParentLiItems","group","parentsUntil","storeItemSelectEventHandler","element","options","selectHandler","getItemSelectEventHandler","setItemData","items","i","data","select","isFunction","popupOpenerSelector","id","popupGroupSelector","selector","getChildPopups","currentPopup","overflowWrapper","childPopupOpener","result","opener","popupId","popup","POPUP_OPENER_ATTR","push","popupParentItem","popupElement","POPUP_ID_ATTR","itemPopup","animationContainerSelector","overflowMenuParents","current","last","getParents","parentNode","is","elem","mousewheelDelta","delta","wheelDelta","Math","ceil","floor","detail","round","parentsScroll","scrollDirection","scroll","isNaN","isPointerTouch","allPointers","originalEvent","pointerType","touchPointerTypes","isTouch","ev","touch","type","removeSpacesBetweenItems","ul","window","ui","activeElement","_activeElement","mobileOS","isArray","HierarchicalDataSource","MOUSEDOWN","CLICK","DELAY","SCROLLSPEED","extend","proxy","template","keys","Widget","NS","OPEN","ICON_SELECTOR","CLOSE","TIMER","SELECT","ZINDEX","ACTIVATE","DEACTIVATE","POINTERDOWN","pointers","msPointers","CHANGE","ERROR","TOUCHSTART","MOUSEENTER","MOUSELEAVE","MOUSEWHEEL","RESIZE","resize","SCROLLWIDTH","SCROLLHEIGHT","OFFSETWIDTH","OFFSETHEIGHT","DOCUMENT_ELEMENT","document","documentElement","KENDOPOPUP","HOVERSTATE","FOCUSEDSTATE","SELECTEDSTATE","menuSelector","groupSelector","popupSelector","allItemsSelector","disabledSelector","itemSelector","availableItemsSelector","linkSelector","exclusionSelector","nextSelector","lastSelector","templateSelector","scrollButtonSelector","2","STRING","DATABOUND","bindings","text","url","spriteCssClass","imageUrl","imageAttr","content","rendering","wrapperCssClass","enabled","firstLevel","cssClass","hasOwnProperty","selected","itemCssAttributes","attributes","imageCssAttributes","imgAttributes","toJSON","contentCssAttributes","contentAttr","defaultClasses","textClass","arrowClass","groupAttributes","expanded","groupCssClass","Menu","DataBoundWidget","init","that","fn","call","wrapper","_accessors","_templates","_dataSource","_updateClasses","_animations","nextItemZIndex","_tabindex","_initOverflow","_attachMenuEventsHandlers","openOnClick","clicked","_ariaId","format","notify","events","name","animation","open","duration","close","orientation","closeOnClick","hoverDelay","scrollable","popupCollision","_initData","dataSource","angular","elements","view","_overflowWrapper","on","_focusHandler","_click","_preventClose","_mouseenter","_mouseleave","_mousedown","_toggleHover","_keydown","_focus","_removeHoverItem","_checkActiveElement","_mouseleavePopup","_mouseenterPopup","_documentClickHandler","_documentClick","click","_detachMenuEventsHandlers","off","unbind","backwardBtn","forwardBtn","initialWidth","initialCssWidth","isHorizontal","_openedPopups","_scrollWrapper","wrap","templates","scrollButton","add","appendTo","_initScrolling","outerWidth","style","width","throttle","_setOverflowWrapperWidth","_toggleScrollButtons","_popupsWrapper","wrapperWidth","menuWidth","borders","wrapperCssWidth","css","offsetWidth","clientWidth","min","_reinitOverflow","overflowChanged","distance","_destroyOverflow","popupWrapper","popupParentLi","unwrap","scrollElement","isNumeric","mouseWheelDistance","backward","forward","backwardDouble","forwardDouble","scrolling","touchEvents","value","scrollValue","scrollLeft","scrollTop","finish","animate","mouseenterHandler","mousedownHandler","stop","currentTarget","trigger","stopPropagation","preventDefault","eventMap","down","scrollSpeed","ctrlKey","shiftKey","altKey","abs","_closeChildPopups","currentScroll","scrollSize","offset","toggle","setOptions","destroy","enable","_toggleDisabled","disable","attemptGetItem","candidate","referenceItem","inserted","_insert","_childPopupElement","insertBefore","before","insertAfter","after","groups","plain","groupData","isPlainObject","ObservableObject","renderGroup","ObservableArray","map","idx","get","renderItem","charAt","parentItems","container","_openAfterLoad","dataItem","loaded","_loading","one","visiblePopups","closePopup","getByUid","ns","hasChildren","load","closest","siblings","li","clearTimeout","setTimeout","overflowPopup","windowHeight","setScrolling","nextZindex","parentHorizontal","effects","openEffects","_getPopup","_triggerEvent","height","maxHeight","_outerHeight","getShadows","bottom","overflow","browser","msie","version","zIndex","kendoPopup","activate","deactivate","_closing","sender","removeData","opacity","collision","anchor","_popupOpen","hide","mouseAndTouchPresent","_configurePopupOverflow","_hovered","_initPopupScrolling","popupOpener","groupId","_wrapPopupElement","Date","getTime","autosize","display","skipMouseEvents","scrollHeight","offsetHeight","_initPopupScrollButtons","scrollButtons","timeout","p","isEmptyObject","_closeParentPopups","first","_keyTriggered","_setPopupHeight","isFixed","location","popupOuterHeight","popupOffsetTop","bottomScrollbar","canFit","popups","_initialHeight","_location","max","top","innerHeight","dontClearClose","hasChildPopupsHovered","isPopupMouseLeaved","_isRootItem","_forceClose","toggleClass","target","eventTarget","isEnter","indexOf","_closurePrevented","hoverItem","_hoverItem","_findRootParent","hasFocus","oldHoverItem","_oldHoverItem","nonContentGroupsSelector","matchesSelector","end","_itemHasChildren","pointerTouch","delegateTarget","rootMenuItems","subMenuItems","relatedTarget","_","sibling","$window","stopImmediatePropagation","toElement","clientX","clientY","_closePopups","rootPopup","groupParent","innerPopup","_innerPopup","openHandle","childGroup","childGroupVisible","shouldCloseTheRootItem","childPopupId","targetElement","toUpperCase","formNode","link","itemElement","href","targetHref","sampleHref","isLink","isLocalLink","isTargetLink","_lastClickedElement","parentElement","handled","_triggerSelect","_parentsUntil","enterKey","context","itemSelectEventData","isSelectItemDefaultPrevented","isSelectDefaultPrevented","_getEventData","isDefaultPrevented","eventData","_defaultPrevented","active","_moveHover","focus","belongsToVertical","key","keyCode","ESC","_itemBelongsToVertival","RIGHT","LEFT","DOWN","_itemDown","UP","_itemUp","HOME","END","_itemEsc","ENTER","SPACEBAR","TAB","menuIsVertical","nextItem","_scrollToItem","_itemRight","parentItem","nextAll","prevAll","_itemLeft","scrollDir","getSize","currentScrollOffset","itemSize","itemOffset","ulSize","scrollButtonSize","itemPosition","_outerWidth","_unbindDataSource","fields","field","create","_bindDataSource","fetch","_refreshHandler","refresh","_errorHandler","_error","bind","findByUid","uid","wrapperElement","node","action","itemsToUpdate","updateProxy","_updateItem","removeProxy","_removeItem","_appendItems","forEach","nextElement","next","textField","_fieldAccessor","fieldName","fieldBindings","count","x","expr","fieldAccessor","itemWrapper","arrow","sprite","menu","renderContent","dataContentField","subGroup","renderItems","html","len","ContextMenu","_marker","guid","substring","_popup","_wire","_initialWidth","showOn","alignToAnchor","copyAnchorStyles","_showProxy","userEvents","mousedown","_closeProxy","y","visible","kendoStop","left","_configurePopupScrolling","downEvent","_mousedownProxy","visibility","_setPopupWidth","windowWidth","popupOuterWidth","popupOffsetLeft","shadow","maxWidth","right","arguments","_closeTimeoutProxy","_showHandler","event","pageX","pageY","_eventOrigin","_targetChild","_closeHandler","normalClick","sameTarget","containment","which","_preventProxy","UserEvents","allowSelection","_triggerProxy","noop","plugin","jQuery","amd","a1","a2","a3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;CAwBC,SAAUA,EAAGC,QACVA,OAAO,cACH,cACA,cACDD,IACL,WAg/DE,MAp+DC,UAAUE,EAAGC,GAmGV,QAASC,GAAmBC,EAAWC,GAEnC,MADAD,GAAYA,EAAUE,MAAM,MAAMD,EAAO,IAAMD,EACxCA,EAAUG,QAAQ,MAAO,MAAMA,QAAQ,SAAU,QAE5D,QAASC,GAAeJ,EAAWC,EAAMI,GACrCL,EAAYA,EAAUE,MAAM,MAAMD,EAAO,IAAMD,CAC/C,IAAIM,IACIC,QACI,SACAF,EAAQ,QAAU,QAEtBG,UACI,MACAH,EAAQ,QAAU,SAEvBI,EAAa,aAAaC,KAAKV,EAatC,OAZIS,IACAH,EAAOC,QACH,MACAP,GAEJM,EAAOE,SAAS,GAAKG,EAAMC,WAAWZ,GAAW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AAK+F,GACfjF,IACAA,EAAM0J,OAAM,MAJEpP,EAAEyoB,OAQ7B7jB,KAAK+F,IACRkD,EAAKka,aAAe7mB,EAAS2M,EAAKgP,OAAO,GAAIhP,EAAKnI,MAAMrB,QAAQ,MAGxE4D,GAAGygB,OAAOhb,IACVzF,EAAGygB,OAAO/C,KACZ3d,OAAOlH,MAAM6nB,QACR3gB,OAAOlH,OACE,kBAAVf,SAAwBA,OAAO6oB,IAAM7oB,OAAS,SAAU8oB,EAAIC,EAAIC,IACrEA,GAAMD","file":"kendo.menu.min.js","sourcesContent":["/*!\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n*/\n(function (f, define) {\n define('kendo.menu', [\n 'kendo.popup',\n 'kendo.data'\n ], f);\n}(function () {\n var __meta__ = {\n id: 'menu',\n name: 'Menu',\n category: 'web',\n description: 'The Menu widget displays hierarchical data as a multi-level menu.',\n depends: [\n 'popup',\n 'data',\n 'data.odata'\n ]\n };\n (function ($, undefined) {\n var kendo = window.kendo, ui = kendo.ui, activeElement = kendo._activeElement, touch = kendo.support.touch && kendo.support.mobileOS, isArray = $.isArray, HierarchicalDataSource = kendo.data.HierarchicalDataSource, MOUSEDOWN = 'mousedown', CLICK = 'click', DELAY = 30, SCROLLSPEED = 50, extend = $.extend, proxy = $.proxy, each = $.each, template = kendo.template, keys = kendo.keys, Widget = ui.Widget, excludedNodesRegExp = /^(ul|a|div)$/i, NS = '.kendoMenu', IMG = 'img', OPEN = 'open', MENU = 'k-menu', LINK = 'k-link k-menu-link', LINK_SELECTOR = '.k-link', ICON_SELECTOR = '.k-menu-expand-arrow', LAST = 'k-last', CLOSE = 'close', TIMER = 'timer', FIRST = 'k-first', IMAGE = 'k-image', SELECT = 'select', ZINDEX = 'zIndex', ACTIVATE = 'activate', DEACTIVATE = 'deactivate', POINTERDOWN = 'touchstart' + NS + ' MSPointerDown' + NS + ' pointerdown' + NS, pointers = kendo.support.pointers, msPointers = kendo.support.msPointers, allPointers = msPointers || pointers, CHANGE = 'change', ERROR = 'error', TOUCHSTART = kendo.support.touch ? 'touchstart' : '', MOUSEENTER = pointers ? 'pointerover' : msPointers ? 'MSPointerOver' : 'mouseenter', MOUSELEAVE = pointers ? 'pointerout' : msPointers ? 'MSPointerOut' : 'mouseleave', MOUSEWHEEL = 'DOMMouseScroll' + NS + ' mousewheel' + NS, RESIZE = kendo.support.resize + NS, SCROLLWIDTH = 'scrollWidth', SCROLLHEIGHT = 'scrollHeight', OFFSETWIDTH = 'offsetWidth', OFFSETHEIGHT = 'offsetHeight', POPUP_ID_ATTR = 'group', POPUP_OPENER_ATTR = 'groupparent', DOCUMENT_ELEMENT = $(document.documentElement), KENDOPOPUP = 'kendoPopup', DEFAULTSTATE = 'k-state-default', HOVERSTATE = 'k-state-hover', FOCUSEDSTATE = 'k-state-focused', DISABLEDSTATE = 'k-state-disabled', SELECTEDSTATE = 'k-state-selected', menuSelector = '.k-menu', groupSelector = '.k-menu-group', animationContainerSelector = '.k-animation-container', popupSelector = groupSelector + ',' + animationContainerSelector, allItemsSelector = ':not(.k-list) > .k-item', disabledSelector = '.k-item.k-state-disabled', itemSelector = '.k-item', availableItemsSelector = '.k-item:not(.k-state-disabled)', linkSelector = '.k-item:not(.k-state-disabled) > .k-link', exclusionSelector = ':not(.k-item.k-separator)', nextSelector = itemSelector + exclusionSelector + ':eq(0)', lastSelector = itemSelector + exclusionSelector + ':last', templateSelector = 'div:not(.k-animation-container,.k-list-container)', scrollButtonSelector = '.k-menu-scroll-button', touchPointerTypes = {\n '2': 1,\n 'touch': 1\n }, STRING = 'string', DATABOUND = 'dataBound', bindings = {\n text: 'dataTextField',\n url: 'dataUrlField',\n spriteCssClass: 'dataSpriteCssClassField',\n imageUrl: 'dataImageUrlField',\n imageAttr: 'dataImageAttrField',\n content: 'dataContentField'\n }, rendering = {\n wrapperCssClass: function (group, item) {\n var result = 'k-item k-menu-item', index = item.index;\n if (item.enabled === false) {\n result += ' k-state-disabled';\n } else {\n result += ' k-state-default';\n }\n if (group.firstLevel && index === 0) {\n result += ' k-first';\n }\n if (index == group.length - 1) {\n result += ' k-last';\n }\n if (item.cssClass) {\n result += ' ' + item.cssClass;\n }\n if (item.attr && item.attr.hasOwnProperty('class')) {\n result += ' ' + item.attr['class'];\n }\n if (item.selected) {\n result += ' ' + SELECTEDSTATE;\n }\n return result;\n },\n itemCssAttributes: function (item) {\n var result = '';\n var attributes = item.attr || {};\n for (var attr in attributes) {\n if (attributes.hasOwnProperty(attr) && attr !== 'class') {\n result += attr + '=\"' + attributes[attr] + '\" ';\n }\n }\n return result;\n },\n imageCssAttributes: function (imgAttributes) {\n var result = '';\n var attributes = imgAttributes && imgAttributes.toJSON ? imgAttributes.toJSON() : {};\n if (!attributes['class']) {\n attributes['class'] = IMAGE;\n } else {\n attributes['class'] += ' ' + IMAGE;\n }\n for (var attr in attributes) {\n if (attributes.hasOwnProperty(attr)) {\n result += attr + '=\"' + attributes[attr] + '\" ';\n }\n }\n return result;\n },\n contentCssAttributes: function (item) {\n var result = '';\n var attributes = item.contentAttr || {};\n var defaultClasses = 'k-content k-group k-menu-group';\n if (!attributes['class']) {\n attributes['class'] = defaultClasses;\n } else {\n attributes['class'] += ' ' + defaultClasses;\n }\n for (var attr in attributes) {\n if (attributes.hasOwnProperty(attr)) {\n result += attr + '=\"' + attributes[attr] + '\" ';\n }\n }\n return result;\n },\n textClass: function () {\n return LINK;\n },\n arrowClass: function (item, group) {\n var result = 'k-menu-expand-arrow k-icon';\n if (group.horizontal) {\n result += ' k-i-arrow-60-down';\n } else {\n result += ' k-i-arrow-60-right';\n }\n return result;\n },\n groupAttributes: function (group) {\n return group.expanded !== true ? ' style=\\'display:none\\'' : '';\n },\n groupCssClass: function () {\n return 'k-group k-menu-group';\n },\n content: function (item) {\n return item.content ? item.content : ' ';\n }\n };\n function getEffectDirection(direction, root) {\n direction = direction.split(' ')[!root + 0] || direction;\n return direction.replace('top', 'up').replace('bottom', 'down');\n }\n function parseDirection(direction, root, isRtl) {\n direction = direction.split(' ')[!root + 0] || direction;\n var output = {\n origin: [\n 'bottom',\n isRtl ? 'right' : 'left'\n ],\n position: [\n 'top',\n isRtl ? 'right' : 'left'\n ]\n }, horizontal = /left|right/.test(direction);\n if (horizontal) {\n output.origin = [\n 'top',\n direction\n ];\n output.position[1] = kendo.directions[direction].reverse;\n } else {\n output.origin[0] = direction;\n output.position[0] = kendo.directions[direction].reverse;\n }\n output.origin = output.origin.join(' ');\n output.position = output.position.join(' ');\n return output;\n }\n function contains(parent, child) {\n try {\n return $.contains(parent, child);\n } catch (e) {\n return false;\n }\n }\n function updateItemClasses(item) {\n item = $(item);\n item.addClass('k-item k-menu-item').children(IMG).addClass(IMAGE);\n item.children('a').addClass(LINK).children(IMG).addClass(IMAGE);\n item.filter(':not([disabled])').addClass(DEFAULTSTATE);\n item.filter('.k-separator').removeClass('k-menu-item').addClass('k-menu-separator').empty().append(' ');\n item.filter('li[disabled]').addClass(DISABLEDSTATE).removeAttr('disabled').attr('aria-disabled', true);\n if (!item.filter('[role]').length) {\n item.attr('role', 'menuitem');\n }\n if (!item.children(LINK_SELECTOR).length) {\n item.contents().filter(function () {\n return !this.nodeName.match(excludedNodesRegExp) && !(this.nodeType == 3 && !kendo.trim(this.nodeValue));\n }).wrapAll('');\n }\n updateArrow(item);\n updateFirstLast(item);\n }\n function updateArrow(item) {\n item = $(item);\n item.find('> .k-link > [class*=k-i-arrow-60]:not(.k-sprite)').remove();\n item.filter(':has(.k-menu-group)').children('.k-link:not(:has([class*=k-i-arrow]:not(.k-sprite)))').each(function () {\n var item = $(this), arrowCssClass = getArrowCssClass(item);\n item.append('');\n });\n }\n function getArrowCssClass(item) {\n var arrowCssClass, parent = item.parent().parent(), isRtl = kendo.support.isRtl(parent);\n if (parent.hasClass(MENU + '-horizontal')) {\n arrowCssClass = 'k-i-arrow-60-down';\n } else {\n if (isRtl) {\n arrowCssClass = 'k-i-arrow-60-left';\n } else {\n arrowCssClass = 'k-i-arrow-60-right';\n }\n }\n return arrowCssClass;\n }\n function updateFirstLast(item) {\n item = $(item);\n item.filter('.k-first:not(:first-child)').removeClass(FIRST);\n item.filter('.k-last:not(:last-child)').removeClass(LAST);\n item.filter(':first-child').addClass(FIRST);\n item.filter(':last-child').addClass(LAST);\n }\n function updateHasAriaPopup(parents) {\n if (parents && parents.length) {\n for (var index in parents) {\n var parentLi = parents.eq(index);\n if (parentLi.find('ul').length) {\n parentLi.attr('aria-haspopup', true);\n } else {\n parentLi.removeAttr('aria-haspopup');\n }\n }\n }\n }\n function getParentLiItems(group) {\n if (!group.hasClass(MENU)) {\n return group.parentsUntil('.' + MENU, 'li');\n }\n }\n function storeItemSelectEventHandler(element, options) {\n var selectHandler = getItemSelectEventHandler(options);\n if (selectHandler) {\n setItemData(element, selectHandler);\n }\n if (options.items) {\n $(element).children('ul').children('li').each(function (i) {\n storeItemSelectEventHandler(this, options.items[i]);\n });\n }\n }\n function setItemData(element, selectHandler) {\n $(element).children('.k-link').data({ selectHandler: selectHandler });\n }\n function getItemSelectEventHandler(options) {\n var selectHandler = options.select, isFunction = kendo.isFunction;\n if (selectHandler && isFunction(selectHandler)) {\n return selectHandler;\n }\n return null;\n }\n function popupOpenerSelector(id) {\n return id ? 'li[data-groupparent=\\'' + id + '\\']' : 'li[data-groupparent]';\n }\n function popupGroupSelector(id) {\n var selector = id ? '[data-group=\\'' + id + '\\']' : '[data-group]';\n return 'ul' + selector + ',div' + selector;\n }\n function getChildPopups(currentPopup, overflowWrapper) {\n var childPopupOpener = currentPopup.find(popupOpenerSelector());\n var result = [];\n childPopupOpener.each(function (i, opener) {\n opener = $(opener);\n var popupId = opener.data(POPUP_OPENER_ATTR);\n var popup = currentPopup;\n while (popupId) {\n popup = overflowWrapper.find(popupGroupSelector(popupId) + ':visible');\n if (popup.length) {\n result.push(popup);\n }\n opener = popup.find(popupOpenerSelector());\n popupId = opener.data(POPUP_OPENER_ATTR);\n }\n });\n return result;\n }\n function popupParentItem(popupElement, overflowWrapper) {\n var popupId = popupElement.data(POPUP_ID_ATTR);\n return popupId ? overflowWrapper.find(popupOpenerSelector(popupId)) : $([]);\n }\n function itemPopup(item, overflowWrapper) {\n var popupId = item.data(POPUP_OPENER_ATTR);\n return popupId ? overflowWrapper.children(animationContainerSelector).children(popupGroupSelector(popupId)) : $([]);\n }\n function overflowMenuParents(current, overflowWrapper) {\n var parents = [];\n var getParents = function (item) {\n while (item.parentNode && !overflowWrapper.is(item.parentNode)) {\n parents.push(item.parentNode);\n item = item.parentNode;\n }\n };\n var elem = current[0] || current;\n getParents(elem);\n var last = parents[parents.length - 1];\n while ($(last).is(animationContainerSelector)) {\n var popupElement = $(last).children('ul');\n elem = popupParentItem(popupElement, overflowWrapper)[0];\n if (!elem) {\n break;\n }\n parents.push(elem);\n getParents(elem);\n last = parents[parents.length - 1];\n }\n return parents;\n }\n function mousewheelDelta(e) {\n var delta = 0;\n if (e.wheelDelta) {\n delta = -e.wheelDelta / 120;\n delta = delta > 0 ? Math.ceil(delta) : Math.floor(delta);\n }\n if (e.detail) {\n delta = Math.round(e.detail / 3);\n }\n return delta;\n }\n function parentsScroll(current, scrollDirection) {\n var scroll = 0;\n var parent = current.parentNode;\n while (parent && !isNaN(parent[scrollDirection])) {\n scroll += parent[scrollDirection];\n parent = parent.parentNode;\n }\n return scroll;\n }\n function isPointerTouch(e) {\n return allPointers && e.originalEvent && e.originalEvent.pointerType in touchPointerTypes;\n }\n function isTouch(e) {\n var ev = e.originalEvent;\n return touch && /touch/i.test(ev.type || '');\n }\n function removeSpacesBetweenItems(ul) {\n ul.contents().filter(function () {\n return this.nodeName != 'LI';\n }).remove();\n }\n var Menu = kendo.ui.DataBoundWidget.extend({\n init: function (element, options) {\n var that = this;\n Widget.fn.init.call(that, element, options);\n element = that.wrapper = that.element;\n options = that.options;\n that._accessors();\n that._templates();\n that._dataSource();\n that._updateClasses();\n that._animations(options);\n that.nextItemZIndex = 100;\n that._tabindex();\n that._initOverflow(options);\n that._attachMenuEventsHandlers();\n if (options.openOnClick) {\n that.clicked = false;\n }\n element.attr('role', 'menubar');\n if (element[0].id) {\n that._ariaId = kendo.format('{0}_mn_active', element[0].id);\n }\n kendo.notify(that);\n },\n events: [\n OPEN,\n CLOSE,\n ACTIVATE,\n DEACTIVATE,\n SELECT,\n DATABOUND\n ],\n options: {\n name: 'Menu',\n animation: {\n open: { duration: 200 },\n close: { duration: 100 }\n },\n orientation: 'horizontal',\n direction: 'default',\n openOnClick: false,\n closeOnClick: true,\n hoverDelay: 100,\n scrollable: false,\n popupCollision: undefined\n },\n _initData: function () {\n var that = this;\n if (that.dataSource) {\n that.angular('cleanup', function () {\n return { elements: that.element.children() };\n });\n that.element.empty();\n that.append(that.dataSource.view(), that.element);\n that.angular('compile', function () {\n return { elements: that.element.children() };\n });\n }\n },\n _attachMenuEventsHandlers: function () {\n var that = this;\n var element = that.element;\n var options = that.options;\n var overflowWrapper = that._overflowWrapper();\n (overflowWrapper || element).on(POINTERDOWN, itemSelector, proxy(that._focusHandler, that)).on(CLICK + NS, disabledSelector, false).on(CLICK + NS, itemSelector, proxy(that._click, that)).on(POINTERDOWN + ' ' + MOUSEDOWN + NS, '.k-content', proxy(that._preventClose, that)).on(MOUSEENTER + NS, availableItemsSelector, proxy(that._mouseenter, that)).on(MOUSELEAVE + NS, availableItemsSelector, proxy(that._mouseleave, that)).on(MOUSEDOWN + NS, availableItemsSelector, proxy(that._mousedown, that)).on(TOUCHSTART + NS + ' ' + MOUSEENTER + NS + ' ' + MOUSELEAVE + NS + ' ' + MOUSEDOWN + NS + ' ' + CLICK + NS, linkSelector, proxy(that._toggleHover, that));\n element.on('keydown' + NS, proxy(that._keydown, that)).on('focus' + NS, proxy(that._focus, that)).on('focus' + NS, '.k-content', proxy(that._focus, that)).on('blur' + NS, proxy(that._removeHoverItem, that)).on('blur' + NS, '[tabindex]', proxy(that._checkActiveElement, that));\n if (overflowWrapper) {\n overflowWrapper.on(MOUSELEAVE + NS, popupSelector, proxy(that._mouseleavePopup, that)).on(MOUSEENTER + NS, popupSelector, proxy(that._mouseenterPopup, that));\n }\n if (options.openOnClick) {\n that._documentClickHandler = proxy(that._documentClick, that);\n $(document).click(that._documentClickHandler);\n }\n },\n _detachMenuEventsHandlers: function () {\n var that = this;\n var overflowWrapper = that._overflowWrapper();\n if (overflowWrapper) {\n overflowWrapper.off(NS);\n }\n that.element.off(NS);\n if (that._documentClickHandler) {\n $(document).unbind('click', that._documentClickHandler);\n }\n },\n _initOverflow: function (options) {\n var that = this;\n var isHorizontal = options.orientation == 'horizontal';\n var backwardBtn, forwardBtn;\n if (options.scrollable) {\n that._openedPopups = {};\n that._scrollWrapper = that.element.wrap('
').parent();\n if (isHorizontal) {\n removeSpacesBetweenItems(that.element);\n }\n backwardBtn = $(that.templates.scrollButton({ direction: isHorizontal ? 'left' : 'up' }));\n forwardBtn = $(that.templates.scrollButton({ direction: isHorizontal ? 'right' : 'down' }));\n backwardBtn.add(forwardBtn).appendTo(that._scrollWrapper);\n that._initScrolling(that.element, backwardBtn, forwardBtn, isHorizontal);\n var initialWidth = that.element.outerWidth();\n var initialCssWidth = that.element[0].style.width;\n initialCssWidth = initialCssWidth === 'auto' ? '' : initialCssWidth;\n if (isHorizontal) {\n $(window).on(RESIZE, kendo.throttle(function () {\n that._setOverflowWrapperWidth(initialWidth, initialCssWidth);\n that._toggleScrollButtons(that.element, backwardBtn, forwardBtn, isHorizontal);\n }, 100));\n }\n that._setOverflowWrapperWidth(initialWidth, initialCssWidth);\n that._toggleScrollButtons(that.element, backwardBtn, forwardBtn, isHorizontal);\n }\n },\n _overflowWrapper: function () {\n return this._scrollWrapper || this._popupsWrapper;\n },\n _setOverflowWrapperWidth: function (initialWidth, initialCssWidth) {\n var that = this;\n var wrapperCssWidth = that._scrollWrapper.css('width');\n that._scrollWrapper.css({ width: '' });\n var wrapperWidth = that._scrollWrapper.outerWidth();\n that._scrollWrapper.css({ width: wrapperCssWidth });\n var menuWidth = that.element.outerWidth();\n var borders = that.element[0].offsetWidth - that.element[0].clientWidth;\n if (menuWidth != wrapperWidth && wrapperWidth > 0) {\n var width = initialCssWidth ? Math.min(initialWidth, wrapperWidth) : wrapperWidth;\n that.element.width(width - borders);\n that._scrollWrapper.width(width);\n }\n },\n _reinitOverflow: function (options) {\n var that = this;\n var overflowChanged = options.scrollable && !that.options.scrollable || !options.scrollable && that.options.scrollable || options.scrollable && that.options.scrollable && options.scrollable.distance != that.options.scrollable.distance || options.orientation != that.options.orientation;\n if (overflowChanged) {\n that._detachMenuEventsHandlers();\n that._destroyOverflow();\n that._initOverflow(options);\n that._attachMenuEventsHandlers();\n }\n },\n _destroyOverflow: function () {\n var that = this;\n var overflowWrapper = that._overflowWrapper();\n if (overflowWrapper) {\n overflowWrapper.off(NS);\n overflowWrapper.find(scrollButtonSelector).off(NS).remove();\n overflowWrapper.children(animationContainerSelector).each(function (i, popupWrapper) {\n var ul = $(popupWrapper).children(groupSelector);\n ul.off(MOUSEWHEEL);\n var popupParentLi = popupParentItem(ul, overflowWrapper);\n if (popupParentLi.length) {\n popupParentLi.append(popupWrapper);\n }\n });\n overflowWrapper.find(popupOpenerSelector()).removeAttr('data-groupparent');\n overflowWrapper.find(popupGroupSelector()).removeAttr('data-group');\n that.element.off(MOUSEWHEEL);\n $(window).off(RESIZE);\n overflowWrapper.contents().unwrap();\n that._scrollWrapper = that._popupsWrapper = that._openedPopups = undefined;\n }\n },\n _initScrolling: function (scrollElement, backwardBtn, forwardBtn, isHorizontal) {\n var that = this;\n var scrollable = that.options.scrollable;\n var distance = $.isNumeric(scrollable.distance) ? scrollable.distance : SCROLLSPEED;\n var mouseWheelDistance = distance / 2;\n var backward = '-=' + distance;\n var forward = '+=' + distance;\n var backwardDouble = '-=' + distance * 2;\n var forwardDouble = '+=' + distance * 2;\n var scrolling = false;\n var touchEvents = false;\n var scroll = function (value) {\n var scrollValue = isHorizontal ? { 'scrollLeft': value } : { 'scrollTop': value };\n scrollElement.finish().animate(scrollValue, 'fast', 'linear', function () {\n if (scrolling) {\n scroll(value);\n }\n });\n that._toggleScrollButtons(scrollElement, backwardBtn, forwardBtn, isHorizontal);\n };\n var mouseenterHandler = function (e) {\n if (!scrolling && !touchEvents) {\n scroll(e.data.direction);\n scrolling = true;\n }\n };\n var mousedownHandler = function (e) {\n var scrollValue = isHorizontal ? { 'scrollLeft': e.data.direction } : { 'scrollTop': e.data.direction };\n touchEvents = isTouch(e) || isPointerTouch(e);\n scrollElement.stop().animate(scrollValue, 'fast', 'linear', function () {\n if (!touchEvents) {\n $(e.currentTarget).trigger(MOUSEENTER);\n } else {\n that._toggleScrollButtons(scrollElement, backwardBtn, forwardBtn, isHorizontal);\n scrolling = true;\n }\n });\n scrolling = false;\n e.stopPropagation();\n e.preventDefault();\n };\n backwardBtn.on(MOUSEENTER + NS, { direction: backward }, mouseenterHandler).on(kendo.eventMap.down + NS, { direction: backwardDouble }, mousedownHandler);\n forwardBtn.on(MOUSEENTER + NS, { direction: forward }, mouseenterHandler).on(kendo.eventMap.down + NS, { direction: forwardDouble }, mousedownHandler);\n backwardBtn.add(forwardBtn).on(MOUSELEAVE + NS, function () {\n scrollElement.stop();\n scrolling = false;\n that._toggleScrollButtons(scrollElement, backwardBtn, forwardBtn, isHorizontal);\n });\n scrollElement.on(MOUSEWHEEL, function (e) {\n if (!e.ctrlKey && !e.shiftKey && !e.altKey) {\n var wheelDelta = mousewheelDelta(e.originalEvent);\n var scrollSpeed = Math.abs(wheelDelta) * mouseWheelDistance;\n var value = (wheelDelta > 0 ? '+=' : '-=') + scrollSpeed;\n var scrollValue = isHorizontal ? { 'scrollLeft': value } : { 'scrollTop': value };\n that._closeChildPopups(scrollElement);\n scrollElement.finish().animate(scrollValue, 'fast', 'linear', function () {\n that._toggleScrollButtons(scrollElement, backwardBtn, forwardBtn, isHorizontal);\n });\n e.preventDefault();\n }\n });\n },\n _toggleScrollButtons: function (scrollElement, backwardBtn, forwardBtn, horizontal) {\n var currentScroll = horizontal ? scrollElement.scrollLeft() : scrollElement.scrollTop();\n var scrollSize = horizontal ? SCROLLWIDTH : SCROLLHEIGHT;\n var offset = horizontal ? OFFSETWIDTH : OFFSETHEIGHT;\n backwardBtn.toggle(currentScroll !== 0);\n forwardBtn.toggle(currentScroll < scrollElement[0][scrollSize] - scrollElement[0][offset] - 1);\n },\n setOptions: function (options) {\n var animation = this.options.animation;\n this._animations(options);\n options.animation = extend(true, animation, options.animation);\n if ('dataSource' in options) {\n this._dataSource(options);\n }\n this._updateClasses();\n this._reinitOverflow(options);\n Widget.fn.setOptions.call(this, options);\n },\n destroy: function () {\n var that = this;\n Widget.fn.destroy.call(that);\n that._detachMenuEventsHandlers();\n that._destroyOverflow();\n kendo.destroy(that.element);\n },\n enable: function (element, enable) {\n this._toggleDisabled(element, enable !== false);\n return this;\n },\n disable: function (element) {\n this._toggleDisabled(element, false);\n return this;\n },\n attemptGetItem: function (candidate) {\n candidate = candidate || this.element;\n var item = this.element.find(candidate);\n var overflowWrapper = this._overflowWrapper();\n if (item.length || candidate === this.element) {\n return item;\n } else if (overflowWrapper) {\n return overflowWrapper.find(candidate);\n } else {\n return $();\n }\n },\n append: function (item, referenceItem) {\n referenceItem = this.attemptGetItem(referenceItem);\n var inserted = this._insert(item, referenceItem, referenceItem.length ? this._childPopupElement(referenceItem) : null);\n each(inserted.items, function (i) {\n inserted.group.append(this);\n updateArrow(this);\n storeItemSelectEventHandler(this, item[i] || item);\n });\n updateArrow(referenceItem);\n updateFirstLast(inserted.group.find('.k-first, .k-last').add(inserted.items));\n updateHasAriaPopup(getParentLiItems(inserted.group));\n return this;\n },\n insertBefore: function (item, referenceItem) {\n referenceItem = this.attemptGetItem(referenceItem);\n var inserted = this._insert(item, referenceItem, referenceItem.parent());\n each(inserted.items, function (i) {\n referenceItem.before(this);\n updateArrow(this);\n updateFirstLast(this);\n storeItemSelectEventHandler(this, item[i] || item);\n });\n updateFirstLast(referenceItem);\n return this;\n },\n insertAfter: function (item, referenceItem) {\n referenceItem = this.attemptGetItem(referenceItem);\n var inserted = this._insert(item, referenceItem, referenceItem.parent());\n each(inserted.items, function (i) {\n referenceItem.after(this);\n updateArrow(this);\n updateFirstLast(this);\n storeItemSelectEventHandler(this, item[i] || item);\n });\n updateFirstLast(referenceItem);\n return this;\n },\n _insert: function (item, referenceItem, parent) {\n var that = this, items, groups;\n if (!referenceItem || !referenceItem.length) {\n parent = that.element;\n }\n var plain = $.isPlainObject(item) || item instanceof kendo.data.ObservableObject, groupData = {\n firstLevel: parent.hasClass(MENU),\n horizontal: parent.hasClass(MENU + '-horizontal'),\n expanded: true,\n length: parent.children().length\n };\n if (referenceItem && !parent.length) {\n parent = $(that.renderGroup({\n group: groupData,\n options: that.options\n })).appendTo(referenceItem);\n }\n if (plain || isArray(item) || item instanceof kendo.data.ObservableArray) {\n items = $($.map(plain ? [item] : item, function (value, idx) {\n if (typeof value === 'string') {\n return $(value).get();\n } else {\n return $(that.renderItem({\n group: groupData,\n item: extend(value, { index: idx })\n })).get();\n }\n }));\n } else {\n if (typeof item == 'string' && item.charAt(0) != '<') {\n items = that.element.find(item);\n } else {\n items = $(item);\n }\n groups = items.find('> ul').addClass('k-menu-group').attr('role', 'menu');\n items = items.filter('li');\n items.add(groups.find('> li')).each(function () {\n updateItemClasses(this);\n });\n }\n return {\n items: items,\n group: parent\n };\n },\n remove: function (element) {\n element = this.attemptGetItem(element);\n var that = this, parent = element.parentsUntil(that.element, allItemsSelector), group = element.parent('ul:not(.k-menu)');\n element.remove();\n if (group && !group.children(allItemsSelector).length) {\n var parentItems = getParentLiItems(group);\n var container = group.parent(animationContainerSelector);\n if (container.length) {\n container.remove();\n } else {\n group.remove();\n }\n updateHasAriaPopup(parentItems);\n }\n if (parent.length) {\n parent = parent.eq(0);\n updateArrow(parent);\n updateFirstLast(parent);\n }\n return that;\n },\n _openAfterLoad: function (element, dataItem) {\n var that = this;\n if (dataItem.loaded()) {\n that.open(element);\n that._loading = false;\n } else {\n dataItem.one(CHANGE, function () {\n element.find(ICON_SELECTOR).removeClass('k-i-loading');\n if (that._loading) {\n that.open(element);\n that._loading = false;\n }\n });\n }\n },\n open: function (element) {\n var that = this;\n var options = that.options;\n var horizontal = options.orientation == 'horizontal';\n var direction = options.direction;\n var isRtl = kendo.support.isRtl(that.wrapper);\n var overflowWrapper = that._overflowWrapper();\n element = (overflowWrapper || that.element).find(element);\n var dataItem = that.dataSource && that.dataSource.getByUid(element.data(kendo.ns + 'uid'));\n if (dataItem && dataItem.hasChildren && !dataItem.loaded() && !that._loading) {\n that._loading = true;\n element.find(ICON_SELECTOR).addClass('k-i-loading');\n dataItem.load();\n that._openAfterLoad(element, dataItem);\n return;\n }\n if (/^(top|bottom|default)$/.test(direction)) {\n if (isRtl) {\n direction = horizontal ? (direction + ' left').replace('default', 'bottom') : 'left';\n } else {\n direction = horizontal ? (direction + ' right').replace('default', 'bottom') : 'right';\n }\n }\n var visiblePopups = '>.k-popup:visible,>.k-animation-container>.k-popup:visible';\n var closePopup = function () {\n var popup = $(this).data(KENDOPOPUP);\n if (popup) {\n that.close($(this).closest('li.k-item'), true);\n }\n };\n element.siblings().find(visiblePopups).each(closePopup);\n if (overflowWrapper) {\n element.find(visiblePopups).each(closePopup);\n }\n if (that.options.openOnClick) {\n that.clicked = true;\n }\n element.each(function () {\n var li = $(this);\n clearTimeout(li.data(TIMER));\n li.data(TIMER, setTimeout(function () {\n var ul = li.find('.k-menu-group:first:hidden');\n var popup;\n var overflowPopup;\n if (!ul[0] && overflowWrapper) {\n overflowPopup = that._getPopup(li);\n ul = overflowPopup && overflowPopup.element;\n }\n if (ul.is(':visible')) {\n return;\n }\n if (ul[0] && that._triggerEvent({\n item: li[0],\n type: OPEN\n }) === false) {\n if (!ul.find('.k-menu-group')[0] && ul.children('.k-item').length > 1) {\n var windowHeight = $(window).height(), setScrolling = function () {\n ul.css({\n maxHeight: windowHeight - (kendo._outerHeight(ul) - ul.height()) - kendo.getShadows(ul).bottom,\n overflow: 'auto'\n });\n };\n if (kendo.support.browser.msie && kendo.support.browser.version <= 7) {\n setTimeout(setScrolling, 0);\n } else {\n setScrolling();\n }\n } else {\n ul.css({\n maxHeight: '',\n overflow: ''\n });\n }\n li.data(ZINDEX, li.css(ZINDEX));\n var nextZindex = that.nextItemZIndex++;\n li.css(ZINDEX, nextZindex);\n if (that.options.scrollable) {\n li.parent().siblings(scrollButtonSelector).css({ zIndex: ++nextZindex });\n }\n popup = ul.data(KENDOPOPUP);\n var root = li.parent().hasClass(MENU), parentHorizontal = root && horizontal, directions = parseDirection(direction, root, isRtl), effects = options.animation.open.effects, openEffects = effects !== undefined ? effects : 'slideIn:' + getEffectDirection(direction, root);\n if (!popup) {\n popup = ul.kendoPopup({\n activate: function () {\n that._triggerEvent({\n item: this.wrapper.parent(),\n type: ACTIVATE\n });\n },\n deactivate: function (e) {\n that._closing = false;\n e.sender.element.removeData('targetTransform').css({ opacity: '' });\n that._triggerEvent({\n item: this.wrapper.parent(),\n type: DEACTIVATE\n });\n },\n origin: directions.origin,\n position: directions.position,\n collision: options.popupCollision !== undefined ? options.popupCollision : parentHorizontal ? 'fit' : 'fit flip',\n anchor: li,\n appendTo: overflowWrapper || li,\n animation: {\n open: extend(true, { effects: openEffects }, options.animation.open),\n close: options.animation.close\n },\n open: proxy(that._popupOpen, that),\n close: function (e) {\n that._closing = true;\n var li = e.sender.wrapper.parent();\n if (overflowWrapper) {\n var popupId = e.sender.element.data(POPUP_ID_ATTR);\n if (popupId) {\n li = (overflowWrapper || that.element).find(popupOpenerSelector(popupId));\n }\n e.sender.wrapper.children(scrollButtonSelector).hide();\n }\n if (!that._triggerEvent({\n item: li[0],\n type: CLOSE\n })) {\n li.css(ZINDEX, li.data(ZINDEX));\n li.removeData(ZINDEX);\n if (that.options.scrollable) {\n li.parent().siblings(scrollButtonSelector).css({ zIndex: '' });\n }\n if (touch || allPointers || kendo.support.mouseAndTouchPresent) {\n li.removeClass(HOVERSTATE);\n that._removeHoverItem();\n }\n } else {\n e.preventDefault();\n }\n }\n }).data(KENDOPOPUP);\n } else {\n popup = ul.data(KENDOPOPUP);\n popup.options.origin = directions.origin;\n popup.options.position = directions.position;\n popup.options.animation.open.effects = openEffects;\n }\n ul.removeAttr('aria-hidden');\n that._configurePopupOverflow(popup, li);\n popup._hovered = true;\n popup.open();\n that._initPopupScrolling(popup);\n }\n }, that.options.hoverDelay));\n });\n return that;\n },\n _configurePopupOverflow: function (popup, popupOpener) {\n var that = this;\n if (that.options.scrollable) {\n that._wrapPopupElement(popup);\n if (!popupOpener.attr('data-groupparent')) {\n var groupId = new Date().getTime();\n popupOpener.attr('data-groupparent', groupId);\n popup.element.attr('data-group', groupId);\n }\n }\n },\n _wrapPopupElement: function (popup) {\n if (!popup.element.parent().is(animationContainerSelector)) {\n popup.wrapper = kendo.wrap(popup.element, popup.options.autosize).css({\n overflow: 'hidden',\n display: 'block',\n position: 'absolute'\n });\n }\n },\n _initPopupScrolling: function (popup, isHorizontal, skipMouseEvents) {\n var that = this;\n if (that.options.scrollable && popup.element[0].scrollHeight > popup.element[0].offsetHeight) {\n that._initPopupScrollButtons(popup, isHorizontal, skipMouseEvents);\n }\n },\n _initPopupScrollButtons: function (popup, isHorizontal, skipMouseEvents) {\n var that = this;\n var scrollButtons = popup.wrapper.children(scrollButtonSelector);\n var animation = that.options.animation;\n var timeout = (animation && animation.open && animation.open.duration || 0) + DELAY;\n setTimeout(function () {\n if (!scrollButtons.length) {\n var backwardBtn = $(that.templates.scrollButton({ direction: isHorizontal ? 'left' : 'up' }));\n var forwardBtn = $(that.templates.scrollButton({ direction: isHorizontal ? 'right' : 'down' }));\n scrollButtons = backwardBtn.add(forwardBtn).appendTo(popup.wrapper);\n that._initScrolling(popup.element, backwardBtn, forwardBtn, isHorizontal);\n if (!skipMouseEvents) {\n scrollButtons.on(MOUSEENTER + NS, function () {\n var overflowWrapper = that._overflowWrapper();\n $(getChildPopups(popup.element, overflowWrapper)).each(function (i, p) {\n var popupOpener = overflowWrapper.find(popupOpenerSelector(p.data(POPUP_ID_ATTR)));\n that.close(popupOpener);\n });\n }).on(MOUSELEAVE + NS, function () {\n setTimeout(function () {\n if ($.isEmptyObject(that._openedPopups)) {\n that._closeParentPopups(popup.element);\n }\n }, DELAY);\n });\n }\n }\n that._toggleScrollButtons(popup.element, scrollButtons.first(), scrollButtons.last(), isHorizontal);\n }, timeout);\n },\n _popupOpen: function (e) {\n if (!this._keyTriggered) {\n e.sender.element.children('.' + FOCUSEDSTATE).removeClass(FOCUSEDSTATE);\n }\n if (this.options.scrollable) {\n this._setPopupHeight(e.sender);\n }\n },\n _setPopupHeight: function (popup, isFixed) {\n var popupElement = popup.element;\n var popups = popupElement.add(popupElement.parent(animationContainerSelector));\n popups.height(popupElement.hasClass(MENU) && this._initialHeight || '');\n var location = popup._location(isFixed);\n var windowHeight = $(window).height();\n var popupOuterHeight = location.height;\n var popupOffsetTop = isFixed ? 0 : Math.max(location.top, 0);\n var scrollTop = isFixed ? 0 : parentsScroll(this._overflowWrapper()[0], 'scrollTop');\n var bottomScrollbar = window.innerHeight - windowHeight;\n var maxHeight = windowHeight - kendo.getShadows(popupElement).bottom + bottomScrollbar;\n var canFit = maxHeight + scrollTop > popupOuterHeight + popupOffsetTop;\n if (!canFit) {\n var height = Math.min(maxHeight, maxHeight - popupOffsetTop + scrollTop);\n popups.css({\n overflow: 'hidden',\n height: height + 'px'\n });\n }\n },\n close: function (items, dontClearClose) {\n var that = this;\n var overflowWrapper = that._overflowWrapper();\n var element = overflowWrapper || that.element;\n items = element.find(items);\n if (!items.length) {\n items = element.find('>.k-item');\n }\n var hasChildPopupsHovered = function (currentPopup) {\n var result = false;\n if ($.isEmptyObject(that._openedPopups)) {\n return result;\n }\n $(getChildPopups(currentPopup, overflowWrapper)).each(function (i, popup) {\n result = !!that._openedPopups[popup.data(POPUP_ID_ATTR).toString()];\n return !result;\n });\n return result;\n };\n var isPopupMouseLeaved = function (opener) {\n var groupId = opener.data(POPUP_OPENER_ATTR);\n return !overflowWrapper || !groupId || !that._openedPopups[groupId.toString()];\n };\n items.each(function () {\n var li = $(this);\n if (!dontClearClose && that._isRootItem(li)) {\n that.clicked = false;\n }\n clearTimeout(li.data(TIMER));\n li.data(TIMER, setTimeout(function () {\n var popup = that._getPopup(li);\n if (popup && (isPopupMouseLeaved(li) || that._forceClose)) {\n if (!that._forceClose && hasChildPopupsHovered(popup.element)) {\n return;\n }\n popup.close();\n popup.element.attr('aria-hidden', true);\n if (overflowWrapper) {\n if (that._forceClose && items.last().is(li[0])) {\n delete that._forceClose;\n }\n }\n }\n }, that.options.hoverDelay));\n });\n return that;\n },\n _getPopup: function (li) {\n var that = this;\n var popup = li.find('.k-menu-group:not(.k-list-container):not(.k-calendar-container):first:visible').data(KENDOPOPUP);\n var overflowWrapper = that._overflowWrapper();\n if (!popup && overflowWrapper) {\n var groupId = li.data(POPUP_OPENER_ATTR);\n if (groupId) {\n var popupElement = overflowWrapper.find(popupGroupSelector(groupId));\n popup = popupElement.data(KENDOPOPUP);\n }\n }\n return popup;\n },\n _toggleDisabled: function (items, enable) {\n this.element.find(items).each(function () {\n $(this).toggleClass(DEFAULTSTATE, enable).toggleClass(DISABLEDSTATE, !enable).attr('aria-disabled', !enable);\n });\n },\n _toggleHover: function (e) {\n var target = $(kendo.eventTarget(e) || e.target).closest(allItemsSelector), isEnter = e.type == MOUSEENTER || MOUSEDOWN.indexOf(e.type) !== -1;\n target.siblings().removeClass(HOVERSTATE);\n if (!target.parents('li.' + DISABLEDSTATE).length) {\n target.toggleClass(HOVERSTATE, isEnter || e.type == 'mousedown' || e.type == 'pointerover' || e.type == TOUCHSTART);\n }\n this._removeHoverItem();\n },\n _preventClose: function () {\n if (!this.options.closeOnClick) {\n this._closurePrevented = true;\n }\n },\n _checkActiveElement: function (e) {\n var that = this, hoverItem = $(e ? e.currentTarget : this._hoverItem()), target = that._findRootParent(hoverItem)[0];\n if (!this._closurePrevented) {\n setTimeout(function () {\n if (!document.hasFocus() || !contains(target, kendo._activeElement()) && e && !contains(target, e.currentTarget)) {\n that.close(target);\n }\n }, 0);\n }\n this._closurePrevented = false;\n },\n _removeHoverItem: function () {\n var oldHoverItem = this._hoverItem();\n if (oldHoverItem && oldHoverItem.hasClass(FOCUSEDSTATE)) {\n oldHoverItem.removeClass(FOCUSEDSTATE);\n this._oldHoverItem = null;\n }\n },\n _updateClasses: function () {\n var element = this.element, nonContentGroupsSelector = '.k-menu-init div ul', items;\n element.removeClass('k-menu-horizontal k-menu-vertical');\n element.addClass('k-widget k-reset k-header k-menu-init ' + MENU).addClass(MENU + '-' + this.options.orientation);\n element.find('li > ul').filter(function () {\n return !kendo.support.matchesSelector.call(this, nonContentGroupsSelector);\n }).addClass('k-group k-menu-group').attr('role', 'menu').attr('aria-hidden', element.is(':visible')).parent('li').attr('aria-haspopup', 'true').end().find('li > div').addClass('k-content').attr('tabindex', '-1');\n items = element.find('> li,.k-menu-group > li');\n element.removeClass('k-menu-init');\n items.each(function () {\n updateItemClasses(this);\n });\n },\n _mouseenter: function (e) {\n var that = this;\n var element = $(e.currentTarget);\n var hasChildren = that._itemHasChildren(element);\n var popupId = element.data(POPUP_OPENER_ATTR) || element.parent().data(POPUP_ID_ATTR);\n var pointerTouch = isPointerTouch(e);\n if (popupId) {\n that._openedPopups[popupId.toString()] = true;\n }\n if (that._closing || e.delegateTarget != element.parents(menuSelector)[0] && e.delegateTarget != element.parents('.k-menu-scroll-wrapper,.k-popups-wrapper')[0]) {\n return;\n }\n that._keyTriggered = false;\n if (that.options.openOnClick.rootMenuItems && that._isRootItem(element.closest(allItemsSelector)) || that.options.openOnClick.subMenuItems && !that._isRootItem(element.closest(allItemsSelector))) {\n return;\n }\n if ((that.options.openOnClick === false || that.options.openOnClick.rootMenuItems === false && that._isRootItem(element.closest(allItemsSelector)) || that.options.openOnClick.subMenuItems === false && !that._isRootItem(element.closest(allItemsSelector)) || that.clicked) && !touch && !(pointerTouch && that._isRootItem(element.closest(allItemsSelector)))) {\n if (!contains(e.currentTarget, e.relatedTarget) && hasChildren) {\n that.open(element);\n }\n }\n if (that.options.openOnClick === true && that.clicked || touch) {\n element.siblings().each(proxy(function (_, sibling) {\n that.close(sibling, true);\n }, that));\n }\n },\n _mousedown: function (e) {\n var that = this;\n var element = $(e.currentTarget);\n if (that.options.openOnClick.subMenuItems && !that._isRootItem(element) || touch) {\n element.siblings().each(proxy(function (_, sibling) {\n that.close(sibling, true);\n }, that));\n }\n },\n _mouseleave: function (e) {\n var that = this;\n var element = $(e.currentTarget);\n var popupOpener = element.data(POPUP_OPENER_ATTR);\n var hasChildren = element.children(animationContainerSelector).length || element.children(groupSelector).length || popupOpener;\n var $window = $(window);\n if (popupOpener) {\n delete that._openedPopups[popupOpener.toString()];\n }\n if (element.parentsUntil(animationContainerSelector, '.k-list-container,.k-calendar-container')[0]) {\n e.stopImmediatePropagation();\n return;\n }\n if ((that.options.openOnClick === false || !that.options.openOnClick.rootMenuItems && that._isRootItem(element) || !that.options.openOnClick.subMenuItems && !that._isRootItem(element)) && !touch && !isPointerTouch(e) && !contains(e.currentTarget, e.relatedTarget || e.target) && hasChildren && !contains(e.currentTarget, kendo._activeElement())) {\n that.close(element, true);\n that._loading = false;\n return;\n }\n if (kendo.support.browser.msie && !e.toElement && !e.relatedTarget && !isPointerTouch(e) || e.clientX < 0 || e.clientY < 0 || e.clientY > $window.height() || e.clientX > $window.width()) {\n that.close(element);\n }\n },\n _mouseenterPopup: function (e) {\n var that = this;\n var popupElement = $(e.currentTarget);\n if (popupElement.parent().is(animationContainerSelector)) {\n return;\n }\n popupElement = popupElement.children('ul');\n var popupId = popupElement.data(POPUP_ID_ATTR);\n if (popupId) {\n that._openedPopups[popupId.toString()] = true;\n }\n },\n _mouseleavePopup: function (e) {\n var that = this;\n var popupElement = $(e.currentTarget);\n if (!isPointerTouch(e) && popupElement.is(animationContainerSelector)) {\n that._closePopups(popupElement.children('ul'));\n }\n },\n _closePopups: function (rootPopup) {\n var that = this;\n var overflowWrapper = that._overflowWrapper();\n var popupId = rootPopup.data(POPUP_ID_ATTR);\n if (popupId) {\n delete that._openedPopups[popupId.toString()];\n var groupParent = overflowWrapper.find(popupOpenerSelector(popupId));\n setTimeout(function () {\n if (that.options.openOnClick) {\n that._closeChildPopups(rootPopup);\n } else {\n if ($.isEmptyObject(that._openedPopups)) {\n var innerPopup = that._innerPopup(rootPopup);\n that._closeParentPopups(innerPopup);\n } else {\n that.close(groupParent, true);\n }\n }\n }, 0);\n }\n },\n _closeChildPopups: function (current) {\n var that = this;\n var overflowWrapper = that._overflowWrapper();\n $(getChildPopups(current, overflowWrapper)).each(function () {\n var popupOpener = overflowWrapper.find(popupOpenerSelector(this.data(POPUP_ID_ATTR)));\n that.close(popupOpener, true);\n });\n },\n _innerPopup: function (current) {\n var overflowWrapper = this._overflowWrapper();\n var popups = getChildPopups(current, overflowWrapper);\n return popups[popups.length - 1] || current;\n },\n _closeParentPopups: function (current) {\n var that = this;\n var overflowWrapper = that._overflowWrapper();\n var popupId = current.data(POPUP_ID_ATTR);\n var popupOpener = overflowWrapper.find(popupOpenerSelector(popupId));\n popupId = popupOpener.parent().data(POPUP_ID_ATTR);\n that.close(popupOpener, true);\n while (popupId && !that._openedPopups[popupId]) {\n if (popupOpener.parent().is(menuSelector)) {\n break;\n }\n popupOpener = overflowWrapper.find(popupOpenerSelector(popupId));\n that.close(popupOpener, true);\n popupId = popupOpener.parent().data(POPUP_ID_ATTR);\n }\n },\n _click: function (e) {\n var that = this, openHandle, options = that.options, target = $(kendo.eventTarget(e)), targetElement = target[0], nodeName = target[0] ? target[0].nodeName.toUpperCase() : '', formNode = nodeName == 'INPUT' || nodeName == 'SELECT' || nodeName == 'BUTTON' || nodeName == 'LABEL', link = target.closest(LINK_SELECTOR), element = target.closest(allItemsSelector), itemElement = element[0], href = link.attr('href'), childGroup, childGroupVisible, targetHref = target.attr('href'), sampleHref = $('').attr('href'), isLink = !!href && href !== sampleHref, isLocalLink = isLink && !!href.match(/^#/), isTargetLink = !!targetHref && targetHref !== sampleHref, overflowWrapper = that._overflowWrapper(), shouldCloseTheRootItem;\n if (targetElement && !targetElement.parentNode) {\n return;\n }\n if ($(target).hasClass('k-menu-expand-arrow')) {\n this._lastClickedElement = targetElement.parentElement;\n }\n while (targetElement && targetElement.parentNode != itemElement) {\n targetElement = targetElement.parentNode;\n }\n if ($(targetElement).is(templateSelector)) {\n return;\n }\n if (element.hasClass(DISABLEDSTATE)) {\n e.preventDefault();\n return;\n }\n if (!e.handled && that._triggerSelect(target, itemElement) && !formNode) {\n e.preventDefault();\n }\n e.handled = true;\n childGroup = element.children(popupSelector);\n if (overflowWrapper) {\n var childPopupId = element.data(POPUP_OPENER_ATTR);\n if (childPopupId) {\n childGroup = overflowWrapper.find(popupGroupSelector(childPopupId));\n }\n }\n childGroupVisible = childGroup.is(':visible');\n shouldCloseTheRootItem = options.openOnClick && childGroupVisible && that._isRootItem(element);\n if (options.closeOnClick && (!isLink || isLocalLink) && (!childGroup.length || shouldCloseTheRootItem)) {\n element.removeClass(HOVERSTATE).css('height');\n that._oldHoverItem = that._findRootParent(element);\n var item = that._parentsUntil(link, that.element, allItemsSelector);\n that._forceClose = !!overflowWrapper;\n that.close(item);\n that.clicked = false;\n if ('MSPointerUp'.indexOf(e.type) != -1) {\n e.preventDefault();\n }\n return;\n }\n if (isLink && e.enterKey) {\n link[0].click();\n }\n if ((!that._isRootItem(element) || options.openOnClick === false) && !options.openOnClick.subMenuItems && !kendo.support.touch && !(isPointerTouch(e) && that._isRootItem(element.closest(allItemsSelector)))) {\n return;\n }\n if (!isLink && !formNode && !isTargetLink) {\n e.preventDefault();\n }\n that.clicked = true;\n openHandle = childGroup.is(':visible') ? CLOSE : OPEN;\n if (!options.closeOnClick && openHandle == CLOSE) {\n return;\n }\n that[openHandle](element);\n },\n _parentsUntil: function (context, top, selector) {\n var overflowWrapper = this._overflowWrapper();\n if (!overflowWrapper) {\n return context.parentsUntil(top, selector);\n } else {\n var parents = overflowMenuParents(context, overflowWrapper);\n var result = [];\n $(parents).each(function () {\n var parent = $(this);\n if (parent.is(top)) {\n return false;\n }\n if (parent.is(selector)) {\n result.push(this);\n }\n });\n return $(result);\n }\n },\n _triggerSelect: function (target, itemElement) {\n target = target.is('.k-link') ? target : target.closest('.k-link');\n var selectHandler = target.data('selectHandler'), itemSelectEventData;\n if (selectHandler) {\n itemSelectEventData = this._getEventData(target);\n selectHandler.call(this, itemSelectEventData);\n }\n var isSelectItemDefaultPrevented = itemSelectEventData && itemSelectEventData.isDefaultPrevented();\n var isSelectDefaultPrevented = this._triggerEvent({\n item: itemElement,\n type: SELECT\n });\n return isSelectItemDefaultPrevented || isSelectDefaultPrevented;\n },\n _getEventData: function (target) {\n var eventData = {\n sender: this,\n target: target,\n _defaultPrevented: false,\n preventDefault: function () {\n this._defaultPrevented = true;\n },\n isDefaultPrevented: function () {\n return this._defaultPrevented;\n }\n };\n return eventData;\n },\n _documentClick: function (e) {\n var that = this;\n var target = $(e.target).hasClass('k-menu-expand-arrow') ? that._lastClickedElement : e.target;\n if (contains((that._overflowWrapper() || that.element)[0], target)) {\n that._lastClickedElement = undefined;\n return;\n }\n that.clicked = false;\n },\n _focus: function (e) {\n var that = this, target = e.target, hoverItem = that._hoverItem(), active = activeElement();\n if (target != that.wrapper[0] && !$(target).is(':kendoFocusable')) {\n e.stopPropagation();\n $(target).closest('.k-content').closest('.k-menu-group').closest('.k-item').addClass(FOCUSEDSTATE);\n that.wrapper.focus();\n return;\n }\n if (active === e.currentTarget) {\n if (hoverItem.length) {\n that._moveHover([], hoverItem);\n } else if (!that._oldHoverItem) {\n that._moveHover([], that.wrapper.children().first());\n }\n }\n },\n _keydown: function (e) {\n var that = this, key = e.keyCode, hoverItem = that._oldHoverItem, target, belongsToVertical, hasChildren, isRtl = kendo.support.isRtl(that.wrapper);\n if (e.target != e.currentTarget && key != keys.ESC) {\n return;\n }\n if (!hoverItem) {\n hoverItem = that._oldHoverItem = that._hoverItem();\n }\n belongsToVertical = that._itemBelongsToVertival(hoverItem);\n hasChildren = that._itemHasChildren(hoverItem);\n that._keyTriggered = true;\n if (key == keys.RIGHT) {\n target = that[isRtl ? '_itemLeft' : '_itemRight'](hoverItem, belongsToVertical, hasChildren);\n } else if (key == keys.LEFT) {\n target = that[isRtl ? '_itemRight' : '_itemLeft'](hoverItem, belongsToVertical, hasChildren);\n } else if (key == keys.DOWN) {\n target = that._itemDown(hoverItem, belongsToVertical, hasChildren);\n } else if (key == keys.UP) {\n target = that._itemUp(hoverItem, belongsToVertical, hasChildren);\n } else if (key == keys.HOME) {\n that._moveHover(hoverItem, hoverItem.parent().children().first());\n e.preventDefault();\n } else if (key == keys.END) {\n that._moveHover(hoverItem, hoverItem.parent().children().last());\n e.preventDefault();\n } else if (key == keys.ESC) {\n target = that._itemEsc(hoverItem, belongsToVertical);\n } else if (key == keys.ENTER || key == keys.SPACEBAR) {\n target = hoverItem.children('.k-link');\n if (target.length > 0) {\n that._click({\n target: target[0],\n preventDefault: function () {\n },\n enterKey: true\n });\n if (hasChildren && !hoverItem.hasClass(DISABLEDSTATE)) {\n that.open(hoverItem);\n that._moveHover(hoverItem, that._childPopupElement(hoverItem).children().first());\n } else {\n that._moveHover(hoverItem, that._findRootParent(hoverItem));\n }\n }\n } else if (key == keys.TAB) {\n target = that._findRootParent(hoverItem);\n that._moveHover(hoverItem, target);\n that._checkActiveElement();\n return;\n }\n if (target && target[0]) {\n e.preventDefault();\n e.stopPropagation();\n }\n },\n _hoverItem: function () {\n return this.wrapper.find('.k-item.k-state-hover,.k-item.k-state-focused').filter(':visible');\n },\n _itemBelongsToVertival: function (item) {\n var menuIsVertical = this.wrapper.hasClass('k-menu-vertical');\n if (!item.length) {\n return menuIsVertical;\n }\n return item.parent().hasClass('k-menu-group') || menuIsVertical;\n },\n _itemHasChildren: function (item) {\n if (!item || !item.length || !item[0].nodeType) {\n return false;\n }\n return item.children('.k-menu-group, div.k-animation-container').length > 0 || !!item.data(POPUP_OPENER_ATTR) && !!this._overflowWrapper().children(popupGroupSelector(item.data(POPUP_OPENER_ATTR)));\n },\n _moveHover: function (item, nextItem) {\n var that = this, id = that._ariaId;\n if (item.length && nextItem.length) {\n item.removeClass(FOCUSEDSTATE);\n }\n if (nextItem.length) {\n if (nextItem[0].id) {\n id = nextItem[0].id;\n }\n nextItem.addClass(FOCUSEDSTATE);\n that._oldHoverItem = nextItem;\n if (id) {\n that.element.removeAttr('aria-activedescendant');\n $('#' + id).removeAttr('id');\n nextItem.attr('id', id);\n that.element.attr('aria-activedescendant', id);\n }\n that._scrollToItem(nextItem);\n }\n },\n _findRootParent: function (item) {\n if (this._isRootItem(item)) {\n return item;\n } else {\n return this._parentsUntil(item, menuSelector, 'li.k-item').last();\n }\n },\n _isRootItem: function (item) {\n return item.parent().hasClass(MENU);\n },\n _itemRight: function (item, belongsToVertical, hasChildren) {\n var that = this, nextItem, parentItem, overflowWrapper;\n if (!belongsToVertical) {\n nextItem = item.nextAll(nextSelector);\n if (!nextItem.length) {\n nextItem = item.prevAll(lastSelector);\n }\n that.close(item);\n } else if (hasChildren && !item.hasClass(DISABLEDSTATE)) {\n that.open(item);\n nextItem = that._childPopupElement(item).children().first();\n } else if (that.options.orientation == 'horizontal') {\n parentItem = that._findRootParent(item);\n overflowWrapper = that._overflowWrapper();\n if (overflowWrapper) {\n var rootPopup = itemPopup(parentItem, overflowWrapper);\n that._closeChildPopups(rootPopup);\n }\n that.close(parentItem);\n nextItem = parentItem.nextAll(nextSelector);\n }\n if (nextItem && !nextItem.length) {\n nextItem = that.wrapper.children('.k-item').first();\n } else if (!nextItem) {\n nextItem = [];\n }\n that._moveHover(item, nextItem);\n return nextItem;\n },\n _itemLeft: function (item, belongsToVertical) {\n var that = this, nextItem, overflowWrapper;\n if (!belongsToVertical) {\n nextItem = item.prevAll(nextSelector);\n if (!nextItem.length) {\n nextItem = item.nextAll(lastSelector);\n }\n that.close(item);\n } else {\n nextItem = item.parent().closest('.k-item');\n overflowWrapper = that._overflowWrapper();\n if (!nextItem.length && overflowWrapper) {\n nextItem = popupParentItem(item.parent(), overflowWrapper);\n }\n that.close(nextItem);\n if (that._isRootItem(nextItem) && that.options.orientation == 'horizontal') {\n nextItem = nextItem.prevAll(nextSelector);\n }\n }\n if (!nextItem.length) {\n nextItem = that.wrapper.children('.k-item').last();\n }\n that._moveHover(item, nextItem);\n return nextItem;\n },\n _itemDown: function (item, belongsToVertical, hasChildren) {\n var that = this, nextItem;\n if (!belongsToVertical) {\n if (!hasChildren || item.hasClass(DISABLEDSTATE)) {\n return;\n } else {\n that.open(item);\n nextItem = that._childPopupElement(item).children().first();\n }\n } else {\n nextItem = item.nextAll(nextSelector);\n }\n if (!nextItem.length && item.length) {\n nextItem = item.parent().children().first();\n } else if (!item.length) {\n nextItem = that.wrapper.children('.k-item').first();\n }\n that._moveHover(item, nextItem);\n return nextItem;\n },\n _itemUp: function (item, belongsToVertical) {\n var that = this, nextItem;\n if (!belongsToVertical) {\n return;\n } else {\n nextItem = item.prevAll(nextSelector);\n }\n if (!nextItem.length && item.length) {\n nextItem = item.parent().children().last();\n } else if (!item.length) {\n nextItem = that.wrapper.children('.k-item').last();\n }\n that._moveHover(item, nextItem);\n return nextItem;\n },\n _scrollToItem: function (item) {\n var that = this;\n if (that.options.scrollable && item && item.length) {\n var ul = item.parent();\n var isHorizontal = ul.hasClass(MENU) ? that.options.orientation == 'horizontal' : false;\n var scrollDir = isHorizontal ? 'scrollLeft' : 'scrollTop';\n var getSize = isHorizontal ? kendo._outerWidth : kendo._outerHeight;\n var currentScrollOffset = ul[scrollDir]();\n var itemSize = getSize(item);\n var itemOffset = item[0][isHorizontal ? 'offsetLeft' : 'offsetTop'];\n var ulSize = getSize(ul);\n var scrollButtons = ul.siblings(scrollButtonSelector);\n var scrollButtonSize = scrollButtons.length ? getSize(scrollButtons.first()) : 0;\n var itemPosition;\n if (currentScrollOffset + ulSize < itemOffset + itemSize + scrollButtonSize) {\n itemPosition = itemOffset + itemSize - ulSize + scrollButtonSize;\n } else if (currentScrollOffset > itemOffset - scrollButtonSize) {\n itemPosition = itemOffset - scrollButtonSize;\n }\n if (!isNaN(itemPosition)) {\n var scrolling = {};\n scrolling[scrollDir] = itemPosition;\n ul.finish().animate(scrolling, 'fast', 'linear', function () {\n that._toggleScrollButtons(ul, scrollButtons.first(), scrollButtons.last(), isHorizontal);\n });\n }\n }\n },\n _itemEsc: function (item, belongsToVertical) {\n var that = this, nextItem;\n if (!belongsToVertical) {\n return item;\n } else {\n nextItem = item.parent().closest('.k-item');\n that.close(nextItem);\n that._moveHover(item, nextItem);\n }\n return nextItem;\n },\n _childPopupElement: function (item) {\n var popupElement = item.find('.k-menu-group');\n var wrapper = this._overflowWrapper();\n if (!popupElement.length && wrapper) {\n popupElement = itemPopup(item, wrapper);\n }\n return popupElement;\n },\n _triggerEvent: function (e) {\n var that = this;\n return that.trigger(e.type, {\n type: e.type,\n item: e.item\n });\n },\n _focusHandler: function (e) {\n var that = this, item = $(kendo.eventTarget(e)).closest(allItemsSelector);\n if (item.hasClass(DISABLEDSTATE)) {\n return;\n }\n setTimeout(function () {\n that._moveHover([], item);\n if (item.children('.k-content')[0]) {\n item.parent().closest('.k-item').removeClass(FOCUSEDSTATE);\n }\n }, 200);\n },\n _animations: function (options) {\n if (options && 'animation' in options && !options.animation) {\n options.animation = {\n open: { effects: {} },\n close: {\n hide: true,\n effects: {}\n }\n };\n }\n },\n _dataSource: function (options) {\n var that = this, dataSource = options ? options.dataSource : that.options.dataSource;\n if (!dataSource) {\n return;\n }\n dataSource = isArray(dataSource) ? { data: dataSource } : dataSource;\n that._unbindDataSource();\n if (!dataSource.fields) {\n dataSource.fields = [\n { field: 'uid' },\n { field: 'text' },\n { field: 'url' },\n { field: 'cssClass' },\n { field: 'spriteCssClass' },\n { field: 'imageUrl' },\n { field: 'imageAttr' },\n { field: 'attr' },\n { field: 'contentAttr' },\n { field: 'content' },\n { field: 'encoded' },\n { field: 'items' },\n { field: 'select' }\n ];\n }\n that.dataSource = HierarchicalDataSource.create(dataSource);\n that._bindDataSource();\n that.dataSource.fetch();\n },\n _bindDataSource: function () {\n this._refreshHandler = proxy(this.refresh, this);\n this._errorHandler = proxy(this._error, this);\n this.dataSource.bind(CHANGE, this._refreshHandler);\n this.dataSource.bind(ERROR, this._errorHandler);\n },\n _unbindDataSource: function () {\n var dataSource = this.dataSource;\n if (dataSource) {\n dataSource.unbind(CHANGE, this._refreshHandler);\n dataSource.unbind(ERROR, this._errorHandler);\n }\n },\n _error: function () {\n },\n findByUid: function (uid) {\n var wrapperElement = this._overflowWrapper() || this.element;\n return wrapperElement.find('[' + kendo.attr('uid') + '=' + uid + ']');\n },\n refresh: function (ev) {\n var that = this;\n var node = ev.node;\n var action = ev.action;\n var parentElement = node ? that.findByUid(node.uid) : that.element;\n var itemsToUpdate = ev.items;\n var index = ev.index;\n var updateProxy = $.proxy(that._updateItem, that);\n var removeProxy = $.proxy(that._removeItem, that);\n if (action == 'add') {\n that._appendItems(itemsToUpdate, index, parentElement);\n } else if (action == 'remove') {\n itemsToUpdate.forEach(removeProxy);\n } else if (action == 'itemchange') {\n itemsToUpdate.forEach(updateProxy);\n } else if (action === 'itemloaded') {\n that.append(ev.items, parentElement);\n } else {\n this._initData();\n }\n this.trigger(DATABOUND, {\n item: parentElement,\n dataItem: node\n });\n },\n _appendItems: function (items, index, parent) {\n var that = this;\n var referenceItem = parent.find(itemSelector).eq(index);\n if (referenceItem.length) {\n that.insertBefore(items, referenceItem);\n } else {\n that.append(items, parent);\n }\n },\n _removeItem: function (item) {\n var that = this;\n var element = that.findByUid(item.uid);\n that.remove(element);\n },\n _updateItem: function (item) {\n var that = this;\n var element = that.findByUid(item.uid);\n var nextElement = element.next();\n var parentNode = item.parentNode();\n that.remove(element);\n if (nextElement.length) {\n that.insertBefore(item, nextElement);\n } else {\n that.append(item, parentNode && that.findByUid(parentNode.uid));\n }\n },\n _accessors: function () {\n var that = this, options = that.options, i, field, textField, element = that.element;\n for (i in bindings) {\n field = options[bindings[i]];\n textField = element.attr(kendo.attr(i + '-field'));\n if (!field && textField) {\n field = textField;\n }\n if (!field) {\n field = i;\n }\n if (!isArray(field)) {\n field = [field];\n }\n options[bindings[i]] = field;\n }\n },\n _fieldAccessor: function (fieldName) {\n var fieldBindings = this.options[bindings[fieldName]] || [], count = fieldBindings.length, result = '(function(item) {';\n if (count === 0) {\n result += 'return item[\\'' + fieldName + '\\'];';\n } else {\n result += 'var levels = [' + $.map(fieldBindings, function (x) {\n return 'function(d){ return ' + kendo.expr(x) + '}';\n }).join(',') + '];';\n result += 'if(item.level){return levels[Math.min(item.level(), ' + count + '-1)](item);}else';\n result += '{return levels[' + count + '-1](item)}';\n }\n result += '})';\n return result;\n },\n _templates: function () {\n var that = this, options = that.options, fieldAccessor = proxy(that._fieldAccessor, that);\n if (options.template && typeof options.template == STRING) {\n options.template = template(options.template);\n } else if (!options.template) {\n options.template = template('# var text = ' + fieldAccessor('text') + '(data.item); #' + '# if (typeof data.item.encoded != \\'undefined\\' && data.item.encoded === false) {#' + '#= text #' + '# } else { #' + '#: text #' + '# } #');\n }\n that.templates = {\n content: template('#var contentHtml = ' + fieldAccessor('content') + '(item);#' + '
#= contentHtml || \\'\\' #
'),\n group: template('
    ' + '#= renderItems(data) #' + '
'),\n itemWrapper: template('# var url = ' + fieldAccessor('url') + '(item); #' + '# var imageUrl = ' + fieldAccessor('imageUrl') + '(item); #' + '# var imgAttributes = ' + fieldAccessor('imageAttr') + '(item);#' + '# var tag = url ? \\'a\\' : \\'span\\' #' + '<#= tag # class=\\'#= textClass(item) #\\' #if(url){#href=\\'#= url #\\'#}#>' + '# if (imageUrl) { #' + '\\'\\'' + '# } #' + '#= sprite(item) ##= data.menu.options.template(data) #' + '#= arrow(data) #' + ''),\n item: template('#var contentHtml = ' + fieldAccessor('content') + '(item);#' + '
  • ' + '#= itemWrapper(data) #' + '#if (item.hasChildren || item.items) { #' + '#= subGroup({ items: item.items, menu: menu, group: { expanded: item.expanded } }) #' + '# } else if (item.content || item.contentUrl || contentHtml) { #' + '#= renderContent(data) #' + '# } #' + '
  • '),\n scrollButton: template('' + ''),\n arrow: template(''),\n sprite: template('# var spriteCssClass = ' + fieldAccessor('spriteCssClass') + '(data); if(spriteCssClass) {##}#'),\n empty: template('')\n };\n },\n renderItem: function (options) {\n var that = this;\n options = extend({\n menu: that,\n group: {}\n }, options);\n var empty = that.templates.empty, item = options.item;\n return that.templates.item(extend(options, {\n sprite: that.templates.sprite,\n itemWrapper: that.templates.itemWrapper,\n renderContent: that.renderContent,\n arrow: item.items || item.content || item[that.options.dataContentField[0]] ? that.templates.arrow : empty,\n subGroup: that.renderGroup\n }, rendering));\n },\n renderGroup: function (options) {\n var that = this;\n var templates = that.templates || options.menu.templates;\n return templates.group(extend({\n renderItems: function (options) {\n var html = '', i = 0, items = options.items, len = items ? items.length : 0, group = extend({ length: len }, options.group);\n for (; i < len; i++) {\n html += options.menu.renderItem(extend(options, {\n group: group,\n item: extend({ index: i }, items[i])\n }));\n }\n return html;\n }\n }, options, rendering));\n },\n renderContent: function (options) {\n return options.menu.templates.content(extend(options, rendering));\n }\n });\n var ContextMenu = Menu.extend({\n init: function (element, options) {\n var that = this;\n Menu.fn.init.call(that, element, options);\n that._marker = kendo.guid().substring(0, 8);\n that.target = $(that.options.target);\n that._popup();\n that._wire();\n },\n _initOverflow: function (options) {\n var that = this;\n if (options.scrollable && !that._overflowWrapper()) {\n that._openedPopups = {};\n that._popupsWrapper = (that.element.parent().is(animationContainerSelector) ? that.element.parent() : that.element).wrap('
    ').parent();\n if (that.options.orientation == 'horizontal') {\n removeSpacesBetweenItems(that.element);\n }\n if (options.appendTo) {\n options.appendTo = $(options.appendTo);\n options.appendTo.append(that._popupsWrapper);\n }\n that._initialHeight = that.element[0].style.height;\n that._initialWidth = that.element[0].style.width;\n }\n },\n options: {\n name: 'ContextMenu',\n filter: null,\n showOn: 'contextmenu',\n orientation: 'vertical',\n alignToAnchor: false,\n copyAnchorStyles: true,\n target: 'body'\n },\n events: [\n OPEN,\n CLOSE,\n ACTIVATE,\n DEACTIVATE,\n SELECT\n ],\n setOptions: function (options) {\n var that = this;\n Menu.fn.setOptions.call(that, options);\n that.target.off(that.showOn + NS + that._marker, that._showProxy);\n if (that.userEvents) {\n that.userEvents.destroy();\n }\n that.target = $(that.options.target);\n if (options.orientation && that.popup.wrapper[0]) {\n that.popup.element.unwrap();\n }\n that._wire();\n Menu.fn.setOptions.call(this, options);\n },\n destroy: function () {\n var that = this;\n that.target.off(that.options.showOn + NS + that._marker);\n DOCUMENT_ELEMENT.off(kendo.support.mousedown + NS + that._marker, that._closeProxy);\n if (that.userEvents) {\n that.userEvents.destroy();\n }\n Menu.fn.destroy.call(that);\n },\n open: function (x, y) {\n var that = this;\n x = $(x)[0];\n if (contains(that.element[0], $(x)[0]) || that._itemHasChildren($(x))) {\n Menu.fn.open.call(that, x);\n } else {\n if (that._triggerEvent({\n item: that.element,\n type: OPEN\n }) === false) {\n if (that.popup.visible() && that.options.filter) {\n that.popup.close(true);\n that.popup.element.kendoStop(true);\n }\n if (y !== undefined) {\n var overflowWrapper = that._overflowWrapper();\n if (overflowWrapper) {\n var offset = overflowWrapper.offset();\n x -= offset.left;\n y -= offset.top;\n }\n that.popup.wrapper.hide();\n that._configurePopupScrolling(x, y);\n that.popup.open(x, y);\n } else {\n that.popup.options.anchor = (x ? x : that.popup.anchor) || that.target;\n that.popup.element.kendoStop(true);\n that._configurePopupScrolling();\n that.popup.open();\n }\n DOCUMENT_ELEMENT.off(that.popup.downEvent, that.popup._mousedownProxy);\n DOCUMENT_ELEMENT.on(kendo.support.mousedown + NS + that._marker, that._closeProxy);\n }\n }\n return that;\n },\n _configurePopupScrolling: function (x, y) {\n var that = this;\n var popup = that.popup;\n var isHorizontal = that.options.orientation == 'horizontal';\n if (that.options.scrollable) {\n that._wrapPopupElement(popup);\n popup.element.parent().css({\n position: '',\n height: ''\n });\n popup.element.css({\n visibility: 'hidden',\n display: '',\n position: ''\n });\n if (isHorizontal) {\n that._setPopupWidth(popup, isNaN(x) ? undefined : {\n isFixed: true,\n x: x,\n y: y\n });\n } else {\n that._setPopupHeight(popup, isNaN(x) ? undefined : {\n isFixed: true,\n x: x,\n y: y\n });\n }\n popup.element.css({\n visibility: '',\n display: 'none',\n position: 'absolute'\n });\n that._initPopupScrollButtons(popup, isHorizontal, true);\n popup.element.siblings(scrollButtonSelector).hide();\n }\n },\n _setPopupWidth: function (popup, isFixed) {\n var popupElement = popup.element;\n var popups = popupElement.add(popupElement.parent(animationContainerSelector));\n popups.width(this._initialWidth || '');\n var location = popup._location(isFixed);\n var windowWidth = $(window).width();\n var popupOuterWidth = location.width;\n var popupOffsetLeft = Math.max(location.left, 0);\n var scrollLeft = isFixed ? 0 : parentsScroll(this._overflowWrapper()[0], 'scrollLeft');\n var shadow = kendo.getShadows(popupElement);\n var maxWidth = windowWidth - shadow.left - shadow.right;\n var canFit = maxWidth + scrollLeft > popupOuterWidth + popupOffsetLeft;\n if (!canFit) {\n popups.css({\n overflow: 'hidden',\n width: maxWidth - popupOffsetLeft + scrollLeft + 'px'\n });\n }\n },\n close: function () {\n var that = this;\n if (contains(that.element[0], $(arguments[0])[0]) || that._itemHasChildren(arguments[0])) {\n Menu.fn.close.call(that, arguments[0]);\n } else {\n if (that.popup.visible()) {\n if (that._triggerEvent({\n item: that.element,\n type: CLOSE\n }) === false) {\n that.popup.close();\n DOCUMENT_ELEMENT.off(kendo.support.mousedown + NS + that._marker, that._closeProxy);\n that.unbind(SELECT, that._closeTimeoutProxy);\n }\n }\n }\n },\n _showHandler: function (e) {\n var ev = e, offset, that = this, options = that.options, target = kendo.support.mobileOS ? $(ev.target) : $(ev.currentTarget);\n if (e.event) {\n ev = e.event;\n ev.pageX = e.x.location;\n ev.pageY = e.y.location;\n }\n if (contains(that.element[0], e.relatedTarget || e.target)) {\n return;\n }\n that._eventOrigin = ev;\n ev.preventDefault();\n ev.stopImmediatePropagation();\n that.element.find('.' + FOCUSEDSTATE).removeClass(FOCUSEDSTATE);\n if (options.filter && target.is(options.filter) || !options.filter) {\n if (options.alignToAnchor) {\n that.popup.options.anchor = ev.currentTarget;\n that.open(ev.currentTarget);\n } else {\n that.popup.options.anchor = ev.currentTarget;\n if (that._targetChild) {\n offset = that.target.offset();\n that.open(ev.pageX - offset.left, ev.pageY - offset.top);\n } else {\n that.open(ev.pageX, ev.pageY);\n }\n }\n }\n },\n _closeHandler: function (e) {\n var that = this, target = $(e.relatedTarget || e.target), sameTarget = target.closest(that.target.selector)[0] == that.target[0], item = target.closest(itemSelector), children = that._itemHasChildren(item), overflowWrapper = that._overflowWrapper(), containment = contains(that.element[0], target[0]) || overflowWrapper && contains(overflowWrapper[0], target[0]);\n that._eventOrigin = e;\n var normalClick = e.which !== 3;\n if (that.popup.visible() && (normalClick && sameTarget || !sameTarget) && (that.options.closeOnClick && !children && containment || !containment)) {\n if (containment) {\n this.unbind(SELECT, this._closeTimeoutProxy);\n that.bind(SELECT, that._closeTimeoutProxy);\n } else {\n that.close();\n }\n }\n },\n _wire: function () {\n var that = this, options = that.options, target = that.target;\n that._preventProxy = null;\n that._showProxy = proxy(that._showHandler, that);\n that._closeProxy = proxy(that._closeHandler, that);\n that._closeTimeoutProxy = proxy(that.close, that);\n if (target[0]) {\n if (kendo.support.mobileOS && options.showOn == 'contextmenu') {\n that.userEvents = new kendo.UserEvents(target, {\n filter: options.filter,\n allowSelection: false\n });\n that._preventProxy = function () {\n return false;\n };\n that.userEvents.bind('hold', that._showProxy);\n }\n if (options.filter) {\n target.on(options.showOn + NS + that._marker, options.filter, that._preventProxy || that._showProxy);\n } else {\n target.on(options.showOn + NS + that._marker, that._preventProxy || that._showProxy);\n }\n }\n },\n _triggerEvent: function (e) {\n var that = this, anchor = $(that.popup.options.anchor)[0], origin = that._eventOrigin;\n that._eventOrigin = undefined;\n return that.trigger(e.type, extend({\n type: e.type,\n item: e.item || this.element[0],\n target: anchor\n }, origin ? { event: origin } : {}));\n },\n _popup: function () {\n var that = this;\n var overflowWrapper = that._overflowWrapper();\n that._triggerProxy = proxy(that._triggerEvent, that);\n that.popup = that.element.addClass('k-context-menu').kendoPopup({\n autosize: that.options.orientation === 'horizontal',\n anchor: that.target || 'body',\n copyAnchorStyles: that.options.copyAnchorStyles,\n collision: that.options.popupCollision || 'fit',\n animation: that.options.animation,\n activate: that._triggerProxy,\n deactivate: that._triggerProxy,\n appendTo: overflowWrapper || that.options.appendTo,\n close: !overflowWrapper ? $.noop : function (e) {\n $(getChildPopups(e.sender.element, overflowWrapper)).each(function (i, p) {\n var popup = p.data(KENDOPOPUP);\n if (popup) {\n popup.close(true);\n }\n });\n }\n }).data(KENDOPOPUP);\n that._targetChild = contains(that.target[0], that.popup.element[0]);\n }\n });\n ui.plugin(Menu);\n ui.plugin(ContextMenu);\n }(window.kendo.jQuery));\n return window.kendo;\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));"]}