{"version":3,"file":"kendo.virtuallist.js","names":["__meta__","id","name","category","depends","hidden","$","undefined$1","kendo","window","ui","encode","htmlEncode","Widget","DataBoundWidget","percentageUnitsRegex","LIST_ITEM","TABLE_ITEM","GROUPITEM","SELECTED","FOCUSED","HOVER","CHANGE","CLICK","LISTBOUND","ITEMCHANGE","ACTIVATE","DEACTIVATE","GROUP_ROW_SEL","VIRTUAL_LIST_NS","lastFrom","array","length","toArray","value","Array","isPrimitive","dataItem","appendChild","parent","className","tagName","element","document","createElement","render","data","templates","itemTemplate","template","hasColumns","this","options","columns","altRow","index","item","placeholderTemplate","header","group","html","fixedGroupTemplate","attr","uid","addClass","removeClass","renderedColumns","i","currentWidth","width","currentWidthInt","parseInt","widthStyle","widthValue","test","renderColumns","applyStylesFromKendoAttributes","empty","append","find","remove","toggleClass","current","selected","newGroup","isLastGroupedItem","groupTemplate","appendTo","top","y","style","webkitTransform","transform","position","isActivePromise","promise","state","VirtualList","extend","init","listSize","lineHeight","mockList","that","contentClasses","bound","_fetching","fn","call","itemHeight","css","left","visibility","body","parseFloat","getComputedStyles","height","contentSelector","split","join","wrapper","closest","content","wrap","thead","row","TABLE_LIST","before","prev","ariaLabel","ariaLabelledBy","on","_values","_selectedDataItems","_selectedIndexes","_rangesList","_promisesList","_optionID","guid","_templates","setDataSource","dataSource","throttle","_renderItems","_triggerListBound","delay","_selectable","autoBind","listScreens","threshold","oppositeBuffer","type","selectable","dataValueField","mapValueTo","valueMapper","events","setOptions","itemClass","_selectProxy","off","refresh","items","_items","destroy","unbind","_refreshHandler","source","isArray","DataSource","create","_clean","_deferValueSet","mute","bind","setDSFilter","filter","view","fetch","skip","currentRangeStart","_selectingValue","_skip","trigger","_getValues","dataItems","getter","_valueGetter","map","_highlightSelectedItems","_getElementByDataItem","e","result","action","isItemChange","filtered","isFiltered","_mute","focus","_createList","skipUpdateOnBind","_emptySearch","done","itemsToMatch","found","j","itemsLength","selectedLength","changed","unchanged","push","mapChangedItems","removeAt","splice","_removeSelectedDataItem","valueGetter","idx","setValue","_forcePrefetch","slice","_valueDeferred","Deferred","select","_prefetchByValue","_checkValuesOrder","_removedAddedIndexes","newValue","dataView","_dataView","forSelection","success","response","mapValueToIndex","mapValueToDataItem","indexes","removed","_deselect","_triggerChange","added","_getIndecies","resolve","deferredRange","take","itemCount","ranges","defs","low","Math","floor","high","ceil","pages","each","_","deferred","end","existingRange","_multiplePrefetch","when","apply","prefetch","isEmptyList","_activeDeferred","_getSkip","_findDataItem","_getRange","_findRange","min","total","dataItemByIndex","progress","range","selectedDataItems","scrollWith","scrollTop","scrollTo","scrollToIndex","candidate","triggerEvent","flatView","isNaN","_getElementByIndex","_focusedIndex","hasClass","removeAttr","_getElementLocation","_screenHeight","focusIndex","focusFirst","focusLast","lastIndex","heightContainer","offsetHeight","focusPrev","focusNext","indices","initialIndices","isAlreadySelected","singleSelection","prefetchStarted","_selectDeferred","_deselectCurrentValues","_select","_listCreated","callback","_lastDSFilter","Query","compareFilters","skipUpdate","noop","_lastScrollTop","_height","hasData","setScreenHeight","screenHeight","yPosition","yDownPostion","screenEnd","key","forEach","column","templateText","field","toString","_generateItems","count","text","tabIndex","setAttribute","minHeight","_saveInitialRanges","_ranges","start","reorder","get","_buildValueGetter","_setHeight","hide","show","_getter","_onScroll","force","getList","_listItems","_fixedHeader","_whenChanged","_reorderList","list","_calculateGroupPadding","_calculateColumnsHeaderPadding","currentHeight","innerHTML","padHeight","lastRequestedRange","lastRangeStart","pageSize","flatGroups","rangeStart","inRange","flatGroup","groups","len","groupLength","_getterDeferred","reject","then","firstItemIndex","_indexConstraint","currentVisibleGroup","firstVisibleDataItemIndex","firstVisibleDataItem","firstVisibleGroup","fixedGroupText","_itemMapper","listType","currentIndex","_currentGroup","_range","_view","_getDataItemsCollection","lastScrollTop","_listIndex","theValidator","downThreshold","upThreshold","listValidator","theNew","currentOffset","Infinity","arr1","arr2","ns","list2","offset","range2","diff","abs","unshift","reshift","_bufferSizes","opposite","down","up","max","buffers","_clickHandler","getElementIndex","jQuery","elementIndex","selectedIndex","selectedIndexes","removedindexesCounter","inArray","_deselectSingleItem","children","values","oldSkip","currentTarget","isDefaultPrevented","firstItem","first","groupHeader","padding","display","support","scrollbar","isRtl","columnsHeader","plugin","kendo$1"],"sources":["kendo.virtuallist.js"],"mappings":"MAAO,kBAEP,IAAIA,SAAW,CACXC,GAAI,cACJC,KAAM,cACNC,SAAU,YACVC,QAAS,CAAE,QACXC,QAAQ,IAGZ,SAAUC,EAAGC,GACT,IAAIC,EAAQC,OAAOD,MACfE,EAAKF,EAAME,GACXC,EAASH,EAAMI,WACfC,EAASH,EAAGG,OACZC,EAAkBJ,EAAGI,gBACrBC,EAAuB,kBAIvBC,EAAY,cACZC,EAAa,cAEbC,EAAY,0BAIZC,EAAW,aACXC,EAAU,UACVC,EAAQ,UACRC,EAAS,SACTC,EAAQ,QACRC,EAAY,YACZC,EAAa,aAEbC,EAAW,WACXC,EAAa,aAEbC,EAAgB,qBAEhBC,EAAkB,eAEtB,SAASC,EAASC,GACd,OAAOA,EAAMA,EAAMC,OAAS,EAChC,CAEA,SAASC,EAAQC,GACb,OAAOA,aAAiBC,MAAQD,EAAQ,CAACA,EAC7C,CAEA,SAASE,EAAYC,GACjB,MAA2B,iBAAbA,GAA6C,iBAAbA,GAA6C,kBAAbA,CAClF,CAMA,SAASC,EAAYC,EAAQC,EAAWC,GACpC,IAAIC,EAAUC,SAASC,cAAcH,GAAW,OAMhD,OALID,IACAE,EAAQF,UAAYA,GAExBD,EAAOD,YAAYI,GAEZA,CACX,CAyFA,SAASG,EAAOH,EAASI,EAAMC,GAC3B,IAAIC,EAAeD,EAAUE,SACzBC,EAAaC,KAAKC,QAAQC,SAAWF,KAAKC,QAAQC,QAAQrB,OAC1DsB,EAASR,EAAKS,MAAQ,GAAM,EAAI,kBAAoB,GAgBxD,GAdAb,EAAUpC,EAAEoC,GAEPI,EAAKU,OACNR,EAAeD,EAAUU,qBAGV,IAAfX,EAAKS,OAAeJ,KAAK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sBAAwB1W,EAAKM,KAAK,aACrCX,KAAKoI,QAAQhK,EAAO,CAAEiC,KAAMA,GAEpC,EAEAuR,kBAAmB,WACf5R,KAAKwI,aAAenL,EAAMkL,OAAOvI,KAAKC,QAAQqG,eAClD,EAEAmM,uBAAwB,SAASxO,GAC7B,IAAI+S,EAAYhX,KAAK+G,QAAQkQ,QACzBC,EAAclX,KAAKO,OACnB4W,EAAU,EAEVD,EAAY,IAAuC,SAAjCA,EAAY,GAAG3U,MAAM6U,UACxB,SAAXnT,IACAkT,EAAU9Z,EAAMga,QAAQC,aAG5BH,GAAWpT,WAAWiT,EAAUrT,IAAI,sBAAuB,IAAMI,WAAWiT,EAAUL,SAAS,YAAYhT,IAAI,SAAU,IAEzHuT,EAAYvT,IAAI,gBAAiBwT,GAEzC,EAEAzE,+BAAgC,WAC5B,GAAI1S,KAAKC,QAAQC,SAAWF,KAAKC,QAAQC,QAAQrB,OAAQ,CACrD,IAAI0Y,EAAQla,EAAMga,QAAQE,MAAMvX,KAAKqE,SACjCiT,EAAYja,EAAMga,QAAQC,YAC1BE,EAAgBxX,KAAKuE,QAAQnF,SAASA,SAASwC,KAAK,mBACpD6L,EAAQzN,KAAK0F,WAAW+H,QAE5B+J,EAAc7T,IAAK4T,EAAQ,eAAiB,gBAAkB9J,EAAQ6J,EAAY,EACtF,CACJ,IAIJja,EAAME,GAAGuF,YAAcA,EACvBzF,EAAME,GAAGka,OAAO3U,EAEnB,CAnyDD,CAmyDGxF,OAAOD,MAAM+Y,QAChB,IAAIsB,QAAUra,aAELqa","sourcesContent":["import './kendo.data.js';\n\nvar __meta__ = {\n id: \"virtuallist\",\n name: \"VirtualList\",\n category: \"framework\",\n depends: [ \"data\" ],\n hidden: true\n};\n\n(function($, undefined$1) {\n var kendo = window.kendo,\n ui = kendo.ui,\n encode = kendo.htmlEncode,\n Widget = ui.Widget,\n DataBoundWidget = ui.DataBoundWidget,\n percentageUnitsRegex = /^\\d+(\\.\\d+)?%$/i,\n LIST_CONTENT = \"k-list-content k-virtual-content\",\n TABLE_CONTENT = \"k-table-body k-table-scroller\",\n HEADER = \"k-list-group-sticky-header\",\n LIST_ITEM = \"k-list-item\",\n TABLE_ITEM = \"k-table-row\",\n HEIGHTCONTAINER = \"k-height-container\",\n GROUPITEM = \"k-list-item-group-label\",\n LIST_UL = \"k-list-ul\",\n TABLE_LIST = \"k-table-list\",\n\n SELECTED = \"k-selected\",\n FOCUSED = \"k-focus\",\n HOVER = \"k-hover\",\n CHANGE = \"change\",\n CLICK = \"click\",\n LISTBOUND = \"listBound\",\n ITEMCHANGE = \"itemChange\",\n\n ACTIVATE = \"activate\",\n DEACTIVATE = \"deactivate\",\n\n GROUP_ROW_SEL = \".k-table-group-row\",\n\n VIRTUAL_LIST_NS = \".VirtualList\";\n\n function lastFrom(array) {\n return array[array.length - 1];\n }\n\n function toArray(value) {\n return value instanceof Array ? value : [value];\n }\n\n function isPrimitive(dataItem) {\n return typeof dataItem === \"string\" || typeof dataItem === \"number\" || typeof dataItem === \"boolean\";\n }\n\n function getItemCount(screenHeight, listScreens, itemHeight) {\n return Math.ceil(screenHeight * listScreens / itemHeight);\n }\n\n function appendChild(parent, className, tagName) {\n var element = document.createElement(tagName || \"div\");\n if (className) {\n element.className = className;\n }\n parent.appendChild(element);\n\n return element;\n }\n\n function getDefaultItemHeight(listSize) {\n var mockList = $('
' +\n '
' +\n '' +\n '
' +\n '
');\n var lineHeight;\n\n mockList.css({\n position: \"absolute\",\n left: \"-200000px\",\n visibility: \"hidden\"\n });\n mockList.appendTo(document.body);\n lineHeight = parseFloat(kendo.getComputedStyles(mockList.find(\".k-list-item\")[0], [\"height\"]).height);\n mockList.remove();\n\n return lineHeight;\n }\n\n function bufferSizes(screenHeight, listScreens, opposite) { //in pixels\n return {\n down: screenHeight * opposite,\n up: screenHeight * (listScreens - 1 - opposite)\n };\n }\n\n function listValidator(options, screenHeight) {\n var downThreshold = (options.listScreens - 1 - options.threshold) * screenHeight;\n var upThreshold = options.threshold * screenHeight;\n\n return function(list, scrollTop, lastScrollTop) {\n if (scrollTop > lastScrollTop) {\n return scrollTop - list.top < downThreshold;\n } else {\n return list.top === 0 || scrollTop - list.top > upThreshold;\n }\n };\n }\n\n function scrollCallback(element, callback) {\n return function(force) {\n return callback(element.scrollTop, force);\n };\n }\n\n function syncList(reorder) {\n return function(list, force) {\n reorder(list.items, list.index, force);\n return list;\n };\n }\n\n function position(element, y) {\n element.style.webkitTransform = 'translateY(' + y + \"px)\";\n element.style.transform = 'translateY(' + y + \"px)\";\n }\n\n function map2(callback, templates) {\n return function(arr1, arr2) {\n for (var i = 0, len = arr1.length; i < len; i++) {\n callback(arr1[i], arr2[i], templates);\n if (arr2[i].item) {\n this.trigger(ITEMCHANGE, { item: $(arr1[i]), data: arr2[i].item, ns: kendo.ui });\n }\n }\n };\n }\n\n function reshift(items, diff) {\n var range;\n\n if (diff > 0) { // down\n range = items.splice(0, diff);\n items.push.apply(items, range);\n } else { // up\n range = items.splice(diff, -diff);\n items.unshift.apply(items, range);\n }\n\n return range;\n }\n\n function render(element, data, templates) {\n var itemTemplate = templates.template,\n hasColumns = this.options.columns && this.options.columns.length,\n altRow = data.index % 2 === 1 ? \"k-table-alt-row\" : \"\";\n\n element = $(element);\n\n if (!data.item) {\n itemTemplate = templates.placeholderTemplate;\n }\n\n if (data.index === 0 && this.header && data.group) {\n this.header.html(templates.fixedGroupTemplate(data.group));\n }\n\n element\n .attr(\"data-uid\", data.item ? data.item.uid : \"\")\n .attr(\"data-offset-index\", data.index);\n\n if (hasColumns && data.item) {\n if (altRow.length > 0) {\n element.addClass(altRow);\n } else {\n element.removeClass(\"k-table-alt-row\");\n }\n\n let renderedColumns = $(renderColumns(this.options, data.item, templates));\n kendo.applyStylesFromKendoAttributes(renderedColumns, [\"width\", \"max-width\"]);\n element.empty().append(renderedColumns);\n } else {\n element.find(\".\" + GROUPITEM).remove();\n element.find(\".k-list-item-text\").html(itemTemplate(data.item || {}));\n }\n\n element.toggleClass(FOCUSED, data.current);\n element.toggleClass(SELECTED, data.selected);\n element.toggleClass(\"k-first\", data.newGroup);\n element.toggleClass(\"k-last\", data.isLastGroupedItem);\n element.toggleClass(\"k-loading-item\", !data.item);\n\n if (data.index !== 0 && data.newGroup) {\n if (hasColumns) {\n $('' + templates.groupTemplate(data.group) + '')\n .appendTo(element);\n } else {\n $(\"
\")\n .appendTo(element)\n .html(templates.groupTemplate(data.group));\n }\n } else if (data.group && hasColumns) {\n element.append($(''));\n }\n\n if (data.top !== undefined$1) {\n position(element[0], data.top);\n }\n }\n\n function renderColumns(options, dataItem, templates) {\n var item = \"\";\n\n for (var i = 0; i < options.columns.length; i++) {\n var currentWidth = options.columns[i].width;\n var currentWidthInt = parseInt(currentWidth, 10);\n var widthStyle = '';\n\n if (currentWidth) {\n let widthValue = `${currentWidthInt}${percentageUnitsRegex.test(currentWidth) ? \"%\" : \"px\"}`;\n widthStyle = `${kendo.attr(\"style-width\")}=\"${widthValue}\" ${kendo.attr(\"style-max-width\")}=\"${widthValue}\"`;\n }\n\n item += \"\";\n item += templates[\"column\" + i](dataItem);\n item += \"\";\n }\n\n return item;\n }\n\n function mapChangedItems(selected, itemsToMatch) {\n var itemsLength = itemsToMatch.length;\n var selectedLength = selected.length;\n var dataItem;\n var found;\n var i, j;\n\n var changed = [];\n var unchanged = [];\n\n if (selectedLength) {\n for (i = 0; i < selectedLength; i++) {\n dataItem = selected[i];\n found = false;\n\n for (j = 0; j < itemsLength; j++) {\n if (dataItem === itemsToMatch[j]) {\n found = true;\n changed.push({ index: i, item: dataItem });\n break;\n }\n }\n\n if (!found) {\n unchanged.push(dataItem);\n }\n }\n }\n\n return {\n changed: changed,\n unchanged: unchanged\n };\n }\n\n function isActivePromise(promise) {\n return promise && promise.state() !== \"resolved\";\n }\n\n var VirtualList = DataBoundWidget.extend({\n init: function(element, options) {\n var that = this,\n contentClasses = options.columns && options.columns.length ? TABLE_CONTENT : LIST_CONTENT;\n\n that.bound(false);\n that._fetching = false;\n\n Widget.fn.init.call(that, element, options);\n\n if (!that.options.itemHeight) {\n that.options.itemHeight = getDefaultItemHeight(options.listSize);\n }\n\n options = that.options;\n\n that.element.attr(\"role\", \"listbox\");\n\n var contentSelector = \".\" + contentClasses.split(' ').join('.');\n var wrapper = that.element.closest(contentSelector);\n\n that.content = that.wrapper = wrapper.length ? wrapper : that.element.wrap(\"
\").parent();\n\n if (that.options.columns && that.options.columns.length) {\n var thead = that.element.closest(\".k-data-table\").find('.k-table-thead');\n var row = $('' +\n '' +\n '');\n\n thead.append(row);\n\n that.header = row.find(\".k-table-th\");\n that.element.addClass(TABLE_LIST + \" k-virtual-table\");\n } else {\n that.header = that.content.before(\"
\").prev();\n that.element.addClass(LIST_UL);\n }\n\n if (options.ariaLabel) {\n this.element.attr(\"aria-label\", options.ariaLabel);\n } else if (options.ariaLabelledBy) {\n this.element.attr(\"aria-labelledby\", options.ariaLabelledBy);\n }\n\n that.element.on(\"mouseenter\" + VIRTUAL_LIST_NS, \"li:not(.k-loading-item)\", function() { $(this).addClass(HOVER); })\n .on(\"mouseleave\" + VIRTUAL_LIST_NS, \"li\", function() { $(this).removeClass(HOVER); });\n\n that._values = toArray(that.options.value);\n that._selectedDataItems = [];\n that._selectedIndexes = [];\n that._rangesList = {};\n that._promisesList = [];\n that._optionID = kendo.guid();\n\n that._templates();\n\n that.setDataSource(options.dataSource);\n\n that.content.on(\"scroll\" + VIRTUAL_LIST_NS, kendo.throttle(function() {\n that._renderItems();\n that._triggerListBound();\n }, options.delay));\n\n that._selectable();\n },\n\n options: {\n name: \"VirtualList\",\n autoBind: true,\n delay: 100,\n height: null,\n listScreens: 4,\n threshold: 0.5,\n itemHeight: null,\n oppositeBuffer: 1,\n type: \"flat\",\n selectable: false,\n value: [],\n dataValueField: null,\n template: (data) => encode(data),\n placeholderTemplate: () => \"loading...\",\n groupTemplate: (data) => encode(data),\n fixedGroupTemplate: (data) => encode(data),\n mapValueTo: \"index\",\n valueMapper: null,\n ariaLabel: null,\n ariaLabelledBy: null\n },\n\n events: [\n CHANGE,\n CLICK,\n LISTBOUND,\n ITEMCHANGE,\n ACTIVATE,\n DEACTIVATE\n ],\n\n setOptions: function(options) {\n var itemClass = this.options.columns && this.options.columns.length ? TABLE_ITEM : LIST_ITEM;\n\n Widget.fn.setOptions.call(this, options);\n\n if (this._selectProxy && this.options.selectable === false) {\n this.element.off(CLICK, \".\" + itemClass, this._selectProxy);\n } else if (!this._selectProxy && this.options.selectable) {\n this._selectable();\n }\n\n this._templates();\n this.refresh();\n },\n\n items: function() {\n return $(this._items);\n },\n\n destroy: function() {\n this.wrapper.off(VIRTUAL_LIST_NS);\n this.dataSource.unbind(CHANGE, this._refreshHandler);\n Widget.fn.destroy.call(this);\n },\n\n setDataSource: function(source) {\n var that = this;\n var dataSource = source || {};\n var value;\n\n dataSource = Array.isArray(dataSource) ? { data: dataSource } : dataSource;\n dataSource = kendo.data.DataSource.create(dataSource);\n\n if (that.dataSource) {\n that.dataSource.unbind(CHANGE, that._refreshHandler);\n\n that._clean();\n that.bound(false);\n\n that._deferValueSet = true;\n value = that.value();\n\n that.value([]);\n that.mute(function() {\n that.value(value);\n });\n } else {\n that._refreshHandler = that.refresh.bind(that);\n }\n\n that.dataSource = dataSource.bind(CHANGE, that._refreshHandler);\n\n that.setDSFilter(dataSource.filter());\n\n if (dataSource.view().length !== 0) {\n that.refresh();\n } else if (that.options.autoBind) {\n dataSource.fetch();\n }\n },\n\n skip: function() {\n return this.dataSource.currentRangeStart();\n },\n\n _triggerListBound: function() {\n var that = this;\n var skip = that.skip();\n\n if (that.bound() && !that._selectingValue && that._skip !== skip) {\n that._skip = skip;\n that.trigger(LISTBOUND);\n }\n },\n\n _getValues: function(dataItems) {\n var getter = this._valueGetter;\n\n return $.map(dataItems, function(dataItem) {\n return getter(dataItem);\n });\n },\n\n _highlightSelectedItems: function() {\n for (var i = 0; i < this._selectedDataItems.length; i++) {\n var item = this._getElementByDataItem(this._selectedDataItems[i]);\n if (item.length) {\n item.addClass(SELECTED);\n }\n }\n },\n\n refresh: function(e) {\n var that = this;\n var action = e && e.action;\n var isItemChange = action === \"itemchange\";\n var filtered = this.isFiltered();\n var result;\n\n if (that._mute) { return; }\n\n that._deferValueSet = false;\n\n if (!that._fetching) {\n if (filtered) {\n that.focus(0);\n }\n\n that._createList();\n if (!action && that._values.length && !filtered &&\n !that.options.skipUpdateOnBind && !that._emptySearch) {\n that._selectingValue = true;\n\n that.bound(true);\n that.value(that._values, true).done(function() {\n that._selectingValue = false;\n that._triggerListBound();\n });\n } else {\n that.bound(true);\n that._highlightSelectedItems();\n that._triggerListBound();\n }\n } else {\n if (that._renderItems) {\n that._renderItems(true);\n }\n\n that._triggerListBound();\n }\n\n if (isItemChange || action === \"remove\") {\n result = mapChangedItems(that._selectedDataItems, e.items);\n if (result.changed.length) {\n if (isItemChange) {\n that.trigger(\"selectedItemChange\", {\n items: result.changed\n });\n } else {\n that.value(that._getValues(result.unchanged));\n }\n }\n }\n\n that._fetching = false;\n },\n\n removeAt: function(position) {\n var value = this._values.splice(position, 1)[0];\n\n return {\n position: position,\n dataItem: this._removeSelectedDataItem(value)\n };\n },\n\n _removeSelectedDataItem: function(value) {\n var that = this,\n valueGetter = that._valueGetter;\n\n for (var idx in that._selectedDataItems) {\n if (valueGetter(that._selectedDataItems[idx]) === value) {\n that._selectedIndexes.splice(idx, 1);\n return that._selectedDataItems.splice(idx, 1)[0];\n }\n }\n },\n\n setValue: function(value) {\n this._values = toArray(value);\n },\n\n value: function(value, _forcePrefetch) {\n var that = this;\n\n if (value === undefined$1) {\n return that._values.slice();\n }\n\n if (value === null) {\n value = [];\n }\n\n value = toArray(value);\n\n if (!that._valueDeferred || that._valueDeferred.state() === \"resolved\") {\n that._valueDeferred = $.Deferred();\n }\n\n var shouldClear = that.options.selectable === \"multiple\" && that.select().length && value.length;\n\n if (shouldClear || !value.length) {\n that.select(-1);\n }\n\n that._values = value;\n\n if ((that.bound() && !that._mute && !that._deferValueSet) || _forcePrefetch) {\n that._prefetchByValue(value);\n }\n\n return that._valueDeferred;\n },\n\n _checkValuesOrder: function(value) {\n if (this._removedAddedIndexes &&\n this._removedAddedIndexes.length === value.length) {\n var newValue = this._removedAddedIndexes.slice();\n this._removedAddedIndexes = null;\n return newValue;\n }\n\n return value;\n },\n\n _prefetchByValue: function(value) {\n var that = this,\n dataView = that._dataView,\n valueGetter = that._valueGetter,\n mapValueTo = that.options.mapValueTo,\n item, match = false,\n forSelection = [];\n\n //try to find the items in the loaded data\n for (var i = 0; i < value.length; i++) {\n for (var idx = 0; idx < dataView.length; idx++) {\n item = dataView[idx].item;\n if (item) {\n match = isPrimitive(item) ? value[i] === item : value[i] === valueGetter(item);\n\n if (match) {\n forSelection.push(dataView[idx].index);\n }\n }\n }\n }\n\n if (forSelection.length === value.length) {\n that._values = [];\n that.select(forSelection);\n return;\n }\n\n //prefetch the items\n if (typeof that.options.valueMapper === \"function\") {\n that.options.valueMapper({\n value: (this.options.selectable === \"multiple\") ? value : value[0],\n success: function(response) {\n if (mapValueTo === \"index\") {\n that.mapValueToIndex(response);\n } else if (mapValueTo === \"dataItem\") {\n that.mapValueToDataItem(response);\n }\n }\n });\n } else {\n if (!that.value()[0]) {\n that.select([-1]);\n } else {\n that._selectingValue = false;\n that._triggerListBound();\n }\n }\n },\n\n mapValueToIndex: function(indexes) {\n if (indexes === undefined$1 || indexes === -1 || indexes === null) {\n indexes = [];\n } else {\n indexes = toArray(indexes);\n }\n\n if (!indexes.length) {\n indexes = [-1];\n } else {\n var removed = this._deselect([]).removed;\n if (removed.length) {\n this._triggerChange(removed, []);\n }\n }\n\n this.select(indexes);\n },\n\n mapValueToDataItem: function(dataItems) {\n var removed, added;\n\n if (dataItems === undefined$1 || dataItems === null) {\n dataItems = [];\n } else {\n dataItems = toArray(dataItems);\n }\n\n if (!dataItems.length) {\n this.select([-1]);\n } else {\n removed = $.map(this._selectedDataItems, function(item, index) {\n return { index: index, dataItem: item };\n });\n\n added = $.map(dataItems, function(item, index) {\n return { index: index, dataItem: item };\n });\n\n this._selectedDataItems = dataItems;\n\n this._selectedIndexes = [];\n\n for (var i = 0; i < this._selectedDataItems.length; i++) {\n var item = this._getElementByDataItem(this._selectedDataItems[i]);\n this._selectedIndexes.push(this._getIndecies(item)[0]);\n item.addClass(SELECTED);\n }\n\n this._triggerChange(removed, added);\n\n if (this._valueDeferred) {\n this._valueDeferred.resolve();\n }\n }\n },\n\n deferredRange: function(index) {\n var dataSource = this.dataSource;\n var take = this.itemCount;\n var ranges = this._rangesList;\n var result = $.Deferred();\n var defs = [];\n\n var low = Math.floor(index / take) * take;\n var high = Math.ceil(index / take) * take;\n\n var pages = high === low ? [ high ] : [ low, high ];\n\n $.each(pages, function(_, skip) {\n var end = skip + take;\n var existingRange = ranges[skip];\n var deferred;\n\n if (!existingRange || (existingRange.end !== end)) {\n deferred = $.Deferred();\n ranges[skip] = { end: end, deferred: deferred };\n\n dataSource._multiplePrefetch(skip, take, function() {\n deferred.resolve();\n });\n } else {\n deferred = existingRange.deferred;\n }\n\n defs.push(deferred);\n });\n\n $.when.apply($, defs).done(function() {\n result.resolve();\n });\n\n return result;\n },\n\n prefetch: function(indexes) {\n var that = this,\n take = this.itemCount,\n isEmptyList = !that._promisesList.length;\n\n if (!isActivePromise(that._activeDeferred)) {\n that._activeDeferred = $.Deferred();\n that._promisesList = [];\n }\n\n $.each(indexes, function(_, index) {\n that._promisesList.push(that.deferredRange(that._getSkip(index, take)));\n });\n\n if (isEmptyList) {\n $.when.apply($, that._promisesList).done(function() {\n that._promisesList = [];\n that._activeDeferred.resolve();\n });\n }\n\n return that._activeDeferred;\n },\n\n _findDataItem: function(view, index) {\n var group;\n\n //find in grouped view\n if (this.options.type === \"group\") {\n for (var i = 0; i < view.length; i++) {\n group = view[i].items;\n if (group.length <= index) {\n index = index - group.length;\n } else {\n return group[index];\n }\n }\n }\n\n //find in flat view\n return view[index];\n },\n\n _getRange: function(skip, take) {\n return this.dataSource._findRange(skip, Math.min(skip + take, this.dataSource.total()));\n },\n\n dataItemByIndex: function(index) {\n var that = this;\n var take = that.itemCount;\n var skip = that._getSkip(index, take);\n var view = this._getRange(skip, take);\n\n //should not return item if data is not loaded\n if (!that._getRange(skip, take).length) {\n return null;\n }\n\n if (that.options.type === \"group\") {\n kendo.ui.progress($(that.wrapper), true);\n that.mute(function() {\n that.dataSource.range(skip, take, function() {\n kendo.ui.progress($(that.wrapper), false);\n });\n view = that.dataSource.view();\n });\n }\n\n return that._findDataItem(view, [index - skip]);\n },\n\n selectedDataItems: function() {\n return this._selectedDataItems.slice();\n },\n\n scrollWith: function(value) {\n this.content.scrollTop(this.content.scrollTop() + value);\n },\n\n scrollTo: function(y) {\n this.content.scrollTop(y); //works only if the element is visible\n },\n\n scrollToIndex: function(index) {\n this.scrollTo(index * this.options.itemHeight);\n },\n\n focus: function(candidate) {\n var element,\n index,\n data,\n current,\n itemHeight = this.options.itemHeight,\n id = this._optionID,\n triggerEvent = true;\n\n if (candidate === undefined$1) {\n current = this.element.find(\".\" + FOCUSED);\n return current.length ? current : null;\n }\n\n if (typeof candidate === \"function\") {\n data = this.dataSource.flatView();\n for (var idx = 0; idx < data.length; idx++) {\n if (candidate(data[idx])) {\n candidate = idx;\n break;\n }\n }\n }\n\n if (candidate instanceof Array) {\n candidate = lastFrom(candidate);\n }\n\n if (isNaN(candidate)) {\n element = $(candidate);\n index = parseInt($(element).attr(\"data-offset-index\"), 10);\n } else {\n index = candidate;\n element = this._getElementByIndex(index);\n }\n\n if (index === -1) {\n this.element.find(\".\" + FOCUSED).removeClass(FOCUSED);\n this._focusedIndex = undefined$1;\n return;\n }\n\n if (element.length) { /*focus rendered item*/\n if (element.hasClass(FOCUSED)) {\n triggerEvent = false;\n }\n if (this._focusedIndex !== undefined$1) {\n current = this._getElementByIndex(this._focusedIndex);\n current\n .removeClass(FOCUSED)\n .removeAttr(\"id\");\n\n if (triggerEvent) {\n this.trigger(DEACTIVATE);\n }\n }\n\n this._focusedIndex = index;\n\n element\n .addClass(FOCUSED)\n .attr(\"id\", id);\n\n var position = this._getElementLocation(index);\n\n if (position === \"top\") {\n this.scrollTo(index * itemHeight);\n } else if (position === \"bottom\") {\n this.scrollTo((index * itemHeight + itemHeight) - this._screenHeight);\n } else if (position === \"outScreen\") {\n this.scrollTo(index * itemHeight);\n }\n\n if (triggerEvent) {\n this.trigger(ACTIVATE);\n }\n } else { /*focus non rendered item*/\n this._focusedIndex = index;\n this.items().removeClass(FOCUSED);\n this.scrollToIndex(index);\n }\n },\n\n focusIndex: function() {\n return this._focusedIndex;\n },\n\n focusFirst: function() {\n this.scrollTo(0);\n this.focus(0);\n },\n\n focusLast: function() {\n var lastIndex = this.dataSource.total();\n this.scrollTo(this.heightContainer.offsetHeight);\n this.focus(lastIndex - 1);\n },\n\n focusPrev: function() {\n var index = this._focusedIndex;\n var current;\n\n if (!isNaN(index) && index > 0) {\n index -= 1;\n this.focus(index);\n\n current = this.focus();\n if (current && current.hasClass(\"k-loading-item\")) {\n index += 1;\n this.focus(index);\n }\n\n return index;\n } else {\n index = this.dataSource.total() - 1;\n this.focus(index);\n return index;\n }\n },\n\n focusNext: function() {\n var index = this._focusedIndex;\n var lastIndex = this.dataSource.total() - 1;\n var current;\n\n if (!isNaN(index) && index < lastIndex) {\n index += 1;\n this.focus(index);\n\n current = this.focus();\n if (current && current.hasClass(\"k-loading-item\")) {\n index -= 1;\n this.focus(index);\n }\n\n return index;\n } else {\n index = 0;\n this.focus(index);\n return index;\n }\n },\n\n _triggerChange: function(removed, added) {\n removed = removed || [];\n added = added || [];\n\n if (removed.length || added.length) {\n this.trigger(CHANGE, {\n removed: removed,\n added: added\n });\n }\n },\n\n select: function(candidate) {\n var that = this,\n indices,\n initialIndices,\n singleSelection = that.options.selectable !== \"multiple\",\n prefetchStarted = isActivePromise(that._activeDeferred),\n filtered = this.isFiltered(),\n isAlreadySelected,\n deferred,\n result,\n removed = [];\n\n if (candidate === undefined$1) {\n return that._selectedIndexes.slice();\n }\n\n if (!that._selectDeferred || that._selectDeferred.state() === \"resolved\") {\n that._selectDeferred = $.Deferred();\n }\n\n indices = that._getIndecies(candidate);\n isAlreadySelected = singleSelection && !filtered && lastFrom(indices) === lastFrom(this._selectedIndexes);\n removed = that._deselectCurrentValues(indices);\n\n if (removed.length || !indices.length || isAlreadySelected) {\n that._triggerChange(removed);\n\n if (that._valueDeferred) {\n that._valueDeferred.resolve().promise();\n }\n\n return that._selectDeferred.resolve().promise();\n }\n\n if (indices.length === 1 && indices[0] === -1) {\n indices = [];\n }\n\n initialIndices = indices;\n result = that._deselect(indices);\n removed = result.removed;\n indices = result.indices;\n\n if (singleSelection) {\n prefetchStarted = false;\n if (indices.length) {\n indices = [lastFrom(indices)];\n }\n }\n\n var done = function() {\n var added = that._select(indices);\n\n if (initialIndices.length === indices.length || singleSelection) {\n that.focus(indices);\n }\n\n that._triggerChange(removed, added);\n\n if (that._valueDeferred) {\n that._valueDeferred.resolve();\n }\n\n that._selectDeferred.resolve();\n };\n\n deferred = that.prefetch(indices);\n\n if (!prefetchStarted) {\n if (deferred) {\n deferred.done(done);\n } else {\n done();\n }\n }\n\n return that._selectDeferred.promise();\n },\n\n bound: function(bound) {\n if (bound === undefined$1) {\n return this._listCreated;\n }\n\n this._listCreated = bound;\n },\n\n mute: function(callback) {\n this._mute = true;\n callback();\n this._mute = false;\n },\n\n setDSFilter: function(filter) {\n this._lastDSFilter = $.extend({}, filter);\n },\n\n isFiltered: function() {\n if (!this._lastDSFilter) {\n this.setDSFilter(this.dataSource.filter());\n }\n\n return !kendo.data.Query.compareFilters(this.dataSource.filter(), this._lastDSFilter);\n },\n\n skipUpdate: $.noop,\n\n _getElementByIndex: function(index) {\n return this.items().filter(function(idx, element) {\n return index === parseInt($(element).attr(\"data-offset-index\"), 10);\n });\n },\n\n _getElementByDataItem: function(dataItem) {\n var dataView = this._dataView,\n valueGetter = this._valueGetter,\n element, match;\n\n for (var i = 0; i < dataView.length; i++) {\n match = dataView[i].item && isPrimitive(dataView[i].item) ? dataView[i].item === dataItem : dataView[i].item && dataItem && valueGetter(dataView[i].item) == valueGetter(dataItem);\n if (match) {\n element = dataView[i];\n break;\n }\n }\n\n return element ? this._getElementByIndex(element.index) : $();\n },\n\n _clean: function() {\n this.result = undefined$1;\n this._lastScrollTop = undefined$1;\n this._skip = undefined$1;\n $(this.heightContainer).remove();\n this.heightContainer = undefined$1;\n this.element.empty();\n },\n\n _height: function() {\n var hasData = !!this.dataSource.view().length,\n height = this.options.height,\n itemHeight = this.options.itemHeight,\n total = this.dataSource.total();\n\n if (!hasData) {\n height = 0;\n } else if (height / itemHeight > total) {\n height = total * itemHeight;\n }\n\n return height;\n },\n\n setScreenHeight: function() {\n var height = this._height();\n\n this.content.height(height);\n this._screenHeight = height;\n },\n\n screenHeight: function() {\n return this._screenHeight;\n },\n\n _getElementLocation: function(index) {\n var scrollTop = this.content.scrollTop(),\n screenHeight = this._screenHeight,\n itemHeight = this.options.itemHeight,\n yPosition = index * itemHeight,\n yDownPostion = yPosition + itemHeight,\n screenEnd = scrollTop + screenHeight,\n position;\n\n if (yPosition === (scrollTop - itemHeight) || (yDownPostion > scrollTop && yPosition < scrollTop)) {\n position = \"top\";\n } else if (yPosition === screenEnd || (yPosition < screenEnd && screenEnd < yDownPostion)) {\n position = \"bottom\";\n } else if ((yPosition >= scrollTop) && (yPosition <= scrollTop + (screenHeight - itemHeight))) {\n position = \"inScreen\";\n } else {\n position = \"outScreen\";\n }\n\n return position;\n },\n\n _templates: function() {\n var options = this.options;\n var templates = {\n template: options.template,\n placeholderTemplate: options.placeholderTemplate,\n groupTemplate: options.groupTemplate,\n fixedGroupTemplate: options.fixedGroupTemplate\n };\n\n if (options.columns) {\n options.columns.forEach((column, i) => {\n var templateText = column.field ? column.field.toString() : \"text\";\n var templateFunc = data => encode(kendo.getter(templateText)(data));\n\n templates[\"column\" + i] = column.template || templateFunc;\n });\n }\n\n for (var key in templates) {\n if (typeof templates[key] !== \"function\") {\n templates[key] = kendo.template(templates[key] || \"\");\n }\n }\n\n this.templates = templates;\n },\n\n _generateItems: function(element, count) {\n var items = [],\n item, text,\n itemHeight = this.options.itemHeight + \"px\",\n itemClass = this.options.columns && this.options.columns.length ? TABLE_ITEM : LIST_ITEM;\n\n while (count-- > 0) {\n text = document.createElement(\"span\");\n text.className = \"k-list-item-text\";\n\n item = document.createElement(\"li\");\n item.tabIndex = -1;\n item.className = itemClass;\n item.setAttribute(\"role\", \"option\");\n item.style.height = itemHeight;\n item.style.minHeight = itemHeight;\n item.appendChild(text);\n\n element.appendChild(item);\n\n items.push(item);\n }\n\n return items;\n },\n\n _saveInitialRanges: function() {\n var ranges = this.dataSource._ranges;\n var deferred = $.Deferred();\n deferred.resolve();\n\n this._rangesList = {};\n for (var i = 0; i < ranges.length; i++) {\n this._rangesList[ranges[i].start] = { end: ranges[i].end, deferred: deferred };\n }\n },\n\n _createList: function() {\n var that = this,\n content = that.content.get(0),\n options = that.options,\n dataSource = that.dataSource;\n\n if (that.bound()) {\n that._clean();\n }\n\n that._saveInitialRanges();\n that._buildValueGetter();\n that.setScreenHeight();\n that.itemCount = getItemCount(that._screenHeight, options.listScreens, options.itemHeight);\n\n if (that.itemCount > dataSource.total()) {\n that.itemCount = dataSource.total();\n }\n\n that._items = that._generateItems(that.element[0], that.itemCount);\n\n that._setHeight(options.itemHeight * dataSource.total());\n that.options.type = (dataSource.group() || []).length ? \"group\" : \"flat\";\n\n if (that.options.type === \"flat\") {\n if (that.header.closest(GROUP_ROW_SEL).length) {\n that.header.closest(GROUP_ROW_SEL).hide();\n } else {\n that.header.hide();\n }\n } else {\n if (that.header.closest(GROUP_ROW_SEL).length) {\n that.header.closest(GROUP_ROW_SEL).show();\n } else {\n that.header.show();\n }\n }\n\n that.getter = that._getter(function() {\n that._renderItems(true);\n });\n\n that._onScroll = function(scrollTop, force) {\n var getList = that._listItems(that.getter);\n return that._fixedHeader(scrollTop, getList(scrollTop, force));\n };\n\n that._renderItems = that._whenChanged(\n scrollCallback(content, that._onScroll),\n syncList(that._reorderList(that._items, render.bind(that)))\n );\n\n that._renderItems();\n that._calculateGroupPadding(that._screenHeight);\n that._calculateColumnsHeaderPadding();\n },\n\n _setHeight: function(height) {\n var currentHeight,\n heightContainer = this.heightContainer;\n\n if (!heightContainer) {\n heightContainer = this.heightContainer = appendChild(this.content[0], HEIGHTCONTAINER);\n } else {\n currentHeight = heightContainer.offsetHeight;\n }\n\n if (height !== currentHeight) {\n heightContainer.innerHTML = \"\";\n\n while (height > 0) {\n var padHeight = Math.min(height, 250000); //IE workaround, should not create elements with height larger than 250000px\n appendChild(heightContainer).style.height = padHeight + \"px\";\n height -= padHeight;\n }\n }\n },\n\n _getter: function() {\n var lastRequestedRange = null,\n dataSource = this.dataSource,\n lastRangeStart = dataSource.skip(),\n type = this.options.type,\n pageSize = this.itemCount,\n flatGroups = {};\n\n if (dataSource.pageSize() < pageSize) {\n this.mute(function() {\n dataSource.pageSize(pageSize);\n });\n }\n\n return function(index, rangeStart) {\n var that = this;\n if (!dataSource.inRange(rangeStart, pageSize)) {\n if (lastRequestedRange !== rangeStart) {\n lastRequestedRange = rangeStart;\n lastRangeStart = rangeStart;\n\n if (that._getterDeferred) {\n that._getterDeferred.reject();\n }\n\n that._getterDeferred = that.deferredRange(rangeStart);\n that._getterDeferred.then(function() {\n var firstItemIndex = that._indexConstraint(that.content[0].scrollTop);\n\n that._getterDeferred = null;\n\n if (rangeStart <= firstItemIndex && firstItemIndex <= (rangeStart + pageSize)) {\n that._fetching = true;\n dataSource.range(rangeStart, pageSize);\n }\n });\n }\n\n return null;\n } else {\n if (lastRangeStart !== rangeStart) {\n this.mute(function() {\n dataSource.range(rangeStart, pageSize);\n lastRangeStart = rangeStart;\n });\n }\n\n var result;\n if (type === \"group\") { //grouped list\n if (!flatGroups[rangeStart]) {\n var flatGroup = flatGroups[rangeStart] = [];\n var groups = dataSource.view();\n for (var i = 0, len = groups.length; i < len; i++) {\n var group = groups[i];\n for (var j = 0, groupLength = group.items.length; j < groupLength; j++) {\n flatGroup.push({ item: group.items[j], group: group.value });\n }\n }\n }\n\n result = flatGroups[rangeStart][index - rangeStart];\n } else { //flat list\n result = dataSource.view()[index - rangeStart];\n }\n\n return result;\n }\n };\n },\n\n _fixedHeader: function(scrollTop, list) {\n var group = this.currentVisibleGroup,\n itemHeight = this.options.itemHeight,\n firstVisibleDataItemIndex = Math.floor((scrollTop - list.top) / itemHeight),\n firstVisibleDataItem = list.items[firstVisibleDataItemIndex];\n\n if (firstVisibleDataItem && firstVisibleDataItem.item) {\n var firstVisibleGroup = firstVisibleDataItem.group;\n\n if (firstVisibleGroup !== group) {\n var fixedGroupText = firstVisibleGroup || \"\";\n this.header.html(this.templates.fixedGroupTemplate(fixedGroupText));\n this.currentVisibleGroup = firstVisibleGroup;\n }\n }\n\n return list;\n },\n\n _itemMapper: function(item, index, value) {\n var listType = this.options.type,\n itemHeight = this.options.itemHeight,\n currentIndex = this._focusedIndex,\n selected = false,\n current = false,\n newGroup = false,\n group = null,\n match = false,\n valueGetter = this._valueGetter;\n\n if (listType === \"group\") {\n if (item) {\n newGroup = index === 0 || (this._currentGroup !== false && this._currentGroup !== item.group);\n this._currentGroup = item.group;\n }\n\n group = item ? item.group : null;\n item = item ? item.item : null;\n }\n\n if (this.options.mapValueTo === \"dataItem\" && this._selectedDataItems.length && item) {\n for (var i = 0; i < this._selectedDataItems.length; i++) {\n match = valueGetter(this._selectedDataItems[i]) === valueGetter(item);\n if (match) {\n selected = true;\n break;\n }\n }\n } else if (!this.isFiltered() && value.length && item) {\n for (var j = 0; j < value.length; j++) {\n match = isPrimitive(item) ? value[j] === item : value[j] === valueGetter(item);\n if (match) {\n value.splice(j , 1);\n selected = true;\n break;\n }\n }\n }\n\n if (currentIndex === index) {\n current = true;\n }\n\n return {\n item: item ? item : null,\n group: group,\n newGroup: newGroup,\n selected: selected,\n current: current,\n index: index,\n top: index * itemHeight\n };\n },\n\n _range: function(index) {\n var itemCount = this.itemCount,\n value = this._values.slice(),\n items = [],\n item;\n\n this._view = {};\n this._currentGroup = false;\n\n for (var i = index, length = index + itemCount; i < length; i++) {\n item = this._itemMapper(this.getter(i, index), i, value);\n if (items[items.length - 1]) {\n items[items.length - 1].isLastGroupedItem = item.newGroup;\n }\n items.push(item);\n this._view[item.index] = item;\n }\n\n this._dataView = items;\n return items;\n },\n\n _getDataItemsCollection: function(scrollTop, lastScrollTop) {\n var items = this._range(this._listIndex(scrollTop, lastScrollTop));\n return {\n index: items.length ? items[0].index : 0,\n top: items.length ? items[0].top : 0,\n items: items\n };\n },\n\n _listItems: function() {\n var screenHeight = this._screenHeight,\n options = this.options;\n\n var theValidator = listValidator(options, screenHeight);\n\n return (function(value, force) {\n var result = this.result,\n lastScrollTop = this._lastScrollTop;\n\n if (force || !result || !theValidator(result, value, lastScrollTop)) {\n result = this._getDataItemsCollection(value, lastScrollTop);\n }\n\n this._lastScrollTop = value;\n this.result = result;\n\n return result;\n }).bind(this);\n },\n\n _whenChanged: function(getter, callback) {\n var current;\n\n return function(force) {\n var theNew = getter(force);\n\n if (theNew !== current) {\n current = theNew;\n callback(theNew, force);\n }\n };\n },\n\n _reorderList: function(list, reorder) {\n var that = this;\n var length = list.length;\n var currentOffset = -Infinity;\n reorder = map2(reorder, this.templates).bind(this);\n\n return function(list2, offset, force) {\n var diff = offset - currentOffset;\n var range, range2;\n\n if (force || Math.abs(diff) >= length) { // full reorder\n range = list;\n range2 = list2;\n } else { // partial reorder\n range = reshift(list, diff);\n range2 = diff > 0 ? list2.slice(-diff) : list2.slice(0, -diff);\n }\n\n reorder(range, range2, that.bound());\n\n currentOffset = offset;\n };\n },\n\n _bufferSizes: function() {\n var options = this.options;\n\n return bufferSizes(this._screenHeight, options.listScreens, options.oppositeBuffer);\n },\n\n _indexConstraint: function(position) {\n var itemCount = this.itemCount,\n itemHeight = this.options.itemHeight,\n total = this.dataSource.total();\n\n return Math.min(Math.max(total - itemCount, 0), Math.max(0, Math.floor(position / itemHeight )));\n },\n\n _listIndex: function(scrollTop, lastScrollTop) {\n var buffers = this._bufferSizes(),\n position;\n\n position = scrollTop - ((scrollTop > lastScrollTop) ? buffers.down : buffers.up);\n\n return this._indexConstraint(position);\n },\n\n _selectable: function() {\n var itemClass = this.options.columns && this.options.columns.length ? TABLE_ITEM : LIST_ITEM;\n\n if (this.options.selectable) {\n this._selectProxy = this._clickHandler.bind(this);\n this.element.on(CLICK + VIRTUAL_LIST_NS, \".\" + itemClass, this._selectProxy);\n }\n },\n\n getElementIndex: function(element) {\n if (!(element instanceof jQuery)) {\n return undefined$1;\n }\n\n return parseInt(element.attr(\"data-offset-index\"), 10);\n },\n\n _getIndecies: function(candidate) {\n var result = [], data;\n\n if (typeof candidate === \"function\") {\n data = this.dataSource.flatView();\n for (var idx = 0; idx < data.length; idx++) {\n if (candidate(data[idx])) {\n result.push(idx);\n break;\n }\n }\n }\n\n if (typeof candidate === \"number\") {\n result.push(candidate);\n }\n\n var elementIndex = this.getElementIndex(candidate);\n if (!isNaN(elementIndex)) {\n result.push(elementIndex);\n }\n\n if (candidate instanceof Array) {\n result = candidate;\n }\n\n return result;\n },\n\n _deselect: function(indices) {\n var removed = [],\n selectedIndex,\n dataItem,\n selectedIndexes = this._selectedIndexes,\n selectedDataItems = this._selectedDataItems,\n position = 0,\n selectable = this.options.selectable,\n removedindexesCounter = 0,\n valueGetter = this._valueGetter,\n item, match,\n result = null;\n\n indices = indices.slice();\n\n if (selectable === true || !indices.length) { //deselect everything\n for (var idx = 0; idx < selectedIndexes.length; idx++) {\n if (selectedIndexes[idx] !== undefined$1) {\n this._getElementByIndex(selectedIndexes[idx]).removeClass(SELECTED);\n } else if (selectedDataItems[idx]) {\n this._getElementByDataItem(selectedDataItems[idx]).removeClass(SELECTED);\n }\n\n removed.push({\n index: selectedIndexes[idx],\n position: idx,\n dataItem: selectedDataItems[idx]\n });\n }\n\n this._values = [];\n this._selectedDataItems = [];\n this._selectedIndexes = [];\n } else if (selectable === \"multiple\") {\n for (var i = 0; i < indices.length; i++) {\n result = null;\n position = $.inArray(indices[i], selectedIndexes);\n dataItem = this.dataItemByIndex(indices[i]);\n\n if (position === -1 && dataItem) {\n for (var j = 0; j < selectedDataItems.length; j++) {\n match = isPrimitive(dataItem) ? selectedDataItems[j] === dataItem : valueGetter(selectedDataItems[j]) === valueGetter(dataItem);\n if (match) {\n item = this._getElementByIndex(indices[i]);\n result = this._deselectSingleItem(item, j, indices[i], removedindexesCounter);\n }\n }\n } else {\n selectedIndex = selectedIndexes[position];\n\n if (selectedIndex !== undefined$1) {\n item = this._getElementByIndex(selectedIndex);\n result = this._deselectSingleItem(item, position, selectedIndex, removedindexesCounter);\n }\n }\n\n if (result) {\n indices.splice(i, 1);\n removed.push(result);\n\n removedindexesCounter++;\n i--;\n }\n }\n }\n\n return {\n indices: indices,\n removed: removed\n };\n },\n\n _deselectSingleItem: function(item, position, selectedIndex, removedindexesCounter) {\n var dataItem;\n\n if (!item.hasClass(SELECTED)) {\n return;\n }\n\n item.removeClass(SELECTED);\n this._values.splice(position, 1);\n this._selectedIndexes.splice(position, 1);\n dataItem = this._selectedDataItems.splice(position, 1)[0];\n\n return {\n index: selectedIndex,\n position: position + removedindexesCounter,\n dataItem: dataItem\n };\n },\n\n _deselectCurrentValues: function(indices) {\n var children = this.element[0].children;\n var value, index, position;\n var values = this._values;\n var removed = [];\n var idx = 0;\n var j;\n\n if (this.options.selectable !== \"multiple\" || !this.isFiltered()) {\n return [];\n }\n\n if (indices[0] === -1) {\n $(children).removeClass(SELECTED);\n removed = $.map(this._selectedDataItems.slice(0), function(dataItem, idx) {\n return {\n dataItem: dataItem,\n position: idx\n };\n });\n this._selectedIndexes = [];\n this._selectedDataItems = [];\n this._values = [];\n return removed;\n }\n\n for (; idx < indices.length; idx++) {\n position = -1;\n index = indices[idx];\n if (this.dataItemByIndex(index)) {\n value = this._valueGetter(this.dataItemByIndex(index));\n }\n\n for (j = 0; j < values.length; j++) {\n if (value == values[j]) {\n position = j;\n break;\n }\n }\n\n if (position > -1) {\n removed.push(this.removeAt(position));\n $(children[index]).removeClass(SELECTED);\n }\n }\n\n return removed;\n },\n\n _getSkip: function(index, take) {\n var page = index < take ? 1 : Math.floor(index / take) + 1;\n\n return (page - 1) * take;\n },\n\n _select: function(indexes) {\n var that = this,\n singleSelection = this.options.selectable !== \"multiple\",\n dataSource = this.dataSource,\n dataItem, oldSkip,\n take = this.itemCount,\n valueGetter = this._valueGetter,\n added = [];\n\n if (singleSelection) {\n that._selectedIndexes = [];\n that._selectedDataItems = [];\n that._values = [];\n }\n\n oldSkip = dataSource.skip();\n\n $.each(indexes, function(_, index) {\n var skip = that._getSkip(index, take);\n\n that.mute(function() {\n dataSource.range(skip, take); //switch the range to get the dataItem\n\n dataItem = that._findDataItem(dataSource.view(), [index - skip]);\n that._selectedIndexes.push(index);\n that._selectedDataItems.push(dataItem);\n that._values.push(isPrimitive(dataItem) ? dataItem : valueGetter(dataItem));\n\n added.push({\n index: index,\n dataItem: dataItem\n });\n\n that._getElementByIndex(index).addClass(SELECTED);\n\n dataSource.range(oldSkip, take); //switch back the range\n });\n });\n\n that._values = that._checkValuesOrder(that._values);\n\n return added;\n },\n\n _clickHandler: function(e) {\n var item = $(e.currentTarget);\n\n if (!e.isDefaultPrevented() && item.attr(\"data-uid\")) {\n this.trigger(CLICK, { item: item });\n }\n },\n\n _buildValueGetter: function() {\n this._valueGetter = kendo.getter(this.options.dataValueField);\n },\n\n _calculateGroupPadding: function(height) {\n var firstItem = this.items().first(),\n groupHeader = this.header,\n padding = 0;\n\n if (groupHeader[0] && groupHeader[0].style.display !== \"none\") {\n if (height !== \"auto\") {\n padding = kendo.support.scrollbar();\n }\n\n padding += parseFloat(firstItem.css(\"border-right-width\"), 10) + parseFloat(firstItem.children(\".k-group\").css(\"right\"), 10);\n\n groupHeader.css(\"padding-right\", padding);\n }\n },\n\n _calculateColumnsHeaderPadding: function() {\n if (this.options.columns && this.options.columns.length) {\n var isRtl = kendo.support.isRtl(this.wrapper);\n var scrollbar = kendo.support.scrollbar();\n var columnsHeader = this.content.parent().parent().find(\".k-table-header\");\n var total = this.dataSource.total();\n\n columnsHeader.css((isRtl ? \"padding-left\" : \"padding-right\"), total ? scrollbar : 0);\n }\n }\n\n });\n\n kendo.ui.VirtualList = VirtualList;\n kendo.ui.plugin(VirtualList);\n\n})(window.kendo.jQuery);\nvar kendo$1 = kendo;\n\nexport { kendo$1 as default };\n"]}