!function(n,t,i){"use strict";t=void 0!==t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),n.fn.dimmer=function(t){var r,f=n(this),e=+new Date,u=[],o=arguments[0],s="string"==typeof o,h=[].slice.call(arguments,1);return f.each(function(){var a,v,c,l=n.isPlainObject(t)?n.extend(!0,{},n.fn.dimmer.settings,t):n.extend({},n.fn.dimmer.settings),w=l.selector,nt=l.namespace,y=l.className,rt=l.error,b="."+nt,g="module-"+nt,tt=f.selector||"",it="ontouchstart"in i.documentElement?"touchstart":"click",p=n(this),k=this,d=p.data(g);c={preinitialize:function(){c.is.dimmer()?(v=p.parent(),a=p):(v=p,a=c.has.dimmer()?l.dimmerName?v.find(w.dimmer).filter("."+l.dimmerName):v.find(w.dimmer):c.create(),c.set.variation())},initialize:function(){c.debug("Initializing dimmer",l),c.bind.events(),c.set.dimmable(),c.instantiate()},instantiate:function(){c.verbose("Storing instance of module",c),d=c,p.data(g,d)},destroy:function(){c.verbose("Destroying previous module",a),c.unbind.events(),c.remove.variation(),v.off(b)},bind:{events:function(){"hover"==l.on?v.on("mouseenter"+b,c.show).on("mouseleave"+b,c.hide):"click"==l.on&&v.on(it+b,c.toggle),c.is.page()&&(c.debug("Setting as a page dimmer",v),c.set.pageDimmer()),c.is.closable()&&(c.verbose("Adding dimmer close event",a),v.on(it+b,w.dimmer,c.event.click))}},unbind:{events:function(){p.removeData(g),v.off(b)}},event:{click:function(t){c.verbose("Determining if event occured on dimmer",t),(0===a.find(t.target).length||n(t.target).is(w.content))&&(c.hide(),t.stopImmediatePropagation())}},addContent:function(t){var i=n(t);c.debug("Add content to dimmer",i),i.parent()[0]!==a[0]&&i.detach().appendTo(a)},create:function(){var t=n(l.template.dimmer());return l.dimmerName&&(c.debug("Creating named dimmer",l.dimmerName),t.addClass(l.dimmerName)),t.appendTo(v),t},show:function(t){t=n.isFunction(t)?t:function(){},c.debug("Showing dimmer",a,l),c.is.dimmed()&&!c.is.animating()||!c.is.enabled()?c.debug("Dimmer is already shown or disabled"):(c.animate.show(t),l.onShow.call(k),l.onChange.call(k))},hide:function(t){t=n.isFunction(t)?t:function(){},c.is.dimmed()||c.is.animating()?(c.debug("Hiding dimmer",a),c.animate.hide(t),l.onHide.call(k),l.onChange.call(k)):c.debug("Dimmer is not visible")},toggle:function(){c.verbose("Toggling dimmer visibility",a),c.is.dimmed()?c.hide():c.show()},animate:{show:function(t){t=n.isFunction(t)?t:function(){},l.useCSS&&void 0!==n.fn.transition&&a.transition("is supported")?("auto"!==l.opacity&&c.set.opacity(),a.transition({animation:l.transition+" in",queue:!1,duration:c.get.duration(),useFailSafe:!0,onStart:function(){c.set.dimmed()},onComplete:function(){c.set.active(),t()}})):(c.verbose("Showing dimmer animation with javascript"),c.set.dimmed(),"auto"==l.opacity&&(l.opacity=.8),a.stop().css({opacity:0,width:"100%",height:"100%"}).fadeTo(c.get.duration(),l.opacity,function(){a.removeAttr("style"),c.set.active(),t()}))},hide:function(t){t=n.isFunction(t)?t:function(){},l.useCSS&&void 0!==n.fn.transition&&a.transition("is supported")?(c.verbose("Hiding dimmer with css"),a.transition({animation:l.transition+" out",queue:!1,duration:c.get.duration(),useFailSafe:!0,onStart:function(){c.remove.dimmed()},onComplete:function(){c.remove.active(),t()}})):(c.verbose("Hiding dimmer with javascript"),c.remove.dimmed(),a.stop().fadeOut(c.get.duration(),function(){c.remove.active(),a.removeAttr("style"),t()}))}},get:{dimmer:function(){return a},duration:function(){return"object"==typeof l.duration?c.is.active()?l.duration.hide:l.duration.show:l.duration}},has:{dimmer:function(){return l.dimmerName?p.find(w.dimmer).filter("."+l.dimmerName).length>0:p.find(w.dimmer).length>0}},is:{active:function(){return a.hasClass(y.active)},animating:function(){return a.is(":animated")||a.hasClass(y.animating)},closable:function(){return"auto"==l.closable?"hover"!=l.on:l.closable},dimmer:function(){return p.hasClass(y.dimmer)},dimmable:function(){return p.hasClass(y.dimmable)},dimmed:function(){return v.hasClass(y.dimmed)},disabled:function(){return v.hasClass(y.disabled)},enabled:function(){return!c.is.disabled()},page:function(){return v.is("body")},pageDimmer:function(){return a.hasClass(y.pageDimmer)}},can:{show:function(){return!a.hasClass(y.disabled)}},set:{opacity:function(n){var i=a.css("background-color"),t=i.split(","),r=t&&3==t.length,u=t&&4==t.length;n=0===l.opacity?0:l.opacity||n,r||u?(t[3]=n+")",i=t.join(",")):i="rgba(0, 0, 0, "+n+")",c.debug("Setting opacity to",n),a.css("background-color",i)},active:function(){a.addClass(y.active)},dimmable:function(){v.addClass(y.dimmable)},dimmed:function(){v.addClass(y.dimmed)},pageDimmer:function(){a.addClass(y.pageDimmer)},disabled:function(){a.addClass(y.disabled)},variation:function(n){(n=n||l.variation)&&a.addClass(n)}},remove:{active:function(){a.removeClass(y.active)},dimmed:function(){v.removeClass(y.dimmed)},disabled:function(){a.removeClass(y.disabled)},variation:function(n){(n=n||l.variation)&&a.removeClass(n)}},setting:function(t,i){if(c.debug("Changing setting",t,i),n.isPlainObject(t))n.extend(!0,l,t);else{if(void 0===i)return l[t];n.isPlainObject(l[t])?n.extend(!0,l[t],i):l[t]=i}},internal:function(t,i){if(n.isPlainObject(t))n.extend(!0,c,t);else{if(void 0===i)return c[t];c[t]=i}},debug:function(){!l.silent&&l.debug&&(l.performance?c.performance.log(arguments):(c.debug=Function.prototype.bind.call(console.info,console,l.name+":"),c.debug.apply(console,arguments)))},verbose:function(){!l.silent&&l.verbose&&l.debug&&(l.performance?c.performance.log(arguments):(c.verbose=Function.prototype.bind.call(console.info,console,l.name+":"),c.verbose.apply(console,arguments)))},error:function(){l.silent||(c.error=Function.prototype.bind.call(console.error,console,l.name+":"),c.error.apply(console,arguments))},performance:{log:function(n){var t,i,r;l.performance&&(t=+new Date,r=e||t,i=t-r,e=t,u.push({Name:n[0],Arguments:[].slice.call(n,1)||"",Element:k,"Execution Time":i})),clearTimeout(c.performance.timer),c.performance.timer=setTimeout(c.performance.display,500)},display:function(){var t=l.name+":",i=0;e=!1,clearTimeout(c.performance.timer),n.each(u,function(n,t){i+=t["Execution Time"]}),t+=" "+i+"ms",tt&&(t+=" '"+tt+"'"),f.length>1&&(t+=" ("+f.length+")"),(void 0!==console.group||void 0!==console.table)&&u.length>0&&(console.groupCollapsed(t),console.table?console.table(u):n.each(u,function(n,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),u=[]}},invoke:function(t,i,u){var s,e,o,f=d;return i=i||h,u=k||u,"string"==typeof t&&void 0!==f&&(t=t.split(/[\. ]/),s=t.length-1,n.each(t,function(i,r){var u=i!=s?r+t[i+1].charAt(0).toUpperCase()+t[i+1].slice(1):t;if(n.isPlainObject(f[u])&&i!=s)f=f[u];else{if(void 0!==f[u])return e=f[u],!1;if(!n.isPlainObject(f[r])||i==s)return void 0!==f[r]?(e=f[r],!1):(c.error(rt.method,t),!1);f=f[r]}})),n.isFunction(e)?o=e.apply(u,i):void 0!==e&&(o=e),n.isArray(r)?r.push(o):void 0!==r?r=[r,o]:void 0!==o&&(r=o),e}},c.preinitialize(),s?(void 0===d&&c.initialize(),c.invoke(o)):(void 0!==d&&d.invoke("destroy"),c.initialize())}),void 0!==r?r:this},n.fn.dimmer.settings={name:"Dimmer",namespace:"dimmer",silent:!1,debug:!1,verbose:!1,performance:!0,dimmerName:!1,variation:!1,closable:"auto",useCSS:!0,transition:"fade",on:!1,opacity:"auto",duration:{show:500,hide:500},onChange:function(){},onShow:function(){},onHide:function(){},error:{method:"The method you called is not defined."},className:{active:"active",animating:"animating",dimmable:"dimmable",dimmed:"dimmed",dimmer:"dimmer",disabled:"disabled",hide:"hide",pageDimmer:"page",show:"show"},selector:{dimmer:"> .ui.dimmer",content:".ui.dimmer > .content, .ui.dimmer > .content > .center"},template:{dimmer:function(){return n("<div />").attr("class","ui dimmer")}}}}(jQuery,window,document),function(n,t,i){"use strict";t=void 0!==t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),n.fn.modal=function(r){var u,h=n(this),c=n(t),o=n(i),e=n("body"),l=h.selector||"",s=+new Date,f=[],a=arguments[0],v="string"==typeof a,y=[].slice.call(arguments,1),p=t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||t.msRequestAnimationFrame||function(n){setTimeout(n,0)};return h.each(function(){var yt,ft,st,k,ot,ut,ht,at,h,w=n.isPlainObject(r)?n.extend(!0,{},n.fn.modal.settings,r):n.extend({},n.fn.modal.settings),tt=w.selector,d=w.className,vt=w.namespace,et=w.error,nt="."+vt,ct="module-"+vt,b=n(this),lt=n(w.context),pt=b.find(tt.close),g=this,it=b.data(ct),rt=!1;h={initialize:function(){h.verbose("Initializing dimmer",lt),h.create.id(),h.create.dimmer(),h.refreshModals(),h.bind.events(),w.observeChanges&&h.observeChanges(),h.instantiate()},instantiate:function(){h.verbose("Storing instance of modal"),it=h,b.data(ct,it)},create:{dimmer:function(){var i={debug:w.debug,dimmerName:"modals",duration:{show:w.duration,hide:w.duration}},t=n.extend(!0,i,w.dimmerSettings);if(w.inverted&&(t.variation=void 0!==t.variation?t.variation+" inverted":"inverted"),void 0===n.fn.dimmer)return void h.error(et.dimmer);h.debug("Creating dimmer with settings",t),k=lt.dimmer(t),w.detachable?(h.verbose("Modal is detachable, moving content into dimmer"),k.dimmer("add content",b)):h.set.undetached(),w.blurring&&k.addClass(d.blurring),ot=k.dimmer("get dimmer")},id:function(){ht=(Math.random().toString(16)+"000000000").substr(2,8),ut="."+ht,h.verbose("Creating unique id for element",ht)}},destroy:function(){h.verbose("Destroying previous modal"),b.removeData(ct).off(nt),c.off(ut),ot.off(ut),pt.off(nt),lt.dimmer("destroy")},observeChanges:function(){"MutationObserver"in t&&(at=new MutationObserver(function(){h.debug("DOM tree modified, refreshing"),h.refresh()}),at.observe(g,{childList:!0,subtree:!0}),h.debug("Setting up mutation observer",at))},refresh:function(){h.remove.scrolling(),h.cacheSizes(),h.set.screenHeight(),h.set.type(),h.set.position()},refreshModals:function(){ft=b.siblings(tt.modal),yt=ft.add(b)},attachEvents:function(t,i){var r=n(t);i=n.isFunction(h[i])?h[i]:h.toggle,r.length>0?(h.debug("Attaching modal events to element",t,i),r.off(nt).on("click"+nt,i)):h.error(et.notFound,t)},bind:{events:function(){h.verbose("Attaching events"),b.on("click"+nt,tt.close,h.event.close).on("click"+nt,tt.approve,h.event.approve).on("click"+nt,tt.deny,h.event.deny),c.on("resize"+ut,h.event.resize)}},get:{id:function(){return(Math.random().toString(16)+"000000000").substr(2,8)}},event:{approve:function(){if(rt||!1===w.onApprove.call(g,n(this)))return void h.verbose("Approve callback returned false cancelling hide");rt=!0,h.hide(function(){rt=!1})},deny:function(){if(rt||!1===w.onDeny.call(g,n(this)))return void h.verbose("Deny callback returned false cancelling hide");rt=!0,h.hide(function(){rt=!1})},close:function(){h.hide()},click:function(t){var r=n(t.target),u=r.closest(tt.modal).length>0,f=n.contains(i.documentElement,t.target);!u&&f&&(h.debug("Dimmer clicked, hiding all modals"),h.is.active()&&(h.remove.clickaway(),w.allowMultiple?h.hide():h.hideAll()))},debounce:function(n,t){clearTimeout(h.timer),h.timer=setTimeout(n,t)},keyboard:function(n){27==n.which&&(w.closable?(h.debug("Escape key pressed hiding modal"),h.hide()):h.debug("Escape key pressed, but closable is set to false"),n.preventDefault())},resize:function(){k.dimmer("is active")&&p(h.refresh)}},toggle:function(){h.is.active()||h.is.animating()?h.hide():h.show()},show:function(t){t=n.isFunction(t)?t:function(){},h.refreshModals(),h.showModal(t)},hide:function(t){t=n.isFunction(t)?t:function(){},h.refreshModals(),h.hideModal(t)},showModal:function(t){t=n.isFunction(t)?t:function(){},h.is.animating()||!h.is.active()?(h.showDimmer(),h.cacheSizes(),h.set.position(),h.set.screenHeight(),h.set.type(),h.set.clickaway(),!w.allowMultiple&&h.others.active()?h.hideOthers(h.showModal):(w.onShow.call(g),w.transition&&void 0!==n.fn.transition&&b.transition("is supported")?(h.debug("Showing modal with css animations"),b.transition({debug:w.debug,animation:w.transition+" in",queue:w.queue,duration:w.duration,useFailSafe:!0,onComplete:function(){w.onVisible.apply(g),w.keyboardShortcuts&&h.add.keyboardShortcuts(),h.save.focus(),h.set.active(),w.autofocus&&h.set.autofocus(),t()}})):h.error(et.noTransition))):h.debug("Modal is already visible")},hideModal:function(t,i){if(t=n.isFunction(t)?t:function(){},h.debug("Hiding modal"),!1===w.onHide.call(g,n(this)))return void h.verbose("Hide callback returned false cancelling hide");(h.is.animating()||h.is.active())&&(w.transition&&void 0!==n.fn.transition&&b.transition("is supported")?(h.remove.active(),b.transition({debug:w.debug,animation:w.transition+" out",queue:w.queue,duration:w.duration,useFailSafe:!0,onStart:function(){h.others.active()||i||h.hideDimmer(),w.keyboardShortcuts&&h.remove.keyboardShortcuts()},onComplete:function(){w.onHidden.call(g),h.restore.focus(),t()}})):h.error(et.noTransition))},showDimmer:function(){k.dimmer("is animating")||!k.dimmer("is active")?(h.debug("Showing dimmer"),k.dimmer("show")):h.debug("Dimmer already visible")},hideDimmer:function(){if(!k.dimmer("is animating")&&!k.dimmer("is active"))return void h.debug("Dimmer is not visible cannot hide");k.dimmer("hide",function(){h.remove.clickaway(),h.remove.screenHeight()})},hideAll:function(t){var i=yt.filter("."+d.active+", ."+d.animating);t=n.isFunction(t)?t:function(){},i.length>0&&(h.debug("Hiding all visible modals"),h.hideDimmer(),i.modal("hide modal",t))},hideOthers:function(t){var i=ft.filter("."+d.active+", ."+d.animating);t=n.isFunction(t)?t:function(){},i.length>0&&(h.debug("Hiding other modals",ft),i.modal("hide modal",t,!0))},others:{active:function(){return ft.filter("."+d.active).length>0},animating:function(){return ft.filter("."+d.animating).length>0}},add:{keyboardShortcuts:function(){h.verbose("Adding keyboard shortcuts"),o.on("keyup"+nt,h.event.keyboard)}},save:{focus:function(){st=n(i.activeElement).blur()}},restore:{focus:function(){st&&st.length>0&&st.focus()}},remove:{active:function(){b.removeClass(d.active)},clickaway:function(){w.closable&&ot.off("click"+ut)},bodyStyle:function(){""===e.attr("style")&&(h.verbose("Removing style attribute"),e.removeAttr("style"))},screenHeight:function(){h.debug("Removing page height"),e.css("height","")},keyboardShortcuts:function(){h.verbose("Removing keyboard shortcuts"),o.off("keyup"+nt)},scrolling:function(){k.removeClass(d.scrolling),b.removeClass(d.scrolling)}},cacheSizes:function(){var r=b.outerHeight();void 0!==h.cache&&0===r||(h.cache={pageHeight:n(i).outerHeight(),height:r+w.offset,contextHeight:"body"==w.context?n(t).height():k.height()}),h.debug("Caching modal and container sizes",h.cache)},can:{fit:function(){return h.cache.height+2*w.padding<h.cache.contextHeight}},is:{active:function(){return b.hasClass(d.active)},animating:function(){return b.transition("is supported")?b.transition("is animating"):b.is(":visible")},scrolling:function(){return k.hasClass(d.scrolling)},modernBrowser:function(){return!(t.ActiveXObject||"ActiveXObject"in t)}},set:{autofocus:function(){var n=b.find("[tabindex], :input").filter(":visible"),t=n.filter("[autofocus]"),i=t.length>0?t.first():n.first();i.length>0&&i.focus()},clickaway:function(){w.closable&&ot.on("click"+ut,h.event.click)},screenHeight:function(){h.can.fit()?e.css("height",""):(h.debug("Modal is taller than page content, resizing page height"),e.css("height",h.cache.height+2*w.padding))},active:function(){b.addClass(d.active)},scrolling:function(){k.addClass(d.scrolling),b.addClass(d.scrolling)},type:function(){h.can.fit()?(h.verbose("Modal fits on screen"),h.others.active()||h.others.animating()||h.remove.scrolling()):(h.verbose("Modal cannot fit on screen setting to scrolling"),h.set.scrolling())},position:function(){h.verbose("Centering modal on page",h.cache),h.can.fit()?b.css({top:"",marginTop:-h.cache.height/2}):b.css({marginTop:"",top:o.scrollTop()})},undetached:function(){k.addClass(d.undetached)}},setting:function(t,i){if(h.debug("Changing setting",t,i),n.isPlainObject(t))n.extend(!0,w,t);else{if(void 0===i)return w[t];n.isPlainObject(w[t])?n.extend(!0,w[t],i):w[t]=i}},internal:function(t,i){if(n.isPlainObject(t))n.extend(!0,h,t);else{if(void 0===i)return h[t];h[t]=i}},debug:function(){!w.silent&&w.debug&&(w.performance?h.performance.log(arguments):(h.debug=Function.prototype.bind.call(console.info,console,w.name+":"),h.debug.apply(console,arguments)))},verbose:function(){!w.silent&&w.verbose&&w.debug&&(w.performance?h.performance.log(arguments):(h.verbose=Function.prototype.bind.call(console.info,console,w.name+":"),h.verbose.apply(console,arguments)))},error:function(){w.silent||(h.error=Function.prototype.bind.call(console.error,console,w.name+":"),h.error.apply(console,arguments))},performance:{log:function(n){var t,i,r;w.performance&&(t=+new Date,r=s||t,i=t-r,s=t,f.push({Name:n[0],Arguments:[].slice.call(n,1)||"",Element:g,"Execution Time":i})),clearTimeout(h.performance.timer),h.performance.timer=setTimeout(h.performance.display,500)},display:function(){var t=w.name+":",i=0;s=!1,clearTimeout(h.performance.timer),n.each(f,function(n,t){i+=t["Execution Time"]}),t+=" "+i+"ms",l&&(t+=" '"+l+"'"),(void 0!==console.group||void 0!==console.table)&&f.length>0&&(console.groupCollapsed(t),console.table?console.table(f):n.each(f,function(n,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),f=[]}},invoke:function(t,i,r){var s,e,o,f=it;return i=i||y,r=g||r,"string"==typeof t&&void 0!==f&&(t=t.split(/[\. ]/),s=t.length-1,n.each(t,function(i,r){var u=i!=s?r+t[i+1].charAt(0).toUpperCase()+t[i+1].slice(1):t;if(n.isPlainObject(f[u])&&i!=s)f=f[u];else{if(void 0!==f[u])return e=f[u],!1;if(!n.isPlainObject(f[r])||i==s)return void 0!==f[r]&&(e=f[r],!1);f=f[r]}})),n.isFunction(e)?o=e.apply(r,i):void 0!==e&&(o=e),n.isArray(u)?u.push(o):void 0!==u?u=[u,o]:void 0!==o&&(u=o),e}},v?(void 0===it&&h.initialize(),h.invoke(a)):(void 0!==it&&it.invoke("destroy"),h.initialize())}),void 0!==u?u:this},n.fn.modal.settings={name:"Modal",namespace:"modal",silent:!1,debug:!1,verbose:!1,performance:!0,observeChanges:!1,allowMultiple:!1,detachable:!0,closable:!0,autofocus:!0,inverted:!1,blurring:!1,dimmerSettings:{closable:!1,useCSS:!0},keyboardShortcuts:!0,context:"body",queue:!1,duration:500,offset:0,transition:"scale",padding:50,onShow:function(){},onVisible:function(){},onHide:function(){return!0},onHidden:function(){},onApprove:function(){return!0},onDeny:function(){return!0},selector:{close:"> .close",approve:".actions .positive, .actions .approve, .actions .ok",deny:".actions .negative, .actions .deny, .actions .cancel",modal:".ui.modal"},error:{dimmer:"UI Dimmer, a required component is not included in this page",method:"The method you called is not defined.",notFound:"The element you specified could not be found"},className:{active:"active",animating:"animating",blurring:"blurring",scrolling:"scrolling",undetached:"undetached"}}}(jQuery,window,document),function(n,t,i){"use strict";t=void 0!==t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),n.fn.transition=function(){var r,f=n(this),s=f.selector||"",e=+new Date,u=[],h=arguments,c=h[0],l=[].slice.call(arguments,1),o="string"==typeof c;return t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||t.msRequestAnimationFrame,f.each(function(t){var v,k,tt,p,g,b,nt,d,a,y=n(this),w=this;a={initialize:function(){v=a.get.settings.apply(w,h),p=v.className,tt=v.error,g=v.metadata,d="."+v.namespace,nt="module-"+v.namespace,k=y.data(nt)||a,b=a.get.animationEndEvent(),o&&(o=a.invoke(c)),!1===o&&(a.verbose("Converted arguments into settings object",v),v.interval?a.delay(v.animate):a.animate(),a.instantiate())},instantiate:function(){a.verbose("Storing instance of module",a),k=a,y.data(nt,k)},destroy:function(){a.verbose("Destroying previous module for",w),y.removeData(nt)},refresh:function(){a.verbose("Refreshing display type on next animation"),delete a.displayType},forceRepaint:function(){a.verbose("Forcing element repaint");var t=y.parent(),n=y.next();0===n.length?y.detach().appendTo(t):y.detach().insertBefore(n)},repaint:function(){a.verbose("Repainting element"),w.offsetWidth},delay:function(n){var u,i,r=a.get.animationDirection();r||(r=a.can.transition()?a.get.direction():"static"),n=void 0!==n?n:v.interval,u="auto"==v.reverse&&r==p.outward,i=u||1==v.reverse?(f.length-t)*v.interval:t*v.interval,a.debug("Delaying animation by",i),setTimeout(a.animate,i)},animate:function(n){if(v=n||v,!a.is.supported())return a.error(tt.support),!1;if(a.debug("Preparing animation",v.animation),a.is.animating()){if(v.queue)return!v.allowRepeats&&a.has.direction()&&a.is.occurring()&&!0!==a.queuing?a.debug("Animation is currently occurring, preventing queueing same animation",v.animation):a.queue(v.animation),!1;if(!v.allowRepeats&&a.is.occurring())return a.debug("Animation is already occurring, will not execute repeated animation",v.animation),!1;a.debug("New animation started, completing previous early",v.animation),k.complete()}a.can.animate()?a.set.animating(v.animation):a.error(tt.noAnimation,v.animation,w)},reset:function(){a.debug("Resetting animation to beginning conditions"),a.remove.animationCallbacks(),a.restore.conditions(),a.remove.animating()},queue:function(n){a.debug("Queueing animation of",n),a.queuing=!0,y.one(b+".queue"+d,function(){a.queuing=!1,a.repaint(),a.animate.apply(this,v)})},complete:function(){a.debug("Animation complete",v.animation),a.remove.completeCallback(),a.remove.failSafe(),a.is.looping()||(a.is.outward()?(a.verbose("Animation is outward, hiding element"),a.restore.conditions(),a.hide()):a.is.inward()?(a.verbose("Animation is outward, showing element"),a.restore.conditions(),a.show()):(a.verbose("Static animation completed"),a.restore.conditions(),v.onComplete.call(w)))},force:{visible:function(){var t=y.attr("style"),i=a.get.userStyle(),n=a.get.displayType(),r=i+"display: "+n+" !important;",u=y.css("display"),f=void 0===t||""===t;u!==n?(a.verbose("Overriding default display to show element",n),y.attr("style",r)):f&&y.removeAttr("style")},hidden:function(){var n=y.attr("style"),t=y.css("display"),i=void 0===n||""===n;"none"===t||a.is.hidden()?i&&y.removeAttr("style"):(a.verbose("Overriding default display to hide element"),y.css("display","none"))}},has:{direction:function(t){var i=!1;return t=t||v.animation,"string"==typeof t&&(t=t.split(" "),n.each(t,function(n,t){t!==p.inward&&t!==p.outward||(i=!0)})),i},inlineDisplay:function(){var t=y.attr("style")||"";return n.isArray(t.match(/display.*?;/,""))}},set:{animating:function(n){var t;a.remove.completeCallback(),n=n||v.animation,t=a.get.animationClass(n),a.save.animation(t),a.force.visible(),a.remove.hidden(),a.remove.direction(),a.start.animation(t)},duration:function(n,t){t=t||v.duration,((t="number"==typeof t?t+"ms":t)||0===t)&&(a.verbose("Setting animation duration",t),y.css({"animation-duration":t}))},direction:function(n){n=n||a.get.direction(),n==p.inward?a.set.inward():a.set.outward()},looping:function(){a.debug("Transition set to loop"),y.addClass(p.looping)},hidden:function(){y.addClass(p.transition).addClass(p.hidden)},inward:function(){a.debug("Setting direction to inward"),y.removeClass(p.outward).addClass(p.inward)},outward:function(){a.debug("Setting direction to outward"),y.removeClass(p.inward).addClass(p.outward)},visible:function(){y.addClass(p.transition).addClass(p.visible)}},start:{animation:function(n){n=n||a.get.animationClass(),a.debug("Starting tween",n),y.addClass(n).one(b+".complete"+d,a.complete),v.useFailSafe&&a.add.failSafe(),a.set.duration(v.duration),v.onStart.call(w)}},save:{animation:function(n){a.cache||(a.cache={}),a.cache.animation=n},displayType:function(n){"none"!==n&&y.data(g.displayType,n)},transitionExists:function(t,i){n.fn.transition.exists[t]=i,a.verbose("Saving existence of transition",t,i)}},restore:{conditions:function(){var n=a.get.currentAnimation();n&&(y.removeClass(n),a.verbose("Removing animation class",a.cache)),a.remove.duration()}},add:{failSafe:function(){var n=a.get.duration();a.timer=setTimeout(function(){y.triggerHandler(b)},n+v.failSafeDelay),a.verbose("Adding fail safe timer",a.timer)}},remove:{animating:function(){y.removeClass(p.animating)},animationCallbacks:function(){a.remove.queueCallback(),a.remove.completeCallback()},queueCallback:function(){y.off(".queue"+d)},completeCallback:function(){y.off(".complete"+d)},display:function(){y.css("display","")},direction:function(){y.removeClass(p.inward).removeClass(p.outward)},duration:function(){y.css("animation-duration","")},failSafe:function(){a.verbose("Removing fail safe timer",a.timer),a.timer&&clearTimeout(a.timer)},hidden:function(){y.removeClass(p.hidden)},visible:function(){y.removeClass(p.visible)},looping:function(){a.debug("Transitions are no longer looping"),a.is.looping()&&(a.reset(),y.removeClass(p.looping))},transition:function(){y.removeClass(p.visible).removeClass(p.hidden)}},get:{settings:function(t,i,r){return"object"==typeof t?n.extend(!0,{},n.fn.transition.settings,t):"function"==typeof r?n.extend({},n.fn.transition.settings,{animation:t,onComplete:r,duration:i}):"string"==typeof i||"number"==typeof i?n.extend({},n.fn.transition.settings,{animation:t,duration:i}):"object"==typeof i?n.extend({},n.fn.transition.settings,i,{animation:t}):"function"==typeof i?n.extend({},n.fn.transition.settings,{animation:t,onComplete:i}):n.extend({},n.fn.transition.settings,{animation:t})},animationClass:function(n){var t=n||v.animation,i=a.can.transition()&&!a.has.direction()?a.get.direction()+" ":"";return p.animating+" "+p.transition+" "+i+t},currentAnimation:function(){return!(!a.cache||void 0===a.cache.animation)&&a.cache.animation},currentDirection:function(){return a.is.inward()?p.inward:p.outward},direction:function(){return a.is.hidden()||!a.is.visible()?p.inward:p.outward},animationDirection:function(t){var i;return t=t||v.animation,"string"==typeof t&&(t=t.split(" "),n.each(t,function(n,t){t===p.inward?i=p.inward:t===p.outward&&(i=p.outward)})),i||!1},duration:function(n){return n=n||v.duration,!1===n&&(n=y.css("animation-duration")||0),"string"==typeof n?n.indexOf("ms")>-1?parseFloat(n):1e3*parseFloat(n):n},displayType:function(n){return n=void 0===n||n,v.displayType?v.displayType:(n&&void 0===y.data(g.displayType)&&a.can.transition(!0),y.data(g.displayType))},userStyle:function(n){return n=n||y.attr("style")||"",n.replace(/display.*?;/,"")},transitionExists:function(t){return n.fn.transition.exists[t]},animationStartEvent:function(){var n,r=i.createElement("div"),t={animation:"animationstart",OAnimation:"oAnimationStart",MozAnimation:"mozAnimationStart",WebkitAnimation:"webkitAnimationStart"};for(n in t)if(void 0!==r.style[n])return t[n];return!1},animationEndEvent:function(){var n,r=i.createElement("div"),t={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"mozAnimationEnd",WebkitAnimation:"webkitAnimationEnd"};for(n in t)if(void 0!==r.style[n])return t[n];return!1}},can:{transition:function(t){var o,h,r,f,c,e,i=v.animation,s=a.get.transitionExists(i),u=a.get.displayType(!1);if(void 0===s||t){if(a.verbose("Determining whether animation exists"),o=y.attr("class"),h=y.prop("tagName"),r=n("<"+h+" />").addClass(o).insertAfter(y),f=r.addClass(i).removeClass(p.inward).removeClass(p.outward).addClass(p.animating).addClass(p.transition).css("animationName"),c=r.addClass(p.inward).css("animationName"),u||(u=r.attr("class",o).removeAttr("style").removeClass(p.hidden).removeClass(p.visible).show().css("display"),a.verbose("Determining final display state",u),a.save.displayType(u)),r.remove(),f!=c)a.debug("Direction exists for animation",i),e=!0;else{if("none"==f||!f)return void a.debug("No animation defined in css",i);a.debug("Static animation found",i,u),e=!1}a.save.transitionExists(i,e)}return void 0!==s?s:e},animate:function(){return void 0!==a.can.transition()}},is:{animating:function(){return y.hasClass(p.animating)},inward:function(){return y.hasClass(p.inward)},outward:function(){return y.hasClass(p.outward)},looping:function(){return y.hasClass(p.looping)},occurring:function(n){return n=n||v.animation,n="."+n.replace(" ","."),y.filter(n).length>0},visible:function(){return y.is(":visible")},hidden:function(){return"hidden"===y.css("visibility")},supported:function(){return!1!==b}},hide:function(){a.verbose("Hiding element"),a.is.animating()&&a.reset(),w.blur(),a.remove.display(),a.remove.visible(),a.set.hidden(),a.force.hidden(),v.onHide.call(w),v.onComplete.call(w)},show:function(n){a.verbose("Showing element",n),a.remove.hidden(),a.set.visible(),a.force.visible(),v.onShow.call(w),v.onComplete.call(w)},toggle:function(){a.is.visible()?a.hide():a.show()},stop:function(){a.debug("Stopping current animation"),y.triggerHandler(b)},stopAll:function(){a.debug("Stopping all animation"),a.remove.queueCallback(),y.triggerHandler(b)},clear:{queue:function(){a.debug("Clearing animation queue"),a.remove.queueCallback()}},enable:function(){a.verbose("Starting animation"),y.removeClass(p.disabled)},disable:function(){a.debug("Stopping animation"),y.addClass(p.disabled)},setting:function(t,i){if(a.debug("Changing setting",t,i),n.isPlainObject(t))n.extend(!0,v,t);else{if(void 0===i)return v[t];n.isPlainObject(v[t])?n.extend(!0,v[t],i):v[t]=i}},internal:function(t,i){if(n.isPlainObject(t))n.extend(!0,a,t);else{if(void 0===i)return a[t];a[t]=i}},debug:function(){!v.silent&&v.debug&&(v.performance?a.performance.log(arguments):(a.debug=Function.prototype.bind.call(console.info,console,v.name+":"),a.debug.apply(console,arguments)))},verbose:function(){!v.silent&&v.verbose&&v.debug&&(v.performance?a.performance.log(arguments):(a.verbose=Function.prototype.bind.call(console.info,console,v.name+":"),a.verbose.apply(console,arguments)))},error:function(){v.silent||(a.error=Function.prototype.bind.call(console.error,console,v.name+":"),a.error.apply(console,arguments))},performance:{log:function(n){var t,i,r;v.performance&&(t=+new Date,r=e||t,i=t-r,e=t,u.push({Name:n[0],Arguments:[].slice.call(n,1)||"",Element:w,"Execution Time":i})),clearTimeout(a.performance.timer),a.performance.timer=setTimeout(a.performance.display,500)},display:function(){var t=v.name+":",i=0;e=!1,clearTimeout(a.performance.timer),n.each(u,function(n,t){i+=t["Execution Time"]}),t+=" "+i+"ms",s&&(t+=" '"+s+"'"),f.length>1&&(t+=" ("+f.length+")"),(void 0!==console.group||void 0!==console.table)&&u.length>0&&(console.groupCollapsed(t),console.table?console.table(u):n.each(u,function(n,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),u=[]}},invoke:function(t,i,u){var s,e,o,f=k;return i=i||l,u=w||u,"string"==typeof t&&void 0!==f&&(t=t.split(/[\. ]/),s=t.length-1,n.each(t,function(i,r){var u=i!=s?r+t[i+1].charAt(0).toUpperCase()+t[i+1].slice(1):t;if(n.isPlainObject(f[u])&&i!=s)f=f[u];else{if(void 0!==f[u])return e=f[u],!1;if(!n.isPlainObject(f[r])||i==s)return void 0!==f[r]&&(e=f[r],!1);f=f[r]}})),n.isFunction(e)?o=e.apply(u,i):void 0!==e&&(o=e),n.isArray(r)?r.push(o):void 0!==r?r=[r,o]:void 0!==o&&(r=o),void 0!==e&&e}},a.initialize()}),void 0!==r?r:this},n.fn.transition.exists={},n.fn.transition.settings={name:"Transition",silent:!1,debug:!1,verbose:!1,performance:!0,namespace:"transition",interval:0,reverse:"auto",onStart:function(){},onComplete:function(){},onShow:function(){},onHide:function(){},useFailSafe:!0,failSafeDelay:100,allowRepeats:!1,displayType:!1,animation:"fade",duration:!1,queue:!0,metadata:{displayType:"display"},className:{animating:"animating",disabled:"disabled",hidden:"hidden",inward:"in",loading:"loading",looping:"looping",outward:"out",transition:"transition",visible:"visible"},error:{noAnimation:"Element is no longer attached to DOM. Unable to animate.  Use silent setting to surpress this warning in production.",repeated:"That animation is already occurring, cancelling repeated animation",method:"The method you called is not defined",support:"This browser does not support CSS animations"}}}(jQuery,window,document),function(n,t,i){"use strict";t=void 0!==t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),n.fn.checkbox=function(r){var u,o=n(this),s=o.selector||"",e=+new Date,f=[],h=arguments[0],c="string"==typeof h,l=[].slice.call(arguments,1);return o.each(function(){var it,o,a=n.extend(!0,{},n.fn.checkbox.settings,r),w=a.className,et=a.namespace,b=a.selector,ft=a.error,k="."+et,rt="module-"+et,y=n(this),g=n(this).children(b.label),v=n(this).children(b.input),p=v[0],tt=!1,nt=!1,d=y.data(rt),ut=this;o={initialize:function(){o.verbose("Initializing checkbox",a),o.create.label(),o.bind.events(),o.set.tabbable(),o.hide.input(),o.observeChanges(),o.instantiate(),o.setup()},instantiate:function(){o.verbose("Storing instance of module",o),d=o,y.data(rt,o)},destroy:function(){o.verbose("Destroying module"),o.unbind.events(),o.show.input(),y.removeData(rt)},fix:{reference:function(){y.is(b.input)&&(o.debug("Behavior called on <input> adjusting invoked element"),y=y.closest(b.checkbox),o.refresh())}},setup:function(){o.set.initialLoad(),o.is.indeterminate()?(o.debug("Initial value is indeterminate"),o.indeterminate()):o.is.checked()?(o.debug("Initial value is checked"),o.check()):(o.debug("Initial value is unchecked"),o.uncheck()),o.remove.initialLoad()},refresh:function(){g=y.children(b.label),v=y.children(b.input),p=v[0]},hide:{input:function(){o.verbose("Modifying <input> z-index to be unselectable"),v.addClass(w.hidden)}},show:{input:function(){o.verbose("Modifying <input> z-index to be selectable"),v.removeClass(w.hidden)}},observeChanges:function(){"MutationObserver"in t&&(it=new MutationObserver(function(){o.debug("DOM tree modified, updating selector cache"),o.refresh()}),it.observe(ut,{childList:!0,subtree:!0}),o.debug("Setting up mutation observer",it))},attachEvents:function(t,i){var r=n(t);i=n.isFunction(o[i])?o[i]:o.toggle,r.length>0?(o.debug("Attaching checkbox events to element",t,i),r.on("click"+k,i)):o.error(ft.notFound)},event:{click:function(t){var i=n(t.target);return i.is(b.input)?void o.verbose("Using default check action on initialized checkbox"):i.is(b.link)?void o.debug("Clicking link inside checkbox, skipping toggle"):(o.toggle(),v.focus(),void t.preventDefault())},keydown:function(n){var t=n.which,i={enter:13,space:32,escape:27};t==i.escape?(o.verbose("Escape key pressed blurring field"),v.blur(),nt=!0):n.ctrlKey||t!=i.space&&t!=i.enter?nt=!1:(o.verbose("Enter/space key pressed, toggling checkbox"),o.toggle(),nt=!0)},keyup:function(n){nt&&n.preventDefault()}},check:function(){o.should.allowCheck()&&(o.debug("Checking checkbox",v),o.set.checked(),o.should.ignoreCallbacks()||(a.onChecked.call(p),a.onChange.call(p)))},uncheck:function(){o.should.allowUncheck()&&(o.debug("Unchecking checkbox"),o.set.unchecked(),o.should.ignoreCallbacks()||(a.onUnchecked.call(p),a.onChange.call(p)))},indeterminate:function(){if(o.should.allowIndeterminate())return void o.debug("Checkbox is already indeterminate");o.debug("Making checkbox indeterminate"),o.set.indeterminate(),o.should.ignoreCallbacks()||(a.onIndeterminate.call(p),a.onChange.call(p))},determinate:function(){if(o.should.allowDeterminate())return void o.debug("Checkbox is already determinate");o.debug("Making checkbox determinate"),o.set.determinate(),o.should.ignoreCallbacks()||(a.onDeterminate.call(p),a.onChange.call(p))},enable:function(){if(o.is.enabled())return void o.debug("Checkbox is already enabled");o.debug("Enabling checkbox"),o.set.enabled(),a.onEnable.call(p),a.onEnabled.call(p)},disable:function(){if(o.is.disabled())return void o.debug("Checkbox is already disabled");o.debug("Disabling checkbox"),o.set.disabled(),a.onDisable.call(p),a.onDisabled.call(p)},get:{radios:function(){var t=o.get.name();return n('input[name="'+t+'"]').closest(b.checkbox)},otherRadios:function(){return o.get.radios().not(y)},name:function(){return v.attr("name")}},is:{initialLoad:function(){return tt},radio:function(){return v.hasClass(w.radio)||"radio"==v.attr("type")},indeterminate:function(){return void 0!==v.prop("indeterminate")&&v.prop("indeterminate")},checked:function(){return void 0!==v.prop("checked")&&v.prop("checked")},disabled:function(){return void 0!==v.prop("disabled")&&v.prop("disabled")},enabled:function(){return!o.is.disabled()},determinate:function(){return!o.is.indeterminate()},unchecked:function(){return!o.is.checked()}},should:{allowCheck:function(){return o.is.determinate()&&o.is.checked()&&!o.should.forceCallbacks()?(o.debug("Should not allow check, checkbox is already checked"),!1):!1!==a.beforeChecked.apply(p)||(o.debug("Should not allow check, beforeChecked cancelled"),!1)},allowUncheck:function(){return o.is.determinate()&&o.is.unchecked()&&!o.should.forceCallbacks()?(o.debug("Should not allow uncheck, checkbox is already unchecked"),!1):!1!==a.beforeUnchecked.apply(p)||(o.debug("Should not allow uncheck, beforeUnchecked cancelled"),!1)},allowIndeterminate:function(){return o.is.indeterminate()&&!o.should.forceCallbacks()?(o.debug("Should not allow indeterminate, checkbox is already indeterminate"),!1):!1!==a.beforeIndeterminate.apply(p)||(o.debug("Should not allow indeterminate, beforeIndeterminate cancelled"),!1)},allowDeterminate:function(){return o.is.determinate()&&!o.should.forceCallbacks()?(o.debug("Should not allow determinate, checkbox is already determinate"),!1):!1!==a.beforeDeterminate.apply(p)||(o.debug("Should not allow determinate, beforeDeterminate cancelled"),!1)},forceCallbacks:function(){return o.is.initialLoad()&&a.fireOnInit},ignoreCallbacks:function(){return tt&&!a.fireOnInit}},can:{change:function(){return!(y.hasClass(w.disabled)||y.hasClass(w.readOnly)||v.prop("disabled")||v.prop("readonly"))},uncheck:function(){return"boolean"==typeof a.uncheckable?a.uncheckable:!o.is.radio()}},set:{initialLoad:function(){tt=!0},checked:function(){if(o.verbose("Setting class to checked"),y.removeClass(w.indeterminate).addClass(w.checked),o.is.radio()&&o.uncheckOthers(),!o.is.indeterminate()&&o.is.checked())return void o.debug("Input is already checked, skipping input property change");o.verbose("Setting state to checked",p),v.prop("indeterminate",!1).prop("checked",!0),o.trigger.change()},unchecked:function(){if(o.verbose("Removing checked class"),y.removeClass(w.indeterminate).removeClass(w.checked),!o.is.indeterminate()&&o.is.unchecked())return void o.debug("Input is already unchecked");o.debug("Setting state to unchecked"),v.prop("indeterminate",!1).prop("checked",!1),o.trigger.change()},indeterminate:function(){if(o.verbose("Setting class to indeterminate"),y.addClass(w.indeterminate),o.is.indeterminate())return void o.debug("Input is already indeterminate, skipping input property change");o.debug("Setting state to indeterminate"),v.prop("indeterminate",!0),o.trigger.change()},determinate:function(){if(o.verbose("Removing indeterminate class"),y.removeClass(w.indeterminate),o.is.determinate())return void o.debug("Input is already determinate, skipping input property change");o.debug("Setting state to determinate"),v.prop("indeterminate",!1)},disabled:function(){if(o.verbose("Setting class to disabled"),y.addClass(w.disabled),o.is.disabled())return void o.debug("Input is already disabled, skipping input property change");o.debug("Setting state to disabled"),v.prop("disabled","disabled"),o.trigger.change()},enabled:function(){if(o.verbose("Removing disabled class"),y.removeClass(w.disabled),o.is.enabled())return void o.debug("Input is already enabled, skipping input property change");o.debug("Setting state to enabled"),v.prop("disabled",!1),o.trigger.change()},tabbable:function(){o.verbose("Adding tabindex to checkbox"),void 0===v.attr("tabindex")&&v.attr("tabindex",0)}},remove:{initialLoad:function(){tt=!1}},trigger:{change:function(){var n=i.createEvent("HTMLEvents"),t=v[0];t&&(o.verbose("Triggering native change event"),n.initEvent("change",!0,!1),t.dispatchEvent(n))}},create:{label:function(){v.prevAll(b.label).length>0?(v.prev(b.label).detach().insertAfter(v),o.debug("Moving existing label",g)):o.has.label()||(g=n("<label>").insertAfter(v),o.debug("Creating label",g))}},has:{label:function(){return g.length>0}},bind:{events:function(){o.verbose("Attaching checkbox events"),y.on("click"+k,o.event.click).on("keydown"+k,b.input,o.event.keydown).on("keyup"+k,b.input,o.event.keyup)}},unbind:{events:function(){o.debug("Removing events"),y.off(k)}},uncheckOthers:function(){var n=o.get.otherRadios();o.debug("Unchecking other radios",n),n.removeClass(w.checked)},toggle:function(){if(!o.can.change())return void(o.is.radio()||o.debug("Checkbox is read-only or disabled, ignoring toggle"));o.is.indeterminate()||o.is.unchecked()?(o.debug("Currently unchecked"),o.check()):o.is.checked()&&o.can.uncheck()&&(o.debug("Currently checked"),o.uncheck())},setting:function(t,i){if(o.debug("Changing setting",t,i),n.isPlainObject(t))n.extend(!0,a,t);else{if(void 0===i)return a[t];n.isPlainObject(a[t])?n.extend(!0,a[t],i):a[t]=i}},internal:function(t,i){if(n.isPlainObject(t))n.extend(!0,o,t);else{if(void 0===i)return o[t];o[t]=i}},debug:function(){!a.silent&&a.debug&&(a.performance?o.performance.log(arguments):(o.debug=Function.prototype.bind.call(console.info,console,a.name+":"),o.debug.apply(console,arguments)))},verbose:function(){!a.silent&&a.verbose&&a.debug&&(a.performance?o.performance.log(arguments):(o.verbose=Function.prototype.bind.call(console.info,console,a.name+":"),o.verbose.apply(console,arguments)))},error:function(){a.silent||(o.error=Function.prototype.bind.call(console.error,console,a.name+":"),o.error.apply(console,arguments))},performance:{log:function(n){var t,i,r;a.performance&&(t=+new Date,r=e||t,i=t-r,e=t,f.push({Name:n[0],Arguments:[].slice.call(n,1)||"",Element:ut,"Execution Time":i})),clearTimeout(o.performance.timer),o.performance.timer=setTimeout(o.performance.display,500)},display:function(){var t=a.name+":",i=0;e=!1,clearTimeout(o.performance.timer),n.each(f,function(n,t){i+=t["Execution Time"]}),t+=" "+i+"ms",s&&(t+=" '"+s+"'"),(void 0!==console.group||void 0!==console.table)&&f.length>0&&(console.groupCollapsed(t),console.table?console.table(f):n.each(f,function(n,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),f=[]}},invoke:function(t,i,r){var h,e,s,f=d;return i=i||l,r=ut||r,"string"==typeof t&&void 0!==f&&(t=t.split(/[\. ]/),h=t.length-1,n.each(t,function(i,r){var u=i!=h?r+t[i+1].charAt(0).toUpperCase()+t[i+1].slice(1):t;if(n.isPlainObject(f[u])&&i!=h)f=f[u];else{if(void 0!==f[u])return e=f[u],!1;if(!n.isPlainObject(f[r])||i==h)return void 0!==f[r]?(e=f[r],!1):(o.error(ft.method,t),!1);f=f[r]}})),n.isFunction(e)?s=e.apply(r,i):void 0!==e&&(s=e),n.isArray(u)?u.push(s):void 0!==u?u=[u,s]:void 0!==s&&(u=s),e}},c?(void 0===d&&o.initialize(),o.invoke(h)):(void 0!==d&&d.invoke("destroy"),o.initialize())}),void 0!==u?u:this},n.fn.checkbox.settings={name:"Checkbox",namespace:"checkbox",silent:!1,debug:!1,verbose:!0,performance:!0,uncheckable:"auto",fireOnInit:!1,onChange:function(){},beforeChecked:function(){},beforeUnchecked:function(){},beforeDeterminate:function(){},beforeIndeterminate:function(){},onChecked:function(){},onUnchecked:function(){},onDeterminate:function(){},onIndeterminate:function(){},onEnable:function(){},onDisable:function(){},onEnabled:function(){},onDisabled:function(){},className:{checked:"checked",indeterminate:"indeterminate",disabled:"disabled",hidden:"hidden",radio:"radio",readOnly:"read-only"},error:{method:"The method you called is not defined"},selector:{checkbox:".ui.checkbox",label:"label, .box",input:'input[type="checkbox"], input[type="radio"]',link:"a[href]"}}}(jQuery,window,document),function(n,t,i){"use strict";t=void 0!==t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),n.fn.popup=function(r){var u,c=n(this),o=n(i),e=n(t),s=n("body"),l=c.selector||"",h=+new Date,f=[],a=arguments[0],v="string"==typeof a,y=[].slice.call(arguments,1);return c.each(function(){var w,tt,ot,it,ct,c,p=n.isPlainObject(r)?n.extend(!0,{},n.fn.popup.settings,r):n.extend({},n.fn.popup.settings),et=p.selector,d=p.className,st=p.error,g=p.metadata,wt=p.namespace,rt="."+p.namespace,at="module-"+wt,b=n(this),yt=n(p.context),pt=n(p.scrollContext),ht=n(p.boundary),nt=p.target?n(p.target):b,lt=0,ut=!1,vt=!1,k=this,ft=b.data(at);c={initialize:function(){c.debug("Initializing",b),c.createID(),c.bind.events(),!c.exists()&&p.preserve&&c.create(),p.observeChanges&&c.observeChanges(),c.instantiate()},instantiate:function(){c.verbose("Storing instance",c),ft=c,b.data(at,ft)},observeChanges:function(){"MutationObserver"in t&&(ot=new MutationObserver(c.event.documentChanged),ot.observe(i,{childList:!0,subtree:!0}),c.debug("Setting up mutation observer",ot))},refresh:function(){p.popup?w=n(p.popup).eq(0):p.inline&&(w=nt.nextAll(et.popup).eq(0),p.popup=w),p.popup?(w.addClass(d.loading),tt=c.get.offsetParent(),w.removeClass(d.loading),p.movePopup&&c.has.popup()&&c.get.offsetParent(w)[0]!==tt[0]&&(c.debug("Moving popup to the same offset parent as activating element"),w.detach().appendTo(tt))):tt=p.inline?c.get.offsetParent(nt):c.has.popup()?c.get.offsetParent(w):s,tt.is("html")&&tt[0]!==s[0]&&(c.debug("Setting page as offset parent"),tt=s),c.get.variation()&&c.set.variation()},reposition:function(){c.refresh(),c.set.position()},destroy:function(){c.debug("Destroying previous module"),ot&&ot.disconnect(),w&&!p.preserve&&c.removePopup(),clearTimeout(c.hideTimer),clearTimeout(c.showTimer),c.unbind.close(),c.unbind.events(),b.removeData(at)},event:{start:function(){var i=n.isPlainObject(p.delay)?p.delay.show:p.delay;clearTimeout(c.hideTimer),vt||(c.showTimer=setTimeout(c.show,i))},end:function(){var t=n.isPlainObject(p.delay)?p.delay.hide:p.delay;clearTimeout(c.showTimer),c.hideTimer=setTimeout(c.hide,t)},touchstart:function(){vt=!0,c.show()},resize:function(){c.is.visible()&&c.set.position()},documentChanged:function(t){[].forEach.call(t,function(t){t.removedNodes&&[].forEach.call(t.removedNodes,function(t){(t==k||n(t).find(k).length>0)&&(c.debug("Element removed from DOM, tearing down events"),c.destroy())})})},hideGracefully:function(t){var r=n(t.target),u=n.contains(i.documentElement,t.target),f=r.closest(et.popup).length>0;t&&!f&&u?(c.debug("Click occurred outside popup hiding popup"),c.hide()):c.debug("Click was inside popup, keeping popup open")}},create:function(){var t=c.get.html(),i=c.get.title(),r=c.get.content();t||r||i?(c.debug("Creating pop-up html"),t||(t=p.templates.popup({title:i,content:r})),w=n("<div/>").addClass(d.popup).data(g.activator,b).html(t),p.inline?(c.verbose("Inserting popup element inline",w),w.insertAfter(b)):(c.verbose("Appending popup element to body",w),w.appendTo(yt)),c.refresh(),c.set.variation(),p.hoverable&&c.bind.popup(),p.onCreate.call(w,k)):0!==nt.next(et.popup).length?(c.verbose("Pre-existing popup found"),p.inline=!0,p.popup=nt.next(et.popup).data(g.activator,b),c.refresh(),p.hoverable&&c.bind.popup()):p.popup?(n(p.popup).data(g.activator,b),c.verbose("Used popup specified in settings"),c.refresh(),p.hoverable&&c.bind.popup()):c.debug("No content specified skipping display",k)},createID:function(){ct=(Math.random().toString(16)+"000000000").substr(2,8),it="."+ct,c.verbose("Creating unique id for element",ct)},toggle:function(){c.debug("Toggling pop-up"),c.is.hidden()?(c.debug("Popup is hidden, showing pop-up"),c.unbind.close(),c.show()):(c.debug("Popup is visible, hiding pop-up"),c.hide())},show:function(n){if(n=n||function(){},c.debug("Showing pop-up",p.transition),c.is.hidden()&&(!c.is.active()||!c.is.dropdown())){if(c.exists()||c.create(),!1===p.onShow.call(w,k))return void c.debug("onShow callback returned false, cancelling popup animation");p.preserve||p.popup||c.refresh(),w&&c.set.position()&&(c.save.conditions(),p.exclusive&&c.hideAll(),c.animate.show(n))}},hide:function(n){if(n=n||function(){},c.is.visible()||c.is.animating()){if(!1===p.onHide.call(w,k))return void c.debug("onHide callback returned false, cancelling popup animation");c.remove.visible(),c.unbind.close(),c.restore.conditions(),c.animate.hide(n)}},hideAll:function(){n(et.popup).filter("."+d.visible).each(function(){n(this).data(g.activator).popup("hide")})},exists:function(){return!!w&&(p.inline||p.popup?c.has.popup():w.closest(yt).length>=1)},removePopup:function(){c.has.popup()&&!p.popup&&(c.debug("Removing popup",w),w.remove(),w=void 0,p.onRemove.call(w,k))},save:{conditions:function(){c.cache={title:b.attr("title")},c.cache.title&&b.removeAttr("title"),c.verbose("Saving original attributes",c.cache.title)}},restore:{conditions:function(){return c.cache&&c.cache.title&&(b.attr("title",c.cache.title),c.verbose("Restoring original attributes",c.cache.title)),!0}},supports:{svg:function(){return void 0===typeof SVGGraphicsElement}},animate:{show:function(t){t=n.isFunction(t)?t:function(){},p.transition&&void 0!==n.fn.transition&&b.transition("is supported")?(c.set.visible(),w.transition({animation:p.transition+" in",queue:!1,debug:p.debug,verbose:p.verbose,duration:p.duration,onComplete:function(){c.bind.close(),t.call(w,k),p.onVisible.call(w,k)}})):c.error(st.noTransition)},hide:function(t){if(t=n.isFunction(t)?t:function(){},c.debug("Hiding pop-up"),!1===p.onHide.call(w,k))return void c.debug("onHide callback returned false, cancelling popup animation");p.transition&&void 0!==n.fn.transition&&b.transition("is supported")?w.transition({animation:p.transition+" out",queue:!1,duration:p.duration,debug:p.debug,verbose:p.verbose,onComplete:function(){c.reset(),t.call(w,k),p.onHidden.call(w,k)}}):c.error(st.noTransition)}},change:{content:function(n){w.html(n)}},get:{html:function(){return b.removeData(g.html),b.data(g.html)||p.html},title:function(){return b.removeData(g.title),b.data(g.title)||p.title},content:function(){return b.removeData(g.content),b.data(g.content)||b.attr("title")||p.content},variation:function(){return b.removeData(g.variation),b.data(g.variation)||p.variation},popup:function(){return w},popupOffset:function(){return w.offset()},calculations:function(){var n,r=nt[0],u=ht[0]==t,f=p.inline||p.popup&&p.movePopup?nt.position():nt.offset(),o=u?{top:0,left:0}:ht.offset(),i={},s=u?{top:e.scrollTop(),left:e.scrollLeft()}:{top:0,left:0};return i={target:{element:nt[0],width:nt.outerWidth(),height:nt.outerHeight(),top:f.top,left:f.left,margin:{}},popup:{width:w.outerWidth(),height:w.outerHeight()},parent:{width:tt.outerWidth(),height:tt.outerHeight()},screen:{top:o.top,left:o.left,scroll:{top:s.top,left:s.left},width:ht.width(),height:ht.height()}},p.setFluidWidth&&c.is.fluid()&&(i.container={width:w.parent().outerWidth()},i.popup.width=i.container.width),i.target.margin.top=p.inline?parseInt(t.getComputedStyle(r).getPropertyValue("margin-top"),10):0,i.target.margin.left=p.inline?c.is.rtl()?parseInt(t.getComputedStyle(r).getPropertyValue("margin-right"),10):parseInt(t.getComputedStyle(r).getPropertyValue("margin-left"),10):0,n=i.screen,i.boundary={top:n.top+n.scroll.top,bottom:n.top+n.scroll.top+n.height,left:n.left+n.scroll.left,right:n.left+n.scroll.left+n.width},i},id:function(){return ct},startEvent:function(){return"hover"==p.on?"mouseenter":"focus"==p.on&&"focus"},scrollEvent:function(){return"scroll"},endEvent:function(){return"hover"==p.on?"mouseleave":"focus"==p.on&&"blur"},distanceFromBoundary:function(n,t){var r,i,u={};return t=t||c.get.calculations(),r=t.popup,i=t.boundary,n&&(u={top:n.top-i.top,left:n.left-i.left,right:i.right-(n.left+r.width),bottom:i.bottom-(n.top+r.height)},c.verbose("Distance from boundaries determined",n,u)),u},offsetParent:function(t){var o=void 0!==t?t[0]:b[0],r=o.parentNode,i=n(r);if(r)for(var u="none"===i.css("transform"),f="static"===i.css("position"),e=i.is("html");r&&!e&&f&&u;)r=r.parentNode,i=n(r),u="none"===i.css("transform"),f="static"===i.css("position"),e=i.is("html");return i&&i.length>0?i:n()},positions:function(){return{"top left":!1,"top center":!1,"top right":!1,"bottom left":!1,"bottom center":!1,"bottom right":!1,"left center":!1,"right center":!1}},nextPosition:function(n){var r=n.split(" "),i=r[0],u=r[1],o={top:"bottom",bottom:"top",left:"right",right:"left"},s={left:"center",center:"right",right:"left"},h={"top left":"top center","top center":"top right","top right":"right center","right center":"bottom right","bottom right":"bottom center","bottom center":"bottom left","bottom left":"left center","left center":"top left"},l="top"==i||"bottom"==i,f=!1,e=!1,t=!1;return ut||(c.verbose("All available positions available"),ut=c.get.positions()),c.debug("Recording last position tried",n),ut[n]=!0,"opposite"===p.prefer&&(t=[o[i],u],t=t.join(" "),f=!0===ut[t],c.debug("Trying opposite strategy",t)),"adjacent"===p.prefer&&l&&(t=[i,s[u]],t=t.join(" "),e=!0===ut[t],c.debug("Trying adjacent strategy",t)),(e||f)&&(c.debug("Using backup position",t),t=h[n]),t}},set:{position:function(n,t){if(0===nt.length||0===w.length)return void c.error(st.notFound);var r,u,i,o,e,f,s,h;if(t=t||c.get.calculations(),n=n||b.data(g.position)||p.position,r=b.data(g.offset)||p.offset,u=p.distanceAway,i=t.target,o=t.popup,e=t.parent,0===i.width&&0===i.height&&!c.is.svg(i.element))return c.debug("Popup target is hidden, no action taken"),!1;switch(p.inline&&(c.debug("Adding margin to calculation",i.margin),"left center"==n||"right center"==n?(r+=i.margin.top,u+=-i.margin.left):"top left"==n||"top center"==n||"top right"==n?(r+=i.margin.left,u-=i.margin.top):(r+=i.margin.left,u+=i.margin.top)),c.debug("Determining popup position from calculations",n,t),c.is.rtl()&&(n=n.replace(/left|right/g,function(n){return"left"==n?"right":"left"}),c.debug("RTL: Popup position updated",n)),lt==p.maxSearchDepth&&"string"==typeof p.lastResort&&(n=p.lastResort),n){case"top left":f={top:"auto",bottom:e.height-i.top+u,left:i.left+r,right:"auto"};break;case"top center":f={bottom:e.height-i.top+u,left:i.left+i.width/2-o.width/2+r,top:"auto",right:"auto"};break;case"top right":f={bottom:e.height-i.top+u,right:e.width-i.left-i.width-r,top:"auto",left:"auto"};break;case"left center":f={top:i.top+i.height/2-o.height/2+r,right:e.width-i.left+u,left:"auto",bottom:"auto"};break;case"right center":f={top:i.top+i.height/2-o.height/2+r,left:i.left+i.width+u,bottom:"auto",right:"auto"};break;case"bottom left":f={top:i.top+i.height+u,left:i.left+r,bottom:"auto",right:"auto"};break;case"bottom center":f={top:i.top+i.height+u,left:i.left+i.width/2-o.width/2+r,bottom:"auto",right:"auto"};break;case"bottom right":f={top:i.top+i.height+u,right:e.width-i.left-i.width-r,left:"auto",bottom:"auto"}}if(void 0===f&&c.error(st.invalidPosition,n),c.debug("Calculated popup positioning values",f),w.css(f).removeClass(d.position).addClass(n).addClass(d.loading),s=c.get.popupOffset(),h=c.get.distanceFromBoundary(s,t),c.is.offstage(h,n)){if(c.debug("Position is outside viewport",n),lt<p.maxSearchDepth)return lt++,n=c.get.nextPosition(n),c.debug("Trying new position",n),!!w&&c.set.position(n,t);if(!p.lastResort)return c.debug("Popup could not find a position to display",w),c.error(st.cannotPlace,k),c.remove.attempts(),c.remove.loading(),c.reset(),p.onUnplaceable.call(w,k),!1;c.debug("No position found, showing with last position")}return c.debug("Position is on stage",n),c.remove.attempts(),c.remove.loading(),p.setFluidWidth&&c.is.fluid()&&c.set.fluidWidth(t),!0},fluidWidth:function(n){n=n||c.get.calculations(),c.debug("Automatically setting element width to parent width",n.parent.width),w.css("width",n.container.width)},variation:function(n){(n=n||c.get.variation())&&c.has.popup()&&(c.verbose("Adding variation to popup",n),w.addClass(n))},visible:function(){b.addClass(d.visible)}},remove:{loading:function(){w.removeClass(d.loading)},variation:function(n){(n=n||c.get.variation())&&(c.verbose("Removing variation",n),w.removeClass(n))},visible:function(){b.removeClass(d.visible)},attempts:function(){c.verbose("Resetting all searched positions"),lt=0,ut=!1}},bind:{events:function(){c.debug("Binding popup events to module"),"click"==p.on&&b.on("click"+rt,c.toggle),"hover"==p.on&&b.on("touchstart"+rt,c.event.touchstart),c.get.startEvent()&&b.on(c.get.startEvent()+rt,c.event.start).on(c.get.endEvent()+rt,c.event.end),p.target&&c.debug("Target set to element",nt),e.on("resize"+it,c.event.resize)},popup:function(){c.verbose("Allowing hover events on popup to prevent closing"),w&&c.has.popup()&&w.on("mouseenter"+rt,c.event.start).on("mouseleave"+rt,c.event.end)},close:function(){(!0===p.hideOnScroll||"auto"==p.hideOnScroll&&"click"!=p.on)&&pt.one(c.get.scrollEvent()+it,c.event.hideGracefully),"hover"==p.on&&vt&&(c.verbose("Binding popup close event to document"),o.on("touchstart"+it,function(n){c.verbose("Touched away from popup"),c.event.hideGracefully.call(k,n)})),"click"==p.on&&p.closable&&(c.verbose("Binding popup close event to document"),o.on("click"+it,function(n){c.verbose("Clicked away from popup"),c.event.hideGracefully.call(k,n)}))}},unbind:{events:function(){e.off(it),b.off(rt)},close:function(){o.off(it),pt.off(it)}},has:{popup:function(){return w&&w.length>0}},is:{offstage:function(t,i){var r=[];return n.each(t,function(n,t){t<-p.jitter&&(c.debug("Position exceeds allowable distance from edge",n,t,i),r.push(n))}),r.length>0},svg:function(n){return c.supports.svg()&&n instanceof SVGGraphicsElement},active:function(){return b.hasClass(d.active)},animating:function(){return void 0!==w&&w.hasClass(d.animating)},fluid:function(){return void 0!==w&&w.hasClass(d.fluid)},visible:function(){return void 0!==w&&w.hasClass(d.visible)},dropdown:function(){return b.hasClass(d.dropdown)},hidden:function(){return!c.is.visible()},rtl:function(){return"rtl"==b.css("direction")}},reset:function(){c.remove.visible(),p.preserve?void 0!==n.fn.transition&&w.transition("remove transition"):c.removePopup()},setting:function(t,i){if(n.isPlainObject(t))n.extend(!0,p,t);else{if(void 0===i)return p[t];p[t]=i}},internal:function(t,i){if(n.isPlainObject(t))n.extend(!0,c,t);else{if(void 0===i)return c[t];c[t]=i}},debug:function(){!p.silent&&p.debug&&(p.performance?c.performance.log(arguments):(c.debug=Function.prototype.bind.call(console.info,console,p.name+":"),c.debug.apply(console,arguments)))},verbose:function(){!p.silent&&p.verbose&&p.debug&&(p.performance?c.performance.log(arguments):(c.verbose=Function.prototype.bind.call(console.info,console,p.name+":"),c.verbose.apply(console,arguments)))},error:function(){p.silent||(c.error=Function.prototype.bind.call(console.error,console,p.name+":"),c.error.apply(console,arguments))},performance:{log:function(n){var t,i,r;p.performance&&(t=+new Date,r=h||t,i=t-r,h=t,f.push({Name:n[0],Arguments:[].slice.call(n,1)||"",Element:k,"Execution Time":i})),clearTimeout(c.performance.timer),c.performance.timer=setTimeout(c.performance.display,500)},display:function(){var t=p.name+":",i=0;h=!1,clearTimeout(c.performance.timer),n.each(f,function(n,t){i+=t["Execution Time"]}),t+=" "+i+"ms",l&&(t+=" '"+l+"'"),(void 0!==console.group||void 0!==console.table)&&f.length>0&&(console.groupCollapsed(t),console.table?console.table(f):n.each(f,function(n,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),f=[]}},invoke:function(t,i,r){var s,e,o,f=ft;return i=i||y,r=k||r,"string"==typeof t&&void 0!==f&&(t=t.split(/[\. ]/),s=t.length-1,n.each(t,function(i,r){var u=i!=s?r+t[i+1].charAt(0).toUpperCase()+t[i+1].slice(1):t;if(n.isPlainObject(f[u])&&i!=s)f=f[u];else{if(void 0!==f[u])return e=f[u],!1;if(!n.isPlainObject(f[r])||i==s)return void 0!==f[r]&&(e=f[r],!1);f=f[r]}})),n.isFunction(e)?o=e.apply(r,i):void 0!==e&&(o=e),n.isArray(u)?u.push(o):void 0!==u?u=[u,o]:void 0!==o&&(u=o),e}},v?(void 0===ft&&c.initialize(),c.invoke(a)):(void 0!==ft&&ft.invoke("destroy"),c.initialize())}),void 0!==u?u:this},n.fn.popup.settings={name:"Popup",silent:!1,debug:!1,verbose:!1,performance:!0,namespace:"popup",observeChanges:!0,onCreate:function(){},onRemove:function(){},onShow:function(){},onVisible:function(){},onHide:function(){},onUnplaceable:function(){},onHidden:function(){},on:"hover",boundary:t,addTouchEvents:!0,position:"top left",variation:"",movePopup:!0,target:!1,popup:!1,inline:!1,preserve:!1,hoverable:!1,content:!1,html:!1,title:!1,closable:!0,hideOnScroll:"auto",exclusive:!1,context:"body",scrollContext:t,prefer:"opposite",lastResort:!1,delay:{show:50,hide:70},setFluidWidth:!0,duration:200,transition:"scale",distanceAway:0,jitter:2,offset:0,maxSearchDepth:15,error:{invalidPosition:"The position you specified is not a valid position",cannotPlace:"Popup does not fit within the boundaries of the viewport",method:"The method you called is not defined.",noTransition:"This module requires ui transitions <https://github.com/Semantic-Org/UI-Transition>",notFound:"The target or popup you specified does not exist on the page"},metadata:{activator:"activator",content:"content",html:"html",offset:"offset",position:"position",title:"title",variation:"variation"},className:{active:"active",animating:"animating",dropdown:"dropdown",fluid:"fluid",loading:"loading",popup:"ui popup",position:"top left center bottom right",visible:"visible"},selector:{popup:".ui.popup"},templates:{escape:function(n){var t=/[&<>"'`]/g,i=/[&<>"'`]/,r={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},u=function(n){return r[n]};return i.test(n)?n.replace(t,u):n},popup:function(t){var i="",r=n.fn.popup.settings.templates.escape;return void 0!==typeof t&&(void 0!==typeof t.title&&t.title&&(t.title=r(t.title),i+='<div class="header">'+t.title+"</div>"),void 0!==typeof t.content&&t.content&&(t.content=r(t.content),i+='<div class="content">'+t.content+"</div>")),i}}}}(jQuery,window,document)