This repository was archived by the owner on Oct 2, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
Copy pathselect.min.js
executable file
·7 lines (7 loc) · 25.4 KB
/
select.min.js
1
2
3
4
5
6
7
/*!
* ui-select
* http://github.com/angular-ui/ui-select
* Version: 0.9.2 - 2014-12-08T14:55:46.399Z
* License: MIT
*/
!function(){"use strict";var e={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,COMMAND:91,MAP:{91:"COMMAND",8:"BACKSPACE",9:"TAB",13:"ENTER",16:"SHIFT",17:"CTRL",18:"ALT",19:"PAUSEBREAK",20:"CAPSLOCK",27:"ESC",32:"SPACE",33:"PAGE_UP",34:"PAGE_DOWN",35:"END",36:"HOME",37:"LEFT",38:"UP",39:"RIGHT",40:"DOWN",43:"+",44:"PRINTSCREEN",45:"INSERT",46:"DELETE",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"A",66:"B",67:"C",68:"D",69:"E",70:"F",71:"G",72:"H",73:"I",74:"J",75:"K",76:"L",77:"M",78:"N",79:"O",80:"P",81:"Q",82:"R",83:"S",84:"T",85:"U",86:"V",87:"W",88:"X",89:"Y",90:"Z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NUMLOCK",145:"SCROLLLOCK",186:";",187:"=",188:"SPACE",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},isControl:function(t){var c=t.which;switch(c){case e.COMMAND:case e.SHIFT:case e.CTRL:case e.ALT:return!0}return t.metaKey?!0:!1},isFunctionKey:function(e){return e=e.which?e.which:e,e>=112&&123>=e},isVerticalMovement:function(t){return~[e.UP,e.DOWN].indexOf(t)},isHorizontalMovement:function(t){return~[e.LEFT,e.RIGHT,e.BACKSPACE,e.DELETE].indexOf(t)}};void 0===angular.element.prototype.querySelectorAll&&(angular.element.prototype.querySelectorAll=function(e){return angular.element(this[0].querySelectorAll(e))}),angular.module("ui.select",[]).constant("uiSelectConfig",{theme:"bootstrap",searchEnabled:!0,placeholder:"",refreshDelay:1e3,closeOnSelect:!0}).service("uiSelectMinErr",function(){var e=angular.$$minErr("ui.select");return function(){var t=e.apply(this,arguments),c=t.message.replace(new RegExp("\nhttp://errors.angularjs.org/.*"),"");return new Error(c)}}).service("RepeatParser",["uiSelectMinErr","$parse",function(e,t){var c=this;c.parse=function(c){var i=c.match(/^\s*(?:([\s\S]+?)\s+as\s+)?([\S]+?)\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!i)throw e("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",c);return{itemName:i[2],source:t(i[3]),trackByExp:i[4],modelMapper:t(i[1]||i[2])}},c.getGroupNgRepeatExpression=function(){return"$group in $select.groups"},c.getNgRepeatExpression=function(e,t,c,i){var l=e+" in "+(i?"$group.items":t);return c&&(l+=" track by "+c),l}}]).controller("uiSelectCtrl",["$scope","$element","$timeout","$filter","RepeatParser","uiSelectMinErr","uiSelectConfig",function(t,c,i,l,s,n,a){function r(){(v.resetSearchInput||void 0===v.resetSearchInput&&a.resetSearchInput)&&(v.search=f,v.selected&&v.items.length&&!v.multiple&&(v.activeIndex=v.items.indexOf(v.selected)))}function o(t){var c=!0;switch(t){case e.DOWN:!v.open&&v.multiple?v.activate(!1,!0):v.activeIndex<v.items.length-1&&v.activeIndex++;break;case e.UP:!v.open&&v.multiple?v.activate(!1,!0):(v.activeIndex>0||0===v.search.length&&v.tagging.isActivated)&&v.activeIndex--;break;case e.TAB:(!v.multiple||v.open)&&v.select(v.items[v.activeIndex],!0);break;case e.ENTER:v.open?v.select(v.items[v.activeIndex]):v.activate(!1,!0);break;case e.ESC:v.close();break;default:c=!1}return c}function u(t){function c(){switch(t){case e.LEFT:return~v.activeMatchIndex?o:n;case e.RIGHT:return~v.activeMatchIndex&&a!==n?r:(v.activate(),!1);case e.BACKSPACE:return~v.activeMatchIndex?(v.removeChoice(a),o):n;case e.DELETE:return~v.activeMatchIndex?(v.removeChoice(v.activeMatchIndex),a):!1}}var i=h(m[0]),l=v.selected.length,s=0,n=l-1,a=v.activeMatchIndex,r=v.activeMatchIndex+1,o=v.activeMatchIndex-1,u=a;return i>0||v.search.length&&t==e.RIGHT?!1:(v.close(),u=c(),v.activeMatchIndex=v.selected.length&&u!==!1?Math.min(n,Math.max(s,u)):-1,!0)}function d(e){if(void 0===e||void 0===v.search)return!1;var t=e.filter(function(e){return void 0===v.search.toUpperCase()?!1:e.toUpperCase()===v.search.toUpperCase()}).length>0;return t}function p(e,t){for(var c=angular.copy(e),i=-1,l=0;l<c.length;l++)if(void 0===v.tagging.fct)c[l]+" "+v.taggingLabel===t&&(i=l);else{var s=c[l];s.isTag=!0,angular.equals(s,t)&&(i=l)}return i}function h(e){return angular.isNumber(e.selectionStart)?e.selectionStart:e.value.length}function g(){var e=c.querySelectorAll(".ui-select-choices-content"),t=e.querySelectorAll(".ui-select-choices-row");if(t.length<1)throw n("choices","Expected multiple .ui-select-choices-row but got '{0}'.",t.length);var i=t[v.activeIndex],l=i.offsetTop+i.clientHeight-e[0].scrollTop,s=e[0].offsetHeight;l>s?e[0].scrollTop+=l-s:l<i.clientHeight&&(v.isGrouped&&0===v.activeIndex?e[0].scrollTop=0:e[0].scrollTop-=i.clientHeight-l)}var v=this,f="";v.placeholder=void 0,v.search=f,v.activeIndex=0,v.activeMatchIndex=-1,v.items=[],v.selected=void 0,v.open=!1,v.focus=!1,v.focusser=void 0,v.disabled=void 0,v.searchEnabled=void 0,v.resetSearchInput=void 0,v.refreshDelay=void 0,v.multiple=!1,v.disableChoiceExpression=void 0,v.tagging={isActivated:!1,fct:void 0},v.taggingTokens={isActivated:!1,tokens:void 0},v.lockChoiceExpression=void 0,v.closeOnSelect=!0,v.clickTriggeredSelect=!1,v.$filter=l,v.isEmpty=function(){return angular.isUndefined(v.selected)||null===v.selected||""===v.selected};var m=c.querySelectorAll("input.ui-select-search");if(1!==m.length)throw n("searchInput","Expected 1 input.ui-select-search but got '{0}'.",m.length);v.activate=function(e,t){v.disabled||v.open||(t||r(),v.focusser.prop("disabled",!0),v.open=!0,v.activeMatchIndex=-1,v.activeIndex=v.activeIndex>=v.items.length?0:v.activeIndex,-1===v.activeIndex&&v.taggingLabel!==!1&&(v.activeIndex=0),i(function(){v.search=e||v.search,m[0].focus()}))},v.findGroupByName=function(e){return v.groups&&v.groups.filter(function(t){return t.name===e})[0]},v.parseRepeatAttr=function(e,c){function i(e){v.groups=[],angular.forEach(e,function(e){var i=t.$eval(c),l=angular.isFunction(i)?i(e):e[i],s=v.findGroupByName(l);s?s.items.push(e):v.groups.push({name:l,items:[e]})}),v.items=[],v.groups.forEach(function(e){v.items=v.items.concat(e.items)})}function l(e){v.items=e}var a=c?i:l;v.parserResult=s.parse(e),v.isGrouped=!!c,v.itemProperty=v.parserResult.itemName,t.$watchCollection(v.parserResult.source,function(e){if(void 0===e||null===e)v.items=[];else{if(!angular.isArray(e))throw n("items","Expected an array but got '{0}'.",e);if(v.multiple){var t=e.filter(function(e){return v.selected.indexOf(e)<0});a(t)}else a(e);v.ngModel.$modelValue=null}}),v.multiple&&t.$watchCollection("$select.selected",function(e){var c=v.parserResult.source(t);if(e.length){if(void 0!==c){var i=c.filter(function(t){return e.indexOf(t)<0});a(i)}}else a(c);v.sizeSearchInput()})};var $;v.refresh=function(e){void 0!==e&&($&&i.cancel($),$=i(function(){t.$eval(e)},v.refreshDelay))},v.setActiveItem=function(e){v.activeIndex=v.items.indexOf(e)},v.isActive=function(e){if(!v.open)return!1;var t=v.items.indexOf(e[v.itemProperty]),c=t===v.activeIndex;return!c||0>t&&v.taggingLabel!==!1||0>t&&v.taggingLabel===!1?!1:(c&&!angular.isUndefined(v.onHighlightCallback)&&e.$eval(v.onHighlightCallback),c)},v.isDisabled=function(e){if(v.open){var t,c=v.items.indexOf(e[v.itemProperty]),i=!1;return c>=0&&!angular.isUndefined(v.disableChoiceExpression)&&(t=v.items[c],i=!!e.$eval(v.disableChoiceExpression),t._uiSelectChoiceDisabled=i),i}},v.select=function(e,c,i){if(void 0===e||!e._uiSelectChoiceDisabled){if(!v.items&&!v.search)return;if(!e||!e._uiSelectChoiceDisabled){if(v.tagging.isActivated){if(v.taggingLabel===!1)if(v.activeIndex<0){if(e=void 0!==v.tagging.fct?v.tagging.fct(v.search):v.search,angular.equals(v.items[0],e))return}else e=v.items[v.activeIndex];else if(0===v.activeIndex){if(void 0===e)return;e=void 0!==v.tagging.fct?v.tagging.fct(v.search):e.replace(v.taggingLabel,"")}if(v.selected&&v.selected.filter(function(t){return angular.equals(t,e)}).length>0)return v.close(c),void 0}var l={};l[v.parserResult.itemName]=e,v.onSelectCallback(t,{$item:e,$model:v.parserResult.modelMapper(t,l)}),v.multiple?(v.selected.push(e),v.sizeSearchInput()):v.selected=e,(!v.multiple||v.closeOnSelect)&&v.close(c),i&&"click"===i.type&&(v.clickTriggeredSelect=!0)}}},v.close=function(e){v.open&&(r(),v.open=!1,v.multiple||i(function(){v.focusser.prop("disabled",!1),e||v.focusser[0].focus()},0,!1))},v.toggle=function(e){v.open?v.close():v.activate(),e.preventDefault(),e.stopPropagation()},v.isLocked=function(e,t){var c,i=v.selected[t];return i&&!angular.isUndefined(v.lockChoiceExpression)&&(c=!!e.$eval(v.lockChoiceExpression),i._uiSelectChoiceLocked=c),c},v.removeChoice=function(e){var c=v.selected[e];if(!c._uiSelectChoiceLocked){var i={};i[v.parserResult.itemName]=c,v.selected.splice(e,1),v.activeMatchIndex=-1,v.sizeSearchInput(),v.onRemoveCallback(t,{$item:c,$model:v.parserResult.modelMapper(t,i)})}},v.getPlaceholder=function(){return v.multiple&&v.selected.length?void 0:v.placeholder};var b;v.sizeSearchInput=function(){var e=m[0],c=m.parent().parent()[0];m.css("width","10px");var l=function(){var t=c.clientWidth-e.offsetLeft-10;50>t&&(t=c.clientWidth),m.css("width",t+"px")};i(function(){0!==c.clientWidth||b?b||l():b=t.$watch(function(){return c.clientWidth},function(e){0!==e&&(l(),b(),b=null)})},0,!1)},m.on("keydown",function(c){var i=c.which;t.$apply(function(){var t=!1;if(v.multiple&&e.isHorizontalMovement(i)&&(t=u(i)),!t&&(v.items.length>0||v.tagging.isActivated)&&(t=o(i),v.taggingTokens.isActivated))for(var l=0;l<v.taggingTokens.tokens.length;l++)v.taggingTokens.tokens[l]===e.MAP[c.keyCode]&&v.search.length>0&&(v.select(void 0,!0),m.triggerHandler("tagged"));t&&i!=e.TAB&&(c.preventDefault(),c.stopPropagation())}),e.isVerticalMovement(i)&&v.items.length>0&&g()}),m.on("keyup",function(c){if(e.isVerticalMovement(c.which)||t.$evalAsync(function(){v.activeIndex=v.taggingLabel===!1?-1:0}),v.tagging.isActivated&&v.search.length>0){if(c.which===e.TAB||e.isControl(c)||e.isFunctionKey(c)||c.which===e.ESC||e.isVerticalMovement(c.which))return;if(v.activeIndex=v.taggingLabel===!1?-1:0,v.taggingLabel===!1)return;var i,l,s,n,a=angular.copy(v.items),r=angular.copy(v.items),o=!1,u=-1;if(void 0!==v.tagging.fct){if(s=v.$filter("filter")(a,{isTag:!0}),s.length>0&&(n=s[0]),a.length>0&&n&&(o=!0,a=a.slice(1,a.length),r=r.slice(1,r.length)),i=v.tagging.fct(v.search),i.isTag=!0,r.filter(function(e){return angular.equals(e,v.tagging.fct(v.search))}).length>0)return}else{if(s=v.$filter("filter")(a,function(e){return e.match(v.taggingLabel)}),s.length>0&&(n=s[0]),l=a[0],void 0!==l&&a.length>0&&n&&(o=!0,a=a.slice(1,a.length),r=r.slice(1,r.length)),i=v.search+" "+v.taggingLabel,p(v.selected,v.search)>-1)return;if(d(r))return o&&(a=r,t.$evalAsync(function(){v.activeIndex=0,v.items=a})),void 0;if(d(r))return o&&(v.items=r.slice(1,r.length)),void 0}o&&(u=p(v.selected,i)),u>-1?a=a.slice(u+1,a.length-1):(a=[],a.push(i),a=a.concat(r)),t.$evalAsync(function(){v.activeIndex=0,v.items=a})}}),m.on("tagged",function(){i(function(){r()})}),m.on("blur",function(){i(function(){v.activeMatchIndex=-1})}),t.$on("$destroy",function(){m.off("keyup keydown tagged blur")})}]).directive("uiSelect",["$document","uiSelectConfig","uiSelectMinErr","$compile","$parse",function(t,c,i,l,s){return{restrict:"EA",templateUrl:function(e,t){var i=t.theme||c.theme;return i+(angular.isDefined(t.multiple)?"/select-multiple.tpl.html":"/select.tpl.html")},replace:!0,transclude:!0,require:["uiSelect","ngModel"],scope:!0,controller:"uiSelectCtrl",controllerAs:"$select",link:function(n,a,r,o,u){function d(e){var t=!1;t=window.jQuery?window.jQuery.contains(a[0],e.target):a[0].contains(e.target),t||p.clickTriggeredSelect||(p.close(),n.$digest()),p.clickTriggeredSelect=!1}var p=o[0],h=o[1],g=a.querySelectorAll("input.ui-select-search");p.multiple=angular.isDefined(r.multiple)&&(""===r.multiple||"multiple"===r.multiple.toLowerCase()||"true"===r.multiple.toLowerCase()),p.closeOnSelect=function(){return angular.isDefined(r.closeOnSelect)?s(r.closeOnSelect)():c.closeOnSelect}(),p.onSelectCallback=s(r.onSelect),p.onRemoveCallback=s(r.onRemove),h.$parsers.unshift(function(e){var t,c={};if(p.multiple){for(var i=[],l=p.selected.length-1;l>=0;l--)c={},c[p.parserResult.itemName]=p.selected[l],t=p.parserResult.modelMapper(n,c),i.unshift(t);return i}return c={},c[p.parserResult.itemName]=e,t=p.parserResult.modelMapper(n,c)}),h.$formatters.unshift(function(e){var t,c=p.parserResult.source(n,{$select:{search:""}}),i={};if(c){if(p.multiple){var l=[],s=function(e,c){if(e&&e.length){for(var s=e.length-1;s>=0;s--)if(i[p.parserResult.itemName]=e[s],t=p.parserResult.modelMapper(n,i),t==c)return l.unshift(e[s]),!0;return!1}};if(!e)return l;for(var a=e.length-1;a>=0;a--)s(p.selected,e[a])||s(c,e[a]);return l}var r=function(c){return i[p.parserResult.itemName]=c,t=p.parserResult.modelMapper(n,i),t==e};if(p.selected&&r(p.selected))return p.selected;for(var o=c.length-1;o>=0;o--)if(r(c[o]))return c[o]}return e}),p.ngModel=h,p.choiceGrouped=function(e){return p.isGrouped&&e&&e.name};var v=angular.element("<input ng-disabled='$select.disabled' class='ui-select-focusser ui-select-offscreen' type='text' aria-haspopup='true' role='button' />");r.tabindex&&r.$observe("tabindex",function(e){p.multiple?g.attr("tabindex",e):v.attr("tabindex",e),a.removeAttr("tabindex")}),l(v)(n),p.focusser=v,p.multiple||(a.append(v),v.bind("focus",function(){n.$evalAsync(function(){p.focus=!0})}),v.bind("blur",function(){n.$evalAsync(function(){p.focus=!1})}),v.bind("keydown",function(t){return t.which===e.BACKSPACE?(t.preventDefault(),t.stopPropagation(),p.select(void 0),n.$apply(),void 0):(t.which===e.TAB||e.isControl(t)||e.isFunctionKey(t)||t.which===e.ESC||((t.which==e.DOWN||t.which==e.UP||t.which==e.ENTER||t.which==e.SPACE)&&(t.preventDefault(),t.stopPropagation(),p.activate()),n.$digest()),void 0)}),v.bind("keyup input",function(t){t.which===e.TAB||e.isControl(t)||e.isFunctionKey(t)||t.which===e.ESC||t.which==e.ENTER||t.which===e.BACKSPACE||(p.activate(v.val()),v.val(""),n.$digest())})),n.$watch("searchEnabled",function(){var e=n.$eval(r.searchEnabled);p.searchEnabled=void 0!==e?e:c.searchEnabled}),r.$observe("disabled",function(){p.disabled=void 0!==r.disabled?r.disabled:!1}),r.$observe("resetSearchInput",function(){var e=n.$eval(r.resetSearchInput);p.resetSearchInput=void 0!==e?e:!0}),r.$observe("tagging",function(){if(void 0!==r.tagging){var e=n.$eval(r.tagging);p.tagging={isActivated:!0,fct:e!==!0?e:void 0}}else p.tagging={isActivated:!1,fct:void 0}}),r.$observe("taggingLabel",function(){void 0!==r.tagging&&void 0!==r.taggingLabel&&(p.taggingLabel="false"===r.taggingLabel?!1:void 0!==r.taggingLabel?r.taggingLabel:"(new)")}),r.$observe("taggingTokens",function(){if(void 0!==r.tagging){var e=void 0!==r.taggingTokens?r.taggingTokens.split("|"):[",","ENTER"];p.taggingTokens={isActivated:!0,tokens:e}}}),p.multiple?(n.$watchCollection(function(){return h.$modelValue},function(e,t){t!=e&&(h.$modelValue=null)}),n.$watchCollection("$select.selected",function(){h.$setViewValue(Date.now())}),v.prop("disabled",!0)):n.$watch("$select.selected",function(e){h.$viewValue!==e&&h.$setViewValue(e)}),h.$render=function(){if(p.multiple&&!angular.isArray(h.$viewValue)){if(!angular.isUndefined(h.$viewValue)&&null!==h.$viewValue)throw i("multiarr","Expected model value to be array but got '{0}'",h.$viewValue);p.selected=[]}p.selected=h.$viewValue},t.on("click",d),n.$on("$destroy",function(){t.off("click",d)}),u(n,function(e){var t=angular.element("<div>").append(e),c=t.querySelectorAll(".ui-select-match");if(c.removeAttr("ui-select-match"),1!==c.length)throw i("transcluded","Expected 1 .ui-select-match but got '{0}'.",c.length);a.querySelectorAll(".ui-select-match").replaceWith(c);var l=t.querySelectorAll(".ui-select-choices");if(l.removeAttr("ui-select-choices"),1!==l.length)throw i("transcluded","Expected 1 .ui-select-choices but got '{0}'.",l.length);a.querySelectorAll(".ui-select-choices").replaceWith(l)})}}}]).directive("uiSelectChoices",["uiSelectConfig","RepeatParser","uiSelectMinErr","$compile",function(e,t,c,i){return{restrict:"EA",require:"^uiSelect",replace:!0,transclude:!0,templateUrl:function(t){var c=t.parent().attr("theme")||e.theme;return c+"/choices.tpl.html"},compile:function(l,s){if(!s.repeat)throw c("repeat","Expected 'repeat' expression.");return function(l,s,n,a,r){var o=n.groupBy;if(a.parseRepeatAttr(n.repeat,o),a.disableChoiceExpression=n.uiDisableChoice,a.onHighlightCallback=n.onHighlight,o){var u=s.querySelectorAll(".ui-select-choices-group");if(1!==u.length)throw c("rows","Expected 1 .ui-select-choices-group but got '{0}'.",u.length);u.attr("ng-repeat",t.getGroupNgRepeatExpression())}var d=s.querySelectorAll(".ui-select-choices-row");if(1!==d.length)throw c("rows","Expected 1 .ui-select-choices-row but got '{0}'.",d.length);d.attr("ng-repeat",t.getNgRepeatExpression(a.parserResult.itemName,"$select.items",a.parserResult.trackByExp,o)).attr("ng-if","$select.open").attr("ng-mouseenter","$select.setActiveItem("+a.parserResult.itemName+")").attr("ng-click","$select.select("+a.parserResult.itemName+",false,$event)");var p=s.querySelectorAll(".ui-select-choices-row-inner");if(1!==p.length)throw c("rows","Expected 1 .ui-select-choices-row-inner but got '{0}'.",p.length);p.attr("uis-transclude-append",""),i(s,r)(l),l.$watch("$select.search",function(e){e&&!a.open&&a.multiple&&a.activate(!1,!0),a.activeIndex=a.tagging.isActivated?-1:0,a.refresh(n.refresh)}),n.$observe("refreshDelay",function(){var t=l.$eval(n.refreshDelay);a.refreshDelay=void 0!==t?t:e.refreshDelay})}}}}]).directive("uisTranscludeAppend",function(){return{link:function(e,t,c,i,l){l(e,function(e){t.append(e)})}}}).directive("uiSelectMatch",["uiSelectConfig",function(e){return{restrict:"EA",require:"^uiSelect",replace:!0,transclude:!0,templateUrl:function(t){var c=t.parent().attr("theme")||e.theme,i=t.parent().attr("multiple");return c+(i?"/match-multiple.tpl.html":"/match.tpl.html")},link:function(t,c,i,l){l.lockChoiceExpression=i.uiLockChoice,i.$observe("placeholder",function(t){l.placeholder=void 0!==t?t:e.placeholder}),l.allowClear=angular.isDefined(i.allowClear)?""===i.allowClear?!0:"true"===i.allowClear.toLowerCase():!1,l.multiple&&l.sizeSearchInput()}}}]).filter("highlight",function(){function e(e){return e.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}return function(t,c){return c&&t?t.replace(new RegExp(e(c),"gi"),'<span class="ui-select-highlight">$&</span>'):t}})}(),angular.module("ui.select").run(["$templateCache",function(e){e.put("bootstrap/choices.tpl.html",'<ul class="ui-select-choices ui-select-choices-content dropdown-menu" role="menu" aria-labelledby="dLabel" ng-show="$select.items.length > 0"><li class="ui-select-choices-group"><div class="divider" ng-show="$select.isGrouped && $index > 0"></div><div ng-show="$select.isGrouped" class="ui-select-choices-group-label dropdown-header" ng-bind-html="$group.name"></div><div class="ui-select-choices-row" ng-class="{active: $select.isActive(this), disabled: $select.isDisabled(this)}"><a href="javascript:void(0)" class="ui-select-choices-row-inner"></a></div></li></ul>'),e.put("bootstrap/match-multiple.tpl.html",'<span class="ui-select-match"><span ng-repeat="$item in $select.selected"><span style="margin-right: 3px;" class="ui-select-match-item btn btn-default btn-xs" tabindex="-1" type="button" ng-disabled="$select.disabled" ng-click="$select.activeMatchIndex = $index;" ng-class="{\'btn-primary\':$select.activeMatchIndex === $index}"><span class="close ui-select-match-close" ng-hide="$select.disabled" ng-click="$select.removeChoice($index)"> ×</span> <span uis-transclude-append=""></span></span></span></span>'),e.put("bootstrap/match.tpl.html",'<button type="button" class="btn btn-default form-control ui-select-match" tabindex="-1" ng-hide="$select.open" ng-disabled="$select.disabled" ng-class="{\'btn-default-focus\':$select.focus}" ;="" ng-click="$select.activate()"><span ng-show="$select.isEmpty()" class="text-muted">{{$select.placeholder}}</span> <span ng-hide="$select.isEmpty()" ng-transclude=""></span> <span class="caret ui-select-toggle" ng-click="$select.toggle($event)"></span></button>'),e.put("bootstrap/select-multiple.tpl.html",'<div class="ui-select-multiple ui-select-bootstrap dropdown form-control" ng-class="{open: $select.open}"><div><div class="ui-select-match"></div><input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" class="ui-select-search input-xs" placeholder="{{$select.getPlaceholder()}}" ng-disabled="$select.disabled" ng-hide="$select.disabled" ng-click="$select.activate()" ng-model="$select.search"></div><div class="ui-select-choices"></div></div>'),e.put("bootstrap/select.tpl.html",'<div class="ui-select-bootstrap dropdown" ng-class="{open: $select.open}"><div class="ui-select-match"></div><input type="text" autocomplete="off" tabindex="-1" class="form-control ui-select-search" placeholder="{{$select.placeholder}}" ng-model="$select.search" ng-show="$select.searchEnabled && $select.open"><div class="ui-select-choices"></div></div>'),e.put("select2/choices.tpl.html",'<ul class="ui-select-choices ui-select-choices-content select2-results"><li class="ui-select-choices-group" ng-class="{\'select2-result-with-children\': $select.choiceGrouped($group) }"><div ng-show="$select.choiceGrouped($group)" class="ui-select-choices-group-label select2-result-label" ng-bind-html="$group.name"></div><ul ng-class="{\'select2-result-sub\': $select.choiceGrouped($group), \'select2-result-single\': !$select.choiceGrouped($group) }"><li class="ui-select-choices-row" ng-class="{\'select2-highlighted\': $select.isActive(this), \'select2-disabled\': $select.isDisabled(this)}"><div class="select2-result-label ui-select-choices-row-inner"></div></li></ul></li></ul>'),e.put("select2/match-multiple.tpl.html",'<span class="ui-select-match"><li class="ui-select-match-item select2-search-choice" ng-repeat="$item in $select.selected" ng-class="{\'select2-search-choice-focus\':$select.activeMatchIndex === $index, \'select2-locked\':$select.isLocked(this, $index)}"><span uis-transclude-append=""></span> <a href="javascript:;" class="ui-select-match-close select2-search-choice-close" ng-click="$select.removeChoice($index)" tabindex="-1"></a></li></span>'),e.put("select2/match.tpl.html",'<a class="select2-choice ui-select-match" ng-class="{\'select2-default\': $select.isEmpty()}" ng-click="$select.activate()"><span ng-show="$select.isEmpty()" class="select2-chosen">{{$select.placeholder}}</span> <span ng-hide="$select.isEmpty()" class="select2-chosen" ng-transclude=""></span> <abbr ng-if="$select.allowClear && !$select.isEmpty()" class="select2-search-choice-close" ng-click="$select.select(undefined)"></abbr> <span class="select2-arrow ui-select-toggle" ng-click="$select.toggle($event)"><b></b></span></a>'),e.put("select2/select-multiple.tpl.html",'<div class="ui-select-multiple select2 select2-container select2-container-multi" ng-class="{\'select2-container-active select2-dropdown-open\': $select.open,\n \'select2-container-disabled\': $select.disabled}"><ul class="select2-choices"><span class="ui-select-match"></span><li class="select2-search-field"><input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" class="select2-input ui-select-search" placeholder="{{$select.getPlaceholder()}}" ng-disabled="$select.disabled" ng-hide="$select.disabled" ng-model="$select.search" ng-click="$select.activate()" style="width: 34px;"></li></ul><div class="select2-drop select2-with-searchbox select2-drop-active" ng-class="{\'select2-display-none\': !$select.open}"><div class="ui-select-choices"></div></div></div>'),e.put("select2/select.tpl.html",'<div class="select2 select2-container" ng-class="{\'select2-container-active select2-dropdown-open\': $select.open,\n \'select2-container-disabled\': $select.disabled,\n \'select2-container-active\': $select.focus, \n \'select2-allowclear\': $select.allowClear && !$select.isEmpty()}"><div class="ui-select-match"></div><div class="select2-drop select2-with-searchbox select2-drop-active" ng-class="{\'select2-display-none\': !$select.open}"><div class="select2-search" ng-show="$select.searchEnabled"><input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" class="ui-select-search select2-input" ng-model="$select.search"></div><div class="ui-select-choices"></div></div></div>'),e.put("selectize/choices.tpl.html",'<div ng-show="$select.open" class="ui-select-choices selectize-dropdown single"><div class="ui-select-choices-content selectize-dropdown-content"><div class="ui-select-choices-group optgroup"><div ng-show="$select.isGrouped" class="ui-select-choices-group-label optgroup-header" ng-bind-html="$group.name"></div><div class="ui-select-choices-row" ng-class="{active: $select.isActive(this), disabled: $select.isDisabled(this)}"><div class="option ui-select-choices-row-inner" data-selectable=""></div></div></div></div></div>'),e.put("selectize/match.tpl.html",'<div ng-hide="($select.open || $select.isEmpty())" class="ui-select-match" ng-transclude=""></div>'),e.put("selectize/select.tpl.html",'<div class="selectize-control single"><div class="selectize-input" ng-class="{\'focus\': $select.open, \'disabled\': $select.disabled, \'selectize-focus\' : $select.focus}" ng-click="$select.activate()"><div class="ui-select-match"></div><input type="text" autocomplete="off" tabindex="-1" class="ui-select-search ui-select-toggle" ng-click="$select.toggle($event)" placeholder="{{$select.placeholder}}" ng-model="$select.search" ng-hide="!$select.searchEnabled || ($select.selected && !$select.open)" ng-disabled="$select.disabled"></div><div class="ui-select-choices"></div></div>')}]);