{"version":3,"sources":["select.js","select_without_templates.js","templates.js"],"names":["KEY","TAB","ENTER","ESC","SPACE","LEFT","UP","RIGHT","DOWN","SHIFT","CTRL","ALT","PAGE_UP","PAGE_DOWN","HOME","END","BACKSPACE","DELETE","COMMAND","MAP",91,8,9,13,16,17,18,19,20,27,32,33,34,35,36,37,38,39,40,43,44,45,46,48,49,50,51,52,53,54,55,56,57,59,61,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,96,97,98,99,100,101,102,103,104,105,106,107,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,144,145,186,187,188,189,190,191,192,219,220,221,222,"isControl","e","k","which","metaKey","ctrlKey","altKey","isFunctionKey","isVerticalMovement","indexOf","isHorizontalMovement","toSeparator","sep","undefined","angular","element","prototype","querySelectorAll","selector","this","closest","elem","matchesSelector","matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","bind","parentElement","latestId","uis","module","constant","theme","searchEnabled","sortable","placeholder","refreshDelay","closeOnSelect","skipFocusser","dropdownPosition","removeSelected","generateId","appendToBody","service","minErr","$$minErr","error","apply","arguments","message","replace","RegExp","Error","directive","link","scope","attrs","ctrl","transclude","clone","append","filter","escapeRegexp","queryToEscape","matchItem","query","factory","$document","$window","boundingClientRect","getBoundingClientRect","width","prop","height","top","pageYOffset","documentElement","scrollTop","left","pageXOffset","scrollLeft","$timeout","callback","debounceTime","timeoutPromise","self","args","Array","slice","call","cancel","uiSelectConfig","RepeatParser","uiSelectMinErr","$compile","restrict","require","templateUrl","tElement","addClass","parent","attr","compile","tAttrs","repeat","groupByExp","groupBy","groupFilterExp","groupFilter","groups","length","getGroupNgRepeatExpression","parserResult","parse","choices","repeatExpression","rowsInner","clickTarget","document","addEventListener","itemName","$select","parseRepeatAttr","disableChoiceExpression","uiDisableChoice","onHighlightCallback","onHighlight","position","toLowerCase","$on","remove","$watch","newValue","open","multiple","activate","activeIndex","tagging","isActivated","minimumInputLength","search","refresh","items","$observe","$eval","controller","$scope","$element","$filter","$$uisDebounce","$parse","$injector","_findIndex","collection","predicate","thisArg","findIndex","value","list","Object","i","_resetSearchInput","resetSearchInput","EMPTY_SEARCH","selected","item","equals","_groupsFilter","groupNames","j","result","name","push","_updateItemDisabled","isDisabled","disabledItemIndex","disabledItems","splice","_isItemDisabled","_initaliseLockedChoices","doInitalise","_updateItemLocked","isLocked","lockedItemIndex","lockedItems","_isItemlocked","itemScope","itemIndex","lockChoiceExpression","_handleDropDownSelection","key","processed","select","close","_ensureHighlightVisible","container","highlighted","posY","offsetTop","clientHeight","offsetHeight","isGrouped","paste","focus","disabled","focusser","fct","taggingTokens","tokens","clickTriggeredSelect","$animate","get","err","searchInput","isEmpty","isUndefined","initSearchValue","avoidReset","$broadcast","taggingLabel","on","enabled","animateHandler","phase","off","focusSearchInput","findGroupByName","group","repeatAttr","updateGroups","groupFn","forEach","groupName","isFunction","groupFilterFn","isArray","concat","setPlainItems","setItemsFn","itemProperty","originalSource","source","createArrayFromObject","origSrc","$uisSource","keys","map","v","keyName","filters","newVal","oldVal","refreshItems","data","selectedItems","filteredItems","every","selectedItem","calculateDropdownPos","$watchCollection","isDefined","ngModel","$modelValue","_refreshDelayPromise","refreshAttr","isActive","_isItemSelected","selection","isTag","$event","trim","locals","onSelectCallback","$item","$model","modelMapper","type","$setTouched","setFocus","focusInput","clear","stopPropagation","toggle","preventDefault","sizeWatch","updaterScheduled","sizeSearchInput","input","calculateContainerWidth","clientWidth","offsetParent","updateIfVisible","containerWidth","inputWidth","offsetLeft","css","$$postDigest","noop","$apply","tagged","keyCode","triggerHandler","newItem","window","clipboardData","getData","originalEvent","separator","split","oldsearch","onResize","uisOffset","controllerAs","match","exec","ngClass","combined","removeAttr","inputId","id","ctrls","transcludeFn","onDocumentClick","contains","jQuery","target","focusableControls","targetController","tagName","$digest","positionDropdown","offset","style","after","originalWidth","find","resetDropdown","replaceWith","generatedId","baseTitle","title","focusserTitle","focusserId","onSelect","onRemoveCallback","onRemove","choiceGrouped","tabindex","limit","parseInt","taggingEval","autofocus","focusOn","transcluded","transcludedMatch","transcludedChoices","transcludedNoChoice","isOpen","dropdown","directionUpClassName","setDropdownPosUp","offsetDropdown","setDropdownPosDown","removeClass","calculateDropdownPosAfterAnimation","body","opacity","needsCalculated","getAttribute","attribute","hasAttribute","multi","setAllowClear","allow","allowClear","uiLockChoice","$evalAsync","activeMatchIndex","updateModel","$setViewValue","Date","now","refreshComponent","removeChoice","index","removedChoice","getPlaceholder","_getCaretPosition","el","isNumber","selectionStart","_handleMatchSelection","getNewActiveMatchIndex","$selectMultiple","prev","last","curr","next","caretPosition","first","newIndex","Math","min","max","_findCaseInsensitiveDupe","arr","hasDupe","origItem","toUpperCase","_findApproxDupe","haystack","needle","dupeIndex","tempArr","copy","mockObj","isObject","$isEmpty","$parsers","unshift","resultMultiple","$formatters","inputValue","checkFnMultiple","p","trackByExp","propsItemNameMatches","oldValue","$render","$viewValue","event","tagItems","tagItem","stashArr","hasTag","some","itemsWithoutTag","checkFnSingle","d","val","uiSelectSort","$ngModel","options","extend","axis","uiSelectSortOptions","draggingClassName","droppingClassName","droppingBeforeClassName","droppingAfterClassName","dataTransfer","setData","$index","toString","dropTimeout","move","from","to","className","dragOverHandler","offsetY","layerY","offsetX","layerX","dropHandler","droppedItemIndex","_dropHandler","theList","itemToMove","hasClass","$emit","array","expression","filterMatch","grouped","run","$templateCache","put"],"mappings":";;;;;;CAQA,WCPA,YADA,IAAAA,IACAC,IAAA,EACAC,MAAA,GACAC,IAAA,GACAC,MAAA,GACAC,KAAA,GACAC,GAAA,GACAC,MAAA,GACAC,KAAA,GACAC,MAAA,GACAC,KAAA,GACAC,IAAA,GACAC,QAAA,GACAC,UAAA,GACAC,KAAA,GACAC,IAAA,GACAC,UAAA,EACAC,OAAA,GACAC,QAAA,GAEAC,KAAAC,GAAA,UAAAC,EAAA,YAAAC,EAAA,MAAAC,GAAA,QAAAC,GAAA,QAAAC,GAAA,OAAAC,GAAA,MAAAC,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3M,SACArB,EAAAgO,EAAA,GACAxO,EAAAA,EAAA/L,QAAAuM,EAAA,KAIA,OACAjI,SAAAiM,EAAA,IAAAA,EAAA,GACAjE,QAAAiE,EAAA,GACAxE,OAAA3F,EAAA2F,GACAQ,QAAAA,EACAgL,WAAAhH,EAAA,GACAtC,YAAA7H,EAAAmK,EAAA,IAAAA,EAAA,IAAAA,EAAA,IACAtM,iBAAA,SAAAuW,GACA,GAAAF,GAAAtc,KAAAsG,SAAA,QAAAkW,EAAA,eAAA,gBAIA,OAHAxc,MAAAuZ,aACA+C,GAAA,aAAAtc,KAAAuZ,YAEA+C,KAMAnY,EAAA0B,2BAAA,WACA,MAAA,kCClvEAlG,QAAAiB,OAAA,aAAA6b,KAAA,iBAAA,SAAAC,GAAAA,EAAAC,IAAA,6BAAA,wrBACAD,EAAAC,IAAA,oCAAA;AACAD,EAAAC,IAAA,2BAAA,2/BACAD,EAAAC,IAAA,+BAAA,qHACAD,EAAAC,IAAA,qCAAA,unBACAD,EAAAC,IAAA,4BAAA,unBACAD,EAAAC,IAAA,2BAAA,g1BACAD,EAAAC,IAAA,kCAAA,mgBACAD,EAAAC,IAAA,yBAAA,6hBACAD,EAAAC,IAAA,6BAAA,2KACAD,EAAAC,IAAA,mCAAA,qnCACAD,EAAAC,IAAA,0BAAA,ogCACAD,EAAAC,IAAA,6BAAA,2jBACAD,EAAAC,IAAA,2BAAA,+HACAD,EAAAC,IAAA,+BAAA,+LACAD,EAAAC,IAAA,4BAAA","file":"select.min.js","sourcesContent":["/*!\n * ui-select\n * http://github.com/angular-ui/ui-select\n * Version: 0.18.1 - 2016-07-10T00:18:10.535Z\n * License: MIT\n */\n\n\n(function () { \n\"use strict\";\nvar KEY = {\n TAB: 9,\n ENTER: 13,\n ESC: 27,\n SPACE: 32,\n LEFT: 37,\n UP: 38,\n RIGHT: 39,\n DOWN: 40,\n SHIFT: 16,\n CTRL: 17,\n ALT: 18,\n PAGE_UP: 33,\n PAGE_DOWN: 34,\n HOME: 36,\n END: 35,\n BACKSPACE: 8,\n DELETE: 46,\n COMMAND: 91,\n\n 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 : \",\" , 189 : \"-\" , 190 : \".\" , 191 : \"/\" , 192 : \"`\" , 219 : \"[\" , 220 : \"\\\\\" , 221 : \"]\" , 222 : \"'\"\n },\n\n isControl: function (e) {\n var k = e.which;\n switch (k) {\n case KEY.COMMAND:\n case KEY.SHIFT:\n case KEY.CTRL:\n case KEY.ALT:\n return true;\n }\n\n if (e.metaKey || e.ctrlKey || e.altKey) return true;\n\n return false;\n },\n isFunctionKey: function (k) {\n k = k.which ? k.which : k;\n return k >= 112 && k <= 123;\n },\n isVerticalMovement: function (k){\n return ~[KEY.UP, KEY.DOWN].indexOf(k);\n },\n isHorizontalMovement: function (k){\n return ~[KEY.LEFT,KEY.RIGHT,KEY.BACKSPACE,KEY.DELETE].indexOf(k);\n },\n toSeparator: function (k) {\n var sep = {ENTER:\"\\n\",TAB:\"\\t\",SPACE:\" \"}[k];\n if (sep) return sep;\n // return undefined for special keys other than enter, tab or space.\n // no way to use them to cut strings.\n return KEY[k] ? undefined : k;\n }\n };\n\n/**\n * Add querySelectorAll() to jqLite.\n *\n * jqLite find() is limited to lookups by tag name.\n * TODO This will change with future versions of AngularJS, to be removed when this happens\n *\n * See jqLite.find - why not use querySelectorAll? https://github.com/angular/angular.js/issues/3586\n * See feat(jqLite): use querySelectorAll instead of getElementsByTagName in jqLite.find https://github.com/angular/angular.js/pull/3598\n */\nif (angular.element.prototype.querySelectorAll === undefined) {\n angular.element.prototype.querySelectorAll = function(selector) {\n return angular.element(this[0].querySelectorAll(selector));\n };\n}\n\n/**\n * Add closest() to jqLite.\n */\nif (angular.element.prototype.closest === undefined) {\n angular.element.prototype.closest = function( selector) {\n var elem = this[0];\n var matchesSelector = elem.matches || elem.webkitMatchesSelector || elem.mozMatchesSelector || elem.msMatchesSelector;\n\n while (elem) {\n if (matchesSelector.bind(elem)(selector)) {\n return elem;\n } else {\n elem = elem.parentElement;\n }\n }\n return false;\n };\n}\n\nvar latestId = 0;\n\nvar uis = angular.module('ui.select', [])\n\n.constant('uiSelectConfig', {\n theme: 'bootstrap',\n searchEnabled: true,\n sortable: false,\n placeholder: '', // Empty by default, like HTML tag <select>\n refreshDelay: 1000, // In milliseconds\n closeOnSelect: true,\n skipFocusser: false,\n dropdownPosition: 'auto',\n removeSelected: true,\n generateId: function() {\n return latestId++;\n },\n appendToBody: false\n})\n\n// See Rename minErr and make it accessible from outside https://github.com/angular/angular.js/issues/6913\n.service('uiSelectMinErr', function() {\n var minErr = angular.$$minErr('ui.select');\n return function() {\n var error = minErr.apply(this, arguments);\n var message = error.message.replace(new RegExp('\\nhttp://errors.angularjs.org/.*'), '');\n return new Error(message);\n };\n})\n\n// Recreates old behavior of ng-transclude. Used internally.\n.directive('uisTranscludeAppend', function () {\n return {\n link: function (scope, element, attrs, ctrl, transclude) {\n transclude(scope, function (clone) {\n element.append(clone);\n });\n }\n };\n})\n\n/**\n * Highlights text that matches $select.search.\n *\n * Taken from AngularUI Bootstrap Typeahead\n * See https://github.com/angular-ui/bootstrap/blob/0.10.0/src/typeahead/typeahead.js#L340\n */\n.filter('highlight', function() {\n function escapeRegexp(queryToEscape) {\n return ('' + queryToEscape).replace(/([.?*+^$[\\]\\\\(){}|-])/g, '\\\\$1');\n }\n\n return function(matchItem, query) {\n return query && matchItem ? ('' + matchItem).replace(new RegExp(escapeRegexp(query), 'gi'), '<span class=\"ui-select-highlight\">$&</span>') : matchItem;\n };\n})\n\n/**\n * A read-only equivalent of jQuery's offset function: http://api.jquery.com/offset/\n *\n * Taken from AngularUI Bootstrap Position:\n * See https://github.com/angular-ui/bootstrap/blob/master/src/position/position.js#L70\n */\n.factory('uisOffset',\n ['$document', '$window',\n function ($document, $window) {\n\n return function(element) {\n var boundingClientRect = element[0].getBoundingClientRect();\n return {\n width: boundingClientRect.width || element.prop('offsetWidth'),\n height: boundingClientRect.height || element.prop('offsetHeight'),\n top: boundingClientRect.top + ($window.pageYOffset || $document[0].documentElement.scrollTop),\n left: boundingClientRect.left + ($window.pageXOffset || $document[0].documentElement.scrollLeft)\n };\n };\n}]);\n\n/**\n * Debounces functions\n *\n * Taken from UI Bootstrap $$debounce source code\n * See https://github.com/angular-ui/bootstrap/blob/master/src/debounce/debounce.js\n *\n */\nuis.factory('$$uisDebounce', ['$timeout', function($timeout) {\n return function(callback, debounceTime) {\n var timeoutPromise;\n\n return function() {\n var self = this;\n var args = Array.prototype.slice.call(arguments);\n if (timeoutPromise) {\n $timeout.cancel(timeoutPromise);\n }\n\n timeoutPromise = $timeout(function() {\n callback.apply(self, args);\n }, debounceTime);\n };\n };\n}]);\n\nuis.directive('uiSelectChoices',\n ['uiSelectConfig', 'uisRepeatParser', 'uiSelectMinErr', '$compile', '$window',\n function(uiSelectConfig, RepeatParser, uiSelectMinErr, $compile, $window) {\n\n return {\n restrict: 'EA',\n require: '^uiSelect',\n replace: true,\n transclude: true,\n templateUrl: function(tElement) {\n // Needed so the uiSelect can detect the transcluded content\n tElement.addClass('ui-select-choices');\n\n // Gets theme attribute from parent (ui-select)\n var theme = tElement.parent().attr('theme') || uiSelectConfig.theme;\n return theme + '/choices.tpl.html';\n },\n\n compile: function(tElement, tAttrs) {\n\n if (!tAttrs.repeat) throw uiSelectMinErr('repeat', \"Expected 'repeat' expression.\");\n\n // var repeat = RepeatParser.parse(attrs.repeat);\n var groupByExp = tAttrs.groupBy;\n var groupFilterExp = tAttrs.groupFilter;\n\n if (groupByExp) {\n var groups = tElement.querySelectorAll('.ui-select-choices-group');\n if (groups.length !== 1) throw uiSelectMinErr('rows', \"Expected 1 .ui-select-choices-group but got '{0}'.\", groups.length);\n groups.attr('ng-repeat', RepeatParser.getGroupNgRepeatExpression());\n }\n\n var parserResult = RepeatParser.parse(tAttrs.repeat);\n\n var choices = tElement.querySelectorAll('.ui-select-choices-row');\n if (choices.length !== 1) {\n throw uiSelectMinErr('rows', \"Expected 1 .ui-select-choices-row but got '{0}'.\", choices.length);\n }\n\n choices.attr('ng-repeat', parserResult.repeatExpression(groupByExp))\n .attr('ng-if', '$select.open'); //Prevent unnecessary watches when dropdown is closed\n \n\n var rowsInner = tElement.querySelectorAll('.ui-select-choices-row-inner');\n if (rowsInner.length !== 1) {\n throw uiSelectMinErr('rows', \"Expected 1 .ui-select-choices-row-inner but got '{0}'.\", rowsInner.length);\n }\n rowsInner.attr('uis-transclude-append', ''); //Adding uisTranscludeAppend directive to row element after choices element has ngRepeat\n\n // If IE8 then need to target rowsInner to apply the ng-click attr as choices will not capture the event. \n var clickTarget = $window.document.addEventListener ? choices : rowsInner;\n clickTarget.attr('ng-click', '$select.select(' + parserResult.itemName + ',$select.skipFocusser,$event)');\n \n return function link(scope, element, attrs, $select) {\n\n \n $select.parseRepeatAttr(attrs.repeat, groupByExp, groupFilterExp); //Result ready at $select.parserResult\n\n $select.disableChoiceExpression = attrs.uiDisableChoice;\n $select.onHighlightCallback = attrs.onHighlight;\n\n $select.dropdownPosition = attrs.position ? attrs.position.toLowerCase() : uiSelectConfig.dropdownPosition; \n\n scope.$on('$destroy', function() {\n choices.remove();\n });\n\n scope.$watch('$select.search', function(newValue) {\n if(newValue && !$select.open && $select.multiple) $select.activate(false, true);\n $select.activeIndex = $select.tagging.isActivated ? -1 : 0;\n if (!attrs.minimumInputLength || $select.search.length >= attrs.minimumInputLength) {\n $select.refresh(attrs.refresh);\n } else {\n $select.items = [];\n }\n });\n\n attrs.$observe('refreshDelay', function() {\n // $eval() is needed otherwise we get a string instead of a number\n var refreshDelay = scope.$eval(attrs.refreshDelay);\n $select.refreshDelay = refreshDelay !== undefined ? refreshDelay : uiSelectConfig.refreshDelay;\n });\n };\n }\n };\n}]);\n\n/**\n * Contains ui-select \"intelligence\".\n *\n * The goal is to limit dependency on the DOM whenever possible and\n * put as much logic in the controller (instead of the link functions) as possible so it can be easily tested.\n */\nuis.controller('uiSelectCtrl',\n ['$scope', '$element', '$timeout', '$filter', '$$uisDebounce', 'uisRepeatParser', 'uiSelectMinErr', 'uiSelectConfig', '$parse', '$injector', '$window',\n function($scope, $element, $timeout, $filter, $$uisDebounce, RepeatParser, uiSelectMinErr, uiSelectConfig, $parse, $injector, $window) {\n\n var ctrl = this;\n\n var EMPTY_SEARCH = '';\n\n ctrl.placeholder = uiSelectConfig.placeholder;\n ctrl.searchEnabled = uiSelectConfig.searchEnabled;\n ctrl.sortable = uiSelectConfig.sortable;\n ctrl.refreshDelay = uiSelectConfig.refreshDelay;\n ctrl.paste = uiSelectConfig.paste;\n\n ctrl.removeSelected = uiSelectConfig.removeSelected; //If selected item(s) should be removed from dropdown list\n ctrl.closeOnSelect = true; //Initialized inside uiSelect directive link function\n ctrl.skipFocusser = false; //Set to true to avoid returning focus to ctrl when item is selected\n ctrl.search = EMPTY_SEARCH;\n\n ctrl.activeIndex = 0; //Dropdown of choices\n ctrl.items = []; //All available choices\n\n ctrl.open = false;\n ctrl.focus = false;\n ctrl.disabled = false;\n ctrl.selected = undefined;\n\n ctrl.dropdownPosition = 'auto';\n\n ctrl.focusser = undefined; //Reference to input element used to handle focus events\n ctrl.resetSearchInput = true;\n ctrl.multiple = undefined; // Initialized inside uiSelect directive link function\n ctrl.disableChoiceExpression = undefined; // Initialized inside uiSelectChoices directive link function\n ctrl.tagging = {isActivated: false, fct: undefined};\n ctrl.taggingTokens = {isActivated: false, tokens: undefined};\n ctrl.lockChoiceExpression = undefined; // Initialized inside uiSelectMatch directive link function\n ctrl.clickTriggeredSelect = false;\n ctrl.$filter = $filter;\n ctrl.$element = $element;\n\n // Use $injector to check for $animate and store a reference to it\n ctrl.$animate = (function () {\n try {\n return $injector.get('$animate');\n } catch (err) {\n // $animate does not exist\n return null;\n }\n })();\n\n ctrl.searchInput = $element.querySelectorAll('input.ui-select-search');\n if (ctrl.searchInput.length !== 1) {\n throw uiSelectMinErr('searchInput', \"Expected 1 input.ui-select-search but got '{0}'.\", ctrl.searchInput.length);\n }\n\n ctrl.isEmpty = function() {\n return angular.isUndefined(ctrl.selected) || ctrl.selected === null || ctrl.selected === '' || (ctrl.multiple && ctrl.selected.length === 0);\n };\n\n function _findIndex(collection, predicate, thisArg){\n if (collection.findIndex){\n return collection.findIndex(predicate, thisArg);\n } else {\n var list = Object(collection);\n var length = list.length >>> 0;\n var value;\n\n for (var i = 0; i < length; i++) {\n value = list[i];\n if (predicate.call(thisArg, value, i, list)) {\n return i;\n }\n }\n return -1;\n }\n }\n\n // Most of the time the user does not want to empty the search input when in typeahead mode\n function _resetSearchInput() {\n if (ctrl.resetSearchInput || (ctrl.resetSearchInput === undefined && uiSelectConfig.resetSearchInput)) {\n ctrl.search = EMPTY_SEARCH;\n //reset activeIndex\n if (ctrl.selected && ctrl.items.length && !ctrl.multiple) {\n ctrl.activeIndex = _findIndex(ctrl.items, function(item){\n return angular.equals(this, item);\n }, ctrl.selected);\n }\n }\n }\n\n function _groupsFilter(groups, groupNames) {\n var i, j, result = [];\n for(i = 0; i < groupNames.length ;i++){\n for(j = 0; j < groups.length ;j++){\n if(groups[j].name == [groupNames[i]]){\n result.push(groups[j]);\n }\n }\n }\n return result;\n }\n\n // When the user clicks on ui-select, displays the dropdown list\n ctrl.activate = function(initSearchValue, avoidReset) {\n if (!ctrl.disabled && !ctrl.open) {\n if(!avoidReset) _resetSearchInput();\n\n $scope.$broadcast('uis:activate');\n\n ctrl.open = true;\n\n ctrl.activeIndex = ctrl.activeIndex >= ctrl.items.length ? 0 : ctrl.activeIndex;\n\n // ensure that the index is set to zero for tagging variants\n // that where first option is auto-selected\n if ( ctrl.activeIndex === -1 && ctrl.taggingLabel !== false ) {\n ctrl.activeIndex = 0;\n }\n\n var container = $element.querySelectorAll('.ui-select-choices-content');\n var searchInput = $element.querySelectorAll('.ui-select-search');\n if (ctrl.$animate && ctrl.$animate.on && ctrl.$animate.enabled(container[0])) {\n var animateHandler = function(elem, phase) {\n if (phase === 'start' && ctrl.items.length === 0) {\n // Only focus input after the animation has finished\n ctrl.$animate.off('removeClass', searchInput[0], animateHandler);\n $timeout(function () {\n ctrl.focusSearchInput(initSearchValue);\n });\n } else if (phase === 'close') {\n // Only focus input after the animation has finished\n ctrl.$animate.off('enter', container[0], animateHandler);\n $timeout(function () {\n ctrl.focusSearchInput(initSearchValue);\n });\n }\n };\n\n if (ctrl.items.length > 0) {\n ctrl.$animate.on('enter', container[0], animateHandler);\n } else {\n ctrl.$animate.on('removeClass', searchInput[0], animateHandler);\n }\n } else {\n $timeout(function () {\n ctrl.focusSearchInput(initSearchValue);\n if(!ctrl.tagging.isActivated && ctrl.items.length > 1) {\n _ensureHighlightVisible();\n }\n });\n }\n }\n };\n\n ctrl.focusSearchInput = function (initSearchValue) {\n ctrl.search = initSearchValue || ctrl.search;\n ctrl.searchInput[0].focus();\n };\n\n ctrl.findGroupByName = function(name) {\n return ctrl.groups && ctrl.groups.filter(function(group) {\n return group.name === name;\n })[0];\n };\n\n ctrl.parseRepeatAttr = function(repeatAttr, groupByExp, groupFilterExp) {\n function updateGroups(items) {\n var groupFn = $scope.$eval(groupByExp);\n ctrl.groups = [];\n angular.forEach(items, function(item) {\n var groupName = angular.isFunction(groupFn) ? groupFn(item) : item[groupFn];\n var group = ctrl.findGroupByName(groupName);\n if(group) {\n group.items.push(item);\n }\n else {\n ctrl.groups.push({name: groupName, items: [item]});\n }\n });\n if(groupFilterExp){\n var groupFilterFn = $scope.$eval(groupFilterExp);\n if( angular.isFunction(groupFilterFn)){\n ctrl.groups = groupFilterFn(ctrl.groups);\n } else if(angular.isArray(groupFilterFn)){\n ctrl.groups = _groupsFilter(ctrl.groups, groupFilterFn);\n }\n }\n ctrl.items = [];\n ctrl.groups.forEach(function(group) {\n ctrl.items = ctrl.items.concat(group.items);\n });\n }\n\n function setPlainItems(items) {\n ctrl.items = items;\n }\n\n ctrl.setItemsFn = groupByExp ? updateGroups : setPlainItems;\n\n ctrl.parserResult = RepeatParser.parse(repeatAttr);\n\n ctrl.isGrouped = !!groupByExp;\n ctrl.itemProperty = ctrl.parserResult.itemName;\n\n //If collection is an Object, convert it to Array\n\n var originalSource = ctrl.parserResult.source;\n\n //When an object is used as source, we better create an array and use it as 'source'\n var createArrayFromObject = function(){\n var origSrc = originalSource($scope);\n $scope.$uisSource = Object.keys(origSrc).map(function(v){\n var result = {};\n result[ctrl.parserResult.keyName] = v;\n result.value = origSrc[v];\n return result;\n });\n };\n\n if (ctrl.parserResult.keyName){ // Check for (key,value) syntax\n createArrayFromObject();\n ctrl.parserResult.source = $parse('$uisSource' + ctrl.parserResult.filters);\n $scope.$watch(originalSource, function(newVal, oldVal){\n if (newVal !== oldVal) createArrayFromObject();\n }, true);\n }\n\n ctrl.refreshItems = function (data){\n data = data || ctrl.parserResult.source($scope);\n var selectedItems = ctrl.selected;\n //TODO should implement for single mode removeSelected\n if (ctrl.isEmpty() || (angular.isArray(selectedItems) && !selectedItems.length) || !ctrl.multiple || !ctrl.removeSelected) {\n ctrl.setItemsFn(data);\n }else{\n if ( data !== undefined && data !== null ) {\n var filteredItems = data.filter(function(i) {\n return angular.isArray(selectedItems) ? selectedItems.every(function(selectedItem) {\n return !angular.equals(i, selectedItem);\n }) : !angular.equals(i, selectedItems);\n });\n ctrl.setItemsFn(filteredItems);\n }\n }\n if (ctrl.dropdownPosition === 'auto' || ctrl.dropdownPosition === 'up'){\n $scope.calculateDropdownPos();\n }\n\n $scope.$broadcast('uis:refresh');\n };\n\n // See https://github.com/angular/angular.js/blob/v1.2.15/src/ng/directive/ngRepeat.js#L259\n $scope.$watchCollection(ctrl.parserResult.source, function(items) {\n if (items === undefined || items === null) {\n // If the user specifies undefined or null => reset the collection\n // Special case: items can be undefined if the user did not initialized the collection on the scope\n // i.e $scope.addresses = [] is missing\n ctrl.items = [];\n } else {\n if (!angular.isArray(items)) {\n throw uiSelectMinErr('items', \"Expected an array but got '{0}'.\", items);\n } else {\n //Remove already selected items (ex: while searching)\n //TODO Should add a test\n ctrl.refreshItems(items);\n\n //update the view value with fresh data from items, if there is a valid model value\n if(angular.isDefined(ctrl.ngModel.$modelValue)) {\n ctrl.ngModel.$modelValue = null; //Force scope model value and ngModel value to be out of sync to re-run formatters\n }\n }\n }\n });\n\n };\n\n var _refreshDelayPromise;\n\n /**\n * Typeahead mode: lets the user refresh the collection using his own function.\n *\n * See Expose $select.search for external / remote filtering https://github.com/angular-ui/ui-select/pull/31\n */\n ctrl.refresh = function(refreshAttr) {\n if (refreshAttr !== undefined) {\n\n // Debounce\n // See https://github.com/angular-ui/bootstrap/blob/0.10.0/src/typeahead/typeahead.js#L155\n // FYI AngularStrap typeahead does not have debouncing: https://github.com/mgcrea/angular-strap/blob/v2.0.0-rc.4/src/typeahead/typeahead.js#L177\n if (_refreshDelayPromise) {\n $timeout.cancel(_refreshDelayPromise);\n }\n _refreshDelayPromise = $timeout(function() {\n $scope.$eval(refreshAttr);\n }, ctrl.refreshDelay);\n }\n };\n\n ctrl.isActive = function(itemScope) {\n if ( !ctrl.open ) {\n return false;\n }\n var itemIndex = ctrl.items.indexOf(itemScope[ctrl.itemProperty]);\n var isActive = itemIndex == ctrl.activeIndex;\n\n if ( !isActive || itemIndex < 0 ) {\n return false;\n }\n\n if (isActive && !angular.isUndefined(ctrl.onHighlightCallback)) {\n itemScope.$eval(ctrl.onHighlightCallback);\n }\n\n return isActive;\n };\n\n var _isItemSelected = function (item) {\n return (ctrl.selected && angular.isArray(ctrl.selected) &&\n ctrl.selected.filter(function (selection) { return angular.equals(selection, item); }).length > 0);\n };\n\n var disabledItems = [];\n\n function _updateItemDisabled(item, isDisabled) {\n var disabledItemIndex = disabledItems.indexOf(item);\n if (isDisabled && disabledItemIndex === -1) {\n disabledItems.push(item);\n }\n\n if (!isDisabled && disabledItemIndex > -1) {\n disabledItems.splice(disabledItemIndex, 0);\n }\n }\n\n function _isItemDisabled(item) {\n return disabledItems.indexOf(item) > -1;\n }\n \n ctrl.isDisabled = function(itemScope) {\n\n if (!ctrl.open) return;\n\n var item = itemScope[ctrl.itemProperty];\n var itemIndex = ctrl.items.indexOf(item);\n var isDisabled = false;\n \n if (itemIndex >= 0 && (angular.isDefined(ctrl.disableChoiceExpression) || ctrl.multiple)) {\n\n if (item.isTag) return false;\n\n if (ctrl.multiple) {\n isDisabled = _isItemSelected(item);\n }\n\n if (!isDisabled && angular.isDefined(ctrl.disableChoiceExpression)) {\n isDisabled = !!(itemScope.$eval(ctrl.disableChoiceExpression));\n }\n \n _updateItemDisabled(item, isDisabled);\n }\n\n return isDisabled;\n };\n\n\n // When the user selects an item with ENTER or clicks the dropdown\n ctrl.select = function(item, skipFocusser, $event) {\n if (item === undefined || !_isItemDisabled(item)) {\n\n if ( ! ctrl.items && ! ctrl.search && ! ctrl.tagging.isActivated) return;\n\n if (!item || !_isItemDisabled(item)) {\n if(ctrl.tagging.isActivated) {\n // if taggingLabel is disabled and item is undefined we pull from ctrl.search\n if ( ctrl.taggingLabel === false ) {\n if ( ctrl.activeIndex < 0 ) {\n if (item === undefined) {\n item = ctrl.tagging.fct !== undefined ? ctrl.tagging.fct(ctrl.search) : ctrl.search;\n }\n if (!item || angular.equals( ctrl.items[0], item ) ) {\n return;\n }\n } else {\n // keyboard nav happened first, user selected from dropdown\n item = ctrl.items[ctrl.activeIndex];\n }\n } else {\n // tagging always operates at index zero, taggingLabel === false pushes\n // the ctrl.search value without having it injected\n if ( ctrl.activeIndex === 0 ) {\n // ctrl.tagging pushes items to ctrl.items, so we only have empty val\n // for `item` if it is a detected duplicate\n if ( item === undefined ) return;\n\n // create new item on the fly if we don't already have one;\n // use tagging function if we have one\n if ( ctrl.tagging.fct !== undefined && typeof item === 'string' ) {\n item = ctrl.tagging.fct(item);\n if (!item) return;\n // if item type is 'string', apply the tagging label\n } else if ( typeof item === 'string' ) {\n // trim the trailing space\n item = item.replace(ctrl.taggingLabel,'').trim();\n }\n }\n }\n // search ctrl.selected for dupes potentially caused by tagging and return early if found\n if (_isItemSelected(item)) {\n ctrl.close(skipFocusser);\n return;\n }\n }\n\n $scope.$broadcast('uis:select', item);\n\n var locals = {};\n locals[ctrl.parserResult.itemName] = item;\n\n $timeout(function(){\n ctrl.onSelectCallback($scope, {\n $item: item,\n $model: ctrl.parserResult.modelMapper($scope, locals)\n });\n });\n\n if (ctrl.closeOnSelect) {\n ctrl.close(skipFocusser);\n }\n if ($event && $event.type === 'click') {\n ctrl.clickTriggeredSelect = true;\n }\n }\n }\n };\n\n // Closes the dropdown\n ctrl.close = function(skipFocusser) {\n if (!ctrl.open) return;\n if (ctrl.ngModel && ctrl.ngModel.$setTouched) ctrl.ngModel.$setTouched();\n _resetSearchInput();\n ctrl.open = false;\n\n $scope.$broadcast('uis:close', skipFocusser);\n\n };\n\n ctrl.setFocus = function(){\n if (!ctrl.focus) ctrl.focusInput[0].focus();\n };\n\n ctrl.clear = function($event) {\n ctrl.select(undefined);\n $event.stopPropagation();\n $timeout(function() {\n ctrl.focusser[0].focus();\n }, 0, false);\n };\n\n // Toggle dropdown\n ctrl.toggle = function(e) {\n if (ctrl.open) {\n ctrl.close();\n e.preventDefault();\n e.stopPropagation();\n } else {\n ctrl.activate();\n }\n };\n\n // Set default function for locked choices - avoids unnecessary \n // logic if functionality is not being used\n ctrl.isLocked = function () {\n return false;\n };\n\n $scope.$watch(function () {\n return angular.isDefined(ctrl.lockChoiceExpression) && ctrl.lockChoiceExpression !== \"\";\n }, _initaliseLockedChoices);\n\n function _initaliseLockedChoices(doInitalise) {\n if(!doInitalise) return;\n \n var lockedItems = [];\n\n function _updateItemLocked(item, isLocked) {\n var lockedItemIndex = lockedItems.indexOf(item);\n if (isLocked && lockedItemIndex === -1) {\n lockedItems.push(item);\n }\n\n if (!isLocked && lockedItemIndex > -1) {\n lockedItems.splice(lockedItemIndex, 0);\n }\n }\n\n function _isItemlocked(item) {\n return lockedItems.indexOf(item) > -1;\n }\n\n ctrl.isLocked = function (itemScope, itemIndex) {\n var isLocked = false,\n item = ctrl.selected[itemIndex];\n\n if(item) {\n if (itemScope) {\n isLocked = !!(itemScope.$eval(ctrl.lockChoiceExpression));\n _updateItemLocked(item, isLocked);\n } else {\n isLocked = _isItemlocked(item);\n }\n }\n\n return isLocked;\n };\n }\n \n\n var sizeWatch = null;\n var updaterScheduled = false;\n ctrl.sizeSearchInput = function() {\n\n var input = ctrl.searchInput[0],\n container = ctrl.searchInput.parent().parent()[0],\n calculateContainerWidth = function() {\n // Return the container width only if the search input is visible\n return container.clientWidth * !!input.offsetParent;\n },\n updateIfVisible = function(containerWidth) {\n if (containerWidth === 0) {\n return false;\n }\n var inputWidth = containerWidth - input.offsetLeft - 10;\n if (inputWidth < 50) inputWidth = containerWidth;\n ctrl.searchInput.css('width', inputWidth+'px');\n return true;\n };\n\n ctrl.searchInput.css('width', '10px');\n $timeout(function() { //Give tags time to render correctly\n if (sizeWatch === null && !updateIfVisible(calculateContainerWidth())) {\n sizeWatch = $scope.$watch(function() {\n if (!updaterScheduled) {\n updaterScheduled = true;\n $scope.$$postDigest(function() {\n updaterScheduled = false;\n if (updateIfVisible(calculateContainerWidth())) {\n sizeWatch();\n sizeWatch = null;\n }\n });\n }\n }, angular.noop);\n }\n });\n };\n\n function _handleDropDownSelection(key) {\n var processed = true;\n switch (key) {\n case KEY.DOWN:\n if (!ctrl.open && ctrl.multiple) ctrl.activate(false, true); //In case its the search input in 'multiple' mode\n else if (ctrl.activeIndex < ctrl.items.length - 1) { ctrl.activeIndex++; }\n break;\n case KEY.UP:\n if (!ctrl.open && ctrl.multiple) ctrl.activate(false, true); //In case its the search input in 'multiple' mode\n else if (ctrl.activeIndex > 0 || (ctrl.search.length === 0 && ctrl.tagging.isActivated && ctrl.activeIndex > -1)) { ctrl.activeIndex--; }\n break;\n case KEY.TAB:\n if (!ctrl.multiple || ctrl.open) ctrl.select(ctrl.items[ctrl.activeIndex], true);\n break;\n case KEY.ENTER:\n if(ctrl.open && (ctrl.tagging.isActivated || ctrl.activeIndex >= 0)){\n ctrl.select(ctrl.items[ctrl.activeIndex], ctrl.skipFocusser); // Make sure at least one dropdown item is highlighted before adding if not in tagging mode\n } else {\n ctrl.activate(false, true); //In case its the search input in 'multiple' mode\n }\n break;\n case KEY.ESC:\n ctrl.close();\n break;\n default:\n processed = false;\n }\n return processed;\n }\n\n // Bind to keyboard shortcuts\n ctrl.searchInput.on('keydown', function(e) {\n\n var key = e.which;\n\n if (~[KEY.ENTER,KEY.ESC].indexOf(key)){\n e.preventDefault();\n e.stopPropagation();\n }\n\n // if(~[KEY.ESC,KEY.TAB].indexOf(key)){\n // //TODO: SEGURO?\n // ctrl.close();\n // }\n\n $scope.$apply(function() {\n\n var tagged = false;\n\n if (ctrl.items.length > 0 || ctrl.tagging.isActivated) {\n _handleDropDownSelection(key);\n if ( ctrl.taggingTokens.isActivated ) {\n for (var i = 0; i < ctrl.taggingTokens.tokens.length; i++) {\n if ( ctrl.taggingTokens.tokens[i] === KEY.MAP[e.keyCode] ) {\n // make sure there is a new value to push via tagging\n if ( ctrl.search.length > 0 ) {\n tagged = true;\n }\n }\n }\n if ( tagged ) {\n $timeout(function() {\n ctrl.searchInput.triggerHandler('tagged');\n var newItem = ctrl.search.replace(KEY.MAP[e.keyCode],'').trim();\n if ( ctrl.tagging.fct ) {\n newItem = ctrl.tagging.fct( newItem );\n }\n if (newItem) ctrl.select(newItem, true);\n });\n }\n }\n }\n\n });\n\n if(KEY.isVerticalMovement(key) && ctrl.items.length > 0){\n _ensureHighlightVisible();\n }\n\n if (key === KEY.ENTER || key === KEY.ESC) {\n e.preventDefault();\n e.stopPropagation();\n }\n\n });\n\n ctrl.searchInput.on('paste', function (e) {\n var data;\n\n if (window.clipboardData && window.clipboardData.getData) { // IE\n data = window.clipboardData.getData('Text');\n } else {\n data = (e.originalEvent || e).clipboardData.getData('text/plain');\n }\n\n // Prepend the current input field text to the paste buffer.\n data = ctrl.search + data;\n\n if (data && data.length > 0) {\n // If tagging try to split by tokens and add items\n if (ctrl.taggingTokens.isActivated) {\n var items = [];\n for (var i = 0; i < ctrl.taggingTokens.tokens.length; i++) { // split by first token that is contained in data\n var separator = KEY.toSeparator(ctrl.taggingTokens.tokens[i]) || ctrl.taggingTokens.tokens[i];\n if (data.indexOf(separator) > -1) {\n items = data.split(separator);\n break; // only split by one token\n }\n }\n if (items.length === 0) {\n items = [data];\n }\n var oldsearch = ctrl.search;\n angular.forEach(items, function (item) {\n var newItem = ctrl.tagging.fct ? ctrl.tagging.fct(item) : item;\n if (newItem) {\n ctrl.select(newItem, true);\n }\n });\n ctrl.search = oldsearch || EMPTY_SEARCH;\n e.preventDefault();\n e.stopPropagation();\n } else if (ctrl.paste) {\n ctrl.paste(data);\n ctrl.search = EMPTY_SEARCH;\n e.preventDefault();\n e.stopPropagation();\n }\n }\n });\n\n ctrl.searchInput.on('tagged', function() {\n $timeout(function() {\n _resetSearchInput();\n });\n });\n\n // See https://github.com/ivaynberg/select2/blob/3.4.6/select2.js#L1431\n function _ensureHighlightVisible() {\n var container = $element.querySelectorAll('.ui-select-choices-content');\n var choices = container.querySelectorAll('.ui-select-choices-row');\n if (choices.length < 1) {\n throw uiSelectMinErr('choices', \"Expected multiple .ui-select-choices-row but got '{0}'.\", choices.length);\n }\n\n if (ctrl.activeIndex < 0) {\n return;\n }\n\n var highlighted = choices[ctrl.activeIndex];\n var posY = highlighted.offsetTop + highlighted.clientHeight - container[0].scrollTop;\n var height = container[0].offsetHeight;\n\n if (posY > height) {\n container[0].scrollTop += posY - height;\n } else if (posY < highlighted.clientHeight) {\n if (ctrl.isGrouped && ctrl.activeIndex === 0)\n container[0].scrollTop = 0; //To make group header visible when going all the way up\n else\n container[0].scrollTop -= highlighted.clientHeight - posY;\n }\n }\n\n var onResize = $$uisDebounce(function() {\n ctrl.sizeSearchInput();\n }, 50);\n\n angular.element($window).bind('resize', onResize);\n\n $scope.$on('$destroy', function() {\n ctrl.searchInput.off('keyup keydown tagged blur paste');\n angular.element($window).off('resize', onResize);\n });\n}]);\n\nuis.directive('uiSelect',\n ['$document', 'uiSelectConfig', 'uiSelectMinErr', 'uisOffset', '$compile', '$parse', '$timeout',\n function($document, uiSelectConfig, uiSelectMinErr, uisOffset, $compile, $parse, $timeout) {\n\n return {\n restrict: 'EA',\n templateUrl: function(tElement, tAttrs) {\n var theme = tAttrs.theme || uiSelectConfig.theme;\n return theme + (angular.isDefined(tAttrs.multiple) ? '/select-multiple.tpl.html' : '/select.tpl.html');\n },\n replace: true,\n transclude: true,\n require: ['uiSelect', '^ngModel'],\n scope: true,\n\n controller: 'uiSelectCtrl',\n controllerAs: '$select',\n compile: function(tElement, tAttrs) {\n\n // Allow setting ngClass on uiSelect\n var match = /{(.*)}\\s*{(.*)}/.exec(tAttrs.ngClass);\n if(match) {\n var combined = '{'+ match[1] +', '+ match[2] +'}';\n tAttrs.ngClass = combined;\n tElement.attr('ng-class', combined);\n }\n\n //Multiple or Single depending if multiple attribute presence\n if (angular.isDefined(tAttrs.multiple))\n tElement.append('<ui-select-multiple/>').removeAttr('multiple');\n else\n tElement.append('<ui-select-single/>');\n\n if (tAttrs.inputId)\n tElement.querySelectorAll('input.ui-select-search')[0].id = tAttrs.inputId;\n\n return function(scope, element, attrs, ctrls, transcludeFn) {\n\n var $select = ctrls[0];\n var ngModel = ctrls[1];\n\n $select.generatedId = uiSelectConfig.generateId();\n $select.baseTitle = attrs.title || 'Select box';\n $select.focusserTitle = $select.baseTitle + ' focus';\n $select.focusserId = 'focusser-' + $select.generatedId;\n\n $select.closeOnSelect = function() {\n if (angular.isDefined(attrs.closeOnSelect)) {\n return $parse(attrs.closeOnSelect)();\n } else {\n return uiSelectConfig.closeOnSelect;\n }\n }();\n\n scope.$watch('skipFocusser', function() {\n var skipFocusser = scope.$eval(attrs.skipFocusser);\n $select.skipFocusser = skipFocusser !== undefined ? skipFocusser : uiSelectConfig.skipFocusser;\n });\n\n $select.onSelectCallback = $parse(attrs.onSelect);\n $select.onRemoveCallback = $parse(attrs.onRemove);\n\n //Set reference to ngModel from uiSelectCtrl\n $select.ngModel = ngModel;\n\n $select.choiceGrouped = function(group){\n return $select.isGrouped && group && group.name;\n };\n\n if(attrs.tabindex){\n attrs.$observe('tabindex', function(value) {\n $select.focusInput.attr('tabindex', value);\n element.removeAttr('tabindex');\n });\n }\n\n scope.$watch(function () { return scope.$eval(attrs.searchEnabled); }, function(newVal) {\n $select.searchEnabled = newVal !== undefined ? newVal : uiSelectConfig.searchEnabled;\n });\n\n scope.$watch('sortable', function() {\n var sortable = scope.$eval(attrs.sortable);\n $select.sortable = sortable !== undefined ? sortable : uiSelectConfig.sortable;\n });\n\n attrs.$observe('limit', function() {\n //Limit the number of selections allowed\n $select.limit = (angular.isDefined(attrs.limit)) ? parseInt(attrs.limit, 10) : undefined;\n });\n\n scope.$watch('removeSelected', function() {\n var removeSelected = scope.$eval(attrs.removeSelected);\n $select.removeSelected = removeSelected !== undefined ? removeSelected : uiSelectConfig.removeSelected;\n });\n\n attrs.$observe('disabled', function() {\n // No need to use $eval() (thanks to ng-disabled) since we already get a boolean instead of a string\n $select.disabled = attrs.disabled !== undefined ? attrs.disabled : false;\n });\n\n attrs.$observe('resetSearchInput', function() {\n // $eval() is needed otherwise we get a string instead of a boolean\n var resetSearchInput = scope.$eval(attrs.resetSearchInput);\n $select.resetSearchInput = resetSearchInput !== undefined ? resetSearchInput : true;\n });\n\n attrs.$observe('paste', function() {\n $select.paste = scope.$eval(attrs.paste);\n });\n\n attrs.$observe('tagging', function() {\n if(attrs.tagging !== undefined)\n {\n // $eval() is needed otherwise we get a string instead of a boolean\n var taggingEval = scope.$eval(attrs.tagging);\n $select.tagging = {isActivated: true, fct: taggingEval !== true ? taggingEval : undefined};\n }\n else\n {\n $select.tagging = {isActivated: false, fct: undefined};\n }\n });\n\n attrs.$observe('taggingLabel', function() {\n if(attrs.tagging !== undefined )\n {\n // check eval for FALSE, in this case, we disable the labels\n // associated with tagging\n if ( attrs.taggingLabel === 'false' ) {\n $select.taggingLabel = false;\n }\n else\n {\n $select.taggingLabel = attrs.taggingLabel !== undefined ? attrs.taggingLabel : '(new)';\n }\n }\n });\n\n attrs.$observe('taggingTokens', function() {\n if (attrs.tagging !== undefined) {\n var tokens = attrs.taggingTokens !== undefined ? attrs.taggingTokens.split('|') : [',','ENTER'];\n $select.taggingTokens = {isActivated: true, tokens: tokens };\n }\n });\n\n //Automatically gets focus when loaded\n if (angular.isDefined(attrs.autofocus)){\n $timeout(function(){\n $select.setFocus();\n });\n }\n\n //Gets focus based on scope event name (e.g. focus-on='SomeEventName')\n if (angular.isDefined(attrs.focusOn)){\n scope.$on(attrs.focusOn, function() {\n $timeout(function(){\n $select.setFocus();\n });\n });\n }\n\n function onDocumentClick(e) {\n if (!$select.open) return; //Skip it if dropdown is close\n\n var contains = false;\n\n if (window.jQuery) {\n // Firefox 3.6 does not support element.contains()\n // See Node.contains https://developer.mozilla.org/en-US/docs/Web/API/Node.contains\n contains = window.jQuery.contains(element[0], e.target);\n } else {\n contains = element[0].contains(e.target);\n }\n\n if (!contains && !$select.clickTriggeredSelect) {\n var skipFocusser;\n if (!$select.skipFocusser) {\n //Will lose focus only with certain targets\n var focusableControls = ['input','button','textarea','select'];\n var targetController = angular.element(e.target).controller('uiSelect'); //To check if target is other ui-select\n skipFocusser = targetController && targetController !== $select; //To check if target is other ui-select\n if (!skipFocusser) skipFocusser = ~focusableControls.indexOf(e.target.tagName.toLowerCase()); //Check if target is input, button or textarea\n } else {\n skipFocusser = true;\n }\n $select.close(skipFocusser);\n scope.$digest();\n }\n $select.clickTriggeredSelect = false;\n }\n\n // See Click everywhere but here event http://stackoverflow.com/questions/12931369\n $document.on('click', onDocumentClick);\n\n scope.$on('$destroy', function() {\n $document.off('click', onDocumentClick);\n });\n\n // Move transcluded elements to their correct position in main template\n transcludeFn(scope, function(clone) {\n // See Transclude in AngularJS http://blog.omkarpatil.com/2012/11/transclude-in-angularjs.html\n\n // One day jqLite will be replaced by jQuery and we will be able to write:\n // var transcludedElement = clone.filter('.my-class')\n // instead of creating a hackish DOM element:\n var transcluded = angular.element('<div>').append(clone);\n\n var transcludedMatch = transcluded.querySelectorAll('.ui-select-match');\n transcludedMatch.removeAttr('ui-select-match'); //To avoid loop in case directive as attr\n transcludedMatch.removeAttr('data-ui-select-match'); // Properly handle HTML5 data-attributes\n if (transcludedMatch.length !== 1) {\n throw uiSelectMinErr('transcluded', \"Expected 1 .ui-select-match but got '{0}'.\", transcludedMatch.length);\n }\n element.querySelectorAll('.ui-select-match').replaceWith(transcludedMatch);\n\n var transcludedChoices = transcluded.querySelectorAll('.ui-select-choices');\n transcludedChoices.removeAttr('ui-select-choices'); //To avoid loop in case directive as attr\n transcludedChoices.removeAttr('data-ui-select-choices'); // Properly handle HTML5 data-attributes\n if (transcludedChoices.length !== 1) {\n throw uiSelectMinErr('transcluded', \"Expected 1 .ui-select-choices but got '{0}'.\", transcludedChoices.length);\n }\n element.querySelectorAll('.ui-select-choices').replaceWith(transcludedChoices);\n\n var transcludedNoChoice = transcluded.querySelectorAll('.ui-select-no-choice');\n transcludedNoChoice.removeAttr('ui-select-no-choice'); //To avoid loop in case directive as attr\n transcludedNoChoice.removeAttr('data-ui-select-no-choice'); // Properly handle HTML5 data-attributes\n if (transcludedNoChoice.length == 1) {\n element.querySelectorAll('.ui-select-no-choice').replaceWith(transcludedNoChoice);\n }\n });\n\n // Support for appending the select field to the body when its open\n var appendToBody = scope.$eval(attrs.appendToBody);\n if (appendToBody !== undefined ? appendToBody : uiSelectConfig.appendToBody) {\n scope.$watch('$select.open', function(isOpen) {\n if (isOpen) {\n positionDropdown();\n } else {\n resetDropdown();\n }\n });\n\n // Move the dropdown back to its original location when the scope is destroyed. Otherwise\n // it might stick around when the user routes away or the select field is otherwise removed\n scope.$on('$destroy', function() {\n resetDropdown();\n });\n }\n\n // Hold on to a reference to the .ui-select-container element for appendToBody support\n var placeholder = null,\n originalWidth = '';\n\n function positionDropdown() {\n // Remember the absolute position of the element\n var offset = uisOffset(element);\n\n // Clone the element into a placeholder element to take its original place in the DOM\n placeholder = angular.element('<div class=\"ui-select-placeholder\"></div>');\n placeholder[0].style.width = offset.width + 'px';\n placeholder[0].style.height = offset.height + 'px';\n element.after(placeholder);\n\n // Remember the original value of the element width inline style, so it can be restored\n // when the dropdown is closed\n originalWidth = element[0].style.width;\n\n // Now move the actual dropdown element to the end of the body\n $document.find('body').append(element);\n\n element[0].style.position = 'absolute';\n element[0].style.left = offset.left + 'px';\n element[0].style.top = offset.top + 'px';\n element[0].style.width = offset.width + 'px';\n }\n\n function resetDropdown() {\n if (placeholder === null) {\n // The dropdown has not actually been display yet, so there's nothing to reset\n return;\n }\n\n // Move the dropdown element back to its original location in the DOM\n placeholder.replaceWith(element);\n placeholder = null;\n\n element[0].style.position = '';\n element[0].style.left = '';\n element[0].style.top = '';\n element[0].style.width = originalWidth;\n\n // Set focus back on to the moved element\n $select.setFocus();\n }\n\n // Hold on to a reference to the .ui-select-dropdown element for direction support.\n var dropdown = null,\n directionUpClassName = 'direction-up';\n\n // Support changing the direction of the dropdown if there isn't enough space to render it.\n scope.$watch('$select.open', function() {\n\n if ($select.dropdownPosition === 'auto' || $select.dropdownPosition === 'up'){\n scope.calculateDropdownPos();\n }\n\n });\n\n var setDropdownPosUp = function(offset, offsetDropdown){\n\n offset = offset || uisOffset(element);\n offsetDropdown = offsetDropdown || uisOffset(dropdown);\n\n dropdown[0].style.position = 'absolute';\n dropdown[0].style.top = (offsetDropdown.height * -1) + 'px';\n element.addClass(directionUpClassName);\n\n };\n\n var setDropdownPosDown = function(offset, offsetDropdown){\n\n element.removeClass(directionUpClassName);\n\n offset = offset || uisOffset(element);\n offsetDropdown = offsetDropdown || uisOffset(dropdown);\n\n dropdown[0].style.position = '';\n dropdown[0].style.top = '';\n\n };\n\n var calculateDropdownPosAfterAnimation = function() {\n // Delay positioning the dropdown until all choices have been added so its height is correct.\n $timeout(function() {\n if ($select.dropdownPosition === 'up') {\n //Go UP\n setDropdownPosUp();\n } else {\n //AUTO\n element.removeClass(directionUpClassName);\n\n var offset = uisOffset(element);\n var offsetDropdown = uisOffset(dropdown);\n\n //https://code.google.com/p/chromium/issues/detail?id=342307#c4\n var scrollTop = $document[0].documentElement.scrollTop || $document[0].body.scrollTop; //To make it cross browser (blink, webkit, IE, Firefox).\n\n // Determine if the direction of the dropdown needs to be changed.\n if (offset.top + offset.height + offsetDropdown.height > scrollTop + $document[0].documentElement.clientHeight) {\n //Go UP\n setDropdownPosUp(offset, offsetDropdown);\n }else{\n //Go DOWN\n setDropdownPosDown(offset, offsetDropdown);\n }\n }\n\n // Display the dropdown once it has been positioned.\n dropdown[0].style.opacity = 1;\n });\n };\n\n scope.calculateDropdownPos = function() {\n if ($select.open) {\n dropdown = angular.element(element).querySelectorAll('.ui-select-dropdown');\n\n if (dropdown.length === 0) {\n return;\n }\n\n // Hide the dropdown so there is no flicker until $timeout is done executing.\n dropdown[0].style.opacity = 0;\n\n if (!uisOffset(dropdown).height && $select.$animate && $select.$animate.on && $select.$animate.enabled(dropdown)) {\n var needsCalculated = true;\n\n $select.$animate.on('enter', dropdown, function (elem, phase) {\n if (phase === 'close' && needsCalculated) {\n calculateDropdownPosAfterAnimation();\n needsCalculated = false;\n }\n });\n } else {\n calculateDropdownPosAfterAnimation();\n }\n } else {\n if (dropdown === null || dropdown.length === 0) {\n return;\n }\n\n // Reset the position of the dropdown.\n dropdown[0].style.opacity = 0;\n dropdown[0].style.position = '';\n dropdown[0].style.top = '';\n element.removeClass(directionUpClassName);\n }\n };\n };\n }\n };\n}]);\n\nuis.directive('uiSelectMatch', ['uiSelectConfig', function(uiSelectConfig) {\n return {\n restrict: 'EA',\n require: '^uiSelect',\n replace: true,\n transclude: true,\n templateUrl: function(tElement) {\n // Needed so the uiSelect can detect the transcluded content\n tElement.addClass('ui-select-match');\n\n var parent = tElement.parent();\n // Gets theme attribute from parent (ui-select)\n var theme = getAttribute(parent, 'theme') || uiSelectConfig.theme;\n var multi = angular.isDefined(getAttribute(parent, 'multiple'));\n\n return theme + (multi ? '/match-multiple.tpl.html' : '/match.tpl.html'); \n },\n link: function(scope, element, attrs, $select) {\n $select.lockChoiceExpression = attrs.uiLockChoice;\n attrs.$observe('placeholder', function(placeholder) {\n $select.placeholder = placeholder !== undefined ? placeholder : uiSelectConfig.placeholder;\n });\n\n function setAllowClear(allow) {\n $select.allowClear = (angular.isDefined(allow)) ? (allow === '') ? true : (allow.toLowerCase() === 'true') : false;\n }\n\n attrs.$observe('allowClear', setAllowClear);\n setAllowClear(attrs.allowClear);\n\n if($select.multiple){\n $select.sizeSearchInput();\n }\n\n }\n };\n\n function getAttribute(elem, attribute) {\n if (elem[0].hasAttribute(attribute))\n return elem.attr(attribute);\n\n if (elem[0].hasAttribute('data-' + attribute))\n return elem.attr('data-' + attribute);\n\n if (elem[0].hasAttribute('x-' + attribute))\n return elem.attr('x-' + attribute);\n }\n}]);\n\nuis.directive('uiSelectMultiple', ['uiSelectMinErr','$timeout', function(uiSelectMinErr, $timeout) {\n return {\n restrict: 'EA',\n require: ['^uiSelect', '^ngModel'],\n\n controller: ['$scope','$timeout', function($scope, $timeout){\n\n var ctrl = this,\n $select = $scope.$select,\n ngModel;\n\n if (angular.isUndefined($select.selected))\n $select.selected = [];\n\n //Wait for link fn to inject it\n $scope.$evalAsync(function(){ ngModel = $scope.ngModel; });\n\n ctrl.activeMatchIndex = -1;\n\n ctrl.updateModel = function(){\n ngModel.$setViewValue(Date.now()); //Set timestamp as a unique string to force changes\n ctrl.refreshComponent();\n };\n\n ctrl.refreshComponent = function(){\n //Remove already selected items\n //e.g. When user clicks on a selection, the selected array changes and\n //the dropdown should remove that item\n if($select.refreshItems){\n $select.refreshItems();\n }\n if($select.sizeSearchInput){\n $select.sizeSearchInput();\n }\n };\n\n // Remove item from multiple select\n ctrl.removeChoice = function(index){\n\n // if the choice is locked, don't remove it\n if($select.isLocked(null, index)) return false;\n\n var removedChoice = $select.selected[index];\n\n var locals = {};\n locals[$select.parserResult.itemName] = removedChoice;\n\n $select.selected.splice(index, 1);\n ctrl.activeMatchIndex = -1;\n $select.sizeSearchInput();\n\n // Give some time for scope propagation.\n $timeout(function(){\n $select.onRemoveCallback($scope, {\n $item: removedChoice,\n $model: $select.parserResult.modelMapper($scope, locals)\n });\n });\n\n ctrl.updateModel();\n\n return true;\n };\n\n ctrl.getPlaceholder = function(){\n //Refactor single?\n if($select.selected && $select.selected.length) return;\n return $select.placeholder;\n };\n\n\n }],\n controllerAs: '$selectMultiple',\n\n link: function(scope, element, attrs, ctrls) {\n\n var $select = ctrls[0];\n var ngModel = scope.ngModel = ctrls[1];\n var $selectMultiple = scope.$selectMultiple;\n\n //$select.selected = raw selected objects (ignoring any property binding)\n\n $select.multiple = true;\n\n //Input that will handle focus\n $select.focusInput = $select.searchInput;\n\n //Properly check for empty if set to multiple\n ngModel.$isEmpty = function(value) {\n return !value || value.length === 0;\n };\n\n //From view --> model\n ngModel.$parsers.unshift(function () {\n var locals = {},\n result,\n resultMultiple = [];\n for (var j = $select.selected.length - 1; j >= 0; j--) {\n locals = {};\n locals[$select.parserResult.itemName] = $select.selected[j];\n result = $select.parserResult.modelMapper(scope, locals);\n resultMultiple.unshift(result);\n }\n return resultMultiple;\n });\n\n // From model --> view\n ngModel.$formatters.unshift(function (inputValue) {\n var data = $select.parserResult && $select.parserResult.source (scope, { $select : {search:''}}), //Overwrite $search\n locals = {},\n result;\n if (!data) return inputValue;\n var resultMultiple = [];\n var checkFnMultiple = function(list, value){\n if (!list || !list.length) return;\n for (var p = list.length - 1; p >= 0; p--) {\n locals[$select.parserResult.itemName] = list[p];\n result = $select.parserResult.modelMapper(scope, locals);\n if($select.parserResult.trackByExp){\n var propsItemNameMatches = /(\\w*)\\./.exec($select.parserResult.trackByExp);\n var matches = /\\.([^\\s]+)/.exec($select.parserResult.trackByExp);\n if(propsItemNameMatches && propsItemNameMatches.length > 0 && propsItemNameMatches[1] == $select.parserResult.itemName){\n if(matches && matches.length>0 && result[matches[1]] == value[matches[1]]){\n resultMultiple.unshift(list[p]);\n return true;\n }\n }\n }\n if (angular.equals(result,value)){\n resultMultiple.unshift(list[p]);\n return true;\n }\n }\n return false;\n };\n if (!inputValue) return resultMultiple; //If ngModel was undefined\n for (var k = inputValue.length - 1; k >= 0; k--) {\n //Check model array of currently selected items\n if (!checkFnMultiple($select.selected, inputValue[k])){\n //Check model array of all items available\n if (!checkFnMultiple(data, inputValue[k])){\n //If not found on previous lists, just add it directly to resultMultiple\n resultMultiple.unshift(inputValue[k]);\n }\n }\n }\n return resultMultiple;\n });\n\n //Watch for external model changes\n scope.$watchCollection(function(){ return ngModel.$modelValue; }, function(newValue, oldValue) {\n if (oldValue != newValue){\n //update the view value with fresh data from items, if there is a valid model value\n if(angular.isDefined(ngModel.$modelValue)) {\n ngModel.$modelValue = null; //Force scope model value and ngModel value to be out of sync to re-run formatters\n }\n $selectMultiple.refreshComponent();\n }\n });\n\n ngModel.$render = function() {\n // Make sure that model value is array\n if(!angular.isArray(ngModel.$viewValue)){\n // Have tolerance for null or undefined values\n if(angular.isUndefined(ngModel.$viewValue) || ngModel.$viewValue === null){\n ngModel.$viewValue = [];\n } else {\n throw uiSelectMinErr('multiarr', \"Expected model value to be array but got '{0}'\", ngModel.$viewValue);\n }\n }\n $select.selected = ngModel.$viewValue;\n $selectMultiple.refreshComponent();\n scope.$evalAsync(); //To force $digest\n };\n\n scope.$on('uis:select', function (event, item) {\n if($select.selected.length >= $select.limit) {\n return;\n }\n $select.selected.push(item);\n $selectMultiple.updateModel();\n });\n\n scope.$on('uis:activate', function () {\n $selectMultiple.activeMatchIndex = -1;\n });\n\n scope.$watch('$select.disabled', function(newValue, oldValue) {\n // As the search input field may now become visible, it may be necessary to recompute its size\n if (oldValue && !newValue) $select.sizeSearchInput();\n });\n\n $select.searchInput.on('keydown', function(e) {\n var key = e.which;\n scope.$apply(function() {\n var processed = false;\n // var tagged = false; //Checkme\n if(KEY.isHorizontalMovement(key)){\n processed = _handleMatchSelection(key);\n }\n if (processed && key != KEY.TAB) {\n //TODO Check si el tab selecciona aun correctamente\n //Crear test\n e.preventDefault();\n e.stopPropagation();\n }\n });\n });\n function _getCaretPosition(el) {\n if(angular.isNumber(el.selectionStart)) return el.selectionStart;\n // selectionStart is not supported in IE8 and we don't want hacky workarounds so we compromise\n else return el.value.length;\n }\n // Handles selected options in \"multiple\" mode\n function _handleMatchSelection(key){\n var caretPosition = _getCaretPosition($select.searchInput[0]),\n length = $select.selected.length,\n // none = -1,\n first = 0,\n last = length-1,\n curr = $selectMultiple.activeMatchIndex,\n next = $selectMultiple.activeMatchIndex+1,\n prev = $selectMultiple.activeMatchIndex-1,\n newIndex = curr;\n\n if(caretPosition > 0 || ($select.search.length && key == KEY.RIGHT)) return false;\n\n $select.close();\n\n function getNewActiveMatchIndex(){\n switch(key){\n case KEY.LEFT:\n // Select previous/first item\n if(~$selectMultiple.activeMatchIndex) return prev;\n // Select last item\n else return last;\n break;\n case KEY.RIGHT:\n // Open drop-down\n if(!~$selectMultiple.activeMatchIndex || curr === last){\n $select.activate();\n return false;\n }\n // Select next/last item\n else return next;\n break;\n case KEY.BACKSPACE:\n // Remove selected item and select previous/first\n if(~$selectMultiple.activeMatchIndex){\n if($selectMultiple.removeChoice(curr)) {\n return prev;\n } else {\n return curr;\n }\n \n } else {\n // If nothing yet selected, select last item\n return last; \n } \n break;\n case KEY.DELETE:\n // Remove selected item and select next item\n if(~$selectMultiple.activeMatchIndex){\n $selectMultiple.removeChoice($selectMultiple.activeMatchIndex);\n return curr;\n }\n else return false;\n }\n }\n\n newIndex = getNewActiveMatchIndex();\n\n if(!$select.selected.length || newIndex === false) $selectMultiple.activeMatchIndex = -1;\n else $selectMultiple.activeMatchIndex = Math.min(last,Math.max(first,newIndex));\n\n return true;\n }\n\n $select.searchInput.on('keyup', function(e) {\n\n if ( ! KEY.isVerticalMovement(e.which) ) {\n scope.$evalAsync( function () {\n $select.activeIndex = $select.taggingLabel === false ? -1 : 0;\n });\n }\n // Push a \"create new\" item into array if there is a search string\n if ( $select.tagging.isActivated && $select.search.length > 0 ) {\n\n // return early with these keys\n if (e.which === KEY.TAB || KEY.isControl(e) || KEY.isFunctionKey(e) || e.which === KEY.ESC || KEY.isVerticalMovement(e.which) ) {\n return;\n }\n // always reset the activeIndex to the first item when tagging\n $select.activeIndex = $select.taggingLabel === false ? -1 : 0;\n // taggingLabel === false bypasses all of this\n if ($select.taggingLabel === false) return;\n\n var items = angular.copy( $select.items );\n var stashArr = angular.copy( $select.items );\n var newItem;\n var item;\n var hasTag = false;\n var dupeIndex = -1;\n var tagItems;\n var tagItem;\n\n // case for object tagging via transform `$select.tagging.fct` function\n if ( $select.tagging.fct !== undefined) {\n tagItems = $select.$filter('filter')(items,{'isTag': true});\n if ( tagItems.length > 0 ) {\n tagItem = tagItems[0];\n }\n // remove the first element, if it has the `isTag` prop we generate a new one with each keyup, shaving the previous\n if ( items.length > 0 && tagItem ) {\n hasTag = true;\n items = items.slice(1,items.length);\n stashArr = stashArr.slice(1,stashArr.length);\n }\n newItem = $select.tagging.fct($select.search);\n // verify the new tag doesn't match the value of a possible selection choice or an already selected item.\n if (\n stashArr.some(function (origItem) {\n return angular.equals(origItem, newItem);\n }) ||\n $select.selected.some(function (origItem) {\n return angular.equals(origItem, newItem);\n })\n ) {\n scope.$evalAsync(function () {\n $select.activeIndex = 0;\n $select.items = items;\n });\n return;\n }\n if (newItem) newItem.isTag = true;\n // handle newItem string and stripping dupes in tagging string context\n } else {\n // find any tagging items already in the $select.items array and store them\n tagItems = $select.$filter('filter')(items,function (item) {\n return item.match($select.taggingLabel);\n });\n if ( tagItems.length > 0 ) {\n tagItem = tagItems[0];\n }\n item = items[0];\n // remove existing tag item if found (should only ever be one tag item)\n if ( item !== undefined && items.length > 0 && tagItem ) {\n hasTag = true;\n items = items.slice(1,items.length);\n stashArr = stashArr.slice(1,stashArr.length);\n }\n newItem = $select.search+' '+$select.taggingLabel;\n if ( _findApproxDupe($select.selected, $select.search) > -1 ) {\n return;\n }\n // verify the the tag doesn't match the value of an existing item from\n // the searched data set or the items already selected\n if ( _findCaseInsensitiveDupe(stashArr.concat($select.selected)) ) {\n // if there is a tag from prev iteration, strip it / queue the change\n // and return early\n if ( hasTag ) {\n items = stashArr;\n scope.$evalAsync( function () {\n $select.activeIndex = 0;\n $select.items = items;\n });\n }\n return;\n }\n if ( _findCaseInsensitiveDupe(stashArr) ) {\n // if there is a tag from prev iteration, strip it\n if ( hasTag ) {\n $select.items = stashArr.slice(1,stashArr.length);\n }\n return;\n }\n }\n if ( hasTag ) dupeIndex = _findApproxDupe($select.selected, newItem);\n // dupe found, shave the first item\n if ( dupeIndex > -1 ) {\n items = items.slice(dupeIndex+1,items.length-1);\n } else {\n items = [];\n if (newItem) items.push(newItem);\n items = items.concat(stashArr);\n }\n scope.$evalAsync( function () {\n $select.activeIndex = 0;\n $select.items = items;\n\n if ($select.isGrouped) {\n // update item references in groups, so that indexOf will work after angular.copy\n var itemsWithoutTag = newItem ? items.slice(1) : items;\n $select.setItemsFn(itemsWithoutTag);\n if (newItem) {\n // add tag item as a new group\n $select.items.unshift(newItem);\n $select.groups.unshift({name: '', items: [newItem], tagging: true});\n }\n }\n });\n }\n });\n function _findCaseInsensitiveDupe(arr) {\n if ( arr === undefined || $select.search === undefined ) {\n return false;\n }\n var hasDupe = arr.filter( function (origItem) {\n if ( $select.search.toUpperCase() === undefined || origItem === undefined ) {\n return false;\n }\n return origItem.toUpperCase() === $select.search.toUpperCase();\n }).length > 0;\n\n return hasDupe;\n }\n function _findApproxDupe(haystack, needle) {\n var dupeIndex = -1;\n if(angular.isArray(haystack)) {\n var tempArr = angular.copy(haystack);\n for (var i = 0; i <tempArr.length; i++) {\n // handle the simple string version of tagging\n if ( $select.tagging.fct === undefined ) {\n // search the array for the match\n if ( tempArr[i]+' '+$select.taggingLabel === needle ) {\n dupeIndex = i;\n }\n // handle the object tagging implementation\n } else {\n var mockObj = tempArr[i];\n if (angular.isObject(mockObj)) {\n mockObj.isTag = true;\n }\n if ( angular.equals(mockObj, needle) ) {\n dupeIndex = i;\n }\n }\n }\n }\n return dupeIndex;\n }\n\n $select.searchInput.on('blur', function() {\n $timeout(function() {\n $selectMultiple.activeMatchIndex = -1;\n });\n });\n\n }\n };\n}]);\n\nuis.directive('uiSelectNoChoice',\n ['uiSelectConfig', function (uiSelectConfig) {\n return {\n restrict: 'EA',\n require: '^uiSelect',\n replace: true,\n transclude: true,\n templateUrl: function (tElement) {\n // Needed so the uiSelect can detect the transcluded content\n tElement.addClass('ui-select-no-choice');\n \n // Gets theme attribute from parent (ui-select)\n var theme = tElement.parent().attr('theme') || uiSelectConfig.theme;\n return theme + '/no-choice.tpl.html';\n }\n };\n }]);\n\nuis.directive('uiSelectSingle', ['$timeout','$compile', function($timeout, $compile) {\n return {\n restrict: 'EA',\n require: ['^uiSelect', '^ngModel'],\n link: function(scope, element, attrs, ctrls) {\n\n var $select = ctrls[0];\n var ngModel = ctrls[1];\n\n //From view --> model\n ngModel.$parsers.unshift(function (inputValue) {\n var locals = {},\n result;\n locals[$select.parserResult.itemName] = inputValue;\n result = $select.parserResult.modelMapper(scope, locals);\n return result;\n });\n\n //From model --> view\n ngModel.$formatters.unshift(function (inputValue) {\n var data = $select.parserResult && $select.parserResult.source (scope, { $select : {search:''}}), //Overwrite $search\n locals = {},\n result;\n if (data){\n var checkFnSingle = function(d){\n locals[$select.parserResult.itemName] = d;\n result = $select.parserResult.modelMapper(scope, locals);\n return result === inputValue;\n };\n //If possible pass same object stored in $select.selected\n if ($select.selected && checkFnSingle($select.selected)) {\n return $select.selected;\n }\n for (var i = data.length - 1; i >= 0; i--) {\n if (checkFnSingle(data[i])) return data[i];\n }\n }\n return inputValue;\n });\n\n //Update viewValue if model change\n scope.$watch('$select.selected', function(newValue) {\n if (ngModel.$viewValue !== newValue) {\n ngModel.$setViewValue(newValue);\n }\n });\n\n ngModel.$render = function() {\n $select.selected = ngModel.$viewValue;\n };\n\n scope.$on('uis:select', function (event, item) {\n $select.selected = item;\n });\n\n scope.$on('uis:close', function (event, skipFocusser) {\n $timeout(function(){\n $select.focusser.prop('disabled', false);\n if (!skipFocusser) $select.focusser[0].focus();\n },0,false);\n });\n\n scope.$on('uis:activate', function () {\n focusser.prop('disabled', true); //Will reactivate it on .close()\n });\n\n //Idea from: https://github.com/ivaynberg/select2/blob/79b5bf6db918d7560bdd959109b7bcfb47edaf43/select2.js#L1954\n var focusser = angular.element(\"<input ng-disabled='$select.disabled' class='ui-select-focusser ui-select-offscreen' type='text' id='{{ $select.focusserId }}' aria-label='{{ $select.focusserTitle }}' aria-haspopup='true' role='button' />\");\n $compile(focusser)(scope);\n $select.focusser = focusser;\n\n //Input that will handle focus\n $select.focusInput = focusser;\n\n element.parent().append(focusser);\n focusser.bind(\"focus\", function(){\n scope.$evalAsync(function(){\n $select.focus = true;\n });\n });\n focusser.bind(\"blur\", function(){\n scope.$evalAsync(function(){\n $select.focus = false;\n });\n });\n focusser.bind(\"keydown\", function(e){\n\n if (e.which === KEY.BACKSPACE) {\n e.preventDefault();\n e.stopPropagation();\n $select.select(undefined);\n scope.$apply();\n return;\n }\n\n if (e.which === KEY.TAB || KEY.isControl(e) || KEY.isFunctionKey(e) || e.which === KEY.ESC) {\n return;\n }\n\n if (e.which == KEY.DOWN || e.which == KEY.UP || e.which == KEY.ENTER || e.which == KEY.SPACE){\n e.preventDefault();\n e.stopPropagation();\n $select.activate();\n }\n\n scope.$digest();\n });\n\n focusser.bind(\"keyup input\", function(e){\n\n if (e.which === KEY.TAB || KEY.isControl(e) || KEY.isFunctionKey(e) || e.which === KEY.ESC || e.which == KEY.ENTER || e.which === KEY.BACKSPACE) {\n return;\n }\n\n $select.activate(focusser.val()); //User pressed some regular key, so we pass it to the search input\n focusser.val('');\n scope.$digest();\n\n });\n\n\n }\n };\n}]);\n\n// Make multiple matches sortable\nuis.directive('uiSelectSort', ['$timeout', 'uiSelectConfig', 'uiSelectMinErr', function($timeout, uiSelectConfig, uiSelectMinErr) {\n return {\n require: ['^^uiSelect', '^ngModel'],\n link: function(scope, element, attrs, ctrls) {\n if (scope[attrs.uiSelectSort] === null) {\n throw uiSelectMinErr('sort', 'Expected a list to sort');\n }\n\n var $select = ctrls[0];\n var $ngModel = ctrls[1];\n\n var options = angular.extend({\n axis: 'horizontal'\n },\n scope.$eval(attrs.uiSelectSortOptions));\n\n var axis = options.axis;\n var draggingClassName = 'dragging';\n var droppingClassName = 'dropping';\n var droppingBeforeClassName = 'dropping-before';\n var droppingAfterClassName = 'dropping-after';\n\n scope.$watch(function(){\n return $select.sortable;\n }, function(newValue){\n if (newValue) {\n element.attr('draggable', true);\n } else {\n element.removeAttr('draggable');\n }\n });\n\n element.on('dragstart', function(event) {\n element.addClass(draggingClassName);\n\n (event.dataTransfer || event.originalEvent.dataTransfer).setData('text', scope.$index.toString());\n });\n\n element.on('dragend', function() {\n removeClass(draggingClassName);\n });\n\n var move = function(from, to) {\n /*jshint validthis: true */\n this.splice(to, 0, this.splice(from, 1)[0]);\n };\n\n var removeClass = function(className) {\n angular.forEach($select.$element.querySelectorAll('.' + className), function(el){\n angular.element(el).removeClass(className);\n });\n };\n\n var dragOverHandler = function(event) {\n event.preventDefault();\n\n var offset = axis === 'vertical' ? event.offsetY || event.layerY || (event.originalEvent ? event.originalEvent.offsetY : 0) : event.offsetX || event.layerX || (event.originalEvent ? event.originalEvent.offsetX : 0);\n\n if (offset < (this[axis === 'vertical' ? 'offsetHeight' : 'offsetWidth'] / 2)) {\n removeClass(droppingAfterClassName);\n element.addClass(droppingBeforeClassName);\n\n } else {\n removeClass(droppingBeforeClassName);\n element.addClass(droppingAfterClassName);\n }\n };\n\n var dropTimeout;\n\n var dropHandler = function(event) {\n event.preventDefault();\n\n var droppedItemIndex = parseInt((event.dataTransfer || event.originalEvent.dataTransfer).getData('text'), 10);\n\n // prevent event firing multiple times in firefox\n $timeout.cancel(dropTimeout);\n dropTimeout = $timeout(function() {\n _dropHandler(droppedItemIndex);\n }, 20);\n };\n\n var _dropHandler = function(droppedItemIndex) {\n var theList = scope.$eval(attrs.uiSelectSort);\n var itemToMove = theList[droppedItemIndex];\n var newIndex = null;\n\n if (element.hasClass(droppingBeforeClassName)) {\n if (droppedItemIndex < scope.$index) {\n newIndex = scope.$index - 1;\n } else {\n newIndex = scope.$index;\n }\n } else {\n if (droppedItemIndex < scope.$index) {\n newIndex = scope.$index;\n } else {\n newIndex = scope.$index + 1;\n }\n }\n\n move.apply(theList, [droppedItemIndex, newIndex]);\n\n $ngModel.$setViewValue(Date.now());\n\n scope.$apply(function() {\n scope.$emit('uiSelectSort:change', {\n array: theList,\n item: itemToMove,\n from: droppedItemIndex,\n to: newIndex\n });\n });\n\n removeClass(droppingClassName);\n removeClass(droppingBeforeClassName);\n removeClass(droppingAfterClassName);\n\n element.off('drop', dropHandler);\n };\n\n element.on('dragenter', function() {\n if (element.hasClass(draggingClassName)) {\n return;\n }\n\n element.addClass(droppingClassName);\n\n element.on('dragover', dragOverHandler);\n element.on('drop', dropHandler);\n });\n\n element.on('dragleave', function(event) {\n if (event.target != element) {\n return;\n }\n\n removeClass(droppingClassName);\n removeClass(droppingBeforeClassName);\n removeClass(droppingAfterClassName);\n\n element.off('dragover', dragOverHandler);\n element.off('drop', dropHandler);\n });\n }\n };\n}]);\n\n/**\n * Parses \"repeat\" attribute.\n *\n * Taken from AngularJS ngRepeat source code\n * See https://github.com/angular/angular.js/blob/v1.2.15/src/ng/directive/ngRepeat.js#L211\n *\n * Original discussion about parsing \"repeat\" attribute instead of fully relying on ng-repeat:\n * https://github.com/angular-ui/ui-select/commit/5dd63ad#commitcomment-5504697\n */\n\nuis.service('uisRepeatParser', ['uiSelectMinErr','$parse', function(uiSelectMinErr, $parse) {\n var self = this;\n\n /**\n * Example:\n * expression = \"address in addresses | filter: {street: $select.search} track by $index\"\n * itemName = \"address\",\n * source = \"addresses | filter: {street: $select.search}\",\n * trackByExp = \"$index\",\n */\n self.parse = function(expression) {\n\n\n var match;\n //var isObjectCollection = /\\(\\s*([\\$\\w][\\$\\w]*)\\s*,\\s*([\\$\\w][\\$\\w]*)\\s*\\)/.test(expression);\n // If an array is used as collection\n\n // if (isObjectCollection){\n // 000000000000000000000000000000111111111000000000000000222222222222220033333333333333333333330000444444444444444444000000000000000055555555555000000000000000000000066666666600000000\n match = expression.match(/^\\s*(?:([\\s\\S]+?)\\s+as\\s+)?(?:([\\$\\w][\\$\\w]*)|(?:\\(\\s*([\\$\\w][\\$\\w]*)\\s*,\\s*([\\$\\w][\\$\\w]*)\\s*\\)))\\s+in\\s+(\\s*[\\s\\S]+?)?(?:\\s+track\\s+by\\s+([\\s\\S]+?))?\\s*$/);\n\n // 1 Alias\n // 2 Item\n // 3 Key on (key,value)\n // 4 Value on (key,value)\n // 5 Source expression (including filters)\n // 6 Track by\n\n if (!match) {\n throw uiSelectMinErr('iexp', \"Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.\",\n expression);\n }\n \n var source = match[5], \n filters = '';\n\n // When using (key,value) ui-select requires filters to be extracted, since the object\n // is converted to an array for $select.items \n // (in which case the filters need to be reapplied)\n if (match[3]) {\n // Remove any enclosing parenthesis\n source = match[5].replace(/(^\\()|(\\)$)/g, '');\n // match all after | but not after ||\n var filterMatch = match[5].match(/^\\s*(?:[\\s\\S]+?)(?:[^\\|]|\\|\\|)+([\\s\\S]*)\\s*$/);\n if(filterMatch && filterMatch[1].trim()) {\n filters = filterMatch[1];\n source = source.replace(filters, '');\n } \n }\n\n return {\n itemName: match[4] || match[2], // (lhs) Left-hand side,\n keyName: match[3], //for (key, value) syntax\n source: $parse(source),\n filters: filters,\n trackByExp: match[6],\n modelMapper: $parse(match[1] || match[4] || match[2]),\n repeatExpression: function (grouped) {\n var expression = this.itemName + ' in ' + (grouped ? '$group.items' : '$select.items');\n if (this.trackByExp) {\n expression += ' track by ' + this.trackByExp;\n }\n return expression;\n } \n };\n\n };\n\n self.getGroupNgRepeatExpression = function() {\n return '$group in $select.groups';\n };\n\n}]);\n\n}());\nangular.module(\"ui.select\").run([\"$templateCache\", function($templateCache) {$templateCache.put(\"bootstrap/choices.tpl.html\",\"<ul class=\\\"ui-select-choices ui-select-choices-content ui-select-dropdown dropdown-menu\\\" role=\\\"listbox\\\" ng-show=\\\"$select.open && $select.items.length > 0\\\"><li class=\\\"ui-select-choices-group\\\" id=\\\"ui-select-choices-{{ $select.generatedId }}\\\"><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=\\\"$group.name\\\"></div><div ng-attr-id=\\\"ui-select-choices-row-{{ $select.generatedId }}-{{$index}}\\\" class=\\\"ui-select-choices-row\\\" ng-class=\\\"{active: $select.isActive(this), disabled: $select.isDisabled(this)}\\\" role=\\\"option\\\"><a href=\\\"\\\" class=\\\"ui-select-choices-row-inner\\\"></a></div></li></ul>\");\n$templateCache.put(\"bootstrap/match-multiple.tpl.html\",\"<span class=\\\"ui-select-match\\\"><span ng-repeat=\\\"$item in $select.selected track by $index\\\"><span class=\\\"ui-select-match-item btn btn-default btn-xs\\\" tabindex=\\\"-1\\\" type=\\\"button\\\" ng-disabled=\\\"$select.disabled\\\" ng-click=\\\"$selectMultiple.activeMatchIndex = $index;\\\" ng-class=\\\"{\\'btn-primary\\':$selectMultiple.activeMatchIndex === $index, \\'select-locked\\':$select.isLocked(this, $index)}\\\" ui-select-sort=\\\"$select.selected\\\"><span class=\\\"close ui-select-match-close\\\" ng-hide=\\\"$select.disabled\\\" ng-click=\\\"$selectMultiple.removeChoice($index)\\\"> ×</span> <span uis-transclude-append=\\\"\\\"></span></span></span></span>\");\n$templateCache.put(\"bootstrap/match.tpl.html\",\"<div class=\\\"ui-select-match\\\" ng-hide=\\\"$select.open && $select.searchEnabled\\\" ng-disabled=\\\"$select.disabled\\\" ng-class=\\\"{\\'btn-default-focus\\':$select.focus}\\\"><span tabindex=\\\"-1\\\" class=\\\"btn btn-default form-control ui-select-toggle\\\" aria-label=\\\"{{ $select.baseTitle }} activate\\\" ng-disabled=\\\"$select.disabled\\\" ng-click=\\\"$select.activate()\\\" style=\\\"outline: 0;\\\"><span ng-show=\\\"$select.isEmpty()\\\" class=\\\"ui-select-placeholder text-muted\\\">{{$select.placeholder}}</span> <span ng-hide=\\\"$select.isEmpty()\\\" class=\\\"ui-select-match-text pull-left\\\" ng-class=\\\"{\\'ui-select-allow-clear\\': $select.allowClear && !$select.isEmpty()}\\\" ng-transclude=\\\"\\\"></span> <i class=\\\"caret pull-right\\\" ng-click=\\\"$select.toggle($event)\\\"></i> <a ng-show=\\\"$select.allowClear && !$select.isEmpty() && ($select.disabled !== true)\\\" aria-label=\\\"{{ $select.baseTitle }} clear\\\" style=\\\"margin-right: 10px\\\" ng-click=\\\"$select.clear($event)\\\" class=\\\"btn btn-xs btn-link pull-right\\\"><i class=\\\"glyphicon glyphicon-remove\\\" aria-hidden=\\\"true\\\"></i></a></span></div>\");\n$templateCache.put(\"bootstrap/no-choice.tpl.html\",\"<ul class=\\\"ui-select-no-choice dropdown-menu\\\" ng-show=\\\"$select.items.length == 0\\\"><li ng-transclude=\\\"\\\"></li></ul>\");\n$templateCache.put(\"bootstrap/select-multiple.tpl.html\",\"<div class=\\\"ui-select-container ui-select-multiple ui-select-bootstrap dropdown form-control\\\" ng-class=\\\"{open: $select.open}\\\"><div><div class=\\\"ui-select-match\\\"></div><input type=\\\"search\\\" autocomplete=\\\"off\\\" autocorrect=\\\"off\\\" autocapitalize=\\\"off\\\" spellcheck=\\\"false\\\" class=\\\"ui-select-search input-xs\\\" placeholder=\\\"{{$selectMultiple.getPlaceholder()}}\\\" ng-disabled=\\\"$select.disabled\\\" ng-hide=\\\"$select.disabled\\\" ng-click=\\\"$select.activate()\\\" ng-model=\\\"$select.search\\\" role=\\\"combobox\\\" aria-label=\\\"{{ $select.baseTitle }}\\\" ondrop=\\\"return false;\\\"></div><div class=\\\"ui-select-choices\\\"></div><div class=\\\"ui-select-no-choice\\\"></div></div>\");\n$templateCache.put(\"bootstrap/select.tpl.html\",\"<div class=\\\"ui-select-container ui-select-bootstrap dropdown\\\" ng-class=\\\"{open: $select.open}\\\"><div class=\\\"ui-select-match\\\"></div><input type=\\\"search\\\" autocomplete=\\\"off\\\" tabindex=\\\"-1\\\" aria-expanded=\\\"true\\\" aria-label=\\\"{{ $select.baseTitle }}\\\" aria-owns=\\\"ui-select-choices-{{ $select.generatedId }}\\\" aria-activedescendant=\\\"ui-select-choices-row-{{ $select.generatedId }}-{{ $select.activeIndex }}\\\" 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 class=\\\"ui-select-no-choice\\\"></div></div>\");\n$templateCache.put(\"select2/choices.tpl.html\",\"<ul tabindex=\\\"-1\\\" 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=\\\"$group.name\\\"></div><ul role=\\\"listbox\\\" id=\\\"ui-select-choices-{{ $select.generatedId }}\\\" ng-class=\\\"{\\'select2-result-sub\\': $select.choiceGrouped($group), \\'select2-result-single\\': !$select.choiceGrouped($group) }\\\"><li role=\\\"option\\\" ng-attr-id=\\\"ui-select-choices-row-{{ $select.generatedId }}-{{$index}}\\\" 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>\");\n$templateCache.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 track by $index\\\" ng-class=\\\"{\\'select2-search-choice-focus\\':$selectMultiple.activeMatchIndex === $index, \\'select2-locked\\':$select.isLocked(this, $index)}\\\" ui-select-sort=\\\"$select.selected\\\"><span uis-transclude-append=\\\"\\\"></span> <a href=\\\"javascript:;\\\" class=\\\"ui-select-match-close select2-search-choice-close\\\" ng-click=\\\"$selectMultiple.removeChoice($index)\\\" tabindex=\\\"-1\\\"></a></li></span>\");\n$templateCache.put(\"select2/match.tpl.html\",\"<a class=\\\"select2-choice ui-select-match\\\" ng-class=\\\"{\\'select2-default\\': $select.isEmpty()}\\\" ng-click=\\\"$select.toggle($event)\\\" aria-label=\\\"{{ $select.baseTitle }} select\\\"><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.clear($event)\\\"></abbr> <span class=\\\"select2-arrow ui-select-toggle\\\"><b></b></span></a>\");\n$templateCache.put(\"select2/no-choice.tpl.html\",\"<div class=\\\"ui-select-no-choice dropdown\\\" ng-show=\\\"$select.items.length == 0\\\"><div class=\\\"dropdown-content\\\"><div data-selectable=\\\"\\\" ng-transclude=\\\"\\\"></div></div></div>\");\n$templateCache.put(\"select2/select-multiple.tpl.html\",\"<div class=\\\"ui-select-container ui-select-multiple select2 select2-container select2-container-multi\\\" ng-class=\\\"{\\'select2-container-active select2-dropdown-open open\\': $select.open, \\'select2-container-disabled\\': $select.disabled}\\\"><ul class=\\\"select2-choices\\\"><span class=\\\"ui-select-match\\\"></span><li class=\\\"select2-search-field\\\"><input type=\\\"search\\\" autocomplete=\\\"off\\\" autocorrect=\\\"off\\\" autocapitalize=\\\"off\\\" spellcheck=\\\"false\\\" role=\\\"combobox\\\" aria-expanded=\\\"true\\\" aria-owns=\\\"ui-select-choices-{{ $select.generatedId }}\\\" aria-label=\\\"{{ $select.baseTitle }}\\\" aria-activedescendant=\\\"ui-select-choices-row-{{ $select.generatedId }}-{{ $select.activeIndex }}\\\" class=\\\"select2-input ui-select-search\\\" placeholder=\\\"{{$selectMultiple.getPlaceholder()}}\\\" ng-disabled=\\\"$select.disabled\\\" ng-hide=\\\"$select.disabled\\\" ng-model=\\\"$select.search\\\" ng-click=\\\"$select.activate()\\\" style=\\\"width: 34px;\\\" ondrop=\\\"return false;\\\"></li></ul><div class=\\\"ui-select-dropdown select2-drop select2-with-searchbox select2-drop-active\\\" ng-class=\\\"{\\'select2-display-none\\': !$select.open || $select.items.length === 0}\\\"><div class=\\\"ui-select-choices\\\"></div></div></div>\");\n$templateCache.put(\"select2/select.tpl.html\",\"<div class=\\\"ui-select-container select2 select2-container\\\" ng-class=\\\"{\\'select2-container-active select2-dropdown-open open\\': $select.open, \\'select2-container-disabled\\': $select.disabled, \\'select2-container-active\\': $select.focus, \\'select2-allowclear\\': $select.allowClear && !$select.isEmpty()}\\\"><div class=\\\"ui-select-match\\\"></div><div class=\\\"ui-select-dropdown 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=\\\"search\\\" autocomplete=\\\"off\\\" autocorrect=\\\"off\\\" autocapitalize=\\\"off\\\" spellcheck=\\\"false\\\" role=\\\"combobox\\\" aria-expanded=\\\"true\\\" aria-owns=\\\"ui-select-choices-{{ $select.generatedId }}\\\" aria-label=\\\"{{ $select.baseTitle }}\\\" aria-activedescendant=\\\"ui-select-choices-row-{{ $select.generatedId }}-{{ $select.activeIndex }}\\\" class=\\\"ui-select-search select2-input\\\" ng-model=\\\"$select.search\\\"></div><div class=\\\"ui-select-choices\\\"></div><div class=\\\"ui-select-no-choice\\\"></div></div></div>\");\n$templateCache.put(\"selectize/choices.tpl.html\",\"<div ng-show=\\\"$select.open\\\" class=\\\"ui-select-choices ui-select-dropdown selectize-dropdown single\\\"><div class=\\\"ui-select-choices-content selectize-dropdown-content\\\"><div class=\\\"ui-select-choices-group optgroup\\\" role=\\\"listbox\\\"><div ng-show=\\\"$select.isGrouped\\\" class=\\\"ui-select-choices-group-label optgroup-header\\\" ng-bind=\\\"$group.name\\\"></div><div role=\\\"option\\\" 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>\");\n$templateCache.put(\"selectize/match.tpl.html\",\"<div ng-hide=\\\"$select.searchEnabled && ($select.open || $select.isEmpty())\\\" class=\\\"ui-select-match\\\" ng-transclude=\\\"\\\"></div>\");\n$templateCache.put(\"selectize/no-choice.tpl.html\",\"<div class=\\\"ui-select-no-choice selectize-dropdown\\\" ng-show=\\\"$select.items.length == 0\\\"><div class=\\\"selectize-dropdown-content\\\"><div data-selectable=\\\"\\\" ng-transclude=\\\"\\\"></div></div></div>\");\n$templateCache.put(\"selectize/select.tpl.html\",\"<div class=\\\"ui-select-container selectize-control single\\\" ng-class=\\\"{\\'open\\': $select.open}\\\"><div class=\\\"selectize-input\\\" ng-class=\\\"{\\'focus\\': $select.open, \\'disabled\\': $select.disabled, \\'selectize-focus\\' : $select.focus}\\\" ng-click=\\\"$select.open && !$select.searchEnabled ? $select.toggle($event) : $select.activate()\\\"><div class=\\\"ui-select-match\\\"></div><input type=\\\"search\\\" 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.isEmpty() && !$select.open)\\\" ng-disabled=\\\"$select.disabled\\\" aria-label=\\\"{{ $select.baseTitle }}\\\"></div><div class=\\\"ui-select-choices\\\"></div><div class=\\\"ui-select-no-choice\\\"></div></div>\");}]);",null,null],"sourceRoot":"/source/"}