@syncfusion/ej2-dropdowns
Version:
Essential JS 2 DropDown Components
10 lines • 589 kB
JavaScript
/*!
* filename: ej2-dropdowns.min.js
* version : 29.1.33
* Copyright Syncfusion Inc. 2001 - 2024. All rights reserved.
* Use of this code is subject to the terms of our license.
* A copy of the current license can be obtained at any time by e-mailing
* licensing@syncfusion.com. Any infringement will be prosecuted under
* applicable laws.
*/
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("SyncfusionBase"),require("SyncfusionData"),require("SyncfusionLists"),require("SyncfusionNotifications"),require("SyncfusionPopups"),require("SyncfusionInputs"),require("SyncfusionButtons"),require("SyncfusionNavigations")):"function"==typeof define&&define.amd?define(["SyncfusionBase","SyncfusionData","SyncfusionLists","SyncfusionNotifications","SyncfusionPopups","SyncfusionInputs","SyncfusionButtons","SyncfusionNavigations"],t):"object"==typeof exports?exports.SyncfusionDropdowns=t(require("SyncfusionBase"),require("SyncfusionData"),require("SyncfusionLists"),require("SyncfusionNotifications"),require("SyncfusionPopups"),require("SyncfusionInputs"),require("SyncfusionButtons"),require("SyncfusionNavigations")):e.SyncfusionDropdowns=t(e.SyncfusionBase,e.SyncfusionData,e.SyncfusionLists,e.SyncfusionNotifications,e.SyncfusionPopups,e.SyncfusionInputs,e.SyncfusionButtons,e.SyncfusionNavigations)}(self,((e,t,i,s,l,n,a,o)=>(()=>{"use strict";var r={766:t=>{t.exports=e},741:e=>{e.exports=a},74:e=>{e.exports=t},323:e=>{e.exports=n},90:e=>{e.exports=i},215:e=>{e.exports=o},344:e=>{e.exports=s},197:e=>{e.exports=l}},h={};function u(e){var t=h[e];if(void 0!==t)return t.exports;var i=h[e]={exports:{}};return r[e](i,i.exports,u),i.exports}u.d=(e,t)=>{for(var i in t)u.o(t,i)&&!u.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var p={};return(()=>{u.r(p),u.d(p,{AutoComplete:()=>Ne,CheckBoxSelection:()=>yt,ComboBox:()=>Ae,DropDownBase:()=>D,DropDownList:()=>P,DropDownTree:()=>Ee,FieldSettings:()=>O,Fields:()=>be,ListBox:()=>xt,Mention:()=>At,MultiSelect:()=>ht,Search:()=>o,SelectionSettings:()=>St,ToolbarSettings:()=>Et,TreeSettings:()=>Se,VirtualScroll:()=>S,createFloatLabel:()=>Pe,dropDownBaseClasses:()=>A,dropDownListClasses:()=>T,encodePlaceholder:()=>Me,escapeCharRegExp:()=>r,floatLabelBlur:()=>qe,floatLabelFocus:()=>We,highlightSearch:()=>d,incrementalSearch:()=>a,removeFloating:()=>He,resetIncrementalSearchValues:()=>h,revertHighlightSearch:()=>m,setPlaceHolder:()=>Fe,updateFloatLabelState:()=>Ue});var e="",t="",i="",s=[],l="e-active",n="";function a(a,o,r,h,u,p,d,c,m){var f;if(p&&""!==e?e===t&&(i=String.fromCharCode(a)):""!==i?(e=i+String.fromCharCode(a),i=""):e+=String.fromCharCode(a),c?(setTimeout((function(){i=""}),700),setTimeout((function(){e=""}),3e3)):setTimeout((function(){e=""}),1e3),e=h?e.toLowerCase():e,n!==u||t!==e||m){var v=o,g=e.length,y=void 0;S=r=r?r+1:0;s=[];do{S===v.length&&(S=-1),y=v[f=-1===S?0:S],(h?y.innerText.toLowerCase():y.innerText).substr(0,g)===e&&s.push(v[f]),S++}while(S!==r);if(t=e,n=u,c){for(var C=!1,b=0;b<s.length;b++)if(d&&s[b].textContent.toLowerCase()===d.toLowerCase()){f=b,C=!0;break}return d&&C&&(f+=1),s[f]?s[f]:s[0]}return s[0]}for(var S=0;S<s.length;S++){if(s[S].classList.contains(l)){f=S;break}if(d&&s[S].textContent.toLowerCase()===d.toLowerCase()){f=S;break}}return f+=1,c?s[f]&&s.length-1!==f?s[f]:s[s.length]:s[f]?s[f]:s[0]}function o(e,t,i,s,l,n,a,o){var h=t;s=null==s||s;var u={item:null,index:null};if(e&&e.length){var p=e.length,d=s?e.toLocaleLowerCase():e;d=r(d);for(var c=function(e,r){var h,c=r[e];if(t&&l){var m=c,f=n.text.split(".");l.filter((function(e){Array.prototype.slice.call(f).forEach((function(t){("object"===a&&!e.isHeader&&-1!==m.textContent.toString().indexOf(e[t])&&m.getAttribute("data-value")===e[n.value].toString()||"string"===a&&-1!==m.textContent.toString().indexOf(e))&&(h="object"===a?e[t]:e)}))}))}var v=l&&h?(s?h.toString().toLocaleLowerCase():h).replace(/^\s+|\s+$/g,""):(s?c.textContent.toLocaleLowerCase():c.textContent).replace(/^\s+|\s+$/g,"");if(o&&v&&d&&(v=v.normalize("NFD").replace(/[\u0300-\u036f]/g,""),d=d.normalize("NFD").replace(/[\u0300-\u036f]/g,"")),"Equal"===i&&v===d||"StartsWith"===i&&v.substr(0,p)===d||"EndsWith"===i&&v.substr(v.length-d.length)===d||"Contains"===i&&new RegExp(d,"g").test(v))return u.item=c,u.index=e,{value:{item:c,index:e}}},m=0,f=h;m<f.length;m++){var v=c(m,f);if("object"==typeof v)return v.value}return u}return u}function r(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function h(i){n===i&&(n="",t="",e="",s=[])}function d(e,t,i,s){if(/<[^>]*>/g.test(e.innerText)&&(e.innerText=e.innerText.replace(/[\u00A0-\u9999<>&]/g,(function(e){return"&#"+e.charCodeAt(0)+";"}))),""!==t){var l=i?"gim":"gm";t=/^[a-zA-Z0-9- ]*$/.test(t)?t:t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),c(e,new RegExp("StartsWith"===s?"^("+t+")":"EndsWith"===s?"("+t+")$":"("+t+")",l))}}function c(e,t){for(var i=0;e.childNodes&&i<e.childNodes.length;i++){if(3===e.childNodes[i].nodeType&&""!==e.childNodes[i].textContent.trim()){var s=e.childNodes[i].nodeValue.trim().replace(t,'<span class="e-highlight">$1</span>');e.childNodes[i].nodeValue="",e.innerHTML=e.innerHTML.trim()+s;break}c(e.childNodes[i],t)}}function m(e){for(var t=e.querySelectorAll(".e-highlight"),i=t.length-1;i>=0;i--){var s=t[i].parentNode,l=document.createTextNode(t[i].textContent);s.replaceChild(l,t[i])}}var f,v=u(766),g=u(74),y=function(){return y=Object.assign||function(e){for(var t,i=1,s=arguments.length;i<s;i++)for(var l in t=arguments[i])Object.prototype.hasOwnProperty.call(t,l)&&(e[l]=t[l]);return e},y.apply(this,arguments)},C=function(e,t,i,s){return new(i||(i=Promise))((function(l,n){function a(e){try{r(s.next(e))}catch(e){n(e)}}function o(e){try{r(s.throw(e))}catch(e){n(e)}}function r(e){e.done?l(e.value):new i((function(t){t(e.value)})).then(a,o)}r((s=s.apply(e,t||[])).next())}))},b=function(e,t){var i,s,l,n,a={label:0,sent:function(){if(1&l[0])throw l[1];return l[1]},trys:[],ops:[]};return n={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function o(n){return function(o){return function(n){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,s&&(l=2&n[0]?s.return:n[0]?s.throw||((l=s.return)&&l.call(s),0):s.next)&&!(l=l.call(s,n[1])).done)return l;switch(s=0,l&&(n=[2&n[0],l.value]),n[0]){case 0:case 1:l=n;break;case 4:return a.label++,{value:n[1],done:!1};case 5:a.label++,s=n[1],n=[0];continue;case 7:n=a.ops.pop(),a.trys.pop();continue;default:if(!(l=a.trys,(l=l.length>0&&l[l.length-1])||6!==n[0]&&2!==n[0])){a=0;continue}if(3===n[0]&&(!l||n[1]>l[0]&&n[1]<l[3])){a.label=n[1];break}if(6===n[0]&&a.label<l[1]){a.label=l[1],l=n;break}if(l&&a.label<l[2]){a.label=l[2],a.ops.push(n);break}l[2]&&a.ops.pop(),a.trys.pop();continue}n=t.call(e,a)}catch(e){n=[6,e],s=0}finally{i=l=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,o])}}},S=function(){function e(e){var t=this;this.sentinelInfo={up:{check:function(e,i){var s=e.top-t.containerElementRect.top;return i.entered=s>=0,s+t.parent.listItemHeight*t.parent.virtualItemCount/2>=0},axis:"Y"},down:{check:function(e,i){var s=e.bottom;return i.entered=e.bottom<=t.containerElementRect.bottom,s-t.parent.listItemHeight*t.parent.virtualItemCount/2<=t.parent.listItemHeight*t.parent.virtualItemCount/2},axis:"Y"}},this.parent=e,this.removeEventListener(),this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on("observe",this.observe,this),this.parent.on("setGeneratedData",this.setGeneratedData,this),this.parent.on("dataProcessAsync",this.dataProcessAsync,this),this.parent.on("setCurrentViewDataAsync",this.setCurrentViewDataAsync,this),this.parent.on("bindScrollEvent",this.bindScrollEvent,this))},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off("observe",this.observe),this.parent.off("setGeneratedData",this.setGeneratedData),this.parent.off("dataProcessAsync",this.dataProcessAsync),this.parent.off("setCurrentViewDataAsync",this.setCurrentViewDataAsync),this.parent.off("bindScrollEvent",this.bindScrollEvent))},e.prototype.bindScrollEvent=function(e){var t=this;this.component=e.component,this.observe((function(e){return t.scrollListener(e)}))},e.prototype.observe=function(e){this.containerElementRect=this.parent.popupContentElement.getBoundingClientRect(),v.EventHandler.add(this.parent.popupContentElement,"wheel mousedown",this.popupScrollHandler,this),this.touchModule=new v.Touch(this.parent.popupContentElement,{scroll:this.popupScrollHandler.bind(this)}),v.EventHandler.add(this.parent.popupContentElement,"scroll",this.virtualScrollHandler(e),this)},e.prototype.getModuleName=function(){return"VirtualScroll"},e.prototype.popupScrollHandler=function(){this.parent.isMouseScrollAction=!0,this.parent.isPreventScrollAction=!1},e.prototype.getPageQuery=function(e,t,i){return 0===i||this.parent.allowFiltering||"autocomplete"===this.component||(e=e.skip(t)),e},e.prototype.setGeneratedData=function(e,t){for(var i=0,s=this.parent.listData.length+this.parent.virtualItemStartIndex,l=this.parent.virtualItemStartIndex;l<s;l++){if(!this.parent.generatedDataObject[l]&&null!==t&&this.parent.listData.slice(i,i+1).length>0){var n=this.parent.listData.slice(i,i+1);n.length>0&&(this.parent.generatedDataObject[l]=n)}i++}},e.prototype.generateAndExecuteQueryAsync=function(e,t,i,s){void 0===t&&(t=0),void 0===i&&(i=0),void 0===s&&(s=!1);var l=this.parent.dataSource;if(!s)if((0,v.isNullOrUndefined)(this.parent.query))e=this.getPageQuery(e,t,i);else{var n=this.removeSkipAndTakeEvents(this.parent.query.clone());e=this.getPageQuery(n,t,i)}var a=this.parent.isCustomFilter;if("combobox"===this.component){var o=0;this.parent.dataSource instanceof g.DataManager?o=this.parent.dataSource.dataSource.json.length:this.parent.dataSource&&this.parent.dataSource.length>0&&(o=this.parent.dataSource.length),o>0&&(this.parent.isCustomFilter=o===this.parent.totalItemCount&&this.parent.queryString!==this.parent.typedString||this.parent.isCustomFilter)}this.parent.resetList(l,this.parent.fields,e),this.parent.isCustomFilter=a},e.prototype.removeSkipAndTakeEvents=function(e){return e.queries=e.queries.filter((function(e){return"onSkip"!==e.fn&&"onTake"!==e.fn})),e},e.prototype.setCurrentViewDataAsync=function(e){var t=[],i=!1,s=!0;(0,v.isNullOrUndefined)(this.component)&&(this.component=e.component);var l=this.parent.viewPortInfo.endIndex;if("multiselect"===this.component&&"CheckBox"===this.parent.mode&&this.parent.value&&Array.isArray(this.parent.value)&&this.parent.value.length>0&&this.parent.enableSelectionOrder&&""===this.parent.targetElement().trim()){if(this.parent.viewPortInfo.startIndex<this.parent.value.length){if(l=this.parent.viewPortInfo.endIndex-this.parent.value.length,0===this.parent.viewPortInfo.startIndex){if(this.parent.updateVirtualReOrderList(!0),this.parent.value.length<this.parent.itemCount&&this.parent.value.length!==this.parent.totalItemCount)(h=this.parent.list.querySelector(".e-list-parent:not(.e-reorder)"))&&this.parent.list.querySelector(".e-virtual-ddl-content").removeChild(h),a=(a=this.parent.getForQuery(this.parent.value).clone()).skip(0).take(this.parent.itemCount-(this.parent.value.length-this.parent.viewPortInfo.startIndex)),this.parent.appendUncheckList=!0,this.parent.setCurrentView=!1,this.parent.resetList(this.parent.dataSource,this.parent.fields,a),s=!1,this.parent.appendUncheckList=this.parent.dataSource instanceof g.DataManager&&this.parent.appendUncheckList,s=!1;else(h=this.parent.list.querySelector(".e-list-parent:not(.e-reorder)"))&&this.parent.list.querySelector(".e-virtual-ddl-content").removeChild(h);s=!1}else if(0!==this.parent.viewPortInfo.startIndex){this.parent.updateVirtualReOrderList(!0),(h=this.parent.list.querySelector(".e-list-parent:not(.e-reorder)"))&&this.parent.list.querySelector(".e-virtual-ddl-content").removeChild(h),s=!1}if(0!==this.parent.viewPortInfo.startIndex&&this.parent.viewPortInfo.startIndex-this.parent.value.length!==this.parent.itemCount&&this.parent.viewPortInfo.startIndex+this.parent.itemCount>this.parent.value.length)a=(a=this.parent.getForQuery(this.parent.value).clone()).skip(0).take(this.parent.itemCount-(this.parent.value.length-this.parent.viewPortInfo.startIndex)),this.parent.appendUncheckList=!0,this.parent.setCurrentView=!1,this.parent.resetList(this.parent.dataSource,this.parent.fields,a),s=!1,this.parent.appendUncheckList=this.parent.dataSource instanceof g.DataManager&&this.parent.appendUncheckList}else{var n=this.parent.list.querySelectorAll(".e-reorder")[0];this.parent.list.querySelector(".e-virtual-ddl-content")&&n&&this.parent.list.querySelector(".e-virtual-ddl-content").removeChild(n);var a=this.parent.getForQuery(this.parent.value).clone(),o=this.parent.viewPortInfo.startIndex-this.parent.value.length>=0?this.parent.viewPortInfo.startIndex-this.parent.value.length:0;a=a.skip(o),this.parent.setCurrentView=!1,this.parent.resetList(this.parent.dataSource,this.parent.fields,a),s=!1}this.parent.totalItemsCount()}if(s)for(var r=this.parent.viewPortInfo.startIndex;r<l;r++){var h,u=r;if("multiselect"===this.component&&"CheckBox"===this.parent.mode)(h=this.parent.list.querySelector(".e-list-parent.e-reorder"))&&this.parent.list.querySelector(".e-virtual-ddl-content").removeChild(h);var p=this.parent.generatedDataObject[u];if("multiselect"===this.component&&this.parent.hideSelectedItem){if(p){var d=(0,v.getValue)(this.parent.fields.value,p[0]);if(this.parent.value&&null!==d&&Array.isArray(this.parent.value)&&this.parent.value.length>0&&this.parent.value.indexOf(d)<0){a=this.parent.getForQuery(this.parent.value).clone();a=this.parent.viewPortInfo.endIndex===this.parent.totalItemCount+this.parent.value.length&&this.parent.hideSelectedItem?a.skip(this.parent.totalItemCount-this.parent.itemCount):a.skip(this.parent.viewPortInfo.startIndex),this.parent.setCurrentView=!1,this.parent.resetList(this.parent.dataSource,this.parent.fields,a),i=!0;break}(null===this.parent.value||this.parent.value&&0===this.parent.value.length)&&t.push(p[0])}if(u===l-1&&t.length!==this.parent.itemCount&&this.parent.hideSelectedItem){a=this.parent.value&&this.parent.value.length>0?this.parent.getForQuery(this.parent.value).clone():new g.Query;a=this.parent.value&&this.parent.viewPortInfo.endIndex===this.parent.totalItemCount+this.parent.value.length&&this.parent.hideSelectedItem?a.skip(this.parent.totalItemCount-this.parent.itemCount):a.skip(this.parent.viewPortInfo.startIndex),this.parent.setCurrentView=!1,this.parent.resetList(this.parent.dataSource,this.parent.fields,a),i=!0}}else p&&t.push(p[0]);this.parent.setCurrentView=!1}if(!i&&s){"multiselect"===this.component&&this.parent.allowCustomValue&&0===this.parent.viewPortInfo.startIndex&&this.parent.virtualCustomData&&t.splice(0,0,this.parent.virtualCustomData);var c=[];"multiselect"===this.component&&this.parent.allowCustomValue&&this.parent.viewPortInfo.endIndex===this.parent.totalItemCount&&this.parent.virtualCustomSelectData&&this.parent.virtualCustomSelectData.length>0&&(c=t.concat(this.parent.virtualCustomSelectData),t=c),this.parent.renderItems(t,this.parent.fields,"multiselect"===this.component&&"CheckBox"===this.parent.mode)}"multiselect"===this.component&&(this.parent.updatevirtualizationList(),this.parent.checkMaxSelection()),this.parent.getSkeletonCount(),this.parent.skeletonCount=0!==this.parent.totalItemCount&&this.parent.totalItemCount<2*this.parent.itemCount&&(!(this.parent.dataSource instanceof g.DataManager)||this.parent.dataSource instanceof g.DataManager&&this.parent.totalItemCount<=this.parent.itemCount)?0:this.parent.skeletonCount;var m=this.parent.list.getElementsByClassName("e-virtual-ddl")[0];if(m)m.style=this.parent.GetVirtualTrackHeight();else if(!m&&this.parent.skeletonCount>0&&this.parent.popupWrapper){var f=this.parent.createElement("div",{id:this.parent.element.id+"_popup",className:"e-virtual-ddl",styles:this.parent.GetVirtualTrackHeight()});this.parent.popupWrapper.querySelector(".e-dropdownbase").appendChild(f)}this.parent.UpdateSkeleton(),this.parent.liCollections=this.parent.list.querySelectorAll(".e-list-item");var y=this.parent.list.getElementsByClassName("e-virtual-ddl-content")[0];if(y&&(y.style=this.parent.getTransformValues()),this.parent.fields.groupBy&&this.parent.scrollStop(),40===this.parent.keyCode&&this.parent.isScrollChanged&&this.parent.hideSelectedItem&&!(0,v.isNullOrUndefined)(this.parent.currentFocuedListElement)){var C=this.parent.getElementByValue(this.parent.currentFocuedListElement.getAttribute("data-value"));this.parent.addListFocus(C),this.parent.isScrollChanged=!1}},e.prototype.generateQueryAndSetQueryIndexAsync=function(e,t){var i=!1,s=0,l=0,n=this.parent.viewPortInfo.endIndex;if(!t&&0!==n)for(var a=this.parent.viewPortInfo.startIndex;a<=n;a++)a in this.parent.generatedDataObject||(i?l=a===n?a:a+1:(i=!0,s=l=a));!i||this.parent.totalItemCount===s&&this.parent.totalItemCount===l||(this.parent.virtualItemStartIndex=s,this.parent.virtualItemEndIndex=l,this.parent.setCurrentView=!0,this.generateAndExecuteQueryAsync(e,s,l),"multiselect"===this.component&&this.parent.hideSelectedItem&&this.parent.value&&Array.isArray(this.parent.value)&&this.parent.value.length>0&&this.parent.totalItemsCount(),"multiselect"===this.component&&this.parent.virtualItemStartIndex===this.parent.virtualItemEndIndex&&(this.parent.virtualItemStartIndex=this.parent.viewPortInfo.startIndex,this.parent.virtualItemEndIndex=this.parent.viewPortInfo.endIndex)),(!(this.parent.dataSource instanceof g.DataManager)||this.parent.dataSource instanceof g.DataManager&&!this.parent.isRequesting)&&this.setCurrentViewDataAsync()},e.prototype.dataProcessAsync=function(e){this.parent.selectedValueInfo=null,this.parent.virtualItemStartIndex=this.parent.viewPortInfo.startIndex,this.parent.virtualItemEndIndex=this.parent.viewPortInfo.endIndex,this.generateQueryAndSetQueryIndexAsync(new g.Query,e)},e.prototype.virtualScrollRefreshAsync=function(){return C(this,void 0,void 0,(function(){return b(this,(function(e){switch(e.label){case 0:return this.parent.isCustomFilter=!(this.parent.isTyped||"combobox"===this.component&&this.parent.allowFiltering&&this.parent.queryString!==this.parent.typedString||!(0,v.isNullOrUndefined)(this.parent.filterInput)&&!(0,v.isNullOrUndefined)(this.parent.filterInput.value)&&""!==this.parent.filterInput.value&&"combobox"!==this.component)&&!("autocomplete"===this.component&&null!=this.parent.value)||this.parent.isCustomFilter,(this.parent.allowFiltering||"autocomplete"===this.component)&&((0,v.isNullOrUndefined)(this.parent.typedString)||"combobox"===this.component&&!(0,v.isNullOrUndefined)(this.parent.typedString)&&this.parent.allowFiltering?(this.parent.getSkeletonCount(!0),"combobox"===this.component&&(this.parent.skeletonCount=0!==this.parent.totalItemCount&&this.parent.totalItemCount<2*this.parent.itemCount&&(!(this.parent.dataSource instanceof g.DataManager)||this.parent.dataSource instanceof g.DataManager&&this.parent.totalItemCount<=this.parent.itemCount)?0:this.parent.skeletonCount)):(this.parent.viewPortInfo.endIndex>=this.parent.dataCount&&(this.parent.viewPortInfo.endIndex=this.parent.dataCount),this.parent.viewPortInfo.startIndex>=this.parent.dataCount&&(this.parent.viewPortInfo.startIndex=this.parent.dataCount-this.parent.itemCount))),[4,this.dataProcessAsync()];case 1:return e.sent(),null==this.parent.keyboardEvent||this.parent.dataSource instanceof g.DataManager&&(!(this.parent.dataSource instanceof g.DataManager)||this.parent.isRequesting)||this.parent.handleVirtualKeyboardActions(this.parent.keyboardEvent,this.parent.pageCount),this.parent.customFilterQuery||(this.parent.isCustomFilter=!1),[2]}}))}))},e.prototype.scrollListener=function(e){var t=this;if(!this.parent.isPreventScrollAction&&!this.parent.isVirtualTrackHeight){this.parent.preventSetCurrentData=!1;var i=e.sentinel,s=this.parent.previousStartIndex;this.parent.viewPortInfo=this.getInfoFromView(e.direction,i,e.offset,!1),this.parent.isUpwardScrolling=!1,this.parent.previousStartIndex===s||this.parent.isKeyBoardAction?this.parent.isScrollActionTriggered&&(this.parent.isPreventKeyAction=!1,this.parent.isScrollActionTriggered=!1,this.parent.list.getElementsByClassName("e-virtual-ddl-content")[0].style=this.parent.getTransformValues()):(this.parent.isScrollActionTriggered=!1,this.parent.currentPageNumber=this.parent.viewPortInfo.currentPageNumber,this.parent.virtualListInfo=y({},this.parent.viewPortInfo),this.parent.isPreventKeyAction=!0,this.parent.isVirtualScrolling=!0,setTimeout((function(){t.parent.pageCount=t.parent.getPageCount(),t.virtualScrollRefreshAsync().then((function(){t.parent.popupObj&&(t.parent.list=t.parent.popupObj.element.querySelector(".e-content")||(0,v.select)(".e-content"),t.parent.updateSelectionList(),t.parent.liCollections=t.parent.getItems()),t.parent.isKeyBoardAction=!1,t.parent.isVirtualScrolling=!1,t.parent.isPreventKeyAction=!1}))}),5)),this.parent.previousInfo=this.parent.viewPortInfo}},e.prototype.getInfoFromView=function(e,t,i,s){var l={direction:e,sentinelInfo:t,offsets:i,startIndex:this.parent.previousStartIndex,endIndex:this.parent.previousEndIndex},n=this.parent.popupContentElement?this.parent.popupContentElement.getBoundingClientRect().height:0,a=this.parent.listItemHeight,o=i.top/a,r=n/a,h=o+r,u=this.parent.virtualItemCount/4,p=this.parent.totalItemCount;if("down"===l.direction){var d=Math.round(h)-Math.round(u);if((0,v.isNullOrUndefined)(l.startIndex)||h>l.startIndex+Math.round(this.parent.virtualItemCount/2+u)&&l.endIndex!==p){l.startIndex=d>=0?Math.round(d):0,l.startIndex=l.startIndex>o?Math.floor(o):l.startIndex;var c=l.startIndex+this.parent.virtualItemCount;l.startIndex=c<h?Math.ceil(h)-this.parent.virtualItemCount:l.startIndex,l.endIndex=c<p?c:p,l.startIndex=c>=p?l.endIndex-this.parent.virtualItemCount>0?l.endIndex-this.parent.virtualItemCount:0:l.startIndex,l.currentPageNumber=Math.ceil(l.endIndex/this.parent.virtualItemCount)}}else if("up"===l.direction){if(l.startIndex&&l.endIndex||Math.ceil(o)>this.parent.previousStartIndex)if(o<Math.round((l.startIndex*a+u*a)/a)||Math.ceil(o)>this.parent.previousStartIndex){var m=u>r?u:r+r/4;c=Math.round(o+m);l.endIndex=c<p?c:p;d=l.endIndex-this.parent.virtualItemCount;l.startIndex=d>0?d:0,l.endIndex=d<0?this.parent.virtualItemCount:l.endIndex,l.currentPageNumber=Math.ceil(l.startIndex/this.parent.virtualItemCount)}}return s?this.parent.scrollPreStartIndex=l.startIndex:(this.parent.previousStartIndex=l.startIndex,this.parent.startIndex=l.startIndex,this.parent.previousEndIndex=l.endIndex),l},e.prototype.virtualScrollHandler=function(e){var t=this,i="chrome"===v.Browser.info.name?200:100,s=0,l=(0,v.debounce)(e,i),n=(0,v.debounce)(e,50);return function(e){var i=e.target.scrollTop,a=e.target.scrollLeft,o=s<i&&!t.parent.isUpwardScrolling?"down":"up";s=i;var r=t.sentinelInfo[o],h=t.parent.scrollPreStartIndex,u={top:i,left:a};t.parent.list&&t.parent.list.querySelectorAll(".e-virtual-list").length>0&&(t.getInfoFromView(o,r,u,!0),t.parent.scrollPreStartIndex===h||t.parent.isPreventScrollAction||(t.parent.isScrollActionTriggered=!0,t.parent.list.querySelector(".e-virtual-ddl-content").style.transform="translate(0px,"+i+"px)"));var p=l;"X"===r.axis&&(p=n),p({direction:o,sentinel:r,offset:{top:i,left:a},focusElement:document.activeElement})}},e.prototype.destroy=function(){this.removeEventListener()},e}(),E=u(90),x=u(344),I=(f=function(e,t){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},f(e,t)},function(e,t){function i(){this.constructor=e}f(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),w=function(e,t,i,s){var l,n=arguments.length,a=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(l=e[o])&&(a=(n<3?l(a):n>3?l(t,i,a):l(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},O=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return I(t,e),w([(0,v.Property)()],t.prototype,"text",void 0),w([(0,v.Property)()],t.prototype,"value",void 0),w([(0,v.Property)()],t.prototype,"iconCss",void 0),w([(0,v.Property)()],t.prototype,"groupBy",void 0),w([(0,v.Property)()],t.prototype,"htmlAttributes",void 0),w([(0,v.Property)()],t.prototype,"disabled",void 0),t}(v.ChildProperty),A={root:"e-dropdownbase",rtl:"e-rtl",content:"e-content",selected:"e-active",hover:"e-hover",noData:"e-nodata",fixedHead:"e-fixed-head",focus:"e-item-focus",li:"e-list-item",group:"e-list-group-item",disabled:"e-disabled",grouping:"e-dd-group",virtualList:"e-list-item e-virtual-list"},D=function(e){function t(t,i){var s=e.call(this,t,i)||this;return s.preventChange=!1,s.isPreventChange=!1,s.isDynamicDataChange=!1,s.addedNewItem=!1,s.isAddNewItemTemplate=!1,s.isRequesting=!1,s.isVirtualizationEnabled=!1,s.isCustomDataUpdated=!1,s.isAllowFiltering=!1,s.virtualizedItemsCount=0,s.isCheckBoxSelection=!1,s.totalItemCount=0,s.dataCount=0,s.remoteDataCount=-1,s.isRemoteDataUpdated=!1,s.isIncrementalRequest=!1,s.itemCount=30,s.virtualListHeight=0,s.isVirtualScrolling=!1,s.isPreventScrollAction=!1,s.scrollPreStartIndex=0,s.isScrollActionTriggered=!1,s.previousStartIndex=0,s.isMouseScrollAction=!1,s.isKeyBoardAction=!1,s.isScrollChanged=!1,s.isUpwardScrolling=!1,s.startIndex=0,s.currentPageNumber=0,s.pageCount=0,s.isPreventKeyAction=!1,s.generatedDataObject={},s.skeletonCount=32,s.isVirtualTrackHeight=!1,s.virtualSelectAll=!1,s.incrementalQueryString="",s.incrementalEndIndex=0,s.incrementalStartIndex=0,s.incrementalPreQueryString="",s.isObjectCustomValue=!1,s.appendUncheckList=!1,s.getInitialData=!1,s.preventPopupOpen=!0,s.virtualSelectAllState=!1,s.CurrentEvent=null,s.isDynamicData=!1,s.isPrimitiveData=!1,s.isCustomFiltering=!1,s.virtualListInfo={currentPageNumber:null,direction:null,sentinelInfo:{},offsets:{},startIndex:0,endIndex:0},s.viewPortInfo={currentPageNumber:null,direction:null,sentinelInfo:{},offsets:{},startIndex:0,endIndex:0},s.selectedValueInfo={currentPageNumber:null,direction:null,sentinelInfo:{},offsets:{},startIndex:0,endIndex:0},s}return I(t,e),t.prototype.getPropObject=function(e,t,i){var s=new Object,l=new Object;s[e]=t[e],l[e]=i[e];var n=new Object;return n.newProperty=s,n.oldProperty=l,n},t.prototype.getValueByText=function(e,t,i){var s=null;return(0,v.isNullOrUndefined)(this.listData)||(s=t?this.checkValueCase(e,!0,i):this.checkValueCase(e,!1,i)),s},t.prototype.checkValueCase=function(e,t,i,s){var l=this,n=null;if(s&&(n=e),!(0,v.isNullOrUndefined)(this.listData)){var a=this.listData,o=this.fields,r=this.typeOfData(a).typeof;if("string"===r||"number"===r||"boolean"===r)for(var h=0,u=a;h<u.length;h++){var p=u[h];(0,v.isNullOrUndefined)(p)||(i?n=this.checkingAccent(String(p),e,t):t?this.checkIgnoreCase(String(p),e)&&(n=this.getItemValue(String(p),e,t)):this.checkNonIgnoreCase(String(p),e)&&(n=this.getItemValue(String(p),e,t,s)))}else if(t)a.filter((function(t){var i=(0,v.getValue)(o.value,t);!(0,v.isNullOrUndefined)(i)&&l.checkIgnoreCase((0,v.getValue)(o.text,t).toString(),e)&&(n=(0,v.getValue)(o.value,t))}));else if(s){var d=null;d=n,a.filter((function(e){var t=(0,v.getValue)(o.value,e);(0,v.isNullOrUndefined)(t)||(0,v.isNullOrUndefined)(n)||t.toString()!==d.toString()||(n=(0,v.getValue)(o.text,e))}))}else a.filter((function(t){l.checkNonIgnoreCase((0,v.getValue)(o.text,t),e)&&(n=(0,v.getValue)(o.value,t))}))}return n},t.prototype.checkingAccent=function(e,t,i){var s=g.DataUtil.ignoreDiacritics(String(e)),l=g.DataUtil.ignoreDiacritics(t.toString()),n=null;return i?this.checkIgnoreCase(s,l)&&(n=this.getItemValue(String(e),t,i)):this.checkNonIgnoreCase(String(e),t)&&(n=this.getItemValue(String(e),t,i)),n},t.prototype.checkIgnoreCase=function(e,t){return String(e).toLowerCase()===t.toString().toLowerCase()},t.prototype.checkNonIgnoreCase=function(e,t){return String(e)===t.toString()},t.prototype.getItemValue=function(e,t,i,s){var l=this.listData,n=this.typeOfData(l).typeof;return s?e.toString():i?"string"===n?String(e):this.getFormattedValue(String(e)):"string"===n?t:this.getFormattedValue(t)},t.prototype.templateCompiler=function(e){var t=!1;if("function"!=typeof e&&e)try{t=!!(0,v.selectAll)(e,document).length}catch(e){t=!1}return t},t.prototype.l10nUpdate=function(e){var t="listbox"===this.getModuleName()?this.ulElement:this.list;if(!(0,v.isNullOrUndefined)(this.noRecordsTemplate)&&"No records found"!==this.noRecordsTemplate||"Request failed"!==this.actionFailureTemplate){var i=e?this.actionFailureTemplate:this.noRecordsTemplate,s=void 0,l=e?this.actionFailureTemplateId:this.noRecordsTemplateId;t.innerHTML="";var n=this.templateCompiler(i);s="function"!=typeof i&&n?(0,v.compile)((0,v.select)(i,document).innerHTML.trim()):(0,v.compile)(i);var a=e?"actionFailureTemplate":"noRecordsTemplate",o=void 0;if((o=this.isReact&&"function"==typeof i?s({},this,a,l,this.isStringTemplate,null):s({},this,a,l,this.isStringTemplate,null,t))&&o.length>0)for(var r=0;r<o.length;r++){if("listbox"===this.getModuleName()&&"noRecordsTemplate"===a)if("#text"===o[r].nodeName)(u=this.createElement("li")).textContent=o[r].textContent,u.classList.add("e-list-nrt"),u.setAttribute("role","option"),t.appendChild(u);else o[r].classList.add("e-list-nr-template"),t.appendChild(o[r]);else(o[r]instanceof HTMLElement||o[r]instanceof Text&&""!==o[r].textContent)&&t.appendChild(o[r])}this.renderReactTemplates()}else{var h=new v.L10n(this.getLocaleName(),{},this.locale);""!==h.getConstant("actionFailureTemplate")||""!==h.getConstant("noRecordsTemplate")?this.l10n=h:this.l10n=new v.L10n("listbox"===this.getModuleName()?"listbox":"mention"===this.getModuleName()?"mention":"dropdowns",{noRecordsTemplate:"No records found",actionFailureTemplate:"Request failed"},this.locale);var u,p=e?this.l10n.getConstant("actionFailureTemplate"):this.l10n.getConstant("noRecordsTemplate");if("listbox"===this.getModuleName())(u=this.createElement("li")).textContent=p,t.appendChild(u),u.classList.add("e-list-nrt"),u.setAttribute("role","option");else(0,v.isNullOrUndefined)(t)||(t.innerHTML=p)}},t.prototype.checkAndResetCache=function(){this.isVirtualizationEnabled&&(this.generatedDataObject={},this.virtualItemStartIndex=this.virtualItemEndIndex=0,this.viewPortInfo={currentPageNumber:null,direction:null,sentinelInfo:{},offsets:{},startIndex:0,endIndex:this.itemCount},this.selectedValueInfo=null)},t.prototype.updateIncrementalInfo=function(e,t){this.viewPortInfo.startIndex=e,this.viewPortInfo.endIndex=t,this.updateVirtualItemIndex(),this.isIncrementalRequest=!0,this.resetList(this.dataSource,this.fields,this.query),this.isIncrementalRequest=!1},t.prototype.updateIncrementalView=function(e,t){this.viewPortInfo.startIndex=e,this.viewPortInfo.endIndex=t,this.updateVirtualItemIndex(),this.resetList(this.dataSource,this.fields,this.query),this.UpdateSkeleton(),this.liCollections=this.list.querySelectorAll("."+A.li),this.ulElement=this.list.querySelector("ul")},t.prototype.updateVirtualItemIndex=function(){this.virtualItemStartIndex=this.viewPortInfo.startIndex,this.virtualItemEndIndex=this.viewPortInfo.endIndex,this.virtualListInfo=this.viewPortInfo},t.prototype.getFilteringSkeletonCount=function(){var e=this.skeletonCount;this.getSkeletonCount(!0),this.skeletonCount=this.dataCount<2*this.itemCount&&(!(this.dataSource instanceof g.DataManager)||this.dataSource instanceof g.DataManager&&this.totalItemCount<=this.itemCount)?0:this.skeletonCount;var t=!0;if("autocomplete"!==this.getModuleName()&&"multiselect"!==this.getModuleName()||!(this.totalItemCount<2*this.itemCount)||this.dataSource instanceof g.DataManager&&!(this.dataSource instanceof g.DataManager&&this.totalItemCount<=this.itemCount)||(this.skeletonCount=0,t=!1),!this.list.classList.contains(A.noData)){if(e!==this.skeletonCount&&t?this.UpdateSkeleton(!0,Math.abs(e-this.skeletonCount)):this.UpdateSkeleton(),this.liCollections=this.list.querySelectorAll(".e-list-item"),this.list.getElementsByClassName("e-virtual-ddl").length>0)this.list.getElementsByClassName("e-virtual-ddl")[0].style=this.GetVirtualTrackHeight();else if(!this.list.querySelector(".e-virtual-ddl")&&this.skeletonCount>0&&this.list.querySelector(".e-dropdownbase")){var i=this.createElement("div",{id:this.element.id+"_popup",className:"e-virtual-ddl",styles:this.GetVirtualTrackHeight()});this.list.querySelector(".e-dropdownbase").appendChild(i)}this.list.getElementsByClassName("e-virtual-ddl-content").length>0&&(this.list.getElementsByClassName("e-virtual-ddl-content")[0].style=this.getTransformValues())}},t.prototype.getSkeletonCount=function(e){this.virtualListHeight=null!=this.listContainerHeight?parseInt(this.listContainerHeight,10):this.virtualListHeight;var t=this.virtualListHeight>0&&this.listItemHeight>0?Math.floor(this.virtualListHeight/this.listItemHeight):0;this.skeletonCount=4*t<this.itemCount?this.itemCount:4*t,this.itemCount=e?this.itemCount:this.skeletonCount,this.virtualItemCount=this.itemCount,this.skeletonCount=Math.floor(this.skeletonCount/2)},t.prototype.GetVirtualTrackHeight=function(){var e=this.totalItemCount===this.viewPortInfo.endIndex?this.totalItemCount*this.listItemHeight-this.itemCount*this.listItemHeight:this.totalItemCount*this.listItemHeight,t="height: "+((e=this.isVirtualTrackHeight?0:e)-this.itemCount*this.listItemHeight)+"px;";return"autocomplete"!==this.getModuleName()&&"multiselect"!==this.getModuleName()||0!==this.skeletonCount?t:"height: 0px;"},t.prototype.getTransformValues=function(){var e=this.viewPortInfo.startIndex*this.listItemHeight;return e-=this.skeletonCount*this.listItemHeight,"transform: translate(0px, "+(e=0===this.viewPortInfo.startIndex&&this.listData&&0===this.listData.length||0===this.skeletonCount?0:e)+"px);"},t.prototype.UpdateSkeleton=function(e,t){var i=this.list.querySelector(".e-virtual-ddl-content"),s=this.list.querySelector(".e-virtual-list");if(i&&(!s||e)&&this.isVirtualizationEnabled)for(var l=e?t:this.skeletonCount,n=0;n<l;n++){var a=this.createElement("li",{className:A.virtualList,styles:"overflow: inherit"});this.isVirtualizationEnabled&&this.itemTemplate&&(a.style.height=this.listItemHeight-parseInt(window.getComputedStyle(this.getItems()[1]).marginBottom,10)+"px");var o=new x.Skeleton({shape:"Text",height:"10px",width:"95%",cssClass:"e-skeleton-text"});o.appendTo(this.createElement("div")),a.appendChild(o.element),i.firstChild&&i.firstChild.insertBefore(a,i.firstChild.children[0])}},t.prototype.getLocaleName=function(){return"drop-down-base"},t.prototype.getTextByValue=function(e){return this.checkValueCase(e,!1,!1,!0)},t.prototype.getFormattedValue=function(e){if(this.listData&&this.listData.length){var t=void 0;if(t=this.properties.allowCustomValue&&this.properties.value&&this.properties.value instanceof Array&&this.properties.value.length>0?this.typeOfData(this.properties.value):this.typeOfData(this.listData),"number"==typeof(0,v.getValue)(this.fields.value?this.fields.value:"value",t.item)||"number"===t.typeof)return parseFloat(e);if("boolean"==typeof(0,v.getValue)(this.fields.value?this.fields.value:"value",t.item)||"boolean"===t.typeof)return"true"===e||""+e=="true"}return e},t.prototype.setEnableRtl=function(){(0,v.isNullOrUndefined)(this.enableRtlElements)||(this.list&&this.enableRtlElements.push(this.list),this.enableRtl?(0,v.addClass)(this.enableRtlElements,A.rtl):(0,v.removeClass)(this.enableRtlElements,A.rtl))},t.prototype.initialize=function(e){if(this.bindEvent=!0,this.preventPopupOpen=!0,this.actionFailureTemplateId=this.element.id+"ActionFailureTemplate","UL"===this.element.tagName){var t=E.ListBase.createJsonFromElement(this.element);this.setProperties({fields:{text:"text",value:"text"}},!0),this.resetList(t,this.fields)}else if("SELECT"===this.element.tagName){(this.dataSource instanceof Array?this.dataSource.length>0:!(0,v.isNullOrUndefined)(this.dataSource))?this.isDynamicDataChange&&this.setListData(this.dataSource,this.fields,this.query):this.renderItemsBySelect()}else this.setListData(this.dataSource,this.fields,this.query,e)},t.prototype.getPersistData=function(){return this.addOnPersist([])},t.prototype.updateDataAttribute=function(e){for(var t=["class","style","id","type","aria-expanded","aria-autocomplete","aria-readonly"],i={},s=0;s<this.element.attributes.length;s++)-1!==t.indexOf(this.element.attributes[s].name)||"dropdownlist"===this.getModuleName()&&"readonly"===this.element.attributes[s].name||(i[this.element.attributes[s].name]=this.element.getAttribute(this.element.attributes[s].name));(0,v.extend)(i,e,i),this.setProperties({htmlAttributes:i},!0)},t.prototype.renderItemsBySelect=function(){var e,t=this.element,i=t.querySelectorAll("select>optgroup"),s="multiselect"===this.getModuleName()&&this.isGroupChecking&&i.length>0;e=s?{value:"value",text:"text",groupBy:"categeory"}:e={value:"value",text:"text"};var l=[],n=t.querySelectorAll("select>option");if(this.getJSONfromOption(l,n,e),i.length){for(var a=0;a<i.length;a++){var o=i[a],r={};r[e.text]=o.label,r.isHeader=!0;var h=o.querySelectorAll("option");s?this.getJSONfromOption(l,h,e,o.label):(l.push(r),this.getJSONfromOption(l,h,e))}t.querySelectorAll("select>option")}this.updateFields(e.text,e.value,s?e.groupBy:this.fields.groupBy,this.fields.htmlAttributes,this.fields.iconCss,this.fields.disabled),this.resetList(l,e)},t.prototype.updateFields=function(e,t,i,s,l,n){var a={fields:{text:e,value:t,groupBy:(0,v.isNullOrUndefined)(i)?this.fields&&this.fields.groupBy:i,htmlAttributes:(0,v.isNullOrUndefined)(s)?this.fields&&this.fields.htmlAttributes:s,iconCss:(0,v.isNullOrUndefined)(l)?this.fields&&this.fields.iconCss:l,disabled:(0,v.isNullOrUndefined)(n)?this.fields&&this.fields.disabled:n}};this.setProperties(a,!0)},t.prototype.getJSONfromOption=function(e,t,i,s){void 0===s&&(s=null);for(var l=0,n=t;l<n.length;l++){var a=n[l],o={};o[i.text]=a.innerText,o[i.value]=(0,v.isNullOrUndefined)(a.getAttribute(i.value))?a.innerText:a.getAttribute(i.value),(0,v.isNullOrUndefined)(s)||(o[i.groupBy]=s),e.push(o)}},t.prototype.preRender=function(){this.scrollTimer=-1,this.enableRtlElements=[],this.isRequested=!1,this.isDataFetched=!1,this.itemTemplateId=this.element.id+"ItemTemplate",this.displayTemplateId=this.element.id+"DisplayTemplate",this.spinnerTemplateId=this.element.id+"SpinnerTemplate",this.valueTemplateId=this.element.id+"ValueTemplate",this.groupTemplateId=this.element.id+"GroupTemplate",this.headerTemplateId=this.element.id+"HeaderTemplate",this.footerTemplateId=this.element.id+"FooterTemplate",this.noRecordsTemplateId=this.element.id+"NoRecordsTemplate"},t.prototype.setListData=function(e,t,i,s){var l,n=this;t=t||this.fields,this.isActive=!0;var a={cancel:!1,data:e,query:i};this.isPreventChange=!(!this.isAngular||!this.preventChange)||this.isPreventChange,this.isRequesting||this.trigger("actionBegin",a,(function(i){if(!i.cancel)if(n.isRequesting=!0,n.showSpinner(),e instanceof g.DataManager){n.isRequested=!0;var a=!1;if(n.isDataFetched)return void n.emptyDataRequest(t);i.data.executeQuery(n.getQuery(i.query)).then((function(e){n.isPreventChange=!(!n.isAngular||!n.preventChange)||n.isPreventChange;var s=!0;if(!n.virtualSelectAll){for(var o=n.getQuery(i.query),r=0;r<o.queries.length;r++)"onWhere"===o.queries[r].fn&&(a=!0);if(n.isVirtualizationEnabled&&0!==e.count&&e.count<2*n.itemCount){if(o)for(r=0;r<o.queries.length;r++)"onTake"===o.queries[r].fn&&(o.queries[r].e.nos=e.count),"multiselect"!==n.getModuleName()||"or"!==o.queries[r].e.condition&&"equal"!==o.queries[r].e.operator||n.isCustomFiltering||(s=!1)}else if(n.isVirtualTrackHeight=!1,o)for(r=0;r<o.queries.length;r++)"multiselect"===n.getModuleName()&&(o.queries[r].e&&"or"===o.queries[r].e.condition||o.queries[r].e&&"equal"===o.queries[r].e.operator)&&(s=!1)}s&&(n.dataCount=n.totalItemCount=e.count),n.trigger("actionComplete",e,(function(e){if(!e.cancel){n.isRequesting=!1,n.isCustomFiltering=!1;var i=e.result;if(n.isIncrementalRequest)return void(l=n.renderItems(i,t));if((!n.isVirtualizationEnabled&&0===i.length||n.isVirtualizationEnabled&&0===i.length&&!a)&&(n.isDataFetched=!0),a||(n.remoteDataCount=e.count),n.dataCount=n.virtualSelectAll?n.dataCount:e.count,n.totalItemCount=n.virtualSelectAll?n.totalItemCount:e.count,l=n.renderItems(i,t),n.appendUncheckList=!1,n.onActionComplete(l,i,e),n.groupTemplate&&n.renderGroupTemplate(l),n.isRequested=!1,n.bindChildItems(i,l,t,e),n.getInitialData)return n.getInitialData=!1,void(n.preventPopupOpen=!1);n.isVirtualizationEnabled&&n.setCurrentView&&n.notify("setCurrentViewDataAsync",{module:"VirtualScroll"}),null!=n.keyboardEvent&&n.handleVirtualKeyboardActions(n.keyboardEvent,n.pageCount),n.isVirtualizationEnabled&&(n.getFilteringSkeletonCount(),n.updatePopupPosition()),n.virtualSelectAll&&n.virtualSelectAllData&&(n.virtualSelectionAll(n.virtualSelectAllState,n.liCollections,n.CurrentEvent),n.virtualSelectAllState=!1,n.CurrentEvent=null,n.virtualSelectAll=!1)}}))})).catch((function(e){n.isRequested=!1,n.isRequesting=!1,n.onActionFailure(e),n.hideSpinner()}))}else{n.isRequesting=!1;var o=!0,r=void 0;if(n.isVirtualizationEnabled&&!n.virtualGroupDataSource&&n.fields.groupBy){var h=new g.DataManager(n.dataSource).executeLocal((new g.Query).group(n.fields.groupBy));n.virtualGroupDataSource=h.records}var u=n.isVirtualizationEnabled&&n.virtualGroupDataSource&&!n.isCustomDataUpdated?new g.DataManager(n.virtualGroupDataSource):new g.DataManager(i.data);if(r=n.getQuery(i.query).executeLocal(u),!n.virtualSelectAll){var p=n.getQuery(i.query);if(n.isVirtualizationEnabled&&0!==r.count&&r.count<2*n.itemCount){if(p){for(var d=0;d<p.queries.length;d++)"onTake"===p.queries[d].fn&&(p.queries[d].e.nos=r.count,r=p.executeLocal(u)),"multiselect"!==n.getModuleName()||"or"!==p.queries[d].e.condition&&"equal"!==p.queries[d].e.operator||n.isCustomFiltering||(o=!1);o&&(r=p.executeLocal(u),n.isVirtualTrackHeight=!(n.dataSource instanceof g.DataManager||n.isCustomDataUpdated))}}else if(n.isVirtualTrackHeight=!1,p)for(d=0;d<p.queries.length;d++)"multiselect"===n.getModuleName()&&(p.queries[d].e&&"or"===p.queries[d].e.condition||p.queries[d].e&&"equal"===p.queries[d].e.operator)&&(o=!1)}!o||n.dataSource instanceof g.DataManager||n.isCustomDataUpdated||n.virtualSelectAll||(n.dataCount=n.totalItemCount=n.virtualSelectAll?r.length:r.count);var c={cancel:!1,result:r=n.isVirtualizationEnabled?r.result:r};n.isPreventChange=!(!n.isAngular||!n.preventChange)||n.isPreventChange,n.trigger("actionComplete",c,(function(e){if(n.isCustomFiltering=!1,n.isIncrementalRequest)l=n.renderItems(e.result,t);else if(!e.cancel){if(l=n.renderItems(e.result,t),n.onActionComplete(l,e.result,s),n.groupTemplate&&n.renderGroupTemplate(l),n.bindChildItems(e.result,l,t),n.getInitialData)return n.getInitialData=!1,void(n.preventPopupOpen=!1);setTimeout((function(){"multiselect"===n.getModuleName()&&null!=n.itemTemplate&&l.childElementCount>0&&(l.children[0].childElementCount>0||n.fields.groupBy&&l.children[1]&&l.children[1].childElementCount>0)&&n.updateDataList()}))}}))}}))},t.prototype.handleVirtualKeyboardActions=function(e,t){},t.prototype.updatePopupState=function(){},t.prototype.updatePopupPosition=function(){},t.prototype.virtualSelectionAll=function(e,t,i){},t.prototype.updateRemoteData=function(){this.setListData(this.dataSource,this.fields,this.query)},t.prototype.bindChildItems=function(e,t,i,s){var l=this;e.length>=100&&"autocomplete"===this.getModuleName()?setTimeout((function(){var n=l.remainingItems(l.sortedData,i);(0,v.append)(n,t),l.liCollections=l.list.querySelectorAll("."+A.li),l.updateListValues(),l.raiseDataBound(e,s)}),0):this.raiseDataBound(e,s)},t.prototype.isObjectInArray=function(e,t){return t.some((function(t){return Object.keys(e).every((function(i){return Object.prototype.hasOwnProperty.call(t,i)&&t[i]===e[i]}))}))},t.prototype.updateListValues=function(){},t.prototype.findListElement=function(e,t,i,s){var l=null;if(e)for(var n=[].slice.call(e.querySelectorAll(t)),a=0;a<n.length;a++)if(n[a].getAttribute(i)===s+""){l=n[a];break}return l},t.prototype.raiseDataBound=function(e,t){this.hideSpinner();var i={items:e,e:t};this.trigger("dataBound",i)},t.prototype.remainingItems=function(e,t){var i=new g.DataManager(e).executeLocal((new g.Query).skip(100));if(this.itemTemplate){var s=this.templateListItem(i,t);return[].slice.call(s.childNodes)}var l=this.typeOfData(i).typeof;return"string"===l||"number"===l||"boolean"===l?E.ListBase.createListItemFromArray(this.createElement,i,!0,this.listOption(i,t),this):E.ListBase.createListItemFromJson(this.createElement,i,this.listOption(i,t),1,!0,this)},t.prototype.emptyDataRequest=function(e){var t=[];this.onActionComplete(this.renderItems(t,e),t),this.isRequested=!1,this.isRequesting=!1,this.hideSpinner()},t.prototype.showSpinner=function(){},t.prototype.hideSpinner=function(){},t.prototype.onActionFailure=function(e){this.liCollections=[],this.trigger("actionFailure",e),this.l10nUpdate(!0),(0,v.isNullOrUndefined)(this.list)||(0,v.addClass)([this.list],A.noData)},t.prototype.onActionComplete=function(e,t,i){if(this.listData=t,!this.isVirtualizationEnabled||this.isCustomDataUpdated||this.virtualSelectAll||this.notify("setGeneratedData",{module:"VirtualScroll"}),"listbox"!==this.getModuleName()&&e.setAttribute("tabindex","0"),this.isReact&&this.clearTemplate(["itemTemplate","groupTemplate","actionFailureTemplate","noRecordsTemplate"]),this.isVirtualizationEnabled||(this.fixedHeaderElement=(0,v.isNullOrUndefined)(this.fixedHeaderElement)?this.fixedHeaderElement:null),"multiselect"===this.getModuleName()&&this.properties.allowCustomValue&&this.fields.groupBy)for(var s=0;s<e.childElementCount;s++)e.children[s].classList.contains("e-list-group-item")&&((0,v.isNullOrUndefined)(e.children[s].innerHTML)||""===e.children[s].innerHTML)&&(0,v.addClass)([e.children[s]],"e-hide-group-header"),e.children[0].classList.contains("e-hide-group-header")&&(0,v.setStyleAttribute)(e.children[1],{zIndex:11});(0,v.isNullOrUndefined)(this.list)||this.isVirtualizationEnabled||(this.list.innerHTML="",this.list.appendChild(e),this.liCollections=this.list.querySelectorAll("."+A.li),this.ulElement=this.list.querySelector("ul"),this.postRender(this.list,t,this.bindEvent))},t.prototype.postRender=function(e,t,i){if(this.fields.disabled)for(var s=e.querySelectorAll("."+A.li),l=0;l<s.length;l++)if(JSON.parse(JSON.stringify(this.listData[l]))[this.fields.disabled])if((0,v.isNullOrUndefined)(this.fields.groupBy))this.disableListItem(s[l]);else{var n=this.listData[l],a=(0,v.getValue)(this.fields.value?this.fields.value:"value",n),o=e.querySelector('li[data-value="'+a+'"]');(0,v.isNullOrUndefined)(o)||this.disableListItem(o)}var r=this.fields.disabled?e.querySelector("."+A.li+":not(.e-disabled"):e.querySelector("."+A.li),h=e.querySelector("."+A.selected);if(r&&!h){if(this.isVirtualizationEnabled&&0!==this.viewPortInfo.startIndex){var u=this.ulElement.querySelectorAll("li."+A.li+":not(.e-virtual-list):not(.e-hide-listitem)");r=u&&u.length>0?u[2]:r}r&&r.classList.add(A.focus)}t.length<=0?(this.l10nUpdate(),(0,v.addClass)([e],A.noData)):e.classList.remove(A.noData)},t.prototype.getQuery=function(e){return e||(this.query?this.query:new g.Query)},t.prototype.updateVirtualizationProperties=function(e,t,i){this.isVirtualizationEnabled=!0,this.virtualizedItemsCount=e,this.isAllowFiltering=t,this.isCheckBoxSelection=i},t.prototype.renderGroupTemplate=function(e){if(null!==this.fields.groupBy&&this.dataSource||this.element.querySelector("."+A.group)){var t=this.dataSource,i={groupTemplateID:this.groupTemplateId,isStringTemplate:this.isStringTemplate},s=e.querySelectorAll("."+A.group),l=this.templateCompiler(this.groupTemplate);if("function"!=typeof this.groupTemplate&&l){var n=(0,v.select)(this.groupTemplate,document).innerHTML.trim(),a=E.ListBase.renderGroupTemplate(n,t,this.fields.properties,s,i,this);if(this.isGroupChecking)for(var o=0;o<a.length;o++)this.notify("addItem",{module:"CheckBoxSelection",item:a[o]})}else{a=E.ListBase.renderGroupTemplate(this.groupTemplate,t,this.fields.properties,s,i,this);if(this.isGroupChecking)for(o=0;o<a.length;o++)this.notify("addItem",{module:"CheckBoxSelection",item:a[o]})}this.renderReactTemplates()}},t.prototype.createListItems=function(e,t){if(e){t.groupBy||this.element.querySelector("optgroup")?(t.groupBy&&("None"!==this.sortOrder&&(e=this.getSortedDataSource(e)),e=this.element.querySelector("optgroup")&&this.isGroupChecking&&"multiselect"===this.getModuleName()?E.ListBase.groupDataSource(e,t,this.sortOrder):E.ListBase.groupDataSource(e,t.properties,this.sortOrder)),(0,v.addClass)([this.list],A.grouping)):("listbox"!==this.getModuleName()||"listbox"===this.getModuleName()&&!this.preventDefActionFilter)&&(e=this.getSortedDataSource(e));var i=this.listOption(e,t),s=e.length>100?new g.DataManager(e).executeLocal((new g.Query).take(100)):e;return this.sortedData=e,E.ListBase.createList(this.createElement,"autocomplete"===this.getModuleName()?s:e,i,!0,this)}return null},t.prototype.listOption=function(e,t){var i=!(0,v.isNullOrUndefined)(t.iconCss),s=(0,v.isNullOrUndefined)(t.properties)?t:t.properties,l=null!==t.text||null!==t.value?{fields:s,showIcon:i,ariaAttributes:{groupItemRole:"presentation"}}:{fields:{value:"text"}};return(0,v.extend)({},l,t,!0)},t.prototype.setFloatingHeader=function(e){(0,v.isNullOrUndefined)(this.list)||this.list.classList.contains(A.noData)||((0,v.isNullOrUndefined)(this.fixedHeaderElement)&&(this.fixedHeaderElement=this.createElement("div",{className:A.fixedHead}),(0,v.isNullOrUndefined)(this.list)||this.list.