/** 
 * Kendo UI v2016.3.1118 (http://www.telerik.com/kendo-ui)                                                                                                                                              
 * Copyright 2016 Telerik AD. All rights reserved.                                                                                                                                                      
 *                                                                                                                                                                                                      
 * Kendo UI commercial licenses may be obtained at                                                                                                                                                      
 * http://www.telerik.com/purchase/license-agreement/kendo-ui-complete                                                                                                                                  
 * If you do not own a commercial license, this file shall be governed by the trial license terms.                                                                                                      
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       

*/
!function(e,define){define("kendo.combobox.min",["kendo.list.min","kendo.mobile.scroller.min"],e)}(function(){return function(e,t){var i=window.kendo,s=i.ui,n=s.List,a=s.Select,o=i.caret,l=i.support,r=l.placeholder,u=i._activeElement,c=i.keys,p=".kendoComboBox",d="click"+p,_="mousedown"+p,h="disabled",f="readonly",g="change",v="k-state-default",m="k-state-focused",x="k-state-disabled",w="aria-disabled",b="filter",y="accept",I="rebind",k="mouseenter"+p+" mouseleave"+p,V=e.proxy,C=a.extend({init:function(t,s){var n,o,l=this;l.ns=p,s=e.isArray(s)?{dataSource:s}:s,a.fn.init.call(l,t,s),s=l.options,t=l.element.on("focus"+p,V(l._focusHandler,l)),s.placeholder=s.placeholder||t.attr("placeholder"),l._reset(),l._wrapper(),l._input(),l._clearButton(),l._tabindex(l.input),l._popup(),l._dataSource(),l._ignoreCase(),l._enable(),l._oldIndex=l.selectedIndex=-1,l._aria(),l._initialIndex=s.index,l.requireValueMapper(l.options),l._initList(),l._cascade(),s.autoBind?l._filterSource():(n=s.text,!n&&l._isSelect&&(n=t.children(":selected").text()),n&&l._setText(n)),n||l._placeholder(),o=e(l.element).parents("fieldset").is(":disabled"),o&&l.enable(!1),i.notify(l)},options:{name:"ComboBox",enabled:!0,index:-1,text:null,value:null,autoBind:!0,delay:200,dataTextField:"",dataValueField:"",minLength:1,enforceMinLength:!1,height:200,highlightFirst:!0,filter:"none",placeholder:"",suggest:!1,cascadeFrom:"",cascadeFromField:"",ignoreCase:!0,animation:{},virtual:!1,template:null,groupTemplate:"#:data#",fixedGroupTemplate:"#:data#",clearButton:!0},events:["open","close",g,"select","filtering","dataBinding","dataBound","cascade","set"],setOptions:function(e){a.fn.setOptions.call(this,e),this.listView.setOptions(e),this._accessors(),this._aria()},destroy:function(){var e=this;e.input.off(p),e.element.off(p),e._inputWrapper.off(p),clearTimeout(e._pasteTimeout),e._arrow.off(d+" "+_),e._clear.off(d+" "+_),a.fn.destroy.call(e)},_focusHandler:function(){this.input.focus()},_arrowClick:function(){this._toggle()},_inputFocus:function(){this._inputWrapper.addClass(m),this._placeholder(!1)},_inputFocusout:function(){var e,i,s=this,n=s.value();return s._inputWrapper.removeClass(m),clearTimeout(s._typingTimeout),s._typingTimeout=null,s.text(s.text()),e=s._focus(),i=this.listView.dataItemByIndex(this.listView.getElementIndex(e)),n!==s.value()&&s.trigger("select",{dataItem:i,item:e})?(s.value(n),t):(s._placeholder(),s._blur(),s.element.blur(),t)},_inputPaste:function(){var e=this;clearTimeout(e._pasteTimeout),e._pasteTimeout=null,e._pasteTimeout=setTimeout(function(){e.search()})},_editable:function(e){var t=this,i=e.disable,s=e.readonly,n=t._inputWrapper.off(p),a=t.element.add(t.input.off(p)),o=t._arrow.off(d+" "+_),l=t._clear;s||i?(n.addClass(i?x:v).removeClass(i?v:x),a.attr(h,i).attr(f,s).attr(w,i)):(n.addClass(v).removeClass(x).on(k,t._toggleHover),a.removeAttr(h).removeAttr(f).attr(w,!1),o.on(d,V(t._arrowClick,t)).on(_,function(e){e.preventDefault()}),l.on(d,V(t._clearValue,t)).on(_,function(e){e.preventDefault()}),t.input.on("keydown"+p,V(t._keydown,t)).on("focus"+p,V(t._inputFocus,t)).on("focusout"+p,V(t._inputFocusout,t)).on("paste"+p,V(t._inputPaste,t)))},open:function(){var e=this,t=e._state;e.popup.visible()||(!e.listView.bound()&&t!==b||t===y?(e._open=!0,e._state=I,1!==e.options.minLength?(e.refresh(),e._openPopup()):e._filterSource()):e._allowOpening()&&(e._openPopup(),e._focusItem()))},_scrollToFocusedItem:function(){var e=this.listView;e.scrollToIndex(e.getElementIndex(e.focus()))},_openPopup:function(){this.popup.one("activate",V(this._scrollToFocusedItem,this)),this.popup.open()},_updateSelectionState:function(){var e=this,i=e.options.text,s=e.options.value;e.listView.isFiltered()||(e.selectedIndex===-1?(i!==t&&null!==i||(i=s),e._accessor(s),e.input.val(i||e.input.val()),e._placeholder()):e._oldIndex===-1&&(e._oldIndex=e.selectedIndex))},_buildOptions:function(e){var i,s=this;s._isSelect&&(i=s._customOption,s._state===I&&(s._state=""),s._customOption=t,s._options(e,"",s.value()),i&&i[0].selected&&s._custom(i.val()))},_updateSelection:function(){var i,s=this,n=s.listView,a=s._initialIndex,o=null!==a&&a>-1,l=s._state===b;return l?(e(n.focus()).removeClass("k-state-selected"),t):(s._fetch||(n.value().length||(o?s.select(a):s._accessor()&&n.value(s._accessor())),s._initialIndex=null,i=n.selectedDataItems()[0],i&&(s._value(i)!==s.value()&&s._custom(s._value(i)),s.text()&&s.text()!==s._text(i)&&s._selectValue(i))),t)},_updateItemFocus:function(){var e=this.listView;this.options.highlightFirst?e.focus()||e.focusIndex()||e.focus(0):e.focus(-1)},_listBound:function(){var e=this,i=e.input[0]===u(),s=e.dataSource.flatView(),n=e.listView.skip(),a=n===t||0===n;e._presetValue=!1,e._renderFooter(),e._renderNoData(),e._toggleNoData(!s.length),e._resizePopup(),e.popup.position(),e._buildOptions(s),e._makeUnselectable(),e._updateSelection(),s.length&&a&&(e._updateItemFocus(),e.options.suggest&&i&&e.input.val()&&e.suggest(s[0])),e._open&&(e._open=!1,e._typingTimeout&&!i?e.popup.close():e.toggle(e._allowOpening()),e._typingTimeout=null),e._hideBusy(),e.trigger("dataBound")},_listChange:function(){this._selectValue(this.listView.selectedDataItems()[0]),this._presetValue&&(this._oldIndex=this.selectedIndex)},_get:function(e){var t,i,s;if("function"==typeof e){for(t=this.dataSource.flatView(),s=0;s<t.length;s++)if(e(t[s])){e=s,i=!0;break}i||(e=-1)}return e},_select:function(e,t){var i=this;return e=i._get(e),e===-1&&(i.input[0].value="",i._accessor("")),i.listView.select(e).done(function(){t||i._state!==b||(i._state=y)})},_selectValue:function(e){var i=this.listView.select(),s="",n="";i=i[i.length-1],i===t&&(i=-1),this.selectedIndex=i,i!==-1||e?(e&&(s=this._dataValue(e),n=this._text(e)),null===s&&(s="")):(s=n=this.input[0].value,this.listView.focus(-1)),this._prev=this.input[0].value=n,this._accessor(s!==t?s:n,i),this._placeholder(),this._triggerCascade()},refresh:function(){this.listView.refresh()},suggest:function(e){var i,s=this,a=s.input[0],l=s.text(),r=o(a)[0],p=s._last;return p==c.BACKSPACE||p==c.DELETE?(s._last=t,t):(e=e||"","string"!=typeof e&&(e[0]&&(e=s.dataSource.view()[n.inArray(e[0],s.ul[0])]),e=e?s._text(e):""),r<=0&&(r=l.toLowerCase().indexOf(e.toLowerCase())+1),e?(e=""+e,i=e.toLowerCase().indexOf(l.toLowerCase()),i>-1&&(l+=e.substring(i+l.length))):l=l.substring(0,r),l.length===r&&e||(a.value=l,a===u()&&o(a,r,l.length)),t)},text:function(e){var i,s,a,o,l,r;return e=null===e?"":e,i=this,s=i.input[0],a=i.options.ignoreCase,o=e,e===t?s.value:i.options.autoBind!==!1||i.listView.bound()?(l=i.dataItem(),l&&i._text(l)===e&&(r=i._value(l),r===n.unifyType(i._old,typeof r))?(i._triggerCascade(),t):(a&&(o=o.toLowerCase()),i._select(function(e){return e=i._text(e),a&&(e=(e+"").toLowerCase()),e===o}).done(function(){i.selectedIndex<0&&(i._accessor(e),s.value=e,i._triggerCascade()),i._prev=s.value}),t)):(i._setText(e),t)},toggle:function(e){this._toggle(e,!0)},value:function(e){var i=this,s=i.options,n=i.listView;return e===t?(e=i._accessor()||i.listView.value()[0],e===t||null===e?"":e):(i.requireValueMapper(i.options,e),i.trigger("set",{value:e}),e===s.value&&i.input.val()===s.text||(i._accessor(e),i._isFilterEnabled()&&n.bound()&&n.isFiltered()?i._clearFilter():i._fetchData(),n.value(e).done(function(){i.selectedIndex===-1&&(i._accessor(e),i.input.val(e),i._placeholder(!0)),i._old=i._accessor(),i._oldIndex=i.selectedIndex,i._prev=i.input.val(),i._state===b&&(i._state=y)})),t)},_click:function(e){var i=this,s=e.item,n=i.listView.dataItemByIndex(i.listView.getElementIndex(s));return e.preventDefault(),i.trigger("select",{dataItem:n,item:s})?(i.close(),t):(i._userTriggered=!0,i._select(s).done(function(){i._blur()}),t)},_inputValue:function(){return this.text()},_searchByWord:function(e){var i,s=this,n=s.options,a=s.dataSource,o=n.ignoreCase,l=function(i){var n=s._text(i);if(n!==t)return n+="",(""===n||""!==e)&&(o&&(n=n.toLowerCase()),0===n.indexOf(e))};return o&&(e=e.toLowerCase()),s.ul[0].firstChild?(this.listView.focus(this._get(l)),i=this.listView.focus(),i&&(n.suggest&&s.suggest(i),this.open()),this.options.highlightFirst&&!e&&this.listView.focusFirst(),t):(a.one(g,function(){a.view()[0]&&s.search(e)}).fetch(),t)},_input:function(){var t,i,s=this,n=s.element.removeClass("k-input")[0],a=n.accessKey,o=s.wrapper,l="input.k-input",u=n.name||"";u&&(u='name="'+u+'_input" '),t=o.find(l),t[0]||(o.append('<span tabindex="-1" unselectable="on" class="k-dropdown-wrap k-state-default"><input '+u+'class="k-input" type="text" autocomplete="off"/><span unselectable="on" class="k-select" aria-label="select"><span class="k-icon k-i-arrow-s"></span></span></span>').append(s.element),t=o.find(l)),t[0].style.cssText=n.style.cssText,t[0].title=n.title,i=parseInt(this.element.prop("maxlength")||this.element.attr("maxlength"),10),i>-1&&(t[0].maxLength=i),t.addClass(n.className).css({width:"100%",height:n.style.height}).attr({role:"combobox","aria-expanded":!1}).show(),r&&t.attr("placeholder",s.options.placeholder),a&&(n.accessKey="",t[0].accessKey=a),s._focused=s.input=t,s._inputWrapper=e(o[0].firstChild),s._arrow=o.find(".k-select").attr({role:"button",tabIndex:-1}),n.id&&s._arrow.attr("aria-controls",s.ul[0].id)},_clearButton:function(){this._clear=e('<span unselectable="on" class="k-icon k-i-close" title="clear"></span>').attr({role:"button",tabIndex:-1}),this.options.clearButton&&(this._clear.insertAfter(this.input),this.wrapper.addClass("k-combobox-clearable"))},_keydown:function(e){var t=this,i=e.keyCode;t._last=i,clearTimeout(t._typingTimeout),t._typingTimeout=null,i==c.TAB||t._move(e)||t._search()},_placeholder:function(e){if(!r){var i,s=this,n=s.input,a=s.options.placeholder;if(a){if(i=s.value(),e===t&&(e=!i),n.toggleClass("k-readonly",e),!e){if(i)return;a=""}n.val(a),a||n[0]!==u()||o(n[0],0,0)}}},_search:function(){var e=this;e._typingTimeout=setTimeout(function(){var t=e.text();e._prev!==t&&(e._prev=t,"none"===e.options.filter&&e.listView.select(-1),e.search(t)),e._typingTimeout=null},e.options.delay)},_setText:function(e){this.input.val(e),this._prev=e},_wrapper:function(){var e=this,t=e.element,i=t.parent();i.is("span.k-widget")||(i=t.hide().wrap("<span />").parent(),i[0].style.cssText=t[0].style.cssText),e.wrapper=i.addClass("k-widget k-combobox k-header").addClass(t[0].className).css("display","")},_clearSelection:function(e,t){var i=this,s=e.value(),n=s&&e.selectedIndex===-1;this.selectedIndex==-1&&this.value()||(t||!s||n)&&(i.options.value="",i.value(""))},_preselect:function(e,t){this.input.val(t),this._accessor(e),this._old=this._accessor(),this._oldIndex=this.selectedIndex,this.listView.setValue(e),this._placeholder(),this._initialIndex=null,this._presetValue=!0}});s.plugin(C)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()});
//# sourceMappingURL=kendo.combobox.min.js.map
