performance:d}}),T=i}}functionh(e){returnk+e+w}functionp(e,t,n,o,r,i,a){vard=1/n*100,c=(n-1)/n,l=x({share:d,gutterShare:c,gutter:r}),s={left:N({unit:l,offset:e.col,gutter:r}),width:_({unit:l,span:t.col,gutter:r}),paddingTop:"",marginTop:"",top:"",height:""};switch(i){case"fixed":s.top=N({unit:a,offset:e.row,gutter:r}),s.height=_({unit:a,span:t.row,gutter:r});break;case"ratio":varm=d/a,u=x({share:m,gutterShare:c,gutter:r});s.paddingTop=_({unit:u,span:t.row,gutter:r}),s.marginTop=N({unit:u,offset:e.row,gutter:r});break;case"fit":varh=(o-1)/o,m=1/o*100,u=x({share:m,gutterShare:h,gutter:r});s.top=N({unit:u,offset:e.row,gutter:r}),s.height=_({unit:u,span:t.row,gutter:r})}returns}functionf(e,t,n,o,r){vari={height:"",paddingBottom:""};switch(o){case"fixed":i.height=_({unit:r,span:t,gutter:n});break;case"ratio":vara=1===e?0:(e-1)/e,d=1/e*100,c=d*(1/r),l=x({share:c,gutterShare:a,gutter:n});i.paddingBottom=_({unit:l,span:t,gutter:n});break;case"fit":}returni}functiong(){return[].filter.call(a.children(),function(e){return"MD-GRID-TILE"==e.tagName})}functionb(e){return[].map.call(e,function(e){varn=t.element(e).controller("mdGridTile");return{row:parseInt(i.getResponsiveAttribute(n.$attrs,"md-rowspan"),10)||1,col:parseInt(i.getResponsiveAttribute(n.$attrs,"md-colspan"),10)||1}})}functionE(){vare=parseInt(i.getResponsiveAttribute(d,"md-cols"),10);if(isNaN(e))throw"md-grid-list: md-cols attribute was not found, or contained a non-numeric value";returne}functionv(){returny(i.getResponsiveAttribute(d,"md-gutter")||1)}functionM(){vare=i.getResponsiveAttribute(d,"md-row-height");switch($()){case"fixed":returny(e);case"ratio":vart=e.split(":");returnparseFloat(t[0])/parseFloat(t[1]);case"fit":return0}}function$(){vare=i.getResponsiveAttribute(d,"md-row-height");return"fit"==e?"fit":-1!==e.indexOf(":")?"ratio":"fixed"}functiony(e){return/\D$/.test(e)?e:e+"px"}a.attr("role","list"),c.layoutDelegate=u;varA=t.bind(c,c.invalidateLayout),C=l();n.$on("$destroy",s);varT,k=e.startSymbol(),w=e.endSymbol(),x=e(h("share")+"% - ("+h("gutter")+" * "+h("gutterShare")+")"),N=e("calc(("+h("unit")+" + "+h("gutter")+") * "+h("offset")+")"),_=e("calc(("+h("unit")+") * "+h("span")+" + ("+h("span")+" - 1) * "+h("gutter")+")")}return{restrict:"E",controller:n,scope:{mdOnLayout:"&"},link:a}}functionn(e){this.layoutInvalidated=!1,this.tilesInvalidated=!1,this.$timeout_=e.nextTick,this.layoutDelegate=t.noop}functiono(e){functionn(t,n){varo,a,d,c,l,s;returnc=e.time(function(){a=r(t,n)}),o={layoutInfo:function(){returna},map:function(t){returnl=e.time(function(){vare=o.layoutInfo();d=t(e.positioning,e.rowCount)}),o},reflow:function(t){returns=e.time(function(){vare=t||i;e(d.grid,d.tiles)}),o},performance:function(){return{tileCount:n.length,layoutTime:c,mapTime:l,reflowTime:s,totalTime:c+l+s}}}}functiono(e,t){e.element.css(e.style),t.forEach(function(e){e.element.css(e.style)})}functionr(e,t){functionn(t,n){if(t.col>e)throw"md-grid-list: Tile at position "+n+" has a colspan ("+t.col+") that exceeds the column count ("+e+")";for(vara=0,s=0;s-a<t.col;)d>=e?o():(a=l.indexOf(0,d),-1!==a&&-1!==(s=i(a+1))?d=s+1:(a=s=0,o()));returnr(a,t.col,t.row),d=a+t.col,{col:a,row:c}}functiono(){d=0,c++,r(0,e,-1)}functionr(e,t,n){for(varo=e;e+t>o;o++)l[o]=Math.max(l[o]+n,0)}functioni(e){vart;for(t=e;t<l.length;t++)if(0!==l[t])returnt;returnt===l.length?t:void0}functiona(){for(vart=[],n=0;e>n;n++)t.push(0);returnt}vard=0,c=0,l=a();return{positioning:t.map(function(e,t){return{spans:e,position:n(e,t)}}),rowCount:c+Math.max.apply(Math,l)}}vari=o;returnn.animateWith=function(e){i=t.isFunction(e)?e:o},n}functionr(e){functionn(n,o,r,i){o.attr("role","listitem");vara=e.watchResponsiveAttributes(["md-colspan","md-rowspan"],r,t.bind(i,i.invalidateLayout));i.invalidateTiles(),n.$on("$destroy",function(){a(),i.invalidateLayout()}),t.isDefined(n.$parent.$index)&&n.$watch(function(){returnn.$parent.$index},function(e,t){e!==t&&i.invalidateTiles()})}return{restrict:"E",require:"^mdGridList",template:"<figure ng-transclude></figure>",tra
varn=t.currentTarget.children[0],o=n.scrollHeight>n.clientHeight;if(o&&n.children.length>0){varr=t.pageX-t.currentTarget.getBoundingClientRect().left;r>n.querySelector("md-option").offsetWidth&&(e=!0)}}returne}t&&"mouseup"==t.type&&t.currentTarget!=u[0]||n()||h.isMultiple||(a.restoreFocus=!0,c.nextTick(function(){e.hide(h.ngModel.$viewValue)},!0))}if(!a.isRemoved){varu=a.selectEl,h=u.controller("mdSelectMenu")||{};returni.addClass("md-clickable"),a.backdrop&&a.backdrop.on("click",t),u.on("keydown",r),u.on("mouseup",m),function(){a.backdrop&&a.backdrop.off("click",t),u.off("keydown",r),u.off("mouseup",m),i.removeClass("md-clickable"),a.isRemoved=!0}}}returnA(),E(r,a),g(a.target),a.hideBackdrop=f(r,i,a),d(r,i,a).then(function(e){returna.alreadyOpen=!0,a.cleanupInteraction=C(),a.cleanupResizing=y(),e},a.hideBackdrop)}functiong(e,n){n=t.isUndefined(n)?"true":"false",e&&e.attr("aria-expanded",n)}functionb(e){vart=e.selectEl.controller("mdSelect");if(t){varn=e.selectEl.controller("mdSelectMenu");t.setLabelText(n.selectedLabels()),t.triggerClose()}}functionE(e,t){e[0].parentNode===t.parent[0]&&t.parent[0].removeChild(e[0])}functionv(e,n,o){vars,m,u=n[0],h=o.target[0].firstElementChild,p=o.parent[0],f=o.selectEl[0],g=o.contentEl[0],b=p.getBoundingClientRect(),E=h.getBoundingClientRect(),v=!1,M={left:b.left+d,top:d,bottom:b.height-d,right:b.width-d-(c.floatingScrollbars()?16:0)},$={top:E.top-M.top,left:E.left-M.left,right:M.right-(E.left+E.width),bottom:M.bottom-(E.top+E.height)},y=b.width-2*d,A=g.scrollHeight>g.offsetHeight,C=f.querySelector("md-option[selected]"),s=f.getElementsByTagName("md-option"),T=f.getElementsByTagName("md-optgroup"),k=r(o.loadingAsync);m=k?g.firstElementChild||g:C?C:T.length?T[0]:s.length?s[0]:g.firstElementChild||g,g.offsetWidth>y&&(g.style["max-width"]=y+"px"),v&&(g.style["min-width"]=E.width+"px"),A&&f.classList.add("md-overflow");varw=m;"MD-OPTGROUP"===(w.tagName||"").toUpperCase()&&(w=s[0]||g.firstElementChild||g,m=w),o.focusedNode=w;varx=f.getBoundingClientRect(),N=a(m);if(m){var_=l.getComputedStyle(m);N.paddingLeft=parseInt(_.paddingLeft,10)||0,N.paddingRight=parseInt(_.paddingRight,10)||0}if(A){varH=g.offsetHeight/2;g.scrollTop=N.top+N.height/2-H,$.top<H?g.scrollTop=Math.min(N.top,g.scrollTop+H-$.top):$.bottom<H&&(g.scrollTop=Math.max(N.top+N.height-x.height,g.scrollTop-H+$.bottom))}varS,D,O,I;v?(S=E.left,D=E.top+E.height,O="50% 0",D+x.height>M.bottom&&(D=E.top-x.height,O="50% 100%")):(S=E.left+N.left-N.paddingLeft+2,D=Math.floor(E.top+E.height/2-N.height/2-N.top+g.scrollTop)+2,O=N.left+E.width/2+"px "+(N.top+N.height/2-g.scrollTop)+"px 0px",I=E.width+N.paddingLeft+N.paddingRight);varR=u.getBoundingClientRect(),L=Math.round(100*Math.min(E.width/x.width,1))/100,P=Math.round(100*Math.min(E.height/x.height,1))/100;return{container:{element:t.element(u),styles:{left:Math.floor(i(M.left,S,M.right-R.width)),top:Math.floor(i(M.top,D,M.bottom-R.height)),"min-width":I}},dropDown:{element:t.element(f),styles:{transformOrigin:O,transform:o.alreadyOpen?"":c.supplant("scale({0},{1})",[L,P])}}}}varM="$mdSelect.show() expected a target element in options.target but got '{0}'!",$=c.dom.animator;return{parent:"body",themable:!0,onShow:f,onRemove:p,hasBackdrop:!0,disableParentScroll:!0}}functionr(e){returne&&t.isFunction(e.then)}functioni(e,t,n){returnMath.max(e,Math.min(t,n))}functiona(e){returne?{left:e.offsetLeft,top:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}:{left:0,top:0,width:0,height:0}}returno.$inject=["$mdSelect","$mdConstant","$mdUtil","$window","$q","$$rAF","$animateCss","$animate"],e("$mdSelect").setDefaults({methods:["target"],options:o})}vard=8,c=0;t.module("material.components.select",["material.core","material.components.backdrop"]).directive("mdSelect",e).directive("mdSelectMenu",o).directive("mdOption",r).directive("mdOptgroup",i).provider("$mdSelect",a),e.$inject=["$mdSelect","$mdUtil","$mdTheming","$mdAria","$compile","$parse"],o.$inject=["$parse","$mdUtil","$mdTheming"],r.$inject=["$mdButtonInkRipple","$mdUtil"],a.$inject=["$$interimElementProvider"]}(
returnthis.preloadIcons(i),o(r,e,t,n,i)}]},o.$inject=["config","$http","$q","$log","$templateCache"]}(),function(){functione(e,o,r,i,a,d){varc,l,s=this;this.nestLevel=parseInt(o.mdNestLevel,10)||0,this.init=function(e,t){t=t||{},c=e,l=r[0].querySelector("[ng-click],[ng-mouseenter]"),this.isInMenuBar=t.isInMenuBar,this.nestedMenus=a.nodesToArray(c[0].querySelectorAll(".md-nested-menu")),this.enableHoverListener(),c.on("$mdInterimElementRemove",function(){s.isOpen=!1})},this.enableHoverListener=function(){i.$on("$mdMenuOpen",function(e,t){c[0].contains(t[0])&&(s.currentlyOpenMenu=t.controller("mdMenu"),s.isAlreadyOpening=!1,s.currentlyOpenMenu.registerContainerProxy(s.triggerContainerProxy.bind(s)))}),i.$on("$mdMenuClose",function(e,t){c[0].contains(t[0])&&(s.currentlyOpenMenu=n)});vare,o=t.element(a.nodesToArray(c[0].querySelectorAll("md-menu-item")));o.on("mouseenter",function(n){if(!s.isAlreadyOpening){varo=n.target.querySelector("md-menu")||a.getClosest(n.target,"MD-MENU");e=d(function(){if(o&&(o=t.element(o).controller("mdMenu")),s.currentlyOpenMenu&&s.currentlyOpenMenu!=o){vare=s.nestLevel+1;s.currentlyOpenMenu.close(!0,{closeTo:e})}elseo&&!o.isOpen&&o.open&&(s.isAlreadyOpening=!0,o.open())},o?100:250);varr=n.currentTarget.querySelector("[tabindex]");r&&r.focus()}}),o.on("mouseleave",function(t){e&&(d.cancel(e),e=n)})},this.open=function(t){t&&t.stopPropagation(),t&&t.preventDefault(),s.isOpen||(s.isOpen=!0,l=l||(t?t.target:r[0]),i.$emit("$mdMenuOpen",r),e.show({scope:i,mdMenuCtrl:s,nestLevel:s.nestLevel,element:c,target:l,preserveElement:s.isInMenuBar||s.nestedMenus.length>0,parent:s.isInMenuBar?r:"body"}))},i.$mdOpenMenu=this.open,i.$watch(function(){returns.isOpen},function(e){e?(l.setAttribute("aria-expanded","true"),r[0].classList.add("md-open"),t.forEach(s.nestedMenus,function(e){e.classList.remove("md-open")})):(l&&l.setAttribute("aria-expanded","false"),r[0].classList.remove("md-open")),i.$mdMenuIsOpen=s.isOpen}),this.focusMenuContainer=function(){vare=c[0].querySelector("[md-menu-focus-target]");e||(e=c[0].querySelector(".md-button")),e.focus()},this.registerContainerProxy=function(e){this.containerProxy=e},this.triggerContainerProxy=function(e){this.containerProxy&&this.containerProxy(e)},this.destroy=function(){returne.destroy()},this.close=function(n,o){if(s.isOpen&&(s.isOpen=!1,i.$emit("$mdMenuClose",r),e.hide(null,o),!n)){vara=s.restoreFocusTo||r.find("button")[0];ainstanceoft.element&&(a=a[0]),a&&a.focus()}},this.positionMode=function(){vare=(o.mdPositionMode||"target").split(" ");return1==e.length&&e.push(e[0]),{left:e[0],top:e[1]}},this.offsets=function(){vare=(o.mdOffset||"0 0").split(" ").map(parseFloat);if(2==e.length)return{left:e[0],top:e[1]};if(1==e.length)return{top:e[0],left:e[0]};throwError("Invalid offsets specified. Please follow format <x, y> or <n>")}}t.module("material.components.menu").controller("mdMenuCtrl",e),e.$inject=["$mdMenu","$attrs","$element","$scope","$mdUtil","$timeout"]}(),function(){functione(e){functiono(n){n.addClass("md-menu");varo=n.children()[0];if(o.hasAttribute("ng-click")||(o=o.querySelector("[ng-click],[ng-mouseenter]")||o),!o||"MD-BUTTON"!=o.nodeName&&"BUTTON"!=o.nodeName||o.hasAttribute("type")||o.setAttribute("type","button"),2!=n.children().length)throwError(i+"Expected two children elements.");o&&o.setAttribute("aria-haspopup","true");vara=n[0].querySelectorAll("md-menu"),d=parseInt(n[0].getAttribute("md-nest-level"),10)||0;returna&&t.forEach(e.nodesToArray(a),function(e){e.hasAttribute("md-position-mode")||e.setAttribute("md-position-mode","cascade"),e.classList.add("md-nested-menu"),e.setAttribute("md-nest-level",d+1),e.setAttribute("role","menu")}),r}functionr(e,o,r,i){vara=i[0],d=i[1]!=n,c=t.element('<div class="md-open-menu-container md-whiteframe-z2"></div>'),l=o.children()[1];c.append(l),d&&(o.append(c),c[0].style.display="none"),a.init(c,{isInMenuBar:d}),e.$on("$destroy",function(){a.destroy()["finally"](function(){c.remove()})})}vari="Invalid HTML for md-menu: ";return{restrict:"E",require:["mdMenu","?^mdMenuBar"],control