").append(e),i=t.querySelectorAll(".ui-select-match");if(i.removeAttr("ui-select-match"),i.removeAttr("data-ui-select-match"),1!==i.length)throw n("transcluded","Expected 1 .ui-select-match but got '{0}'.",i.length);s.querySelectorAll(".ui-select-match").replaceWith(i);var r=t.querySelectorAll(".ui-select-choices");if(r.removeAttr("ui-select-choices"),r.removeAttr("data-ui-select-choices"),1!==r.length)throw n("transcluded","Expected 1 .ui-select-choices but got '{0}'.",r.length);s.querySelectorAll(".ui-select-choices").replaceWith(r);var o=t.querySelectorAll(".ui-select-no-choice");o.removeAttr("ui-select-no-choice"),o.removeAttr("data-ui-select-no-choice"),1==o.length&&s.querySelectorAll(".ui-select-no-choice").replaceWith(o)});var h=r.$eval(l.appendToBody);(void 0!==h?h:t.appendToBody)&&(r.$watch("$select.open",function(t){t?function(){var t=i(s);(m=angular.element('
'))[0].style.width=t.width+"px",m[0].style.height=t.height+"px",s.after(m),g=s[0].style.width,e.find("body").append(s),s[0].style.position="absolute",s[0].style.left=t.left+"px",s[0].style.top=t.top+"px",s[0].style.width=t.width+"px"}():v()}),r.$on("$destroy",function(){v()}));var m=null,g="";function v(){null!==m&&(m.replaceWith(s),m=null,s[0].style.position="",s[0].style.left="",s[0].style.top="",s[0].style.width=g,d.setFocus())}var b=null;r.$watch("$select.open",function(){"auto"!==d.dropdownPosition&&"up"!==d.dropdownPosition||r.calculateDropdownPos()});var $=function(e,t){e=e||i(s),t=t||i(b),b[0].style.position="absolute",b[0].style.top=-1*t.height+"px",s.addClass("direction-up")},y=function(){a(function(){if("up"===d.dropdownPosition)$();else{s.removeClass("direction-up");var t=i(s),n=i(b),r=e[0].documentElement.scrollTop||e[0].body.scrollTop;t.top+t.height+n.height>r+e[0].documentElement.clientHeight?$(t,n):function(e,t){s.removeClass("direction-up"),e=e||i(s),t=t||i(b),b[0].style.position="",b[0].style.top=""}(t,n)}b[0].style.opacity=1})},_=!1;r.calculateDropdownPos=function(){if(d.open){if(0===(b=angular.element(s).querySelectorAll(".ui-select-dropdown")).length)return;if(""!==d.search||_||(b[0].style.opacity=0,_=!0),!i(b).height&&d.$animate&&d.$animate.on&&d.$animate.enabled(b)){var e=!0;d.$animate.on("enter",b,function(t,n){"close"===n&&e&&(y(),e=!1)})}else y()}else{if(null===b||0===b.length)return;b[0].style.opacity=0,b[0].style.position="",b[0].style.top="",s.removeClass("direction-up")}}}}}}]),i.directive("uiSelectMatch",["uiSelectConfig",function(e){return{restrict:"EA",require:"^uiSelect",replace:!0,transclude:!0,templateUrl:function(n){n.addClass("ui-select-match");var i=n.parent();return(t(i,"theme")||e.theme)+(angular.isDefined(t(i,"multiple"))?"/match-multiple.tpl.html":"/match.tpl.html")},link:function(t,n,i,r){function o(e){r.allowClear=!!angular.isDefined(e)&&(""===e||"true"===e.toLowerCase())}r.lockChoiceExpression=i.uiLockChoice,i.$observe("placeholder",function(t){r.placeholder=void 0!==t?t:e.placeholder}),i.$observe("allowClear",o),o(i.allowClear),r.multiple&&r.sizeSearchInput()}};function t(e,t){return e[0].hasAttribute(t)?e.attr(t):e[0].hasAttribute("data-"+t)?e.attr("data-"+t):e[0].hasAttribute("x-"+t)?e.attr("x-"+t):void 0}}]),i.directive("uiSelectMultiple",["uiSelectMinErr","$timeout",function(n,i){return{restrict:"EA",require:["^uiSelect","^ngModel"],controller:["$scope","$timeout",function(e,t){var n,i=this,r=e.$select;angular.isUndefined(r.selected)&&(r.selected=[]),e.$evalAsync(function(){n=e.ngModel}),i.activeMatchIndex=-1,i.updateModel=function(){n.$setViewValue(Date.now()),i.refreshComponent()},i.refreshComponent=function(){r.refreshItems&&r.refreshItems(),r.sizeSearchInput&&r.sizeSearchInput()},i.removeChoice=function(n){if(r.isLocked(null,n))return!1;var o=r.selected[n],a={};return a[r.parserResult.itemName]=o,r.selected.splice(n,1),i.activeMatchIndex=-1,r.sizeSearchInput(),t(function(){r.onRemoveCallback(e,{$item:o,$model:r.parserResult.modelMapper(e,a)})}),i.updateModel(),!0},i.getPlaceholder=function(){if(!r.selected||!r.selected.length)return r.placeholder}}],controllerAs:"$selectMultiple",link:function(r,o,a,s){var l=s[0],u=r.ngModel=s[1],c=r.$selectMultiple;function d(e){return void 0!==e&&void 0!==l.search&&e.filter(function(e){return void 0!==l.search.toUpperCase()&&void 0!==e&&e.toUpperCase()===l.search.toUpperCase()}).length>0}function f(e,t){var n=-1;if(angular.isArray(e))for(var i=angular.copy(e),r=0;r
=0;i--)(t={})[l.parserResult.itemName]=l.selected[i],e=l.parserResult.modelMapper(r,t),n.unshift(e);return n}),u.$formatters.unshift(function(e){var t,n=l.parserResult&&l.parserResult.source(r,{$select:{search:""}}),i={};if(!n)return e;var o=[],a=function(e,n){if(e&&e.length){for(var a=e.length-1;a>=0;a--){if(i[l.parserResult.itemName]=e[a],t=l.parserResult.modelMapper(r,i),l.parserResult.trackByExp){var s=/(\w*)\./.exec(l.parserResult.trackByExp),u=/\.([^\s]+)/.exec(l.parserResult.trackByExp);if(s&&s.length>0&&s[1]==l.parserResult.itemName&&u&&u.length>0&&t[u[1]]==n[u[1]])return o.unshift(e[a]),!0}if(angular.equals(t,n))return o.unshift(e[a]),!0}return!1}};if(!e)return o;for(var s=e.length-1;s>=0;s--)a(l.selected,e[s])||a(n,e[s])||o.unshift(e[s]);return o}),r.$watchCollection(function(){return u.$modelValue},function(e,t){t!=e&&(angular.isDefined(u.$modelValue)&&(u.$modelValue=null),c.refreshComponent())}),u.$render=function(){if(!angular.isArray(u.$viewValue)){if(!t(u.$viewValue))throw n("multiarr","Expected model value to be array but got '{0}'",u.$viewValue);u.$viewValue=[]}l.selected=u.$viewValue,c.refreshComponent(),r.$evalAsync()},r.$on("uis:select",function(e,t){if(!(l.selected.length>=l.limit)){l.selected.push(t);var n={};n[l.parserResult.itemName]=t,i(function(){l.onSelectCallback(r,{$item:t,$model:l.parserResult.modelMapper(r,n)})}),c.updateModel()}}),r.$on("uis:activate",function(){c.activeMatchIndex=-1}),r.$watch("$select.disabled",function(e,t){t&&!e&&l.sizeSearchInput()}),l.searchInput.on("keydown",function(t){var n=t.which;r.$apply(function(){var i=!1;e.isHorizontalMovement(n)&&(i=function(t){var n=function(e){return angular.isNumber(e.selectionStart)?e.selectionStart:e.value.length}(l.searchInput[0]),i=l.selected.length-1,r=c.activeMatchIndex,o=c.activeMatchIndex+1,a=c.activeMatchIndex-1,s=r;if(n>0||l.search.length&&t==e.RIGHT)return!1;l.close(),s=function(){switch(t){case e.LEFT:return~c.activeMatchIndex?a:i;case e.RIGHT:return~c.activeMatchIndex&&r!==i?o:(l.activate(),!1);case e.BACKSPACE:return~c.activeMatchIndex?c.removeChoice(r)?a:r:i;case e.DELETE:return!!~c.activeMatchIndex&&(c.removeChoice(c.activeMatchIndex),r)}}(),l.selected.length&&!1!==s?c.activeMatchIndex=Math.min(i,Math.max(0,s)):c.activeMatchIndex=-1;return!0}(n)),i&&n!=e.TAB&&(t.preventDefault(),t.stopPropagation())})}),l.searchInput.on("keyup",function(t){if(e.isVerticalMovement(t.which)||r.$evalAsync(function(){l.activeIndex=!1===l.taggingLabel?-1:0}),l.tagging.isActivated&&l.search.length>0){if(t.which===e.TAB||e.isControl(t)||e.isFunctionKey(t)||t.which===e.ESC||e.isVerticalMovement(t.which))return;if(l.activeIndex=!1===l.taggingLabel?-1:0,!1===l.taggingLabel)return;var n,i,o,a=angular.copy(l.items),s=angular.copy(l.items),u=!1,c=-1;if(void 0!==l.tagging.fct){if((i=l.$filter("filter")(a,{isTag:!0})).length>0&&(o=i[0]),a.length>0&&o&&(u=!0,a=a.slice(1,a.length),s=s.slice(1,s.length)),n=l.tagging.fct(l.search),s.some(function(e){return angular.equals(e,n)})||l.selected.some(function(e){return angular.equals(e,n)}))return void r.$evalAsync(function(){l.activeIndex=0,l.items=a});n&&(n.isTag=!0)}else{if((i=l.$filter("filter")(a,function(e){return e.match(l.taggingLabel)})).length>0&&(o=i[0]),void 0!==a[0]&&a.length>0&&o&&(u=!0,a=a.slice(1,a.length),s=s.slice(1,s.length)),n=l.search+" "+l.taggingLabel,f(l.selected,l.search)>-1)return;if(d(s.concat(l.selected)))return void(u&&(a=s,r.$evalAsync(function(){l.activeIndex=0,l.items=a})));if(d(s))return void(u&&(l.items=s.slice(1,s.length)))}u&&(c=f(l.selected,n)),c>-1?a=a.slice(c+1,a.length-1):(a=[],n&&a.push(n),a=a.concat(s)),r.$evalAsync(function(){if(l.activeIndex=0,l.items=a,l.isGrouped){var e=n?a.slice(1):a;l.setItemsFn(e),n&&(l.items.unshift(n),l.groups.unshift({name:"",items:[n],tagging:!0}))}})}}),l.searchInput.on("blur",function(){i(function(){c.activeMatchIndex=-1})})}}}]),i.directive("uiSelectNoChoice",["uiSelectConfig",function(e){return{restrict:"EA",require:"^uiSelect",replace:!0,transclude:!0,templateUrl:function(t){return t.addClass("ui-select-no-choice"),(t.parent().attr("theme")||e.theme)+"/no-choice.tpl.html"}}}]),i.directive("uiSelectSingle",["$timeout","$compile",function(n,i){return{restrict:"EA",require:["^uiSelect","^ngModel"],link:function(r,o,a,s){var l=s[0],u=s[1];u.$parsers.unshift(function(e){if(t(e))return e;var n={};return n[l.parserResult.itemName]=e,l.parserResult.modelMapper(r,n)}),u.$formatters.unshift(function(e){if(t(e))return e;var n=l.parserResult&&l.parserResult.source(r,{$select:{search:""}}),i={};if(n){var o=function(t){return i[l.parserResult.itemName]=t,l.parserResult.modelMapper(r,i)===e};if(l.selected&&o(l.selected))return l.selected;for(var a=n.length-1;a>=0;a--)if(o(n[a]))return n[a]}return e}),r.$watch("$select.selected",function(e){u.$viewValue!==e&&u.$setViewValue(e)}),u.$render=function(){l.selected=u.$viewValue},r.$on("uis:select",function(e,i){l.selected=i;var o={};o[l.parserResult.itemName]=i,n(function(){l.onSelectCallback(r,{$item:i,$model:t(i)?i:l.parserResult.modelMapper(r,o)})})}),r.$on("uis:close",function(e,t){n(function(){l.focusser.prop("disabled",!1),t||l.focusser[0].focus()},0,!1)}),r.$on("uis:activate",function(){c.prop("disabled",!0)});var c=angular.element("");i(c)(r),l.focusser=c,l.focusInput=c,o.parent().append(c),c.bind("focus",function(){r.$evalAsync(function(){l.focus=!0})}),c.bind("blur",function(){r.$evalAsync(function(){l.focus=!1})}),c.bind("keydown",function(t){if(t.which===e.BACKSPACE&&!1!==l.backspaceReset)return t.preventDefault(),t.stopPropagation(),l.select(void 0),void r.$apply();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(),l.activate()),r.$digest())}),c.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||(l.activate(c.val()),c.val(""),r.$digest())})}}}]),i.directive("uiSelectSort",["$timeout","uiSelectConfig","uiSelectMinErr",function(e,t,n){return{require:["^^uiSelect","^ngModel"],link:function(t,i,r,o){if(null===t[r.uiSelectSort])throw n("sort","Expected a list to sort");var a=o[0],s=o[1],l=angular.extend({axis:"horizontal"},t.$eval(r.uiSelectSortOptions)).axis;t.$watch(function(){return a.sortable},function(e){e?i.attr("draggable",!0):i.removeAttr("draggable")}),i.on("dragstart",function(e){i.addClass("dragging"),(e.dataTransfer||e.originalEvent.dataTransfer).setData("text",t.$index.toString())}),i.on("dragend",function(){c("dragging")});var u,c=function(e){angular.forEach(a.$element.querySelectorAll("."+e),function(t){angular.element(t).removeClass(e)})},d=function(e){e.preventDefault(),("vertical"===l?e.offsetY||e.layerY||(e.originalEvent?e.originalEvent.offsetY:0):e.offsetX||e.layerX||(e.originalEvent?e.originalEvent.offsetX:0)) '},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a(n(0)),r=a(n(1)),o=a(n(4));function a(e){return e&&e.__esModule?e:{default:e}}var s=function(){function e(){(0,i.default)(this,e),this.pageSize=25,this.pageSizeList=[25,50,100,300],this.translations={resultsPerPage:"Results per page",ofNResults:"of {{totalItems}} results",currentPageOfPageCount:"Page {{currentPage}} of {{pageCount}}",previousPage:"Previous page",nextPage:"Next page"}}return(0,r.default)(e,[{key:"setPageSize",value:function(e){return this.pageSize=e,this}},{key:"setPageSizeList",value:function(e){return this.pageSizeList=e,this}},{key:"setTranslations",value:function(e){return this.translations=(0,o.default)(this.translations,e),this}},{key:"$get",value:function(){return{pageSize:this.pageSize,pageSizeList:this.pageSizeList,translations:this.translations}}}]),e}();t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(n(392)),r=o(n(393));function o(e){return e&&e.__esModule?e:{default:e}}t.default={template:r.default,controller:i.default,bindings:{size:"@?"}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(n(0)),r=o(n(1));function o(e){return e&&e.__esModule?e:{default:e}}var a=function(){function e(t){"ngInject";(0,i.default)(this,e),this.$element=t}return e.$inject=["$element"],(0,r.default)(e,[{key:"$onInit",value:function(){this.size=this.size||"m"}},{key:"$postLink",value:function(){this.$element.addClass("oui-spinner oui-spinner_"+this.size)}}]),e}();t.default=a},function(e,t){e.exports="