/* * angular-ui-bootstrap * http://angular-ui.github.io/bootstrap/ * Version: 2.4.0 - 2016-12-29 * License: MIT */angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.modal","ui.bootstrap.multiMap","ui.bootstrap.stackedMap","ui.bootstrap.position","ui.bootstrap.buttons"]),angular.module("ui.bootstrap.tpls",["uib/template/modal/window.html"]),angular.module("ui.bootstrap.modal",["ui.bootstrap.multiMap","ui.bootstrap.stackedMap","ui.bootstrap.position"]).provider("$uibResolve",function(){var t=this;this.resolver=null,this.setResolver=function(t){this.resolver=t},this.$get=["$injector","$q",function(e,o){var n=t.resolver?e.get(t.resolver):null;return{resolve:function(t,i,r,a){if(n)return n.resolve(t,i,r,a);var l=[];return angular.forEach(t,function(t){l.push(angular.isFunction(t)||angular.isArray(t)?o.resolve(e.invoke(t)):angular.isString(t)?o.resolve(e.get(t)):o.resolve(t))}),o.all(l).then(function(e){var o={},n=0;return angular.forEach(t,function(t,i){o[i]=e[n++]}),o})}}}]}).directive("uibModalBackdrop",["$animate","$injector","$uibModalStack",function(t,e,o){function n(e,n,i){i.modalInClass&&(t.addClass(n,i.modalInClass),e.$on(o.NOW_CLOSING_EVENT,function(o,r){var a=r();e.modalOptions.animation?t.removeClass(n,i.modalInClass).then(a):a()}))}return{restrict:"A",compile:function(t,e){return t.addClass(e.backdropClass),n}}}]).directive("uibModalWindow",["$uibModalStack","$q","$animateCss","$document",function(t,e,o,n){return{scope:{index:"@"},restrict:"A",transclude:!0,templateUrl:function(t,e){return e.templateUrl||"uib/template/modal/window.html"},link:function(i,r,a){r.addClass(a.windowTopClass||""),i.size=a.size,i.close=function(e){var o=t.getTop();o&&o.value.backdrop&&"static"!==o.value.backdrop&&e.target===e.currentTarget&&(e.preventDefault(),e.stopPropagation(),t.dismiss(o.key,"backdrop click"))},r.on("click",i.close),i.$isRendered=!0;var l=e.defer();i.$$postDigest(function(){l.resolve()}),l.promise.then(function(){var l=null;a.modalInClass&&(l=o(r,{addClass:a.modalInClass}).start(),i.$on(t.NOW_CLOSING_EVENT,function(t,e){var n=e();o(r,{removeClass:a.modalInClass}).start().then(n)})),e.when(l).then(function(){var e=t.getTop();if(e&&t.modalRendered(e.key),!n[0].activeElement||!r[0].contains(n[0].activeElement)){var o=r[0].querySelector("[autofocus]");o?o.focus():r[0].focus()}})})}}}]).directive("uibModalAnimationClass",function(){return{compile:function(t,e){e.modalAnimation&&t.addClass(e.uibModalAnimationClass)}}}).directive("uibModalTransclude",["$animate",function(t){return{link:function(e,o,n,i,r){r(e.$parent,function(e){o.empty(),t.enter(e,o)})}}}]).factory("$uibModalStack",["$animate","$animateCss","$document","$compile","$rootScope","$q","$$multiMap","$$stackedMap","$uibPosition",function(t,e,o,n,i,r,a,l,s){function u(t){var e="-";return t.replace(D,function(t,o){return(o?e:"")+t.toLowerCase()})}function d(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)}function c(){for(var t=-1,e=k.keys(),o=0;o-1&&S>t&&(t=S),t}function p(t,e){var o=k.get(t).value,n=o.appendTo;k.remove(t),T=k.top(),T&&(S=parseInt(T.value.modalDomEl.attr("index"),10)),m(o.modalDomEl,o.modalScope,function(){var e=o.openedClass||C;E.remove(e,t);var i=E.hasKey(e);n.toggleClass(e,i),!i&&y&&y.heightOverflow&&y.scrollbarWidth&&(n.css(y.originalRight?{paddingRight:y.originalRight+"px"}:{paddingRight:""}),y=null),f(!0)},o.closedDeferred),h(),e&&e.focus?e.focus():n.focus&&n.focus()}function f(t){var e;k.length()>0&&(e=k.top().value,e.modalDomEl.toggleClass(e.windowTopClass||"",t))}function h(){if(w&&-1===c()){var t=$;m(w,$,function(){t=null}),w=void 0,$=void 0}}function m(e,o,n,i){function a(){a.done||(a.done=!0,t.leave(e).then(function(){n&&n(),e.remove(),i&&i.resolve()}),o.$destroy())}var l,s=null,u=function(){return l||(l=r.defer(),s=l.promise),function(){l.resolve()}};return o.$broadcast(M.NOW_CLOSING_EVENT,u),r.when(s).then(a)}function g(t){if(t.isDefaultPrevented())return t;var e=k.top();if(e)switch(t.which){case 27:e.value.keyboard&&(t.preventDefault(),i.$apply(function(){M.dismiss(e.key,"escape key press")}));break;case 9:var o=M.loadFocusElementList(e),n=!1;t.shiftKey?(M.isFocusInFirstItem(t,o)||M.isModalFocused(t,e))&&(n=M.focusLastFocusableElement(o)):M.isFocusInLastItem(t,o)&&(n=M.focusFirstFocusableElement(o)),n&&(t.preventDefault(),t.stopPropagation())}}function b(t,e,o){return!t.value.modalScope.$broadcast("modal.closing",e,o).defaultPrevented}function v(){Array.prototype.forEach.call(document.querySelectorAll("["+x+"]"),function(t){var e=parseInt(t.getAttribute(x),10),o=e-1;t.setAttribute(x,o),o||(t.removeAttribute(x),t.removeAttribute("aria-hidden"))})}var w,$,y,C="modal-open",k=l.createNew(),E=a.createNew(),M={NOW_CLOSING_EVENT:"modal.stack.now-closing"},S=0,T=null,x="data-bootstrap-modal-aria-hidden-count",R="a[href], area[href], input:not([disabled]):not([tabindex='-1']), button:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']), textarea:not([disabled]):not([tabindex='-1']), iframe, object, embed, *[tabindex]:not([tabindex='-1']), *[contenteditable=true]",D=/[A-Z]/g;return i.$watch(c,function(t){$&&($.index=t)}),o.on("keydown",g),i.$on("$destroy",function(){o.off("keydown",g)}),M.open=function(e,r){function a(t){function e(t){var e=t.parent()?t.parent().children():[];return Array.prototype.filter.call(e,function(e){return e!==t[0]})}if(t&&"BODY"!==t[0].tagName)return e(t).forEach(function(t){var e="true"===t.getAttribute("aria-hidden"),o=parseInt(t.getAttribute(x),10);o||(o=e?1:0),t.setAttribute(x,o+1),t.setAttribute("aria-hidden","true")}),a(t.parent())}var l=o[0].activeElement,d=r.openedClass||C;f(!1),T=k.top(),k.add(e,{deferred:r.deferred,renderDeferred:r.renderDeferred,closedDeferred:r.closedDeferred,modalScope:r.scope,backdrop:r.backdrop,keyboard:r.keyboard,openedClass:r.openedClass,windowTopClass:r.windowTopClass,animation:r.animation,appendTo:r.appendTo}),E.put(d,e);var p=r.appendTo,h=c();if(!p.length)throw new Error("appendTo element not found. Make sure that the element passed is in DOM.");h>=0&&!w&&($=i.$new(!0),$.modalOptions=r,$.index=h,w=angular.element('
'),w.attr({"class":"modal-backdrop","ng-style":"{'z-index': 1040 + (index && 1 || 0) + index*10}","uib-modal-animation-class":"fade","modal-in-class":"in"}),r.backdropClass&&w.addClass(r.backdropClass),r.animation&&w.attr("modal-animation","true"),n(w)($),t.enter(w,p),s.isScrollable(p)&&(y=s.scrollbarPadding(p),y.heightOverflow&&y.scrollbarWidth&&p.css({paddingRight:y.right+"px"})));var m;r.component?(m=document.createElement(u(r.component.name)),m=angular.element(m),m.attr({resolve:"$resolve","modal-instance":"$uibModalInstance",close:"$close($value)",dismiss:"$dismiss($value)"})):m=r.content,S=T?parseInt(T.value.modalDomEl.attr("index"),10)+1:0;var g=angular.element('
');g.attr({"class":"modal","template-url":r.windowTemplateUrl,"window-top-class":r.windowTopClass,role:"dialog","aria-labelledby":r.ariaLabelledBy,"aria-describedby":r.ariaDescribedBy,size:r.size,index:S,animate:"animate","ng-style":"{'z-index': 1050 + $$topModalIndex*10, display: 'block'}",tabindex:-1,"uib-modal-animation-class":"fade","modal-in-class":"in"}).append(m),r.windowClass&&g.addClass(r.windowClass),r.animation&&g.attr("modal-animation","true"),p.addClass(d),r.scope&&(r.scope.$$topModalIndex=S),t.enter(n(g)(r.scope),p),k.top().value.modalDomEl=g,k.top().value.modalOpener=l,a(g)},M.close=function(t,e){var o=k.get(t);return v(),o&&b(o,e,!0)?(o.value.modalScope.$$uibDestructionScheduled=!0,o.value.deferred.resolve(e),p(t,o.value.modalOpener),!0):!o},M.dismiss=function(t,e){var o=k.get(t);return v(),o&&b(o,e,!1)?(o.value.modalScope.$$uibDestructionScheduled=!0,o.value.deferred.reject(e),p(t,o.value.modalOpener),!0):!o},M.dismissAll=function(t){for(var e=this.getTop();e&&this.dismiss(e.key,t);)e=this.getTop()},M.getTop=function(){return k.top()},M.modalRendered=function(t){var e=k.get(t);e&&e.value.renderDeferred.resolve()},M.focusFirstFocusableElement=function(t){return t.length>0?(t[0].focus(),!0):!1},M.focusLastFocusableElement=function(t){return t.length>0?(t[t.length-1].focus(),!0):!1},M.isModalFocused=function(t,e){if(t&&e){var o=e.value.modalDomEl;if(o&&o.length)return(t.target||t.srcElement)===o[0]}return!1},M.isFocusInFirstItem=function(t,e){return e.length>0?(t.target||t.srcElement)===e[0]:!1},M.isFocusInLastItem=function(t,e){return e.length>0?(t.target||t.srcElement)===e[e.length-1]:!1},M.loadFocusElementList=function(t){if(t){var e=t.value.modalDomEl;if(e&&e.length){var o=e[0].querySelectorAll(R);return o?Array.prototype.filter.call(o,function(t){return d(t)}):o}}},M}]).provider("$uibModal",function(){var t={options:{animation:!0,backdrop:!0,keyboard:!0},$get:["$rootScope","$q","$document","$templateRequest","$controller","$uibResolve","$uibModalStack",function(e,o,n,i,r,a,l){function s(t){return t.template?o.when(t.template):i(angular.isFunction(t.templateUrl)?t.templateUrl():t.templateUrl)}var u={},d=null;return u.getPromiseChain=function(){return d},u.open=function(i){function u(){return g}var c=o.defer(),p=o.defer(),f=o.defer(),h=o.defer(),m={result:c.promise,opened:p.promise,closed:f.promise,rendered:h.promise,close:function(t){return l.close(m,t)},dismiss:function(t){return l.dismiss(m,t)}};if(i=angular.extend({},t.options,i),i.resolve=i.resolve||{},i.appendTo=i.appendTo||n.find("body").eq(0),!i.component&&!i.template&&!i.templateUrl)throw new Error("One of component or template or templateUrl options is required.");var g;g=i.component?o.when(a.resolve(i.resolve,{},null,null)):o.all([s(i),a.resolve(i.resolve,{},null,null)]);var b;return b=d=o.all([d]).then(u,u).then(function(t){function o(e,o,n,i){e.$scope=a,e.$scope.$resolve={},n?e.$scope.$uibModalInstance=m:e.$uibModalInstance=m;var r=o?t[1]:t;angular.forEach(r,function(t,o){i&&(e[o]=t),e.$scope.$resolve[o]=t})}var n=i.scope||e,a=n.$new();a.$close=m.close,a.$dismiss=m.dismiss,a.$on("$destroy",function(){a.$$uibDestructionScheduled||a.$dismiss("$uibUnscheduledDestruction")});var s,u,d={scope:a,deferred:c,renderDeferred:h,closedDeferred:f,animation:i.animation,backdrop:i.backdrop,keyboard:i.keyboard,backdropClass:i.backdropClass,windowTopClass:i.windowTopClass,windowClass:i.windowClass,windowTemplateUrl:i.windowTemplateUrl,ariaLabelledBy:i.ariaLabelledBy,ariaDescribedBy:i.ariaDescribedBy,size:i.size,openedClass:i.openedClass,appendTo:i.appendTo},g={},b={};i.component?(o(g,!1,!0,!1),g.name=i.component,d.component=g):i.controller&&(o(b,!0,!1,!0),u=r(i.controller,b,!0,i.controllerAs),i.controllerAs&&i.bindToController&&(s=u.instance,s.$close=a.$close,s.$dismiss=a.$dismiss,angular.extend(s,{$resolve:b.$scope.$resolve},n)),s=u(),angular.isFunction(s.$onInit)&&s.$onInit()),i.component||(d.content=t[0]),l.open(m,d),p.resolve(!0)},function(t){p.reject(t),c.reject(t)})["finally"](function(){d===b&&(d=null)}),m},u}]};return t}),angular.module("ui.bootstrap.multiMap",[]).factory("$$multiMap",function(){return{createNew:function(){var t={};return{entries:function(){return Object.keys(t).map(function(e){return{key:e,value:t[e]}})},get:function(e){return t[e]},hasKey:function(e){return!!t[e]},keys:function(){return Object.keys(t)},put:function(e,o){t[e]||(t[e]=[]),t[e].push(o)},remove:function(e,o){var n=t[e];if(n){var i=n.indexOf(o);-1!==i&&n.splice(i,1),n.length||delete t[e]}}}}}}),angular.module("ui.bootstrap.stackedMap",[]).factory("$$stackedMap",function(){return{createNew:function(){var t=[];return{add:function(e,o){t.push({key:e,value:o})},get:function(e){for(var o=0;o');t.find("body").append(a),o=a[0].offsetWidth-a[0].clientWidth,o=isFinite(o)?o:0,a.remove()}return o},scrollbarPadding:function(t){t=this.getRawNode(t);var o=e.getComputedStyle(t),n=this.parseStyle(o.paddingRight),i=this.parseStyle(o.paddingBottom),r=this.scrollParent(t,!1,!0),l=this.scrollbarWidth(a.test(r.tagName));return{scrollbarWidth:l,widthOverflow:r.scrollWidth>r.clientWidth,right:n+l,originalRight:n,heightOverflow:r.scrollHeight>r.clientHeight,bottom:i+l,originalBottom:i}},isScrollable:function(t,o){t=this.getRawNode(t);var n=o?i.hidden:i.normal,r=e.getComputedStyle(t);return n.test(r.overflow+r.overflowY+r.overflowX)},scrollParent:function(o,n,r){o=this.getRawNode(o);var a=n?i.hidden:i.normal,l=t[0].documentElement,s=e.getComputedStyle(o);if(r&&a.test(s.overflow+s.overflowY+s.overflowX))return o;var u="absolute"===s.position,d=o.parentElement||l;if(d===l||"fixed"===s.position)return l;for(;d.parentElement&&d!==l;){var c=e.getComputedStyle(d);if(u&&"static"!==c.position&&(u=!1),!u&&a.test(c.overflow+c.overflowY+c.overflowX))break;d=d.parentElement}return d},position:function(o,n){o=this.getRawNode(o);var i=this.offset(o);if(n){var r=e.getComputedStyle(o);i.top-=this.parseStyle(r.marginTop),i.left-=this.parseStyle(r.marginLeft)}var a=this.offsetParent(o),l={top:0,left:0};return a!==t[0].documentElement&&(l=this.offset(a),l.top+=a.clientTop-a.scrollTop,l.left+=a.clientLeft-a.scrollLeft),{width:Math.round(angular.isNumber(i.width)?i.width:o.offsetWidth),height:Math.round(angular.isNumber(i.height)?i.height:o.offsetHeight),top:Math.round(i.top-l.top),left:Math.round(i.left-l.left)}},offset:function(o){o=this.getRawNode(o);var n=o.getBoundingClientRect();return{width:Math.round(angular.isNumber(n.width)?n.width:o.offsetWidth),height:Math.round(angular.isNumber(n.height)?n.height:o.offsetHeight),top:Math.round(n.top+(e.pageYOffset||t[0].documentElement.scrollTop)),left:Math.round(n.left+(e.pageXOffset||t[0].documentElement.scrollLeft))}},viewportOffset:function(o,n,i){o=this.getRawNode(o),i=i!==!1?!0:!1;var r=o.getBoundingClientRect(),a={top:0,left:0,bottom:0,right:0},l=n?t[0].documentElement:this.scrollParent(o),s=l.getBoundingClientRect();if(a.top=s.top+l.clientTop,a.left=s.left+l.clientLeft,l===t[0].documentElement&&(a.top+=e.pageYOffset,a.left+=e.pageXOffset),a.bottom=a.top+l.clientHeight,a.right=a.left+l.clientWidth,i){var u=e.getComputedStyle(l);a.top+=this.parseStyle(u.paddingTop),a.bottom-=this.parseStyle(u.paddingBottom),a.left+=this.parseStyle(u.paddingLeft),a.right-=this.parseStyle(u.paddingRight)}return{top:Math.round(r.top-a.top),bottom:Math.round(a.bottom-r.bottom),left:Math.round(r.left-a.left),right:Math.round(a.right-r.right)}},parsePlacement:function(t){var e=r.auto.test(t);return e&&(t=t.replace(r.auto,"")),t=t.split("-"),t[0]=t[0]||"top",r.primary.test(t[0])||(t[0]="top"),t[1]=t[1]||"center",r.secondary.test(t[1])||(t[1]="center"),t[2]=e?!0:!1,t},positionElements:function(t,o,n,i){t=this.getRawNode(t),o=this.getRawNode(o);var a=angular.isDefined(o.offsetWidth)?o.offsetWidth:o.prop("offsetWidth"),l=angular.isDefined(o.offsetHeight)?o.offsetHeight:o.prop("offsetHeight");n=this.parsePlacement(n);var s=i?this.offset(t):this.position(t),u={top:0,left:0,placement:""};if(n[2]){var d=this.viewportOffset(t,i),c=e.getComputedStyle(o),p={width:a+Math.round(Math.abs(this.parseStyle(c.marginLeft)+this.parseStyle(c.marginRight))),height:l+Math.round(Math.abs(this.parseStyle(c.marginTop)+this.parseStyle(c.marginBottom)))};if(n[0]="top"===n[0]&&p.height>d.top&&p.height<=d.bottom?"bottom":"bottom"===n[0]&&p.height>d.bottom&&p.height<=d.top?"top":"left"===n[0]&&p.width>d.left&&p.width<=d.right?"right":"right"===n[0]&&p.width>d.right&&p.width<=d.left?"left":n[0],n[1]="top"===n[1]&&p.height-s.height>d.bottom&&p.height-s.height<=d.top?"bottom":"bottom"===n[1]&&p.height-s.height>d.top&&p.height-s.height<=d.bottom?"top":"left"===n[1]&&p.width-s.width>d.right&&p.width-s.width<=d.left?"right":"right"===n[1]&&p.width-s.width>d.left&&p.width-s.width<=d.right?"left":n[1],"center"===n[1])if(r.vertical.test(n[0])){var f=s.width/2-a/2;d.left+f<0&&p.width-s.width<=d.right?n[1]="left":d.right+f<0&&p.width-s.width<=d.left&&(n[1]="right")}else{var h=s.height/2-p.height/2;d.top+h<0&&p.height-s.height<=d.bottom?n[1]="top":d.bottom+h<0&&p.height-s.height<=d.top&&(n[1]="bottom")}}switch(n[0]){case"top":u.top=s.top-l;break;case"bottom":u.top=s.top+s.height;break;case"left":u.left=s.left-a;break;case"right":u.left=s.left+s.width}switch(n[1]){case"top":u.top=s.top;break;case"bottom":u.top=s.top+s.height-l;break;case"left":u.left=s.left;break;case"right":u.left=s.left+s.width-a;break;case"center":r.vertical.test(n[0])?u.left=s.left+s.width/2-a/2:u.top=s.top+s.height/2-l/2}return u.top=Math.round(u.top),u.left=Math.round(u.left),u.placement="center"===n[1]?n[0]:n[0]+"-"+n[1],u},adjustTop:function(t,e,o,n){return-1!==t.indexOf("top")&&o!==n?{top:e.top-n+"px"}:void 0},positionArrow:function(t,o){t=this.getRawNode(t);var n=t.querySelector(".tooltip-inner, .popover-inner");if(n){var i=angular.element(n).hasClass("tooltip-inner"),a=t.querySelector(i?".tooltip-arrow":".arrow");if(a){var l={top:"",bottom:"",left:"",right:""};if(o=this.parsePlacement(o),"center"===o[1])return void angular.element(a).css(l);var s="border-"+o[0]+"-width",u=e.getComputedStyle(a)[s],d="border-";d+=r.vertical.test(o[0])?o[0]+"-"+o[1]:o[1]+"-"+o[0],d+="-radius";var c=e.getComputedStyle(i?n:t)[d];switch(o[0]){case"top":l.bottom=i?"0":"-"+u;break;case"bottom":l.top=i?"0":"-"+u;break;case"left":l.right=i?"0":"-"+u;break;case"right":l.left=i?"0":"-"+u}l[o[1]]=c,angular.element(a).css(l)}}}}}]),angular.module("ui.bootstrap.buttons",[]).constant("uibButtonConfig",{activeClass:"active",toggleEvent:"click"}).controller("UibButtonsController",["uibButtonConfig",function(t){this.activeClass=t.activeClass||"active",this.toggleEvent=t.toggleEvent||"click"}]).directive("uibBtnRadio",["$parse",function(t){return{require:["uibBtnRadio","ngModel"],controller:"UibButtonsController",controllerAs:"buttons",link:function(e,o,n,i){var r=i[0],a=i[1],l=t(n.uibUncheckable);o.find("input").css({display:"none"}),a.$render=function(){o.toggleClass(r.activeClass,angular.equals(a.$modelValue,e.$eval(n.uibBtnRadio)))},o.on(r.toggleEvent,function(){if(!n.disabled){var t=o.hasClass(r.activeClass);(!t||angular.isDefined(n.uncheckable))&&e.$apply(function(){a.$setViewValue(t?null:e.$eval(n.uibBtnRadio)),a.$render()})}}),n.uibUncheckable&&e.$watch(l,function(t){n.$set("uncheckable",t?"":void 0)})}}}]).directive("uibBtnCheckbox",function(){return{require:["uibBtnCheckbox","ngModel"],controller:"UibButtonsController",controllerAs:"button",link:function(t,e,o,n){function i(){return a(o.btnCheckboxTrue,!0)}function r(){return a(o.btnCheckboxFalse,!1)}function a(e,o){return angular.isDefined(e)?t.$eval(e):o}var l=n[0],s=n[1];e.find("input").css({display:"none"}),s.$render=function(){e.toggleClass(l.activeClass,angular.equals(s.$modelValue,i()))},e.on(l.toggleEvent,function(){o.disabled||t.$apply(function(){s.$setViewValue(e.hasClass(l.activeClass)?r():i()),s.$render()})})}}}),angular.module("uib/template/modal/window.html",[]).run(["$templateCache",function(t){t.put("uib/template/modal/window.html","
\n")}]),angular.module("ui.bootstrap.position").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibPositionCss&&angular.element(document).find("head").prepend(''),angular.$$uibPositionCss=!0});