text: !function(n){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self);t.Select3=n()}}(function(){return function n(t,i,r){function u(f,o){var h,c,s;if(!i[f]){if(!t[f]){if(h=typeof require=="function"&&require,!o&&h)return h(f,!0);if(e)return e(f,!0);c=new Error("Cannot find module '"+f+"'");throw c.code="MODULE_NOT_FOUND",c;}s=i[f]={exports:{}};t[f][0].call(s.exports,function(n){var i=t[f][1][n];return u(i?i:n)},s,s.exports,n,t,i,r)}return i[f].exports}for(var e=typeof require=="function"&&require,f=0;f<r.length;f++)u(r[f]);return u}({1:[function(n,t){n(4);n(5);n(6);n(8);n(9);n(10);n(11);n(12);n(13);n(14);n(15);n(16);n(17);n(18);t.exports=n(7)},{}],2:[function(n,t){"use strict";
  /**
   * @license
   * lodash 3.3.1 (Custom Build) <https://lodash.com/>
   * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
   * Based on Underscore.js 1.8.2 <http://underscorejs.org/LICENSE>
   * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
   * Available under MIT license <https://lodash.com/license>
   */
  function r(n,t){function s(){var c=t-(i()-o),l;c<=0||c>t?(l=f,r=f=undefined,l&&(h=i(),e=n.apply(null,u),r||(u=null))):r=setTimeout(s,c)}function c(){return u=arguments,o=i(),f=!0,r||(r=setTimeout(s,t)),e}var u,e,o,r,f,h=0;return t=t<0?0:+t||0,c}var i=Date.now;t.exports=r},{}],3:[function(n,t){"use strict";
  /**
   * @license
   * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
   * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
   * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
   * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
   * Available under MIT license <http://lodash.com/license>
   */
  function r(n){return i[n]}function f(n){return n?String(n).replace(u,r):""}var i={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},u=new RegExp("["+Object.keys(i).join("")+"]","g");t.exports=f},{}],4:[function(n){"use strict";var t=window.jQuery||window.Zepto,r=n(2),i=n(7);n(12);i.OptionListeners.unshift(function(n,u){var f=u.ajax;if(f&&f.url){var c=f.formatError||i.Locale.ajaxError,o=f.minimumInputLength||0,s=f.params,l=f.processItem||function(n){return n},h=f.quietMillis||0,a=f.results||function(n){return{results:n,more:!1}},e=f.transport||t.ajax;h&&(e=r(e,h));u.query=function(r){var p=r.offset,u=r.term,h,v,y;u.length<o?r.error(i.Locale.needMoreCharacters(o-u.length)):(n.dropdown.showLoading(),h=f.url instanceof Function?f.url():f.url,s&&(h+=(h.indexOf("?")>-1?"&":"?")+t.param(s(u,p))),v=f.success,y=f.error,e(t.extend({},f,{url:h,success:function(n,t,i){v&&v(n,t,i);var u=a(n,p);u.results=u.results.map(l);r.callback(u)},error:function(n,t,i){y&&y(n,t,i);r.error(c(u,n,t,i),{escape:!1})}})))}}})},{}],5:[function(n){"use strict";var i=n(7),t=0;i.OptionListeners.push(function(n,i){var r=i.query;r&&(i.query=function(n){t++;var i=t,u=n.callback,f=n.error;n.callback=function(){i===t&&u.apply(null,arguments)};n.error=function(){i===t&&f.apply(null,arguments)};r(n)})})},{}],6:[function(n){"use strict";var t=window.jQuery||window.Zepto,r=n(9),u=9998,i=9999;t.extend(r.prototype,{addToDom:function(){var n=this.select3.$el;n.css({zIndex:i,position:"relative"});this.$el.appendTo(n[0].ownerDocument.body).css("zIndex",i)},removeCloseHandler:function(){this._$backdrop&&!this.parentMenu&&(this._$backdrop.remove(),this._$backdrop=null)},setupCloseHandler:function(){var n;this.parentMenu?n=this.parentMenu._$backdrop:(n=t("<div>").addClass(".select3-backdrop").css({background:"transparent",bottom:0,left:0,position:"fixed",right:0,top:0,zIndex:u}),t("body").append(n));n.on("click",this.close.bind(this));this._$backdrop=n}})},{}],7:[function(n,t){"use strict";function u(n,t){var u;return this.each(function(){var e=this.select3,o,s,f;if(e)if(r.type(n)!=="string"&&(t=n,n="setOptions"),r.type(e[n])==="function")u===undefined&&(u=e[n].call(e,t));else throw new Error("Unknown method: "+n);else if(r.type(n)==="string"){if(n!=="destroy")throw new Error("Cannot call method on element without Select3 instance");}else{if(t=r.extend({},n,{element:this}),o=r(this),o.is("select")&&o.prop("multiple")&&(t.multiple=!0),s=i.InputTypes,f=t.inputType||(t.multiple?"Multiple":"Single"),r.type(f)!=="function")if(s[f])f=s[f];else throw new Error("Unknown Select3 input type: "+f);this.select3=new f(t)}}),u===undefined?this:u}function i(n){if(!(this instanceof i))return u.apply(this,arguments);this.$el=r(n.element);this.$searchInput=null;this.dropdown=null;this.enabled=!0;this.hasTouch=typeof window!="undefined"&&"ontouchstart"in window;this.hasKeyboard=!this.hasTouch;this.items=null;this.matcher=i.matcher;this.options={};this.results=[];this.searchInputListeners=i.SearchInputListeners;this.templates=r.extend({},i.Templates);this.term="";this.setOptions(n);n.value?this.value(n.value,{triggerChange:!1}):this.data(n.data||null,{triggerChange:!1});this._events=[];this.$el.on("select3-close",this._closed.bind(this));this.delegateEvents()}var r=window.jQuery||window.Zepto;r.extend(i.prototype,{$:function(n){return this.$el.find(n)},close:function(){this.dropdown&&this.dropdown.close()},data:function(n,t){if(t=t||{},n===undefined)return this._data;n=this.validateData(n);this._data=n;this._value=this.getValueForData(n);t.triggerChange!==!1&&this.triggerChange()},delegateEvents:function(){this.undelegateEvents();r.each(this.events,function(n,t){var i,u=n.indexOf(" ");if(u>-1&&(i=n.slice(u+1),n=n.slice(0,u)),r.type(t)==="string"&&(t=this[t]),t=t.bind(this),i)this.$el.on(n,i,t);else this.$el.on(n,t);this._events.push({event:n,selector:i,listener:t})}.bind(this))},destroy:function(){this.undelegateEvents();var n=this.$el;n.children().remove();n[0].select3=null;n=null},filterResults:function(n){return n},focus:function(){this.$searchInput&&this.$searchInput.focus()},getItemForId:function(n){var t=this.items;return t?i.findNestedById(t,n):{id:n,text:""+n}},initSearchInput:function(n){this.$searchInput=n;this.searchInputListeners.forEach(function(t){t(this,n)}.bind(this));n.on("keyup",function(n){n.isDefaultPrevented()||this.search()}.bind(this))},loadMore:function(){this.options.query({callback:function(n){if(n&&n.results)this._addResults(i.processItems(n.results),{hasMore:!!n.more});else throw new Error("callback must be passed a response object");}.bind(this),error:this._addResults.bind(this,[]),offset:this.results.length,select3:this,term:this.term})},open:function(n){if(n=n||{},!this.dropdown&&this.triggerEvent("select3-opening")){var t=this.options.dropdown||i.Dropdown;t&&(this.dropdown=new t({position:this.options.positionDropdown,select3:this,showSearchInput:n.showSearchInput}));this.search("")}},positionDropdown:function(){this.dropdown&&this.dropdown.position()},search:function(n){function u(i,u){t._setResults(i,r.extend({term:n},u))}var t=this,f;if(n===undefined){if(!t.$searchInput)return;n=t.$searchInput.val()}t.items?(n=i.transformText(n),f=t.matcher,u(t.items.map(function(t){return f(t,n)}).filter(function(n){return!!n}))):t.options.query&&t.options.query({callback:function(n){if(n&&n.results)u(i.processItems(n.results),{hasMore:!!n.more});else throw new Error("callback must be passed a response object");},error:t._showError.bind(t),offset:0,select3:t,term:n});t.term=n},setOptions:function(n){n=n||{};i.OptionListeners.forEach(function(t){t(this,n)}.bind(this));r.extend(this.options,n);var t=r.extend({closeOnSelect:"boolean",dropdown:"function|null",initSelection:"function|null",matcher:"function|null",placeholder:"string",positionDropdown:"function|null",query:"function|null",readOnly:"boolean",removeOnly:"boolean",searchInputListeners:"array"},n.allowedTypes);r.each(n,function(n,u){var f=t[n];if(f&&!f.split("|").some(function(n){return r.type(u)===n}))throw new Error(n+" must be of type "+f);switch(n){case"items":this.items=u===null?u:i.processItems(u);break;case"matcher":this.matcher=u;break;case"searchInputListeners":this.searchInputListeners=u;break;case"templates":r.extend(this.templates,u)}}.bind(this));this.enabled=!this.options.readOnly&&!this.options.removeOnly},template:function(n,t){var i=this.templates[n];if(i)return r.type(i)==="function"?i(t):i.render?i.render(t):i.toString();throw new Error("Unknown template: "+n);},triggerChange:function(n){this.triggerEvent("change",r.extend({value:this._value},n))},triggerEvent:function(n,t){var i=r.Event(n,t||{});return this.$el.trigger(i),!i.isDefaultPrevented()},undelegateEvents:function(){this._events.forEach(function(n){n.selector?this.$el.off(n.event,n.selector,n.listener):this.$el.off(n.event,n.listener)},this);this._events=[]},val:function(n){return this.value(n)},validateItem:function(n){if(n&&i.isValidId(n.id)&&r.type(n.text)==="string")return n;throw new Error("Item should have id (number or string) and text (string) properties");},value:function(n,t){if(t=t||{},n===undefined)return this._value;n=this.validateValue(n);this._value=n;this.options.initSelection?this.options.initSelection(n,function(i){this._value===n&&(this._data=this.validateData(i),t.triggerChange!==!1&&this.triggerChange())}.bind(this)):(this._data=this.getDataForValue(n),t.triggerChange!==!1&&this.triggerChange())},_addResults:function(n,t){this.results=this.results.concat(n);this.dropdown&&this.dropdown.showResults(this.filterResults(n),r.extend({add:!0},t))},_closed:function(){this.dropdown=null},_getItemId:function(n){var u,t;return u=n.target?r(n.target).closest("[data-item-id]"):n.length?n:r(n),t=u.data("item-id"),r.type(t)==="string"?t:i.findById(this._data||[],t)||i.findNestedById(this.results,t)?t:""+t},_setResults:function(n,t){this.results=n;this.dropdown&&this.dropdown.showResults(this.filterResults(n),t||{})},_showError:function(n,t){this.results=[];this.dropdown&&this.dropdown.showError(n,t)}});i.Dropdown=null;i.InputTypes={};i.OptionListeners=[];i.SearchInputListeners=[];i.Templates={};i.findById=function(n,t){var r=i.findIndexById(n,t);return r>-1?n[r]:null};i.findIndexById=function(n,t){for(var i=0,r=n.length;i<r;i++)if(n[i].id===t)return i;return-1};i.findNestedById=function(n,t){for(var r,f,u=0,e=n.length;u<e;u++){if(r=n[u],r.id===t)return r;if(r.children&&(f=i.findNestedById(r.children,t),f))return f}return null};i.inherits=function(n,t,u){return arguments.length===2&&(u=t,t=i),n.prototype=r.extend(Object.create(t.prototype),{constructor:n},u),function(n,i){t.prototype[i].apply(n,Array.prototype.slice.call(arguments,2))}};i.isValidId=function(n){var t=r.type(n);return t==="number"||t==="string"};i.matcher=function(n,t){var r=null,u;return i.transformText(n.text).indexOf(t)>-1?r=n:n.children&&(u=n.children.map(function(n){return i.matcher(n,t)}).filter(function(n){return!!n}),u.length&&(r={id:n.id,text:n.text,children:u})),r};i.processItem=function(n){if(i.isValidId(n))return{id:n,text:""+n};if(n&&(i.isValidId(n.id)||n.children)&&r.type(n.text)==="string")return n.children&&(n.children=i.processItems(n.children)),n;throw new Error("invalid item");};i.processItems=function(n){if(r.type(n)==="array")return n.map(i.processItem);throw new Error("invalid items");};i.quoteCssAttr=function(n){return'"'+(""+n).replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'};i.transformText=function(n){return n.toLowerCase()};t.exports=r.fn.select3=i},{}],8:[function(n){"use strict";var i={"Ⓐ":"A","Ａ":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","Ｂ":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","Ｃ":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","Ｄ":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"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ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","ｂ":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","ｃ":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","ｄ":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","ǳ":"dz","ǆ":"dz","ⓔ":"e","ｅ":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","ｆ":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","ｇ":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","ｈ":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","ｉ":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","ｊ":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","ｋ":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","ｌ":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","ǉ":"lj","ⓜ":"m","ｍ":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","ｎ":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ŉ":"n","ꞑ":"n","ꞥ":"n","ǌ":"nj","ⓞ":"o","ｏ":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","ｐ":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","ｑ":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","ｒ":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","ｓ":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","ｔ":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","ｕ":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","ｖ":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","ｗ":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","ｘ":"x","ẋ":"x","ẍ":"x","ⓨ":"y","ｙ":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","ｚ":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"},t=n(7),r=t.transformText;t.transformText=function(n){for(var u,f="",t=0,e=n.length;t<e;t++)u=n[t],f+=i[u]||u;return r(f)}},{}],9:[function(n,t){"use strict";function u(n,t){for(var i=0,r=n.length;i<r;i++)if(n.eq(i).is(t))return i;return-1}function f(n){var t=n.select3;if(this.$el=r(t.template("dropdown",{dropdownCssClass:t.options.dropdownCssClass,searchInputPlaceholder:t.options.searchInputPlaceholder,showSearchInput:n.showSearchInput})),this.$results=this.$(".select3-results-container"),this.hasMore=!1,this.highlightedResult=null,this.loadMoreHighlighted=!1,this.options=n,this.results=[],this.select3=t,this._closeProxy=this.close.bind(this),t.options.closeOnSelect!==!1)t.$el.on("select3-selecting",this._closeProxy);this.addToDom();this.position();this.setupCloseHandler();this._scrolledProxy=e(this._scrolled.bind(this),50);this._suppressMouseWheel();n.showSearchInput&&(t.initSearchInput(this.$(".select3-search-input")),t.focus());this._delegateEvents();this.showLoading();this.triggerOpen()}var r=window.jQuery||window.Zepto,e=n(2),i=n(7);r.extend(f.prototype,{$:function(n){return this.$el.find(n)},addToDom:function(){this.$el.appendTo(this.select3.$el[0].ownerDocument.body)},close:function(){this.$el.remove();this.removeCloseHandler();this.select3.$el.off("select3-selecting",this._closeProxy);this.triggerClose()},events:{"click .select3-load-more":"_loadMoreClicked","click .select3-result-item":"_resultClicked","mouseenter .select3-load-more":"highlightLoadMore","mouseenter .select3-result-item":"_resultHovered"},highlight:function(n){this.loadMoreHighlighted&&this.$(".select3-load-more").removeClass("highlight");this.$(".select3-result-item").removeClass("highlight").filter("[data-item-id="+i.quoteCssAttr(n.id)+"]").addClass("highlight");this.highlightedResult=n;this.loadMoreHighlighted=!1;this.select3.triggerEvent("select3-highlight",{item:n,id:n.id})},highlightLoadMore:function(){this.$(".select3-result-item").removeClass("highlight");this.$(".select3-load-more").addClass("highlight");this.highlightedResult=null;this.loadMoreHighlighted=!0},highlightNext:function(){var f=this.results,o,r;if(f.length){var t=this.$(".select3-result-item"),n=0,e=this.highlightedResult;if(e&&(o=i.quoteCssAttr(e.id),n=u(t,"[data-item-id="+o+"]")+1,n>=t.length)){if(this.hasMore){this.highlightLoadMore();this._scrollToHighlight({alignToTop:!1});return}n=0}r=i.findNestedById(f,this.select3._getItemId(t[n]));r&&(this.highlight(r),this._scrollToHighlight({alignToTop:!1}))}},highlightPrevious:function(){var f=this.results,o,r;if(f.length){var n=this.$(".select3-result-item"),t=n.length-1,e=this.highlightedResult;if(e&&(o=i.quoteCssAttr(e.id),t=u(n,"[data-item-id="+o+"]")-1,t<0)){if(this.hasMore){this.highlightLoadMore();this._scrollToHighlight({alignToTop:!0});return}t=n.length-1}r=i.findNestedById(f,this.select3._getItemId(n[t]));r&&(this.highlight(r),this._scrollToHighlight({alignToTop:!0}))}},position:function(){var n=this.options.position;n&&n(this.$el,this.select3.$el);this._scrolled()},removeCloseHandler:function(){r("body").off("click",this._closeProxy)},renderItems:function(n){var t=this.select3;return n.map(function(n){var i=t.template(n.id?"resultItem":"resultLabel",n);return n.children&&(i+=t.template("resultChildren",{childrenHtml:this.renderItems(n.children)})),i},this).join("")},selectHighlight:function(){this.highlightedResult?this.selectItem(this.highlightedResult.id):this.loadMoreHighlighted&&this._loadMoreClicked()},selectItem:function(n){var t=this.select3,u=i.findNestedById(t.results,n),r;u&&(r={id:n,item:u},t.triggerEvent("select3-selecting",r)&&t.triggerEvent("select3-selected",r))},setupCloseHandler:function(){r("body").on("click",this._closeProxy)},showError:function(n,t){t=t||{};this.$results.html(this.select3.template("error",{escape:t.escape!==!1,message:n}));this.hasMore=!1;this.results=[];this.highlightedResult=null;this.loadMoreHighlighted=!1;this.position()},showLoading:function(){this.$results.html(this.select3.template("loading"));this.hasMore=!1;this.results=[];this.highlightedResult=null;this.loadMoreHighlighted=!1;this.position()},showResults:function(n,t){var i=this.renderItems(n);t.hasMore?i+=this.select3.template("loadMore"):i||t.add||(i=this.select3.template("noResults",{term:t.term}));t.add?(this.$(".select3-loading").replaceWith(i),this.results=this.results.concat(n)):(this.$results.html(i),this.results=n);this.hasMore=t.hasMore;(!t.add||this.loadMoreHighlighted)&&this._highlightFirstItem(n);this.position()},triggerClose:function(){this.select3.$el.trigger("select3-close")},triggerOpen:function(){this.select3.$el.trigger("select3-open")},_delegateEvents:function(){r.each(this.events,function(n,t){var i=n.indexOf(" "),u=n.slice(i+1);n=n.slice(0,i);r.type(t)==="string"&&(t=this[t]);t=t.bind(this);this.$el.on(n,u,t)}.bind(this));this.$results.on("scroll touchmove touchend",this._scrolledProxy)},_highlightFirstItem:function(n){function t(n){for(var i,u,r=0,f=n.length;r<f;r++){if(i=n[r],i.id)return i;if(i.children&&(u=t(i.children),u))return u}}var i=t(n);i?this.highlight(i):(this.highlightedResult=null,this.loadMoreHighlighted=!1)},_loadMoreClicked:function(){return this.$(".select3-load-more").replaceWith(this.select3.template("loading")),this.select3.loadMore(),this.select3.focus(),!1},_resultClicked:function(n){return this.selectItem(this.select3._getItemId(n)),!1},_resultHovered:function(n){var r=this.select3._getItemId(n),t=i.findNestedById(this.results,r);t&&this.highlight(t)},_scrolled:function(){var n=this.$(".select3-load-more");n.length&&n[0].offsetTop-this.$results[0].scrollTop<this.$el.height()&&this._loadMoreClicked()},_scrollToHighlight:function(n){var t,f,r,u;if(this.highlightedResult)f=i.quoteCssAttr(this.highlightedResult.id),t=this.$(".select3-result-item[data-item-id="+f+"]")[0];else if(this.loadMoreHighlighted)t=this.$(".select3-load-more")[0];else return;r=t.getBoundingClientRect();u=this.$results[0].getBoundingClientRect();(r.top<u.top||r.bottom>u.bottom)&&t.scrollIntoView(n.alignToTop)},_suppressMouseWheel:function(){var n=this.select3.options.suppressMouseWheelSelector,t;if(n!==null){t=n||".select3-results-container";this.$el.on("DOMMouseScroll mousewheel",t,function(n){function s(){return n.stopPropagation(),n.preventDefault(),n.returnValue=!1,!1}var t=r(this),u=this.scrollTop,f=this.scrollHeight,h=t.height(),e=n.originalEvent,i=n.type==="DOMMouseScroll"?e.detail*-40:e.wheelDelta,o=i>0;return!o&&-i>f-h-u?(t.scrollTop(f),s()):o&&i>u?(t.scrollTop(0),s()):void 0})}}});t.exports=i.Dropdown=f},{}],10:[function(n,t){"use strict";function i(n){var t=n.indexOf("@"),i=n.lastIndexOf("."),r=n.indexOf(" ");return t>0&&i>t+1&&i<n.length-2&&r===-1}function r(n,t){t=t===undefined?n.length:t;for(var i=t-1;i>=0;i--)if(/\s/.test(n[i]))return n.slice(i+1,t);return n.slice(0,t)}function f(n,t){return n.slice(0,1)===t[0]&&n.slice(-1)===t[1]?n.slice(1,-1).trim():n.trim()}function e(n){var t=r(n),u=n.slice(0,-t.length).trim();return i(t)?(t=f(f(t,"()"),"<>"),u=f(u,'""').trim()||t,{id:t,text:u}):n.trim()?{id:n,text:n}:null}function l(n,t,f){function h(n){var t,u,f;if(n)for(t=0,u=n.length;t<u;t++){f=n[t];switch(f){case";":case",":case"\n":return!0;case" ":case"\t":if(i(r(n,t)))return!0;break;case'"':do t++;while(t<u&&n[t]!=='"');break;default:continue}}return!1}function c(n){for(var f,t=0,u=n.length;t<u;t++){f=n[t];switch(f){case";":case",":case"\n":return{term:n.slice(0,t),input:n.slice(t+1)};case" ":case"\t":if(i(r(n,t)))return{term:n.slice(0,t),input:n.slice(t+1)};break;case'"':do t++;while(t<u&&n[t]!=='"');break;default:continue}}return{}}for(var s,o;h(n);)s=c(n),s.term&&(o=e(s.term),!o||o.id&&u.findById(t,o.id)||f(o)),n=s.input;return n}function s(n){o.call(this,n)}var c=window.jQuery||window.Zepto,u=n(7),o=n(13),h=u.inherits(s,o,{initSearchInput:function(n){h(this,"initSearchInput",n);n.on("blur",function(){var t=n.val();i(r(t))&&this.add(e(t))}.bind(this))},setOptions:function(n){n=c.extend({createTokenItem:e,showDropdown:!1,tokenizer:l},n);h(this,"setOptions",n)}});t.exports=u.InputTypes.Email=s},{}],11:[function(n){"use strict";function e(n,r){function e(r){var u=n.dropdown;u&&(r.keyCode===t?u.highlightNext():r.keyCode===i&&u.highlightPrevious())}function o(r){function e(){n.options.showDropdown!==!1&&n.open()}var o=n.dropdown;r.keyCode!==u||r.ctrlKey?r.keyCode===f?(n.close(),r.preventDefault()):r.keyCode===t||r.keyCode===i?(e(),r.preventDefault()):e():(o?o.selectHighlight():n.options.showDropdown!==!1&&e(),r.preventDefault())}r.on("keydown",e).on("keyup",o)}var r=n(7),t=40,u=13,f=27,i=38;r.SearchInputListeners.push(e)},{}],12:[function(n){"use strict";var t=n(3),i=n(7);i.Locale={ajaxError:function(n){return"Failed to fetch results for <b>"+t(n)+"<\/b>"},loading:"Loading...",loadMore:"Load more...",needMoreCharacters:function(n){return"Enter "+n+" more characters to search"},noResults:"No results found",noResultsForTerm:function(n){return"No results for <b>"+t(n)+"<\/b>"}}},{}],13:[function(n,t){"use strict";function u(n){i.call(this,n);this.$el.html(this.template("multipleSelectInput",{enabled:this.enabled}));this._highlightedItemId=null;this.initSearchInput(this.$(".select3-multiple-input:not(.select3-width-detector)"));this._rerenderSelection();n.positionDropdown||(this.options.positionDropdown=function(n,t){var i=t.offset(),u=n.height(),f=t.height(),e=t[0].getBoundingClientRect().top+f+u;n.css({left:i.left+"px",top:i.top+(typeof window!="undefined"&&e>r(window).height()?-u:f)+"px"}).width(t.width())})}var r=window.jQuery||window.Zepto,i=n(7),e=8,o=46,s=13,f=i.inherits(u,{add:function(n){var r=i.isValidId(n),t=r?n:this.validateItem(n)&&n.id;this._value.indexOf(t)===-1&&(this._value.push(t),r&&this.options.initSelection?this.options.initSelection([t],function(i){this._value.indexOf(t)>-1&&(n=this.validateItem(i[0]),this._data.push(n),this.triggerChange({added:n}))}.bind(this)):(r&&(n=this.getItemForId(t)),this._data.push(n),this.triggerChange({added:n})));this.$searchInput.val("")},events:{change:"_rerenderSelection","change .select3-multiple-input":function(){return!1},click:"_clicked","click .select3-multiple-selected-item":"_itemClicked","keydown .select3-multiple-input":"_keyHeld","keyup .select3-multiple-input":"_keyReleased","paste .select3-multiple-input":"_onPaste","select3-selected":"_resultSelected"},filterResults:function(n){return n.filter(function(n){return!i.findById(this._data,n.id)},this)},getDataForValue:function(n){return n.map(this.getItemForId.bind(this)).filter(function(n){return!!n})},getValueForData:function(n){return n.map(function(n){return n.id})},remove:function(n){var u=r.type(n)==="object"?n.id:n,f,t=i.findIndexById(this._data,u);t>-1&&(f=this._data[t],this._data.splice(t,1));this._value[t]!==u&&(t=this._value.indexOf(u));t>-1&&this._value.splice(t,1);f&&this.triggerChange({removed:f});u===this._highlightedItemId&&(this._highlightedItemId=null)},search:function(){var n=this.$searchInput.val();this.options.tokenizer&&(n=this.options.tokenizer(n,this._data,this.add.bind(this),this.options),r.type(n)==="string"?this.$searchInput.val(n):n="");this.dropdown&&f(this,"search")},setOptions:function(n){n=n||{};var t="backspaceHighlightsBeforeDelete";n[t]===undefined&&(n[t]=this.hasTouch);n.allowedTypes=n.allowedTypes||{};n.allowedTypes[t]="boolean";f(this,"setOptions",n)},validateData:function(n){if(n===null)return[];if(r.type(n)==="array")return n.map(this.validateItem.bind(this));throw new Error("Data for MultiSelect3 instance should be array");},validateValue:function(n){if(n===null)return[];if(r.type(n)==="array"){if(n.every(i.isValidId))return n;throw new Error("Value contains invalid IDs");}else throw new Error("Value for MultiSelect3 instance should be an array");},_backspacePressed:function(){this.options.backspaceHighlightsBeforeDelete?this._highlightedItemId?this._deletePressed():this._value.length&&this._highlightItem(this._value.slice(-1)[0]):this._value.length&&this.remove(this._value.slice(-1)[0])},_clicked:function(){if(this.enabled)return this.focus(),this._open(),!1},_createToken:function(){var t=this.$searchInput.val(),i=this.options.createTokenItem,n;t&&i&&(n=i(t),n&&this.add(n))},_deletePressed:function(){this._highlightedItemId&&this.remove(this._highlightedItemId)},_highlightItem:function(n){this._highlightedItemId=n;this.$(".select3-multiple-selected-item").removeClass("highlighted").filter("[data-item-id="+i.quoteCssAttr(n)+"]").addClass("highlighted");this.hasKeyboard&&this.focus()},_itemClicked:function(n){this.enabled&&this._highlightItem(this._getItemId(n))},_itemRemoveClicked:function(n){return this.remove(this._getItemId(n)),this._updateInputWidth(),!1},_keyHeld:function(){this._originalValue=this.$searchInput.val()},_keyReleased:function(n){var t=!!this._originalValue;n.keyCode!==s||n.ctrlKey?n.keyCode!==e||t?n.keyCode!==o||t||this._deletePressed():this._backspacePressed():this.options.createTokenItem&&this._createToken();this._updateInputWidth()},_onPaste:function(){setTimeout(function(){this.search();this.options.createTokenItem&&this._createToken()}.bind(this),10)},_open:function(){this.options.showDropdown!==!1&&this.open()},_renderSelectedItem:function(n){this.$searchInput.before(this.template("multipleSelectedItem",r.extend({highlighted:n.id===this._highlightedItemId,removable:!this.options.readOnly},n)));var t=i.quoteCssAttr(n.id);this.$(".select3-multiple-selected-item[data-item-id="+t+"]").find(".select3-multiple-selected-item-remove").on("click",this._itemRemoveClicked.bind(this))},_rerenderSelection:function(n){if(n=n||{},n.added)this._renderSelectedItem(n.added),this._scrollToBottom();else if(n.removed){var t=i.quoteCssAttr(n.removed.id);this.$(".select3-multiple-selected-item[data-item-id="+t+"]").remove()}else this.$(".select3-multiple-selected-item").remove(),this._data.forEach(this._renderSelectedItem,this),this._updateInputWidth();(n.added||n.removed)&&(this.dropdown&&this.dropdown.showResults(this.filterResults(this.results),{hasMore:this.dropdown.hasMore}),this.hasKeyboard&&this.focus());this.positionDropdown();this._updatePlaceholder()},_resultSelected:function(n){this._value.indexOf(n.id)===-1?this.add(n.item):this.remove(n.item)},_scrollToBottom:function(){var n=this.$(".select3-multiple-input-container");n.scrollTop(n.height())},_updateInputWidth:function(){if(this.enabled){var n=this.$searchInput,t=this.$(".select3-width-detector");t.text(n.val()||!this._data.length&&this.options.placeholder||"");n.width(t.width()+20);this.positionDropdown()}},_updatePlaceholder:function(){var n=this._data.length?"":this.options.placeholder;this.enabled?this.$searchInput.attr("placeholder",n):this.$(".select3-placeholder").text(n)}});t.exports=i.InputTypes.Multiple=u},{}],14:[function(n,t){"use strict";function u(n){i.call(this,n);this.$el.html(this.template("singleSelectInput",this.options));this._rerenderSelection();n.positionDropdown||(this.options.positionDropdown=function(n,t){var i=t.offset(),u=i.top+t.height();if(typeof window!="undefined"){var f=t[0].getBoundingClientRect(),e=n.height(),o=r(window).height();f.top+e>o&&(u=Math.max(o-e+i.top-f.top,0))}n.css({left:i.left+"px",top:u+"px"}).width(t.width())})}var r=window.jQuery||window.Zepto,i=n(7),f=i.inherits(u,{events:{change:"_rerenderSelection",click:"_clicked","select3-selected":"_resultSelected"},getDataForValue:function(n){return this.getItemForId(n)},getValueForData:function(n){return n?n.id:null},setOptions:function(n){n=n||{};n.allowedTypes=r.extend(n.allowedTypes||{},{allowClear:"boolean",showSearchInputInDropdown:"boolean"});f(this,"setOptions",n)},validateData:function(n){return n===null?n:this.validateItem(n)},validateValue:function(n){if(n===null||i.isValidId(n))return n;throw new Error("Value for SingleSelect3 instance should be a valid ID or null");},_clicked:function(){if(this.enabled)return this.dropdown?this.close():this.options.showDropdown!==!1&&this.open({showSearchInput:this.options.showSearchInputInDropdown!==!1}),!1},_itemRemoveClicked:function(){return this.data(null),!1},_rerenderSelection:function(){var n=this.$(".select3-single-result-container");if(this._data){n.html(this.template("singleSelectedItem",r.extend({removable:this.options.allowClear&&!this.options.readOnly},this._data)));n.find(".select3-single-selected-item-remove").on("click",this._itemRemoveClicked.bind(this))}else n.html(this.template("singleSelectPlaceholder",{placeholder:this.options.placeholder}))},_resultSelected:function(n){this.data(n.item);this.close()}});t.exports=i.InputTypes.Single=u},{}],15:[function(n,t){"use strict";function u(n){this.parentMenu=n.parentMenu;f.call(this,n);this._closeSubmenuTimeout=0}var i=n(7),f=n(9),r=i.inherits(u,f,{close:function(){this.options.restoreOptions&&this.select3.setOptions(this.options.restoreOptions);this.options.restoreResults&&(this.select3.results=this.options.restoreResults);this.submenu&&this.submenu.close();r(this,"close");this.parentMenu&&(this.parentMenu.submenu=null,this.parentMenu=null)},highlight:function(n){if(this.submenu){if(!this.highlightedResult||this.highlightedResult.id!==n.id){this._closeSubmenuTimeout&&clearTimeout(this._closeSubmenuTimeout);this._closeSubmenuTimeout=setTimeout(this._closeSubmenuAndHighlight.bind(this,n),100);return}}else this.parentMenu&&this.parentMenu._closeSubmenuTimeout&&(clearTimeout(this.parentMenu._closeSubmenuTimeout),this.parentMenu._closeSubmenuTimeout=0);this._doHighlight(n)},highlightNext:function(){this.submenu?this.submenu.highlightNext():r(this,"highlightNext")},highlightPrevious:function(){this.submenu?this.submenu.highlightPrevious():r(this,"highlightPrevious")},selectHighlight:function(){this.submenu?this.submenu.selectHighlight():r(this,"selectHighlight")},selectItem:function(n){var t=this.select3,r=i.findNestedById(t.results,n),u;r&&!r.submenu&&(u={id:n,item:r},t.triggerEvent("select3-selecting",u)&&t.triggerEvent("select3-selected",u))},showResults:function(n,t){this.submenu?this.submenu.showResults(n,t):r(this,"showResults",n,t)},triggerClose:function(){this.parentMenu?this.select3.$el.trigger("select3-close-submenu"):r(this,"triggerClose")},triggerOpen:function(){this.parentMenu?this.select3.$el.trigger("select3-open-submenu"):r(this,"triggerOpen")},_closeSubmenuAndHighlight:function(n){this.submenu&&this.submenu.close();this._doHighlight(n)},_doHighlight:function(n){var t,u;if(r(this,"highlight",n),n.submenu&&!this.submenu&&(t=this.select3,u=t.options.dropdown||i.Dropdown,u)){var f=i.quoteCssAttr(n.id),e=this.$(".select3-result-item[data-item-id="+f+"]"),o=this.$el;this.submenu=new u({parentMenu:this,position:n.submenu.positionDropdown||function(n){var t=e.offset(),i=o.width();n.css({left:t.left+i+"px",top:t.top+"px"}).width(i)},restoreOptions:{items:t.items,query:t.options.query||null},restoreResults:t.results,select3:t,showSearchInput:n.submenu.showSearchInput});t.setOptions({items:n.submenu.items||null,query:n.submenu.query||null});t.search("")}}});i.Dropdown=u;i.findNestedById=function(n,t){for(var r,u,f=0,e=n.length;f<e;f++)if(r=n[f],r.id===t?u=r:r.children?u=i.findNestedById(r.children,t):r.submenu&&r.submenu.items&&(u=i.findNestedById(r.submenu.items,t)),u)return u;return null};t.exports=u},{}],16:[function(n){"use strict";var t=n(3),i=n(7);n(12);i.Templates={dropdown:function(n){var r=n.dropdownCssClass?" "+n.dropdownCssClass:"",u="",i;return n.showSearchInput&&(r+=" has-search-input",i=n.searchInputPlaceholder,u='<div class="select3-search-input-container"><input class="select3-search-input"'+(i?' placeholder="'+t(i)+'"':"")+"><\/div>"),'<div class="select3-dropdown'+r+'">'+u+'<div class="select3-results-container"><\/div><\/div>'},error:function(n){return'<div class="select3-error">'+(n.escape?t(n.message):n.message)+"<\/div>"},loading:function(){return'<div class="select3-loading">'+i.Locale.loading+"<\/div>"},loadMore:function(){return'<div class="select3-load-more">'+i.Locale.loadMore+"<\/div>"},multipleSelectInput:function(n){return'<div class="select3-multiple-input-container">'+(n.enabled?'<input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" class="select3-multiple-input"><span class="select3-multiple-input select3-width-detector"><\/span>':'<div class="select3-multiple-input select3-placeholder"><\/div>')+'<div class="clearfix"><\/div><\/div>'},multipleSelectedItem:function(n){var i=n.highlighted?" highlighted":"";return'<span class="select3-multiple-selected-item'+i+'" data-item-id="'+t(n.id)+'">'+t(n.text)+(n.removable?'<a class="select3-multiple-selected-item-remove"><i class="fa fa-remove"><\/i><\/a>':"")+"<\/span>"},noResults:function(n){var t=i.Locale;return'<div class="select3-error">'+(n.term?t.noResultsForTerm(n.term):t.noResults)+"<\/div>"},resultChildren:function(n){return'<div class="select3-result-children">'+n.childrenHtml+"<\/div>"},resultItem:function(n){return'<div class="select3-result-item" data-item-id="'+t(n.id)+'">'+t(n.text)+(n.submenu?'<i class="select3-submenu-icon fa fa-chevron-right"><\/i>':"")+"<\/div>"},resultLabel:function(n){return'<div class="select3-result-label">'+t(n.text)+"<\/div>"},singleSelectInput:'<div class="select3-single-select"><div class="select3-single-result-container"><\/div><i class="fa fa-sort-desc select3-caret"><\/i><\/div>',singleSelectPlaceholder:function(n){return'<div class="select3-placeholder">'+t(n.placeholder)+"<\/div>"},singleSelectedItem:function(n){return'<span class="select3-single-selected-item" data-item-id="'+t(n.id)+'">'+(n.removable?'<a class="select3-single-selected-item-remove"><i class="fa fa-remove"><\/i><\/a>':"")+t(n.text)+"<\/span>"}}},{}],17:[function(n){"use strict";function r(n,i,r,u){function h(n){return n?o.some(function(t){return n.indexOf(t)>-1}):!1}function c(n){for(var t=0,i=n.length;t<i;t++)if(o.indexOf(n[t])>-1)return{term:n.slice(0,t),input:n.slice(t+1)};return{}}for(var s=u.createTokenItem||function(n){return n?{id:n,text:n}:null},o=u.tokenSeparators,f,e;h(n);)f=c(n),f.term&&(e=s(f.term),e&&!t.findById(i,e.id)&&r(e)),n=f.input;return n}var i=window.jQuery||window.Zepto,t=n(7);t.OptionListeners.push(function(n,t){t.tokenSeparators&&(t.allowedTypes=i.extend({tokenSeparators:"array"},t.allowedTypes),t.tokenizer=t.tokenizer||r)})},{}],18:[function(n){"use strict";function r(n,i){var r=i.multiple?[]:null,f=function(){var n=t(this),u;return n.is("option")?(u=n.attr("value")||n.text(),n.prop("selected")&&(i.multiple?r.push(u):r=u),{id:u,text:n.attr("label")||n.text()}):{text:n.attr("label"),children:n.children("option,optgroup").map(f).get()}},u;return i.allowClear="allowClear"in i?i.allowClear:!n.prop("required"),i.items=n.children("option,optgroup").map(f).get(),i.placeholder=i.placeholder||n.data("placeholder")||"",i.value=r,u=t("<div>").attr({"class":n.attr("class"),id:n.attr("id"),name:n.attr("name"),style:n.attr("style")}),n.replaceWith(u),u}var t=window.jQuery||window.Zepto,i=n(7);i.OptionListeners.push(function(n,t){var i=n.$el;i.is("select")&&(i.attr("autofocus")&&setTimeout(function(){n.focus()},1),n.$el=r(i,t),n.$el[0].select3=n)})},{}]},{},[1])(1)});