\");\n\n\t list.popup = new ui.Popup(list.list.parent(), extend({}, list.options.popup, {\n\t anchor: list.wrapper,\n\t open: proxy(list._openHandler, list),\n\t close: proxy(list._closeHandler, list),\n\t animation: list.options.animation,\n\t isRtl: support.isRtl(list.wrapper),\n\t autosize: list.options.autoWidth\n\t }));\n\n\t list.popup.element.prepend(list.header)\n\t .on(MOUSEDOWN + this.ns, proxy(this._listMousedown, this));\n\t },\n\n\t _toggleHover: function(e) {\n\t $(e.currentTarget).toggleClass(HOVER, e.type === MOUSEENTER);\n\t },\n\n\t _toggle: function(open, preventFocus) {\n\t var that = this;\n\t var touchEnabled = support.mobileOS && (support.touch || support.MSPointers || support.pointers);\n\n\t open = open !== undefined ? open : !that.popup.visible();\n\n\t if (!preventFocus && !touchEnabled && that._focused[0] !== activeElement()) {\n\t that._prevent = true;\n\t that._focused.trigger(FOCUS);\n\t that._prevent = false;\n\t }\n\n\t that[open ? OPEN : CLOSE]();\n\t },\n\n\t _triggerCascade: function() {\n\t var that = this;\n\n\t if (!that._cascadeTriggered || that.value() !== unifyType(that._cascadedValue, typeof that.value())) {\n\t that._cascadedValue = that.value();\n\t that._cascadeTriggered = true;\n\t that.trigger(CASCADE, { userTriggered: that._userTriggered });\n\t }\n\t },\n\n\t _triggerChange: function() {\n\t if (this._valueBeforeCascade !== this.value()) {\n\t this.trigger(CHANGE);\n\t }\n\t },\n\n\t _unbindDataSource: function() {\n\t var that = this;\n\n\t that.dataSource.unbind(REQUESTSTART, that._requestStartHandler)\n\t .unbind(REQUESTEND, that._requestEndHandler)\n\t .unbind(\"error\", that._errorHandler);\n\t },\n\n\t requireValueMapper: function(options, value) {\n\t var hasValue = (options.value instanceof Array ? options.value.length : options.value) || (value instanceof Array ? value.length : value);\n\t if (hasValue && options.virtual && typeof options.virtual.valueMapper !== \"function\") {\n\t throw new Error(\"ValueMapper is not provided while the value is being set. See http://docs.telerik.com/kendo-ui/controls/editors/combobox/virtualization#the-valuemapper-function\");\n\t }\n\t }\n\t });\n\n\t function unifyType(value, type) {\n\t if (value !== undefined && value !== \"\" && value !== null) {\n\t if (type === \"boolean\") {\n\t if (typeof value !== \"boolean\") {\n\t value = value.toString().toLowerCase() === \"true\";\n\t }\n\t value = Boolean(value);\n\t } else if (type === \"number\") {\n\t value = Number(value);\n\t } else if (type === \"string\") {\n\t value = value.toString();\n\t }\n\t }\n\n\t return value;\n\t }\n\n\t extend(List, {\n\t inArray: function(node, parentNode) {\n\t var idx, length, siblings = parentNode.children;\n\n\t if (!node || node.parentNode !== parentNode) {\n\t return -1;\n\t }\n\n\t for (idx = 0, length = siblings.length; idx < length; idx++) {\n\t if (node === siblings[idx]) {\n\t return idx;\n\t }\n\t }\n\n\t return -1;\n\t },\n\t unifyType: unifyType\n\t });\n\n\t kendo.ui.List = List;\n\n\t ui.Select = List.extend({\n\t init: function(element, options) {\n\t List.fn.init.call(this, element, options);\n\t this._initial = this.element.val();\n\t },\n\n\t setDataSource: function(dataSource) {\n\t var that = this;\n\t var parent;\n\n\t that.options.dataSource = dataSource;\n\n\t that._dataSource();\n\n\t if (that.listView.bound()) {\n\t that._initialIndex = null;\n\t that.listView._current = null;\n\t }\n\n\t that.listView.setDataSource(that.dataSource);\n\n\t if (that.options.autoBind) {\n\t that.dataSource.fetch();\n\t }\n\n\t parent = that._parentWidget();\n\n\t if (parent) {\n\t that._cascadeSelect(parent);\n\t }\n\t },\n\n\t close: function() {\n\t this.popup.close();\n\t },\n\n\t select: function(candidate) {\n\t var that = this;\n\n\t if (candidate === undefined) {\n\t return that.selectedIndex;\n\t } else {\n\t return that._select(candidate).done(function() {\n\t that._cascadeValue = that._old = that._accessor();\n\t that._oldIndex = that.selectedIndex;\n\t });\n\t }\n\t },\n\n\t _accessor: function(value, idx) {\n\t return this[this._isSelect ? \"_accessorSelect\" : \"_accessorInput\"](value, idx);\n\t },\n\n\t _accessorInput: function(value) {\n\t var element = this.element[0];\n\n\t if (value === undefined) {\n\t return element.value;\n\t } else {\n\t if (value === null) {\n\t value = \"\";\n\t }\n\t element.value = value;\n\t }\n\t },\n\n\t _accessorSelect: function(value, idx) {\n\t var element = this.element[0];\n\t var hasValue;\n\n\t if (value === undefined) {\n\t return getSelectedOption(element).value || \"\";\n\t }\n\n\t getSelectedOption(element).selected = false;\n\n\t if (idx === undefined) {\n\t idx = -1;\n\t }\n\n\t hasValue = (value !== null && value !== \"\");\n\n\t if (hasValue && idx == -1) {\n\t this._custom(value);\n\t } else {\n\t if (value) {\n\t element.value = value;\n\t } else {\n\t element.selectedIndex = idx;\n\t }\n\t }\n\t },\n\n\t _syncValueAndText: function() {\n\t return true;\n\t },\n\n\t _custom: function(value) {\n\t var that = this;\n\t var element = that.element;\n\t var custom = that._customOption;\n\n\t if (!custom) {\n\t custom = $(\"
\");\n\t that._customOption = custom;\n\n\t element.append(custom);\n\t }\n\n\t custom.text(value);\n\t custom[0].selected = true;\n\t },\n\n\t _hideBusy: function() {\n\t var that = this;\n\t clearTimeout(that._busy);\n\t that._arrowIcon.removeClass(LOADING);\n\t that._focused.attr(ARIA_BUSY, false);\n\t that._busy = null;\n\t that._showClear();\n\t },\n\n\t _showBusy: function(e) {\n\t var that = this;\n\n\t if (e.isDefaultPrevented()) {\n\t return;\n\t }\n\n\t that._request = true;\n\n\t if (that._busy) {\n\t return;\n\t }\n\n\t that._busy = setTimeout(function() {\n\t if (that._arrowIcon) { //destroyed after request start\n\t that._focused.attr(ARIA_BUSY, true);\n\t that._arrowIcon.addClass(LOADING);\n\t that._hideClear();\n\t }\n\t }, 100);\n\t },\n\n\t _requestEnd: function() {\n\t this._request = false;\n\t this._hideBusy();\n\t },\n\n\t _dataSource: function() {\n\t var that = this,\n\t element = that.element,\n\t options = that.options,\n\t dataSource = options.dataSource || {},\n\t idx;\n\n\t dataSource = Array.isArray(dataSource) ? { data: dataSource } : dataSource;\n\n\t if (that._isSelect) {\n\t idx = element[0].selectedIndex;\n\t if (idx > -1) {\n\t options.index = idx;\n\t }\n\n\t dataSource.select = element;\n\t dataSource.fields = [{ field: options.dataTextField },\n\t { field: options.dataValueField }];\n\t }\n\n\t if (that.dataSource) {\n\t that._unbindDataSource();\n\t } else {\n\t that._requestStartHandler = proxy(that._showBusy, that);\n\t that._requestEndHandler = proxy(that._requestEnd, that);\n\t that._errorHandler = proxy(that._hideBusy, that);\n\t }\n\n\t that.dataSource = kendo.data.DataSource.create(dataSource)\n\t .bind(REQUESTSTART, that._requestStartHandler)\n\t .bind(REQUESTEND, that._requestEndHandler)\n\t .bind(\"error\", that._errorHandler);\n\t },\n\n\t _firstItem: function() {\n\t this.listView.focusFirst();\n\t },\n\n\t _lastItem: function() {\n\t this.listView.focusLast();\n\t },\n\n\t _nextItem: function() {\n\t return this.listView.focusNext();\n\t },\n\n\t _prevItem: function() {\n\t return this.listView.focusPrev();\n\t },\n\n\t _getNormalizedDataItem: function(candidate) {\n\t var that = this,\n\t listView = that.listView,\n\t isIndex = typeof candidate === \"number\",\n\t hasOptionLabel = that.optionLabel && that.optionLabel.length,\n\t index;\n\n\t if (isIndex) {\n\t index = hasOptionLabel ? --candidate : candidate;\n\t } else {\n\t index = listView.getElementIndex(candidate);\n\t }\n\n\t return listView.dataItemByIndex(index);\n\t },\n\n\t _getNormalizedSelectCandidate: function(candidate) {\n\t var that = this,\n\t hasOptionLabel = that.optionLabel && that.optionLabel.length,\n\t isIndex = typeof candidate === \"number\",\n\t normalizedCandidate = candidate;\n\n\t if (hasOptionLabel && isIndex) {\n\t normalizedCandidate++;\n\t }\n\n\t return normalizedCandidate;\n\t },\n\n\t _move: function(e) {\n\t var that = this;\n\t var listView = that.listView;\n\t var key = e.keyCode;\n\t var down = key === keys.DOWN;\n\t var isVirtual = that.options.virtual;\n\t var dataItem;\n\t var pressed;\n\t var current;\n\t var moveIndex;\n\t var selectCandidate;\n\n\t if (key === keys.UP || down) {\n\t if (e.altKey) {\n\t that.toggle(down);\n\t } else {\n\t if (!listView.bound() && !that.ul[0].firstChild) {\n\t if (!that._fetch) {\n\t that.dataSource.one(CHANGE, function() {\n\t that._fetch = false;\n\t that._move(e);\n\t });\n\n\t that._fetch = true;\n\t that._filterSource();\n\t }\n\n\t e.preventDefault();\n\n\t return true; //pressed\n\t }\n\n\t current = that._focus();\n\n\t if (!that._fetch && (!current || current.hasClass(KSELECTED))) {\n\t if (down) {\n\t moveIndex = that._nextItem();\n\n\t if ((isVirtual && moveIndex <= 0) || (!that._focus() && !moveIndex) ) {\n\t that._lastItem();\n\t }\n\t } else {\n\t moveIndex = that._prevItem();\n\n\t if ((isVirtual && moveIndex >= listView.dataSource.total() - 1) || (!that._focus() && !moveIndex)) {\n\t that._firstItem();\n\t }\n\t }\n\t }\n\n\t selectCandidate = that._getNormalizedSelectCandidate(that._get(that._focus()) || moveIndex || 0);\n\n\t that._select(selectCandidate, true).done(function() {\n\t var done = function() {\n\t if (!that.popup.visible()) {\n\t that._blur();\n\t }\n\n\t if (that._cascadedValue === null) {\n\t that._cascadedValue = that.value();\n\t } else {\n\t that._cascadedValue = that.dataItem() ? that.dataItem()[that.options.dataValueField] || that.dataItem() : null;\n\t }\n\t };\n\n\t if (that.trigger(SELECT, { dataItem: that._getNormalizedDataItem(selectCandidate), item: that._focus() })) {\n\t that._select(current).done(done);\n\t } else {\n\t done();\n\t }\n\t });\n\t }\n\n\t e.preventDefault();\n\t pressed = true;\n\t } else if (key === keys.ENTER || key === keys.TAB) {\n\t if (that.popup.visible()) {\n\t e.preventDefault();\n\t }\n\n\t current = that._focus();\n\t dataItem = that.dataItem();\n\n\t if (!that.popup.visible() && (!dataItem || that.text() !== that._text(dataItem))) {\n\t current = null;\n\t }\n\n\t var activeFilter = that.filterInput && that.filterInput[0] === activeElement();\n\t var selection;\n\n\t if (current) {\n\t dataItem = listView.dataItemByIndex(listView.getElementIndex(current));\n\t var shouldTrigger = true;\n\n\t if (dataItem) {\n\t shouldTrigger = that._value(dataItem) !== List.unifyType(that.value(), typeof that._value(dataItem));\n\t }\n\n\t if (shouldTrigger && that.trigger(SELECT, { dataItem: dataItem, item: current })) {\n\t return;\n\t }\n\n\t selection = that._select(current);\n\t } else if (that.input) {\n\t if (that._syncValueAndText() || that._isSelect) {\n\t that._accessor(that.input.val());\n\t }\n\t that.listView.value(that.input.val());\n\t }\n\n\t if (that._focusElement) {\n\t that._focusElement(that.wrapper);\n\t }\n\n\t if (activeFilter && key === keys.TAB) {\n\t that.wrapper.focusout();\n\t } else {\n\t if (selection && typeof selection.done === \"function\") {\n\t selection.done(function() {\n\t that._blur();\n\t });\n\t } else {\n\t that._blur();\n\t }\n\t }\n\n\t that.close();\n\t pressed = true;\n\t } else if (key === keys.ESC) {\n\t if (that.popup.visible()) {\n\t e.preventDefault();\n\t }\n\t that.close();\n\t pressed = true;\n\t } else if (that.popup.visible() && (key === keys.PAGEDOWN || key === keys.PAGEUP)) {\n\t e.preventDefault();\n\n\t var direction = key === keys.PAGEDOWN ? 1 : -1;\n\t listView.scrollWith(direction * listView.screenHeight());\n\n\t pressed = true;\n\t }\n\n\t return pressed;\n\t },\n\n\t _fetchData: function() {\n\t var that = this;\n\t var hasItems = !!that.dataSource.view().length;\n\n\t if (that._request || that.options.cascadeFrom) {\n\t return;\n\t }\n\n\t if (!that.listView.bound() && !that._fetch && !hasItems) {\n\t that._fetch = true;\n\t that.dataSource.fetch().done(function() {\n\t that._fetch = false;\n\t });\n\t }\n\t },\n\n\t _options: function(data, optionLabel, value) {\n\t var that = this,\n\t element = that.element,\n\t htmlElement = element[0],\n\t length = data.length,\n\t options = \"\",\n\t option,\n\t dataItem,\n\t dataText,\n\t dataValue,\n\t idx = 0;\n\n\t if (optionLabel) {\n\t options = optionLabel;\n\t }\n\n\t for (; idx < length; idx++) {\n\t option = \"
\";\n\t options += option;\n\t }\n\n\t element.html(options);\n\n\t if (value !== undefined) {\n\t htmlElement.value = value;\n\t if (htmlElement.value && !value) {\n\t htmlElement.selectedIndex = -1;\n\t }\n\t }\n\n\t if (htmlElement.selectedIndex !== -1) {\n\t option = getSelectedOption(htmlElement);\n\n\t if (option) {\n\t option.setAttribute(SELECTED, SELECTED);\n\t }\n\t }\n\t },\n\n\t _reset: function() {\n\t var that = this,\n\t element = that.element,\n\t formId = element.attr(\"form\"),\n\t form = formId ? $(\"#\" + formId) : element.closest(\"form\");\n\n\t if (form[0]) {\n\t that._resetHandler = function() {\n\t setTimeout(function() {\n\t that.value(that._initial);\n\t });\n\t };\n\n\t that._form = form.on(\"reset\", that._resetHandler);\n\t }\n\t },\n\n\t _parentWidget: function() {\n\t var name = this.options.name;\n\n\t if (!this.options.cascadeFrom) {\n\t return;\n\t }\n\n\t var parentElement = $(\"#\" + this.options.cascadeFrom);\n\t var parent = parentElement.data(\"kendo\" + name);\n\n\t if (!parent) {\n\t for (var i = 0; i < alternativeNames[name].length; i += 1) {\n\t parent = parentElement.data(\"kendo\" + alternativeNames[name][i]);\n\n\t if (!!parent) {\n\t break;\n\t }\n\t }\n\t }\n\n\t return parent;\n\t },\n\n\t _cascade: function() {\n\t var that = this;\n\t var options = that.options;\n\t var cascade = options.cascadeFrom;\n\t var parent;\n\n\t if (cascade) {\n\t parent = that._parentWidget();\n\n\t if (!parent) {\n\t return;\n\t }\n\n\t that._cascadeHandlerProxy = proxy(that._cascadeHandler, that);\n\t that._cascadeFilterRequests = [];\n\n\t options.autoBind = false;\n\n\t parent.bind(\"set\", function() { //will cascade\n\t that.one(\"set\", function(e) { //get your value\n\t that._selectedValue = e.value || that._accessor();\n\t });\n\t });\n\n\t parent.first(CASCADE, that._cascadeHandlerProxy);\n\n\t //refresh was called\n\t if (parent.listView.bound()) {\n\t that._toggleCascadeOnFocus();\n\t that._cascadeSelect(parent);\n\t } else {\n\t parent.one(DATA_BOUND, function() {\n\t that._toggleCascadeOnFocus();\n\t if (parent.popup.visible()) {\n\t parent._focused.trigger(FOCUS);\n\t }\n\t });\n\n\t if (!parent.value()) {\n\t that.enable(false);\n\t }\n\t }\n\t }\n\t },\n\n\t _toggleCascadeOnFocus: function() {\n\t var that = this;\n\t var parent = that._parentWidget();\n\t var focusout = isIE && parent instanceof ui.DropDownList ? BLUR : FOCUSOUT;\n\n\t parent._focused.add(parent.filterInput).on(FOCUS, function() {\n\t parent.unbind(CASCADE, that._cascadeHandlerProxy);\n\t parent.unbind(CHANGE, that._cascadeHandlerProxy);\n\t parent.first(CHANGE, that._cascadeHandlerProxy);\n\t });\n\n\t parent._focused.add(parent.filterInput).on(focusout, function() {\n\t parent.unbind(CHANGE, that._cascadeHandlerProxy);\n\t parent.unbind(CASCADE, that._cascadeHandlerProxy);\n\t parent.first(CASCADE, that._cascadeHandlerProxy);\n\t });\n\t },\n\n\t _cascadeHandler: function(e) {\n\t var parent = this._parentWidget();\n\t var valueBeforeCascade = this.value();\n\n\t this._userTriggered = e.userTriggered || parent._userTriggered;\n\n\t if (this.listView.bound()) {\n\t this._clearSelection(parent, true);\n\t }\n\n\t this._cascadeSelect(parent, valueBeforeCascade);\n\t },\n\n\t _cascadeChange: function(parent) {\n\t var that = this;\n\t var value = that._accessor() || that._selectedValue;\n\n\t if (!that._cascadeFilterRequests.length) {\n\t that._selectedValue = null;\n\t }\n\n\t if (that._userTriggered) {\n\t that._clearSelection(parent, true);\n\t } else if (value) {\n\t if (value !== unifyType(that.listView.value()[0], typeof value)) {\n\t that.value(value);\n\t }\n\n\t if (!that.dataSource.view()[0] || that.selectedIndex === -1) {\n\t that._clearSelection(parent, true);\n\t }\n\t } else if (that.dataSource.flatView().length) {\n\t that.select(that.options.index);\n\t }\n\n\t that.enable();\n\t that._triggerCascade();\n\t that._triggerChange();\n\t that._userTriggered = false;\n\t },\n\n\t _cascadeSelect: function(parent, valueBeforeCascade) {\n\t var that = this;\n\t var dataItem = parent.dataItem();\n\t var filterValue = dataItem ? dataItem[that.options.cascadeFromParentField] || parent._value(dataItem) : null;\n\t var valueField = that.options.cascadeFromField || parent.options.dataValueField;\n\t var expressions;\n\n\t that._valueBeforeCascade = valueBeforeCascade !== undefined ? valueBeforeCascade : that.value();\n\n\t if (filterValue || filterValue === 0) {\n\t expressions = that.dataSource.filter() || {};\n\t removeFiltersForField(expressions, valueField);\n\n\t var handler = function() {\n\t var currentHandler = that._cascadeFilterRequests.shift();\n\t if (currentHandler) {\n\t that.unbind('dataBound', currentHandler);\n\t }\n\n\t currentHandler = that._cascadeFilterRequests[0];\n\t if (currentHandler) {\n\t that.first('dataBound', currentHandler);\n\t }\n\n\t that._cascadeChange(parent);\n\t };\n\n\t that._cascadeFilterRequests.push(handler);\n\n\t if (that._cascadeFilterRequests.length === 1) {\n\t that.first('dataBound', handler);\n\t }\n\n\t that._cascading = true;\n\t that._filterSource({\n\t field: valueField,\n\t operator: \"eq\",\n\t value: filterValue\n\t });\n\t that._cascading = false;\n\t } else {\n\t that.enable(false);\n\t that._clearSelection(parent);\n\t that._triggerCascade();\n\t that._triggerChange();\n\t that._userTriggered = false;\n\t }\n\t }\n\t });\n\n\t var STATIC_LIST_NS = \".StaticList\";\n\n\t var StaticList = kendo.ui.DataBoundWidget.extend({\n\t init: function(element, options) {\n\t Widget.fn.init.call(this, element, options);\n\n\t this.element.attr(\"role\", \"listbox\")\n\t .on(CLICK + STATIC_LIST_NS, \"li\", proxy(this._click, this))\n\t .on(MOUSEENTER + STATIC_LIST_NS, \"li\", function() { $(this).addClass(HOVER); })\n\t .on(MOUSELEAVE + STATIC_LIST_NS, \"li\", function() { $(this).removeClass(HOVER); });\n\n\t if (options && options.ariaLabel) {\n\t this.element.attr(ARIA_LABEL, options.ariaLabel);\n\t } else if (options && options.ariaLabelledBy) {\n\t this.element.attr(ARIA_LABELLEDBY, options.ariaLabelledBy);\n\t }\n\n\t if (support.touch) {\n\t this._touchHandlers();\n\t }\n\n\t if (this.options.selectable === \"multiple\") {\n\t this.element.attr(ARIA_MULTISELECTABLE, true);\n\t }\n\n\t if (this.options.columns && this.options.columns.length) {\n\t var thead = this.element.parent().find('.k-table-thead');\n\t var row = $('
' +\n\t ' | ' +\n\t '
');\n\n\t thead.append(row);\n\n\t this.header = row.find(\".k-table-th\");\n\n\t this.content = this.element.wrap(\"
\").parent();\n\n\t this.element.addClass(TABLE_LIST);\n\t } else {\n\t this.content = this.element.wrap(\"
\").parent();\n\t this.header = this.content.before('').prev();\n\t this.element.addClass(LIST_UL);\n\t }\n\n\t this.bound(false);\n\n\t this._optionID = kendo.guid();\n\n\t this._selectedIndices = [];\n\n\t this._view = [];\n\t this._dataItems = [];\n\t this._values = [];\n\n\t var value = this.options.value;\n\n\t if (value) {\n\t this._values = Array.isArray(value) ? value.slice(0) : [value];\n\t }\n\n\t this._getter();\n\t this._templates();\n\n\t this.setDataSource(this.options.dataSource);\n\n\t this._onScroll = proxy(function() {\n\t var that = this;\n\t clearTimeout(that._scrollId);\n\n\t that._scrollId = setTimeout(function() {\n\t that._renderHeader();\n\t }, 50);\n\t }, this);\n\t },\n\n\t options: {\n\t name: \"StaticList\",\n\t dataValueField: null,\n\t valuePrimitive: false,\n\t selectable: true,\n\t template: null,\n\t groupTemplate: null,\n\t fixedGroupTemplate: null,\n\t ariaLabel: null,\n\t ariaLabelledBy: null\n\t },\n\n\t events: [\n\t CLICK,\n\t CHANGE,\n\t ACTIVATE,\n\t DEACTIVATE,\n\t DATA_BINDING,\n\t DATA_BOUND,\n\t SELECTED_ITEM_CHANGE\n\t ],\n\n\t setDataSource: function(source) {\n\t var that = this;\n\t var dataSource = source || {};\n\t var value;\n\n\t dataSource = Array.isArray(dataSource) ? { data: dataSource } : dataSource;\n\t dataSource = kendo.data.DataSource.create(dataSource);\n\n\t if (that.dataSource) {\n\t that.dataSource.unbind(CHANGE, that._refreshHandler);\n\n\t value = that.value();\n\n\t that.value([]);\n\t that.bound(false);\n\n\t that.value(value);\n\t } else {\n\t that._refreshHandler = proxy(that.refresh, that);\n\t }\n\n\t that.setDSFilter(dataSource.filter());\n\n\t that.dataSource = dataSource.bind(CHANGE, that._refreshHandler);\n\t that._fixedHeader();\n\t },\n\n\t _touchHandlers: function() {\n\t var that = this;\n\t var startY;\n\t var endY;\n\t var tapPosition = function(event) {\n\t return (event.originalEvent || event).changedTouches[0].pageY;\n\t };\n\n\t that.element.on(\"touchstart\" + STATIC_LIST_NS, function(e) {\n\t startY = tapPosition(e);\n\t });\n\n\t that.element.on(\"touchend\" + STATIC_LIST_NS, function(e) {\n\t if (e.isDefaultPrevented()) {\n\t return;\n\t }\n\n\t endY = tapPosition(e);\n\n\t if (Math.abs(endY - startY) < 10) {\n\t that._touchTriggered = true;\n\t that._triggerClick($(e.target).closest(ITEMSELECTOR).get(0));\n\t }\n\t });\n\t },\n\n\t skip: function() {\n\t return this.dataSource.skip();\n\t },\n\n\t setOptions: function(options) {\n\t Widget.fn.setOptions.call(this, options);\n\n\t this._getter();\n\t this._templates();\n\t this._render();\n\t },\n\n\t destroy: function() {\n\t this.element.off(STATIC_LIST_NS);\n\n\t if (this._refreshHandler) {\n\t this.dataSource.unbind(CHANGE, this._refreshHandler);\n\t }\n\n\t clearTimeout(this._scrollId);\n\n\t Widget.fn.destroy.call(this);\n\t },\n\n\t dataItemByIndex: function(index) {\n\t return this.dataSource.flatView()[index];\n\t },\n\n\t screenHeight: function() {\n\t return this.content[0].clientHeight;\n\t },\n\n\t scrollToIndex: function(index) {\n\t var item = this.element[0].children[index];\n\n\t if (item) {\n\t this.scroll(item);\n\t }\n\t },\n\n\t scrollWith: function(value) {\n\t this.content.scrollTop(this.content.scrollTop() + value);\n\t },\n\n\t scroll: function(item) {\n\t if (!item) {\n\t return;\n\t }\n\n\t if (item[0]) {\n\t item = item[0];\n\t }\n\n\t var content = this.content[0],\n\t itemOffsetTop = item.offsetTop,\n\t itemOffsetHeight = item.offsetHeight,\n\t contentScrollTop = content.scrollTop,\n\t contentOffsetHeight = content.clientHeight,\n\t bottomDistance = itemOffsetTop + itemOffsetHeight;\n\n\t if (contentScrollTop > itemOffsetTop) {\n\t contentScrollTop = itemOffsetTop;\n\t } else if (bottomDistance > (contentScrollTop + contentOffsetHeight)) {\n\t contentScrollTop = (bottomDistance - contentOffsetHeight);\n\t }\n\n\t content.scrollTop = contentScrollTop;\n\t },\n\n\t selectedDataItems: function(dataItems) {\n\t if (dataItems === undefined) {\n\t return this._dataItems.slice();\n\t }\n\n\t this._dataItems = dataItems;\n\t this._values = this._getValues(dataItems);\n\t },\n\n\t _getValues: function(dataItems) {\n\t var getter = this._valueGetter;\n\n\t return $.map(dataItems, function(dataItem) {\n\t return getter(dataItem);\n\t });\n\t },\n\n\t focusNext: function() {\n\t var current = this.focus();\n\n\t if (!current) {\n\t current = 0;\n\t } else {\n\t current = current.next();\n\t }\n\n\t this.focus(current);\n\t },\n\n\t focusPrev: function() {\n\t var current = this.focus();\n\n\t if (!current) {\n\t current = this.element[0].children.length - 1;\n\t } else {\n\t current = current.prev();\n\t }\n\n\t this.focus(current);\n\t },\n\n\t focusFirst: function() {\n\t this.focus(this.element[0].children[0]);\n\t },\n\n\t focusLast: function() {\n\t this.focus(last(this.element[0].children));\n\t },\n\n\t focus: function(candidate) {\n\t var that = this;\n\t var id = that._optionID;\n\t var hasCandidate;\n\n\t if (candidate === undefined) {\n\t return that._current;\n\t }\n\n\t candidate = last(that._get(candidate));\n\t candidate = $(this.element[0].children[candidate]);\n\n\t if (that._current) {\n\t that._current\n\t .removeClass(FOCUSED)\n\t .removeAttr(ID);\n\n\t that.trigger(DEACTIVATE);\n\t }\n\n\t hasCandidate = !!candidate[0];\n\n\t if (hasCandidate) {\n\t candidate.addClass(FOCUSED);\n\t that.scroll(candidate);\n\n\t candidate.attr(\"id\", id);\n\t }\n\n\t that._current = hasCandidate ? candidate : null;\n\t that.trigger(ACTIVATE);\n\t },\n\n\t focusIndex: function() {\n\t return this.focus() ? this.focus().index() : undefined;\n\t },\n\n\t skipUpdate: function(skipUpdate) {\n\t this._skipUpdate = skipUpdate;\n\t },\n\n\t select: function(indices) {\n\t var that = this;\n\t var selectable = that.options.selectable;\n\t var singleSelection = selectable !== \"multiple\" && selectable !== false;\n\t var selectedIndices = that._selectedIndices;\n\t var uiSelectedIndices = [this.element.find(\".k-selected\").index()];\n\n\t var added = [];\n\t var removed = [];\n\t var result;\n\n\t if (indices === undefined) {\n\t return selectedIndices.slice();\n\t }\n\n\t indices = that._get(indices);\n\n\t if (indices.length === 1 && indices[0] === -1) {\n\t indices = [];\n\t }\n\n\t var deferred = $.Deferred().resolve();\n\t var filtered = that.isFiltered();\n\n\t if (filtered && !singleSelection && that._deselectFiltered(indices)) {\n\t return deferred;\n\t }\n\n\t if (singleSelection && !filtered &&\n\t $.inArray(last(indices), selectedIndices) !== -1 && $.inArray(last(indices), uiSelectedIndices) !== -1) {\n\n\t if (that._dataItems.length && that._view.length) {\n\t that._dataItems = [that._view[selectedIndices[0]].item];\n\t }\n\n\t return deferred;\n\t }\n\n\t result = that._deselect(indices);\n\n\t removed = result.removed;\n\t indices = result.indices;\n\n\t if (indices.length) {\n\t if (singleSelection) {\n\t indices = [last(indices)];\n\t }\n\n\t added = that._select(indices);\n\t }\n\n\t if (added.length || removed.length) {\n\t that._valueComparer = null;\n\t that.trigger(CHANGE, {\n\t added: added,\n\t removed: removed\n\t });\n\t }\n\n\t return deferred;\n\t },\n\n\t removeAt: function(position) {\n\t this._selectedIndices.splice(position, 1);\n\t this._values.splice(position, 1);\n\t this._valueComparer = null;\n\n\t return {\n\t position: position,\n\t dataItem: this._dataItems.splice(position, 1)[0]\n\t };\n\t },\n\n\t setValue: function(value) {\n\t value = Array.isArray(value) || value instanceof ObservableArray ? value.slice(0) : [value];\n\n\t this._values = value;\n\n\t this._valueComparer = null;\n\t },\n\n\t value: function(value) {\n\t var that = this;\n\t var deferred = that._valueDeferred;\n\t var indices;\n\n\t if (value === undefined) {\n\t return that._values.slice();\n\t }\n\n\t that.setValue(value);\n\n\t if (!deferred || deferred.state() === \"resolved\") {\n\t that._valueDeferred = deferred = $.Deferred();\n\t }\n\n\t if (that.bound()) {\n\t indices = that._valueIndices(that._values);\n\n\t if (that.options.selectable === \"multiple\") {\n\t that.select(-1);\n\t }\n\n\t that.select(indices);\n\n\t deferred.resolve();\n\t }\n\n\t that._skipUpdate = false;\n\n\t return deferred;\n\t },\n\n\t items: function() {\n\t return this.element.children(ITEMSELECTOR);\n\t },\n\n\t _click: function(e) {\n\t if (this._touchTriggered)\n\t {\n\t this._touchTriggered = false;\n\t return;\n\t }\n\n\t if (!e.isDefaultPrevented()) {\n\t this._triggerClick(e.currentTarget);\n\t }\n\t },\n\n\t _triggerClick: function(item) {\n\t if (!this.trigger(CLICK, { item: $(item) })) {\n\t this.select(item);\n\t }\n\t },\n\n\t _valueExpr: function(type, values) {\n\t var that = this;\n\t var idx = 0;\n\n\t var body;\n\t var comparer;\n\t var normalized = [];\n\n\t if (!that._valueComparer || that._valueType !== type) {\n\t that._valueType = type;\n\n\t for (; idx < values.length; idx++) {\n\t normalized.push(unifyType(values[idx], type));\n\t }\n\n\t body = \"for (var idx = 0; idx < \" + normalized.length + \"; idx++) {\" +\n\t \" if (current === values[idx]) {\" +\n\t \" return idx;\" +\n\t \" }\" +\n\t \"} \" +\n\t \"return -1;\";\n\n\t comparer = new Function(\"current\", \"values\", body);\n\n\t that._valueComparer = function(current) {\n\t return comparer(current, normalized);\n\t };\n\t }\n\n\t return that._valueComparer;\n\t },\n\n\t _dataItemPosition: function(dataItem, values) {\n\t var value = this._valueGetter(dataItem);\n\n\t var valueExpr = this._valueExpr(typeof value, values);\n\n\t return valueExpr(value);\n\t },\n\n\t _getter: function() {\n\t this._valueGetter = kendo.getter(this.options.dataValueField);\n\t },\n\n\t _deselect: function(indices) {\n\t var that = this;\n\t var children = that.element[0].children;\n\t var selectable = that.options.selectable;\n\t var selectedIndices = that._selectedIndices;\n\t var dataItems = that._dataItems;\n\t var values = that._values;\n\t var removed = [];\n\t var i = 0;\n\t var j;\n\n\t var index, selectedIndex;\n\t var removedIndices = 0;\n\n\t indices = indices.slice();\n\n\t if (selectable === true || !indices.length) {\n\t for (; i < selectedIndices.length; i++) {\n\t $(children[selectedIndices[i]]).removeClass(KSELECTED).attr(ARIA_SELECTED, false);\n\n\t removed.push({\n\t position: i,\n\t dataItem: dataItems[i]\n\t });\n\t }\n\n\t that._values = [];\n\t that._dataItems = [];\n\t that._selectedIndices = [];\n\t } else if (selectable === \"multiple\") {\n\t for (; i < indices.length; i++) {\n\t index = indices[i];\n\n\t if (!$(children[index]).hasClass(KSELECTED)) {\n\t continue;\n\t }\n\n\t for (j = 0; j < selectedIndices.length; j++) {\n\t selectedIndex = selectedIndices[j];\n\n\t if (selectedIndex === index) {\n\t $(children[selectedIndex]).removeClass(KSELECTED).attr(ARIA_SELECTED, false);\n\t var dataItem = this._view[index].item;\n\t var position = this._dataItemPosition(dataItem, this._values);\n\n\t removed.push({\n\t position: position,\n\t dataItem: dataItem\n\t });\n\n\t dataItems.splice(j, 1);\n\t selectedIndices.splice(j, 1);\n\t indices.splice(i, 1);\n\t values.splice(j, 1);\n\n\t removedIndices += 1;\n\t i -= 1;\n\t j -= 1;\n\t break;\n\t }\n\t }\n\t }\n\t }\n\n\t return {\n\t indices: indices,\n\t removed: removed\n\t };\n\t },\n\n\t _deselectFiltered: function(indices) {\n\t var children = this.element[0].children;\n\t var dataItem, index, position;\n\t var removed = [];\n\t var idx = 0;\n\n\t for (; idx < indices.length; idx++) {\n\t index = indices[idx];\n\n\t dataItem = this._view[index].item;\n\t position = this._dataItemPosition(dataItem, this._values);\n\n\t if (position > -1) {\n\t removed.push(this.removeAt(position));\n\t $(children[index]).removeClass(KSELECTED);\n\t }\n\t }\n\n\t if (removed.length) {\n\t this.trigger(CHANGE, {\n\t added: [],\n\t removed: removed\n\t });\n\n\t return true;\n\t }\n\n\t return false;\n\t },\n\n\t _select: function(indices) {\n\t var that = this;\n\t var children = that.element[0].children;\n\t var data = that._view;\n\t var dataItem, index;\n\t var added = [];\n\t var idx = 0;\n\n\t if (last(indices) !== -1) {\n\t that.focus(indices);\n\t }\n\n\t for (; idx < indices.length; idx++) {\n\t index = indices[idx];\n\t dataItem = data[index];\n\n\t if (index === -1 || !dataItem) {\n\t continue;\n\t }\n\n\t dataItem = dataItem.item;\n\n\t that._selectedIndices.push(index);\n\t that._dataItems.push(dataItem);\n\t that._values.push(that._valueGetter(dataItem));\n\n\t $(children[index]).addClass(KSELECTED).attr(ARIA_SELECTED, true);\n\n\t added.push({\n\t dataItem: dataItem\n\t });\n\t }\n\n\t return added;\n\t },\n\n\t getElementIndex: function(element) {\n\t return $(element).data(\"offset-index\");\n\t },\n\n\t _get: function(candidate) {\n\t if (typeof candidate === \"number\") {\n\t candidate = [candidate];\n\t } else if (!isArray(candidate)) {\n\t candidate = this.getElementIndex(candidate);\n\t candidate = [candidate !== undefined ? candidate : -1];\n\t }\n\n\t return candidate;\n\t },\n\n\t _template: function() {\n\t var that = this;\n\t var options = that.options;\n\t var template = options.template;\n\n\t if (!template) {\n\t template = kendo.template('
${' + kendo.expr(options.dataTextField, \"data\") + \"}\", { useWithBlock: false });\n\t } else {\n\t template = kendo.template(template);\n\t template = function(data) {\n\t return '
' + template(data) + \"\";\n\t };\n\t }\n\n\t return template;\n\t },\n\n\t _templates: function() {\n\t var template;\n\t var options = this.options;\n\t var templates = {\n\t template: options.template,\n\t groupTemplate: options.groupTemplate,\n\t fixedGroupTemplate: options.fixedGroupTemplate\n\t };\n\n\t if (options.columns) {\n\t for (var i = 0; i < options.columns.length; i++) {\n\t var currentColumn = options.columns[i];\n\t var templateText = currentColumn.field ? currentColumn.field.toString() : TEXT;\n\n\t templates[\"column\" + i] = currentColumn.template || \"#: \" + templateText + \"#\";\n\t }\n\t }\n\n\t for (var key in templates) {\n\t template = templates[key];\n\t if (template && typeof template !== \"function\") {\n\t templates[key] = kendo.template(template);\n\t }\n\t }\n\n\t this.templates = templates;\n\t },\n\n\t _normalizeIndices: function(indices) {\n\t var newIndices = [];\n\t var idx = 0;\n\n\t for (; idx < indices.length; idx++) {\n\t if (indices[idx] !== undefined) {\n\t newIndices.push(indices[idx]);\n\t }\n\t }\n\n\t return newIndices;\n\t },\n\n\t _valueIndices: function(values, indices) {\n\t var data = this._view;\n\t var idx = 0;\n\t var index;\n\n\t indices = indices ? indices.slice() : [];\n\n\t if (!values.length) {\n\t return [];\n\t }\n\n\t for (; idx < data.length; idx++) {\n\t index = this._dataItemPosition(data[idx].item, values);\n\n\t if (index !== -1) {\n\t indices[index] = idx;\n\t }\n\t }\n\n\t return this._normalizeIndices(indices);\n\t },\n\n\t _firstVisibleItem: function() {\n\t var element = this.element[0];\n\t var content = this.content[0];\n\t var scrollTop = content.scrollTop;\n\t var itemHeight = $(element.children[0]).height();\n\t var itemIndex = Math.floor(scrollTop / itemHeight) || 0;\n\t var item = element.children[itemIndex] || element.lastChild;\n\t var forward = item.offsetTop < scrollTop;\n\n\t while (item) {\n\t if (forward) {\n\t if ((item.offsetTop + itemHeight) > scrollTop || !item.nextSibling) {\n\t break;\n\t }\n\n\t item = item.nextSibling;\n\t } else {\n\t if (item.offsetTop <= scrollTop || !item.previousSibling) {\n\t break;\n\t }\n\n\t item = item.previousSibling;\n\t }\n\t }\n\n\t return this._view[$(item).data(\"offset-index\")];\n\t },\n\n\t _fixedHeader: function() {\n\t if (this.isGrouped() && this.templates.fixedGroupTemplate) {\n\t if (this.header.closest(GROUP_ROW_SEL).length) {\n\t this.header.closest(GROUP_ROW_SEL).show();\n\t } else {\n\t this.header.show();\n\t }\n\n\t this.content.scroll(this._onScroll);\n\t } else {\n\t if (this.header.closest(GROUP_ROW_SEL).length) {\n\t this.header.closest(GROUP_ROW_SEL).hide();\n\t } else {\n\t this.header.hide();\n\t }\n\n\t this.content.off(\"scroll\", this._onScroll);\n\t }\n\t },\n\n\t _renderHeader: function() {\n\t var template = this.templates.fixedGroupTemplate;\n\t if (!template) {\n\t return;\n\t }\n\n\t var visibleItem = this._firstVisibleItem();\n\n\t if (visibleItem && visibleItem.group.toString().length) {\n\t this.header.html(template(visibleItem.group));\n\t }\n\t },\n\n\t _renderItem: function(context) {\n\t var item = '
';\n\t if (hasColumns) {\n\t item += this._renderColumns(dataItem);\n\t } else {\n\t item += '';\n\t item += this.templates.template(dataItem);\n\t item += '';\n\t }\n\n\t if (notFirstItem && context.newGroup) {\n\t if (hasColumns) {\n\t item += '' + this.templates.groupTemplate(context.group) + '';\n\t } else {\n\t item += '' + this.templates.groupTemplate(context.group) + '
';\n\t }\n\t } else if (isGrouped && hasColumns) {\n\t item += '';\n\t }\n\n\t return item + \"\";\n\t },\n\n\t _renderColumns: function(dataItem) {\n\t var item = \"\";\n\n\t for (var i = 0; i < this.options.columns.length; i++) {\n\t var currentWidth = this.options.columns[i].width;\n\t var currentWidthInt = parseInt(currentWidth, 10);\n\t var widthStyle = '';\n\n\t if (currentWidth && !isNaN(currentWidthInt)) {\n\t widthStyle += \"style='width:\";\n\t widthStyle += currentWidthInt;\n\t widthStyle += percentageUnitsRegex.test(currentWidth) ? \"%\" : \"px\";\n\t widthStyle += \";'\";\n\t }\n\t item += \"
\";\n\t item += this.templates[\"column\" + i](dataItem);\n\t item += \"\";\n\t }\n\n\t return item;\n\t },\n\n\t _render: function() {\n\t var html = \"\";\n\n\t var i = 0;\n\t var idx = 0;\n\t var context;\n\t var dataContext = [];\n\t var view = this.dataSource.view();\n\t var values = this.value();\n\n\t var group, newGroup, j;\n\t var isGrouped = this.isGrouped();\n\n\t if (isGrouped) {\n\t for (i = 0; i < view.length; i++) {\n\t group = view[i];\n\t newGroup = true;\n\n\t for (j = 0; j < group.items.length; j++) {\n\t context = {\n\t selected: this._selected(group.items[j], values),\n\t item: group.items[j],\n\t group: group.value,\n\t newGroup: newGroup,\n\t isLastGroupedItem: j === group.items.length - 1,\n\t index: idx };\n\t dataContext[idx] = context;\n\t idx += 1;\n\n\t html += this._renderItem(context);\n\t newGroup = false;\n\t }\n\t }\n\t } else {\n\t for (i = 0; i < view.length; i++) {\n\t context = { selected: this._selected(view[i], values), item: view[i], index: i };\n\n\t dataContext[i] = context;\n\n\t html += this._renderItem(context);\n\t }\n\t }\n\n\t this._view = dataContext;\n\n\t this.element[0].innerHTML = html;\n\n\t if (isGrouped && dataContext.length) {\n\t this._renderHeader();\n\t }\n\t },\n\n\t _selected: function(dataItem, values) {\n\t var select = !this.isFiltered() || this.options.selectable === \"multiple\";\n\t return select && this._dataItemPosition(dataItem, values) !== -1;\n\t },\n\n\t setDSFilter: function(filter) {\n\t this._lastDSFilter = extend({}, filter);\n\t },\n\n\t isFiltered: function() {\n\t if (!this._lastDSFilter) {\n\t this.setDSFilter(this.dataSource.filter());\n\t }\n\n\t return !kendo.data.Query.compareFilters(this.dataSource.filter(), this._lastDSFilter);\n\t },\n\n\t refresh: function(e) {\n\t var that = this;\n\t var action = e && e.action;\n\t var skipUpdateOnBind = that.options.skipUpdateOnBind;\n\t var isItemChange = action === \"itemchange\";\n\t var result;\n\n\t that.trigger(DATA_BINDING);\n\t that._angularItems(\"cleanup\");\n\n\t that._fixedHeader();\n\n\t that._render();\n\n\t that.bound(true);\n\n\t if (isItemChange || action === \"remove\") {\n\t result = mapChangedItems(that._dataItems, e.items);\n\n\t if (result.changed.length) {\n\t if (isItemChange) {\n\t that.trigger(SELECTED_ITEM_CHANGE, {\n\t items: result.changed\n\t });\n\t } else {\n\t that.value(that._getValues(result.unchanged));\n\t }\n\t }\n\t } else if (that.isFiltered() || that._skipUpdate || that._emptySearch) {\n\t that.focus(0);\n\t if (that._skipUpdate) {\n\t that._skipUpdate = false;\n\t that._selectedIndices = that._valueIndices(that._values, that._selectedIndices);\n\t }\n\t } else if (!skipUpdateOnBind && (!action || action === \"add\")) {\n\t that.value(that._values);\n\t }\n\n\t if (that._valueDeferred) {\n\t that._valueDeferred.resolve();\n\t }\n\n\t that._angularItems(\"compile\");\n\t that.trigger(DATA_BOUND);\n\t },\n\n\t bound: function(bound) {\n\t if (bound === undefined) {\n\t return this._bound;\n\t }\n\n\t this._bound = bound;\n\t },\n\n\t isGrouped: function() {\n\t return (this.dataSource.group() || []).length;\n\t }\n\t });\n\n\t ui.plugin(StaticList);\n\n\t function last(list) {\n\t return list[list.length - 1];\n\t }\n\n\t function getSelectedOption(select) {\n\t var index = select.selectedIndex;\n\t return index > -1 ? select.options[index] : {};\n\t }\n\n\t function mapChangedItems(selected, itemsToMatch) {\n\t var itemsLength = itemsToMatch.length;\n\t var selectedLength = selected.length;\n\t var dataItem;\n\t var found;\n\t var i, j;\n\n\t var changed = [];\n\t var unchanged = [];\n\n\t if (selectedLength) {\n\t for (i = 0; i < selectedLength; i++) {\n\t dataItem = selected[i];\n\t found = false;\n\n\t for (j = 0; j < itemsLength; j++) {\n\t if (dataItem === itemsToMatch[j]) {\n\t found = true;\n\t changed.push({ index: i, item: dataItem });\n\t break;\n\t }\n\t }\n\n\t if (!found) {\n\t unchanged.push(dataItem);\n\t }\n\t }\n\t }\n\n\t return {\n\t changed: changed,\n\t unchanged: unchanged\n\t };\n\t }\n\n\t function isValidFilterExpr(expression) {\n\t if (!expression || $.isEmptyObject(expression)) {\n\t return false;\n\t }\n\n\t if (expression.filters && !expression.filters.length) {\n\t return false;\n\t }\n\n\t return true;\n\t }\n\n\t function removeFiltersForField(expression, field) {\n\t var filters;\n\t var found = false;\n\n\t if (expression.filters) {\n\t filters = $.grep(expression.filters, function(filter) {\n\t found = removeFiltersForField(filter, field);\n\t if (filter.filters) {\n\t return filter.filters.length;\n\t } else {\n\t return filter.field != field;\n\t }\n\t });\n\n\t if (!found && expression.filters.length !== filters.length) {\n\t found = true;\n\t }\n\n\t expression.filters = filters;\n\t }\n\n\t return found;\n\t }\n\n\t kendo.cssProperties.registerPrefix(\"List\", \"k-list-\");\n\n\t})(window.kendo.jQuery);\n\n\treturn window.kendo;\n\n\t}, __webpack_require__(3));\n\n\n/***/ })\n\n/******/ });","module.exports =\n/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n\n\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ 0:\n/***/ (function(module, exports, __webpack_require__) {\n\n\tmodule.exports = __webpack_require__(1330);\n\n\n/***/ }),\n\n/***/ 3:\n/***/ (function(module, exports) {\n\n\tmodule.exports = function() { throw new Error(\"define cannot be used indirect\"); };\r\n\n\n/***/ }),\n\n/***/ 1052:\n/***/ (function(module, exports) {\n\n\tmodule.exports = require(\"./kendo.popup\");\n\n/***/ }),\n\n/***/ 1063:\n/***/ (function(module, exports) {\n\n\tmodule.exports = require(\"./kendo.data\");\n\n/***/ }),\n\n/***/ 1330:\n/***/ (function(module, exports, __webpack_require__) {\n\n\tvar __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function(f, define){\n\t !(__WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(1052), __webpack_require__(1063) ], __WEBPACK_AMD_DEFINE_FACTORY__ = (f), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t})(function(){\n\n\tvar __meta__ = { // jshint ignore:line\n\t id: \"menu\",\n\t name: \"Menu\",\n\t category: \"web\",\n\t description: \"The Menu widget displays hierarchical data as a multi-level menu.\",\n\t depends: [ \"popup\", \"data\", \"data.odata\" ]\n\t};\n\n\t(function ($, undefined) {\n\t var kendo = window.kendo,\n\t ui = kendo.ui,\n\t activeElement = kendo._activeElement,\n\t touch = (kendo.support.touch && kendo.support.mobileOS),\n\t isArray = Array.isArray,\n\t HierarchicalDataSource = kendo.data.HierarchicalDataSource,\n\t MOUSEDOWN = \"mousedown\",\n\t CLICK = \"click\",\n\t DELAY = 30,\n\t SCROLLSPEED = 50,\n\t extend = $.extend,\n\t proxy = $.proxy,\n\t each = $.each,\n\t template = kendo.template,\n\t keys = kendo.keys,\n\t Widget = ui.Widget,\n\t excludedNodesRegExp = /^(ul|a|div)$/i,\n\t NS = \".kendoMenu\",\n\t IMG = \"img\",\n\t OPEN = \"open\",\n\t MENU = \"k-menu\",\n\t LINK = \"k-link k-menu-link\",\n\t LINK_SELECTOR = \".k-link\",\n\t ICON_SELECTOR = \".k-menu-expand-arrow-icon\",\n\t LAST = \"k-last\",\n\t CLOSE = \"close\",\n\t TIMER = \"timer\",\n\t FIRST = \"k-first\",\n\t IMAGE = \"k-image\",\n\t SELECT = \"select\",\n\t ZINDEX = \"zIndex\",\n\t ACTIVATE = \"activate\",\n\t DEACTIVATE = \"deactivate\",\n\t POINTERDOWN = \"touchstart\" + NS + \" MSPointerDown\" + NS + \" pointerdown\" + NS,\n\t pointers = kendo.support.pointers,\n\t msPointers = kendo.support.msPointers,\n\t allPointers = msPointers || pointers,\n\t CHANGE = \"change\",\n\t ERROR = \"error\",\n\t TOUCHSTART = kendo.support.touch ? \"touchstart\" : \"\",\n\t MOUSEENTER = pointers ? \"pointerover\" : (msPointers ? \"MSPointerOver\" : \"mouseenter\"),\n\t MOUSELEAVE = pointers ? \"pointerout\" : (msPointers ? \"MSPointerOut\" : \"mouseleave\"),\n\t MOUSEWHEEL = \"DOMMouseScroll\" + NS + \" mousewheel\" + NS,\n\t RESIZE = kendo.support.resize + NS,\n\t SCROLLWIDTH = \"scrollWidth\",\n\t SCROLLHEIGHT = \"scrollHeight\",\n\t OFFSETWIDTH = \"offsetWidth\",\n\t OFFSETHEIGHT = \"offsetHeight\",\n\t POPUP_ID_ATTR = \"group\",\n\t POPUP_OPENER_ATTR = \"groupparent\",\n\t DOCUMENT_ELEMENT = $(document.documentElement),\n\t KENDOPOPUP = \"kendoPopup\",\n\t HOVERSTATE = \"k-hover\",\n\t FOCUSEDSTATE = \"k-focus\",\n\t DISABLEDSTATE = \"k-disabled\",\n\t SELECTEDSTATE = \"k-selected\",\n\t menuSelector = \".k-menu\",\n\t groupSelector = \".k-menu-group\",\n\t animationContainerSelector = \".k-animation-container\",\n\t popupSelector = groupSelector + \",\" + animationContainerSelector,\n\t allItemsSelector = \":not(.k-list) > .k-item:not([role='treeitem'])\",\n\t disabledSelector = \".k-item.k-disabled\",\n\t itemSelector = \".k-item\",\n\t availableItemsSelector = \".k-item:not(.k-disabled)\",\n\t linkSelector = \".k-item:not(.k-disabled) > .k-link\",\n\t exclusionSelector = \":not(.k-item.k-separator)\",\n\t templateSelector = \"div:not(.k-animation-container,.k-list-container)\",\n\t scrollButtonSelector = \".k-menu-scroll-button\",\n\t touchPointerTypes = { \"2\": 1, \"touch\": 1 },\n\t STRING = \"string\",\n\t DATABOUND = \"dataBound\",\n\t ARIA_EXPANDED = \"aria-expanded\",\n\n\t bindings = {\n\t text: \"dataTextField\",\n\t url: \"dataUrlField\",\n\t spriteCssClass: \"dataSpriteCssClassField\",\n\t imageUrl: \"dataImageUrlField\",\n\t imageAttr: \"dataImageAttrField\",\n\t content: \"dataContentField\"\n\t },\n\n\t rendering = {\n\t wrapperCssClass: function(group, item) {\n\t var result = \"k-item k-menu-item\",\n\t index = item.index;\n\n\t if (item.enabled === false) {\n\t result += \" k-disabled\";\n\t }\n\n\t if (group.firstLevel && index === 0) {\n\t result += \" k-first\";\n\t }\n\n\t if (index == group.length - 1) {\n\t result += \" k-last\";\n\t }\n\n\t if (item.cssClass) {\n\t result += \" \" + item.cssClass;\n\t }\n\n\t if (item.attr && item.attr.hasOwnProperty(\"class\")) {\n\t result += \" \" + item.attr[\"class\"];\n\t }\n\n\t if (item.selected) {\n\t result += \" \" + SELECTEDSTATE;\n\t }\n\n\t return result;\n\t },\n\n\t itemCssAttributes: function (item) {\n\t var result = \"\";\n\t var attributes = item.attr || {};\n\n\t for (var attr in attributes) {\n\t if(attributes.hasOwnProperty(attr) && attr !== \"class\") {\n\t result += attr + \"=\\\"\" + attributes[attr] + \"\\\" \";\n\t }\n\t }\n\n\t return result;\n\t },\n\n\t imageCssAttributes: function (imgAttributes) {\n\t var result = \"\";\n\t var attributes = imgAttributes && imgAttributes.toJSON ? imgAttributes.toJSON() : {};\n\n\t if (!attributes['class']) {\n\t attributes['class'] = IMAGE;\n\t } else {\n\t attributes['class'] += \" \" + IMAGE;\n\t }\n\n\t for (var attr in attributes) {\n\t if(attributes.hasOwnProperty(attr)) {\n\t result += attr + \"=\\\"\" + attributes[attr] + \"\\\" \";\n\t }\n\t }\n\n\t return result;\n\t },\n\n\t contentCssAttributes: function (item) {\n\t var result = \"\";\n\t var attributes = item.contentAttr || {};\n\t var defaultClasses = \"k-content k-group k-menu-group k-menu-group-md\";\n\n\t if (!attributes['class']) {\n\t attributes['class'] = defaultClasses;\n\t } else {\n\t attributes['class'] += \" \" + defaultClasses;\n\t }\n\n\t for (var attr in attributes) {\n\t if(attributes.hasOwnProperty(attr)) {\n\t result += attr + \"=\\\"\" + attributes[attr] + \"\\\" \";\n\t }\n\t }\n\n\t return result;\n\t },\n\n\t textClass: function() {\n\t return LINK;\n\t },\n\n\t arrowClass: function(item, group) {\n\t var result = \"k-menu-expand-arrow-icon k-icon\";\n\n\t if (group.horizontal) {\n\t result += \" k-i-arrow-s\";\n\t } else {\n\t result += \" k-i-arrow-e\";\n\t }\n\n\t return result;\n\t },\n\n\t groupAttributes: function(group) {\n\t return group.expanded !== true ? \" style='display:none'\" : \"\";\n\t },\n\n\t groupCssClass: function() {\n\t return \"k-group k-menu-group k-menu-group-md\";\n\t },\n\n\t content: function(item) {\n\t return item.content ? item.content : \" \";\n\t }\n\t };\n\n\t function getEffectDirection(direction, root) {\n\t direction = direction.split(\" \")[!root+0] || direction;\n\t return direction.replace(\"top\", \"up\").replace(\"bottom\", \"down\");\n\t }\n\n\t function parseDirection(direction, root, isRtl) {\n\t direction = direction.split(\" \")[!root+0] || direction;\n\t var output = { origin: [\"bottom\", (isRtl ? \"right\" : \"left\")], position: [\"top\", (isRtl ? \"right\" : \"left\")] },\n\t horizontal = /left|right/.test(direction);\n\n\t if (horizontal) {\n\t output.origin = [ \"top\", direction ];\n\t output.position[1] = kendo.directions[direction].reverse;\n\t } else {\n\t output.origin[0] = direction;\n\t output.position[0] = kendo.directions[direction].reverse;\n\t }\n\n\t output.origin = output.origin.join(\" \");\n\t output.position = output.position.join(\" \");\n\n\t return output;\n\t }\n\n\t function contains(parent, child) {\n\t try {\n\t return $.contains(parent, child);\n\t } catch (e) {\n\t return false;\n\t }\n\t }\n\n\t function updateItemClasses(item) {\n\t item = $(item);\n\t var omitWrap = item.attr(kendo.attr(\"omit-wrap\"));\n\n\t if (omitWrap) {\n\t return;\n\t }\n\n\t item.addClass(\"k-item k-menu-item\")\n\t .children(IMG)\n\t .addClass(IMAGE);\n\n\t item\n\t .children(\"a\")\n\t .addClass(LINK)\n\t .children(IMG)\n\t .addClass(IMAGE);\n\n\t item\n\t .filter(\":not([disabled])\");\n\n\t item\n\t .filter(\".k-separator\")\n\t .removeClass(\"k-menu-item\")\n\t .addClass(\"k-menu-separator\")\n\t .empty()\n\t .append(\" \");\n\n\t item\n\t .filter(\"li[disabled]\")\n\t .addClass(DISABLEDSTATE)\n\t .prop(\"disabled\", false)\n\t .attr(\"aria-disabled\", true);\n\n\t if (!item.filter(\"[role]\").length) {\n\t item.attr(\"role\", \"menuitem\");\n\t }\n\n\t if (!item.children(LINK_SELECTOR).length) {\n\t item.contents() // exclude groups, real links, templates and empty text nodes\n\t .filter(function() { return (!this.nodeName.match(excludedNodesRegExp) && !(this.nodeType === 3 && !kendo.trim(this.nodeValue))); })\n\t .wrapAll(\"
\")\n\t .filter(function(idx, elm) { return elm.nodeType === 3; })\n\t .wrap(\"\");\n\t }\n\n\t updateArrow(item);\n\t updateFirstLast(item);\n\t }\n\n\t function updateArrow(item) {\n\t item = $(item);\n\n\t item.find(\"> .k-link > .k-menu-expand-arrow > [class*=k-i-arrow]:not(.k-sprite)\").parent().remove();\n\n\t item.filter(\":has(.k-menu-group)\")\n\t .children(\".k-link:not(:has([class*=k-i-arrow]:not(.k-sprite)))\")\n\t .each(function () {\n\t var item = $(this),\n\t arrowCssClass = getArrowCssClass(item);\n\n\t item.append(\"
\");\n\t });\n\t }\n\n\t function getArrowCssClass(item) {\n\t var arrowCssClass,\n\t parent = item.parent().parent(),\n\t isRtl = kendo.support.isRtl(parent);\n\n\t if (parent.hasClass(MENU + \"-horizontal\")) {\n\t arrowCssClass = \"k-i-arrow-s\";\n\t } else {\n\t if (isRtl) {\n\t arrowCssClass = \"k-i-arrow-w\";\n\t }\n\t else {\n\t arrowCssClass = \"k-i-arrow-e\";\n\t }\n\t }\n\t return arrowCssClass;\n\t }\n\n\t function updateFirstLast (item) {\n\t item = $(item);\n\n\t item.filter(\".k-first:not(:first-child)\").removeClass(FIRST);\n\t item.filter(\".k-last:not(:last-child)\").removeClass(LAST);\n\t item.filter(\":first-child\").addClass(FIRST);\n\t item.filter(\":last-child\").addClass(LAST);\n\t }\n\n\t function updateHasAriaPopup (parents) {\n\t if (parents && parents.length) {\n\t for (var index in parents) {\n\t var parentLi = parents.eq(index);\n\t if (parentLi.find(\"ul\").length) {\n\t parentLi.attr(\"aria-haspopup\", true);\n\t } else {\n\t parentLi.removeAttr(\"aria-haspopup\");\n\t }\n\t }\n\t }\n\t }\n\n\t function getParentLiItems(group) {\n\t if (!group.hasClass(MENU)) {\n\t return group.parentsUntil(\".\" + MENU, \"li\");\n\t }\n\t }\n\n\t function storeItemSelectEventHandler (element, options) {\n\t var selectHandler = getItemSelectEventHandler(options);\n\t if(selectHandler) {\n\t setItemData(element, selectHandler);\n\t }\n\n\t if (options.items) {\n\t $(element).children(\"ul\").children(\"li\").each(function(i){\n\t storeItemSelectEventHandler(this, options.items[i]);\n\t });\n\t }\n\t }\n\n\t function setItemData (element, selectHandler) {\n\t $(element).children(\".k-link\").data({\n\t selectHandler : selectHandler\n\t });\n\t }\n\n\t function getItemSelectEventHandler (options) {\n\t var selectHandler = options.select,\n\t isFunction = kendo.isFunction;\n\n\t if (selectHandler && isFunction(selectHandler)) {\n\t return selectHandler;\n\t }\n\t return null;\n\t }\n\n\t function popupOpenerSelector(id){\n\t return id ? \"li[data-groupparent='\" + id + \"']\" : \"li[data-groupparent]\";\n\t }\n\t function popupGroupSelector(id) {\n\t var selector = id ? \"[data-group='\" + id + \"']\" : \"[data-group]\";\n\t return \"ul\" + selector + \",div\" + selector;\n\t }\n\t function getChildPopups (currentPopup, overflowWrapper) {\n\t var childPopupOpener = currentPopup.find(popupOpenerSelector());\n\t var result = [];\n\t childPopupOpener.each(function(i, opener){\n\t opener = $(opener);\n\t var popupId = opener.data(POPUP_OPENER_ATTR);\n\t var popup = currentPopup;\n\t while(popupId) {\n\t popup = overflowWrapper.find(popupGroupSelector(popupId) + \":visible\");\n\t if (popup.length) {\n\t result.push(popup);\n\t }\n\t opener = popup.find(popupOpenerSelector());\n\t popupId = opener.data(POPUP_OPENER_ATTR);\n\t }\n\t });\n\n\t return result;\n\t }\n\n\t function popupParentItem(popupElement, overflowWrapper) {\n\t var popupId = popupElement.data(POPUP_ID_ATTR);\n\t return popupId ? overflowWrapper.find(popupOpenerSelector(popupId)) : $([]);\n\t }\n\n\t function itemPopup(item, overflowWrapper) {\n\t var popupId = item.data(POPUP_OPENER_ATTR);\n\t return popupId ? overflowWrapper.children(animationContainerSelector).children(popupGroupSelector(popupId)) : $([]);\n\t }\n\n\t function overflowMenuParents(current, overflowWrapper) {\n\t var parents = [];\n\t var getParents = function(item){\n\t while (item.parentNode && !overflowWrapper.is(item.parentNode)) {\n\t parents.push(item.parentNode);\n\t item = item.parentNode;\n\t }\n\t };\n\t var elem = current[0] || current;\n\t getParents(elem);\n\t var last = parents[parents.length - 1];\n\t while($(last).is(animationContainerSelector)){\n\t var popupElement = $(last).children(\"ul\");\n\t elem = popupParentItem(popupElement, overflowWrapper)[0];\n\t if (!elem) {\n\t break;\n\t }\n\t parents.push(elem);\n\t getParents(elem);\n\t last = parents[parents.length - 1];\n\t }\n\t return parents;\n\t }\n\n\t function mousewheelDelta(e) {\n\t var delta = 0;\n\n\t if (e.wheelDelta) {\n\t delta = -e.wheelDelta / 120;\n\t delta = delta > 0 ? Math.ceil(delta) : Math.floor(delta);\n\t }\n\n\t if (e.detail) {\n\t delta = Math.round(e.detail / 3);\n\t }\n\n\t return delta;\n\t }\n\n\t function parentsScroll(current, scrollDirection) {\n\t var scroll = 0;\n\t var parent = current.parentNode;\n\t while(parent && !isNaN(parent[scrollDirection])) {\n\t scroll += parent[scrollDirection];\n\t parent = parent.parentNode;\n\t }\n\t return scroll;\n\t }\n\n\t function isPointerTouch(e){\n\t return allPointers && e.originalEvent && e.originalEvent.pointerType in touchPointerTypes;\n\t }\n\n\t function isTouch(e){\n\t var ev = e.originalEvent;\n\t return touch && /touch/i.test(ev.type || \"\");\n\t }\n\n\t function removeSpacesBetweenItems(ul){\n\t ul.contents().filter(function(){ return this.nodeName != \"LI\"; }).remove();\n\t }\n\n\t var Menu = kendo.ui.DataBoundWidget.extend({\n\t init: function(element, options) {\n\t var that = this;\n\n\t Widget.fn.init.call(that, element, options);\n\n\t element = that.wrapper = that.element;\n\t options = that.options;\n\t that._accessors();\n\t that._templates();\n\t that._dataSource();\n\n\t that._updateClasses();\n\n\t that._animations(options);\n\n\t that.nextItemZIndex = 100;\n\n\t that._tabindex();\n\n\t that._initOverflow(options);\n\n\t that._attachMenuEventsHandlers();\n\n\t if (options.openOnClick) {\n\t that.clicked = false;\n\t }\n\n\t element.attr(\"role\", \"menubar\");\n\n\t if (element[0].id) {\n\t that._ariaId = kendo.format(\"{0}_mn_active\", element[0].id);\n\t }\n\n\t kendo.notify(that);\n\t },\n\n\t events: [\n\t OPEN,\n\t CLOSE,\n\t ACTIVATE,\n\t DEACTIVATE,\n\t SELECT,\n\t DATABOUND\n\t ],\n\n\t options: {\n\t name: \"Menu\",\n\t animation: {\n\t open: {\n\t duration: 200\n\t },\n\t close: { // if close animation effects are defined, they will be used instead of open.reverse\n\t duration: 100\n\t }\n\t },\n\t orientation: \"horizontal\",\n\t direction: \"default\",\n\t openOnClick: false,\n\t closeOnClick: true,\n\t hoverDelay: 100,\n\t scrollable: false,\n\t popupCollision: undefined\n\t },\n\n\t _initData: function() {\n\t var that = this;\n\n\t if (that.dataSource) {\n\t that.angular(\"cleanup\", function(){\n\t return {\n\t elements: that.element.children()\n\t };\n\t });\n\t that.element.empty();\n\n\t that.append(that.dataSource.view(), that.element);\n\t that.angular(\"compile\", function(){\n\t return {\n\t elements: that.element.children()\n\t };\n\t });\n\t }\n\t },\n\n\t _attachMenuEventsHandlers: function() {\n\t var that = this;\n\t var element = that.element;\n\t var options = that.options;\n\t var overflowWrapper = that._overflowWrapper();\n\n\t that._checkActiveProxy = proxy(that._checkActiveElement, that);\n\n\t (overflowWrapper || element).on(POINTERDOWN, itemSelector, proxy(that._focusHandler, that))\n\t .on(CLICK + NS, disabledSelector, false)\n\t .on(CLICK + NS, itemSelector, proxy(that._click , that))\n\t .on(POINTERDOWN + \" \" + MOUSEDOWN + NS, \".k-content\", proxy(that._preventClose, that))\n\t .on(MOUSEENTER + NS, availableItemsSelector, proxy(that._mouseenter, that))\n\t .on(MOUSELEAVE + NS, availableItemsSelector, proxy(that._mouseleave, that))\n\t .on(MOUSEDOWN + NS, availableItemsSelector, proxy(that._mousedown, that))\n\t .on(TOUCHSTART + NS + \" \" + MOUSEENTER + NS + \" \" + MOUSELEAVE + NS + \" \" +\n\t MOUSEDOWN + NS + \" \" + CLICK + NS, linkSelector, proxy(that._toggleHover, that));\n\n\t element.on(\"keydown\" + NS, proxy(that._keydown, that))\n\t .on(\"focus\" + NS, proxy(that._focus, that))\n\t .on(\"focus\" + NS, \".k-content\", proxy(that._focus, that))\n\t .on(\"blur\" + NS, proxy(that._removeHoverItem, that))\n\t .on(\"blur\" + NS, \"[tabindex]\", that._checkActiveProxy);\n\n\t if (overflowWrapper) {\n\t overflowWrapper\n\t .on(MOUSELEAVE + NS, popupSelector, proxy(that._mouseleavePopup, that))\n\t .on(MOUSEENTER + NS, popupSelector, proxy(that._mouseenterPopup, that));\n\t }\n\n\t if (options.openOnClick) {\n\t that._documentClickHandler = proxy(that._documentClick, that);\n\t $(document).on(\"click\", that._documentClickHandler);\n\t }\n\t },\n\n\t _detachMenuEventsHandlers: function() {\n\t var that = this;\n\t var overflowWrapper = that._overflowWrapper();\n\n\t if (overflowWrapper) {\n\t overflowWrapper.off(NS);\n\t }\n\n\t that.element.off(NS);\n\n\t if (that._documentClickHandler) {\n\t $(document).off(\"click\", that._documentClickHandler);\n\t }\n\t },\n\n\t _initOverflow: function(options) {\n\t var that = this;\n\t var isHorizontal = options.orientation == \"horizontal\";\n\t var backwardBtn, forwardBtn;\n\n\t if (options.scrollable) {\n\t that._openedPopups = {};\n\t that._scrollWrapper = that.element.wrap(\"\").parent();\n\t if (isHorizontal) {\n\t removeSpacesBetweenItems(that.element);\n\t }\n\n\t backwardBtn = $(that.templates.scrollButton({direction: isHorizontal ? \"left\" : \"up\"}));\n\t forwardBtn = $(that.templates.scrollButton({direction: isHorizontal ? \"right\": \"down\"}));\n\t backwardBtn.add(forwardBtn).appendTo(that._scrollWrapper);\n\n\t that._initScrolling(that.element, backwardBtn, forwardBtn, isHorizontal);\n\n\t var initialWidth = that.element.outerWidth();\n\t var initialCssWidth = that.element[0].style.width;\n\t initialCssWidth = initialCssWidth === \"auto\" ? \"\" : initialCssWidth;\n\n\t if (isHorizontal) {\n\t $(window).on(RESIZE, function() {\n\t setTimeout(function(){\n\t that._setOverflowWrapperWidth(initialWidth, initialCssWidth);\n\t that._toggleScrollButtons(that.element, backwardBtn, forwardBtn, isHorizontal);\n\t }, 300);\n\t });\n\t }\n\n\t that._setOverflowWrapperWidth(initialWidth, initialCssWidth);\n\t that._toggleScrollButtons(that.element, backwardBtn, forwardBtn, isHorizontal);\n\t }\n\t },\n\n\t _overflowWrapper: function(){\n\t return this._scrollWrapper || this._popupsWrapper;\n\t },\n\n\t _setOverflowWrapperWidth: function(initialWidth, initialCssWidth) {\n\t var that = this;\n\t var wrapperCssWidth = that._scrollWrapper.css(\"width\");\n\n\t that._scrollWrapper.css({width: \"\"});\n\t var wrapperWidth = that._scrollWrapper.outerWidth();\n\t that._scrollWrapper.css({ width: wrapperCssWidth });\n\n\t var menuWidth = that.element.outerWidth();\n\t var borders = that.element[0].offsetWidth - that.element[0].clientWidth;\n\n\t if (menuWidth != wrapperWidth && wrapperWidth > 0) {\n\t var width = initialCssWidth ? Math.min(initialWidth, wrapperWidth) : wrapperWidth;\n\t that.element.width(width - borders);\n\t that._scrollWrapper.width(width);\n\t }\n\t },\n\n\t _reinitOverflow: function(options) {\n\t var that = this;\n\t var overflowChanged = ((options.scrollable && !that.options.scrollable) || (!options.scrollable && that.options.scrollable)) ||\n\t (options.scrollable && that.options.scrollable && options.scrollable.distance != that.options.scrollable.distance) ||\n\t options.orientation != that.options.orientation;\n\n\t if (overflowChanged) {\n\t that._detachMenuEventsHandlers();\n\t that._destroyOverflow();\n\t that._initOverflow(options);\n\t that._attachMenuEventsHandlers();\n\t }\n\t },\n\n\t _destroyOverflow: function() {\n\t var that = this;\n\t var overflowWrapper = that._overflowWrapper();\n\t if(overflowWrapper) {\n\t overflowWrapper.off(NS);\n\t overflowWrapper.find(scrollButtonSelector).off(NS).remove();\n\t overflowWrapper.children(animationContainerSelector).each(function(i, popupWrapper){\n\t var ul = $(popupWrapper).children(groupSelector);\n\t ul.off(MOUSEWHEEL);\n\t var popupParentLi = popupParentItem(ul, overflowWrapper);\n\t if (popupParentLi.length) {\n\t popupParentLi.append(popupWrapper);\n\t }\n\t });\n\n\t overflowWrapper.find(popupOpenerSelector()).removeAttr(\"data-groupparent\");\n\t overflowWrapper.find(popupGroupSelector()).removeAttr(\"data-group\");\n\t that.element.off(MOUSEWHEEL);\n\t $(window).off(RESIZE);\n\t overflowWrapper.contents().unwrap();\n\n\t that._scrollWrapper = that._popupsWrapper = that._openedPopups = undefined;\n\t }\n\t },\n\n\t _initScrolling: function(scrollElement, backwardBtn, forwardBtn, isHorizontal) {\n\t var that = this;\n\t var scrollable = that.options.scrollable;\n\t var distance = that.isNumeric(scrollable.distance) ? scrollable.distance : SCROLLSPEED;\n\t var mouseWheelDistance = distance / 2;\n\t var backward = \"-=\" + distance;\n\t var forward = \"+=\" + distance;\n\t var backwardDouble = \"-=\" + distance * 2;\n\t var forwardDouble = \"+=\" + distance * 2;\n\t var scrolling = false;\n\t var touchEvents = false;\n\n\t var scroll = function(value) {\n\t var scrollValue = isHorizontal ? {\"scrollLeft\": value} : { \"scrollTop\": value };\n\t scrollElement.finish().animate(scrollValue, \"fast\", \"linear\", function () {\n\t if (scrolling) {\n\t scroll(value);\n\t }\n\t });\n\t that._toggleScrollButtons(scrollElement, backwardBtn, forwardBtn, isHorizontal);\n\t };\n\n\t var mouseenterHandler = function(e) {\n\t if (!scrolling && !touchEvents) {\n\t scroll(e.data.direction);\n\t scrolling = true;\n\t }\n\t };\n\n\t var mousedownHandler = function(e) {\n\t var scrollValue = isHorizontal ? {\"scrollLeft\": e.data.direction} : { \"scrollTop\": e.data.direction };\n\t touchEvents = isTouch(e) || isPointerTouch(e);\n\t scrollElement.stop().animate(scrollValue, \"fast\", \"linear\", function(){\n\t if (!touchEvents) {\n\t $(e.currentTarget).trigger(MOUSEENTER);\n\t } else {\n\t that._toggleScrollButtons(scrollElement, backwardBtn, forwardBtn, isHorizontal);\n\t scrolling = true;\n\t }\n\t });\n\t scrolling = false;\n\n\t e.stopPropagation();\n\t e.preventDefault();\n\t };\n\n\t backwardBtn.on(MOUSEENTER + NS, {direction: backward}, mouseenterHandler)\n\t .on(kendo.eventMap.down + NS, {direction: backwardDouble}, mousedownHandler);\n\n\t forwardBtn.on(MOUSEENTER + NS, {direction: forward}, mouseenterHandler)\n\t .on(kendo.eventMap.down + NS, {direction: forwardDouble}, mousedownHandler);\n\n\t backwardBtn.add(forwardBtn)\n\t .on(MOUSELEAVE + NS, function() {\n\t scrollElement.stop();\n\t scrolling = false;\n\t that._toggleScrollButtons(scrollElement, backwardBtn, forwardBtn, isHorizontal);\n\t });\n\n\t scrollElement.on(MOUSEWHEEL, function(e){\n\t if (!e.ctrlKey && !e.shiftKey && !e.altKey) {\n\t var wheelDelta = mousewheelDelta(e.originalEvent);\n\t var scrollSpeed = Math.abs(wheelDelta) * mouseWheelDistance;\n\t var value = (wheelDelta > 0 ? \"+=\" : \"-=\") + scrollSpeed;\n\t var scrollValue = isHorizontal ? {\"scrollLeft\": value} : {\"scrollTop\": value };\n\n\t that._closeChildPopups(scrollElement);\n\n\t scrollElement.finish().animate(scrollValue, \"fast\", \"linear\", function(){\n\t that._toggleScrollButtons(scrollElement, backwardBtn, forwardBtn, isHorizontal);\n\t });\n\t e.preventDefault();\n\t }\n\t });\n\t },\n\n\t isNumeric: function(n) {\n\t return !isNaN(parseFloat(n)) && isFinite(n);\n\t },\n\n\t _toggleScrollButtons: function(scrollElement, backwardBtn, forwardBtn, horizontal) {\n\t var currentScroll = horizontal ? kendo.scrollLeft(scrollElement) : scrollElement.scrollTop();\n\t var scrollSize = horizontal ? SCROLLWIDTH : SCROLLHEIGHT;\n\t var offset = horizontal ? OFFSETWIDTH : OFFSETHEIGHT;\n\n\t backwardBtn.toggle(currentScroll !== 0);\n\t forwardBtn.toggle(currentScroll < scrollElement[0][scrollSize] - scrollElement[0][offset] - 1);\n\t },\n\n\t setOptions: function(options) {\n\t var animation = this.options.animation;\n\n\t this._animations(options);\n\n\t options.animation = extend(true, animation, options.animation);\n\n\t if (\"dataSource\" in options) {\n\t this._dataSource(options);\n\t }\n\n\t this._updateClasses();\n\t this._reinitOverflow(options);\n\n\t Widget.fn.setOptions.call(this, options);\n\t },\n\n\t destroy: function() {\n\t var that = this;\n\n\t Widget.fn.destroy.call(that);\n\n\t that._detachMenuEventsHandlers();\n\n\t that._destroyOverflow();\n\n\t kendo.destroy(that.element);\n\t },\n\n\t enable: function (element, enable) {\n\t this._toggleDisabled(element, enable !== false);\n\n\t return this;\n\t },\n\n\t disable: function (element) {\n\t this._toggleDisabled(element, false);\n\n\t return this;\n\t },\n\n\t attemptGetItem: function (candidate) {\n\t candidate = candidate || this.element;\n\t var item = this.element.find(candidate);\n\t var overflowWrapper = this._overflowWrapper();\n\n\t if (item.length || candidate === this.element){\n\t return item;\n\t } else if (overflowWrapper) {\n\t return overflowWrapper.find(candidate);\n\t } else {\n\t return $();\n\t }\n\t },\n\n\t append: function (item, referenceItem) {\n\t referenceItem = this.attemptGetItem(referenceItem);\n\n\t var inserted = this._insert(item, referenceItem, referenceItem.length ? this._childPopupElement(referenceItem) : null);\n\n\t each(inserted.items, function (i) {\n\t inserted.group.append(this);\n\t updateArrow(this);\n\t storeItemSelectEventHandler(this, item[i] || item);\n\t });\n\n\t updateArrow(referenceItem);\n\t updateFirstLast(inserted.group.find(\".k-first, .k-last\").add(inserted.items));\n\t updateHasAriaPopup(getParentLiItems(inserted.group));\n\n\t return this;\n\t },\n\n\t insertBefore: function (item, referenceItem) {\n\t referenceItem = this.attemptGetItem(referenceItem);\n\n\t var inserted = this._insert(item, referenceItem, referenceItem.parent());\n\n\t each(inserted.items, function (i) {\n\t referenceItem.before(this);\n\t updateArrow(this);\n\t updateFirstLast(this);\n\t storeItemSelectEventHandler(this, item[i] || item);\n\t });\n\n\t updateFirstLast(referenceItem);\n\n\t return this;\n\t },\n\n\t insertAfter: function (item, referenceItem) {\n\t referenceItem = this.attemptGetItem(referenceItem);\n\n\t var inserted = this._insert(item, referenceItem, referenceItem.parent());\n\n\t each(inserted.items, function (i) {\n\t referenceItem.after(this);\n\t updateArrow(this);\n\t updateFirstLast(this);\n\t storeItemSelectEventHandler(this, item[i] || item);\n\t });\n\n\t updateFirstLast(referenceItem);\n\n\t return this;\n\t },\n\n\t _insert: function (item, referenceItem, parent) {\n\t var that = this,\n\t items, groups;\n\n\t if (!referenceItem || !referenceItem.length) {\n\t parent = that.element;\n\t }\n\n\t var plain = $.isPlainObject(item) || item instanceof kendo.data.ObservableObject,\n\t groupData = {\n\t firstLevel: parent.hasClass(MENU),\n\t horizontal: parent.hasClass(MENU + \"-horizontal\"),\n\t expanded: true,\n\t length: parent.children().length\n\t };\n\n\t if (referenceItem && !parent.length) {\n\t parent = $(that.renderGroup({ group: groupData, options: that.options })).appendTo(referenceItem);\n\t }\n\n\t if (plain || isArray(item) || item instanceof kendo.data.ObservableArray) { // is JSON\n\t items = $($.map(plain ? [ item ] : item, function (value, idx) {\n\t if (typeof value === \"string\") {\n\t return $(value).get();\n\t } else {\n\t return $(that.renderItem({\n\t group: groupData,\n\t item: extend(value, { index: idx })\n\t })).get();\n\t }\n\t }));\n\t } else {\n\t if (typeof item == \"string\" && item.charAt(0) != \"<\") {\n\t items = that.element.find(item);\n\t } else {\n\t items = $(item);\n\t }\n\n\t groups = items.find(\"> ul\")\n\t .addClass(\"k-menu-group k-menu-group-md\")\n\t .attr(\"role\", \"menu\");\n\n\t items = items.filter(\"li\");\n\n\t items.add(groups.find(\"> li\")).each(function () {\n\t updateItemClasses(this);\n\t });\n\t }\n\n\t return { items: items, group: parent };\n\t },\n\n\t remove: function (element) {\n\t element = this.attemptGetItem(element);\n\n\t var that = this,\n\t parent = element.parentsUntil(that.element, allItemsSelector),\n\t group = element.parent(\"ul:not(.k-menu)\");\n\n\t element.remove();\n\n\t if (group && !group.children(allItemsSelector).length) {\n\t var parentItems = getParentLiItems(group);\n\n\t var container = group.parent(animationContainerSelector);\n\n\t if (container.length) {\n\t container.remove();\n\t } else {\n\t group.remove();\n\t }\n\n\t updateHasAriaPopup(parentItems);\n\t }\n\n\t if (parent.length) {\n\t parent = parent.eq(0);\n\n\t updateArrow(parent);\n\t updateFirstLast(parent);\n\t }\n\n\t return that;\n\t },\n\n\t _openAfterLoad: function (element, dataItem) {\n\t var that = this;\n\t if(dataItem.loaded()) {\n\t that.open(element);\n\t that._loading = false;\n\t } else {\n\t dataItem.one(CHANGE, function(){\n\t element.find(ICON_SELECTOR).removeClass(\"k-i-loading\");\n\t if(that._loading) {\n\t that.open(element);\n\t that._loading = false;\n\t }\n\t });\n\t }\n\t },\n\n\t open: function (element) {\n\t var that = this;\n\t var options = that.options;\n\t var horizontal = options.orientation == \"horizontal\";\n\t var direction = options.direction;\n\t var isRtl = kendo.support.isRtl(that.wrapper);\n\t var overflowWrapper = that._overflowWrapper();\n\t element = (overflowWrapper || that.element).find(element);\n\n\t var dataItem = that.dataSource && that.dataSource.getByUid(element.data(kendo.ns + \"uid\"));\n\n\t if(dataItem && dataItem.hasChildren && !dataItem.loaded() && !that._loading){\n\t that._loading = true;\n\t element.find(ICON_SELECTOR).addClass(\"k-i-loading\");\n\t dataItem.load();\n\t that._openAfterLoad(element, dataItem);\n\t return;\n\t }\n\n\t if (/^(top|bottom|default)$/.test(direction)) {\n\t if (isRtl) {\n\t direction = horizontal ? (direction + \" left\").replace(\"default\", \"bottom\") : \"left\";\n\t } else {\n\t direction = horizontal ? (direction + \" right\").replace(\"default\", \"bottom\") : \"right\";\n\t }\n\t }\n\n\t var visiblePopups = \">.k-popup:visible,>.k-animation-container>.k-popup:visible\";\n\t var closePopup = function () {\n\t var popup = $(this).data(KENDOPOPUP);\n\t if (popup) {\n\t // Use the built-in close method to play the hoverDelay from the options\n\t that.close($(this).closest(\"li.k-item\"), true);\n\t }\n\t };\n\n\t element.siblings()\n\t .find(visiblePopups)\n\t .each(closePopup);\n\n\t if (overflowWrapper) {\n\t element.find(visiblePopups).each(closePopup);\n\t }\n\n\t if (that.options.openOnClick) {\n\t that.clicked = true;\n\t }\n\n\t element.each(function () {\n\t var li = $(this);\n\n\t clearTimeout(li.data(TIMER));\n\n\t li.data(TIMER, setTimeout(function () {\n\t var ul = li.find(\"> .k-menu-group, > .k-animation-container > .k-menu-group\").filter(\":hidden\").first();\n\t var popup;\n\t var overflowPopup;\n\n\t if (!ul[0] && overflowWrapper) {\n\t overflowPopup = that._getPopup(li);\n\t ul = overflowPopup && overflowPopup.element;\n\t }\n\t if (ul.is(\":visible\")) {\n\t return;\n\t }\n\n\t if (ul[0] && that._triggerEvent({ item: li[0], type: OPEN }) === false) {\n\n\t if (!ul.find(\".k-menu-group\")[0] && ul.children(\".k-item\").length > 1) {\n\t var windowHeight = $(window).height(),\n\t setScrolling = function(){\n\t ul.css({maxHeight: windowHeight - (kendo._outerHeight(ul) - ul.height()) - kendo.getShadows(ul).bottom, overflow: \"auto\"});\n\t };\n\n\t setScrolling();\n\t } else {\n\t ul.css({maxHeight: \"\", overflow: \"\"});\n\t }\n\n\t li.data(ZINDEX, li.css(ZINDEX));\n\t var nextZindex = that.nextItemZIndex++;\n\t li.css(ZINDEX, nextZindex);\n\n\t if (that.options.scrollable) {\n\t li.parent().siblings(scrollButtonSelector).css({zIndex: ++nextZindex});\n\t }\n\n\t popup = ul.data(KENDOPOPUP);\n\t var root = li.parent().hasClass(MENU),\n\t parentHorizontal = root && horizontal,\n\t directions = parseDirection(direction, root, isRtl),\n\t effects = options.animation.open.effects,\n\t openEffects = effects !== undefined ? effects : \"slideIn:\" + getEffectDirection(direction, root);\n\n\t if (!popup) {\n\t popup = ul.kendoPopup({\n\t activate: function() { that._triggerEvent({ item: this.wrapper.parent(), type: ACTIVATE }); },\n\t deactivate: function(e) {\n\t that._closing = false;\n\t e.sender.element // Restore opacity after fade.\n\t .removeData(\"targetTransform\")\n\t .css({ opacity: \"\" });\n\t that._triggerEvent({ item: this.wrapper.parent(), type: DEACTIVATE });\n\t },\n\t origin: directions.origin,\n\t position: directions.position,\n\t collision: options.popupCollision !== undefined ? options.popupCollision : (parentHorizontal ? \"fit\" : \"fit flip\"),\n\t anchor: li,\n\t appendTo: overflowWrapper || li,\n\t animation: {\n\t open: extend(true, { effects: openEffects }, options.animation.open),\n\t close: options.animation.close\n\t },\n\t open: proxy(that._popupOpen, that),\n\t close: function (e) {\n\t that._closing = e.sender.element;\n\t var li = e.sender.wrapper.parent();\n\n\t if (overflowWrapper) {\n\t var popupId = e.sender.element.data(POPUP_ID_ATTR);\n\t if (popupId) {\n\t li = (overflowWrapper || that.element).find(popupOpenerSelector(popupId));\n\t }\n\t e.sender.wrapper.children(scrollButtonSelector).hide();\n\t }\n\n\t if (!that._triggerEvent({ item: li[0], type: CLOSE })) {\n\t li.css(ZINDEX, li.data(ZINDEX));\n\t li.removeData(ZINDEX);\n\n\t if (that.options.scrollable) {\n\t li.parent().siblings(scrollButtonSelector).css({zIndex: \"\"});\n\t }\n\n\t if (touch || allPointers || kendo.support.mouseAndTouchPresent) {\n\t li.removeClass(HOVERSTATE);\n\t that._removeHoverItem();\n\t }\n\t } else {\n\t e.preventDefault();\n\t }\n\t }\n\t }).data(KENDOPOPUP);\n\t } else {\n\t popup = ul.data(KENDOPOPUP);\n\t popup.options.origin = directions.origin;\n\t popup.options.position = directions.position;\n\t popup.options.animation.open.effects = openEffects;\n\t }\n\t ul.removeAttr(\"aria-hidden\");\n\t li.attr(ARIA_EXPANDED, true);\n\n\t that._configurePopupOverflow(popup, li);\n\n\t popup._hovered = true;\n\t popup.open();\n\n\t that._initPopupScrolling(popup);\n\t }\n\n\t }, that.options.hoverDelay));\n\t });\n\n\t return that;\n\t },\n\n\t _configurePopupOverflow: function(popup, popupOpener) {\n\t var that = this;\n\t if (that.options.scrollable) {\n\t that._wrapPopupElement(popup);\n\t if (!popupOpener.attr(\"data-groupparent\")) {\n\t var groupId = new Date().getTime();\n\t popupOpener.attr(\"data-groupparent\", groupId);\n\t popup.element.attr(\"data-group\", groupId);\n\t }\n\t }\n\t },\n\n\t _wrapPopupElement: function(popup){\n\t if (!popup.element.parent().is(animationContainerSelector)) {\n\t popup.wrapper = kendo.wrap(popup.element, popup.options.autosize)\n\t .css({\n\t overflow: \"hidden\",\n\t display: \"block\",\n\t position: \"absolute\"\n\t });\n\t }\n\t },\n\n\t _initPopupScrolling: function(popup, isHorizontal, skipMouseEvents) {\n\t var that = this;\n\n\t if (that.options.scrollable && popup.element[0].scrollHeight > popup.element[0].offsetHeight) {\n\t that._initPopupScrollButtons(popup, isHorizontal, skipMouseEvents);\n\t }\n\t },\n\n\t _initPopupScrollButtons: function(popup, isHorizontal, skipMouseEvents) {\n\t var that = this;\n\t var scrollButtons = popup.wrapper.children(scrollButtonSelector);\n\t var animation = that.options.animation;\n\t var timeout = ((animation && animation.open && animation.open.duration) || 0) + DELAY;\n\t setTimeout(function() {\n\t if (!scrollButtons.length) {\n\t var backwardBtn = $(that.templates.scrollButton({direction: isHorizontal ? \"left\" : \"up\"}));\n\t var forwardBtn = $(that.templates.scrollButton({direction: isHorizontal ? \"right\": \"down\"}));\n\n\t scrollButtons = backwardBtn.add(forwardBtn).appendTo(popup.wrapper);\n\n\t that._initScrolling(popup.element, backwardBtn, forwardBtn, isHorizontal);\n\t if (!skipMouseEvents) {\n\t scrollButtons.on(MOUSEENTER + NS, function() {\n\t var overflowWrapper = that._overflowWrapper();\n\t $(getChildPopups(popup.element, overflowWrapper)).each(function(i, p){\n\t var popupOpener = overflowWrapper.find(popupOpenerSelector(p.data(POPUP_ID_ATTR)));\n\t that.close(popupOpener);\n\t });\n\t })\n\t .on(MOUSELEAVE + NS, function(){\n\t setTimeout(function(){\n\t if ($.isEmptyObject(that._openedPopups)) {\n\t that._closeParentPopups(popup.element);\n\t }\n\t }, DELAY);\n\t });\n\t }\n\t }\n\t that._toggleScrollButtons(popup.element, scrollButtons.first(), scrollButtons.last(), isHorizontal);\n\t }, timeout);\n\t },\n\n\t _popupOpen: function(e) {\n\t if (!this._keyTriggered) {\n\t e.sender.element.children(\".\" + FOCUSEDSTATE).removeClass(FOCUSEDSTATE);\n\t }\n\t if (this.options.scrollable) {\n\t this._setPopupHeight(e.sender);\n\t }\n\t },\n\n\t _setPopupHeight: function(popup, isFixed){\n\t var popupElement = popup.element;\n\t var popups = popupElement.add(popupElement.parent(animationContainerSelector));\n\n\t popups.height((popupElement.hasClass(MENU) && this._initialHeight) || \"\");\n\n\t var location = popup._location(isFixed);\n\t var windowHeight = $(window).height();\n\t var popupOuterHeight = location.height;\n\t var popupOffsetTop = isFixed ? 0 : Math.max(location.top, 0);\n\t var scrollTop = isFixed ? 0 : parentsScroll(this._overflowWrapper()[0], \"scrollTop\");\n\t var bottomScrollbar = window.innerHeight - windowHeight;\n\t var maxHeight = windowHeight - kendo.getShadows(popupElement).bottom + bottomScrollbar;\n\t var canFit = maxHeight + scrollTop > popupOuterHeight + popupOffsetTop;\n\n\t if (!canFit) {\n\t var height = Math.min(maxHeight, maxHeight - popupOffsetTop + scrollTop);\n\t popups.css({overflow: \"hidden\", height: height + \"px\"});\n\t }\n\t },\n\n\t close: function (items, dontClearClose) {\n\t var that = this;\n\t var overflowWrapper = that._overflowWrapper();\n\t var element = (overflowWrapper || that.element);\n\n\t items = element.find(items);\n\n\t if (!items.length) {\n\t items = element.find(\">.k-item\");\n\t }\n\n\t var hasChildPopupsHovered = function(currentPopup){\n\t var result = false;\n\t if ($.isEmptyObject(that._openedPopups)) {\n\t return result;\n\t }\n\t $(getChildPopups(currentPopup, overflowWrapper)).each(function(i, popup){\n\t result = !!that._openedPopups[popup.data(POPUP_ID_ATTR).toString()];\n\t return !result;\n\t });\n\t return result;\n\t };\n\n\t var isPopupMouseLeaved = function(opener) {\n\t var groupId = opener.data(POPUP_OPENER_ATTR);\n\t return (!overflowWrapper || !groupId || !that._openedPopups[groupId.toString()]);\n\t };\n\n\t items.each(function () {\n\t var li = $(this);\n\n\t li.attr(ARIA_EXPANDED, false);\n\n\t if (!dontClearClose && that._isRootItem(li)) {\n\t that.clicked = false;\n\t }\n\n\t clearTimeout(li.data(TIMER));\n\n\t li.data(TIMER, setTimeout(function () {\n\t var popup = that._getPopup(li);\n\t if (popup && (isPopupMouseLeaved(li) || that._forceClose)) {\n\t if (!that._forceClose && hasChildPopupsHovered(popup.element)) {\n\t return;\n\t }\n\n\t popup.close();\n\t popup.element.attr(\"aria-hidden\", true);\n\n\t if (overflowWrapper) {\n\t if (that._forceClose && items.last().is(li[0])) {\n\t delete that._forceClose;\n\t }\n\t }\n\t }\n\t }, that.options.hoverDelay));\n\t });\n\n\t return that;\n\t },\n\n\t _getPopup: function(li) {\n\t var that = this;\n\t var popup = li.find(\".k-menu-group:not(.k-list-container):not(.k-calendar-container):visible\").first().data(KENDOPOPUP);\n\t var overflowWrapper = that._overflowWrapper();\n\n\t if (!popup && overflowWrapper) {\n\t var groupId = li.data(POPUP_OPENER_ATTR);\n\t if (groupId) {\n\t var popupElement = overflowWrapper.find(popupGroupSelector(groupId));\n\t popup = popupElement.data(KENDOPOPUP);\n\t }\n\t }\n\t return popup;\n\t },\n\n\t _toggleDisabled: function (items, enable) {\n\t this.element.find(items).each(function () {\n\t $(this)\n\t .toggleClass(DISABLEDSTATE, !enable)\n\t .attr(\"aria-disabled\", !enable);\n\t });\n\t },\n\n\t _toggleHover: function(e) {\n\t var target = $(kendo.eventTarget(e) || e.target).closest(allItemsSelector),\n\t isEnter = e.type == MOUSEENTER || MOUSEDOWN.indexOf(e.type) !== -1;\n\n\t target.siblings().removeClass(HOVERSTATE);\n\n\t if (!target.parents(\"li.\" + DISABLEDSTATE).length) {\n\t target.toggleClass(HOVERSTATE, isEnter || e.type == \"mousedown\" || e.type == \"pointerover\" || e.type == TOUCHSTART);\n\t }\n\n\t this._removeHoverItem();\n\t },\n\n\t _preventClose: function() {\n\t if (!this.options.closeOnClick) {\n\t this._closurePrevented = true;\n\t }\n\t },\n\n\t _checkActiveElement: function(e) {\n\t var that = this,\n\t hoverItem = $(e ? e.currentTarget : this._hoverItem()),\n\t target = that._findRootParent(hoverItem)[0];\n\n\t if (!this._closurePrevented) {\n\t setTimeout(function() {\n\t if (!document.hasFocus() || (!contains(target, kendo._activeElement()) && e && !contains(target, e.currentTarget))) {\n\t that.close(target);\n\t }\n\t }, 0);\n\t }\n\n\t this._closurePrevented = false;\n\t },\n\n\t _removeHoverItem: function() {\n\t var oldHoverItem = this._hoverItem();\n\n\t if (oldHoverItem && oldHoverItem.hasClass(FOCUSEDSTATE)) {\n\t oldHoverItem.removeClass(FOCUSEDSTATE);\n\t this._oldHoverItem = null;\n\t }\n\t },\n\n\t _updateClasses: function() {\n\t var element = this.element,\n\t nonContentGroupsSelector = \".k-menu-init div ul\",\n\t items;\n\n\t element.removeClass(\"k-menu-horizontal k-menu-vertical\");\n\t element.addClass(\"k-widget k-reset k-menu-init \" + MENU).addClass(MENU + \"-\" + this.options.orientation);\n\n\t if(this.options.orientation === \"vertical\") {\n\t element.attr(\"aria-orientation\", \"vertical\");\n\t } else {\n\t element.attr(\"aria-orientation\", \"horizontal\");\n\t }\n\n\t element.find(\"li > ul\")\n\t .filter(function() {\n\t return !kendo.support.matchesSelector.call(this, nonContentGroupsSelector);\n\t })\n\t .addClass(\"k-group k-menu-group k-menu-group-md\")\n\t .attr(\"role\", \"menu\")\n\t .hide()\n\t .attr(\"aria-hidden\", element.is(\":visible\"))\n\t .parent(\"li\")\n\t .attr(\"aria-haspopup\", \"true\")\n\t .end()\n\t .find(\"li > div\")\n\t .addClass(\"k-content\")\n\t .attr(\"tabindex\", \"-1\"); // Capture the focus before the Menu\n\n\t element.find(\"li[aria-haspopup]\").attr(ARIA_EXPANDED, false);\n\n\t items = element.find(\"> li,.k-menu-group > li\");\n\n\t element.removeClass(\"k-menu-init\");\n\n\t items.each(function () {\n\t updateItemClasses(this);\n\t });\n\t },\n\n\t _mouseenter: function (e) {\n\t var that = this;\n\t var element = $(e.currentTarget);\n\t var hasChildren = that._itemHasChildren(element);\n\t var popupId = element.data(POPUP_OPENER_ATTR) || element.parent().data(POPUP_ID_ATTR);\n\t var pointerTouch = isPointerTouch(e);\n\t var isParentClosing = false;\n\n\t if (popupId) {\n\t that._openedPopups[popupId.toString()] = true;\n\t }\n\n\t if(that._closing) {\n\t isParentClosing = !!that._closing.find(element).length;\n\t }\n\n\t if (isParentClosing || (e.delegateTarget != element.parents(menuSelector)[0] && e.delegateTarget != element.parents(\".k-menu-scroll-wrapper,.k-popups-wrapper\")[0])) {\n\t return;\n\t }\n\n\t that._keyTriggered = false;\n\n\t if ((that.options.openOnClick.rootMenuItems && that._isRootItem(element.closest(allItemsSelector))) ||\n\t (that.options.openOnClick.subMenuItems && !that._isRootItem(element.closest(allItemsSelector)))) {\n\t return;\n\t }\n\n\t if ((that.options.openOnClick === false ||\n\t (that.options.openOnClick.rootMenuItems === false && that._isRootItem(element.closest(allItemsSelector))) ||\n\t (that.options.openOnClick.subMenuItems === false && !that._isRootItem(element.closest(allItemsSelector))) || that.clicked) && !touch &&\n\t !(pointerTouch && that._isRootItem(element.closest(allItemsSelector)))) {\n\n\t if (!contains(e.currentTarget, e.relatedTarget) && hasChildren) {\n\t that.open(element);\n\t }\n\t }\n\n\t if (that.options.openOnClick === true && that.clicked || touch) {\n\t element.siblings().each(proxy(function (_, sibling) {\n\t that.close(sibling, true);\n\t }, that));\n\t }\n\t },\n\n\t _mousedown: function (e) {\n\t var that = this;\n\t var element = $(e.currentTarget);\n\t // needs to close subMenuItems\n\t if (that.options.openOnClick.subMenuItems && !that._isRootItem(element) || touch) {\n\t element.siblings().each(proxy(function (_, sibling) {\n\t that.close(sibling, true);\n\t }, that));\n\t }\n\t },\n\n\t _mouseleave: function (e) {\n\t var that = this;\n\t var element = $(e.currentTarget);\n\t var popupOpener = element.data(POPUP_OPENER_ATTR);\n\t var hasChildren = (element.children(animationContainerSelector).length || element.children(groupSelector).length) || popupOpener;\n\t var $window = $(window);\n\n\t if (popupOpener) {\n\t delete that._openedPopups[popupOpener.toString()];\n\t }\n\n\t if (element.parentsUntil(animationContainerSelector, \".k-list-container,.k-calendar-container\")[0]) {\n\t e.stopImmediatePropagation();\n\t return;\n\t }\n\n\t if ((that.options.openOnClick === false || (!that.options.openOnClick.rootMenuItems && that._isRootItem(element)) ||\n\t (!that.options.openOnClick.subMenuItems && !that._isRootItem(element))) && !touch && !isPointerTouch(e) &&\n\t !contains(e.currentTarget, e.relatedTarget || e.target) && hasChildren &&\n\t !contains(e.currentTarget, kendo._activeElement())) {\n\t that.close(element, true);\n\t that._loading = false;\n\t return;\n\t }\n\n\t // Detect if cursor goes outside the viewport of the browser\n\t if( (kendo.support.browser.msie && !e.toElement && !e.relatedTarget && !isPointerTouch(e)) ||\n\t e.clientX < 0 || e.clientY < 0 ||\n\t e.clientY > $window.height() ||\n\t e.clientX > $window.width()){\n\t that.close(element);\n\t }\n\t },\n\n\t _mouseenterPopup: function(e){\n\t var that = this;\n\t var popupElement = $(e.currentTarget);\n\n\t if (popupElement.parent().is(animationContainerSelector)) {\n\t return;\n\t }\n\n\t popupElement = popupElement.children(\"ul\");\n\t var popupId = popupElement.data(POPUP_ID_ATTR);\n\n\t if (popupId) {\n\t that._openedPopups[popupId.toString()] = true;\n\t }\n\t },\n\n\t _mouseleavePopup: function (e) {\n\t var that = this;\n\t var popupElement = $(e.currentTarget);\n\n\t if (!isPointerTouch(e) && popupElement.is(animationContainerSelector)) {\n\t that._closePopups(popupElement.children(\"ul\"));\n\t }\n\t },\n\n\t _closePopups: function(rootPopup) {\n\t var that = this;\n\t var overflowWrapper = that._overflowWrapper();\n\t var popupId = rootPopup.data(POPUP_ID_ATTR);\n\n\t if (popupId) {\n\t delete that._openedPopups[popupId.toString()];\n\t var groupParent = overflowWrapper.find(popupOpenerSelector(popupId));\n\n\t setTimeout(function() {\n\t if (that.options.openOnClick) {\n\t that._closeChildPopups(rootPopup);\n\t } else {\n\t if ($.isEmptyObject(that._openedPopups)) {\n\t var innerPopup = that._innerPopup(rootPopup);\n\t that._closeParentPopups(innerPopup);\n\t } else {\n\t that.close(groupParent, true);\n\t }\n\t }\n\t }, 0);\n\t }\n\t },\n\n\t _closeChildPopups: function(current){\n\t var that = this;\n\t var overflowWrapper = that._overflowWrapper();\n\t $(getChildPopups(current, overflowWrapper)).each(function(){\n\t var popupOpener = overflowWrapper.find(popupOpenerSelector(this.data(POPUP_ID_ATTR)));\n\t that.close(popupOpener, true);\n\t });\n\t },\n\n\t _innerPopup: function(current) {\n\t var overflowWrapper = this._overflowWrapper();\n\t var popups = getChildPopups(current, overflowWrapper);\n\t return popups[popups.length - 1] || current;\n\t },\n\n\t _closeParentPopups: function (current) {\n\t var that = this;\n\t var overflowWrapper = that._overflowWrapper();\n\t var popupId = current.data(POPUP_ID_ATTR);\n\t var popupOpener = overflowWrapper.find(popupOpenerSelector(popupId));\n\t popupId = popupOpener.parent().data(POPUP_ID_ATTR);\n\t that.close(popupOpener, true);\n\t while (popupId && !that._openedPopups[popupId]) {\n\t if (popupOpener.parent().is(menuSelector)) {\n\t break;\n\t }\n\t popupOpener = overflowWrapper.find(popupOpenerSelector(popupId));\n\t that.close(popupOpener, true);\n\t popupId = popupOpener.parent().data(POPUP_ID_ATTR);\n\t }\n\t },\n\n\t _click: function (e) {\n\t var that = this, openHandle,\n\t options = that.options,\n\t target = $(kendo.eventTarget(e)),\n\t targetElement = target[0],\n\t nodeName = target[0] ? target[0].nodeName.toUpperCase() : \"\",\n\t formNode = (nodeName == \"INPUT\" || nodeName == \"SELECT\" || nodeName == \"BUTTON\" || nodeName == \"LABEL\"),\n\t link = target.closest(LINK_SELECTOR),\n\t element = target.closest(allItemsSelector),\n\t itemElement = element[0],\n\t href = link.attr(\"href\"), childGroup, childGroupVisible,\n\t targetHref = target.attr(\"href\"),\n\t sampleHref = $(\"
\").attr(\"href\"),\n\t isLink = (!!href && href !== sampleHref),\n\t isLocalLink = isLink && !!href.match(/^#/),\n\t isTargetLink = (!!targetHref && targetHref !== sampleHref),\n\t overflowWrapper = that._overflowWrapper(),\n\t shouldCloseTheRootItem;\n\n\t if(targetElement && (!targetElement.parentNode || !itemElement)){\n\t return;\n\t }\n\n\t if($(target).hasClass('k-menu-expand-arrow-icon')){\n\t this._lastClickedElement = itemElement;\n\t }\n\n\t while (targetElement && targetElement.parentNode != itemElement) {\n\t targetElement = targetElement.parentNode;\n\t }\n\n\t if ($(targetElement).is(templateSelector)) {\n\t return;\n\t }\n\n\t if (element.hasClass(DISABLEDSTATE)) {\n\t e.preventDefault();\n\t return;\n\t }\n\n\t if (!e.handled && that._triggerSelect(target, itemElement) && !formNode) { // We shouldn't stop propagation and shoudn't prevent form elements.\n\t e.preventDefault();\n\t }\n\n\t e.handled = true;\n\n\t childGroup = element.children(popupSelector);\n\t if (overflowWrapper) {\n\t var childPopupId = element.data(POPUP_OPENER_ATTR);\n\t if (childPopupId) {\n\t childGroup = overflowWrapper.find(popupGroupSelector(childPopupId));\n\t }\n\t }\n\t childGroupVisible = childGroup.is(\":visible\");\n\t shouldCloseTheRootItem = options.openOnClick && childGroupVisible && that._isRootItem(element);\n\n\t if (options.closeOnClick && (!isLink || isLocalLink) && (!childGroup.length || shouldCloseTheRootItem)) {\n\t element.removeClass(HOVERSTATE).css(\"height\"); // Force refresh for Chrome\n\t that._oldHoverItem = that._findRootParent(element);\n\t var item = that._parentsUntil(link, that.element, allItemsSelector);\n\t that._forceClose = !!overflowWrapper;\n\t that.close(item);\n\t that.clicked = false;\n\t if (\"MSPointerUp\".indexOf(e.type) != -1) {\n\t e.preventDefault();\n\t }\n\t return;\n\t }\n\n\t if (isLink && e.enterKey) {\n\t link[0].click();\n\t }\n\n\t if (((!that._isRootItem(element) || options.openOnClick === false) && !options.openOnClick.subMenuItems) && !kendo.support.touch && !(isPointerTouch(e) && that._isRootItem(element.closest(allItemsSelector)))) {\n\t return;\n\t }\n\n\t if (!isLink && !formNode && !isTargetLink) {\n\t e.preventDefault();\n\t }\n\n\t that.clicked = true;\n\t openHandle = childGroup.is(\":visible\") ? CLOSE : OPEN;\n\t if (!options.closeOnClick && openHandle == CLOSE) {\n\t return;\n\t }\n\t that[openHandle](element);\n\t },\n\n\t _parentsUntil: function(context, top, selector) {\n\t var overflowWrapper = this._overflowWrapper();\n\t if (!overflowWrapper) {\n\t return context.parentsUntil(top, selector);\n\t } else {\n\t var parents = overflowMenuParents(context, overflowWrapper);\n\t var result = [];\n\t $(parents).each(function(){\n\t var parent = $(this);\n\t if (parent.is(top)) {\n\t return false;\n\t }\n\t if (parent.is(selector)) {\n\t result.push(this);\n\t }\n\t });\n\t return $(result);\n\t }\n\t },\n\n\t _triggerSelect: function (target, itemElement) {\n\t target = target.is(\".k-link\") ? target : target.closest(\".k-link\");\n\n\t var selectHandler = target.data(\"selectHandler\"),\n\t itemSelectEventData;\n\n\t if (selectHandler) {\n\t itemSelectEventData = this._getEventData(target);\n\t selectHandler.call(this, itemSelectEventData);\n\t }\n\n\t var isSelectItemDefaultPrevented = itemSelectEventData && itemSelectEventData.isDefaultPrevented();\n\t var isSelectDefaultPrevented = this._triggerEvent({ item: itemElement, type: SELECT });\n\t return isSelectItemDefaultPrevented || isSelectDefaultPrevented;\n\t },\n\n\t _getEventData: function (target) {\n\t var eventData = {\n\t sender: this,\n\t target: target,\n\t _defaultPrevented: false,\n\t preventDefault: function () {\n\t this._defaultPrevented = true;\n\t },\n\t isDefaultPrevented: function () {\n\t return this._defaultPrevented;\n\t }\n\t };\n\t return eventData;\n\t },\n\n\t _documentClick: function (e) {\n\t var that = this;\n\t var target = $(e.target).hasClass('k-menu-expand-arrow-icon') ? that._lastClickedElement : e.target;\n\n\t if (contains((that._overflowWrapper() || that.element)[0], target)) {\n\t that._lastClickedElement = undefined;\n\t return;\n\t }\n\n\t that.clicked = false;\n\t },\n\n\t _focus: function (e) {\n\t var that = this,\n\t target = e.target,\n\t hoverItem = that._hoverItem(),\n\t active = activeElement();\n\n\t if (target != that.wrapper[0] && !$(target).is(\":kendoFocusable\")) {\n\t e.stopPropagation();\n\t $(target).closest(\".k-content\").closest(\".k-menu-group\").closest(\".k-item\").addClass(FOCUSEDSTATE);\n\t that.wrapper.trigger(\"focus\");\n\t return;\n\t }\n\n\t if (active === e.currentTarget) {\n\t if (hoverItem.length) {\n\t that._moveHover([], hoverItem);\n\t } else if (!that._oldHoverItem) {\n\t that._moveHover([], that.wrapper.children().first());\n\t }\n\t }\n\t },\n\n\t _keydown: function (e) {\n\t var that = this,\n\t key = e.keyCode,\n\t hoverItem = that._oldHoverItem,\n\t target,\n\t belongsToVertical,\n\t hasChildren,\n\t isRtl = kendo.support.isRtl(that.wrapper);\n\n\t if (e.target != e.currentTarget && key != keys.ESC) {\n\t return;\n\t }\n\n\t if (!hoverItem) {\n\t hoverItem = that._oldHoverItem = that._hoverItem();\n\t }\n\n\t belongsToVertical = that._itemBelongsToVertival(hoverItem);\n\t hasChildren = that._itemHasChildren(hoverItem);\n\t that._keyTriggered = true;\n\n\t if (key == keys.RIGHT) {\n\t target = that[isRtl ? \"_itemLeft\" : \"_itemRight\"](hoverItem, belongsToVertical, hasChildren);\n\t } else if (key == keys.LEFT) {\n\t target = that[isRtl ? \"_itemRight\" : \"_itemLeft\"](hoverItem, belongsToVertical, hasChildren);\n\t } else if (key == keys.DOWN) {\n\t target = that._itemDown(hoverItem, belongsToVertical, hasChildren);\n\t } else if (key == keys.UP) {\n\t target = that._itemUp(hoverItem, belongsToVertical, hasChildren);\n\t } else if (key == keys.HOME) {\n\t that._moveHover(hoverItem, hoverItem.parent().children().first());\n\t e.preventDefault();\n\t } else if (key == keys.END) {\n\t that._moveHover(hoverItem, hoverItem.parent().children().last());\n\t e.preventDefault();\n\t } else if (key == keys.ESC) {\n\t target = that._itemEsc(hoverItem, belongsToVertical);\n\t } else if (key == keys.ENTER || key == keys.SPACEBAR) {\n\t target = hoverItem.children(\".k-link\");\n\t if (target.length > 0) {\n\t that._click({ target: target[0], preventDefault: function () {}, enterKey: true });\n\t if (hasChildren && !hoverItem.hasClass(DISABLEDSTATE)) {\n\t that.open(hoverItem);\n\t that._moveHover(hoverItem, that._childPopupElement(hoverItem).children().first());\n\t } else {\n\t that._moveHoverToRoot(hoverItem, that._findRootParent(hoverItem));\n\t }\n\t }\n\t } else if (key == keys.TAB) {\n\t target = that._findRootParent(hoverItem);\n\t that._moveHover(hoverItem, target);\n\t that._checkActiveElement();\n\t return;\n\t }\n\n\t if (target && target[0]) {\n\t e.preventDefault();\n\t e.stopPropagation(); // needed to handle ESC in column menu only when a root item is focused\n\t }\n\t },\n\n\t _hoverItem: function() {\n\t return this.wrapper.find(\".k-item.k-hover,.k-item.k-focus\").filter(\":visible\");\n\t },\n\n\t _itemBelongsToVertival: function (item) {\n\t var menuIsVertical = this.wrapper.hasClass(\"k-menu-vertical\");\n\n\t if (!item.length) {\n\t return menuIsVertical;\n\t }\n\t return item.parent().hasClass(\"k-menu-group\") || menuIsVertical;\n\t },\n\n\t _itemHasChildren: function (item) {\n\t if (!item || !item.length || !item[0].nodeType) {\n\t return false;\n\t }\n\t return item.children(\".k-menu-group, div.k-animation-container\").length > 0 ||\n\t (!!item.data(POPUP_OPENER_ATTR) && !!this._overflowWrapper().children(popupGroupSelector(item.data(POPUP_OPENER_ATTR))));\n\t },\n\n\t _moveHover: function (item, nextItem) {\n\t var that = this,\n\t id = that._ariaId;\n\n\t if (item.length && nextItem.length) {\n\t item.removeClass(FOCUSEDSTATE);\n\t }\n\n\t if (nextItem.length) {\n\t if (nextItem[0].id) {\n\t id = nextItem[0].id;\n\t }\n\n\t nextItem.addClass(FOCUSEDSTATE);\n\t that._oldHoverItem = nextItem;\n\n\t if (id) {\n\t that.element.removeAttr(\"aria-activedescendant\");\n\t $(\"#\" + id).removeAttr(\"id\");\n\t nextItem.attr(\"id\", id);\n\t that.element.attr(\"aria-activedescendant\", id);\n\t }\n\t that._scrollToItem(nextItem);\n\t }\n\t },\n\n\t _moveHoverToRoot: function (item, nextItem) {\n\t this._moveHover(item, nextItem);\n\t },\n\n\t _findRootParent: function (item) {\n\t if (this._isRootItem(item)) {\n\t return item;\n\t } else {\n\t return this._parentsUntil(item, menuSelector, \"li.k-item\").last();\n\t }\n\t },\n\n\t _isRootItem: function (item) {\n\t return item.parent().hasClass(MENU);\n\t },\n\n\t _itemRight: function (item, belongsToVertical, hasChildren) {\n\t var that = this,\n\t nextItem,\n\t parentItem,\n\t overflowWrapper;\n\n\t if (!belongsToVertical) {\n\t nextItem = item.nextAll(itemSelector + exclusionSelector).eq(0);\n\t if (!nextItem.length) {\n\t nextItem = item.prevAll(itemSelector + exclusionSelector).last();\n\t }\n\t that.close(item);\n\t } else if (hasChildren && !item.hasClass(DISABLEDSTATE)) {\n\t that.open(item);\n\t nextItem = that._childPopupElement(item).children().first();\n\t } else if (that.options.orientation == \"horizontal\") {\n\t parentItem = that._findRootParent(item);\n\t overflowWrapper = that._overflowWrapper();\n\t if (overflowWrapper) {\n\t var rootPopup = itemPopup(parentItem, overflowWrapper);\n\t that._closeChildPopups(rootPopup);\n\t }\n\t that.close(parentItem);\n\t nextItem = parentItem.nextAll(itemSelector + exclusionSelector).eq(0);\n\t }\n\n\t if (nextItem && !nextItem.length) {\n\t nextItem = that.wrapper.children(\".k-item\").first();\n\t } else if (!nextItem) {\n\t nextItem = [];\n\t }\n\n\t that._moveHover(item, nextItem);\n\t return nextItem;\n\t },\n\n\t _itemLeft: function (item, belongsToVertical) {\n\t var that = this,\n\t nextItem,\n\t overflowWrapper;\n\n\t if (!belongsToVertical) {\n\t nextItem = item.prevAll(itemSelector + exclusionSelector).eq(0);\n\t if (!nextItem.length) {\n\t nextItem = item.nextAll(itemSelector + exclusionSelector).last();\n\t }\n\t that.close(item);\n\t } else {\n\t nextItem = item.parent().closest(\".k-item\");\n\t overflowWrapper = that._overflowWrapper();\n\t if (!nextItem.length && overflowWrapper) {\n\t nextItem = popupParentItem(item.parent(), overflowWrapper);\n\t }\n\t that.close(nextItem);\n\t if (that._isRootItem(nextItem) && that.options.orientation == \"horizontal\") {\n\t nextItem = nextItem.prevAll(itemSelector + exclusionSelector).eq(0);\n\t }\n\t }\n\n\t if (!nextItem.length) {\n\t nextItem = that.wrapper.children(\".k-item\").last();\n\t }\n\n\t that._moveHover(item, nextItem);\n\t return nextItem;\n\t },\n\n\t _itemDown: function (item, belongsToVertical, hasChildren) {\n\t var that = this,\n\t nextItem;\n\n\t if (!belongsToVertical) {\n\t if (!hasChildren || item.hasClass(DISABLEDSTATE)) {\n\t return;\n\t } else {\n\t that.open(item);\n\t nextItem = that._childPopupElement(item).children().first();\n\t }\n\t } else {\n\t nextItem = item.nextAll(itemSelector + exclusionSelector).eq(0);\n\t }\n\n\t if (!nextItem.length && item.length) {\n\t nextItem = item.parent().children().first();\n\t } else if (!item.length) {\n\t nextItem = that.wrapper.children(\".k-item\").first();\n\t }\n\n\t that._moveHover(item, nextItem);\n\t return nextItem;\n\t },\n\n\t _itemUp: function (item, belongsToVertical) {\n\t var that = this,\n\t nextItem;\n\n\t if (!belongsToVertical) {\n\t return;\n\t } else {\n\t nextItem = item.prevAll(itemSelector + exclusionSelector).eq(0);\n\t }\n\n\t if (!nextItem.length && item.length) {\n\t nextItem = item.parent().children().last();\n\t } else if (!item.length) {\n\t nextItem = that.wrapper.children(\".k-item\").last();\n\t }\n\n\t that._moveHover(item, nextItem);\n\t return nextItem;\n\t },\n\n\t _scrollToItem: function(item){\n\t var that = this;\n\t if (that.options.scrollable && item && item.length) {\n\t var ul = item.parent();\n\t var isHorizontal = ul.hasClass(MENU) ? that.options.orientation == \"horizontal\" : false;\n\t var scrollDir = isHorizontal ? \"scrollLeft\" : \"scrollTop\";\n\t var getSize = isHorizontal ? kendo._outerWidth : kendo._outerHeight;\n\t var currentScrollOffset = ul[scrollDir]();\n\t var itemSize = getSize(item);\n\t var itemOffset = item[0][isHorizontal ? \"offsetLeft\" : \"offsetTop\"];\n\t var ulSize = getSize(ul);\n\t var scrollButtons = ul.siblings(scrollButtonSelector);\n\t var scrollButtonSize = scrollButtons.length ? getSize(scrollButtons.first()) : 0;\n\t var itemPosition;\n\n\t if (currentScrollOffset + ulSize < itemOffset + itemSize + scrollButtonSize) {\n\t itemPosition = itemOffset + itemSize - ulSize + scrollButtonSize;\n\t } else if (currentScrollOffset > itemOffset - scrollButtonSize) {\n\t itemPosition = itemOffset - scrollButtonSize;\n\t }\n\n\t if (!isNaN(itemPosition)) {\n\t var scrolling = {};\n\t scrolling[scrollDir] = itemPosition;\n\t ul.finish().animate(scrolling, \"fast\", \"linear\", function () {\n\t that._toggleScrollButtons(ul, scrollButtons.first(), scrollButtons.last(), isHorizontal);\n\t });\n\t }\n\t }\n\t },\n\n\t _itemEsc: function (item, belongsToVertical) {\n\t var that = this,\n\t nextItem;\n\n\t if (!belongsToVertical) {\n\t return item;\n\t } else {\n\t nextItem = item.parent().closest(\".k-item\");\n\t that.close(nextItem);\n\t that._moveHover(item, nextItem);\n\t }\n\n\t return nextItem;\n\t },\n\n\t _childPopupElement: function(item) {\n\t var popupElement = item.find(\".k-menu-group\");\n\t var wrapper = this._overflowWrapper();\n\t if (!popupElement.length && wrapper) {\n\t popupElement = itemPopup(item, wrapper);\n\t }\n\t return popupElement;\n\t },\n\n\t _triggerEvent: function(e) {\n\t var that = this;\n\n\t return that.trigger(e.type, { type: e.type, item: e.item });\n\t },\n\n\t _focusHandler: function (e) {\n\t var that = this,\n\t item = $(kendo.eventTarget(e)).closest(allItemsSelector);\n\n\t if (item.hasClass(DISABLEDSTATE)) {\n\t return;\n\t }\n\n\t setTimeout(function () {\n\t that._moveHover([], item);\n\t if (item.children(\".k-content\")[0]) {\n\t item.parent().closest(\".k-item\").removeClass(FOCUSEDSTATE);\n\t }\n\t }, 200);\n\t },\n\n\t _animations: function(options) {\n\t if (options && (\"animation\" in options) && !options.animation) {\n\t options.animation = { open: { effects: {} }, close: { hide: true, effects: {} } };\n\t }\n\t },\n\t _dataSource: function(options) {\n\t var that = this,\n\t dataSource = options ? options.dataSource : that.options.dataSource;\n\n\t if (!dataSource) {\n\t return;\n\t }\n\n\t dataSource = isArray(dataSource) ? { data: dataSource } : dataSource;\n\n\t that._unbindDataSource();\n\n\t if (!dataSource.fields) {\n\t dataSource.fields = [\n\t { field: \"uid\" },\n\t { field: \"text\" },\n\t { field: \"url\" },\n\t { field: \"cssClass\" },\n\t { field: \"spriteCssClass\" },\n\t { field: \"imageUrl\" },\n\t { field: \"imageAttr\" },\n\t { field: \"attr\" },\n\t { field: \"contentAttr\" },\n\t { field: \"content\" },\n\t { field: \"encoded\" },\n\t { field: \"items\" },\n\t { field: \"select\" }\n\t ];\n\t }\n\n\t that.dataSource = HierarchicalDataSource.create(dataSource);\n\n\t that._bindDataSource();\n\n\t that.dataSource.fetch();\n\t },\n\n\t _bindDataSource: function() {\n\t this._refreshHandler = proxy(this.refresh, this);\n\t this._errorHandler = proxy(this._error, this);\n\n\t this.dataSource.bind(CHANGE, this._refreshHandler);\n\t this.dataSource.bind(ERROR, this._errorHandler);\n\t },\n\n\t _unbindDataSource: function() {\n\t var dataSource = this.dataSource;\n\n\t if (dataSource) {\n\t dataSource.unbind(CHANGE, this._refreshHandler);\n\t dataSource.unbind(ERROR, this._errorHandler);\n\t }\n\t },\n\n\t _error: function () {\n\n\t },\n\n\t findByUid: function (uid) {\n\t var wrapperElement = this._overflowWrapper() || this.element;\n\t return wrapperElement.find(\"[\" + kendo.attr(\"uid\") + \"=\" + uid + \"]\");\n\t },\n\n\t refresh: function (ev) {\n\t var that = this;\n\t var node = ev.node;\n\t var action = ev.action;\n\t var parentElement = node ? that.findByUid(node.uid) : that.element;\n\t var itemsToUpdate = ev.items;\n\t var index = ev.index;\n\t var updateProxy = $.proxy(that._updateItem, that);\n\t var removeProxy = $.proxy(that._removeItem, that);\n\n\t if (action == \"add\") {\n\t that._appendItems(itemsToUpdate, index, parentElement);\n\t } else if (action == \"remove\") {\n\t itemsToUpdate.forEach(removeProxy);\n\t } else if (action == \"itemchange\") {\n\t itemsToUpdate.forEach(updateProxy);\n\t } else if (action === \"itemloaded\") {\n\t that.append(ev.items, parentElement);\n\t } else {\n\t this._initData();\n\t }\n\n\t this.trigger(DATABOUND, { item: parentElement, dataItem: node });\n\t },\n\n\t _appendItems: function(items, index, parent) {\n\t var that = this;\n\t var referenceItem = parent.find(itemSelector).eq(index);\n\n\t if(referenceItem.length){\n\t that.insertBefore(items, referenceItem);\n\t } else {\n\t that.append(items, parent);\n\t }\n\t },\n\n\t _removeItem: function(item) {\n\t var that = this;\n\t var element = that.findByUid(item.uid);\n\t that.remove(element);\n\t },\n\n\t _updateItem: function(item) {\n\t var that = this;\n\t var element = that.findByUid(item.uid);\n\t var nextElement = element.next();\n\t var parentNode = item.parentNode();\n\n\t that.remove(element);\n\n\t if(nextElement.length) {\n\t that.insertBefore(item, nextElement);\n\t } else {\n\t that.append(item, parentNode && that.findByUid(parentNode.uid));\n\t }\n\t },\n\n\t _accessors: function() {\n\t var that = this,\n\t options = that.options,\n\t i, field, textField,\n\t element = that.element;\n\n\t for (i in bindings) {\n\t field = options[bindings[i]];\n\t textField = element.attr(kendo.attr(i + \"-field\"));\n\n\t if (!field && textField) {\n\t field = textField;\n\t }\n\n\t if (!field) {\n\t field = i;\n\t }\n\n\t if (!isArray(field)) {\n\t field = [field];\n\t }\n\n\t options[bindings[i]] = field;\n\t }\n\t },\n\n\t _fieldAccessor: function(fieldName) {\n\t var fieldBindings = this.options[bindings[fieldName]] || [],\n\t count = fieldBindings.length,\n\t result = \"(function(item) {\";\n\n\t if (count === 0) {\n\t result += \"return item['\" + fieldName + \"'];\";\n\t } else {\n\t result += \"var levels = [\" +\n\t $.map(fieldBindings, function(x) {\n\t return \"function(d){ return \" + kendo.expr(x) + \"}\";\n\t }).join(\",\") + \"];\";\n\t result += \"if(item.level){return levels[Math.min(item.level(), \" + count + \"-1)](item);}else\";\n\t result += \"{return levels[\"+ count + \"-1](item)}\";\n\t }\n\n\t result += \"})\";\n\n\t return result;\n\t },\n\n\t _templates: function () {\n\t var that = this,\n\t options = that.options,\n\t fieldAccessor = proxy(that._fieldAccessor, that);\n\n\t if (options.template && typeof options.template == STRING) {\n\t options.template = template(options.template);\n\t } else if (!options.template) {\n\t options.template = template(\n\t \"\"\n\t );\n\t }\n\n\t that.templates = {\n\t content: template(\n\t \"#var contentHtml = \" + fieldAccessor(\"content\") + \"(item);#\" +\n\t \"
#= contentHtml || '' #
\"\n\t ),\n\t group: template(\n\t \"
\" +\n\t \"#= renderItems(data) #\" +\n\t \"
\"\n\t ),\n\t itemWrapper: template(\n\t \"# var url = \" + fieldAccessor(\"url\") + \"(item); #\" +\n\t \"# var imageUrl = \" + fieldAccessor(\"imageUrl\") + \"(item); #\" +\n\t \"# var imgAttributes = \" + fieldAccessor(\"imageAttr\") + \"(item);#\" +\n\t \"# var tag = url ? 'a' : 'span' #\" +\n\t \"<#= tag # class='#= textClass(item) #' #if(url){#href='#= url #'#}#>\" +\n\n\t \"# if (imageUrl) { #\" +\n\t \"

\" +\n\t \"# } #\" +\n\n\t \"#= sprite(item) #\" +\n\t \"#= data.menu.options.template(data) #\" +\n\t \"#= arrow(data) #\" +\n\t \"#= tag #>\"\n\t ),\n\t item: template(\n\t \"#var contentHtml = \" + fieldAccessor(\"content\") + \"(item);#\" +\n\t \"
0) { # \" +\n\t \"# if(item.expanded) { # \" +\n\t \" aria-expanded='true'\" +\n\t \"# } else { #\" +\n\t \" aria-expanded='false'\" +\n\t \"# } #\" +\n\t \"# } #\" +\n\t \">\" +\n\t \"#= itemWrapper(data) #\" +\n\t \"#if (item.hasChildren || item.items) { #\" +\n\t \"#= subGroup({ items: item.items, menu: menu, group: { expanded: item.expanded } }) #\" +\n\t \"# } else if (item.content || item.contentUrl || contentHtml) { #\" +\n\t \"#= renderContent(data) #\" +\n\t \"# } #\" +\n\t \"\"\n\t ),\n\t scrollButton: template(\n\t \"\"\n\t ),\n\t arrow: template(\"
\"),\n\t sprite: template(\"# var spriteCssClass = \" + fieldAccessor(\"spriteCssClass\") + \"(data); if(spriteCssClass) {#
#}#\"),\n\t empty: template(\"\")\n\t };\n\t },\n\n\t renderItem: function (options) {\n\t var that = this;\n\t options = extend({ menu: that, group: {} }, options);\n\n\t var empty = that.templates.empty,\n\t item = options.item;\n\n\t return that.templates.item(extend(options, {\n\t sprite: that.templates.sprite,\n\t itemWrapper: that.templates.itemWrapper,\n\t renderContent: that.renderContent,\n\t arrow: item.items || item.content || item[that.options.dataContentField[0]] ? that.templates.arrow : empty,\n\t subGroup: that.renderGroup\n\t }, rendering));\n\t },\n\n\t renderGroup: function (options) {\n\t var that = this;\n\t var templates = that.templates || options.menu.templates;\n\n\t return templates.group(extend({\n\t renderItems: function(options) {\n\t var html = \"\",\n\t i = 0,\n\t items = options.items,\n\t len = items ? items.length : 0,\n\t group = extend({ length: len }, options.group);\n\n\t for (; i < len; i++) {\n\t html += options.menu.renderItem(extend(options, {\n\t group: group,\n\t item: extend({ index: i }, items[i])\n\t }));\n\t }\n\n\t return html;\n\t }\n\t }, options, rendering));\n\t },\n\n\t renderContent: function (options) {\n\t return options.menu.templates.content(extend(options, rendering));\n\t }\n\t });\n\n\t var ContextMenu = Menu.extend({\n\t init: function(element, options) {\n\t var that = this;\n\n\t Menu.fn.init.call(that, element, options);\n\n\t that.element.attr(\"role\", \"menu\");\n\n\t that._marker = kendo.guid().substring(0, 8);\n\n\t that.target = $(that.options.target);\n\n\t that._popup();\n\t that._wire();\n\t },\n\n\t _initOverflow: function(options){\n\t var that = this;\n\t if (options.scrollable && !that._overflowWrapper()) {\n\t that._openedPopups = {};\n\n\t that._popupsWrapper = (that.element.parent().is(animationContainerSelector) ? that.element.parent() : that.element)\n\t .wrap(\"\").parent();\n\n\t if (that.options.orientation == \"horizontal\") {\n\t removeSpacesBetweenItems(that.element);\n\t }\n\n\t if (options.appendTo) {\n\t options.appendTo = $(options.appendTo);\n\t options.appendTo.append(that._popupsWrapper);\n\t }\n\n\t that._initialHeight = that.element[0].style.height;\n\t that._initialWidth = that.element[0].style.width;\n\t }\n\t },\n\n\t options: {\n\t name: \"ContextMenu\",\n\t filter: null,\n\t showOn: \"contextmenu\",\n\t orientation: \"vertical\",\n\t alignToAnchor: false,\n\t copyAnchorStyles : true,\n\t target: \"body\"\n\t },\n\n\t events: [\n\t OPEN,\n\t CLOSE,\n\t ACTIVATE,\n\t DEACTIVATE,\n\t SELECT\n\t ],\n\n\t setOptions: function(options) {\n\t var that = this;\n\n\t Menu.fn.setOptions.call(that, options);\n\n\t that.target.off(that.showOn + NS + that._marker, that._showProxy);\n\n\t if (that.userEvents) {\n\t that.userEvents.destroy();\n\t }\n\n\t that.target = $(that.options.target);\n\t if (options.orientation && that.popup.wrapper[0]) {\n\t that.popup.element.unwrap();\n\t }\n\n\t that._wire();\n\n\t Menu.fn.setOptions.call(this, options);\n\t },\n\n\t destroy: function() {\n\t var that = this;\n\n\t that.target.off(that.options.showOn + NS + that._marker);\n\t DOCUMENT_ELEMENT.off(kendo.support.mousedown + NS + that._marker, that._closeProxy);\n\n\t if (that.userEvents) {\n\t that.userEvents.destroy();\n\t }\n\n\t Menu.fn.destroy.call(that);\n\t },\n\n\t open: function(x, y) {\n\t var that = this;\n\n\t x = $(x)[0];\n\n\t if (contains(that.element[0], $(x)[0]) || that._itemHasChildren($(x))) { // call parent open for children elements\n\t Menu.fn.open.call(that, x);\n\t } else {\n\t if (that._triggerEvent({ item: that.element, type: OPEN }) === false) {\n\t if (that.popup.visible() && that.options.filter) {\n\t that.popup.close(true);\n\t that.popup.element.kendoStop(true);\n\t }\n\n\t if (y !== undefined) {\n\t var overflowWrapper = that._overflowWrapper();\n\t if (overflowWrapper) {\n\t var offset = overflowWrapper.offset();\n\t x -= offset.left;\n\t y -= offset.top;\n\t }\n\t that.popup.wrapper.hide();\n\t that._configurePopupScrolling(x, y);\n\t that.popup.open(x, y);\n\t } else {\n\t that.popup.options.anchor = (x ? x : that.popup.anchor) || that.target;\n\t that.popup.element.kendoStop(true);\n\t that._configurePopupScrolling();\n\t that.popup.open();\n\t }\n\n\t DOCUMENT_ELEMENT.off(that.popup.downEvent, that.popup._mousedownProxy);\n\t DOCUMENT_ELEMENT\n\t .on(kendo.support.mousedown + NS + that._marker, that._closeProxy);\n\n\t that.element.trigger(\"focus\");\n\t }\n\t }\n\n\t return that;\n\t },\n\n\t _configurePopupScrolling: function(x, y){\n\t var that = this;\n\t var popup = that.popup;\n\t var isHorizontal = that.options.orientation == \"horizontal\";\n\n\t if (that.options.scrollable) {\n\t that._wrapPopupElement(popup);\n\n\t popup.element.parent().css({\n\t position: \"\",\n\t height: \"\"\n\t });\n\n\t popup.element.css({\n\t visibility: \"hidden\",\n\t display: \"\",\n\t position: \"\"\n\t });\n\n\t if (isHorizontal) {\n\t that._setPopupWidth(popup, isNaN(x) ? undefined : {isFixed: true, x: x, y: y});\n\t } else {\n\t that._setPopupHeight(popup, isNaN(x) ? undefined : {isFixed: true, x: x, y: y});\n\t }\n\n\t popup.element.css({\n\t visibility: \"\",\n\t display: \"none\",\n\t position: \"absolute\"\n\t });\n\n\t that._initPopupScrollButtons(popup, isHorizontal, true);\n\t popup.element.siblings(scrollButtonSelector).hide();\n\t }\n\t },\n\n\t _setPopupWidth: function(popup, isFixed){\n\t var popupElement = popup.element;\n\t var popups = popupElement.add(popupElement.parent(animationContainerSelector));\n\n\t popups.width(this._initialWidth || \"\");\n\n\t var location = popup._location(isFixed);\n\t var windowWidth = $(window).width();\n\t var popupOuterWidth = location.width;\n\t var popupOffsetLeft = Math.max(location.left, 0);\n\t var scrollLeft = isFixed ? 0 : parentsScroll(this._overflowWrapper()[0], \"scrollLeft\");\n\t var shadow = kendo.getShadows(popupElement);\n\t var maxWidth = windowWidth - shadow.left - shadow.right;\n\t var canFit = maxWidth + scrollLeft > popupOuterWidth + popupOffsetLeft;\n\n\t if (!canFit) {\n\t popups.css({overflow: \"hidden\", width: (maxWidth - popupOffsetLeft + scrollLeft) + \"px\"});\n\t }\n\t },\n\n\t close: function() {\n\t var that = this;\n\n\t if (contains(that.element[0], $(arguments[0])[0]) || that._itemHasChildren(arguments[0])) {\n\t Menu.fn.close.call(that, arguments[0]);\n\t } else {\n\t if (that.popup.visible()) {\n\t if (that._triggerEvent({ item: that.element, type: CLOSE }) === false) {\n\t that._removeHoverItem();\n\t that.element.find(\"#\" + that._ariaId).removeAttr(\"id\");\n\t that.popup.close();\n\t DOCUMENT_ELEMENT.off(kendo.support.mousedown + NS + that._marker, that._closeProxy);\n\t that.unbind(SELECT, that._closeTimeoutProxy);\n\t that.popup.options.anchor.focus();\n\t }\n\t }\n\t }\n\t },\n\n\t _showHandler: function (e) {\n\t var ev = e, offset,\n\t that = this,\n\t options = that.options,\n\t target = kendo.support.mobileOS ? $(ev.target) : $(ev.currentTarget);\n\n\t if (e.event) {\n\t ev = e.event;\n\t ev.pageX = e.x.location;\n\t ev.pageY = e.y.location;\n\t }\n\n\t if (contains(that.element[0], e.relatedTarget || e.target)) {\n\t return;\n\t }\n\n\t that._eventOrigin = ev;\n\n\t ev.preventDefault();\n\t ev.stopImmediatePropagation();\n\n\t that.element.find(\".\" + FOCUSEDSTATE).removeClass(FOCUSEDSTATE);\n\n\t if ((options.filter && target.is(options.filter)) || !options.filter) {\n\t if (options.alignToAnchor) {\n\t that.popup.options.anchor = ev.currentTarget;\n\t that.open(ev.currentTarget);\n\t } else {\n\t that.popup.options.anchor = ev.currentTarget;\n\n\t if (that._targetChild) {\n\t offset = that.target.offset();\n\t that.open(ev.pageX - offset.left, ev.pageY - offset.top);\n\t } else {\n\t that.open(ev.pageX, ev.pageY);\n\t }\n\t }\n\t }\n\t },\n\n\t _closeHandler: function (e) {\n\t var that = this,\n\t target = $(e.relatedTarget || e.target),\n\t sameTarget = target.closest(that.target.selector)[0] == that.target[0],\n\t item = target.closest(itemSelector),\n\t children = that._itemHasChildren(item),\n\t overflowWrapper = that._overflowWrapper(),\n\t containment = contains(that.element[0], target[0]) || (overflowWrapper && contains(overflowWrapper[0], target[0]));\n\n\t that._eventOrigin = e;\n\n\t var normalClick = e.which !== 3;\n\n\t if (that.popup.visible() && ((normalClick && sameTarget) || !sameTarget) && ((that.options.closeOnClick && !children && containment) || !containment)) {\n\t if (containment) {\n\t this.unbind(SELECT, this._closeTimeoutProxy);\n\t that.bind(SELECT, that._closeTimeoutProxy);\n\t } else {\n\t that.close();\n\t }\n\t }\n\t },\n\n\t _wire: function() {\n\t var that = this,\n\t options = that.options,\n\t target = that.target;\n\n\t that._preventProxy = null;\n\t that._showProxy = proxy(that._showHandler, that);\n\t that._closeProxy = proxy(that._closeHandler, that);\n\t that._closeTimeoutProxy = proxy(that.close, that);\n\n\t if (target[0]) {\n\t if (kendo.support.mobileOS && options.showOn == \"contextmenu\") {\n\t that.userEvents = new kendo.UserEvents(target, {\n\t filter: options.filter,\n\t allowSelection: false\n\t });\n\n\t that._preventProxy = function() { return false; };\n\n\t that.userEvents.bind(\"hold\", that._showProxy);\n\t }\n\n\t if (options.filter) {\n\t target.on(options.showOn + NS + that._marker, options.filter, that._preventProxy || that._showProxy);\n\t } else {\n\t target.on(options.showOn + NS + that._marker, that._preventProxy || that._showProxy);\n\t }\n\t }\n\t },\n\n\t _triggerEvent: function(e) {\n\t var that = this,\n\t anchor = $(that.popup.options.anchor)[0],\n\t origin = that._eventOrigin;\n\n\t that._eventOrigin = undefined;\n\n\t return that.trigger(e.type, extend({ type: e.type, item: e.item || this.element[0], target: anchor }, origin ? { event: origin } : {} ));\n\t },\n\n\t _popup: function() {\n\t var that = this;\n\t var overflowWrapper = that._overflowWrapper();\n\n\t that._triggerProxy = proxy(that._triggerEvent, that);\n\n\t that.popup = that.element\n\t .addClass(\"k-context-menu\")\n\t .kendoPopup({\n\t autosize: that.options.orientation === \"horizontal\",\n\t anchor: that.target || \"body\",\n\t copyAnchorStyles: that.options.copyAnchorStyles,\n\t collision: that.options.popupCollision || \"fit\",\n\t animation: that.options.animation,\n\t activate: that._triggerProxy,\n\t deactivate: that._triggerProxy,\n\t appendTo: overflowWrapper || that.options.appendTo,\n\t close: !overflowWrapper ? $.noop : function(e) {\n\t $(getChildPopups(e.sender.element, overflowWrapper)).each(function(i, p) {\n\t var popup = p.data(KENDOPOPUP);\n\t if (popup) {\n\t popup.close(true);\n\t }\n\t });\n\t }\n\t }).data(KENDOPOPUP);\n\n\t that._targetChild = contains(that.target[0], that.popup.element[0]);\n\t },\n\n\t _moveHoverToRoot: function (item, nextItem) {\n\t this._moveHover(item, nextItem);\n\t this.close();\n\t },\n\n\t _focus: function (e) {\n\t var hoverItem = this._oldHoverItem = this._hoverItem() || [];\n\n\t Menu.fn._focus.call(this, e);\n\n\t if (activeElement() === e.currentTarget) {\n\t this._moveHover(hoverItem, this.wrapper.children().first());\n\t }\n\t }\n\t });\n\n\t ui.plugin(Menu);\n\t ui.plugin(ContextMenu);\n\n\t})(window.kendo.jQuery);\n\n\treturn window.kendo;\n\n\t}, __webpack_require__(3));\n\n\n/***/ })\n\n/******/ });","module.exports =\n/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n\n\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ 0:\n/***/ (function(module, exports, __webpack_require__) {\n\n\tmodule.exports = __webpack_require__(1362);\n\n\n/***/ }),\n\n/***/ 3:\n/***/ (function(module, exports) {\n\n\tmodule.exports = function() { throw new Error(\"define cannot be used indirect\"); };\r\n\n\n/***/ }),\n\n/***/ 1132:\n/***/ (function(module, exports) {\n\n\tmodule.exports = require(\"./kendo.fx\");\n\n/***/ }),\n\n/***/ 1136:\n/***/ (function(module, exports) {\n\n\tmodule.exports = require(\"./kendo.draganddrop\");\n\n/***/ }),\n\n/***/ 1362:\n/***/ (function(module, exports, __webpack_require__) {\n\n\tvar __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function(f, define){\n\t !(__WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(1132), __webpack_require__(1136) ], __WEBPACK_AMD_DEFINE_FACTORY__ = (f), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t})(function(){\n\n\tvar __meta__ = { // jshint ignore:line\n\t id: \"mobile.scroller\",\n\t name: \"Scroller\",\n\t category: \"mobile\",\n\t description: \"The Kendo Mobile Scroller widget enables touch friendly kinetic scrolling for the contents of a given DOM element.\",\n\t depends: [ \"fx\", \"draganddrop\" ]\n\t};\n\n\t(function($, undefined) {\n\t var kendo = window.kendo,\n\t mobile = kendo.mobile,\n\t fx = kendo.effects,\n\t ui = mobile.ui,\n\t proxy = $.proxy,\n\t extend = $.extend,\n\t Widget = ui.Widget,\n\t Class = kendo.Class,\n\t Movable = kendo.ui.Movable,\n\t Pane = kendo.ui.Pane,\n\t PaneDimensions = kendo.ui.PaneDimensions,\n\t Transition = fx.Transition,\n\t Animation = fx.Animation,\n\t abs = Math.abs,\n\t SNAPBACK_DURATION = 500,\n\t SCROLLBAR_OPACITY = 0.7,\n\t FRICTION = 0.96,\n\t VELOCITY_MULTIPLIER = 10,\n\t MAX_VELOCITY = 55,\n\t OUT_OF_BOUNDS_FRICTION = 0.5,\n\t ANIMATED_SCROLLER_PRECISION = 5,\n\t RELEASECLASS = \"km-scroller-release\",\n\t REFRESHCLASS = \"km-scroller-refresh\",\n\t PULL = \"pull\",\n\t CHANGE = \"change\",\n\t RESIZE = \"resize\",\n\t SCROLL = \"scroll\",\n\t MOUSE_WHEEL_ID = 2;\n\n\t var ZoomSnapBack = Animation.extend({\n\t init: function(options) {\n\t var that = this;\n\t Animation.fn.init.call(that);\n\t extend(that, options);\n\n\t that.userEvents.bind(\"gestureend\", proxy(that.start, that));\n\t that.tapCapture.bind(\"press\", proxy(that.cancel, that));\n\t },\n\n\t enabled: function() {\n\t return this.movable.scale < this.dimensions.minScale;\n\t },\n\n\t done: function() {\n\t return this.dimensions.minScale - this.movable.scale < 0.01;\n\t },\n\n\t tick: function() {\n\t var movable = this.movable;\n\t movable.scaleWith(1.1);\n\t this.dimensions.rescale(movable.scale);\n\t },\n\n\t onEnd: function() {\n\t var movable = this.movable;\n\t movable.scaleTo(this.dimensions.minScale);\n\t this.dimensions.rescale(movable.scale);\n\t }\n\t });\n\n\t var DragInertia = Animation.extend({\n\t init: function(options) {\n\t var that = this;\n\n\t Animation.fn.init.call(that);\n\n\t extend(that, options, {\n\t transition: new Transition({\n\t axis: options.axis,\n\t movable: options.movable,\n\t onEnd: function() { that._end(); }\n\t })\n\t });\n\n\t that.tapCapture.bind(\"press\", function() { that.cancel(); });\n\t that.userEvents.bind(\"end\", proxy(that.start, that));\n\t that.userEvents.bind(\"gestureend\", proxy(that.start, that));\n\t that.userEvents.bind(\"tap\", proxy(that.onEnd, that));\n\t },\n\n\t onCancel: function() {\n\t this.transition.cancel();\n\t },\n\n\t freeze: function(location) {\n\t var that = this;\n\t that.cancel();\n\t that._moveTo(location);\n\t },\n\n\t onEnd: function() {\n\t var that = this;\n\t if (that.paneAxis.outOfBounds()) {\n\t that._snapBack();\n\t } else {\n\t that._end();\n\t }\n\t },\n\n\t done: function() {\n\t return abs(this.velocity) < 1;\n\t },\n\n\t start: function(e) {\n\t var that = this,\n\t velocity;\n\n\t if (!that.dimension.enabled) { return; }\n\n\t if (that.paneAxis.outOfBounds()) {\n\t if(that.transition._started){\n\t that.transition.cancel();\n\t that.velocity = Math.min(e.touch[that.axis].velocity * that.velocityMultiplier, MAX_VELOCITY);\n\n\t Animation.fn.start.call(that);\n\t }else{\n\t that._snapBack();\n\t }\n\t } else {\n\t velocity = e.touch.id === MOUSE_WHEEL_ID ? 0 : e.touch[that.axis].velocity;\n\t that.velocity = Math.max(Math.min(velocity * that.velocityMultiplier, MAX_VELOCITY), -MAX_VELOCITY);\n\n\t that.tapCapture.captureNext();\n\t Animation.fn.start.call(that);\n\t }\n\t },\n\n\t tick: function() {\n\t var that = this,\n\t dimension = that.dimension,\n\t friction = that.paneAxis.outOfBounds() ? OUT_OF_BOUNDS_FRICTION : that.friction,\n\t delta = (that.velocity *= friction),\n\t location = that.movable[that.axis] + delta;\n\n\t if (!that.elastic && dimension.outOfBounds(location)) {\n\t location = Math.max(Math.min(location, dimension.max), dimension.min);\n\t that.velocity = 0;\n\t }\n\n\t that.movable.moveAxis(that.axis, location);\n\t },\n\n\t _end: function() {\n\t this.tapCapture.cancelCapture();\n\t this.end();\n\t },\n\n\t _snapBack: function() {\n\t var that = this,\n\t dimension = that.dimension,\n\t snapBack = that.movable[that.axis] > dimension.max ? dimension.max : dimension.min;\n\t that._moveTo(snapBack);\n\t },\n\n\t _moveTo: function(location) {\n\t this.transition.moveTo({ location: location, duration: SNAPBACK_DURATION, ease: Transition.easeOutExpo });\n\t }\n\t });\n\n\t var AnimatedScroller = Animation.extend({\n\t init: function(options) {\n\t var that = this;\n\n\t kendo.effects.Animation.fn.init.call(this);\n\n\t extend(that, options, {\n\t origin: {},\n\t destination: {},\n\t offset: {}\n\t });\n\t },\n\n\t tick: function() {\n\t this._updateCoordinates();\n\t this.moveTo(this.origin);\n\t },\n\n\t done: function() {\n\t return abs(this.offset.y) < ANIMATED_SCROLLER_PRECISION && abs(this.offset.x) < ANIMATED_SCROLLER_PRECISION;\n\t },\n\n\t onEnd: function() {\n\t this.moveTo(this.destination);\n\t if (this.callback) {\n\t this.callback.call();\n\t }\n\t },\n\n\t setCoordinates: function(from, to) {\n\t this.offset = {};\n\t this.origin = from;\n\t this.destination = to;\n\t },\n\n\t setCallback: function(callback) {\n\t if (callback && kendo.isFunction(callback)) {\n\t this.callback = callback;\n\t } else {\n\t callback = undefined;\n\t }\n\t },\n\n\t _updateCoordinates: function() {\n\t this.offset = {\n\t x: (this.destination.x - this.origin.x) / 4,\n\t y: (this.destination.y - this.origin.y) / 4\n\t };\n\n\t this.origin = {\n\t y: this.origin.y + this.offset.y,\n\t x: this.origin.x + this.offset.x\n\t };\n\t }\n\t });\n\n\t var ScrollBar = Class.extend({\n\t init: function(options) {\n\t var that = this,\n\t horizontal = options.axis === \"x\",\n\t element = $('
');\n\n\t if(horizontal) {\n\t element.attr(\"aria-orientation\", \"horizontal\");\n\t }\n\n\t extend(that, options, {\n\t element: element,\n\t elementSize: 0,\n\t movable: new Movable(element),\n\t scrollMovable: options.movable,\n\t alwaysVisible: options.alwaysVisible,\n\t size: horizontal ? \"width\" : \"height\"\n\t });\n\n\t that.scrollMovable.bind(CHANGE, proxy(that.refresh, that));\n\t that.container.append(element);\n\t if (options.alwaysVisible) {\n\t that.show();\n\t }\n\t },\n\n\t refresh: function() {\n\t var that = this,\n\t axis = that.axis,\n\t dimension = that.dimension,\n\t paneSize = dimension.size,\n\t scrollMovable = that.scrollMovable,\n\t sizeRatio = paneSize / dimension.total,\n\t position = Math.round(-scrollMovable[axis] * sizeRatio),\n\t size = Math.round(paneSize * sizeRatio);\n\n\t if (sizeRatio >= 1) {\n\t this.element.css(\"display\", \"none\");\n\t } else {\n\t this.element.css(\"display\", \"\");\n\t }\n\n\t if (position + size > paneSize) {\n\t size = paneSize - position;\n\t } else if (position < 0) {\n\t size += position;\n\t position = 0;\n\t }\n\n\t if (that.elementSize != size) {\n\t that.element.css(that.size, size + \"px\");\n\t that.elementSize = size;\n\t }\n\n\t that._ariaValue(position, dimension.size - that.elementSize);\n\n\t that.movable.moveAxis(axis, position);\n\t },\n\n\t show: function() {\n\t this.element.css({opacity: SCROLLBAR_OPACITY, visibility: \"visible\"});\n\t },\n\n\t hide: function() {\n\t if (!this.alwaysVisible) {\n\t this.element.css({opacity: 0});\n\t }\n\t },\n\n\t _ariaValue: function(current, total) {\n\t var element = this.element;\n\n\t if(current > total) {\n\t current = total;\n\t }\n\n\t element.attr(\"aria-valuemax\", total);\n\t element.attr(\"aria-valuenow\", current);\n\t }\n\t });\n\n\t var Scroller = Widget.extend({\n\t init: function(element, options) {\n\t var that = this;\n\t Widget.fn.init.call(that, element, options);\n\n\t element = that.element;\n\n\t that._native = that.options.useNative && kendo.support.hasNativeScrolling;\n\t if (that._native) {\n\t element.addClass(\"km-native-scroller\")\n\t .prepend('