text: define("jira/shifter/shifter-select",["jira/util/formatter","jira/ajs/select/queryable-dropdown-select","jira/ajs/list/list-with-messages","jira/ajs/list/message-descriptor","jquery","underscore"],function(e,t,o,i,n,r){return t.extend({init:function(t){r.extend(t,{dropdownController:{setWidth:n.noop,setPosition:n.noop,onhide:n.noop,hide:n.noop,show:n.noop}}),this._super(t),this.$field.attr("aria-controls",this.options.element.attr("id")),this.$field.attr("placeholder",e.I18n.getText("shifter.placeholder")),this.$dropDownIcon.click(r.bind(this.clear,this)),this._handleCharacterInput()},onEdit:function(){this.toggleClearButton(),this._handleCharacterInput()},clear:function(){this.$field.val("").focus(),this.onEdit()},toggleClearButton:function(){this.$dropDownIcon.toggleClass("aui-iconfont-remove",!!this.$field.val())},showLoading:function(){this._super(),this.$dropDownIcon.removeClass("aui-iconfont-remove")},hideLoading:function(){this._super(),this.toggleClearButton()},_handleCharacterInput:function(){this._super(!0),0===this.getQueryVal().length&&this.listController.moveToFirst()},_createListController:function(){var t=this;this.listController=new o({containerSelector:this.options.element,groupSelector:"ul.aui-list-section",scrollContainer:".aui-list-scroll",matchingStrategy:this.options.matchingStrategy,maxResultsDisplayedPerGroup:this.options.maxResultsDisplayedPerGroup,eventTarget:this.$field,hasLinks:!1,renderers:{suggestionGroupHeading:this._renders.suggestionGroupHeading},selectionHandler:function(o){var r=n(o.currentTarget).data();if(r&&r.descriptor instanceof i)return!1;var s=this.getFocused().data("descriptor"),a=s.meta().groupIndex,l=t.options.groups[a],c=s.value(),d=s.label();t.$dropDownIcon.removeClass("aui-iconfont-remove"),t.$field.val(e.I18n.getText("common.concepts.loading")).prop("disabled",!0),t.options.onSelection(l,c,d)}})},hideSuggestions:n.noop,_renders:{suggestionGroupHeading:function(e){return n(JIRA.Templates.Shifter.groupHeading({groupName:e.label(),groupContext:e.description()})).data("descriptor",e)},dropdownAndLoadingIcon:function(e){return n('<span class="icon noloading aui-icon aui-icon-small"><span>More</span></span>')}}})}),AJS.namespace("JIRA.ShifterComponent.ShifterSelect",null,require("jira/shifter/shifter-select"));