/* * # Fomantic UI - 2.8.4 * https://github.com/fomantic/Fomantic-UI * http://fomantic-ui.com/ * * Copyright 2014 Contributors * Released under the MIT license * http://opensource.org/licenses/MIT * */ !function(M,e,n,E){"use strict";M.isFunction=M.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},e=void 0!==e&&e.Math==Math?e:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),M.fn.toast=function(w){var k,e=M(this),x=e.selector||"",T=(new Date).getTime(),I=[],P=w,O="string"==typeof P,A=[].slice.call(arguments,1);return e.each(function(){var o,s,a,i,c,l,r,u,d=M.isPlainObject(w)?M.extend(!0,{},M.fn.toast.settings,w):M.extend({},M.fn.toast.settings),p=d.className,e=d.selector,f=d.error,n=d.namespace,m=d.fields,t="."+n,g=n+"-module",h=M(this),v=d.context?M(d.context):M("body"),b=h.hasClass("toast")||h.hasClass("message")||h.hasClass("card"),C=this,y=b?h.data(g):E;u={initialize:function(){u.verbose("Initializing element"),u.has.container()||u.create.container(),(b||""!==d.message||""!==d.title||""!==u.get.iconClass()||d.showImage||u.has.configActions())&&("string"==typeof d.showProgress&&-1!==[p.top,p.bottom].indexOf(d.showProgress)||(d.showProgress=!1),u.create.toast(),d.closeOnClick&&(d.closeIcon||0",{class:d.position+" "+p.container}))},toast:function(){if(o=M("
",{class:p.box}),b)s=d.cloneModule?h.clone().removeAttr("id"):h,r=s.find("> i"+u.helpers.toClass(p.close)),d.closeIcon=0");var e=M("
",{class:p.content}),n=u.get.iconClass();""!==n&&s.append(M("",{class:n+" "+p.icon})),d.showImage&&s.append(M("",{class:p.image+" "+d.classImage,src:d.showImage})),""!==d.title&&e.append(M("
",{class:p.title,text:d.title})),e.append(M("
",{html:u.helpers.escape(d.message,d.preserveHTML)})),s.addClass(d.class+" "+p.toast).append(e),s.css("opacity",d.opacity),d.closeIcon&&((r=M("",{class:p.close+" "+("string"==typeof d.closeIcon?d.closeIcon:"")})).hasClass(p.left)?s.prepend(r):s.append(r))}if(s.hasClass(p.compact)&&(d.compact=!0),s.hasClass("card")&&(d.compact=!1),a=s.find(".actions"),u.has.configActions()&&(0===a.length&&(a=M("
",{class:p.actions+" "+(d.classActions||"")}).appendTo(s)),s.hasClass("card")&&!a.hasClass(p.attached)&&(a.addClass(p.extraContent),a.hasClass(p.vertical)&&(a.removeClass(p.vertical),u.error(f.verticalCard))),d.actions.forEach(function(e){var n=e[m.icon]?'':"",t=u.helpers.escape(e[m.text]||"",d.preserveHTML),o=u.helpers.deQuote(e[m.class]||""),s=e[m.click]&&M.isFunction(e[m.click])?e[m.click]:function(){};a.append(M("