!function(a,b,c,d){a.fn.modal=function(e){var f,g=a(this),h=a(c),i=a.isPlainObject(e)?a.extend(!0,{},a.fn.modal.settings,e):a.fn.modal.settings,j=i.selector,k=i.className,l=i.namespace,m=i.error,n="."+l,o="module-"+l,p=g.selector||"",q=(new Date).getTime(),r=[],s=arguments[0],t="string"==typeof s,u=[].slice.call(arguments,1);return g.each(function(){var c,e,v=a(this),w=a(i.context),x=g.not(v),y=v.find(j.closeButton),z=this,A=v.data(o);e={initialize:function(){e.verbose("Attaching events"),y.on("click",e.event.close),e.cache.sizes(),e.verbose("Creating dimmer"),w.dimmer({closable:i.closable,duration:i.duration,onShow:function(){e.add.keyboardShortcuts(),a.proxy(i.onShow,this)()},onHide:function(){v.is(":visible")&&(w.off(".dimmer"),e.hide(),a.proxy(i.onHide,this)()),e.remove.keyboardShortcuts()}}),c=w.children(j.dimmer),v.parent()[0]!==c[0]&&(e.debug("Moving element inside dimmer",w),v=v.detach().appendTo(c)),e.instantiate()},instantiate:function(){e.verbose("Storing instance of modal"),A=e,v.data(o,A)},destroy:function(){e.verbose("Destroying previous modal"),v.off(n)},event:{close:function(){e.verbose("Close button pressed"),w.dimmer("hide")},keyboard:function(a){var b=a.which,c=27;b==c&&(e.debug("Escape key pressed hiding modal"),w.dimmer("hide"),a.preventDefault())},resize:function(){e.cache.sizes(),v.is(":visible")&&(e.set.type(),e.set.position())}},toggle:function(){e.is.active()?e.hide():e.show()},show:function(){e.debug("Showing modal"),e.set.type(),e.set.position(),e.hideAll(),i.transition&&a.fn.transition!==d?v.transition(i.transition+" in",i.duration,e.set.active):v.fadeIn(i.duration,i.easing,e.set.active),e.debug("Triggering dimmer"),w.dimmer("show")},hide:function(){e.debug("Hiding modal"),h.off("keyup."+l),i.transition&&a.fn.transition!==d?v.transition(i.transition+" out",i.duration,function(){e.remove.active()}):v.fadeOut(i.duration,i.easing,e.remove.active)},hideAll:function(){x.filter(":visible").modal("hide")},add:{keyboardShortcuts:function(){e.verbose("Adding keyboard shortcuts"),h.on("keyup"+n,e.event.keyboard)}},remove:{active:function(){v.removeClass(k.active)},keyboardShortcuts:function(){e.verbose("Removing keyboard shortcuts"),h.off("keyup"+n)}},cache:{sizes:function(){e.cache={height:v.outerHeight()+i.offset,contextHeight:"body"==i.context?a(b).height():w.height()},e.debug("Caching modal and container sizes",e.cache)}},can:{fit:function(){return e.cache.height0&&(console.groupCollapsed(b),console.table?console.table(r):a.each(r,function(a,b){console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.groupEnd()),r=[]}},invoke:function(b,c,g){var h,i,j;return c=c||u,g=z||g,"string"==typeof b&&A!==d&&(b=b.split(/[\. ]/),h=b.length-1,a.each(b,function(c,f){var g=c!=h?f+b[c+1].charAt(0).toUpperCase()+b[c+1].slice(1):b;if(a.isPlainObject(A[f])&&c!=h)A=A[f];else{if(!a.isPlainObject(A[g])||c==h)return A[f]!==d?(i=A[f],!1):A[g]!==d?(i=A[g],!1):(e.error(m.method),!1);A=A[g]}})),a.isFunction(i)?j=i.apply(g,c):i!==d&&(j=i),a.isArray(f)?f.push(j):"string"==typeof f?f=[f,j]:j!==d&&(f=j),i}},t?(A===d&&e.initialize(),f=e.invoke(s)):(A!==d&&e.destroy(),e.initialize())}),f!==d?f:this},a.fn.modal.settings={name:"Modal",namespace:"modal",verbose:!0,debug:!0,performance:!0,offset:0,transition:"scale",duration:500,easing:"easeOutExpo",closable:!0,context:"body",onShow:function(){},onHide:function(){},selector:{closeButton:".close, .actions .button",dimmer:".ui.dimmer"},error:{method:"The method you called is not defined."},className:{active:"active",scrolling:"scrolling"}}}(jQuery,window,document);