!function(b){b.jqx.jqxWidget("jqxComboBox","",{}),b.extend(b.jqx._jqxComboBox.prototype,{defineInstance:function(){var e={disabled:!1,width:200,height:25,items:new Array,selectedIndex:-1,selectedItems:new Array,_selectedItems:new Array,source:null,autoItemsHeight:!1,scrollBarSize:b.jqx.utilities.scrollBarSize,arrowSize:17,enableHover:!0,enableSelection:!0,visualItems:new Array,groups:new Array,equalItemsWidth:!0,itemHeight:-1,visibleItems:new Array,hint:!0,emptyGroupText:"Group",emptyString:"",ready:null,openDelay:250,closeDelay:300,animationType:"default",dropDownWidth:"auto",dropDownHeight:"200px",autoDropDownHeight:!1,enableBrowserBoundsDetection:!1,dropDownHorizontalAlignment:"left",dropDownVerticalAlignment:"bottom",dropDownContainer:"default",searchMode:"startswithignorecase",autoComplete:!1,remoteAutoComplete:!1,remoteAutoCompleteDelay:500,selectionMode:"default",minLength:2,displayMember:"",valueMember:"",groupMember:"",searchMember:"",keyboardSelection:!0,renderer:null,autoOpen:!1,template:"",checkboxes:!1,promptText:"",placeHolder:"",rtl:!1,listBox:null,validateSelection:null,showCloseButtons:!0,renderSelectedItem:null,search:null,popupZIndex:2e3,searchString:null,multiSelect:!1,showArrow:!0,_disabledItems:new Array,touchMode:"auto",autoBind:!0,aria:{"aria-disabled":{name:"disabled",type:"boolean"}},events:["open","close","select","unselect","change","checkChange","bindingComplete","itemAdd","itemRemove","itemUpdate"]};return this===b.jqx._jqxComboBox.prototype||b.extend(!0,this,e),e},createInstance:function(e){var t,i,s,o;if(this.host.attr("role","combobox"),b.jqx.aria(this,"aria-autocomplete","both"),null==b.jqx._jqxListBox||null==b.jqx._jqxListBox)throw new Error("jqxComboBox: Missing reference to jqxlistbox.js.");b.jqx.aria(this),this.isMaterialized()&&(i=(t=window.getComputedStyle(this.element)).getPropertyValue("--jqx-dropdown-animation"),s=t.getPropertyValue("--jqx-list-item-height"),(o=t.getPropertyValue("--jqx-action-button-size"))&&(this.arrowSize=parseInt(o)),i&&"default"==this.animationType&&(this.animationType=i.trim()),s&&-1===this.itemHeight&&(this.itemHeight=parseInt(s))),""!=this.promptText&&(this.placeHolder=this.promptText),this.render()},render:function(){var e,t,i,s,o,n=this,r=n.element.nodeName.toLowerCase();"select"==r||"ul"==r||"ol"==r?(n.field=n.element,n.field.className&&(n._className=n.field.className),e={title:n.field.title},n.field.id.length?e.id=n.field.id.replace(/[^\w]/g,"_")+"_jqxComboBox":e.id=b.jqx.utilities.createId()+"_jqxComboBox",t=b("
",e),n.width||(n.width=b(n.field).width()),n.height||(n.height=b(n.field).outerHeight()),n.element.style.cssText=n.field.style.cssText,b(n.field).hide().after(t),i=n.host.data(),n.host=t,n.host.data(i),n.element=t[0],n.element.id=n.field.id,n.field.id=e.id,n._className&&(n.host.addClass(n._className),b(n.field).removeClass(n._className)),n.field.tabIndex&&(s=n.field.tabIndex,n.field.tabIndex=-1,n.element.tabIndex=s),""!=n.field.innerHTML&&(o=b.jqx.parseSourceTag(n.field),n.source=o.items,-1==n.selectedIndex&&(n.selectedIndex=o.index))):(0");if(n.comboStructure=l,null==b.jqx._jqxListBox||null==b.jqx._jqxListBox)throw"jqxComboBox: Missing reference to jqxlistbox.js.";n.touch=b.jqx.mobile.isTouchDevice(),!0===n.touchMode&&(n.touch=!0),n.host.append(l),n.dropdownlistWrapper=n.host.find("#dropdownlistWrapper"),n.dropdownlistArrow=n.host.find("#dropdownlistArrow"),n.dropdownlistContent=n.host.find("#dropdownlistContent"),n.dropdownlistContent.addClass(n.toThemeProperty("jqx-combobox-content")),n.dropdownlistContent.addClass(n.toThemeProperty("jqx-widget-content")),n.dropdownlistWrapper[0].id="dropdownlistWrapper"+n.element.id,n.dropdownlistArrow[0].id="dropdownlistArrow"+n.element.id,n.dropdownlistContent[0].id="dropdownlistContent"+n.element.id,n.template&&n.dropdownlistArrow.addClass(n.toThemeProperty("jqx-"+n.template)),n.dropdownlistContent.append(b('')),n.input=n.dropdownlistContent.find("input"),n.input.addClass(n.toThemeProperty("jqx-combobox-input")),n.input.addClass(n.toThemeProperty("jqx-widget-content")),n.host.attr("tabindex")&&(n.input.attr("tabindex",n.host.attr("tabindex")),n.host.removeAttr("tabindex"));var a=b("");n.dropdownlistWrapper.append(h),h.addClass(n.toThemeProperty("jqx-input-bar")),n.bar=h,(n=this).template&&(n.bar.addClass(n.toThemeProperty("jqx-"+n.template)),n.label.addClass(n.toThemeProperty("jqx-"+n.template))),n._addInput(),n.rtl&&(n.input.css({direction:"rtl"}),n.dropdownlistContent.addClass(n.toThemeProperty("jqx-combobox-content-rtl")));try{var c="listBox"+n.id,p=b(b.find("#"+c));0");u.hide(),"element"==n.dropDownContainer?u.appendTo(n.host):u.appendTo(document.body),u.addClass(n.toThemeProperty("jqx-listbox-container")),n.container=u,n.listBoxContainer=b(b.find("#innerListBox"+n.id));var m=n.width;"auto"!=n.dropDownWidth&&(m=n.dropDownWidth),null==n.dropDownHeight&&(n.dropDownHeight=200),n.container.width(parseInt(m)+25),n.container.height(parseInt(n.dropDownHeight)+25),n._ready=!1,n.addHandler(n.listBoxContainer,"bindingComplete",function(e){n.listBox||(n.listBox=b.data(n.listBoxContainer[0],"jqxListBox").instance),n._ready||(n.ready&&n.ready(),n._ready=!0),n._raiseEvent("6")}),n.addHandler(n.listBoxContainer,"itemAdd",function(e){n._raiseEvent("7",e.args)}),n.addHandler(n.listBoxContainer,"itemRemove",function(e){n._raiseEvent("8",e.args)}),n.addHandler(n.listBoxContainer,"itemUpdate",function(e){n._raiseEvent("9",e.args)});n.listBoxContainer.jqxListBox({autoItemsHeight:n.autoItemsHeight,_checkForHiddenParent:!1,allowDrop:!1,allowDrag:!1,checkboxes:n.checkboxes,emptyString:n.emptyString,autoBind:!n.remoteAutoComplete&&n.autoBind,renderer:n.renderer,rtl:n.rtl,itemHeight:n.itemHeight,selectedIndex:n.selectedIndex,incrementalSearch:!1,width:m,scrollBarSize:n.scrollBarSize,autoHeight:n.autoDropDownHeight,height:n.dropDownHeight,groupMember:n.groupMember,searchMember:n.searchMember,displayMember:n.displayMember,valueMember:n.valueMember,source:n.source,theme:n.theme,rendered:function(){var e;n.listBox=b.data(n.listBoxContainer[0],"jqxListBox").instance,n.remoteAutoComplete?(n.autoDropDownHeight?(n.container.height(n.listBox.virtualSize.height+25),n.listBoxContainer.height(n.listBox.virtualSize.height),n.listBox._arrange()):(n.listBox._arrange(),n.listBox.ensureVisible(0),n.listBox._renderItems(),n.container.height(n.listBoxContainer.height()+25)),null!=n.searchString&&n.searchString.length>=n.minLength&&(e=n.listBoxContainer.jqxListBox("items"))&&0"),"top"==n.dropDownVerticalAlignment?n.dropdownlistArrowIcon.addClass(n.toThemeProperty("jqx-icon-arrow-up")):n.dropdownlistArrowIcon.addClass(n.toThemeProperty("jqx-icon-arrow-down")),n.dropdownlistArrowIcon.addClass(n.toThemeProperty("jqx-icon")),n.dropdownlistArrow.append(n.dropdownlistArrowIcon),n.dropdownlistArrow.addClass(n.toThemeProperty("jqx-combobox-arrow-normal")),n.dropdownlistArrow.addClass(n.toThemeProperty("jqx-fill-state-normal")),n.rtl?n.dropdownlistArrow.addClass(n.toThemeProperty("jqx-rc-l")):n.dropdownlistArrow.addClass(n.toThemeProperty("jqx-rc-r")),n._setSize(),n._updateHandlers(),n.addHandler(n.input,"keyup.textchange",function(e){n._writeTimer&&clearTimeout(n._writeTimer),n._writeTimer=setTimeout(function(){n._search(e);n.cinput&&n.input&&(n.displayMember?n._updateInputSelection():n.cinput[0].value=n.input[0].value)},50)}),b.jqx.browser.msie&&b.jqx.browser.version<8&&0"),this.host.append(this.cinput),e&&this.cinput.attr("name",e)},_updateInputSelection:function(){if(this.cinput){var e,i=new Array;if(-1==this.selectedIndex?this.cinput.val(""):null!=(e=this.getSelectedItem())?(this.cinput.val(e.value),i.push(e.value)):this.cinput.val(this.dropdownlistContent.text()),this.checkboxes||this.multiSelect){var t,s="";if(null!=(t=this.multiSelect?this.getSelectedItems():this.getCheckedItems()))for(var o=0;o"+document.createTextNode(n.input.val())+"")).addClass(n.toThemeProperty("jqx-widget")),b(document.body).append(t),i=t.width()+15,t.remove(),i>n.host.width()&&(i=n.host.width()),i<25&&(i=25),n.input.css("width",i+"px"),0==n.selectedItems.length?(n.input.css("width","100%"),n.isMaterialized()||n.input.attr("placeholder",n.placeHolder)):n.isMaterialized()||n.input.attr("placeholder",""),s=parseInt(this._findPos(n.host[0])[1])+parseInt(n.host.outerHeight())-1+"px",n.container.css("top",s),o=parseInt(n.host.height()),n.dropdownlistArrow.height(o)),!n.isanimating){if(e.altKey&&38==e.keyCode)return n.hideListBox("altKey"),!1;if(e.altKey&&40==e.keyCode)return n.isOpened()||n.showListBox("altKey"),!1}if(37==e.keyCode||39==e.keyCode)return!1;if(!e.altKey&&18!=e.keyCode&&!(33<=e.keyCode&&e.keyCode<=40||(e.ctrlKey||n.ctrlKey)&&88!=e.keyCode&&86!=e.keyCode)){var r,l,a,d,h,c=n.input.val();if(0==c.length&&!n.autoComplete)return n.listBox.searchString=n.input.val(),n.listBox.clearSelection(),n.hideListBox("search"),void(n.searchString=n.input.val());if(n.remoteAutoComplete){function p(){n.listBox.vScrollInstance.value=0}var n=this;c.length>=n.minLength?e.ctrlKey||e.altKey||(n.searchString!=c&&(null==n.listBoxContainer.jqxListBox("source")&&n.listBoxContainer.jqxListBox({source:n.source}),n._searchTimer&&clearTimeout(n._searchTimer),13!=e.keyCode&&27!=e.keyCode&&(n._searchTimer=setTimeout(function(){if(p(),n.autoDropDownHeight&&(n.listBox.autoHeight=!0),n.searchString=n.input.val(),null==n.search)throw"'search' function is not defined";n.search(n.input.val())},n.remoteAutoCompleteDelay))),n.searchString=c):(n._searchTimer&&clearTimeout(n._searchTimer),p(),n.searchString="",n.search(""),n.listBoxContainer.jqxListBox({source:null}))}else{if(c!==(n=this).searchString)if("27"!=e.keyCode&&"13"!=e.keyCode&&(r=n.input[0].value,a=(l=n._updateItemsVisibility(c)).matchItems,n.autoComplete&&n.autoItemsHeight&&(n.input[0].value=r),d=l.index,n.autoComplete||n.remoteAutoComplete||(!n.multiSelect||n.multiSelect&&0<=d)&&(n.listBox.selectIndex(d),n.listBox.isIndexInView(d)?n.listBox._renderItems():n.listBox.ensureVisible(d)),n.autoComplete&&0===a.length&&n.hideListBox("search")),"13"==e.keyCode){if("block"==n.container.css("display")&&!n.isanimating)return n.hideListBox("keyboard"),void(n._oldvalue=n.listBox.selectedValue)}else if("27"==e.keyCode){if("block"==n.container.css("display")&&!n.isanimating)return n.multiSelect?(n.input.val(""),n.listBox.selectedValue=null):(h=n.listBox.getVisibleItem(n._oldvalue))?(n=this,setTimeout(function(){n.autoComplete&&n._updateItemsVisibility(""),n.listBox.selectIndex(h.index),n.renderSelection("api")},n.closeDelay)):n.clearSelection(),n.hideListBox("keyboard"),n.renderSelection("api"),e.preventDefault(),!1}else n.isOpened()||n.opening||e.ctrlKey||n.listBox.visibleItems&&0=i&&e.pageY<=i+a.host.height()+2&&e.pageX>=s&&e.pageX=r&&e.pageY<=r+a.container.height()-20&&e.pageX>=n&&e.pageX");null!=i.label&&null!=i.label&&0l&&n>this.host.width()&&(s=this.host.coord().left,o=n-this.host.width(),t.left=s-o+2),t.left<0&&(t.left=parseInt(this.host.coord().left)+"px"),t.top-=Math.min(t.top,t.top+r>a&&rthis.host.width()?this.container.css("left",25+parseInt(Math.round(a))-p+"px"):this.container.css("left",25+parseInt(Math.round(a))+p+"px")),"top"==this.dropDownVerticalAlignment&&(u=n.height(),f=!0,n.css("top",23),n.addClass(this.toThemeProperty("jqx-popup-up")),m=parseInt(this.host.outerHeight()),x=parseInt(l)-Math.abs(u+m+23),this.container.css("top",x)),this.enableBrowserBoundsDetection&&(g=this.testOffset(n,{left:parseInt(this.container.css("left")),top:parseInt(l)},parseInt(this.host.outerHeight())),parseInt(this.container.css("top"))!=g.top?(f=!0,n.css("top",23),n.addClass(this.toThemeProperty("jqx-popup-up"))):n.css("top",0),this.container.css("top",g.top),this.container.css("top",g.top),parseInt(this.container.css("left"))!=g.left&&this.container.css("left",g.left)),"none"==this.animationType||"transform"===this.animationType?(this.container.css("display","block"),b.data(document.body,"openedCombojqxListBoxParent",o),b.data(document.body,"openedCombojqxListBox"+o.element.id,n),n.css("margin-top",0),n.css("opacity",1)):(this.container.css("display","block"),w=n.outerHeight(),n.stop(),"fade"==this.animationType?(n.css("margin-top",0),n.css("opacity",0),n.animate({opacity:1},this.openDelay,function(){o.isanimating=!1,o.opening=!1,b.data(document.body,"openedCombojqxListBoxParent",o),b.data(document.body,"openedCombojqxListBox"+o.element.id,n)})):(n.css("opacity",1),f?n.css("margin-top",w):n.css("margin-top",-w),this.isanimating=!0,this.opening=!0,n.animate({"margin-top":0},this.openDelay,function(){o.isanimating=!1,o.opening=!1,b.data(document.body,"openedCombojqxListBoxParent",o),b.data(document.body,"openedCombojqxListBox"+o.element.id,n)}))),r._renderItems(),f?(this.host.addClass(this.toThemeProperty("jqx-rc-t-expanded")),n.addClass(this.toThemeProperty("jqx-rc-b-expanded")),this.dropdownlistArrow.addClass(this.toThemeProperty("jqx-rc-t-expanded"))):(this.host.addClass(this.toThemeProperty("jqx-rc-b-expanded")),n.addClass(this.toThemeProperty("jqx-rc-t-expanded")),this.dropdownlistArrow.addClass(this.toThemeProperty("jqx-rc-b-expanded"))),n.addClass(this.toThemeProperty("jqx-fill-state-focus")),this._raiseEvent("0",r),n.addClass(this.toThemeProperty("jqx-popup-show"))}},doMultiSelect:function(e){this.checkboxes&&(this.multiSelect=!1);var l=this;if(!this.multiSelect){var t=l.dropdownlistContent.find(".jqx-button"),i="mousedown";if(this.touch&&(i=b.jqx.mobile.getTouchEventName("touchstart")),this.removeHandler(t,i),this.removeHandler(t.find(".jqx-icon-close"),i),t.remove(),!(n=this.listBox.items))return;for(var s=0;s');r.addClass(l.toThemeProperty("jqx-button")),r.addClass(l.toThemeProperty("jqx-combobox-multi-item")),r.addClass(l.toThemeProperty("jqx-fill-state-normal")),r.addClass(l.toThemeProperty("jqx-rc-all")),t?(i=t.label,!l.renderSelectedItem||(s=l.renderSelectedItem(e,t))&&(i=s),""==r[0].innerHTML&&(r[0].innerHTML=''+i+""),l.rtl&&(r[0].innerHTML=''+i+""),o=l.rtl?"left":"right",l.showCloseButtons&&(n='',b.jqx.browser.msie&&b.jqx.browser.version<8&&(n=''),l.rtl&&(n='',b.jqx.browser.msie&&b.jqx.browser.version<8&&(n='')),r[0].innerHTML+=n)):""==r[0].innerHTML&&(r[0].innerHTML=''),l.dropdownlistContent.append(r)}),l.dropdownlistContent.append(l.input),l.input.val(""),!1!==e&&(l.input.focus(),setTimeout(function(){l.input.focus()},10));t=l.dropdownlistContent.find(".jqx-button");!0===this.touchMode&&(i="mousedown"),this.addHandler(t,i,function(e){if(0<=e.target.className.indexOf("jqx-icon-close"))return!0;if(l.disabled)return!0;var t=b(e.target).attr("data-value");return l.getItemByValue(t)&&(l.listBox.selectedValue=null,l.listBox.clearSelection()),l.listBox.scrollTo(0,0),l.open(),e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1}),this.addHandler(t.find(".jqx-icon-close"),i,function(e){if(!l.disabled){var t=b(e.target).parent().parent().find("a").attr("data-value"),i=l.getItemByValue(t);if(i||l.remoteAutoComplete&&!i&&0<=l.selectedItems.indexOf(t)){l.listBox.selectedValue=null;var s=l.selectedItems.indexOf(t),o=i&&0<=i.index?i.index:s;if(0<=s)l.selectedItems.splice(s,1),n=(n=l._selectedItems[s])||i,l._selectedItems.splice(s,1),l._raiseEvent("3",{index:o,type:"mouse",item:n}),l._raiseEvent("4",{index:o,type:"mouse",item:n}),l.doMultiSelect();else for(var n,r=0;r