nexus site path corrected
[portal.git] / ecomp-portal-FE / client / bower_components / angular-material / modules / js / toast / toast.min.js
1 /*!
2  * Angular Material Design
3  * https://github.com/angular/material
4  * @license MIT
5  * v0.9.8
6  */
7 !function(t,e,n){"use strict";function o(){return{restrict:"E"}}function i(t){function e(t,e,o,i){function a(a,s,m){return s=i.extractElementByName(s,"md-toast"),n=m.content,s.addClass(m.position.split(" ").map(function(t){return"md-"+t}).join(" ")),m.parent.addClass(r(m.position)),m.onSwipe=function(e,n){s.addClass("md-"+e.type.replace("$md.","")),t(o.cancel)},s.on("$md.swipeleft $md.swiperight",m.onSwipe),e.enter(s,m.parent)}function s(t,n,o){return n.off("$md.swipeleft $md.swiperight",o.onSwipe),o.parent.removeClass(r(o.position)),e.leave(n)}function r(t){return"md-toast-open-"+(t.indexOf("top")>-1?"top":"bottom")}return{onShow:a,onRemove:s,position:"bottom left",themable:!0,hideDelay:3e3}}var n,o=t("$mdToast").setDefaults({methods:["position","hideDelay","capsule"],options:e}).addPreset("simple",{argOption:"content",methods:["content","action","highlightAction","theme","parent"],options:["$mdToast","$mdTheming",function(t,e){var o={template:['<md-toast md-theme="{{ toast.theme }}" ng-class="{\'md-capsule\': toast.capsule}">',"<span flex>{{ toast.content }}</span>",'<md-button class="md-action" ng-if="toast.action" ng-click="toast.resolve()" ng-class="{\'md-highlight\': toast.highlightAction}">',"{{ toast.action }}","</md-button>","</md-toast>"].join(""),controller:["$scope",function(e){var o=this;e.$watch(function(){return n},function(){o.content=n}),this.resolve=function(){t.hide()}}],theme:e.defaultTheme(),controllerAs:"toast",bindToController:!0};return o}]}).addMethod("updateContent",function(t){n=t});return e.$inject=["$timeout","$animate","$mdToast","$mdUtil"],o}e.module("material.components.toast",["material.core","material.components.button"]).directive("mdToast",o).provider("$mdToast",i),i.$inject=["$$interimElementProvider"]}(window,window.angular);